<commit_before><!--

    Licensed to Apereo under one or more contributor license
    agreements. See the NOTICE file distributed with this work
    for additional information regarding copyright ownership.
    Apereo licenses this file to you under the Apache License,
    Version 2.0 (the "License"); you may not use this file
    except in compliance with the License.  You may obtain a
    copy of the License at the following location:

      http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.

-->
<div ng-switch="widget.widgetType" class="widget-type-container">
  <time-sensitive ng-switch-when="time-sensitive-content" app="widget" config="widget.widgetConfig"></time-sensitive>
  <option-link ng-switch-when="option-link" app="widget" config="widget.widgetConfig"></option-link>
  <rss-widget ng-switch-when="rss" app="widget" config="widget.widgetConfig"></rss-widget><action-items ng-switch-when="action-items" app="widget" config="widget.widgetConfig"></action-items>
  <list-of-links ng-switch-when="list-of-links" app="widget" config="widget.widgetConfig"></list-of-links>
  <search-with-links ng-switch-when="search-with-links" app="widget" config="widget.widgetConfig"></search-with-links>
  <weather-widget ng-switch-when="weather" app="widget" config="widget.widgetConfig"></weather-widget>
  
  <!-- switch widget calls the same file as a template or shows loading -->
  <loading-gif ng-if="switching" ng-switch-when="switch"></loading-gif>
  <switch-widget ng-if="!switching" ng-switch-when="switch" 
    app="widget" config="widget.widgetConfig"></switch-widget>
  

  <!-- `generic` is a deprecated alias for `custom` widget type -->
  <div ng-switch-when="custom || generic" class="custom-widget" ng-controller="CustomWidgetController as customWidgetCtrl">
    <div ng-if="loading" layout="row" layout-align="center center">
      <loading-gif data-object="content" data-empty="isEmpty"></loading-gif>
    </div>
    <content-item ng-if="!loading"></content-item>
  </div>

  <!-- default to an untyped, basic widget -->
  <basic-widget ng-switch-default app="widget" config="widget.widgetConfig"></basic-widget>
</div><commit_msg>fix: separate ng-switch for custom and generic types<commit_after><!--

    Licensed to Apereo under one or more contributor license
    agreements. See the NOTICE file distributed with this work
    for additional information regarding copyright ownership.
    Apereo licenses this file to you under the Apache License,
    Version 2.0 (the "License"); you may not use this file
    except in compliance with the License.  You may obtain a
    copy of the License at the following location:

      http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.

-->
<div ng-switch="widget.widgetType" class="widget-type-container">
  <time-sensitive ng-switch-when="time-sensitive-content" app="widget" config="widget.widgetConfig"></time-sensitive>
  <option-link ng-switch-when="option-link" app="widget" config="widget.widgetConfig"></option-link>
  <rss-widget ng-switch-when="rss" app="widget" config="widget.widgetConfig"></rss-widget><action-items ng-switch-when="action-items" app="widget" config="widget.widgetConfig"></action-items>
  <list-of-links ng-switch-when="list-of-links" app="widget" config="widget.widgetConfig"></list-of-links>
  <search-with-links ng-switch-when="search-with-links" app="widget" config="widget.widgetConfig"></search-with-links>
  <weather-widget ng-switch-when="weather" app="widget" config="widget.widgetConfig"></weather-widget>
  
  <!-- switch widget calls the same file as a template or shows loading -->
  <loading-gif ng-if="switching" ng-switch-when="switch"></loading-gif>
  <switch-widget ng-if="!switching" ng-switch-when="switch" 
    app="widget" config="widget.widgetConfig"></switch-widget>
  

  <!-- `generic` is a deprecated alias for `custom` widget type -->
  <div ng-switch-when="generic" class="custom-widget" ng-controller="CustomWidgetController as customWidgetCtrl">
    <div ng-if="loading" layout="row" layout-align="center center">
      <loading-gif data-object="content" data-empty="isEmpty"></loading-gif>
    </div>
    <content-item ng-if="!loading"></content-item>
  </div>
  <div ng-switch-when="custom" class="custom-widget" ng-controller="CustomWidgetController as customWidgetCtrl">
    <div ng-if="loading" layout="row" layout-align="center center">
      <loading-gif data-object="content" data-empty="isEmpty"></loading-gif>
    </div>
    <content-item ng-if="!loading"></content-item>
  </div>

  <!-- default to an untyped, basic widget -->
  <basic-widget ng-switch-default app="widget" config="widget.widgetConfig"></basic-widget>
</div>
{'fraction_non_alphanumeric': 0.14014296463506395, 'fraction_numerical': 0.0015048908954100827, 'mean_word_length': 4.458932238193018, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 79, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6642867', 'n_tokens_mistral': 1490, 'n_tokens_neox': 1467, 'n_words': 423}