<commit_before>define([
    'uiComponent',
    'ko',
    'Amazon_Payment/js/model/storage'
], function (Component, ko, amazonStorage) {
    'use strict';

    return Component.extend({
        defaults: {
            template: 'Amazon_Payment/shipping-address/inline-form',
            formSelector: 'co-shipping-form'
        },

        /**
         * Init inline form
         */
        initObservable: function () {
            this._super();
            amazonStorage.isAmazonAccountLoggedIn.subscribe(this.hideInlineForm, this);
            return this;
        },

        /**
         * Show/hide inline form depending on Amazon login status
         */
        manipulateInlineForm: function () {
            this.hideInlineForm(amazonStorage.isAmazonAccountLoggedIn());
        },

        /**
         * Show/hide inline form
         */
        hideInlineForm: function(hide) {
            let elem = document.getElementById(this.formSelector);

            if (elem) {
                document.getElementById(this.formSelector).style.display = hide ? 'none' : 'block';
            }
        }
    });
});<commit_msg>BESS feedback: replace 'let' with 'var' (#511)<commit_after>define([
    'uiComponent',
    'ko',
    'Amazon_Payment/js/model/storage'
], function (Component, ko, amazonStorage) {
    'use strict';

    return Component.extend({
        defaults: {
            template: 'Amazon_Payment/shipping-address/inline-form',
            formSelector: 'co-shipping-form'
        },

        /**
         * Init inline form
         */
        initObservable: function () {
            this._super();
            amazonStorage.isAmazonAccountLoggedIn.subscribe(this.hideInlineForm, this);
            return this;
        },

        /**
         * Show/hide inline form depending on Amazon login status
         */
        manipulateInlineForm: function () {
            this.hideInlineForm(amazonStorage.isAmazonAccountLoggedIn());
        },

        /**
         * Show/hide inline form
         */
        hideInlineForm: function(hide) {
            var elem = document.getElementById(this.formSelector);

            if (elem) {
                document.getElementById(this.formSelector).style.display = hide ? 'none' : 'block';
            }
        }
    });
});
{'fraction_non_alphanumeric': 0.11862189271696467, 'fraction_numerical': 0.0013083296990841692, 'mean_word_length': 1.8078335373317014, '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': '6615700', 'n_tokens_mistral': 614, 'n_tokens_neox': 597, 'n_words': 110}