<commit_before>// pull in desired CSS/SASS files
require( './styles/main.scss' );
require( 'font-awesome-webpack');
require( '../../node_modules/toastr/toastr.scss')
var $ = jQuery = require( '../../node_modules/jquery/dist/jquery.js' );
require( '../../node_modules/bootstrap-sass/assets/javascripts/bootstrap.js' );
var toastr = require( '../../node_modules/toastr/toastr.js')

// inject bundled Elm app into div#main
var Elm = require( '../elm/Main' );
var app = Elm.Main.embed( document.getElementById( 'main' ), {
    apiUrl: '/api/v1/'
} );

toastr.options.positionClass = "toast-bottom-right";

app.ports.toastError.subscribe(function(message) {
    toastr.error(message)
})

app.ports.toastInfo.subscribe(function(message) {
    toastr.info(message)
})

app.ports.toastWarning.subscribe(function(message) {
    toastr.warning(message)
})

app.ports.toastSuccess.subscribe(function(message) {
    toastr.success(message)
})

app.ports.showConfirmationDialog.subscribe(function(message) {
    $('#modal .modal-body').html(message);
    $('#modal').modal();
<commit_msg>* fix default API url for frontend causing invalid Safari requests<commit_after>// pull in desired CSS/SASS files
require( './styles/main.scss' );
require( 'font-awesome-webpack');
require( '../../node_modules/toastr/toastr.scss')
var $ = jQuery = require( '../../node_modules/jquery/dist/jquery.js' );
require( '../../node_modules/bootstrap-sass/assets/javascripts/bootstrap.js' );
var toastr = require( '../../node_modules/toastr/toastr.js')

// inject bundled Elm app into div#main
var Elm = require( '../elm/Main' );
var app = Elm.Main.embed( document.getElementById( 'main' ), {
    apiUrl: '/api/v1'
} );

toastr.options.positionClass = "toast-bottom-right";

app.ports.toastError.subscribe(function(message) {
    toastr.error(message)
})

app.ports.toastInfo.subscribe(function(message) {
    toastr.info(message)
})

app.ports.toastWarning.subscribe(function(message) {
    toastr.warning(message)
})

app.ports.toastSuccess.subscribe(function(message) {
    toastr.success(message)
})

app.ports.showConfirmationDialog.subscribe(function(message) {
    $('#modal .modal-body').html(message);
    $('#modal').modal();

{'fraction_non_alphanumeric': 0.18346957311534967, 'fraction_numerical': 0.0009082652134423251, 'mean_word_length': 4.347087378640777, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1171488', 'n_tokens_mistral': 715, 'n_tokens_neox': 741, 'n_words': 116}