import { a as Re, $ as Ne, S as je, i as qe, s as De, f as D, b as Oe, n as ne, d as N, w as se, u as Z, L as ue, c as j, p as m, x as G, e as W, q as L, v as R, t as v, g as Ge, h as Ue, j as Ve, o as Xe, y as Q, k as He, K as ie, l as ee, m as _e, r as s, A as Je, B as Ye, C as Ke, D as Ze } from "./PlayerAccountControllerNd-DobNa2EP.js";
import "../lazy/player-bonus-card-DfgSx08u.js";
function de(o, e) {
  Re(o, e);
}
function Qe(o) {
  Ne.set(o);
}
const ce = {
  en: {
    titleBonuses: "Active Bonuses",
    bonusCode: "Do you have a bonus code?",
    getBonus: "Get Bonus",
    invalidBonusCode: "The bonus code provided is invalid.",
    noActiveBonuses: "You have no active bonuses at the moment.",
    forfeitBonus: "Are you sure want to forfeit bonus?",
    forfeitBonusConfirm: "Confirm",
    forfeitBonusCancel: "Cancel",
    bonusClaimSuccessMessage: "Bonus claimed!",
    bonusClaimErrorMessage: "Invalid bonus"
  },
  "zh-hk": {
    titleBonuses: "活躍獎金",
    bonusCode: "你有獎金代碼嗎？",
    getBonus: "獲得獎金",
    invalidBonusCode: "提供的紅利代碼無效。",
    noActiveBonuses: "您目前沒有有效的獎金。",
    forfeitBonus: "您確定要放棄獎金及其獎金嗎？",
    forfeitBonusConfirm: "確認",
    forfeitBonusCancel: "取消",
    bonusClaimSuccessMessage: "獎金要求！",
    bonusClaimErrorMessage: "無效獎金"
  },
  fr: {
    titleBonuses: "Bonus actifs",
    bonusCode: "Avez-vous un code bonus?",
    getBonus: "Obtenir un bonus",
    invalidBonusCode: "Le code bonus fourni n'est pas valide.",
    noActiveBonuses: "Vous n'avez pas de bonus actifs pour le moment.",
    forfeitBonus: "Etes-vous sûr de vouloir supprimer le bonus et ses gains?",
    forfeitBonusConfirm: "Confirmer",
    forfeitBonusCancel: "Annuler",
    bonusClaimSuccessMessage: "Bonus réclamé!",
    bonusClaimErrorMessage: "Bonus invalide"
  },
  ro: {
    titleBonuses: "Bonusuri active",
    bonusCode: "Ai un cod de bonus?",
    getBonus: "Revendică",
    invalidBonusCode: "Codul de bonus introdus este invalid.",
    noActiveBonuses: "Nu ai niciun bonus activ în acest moment.",
    forfeitBonus: "Ești sigur că vrei să anulezi acest bonus și câștigurile provenite din acest bonus?",
    forfeitBonusConfirm: "Confirmă",
    forfeitBonusCancel: "Anulează",
    bonusClaimSuccessMessage: "Bonus revendicat!",
    bonusClaimErrorMessage: "Bonus invalid"
  },
  es: {
    titleBonuses: "Bonos Activos",
    bonusCode: "Tienes un código de Bono?",
    getBonus: "Obtener Bono",
    invalidBonusCode: "El código del Bono no es válido.",
    noActiveBonuses: "Usted no tiene Bonos activos en este momento.",
    forfeitBonus: "Estas seguro que quieres perder el bono?",
    forfeitBonusConfirm: "Confirmar",
    forfeitBonusCancel: "Cancelar",
    bonusClaimSuccessMessage: "Bono adjudicado!",
    bonusClaimErrorMessage: "Bono invalido"
  },
  pt: {
    titleBonuses: "Bônus Ativos",
    bonusCode: "Você tem um código de bônus?",
    getBonus: "Obter bônus",
    invalidBonusCode: "O código de bônus fornecido é inválido.",
    noActiveBonuses: "Você não tem bônus ativos no momento.",
    forfeitBonus: "Tem certeza de que deseja perder o bônus e seus ganhos?",
    forfeitBonusConfirm: "Confirmar",
    forfeitBonusCancel: "Cancelar",
    bonusClaimSuccessMessage: "Bônus reivindicado!",
    bonusClaimErrorMessage: "Bônus inválido"
  },
  hr: {
    titleBonuses: "Aktivni bonusi",
    bonusCode: "Imate li bonus kod?",
    getBonus: "Preuzmi bonus",
    invalidBonusCode: "Navedeni bonus kod je nevažeći.",
    noActiveBonuses: "Trenutno nemate aktivnih bonusa.",
    forfeitBonus: "Jeste li sigurni da želite otkazati bonus?",
    forfeitBonusConfirm: "Potvrdi",
    forfeitBonusCancel: "Otkaži",
    bonusClaimSuccessMessage: "Preuzet bonus!",
    bonusClaimErrorMessage: "Nevažeći bonus"
  },
  "pt-br": {
    titleBonuses: "Títulos ativos",
    bonusCode: "Você tem um código de bônus?",
    getBonus: "Reivindicar bônus",
    invalidBonusCode: "O código de bônus emitido é inválido",
    noActiveBonuses: "Não possui títulos ativos no momento",
    forfeitBonus: "Tem certeza de que deseja recusar o bônus?",
    forfeitBonusConfirm: "confirme",
    forfeitBonusCancel: "Cancelar",
    bonusClaimSuccessMessage: "Bônus ativado",
    bonusClaimErrorMessage: "Voucher inválido"
  },
  "es-mx": {
    titleBonuses: "Bonos activos",
    bonusCode: "¿Tiene código de bonos?",
    getBonus: "Reclamar bono",
    invalidBonusCode: "El código de bono emitido es inválido",
    noActiveBonuses: "No tiene bonos activos al momento",
    forfeitBonus: "¿ Está seguro que quiere declinar el bono?",
    forfeitBonusConfirm: "Confirmar",
    forfeitBonusCancel: "Cancelar",
    bonusClaimSuccessMessage: "Bono activado",
    bonusClaimErrorMessage: "Bono inválido"
  },
  tr: {
    titleBonuses: "Aktif Bonuslar",
    bonusCode: "Bonus kodunuz var mı?",
    getBonus: "Bonusu Al",
    invalidBonusCode: "Sağlanan bonus kodu geçersiz.",
    noActiveBonuses: "Şu anda aktif bonusunuz yok.",
    forfeitBonus: "Bonusu kaybetmek istediğinizden emin misiniz?",
    forfeitBonusConfirm: "Onaylamak",
    forfeitBonusCancel: "İptal etmek",
    bonusClaimSuccessMessage: "Bonus talep edildi!",
    bonusClaimErrorMessage: "Geçersiz bonus"
  },
  "en-us": {
    titleBonuses: "Active Bonuses",
    bonusCode: "Do you have a bonus code?",
    getBonus: "Get Bonus",
    invalidBonusCode: "The bonus code provided is invalid.",
    noActiveBonuses: "You have no active bonuses at the moment.",
    forfeitBonus: "Are you sure want to forfeit bonus?",
    forfeitBonusConfirm: "Confirm",
    forfeitBonusCancel: "Cancel",
    bonusClaimSuccessMessage: "Bonus claimed!",
    bonusClaimErrorMessage: "Invalid bonus"
  }
};
function xe(o) {
  Oe(o, "svelte-154bfm9", '.ActiveBonusesWrapper{color:var(--emw--pam-typography, var(--emw--color-contrast, #07072A));padding:50px;max-width:850px}.ActiveBonusesWrapper.ActiveBonusesWrapperMobile{padding:20px 15px;max-width:unset}.MenuReturnButton{color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));display:inline-flex;align-items:center;column-gap:10px;margin-bottom:30px}.MenuReturnButton svg{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.ActiveBonusesTitle{font-size:26px;color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));font-weight:400}.ActiveBonusesTitleMobile{font-size:16px}.ActiveBonusesTitleNone{display:none}.BonusCodeContainer{color:var(--emw--color-gray-300, #58586B);display:flex;flex-direction:column;padding-bottom:30px;position:relative;width:70%}.BonusCodeContainer label{font-size:16px;font-weight:300;padding-bottom:5px}.BonusCodeContainer.BonusCodeContainerMobile{width:100%}.BonusCodeContainer .BonusCodeWrapper{display:flex;gap:10px}.BonusCodeContainer .BonusCodeWrapper.BonusCodeWrapperMobile{flex-direction:column}.BonusCodeContainer .BonusCodeWrapper .BonusCodeInput{width:70%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--pam-contrast, var(--emw--color-contrast, #07072A));border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px}.BonusCodeContainer .BonusCodeWrapper .BonusCodeInput:focus{outline-color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.BonusCodeContainer .BonusCodeWrapper .BonusCodeInput.BonusCodeInputMobile{width:100%}.BonusCodeContainer .BonusCodeWrapper .SubmitBonusCode{background:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));border:1px solid var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));color:var(--emw--color-white, #FFFFFF);cursor:pointer;border-radius:5px;width:30%;height:44px;font-size:15px;text-transform:uppercase;text-align:center;transition-duration:0.3s;box-sizing:border-box;padding:10px}.BonusCodeContainer .BonusCodeWrapper .SubmitBonusCode[disabled]{opacity:0.3;cursor:not-allowed}.BonusCodeContainer .BonusCodeWrapper .SubmitBonusCode:hover{filter:brightness(0.9)}.BonusCodeContainer .BonusCodeWrapper .SubmitBonusCode.SubmitBonusCodeMobile{width:100%}.BonusCodeContainer .BonusCodeWrapper .SubmitBonusCode:active{background:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.BonusCodeContainer.InvalidField input{border:1px solid var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));background:var(--emw--color-primary-50, var(--emw--color-pink-50, #F1BED9));color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.BonusCodeContainer .InvalidBonusCodeMessage{color:var(--emw--color-error, var(--emw--color-red, #FD2839))}.BonusCodeWrapper{display:flex;gap:20px}.SubmitBonusCode{background:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));border:1px solid var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));color:var(--emw--color-white, #FFFFFF);cursor:pointer;border-radius:5px;width:30%;height:44px;font-size:15px;text-transform:uppercase;text-align:center;transition-duration:0.3s;box-sizing:border-box;padding:10px}.SubmitBonusCode[disabled]{opacity:0.3}.SubmitBonusCode:hover{filter:brightness(0.9)}.SubmitBonusCode:active{background:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.ActiveBonusesGrid{display:grid;grid-template-columns:1fr 1fr;gap:50px}.ActiveBonusesGrid.ActiveBonusesGridMobile{grid-template-columns:1fr}.ModalWrapper{position:fixed;top:0;right:0;bottom:0;left:0;background-color:rgba(0, 0, 0, 0.7);display:flex;justify-content:center;align-items:center;z-index:300}.ModalWrapper .ModalContent{background-color:var(--emw--color-white, #FFFFFF);position:relative;padding:30px;border-top:5px solid var(--emw--color-secondary, var(--emw--color-secondary, #FD2839));border-radius:5px}.ModalWrapper .ModalBody{background-color:var(--emw--color-gray-50, #F9F8F8);padding:30px;text-align:center}.ModalWrapper .ModalBody .ModalText{font-size:22px;margin-bottom:40px}.ModalWrapper .ModalBody .ModalButtons{display:flex;gap:36px}.ModalWrapper .ModalBody .ModalCancel,.ModalWrapper .ModalBody .ModalConfirm{background:transparent;border:1px solid var(--emw--color-gray-300, #58586B);color:var(--emw--color-gray-300, #58586B);cursor:pointer;border-radius:5px;width:200px;height:50px;font-size:16px;text-transform:uppercase;text-align:center;transition-duration:0.3s;box-sizing:border-box;padding:10px}.ModalWrapper .ModalBody .ModalConfirm{background:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));border:1px solid var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));color:var(--emw--button-typography, var(--emw--color-white, #FFFFFF))}.ModalWrapper.ModalWrapperMobile .ModalContent{padding:20px;width:80vw;border-top:none}.ModalWrapper.ModalWrapperMobile .ModalBody{padding:0;background:transparent}.ModalWrapper.ModalWrapperMobile .ModalText{font-size:16px}.ModalWrapper.ModalWrapperMobile .ModalButtons{gap:10px}.ModalWrapper.ModalWrapperMobile .ModalCancel,.ModalWrapper.ModalWrapperMobile .ModalConfirm{height:40px;width:50%;font-size:14px}.BonusesPaginationWrapper{margin:40px 0;display:block;line-break:anywhere;line-height:2em}.BonusesPaginationWrapper.BonusesPaginationWrapperMobile{text-align:center}.BonusesPaginationWrapper .BonusesFirst,.BonusesPaginationWrapper .BonusesPrev,.BonusesPaginationWrapper .BonusesNext,.BonusesPaginationWrapper .BonusesLast,.BonusesPaginationWrapper .BonusesPage{all:unset;box-sizing:border-box;cursor:pointer}.BonusesPaginationWrapper .BonusesFirst,.BonusesPaginationWrapper .BonusesPrev,.BonusesPaginationWrapper .BonusesNext,.BonusesPaginationWrapper .BonusesLast{color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));font-size:16px;cursor:pointer;padding:5px 10px;font-weight:700}.BonusesPaginationWrapper .BonusesFirst.Inactive,.BonusesPaginationWrapper .BonusesPrev.Inactive,.BonusesPaginationWrapper .BonusesNext.Inactive,.BonusesPaginationWrapper .BonusesLast.Inactive{color:var(--emw--color-gray-100, #E6E6E6);cursor:default}.BonusesPaginationWrapper .BonusesPage{margin:0 5px;color:var(--emw--color-gray-300, #58586B);font-size:16px;cursor:pointer;padding:5px 10px;white-space:nowrap}.BonusesPaginationWrapper .BonusesPage.BonusPageActive{background-color:var(--emw--color-white, #FFFFFF);font-weight:700;cursor:default}.ModalLoader{width:300px;height:300px;margin:0 auto;display:flex;align-items:center;justify-content:center}.ModalLoader:after{content:" ";display:block;width:64px;height:64px;margin:8px;border-radius:50%;border:5px solid var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));border-color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E)) transparent var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E)) transparent;animation:Loader 1.2s linear infinite}@keyframes Loader{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}');
}
function pe(o, e, n) {
  const t = o.slice();
  return t[53] = e[n], t[55] = n, t;
}
function me(o, e, n) {
  const t = o.slice();
  return t[56] = e[n], t;
}
function $e(o) {
  let e, n, t, i, r, a, c, u, g, y, M = (
    /*$_*/
    o[20]("titleBonuses") + ""
  ), A, _, h;
  return {
    c() {
      e = W("div"), n = Q("svg"), t = Q("defs"), i = Q("style"), r = R(`.aaa {
                fill: var(--emw--pam-color-primary, var(--emw--color-primary, #22b04e));
              }
            `), a = Q("g"), c = Q("g"), u = Q("path"), g = L(), y = W("h2"), A = R(M), v(u, "class", "aaa"), v(u, "d", "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"), v(u, "transform", "translate(15 15) rotate(180)"), v(c, "transform", "translate(20 158)"), v(a, "transform", "translate(-20 -158)"), v(n, "xmlns", "http://www.w3.org/2000/svg"), v(n, "width", "15"), v(n, "height", "15"), v(n, "viewBox", "0 0 15 15"), v(y, "class", "ActiveBonusesTitleMobile"), v(e, "class", "MenuReturnButton");
    },
    m(C, p) {
      j(C, e, p), m(e, n), m(n, t), m(t, i), m(i, r), m(n, a), m(a, c), m(c, u), m(e, g), m(e, y), m(y, A), _ || (h = G(
        e,
        "click",
        /*click_handler*/
        o[35]
      ), _ = !0);
    },
    p(C, p) {
      p[0] & /*$_*/
      1048576 && M !== (M = /*$_*/
      C[20]("titleBonuses") + "") && Z(A, M);
    },
    d(C) {
      C && N(e), _ = !1, h();
    }
  };
}
function fe(o) {
  let e, n = (
    /*$_*/
    o[20]("invalidBonusCode") + ""
  ), t;
  return {
    c() {
      e = W("p"), t = R(n), v(e, "class", "InvalidBonusCodeMessage");
    },
    m(i, r) {
      j(i, e, r), m(e, t);
    },
    p(i, r) {
      r[0] & /*$_*/
      1048576 && n !== (n = /*$_*/
      i[20]("invalidBonusCode") + "") && Z(t, n);
    },
    d(i) {
      i && N(e);
    }
  };
}
function eo(o) {
  let e, n, t;
  function i(u, g) {
    return (
      /*activeBonusesList*/
      u[18].length === 0 ? so : no
    );
  }
  let r = i(o), a = r(o), c = (
    /*activeBonusesList*/
    o[18].length !== 0 && ge(o)
  );
  return {
    c() {
      e = W("div"), a.c(), n = L(), c && c.c(), t = ie(), v(e, "class", "ActiveBonusesGrid " + /*isMobile*/
      (o[21] ? "ActiveBonusesGridMobile" : ""));
    },
    m(u, g) {
      j(u, e, g), a.m(e, null), j(u, n, g), c && c.m(u, g), j(u, t, g);
    },
    p(u, g) {
      r === (r = i(u)) && a ? a.p(u, g) : (a.d(1), a = r(u), a && (a.c(), a.m(e, null))), /*activeBonusesList*/
      u[18].length !== 0 ? c ? c.p(u, g) : (c = ge(u), c.c(), c.m(t.parentNode, t)) : c && (c.d(1), c = null);
    },
    d(u) {
      u && (N(e), N(n), N(t)), a.d(), c && c.d(u);
    }
  };
}
function oo(o) {
  let e;
  return {
    c() {
      e = W("div"), v(e, "class", "ModalLoader"), v(e, "part", "ModalLoader");
    },
    m(n, t) {
      j(n, e, t);
    },
    p: ne,
    d(n) {
      n && N(e);
    }
  };
}
function no(o) {
  let e, n = ee(
    /*activeBonusesList*/
    o[18]
  ), t = [];
  for (let i = 0; i < n.length; i += 1)
    t[i] = be(me(o, n, i));
  return {
    c() {
      for (let i = 0; i < t.length; i += 1)
        t[i].c();
      e = ie();
    },
    m(i, r) {
      for (let a = 0; a < t.length; a += 1)
        t[a] && t[a].m(i, r);
      j(i, e, r);
    },
    p(i, r) {
      if (r[0] & /*activeBonusesList, lang, dateformat, clientstyling, clientstylingurl, mbsource, translationurl, currencylocale, ishiddenwageringbonus*/
      262399) {
        n = ee(
          /*activeBonusesList*/
          i[18]
        );
        let a;
        for (a = 0; a < n.length; a += 1) {
          const c = me(i, n, a);
          t[a] ? t[a].p(c, r) : (t[a] = be(c), t[a].c(), t[a].m(e.parentNode, e));
        }
        for (; a < t.length; a += 1)
          t[a].d(1);
        t.length = n.length;
      }
    },
    d(i) {
      i && N(e), _e(t, i);
    }
  };
}
function so(o) {
  let e, n = (
    /*$_*/
    o[20]("noActiveBonuses") + ""
  ), t;
  return {
    c() {
      e = W("p"), t = R(n);
    },
    m(i, r) {
      j(i, e, r), m(e, t);
    },
    p(i, r) {
      r[0] & /*$_*/
      1048576 && n !== (n = /*$_*/
      i[20]("noActiveBonuses") + "") && Z(t, n);
    },
    d(i) {
      i && N(e);
    }
  };
}
function io(o) {
  let e, n, t, i, r, a, c, u, g, y, M, A, _, h, C, p, b;
  return {
    c() {
      e = W("player-bonus-card"), s(e, "termsandconditionsdescription", n = /*activeBonus*/
      o[56].termsandconditionsdescription), s(e, "termsandconditionsurl", t = /*activeBonus*/
      o[56].termsandconditionsurl), s(e, "termsandconditionsasset", i = /*activeBonus*/
      o[56].termsandconditionsasset), s(e, "endpoint", r = /*activeBonus*/
      o[56].endpoint), s(e, "playerid", a = /*activeBonus*/
      o[56].playerid), s(e, "session", c = /*activeBonus*/
      o[56].session), s(e, "bonuswalletid", u = /*activeBonus*/
      o[56].walletId), s(e, "bonusdate", g = /*activeBonus*/
      o[56].granted), s(e, "bonusexpirationdate", y = /*activeBonus*/
      o[56].expiryTime), s(e, "bonusstatus", M = /*activeBonus*/
      o[56].status), s(e, "bonusname", A = /*activeBonus*/
      o[56].name), s(e, "bonustype", _ = /*activeBonus*/
      o[56].type), s(e, "bonusamount", h = /*activeBonus*/
      o[56].extension.grantedPlayerCurrencyAmount), s(e, "bonuswageringamount", C = `${/*activeBonus*/
      o[56].fulfilledWR} / ${/*activeBonus*/
      o[56].originalWageringRequirement}`), s(e, "bonusremainingamount", p = /*activeBonus*/
      o[56].currentAmount), s(e, "bonuscurrency", b = /*activeBonus*/
      o[56].currency), s(
        e,
        "lang",
        /*lang*/
        o[0]
      ), s(
        e,
        "dateformat",
        /*dateformat*/
        o[6]
      ), s(
        e,
        "clientstyling",
        /*clientstyling*/
        o[1]
      ), s(
        e,
        "clientstylingurl",
        /*clientstylingurl*/
        o[2]
      ), s(
        e,
        "mbsource",
        /*mbsource*/
        o[3]
      ), s(
        e,
        "translationurl",
        /*translationurl*/
        o[4]
      ), s(
        e,
        "currencylocale",
        /*currencylocale*/
        o[5]
      ), s(
        e,
        "ishiddenwageringbonus",
        /*ishiddenwageringbonus*/
        o[7]
      );
    },
    m(d, f) {
      j(d, e, f);
    },
    p(d, f) {
      f[0] & /*activeBonusesList*/
      262144 && n !== (n = /*activeBonus*/
      d[56].termsandconditionsdescription) && s(e, "termsandconditionsdescription", n), f[0] & /*activeBonusesList*/
      262144 && t !== (t = /*activeBonus*/
      d[56].termsandconditionsurl) && s(e, "termsandconditionsurl", t), f[0] & /*activeBonusesList*/
      262144 && i !== (i = /*activeBonus*/
      d[56].termsandconditionsasset) && s(e, "termsandconditionsasset", i), f[0] & /*activeBonusesList*/
      262144 && r !== (r = /*activeBonus*/
      d[56].endpoint) && s(e, "endpoint", r), f[0] & /*activeBonusesList*/
      262144 && a !== (a = /*activeBonus*/
      d[56].playerid) && s(e, "playerid", a), f[0] & /*activeBonusesList*/
      262144 && c !== (c = /*activeBonus*/
      d[56].session) && s(e, "session", c), f[0] & /*activeBonusesList*/
      262144 && u !== (u = /*activeBonus*/
      d[56].walletId) && s(e, "bonuswalletid", u), f[0] & /*activeBonusesList*/
      262144 && g !== (g = /*activeBonus*/
      d[56].granted) && s(e, "bonusdate", g), f[0] & /*activeBonusesList*/
      262144 && y !== (y = /*activeBonus*/
      d[56].expiryTime) && s(e, "bonusexpirationdate", y), f[0] & /*activeBonusesList*/
      262144 && M !== (M = /*activeBonus*/
      d[56].status) && s(e, "bonusstatus", M), f[0] & /*activeBonusesList*/
      262144 && A !== (A = /*activeBonus*/
      d[56].name) && s(e, "bonusname", A), f[0] & /*activeBonusesList*/
      262144 && _ !== (_ = /*activeBonus*/
      d[56].type) && s(e, "bonustype", _), f[0] & /*activeBonusesList*/
      262144 && h !== (h = /*activeBonus*/
      d[56].extension.grantedPlayerCurrencyAmount) && s(e, "bonusamount", h), f[0] & /*activeBonusesList*/
      262144 && C !== (C = `${/*activeBonus*/
      d[56].fulfilledWR} / ${/*activeBonus*/
      d[56].originalWageringRequirement}`) && s(e, "bonuswageringamount", C), f[0] & /*activeBonusesList*/
      262144 && p !== (p = /*activeBonus*/
      d[56].currentAmount) && s(e, "bonusremainingamount", p), f[0] & /*activeBonusesList*/
      262144 && b !== (b = /*activeBonus*/
      d[56].currency) && s(e, "bonuscurrency", b), f[0] & /*lang*/
      1 && s(
        e,
        "lang",
        /*lang*/
        d[0]
      ), f[0] & /*dateformat*/
      64 && s(
        e,
        "dateformat",
        /*dateformat*/
        d[6]
      ), f[0] & /*clientstyling*/
      2 && s(
        e,
        "clientstyling",
        /*clientstyling*/
        d[1]
      ), f[0] & /*clientstylingurl*/
      4 && s(
        e,
        "clientstylingurl",
        /*clientstylingurl*/
        d[2]
      ), f[0] & /*mbsource*/
      8 && s(
        e,
        "mbsource",
        /*mbsource*/
        d[3]
      ), f[0] & /*translationurl*/
      16 && s(
        e,
        "translationurl",
        /*translationurl*/
        d[4]
      ), f[0] & /*currencylocale*/
      32 && s(
        e,
        "currencylocale",
        /*currencylocale*/
        d[5]
      ), f[0] & /*ishiddenwageringbonus*/
      128 && s(
        e,
        "ishiddenwageringbonus",
        /*ishiddenwageringbonus*/
        d[7]
      );
    },
    d(d) {
      d && N(e);
    }
  };
}
function to(o) {
  let e, n, t, i, r, a, c, u, g, y, M, A, _, h, C;
  return {
    c() {
      e = W("player-bonus-card"), s(e, "termsandconditionsdescription", n = /*activeBonus*/
      o[56].termsandconditionsdescription), s(e, "termsandconditionsurl", t = /*activeBonus*/
      o[56].termsandconditionsurl), s(e, "termsandconditionsasset", i = /*activeBonus*/
      o[56].termsandconditionsasset), s(e, "endpoint", r = /*activeBonus*/
      o[56].endpoint), s(e, "playerid", a = /*activeBonus*/
      o[56].playerid), s(e, "session", c = /*activeBonus*/
      o[56].session), s(e, "bonuswalletid", u = /*activeBonus*/
      o[56].walletId), s(e, "bonusdate", g = /*activeBonus*/
      o[56].granted), s(e, "bonusexpirationdate", y = /*activeBonus*/
      o[56].expiryTime), s(e, "bonusstatus", M = /*activeBonus*/
      o[56].status), s(e, "bonusname", A = /*activeBonus*/
      o[56].name), s(e, "bonustype", _ = /*activeBonus*/
      o[56].type), s(e, "bonuscurrency", h = /*activeBonus*/
      o[56].currency), s(e, "bonusfreespins", C = /*activeBonus*/
      o[56].freeRoundNumber), s(
        e,
        "lang",
        /*lang*/
        o[0]
      ), s(
        e,
        "dateformat",
        /*dateformat*/
        o[6]
      ), s(
        e,
        "clientstyling",
        /*clientstyling*/
        o[1]
      ), s(
        e,
        "clientstylingurl",
        /*clientstylingurl*/
        o[2]
      ), s(
        e,
        "mbsource",
        /*mbsource*/
        o[3]
      ), s(
        e,
        "translationurl",
        /*translationurl*/
        o[4]
      ), s(
        e,
        "currencylocale",
        /*currencylocale*/
        o[5]
      ), s(
        e,
        "ishiddenwageringbonus",
        /*ishiddenwageringbonus*/
        o[7]
      );
    },
    m(p, b) {
      j(p, e, b);
    },
    p(p, b) {
      b[0] & /*activeBonusesList*/
      262144 && n !== (n = /*activeBonus*/
      p[56].termsandconditionsdescription) && s(e, "termsandconditionsdescription", n), b[0] & /*activeBonusesList*/
      262144 && t !== (t = /*activeBonus*/
      p[56].termsandconditionsurl) && s(e, "termsandconditionsurl", t), b[0] & /*activeBonusesList*/
      262144 && i !== (i = /*activeBonus*/
      p[56].termsandconditionsasset) && s(e, "termsandconditionsasset", i), b[0] & /*activeBonusesList*/
      262144 && r !== (r = /*activeBonus*/
      p[56].endpoint) && s(e, "endpoint", r), b[0] & /*activeBonusesList*/
      262144 && a !== (a = /*activeBonus*/
      p[56].playerid) && s(e, "playerid", a), b[0] & /*activeBonusesList*/
      262144 && c !== (c = /*activeBonus*/
      p[56].session) && s(e, "session", c), b[0] & /*activeBonusesList*/
      262144 && u !== (u = /*activeBonus*/
      p[56].walletId) && s(e, "bonuswalletid", u), b[0] & /*activeBonusesList*/
      262144 && g !== (g = /*activeBonus*/
      p[56].granted) && s(e, "bonusdate", g), b[0] & /*activeBonusesList*/
      262144 && y !== (y = /*activeBonus*/
      p[56].expiryTime) && s(e, "bonusexpirationdate", y), b[0] & /*activeBonusesList*/
      262144 && M !== (M = /*activeBonus*/
      p[56].status) && s(e, "bonusstatus", M), b[0] & /*activeBonusesList*/
      262144 && A !== (A = /*activeBonus*/
      p[56].name) && s(e, "bonusname", A), b[0] & /*activeBonusesList*/
      262144 && _ !== (_ = /*activeBonus*/
      p[56].type) && s(e, "bonustype", _), b[0] & /*activeBonusesList*/
      262144 && h !== (h = /*activeBonus*/
      p[56].currency) && s(e, "bonuscurrency", h), b[0] & /*activeBonusesList*/
      262144 && C !== (C = /*activeBonus*/
      p[56].freeRoundNumber) && s(e, "bonusfreespins", C), b[0] & /*lang*/
      1 && s(
        e,
        "lang",
        /*lang*/
        p[0]
      ), b[0] & /*dateformat*/
      64 && s(
        e,
        "dateformat",
        /*dateformat*/
        p[6]
      ), b[0] & /*clientstyling*/
      2 && s(
        e,
        "clientstyling",
        /*clientstyling*/
        p[1]
      ), b[0] & /*clientstylingurl*/
      4 && s(
        e,
        "clientstylingurl",
        /*clientstylingurl*/
        p[2]
      ), b[0] & /*mbsource*/
      8 && s(
        e,
        "mbsource",
        /*mbsource*/
        p[3]
      ), b[0] & /*translationurl*/
      16 && s(
        e,
        "translationurl",
        /*translationurl*/
        p[4]
      ), b[0] & /*currencylocale*/
      32 && s(
        e,
        "currencylocale",
        /*currencylocale*/
        p[5]
      ), b[0] & /*ishiddenwageringbonus*/
      128 && s(
        e,
        "ishiddenwageringbonus",
        /*ishiddenwageringbonus*/
        p[7]
      );
    },
    d(p) {
      p && N(e);
    }
  };
}
function be(o) {
  let e;
  function n(r, a) {
    return (
      /*activeBonus*/
      r[56].type === "freeRound" ? to : io
    );
  }
  let t = n(o), i = t(o);
  return {
    c() {
      i.c(), e = ie();
    },
    m(r, a) {
      i.m(r, a), j(r, e, a);
    },
    p(r, a) {
      t === (t = n(r)) && i ? i.p(r, a) : (i.d(1), i = t(r), i && (i.c(), i.m(e.parentNode, e)));
    },
    d(r) {
      r && N(e), i.d(r);
    }
  };
}
function ge(o) {
  let e, n, t, i, r, a, c, u, g, y, M, A, _, h, C, p, b, d, f, X, H, J, U, q = ee(Array(
    /*numberOfPages*/
    o[16]
  )), w = [];
  for (let B = 0; B < q.length; B += 1)
    w[B] = Be(pe(o, q, B));
  return {
    c() {
      e = W("div"), n = W("button"), t = R("|<"), a = L(), c = W("button"), u = R("<"), M = L();
      for (let B = 0; B < w.length; B += 1)
        w[B].c();
      A = L(), _ = W("button"), h = R(">"), b = L(), d = W("button"), f = R(">|"), n.disabled = i = /*currentPage*/
      o[17] === 0, v(n, "class", r = "BonusesFirst " + /*currentPage*/
      (o[17] === 0 ? "Inactive" : "")), c.disabled = g = /*currentPage*/
      o[17] === 0, v(c, "class", y = "BonusesPrev " + /*currentPage*/
      (o[17] === 0 ? "Inactive" : "")), _.disabled = C = /*currentPage*/
      o[17] === /*numberOfPages*/
      o[16] - 1, v(_, "class", p = "BonusesNext " + /*currentPage*/
      (o[17] === /*numberOfPages*/
      o[16] - 1 ? "Inactive" : "")), d.disabled = X = /*currentPage*/
      o[17] === /*numberOfPages*/
      o[16] - 1, v(d, "class", H = "BonusesLast " + /*currentPage*/
      (o[17] === /*numberOfPages*/
      o[16] - 1 ? "Inactive" : "")), v(e, "class", "BonusesPaginationWrapper " + /*isMobile*/
      (o[21] ? "BonusesPaginationWrapperMobile" : ""));
    },
    m(B, F) {
      j(B, e, F), m(e, n), m(n, t), m(e, a), m(e, c), m(c, u), m(e, M);
      for (let E = 0; E < w.length; E += 1)
        w[E] && w[E].m(e, null);
      m(e, A), m(e, _), m(_, h), m(e, b), m(e, d), m(d, f), J || (U = [
        G(
          n,
          "click",
          /*click_handler_1*/
          o[37]
        ),
        G(
          c,
          "click",
          /*click_handler_2*/
          o[38]
        ),
        G(
          _,
          "click",
          /*click_handler_4*/
          o[40]
        ),
        G(
          d,
          "click",
          /*click_handler_5*/
          o[41]
        )
      ], J = !0);
    },
    p(B, F) {
      if (F[0] & /*currentPage*/
      131072 && i !== (i = /*currentPage*/
      B[17] === 0) && (n.disabled = i), F[0] & /*currentPage*/
      131072 && r !== (r = "BonusesFirst " + /*currentPage*/
      (B[17] === 0 ? "Inactive" : "")) && v(n, "class", r), F[0] & /*currentPage*/
      131072 && g !== (g = /*currentPage*/
      B[17] === 0) && (c.disabled = g), F[0] & /*currentPage*/
      131072 && y !== (y = "BonusesPrev " + /*currentPage*/
      (B[17] === 0 ? "Inactive" : "")) && v(c, "class", y), F[0] & /*currentPage, getActiveBonuses, numberOfPages*/
      16973824) {
        q = ee(Array(
          /*numberOfPages*/
          B[16]
        ));
        let E;
        for (E = 0; E < q.length; E += 1) {
          const I = pe(B, q, E);
          w[E] ? w[E].p(I, F) : (w[E] = Be(I), w[E].c(), w[E].m(e, A));
        }
        for (; E < w.length; E += 1)
          w[E].d(1);
        w.length = q.length;
      }
      F[0] & /*currentPage, numberOfPages*/
      196608 && C !== (C = /*currentPage*/
      B[17] === /*numberOfPages*/
      B[16] - 1) && (_.disabled = C), F[0] & /*currentPage, numberOfPages*/
      196608 && p !== (p = "BonusesNext " + /*currentPage*/
      (B[17] === /*numberOfPages*/
      B[16] - 1 ? "Inactive" : "")) && v(_, "class", p), F[0] & /*currentPage, numberOfPages*/
      196608 && X !== (X = /*currentPage*/
      B[17] === /*numberOfPages*/
      B[16] - 1) && (d.disabled = X), F[0] & /*currentPage, numberOfPages*/
      196608 && H !== (H = "BonusesLast " + /*currentPage*/
      (B[17] === /*numberOfPages*/
      B[16] - 1 ? "Inactive" : "")) && v(d, "class", H);
    },
    d(B) {
      B && N(e), _e(w, B), J = !1, se(U);
    }
  };
}
function Be(o) {
  let e, n = (
    /*i*/
    o[55] + 1 + ""
  ), t, i, r, a, c;
  function u() {
    return (
      /*click_handler_3*/
      o[39](
        /*i*/
        o[55]
      )
    );
  }
  return {
    c() {
      e = W("button"), t = R(n), e.disabled = i = /*i*/
      o[55] === /*currentPage*/
      o[17], v(e, "class", r = "BonusesPage " + /*i*/
      (o[55] === /*currentPage*/
      o[17] ? "BonusPageActive" : ""));
    },
    m(g, y) {
      j(g, e, y), m(e, t), a || (c = G(e, "click", u), a = !0);
    },
    p(g, y) {
      o = g, y[0] & /*currentPage*/
      131072 && i !== (i = /*i*/
      o[55] === /*currentPage*/
      o[17]) && (e.disabled = i), y[0] & /*currentPage*/
      131072 && r !== (r = "BonusesPage " + /*i*/
      (o[55] === /*currentPage*/
      o[17] ? "BonusPageActive" : "")) && v(e, "class", r);
    },
    d(g) {
      g && N(e), a = !1, c();
    }
  };
}
function ve(o) {
  let e, n, t, i, r = (
    /*$_*/
    o[20]("forfeitBonus") + ""
  ), a, c, u, g, y = (
    /*$_*/
    o[20]("forfeitBonusCancel") + ""
  ), M, A, _, h = (
    /*$_*/
    o[20]("forfeitBonusConfirm") + ""
  ), C, p, b;
  return {
    c() {
      e = W("div"), n = W("div"), t = W("div"), i = W("p"), a = R(r), c = L(), u = W("div"), g = W("button"), M = R(y), A = L(), _ = W("button"), C = R(h), v(i, "class", "ModalText"), v(g, "class", "ModalCancel"), v(_, "class", "ModalConfirm"), v(u, "class", "ModalButtons"), v(t, "class", "ModalBody"), v(n, "class", "ModalContent"), v(e, "class", "ModalWrapper " + /*isMobile*/
      (o[21] ? "ModalWrapperMobile" : ""));
    },
    m(d, f) {
      j(d, e, f), m(e, n), m(n, t), m(t, i), m(i, a), m(t, c), m(t, u), m(u, g), m(g, M), m(u, A), m(u, _), m(_, C), p || (b = [
        G(
          g,
          "click",
          /*closeBonusModal*/
          o[26]
        ),
        G(
          _,
          "click",
          /*debouncedFunction*/
          o[28](
            /*deleteBonus*/
            o[27]
          )
        )
      ], p = !0);
    },
    p(d, f) {
      f[0] & /*$_*/
      1048576 && r !== (r = /*$_*/
      d[20]("forfeitBonus") + "") && Z(a, r), f[0] & /*$_*/
      1048576 && y !== (y = /*$_*/
      d[20]("forfeitBonusCancel") + "") && Z(M, y), f[0] & /*$_*/
      1048576 && h !== (h = /*$_*/
      d[20]("forfeitBonusConfirm") + "") && Z(C, h);
    },
    d(d) {
      d && N(e), p = !1, se(b);
    }
  };
}
function ao(o) {
  let e, n, t, i, r = (
    /*$_*/
    o[20]("titleBonuses") + ""
  ), a, c, u, g, y = (
    /*$_*/
    o[20]("bonusCode") + ""
  ), M, A, _, h, C, p, b = (
    /*$_*/
    o[20]("getBonus") + ""
  ), d, f, X, H, J, U, q, w = (
    /*isMobile*/
    o[21] && $e(o)
  ), B = (
    /*invalidBonusCode*/
    o[11] && fe(o)
  );
  function F(P, T) {
    return (
      /*isLoading*/
      P[9] ? oo : eo
    );
  }
  let E = F(o), I = E(o), z = (
    /*bonusModal*/
    o[19] && ve(o)
  );
  return {
    c() {
      e = W("div"), n = W("div"), w && w.c(), t = L(), i = W("h2"), a = R(r), c = L(), u = W("div"), g = W("label"), M = R(y), A = L(), _ = W("div"), h = W("input"), C = L(), p = W("button"), d = R(b), X = L(), B && B.c(), H = L(), I.c(), J = L(), z && z.c(), v(i, "class", "ActiveBonusesTitle " + /*isMobile*/
      (o[21] ? "ActiveBonusesTitleNone" : "")), v(g, "for", "BonusCode"), v(h, "class", "BonusCodeInput " + /*isMobile*/
      (o[21] ? "BonusCodeInputMobile" : "")), v(h, "type", "text"), v(h, "id", "BonusCode"), v(p, "class", "SubmitBonusCode " + /*isMobile*/
      (o[21] ? "SubmitBonusCodeMobile" : "")), p.disabled = f = /*invalidBonusField*/
      o[10] || /*isLoading*/
      o[9], v(_, "class", "BonusCodeWrapper " + /*isMobile*/
      (o[21] ? "BonusCodeWrapperMobile" : "")), v(u, "class", "BonusCodeContainer " + /*isMobile*/
      (o[21] ? "BonusCodeContainerMobile" : "")), v(n, "class", "ActiveBonusesWrapper " + /*isMobile*/
      (o[21] ? "ActiveBonusesWrapperMobile" : ""));
    },
    m(P, T) {
      j(P, e, T), m(e, n), w && w.m(n, null), m(n, t), m(n, i), m(i, a), m(n, c), m(n, u), m(u, g), m(g, M), m(u, A), m(u, _), m(_, h), ue(
        h,
        /*bonusCode*/
        o[12]
      ), m(_, C), m(_, p), m(p, d), m(u, X), B && B.m(u, null), m(n, H), I.m(n, null), m(e, J), z && z.m(e, null), o[42](e), U || (q = [
        G(
          h,
          "input",
          /*input_input_handler*/
          o[36]
        ),
        G(
          h,
          "keyup",
          /*validateBonusCode*/
          o[23]
        ),
        G(
          p,
          "click",
          /*claimBonus*/
          o[25]
        )
      ], U = !0);
    },
    p(P, T) {
      /*isMobile*/
      P[21] && w.p(P, T), T[0] & /*$_*/
      1048576 && r !== (r = /*$_*/
      P[20]("titleBonuses") + "") && Z(a, r), T[0] & /*$_*/
      1048576 && y !== (y = /*$_*/
      P[20]("bonusCode") + "") && Z(M, y), T[0] & /*bonusCode*/
      4096 && h.value !== /*bonusCode*/
      P[12] && ue(
        h,
        /*bonusCode*/
        P[12]
      ), T[0] & /*$_*/
      1048576 && b !== (b = /*$_*/
      P[20]("getBonus") + "") && Z(d, b), T[0] & /*invalidBonusField, isLoading*/
      1536 && f !== (f = /*invalidBonusField*/
      P[10] || /*isLoading*/
      P[9]) && (p.disabled = f), /*invalidBonusCode*/
      P[11] ? B ? B.p(P, T) : (B = fe(P), B.c(), B.m(u, null)) : B && (B.d(1), B = null), E === (E = F(P)) && I ? I.p(P, T) : (I.d(1), I = E(P), I && (I.c(), I.m(n, null))), /*bonusModal*/
      P[19] ? z ? z.p(P, T) : (z = ve(P), z.c(), z.m(e, null)) : z && (z.d(1), z = null);
    },
    i: ne,
    o: ne,
    d(P) {
      P && N(e), w && w.d(), B && B.d(), I.d(), z && z.d(), o[42](null), U = !1, se(q);
    }
  };
}
let ro = "status=active", K = 6;
function lo(o, e, n) {
  let t;
  Ge(o, Ue, (l) => n(20, t = l));
  let { endpoint: i = "" } = e, { session: r = "" } = e, { playerid: a = "" } = e, { lang: c = "en" } = e, { currency: u = "" } = e, { clientstyling: g = "" } = e, { clientstylingurl: y = "" } = e, { mbsource: M } = e, { translationurl: A = "" } = e, { currencylocale: _ = "" } = e, { dateformat: h = "" } = e, { bonuscoderegex: C = "" } = e, { ishiddenwageringbonus: p = "false" } = e, { gmversion: b = "" } = e, d = !1, f, X, H = window.navigator.userAgent, J = Ve(H) !== "PC", U = !0, q = !1, w = "", B = 0, F = 0, E = 0, I = 0, z = 0, P = [], T, te = "", oe = !1;
  const ye = () => {
    fetch(A).then((S) => S.json()).then((S) => {
      Object.keys(S).forEach((O) => {
        de(O, S[O]);
      });
    }).catch((S) => {
      console.log(S);
    });
  };
  Object.keys(ce).forEach((l) => {
    de(l, ce[l]);
  });
  const ae = (l) => {
    if (l.data)
      switch (l.data.type) {
        case "DeleteActiveBonus":
          te = l.data.bonuswalletid, n(19, oe = !0);
          break;
      }
  };
  function he(l, S) {
    return (...O) => {
      clearTimeout(T), T = setTimeout(
        () => {
          l.apply(this, O);
        },
        S
      );
    };
  }
  const re = () => {
    window.postMessage(
      {
        type: "PlayerAccountMenuActive",
        isMobile: J
      },
      window.location.href
    );
  }, Ce = () => w ? C ? new RegExp(C).test(w) : !0 : !1, we = () => {
    n(10, U = !Ce()), C && n(11, q = U);
  }, Y = (l) => {
    n(9, d = !0);
    let S = {
      method: "GET",
      headers: { "X-SessionId": r }
    }, O = new URL(`${i}${b === "gm2" ? "/v1/bonus/granted" : `/v1/player/${a}/bonusWallet`}`);
    b === "gm2" ? O.searchParams.append("status", "active") : O.searchParams.append("filter", ro), O.searchParams.append("pagination", `offset=${l},limit=${K}`), fetch(O, S).then((V) => V.json()).then(
      (V) => {
        Array.isArray(V.items) && (b === "gm2" ? V.items.forEach((k) => {
          k.walletId = k.bonusWalletID, k.granted = k.grantedDate, k.expiryTime = k.expiryDate, k.currentAmount = k.remainingAmount, k.originalWageringRequirement = k.initialWagerRequirementAmount, k.fulfilledWR = k.initialWagerRequirementAmount - k.remainingWagerRequirementAmount, k.extension = { grantedPlayerCurrencyAmount: k.amount };
        }) : V.items.forEach((k) => {
          const $ = k?.extension?.bonus?.presentation;
          $ && (k.termsandconditionsurl = $.url, k.termsandconditionsdescription = $.description, k.termsandconditionsasset = $.assets);
        })), n(16, I = Math.ceil(V.total / K)), l - K >= 0 && n(13, B = l - K), l + K < V.total && n(14, F = l + K), n(15, E = (I - 1) * K), n(17, z = l / K), n(18, P = V?.items || []), _ && P.forEach((k) => {
          k.fulfilledWR = x(k.fulfilledWR), k.originalWageringRequirement = x(k.originalWageringRequirement), k.currentAmount = x(k.currentAmount), k.extension.grantedPlayerCurrencyAmount = x(k.extension.grantedPlayerCurrencyAmount);
        }), window.scrollTo({ top: 0, behavior: "smooth" });
      },
      (V) => {
        console.error(V);
      }
    ).finally(() => {
      n(9, d = !1);
    });
  }, x = (l) => new Intl.NumberFormat(_, { style: "currency", currency: u }).format(l).replace(/\s/g, ""), Me = () => {
    n(9, d = !0);
    let l = new URL(`${i}${b === "gm2" ? "/v1/bonus/claim" : `/v1/player/${a}/claimbonus`}`), S;
    b === "gm2" ? S = {
      method: "PUT",
      headers: {
        "X-SessionId": r,
        accept: "application/json",
        "Content-Type": "application/json"
      },
      body: JSON.stringify({ bonusCode: w, currency: u })
    } : (S = {
      method: "POST",
      headers: {
        "X-SessionId": r,
        accept: "application/json"
      }
    }, l.searchParams.append("currency", u), l.searchParams.append("bonusCode", w)), fetch(l.href, S).then((O) => {
      O.status == 200 ? (n(11, q = !1), Y(0), window.postMessage({ type: "ActiveBonusesUpdated" }, window.location.href), window.postMessage(
        {
          type: "WidgetNotification",
          data: {
            type: "success",
            message: t("bonusClaimSuccessMessage")
          }
        },
        window.location.href
      ), typeof gtag == "function" && gtag("event", "ClaimBonus", {
        context: "PlayerActiveBonuses",
        userId: `${a || "Not logged in"}`,
        bonusCode: `${w}`
      })) : (n(11, q = !0), window.postMessage(
        {
          type: "WidgetNotification",
          data: {
            type: "error",
            message: t("bonusClaimErrorMessage")
          }
        },
        window.location.href
      ));
    }).finally(() => {
      n(9, d = !1);
    });
  }, le = () => {
    window.postMessage({ type: "EnableScroll" }, window.location.href), n(19, oe = !1);
  }, ke = () => {
    let l = {
      method: "DELETE",
      headers: {
        "X-SessionId": r,
        "Content-Type": "application/json",
        Accept: "application/json"
      }
    }, S = new URL(`${i}${b === "gm2" ? "/v1/bonus/forfeit" : `/v1/player/${a}/bonusWallet`}`);
    S.searchParams.append("bonusWalletID", te), fetch(S, l).then((O) => {
      O.status == 200 && (Y(0), window.postMessage({ type: "ActiveBonusesUpdated" }, window.location.href), le());
    });
  }, We = () => {
    Qe(c);
  };
  function Ae(l) {
    return he(l, 1e3);
  }
  Xe(() => (window.addEventListener("message", ae, !1), () => {
    window.removeEventListener("message", ae);
  }));
  const Pe = () => re();
  function Ee() {
    w = this.value, n(12, w);
  }
  const Fe = () => Y(0), Se = () => Y(B), Ie = (l) => Y(l * K), ze = () => Y(F), Te = () => Y(E);
  function Le(l) {
    He[l ? "unshift" : "push"](() => {
      f = l, n(8, f);
    });
  }
  return o.$$set = (l) => {
    "endpoint" in l && n(29, i = l.endpoint), "session" in l && n(30, r = l.session), "playerid" in l && n(31, a = l.playerid), "lang" in l && n(0, c = l.lang), "currency" in l && n(32, u = l.currency), "clientstyling" in l && n(1, g = l.clientstyling), "clientstylingurl" in l && n(2, y = l.clientstylingurl), "mbsource" in l && n(3, M = l.mbsource), "translationurl" in l && n(4, A = l.translationurl), "currencylocale" in l && n(5, _ = l.currencylocale), "dateformat" in l && n(6, h = l.dateformat), "bonuscoderegex" in l && n(33, C = l.bonuscoderegex), "ishiddenwageringbonus" in l && n(7, p = l.ishiddenwageringbonus), "gmversion" in l && n(34, b = l.gmversion);
  }, o.$$.update = () => {
    o.$$.dirty[0] & /*lang*/
    1 && c && We(), o.$$.dirty[0] & /*session, endpoint*/
    1610612736 | o.$$.dirty[1] & /*playerid*/
    1 && r && a && i && Y(0), o.$$.dirty[0] & /*clientstyling, customStylingContainer*/
    258 && g && f && Je(f, g), o.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
    260 && y && f && Ye(f, y), o.$$.dirty[0] & /*mbsource, customStylingContainer*/
    264 && M && f && Ke(f, `${M}.Style`, X), o.$$.dirty[0] & /*translationurl*/
    16 && A && ye();
  }, [
    c,
    g,
    y,
    M,
    A,
    _,
    h,
    p,
    f,
    d,
    U,
    q,
    w,
    B,
    F,
    E,
    I,
    z,
    P,
    oe,
    t,
    J,
    re,
    we,
    Y,
    Me,
    le,
    ke,
    Ae,
    i,
    r,
    a,
    u,
    C,
    b,
    Pe,
    Ee,
    Fe,
    Se,
    Ie,
    ze,
    Te,
    Le
  ];
}
class uo extends je {
  constructor(e) {
    super(), qe(
      this,
      e,
      lo,
      ao,
      De,
      {
        endpoint: 29,
        session: 30,
        playerid: 31,
        lang: 0,
        currency: 32,
        clientstyling: 1,
        clientstylingurl: 2,
        mbsource: 3,
        translationurl: 4,
        currencylocale: 5,
        dateformat: 6,
        bonuscoderegex: 33,
        ishiddenwageringbonus: 7,
        gmversion: 34
      },
      xe,
      [-1, -1]
    );
  }
  get endpoint() {
    return this.$$.ctx[29];
  }
  set endpoint(e) {
    this.$$set({ endpoint: e }), D();
  }
  get session() {
    return this.$$.ctx[30];
  }
  set session(e) {
    this.$$set({ session: e }), D();
  }
  get playerid() {
    return this.$$.ctx[31];
  }
  set playerid(e) {
    this.$$set({ playerid: e }), D();
  }
  get lang() {
    return this.$$.ctx[0];
  }
  set lang(e) {
    this.$$set({ lang: e }), D();
  }
  get currency() {
    return this.$$.ctx[32];
  }
  set currency(e) {
    this.$$set({ currency: e }), D();
  }
  get clientstyling() {
    return this.$$.ctx[1];
  }
  set clientstyling(e) {
    this.$$set({ clientstyling: e }), D();
  }
  get clientstylingurl() {
    return this.$$.ctx[2];
  }
  set clientstylingurl(e) {
    this.$$set({ clientstylingurl: e }), D();
  }
  get mbsource() {
    return this.$$.ctx[3];
  }
  set mbsource(e) {
    this.$$set({ mbsource: e }), D();
  }
  get translationurl() {
    return this.$$.ctx[4];
  }
  set translationurl(e) {
    this.$$set({ translationurl: e }), D();
  }
  get currencylocale() {
    return this.$$.ctx[5];
  }
  set currencylocale(e) {
    this.$$set({ currencylocale: e }), D();
  }
  get dateformat() {
    return this.$$.ctx[6];
  }
  set dateformat(e) {
    this.$$set({ dateformat: e }), D();
  }
  get bonuscoderegex() {
    return this.$$.ctx[33];
  }
  set bonuscoderegex(e) {
    this.$$set({ bonuscoderegex: e }), D();
  }
  get ishiddenwageringbonus() {
    return this.$$.ctx[7];
  }
  set ishiddenwageringbonus(e) {
    this.$$set({ ishiddenwageringbonus: e }), D();
  }
  get gmversion() {
    return this.$$.ctx[34];
  }
  set gmversion(e) {
    this.$$set({ gmversion: e }), D();
  }
}
Ze(uo, { endpoint: {}, session: {}, playerid: {}, lang: {}, currency: {}, clientstyling: {}, clientstylingurl: {}, mbsource: {}, translationurl: {}, currencylocale: {}, dateformat: {}, bonuscoderegex: {}, ishiddenwageringbonus: {}, gmversion: {} }, [], [], !0);
export {
  uo as default
};
