<commit_before><template>

  <div
    class="main-wrapper"
    :style="mainWrapperStyles"
    :class="fullScreen ? '' : 'scrolling-pane'"
    @scroll.passive="throttledHandleScroll"
  >

    <div v-if="blockDoubleClicks" class="click-mask"></div>

    <ScrollingHeader
      :height="appbarHeight"
      :scrollPosition="scrollPosition"
      :alwaysVisible="fixedAppBar"
    >
      <ImmersiveToolbar
        v-if="immersivePage && !fullScreen"
        :appBarTitle="toolbarTitle || appBarTitle"
        :icon="immersivePageIcon"
        :route="immersivePageRoute"
        :primary="immersivePagePrimary"
        :height="headerHeight"
        @nav-icon-click="$emit('navIconClick')"
      />
      <AppBar
        v-else-if="!immersivePage && !fullScreen"
        ref="appBar"
        class="app-bar"
        :title="toolbarTitle || appBarTitle"
        :height="headerHeight"
        :navShown="navShown"
        @toggleSideNav="navShown = !navShown"
        @showLanguageModal="languageModalShown = true"
      >
        <slot slot="totalPointsMenuItem" name="totalPointsMenuItem"></slot>
        <div slot="app-bar-actions" class="app-bar-actions">
          <slot name="app-bar-actions"></slot>
        </div>
        <slot
          v-if="showSubNav"
          slot="sub-nav"
          name="sub-nav"
        >
        </slot>
      </AppBar>
      <KLinearLoader
        v-if="loading && !fullScreen"
        class="loader"
        :style="{top: `${appbarHeight}px`}"
        type="indeterminate"
        :delay="false"
      />
    </ScrollingHeader>

    <SideNav
      :navShown="navShown"
      :headerHeight="headerHeight"
      :width="navWidth"
      @toggleSideNav="navShown=!navShown"
    />

    <div
      v-if="!loading"
      :class="fullScreen ? 'scrolling-pane' : 'content'"
      :style="contentStyles"
    >
      <div v-if="debug" class="debug">
        <div>{{ contentComponentName }}</div>
        <div>{{ routePath }}</div>
      </div>

      <KPageContainer v-if="notAuthorized">
        <AuthMessage
          :authorizedRole="authorizedRole"
          :header="authorizationErrorHeader"
          :details="authorizationErrorDetails"
        />
      </KPageContainer>
      <AppError v-else-if="error" />
      <slot v-else></slot>
    </div>

    <GlobalSnackbar />
    <UpdateNotification
      v-if="!loading && showNotification && !busy"
      :id="mostRecentNotification.id"
      :title="mostRecentNotification.title"
      :msg="mostRecentNotification.msg"
      :linkText="mostRecentNotification.linkText"
      :linkUrl="mostRecentNotification.linkUrl"
      @closeModal="dismissUpdateModal"
    />
    <LanguageSwitcherModal<commit_msg>Wrap core base generic app error in page container<commit_after><template>

  <div
    class="main-wrapper"
    :style="mainWrapperStyles"
    :class="fullScreen ? '' : 'scrolling-pane'"
    @scroll.passive="throttledHandleScroll"
  >

    <div v-if="blockDoubleClicks" class="click-mask"></div>

    <ScrollingHeader
      :height="appbarHeight"
      :scrollPosition="scrollPosition"
      :alwaysVisible="fixedAppBar"
    >
      <ImmersiveToolbar
        v-if="immersivePage && !fullScreen"
        :appBarTitle="toolbarTitle || appBarTitle"
        :icon="immersivePageIcon"
        :route="immersivePageRoute"
        :primary="immersivePagePrimary"
        :height="headerHeight"
        @nav-icon-click="$emit('navIconClick')"
      />
      <AppBar
        v-else-if="!immersivePage && !fullScreen"
        ref="appBar"
        class="app-bar"
        :title="toolbarTitle || appBarTitle"
        :height="headerHeight"
        :navShown="navShown"
        @toggleSideNav="navShown = !navShown"
        @showLanguageModal="languageModalShown = true"
      >
        <slot slot="totalPointsMenuItem" name="totalPointsMenuItem"></slot>
        <div slot="app-bar-actions" class="app-bar-actions">
          <slot name="app-bar-actions"></slot>
        </div>
        <slot
          v-if="showSubNav"
          slot="sub-nav"
          name="sub-nav"
        >
        </slot>
      </AppBar>
      <KLinearLoader
        v-if="loading && !fullScreen"
        class="loader"
        :style="{top: `${appbarHeight}px`}"
        type="indeterminate"
        :delay="false"
      />
    </ScrollingHeader>

    <SideNav
      :navShown="navShown"
      :headerHeight="headerHeight"
      :width="navWidth"
      @toggleSideNav="navShown=!navShown"
    />

    <div
      v-if="!loading"
      :class="fullScreen ? 'scrolling-pane' : 'content'"
      :style="contentStyles"
    >
      <div v-if="debug" class="debug">
        <div>{{ contentComponentName }}</div>
        <div>{{ routePath }}</div>
      </div>

      <KPageContainer v-if="notAuthorized">
        <AuthMessage
          :authorizedRole="authorizedRole"
          :header="authorizationErrorHeader"
          :details="authorizationErrorDetails"
        />
      </KPageContainer>
      <KPageContainer v-else-if="error">
        <AppError />
      </KPageContainer>

      <slot v-else></slot>
    </div>

    <GlobalSnackbar />
    <UpdateNotification
      v-if="!loading && showNotification && !busy"
      :id="mostRecentNotification.id"
      :title="mostRecentNotification.title"
      :msg="mostRecentNotification.msg"
      :linkText="mostRecentNotification.linkText"
      :linkUrl="mostRecentNotification.linkUrl"
      @closeModal="dismissUpdateModal"
    />
    <LanguageSwitcherModal
{'fraction_non_alphanumeric': 0.14589832996880162, 'fraction_numerical': 0.0, 'mean_word_length': 2.550488599348534, 'pattern_counts': {'":': 0, '<': 77, '<?xml version=': 0, '>': 75, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5823904', 'n_tokens_mistral': 1695, 'n_tokens_neox': 1669, 'n_words': 221}