/**** (c) Valve Corporation. Use is governed by the terms of the Steam Subscriber Agreement http://store.steampowered.com/subscriber_agreement/.
 ****/
(self.webpackChunkstore = self.webpackChunkstore || []).push([
  [7212],
  {
    99312: (e) => {
      e.exports = {
        DragTarget: "_2sUvh2ZpsDAw1xNqgRBELg",
        DragOnTopOfMe: "_1mvpIyLL0-Pd4QMIoRXHtu",
        DescriptionCtn: "_3DQEBNkYGY3hyLFAjhtq7V",
        EventEditorLinkInput: "_25nbuIEmk-BBWxsSvWGG1n",
        DefaultEditor: "NENu2K19GJmLf1Asga-WF",
        ImportHTMLCtn: "_3sVZHF23hli8ijIwtMs8oU",
        ImportHTMLTextArea: "DHbRFUDVAeXGluFH-smoE",
        ImportHTMLConvertButtons: "lnyZaHhcGtBzDU0SMlFd1",
        ImportHTMLCheckBoxLine: "_3R3FNRLSeiOwBgELGjSPbz",
        OptionRow: "_2Y3MLEmGvWMI8BoNZgCllJ",
        TextEditorToolBarContainer: "_2bOpQtX5QAuQxfGhEJ_iYg",
        EmoteOuter: "_1x3UOXJkizqKhkssRfFjSS",
        YouTubeInput: "_3WXTC22teDkm8BMc01ZTLA",
        YouTubePreviewInsertOption: "_6ocliVvrdQxHPu-upv6-s",
        DropDownScroll: "P0-tbY3743fHY8SAzfF6b",
        InsertSpeakerCtn: "_2f-6Yv5h7xjUcZCrepnQhg",
        TitleGroup: "_1ddLhT39tQNuR4ljq6Nfg5",
        AssociateRowCtn: "_2HeY5m9J-kxRVzGn8dAwv5",
        PhotoCtn: "_2-f4CX_EyXfhRUmPdIey4w",
        AboutCtn: "_3hF9cNUOsfV0BkzEaWn7FM",
        PreviewCtn: "_VCRyh7nyN-2xDV6yH6Sg",
        BBCodeEditorInputStyles: "F506h2OVFDcZeXFtyqthY",
      };
    },
    34510: (e) => {
      e.exports = {
        BBCode_Toggle: "_3dX8-PpYvSNsGv4k5lvP-R",
        Active: "_2vTzhbuJFb9_vHvquo2L-L",
        BBCode: "_1pH9CKzm5VpicOgzyWpsy_",
      };
    },
    64233: (e) => {
      e.exports = { Image: "_1po_jxHTSix3Li3w5ZnMBB" };
    },
    47444: (e) => {
      e.exports = {
        "duration-app-launch": "800ms",
        carouselNavButton: "_13rGo4vexAbY9-CP7FsLOg",
        left: "S8IHdovT5T2iEVg_97xve",
        carouselBtnCtn: "_3zfZ9tkIrSDZdSTv8mvZ3-",
        right: "Cq59o5WQ49zTvvFY56QYS",
        carouselBody: "_3a31O8XB_8lD-yov8FB9-9",
        sliderBody: "_2M3SnYGvMvplWUC8yGhowo",
        slideTrayCustomize: "_2VUpHDtxN8lR1LDahY_cI2",
        breadcrumbContainer: "_3HjnEmKg66o82ah74EIvmq",
        pipList: "LY1m24ODS7AFRuzclt0Sl",
        pipScrollerContainer: "_3SyN-YtXsML6ado0q-Gdve",
        pipScrollButton: "qE43Jfzl0qJX_a6XrMgSr",
        scrollNavDiv: "_95I5gwXXMBghRg-4uNQLr",
        scrollNavButton: "_1cpdoEGU0uiIWbGIU_qMbZ",
        pipScroller: "EMd4F6A8qdMk-l6os415A",
        scrollBackground: "WUHeTNYGQDQQg_jQe-78W",
        scrollForeground: "PQzkJfi8IxzjcFEDG-yv-",
        pipContainer: "_3TKX37FakYHikXh3Wtg2BU",
        pip: "_3Byg6Wc4TX36gkUptUIk72",
        pipNumber: "_1u4YJiW1cdufpC_wssM8Us",
        innerSlide: "_3Cc2bMRML2lEkSyi2IAZ9G",
        DisableSliderMotion: "_3J8-bW87K3pb8EpRNYq0JG",
      };
    },
    39362: (e) => {
      e.exports = { Ctn: "_1xGaMOW4aakB5uwqOCT3nI" };
    },
    49333: (e) => {
      e.exports = {
        UploadPreviewContainer: "CCBFyy2uP4GNSQGfe2T1L",
        SVGIcon_Video: "_2Fs53eUCdV8xsO83Jc40DH",
        UploadPreview: "_1cXUbzBtV9qFc_63x_j2F2",
        FileUploadFileName: "_21dZgGfG0xtybuVTE6nCv0",
        FileUploadCancel: "rFDt7lDfNBv3BUjppBm9i",
        SVGIcon_X_Line: "_1H7hrp21ukrcZyCAzv9Oc1",
        FileUploadBtn: "_2FFH3ZhSGGItb8Z61CSGfe",
        FileUploadProgressContainer: "_1UobbffXVmx8rwsOHYeNb5",
        FileUploadProgressBarContainer: "tFbvGbecHSHr8P3EdINV-",
        FileUploadProgressName: "_288RbRaiLR6h9q5sWoD2eC",
      };
    },
    79786: (e) => {
      e.exports = {
        Emoticon_Toggle: "Y5J3nttqNZsLax6MbnH-L",
        Active: "YCbwLzK9cJ7QissjKq11n",
        Emoticon: "_2o57_fRPxv5_x6BkjL_cgc",
      };
    },
    17618: (e) => {
      e.exports = {
        ImagesOuterContainer: "_3A8RGZO2pwg1yKDAdFqp9r",
        Hilight: "_1v_zQLXgFsvon1SwxrWjE-",
        ImageContainer: "_2ti3yMwzfkGoiW68FuNjTG",
        Image: "y902_9A0Wj5bTshbt4xRb",
        ImageFilename: "_2jzLZXXxgDMMcA9X0QDSdg",
      };
    },
    39978: (e) => {
      e.exports = {
        sketchfab_play_overlay_image: "j_bDCIOMLFNOKaIFJzk2_",
        sketchfabmodelembedded: "_1hkVJ0EfOR3lTom2cDAN4w",
        dynamiclink_box: "_2OrALNR-dII7L3YP3pXWBG",
        dynamiclink_preview: "_3__9JYEkVlbq76JT_4TByA",
        dynamiclink_content: "_2ocugWm5DDJzRPwAxIsCtq",
        dynamiclink_name: "_3a1nw-REuLvtrUfFX3lonG",
        dynamiclink_type: "_31hqFGM_Of2_4xkXfb8TtV",
        dynamiclink_author: "_13lYjZu0VIgol2-cHgw8vK",
      };
    },
    64502: (e) => {
      e.exports = { AppSummaryWidgetCtn: "_1-2t1NI3qbO2JgWmCss7AW" };
    },
    65835: (e) => {
      e.exports = { Ctn: "_2L6sVk9vOgKcXO6DgZHpJ9" };
    },
    56330: (e) => {
      e.exports = {
        ErrorStyles: "_2Sg7W8jsvFcXVuQ7fbhSLJ",
        ErrorStylesWithIcon: "Lc2PK-Vkkvr2TUS0TfCqq",
        ErrorIconLayout: "_42__6kBR5lkICeFfkFnwz",
        ErrorStylesBackground: "_3fVv6M5HyJXcQ6kNF1SvoH",
        ErrorFloatBelow: "_2aKylEXoZKcXuXfFcmcuQc",
        WarningStyles: "_3gxgE6PMPecWZDBSlGjMX_",
        WarningStylesWithIcon: "_1S_uSkD_E5ayHa48JzzE0E",
        WarningIconLayout: "_2jM80ZtA-oI5okavBZZqnF",
        WarningStylesBackground: "UYrHsewdjj7dSkpWGgikw",
        Stuck: "_2b5wWgFg1yvry3TDzRUfFt",
        WarningFloatBelow: "_3e0cNuLANduciMmeZz1dnk",
        InfoStyles: "_2lreMbIjEILzP1Eomy1QZM",
        InfoStylesWithIcon: "_1_-PibdcIVQzDZEP0_PeLV",
        InfoIconLayout: "_3kyPzolDIjhIh7zW0wA6fy",
        InfoStylesBackground: "_3gNTI5UYknHdJwDfou9Iih",
        Padding: "_36hmaGtzxNb1Pql2UhfM5Z",
        NotTooWideModal: "UfQcb76CCbHawnpQ9tbu3",
        ImageManageDialog: "Pl7AIUjh5siFakQJbPFO9",
        SuccessErrorDialog: "_1wBO1L1tT0f1wtl3CpBWbn",
      };
    },
    37341: (e) => {
      e.exports = {
        CheckMark: "_2RwDkHMoOnosJANzYXpE",
        DialogCtn: "_1un0dZktOVEKH7zzpSTtoF",
        EquipCtn: "_1zUv_m9l3wknw_k_rwz0uy",
      };
    },
    11279: (e) => {
      e.exports = { ScrollSnapCarousel: "_1nUtBXgWizhgU1jv-8wVC7" };
    },
    86244: (e) => {
      e.exports = {
        Container: "_2vGr9KsApU0s59_ZsZVxXY",
        SmallAvatar: "_3V8w8CrYHVYB0voJ3gp87x",
        ShareDescription: "_3CqiH5i7kc5lXyEb0TGl2C",
        ShareLink: "_1WTiWXO3q8jMnJc_cPKJbE",
      };
    },
    19432: (e) => {
      e.exports = { BroadcastCtn: "_3HRa-mVPX65qnntN2DS0xc" };
    },
    41609: (e) => {
      e.exports = {
        WhitelistNumber: "IY3dF3eWXX1OmE8oYcQKp",
        WhitelistCtn: "_1UhmxrINvvaNnHzhCPoill",
        WhitelistRow: "_28TC1EYm0jlWPjyk89xXCL",
        Grabbable: "riuelIz655g_IBddWfLQ-",
        Grabbing: "_1vSZ5gJndAOamRhVGni8HG",
        DisabledGrab: "_2K0C_m1AZvB6yeNaEXXjDD",
        WhitelistAvatar: "_3DGjmH9KW9BAXsEYwH1WpE",
        ButtonCtn: "_1hSqlvDTyj9P6eWTHXutUt",
        DragElementStart: "_1LQ1GCTblYDL8enZ2mBhTD",
        DragHighlightContainer: "_2jRMC5JVSK6dsktYus9Gjf",
        DragHighlight: "Y9ryg1Npznt3dpkr7BGp1",
      };
    },
    77700: (e) => {
      e.exports = {
        "duration-app-launch": "800ms",
        mentionDialogPosition: "_3isL0ZmZcmPqrXDdNiNSsm",
        mentionDialog: "_1QU3cLCGXCmYTUvjYiqqz6",
        mentionSearchText: "_1xVcZo7UqD1Idiz3hcGoHg",
        suggestOption: "vquL9mspYzz2tBtxrzqw9",
        mentionSearchOption: "_3O0sMruBIaruOmKJLJre-J",
        manyMatches: "_1cweL4uxVeoeKoymO9IuaT",
        selected: "boNOGnexLhWO9Nd0e6-0A",
        nickname: "_2dKJqMZUnKQIInZReBkcRI",
        mentionSearchMatch: "_2_0t_pDYqkDefMC0gDZV8G",
      };
    },
    50666: (e) => {
      e.exports = {
        CropImage: "_3qfqTaQ35U6AO3FNeijcFV",
        CropPreviewGroup: "_1RI-QM2ZjK9MaVjeCLE_LF",
        CropPreviewLabel: "_3_zyLDUyxZNyexfX3kNOPv",
      };
    },
    70995: (e, t, a) => {
      "use strict";
      a.d(t, { Lg: () => c, XU: () => p });
      const n = 20,
        r = /^.*youtube[^v]+v=(.{11}).*/,
        i = /^.*youtu\.be\/(.{11}).*/,
        o = /^.*youtube.*\/embed\/(.{11}).*/,
        s = /^.*[?&]t=([^&]+)(?:&|$)/,
        l = /^(?:(?:([\d]+)h)?(?:([\d]+)m)?(?:([\d]+)s)?|([\d]+))$/;
      function c(e) {
        return !!m(e);
      }
      function m(e) {
        const t = e?.length < n ? void 0 : r.exec(e) || i.exec(e) || o.exec(e);
        return t?.[1];
      }
      function p(e) {
        const t = m(e);
        if (!t) return;
        const a = (function (e) {
            const t = s.exec(e);
            return t?.[1];
          })(e),
          n = a
            ? (function (e) {
                const t = l.exec(e);
                if (!(t?.[1] || t?.[2] || t?.[3] || t?.[4])) return;
                if (t?.[4]) return parseInt(t?.[4]);
                let a = 0;
                return (
                  t?.[1] && (a += 3600 * parseInt(t[1])),
                  t?.[2] && (a += 60 * parseInt(t[2])),
                  t?.[3] && (a += parseInt(t[3])),
                  a
                );
              })(a)
            : void 0;
        return { strVideoID: t, nStartSeconds: n };
      }
    },
    75933: (e, t, a) => {
      "use strict";
      a.d(t, {
        $m: () => i,
        Sn: () => d,
        Wn: () => l,
        ZI: () => h,
        a4: () => m,
        f_: () => p,
        jD: () => o,
        jn: () => u,
        mj: () => s,
        rp: () => c,
      });
      var n = a(77516),
        r = a(90626);
      const i = "0px 0px 100% 0px",
        o = "tab",
        s = "SaleSection_",
        l = 940;
      function c() {
        return window.innerWidth >= l;
      }
      function m(e = l) {
        return (
          (function () {
            const [e, t] = (0, r.useState)(window.innerWidth);
            return (
              (0, r.useEffect)(() => {
                const e = () => {
                  t(window.innerWidth);
                };
                return (
                  window.addEventListener("resize", e),
                  () => window.removeEventListener("resize", e)
                );
              }, []),
              e
            );
          })() >= e
        );
      }
      function p(e) {
        const t = m(l),
          a = (0, n._B)(e);
        return t
          ? { nMaxCapsulesPerRow: a.nMaxItemsPerRow, bScreenIsWide: t }
          : {
              nMaxCapsulesPerRow: Math.min(
                Math.max(
                  Math.floor(window.innerWidth / a.nItemMinimumWidth),
                  1,
                ),
                a.nMaxItemsPerRow,
              ),
              bScreenIsWide: t,
            };
      }
      function d(e) {
        const t = (0, n._B)(e);
        return c()
          ? t.nMaxItemsPerRow
          : Math.min(
              Math.max(Math.floor(window.innerWidth / t.nItemMinimumWidth), 1),
              t.nMaxItemsPerRow,
            );
      }
      function u(e) {
        switch (e) {
          case 32:
            return 28;
          case 34:
            return 55;
          case 45:
            return 57;
          case 2:
            return 59;
          default:
            return;
        }
      }
      function h(e) {
        switch (e) {
          case 28:
            return 32;
          case 55:
            return 34;
          case 57:
            return 45;
          default:
            return;
        }
      }
    },
    63556: (e, t, a) => {
      "use strict";
      a.d(t, { E: () => d, O: () => p });
      var n = a(34629),
        r = a(14947),
        i = a(65946),
        o = a(22837),
        s = a(62490),
        l = a(6419),
        c = a(78327),
        m = a(91986);
      class p {
        m_eCurLang = (0, o.sf)(c.TS.LANGUAGE);
        m_rgHasData = (0, s.$Y)([], 31, !1);
        m_bHasLocalizationContext = !1;
        m_callback = new m.l();
        GetCallback() {
          return this.m_callback;
        }
        GetCurEditLanguage() {
          return this.m_eCurLang;
        }
        SetCurEditLanguage(e) {
          return (
            this.m_eCurLang != e &&
            ((this.m_eCurLang = e), this.GetCallback().Dispatch(e), !0)
          );
        }
        SetHasLanguage(e) {
          e.forEach((e, t) => {
            this.m_rgHasData[t] != e && (this.m_rgHasData[t] = e);
          });
        }
        BHasLanguageData(e) {
          return this.m_rgHasData[e];
        }
        GetHasLocalizationContext() {
          return this.m_bHasLocalizationContext;
        }
        SetHasLocalizationContext(e) {
          e != this.m_bHasLocalizationContext &&
            (this.m_bHasLocalizationContext = e);
        }
        static s_globalSingletonStore;
        static Get() {
          return (
            p.s_globalSingletonStore ||
              ((p.s_globalSingletonStore = new p()),
              "dev" == c.TS.WEB_UNIVERSE &&
                (window.DUS = p.s_globalSingletonStore)),
            p.s_globalSingletonStore
          );
        }
        constructor() {
          (0, r.Gn)(this);
        }
      }
      function d() {
        return (0, i.q3)(() => p.Get().GetCurEditLanguage());
      }
      (0, n.Cg)([r.sH], p.prototype, "m_eCurLang", void 0),
        (0, n.Cg)([r.sH], p.prototype, "m_rgHasData", void 0),
        (0, n.Cg)([r.sH], p.prototype, "m_bHasLocalizationContext", void 0),
        (0, n.Cg)([l.o], p.prototype, "GetCurEditLanguage", null),
        (0, n.Cg)([l.o], p.prototype, "SetCurEditLanguage", null),
        (0, n.Cg)([r.XI.bound], p.prototype, "SetHasLanguage", null),
        (0, n.Cg)([l.o], p.prototype, "BHasLanguageData", null);
    },
    83059: (e, t, a) => {
      "use strict";
      a.d(t, { $: () => h, w: () => u });
      var n = a(90626),
        r = a(56545),
        i = a(72034),
        o = a(83935),
        s = a(44332),
        l = a(68797),
        c = a(6144),
        m = a(73745),
        p = a(78327);
      class d {
        m_mapDefIDtoDefinition = new Map();
        m_mapDefIDToPromise = new Map();
        m_defChangeCallback = new Map();
        m_mapCategoryAndClassToItems = new Map();
        m_mapCategoryAndClassToPromise = new Map();
        m_defCategoryAndClassToChangeCallback = new Map();
        m_SteamInterface = null;
        GetItem(e) {
          return this.m_mapDefIDtoDefinition.get(e);
        }
        GetItemChangeCallback(e) {
          return (
            this.m_defChangeCallback.has(e) ||
              this.m_defChangeCallback.set(e, new c.lu()),
            this.m_defChangeCallback.get(e)
          );
        }
        GetKeyCategoryAndClass(e, t) {
          return e + "_" + t;
        }
        GetItemsByCategoryAndClass(e, t) {
          const a = this.GetKeyCategoryAndClass(e, t);
          return this.m_mapCategoryAndClassToItems.get(a);
        }
        GetItemsByCategoryAndClassCallback(e, t) {
          const a = this.GetKeyCategoryAndClass(e, t);
          return (
            this.m_defCategoryAndClassToChangeCallback.has(a) ||
              this.m_defCategoryAndClassToChangeCallback.set(a, new c.lu()),
            this.m_defCategoryAndClassToChangeCallback.get(a)
          );
        }
        async LoadRewardDefinition(e) {
          return (
            this.m_mapDefIDToPromise.has(e) ||
              this.m_mapDefIDToPromise.set(
                e,
                this.InternalLoadRewardDefinition(e),
              ),
            this.m_mapDefIDToPromise.get(e)
          );
        }
        async InternalLoadRewardDefinition(e) {
          if (this.m_mapDefIDtoDefinition.has(e))
            return this.m_mapDefIDtoDefinition.get(e);
          const t = r.w.Init(o.GB);
          t.Body().set_definitionids([e]);
          let a = null;
          try {
            const n = await o.a9.QueryRewardItems(
              this.m_SteamInterface.GetServiceTransport(),
              t,
            );
            if (1 == n.GetEResult() && n.Body().definitions()?.length > 0) {
              (0, s.w)(
                1 == n.Body().definitions()?.length,
                `Requested definition ID ${e} and receive # ${n.Body().definitions()?.length}, expecting exactly one.`,
              );
              const t = n.Body().definitions()[0].toObject();
              return (
                this.m_mapDefIDtoDefinition.set(e, t),
                this.GetItemChangeCallback(e).Dispatch(t),
                t
              );
            }
            a = (0, l.H)(n);
          } catch (e) {
            a = (0, l.H)(e);
          }
          return (
            console.error(
              "CLoyaltyRewardDefinitionStore.LoadRewardDefinition failed: " +
                a?.strErrorMsg,
              a,
            ),
            null
          );
        }
        async LoadRewardDefinitionByCategoryAndClass(e, t) {
          const a = this.GetKeyCategoryAndClass(e, t);
          return (
            this.m_mapCategoryAndClassToPromise.has(a) ||
              this.m_mapCategoryAndClassToPromise.set(
                a,
                this.InternalLoadRewardDefinitionByCategoryAndClass(e, t),
              ),
            this.m_mapCategoryAndClassToPromise.get(a)
          );
        }
        async InternalLoadRewardDefinitionByCategoryAndClass(e, t) {
          const a = this.GetKeyCategoryAndClass(e, t);
          if (this.m_mapCategoryAndClassToItems.has(a))
            return this.m_mapCategoryAndClassToItems.get(a);
          const n = r.w.Init(o.GB);
          n.Body().set_community_item_classes([t]),
            n.Body().set_filter_match_any_category_tags([e]);
          let i = null;
          try {
            const r = await o.a9.QueryRewardItems(
              this.m_SteamInterface.GetServiceTransport(),
              n,
            );
            if (1 == r.GetEResult() && r.Body().definitions()?.length > 0) {
              const n = r
                .Body()
                .definitions()
                .map((e) => e.toObject());
              return (
                n.forEach((e) => {
                  this.m_mapDefIDtoDefinition.has(e.defid) ||
                    (this.m_mapDefIDtoDefinition.set(e.defid, e),
                    this.GetItemChangeCallback(e.defid).Dispatch(e));
                }),
                this.m_mapCategoryAndClassToItems.set(a, n),
                this.GetItemsByCategoryAndClassCallback(e, t).Dispatch(n),
                ("dev" != p.TS.WEB_UNIVERSE && "beta" != p.TS.WEB_UNIVERSE) ||
                  console.log(
                    "CLoyaltyRewardDefinitionStore.LoadRewardDefinitionByCategoryAndClass loaded " +
                      n.length,
                  ),
                n
              );
            }
            i = (0, l.H)(r);
          } catch (e) {
            i = (0, l.H)(e);
          }
          return (
            console.error(
              "CLoyaltyRewardDefinitionStore.LoadRewardDefinitionByCategoryAndClass failed: " +
                i?.strErrorMsg,
              i,
            ),
            null
          );
        }
        static s_Singleton;
        static Get() {
          return (
            d.s_Singleton ||
              ((d.s_Singleton = new d()),
              d.s_Singleton.Init(),
              "dev" == p.TS.WEB_UNIVERSE &&
                (window.g_LoyaltyRewardDefinitionStore = d.s_Singleton)),
            d.s_Singleton
          );
        }
        constructor() {}
        Init() {
          this.m_SteamInterface = new i.D(p.TS.WEBAPI_BASE_URL);
        }
      }
      function u(e) {
        const [t, a] = (0, n.useState)(d.Get().GetItem(e));
        return (
          (0, n.useEffect)(() => {
            t || d.Get().LoadRewardDefinition(e);
          }, [e, t]),
          (0, m.hL)(d.Get().GetItemChangeCallback(e), a),
          t
        );
      }
      function h(e, t) {
        const [a, r] = (0, n.useState)(
          d.Get().GetItemsByCategoryAndClass(e, t),
        );
        return (
          (0, n.useEffect)(() => {
            a || d.Get().LoadRewardDefinitionByCategoryAndClass(e, t).then(r);
          }, [e, t, a]),
          (0, m.hL)(d.Get().GetItemsByCategoryAndClassCallback(e, t), r),
          a
        );
      }
    },
    36735: (e, t, a) => {
      "use strict";
      a.d(t, { fw: () => h, l5: () => _, p1: () => g });
      var n = a(34629),
        r = a(90626),
        i = a(56545),
        o = a(72034),
        s = a(58222),
        l = a(44332),
        c = a(68797),
        m = a(6144),
        p = a(73745),
        d = a(78327);
      class u {
        m_mapInventoryByApp = new Map();
        m_mapPromises = new Map();
        m_listChangeCallback = new Map();
        m_SteamInterface = null;
        GetInventoryForApp(e) {
          return this.m_mapInventoryByApp.get(e);
        }
        GetItemDefsChangeForAppID(e) {
          return (
            this.m_listChangeCallback.has(e) ||
              this.m_listChangeCallback.set(e, new m.lu()),
            this.m_listChangeCallback.get(e)
          );
        }
        BHasLoadedDef(e) {
          return this.m_mapPromises.has(e);
        }
        SetTestAppCommunityItems(e, t) {
          this.m_mapInventoryByApp.set(e, t),
            this.GetItemDefsChangeForAppID(e).Dispatch(t),
            this.m_mapPromises.set(e, Promise.resolve(1));
        }
        async LoadCommunityInventory(e) {
          return e
            ? (this.m_mapPromises.has(e) ||
                this.m_mapPromises.set(
                  e,
                  this.InternalLoadCommunityInventory(e),
                ),
              this.m_mapPromises.get(e))
            : 2;
        }
        async InternalLoadCommunityInventory(e) {
          const t = i.w.Init(s.cU);
          t.Body().set_filter_appids([e]);
          let a = null;
          try {
            const n = await s.uy.GetCommunityInventory(
              this.m_SteamInterface.GetServiceTransport(),
              t,
            );
            if (1 == n.GetEResult()) {
              const t = new Array();
              return (
                n
                  .Body()
                  .items()
                  .forEach((e) => t.push(e.toObject())),
                this.m_mapInventoryByApp.set(e, t),
                this.GetItemDefsChangeForAppID(e).Dispatch(t),
                1
              );
            }
            a = (0, c.H)(n);
          } catch (e) {
            a = (0, c.H)(e);
          }
          return (
            console.error(
              "CQuestCommunityInventoryStore.InternalLoadCommunityInventory failed: on appid " +
                e +
                " error: " +
                a?.strErrorMsg,
              a,
            ),
            2
          );
        }
        static s_Singleton;
        static Get() {
          return (
            u.s_Singleton ||
              ((u.s_Singleton = new u()),
              u.s_Singleton.Init(),
              "dev" == d.TS.WEB_UNIVERSE &&
                (window.g_QuestCommunityInventoryStore = u.s_Singleton)),
            u.s_Singleton
          );
        }
        constructor() {}
        Init() {
          const e = (0, d.Tc)("read_inventory_token", "application_config");
          (0, l.w)(
            e,
            "CQuestCommunityInventoryStore: missing read_inventory:steam oauth permission",
          ),
            (this.m_SteamInterface = new o.D(d.TS.WEBAPI_BASE_URL, e));
        }
      }
      function h(e) {
        const [t, a] = (0, r.useState)(u.Get().GetInventoryForApp(e));
        return (
          (0, r.useEffect)(() => {
            e && !u.Get().BHasLoadedDef(e) && u.Get().LoadCommunityInventory(e);
          }, [e]),
          (0, p.hL)(u.Get().GetItemDefsChangeForAppID(e), a),
          t
        );
      }
      function g(e, t) {
        const a = h(e),
          [n, i] = (0, r.useState)(null),
          [o, s] = (0, r.useState)(!1);
        return (
          (0, r.useEffect)(() => {
            if (e && a) {
              const r = a.find((a) => a.appid == e && a.item_type == t);
              n != r && i(r), s(!0);
            }
          }, [e, t, a, n]),
          { communityItem: n, bLoaded: o }
        );
      }
      function _(e, t) {
        u.Get().SetTestAppCommunityItems(e, t);
      }
      (0, n.Cg)([p.oI], u.prototype, "SetTestAppCommunityItems", null);
    },
    93973: (e, t, a) => {
      "use strict";
      a.d(t, {
        CC: () => f,
        Oz: () => C,
        Qt: () => v,
        lu: () => E,
        ns: () => I,
        os: () => y,
      });
      var n = a(34629),
        r = a(56545),
        i = a(72034),
        o = a(17645),
        s = a(44332),
        l = a(78327),
        c = a(90626),
        m = a(68797),
        p = a(6144),
        d = a(73745),
        u = a(14947),
        h = a(58222),
        g = a(23809),
        _ = a(20194);
      class S {
        m_claimState = { bCanClaimNewItem: !1, bAlreadyClaimedCurrentItem: !1 };
        m_claimedFreeItemDef;
        m_rtNextClaimTime;
        m_claimTimer;
        m_SteamInterface = null;
        m_canClaimPromise = null;
        m_claimPromise = null;
        m_claimStateChangeCallback = new p.lu();
        m_testNextClaimFakeResponse = null;
        m_bInTestMode = !1;
        GetClaimItemState() {
          return this.m_claimState;
        }
        GetClaimStateChangeCallback() {
          return this.m_claimStateChangeCallback;
        }
        GetClaimedSaleRewardItemDef() {
          return this.m_claimedFreeItemDef;
        }
        GetNextClaimTime() {
          if (!this.m_rtNextClaimTime) return null;
          return new Date(1e3 * this.m_rtNextClaimTime);
        }
        TEST_OverrideClaimState(e) {
          (this.m_bInTestMode = !0),
            (this.m_canClaimPromise = null),
            (this.m_claimPromise = null),
            e.bCanClaimNewItem
              ? (this.m_testNextClaimFakeResponse = {
                  bAlreadyClaimedCurrentItem: !0,
                  bCanClaimNewItem: !1,
                  rtNextClaimTime: Math.floor(Date.now() / 1e3) + 3600,
                  appid: 2243810,
                  community_item_type: 2,
                  community_item_class: 11,
                })
              : (this.m_testNextClaimFakeResponse = null),
            (this.m_claimState = e),
            this.GetClaimStateChangeCallback().Dispatch(this.m_claimState);
        }
        async ActivateProfileModifier(e) {
          const t = r.w.Init(h.fp);
          t.Body().set_communityitemid(e.communityitemid),
            t.Body().set_appid(e.appid),
            t.Body().set_activate(!0);
          const a = await h.uy.ActivateProfileModifierItem(
            this.m_SteamInterface.GetServiceTransport(),
            t,
          );
          return (
            1 != a.GetEResult() &&
              console.error(
                `Error when calling QuestService.ActivateProfileModifierItem: EResult=${a.GetEResult()}`,
              ),
            a.GetEResult()
          );
        }
        async LoadCanUserClaimItem() {
          return this.m_bInTestMode
            ? this.m_claimState
            : (this.m_canClaimPromise ||
                (this.m_canClaimPromise = this.InternalLoadCanUserClaimItem()),
              this.m_canClaimPromise);
        }
        async InternalLoadCanUserClaimItem() {
          (0, s.w)(
            l.iA.logged_in,
            "User must be logged to use CSaleItemClaimableRewardsStore",
          );
          const e = r.w.Init(o.c3);
          e.Body().set_language(l.TS.LANGUAGE);
          let t = null;
          try {
            const a = await o.Qm.CanClaimItem(
              this.m_SteamInterface.GetServiceTransport(),
              e,
            );
            if (1 == a.GetEResult())
              return (
                (this.m_claimedFreeItemDef = Boolean(
                  a.Body().reward_item()?.defid(),
                )
                  ? a.Body().reward_item().toObject()
                  : null),
                (this.m_claimState = {
                  bCanClaimNewItem: a.Body().can_claim(),
                  bAlreadyClaimedCurrentItem: Boolean(
                    this.m_claimedFreeItemDef,
                  ),
                  appid: this.m_claimedFreeItemDef?.appid,
                  community_item_type:
                    this.m_claimedFreeItemDef?.community_item_type,
                  community_item_class:
                    this.m_claimedFreeItemDef?.community_item_class,
                  rtNextClaimTime:
                    a.Body().next_claim_time() > 0
                      ? a.Body().next_claim_time()
                      : void 0,
                }),
                (this.m_rtNextClaimTime = a.Body().next_claim_time()),
                this.SetClaimTimer(),
                this.GetClaimStateChangeCallback().Dispatch(this.m_claimState),
                this.m_claimState
              );
            t = (0, m.H)(a);
          } catch (e) {
            t = (0, m.H)(e);
          }
          return (
            console.error(
              "CSaleItemClaimableRewardsStore.InternalLoadCanUserClaimItem failed: error: " +
                t?.strErrorMsg,
              t,
            ),
            { bCanClaimNewItem: !1, bAlreadyClaimedCurrentItem: !1 }
          );
        }
        async UserClaimItem() {
          return (
            this.m_testNextClaimFakeResponse &&
              (console.log(
                "CSaleItemClaimableRewardsStore - testing, pretending claim action succeeded",
                (0, u.HO)(this.m_testNextClaimFakeResponse),
              ),
              (this.m_claimState = this.m_testNextClaimFakeResponse),
              this.GetClaimStateChangeCallback().Dispatch(this.m_claimState),
              (this.m_rtNextClaimTime = this.m_claimState.rtNextClaimTime),
              this.SetClaimTimer(),
              (this.m_testNextClaimFakeResponse = null)),
            this.m_bInTestMode
              ? this.m_claimState
              : (this.m_claimPromise ||
                  (this.m_claimPromise = this.InternalUserClaimItem()),
                this.m_claimPromise)
          );
        }
        async InternalUserClaimItem() {
          (0, s.w)(
            l.iA.logged_in,
            "User must be logged to use CSaleItemClaimableRewardsStore",
          ),
            (0, s.w)(
              this.m_claimState.bCanClaimNewItem,
              "Only should be called when we previously verified you can claim something. ",
            );
          const e = r.w.Init(o.wt);
          e.Body().set_language(l.TS.LANGUAGE);
          let t = null;
          try {
            const a = await o.Qm.ClaimItem(
              this.m_SteamInterface.GetServiceTransport(),
              e,
            );
            if (1 == a.GetEResult())
              return (
                (this.m_claimedFreeItemDef = a.Body().reward_item().toObject()),
                (this.m_claimState = {
                  bCanClaimNewItem: !1,
                  bAlreadyClaimedCurrentItem: Boolean(
                    this.m_claimedFreeItemDef,
                  ),
                  appid: this.m_claimedFreeItemDef.appid,
                  community_item_type:
                    this.m_claimedFreeItemDef.community_item_type,
                  community_item_class:
                    this.m_claimedFreeItemDef.community_item_class,
                  rtNextClaimTime:
                    a.Body().next_claim_time() > 0
                      ? a.Body().next_claim_time()
                      : void 0,
                }),
                this.GetClaimStateChangeCallback().Dispatch(this.m_claimState),
                (this.m_rtNextClaimTime = a.Body().next_claim_time()),
                this.SetClaimTimer(),
                this.m_claimState
              );
            if (29 == a.GetEResult())
              return (
                (this.m_canClaimPromise = this.InternalLoadCanUserClaimItem()),
                this.m_canClaimPromise
              );
            t = (0, m.H)(a);
          } catch (e) {
            t = (0, m.H)(e);
          }
          return (
            console.error(
              "CSaleItemClaimableRewardsStore.InternalUserClaimItem failed: error: " +
                t?.strErrorMsg,
              t,
            ),
            { bCanClaimNewItem: !1, bAlreadyClaimedCurrentItem: !1 }
          );
        }
        SetClaimTimer() {
          if (this.m_claimTimer) return;
          if (!this.m_rtNextClaimTime) return;
          const e = Date.now();
          let t = new Date(1e3 * this.m_rtNextClaimTime);
          const a = Math.max(0, Math.min(1, t.getTime() - e));
          this.m_claimTimer = window.setTimeout(
            () => {
              (this.m_claimTimer = void 0),
                Date.now() > t.getTime()
                  ? ((this.m_canClaimPromise = null),
                    (this.m_claimPromise = null),
                    (this.m_claimedFreeItemDef = null),
                    (this.m_claimState = {
                      bCanClaimNewItem: !0,
                      bAlreadyClaimedCurrentItem: !1,
                      rtNextClaimTime: void 0,
                    }),
                    this.GetClaimStateChangeCallback().Dispatch(
                      this.m_claimState,
                    ))
                  : this.SetClaimTimer();
            },
            a > 3e5 ? a / 2 : a,
          );
        }
        static s_Singleton;
        static Get() {
          return (
            S.s_Singleton ||
              ((S.s_Singleton = new S()),
              S.s_Singleton.Init(),
              "dev" == l.TS.WEB_UNIVERSE &&
                (window.g_SaleItemClaimableRewardsStore = S.s_Singleton)),
            S.s_Singleton
          );
        }
        constructor() {}
        Init() {
          const e = (0, l.Tc)("loyalty_webapi_token", "application_config");
          (0, s.w)(
            e,
            "CQuestCommunityInventoryStore: missing loyalty_webapi_token oauth permission",
          ),
            (this.m_SteamInterface = new i.D(l.TS.WEBAPI_BASE_URL, e));
        }
      }
      function C() {
        const [e, t] = (0, c.useState)(S.Get().GetClaimItemState()),
          [a, n] = (0, c.useState)(!0);
        return (
          (0, c.useEffect)(() => {
            S.Get()
              .LoadCanUserClaimItem()
              .then(t)
              .finally(() => n(!1));
          }, []),
          (0, d.hL)(S.Get().GetClaimStateChangeCallback(), t),
          { ...e, bLoading: a }
        );
      }
      function f() {
        return { fnClaimItem: S.Get().UserClaimItem };
      }
      function E() {
        return { fnSetClaimState: S.Get().TEST_OverrideClaimState };
      }
      async function I(e) {
        return S.Get().ActivateProfileModifier(e);
      }
      function v(e, t, a) {
        const n = (0, g.KV)();
        return (0, _.I)({
          queryKey: [`SaleRewardsGetDefinition_${e}_${t}_${a}`],
          queryFn: async () =>
            (async function (e, t, a, n) {
              const i = r.w.Init(o.R4);
              return (
                i.Body().set_sale_def_type(t),
                i.Body().set_language(a),
                i.Body().set_include_community_item_def(n),
                (await o.Qm.GetCurrentDefinition(e, i)).Body().toObject()
              );
            })(n, e, t, a),
          staleTime: 1 / 0,
        });
      }
      function y(e, t, a, n) {
        const i = (0, g.KV)();
        return (0, _.I)({
          queryKey: [`GetClaimedSaleRewards_${e}_${t}_${a}_${n}`],
          queryFn: async () =>
            (async function (e, t, a, n) {
              const i = r.w.Init(o.Ju);
              return (
                i.Body().set_sale_def_type(t),
                i.Body().set_language(a),
                i.Body().set_include_community_item_def(n),
                (await o.Qm.GetClaimedSaleRewards(e, i)).Body().toObject()
              );
            })(i, e, t, a),
          staleTime: 1 / 0,
        });
      }
      (0, n.Cg)([d.oI], S.prototype, "TEST_OverrideClaimState", null),
        (0, n.Cg)([d.oI], S.prototype, "UserClaimItem", null);
    },
    43568: (e, t, a) => {
      "use strict";
      a.d(t, { F: () => C });
      var n = a(65731),
        r = a(90626),
        i = a(76217),
        o = a(12155),
        s = a(52038),
        l = a(30143),
        c = a(47444),
        m = a(96236),
        p = a(60383),
        d = a(78327),
        u = a(11279);
      function h(e) {
        const { padded: t, gap: a, children: n, bLazyRenderChildren: i } = e,
          o = r.createElement(
            "div",
            {
              style: { gap: a ? a + "px" : "unset" },
              className: (0, s.A)({
                [u.ScrollSnapCarousel]: !0,
                ScrollSnapCarousel: !0,
                SaleSectionCarousel: !0,
                SaleSectionCarouselPadding: t,
                [e.className]: !0,
              }),
            },
            n,
          );
        return i
          ? r.createElement(
              m.K,
              { bHorizontal: !1, placeholderWidth: 1, placeholderHeight: 1 },
              o,
            )
          : o;
      }
      var g = a(7445);
      class _ extends r.Component {
        render() {
          const { showArrows: e, arrowFill: t } = this.props,
            a = this.props.visibleSlides,
            i = this.props.totalSlides,
            l = this.props.currentSlide;
          if (a >= i) return null;
          const m = (100 * l) / i,
            p = 100 * (1 - Math.min(l + a, i) / i),
            d = m + (50 * a) / i,
            u = 100 - d;
          return r.createElement(
            "div",
            { className: c.pipScrollerContainer },
            e &&
              r.createElement(
                n._X,
                {
                  className: (0, s.A)(
                    c.pipScrollButton,
                    c.left,
                    c.carouselNavButton,
                  ),
                },
                r.createElement(o.uMb, { fill: t || "white" }),
              ),
            r.createElement(
              "div",
              { className: c.pipScroller },
              r.createElement("div", { className: c.scrollBackground }),
              r.createElement("div", {
                className: c.scrollForeground,
                style: { left: m + "%", right: p + "%" },
              }),
              r.createElement(
                "div",
                {
                  className: c.scrollNavDiv,
                  style: { left: "0%", width: d + "%" },
                },
                r.createElement(
                  n._X,
                  {
                    className: (0, s.A)(c.carouselNavButton, c.scrollNavButton),
                    style: { color: "red" },
                  },
                  r.createElement("div", null),
                ),
              ),
              r.createElement(
                "div",
                {
                  className: c.scrollNavDiv,
                  style: { right: "0%", width: u + "%" },
                },
                r.createElement(
                  n.CC,
                  {
                    className: (0, s.A)(c.carouselNavButton, c.scrollNavButton),
                  },
                  r.createElement("div", null),
                ),
              ),
            ),
            e &&
              r.createElement(
                n.CC,
                {
                  className: (0, s.A)(
                    c.pipScrollButton,
                    c.right,
                    c.carouselNavButton,
                  ),
                },
                r.createElement(o.uMb, { fill: t || "white" }),
              ),
          );
        }
      }
      const S = (0, n.Yw)(_, (e) => ({
        currentSlide: e.currentSlide,
        totalSlides: e.totalSlides,
        visibleSlides: e.visibleSlides,
      }));
      function C(e) {
        const t = (0, d.Qn)();
        return (!e.screenIsWide && !t) || e.bForceSimpleCarousel
          ? r.createElement(h, { ...e }, e.children)
          : r.createElement(f, { ...e }, e.children);
      }
      function f(e) {
        const t = (0, d.Qn)(),
          a = () => r.Children.count(e.children),
          o = a(),
          p = Math.min(a(), e.visibleElements);
        if (!o || !p) return null;
        const u = p < o,
          h = e.hideArrows || !u,
          g = !u || e.hidePips;
        let _ = 4 / 3,
          C = !0;
        e.slideAspectRatio && ((_ = e.slideAspectRatio), (C = !1));
        const f = `items_in_row_${e.visibleElements}`;
        return r.createElement(
          i.Z,
          {
            "flow-children": "row",
            className: (0, s.A)(c.carouselBody, e.className, f),
            navKey: e.navKey,
          },
          r.createElement(
            n.gi,
            {
              visibleSlides: e.visibleElements,
              totalSlides: a(),
              naturalSlideWidth: 100 * _,
              naturalSlideHeight: 100,
              step: e.visibleElements,
              infinite: !e.disableEdgeWrap,
              isIntrinsicHeight: C,
              dragEnabled: !1,
              touchEnabled: !1,
              lockOnWindowScroll: !0,
              orientation: "horizontal",
              disableKeyboard: !0,
            },
            r.createElement(
              I,
              {
                bHideArrows: h,
                bAutoAdvance: e.bAutoAdvance && !t,
                onSlide: e.onSlide,
                arrowFill: e.arrowFill,
              },
              r.Children.map(e.children, (t, a) => {
                const i = e.bLazyRenderChildren
                  ? r.createElement(
                      m.K,
                      {
                        rootMargin: "0px -5px 0px 100%",
                        bHorizontal: !0,
                        placeholderWidth: 1,
                        placeholderHeight: 1,
                      },
                      t,
                    )
                  : t;
                return r.createElement(
                  n.q7,
                  { className: c.innerSlide, key: "slide_" + a, index: a },
                  i,
                );
              }),
            ),
            !g &&
              (e.useTestScrollbar
                ? r.createElement(S, { showArrows: h, carouselStore: null })
                : r.createElement(
                    "div",
                    { className: c.breadcrumbContainer },
                    ((t) =>
                      r.Children.map(e.children, (e, a) =>
                        a % t != 0
                          ? null
                          : r.createElement(
                              n.cL,
                              { slide: a, className: c.pip },
                              r.createElement("img", { src: l.A }),
                            ),
                      ))(p),
                  )),
          ),
        );
      }
      function E(e) {
        e && (window.clearTimeout(e.current), (e.current = null));
      }
      function I(e) {
        const {
            bHideArrows: t,
            bAutoAdvance: a,
            children: i,
            onSlide: l,
            arrowFill: m,
          } = e,
          d = r.useContext(n.Yc),
          u = r.useRef(d.state.currentSlide),
          [h, _] = r.useState(null),
          [S, C] = r.useState(!!a),
          f = r.useRef(null),
          I = r.useRef(null);
        r.useEffect(() => {
          const e = () => {
            f.current = window.setTimeout(() => {
              if (f.current) {
                E(f);
                let e = 0;
                d.state.currentSlide + d.state.visibleSlides <
                  d.state.totalSlides &&
                  (e = Math.min(
                    d.state.currentSlide + d.state.visibleSlides,
                    d.state.totalSlides - d.state.visibleSlides,
                  )),
                  d.setStoreState({ currentSlide: e });
              }
            }, 8e3);
          };
          S && e();
          const t = () => {
            const t = u.current,
              a = d.state.currentSlide;
            l && l(a), _(a > t ? "Right" : a < t ? "Left" : null), E(I);
            (I.current = window.setTimeout(() => {
              I.current && (_(null), E(I));
            }, 1e3)),
              (u.current = a),
              f.current ? (E(f), C(!1)) : S && e();
          };
          return (
            d.subscribe(t),
            () => {
              d.unsubscribe(t), E(f), E(I);
            }
          );
        }, [d, S]);
        const v = !!h && "CarouselSliding" + h;
        return r.createElement(
          "div",
          { className: (0, s.A)(c.sliderBody, "SliderBody", v) },
          !t &&
            r.createElement(
              n._X,
              {
                className: (0, s.A)(
                  c.carouselBtnCtn,
                  c.left,
                  c.carouselNavButton,
                  "CarouselBtnLeft",
                ),
              },
              r.createElement(o.uMb, { fill: m || "white" }),
            ),
          r.createElement(
            n.Ap,
            {
              className: p.J.GetScrollableClassname(),
              classNameTray: c.slideTrayCustomize,
              classNameAnimation: c.DisableSliderMotion,
            },
            r.createElement(g.q, null, i),
          ),
          !t &&
            r.createElement(
              n.CC,
              {
                className: (0, s.A)(
                  c.carouselBtnCtn,
                  c.right,
                  c.carouselNavButton,
                  "CarouselBtnRight",
                ),
              },
              r.createElement(o.uMb, { fill: m || "white" }),
            ),
        );
      }
    },
    71298: (e, t, a) => {
      "use strict";
      a.d(t, { Hh: () => c, vs: () => l });
      var n = a(90626),
        r = a(51706),
        i = a(56330),
        o = a(61859),
        s = a(22797);
      function l() {
        const [e, t] = (0, n.useState)(!1),
          [a, r] = (0, n.useState)(!1),
          [i, o] = (0, n.useState)(!1),
          [s, l] = (0, n.useState)(null),
          [c, m] = (0, n.useState)(null),
          [p, d] = (0, n.useState)(null),
          [u, h] = (0, n.useState)(null),
          [g, _] = (0, n.useState)(null);
        return {
          bLoading: e,
          bError: a,
          bSuccess: i,
          strError: s,
          strSuccess: c,
          elSuccess: u,
          elError: p,
          strThrobber: g,
          fnSetLoading: t,
          fnSetError: r,
          fnSetSuccess: o,
          fnSetStrError: l,
          fnSetStrSuccess: m,
          fnSetElSuccess: h,
          fnSetElError: d,
          fnSetThrobber: _,
        };
      }
      function c(e) {
        const {
            strDialogTitle: t,
            state: a,
            closeModal: l,
            strThrobber: c,
          } = e,
          {
            bLoading: m,
            bError: p,
            bSuccess: d,
            strError: u,
            strSuccess: h,
            elSuccess: g,
            elError: _,
            strThrobber: S,
          } = a;
        return p || u || _
          ? n.createElement(
              r.o0,
              {
                strTitle: t,
                bAlertDialog: !0,
                closeModal: l,
                className: i.SucessErrorDialog,
              },
              Boolean(u) &&
                n.createElement(
                  "div",
                  { className: i.ErrorStylesWithIcon },
                  u || (0, o.we)("#Error_ErrorCommunicatingWithNetwork"),
                ),
              Boolean(_) && _,
            )
          : d || h || g
            ? n.createElement(
                r.o0,
                {
                  strTitle: t,
                  strDescription: h || (0, o.we)("#EventDisplay_Share_Success"),
                  bAlertDialog: !0,
                  closeModal: l,
                  className: i.SucessErrorDialog,
                },
                n.createElement(n.Fragment, null, Boolean(g) && g),
              )
            : n.createElement(
                r.o0,
                {
                  strTitle: t,
                  className: i.SucessErrorDialog,
                  closeModal: () => {},
                },
                n.createElement(s.t, {
                  string: c || S || (0, o.we)("#Loading"),
                  size: "medium",
                  position: "center",
                }),
              );
      }
    },
    29347: (e, t, a) => {
      "use strict";
      a.d(t, { r: () => u, z: () => p });
      var n = a(90626),
        r = a(71138),
        i = a(33737),
        o = a(84811),
        s = a(51706),
        l = a(61859),
        c = a(22797),
        m = a(17618);
      const p = (e) => {
          const { clanSteamID: t, fnImageSelectCallBack: a } = e,
            [p, u] = (0, n.useState)(""),
            h = (0, r.mr)(e.clanSteamID.GetAccountID()),
            g = () => e.closeModal && e.closeModal(),
            _ = r.pU.GetFilteredClanImages(t, p),
            S = (e) => {
              a(e), g();
            };
          return n.createElement(
            o.tH,
            null,
            n.createElement(
              s.x_,
              { onEscKeypress: g },
              n.createElement(
                i.UC,
                null,
                n.createElement(
                  i.Y9,
                  null,
                  (0, l.we)("#ClanImageChooser_Title"),
                ),
                n.createElement(
                  i.nB,
                  null,
                  n.createElement(
                    i.a3,
                    null,
                    n.createElement(
                      "p",
                      null,
                      (0, l.we)("#ClanImageChooser_Desc"),
                    ),
                    n.createElement(i.pd, {
                      placeholder: (0, l.we)("#ClanImageChooser_Search"),
                      value: p,
                      onChange: (e) => u(e.currentTarget.value),
                    }),
                    n.createElement(
                      "div",
                      { className: m.ImagesOuterContainer },
                      h
                        ? n.createElement(c.t, {
                            size: "medium",
                            string: (0, l.we)("#Loading"),
                          })
                        : Boolean(_.length > 0)
                          ? _.map((e) =>
                              n.createElement(d, {
                                key: "ci" + e.image_hash,
                                clanImage: e,
                                searchStringHilight: p,
                                fnImageClick: S,
                              }),
                            )
                          : Boolean(0 == p.trim().length)
                            ? n.createElement(
                                "div",
                                null,
                                (0, l.we)("#ClanImageChooser_None"),
                              )
                            : n.createElement(
                                "div",
                                null,
                                (0, l.we)(
                                  "#EventCalendar_GameSearch_NoneFound",
                                ),
                              ),
                    ),
                  ),
                ),
                n.createElement(
                  i.wi,
                  null,
                  n.createElement(
                    i.$n,
                    { onClick: g },
                    (0, l.we)("#Button_Cancel"),
                  ),
                ),
              ),
            ),
          );
        },
        d = (e) => {
          const { clanImage: t, searchStringHilight: a, fnImageClick: r } = e;
          let i = t.file_name ? t.file_name : "",
            o = u(a, i, String(t.imageid), m.Hilight);
          return n.createElement(
            "div",
            { className: m.ImageContainer },
            n.createElement("div", {
              className: m.Image,
              style: { backgroundImage: `url( '${t.thumb_url}' )` },
              onDoubleClick: () => r(t),
            }),
            n.createElement("div", { className: m.ImageFilename, title: i }, o),
          );
        };
      function u(e, t, a, r) {
        let i = [];
        if (e.length > 0) {
          let o = t.toLocaleLowerCase();
          for (let s = 0; s < t.length; ) {
            let l = o.indexOf(e, s);
            if (l < 0) {
              i.push(
                n.createElement(
                  "span",
                  { key: a + "_" + String(s) },
                  t.substring(s),
                ),
              );
              break;
            }
            s < l &&
              i.push(
                n.createElement(
                  "span",
                  { key: a + "_" + String(s) },
                  t.substring(s, l),
                ),
              ),
              i.push(
                n.createElement(
                  "span",
                  { key: a + "_" + String(s), className: r },
                  t.substr(l, e.length),
                ),
              ),
              (s = l + e.length);
          }
        } else i.push(n.createElement("span", { key: a + "_null" }, t));
        return i;
      }
    },
    48628: (e, t, a) => {
      "use strict";
      a.d(t, { f: () => Ut });
      var n = a(34629),
        r = a(90626),
        i = a(99376),
        o = a(42780),
        s = a(59952),
        l = a(65739),
        c = a(31698),
        m = a(61336),
        p = a(6866),
        d = a(26205);
      class u extends o.K0 {
        m_LinkFilter = d.O;
        m_parentNode = void 0;
        m_mapHostToComponent;
        m_globalStoreLink;
        constructor(e, t, a, n) {
          super(e),
            (this.m_parentNode = t),
            (this.m_mapHostToComponent = a),
            (this.m_globalStoreLink = n);
        }
        AppendText(e, t = !1) {
          let a = e;
          if (
            t &&
            (null == this.m_parentNode || "img" != this.m_parentNode.tag)
          ) {
            let e = this.m_LinkFilter.exec(a);
            for (; e; ) {
              if (e.index > 0) {
                let a = e.input.substr(0, e.index);
                super.AppendText(a, t);
              }
              let n = e[0],
                r = !1;
              if (this.m_mapHostToComponent)
                for (let e = 0; e < this.m_mapHostToComponent.length; ++e)
                  if (this.m_mapHostToComponent[e].urlRegExp.exec(n)) {
                    (r = !0),
                      super.AppendNode(
                        this.m_mapHostToComponent[e].fnBBComponent(
                          n,
                          this.m_globalStoreLink,
                        ),
                      );
                    break;
                  }
              r || super.AppendNode((0, p.Pm)(n)),
                (a = e.input.substr(e.index + n.length)),
                (e = this.m_LinkFilter.exec(a));
            }
          }
          a.length > 0 && super.AppendText(a, t);
        }
      }
      class h extends o.K0 {
        m_EmoteRegex = new RegExp("[ː:]([a-zA-Z0-9_]+)[ː:]");
        AppendText(e, t = !1) {
          let a = e;
          if (e.length >= 3) {
            let e = this.m_EmoteRegex.exec(a);
            for (; e; ) {
              if (e.index > 0) {
                let a = e.input.substr(0, e.index);
                super.AppendText(a, t);
              }
              let n = e[1];
              super.AppendNode(
                r.createElement(
                  c.nl,
                  { emoticonHoverStore: l.s, emoticon: n },
                  [],
                ),
              ),
                (a = e.input.substr(e.index + n.length + 2)),
                (e = this.m_EmoteRegex.exec(a));
            }
          }
          a.length > 0 && super.AppendText(a, t);
        }
      }
      class g extends o.K0 {
        m_parentNode = void 0;
        constructor(e, t) {
          super(e), (this.m_parentNode = t);
        }
        AppendText(e, t = !1) {
          let a = e;
          this.m_parentNode &&
            "img" == this.m_parentNode.tag &&
            (a = (0, m.L$)(a)),
            super.AppendText(a, t);
        }
      }
      var _ = a(73745),
        S = a(70995),
        C = a(17720),
        f = a(88527),
        E = a(73662),
        I = a.n(E),
        v = a(13699),
        y = a(4434),
        w = a(68797),
        b = a(61859),
        T = a(78327);
      const D = (e) => /^\d+$/.test(e);
      function A(e) {
        const { sharedFileID: t } = e,
          a = (0, y.m)("SharedFileSnippet"),
          [n, i] = (0, r.useState)(!1),
          [o, s] = (0, r.useState)(() => ({
            sharedfileid: t,
            title: (0, b.we)("#Loading"),
            description: "",
            type: "",
            previewurl: "",
            appid: 0,
            url: T.TS.COMMUNITY_BASE_URL + "sharedfiles/filedetails/?id=" + t,
          }));
        (0, r.useEffect)(() => {
          (async () => {
            try {
              const e = await v.R.LoadSharedFileDynamicData([t], a);
              if (!a.token.reason && e.length > 0) {
                const t = e[0];
                D(t.url) &&
                  (t.url =
                    T.TS.COMMUNITY_BASE_URL +
                    "sharedfiles/filedetails/?id=" +
                    t.url),
                  s(t),
                  console.log(e[0]),
                  i(!0);
              }
            } catch (e) {
              const t = (0, w.H)(e);
              console.error("SharedFileSnippet: " + t.strErrorMsg, t);
            }
          })();
        }, [a, t]);
        let l = void 0 !== o.personnaname && o.personnaname.length > 0;
        return r.createElement(
          "a",
          {
            href: o.url,
            className: I().DynamicLinkBox,
            "data-modal-content-sizetofit": !!o.bSizeToFit,
            "data-appid": o.appid,
            "data-publishedfileid": t,
          },
          r.createElement("img", {
            className: I().DynamicLink_Preview,
            src: o.previewurl,
          }),
          r.createElement(
            "div",
            { className: I().DynamicLink_Content },
            r.createElement(
              "div",
              { className: I().DynamicLink_Name },
              o.title,
            ),
            r.createElement(
              "div",
              null,
              r.createElement(
                "span",
                { className: I().DynamicLink_Type },
                o.type,
              ),
            ),
            l &&
              r.createElement(
                "div",
                { className: I().DynamicLink_Author },
                (0, b.PP)(
                  "#EventEditor_Author",
                  r.createElement(
                    "span",
                    { className: I().DynamicLink_AuthorName },
                    o.personnaname,
                  ),
                ),
              ),
            r.createElement(
              "div",
              { className: I().DynamicLink_Description },
              o.description,
            ),
          ),
        );
      }
      var L = a(12155),
        B = a(52038),
        U = a(41735),
        M = a.n(U),
        x = a(75844),
        N = a(22837),
        k = a(71138),
        R = a(4796),
        F = a(91254),
        G = a(82097),
        P = a(22797),
        O = a(3088),
        H = a(75113);
      let W = class extends r.Component {
        state = {
          bLoading: this.props.announcementGID
            ? !F.O3.BHasClanAnnouncementGID(this.props.announcementGID)
            : !F.O3.BHasClanAnnouncementGID(this.props.eventGID),
          bFailedLoad: !1,
        };
        m_cancelSignal = M().CancelToken.source();
        componentDidMount() {
          this.HandleLoadEventInfo();
        }
        async HandleLoadEventInfo() {
          const {
            appid: e,
            strVanity: t,
            announcementGID: a,
            eventGID: n,
            strGroupVanity: r,
          } = this.props;
          let i = this.props.clanSteamID;
          try {
            if (this.state.bLoading) {
              if (void 0 !== t) {
                i = (await R.ac.LoadOGGClanInfoForIdentifier(t)).clanSteamID;
              } else if (void 0 !== r) {
                i = (await R.ac.LoadOGGClanInfoForGroupVanity(r)).clanSteamID;
              }
              const o = F.O3.LoadPartnerEventGeneric(i, e, n, a, 0);
              let s = await o;
              await Promise.all([
                G.A.Get().QueueAppRequest(s.appid, {
                  include_assets: !0,
                  include_basic_info: !0,
                  include_release: !0,
                }),
              ]),
                this.setState({ bFailedLoad: !1, bLoading: !1 });
            }
          } catch (e) {
            this.HandleError(e);
          }
        }
        HandleError(e) {
          let t = (0, w.H)(e);
          const {
            eventGID: a,
            announcementGID: n,
            strGroupVanity: r,
            strVanity: i,
          } = this.props;
          console.error(
            "EventSnippet hit error on announceGID " +
              n +
              " eventGID " +
              a +
              " strVanity " +
              i +
              " strGroupVanity " +
              r +
              " error: " +
              t.strErrorMsg,
          ),
            this.setState({ bFailedLoad: !0 });
        }
        componentWillUnmount() {
          this.m_cancelSignal.cancel("component unmounted");
        }
        render() {
          const {
            appid: e,
            announcementGID: t,
            eventGID: a,
            strURL: n,
            fnFilterImageURLsForKnownFailures: i,
            fnImageFailureCallback: o,
          } = this.props;
          if (this.state.bFailedLoad) return (0, p.Pm)(n);
          if (this.state.bLoading) return r.createElement(P.t, null);
          let s =
            void 0 !== t
              ? F.O3.GetClanEventFromAnnouncementGID(t)
              : F.O3.GetClanEventModel(a);
          if (null == s) return (0, p.Pm)(n);
          let l = (0, N.sf)(T.TS.LANGUAGE),
            c = s.GetImageForSizeAsArrayWithFallback(
              "capsule",
              l,
              k.wI.capsule_main,
            );
          i && (c = i(c));
          let m = s.GetNameWithFallback(l),
            d = s.GetSubTitleWithSummaryFallback(l),
            u = G.A.Get().GetApp(e)?.GetName(),
            h = (0, b.TW)(s.GetStartTimeAndDateUnixSeconds());
          return r.createElement(
            H.tj,
            {
              eventModel: s,
              route: H.PH.k_eView,
              className: I().DynamicLinkBox,
              "data-modal-content-sizetofit": !0,
              "data-appid": e,
            },
            r.createElement(O.c, {
              className: I().DynamicLink_Preview,
              rgSources: c,
              onIncrementalError: (e, t, a) => o && o(t),
            }),
            r.createElement(
              "div",
              { className: I().DynamicLink_Content },
              r.createElement(
                "div",
                { className: I().DynamicLink_Author },
                (0, b.we)(
                  28 == s.type
                    ? "#EventDisplay_Share_Announcement"
                    : "#EventDisplay_Share_Event",
                  u,
                ),
                r.createElement("span", { className: I().DynamicLink_Date }, h),
              ),
              r.createElement(
                "div",
                { className: I().DynamicLink_Name },
                r.createElement("div", { className: I().DynamicLink_Type }, m),
              ),
              r.createElement(
                "div",
                { className: I().DynamicLink_Description },
                d,
              ),
            ),
          );
        }
      };
      W = (0, n.Cg)([x.PA], W);
      var Y = a(6878),
        z = a.n(Y),
        V = a(39978),
        j = a.n(V);
      let Z = class extends r.Component {
        state = { bSummaryMode: !0, bLoadedMetaData: !1 };
        async componentDidMount() {
          let e =
            "https://sketchfab.com/oembed?url=https://sketchfab.com/models/" +
            this.props.modelID;
          try {
            let t = await M().get(e);
            this.setState({ bLoadedMetaData: !0, data: t.data });
          } catch (e) {
            this.setState({ bError: !0 }),
              console.error(
                "SketchFabEmbed failed to load: " + (0, w.H)(e).strErrorMsg,
              );
          }
        }
        OnSketchFabClick() {
          this.state.bLoadedMetaData && this.setState({ bSummaryMode: !1 });
        }
        render() {
          const { modelID: e } = this.props;
          return this.state.bError
            ? r.createElement(
                "div",
                {
                  className: j().dynamiclink_box,
                  onClick: this.OnSketchFabClick,
                },
                r.createElement("span", null, e),
                r.createElement(
                  "span",
                  null,
                  (0, b.we)("#EventDisplay_SketchFab_Error_Network"),
                ),
              )
            : this.state.bSummaryMode
              ? r.createElement(
                  "div",
                  {
                    className: j().dynamiclink_box,
                    onClick: this.OnSketchFabClick,
                  },
                  Boolean(this.state.bLoadedMetaData)
                    ? r.createElement(
                        r.Fragment,
                        null,
                        r.createElement("img", {
                          className: j().dynamiclink_preview,
                          src: this.state.data.thumbnail_url,
                        }),
                        r.createElement("img", {
                          className: j().sketchfab_play_overlay_image,
                        }),
                        r.createElement(
                          "div",
                          { className: j().dynamiclink_content },
                          r.createElement(
                            "div",
                            { className: j().dynamiclink_name },
                            r.createElement(
                              "span",
                              { className: j().dynamiclink_type },
                              (0, b.we)("#EventDisplay_Sketchfab"),
                            ),
                            r.createElement(
                              "div",
                              null,
                              this.state.data.title,
                              " ",
                            ),
                          ),
                          r.createElement(
                            "div",
                            { className: j().dynamiclink_author },
                            this.state.data.author_name,
                          ),
                        ),
                      )
                    : r.createElement(P.t, { size: "medium" }),
                )
              : r.createElement(
                  "div",
                  { className: j().sketchfabmodelembedded },
                  r.createElement("iframe", {
                    className: j().sketchfabmodelembedded,
                    src:
                      "https://sketchfab.com/models/" +
                      this.props.modelID +
                      "/embed?autostart=1",
                    frameBorder: 0,
                    allowFullScreen: !0,
                  }),
                );
        }
      };
      (0, n.Cg)([_.oI], Z.prototype, "OnSketchFabClick", null),
        (Z = (0, n.Cg)([x.PA], Z));
      var K = a(14947),
        X = a(83059),
        $ = a(32754),
        Q = a(65835),
        J = a.n(Q);
      function q(e) {
        const { defid: t, url: a } = e,
          n = (0, X.w)(t);
        if (!n || !n.community_item_data) return null;
        const i = n.appid,
          o = n.community_item_data.item_image_large,
          s = `${T.TS.MEDIA_CDN_COMMUNITY_URL}images/items/${i}/${o}`;
        return (
          "dev" == T.TS.WEB_UNIVERSE &&
            console.log("reward itemdef", (0, K.HO)(n)),
          r.createElement(
            "div",
            { className: J().Ctn },
            r.createElement(
              $.he,
              { toolTipContent: n.community_item_data.item_description },
              r.createElement("img", {
                src: s,
                alt: n.community_item_data.item_title,
              }),
            ),
          )
        );
      }
      var ee = a(92007);
      const te =
          /(?:steampowered\.com|valve\.org\/store|store\.\S+\.steam\.dev|store\.steamchina\.com)\/(app|bundle|sub)\/(\d+)/i,
        ae =
          /(?:steamcommunity\.com|valve\.org\/community|steam\.dev\/community|community\.\S+\.steam\.dev|my\.steamchina\.com)\/(games|app|ogg|gid|groups)\/(\w+)\/(?:announcements\/detail|partnerevents\/view_old_announcement)\/(\d+)/i,
        ne =
          /(?:steamcommunity\.com|valve\.org\/community|community\.\S+\.steam\.dev|steam\.dev\/community)\/(games|app|ogg|gid|groups)\/(\w+)\/partnerevents\/view\/(\d+)/i,
        re =
          /(?:steampowered\.com|valve\.org\/store|store\.\S+\.steam\.dev|steam\.dev\/store|store\.steamchina\.com)\/(?:news|newshub)\/(group|app)\/(\w+)\/view\/(\d+)/i,
        ie = /:\/\/medal.tv\/(?:clip|clips)\/([a-z0-9]+)/i,
        oe = /sketchfab.com\/(?:models\/(?:[^\/\s]+-)?)([a-z0-9]{32})/i,
        se = /twitter\.com\/(\w+)(\/?)$/i,
        le = /twitter\.com\/hashtag\/(\w+)(\/?)$/i,
        ce = /twitch\.tv\/(\w+)(\/?)$/i,
        me =
          /(?:steamcommunity\.com|valve\.org\/community|steam\.dev\/community|community\.\S+\.steam\.dev|my\.steamchina\.com)\/id\/(\w+)(\/?)$/i,
        pe =
          /(?:steampowered\.com|valve\.org\/store|steam\.dev\/store|store\.steamchina\.com)\/points\/shop\/.*reward\/(\d+)$/i;
      let de = null;
      function ue(e, t) {
        if ((0, T.Y2)()) return null;
        const a = (0, S.XU)(e);
        return void 0 !== a?.strVideoID
          ? r.createElement(f.A, {
              videoID: a.strVideoID,
              nStartSeconds: a.nStartSeconds,
              classNameAlign: "",
              classNameSize: I().sizeFull,
              bShowVideoImmediately: !1,
            })
          : (0, p.Pm)(e, t?.event);
      }
      function he(e, t) {
        if ((0, T.Y2)()) return null;
        const a = new RegExp(ie).exec(e);
        if (a && a.length > 1) {
          const e = a[1];
          if (e?.length > 0) {
            let a =
              "https://medal.tv/clip/" +
              e +
              "/?autoplay=0&donate=0" +
              (t && t.event ? "&steamappid=" + t.event.appid : "");
            return r.createElement("iframe", {
              className: Y.MedalTVWidget,
              src: a,
              frameBorder: 0,
              allow: "autoplay",
            });
          }
        }
        return (0, p.Pm)(e, t?.event);
      }
      function ge(e, t) {
        let a = new RegExp(oe).exec(e);
        if (a && a.length > 1) {
          let e = a[1];
          if (e && e.length > 1) return r.createElement(Z, { modelID: e });
        }
        return (0, p.Pm)(e, t?.event);
      }
      function _e(e, t) {
        const a = e.split("?");
        let n;
        if (2 == a.length) {
          const e = new URLSearchParams(a[1]);
          e.has("id") && (n = e.get("id"));
        }
        return void 0 !== n
          ? r.createElement(A, { sharedFileID: n })
          : (0, p.Pm)(e, t?.event);
      }
      function Se(e) {
        let t = (0, m.wm)(e).toLocaleLowerCase(),
          a = (0, m.wm)(T.TS.STORE_BASE_URL),
          n = (0, m.wm)(T.TS.COMMUNITY_BASE_URL);
        const r =
          "dev" === T.TS.WEB_UNIVERSE ||
          (0, m.wm)(T.TS.STORE_BASE_URL).endsWith(".steam.dev");
        return (
          t == a ||
          t == n ||
          (r &&
            (t.includes("steampowered.com") ||
              t.includes("steamcommunity.com") ||
              t.includes("steamchina.com")))
        );
      }
      function Ce(e, t) {
        if (Se(e)) {
          let t = new RegExp(te).exec(e);
          if (t && t.length > 2) {
            let e = t[1],
              a = Number(t[2]);
            if (a > 0) return r.createElement(ee.e, { id: a, inputType: e });
          }
        }
        return (0, p.Pm)(e, t?.event);
      }
      function fe(e, t) {
        if (Se(e)) {
          const t = new RegExp(pe).exec(e);
          if (t && t.length > 1) {
            const a = Number(t[1]);
            if (a > 0)
              return r.createElement(
                "div",
                { className: (0, B.A)(Y.LoyaltyRewardCtn) },
                r.createElement(q, { defid: a, url: e }),
              );
          }
        }
        return (0, p.Pm)(e, t?.event);
      }
      function Ee(e, t) {
        if (Se(e)) {
          let t = new RegExp(ae).exec(e);
          if (t && t.length > 2) {
            let a, n, i, o;
            "gid" == t[1]
              ? (n = new C.b(t[2]))
              : "groups" == t[1]
                ? (o = t[2])
                : isNaN(+t[2])
                  ? (i = t[2])
                  : (a = Number(t[2]));
            let s = t[3];
            if (
              ((void 0 !== a && a > 0) ||
                void 0 !== i ||
                void 0 !== o ||
                void 0 !== n) &&
              null != s &&
              s.length > 0
            )
              return r.createElement(W, {
                appid: a,
                clanSteamID: n,
                strVanity: i,
                strGroupVanity: o,
                announcementGID: s,
                strURL: e,
              });
          }
        }
        return (0, p.Pm)(e, t?.event);
      }
      function Ie(e, t) {
        return Ae(re, e, t);
      }
      function ve(e, t) {
        return Ae(ne, e, t);
      }
      function ye(e, t) {
        return (0, T.Y2)() ? null : De(e, r.createElement(L.KKS, null), "@", t);
      }
      function we(e, t) {
        return (0, T.Y2)() ? null : De(e, r.createElement(L.KKS, null), "#", t);
      }
      function be(e, t) {
        return (0, T.Y2)()
          ? null
          : De(e, r.createElement(L.qcc, null), void 0, t);
      }
      function Te(e, t) {
        return De(e, r.createElement(L.Qte, null), void 0, t);
      }
      function De(e, t, a, n) {
        let i;
        const o = e.endsWith("/") ? e.length - 1 : e.length,
          s = e.lastIndexOf("/", o - 1);
        -1 != s && s + 1 < e.length && (i = e.substring(s + 1, o)),
          a && i && (i = a + i);
        const l = (0, p.Pm)(e, n?.event, i ?? e);
        return r.createElement(
          "div",
          { className: Y.SocialLink },
          r.createElement("div", { className: Y.SocialIcon }, t),
          l,
        );
      }
      function Ae(e, t, a) {
        if (Se(t)) {
          let a = new RegExp(e).exec(t);
          if (a && a.length > 2) {
            let e, n, i, o;
            "gid" == a[1]
              ? (n = new C.b(a[2]))
              : "group" == a[1]
                ? (n = C.b.InitFromClanID(Number.parseInt(a[2])))
                : "groups" == a[1]
                  ? (o = a[2])
                  : isNaN(+a[2])
                    ? (i = a[2])
                    : (e = Number(a[2]));
            const s = a[3];
            if (
              ((void 0 !== e && e > 0) ||
                void 0 !== i ||
                void 0 !== o ||
                void 0 !== n) &&
              null != s &&
              s.length > 0
            )
              return r.createElement(W, {
                appid: e,
                clanSteamID: n,
                strVanity: i,
                strGroupVanity: o,
                eventGID: s,
                strURL: t,
              });
          }
        }
        return (0, p.Pm)(t, a?.event);
      }
      var Le = a(77516),
        Be = a(44332);
      class Ue {
        constructor() {
          (0, K.Gn)(this);
        }
        exportFn = void 0;
        file = void 0;
        dataURL = void 0;
        uploadFileName;
        displayFileName;
        sha1;
        hmac;
        timestamp = 0;
        imageWidth = 0;
        imageHeight = 0;
        fileInfo;
        uploadInfo;
        eUploadState = 0;
        uploadProgress = 0;
        strErrorDescription = void 0;
      }
      (0, n.Cg)([K.sH], Ue.prototype, "file", void 0),
        (0, n.Cg)([K.sH], Ue.prototype, "dataURL", void 0),
        (0, n.Cg)([K.sH], Ue.prototype, "imageWidth", void 0),
        (0, n.Cg)([K.sH], Ue.prototype, "imageHeight", void 0),
        (0, n.Cg)([K.sH], Ue.prototype, "eUploadState", void 0),
        (0, n.Cg)([K.sH], Ue.prototype, "uploadProgress", void 0),
        (0, n.Cg)([K.sH], Ue.prototype, "strErrorDescription", void 0);
      class Me {
        m_Callbacks;
        m_fileUploadProps = new Ue();
        m_onComplete;
        constructor(e) {
          (0, K.Gn)(this), (this.m_Callbacks = e);
        }
        get file_upload_props() {
          return this.m_fileUploadProps;
        }
        get file_upload_data_url() {
          return this.m_fileUploadProps.dataURL;
        }
        get file() {
          return this.m_fileUploadProps.file;
        }
        LogFileUploadMessage(e) {
          this.m_Callbacks.LogFileUploadMessage &&
            this.m_Callbacks.LogFileUploadMessage(e);
        }
        SetUploadFileError(e, t) {
          (this.m_fileUploadProps.eUploadState = e),
            (this.m_fileUploadProps.strErrorDescription = t),
            (this.m_fileUploadProps.displayFileName = null);
        }
        async StartFileExportToUpload(e, t = {}) {
          const { displayFilename: a, info: n, onComplete: r } = t;
          (this.m_fileUploadProps.eUploadState = 7),
            (this.m_fileUploadProps.uploadProgress = 0),
            (this.m_onComplete = r),
            (this.m_fileUploadProps.fileInfo = n),
            this.SetFileToUpload(e),
            (this.m_fileUploadProps.displayFileName = a);
        }
        async SetImageFileToUpload(e, t = {}) {
          const { processor: a = xe, info: n } = t;
          if (!e) return void this.SetFileToUpload(null);
          this.m_fileUploadProps.fileInfo = n;
          const r = this.m_Callbacks.GetFileNameOverride?.() ?? e.name;
          if (e.size > 1024 * this.m_Callbacks.GetMaxFileSizeMB() * 1024)
            return void this.SetUploadFileError(
              4,
              (0, b.we)(
                "#Chat_Settings_Error_ChatFileTooLarge_dynamic",
                r,
                this.m_Callbacks.GetMaxFileSizeMB(),
              ),
            );
          let i = e.name.split(".").pop().toLowerCase();
          if (
            -1 ==
            [
              "jpg",
              "jpeg",
              "png",
              "gif",
              "webm",
              "mpg",
              "mp4",
              "mpeg",
              "ogv",
            ].indexOf(i)
          )
            return void this.SetUploadFileError(
              5,
              (0, b.we)("#Chat_Settings_Error_ChatFileTypeNotSupported", r),
            );
          const o = await a(e);
          this.SetFileToUpload(o.file),
            (this.m_fileUploadProps.imageHeight = o.height),
            (this.m_fileUploadProps.imageWidth = o.width);
        }
        async SetOtherFileToUpload(e, t = {}) {
          if (!e) return void this.SetFileToUpload(null);
          this.m_fileUploadProps.fileInfo = t.info;
          const a = this.m_Callbacks.GetFileNameOverride?.() ?? e.name;
          if (e.size > 1024 * this.m_Callbacks.GetMaxFileSizeMB() * 1024)
            return void this.SetUploadFileError(
              4,
              (0, b.we)(
                "#Chat_Settings_Error_ChatFileTooLarge_dynamic",
                a,
                this.m_Callbacks.GetMaxFileSizeMB(),
              ),
            );
          let n = e.name.split(".").pop().toLowerCase();
          -1 != ["zip"].indexOf(n)
            ? this.SetFileToUpload(e)
            : this.SetUploadFileError(
                5,
                (0, b.we)("#Chat_Settings_Error_ChatFileTypeNotSupported", a),
              );
        }
        SetFileToUpload(e) {
          if (
            ((this.m_fileUploadProps.file = null),
            (this.m_fileUploadProps.dataURL = null),
            (this.m_fileUploadProps.hmac = null),
            (this.m_fileUploadProps.sha1 = null),
            (this.m_fileUploadProps.imageWidth = 0),
            (this.m_fileUploadProps.imageHeight = 0),
            (this.m_fileUploadProps.displayFileName = null),
            !e)
          )
            return void (this.m_fileUploadProps.eUploadState = 0);
          let t = "";
          if ("function" == typeof e)
            (this.m_fileUploadProps.file = null),
              (this.m_fileUploadProps.exportFn = e);
          else {
            (this.m_fileUploadProps.file = e),
              (this.m_fileUploadProps.exportFn = null);
            try {
              t = URL.createObjectURL(e);
            } catch (e) {
              console.error(`Failed to created object URL from file: ${e}`);
            }
            (this.m_fileUploadProps.displayFileName =
              this.m_fileUploadProps.file.name),
              (this.m_fileUploadProps.uploadFileName =
                window.performance.now() +
                "_" +
                this.m_fileUploadProps.file.name);
          }
          this.m_fileUploadProps.eUploadState = 1;
          let a = "";
          for (; a.length < 40; )
            a += Math.floor(16 * Math.random()).toString(16);
          (this.m_fileUploadProps.dataURL = t),
            (this.m_fileUploadProps.sha1 = a),
            (this.m_fileUploadProps.hmac = ""),
            (this.m_fileUploadProps.timestamp = 0);
        }
        async RetryFileUpload() {
          return this.BeginFileUpload();
        }
        async BeginFileUpload(e) {
          if (
            ((this.m_fileUploadProps.uploadProgress = 0),
            this.m_fileUploadProps.exportFn)
          ) {
            this.m_fileUploadProps.eUploadState = 7;
            const { eResult: e, file: t } =
              await this.m_fileUploadProps.exportFn((e) => {
                (0, K.h5)(() => {
                  this.m_fileUploadProps.uploadProgress = 0.5 * e;
                });
              });
            if (1 != e || !t)
              return (
                this.SetUploadFileError(
                  3,
                  (0, b.we)("#Chat_Settings_Error_ExportFailed"),
                ),
                new Response()
              );
            (this.m_fileUploadProps.file = t),
              (this.m_fileUploadProps.uploadFileName =
                window.performance.now() + "_" + t.name);
          }
          let t = this.m_fileUploadProps.file;
          if (!t)
            throw (
              ((0, Be.w)(
                !1,
                "Must SetImageFileToUpload before calling BeginFileUpload",
              ),
              new Error("Invalid State"))
            );
          (this.m_fileUploadProps.eUploadState = 2),
            (this.m_fileUploadProps.uploadInfo = e);
          let a = new FormData();
          a.append("sessionid", T.TS.SESSIONID),
            a.append("l", T.TS.LANGUAGE),
            a.append("file_size", t.size.toString()),
            a.append("file_name", this.m_fileUploadProps.uploadFileName),
            a.append("file_sha", this.m_fileUploadProps.sha1),
            a.append(
              "file_image_width",
              this.m_fileUploadProps.imageWidth.toString(),
            ),
            a.append(
              "file_image_height",
              this.m_fileUploadProps.imageHeight.toString(),
            ),
            a.append("file_type", t.type),
            this.m_Callbacks.PopulateBeginFileUploadFormData &&
              this.m_Callbacks.PopulateBeginFileUploadFormData(
                a,
                this.file_upload_props.uploadInfo,
                this.file_upload_props.fileInfo,
              );
          try {
            let e,
              t = await fetch(
                this.m_Callbacks.GetBeginFileUploadURL() +
                  `?l=${T.TS.LANGUAGE}`,
                { method: "POST", body: a, credentials: "include" },
              );
            try {
              e = await t.json();
            } catch (e) {}
            if (!t.ok) {
              let a = null;
              throw (
                ((0, K.h5)(() => {
                  (this.m_fileUploadProps.eUploadState = 3),
                    this.LogFileUploadMessage(t),
                    (a = e?.message
                      ? e?.message
                      : (0, b.we)("#Chat_Settings_Error_ServerError")),
                    (this.m_fileUploadProps.strErrorDescription = (0, b.we)(
                      "#Chat_Upload_ErrorStart",
                      a,
                    ));
                }),
                a)
              );
            }
            if (!e || !e.result) throw new Error();
            return (
              (this.m_fileUploadProps.timestamp = e.timestamp),
              (this.m_fileUploadProps.hmac = e.hmac),
              this.DoFileUpload(e.result)
            );
          } catch (e) {
            let t = e || (0, b.we)("#ConnectionTrouble_FailedToConnect");
            throw (
              ((0, K.h5)(() => {
                (this.m_fileUploadProps.eUploadState = 3),
                  (this.m_fileUploadProps.strErrorDescription = (0, b.we)(
                    "#Chat_Upload_ErrorStart",
                    t,
                  ));
              }),
              t)
            );
          }
        }
        async DoFileUpload(e) {
          let t = this.m_fileUploadProps.file,
            a = e.use_https ? "https://" : "http://";
          a += e.url_host + e.url_path;
          let n = {
            onUploadProgress: (e) => {
              const t = !!this.m_fileUploadProps.exportFn,
                a = t ? 50 : 100,
                n = (t ? 50 : 0) + (e.loaded / e.total) * a;
              n > this.m_fileUploadProps.uploadProgress &&
                (0, K.h5)(() => {
                  this.m_fileUploadProps.uploadProgress = n;
                });
            },
            headers: {},
            transformRequest: [(e) => e],
          };
          for (let t = 0; t < e.request_headers.length; ++t) {
            let a = e.request_headers[t];
            "Content-Length" != a.name &&
              "Host" != a.name &&
              (n.headers[a.name] = a.value);
          }
          try {
            return await M().put(a, t, n), this.CommitFileUpload(!0, e.ugcid);
          } catch (t) {
            throw (
              (this.LogFileUploadMessage(t.response),
              (0, K.h5)(() => {
                (this.m_fileUploadProps.strErrorDescription = (0, b.we)(
                  "#Chat_Upload_ErrorCloud",
                )),
                  (this.m_fileUploadProps.eUploadState = 3),
                  (this.m_fileUploadProps.uploadProgress = 0);
              }),
              this.CommitFileUpload(!1, e.ugcid),
              this.m_fileUploadProps.strErrorDescription)
            );
          }
        }
        async CommitFileUpload(e, t) {
          let a = this.m_fileUploadProps.file,
            n = this.m_fileUploadProps.sha1,
            r = new FormData();
          r.append("sessionid", T.TS.SESSIONID),
            r.append("l", T.TS.LANGUAGE),
            r.append("file_name", this.m_fileUploadProps.uploadFileName),
            r.append("file_sha", n),
            r.append("success", e ? "1" : "0"),
            r.append("ugcid", t),
            r.append("file_type", a.type),
            r.append(
              "file_image_width",
              this.m_fileUploadProps.imageWidth.toString(),
            ),
            r.append(
              "file_image_height",
              this.m_fileUploadProps.imageHeight.toString(),
            ),
            r.append("timestamp", this.m_fileUploadProps.timestamp.toString()),
            r.append("hmac", this.m_fileUploadProps.hmac),
            this.m_Callbacks.PopulateCommitFileUploadFormData(
              r,
              this.file_upload_props.uploadInfo,
              this.file_upload_props.fileInfo,
            );
          try {
            let t = await fetch(this.m_Callbacks.GetCommitFileUploadURL(), {
              method: "POST",
              body: r,
              credentials: "include",
            });
            return (
              e
                ? ((this.m_fileUploadProps.uploadProgress = 0),
                  (this.m_fileUploadProps.eUploadState = 6),
                  this.m_onComplete && this.m_onComplete(1, a.size))
                : ((this.m_fileUploadProps.eUploadState = 3),
                  this.m_onComplete && this.m_onComplete(2, a.size)),
              t
            );
          } catch (t) {
            if (!e) return null;
            let n = null;
            throw (
              ((0, K.h5)(() => {
                if (
                  (this.LogFileUploadMessage(t),
                  (this.m_fileUploadProps.uploadProgress = 0),
                  (this.m_fileUploadProps.eUploadState = 3),
                  t.response)
                ) {
                  let e = t.response.data;
                  t.response.status, e && e.success;
                  n = e.message
                    ? e.message
                    : (0, b.we)("#Chat_Settings_Error_ServerError");
                } else n = (0, b.we)("#ConnectionTrouble_FailedToConnect");
                (this.m_fileUploadProps.strErrorDescription = `Failed to commit upload: ${n}`),
                  this.m_onComplete && this.m_onComplete(2, a.size);
              }),
              n)
            );
          }
        }
        ClearFileUploadError() {
          (3 != this.m_fileUploadProps.eUploadState &&
            4 != this.m_fileUploadProps.eUploadState &&
            5 != this.m_fileUploadProps.eUploadState) ||
            this.Reset();
        }
        Reset() {
          this.SetFileToUpload(null);
        }
      }
      function xe(e) {
        return new Promise((t) => {
          let a = new FileReader();
          (a.onload = () => {
            let n = e,
              r = (function (e) {
                let t = new DataView(e),
                  a = 0,
                  n = 0,
                  r = [],
                  i = 0;
                if (65496 == t.getUint16(a)) {
                  a += 2;
                  let o = t.getUint16(a);
                  for (a += 2; a < t.byteLength && a < 131072; ) {
                    if (65505 == o)
                      (r[i] = { recess: n, offset: a - 2 }),
                        (n = a + t.getUint16(a)),
                        i++;
                    else if (65498 == o) break;
                    (a += t.getUint16(a)), (o = t.getUint16(a)), (a += 2);
                  }
                  let s = e.byteLength - n;
                  if (
                    (r.forEach((e) => {
                      s += e.offset - e.recess;
                    }),
                    s === e.byteLength)
                  )
                    return e;
                  const l = new Uint8Array(s);
                  if (r.length > 0) {
                    let t = 0;
                    r.forEach((a) => {
                      let n = a.offset - a.recess;
                      l.set(new Uint8Array(e.slice(a.recess, a.offset)), t),
                        (t += n);
                    }),
                      l.set(new Uint8Array(e.slice(n)), t);
                  }
                  return l.buffer;
                }
                return e;
              })(a.result),
              i = new Blob([r], { type: e.type });
            if (i) {
              let t = i;
              (t.lastModifiedDate = new Date(e.lastModified)),
                (t.name = e.name),
                (n = t);
            }
            if (0 == e.type.indexOf("image")) {
              let a = new Image();
              (a.src = URL.createObjectURL(e)),
                (a.onload = (e) => {
                  t({ file: n, width: a.width, height: a.height });
                });
            } else t({ file: n, width: 0, height: 0 });
          }),
            a.readAsArrayBuffer(e);
        });
      }
      (0, n.Cg)([K.XI], Me.prototype, "SetUploadFileError", null),
        (0, n.Cg)([K.XI], Me.prototype, "StartFileExportToUpload", null),
        (0, n.Cg)([K.XI], Me.prototype, "SetImageFileToUpload", null),
        (0, n.Cg)([K.XI], Me.prototype, "SetOtherFileToUpload", null),
        (0, n.Cg)([K.XI], Me.prototype, "SetFileToUpload", null),
        (0, n.Cg)([K.XI], Me.prototype, "RetryFileUpload", null),
        (0, n.Cg)([K.XI], Me.prototype, "BeginFileUpload", null),
        (0, n.Cg)([K.XI], Me.prototype, "DoFileUpload", null),
        (0, n.Cg)([K.XI], Me.prototype, "CommitFileUpload", null),
        (0, n.Cg)([K.XI], Me.prototype, "ClearFileUploadError", null),
        (0, n.Cg)([K.XI], Me.prototype, "Reset", null);
      var Ne = a(73022),
        ke = a(55263),
        Re = a(33737),
        Fe = a(48079),
        Ge = a(93267),
        Pe = a(67523),
        Oe = a.n(Pe);
      const He = (e) => {
        const [t, a] = (0, r.useState)(!0),
          [n, i] = (0, r.useState)(null);
        if (
          ((0, r.useEffect)(() => {
            if (0 == e.appid || 0 == e.trailerBaseID)
              return void i((0, b.we)("#TrailerPlayer_ID_NotProvided"));
            (async () => {
              if (
                (await G.A.Get().QueueAppRequest(e.appid, {
                  include_trailers: !0,
                }),
                G.A.Get().BHasApp(e.appid))
              ) {
                G.A.Get()
                  .GetApp(e.appid)
                  .GetAllTrailers()
                  .GetTrailerByID(e.trailerBaseID) ||
                  (console.error(
                    "Trailer " +
                      e.trailerBaseID +
                      " doesn't existed within appid " +
                      e.appid,
                  ),
                  i(
                    (0, b.we)(
                      "#TrailerPlayer_CouldNotLoad",
                      e.appid,
                      e.trailerBaseID,
                    ),
                  )),
                  a(!1);
              } else
                i(
                  (0, b.we)(
                    "#TrailerPlayer_CouldNotLoad",
                    e.appid,
                    e.trailerBaseID,
                  ),
                );
            })();
          }, [e.appid, e.trailerBaseID]),
          n)
        )
          return e.bIsPreviewMode
            ? r.createElement("div", { className: Oe().ErrorDiv }, n)
            : null;
        if (t)
          return r.createElement(P.t, {
            string: (0, b.we)("#Loading"),
            size: "small",
          });
        const o = G.A.Get()
            .GetApp(e.appid)
            .GetAllTrailers()
            .GetTrailerByID(e.trailerBaseID),
          s = o.GetTrailerMax(),
          l = {
            sPoster: o.GetScreenshot(),
            rgVideoSources: [
              { sURL: s.strWebMURL, sFormat: "video/webm" },
              { sURL: s.strMP4URL, sFormat: "video/mp4" },
            ],
          };
        return r.createElement(Ge.L, {
          bControls: !0,
          bAutoPlay: !1,
          bLoop: !1,
          video: l,
        });
      };
      var We = a(19432),
        Ye = a(6469),
        ze = a(84811);
      const Ve = r.lazy(() =>
          Promise.all([
            a.e(8970),
            a.e(6597),
            a.e(4607),
            a.e(7937),
            a.e(7436),
            a.e(2797),
            a.e(7403),
            a.e(9214),
            a.e(4796),
            a.e(4095),
            a.e(432),
            a.e(9522),
            a.e(1266),
            a.e(7034),
            a.e(177),
            a.e(8396),
          ]).then(a.bind(a, 72224)),
        ),
        je = (e) => {
          const t = (0, r.useRef)(null),
            [a, n] = (0, r.useState)(Ye.K.Get().GetVODForAppID(e.appid)),
            [i, o] = (0, r.useState)(
              !Boolean(Ye.K.Get().GetVODForAppID(e.appid)),
            );
          return (
            (0, r.useEffect)(
              () => () => t.current && t.current("VODPlayer: unmounting"),
            ),
            (0, r.useEffect)(() => {
              let r = a;
              if (
                (a &&
                  a.appid != e.appid &&
                  (r = Ye.K.Get().GetVODForAppID(e.appid)),
                !r)
              ) {
                const a = async () => {
                  t.current && t.current();
                  const a = M().CancelToken.source();
                  (t.current = a.cancel),
                    (r = await Ye.K.Get().LoadVODForAppID(e.appid)),
                    a.token.reason || n(r),
                    o(!1);
                };
                o(!0), a();
              }
              a != r && n(r);
            }, [e.appid, a]),
            !a && e.bPreviewMode
              ? r.createElement(
                  "div",
                  null,
                  (0, b.we)(
                    i ? "#VODPlayer_Loading" : "#VODPlayer_ErrorLoading",
                    e.appid,
                  ),
                )
              : r.createElement(
                  "div",
                  { className: We.BroadcastCtn },
                  r.createElement(
                    ze.tH,
                    null,
                    r.createElement(
                      r.Suspense,
                      { fallback: null },
                      r.createElement(Ve, {
                        nAppIDVOD: e.appid,
                        watchLocation: 9,
                        bStartPaused: !0,
                      }),
                    ),
                  ),
                )
          );
        };
      var Ze = a(26296),
        Ke = a(51272),
        Xe = a(56011),
        $e = a(75933),
        Qe = a(43568);
      function Je(e) {
        const t = (0, T.Qn)(),
          a = (0, $e.a4)($e.Wn),
          n = "true" === String((0, s.j$)(e.args, "autoadvance")).toLowerCase();
        return r.createElement(
          Qe.F,
          {
            hideArrows: !a,
            hidePips: t,
            visibleElements: 1,
            useTestScrollbar: !1,
            bLazyRenderChildren: !0,
            screenIsWide: a,
            bAutoAdvance: n,
            className: z().ScreenshotCarousel,
          },
          e.children,
        );
      }
      var qe = a(45699),
        et = a(39362);
      function tt(e) {
        const { fileUploadManager: t } = e,
          a = (0, r.useRef)();
        return r.createElement(
          "div",
          { className: et.Ctn },
          r.createElement("input", {
            type: "file",
            accept: ".jpg,.jpeg,.png,.gif,.webm,.mpg,.mpeg,.ogv,.mp4",
            style: { display: "none" },
            name: "fileupload",
            ref: a,
            onChange: (e) => {
              e.currentTarget?.files?.length > 0 &&
                (t.SetImageFileToUpload(e.currentTarget.files[0]),
                (e.currentTarget.value = ""));
            },
          }),
          r.createElement(
            qe.fu,
            {
              type: "button",
              title: (0, b.we)("#Button_Upload"),
              onOKActionDescription: (0, b.we)("#Button_Upload"),
              onClick: () => a.current.click(),
            },
            r.createElement(L.xv8, null),
          ),
        );
      }
      var at = a(65946),
        nt = a(49333);
      function rt(e) {
        const { fileUploadManager: t } = e,
          a = (0, at.q3)(() => t.file_upload_props.eUploadState);
        return 1 == a
          ? r.createElement(it, { fileUploadManager: t })
          : 3 == a || 5 == a || 4 == a
            ? r.createElement(st, { fileUploadManager: t })
            : 0 != a
              ? r.createElement(ot, { fileUploadManager: t })
              : null;
      }
      function it(e) {
        const { fileUploadManager: t } = e,
          a = t.file;
        return r.createElement(
          "div",
          { className: nt.UploadPreviewContainer },
          Boolean(-1 != a.type.indexOf("image")) &&
            r.createElement("img", {
              className: nt.UploadPreview,
              src: t.file_upload_data_url,
            }),
          Boolean(-1 != a.type.indexOf("video")) &&
            r.createElement(L.CeX, null),
          r.createElement(
            "div",
            { className: nt.FileUploadFileName },
            "'",
            a.name,
            "'",
          ),
          r.createElement(
            "div",
            { className: nt.FileUploadCancel, onClick: () => t.Reset() },
            r.createElement(L.sED, null),
          ),
          r.createElement(
            Re.jn,
            {
              className: nt.FileUploadBtn,
              onClick: async () => {
                await t.BeginFileUpload(), t.Reset();
              },
            },
            (0, b.we)("#Button_Upload"),
          ),
        );
      }
      function ot(e) {
        const { fileUploadManager: t } = e,
          [a, n, i] = (0, at.q3)(() => [
            t.file_upload_props.file,
            t.file_upload_props.displayFileName,
            t.file_upload_props.uploadProgress,
          ]),
          o = a ? (0, b.we)("#Uploading_Item", n) : "",
          s = { width: i + "%" };
        return r.createElement(
          "div",
          { className: nt.FileUploadProgressContainer },
          r.createElement("div", { className: nt.FileUploadProgressName }, o),
          r.createElement(
            "div",
            {
              className: (0, B.A)(
                nt.FileUploadProgressBarContainer,
                "DialogProgressBar_ProgressBarContainer",
              ),
            },
            r.createElement("div", {
              className: "DialogProgressBar_Value",
              style: s,
            }),
          ),
        );
      }
      function st(e) {
        const { fileUploadManager: t } = e,
          [a, n, i] = (0, at.q3)(() => [
            t.file_upload_props.strErrorDescription,
            t.file_upload_props.displayFileName,
            t.file_upload_props.eUploadState,
          ]),
          o = n ? (0, b.we)("#Uploading_Item", n) : "",
          s = a || (0, b.we)("#Chat_Upload_ErrorCloud");
        return r.createElement(
          "div",
          { className: nt.FileUploadProgressContainer },
          r.createElement("div", { className: nt.FileUploadProgressName }, o),
          r.createElement(
            "div",
            { className: nt.FileUploadErrorDescription },
            s,
          ),
          r.createElement(
            "div",
            { className: nt.FileUploadActions },
            r.createElement(
              Re.dR,
              { className: "DialogLayout_NoMinWidth" },
              Boolean(3 == i) &&
                r.createElement(
                  Re.jn,
                  {
                    onClick: async () => {
                      await t.RetryFileUpload(), t.Reset();
                    },
                  },
                  (0, b.we)("#Chat_Upload_ErrorAction_Retry"),
                ),
              r.createElement(
                Re.$n,
                { onClick: () => t.ClearFileUploadError() },
                (0, b.we)("#Chat_Upload_ErrorAction_Close"),
              ),
            ),
          ),
        );
      }
      var lt = a(51706),
        ct = a(738),
        mt = a(82477),
        pt = a(90874),
        dt = a(41951),
        ut = a(74410),
        ht = a(99163);
      let gt = null;
      function _t() {
        return (
          null == gt &&
            (gt = new Map([
              ["url", { Constructor: St, autocloses: !1 }],
              [
                "h1",
                {
                  Constructor: s.Tu(s.Zb, Y.Header1),
                  autocloses: !1,
                  skipFollowingNewline: !0,
                },
              ],
              [
                "h2",
                {
                  Constructor: s.Tu(s.Sz, Y.Header2),
                  autocloses: !1,
                  skipFollowingNewline: !0,
                },
              ],
              [
                "h3",
                {
                  Constructor: s.Tu(s.ZS, Y.Header3),
                  autocloses: !1,
                  skipFollowingNewline: !0,
                },
              ],
              [
                "quote",
                { Constructor: s.Tu(s.Pk, Y.BlockQuote), autocloses: !1 },
              ],
              [
                "list",
                {
                  Constructor: s.Tu(s.B8, Y.UnorderedList),
                  autocloses: !1,
                  skipInternalNewline: !0,
                },
              ],
              [
                "olist",
                {
                  Constructor: s.Tu(s._J, Y.OrderedList),
                  autocloses: !1,
                  skipInternalNewline: !0,
                },
              ],
              [
                "*",
                { Constructor: s.ck, autocloses: !0, skipInternalNewline: !0 },
              ],
              ["img", { Constructor: Ct, autocloses: !1 }],
              ["previewyoutube", { Constructor: ut.gH, autocloses: !1 }],
              ["looping_media", { Constructor: s.$A, autocloses: !1 }],
              ["video", { Constructor: s.UT, autocloses: !1 }],
              ["youtubeorvideo", { Constructor: ut.Eo, autocloses: !1 }],
              ["trailer", { Constructor: Et, autocloses: !0 }],
              ["vod", { Constructor: It, autocloses: !1 }],
              [
                "speaker",
                {
                  Constructor: vt,
                  autocloses: !1,
                  skipInternalNewline: !0,
                  allowWrapTextForCopying: !0,
                },
              ],
              ["giveawayeligible", { Constructor: wt, autocloses: !1 }],
              ["claimitem", { Constructor: bt, autocloses: !0 }],
              ["packagepurchaseable", { Constructor: Tt, autocloses: !1 }],
              ["actiondialog", { Constructor: At, autocloses: !1 }],
              ["uploadfilebutton", { Constructor: Bt, autocloses: !0 }],
              ["docimg", { Constructor: ft, autocloses: !1 }],
              ["carousel", { Constructor: Je, autocloses: !1 }],
              ["meetsteamsessiongroup", { Constructor: ht.ac, autocloses: !1 }],
            ])),
          gt
        );
      }
      function St(e) {
        let t = (0, s.j$)(e.args) || (0, s.j$)(e.args, "href");
        const a = (0, s.j$)(e.args, "style"),
          n = (0, s.j$)(e.args, "id"),
          i = (function (e) {
            return "button" === e
              ? (0, B.A)(Y.LinkButton, "LinkButton")
              : (0, B.A)(Y.Link, "Link");
          })(a);
        e.context.event;
        if (void 0 === t) return e.children || "";
        if ("string" == typeof t && t.length > 0) {
          const a = s._D(t, e.language, e.context.event?.rtime32_last_modified);
          t = "string" == typeof a ? a : a[1];
        }
        return (
          "dev" == T.TS.WEB_UNIVERSE &&
            "store" == (0, T.yK)() &&
            "store.steampowered.com" == (0, m.wm)(t) &&
            (t = t.replace(
              "https://store.steampowered.com/",
              T.TS.STORE_BASE_URL,
            )),
          "string" == typeof t && t.length > 0 && "#" == t[0]
            ? r.createElement("a", { className: i, href: t }, e.children)
            : "steam://settings/account" == t
              ? r.createElement(
                  Ke.uU,
                  { className: i, href: "steam://settings/account" },
                  e.children,
                )
              : r.createElement(
                  p.d$,
                  { className: i, url: t, event: e.context.event, id: n },
                  e.children,
                )
        );
      }
      function Ct(e) {
        const { showErrorInfo: t, event: a } = e.context;
        let n = (0, s.j$)(e.args, "src") || e.children?.toString();
        if (!n && ((n = (0, s.j$)(e.args)), null == !n)) return null;
        const i = s._D(n, e.language, a?.rtime32_last_modified);
        if ("string" == typeof i) {
          let e;
          return (
            (n = i),
            (e = (!a || !a.BHasTag("auto_rssfeed")) && !(0, m.ZF)(n)),
            t || (n = (0, m.L$)(n)),
            t
              ? r.createElement(Ze.i, {
                  src: n,
                  crossOrigin: e ? "anonymous" : void 0,
                })
              : r.createElement(dt.o, {
                  src: n,
                  crossOrigin: e ? "anonymous" : void 0,
                })
          );
        }
        return r.createElement(O.c, { rgSources: i });
      }
      function ft(e) {
        const t = (0, s.j$)(e.args);
        if (null == t || null == t || 0 == t.length) return "";
        const a = e && e.children && e.children.toString(),
          n = new Array();
        return (
          n.push(
            `${T.TS.MEDIA_CDN_COMMUNITY_URL}images/steamworks_docs/${T.TS.LANGUAGE}/${t}`,
          ),
          "english" != T.TS.LANGUAGE &&
            n.push(
              `${T.TS.MEDIA_CDN_COMMUNITY_URL}images/steamworks_docs/english/${t}`,
            ),
          r.createElement(O.c, { rgSources: n, alt: a })
        );
      }
      function Et(e) {
        const t = yt(
            e.args,
            "appid",
            e.context.event.appid ? e.context.event.appid : 0,
          ),
          a = yt(e.args, "trailerid", 0);
        return r.createElement(He, {
          appid: t,
          trailerBaseID: a,
          bIsPreviewMode: e.context.showErrorInfo,
        });
      }
      function It(e) {
        const t = yt(e.args, "appid", 0);
        return r.createElement(je, {
          appid: t,
          bPreviewMode: e.context.showErrorInfo,
        });
      }
      function vt(e) {
        const t = (0, s.j$)(e.args, "name"),
          a = (0, s.j$)(e.args, "title"),
          n = (0, s.j$)(e.args, "company"),
          i = (0, s.j$)(e.args, "photo");
        return e.context.bShowShortSpeakerInfo
          ? r.createElement(Fe.S8, {
              name: t,
              title: a,
              company: n,
              photo: i,
              bio: e.children,
            })
          : r.createElement(Fe.$k, {
              name: t,
              title: a,
              company: n,
              photo: i,
              bio: e.children,
            });
      }
      function yt(e, t, a) {
        const n = (0, s.j$)(e, t);
        return void 0 === n || null == n ? a : Number.parseInt(n);
      }
      function wt(e) {
        const t = (0, s.j$)(e.args, "name"),
          a =
            "true" === ((0, s.j$)(e.args, "visible") || "false").toLowerCase(),
          n = (0, Ne.h)(t);
        if (!t) {
          return e.context.showErrorInfo
            ? r.createElement("div", null, "Failed to provide giveaway name")
            : null;
        }
        return n && n.registered && ((n.eligible && a) || (!n.eligible && !a))
          ? e.children
          : null;
      }
      function bt(e) {
        const t = e.context.showErrorInfo;
        if (!T.iA.logged_in)
          return r.createElement(
            Re.$n,
            { onClick: mt.vg, className: "CSSClaimItemLoginButton" },
            (0, b.we)("#Sale_ClaimableReward_Login"),
          );
        const a = (0, s.j$)(e.args, "type");
        let n;
        if (a)
          switch (a) {
            case "profilemodifier":
              n = 8;
              break;
            case "sticker":
              n = 11;
          }
        return r.createElement(pt.m, { bPreviewMode: t, rewardType: n });
      }
      function Tt(e) {
        const t = Number.parseInt((0, s.j$)(e.args, "id")) || 0,
          a =
            "true" === ((0, s.j$)(e.args, "visible") || "false").toLowerCase(),
          n = e.context.showErrorInfo,
          [i, o] = (0, ke.Gg)(t, {});
        if (!t || 1 == o)
          return !t && n
            ? r.createElement("div", null, "Error: PackageID Not Set")
            : null;
        let l = !1;
        return (
          (l = G.A.Get().BHasStoreItem(t, 1)
            ? Boolean(i.GetBestPurchaseOption())
            : !G.A.Get().BIsPackageUnavailableDueToCountryRestriction(t)),
          (!l && !a) || (l && a) ? e.children : null
        );
      }
      function Dt(e) {
        if ("GameAwardDrop2022" === e) {
          const t = (0, Ne.h)(e),
            a = (0, Ne.Q)();
          return t
            ? t.registered
              ? {
                  bInitialState: !1,
                  bSuccessState: t.eligible,
                  bFailedState: !t.eligible,
                  fnAction: t.eligible
                    ? void 0
                    : async () => {
                        await a.fnCreateRegistration(e);
                      },
                }
              : {
                  bInitialState: !0,
                  fnAction: async () => {
                    await a.fnCreateRegistration(e);
                  },
                }
            : { bInitialState: !0 };
        }
        return { bInitialState: !0 };
      }
      function At(e) {
        const t = (0, s.j$)(e.args, "action"),
          a = (0, s.j$)(e.args, "initialToken"),
          n = (0, s.j$)(e.args, "successToken"),
          i = (0, s.j$)(e.args, "failToken"),
          o = Dt(t);
        if (!(t && a && n && i)) {
          return e.context.showErrorInfo
            ? r.createElement(
                "div",
                null,
                "Failed to provide all tokens. Dialog will not appear",
              )
            : null;
        }
        return T.iA.logged_in || "test" == t || "nologinrequired" == t
          ? r.createElement(
              Re.$n,
              {
                className: "CSSActionDialogButton",
                onClick: (o) => {
                  (0, ct.pg)(
                    r.createElement(
                      Lt,
                      {
                        strAction: t,
                        strInitialToken: a,
                        strSuccessToken: n,
                        strFailToken: i,
                      },
                      e.children,
                    ),
                    (0, Xe.uX)(o),
                  );
                },
              },
              Boolean(o.bInitialState) && (0, b.we)(a),
              Boolean(o.bSuccessState) && (0, b.we)(n),
              Boolean(o.bFailedState) && (0, b.we)(i),
            )
          : r.createElement(
              Re.$n,
              { className: "CSSActionDialogButton", onClick: mt.vg },
              (0, b.we)("#Login_SignIn"),
            );
      }
      function Lt(e) {
        const {
            strAction: t,
            children: a,
            closeModal: n,
            strInitialToken: i,
            strSuccessToken: o,
            strFailToken: s,
          } = e,
          l = Dt(t),
          [c, m] = r.useState(Boolean(l.fnAction));
        return (
          r.useEffect(() => {
            l.fnAction && (m(!0), l.fnAction().finally(() => m(!1)));
          }, [l]),
          r.createElement(
            lt.eV,
            {
              bDisableBackgroundDismiss: !0,
              closeModal: n,
              onCancel: n,
              className: "CSSActionDialogDialog",
            },
            r.createElement(
              Re.Y9,
              null,
              Boolean(l.bInitialState) && (0, b.we)(i),
              Boolean(l.bSuccessState) && (0, b.we)(o),
              Boolean(l.bFailedState) && (0, b.we)(s),
            ),
            r.createElement(
              Re.nB,
              null,
              r.createElement(
                Re.a3,
                null,
                c
                  ? r.createElement(P.t, {
                      size: "medium",
                      position: "center",
                      string: (0, b.we)("#Loading"),
                    })
                  : a,
              ),
            ),
          )
        );
      }
      function Bt(e) {
        const { showErrorInfo: t, event: a } = e.context,
          n = a.clanSteamID.GetAccountID(),
          [i] = r.useState(
            new Me(
              (function (e) {
                const t = {
                  PopulateBeginFileUploadFormData: (t) => {
                    t.append("clan_account_id", "" + e);
                  },
                  PopulateCommitFileUploadFormData: (t) => {
                    t.append("clan_account_id", "" + e);
                  },
                  GetBeginFileUploadURL: () =>
                    T.TS.STORE_BASE_URL + "saleaction/ajaxbeginfileupload",
                  GetCommitFileUploadURL: () =>
                    T.TS.STORE_BASE_URL + "saleaction/ajaxcommitfileupload",
                  LogFileUploadMessage: (e) => {
                    console.log("UploadFileButton: ", e);
                  },
                  GetMaxFileSizeMB: () => 100,
                };
                return t;
              })(n),
            ),
          );
        return n == Le.GU ||
          n == Le.bv ||
          (2 == T.TS.EUNIVERSE && n == Le.mW) ||
          (1 == T.TS.EUNIVERSE && n == Le.Kd)
          ? r.createElement(
              "div",
              null,
              r.createElement(tt, { fileUploadManager: i }),
              r.createElement(rt, { fileUploadManager: i }),
            )
          : t
            ? r.createElement("div", null, (0, b.we)("#CloudUpload_NotSupport"))
            : null;
      }
      class Ut extends r.Component {
        m_parser;
        constructor(e) {
          super(e),
            (this.m_parser = new i.B(
              Ut.sm_BBCodeDictionary,
              this.ElementAccumulator,
              e.languageOverride,
            ));
        }
        ElementAccumulator(e) {
          return new g(
            new h(
              new u(
                new o.OJ(new o.R8(), 0),
                e,
                (null == de &&
                  (de = (0, T.Y2)()
                    ? [
                        { urlRegExp: new RegExp(te), fnBBComponent: Ce },
                        { urlRegExp: new RegExp(ne), fnBBComponent: ve },
                        { urlRegExp: new RegExp(re), fnBBComponent: Ie },
                        { urlRegExp: new RegExp(ae), fnBBComponent: Ee },
                        { urlRegExp: new RegExp(me), fnBBComponent: Te },
                      ]
                    : [
                        {
                          urlRegExp: new RegExp(/youtu.be|youtube.com/i),
                          fnBBComponent: ue,
                        },
                        {
                          urlRegExp: new RegExp(
                            /community.+sharedfiles\/filedetails\/\?id=\d+/i,
                          ),
                          fnBBComponent: _e,
                        },
                        { urlRegExp: new RegExp(te), fnBBComponent: Ce },
                        { urlRegExp: new RegExp(ne), fnBBComponent: ve },
                        { urlRegExp: new RegExp(re), fnBBComponent: Ie },
                        { urlRegExp: new RegExp(ae), fnBBComponent: Ee },
                        { urlRegExp: new RegExp(ie), fnBBComponent: he },
                        { urlRegExp: new RegExp(oe), fnBBComponent: ge },
                        { urlRegExp: new RegExp(se), fnBBComponent: ye },
                        { urlRegExp: new RegExp(le), fnBBComponent: we },
                        { urlRegExp: new RegExp(ce), fnBBComponent: be },
                        { urlRegExp: new RegExp(me), fnBBComponent: Te },
                        { urlRegExp: new RegExp(pe), fnBBComponent: fe },
                      ]),
                de),
                {
                  partnerEventStore: this.props.partnerEventStore,
                  event: this.props.event,
                },
              ),
            ),
            e,
          );
        }
        static sm_BBCodeDictionary = new Map([
          ...Array.from(s.W4.entries()),
          ...Array.from(_t().entries()),
        ]);
        static AddDictionary(e) {
          Ut.sm_BBCodeDictionary = new Map([
            ...Array.from(Ut.sm_BBCodeDictionary.entries()),
            ...Array.from(e.entries()),
          ]);
        }
        render() {
          return (
            this.m_parser.UpdateOverrideLanguage(this.props.languageOverride),
            this.m_parser.ParseBBCode(this.props.text, {
              showErrorInfo: this.props.showErrorInfo,
              event: this.props.event,
              bShowShortSpeakerInfo: this.props.bShowShortSpeakerInfo,
            })
          );
        }
      }
      (0, n.Cg)([_.oI], Ut.prototype, "ElementAccumulator", null);
    },
    92007: (e, t, a) => {
      "use strict";
      a.d(t, { e: () => c });
      var n = a(90626),
        r = a(52038),
        i = a(45359),
        o = a(64502),
        s = a(55263),
        l = a(62792);
      function c(e) {
        const { inputType: t, id: a } = e,
          [c] = (0, s.G6)(a, (0, l.SW)(t), {});
        let m = "bundle" == t ? "bundle" : "sub" == t ? "sub" : "game";
        return n.createElement(
          "div",
          { className: (0, r.A)(o.AppSummaryWidgetCtn, "AppSummaryWidgetCtn") },
          n.createElement(i.pb, {
            id: a,
            type: m,
            bShowDemoButton: 1 == c?.GetAppType(),
            bAllowTwoLinesForHeader: !0,
          }),
        );
      }
    },
    1909: (e, t, a) => {
      "use strict";
      a.d(t, { Ng: () => g });
      var n = a(34629),
        r = a(75844),
        i = a(90626),
        o = a(22837),
        s = a(2160),
        l = (a(63556), a(95695)),
        c = a.n(l),
        m = a(52038),
        p = a(61859),
        d = a(91675),
        u = a(73745),
        h = a(32754);
      let g = class extends i.Component {
        GenerateLanguageOptions() {
          let e = [];
          const {
            fnFilterLanguage: t,
            fnLangHasData: a,
            fnLastUpdateRTime: n,
            fnIsLangSupported: r,
          } = this.props;
          this.props.bAllowUnsetOption &&
            e.push(
              i.createElement(
                "option",
                { key: "langpicker_unset", value: -1 },
                (0, p.we)("#language_selection_none"),
              ),
            );
          let l = new Array();
          const u = this.props.realms || [s.TU.k_ESteamRealmGlobal];
          for (const e of p.A0.GetLanguageListForRealms(u)) {
            if (t && !t(e)) continue;
            const a = (0, o.Lg)(e),
              n = (0, p.we)("#Language_" + a),
              i = Boolean(r) && r(e);
            l.push({ eLang: e, sLocName: n, bSupported: i });
          }
          l.sort((e, t) =>
            e.bSupported != t.bSupported
              ? e.bSupported
                ? -1
                : 1
              : e.sLocName.localeCompare(t.sLocName),
          );
          let h = !1;
          for (const t of l) {
            t.bSupported != h &&
              (e.push(
                i.createElement(
                  "option",
                  {
                    key: t.bSupported ? "SupportedGroup" : "UnsupportedGroup",
                    className: c().SupportedGroupLabel,
                    disabled: !0,
                  },
                  (0, p.we)(
                    t.bSupported
                      ? "#LanguageGroup_Supported"
                      : "#LanguageGroup_Unsupported",
                  ),
                ),
              ),
              (h = t.bSupported));
            const r = a && a(t.eLang),
              o = n && n(t.eLang);
            let s = t.sLocName;
            o &&
              0 !== o &&
              ((s += " "),
              (s += (0, p.we)(
                "#Language_Last_Update",
                (0, p.$z)(o) + " @ " + (0, d.KC)(o, { bForce24HourClock: !1 }),
              ))),
              e.push(
                i.createElement(
                  "option",
                  {
                    key: "langpicker" + t.eLang + (r ? "_hasdata" : ""),
                    value: t.eLang,
                    className: (0, m.A)(
                      { [c().LanguageWithContent]: r },
                      t.bSupported
                        ? c().SupportedLanguage
                        : c().UnsupportedLanguage,
                    ),
                  },
                  s,
                ),
              );
          }
          return e;
        }
        OnLanguageChange(e) {
          const { fnOnLanguageChanged: t, selectedLang: a } = this.props;
          let n = Number.parseInt(e.currentTarget.value);
          n != a && t && t(n);
        }
        render() {
          const { selectedLang: e, bDisabled: t, strTooltip: a } = this.props;
          let n = this.GenerateLanguageOptions();
          return i.createElement(
            h.he,
            { toolTipContent: a },
            i.createElement(
              "select",
              { value: e, onChange: this.OnLanguageChange, disabled: t },
              n,
            ),
          );
        }
      };
      (0, n.Cg)([u.oI], g.prototype, "OnLanguageChange", null),
        (g = (0, n.Cg)([r.PA], g));
    },
    90874: (e, t, a) => {
      "use strict";
      a.d(t, { m: () => f });
      var n = a(14947),
        r = a(90626),
        i = a(45699),
        o = a(36735),
        s = a(93973),
        l = a(33737),
        c = a(71298),
        m = a(738),
        p = a(12155),
        d = a(22797),
        u = a(52038),
        h = a(56011),
        g = a(61859),
        _ = a(78327),
        S = a(37341),
        C = a(59096);
      function f(e) {
        const t = (0, s.Oz)(),
          { bLoading: a } = t,
          { className: i, bPreviewMode: o, rewardType: c } = e;
        return r.createElement(
          l.$n,
          {
            className: (0, u.A)("CSSClaimItemButton", i),
            onClick: (e) => {
              t.bCanClaimNewItem
                ? (0, m.pg)(r.createElement(I, { rewardType: c }), (0, h.uX)(e))
                : ("dev" == _.TS.WEB_UNIVERSE ||
                    "beta" == _.TS.WEB_UNIVERSE ||
                    o) &&
                  ((0, m.pg)(
                    r.createElement(I, { rewardType: c }),
                    (0, h.uX)(e),
                  ),
                  console.log(
                    "Show dialog for debugging, since already claimed: ",
                    (0, n.HO)(t),
                  ));
            },
            disabled: a,
          },
          Boolean(a)
            ? r.createElement(d.t, {
                string: (0, g.we)("#Loading"),
                size: "small",
              })
            : r.createElement(E, { claimState: t }),
        );
      }
      function E(e) {
        const { claimState: t, strButtonOverride: a, rewardType: n } = e;
        if (t.bAlreadyClaimedCurrentItem)
          return r.createElement(
            "div",
            { className: (0, u.A)(S.CheckMark, "CSSClaimedState") },
            r.createElement(p.Jlk, null),
            r.createElement(
              "span",
              null,
              " ",
              a?.length > 0
                ? a
                : (0, g.we)("#Sale_ClaimableReward_AlreadyClaimed"),
            ),
          );
        let i = (0, g.we)("#Sale_ClaimableReward_generic");
        switch (t?.community_item_class || n) {
          case 11:
            i = (0, g.we)("#Sale_ClaimableReward_sticker");
            break;
          case 8:
            i = (0, g.we)("#Sale_ClaimableReward_profilemodifier");
            break;
          case 15:
            i = (0, g.we)("#Sale_ClaimableReward_animatedavatar");
        }
        return r.createElement("span", { className: "CSSUnclaimedState" }, i);
      }
      function I(e) {
        const { closeModal: t, rewardType: a } = e,
          { fnClaimItem: i } = (0, s.CC)(),
          o = (0, c.vs)(),
          [l, m] = r.useState(null);
        r.useEffect(() => {
          o.bLoading ||
            (o.fnSetLoading(!0),
            i()
              .then((e) => {
                if (
                  (m(e), console.log("claim response", (0, n.HO)(e)), e.appid)
                ) {
                  let t = (0, g.we)("#Sale_ClaimableReward_completed_generic");
                  const n = l?.community_item_class || a;
                  switch (n) {
                    case 11:
                      t = (0, g.we)("#Sale_ClaimableReward_completed_sticker");
                      break;
                    case 8:
                      t = (0, g.we)(
                        "#Sale_ClaimableReward_completed_profilemodifier",
                      );
                      break;
                    case 15:
                      t = (0, g.we)(
                        "#Sale_ClaimableReward_completed_animatedavatar",
                      );
                  }
                  o.fnSetStrSuccess("   "),
                    o.fnSetElSuccess(
                      r.createElement(
                        "div",
                        { className: S.DialogCtn },
                        r.createElement("span", null, t),
                        r.createElement(v, {
                          appid: e.appid,
                          community_item_type: e.community_item_type,
                          rewardType: n,
                        }),
                      ),
                    );
                } else o.fnSetStrError((0, g.we)("#Sale_ClaimableReward_Busy"));
              })
              .catch((e) =>
                o.fnSetStrError((0, g.we)("#Sale_ClaimableReward_Busy")),
              ));
        }, [l?.community_item_class, o, i, a]);
        let p = (0, g.we)("#Sale_ClaimableReward_generic");
        switch (l?.community_item_class || a) {
          case 11:
            p = (0, g.we)("#Sale_ClaimableReward_sticker");
            break;
          case 8:
            p = (0, g.we)("#Sale_ClaimableReward_profilemodifier");
            break;
          case 15:
            p = (0, g.we)("#Sale_ClaimableReward_animatedavatar");
        }
        return r.createElement(c.Hh, {
          state: o,
          strDialogTitle: p,
          closeModal: t,
        });
      }
      function v(e) {
        const { appid: t, community_item_type: a, rewardType: n } = e;
        return t && a
          ? r.createElement(
              r.Fragment,
              null,
              r.createElement(C.f8, { appid: t, community_item_type: a }),
              Boolean(8 == n) &&
                r.createElement(y, { appid: t, community_item_type: a }),
            )
          : null;
      }
      function y(e) {
        const { appid: t, community_item_type: a } = e,
          n = (0, o.fw)(t),
          [c, m] = r.useState(!1);
        if (!n) return null;
        const p = n.find((e) => e.item_type == a);
        return p
          ? r.createElement(
              "div",
              { className: S.EquipCtn },
              Boolean(c)
                ? r.createElement(
                    "div",
                    null,
                    (0, g.we)(
                      "#Sale_ClaimableReward_profilemodifier_apply_success",
                    ),
                  )
                : r.createElement(
                    l.$n,
                    {
                      onClick: (e) => {
                        (0, s.ns)(p).then((e) => {
                          1 == e && m(!0);
                        });
                      },
                    },
                    (0, g.we)("#Sale_ClaimableReward_profilemodifier_apply"),
                  ),
              r.createElement(
                i.Ii,
                { href: `${_.TS.COMMUNITY_BASE_URL}profiles/${_.iA.steamid}` },
                (0, g.we)("#Sale_ClaimableReward_profilemodifier_view"),
              ),
            )
          : r.createElement(
              "div",
              null,
              r.createElement(
                i.Ii,
                {
                  href: `${_.TS.COMMUNITY_BASE_URL}profiles/${_.iA.steamid}/edit/goldenprofile`,
                },
                (0, g.we)("#Sale_ClaimableReward_profilemodifier_choose"),
              ),
              r.createElement(
                i.Ii,
                { href: `${_.TS.COMMUNITY_BASE_URL}profiles/${_.iA.steamid}` },
                (0, g.we)("#Sale_ClaimableReward_profilemodifier_view"),
              ),
            );
      }
    },
    59096: (e, t, a) => {
      "use strict";
      a.d(t, { Zx: () => C, f8: () => S });
      var n = a(65946),
        r = a(90626),
        i = a(41735),
        o = a.n(i),
        s = a(68797),
        l = a(6144),
        c = a(73745),
        m = a(78327);
      class p {
        m_mapAppToDefs = new Map();
        m_mapPromises = new Map();
        m_listChangeCallback = new Map();
        GetItemDefForAppID(e) {
          return this.m_mapAppToDefs.get(e);
        }
        GetItemDefsChangeForEventID(e) {
          return (
            this.m_listChangeCallback.has(e) ||
              this.m_listChangeCallback.set(e, new l.lu()),
            this.m_listChangeCallback.get(e)
          );
        }
        BHasLoadedDef(e) {
          return this.m_mapPromises.has(e);
        }
        SetTestItemDefs(e, t) {
          this.m_mapAppToDefs.set(e, t),
            this.GetItemDefsChangeForEventID(e).Dispatch(t),
            this.m_mapPromises.set(e, Promise.resolve(1));
        }
        async LoadAppCommunityItems(e, t) {
          return e
            ? (this.m_mapPromises.has(e) ||
                this.m_mapPromises.set(
                  e,
                  this.InternalLoadAppCommunityItems(e, t),
                ),
              this.m_mapPromises.get(e))
            : 2;
        }
        async InternalLoadAppCommunityItems(e, t) {
          let a = null;
          try {
            const n =
                m.TS.COMMUNITY_BASE_URL +
                (t
                  ? "minigame/ajaxgetgameitemdefsforeditor"
                  : "minigame/ajaxgetgameitemdefs"),
              r = {
                appid: e,
                origin: self.origin,
                l: m.TS.LANGUAGE,
                sessionid: t ? m.TS.SESSIONID : void 0,
              },
              i = await o().get(n, { params: r, withCredentials: t });
            if (
              200 == i?.status &&
              1 == i?.data?.success &&
              i?.data?.item_definitions
            )
              return (
                this.m_mapAppToDefs.set(e, i.data.item_definitions),
                this.GetItemDefsChangeForEventID(e).Dispatch(
                  i.data.item_definitions,
                ),
                1
              );
            a = (0, s.H)(i);
          } catch (e) {
            a = (0, s.H)(e);
          }
          return (
            console.error(
              "CSaleMiniGameItemDefStore.InternalLoadAppCommunityItems failed: on appid " +
                e +
                " edit? " +
                t +
                " error: " +
                a?.strErrorMsg,
              a,
            ),
            2
          );
        }
        static s_Singleton;
        static Get() {
          return (
            p.s_Singleton ||
              ((p.s_Singleton = new p()),
              p.s_Singleton.Init(),
              "dev" == m.TS.WEB_UNIVERSE &&
                (window.g_SaleMiniGameItemDefStore = p.s_Singleton)),
            p.s_Singleton
          );
        }
        constructor() {}
        Init() {}
      }
      function d(e, t, a) {
        const n = (function (e, t) {
            const [a, n] = (0, r.useState)(p.Get().GetItemDefForAppID(e));
            return (
              (0, r.useEffect)(() => {
                e &&
                  !p.Get().BHasLoadedDef(e) &&
                  p.Get().LoadAppCommunityItems(e, t);
              }, [e, t]),
              (0, c.hL)(p.Get().GetItemDefsChangeForEventID(e), n),
              a
            );
          })(e, a),
          [i, o] = (0, r.useState)(null);
        return (
          (0, r.useEffect)(() => {
            if (e && n && null == i) {
              const r = n.find(
                (n) => (a || n.active) && n.appid == e && n.item_type == t,
              );
              r && o(r);
            }
          }, [i, n, e, t, a]),
          i
        );
      }
      var u = a(22797),
        h = a(61859),
        g = a(56330);
      function _(e) {
        const {
          appid: t,
          item_image_small: a,
          item_image_large: n,
          item_movie_mp4: i,
          item_movie_webm: o,
          item_title: s,
        } = e;
        if (i?.length > 0 && o?.length > 0) {
          const n = `${m.TS.MEDIA_CDN_COMMUNITY_URL}images/items/${t}/${a}`,
            s = `${m.TS.MEDIA_CDN_COMMUNITY_URL}images/items/${t}/${o}`,
            l = `${m.TS.MEDIA_CDN_COMMUNITY_URL}images/items/${t}/${i}`;
          return r.createElement(
            r.Fragment,
            null,
            r.createElement(
              "video",
              {
                muted: !0,
                controls: !1,
                autoPlay: !0,
                loop: !0,
                poster: n,
                className: e.videoClassName,
              },
              r.createElement("source", { src: s, type: "video/webm" }),
              Boolean(!m.TS.IN_CLIENT) &&
                r.createElement("source", { src: l, type: "video/mp4" }),
            ),
          );
        }
        {
          const i = `${m.TS.MEDIA_CDN_COMMUNITY_URL}images/items/${t}/${a || n}`;
          return r.createElement("img", {
            className: e.className,
            src: i,
            alt: s,
          });
        }
      }
      function S(e) {
        const { appid: t, community_item_type: a, bForEdit: n } = e,
          i = d(t, a, n),
          o =
            i && !i.active
              ? r.createElement(
                  "div",
                  { className: g.WarningStylesBackground },
                  (0, h.we)("#Sale_Section_RewardShelf_ItemInActiveWarning"),
                )
              : void 0;
        return i
          ? r.createElement(r.Fragment, null, r.createElement(_, { ...i }), o)
          : r.createElement(u.t, {
              size: "small",
              string: (0, h.we)("#Loading"),
            });
      }
      function C(e) {
        const { section: t, rewardDef: a, language: i } = e,
          o = d(a.appid, a.community_item_type),
          [s] = (0, n.q3)(() => [Boolean(t.rewards?.show_reward_item_name)]);
        let l;
        switch (a.community_class) {
          case 14:
          case 15:
            l = `${m.TS.COMMUNITY_BASE_URL}my/edit/avatar`;
            break;
          case 1:
            l = `${m.TS.COMMUNITY_BASE_URL}my/edit/favoritebadge`;
            break;
          case 3:
          case 8:
            l = `${m.TS.COMMUNITY_BASE_URL}my/edit/background`;
            break;
          case 13:
            l = `${m.TS.COMMUNITY_BASE_URL}my/edit/miniprofile`;
            break;
          case 11:
            l = `${m.TS.COMMUNITY_BASE_URL}chat`;
        }
        return r.createElement(
          "a",
          { href: l },
          r.createElement(S, {
            appid: a?.appid,
            community_item_type: a?.community_item_type,
          }),
          Boolean(s) && r.createElement("span", null, o?.item_name),
        );
      }
    },
    73067: (e, t, a) => {
      "use strict";
      a.d(t, { J: () => Le });
      var n = a(41735),
        r = a.n(n),
        i = a(75844),
        o = a(90626),
        s = a(79821),
        l = a(56545),
        c = a(51006),
        m = a(17720),
        p = a(37735),
        d = a(34629),
        u = a(88997),
        h = a(70995),
        g = a(27666),
        _ = a(71138),
        S = a(65739),
        C = a(73745),
        f = a(31698),
        E = a(14947),
        I = a(77700),
        v = a.n(I),
        y = a(52038);
      class w extends o.Component {
        m_strLastSearch;
        m_rgCurrentMatches = [];
        m_mapMatchByKey = new Map();
        containerRef = o.createRef();
        constructor(e) {
          super(e),
            (this.m_hMobxSearchDisposer = (0, E.fm)(async () => {
              await this.UpdateSearchResults(this.props.strSearch),
                this.forceUpdate();
            })),
            (this.state = { selectedIndex: void 0 });
        }
        OnKeyDown(e) {
          this.BHandleKeyPress(e.keyCode) && e.preventDefault();
        }
        BHandleKeyPress(e) {
          switch (e) {
            case 38:
              this.SetSelectedIndexDelta(-1);
              break;
            case 40:
              this.SetSelectedIndexDelta(1);
              break;
            case 36:
              this.SetSelectedIndex(0);
              break;
            case 33:
              this.SetSelectedIndexDelta(-this.GetPageSize());
              break;
            case 35:
              this.SetSelectedIndex(-1);
              break;
            case 34:
              this.SetSelectedIndexDelta(this.GetPageSize());
              break;
            case 13:
            case 9:
              if (void 0 === this.state.selectedIndex)
                return (
                  this.props.onSuggestionSelected(this.props.strSearch), !1
                );
              this.ChooseSuggestion(
                this.m_rgCurrentMatches[this.state.selectedIndex],
              );
              break;
            case 27:
              this.props.onSuggestionSelected(this.props.strSearch);
              break;
            default:
              return !1;
          }
          return !0;
        }
        GetPageSize() {
          let e = this.containerRef.current,
            t = e && e.firstElementChild,
            a = this.m_rgCurrentMatches.length;
          if (
            (a > this.getMaxMatches() && (a = this.getMaxMatches()), t && a)
          ) {
            let e = t.scrollHeight / a,
              n = t.clientHeight / e;
            return Math.max(1, Math.floor(n));
          }
          return 5;
        }
        ChooseSuggestion(e) {
          this.props.onSuggestionSelected(
            this.props.strSearch,
            e ? this.getSelection(e) : void 0,
          );
        }
        SetSelectedIndexDelta(e) {
          void 0 !== this.state.selectedIndex
            ? this.SetSelectedIndex(this.state.selectedIndex + e)
            : this.SetSelectedIndex(1 === e ? 0 : e);
        }
        SetSelectedIndex(e) {
          if (!this.m_rgCurrentMatches.length) return;
          let t = this.m_rgCurrentMatches.length;
          t > this.getMaxMatches() && (t = this.getMaxMatches()),
            (e %= t) < 0 && (e += t),
            this.setState({ selectedIndex: e });
        }
        FindKeyIndex(e) {
          if (!this.m_mapMatchByKey.size && this.m_rgCurrentMatches.length)
            for (let e = 0; e < this.m_rgCurrentMatches.length; e++)
              this.m_mapMatchByKey.set(
                this.getKey(this.m_rgCurrentMatches[e]),
                e,
              );
          return this.m_mapMatchByKey.get(e);
        }
        OnClickSuggestion(e) {
          let t = this.FindKeyIndex(e);
          void 0 !== t && this.ChooseSuggestion(this.m_rgCurrentMatches[t]);
        }
        OnMouseOverSuggestion(e) {
          let t = this.FindKeyIndex(e);
          void 0 !== t && this.SetSelectedIndex(t);
        }
        BindSelectedElement(e) {
          if (!e) return;
          let t = this.containerRef.current,
            a = e.containerRef.current,
            n = t && t.firstElementChild;
          a &&
            n &&
            (n.scrollTop + n.clientHeight < a.offsetTop ||
              a.offsetTop < n.scrollTop) &&
            a.scrollIntoView();
        }
        async UpdateSearchResults(e) {
          (this.m_rgCurrentMatches = await this.performSearch(e)),
            (this.m_strLastSearch = e),
            this.m_mapMatchByKey.clear(),
            this.m_rgCurrentMatches.length
              ? this.state && void 0 !== this.state.selectedIndex
                ? this.state.selectedIndex >= this.m_rgCurrentMatches.length &&
                  this.setState({ selectedIndex: 0 })
                : (void 0 ===
                    this.props.nMinimumSearchLengthBeforeAutoSelection ||
                    e.length >=
                      this.props.nMinimumSearchLengthBeforeAutoSelection) &&
                  this.setState({ selectedIndex: 0 })
              : this.state &&
                void 0 !== this.state.selectedIndex &&
                this.setState({ selectedIndex: void 0 });
        }
        m_hMobxSearchDisposer;
        componentWillUnmount() {
          this.m_hMobxSearchDisposer &&
            (this.m_hMobxSearchDisposer(),
            (this.m_hMobxSearchDisposer = void 0));
        }
        async componentDidUpdate(e) {
          this.m_strLastSearch != this.props.strSearch &&
            (await this.UpdateSearchResults(this.props.strSearch),
            this.forceUpdate());
        }
        render() {
          let e = [];
          if (this.m_rgCurrentMatches.length) {
            let t = this.getMaxMatches();
            for (
              let a = 0;
              a < Math.min(t, this.m_rgCurrentMatches.length);
              a++
            ) {
              let t = this.m_rgCurrentMatches[a],
                n = this.getKey(t),
                r = a === this.state.selectedIndex;
              e.push(
                o.createElement(
                  b,
                  {
                    key: n,
                    matchKey: n,
                    fnOnClick: this.OnClickSuggestion,
                    fnOnMouseOver: this.OnMouseOverSuggestion,
                    bIsSelected: r,
                    ref: r ? this.BindSelectedElement : void 0,
                  },
                  this.renderMatch(t),
                ),
              );
            }
            this.m_rgCurrentMatches.length > t &&
              e.push(
                this.renderTooManyMatchesMessage(
                  this.m_rgCurrentMatches.length - t,
                ),
              );
          } else {
            let t = this.renderNoMatchMessage();
            if (!t) return null;
            e.push(t);
          }
          return o.createElement(
            "div",
            { className: v().mentionDialogPosition, ref: this.containerRef },
            o.createElement(
              "div",
              {
                className: v().mentionDialog,
                tabIndex: 0,
                onKeyDown: this.OnKeyDown,
              },
              this.renderHeader(),
              e,
            ),
          );
        }
      }
      (0, d.Cg)([C.oI], w.prototype, "OnKeyDown", null),
        (0, d.Cg)([C.oI], w.prototype, "OnClickSuggestion", null),
        (0, d.Cg)([C.oI], w.prototype, "OnMouseOverSuggestion", null),
        (0, d.Cg)([C.oI], w.prototype, "BindSelectedElement", null);
      class b extends o.PureComponent {
        containerRef = o.createRef();
        OnMouseOver(e) {
          this.props.fnOnMouseOver(this.props.matchKey);
        }
        OnClick(e) {
          this.props.fnOnClick(this.props.matchKey);
        }
        render() {
          return o.createElement(
            "div",
            {
              className: (0, y.A)(
                v().suggestOption,
                v().mentionSearchOption,
                this.props.bIsSelected ? v().selected : "",
              ),
              onMouseEnter: this.OnMouseOver,
              onClick: this.OnClick,
              ref: this.containerRef,
            },
            this.props.children,
          );
        }
      }
      (0, d.Cg)([C.oI], b.prototype, "OnMouseOver", null),
        (0, d.Cg)([C.oI], b.prototype, "OnClick", null);
      const T = w;
      var D = a(79786),
        A = a.n(D);
      const L = class extends T {
        performSearch(e) {
          return this.props.emoticonStore.SearchEmoticons(e, 10, !1);
        }
        getSelection(e) {
          return e.name;
        }
        getKey(e) {
          return e.name;
        }
        renderMatch(e) {
          return o.createElement(
            "div",
            {
              className: (0, y.A)(
                A().EmoticonSuggestion,
                e.recent ? "Recent" : "",
              ),
            },
            o.createElement(
              "div",
              { className: A().Emoticon },
              o.createElement(f.nl, {
                emoticon: e.name,
                emoticonHoverStore: this.props.emoticonHoverStore,
              }),
              e.new && o.createElement(f.iD, null),
            ),
            ":",
            e.name,
            ":",
          );
        }
        renderNoMatchMessage() {
          return null;
        }
        renderTooManyMatchesMessage(e) {
          return null;
        }
        renderHeader() {
          return null;
        }
        getMaxMatches() {
          return Number.MAX_VALUE;
        }
      };
      var B = a(34510),
        U = a.n(B),
        M = a(61859);
      class x extends T {
        performSearch(e) {
          let t = Array();
          return (
            this.props.supportBBCodes.forEach((a) => {
              a.indexOf(e) >= 0 && t.push({ name: a });
            }),
            t
          );
        }
        getSelection(e) {
          return "[" + e.name + "][/" + e.name + "]";
        }
        getKey(e) {
          return e.name;
        }
        renderMatch(e) {
          return o.createElement(
            "div",
            { key: e.name, className: (0, y.A)(U().BBCodeSuggestion) },
            o.createElement("div", { className: U().BBCode }, e.name),
            "[",
            e.name,
            "]...[/",
            e.name,
            "]",
          );
        }
        renderNoMatchMessage() {
          return o.createElement(
            "div",
            {
              key: "nomatches",
              className: (0, y.A)(v().mentionSearchOption, v().noMatches),
            },
            (0, M.we)("#Bbcode_No_Match"),
          );
        }
        renderTooManyMatchesMessage(e) {
          return null;
        }
        renderHeader() {
          return null;
        }
        getMaxMatches() {
          return Number.MAX_VALUE;
        }
      }
      class N extends o.Component {
        descTextAreaRef = o.createRef();
        m_MentionDialog;
        m_bDisabled = !0;
        m_iMentionSearchStartOffset;
        m_iMentionSearchCancelledOffset;
        constructor(e) {
          super(e),
            (this.state = {
              mentionSearch: void 0,
              activeSuggestSearchType: void 0,
            });
        }
        BindMentionDialog(e) {
          this.m_MentionDialog = e;
        }
        OnKeyDown(e) {
          this.state.activeSuggestSearchType &&
          this.m_MentionDialog &&
          !e.shiftKey &&
          !e.ctrlKey &&
          this.m_MentionDialog.BHandleKeyPress(e.keyCode)
            ? e.preventDefault()
            : (8 != e.keyCode && 46 != e.keyCode) ||
              (this.m_iMentionSearchCancelledOffset = void 0);
        }
        FindMatchOpener(e, t, a) {
          for (let n = a - 1; n >= 0; n--) {
            if (t[n] == e) return n;
            if (" " == t[n] || "\n" == t[n]) break;
          }
        }
        ReplaceSuggestedText(e, t) {
          let a = this.descTextAreaRef.current.selectionStart,
            n = this.descTextAreaRef.current.value,
            r = this.FindMatchOpener(e, n, a);
          if (
            (void 0 === r && "@" == e && (r = this.FindMatchOpener("＠", n, a)),
            void 0 !== r)
          ) {
            let e = n.substr(0, r);
            (e += t), (a >= n.length || " " != n[a]) && (e += " ");
            let i = e.length;
            (e += n.substr(a)),
              (this.descTextAreaRef.current.value = e),
              (this.descTextAreaRef.current.selectionStart =
                this.descTextAreaRef.current.selectionEnd =
                  i),
              this.props.fnSetText(e),
              this.FocusTextInput();
          }
        }
        OnFocus(e) {
          this.UpdateAutoSearchState();
        }
        OnKeyPress(e) {
          this.UpdateAutoSearchState();
        }
        OnClick(e) {
          this.UpdateAutoSearchState();
        }
        ClearMentionSearchState() {
          (this.m_iMentionSearchStartOffset = void 0),
            this.state.activeSuggestSearchType &&
              this.setState({
                activeSuggestSearchType: void 0,
                mentionSearch: void 0,
              });
        }
        OnEmoticonSuggestionSelected(e, t) {
          if (!t)
            return (
              (this.m_iMentionSearchCancelledOffset =
                this.m_iMentionSearchStartOffset),
              void this.ClearMentionSearchState()
            );
          this.ReplaceSuggestedText(":", ":" + t + ":"),
            this.ClearMentionSearchState();
        }
        OnBBCodeSuggestionSelected(e, t) {
          if (!t)
            return (
              (this.m_iMentionSearchCancelledOffset =
                this.m_iMentionSearchStartOffset),
              void this.ClearMentionSearchState()
            );
          this.ReplaceSuggestedText("[", t), this.ClearMentionSearchState();
        }
        FocusTextInput() {
          this.descTextAreaRef.current && this.descTextAreaRef.current.focus();
        }
        UpdateAutoSearchState() {
          let e = this.descTextAreaRef.current;
          if (!e || this.m_bDisabled) return;
          if (e.selectionStart != e.selectionEnd || !e.selectionStart)
            return void this.ClearMentionSearchState();
          let t,
            a,
            n = e.selectionStart,
            r = e.value;
          for (let e = n - 1; e >= 0; e--) {
            let n = e > 0 ? r[e - 1] : void 0;
            if (this.props.emoticonStore && ":" == r[e] && r.length > 2) {
              (n && " " != n && "\n" != n && ":" != n) ||
                ((t = e), (a = "Emoticon"));
              break;
            }
            if ("[" == r[e] && (e + 1 > r.length || "/" != r[e + 1])) {
              (n && " " != n && "\n" != n && "]" != n) ||
                ((t = e), (a = "BBCode"));
              break;
            }
            if (" " == r[e] || "\n" == r[e]) break;
          }
          if (void 0 === t || t === this.m_iMentionSearchCancelledOffset)
            return void this.ClearMentionSearchState();
          let i = r.substr(t + 1, n - t - 1);
          (this.m_iMentionSearchStartOffset = t),
            this.setState({ activeSuggestSearchType: a, mentionSearch: i });
        }
        GetTextAreaRef() {
          return this.descTextAreaRef;
        }
        GetTextAreaCurrent() {
          return this.descTextAreaRef.current;
        }
        render() {
          let e,
            {
              emoticonStore: t,
              supportBBCodes: a,
              fnSetText: n,
              ...r
            } = this.props;
          switch (this.state.activeSuggestSearchType) {
            case "Emoticon":
              e = o.createElement(L, {
                emoticonStore: t,
                emoticonHoverStore: S.s,
                strSearch: this.state.mentionSearch,
                nMinimumSearchLengthBeforeAutoSelection: 2,
                onSuggestionSelected: this.OnEmoticonSuggestionSelected,
                ref: this.BindMentionDialog,
              });
              break;
            case "BBCode":
              e = o.createElement(x, {
                supportBBCodes: a,
                strSearch: this.state.mentionSearch,
                nMinimumSearchLengthBeforeAutoSelection: 2,
                onSuggestionSelected: this.OnBBCodeSuggestionSelected,
                ref: this.BindMentionDialog,
              });
          }
          return o.createElement(
            o.Fragment,
            null,
            e,
            o.createElement("textarea", {
              ...r,
              ref: this.descTextAreaRef,
              onKeyDown: this.OnKeyDown,
              onKeyUp: this.OnKeyPress,
              onFocus: this.OnFocus,
              onClick: this.OnClick,
            }),
          );
        }
      }
      (0, d.Cg)([C.oI], N.prototype, "BindMentionDialog", null),
        (0, d.Cg)([C.oI], N.prototype, "OnKeyDown", null),
        (0, d.Cg)([C.oI], N.prototype, "OnFocus", null),
        (0, d.Cg)([C.oI], N.prototype, "OnKeyPress", null),
        (0, d.Cg)([C.oI], N.prototype, "OnClick", null),
        (0, d.Cg)([C.oI], N.prototype, "OnEmoticonSuggestionSelected", null),
        (0, d.Cg)([C.oI], N.prototype, "OnBBCodeSuggestionSelected", null),
        (0, d.Cg)([C.oI], N.prototype, "FocusTextInput", null),
        (0, d.Cg)([C.oI], N.prototype, "GetTextAreaRef", null),
        (0, d.Cg)([C.oI], N.prototype, "GetTextAreaCurrent", null);
      var k = a(33737),
        R = a(283),
        F = a(95695),
        G = a.n(F),
        P = a(51706),
        O = a(738),
        H = a(41609),
        W = a.n(H),
        Y = a(56011),
        z = a(78327);
      var V = a(26505),
        j = a(14336),
        Z = a(68451),
        K = a(48079),
        X = a(22797),
        $ = a(32754),
        Q = a(99312),
        J = a.n(Q),
        q = a(65946),
        ee = a(44332),
        te = a(66331),
        ae = a(29347),
        ne = a(64233),
        re = a(28954),
        ie = a(63556),
        oe = a(2160);
      const se = (0, i.PA)((e) => {
        const {
            clanSteamID: t,
            inputClanImage: a,
            nWidth: n,
            nHeight: r,
            setImage: i,
          } = e,
          s = o.useMemo(() => ["sale_header"], []),
          l = o.useMemo(() => ({ width: n, height: r }), [n, r]),
          [c, p] = o.useState(void 0),
          [d, u] = o.useState(Boolean(a)),
          [h, S] = o.useState(!1),
          [C] = (0, q.q3)(() => [ie.O.Get().GetCurEditLanguage()]),
          f = o.useMemo(() => new re.V(t), [t.ConvertTo64BitString()]),
          E = o.useCallback(
            async (e) => {
              if (
                (f.ClearImages(),
                e && (u(!0), await f.AddExistingClanImage(e, 0, s)))
              ) {
                p(e);
                const t = f.GetUploadImages()[0].IsValidAssetType(s, l);
                0 != t.error.length ||
                  t.needsCrop ||
                  (a && a.image_hash == e.image_hash) ||
                  i(e);
              }
              u(!1);
            },
            [f, a, i, s, l],
          );
        o.useEffect(() => {
          E(a);
        }, [E, a]);
        let I,
          v = "",
          y = !1;
        if (f && f.GetFilesToUpload().length > 0) {
          I = f.GetUploadImages()[0];
          const e = I.IsValidAssetType(s, l);
          (v = e.error), (y = e.needsCrop);
        }
        return o.createElement(
          o.Fragment,
          null,
          d
            ? o.createElement(X.t, {
                size: "medium",
                string: (0, M.we)("#Loading"),
              })
            : Boolean(c) &&
                o.createElement("div", {
                  className: ne.Image,
                  style: {
                    backgroundImage: `url( '${I ? I.dataUrl : c.url}' )`,
                    height: `${r}px`,
                    width: `${n}px`,
                  },
                }),
          Boolean(v) && o.createElement("p", null, v),
          y &&
            o.createElement(
              k.$n,
              {
                onClick: (e) => {
                  const t = (0, Y.uX)(e);
                  let a = f.GetUploadImages()[0];
                  (0, O.pg)(
                    o.createElement(te.q, {
                      ownerWin: t,
                      uploadFile: a,
                      forceResolution: { width: n, height: r },
                      fileType: 3,
                    }),
                    t,
                  );
                },
              },
              (0, M.we)("#BBCode_ResizeImage"),
            ),
          Boolean(I && I.bCropped) &&
            o.createElement(
              o.Fragment,
              null,
              o.createElement(
                "div",
                null,
                (0, M.we)("#ClanImagePickAndResize_UploadStatus", I.status),
              ),
              h
                ? o.createElement(X.t, {
                    string: (0, M.we)("#Uploading"),
                    size: "small",
                  })
                : o.createElement(
                    k.$n,
                    {
                      onClick: async () => {
                        S(!0);
                        try {
                          const e = await f.UploadAllImages(
                              [oe.TU.k_ESteamRealmGlobal],
                              C,
                              s,
                              l,
                            ),
                            a = Object.values(e);
                          if (
                            a &&
                            a.length > 0 &&
                            ((0, ee.w)(
                              1 == a.length,
                              "ClanImagePickForCertainSize expected size 1, got " +
                                a.length,
                            ),
                            1 == a[0].success)
                          ) {
                            const e = a[0],
                              n = (0, g.mJ)() + t.GetAccountID() + "/",
                              r = _.i6.GetExtensionStringForFileType(
                                e.file_type,
                              ),
                              o = n + e.image_hash + r,
                              s = n + e.thumbnail_hash + r,
                              l = {
                                imageid: -11231412,
                                image_hash: e.image_hash,
                                thumbnail_hash: e.thumbnail_hash,
                                file_type: e.file_type,
                                file_name: e.file_name,
                                clanAccountID: t.GetAccountID(),
                                url: o,
                                thumb_url: s,
                                uploaded_time: Date.now() / 1e3,
                                loc_languages: void 0,
                                is_loc_group: !1,
                              };
                            p(l), i(l);
                          }
                        } finally {
                          S(!1);
                        }
                      },
                    },
                    (0, M.we)("#ClanImagePickAndResize_UploadImage"),
                  ),
            ),
          o.createElement(
            k.$n,
            {
              onClick: (e) => {
                const t = new m.b(z.UF.CLANSTEAMID);
                (0, O.pg)(
                  o.createElement(ae.z, {
                    clanSteamID: t,
                    fnImageSelectCallBack: (e) => E(e),
                  }),
                  (0, Y.uX)(e),
                );
              },
            },
            (0, M.we)("#BBCode_ChooseImage", n, r),
          ),
        );
      });
      var le,
        ce = a(68797);
      let me = class extends o.Component {
        static {
          le = this;
        }
        m_cancelSignal = r().CancelToken.source();
        static s_formattingHelp = new Map();
        constructor(e) {
          super(e),
            (this.state = {
              formattingHelp: {
                __html: le.s_formattingHelp.has(e.formatType)
                  ? le.s_formattingHelp.get(e.formatType)
                  : "",
              },
            });
        }
        componentDidMount() {
          this.AjaxGetFormattingHelp().catch((e) => {
            this.setState((0, ce.H)(e));
          });
        }
        componentWillUnmount() {
          this.m_cancelSignal.cancel(
            "FormattingHelpWidget component unmounted",
          );
        }
        static GetHelpURL(e, t) {
          return (
            z.TS.COMMUNITY_BASE_URL +
            "comment/" +
            e +
            "/formattinghelp" +
            (t ? "?ajax=1" : "")
          );
        }
        async AjaxGetFormattingHelp() {
          if ("" == this.state.formattingHelp.__html) {
            let e,
              t = { sessionid: z.TS.SESSIONID };
            (e = await r().get(le.GetHelpURL(this.props.formatType, !0), {
              params: t,
              cancelToken: this.m_cancelSignal.token,
            })),
              le.s_formattingHelp.set(this.props.formatType, e.data),
              this.setState({ formattingHelp: { __html: e.data } });
          }
        }
        render() {
          return this.state.strErrorMsg
            ? o.createElement(
                "div",
                null,
                this.state.strErrorMsg,
                o.createElement("br", null),
                this.state.errorCode,
              )
            : "" == this.state.formattingHelp.__html
              ? o.createElement(X.t, null)
              : o.createElement(
                  P.o0,
                  {
                    strTitle: (0, M.we)(
                      "#EventEditor_FormattingHelp_GetHelpLink",
                    ),
                    strDescription: "",
                    closeModal: this.props.closeModal,
                    onOK: this.props.closeModal,
                    onCancel: this.props.closeModal,
                    bAlertDialog: !0,
                    className: "ModernBBStyles",
                  },
                  o.createElement("div", {
                    dangerouslySetInnerHTML: this.state.formattingHelp,
                  }),
                );
        }
      };
      me = le = (0, d.Cg)([i.PA], me);
      var pe,
        de = a(12611),
        ue = a(74410),
        he = a(26408);
      let ge = class extends o.Component {
        descAutoTextAreaRef = o.createRef();
        constructor(e) {
          super(e), (this.state = { bShowDragTarget: !1 });
        }
        componentDidMount() {
          _.pU.AddClanImageDragListener(this.ClanImageDragListener);
        }
        componentWillUnmount() {
          _.pU.RemoveClanImageDragListener(this.ClanImageDragListener);
        }
        ClanImageDragListener(e, t) {
          this.state.bShowDragTarget != t &&
            this.setState({ bShowDragTarget: t });
        }
        onFocus(e) {
          e && e.target.select();
        }
        InsertText(e) {
          _e.replaceSelection(this.GetTextAreaRef().current, e);
        }
        OnTextAreaDropListener(e) {
          if (
            (e.preventDefault(),
            e.stopPropagation(),
            e.dataTransfer.items && e.dataTransfer.items[0])
          ) {
            let t = e.dataTransfer.getData("text");
            if (t && t.length > 0) {
              let e = (0, g.mJ)();
              if (t.startsWith(e)) {
                let a = "[img]" + de.lw + "/" + t.substr(e.length) + "[/img]";
                _e.replaceSelection(this.GetTextAreaRef().current, a);
              }
            }
          }
        }
        GetTextAreaRef() {
          return this.descAutoTextAreaRef && this.descAutoTextAreaRef.current
            ? this.descAutoTextAreaRef.current.GetTextAreaRef()
            : void 0;
        }
        render() {
          return o.createElement(
            o.Fragment,
            null,
            o.createElement(Se, {
              pathToImages:
                z.TS.COMMUNITY_CDN_URL + "public/images/sharedfiles/guides/",
              fnTextareaRef: this.GetTextAreaRef,
              emoticonStore: this.props.emoticonStore,
              supportBBCodes: this.props.limitBBCode
                ? this.props.limitBBCode
                : s.Kl,
              bSupportHTMLImport: this.props.bSupportHTMLImport,
              showFormatHelp: this.props.showFormatHelp,
              bEmbeddedInDialog: this.props.bEmbeddedInDialog,
              clanSteamID: this.props.clanSteamID,
            }),
            o.createElement(
              "div",
              {
                className: (0, y.A)(
                  J().DescriptionCtn,
                  J().BBCodeEditorInputStyles,
                  this.state.bShowDragTarget ? J().DragTarget : "",
                ),
              },
              o.createElement(N, {
                cols: 90,
                rows: this.props.nOverridesRows || 22,
                maxLength: 32e3,
                className: (0, y.A)(
                  J().DefaultEditor,
                  this.props.classNameForTextArea
                    ? this.props.classNameForTextArea
                    : "",
                ),
                placeholder: this.props.strPlaceholder,
                ref: this.descAutoTextAreaRef,
                value: this.props.fnGetCurText(),
                onChange: this.props.fnOnTextChange,
                onDrop: this.OnTextAreaDropListener,
                emoticonStore: this.props.emoticonStore,
                fnSetText: this.props.fnSetText,
                supportBBCodes: this.props.limitBBCode
                  ? this.props.limitBBCode
                  : s.Kl,
              }),
            ),
          );
        }
      };
      (0, d.Cg)([C.oI], ge.prototype, "ClanImageDragListener", null),
        (0, d.Cg)([C.oI], ge.prototype, "onFocus", null),
        (0, d.Cg)([C.oI], ge.prototype, "OnTextAreaDropListener", null),
        (0, d.Cg)([C.oI], ge.prototype, "GetTextAreaRef", null),
        (ge = (0, d.Cg)([i.PA], ge));
      class _e {
        static BIsFireFox() {
          return Boolean(
            new RegExp(/Firefox\/([0-9\.]+)(?:\s|$)/i).exec(
              navigator.userAgent,
            ),
          );
        }
        static replaceSelection(e, t) {
          let a = e.selectionStart;
          e.focus(),
            _e.InsertTextAtSelect(t, e),
            e.setSelectionRange(a, a + t.length);
        }
        static getSelectedString(e) {
          return e.value.substr(
            e.selectionStart,
            e.selectionEnd - e.selectionStart,
          );
        }
        static wrapBBCode(e, t, a) {
          let n = _e.getSelectedString(a),
            r = "";
          (r =
            0 == n.indexOf(e) && n.lastIndexOf(t) == n.length - t.length
              ? n.substr(e.length, n.length - e.length - t.length)
              : e + n + t),
            _e.replaceSelection(a, r);
        }
        static append(e, t) {
          t &&
            (t.focus(),
            t.setSelectionRange(t.value.length, t.value.length),
            _e.InsertTextAtSelect(e, t));
        }
        static ClearTextArea(e) {
          if (e) {
            e.focus();
            const t = 0,
              a = e.value.length;
            if (t !== a) {
              e.setRangeText
                ? e.setRangeText("", t, a, "preserve")
                : (e.value = "");
              const n = new Event("input", { bubbles: !0 });
              e.dispatchEvent(n);
            }
            e.focus();
          }
        }
        static overwrite(e, t) {
          t && (_e.ClearTextArea(t), _e.InsertTextAtSelect(e, t));
        }
        static InsertTextAtSelect(e, t) {
          const a = t.selectionStart,
            n = t.selectionEnd;
          if (null !== a && null !== n) {
            t.setRangeText
              ? t.setRangeText(e, a, n, "preserve")
              : (t.value = t.value.slice(0, a) + e + t.value.slice(n));
            const r = new Event("input", { bubbles: !0 });
            t.dispatchEvent(r),
              (t.selectionStart = t.selectionEnd = a + e.length);
          }
          t.focus();
        }
      }
      let Se = class extends o.Component {
        m_linkPopupRef = o.createRef();
        onBold() {
          _e.wrapBBCode("[b]", "[/b]", this.props.fnTextareaRef().current);
        }
        onItalics() {
          _e.wrapBBCode("[i]", "[/i]", this.props.fnTextareaRef().current);
        }
        onUnderline() {
          _e.wrapBBCode("[u]", "[/u]", this.props.fnTextareaRef().current);
        }
        onStrikeThrough() {
          _e.wrapBBCode(
            "[strike]",
            "[/strike]",
            this.props.fnTextareaRef().current,
          );
        }
        onHeader() {
          _e.wrapBBCode("[h1]", "[/h1]", this.props.fnTextareaRef().current);
        }
        onHeader2() {
          _e.wrapBBCode("[h2]", "[/h2]", this.props.fnTextareaRef().current);
        }
        onHeader3() {
          _e.wrapBBCode("[h3]", "[/h3]", this.props.fnTextareaRef().current);
        }
        onUnorderedList() {
          this.handleList("list");
        }
        onOrderedList() {
          this.handleList("olist");
        }
        handleList(e) {
          let t = this.props.fnTextareaRef().current,
            a = "[" + e + "]\n",
            n = "[/" + e + "]";
          if (t.selectionStart == t.selectionEnd)
            _e.wrapBBCode(a + "[*]", "\n" + n, t);
          else {
            let e =
              a +
              _e
                .getSelectedString(t)
                .split("\n")
                .map((e) => (e.match(/\*+\s/) ? "[*]" : "[*] ") + e)
                .join("\n") +
              "\n" +
              n;
            _e.replaceSelection(t, e);
          }
        }
        OnAddLink(e) {
          (0, O.HT)(
            o.createElement(Ee, { textareaRef: this.props.fnTextareaRef() }),
            (0, Y.uX)(e),
          );
        }
        ShowHelpDialog(e) {
          this.props.showFormatHelp &&
            (0, O.HT)(
              o.createElement(me, { formatType: this.props.showFormatHelp }),
              (0, Y.uX)(e),
            );
        }
        OnConvertHTMLToBBCodeDialog(e) {
          const t = (0, Y.uX)(e);
          (0, O.HT)(
            o.createElement(be, {
              ownerWindow: t,
              textareaRef: this.props.fnTextareaRef(),
            }),
            t,
          );
        }
        OnOpenYoutubeDialog(e) {
          let t = z.TS.IMG_URL + "applications/community/";
          (0, O.HT)(
            o.createElement(fe, {
              textareaRef: this.props.fnTextareaRef(),
              pathToImages: t,
            }),
            (0, Y.uX)(e),
          );
        }
        OnOpenImageDialog(e) {
          (0, O.HT)(
            o.createElement(Ie, { textareaRef: this.props.fnTextareaRef() }),
            (0, Y.uX)(e),
          );
        }
        OnOpenSpeakerDialog(e) {
          (0, O.pg)(
            o.createElement(ve, {
              clanSteamID: this.props.clanSteamID,
              textareaRef: this.props.fnTextareaRef(),
            }),
            (0, Y.uX)(e),
          );
        }
        OnEmoticonSelected(e, t = !1) {
          let a = `ː${e}ː`;
          _e.replaceSelection(this.props.fnTextareaRef().current, a),
            this.props.fnTextareaRef().current.focus();
        }
        BSupports(e) {
          return this.props.supportBBCodes.findIndex((t) => t == e) >= 0;
        }
        render() {
          const {
            showFormatHelp: e,
            bEmbeddedInDialog: t,
            bSupportHTMLImport: a,
            pathToImages: n,
          } = this.props;
          let r;
          return (
            e &&
              (r = t
                ? o.createElement(
                    "span",
                    { className: (0, y.A)("ttip", J().ActionGetHelp) },
                    o.createElement(
                      $.he,
                      {
                        toolTipContent: (0, M.we)(
                          "#EventEditor_FormattingHelp_GetHelpLink",
                        ),
                      },
                      o.createElement(
                        "a",
                        {
                          href: me.GetHelpURL(this.props.showFormatHelp, !1),
                          target: z.TS.IN_CLIENT ? void 0 : "_blank",
                        },
                        o.createElement("img", { src: n + "/action_help.png" }),
                        " ",
                        (0, M.we)("#EventEditor_FormattingHelp_GetHelpLink"),
                      ),
                    ),
                  )
                : o.createElement(
                    "span",
                    {
                      onClick: this.ShowHelpDialog,
                      className: (0, y.A)("ttip", J().ActionGetHelp),
                    },
                    o.createElement(
                      $.he,
                      {
                        toolTipContent: (0, M.we)(
                          "#EventEditor_FormattingHelp_GetHelpLink",
                        ),
                      },
                      o.createElement("img", { src: n + "/action_help.png" }),
                      " ",
                      (0, M.we)("#EventEditor_FormattingHelp_GetHelpLink"),
                    ),
                  )),
            o.createElement(
              "div",
              { className: J().TextEditorToolBarContainer },
              this.BSupports("b") &&
                o.createElement(Ce, {
                  onClick: this.onBold,
                  tooltip: (0, M.we)("#Editor_Bold"),
                  imgURL: this.props.pathToImages + "/format_bold.png",
                }),
              this.BSupports("u") &&
                o.createElement(Ce, {
                  onClick: this.onUnderline,
                  tooltip: (0, M.we)("#Editor_Underline"),
                  imgURL: this.props.pathToImages + "/format_underline.png",
                }),
              this.BSupports("i") &&
                o.createElement(Ce, {
                  onClick: this.onItalics,
                  tooltip: (0, M.we)("#Editor_Italics"),
                  imgURL: this.props.pathToImages + "/format_italic.png",
                }),
              this.BSupports("strike") &&
                o.createElement(Ce, {
                  onClick: this.onStrikeThrough,
                  tooltip: (0, M.we)("#Editor_StrikeThrough"),
                  imgURL: this.props.pathToImages + "/format_strike.png",
                }),
              Boolean(this.BSupports("url") && !t) &&
                o.createElement(Ce, {
                  onClick: this.OnAddLink,
                  tooltip: (0, M.we)("#Editor_Link"),
                  imgURL: this.props.pathToImages + "/format_link.png",
                }),
              this.BSupports("list") &&
                o.createElement(Ce, {
                  onClick: this.onUnorderedList,
                  tooltip: (0, M.we)("#Editor_Unordered"),
                  imgURL: this.props.pathToImages + "/format_bullet.png",
                }),
              this.BSupports("olist") &&
                o.createElement(Ce, {
                  onClick: this.onOrderedList,
                  tooltip: (0, M.we)("#Editor_Ordered"),
                  imgURL: this.props.pathToImages + "/format_numbered.png",
                }),
              this.BSupports("h1") &&
                o.createElement(Ce, {
                  onClick: this.onHeader,
                  tooltip: (0, M.we)("#Editor_Header"),
                  imgURL: this.props.pathToImages + "/format_header1.png",
                }),
              this.BSupports("h2") &&
                o.createElement(Ce, {
                  onClick: this.onHeader2,
                  tooltip: (0, M.we)("#Editor_Header2"),
                  imgURL: this.props.pathToImages + "/format_header2.png",
                }),
              this.BSupports("h3") &&
                o.createElement(Ce, {
                  onClick: this.onHeader3,
                  tooltip: (0, M.we)("#Editor_Header3"),
                  imgURL: this.props.pathToImages + "/format_header3.png",
                }),
              this.BSupports("previewyoutube") &&
                o.createElement(Ce, {
                  onClick: this.OnOpenYoutubeDialog,
                  tooltip: (0, M.we)("#EventEditor_InsertYouTube"),
                  imgURL:
                    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkYyNjlFOEM1MjJEMzExRTJCNTVBQkZGOUQyOTI0ODU5IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkYyNjlFOEM2MjJEMzExRTJCNTVBQkZGOUQyOTI0ODU5Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6RjI2OUU4QzMyMkQzMTFFMkI1NUFCRkY5RDI5MjQ4NTkiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6RjI2OUU4QzQyMkQzMTFFMkI1NUFCRkY5RDI5MjQ4NTkiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4IrEPeAAABJ0lEQVR42mL8//8/AzmABUScEOZJI1HfLBaoppmk2sh4Ql/r/69HD0jSxCanwMD07eVzhl9ADgz/ZmJikMjOY2CUlEIRR8YgPYzbBLhQQoeJl4/B7uY9hv9//jC8XLWc4UFfD8OPZ08xbGX6CSSQ8XdgKH/79o3h+69fDHwBwQy6ew8ySOYXMfxiZERRx/ILPTqA/K9fv8K5f4EG3Pn5i+EfSB2SWpaf6G6A2vgP6NSrWzYz3J8zk0Hk9SsGVka0ePzLxs7w9ydC+3+gpn29PQzv9uxiEHz7mkEY6ESQPb+QHMbMwcHAwiotw/Dj3h2E6L+/DIyrljKIgCMLGMoMmCmLQ0qagdnh66fn/xgYfP+B9BCJv79/lw5KcrPISKqzGMlN5AABBgBSmY83jVsiQAAAAABJRU5ErkJggg==",
                }),
              o.createElement(
                "span",
                { className: "ttip" },
                this.props.emoticonStore &&
                  o.createElement(
                    $.he,
                    { toolTipContent: (0, M.we)("#Editor_Emoticon") },
                    o.createElement(R.A, {
                      title: " ",
                      className: (0, y.A)(J().EmoteOuter),
                      disabled: !1,
                      OnEmoticonSelected: this.OnEmoticonSelected,
                      rtLastAckedNewEmoticons: Number.MAX_VALUE,
                      emoticonStore: this.props.emoticonStore,
                      emoticonHoverStore: S.s,
                      useImg: this.props.pathToImages + "/format_emote.png",
                      contextOptions: {
                        bOverlapHorizontal: !0,
                        bDisablePopTop: !0,
                      },
                    }),
                  ),
              ),
              Boolean(this.BSupports("img") && !t) &&
                o.createElement(Ce, {
                  onClick: this.OnOpenImageDialog,
                  tooltip: (0, M.we)("#EventEditor_InsertImage"),
                  imgURL: this.props.pathToImages + "/insert_img.png",
                }),
              Boolean(
                z.iA.is_support &&
                  this.props.clanSteamID &&
                  this.BSupports("speaker"),
              ) &&
                o.createElement(Ce, {
                  onClick: this.OnOpenSpeakerDialog,
                  tooltip: (0, M.we)("#EventEditor_AddSpeaker"),
                  imgURL: this.props.pathToImages + "/insert_img.png",
                }),
              Boolean(a && !t) &&
                o.createElement(
                  Ce,
                  {
                    onClick: this.OnConvertHTMLToBBCodeDialog,
                    className: J().ActionImportHTML,
                    tooltip: (0, M.we)("#EventEditor_ImportFromHTML_ttip"),
                  },
                  (0, M.we)("#EventEditor_ImportHTML"),
                ),
              r,
            )
          );
        }
      };
      function Ce(e) {
        return o.createElement(
          "span",
          { onClick: e.onClick, className: e.className },
          o.createElement(
            $.he,
            { toolTipContent: e.tooltip, className: "ttip" },
            Boolean(e.imgURL) && o.createElement("img", { src: e.imgURL }),
            e.children,
          ),
        );
      }
      (0, d.Cg)([C.oI], Se.prototype, "onBold", null),
        (0, d.Cg)([C.oI], Se.prototype, "onItalics", null),
        (0, d.Cg)([C.oI], Se.prototype, "onUnderline", null),
        (0, d.Cg)([C.oI], Se.prototype, "onStrikeThrough", null),
        (0, d.Cg)([C.oI], Se.prototype, "onHeader", null),
        (0, d.Cg)([C.oI], Se.prototype, "onHeader2", null),
        (0, d.Cg)([C.oI], Se.prototype, "onHeader3", null),
        (0, d.Cg)([C.oI], Se.prototype, "onUnorderedList", null),
        (0, d.Cg)([C.oI], Se.prototype, "onOrderedList", null),
        (0, d.Cg)([C.oI], Se.prototype, "OnAddLink", null),
        (0, d.Cg)([C.oI], Se.prototype, "ShowHelpDialog", null),
        (0, d.Cg)([C.oI], Se.prototype, "OnConvertHTMLToBBCodeDialog", null),
        (0, d.Cg)([C.oI], Se.prototype, "OnOpenYoutubeDialog", null),
        (0, d.Cg)([C.oI], Se.prototype, "OnOpenImageDialog", null),
        (0, d.Cg)([C.oI], Se.prototype, "OnOpenSpeakerDialog", null),
        (0, d.Cg)([C.oI], Se.prototype, "OnEmoticonSelected", null),
        (Se = (0, d.Cg)([i.PA], Se));
      let fe = class extends o.Component {
        state = { youtubeInput: "", alignment: ue.V2.left };
        OnYoutubeInsertLink() {
          const e =
            this.state.youtubeInput && (0, h.XU)(this.state.youtubeInput);
          if (e) {
            if (this.state.alignment == ue.V2.summary) {
              const t =
                "https://www.youtube.com/watch?v=" +
                e.strVideoID +
                (e.nStartSeconds ? "&t=" + e.nStartSeconds : "");
              _e.wrapBBCode(t, "", this.props.textareaRef.current);
            } else {
              let t =
                "[previewyoutube=" +
                e.strVideoID +
                ";" +
                this.state.alignment +
                "]";
              _e.wrapBBCode(
                t,
                "[/previewyoutube]",
                this.props.textareaRef.current,
              );
            }
            this.setState({ youtubeInput: "", alignment: ue.V2.left });
          } else alert((0, M.we)("#EventEditor_InsertYouTube_NoURL"));
        }
        OnUrlChange(e) {
          this.state.youtubeInput != e.target.value &&
            this.setState({ youtubeInput: e.target.value });
        }
        OnLeftSelected() {
          this.setState({ alignment: ue.V2.left });
        }
        OnRightSelected() {
          this.setState({ alignment: ue.V2.right });
        }
        OnFullSelected() {
          this.setState({ alignment: ue.V2.full });
        }
        OnSummarySelected() {
          this.setState({ alignment: ue.V2.summary });
        }
        OnOuterDivClickPassDown(e) {}
        render() {
          return o.createElement(
            P.o0,
            {
              strTitle: (0, M.we)("#EventEditor_InsertYouTube"),
              strDescription: "",
              closeModal: this.props.closeModal,
              onCancel: this.props.closeModal,
              onOK: this.OnYoutubeInsertLink,
              strOKButtonText: (0, M.we)("#EventEditor_InsertYouTube"),
              className: J().BBCodeEditorInputStyles,
            },
            o.createElement(
              "div",
              { className: J().YouTubeInput },
              o.createElement(
                "div",
                { className: "DialogInputLabelGroup" },
                o.createElement(
                  "label",
                  null,
                  o.createElement(
                    "div",
                    { className: "DialogLabel" },
                    (0, M.we)("#EventEditor_InsertYouTube_URL"),
                  ),
                  o.createElement(
                    "div",
                    { className: "DialogInput_Wrapper" },
                    o.createElement("input", {
                      className: "DialogInput DialogTextInputBase",
                      ref: (e) => e && e.focus(),
                      type: "text",
                      value: this.state.youtubeInput,
                      onChange: this.OnUrlChange,
                      placeholder: (0, M.we)(
                        "#EventEditor_InsertYouTube_Placholder",
                      ),
                    }),
                  ),
                ),
              ),
              o.createElement(
                "div",
                { className: "DialogInputLabelGroup" },
                o.createElement(
                  "div",
                  { className: "DialogLabel" },
                  (0, M.we)("#EventEditor_InsertYouTube_Position"),
                ),
                o.createElement(
                  "div",
                  {
                    className: J().YouTubePreviewInsertOption,
                    onClick: this.OnOuterDivClickPassDown,
                  },
                  o.createElement("input", {
                    type: "radio",
                    name: "YouTubePreviewInsertType",
                    id: ue.V2.left,
                    value: ue.V2.left,
                    checked: this.state.alignment == ue.V2.left,
                    onChange: this.OnLeftSelected,
                  }),
                  o.createElement(
                    "label",
                    { htmlFor: ue.V2.left },
                    o.createElement(
                      "span",
                      null,
                      (0, M.we)("#EventEditor_InsertYouTube_Left"),
                    ),
                  ),
                ),
                o.createElement(
                  "div",
                  {
                    className: J().YouTubePreviewInsertOption,
                    onClick: this.OnOuterDivClickPassDown,
                  },
                  o.createElement("input", {
                    type: "radio",
                    name: "YouTubePreviewInsertType",
                    id: ue.V2.right,
                    value: ue.V2.right,
                    checked: this.state.alignment == ue.V2.right,
                    onChange: this.OnRightSelected,
                  }),
                  o.createElement(
                    "label",
                    { htmlFor: ue.V2.right },
                    o.createElement(
                      "span",
                      null,
                      (0, M.we)("#EventEditor_InsertYouTube_Right"),
                    ),
                  ),
                ),
                o.createElement(
                  "div",
                  {
                    className: J().YouTubePreviewInsertOption,
                    onClick: this.OnOuterDivClickPassDown,
                  },
                  o.createElement("input", {
                    type: "radio",
                    name: "YouTubePreviewInsertType",
                    id: ue.V2.full,
                    value: ue.V2.full,
                    checked: this.state.alignment == ue.V2.full,
                    onChange: this.OnFullSelected,
                  }),
                  o.createElement(
                    "label",
                    { htmlFor: ue.V2.full },
                    o.createElement(
                      "span",
                      null,
                      (0, M.we)("#EventEditor_InsertYouTube_Full"),
                    ),
                  ),
                ),
                o.createElement(
                  "div",
                  {
                    className: J().YouTubePreviewInsertOption,
                    onClick: this.OnOuterDivClickPassDown,
                  },
                  o.createElement("input", {
                    type: "radio",
                    name: "YouTubePreviewInsertType",
                    id: ue.V2.summary,
                    value: ue.V2.summary,
                    checked: this.state.alignment == ue.V2.summary,
                    onChange: this.OnSummarySelected,
                  }),
                  o.createElement(
                    "label",
                    { htmlFor: ue.V2.summary },
                    o.createElement(
                      "span",
                      null,
                      (0, M.we)("#EventEditor_InsertYouTube_Summary"),
                    ),
                  ),
                ),
              ),
            ),
          );
        }
      };
      (0, d.Cg)([C.oI], fe.prototype, "OnYoutubeInsertLink", null),
        (0, d.Cg)([C.oI], fe.prototype, "OnUrlChange", null),
        (0, d.Cg)([C.oI], fe.prototype, "OnLeftSelected", null),
        (0, d.Cg)([C.oI], fe.prototype, "OnRightSelected", null),
        (0, d.Cg)([C.oI], fe.prototype, "OnFullSelected", null),
        (0, d.Cg)([C.oI], fe.prototype, "OnSummarySelected", null),
        (0, d.Cg)([C.oI], fe.prototype, "OnOuterDivClickPassDown", null),
        (fe = (0, d.Cg)([i.PA], fe));
      let Ee = class extends o.Component {
        static {
          pe = this;
        }
        state = { textToDisplay: "", strURL: "" };
        static m_regExp = new RegExp(/\[url=([^\]]*)\]([^\[\]]+)\[\/url\]/i);
        LoadFromTextArea() {
          const { textareaRef: e } = this.props;
          if (e && e.current) {
            let t = _e.getSelectedString(e.current),
              a = pe.m_regExp.exec(t);
            a
              ? this.setState({ strURL: a[1], textToDisplay: a[2] })
              : this.setState({ textToDisplay: t });
          }
        }
        componentDidMount() {
          this.LoadFromTextArea();
        }
        onLinkTitleUpdate(e) {
          this.setState({ textToDisplay: e.target.value });
        }
        onLinkURLUpdate(e) {
          this.setState({ strURL: e.target.value });
        }
        onInsertLink() {
          const { strURL: e, textToDisplay: t } = this.state;
          let a = "[url=" + e + "]" + t + "[/url]";
          _e.replaceSelection(this.props.textareaRef.current, a);
        }
        render() {
          return o.createElement(
            P.o0,
            {
              strTitle: (0, M.we)("#Editor_Link"),
              strDescription: "",
              closeModal: this.props.closeModal,
              onOK: this.onInsertLink,
              onCancel: this.props.closeModal,
              strOKButtonText: (0, M.we)("#EventEditor_InsertLinkURL"),
              className: J().BBCodeEditorInputStyles,
            },
            o.createElement(
              "div",
              { className: J().EventEditorLinkInput },
              o.createElement(
                "div",
                { className: "DialogInputLabelGroup" },
                o.createElement(
                  "label",
                  null,
                  o.createElement(
                    "div",
                    { className: "DialogLabel" },
                    (0, M.we)("#EventEditor_LinkDescription"),
                  ),
                  o.createElement(
                    "div",
                    { className: "DialogInput_Wrapper" },
                    o.createElement("input", {
                      type: "text",
                      onChange: this.onLinkTitleUpdate,
                      value: this.state.textToDisplay,
                      className: "DialogInput DialogTextInputBase",
                    }),
                  ),
                ),
              ),
              o.createElement(
                "div",
                { className: "DialogInputLabelGroup" },
                o.createElement(
                  "label",
                  null,
                  o.createElement(
                    "div",
                    { className: "DialogLabel" },
                    (0, M.we)("#EventEditor_LinkURL"),
                  ),
                  o.createElement(
                    "div",
                    { className: "DialogInput_Wrapper" },
                    o.createElement("input", {
                      type: "text",
                      onChange: this.onLinkURLUpdate,
                      value: this.state.strURL,
                      className: "DialogInput DialogTextInputBase",
                    }),
                  ),
                ),
              ),
            ),
          );
        }
      };
      (0, d.Cg)([C.oI], Ee.prototype, "onLinkTitleUpdate", null),
        (0, d.Cg)([C.oI], Ee.prototype, "onLinkURLUpdate", null),
        (0, d.Cg)([C.oI], Ee.prototype, "onInsertLink", null),
        (Ee = pe = (0, d.Cg)([i.PA], Ee));
      let Ie = class extends o.Component {
        refFirstInput;
        state = { imgURL: "", anchorURL: "" };
        componentDidMount() {
          this.refFirstInput && this.refFirstInput.current.focus();
        }
        OnImageInsert() {
          const { anchorURL: e, imgURL: t } = this.state;
          let a = "",
            n = "";
          e && e.length > 0 && ((a += "[url=" + e + "]"), (n = "[/url]" + n)),
            (a += "[img]" + t),
            (n = "[/img]" + n),
            _e.wrapBBCode(a, n, this.props.textareaRef.current);
        }
        OnImageURLChange(e) {
          this.state.imgURL != e.target.value &&
            this.setState({ imgURL: e.target.value });
        }
        OnAnchorURLChange(e) {
          this.state.anchorURL != e.target.value &&
            this.setState({ anchorURL: e.target.value });
        }
        render() {
          const { imgURL: e, anchorURL: t } = this.state;
          return o.createElement(
            P.o0,
            {
              strTitle: (0, M.we)("#EventEditor_InsertImage_Title"),
              strDescription: "",
              closeModal: this.props.closeModal,
              onCancel: this.props.closeModal,
              onOK: this.OnImageInsert,
              strOKButtonText: (0, M.we)("#EventEditor_InsertImage_Title"),
              className: J().BBCodeEditorInputStyles,
            },
            o.createElement(
              "div",
              { className: J().EventEditorLinkInput },
              o.createElement(
                "p",
                null,
                (0, M.we)("#EventEditor_InsertImage_Desc"),
              ),
              o.createElement(
                "div",
                { className: "DialogInputLabelGroup" },
                o.createElement(
                  "label",
                  null,
                  o.createElement(
                    "div",
                    { className: "DialogLabel" },
                    (0, M.we)("#EventEditor_InsertImage_URL"),
                  ),
                  o.createElement(
                    "div",
                    { className: "DialogInput_Wrapper" },
                    o.createElement("input", {
                      className: "DialogInput DialogTextInputBase",
                      type: "text",
                      value: e,
                      onChange: this.OnImageURLChange,
                      placeholder: (0, M.we)(
                        "#EventEditor_InsertImage_Placeholder",
                      ),
                      ref: this.refFirstInput,
                    }),
                  ),
                ),
              ),
              o.createElement(
                "div",
                { className: "DialogInputLabelGroup" },
                o.createElement(
                  "label",
                  null,
                  o.createElement(
                    "div",
                    { className: "DialogLabel" },
                    (0, M.we)("#EventEditor_InsertImage_Anchor"),
                  ),
                  o.createElement(
                    "div",
                    { className: "DialogInput_Wrapper" },
                    o.createElement("input", {
                      className: "DialogInput DialogTextInputBase",
                      type: "text",
                      value: t,
                      onChange: this.OnAnchorURLChange,
                      placeholder: (0, M.we)(
                        "#EventEditor_InsertImage_Placeholder",
                      ),
                    }),
                  ),
                ),
              ),
            ),
          );
        }
      };
      (0, d.Cg)([C.oI], Ie.prototype, "OnImageInsert", null),
        (0, d.Cg)([C.oI], Ie.prototype, "OnImageURLChange", null),
        (0, d.Cg)([C.oI], Ie.prototype, "OnAnchorURLChange", null),
        (Ie = (0, d.Cg)([i.PA], Ie));
      const ve = (e) => {
        const [t, a] = o.useState(""),
          [n, r] = o.useState(""),
          [i, s] = o.useState(""),
          [l, c] = o.useState(""),
          [p, d] = o.useState(void 0),
          [h, g] = o.useState(void 0),
          { data: S } = (0, V.Dv)(),
          { isLoading: C, data: f } = (0, j.js)(h?.GetAccountID()),
          E = 0 != t.trim().length && 0 != l.trim().length;
        return o.createElement(
          P.o0,
          {
            strTitle: (0, M.we)("#EventEditor_AddSpeaker"),
            strDescription: (0, M.we)("#EventEditor_AddSpeaker_Desc"),
            closeModal: e.closeModal,
            onCancel: e.closeModal,
            bOKDisabled: !E,
            onOK: () => {
              let a = `[speaker name="${t.trim()}"`;
              if (
                (n.trim().length > 0 && (a += ` title="${n}"`),
                i.trim().length > 0 && (a += ` company="${i}"`),
                p)
              ) {
                a += ` photo="${de.lw + "/" + p.clanAccountID + "/" + _.i6.GetHashAndExt(p)}"`;
              }
              h && (a += ` steamid="${h.ConvertTo64BitString()}"`),
                (a += `]${l}[/speaker]`),
                _e.replaceSelection(e.textareaRef.current, a);
            },
            className: J().BBCodeEditorInputStyles,
          },
          o.createElement(
            "div",
            { className: J().InsertSpeakerCtn },
            o.createElement(k.pd, {
              type: "text",
              label: (0, M.we)("#EventEditor_AddSpeaker_Name"),
              value: t,
              onChange: (e) => a(e.target.value),
              focusOnMount: !0,
            }),
            o.createElement(
              "div",
              { className: J().TitleGroup },
              o.createElement(k.pd, {
                type: "text",
                label: (0, M.we)("#EventEditor_AddSpeaker_Title"),
                value: n,
                onChange: (e) => r(e.target.value),
              }),
              o.createElement(k.pd, {
                type: "text",
                label: (0, M.we)("#EventEditor_AddSpeaker_Company"),
                value: i,
                onChange: (e) => s(e.target.value),
              }),
            ),
            o.createElement(
              $.he,
              {
                toolTipContent: (0, M.we)(
                  "#EventEditor_AssociateSteamAccount_ttip",
                ),
              },
              o.createElement(
                "div",
                { className: "DialogLabel" },
                (0, M.we)("#EventEditor_AssociateSteamAccount"),
                " (?)",
              ),
            ),
            o.createElement(
              "div",
              null,
              C &&
                o.createElement(X.t, {
                  string: (0, M.we)("#Loading"),
                  size: "small",
                }),
              Boolean(f) &&
                o.createElement(
                  "a",
                  {
                    href:
                      z.TS.COMMUNITY_BASE_URL +
                      "profiles/" +
                      h.ConvertTo64BitString(),
                    target: "_blank",
                  },
                  f
                    ? o.createElement("img", {
                        style: { marginRight: "8px" },
                        src: f.avatar_url,
                      })
                    : null,
                  f ? f.m_strPlayerName : null,
                ),
              o.createElement(
                "div",
                { className: J().AssociateRowCtn },
                o.createElement(
                  k.$n,
                  { onClick: () => g(new m.b(z.iA.steamid)) },
                  (0, M.we)("#EventEditor_SteamAccount_addme"),
                ),
                o.createElement(
                  k.$n,
                  {
                    onClick: (e) =>
                      (0, u.lX)(
                        o.createElement(ye, { friends: S, setSteamID: g }),
                        e,
                      ),
                  },
                  (0, M.we)("#EventEditor_SteamAccount_addfriend"),
                ),
                o.createElement(
                  k.$n,
                  { onClick: () => g(void 0) },
                  (0, M.we)("#EventEditor_SteamAccount_clear"),
                ),
              ),
            ),
            o.createElement(
              "div",
              { className: J().PhotoCtn },
              o.createElement(
                "div",
                { className: "DialogLabel" },
                (0, M.we)("#EventEditor_ChoosePhoto"),
              ),
              o.createElement(se, {
                clanSteamID: e.clanSteamID,
                inputClanImage: p,
                setImage: d,
                nWidth: 184,
                nHeight: 184,
              }),
            ),
            o.createElement(
              "div",
              { className: J().AboutCtn },
              o.createElement(
                "div",
                { className: "DialogLabel" },
                (0, M.we)("#EventEditor_AddSpeaker_About"),
              ),
              o.createElement(k.Cl, {
                value: l,
                onChange: (e) => c(e.target.value),
                rows: 8,
                cols: 80,
                nMinHeight: 40,
                placeholder: (0, M.we)(
                  "#EventEditor_AddSpeaker_About_Placeholder",
                ),
              }),
            ),
            o.createElement(
              "div",
              { className: J().PreviewCtn },
              o.createElement(
                "div",
                { className: "DialogLabel" },
                (0, M.we)("#Button_Preview"),
              ),
              o.createElement(K.$k, {
                company: i,
                name: t,
                title: n,
                bioString: l,
                photo: p ? p.url : void 0,
              }),
            ),
          ),
        );
      };
      function ye(e) {
        const { friends: t, setSteamID: a } = e;
        return o.createElement(
          "div",
          { className: J().DropDownScroll },
          t.map((e) =>
            o.createElement(we, { key: e, steamid: e, setSteamID: a }),
          ),
        );
      }
      function we(e) {
        const { steamid: t, setSteamID: a } = e,
          { data: n } = (0, j.js)(t);
        return o.createElement(
          Z.kt,
          { onSelected: () => a(new m.b(t)) },
          o.createElement(
            "div",
            { style: { display: "flex", alignItems: "center" } },
            n &&
              o.createElement("img", {
                className: W().WhitelistAvatar,
                src: n.avatar_url,
              }),
            n?.m_strPlayerName,
          ),
        );
      }
      let be = class extends o.Component {
        m_isMounted = !1;
        m_bAppend = !1;
        constructor(e) {
          super(e), (this.state = { bPreserveNewLines: !1, strHTMLData: "" });
        }
        componentDidMount() {
          this.m_isMounted = !0;
        }
        componentWillUnmount() {
          this.m_isMounted = !1;
        }
        OnConvertAndOverriteHTML() {
          (this.m_bAppend = !1), this.ConvertBBCode();
        }
        OnConvertAndAppendHTML() {
          (this.m_bAppend = !0), this.ConvertBBCode();
        }
        async ConvertHtmlToBBCode(e, t) {
          let a = new URLSearchParams();
          a.append("content", e), a.append("preserve_newlines", t ? "1" : "0");
          let n = null;
          return (
            (n = await r().post(
              z.TS.COMMUNITY_BASE_URL + "/actions/ConvertHTMLToBBCode",
              a,
            )),
            n.data.content
          );
        }
        ConvertBBCode() {
          this.setState({ bConverting: !0 }),
            this.ConvertHtmlToBBCode(
              this.state.strHTMLData,
              this.state.bPreserveNewLines,
            )
              .then((e) => {
                this.m_isMounted &&
                  (this.m_bAppend
                    ? _e.append(e, this.props.textareaRef.current)
                    : _e.overwrite(e, this.props.textareaRef.current),
                  this.setState({ bConverting: !1, bFinishedConverting: !0 }));
              })
              .catch((e) => {
                (0, O.pg)(
                  o.createElement(P.KG, {
                    strTitle: (0, M.we)("#EventEditor_ConvertHTML_Error"),
                    strDescription: (0, M.we)(
                      "#EventEditor_ConvertHTML_Error_Desc",
                      e.response && e.response.data ? e.response.data.msg : e,
                    ),
                    bAlertDialog: !0,
                    bDestructiveWarning: !0,
                  }),
                  this.props.ownerWindow,
                  { strTitle: (0, M.we)("#EventEditor_ConvertHTML_Error") },
                );
              });
        }
        OnCheckboxChange(e) {
          let t = e.target.checked;
          t != this.state.bPreserveNewLines &&
            this.setState({ bPreserveNewLines: t });
        }
        OnTextAreaChange(e) {
          this.setState({ strHTMLData: e.currentTarget.value });
        }
        render() {
          const { closeModal: e } = this.props;
          return this.state.bConverting
            ? o.createElement(
                P.o0,
                {
                  strTitle: (0, M.we)("#EventEditor_ImportFromHTML"),
                  strDescription: (0, M.we)(
                    "#EventEditor_ImportFromHTML_ConversionInProgress",
                  ),
                  closeModal: e,
                  bAlertDialog: !0,
                  onOK: e,
                  onCancel: e,
                },
                o.createElement(X.t, null),
              )
            : this.state.bFinishedConverting
              ? o.createElement(P.o0, {
                  strTitle: (0, M.we)("#EventEditor_ImportFromHTML"),
                  strDescription: (0, M.we)(
                    "#EventEditor_ImportFromHTML_ConvertFinished",
                  ),
                  closeModal: e,
                  bAlertDialog: !0,
                  onOK: e,
                  onCancel: e,
                })
              : o.createElement(
                  P.eV,
                  {
                    onOK: this.OnConvertAndOverriteHTML,
                    onCancel: e,
                    className: J().BBCodeEditorInputStyles,
                  },
                  o.createElement(
                    k.Y9,
                    null,
                    " ",
                    (0, M.we)("#EventEditor_ImportFromHTML"),
                    " ",
                  ),
                  o.createElement(
                    k.nB,
                    null,
                    o.createElement(
                      k.a3,
                      null,
                      o.createElement(
                        "div",
                        {
                          className: (0, y.A)(
                            G().FlexColumnContainer,
                            J().ImportHTMLCtn,
                          ),
                        },
                        o.createElement(
                          "div",
                          { className: G().FlexColumnContainer },
                          (0, M.PP)(
                            "#EventEditor_ImportFromHTML_ConvertDescription",
                            o.createElement(
                              "a",
                              {
                                target: z.TS.IN_CLIENT ? void 0 : "_blank",
                                href: "https://partner.steamgames.com/doc/marketing/event_tools/import",
                              },
                              (0, M.we)(
                                "#EventEditor_ImportFromHTML_ConvertLearn",
                              ),
                            ),
                          ),
                        ),
                        o.createElement("textarea", {
                          value: this.state.strHTMLData,
                          placeholder: (0, M.we)(
                            "#EventEditor_ImportFromHTML_Instruction",
                          ),
                          className: J().ImportHTMLTextArea,
                          onChange: this.OnTextAreaChange,
                          ref: (e) => e && e.focus(),
                        }),
                        o.createElement(
                          "div",
                          { className: J().ImportHTMLCheckBoxLine },
                          o.createElement("input", {
                            id: "ImportFromHTMLNewLines",
                            type: "checkbox",
                            checked: this.state.bPreserveNewLines,
                            onChange: this.OnCheckboxChange,
                          }),
                          o.createElement(
                            "label",
                            { htmlFor: "ImportFromHTMLNewLines" },
                            (0, M.we)(
                              "#EventEditor_ImportFromHTML_PreserveNewlines",
                            ),
                            o.createElement(he.o, {
                              tooltip: (0, M.we)(
                                "#EventEditor_ImportFromHTML_PreserveNewlines_Hint",
                              ),
                            }),
                          ),
                        ),
                        o.createElement(
                          "div",
                          null,
                          (0, M.we)(
                            "#EventEditor_ImportFromHTML_ConvertToBBCode",
                          ),
                        ),
                      ),
                    ),
                    o.createElement(
                      k.wi,
                      null,
                      o.createElement(k.VQ, {
                        onCancel: e,
                        strOKText: (0, M.we)("#Button_Overwrite"),
                        onUpdate: this.OnConvertAndAppendHTML,
                        strUpdateText: (0, M.we)("#Button_Append"),
                      }),
                    ),
                  ),
                );
        }
      };
      (0, d.Cg)([C.oI], be.prototype, "OnConvertAndOverriteHTML", null),
        (0, d.Cg)([C.oI], be.prototype, "OnConvertAndAppendHTML", null),
        (0, d.Cg)([C.oI], be.prototype, "OnCheckboxChange", null),
        (0, d.Cg)([C.oI], be.prototype, "OnTextAreaChange", null),
        (be = (0, d.Cg)([i.PA], be));
      var Te = a(48628),
        De = a(86244),
        Ae = a.n(De);
      const Le = (0, i.PA)((e) => {
        const { appid: t, eventLink: a } = e,
          n = o.useRef(null),
          { data: i } = (0, j.js)(z.iA.steamid),
          [d, u] = o.useState(""),
          [h, g] = o.useState(!1),
          [_, S] = o.useState(""),
          [C, f] = o.useState(!1);
        o.useEffect(
          () => () =>
            n.current &&
            n.current("ShareEventOnFriendsActivityFeed: unmounting"),
          [],
        );
        const E = i ? i.avatar_url : null,
          I = m.b.InitFromAccountID(z.iA.accountid),
          v = async () => {
            n.current &&
              n.current("ShareEventOnFriendsActivityFeed: cancel previous...");
            const e = r().CancelToken.source();
            (n.current = e.cancel), g(!0);
            let i = d;
            0 != i.trim().length && (i += "\n\n"), (i += a);
            const o =
              z.TS.COMMUNITY_BASE_URL +
              "profiles/" +
              I.ConvertTo64BitString() +
              "/ajaxpostuserstatus";
            try {
              if (z.TS.IN_STEAMUI) {
                let a = l.w.Init(p.kV);
                a.Body().set_appid(t), a.Body().set_status_text(i);
                let n = await p.xt.PostStatusToFriends(
                  c.Vw.CMInterface.GetServiceTransport(),
                  a,
                );
                if (1 != n.GetEResult()) {
                  const t =
                    (0, M.we)("#EventDisplay_Share_Failure") +
                    "\n\n" +
                    n.GetEResult();
                  return (
                    console.error(t, !e.token.reason),
                    void (e.token.reason || S(t))
                  );
                }
              } else {
                const a = new FormData();
                a.append("appid", "" + t),
                  a.append("status_text", i),
                  a.append("sessionid", z.TS.SESSIONID);
                const n = await r().post(o, a, { withCredentials: !0 });
                if (200 != n.status || 1 != n?.data?.success) {
                  const t =
                    (0, M.we)("#EventDisplay_Share_Failure") +
                    "\n\n" +
                    n?.data?.message;
                  return console.error(t), void (e.token.reason || S(t));
                }
              }
              e.token.reason ||
                (f(!0), S((0, M.we)("#EventDisplay_Share_Success")));
            } catch (t) {
              const a = (0, ce.H)(t),
                n =
                  (0, M.we)("#EventDisplay_Share_Failure") +
                  "\n\n" +
                  a.strErrorMsg;
              e.token.reason || S(n), console.error(n);
            }
          };
        return h
          ? o.createElement(
              P.o0,
              {
                strDescription: "",
                strTitle: (0, M.we)("#Button_Share"),
                onCancel: e.closeModal,
                onOK: e.closeModal,
                bAlertDialog: !0,
              },
              o.createElement(
                "div",
                { className: G().FlexColumnContainer },
                o.createElement(
                  "div",
                  null,
                  (0, M.we)("#EventDisplay_Share_OnMyStatus_Details"),
                ),
                o.createElement(
                  "div",
                  { className: Ae().Container },
                  0 == _?.length
                    ? o.createElement(X.t, { position: "center" })
                    : o.createElement("div", null, _),
                  Boolean(C) &&
                    o.createElement(
                      "a",
                      {
                        href:
                          z.TS.COMMUNITY_BASE_URL +
                          "profiles/" +
                          I.ConvertTo64BitString() +
                          "/home",
                        target: z.TS.IN_CLIENT ? void 0 : "_blank",
                      },
                      (0, M.we)("#EventDisplay_Share_OpenActivityFeed"),
                    ),
                ),
              ),
            )
          : o.createElement(
              P.o0,
              {
                strDescription: "",
                strTitle: (0, M.we)("#Button_Share"),
                onCancel: e.closeModal,
                onOK: v,
                strOKButtonText: (0, M.we)("#Button_Post"),
              },
              o.createElement(
                "div",
                { className: G().FlexColumnContainer },
                o.createElement(
                  "div",
                  null,
                  (0, M.we)("#EventDisplay_Share_OnMyStatus_Details"),
                ),
                o.createElement(
                  "div",
                  {
                    className: (0, y.A)(
                      Ae().Container,
                      G().FlexColumnContainer,
                    ),
                  },
                  o.createElement(
                    "div",
                    null,
                    o.createElement("img", {
                      className: Ae().SmallAvatar,
                      src: E,
                      "data-miniprofile": "s" + z.iA.steamid,
                    }),
                    o.createElement(
                      "div",
                      { className: (0, y.A)(G().FlexColumnContainer) },
                      o.createElement(ge, {
                        strPlaceholder: (0, M.we)(
                          "#EventDisplay_Share_OnMyStatus_Placeholder",
                        ),
                        fnGetCurText: () => d,
                        fnOnTextChange: (e) => u(e.currentTarget.value),
                        fnSetText: u,
                        emoticonStore: e.emoticonStore,
                        bSupportHTMLImport: !1,
                        showFormatHelp: "UserStatusPublished",
                        limitBBCode: s.iH,
                        classNameForTextArea: Ae().ShareDescription,
                        bEmbeddedInDialog: !0,
                      }),
                    ),
                  ),
                  o.createElement(
                    "div",
                    { className: Ae().ShareLink },
                    o.createElement(Te.f, {
                      text: a,
                      partnerEventStore: e.partnerEventStore,
                    }),
                  ),
                ),
              ),
            );
      });
    },
    66331: (e, t, a) => {
      "use strict";
      a.d(t, { q: () => u });
      var n = a(34629),
        r = a(90626),
        i = a(73744),
        o = a(33737),
        s = a(81416),
        l = a(51706),
        c = a(52038),
        m = a(61859),
        p = a(73745),
        d = a(50666);
      class u extends r.Component {
        state = {
          region: {
            xPosPct: 0,
            yPosPct: 0,
            widthPct: (this.GetDestWidth() / this.props.uploadFile.width) * 100,
            heightPct:
              (this.GetDestHeight() / this.props.uploadFile.height) * 100,
          },
        };
        async OnCrop() {
          await this.props.uploadFile.CropImage(
            (this.state.region.xPosPct / 100) * this.props.uploadFile.width,
            (this.state.region.yPosPct / 100) * this.props.uploadFile.height,
            (this.state.region.widthPct / 100) * this.props.uploadFile.width,
            (this.state.region.heightPct / 100) * this.props.uploadFile.height,
            this.GetDestWidth(),
            this.GetDestHeight(),
            this.props.fileType,
          ),
            this.props.closeModal();
        }
        UpdateCrop(e, t) {
          this.setState({ region: t });
        }
        GetDestWidth() {
          const { uploadFile: e, forceResolution: t } = this.props;
          return t ? t.width : i.Fj[e.type].width;
        }
        GetDestHeight() {
          const { uploadFile: e, forceResolution: t } = this.props;
          return t ? t.height : i.Fj[e.type].height;
        }
        GetLargestBoxThatFits(e, t, a, n) {
          let r = a,
            i = (r * t) / Math.max(e, 1);
          return (
            i > n && ((i = n), (r = (i * e) / Math.max(t, 1))),
            { width: r, height: i }
          );
        }
        GetPreviewWindowStyle() {
          const { region: e } = this.state,
            t = this.GetLargestBoxThatFits(
              this.GetDestWidth(),
              this.GetDestHeight(),
              500,
              150,
            ),
            a = t.width,
            n = t.height,
            r = 1 / Math.max(e.widthPct / 100, 1e-4),
            i = 1 / Math.max(e.heightPct / 100, 1e-4),
            o = (this.props.uploadFile.width * e.xPosPct) / 100,
            s = (this.props.uploadFile.height * e.yPosPct) / 100;
          return {
            width: a,
            height: n,
            backgroundPosition: `${-o * ((a * r) / this.props.uploadFile.width)}px ${-s * ((n * i) / this.props.uploadFile.height)}px`,
            backgroundSize: `${100 * r}% ${100 * i}%`,
            backgroundImage: `url(${this.props.uploadFile.dataUrl})`,
          };
        }
        render() {
          const e = (this.GetDestWidth() / this.props.uploadFile.width) * 100,
            t = (this.GetDestHeight() / this.props.uploadFile.height) * 100,
            a = this.GetLargestBoxThatFits(
              this.props.uploadFile.width,
              this.props.uploadFile.height,
              800,
              500,
            );
          return r.createElement(
            l.x_,
            {
              onEscKeypress: this.props.closeModal,
              bDisableBackgroundDismiss: !0,
            },
            r.createElement(
              "div",
              {
                className: (0, c.A)("DialogContent", "_DialogCenterVertically"),
              },
              r.createElement(
                o.iK,
                null,
                (0, m.we)(
                  "#ImageUpload_CropModalTitleDims",
                  this.GetDestWidth(),
                  this.GetDestHeight(),
                ),
              ),
              r.createElement(
                "div",
                { className: (0, c.A)("DialogBodyText") },
                (0, m.we)("#ImageUpload_CropModalDescription"),
              ),
              r.createElement(
                "div",
                {
                  className: d.CropImage,
                  style: { width: a.width, height: a.height },
                },
                r.createElement("img", {
                  style: {
                    maxWidth: "100%",
                    maxHeight: "100%",
                    objectFit: "contain",
                  },
                  src: this.props.uploadFile.dataUrl,
                }),
                r.createElement(s.I, {
                  bLockAspectRatio: !0,
                  bDisableLink: !0,
                  index: 0,
                  updateFn: this.UpdateCrop,
                  xPosPct: 0,
                  yPosPct: 0,
                  widthMinPct: e,
                  heightMinPct: t,
                  widthPct: e,
                  heightPct: t,
                }),
              ),
              r.createElement(
                "div",
                { className: d.CropPreviewGroup },
                r.createElement(
                  "div",
                  { className: d.CropPreviewLabel },
                  (0, m.we)("#ImageUpload_CropPreview"),
                ),
                r.createElement("div", { style: this.GetPreviewWindowStyle() }),
              ),
              r.createElement(
                o.jn,
                { onClick: this.OnCrop },
                (0, m.we)("#ImageUpload_CropAndContinue"),
              ),
            ),
          );
        }
      }
      (0, n.Cg)([p.oI], u.prototype, "OnCrop", null),
        (0, n.Cg)([p.oI], u.prototype, "UpdateCrop", null);
    },
    30143: (e, t, a) => {
      "use strict";
      a.d(t, { A: () => n });
      const n =
        "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUQ5NEMwOTYzRDc4MTFFQUExREZEODRBMDBCNjdENTEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUQ5NEMwOTczRDc4MTFFQUExREZEODRBMDBCNjdENTEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBRDk0QzA5NDNENzgxMUVBQTFERkQ4NEEwMEI2N0Q1MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBRDk0QzA5NTNENzgxMUVBQTFERkQ4NEEwMEI2N0Q1MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Po/TXacAAABMSURBVHjaYvz//z8DNQHjyDMQDICGJgDx3f/kA5DeBJhh8f+pB+JBXr4DNFeZSp69CzLwP7UjZdTAkWAgVdMh1XMK1fPyCCwPAQIMAKf/Y+3dveJlAAAAAElFTkSuQmCC";
    },
  },
]);
