import { a as $, $ as ee, S as te, i as ie, s as ae, f as P, b as ne, n as E, d as C, e as B, g, t as l, h as oe, j as re, o as se, k as le, l as J, m as Q, p as s, q as j, r as b, u as I, x as W, v as O, w as ce, y as N, R as ue, K as V, B as pe, C as de, D as me, c as ve, A as ye } from "./PlayerAccountController-D0b5nEtR.js";
import "../stencil/ui-skeleton-DNuG5l9W.js";
function G(i, e) {
  $(i, e);
}
function ge(i) {
  ee.set(i);
}
const Y = {
  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 fe(i) {
  ne(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 K(i, e, t) {
  const a = i.slice();
  return a[28] = e[t].value, a[29] = e[t].text, a;
}
function he(i, e, t) {
  const a = i.slice();
  return a[25] = e[t], a;
}
function we(i) {
  let e, t, a, n = (
    /*$_*/
    i[5]("titleAccountReview") + ""
  ), c, u, f, v, y = (
    /*$_*/
    i[5]("accountReviewText") + ""
  ), w, x, p, A, m, o, h = (
    /*$_*/
    i[5]("setFrequency") + ""
  ), M, T, D, z, L, q = (
    /*isMobile*/
    i[6] && ke(i)
  ), F = J(
    /*options*/
    i[4]
  ), R = [];
  for (let d = 0; d < F.length; d += 1)
    R[d] = X(K(i, F, d));
  return {
    c() {
      e = g("div"), q && q.c(), t = j(), a = g("h2"), c = O(n), u = j(), f = g("div"), v = g("p"), w = O(y), x = j(), p = g("form");
      for (let d = 0; d < R.length; d += 1)
        R[d].c();
      A = j(), m = g("div"), o = g("button"), M = O(h), l(a, "class", "AccountReviewTitle " + /*isMobile*/
      (i[6] ? "AccountReviewTitleNone" : "")), l(f, "class", "AccountReviewDescription " + /*isMobile*/
      (i[6] ? "AccountReviewDescriptionMobile" : "")), l(o, "class", T = "PlayerRealityCheckButton " + (!/*selectedInterval*/
      i[2] || /*currentInterval*/
      i[3] === /*selectedInterval*/
      i[2] ? "ButtonInactive" : "")), o.disabled = D = !/*selectedInterval*/
      i[2] || /*currentInterval*/
      i[3] === /*selectedInterval*/
      i[2], l(m, "class", "BottomButtonsArea " + /*isMobile*/
      (i[6] ? "BottomButtonsAreaMobile" : "")), l(p, "class", "customRadio"), l(e, "class", "containerTimeout");
    },
    m(d, S) {
      B(d, e, S), q && q.m(e, null), s(e, t), s(e, a), s(a, c), s(e, u), s(e, f), s(f, v), s(v, w), s(e, x), s(e, p);
      for (let k = 0; k < R.length; k += 1)
        R[k] && R[k].m(p, null);
      s(p, A), s(p, m), s(m, o), s(o, M), z || (L = W(
        o,
        "click",
        /*submit*/
        i[7]
      ), z = !0);
    },
    p(d, S) {
      if (
        /*isMobile*/
        d[6] && q.p(d, S), S[0] & /*$_*/
        32 && n !== (n = /*$_*/
        d[5]("titleAccountReview") + "") && I(c, n), S[0] & /*$_*/
        32 && y !== (y = /*$_*/
        d[5]("accountReviewText") + "") && I(w, y), S[0] & /*options, selectedInterval*/
        20
      ) {
        F = J(
          /*options*/
          d[4]
        );
        let k;
        for (k = 0; k < F.length; k += 1) {
          const r = K(d, F, k);
          R[k] ? R[k].p(r, S) : (R[k] = X(r), R[k].c(), R[k].m(p, A));
        }
        for (; k < R.length; k += 1)
          R[k].d(1);
        R.length = F.length;
      }
      S[0] & /*$_*/
      32 && h !== (h = /*$_*/
      d[5]("setFrequency") + "") && I(M, h), S[0] & /*selectedInterval, currentInterval*/
      12 && T !== (T = "PlayerRealityCheckButton " + (!/*selectedInterval*/
      d[2] || /*currentInterval*/
      d[3] === /*selectedInterval*/
      d[2] ? "ButtonInactive" : "")) && l(o, "class", T), S[0] & /*selectedInterval, currentInterval*/
      12 && D !== (D = !/*selectedInterval*/
      d[2] || /*currentInterval*/
      d[3] === /*selectedInterval*/
      d[2]) && (o.disabled = D);
    },
    d(d) {
      d && C(e), q && q.d(), Q(R, d), z = !1, L();
    }
  };
}
function be(i) {
  let e, t, a, n, c, u, f, v, y;
  function w(o, h) {
    return (
      /*isMobile*/
      o[6] ? xe : _e
    );
  }
  let p = w(i)(i), A = J({ length: 6 }), m = [];
  for (let o = 0; o < A.length; o += 1)
    m[o] = Re(he(i, A, o));
  return {
    c() {
      e = g("div"), p.c(), t = j(), a = g("div"), n = g("ui-skeleton"), c = j(), u = g("div");
      for (let o = 0; o < m.length; o += 1)
        m[o].c();
      f = j(), v = g("div"), y = g("ui-skeleton"), b(n, "structure", "text"), b(n, "height", "15px"), b(n, "width", "100%"), b(n, "margin-bottom", "7px"), b(
        n,
        "rows",
        /*isMobile*/
        i[6] ? "5" : "3"
      ), l(a, "class", "SkeletonTextContainer"), b(y, "structure", "rectangle"), b(y, "height", "50px"), b(y, "margin-bottom", "0"), b(y, "borderRadius", "5px"), b(
        y,
        "width",
        /*isMobile*/
        i[6] ? "100%" : "350px"
      ), l(v, "class", "Button"), l(u, "class", "SkeletonOptionContainer"), l(e, "class", "SkeletonContainer");
    },
    m(o, h) {
      B(o, e, h), p.m(e, null), s(e, t), s(e, a), s(a, n), s(e, c), s(e, u);
      for (let M = 0; M < m.length; M += 1)
        m[M] && m[M].m(u, null);
      s(u, f), s(u, v), s(v, y);
    },
    p(o, h) {
      p.p(o, h);
    },
    d(o) {
      o && C(e), p.d(), Q(m, o);
    }
  };
}
function ke(i) {
  let e, t, a, n, c, u, f, v, y, w, x = (
    /*$_*/
    i[5]("titleAccountReview") + ""
  ), p, A, m;
  return {
    c() {
      e = g("div"), t = N("svg"), a = N("defs"), n = N("style"), c = O(`.aaa {
                  fill: var(--emw--pam-color-primary, var(--emw--color-primary, #22b04e));
                }
              `), u = N("g"), f = N("g"), v = N("path"), y = j(), w = g("h2"), p = O(x), l(v, "class", "aaa"), l(v, "d", "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"), l(v, "transform", "translate(15 15) rotate(180)"), l(f, "transform", "translate(20 158)"), l(u, "transform", "translate(-20 -158)"), l(t, "xmlns", "http://www.w3.org/2000/svg"), l(t, "width", "15"), l(t, "height", "15"), l(t, "viewBox", "0 0 15 15"), l(w, "class", "AccountReviewTitleMobile"), l(e, "class", "MenuReturnButton");
    },
    m(o, h) {
      B(o, e, h), s(e, t), s(t, a), s(a, n), s(n, c), s(t, u), s(u, f), s(f, v), s(e, y), s(e, w), s(w, p), A || (m = [
        W(
          e,
          "click",
          /*toggleScreen*/
          i[8]
        ),
        W(e, "keydown", null)
      ], A = !0);
    },
    p(o, h) {
      h[0] & /*$_*/
      32 && x !== (x = /*$_*/
      o[5]("titleAccountReview") + "") && I(p, x);
    },
    d(o) {
      o && C(e), A = !1, ce(m);
    }
  };
}
function X(i) {
  let e, t, a, n, c = !1, u, f, v = (
    /*text*/
    i[29] + ""
  ), y, w, x, p, A;
  return x = ue(
    /*$$binding_groups*/
    i[18][0]
  ), {
    c() {
      e = g("div"), t = g("input"), u = j(), f = g("label"), y = O(v), l(t, "type", "radio"), l(t, "id", a = "interval-" + /*value*/
      i[28]), t.__value = n = /*value*/
      i[28], V(t, t.__value), l(f, "for", w = "interval-" + /*value*/
      i[28]), x.p(t);
    },
    m(m, o) {
      B(m, e, o), s(e, t), t.checked = t.__value === /*selectedInterval*/
      i[2], s(e, u), s(e, f), s(f, y), p || (A = W(
        t,
        "change",
        /*input_change_handler*/
        i[17]
      ), p = !0);
    },
    p(m, o) {
      o[0] & /*options*/
      16 && a !== (a = "interval-" + /*value*/
      m[28]) && l(t, "id", a), o[0] & /*options*/
      16 && n !== (n = /*value*/
      m[28]) && (t.__value = n, V(t, t.__value), c = !0), (c || o[0] & /*selectedInterval, options*/
      20) && (t.checked = t.__value === /*selectedInterval*/
      m[2]), o[0] & /*options*/
      16 && v !== (v = /*text*/
      m[29] + "") && I(y, v), o[0] & /*options*/
      16 && w !== (w = "interval-" + /*value*/
      m[28]) && l(f, "for", w);
    },
    d(m) {
      m && C(e), x.r(), p = !1, A();
    }
  };
}
function _e(i) {
  let e;
  return {
    c() {
      e = g("div"), e.innerHTML = '<ui-skeleton structure="title" width="280px" margin-top="20px"></ui-skeleton>', l(e, "class", "SkeletonHeaderText");
    },
    m(t, a) {
      B(t, e, a);
    },
    p: E,
    d(t) {
      t && C(e);
    }
  };
}
function xe(i) {
  let e, t, a, n;
  return {
    c() {
      e = g("div"), t = g("ui-skeleton"), a = j(), n = g("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(n, "structure", "title"), b(n, "width", "180px"), b(n, "height", "20px"), b(n, "margin-top", "5px"), b(n, "margin-bottom", "15px"), l(e, "class", "SkeletonMenuButton " + /*isMobile*/
      (i[6] ? "Mobile" : ""));
    },
    m(c, u) {
      B(c, e, u), s(e, t), s(e, a), s(e, n);
    },
    p: E,
    d(c) {
      c && C(e);
    }
  };
}
function Re(i) {
  let e;
  return {
    c() {
      e = g("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>', l(e, "class", "SkeletonOption");
    },
    m(t, a) {
      B(t, e, a);
    },
    p: E,
    d(t) {
      t && C(e);
    }
  };
}
function Ae(i) {
  let e;
  function t(c, u) {
    return (
      /*skeletonLoading*/
      c[1] ? be : we
    );
  }
  let a = t(i), n = a(i);
  return {
    c() {
      e = g("div"), n.c(), l(e, "class", "PlayerAccountReviewWrapper " + /*isMobile*/
      (i[6] ? "PlayerAccountReviewWrapperMobile" : ""));
    },
    m(c, u) {
      B(c, e, u), n.m(e, null), i[19](e);
    },
    p(c, u) {
      a === (a = t(c)) && n ? n.p(c, u) : (n.d(1), n = a(c), n && (n.c(), n.m(e, null)));
    },
    i: E,
    o: E,
    d(c) {
      c && C(e), n.d(), i[19](null);
    }
  };
}
const Z = 2;
function Me(i, e, t) {
  let a;
  oe(i, ye, (r) => t(5, a = r));
  let { endpoint: n = "" } = e, { playerid: c = "" } = e, { session: u = "" } = e, { lang: f = "en" } = e, { clientstyling: v = "" } = e, { clientstylingurl: y = "" } = e, { mbsource: w } = e, { translationurl: x = "" } = e, p, A, m = re(window.navigator.userAgent) !== "PC", o = !0, h = "", M = "", T = [];
  const D = async () => {
    try {
      const r = new URL(`${n}/api/pam/v1/player-notifications`);
      r.searchParams.set("type", String(Z)), r.searchParams.append("createNotificationIfNotFound", "true");
      const _ = new Headers();
      _.append("X-SessionID", u), _.append("accept", "application/json");
      const U = await (await fetch(r.href, { method: "GET", headers: _ })).json();
      U?.interval && (t(3, M = String(U?.interval)), t(2, h = M)), T.length || t(4, T = [
        { value: "1", text: a("daily") },
        { value: "2", text: a("weekly") },
        { value: "3", text: a("monthly") },
        { value: "4", text: `6 ${a("months")}` }
      ]), t(1, o = !1);
    } catch (r) {
      console.error(r), t(1, o = !1);
    }
  }, z = async () => {
    try {
      const r = new URL(`${n}/api/pam/v1/player-notifications`), _ = new Headers();
      _.append("X-SessionID", u), _.append("Content-Type", "application/json"), _.append("Accept", "application/json"), r.searchParams.append("createNotificationIfNotFound", "true");
      const H = {
        type: Z,
        interval: Number(h),
        ackNotification: !0,
        ackNotificationTimestamp: (/* @__PURE__ */ new Date()).toISOString()
      };
      return (await fetch(r.href, {
        method: "PATCH",
        headers: _,
        body: JSON.stringify(H)
      })).ok;
    } catch (r) {
      return console.error(r), !1;
    }
  }, L = (r) => {
    r.preventDefault(), h && z().then((_) => {
      const H = _ ? {
        type: "success",
        message: a("successMessage")
      } : {
        type: "error",
        message: a("errorMessage")
      };
      window.postMessage(
        {
          type: "WidgetNotification",
          data: H
        },
        window.location.href
      ), _ && t(3, M = h);
    });
  }, q = () => {
    window.postMessage(
      {
        type: "PlayerAccountMenuActive",
        isMobile: m
      },
      window.location.href
    );
  }, F = () => ge(f), R = () => {
    const r = x;
    r && fetch(r).then((_) => _.json()).then((_) => {
      Object.keys(_).forEach((H) => {
        G(H, _[H]);
      });
    }).catch((_) => console.log(_));
  };
  Object.keys(Y).forEach((r) => G(r, Y[r])), se(() => () => {
  });
  const d = [[]];
  function S() {
    h = this.__value, t(2, h);
  }
  function k(r) {
    le[r ? "unshift" : "push"](() => {
      p = r, t(0, p);
    });
  }
  return i.$$set = (r) => {
    "endpoint" in r && t(9, n = r.endpoint), "playerid" in r && t(10, c = r.playerid), "session" in r && t(11, u = r.session), "lang" in r && t(12, f = r.lang), "clientstyling" in r && t(13, v = r.clientstyling), "clientstylingurl" in r && t(14, y = 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 && f && F(), i.$$.dirty[0] & /*endpoint, playerid, session*/
    3584 && n && c && u && D(), i.$$.dirty[0] & /*clientstyling, customStylingContainer*/
    8193 && v && p && pe(p, v), i.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
    16385 && y && p && de(p, y), i.$$.dirty[0] & /*mbsource, customStylingContainer*/
    32769 && w && p && me(p, `${w}.Style`, A), i.$$.dirty[0] & /*translationurl*/
    65536 && x && R();
  }, [
    p,
    o,
    h,
    M,
    T,
    a,
    m,
    L,
    q,
    n,
    c,
    u,
    f,
    v,
    y,
    w,
    x,
    S,
    d,
    k
  ];
}
class Se extends te {
  constructor(e) {
    super(), ie(
      this,
      e,
      Me,
      Ae,
      ae,
      {
        endpoint: 9,
        playerid: 10,
        session: 11,
        lang: 12,
        clientstyling: 13,
        clientstylingurl: 14,
        mbsource: 15,
        translationurl: 16
      },
      fe,
      [-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();
  }
}
ve(Se, { endpoint: {}, playerid: {}, session: {}, lang: {}, clientstyling: {}, clientstylingurl: {}, mbsource: {}, translationurl: {} }, [], [], !0);
export {
  Se as default
};
