<commit_before>/**
 * @description The main module.
 *
 * @namespace imageCreator
 * @name controller
 * @version 1.0
 * @author mbaijs
 */

// Set up the paths and inital modules for the app.
//
requirejs.config(
{
    paths :
    {
        // App paths
        //
        "plugins"     : "../lib"
    ,   "templates"   : "../templates"

        // Require plugins
        //
    ,   "lazyRequire" : "../lib/require/lazyRequire"
    ,   "text"        : "../lib/require/text"
    }
});

require(
[
    "config"
,   "cache"

,   "lazyRequire"

,   "plugins/jquery.pubsub"
,   "plugins/jquery.hammer"
],
function( config, cache, lazyRequire )
{
    var toolbar = {};

    $( document ).ready( function()
    {
        // Initialize cache.
        //
        cache.initialize();

        // Listen for global app events.
        //
        $.subscribe( "setMessage", setMessage );
        $.subscribe( "loadTool", loadTool );
        $.subscribe( "loadEngine", loadEngine );

        // Create UI.<commit_msg>Main: On every unload the state of all the layers is stored to storage.<commit_after>/**
 * @description The main module.
 *
 * @namespace imageCreator
 * @name controller
 * @version 1.0
 * @author mbaijs
 */

// Set up the paths and inital modules for the app.
//
requirejs.config(
{
    paths :
    {
        // App paths
        //
        "plugins"     : "../lib"
    ,   "templates"   : "../templates"

        // Require plugins
        //
    ,   "lazyRequire" : "../lib/require/lazyRequire"
    ,   "text"        : "../lib/require/text"
    }
});

require(
[
    "config"
,   "cache"

,   "lazyRequire"

,   "plugins/jquery.pubsub"
,   "plugins/jquery.hammer"
],
function( config, cache, lazyRequire )
{
    var toolbar = {};

    $( document ).ready( function()
    {
        // Initialize cache.
        //
        cache.initialize();

        // Listen for global app events.
        //
        $.subscribe( "setMessage", setMessage );
        $.subscribe( "loadTool", loadTool );
        $.subscribe( "loadEngine", loadEngine );

        // Save state of canvas when we leave this page.
        //
        $( window ).unload( cache.storeLayers );

        // Create UI.
{'fraction_non_alphanumeric': 0.15493601462522852, 'fraction_numerical': 0.0018281535648994515, 'mean_word_length': 1.760403530895334, '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': '1599756', 'n_tokens_mistral': 677, 'n_tokens_neox': 658, 'n_words': 166}