import { a as je, $ as qe, S as De, i as Oe, s as Ge, f as D, b as Ue, n as ne, d as N, v as se, t as Z, L as ce, c as j, m, w as U, e as W, p as L, u as R, r as v, g as Ve, h as Xe, o as He, x as Q, j as Je, K as ie, k as ee, l as he, q as s, z as Ye, A as Ke, B as Ze, C as Qe, D as xe } from "./PlayerAccountControllerNd-yeUlo8Jv.js";
import "../lazy/player-bonus-card-LnIX3M2H.js";
function pe(o, e) {
  je(o, e);
}
function $e(o) {
  qe.set(o);
}
const me = {
  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 eo(o) {
  Ue(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 fe(o, e, n) {
  const t = o.slice();
  return t[53] = e[n], t[55] = n, t;
}
function be(o, e, n) {
  const t = o.slice();
  return t[56] = e[n], t;
}
function oo(o) {
  let e, n, t, i, a, r, c, u, g, y, k = (
    /*$_*/
    o[20]("titleBonuses") + ""
  ), A, _, h;
  return {
    c() {
      e = W("div"), n = Q("svg"), t = Q("defs"), i = Q("style"), a = R(`.aaa {
                fill: var(--emw--pam-color-primary, var(--emw--color-primary, #22b04e));
              }
            `), r = Q("g"), c = Q("g"), u = Q("path"), g = L(), y = W("h2"), A = R(k), 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(r, "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, a), m(n, r), m(r, c), m(c, u), m(e, g), m(e, y), m(y, A), _ || (h = U(
        e,
        "click",
        /*click_handler*/
        o[35]
      ), _ = !0);
    },
    p(C, p) {
      p[0] & /*$_*/
      1048576 && k !== (k = /*$_*/
      C[20]("titleBonuses") + "") && Z(A, k);
    },
    d(C) {
      C && N(e), _ = !1, h();
    }
  };
}
function ge(o) {
  let e, n = (
    /*$_*/
    o[20]("invalidBonusCode") + ""
  ), t;
  return {
    c() {
      e = W("p"), t = R(n), v(e, "class", "InvalidBonusCodeMessage");
    },
    m(i, a) {
      j(i, e, a), m(e, t);
    },
    p(i, a) {
      a[0] & /*$_*/
      1048576 && n !== (n = /*$_*/
      i[20]("invalidBonusCode") + "") && Z(t, n);
    },
    d(i) {
      i && N(e);
    }
  };
}
function no(o) {
  let e, n, t;
  function i(u, g) {
    return (
      /*activeBonusesList*/
      u[18].length === 0 ? to : io
    );
  }
  let a = i(o), r = a(o), c = (
    /*activeBonusesList*/
    o[18].length !== 0 && ve(o)
  );
  return {
    c() {
      e = W("div"), r.c(), n = L(), c && c.c(), t = ie(), v(e, "class", "ActiveBonusesGrid " + /*isMobile*/
      (o[21] ? "ActiveBonusesGridMobile" : ""));
    },
    m(u, g) {
      j(u, e, g), r.m(e, null), j(u, n, g), c && c.m(u, g), j(u, t, g);
    },
    p(u, g) {
      a === (a = i(u)) && r ? r.p(u, g) : (r.d(1), r = a(u), r && (r.c(), r.m(e, null))), /*activeBonusesList*/
      u[18].length !== 0 ? c ? c.p(u, g) : (c = ve(u), c.c(), c.m(t.parentNode, t)) : c && (c.d(1), c = null);
    },
    d(u) {
      u && (N(e), N(n), N(t)), r.d(), c && c.d(u);
    }
  };
}
function so(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 io(o) {
  let e, n = ee(
    /*activeBonusesList*/
    o[18]
  ), t = [];
  for (let i = 0; i < n.length; i += 1)
    t[i] = Be(be(o, n, i));
  return {
    c() {
      for (let i = 0; i < t.length; i += 1)
        t[i].c();
      e = ie();
    },
    m(i, a) {
      for (let r = 0; r < t.length; r += 1)
        t[r] && t[r].m(i, a);
      j(i, e, a);
    },
    p(i, a) {
      if (a[0] & /*activeBonusesList, lang, dateformat, clientstyling, clientstylingurl, mbsource, translationurl, currencylocale, ishiddenwageringbonus*/
      262399) {
        n = ee(
          /*activeBonusesList*/
          i[18]
        );
        let r;
        for (r = 0; r < n.length; r += 1) {
          const c = be(i, n, r);
          t[r] ? t[r].p(c, a) : (t[r] = Be(c), t[r].c(), t[r].m(e.parentNode, e));
        }
        for (; r < t.length; r += 1)
          t[r].d(1);
        t.length = n.length;
      }
    },
    d(i) {
      i && N(e), he(t, i);
    }
  };
}
function to(o) {
  let e, n = (
    /*$_*/
    o[20]("noActiveBonuses") + ""
  ), t;
  return {
    c() {
      e = W("p"), t = R(n);
    },
    m(i, a) {
      j(i, e, a), m(e, t);
    },
    p(i, a) {
      a[0] & /*$_*/
      1048576 && n !== (n = /*$_*/
      i[20]("noActiveBonuses") + "") && Z(t, n);
    },
    d(i) {
      i && N(e);
    }
  };
}
function ro(o) {
  let e, n, t, i, a, r, c, u, g, y, k, 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", a = /*activeBonus*/
      o[56].endpoint), s(e, "playerid", r = /*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", k = /*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 && a !== (a = /*activeBonus*/
      d[56].endpoint) && s(e, "endpoint", a), f[0] & /*activeBonusesList*/
      262144 && r !== (r = /*activeBonus*/
      d[56].playerid) && s(e, "playerid", r), 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 && k !== (k = /*activeBonus*/
      d[56].status) && s(e, "bonusstatus", k), 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 ao(o) {
  let e, n, t, i, a, r, c, u, g, y, k, 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", a = /*activeBonus*/
      o[56].endpoint), s(e, "playerid", r = /*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", k = /*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 && a !== (a = /*activeBonus*/
      p[56].endpoint) && s(e, "endpoint", a), b[0] & /*activeBonusesList*/
      262144 && r !== (r = /*activeBonus*/
      p[56].playerid) && s(e, "playerid", r), 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 && k !== (k = /*activeBonus*/
      p[56].status) && s(e, "bonusstatus", k), 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(a, r) {
    return (
      /*activeBonus*/
      a[56].type === "freeRound" ? ao : ro
    );
  }
  let t = n(o), i = t(o);
  return {
    c() {
      i.c(), e = ie();
    },
    m(a, r) {
      i.m(a, r), j(a, e, r);
    },
    p(a, r) {
      t === (t = n(a)) && i ? i.p(a, r) : (i.d(1), i = t(a), i && (i.c(), i.m(e.parentNode, e)));
    },
    d(a) {
      a && N(e), i.d(a);
    }
  };
}
function ve(o) {
  let e, n, t, i, a, r, c, u, g, y, k, A, _, h, C, p, b, d, f, X, H, J, V, q = ee(Array(
    /*numberOfPages*/
    o[16]
  )), w = [];
  for (let B = 0; B < q.length; B += 1)
    w[B] = _e(fe(o, q, B));
  return {
    c() {
      e = W("div"), n = W("button"), t = R("|<"), r = L(), c = W("button"), u = R("<"), k = 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", a = "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, r), m(e, c), m(c, u), m(e, k);
      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 || (V = [
        U(
          n,
          "click",
          /*click_handler_1*/
          o[37]
        ),
        U(
          c,
          "click",
          /*click_handler_2*/
          o[38]
        ),
        U(
          _,
          "click",
          /*click_handler_4*/
          o[40]
        ),
        U(
          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 && a !== (a = "BonusesFirst " + /*currentPage*/
      (B[17] === 0 ? "Inactive" : "")) && v(n, "class", a), 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 = fe(B, q, E);
          w[E] ? w[E].p(I, F) : (w[E] = _e(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), he(w, B), J = !1, se(V);
    }
  };
}
function _e(o) {
  let e, n = (
    /*i*/
    o[55] + 1 + ""
  ), t, i, a, r, 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", a = "BonusesPage " + /*i*/
      (o[55] === /*currentPage*/
      o[17] ? "BonusPageActive" : ""));
    },
    m(g, y) {
      j(g, e, y), m(e, t), r || (c = U(e, "click", u), r = !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 && a !== (a = "BonusesPage " + /*i*/
      (o[55] === /*currentPage*/
      o[17] ? "BonusPageActive" : "")) && v(e, "class", a);
    },
    d(g) {
      g && N(e), r = !1, c();
    }
  };
}
function ye(o) {
  let e, n, t, i, a = (
    /*$_*/
    o[20]("forfeitBonus") + ""
  ), r, c, u, g, y = (
    /*$_*/
    o[20]("forfeitBonusCancel") + ""
  ), k, A, _, h = (
    /*$_*/
    o[20]("forfeitBonusConfirm") + ""
  ), C, p, b;
  return {
    c() {
      e = W("div"), n = W("div"), t = W("div"), i = W("p"), r = R(a), c = L(), u = W("div"), g = W("button"), k = 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, r), m(t, c), m(t, u), m(u, g), m(g, k), m(u, A), m(u, _), m(_, C), p || (b = [
        U(
          g,
          "click",
          /*closeBonusModal*/
          o[26]
        ),
        U(
          _,
          "click",
          /*debouncedFunction*/
          o[28](
            /*deleteBonus*/
            o[27]
          )
        )
      ], p = !0);
    },
    p(d, f) {
      f[0] & /*$_*/
      1048576 && a !== (a = /*$_*/
      d[20]("forfeitBonus") + "") && Z(r, a), f[0] & /*$_*/
      1048576 && y !== (y = /*$_*/
      d[20]("forfeitBonusCancel") + "") && Z(k, y), f[0] & /*$_*/
      1048576 && h !== (h = /*$_*/
      d[20]("forfeitBonusConfirm") + "") && Z(C, h);
    },
    d(d) {
      d && N(e), p = !1, se(b);
    }
  };
}
function lo(o) {
  let e, n, t, i, a = (
    /*$_*/
    o[20]("titleBonuses") + ""
  ), r, c, u, g, y = (
    /*$_*/
    o[20]("bonusCode") + ""
  ), k, A, _, h, C, p, b = (
    /*$_*/
    o[20]("getBonus") + ""
  ), d, f, X, H, J, V, q, w = (
    /*isMobile*/
    o[21] && oo(o)
  ), B = (
    /*invalidBonusCode*/
    o[11] && ge(o)
  );
  function F(P, T) {
    return (
      /*isLoading*/
      P[9] ? so : no
    );
  }
  let E = F(o), I = E(o), z = (
    /*bonusModal*/
    o[19] && ye(o)
  );
  return {
    c() {
      e = W("div"), n = W("div"), w && w.c(), t = L(), i = W("h2"), r = R(a), c = L(), u = W("div"), g = W("label"), k = 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, r), m(n, c), m(n, u), m(u, g), m(g, k), m(u, A), m(u, _), m(_, h), ce(
        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), V || (q = [
        U(
          h,
          "input",
          /*input_input_handler*/
          o[36]
        ),
        U(
          h,
          "keyup",
          /*validateBonusCode*/
          o[23]
        ),
        U(
          p,
          "click",
          /*claimBonus*/
          o[25]
        )
      ], V = !0);
    },
    p(P, T) {
      /*isMobile*/
      P[21] && w.p(P, T), T[0] & /*$_*/
      1048576 && a !== (a = /*$_*/
      P[20]("titleBonuses") + "") && Z(r, a), T[0] & /*$_*/
      1048576 && y !== (y = /*$_*/
      P[20]("bonusCode") + "") && Z(k, y), T[0] & /*bonusCode*/
      4096 && h.value !== /*bonusCode*/
      P[12] && ce(
        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 = ge(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 = ye(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), V = !1, se(q);
    }
  };
}
let uo = "status=active", K = 6;
function co(o, e, n) {
  let t;
  Ve(o, xe, (l) => n(20, t = l));
  let { endpoint: i = "" } = e, { session: a = "" } = e, { playerid: r = "" } = e, { lang: c = "en" } = e, { currency: u = "" } = e, { clientstyling: g = "" } = e, { clientstylingurl: y = "" } = e, { mbsource: k } = 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 = Xe(H) !== "PC", V = !0, q = !1, w = "", B = 0, F = 0, E = 0, I = 0, z = 0, P = [], T, te = "", oe = !1;
  const Ce = () => {
    fetch(A).then((S) => S.json()).then((S) => {
      Object.keys(S).forEach((O) => {
        pe(O, S[O]);
      });
    }).catch((S) => {
      console.log(S);
    });
  };
  Object.keys(me).forEach((l) => {
    pe(l, me[l]);
  });
  const re = (l) => {
    if (l.data)
      switch (l.data.type) {
        case "DeleteActiveBonus":
          te = l.data.bonuswalletid, n(19, oe = !0);
          break;
      }
  };
  function we(l, S) {
    return (...O) => {
      clearTimeout(T), T = setTimeout(
        () => {
          l.apply(this, O);
        },
        S
      );
    };
  }
  const ae = () => {
    window.postMessage(
      {
        type: "PlayerAccountMenuActive",
        isMobile: J
      },
      window.location.href
    );
  }, Me = () => w ? C ? new RegExp(C).test(w) : !0 : !1, ke = () => {
    n(10, V = !Me()), C && n(11, q = V);
  }, Y = (l) => {
    n(9, d = !0);
    let S = {
      method: "GET",
      headers: { "X-SessionId": a }
    }, O = new URL(`${i}${b === "gm2" ? "/v1/bonus/granted" : `/v1/player/${r}/bonusWallet`}`);
    b === "gm2" ? O.searchParams.append("status", "active") : O.searchParams.append("filter", uo), O.searchParams.append("pagination", `offset=${l},limit=${K}`), fetch(O, S).then((G) => G.json()).then(
      (G) => {
        Array.isArray(G.items) && (b === "gm2" ? G.items.forEach((M) => {
          M.walletId = M.bonusWalletID, M.granted = M.grantedDate, M.expiryTime = M.expiryDate, M.currentAmount = M.remainingAmount, M.originalWageringRequirement = M.initialWagerRequirementAmount, M.fulfilledWR = M.initialWagerRequirementAmount - M.remainingWagerRequirementAmount, M.extension = { grantedPlayerCurrencyAmount: M.amount };
        }) : G.items.forEach((M) => {
          var ue, de;
          const $ = (de = (ue = M == null ? void 0 : M.extension) == null ? void 0 : ue.bonus) == null ? void 0 : de.presentation;
          $ && (M.termsandconditionsurl = $.url, M.termsandconditionsdescription = $.description, M.termsandconditionsasset = $.assets);
        })), n(16, I = Math.ceil(G.total / K)), l - K >= 0 && n(13, B = l - K), l + K < G.total && n(14, F = l + K), n(15, E = (I - 1) * K), n(17, z = l / K), n(18, P = (G == null ? void 0 : G.items) || []), _ && P.forEach((M) => {
          M.fulfilledWR = x(M.fulfilledWR), M.originalWageringRequirement = x(M.originalWageringRequirement), M.currentAmount = x(M.currentAmount), M.extension.grantedPlayerCurrencyAmount = x(M.extension.grantedPlayerCurrencyAmount);
        }), window.scrollTo({ top: 0, behavior: "smooth" });
      },
      (G) => {
        console.error(G);
      }
    ).finally(() => {
      n(9, d = !1);
    });
  }, x = (l) => new Intl.NumberFormat(_, { style: "currency", currency: u }).format(l).replace(/\s/g, ""), We = () => {
    n(9, d = !0);
    let l = new URL(`${i}${b === "gm2" ? "/v1/bonus/claim" : `/v1/player/${r}/claimbonus`}`), S;
    b === "gm2" ? S = {
      method: "PUT",
      headers: {
        "X-SessionId": a,
        accept: "application/json",
        "Content-Type": "application/json"
      },
      body: JSON.stringify({ bonusCode: w, currency: u })
    } : (S = {
      method: "POST",
      headers: {
        "X-SessionId": a,
        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: `${r || "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);
  }, Ae = () => {
    let l = {
      method: "DELETE",
      headers: {
        "X-SessionId": a,
        "Content-Type": "application/json",
        Accept: "application/json"
      }
    }, S = new URL(`${i}${b === "gm2" ? "/v1/bonus/forfeit" : `/v1/player/${r}/bonusWallet`}`);
    S.searchParams.append("bonusWalletID", te), fetch(S, l).then((O) => {
      O.status == 200 && (Y(0), window.postMessage({ type: "ActiveBonusesUpdated" }, window.location.href), le());
    });
  }, Pe = () => {
    $e(c);
  };
  function Ee(l) {
    return we(l, 1e3);
  }
  He(() => (window.addEventListener("message", re, !1), () => {
    window.removeEventListener("message", re);
  }));
  const Fe = () => ae();
  function Se() {
    w = this.value, n(12, w);
  }
  const Ie = () => Y(0), ze = () => Y(B), Te = (l) => Y(l * K), Le = () => Y(F), Re = () => Y(E);
  function Ne(l) {
    Je[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, a = l.session), "playerid" in l && n(31, r = 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, k = 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 && Pe(), o.$$.dirty[0] & /*session, endpoint*/
    1610612736 | o.$$.dirty[1] & /*playerid*/
    1 && a && r && i && Y(0), o.$$.dirty[0] & /*clientstyling, customStylingContainer*/
    258 && g && f && Ye(f, g), o.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
    260 && y && f && Ke(f, y), o.$$.dirty[0] & /*mbsource, customStylingContainer*/
    264 && k && f && Ze(f, `${k}.Style`, X), o.$$.dirty[0] & /*translationurl*/
    16 && A && Ce();
  }, [
    c,
    g,
    y,
    k,
    A,
    _,
    h,
    p,
    f,
    d,
    V,
    q,
    w,
    B,
    F,
    E,
    I,
    z,
    P,
    oe,
    t,
    J,
    ae,
    ke,
    Y,
    We,
    le,
    Ae,
    Ee,
    i,
    a,
    r,
    u,
    C,
    b,
    Fe,
    Se,
    Ie,
    ze,
    Te,
    Le,
    Re,
    Ne
  ];
}
class po extends De {
  constructor(e) {
    super(), Oe(
      this,
      e,
      co,
      lo,
      Ge,
      {
        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
      },
      eo,
      [-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();
  }
}
Qe(po, { endpoint: {}, session: {}, playerid: {}, lang: {}, currency: {}, clientstyling: {}, clientstylingurl: {}, mbsource: {}, translationurl: {}, currencylocale: {}, dateformat: {}, bonuscoderegex: {}, ishiddenwageringbonus: {}, gmversion: {} }, [], [], !0);
export {
  po as default
};
