<commit_before>
require(['oroui/js/mediator'], function(mediator) {
    'use strict';

    mediator.once('page:afterChange', function() {
        //@TODO remove delay, when afterChange event will
        // take in account rendering from inline scripts
        setTimeout(function() {
            // emulates 'document ready state' for selenium tests
            document['page-rendered'] = true;
            mediator.trigger('page-rendered');
        }, 50);
    });
});

require(['jquery', 'underscore', 'orotranslation/js/translator', 'oroui/js/tools',
        'oroui/js/mediator', 'oroui/js/layout',
        'oroui/js/delete-confirmation', 'oroui/js/scrollspy',
        'bootstrap', 'jquery-ui', 'orofrontend/default/js/widgets/expand-text-widget'
    ], function($, _, __, tools, mediator, layout, DeleteConfirmation, scrollspy) {
    'use strict';

    /**
     * Remove selection after page change
     */
    mediator.on('page:beforeChange', function clearSelection() {
        if (document.selection) {
            document.selection.empty();
        } else if (window.getSelection) {
            window.getSelection().removeAllRanges();
        }
    });

    /* ============================================================
     * from layout.js
     * ============================================================ */

    var realWidth = function($selector) {
        if ($selector instanceof $ && $selector.length > 0) {
            return $selector[0].getBoundingClientRect().width;
        } else {
            return 0;
        }
    };

    $(function() {
        $('.expand-text').expandLongTexWidget();
        var $pageTitle = $('#page-title');
        if ($pageTitle.length) {
            document.title = $('<div.>').html($('#page-title').text()).text();
        }
        layout.hideProgressBar();

        /* side bar functionality */
        $('div.side-nav').each(function() {
            var myParent = $(this);
            var myParentHolder = $(myParent).parent().height() - 18;
            $(myParent).height(myParentHolder);
            /* open close bar */
            $(this).find('span.maximize-bar').click(function() {<commit_msg>BAP-15103: Add ability to initialize expand-text-widget component by selector - code cleaning<commit_after>
require(['oroui/js/mediator'], function(mediator) {
    'use strict';

    mediator.once('page:afterChange', function() {
        //@TODO remove delay, when afterChange event will
        // take in account rendering from inline scripts
        setTimeout(function() {
            // emulates 'document ready state' for selenium tests
            document['page-rendered'] = true;
            mediator.trigger('page-rendered');
        }, 50);
    });
});

require(['jquery', 'underscore', 'orotranslation/js/translator', 'oroui/js/tools',
        'oroui/js/mediator', 'oroui/js/layout',
        'oroui/js/delete-confirmation', 'oroui/js/scrollspy',
        'bootstrap', 'jquery-ui'
    ], function($, _, __, tools, mediator, layout, DeleteConfirmation, scrollspy) {
    'use strict';

    /**
     * Remove selection after page change
     */
    mediator.on('page:beforeChange', function clearSelection() {
        if (document.selection) {
            document.selection.empty();
        } else if (window.getSelection) {
            window.getSelection().removeAllRanges();
        }
    });

    /* ============================================================
     * from layout.js
     * ============================================================ */

    var realWidth = function($selector) {
        if ($selector instanceof $ && $selector.length > 0) {
            return $selector[0].getBoundingClientRect().width;
        } else {
            return 0;
        }
    };

    $(function() {
        var $pageTitle = $('#page-title');
        if ($pageTitle.length) {
            document.title = $('<div.>').html($('#page-title').text()).text();
        }
        layout.hideProgressBar();

        /* side bar functionality */
        $('div.side-nav').each(function() {
            var myParent = $(this);
            var myParentHolder = $(myParent).parent().height() - 18;
            $(myParent).height(myParentHolder);
            /* open close bar */
            $(this).find('span.maximize-bar').click(function() {
{'fraction_non_alphanumeric': 0.20655204460966542, 'fraction_numerical': 0.004414498141263941, 'mean_word_length': 2.4578313253012047, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5560961', 'n_tokens_mistral': 1197, 'n_tokens_neox': 1142, 'n_words': 224}