<commit_before>async = require './helpers/webpack-async-loader'

getCourseListing = ->
  {CourseListing} = require './components/course-listing'
  CourseListing

getDashboard = ->
  ConditionalHandlers = require './helpers/conditional-handlers'
  ConditionalHandlers.dashboard

getStudentDashboardShell = ->
  {StudentDashboardShell} = require './components/student-dashboard'
  StudentDashboardShell

getTeacherTaskPlans = ->
  require './components/task-plan/teacher-task-plans-listing'

getTaskShell = ->
  {TaskShell} = require './components/task'
  TaskShell

getReferenceBookShell = ->
  {ReferenceBookShell} = require './components/reference-book'
  ReferenceBookShell

getReferenceBookPageShell = ->
  {ReferenceBookPageShell} = require './components/reference-book'
  ReferenceBookPageShell

getReadingShell = ->
  {ReadingShell} = require './components/task-plan'
  ReadingShell

getHomeworkShell = ->
  {HomeworkShell} = require './components/task-plan'
  HomeworkShell

getExternalShell = ->
  {ExternalShell} = require './components/task-plan'
  ExternalShell

getEventShell = ->
  {EventShell} = require './components/task-plan'
  EventShell

getScoresShell = ->
  {ScoresShell} = require './components/scores'
  ScoresShell

getPerformanceForecastGuide = ->
  PerformanceForecast = require './components/performance-forecast'
  PerformanceForecast.Guide

getCourseSettings = ->
  require './components/course-settings'

getPractice = ->
  require './components/task/practice'

getQuestionsLibrary = ->
  require './components/questions'

getChangeStudentId = ->
  require './components/change-student-id'

getQADashboard = ->
  QALoader = require 'promise?global!./qa'
  async(QALoader, 'QADashboard')

getQABook = ->
  QALoader = require 'promise?global!./qa'
  async(QALoader, 'QABook')

getCreateCourse = ->
  require './components/new-course'

getTeacherReview = ->
  {TaskTeacherReviewShell} = require './components/task-teacher-review'
  TaskTeacherReviewShell

getCCHelp = ->
  require './components/cc-dashboard/help'

ROUTES = [
  { pattern: '/dashboard',              name: 'listing',                  renderer: getCourseListing }
  { pattern: '/course/new',             name: 'createNewCourse',          renderer: getCreateCourse  }
  {
    pattern: '/course/:courseId',       name: 'dashboard',                renderer: getDashboard
    routes: [
      { pattern: 'scores',              name: 'viewScores',               renderer: getScoresShell }
      { pattern: 'cc/help',             name: 'ccDashboardHelp',          renderer: getCCHelp      }
      { pattern: 'guide/:roleId?',      name: 'viewPerformanceGuide',     renderer: getPerformanceForecastGuide }
      {
        pattern: 't',                   name: 'viewTeacherDashboard',     renderer: getTeacherTaskPlans
        routes: [
          {
            pattern: 'month/:date',     name: 'calendarByDate',           renderer: getTeacherTaskPlans
            routes: [{
              pattern: 'plan/:planId',  name: 'calendarViewPlanStats',    renderer: getTeacherTaskPlans
            }]
          }
        ]
      }
      { pattern: 'metrics/:id',         name: 'reviewTask',               renderer: getTeacherReview }
      {
        pattern: 'task/:id',            name: 'viewTask',                 renderer: getTaskShell
        routes: [
          {
            pattern: 'step/:stepIndex', name: 'viewTaskStep',             renderer: getTaskShell
            routes: [{
              pattern: ':milestones',   name: 'viewTaskStepMilestones',   renderer: getTaskShell
            }]
          }
        ]
      }

      { pattern: 'practice/:taskId?',   name: 'practiceTopics',           renderer: getPractice            }
      { pattern: 'homework/new',        name: 'createHomework'                                        }
      { pattern: 'homework/:id',        name: 'editHomework',             renderer: getHomeworkShell       }
      { pattern: 'reading/new',         name: 'createReading'                                         }
      { pattern: 'reading/:id',         name: 'editReading',              renderer: getReadingShell        }
      { pattern: 'external/new',        name: 'createExternal'                                        }
      { pattern: 'external/:id',        name: 'editExternal',             renderer: getExternalShell       }
      { pattern: 'event/new',           name: 'createEvent'                                           }
      { pattern: 'event/:id',           name: 'editEvent',                renderer: getEventShell          }
      { pattern: 'settings',            name: 'courseSettings',           renderer: getCourseSettings      }
      { pattern: 'questions',           name: 'viewQuestionsLibrary',     renderer: getQuestionsLibrary    }
      { pattern: 'change-student-id',   name: 'changeStudentId',          renderer: getChangeStudentId     }
    ]

  }
  {
    pattern: '/books/:courseId',        name: 'viewReferenceBook',        renderer: getReferenceBookShell
    routes: [
      { pattern: 'section/:section',    name: 'viewReferenceBookSection', renderer: getReferenceBookShell  }
      { pattern: 'page/:cnxId',         name: 'viewReferenceBookPage',    renderer: getReferenceBookPageShell  }
    ]
  }
  {
    pattern: '/qa',                     name: 'QADashboard',              renderer: getQADashboard
    routes: [
      {
        pattern: ':ecosystemId',        name: 'QAViewBook',               renderer: getQABook
        routes: [{
          pattern: 'section/:section',  name: 'QAViewBookSection',        renderer: getQABook
        }]
      }
    ]
  }
]

