var U = (i, e, t) => new Promise((n, a) => {
  var l = (u) => {
    try {
      g(t.next(u));
    } catch (v) {
      a(v);
    }
  }, c = (u) => {
    try {
      g(t.throw(u));
    } catch (v) {
      a(v);
    }
  }, g = (u) => u.done ? n(u.value) : Promise.resolve(u.value).then(l, c);
  g((t = t.apply(i, e)).next());
});
import { c as ee, b as te, S as ie, D as ae, R as ne, v as P, f as oe, K as L, r as C, F as B, s as f, g as p, k as re, y as se, N as le, h as ce, u as V, q as $, e as s, a1 as j, Y as b, Z as E, J, a4 as z, Q as ue, a3 as O, E as pe, _ as Y, V as de, W as me, X as ve, n as ye, a as ge } from "./PlayerAccountControllerNd-D1zDXBBo.js";
import "../stencil/ui-skeleton-Dd7tqzYw.js";
function G(i, e) {
  ee(i, e);
}
function fe(i) {
  te.set(i);
}
const X = {
  en: {
    titleAccountReview: "Account Review Frequency",
    accountReviewText: "To promote responsible play, we periodically prompt customers to review their account activity, including Betting History, Payment History, and Gaming History. These reviews help ensure that your activity remains aligned with your current preferences and circumstances. From this page, you can adjust how often you receive these prompts, giving you more control over your experience.",
    setFrequency: "Set frequency",
    successMessage: "Your preference was saved",
    errorMessage: "Failed to set account review frequency",
    months: "months",
    daily: "Daily",
    weekly: "Weekly",
    monthly: "Monthly"
  },
  "zh-hk": {
    titleAccountReview: "帳戶檢視提示頻率",
    accountReviewText: "為了推廣負責任博彩，我們會定期提示客戶檢視其帳戶活動，包括投注紀錄、付款紀錄及遊戲紀錄。這些檢視有助確保你的活動與當前偏好及情況保持一致。你可在此頁面調整接收這些提示的頻率，讓你更好掌控體驗。",
    setFrequency: "設置頻率",
    successMessage: "你的偏好已儲存。",
    errorMessage: "Failed to set account review frequency",
    months: "個月",
    daily: "每日",
    weekly: "每週",
    monthly: "每月"
  },
  fr: {
    titleAccountReview: "Fréquence des rappels d’examen du compte",
    accountReviewText: "Afin de promouvoir le jeu responsable, nous invitons périodiquement les clients à examiner l’activité de leur compte, y compris l’historique des paris, des paiements et du jeu. Ces examens permettent de s’assurer que votre activité reste en adéquation avec vos préférences et votre situation actuelles. Depuis cette page, vous pouvez ajuster la fréquence de ces rappels afin de mieux contrôler votre expérience.",
    setFrequency: "Régler la fréquence",
    successMessage: "Votre préférence a été enregistrée.",
    errorMessage: "Failed to set account review frequency",
    months: "mois",
    daily: "Quotidien",
    weekly: "Hebdomadaire",
    monthly: "Mensuel"
  },
  ro: {
    titleAccountReview: "Frecvența notificărilor pentru revizuirea contului",
    accountReviewText: "Pentru a promova jocul responsabil, solicităm periodic clienților să își revizuiască activitatea din cont, inclusiv istoricul de pariere, istoricul plăților și istoricul de joc. Aceste revizuiri ajută la menținerea activității în linie cu preferințele și circumstanțele actuale. Din această pagină poți ajusta cât de des primești aceste notificări, pentru mai mult control asupra experienței tale.",
    setFrequency: "Setează frecvența",
    successMessage: "Preferința a fost salvată.",
    errorMessage: "Failed to set account review frequency",
    months: "luni",
    daily: "Zilnic",
    weekly: "Săptămânal",
    monthly: "Lunar"
  },
  es: {
    titleAccountReview: "Frecuencia del recordatorio de revisión de cuenta",
    accountReviewText: "Para promover el juego responsable, periódicamente invitamos a los clientes a revisar la actividad de su cuenta, incluido el Historial de Apuestas, el Historial de Pagos y el Historial de Juego. Estas revisiones ayudan a asegurar que tu actividad siga alineada con tus preferencias y circunstancias actuales. Desde esta página puedes ajustar la frecuencia con la que recibes estos recordatorios, dándote mayor control sobre tu experiencia.",
    setFrequency: "Establecer frecuencia",
    successMessage: "Tu preferencia se guardó.",
    errorMessage: "Failed to set account review frequency",
    months: "meses",
    daily: "Diario",
    weekly: "Semanal",
    monthly: "Mensual"
  },
  pt: {
    titleAccountReview: "Frequência do lembrete de revisão da conta",
    accountReviewText: "Para promover o jogo responsável, pedimos periodicamente aos clientes que revejam a atividade da sua conta, incluindo o Histórico de Apostas, o Histórico de Pagamentos e o Histórico de Jogo. Estas revisões ajudam a garantir que a sua atividade se mantém alinhada com as suas preferências e circunstâncias atuais. Nesta página pode ajustar a frequência com que recebe estes lembretes, dando-lhe mais controlo sobre a sua experiência.",
    setFrequency: "Definir frequência",
    successMessage: "A sua preferência foi guardada.",
    errorMessage: "Failed to set account review frequency",
    months: "meses",
    daily: "Diário",
    weekly: "Semanal",
    monthly: "Mensal"
  },
  hr: {
    titleAccountReview: "Učestalost podsjetnika za pregled računa",
    accountReviewText: "Kako bismo potaknuli odgovorno igranje, povremeno upućujemo korisnicima podsjetnik da pregledaju aktivnost na računu, uključujući Povijest klađenja, Povijest plaćanja i Povijest igranja. Ovi pregledi pomažu osigurati da vaše aktivnosti ostanu usklađene s vašim trenutačnim preferencijama i okolnostima. Na ovoj stranici možete prilagoditi koliko često primate ove podsjetnike, čime imate veću kontrolu nad svojim iskustvom.",
    setFrequency: "Postavi učestalost",
    successMessage: "Vaša je postavka spremljena.",
    errorMessage: "Failed to set account review frequency",
    months: "mjeseci",
    daily: "Dnevno",
    weekly: "Tjedno",
    monthly: "Mjesečno"
  },
  "pt-br": {
    titleAccountReview: "Frequência do lembrete de revisão de conta",
    accountReviewText: "Para promover o jogo responsável, periodicamente lembramos os clientes de revisar a atividade da conta, incluindo Histórico de Apostas, Histórico de Pagamentos e Histórico de Jogo. Essas revisões ajudam a garantir que sua atividade permaneça alinhada às suas preferências e circunstâncias atuais. Nesta página você pode ajustar a frequência com que recebe esses lembretes, dando mais controle à sua experiência.",
    setFrequency: "Definir frequência",
    successMessage: "Sua preferência foi salva.",
    errorMessage: "Failed to set account review frequency",
    months: "meses",
    daily: "Diário",
    weekly: "Semanal",
    monthly: "Mensal"
  },
  "es-mx": {
    titleAccountReview: "Frecuencia del recordatorio de revisión de cuenta",
    accountReviewText: "Para promover el juego responsable, periódicamente invitamos a los clientes a revisar la actividad de su cuenta, incluido el Historial de Apuestas, el Historial de Pagos y el Historial de Juego. Estas revisiones ayudan a garantizar que tu actividad siga alineada con tus preferencias y circunstancias actuales. Desde esta página puedes ajustar la frecuencia con la que recibes estos recordatorios para tener mayor control de tu experiencia.",
    setFrequency: "Fijar frecuencia",
    successMessage: "Tu preferencia se guardó.",
    errorMessage: "Failed to set account review frequency",
    months: "meses",
    daily: "Diario",
    weekly: "Semanal",
    monthly: "Mensual"
  },
  "en-us": {
    titleAccountReview: "Account Review Frequency",
    accountReviewText: "To promote responsible play, we periodically prompt customers to review their account activity, including Betting History, Payment History, and Gaming History. These reviews help ensure that your activity remains aligned with your current preferences and circumstances. From this page, you can adjust how often you receive these prompts, giving you more control over your experience.",
    setFrequency: "Set frequency",
    successMessage: "Your preference was saved.",
    errorMessage: "Failed to set account review frequency",
    months: "months",
    daily: "Daily",
    weekly: "Weekly",
    monthly: "Monthly"
  }
};
function he(i) {
  oe(i, "svelte-1u91vzw", '.SkeletonContainer{width:100%;display:flex;flex-direction:column;gap:17px;animation:fadeIn 0.3s ease-in 1}.SkeletonContainer .SkeletonMenuButton{display:flex;gap:20px;width:100%}.SkeletonContainer .SkeletonMenuButton.Mobile{margin-top:10px}.SkeletonContainer .SkeletonTextContainer{width:100%;min-height:140px}.SkeletonContainer .SkeletonOptionContainer{display:flex;flex-direction:column;width:100%;min-height:200px}.SkeletonContainer .SkeletonOptionContainer .SkeletonOption{display:flex;flex-direction:row;align-items:center;gap:10px;width:100%;margin:0 0 13px}.SkeletonContainer .SkeletonOptionContainer .SkeletonOption .SkeletonOptionText{width:20%;margin-top:10px}.SkeletonContainer .SkeletonOptionContainer .Button{margin-top:5px}.customRadio{margin-top:15px}.customRadio div{margin:0 0 20px}.customRadio input[type=radio]{position:absolute;left:-9999px}.customRadio input[type=radio]+label{position:relative;padding:3px 0 0 30px;cursor:pointer}.customRadio input[type=radio]+label:before{content:"";background:var(--emw--color-white, #fff);border:1px solid var(--emw--color-gray-300, #58586b);height:16px;width:16px;border-radius:50%;position:absolute;top:0;left:0}.customRadio input[type=radio]+label:after{content:"";background:var(--emw--pam-color-primary, var(--emw--color-primary, #22b04e));width:14px;height:14px;border-radius:50%;position:absolute;top:2px;left:2px;opacity:0;transform:scale(2);transition:transform 0.3s linear, opacity 0.3s linear}.customRadio input[type=radio]:checked+label:after{opacity:1;transform:scale(1)}.PlayerAccountReviewWrapper{position:relative;color:var(--emw--pam-contrast, var(--emw--color-contrast, #07072a));padding:50px;max-width:760px}.PlayerAccountReviewWrapper.PlayerAccountReviewWrapperMobile{padding:20px 15px;max-width:unset}.AccountReviewTitle{font-size:26px;color:var(--emw--pam-color-primary, var(--emw--color-primary, #22b04e));font-weight:400}.AccountReviewTitleMobile{font-size:16px;color:var(--emw--pam-color-primary, var(--emw--color-primary, #22b04e))}.AccountReviewTitleNone{display:none}.AccountReviewDescription{color:var(--emw--pam-typography, var(--emw--color-contrast, #07072a));line-height:24px}.AccountReviewDescription p{min-height:140px}.AccountReviewDescription.AccountReviewDescriptionMobile{font-size:12px;line-height:18px}.BottomButtonsArea{display:grid;grid-column-gap:30px;grid-template-rows:auto;grid-template-columns:1fr 1fr;margin-top:20px}.BottomButtonsArea.BottomButtonsAreaMobile{width:100%;grid-template-columns:1fr}.PlayerRealityCheckButton{cursor:pointer;border-radius:5px;width:100%;height:50px;display:flex;align-items:center;justify-content:center;font-size:15px;color:var(--emw--button-typography, var(--emw--color-white, #fff));text-transform:uppercase;text-align:center;transition-duration:0.3s;box-sizing:border-box;padding:10px}.PlayerRealityCheckButton.ButtonInactive{background:transparent;border:1px solid var(--emw--color-gray-300, #58586b);cursor:not-allowed;opacity:0.6;color:var(--emw--color-gray-300, #58586b)}.PlayerRealityCheckButton{background:transparent;border:1px solid var(--emw--color-gray-300, #58586b)}.PlayerRealityCheckButton{background:var(--emw--pam-color-primary, var(--emw--color-primary, #22b04e));border:1px solid var(--emw--pam-color-primary, var(--emw--color-primary, #22b04e))}.containerTimeout{animation:fadeIn 0.3s ease-in 1}.MenuReturnButton{color:var(--emw--pam-color-primary, var(--emw--color-primary, #22b04e));display:inline-flex;align-items:center;column-gap:20px}.MenuReturnButton svg{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22b04e))}@keyframes fadeIn{0%{opacity:0.01}1%{opacity:0}50%{opacity:0}100%{opacity:1}}');
}
function Z(i, e, t) {
  const n = i.slice();
  return n[28] = e[t].value, n[29] = e[t].text, n;
}
function we(i, e, t) {
  const n = i.slice();
  return n[25] = e[t], n;
}
function be(i) {
  let e, t, n, a = (
    /*$_*/
    i[5]("titleAccountReview") + ""
  ), l, c, g, u, v = (
    /*$_*/
    i[5]("accountReviewText") + ""
  ), w, x, d, A, y, o, h = (
    /*$_*/
    i[5]("setFrequency") + ""
  ), M, T, N, I, W, q = (
    /*isMobile*/
    i[6] && _e(i)
  ), F = V(
    /*options*/
    i[4]
  ), R = [];
  for (let m = 0; m < F.length; m += 1)
    R[m] = K(Z(i, F, m));
  return {
    c() {
      e = f("div"), q && q.c(), t = j(), n = f("h2"), l = z(a), c = j(), g = f("div"), u = f("p"), w = z(v), x = j(), d = f("form");
      for (let m = 0; m < R.length; m += 1)
        R[m].c();
      A = j(), y = f("div"), o = f("button"), M = z(h), p(n, "class", "AccountReviewTitle " + /*isMobile*/
      (i[6] ? "AccountReviewTitleNone" : "")), p(g, "class", "AccountReviewDescription " + /*isMobile*/
      (i[6] ? "AccountReviewDescriptionMobile" : "")), p(o, "class", T = "PlayerRealityCheckButton " + (!/*selectedInterval*/
      i[2] || /*currentInterval*/
      i[3] === /*selectedInterval*/
      i[2] ? "ButtonInactive" : "")), o.disabled = N = !/*selectedInterval*/
      i[2] || /*currentInterval*/
      i[3] === /*selectedInterval*/
      i[2], p(y, "class", "BottomButtonsArea " + /*isMobile*/
      (i[6] ? "BottomButtonsAreaMobile" : "")), p(d, "class", "customRadio"), p(e, "class", "containerTimeout");
    },
    m(m, S) {
      B(m, e, S), q && q.m(e, null), s(e, t), s(e, n), s(n, l), s(e, c), s(e, g), s(g, u), s(u, w), s(e, x), s(e, d);
      for (let k = 0; k < R.length; k += 1)
        R[k] && R[k].m(d, null);
      s(d, A), s(d, y), s(y, o), s(o, M), I || (W = J(
        o,
        "click",
        /*submit*/
        i[7]
      ), I = !0);
    },
    p(m, S) {
      if (
        /*isMobile*/
        m[6] && q.p(m, S), S[0] & /*$_*/
        32 && a !== (a = /*$_*/
        m[5]("titleAccountReview") + "") && E(l, a), S[0] & /*$_*/
        32 && v !== (v = /*$_*/
        m[5]("accountReviewText") + "") && E(w, v), S[0] & /*options, selectedInterval*/
        20
      ) {
        F = V(
          /*options*/
          m[4]
        );
        let k;
        for (k = 0; k < F.length; k += 1) {
          const r = Z(m, F, k);
          R[k] ? R[k].p(r, S) : (R[k] = K(r), R[k].c(), R[k].m(d, A));
        }
        for (; k < R.length; k += 1)
          R[k].d(1);
        R.length = F.length;
      }
      S[0] & /*$_*/
      32 && h !== (h = /*$_*/
      m[5]("setFrequency") + "") && E(M, h), S[0] & /*selectedInterval, currentInterval*/
      12 && T !== (T = "PlayerRealityCheckButton " + (!/*selectedInterval*/
      m[2] || /*currentInterval*/
      m[3] === /*selectedInterval*/
      m[2] ? "ButtonInactive" : "")) && p(o, "class", T), S[0] & /*selectedInterval, currentInterval*/
      12 && N !== (N = !/*selectedInterval*/
      m[2] || /*currentInterval*/
      m[3] === /*selectedInterval*/
      m[2]) && (o.disabled = N);
    },
    d(m) {
      m && C(e), q && q.d(), $(R, m), I = !1, W();
    }
  };
}
function ke(i) {
  let e, t, n, a, l, c, g, u, v;
  function w(o, h) {
    return (
      /*isMobile*/
      o[6] ? Re : xe
    );
  }
  let d = w(i)(i), A = V({ length: 6 }), y = [];
  for (let o = 0; o < A.length; o += 1)
    y[o] = Ae(we(i, A, o));
  return {
    c() {
      e = f("div"), d.c(), t = j(), n = f("div"), a = f("ui-skeleton"), l = j(), c = f("div");
      for (let o = 0; o < y.length; o += 1)
        y[o].c();
      g = j(), u = f("div"), v = f("ui-skeleton"), b(a, "structure", "text"), b(a, "height", "15px"), b(a, "width", "100%"), b(a, "margin-bottom", "7px"), b(
        a,
        "rows",
        /*isMobile*/
        i[6] ? "5" : "3"
      ), p(n, "class", "SkeletonTextContainer"), b(v, "structure", "rectangle"), b(v, "height", "50px"), b(v, "margin-bottom", "0"), b(v, "borderRadius", "5px"), b(
        v,
        "width",
        /*isMobile*/
        i[6] ? "100%" : "350px"
      ), p(u, "class", "Button"), p(c, "class", "SkeletonOptionContainer"), p(e, "class", "SkeletonContainer");
    },
    m(o, h) {
      B(o, e, h), d.m(e, null), s(e, t), s(e, n), s(n, a), s(e, l), s(e, c);
      for (let M = 0; M < y.length; M += 1)
        y[M] && y[M].m(c, null);
      s(c, g), s(c, u), s(u, v);
    },
    p(o, h) {
      d.p(o, h);
    },
    d(o) {
      o && C(e), d.d(), $(y, o);
    }
  };
}
function _e(i) {
  let e, t, n, a, l, c, g, u, v, w, x = (
    /*$_*/
    i[5]("titleAccountReview") + ""
  ), d, A, y;
  return {
    c() {
      e = f("div"), t = O("svg"), n = O("defs"), a = O("style"), l = z(`.aaa {
                  fill: var(--emw--pam-color-primary, var(--emw--color-primary, #22b04e));
                }
              `), c = O("g"), g = O("g"), u = O("path"), v = j(), w = f("h2"), d = z(x), p(u, "class", "aaa"), p(u, "d", "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"), p(u, "transform", "translate(15 15) rotate(180)"), p(g, "transform", "translate(20 158)"), p(c, "transform", "translate(-20 -158)"), p(t, "xmlns", "http://www.w3.org/2000/svg"), p(t, "width", "15"), p(t, "height", "15"), p(t, "viewBox", "0 0 15 15"), p(w, "class", "AccountReviewTitleMobile"), p(e, "class", "MenuReturnButton");
    },
    m(o, h) {
      B(o, e, h), s(e, t), s(t, n), s(n, a), s(a, l), s(t, c), s(c, g), s(g, u), s(e, v), s(e, w), s(w, d), A || (y = [
        J(
          e,
          "click",
          /*toggleScreen*/
          i[8]
        ),
        J(e, "keydown", null)
      ], A = !0);
    },
    p(o, h) {
      h[0] & /*$_*/
      32 && x !== (x = /*$_*/
      o[5]("titleAccountReview") + "") && E(d, x);
    },
    d(o) {
      o && C(e), A = !1, ue(y);
    }
  };
}
function K(i) {
  let e, t, n, a, l = !1, c, g, u = (
    /*text*/
    i[29] + ""
  ), v, w, x, d, A;
  return x = pe(
    /*$$binding_groups*/
    i[18][0]
  ), {
    c() {
      e = f("div"), t = f("input"), c = j(), g = f("label"), v = z(u), p(t, "type", "radio"), p(t, "id", n = "interval-" + /*value*/
      i[28]), t.__value = a = /*value*/
      i[28], Y(t, t.__value), p(g, "for", w = "interval-" + /*value*/
      i[28]), x.p(t);
    },
    m(y, o) {
      B(y, e, o), s(e, t), t.checked = t.__value === /*selectedInterval*/
      i[2], s(e, c), s(e, g), s(g, v), d || (A = J(
        t,
        "change",
        /*input_change_handler*/
        i[17]
      ), d = !0);
    },
    p(y, o) {
      o[0] & /*options*/
      16 && n !== (n = "interval-" + /*value*/
      y[28]) && p(t, "id", n), o[0] & /*options*/
      16 && a !== (a = /*value*/
      y[28]) && (t.__value = a, Y(t, t.__value), l = !0), (l || o[0] & /*selectedInterval, options*/
      20) && (t.checked = t.__value === /*selectedInterval*/
      y[2]), o[0] & /*options*/
      16 && u !== (u = /*text*/
      y[29] + "") && E(v, u), o[0] & /*options*/
      16 && w !== (w = "interval-" + /*value*/
      y[28]) && p(g, "for", w);
    },
    d(y) {
      y && C(e), x.r(), d = !1, A();
    }
  };
}
function xe(i) {
  let e;
  return {
    c() {
      e = f("div"), e.innerHTML = '<ui-skeleton structure="title" width="280px" margin-top="20px"></ui-skeleton>', p(e, "class", "SkeletonHeaderText");
    },
    m(t, n) {
      B(t, e, n);
    },
    p: L,
    d(t) {
      t && C(e);
    }
  };
}
function Re(i) {
  let e, t, n, a;
  return {
    c() {
      e = f("div"), t = f("ui-skeleton"), n = j(), a = f("ui-skeleton"), b(t, "structure", "title"), b(t, "width", "20px"), b(t, "height", "20px"), b(t, "margin-top", "5px"), b(t, "margin-bottom", "15px"), b(a, "structure", "title"), b(a, "width", "180px"), b(a, "height", "20px"), b(a, "margin-top", "5px"), b(a, "margin-bottom", "15px"), p(e, "class", "SkeletonMenuButton " + /*isMobile*/
      (i[6] ? "Mobile" : ""));
    },
    m(l, c) {
      B(l, e, c), s(e, t), s(e, n), s(e, a);
    },
    p: L,
    d(l) {
      l && C(e);
    }
  };
}
function Ae(i) {
  let e;
  return {
    c() {
      e = f("div"), e.innerHTML = '<div class="SkeletonOptionCircle"><ui-skeleton structure="circle" size="20px"></ui-skeleton></div> <div class="SkeletonOptionText"><ui-skeleton structure="text" height="10px" width="auto"></ui-skeleton></div>', p(e, "class", "SkeletonOption");
    },
    m(t, n) {
      B(t, e, n);
    },
    p: L,
    d(t) {
      t && C(e);
    }
  };
}
function Me(i) {
  let e;
  function t(l, c) {
    return (
      /*skeletonLoading*/
      l[1] ? ke : be
    );
  }
  let n = t(i), a = n(i);
  return {
    c() {
      e = f("div"), a.c(), p(e, "class", "PlayerAccountReviewWrapper " + /*isMobile*/
      (i[6] ? "PlayerAccountReviewWrapperMobile" : ""));
    },
    m(l, c) {
      B(l, e, c), a.m(e, null), i[19](e);
    },
    p(l, c) {
      n === (n = t(l)) && a ? a.p(l, c) : (a.d(1), a = n(l), a && (a.c(), a.m(e, null)));
    },
    i: L,
    o: L,
    d(l) {
      l && C(e), a.d(), i[19](null);
    }
  };
}
const Q = 2;
function Se(i, e, t) {
  let n;
  re(i, ge, (r) => t(5, n = r));
  let { endpoint: a = "" } = e, { playerid: l = "" } = e, { session: c = "" } = e, { lang: g = "en" } = e, { clientstyling: u = "" } = e, { clientstylingurl: v = "" } = e, { mbsource: w } = e, { translationurl: x = "" } = e, d, A, y = se(window.navigator.userAgent) !== "PC", o = !0, h = "", M = "", T = [];
  const N = () => U(this, null, function* () {
    try {
      const r = new URL(`${a}/api/pam/v1/player-notifications`);
      r.searchParams.set("type", String(Q)), r.searchParams.append("createNotificationIfNotFound", "true");
      const _ = new Headers();
      _.append("X-SessionID", c), _.append("accept", "application/json");
      const D = yield (yield fetch(r.href, { method: "GET", headers: _ })).json();
      D != null && D.interval && (t(3, M = String(D == null ? void 0 : D.interval)), t(2, h = M)), T.length || t(4, T = [
        { value: "1", text: n("daily") },
        { value: "2", text: n("weekly") },
        { value: "3", text: n("monthly") },
        { value: "4", text: `6 ${n("months")}` }
      ]), t(1, o = !1);
    } catch (r) {
      console.error(r), t(1, o = !1);
    }
  }), I = () => U(this, null, function* () {
    try {
      const r = new URL(`${a}/api/pam/v1/player-notifications`), _ = new Headers();
      _.append("X-SessionID", c), _.append("Content-Type", "application/json"), _.append("Accept", "application/json"), r.searchParams.append("createNotificationIfNotFound", "true");
      const H = {
        type: Q,
        interval: Number(h),
        ackNotification: !0,
        ackNotificationTimestamp: (/* @__PURE__ */ new Date()).toISOString()
      };
      return (yield fetch(r.href, {
        method: "PATCH",
        headers: _,
        body: JSON.stringify(H)
      })).ok;
    } catch (r) {
      return console.error(r), !1;
    }
  }), W = (r) => {
    r.preventDefault(), h && I().then((_) => {
      const H = _ ? {
        type: "success",
        message: n("successMessage")
      } : {
        type: "error",
        message: n("errorMessage")
      };
      window.postMessage(
        {
          type: "WidgetNotification",
          data: H
        },
        window.location.href
      ), _ && t(3, M = h);
    });
  }, q = () => {
    window.postMessage(
      {
        type: "PlayerAccountMenuActive",
        isMobile: y
      },
      window.location.href
    );
  }, F = () => fe(g), R = () => {
    const r = x;
    r && fetch(r).then((_) => _.json()).then((_) => {
      Object.keys(_).forEach((H) => {
        G(H, _[H]);
      });
    }).catch((_) => console.log(_));
  };
  Object.keys(X).forEach((r) => G(r, X[r])), le(() => () => {
  });
  const m = [[]];
  function S() {
    h = this.__value, t(2, h);
  }
  function k(r) {
    ce[r ? "unshift" : "push"](() => {
      d = r, t(0, d);
    });
  }
  return i.$$set = (r) => {
    "endpoint" in r && t(9, a = r.endpoint), "playerid" in r && t(10, l = r.playerid), "session" in r && t(11, c = r.session), "lang" in r && t(12, g = r.lang), "clientstyling" in r && t(13, u = r.clientstyling), "clientstylingurl" in r && t(14, v = r.clientstylingurl), "mbsource" in r && t(15, w = r.mbsource), "translationurl" in r && t(16, x = r.translationurl);
  }, i.$$.update = () => {
    i.$$.dirty[0] & /*lang*/
    4096 && g && F(), i.$$.dirty[0] & /*endpoint, playerid, session*/
    3584 && a && l && c && N(), i.$$.dirty[0] & /*clientstyling, customStylingContainer*/
    8193 && u && d && de(d, u), i.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
    16385 && v && d && me(d, v), i.$$.dirty[0] & /*mbsource, customStylingContainer*/
    32769 && w && d && ve(d, `${w}.Style`, A), i.$$.dirty[0] & /*translationurl*/
    65536 && x && R();
  }, [
    d,
    o,
    h,
    M,
    T,
    n,
    y,
    W,
    q,
    a,
    l,
    c,
    g,
    u,
    v,
    w,
    x,
    S,
    m,
    k
  ];
}
class je extends ie {
  constructor(e) {
    super(), ae(
      this,
      e,
      Se,
      Me,
      ne,
      {
        endpoint: 9,
        playerid: 10,
        session: 11,
        lang: 12,
        clientstyling: 13,
        clientstylingurl: 14,
        mbsource: 15,
        translationurl: 16
      },
      he,
      [-1, -1]
    );
  }
  get endpoint() {
    return this.$$.ctx[9];
  }
  set endpoint(e) {
    this.$$set({ endpoint: e }), P();
  }
  get playerid() {
    return this.$$.ctx[10];
  }
  set playerid(e) {
    this.$$set({ playerid: e }), P();
  }
  get session() {
    return this.$$.ctx[11];
  }
  set session(e) {
    this.$$set({ session: e }), P();
  }
  get lang() {
    return this.$$.ctx[12];
  }
  set lang(e) {
    this.$$set({ lang: e }), P();
  }
  get clientstyling() {
    return this.$$.ctx[13];
  }
  set clientstyling(e) {
    this.$$set({ clientstyling: e }), P();
  }
  get clientstylingurl() {
    return this.$$.ctx[14];
  }
  set clientstylingurl(e) {
    this.$$set({ clientstylingurl: e }), P();
  }
  get mbsource() {
    return this.$$.ctx[15];
  }
  set mbsource(e) {
    this.$$set({ mbsource: e }), P();
  }
  get translationurl() {
    return this.$$.ctx[16];
  }
  set translationurl(e) {
    this.$$set({ translationurl: e }), P();
  }
}
ye(je, { endpoint: {}, playerid: {}, session: {}, lang: {}, clientstyling: {}, clientstylingurl: {}, mbsource: {}, translationurl: {} }, [], [], !0);
export {
  je as default
};
