<commit_before>var settings_org = (function () {

var exports = {};

var meta = {
    loaded: false,
};

exports.reset = function () {
    meta.loaded = false;
};


exports.maybe_disable_widgets = function () {
    if (page_params.is_admin) {
        return;
    }

    $(".organization-box [data-name='organization-profile']")
        .find("input, textarea, button, select").attr("disabled", true);

    $(".organization-box [data-name='organization-settings']")
        .find("input, textarea, button, select").attr("disabled", true);

    $(".organization-box [data-name='organization-settings']")
        .find(".control-label-disabled").addClass('enabled');

    $(".organization-box [data-name='organization-permissions']")
        .find("input, textarea, button, select").attr("disabled", true);

    $(".organization-box [data-name='organization-permissions']")
        .find(".control-label-disabled").addClass('enabled');

    $(".organization-box [data-name='auth-methods']")
        .find("input, button, select, checked").attr("disabled", true);
};

exports.email_address_visibility_values = {
    everyone: {
        code: 1,
        description: i18n.t("Members, admins, and guests"),
    },
    //// Backend support for this configuration is not available yet.
    // admins_and_members: {
    //     code: 2,
    //     description: i18n.t("Members and admins"),
    // },
    admins_only: {
        code: 3,
        description: i18n.t("Admins only"),
    },
};

exports.show_email = function () {
    // TODO: Extend this when we add support for admins_and_members above.
    return page_params.email_address_visibility ===
        exports.email_address_visibility_values.admins_only.code;
};

exports.get_realm_time_limits_in_minutes = function (property) {
    var val = (page_params[property] / 60).toFixed(1);
    if (parseFloat(val, 10) === parseInt(val, 10)) {
        val = parseInt(val, 10);
    }
    return val.toString();
};

function get_property_value(property_name) {
    var value;

    if (property_name === 'realm_message_content_edit_limit_minutes') {
        return exports.get_realm_time_limits_in_minutes('realm_message_content_edit_limit_seconds');
    }

    if (property_name === 'realm_message_content_delete_limit_minutes') {
        return exports.get_realm_time_limits_in_minutes('realm_message_content_delete_limit_seconds');
    }

    if (property_name === 'realm_waiting_period_setting') {
        if (page_params.realm_waiting_period_threshold === 0) {
            return "none";
        }
        if (page_params.realm_waiting_period_threshold === 3) {
            return "three_days";<commit_msg>settings_org: Fix the typo in `settings_org.show_email()` function.<commit_after>var settings_org = (function () {

var exports = {};

var meta = {
    loaded: false,
};

exports.reset = function () {
    meta.loaded = false;
};


exports.maybe_disable_widgets = function () {
    if (page_params.is_admin) {
        return;
    }

    $(".organization-box [data-name='organization-profile']")
        .find("input, textarea, button, select").attr("disabled", true);

    $(".organization-box [data-name='organization-settings']")
        .find("input, textarea, button, select").attr("disabled", true);

    $(".organization-box [data-name='organization-settings']")
        .find(".control-label-disabled").addClass('enabled');

    $(".organization-box [data-name='organization-permissions']")
        .find("input, textarea, button, select").attr("disabled", true);

    $(".organization-box [data-name='organization-permissions']")
        .find(".control-label-disabled").addClass('enabled');

    $(".organization-box [data-name='auth-methods']")
        .find("input, button, select, checked").attr("disabled", true);
};

exports.email_address_visibility_values = {
    everyone: {
        code: 1,
        description: i18n.t("Members, admins, and guests"),
    },
    //// Backend support for this configuration is not available yet.
    // admins_and_members: {
    //     code: 2,
    //     description: i18n.t("Members and admins"),
    // },
    admins_only: {
        code: 3,
        description: i18n.t("Admins only"),
    },
};

exports.show_email = function () {
    // TODO: Extend this when we add support for admins_and_members above.
    return page_params.realm_email_address_visibility ===
        exports.email_address_visibility_values.admins_only.code;
};

exports.get_realm_time_limits_in_minutes = function (property) {
    var val = (page_params[property] / 60).toFixed(1);
    if (parseFloat(val, 10) === parseInt(val, 10)) {
        val = parseInt(val, 10);
    }
    return val.toString();
};

function get_property_value(property_name) {
    var value;

    if (property_name === 'realm_message_content_edit_limit_minutes') {
        return exports.get_realm_time_limits_in_minutes('realm_message_content_edit_limit_seconds');
    }

    if (property_name === 'realm_message_content_delete_limit_minutes') {
        return exports.get_realm_time_limits_in_minutes('realm_message_content_delete_limit_seconds');
    }

    if (property_name === 'realm_waiting_period_setting') {
        if (page_params.realm_waiting_period_threshold === 0) {
            return "none";
        }
        if (page_params.realm_waiting_period_threshold === 3) {
            return "three_days";
{'fraction_non_alphanumeric': 0.14789257739649384, 'fraction_numerical': 0.007459903021260724, 'mean_word_length': 3.4358974358974357, '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': '4195715', 'n_tokens_mistral': 1715, 'n_tokens_neox': 1623, 'n_words': 289}