import { a as Le, $ as Ne, S as Re, i as je, s as De, f as O, b as Oe, n as ne, d as R, w as se, u as Z, K as le, e as j, p as m, x as U, g as M, q as L, v as N, t as v, h as qe, j as Ge, o as Ue, y as Q, k as Ve, L as te, l as ee, m as ve, r as s, B as He, C as Xe, D as Ye, c as Je, A as Ke } from "./PlayerAccountController-D0b5nEtR.js";
function ue(o, e) {
  Le(o, e);
}
function Ze(o) {
  Ne.set(o);
}
const de = {
  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"
  }
};
if (typeof window < "u") {
  let o = function(e) {
    return function(...n) {
      try {
        return e.apply(this, n);
      } catch (i) {
        if (i instanceof DOMException && i.message.includes("has already been used with this registry") || i.message.includes("Cannot define multiple custom elements with the same tag name"))
          return !1;
        throw i;
      }
    };
  };
  customElements.define = o(customElements.define), import("./PlayerBonusCard-BUDT4xyi.js").then(({ default: e }) => {
    !customElements.get("player-bonus-card") && customElements.define("player-bonus-card", e.element);
  });
}
function Qe(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 ce(o, e, n) {
  const i = o.slice();
  return i[52] = e[n], i[54] = n, i;
}
function pe(o, e, n) {
  const i = o.slice();
  return i[55] = e[n], i;
}
function xe(o) {
  let e, n, i, t, r, a, c, d, f, y, w = (
    /*$_*/
    o[20]("titleBonuses") + ""
  ), k, _, h;
  return {
    c() {
      e = M("div"), n = Q("svg"), i = Q("defs"), t = Q("style"), r = N(`.aaa {
                fill: var(--emw--pam-color-primary, var(--emw--color-primary, #22b04e));
              }
            `), a = Q("g"), c = Q("g"), d = Q("path"), f = L(), y = M("h2"), k = N(w), v(d, "class", "aaa"), v(d, "d", "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"), v(d, "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, i), m(i, t), m(t, r), m(n, a), m(a, c), m(c, d), m(e, f), m(e, y), m(y, k), _ || (h = U(
        e,
        "click",
        /*click_handler*/
        o[34]
      ), _ = !0);
    },
    p(C, p) {
      p[0] & /*$_*/
      1048576 && w !== (w = /*$_*/
      C[20]("titleBonuses") + "") && Z(k, w);
    },
    d(C) {
      C && R(e), _ = !1, h();
    }
  };
}
function me(o) {
  let e, n = (
    /*$_*/
    o[20]("invalidBonusCode") + ""
  ), i;
  return {
    c() {
      e = M("p"), i = N(n), v(e, "class", "InvalidBonusCodeMessage");
    },
    m(t, r) {
      j(t, e, r), m(e, i);
    },
    p(t, r) {
      r[0] & /*$_*/
      1048576 && n !== (n = /*$_*/
      t[20]("invalidBonusCode") + "") && Z(i, n);
    },
    d(t) {
      t && R(e);
    }
  };
}
function $e(o) {
  let e, n, i;
  function t(d, f) {
    return (
      /*activeBonusesList*/
      d[18].length === 0 ? no : oo
    );
  }
  let r = t(o), a = r(o), c = (
    /*activeBonusesList*/
    o[18].length !== 0 && be(o)
  );
  return {
    c() {
      e = M("div"), a.c(), n = L(), c && c.c(), i = te(), v(e, "class", "ActiveBonusesGrid " + /*isMobile*/
      (o[21] ? "ActiveBonusesGridMobile" : ""));
    },
    m(d, f) {
      j(d, e, f), a.m(e, null), j(d, n, f), c && c.m(d, f), j(d, i, f);
    },
    p(d, f) {
      r === (r = t(d)) && a ? a.p(d, f) : (a.d(1), a = r(d), a && (a.c(), a.m(e, null))), /*activeBonusesList*/
      d[18].length !== 0 ? c ? c.p(d, f) : (c = be(d), c.c(), c.m(i.parentNode, i)) : c && (c.d(1), c = null);
    },
    d(d) {
      d && (R(e), R(n), R(i)), a.d(), c && c.d(d);
    }
  };
}
function eo(o) {
  let e;
  return {
    c() {
      e = M("div"), v(e, "class", "ModalLoader"), v(e, "part", "ModalLoader");
    },
    m(n, i) {
      j(n, e, i);
    },
    p: ne,
    d(n) {
      n && R(e);
    }
  };
}
function oo(o) {
  let e, n = ee(
    /*activeBonusesList*/
    o[18]
  ), i = [];
  for (let t = 0; t < n.length; t += 1)
    i[t] = fe(pe(o, n, t));
  return {
    c() {
      for (let t = 0; t < i.length; t += 1)
        i[t].c();
      e = te();
    },
    m(t, r) {
      for (let a = 0; a < i.length; a += 1)
        i[a] && i[a].m(t, r);
      j(t, e, r);
    },
    p(t, r) {
      if (r[0] & /*activeBonusesList, lang, dateformat, clientstyling, clientstylingurl, mbsource, translationurl, currencylocale, ishiddenwageringbonus*/
      262399) {
        n = ee(
          /*activeBonusesList*/
          t[18]
        );
        let a;
        for (a = 0; a < n.length; a += 1) {
          const c = pe(t, n, a);
          i[a] ? i[a].p(c, r) : (i[a] = fe(c), i[a].c(), i[a].m(e.parentNode, e));
        }
        for (; a < i.length; a += 1)
          i[a].d(1);
        i.length = n.length;
      }
    },
    d(t) {
      t && R(e), ve(i, t);
    }
  };
}
function no(o) {
  let e, n = (
    /*$_*/
    o[20]("noActiveBonuses") + ""
  ), i;
  return {
    c() {
      e = M("p"), i = N(n);
    },
    m(t, r) {
      j(t, e, r), m(e, i);
    },
    p(t, r) {
      r[0] & /*$_*/
      1048576 && n !== (n = /*$_*/
      t[20]("noActiveBonuses") + "") && Z(i, n);
    },
    d(t) {
      t && R(e);
    }
  };
}
function so(o) {
  let e, n, i, t, r, a, c, d, f, y, w, k, _, h, C, p, g;
  return {
    c() {
      e = M("player-bonus-card"), s(e, "termsandconditionsdescription", n = /*activeBonus*/
      o[55].termsandconditionsdescription), s(e, "termsandconditionsurl", i = /*activeBonus*/
      o[55].termsandconditionsurl), s(e, "termsandconditionsasset", t = /*activeBonus*/
      o[55].termsandconditionsasset), s(e, "endpoint", r = /*activeBonus*/
      o[55].endpoint), s(e, "playerid", a = /*activeBonus*/
      o[55].playerid), s(e, "session", c = /*activeBonus*/
      o[55].session), s(e, "bonuswalletid", d = /*activeBonus*/
      o[55].walletId), s(e, "bonusdate", f = /*activeBonus*/
      o[55].granted), s(e, "bonusexpirationdate", y = /*activeBonus*/
      o[55].expiryTime), s(e, "bonusstatus", w = /*activeBonus*/
      o[55].status), s(e, "bonusname", k = /*activeBonus*/
      o[55].name), s(e, "bonustype", _ = /*activeBonus*/
      o[55].type), s(e, "bonusamount", h = /*activeBonus*/
      o[55].extension.grantedPlayerCurrencyAmount), s(e, "bonuswageringamount", C = `${/*activeBonus*/
      o[55].fulfilledWR} / ${/*activeBonus*/
      o[55].originalWageringRequirement}`), s(e, "bonusremainingamount", p = /*activeBonus*/
      o[55].currentAmount), s(e, "bonuscurrency", g = /*activeBonus*/
      o[55].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(l, B) {
      j(l, e, B);
    },
    p(l, B) {
      B[0] & /*activeBonusesList*/
      262144 && n !== (n = /*activeBonus*/
      l[55].termsandconditionsdescription) && s(e, "termsandconditionsdescription", n), B[0] & /*activeBonusesList*/
      262144 && i !== (i = /*activeBonus*/
      l[55].termsandconditionsurl) && s(e, "termsandconditionsurl", i), B[0] & /*activeBonusesList*/
      262144 && t !== (t = /*activeBonus*/
      l[55].termsandconditionsasset) && s(e, "termsandconditionsasset", t), B[0] & /*activeBonusesList*/
      262144 && r !== (r = /*activeBonus*/
      l[55].endpoint) && s(e, "endpoint", r), B[0] & /*activeBonusesList*/
      262144 && a !== (a = /*activeBonus*/
      l[55].playerid) && s(e, "playerid", a), B[0] & /*activeBonusesList*/
      262144 && c !== (c = /*activeBonus*/
      l[55].session) && s(e, "session", c), B[0] & /*activeBonusesList*/
      262144 && d !== (d = /*activeBonus*/
      l[55].walletId) && s(e, "bonuswalletid", d), B[0] & /*activeBonusesList*/
      262144 && f !== (f = /*activeBonus*/
      l[55].granted) && s(e, "bonusdate", f), B[0] & /*activeBonusesList*/
      262144 && y !== (y = /*activeBonus*/
      l[55].expiryTime) && s(e, "bonusexpirationdate", y), B[0] & /*activeBonusesList*/
      262144 && w !== (w = /*activeBonus*/
      l[55].status) && s(e, "bonusstatus", w), B[0] & /*activeBonusesList*/
      262144 && k !== (k = /*activeBonus*/
      l[55].name) && s(e, "bonusname", k), B[0] & /*activeBonusesList*/
      262144 && _ !== (_ = /*activeBonus*/
      l[55].type) && s(e, "bonustype", _), B[0] & /*activeBonusesList*/
      262144 && h !== (h = /*activeBonus*/
      l[55].extension.grantedPlayerCurrencyAmount) && s(e, "bonusamount", h), B[0] & /*activeBonusesList*/
      262144 && C !== (C = `${/*activeBonus*/
      l[55].fulfilledWR} / ${/*activeBonus*/
      l[55].originalWageringRequirement}`) && s(e, "bonuswageringamount", C), B[0] & /*activeBonusesList*/
      262144 && p !== (p = /*activeBonus*/
      l[55].currentAmount) && s(e, "bonusremainingamount", p), B[0] & /*activeBonusesList*/
      262144 && g !== (g = /*activeBonus*/
      l[55].currency) && s(e, "bonuscurrency", g), B[0] & /*lang*/
      1 && s(
        e,
        "lang",
        /*lang*/
        l[0]
      ), B[0] & /*dateformat*/
      64 && s(
        e,
        "dateformat",
        /*dateformat*/
        l[6]
      ), B[0] & /*clientstyling*/
      2 && s(
        e,
        "clientstyling",
        /*clientstyling*/
        l[1]
      ), B[0] & /*clientstylingurl*/
      4 && s(
        e,
        "clientstylingurl",
        /*clientstylingurl*/
        l[2]
      ), B[0] & /*mbsource*/
      8 && s(
        e,
        "mbsource",
        /*mbsource*/
        l[3]
      ), B[0] & /*translationurl*/
      16 && s(
        e,
        "translationurl",
        /*translationurl*/
        l[4]
      ), B[0] & /*currencylocale*/
      32 && s(
        e,
        "currencylocale",
        /*currencylocale*/
        l[5]
      ), B[0] & /*ishiddenwageringbonus*/
      128 && s(
        e,
        "ishiddenwageringbonus",
        /*ishiddenwageringbonus*/
        l[7]
      );
    },
    d(l) {
      l && R(e);
    }
  };
}
function to(o) {
  let e, n, i, t, r, a, c, d, f, y, w, k, _, h, C;
  return {
    c() {
      e = M("player-bonus-card"), s(e, "termsandconditionsdescription", n = /*activeBonus*/
      o[55].termsandconditionsdescription), s(e, "termsandconditionsurl", i = /*activeBonus*/
      o[55].termsandconditionsurl), s(e, "termsandconditionsasset", t = /*activeBonus*/
      o[55].termsandconditionsasset), s(e, "endpoint", r = /*activeBonus*/
      o[55].endpoint), s(e, "playerid", a = /*activeBonus*/
      o[55].playerid), s(e, "session", c = /*activeBonus*/
      o[55].session), s(e, "bonuswalletid", d = /*activeBonus*/
      o[55].walletId), s(e, "bonusdate", f = /*activeBonus*/
      o[55].granted), s(e, "bonusexpirationdate", y = /*activeBonus*/
      o[55].expiryTime), s(e, "bonusstatus", w = /*activeBonus*/
      o[55].status), s(e, "bonusname", k = /*activeBonus*/
      o[55].name), s(e, "bonustype", _ = /*activeBonus*/
      o[55].type), s(e, "bonuscurrency", h = /*activeBonus*/
      o[55].currency), s(e, "bonusfreespins", C = /*activeBonus*/
      o[55].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, g) {
      j(p, e, g);
    },
    p(p, g) {
      g[0] & /*activeBonusesList*/
      262144 && n !== (n = /*activeBonus*/
      p[55].termsandconditionsdescription) && s(e, "termsandconditionsdescription", n), g[0] & /*activeBonusesList*/
      262144 && i !== (i = /*activeBonus*/
      p[55].termsandconditionsurl) && s(e, "termsandconditionsurl", i), g[0] & /*activeBonusesList*/
      262144 && t !== (t = /*activeBonus*/
      p[55].termsandconditionsasset) && s(e, "termsandconditionsasset", t), g[0] & /*activeBonusesList*/
      262144 && r !== (r = /*activeBonus*/
      p[55].endpoint) && s(e, "endpoint", r), g[0] & /*activeBonusesList*/
      262144 && a !== (a = /*activeBonus*/
      p[55].playerid) && s(e, "playerid", a), g[0] & /*activeBonusesList*/
      262144 && c !== (c = /*activeBonus*/
      p[55].session) && s(e, "session", c), g[0] & /*activeBonusesList*/
      262144 && d !== (d = /*activeBonus*/
      p[55].walletId) && s(e, "bonuswalletid", d), g[0] & /*activeBonusesList*/
      262144 && f !== (f = /*activeBonus*/
      p[55].granted) && s(e, "bonusdate", f), g[0] & /*activeBonusesList*/
      262144 && y !== (y = /*activeBonus*/
      p[55].expiryTime) && s(e, "bonusexpirationdate", y), g[0] & /*activeBonusesList*/
      262144 && w !== (w = /*activeBonus*/
      p[55].status) && s(e, "bonusstatus", w), g[0] & /*activeBonusesList*/
      262144 && k !== (k = /*activeBonus*/
      p[55].name) && s(e, "bonusname", k), g[0] & /*activeBonusesList*/
      262144 && _ !== (_ = /*activeBonus*/
      p[55].type) && s(e, "bonustype", _), g[0] & /*activeBonusesList*/
      262144 && h !== (h = /*activeBonus*/
      p[55].currency) && s(e, "bonuscurrency", h), g[0] & /*activeBonusesList*/
      262144 && C !== (C = /*activeBonus*/
      p[55].freeRoundNumber) && s(e, "bonusfreespins", C), g[0] & /*lang*/
      1 && s(
        e,
        "lang",
        /*lang*/
        p[0]
      ), g[0] & /*dateformat*/
      64 && s(
        e,
        "dateformat",
        /*dateformat*/
        p[6]
      ), g[0] & /*clientstyling*/
      2 && s(
        e,
        "clientstyling",
        /*clientstyling*/
        p[1]
      ), g[0] & /*clientstylingurl*/
      4 && s(
        e,
        "clientstylingurl",
        /*clientstylingurl*/
        p[2]
      ), g[0] & /*mbsource*/
      8 && s(
        e,
        "mbsource",
        /*mbsource*/
        p[3]
      ), g[0] & /*translationurl*/
      16 && s(
        e,
        "translationurl",
        /*translationurl*/
        p[4]
      ), g[0] & /*currencylocale*/
      32 && s(
        e,
        "currencylocale",
        /*currencylocale*/
        p[5]
      ), g[0] & /*ishiddenwageringbonus*/
      128 && s(
        e,
        "ishiddenwageringbonus",
        /*ishiddenwageringbonus*/
        p[7]
      );
    },
    d(p) {
      p && R(e);
    }
  };
}
function fe(o) {
  let e;
  function n(r, a) {
    return (
      /*activeBonus*/
      r[55].type === "freeRound" ? to : so
    );
  }
  let i = n(o), t = i(o);
  return {
    c() {
      t.c(), e = te();
    },
    m(r, a) {
      t.m(r, a), j(r, e, a);
    },
    p(r, a) {
      i === (i = n(r)) && t ? t.p(r, a) : (t.d(1), t = i(r), t && (t.c(), t.m(e.parentNode, e)));
    },
    d(r) {
      r && R(e), t.d(r);
    }
  };
}
function be(o) {
  let e, n, i, t, r, a, c, d, f, y, w, k, _, h, C, p, g, l, B, X, V, H, G, S = ee(Array(
    /*numberOfPages*/
    o[16]
  )), W = [];
  for (let b = 0; b < S.length; b += 1)
    W[b] = ge(ce(o, S, b));
  return {
    c() {
      e = M("div"), n = M("button"), i = N("|<"), a = L(), c = M("button"), d = N("<"), w = L();
      for (let b = 0; b < W.length; b += 1)
        W[b].c();
      k = L(), _ = M("button"), h = N(">"), g = L(), l = M("button"), B = N(">|"), n.disabled = t = /*currentPage*/
      o[17] === 0, v(n, "class", r = "BonusesFirst " + /*currentPage*/
      (o[17] === 0 ? "Inactive" : "")), c.disabled = f = /*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" : "")), l.disabled = X = /*currentPage*/
      o[17] === /*numberOfPages*/
      o[16] - 1, v(l, "class", V = "BonusesLast " + /*currentPage*/
      (o[17] === /*numberOfPages*/
      o[16] - 1 ? "Inactive" : "")), v(e, "class", "BonusesPaginationWrapper " + /*isMobile*/
      (o[21] ? "BonusesPaginationWrapperMobile" : ""));
    },
    m(b, P) {
      j(b, e, P), m(e, n), m(n, i), m(e, a), m(e, c), m(c, d), m(e, w);
      for (let E = 0; E < W.length; E += 1)
        W[E] && W[E].m(e, null);
      m(e, k), m(e, _), m(_, h), m(e, g), m(e, l), m(l, B), H || (G = [
        U(
          n,
          "click",
          /*click_handler_1*/
          o[36]
        ),
        U(
          c,
          "click",
          /*click_handler_2*/
          o[37]
        ),
        U(
          _,
          "click",
          /*click_handler_4*/
          o[39]
        ),
        U(
          l,
          "click",
          /*click_handler_5*/
          o[40]
        )
      ], H = !0);
    },
    p(b, P) {
      if (P[0] & /*currentPage*/
      131072 && t !== (t = /*currentPage*/
      b[17] === 0) && (n.disabled = t), P[0] & /*currentPage*/
      131072 && r !== (r = "BonusesFirst " + /*currentPage*/
      (b[17] === 0 ? "Inactive" : "")) && v(n, "class", r), P[0] & /*currentPage*/
      131072 && f !== (f = /*currentPage*/
      b[17] === 0) && (c.disabled = f), P[0] & /*currentPage*/
      131072 && y !== (y = "BonusesPrev " + /*currentPage*/
      (b[17] === 0 ? "Inactive" : "")) && v(c, "class", y), P[0] & /*currentPage, getActiveBonuses, numberOfPages*/
      16973824) {
        S = ee(Array(
          /*numberOfPages*/
          b[16]
        ));
        let E;
        for (E = 0; E < S.length; E += 1) {
          const I = ce(b, S, E);
          W[E] ? W[E].p(I, P) : (W[E] = ge(I), W[E].c(), W[E].m(e, k));
        }
        for (; E < W.length; E += 1)
          W[E].d(1);
        W.length = S.length;
      }
      P[0] & /*currentPage, numberOfPages*/
      196608 && C !== (C = /*currentPage*/
      b[17] === /*numberOfPages*/
      b[16] - 1) && (_.disabled = C), P[0] & /*currentPage, numberOfPages*/
      196608 && p !== (p = "BonusesNext " + /*currentPage*/
      (b[17] === /*numberOfPages*/
      b[16] - 1 ? "Inactive" : "")) && v(_, "class", p), P[0] & /*currentPage, numberOfPages*/
      196608 && X !== (X = /*currentPage*/
      b[17] === /*numberOfPages*/
      b[16] - 1) && (l.disabled = X), P[0] & /*currentPage, numberOfPages*/
      196608 && V !== (V = "BonusesLast " + /*currentPage*/
      (b[17] === /*numberOfPages*/
      b[16] - 1 ? "Inactive" : "")) && v(l, "class", V);
    },
    d(b) {
      b && R(e), ve(W, b), H = !1, se(G);
    }
  };
}
function ge(o) {
  let e, n = (
    /*i*/
    o[54] + 1 + ""
  ), i, t, r, a, c;
  function d() {
    return (
      /*click_handler_3*/
      o[38](
        /*i*/
        o[54]
      )
    );
  }
  return {
    c() {
      e = M("button"), i = N(n), e.disabled = t = /*i*/
      o[54] === /*currentPage*/
      o[17], v(e, "class", r = "BonusesPage " + /*i*/
      (o[54] === /*currentPage*/
      o[17] ? "BonusPageActive" : ""));
    },
    m(f, y) {
      j(f, e, y), m(e, i), a || (c = U(e, "click", d), a = !0);
    },
    p(f, y) {
      o = f, y[0] & /*currentPage*/
      131072 && t !== (t = /*i*/
      o[54] === /*currentPage*/
      o[17]) && (e.disabled = t), y[0] & /*currentPage*/
      131072 && r !== (r = "BonusesPage " + /*i*/
      (o[54] === /*currentPage*/
      o[17] ? "BonusPageActive" : "")) && v(e, "class", r);
    },
    d(f) {
      f && R(e), a = !1, c();
    }
  };
}
function Be(o) {
  let e, n, i, t, r = (
    /*$_*/
    o[20]("forfeitBonus") + ""
  ), a, c, d, f, y = (
    /*$_*/
    o[20]("forfeitBonusCancel") + ""
  ), w, k, _, h = (
    /*$_*/
    o[20]("forfeitBonusConfirm") + ""
  ), C, p, g;
  return {
    c() {
      e = M("div"), n = M("div"), i = M("div"), t = M("p"), a = N(r), c = L(), d = M("div"), f = M("button"), w = N(y), k = L(), _ = M("button"), C = N(h), v(t, "class", "ModalText"), v(f, "class", "ModalCancel"), v(_, "class", "ModalConfirm"), v(d, "class", "ModalButtons"), v(i, "class", "ModalBody"), v(n, "class", "ModalContent"), v(e, "class", "ModalWrapper " + /*isMobile*/
      (o[21] ? "ModalWrapperMobile" : ""));
    },
    m(l, B) {
      j(l, e, B), m(e, n), m(n, i), m(i, t), m(t, a), m(i, c), m(i, d), m(d, f), m(f, w), m(d, k), m(d, _), m(_, C), p || (g = [
        U(
          f,
          "click",
          /*closeBonusModal*/
          o[26]
        ),
        U(
          _,
          "click",
          /*debouncedFunction*/
          o[28](
            /*deleteBonus*/
            o[27]
          )
        )
      ], p = !0);
    },
    p(l, B) {
      B[0] & /*$_*/
      1048576 && r !== (r = /*$_*/
      l[20]("forfeitBonus") + "") && Z(a, r), B[0] & /*$_*/
      1048576 && y !== (y = /*$_*/
      l[20]("forfeitBonusCancel") + "") && Z(w, y), B[0] & /*$_*/
      1048576 && h !== (h = /*$_*/
      l[20]("forfeitBonusConfirm") + "") && Z(C, h);
    },
    d(l) {
      l && R(e), p = !1, se(g);
    }
  };
}
function io(o) {
  let e, n, i, t, r = (
    /*$_*/
    o[20]("titleBonuses") + ""
  ), a, c, d, f, y = (
    /*$_*/
    o[20]("bonusCode") + ""
  ), w, k, _, h, C, p, g = (
    /*$_*/
    o[20]("getBonus") + ""
  ), l, B, X, V, H, G, S, W = (
    /*isMobile*/
    o[21] && xe(o)
  ), b = (
    /*invalidBonusCode*/
    o[11] && me(o)
  );
  function P(A, T) {
    return (
      /*isLoading*/
      A[9] ? eo : $e
    );
  }
  let E = P(o), I = E(o), F = (
    /*bonusModal*/
    o[19] && Be(o)
  );
  return {
    c() {
      e = M("div"), n = M("div"), W && W.c(), i = L(), t = M("h2"), a = N(r), c = L(), d = M("div"), f = M("label"), w = N(y), k = L(), _ = M("div"), h = M("input"), C = L(), p = M("button"), l = N(g), X = L(), b && b.c(), V = L(), I.c(), H = L(), F && F.c(), v(t, "class", "ActiveBonusesTitle " + /*isMobile*/
      (o[21] ? "ActiveBonusesTitleNone" : "")), v(f, "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 = B = /*invalidBonusField*/
      o[10] || /*isLoading*/
      o[9], v(_, "class", "BonusCodeWrapper " + /*isMobile*/
      (o[21] ? "BonusCodeWrapperMobile" : "")), v(d, "class", "BonusCodeContainer " + /*isMobile*/
      (o[21] ? "BonusCodeContainerMobile" : "")), v(n, "class", "ActiveBonusesWrapper " + /*isMobile*/
      (o[21] ? "ActiveBonusesWrapperMobile" : ""));
    },
    m(A, T) {
      j(A, e, T), m(e, n), W && W.m(n, null), m(n, i), m(n, t), m(t, a), m(n, c), m(n, d), m(d, f), m(f, w), m(d, k), m(d, _), m(_, h), le(
        h,
        /*bonusCode*/
        o[12]
      ), m(_, C), m(_, p), m(p, l), m(d, X), b && b.m(d, null), m(n, V), I.m(n, null), m(e, H), F && F.m(e, null), o[41](e), G || (S = [
        U(
          h,
          "input",
          /*input_input_handler*/
          o[35]
        ),
        U(
          h,
          "keyup",
          /*validateBonusCode*/
          o[23]
        ),
        U(
          p,
          "click",
          /*claimBonus*/
          o[25]
        )
      ], G = !0);
    },
    p(A, T) {
      /*isMobile*/
      A[21] && W.p(A, T), T[0] & /*$_*/
      1048576 && r !== (r = /*$_*/
      A[20]("titleBonuses") + "") && Z(a, r), T[0] & /*$_*/
      1048576 && y !== (y = /*$_*/
      A[20]("bonusCode") + "") && Z(w, y), T[0] & /*bonusCode*/
      4096 && h.value !== /*bonusCode*/
      A[12] && le(
        h,
        /*bonusCode*/
        A[12]
      ), T[0] & /*$_*/
      1048576 && g !== (g = /*$_*/
      A[20]("getBonus") + "") && Z(l, g), T[0] & /*invalidBonusField, isLoading*/
      1536 && B !== (B = /*invalidBonusField*/
      A[10] || /*isLoading*/
      A[9]) && (p.disabled = B), /*invalidBonusCode*/
      A[11] ? b ? b.p(A, T) : (b = me(A), b.c(), b.m(d, null)) : b && (b.d(1), b = null), E === (E = P(A)) && I ? I.p(A, T) : (I.d(1), I = E(A), I && (I.c(), I.m(n, null))), /*bonusModal*/
      A[19] ? F ? F.p(A, T) : (F = Be(A), F.c(), F.m(e, null)) : F && (F.d(1), F = null);
    },
    i: ne,
    o: ne,
    d(A) {
      A && R(e), W && W.d(), b && b.d(), I.d(), F && F.d(), o[41](null), G = !1, se(S);
    }
  };
}
let ao = "status=active", K = 6;
function ro(o, e, n) {
  let i;
  qe(o, Ke, (u) => n(20, i = u));
  let { endpoint: t = "" } = e, { session: r = "" } = e, { playerid: a = "" } = e, { lang: c = "en" } = e, { currency: d = "" } = e, { clientstyling: f = "" } = e, { clientstylingurl: y = "" } = e, { mbsource: w } = e, { translationurl: k = "" } = e, { currencylocale: _ = "" } = e, { dateformat: h = "" } = e, { bonuscoderegex: C = "" } = e, { ishiddenwageringbonus: p = "false" } = e, g = !1, l, B, X = window.navigator.userAgent, V = Ge(X) !== "PC", H = !0, G = !1, S = "", W = 0, b = 0, P = 0, E = 0, I = 0, F = [], A, T = "", oe = !1;
  const _e = () => {
    fetch(k).then((z) => z.json()).then((z) => {
      Object.keys(z).forEach((q) => {
        ue(q, z[q]);
      });
    }).catch((z) => {
      console.log(z);
    });
  };
  Object.keys(de).forEach((u) => {
    ue(u, de[u]);
  });
  const ie = (u) => {
    if (u.data)
      switch (u.data.type) {
        case "DeleteActiveBonus":
          T = u.data.bonuswalletid, n(19, oe = !0);
          break;
      }
  };
  function ye(u, z) {
    return (...q) => {
      clearTimeout(A), A = setTimeout(
        () => {
          u.apply(this, q);
        },
        z
      );
    };
  }
  const ae = () => {
    window.postMessage(
      {
        type: "PlayerAccountMenuActive",
        isMobile: V
      },
      window.location.href
    );
  }, he = () => S ? C ? new RegExp(C).test(S) : !0 : !1, Ce = () => {
    n(10, H = !he()), C && n(11, G = H);
  }, Y = (u) => {
    n(9, g = !0);
    let z = {
      method: "GET",
      headers: { "X-SessionId": r }
    }, q = new URL(`${t}/v1/player/${a}/bonusWallet`);
    q.searchParams.append("filter", ao), q.searchParams.append("pagination", `offset=${u},limit=${K}`), fetch(q, z).then((J) => J.json()).then(
      (J) => {
        Array.isArray(J.items) && J.items.forEach((D) => {
          const $ = D?.extension?.bonus?.presentation;
          $ && (D.termsandconditionsurl = $.url, D.termsandconditionsdescription = $.description, D.termsandconditionsasset = $.assets);
        }), n(16, E = Math.ceil(J.total / K)), u - K >= 0 && n(13, W = u - K), u + K < J.total && n(14, b = u + K), n(15, P = (E - 1) * K), n(17, I = u / K), n(18, F = J?.items || []), _ && F.forEach((D) => {
          D.fulfilledWR = x(D.fulfilledWR), D.originalWageringRequirement = x(D.originalWageringRequirement), D.currentAmount = x(D.currentAmount), D.extension.grantedPlayerCurrencyAmount = x(D.extension.grantedPlayerCurrencyAmount);
        }), window.scrollTo({ top: 0, behavior: "smooth" });
      },
      (J) => {
        console.error(J);
      }
    ).finally(() => {
      n(9, g = !1);
    });
  }, x = (u) => new Intl.NumberFormat(_, { style: "currency", currency: d }).format(u).replace(/\s/g, ""), we = () => {
    n(9, g = !0);
    let u = new URL(`${t}/v1/player/${a}/claimbonus`), z = {
      method: "POST",
      headers: {
        "X-SessionId": r,
        accept: "application/json"
      }
    };
    u.searchParams.append("currency", d), u.searchParams.append("bonusCode", S), fetch(u.href, z).then((q) => {
      q.status == 200 ? (n(11, G = !1), Y(0), window.postMessage({ type: "ActiveBonusesUpdated" }, window.location.href), window.postMessage(
        {
          type: "WidgetNotification",
          data: {
            type: "success",
            message: i("bonusClaimSuccessMessage")
          }
        },
        window.location.href
      ), typeof gtag == "function" && gtag("event", "ClaimBonus", {
        context: "PlayerActiveBonuses",
        userId: `${a || "Not logged in"}`,
        bonusCode: `${S}`
      })) : (n(11, G = !0), window.postMessage(
        {
          type: "WidgetNotification",
          data: {
            type: "error",
            message: i("bonusClaimErrorMessage")
          }
        },
        window.location.href
      ));
    }).finally(() => {
      n(9, g = !1);
    });
  }, re = () => {
    window.postMessage({ type: "EnableScroll" }, window.location.href), n(19, oe = !1);
  }, Me = () => {
    let u = {
      method: "DELETE",
      headers: {
        "X-SessionId": r,
        "Content-Type": "application/json",
        Accept: "application/json"
      }
    }, z = new URL(`${t}/v1/player/${a}/bonusWallet`);
    z.searchParams.append("bonusWalletID", T), fetch(z, u).then((q) => {
      q.status == 200 && (Y(0), window.postMessage({ type: "ActiveBonusesUpdated" }, window.location.href), re());
    });
  }, ke = () => {
    Ze(c);
  };
  function We(u) {
    return ye(u, 1e3);
  }
  Ue(() => (window.addEventListener("message", ie, !1), () => {
    window.removeEventListener("message", ie);
  }));
  const Ae = () => ae();
  function Ee() {
    S = this.value, n(12, S);
  }
  const Pe = () => Y(0), Fe = () => Y(W), Se = (u) => Y(u * K), Ie = () => Y(b), ze = () => Y(P);
  function Te(u) {
    Ve[u ? "unshift" : "push"](() => {
      l = u, n(8, l);
    });
  }
  return o.$$set = (u) => {
    "endpoint" in u && n(29, t = u.endpoint), "session" in u && n(30, r = u.session), "playerid" in u && n(31, a = u.playerid), "lang" in u && n(0, c = u.lang), "currency" in u && n(32, d = u.currency), "clientstyling" in u && n(1, f = u.clientstyling), "clientstylingurl" in u && n(2, y = u.clientstylingurl), "mbsource" in u && n(3, w = u.mbsource), "translationurl" in u && n(4, k = u.translationurl), "currencylocale" in u && n(5, _ = u.currencylocale), "dateformat" in u && n(6, h = u.dateformat), "bonuscoderegex" in u && n(33, C = u.bonuscoderegex), "ishiddenwageringbonus" in u && n(7, p = u.ishiddenwageringbonus);
  }, o.$$.update = () => {
    o.$$.dirty[0] & /*lang*/
    1 && c && ke(), o.$$.dirty[0] & /*session, endpoint*/
    1610612736 | o.$$.dirty[1] & /*playerid*/
    1 && r && a && t && Y(0), o.$$.dirty[0] & /*clientstyling, customStylingContainer*/
    258 && f && l && He(l, f), o.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
    260 && y && l && Xe(l, y), o.$$.dirty[0] & /*mbsource, customStylingContainer*/
    264 && w && l && Ye(l, `${w}.Style`, B), o.$$.dirty[0] & /*translationurl*/
    16 && k && _e();
  }, [
    c,
    f,
    y,
    w,
    k,
    _,
    h,
    p,
    l,
    g,
    H,
    G,
    S,
    W,
    b,
    P,
    E,
    I,
    F,
    oe,
    i,
    V,
    ae,
    Ce,
    Y,
    we,
    re,
    Me,
    We,
    t,
    r,
    a,
    d,
    C,
    Ae,
    Ee,
    Pe,
    Fe,
    Se,
    Ie,
    ze,
    Te
  ];
}
class lo extends Re {
  constructor(e) {
    super(), je(
      this,
      e,
      ro,
      io,
      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
      },
      Qe,
      [-1, -1]
    );
  }
  get endpoint() {
    return this.$$.ctx[29];
  }
  set endpoint(e) {
    this.$$set({ endpoint: e }), O();
  }
  get session() {
    return this.$$.ctx[30];
  }
  set session(e) {
    this.$$set({ session: e }), O();
  }
  get playerid() {
    return this.$$.ctx[31];
  }
  set playerid(e) {
    this.$$set({ playerid: e }), O();
  }
  get lang() {
    return this.$$.ctx[0];
  }
  set lang(e) {
    this.$$set({ lang: e }), O();
  }
  get currency() {
    return this.$$.ctx[32];
  }
  set currency(e) {
    this.$$set({ currency: e }), O();
  }
  get clientstyling() {
    return this.$$.ctx[1];
  }
  set clientstyling(e) {
    this.$$set({ clientstyling: e }), O();
  }
  get clientstylingurl() {
    return this.$$.ctx[2];
  }
  set clientstylingurl(e) {
    this.$$set({ clientstylingurl: e }), O();
  }
  get mbsource() {
    return this.$$.ctx[3];
  }
  set mbsource(e) {
    this.$$set({ mbsource: e }), O();
  }
  get translationurl() {
    return this.$$.ctx[4];
  }
  set translationurl(e) {
    this.$$set({ translationurl: e }), O();
  }
  get currencylocale() {
    return this.$$.ctx[5];
  }
  set currencylocale(e) {
    this.$$set({ currencylocale: e }), O();
  }
  get dateformat() {
    return this.$$.ctx[6];
  }
  set dateformat(e) {
    this.$$set({ dateformat: e }), O();
  }
  get bonuscoderegex() {
    return this.$$.ctx[33];
  }
  set bonuscoderegex(e) {
    this.$$set({ bonuscoderegex: e }), O();
  }
  get ishiddenwageringbonus() {
    return this.$$.ctx[7];
  }
  set ishiddenwageringbonus(e) {
    this.$$set({ ishiddenwageringbonus: e }), O();
  }
}
Je(lo, { endpoint: {}, session: {}, playerid: {}, lang: {}, currency: {}, clientstyling: {}, clientstylingurl: {}, mbsource: {}, translationurl: {}, currencylocale: {}, dateformat: {}, bonuscoderegex: {}, ishiddenwageringbonus: {} }, [], [], !0);
export {
  lo as default
};