module.exports = ROUTES

## Below is pre router upgrade config

# {Route, Redirect, NotFoundRoute} = Router

# async = require './helpers/webpack-async-loader'

# {App, Root, Dashboard, SingleTask, SinglePractice, Invalid} = require './components'
# {CourseListing} = require './components/course-listing'
# {AssignmentLinks} = require './components/assignment-links'
# QuestionsLibrary = require './components/questions'
# ChangeStudentId = require './components/change-student-id'
# PerformanceForecastShell = require './components/performance-forecast'
# {ScoresShell} = require './components/scores'<commit_msg>load QA view like other components<commit_after>async = require './helpers/webpack-async-loader'

getCourseListing = ->
  {CourseListing} = require './components/course-listing'
  CourseListing

getDashboard = ->
  ConditionalHandlers = require './helpers/conditional-handlers'
  ConditionalHandlers.dashboard

getStudentDashboardShell = ->
  {StudentDashboardShell} = require './components/student-dashboard'
  StudentDashboardShell

getTeacherTaskPlans = ->
  require './components/task-plan/teacher-task-plans-listing'

getTaskShell = ->
  {TaskShell} = require './components/task'
  TaskShell

getReferenceBookShell = ->
  {ReferenceBookShell} = require './components/reference-book'
  ReferenceBookShell

getReferenceBookPageShell = ->
  {ReferenceBookPageShell} = require './components/reference-book'
  ReferenceBookPageShell

getReadingShell = ->
  {ReadingShell} = require './components/task-plan'
  ReadingShell

getHomeworkShell = ->
  {HomeworkShell} = require './components/task-plan'
  HomeworkShell

getExternalShell = ->
  {ExternalShell} = require './components/task-plan'
  ExternalShell

getEventShell = ->
  {EventShell} = require './components/task-plan'
  EventShell

getScoresShell = ->
  {ScoresShell} = require './components/scores'
  ScoresShell

getPerformanceForecastGuide = ->
  PerformanceForecast = require './components/performance-forecast'
  PerformanceForecast.Guide

getCourseSettings = ->
  require './components/course-settings'

getPractice = ->
  require './components/task/practice'

getQuestionsLibrary = ->
  require './components/questions'

getChangeStudentId = ->
  require './components/change-student-id'

getQADashboard = ->
  require './components/qa/index'

getQABook = ->
  require './components/qa/view-book'

getCreateCourse = ->
  require './components/new-course'

getTeacherReview = ->
  {TaskTeacherReviewShell} = require './components/task-teacher-review'
  TaskTeacherReviewShell

getCCHelp = ->
  require './components/cc-dashboard/help'

