import { b as oe, p as se, r as ue, h as S, H as de } from "./index-1ef3a64c-CEngIsyB.js";
import { c as le } from "./app-globals-0f993ce5-DzSE6TtH.js";
var ce = () => {
  const e = import.meta.url, l = {};
  return e !== "" && (l.resourcesUrl = new URL(".", e).href), se(l);
};
ce().then(async (e) => (await 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], forwardCashierRedirects: [516, "forward-cashier-redirects"], dynamicHeight: [32], cashierInfoUrl: [32] }, null, { clientStyling: ["handleClientStylingChange"], clientStylingUrl: ["handleClientStylingChangeURL"] }]]]], e)));
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 = (e) => new Promise((l) => {
  fetch(e).then((d) => d.json()).then((d) => {
    Object.keys(d).forEach((c) => {
      for (let y in d[c])
        te[c][y] = d[c][y];
    }), l(!0);
  });
}), O = (e, l) => {
  const d = l;
  return te[d !== void 0 && fe.includes(d) ? d : he][e];
};
function X(e, l) {
  if (e) {
    const d = document.createElement("style");
    d.innerHTML = l, e.appendChild(d);
  }
}
function K(e, l) {
  if (!e || !l)
    return;
  const d = new URL(l);
  fetch(d.href).then((c) => c.text()).then((c) => {
    const y = document.createElement("style");
    y.innerHTML = c, e && e.appendChild(y);
  }).catch((c) => {
    console.error("There was an error while trying to load client styling from URL", c);
  });
}
function me(e, l, d) {
  if (window.emMessageBus) {
    const c = document.createElement("style");
    window.emMessageBus.subscribe(l, (y) => {
      c.innerHTML = y, e && e.appendChild(c);
    });
  }
}
const ye = (e) => !!(e.toLowerCase().match(/android/i) || e.toLowerCase().match(/blackberry|bb/i) || e.toLowerCase().match(/iphone|ipad|ipod/i) || e.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
var re = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ne = { exports: {} };
(function(e, l) {
  (function(d, c) {
    e.exports = c();
  })(re, function() {
    var d = 1e3, c = 6e4, y = 36e5, I = "millisecond", U = "second", v = "minute", p = "hour", E = "day", _ = "week", b = "month", N = "quarter", T = "year", z = "date", o = "Invalid Date", D = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, j = /\[([^\]]+)]|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, H = { 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 n = ["th", "st", "nd", "rd"], t = a % 100;
      return "[" + a + (n[(t - 20) % 10] || n[t] || n[0]) + "]";
    } }, M = function(a, n, t) {
      var i = String(a);
      return !i || i.length >= n ? a : "" + Array(n + 1 - i.length).join(t) + a;
    }, G = { s: M, z: function(a) {
      var n = -a.utcOffset(), t = Math.abs(n), i = Math.floor(t / 60), r = t % 60;
      return (n <= 0 ? "+" : "-") + M(i, 2, "0") + ":" + M(r, 2, "0");
    }, m: function a(n, t) {
      if (n.date() < t.date())
        return -a(t, n);
      var i = 12 * (t.year() - n.year()) + (t.month() - n.month()), r = n.clone().add(i, b), s = t - r < 0, u = n.clone().add(i + (s ? -1 : 1), b);
      return +(-(i + (t - r) / (s ? r - u : u - r)) || 0);
    }, a: function(a) {
      return a < 0 ? Math.ceil(a) || 0 : Math.floor(a);
    }, p: function(a) {
      return { M: b, y: T, w: _, d: E, D: z, h: p, m: v, s: U, ms: I, Q: N }[a] || String(a || "").toLowerCase().replace(/s$/, "");
    }, u: function(a) {
      return a === void 0;
    } }, x = "en", k = {};
    k[x] = H;
    var q = "$isDayjsObject", A = function(a) {
      return a instanceof Z || !(!a || !a[q]);
    }, L = function a(n, t, i) {
      var r;
      if (!n)
        return x;
      if (typeof n == "string") {
        var s = n.toLowerCase();
        k[s] && (r = s), t && (k[s] = t, r = s);
        var u = n.split("-");
        if (!r && u.length > 1)
          return a(u[0]);
      } else {
        var f = n.name;
        k[f] = n, r = f;
      }
      return !i && r && (x = r), r || !i && x;
    }, g = function(a, n) {
      if (A(a))
        return a.clone();
      var t = typeof n == "object" ? n : {};
      return t.date = a, t.args = arguments, new Z(t);
    }, h = G;
    h.l = L, h.i = A, h.w = function(a, n) {
      return g(a, { locale: n.$L, utc: n.$u, x: n.$x, $offset: n.$offset });
    };
    var Z = function() {
      function a(t) {
        this.$L = L(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[q] = !0;
      }
      var n = a.prototype;
      return n.parse = function(t) {
        this.$d = function(i) {
          var r = i.date, s = i.utc;
          if (r === null)
            return /* @__PURE__ */ new Date(NaN);
          if (h.u(r))
            return /* @__PURE__ */ new Date();
          if (r instanceof Date)
            return new Date(r);
          if (typeof r == "string" && !/Z$/i.test(r)) {
            var u = r.match(D);
            if (u) {
              var f = u[2] - 1 || 0, m = (u[7] || "0").substring(0, 3);
              return s ? new Date(Date.UTC(u[1], f, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, m)) : new Date(u[1], f, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, m);
            }
          }
          return new Date(r);
        }(t), this.init();
      }, n.init = function() {
        var t = this.$d;
        this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
      }, n.$utils = function() {
        return h;
      }, n.isValid = function() {
        return this.$d.toString() !== o;
      }, n.isSame = function(t, i) {
        var r = g(t);
        return this.startOf(i) <= r && r <= this.endOf(i);
      }, n.isAfter = function(t, i) {
        return g(t) < this.startOf(i);
      }, n.isBefore = function(t, i) {
        return this.endOf(i) < g(t);
      }, n.$g = function(t, i, r) {
        return h.u(t) ? this[i] : this.set(r, t);
      }, n.unix = function() {
        return Math.floor(this.valueOf() / 1e3);
      }, n.valueOf = function() {
        return this.$d.getTime();
      }, n.startOf = function(t, i) {
        var r = this, s = !!h.u(i) || i, u = h.p(t), f = function(P, $) {
          var R = h.w(r.$u ? Date.UTC(r.$y, $, P) : new Date(r.$y, $, P), r);
          return s ? R : R.endOf(E);
        }, m = function(P, $) {
          return h.w(r.toDate()[P].apply(r.toDate("s"), (s ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice($)), r);
        }, w = this.$W, C = this.$M, W = this.$D, Y = "set" + (this.$u ? "UTC" : "");
        switch (u) {
          case T:
            return s ? f(1, 0) : f(31, 11);
          case b:
            return s ? f(1, C) : f(0, C + 1);
          case _:
            var F = this.$locale().weekStart || 0, B = (w < F ? w + 7 : w) - F;
            return f(s ? W - B : W + (6 - B), C);
          case E:
          case z:
            return m(Y + "Hours", 0);
          case p:
            return m(Y + "Minutes", 1);
          case v:
            return m(Y + "Seconds", 2);
          case U:
            return m(Y + "Milliseconds", 3);
          default:
            return this.clone();
        }
      }, n.endOf = function(t) {
        return this.startOf(t, !1);
      }, n.$set = function(t, i) {
        var r, s = h.p(t), u = "set" + (this.$u ? "UTC" : ""), f = (r = {}, r[E] = u + "Date", r[z] = u + "Date", r[b] = u + "Month", r[T] = u + "FullYear", r[p] = u + "Hours", r[v] = u + "Minutes", r[U] = u + "Seconds", r[I] = u + "Milliseconds", r)[s], m = s === E ? this.$D + (i - this.$W) : i;
        if (s === b || s === T) {
          var w = this.clone().set(z, 1);
          w.$d[f](m), w.init(), this.$d = w.set(z, Math.min(this.$D, w.daysInMonth())).$d;
        } else
          f && this.$d[f](m);
        return this.init(), this;
      }, n.set = function(t, i) {
        return this.clone().$set(t, i);
      }, n.get = function(t) {
        return this[h.p(t)]();
      }, n.add = function(t, i) {
        var r, s = this;
        t = Number(t);
        var u = h.p(i), f = function(C) {
          var W = g(s);
          return h.w(W.date(W.date() + Math.round(C * t)), s);
        };
        if (u === b)
          return this.set(b, this.$M + t);
        if (u === T)
          return this.set(T, this.$y + t);
        if (u === E)
          return f(1);
        if (u === _)
          return f(7);
        var m = (r = {}, r[v] = c, r[p] = y, r[U] = d, r)[u] || 1, w = this.$d.getTime() + t * m;
        return h.w(w, this);
      }, n.subtract = function(t, i) {
        return this.add(-1 * t, i);
      }, n.format = function(t) {
        var i = this, r = this.$locale();
        if (!this.isValid())
          return r.invalidDate || o;
        var s = t || "YYYY-MM-DDTHH:mm:ssZ", u = h.z(this), f = this.$H, m = this.$m, w = this.$M, C = r.weekdays, W = r.months, Y = r.meridiem, F = function($, R, V, J) {
          return $ && ($[R] || $(i, s)) || V[R].slice(0, J);
        }, B = function($) {
          return h.s(f % 12 || 12, $, "0");
        }, P = Y || function($, R, V) {
          var J = $ < 12 ? "AM" : "PM";
          return V ? J.toLowerCase() : J;
        };
        return s.replace(j, function($, R) {
          return R || function(V) {
            switch (V) {
              case "YY":
                return String(i.$y).slice(-2);
              case "YYYY":
                return h.s(i.$y, 4, "0");
              case "M":
                return w + 1;
              case "MM":
                return h.s(w + 1, 2, "0");
              case "MMM":
                return F(r.monthsShort, w, W, 3);
              case "MMMM":
                return F(W, w);
              case "D":
                return i.$D;
              case "DD":
                return h.s(i.$D, 2, "0");
              case "d":
                return String(i.$W);
              case "dd":
                return F(r.weekdaysMin, i.$W, C, 2);
              case "ddd":
                return F(r.weekdaysShort, i.$W, C, 3);
              case "dddd":
                return C[i.$W];
              case "H":
                return String(f);
              case "HH":
                return h.s(f, 2, "0");
              case "h":
                return B(1);
              case "hh":
                return B(2);
              case "a":
                return P(f, m, !0);
              case "A":
                return P(f, m, !1);
              case "m":
                return String(m);
              case "mm":
                return h.s(m, 2, "0");
              case "s":
                return String(i.$s);
              case "ss":
                return h.s(i.$s, 2, "0");
              case "SSS":
                return h.s(i.$ms, 3, "0");
              case "Z":
                return u;
            }
            return null;
          }($) || u.replace(":", "");
        });
      }, n.utcOffset = function() {
        return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
      }, n.diff = function(t, i, r) {
        var s, u = this, f = h.p(i), m = g(t), w = (m.utcOffset() - this.utcOffset()) * c, C = this - m, W = function() {
          return h.m(u, m);
        };
        switch (f) {
          case T:
            s = W() / 12;
            break;
          case b:
            s = W();
            break;
          case N:
            s = W() / 3;
            break;
          case _:
            s = (C - w) / 6048e5;
            break;
          case E:
            s = (C - w) / 864e5;
            break;
          case p:
            s = C / y;
            break;
          case v:
            s = C / c;
            break;
          case U:
            s = C / d;
            break;
          default:
            s = C;
        }
        return r ? s : h.a(s);
      }, n.daysInMonth = function() {
        return this.endOf(b).$D;
      }, n.$locale = function() {
        return k[this.$L];
      }, n.locale = function(t, i) {
        if (!t)
          return this.$L;
        var r = this.clone(), s = L(t, i, !0);
        return s && (r.$L = s), r;
      }, n.clone = function() {
        return h.w(this.$d, this);
      }, n.toDate = function() {
        return new Date(this.valueOf());
      }, n.toJSON = function() {
        return this.isValid() ? this.toISOString() : null;
      }, n.toISOString = function() {
        return this.$d.toISOString();
      }, n.toString = function() {
        return this.$d.toUTCString();
      }, a;
    }(), Q = Z.prototype;
    return g.prototype = Q, [["$ms", I], ["$s", U], ["$m", v], ["$H", p], ["$W", E], ["$M", b], ["$y", T], ["$D", z]].forEach(function(a) {
      Q[a[1]] = function(n) {
        return this.$g(n, a[0], a[1]);
      };
    }), g.extend = function(a, n) {
      return a.$i || (a(n, Z, g), a.$i = !0), g;
    }, g.locale = L, g.isDayjs = A, g.unix = function(a) {
      return g(1e3 * a);
    }, g.en = k[x], g.Ls = k, g.p = {}, g;
  });
})(ne);
const ie = ne.exports;
var ae = { exports: {} };
(function(e, l) {
  (function(d, c) {
    e.exports = c();
  })(re, function() {
    var d = "minute", c = /[+-]\d\d(?::?\d\d)?/g, y = /([+-]|\d\d)/g;
    return function(I, U, v) {
      var p = U.prototype;
      v.utc = function(o) {
        var D = { date: o, utc: !0, args: arguments };
        return new U(D);
      }, p.utc = function(o) {
        var D = v(this.toDate(), { locale: this.$L, utc: !0 });
        return o ? D.add(this.utcOffset(), d) : D;
      }, p.local = function() {
        return v(this.toDate(), { locale: this.$L, utc: !1 });
      };
      var E = p.parse;
      p.parse = function(o) {
        o.utc && (this.$u = !0), this.$utils().u(o.$offset) || (this.$offset = o.$offset), E.call(this, o);
      };
      var _ = p.init;
      p.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
          _.call(this);
      };
      var b = p.utcOffset;
      p.utcOffset = function(o, D) {
        var j = this.$utils().u;
        if (j(o))
          return this.$u ? 0 : j(this.$offset) ? b.call(this) : this.$offset;
        if (typeof o == "string" && (o = function(x) {
          x === void 0 && (x = "");
          var k = x.match(c);
          if (!k)
            return null;
          var q = ("" + k[0]).match(y) || ["-", 0, 0], A = q[0], L = 60 * +q[1] + +q[2];
          return L === 0 ? 0 : A === "+" ? L : -L;
        }(o), o === null))
          return this;
        var H = Math.abs(o) <= 16 ? 60 * o : o, M = this;
        if (D)
          return M.$offset = H, M.$u = o === 0, M;
        if (o !== 0) {
          var G = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
          (M = this.local().add(H + G, d)).$offset = H, M.$x.$localOffset = G;
        } else
          M = this.utc();
        return M;
      };
      var N = p.format;
      p.format = function(o) {
        var D = o || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
        return N.call(this, D);
      }, p.valueOf = function() {
        var o = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
        return this.$d.valueOf() - 6e4 * o;
      }, p.isUTC = function() {
        return !!this.$u;
      }, p.toISOString = function() {
        return this.toDate().toISOString();
      }, p.toString = function() {
        return this.toDate().toUTCString();
      };
      var T = p.toDate;
      p.toDate = function(o) {
        return o === "s" && this.$offset ? v(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : T.call(this);
      };
      var z = p.diff;
      p.diff = function(o, D, j) {
        if (o && this.$u === o.$u)
          return z.call(this, o, D, j);
        var H = this.local(), M = v(o).local();
        return z.call(H, M, D, j);
      };
    };
  });
})(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 = "user-deposit-withdrawal", ee = [
  "mm-hcback-to-merchant",
  "mm-hc-back-tomerchant",
  "mm-hc-sports",
  "mm-hc-casino",
  "mm-hc-contact",
  "mm-wm-hc-init-deposit",
  "mm-wm-hc-init-deposit-quick"
], $e = () => {
}, Se = class {
  constructor(e) {
    ue(this, e), 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 = $e, this.forwardCashierRedirects = !1, this.dynamicHeight = void 0, this.cashierInfoUrl = void 0;
  }
  get typeParameter() {
    if (this.type === "deposit")
      return "Deposit";
    if (this.type === "withdraw")
      return "Withdraw";
  }
  handleClientStylingChange(e, l) {
    e != l && X(this.stylingContainer, this.clientStyling);
  }
  handleClientStylingChangeURL(e, l) {
    e != l && this.clientStylingUrl && K(this.stylingContainer, this.clientStylingUrl);
  }
  async componentWillLoad() {
    if (await 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 && K(this.stylingContainer, this.clientStylingUrl))), window.addEventListener("message", this.bindedHandler, !1);
  }
  disconnectedCallback() {
    window.removeEventListener("message", this.bindedHandler, !1), this.stylingSubscription && this.stylingSubscription.unsubscribe();
  }
  render() {
    return S(de, { key: "46153b61097691f3a3b2da29aa260edf0688f01c" }, S("div", { key: "0082deaaf9c6348cff4010ec8b1f58e5ea26e99b", ref: (e) => this.stylingContainer = e, class: "" }, S("div", { key: "8aec364ea2134d01c2b29fc75136cad08fd5d965", class: `DepositWithdrawalWrapper ${this.isShortCashier ? "ShortCashier" : ""}` }, !(this.isMobile && !this.isShortCashier) && S("h2", { key: "4b0184e2354199332c8438b4430c047982364dff", class: "CategoryTitle" }, O(this.typeParameter === "Withdraw" ? "Withdraw" : "Deposit", this.language)), S("div", { key: "49c9dbda82eb6576bc11375371f4359ba0b0285d", style: { marginTop: this.isShortCashier ? "30px" : "0" } }, this.isMobile && !this.isShortCashier ? S("div", { class: "MenuReturnButton", onClick: this.toggleScreen }, S("svg", { xmlns: "http://www.w3.org/2000/svg", width: "15", height: "15", viewBox: "0 0 15 15" }, S("defs", null), S("g", { transform: "translate(-20 -158)" }, S("g", { transform: "translate(20 158)" }, S("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)" })))), S("h2", { class: "CategoryTitleMobile" }, O(this.typeParameter === "Withdraw" ? "Withdraw" : "Deposit", this.language))) : null), this.cashierInfoUrl ? S("iframe", { width: "100%", allow: "payment", height: this.dynamicHeight, src: this.cashierInfoUrl }) : S("h3", { innerHTML: this.type === "deposit" ? O("denyDeposit", this.language) : O("denyWithdrawal", this.language), class: "ErrorMessage" }))));
  }
  async loadWidget() {
    const e = {
      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(e).some((l) => l === void 0) || !this.endpoint))
      try {
        const l = `${this.endpoint}/v1/player/${this.userId}/payment/GetPaymentSession`, d = await fetch(l, {
          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(e)
        });
        if (!d.ok) {
          const y = await d.text();
          throw new Error(y);
        }
        const c = await d.json();
        if (c.CashierInfo)
          this.cashierInfoUrl = c.CashierInfo.Url;
        else {
          let y;
          if (c.ResponseMessage) {
            let U = this.errorCodes.find((v) => c.ResponseMessage.includes(v)) || null;
            U ? y = O(`errorCode${U}`, this.language) : y = O("notFoundErrorCode", this.language);
          } else
            y = this.type === "deposit" ? O("denyDeposit", this.language) : O("denyWithdrawal", this.language);
          const I = { type: "error", message: y };
          window.postMessage({ type: "DenyDepositOrWithdrawal", data: I }, window.location.href);
        }
      } catch (l) {
        console.error(l);
      }
  }
  handleMessage(e) {
    const l = this.extractPayload(e);
    if (!l)
      return;
    this.applyLayoutHints(l);
    const d = this.extractCashierRedirectReason(l);
    if (!d || this.emitForwardedRedirect(e, d))
      return;
    const c = this.resolveRedirectPlan(d);
    c && this.doRedirect(c.reason, c.targetUrl);
  }
  extractCashierRedirectReason(e) {
    if (typeof e?.type == "string" && ee.includes(e.type))
      return e.type;
    if (typeof e?.redirect == "string" && ee.includes(e.redirect))
      return e.redirect;
  }
  extractPayload(e) {
    if (!(!e?.data || typeof e.data != "object"))
      return e.data;
  }
  applyLayoutHints(e) {
    e["MMFE:openFullCashier"] === "true" && (window.postMessage({ type: "GoToDeposit" }, window.location.href), window.postMessage({ type: "CloseShortCashier" }, window.location.href)), e["MMFE:setQuickDepositHeight"] && this.isShortCashier && (this.dynamicHeight = e["MMFE:setQuickDepositHeight"].toString() + "px"), e["MMFE:setIFrameHeight"] && (this.dynamicHeight = e["MMFE:setIFrameHeight"].toString() + "px");
  }
  resolveRedirectPlan(e) {
    switch (e) {
      case "mm-hcback-to-merchant":
      case "mm-hc-back-tomerchant":
        return this.buildRedirectPlan(e, this.homeUrl);
      case "mm-hc-sports":
        return this.buildRedirectPlan(e, this.sportsUrl);
      case "mm-hc-casino":
        return this.buildRedirectPlan(window.location.href, this.casinoUrl);
      case "mm-hc-contact":
        return window.postMessage({ type: "CloseShortCashier" }, window.location.href), this.buildRedirectPlan(window.location.href, this.contactUrl);
      case "mm-wm-hc-init-deposit":
      case "mm-wm-hc-init-deposit-quick":
        return window.postMessage({ type: "CloseShortCashier" }, window.location.href), this.buildRedirectPlan(window.location.href, this.depositUrl);
      default:
        return;
    }
  }
  buildRedirectPlan(e, l) {
    if (l)
      return { reason: e, targetUrl: l };
  }
  emitForwardedRedirect(e, l) {
    if (!this.forwardCashierRedirects)
      return !1;
    const d = {
      type: `${ve}:${l}`,
      originalType: l,
      payload: e.data,
      origin: e.origin
    };
    return window.postMessage(d, window.location.href), !0;
  }
  doRedirect(e, l) {
    const d = { reason: e, url: l, cancel: !1 };
    if (this.beforeRedirect(d), !d.cancel) {
      if (!d.url) {
        window.location.href = "/";
        return;
      }
      window.location.href = d.url;
    }
  }
  static get watchers() {
    return {
      clientStyling: ["handleClientStylingChange"],
      clientStylingUrl: ["handleClientStylingChangeURL"]
    };
  }
};
Se.style = Ce;
export {
  Se as user_deposit_withdrawal
};
