<commit_before>var orderedByStatus = true;
var sortByStat;
var sortByParty;
var redraw;
var grouped=null;
var api_root;
var utils, highlight;

(function(){

  var thelawfactory = window.thelawfactory || (window.thelawfactory = {});

  thelawfactory.mod2 = function(){

    function get_status_img(e){
        if (e.sort==="adopté") return "img/ok.png";
        if (e.sort==="rejeté") return "img/ko.png";
        if (e.sort==="non-voté") return "img/nd.png";
        return "";
    }

  	function vis(selection){

		var articles;
        utils = $('.mod2').scope();
        highlight = utils.highlightGroup;
        selection.each(function(d,i){
            utils.groups = d.groupes;
            articles=d.sujets;
            api_root=d.api_root_url;
        });
        if (Object.keys(articles).length < 2)
            $('#display_menu').parent().hide();

        selectRow = function(art,pos) {
            if(d3.event) d3.event.stopPropagation();
            var sel = d3.select("."+utils.slugArticle(art));
            if(!sel.empty()) {
                utils.resetHighlight('amds');
                d3.selectAll("g").style("opacity", 0.2);
                sel.style("opacity", 1);
                if(pos) $("#viz").animate({ scrollTop: sel.attr("data-offset") })
            }
        };

        deselectRow = function() {
            if(d3.event) d3.event.stopPropagation();
            utils.resetHighlight('amds');
            $("#readMode").hide();
            d3.selectAll("g").style("opacity", 1);
        };

        artArray=d3.values(articles).sort(function(a,b){return a.order-b.order});

        var w, rw, minheight, nsq, z,
		    lineh = 30,
            x = 0, y, h,
            jumpLines = 0,
		    offset = 0;
        var readSizes = function() {<commit_msg>make crosscalls https compatible<commit_after>var orderedByStatus = true;
var sortByStat;
var sortByParty;
var redraw;
var grouped=null;
var api_root;
var utils, highlight;

(function(){

  var thelawfactory = window.thelawfactory || (window.thelawfactory = {});

  thelawfactory.mod2 = function(){

    function get_status_img(e){
        if (e.sort==="adopté") return "img/ok.png";
        if (e.sort==="rejeté") return "img/ko.png";
        if (e.sort==="non-voté") return "img/nd.png";
        return "";
    }

  	function vis(selection){

		var articles;
        utils = $('.mod2').scope();
        highlight = utils.highlightGroup;
        selection.each(function(d,i){
            utils.groups = d.groupes;
            articles=d.sujets;
            api_root=d.api_root_url.replace(/^https?:/, '');
        });
        if (Object.keys(articles).length < 2)
            $('#display_menu').parent().hide();

        selectRow = function(art,pos) {
            if(d3.event) d3.event.stopPropagation();
            var sel = d3.select("."+utils.slugArticle(art));
            if(!sel.empty()) {
                utils.resetHighlight('amds');
                d3.selectAll("g").style("opacity", 0.2);
                sel.style("opacity", 1);
                if(pos) $("#viz").animate({ scrollTop: sel.attr("data-offset") })
            }
        };

        deselectRow = function() {
            if(d3.event) d3.event.stopPropagation();
            utils.resetHighlight('amds');
            $("#readMode").hide();
            d3.selectAll("g").style("opacity", 1);
        };

        artArray=d3.values(articles).sort(function(a,b){return a.order-b.order});

        var w, rw, minheight, nsq, z,
		    lineh = 30,
            x = 0, y, h,
            jumpLines = 0,
		    offset = 0;
        var readSizes = function() {
{'fraction_non_alphanumeric': 0.1667128987517337, 'fraction_numerical': 0.011095700416088766, 'mean_word_length': 2.087328767123288, 'pattern_counts': {'":': 0, '<': 5, '<?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': '741187', 'n_tokens_mistral': 1191, 'n_tokens_neox': 1131, 'n_words': 205}