import { a as J, $ as K, S as F, i as Q, s as V, f as x, b as X, J as Y, d as S, r as Z, K as $, L as ee, M as te, N as ne, O as oe, c as O, h as L, j as m, l as j, k as _, m as B, t as T, e as l, p as re, q as ie, u as ae, n as le, v as W, w as se, x as ce, y as fe, z as me, A as de, B as ue } from "./GeneralLogout-hWNQ3J3o.js";
function P(n, e) {
  J(n, e);
}
function ge(n) {
  K.set(n);
}
const q = {
  en: {
    cancel: "Cancel",
    confirm: "Confirm"
  },
  fr: {
    cancel: "Annuler",
    confirm: "Confirmer"
  },
  ro: {
    cancel: "Anulează",
    confirm: "Confirmă"
  },
  es: {
    cancel: "Cancelar",
    confirm: "Confirmar"
  },
  pt: {
    cancel: "Cancelar",
    confirm: "Confirmar"
  },
  "zh-hk": {
    cancel: "取消",
    confirm: "確認"
  },
  hr: {
    cancel: "Otkaži",
    confirm: "Potvrdi"
  },
  "pt-br": {
    cancel: "Cancelar",
    confirm: "confirme"
  },
  "es-mx": {
    cancel: "Cancelar",
    confirm: "Confirmar"
  },
  tr: {
    cancel: "İptal etmek",
    confirm: "Onaylamak"
  },
  "en-us": {
    cancel: "Cancel",
    confirm: "Confirm"
  }
};
function be(n) {
  X(n, "svelte-8g0wf4", '*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}.GeneralConfirmationWrapper{position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--emw--color-background, rgba(0, 0, 0, 0.7));display:flex;justify-content:center;align-items:center;z-index:300;color:var(--emw--color-typography, #ffffff)}.GeneralConfirmationTitle{margin-bottom:20px}.GeneralConfirmationContainer{position:relative;background:linear-gradient(to right, var(--emw--color-primary-variant, #184026), var(--emw--color-secondary-variant, #013e5c));border:5px solid transparent;padding:60px 30px 30px;background-clip:padding-box;border-radius:var(--emw--border-radius-medium, 10px);text-align:center}.GeneralConfirmationContainer::before{content:"";position:absolute;top:-4px;left:-8px;width:103%;height:105%;z-index:-1;background:linear-gradient(to right, var(--emw--color-primary, #22b04e), color-mix(in srgb, var(--emw--color-secondary, #e98b0f) 80%, black 20%), #22b04e);opacity:0.5;border-radius:inherit;filter:blur(6px)}.GeneralConfirmationContainer::after{position:absolute;top:-4px;bottom:-4px;left:-4px;right:-4px;background:linear-gradient(to right, color-mix(in srgb, var(--emw--color-primary-variant, #184026) 80%, white 10%), color-mix(in srgb, var(--emw--color-secondary-variant, #013e5c) 80%, white 10%));content:"";z-index:-1;border-radius:var(--emw--border-radius-medium, 10px)}.GeneralConfirmationContainerMobile{padding:40px;max-width:330px}.GeneralConfirmationContainerMobile .GeneralConfirmationControlAreaMobile .GeneralCancelButton,.GeneralConfirmationContainerMobile .GeneralConfirmationControlAreaMobile .GeneralConfirmButton{width:120px;height:auto;font-size:var(--emw--font-size-x-small, 12px)}.GeneralConfirmationContent{font-size:var(--emw--font-size-medium, 18px);font-weight:300}.GeneralConfirmationControlArea{display:flex;gap:10px;direction:ltr;margin-top:30px}.GeneralConfirmationControlArea .GeneralCancelButton,.GeneralConfirmationControlArea .GeneralConfirmButton{flex:1;background:transparent;border:1px solid var(--emw--color-gray-100, #bfcbc3);color:var(--emw--color-gray-100, #bfcbc3);cursor:pointer;border-radius:var(--emw--button-border-radius, 50px);width:200px;height:50px;font-size:var(--emw--font-size-small, 16px);text-transform:uppercase;text-align:center;transition-duration:0.3s;box-sizing:border-box;padding:10px}.GeneralConfirmationControlArea .GeneralConfirmButton{background-color:var(--emw--color-primary, #22b04e);border:2px solid var(--emw--button-border-color, #063b17);border-radius:var(--emw--button-border-radius, 50px);color:var(--emw--button-typography, var(--emw--button-text-color, #ffffff))}.ModalCloseBtn{position:absolute;display:flex;align-items:center;justify-content:center;top:5px;right:5px;padding:8px;border-radius:50%;cursor:pointer;transition:all 150ms ease-in-out}.ModalCloseBtn svg{width:35px;height:40px}.ModalCloseBtn:hover{background:rgba(255, 255, 255, 0.2)}.GeneralConfirmationMobileWrapper{border:none;padding:0}');
}
const he = (n) => ({}), E = (n) => ({});
function Ce(n) {
  let e, t;
  return {
    c() {
      e = W("svg"), t = W("path"), l(t, "stroke-linecap", "round"), l(t, "stroke-linejoin", "round"), l(t, "stroke-width", "2"), l(t, "d", "M6 18L18 6M6 6l12 12"), l(e, "class", "w-6 h-6"), l(e, "fill", "none"), l(e, "stroke", "currentColor"), l(e, "viewBox", "0 0 24 24"), l(e, "xmlns", "http://www.w3.org/2000/svg");
    },
    m(i, c) {
      L(i, e, c), m(e, t);
    },
    p: le,
    d(i) {
      i && S(e);
    }
  };
}
function H(n) {
  let e, t, i;
  return {
    c() {
      e = _("div"), t = _("h2"), i = T(
        /*modaltitle*/
        n[1]
      ), l(e, "class", "GeneralConfirmationTitle");
    },
    m(c, d) {
      L(c, e, d), m(e, t), m(t, i);
    },
    p(c, d) {
      d & /*modaltitle*/
      2 && O(
        i,
        /*modaltitle*/
        c[1]
      );
    },
    d(c) {
      c && S(e);
    }
  };
}
function R(n) {
  let e, t = (
    /*$_*/
    n[4]("cancel") + ""
  ), i, c, d;
  return {
    c() {
      e = _("button"), i = T(t), l(e, "class", "GeneralCancelButton");
    },
    m(f, w) {
      L(f, e, w), m(e, i), c || (d = j(
        e,
        "click",
        /*click_handler*/
        n[17]
      ), c = !0);
    },
    p(f, w) {
      w & /*$_*/
      16 && t !== (t = /*$_*/
      f[4]("cancel") + "") && O(i, t);
    },
    d(f) {
      f && S(e), c = !1, d();
    }
  };
}
function pe(n) {
  let e, t, i, c, d, f, w, b, y, h, v = (
    /*$_*/
    n[4]("confirm") + ""
  ), k, u, G, M;
  const g = (
    /*#slots*/
    n[16].close
  ), A = Y(
    g,
    n,
    /*$$scope*/
    n[15],
    E
  ), C = A || Ce();
  let s = (
    /*modaltitle*/
    n[1] && H(n)
  ), a = (
    /*hascancelbutton*/
    n[2] && R(n)
  );
  return {
    c() {
      e = _("div"), t = _("div"), i = _("span"), C && C.c(), c = B(), s && s.c(), d = B(), f = _("div"), w = B(), b = _("div"), a && a.c(), y = B(), h = _("button"), k = T(v), l(i, "class", "ModalCloseBtn"), l(i, "role", "button"), l(f, "class", "GeneralConfirmationContent"), l(h, "class", "GeneralConfirmButton"), l(b, "class", "GeneralConfirmationControlArea " + /*isMobile*/
      (n[5] ? "GeneralConfirmationControlAreaMobile" : "")), l(t, "class", "GeneralConfirmationContainer " + /*isMobile*/
      (n[5] ? "GeneralConfirmationContainerMobile" : "")), l(e, "class", "GeneralConfirmationWrapper " + /*isMobile*/
      (n[5] ? "GeneralConfirmationMobileWrapper" : ""));
    },
    m(r, p) {
      L(r, e, p), m(e, t), m(t, i), C && C.m(i, null), m(t, c), s && s.m(t, null), m(t, d), m(t, f), f.innerHTML = /*modaltext*/
      n[0], m(t, w), m(t, b), a && a.m(b, null), m(b, y), m(b, h), m(h, k), n[19](e), u = !0, G || (M = [
        j(
          i,
          "click",
          /*close*/
          n[6]
        ),
        j(
          h,
          "click",
          /*click_handler_1*/
          n[18]
        )
      ], G = !0);
    },
    p(r, [p]) {
      A && A.p && (!u || p & /*$$scope*/
      32768) && te(
        A,
        g,
        r,
        /*$$scope*/
        r[15],
        u ? oe(
          g,
          /*$$scope*/
          r[15],
          p,
          he
        ) : ne(
          /*$$scope*/
          r[15]
        ),
        E
      ), /*modaltitle*/
      r[1] ? s ? s.p(r, p) : (s = H(r), s.c(), s.m(t, d)) : s && (s.d(1), s = null), (!u || p & /*modaltext*/
      1) && (f.innerHTML = /*modaltext*/
      r[0]), /*hascancelbutton*/
      r[2] ? a ? a.p(r, p) : (a = R(r), a.c(), a.m(b, y)) : a && (a.d(1), a = null), (!u || p & /*$_*/
      16) && v !== (v = /*$_*/
      r[4]("confirm") + "") && O(k, v);
    },
    i(r) {
      u || (ee(C, r), u = !0);
    },
    o(r) {
      $(C, r), u = !1;
    },
    d(r) {
      r && S(e), C && C.d(r), s && s.d(), a && a.d(), n[19](null), G = !1, Z(M);
    }
  };
}
function xe(n, e, t) {
  let i;
  re(n, ue, (o) => t(4, i = o));
  let { $$slots: c = {}, $$scope: d } = e, { modaltext: f = "Are you sure that you want to perform this action?" } = e, { modaltitle: w = "" } = e, { hascancelbutton: b = !1 } = e, { modalconfirmevent: y = {} } = e, { modalcancelevent: h = {} } = e, { lang: v = "en" } = e, { clientstyling: k = "" } = e, { clientstylingurl: u = "" } = e, { translationurl: G = "" } = e, { mbsource: M } = e, g, A = window.navigator.userAgent, C = ie(A) !== "PC";
  const s = () => {
    window.postMessage({ type: "ModalClosed" }, window.location.href);
  }, a = (o) => {
    o === "confirm" && y && window.postMessage(y, window.location.href), o === "cancel" && h && window.postMessage(h, window.location.href), s();
  }, r = () => {
    fetch(G).then((z) => z.json()).then((z) => {
      Object.keys(z).forEach((N) => {
        P(N, z[N]);
      });
    }).catch((z) => {
      console.log(z);
    });
  };
  Object.keys(q).forEach((o) => {
    P(o, q[o]);
  });
  const p = () => {
    ge(v);
  };
  ae(() => () => {
  });
  const U = () => a("cancel"), D = () => a("confirm");
  function I(o) {
    se[o ? "unshift" : "push"](() => {
      g = o, t(3, g);
    });
  }
  return n.$$set = (o) => {
    "modaltext" in o && t(0, f = o.modaltext), "modaltitle" in o && t(1, w = o.modaltitle), "hascancelbutton" in o && t(2, b = o.hascancelbutton), "modalconfirmevent" in o && t(8, y = o.modalconfirmevent), "modalcancelevent" in o && t(9, h = o.modalcancelevent), "lang" in o && t(10, v = o.lang), "clientstyling" in o && t(11, k = o.clientstyling), "clientstylingurl" in o && t(12, u = o.clientstylingurl), "translationurl" in o && t(13, G = o.translationurl), "mbsource" in o && t(14, M = o.mbsource), "$$scope" in o && t(15, d = o.$$scope);
  }, n.$$.update = () => {
    n.$$.dirty & /*modaltext, lang*/
    1025 && f && v && p(), n.$$.dirty & /*clientstyling, customStylingContainer*/
    2056 && k && g && ce(g, k), n.$$.dirty & /*clientstylingurl, customStylingContainer*/
    4104 && u && g && fe(g, u), n.$$.dirty & /*mbsource, customStylingContainer*/
    16392 && M && g && me(g, `${M}.Style`), n.$$.dirty & /*translationurl*/
    8192 && G && r();
  }, [
    f,
    w,
    b,
    g,
    i,
    C,
    s,
    a,
    y,
    h,
    v,
    k,
    u,
    G,
    M,
    d,
    c,
    U,
    D,
    I
  ];
}
class we extends F {
  constructor(e) {
    super(), Q(
      this,
      e,
      xe,
      pe,
      V,
      {
        modaltext: 0,
        modaltitle: 1,
        hascancelbutton: 2,
        modalconfirmevent: 8,
        modalcancelevent: 9,
        lang: 10,
        clientstyling: 11,
        clientstylingurl: 12,
        translationurl: 13,
        mbsource: 14
      },
      be
    );
  }
  get modaltext() {
    return this.$$.ctx[0];
  }
  set modaltext(e) {
    this.$$set({ modaltext: e }), x();
  }
  get modaltitle() {
    return this.$$.ctx[1];
  }
  set modaltitle(e) {
    this.$$set({ modaltitle: e }), x();
  }
  get hascancelbutton() {
    return this.$$.ctx[2];
  }
  set hascancelbutton(e) {
    this.$$set({ hascancelbutton: e }), x();
  }
  get modalconfirmevent() {
    return this.$$.ctx[8];
  }
  set modalconfirmevent(e) {
    this.$$set({ modalconfirmevent: e }), x();
  }
  get modalcancelevent() {
    return this.$$.ctx[9];
  }
  set modalcancelevent(e) {
    this.$$set({ modalcancelevent: e }), x();
  }
  get lang() {
    return this.$$.ctx[10];
  }
  set lang(e) {
    this.$$set({ lang: e }), x();
  }
  get clientstyling() {
    return this.$$.ctx[11];
  }
  set clientstyling(e) {
    this.$$set({ clientstyling: e }), x();
  }
  get clientstylingurl() {
    return this.$$.ctx[12];
  }
  set clientstylingurl(e) {
    this.$$set({ clientstylingurl: e }), x();
  }
  get translationurl() {
    return this.$$.ctx[13];
  }
  set translationurl(e) {
    this.$$set({ translationurl: e }), x();
  }
  get mbsource() {
    return this.$$.ctx[14];
  }
  set mbsource(e) {
    this.$$set({ mbsource: e }), x();
  }
}
de(we, { modaltext: {}, modaltitle: {}, hascancelbutton: { type: "Boolean" }, modalconfirmevent: {}, modalcancelevent: {}, lang: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, mbsource: {} }, ["close"], [], !0);
export {
  we as default
};
