<commit_before>import Vue from 'vue';
import App from '@vue/App';
import API from '@js/Helper/api';
import router from '@js/Helper/router';
import SectionAll from '@vue/Section/All';
import Messages from "@js/Classes/Messages";
import SearchManager from '@/js/Manager/SearchManager';
import SettingsManager from '@/js/Manager/SettingsManager';
import EncryptionTestHelper from '@/js/Helper/EncryptionTestHelper';

/**
 * Set global webpack path
 *
 * @type {string}
 */
__webpack_public_path__ = oc_appswebroots.passwords + '/';

(function() {
    let isLoaded     = false,
        loadInterval = null,
        app = null;

    async function load() {
        if(isLoaded || !document.querySelector('meta[name=pwat]')) return;
        clearInterval(loadInterval);
        isLoaded = true;

        await initApi();
        SettingsManager.init();
        initApp();
        if(process.env.NIGHTLY_FEATURES) SearchManager.init();
        if(process.env.NIGHTLY_FEATURES) EncryptionTestHelper.initTests();
    }

    function initApp() {
        let section = SettingsManager.get('client.ui.section.default');

        router.addRoutes(
            [
                {name: 'All', path: section === 'all' ? '/':'/all', param: [], components: {main: SectionAll}},
                {path: '*', redirect: {name: section.capitalize()}}
            ]
        );

        app = new Vue(App);
    }

    async function initApi() {
        let user     = document.querySelector('head[data-user]').getAttribute('data-user'),
            password = document.querySelector('meta[name=pwat]').getAttribute('content');
        if(!password) password = await Messages.prompt('Password', 'Login', '', true);

        let baseUrl = location.href;
        if(baseUrl.indexOf('index.php') !== -1) {
            baseUrl = baseUrl.substr(0, baseUrl.indexOf('index.php'));
        } else {
            baseUrl = baseUrl.substr(0, baseUrl.indexOf('apps/'));
        }
        API.login(baseUrl, user, password);
    }

    if(location.protocol !== 'https:') {
        location.href = location.origin + location.pathname + '?https=false';
    } else if(isCompatibleBrowser()) {
        window.addEventListener('load', () => { load(); }, false);
        loadInterval = setInterval(() => { load(); }, 10);
    }
})();<commit_msg>Enforce quotes style<commit_after>import Vue from 'vue';
import App from '@vue/App';
import API from '@js/Helper/api';
import router from '@js/Helper/router';
import SectionAll from '@vue/Section/All';
import Messages from '@js/Classes/Messages';
import SearchManager from '@/js/Manager/SearchManager';
import SettingsManager from '@/js/Manager/SettingsManager';
import EncryptionTestHelper from '@/js/Helper/EncryptionTestHelper';

/**
 * Set global webpack path
 *
 * @type {string}
 */
__webpack_public_path__ = oc_appswebroots.passwords + '/';

(function() {
    let isLoaded     = false,
        loadInterval = null,
        app = null;

    async function load() {
        if(isLoaded || !document.querySelector('meta[name=pwat]')) return;
        clearInterval(loadInterval);
        isLoaded = true;

        await initApi();
        SettingsManager.init();
        initApp();
        if(process.env.NIGHTLY_FEATURES) SearchManager.init();
        if(process.env.NIGHTLY_FEATURES) EncryptionTestHelper.initTests();
    }

    function initApp() {
        let section = SettingsManager.get('client.ui.section.default');

        router.addRoutes(
            [
                {name: 'All', path: section === 'all' ? '/':'/all', param: [], components: {main: SectionAll}},
                {path: '*', redirect: {name: section.capitalize()}}
            ]
        );

        app = new Vue(App);
    }

    async function initApi() {
        let user     = document.querySelector('head[data-user]').getAttribute('data-user'),
            password = document.querySelector('meta[name=pwat]').getAttribute('content');
        if(!password) password = await Messages.prompt('Password', 'Login', '', true);

        let baseUrl = location.href;
        if(baseUrl.indexOf('index.php') !== -1) {
            baseUrl = baseUrl.substr(0, baseUrl.indexOf('index.php'));
        } else {
            baseUrl = baseUrl.substr(0, baseUrl.indexOf('apps/'));
        }
        API.login(baseUrl, user, password);
    }

    if(location.protocol !== 'https:') {
        location.href = location.origin + location.pathname + '?https=false';
    } else if(isCompatibleBrowser()) {
        window.addEventListener('load', () => { load(); }, false);
        loadInterval = setInterval(() => { load(); }, 10);
    }
})();
{'fraction_non_alphanumeric': 0.15881970058581038, 'fraction_numerical': 0.002169668040789759, 'mean_word_length': 2.832086450540316, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '6560254', 'n_tokens_mistral': 1332, 'n_tokens_neox': 1313, 'n_words': 274}