ROUTES = [
  { pattern: '/dashboard',              name: 'listing',                  renderer: getCourseListing }
  { pattern: '/course/new',             name: 'createNewCourse',          renderer: getCreateCourse  }
  {
    pattern: '/qa',                     name: 'QADashboard',              renderer: getQADashboard
    routes: [
      {
        pattern: ':ecosystemId',        name: 'QAViewBook',               renderer: getQABook
        routes: [{
          pattern: 'section/:section',  name: 'QAViewBookSection',        renderer: getQABook
        }]
      }
    ]
  }
  {
    pattern: '/course/:courseId',       name: 'dashboard',                renderer: getDashboard
    routes: [
      { pattern: 'scores',              name: 'viewScores',               renderer: getScoresShell }
      { pattern: 'cc/help',             name: 'ccDashboardHelp',          renderer: getCCHelp      }
      { pattern: 'guide/:roleId?',      name: 'viewPerformanceGuide',     renderer: getPerformanceForecastGuide }
      {
        pattern: 't',                   name: 'viewTeacherDashboard',     renderer: getTeacherTaskPlans
        routes: [
          {
            pattern: 'month/:date',     name: 'calendarByDate',           renderer: getTeacherTaskPlans
            routes: [{
              pattern: 'plan/:planId',  name: 'calendarViewPlanStats',    renderer: getTeacherTaskPlans
            }]
          }
        ]
      }
      { pattern: 'metrics/:id',         name: 'reviewTask',               renderer: getTeacherReview }
      {
        pattern: 'task/:id',            name: 'viewTask',                 renderer: getTaskShell
        routes: [
          {
            pattern: 'step/:stepIndex', name: 'viewTaskStep',             renderer: getTaskShell
            routes: [{
              pattern: ':milestones',   name: 'viewTaskStepMilestones',   renderer: getTaskShell
            }]
          }
        ]
      }

      { pattern: 'practice/:taskId?',   name: 'practiceTopics',           renderer: getPractice            }
      { pattern: 'homework/new',        name: 'createHomework'                                        }
      { pattern: 'homework/:id',        name: 'editHomework',             renderer: getHomeworkShell       }
      { pattern: 'reading/new',         name: 'createReading'                                         }
      { pattern: 'reading/:id',         name: 'editReading',              renderer: getReadingShell        }
      { pattern: 'external/new',        name: 'createExternal'                                        }
      { pattern: 'external/:id',        name: 'editExternal',             renderer: getExternalShell       }
      { pattern: 'event/new',           name: 'createEvent'                                           }
      { pattern: 'event/:id',           name: 'editEvent',                renderer: getEventShell          }
      { pattern: 'settings',            name: 'courseSettings',           renderer: getCourseSettings      }
      { pattern: 'questions',           name: 'viewQuestionsLibrary',     renderer: getQuestionsLibrary    }
      { pattern: 'change-student-id',   name: 'changeStudentId',          renderer: getChangeStudentId     }
    ]

  }
  {
    pattern: '/books/:courseId',        name: 'viewReferenceBook',        renderer: getReferenceBookShell
    routes: [
      { pattern: 'section/:section',    name: 'viewReferenceBookSection', renderer: getReferenceBookShell  }
      { pattern: 'page/:cnxId',         name: 'viewReferenceBookPage',    renderer: getReferenceBookPageShell  }
    ]
  }
]

module.exports = ROUTES

## Below is pre router upgrade config

# {Route, Redirect, NotFoundRoute} = Router

# async = require './helpers/webpack-async-loader'

# {App, Root, Dashboard, SingleTask, SinglePractice, Invalid} = require './components'
# {CourseListing} = require './components/course-listing'
# {AssignmentLinks} = require './components/assignment-links'
# QuestionsLibrary = require './components/questions'
# ChangeStudentId = require './components/change-student-id'
# PerformanceForecastShell = require './components/performance-forecast'
# {ScoresShell} = require './components/scores'
{'fraction_non_alphanumeric': 0.12073680823680824, 'fraction_numerical': 0.0, 'mean_word_length': 2.27442717935212, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5360883', 'n_tokens_mistral': 3495, 'n_tokens_neox': 3417, 'n_words': 656}