{"size": 1122, "ext": "js", "max_stars_repo_path": "wiseService/vueapp/src/router/index.js", "max_stars_repo_name": "j0mac/arkime", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "wiseService/vueapp/src/router/index.js", "max_issues_repo_name": "j0mac/arkime", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "wiseService/vueapp/src/router/index.js", "max_forks_repo_name": "j0mac/arkime", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.0169491525, "max_line_length": 93, "alphanum_fraction": 0.5623885918}
import Vue from 'vue';
import VueRouter from 'vue-router';
import Query from '@/components/Query';
import Config from '@/components/Config';
import Help from '@/components/Help';
import Stats from '@/components/Stats';
import Wise404 from '@/components/404';

Vue.use(VueRouter);

const routes = [
  {
    path: '/',
    alias: '/query',
    name: 'Query',
    component: Query
  },
  {
    path: '/statistics',
    name: 'Stats',
    component: Stats
  },
  {
    path: '/config',
    name: 'Config',
    component: Config
  },
  {
    path: '/help',
    name: 'Help',
    component: Help
  },
  {
    path: '*',
    name: 'Not Found',
    component: Wise404
  }
];

const router = new VueRouter({
  mode: 'history',
  base: window.location.pathname.substring(0, window.location.pathname.lastIndexOf('/') + 1),
  scrollBehavior (to, from, savedPosition) {
    if (to.hash) {
      return new Promise((resolve, reject) => {
        setTimeout(() => {
          resolve({
            selector: to.hash,
            offset: { x: 0, y: 60 }
          });
        });
      });
    }
  },
  routes
});

export default router;
