/**** (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([
  [6855],
  {
    92543: (e) => {
      e.exports = {
        ArtworkDimensionTooSmall: "_1m0PpUctuGTw-Jma50hi2v",
        UploadPreviewCtn: "_34UWtR_ugfBbP2GT9UNyZB",
        UploadPreviewButtonsCtn: "_3rKybFjcU5JGIfziRxbuNt",
        UploadPreviewDelete: "_260mOfOKtRiiYz6UiaZS_w",
        UploadPreviewButton: "_19Fl6VCN7JZgGShsQY_p95",
        UploadPreviewError: "_14nIWrGmXJICEe4YEEcdWS",
        UploadPreviewWarning: "_13jPeHck1h76bmmxJ-csvw",
        UploadPreview: "mOxVUSRnTr3nIwMW_T0fY",
        PreviewImgCtn: "_1gWyQDmPFiSh-p1BD5TC1k",
        PreviewImgInfo: "_15NFxbc1Jv0dEJJpjDrtri",
      };
    },
    32190: (e) => {
      e.exports = { ColorCtn: "Sf6uEgb-RsQVL8-DaDtRl" };
    },
    13447: (e) => {
      e.exports = {
        Ctn: "_2Un11RfkRCG1ypLwtwMzrI",
        CtnEditor: "_1_IJ41Ffm67VU1UXLllw1C",
        EditorTitle: "SxztzVEl1Jvth4-DhCzea",
        ConfDialogOptions: "_1SQN7pP2X-HClw-EOdtut1",
        ImageOptions: "_3pRF8ln193eBQJlbd8WJih",
        ColorOptions: "_2zPsCFzA78zGnQWaKhLIr9",
      };
    },
    81557: (e) => {
      e.exports = {
        TabCtn: "d43sj0ExWatSivXsOo2Qx",
        TabHeader: "_2CnSAWQAuZ56_k9CtX6wvO",
      };
    },
    53732: (e) => {
      e.exports = {
        ImageWrapperContainer: "_2or51Nzh1oEwvdNjKQ1XsS",
        ImageWrapper: "_34WcpEIVKr8Z72GaesGoR4",
        VideoBackground: "_3IizOeZqT1lZaoPEmdVxG",
        ImageWrapperFilename: "_3_vYFjDjTuDvhsL10XO9BU",
        ResultNotification: "_1X95b1CVvEsEa5dfoR5Pfv",
        ErrorCode: "_-7Alg3skQ6oFTYIpKTHsI",
        Hilight: "_3lBJMYeg4_hihNl0QTX1Qi",
        ImageButton: "_2MUWDtjaZWaMDdJaQr4o5a",
        Thumb: "_3M02zvAfoMwX5XlzlvFkc3",
        Full: "_1RN-YKVciU9zYHOYX6OV0",
        Delete: "_1X87fLS_CT0g2Vu5-fClUZ",
        FloatingThrobber: "_2EHZ15YQSAK_T5SCxVobtG",
        Localized: "_3FFrtt5Of4jP9unTFjYiHs",
      };
    },
    96866: (e) => {
      e.exports = {
        PickerContainer: "_3hEmqKnspI1WSyye2lMCnU",
        SearchInput: "Y12tprgNrNvnZ-eZvch6X",
        Hilight: "_13t_BRkK7eD3KorHIRnCQg",
        ImagesContainer: "oCi3RlRuxmlmslNXhrvbu",
        UploaderContainer: "qkC7CxPM6pro8iwepOfPA",
        UploaderTitle: "_2XGqDBgqyWPUyswJ-2bQy4",
        UploaderRunning: "_3_uPXn6Boi1uEsOtepIaKb",
        UploaderDesc: "_2BZckGhvMPS5VS4DD9bpvT",
        UploadError: "_2dVHFBaaWfiXq7Ea3wn-wJ",
        UploadMessageAndButtonsContainer: "_3rToctsao7fc2jlrU7bnW1",
        UploadSuccess: "_2WvOuad9iiZkV_HKI8NYlO",
        UploadDismissButton: "_1HjnUXpsmTADB1fcOmHSpX",
      };
    },
    9709: (e) => {
      e.exports = {
        TitleImg: "_3E4IFPQP4lnTaJ8fo462Br",
        PreviewImg: "_2COOlV_DzUDN3N0P3ToybN",
        ArtworkBar: "_3OWH-tupjKqql_tcQsLYIp",
      };
    },
    71647: (e) => {
      e.exports = {
        DragAndDropContainer: "_2RL1a79W53-tCW7090DcUp",
        DragAndDropContainerDragging: "wn604fTvW5SH1o852jAnI",
        ImageUploadBar: "_2Zk7b2c_FLMvZPqYvzTzt5",
        SelectImageButton: "_3Cd9cpywFS-01PilCrgOQo",
      };
    },
    49460: (e) => {
      e.exports = {
        SearchInput: "z7qI4Gjuleb-g6osRQpw2",
        PickerTitle: "_1yPqhNpX8e1HgnrarYmsZg",
      };
    },
    25359: (e) => {
      e.exports = {
        EventEditorArtworkCtn: "_3etoSeNgIJIJoQjVvKBkdK",
        ArtworkPreview: "_1fBG8S7L5v1-Ll8UMASqW5",
        EventEditorArtworkBarContainer: "TLT1tvLtG6-1EdFGwToo1",
        EventEditorButton: "_2EbfH5kGhG6VdMYM0aSFsw",
        EventEditorInputPaneTopRow: "_3loSsH7QVVzJW4dbA_k8pH",
        EventCoverImageCtn: "vcULy1uwr1V-xetzQ3t5_",
        DragTarget: "_2qaqHaHt0FsJ5g6E50Rpbn",
        DragOnTopOfMe: "_1-0mEm0at-4Czr10kmQ82K",
        EventEditorArtworkTextCtn: "wbzVx6PSPvY3jxjmybwT7",
        EventEditorDragTargetArea: "_352Z7ynHHExwu7pbLG0mi3",
        EventEditorArtworkTitle: "_1BtkzIs3COLhdqubhPqTJa",
        EventEditorArtworkSubTitle: "_3NsjbDpfSxc8ZHhYE5TuTv",
        EventEditorArtworkResolution: "pScoegXLiCfPTrVdDHgRc",
        ReassignCtn: "_2kzxUHYwRnfLZc2qUJp54m",
        ImagePreviewContainer: "_4M__i4jyU9-VJE6K30Rat",
        NoneSet: "csDC3rD7ooQ8gGXZhh594",
        TitleSafePreview: "_2Gel5eBC4smzhCMPJN4poX",
        TitleSafeCaption: "_2oU3ulhvWy8BrTtr-wLTHL",
        LanguageSelector: "_33sdnBObDSgcIemY_8d188",
        LanguageSelectorSelected: "_35iac6gVYl3NbfLM5oGhAp",
        LanguageSelectorNoData: "_2MrExNFgrVVmzV4_XxWk7m",
        LanguageContainer: "_1GqYxNpFolOmvCXZZ5SqS9",
        LanguageOptions: "_1OF4inXEccSHpEi-94BNyB",
        LanguageListContainer: "_2NKwVWWJzUopyzUpm5K8PU",
        SelectImageContainerTopRow: "_33RDQ6gt9hW0N3baDbAfnl",
        SelectImageContainerBottomRow: "_3Mstp8zLfqhPc0yqJGve2N",
        TextTitle: "_1b_OxtjP85MZc-IlQfnnHR",
        TextSubTitle: "EqzVNygGbzsiBalSQOtWy",
        ExampleSectionTitle: "_2AePWUSM2FTvZMktTEaX-X",
        DetailPageExample: "_392ONkyGLvYAILmrlrnvpW",
        DetailExample: "uCqc1bF2AGYNJFBx59-Hr",
        DetailExample2: "GgO-cRDrIDxhC9mzlUA9A",
        MainImageCtn: "_3VYOHJvHihqQTfP1-kMBap",
        ExampleBodyPosition: "_22lmznAIoce0crmqLa7pEy",
        ExampleContentCtn: "_3p_W9DK9PwoiZD6BEweFwC",
        TextBody: "_232HvNzrbXUHJCdNDolSM9",
        SpotlightExample: "_2m41926NXpqJxJB2dEchHw",
        SelectImageEqualColumns: "Qz0mmjcnBMcs99N6fgVCv",
        SelectImageBlock: "X_wtWeV0nNEF-9Rz0wZRL",
        MainPreviewBlock: "_3kAV8hXf4G70C4tDE8HDjI",
        Tips: "_2jAkKq9D5KKOH2cgMu59yN",
        ExamplesCtn: "WiG3FOkzY58mDmTzVy40z",
        SelectImageExampleImg: "_3Lcquzc_EacniSS2QxdUHx",
        SelectImageLanguagesCtn: "_27huHYrHSwivfUIglfRube",
        SelectImageTitle: "lJEQ6yKHtjwXClD4NVqUY",
        ArtworkSelectorContainer: "_2dxWXru9IFUHuJgzC9_WwQ",
        Title: "_2HiqsrLG8k4zf4raXVygUP",
        BroadcastPreviewContainer: "_3myaExQMpilWMgxWk6AufV",
        SaleHeaderPreviewContainer: "_1p6D8VoQJUTyY1LiTsqaQf",
        SaleHeaderExampleCtn: "_2Nwi2WWTWdc4JkMEiHDFFK",
        SaleHeaderExampleCol: "_2s4zAjRHJabF47kK9uxCY6",
        BroadcastPreview: "_3NxzN3dNq98rjVdkyQ9QIH",
        ExampleSpacer: "_1UuTcQvO7lyRrxjs-QPMdh",
        MultipleExampleContainer: "_34yXhyKRnXlCQ1XA_DLGAW",
        AssetExampleSpotlightCtn: "_29B1UOzVRMVZSd22IyP43x",
        BackgroundConfigCtn: "_3SVRvFP-sXikNXmksKkDQ7",
        OptionCtn: "_2XnObldRTEs5T4Sswyv5Fo",
        BackgroundColorBtn: "_2YD-avez2pqO4MJHAO5_v0",
      };
    },
    69183: (e) => {
      e.exports = {
        "duration-app-launch": "800ms",
        SalePageLogoCtn: "_1Un6hCqh2IuOm0WLmrrA7w",
      };
    },
    59313: (e) => {
      e.exports = {
        PresenterDisclaimer: "_1RsiclQYbOWMcz3Hr6dVT9",
        PresenterLabel: "adrBtsY2w7IX8V81nMir1",
      };
    },
    15496: (e) => {
      e.exports = {
        "duration-app-launch": "800ms",
        ReadMoreLink: "_2mvgc6dpEDHRJlTWhGDz7h",
        MajorEventContainer: "dVJB2r43CGIAgr-Xtt4P3",
        MajorEventImageContainer: "_1PkTBeZJVs3WI8US0zffEx",
        MajorEventImage: "_25fL1JQcG1kh_9L5danMxc",
        BottomShadow: "_1ueE9cjv0hzERo311Gr6qL",
        MajoreEventImageContentContainer: "_3mREW5LJ_7jyeol7BtXcym",
        MajorEventImageTemplate: "lQR9_4nAXfydIY7zwOzSF",
        MajorEventBackground: "_388IuJImOHcpIL9kvqJdet",
        MajorEventImageBackgroundBlur: "_3sVs6YBElnuTON_cY_6ne5",
        MajorEventHeader: "_1HL2nt3zhHJo3RkMzmD-Gb",
        PartnerEventLargeImage_Title: "bYwbk-ycz_n2JnQgyrgDx",
        EventType: "_3zVyXPaFJl95Q5qnxtDpuB",
        GameIconAndName: "IltgR1LrH0neRnKq0TLxy",
        GameIcon: "_3Dkj3XaiQV2I1d2m-RRA_L",
        MajorEventSpotlightBackground: "_1ahePoGx6gPXhapzZw2L21",
        MajorEventContent: "_2nr7NuawYs9NhC8OUkY0fK",
        MajorEventTextCtn: "Ojdg2vBD3O1oroxYVU2zB",
        MajorEventTitle: "nEBZT02OOnxIbyIl9Dk44",
        MajorEventSummary: "HPngOFPPykmeXFSxcC1Zv",
        MajorEvent_Ctn: "_2_kU7nUB6wwDu-LsbQZmNc",
        AppDetailsSpotlightContainer: "_1zDJ1bfFg-UkuAluUAoGKj",
      };
    },
    64734: (e) => {
      e.exports = {
        SectionTitleHeader: "_2g5oNomwd2lv8wL2qlsLVA",
        required_title: "_3yDPZjnsoLc2FkrAH2UOEd",
      };
    },
    51239: (e) => {
      e.exports = {
        "duration-app-launch": "800ms",
        CategorySectionsCtn: "YuXdszLjIFoat_EbTkm8U",
        CategorySection: "_2MUQ8QBrMaSxsdhqhiN6tG",
        CategorySectionName: "_2VnsyILlZj23L2UgP3ZsMm",
        CategoriesCtn: "_3yuPyNw3DpZ_ICakOPcu4u",
        Category: "_1uwcZwdwT2vRgumGDlZbtk",
        GridOuter: "_3Q4XMqaQk6OcDiI6shf28J",
        Grid: "_3anY0OeVUh2enLVFNx50N1",
        CategoryName: "_3VNsED3Ez-vqDraw_8QWsp",
        TopLevelCategory: "_2ZYjRLgkQLHW5_cstUffIp",
      };
    },
    12447: (e, t, a) => {
      "use strict";
      a.d(t, { u: () => s });
      var n = a(8871),
        l = a(90626),
        r = a(78327),
        o = a(85585),
        i = a(7445);
      function s(e) {
        const { children: t, navTreeRef: a, NavigationManager: s, ...c } = e,
          g = l.useRef(),
          m = (0, n.Ue)(g, a);
        if ((0, r.Qn)()) {
          const e = window.__nav_tree_root;
          return l.createElement(
            o.B2,
            { ...c, navTreeRef: m, parentEmbeddedNavTree: e },
            l.createElement(i.q, null, t),
          );
        }
        return l.createElement(l.Fragment, null, t);
      }
    },
    84746: (e, t, a) => {
      "use strict";
      a.d(t, { N: () => c });
      var n = a(90626),
        l = a(92757),
        r = (a(73745), a(39575)),
        o = a(76217),
        i = a(79613);
      const s = "FocusNavHistoryID";
      function c(e) {
        const { children: t, timeoutMS: a, ...c } = e,
          g = (function (e = 2) {
            const t = (0, l.W6)(),
              a = n.useRef(),
              o = (0, l.zy)(),
              c = (0, i.ho)(),
              g = o.state && o.state[s],
              m = n.useRef();
            return (
              n.useLayoutEffect(() => {
                if (!a.current) return;
                const e = a.current;
                return e
                  .Node()
                  .Tree.WindowContext.FocusChangedCallbacks.Register(
                    (a, n, l) => {
                      const o = t.location;
                      let i = o.state && o.state[s];
                      i ||
                        ((i = c
                          ? `State_${o.key}`
                          : `State_${e.Node().Tree.id}`),
                        (m.current = i),
                        t.replace({
                          ...t.location,
                          state: { ...o.state, [s]: i },
                        })),
                        m.current == i &&
                          (c
                            ? e.SaveState(i)
                            : window.history.replaceState(
                                {
                                  ...window.history.state,
                                  [i]: (0, r.Ze)(e.Node()),
                                },
                                null,
                              ));
                    },
                  ).Unregister;
              }, [t, c]),
              n.useLayoutEffect(() => {
                if (a.current && m.current != g) {
                  const t = a.current.NavTree().DeferredFocus;
                  t.SuppressFocus();
                  const n = c ? null : window.history.state?.[g],
                    l = window.setTimeout(() => {
                      let e = !1;
                      c
                        ? (e = a.current.RestoreState(g, 1))
                        : n && ((0, r.LU)(a.current.Node(), n, 0), (e = !0)),
                        e ? t.Reset() : t.ExecuteQueuedFocus(),
                        (m.current = g);
                    }, e);
                  return () => {
                    window.clearTimeout(l), t.ExecuteQueuedFocus();
                  };
                }
              }, [g, t, c, e]),
              a
            );
          })(a);
        return n.createElement(o.Z, { ...c, navRef: g }, t);
      }
    },
    9678: (e, t, a) => {
      "use strict";
      a.r(t), a.d(t, { default: () => v });
      var n = a(90626),
        l = a(45699),
        r = a(12447),
        o = a(76217),
        i = a(75204),
        s = a(97907),
        c = a(84746),
        g = a(91336),
        m = a(96236),
        d = a(52038),
        u = a(78327),
        p = a(51239);
      class _ {
        m_rgSections;
        GetSections() {
          return this.m_rgSections;
        }
        static s_singleton;
        static Get() {
          return _.s_singleton || (_.s_singleton = new _()), _.s_singleton;
        }
        constructor() {
          this.m_rgSections = (0, u.Tc)("categories", "application_config");
        }
      }
      function E(e) {
        const { section: t, autoFocus: a } = e,
          l = (0, u.Qn)(),
          r = n.createElement(
            "div",
            { className: p.CategorySection },
            n.createElement(
              "span",
              { className: p.CategorySectionName },
              t.name,
            ),
            n.createElement(
              i.MS,
              {
                className: p.CategoriesCtn,
                scrollDirection: "x",
                navEntryPreferPosition: s.iU.MAINTAIN_X,
                navKey: "cat_section" + t.name,
              },
              t.categories.map((t, a) =>
                n.createElement(I, {
                  key: "category" + t.name,
                  category: t,
                  autoFocus: e.autoFocus && 0 === a,
                }),
              ),
            ),
          );
        return l ? r : n.createElement(m.K, { placeholderHeight: "150px" }, r);
      }
      function I(e) {
        const { category: t } = e;
        return n.createElement(
          o.Z,
          {
            focusableIfNoChildren: !0,
            autoFocus: e.autoFocus,
            navKey: "cat_panel" + t.name,
          },
          n.createElement(
            l.Ii,
            {
              href: u.TS.STORE_BASE_URL + t.url,
              className: (0, d.A)({
                [p.Category]: !0,
                [p.TopLevelCategory]: t.is_toplevel_genre,
              }),
            },
            n.createElement(
              "span",
              { className: p.CategoryName },
              n.createElement("span", null, t.name),
            ),
            n.createElement(h, { ...e }),
          ),
        );
      }
      function h(e) {
        let { category: t } = e;
        return n.createElement(
          "div",
          { className: p.GridOuter },
          n.createElement(
            "div",
            { className: p.Grid },
            n.createElement("img", { src: u.TS.STORE_BASE_URL + t.image_url }),
          ),
        );
      }
      const v = function () {
        const { sections: e } = (function () {
            const e = _.Get(),
              [t, a] = (0, n.useState)(e.GetSections());
            return { sections: t };
          })(),
          t = (0, g.A)(),
          a = n.useRef(void 0);
        return (
          n.useEffect(() => a.current?.Activate(!0), []),
          n.createElement(
            r.u,
            { navID: "CategoriesApp", NavigationManager: t, navTreeRef: a },
            n.createElement(
              c.N,
              { timeoutMS: 1e3 },
              n.createElement(
                "div",
                { className: p.CategorySectionsCtn },
                e.map((e, t) =>
                  n.createElement(E, {
                    key: "section" + e.name,
                    section: e,
                    autoFocus: 0 == t,
                  }),
                ),
              ),
            ),
          )
        );
      };
    },
    95737: (e, t, a) => {
      "use strict";
      a.r(t), a.d(t, { default: () => ma });
      var n = a(90626),
        l = a(12447),
        r = a(84746),
        o = a(77516),
        i = a(17720),
        s = a(91336),
        c = a(91254),
        g = a(65946),
        m = a(92757),
        d = a(76217),
        u = a(75933),
        p = a(17560),
        _ = a(35400),
        E = a(84811),
        I = a(95034),
        h = a(22837),
        v = a(71138),
        b = a(63556),
        S = a(61859),
        k = a(73745),
        C = a(30470);
      const w = new Map();
      function f(e, t, a) {
        const n = new Map(),
          l = new Map(),
          r = new Map();
        let o = null,
          i = null,
          s = 0;
        const { selectedTabBackgroundDef: c, nTabSaleSectionIndex: g } =
          (function (e, t) {
            const a = e.findIndex((e) => "tabs" === e.section_type);
            if (a >= 0) {
              const n = e[a],
                l = n.tabs?.findIndex((e) => e.unique_id === t);
              if (l >= 0)
                return {
                  selectedTabBackgroundDef: n.tabs[l].tab_background_img_groups,
                  nTabSaleSectionIndex: a,
                };
            }
            return {
              selectedTabBackgroundDef: void 0,
              nTabSaleSectionIndex: void 0,
            };
          })(t, a);
        if (e?.enabled) {
          const m = e.groups.length;
          if (
            (e.groups.forEach((a, o) => {
              if (s >= t.length || "tabs" == t[s].section_type) return;
              const i = new Array();
              for (let e = 0; e < a.num_sections && s < t.length; ++e, ++s) {
                if ("tabs" == t[s].section_type) break;
                const n = t[s].unique_id;
                i.push(n),
                  l.set(n, a.background_id),
                  0 === e && r.set(n, a.background_id);
              }
              n.set(a.background_id, {
                nBackgroundGroupID: a.background_id,
                sectionUniqueIDs: i,
                nSaleSectionLastIndex: s - 1,
                nUniqueIDNextSaleSection:
                  s < t.length && (!g || s < g) ? t[s].unique_id : void 0,
              });
              if (o + 1 == m && e.last_group_until_cover_section_until_end)
                for (
                  let e = s;
                  e < t.length && (!c || !c.enabled || e < g);
                  ++e
                ) {
                  if ("tabs" == t[e].section_type && c?.enabled) break;
                  const n = t[e].unique_id;
                  l.set(n, a.background_id);
                }
            }),
            s < t.length && (!g || s < g) && (o = t[s].unique_id),
            c?.enabled)
          ) {
            let e = g;
            const o = c.groups.length;
            for (
              c.groups.forEach((i, s) => {
                if (e >= t.length) return;
                const g = new Array();
                for (let n = 0; n < i.num_sections && e < t.length; ++n, ++e) {
                  const o = t[e],
                    s = o.unique_id;
                  o.show_on_tabs?.length > 0 && !o.show_on_tabs.includes(a)
                    ? --n
                    : (g.push(s),
                      l.set(s, i.background_id),
                      0 === n && r.set(s, i.background_id));
                }
                let m = e;
                for (
                  ;
                  m < t.length &&
                  t[m].show_on_tabs?.length > 0 &&
                  !t[m].show_on_tabs.includes(a);
                )
                  m += 1;
                n.set(i.background_id, {
                  nBackgroundGroupID: i.background_id,
                  sectionUniqueIDs: g,
                  nSaleSectionLastIndex: e - 1,
                  nUniqueIDNextSaleSection:
                    m < t.length ? t[m].unique_id : void 0,
                });
                if (s + 1 == o && c.last_group_until_cover_section_until_end)
                  for (let a = e; a < t.length; ++a) {
                    if ("tabs" == t[a].section_type && c?.enabled) break;
                    const e = t[a].unique_id;
                    l.set(e, i.background_id);
                  }
              });
              e < t.length &&
              t[e].show_on_tabs?.length > 0 &&
              !t[e].show_on_tabs.includes(a);
            )
              e++;
            e < t.length && (i = t[e].unique_id);
          }
        } else t?.length > 0 && (o = t[0].unique_id);
        return {
          mapGroupToSections: n,
          nFirstSaleSectionIDWithoutGroup: o,
          mapSectionToGroup: l,
          mapFirstSectionToGroup: r,
          selectedTabBackgroundDef: c,
          nTabSaleSectionIndex: g,
          nFirstTabSectionIDWithoutGroup: i,
        };
      }
      function D(e, t, a) {
        let l = e.jsondata.sale_background_img_groups.groups.find(
          (e) => e.background_id === t.groupID,
        );
        if (!l && a >= 0) {
          const n = e.GetSaleSectionFirstMatchByType("tabs"),
            r = n?.tabs?.find((e) => e.unique_id == a);
          l = r?.tab_background_img_groups?.groups?.find(
            (e) => e.background_id == t.groupID,
          );
        }
        return n.createElement(
          A,
          {
            eventModel: e,
            key: "background_group_" + t.groupID,
            displayDef: l,
            derivedGroupInfo: t.derivedGroupInfo,
          },
          t.elSaleSections,
        );
      }
      function A(e) {
        const {
            displayDef: t,
            children: a,
            eventModel: l,
            derivedGroupInfo: r,
          } = e,
          o = (0, b.E)(),
          i = n.useCallback(
            (e, t) => {
              w.set(r.nBackgroundGroupID, t);
            },
            [r],
          ),
          s = (0, k.w6)(i);
        if (!a || 0 == a.length) return null;
        if (!t) return n.createElement(n.Fragment, null, a);
        let c;
        if (t.localized_background_art) {
          const e = (0, h.Lg)(o),
            a =
              e in t.localized_background_art
                ? e
                : S.A0.GetLanguageFallback(C.TS.LANGUAGE),
            n = t.localized_background_art[a];
          n &&
            (c = v.i6.GenerateArtworkURLFromHashAndExtensions(
              l.clanSteamID,
              n,
            ));
        }
        let g = "linear-gradient(";
        switch (t.gradient_setting) {
          case "top-to-bottom":
            g += "to bottom,";
            break;
          case "left-to-right":
            g += "to right,";
            break;
          case "top-left-to-bottom-right":
            g += "to bottom right,";
            break;
          case "single-color":
            g = void 0;
        }
        t.background_color1 &&
        t.background_color2 &&
        t.background_color1 != t.background_color2
          ? ((g += " " + t.background_color1),
            (g += ", " + t.background_color2),
            (g += ")"))
          : (g = null);
        const m =
            t.background_color1 &&
            (!t.background_color2 ||
              "single-color" == t.gradient_setting ||
              t.background_color1 == t.background_color2),
          d = "cover" !== t.scaling_setting && "unset" !== t.position_setting,
          u = {
            backgroundImage: g ? `url(${c}), ${g}` : `url(${c})`,
            backgroundSize: t.scaling_setting,
            backgroundRepeat: t.repeat_setting,
            backgroundPosition: d ? t.position_setting : void 0,
            backgroundColor: m ? t.background_color1 : void 0,
            overflowY: "hidden",
          };
        return n.createElement(
          "div",
          { ref: s, style: u, id: "background_group_" + t.background_id },
          a,
        );
      }
      var y = a(96971),
        G = a(52393),
        T = a.n(G),
        L = a(91382),
        B = a(30756),
        N = a(21529),
        U = a(52038),
        M = a(78327);
      function O(e) {
        const { event: t, broadcastEmbedContext: a } = e,
          l = Boolean(t?.jsondata?.broadcast_display_wide_player),
          r = Boolean(t?.jsondata?.broadcast_dispaly_wide_player_allow_chat);
        return n.createElement(
          n.Fragment,
          null,
          Boolean(
            t.BEventCanShowBroadcastWidget() &&
              t.BSaleShowBroadcastAtTopOfPage(),
          ) &&
            n.createElement(N.B, {
              event: t,
              broadcastEmbedContext: a,
              bWideBroadcastDisplay: l,
              bWideBroadcastPermitChat: r,
            }),
        );
      }
      function R(e) {
        const { event: t, fnOnChangeDayIndex: a, addtionalAdminButtons: l } = e;
        return n.createElement(B.g, {
          eventModel: t,
          fnOnUpdateSaleDayIndex: a,
          addtionalAdminButtons: l,
        });
      }
      function P(e) {
        const { event: t, bIsPreview: a } = e;
        let l = t.jsondata.sale_background_video_webm,
          r = t.jsondata.sale_background_video_mp4;
        return (
          L.U.Get().BHasSalePageBackgroundOverride() &&
            ((l = L.U.Get().GetSalePageBackgroundWEBM()),
            (r = L.U.Get().GetSalePageBackgroundMP4())),
          Boolean(r || l)
            ? n.createElement(
                E.tH,
                null,
                n.createElement(
                  "video",
                  {
                    loop: !0,
                    muted: !0,
                    autoPlay: !0,
                    playsInline: !0,
                    className: (0, U.A)(
                      T().SaleBackground,
                      T()[`CustomStyle_${t.jsondata.sale_vanity_id}`],
                      "SaleBackground",
                      T().fullscreen_bg_video,
                    ),
                    style: {
                      backgroundColor: a
                        ? t.jsondata.sale_background_color
                        : void 0,
                    },
                  },
                  l &&
                    n.createElement("source", { src: l, type: "video/webm" }),
                  r &&
                    !M.TS.IN_CLIENT &&
                    n.createElement("source", { src: r, type: "video/mp4" }),
                ),
              )
            : null
        );
      }
      function x(e) {
        const { event: t, language: a, children: l, bIsPreview: r } = e,
          i = n.useRef(),
          s = (0, g.q3)(() => t.GetImageURLWithFallback("sale_header", a)),
          c = L.U.Get().BHasSalePageBackgroundOverride(),
          m = n.useMemo(
            () => (c ? L.U.Get().GetSalePageBackgroundOverride() : s),
            [c, s],
          );
        n.useEffect(() => {
          if (!m) return;
          const e = new Image();
          (e.onload = () => {
            const t = (100 * e.width) / 950 + "%";
            i.current && i.current.style.setProperty("--background-scale", t);
          }),
            (e.src = m);
        }, [m]);
        const d = t.jsondata.sale_sections?.some(
            (e) => "contenthubmaincarousel" === e.section_type,
          ),
          u =
            t.jsondata.item_source_type === o.w.k_EContentHub &&
            (t.jsondata.sale_vanity_id.includes("contenthubsalepage_") || d),
          p = m ? `url(${m})` : null;
        return n.createElement(
          "div",
          {
            className: (0, U.A)({
              SaleBackgroundCtn: !0,
              ContentHubSalePage: u,
            }),
            onClick: () => {
              0;
            },
          },
          n.createElement(
            "div",
            {
              className: (0, U.A)(
                T()[`CustomStyle_${t.jsondata.sale_vanity_id}`],
                "SaleCustomCSS",
                T().SaleBackground,
                "SaleBackground",
              ),
              style: {
                display: "flex",
                position: "relative",
                flexDirection: "column",
                backgroundImage: p,
                backgroundColor: t.jsondata.sale_background_color,
                backgroundRepeat: t.jsondata.sale_background_repeat,
              },
              ref: i,
            },
            n.createElement(P, { event: t, bIsPreview: r }),
            n.createElement(n.Fragment, null, l),
          ),
        );
      }
      var F = a(45318),
        H = a(69183),
        z = a.n(H);
      function j(e) {
        const { eventModel: t, language: a } = e,
          [l, r] = (0, g.q3)(() => [
            t.jsondata.sale_logo_url,
            S.NT.GetWithFallback(t.jsondata.localized_sale_logo, a),
          ]);
        return r?.length > 0
          ? l
            ? n.createElement(
                "a",
                {
                  className: z().SalePageLogoCtn,
                  href: M.TS.STORE_BASE_URL + l,
                },
                n.createElement("img", {
                  src: t.GetImageURLWithFallback("sale_logo", a),
                }),
              )
            : n.createElement(
                "div",
                { className: (0, U.A)(z().SalePageLogoCtn, "SalePageLogoCtn") },
                n.createElement("img", {
                  src: t.GetImageURLWithFallback("sale_logo", a),
                }),
              )
          : null;
      }
      var V = a(99487),
        W = a(64641),
        q = a.n(W),
        Y = a(32630),
        Q = a(22797);
      class Z {
        Keyify = (e) =>
          (function (e) {
            return "string" == typeof e || "number" == typeof e
              ? e
              : JSON.stringify(e);
          })(e);
        m_mapVisible = new Map();
        m_mapOwners = new Map();
        IsAlreadyVisible(e) {
          return this.m_mapVisible.has(this.Keyify(e));
        }
        SortKey(e, t) {
          return (
            (this.m_mapVisible.get(this.Keyify(e)) || 0) -
            (this.m_mapVisible.get(this.Keyify(t)) || 0)
          );
        }
        BMarkAppVisibile(e, t) {
          this.EnsureOwnerSetExists(e);
          const a = this.Keyify(t);
          return (
            this.m_mapOwners.get(e).add(a),
            this.IsAlreadyVisible(t)
              ? (this.m_mapVisible.set(a, this.m_mapVisible.get(a) + 1), !1)
              : (this.m_mapVisible.set(a, 1), !0)
          );
        }
        BMarkAppNotVisible(e, t) {
          if (!this.IsAlreadyVisible(t)) return !1;
          this.EnsureOwnerSetExists(e);
          const a = this.Keyify(t);
          return (
            !!this.m_mapOwners.get(e).has(a) &&
            (this.DecrementAppVisibility(a), !0)
          );
        }
        MarkAllAppsNotVisible(e) {
          this.m_mapOwners.has(e) &&
            (this.m_mapOwners
              .get(e)
              .forEach(this.DecrementAppVisibility.bind(this)),
            this.m_mapOwners.delete(e));
        }
        EnsureOwnerSetExists(e) {
          this.m_mapOwners.has(e) || this.m_mapOwners.set(e, new Set());
        }
        DecrementAppVisibility(e) {
          const t = this.m_mapVisible.get(e) - 1;
          t > 0 ? this.m_mapVisible.set(e, t) : this.m_mapVisible.delete(e);
        }
      }
      var J = a(44332),
        X = a(61336),
        K = a(33737),
        $ = a(51706),
        ee = a(738),
        te = a(12155),
        ae = a(95695),
        ne = a.n(ae),
        le = a(64734),
        re = a(26408);
      function oe(e) {
        const {
            title: t,
            tooltip: a,
            getMinimized: l,
            toggleMinimized: r,
            className: o,
            children: i,
          } = e,
          s = (0, g.q3)(() => l());
        return n.createElement(
          n.Fragment,
          null,
          n.createElement(
            "div",
            {
              className: (0, U.A)(
                o,
                le.SectionTitleHeader,
                le.required_title,
                "SectionTitleHeader",
              ),
            },
            n.createElement(
              "div",
              {
                className: (0, U.A)(
                  ae.CollapsableSectionTitle,
                  "EventEditorTextTitle",
                ),
              },
              t,
              Boolean(a) && n.createElement(re.o, { tooltip: a }),
            ),
            n.createElement(se, { bIsMinimized: s, fnToggleMinimize: r }),
          ),
          !s && n.createElement(E.tH, null, i),
        );
      }
      function ie(e) {
        const [t, a] = n.useState(Boolean(e.bStartMinimized));
        return n.createElement(
          oe,
          { ...e, getMinimized: () => t, toggleMinimized: () => a(!t) },
          e.children,
        );
      }
      function se(e) {
        const { bIsMinimized: t, fnToggleMinimize: a } = e,
          l = t ? "#Section_Maximize_Tooltip" : "#Section_Minimize_Tooltip";
        return n.createElement(
          K.$n,
          { "data-tooltip-text": (0, S.we)(l), onClick: a },
          e.bIsMinimized
            ? n.createElement(te.hz4, null)
            : n.createElement(te.Xjb, null),
        );
      }
      var ce = a(56011),
        ge = a(30294),
        me = a(56004),
        de = a(34629),
        ue = a(61257);
      class pe extends n.Component {
        state = { color: this.props.color || "rgba(1.0,1.0,1.0,1.0)" };
        static GetColorString(e) {
          return `rgba(${e.rgb.r}, ${e.rgb.g}, ${e.rgb.b}, ${e.rgb.a})`;
        }
        OnColorChange(e) {
          const t = pe.GetColorString(e);
          this.setState({ color: t }), this.props.onChange(t);
        }
        render() {
          return n.createElement(ue.xk, {
            onChange: this.OnColorChange,
            color: this.state.color,
          });
        }
      }
      (0, de.Cg)([k.oI], pe.prototype, "OnColorChange", null);
      var _e = a(13447),
        Ee = a.n(_e),
        Ie = a(32190),
        he = a.n(Ie),
        ve = a(28954),
        be = a(69343),
        Se = a(68797),
        ke = a(75844),
        Ce = a(2160),
        we = a(73744),
        fe = a(64953),
        De = a(72739);
      function Ae(e) {
        e.preventDefault();
      }
      var ye = a(71647),
        Ge = a.n(ye);
      function Te(e) {
        const {
            onDropFiles: t,
            renderDesciption: a,
            elAdditonalButtons: l,
            strOverrideDragAndDropText: r,
          } = e,
          [o, i] = (function (e) {
            const [t, a] = n.useState(!1);
            return [
              {
                onDragEnter: n.useCallback((e) => {
                  ((e.dataTransfer.files && e.dataTransfer.files[0]) ||
                    (e.dataTransfer.types &&
                      "Files" == e.dataTransfer.types[0])) &&
                    a(!0);
                }, []),
                onDragLeave: n.useCallback((e) => {
                  ce.NO(e) && a(!1);
                }, []),
                onDragEnd: n.useCallback(() => a(!1), []),
                onDragOver: t ? Ae : void 0,
                onDrop: n.useCallback(
                  (t) => {
                    t.dataTransfer.files?.length &&
                      (e(t.dataTransfer.files, t), t.preventDefault()),
                      a(!1);
                  },
                  [e],
                ),
              },
              t,
            ];
          })(t),
          [s, c] = (function (e, t) {
            const a = n.useRef(),
              l = n.useCallback(
                (t) => {
                  t.currentTarget.files.length > 0 && e(t.currentTarget.files);
                },
                [e],
              ),
              r = n.useCallback(() => a.current.click(), []);
            return [
              De.createPortal(
                n.createElement(
                  "form",
                  { onSubmit: Ae, style: { display: "none" } },
                  n.createElement("input", {
                    ...t,
                    type: "file",
                    ref: a,
                    onChange: l,
                  }),
                ),
                window.document.body,
              ),
              r,
            ];
          })(t, {
            accept: "image/png, image/jpeg, image/gif, image/webp",
            multiple: !0,
          });
        return n.createElement(
          "div",
          {
            ...o,
            className: (0, U.A)(
              i ? Ge().DragAndDropContainerDragging : Ge().DragAndDropContainer,
              "DragAndDropContainer",
            ),
          },
          Boolean(a) && a(),
          n.createElement(
            "div",
            null,
            r || (0, S.we)("#ImagePicker_DragAndDrop"),
          ),
          n.createElement(
            "div",
            { className: Ge().ImageUploadBar },
            s,
            n.createElement(
              "label",
              { onClick: c },
              n.createElement(
                "span",
                null,
                (0, S.we)("#ImagePicker_OrBrowse"),
                " ",
              ),
              n.createElement(
                "span",
                { className: Ge().SelectImageButton },
                (0, S.we)("#selectimage_select_file"),
              ),
            ),
          ),
          l,
          e.children,
        );
      }
      var Le = a(66331),
        Be = a(92543),
        Ne = a.n(Be);
      function Ue(e) {
        const {
            imageUploader: t,
            rgSupportArtwork: a,
            strOverrideDragAndDropText: l,
            forceResolution: r,
            localizedPrimaryImage: o,
            elAdditonalButtons: i,
            rgRealmList: s,
          } = e,
          [c, m] = (0, g.q3)(() => [
            t.GetUploadImages(),
            b.O.Get().GetCurEditLanguage(),
          ]),
          d = n.useCallback(
            async (e) => {
              let l = Array.from(e),
                r = !0;
              for (let i = 0; i < l.length; i++) {
                const l = e.item(i),
                  c = (0, be.j)(l.name, m);
                try {
                  const e = (0, be.P)(c, m, s);
                  (r = await t.AddImageForLanguage(l, e, a, o)),
                    r ||
                      (console.error(
                        "ArtworkUploader.OnDropFiles: failed on i=" +
                          i +
                          " file=" +
                          l.name,
                      ),
                      (0, ee.pg)(
                        n.createElement($.KG, {
                          strDescription: (0, S.we)(
                            "#ImagePicker_Error",
                            l.name,
                          ),
                        }),
                        window,
                      ));
                } catch (e) {
                  let t = (0, Se.H)(e);
                  console.error(
                    "ArtworkUploader.OnDropFiles: " + t.strErrorMsg,
                    t,
                  ),
                    (0, ee.pg)(
                      n.createElement($.KG, {
                        strDescription: (0, S.we)(
                          "#EventError_Code",
                          t.strErrorMsg,
                        ),
                      }),
                      window,
                    );
                }
              }
              return r;
            },
            [m, t, o, s, a],
          );
        return n.createElement(
          Te,
          {
            onDropFiles: d,
            elAdditonalButtons: i,
            strOverrideDragAndDropText: l,
          },
          n.createElement(
            n.Fragment,
            null,
            n.createElement(
              "div",
              { className: Ne().UploadPreviewCtn },
              c.map((e) =>
                n.createElement(Oe, {
                  key: "arttabupload_" + e.file + "_" + e.uploadTime,
                  asset: e,
                  supported: a,
                  forceResolution: r,
                  forceFileType: o && o.file_type,
                  fnOnRemove: () => t.DeleteUploadImage(e),
                  languageRealms: s,
                }),
              ),
            ),
          ),
          n.createElement(Me, {
            imageUploader: t,
            fnOnUploadImageRequested: async () => {
              await t.UploadAllImages(s, m, a, r, o && o.file_type);
            },
          }),
        );
      }
      function Me(e) {
        const { imageUploader: t, fnOnUploadImageRequested: a } = e,
          [l] = (0, g.q3)(() => [t.GetUploadImages()]);
        return n.createElement(
          "div",
          {
            style: { display: "flex" },
            className: Ne().UploadPreviewButtonsCtn,
          },
          Boolean(l.length) &&
            n.createElement(
              K.$n,
              { style: { margin: "8px" }, onClick: a },
              (0, S.we)("#ImageUpload_Upload"),
            ),
          Boolean(l.length) &&
            n.createElement(
              K.$n,
              { style: { margin: "8px" }, onClick: t.ClearImages },
              (0, S.we)("#ImageUpload_Clear"),
            ),
        );
      }
      const Oe = (0, ke.PA)((e) => {
        const { asset: t, fnOnRemove: a, supported: l, languageRealms: r } = e,
          o = l.map((e) => {
            let a = (0, S.we)("#EventEditor_ArtworkType_" + e);
            "spotlight" == e &&
              (a = (0, S.we)("#EventEditor_ArtworkType_store_spotlight"));
            const n = we.Fj[e];
            let l;
            n &&
              !n.bDisableEnforceDimensions &&
              (a += ` - ${n.width}x${n.height}`),
              (t.BIsOriginalMinimumDimensions(e) &&
                (0, we.N_)(t.fileType, e)) ||
                (l = Ne().ArtworkDimensionTooSmall);
            return { label: a, data: e, strOptionClass: l };
          }),
          i = {
            pending: (0, S.we)("#ImageUpload_Pending"),
            uploading: (0, S.we)("#ImageUpload_Uploading"),
            success: (0, S.we)("#ImageUpload_SuccessCard"),
            failed: (0, S.we)("#ImageUpload_Failed"),
          },
          s = new Array(),
          c = S.A0.GetLanguageListForRealms(r || [Ce.TU.k_ESteamRealmGlobal]);
        for (const e of c) {
          const t = (0, S.we)("#Language_" + (0, h.Lg)(e));
          s.push({ label: t, data: e });
        }
        s.sort((e, t) => e.label.localeCompare(t.label));
        const g = [];
        s.forEach((e) => g.push({ label: e.label, data: e.data }));
        const m = t.IsValidAssetType(
            e.supported,
            e.forceResolution,
            e.forceFileType,
          ),
          d = m.needsCrop
            ? (0, S.we)("#ImageUpload_NeedsCrop")
            : m.error
              ? (0, S.we)("#ImageUpload_Invalid")
              : i[t.status];
        return n.createElement(
          "div",
          { className: Ne().UploadPreview },
          n.createElement(
            "div",
            { className: Ne().UploadPreviewDelete, onClick: () => a(t) },
            n.createElement(te.sED, null),
          ),
          n.createElement(Re, { asset: t }),
          n.createElement(K.m, {
            strDropDownClassName: ne().DropDownScroll,
            rgOptions: g,
            selectedOption: t.language,
            onChange: (e) => (t.language = e.data),
          }),
          Boolean(o.length > 1) &&
            n.createElement(K.m, {
              rgOptions: o.filter((e) => "hero" !== e.data),
              selectedOption: t.type || o[0].data,
              onChange: (e) => (t.type = e.data),
            }),
          n.createElement(
            "div",
            { className: (0, U.A)(ne().FlexColumnContainer) },
            d,
            Boolean("uploading" == d) &&
              n.createElement(
                "div",
                { className: q().FlexCenter },
                n.createElement(Q.t, { size: "small" }),
              ),
          ),
          n.createElement(
            "div",
            { className: Ne().UploadPreviewError },
            t.message,
          ),
          m.error &&
            n.createElement(
              "div",
              { className: Ne().UploadPreviewError },
              m.error,
            ),
          m.needsCrop &&
            n.createElement(
              n.Fragment,
              null,
              n.createElement(
                K.jn,
                {
                  onClick: () =>
                    ((t) => {
                      if (t instanceof fe.i9) {
                        t.ResetImage();
                        const a = window,
                          l = n.createElement(Le.q, {
                            ownerWin: a,
                            uploadFile: t,
                            forceResolution: e.forceResolution,
                            fileType: e.forceFileType || 3,
                          });
                        (0, ee.HT)(l, a, "CropModal", {
                          strTitle: (0, S.we)("#ImageUpload_CropModalTitle"),
                        });
                      }
                      console.log(
                        "ArtworkUploadEmbeddedDialog trying to crop non image",
                        t.fileType,
                        t.type,
                      );
                    })(t),
                },
                (0, S.we)("#ImageUpload_OpenEditor"),
              ),
            ),
        );
      });
      function Re(e) {
        const { asset: t } = e;
        return we.Ho.includes(t.fileType)
          ? n.createElement(
              "div",
              {
                className: Ne().PreviewImgCtn,
                onClick: (e) =>
                  (0, ee.pg)(n.createElement(Pe, { asset: t }), (0, ce.uX)(e)),
              },
              n.createElement(
                "span",
                { className: Ne().PreviewImgInfo },
                t.width,
                " x ",
                t.height,
              ),
              n.createElement(
                "video",
                {
                  height: 120,
                  controls: !1,
                  autoPlay: !0,
                  loop: !0,
                  muted: !0,
                },
                n.createElement("source", { src: t.dataUrl }),
              ),
            )
          : n.createElement(
              "div",
              {
                className: Ne().PreviewImgCtn,
                style: { backgroundImage: `url(${t.dataUrl})` },
              },
              n.createElement(
                "span",
                { className: Ne().PreviewImgInfo },
                t.width,
                " x ",
                t.height,
              ),
            );
      }
      function Pe(e) {
        const { asset: t, closeModal: a } = e;
        return n.createElement(
          $.o0,
          { bAlertDialog: !0, closeModal: a },
          n.createElement(
            "video",
            { controls: !0, autoPlay: !0, loop: !0, muted: !0 },
            n.createElement("source", { src: t.dataUrl }),
          ),
        );
      }
      var xe;
      !(function (e) {
        (e[(e.k_eInsertThumbnail = 1)] = "k_eInsertThumbnail"),
          (e[(e.k_eInsertFullImage = 2)] = "k_eInsertFullImage"),
          (e[(e.k_eShowImageGroup = 3)] = "k_eShowImageGroup"),
          (e[(e.k_eInsertVideo = 4)] = "k_eInsertVideo");
      })(xe || (xe = {}));
      var Fe = a(60746),
        He = a(29347),
        ze = a(96236),
        je = a(53732),
        Ve = a.n(je),
        We = a(49460);
      function qe(e) {
        const { fnSetImageSearch: t } = e,
          a = (0, n.useRef)(null);
        return n.createElement(
          "div",
          { className: We.PickerTitle },
          n.createElement("input", {
            ref: a,
            className: We.SearchInput,
            type: "text",
            placeholder: (0, S.we)("#ImagePicker_Search"),
            onChange: (e) => t(e.currentTarget.value),
            onKeyDown: (e) => {
              "Escape" == e.key && (t(""), a.current && (a.current.value = ""));
            },
          }),
        );
      }
      const Ye = n.memo(function (e) {
        const {
            fileNameSearch: t,
            clanAccountID: a,
            imageInsertCallBack: l,
            fnOnExpandImage: r,
            insertActions: o,
            InternalOpenLocalizeImageGroup: s,
          } = e,
          c = (0, v.n9)(a),
          g = t?.trim().toLowerCase() || "",
          m = v.pU.GetFilteredClanImagesList(c, g);
        if (0 == m.length) {
          const e = i.b.InitFromClanID(a);
          let t = v.pU.GetLoadState(e);
          return t && t.loaded
            ? n.createElement(
                "div",
                {
                  key: "ImagePicker_Result",
                  className: Ve().ResultNotification,
                },
                g.length > 0
                  ? (0, S.we)("#ImagePicker_EmptySearch")
                  : (0, S.we)("#ImagePicker_Empty"),
              )
            : t && t.errMsg
              ? n.createElement(
                  "div",
                  { key: "ImagePicker_Result", className: Ve().ErrorCode },
                  (0, S.we)("#ImagePicker_Error", t.errMsg),
                )
              : n.createElement(
                  "div",
                  {
                    key: "ImagePicker_Result",
                    className: Ve().ResultNotification,
                  },
                  (0, S.we)("#Loading"),
                );
        }
        return m.map((e) =>
          n.createElement(Qe, {
            key: e.imageid,
            clanImage: e,
            searchStringHilight: g,
            imageInsertCallBack: l,
            fnOnOpenLocalizedImageGroup: s,
            insertActions: o?.filter(
              (t) =>
                (5 != e.file_type && 4 != e.file_type) ||
                t == xe.k_eInsertFullImage,
            ),
            OnImageClick: r,
          }),
        );
      });
      class Qe extends n.Component {
        m_linkPopupRef = n.createRef();
        state = { bDeleting: !1 };
        onHandleFullSize() {
          this.props.imageInsertCallBack(
            this.props.clanImage,
            xe.k_eInsertFullImage,
          );
        }
        onHandleVideo() {
          this.props.imageInsertCallBack(
            this.props.clanImage,
            xe.k_eInsertVideo,
          );
        }
        onHandleThumbnail() {
          this.props.imageInsertCallBack(
            this.props.clanImage,
            xe.k_eInsertThumbnail,
          );
        }
        onHandleLocalizedImageGroup() {
          this.props.fnOnOpenLocalizedImageGroup(this.props.clanImage);
        }
        ShowInsertAction(e) {
          return this.props.insertActions
            ? this.props.insertActions.indexOf(e) >= 0
            : (5 != this.props.clanImage.file_type &&
                4 != this.props.clanImage.file_type) ||
                e == xe.k_eInsertVideo;
        }
        OnDragStartSource(e) {
          e.dataTransfer.setData("text", this.props.clanImage.url),
            v.pU.GetClanImageDragListener().forEach((e) => {
              e(i.b.InitFromClanID(this.props.clanImage.clanAccountID), !0);
            });
        }
        OnDragEndSource(e) {
          v.pU.GetClanImageDragListener().forEach((e) => {
            e(i.b.InitFromClanID(this.props.clanImage.clanAccountID), !1);
          });
        }
        OnDeleteClick(e) {
          (0, ee.pg)(
            n.createElement(
              $.o0,
              {
                strTitle: (0, S.we)("#ImagePicker_DeleteImageTitle"),
                strDescription: "",
                onOK: this.onDelete,
                onCancel: this.OnCloseDialog,
                closeModal: this.OnCloseDialog,
              },
              n.createElement(
                n.Fragment,
                null,
                n.createElement(
                  "div",
                  null,
                  (0, S.we)(
                    "#ImagePicker_DeleteAreYouSure",
                    this.props.clanImage.file_name,
                  ),
                ),
                n.createElement("br", null),
                n.createElement("br", null),
                n.createElement(
                  "div",
                  null,
                  (0, S.we)("#ImagePicker_DeleteWarning"),
                ),
              ),
            ),
            (0, ce.uX)(e),
          );
        }
        ShowDeleteError(e) {
          console.log("ClanImageWrapper on delete error: " + e),
            (0, ee.pg)(
              n.createElement(
                $.KG,
                {
                  strTitle: (0, S.we)("#Error_FailureNotice"),
                  strDescription: (0, S.we)("#EventDisplay_DeleteEvent_Error"),
                },
                n.createElement("p", null, e),
              ),
              window,
            );
        }
        onDelete() {
          this.setState({ bDeleting: !0 });
          let e = i.b.InitFromClanID(this.props.clanImage.clanAccountID);
          v.pU
            .DeleteClanImage(e, this.props.clanImage)
            .then((e) => {
              1 != e.success && this.ShowDeleteError((0, Se.H)(e).strErrorMsg),
                this.setState({ bDeleting: !1 });
            })
            .catch((e) => {
              this.ShowDeleteError((0, Se.H)(e).strErrorMsg),
                this.setState({ bDeleting: !1 });
            }),
            this.m_linkPopupRef &&
              this.m_linkPopupRef.current &&
              this.m_linkPopupRef.current.click(),
            this.OnCloseDialog();
        }
        OnCloseDialog() {}
        OnImageClick() {
          this.props.OnImageClick &&
            this.props.OnImageClick(this.props.clanImage);
        }
        render() {
          const { clanImage: e } = this.props;
          let t = this.props.clanImage.file_name
              ? this.props.clanImage.file_name
              : "",
            a = (0, He.r)(
              this.props.searchStringHilight,
              t,
              String(this.props.clanImage.imageid),
              Ve().Hilight,
            ),
            l = i.b.InitFromClanID(e.clanAccountID);
          const r = Fe.KN.Get().GetPartnerEventPermissions(l);
          let o = this.state.bDeleting;
          const s = 4 == e.file_type || 5 == e.file_type;
          let c = !o && !s && this.ShowInsertAction(xe.k_eInsertFullImage),
            g = !o && !s && this.ShowInsertAction(xe.k_eInsertThumbnail),
            m = !o && s && this.ShowInsertAction(xe.k_eInsertVideo),
            d = Boolean(
              !o &&
                r.valve_admin &&
                this.ShowInsertAction(xe.k_eShowImageGroup),
            );
          return n.createElement(
            ze.K,
            {
              placeholderHeight: "100vh",
              className: Ve().ImageWrapperContainer,
              rootMargin: "0px 0px 100% 0px",
            },
            n.createElement(
              "div",
              { className: Ve().ImageButton },
              n.createElement(
                "div",
                {
                  className: Ve().ImageWrapper,
                  style: {
                    backgroundImage: s
                      ? ""
                      : `url( '${this.props.clanImage.thumb_url}' )`,
                  },
                  draggable: !0,
                  onDragStart: this.OnDragStartSource,
                  onDragEnd: this.OnDragEndSource,
                  onDoubleClick: this.onHandleFullSize,
                  onClick: this.OnImageClick,
                },
                Boolean(s) &&
                  n.createElement(
                    "video",
                    {
                      autoPlay: !0,
                      loop: !0,
                      muted: !0,
                      className: Ve().VideoBackground,
                    },
                    n.createElement("source", {
                      src: this.props.clanImage.url,
                      type: "video/" + (4 == e.file_type ? "mp4" : "webm"),
                    }),
                  ),
              ),
              c &&
                n.createElement(
                  "span",
                  { className: Ve().Full, onClick: this.onHandleFullSize },
                  (0, S.we)("#ImagePicker_FullSize"),
                ),
              o &&
                n.createElement(Q.t, {
                  size: "medium",
                  className: Ve().FloatingThrobber,
                }),
              g &&
                n.createElement(
                  "span",
                  { className: Ve().Thumb, onClick: this.onHandleThumbnail },
                  (0, S.we)("#ImagePicker_Thumbnail"),
                ),
              d &&
                n.createElement(
                  "span",
                  {
                    className: (0, U.A)(
                      Ve().Localized,
                      ne().ValveOnlyBackground,
                    ),
                    onClick: this.onHandleLocalizedImageGroup,
                  },
                  "(VO) " + (0, S.we)("#ImagePicker_Localized"),
                ),
              m &&
                n.createElement(
                  "span",
                  { className: Ve().Full, onClick: this.onHandleVideo },
                  (0, S.we)("#ImagePicker_Video"),
                ),
              !o &&
                n.createElement(
                  "span",
                  { className: Ve().Delete, onClick: this.OnDeleteClick },
                  n.createElement("img", null),
                ),
              n.createElement(
                "div",
                { className: Ve().ImageWrapperFilename, title: t },
                a,
              ),
            ),
          );
        }
      }
      function Ze(e) {
        const { clanSteamID: t, closeModal: a, OnClanImageSelected: l } = e,
          r = (0, n.useCallback)(
            (e, t) => {
              l(e, t), a();
            },
            [l, a],
          ),
          o = (0, n.useMemo)(() => [], []),
          [i, s] = (0, n.useState)(null);
        return n.createElement(
          $.o0,
          {
            strTitle: (0, S.we)("#ImagePicker_Images"),
            strDescription: (0, S.we)("#ImagePicker_DoubleClickToSelect"),
            bAlertDialog: !0,
            onOK: a,
            onCancel: a,
          },
          n.createElement(qe, { fnSetImageSearch: s }),
          n.createElement(Ye, {
            clanAccountID: t.GetAccountID(),
            fileNameSearch: i,
            imageInsertCallBack: r,
            insertActions: o,
            InternalOpenLocalizeImageGroup: null,
          }),
        );
      }
      function Je(e) {
        const {
          clanSteamID: t,
          fnSetImageURL: a,
          OnClanImageSelected: l,
          rgRealmList: r,
        } = e;
        return n.createElement(
          "div",
          { className: Ge().ImageUploadBar },
          n.createElement(
            "label",
            { htmlFor: "clanimagedialog" },
            n.createElement(
              "span",
              null,
              (0, S.we)("#ImagePicker_PreviousImages"),
              " ",
            ),
            n.createElement(
              "span",
              { className: Ge().SelectImageButton },
              (0, S.we)("#ImagePicker_PreviousImages2"),
            ),
          ),
          n.createElement("input", {
            style: { display: "none" },
            id: "clanimagedialog",
            type: "button",
            onClick: (e) => {
              (0, ee.pg)(
                n.createElement(Ze, { clanSteamID: t, OnClanImageSelected: l }),
                (0, ce.uX)(e),
              );
            },
          }),
        );
      }
      function Xe(e) {
        const {
            clanSteamID: t,
            rgSupportArtwork: a,
            localizedPrimaryImage: l,
            bAllowPreviousClanImageSelection: r,
            fnSetImageURL: o,
            rgRealmList: i,
          } = e,
          [s] = n.useState(() => e.uploaderOverride || new ve.V(t)),
          [c, m] = n.useState(!1),
          [d] = (0, g.q3)(() => [b.O.Get().GetCurEditLanguage()]);
        n.useEffect(() => {
          s.SetImageAllUrlFunction(e.fnSetImageURL);
        }, [s, e.fnSetImageURL]);
        const u = n.useCallback(
            async (e, t) => {
              if (!c) {
                m(!0);
                try {
                  const t = (0, be.j)(e.file_name, d),
                    n = (0, be.P)(t, d, i);
                  await s.AddExistingClanImage(e, n, a, l);
                } catch (e) {
                  let t = (0, Se.H)(e);
                  console.error("AddExistingClanImage: " + t.strErrorMsg, t),
                    (0, ee.pg)(
                      n.createElement($.KG, {
                        strDescription: (0, S.we)(
                          "#EventError_Code",
                          t.strErrorMsg,
                        ),
                      }),
                      window,
                    );
                }
                m(!1);
              }
            },
            [c, s, d, l, i, a],
          ),
          p = n.useMemo(
            () =>
              r
                ? [
                    [
                      n.createElement(Je, {
                        key: "clanartworkpicker",
                        clanSteamID: t,
                        fnSetImageURL: o,
                        rgRealmList: i,
                        OnClanImageSelected: u,
                      }),
                    ],
                  ]
                : null,
            [u, r, t, o, i],
          );
        return n.createElement(Ue, {
          ...e,
          imageUploader: s,
          elAdditonalButtons: c
            ? [
                n.createElement(Q.t, {
                  key: "throbbing",
                  position: "center",
                  size: "medium",
                  string: (0, S.we)("#Loading"),
                }),
              ]
            : p,
        });
      }
      (0, de.Cg)([k.oI], Qe.prototype, "onHandleFullSize", null),
        (0, de.Cg)([k.oI], Qe.prototype, "onHandleVideo", null),
        (0, de.Cg)([k.oI], Qe.prototype, "onHandleThumbnail", null),
        (0, de.Cg)([k.oI], Qe.prototype, "onHandleLocalizedImageGroup", null),
        (0, de.Cg)([k.oI], Qe.prototype, "OnDragStartSource", null),
        (0, de.Cg)([k.oI], Qe.prototype, "OnDragEndSource", null),
        (0, de.Cg)([k.oI], Qe.prototype, "OnDeleteClick", null),
        (0, de.Cg)([k.oI], Qe.prototype, "onDelete", null),
        (0, de.Cg)([k.oI], Qe.prototype, "OnCloseDialog", null),
        (0, de.Cg)([k.oI], Qe.prototype, "OnImageClick", null);
      var Ke = a(14947),
        $e = a(68033),
        et = a(55263),
        tt = a(41550),
        at = a(48628),
        nt = a(35685),
        lt = a(9709),
        rt = a(96866),
        ot = a(25359),
        it = a.n(ot),
        st = a(44894),
        ct = a(1909);
      function gt(e) {
        const {
            clanImage: t,
            closeModal: a,
            lang: l,
            fnOnArtworkLangChange: r,
            realms: o,
            fnLangHasData: s,
          } = e,
          [c, m] = (0, n.useState)(l),
          d = i.b.InitFromClanID(t.clanAccountID),
          u = (0, g.q3)(() =>
            v.i6.GenerateArtworkURLFromHashAndExtensions(
              d,
              v.i6.GetHashAndExt(t),
            ),
          );
        return n.createElement(
          $.o0,
          {
            strTitle: (0, S.we)("#selectimage_change_artwork_lang_title"),
            strDescription: (0, S.we)("#selectimage_change_artworl_lang_desc"),
            onOK: () => r(t, l, c),
            onCancel: a,
            closeModal: a,
          },
          n.createElement(
            "div",
            { className: (0, U.A)(ne().FlexColumnContainer, it().ReassignCtn) },
            n.createElement(
              "div",
              { className: it().ImagePreviewContainer },
              n.createElement("img", {
                className: it().ArtworkPreview,
                src: u,
              }),
            ),
            n.createElement(ct.Ng, {
              selectedLang: c,
              fnLangHasData: s,
              fnOnLanguageChanged: m,
              realms: o,
            }),
          ),
        );
      }
      var mt = a(32754);
      let dt = class extends n.Component {
        OnCloseDeleteDialog() {}
        OnChangeImageLanguage(e) {
          let t = (0, h.sf)(e.currentTarget.id);
          this.props.fnOnLanguagePreviewChange(t);
        }
        OnChangeLanguage(e) {
          const { fnGetImageHash: t, clanSteamID: a } = this.props;
          let l = +e.currentTarget.dataset.lang,
            r = t(l);
          if (r) {
            let e = v.pU.GetClanImageByImageHash(a, r);
            e &&
              (0, ee.pg)(
                n.createElement(gt, {
                  clanImage: e,
                  lang: l,
                  fnOnArtworkLangChange: this.props.fnOnArtworkLangChange,
                  fnLangHasData: this.props.fnLangHasData,
                  realms: this.props.realms,
                }),
                window,
              );
          }
        }
        OnDeleteClick(e) {
          e.stopPropagation(), e.preventDefault();
          let t = +e.currentTarget.dataset.lang;
          (0, ee.pg)(
            n.createElement($.o0, {
              strTitle: (0, S.we)("#selectimage_remove_image"),
              strDescription: (0, S.we)(
                "#selectimage_remove_details",
                (0, S.we)("#Language_" + (0, h.Lg)(t)),
              ),
              closeModal: this.OnCloseDeleteDialog,
              onOK: () => {
                this.props.fnOnRemoveImage(t);
              },
              onCancel: this.OnCloseDeleteDialog,
            }),
            (0, ce.uX)(e),
          );
        }
        ConstructLanguages() {
          const {
            langOverride: e,
            fnGetImageHash: t,
            clanSteamID: a,
          } = this.props;
          let l = new Array(),
            r = a.GetAccountID(),
            o = Array();
          const i = S.A0.GetLanguageListForRealms([
            Ce.TU.k_ESteamRealmGlobal,
            Ce.TU.k_ESteamRealmChina,
          ]);
          for (const e of i) {
            const a = t(e);
            if (a) {
              const t = (0, h.Lg)(e),
                n = (0, S.we)("#Language_" + t);
              o.push({ lang: e, strLang: t, locLang: n, imgHash: a });
            }
          }
          o = o.sort((e, t) =>
            e.locLang > t.locLang ? 1 : e.locLang < t.locLang ? -1 : 0,
          );
          for (const t of o) {
            const o = v.pU.GetClanImageByImageHash(a, t.imgHash),
              i = o
                ? v.i6.GenerateArtworkURLFromHashAndExtensions(
                    this.props.clanSteamID,
                    v.i6.GetHashAndExt(o),
                    v.wI.full,
                    t.lang,
                  )
                : "",
              s =
                e == t.lang
                  ? it().LanguageSelectorSelected
                  : t.imgHash
                    ? it().LanguageSelector
                    : it().LanguageSelectorNoData;
            l.push(
              n.createElement(
                "div",
                {
                  key: "lang_select_" + r + " " + t.strLang,
                  id: t.strLang,
                  className: it().LanguageContainer,
                  onClick: this.OnChangeImageLanguage,
                },
                n.createElement("div", { className: s }, t.locLang),
                n.createElement(
                  "span",
                  { className: it().LanguageOptions },
                  Boolean(i) &&
                    n.createElement(
                      "a",
                      { href: i, target: "_blank" },
                      n.createElement(
                        mt.he,
                        {
                          toolTipContent: (0, S.we)(
                            "#selectimage_viewimage_ttip",
                          ),
                        },
                        te.YNO(),
                      ),
                    ),
                  this.props.fnOnArtworkLangChange &&
                    n.createElement(
                      mt.he,
                      {
                        toolTipContent: (0, S.we)(
                          "#selectimage_reassign_image_ttip",
                        ),
                      },
                      n.createElement("img", {
                        "data-lang": t.lang,
                        src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAFo9M/3AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NzcyREYxMUExREVBMTFFOUJFQTREQjZGQTJEQ0UzOTMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NzcyREYxMUIxREVBMTFFOUJFQTREQjZGQTJEQ0UzOTMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3NzJERjExODFERUExMUU5QkVBNERCNkZBMkRDRTM5MyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3NzJERjExOTFERUExMUU5QkVBNERCNkZBMkRDRTM5MyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pmk/vzIAAAFiSURBVHjaYnz79i0DCDAB8X8gVgUIIEaoSBmIIQRkvAMIIBADJMUIxBVArI0sAAYAAQTTAwNlTEgcXZDpLFDOHCC+A8Sd6FoEAAIIJBAOZKxAEoTZmAPEKSxQSZitFVCz10D5O1iQdE4AYgsouwOKBUBWvAEyRKF+RQa+QLwFIIDQHYUM/gAxC8hfb6C6QTgLKvkaiGtAikBuUAHiD0g6QZJzob5gYUEz9jXUPU+AWAYWETDwG+o9mGQGLLAFoFbcBGJFIGaDagDHCrIV6ti8ArLCFoc3wf4HCDB84YANVEC9HwPEU4B4EiycQKEqgAUjx+F3INYHYkOoZh6YC0CeEUQLS2Qbi4HYCYgvQ8P8AhC3QOMaJRjRNf4C4m3QcP8ODd4QqM0dyIGEDgKgCtmgUf8dypeBamSERoEALi8sAuUnID4AxIegbHQA18OCRTKOlGgBeSECmuH+E4nfQPWAXQwAHbJ3VkYR2TIAAAAASUVORK5CYII=",
                        onClick: this.OnChangeLanguage,
                      }),
                    ),
                  this.props.fnOnRemoveImage &&
                    n.createElement(
                      mt.he,
                      {
                        toolTipContent: (0, S.we)(
                          "#selectimage_delete_image_ttip",
                        ),
                      },
                      n.createElement("img", {
                        "data-lang": t.lang,
                        src: st.A,
                        onClick: this.OnDeleteClick,
                      }),
                    ),
                ),
              ),
            );
          }
          return l;
        }
        render() {
          let e = this.ConstructLanguages();
          return n.createElement(
            "div",
            { className: it().SelectImageLanguagesCtn },
            n.createElement(
              "div",
              { className: it().SelectImageTitle },
              (0, S.we)("#selectimage_uploaded_languages"),
            ),
            n.createElement(
              "div",
              { className: it().LanguageListContainer },
              e,
            ),
          );
        }
      };
      (0, de.Cg)([k.oI], dt.prototype, "OnCloseDeleteDialog", null),
        (0, de.Cg)([k.oI], dt.prototype, "OnChangeImageLanguage", null),
        (0, de.Cg)([k.oI], dt.prototype, "OnChangeLanguage", null),
        (0, de.Cg)([k.oI], dt.prototype, "OnDeleteClick", null),
        (dt = (0, de.Cg)([ke.PA], dt));
      var ut = a(56330),
        pt = a(3088),
        _t = a(10224),
        Et = a(15496),
        It = a.n(Et);
      function ht(e) {
        const {
            event: t,
            spotlightURLOverride: a,
            fnHandleOpenEvent: l,
            fnImageFailureCallback: r,
            fnFilterImageURLsForKnownFailures: o,
            langOverride: i,
          } = e,
          s = (0, _t.c)(),
          c = n.useCallback(
            (e) => {
              e.preventDefault(), l && l(t);
            },
            [t, l],
          ),
          m = i || (0, h.sf)(M.TS.LANGUAGE),
          [u, p, _, E] = (0, g.q3)(() => [
            t.GetSummaryWithFallback(m),
            t.GetNameWithFallback(m),
            t.GetCategoryAsString(),
            t.BShowLibrarySpotlightText(),
          ]);
        let I = new Array();
        (I =
          void 0 !== a
            ? [a]
            : 2434320 == t.appid || 2 == M.TS.EUNIVERSE
              ? s
                ? t.GetImageForSizeAsArrayWithFallback(
                    "localized_store_app_spotlight_mobile",
                    m,
                    v.wI.full,
                  )
                : t.GetImageForSizeAsArrayWithFallback(
                    "localized_store_app_spotlight",
                    m,
                    v.wI.full,
                  )
              : t.GetImageForSizeAsArrayWithFallback(
                  "spotlight",
                  m,
                  v.wI.spotlight_main,
                )),
          o && (I = o(I));
        const b = u.replace(/https:\/\/[^ ]*/gi, "").trimLeft();
        return n.createElement(
          n.Fragment,
          null,
          n.createElement(
            "div",
            { className: It().MajorEvent_Ctn, ref: e.containerRef },
            n.createElement(
              d.Z,
              {
                className: (0, U.A)(
                  It().AppDetailsSpotlightContainer,
                  It().MajorEventContainer,
                ),
                onActivate: c,
                focusable: !0,
              },
              n.createElement(
                "div",
                { className: It().MajorEventBackground },
                n.createElement(pt.c, {
                  className: It().MajorEventImageBackgroundBlur,
                  rgSources: I,
                  onIncrementalError: (e, t, a) => r && r(t),
                }),
              ),
              n.createElement(
                "div",
                { className: It().MajorEventImageContainer },
                n.createElement(pt.c, {
                  className: It().MajorEventImage,
                  rgSources: I,
                  onIncrementalError: (e, t, a) => r && r(t),
                }),
                n.createElement("div", {
                  className: It().MajorEventImageTemplate,
                }),
                n.createElement(
                  "div",
                  { className: It().MajoreEventImageContentContainer },
                  E &&
                    n.createElement(
                      "div",
                      { className: It().MajorEventContent },
                      n.createElement(pt.c, {
                        className: It().MajorEventSpotlightBackground,
                        rgSources: I,
                        onIncrementalError: (e, t, a) => r && r(t),
                      }),
                      n.createElement(
                        "div",
                        { className: It().MajorEventTextCtn },
                        n.createElement(
                          "div",
                          { className: It().MajorEventTitle },
                          p,
                        ),
                        n.createElement(
                          "div",
                          { className: It().MajorEventSummary },
                          b,
                        ),
                      ),
                    ),
                ),
              ),
              n.createElement("div", { className: It().BottomShadow }),
            ),
          ),
        );
      }
      const vt =
        "https://partner.steamgames.com/doc/store/localization#supported_languages";
      var bt;
      function St(e) {
        const {
            artworkType: t,
            headerHint: a,
            appid: l,
            fnToggleMinimize: r,
            realms: o,
            eventModel: i,
            fnLangHasData: s,
            fnGetImageHashAndExt: c,
            fnSetImageURL: g,
            partnerEventStore: m,
          } = e,
          [d] = (0, et.t7)(l, { include_assets: !0 });
        let u = null;
        a === bt.k_Required
          ? (u = n.createElement(
              "span",
              { style: { color: "#C6512B" } },
              (0, S.we)("#EventEditor_Required"),
            ))
          : a === bt.k_Suggested
            ? (u = n.createElement(
                "span",
                { style: { color: "#D7BC86" } },
                (0, S.we)("#EventEditor_Suggested"),
              ))
            : a === bt.k_Requested &&
              (u = n.createElement(
                "span",
                { style: { color: "#D7BC86" } },
                (0, S.we)("#EventEditor_Requested"),
              ));
        let p = null;
        "capsule" === t
          ? (p = n.createElement(
              n.Fragment,
              null,
              n.createElement(
                "p",
                null,
                n.createElement(
                  "strong",
                  null,
                  (0, S.we)("#selectimage_tip_design_title"),
                ),
                ": ",
                (0, S.we)("#selectimage_tip_capsule_1"),
              ),
              n.createElement(
                "p",
                null,
                n.createElement(
                  "strong",
                  null,
                  (0, S.we)("#selectimage_tip_usage_title"),
                ),
                ": ",
                (0, S.we)("#selectimage_tip_capsule_2"),
              ),
            ))
          : "background" === t
            ? (p = n.createElement(
                n.Fragment,
                null,
                n.createElement(
                  "p",
                  null,
                  n.createElement(
                    "strong",
                    null,
                    (0, S.we)("#selectimage_tip_design_title"),
                  ),
                  ": ",
                  (0, S.we)("#selectimage_tip_background_1"),
                ),
              ))
            : "spotlight" === t || "localized_store_app_spotlight" === t
              ? (p = n.createElement(
                  n.Fragment,
                  null,
                  n.createElement(
                    "p",
                    null,
                    n.createElement(
                      "strong",
                      null,
                      (0, S.we)("#selectimage_tip_usage_title"),
                    ),
                    ": ",
                    (0, S.we)("#selectimage_tip_store_spotlight_1"),
                  ),
                ))
              : "localized_store_app_spotlight_mobile" === t
                ? (p = n.createElement(
                    n.Fragment,
                    null,
                    n.createElement(
                      "p",
                      null,
                      n.createElement(
                        "strong",
                        null,
                        (0, S.we)("#selectimage_tip_usage_title"),
                      ),
                      ": ",
                      (0, S.we)("#selectimage_tip_store_mobile_spotlight"),
                    ),
                  ))
                : "broadcast_left" === t || "broadcast_right" === t
                  ? (p = n.createElement(
                      n.Fragment,
                      null,
                      n.createElement(
                        "p",
                        null,
                        (0, S.we)("#selectimage_tip_broadcast_1"),
                      ),
                    ))
                  : "sale_header" === t
                    ? (p = n.createElement(
                        n.Fragment,
                        null,
                        n.createElement(
                          "div",
                          { className: ne().EventElementRequired },
                          (0, S.we)("#selectimage_tip_required_title"),
                        ),
                        n.createElement(
                          "p",
                          null,
                          n.createElement(
                            "b",
                            null,
                            (0, S.we)("#selectimage_tip_usage_title"),
                          ),
                          ": ",
                          (0, S.we)("#selectimage_tip_sale_header_1"),
                        ),
                        n.createElement(
                          "p",
                          null,
                          n.createElement(
                            "b",
                            null,
                            (0, S.we)("#selectimage_tip_design_title"),
                          ),
                          ": ",
                          (0, S.we)("#selectimage_tip_sale_header_2"),
                        ),
                        n.createElement(
                          "p",
                          null,
                          (0, S.we)("#selectimage_tip_sale_header_4"),
                        ),
                        n.createElement(
                          "p",
                          null,
                          n.createElement(
                            "b",
                            null,
                            (0, S.we)("#selectimage_tip_template_title"),
                          ),
                          ": ",
                          n.createElement(
                            "a",
                            {
                              href: "https://www.dropbox.com/scl/fo/mhf604o6bdbcfr1scq7bx/h?rlkey=9bk0ggiwuvs4o1jdnej4xsy0c&dl=0",
                            },
                            (0, S.we)("#selectimage_tip_sale_header_3"),
                          ),
                        ),
                        n.createElement("br", null),
                      ))
                    : "hero" === t
                      ? d &&
                        (p = n.createElement(
                          n.Fragment,
                          null,
                          n.createElement(
                            "p",
                            null,
                            (0, S.we)("#selectimage_tip_hero_1"),
                          ),
                          !Boolean(d.GetAssets().GetLibraryHeroURL()) &&
                            n.createElement(
                              "p",
                              { className: ut.ErrorStylesBackground },
                              (0, S.we)(
                                "#EventEdtior_ArtworkType_hero_warning",
                              ),
                            ),
                        ))
                      : (p =
                          "localized_image_group" === t ||
                          "link_capsule" === t ||
                          "sale_section_title" === t ||
                          "schedule_track_art" === t ||
                          "localized_background_art" === t
                            ? n.createElement(
                                n.Fragment,
                                null,
                                n.createElement(
                                  "p",
                                  null,
                                  (0, S.we)("#ImagePickerLoc_Desc"),
                                ),
                                n.createElement(
                                  "p",
                                  null,
                                  (0, S.PP)(
                                    "#ImagePickerLoc_Files",
                                    n.createElement(
                                      "a",
                                      {
                                        href: vt,
                                        target: M.TS.IN_CLIENT
                                          ? void 0
                                          : "_blank",
                                      },
                                      (0, S.we)("#ImagePickerLoc_URL"),
                                    ),
                                  ),
                                ),
                              )
                            : "product_banner" === t
                              ? n.createElement(
                                  n.Fragment,
                                  null,
                                  n.createElement(
                                    "div",
                                    { className: ne().EventElementOptional },
                                    (0, S.we)(
                                      "#selectimage_tip_optional_title",
                                    ),
                                  ),
                                  n.createElement(
                                    "p",
                                    null,
                                    n.createElement(
                                      "b",
                                      null,
                                      (0, S.we)("#selectimage_tip_usage_title"),
                                    ),
                                    ": ",
                                    (0, S.we)(
                                      "#selectimage_tip_sale_product_banner",
                                    ),
                                  ),
                                )
                              : "product_mobile_banner" === t ||
                                  "product_banner_override" === t ||
                                  "product_mobile_banner_override" === t
                                ? n.createElement(
                                    n.Fragment,
                                    null,
                                    n.createElement(
                                      "div",
                                      { className: ne().EventElementOptional },
                                      (0, S.we)(
                                        "#selectimage_tip_optional_title",
                                      ),
                                    ),
                                    n.createElement(
                                      "p",
                                      null,
                                      n.createElement(
                                        "b",
                                        null,
                                        (0, S.we)(
                                          "#selectimage_tip_usage_title",
                                        ),
                                      ),
                                      ": ",
                                      (0, S.we)(
                                        "#selectimage_tip_sale_product_banner",
                                      ),
                                      "product_mobile_banner" === t &&
                                        n.createElement(
                                          "span",
                                          null,
                                          "  ",
                                          (0, S.we)(
                                            "#selectimage_tip_sale_product_banner_mobile",
                                          ),
                                        ),
                                    ),
                                  )
                                : "tab_bar_background" === t
                                  ? n.createElement(
                                      n.Fragment,
                                      null,
                                      n.createElement(
                                        "p",
                                        null,
                                        n.createElement(
                                          "strong",
                                          null,
                                          (0, S.we)(
                                            "#selectimage_tip_design_title",
                                          ),
                                        ),
                                        ":",
                                        (0, S.we)(
                                          "#Sale_Tabs_Background_Design",
                                        ),
                                      ),
                                      n.createElement(
                                        "p",
                                        null,
                                        n.createElement(
                                          "strong",
                                          null,
                                          (0, S.we)(
                                            "#selectimage_tip_usage_title",
                                          ),
                                        ),
                                        ":",
                                        (0, S.we)(
                                          "#Sale_Tabs_Background_Usage",
                                        ),
                                      ),
                                    )
                                  : "sale_logo" === t
                                    ? n.createElement(
                                        n.Fragment,
                                        null,
                                        n.createElement(
                                          "div",
                                          {
                                            className:
                                              ne().EventElementOptional,
                                          },
                                          (0, S.we)(
                                            "#selectimage_tip_optional_title",
                                          ),
                                        ),
                                        n.createElement(
                                          "p",
                                          null,
                                          n.createElement(
                                            "b",
                                            null,
                                            (0, S.we)(
                                              "#selectimage_tip_usage_title",
                                            ),
                                          ),
                                          ": ",
                                          (0, S.we)(
                                            "#selectimage_tip_pageLogo",
                                          ),
                                        ),
                                      )
                                    : n.createElement(
                                        n.Fragment,
                                        null,
                                        n.createElement(
                                          "div",
                                          {
                                            className:
                                              ne().EventElementRequired,
                                          },
                                          (0, S.we)(
                                            "#selectimage_tip_required_title",
                                          ),
                                        ),
                                        n.createElement(
                                          "p",
                                          null,
                                          n.createElement(
                                            "b",
                                            null,
                                            (0, S.we)(
                                              "#selectimage_tip_usage_title",
                                            ),
                                          ),
                                          ": ",
                                          (0, S.we)(
                                            "#selectimage_tip_bestofyear",
                                          ),
                                        ),
                                      ));
        const _ = we.Fj[e.artworkType].width,
          E = we.Fj[e.artworkType].height;
        return n.createElement(
          "div",
          { id: e.id, className: it().ArtworkSelectorContainer },
          Boolean(e.title) &&
            n.createElement(
              "div",
              { className: it().Title, onDoubleClick: r },
              e.title,
              n.createElement("span", null, " "),
              u,
              r &&
                n.createElement(
                  K.$n,
                  { onClick: r },
                  n.createElement(
                    mt.he,
                    {
                      toolTipContent: (0, S.we)(
                        e.bIsMinimized
                          ? "#Sale_Section_Maximize_Tooltip"
                          : "#Sale_Section_Minimize_Tooltip",
                      ),
                    },
                    e.bIsMinimized
                      ? n.createElement(te.hz4, null)
                      : n.createElement(te.Xjb, null),
                  ),
                ),
            ),
          !e.bIsMinimized &&
            n.createElement(
              "div",
              { className: (0, U.A)(it().SelectImageBlock, it().Tips) },
              p,
              Boolean(_ && E) &&
                n.createElement(
                  "p",
                  null,
                  n.createElement(
                    "b",
                    null,
                    (0, S.we)("#selectimage_tip_dimensions_title"),
                  ),
                  ": ",
                  (0, S.PP)("#selectimage_tip1", _, E),
                ),
              Boolean(e.strWarning) &&
                n.createElement(
                  "div",
                  null,
                  n.createElement(
                    "p",
                    { className: ut.WarningStylesWithIcon },
                    e.strWarning,
                  ),
                ),
              e.elEventArtworkExample,
              " ",
              n.createElement("br", null),
              e.elAdditionalControls,
              Boolean(e.fnRemoveAllArtwork) &&
                n.createElement(
                  K.$n,
                  {
                    onClick: (t) => {
                      (0, ee.pg)(
                        n.createElement(kt, {
                          fnRemoveAllArtwork: e.fnRemoveAllArtwork,
                        }),
                        (0, ce.uX)(t),
                      );
                    },
                  },
                  (0, S.we)("#Sale_RemoveAll"),
                ),
            ),
          !e.bIsMinimized &&
            n.createElement(wt, {
              clanSteamID: e.clanSteamID,
              title: e.title,
              imageWidth: _,
              eventModel: i,
              imageHeight: E,
              artworkType: e.artworkType,
              realms: o,
              appid: l,
              fnGetImageHashAndExt: c,
              fnSetImageURL: g,
              fnLangHasData: s,
              partnerEventStore: m,
            }),
        );
      }
      function kt(e) {
        const { fnRemoveAllArtwork: t, closeModal: a } = e;
        return n.createElement($.o0, {
          strTitle: (0, S.we)("#Sale_RemoveAll"),
          strDescription: (0, S.we)("#ImageUpload_DeleteAll_Confirm"),
          onOK: () => {
            t(), a();
          },
          onCancel: a,
        });
      }
      function Ct(e) {
        const t = e.lastIndexOf(".");
        return -1 === t ? e : e.substring(0, t);
      }
      !(function (e) {
        (e[(e.k_None = 0)] = "k_None"),
          (e[(e.k_Suggested = 1)] = "k_Suggested"),
          (e[(e.k_Required = 2)] = "k_Required"),
          (e[(e.k_Requested = 3)] = "k_Requested");
      })(bt || (bt = {}));
      let wt = class extends n.Component {
        state = {
          langOverride: b.O.Get().GetCurEditLanguage(),
          lastSelection: new Array(),
        };
        OnUpdateAndMoveClanImageLang(e, t, a) {
          const { fnGetImageHashAndExt: n, fnSetImageURL: l } = this.props;
          (0, Ke.h5)(() => {
            const { artworkType: r } = this.props;
            Ct(n(r, t)) == e.image_hash && l(r, null, t),
              l(r, e, a),
              this.InsertOrUpdateClanImageAndLangMapping(e, a, !1);
          });
        }
        OnRemoveImage(e) {
          const { fnSetImageURL: t } = this.props;
          t(this.props.artworkType, null, e);
        }
        InsertOrUpdateClanImageAndLangMapping(e, t, a) {
          const { lastSelection: n } = this.state;
          let l;
          n.find((t) => t.clanImage.imageid == e.imageid)
            ? (l = n.map((a) =>
                a.clanImage.imageid == e.imageid
                  ? { clanImage: e, lang: t }
                  : a,
              ))
            : a && (l = n.concat({ clanImage: e, lang: t })),
            this.setState({ lastSelection: l });
        }
        OnLanguageChange(e) {
          e != this.state.langOverride && this.setState({ langOverride: e });
        }
        render() {
          const {
              artworkType: e,
              realms: t,
              fnLangHasData: a,
              fnGetImageHashAndExt: l,
              eventModel: r,
              appid: o,
              partnerEventStore: i,
            } = this.props,
            s = "localized_image_group" === e;
          return "hero" === e
            ? n.createElement(
                "div",
                { style: { padding: "16px" } },
                n.createElement(
                  K.$n,
                  {
                    style: { textTransform: "uppercase", width: "200px" },
                    onClick: () =>
                      window.open(
                        `${M.TS.PARTNER_BASE_URL}admin/game/editbyappid/${o}?activetab=tab_graphicalassets`,
                      ),
                  },
                  (0, S.we)("#ImageUpload_EditHeroImage"),
                ),
              )
            : n.createElement(
                "div",
                null,
                n.createElement(ft, {
                  list: this.state.lastSelection,
                  fnOnArtworkLanguageChange: this.OnUpdateAndMoveClanImageLang,
                  realms: t,
                  fnLangHasData: a,
                }),
                n.createElement(
                  "div",
                  null,
                  n.createElement(
                    "div",
                    {
                      className: (0, U.A)(
                        it().SelectImageBlock,
                        it().MainPreviewBlock,
                      ),
                    },
                    n.createElement(Ut, {
                      eventModel: r,
                      clanSteamID: this.props.clanSteamID,
                      fnOnLanguagePreviewChange: this.OnLanguageChange,
                      langOverride: this.state.langOverride,
                      fnOnArtworkLangChange: s
                        ? null
                        : this.OnUpdateAndMoveClanImageLang,
                      artworkType: this.props.artworkType,
                      fnOnRemoveImage: s ? null : this.OnRemoveImage,
                      realms: t,
                      fnLangHasData: a,
                      fnGetImageHashAndExt: l,
                      partnerEventStore: i,
                    }),
                  ),
                ),
              );
        }
      };
      (0, de.Cg)([k.oI], wt.prototype, "OnUpdateAndMoveClanImageLang", null),
        (0, de.Cg)([k.oI], wt.prototype, "OnRemoveImage", null),
        (0, de.Cg)(
          [k.oI],
          wt.prototype,
          "InsertOrUpdateClanImageAndLangMapping",
          null,
        ),
        (0, de.Cg)([k.oI], wt.prototype, "OnLanguageChange", null),
        (wt = (0, de.Cg)([ke.PA], wt));
      let ft = class extends n.Component {
        ShowLangChangeDialog(e, t) {
          const {
            fnOnArtworkLanguageChange: a,
            realms: l,
            fnLangHasData: r,
          } = this.props;
          (0, ee.pg)(
            n.createElement(gt, {
              clanImage: e,
              lang: t,
              fnOnArtworkLangChange: a,
              fnLangHasData: r,
              realms: l,
            }),
            window,
          );
        }
        GenerateImageMappings() {
          let e = new Array();
          const { list: t } = this.props;
          return (
            t.forEach((t) => {
              const { clanImage: a, lang: l } = t;
              let r = (0, S.we)("#Language_" + (0, h.Lg)(l));
              e.push(
                n.createElement(
                  "div",
                  {
                    key: "img_lang_" + t.clanImage.imageid + "_" + l,
                    className: ne().FlexRowContainer,
                  },
                  n.createElement(
                    "span",
                    null,
                    (0, S.we)("#ImageUpload_Success_Mapping", a.file_name, r),
                  ),
                  n.createElement(
                    "a",
                    { onClick: () => this.ShowLangChangeDialog(a, l) },
                    (0, S.we)("#ImageUpload_Success_Mapping_Change"),
                  ),
                ),
              );
            }),
            e
          );
        }
        render() {
          const { list: e } = this.props;
          if (!e || 0 == e.length) return n.createElement("div", null);
          let t = this.GenerateImageMappings();
          return n.createElement("div", { className: rt.UploadSuccess }, t);
        }
      };
      function Dt(e) {
        const { imgURL: t, eventModel: a } = e,
          l = (0, b.E)();
        return n.createElement(
          "div",
          { style: { display: "flex", width: "304px" } },
          n.createElement(nt.uY, {
            event: a,
            imageURLOverride: t,
            langOverride: l,
          }),
        );
      }
      function At(e) {
        const { lang: t, eventModel: a, partnerEventStore: l } = e,
          [r, o, i, s, c] = (0, g.q3)(() => [
            a.GetNameWithFallback(t),
            a.GetDescriptionWithFallback(t),
            a.GetSubTitleWithLanguageFallback(t),
            a.type,
            a.AnnouncementGID,
          ]);
        let m = o
          ? n.createElement(at.f, {
              text: o || "",
              partnerEventStore: l,
              showErrorInfo: !1,
              event: a,
              languageOverride: b.O.Get().GetCurEditLanguage(),
            })
          : (0, S.we)("#selectimage_display_event_body");
        return n.createElement(
          "div",
          { className: it().MultipleExampleContainer },
          n.createElement(
            "div",
            { className: it().ExampleSectionTitle },
            (0, S.we)("#selectimage_preview_title_1"),
          ),
          n.createElement(
            "div",
            {
              className: (0, U.A)(it().DetailPageExample, "DetailPageExample"),
            },
            n.createElement(
              "div",
              { className: it().DetailExample },
              n.createElement(
                "div",
                { className: it().MainImageCtn },
                n.createElement("img", { src: e.imgURL }),
              ),
              n.createElement(
                "div",
                { className: it().ExampleBodyPosition },
                n.createElement(
                  "div",
                  { className: it().ExampleContentCtn },
                  n.createElement(
                    "div",
                    { className: it().TextTitle },
                    r || (0, S.we)("#selectimage_display_event_title"),
                  ),
                  n.createElement(
                    "div",
                    { className: it().TextSubTitle },
                    i || (0, S.we)("#selectimage_display_event_subtitle"),
                  ),
                  n.createElement("div", { className: it().TextBody }, m),
                ),
              ),
            ),
          ),
          12 != s &&
            n.createElement(
              n.Fragment,
              null,
              n.createElement("div", { className: it().ExampleSpacer }),
              n.createElement(
                "div",
                { className: it().ExampleSectionTitle },
                (0, S.we)("#selectimage_preview_title_2"),
              ),
              n.createElement(
                "div",
                {
                  className: (0, U.A)(
                    it().DetailPageExample,
                    "DetailPageExample",
                  ),
                },
                n.createElement(
                  "div",
                  { className: it().DetailExample2 },
                  n.createElement(tt.He, {
                    key: c,
                    event: a,
                    emoticonStore: $e.A,
                    partnerEventStore: l,
                    headerClassnames: "editor",
                    langOverride: t,
                    bDisableBroadcastPlayer: !0,
                  }),
                ),
              ),
            ),
        );
      }
      (0, de.Cg)([k.oI], ft.prototype, "ShowLangChangeDialog", null),
        (ft = (0, de.Cg)([ke.PA], ft));
      const yt = (e) => {
          const [t] = (0, et.t7)(e.event.appid, { include_assets: !0 });
          if (!t) return null;
          const a = t.GetName(),
            l = t.GetAssets().GetCommunityIconURL();
          return n.createElement(
            "div",
            { className: it().SpotlightExample },
            n.createElement(ht, {
              event: e.event,
              strDisplayName: a,
              gameIconUrl: l,
              spotlightURLOverride: e.imgURL,
              langOverride: e.lang,
            }),
          );
        },
        Gt = (e) => {
          const t = [
            n.createElement("img", { key: "img", src: e.imgURL }),
            n.createElement("div", {
              key: "video",
              className: it().BroadcastPreview,
            }),
          ];
          return (
            "right" === e.side && t.reverse(),
            n.createElement(
              "div",
              { className: it().BroadcastPreviewContainer },
              t,
            )
          );
        },
        Tt = (e) =>
          n.createElement(
            "div",
            { className: it().SaleHeaderPreviewContainer },
            n.createElement("img", { style: { width: "100%" }, src: e.imgURL }),
          ),
        Lt = (e) =>
          n.createElement(
            "div",
            { className: it().SaleHeaderPreviewContainer },
            n.createElement("img", { style: { width: "100%" }, src: e.imgURL }),
          ),
        Bt = (e) =>
          n.createElement(
            "div",
            { className: it().SaleHeaderPreviewContainer },
            n.createElement("img", { style: { width: "100%" }, src: e.imgURL }),
          );
      function Nt(e, t) {
        let a = 0;
        for (let n = 0; n < 31; ++n) t(e, n)?.length > 0 && (a += 1);
        return a;
      }
      function Ut(e) {
        const {
            langOverride: t,
            artworkType: a,
            fnOnLanguagePreviewChange: l,
            clanSteamID: r,
            eventModel: o,
            partnerEventStore: i,
            fnOnRemoveImage: s,
            fnOnArtworkLangChange: c,
            realms: m,
            fnLangHasData: d,
            fnGetImageHashAndExt: u,
          } = e,
          p = u(a, t),
          _ = p
            ? v.i6.GenerateArtworkURLFromHashAndExtensions(r, p, v.wI.full, t)
            : "",
          [E] = (0, g.q3)(() => [Nt(a, u)]);
        return 0 == E
          ? n.createElement(
              "div",
              { className: it().ImagePreviewContainer },
              "capsule" === a &&
                n.createElement(Dt, {
                  imgURL:
                    M.TS.IMG_URL + "events/defaults/default_img_cover.jpg",
                  eventModel: o,
                }),
              "background" === a &&
                n.createElement(At, {
                  imgURL:
                    M.TS.IMG_URL + "events/defaults/default_img_header.jpg",
                  lang: t,
                  eventModel: o,
                  partnerEventStore: i,
                }),
              "spotlight" === a &&
                n.createElement(yt, {
                  lang: t,
                  imgURL:
                    M.TS.IMG_URL + "events/defaults/default_img_spotlight.jpg",
                  event: o,
                }),
              "localized_store_app_spotlight" === a &&
                n.createElement(yt, {
                  lang: t,
                  imgURL:
                    M.TS.IMG_URL + "events/defaults/default_img_spotlight.jpg",
                  event: o,
                }),
              "localized_store_app_spotlight_mobile" === a &&
                n.createElement(yt, {
                  lang: t,
                  imgURL:
                    M.TS.IMG_URL + "events/defaults/default_img_spotlight.jpg",
                  event: o,
                }),
              n.createElement(
                "div",
                null,
                (0, S.we)("#EventEditor_ArtworkMissing"),
              ),
            )
          : n.createElement(
              "div",
              { className: it().ImagePreviewContainer },
              "capsule" === a &&
                n.createElement(Dt, { imgURL: _, eventModel: o }),
              "background" === a &&
                n.createElement(At, {
                  imgURL: _,
                  lang: t,
                  eventModel: o,
                  partnerEventStore: i,
                }),
              "spotlight" === a &&
                n.createElement(yt, { imgURL: _, event: o, lang: t }),
              "localized_store_app_spotlight" === a &&
                n.createElement(yt, { imgURL: _, event: o, lang: t }),
              "localized_store_app_spotlight_mobile" === a &&
                n.createElement(yt, { imgURL: _, event: o, lang: t }),
              ("broadcast_left" === a || "broadcast_right" === a) &&
                n.createElement(Gt, {
                  imgURL: _,
                  side: "broadcast_right" === a ? "right" : "left",
                }),
              "sale_header" === a && n.createElement(Tt, { imgURL: _ }),
              "sale_overlay" === a && n.createElement(Lt, { imgURL: _ }),
              v.pb.includes(a) &&
                n.createElement("img", {
                  className: lt.PreviewImg,
                  src: v.pU.GetLocalizedImageGroupForEditAsURL(r, t),
                }),
              "product_banner" === a && n.createElement(Bt, { imgURL: _ }),
              "product_mobile_banner" === a &&
                n.createElement(Bt, { imgURL: _ }),
              "sale_logo" === a && n.createElement(Bt, { imgURL: _ }),
              "bestofyear_banner" === a && n.createElement(Bt, { imgURL: _ }),
              "bestofyear_banner_mobile" === a &&
                n.createElement(Bt, { imgURL: _ }),
              n.createElement(dt, {
                langOverride: t,
                clanSteamID: r,
                fnOnLanguagePreviewChange: l,
                fnOnRemoveImage: s,
                fnOnArtworkLangChange: c,
                realms: m,
                fnLangHasData: d,
                fnGetImageHash: (e) => u(a, e),
              }),
            );
      }
      function Mt(e) {
        const {
            clanSteamID: t,
            appid: a,
            eventModel: l,
            realms: r,
            loc_images: o,
            artworkType: s,
            fnLangHasData: c,
            closeModal: m,
            fnGetImageHash: d,
            fnSetImageURL: u,
            partnerEventStore: p,
          } = e,
          [_, E] = (0, n.useState)(!1),
          [I] = n.useState(() => new ve.V(t)),
          h = t.GetAccountID(),
          [b] = (0, g.q3)(() => [
            I.GetFilesToUpload().length - I.GetCompletedFiles(),
          ]);
        (0, n.useEffect)(() => {
          E(!1),
            v.pU.ClearImageGroup(),
            o?.forEach((e, t) => {
              const a = i.b.InitFromClanID(h);
              if (0 == v.pU.GetAllLocalizedGroupImages().length) {
                const t = e && v.i6.GetHashFromHashAndExt(e),
                  n = t && v.pU.GetClanImageByImageHash(a, t);
                n && v.pU.SetPrimaryImageForImageGroup(n, s);
              }
              v.pU.SetLocalizedImageGroupAtLang(t, a, e);
            }),
            E(!0);
        }, [o, h, s]);
        const k = (0, n.useCallback)(
            (e, t, a = 0) => {
              const n = i.b.InitFromClanID(h),
                l = v.i6.GetHashAndExt(t);
              if (0 == v.pU.GetAllLocalizedGroupImages().length) {
                const t = l && v.i6.GetHashFromHashAndExt(l),
                  a = t && v.pU.GetClanImageByImageHash(n, t);
                a && v.pU.SetPrimaryImageForImageGroup(a, e);
              }
              v.pU.SetLocalizedImageGroupAtLang(a, n, l);
            },
            [h],
          ),
          C = (0, n.useCallback)((e, t) => {
            const a = v.pU.GetLocalizedImageGroupForEdit();
            return a?.localized_images[t];
          }, []);
        return n.createElement(
          $.o0,
          {
            onCancel: m,
            closeModal: m,
            bDisableBackgroundDismiss: !0,
            bAllowFullSize: !0,
            className: (0, U.A)(ut.NotTooWideModal, ut.ImageManageDialog),
            strTitle: e.strLocalizedTitle || (0, S.we)("#ImagePickerLoc_Title"),
            strDescription: e.strLocalizedDescription,
            bOKDisabled: b > 0,
            onOK: () => {
              v.pU.GetAllLocalizedGroupImages().forEach((e, t) => {
                if (e) {
                  let a = e.lastIndexOf("/");
                  const n = e.substring(a + 1);
                  u(
                    s,
                    {
                      image_hash: Ct(n),
                      clanAccountID: h,
                      file_type: v.i6.GetExtensionTypeFromURL(e),
                      imageid: void 0,
                    },
                    t,
                  );
                }
              }),
                v.pU.ClearImageGroup(),
                e.onOK ? e.onOK() : m();
            },
            strOKButtonText:
              b > 0 ? (0, S.we)("#ImagePickerLoc_DismissWarning") : void 0,
          },
          Boolean(!_)
            ? n.createElement(Q.t, {
                size: "medium",
                position: "center",
                string: (0, S.we)("#Loading"),
              })
            : n.createElement(
                n.Fragment,
                null,
                n.createElement(Xe, {
                  clanSteamID: t,
                  rgSupportArtwork: [s],
                  fnSetImageURL: k,
                  bAllowPreviousClanImageSelection: !1,
                  rgRealmList: r,
                  uploaderOverride: I,
                }),
                n.createElement(St, {
                  clanSteamID: t,
                  eventModel: l,
                  artworkType: s,
                  title: null,
                  appid: a,
                  realms: r,
                  fnSetImageURL: k,
                  fnGetImageHashAndExt: C,
                  fnLangHasData: c,
                  partnerEventStore: p,
                }),
              ),
          e.children,
        );
      }
      function Ot(e) {
        const { setting: t, fnUpdateSetting: a, label: l } = e,
          r = n.useMemo(() => {
            const e = [];
            return (
              e.push({
                label: (0, S.we)("#EventEditor_Tile_NoRepeat"),
                data: "no-repeat",
              }),
              e.push({
                label: (0, S.we)("#EventEditor_Tile_RepeatX"),
                data: "repeat-x",
              }),
              e.push({
                label: (0, S.we)("#EventEditor_Tile_RepeatY"),
                data: "repeat-y",
              }),
              e.push({
                label: (0, S.we)("#EventEditor_Tile_Repeat"),
                data: "repeat",
              }),
              e
            );
          }, []);
        return n.createElement(
          n.Fragment,
          null,
          n.createElement(
            K.JU,
            null,
            l || (0, S.we)("#EventEditor_Tile_Title"),
          ),
          n.createElement(K.m, {
            strDropDownClassName: ae.DropDownScroll,
            rgOptions: r,
            selectedOption: t || "no-repeat",
            onChange: (e) => a(e.data),
            bDisableMouseOverlay: !0,
            contextMenuPositionOptions: { bDisableMouseOverlay: !0 },
          }),
        );
      }
      function Rt(e) {
        const {
            closeModal: t,
            imgGroup: a,
            fnUpdateImageGroup: l,
            eventModel: r,
          } = e,
          [o, i] = (0, n.useState)(() => a),
          [s, m, d, u, p, _, E] = (0, g.q3)(() => [
            o.repeat_setting,
            o.scaling_setting,
            o.background_color1,
            o.background_color2,
            o.gradient_setting,
            o.position_setting,
            r.GetIncludedRealmList(),
          ]),
          [I] = (0, n.useState)(() => (0, me._t)(o.localized_background_art));
        return n.createElement(
          Mt,
          {
            strLocalizedTitle: (0, S.we)("#BackgroundGroups_Configure"),
            strLocalizedDescription: (0, S.we)("#BackgroundGroups_DialogDesc"),
            appid: r.appid,
            eventModel: r,
            clanSteamID: r.clanSteamID,
            closeModal: t,
            partnerEventStore: c.O3,
            artworkType: "localized_background_art",
            realms: E,
            loc_images: I,
            fnLangHasData: (e) => Boolean(I[e]),
            fnGetImageHash: (e, t) => I[t],
            fnSetImageURL: async (e, t, a) => {
              i((e) => {
                const n = { ...e.localized_background_art };
                let l = t ? v.i6.GetExtensionString(t) : null,
                  r = t ? t.image_hash + l : null;
                return (
                  (n[(0, h.Lg)(a)] = r), { ...e, localized_background_art: n }
                );
              });
            },
            onOK: () => {
              i((e) => (l(e), setTimeout(t, 1), { ...e }));
            },
          },
          n.createElement(
            "div",
            { className: Ee().ConfDialogOptions },
            n.createElement(
              "div",
              { className: Ee().ImageOptions },
              n.createElement(Ot, {
                setting: s,
                fnUpdateSetting: (e) => {
                  i(
                    "no-repeat" !== e
                      ? { ...o, repeat_setting: e, scaling_setting: "auto" }
                      : { ...o, repeat_setting: e },
                  );
                },
                label: (0, S.we)("#BackgroundGroups_Repeating"),
              }),
              n.createElement(xt, {
                scaling_setting: m,
                disable: "no-repeat" !== s,
                fnUpdateSetting: (e) => i({ ...o, scaling_setting: e }),
              }),
              Boolean("cover" != m) &&
                n.createElement(Ht, {
                  position_settings: _,
                  fnUpdateSetting: (e) => i({ ...o, position_setting: e }),
                }),
            ),
            n.createElement(
              "div",
              { className: Ee().ColorOptions },
              n.createElement(K.JU, null, (0, S.we)("#BackgroundGroups_Color")),
              n.createElement(
                "div",
                { className: he().ColorCtn },
                n.createElement(
                  K.$n,
                  {
                    style: { backgroundColor: d },
                    onClick: (e) => {
                      (0, ee.pg)(
                        n.createElement(Pt, {
                          color: d,
                          setColor: (e) => i({ ...o, background_color1: e }),
                        }),
                        (0, ce.uX)(e),
                      );
                    },
                  },
                  (0, S.we)(
                    void 0 === d
                      ? "#BackgroundGroups_ColorNum_unset"
                      : "#BackgroundGroups_ColorNum",
                    1,
                  ),
                ),
                " ",
                n.createElement(
                  K.$n,
                  { onClick: () => i({ ...o, background_color1: void 0 }) },
                  (0, S.we)("#BackgroundGroups_Color_Clear"),
                ),
              ),
              n.createElement(
                K.$n,
                {
                  onClick: () =>
                    i({ ...o, background_color1: u, background_color2: d }),
                },
                (0, S.we)("#BackgroundGroups_Color_Swap"),
              ),
              Boolean("single-color" !== p) &&
                n.createElement(
                  "div",
                  { className: he().ColorCtn },
                  n.createElement(
                    K.$n,
                    {
                      style: { backgroundColor: u },
                      onClick: (e) => {
                        (0, ee.pg)(
                          n.createElement(Pt, {
                            color: u,
                            setColor: (e) => i({ ...o, background_color2: e }),
                          }),
                          (0, ce.uX)(e),
                        );
                      },
                    },
                    (0, S.we)(
                      void 0 === u
                        ? "#BackgroundGroups_ColorNum_unset"
                        : "#BackgroundGroups_ColorNum",
                      2,
                    ),
                  ),
                  " ",
                  n.createElement(
                    K.$n,
                    { onClick: () => i({ ...o, background_color2: void 0 }) },
                    (0, S.we)("#BackgroundGroups_Color_Clear"),
                  ),
                ),
              n.createElement(Ft, {
                gradient: p,
                fnUpdateSetting: (e) => i({ ...o, gradient_setting: e }),
              }),
            ),
          ),
        );
      }
      function Pt(e) {
        const { closeModal: t, color: a, setColor: l } = e,
          [r, o] = (0, n.useState)(a);
        return n.createElement(
          $.o0,
          {
            strTitle: (0, S.we)("#Button_Color"),
            closeModal: t,
            onOK: () => l(r),
          },
          n.createElement(pe, { onChange: (e) => o(e), color: r }),
        );
      }
      function xt(e) {
        const {
            scaling_setting: t,
            fnUpdateSetting: a,
            label: l,
            disable: r,
          } = e,
          o = n.useMemo(() => {
            const e = [];
            return (
              e.push({
                label: (0, S.we)("#BackgroundGroups_Scaling_cover"),
                data: "cover",
              }),
              e.push({
                label: (0, S.we)("#BackgroundGroups_Scaling_contain"),
                data: "contain",
              }),
              e.push({
                label: (0, S.we)("#BackgroundGroups_Scaling_fixed"),
                data: "auto",
              }),
              e
            );
          }, []);
        return n.createElement(
          n.Fragment,
          null,
          n.createElement(
            K.JU,
            null,
            l || (0, S.we)("#BackgroundGroups_Scaling"),
          ),
          n.createElement(K.m, {
            strDropDownClassName: ae.DropDownScroll,
            disabled: r,
            rgOptions: o,
            selectedOption: t || "cover",
            onChange: (e) => a(e.data),
            bDisableMouseOverlay: !0,
            contextMenuPositionOptions: { bDisableMouseOverlay: !0 },
          }),
        );
      }
      function Ft(e) {
        const { gradient: t, fnUpdateSetting: a, label: l } = e,
          r = n.useMemo(() => {
            const e = [];
            return (
              e.push({
                label: (0, S.we)("#BackgroundGroups_Gradient_Top"),
                data: "top-to-bottom",
              }),
              e.push({
                label: (0, S.we)("#BackgroundGroups_Gradient_Left"),
                data: "left-to-right",
              }),
              e.push({
                label: (0, S.we)("#BackgroundGroups_Gradient_TopLeft"),
                data: "top-left-to-bottom-right",
              }),
              e
            );
          }, []);
        return n.createElement(
          n.Fragment,
          null,
          n.createElement(
            K.JU,
            null,
            l || (0, S.we)("#EventEditor_ColorSetting_Title"),
          ),
          n.createElement(K.m, {
            strDropDownClassName: ae.DropDownScroll,
            rgOptions: r,
            selectedOption: t || "top-to-bottom",
            onChange: (e) => a(e.data),
            bDisableMouseOverlay: !0,
            contextMenuPositionOptions: { bDisableMouseOverlay: !0 },
          }),
        );
      }
      function Ht(e) {
        const { position_settings: t, fnUpdateSetting: a, label: l } = e,
          r = n.useMemo(() => {
            const e = [];
            return (
              e.push({
                label: (0, S.we)("#BackgroundGroups_Position_Unset"),
                data: "unset",
              }),
              e.push({
                label: (0, S.we)("#BackgroundGroups_Position_Centered"),
                data: "center",
              }),
              e.push({
                label: (0, S.we)("#BackgroundGroups_Position_TopLeft"),
                data: "top left",
              }),
              e.push({
                label: (0, S.we)("#BackgroundGroups_Position_BottomRight"),
                data: "bottom right",
              }),
              e
            );
          }, []);
        return n.createElement(
          n.Fragment,
          null,
          n.createElement(
            K.JU,
            null,
            l || (0, S.we)("#BackgroundGroups_Position"),
          ),
          n.createElement(K.m, {
            strDropDownClassName: ae.DropDownScroll,
            rgOptions: r,
            selectedOption: t || "unset",
            onChange: (e) => a(e.data),
            bDisableMouseOverlay: !0,
            contextMenuPositionOptions: { bDisableMouseOverlay: !0 },
          }),
        );
      }
      function zt(e) {
        const {
            backgroundImageEditModel: t,
            bBackgroundImgGroupEditMode: a,
            fnSetBackgroundImgGroupEditMode: l,
          } = e,
          [r, o] = (0, n.useState)(t.BIsBackgroundImageEnabled()),
          i = (0, g.q3)(() => t.GetSalePageLastCoverSectionUntilEnd());
        return n.createElement(
          "div",
          { className: Ee().Ctn },
          n.createElement(
            E.tH,
            null,
            n.createElement(K.Yh, {
              label: (0, S.we)("#BackgroundGroups_Setting"),
              checked: r,
              onChange: (e) => {
                o(e), t.SetBackgroundImageEnabled(e);
              },
            }),
            r
              ? n.createElement(
                  n.Fragment,
                  null,
                  n.createElement(K.Yh, {
                    label: (0, S.we)("#BackgroundGroups_EditMode"),
                    tooltip: (0, S.we)("#BackgroundGroups_EditMode_ttip"),
                    checked: a,
                    onChange: l,
                  }),
                  n.createElement(K.Yh, {
                    label: (0, S.we)("#BackgroundGroups_ExtendToEnd"),
                    tooltip: (0, S.we)("#BackgroundGroups_ExtendToEnd_ttip"),
                    checked: i,
                    onChange: (e) => t.SetSalePageLastCoverSectionUntilEnd(e),
                  }),
                  n.createElement("hr", null),
                  n.createElement(
                    K.$n,
                    {
                      onClick: (e) =>
                        (0, ee.pg)(
                          n.createElement($.o0, {
                            strTitle: (0, S.we)(
                              "#EventEditor_GenericAreYouSure",
                            ),
                            strDescription: (0, S.we)(
                              "#BackgroundGroups_ClearAllSettings_Desc",
                            ),
                            bDestructiveWarning: !0,
                            onOK: () => {
                              t.ClearAllBackgroundImageGroupSettings(), o(!1);
                            },
                          }),
                          (0, ce.uX)(e),
                        ),
                    },
                    (0, S.we)("#BackgroundGroups_ClearAllSettings"),
                  ),
                )
              : n.createElement("p", null, (0, S.we)("#BackgroundGroups_Desc")),
            n.createElement("br", null),
            n.createElement(
              "a",
              {
                href: `${C.TS.PARTNER_BASE_URL}doc/marketing/event_tools/sales/groups`,
                target: "_blank",
              },
              (0, S.we)("#EventGeneric_SeeDocs"),
            ),
          ),
        );
      }
      const jt = n.forwardRef(function (e, t) {
        const {
            imgGroupDerivedMapping: a,
            backgroundImageEditModel: l,
            groupIndex: r,
            imgGroup: o,
            eventModel: i,
            nTabIndex: s,
          } = e,
          c = s >= 0,
          m = (0, b.E)(),
          [d, u, p, _] = (0, g.q3)(() => [
            a.mapGroupToSections.get(o.background_id),
            a.mapGroupToSections.get(o.background_id)?.sectionUniqueIDs ?? [],
            c
              ? l.GetTabLastCoverSectionUntilEnd(s)
              : l.GetSalePageLastCoverSectionUntilEnd(),
            c ? l.GetTabGroupCount(s) : l.GetSalePageGroupCount(),
          ]),
          E = p && r + 1 === _;
        let I = null;
        d?.nUniqueIDNextSaleSection &&
          (I = (0, ge.h_)(
            2,
            l.GetSaleSectionByID(d?.nUniqueIDNextSaleSection),
            m,
            i,
            d.nSaleSectionLastIndex + 1,
          ));
        let h = null;
        if (u?.length > 1) {
          const e = u[u.length - 1];
          h = (0, ge.h_)(
            2,
            l.GetSaleSectionByID(e),
            m,
            i,
            d.nSaleSectionLastIndex,
          );
        }
        return n.createElement(
          ie,
          {
            bStartMinimized: !1,
            title: (0, S.we)(
              s >= 0
                ? "#BackgroundGroups_Sale_Tab_GroupNum"
                : "#BackgroundGroups_Sale_GroupNum",
              r + 1,
            ),
            className: e.classNameHeader,
          },
          n.createElement(
            "div",
            { ref: t },
            n.createElement(
              K.$n,
              {
                onClick: (e) =>
                  (0, ee.pg)(
                    n.createElement(Rt, {
                      imgGroup: o,
                      eventModel: i,
                      fnUpdateImageGroup: (e) =>
                        c
                          ? l.SetTabBackgroundGroup(s, r, e)
                          : l.SetSalePageBackgroundGroup(r, e),
                    }),
                    (0, ce.uX)(e),
                  ),
              },
              (0, S.we)("#BackgroundGroups_Configure"),
            ),
            n.createElement("br", null),
            n.createElement(
              "div",
              { className: Ee().EditorTitle },
              (0, S.we)("#BackgroundGroups_ContentTitle"),
            ),
            n.createElement(
              "ul",
              null,
              u.map((e) =>
                n.createElement(
                  "li",
                  { key: "li_" + e },
                  (0, ge.h_)(
                    2,
                    l.GetSaleSectionByID(e),
                    m,
                    i,
                    l.GetSaleSectionIndexByID(e),
                  ),
                ),
              ),
              Boolean(E) &&
                n.createElement(
                  "li",
                  null,
                  (0, S.we)("#BackgroundGroups_EndOfList"),
                ),
            ),
            Boolean(h) &&
              n.createElement(
                K.$n,
                {
                  onClick: () =>
                    c
                      ? l.SetTabBackgroundGroup(s, r, {
                          ...o,
                          num_sections: o.num_sections - 1,
                        })
                      : l.SetSalePageBackgroundGroup(r, {
                          ...o,
                          num_sections: o.num_sections - 1,
                        }),
                },
                (0, S.we)("#BackgroundGroups_Reduce", h),
              ),
            Boolean(I) &&
              n.createElement(
                K.$n,
                {
                  onClick: () =>
                    c
                      ? l.SetTabBackgroundGroup(s, r, {
                          ...o,
                          num_sections: o.num_sections + 1,
                        })
                      : l.SetSalePageBackgroundGroup(r, {
                          ...o,
                          num_sections: o.num_sections + 1,
                        }),
                },
                (0, S.we)("#BackgroundGroups_Extend", I),
              ),
            Boolean(r > 0) &&
              n.createElement(
                n.Fragment,
                null,
                n.createElement("hr", null),
                n.createElement(
                  K.$n,
                  {
                    onClick: (e) =>
                      (0, ee.pg)(
                        n.createElement($.o0, {
                          strTitle: (0, S.we)("#Dialog_AreYouSure"),
                          bDestructiveWarning: !0,
                          strDescription: (0, S.we)(
                            "#BackgroundGroups_RemoveThisGroup_Desc",
                          ),
                          onOK: () =>
                            c
                              ? l.RemoveTabBackgroundGroup(s, r)
                              : l.RemoveSalePageBackgroundGroup(r),
                        }),
                        (0, ce.uX)(e),
                      ),
                  },
                  (0, S.we)("#BackgroundGroups_RemoveThisGroup"),
                ),
              ),
          ),
        );
      });
      function Vt(e) {
        const { backgroundImageEditModel: t, nLastSectionID: a, nTabID: l } = e;
        return n.createElement(
          "div",
          { className: Ee().CtnEditor },
          n.createElement(
            K.$n,
            {
              onClick: (e) =>
                l >= 0
                  ? t.AddTabBackgroundGroup(l)
                  : t.AddSalePageBackgroundGroup(),
            },
            (0, S.we)(
              l >= 0
                ? "#BackgroundGroups_AddNewGroupTab"
                : "#BackgroundGroups_AddNewGroup",
            ),
          ),
        );
      }
      function Wt(e) {
        const {
            nTabID: t,
            nSectionUniqueID: a,
            salePageBackgroundDerivedConfig: l,
            backgroundImageEditModel: r,
          } = e,
          o = l.mapFirstSectionToGroup.get(a);
        return a == l.nFirstSaleSectionIDWithoutGroup ||
          a == l.nFirstTabSectionIDWithoutGroup
          ? n.createElement(Vt, {
              backgroundImageEditModel: r,
              nLastSectionID: a,
              nTabID: t,
            })
          : o
            ? n.createElement(qt, { ...e, groupID: o })
            : null;
      }
      function qt(e) {
        const {
            groupID: t,
            nTabID: a,
            salePageBackgroundDerivedConfig: l,
            backgroundImageEditModel: r,
          } = e,
          o =
            a >= 0
              ? l.selectedTabBackgroundDef.groups
              : r.GetSalePageGroupDefinition().groups,
          i = o.findIndex((e) => e.background_id === t),
          s = o[i],
          [c, m] = (0, n.useState)(!1);
        (0, n.useEffect)(() => {
          if (!c) return;
          const e = (0, ee.pg)(
            n.createElement(
              $.o0,
              { bAlertDialog: !0, closeModal: () => m(!1) },
              n.createElement(jt, {
                backgroundImageEditModel: r,
                groupIndex: i,
                imgGroup: s,
                imgGroupDerivedMapping: l,
                eventModel: r.GetEventModel(),
                nTabIndex: a,
              }),
            ),
            window,
          );
          return () => {
            e.then((e) => e.Close());
          };
        }, [c, r, s, i, a, l]);
        const d = (0, g.q3)(() => w.get(t)),
          [u, p] = (0, n.useState)(null),
          _ = n.useCallback((e, t) => {
            p(t);
          }, []),
          E = (0, k.w6)(_);
        return n.createElement(
          "div",
          { className: Ee().CtnEditor, ref: E },
          Boolean(d && u && u > d) &&
            n.createElement(
              K.$n,
              { onClick: (e) => m(!0) },
              (0, S.we)("#BackgroundGroups_EditBackgroundGroup"),
            ),
          n.createElement(jt, {
            backgroundImageEditModel: r,
            groupIndex: i,
            imgGroup: s,
            imgGroupDerivedMapping: l,
            eventModel: r.GetEventModel(),
            nTabIndex: a,
          }),
        );
      }
      var Yt = a(81557),
        Qt = a.n(Yt);
      function Zt(e) {
        const { imgGroupDerivedMapping: t } = e,
          [a, l] = (0, n.useState)(!1);
        (0, n.useEffect)(() => {
          if (!a) return;
          const t = (0, ee.pg)(
            n.createElement(
              $.o0,
              { bAlertDialog: !0, closeModal: () => l(!1) },
              n.createElement(Jt, { ...e }),
            ),
            window,
          );
          return () => {
            t.then((e) => e.Close());
          };
        }, [a, e]);
        const r = (0, g.q3)(() => {
            const e = t.selectedTabBackgroundDef?.groups?.[0].background_id,
              a = t.mapGroupToSections.get(e);
            return w.get(a?.nBackgroundGroupID);
          }),
          [o, i] = (0, n.useState)(null),
          s = n.useCallback((e, t) => {
            i(t);
          }, []),
          c = (0, k.w6)(s);
        return n.createElement(
          "div",
          { className: (0, U.A)(Ee().CtnEditor, Qt().TabCtn), ref: c },
          Boolean(r && o && o > r) &&
            n.createElement(
              K.$n,
              { onClick: (e) => l(!0) },
              (0, S.we)("#BackgroundGroups_EditBackgroundGroup"),
            ),
          n.createElement(Jt, { ...e }),
        );
      }
      function Jt(e) {
        const {
            backgroundImageEditModel: t,
            imgGroupDerivedMapping: a,
            nTabID: l,
          } = e,
          [r, o, i, s] = (0, g.q3)(() => [
            t.GetTabLastCoverSectionUntilEnd(l),
            t.BIsTabEnabled(l),
            a.selectedTabBackgroundDef,
            t.GetEventModel(),
          ]);
        return n.createElement(
          E.tH,
          null,
          n.createElement(K.Yh, {
            label: (0, S.we)("#BackgroundGroups_TaSetting"),
            checked: o,
            onChange: (e) => {
              t.SetTabEnabled(l, e);
            },
          }),
          Boolean(o) &&
            n.createElement(
              n.Fragment,
              null,
              n.createElement(K.Yh, {
                label: (0, S.we)("#BackgroundGroups_ExtendToEnd"),
                tooltip: (0, S.we)("#BackgroundGroups_ExtendToEnd_Tab_ttip"),
                checked: r,
                onChange: (e) => t.SetTabLastCoverSectionUntilEnd(l, e),
              }),
              n.createElement(jt, {
                backgroundImageEditModel: t,
                groupIndex: 0,
                imgGroup: i.groups[0],
                imgGroupDerivedMapping: a,
                eventModel: s,
                nTabIndex: l,
                classNameHeader: Qt().TabHeader,
              }),
            ),
        );
      }
      var Xt = a(84603),
        Kt = a(40353),
        $t = a(101),
        ea = a(59313),
        ta = a.n(ea),
        aa = a(51272);
      function na(e) {
        const { rgPresenters: t } = e;
        if (!t || 0 == t.length) return null;
        const a = (0, h.sf)(M.TS.LANGUAGE);
        return 1 == t.length
          ? n.createElement(
              "div",
              {
                className: (0, U.A)(
                  ta().PresenterDisclaimer,
                  "PresenterDisclaimer",
                ),
              },
              (0, S.PP)(
                "#SalePresented_By",
                n.createElement(la, { presentor: t[0], lang: a }),
              ),
            )
          : n.createElement(
              "div",
              {
                className: (0, U.A)(
                  ta().PresenterDisclaimer,
                  "PresenterDisclaimer",
                ),
              },
              (0, S.PP)(
                "#SalePresented_By_Multi",
                t
                  .slice(0, t.length - 1)
                  .map((e, l) =>
                    n.createElement(
                      n.Fragment,
                      { key: e.url },
                      n.createElement(la, { presentor: e, lang: a }),
                      Boolean(t.length > 2) && ", ",
                    ),
                  ),
                n.createElement(la, { presentor: t[t.length - 1], lang: a }),
              ),
            );
      }
      function la(e) {
        const { presentor: t, lang: a } = e;
        return n.createElement(
          aa.uU,
          {
            href: (0, X.k2)(t.url),
            bUseLinkFilter: !0,
            className: ta().PresenterLabel,
          },
          S.NT.GetWithFallback(t.localized_presenter_name, a),
        );
      }
      function ra(e) {
        const {
            promotionName: t,
            eventModel: a,
            bIsPreview: l,
            language: r,
            backgroundImageEditModel: o,
            addtionalAdminButtons: i,
          } = e,
          [s, c] = n.useState(a?.GetDayIndexFromEventStart()),
          [g, m] = n.useState(null),
          [d, _] = n.useState((0, u.rp)()),
          h = n.useCallback(() => _((0, u.rp)()), []);
        n.useEffect(
          () => (
            window.addEventListener("resize", h),
            () => window.removeEventListener("resize", h)
          ),
          [h],
        );
        const v = (function (e, t) {
            const [a] = (0, I.QD)(u.jD, void 0);
            return n.useMemo(() => {
              const n = e.GetSaleSectionFirstMatchByType("tabs");
              if (n?.tabs?.length > 0) {
                let e = a > 0 ? n.tabs.find((e) => e.unique_id == a) : void 0;
                e || (e = n.tabs[0]);
                const l = e === n.tabs[0];
                return new V.y(e, t, l);
              }
            }, [e, t, a]);
          })(a, s),
          [b, k] = (0, n.useState)(!1);
        n.useEffect(() => {
          if (
            a.jsondata.sale_custom_css &&
            !g &&
            l &&
            Boolean(
              a.jsondata.sale_vanity_id_valve_approved_for_sale_subpath,
            ) &&
            "community" == (0, M.yK)()
          ) {
            const e = document.getElementsByTagName("HEAD")[0],
              t = document.createElement("style");
            (t.innerText = (0, X.L$)(a.jsondata.sale_custom_css)),
              m(t),
              e.appendChild(t);
          }
          const e = document.getElementsByClassName("react_landing_background");
          return (
            (0, J.w)(
              e.length <= 1,
              "Must have at most one react_landing_background",
            ),
            e.length >= 1 && (e[0].style.backgroundImage = null),
            () => {
              g && (g.remove(), m(null));
            }
          );
        }, [a, g, l]);
        const C = a?.jsondata,
          w = n.useMemo(
            () => ({
              promotionName: t,
              clanid: Number(M.UF.CLANACCOUNTID),
              nAppIDVOD: Number(C?.broadcast_preroll_vod_appid),
              event: a,
              bIsPreview: l,
              language: r,
              accountIDs: l ? C?.broadcast_whitelist : void 0,
              chat_announcement_giveaway:
                C?.broadcast_chat_announcement_giveaway,
            }),
            [l, a, C, r, t],
          );
        if (a && void 0 !== s) {
          const e = a.jsondata.localized_sale_logo?.filter(Boolean).length > 0,
            g = a
              .GetSaleSections()
              .some((e) => "contenthubtitle" === e.section_type),
            m = a.BUsesContentHubForItemSource() && g,
            u = e
              ? 0
              : m && !Boolean(a.jsondata.sale_header_offset)
                ? 100
                : a.jsondata.sale_header_offset;
          let _ = !1;
          530 === a.jsondata.sale_header_offset && (_ = !0);
          const I = p.nY
              .Get()
              .BIsPartnerTakeoverActive(
                a.GetContentHubType(),
                a.GetContentHubCategory(),
                a.GetContentHubTag(),
              ),
            h = Boolean(
              d && !I && !Boolean(a.jsondata.content_hub_restricted_width),
            ),
            S = l
              ? !b && o?.BIsBackgroundImageEnabled()
                ? Kt.S.EPreviewMode_EditBackground
                : Kt.S.EPreviewMode_Enabled
              : Kt.S.EPreviewMode_Disabled;
          return n.createElement(
            E.tH,
            null,
            n.createElement(
              Xt.EU,
              { eventModel: a, language: r },
              n.createElement(
                Y.P,
                null,
                n.createElement(
                  y.Cs,
                  { location: l ? 2 : 0 },
                  n.createElement(
                    x,
                    { event: a, language: r, bIsPreview: l },
                    h && n.createElement(Xt.Sn, null),
                    Boolean(o) &&
                      n.createElement(zt, {
                        backgroundImageEditModel: o,
                        bBackgroundImgGroupEditMode: b,
                        fnSetBackgroundImgGroupEditMode: k,
                      }),
                    n.createElement(
                      "div",
                      {
                        className: (0, U.A)({
                          [T().SaleOuterContainer]: !0,
                          [T().SaleNewSizing]: _,
                          [T()[`CustomStyle_${a.jsondata.sale_vanity_id}`]]: !0,
                          SaleOuterContainer: !0,
                          [T().SalePageLogoSet]: e,
                          [T().ContentHub]: m,
                        }),
                        style: { marginTop: `${u || 0}px` },
                      },
                      n.createElement(j, { eventModel: a, language: r }),
                      n.createElement(na, {
                        rgPresenters: a.jsondata.sale_presenters,
                      }),
                      n.createElement(O, {
                        event: a,
                        broadcastEmbedContext: w,
                      }),
                      n.createElement(oa, {
                        ePreviewMode: S,
                        event: a,
                        backgroundImageEditModel: o,
                        language: r,
                        promotionName: t,
                        nSaleDayIndex: s,
                        broadcastEmbedContext: w,
                        selectedTab: v,
                      }),
                      n.createElement(R, {
                        event: a,
                        addtionalAdminButtons: i,
                        fnOnChangeDayIndex: (e) => {
                          e != s && ((a.m_overrideCurrentDay = e), c(e));
                        },
                      }),
                    ),
                  ),
                ),
              ),
            ),
          );
        }
        return n.createElement(
          "div",
          { className: q().FlexCenter, style: { height: "500px" } },
          n.createElement(Q.t, {
            size: "medium",
            string: (0, S.we)("#Loading"),
          }),
        );
      }
      const oa = (0, m.y)(function (e) {
        const {
            event: t,
            language: a,
            nSaleDayIndex: l,
            ePreviewMode: r,
            selectedTab: o,
            backgroundImageEditModel: i,
          } = e,
          [s, c] = n.useState((0, u.rp)()),
          _ = n.useMemo(() => new Z(), []),
          E = n.useCallback(() => c((0, u.rp)()), []);
        n.useEffect(
          () => (
            window.addEventListener("resize", E),
            () => window.removeEventListener("resize", E)
          ),
          [E],
        );
        const h = (0, m.W6)(),
          v = (e, t) => {
            (0, I.ip)(h, { ...(t || {}), [u.jD]: e.toString() });
          },
          [b, S] = (0, I.QD)("controller"),
          [k, C] = (0, g.q3)(() => {
            const e = t.GetSaleSectionIncludingFooterSections();
            return [
              f(
                t.jsondata.sale_background_img_groups,
                e,
                o?.GetActiveTabUniqueID(),
              ),
              e,
            ];
          });
        let w = !1;
        const A = [{ elements: [], activeTab: new V.y(null, l) }];
        let y = null;
        C.forEach((l, c) => {
          const g = A[A.length - 1].activeTab;
          if (g && !g.ShouldShowSection(l)) return;
          const m = p.nY
              .Get()
              .BIsPartnerTakeoverActive(
                t.GetContentHubType(),
                t.GetContentHubCategory(),
                t.GetContentHubTag(),
              ),
            d = s && !m && !Boolean(t.jsondata.content_hub_restricted_width);
          let u = (0, Kt.I)(l, r, t, a);
          if (void 0 === u) return;
          if (u);
          else if ((0, F.su)(l) && !M.iA.logged_in)
            w ||
              ((u = n.createElement(F.CC, {
                section: l,
                event: t,
                language: a,
              })),
              (w = !0));
          else {
            const t = l.diable_tab_id_filtering
              ? new V.y(null, g.GetSaleDay())
              : g;
            "tabs" == l.section_type &&
              l.tabs?.some((e) => e.unique_id == o?.GetActiveTabUniqueID()) &&
              A.push({ activeTab: o, elements: [] }),
              (u = n.createElement($t.H, {
                ...e,
                section: l,
                activeTab: t,
                appVisibilityTracker: _,
                selectedTab: o,
                setTabUniqueIDQueryParam: v,
                expanded: d,
                controllerCategory: b,
                setControllerCategory: S,
              }));
          }
          let E = n.createElement(
            ca,
            {
              key: "SaleSectionIndex_" + l.unique_id + "_" + c,
              section: l,
              nActiveTabID: A[A.length - 1].activeTab.GetActiveTabUniqueID(),
              saleSectionIndex: c,
              ePreviewMode: r,
              salePageBackgroundDerivedConfig: k,
              backgroundImageEditModel: i,
              bExpanded: d,
            },
            u,
          );
          const I = k.mapSectionToGroup.get(l.unique_id);
          y &&
            y.groupID != I &&
            (A[A.length - 1].elements.push(D(t, y, o?.GetActiveTabUniqueID())),
            (y = null)),
            I
              ? (y ||
                  (y = {
                    groupID: I,
                    elSaleSections: [],
                    derivedGroupInfo: k.mapGroupToSections.get(I),
                  }),
                y.elSaleSections.push(E))
              : A[A.length - 1].elements.push(E);
        }),
          y &&
            (A[A.length - 1].elements.push(D(t, y, o?.GetActiveTabUniqueID())),
            (y = null));
        const G = A.map((e, t) =>
          n.createElement(
            "div",
            {
              key: "TabSection_" + t,
              className: (0, U.A)(
                T().SaleSectionTabListContainer,
                "SaleSectionTabListContainer",
              ),
            },
            e.elements,
          ),
        );
        return n.createElement(
          d.Z,
          { className: T().SaleSectionListContainer },
          G,
        );
      });
      function ia(e) {
        const {
          visibility_by_door_index_state: t,
          door_index_visibility: a,
          children: l,
        } = e;
        return t
          ? n.createElement(
              sa,
              { visibility_by_door_index_state: t, door_index_visibility: a },
              l,
            )
          : n.createElement(n.Fragment, null, l);
      }
      function sa(e) {
        const {
            visibility_by_door_index_state: t,
            door_index_visibility: a,
            children: l,
          } = e,
          r = (0, _.OM)(a);
        return ("hide_when_open_door_index" == t && r) ||
          ("show_when_open_door_index" == t && !r)
          ? null
          : n.createElement(n.Fragment, null, l);
      }
      function ca(e) {
        const {
            section: t,
            saleSectionIndex: a,
            nActiveTabID: l,
            ePreviewMode: r,
            salePageBackgroundDerivedConfig: o,
            backgroundImageEditModel: i,
            bExpanded: s,
            children: c,
          } = e,
          g = u.mj + (t.unique_id || a),
          m = "tabs" != t.section_type;
        return n.createElement(
          E.tH,
          null,
          n.createElement(
            ia,
            {
              visibility_by_door_index_state: t.visibility_by_door_index_state,
              door_index_visibility: t.door_index_visibility,
            },
            m
              ? n.createElement(
                  d.Z,
                  {
                    navKey: g,
                    id: g,
                    className: (0, U.A)({
                      [T().SaleSectionCtn]: !0,
                      SaleSectionCtn: !0,
                      [t.section_type]: !0,
                      [t.internal_section_data?.internal_type || ""]: !0,
                      expanded: s,
                      [t.single_item_style || ""]: !0,
                      [T().SaleSectionBackgroundImageGroupEdit]:
                        r == Kt.S.EPreviewMode_EditBackground,
                    }),
                  },
                  c,
                  Boolean(r === Kt.S.EPreviewMode_EditBackground) &&
                    n.createElement(Wt, {
                      nSectionUniqueID: t.unique_id || a,
                      nTabID: l,
                      salePageBackgroundDerivedConfig: o,
                      backgroundImageEditModel: i,
                    }),
                )
              : n.createElement(
                  n.Fragment,
                  null,
                  Boolean(r === Kt.S.EPreviewMode_EditBackground)
                    ? n.createElement(
                        "div",
                        {
                          id: g,
                          className: (0, U.A)(
                            T().SaleSectionCtn,
                            T().SaleSectionBackgroundImageGroupEdit,
                          ),
                        },
                        c,
                        n.createElement(Zt, {
                          backgroundImageEditModel: i,
                          nTabID: l,
                          imgGroupDerivedMapping: o,
                        }),
                      )
                    : c,
                ),
          ),
        );
      }
      var ga = a(81881);
      function ma(e) {
        return n.createElement(
          ga.d,
          { bSalePage: !0 },
          n.createElement(da, { ...e }),
        );
      }
      function da(e) {
        const { promotionName: t, language: a } = e,
          [g, m] = n.useState(
            c.O3.GetClanEventFromAnnouncementGID(M.P9.ANNOUNCEMENT_GID),
          ),
          d = (0, s.A)();
        if (
          (n.useEffect(() => {
            if (g?.AnnouncementGID != M.P9.ANNOUNCEMENT_GID) {
              const e = new i.b(M.UF.CLANSTEAMID);
              c.O3.LoadPartnerEventFromAnnoucementGIDAndClanSteamID(
                e,
                M.P9.ANNOUNCEMENT_GID,
                null,
              ).then(m);
            }
          }, [g]),
          !g)
        )
          return n.createElement(
            "div",
            { className: q().FlexCenter, style: { height: "500px" } },
            n.createElement(Q.t, {
              size: "medium",
              string: (0, S.we)("#Loading"),
            }),
          );
        const u = g.visibility_state !== o.zv.k_EEventStateVisible;
        return n.createElement(
          l.u,
          { navID: "StoreSalePageRoot", NavigationManager: d },
          n.createElement(
            r.N,
            { timeoutMS: 1e3 },
            n.createElement(ra, {
              promotionName: t,
              language: a,
              eventModel: g,
              bIsPreview: u,
            }),
          ),
        );
      }
    },
    44894: (e, t, a) => {
      "use strict";
      a.d(t, { A: () => n });
      const n =
        "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAcJJREFUeNqkUz1PAkEQfStggjESejU0GozlGqn8SGywkYIYY0IsaLCwIBTQUN5fMLGm8S8QSWwslVAYjAlUBEJDhCgWwp3nzN6eHqIVl8zN7rx5b+dm9oRt25jlmcOMj59f10JAkPcBcXIGWdECyqYn6TfGdZ9S9d4K4gQYx4WCtJzE+G/sKJudwpQABUGnGSf5vKzX60jmctL8SYzz+iCdls1mEzuplMIsLSC4iSUh1ClUlpHIZGStVkM0GsVNqVRlIJZIyG63i1AohMdKpUrZRQqXz4j7LWA7VSiR/WRSNhsNRRgOh+i02wgGg3hrtRSZelLmI6cExs7nKJGVtTX50uupMn0+H157PUWmZpYDXLoWUFPo6MC87jivx4MBFtxOWZYS11VipNdT98DWDVsPh2XQNLFIMdc4xpg9OZ3JMdIpRowSXVKt36+yuXvGxn+N0XS+3zj0kG+JSPEi261H5FCLmN9lUyNWyZ+Qag54eA6Hbfa8j1A88g+2qrlqCkKIZdovbAG7m8D5E3B5D9xR7IPsk/u7DextABd14OrBwd6J23YFligQ0IPwXE7lbedXUAPya5yHMiLuq5j1d/4SYAAj3NATBGE4PgAAAABJRU5ErkJggg==";
    },
  },
]);
