<commit_before>define(function(require) {
    'use strict';

    var HiddenRedirectComponent;
    var $ = require('jquery');
    var __ = require('orotranslation/js/translator');
    var mediator = require('oroui/js/mediator');
    var Modal = require('oroui/js/modal');
    var BaseComponent = require('oroui/js/app/components/base/component');

    /**
     * @export oroui/js/app/components/hidden-redirect-component
     * @extends oroui.app.components.base.Component
     * @class oroui.app.components.HiddenRedirectComponent
     */
    HiddenRedirectComponent = BaseComponent.extend({
        /**
         * @property {Object}
         */
        element: null,

        /**
         * @property {string}
         */
        type: 'info',

        /**
         * @property {Boolean}
         */
        showLoading: false,

        /**
         * @inheritDoc
         */
        constructor: function HiddenRedirectComponent() {
            HiddenRedirectComponent.__super__.constructor.apply(this, arguments);
        },

        /**
         * @inheritDoc
         */
        initialize: function(options) {
            this.element = options._sourceElement;
            if (!this.element) {
                return;
            }

            if (options.type) {
                this.type = options.type;
            }

            if (options.showLoading) {
                this.showLoading = options.showLoading;
            }

            var self = this;
            this.element.on('click.' + this.cid, function(e) {
                self._showLoading();

                e.preventDefault();
                var pageStateView = mediator.execute('composer:retrieve', 'pageState', true);

                if (pageStateView.isStateChanged()) {
                    var confirmModal = self.createModal();
                    confirmModal.once('ok', function() {
                        self.saveAndRedirect();<commit_msg>BAP-16833: Record pagination in mobile view (#18267)<commit_after>define(function(require) {
    'use strict';

    var HiddenRedirectComponent;
    var $ = require('jquery');
    var __ = require('orotranslation/js/translator');
    var mediator = require('oroui/js/mediator');
    var Modal = require('oroui/js/modal');
    var BaseComponent = require('oroui/js/app/components/base/component');

    /**
     * @export oroui/js/app/components/hidden-redirect-component
     * @extends oroui.app.components.base.Component
     * @class oroui.app.components.HiddenRedirectComponent
     */
    HiddenRedirectComponent = BaseComponent.extend({
        /**
         * @property {Object}
         */
        element: null,

        /**
         * @property {string}
         */
        type: 'info',

        /**
         * @property {Boolean}
         */
        showLoading: false,

        /**
         * @inheritDoc
         */
        constructor: function HiddenRedirectComponent() {
            HiddenRedirectComponent.__super__.constructor.apply(this, arguments);
        },

        /**
         * @inheritDoc
         */
        initialize: function(options) {
            this.element = options._sourceElement;
            if (!this.element) {
                return;
            }

            if (options.type) {
                this.type = options.type;
            }

            if (options.showLoading) {
                this.showLoading = options.showLoading;
            }

            var self = this;
            this.element.on('click.' + this.cid, function(e) {
                self._showLoading();

                e.preventDefault();
                var pageStateView = mediator.execute('composer:retrieve', 'pageState', true);

                if (pageStateView && pageStateView.isStateChanged()) {
                    var confirmModal = self.createModal();
                    confirmModal.once('ok', function() {
                        self.saveAndRedirect();
{'fraction_non_alphanumeric': 0.12084823709759837, 'fraction_numerical': 0.0025549310168625446, 'mean_word_length': 1.6668937329700273, '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': '6820639', 'n_tokens_mistral': 1049, 'n_tokens_neox': 986, 'n_words': 168}