From f43f5408ea03f02dea29712feb0662aab386e1bd Mon Sep 17 00:00:00 2001 From: Nick Fernandez Date: Mon, 5 Jun 2017 17:40:35 -0400 Subject: [PATCH] v1.17.0 downsampled count and cluster-count support in cat-breakdown tooltips --- clustergrammer.js | 2 +- clustergrammer.min.js | 14 +-- clustergrammer.node.js | 156 ++++++++++++++++++++++--------- clustergrammer.node.min.js | 14 +-- package.json | 2 +- src/main.js | 2 +- webpack.config.js | 186 ++++++++++++++++++------------------- 7 files changed, 221 insertions(+), 155 deletions(-) diff --git a/clustergrammer.js b/clustergrammer.js index 2ce4adda..555e1f14 100644 --- a/clustergrammer.js +++ b/clustergrammer.js @@ -74,7 +74,7 @@ var Clustergrammer = __webpack_require__(189); __webpack_require__(193); - /* clustergrammer v1.16.2 + /* clustergrammer v1.17.0 * Nicolas Fernandez, Ma'ayan Lab, Icahn School of Medicine at Mount Sinai * (c) 2017 */ diff --git a/clustergrammer.min.js b/clustergrammer.min.js index ee917de7..aba4c38d 100644 --- a/clustergrammer.min.js +++ b/clustergrammer.min.js @@ -1,9 +1,9 @@ -var Clustergrammer=function(t){function e(o){if(r[o])return r[o].exports;var a=r[o]={exports:{},id:o,loaded:!1};return t[o].call(a.exports,a,a.exports,e),a.loaded=!0,a.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function o(t){function e(){d3.select(S.params.viz.viz_svg).style("opacity",.5);var t=500;this.params.viz.run_trans===!0&&(t=2500),setTimeout(o,t,this)}function o(t){s(t)}function b(t){u(this,t)}function z(t,e,r){v(this,t,e,r)}function k(){return w}function A(t,e){"sum"===e&&(e="rank"),"var"===e&&(e="rankvar"),y(this,e,t)}function T(){return x(this.params)}var E=a(t),S={};if(S.params=n(E),S.config=E,S.params.zoom_behavior=d3.behavior.zoom().scaleExtent([1,S.params.viz.square_zoom*S.params.viz.zoom_ratio.x]).on("zoom",function(){g(S)}),S.params.zoom_behavior.translate([S.params.viz.clust.margin.left,S.params.viz.clust.margin.top]),S.params.use_sidebar){var B=r(196);B(S)}return i(S),S.update_view=f,S.resize_viz=e,S.play_demo=l,S.ini_demo=c,S.filter_viz_using_nodes=d,S.filter_viz_using_names=_,S.update_cats=b,S.reset_cats=p,S.zoom=z,S.save_matrix=m,S.brush_crop_matrix=h,S.d3_tip_custom=k,S.reorder=A,S.export_matrix_string=T,S}var a=r(1),n=r(9),i=r(37),s=r(88),l=r(129),c=r(169),d=r(172),_=r(173),u=r(174),p=r(175),v=r(80),f=r(177),m=r(180),h=r(184),g=r(89),w=r(48),y=r(79),x=r(182);d3.slider=r(186);r(188);r(190),r(194),t.exports=o},function(t,e,r){"use strict";var o=r(2),a=r(3),n=r(4),i=r(5),s=r(6),l=r(7),c=r(8);t.exports=function(t){var e=s(),r=o.extend(e,t);r.network_data=t.network_data;var d=": ";_.each(["row","col"],function(t){var e=r.network_data[t+"_nodes"],o=c(e);e.forEach(function(e,a){e[t+"_index"]=a,o&&(r.super_labels=!0,r["super"][t]=e.name.split(d)[0],e.name=e.name.split(d)[1]),e.name=String(e.name),e.name=e.name.replace(/_/g," ")})}),r.network_data.row_nodes_names=o.pluck(r.network_data.row_nodes,"name"),r.network_data.col_nodes_names=o.pluck(r.network_data.col_nodes,"name"),r.sim_mat=l(r);var u=n(r.network_data.views),p={};_.each(_.keys(u.possible_filters),function(t){var e=i(u.filter_data,t);p[t]=e}),_.has(r.network_data,"views")&&r.network_data.views.forEach(function(t){_.each(_.keys(u.possible_filters),function(e){_.has(t,e)||(t[e]=p[e])});var e=t.nodes;_.each(["row","col"],function(t){var r=c(e[t+"_nodes"]);e[t+"_nodes"].forEach(function(e,o){e[t+"_index"]=o,r&&(e.name=e.name.split(d)[1]),e.name=String(e.name),e.name=e.name.replace(/_/g," ")})})});var v=r.network_data.col_nodes,f=r.network_data.row_nodes;if(_.has(r.network_data,"mat")){for(var m=[],h=r.network_data.mat,g={},w=0;w1&&(e[t]=n)});var a={};return a.possible_filters=e,a.filter_data=r,a}},function(t,e){"use strict";t.exports=function(t,e){var r=t[e].sort(function(t,e){return e-t})[0];return r=String(r)}},function(t,e){"use strict";t.exports=function(){var t={row_label_scale:1,col_label_scale:1,super_labels:!1,"super":{},show_label_tooltips:!0,show_tile_tooltips:!0,transpose:!1,tile_colors:["#FF0000","#1C86EE"],bar_colors:["#FF0000","#1C86EE"],cat_value_colors:["#2F4F4F","#9370DB"],outline_colors:["orange","black"],highlight_color:"#FFFF00",tile_title:!1,input_domain:0,opacity_scale:"linear",do_zoom:!0,is_zoom:0,is_slider_drag:!1,is_cropping:!1,background_color:"#FFFFFF",super_border_color:"#F5F5F5",outer_margins:{top:0,bottom:0,left:0,right:0},ini_expand:!1,grey_border_width:2,tile_click_hlight:!1,super_label_scale:1,make_tile_tooltip:function(t){return t.info},ini_view:null,requested_view:null,use_sidebar:!0,title:null,about:null,sidebar_width:160,sidebar_icons:!0,row_search_placeholder:"Row",buffer_width:10,show_sim_mat:!1,cat_colors:null,resize:!0,clamp_opacity:.85,expand_button:!0,max_allow_fs:20,dendro_filter:{row:!1,col:!1},cat_filter:{row:!1,col:!1},crop_filter_nodes:{row:!1,col:!1},row_tip_callback:null,col_tip_callback:null,tile_tip_callback:null,matrix_update_callback:null,cat_update_callback:null,dendro_callback:null,dendro_click_callback:null,new_row_cats:null,make_modals:!0,show_viz_border:!1};return t}},function(t,e){"use strict";t.exports=function(t){var e=!1,r=t.network_data.row_nodes_names.length,o=t.network_data.col_nodes_names.length;if(r==o){var a=t.network_data.row_nodes_names,n=t.network_data.col_nodes_names;e=!0,_.each(a,function(t){var r=a.indexOf(t);t!==n[r]&&(e=!1)})}return e&&(t.expand_button=!1),e}},function(t,e){"use strict";t.exports=function(t){var e=": ",r=!0;return _.each(t,function(t){var o=String(t.name);o.indexOf(e)<0&&(r=!1)}),r}},function(t,e,r){"use strict";var o=r(10),a=r(13),n=r(14),i=r(4),s=r(15),l=r(36);t.exports=function(t){var e=$.extend(!0,{},t),r=e;if(r.inst_nodes={},r.inst_nodes.row_nodes=r.network_data.row_nodes,r.inst_nodes.col_nodes=r.network_data.col_nodes,null!==r.ini_view){var c=r.ini_view,d=i(r.network_data.views);r.viz={},r.viz.possible_filters=d.possible_filters,r.viz.filter_data=d.filter_data,c=n(r,c),r.network_data=o(e,r,c),r.requested_view=c}return r=s(r),r.use_sidebar&&(r.sidebar=a(r)),r.zoom_info=l(),r}},function(t,e,r){"use strict";var o=r(11),a=r(12);t.exports=function(t,e,r){var n=t.network_data.views,i=!1;_.has(n[0],"enr_score_type")&&(i=!0);var s=a(e,n,r);i&&0==s.length&&(r={N_row_sum:"all",N_col_sum:"10"},s=a(e,n,r));var l,c=s[0];if("undefined"!=typeof c){var d=c.nodes;l=o(t,d)}else l=t.network_data;return l}},function(t,e,r){"use strict";var o=r(2);t.exports=function(t,e){var r=t.network_data.links,a=o.pluck(e.row_nodes,"name"),n=o.pluck(e.col_nodes,"name"),i=_.filter(r,function(t){var e=t.name.split("_")[0],r=t.name.split("_")[1],o=_.indexOf(a,e),i=_.indexOf(n,r);if(o>-1&i>-1)return t.source=o,t.target=i,t}),s={};return s.row_nodes=e.row_nodes,s.row_nodes_names=a,s.col_nodes=e.col_nodes,s.col_nodes_names=n,s.links=i,s.all_links=r,s.views=t.network_data.views,_.has(t.network_data,"cat_colors")&&(s.cat_colors=t.network_data.cat_colors),s}},function(t,e,r){"use strict";var o=r(2),a=r(5);t.exports=function(t,e,r){var n,i,s=_.keys(r);_.each(s,function(t){n=r[t],/[^a-z_]/i.test(n)&&(n=parseInt(n,10)),i=!1,_.each(e,function(e){o.has(e,t)&&(i=!0)}),i&&(e=_.filter(e,function(e){return e[t]==n}))});var l,c,d=[],u=!1;return _.each(e,function(e){l=!0,_.each(_.keys(t.viz.possible_filters),function(r){c=a(t.viz.filter_data,r),e[r]!=c&&(l=!1)}),l?u===!1&&(u=!0,d.push(e)):d.push(e)}),d}},function(t,e){"use strict";t.exports=function(t){var e={};return e.wrapper={},e.row_search={},e.row_search.box={},e.row_search.box.height=34,e.row_search.box.width=95,e.row_search.placeholder=t.row_search_placeholder,e.row_search.margin_left=7,e.slider={},e.slider.width=t.sidebar_width-30,e.slider.margin_left=15,e.key_cat={},e.key_cat.width=t.sidebar_width-15,e.key_cat.margin_left=5,e.key_cat.max_height=100,e.title=t.title,e.title_margin_left=7,e.about=t.about,e.width=t.sidebar_width,e.buttons={},e.buttons.width=t.sidebar_width-15,e.text={},e.icons=t.sidebar_icons,e.icon_margin_left=-5,e}},function(t,e){"use strict";t.exports=function(t,e){var r=_.keys(e)[0];return _.each(_.keys(t.viz.possible_filters),function(o){if(o!=r&&!d3.select(t.root+" .slider_"+o).empty()){var a=d3.select(t.root+" .slider_"+o).attr("current_state");e[o]=a}}),e}},function(t,e,r){"use strict";var o=r(16),a=r(17),n=r(19),i=r(20),s=r(21),l=r(22),c=r(23),d=r(24),u=r(29),p=r(31),v=r(2),f=r(4),m=r(32);t.exports=function(t){function e(t){var e=arguments.length<=1||void 0===arguments[1]||arguments[1],r={};r.root=t.root,r.root_tips=t.root.replace("#",".")+"_d3-tip",r.viz_wrapper=t.root+" .viz_wrapper",r.do_zoom=t.do_zoom,r.background_color=t.background_color,r.super_border_color=t.super_border_color,r.outer_margins=t.outer_margins,r.is_expand=t.ini_expand,r.grey_border_width=t.grey_border_width,r.show_dendrogram=t.show_dendrogram,r.tile_click_hlight=t.tile_click_hlight,r.inst_order=t.inst_order,r.expand_button=t.expand_button,r.sim_mat=t.sim_mat,r.dendro_filter=t.dendro_filter,r.cat_filter=t.cat_filter,r.cat_value_colors=t.cat_value_colors,r.viz_svg=r.viz_wrapper+" .viz_svg",r.zoom_element=r.viz_wrapper+" .viz_svg",r.uni_duration=1e3,r.bottom_space=10,r.run_trans=!1,r.duration=1e3,r.resize=t.resize,v.has(t,"size")?r.fixed_size=t.size:r.fixed_size=!1,r.border_fraction=65,r.uni_margin=5,r.super_labels={},r.super_labels.margin={},r.super_labels.dim={},r.super_labels.margin.left=r.grey_border_width,r.super_labels.margin.top=r.grey_border_width,r.super_labels.dim.width=0,t.labels.super_labels&&(r.super_labels.dim.width=15*t.labels.super_label_scale),r.triangle_opacity=.6,r.norm_labels={},r.norm_labels.width={},r.dendro_room={},r.show_dendrogram?r.dendro_room.symbol_width=10:r.dendro_room.symbol_width=0,r.cat_colors=t.cat_colors,r=m(t,r,e),0==_.has(t,"group_level")&&(r.show_dendrogram&&(t.group_level={}),t.group_level.row=5,t.group_level.col=5),r.dendro_opacity=.35,r.spillover_col_slant=r.norm_labels.width.col;var o=f(t.network_data.views);return r.possible_filters=o.possible_filters,r.filter_data=o.filter_data,r.viz_nodes={},r.viz_nodes.row=t.network_data.row_nodes_names,r.viz_nodes.col=t.network_data.col_nodes_names,r.viz_nodes.curr_row=t.network_data.row_nodes_names,r.viz_nodes.curr_col=t.network_data.col_nodes_names,r.x_offset=0,r}var r=arguments.length<=1||void 0===arguments[1]||arguments[1];return t.labels=o(t),t.viz=e(t,r),a(t),t=n(t),t.viz=i(t.viz),t.viz=s(t.viz),t.viz=l(t.viz),t.sim_mat&&(t.viz.clust.dim.width<=t.viz.clust.dim.height?t.viz.clust.dim.height=t.viz.clust.dim.width:t.viz.clust.dim.width=t.viz.clust.dim.height),t=c(t),t=d(t),t=u(t),t=p(t)}},function(t,e){"use strict";t.exports=function(t){var e={};return e.super_label_scale=t.super_label_scale,e.super_labels=t.super_labels,e.super_label_fs=13.8,e.super_labels&&(e["super"]={},e["super"].row=t["super"].row,e["super"].col=t["super"].col),e.show_label_tooltips=t.show_label_tooltips,e.row_max_char=_.max(t.network_data.row_nodes,function(t){return t.name.length}).name.length,e.col_max_char=_.max(t.network_data.col_nodes,function(t){return t.name.length}).name.length,e.max_allow_fs=t.max_allow_fs,e}},function(t,e,r){"use strict";var o=r(18);t.exports=function(t){d3.select(t.root+" .viz_wrapper").empty()&&(d3.select(t.root).append("div").classed("sidebar_wrapper",!0),d3.select(t.root).append("div").classed("viz_wrapper",!0));var e=o(t);d3.select(t.root+" .sidebar_wrapper").style("float","left").style("width",t.sidebar_width+"px").style("height",e.height+"px").style("overflow","hidden"),d3.select(t.viz.viz_wrapper).style("float","left").style("width",e.width+"px").style("height",e.height+"px")}},function(t,e){"use strict";t.exports=function(t){var e,r={},o=t.buffer_width,a=d3.select(t.root).style("width").replace("px",""),n=d3.select(t.root).style("height").replace("px","");return t.viz.is_expand===!1?(e=t.viz.outer_margins,r.width=a-t.sidebar_width-o):(e=t.viz.outer_margins,r.width=a-o),r.top=e.top,r.left=e.left,t.viz.resize?r.height=n:(t.viz.is_expand?r.width=t.viz.fixed_size.width:r.width=t.viz.fixed_size.width-t.sidebar_width,r.height=t.viz.fixed_size.height),r}},function(t,e){"use strict";t.exports=function(t){return t.viz.svg_dim={},t.viz.svg_dim.width=Number(d3.select(t.viz.viz_wrapper).style("width").replace("px","")),t.viz.svg_dim.height=Number(d3.select(t.viz.viz_wrapper).style("height").replace("px","")),t}},function(t,e){"use strict";t.exports=function(t){return t.norm_labels.margin={},t.norm_labels.margin.left=t.super_labels.margin.left+t.super_labels.dim.width,t.norm_labels.margin.top=t.super_labels.margin.top+t.super_labels.dim.width,t.label_background={},t.label_background.row=t.norm_labels.width.row+t.cat_room.row+t.uni_margin,t.label_background.col=t.norm_labels.width.col+t.cat_room.col+t.uni_margin,t}},function(t,e){"use strict";t.exports=function(t){t.clust={},t.clust.margin={},t.clust.margin.left=t.norm_labels.margin.left+t.norm_labels.width.row+t.cat_room.row+t.uni_margin,t.clust.margin.top=t.norm_labels.margin.top+t.norm_labels.width.col+t.cat_room.col+t.uni_margin;var e=t.svg_dim.width-t.clust.margin.left-t.spillover_col_slant,r=d3.scale.ordinal().rangeBands([0,e]).domain(_.range(t.num_col_nodes)),o=r.rangeBand()/2;if(o>t.norm_labels.width.col){var a=t.norm_labels.width.col/o;e*=a}return t.clust.dim={},t.clust.dim.width=e,t}},function(t,e){"use strict";t.exports=function(t){var e=t.svg_dim.height-t.clust.margin.top-t.dendro_room.col-t.bottom_space;return t.clust.dim.height=e,t}},function(t,e){"use strict";t.exports=function(t){var e=Math.abs(_.max(t.network_data.col_nodes,function(t){return Math.abs(t.value)}).value);return t.labels.bar_scale_col=d3.scale.linear().domain([0,e]).range([0,.75*t.viz.norm_labels.width.col]),e=Math.abs(_.max(t.network_data.row_nodes,function(t){return Math.abs(t.value)}).value),t.labels.bar_scale_row=d3.scale.linear().domain([0,e]).range([0,t.viz.norm_labels.width.row]),t}},function(t,e,r){"use strict";var o=r(25),a=r(27);t.exports=function(t){t.matrix=o(t),t.viz.x_scale=d3.scale.ordinal().rangeBands([0,t.viz.clust.dim.width]),t.viz.y_scale=d3.scale.ordinal().rangeBands([0,t.viz.clust.dim.height]);var e;return _.each(["row","col"],function(r){e=t.viz.inst_order[r],"custom"===e&&(e="clust"),"row"===r?t.viz.x_scale.domain(t.matrix.orders[e+"_"+r]):t.viz.y_scale.domain(t.matrix.orders[e+"_"+r])}),t.viz.border_width={},t.viz.border_width.x=t.viz.x_scale.rangeBand()/t.viz.border_fraction,t.viz.border_width.y=t.viz.y_scale.rangeBand()/t.viz.border_fraction,t.viz.rect_width=t.viz.x_scale.rangeBand()-t.viz.border_width.x,t.viz.rect_height=t.viz.y_scale.rangeBand()-t.viz.border_width.y,a(t),t}},function(t,e,r){"use strict";var o=r(2),a=r(26);t.exports=function(t){var e={},r=t.network_data;e.tile_colors=t.tile_colors,e.bar_colors=t.bar_colors,e.outline_colors=t.outline_colors,e.hlight_color=t.highlight_color,e.tile_title=t.tile_title,e.show_tile_tooltips=t.show_tile_tooltips,e.make_tile_tooltip=t.make_tile_tooltip,e.click_hlight_x=-666,e.click_hlight_y=-666,e.click_hlight_row=-666,e.click_hlight_col=-666,e.def_large_matrix=1e4,e.opacity_function=t.opacity_scale,e.orders={},_.each(["row","col"],function(a){var n;n="row"===a?"col":"row";var i=r[n+"_nodes"],s=i.length,l=o.pluck(i,"name"),c=l.sort(),d=_.map(c,function(t){return r[n+"_nodes_names"].indexOf(t)});e.orders["alpha_"+a]=d;var u=["clust","rank"];_.has(i[0],"rankvar")&&u.push("rankvar"),t.viz.all_cats[n].length>0&&_.each(t.viz.all_cats[n],function(t){t=t.replace("-","_"),u.push(t+"_index")}),_.each(u,function(t){var r=d3.range(s).sort(function(e,r){return i[r][t]-i[e][t]});e.orders[t+"_"+a]=r})}),o.has(r,"all_links")?e.max_link=_.max(r.all_links,function(t){return Math.abs(t.value)}).value:e.max_link=_.max(r.links,function(t){return Math.abs(t.value)}).value,e.abs_max_val=Math.abs(e.max_link)*t.clamp_opacity,0===t.input_domain?"linear"===e.opacity_function?e.opacity_scale=d3.scale.linear().domain([0,e.abs_max_val]).clamp(!0).range([0,1]):"log"===e.opacity_function&&(e.opacity_scale=d3.scale.log().domain([.001,e.abs_max_val]).clamp(!0).range([0,1])):"linear"===e.opacity_function?e.opacity_scale=d3.scale.linear().domain([0,t.input_domain]).clamp(!0).range([0,1]):"log"===e.opacity_function&&(e.opacity_scale=d3.scale.log().domain([.001,t.input_domain]).clamp(!0).range([0,1]));var n=o.has(r.links[0],"value_up"),i=o.has(r.links[0],"value_dn");return n||i?e.tile_type="updn":e.tile_type="simple",o.has(r.links[0],"highlight")?e.highlight=1:e.highlight=0,e.matrix=a(r),e.wait_tooltip=0,e}},function(t,e,r){"use strict";var o=r(2);t.exports=function(t){var e,r,a=[];return r=!!o.has(t.links[0],"value_orig"),t.row_nodes.forEach(function(n,i){a[i]={},a[i].name=t.row_nodes[i].name,a[i].row_index=i,a[i].row_data=d3.range(t.col_nodes.length).map(function(a){return e=o.has(t.links[0],"value_up")||o.has(t.links[0],"value_dn")?{pos_x:a,pos_y:i,value:0,value_up:0,value_dn:0,highlight:0}:{pos_x:a,pos_y:i,value:0,highlight:0},r&&(e.value_orig=0),e})}),t.links.forEach(function(t){a[t.source].row_data[t.target].value=t.value,a[t.source].row_data[t.target].row_name=t.row_name,a[t.source].row_data[t.target].col_name=t.col_name,(o.has(t,"value_up")||o.has(t,"value_dn"))&&(a[t.source].row_data[t.target].value_up=t.value_up,a[t.source].row_data[t.target].value_dn=t.value_dn),r&&(a[t.source].row_data[t.target].value_orig=t.value_orig),t.highlight&&(a[t.source].row_data[t.target].highlight=t.highlight),t.info&&(a[t.source].row_data[t.target].info=t.info)}),a}},function(t,e,r){"use strict";var o=r(28);t.exports=function(t){var e=3,r=2,a=e/t.viz.rect_height,n=2;t.viz.ds_zt=n;var i=Math.floor(Math.log(a)/Math.log(n));if(t.viz.rect_height0){var s=2;t.viz.ds_opacity_scale=d3.scale.linear().domain([1,100]).range([1,s]).clamp(!0);var l;t.viz.ds_num_levels=i,t.viz.ds=[],t.matrix.ds_matrix=[];for(var c=t.viz.inst_order.row,d=$.extend(!0,{},t.matrix.matrix),_=0;_t.labels.max_allow_fs&&(t.labels.default_fs_row=t.labels.max_allow_fs),t.labels.default_fs_col>t.labels.max_allow_fs&&(t.labels.default_fs_col=t.labels.max_allow_fs),t}},function(t,e,r){"use strict";var o=r(33),a=r(2),n=r(34),i=r(35);t.exports=function(t,e){var r,s,l,c=arguments.length<=2||void 0===arguments[2]||arguments[2],d=": ";e.show_categories={},e.all_cats={},e.cat_names={},e.cat_info={};var u={};u.row=null,u.col=null,e.cat_colors={},e.cat_colors.value_opacity=u;var p=0;return _.each(["row","col"],function(o){e.show_categories[o]=!1,e.all_cats[o]=[];var u=_.keys(t.network_data[o+"_nodes"][0]);u=u.sort(),_.each(u,function(t){t.indexOf("cat-")>=0&&(e.show_categories[o]=!0,e.all_cats[o].push(t))}),e.cat_info[o]=null,e.show_categories[o]&&(e.cat_colors[o]={},e.cat_info[o]={},e.cat_names[o]={},_.each(e.all_cats[o],function(c){var u=t.network_data[o+"_nodes"][0];"string"==typeof u[c]&&u[c].indexOf(d)>0?(r=u[c].split(d)[0],e.cat_names[o][c]=r):e.cat_names[o][c]=c;var v=a.pluck(t.network_data[o+"_nodes"],c),f=_.uniq(v).sort();if(s=i(f),"cat_strings"===s.type){var m=_.countBy(v);s.cat_hist=m}else s.cat_hist=null;e.cat_info[o][c]=s,e.cat_colors[o][c]={},_.each(f,function(t,r){l=n.get_random_color(r+p),e.cat_colors[o][c][t]=l,"string"==typeof t&&(t.indexOf("Not ")>=0||t.indexOf(": false")>0)&&(e.cat_colors[o][c][t]="#eee"),p+=1})})),_.has(t.network_data,"cat_colors")&&c===!0&&(e.cat_colors[o]=t.network_data.cat_colors[o]),t.sim_mat&&(e.cat_colors.col=e.cat_colors.row)}),e.cat_colors=e.cat_colors,e.cat_colors.opacity=.6,e.cat_colors.active_opacity=.9,e=o(t,e)}},function(t,e){"use strict";t.exports=function(t,e){var r,o=d3.scale.linear().domain([5,15]).range([85,120]).clamp("true");return e.cat_room={},e.cat_room.symbol_width=12,e.cat_room.separation=3,_.each(["row","col"],function(a){e.norm_labels.width[a]=o(t.labels[a+"_max_char"])*t[a+"_label_scale"],e["num_"+a+"_nodes"]=t.network_data[a+"_nodes"].length,"row"===a?e.dendro_room[a]=e.dendro_room.symbol_width:e.dendro_room[a]=e.dendro_room.symbol_width+3*e.uni_margin;var n=e.all_cats[a].length;if(e.show_categories[a]){r=(n-1)*e.cat_room.separation;var i;i="row"===a?n+1:n,e.cat_room[a]=i*e.cat_room.symbol_width+r}else"row"==a?e.cat_room[a]=e.cat_room.symbol_width:e.cat_room[a]=0}),e}},function(t,e){"use strict";function r(){return"#EEE"}function o(t){return n[t%a()]}function a(){return n.length}var n;n=["#393b79","#aec7e8","#ff7f0e","#ffbb78","#98df8a","#bcbd22","#404040","#ff9896","#c5b0d5","#8c564b","#1f77b4","#5254a3","#FFDB58","#c49c94","#e377c2","#7f7f7f","#2ca02c","#9467bd","#dbdb8d","#17becf","#637939","#6b6ecf","#9c9ede","#d62728","#8ca252","#8c6d31","#bd9e39","#e7cb94","#843c39","#ad494a","#d6616b","#7b4173","#a55194","#ce6dbd","#de9ed6"],t.exports={get_default_color:r,get_random_color:o,get_num_colors:a}},function(t,e){"use strict";t.exports=function(t){var e=t[0],r=!1,o=!1,a="cat_strings",n=NaN,i=[],s=null,l=": ";if("string"==typeof e&&e.indexOf(l)>-1&&(r=!0,e=e.split(l)[1]),0==isNaN(e)&&(o=!0),o&&(a="cat_values",_.each(t,function(t){r&&(t=t.split(l)[1]),1==isNaN(t)?a="cat_strings":(t=parseFloat(t),i.push(t))})),"cat_values"===a){var c=_.max(i,function(t){return Math.abs(t)});n=Math.abs(c),s=d3.scale.linear().domain([0,n]).range([0,1])}var d={};return d.type=a,d.max_abs_val=n,d.cat_scale=s,d}},function(t,e){"use strict";t.exports=function(){var t={};return t.zoom_x=1,t.zoom_y=1,t.trans_x=0,t.trans_y=0,t}},function(t,e,r){"use strict";var o=r(38),a=r(49),n=r(67),i=r(75),s=r(76),l=r(87),c=r(97),d=r(116),u=r(122),p=r(82),v=r(123),f=r(124),m=r(125),h=r(128);t.exports=function(t){function e(){var t=r.viz.super_border_color;return(r.viz.is_expand||0==r.show_viz_border)&&(t="white"),t}var r=t.params;d3.select(r.viz.viz_wrapper+" svg").remove();var g=d3.select(r.viz.viz_wrapper).append("svg").attr("class","viz_svg").attr("id","svg_"+r.root.replace("#","")).attr("width",r.viz.svg_dim.width).attr("height",r.viz.svg_dim.height).attr("is_zoom",0).attr("stopped_zoom",1);g.append("rect").attr("class","super_background").style("width",r.viz.svg_dim.width).style("height",r.viz.svg_dim.height).style("fill","white"),o(r,g),a(t),r.viz.show_dendrogram&&(v(t),f(t)),h(t),n(t),r.viz.ds_level===-1&&_.each(["row","col"],function(t){var e=Number(d3.select("."+t+"_label_group").select("text").style("font-size").replace("px","")),o=8;e>o&&d3.selectAll(r.root+" ."+t+"_label_group").each(function(){p(r,this,t)})}),u(t),r.viz.show_categories.col&&d(t),s(t),r.labels.super_labels&&i(r),m(t),d3.select(r.viz.viz_svg).append("rect").classed("left_border",!0).classed("borders",!0).attr("fill",e).attr("width",r.viz.grey_border_width).attr("height",r.viz.svg_dim.height).attr("transform","translate(0,0)"),d3.select(r.viz.viz_svg).append("rect").classed("right_border",!0).classed("borders",!0).attr("fill",e).attr("width",r.viz.grey_border_width).attr("height",r.viz.svg_dim.height).attr("transform",function(){var t=r.viz.svg_dim.width-r.viz.grey_border_width;return"translate("+t+",0)"}),d3.select(r.viz.viz_svg).append("rect").classed("top_border",!0).classed("borders",!0).attr("fill",e).attr("width",r.viz.svg_dim.width).attr("height",r.viz.grey_border_width).attr("transform",function(){var t=0;return"translate("+t+",0)"}),d3.select(r.viz.viz_svg).append("rect").classed("bottom_border",!0).classed("borders",!0).attr("fill",e).attr("width",r.viz.svg_dim.width).attr("height",r.viz.grey_border_width).attr("transform",function(){var t=r.viz.svg_dim.height-r.viz.grey_border_width;return"translate(0,"+t+")"}),l(t),c(t),r.viz.do_zoom&&d3.select(r.viz.zoom_element).call(r.zoom_behavior),d3.select(r.viz.zoom_element).on("dblclick.zoom",null)}},function(t,e,r){"use strict";var o=r(2),a=r(39),n=r(40),i=r(41);t.exports=function(t,e){var r,s=t.network_data,l=[];r=e.append("g").attr("class","clust_container").attr("transform","translate("+t.viz.clust.margin.left+","+t.viz.clust.margin.top+")").append("g").attr("class","clust_group").classed("clust_group",!0),r.append("rect").classed("background",!0).classed("grey_background",!0).style("fill","#eee").style("opacity",.25).attr("width",t.viz.clust.dim.width).attr("height",t.viz.clust.dim.height),null===t.viz.ds?i(t,t.matrix.matrix,"all",t.viz.ds_level):i(t,t.matrix.ds_matrix[0],"all",t.viz.ds_level),"function"==typeof t.click_tile?d3.selectAll(t.root+" .tile").on("click",function(e){var r={};r.row=t.network_data.row_nodes[e.pos_y].name,r.col=t.network_data.col_nodes[e.pos_x].name,r.value=e.value,o.has(e,"value_up")&&(r.value_up=e.value_up),o.has(e,"value_dn")&&(r.value_dn=e.value_dn),o.has(e,"info")&&(r.info=e.info),t.click_tile(r),n(t,this)}):t.tile_click_hlight&&d3.selectAll(t.root+" .tile").on("click",function(){n(t,this)});var c={},d=0;return c.enter=0,a(t,c,d),{get_clust_group:function(){return r},get_matrix:function(){return l},get_nodes:function(t){return"row"===t?s.row_nodes:s.col_nodes}}}},function(t,e){"use strict";t.exports=function(t,e,r){}},function(t,e){"use strict";t.exports=function(t,e){d3.select(e).each(function(r){var o=r.pos_x,a=r.pos_y;if(d3.selectAll(t.root+" .click_hlight").remove(),o!=t.matrix.click_hlight_x||a!=t.matrix.click_hlight_y){t.matrix.click_hlight_x=o,t.matrix.click_hlight_y=a;var n=6,i=.85,s=n*t.viz.border_width.x,l=n*t.viz.border_width.y;d3.select(e.parentNode).append("rect").classed("click_hlight",!0).classed("top_hlight",!0).attr("width",t.viz.x_scale.rangeBand()).attr("height",l).attr("fill",t.matrix.hlight_color).attr("transform",function(){return"translate("+t.viz.x_scale(o)+",0)"}).attr("opacity",i),d3.select(e.parentNode).append("rect").classed("click_hlight",!0).classed("left_hlight",!0).attr("width",s).attr("height",t.viz.y_scale.rangeBand()-.99*l).attr("fill",t.matrix.hlight_color).attr("transform",function(){return"translate("+t.viz.x_scale(o)+","+.99*l+")"}).attr("opacity",i),d3.select(e.parentNode).append("rect").classed("click_hlight",!0).classed("right_hlight",!0).attr("width",s).attr("height",t.viz.y_scale.rangeBand()-.99*l).attr("fill",t.matrix.hlight_color).attr("transform",function(){var e=t.viz.x_scale(o)+t.viz.x_scale.rangeBand()-s;return"translate("+e+","+.99*l+")"}).attr("opacity",i),d3.select(e.parentNode).append("rect").classed("click_hlight",!0).classed("bottom_hlight",!0).attr("width",function(){return t.viz.x_scale.rangeBand()-1.98*s}).attr("height",l).attr("fill",t.matrix.hlight_color).attr("transform",function(){var e=t.viz.x_scale(o)+.99*s,r=t.viz.y_scale.rangeBand()-l;return"translate("+e+","+r+")"}).attr("opacity",i)}else t.matrix.click_hlight_x=-666,t.matrix.click_hlight_y=-666})}},function(t,e,r){"use strict";var o=r(42),a=r(48);t.exports=function(t,e){var r=arguments.length<=2||void 0===arguments[2]?"all":arguments[2],n=arguments.length<=3||void 0===arguments[3]?-1:arguments[3],i=t.viz.y_scale,s=!0,l="row";if(n>=0&&(i=t.viz.ds[n].y_scale,s=!1,l="ds"+String(n)+"_row"),s)var c=a().attr("class",function(){var e=t.viz.root_tips.replace(".",""),r=e+" d3-tip "+e+"_tile_tip";return r}).style("display","none").direction("nw").offset([0,0]).html(function(e){var r,o=String(e.value.toFixed(3));if(t.keep_orig){var a=String(e.value_orig.toFixed(3));r="

"+e.row_name+" and "+e.col_name+"

normalized value: "+o+"

original value: "+a+"
"}else r="

"+e.row_name+" and "+e.col_name+"

value: "+o+"
";return r});else c=null;var d=[];"all"===r?d=e:_.each(e,function(t){_.contains(r,t.name)&&d.push(t)}),d3.select(t.root+" .clust_group").selectAll(".row").data(d,function(t){return t.name}).enter().append("g").classed(l,!0).attr("transform",function(t){return"translate(0,"+i(t.row_index)+")"}).each(function(e){o(t,e,c,this,n)}),t.viz.ds_level===-1&&null!=c&&d3.selectAll(t.root+" .row").call(c)}},function(t,e,r){"use strict";var o=r(43),a=r(44),n=r(45),i=r(46),s=r(47);t.exports=function(t,e,r,l){var c=arguments.length<=4||void 0===arguments[4]?-1:arguments[4],d=e.row_data,u=!0,p=t.viz.rect_height;c>=0&&(p=t.viz.ds[c].rect_height);var v;v=!!_.has(t.network_data.links[0],"value_orig");var f;f=v===!1?_.filter(d,function(t){return 0!==t.value}):d;var m=d3.select(l).selectAll("rect").data(f,function(t){return t.col_name}).enter().append("rect").attr("class","tile row_tile").attr("width",t.viz.rect_width).attr("height",p).style("fill",function(e){var r;return r="NaN"===e.value_orig?"#000000":e.value>0?t.matrix.tile_colors[0]:t.matrix.tile_colors[1]}).style("fill-opacity",function(e){ -var r;return r="NaN"===e.value_orig?.175:t.matrix.opacity_scale(Math.abs(e.value))}).attr("transform",function(e){return s(t,e)});if(u&&m.on("mouseover",function(){for(var e=arguments.length,o=Array(e),a=0;a0&&(r=t.matrix.opacity_scale(Math.abs(e.value_up))),r}).on("mouseover",function(){for(var e=arguments.length,o=Array(e),a=0;a0&&(r=t.matrix.opacity_scale(Math.abs(e.value_dn))),r}).on("mouseover",function(){for(var e=arguments.length,o=Array(e),a=0;a0&&Math.abs(t.value_dn)>0&&d3.select(this).remove()})}t.matrix.tile_title&&m.append("title").text(function(t){var e="value: "+t.value;return e})}},function(t,e){"use strict";t.exports=function(t){var e=0,r=t.viz.x_scale.rangeBand()-t.viz.border_width.x,o=0,a=t.viz.y_scale.rangeBand()-t.viz.border_width.y,n="M"+e+","+o+", L"+e+", "+a+", L"+r+",0 Z";return n}},function(t,e){"use strict";t.exports=function(t){var e=0,r=t.viz.x_scale.rangeBand()-t.viz.border_width.x,o=t.viz.y_scale.rangeBand()-t.viz.border_width.y,a=t.viz.y_scale.rangeBand()-t.viz.border_width.y,n="M"+e+", "+o+" , L"+r+", "+a+", L"+r+",0 Z";return n}},function(t,e){"use strict";t.exports=function(t,e,r,o){function a(){if(d3.select(e).classed("hovering")){var o=Number(d3.select(t.root+" .viz_svg").attr("is_zoom"));if(0===o&&t.matrix.show_tile_tooltips&&null!==r&&(d3.selectAll(t.viz.root_tips+"_tile_tip").style("display","block"),r.show.apply(e,s),null!=t.tile_tip_callback)){var a=s[0];t.tile_tip_callback(a)}}}var n,i=o[0],s=[].slice.call(o),l=1e3;d3.select(e).classed("hovering",!0),_.each(["row","col"],function(e){d3.selectAll(t.root+" ."+e+"_label_group text").style("font-weight",function(t){var r,o=i[e+"_name"].replace(/_/g," ")===t.name;return r=o?"bold":"normal"})}),s.push(e),clearTimeout(n),n=setTimeout(a,l,e)}},function(t,e){"use strict";t.exports=function(t,e,r){d3.select(e).classed("hovering",!1),d3.selectAll(t.viz.root_tips+"_tile_tip").style("display","none"),_.each(["row","col"],function(e){d3.selectAll(t.root+" ."+e+"_label_group text").style("font-weight","normal")}),null!=r&&r.hide()}},function(t,e){"use strict";t.exports=function(t,e){var r;r=e.pos_x in t.viz.x_scale.domain()?t.viz.x_scale(e.pos_x):0;var o=r+.5*t.viz.border_width.x,a=.5*t.viz.border_width.y;return"translate("+o+","+a+")"}},function(t,e){"use strict";t.exports=function(){function t(t){b=v(t),z=b.createSVGPoint(),document.body.appendChild(x)}function e(){return"n"}function r(){return[0,0]}function o(){return" "}function a(){var t=f();return{top:t.s.y,left:t.s.x}}function n(){var t=f();return{top:t.n.y-x.offsetHeight,left:t.n.x-x.offsetWidth/2}}function i(){var t=f();return{top:t.s.y,left:t.s.x-x.offsetWidth/2}}function s(){var t=f();return{top:t.e.y-x.offsetHeight/2,left:t.e.x}}function l(){var t=f();return{top:t.w.y-x.offsetHeight/2,left:t.w.x-x.offsetWidth}}function c(){var t=f();return{top:t.nw.y-x.offsetHeight,left:t.nw.x-x.offsetWidth}}function d(){var t=f();return{top:t.ne.y-x.offsetHeight,left:t.ne.x}}function _(){var t=f();return{top:t.sw.y,left:t.sw.x-x.offsetWidth}}function u(){var t=f();return{top:t.se.y,left:t.e.x}}function p(){var t=d3.select(document.createElement("div"));return t.style({position:"absolute",opacity:0,pointerEvents:"none",boxSizing:"border-box"}),t.node()}function v(t){return t=t.node(),"svg"==t.tagName.toLowerCase()?t:t.ownerSVGElement}function f(){var t=k||d3.event.target,e={},r=t.getScreenCTM(),o=t.getBBox(),a=o.width,n=o.height,i=o.x,s=o.y,l=document.documentElement.scrollTop||document.body.scrollTop,c=document.documentElement.scrollLeft||document.body.scrollLeft;return r.a=1,r.d=1,r.e=r.e+c,r.f=r.f+l,z.x=i,z.y=s,e.nw=z.matrixTransform(r),z.x=z.x+a,e.ne=z.matrixTransform(r),z.y=z.y+n,e.se=z.matrixTransform(r),z.x=z.x-a,e.sw=z.matrixTransform(r),z.y=z.y-n/2,e.w=z.matrixTransform(r),z.x=z.x+a,e.e=z.matrixTransform(r),z.x=z.x-a/2,z.y=z.y-n/2,e.n=z.matrixTransform(r),z.y=z.y+n,e.s=z.matrixTransform(r),e}function m(t){var e=d3.select(t).classed("hovering");e&&d3.selectAll(".d3-tip").transition().duration(250).style("opacity",0).style("display","none")}function h(t){var e={};return t&&"[object Function]"===e.toString.call(t)}var g=e,w=r,y=o,x=p(),b=null,z=null,k=null;t.show=function(){var e=Array.prototype.slice.call(arguments);e[e.length-1]instanceof SVGElement&&(k=e.pop());var r,o=y.apply(this,e),a=w.apply(this,e),n=g.apply(this,e),i=d3.select(x),s=0;for(i.html(o).style({opacity:1,"pointer-events":"all"}).style("z-index",99);s--;)i.classed(T[s],!1);if(r=A.get(n).apply(this),i.classed(n,!0).style({top:r.top+a[0]+"px",left:r.left+a[1]+"px"}),h(this)===!1){var l=d3.select(this).attr("class");l.indexOf("tile")>=0&&setTimeout(m,5e3,this)}return t},t.hide=function(){var e=d3.select(x);return e.style({opacity:0,"pointer-events":"none"}),t},t.attr=function(e){if(arguments.length<2&&"string"==typeof e)return d3.select(x).attr(e);var r=Array.prototype.slice.call(arguments);return d3.selection.prototype.attr.apply(d3.select(x),r),t},t.style=function(e){if(arguments.length<2&&"string"==typeof e)return d3.select(x).style(e);var r=Array.prototype.slice.call(arguments);return d3.selection.prototype.style.apply(d3.select(x),r),t},t.direction=function(e){return arguments.length?(g=null==e?e:d3.functor(e),t):g},t.offset=function(e){return arguments.length?(w=null==e?e:d3.functor(e),t):w},t.html=function(e){return arguments.length?(y=null==e?e:d3.functor(e),t):y};var A=d3.map({n:n,s:i,e:s,w:l,nw:c,ne:d,sw:_,se:u,south_custom:a}),T=A.keys();return t}},function(t,e,r){"use strict";var o=r(50);t.exports=function(t,e){var r,a=t.params;r=d3.select(a.viz.viz_svg+" .row_container").empty()?d3.select(a.viz.viz_svg).append("g").classed("row_container",!0).attr("transform","translate("+a.viz.norm_labels.margin.left+","+a.viz.clust.margin.top+")"):d3.select(a.viz.viz_svg).select(".row_container").attr("transform","translate("+a.viz.norm_labels.margin.left+","+a.viz.clust.margin.top+")"),d3.select(a.root+" .row_white_background").empty()&&r.append("rect").classed("row_white_background",!0).classed("white_bars",!0).attr("fill",a.viz.background_color).attr("width",a.viz.label_background.row).attr("height",30*a.viz.clust.dim.height+"px"),d3.select(a.root+" .row_label_container").empty()?r.append("g").classed("row_label_container",!0).attr("transform","translate("+a.viz.norm_labels.width.row+",0)").append("g").classed("row_label_zoom_container",!0):r.select(a.root+" .row_label_container").attr("transform","translate("+a.viz.norm_labels.width.row+",0)"),a.viz.ds_level===-1&&o(t,"all",e)}},function(t,e,r){"use strict";var o=r(2),a=r(51),n=r(52),i=r(66);t.exports=function(t){var e=arguments.length<=1||void 0===arguments[1]?"all":arguments[1],r=arguments.length<=2||void 0===arguments[2]?0:arguments[2],s=t.params,l=[];"all"===e?l=s.network_data.row_nodes:_.each(s.network_data.row_nodes,function(t){_.contains(e,t.name)&&l.push(t)});var c=d3.select(s.root+" .row_label_zoom_container").selectAll("g").data(l,function(t){return t.name}).enter().append("g").classed("row_label_group",!0),d=s.network_data.row_nodes_names;c.attr("transform",function(t){var e=_.indexOf(d,t.name);return"translate(0,"+s.viz.y_scale(e)+")"}),c.on("dblclick",function(e){var r="__data__",o=this[r].name;n(t,this,o),s.tile_click_hlight&&a(this,e.ini)}),i(s),c.insert("rect").style("opacity",0),c.append("text").attr("y",.5*s.viz.rect_height+.35*s.labels.default_fs_row).attr("text-anchor","end").style("font-size",s.labels.default_fs_row+"px").text(function(t){return o.normal_name(t)}).attr("pointer-events","none").style("opacity",0).style("cursor","default").transition().delay(r).duration(r).style("opacity",1),c.each(function(){var t=d3.select(this).select("text")[0][0].getBBox();d3.select(this).select("rect").attr("x",t.x).attr("y",0).attr("width",t.width).attr("height",s.viz.y_scale.rangeBand()).style("fill",function(){var t="yellow";return t}).style("opacity",function(t){var e=0;return 1===t.target&&(e=1),e})}),o.has(s.network_data.row_nodes[0],"value")&&c.append("rect").classed("row_bars",!0).attr("width",function(t){var e=0;return e=s.labels.bar_scale_row(Math.abs(t.value))}).attr("x",function(t){var e=0;return e=-s.labels.bar_scale_row(Math.abs(t.value))}).attr("height",s.viz.y_scale.rangeBand()).attr("fill",function(t){return t.value>0?s.matrix.bar_colors[0]:s.matrix.bar_colors[1]}).attr("opacity",.4)}},function(t,e){"use strict";t.exports=function(t,e,r){if(r!=t.click_hlight_row){var o=6,a=.85,n=o*t.viz.border_width.x;d3.selectAll(t.root+" .click_hlight").remove(),d3.select(e).append("rect").classed("click_hlight",!0).classed("row_top_hlight",!0).attr("width",t.viz.svg_dim.width).attr("height",n).attr("fill",t.matrix.hlight_color).attr("opacity",a),d3.select(e).append("rect").classed("click_hlight",!0).classed("row_bottom_hlight",!0).attr("width",t.viz.svg_dim.width).attr("height",n).attr("fill",t.matrix.hlight_color).attr("opacity",a).attr("transform",function(){var e=t.viz.y_scale.rangeBand()-n;return"translate(0,"+e+")"})}else d3.selectAll(t.root+" .click_hlight").remove(),t.click_hlight_row=-666}},function(t,e,r){"use strict";var o=r(53),a=r(54),n=r(36),i=r(65),s=r(27);t.exports=function(t,e,r){var l=t.params,c=i(l);if(1===c.zoom_y&&1===c.zoom_x){l.viz.inst_order.row="custom",a(t,"col"),d3.selectAll(l.root+" .toggle_col_order .btn").classed("active",!1),l.viz.run_trans=!0;var d=$.extend(!0,{},l.matrix.matrix),u=l.network_data.row_nodes,p=l.network_data.col_nodes,v=[];u.forEach(function(t){v.push(t.name)}),r=_.indexOf(v,r),v=[],p.forEach(function(t,e){v.push(d[r].row_data[e].value)});var f=d3.range(v.length).sort(function(t,e){return v[e]-v[t]});l.viz.x_scale.domain(f),l.matrix.orders.custom_row=f;var m;m=l.network_data.links.length>l.matrix.def_large_matrix?d3.select(l.root+" .viz_svg"):d3.select(l.root+" .viz_svg").transition().duration(2500);var h=l.network_data.col_nodes_names;m.select(".col_zoom_container").selectAll(".col_label_text").attr("transform",function(t){var e=_.indexOf(h,t.name);return"translate("+l.viz.x_scale(e)+")rotate(-90)"}),m.selectAll(".col_cat_group").attr("transform",function(t){var e=_.indexOf(h,t.name);return"translate("+l.viz.x_scale(e)+",0)"}),l.viz.ds_level===-1&&(m.selectAll(".tile").attr("transform",function(t){return"translate("+l.viz.x_scale(t.pos_x)+",0)"}),m.selectAll(".tile_up").attr("transform",function(t){return"translate("+l.viz.x_scale(t.pos_x)+",0)"}),m.selectAll(".tile_dn").attr("transform",function(t){return"translate("+l.viz.x_scale(t.pos_x)+",0)"})),d3.selectAll(l.root+" .row_label_group").select("rect").style("opacity",0),d3.select(e).select("rect").style("opacity",1),o(l),l.network_data.links.forEach(function(t){t.x=l.viz.x_scale(t.target),t.y=l.viz.y_scale(t.source)}),l.zoom_info=n(),setTimeout(function(){l.viz.run_trans=!1},2500),l.viz.ds_num_levels>0&&l.viz.ds_level>=0&&s(l)}}},function(t,e){"use strict";t.exports=function(t){var e=6,r=e*t.viz.border_width.x,o=e*t.viz.border_width.y;d3.select(t.root+" .top_hlight").attr("width",t.viz.x_scale.rangeBand()).attr("height",o).transition().duration(2500).attr("transform",function(){return"translate("+t.viz.x_scale(t.matrix.click_hlight_x)+",0)"}),d3.select(t.root+" .left_hlight").attr("width",r).attr("height",t.viz.y_scale.rangeBand()-.99*o).transition().duration(2500).attr("transform",function(){return"translate("+t.viz.x_scale(t.matrix.click_hlight_x)+","+.99*o+")"}),d3.select(t.root+" .right_hlight").attr("width",r).attr("height",t.viz.y_scale.rangeBand()-.99*o).transition().duration(2500).attr("transform",function(){var e=t.viz.x_scale(t.matrix.click_hlight_x)+t.viz.x_scale.rangeBand()-r;return"translate("+e+","+.99*o+")"}),d3.select(t.root+" .bottom_hlight").attr("width",function(){return t.viz.x_scale.rangeBand()-1.98*r}).attr("height",o).transition().duration(2500).attr("transform",function(){var e=t.viz.x_scale(t.matrix.click_hlight_x)+.99*r,a=t.viz.y_scale.rangeBand()-o;return"translate("+e+","+a+")"})}},function(t,e,r){"use strict";var o=r(55);t.exports=function(t,e){var r=arguments.length<=2||void 0===arguments[2]?1500:arguments[2],a=t.params;"row"===e&&"clust"===a.viz.inst_order.col&&setTimeout(o,r,t,"row",!0),"col"===e&&"clust"===a.viz.inst_order.row&&setTimeout(o,r,t,"col",!0),"clust"!=a.viz.inst_order.row&&a.viz.dendro_filter.col===!1&&(d3.selectAll(a.root+" .col_dendro_group").style("opacity",0).on("mouseover",null).on("mouseout",null),d3.select(a.root+" .col_slider_group").style("opacity",0),d3.selectAll(a.root+" .col_dendro_crop_buttons").style("opacity",0).on("mouseover",null).on("mouseout",null)),"clust"!=a.viz.inst_order.col&&a.viz.dendro_filter.row===!1&&(d3.selectAll(a.root+" .row_dendro_group").style("opacity",0).on("mouseover",null).on("mouseout",null).on("click",null),d3.select(a.root+" .row_slider_group").style("opacity",0),d3.selectAll(a.root+" .row_dendro_crop_buttons").style("opacity",0).on("mouseover",null).on("mouseout",null))}},function(t,e,r){"use strict";var o=r(56),a=r(57),n=r(58),i=r(48),s=r(60),l=r(63);t.exports=function(t,e){function r(t,r,o){if(d3.select(t).classed("hovering")){var a=d.viz.root_tips+"_"+e+"_dendro_tip";d3.select(a+" .cat_graph").empty()&&null!==d.viz.cat_info[e]&&l(d,e,r,u[o],a,!0),d3.selectAll(d.viz.root_tips+"_"+e+"_dendro_tip").style("opacity",1)}}var c=!(arguments.length<=2||void 0===arguments[2])&&arguments[2],d=t.params;"both"===e&&(e="row");var _;_="row"===e?"col":"row","clust"===d.viz.inst_order[_]&&d3.select(d.root+" ."+e+"_slider_group").style("opacity",1);var u;u="row"===e?o(d):a(d),d3.select(t.params.root+" ."+e+"_dendro_crop_buttons").empty()===!1&&s(t,e);var p=d.viz.dendro_opacity,v=500;d3.selectAll(t.params.viz.root_tips+"_"+e+"_dendro_tip").remove();var f;d3.selectAll(d.root+" ."+e+"_dendro_group").empty()?f=!1:(f=!0,d3.selectAll(d.root+" ."+e+"_dendro_group").remove());var m=0,h=-5,g=i().attr("class",function(){var t=d.viz.root_tips.replace(".",""),r=t+" d3-tip "+t+"_"+e+"_dendro_tip";return r}).direction("nw").offset([m,h]).style("display","none").style("opacity",0);g.html(function(){var t='
Click for cluster information
and additional options.';return t}),c&&(f=!1);var w,y,x,b,z,k,A=d3.select(d.root+" ."+e+"_dendro_container").selectAll("path").data(u,function(t){return t.name}).enter().append("path").style("opacity",0).attr("class",e+"_dendro_group").style("fill","black");A.attr("d",function(t){"row"===e?(w=0,y=t.pos_top,x=30,b=t.pos_mid,z=0,k=t.pos_bot):(w=t.pos_top,y=0,x=t.pos_mid,b=30,z=t.pos_bot,k=0);var r="M"+w+","+y+", L"+x+", "+b+", L"+z+","+k+" Z";return r}),A.on("mouseover",function(o,a){d3.select(this).classed("hovering",!0),null!=t.params.dendro_callback&&t.params.dendro_callback(this),d3.select(d.viz.root_tips+"_"+e+"_dendro_tip").style("display","block"),n(d,this,o,e),g.show(o),d3.select(d.viz.root_tips+"_"+e+"_dendro_tip").style("opacity",0),setTimeout(r,v,this,o,a)}).on("mouseout",function(){"clust"===d.viz.inst_order[_]&&d3.select(this).style("opacity",p),d3.selectAll(d.root+" .dendro_shadow").remove(),d3.select(this).classed("hovering",!1),g.hide(this)}).on("click",function(r,o){$(d.root+" .dendro_info").modal("toggle");var a=r.all_names.join(", ");d3.select(d.root+" .dendro_info input").attr("value",a);var n=d.root+" .dendro_info";d3.selectAll(".dendro_info .cluster_info_container .cat_graph").remove(),null!==d.viz.cat_info[e]&&l(d,e,r,u[o],n),null!=t.params.dendro_click_callback&&t.params.dendro_click_callback(this)}).call(g);var T;T="clust"===d.viz.inst_order[_]?p:0,f?d3.select(d.root+" ."+e+"_dendro_container").selectAll("path").transition().delay(1e3).duration(1e3).style("opacity",T):d3.select(d.root+" ."+e+"_dendro_container").selectAll("path").style("opacity",T)}},function(t,e){"use strict";t.exports=function(t){var e={},r=t.group_level.row,o=t.network_data.row_nodes,a=t.network_data.row_nodes_names;_.each(o,function(o){var n=o.group[r],i=_.indexOf(a,o.name),s=t.viz.y_scale(i),l=s+t.viz.y_scale.rangeBand();_.has(e,n)===!1&&(e[n]={},e[n].name_top=o.name,e[n].name_bot=o.name,e[n].pos_top=s,e[n].pos_bot=l,e[n].pos_mid=(s+l)/2,e[n].name=n,e[n].all_names=[],e[n].inst_rc="row"),e[n].all_names.push(o.name),se[n].pos_bot&&(e[n].name_bot=o.name,e[n].pos_bot=l,e[n].pos_mid=(e[n].pos_top+l)/2)});var n=[];return _.each(e,function(t){n.push(t)}),n}},function(t,e){"use strict";t.exports=function(t){var e={},r=t.group_level.col,o=t.network_data.col_nodes,a=t.network_data.col_nodes_names;_.each(o,function(o){var n=o.group[r],i=_.indexOf(a,o.name),s=t.viz.x_scale(i),l=s+t.viz.x_scale.rangeBand();_.has(e,n)===!1&&(e[n]={},e[n].name_top=o.name,e[n].name_bot=o.name,e[n].pos_top=s,e[n].pos_bot=l,e[n].pos_mid=(s+l)/2,e[n].name=n,e[n].all_names=[],e[n].inst_rc="col"),e[n].all_names.push(o.name),se[n].pos_bot&&(e[n].name_bot=o.name,e[n].pos_bot=l,e[n].pos_mid=(e[n].pos_top+l)/2)});var n=[];return _.each(e,function(t){n.push(t)}),n}},function(t,e,r){"use strict";var o=r(59);t.exports=function(t,e,r,a){function n(){d3.select(e).classed("hovering")&&t.is_slider_drag===!1&&(d3.select(e).style("opacity",.7),d3.select(t.viz.viz_svg).classed("running_update")===!1&&i())}function i(){"row"===a?"clust"===t.viz.inst_order.col&&o(t,e,a,r):"col"===a?"clust"===t.viz.inst_order.row&&o(t,e,a,r):"both"===a&&("clust"===t.viz.inst_order.col&&o(t,e,"row",r),"clust"===t.viz.inst_order.row&&o(t,e,"col",r))}d3.selectAll(t.root+" ."+a+"_dendro_crop_buttons")[0].length>1?setTimeout(n,500):d3.selectAll(t.root+" .dendro_shadow").remove()}},function(t,e){"use strict";t.exports=function(t,e,r,o){var a,n=.2;d3.selectAll(t.root+" .dendro_shadow").remove(),"row"==r?(d3.select(t.root+" .clust_group").append("rect").style("width",t.viz.clust.dim.width+"px").style("height",o.pos_top+"px").style("fill","black").classed("dendro_shadow",!0).style("opacity",n),a=t.viz.clust.dim.height-o.pos_bot,d3.select(t.root+" .clust_group").append("rect").style("width",t.viz.clust.dim.width+"px").style("height",a+"px").attr("transform","translate(0,"+o.pos_bot+")").style("fill","black").classed("dendro_shadow",!0).style("opacity",n)):"col"===r&&(d3.select(t.root+" .clust_group").append("rect").style("width",o.pos_top+"px").style("height",t.viz.clust.dim.height+"px").style("fill","black").classed("dendro_shadow",!0).style("opacity",n),a=t.viz.clust.dim.width-o.pos_bot,d3.select(t.root+" .clust_group").append("rect").style("width",a+"px").style("height",t.viz.clust.dim.height+"px").attr("transform","translate("+o.pos_bot+",0)").style("fill","black").classed("dendro_shadow",!0).style("opacity",n))}},function(t,e,r){"use strict";var o=r(56),a=r(57),n=r(48),i=r(58),s=r(61),l=r(62);t.exports=function(t,e){function r(t){d3.select(t).classed("hovering")&&d3.selectAll(_.viz.root_tips+"_"+e+"_dendro_crop_tip").style("opacity",1).style("display","block")}var c,d,_=t.params,u=.6*_.viz.dendro_opacity;"row"===e?(c=o(_),d="col"):(c=a(_),d="row");var p=5,v=-5,f=n().attr("class",function(){var t=_.viz.root_tips.replace(".",""),r=t+" d3-tip "+t+"_"+e+"_dendro_crop_tip";return r}).direction("nw").style("display","none").offset([p,v]),m=500;d3.selectAll(_.viz.root_tips+"_"+e+"_dendro_crop_tip").remove(),d3.selectAll(_.root+" ."+e+"_dendro_crop_buttons").remove();var h,g,w,y,x,b,z,k,A,T,E=45,S=.25,B=e+"_dendro_crop_buttons";d3.select(t.params.root+" ."+e+"_dendro_icons_group").classed("ran_filter")===!1?(h=d3.select(_.root+" ."+e+"_dendro_icons_group").selectAll("path").data(c,function(t){return t.name}).enter().append("path").classed(B,!0).attr("d",function(t){k=10,A=10;var r=t.pos_bot-t.pos_top;"row"===e?(r0){var l=d3.select(n+" .cluster_info_container"),c=": ",d="

",u=225,p=23,v=20,f=15,m=135,h=27,g=3,w=20,y=20;_.each(s.slice(0,g),function(t){var e=t.bar_data.length;e>w&&(e=w),y+=h*(e+1)}),i&&l.append("text").text("Cluster Information");var x=l.append("div").style("margin-top","5px").classed("cat_graph",!0).append("svg").style("height",y+"px").style("width",u+"px");x.append("rect").classed("cat_background",!0).style("height",y+"px").style("width",u+"px").style("fill","white").style("opacity",1);var b=h;if(s=s.slice(0,g),_.each(s,function(e){e.bar_data=e.bar_data.slice(0,w),l.style("margin-bottom","5px");var r=x.append("g").classed("cat_graph_group",!0).attr("transform","translate(10, "+b+")");b+=h*(e.bar_data.length+1);var o=e.type_name;o.length>=f&&(o=o.slice(0,f)+".."),r.append("text").classed("cat_graph_title",!0).text(o).style("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').style("font-weight",800);var a=15;r.append("text").text("Count").attr("transform",function(){var t=m+a,e="translate("+t+", 0)";return e});var n=4;r.append("line").attr("x1",0).attr("x2",m).attr("y1",n).attr("y2",n).style("stroke","blue").style("stroke-width",1).style("opacity",1);var i=r.append("g").classed("cat_bar_container",!0).attr("transform","translate(0, 10)"),s=i.selectAll("g").data(e.bar_data).enter().append("g").attr("transform",function(t,e){var r=e*p;return"translate(0,"+r+")"}),_=d3.scale.linear().domain([0,e.bar_data[0][2]]).range([0,m]);s.append("rect").style("height",v+"px").style("width",function(t){var e=_(t[2]);return e+"px"}).style("fill",function(t){return t[3]}).style("opacity",t.viz.cat_colors.opacity).style("stroke","grey").style("stroke-width","0.5px"),s.append("text").classed("bar_labels",!0).text(function(t){var e=t[1];return e.indexOf(c)>0&&(e=e.split(c)[1]),e.indexOf(d)>0&&(e=e.split(d)[0]),e.length>=f&&(e=e.slice(0,f)+".."),e}).attr("transform",function(){return"translate(5, "+.75*v+")"}).style("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').style("font-weight",400);var u=25;s.append("text").classed("count_labels",!0).text(function(t){return String(t[4])}).attr("transform",function(){var t=m+a+u,e=.75*v;return"translate("+t+", "+e+")"}).style("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').style("font-weight",400).style("text-anchor","end")}),i){var z=d3.select(n),k=z.style("top").split(".px")[0],A=z.style("left").split(".px")[0],T=0,E=0;"row"===e?(T=0,E=32,a.pos_top=0&&n.push(t)});var s=[];if(null!==t.viz.cat_info[r]){for(var l,c,d,u=t.viz.cat_info[r],p=_.keys(u),v=[],f=[],m=0;m0){var z,k=a.length;_.each(v,function(e){if(c=e.split("-")[1],l=f[c],g)if(e.indexOf("-")>=0){var o=parseInt(e.split("-")[1],b)+1;l="Category "+String(o)}else l="Category";w[l]={},_.each(n,function(t){z=t[e],z.indexOf(": ")>=0&&(z=z.split(": ")[1]),z in w[l]?w[l][z]=w[l][z]+1:w[l][z]=1}),y={},y.type_name=l,y.num_in_clust=k,h=[];var a,i,d=w[l];for(var u in d){i=g?u:l+": "+u;var p=d[u];a=t.viz.cat_colors[r][e][i],h.push([e,i,d[u],a,p])}h.sort(function(t,e){return e[x]-t[x]}),y.bar_data=h,s.push(y)})}}return s}},function(t,e){"use strict";t.exports=function(t){var e={},r=d3.select(t.root+" .clust_group").attr("transform");return null!=r&&r.indexOf("scale")>0?(e.zoom_x=parseFloat(r.split("scale")[1].replace("(","").replace(")","").split(",")[0]),e.zoom_y=parseFloat(r.split("scale")[1].replace("(","").replace(")","").split(",")[1])):(e.zoom_x=1,e.zoom_y=1),e}},function(t,e,r){"use strict";var o=r(48);t.exports=function(t){if(t.labels.show_label_tooltips){d3.selectAll(t.viz.root_tips+"_row_tip").remove();var e=t.viz.root_tips.replace(".",""),r=o().attr("class",function(){var t=e+" d3-tip "+e+"_row_tip";return t}).direction("e").offset([0,10]).style("display","none").html(function(t){var e=t.name.replace(/_/g," ").split("#")[0];return""+e+""});d3.select(t.viz.viz_wrapper).select(t.root+" .row_container").call(r),d3.select(t.root+" .row_label_zoom_container").selectAll("g").on("mouseover",function(e){d3.select(t.viz.root_tips+"_row_tip").classed(e.name,!0),d3.selectAll(t.viz.root_tips+"_row_tip").style("display","block"),d3.select(this).select("text").classed("active",!0),r.show(e),null!=t.row_tip_callback&&t.row_tip_callback(t.viz.root_tips,e)}).on("mouseout",function(e){d3.selectAll(t.viz.root_tips+"_row_tip").style("display","none").classed(e.name,!1),d3.select(this).select("text").classed("active",!1),r.hide(e)})}else d3.select(t.root+" .row_label_zoom_container").selectAll("g").on("mouseover",function(){d3.select(this).select("text").classed("active",!0)}).on("mouseout",function(){d3.select(this).select("text").classed("active",!1)})}},function(t,e,r){"use strict";var o=r(2),a=r(68),n=r(69),i=r(52),s=r(73),l=r(74);t.exports=function(t){var e,r=arguments.length<=1||void 0===arguments[1]?0:arguments[1],c=t.params,d=c.network_data.col_nodes,_=c.viz.x_scale.rangeBand()/2+c.viz.border_width.x;d3.select(c.root+" .col_container").empty()?(e=d3.select(c.viz.viz_svg).append("g").attr("class","col_container").attr("transform","translate("+c.viz.clust.margin.left+","+c.viz.norm_labels.margin.top+")"),e.append("rect").attr("fill",c.viz.background_color).attr("width",30*c.viz.clust.dim.width+"px").attr("height",c.viz.label_background.col).attr("class","white_bars"),e.append("g").attr("class","col_label_outer_container").attr("transform","translate(0,"+c.viz.norm_labels.width.col+")").append("g").attr("class","col_zoom_container")):(e=d3.select(c.root+" .col_container").attr("transform","translate("+c.viz.clust.margin.left+","+c.viz.norm_labels.margin.top+")"),e.select(".white_bars").attr("fill",c.viz.background_color).attr("width",30*c.viz.clust.dim.width+"px").attr("height",c.viz.label_background.col),e.select(c.root+" .col_label_outer_container"));var u=d3.select(c.root+" .col_zoom_container").selectAll(".col_label_text").data(d,function(t){return t.name}).enter().append("g").attr("class","col_label_text").attr("transform",function(t){var e=t.col_index;return"translate("+c.viz.x_scale(e)+", 0) rotate(-90)"}),p=u.append("g").attr("class","col_label_group").attr("transform","translate("+c.viz.x_scale.rangeBand()/2+","+_+") rotate(45)").on("mouseover",function(){d3.select(this).select("text").classed("active",!0)}).on("mouseout",function(){d3.select(this).select("text").classed("active",!1)});o.has(c.network_data.col_nodes[0],"value")&&p.append("rect").attr("class","col_bars").attr("width",function(t){var e=0;return t.value>0&&(e=c.labels.bar_scale_col(t.value)),e}).attr("height",.66*c.viz.x_scale.rangeBand()).style("fill",function(t){return t.value>0?c.matrix.bar_colors[0]:c.matrix.bar_colors[1]; -}).attr("opacity",.6),p.append("text").attr("x",0).attr("y",.64*c.viz.x_scale.rangeBand()).attr("dx",c.viz.border_width.x).attr("text-anchor","start").attr("full_name",function(t){return t.name}).style("font-size",c.labels.default_fs_col+"px").style("cursor","default").text(function(t){return o.normal_name(t)}).style("opacity",0).transition().delay(r).duration(r).style("opacity",1),s(c),p.append("path").style("stroke-width",0).attr("d",function(){return l(c)}).attr("fill","#eee").style("opacity",0).transition().delay(r).duration(r).style("opacity",c.viz.triangle_opacity),d3.selectAll(c.root+" .col_label_text").on("click",function(t){"function"==typeof c.click_label?(c.click_label(t.name,"col"),a(c,this,t.ini)):c.tile_click_hlight&&a(c,this,t.ini)}).on("dblclick",function(e){var r="__data__",o=this[r].name;if(c.sim_mat){n(t,this,o);var s=d3.selectAll(c.root+" .row_label_group").filter(function(t){return t.name==o})[0][0];i(t,s,o)}else n(t,this,o);c.tile_click_hlight&&a(c,this,e.ini)})}},function(t,e){"use strict";t.exports=function(t,e,r){if(r!=t.click_hlight_col){t.click_hlight_col=r;var o=6,a=.85,n=o*t.viz.border_width.x;d3.selectAll(t.root+" .click_hlight").remove(),d3.select(e).append("rect").classed("click_hlight",!0).classed("col_top_hlight",!0).attr("width",t.viz.clust.dim.height).attr("height",n).attr("fill",t.matrix.hlight_color).attr("opacity",a).attr("transform",function(){var e=0,r=-(t.viz.clust.dim.height+t.viz.cat_room.col+t.viz.uni_margin);return"translate("+r+","+e+")"}),d3.select(e).append("rect").classed("click_hlight",!0).classed("col_bottom_hlight",!0).attr("width",t.viz.clust.dim.height).attr("height",n).attr("fill",t.matrix.hlight_color).attr("opacity",a).attr("transform",function(){var e=t.viz.x_scale.rangeBand()-n,r=-(t.viz.clust.dim.height+t.viz.cat_room.col+t.viz.uni_margin);return"translate("+r+","+e+")"})}else d3.selectAll(t.root+" .click_hlight").remove(),t.click_hlight_col=-666}},function(t,e,r){"use strict";var o=r(53),a=r(54),n=r(70),i=r(36),s=r(65),l=r(27);t.exports=function(t,e,r){var c=t.params,d=s(c);if(1===d.zoom_y&&1===d.zoom_x){c.viz.inst_order.col="custom",a(t,"col"),d3.selectAll(c.root+" .toggle_row_order .btn").classed("active",!1),c.viz.run_trans=!0;var u=$.extend(!0,{},c.matrix.matrix),p=c.network_data.row_nodes,v=c.network_data.col_nodes,f=[];v.forEach(function(t){f.push(t.name)});var m=_.indexOf(f,r);f=[],p.forEach(function(t,e){f.push(u[e].row_data[m].value)});var h=d3.range(f.length).sort(function(t,e){return f[e]-f[t]});c.viz.y_scale.domain(h),c.matrix.orders.custom_col=h;var g,w=c.network_data.row_nodes_names;if(g=c.network_data.links.length>c.matrix.def_large_matrix?d3.select(c.root+" .viz_svg"):d3.select(c.root+" .viz_svg").transition().duration(2500),g.selectAll(".row_cat_group").attr("transform",function(t){var e=_.indexOf(w,t.name);return"translate(0,"+c.viz.y_scale(e)+")"}),g.select(".row_label_zoom_container").selectAll(".row_label_group").attr("transform",function(t){var e=_.indexOf(w,t.name);return"translate(0,"+c.viz.y_scale(e)+")"}),c.viz.ds_level===-1&&g.selectAll(".row").attr("transform",function(t){var e=_.indexOf(w,t.name);return"translate(0,"+c.viz.y_scale(e)+")"}),d3.selectAll(c.root+" .col_label_text").select(".highlight_rect").style("opacity",0),d3.select(e).select(".highlight_rect").style("opacity",1),c.network_data.links.forEach(function(t){t.x=c.viz.x_scale(t.target),t.y=c.viz.y_scale(t.source)}),o(c),c.zoom_info=i(),setTimeout(function(){c.viz.run_trans=!1},2500),c.viz.ds_num_levels>0&&c.viz.ds_level>=0){l(c);var y=!0,x=!0,b=!0;n(t,y,x,b)}}}},function(t,e,r){"use strict";var o=r(71),a=r(41),n=r(50),i=r(72);t.exports=function(t){var e=!(arguments.length<=1||void 0===arguments[1])&&arguments[1],r=!(arguments.length<=2||void 0===arguments[2])&&arguments[2],s=!(arguments.length<=3||void 0===arguments[3])&&arguments[3],l=t.params,c=l.zoom_info,d=l.viz.ds_level,u=l.viz.ds_level;null===l.viz.ds?d=-1:(d=Math.floor(Math.log(c.zoom_y)/Math.log(l.viz.ds_zt)),d>l.viz.ds_num_levels-1&&(d=-1));var p=!1;u==-1?d>=0&&(p=!0):d=0&&(d3.selectAll(l.root+" .row").remove(),d3.selectAll(l.viz.root_tips+"_tile_tip").remove(),d3.selectAll(l.viz.root_tips+"_row_tip").remove());var w;if(v<0?(w=l.matrix.matrix,i(l)):(w=l.matrix.ds_matrix[v],d3.selectAll(l.root+" .row_cat_group path").remove()),r===!0&&d3.selectAll(l.root+" .row_cat_group path").remove(),e===!0&&(v>=0?d3.selectAll(l.root+" .ds"+String(v)+"_row").each(function(t){_.contains(l.viz.viz_nodes.row,t.name)===!1&&d3.select(this).remove()}):d3.selectAll(l.root+" .row").each(function(t){_.contains(l.viz.viz_nodes.row,t.name)===!1&&d3.select(this).remove()}),d3.selectAll(l.root+" .row_label_group").each(function(t){_.contains(l.viz.viz_nodes.row,t.name)===!1&&d3.select(this).remove()}),v!=u&&(h=l.viz.viz_nodes.row,d3.selectAll(l.root+" .ds"+String(u)+"_row").remove())),(h.length>=1||"all"===h)&&a(l,w,h,v),v===-1&&(r===!1||e)){var y=[];d3.selectAll(l.root+" .row_label_group").each(function(t){y.push(t.name)});var x=_.difference(l.viz.viz_nodes.row,y),b=1;x.length>b&&n(t,x)}}},function(t,e){"use strict";t.exports=function(t,e){var r,o=[],a=[],n=t.viz.y_scale,i=t.viz.ds_level,s=t.network_data.row_nodes_names,l=".row";i>=0&&(n=t.viz.ds[i].y_scale,s=d3.range(t.matrix.ds_matrix[i].length).map(String),l=".ds"+String(i)+"_row");for(var c=0;ce.min_y&&o.push(s[c]);d3.selectAll(t.root+" "+l).each(function(t){a.push(t.name)}),t.viz.viz_nodes.row=o,t.viz.viz_nodes.curr_row=a}},function(t,e){"use strict";t.exports=function(t){d3.select(t.root+" .row_cat_group path").empty()===!0&&d3.selectAll(t.root+" .row_cat_group").append("path").attr("d",function(){var e=t.viz.cat_room.symbol_width-1,r=0,o=1,a=t.viz.y_scale.rangeBand()/2,n=t.viz.cat_room.symbol_width-1,i=t.viz.y_scale.rangeBand(),s="M "+e+","+r+" L "+o+","+a+", L "+n+","+i+" Z";return s}).attr("fill","#eee").style("opacity",t.viz.triangle_opacity)}},function(t,e,r){"use strict";var o=r(48);t.exports=function(t){if(t.labels.show_label_tooltips){d3.selectAll(t.viz.root_tips+"_col_tip").remove();var e=o().attr("class",function(){var e=t.viz.root_tips.replace(".",""),r=e+" d3-tip "+e+"_col_tip";return r}).direction("w").offset([20,0]).style("display","none").html(function(t){var e=t.name.replace(/_/g," ").split("#")[0];return""+e+""});d3.select(t.viz.viz_wrapper).select("svg").select(t.root+" .col_zoom_container").selectAll(".col_label_group").select("text").call(e),d3.select(t.root+" .col_zoom_container").selectAll(".col_label_group").on("mouseover",function(r){d3.selectAll(t.viz.root_tips+"_col_tip").style("display","block"),e.show(r),null!=t.col_tip_callback&&t.col_tip_callback(r)}).on("mouseout",function(){e.hide(this),d3.selectAll(t.viz.root_tips+"_col_tip").style("display","none")})}}},function(t,e){"use strict";t.exports=function(t){var e=.36*t.viz.x_scale.rangeBand(),r=-t.viz.border_width.x,o=0,a=t.viz.x_scale.rangeBand()-e,n=-(t.viz.x_scale.rangeBand()-e+t.viz.border_width.x),i=-t.viz.border_width.x,s="M "+r+",0 L "+n+","+o+", L "+i+","+a+" Z";return s}},function(t,e){"use strict";t.exports=function(t){d3.select(t.viz.viz_svg).append("rect").attr("fill",t.viz.background_color).attr("height",t.viz.super_labels.dim.width+"px").attr("width","3000px").classed("super_col_bkg",!0).classed("white_bars",!0).attr("transform","translate("+t.viz.clust.margin.left+","+t.viz.super_labels.margin.top+")"),d3.select(t.viz.viz_svg).append("text").attr("class","super_col").text(t.labels["super"].col).attr("text-anchor","center").attr("transform",function(){var e=d3.select(this)[0][0].getBBox().width,r=t.viz.clust.dim.width/2+t.viz.norm_labels.width.row-e/2,o=t.viz.super_labels.dim.width;return"translate("+r+","+o+")"}).style("font-size",function(){var e=t.labels.super_label_fs*t.labels.super_label_scale;return e+"px"}).style("font-weight",300),d3.select(t.viz.viz_svg).append("rect").attr("fill",t.viz.background_color).attr("width",t.viz.super_labels.dim.width+"px").attr("height","3000px").classed("super_row_bkg",!0).classed("white_bars",!0).attr("transform","translate("+t.viz.super_labels.margin.left+",0)"),d3.select(t.viz.viz_svg).append("g").classed("super_row",!0).attr("transform",function(){var e=t.viz.super_labels.dim.width,r=t.viz.clust.dim.height/2+t.viz.norm_labels.width.col;return"translate("+e+","+r+")"}),d3.select(t.root+" .super_row").append("text").text(t.labels["super"].row).attr("text-anchor","center").attr("transform",function(){var e=d3.select(this)[0][0].getBBox().width,r=e/2+t.viz.norm_labels.width.col,o="translate(0,"+r+"), rotate(-90)";return o}).style("font-size",function(){var e=t.labels.super_label_fs*t.labels.super_label_scale;return e+"px"}).style("font-weight",300)}},function(t,e,r){"use strict";var o=r(77),a=r(78),n=r(86),i=r(60);t.exports=function(t){var e=t.params,r=e.viz;d3.select(r.root+" .col_container").append("path").style("stroke-width","0").attr("d","M 0,0 L 1000,-1000, L 1000,0 Z").attr("fill",r.background_color).attr("class","right_slant_triangle").attr("transform","translate("+r.clust.dim.width+","+r.norm_labels.width.col+")"),d3.select(r.root+" .col_container").append("path").style("stroke-width","0").attr("d","M 0,0 L 500,-500, L 0,-500 Z").attr("fill",r.background_color).attr("class","left_slant_triangle").attr("transform","translate(-1,"+r.norm_labels.width.col+")");var s=r.clust.margin.top+r.uni_margin/5;d3.select(r.viz_svg).append("rect").attr("fill",r.background_color).attr("width",r.clust.margin.left).attr("height",s).attr("class","top_left_white");var l=r.cat_room.col+1.5*r.uni_margin;d3.select(r.viz_svg).append("rect").attr("fill",r.background_color).attr("width",2*r.clust.dim.width).attr("height",l).attr("class","top_right_white").attr("transform",function(){var t=r.clust.margin.left+r.clust.dim.width,e=r.norm_labels.width.col+r.norm_labels.margin.top-r.uni_margin;return"translate("+t+", "+e+")"}),p=r.clust.margin.left+r.clust.dim.width+r.uni_margin,v=r.norm_labels.margin.top+r.norm_labels.width.col+2.5*r.uni_margin;var c=1.15*r.cat_room.symbol_width,d=.65,_=1.25;r.show_categories.col&&d3.select(r.viz_svg).selectAll().data(r.all_cats.col).enter().append("text").classed("col_cat_super",!0).style("font-size",c+"px").style("opacity",d).style("cursor","default").attr("transform",function(t){var e=parseInt(t.split("-")[1],10),o=v+_*r.cat_room.symbol_width*e;return"translate("+p+","+o+")"}).text(function(t){return o(r,t,"col")}),n(t),v=r.show_dendrogram?r.clust.margin.top+r.clust.dim.height+r.dendro_room.col-2*r.uni_margin:r.clust.margin.top+r.clust.dim.height;var u=d3.select(r.viz_svg).append("g").classed("bottom_spillover_container",!0).attr("transform",function(){return"translate(0,"+v+")"});u.append("rect").attr("class","bottom_spillover").attr("fill",r.background_color).attr("width",r.svg_dim.width).attr("height",2*r.svg_dim.height),p=r.clust.margin.left,v=0,u.append("g").classed("col_dendro_icons_container",!0).attr("transform","translate("+p+","+v+")").append("g").classed("col_dendro_icons_group",!0),i(t,"col");var p=r.clust.margin.left+r.clust.dim.width,v=r.clust.margin.top+r.clust.dim.height,f=r.cat_room.col+r.clust.dim.width,m=r.cat_room.row+10*r.uni_margin;d3.select(r.viz_svg).append("rect").attr("fill",r.background_color).attr("width",f).attr("height",m).attr("transform",function(){return"translate("+p+","+v+")"}).classed("white_bars",!0).classed("dendro_corner_spillover",!0),p=0,v=r.clust.margin.top+r.clust.dim.height,f=r.clust.margin.left,m=10*r.clust.dim.height,d3.select(r.viz_svg).append("rect").attr("fill",r.background_color).attr("width",f).attr("height",m).attr("transform",function(){return"translate("+p+","+v+")"}).classed("white_bars",!0).classed("dendro_col_spillover",!0),a(t)}},function(t,e){"use strict";t.exports=function(t,e,r){var o;if(t.cat_names[r][e]===e){var a=parseInt(e.split("-")[1],10)+1;o="Category "+a}else o=t.cat_names[r][e];return o}},function(t,e,r){"use strict";var o=r(79);t.exports=function(t){var e=t.params;_.each(["row","col"],function(r){e.viz.show_categories[r]&&d3.selectAll(e.root+" ."+r+"_cat_super").on("dblclick",function(){e.sim_mat&&(r="both"),d3.selectAll(e.root+" .toggle_"+r+"_order .btn").classed("active",!1);var a=this.__data__.replace("-","_")+"_index";e.viz.sim_mat?(o(t,a,"row"),o(t,a,"col")):o(t,a,r)})})}},function(t,e,r){"use strict";var o=r(54),a=r(70),n=r(36),i=r(27),s=r(80),l=r(65);t.exports=function(t,e,r){var c=t.params,d=l(c),u=0;1==d.zoom_y&&1==d.zoom_x||(s(t,0,0,1),u=1200);var p;"row"===r?p="col":"col"===r&&(p="row"),c.viz.run_trans=!0,"row"===p?c.viz.inst_order.row=e:"col"===p&&(c.viz.inst_order.col=e),c.viz.show_dendrogram&&o(t,r),"row"===p?c.viz.x_scale.domain(c.matrix.orders[c.viz.inst_order.row+"_row"]):"col"==p&&c.viz.y_scale.domain(c.matrix.orders[c.viz.inst_order.col+"_col"]);var v;v=d3.selectAll(c.root+" .tile")[0].length0&&c.viz.ds_level>=0){i(c);var h=!0,g=!0,w=!0;a(t,h,g,w)}setTimeout(function(){c.viz.run_trans=!1},2500)}},function(t,e,r){"use strict";var o=r(2),a=r(81),n=r(70),i=r(36),s=r(85);t.exports=function(t,e,r,l){function c(t,e){d3.selectAll(d.root+" ."+t+"_dendro_crop_buttons").transition().duration(g).style("opacity",e)}var d=t.params;if(d3.selectAll(d.viz.root_tips).style("display","none"),d.zoom_info=i(),n(t),!d.viz.run_trans){var u=d.viz.clust.dim.height/2,p=u/l;if(r>=u-p){var v=u-r,f=-u/l+v;r+=f}r<-(u-p)&&(v=u+r,f=u/l-v,r+=f);var m=l,h=1,g=700,w=-(m-1)*u;d3.select(d.root+" .clust_group").transition().duration(g).attr("transform","translate("+[0,0+w]+") scale("+h+","+m+")translate("+[e,r]+")"),d3.select(d.root+" .row_label_zoom_container").transition().duration(g).attr("transform","translate("+[0,w]+") scale("+m+","+m+")translate("+[0,r]+")"),d3.select(d.root+" .row_cat_container").transition().duration(g).attr("transform","translate("+[0,w]+") scale(1,"+m+")translate("+[0,r]+")"),d3.select(d.root+" .row_dendro_container").transition().duration(g).attr("transform","translate("+[0,w]+") scale("+h+","+m+")translate("+[d.viz.uni_margin/2,r]+")");var y;_.each(["row","col"],function(t){y=d3.select(d.root+" ."+t+"_dendro_crop_buttons").style("opacity"),d3.selectAll(d.root+" ."+t+"_dendro_crop_buttons").style("opacity",0),setTimeout(c,700,t,y)}),d3.select(d.root+" .col_zoom_container").transition().duration(g).attr("transform"," scale("+h+","+h+")translate("+[e,0]+")"),d3.select(d.root+" .col_cat_container").transition().duration(g).attr("transform"," scale("+h+",1)translate("+[e,0]+")"),d3.select(d.root+" .col_dendro_container").transition().duration(g).attr("transform"," scale("+h+",1)translate("+[e,d.viz.uni_margin/2]+")");var x=d.viz.clust.margin.top+w+r*m,b=d.viz.clust.margin.left+e;d.zoom_behavior.scale(m).translate([b,x]),a(d),d3.select(d.root+" .row_label_zoom_container text").empty()===!1&&d3.select(d.root+" .row_label_zoom_container").each(function(){var t=d3.select(this).select("text")[0][0].getBBox();d3.select(this).select("rect").attr("x",.5*t.x).attr("y",0).attr("width",.5*t.width).attr("height",d.viz.y_scale.rangeBand()).style("fill","yellow")}),d3.select(d.root+" .row_dendro_icons_group").attr("transform","translate("+[0,0+w]+") scale("+h+","+m+")translate("+[e,r]+")"),d3.select(d.root+" .row_dendro_icons_group").selectAll("path").attr("transform",function(t){var e=d.viz.uni_margin,r=t.pos_mid;return"translate("+e+","+r+") scale(1, "+1/m+")"}),d3.select(d.root+" .col_dendro_icons_group").attr("transform",function(){var t=" scale("+h+","+m+")";return t}),d3.select(d.root+" .col_dendro_icons_group").selectAll("path").attr("transform",function(t){var e=t.pos_mid,r=d.viz.uni_margin;return"translate("+e+","+r+") scale(1,1)"}),o.has(d.network_data.col_nodes[0],"value")&&d3.selectAll(d.root+" .col_bars").attr("width",function(t){var e=0;return t.value>0&&(e=d.labels.bar_scale_col(t.value)/h),e}),o.has(d.network_data.row_nodes[0],"value")&&d3.selectAll(d.root+" .row_bars").transition().duration(g).attr("width",function(t){var e=0;return e=d.labels.bar_scale_row(Math.abs(t.value))/m}).attr("x",function(t){var e=0;return e=-d.labels.bar_scale_row(Math.abs(t.value))/m}),s(d)}}},function(t,e,r){"use strict";var o=r(2),a=r(82),n=r(83);t.exports=function(t){d3.selectAll(t.root+" .row_label_group").select("text").text(function(t){return o.normal_name(t)}),d3.selectAll(t.root+" .col_label_text").select("text").text(function(t){return o.normal_name(t)}),n(t),d3.selectAll(t.root+" .row_label_group").each(function(){a(t,this,"row")}),d3.selectAll(t.root+" .col_label_group").each(function(){a(t,this,"col")})}},function(t,e){"use strict";t.exports=function(t,e,r){function o(){return d=d3.select(this).text(),c=d.length,u=c-3,l=d.substring(0,u)+".."}function a(t){return d=d3.select(this).text(),c=".."===d.slice(-2)?d.length-2:d.length,_=t.name,u=c+2,l=_.substring(0,u)+"..",l.length>_.length&&(l=_),l}function n(t,e){return s=e<1?t:t*e}if("none"!=d3.select(e).style("display")){var i,s,l,c,d,_,u,p,v=t.viz.norm_labels.width[r];i="row"===r?t.viz.zoom_ratio.y?t.zoom_behavior.scale()/t.viz.zoom_ratio.y:t.zoom_behavior.scale():t.viz.zoom_ratio.x>1?t.zoom_behavior.scale()/t.viz.zoom_ratio.x:t.zoom_behavior.scale();var f;d3.select(e).select("text").each(function(t){f=t.name.length});var m=d3.select(e).select("text").node().getBBox().width;if(s=n(m,i),s>v)for(p=1;pv&&(d3.select(e).select("text").text(o),m=d3.select(e).select("text").node().getBBox().width,s=n(m,i));else if(s<.75*v)for(p=1;pa&&(n.row>t.labels.max_allow_fs?(e=t.viz.zoom_ratio.y?t.zoom_behavior.scale()/t.viz.zoom_ratio.y:t.zoom_behavior.scale(),e<1&&(e=1),r=t.labels.max_allow_fs/e,d3.selectAll(t.root+" .row_label_group").select("text").style("font-size",r+"px").attr("y",.5*t.viz.rect_height+.35*r)):d3.selectAll(t.root+" .row_label_group").select("text").style("font-size",t.labels.default_fs_row+"px").attr("y",.5*t.viz.rect_height+.35*t.labels.default_fs_row)),n.col>a&&(n.col>t.labels.max_allow_fs?(e=t.viz.zoom_ratio.x>1?t.zoom_behavior.scale()/t.viz.zoom_ratio.x:t.zoom_behavior.scale(),e<1&&(e=1),r=t.labels.max_allow_fs/e,r>.7*t.viz.rect_width&&(r=.7*t.viz.rect_width),d3.selectAll(t.root+" .col_label_text").select("text").style("font-size",r+"px")):d3.selectAll(t.root+" .col_label_text").select("text").style("font-size",t.labels.default_fs_col+"px"))}},function(t,e){"use strict";t.exports=function(t){var e={};return t.viz.zoom_ratio.x>1?(e.row=t.labels.default_fs_row*t.zoom_behavior.scale(),e.col=t.labels.default_fs_col*t.zoom_behavior.scale()):(e.row=t.labels.default_fs_row*t.zoom_behavior.scale()/t.viz.zoom_ratio.y,e.col=t.labels.default_fs_col*t.zoom_behavior.scale()),e}},function(t,e){"use strict";t.exports=function(t){t.zoom_info.zoom_x*t.viz.border_width.x>1?d3.selectAll(t.root+" .vert_lines").select("line").style("display","block").style("opacity",0).transition().style("opacity",1):d3.selectAll(t.root+" .vert_lines").select("line").style("display","none"),t.zoom_info.zoom_y*t.viz.border_width.y>1?d3.selectAll(t.root+" .horz_lines").select("line").style("display","block").style("opacity",0).transition().style("opacity",1):d3.selectAll(t.root+" .horz_lines").select("line").style("display","none")}},function(t,e,r){"use strict";var o=r(77),a=r(48);t.exports=function(t){var e=t.params,r=e.viz,n=2.75;d3.select(e.root+" .row_cat_label_container").empty()&&(d3.select(t.params.viz.viz_svg).append("g").classed("row_cat_label_container",!0),d3.select(t.params.viz.viz_svg+" .row_cat_label_container").append("g").classed("row_cat_label_bar_container",!0));var i=r.clust.margin.left+r.clust.dim.width+r.uni_margin,s=r.norm_labels.margin.top+r.norm_labels.width.col+2.5*r.uni_margin,l=1.15*r.cat_room.symbol_width,c=.65,d=1.25;d3.select(e.root+" .row_cat_label_container").attr("transform",function(){return i=r.norm_labels.margin.left+r.norm_labels.width.row+r.cat_room.symbol_width+n*r.uni_margin,s=r.clust.margin.top-r.uni_margin,"translate("+i+","+s+") rotate(-90)"}),d3.selectAll(e.root+" .row_cat_label_container text").remove(),d3.selectAll(e.root+" .row_cat_selection_bar").remove(),d3.selectAll(t.params.viz.root_tips+"_row_cat_super").remove();var u=50,p=-75,v=a().attr("class",function(){var t=e.viz.root_tips.replace(".",""),r=t+" d3-tip "+t+"_row_cat_super";return r}).direction("south_custom").offset([u,p]).style("display","none").style("opacity",0).html(function(t){var a,n=e.network_data.row_nodes[0][t];if(n.indexOf("

")>-1){var i=n.split(": ")[0],s=n.split("

")[1];a=i+"

"+s}else a=o(r,t,"row");return a}),f=d*r.cat_room.symbol_width,m=.9*f;if(d3.select(e.root+" .row_cat_label_container").selectAll().data(r.all_cats.row).enter().append("text").style("width","100px").style("height",m+"px").classed("row_cat_super",!0).style("font-size",l+"px").style("opacity",c).style("cursor","default").attr("transform",function(t){var e=d*r.cat_room.symbol_width*parseInt(t.split("-")[1],10);return"translate(0,"+e+")"}).text(function(t){return o(r,t,"row")}),d3.select(e.root+" .row_cat_label_container").selectAll().data(r.all_cats.row).enter().append("rect").classed("row_cat_super",!0).classed("row_cat_selection_bar",!0).style("height",m+"px").style("fill","green").style("width","120px").style("opacity",0).attr("transform",function(t){var e=f*(parseInt(t.split("-")[1],10)-.75);return"translate(0,"+e+")"}).on("mouseover",function(t){d3.selectAll(e.viz.root_tips+"_row_cat_super").style("display","block").style("opacity",1),v.show(t)}).on("mouseout",function(){v.hide(this),d3.selectAll(".d3-tip").style("display","none"),d3.selectAll(e.viz.root_tips+"_row_cat_super").style("display","none").style("opacity",0)}),d3.select(e.root+" .row_cat_selection_bar").empty()===!1&&d3.selectAll(e.root+" .row_cat_selection_bar").call(v),_.has(e.network_data,"row_cat_bars")){d3.select(e.root+" .enr_title").remove();var h=d3.select(e.root+" .viz_svg").append("g").classed("enr_title",!0).attr("transform",function(){var t=d3.select(e.root+" .row_cat_label_container").attr("transform").split("(")[1].split(")")[0],r=Number(t.split(",")[0])-10;return"translate("+String(r)+", 0)"});h.append("rect").attr("width",e.viz.cat_room.row).attr("height",25).attr("fill","white");var g=e.network_data.enrichrgram_lib.substring(0,40);h.append("text").attr("transform","translate(0, 17)").text(g.replace(/_/g," ")).style("font-size","15px").attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif'),d3.selectAll(e.root+" .enrichr_bars").remove();var w=e.viz.clust.margin.top-35,y=e.network_data.row_cat_bars[0],x=d3.scale.linear().domain([0,y]).range([0,w]);d3.select(e.root+" .row_cat_label_bar_container").selectAll().data(e.network_data.row_cat_bars).enter().append("rect").classed("enrichr_bars",!0).attr("height",m+"px").attr("fill","red").attr("width",function(t){var e=x(t);return e+"px"}).attr("opacity",.4).attr("transform",function(t,e){var r=f*(e-.75);return"translate(0, "+r+")"})}}},function(t,e,r){"use strict";var o=r(88);t.exports=function(t){var e,r=t.params;d3.select(r.root+" .expand_button").on("click",null);var a=.4;e=d3.select(r.root+" .expand_button").empty()?d3.select(r.viz.viz_svg).append("text").attr("class","expand_button"):d3.select(r.root+" .expand_button"),e.attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-family","FontAwesome").attr("font-size","30px").text(function(){return r.viz.is_expand===!1?"":""}).attr("y","25px").attr("x","25px").style("cursor","pointer").style("opacity",a).on("mouseover",function(){d3.select(this).style("opacity",.75)}).on("mouseout",function(){d3.select(this).style("opacity",a)}).on("click",function(){r.viz.is_expand===!1?(d3.select(this).text(function(){return""}),r.viz.is_expand=!0,d3.selectAll(r.root+" .borders").style("fill","white"),d3.select(r.root+" .sidebar_wrapper").style("display","none")):(d3.select(this).text(function(){return""}),r.viz.is_expand=!1,d3.selectAll(r.root+" .borders").style("fill","#eee"),d3.select(r.root+" .viz_wrapper").style("width","100px"),d3.select(r.root+" .sidebar_wrapper").style("display","block")),d3.select(r.viz.viz_svg).style("opacity",.5);var e=500;1==r.viz.run_trans&&(e=2500),setTimeout(o,e,t)})}},function(t,e,r){"use strict";var o=r(2),a=r(89),n=r(97),i=r(98),s=r(99),l=r(100),c=r(101),d=r(102),u=r(103),p=r(104),v=r(105),f=r(106),m=r(107),h=r(108),g=r(109),w=r(110),y=r(111),x=r(112),b=r(81),z=r(55),k=r(54),A=r(70),T=r(18),E=r(113),S=r(86),B=r(78),O=r(114),M=r(36),N=r(115);t.exports=function(t){var e=t.params,r=T(e);d3.select(e.root+" .play_button"),d3.select(e.root+" .sidebar_wrapper").style("height",r.height+"px"),d3.select(e.viz.viz_wrapper).style("margin-top",r.top+"px").style("width",r.width+"px").style("height",r.height+"px"),e=w(e),e.zoom_info=M(),i(e);var C=d3.select(e.viz.viz_svg);_.each(e.network_data.links,function(t){t.x=e.viz.x_scale(t.target),t.y=e.viz.y_scale(t.source)}),C.on(".zoom",null),e.zoom_behavior.scaleExtent([1,e.viz.square_zoom*e.viz.zoom_ratio.x]).on("zoom",function(){a(t)}),e.viz.do_zoom&&C.call(e.zoom_behavior),n(t),C.attr("width",e.viz.svg_dim.width).attr("height",e.viz.svg_dim.height),C.select(".super_background").style("width",e.viz.svg_dim.width).style("height",e.viz.svg_dim.height),C.select(".grey_background").attr("width",e.viz.clust.dim.width).attr("height",e.viz.clust.dim.height),setTimeout(E,100,e);var L=e.network_data.row_nodes,R=o.pluck(L,"name");y(e,C),C.selectAll(".highlighting_rect").attr("width",.8*e.viz.x_scale.rangeBand()).attr("height",.8*e.viz.y_scale.rangeBand()),p(e),u(e,C),v(e,C),C.selectAll(".row_label_group").each(function(){var t=d3.select(this).select("text")[0][0].getBBox();d3.select(this).select("rect").attr("x",t.x).attr("y",0).attr("width",t.width).attr("height",e.viz.rect_height).style("fill","yellow").style("opacity",function(t){var e=0;return 1===t.target&&(e=1),e})}),C.selectAll(".row_label_group").select("text").attr("y",.5*e.viz.rect_height+.35*e.labels.default_fs_row),o.has(e.network_data.row_nodes[0],"value")&&x(t,C),C.selectAll(".row_cat_group").attr("transform",function(t){var r=_.indexOf(R,t.name);return"translate(0, "+e.viz.y_scale(r)+")"}),C.selectAll(".row_cat_group").select("path").attr("d",function(){var t=e.viz.cat_room.symbol_width-1,r=0,o=1,a=e.viz.rect_height/2,n=e.viz.cat_room.symbol_width-1,i=e.viz.rect_height,s="M "+t+","+r+" L "+o+","+a+", L "+n+","+i+" Z";return s});var F=!0;e.viz.show_dendrogram?(z(t,"row",F),z(t,"col",F),s(e,C),k(t,"row",0),k(t,"col",0)):s(e,C),f(e,C),m(e,C),h(e,C),g(e,C),l(e,C),c(e.viz,C),N(e),d(e,C),e.zoom_behavior.scale(1).translate([e.viz.clust.margin.left,e.viz.clust.margin.top]),b(e),d3.select(e.root+" .clust_container").attr("transform","translate("+e.viz.clust.margin.left+","+e.viz.clust.margin.top+")"),t.params.viz.ds_level===-1&&A(t),S(t),d3.select(e.viz.viz_svg).style("opacity",1),B(t),d3.select(t.params.root+" .row_slider_group").style("opacity",0),d3.select(t.params.root+" .col_slider_group").style("opacity",0),setTimeout(O,500,t,"row"),setTimeout(O,500,t,"col")}},function(t,e,r){"use strict";var o=r(90),a=r(95),n=r(96);t.exports=function(t){var e=t.params,r={};if(r.zoom_x=d3.event.scale,r.zoom_y=d3.event.scale,r.trans_x=e.zoom_behavior.translate()[0]-e.viz.clust.margin.left,r.trans_y=e.zoom_behavior.translate()[1]-e.viz.clust.margin.top,d3.selectAll(e.viz.root_tips).style("display","none"),e.zoom_info=a(e,r),e.zoom_info=n(e,r),e.is_slider_drag===!1&&e.is_cropping===!1){var i=e.zoom_info.trans_x+e.viz.clust.margin.left,s=e.zoom_info.trans_y+e.viz.clust.margin.top;e.zoom_behavior.translate([i,s]),t.params=e,o(t)}}},function(t,e,r){"use strict";var o=r(83),a=r(70),n=r(91),i=r(62),s=r(65),l=r(92),c=r(94);t.exports=function(t){function e(t){var e=t.params,r=c(e);r===!0&&setTimeout(l,50,t)}var r=t.params,d=r.zoom_info,_=s(r);d3.select(r.root+" .clust_group").attr("transform","translate("+[d.trans_x,d.trans_y]+") scale("+d.zoom_x+","+d.zoom_y+")"),d3.select(r.root+" .row_label_zoom_container").attr("transform","translate("+[0,d.trans_y]+") scale("+d.zoom_y+")"),d3.select(r.root+" .col_zoom_container").attr("transform","translate("+[d.trans_x,0]+") scale("+d.zoom_x+")"),d3.select(r.root+" .row_cat_container").attr("transform","translate("+[0,d.trans_y]+") scale( 1,"+d.zoom_y+")"),d3.select(r.root+" .row_dendro_container").attr("transform","translate("+[r.viz.uni_margin/2,d.trans_y]+") scale( 1,"+d.zoom_y+")"),d3.select(r.root+" .row_dendro_icons_group").attr("transform",function(){var t=d.trans_y,e="translate("+[0,t]+") ",r="scale(1, "+d.zoom_y+")",o=e+r;return o}),d3.select(r.root+" .col_dendro_icons_group").attr("transform",function(){var t=d.trans_x,e="translate("+[t,0]+")",r="scale("+d.zoom_x+", 1)",o=e+r;return o}),i(r,d,"row"),i(r,d,"col"),d3.select(r.root+" .col_cat_container").attr("transform","translate("+[d.trans_x,0]+") scale("+d.zoom_x+",1)"),d3.select(r.root+" .col_dendro_container").attr("transform","translate("+[d.trans_x,r.viz.uni_margin/2]+") scale("+d.zoom_x+",1)"),n(r,d),d3.select(r.root+" .viz_svg").attr("is_zoom",function(){var t=Number(d3.select(r.root+" .viz_svg").attr("is_zoom"));return d3.select(r.root+" .viz_svg").attr("stopped_zoom",1),t+1});var u=function(){d3.select(r.root+" .viz_svg").attr("is_zoom",function(){var t=Number(d3.select(r.root+" .viz_svg").attr("is_zoom"));return t-1})};if(o(r),d.zoom_y<=_.zoom_y){var p=!1;d.zoom_y<_.zoom_y&&(p=!0);var v=!1;a(t,v,p)}setTimeout(u,50),setTimeout(e,100,t)}},function(t,e,r){"use strict";var o=r(2);t.exports=function(t){var e=t.zoom_info;o.has(t.network_data.row_nodes[0],"value")&&d3.selectAll(t.root+" .row_bars").attr("width",function(r){var o=0;return o=t.labels.bar_scale_row(Math.abs(r.value))/e.zoom_y}).attr("x",function(r){var o=0;return o=-t.labels.bar_scale_row(Math.abs(r.value))/e.zoom_y}),o.has(t.network_data.col_nodes[0],"value")&&d3.selectAll(t.root+" .col_bars").attr("width",function(r){var o=0; -return r.value>0&&(o=t.labels.bar_scale_col(r.value)/e.zoom_x),o})}},function(t,e,r){"use strict";var o=r(83),a=r(82),n=r(93),i=r(85),s=r(70),l=r(94);t.exports=function(t){function e(){_.each(["row","col"],function(t){d3.selectAll(r.root+" ."+t+"_label_group").filter(function(){return"none"!=d3.select(this).style("display")}).select("text").style("font-size",function(){var t=Number(d3.select(this).style("font-size").replace("px",""));return t})})}var r=t.params,c=l(r);if(c===!0){_.each(["row","col"],function(t){d3.selectAll(r.root+" ."+t+"_label_group").select("text").style("opacity",1),d3.selectAll(r.root+" ."+t+"_cat_group").select("path").style("display","block")}),s(t,!0),d3.selectAll(r.viz.root_tips).style("display","block"),d3.selectAll(r.root+" .row_label_group").select("text").style("display","none"),d3.selectAll(r.root+" .row_label_group").select("text").style("display","block"),d3.select(r.root+" .viz_svg").attr("stopped_zoom",0),d3.selectAll(r.root+" .row_label_group").select("text").style("display","block"),d3.selectAll(r.root+" .col_label_group").select("text").style("display","block"),i(r),t.params.viz.x_offset=0;var d=150;_.each(["row","col"],function(t){var e=n(r,t);e1&&(e.zoom_y=0?e.trans_y=0:e.trans_y<=-e.pan_room_y&&(e.trans_y=-e.pan_room_y),e}},function(t,e){"use strict";t.exports=function(t,e){var r=t.viz;return r.zoom_ratio.x>1&&(e.zoom_x0?e.trans_x=0:e.trans_x<=-e.pan_room_x&&(e.trans_x=-e.pan_room_x),e}},function(t,e,r){"use strict";var o=r(80);t.exports=function(t){var e=t.params;d3.selectAll(e.viz.zoom_element).on("dblclick.zoom",null),d3.select(e.viz.zoom_element).on("dblclick",function(){o(t,0,0,1)})}},function(t,e){"use strict";t.exports=function(t){var e=1,r=0,o=0,a=t.viz.clust.dim.height/2,n=-(e-1)*a;d3.select(t.root+" .clust_group").attr("transform","translate("+[0,0+n]+") scale(1,"+e+")translate("+[r,o]+")"),d3.select(t.root+" .row_label_zoom_container").attr("transform","translate("+[0,n]+") scale("+e+","+e+")translate("+[0,o]+")"),d3.select(t.root+" .row_cat_container").attr("transform","translate("+[0,n]+") scale(1,"+e+")translate("+[0,o]+")"),d3.select(t.root+" .row_dendro_container").attr("transform","translate("+[0,n]+") scale("+e+","+e+")translate("+[t.viz.uni_margin/2,o]+")"),d3.select(t.root+" .col_zoom_container").attr("transform"," scale(1,1)translate("+[r,0]+")"),d3.select(t.root+" .col_cat_container").attr("transform"," scale(1,1)translate("+[r,0]+")"),d3.select(t.root+" .col_dendro_container").attr("transform"," scale(1,1)translate("+[r,t.viz.uni_margin/2]+")"),d3.select(t.root+" .row_dendro_icons_group").attr("transform",function(){return"translate(0,0) scale(1)"}),d3.select(t.root+" .row_dendro_icons_group").selectAll("path").attr("transform",function(t){var e=7,r=t.pos_mid;return"translate("+e+","+r+") scale(1, 1)"})}},function(t,e){"use strict";t.exports=function(t,e){var r=!(arguments.length<=2||void 0===arguments[2])&&arguments[2],o={};r===!1?o.run_transition=!1:o=r;var a,n=t.viz.duration,i=t.network_data.col_nodes,s=t.network_data.col_nodes_names;o.run_transition?(a=e.transition().delay(o.update).duration(n),e.selectAll(".col_cat_group").data(i,function(t){return t.name}).transition().delay(o.update).duration(n).attr("transform",function(e){var r=_.indexOf(s,e.name);return"translate("+t.viz.x_scale(r)+",0)"}),e.selectAll(".col_dendro_group").data(i,function(t){return t.name}).transition().delay(o.update).duration(n).attr("transform",function(e){var r=_.indexOf(s,e.name);return"translate("+t.viz.x_scale(r)+",0)"})):(a=e,e.selectAll(".col_cat_group").data(i,function(t){return t.name}).attr("transform",function(e){var r=_.indexOf(s,e.name);return"translate("+t.viz.x_scale(r)+",0)"}),d3.select(t.root).selectAll(".col_dendro_group").data(i,function(t){return t.name}).attr("transform",function(e){var r=_.indexOf(s,e.name);return"translate("+t.viz.x_scale(r)+",0)"}));var l,c;_.each(["row","col"],function(e){var r=t.viz.all_cats[e].length;for(l=0;l0&&(r=t.labels.bar_scale_col(e.value)),r}).attr("height",.66*t.viz.rect_width)}},function(t,e,r){"use strict";var o=r(19),a=r(22),n=r(21),i=r(31),s=r(30);t.exports=function(t){if(t=o(t),t.viz=n(t.viz),t.viz=a(t.viz),t.sim_mat&&(t.viz.clust.dim.width<=t.viz.clust.dim.height?t.viz.clust.dim.height=t.viz.clust.dim.width:t.viz.clust.dim.width=t.viz.clust.dim.height),t.viz=s(t.viz),t.viz.x_scale.rangeBands([0,t.viz.clust.dim.width]),t.viz.y_scale.rangeBands([0,t.viz.clust.dim.height]),t.viz.border_width.x=t.viz.x_scale.rangeBand()/t.viz.border_fraction,t.viz.border_width.y=t.viz.y_scale.rangeBand()/t.viz.border_fraction,t.viz.rect_width=t.viz.x_scale.rangeBand()-t.viz.border_width.x,t.viz.rect_height=t.viz.y_scale.rangeBand()-t.viz.border_width.y,null!=t.viz.ds)for(var e;e0&&_.each(t.viz.ds,function(e){e.y_scale=d3.scale.ordinal().rangeBands([0,t.viz.clust.dim.height]),e.y_scale.domain(d3.range(e.num_rows+1)),e.rect_height=e.y_scale.rangeBand()-t.viz.border_width.y}),t.viz.square_zoom=t.viz.norm_labels.width.col/(t.viz.rect_width/2),t=i(t)}},function(t,e,r){"use strict";var o=r(43),a=r(44),n=r(47);t.exports=function(t,e){var r=t.network_data.row_nodes_names;if(t.viz.ds_level===-1)e.selectAll(".row").attr("transform",function(e){var o=_.indexOf(r,e.name),a=t.viz.y_scale(o);return"translate(0,"+a+")"}),e.selectAll(".row").selectAll(".tile").attr("transform",function(e){return n(t,e)}).attr("width",t.viz.rect_width).attr("height",t.viz.rect_height),e.selectAll(".row").selectAll(".tile_up").attr("d",function(){return o(t)}).attr("transform",function(e){return n(t,e)}),e.selectAll(".row").selectAll(".tile_dn").attr("d",function(){return a(t)}).attr("transform",function(e){return n(t,e)});else{var i=t.viz.ds_level,s=".ds"+String(i)+"_row",l=t.viz.ds[i].rect_height;e.selectAll(s).attr("transform",function(e){var r=t.viz.ds[i].y_scale(e.row_index);return"translate(0,"+r+")"}),e.selectAll(s).selectAll(".tile").attr("transform",function(e){return n(t,e)}).attr("width",t.viz.rect_width).attr("height",l)}}},function(t,e,r){"use strict";var o=r(23);t.exports=function(t,e){var r=t.params;r=o(r),e.selectAll(".row_bars").attr("width",function(t){var e=0;return e=r.labels.bar_scale_row(Math.abs(t.value))}).attr("x",function(t){var e=0;return e=-r.labels.bar_scale_row(Math.abs(t.value))}).attr("height",r.viz.y_scale.rangeBand())}},function(t,e){"use strict";t.exports=function(t){var e=d3.select(t.root+" .clust_container").attr("transform"),r=Number(e.split("(")[1].split(",")[0]),o=Number(e.split(",")[1].replace(")","")),a=r+t.viz.clust.dim.width/2,n=o+t.viz.clust.dim.height/2;d3.select(t.root+" .play_button").attr("transform",function(){return"translate("+a+","+n+")"})}},function(t,e){"use strict";t.exports=function(t,e){var r,o,a=t.params.viz;if("row"===e){var n=a.svg_dim.width-3*a.uni_margin;r=a.clust.margin.left+a.clust.dim.width+5*a.dendro_room.row,r>n&&(r=n),o=a.clust.margin.top+3*a.uni_margin}else r=2*a.uni_margin,o=a.clust.margin.top+a.clust.dim.height+a.dendro_room.col-2*a.uni_margin;d3.select(t.params.root+" ."+e+"_slider_group").attr("transform",function(){var t;return t="row"===e?"translate("+r+","+o+")":"translate("+r+","+o+"), rotate(-90)"}).style("opacity",1)}},function(t,e){"use strict";t.exports=function(t){var e=arguments.length<=1||void 0===arguments[1]?0:arguments[1],r=0;e>0&&(r=2e3);var o=d3.selectAll(t.root+" .horz_lines"),a=d3.selectAll(t.root+" .vert_lines");o.style("opacity",0).attr("transform",function(e){var r=e.row_index,o=t.viz.y_scale(r);return"translate( 0,"+o+") rotate(0)"}).transition().duration(e).delay(r).style("opacity",1),o.append("line").attr("x1",0).attr("x2",t.viz.clust.dim.width).style("stroke-width",function(){var e=t.viz.border_width.y;return e+"px"}),a.style("opacity",0).attr("transform",function(e){var r=e.col_index,o=t.viz.x_scale(r);return"translate("+o+") rotate(-90)"}).transition().duration(e).delay(r).style("opacity",1),a.append("line").attr("x1",0).attr("x2",-t.viz.clust.dim.height).style("stroke-width",function(){var e=t.viz.border_width.x;return e+"px"})}},function(t,e,r){"use strict";var o=r(117),a=r(48),n=r(118),i=r(119),s=r(120),l=r(121);t.exports=function(t){var e=t.params;d3.select(e.root+" .col_cat_outer_container").empty()?d3.select(e.root+" .col_container").append("g").attr("class","col_cat_outer_container").attr("transform",function(){var t=e.viz.norm_labels.width.col+2;return"translate(0,"+t+")"}).append("g").attr("class","col_cat_container"):d3.select(e.root+" .col_container").select("col_cat_outer_container").attr("transform",function(){var t=e.viz.norm_labels.width.col+2;return"translate(0,"+t+")"}),d3.selectAll(e.viz.root_tips+"_col_cat_tip").remove();var r=a().attr("class",function(){var t=e.viz.root_tips.replace(".",""),r=t+" d3-tip "+t+"_col_cat_tip";return r}).direction("s").offset([5,0]).style("display","none").html(function(t){return o(e,t,this,"col")});d3.select(e.root+" .col_cat_container").selectAll("g").data(e.network_data.col_nodes,function(t){return t.name}).enter().append("g").attr("class","col_cat_group").attr("transform",function(t){var r=_.indexOf(e.network_data.col_nodes_names,t.name);return"translate("+e.viz.x_scale(r)+",0)"}),d3.select(e.root+" .col_cat_container").selectAll(".col_cat_group").call(r),d3.selectAll(e.root+" .col_cat_group").each(function(){var o,a=this;_.each(e.viz.all_cats.col,function(s){var d=parseInt(s.split("-")[1],10),_="col_cat_rect_"+String(d);o=d3.select(a).select("."+_).empty()?d3.select(a).append("rect").attr("class",_).attr("cat",s).attr("transform",function(){var t=e.viz.cat_room.symbol_width+e.viz.cat_room.separation,r=d*t;return"translate(0,"+r+")"}).on("click",function(r){if(d3.select(this).classed("cat_strings"))if(d3.event.shiftKey===!0)c(t,r,this,"col");else{var o=l(e,r,this,"col");$(e.root+" .dendro_info").modal("toggle");var a=o.join(", ");d3.select(e.root+" .dendro_info input").attr("value",a)}}):d3.select(a).select("."+_),o.attr("width",e.viz.x_scale.rangeBand()).attr("height",e.viz.cat_room.symbol_width).style("fill",function(t){var r=t[s],o=e.viz.cat_colors.col[s][r];return o}).on("mouseover",r.show).on("mouseout",function(){r.hide(this),n(e),d3.select(this).classed("hovering",!1),d3.selectAll(".d3-tip").style("display","none")}),i(e.viz,"col",o,s)})});var c=_.debounce(s,1500)}},function(t,e,r){"use strict";var o=r(77);t.exports=function(t,e,r,a){function n(){var e=!1;if(d3.select(r).classed("hovering")){var o=[a];t.viz.sim_mat&&(o=["row","col"]),_.each(o,function(r){"string"==typeof l&&l.indexOf("Not ")<0&&"false"!=l&&(e=!0),e&&d3.selectAll(t.root+" ."+r+"_cat_group").selectAll("rect").style("opacity",function(e){var r=d3.select(this).style("opacity");if(d3.select(this).classed("cat_strings")&&d3.select(this).classed("filtered_cat")===!1){var o,a=d3.select(this).attr("cat");o=e[a].indexOf(": ")>=0?e[a].split(": ")[1]:e[a],r=a===i&&o===l?t.viz.cat_colors.active_opacity:t.viz.cat_colors.opacity/4}return r})})}}d3.selectAll(t.viz.root_tips+"_col_cat_tip").style("display","block"),d3.selectAll(t.viz.root_tips+"_row_cat_tip").style("display","block");var i=d3.select(r).attr("cat"),s=o(t.viz,i,a),l=e[i];"string"==typeof l&&l.indexOf(": ")>=0&&(l=l.split(": ")[1]);var c=s+": "+l;return d3.select(r).classed("hovering",!0),setTimeout(n,500),c}},function(t,e){"use strict";t.exports=function(t){_.each(["row","col"],function(e){d3.selectAll(t.root+" ."+e+"_cat_group").selectAll("rect").style("opacity",function(){var e=d3.select(this).style("opacity");return d3.select(this).classed("cat_strings")&&d3.select(this).classed("filtered_cat")===!1&&(e=t.viz.cat_colors.opacity),e})})}},function(t,e){"use strict";t.exports=function(t,e,r,o){function a(t){"string"==typeof t&&t.indexOf(i)>-1&&(t=t.split(i)[1]);var e=parseFloat(t);return e}var n=!(arguments.length<=4||void 0===arguments[4])&&arguments[4],i=": ",s=t.cat_info[e][o].type;"cat_strings"===s?n?r.classed("cat_strings",!0).style("opacity",0).transition().duration(1e3).style("opacity",t.cat_colors.opacity):r.classed("cat_strings",!0).style("opacity",t.cat_colors.opacity):r.classed("cat_values",!0).style("opacity",function(r){var n=r[o],i=a(n);return t.cat_info[e][o].cat_scale(Math.abs(i))}).style("fill",function(e){var r,n=a(e[o]);return r=n>0?t.cat_value_colors[0]:t.cat_value_colors[1]})}},function(t,e,r){"use strict";var o=r(121);t.exports=function(t,e,r,a){function n(t,e,r){d3.selectAll(i.root+" ."+t+"_cat_group").selectAll("rect").style("opacity",function(t){var o=d3.select(this).style("opacity");if(d3.select(this).classed("cat_strings")){var a,n=d3.select(this).attr("cat");a=t[n],n===e&&a===r&&(o=1,d3.select(this).classed("filtered_cat",!0))}return o})}var i=t.params,s=d3.select(r).attr("cat"),l=e[s],c=o(i,e,r,a),d={row:"col",col:"row"},_=d[a],u={};if(u[a]=c,t.params.cat_filter[a]===!1){if(t.params.dendro_filter.row===!1&&t.params.dendro_filter.col===!1&&t.params.cat_filter[_]===!1){var p=t.params.network_data.col_nodes_names,v=t.params.network_data.row_nodes,f=t.params.network_data.col_nodes;t.filter_viz_using_names(u),t.params.inst_nodes.row_nodes=v,t.params.inst_nodes.col_nodes=f,t.params.cat_filter[a]=p,n(a,s,l)}}else u=t.params.cat_filter[a],t.filter_viz_using_names(u),t.params.cat_filter[a]=!1,d3.selectAll(i.root+" ."+a+"_cat_group").selectAll("rect").classed("filtered_cat",!1)}},function(t,e,r){"use strict";var o=r(2);t.exports=function(t,e,r,a){var n=d3.select(r).attr("cat"),i=e[n],s=t.network_data[a+"_nodes"],l=_.filter(s,function(t){return t[n]==i}),c=o.pluck(l,"name");return c}},function(t,e,r){"use strict";var o=r(117),a=r(48),n=r(118),i=r(119),s=r(120),l=r(121);t.exports=function(t){var e=!(arguments.length<=1||void 0===arguments[1])&&arguments[1],r=t.params;d3.select(r.root+" .row_cat_outer_container").empty()?d3.select(r.root+" .row_container").append("g").attr("class","row_cat_outer_container").attr("transform","translate("+r.viz.norm_labels.width.row+",0)").append("g").attr("class","row_cat_container"):d3.select(r.root+" .row_container").select("row_cat_outer_container").attr("transform","translate("+r.viz.norm_labels.width.row+",0)"),d3.select(r.root+" .row_cat_container").select(".white_bars").empty()?d3.select(r.root+" .row_cat_container").append("rect").attr("class","white_bars").attr("fill",r.viz.background_color).attr("width",r.viz.cat_room.row+"px").attr("height",function(){var t=r.viz.clust.dim.height;return t}):d3.select(r.root+" .row_cat_container").select(".white_bars").attr("fill",r.viz.background_color).attr("width",r.viz.cat_room.row+"px").attr("height",function(){var t=r.viz.clust.dim.height;return t}),d3.selectAll(r.viz.root_tips+"_row_cat_tip").remove();var c=a().attr("class",function(){var t=r.viz.root_tips.replace(".",""),e=t+" d3-tip "+t+"_row_cat_tip";return e}).direction("e").offset([5,0]).style("display","none").html(function(t){return o(r,t,this,"row")});d3.select(r.root+" .row_cat_container").selectAll("g").data(r.network_data.row_nodes,function(t){return t.name}).enter().append("g").attr("class","row_cat_group").attr("transform",function(t){var e=_.indexOf(r.network_data.row_nodes_names,t.name);return"translate(0, "+r.viz.y_scale(e)+")"}),d3.select(r.root+" .row_cat_container").selectAll(".row_cat_group").call(c);var d,u;d3.selectAll(r.root+" .row_cat_group rect").remove(),r.viz.show_categories.row&&d3.selectAll(r.root+" .row_cat_group").each(function(){u=this,_.each(r.viz.all_cats.row,function(o){var a=parseInt(o.split("-")[1],10),s="row_cat_rect_"+String(a);d=d3.select(u).select("."+s).empty()?d3.select(u).append("rect").attr("class",s).attr("cat",o):d3.select(u).select("."+s),d.attr("width",r.viz.cat_room.symbol_width).attr("height",r.viz.y_scale.rangeBand()).style("fill",function(t){var e=t[o],a=r.viz.cat_colors.row[o][e];return a}).attr("x",function(){var t=r.viz.cat_room.symbol_width+r.viz.uni_margin/2;return t+"px"}).attr("transform",function(){var t=r.viz.cat_room.symbol_width+r.viz.cat_room.separation,e=a*t;return"translate("+e+",0)"}).on("click",function(e){if(d3.select(this).classed("cat_strings"))if(d3.event.shiftKey===!0)p(t,e,this,"row");else{var o=l(r,e,this,"row");$(r.root+" .dendro_info").modal("toggle");var a=o.join(", ");d3.select(r.root+" .dendro_info input").attr("value",a)}}).on("mouseover",c.show).on("mouseout",function(){c.hide(this),n(r),d3.select(this).classed("hovering",!1),d3.selectAll(".d3-tip").style("display","none")}),i(r.viz,"row",d,o,e)})});var p=_.debounce(s,1500)}},function(t,e,r){"use strict";var o=r(55);t.exports=function(t){var e=t.params,r=e.viz.dendro_room.row+e.viz.uni_margin,a=e.viz.clust.margin.left+e.viz.clust.dim.width,n=e.viz.clust.margin.top;d3.select(e.root+" .row_dendro_outer_container").empty()?(d3.select(e.root+" .viz_svg").append("g").attr("class","row_dendro_outer_container").attr("transform","translate("+a+","+n+")"),d3.select(e.root+" .row_dendro_outer_container").append("rect").classed("row_dendro_spillover",!0).attr("fill",e.viz.background_color).attr("width",r+"px").attr("height",e.viz.svg_dim.height),d3.select(e.root+" .row_dendro_outer_container").append("g").attr("class","row_dendro_container").attr("transform","translate("+e.viz.uni_margin/2+",0)")):(d3.select(e.root+" .viz_svg").select("row_dendro_outer_container").attr("transform","translate("+a+","+n+")"),d3.select(e.root+" .row_dendro_outer_container").select(".row_dendro_spillover").attr("width",r+"px").attr("height",e.viz.svg_dim.height)),o(t,"row",!1),"clust"!=e.viz.inst_order.col&&d3.selectAll(e.root+" .row_dendro_group").remove()}},function(t,e,r){"use strict";var o=r(55);t.exports=function(t){var e=t.params,r=e.viz.clust.margin.left,a=e.viz.clust.margin.top+e.viz.clust.dim.height,n=e.viz.dendro_room.col+e.viz.uni_margin;d3.select(e.root+" .col_dendro_outer_container").empty()?(d3.select(e.root+" .viz_svg").append("g").attr("class","col_dendro_outer_container").attr("transform","translate("+r+","+a+")"),d3.select(e.root+" .col_dendro_outer_container").append("rect").classed("col_dendro_spillover",!0).attr("fill",e.viz.background_color).attr("width",e.viz.svg_dim.width).attr("height",n+"px"),d3.select(e.root+" .col_dendro_outer_container").append("g").attr("class","col_dendro_container").attr("transform","translate(0,"+e.viz.uni_margin/2+")"),d3.select(e.root+" .col_dendro_outer_container").append("rect").classed("col_dendro_spillover_top",!0).attr("fill",e.viz.background_color).attr("width",e.viz.svg_dim.width).attr("height",e.viz.svg_dim.height).attr("transform","translate(0,"+e.viz.dendro_room.col+")")):(d3.select(e.root+" .viz_svg").select("col_dendro_outer_container").attr("transform","translate("+r+","+a+")"),d3.select(e.root+" .col_dendro_outer_container").select(".col_dendro_spillover").attr("width",e.viz.svg_dim.width).attr("height",n+"px")),o(t,"col",!1),"clust"!=e.viz.inst_order.row&&d3.selectAll(e.root+" .col_dendro_group").remove()}},function(t,e,r){"use strict";var o=r(126);t.exports=function(t){o(t,"row"),o(t,"col")}},function(t,e,r){"use strict";var o=r(127),a=r(114);t.exports=function(t,e){function r(){t.params.is_slider_drag=!0;var r=d3.event.y;r<0&&(r=0),r>i&&(r=i),this.nextSibling&&this.parentNode.appendChild(this), -r=d3.round(r,-1);var a=10-r/10;d3.select(this).attr("transform","translate(0, "+r+")"),o(t,e,a)}function n(){var r=d3.mouse(this),a=d3.round(r[1],-1);d3.select(t.params.root+" ."+e+"_group_circle").attr("transform","translate(0, "+a+")");var n=10-a/10;o(t,e,n)}var i=100,s=d3.behavior.drag().on("drag",r).on("dragend",function(){t.params.is_slider_drag=!1}),l=d3.select(t.params.root+" .viz_svg").append("g").classed(e+"_slider_group",!0);a(t,e);var c=i+20,d=30;l.append("rect").classed(e+"_slider_background",!0).attr("height",c+"px").attr("width",d+"px").attr("fill",t.params.viz.background_color).attr("transform",function(){var t="translate(-10, -5)";return t}).style("opacity",0),l.append("line").style("stroke-width",i/7+"px").style("stroke","black").style("stroke-linecap","round").style("opacity",0).attr("y1",0).attr("y2",function(){return i-2}).on("click",n);var _=-i/40;l.append("path").style("fill","black").attr("transform","translate("+_+", 0)").attr("d",function(){var t=0,e=0,r=0,o=i,a=i/10,n=0,s="M"+t+","+e+", L"+r+", "+o+", L"+a+","+n+" Z";return s}).style("opacity",.35).on("click",n);var u=.35,p=.6;l.append("circle").classed(e+"_group_circle",!0).attr("r",.08*i).attr("transform",function(){return"translate(0, "+i/2+")"}).style("fill","blue").style("opacity",u).on("mouseover",function(){d3.select(this).style("opacity",p)}).on("mouseout",function(){d3.select(this).style("opacity",u)}).call(s)}},function(t,e,r){"use strict";var o=r(55);t.exports=function(t,e,r){var a=t.params;"row"===e?a.group_level.row=r:"col"===e&&(a.group_level.col=r);var n=!0;o(t,e,n)}},function(t,e,r){"use strict";var o=r(60);t.exports=function(t){var e=t.params.viz,r=e.clust.margin.left+e.clust.dim.width+e.uni_margin+e.dendro_room.row,a=d3.select(e.viz_svg).append("g").classed("right_spillover_container",!0).attr("transform",function(){return"translate("+r+", 0)"}),n=e.norm_labels.margin.top+e.norm_labels.width.col;a.append("rect").attr("fill",e.background_color).attr("width",10*e.clust.dim.width).attr("height",e.svg_dim.height+"px").attr("class","white_bars").attr("class","right_spillover").attr("transform",function(){return"translate( 0,"+n+")"});var i=0,s=e.clust.margin.top;a.append("g").classed("row_dendro_icons_container",!0).attr("transform","translate("+i+","+s+")").append("g").classed("row_dendro_icons_group",!0),o(t,"row"),i=e.clust.margin.left+e.clust.dim.width,s=n;var l=e.dendro_room.row+e.uni_margin,c=e.cat_room.col+e.uni_margin;d3.select(e.viz_svg).append("rect").attr("fill",e.background_color).attr("width",l).attr("height",c).attr("transform",function(){return"translate("+i+","+s+")"}).classed("white_bars",!0).classed("dendro_row_spillover",!0)}},function(t,e,r){"use strict";var o=r(130),a=r(131),n=r(133),i=r(134),s=r(136),l=r(137),c=r(139),d=r(140),_=r(163),u=r(164),p=r(165),v=r(166),f=r(167),m=r(168);t.exports=function(){var t=this,e=t.params;if(d3.select(e.root+" .running_demo").empty()){d3.select(e.root+" .play_button").classed("running_demo",!0),f(e,!1),$.blockUI({css:{border:"none",padding:"15px",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px",opacity:0,color:"#fff",cursor:"default"}}),d3.selectAll(".blockUI").style("opacity",0);var r=750;t.params.viz.is_expand===!1&&(r=o(e,r,_),r-=1500),r=o(e,r,a),r=o(e,r,n),r=o(t,r,i),r=o(e,r,p),r=o(e,r,s),r=o(e,r,m),r=o(e,r,u),r=o(e,r,l),r=o(e,r,c),r=o(t,r,d),r=o(e,r,_),r=o(e,r,v)}}},function(t,e){"use strict";t.exports=function(t,e,r){var o=(setTimeout(r().run,e,t),r().get_duration());return e+=o}},function(t,e,r){"use strict";var o=r(132);t.exports=function(){function t(t){var e="Clustergrammer allows users to generate\ninteractive and sharable visualizations\nby uploading a matrix",a="This demo will quickly overview some\nof Clustergrammer's interactive features";setTimeout(o,0,t,e,4500/r),setTimeout(o,4500/r,t,a,4500/r)}function e(){return 1e4/r}var r=1;return{run:t,get_duration:e}}},function(t,e){"use strict";t.exports=function(t,e,r){var o=e.split("\n");o.length<3&&o.push(""),d3.select(t.root+" .demo_group").style("opacity",0).transition().duration(250).style("opacity",1).transition().duration(250).delay(r).style("opacity",0);for(var a=0;a0?f.update=1e3:f.update=0,v>0?f.enter=1e3:f.enter=0,f.enter=f.enter+f.update,f.run_transition=!0;var m=t.network_data.links.length,h=e.network_data.links.length,g=.5*e.matrix.def_large_matrix;return(m>g||h>g)&&(f.run_transition=!1,f.update=0,f.enter=0),f}},function(t,e,r){"use strict";var o=r(146),a=r(49),n=r(67),i=r(147),s=r(151),l=r(39),c=r(152),d=r(155),_=r(81),u=r(48);t.exports=function(t,e,r){var p=t.params;d3.selectAll(p.viz.root_tips).remove();var v=u().attr("class",function(){var t=p.viz.root_tips.replace(".",""),e=t+" d3-tip "+t+"_tile_tip";return e}).direction("nw").offset([0,0]).style("display","none").html(function(t){var e,r=String(t.value.toFixed(3));if(p.keep_orig){var o=String(t.value_orig.toFixed(3));e="

"+t.row_name+" and "+t.col_name+"

normalized value: "+r+"

original value: "+o+"
"}else e="

"+t.row_name+" and "+t.col_name+"

value: "+r+"
";return e});d3.select(p.root+" .clust_group").call(v),d(p);for(var f=1e3,m=e.row_nodes,h=e.col_nodes,g=e.links,w=g,y=0;y0?t.matrix.tile_colors[0]:t.matrix.tile_colors[1]}).attr("fill-opacity",function(e){var r=t.matrix.opacity_scale(Math.abs(e.value));return r}):l.style("fill",function(e){return e.value>0?t.matrix.tile_colors[0]:t.matrix.tile_colors[1]}).attr("fill-opacity",function(e){var r=t.matrix.opacity_scale(Math.abs(e.value));return r}),l.each(function(t){Math.abs(t.value_up)>0&&Math.abs(t.value_dn)>0&&d3.select(this).remove()})}},function(t,e,r){"use strict";var o=r(43),a=r(44),n=r(45),i=r(46),s=r(47);t.exports=function(t,e,r,l,c,d,u){var p=_.filter(e,function(t){return 0!=t.value_up||0!=t.value_dn}),v=d3.select(r).selectAll(".tile_up").data(p,function(t){return t.col_name}),f=v.on("mouseover",function(){for(var e=arguments.length,r=Array(e),o=0;o0&&Math.abs(t.value_dn)>0&&d3.select(this).remove()})}},function(t,e){"use strict";t.exports=function(t,e,r){var o=t.network_data.row_nodes,a=t.network_data.col_nodes,n=d3.select(t.root+" .clust_group").selectAll(".row").data(t.matrix.matrix,function(t){return t.name}).exit();e.run_transition?n.transition().duration(r).style("opacity",0).remove():n.style("opacity",0).remove(),d3.selectAll(t.root+" .row_label_group").data(o,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .col_label_group").data(a,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .row_cat_group").data(o,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .row_dendro_group").data(o,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .col_label_text").data(a,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .horz_lines").data(o,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .vert_lines").data(a,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .col_cat_group").data(a,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .col_dendro_group").data(a,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove()}},function(t,e,r){"use strict";var o=r(153);t.exports=function(t,e,r,a){var n=d3.select(t.root+" .clust_group").selectAll(".row").data(t.matrix.matrix,function(t){return t.name}).enter().append("g").classed("row",!0).attr("transform",function(e){return"translate(0,"+t.viz.y_scale(e.row_index)+")"});n.each(function(n){o(t,n,e,r,a,this)})}},function(t,e,r){"use strict";var o=r(154),a=r(45),n=r(46),i=r(47);t.exports=function(t,e,r,s,l,c){var d=e.row_data,u=_.filter(d,function(t){return 0!==t.value}),p=d3.select(c).selectAll("rect").data(u,function(t){return t.col_name}).enter().append("rect").attr("class","tile row_tile").attr("width",t.viz.rect_width).attr("height",t.viz.rect_height).style("fill",function(e){return e.value>0?t.matrix.tile_colors[0]:t.matrix.tile_colors[1]}).on("mouseover",function(){for(var e=arguments.length,r=Array(e),o=0;o0&&(r=t.matrix.opacity_scale(Math.abs(e.value_up))),r});var p=d3.select(r).selectAll(".tile_dn").data(d,function(t){return t.col_name}).enter().append("path").attr("class","tile_dn").attr("d",function(){return a(t)}).attr("transform",function(e){return n(t,e)}).style("fill",function(){return t.matrix.tile_colors[1]}).on("mouseover",function(e){d3.selectAll(t.root+" .row_label_group text").classed("active",function(t){return e.row_name===t.name}),d3.selectAll(t.root+" .col_label_text text").classed("active",function(t){return e.col_name===t.name}),t.matrix.show_tile_tooltips&&i.show(e)}).on("mouseout",function(){d3.selectAll(t.root+" text").classed("active",!1),t.matrix.show_tile_tooltips&&i.hide()});p.style("fill-opacity",0).transition().delay(s.enter).duration(l).style("fill-opacity",function(e){var r=0;return Math.abs(e.value_up)>0&&(r=t.matrix.opacity_scale(Math.abs(e.value_dn))),r}),c.each(function(t){Math.abs(t.value_up)>0&&Math.abs(t.value_dn)>0&&d3.select(this).remove()})}},function(t,e){"use strict";t.exports=function(t){d3.select(t.root+" .clust_container").attr("transform","translate("+t.viz.clust.margin.left+","+t.viz.clust.margin.top+")"),d3.select(t.root+" .col_label_outer_container").attr("transform","translate(0,"+t.viz.norm_labels.width.col+")"),d3.select(t.root+" .col_cat_outer_container").attr("transform",function(){var e=t.viz.norm_labels.width.col+2;return"translate(0,"+e+")"})}},function(t,e,r){"use strict";var o=(r(127),r(79)),a=r(78),n=r(157);t.exports=function(t){function e(e,r){var o=2-r,a=t.params.matrix.abs_max_val*o;t.params.matrix.opacity_scale.domain([0,a]),d3.selectAll(t.params.root+" .tile").style("fill-opacity",function(e){var r=t.params.matrix.opacity_scale(Math.abs(e.value));return r})}var r=t.params,i=d3.select(r.root+" .gene_search_box")[0][0],s=new Awesomplete(i,{minChars:1,maxItems:15}),l=t.params.network_data.row_nodes_names;s.list=l,d3.selectAll(".awesomplete ul").style("z-index",99),$(r.root+" .gene_search_box").keyup(function(e){if(13===e.keyCode){var o=$(r.root+" .gene_search_box").val();n(t,o,l)}}),$(r.root+" .submit_gene_button").off().click(function(){var e=$(r.root+" .gene_search_box").val();n(t,e,l)});var c;if(c=r.sim_mat?["both"]:["row","col"],_.each(c,function(e){$(r.root+" .toggle_"+e+"_order .btn").off().click(function(a){var n=$(a.target).attr("name").replace("_row","").replace("_col","");d3.selectAll(r.root+" .toggle_"+e+"_order .btn").classed("active",!1),d3.select(this).classed("active",!0),"both"!=e?o(t,n,e):(o(t,n,"row"),o(t,n,"col"))})}),a(t),d3.select(t.params.root+" .opacity_slider").select("#handle-one").empty()){var d=d3.slider().snap(!0).value(1).min(.1).max(1.9).step(.1).on("slide",function(t,r){e(t,r)});d3.select(t.params.root+" .opacity_slider").call(d)}}},function(t,e,r){"use strict";var o=r(80);t.exports=function(t,e,r){var a="name";if(r.indexOf(e)!==-1){d3.selectAll(t.params.root+" .row_label_group").select("rect").style("opacity",0);var n=_.indexOf(r,e),i=t.params.viz.y_scale(n),s=t.params.viz.clust.dim.height/2-i,l=t.params.viz.zoom_ratio.x;o(t,0,s,l),t.params.zoom_info.zoom_y=l,d3.selectAll(t.params.root+" .row_label_group").filter(function(t){return t[a]===e}).select("rect").style("opacity",1)}}},function(t,e){"use strict";t.exports=function(t){t.dendro_filter.row===!1&&"clust"===t.viz.inst_order.col&&d3.select(t.root+" .row_slider_group").style("opacity",1).style("pointer-events","all"),d3.selectAll(t.root+" .toggle_row_order .btn").attr("disabled",null),t.dendro_filter.col===!1&&"clust"===t.viz.inst_order.row&&d3.select(t.root+" .col_slider_group").style("opacity",1).style("pointer-events","all"),d3.selectAll(t.root+" .toggle_col_order .btn").attr("disabled",null),d3.selectAll(t.root+" .gene_search_button .btn").attr("disabled",null),t.viz.run_trans=!1}},function(t,e){"use strict";t.exports=function(t,e){_.each(["row","col"],function(r){var o;o="row"===r?"col":"row",d3.selectAll(e.root+" .toggle_"+o+"_order .btn").filter(function(){return d3.select(this).attr("name")===t.inst_order[r]}).classed("active",!0)})}},function(t,e,r){"use strict";var o=r(161),a=r(2);t.exports=function(t,e){var r,n,i,s,l,c,d,u,p=!(arguments.length<=2||void 0===arguments[2])&&arguments[2],v=0,f=0;_.each(e,function(e){s=e.name,p===!0&&(s.indexOf(" ")?s=s.split(" ")[0]:s.indexOf("_")&&(s=s.split("_")[0])),v=0,o(e),_.each(t,function(t){if(r=t.cat_title,n=t.cats,l="false",f=-1,u=0,_.each(n,function(t){c=t.cat_name,i=t.members,_.contains(i,s)&&(l=c,f=u),u+=1}),a.has(t,"pval")){var o=t.pval.toExponential();d=r+": "+l+"

Pval "+String(o)+"

"}else d=r.indexOf("cat-")===-1?r+": "+l:l;e["cat-"+String(v)]=d,e["cat_"+String(v)+"_index"]=f,v+=1})})}},function(t,e){"use strict";t.exports=function(t){var e=_.keys(t);_.each(e,function(e){e.indexOf("cat-")>-1&&delete t[e],e.indexOf("cat_")>-1&&delete t[e]})}},function(t,e,r){"use strict";var o=r(146),a=r(67),n=r(70),i=r(155);t.exports=function(t){d3.selectAll(t.params.root+" .row_cat_group").remove(),d3.selectAll(t.params.root+" .row_label_group").remove(),d3.selectAll(t.params.root+" .row").remove();var e=!0,r=!0,s=!0;n(t,e,r,s),a(t);var l=t.params.network_data.col_nodes;d3.selectAll(t.params.root+" .col_label_group").data(l,function(t){return t.name}).exit().style("opacity",0).remove(),d3.selectAll(t.params.root+" .col_label_text").data(l,function(t){return t.name}).exit().style("opacity",0).remove(),d3.selectAll(t.params.root+" .col_cat_group").data(l,function(t){return t.name}).exit().style("opacity",0).remove(),d3.selectAll(t.params.root+" .col_dendro_group").data(l,function(t){return t.name}).exit().style("opacity",0).remove(),i(t.params);var c={};c.enter=0,c.update=0,c.run_transition=!1;var d=0;o(t,d,c)}},function(t,e,r){"use strict";var o=r(135);t.exports=function(){function t(t){var e=Number(d3.select(t.root+" .expand_button").attr("x").replace("px","")),n=Number(d3.select(t.root+" .expand_button").attr("y").replace("px","")),i=0,s=400;setTimeout(o,i,t,"single",e,n),setTimeout(r,s,t),setTimeout(a,1500,t)}function e(){return 3500}function r(t){$(t.root+" .expand_button").d3Click()}function a(t){n(t,"row","clust"),n(t,"col","clust")}function n(t,e,r){var o=d3.selectAll(".toggle_"+e+"_order .btn").filter(function(){return this.__data__==r})[0];$(o).click()}return jQuery.fn.d3Click=function(){this.each(function(t,e){var r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.dispatchEvent(r)})},{run:t,get_duration:e}}},function(t,e,r){"use strict";var o=r(132),a=r(138),n=r(127);t.exports=function(){function t(t){var e="Identify row and column groups\nof varying sizes using the\nsliders and dendrogram";o(t,e,1e4),setTimeout(a,3e3,t,"slider_col",7e3),setTimeout(r,4e3,t,"row",3),setTimeout(r,5e3,t,"row",4),setTimeout(r,6e3,t,"row",5),setTimeout(r,7e3,t,"row",6),setTimeout(r,8e3,t,"row",7),setTimeout(r,9e3,t,"row",5)}function e(){return 11e3}function r(t,e,r){$(cgm.params.root+" .slider_col").slider("value",r/10),n(cgm,e,r)}return{run:t,get_duration:e}}},function(t,e,r){"use strict";var o=r(132),a=r(135);t.exports=function(){function t(t){var e="Row and column categories\ncan be use to reorder\nby double-clicking";o(t,e,7e3);var n=d3.selectAll(t.root+" .col_cat_super").filter(function(){return"cat-1"===this.__data__})[0],i=d3.select(".col_cat_super").attr("transform"),s=Number(i.split("(")[1].split(",")[0].replace(")",""))+20,l=Number(i.split(",")[1].replace(")","")),c=4e3;setTimeout(a,c,t,"double",s,l);var d=c+300;setTimeout(r,d,t,n)}function e(){return 8e3}function r(t,e){$(e).d3DblClick()}return jQuery.fn.d3DblClick=function(){this.each(function(t,e){var r=document.createEvent("MouseEvents");r.initMouseEvent("dblclick",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null), -e.dispatchEvent(r)})},{run:t,get_duration:e}}},function(t,e,r){"use strict";var o=r(132),a=r(167);t.exports=function(){function t(t){var r="Clustergrammer is built with gene\nexpression data in mind and interfaces\nwith several Ma'ayan lab web tools",a="The example data being visualized is\ngene expression data obtained from the\nCancer Cell Line Encyclopedia",n="For more information please view\nthe help documentation";setTimeout(o,0,t,r,4500),setTimeout(o,4500,t,a,4500),setTimeout(o,9e3,t,n,4500),setTimeout(e,14e3,t)}function e(t){d3.select(t.root+" .play_button").classed("running_demo",!1),a(t,!0)}function r(){return 12e3}return{run:t,get_duration:r}}},function(t,e){"use strict";t.exports=function(t,e){e===!1?d3.select(t.root+" .play_button").transition().duration(500).style("opacity",0):(d3.select(t.root+" .play_button").transition().duration(500).style("opacity",1),$.unblockUI())}},function(t,e,r){"use strict";var o=r(132),a=r(135);t.exports=function(){function t(t){var e="View additional controls\nby clicking the menu button";o(t,e,4e3);var n=Number(d3.select(t.root+" .expand_button").attr("x").replace("px","")),i=Number(d3.select(t.root+" .expand_button").attr("y").replace("px","")),s=3e3,l=3400;setTimeout(a,s,t,"single",n,i),setTimeout(r,l,t)}function e(){return 5e3}function r(t){$(t.root+" .expand_button").d3Click()}return jQuery.fn.d3Click=function(){this.each(function(t,e){var r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.dispatchEvent(r)})},jQuery.fn.d3DblClick=function(){this.each(function(t,e){var r=document.createEvent("MouseEvents");r.initMouseEvent("dblclick",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.dispatchEvent(r)})},{run:t,get_duration:e}}},function(t,e,r){"use strict";var o=r(170),a=r(171);t.exports=function(){var t=this,e=t.params;o(t);var r=30;a(e,r)}},function(t,e,r){"use strict";var o=r(113);t.exports=function(t){var e=t.params;if(d3.select(e.root+" .play_button").empty()){var r=d3.select(e.root+" .viz_svg").append("g").classed("play_button",!0).classed("running_demo",!1);o(e),r.append("circle").style("r",45).style("fill","white").style("stroke","black").style("stroke-width","3px").style("opacity",.5),r.append("path").attr("d",function(){var t=40,e=22,r=15;return"M-"+r+",-"+e+" l "+t+","+e+" l -"+t+","+e+" z "}).style("fill","black").style("opacity",.5),r.on("mouseover",function(){d3.select(this).select("path").style("fill","red").style("opacity",1),d3.select(this).select("circle").style("opacity",1)}).on("mouseout",function(){d3.select(this).select("path").style("fill","black").style("opacity",.5),d3.select(this).select("circle").style("opacity",.5)}).on("click",function(){t.play_demo()})}}},function(t,e){"use strict";t.exports=function(t,e){if(d3.select(t.root+" .demo_group").empty()){var r=d3.select(t.root+" .clust_container").attr("transform"),o=Number(r.split("(")[1].split(",")[0]),a=Number(r.split(",")[1].replace(")","")),n=d3.select(t.root+" .viz_svg").append("g").classed("demo_group",!0).attr("transform",function(){var t=o+20,e=a+40;return"translate("+t+","+e+")"});n.append("rect").classed("rect_1",!0),n.append("rect").classed("rect_2",!0),n.append("rect").classed("rect_3",!0);var i=1.3*e;n.append("text").attr("id","text_1").attr("font-size",e+"px").attr("font-weight",1e3).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif'),n.append("text").attr("id","text_2").attr("font-size",e+"px").attr("font-weight",1e3).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("transform",function(){return"translate(0,"+String(i)+")"}),n.append("text").attr("id","text_3").attr("font-size",e+"px").attr("font-weight",1e3).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("transform",function(){return"translate(0,"+String(2*i)+")"})}}},function(t,e,r){"use strict";var o=r(11),a=r(143);t.exports=function(t){var e=o(this.config,t);a(this,e)}},function(t,e,r){"use strict";var o=r(11),a=r(143);t.exports=function(t){var e,r=!(arguments.length<=1||void 0===arguments[1])&&arguments[1];e=r===!1?this:r;var n,i=e.params,s={};_.each(["row","col"],function(e){var r=i.inst_nodes[e+"_nodes"];if(_.has(t,e))if(t[e].length>0){var o=t[e];n=$.grep(r,function(t){return $.inArray(t.name,o)>-1})}else n=r;else n=r;s[e+"_nodes"]=n});var l=e.params.network_data.row_nodes,c=e.params.network_data.col_nodes,d=o(e.config,s);a(e,d),l.length>e.params.inst_nodes.row_nodes.length&&(e.params.inst_nodes.row_nodes=l),c.length>e.params.inst_nodes.col_nodes.length&&(e.params.inst_nodes.col_nodes=c)}},function(t,e,r){"use strict";var o=r(122),a=r(15),n=r(88),i=r(160);t.exports=function(t,e){null!=t.params.cat_update_callback&&t.params.cat_update_callback(this);var r=t.params.viz.cat_colors.col;i(e,t.params.network_data.row_nodes,!0),i(e,t.params.inst_nodes.row_nodes,!0),t.params=a(t.params,!1),o(t,!0),n(t),t.params.new_row_cats=e,t.params.viz.cat_colors.col=r}},function(t,e,r){"use strict";var o=r(122),a=r(15),n=r(88),i=r(160),s=r(176);t.exports=function(){var t=arguments.length<=0||void 0===arguments[0]||arguments[0],e=this,r=s(e),l=e.params.viz.cat_colors.col;if(i(r,e.params.network_data.row_nodes),i(r,e.params.inst_nodes.row_nodes),e.params.new_row_cats=r,e.params.viz.cat_colors.col=l,t){var c=!0;e.params=a(e.params,c),o(e,!0),n(e)}}},function(t,e){"use strict";t.exports=function(t){function e(t,e,a){r={},r.cat_title=t,r.cats=[],o={},o.cat_name=e,o.members=[],o.members.push(a),r.cats.push(o),p.push(r)}var r,o,a,n,i,s,l,c,d=t.config.network_data.row_nodes,u=": ",p=[],v=d[0],f=_.keys(v),m={};_.each(f,function(t){t.indexOf("cat-")>=0&&(s=v[t],c=parseInt(t.split("cat-")[1],10),l=s.indexOf(u)>=0?s.split(u)[0]:t,m[c]=l)});var h,g=_.keys(m).sort();return _.each(g,function(t){h={},h.cat_title=m[t],h.cats=[],p.push(h)}),_.each(d,function(t){var r=_.keys(t);_.each(r,function(r){if(r.indexOf("cat-")>-1){i=t[r],c=parseInt(r.split("cat-")[1],10);var s=r;i=t[r];var l=t[r],d=t.name;l.indexOf(u)>-1?(s=l.split(u)[0],i=l.split(u)[1]):(s=r,i=l),0===p.length?e(s,i,d):(a=!1,_.each(p,function(t){s===t.cat_title&&(a=!0,n=!1,_.each(t.cats,function(t){i===t.cat_name&&(n=!0,t.members.push(d))}),n===!1&&(o={},o.cat_name=i,o.members=[],o.members.push(d),t.cats.push(o)))}))}})}),p}},function(t,e,r){"use strict";var o=r(141),a=r(178);t.exports=function(t,e){var r=this,n={};n[t]=e,o(this,n),a(r,t,e)}},function(t,e,r){"use strict";var o=r(179);t.exports=function(t,e,r){var a,n,i=t.params;d3.select(i.root+" .slider_"+e).attr("current_state",r),_.each(_.keys(i.viz.possible_filters),function(r){if(a=e.indexOf("row")>-1?"row":e.indexOf("col")>-1?"col":"neither",n=r.indexOf("row")>-1?"row":r.indexOf("col")>-1?"col":"neither",e!=r&&"neither"!=a&&a==n){var s=o(i,r);t.slider_functions[r].value(0),d3.select(i.root+" .title_"+r).text(s.text+s.state),d3.select(i.root+" .slider_"+r).attr("current_state",s.state)}});var s=o(i,e);d3.select(i.root+" .title_"+e).text(s.text+r+s.suffix)}},function(t,e,r){"use strict";var o=r(5);t.exports=function(t,e){var r={},a={},n={};return r.state=o(t.viz.filter_data,e),n.top=e.split("_")[0],n.node=e.split("_")[1],n.measure=e.split("_")[2],"row"===n.node?a.node="rows":a.node="columns","N"===n.top&&(r.suffix=""),"pct"===n.top&&(r.suffix="%"),"sum"==n.measure?a.measure="sum":"var"==n.measure&&(a.measure="variance"),"sum"===n.measure&&(r.text="Top "+a.node+" "+a.measure+": "),"var"===n.measure&&(r.text="Top "+a.node+" "+a.measure+": "),_.keys(t.viz.possible_filters).indexOf("enr_score_type")>-1&&"col"===n.node&&(r.text="Top Enriched Terms: ",r.suffix=""),r}},function(t,e,r){"use strict";var o=r(181),a=r(182);t.exports=function(){var t=o(),e=this.params,r=a(e),n=new Blob([r],{type:"text/plain;charset=utf-8"});t(n,"clustergrammer.txt")}},function(t,e){"use strict";t.exports=function(){/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ -var t=t||navigator.msSaveBlob&&navigator.msSaveBlob.bind(navigator)||function(t){var e=t.document,r=function(){return t.URL||t.webkitURL||t},o=t.URL||t.webkitURL||t,a=e.createElementNS("http://www.w3.org/1999/xhtml","a"),n="download"in a,i=function(r){var o=e.createEvent("MouseEvents");o.initMouseEvent("click",!0,!1,t,0,0,0,0,0,!1,!1,!1,!1,0,null),r.dispatchEvent(o)},s=t.webkitRequestFileSystem,l=t.requestFileSystem||s||t.mozRequestFileSystem,c=function(e){(t.setImmediate||t.setTimeout)(function(){throw e},0)},d="application/octet-stream",_=0,u=[],p=function(){for(var t=u.length;t--;){var e=u[t];"string"==typeof e?o.revokeObjectURL(e):e.remove()}u.length=0},v=function(t,e,r){e=[].concat(e);for(var o=e.length;o--;){var a=t["on"+e[o]];if("function"==typeof a)try{a.call(t,r||t)}catch(n){c(n)}}},f=function(e,o){var c,p,f,m=this,h=e.type,g=!1,w=function(){var t=r().createObjectURL(e);return u.push(t),t},y=function(){v(m,"writestart progress write writeend".split(" "))},x=function(){!g&&c||(c=w(e)),p&&(p.location.href=c),m.readyState=m.DONE,y()},b=function(t){return function(){if(m.readyState!==m.DONE)return t.apply(this,arguments)}},z={create:!0,exclusive:!1};return m.readyState=m.INIT,o||(o="download"),n?(c=w(e),a.href=c,a.download=o,i(a),m.readyState=m.DONE,void y()):(t.chrome&&h&&h!==d&&(f=e.slice||e.webkitSlice,e=f.call(e,0,e.size,d),g=!0),s&&"download"!==o&&(o+=".download"),p=h===d||s?t:t.open(),l?(_+=e.size,void l(t.TEMPORARY,_,b(function(t){t.root.getDirectory("saved",z,b(function(t){var r=function(){t.getFile(o,z,b(function(t){t.createWriter(b(function(r){r.onwriteend=function(e){p.location.href=t.toURL(),u.push(t),m.readyState=m.DONE,v(m,"writeend",e)},r.onerror=function(){var t=r.error;t.code!==t.ABORT_ERR&&x()},"writestart progress write abort".split(" ").forEach(function(t){r["on"+t]=m["on"+t]}),r.write(e),m.abort=function(){r.abort(),m.readyState=m.DONE},m.readyState=m.WRITING}),x)}),x)};t.getFile(o,{create:!1},b(function(t){t.remove(),r()}),b(function(t){t.code===t.NOT_FOUND_ERR?r():x()}))}),x)}),x)):void x())},m=f.prototype,h=function(t,e){return new f(t,e)};return m.abort=function(){var t=this;t.readyState=t.DONE,v(t,"abort")},m.readyState=m.INIT=0,m.WRITING=1,m.DONE=2,m.error=m.onwritestart=m.onprogress=m.onwrite=m.onabort=m.onerror=m.onwriteend=null,t.addEventListener("unload",p,!1),h}(self);return t}},function(t,e,r){"use strict";var o=r(183);t.exports=function(t){var e,r=t.matrix,a={};_.each(["row","col"],function(o){var n;n="row"===o?"col":"row",e=t.inst_order[o],a[n]=r.orders[e+"_"+o]});for(var n="\t",i=t.network_data.row_nodes,s=t.network_data.col_nodes,l=0;l0){a="('"+a+"'";for(var i=0;ie&&(t=i[0],e=n[0]),r>o&&(r=i[1],o=n[1]),r-=a.viz.rect_height,t-=a.viz.rect_width;var s={};return s.row=[],s.col=[],_.each(a.matrix.matrix,function(t){var e=a.viz.y_scale(t.row_index);e>r&&et&&a=i[1])return;if(1===w)"array"==n(i)&&2==i.length&&("left"===_?d.style("left",l):d.style("bottom",l)),f?c.transition().styleTween(_,function(){return t.interpolate(a,l)}).duration("number"==typeof f?f:250):c.style(_,l);else{var u=100-parseFloat(l),p=100-parseFloat(l);"left"===_?d.style("right",u+"%"):d.style("top",p+"%"),f?k.transition().styleTween(_,function(){return t.interpolate(a,l)}).duration("number"==typeof f?f:250):k.style(_,l)}}}function o(t){if(t===s.domain()[0]||t===s.domain()[1])return t;var e=t;if(y)e=a(s(t));else{var r=(t-s.domain()[0])%v;e=t-r,2*Math.abs(r)>=v&&(e+=r>0?v:-v)}return e}function a(t){var e=s.ticks?s.ticks():s.domain(),r=e.map(function(e){return t-s(e)}),o=-1,a=0,n=s.ticks?s.range()[1]:s.rangeExtent()[1];do o++,Math.abs(r[o])0&&o-1)this._list=t.split(/\s*,\s*/);else if(t=a(t),t&&t.children){var e=[];l.apply(t.children).forEach(function(t){if(!t.disabled){var r=t.textContent.trim(),o=t.value||r,a=t.label||r;""!==o&&e.push({label:a,value:o})}}),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return!this.ul.hasAttribute("hidden")},close:function(t){this.opened&&(this.ul.setAttribute("hidden",""),this.index=-1,a.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.ul.removeAttribute("hidden"),this.autoFirst&&this.index===-1&&this["goto"](0),a.fire(this.input,"awesomplete-open")},next:function(){var t=this.ul.children.length;this["goto"](this.index-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.status.textContent=e[t].textContent,a.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e){if(t?this.index=a.siblingIndex(t):t=this.ul.children[this.index],t){var r=this.suggestions[this.index],o=a.fire(this.input,"awesomplete-select",{text:r,origin:e||t});o&&(this.replace(r),this.close({reason:"select"}),a.fire(this.input,"awesomplete-selectcomplete",{text:r}))}},evaluate:function(){var t=this,e=this.input.value;e.length>=this.minChars&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map(function(o){return new r(t.data(o,e))}).filter(function(r){return t.filter(r,e)}).sort(this.sort).slice(0,this.maxItems),this.suggestions.forEach(function(r){t.ul.appendChild(t.item(r,e))}),0===this.ul.children.length?this.close({reason:"nomatches"}):this.open()):this.close({reason:"nomatches"})}},s.all=[],s.FILTER_CONTAINS=function(t,e){return RegExp(a.regExpEscape(e.trim()),"i").test(t)},s.FILTER_STARTSWITH=function(t,e){return RegExp("^"+a.regExpEscape(e.trim()),"i").test(t)},s.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:t$&");return a.create("li",{innerHTML:r,"aria-selected":"false"})},s.REPLACE=function(t){this.input.value=t.value},s.DATA=function(t){return t},Object.defineProperty(r.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),r.prototype.toString=r.prototype.valueOf=function(){return""+this.label};var l=Array.prototype.slice;return a.create=function(t,e){var r=document.createElement(t);for(var o in e){var n=e[o];if("inside"===o)a(n).appendChild(r);else if("around"===o){var i=a(n);i.parentNode.insertBefore(r,i),r.appendChild(i)}else o in r?r[o]=n:r.setAttribute(o,n)}return r},a.bind=function(t,e){if(t)for(var r in e){var o=e[r];r.split(/\s+/).forEach(function(e){t.addEventListener(e,o)})}},a.fire=function(t,e,r){var o=document.createEvent("HTMLEvents");o.initEvent(e,!0,!0);for(var a in r)o[a]=r[a];return t.dispatchEvent(o)},a.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},a.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof Document&&("loading"!==document.readyState?i():document.addEventListener("DOMContentLoaded",i)),s.$=a,s.$$=n,"undefined"!=typeof self&&(self.Awesomplete=s),"object"===e(t)&&t.exports&&(t.exports=s),s}()}).call(e,r(189)(t))},function(t,e){"use strict";t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e,r){var o=r(191);"string"==typeof o&&(o=[[t.id,o,""]]);r(193)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,r){e=t.exports=r(192)(),e.push([t.id,".d3-slider{position:relative;font-family:Verdana,Arial,sans-serif;font-size:1.1em;border:1px solid #aaa;z-index:2}.d3-slider-horizontal{height:.8em}.d3-slider-range{height:.8em}.d3-slider-range,.d3-slider-range-vertical{background:#2980b9;left:0;right:0;position:absolute}.d3-slider-range-vertical{top:0}.d3-slider-vertical{width:.8em;height:100px}.d3-slider-handle{position:absolute;width:1.2em;height:1.2em;border:1px solid #d3d3d3;border-radius:4px;background:#eee;background:linear-gradient(180deg,#eee 0,#ddd);z-index:3}.d3-slider-handle:hover{border:1px solid #999}.d3-slider-horizontal .d3-slider-handle{top:-.3em;margin-left:-.6em}.d3-slider-axis{position:relative;z-index:1}.d3-slider-axis-bottom{top:.8em}.d3-slider-axis-right{left:.8em}.d3-slider-axis path{stroke-width:0;fill:none}.d3-slider-axis line{fill:none;stroke:#aaa;shape-rendering:crispEdges}.d3-slider-axis text{font-size:11px}.d3-slider-vertical .d3-slider-handle{left:-.25em;margin-left:0;margin-bottom:-.6em}",""])},function(t,e){"use strict";t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e=0&&w.splice(e,1)}function s(t){var e=document.createElement("style");return e.type="text/css",n(t,e),e}function l(t){var e=document.createElement("link");return e.rel="stylesheet",n(t,e),e}function c(t,e){var r,o,a;if(e.singleton){var n=g++;r=h||(h=s(e)),o=d.bind(null,r,n,!1),a=d.bind(null,r,n,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=l(e),o=u.bind(null,r),a=function(){i(r),r.href&&URL.revokeObjectURL(r.href)}):(r=s(e),o=_.bind(null,r),a=function(){i(r)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else a()}}function d(t,e,r,o){var a=r?"":o.css;if(t.styleSheet)t.styleSheet.cssText=y(e,a);else{var n=document.createTextNode(a),i=t.childNodes;i[e]&&t.removeChild(i[e]),i.length?t.insertBefore(n,i[e]):t.appendChild(n)}}function _(t,e){var r=e.css,o=e.media;if(o&&t.setAttribute("media",o),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}function u(t,e){var r=e.css,o=e.sourceMap;o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),n=t.href;t.href=URL.createObjectURL(a),n&&URL.revokeObjectURL(n)}var p={},v=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},f=v(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),m=v(function(){return document.head||document.getElementsByTagName("head")[0]}),h=null,g=0,w=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=f()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var r=a(t);return o(r,e),function(t){for(var n=[],i=0;iinput{display:block}div.awesomplete>ul{position:absolute;left:0;z-index:1;min-width:100%;box-sizing:border-box;list-style:none;padding:0;border-radius:.3em;margin:.2em 0 0;background:hsla(0,0%,100%,.9);background:linear-gradient(to bottom right,#fff,hsla(0,0%,100%,.8));border:1px solid rgba(0,0,0,.3);box-shadow:.05em .2em .6em rgba(0,0,0,.2);text-shadow:none}div.awesomplete>ul:empty,div.awesomplete>ul[hidden]{display:none}@supports (transform:scale(0)){div.awesomplete>ul{transition:.3s cubic-bezier(.4,.2,.5,1.4);transform-origin:1.43em -.43em}div.awesomplete>ul:empty,div.awesomplete>ul[hidden]{opacity:0;transform:scale(0);display:block;transition-timing-function:ease}}div.awesomplete>ul:before{content:"";position:absolute;top:-.43em;left:1em;width:0;height:0;padding:.4em;background:#fff;border:inherit;border-right:0;border-bottom:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}div.awesomplete>ul>li{position:relative;padding:.2em .5em;cursor:pointer}div.awesomplete>ul>li:hover{background:#b8d3e0;color:#000}div.awesomplete>ul>li[aria-selected=true]{background:#3d6d8f;color:#fff}div.awesomplete mark{background:#eaff00}div.awesomplete li:hover mark{background:#b5d100}div.awesomplete li[aria-selected=true] mark{background:#3d6b00;color:inherit}',""])},function(t,e,r){"use strict";var o=r(156),a=r(197),n=r(202),i=r(203),s=r(204),l=r(205),c=r(207),d=r(209);t.exports=function u(t){var e=t.params,u=d3.select(e.root+" .sidebar_wrapper");e.viz.is_expand&&u.style("display","none"),u.append("div").classed("title_section",!0),null!=e.sidebar.title&&u.select(".title_section").append("h4").style("margin-left","20px").style("margin-top","5px").style("margin-bottom","0px").text(e.sidebar.title),u.append("div").style("padding-right","2px").classed("about_section",!0),null!=e.sidebar.about&&u.select(".about_section").append("h5").classed("sidebar_text",!0).style("margin-left","7px").style("margin-top","5px").style("margin-bottom","2px").style("text-align","justify").html(e.sidebar.about),u.append("div").classed("icons_section",!0).style("text-align","center"),t.params.make_modals&&c(e),e.sidebar.icons&&l(t,u),i(e,u),n(u,e),d(u);var r=_.keys(e.viz.possible_filters);r.indexOf("enr_score_type")>-1&&r.sort(function(t,e){return t.toLowerCase().localeCompare(e.toLowerCase())}),t.slider_functions={},_.each(r,function(e){a(t,e)}),o(t),null!==e.ini_view&&(s(e),e.ini_view=null)}},function(t,e,r){"use strict";var o=r(198),a=r(201);t.exports=function(t,e){var r=t.params,n=d3.select(r.root+" .sidebar_wrapper").append("div").classed("div_filters",!0).style("padding-left","10px").style("padding-right","10px");"numerical"==r.viz.possible_filters[e]?o(t,e,n):"categorical"==r.viz.possible_filters[e]&&a(t,e,n)}},function(t,e,r){"use strict";var o=r(179),a=r(199),n=r(5),i=r(12);d3.slider=r(186),t.exports=function(t,e,r){var s=t.params,l={},c=_.keys(s.viz.possible_filters);_.each(c,function(t){if(t!=e){var r=n(s.viz.filter_data,t);l[t]=r}});var d=o(s,e);r.append("div").classed("title_"+e,!0).classed("sidebar_text",!0).classed("slider_description",!0).style("margin-top","5px").style("margin-bottom","3px").text(d.text+d.state+d.suffix),r.append("div").classed("slider_"+e,!0).classed("slider",!0).attr("current_state",d.state);var u=s.network_data.views,p=i(s,u,l);p=p.sort(function(t,r){return r[e]-t[e]});var v=p.length-1,f=0;if(null!==s.requested_view&&e in s.requested_view){var m=s.requested_view[e];if("all"!=m){var h=p.map(function(t){return t[e]}).indexOf(m);h>0&&(f=h)}}var g=d3.slider().value(f).min(0).max(v).step(1).on("slide",function(r,o){w(t,e,p,o)}).on("slideend",function(r,o){w(t,e,p,o)});t.slider_functions[e]=g,d3.select(t.params.root+" .slider_"+e).call(g);var w=_.debounce(a,800)}},function(t,e,r){"use strict";var o=r(141),a=r(178),n=r(200),i=r(14);t.exports=function(t,e,r,s){if(d3.select(t.params.viz.viz_svg).classed("running_update")===!1){var l=t.params,c=r[s][e];a(t,e,c),l=n(l);var d={};if(d[e]=c,d=i(l,d),_.has(r[0],"enr_score_type")){var u=d3.select(l.root+" .toggle_enr_score_type").attr("current_state");d.enr_score_type=u}o(t,d)}}},function(t,e){"use strict";t.exports=function(t){var e;return _.each(["row","col"],function(r){e="row"===r?"col":"row",d3.select(t.root+" .toggle_"+e+"_order .active").empty()===!1?t.viz.inst_order[r]=d3.select(t.root+" .toggle_"+e+"_order").select(".active").attr("name"):t.viz.inst_order[r]="clust"}),t}},function(t,e,r){"use strict";var o=r(14);t.exports=function(t,e,r,a){var n=a.append("div").classed("categorical_filter",!0).classed("toggle_"+r,!0).classed("btn-group-vertical",!0).style("width","100%").style("margin-top","10px").attr("current_state","combined_score"),i=e.viz.filter_data[r],s={combined_score:"Combined Score",pval:"P-Value",zscore:"Z-score"};n.selectAll("button").data(i).enter().append("button").attr("type","button").classed("btn",!0).classed("btn-primary",!0).classed(".filter_button",!0).classed("active",function(t){var e=!1;return"combined_score"==t&&(e=!0),e}).attr("name",function(t){return t}).html(function(t){return s[t]}),$(e.root+" .categorical_filter .btn").off().click(function(){d3.selectAll(e.root+" .categorical_filter .btn").classed("active",!1),d3.select(this).classed("active",!0);var t=d3.select(this).attr("name"),r={enr_score_type:t};o(e,r),d3.select(e.root+" .toggle_enr_score_type").attr("current_state",t)})}},function(t,e){"use strict";t.exports=function(t,e){var r=t.append("div").classed("gene_search_container",!0).style("padding-left","10px").style("padding-right","10px").style("margin-top","10px");r.append("input").classed("form-control",!0).classed("gene_search_box",!0).classed("sidebar_text",!0).attr("type","text").attr("placeholder",e.sidebar.row_search.placeholder).style("height",e.sidebar.row_search.box.height+"px").style("margin-top","10px"),r.append("div").classed("gene_search_button",!0).style("margin-top","5px").attr("data-toggle","buttons").append("button").classed("sidebar_text",!0).html("Search").attr("type","button").classed("btn",!0).classed("btn-primary",!0).classed("submit_gene_button",!0).style("width","100%").style("font-size","14px")}},function(t,e){"use strict";t.exports=function(t,e){var r,o,a,n,i,s={row:"Row",col:"Column",both:""},l=e.append("div").style("padding-left","10px").style("padding-right","10px").classed("reorder_section",!0);i=t.sim_mat?["both"]:["row","col"],_.each(i,function(e){r={clust:"Cluster",rank:"Rank by Sum",rankvar:"Rank by Variance",ini:"Initial Order",alpha:"Alphabetically"};var i;i="row"===e?"col":"row",o=Object.keys(t.matrix.orders);var c=[];_.each(o,function(t){t.indexOf(i)>-1&&(t=t.replace("_row","").replace("_col",""),t.indexOf("cat_")<0&&c.push(t))}),_.keys(t.viz.filter_data).indexOf("enr_score_type")>-1&&(c=["clust","rank"]),c=_.uniq(c),c=c.sort();var d;d="both"!=e?" Order":"Reorder Matrix",l.append("div").classed("sidebar_button_text",!0).style("clear","both").style("margin-top","10px").html(s[e]+d),n=l.append("div").classed("btn-group-vertical",!0).style("width","100%").classed("toggle_"+e+"_order",!0).attr("role","group"),n.selectAll(".button").data(c).enter().append("button").attr("type","button").classed("btn",!0).classed("btn-primary",!0).classed("sidebar_button_text",!0).classed("active",function(e){return a=!1,e==t.viz.inst_order[i]&&(a=!0),a}).attr("name",function(t){return t}).html(function(t){return r[t]})})}},function(t,e,r){"use strict";var o=r(179);t.exports=function(t){_.each(_.keys(t.ini_view),function(e){var r=t.ini_view[e],a=t.viz.possible_filters[e];if("numerical"===a){"all"!=r&&(r=parseInt(r,10)),t.viz.filter_data[e].indexOf(r)<=-1&&(r="all");var n=o(t,e);d3.select(t.root+" .title_"+e).text(n.text+r+n.suffix),d3.select(t.root+" .slider_"+e).attr("current_state",r)}})}},function(t,e,r){"use strict";var o=r(181),a=r(80),n=r(185),i=r(206);t.exports=function(t,e){function r(){d3.select(s.root+" .expand_button").style("opacity",0);var t=d3.select(s.root+" svg").attr("title","test2").attr("version",1.1).attr("xmlns","http://www.w3.org/2000/svg").node().parentNode.innerHTML,e=new Blob([t],{type:"image/svg+xml"});l(e,"clustergrammer.svg"),d3.select(s.root+" .expand_button").style("opacity",.4)}var s=t.params,l=o(),c=e.select(".icons_section").style("margin-top","7px").style("margin-left","5%"),d="22%",_="0px",u="0px";c.append("div").classed("clust_icon",!0).style("float","left").style("width",d).style("padding-left",_).style("padding-right",u).append("i").classed("fa",!0).classed("fa-share-alt",!0).classed("icon_buttons",!0).style("font-size","25px").on("click",function(){$(s.root+" .share_info").modal("toggle"),$(".share_url").val(window.location.href)}).classed("sidebar_tooltip",!0).append("span").classed("sidebar_tooltip_text",!0).html("Share").style("left","0%"),c.append("div").classed("clust_icon",!0).style("float","left").style("width",d).style("padding-left",_).style("padding-right",u).append("i").classed("fa",!0).classed("fa-camera",!0).classed("icon_buttons",!0).style("font-size","25px").on("click",function(){$(s.root+" .picture_info").modal("toggle")}).classed("sidebar_tooltip",!0).append("span").classed("sidebar_tooltip_text",!0).html("Take snapshot").style("left","-100%"),c.append("div").classed("clust_icon",!0).style("float","left").style("width",d).style("padding-left",_).style("padding-right",u).append("i").classed("fa",!0).classed("fa fa-cloud-download",!0).classed("icon_buttons",!0).style("font-size","25px").on("click",function(){t.save_matrix()}).classed("sidebar_tooltip",!0).append("span").classed("sidebar_tooltip_text",!0).html("Download matrix").style("left","-200%"),c.append("div").classed("clust_icon",!0).style("float","left").style("width",d).style("padding-left",_).style("padding-right","-5px").append("i").classed("fa",!0).classed("fa-crop",!0).classed("crop_button",!0).classed("icon_buttons",!0).style("font-size","25px").on("click",function(){if(t.params.dendro_filter.row===!1&&t.params.dendro_filter.col===!1){var e=d3.select(this).classed("fa-crop"),r=d3.select(this).classed("fa-undo");e&&(t.params.crop_filter_nodes={},t.params.crop_filter_nodes.row_nodes=t.params.network_data.row_nodes,t.params.crop_filter_nodes.col_nodes=t.params.network_data.col_nodes,t.brush_crop_matrix(),d3.select(this).classed("active_cropping")===!1?d3.select(this).classed("active_cropping",!0).style("color","red"):(d3.select(this).classed("active_cropping",!1).style("color","#337ab7"),n(t))),r&&(d3.select(s.root+" .crop_button").style("color","#337ab7").classed("fa-crop",!0).classed("fa-undo",!1),t.filter_viz_using_nodes(t.params.crop_filter_nodes),d3.select(t.params.root+" .col_dendro_icons_container").style("display","block"),d3.select(t.params.root+" .row_dendro_icons_container").style("display","block")),a(t,0,0,1)}}).classed("sidebar_tooltip",!0).append("span").classed("sidebar_tooltip_text",!0).html("Crop matrix").style("left","-400%"),d3.select(s.root+" .download_buttons").append("p").append("a").html("Download SVG").on("click",function(){r()});var p="svg_"+s.root.replace("#","");d3.select(s.root+" .download_buttons").append("p").append("a").html("Download PNG").on("click",function(){d3.select(s.root+" .expand_button").style("opacity",0),i.saveSvgAsPng(document.getElementById(p),"clustergrammer.png"),d3.select(s.root+" .expand_button").style("opacity",.4)})}},function(t,e,r){var o;!function(){function a(t){return t instanceof HTMLElement||t instanceof SVGElement; +var Clustergrammer=function(t){function e(o){if(r[o])return r[o].exports;var a=r[o]={exports:{},id:o,loaded:!1};return t[o].call(a.exports,a,a.exports,e),a.loaded=!0,a.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function o(t){function e(){d3.select(E.params.viz.viz_svg).style("opacity",.5);var t=500;this.params.viz.run_trans===!0&&(t=2500),setTimeout(o,t,this)}function o(t){s(t)}function b(t){u(this,t)}function z(t,e,r){v(this,t,e,r)}function k(){return w}function A(t,e){"sum"===e&&(e="rank"),"var"===e&&(e="rankvar"),y(this,e,t)}function T(){return x(this.params)}var S=a(t),E={};if(E.params=n(S),E.config=S,E.params.zoom_behavior=d3.behavior.zoom().scaleExtent([1,E.params.viz.square_zoom*E.params.viz.zoom_ratio.x]).on("zoom",function(){g(E)}),E.params.zoom_behavior.translate([E.params.viz.clust.margin.left,E.params.viz.clust.margin.top]),E.params.use_sidebar){var B=r(196);B(E)}return i(E),E.update_view=f,E.resize_viz=e,E.play_demo=l,E.ini_demo=c,E.filter_viz_using_nodes=d,E.filter_viz_using_names=_,E.update_cats=b,E.reset_cats=p,E.zoom=z,E.save_matrix=m,E.brush_crop_matrix=h,E.d3_tip_custom=k,E.reorder=A,E.export_matrix_string=T,E}var a=r(1),n=r(9),i=r(37),s=r(88),l=r(129),c=r(169),d=r(172),_=r(173),u=r(174),p=r(175),v=r(80),f=r(177),m=r(180),h=r(184),g=r(89),w=r(48),y=r(79),x=r(182);d3.slider=r(186);r(188);r(190),r(194),t.exports=o},function(t,e,r){"use strict";var o=r(2),a=r(3),n=r(4),i=r(5),s=r(6),l=r(7),c=r(8);t.exports=function(t){var e=s(),r=o.extend(e,t);r.network_data=t.network_data;var d=": ";_.each(["row","col"],function(t){var e=r.network_data[t+"_nodes"],o=c(e);e.forEach(function(e,a){e[t+"_index"]=a,o&&(r.super_labels=!0,r["super"][t]=e.name.split(d)[0],e.name=e.name.split(d)[1]),e.name=String(e.name),e.name=e.name.replace(/_/g," ")})}),r.network_data.row_nodes_names=o.pluck(r.network_data.row_nodes,"name"),r.network_data.col_nodes_names=o.pluck(r.network_data.col_nodes,"name"),r.sim_mat=l(r);var u=n(r.network_data.views),p={};_.each(_.keys(u.possible_filters),function(t){var e=i(u.filter_data,t);p[t]=e}),_.has(r.network_data,"views")&&r.network_data.views.forEach(function(t){_.each(_.keys(u.possible_filters),function(e){_.has(t,e)||(t[e]=p[e])});var e=t.nodes;_.each(["row","col"],function(t){var r=c(e[t+"_nodes"]);e[t+"_nodes"].forEach(function(e,o){e[t+"_index"]=o,r&&(e.name=e.name.split(d)[1]),e.name=String(e.name),e.name=e.name.replace(/_/g," ")})})});var v=r.network_data.col_nodes,f=r.network_data.row_nodes;if(_.has(r.network_data,"mat")){for(var m=[],h=r.network_data.mat,g={},w=0;w1&&(e[t]=n)});var a={};return a.possible_filters=e,a.filter_data=r,a}},function(t,e){"use strict";t.exports=function(t,e){var r=t[e].sort(function(t,e){return e-t})[0];return r=String(r)}},function(t,e){"use strict";t.exports=function(){var t={row_label_scale:1,col_label_scale:1,super_labels:!1,"super":{},show_label_tooltips:!0,show_tile_tooltips:!0,transpose:!1,tile_colors:["#FF0000","#1C86EE"],bar_colors:["#FF0000","#1C86EE"],cat_value_colors:["#2F4F4F","#9370DB"],outline_colors:["orange","black"],highlight_color:"#FFFF00",tile_title:!1,input_domain:0,opacity_scale:"linear",do_zoom:!0,is_zoom:0,is_slider_drag:!1,is_cropping:!1,background_color:"#FFFFFF",super_border_color:"#F5F5F5",outer_margins:{top:0,bottom:0,left:0,right:0},ini_expand:!1,grey_border_width:2,tile_click_hlight:!1,super_label_scale:1,make_tile_tooltip:function(t){return t.info},ini_view:null,requested_view:null,use_sidebar:!0,title:null,about:null,sidebar_width:160,sidebar_icons:!0,row_search_placeholder:"Row",buffer_width:10,show_sim_mat:!1,cat_colors:null,resize:!0,clamp_opacity:.85,expand_button:!0,max_allow_fs:20,dendro_filter:{row:!1,col:!1},cat_filter:{row:!1,col:!1},crop_filter_nodes:{row:!1,col:!1},row_tip_callback:null,col_tip_callback:null,tile_tip_callback:null,matrix_update_callback:null,cat_update_callback:null,dendro_callback:null,dendro_click_callback:null,new_row_cats:null,make_modals:!0,show_viz_border:!1};return t}},function(t,e){"use strict";t.exports=function(t){var e=!1,r=t.network_data.row_nodes_names.length,o=t.network_data.col_nodes_names.length;if(r==o){var a=t.network_data.row_nodes_names,n=t.network_data.col_nodes_names;e=!0,_.each(a,function(t){var r=a.indexOf(t);t!==n[r]&&(e=!1)})}return e&&(t.expand_button=!1),e}},function(t,e){"use strict";t.exports=function(t){var e=": ",r=!0;return _.each(t,function(t){var o=String(t.name);o.indexOf(e)<0&&(r=!1)}),r}},function(t,e,r){"use strict";var o=r(10),a=r(13),n=r(14),i=r(4),s=r(15),l=r(36);t.exports=function(t){var e=$.extend(!0,{},t),r=e;if(r.inst_nodes={},r.inst_nodes.row_nodes=r.network_data.row_nodes,r.inst_nodes.col_nodes=r.network_data.col_nodes,null!==r.ini_view){var c=r.ini_view,d=i(r.network_data.views);r.viz={},r.viz.possible_filters=d.possible_filters,r.viz.filter_data=d.filter_data,c=n(r,c),r.network_data=o(e,r,c),r.requested_view=c}return r=s(r),r.use_sidebar&&(r.sidebar=a(r)),r.zoom_info=l(),r}},function(t,e,r){"use strict";var o=r(11),a=r(12);t.exports=function(t,e,r){var n=t.network_data.views,i=!1;_.has(n[0],"enr_score_type")&&(i=!0);var s=a(e,n,r);i&&0==s.length&&(r={N_row_sum:"all",N_col_sum:"10"},s=a(e,n,r));var l,c=s[0];if("undefined"!=typeof c){var d=c.nodes;l=o(t,d)}else l=t.network_data;return l}},function(t,e,r){"use strict";var o=r(2);t.exports=function(t,e){var r=t.network_data.links,a=o.pluck(e.row_nodes,"name"),n=o.pluck(e.col_nodes,"name"),i=_.filter(r,function(t){var e=t.name.split("_")[0],r=t.name.split("_")[1],o=_.indexOf(a,e),i=_.indexOf(n,r);if(o>-1&i>-1)return t.source=o,t.target=i,t}),s={};return s.row_nodes=e.row_nodes,s.row_nodes_names=a,s.col_nodes=e.col_nodes,s.col_nodes_names=n,s.links=i,s.all_links=r,s.views=t.network_data.views,_.has(t.network_data,"cat_colors")&&(s.cat_colors=t.network_data.cat_colors),s}},function(t,e,r){"use strict";var o=r(2),a=r(5);t.exports=function(t,e,r){var n,i,s=_.keys(r);_.each(s,function(t){n=r[t],/[^a-z_]/i.test(n)&&(n=parseInt(n,10)),i=!1,_.each(e,function(e){o.has(e,t)&&(i=!0)}),i&&(e=_.filter(e,function(e){return e[t]==n}))});var l,c,d=[],u=!1;return _.each(e,function(e){l=!0,_.each(_.keys(t.viz.possible_filters),function(r){c=a(t.viz.filter_data,r),e[r]!=c&&(l=!1)}),l?u===!1&&(u=!0,d.push(e)):d.push(e)}),d}},function(t,e){"use strict";t.exports=function(t){var e={};return e.wrapper={},e.row_search={},e.row_search.box={},e.row_search.box.height=34,e.row_search.box.width=95,e.row_search.placeholder=t.row_search_placeholder,e.row_search.margin_left=7,e.slider={},e.slider.width=t.sidebar_width-30,e.slider.margin_left=15,e.key_cat={},e.key_cat.width=t.sidebar_width-15,e.key_cat.margin_left=5,e.key_cat.max_height=100,e.title=t.title,e.title_margin_left=7,e.about=t.about,e.width=t.sidebar_width,e.buttons={},e.buttons.width=t.sidebar_width-15,e.text={},e.icons=t.sidebar_icons,e.icon_margin_left=-5,e}},function(t,e){"use strict";t.exports=function(t,e){var r=_.keys(e)[0];return _.each(_.keys(t.viz.possible_filters),function(o){if(o!=r&&!d3.select(t.root+" .slider_"+o).empty()){var a=d3.select(t.root+" .slider_"+o).attr("current_state");e[o]=a}}),e}},function(t,e,r){"use strict";var o=r(16),a=r(17),n=r(19),i=r(20),s=r(21),l=r(22),c=r(23),d=r(24),u=r(29),p=r(31),v=r(2),f=r(4),m=r(32);t.exports=function(t){function e(t){var e=arguments.length<=1||void 0===arguments[1]||arguments[1],r={};r.root=t.root,r.root_tips=t.root.replace("#",".")+"_d3-tip",r.viz_wrapper=t.root+" .viz_wrapper",r.do_zoom=t.do_zoom,r.background_color=t.background_color,r.super_border_color=t.super_border_color,r.outer_margins=t.outer_margins,r.is_expand=t.ini_expand,r.grey_border_width=t.grey_border_width,r.show_dendrogram=t.show_dendrogram,r.tile_click_hlight=t.tile_click_hlight,r.inst_order=t.inst_order,r.expand_button=t.expand_button,r.sim_mat=t.sim_mat,r.dendro_filter=t.dendro_filter,r.cat_filter=t.cat_filter,r.cat_value_colors=t.cat_value_colors,r.viz_svg=r.viz_wrapper+" .viz_svg",r.zoom_element=r.viz_wrapper+" .viz_svg",r.uni_duration=1e3,r.bottom_space=10,r.run_trans=!1,r.duration=1e3,r.resize=t.resize,v.has(t,"size")?r.fixed_size=t.size:r.fixed_size=!1,r.border_fraction=65,r.uni_margin=5,r.super_labels={},r.super_labels.margin={},r.super_labels.dim={},r.super_labels.margin.left=r.grey_border_width,r.super_labels.margin.top=r.grey_border_width,r.super_labels.dim.width=0,t.labels.super_labels&&(r.super_labels.dim.width=15*t.labels.super_label_scale),r.triangle_opacity=.6,r.norm_labels={},r.norm_labels.width={},r.dendro_room={},r.show_dendrogram?r.dendro_room.symbol_width=10:r.dendro_room.symbol_width=0,r.cat_colors=t.cat_colors,r=m(t,r,e),0==_.has(t,"group_level")&&(r.show_dendrogram&&(t.group_level={}),t.group_level.row=5,t.group_level.col=5),r.dendro_opacity=.35,r.spillover_col_slant=r.norm_labels.width.col;var o=f(t.network_data.views);return r.possible_filters=o.possible_filters,r.filter_data=o.filter_data,r.viz_nodes={},r.viz_nodes.row=t.network_data.row_nodes_names,r.viz_nodes.col=t.network_data.col_nodes_names,r.viz_nodes.curr_row=t.network_data.row_nodes_names,r.viz_nodes.curr_col=t.network_data.col_nodes_names,r.x_offset=0,r}var r=arguments.length<=1||void 0===arguments[1]||arguments[1];return t.labels=o(t),t.viz=e(t,r),a(t),t=n(t),t.viz=i(t.viz),t.viz=s(t.viz),t.viz=l(t.viz),t.sim_mat&&(t.viz.clust.dim.width<=t.viz.clust.dim.height?t.viz.clust.dim.height=t.viz.clust.dim.width:t.viz.clust.dim.width=t.viz.clust.dim.height),t=c(t),t=d(t),t=u(t),t=p(t)}},function(t,e){"use strict";t.exports=function(t){var e={};return e.super_label_scale=t.super_label_scale,e.super_labels=t.super_labels,e.super_label_fs=13.8,e.super_labels&&(e["super"]={},e["super"].row=t["super"].row,e["super"].col=t["super"].col),e.show_label_tooltips=t.show_label_tooltips,e.row_max_char=_.max(t.network_data.row_nodes,function(t){return t.name.length}).name.length,e.col_max_char=_.max(t.network_data.col_nodes,function(t){return t.name.length}).name.length,e.max_allow_fs=t.max_allow_fs,e}},function(t,e,r){"use strict";var o=r(18);t.exports=function(t){d3.select(t.root+" .viz_wrapper").empty()&&(d3.select(t.root).append("div").classed("sidebar_wrapper",!0),d3.select(t.root).append("div").classed("viz_wrapper",!0));var e=o(t);d3.select(t.root+" .sidebar_wrapper").style("float","left").style("width",t.sidebar_width+"px").style("height",e.height+"px").style("overflow","hidden"),d3.select(t.viz.viz_wrapper).style("float","left").style("width",e.width+"px").style("height",e.height+"px")}},function(t,e){"use strict";t.exports=function(t){var e,r={},o=t.buffer_width,a=d3.select(t.root).style("width").replace("px",""),n=d3.select(t.root).style("height").replace("px","");return t.viz.is_expand===!1?(e=t.viz.outer_margins,r.width=a-t.sidebar_width-o):(e=t.viz.outer_margins,r.width=a-o),r.top=e.top,r.left=e.left,t.viz.resize?r.height=n:(t.viz.is_expand?r.width=t.viz.fixed_size.width:r.width=t.viz.fixed_size.width-t.sidebar_width,r.height=t.viz.fixed_size.height),r}},function(t,e){"use strict";t.exports=function(t){return t.viz.svg_dim={},t.viz.svg_dim.width=Number(d3.select(t.viz.viz_wrapper).style("width").replace("px","")),t.viz.svg_dim.height=Number(d3.select(t.viz.viz_wrapper).style("height").replace("px","")),t}},function(t,e){"use strict";t.exports=function(t){return t.norm_labels.margin={},t.norm_labels.margin.left=t.super_labels.margin.left+t.super_labels.dim.width,t.norm_labels.margin.top=t.super_labels.margin.top+t.super_labels.dim.width,t.label_background={},t.label_background.row=t.norm_labels.width.row+t.cat_room.row+t.uni_margin,t.label_background.col=t.norm_labels.width.col+t.cat_room.col+t.uni_margin,t}},function(t,e){"use strict";t.exports=function(t){t.clust={},t.clust.margin={},t.clust.margin.left=t.norm_labels.margin.left+t.norm_labels.width.row+t.cat_room.row+t.uni_margin,t.clust.margin.top=t.norm_labels.margin.top+t.norm_labels.width.col+t.cat_room.col+t.uni_margin;var e=t.svg_dim.width-t.clust.margin.left-t.spillover_col_slant,r=d3.scale.ordinal().rangeBands([0,e]).domain(_.range(t.num_col_nodes)),o=r.rangeBand()/2;if(o>t.norm_labels.width.col){var a=t.norm_labels.width.col/o;e*=a}return t.clust.dim={},t.clust.dim.width=e,t}},function(t,e){"use strict";t.exports=function(t){var e=t.svg_dim.height-t.clust.margin.top-t.dendro_room.col-t.bottom_space;return t.clust.dim.height=e,t}},function(t,e){"use strict";t.exports=function(t){var e=Math.abs(_.max(t.network_data.col_nodes,function(t){return Math.abs(t.value)}).value);return t.labels.bar_scale_col=d3.scale.linear().domain([0,e]).range([0,.75*t.viz.norm_labels.width.col]),e=Math.abs(_.max(t.network_data.row_nodes,function(t){return Math.abs(t.value)}).value),t.labels.bar_scale_row=d3.scale.linear().domain([0,e]).range([0,t.viz.norm_labels.width.row]),t}},function(t,e,r){"use strict";var o=r(25),a=r(27);t.exports=function(t){t.matrix=o(t),t.viz.x_scale=d3.scale.ordinal().rangeBands([0,t.viz.clust.dim.width]),t.viz.y_scale=d3.scale.ordinal().rangeBands([0,t.viz.clust.dim.height]);var e;return _.each(["row","col"],function(r){e=t.viz.inst_order[r],"custom"===e&&(e="clust"),"row"===r?t.viz.x_scale.domain(t.matrix.orders[e+"_"+r]):t.viz.y_scale.domain(t.matrix.orders[e+"_"+r])}),t.viz.border_width={},t.viz.border_width.x=t.viz.x_scale.rangeBand()/t.viz.border_fraction,t.viz.border_width.y=t.viz.y_scale.rangeBand()/t.viz.border_fraction,t.viz.rect_width=t.viz.x_scale.rangeBand()-t.viz.border_width.x,t.viz.rect_height=t.viz.y_scale.rangeBand()-t.viz.border_width.y,a(t),t}},function(t,e,r){"use strict";var o=r(2),a=r(26);t.exports=function(t){var e={},r=t.network_data;e.tile_colors=t.tile_colors,e.bar_colors=t.bar_colors,e.outline_colors=t.outline_colors,e.hlight_color=t.highlight_color,e.tile_title=t.tile_title,e.show_tile_tooltips=t.show_tile_tooltips,e.make_tile_tooltip=t.make_tile_tooltip,e.click_hlight_x=-666,e.click_hlight_y=-666,e.click_hlight_row=-666,e.click_hlight_col=-666,e.def_large_matrix=1e4,e.opacity_function=t.opacity_scale,e.orders={},_.each(["row","col"],function(a){var n;n="row"===a?"col":"row";var i=r[n+"_nodes"],s=i.length,l=o.pluck(i,"name"),c=l.sort(),d=_.map(c,function(t){return r[n+"_nodes_names"].indexOf(t)});e.orders["alpha_"+a]=d;var u=["clust","rank"];_.has(i[0],"rankvar")&&u.push("rankvar"),t.viz.all_cats[n].length>0&&_.each(t.viz.all_cats[n],function(t){t=t.replace("-","_"),u.push(t+"_index")}),_.each(u,function(t){var r=d3.range(s).sort(function(e,r){return i[r][t]-i[e][t]});e.orders[t+"_"+a]=r})}),o.has(r,"all_links")?e.max_link=_.max(r.all_links,function(t){return Math.abs(t.value)}).value:e.max_link=_.max(r.links,function(t){return Math.abs(t.value)}).value,e.abs_max_val=Math.abs(e.max_link)*t.clamp_opacity,0===t.input_domain?"linear"===e.opacity_function?e.opacity_scale=d3.scale.linear().domain([0,e.abs_max_val]).clamp(!0).range([0,1]):"log"===e.opacity_function&&(e.opacity_scale=d3.scale.log().domain([.001,e.abs_max_val]).clamp(!0).range([0,1])):"linear"===e.opacity_function?e.opacity_scale=d3.scale.linear().domain([0,t.input_domain]).clamp(!0).range([0,1]):"log"===e.opacity_function&&(e.opacity_scale=d3.scale.log().domain([.001,t.input_domain]).clamp(!0).range([0,1]));var n=o.has(r.links[0],"value_up"),i=o.has(r.links[0],"value_dn");return n||i?e.tile_type="updn":e.tile_type="simple",o.has(r.links[0],"highlight")?e.highlight=1:e.highlight=0,e.matrix=a(r),e.wait_tooltip=0,e}},function(t,e,r){"use strict";var o=r(2);t.exports=function(t){var e,r,a=[];return r=!!o.has(t.links[0],"value_orig"),t.row_nodes.forEach(function(n,i){a[i]={},a[i].name=t.row_nodes[i].name,a[i].row_index=i,a[i].row_data=d3.range(t.col_nodes.length).map(function(a){return e=o.has(t.links[0],"value_up")||o.has(t.links[0],"value_dn")?{pos_x:a,pos_y:i,value:0,value_up:0,value_dn:0,highlight:0}:{pos_x:a,pos_y:i,value:0,highlight:0},r&&(e.value_orig=0),e})}),t.links.forEach(function(t){a[t.source].row_data[t.target].value=t.value,a[t.source].row_data[t.target].row_name=t.row_name,a[t.source].row_data[t.target].col_name=t.col_name,(o.has(t,"value_up")||o.has(t,"value_dn"))&&(a[t.source].row_data[t.target].value_up=t.value_up,a[t.source].row_data[t.target].value_dn=t.value_dn),r&&(a[t.source].row_data[t.target].value_orig=t.value_orig),t.highlight&&(a[t.source].row_data[t.target].highlight=t.highlight),t.info&&(a[t.source].row_data[t.target].info=t.info)}),a}},function(t,e,r){"use strict";var o=r(28);t.exports=function(t){var e=3,r=2,a=e/t.viz.rect_height,n=2;t.viz.ds_zt=n;var i=Math.floor(Math.log(a)/Math.log(n));if(t.viz.rect_height0){var s=2;t.viz.ds_opacity_scale=d3.scale.linear().domain([1,100]).range([1,s]).clamp(!0);var l;t.viz.ds_num_levels=i,t.viz.ds=[],t.matrix.ds_matrix=[];for(var c=t.viz.inst_order.row,d=$.extend(!0,{},t.matrix.matrix),_=0;_t.labels.max_allow_fs&&(t.labels.default_fs_row=t.labels.max_allow_fs),t.labels.default_fs_col>t.labels.max_allow_fs&&(t.labels.default_fs_col=t.labels.max_allow_fs),t}},function(t,e,r){"use strict";var o=r(33),a=r(2),n=r(34),i=r(35);t.exports=function(t,e){var r,s,l,c=arguments.length<=2||void 0===arguments[2]||arguments[2],d=": ";e.show_categories={},e.all_cats={},e.cat_names={},e.cat_info={};var u={};u.row=null,u.col=null,e.cat_colors={},e.cat_colors.value_opacity=u;var p=0;return _.each(["row","col"],function(o){e.show_categories[o]=!1,e.all_cats[o]=[];var u=_.keys(t.network_data[o+"_nodes"][0]);u=u.sort(),_.each(u,function(t){t.indexOf("cat-")>=0&&(e.show_categories[o]=!0,e.all_cats[o].push(t))}),e.cat_info[o]=null,e.show_categories[o]&&(e.cat_colors[o]={},e.cat_info[o]={},e.cat_names[o]={},_.each(e.all_cats[o],function(c){var u=t.network_data[o+"_nodes"][0];"string"==typeof u[c]&&u[c].indexOf(d)>0?(r=u[c].split(d)[0],e.cat_names[o][c]=r):e.cat_names[o][c]=c;var v=a.pluck(t.network_data[o+"_nodes"],c),f=_.uniq(v).sort();if(s=i(f),"cat_strings"===s.type){var m=_.countBy(v);s.cat_hist=m}else s.cat_hist=null;e.cat_info[o][c]=s,e.cat_colors[o][c]={},_.each(f,function(t,r){l=n.get_random_color(r+p),e.cat_colors[o][c][t]=l,"string"==typeof t&&(t.indexOf("Not ")>=0||t.indexOf(": false")>0)&&(e.cat_colors[o][c][t]="#eee"),p+=1})})),_.has(t.network_data,"cat_colors")&&c===!0&&(e.cat_colors[o]=t.network_data.cat_colors[o]),t.sim_mat&&(e.cat_colors.col=e.cat_colors.row)}),e.cat_colors=e.cat_colors,e.cat_colors.opacity=.6,e.cat_colors.active_opacity=.9,e=o(t,e)}},function(t,e){"use strict";t.exports=function(t,e){var r,o=d3.scale.linear().domain([5,15]).range([85,120]).clamp("true");return e.cat_room={},e.cat_room.symbol_width=12,e.cat_room.separation=3,_.each(["row","col"],function(a){e.norm_labels.width[a]=o(t.labels[a+"_max_char"])*t[a+"_label_scale"],e["num_"+a+"_nodes"]=t.network_data[a+"_nodes"].length,"row"===a?e.dendro_room[a]=e.dendro_room.symbol_width:e.dendro_room[a]=e.dendro_room.symbol_width+3*e.uni_margin;var n=e.all_cats[a].length;if(e.show_categories[a]){r=(n-1)*e.cat_room.separation;var i;i="row"===a?n+1:n,e.cat_room[a]=i*e.cat_room.symbol_width+r}else"row"==a?e.cat_room[a]=e.cat_room.symbol_width:e.cat_room[a]=0}),e}},function(t,e){"use strict";function r(){return"#EEE"}function o(t){return n[t%a()]}function a(){return n.length}var n;n=["#393b79","#aec7e8","#ff7f0e","#ffbb78","#98df8a","#bcbd22","#404040","#ff9896","#c5b0d5","#8c564b","#1f77b4","#5254a3","#FFDB58","#c49c94","#e377c2","#7f7f7f","#2ca02c","#9467bd","#dbdb8d","#17becf","#637939","#6b6ecf","#9c9ede","#d62728","#8ca252","#8c6d31","#bd9e39","#e7cb94","#843c39","#ad494a","#d6616b","#7b4173","#a55194","#ce6dbd","#de9ed6"],t.exports={get_default_color:r,get_random_color:o,get_num_colors:a}},function(t,e){"use strict";t.exports=function(t){var e=t[0],r=!1,o=!1,a="cat_strings",n=NaN,i=[],s=null,l=": ";if("string"==typeof e&&e.indexOf(l)>-1&&(r=!0,e=e.split(l)[1]),0==isNaN(e)&&(o=!0),o&&(a="cat_values",_.each(t,function(t){r&&(t=t.split(l)[1]),isNaN(t)===!0?a="cat_strings":(t=parseFloat(t),i.push(t))})),"cat_values"===a){var c=_.max(i,function(t){return Math.abs(t)});n=Math.abs(c),s=d3.scale.linear().domain([0,n]).range([0,1])}var d={};return d.type=a,d.max_abs_val=n,d.cat_scale=s,d}},function(t,e){"use strict";t.exports=function(){var t={};return t.zoom_x=1,t.zoom_y=1,t.trans_x=0,t.trans_y=0,t}},function(t,e,r){"use strict";var o=r(38),a=r(49),n=r(67),i=r(75),s=r(76),l=r(87),c=r(97),d=r(116),u=r(122),p=r(82),v=r(123),f=r(124),m=r(125),h=r(128);t.exports=function(t){function e(){var t=r.viz.super_border_color;return(r.viz.is_expand||0==r.show_viz_border)&&(t="white"),t}var r=t.params;d3.select(r.viz.viz_wrapper+" svg").remove();var g=d3.select(r.viz.viz_wrapper).append("svg").attr("class","viz_svg").attr("id","svg_"+r.root.replace("#","")).attr("width",r.viz.svg_dim.width).attr("height",r.viz.svg_dim.height).attr("is_zoom",0).attr("stopped_zoom",1);g.append("rect").attr("class","super_background").style("width",r.viz.svg_dim.width).style("height",r.viz.svg_dim.height).style("fill","white"),o(r,g),a(t),r.viz.show_dendrogram&&(v(t),f(t)),h(t),n(t),r.viz.ds_level===-1&&_.each(["row","col"],function(t){var e=Number(d3.select("."+t+"_label_group").select("text").style("font-size").replace("px","")),o=8;e>o&&d3.selectAll(r.root+" ."+t+"_label_group").each(function(){p(r,this,t)})}),u(t),r.viz.show_categories.col&&d(t),s(t),r.labels.super_labels&&i(r),m(t),d3.select(r.viz.viz_svg).append("rect").classed("left_border",!0).classed("borders",!0).attr("fill",e).attr("width",r.viz.grey_border_width).attr("height",r.viz.svg_dim.height).attr("transform","translate(0,0)"),d3.select(r.viz.viz_svg).append("rect").classed("right_border",!0).classed("borders",!0).attr("fill",e).attr("width",r.viz.grey_border_width).attr("height",r.viz.svg_dim.height).attr("transform",function(){var t=r.viz.svg_dim.width-r.viz.grey_border_width;return"translate("+t+",0)"}),d3.select(r.viz.viz_svg).append("rect").classed("top_border",!0).classed("borders",!0).attr("fill",e).attr("width",r.viz.svg_dim.width).attr("height",r.viz.grey_border_width).attr("transform",function(){var t=0;return"translate("+t+",0)"}),d3.select(r.viz.viz_svg).append("rect").classed("bottom_border",!0).classed("borders",!0).attr("fill",e).attr("width",r.viz.svg_dim.width).attr("height",r.viz.grey_border_width).attr("transform",function(){var t=r.viz.svg_dim.height-r.viz.grey_border_width;return"translate(0,"+t+")"}),l(t),c(t),r.viz.do_zoom&&d3.select(r.viz.zoom_element).call(r.zoom_behavior),d3.select(r.viz.zoom_element).on("dblclick.zoom",null)}},function(t,e,r){"use strict";var o=r(2),a=r(39),n=r(40),i=r(41);t.exports=function(t,e){var r,s=t.network_data,l=[];r=e.append("g").attr("class","clust_container").attr("transform","translate("+t.viz.clust.margin.left+","+t.viz.clust.margin.top+")").append("g").attr("class","clust_group").classed("clust_group",!0),r.append("rect").classed("background",!0).classed("grey_background",!0).style("fill","#eee").style("opacity",.25).attr("width",t.viz.clust.dim.width).attr("height",t.viz.clust.dim.height),null===t.viz.ds?i(t,t.matrix.matrix,"all",t.viz.ds_level):i(t,t.matrix.ds_matrix[0],"all",t.viz.ds_level),"function"==typeof t.click_tile?d3.selectAll(t.root+" .tile").on("click",function(e){var r={};r.row=t.network_data.row_nodes[e.pos_y].name,r.col=t.network_data.col_nodes[e.pos_x].name,r.value=e.value,o.has(e,"value_up")&&(r.value_up=e.value_up),o.has(e,"value_dn")&&(r.value_dn=e.value_dn),o.has(e,"info")&&(r.info=e.info),t.click_tile(r),n(t,this)}):t.tile_click_hlight&&d3.selectAll(t.root+" .tile").on("click",function(){n(t,this)});var c={},d=0;return c.enter=0,a(t,c,d),{get_clust_group:function(){return r},get_matrix:function(){return l},get_nodes:function(t){return"row"===t?s.row_nodes:s.col_nodes}}}},function(t,e){"use strict";t.exports=function(t,e,r){}},function(t,e){"use strict";t.exports=function(t,e){d3.select(e).each(function(r){var o=r.pos_x,a=r.pos_y;if(d3.selectAll(t.root+" .click_hlight").remove(),o!=t.matrix.click_hlight_x||a!=t.matrix.click_hlight_y){t.matrix.click_hlight_x=o,t.matrix.click_hlight_y=a;var n=6,i=.85,s=n*t.viz.border_width.x,l=n*t.viz.border_width.y;d3.select(e.parentNode).append("rect").classed("click_hlight",!0).classed("top_hlight",!0).attr("width",t.viz.x_scale.rangeBand()).attr("height",l).attr("fill",t.matrix.hlight_color).attr("transform",function(){return"translate("+t.viz.x_scale(o)+",0)"}).attr("opacity",i),d3.select(e.parentNode).append("rect").classed("click_hlight",!0).classed("left_hlight",!0).attr("width",s).attr("height",t.viz.y_scale.rangeBand()-.99*l).attr("fill",t.matrix.hlight_color).attr("transform",function(){return"translate("+t.viz.x_scale(o)+","+.99*l+")"}).attr("opacity",i),d3.select(e.parentNode).append("rect").classed("click_hlight",!0).classed("right_hlight",!0).attr("width",s).attr("height",t.viz.y_scale.rangeBand()-.99*l).attr("fill",t.matrix.hlight_color).attr("transform",function(){var e=t.viz.x_scale(o)+t.viz.x_scale.rangeBand()-s;return"translate("+e+","+.99*l+")"}).attr("opacity",i),d3.select(e.parentNode).append("rect").classed("click_hlight",!0).classed("bottom_hlight",!0).attr("width",function(){return t.viz.x_scale.rangeBand()-1.98*s}).attr("height",l).attr("fill",t.matrix.hlight_color).attr("transform",function(){var e=t.viz.x_scale(o)+.99*s,r=t.viz.y_scale.rangeBand()-l;return"translate("+e+","+r+")"}).attr("opacity",i)}else t.matrix.click_hlight_x=-666,t.matrix.click_hlight_y=-666})}},function(t,e,r){"use strict";var o=r(42),a=r(48);t.exports=function(t,e){var r=arguments.length<=2||void 0===arguments[2]?"all":arguments[2],n=arguments.length<=3||void 0===arguments[3]?-1:arguments[3],i=t.viz.y_scale,s=!0,l="row";if(n>=0&&(i=t.viz.ds[n].y_scale,s=!1,l="ds"+String(n)+"_row"),s)var c=a().attr("class",function(){var e=t.viz.root_tips.replace(".",""),r=e+" d3-tip "+e+"_tile_tip";return r}).style("display","none").direction("nw").offset([0,0]).html(function(e){var r,o=String(e.value.toFixed(3));if(t.keep_orig){var a=String(e.value_orig.toFixed(3));r="

"+e.row_name+" and "+e.col_name+"

normalized value: "+o+"

original value: "+a+"
"}else r="

"+e.row_name+" and "+e.col_name+"

value: "+o+"
";return r});else c=null;var d=[];"all"===r?d=e:_.each(e,function(t){_.contains(r,t.name)&&d.push(t)}),d3.select(t.root+" .clust_group").selectAll(".row").data(d,function(t){return t.name}).enter().append("g").classed(l,!0).attr("transform",function(t){return"translate(0,"+i(t.row_index)+")"}).each(function(e){o(t,e,c,this,n)}),t.viz.ds_level===-1&&null!=c&&d3.selectAll(t.root+" .row").call(c)}},function(t,e,r){"use strict";var o=r(43),a=r(44),n=r(45),i=r(46),s=r(47);t.exports=function(t,e,r,l){var c=arguments.length<=4||void 0===arguments[4]?-1:arguments[4],d=e.row_data,u=!0,p=t.viz.rect_height;c>=0&&(p=t.viz.ds[c].rect_height);var v;v=!!_.has(t.network_data.links[0],"value_orig");var f;f=v===!1?_.filter(d,function(t){return 0!==t.value}):d;var m=d3.select(l).selectAll("rect").data(f,function(t){return t.col_name}).enter().append("rect").attr("class","tile row_tile").attr("width",t.viz.rect_width).attr("height",p).style("fill",function(e){var r;return r="NaN"===e.value_orig?"#000000":e.value>0?t.matrix.tile_colors[0]:t.matrix.tile_colors[1]}).style("fill-opacity",function(e){ +var r;return r="NaN"===e.value_orig?.175:t.matrix.opacity_scale(Math.abs(e.value))}).attr("transform",function(e){return s(t,e)});if(u&&m.on("mouseover",function(){for(var e=arguments.length,o=Array(e),a=0;a0&&(r=t.matrix.opacity_scale(Math.abs(e.value_up))),r}).on("mouseover",function(){for(var e=arguments.length,o=Array(e),a=0;a0&&(r=t.matrix.opacity_scale(Math.abs(e.value_dn))),r}).on("mouseover",function(){for(var e=arguments.length,o=Array(e),a=0;a0&&Math.abs(t.value_dn)>0&&d3.select(this).remove()})}t.matrix.tile_title&&m.append("title").text(function(t){var e="value: "+t.value;return e})}},function(t,e){"use strict";t.exports=function(t){var e=0,r=t.viz.x_scale.rangeBand()-t.viz.border_width.x,o=0,a=t.viz.y_scale.rangeBand()-t.viz.border_width.y,n="M"+e+","+o+", L"+e+", "+a+", L"+r+",0 Z";return n}},function(t,e){"use strict";t.exports=function(t){var e=0,r=t.viz.x_scale.rangeBand()-t.viz.border_width.x,o=t.viz.y_scale.rangeBand()-t.viz.border_width.y,a=t.viz.y_scale.rangeBand()-t.viz.border_width.y,n="M"+e+", "+o+" , L"+r+", "+a+", L"+r+",0 Z";return n}},function(t,e){"use strict";t.exports=function(t,e,r,o){function a(){if(d3.select(e).classed("hovering")){var o=Number(d3.select(t.root+" .viz_svg").attr("is_zoom"));if(0===o&&t.matrix.show_tile_tooltips&&null!==r&&(d3.selectAll(t.viz.root_tips+"_tile_tip").style("display","block"),r.show.apply(e,s),null!=t.tile_tip_callback)){var a=s[0];t.tile_tip_callback(a)}}}var n,i=o[0],s=[].slice.call(o),l=1e3;d3.select(e).classed("hovering",!0),_.each(["row","col"],function(e){d3.selectAll(t.root+" ."+e+"_label_group text").style("font-weight",function(t){var r,o=i[e+"_name"].replace(/_/g," ")===t.name;return r=o?"bold":"normal"})}),s.push(e),clearTimeout(n),n=setTimeout(a,l,e)}},function(t,e){"use strict";t.exports=function(t,e,r){d3.select(e).classed("hovering",!1),d3.selectAll(t.viz.root_tips+"_tile_tip").style("display","none"),_.each(["row","col"],function(e){d3.selectAll(t.root+" ."+e+"_label_group text").style("font-weight","normal")}),null!=r&&r.hide()}},function(t,e){"use strict";t.exports=function(t,e){var r;r=e.pos_x in t.viz.x_scale.domain()?t.viz.x_scale(e.pos_x):0;var o=r+.5*t.viz.border_width.x,a=.5*t.viz.border_width.y;return"translate("+o+","+a+")"}},function(t,e){"use strict";t.exports=function(){function t(t){b=v(t),z=b.createSVGPoint(),document.body.appendChild(x)}function e(){return"n"}function r(){return[0,0]}function o(){return" "}function a(){var t=f();return{top:t.s.y,left:t.s.x}}function n(){var t=f();return{top:t.n.y-x.offsetHeight,left:t.n.x-x.offsetWidth/2}}function i(){var t=f();return{top:t.s.y,left:t.s.x-x.offsetWidth/2}}function s(){var t=f();return{top:t.e.y-x.offsetHeight/2,left:t.e.x}}function l(){var t=f();return{top:t.w.y-x.offsetHeight/2,left:t.w.x-x.offsetWidth}}function c(){var t=f();return{top:t.nw.y-x.offsetHeight,left:t.nw.x-x.offsetWidth}}function d(){var t=f();return{top:t.ne.y-x.offsetHeight,left:t.ne.x}}function _(){var t=f();return{top:t.sw.y,left:t.sw.x-x.offsetWidth}}function u(){var t=f();return{top:t.se.y,left:t.e.x}}function p(){var t=d3.select(document.createElement("div"));return t.style({position:"absolute",opacity:0,pointerEvents:"none",boxSizing:"border-box"}),t.node()}function v(t){return t=t.node(),"svg"==t.tagName.toLowerCase()?t:t.ownerSVGElement}function f(){var t=k||d3.event.target,e={},r=t.getScreenCTM(),o=t.getBBox(),a=o.width,n=o.height,i=o.x,s=o.y,l=document.documentElement.scrollTop||document.body.scrollTop,c=document.documentElement.scrollLeft||document.body.scrollLeft;return r.a=1,r.d=1,r.e=r.e+c,r.f=r.f+l,z.x=i,z.y=s,e.nw=z.matrixTransform(r),z.x=z.x+a,e.ne=z.matrixTransform(r),z.y=z.y+n,e.se=z.matrixTransform(r),z.x=z.x-a,e.sw=z.matrixTransform(r),z.y=z.y-n/2,e.w=z.matrixTransform(r),z.x=z.x+a,e.e=z.matrixTransform(r),z.x=z.x-a/2,z.y=z.y-n/2,e.n=z.matrixTransform(r),z.y=z.y+n,e.s=z.matrixTransform(r),e}function m(t){var e=d3.select(t).classed("hovering");e&&d3.selectAll(".d3-tip").transition().duration(250).style("opacity",0).style("display","none")}function h(t){var e={};return t&&"[object Function]"===e.toString.call(t)}var g=e,w=r,y=o,x=p(),b=null,z=null,k=null;t.show=function(){var e=Array.prototype.slice.call(arguments);e[e.length-1]instanceof SVGElement&&(k=e.pop());var r,o=y.apply(this,e),a=w.apply(this,e),n=g.apply(this,e),i=d3.select(x),s=0;for(i.html(o).style({opacity:1,"pointer-events":"all"}).style("z-index",99);s--;)i.classed(T[s],!1);if(r=A.get(n).apply(this),i.classed(n,!0).style({top:r.top+a[0]+"px",left:r.left+a[1]+"px"}),h(this)===!1){var l=d3.select(this).attr("class");l.indexOf("tile")>=0&&setTimeout(m,5e3,this)}return t},t.hide=function(){var e=d3.select(x);return e.style({opacity:0,"pointer-events":"none"}),t},t.attr=function(e){if(arguments.length<2&&"string"==typeof e)return d3.select(x).attr(e);var r=Array.prototype.slice.call(arguments);return d3.selection.prototype.attr.apply(d3.select(x),r),t},t.style=function(e){if(arguments.length<2&&"string"==typeof e)return d3.select(x).style(e);var r=Array.prototype.slice.call(arguments);return d3.selection.prototype.style.apply(d3.select(x),r),t},t.direction=function(e){return arguments.length?(g=null==e?e:d3.functor(e),t):g},t.offset=function(e){return arguments.length?(w=null==e?e:d3.functor(e),t):w},t.html=function(e){return arguments.length?(y=null==e?e:d3.functor(e),t):y};var A=d3.map({n:n,s:i,e:s,w:l,nw:c,ne:d,sw:_,se:u,south_custom:a}),T=A.keys();return t}},function(t,e,r){"use strict";var o=r(50);t.exports=function(t,e){var r,a=t.params;r=d3.select(a.viz.viz_svg+" .row_container").empty()?d3.select(a.viz.viz_svg).append("g").classed("row_container",!0).attr("transform","translate("+a.viz.norm_labels.margin.left+","+a.viz.clust.margin.top+")"):d3.select(a.viz.viz_svg).select(".row_container").attr("transform","translate("+a.viz.norm_labels.margin.left+","+a.viz.clust.margin.top+")"),d3.select(a.root+" .row_white_background").empty()&&r.append("rect").classed("row_white_background",!0).classed("white_bars",!0).attr("fill",a.viz.background_color).attr("width",a.viz.label_background.row).attr("height",30*a.viz.clust.dim.height+"px"),d3.select(a.root+" .row_label_container").empty()?r.append("g").classed("row_label_container",!0).attr("transform","translate("+a.viz.norm_labels.width.row+",0)").append("g").classed("row_label_zoom_container",!0):r.select(a.root+" .row_label_container").attr("transform","translate("+a.viz.norm_labels.width.row+",0)"),a.viz.ds_level===-1&&o(t,"all",e)}},function(t,e,r){"use strict";var o=r(2),a=r(51),n=r(52),i=r(66);t.exports=function(t){var e=arguments.length<=1||void 0===arguments[1]?"all":arguments[1],r=arguments.length<=2||void 0===arguments[2]?0:arguments[2],s=t.params,l=[];"all"===e?l=s.network_data.row_nodes:_.each(s.network_data.row_nodes,function(t){_.contains(e,t.name)&&l.push(t)});var c=d3.select(s.root+" .row_label_zoom_container").selectAll("g").data(l,function(t){return t.name}).enter().append("g").classed("row_label_group",!0),d=s.network_data.row_nodes_names;c.attr("transform",function(t){var e=_.indexOf(d,t.name);return"translate(0,"+s.viz.y_scale(e)+")"}),c.on("dblclick",function(e){var r="__data__",o=this[r].name;n(t,this,o),s.tile_click_hlight&&a(this,e.ini)}),i(s),c.insert("rect").style("opacity",0),c.append("text").attr("y",.5*s.viz.rect_height+.35*s.labels.default_fs_row).attr("text-anchor","end").style("font-size",s.labels.default_fs_row+"px").text(function(t){return o.normal_name(t)}).attr("pointer-events","none").style("opacity",0).style("cursor","default").transition().delay(r).duration(r).style("opacity",1),c.each(function(){var t=d3.select(this).select("text")[0][0].getBBox();d3.select(this).select("rect").attr("x",t.x).attr("y",0).attr("width",t.width).attr("height",s.viz.y_scale.rangeBand()).style("fill",function(){var t="yellow";return t}).style("opacity",function(t){var e=0;return 1===t.target&&(e=1),e})}),o.has(s.network_data.row_nodes[0],"value")&&c.append("rect").classed("row_bars",!0).attr("width",function(t){var e=0;return e=s.labels.bar_scale_row(Math.abs(t.value))}).attr("x",function(t){var e=0;return e=-s.labels.bar_scale_row(Math.abs(t.value))}).attr("height",s.viz.y_scale.rangeBand()).attr("fill",function(t){return t.value>0?s.matrix.bar_colors[0]:s.matrix.bar_colors[1]}).attr("opacity",.4)}},function(t,e){"use strict";t.exports=function(t,e,r){if(r!=t.click_hlight_row){var o=6,a=.85,n=o*t.viz.border_width.x;d3.selectAll(t.root+" .click_hlight").remove(),d3.select(e).append("rect").classed("click_hlight",!0).classed("row_top_hlight",!0).attr("width",t.viz.svg_dim.width).attr("height",n).attr("fill",t.matrix.hlight_color).attr("opacity",a),d3.select(e).append("rect").classed("click_hlight",!0).classed("row_bottom_hlight",!0).attr("width",t.viz.svg_dim.width).attr("height",n).attr("fill",t.matrix.hlight_color).attr("opacity",a).attr("transform",function(){var e=t.viz.y_scale.rangeBand()-n;return"translate(0,"+e+")"})}else d3.selectAll(t.root+" .click_hlight").remove(),t.click_hlight_row=-666}},function(t,e,r){"use strict";var o=r(53),a=r(54),n=r(36),i=r(65),s=r(27);t.exports=function(t,e,r){var l=t.params,c=i(l);if(1===c.zoom_y&&1===c.zoom_x){l.viz.inst_order.row="custom",a(t,"col"),d3.selectAll(l.root+" .toggle_col_order .btn").classed("active",!1),l.viz.run_trans=!0;var d=$.extend(!0,{},l.matrix.matrix),u=l.network_data.row_nodes,p=l.network_data.col_nodes,v=[];u.forEach(function(t){v.push(t.name)}),r=_.indexOf(v,r),v=[],p.forEach(function(t,e){v.push(d[r].row_data[e].value)});var f=d3.range(v.length).sort(function(t,e){return v[e]-v[t]});l.viz.x_scale.domain(f),l.matrix.orders.custom_row=f;var m;m=l.network_data.links.length>l.matrix.def_large_matrix?d3.select(l.root+" .viz_svg"):d3.select(l.root+" .viz_svg").transition().duration(2500);var h=l.network_data.col_nodes_names;m.select(".col_zoom_container").selectAll(".col_label_text").attr("transform",function(t){var e=_.indexOf(h,t.name);return"translate("+l.viz.x_scale(e)+")rotate(-90)"}),m.selectAll(".col_cat_group").attr("transform",function(t){var e=_.indexOf(h,t.name);return"translate("+l.viz.x_scale(e)+",0)"}),l.viz.ds_level===-1&&(m.selectAll(".tile").attr("transform",function(t){return"translate("+l.viz.x_scale(t.pos_x)+",0)"}),m.selectAll(".tile_up").attr("transform",function(t){return"translate("+l.viz.x_scale(t.pos_x)+",0)"}),m.selectAll(".tile_dn").attr("transform",function(t){return"translate("+l.viz.x_scale(t.pos_x)+",0)"})),d3.selectAll(l.root+" .row_label_group").select("rect").style("opacity",0),d3.select(e).select("rect").style("opacity",1),o(l),l.network_data.links.forEach(function(t){t.x=l.viz.x_scale(t.target),t.y=l.viz.y_scale(t.source)}),l.zoom_info=n(),setTimeout(function(){l.viz.run_trans=!1},2500),l.viz.ds_num_levels>0&&l.viz.ds_level>=0&&s(l)}}},function(t,e){"use strict";t.exports=function(t){var e=6,r=e*t.viz.border_width.x,o=e*t.viz.border_width.y;d3.select(t.root+" .top_hlight").attr("width",t.viz.x_scale.rangeBand()).attr("height",o).transition().duration(2500).attr("transform",function(){return"translate("+t.viz.x_scale(t.matrix.click_hlight_x)+",0)"}),d3.select(t.root+" .left_hlight").attr("width",r).attr("height",t.viz.y_scale.rangeBand()-.99*o).transition().duration(2500).attr("transform",function(){return"translate("+t.viz.x_scale(t.matrix.click_hlight_x)+","+.99*o+")"}),d3.select(t.root+" .right_hlight").attr("width",r).attr("height",t.viz.y_scale.rangeBand()-.99*o).transition().duration(2500).attr("transform",function(){var e=t.viz.x_scale(t.matrix.click_hlight_x)+t.viz.x_scale.rangeBand()-r;return"translate("+e+","+.99*o+")"}),d3.select(t.root+" .bottom_hlight").attr("width",function(){return t.viz.x_scale.rangeBand()-1.98*r}).attr("height",o).transition().duration(2500).attr("transform",function(){var e=t.viz.x_scale(t.matrix.click_hlight_x)+.99*r,a=t.viz.y_scale.rangeBand()-o;return"translate("+e+","+a+")"})}},function(t,e,r){"use strict";var o=r(55);t.exports=function(t,e){var r=arguments.length<=2||void 0===arguments[2]?1500:arguments[2],a=t.params;"row"===e&&"clust"===a.viz.inst_order.col&&setTimeout(o,r,t,"row",!0),"col"===e&&"clust"===a.viz.inst_order.row&&setTimeout(o,r,t,"col",!0),"clust"!=a.viz.inst_order.row&&a.viz.dendro_filter.col===!1&&(d3.selectAll(a.root+" .col_dendro_group").style("opacity",0).on("mouseover",null).on("mouseout",null),d3.select(a.root+" .col_slider_group").style("opacity",0),d3.selectAll(a.root+" .col_dendro_crop_buttons").style("opacity",0).on("mouseover",null).on("mouseout",null)),"clust"!=a.viz.inst_order.col&&a.viz.dendro_filter.row===!1&&(d3.selectAll(a.root+" .row_dendro_group").style("opacity",0).on("mouseover",null).on("mouseout",null).on("click",null),d3.select(a.root+" .row_slider_group").style("opacity",0),d3.selectAll(a.root+" .row_dendro_crop_buttons").style("opacity",0).on("mouseover",null).on("mouseout",null))}},function(t,e,r){"use strict";var o=r(56),a=r(57),n=r(58),i=r(48),s=r(60),l=r(63);t.exports=function(t,e){function r(t,r,o){if(d3.select(t).classed("hovering")){var a=d.viz.root_tips+"_"+e+"_dendro_tip";d3.select(a+" .cat_graph").empty()&&null!==d.viz.cat_info[e]&&l(d,e,r,u[o],a,!0),d3.selectAll(d.viz.root_tips+"_"+e+"_dendro_tip").style("opacity",1)}}var c=!(arguments.length<=2||void 0===arguments[2])&&arguments[2],d=t.params;"both"===e&&(e="row");var _;_="row"===e?"col":"row","clust"===d.viz.inst_order[_]&&d3.select(d.root+" ."+e+"_slider_group").style("opacity",1);var u;u="row"===e?o(d):a(d),d3.select(t.params.root+" ."+e+"_dendro_crop_buttons").empty()===!1&&s(t,e);var p=d.viz.dendro_opacity,v=500;d3.selectAll(t.params.viz.root_tips+"_"+e+"_dendro_tip").remove();var f;d3.selectAll(d.root+" ."+e+"_dendro_group").empty()?f=!1:(f=!0,d3.selectAll(d.root+" ."+e+"_dendro_group").remove());var m=0,h=-5,g=i().attr("class",function(){var t=d.viz.root_tips.replace(".",""),r=t+" d3-tip "+t+"_"+e+"_dendro_tip";return r}).direction("nw").offset([m,h]).style("display","none").style("opacity",0);g.html(function(){var t='
Click for cluster information
and additional options.';return t}),c&&(f=!1);var w,y,x,b,z,k,A=d3.select(d.root+" ."+e+"_dendro_container").selectAll("path").data(u,function(t){return t.name}).enter().append("path").style("opacity",0).attr("class",e+"_dendro_group").style("fill","black");A.attr("d",function(t){"row"===e?(w=0,y=t.pos_top,x=30,b=t.pos_mid,z=0,k=t.pos_bot):(w=t.pos_top,y=0,x=t.pos_mid,b=30,z=t.pos_bot,k=0);var r="M"+w+","+y+", L"+x+", "+b+", L"+z+","+k+" Z";return r}),A.on("mouseover",function(o,a){d3.select(this).classed("hovering",!0),null!=t.params.dendro_callback&&t.params.dendro_callback(this),d3.select(d.viz.root_tips+"_"+e+"_dendro_tip").style("display","block"),n(d,this,o,e),g.show(o),d3.select(d.viz.root_tips+"_"+e+"_dendro_tip").style("opacity",0),setTimeout(r,v,this,o,a)}).on("mouseout",function(){"clust"===d.viz.inst_order[_]&&d3.select(this).style("opacity",p),d3.selectAll(d.root+" .dendro_shadow").remove(),d3.select(this).classed("hovering",!1),g.hide(this)}).on("click",function(r,o){$(d.root+" .dendro_info").modal("toggle");var a=r.all_names.join(", ");d3.select(d.root+" .dendro_info input").attr("value",a);var n=d.root+" .dendro_info";d3.selectAll(".dendro_info .cluster_info_container .cat_graph").remove(),null!==d.viz.cat_info[e]&&l(d,e,r,u[o],n),null!=t.params.dendro_click_callback&&t.params.dendro_click_callback(this)}).call(g);var T;T="clust"===d.viz.inst_order[_]?p:0,f?d3.select(d.root+" ."+e+"_dendro_container").selectAll("path").transition().delay(1e3).duration(1e3).style("opacity",T):d3.select(d.root+" ."+e+"_dendro_container").selectAll("path").style("opacity",T)}},function(t,e){"use strict";t.exports=function(t){var e={},r=t.group_level.row,o=t.network_data.row_nodes,a=t.network_data.row_nodes_names;_.each(o,function(o){var n=o.group[r],i=_.indexOf(a,o.name),s=t.viz.y_scale(i),l=s+t.viz.y_scale.rangeBand();_.has(e,n)===!1&&(e[n]={},e[n].name_top=o.name,e[n].name_bot=o.name,e[n].pos_top=s,e[n].pos_bot=l,e[n].pos_mid=(s+l)/2,e[n].name=n,e[n].all_names=[],e[n].inst_rc="row"),e[n].all_names.push(o.name),se[n].pos_bot&&(e[n].name_bot=o.name,e[n].pos_bot=l,e[n].pos_mid=(e[n].pos_top+l)/2)});var n=[];return _.each(e,function(t){n.push(t)}),n}},function(t,e){"use strict";t.exports=function(t){var e={},r=t.group_level.col,o=t.network_data.col_nodes,a=t.network_data.col_nodes_names;_.each(o,function(o){var n=o.group[r],i=_.indexOf(a,o.name),s=t.viz.x_scale(i),l=s+t.viz.x_scale.rangeBand();_.has(e,n)===!1&&(e[n]={},e[n].name_top=o.name,e[n].name_bot=o.name,e[n].pos_top=s,e[n].pos_bot=l,e[n].pos_mid=(s+l)/2,e[n].name=n,e[n].all_names=[],e[n].inst_rc="col"),e[n].all_names.push(o.name),se[n].pos_bot&&(e[n].name_bot=o.name,e[n].pos_bot=l,e[n].pos_mid=(e[n].pos_top+l)/2)});var n=[];return _.each(e,function(t){n.push(t)}),n}},function(t,e,r){"use strict";var o=r(59);t.exports=function(t,e,r,a){function n(){d3.select(e).classed("hovering")&&t.is_slider_drag===!1&&(d3.select(e).style("opacity",.7),d3.select(t.viz.viz_svg).classed("running_update")===!1&&i())}function i(){"row"===a?"clust"===t.viz.inst_order.col&&o(t,e,a,r):"col"===a?"clust"===t.viz.inst_order.row&&o(t,e,a,r):"both"===a&&("clust"===t.viz.inst_order.col&&o(t,e,"row",r),"clust"===t.viz.inst_order.row&&o(t,e,"col",r))}d3.selectAll(t.root+" ."+a+"_dendro_crop_buttons")[0].length>1?setTimeout(n,500):d3.selectAll(t.root+" .dendro_shadow").remove()}},function(t,e){"use strict";t.exports=function(t,e,r,o){var a,n=.2;d3.selectAll(t.root+" .dendro_shadow").remove(),"row"==r?(d3.select(t.root+" .clust_group").append("rect").style("width",t.viz.clust.dim.width+"px").style("height",o.pos_top+"px").style("fill","black").classed("dendro_shadow",!0).style("opacity",n),a=t.viz.clust.dim.height-o.pos_bot,d3.select(t.root+" .clust_group").append("rect").style("width",t.viz.clust.dim.width+"px").style("height",a+"px").attr("transform","translate(0,"+o.pos_bot+")").style("fill","black").classed("dendro_shadow",!0).style("opacity",n)):"col"===r&&(d3.select(t.root+" .clust_group").append("rect").style("width",o.pos_top+"px").style("height",t.viz.clust.dim.height+"px").style("fill","black").classed("dendro_shadow",!0).style("opacity",n),a=t.viz.clust.dim.width-o.pos_bot,d3.select(t.root+" .clust_group").append("rect").style("width",a+"px").style("height",t.viz.clust.dim.height+"px").attr("transform","translate("+o.pos_bot+",0)").style("fill","black").classed("dendro_shadow",!0).style("opacity",n))}},function(t,e,r){"use strict";var o=r(56),a=r(57),n=r(48),i=r(58),s=r(61),l=r(62);t.exports=function(t,e){function r(t){d3.select(t).classed("hovering")&&d3.selectAll(_.viz.root_tips+"_"+e+"_dendro_crop_tip").style("opacity",1).style("display","block")}var c,d,_=t.params,u=.6*_.viz.dendro_opacity;"row"===e?(c=o(_),d="col"):(c=a(_),d="row");var p=5,v=-5,f=n().attr("class",function(){var t=_.viz.root_tips.replace(".",""),r=t+" d3-tip "+t+"_"+e+"_dendro_crop_tip";return r}).direction("nw").style("display","none").offset([p,v]),m=500;d3.selectAll(_.viz.root_tips+"_"+e+"_dendro_crop_tip").remove(),d3.selectAll(_.root+" ."+e+"_dendro_crop_buttons").remove();var h,g,w,y,x,b,z,k,A,T,S=45,E=.25,B=e+"_dendro_crop_buttons";d3.select(t.params.root+" ."+e+"_dendro_icons_group").classed("ran_filter")===!1?(h=d3.select(_.root+" ."+e+"_dendro_icons_group").selectAll("path").data(c,function(t){return t.name}).enter().append("path").classed(B,!0).attr("d",function(t){k=10,A=10;var r=t.pos_bot-t.pos_top;"row"===e?(r0){var l=d3.select(n+" .cluster_info_container"),c=": ",d="

",u=300,p=23,v=20,f=30,m=205,h=27,g=107,w=4,y=5,x=140,b=!1;null!=s[0].bar_data[0][y]&&(u+=x,g+=x,b=!0);var z=w;b&&(z=y);var k=3,A=25,T=20;_.each(s.slice(0,k),function(t){var e=t.bar_data.length;e>A&&(e=A),T+=h*(e+1)}),i&&l.append("text").text("Cluster Information");var S=l.append("div").style("margin-top","5px").classed("cat_graph",!0).append("svg").style("height",T+"px").style("width",u+"px");S.append("rect").classed("cat_background",!0).attr("height",T+"px").attr("width",u+"px").attr("fill","white").attr("opacity",1);var E=h;if(s=s.slice(0,k),_.each(s,function(e){var r=e.bar_data[0][z],o=d3.scale.linear().domain([0,1e5]).range([30,40]);e.bar_data=e.bar_data.slice(0,A),l.style("margin-bottom","5px");var a=S.append("g").classed("cat_graph_group",!0).attr("transform","translate(10, "+E+")");E+=h*(e.bar_data.length+1);var n=e.type_name;n.length>=f&&(n=n.slice(0,f)+".."),a.append("text").classed("cat_graph_title",!0).text(n).style("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').style("font-weight",800);var i=o(r);a.append("text").text("Count").attr("transform",function(){var t=m+i,e="translate("+t+", 0)";return e}),b&&a.append("text").text("Cluster-Count").attr("transform",function(){var t=m+110,e="translate("+t+", 0)";return e});var s=4;a.append("line").attr("x1",0).attr("x2",m).attr("y1",s).attr("y2",s).attr("stroke","blue").attr("stroke-width",1).attr("opacity",1);var _=a.append("g").classed("cat_bar_container",!0).attr("transform","translate(0, 10)"),u=_.selectAll("g").data(e.bar_data).enter().append("g").attr("transform",function(t,e){var r=e*p;return"translate(0,"+r+")"}),g=d3.scale.linear().domain([0,r]).range([0,m]);u.append("rect").attr("height",v+"px").attr("width",function(t){var e=g(t[z]);return e+"px"}).attr("fill",function(t){return t[3]}).attr("opacity",t.viz.cat_colors.opacity).attr("stroke","grey").attr("stroke-width","0.5px"),u.append("text").classed("bar_labels",!0).text(function(t){var e=t[1];return e.indexOf(c)>0&&(e=e.split(c)[1]),e.indexOf(d)>0&&(e=e.split(d)[0]),e.length>=f&&(e=e.slice(0,f)+".."),e}).attr("transform",function(){return"translate(5, "+.75*v+")"}).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("font-weight",400).attr("text-anchor","right");var y=35;u.append("text").classed("count_labels",!0).text(function(t){return String(t[z].toLocaleString())}).attr("transform",function(){var t=m+i+y,e=.75*v;return"translate("+t+", "+e+")"}).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("font-weight",400).attr("text-anchor","end"),b&&u.append("text").classed("count_labels",!0).text(function(t){return String(t[w].toLocaleString())}).attr("transform",function(){var t=m+y+x+20,e=.75*v;return"translate("+t+", "+e+")"}).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("font-weight",400).attr("text-anchor","end")}),i){var B=d3.select(n),O=B.style("top").split(".px")[0],M=B.style("left").split(".px")[0],N=0,C=0;"row"===e?(N=0,C=g,a.pos_top=0&&n.push(t)});var c=[];if(null!==t.viz.cat_info[r]){for(var d,u,p,v=t.viz.cat_info[r],f=_.keys(v),m=[],h=[],g=0;g0){var A,T=a.length;_.each(m,function(e){if(u=e.split("-")[1],d=h[u],k)if(e.indexOf("-")>=0){var o=parseInt(e.split("-")[1],b)+1;d="Category "+String(o)}else d="Category";y[d]={},_.each(n,function(t){A=t[e],A.indexOf(": ")>=0&&(A=A.split(": ")[1]),A in y[d]?(y[d][A].num_nodes=y[d][A].num_nodes+1,null!=s&&(y[d][A].num_nodes_ds=y[d][A].num_nodes_ds+parseInt(t[s].split(": ")[1],b))):(y[d][A]={},y[d][A].num_nodes=1,null!=s&&(y[d][A].num_nodes_ds=parseInt(t[s].split(": ")[1],b)))}),x={},x.type_name=d,x.num_in_clust=T,w=[];var a,i,l=y[d];for(var p in l){i=k?p:d+": "+p;var v=l[p].num_nodes;if(_.has(l[p],"num_nodes_ds"))var f=l[p].num_nodes_ds;else f=null;a=t.viz.cat_colors[r][e][i],w.push([e,i,l[p],a,v,f])}w.sort(function(t,e){return e[z]-t[z]}),x.bar_data=w,c.push(x)})}}return c}},function(t,e){"use strict";t.exports=function(t){var e={},r=d3.select(t.root+" .clust_group").attr("transform");return null!=r&&r.indexOf("scale")>0?(e.zoom_x=parseFloat(r.split("scale")[1].replace("(","").replace(")","").split(",")[0]),e.zoom_y=parseFloat(r.split("scale")[1].replace("(","").replace(")","").split(",")[1])):(e.zoom_x=1,e.zoom_y=1),e}},function(t,e,r){"use strict";var o=r(48);t.exports=function(t){if(t.labels.show_label_tooltips){d3.selectAll(t.viz.root_tips+"_row_tip").remove();var e=t.viz.root_tips.replace(".",""),r=o().attr("class",function(){var t=e+" d3-tip "+e+"_row_tip";return t}).direction("e").offset([0,10]).style("display","none").html(function(t){var e=t.name.replace(/_/g," ").split("#")[0];return""+e+""});d3.select(t.viz.viz_wrapper).select(t.root+" .row_container").call(r),d3.select(t.root+" .row_label_zoom_container").selectAll("g").on("mouseover",function(e){d3.select(t.viz.root_tips+"_row_tip").classed(e.name,!0),d3.selectAll(t.viz.root_tips+"_row_tip").style("display","block"),d3.select(this).select("text").classed("active",!0),r.show(e),null!=t.row_tip_callback&&t.row_tip_callback(t.viz.root_tips,e)}).on("mouseout",function(e){d3.selectAll(t.viz.root_tips+"_row_tip").style("display","none").classed(e.name,!1),d3.select(this).select("text").classed("active",!1),r.hide(e)})}else d3.select(t.root+" .row_label_zoom_container").selectAll("g").on("mouseover",function(){d3.select(this).select("text").classed("active",!0)}).on("mouseout",function(){d3.select(this).select("text").classed("active",!1)})}},function(t,e,r){"use strict";var o=r(2),a=r(68),n=r(69),i=r(52),s=r(73),l=r(74);t.exports=function(t){var e,r=arguments.length<=1||void 0===arguments[1]?0:arguments[1],c=t.params,d=c.network_data.col_nodes,_=c.viz.x_scale.rangeBand()/2+c.viz.border_width.x;d3.select(c.root+" .col_container").empty()?(e=d3.select(c.viz.viz_svg).append("g").attr("class","col_container").attr("transform","translate("+c.viz.clust.margin.left+","+c.viz.norm_labels.margin.top+")"),e.append("rect").attr("fill",c.viz.background_color).attr("width",30*c.viz.clust.dim.width+"px").attr("height",c.viz.label_background.col).attr("class","white_bars"),e.append("g").attr("class","col_label_outer_container").attr("transform","translate(0,"+c.viz.norm_labels.width.col+")").append("g").attr("class","col_zoom_container")):(e=d3.select(c.root+" .col_container").attr("transform","translate("+c.viz.clust.margin.left+","+c.viz.norm_labels.margin.top+")"),e.select(".white_bars").attr("fill",c.viz.background_color).attr("width",30*c.viz.clust.dim.width+"px").attr("height",c.viz.label_background.col), +e.select(c.root+" .col_label_outer_container"));var u=d3.select(c.root+" .col_zoom_container").selectAll(".col_label_text").data(d,function(t){return t.name}).enter().append("g").attr("class","col_label_text").attr("transform",function(t){var e=t.col_index;return"translate("+c.viz.x_scale(e)+", 0) rotate(-90)"}),p=u.append("g").attr("class","col_label_group").attr("transform","translate("+c.viz.x_scale.rangeBand()/2+","+_+") rotate(45)").on("mouseover",function(){d3.select(this).select("text").classed("active",!0)}).on("mouseout",function(){d3.select(this).select("text").classed("active",!1)});o.has(c.network_data.col_nodes[0],"value")&&p.append("rect").attr("class","col_bars").attr("width",function(t){var e=0;return t.value>0&&(e=c.labels.bar_scale_col(t.value)),e}).attr("height",.66*c.viz.x_scale.rangeBand()).style("fill",function(t){return t.value>0?c.matrix.bar_colors[0]:c.matrix.bar_colors[1]}).attr("opacity",.6),p.append("text").attr("x",0).attr("y",.64*c.viz.x_scale.rangeBand()).attr("dx",c.viz.border_width.x).attr("text-anchor","start").attr("full_name",function(t){return t.name}).style("font-size",c.labels.default_fs_col+"px").style("cursor","default").text(function(t){return o.normal_name(t)}).style("opacity",0).transition().delay(r).duration(r).style("opacity",1),s(c),p.append("path").style("stroke-width",0).attr("d",function(){return l(c)}).attr("fill","#eee").style("opacity",0).transition().delay(r).duration(r).style("opacity",c.viz.triangle_opacity),d3.selectAll(c.root+" .col_label_text").on("click",function(t){"function"==typeof c.click_label?(c.click_label(t.name,"col"),a(c,this,t.ini)):c.tile_click_hlight&&a(c,this,t.ini)}).on("dblclick",function(e){var r="__data__",o=this[r].name;if(c.sim_mat){n(t,this,o);var s=d3.selectAll(c.root+" .row_label_group").filter(function(t){return t.name==o})[0][0];i(t,s,o)}else n(t,this,o);c.tile_click_hlight&&a(c,this,e.ini)})}},function(t,e){"use strict";t.exports=function(t,e,r){if(r!=t.click_hlight_col){t.click_hlight_col=r;var o=6,a=.85,n=o*t.viz.border_width.x;d3.selectAll(t.root+" .click_hlight").remove(),d3.select(e).append("rect").classed("click_hlight",!0).classed("col_top_hlight",!0).attr("width",t.viz.clust.dim.height).attr("height",n).attr("fill",t.matrix.hlight_color).attr("opacity",a).attr("transform",function(){var e=0,r=-(t.viz.clust.dim.height+t.viz.cat_room.col+t.viz.uni_margin);return"translate("+r+","+e+")"}),d3.select(e).append("rect").classed("click_hlight",!0).classed("col_bottom_hlight",!0).attr("width",t.viz.clust.dim.height).attr("height",n).attr("fill",t.matrix.hlight_color).attr("opacity",a).attr("transform",function(){var e=t.viz.x_scale.rangeBand()-n,r=-(t.viz.clust.dim.height+t.viz.cat_room.col+t.viz.uni_margin);return"translate("+r+","+e+")"})}else d3.selectAll(t.root+" .click_hlight").remove(),t.click_hlight_col=-666}},function(t,e,r){"use strict";var o=r(53),a=r(54),n=r(70),i=r(36),s=r(65),l=r(27);t.exports=function(t,e,r){var c=t.params,d=s(c);if(1===d.zoom_y&&1===d.zoom_x){c.viz.inst_order.col="custom",a(t,"col"),d3.selectAll(c.root+" .toggle_row_order .btn").classed("active",!1),c.viz.run_trans=!0;var u=$.extend(!0,{},c.matrix.matrix),p=c.network_data.row_nodes,v=c.network_data.col_nodes,f=[];v.forEach(function(t){f.push(t.name)});var m=_.indexOf(f,r);f=[],p.forEach(function(t,e){f.push(u[e].row_data[m].value)});var h=d3.range(f.length).sort(function(t,e){return f[e]-f[t]});c.viz.y_scale.domain(h),c.matrix.orders.custom_col=h;var g,w=c.network_data.row_nodes_names;if(g=c.network_data.links.length>c.matrix.def_large_matrix?d3.select(c.root+" .viz_svg"):d3.select(c.root+" .viz_svg").transition().duration(2500),g.selectAll(".row_cat_group").attr("transform",function(t){var e=_.indexOf(w,t.name);return"translate(0,"+c.viz.y_scale(e)+")"}),g.select(".row_label_zoom_container").selectAll(".row_label_group").attr("transform",function(t){var e=_.indexOf(w,t.name);return"translate(0,"+c.viz.y_scale(e)+")"}),c.viz.ds_level===-1&&g.selectAll(".row").attr("transform",function(t){var e=_.indexOf(w,t.name);return"translate(0,"+c.viz.y_scale(e)+")"}),d3.selectAll(c.root+" .col_label_text").select(".highlight_rect").style("opacity",0),d3.select(e).select(".highlight_rect").style("opacity",1),c.network_data.links.forEach(function(t){t.x=c.viz.x_scale(t.target),t.y=c.viz.y_scale(t.source)}),o(c),c.zoom_info=i(),setTimeout(function(){c.viz.run_trans=!1},2500),c.viz.ds_num_levels>0&&c.viz.ds_level>=0){l(c);var y=!0,x=!0,b=!0;n(t,y,x,b)}}}},function(t,e,r){"use strict";var o=r(71),a=r(41),n=r(50),i=r(72);t.exports=function(t){var e=!(arguments.length<=1||void 0===arguments[1])&&arguments[1],r=!(arguments.length<=2||void 0===arguments[2])&&arguments[2],s=!(arguments.length<=3||void 0===arguments[3])&&arguments[3],l=t.params,c=l.zoom_info,d=l.viz.ds_level,u=l.viz.ds_level;null===l.viz.ds?d=-1:(d=Math.floor(Math.log(c.zoom_y)/Math.log(l.viz.ds_zt)),d>l.viz.ds_num_levels-1&&(d=-1));var p=!1;u==-1?d>=0&&(p=!0):d=0&&(d3.selectAll(l.root+" .row").remove(),d3.selectAll(l.viz.root_tips+"_tile_tip").remove(),d3.selectAll(l.viz.root_tips+"_row_tip").remove());var w;if(v<0?(w=l.matrix.matrix,i(l)):(w=l.matrix.ds_matrix[v],d3.selectAll(l.root+" .row_cat_group path").remove()),r===!0&&d3.selectAll(l.root+" .row_cat_group path").remove(),e===!0&&(v>=0?d3.selectAll(l.root+" .ds"+String(v)+"_row").each(function(t){_.contains(l.viz.viz_nodes.row,t.name)===!1&&d3.select(this).remove()}):d3.selectAll(l.root+" .row").each(function(t){_.contains(l.viz.viz_nodes.row,t.name)===!1&&d3.select(this).remove()}),d3.selectAll(l.root+" .row_label_group").each(function(t){_.contains(l.viz.viz_nodes.row,t.name)===!1&&d3.select(this).remove()}),v!=u&&(h=l.viz.viz_nodes.row,d3.selectAll(l.root+" .ds"+String(u)+"_row").remove())),(h.length>=1||"all"===h)&&a(l,w,h,v),v===-1&&(r===!1||e)){var y=[];d3.selectAll(l.root+" .row_label_group").each(function(t){y.push(t.name)});var x=_.difference(l.viz.viz_nodes.row,y),b=1;x.length>b&&n(t,x)}}},function(t,e){"use strict";t.exports=function(t,e){var r,o=[],a=[],n=t.viz.y_scale,i=t.viz.ds_level,s=t.network_data.row_nodes_names,l=".row";i>=0&&(n=t.viz.ds[i].y_scale,s=d3.range(t.matrix.ds_matrix[i].length).map(String),l=".ds"+String(i)+"_row");for(var c=0;ce.min_y&&o.push(s[c]);d3.selectAll(t.root+" "+l).each(function(t){a.push(t.name)}),t.viz.viz_nodes.row=o,t.viz.viz_nodes.curr_row=a}},function(t,e){"use strict";t.exports=function(t){d3.select(t.root+" .row_cat_group path").empty()===!0&&d3.selectAll(t.root+" .row_cat_group").append("path").attr("d",function(){var e=t.viz.cat_room.symbol_width-1,r=0,o=1,a=t.viz.y_scale.rangeBand()/2,n=t.viz.cat_room.symbol_width-1,i=t.viz.y_scale.rangeBand(),s="M "+e+","+r+" L "+o+","+a+", L "+n+","+i+" Z";return s}).attr("fill","#eee").style("opacity",t.viz.triangle_opacity)}},function(t,e,r){"use strict";var o=r(48);t.exports=function(t){if(t.labels.show_label_tooltips){d3.selectAll(t.viz.root_tips+"_col_tip").remove();var e=o().attr("class",function(){var e=t.viz.root_tips.replace(".",""),r=e+" d3-tip "+e+"_col_tip";return r}).direction("w").offset([20,0]).style("display","none").html(function(t){var e=t.name.replace(/_/g," ").split("#")[0];return""+e+""});d3.select(t.viz.viz_wrapper).select("svg").select(t.root+" .col_zoom_container").selectAll(".col_label_group").select("text").call(e),d3.select(t.root+" .col_zoom_container").selectAll(".col_label_group").on("mouseover",function(r){d3.selectAll(t.viz.root_tips+"_col_tip").style("display","block"),e.show(r),null!=t.col_tip_callback&&t.col_tip_callback(r)}).on("mouseout",function(){e.hide(this),d3.selectAll(t.viz.root_tips+"_col_tip").style("display","none")})}}},function(t,e){"use strict";t.exports=function(t){var e=.36*t.viz.x_scale.rangeBand(),r=-t.viz.border_width.x,o=0,a=t.viz.x_scale.rangeBand()-e,n=-(t.viz.x_scale.rangeBand()-e+t.viz.border_width.x),i=-t.viz.border_width.x,s="M "+r+",0 L "+n+","+o+", L "+i+","+a+" Z";return s}},function(t,e){"use strict";t.exports=function(t){d3.select(t.viz.viz_svg).append("rect").attr("fill",t.viz.background_color).attr("height",t.viz.super_labels.dim.width+"px").attr("width","3000px").classed("super_col_bkg",!0).classed("white_bars",!0).attr("transform","translate("+t.viz.clust.margin.left+","+t.viz.super_labels.margin.top+")"),d3.select(t.viz.viz_svg).append("text").attr("class","super_col").text(t.labels["super"].col).attr("text-anchor","center").attr("transform",function(){var e=d3.select(this)[0][0].getBBox().width,r=t.viz.clust.dim.width/2+t.viz.norm_labels.width.row-e/2,o=t.viz.super_labels.dim.width;return"translate("+r+","+o+")"}).style("font-size",function(){var e=t.labels.super_label_fs*t.labels.super_label_scale;return e+"px"}).style("font-weight",300),d3.select(t.viz.viz_svg).append("rect").attr("fill",t.viz.background_color).attr("width",t.viz.super_labels.dim.width+"px").attr("height","3000px").classed("super_row_bkg",!0).classed("white_bars",!0).attr("transform","translate("+t.viz.super_labels.margin.left+",0)"),d3.select(t.viz.viz_svg).append("g").classed("super_row",!0).attr("transform",function(){var e=t.viz.super_labels.dim.width,r=t.viz.clust.dim.height/2+t.viz.norm_labels.width.col;return"translate("+e+","+r+")"}),d3.select(t.root+" .super_row").append("text").text(t.labels["super"].row).attr("text-anchor","center").attr("transform",function(){var e=d3.select(this)[0][0].getBBox().width,r=e/2+t.viz.norm_labels.width.col,o="translate(0,"+r+"), rotate(-90)";return o}).style("font-size",function(){var e=t.labels.super_label_fs*t.labels.super_label_scale;return e+"px"}).style("font-weight",300)}},function(t,e,r){"use strict";var o=r(77),a=r(78),n=r(86),i=r(60);t.exports=function(t){var e=t.params,r=e.viz;d3.select(r.root+" .col_container").append("path").style("stroke-width","0").attr("d","M 0,0 L 1000,-1000, L 1000,0 Z").attr("fill",r.background_color).attr("class","right_slant_triangle").attr("transform","translate("+r.clust.dim.width+","+r.norm_labels.width.col+")"),d3.select(r.root+" .col_container").append("path").style("stroke-width","0").attr("d","M 0,0 L 500,-500, L 0,-500 Z").attr("fill",r.background_color).attr("class","left_slant_triangle").attr("transform","translate(-1,"+r.norm_labels.width.col+")");var s=r.clust.margin.top+r.uni_margin/5;d3.select(r.viz_svg).append("rect").attr("fill",r.background_color).attr("width",r.clust.margin.left).attr("height",s).attr("class","top_left_white");var l=r.cat_room.col+1.5*r.uni_margin;d3.select(r.viz_svg).append("rect").attr("fill",r.background_color).attr("width",2*r.clust.dim.width).attr("height",l).attr("class","top_right_white").attr("transform",function(){var t=r.clust.margin.left+r.clust.dim.width,e=r.norm_labels.width.col+r.norm_labels.margin.top-r.uni_margin;return"translate("+t+", "+e+")"}),p=r.clust.margin.left+r.clust.dim.width+r.uni_margin,v=r.norm_labels.margin.top+r.norm_labels.width.col+2.5*r.uni_margin;var c=1.15*r.cat_room.symbol_width,d=.65,_=1.25;r.show_categories.col&&d3.select(r.viz_svg).selectAll().data(r.all_cats.col).enter().append("text").classed("col_cat_super",!0).style("font-size",c+"px").style("opacity",d).style("cursor","default").attr("transform",function(t){var e=parseInt(t.split("-")[1],10),o=v+_*r.cat_room.symbol_width*e;return"translate("+p+","+o+")"}).text(function(t){return o(r,t,"col")}),n(t),v=r.show_dendrogram?r.clust.margin.top+r.clust.dim.height+r.dendro_room.col-2*r.uni_margin:r.clust.margin.top+r.clust.dim.height;var u=d3.select(r.viz_svg).append("g").classed("bottom_spillover_container",!0).attr("transform",function(){return"translate(0,"+v+")"});u.append("rect").attr("class","bottom_spillover").attr("fill",r.background_color).attr("width",r.svg_dim.width).attr("height",2*r.svg_dim.height),p=r.clust.margin.left,v=0,u.append("g").classed("col_dendro_icons_container",!0).attr("transform","translate("+p+","+v+")").append("g").classed("col_dendro_icons_group",!0),i(t,"col");var p=r.clust.margin.left+r.clust.dim.width,v=r.clust.margin.top+r.clust.dim.height,f=r.cat_room.col+r.clust.dim.width,m=r.cat_room.row+10*r.uni_margin;d3.select(r.viz_svg).append("rect").attr("fill",r.background_color).attr("width",f).attr("height",m).attr("transform",function(){return"translate("+p+","+v+")"}).classed("white_bars",!0).classed("dendro_corner_spillover",!0),p=0,v=r.clust.margin.top+r.clust.dim.height,f=r.clust.margin.left,m=10*r.clust.dim.height,d3.select(r.viz_svg).append("rect").attr("fill",r.background_color).attr("width",f).attr("height",m).attr("transform",function(){return"translate("+p+","+v+")"}).classed("white_bars",!0).classed("dendro_col_spillover",!0),a(t)}},function(t,e){"use strict";t.exports=function(t,e,r){var o;if(t.cat_names[r][e]===e){var a=parseInt(e.split("-")[1],10)+1;o="Category "+a}else o=t.cat_names[r][e];return o}},function(t,e,r){"use strict";var o=r(79);t.exports=function(t){var e=t.params;_.each(["row","col"],function(r){e.viz.show_categories[r]&&d3.selectAll(e.root+" ."+r+"_cat_super").on("dblclick",function(){e.sim_mat&&(r="both"),d3.selectAll(e.root+" .toggle_"+r+"_order .btn").classed("active",!1);var a=this.__data__.replace("-","_")+"_index";e.viz.sim_mat?(o(t,a,"row"),o(t,a,"col")):o(t,a,r)})})}},function(t,e,r){"use strict";var o=r(54),a=r(70),n=r(36),i=r(27),s=r(80),l=r(65);t.exports=function(t,e,r){var c=t.params,d=l(c),u=0;1==d.zoom_y&&1==d.zoom_x||(s(t,0,0,1),u=1200);var p;"row"===r?p="col":"col"===r&&(p="row"),c.viz.run_trans=!0,"row"===p?c.viz.inst_order.row=e:"col"===p&&(c.viz.inst_order.col=e),c.viz.show_dendrogram&&o(t,r),"row"===p?c.viz.x_scale.domain(c.matrix.orders[c.viz.inst_order.row+"_row"]):"col"==p&&c.viz.y_scale.domain(c.matrix.orders[c.viz.inst_order.col+"_col"]);var v;v=d3.selectAll(c.root+" .tile")[0].length0&&c.viz.ds_level>=0){i(c);var h=!0,g=!0,w=!0;a(t,h,g,w)}setTimeout(function(){c.viz.run_trans=!1},2500)}},function(t,e,r){"use strict";var o=r(2),a=r(81),n=r(70),i=r(36),s=r(85);t.exports=function(t,e,r,l){function c(t,e){d3.selectAll(d.root+" ."+t+"_dendro_crop_buttons").transition().duration(g).style("opacity",e)}var d=t.params;if(d3.selectAll(d.viz.root_tips).style("display","none"),d.zoom_info=i(),n(t),!d.viz.run_trans){var u=d.viz.clust.dim.height/2,p=u/l;if(r>=u-p){var v=u-r,f=-u/l+v;r+=f}r<-(u-p)&&(v=u+r,f=u/l-v,r+=f);var m=l,h=1,g=700,w=-(m-1)*u;d3.select(d.root+" .clust_group").transition().duration(g).attr("transform","translate("+[0,0+w]+") scale("+h+","+m+")translate("+[e,r]+")"),d3.select(d.root+" .row_label_zoom_container").transition().duration(g).attr("transform","translate("+[0,w]+") scale("+m+","+m+")translate("+[0,r]+")"),d3.select(d.root+" .row_cat_container").transition().duration(g).attr("transform","translate("+[0,w]+") scale(1,"+m+")translate("+[0,r]+")"),d3.select(d.root+" .row_dendro_container").transition().duration(g).attr("transform","translate("+[0,w]+") scale("+h+","+m+")translate("+[d.viz.uni_margin/2,r]+")");var y;_.each(["row","col"],function(t){y=d3.select(d.root+" ."+t+"_dendro_crop_buttons").style("opacity"),d3.selectAll(d.root+" ."+t+"_dendro_crop_buttons").style("opacity",0),setTimeout(c,700,t,y)}),d3.select(d.root+" .col_zoom_container").transition().duration(g).attr("transform"," scale("+h+","+h+")translate("+[e,0]+")"),d3.select(d.root+" .col_cat_container").transition().duration(g).attr("transform"," scale("+h+",1)translate("+[e,0]+")"),d3.select(d.root+" .col_dendro_container").transition().duration(g).attr("transform"," scale("+h+",1)translate("+[e,d.viz.uni_margin/2]+")");var x=d.viz.clust.margin.top+w+r*m,b=d.viz.clust.margin.left+e;d.zoom_behavior.scale(m).translate([b,x]),a(d),d3.select(d.root+" .row_label_zoom_container text").empty()===!1&&d3.select(d.root+" .row_label_zoom_container").each(function(){var t=d3.select(this).select("text")[0][0].getBBox();d3.select(this).select("rect").attr("x",.5*t.x).attr("y",0).attr("width",.5*t.width).attr("height",d.viz.y_scale.rangeBand()).style("fill","yellow")}),d3.select(d.root+" .row_dendro_icons_group").attr("transform","translate("+[0,0+w]+") scale("+h+","+m+")translate("+[e,r]+")"),d3.select(d.root+" .row_dendro_icons_group").selectAll("path").attr("transform",function(t){var e=d.viz.uni_margin,r=t.pos_mid;return"translate("+e+","+r+") scale(1, "+1/m+")"}),d3.select(d.root+" .col_dendro_icons_group").attr("transform",function(){var t=" scale("+h+","+m+")";return t}),d3.select(d.root+" .col_dendro_icons_group").selectAll("path").attr("transform",function(t){var e=t.pos_mid,r=d.viz.uni_margin;return"translate("+e+","+r+") scale(1,1)"}),o.has(d.network_data.col_nodes[0],"value")&&d3.selectAll(d.root+" .col_bars").attr("width",function(t){var e=0;return t.value>0&&(e=d.labels.bar_scale_col(t.value)/h),e}),o.has(d.network_data.row_nodes[0],"value")&&d3.selectAll(d.root+" .row_bars").transition().duration(g).attr("width",function(t){var e=0;return e=d.labels.bar_scale_row(Math.abs(t.value))/m}).attr("x",function(t){var e=0;return e=-d.labels.bar_scale_row(Math.abs(t.value))/m}),s(d)}}},function(t,e,r){"use strict";var o=r(2),a=r(82),n=r(83);t.exports=function(t){d3.selectAll(t.root+" .row_label_group").select("text").text(function(t){return o.normal_name(t)}),d3.selectAll(t.root+" .col_label_text").select("text").text(function(t){return o.normal_name(t)}),n(t),d3.selectAll(t.root+" .row_label_group").each(function(){a(t,this,"row")}),d3.selectAll(t.root+" .col_label_group").each(function(){a(t,this,"col")})}},function(t,e){"use strict";t.exports=function(t,e,r){function o(){return d=d3.select(this).text(),c=d.length,u=c-3,l=d.substring(0,u)+".."}function a(t){return d=d3.select(this).text(),c=".."===d.slice(-2)?d.length-2:d.length,_=t.name,u=c+2,l=_.substring(0,u)+"..",l.length>_.length&&(l=_),l}function n(t,e){return s=e<1?t:t*e}if("none"!=d3.select(e).style("display")){var i,s,l,c,d,_,u,p,v=t.viz.norm_labels.width[r];i="row"===r?t.viz.zoom_ratio.y?t.zoom_behavior.scale()/t.viz.zoom_ratio.y:t.zoom_behavior.scale():t.viz.zoom_ratio.x>1?t.zoom_behavior.scale()/t.viz.zoom_ratio.x:t.zoom_behavior.scale();var f;d3.select(e).select("text").each(function(t){f=t.name.length});var m=d3.select(e).select("text").node().getBBox().width;if(s=n(m,i),s>v)for(p=1;pv&&(d3.select(e).select("text").text(o),m=d3.select(e).select("text").node().getBBox().width,s=n(m,i));else if(s<.75*v)for(p=1;pa&&(n.row>t.labels.max_allow_fs?(e=t.viz.zoom_ratio.y?t.zoom_behavior.scale()/t.viz.zoom_ratio.y:t.zoom_behavior.scale(),e<1&&(e=1),r=t.labels.max_allow_fs/e,d3.selectAll(t.root+" .row_label_group").select("text").style("font-size",r+"px").attr("y",.5*t.viz.rect_height+.35*r)):d3.selectAll(t.root+" .row_label_group").select("text").style("font-size",t.labels.default_fs_row+"px").attr("y",.5*t.viz.rect_height+.35*t.labels.default_fs_row)),n.col>a&&(n.col>t.labels.max_allow_fs?(e=t.viz.zoom_ratio.x>1?t.zoom_behavior.scale()/t.viz.zoom_ratio.x:t.zoom_behavior.scale(),e<1&&(e=1),r=t.labels.max_allow_fs/e,r>.7*t.viz.rect_width&&(r=.7*t.viz.rect_width),d3.selectAll(t.root+" .col_label_text").select("text").style("font-size",r+"px")):d3.selectAll(t.root+" .col_label_text").select("text").style("font-size",t.labels.default_fs_col+"px"))}},function(t,e){"use strict";t.exports=function(t){var e={};return t.viz.zoom_ratio.x>1?(e.row=t.labels.default_fs_row*t.zoom_behavior.scale(),e.col=t.labels.default_fs_col*t.zoom_behavior.scale()):(e.row=t.labels.default_fs_row*t.zoom_behavior.scale()/t.viz.zoom_ratio.y,e.col=t.labels.default_fs_col*t.zoom_behavior.scale()),e}},function(t,e){"use strict";t.exports=function(t){t.zoom_info.zoom_x*t.viz.border_width.x>1?d3.selectAll(t.root+" .vert_lines").select("line").style("display","block").style("opacity",0).transition().style("opacity",1):d3.selectAll(t.root+" .vert_lines").select("line").style("display","none"),t.zoom_info.zoom_y*t.viz.border_width.y>1?d3.selectAll(t.root+" .horz_lines").select("line").style("display","block").style("opacity",0).transition().style("opacity",1):d3.selectAll(t.root+" .horz_lines").select("line").style("display","none")}},function(t,e,r){"use strict";var o=r(77),a=r(48);t.exports=function(t){var e=t.params,r=e.viz,n=2.75;d3.select(e.root+" .row_cat_label_container").empty()&&(d3.select(t.params.viz.viz_svg).append("g").classed("row_cat_label_container",!0),d3.select(t.params.viz.viz_svg+" .row_cat_label_container").append("g").classed("row_cat_label_bar_container",!0));var i=r.clust.margin.left+r.clust.dim.width+r.uni_margin,s=r.norm_labels.margin.top+r.norm_labels.width.col+2.5*r.uni_margin,l=1.15*r.cat_room.symbol_width,c=.65,d=1.25;d3.select(e.root+" .row_cat_label_container").attr("transform",function(){return i=r.norm_labels.margin.left+r.norm_labels.width.row+r.cat_room.symbol_width+n*r.uni_margin,s=r.clust.margin.top-r.uni_margin,"translate("+i+","+s+") rotate(-90)"}),d3.selectAll(e.root+" .row_cat_label_container text").remove(),d3.selectAll(e.root+" .row_cat_selection_bar").remove(),d3.selectAll(t.params.viz.root_tips+"_row_cat_super").remove();var u=50,p=-75,v=a().attr("class",function(){var t=e.viz.root_tips.replace(".",""),r=t+" d3-tip "+t+"_row_cat_super";return r}).direction("south_custom").offset([u,p]).style("display","none").style("opacity",0).html(function(t){var a,n=e.network_data.row_nodes[0][t];if(n.indexOf("

")>-1){var i=n.split(": ")[0],s=n.split("

")[1];a=i+"

"+s}else a=o(r,t,"row");return a}),f=d*r.cat_room.symbol_width,m=.9*f;if(d3.select(e.root+" .row_cat_label_container").selectAll().data(r.all_cats.row).enter().append("text").style("width","100px").style("height",m+"px").classed("row_cat_super",!0).style("font-size",l+"px").style("opacity",c).style("cursor","default").attr("transform",function(t){var e=d*r.cat_room.symbol_width*parseInt(t.split("-")[1],10);return"translate(0,"+e+")"}).text(function(t){return o(r,t,"row")}),d3.select(e.root+" .row_cat_label_container").selectAll().data(r.all_cats.row).enter().append("rect").classed("row_cat_super",!0).classed("row_cat_selection_bar",!0).style("height",m+"px").style("fill","green").style("width","120px").style("opacity",0).attr("transform",function(t){var e=f*(parseInt(t.split("-")[1],10)-.75);return"translate(0,"+e+")"}).on("mouseover",function(t){d3.selectAll(e.viz.root_tips+"_row_cat_super").style("display","block").style("opacity",1),v.show(t)}).on("mouseout",function(){v.hide(this),d3.selectAll(".d3-tip").style("display","none"),d3.selectAll(e.viz.root_tips+"_row_cat_super").style("display","none").style("opacity",0)}),d3.select(e.root+" .row_cat_selection_bar").empty()===!1&&d3.selectAll(e.root+" .row_cat_selection_bar").call(v),_.has(e.network_data,"row_cat_bars")){d3.select(e.root+" .enr_title").remove();var h=d3.select(e.root+" .viz_svg").append("g").classed("enr_title",!0).attr("transform",function(){var t=d3.select(e.root+" .row_cat_label_container").attr("transform").split("(")[1].split(")")[0],r=Number(t.split(",")[0])-10;return"translate("+String(r)+", 0)"});h.append("rect").attr("width",e.viz.cat_room.row).attr("height",25).attr("fill","white");var g=e.network_data.enrichrgram_lib.substring(0,40);h.append("text").attr("transform","translate(0, 17)").text(g.replace(/_/g," ")).style("font-size","15px").attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif'),d3.selectAll(e.root+" .enrichr_bars").remove();var w=e.viz.clust.margin.top-35,y=e.network_data.row_cat_bars[0],x=d3.scale.linear().domain([0,y]).range([0,w]);d3.select(e.root+" .row_cat_label_bar_container").selectAll().data(e.network_data.row_cat_bars).enter().append("rect").classed("enrichr_bars",!0).attr("height",m+"px").attr("fill","red").attr("width",function(t){var e=x(t);return e+"px"}).attr("opacity",.4).attr("transform",function(t,e){var r=f*(e-.75);return"translate(0, "+r+")"})}}},function(t,e,r){"use strict";var o=r(88);t.exports=function(t){var e,r=t.params;d3.select(r.root+" .expand_button").on("click",null);var a=.4;e=d3.select(r.root+" .expand_button").empty()?d3.select(r.viz.viz_svg).append("text").attr("class","expand_button"):d3.select(r.root+" .expand_button"),e.attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-family","FontAwesome").attr("font-size","30px").text(function(){return r.viz.is_expand===!1?"":""}).attr("y","25px").attr("x","25px").style("cursor","pointer").style("opacity",a).on("mouseover",function(){d3.select(this).style("opacity",.75)}).on("mouseout",function(){d3.select(this).style("opacity",a)}).on("click",function(){r.viz.is_expand===!1?(d3.select(this).text(function(){return""}),r.viz.is_expand=!0,d3.selectAll(r.root+" .borders").style("fill","white"),d3.select(r.root+" .sidebar_wrapper").style("display","none")):(d3.select(this).text(function(){return""}),r.viz.is_expand=!1,d3.selectAll(r.root+" .borders").style("fill","#eee"),d3.select(r.root+" .viz_wrapper").style("width","100px"),d3.select(r.root+" .sidebar_wrapper").style("display","block")),d3.select(r.viz.viz_svg).style("opacity",.5);var e=500;1==r.viz.run_trans&&(e=2500),setTimeout(o,e,t)})}},function(t,e,r){"use strict";var o=r(2),a=r(89),n=r(97),i=r(98),s=r(99),l=r(100),c=r(101),d=r(102),u=r(103),p=r(104),v=r(105),f=r(106),m=r(107),h=r(108),g=r(109),w=r(110),y=r(111),x=r(112),b=r(81),z=r(55),k=r(54),A=r(70),T=r(18),S=r(113),E=r(86),B=r(78),O=r(114),M=r(36),N=r(115);t.exports=function(t){var e=t.params,r=T(e);d3.select(e.root+" .play_button"),d3.select(e.root+" .sidebar_wrapper").style("height",r.height+"px"),d3.select(e.viz.viz_wrapper).style("margin-top",r.top+"px").style("width",r.width+"px").style("height",r.height+"px"),e=w(e),e.zoom_info=M(),i(e);var C=d3.select(e.viz.viz_svg);_.each(e.network_data.links,function(t){t.x=e.viz.x_scale(t.target),t.y=e.viz.y_scale(t.source)}),C.on(".zoom",null),e.zoom_behavior.scaleExtent([1,e.viz.square_zoom*e.viz.zoom_ratio.x]).on("zoom",function(){a(t)}),e.viz.do_zoom&&C.call(e.zoom_behavior),n(t),C.attr("width",e.viz.svg_dim.width).attr("height",e.viz.svg_dim.height),C.select(".super_background").style("width",e.viz.svg_dim.width).style("height",e.viz.svg_dim.height),C.select(".grey_background").attr("width",e.viz.clust.dim.width).attr("height",e.viz.clust.dim.height),setTimeout(S,100,e);var L=e.network_data.row_nodes,R=o.pluck(L,"name");y(e,C),C.selectAll(".highlighting_rect").attr("width",.8*e.viz.x_scale.rangeBand()).attr("height",.8*e.viz.y_scale.rangeBand()),p(e),u(e,C),v(e,C),C.selectAll(".row_label_group").each(function(){var t=d3.select(this).select("text")[0][0].getBBox();d3.select(this).select("rect").attr("x",t.x).attr("y",0).attr("width",t.width).attr("height",e.viz.rect_height).style("fill","yellow").style("opacity",function(t){var e=0;return 1===t.target&&(e=1),e})}),C.selectAll(".row_label_group").select("text").attr("y",.5*e.viz.rect_height+.35*e.labels.default_fs_row),o.has(e.network_data.row_nodes[0],"value")&&x(t,C),C.selectAll(".row_cat_group").attr("transform",function(t){var r=_.indexOf(R,t.name);return"translate(0, "+e.viz.y_scale(r)+")"}),C.selectAll(".row_cat_group").select("path").attr("d",function(){var t=e.viz.cat_room.symbol_width-1,r=0,o=1,a=e.viz.rect_height/2,n=e.viz.cat_room.symbol_width-1,i=e.viz.rect_height,s="M "+t+","+r+" L "+o+","+a+", L "+n+","+i+" Z";return s});var F=!0;e.viz.show_dendrogram?(z(t,"row",F),z(t,"col",F),s(e,C),k(t,"row",0),k(t,"col",0)):s(e,C),f(e,C),m(e,C),h(e,C),g(e,C),l(e,C),c(e.viz,C),N(e),d(e,C),e.zoom_behavior.scale(1).translate([e.viz.clust.margin.left,e.viz.clust.margin.top]),b(e),d3.select(e.root+" .clust_container").attr("transform","translate("+e.viz.clust.margin.left+","+e.viz.clust.margin.top+")"),t.params.viz.ds_level===-1&&A(t),E(t),d3.select(e.viz.viz_svg).style("opacity",1),B(t),d3.select(t.params.root+" .row_slider_group").style("opacity",0),d3.select(t.params.root+" .col_slider_group").style("opacity",0),setTimeout(O,500,t,"row"),setTimeout(O,500,t,"col")}},function(t,e,r){"use strict";var o=r(90),a=r(95),n=r(96);t.exports=function(t){var e=t.params,r={};if(r.zoom_x=d3.event.scale,r.zoom_y=d3.event.scale,r.trans_x=e.zoom_behavior.translate()[0]-e.viz.clust.margin.left,r.trans_y=e.zoom_behavior.translate()[1]-e.viz.clust.margin.top,d3.selectAll(e.viz.root_tips).style("display","none"),e.zoom_info=a(e,r),e.zoom_info=n(e,r),e.is_slider_drag===!1&&e.is_cropping===!1){var i=e.zoom_info.trans_x+e.viz.clust.margin.left,s=e.zoom_info.trans_y+e.viz.clust.margin.top;e.zoom_behavior.translate([i,s]),t.params=e,o(t)}}},function(t,e,r){"use strict";var o=r(83),a=r(70),n=r(91),i=r(62),s=r(65),l=r(92),c=r(94);t.exports=function(t){function e(t){var e=t.params,r=c(e);r===!0&&setTimeout(l,50,t)}var r=t.params,d=r.zoom_info,_=s(r);d3.select(r.root+" .clust_group").attr("transform","translate("+[d.trans_x,d.trans_y]+") scale("+d.zoom_x+","+d.zoom_y+")"),d3.select(r.root+" .row_label_zoom_container").attr("transform","translate("+[0,d.trans_y]+") scale("+d.zoom_y+")"),d3.select(r.root+" .col_zoom_container").attr("transform","translate("+[d.trans_x,0]+") scale("+d.zoom_x+")"),d3.select(r.root+" .row_cat_container").attr("transform","translate("+[0,d.trans_y]+") scale( 1,"+d.zoom_y+")"),d3.select(r.root+" .row_dendro_container").attr("transform","translate("+[r.viz.uni_margin/2,d.trans_y]+") scale( 1,"+d.zoom_y+")"),d3.select(r.root+" .row_dendro_icons_group").attr("transform",function(){var t=d.trans_y,e="translate("+[0,t]+") ",r="scale(1, "+d.zoom_y+")",o=e+r;return o}),d3.select(r.root+" .col_dendro_icons_group").attr("transform",function(){var t=d.trans_x,e="translate("+[t,0]+")",r="scale("+d.zoom_x+", 1)",o=e+r;return o}),i(r,d,"row"),i(r,d,"col"),d3.select(r.root+" .col_cat_container").attr("transform","translate("+[d.trans_x,0]+") scale("+d.zoom_x+",1)"),d3.select(r.root+" .col_dendro_container").attr("transform","translate("+[d.trans_x,r.viz.uni_margin/2]+") scale("+d.zoom_x+",1)"), +n(r,d),d3.select(r.root+" .viz_svg").attr("is_zoom",function(){var t=Number(d3.select(r.root+" .viz_svg").attr("is_zoom"));return d3.select(r.root+" .viz_svg").attr("stopped_zoom",1),t+1});var u=function(){d3.select(r.root+" .viz_svg").attr("is_zoom",function(){var t=Number(d3.select(r.root+" .viz_svg").attr("is_zoom"));return t-1})};if(o(r),d.zoom_y<=_.zoom_y){var p=!1;d.zoom_y<_.zoom_y&&(p=!0);var v=!1;a(t,v,p)}setTimeout(u,50),setTimeout(e,100,t)}},function(t,e,r){"use strict";var o=r(2);t.exports=function(t){var e=t.zoom_info;o.has(t.network_data.row_nodes[0],"value")&&d3.selectAll(t.root+" .row_bars").attr("width",function(r){var o=0;return o=t.labels.bar_scale_row(Math.abs(r.value))/e.zoom_y}).attr("x",function(r){var o=0;return o=-t.labels.bar_scale_row(Math.abs(r.value))/e.zoom_y}),o.has(t.network_data.col_nodes[0],"value")&&d3.selectAll(t.root+" .col_bars").attr("width",function(r){var o=0;return r.value>0&&(o=t.labels.bar_scale_col(r.value)/e.zoom_x),o})}},function(t,e,r){"use strict";var o=r(83),a=r(82),n=r(93),i=r(85),s=r(70),l=r(94);t.exports=function(t){function e(){_.each(["row","col"],function(t){d3.selectAll(r.root+" ."+t+"_label_group").filter(function(){return"none"!=d3.select(this).style("display")}).select("text").style("font-size",function(){var t=Number(d3.select(this).style("font-size").replace("px",""));return t})})}var r=t.params,c=l(r);if(c===!0){_.each(["row","col"],function(t){d3.selectAll(r.root+" ."+t+"_label_group").select("text").style("opacity",1),d3.selectAll(r.root+" ."+t+"_cat_group").select("path").style("display","block")}),s(t,!0),d3.selectAll(r.viz.root_tips).style("display","block"),d3.selectAll(r.root+" .row_label_group").select("text").style("display","none"),d3.selectAll(r.root+" .row_label_group").select("text").style("display","block"),d3.select(r.root+" .viz_svg").attr("stopped_zoom",0),d3.selectAll(r.root+" .row_label_group").select("text").style("display","block"),d3.selectAll(r.root+" .col_label_group").select("text").style("display","block"),i(r),t.params.viz.x_offset=0;var d=150;_.each(["row","col"],function(t){var e=n(r,t);e1&&(e.zoom_y=0?e.trans_y=0:e.trans_y<=-e.pan_room_y&&(e.trans_y=-e.pan_room_y),e}},function(t,e){"use strict";t.exports=function(t,e){var r=t.viz;return r.zoom_ratio.x>1&&(e.zoom_x0?e.trans_x=0:e.trans_x<=-e.pan_room_x&&(e.trans_x=-e.pan_room_x),e}},function(t,e,r){"use strict";var o=r(80);t.exports=function(t){var e=t.params;d3.selectAll(e.viz.zoom_element).on("dblclick.zoom",null),d3.select(e.viz.zoom_element).on("dblclick",function(){o(t,0,0,1)})}},function(t,e){"use strict";t.exports=function(t){var e=1,r=0,o=0,a=t.viz.clust.dim.height/2,n=-(e-1)*a;d3.select(t.root+" .clust_group").attr("transform","translate("+[0,0+n]+") scale(1,"+e+")translate("+[r,o]+")"),d3.select(t.root+" .row_label_zoom_container").attr("transform","translate("+[0,n]+") scale("+e+","+e+")translate("+[0,o]+")"),d3.select(t.root+" .row_cat_container").attr("transform","translate("+[0,n]+") scale(1,"+e+")translate("+[0,o]+")"),d3.select(t.root+" .row_dendro_container").attr("transform","translate("+[0,n]+") scale("+e+","+e+")translate("+[t.viz.uni_margin/2,o]+")"),d3.select(t.root+" .col_zoom_container").attr("transform"," scale(1,1)translate("+[r,0]+")"),d3.select(t.root+" .col_cat_container").attr("transform"," scale(1,1)translate("+[r,0]+")"),d3.select(t.root+" .col_dendro_container").attr("transform"," scale(1,1)translate("+[r,t.viz.uni_margin/2]+")"),d3.select(t.root+" .row_dendro_icons_group").attr("transform",function(){return"translate(0,0) scale(1)"}),d3.select(t.root+" .row_dendro_icons_group").selectAll("path").attr("transform",function(t){var e=7,r=t.pos_mid;return"translate("+e+","+r+") scale(1, 1)"})}},function(t,e){"use strict";t.exports=function(t,e){var r=!(arguments.length<=2||void 0===arguments[2])&&arguments[2],o={};r===!1?o.run_transition=!1:o=r;var a,n=t.viz.duration,i=t.network_data.col_nodes,s=t.network_data.col_nodes_names;o.run_transition?(a=e.transition().delay(o.update).duration(n),e.selectAll(".col_cat_group").data(i,function(t){return t.name}).transition().delay(o.update).duration(n).attr("transform",function(e){var r=_.indexOf(s,e.name);return"translate("+t.viz.x_scale(r)+",0)"}),e.selectAll(".col_dendro_group").data(i,function(t){return t.name}).transition().delay(o.update).duration(n).attr("transform",function(e){var r=_.indexOf(s,e.name);return"translate("+t.viz.x_scale(r)+",0)"})):(a=e,e.selectAll(".col_cat_group").data(i,function(t){return t.name}).attr("transform",function(e){var r=_.indexOf(s,e.name);return"translate("+t.viz.x_scale(r)+",0)"}),d3.select(t.root).selectAll(".col_dendro_group").data(i,function(t){return t.name}).attr("transform",function(e){var r=_.indexOf(s,e.name);return"translate("+t.viz.x_scale(r)+",0)"}));var l,c;_.each(["row","col"],function(e){var r=t.viz.all_cats[e].length;for(l=0;l0&&(r=t.labels.bar_scale_col(e.value)),r}).attr("height",.66*t.viz.rect_width)}},function(t,e,r){"use strict";var o=r(19),a=r(22),n=r(21),i=r(31),s=r(30);t.exports=function(t){if(t=o(t),t.viz=n(t.viz),t.viz=a(t.viz),t.sim_mat&&(t.viz.clust.dim.width<=t.viz.clust.dim.height?t.viz.clust.dim.height=t.viz.clust.dim.width:t.viz.clust.dim.width=t.viz.clust.dim.height),t.viz=s(t.viz),t.viz.x_scale.rangeBands([0,t.viz.clust.dim.width]),t.viz.y_scale.rangeBands([0,t.viz.clust.dim.height]),t.viz.border_width.x=t.viz.x_scale.rangeBand()/t.viz.border_fraction,t.viz.border_width.y=t.viz.y_scale.rangeBand()/t.viz.border_fraction,t.viz.rect_width=t.viz.x_scale.rangeBand()-t.viz.border_width.x,t.viz.rect_height=t.viz.y_scale.rangeBand()-t.viz.border_width.y,null!=t.viz.ds)for(var e;e0&&_.each(t.viz.ds,function(e){e.y_scale=d3.scale.ordinal().rangeBands([0,t.viz.clust.dim.height]),e.y_scale.domain(d3.range(e.num_rows+1)),e.rect_height=e.y_scale.rangeBand()-t.viz.border_width.y}),t.viz.square_zoom=t.viz.norm_labels.width.col/(t.viz.rect_width/2),t=i(t)}},function(t,e,r){"use strict";var o=r(43),a=r(44),n=r(47);t.exports=function(t,e){var r=t.network_data.row_nodes_names;if(t.viz.ds_level===-1)e.selectAll(".row").attr("transform",function(e){var o=_.indexOf(r,e.name),a=t.viz.y_scale(o);return"translate(0,"+a+")"}),e.selectAll(".row").selectAll(".tile").attr("transform",function(e){return n(t,e)}).attr("width",t.viz.rect_width).attr("height",t.viz.rect_height),e.selectAll(".row").selectAll(".tile_up").attr("d",function(){return o(t)}).attr("transform",function(e){return n(t,e)}),e.selectAll(".row").selectAll(".tile_dn").attr("d",function(){return a(t)}).attr("transform",function(e){return n(t,e)});else{var i=t.viz.ds_level,s=".ds"+String(i)+"_row",l=t.viz.ds[i].rect_height;e.selectAll(s).attr("transform",function(e){var r=t.viz.ds[i].y_scale(e.row_index);return"translate(0,"+r+")"}),e.selectAll(s).selectAll(".tile").attr("transform",function(e){return n(t,e)}).attr("width",t.viz.rect_width).attr("height",l)}}},function(t,e,r){"use strict";var o=r(23);t.exports=function(t,e){var r=t.params;r=o(r),e.selectAll(".row_bars").attr("width",function(t){var e=0;return e=r.labels.bar_scale_row(Math.abs(t.value))}).attr("x",function(t){var e=0;return e=-r.labels.bar_scale_row(Math.abs(t.value))}).attr("height",r.viz.y_scale.rangeBand())}},function(t,e){"use strict";t.exports=function(t){var e=d3.select(t.root+" .clust_container").attr("transform"),r=Number(e.split("(")[1].split(",")[0]),o=Number(e.split(",")[1].replace(")","")),a=r+t.viz.clust.dim.width/2,n=o+t.viz.clust.dim.height/2;d3.select(t.root+" .play_button").attr("transform",function(){return"translate("+a+","+n+")"})}},function(t,e){"use strict";t.exports=function(t,e){var r,o,a=t.params.viz;if("row"===e){var n=a.svg_dim.width-3*a.uni_margin;r=a.clust.margin.left+a.clust.dim.width+5*a.dendro_room.row,r>n&&(r=n),o=a.clust.margin.top+3*a.uni_margin}else r=2*a.uni_margin,o=a.clust.margin.top+a.clust.dim.height+a.dendro_room.col-2*a.uni_margin;d3.select(t.params.root+" ."+e+"_slider_group").attr("transform",function(){var t;return t="row"===e?"translate("+r+","+o+")":"translate("+r+","+o+"), rotate(-90)"}).style("opacity",1)}},function(t,e){"use strict";t.exports=function(t){var e=arguments.length<=1||void 0===arguments[1]?0:arguments[1],r=0;e>0&&(r=2e3);var o=d3.selectAll(t.root+" .horz_lines"),a=d3.selectAll(t.root+" .vert_lines");o.style("opacity",0).attr("transform",function(e){var r=e.row_index,o=t.viz.y_scale(r);return"translate( 0,"+o+") rotate(0)"}).transition().duration(e).delay(r).style("opacity",1),o.append("line").attr("x1",0).attr("x2",t.viz.clust.dim.width).style("stroke-width",function(){var e=t.viz.border_width.y;return e+"px"}),a.style("opacity",0).attr("transform",function(e){var r=e.col_index,o=t.viz.x_scale(r);return"translate("+o+") rotate(-90)"}).transition().duration(e).delay(r).style("opacity",1),a.append("line").attr("x1",0).attr("x2",-t.viz.clust.dim.height).style("stroke-width",function(){var e=t.viz.border_width.x;return e+"px"})}},function(t,e,r){"use strict";var o=r(117),a=r(48),n=r(118),i=r(119),s=r(120),l=r(121);t.exports=function(t){var e=t.params;d3.select(e.root+" .col_cat_outer_container").empty()?d3.select(e.root+" .col_container").append("g").attr("class","col_cat_outer_container").attr("transform",function(){var t=e.viz.norm_labels.width.col+2;return"translate(0,"+t+")"}).append("g").attr("class","col_cat_container"):d3.select(e.root+" .col_container").select("col_cat_outer_container").attr("transform",function(){var t=e.viz.norm_labels.width.col+2;return"translate(0,"+t+")"}),d3.selectAll(e.viz.root_tips+"_col_cat_tip").remove();var r=a().attr("class",function(){var t=e.viz.root_tips.replace(".",""),r=t+" d3-tip "+t+"_col_cat_tip";return r}).direction("s").offset([5,0]).style("display","none").html(function(t){return o(e,t,this,"col")});d3.select(e.root+" .col_cat_container").selectAll("g").data(e.network_data.col_nodes,function(t){return t.name}).enter().append("g").attr("class","col_cat_group").attr("transform",function(t){var r=_.indexOf(e.network_data.col_nodes_names,t.name);return"translate("+e.viz.x_scale(r)+",0)"}),d3.select(e.root+" .col_cat_container").selectAll(".col_cat_group").call(r),d3.selectAll(e.root+" .col_cat_group").each(function(){var o,a=this;_.each(e.viz.all_cats.col,function(s){var d=parseInt(s.split("-")[1],10),_="col_cat_rect_"+String(d);o=d3.select(a).select("."+_).empty()?d3.select(a).append("rect").attr("class",_).attr("cat",s).attr("transform",function(){var t=e.viz.cat_room.symbol_width+e.viz.cat_room.separation,r=d*t;return"translate(0,"+r+")"}).on("click",function(r){if(d3.select(this).classed("cat_strings"))if(d3.event.shiftKey===!0)c(t,r,this,"col");else{var o=l(e,r,this,"col");$(e.root+" .dendro_info").modal("toggle");var a=o.join(", ");d3.select(e.root+" .dendro_info input").attr("value",a)}}):d3.select(a).select("."+_),o.attr("width",e.viz.x_scale.rangeBand()).attr("height",e.viz.cat_room.symbol_width).style("fill",function(t){var r=t[s],o=e.viz.cat_colors.col[s][r];return o}).on("mouseover",r.show).on("mouseout",function(){r.hide(this),n(e),d3.select(this).classed("hovering",!1),d3.selectAll(".d3-tip").style("display","none")}),i(e.viz,"col",o,s)})});var c=_.debounce(s,1500)}},function(t,e,r){"use strict";var o=r(77);t.exports=function(t,e,r,a){function n(){var e=!1;if(d3.select(r).classed("hovering")){var o=[a];t.viz.sim_mat&&(o=["row","col"]),_.each(o,function(r){"string"==typeof l&&l.indexOf("Not ")<0&&"false"!=l&&(e=!0),e&&d3.selectAll(t.root+" ."+r+"_cat_group").selectAll("rect").style("opacity",function(e){var r=d3.select(this).style("opacity");if(d3.select(this).classed("cat_strings")&&d3.select(this).classed("filtered_cat")===!1){var o,a=d3.select(this).attr("cat");o=e[a].indexOf(": ")>=0?e[a].split(": ")[1]:e[a],r=a===i&&o===l?t.viz.cat_colors.active_opacity:t.viz.cat_colors.opacity/4}return r})})}}d3.selectAll(t.viz.root_tips+"_col_cat_tip").style("display","block"),d3.selectAll(t.viz.root_tips+"_row_cat_tip").style("display","block");var i=d3.select(r).attr("cat"),s=o(t.viz,i,a),l=e[i];"string"==typeof l&&l.indexOf(": ")>=0&&(l=l.split(": ")[1]);var c=s+": "+l;return d3.select(r).classed("hovering",!0),setTimeout(n,500),c}},function(t,e){"use strict";t.exports=function(t){_.each(["row","col"],function(e){d3.selectAll(t.root+" ."+e+"_cat_group").selectAll("rect").style("opacity",function(){var e=d3.select(this).style("opacity");return d3.select(this).classed("cat_strings")&&d3.select(this).classed("filtered_cat")===!1&&(e=t.viz.cat_colors.opacity),e})})}},function(t,e){"use strict";t.exports=function(t,e,r,o){function a(t){"string"==typeof t&&t.indexOf(i)>-1&&(t=t.split(i)[1]);var e=parseFloat(t);return e}var n=!(arguments.length<=4||void 0===arguments[4])&&arguments[4],i=": ",s=t.cat_info[e][o].type;"cat_strings"===s?n?r.classed("cat_strings",!0).style("opacity",0).transition().duration(1e3).style("opacity",t.cat_colors.opacity):r.classed("cat_strings",!0).style("opacity",t.cat_colors.opacity):r.classed("cat_values",!0).style("opacity",function(r){var n=r[o],i=a(n);return t.cat_info[e][o].cat_scale(Math.abs(i))}).style("fill",function(e){var r,n=a(e[o]);return r=n>0?t.cat_value_colors[0]:t.cat_value_colors[1]})}},function(t,e,r){"use strict";var o=r(121);t.exports=function(t,e,r,a){function n(t,e,r){d3.selectAll(i.root+" ."+t+"_cat_group").selectAll("rect").style("opacity",function(t){var o=d3.select(this).style("opacity");if(d3.select(this).classed("cat_strings")){var a,n=d3.select(this).attr("cat");a=t[n],n===e&&a===r&&(o=1,d3.select(this).classed("filtered_cat",!0))}return o})}var i=t.params,s=d3.select(r).attr("cat"),l=e[s],c=o(i,e,r,a),d={row:"col",col:"row"},_=d[a],u={};if(u[a]=c,t.params.cat_filter[a]===!1){if(t.params.dendro_filter.row===!1&&t.params.dendro_filter.col===!1&&t.params.cat_filter[_]===!1){var p=t.params.network_data.col_nodes_names,v=t.params.network_data.row_nodes,f=t.params.network_data.col_nodes;t.filter_viz_using_names(u),t.params.inst_nodes.row_nodes=v,t.params.inst_nodes.col_nodes=f,t.params.cat_filter[a]=p,n(a,s,l)}}else u=t.params.cat_filter[a],t.filter_viz_using_names(u),t.params.cat_filter[a]=!1,d3.selectAll(i.root+" ."+a+"_cat_group").selectAll("rect").classed("filtered_cat",!1)}},function(t,e,r){"use strict";var o=r(2);t.exports=function(t,e,r,a){var n=d3.select(r).attr("cat"),i=e[n],s=t.network_data[a+"_nodes"],l=_.filter(s,function(t){return t[n]==i}),c=o.pluck(l,"name");return c}},function(t,e,r){"use strict";var o=r(117),a=r(48),n=r(118),i=r(119),s=r(120),l=r(121);t.exports=function(t){var e=!(arguments.length<=1||void 0===arguments[1])&&arguments[1],r=t.params;d3.select(r.root+" .row_cat_outer_container").empty()?d3.select(r.root+" .row_container").append("g").attr("class","row_cat_outer_container").attr("transform","translate("+r.viz.norm_labels.width.row+",0)").append("g").attr("class","row_cat_container"):d3.select(r.root+" .row_container").select("row_cat_outer_container").attr("transform","translate("+r.viz.norm_labels.width.row+",0)"),d3.select(r.root+" .row_cat_container").select(".white_bars").empty()?d3.select(r.root+" .row_cat_container").append("rect").attr("class","white_bars").attr("fill",r.viz.background_color).attr("width",r.viz.cat_room.row+"px").attr("height",function(){var t=r.viz.clust.dim.height;return t}):d3.select(r.root+" .row_cat_container").select(".white_bars").attr("fill",r.viz.background_color).attr("width",r.viz.cat_room.row+"px").attr("height",function(){var t=r.viz.clust.dim.height;return t}),d3.selectAll(r.viz.root_tips+"_row_cat_tip").remove();var c=a().attr("class",function(){var t=r.viz.root_tips.replace(".",""),e=t+" d3-tip "+t+"_row_cat_tip";return e}).direction("e").offset([5,0]).style("display","none").html(function(t){return o(r,t,this,"row")});d3.select(r.root+" .row_cat_container").selectAll("g").data(r.network_data.row_nodes,function(t){return t.name}).enter().append("g").attr("class","row_cat_group").attr("transform",function(t){var e=_.indexOf(r.network_data.row_nodes_names,t.name);return"translate(0, "+r.viz.y_scale(e)+")"}),d3.select(r.root+" .row_cat_container").selectAll(".row_cat_group").call(c);var d,u;d3.selectAll(r.root+" .row_cat_group rect").remove(),r.viz.show_categories.row&&d3.selectAll(r.root+" .row_cat_group").each(function(){u=this,_.each(r.viz.all_cats.row,function(o){var a=parseInt(o.split("-")[1],10),s="row_cat_rect_"+String(a);d=d3.select(u).select("."+s).empty()?d3.select(u).append("rect").attr("class",s).attr("cat",o):d3.select(u).select("."+s),d.attr("width",r.viz.cat_room.symbol_width).attr("height",r.viz.y_scale.rangeBand()).style("fill",function(t){var e=t[o],a=r.viz.cat_colors.row[o][e];return a}).attr("x",function(){var t=r.viz.cat_room.symbol_width+r.viz.uni_margin/2;return t+"px"}).attr("transform",function(){var t=r.viz.cat_room.symbol_width+r.viz.cat_room.separation,e=a*t;return"translate("+e+",0)"}).on("click",function(e){if(d3.select(this).classed("cat_strings"))if(d3.event.shiftKey===!0)p(t,e,this,"row");else{var o=l(r,e,this,"row");$(r.root+" .dendro_info").modal("toggle");var a=o.join(", ");d3.select(r.root+" .dendro_info input").attr("value",a)}}).on("mouseover",c.show).on("mouseout",function(){c.hide(this),n(r),d3.select(this).classed("hovering",!1),d3.selectAll(".d3-tip").style("display","none")}),i(r.viz,"row",d,o,e)})});var p=_.debounce(s,1500)}},function(t,e,r){"use strict";var o=r(55);t.exports=function(t){var e=t.params,r=e.viz.dendro_room.row+e.viz.uni_margin,a=e.viz.clust.margin.left+e.viz.clust.dim.width,n=e.viz.clust.margin.top;d3.select(e.root+" .row_dendro_outer_container").empty()?(d3.select(e.root+" .viz_svg").append("g").attr("class","row_dendro_outer_container").attr("transform","translate("+a+","+n+")"),d3.select(e.root+" .row_dendro_outer_container").append("rect").classed("row_dendro_spillover",!0).attr("fill",e.viz.background_color).attr("width",r+"px").attr("height",e.viz.svg_dim.height),d3.select(e.root+" .row_dendro_outer_container").append("g").attr("class","row_dendro_container").attr("transform","translate("+e.viz.uni_margin/2+",0)")):(d3.select(e.root+" .viz_svg").select("row_dendro_outer_container").attr("transform","translate("+a+","+n+")"),d3.select(e.root+" .row_dendro_outer_container").select(".row_dendro_spillover").attr("width",r+"px").attr("height",e.viz.svg_dim.height)),o(t,"row",!1),"clust"!=e.viz.inst_order.col&&d3.selectAll(e.root+" .row_dendro_group").remove()}},function(t,e,r){"use strict";var o=r(55);t.exports=function(t){var e=t.params,r=e.viz.clust.margin.left,a=e.viz.clust.margin.top+e.viz.clust.dim.height,n=e.viz.dendro_room.col+e.viz.uni_margin;d3.select(e.root+" .col_dendro_outer_container").empty()?(d3.select(e.root+" .viz_svg").append("g").attr("class","col_dendro_outer_container").attr("transform","translate("+r+","+a+")"),d3.select(e.root+" .col_dendro_outer_container").append("rect").classed("col_dendro_spillover",!0).attr("fill",e.viz.background_color).attr("width",e.viz.svg_dim.width).attr("height",n+"px"),d3.select(e.root+" .col_dendro_outer_container").append("g").attr("class","col_dendro_container").attr("transform","translate(0,"+e.viz.uni_margin/2+")"), +d3.select(e.root+" .col_dendro_outer_container").append("rect").classed("col_dendro_spillover_top",!0).attr("fill",e.viz.background_color).attr("width",e.viz.svg_dim.width).attr("height",e.viz.svg_dim.height).attr("transform","translate(0,"+e.viz.dendro_room.col+")")):(d3.select(e.root+" .viz_svg").select("col_dendro_outer_container").attr("transform","translate("+r+","+a+")"),d3.select(e.root+" .col_dendro_outer_container").select(".col_dendro_spillover").attr("width",e.viz.svg_dim.width).attr("height",n+"px")),o(t,"col",!1),"clust"!=e.viz.inst_order.row&&d3.selectAll(e.root+" .col_dendro_group").remove()}},function(t,e,r){"use strict";var o=r(126);t.exports=function(t){o(t,"row"),o(t,"col")}},function(t,e,r){"use strict";var o=r(127),a=r(114);t.exports=function(t,e){function r(){t.params.is_slider_drag=!0;var r=d3.event.y;r<0&&(r=0),r>i&&(r=i),this.nextSibling&&this.parentNode.appendChild(this),r=d3.round(r,-1);var a=10-r/10;d3.select(this).attr("transform","translate(0, "+r+")"),o(t,e,a)}function n(){var r=d3.mouse(this),a=d3.round(r[1],-1);d3.select(t.params.root+" ."+e+"_group_circle").attr("transform","translate(0, "+a+")");var n=10-a/10;o(t,e,n)}var i=100,s=d3.behavior.drag().on("drag",r).on("dragend",function(){t.params.is_slider_drag=!1}),l=d3.select(t.params.root+" .viz_svg").append("g").classed(e+"_slider_group",!0);a(t,e);var c=i+20,d=30;l.append("rect").classed(e+"_slider_background",!0).attr("height",c+"px").attr("width",d+"px").attr("fill",t.params.viz.background_color).attr("transform",function(){var t="translate(-10, -5)";return t}).style("opacity",0),l.append("line").style("stroke-width",i/7+"px").style("stroke","black").style("stroke-linecap","round").style("opacity",0).attr("y1",0).attr("y2",function(){return i-2}).on("click",n);var _=-i/40;l.append("path").style("fill","black").attr("transform","translate("+_+", 0)").attr("d",function(){var t=0,e=0,r=0,o=i,a=i/10,n=0,s="M"+t+","+e+", L"+r+", "+o+", L"+a+","+n+" Z";return s}).style("opacity",.35).on("click",n);var u=.35,p=.6;l.append("circle").classed(e+"_group_circle",!0).attr("r",.08*i).attr("transform",function(){return"translate(0, "+i/2+")"}).style("fill","blue").style("opacity",u).on("mouseover",function(){d3.select(this).style("opacity",p)}).on("mouseout",function(){d3.select(this).style("opacity",u)}).call(s)}},function(t,e,r){"use strict";var o=r(55);t.exports=function(t,e,r){var a=t.params;"row"===e?a.group_level.row=r:"col"===e&&(a.group_level.col=r);var n=!0;o(t,e,n)}},function(t,e,r){"use strict";var o=r(60);t.exports=function(t){var e=t.params.viz,r=e.clust.margin.left+e.clust.dim.width+e.uni_margin+e.dendro_room.row,a=d3.select(e.viz_svg).append("g").classed("right_spillover_container",!0).attr("transform",function(){return"translate("+r+", 0)"}),n=e.norm_labels.margin.top+e.norm_labels.width.col;a.append("rect").attr("fill",e.background_color).attr("width",10*e.clust.dim.width).attr("height",e.svg_dim.height+"px").attr("class","white_bars").attr("class","right_spillover").attr("transform",function(){return"translate( 0,"+n+")"});var i=0,s=e.clust.margin.top;a.append("g").classed("row_dendro_icons_container",!0).attr("transform","translate("+i+","+s+")").append("g").classed("row_dendro_icons_group",!0),o(t,"row"),i=e.clust.margin.left+e.clust.dim.width,s=n;var l=e.dendro_room.row+e.uni_margin,c=e.cat_room.col+e.uni_margin;d3.select(e.viz_svg).append("rect").attr("fill",e.background_color).attr("width",l).attr("height",c).attr("transform",function(){return"translate("+i+","+s+")"}).classed("white_bars",!0).classed("dendro_row_spillover",!0)}},function(t,e,r){"use strict";var o=r(130),a=r(131),n=r(133),i=r(134),s=r(136),l=r(137),c=r(139),d=r(140),_=r(163),u=r(164),p=r(165),v=r(166),f=r(167),m=r(168);t.exports=function(){var t=this,e=t.params;if(d3.select(e.root+" .running_demo").empty()){d3.select(e.root+" .play_button").classed("running_demo",!0),f(e,!1),$.blockUI({css:{border:"none",padding:"15px",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px",opacity:0,color:"#fff",cursor:"default"}}),d3.selectAll(".blockUI").style("opacity",0);var r=750;t.params.viz.is_expand===!1&&(r=o(e,r,_),r-=1500),r=o(e,r,a),r=o(e,r,n),r=o(t,r,i),r=o(e,r,p),r=o(e,r,s),r=o(e,r,m),r=o(e,r,u),r=o(e,r,l),r=o(e,r,c),r=o(t,r,d),r=o(e,r,_),r=o(e,r,v)}}},function(t,e){"use strict";t.exports=function(t,e,r){var o=(setTimeout(r().run,e,t),r().get_duration());return e+=o}},function(t,e,r){"use strict";var o=r(132);t.exports=function(){function t(t){var e="Clustergrammer allows users to generate\ninteractive and sharable visualizations\nby uploading a matrix",a="This demo will quickly overview some\nof Clustergrammer's interactive features";setTimeout(o,0,t,e,4500/r),setTimeout(o,4500/r,t,a,4500/r)}function e(){return 1e4/r}var r=1;return{run:t,get_duration:e}}},function(t,e){"use strict";t.exports=function(t,e,r){var o=e.split("\n");o.length<3&&o.push(""),d3.select(t.root+" .demo_group").style("opacity",0).transition().duration(250).style("opacity",1).transition().duration(250).delay(r).style("opacity",0);for(var a=0;a0?f.update=1e3:f.update=0,v>0?f.enter=1e3:f.enter=0,f.enter=f.enter+f.update,f.run_transition=!0;var m=t.network_data.links.length,h=e.network_data.links.length,g=.5*e.matrix.def_large_matrix;return(m>g||h>g)&&(f.run_transition=!1,f.update=0,f.enter=0),f}},function(t,e,r){"use strict";var o=r(146),a=r(49),n=r(67),i=r(147),s=r(151),l=r(39),c=r(152),d=r(155),_=r(81),u=r(48);t.exports=function(t,e,r){var p=t.params;d3.selectAll(p.viz.root_tips).remove();var v=u().attr("class",function(){var t=p.viz.root_tips.replace(".",""),e=t+" d3-tip "+t+"_tile_tip";return e}).direction("nw").offset([0,0]).style("display","none").html(function(t){var e,r=String(t.value.toFixed(3));if(p.keep_orig){var o=String(t.value_orig.toFixed(3));e="

"+t.row_name+" and "+t.col_name+"

normalized value: "+r+"

original value: "+o+"
"}else e="

"+t.row_name+" and "+t.col_name+"

value: "+r+"
";return e});d3.select(p.root+" .clust_group").call(v),d(p);for(var f=1e3,m=e.row_nodes,h=e.col_nodes,g=e.links,w=g,y=0;y0?t.matrix.tile_colors[0]:t.matrix.tile_colors[1]}).attr("fill-opacity",function(e){var r=t.matrix.opacity_scale(Math.abs(e.value));return r}):l.style("fill",function(e){return e.value>0?t.matrix.tile_colors[0]:t.matrix.tile_colors[1]}).attr("fill-opacity",function(e){var r=t.matrix.opacity_scale(Math.abs(e.value));return r}),l.each(function(t){Math.abs(t.value_up)>0&&Math.abs(t.value_dn)>0&&d3.select(this).remove()})}},function(t,e,r){"use strict";var o=r(43),a=r(44),n=r(45),i=r(46),s=r(47);t.exports=function(t,e,r,l,c,d,u){var p=_.filter(e,function(t){return 0!=t.value_up||0!=t.value_dn}),v=d3.select(r).selectAll(".tile_up").data(p,function(t){return t.col_name}),f=v.on("mouseover",function(){for(var e=arguments.length,r=Array(e),o=0;o0&&Math.abs(t.value_dn)>0&&d3.select(this).remove()})}},function(t,e){"use strict";t.exports=function(t,e,r){var o=t.network_data.row_nodes,a=t.network_data.col_nodes,n=d3.select(t.root+" .clust_group").selectAll(".row").data(t.matrix.matrix,function(t){return t.name}).exit();e.run_transition?n.transition().duration(r).style("opacity",0).remove():n.style("opacity",0).remove(),d3.selectAll(t.root+" .row_label_group").data(o,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .col_label_group").data(a,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .row_cat_group").data(o,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .row_dendro_group").data(o,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .col_label_text").data(a,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .horz_lines").data(o,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .vert_lines").data(a,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .col_cat_group").data(a,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .col_dendro_group").data(a,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove()}},function(t,e,r){"use strict";var o=r(153);t.exports=function(t,e,r,a){var n=d3.select(t.root+" .clust_group").selectAll(".row").data(t.matrix.matrix,function(t){return t.name}).enter().append("g").classed("row",!0).attr("transform",function(e){return"translate(0,"+t.viz.y_scale(e.row_index)+")"});n.each(function(n){o(t,n,e,r,a,this)})}},function(t,e,r){"use strict";var o=r(154),a=r(45),n=r(46),i=r(47);t.exports=function(t,e,r,s,l,c){var d=e.row_data,u=_.filter(d,function(t){return 0!==t.value}),p=d3.select(c).selectAll("rect").data(u,function(t){return t.col_name}).enter().append("rect").attr("class","tile row_tile").attr("width",t.viz.rect_width).attr("height",t.viz.rect_height).style("fill",function(e){return e.value>0?t.matrix.tile_colors[0]:t.matrix.tile_colors[1]}).on("mouseover",function(){for(var e=arguments.length,r=Array(e),o=0;o0&&(r=t.matrix.opacity_scale(Math.abs(e.value_up))),r});var p=d3.select(r).selectAll(".tile_dn").data(d,function(t){return t.col_name}).enter().append("path").attr("class","tile_dn").attr("d",function(){return a(t)}).attr("transform",function(e){return n(t,e)}).style("fill",function(){return t.matrix.tile_colors[1]}).on("mouseover",function(e){d3.selectAll(t.root+" .row_label_group text").classed("active",function(t){return e.row_name===t.name}),d3.selectAll(t.root+" .col_label_text text").classed("active",function(t){return e.col_name===t.name}),t.matrix.show_tile_tooltips&&i.show(e)}).on("mouseout",function(){d3.selectAll(t.root+" text").classed("active",!1),t.matrix.show_tile_tooltips&&i.hide()});p.style("fill-opacity",0).transition().delay(s.enter).duration(l).style("fill-opacity",function(e){var r=0;return Math.abs(e.value_up)>0&&(r=t.matrix.opacity_scale(Math.abs(e.value_dn))),r}),c.each(function(t){Math.abs(t.value_up)>0&&Math.abs(t.value_dn)>0&&d3.select(this).remove()})}},function(t,e){"use strict";t.exports=function(t){d3.select(t.root+" .clust_container").attr("transform","translate("+t.viz.clust.margin.left+","+t.viz.clust.margin.top+")"),d3.select(t.root+" .col_label_outer_container").attr("transform","translate(0,"+t.viz.norm_labels.width.col+")"),d3.select(t.root+" .col_cat_outer_container").attr("transform",function(){var e=t.viz.norm_labels.width.col+2;return"translate(0,"+e+")"})}},function(t,e,r){"use strict";var o=(r(127),r(79)),a=r(78),n=r(157);t.exports=function(t){function e(e,r){var o=2-r,a=t.params.matrix.abs_max_val*o;t.params.matrix.opacity_scale.domain([0,a]),d3.selectAll(t.params.root+" .tile").style("fill-opacity",function(e){var r=t.params.matrix.opacity_scale(Math.abs(e.value));return r})}var r=t.params,i=d3.select(r.root+" .gene_search_box")[0][0],s=new Awesomplete(i,{minChars:1,maxItems:15}),l=t.params.network_data.row_nodes_names;s.list=l,d3.selectAll(".awesomplete ul").style("z-index",99),$(r.root+" .gene_search_box").keyup(function(e){if(13===e.keyCode){var o=$(r.root+" .gene_search_box").val();n(t,o,l)}}),$(r.root+" .submit_gene_button").off().click(function(){var e=$(r.root+" .gene_search_box").val();n(t,e,l)});var c;if(c=r.sim_mat?["both"]:["row","col"],_.each(c,function(e){$(r.root+" .toggle_"+e+"_order .btn").off().click(function(a){var n=$(a.target).attr("name").replace("_row","").replace("_col","");d3.selectAll(r.root+" .toggle_"+e+"_order .btn").classed("active",!1),d3.select(this).classed("active",!0),"both"!=e?o(t,n,e):(o(t,n,"row"),o(t,n,"col"))})}),a(t),d3.select(t.params.root+" .opacity_slider").select("#handle-one").empty()){var d=d3.slider().snap(!0).value(1).min(.1).max(1.9).step(.1).on("slide",function(t,r){e(t,r)});d3.select(t.params.root+" .opacity_slider").call(d)}}},function(t,e,r){"use strict";var o=r(80);t.exports=function(t,e,r){var a="name";if(r.indexOf(e)!==-1){d3.selectAll(t.params.root+" .row_label_group").select("rect").style("opacity",0);var n=_.indexOf(r,e),i=t.params.viz.y_scale(n),s=t.params.viz.clust.dim.height/2-i,l=t.params.viz.zoom_ratio.x;o(t,0,s,l),t.params.zoom_info.zoom_y=l,d3.selectAll(t.params.root+" .row_label_group").filter(function(t){return t[a]===e}).select("rect").style("opacity",1)}}},function(t,e){"use strict";t.exports=function(t){t.dendro_filter.row===!1&&"clust"===t.viz.inst_order.col&&d3.select(t.root+" .row_slider_group").style("opacity",1).style("pointer-events","all"),d3.selectAll(t.root+" .toggle_row_order .btn").attr("disabled",null),t.dendro_filter.col===!1&&"clust"===t.viz.inst_order.row&&d3.select(t.root+" .col_slider_group").style("opacity",1).style("pointer-events","all"),d3.selectAll(t.root+" .toggle_col_order .btn").attr("disabled",null),d3.selectAll(t.root+" .gene_search_button .btn").attr("disabled",null),t.viz.run_trans=!1}},function(t,e){"use strict";t.exports=function(t,e){_.each(["row","col"],function(r){var o;o="row"===r?"col":"row",d3.selectAll(e.root+" .toggle_"+o+"_order .btn").filter(function(){return d3.select(this).attr("name")===t.inst_order[r]}).classed("active",!0)})}},function(t,e,r){"use strict";var o=r(161),a=r(2);t.exports=function(t,e){var r,n,i,s,l,c,d,u,p=!(arguments.length<=2||void 0===arguments[2])&&arguments[2],v=0,f=0;_.each(e,function(e){s=e.name,p===!0&&(s.indexOf(" ")?s=s.split(" ")[0]:s.indexOf("_")&&(s=s.split("_")[0])),v=0,o(e),_.each(t,function(t){if(r=t.cat_title,n=t.cats,l="false",f=-1,u=0,_.each(n,function(t){c=t.cat_name,i=t.members,_.contains(i,s)&&(l=c,f=u),u+=1}),a.has(t,"pval")){var o=t.pval.toExponential();d=r+": "+l+"

Pval "+String(o)+"

"}else d=r.indexOf("cat-")===-1?r+": "+l:l;e["cat-"+String(v)]=d,e["cat_"+String(v)+"_index"]=f,v+=1})})}},function(t,e){"use strict";t.exports=function(t){var e=_.keys(t);_.each(e,function(e){e.indexOf("cat-")>-1&&delete t[e],e.indexOf("cat_")>-1&&delete t[e]})}},function(t,e,r){"use strict";var o=r(146),a=r(67),n=r(70),i=r(155);t.exports=function(t){d3.selectAll(t.params.root+" .row_cat_group").remove(),d3.selectAll(t.params.root+" .row_label_group").remove(),d3.selectAll(t.params.root+" .row").remove();var e=!0,r=!0,s=!0;n(t,e,r,s),a(t);var l=t.params.network_data.col_nodes;d3.selectAll(t.params.root+" .col_label_group").data(l,function(t){return t.name}).exit().style("opacity",0).remove(),d3.selectAll(t.params.root+" .col_label_text").data(l,function(t){return t.name}).exit().style("opacity",0).remove(),d3.selectAll(t.params.root+" .col_cat_group").data(l,function(t){return t.name}).exit().style("opacity",0).remove(),d3.selectAll(t.params.root+" .col_dendro_group").data(l,function(t){return t.name}).exit().style("opacity",0).remove(),i(t.params);var c={};c.enter=0,c.update=0,c.run_transition=!1;var d=0;o(t,d,c)}},function(t,e,r){"use strict";var o=r(135);t.exports=function(){function t(t){var e=Number(d3.select(t.root+" .expand_button").attr("x").replace("px","")),n=Number(d3.select(t.root+" .expand_button").attr("y").replace("px","")),i=0,s=400;setTimeout(o,i,t,"single",e,n),setTimeout(r,s,t),setTimeout(a,1500,t)}function e(){return 3500}function r(t){$(t.root+" .expand_button").d3Click()}function a(t){n(t,"row","clust"),n(t,"col","clust")}function n(t,e,r){var o=d3.selectAll(".toggle_"+e+"_order .btn").filter(function(){return this.__data__==r})[0];$(o).click()}return jQuery.fn.d3Click=function(){this.each(function(t,e){var r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.dispatchEvent(r)})},{run:t,get_duration:e}}},function(t,e,r){"use strict";var o=r(132),a=r(138),n=r(127);t.exports=function(){function t(t){var e="Identify row and column groups\nof varying sizes using the\nsliders and dendrogram";o(t,e,1e4),setTimeout(a,3e3,t,"slider_col",7e3),setTimeout(r,4e3,t,"row",3),setTimeout(r,5e3,t,"row",4),setTimeout(r,6e3,t,"row",5),setTimeout(r,7e3,t,"row",6), +setTimeout(r,8e3,t,"row",7),setTimeout(r,9e3,t,"row",5)}function e(){return 11e3}function r(t,e,r){$(cgm.params.root+" .slider_col").slider("value",r/10),n(cgm,e,r)}return{run:t,get_duration:e}}},function(t,e,r){"use strict";var o=r(132),a=r(135);t.exports=function(){function t(t){var e="Row and column categories\ncan be use to reorder\nby double-clicking";o(t,e,7e3);var n=d3.selectAll(t.root+" .col_cat_super").filter(function(){return"cat-1"===this.__data__})[0],i=d3.select(".col_cat_super").attr("transform"),s=Number(i.split("(")[1].split(",")[0].replace(")",""))+20,l=Number(i.split(",")[1].replace(")","")),c=4e3;setTimeout(a,c,t,"double",s,l);var d=c+300;setTimeout(r,d,t,n)}function e(){return 8e3}function r(t,e){$(e).d3DblClick()}return jQuery.fn.d3DblClick=function(){this.each(function(t,e){var r=document.createEvent("MouseEvents");r.initMouseEvent("dblclick",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.dispatchEvent(r)})},{run:t,get_duration:e}}},function(t,e,r){"use strict";var o=r(132),a=r(167);t.exports=function(){function t(t){var r="Clustergrammer is built with gene\nexpression data in mind and interfaces\nwith several Ma'ayan lab web tools",a="The example data being visualized is\ngene expression data obtained from the\nCancer Cell Line Encyclopedia",n="For more information please view\nthe help documentation";setTimeout(o,0,t,r,4500),setTimeout(o,4500,t,a,4500),setTimeout(o,9e3,t,n,4500),setTimeout(e,14e3,t)}function e(t){d3.select(t.root+" .play_button").classed("running_demo",!1),a(t,!0)}function r(){return 12e3}return{run:t,get_duration:r}}},function(t,e){"use strict";t.exports=function(t,e){e===!1?d3.select(t.root+" .play_button").transition().duration(500).style("opacity",0):(d3.select(t.root+" .play_button").transition().duration(500).style("opacity",1),$.unblockUI())}},function(t,e,r){"use strict";var o=r(132),a=r(135);t.exports=function(){function t(t){var e="View additional controls\nby clicking the menu button";o(t,e,4e3);var n=Number(d3.select(t.root+" .expand_button").attr("x").replace("px","")),i=Number(d3.select(t.root+" .expand_button").attr("y").replace("px","")),s=3e3,l=3400;setTimeout(a,s,t,"single",n,i),setTimeout(r,l,t)}function e(){return 5e3}function r(t){$(t.root+" .expand_button").d3Click()}return jQuery.fn.d3Click=function(){this.each(function(t,e){var r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.dispatchEvent(r)})},jQuery.fn.d3DblClick=function(){this.each(function(t,e){var r=document.createEvent("MouseEvents");r.initMouseEvent("dblclick",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.dispatchEvent(r)})},{run:t,get_duration:e}}},function(t,e,r){"use strict";var o=r(170),a=r(171);t.exports=function(){var t=this,e=t.params;o(t);var r=30;a(e,r)}},function(t,e,r){"use strict";var o=r(113);t.exports=function(t){var e=t.params;if(d3.select(e.root+" .play_button").empty()){var r=d3.select(e.root+" .viz_svg").append("g").classed("play_button",!0).classed("running_demo",!1);o(e),r.append("circle").style("r",45).style("fill","white").style("stroke","black").style("stroke-width","3px").style("opacity",.5),r.append("path").attr("d",function(){var t=40,e=22,r=15;return"M-"+r+",-"+e+" l "+t+","+e+" l -"+t+","+e+" z "}).style("fill","black").style("opacity",.5),r.on("mouseover",function(){d3.select(this).select("path").style("fill","red").style("opacity",1),d3.select(this).select("circle").style("opacity",1)}).on("mouseout",function(){d3.select(this).select("path").style("fill","black").style("opacity",.5),d3.select(this).select("circle").style("opacity",.5)}).on("click",function(){t.play_demo()})}}},function(t,e){"use strict";t.exports=function(t,e){if(d3.select(t.root+" .demo_group").empty()){var r=d3.select(t.root+" .clust_container").attr("transform"),o=Number(r.split("(")[1].split(",")[0]),a=Number(r.split(",")[1].replace(")","")),n=d3.select(t.root+" .viz_svg").append("g").classed("demo_group",!0).attr("transform",function(){var t=o+20,e=a+40;return"translate("+t+","+e+")"});n.append("rect").classed("rect_1",!0),n.append("rect").classed("rect_2",!0),n.append("rect").classed("rect_3",!0);var i=1.3*e;n.append("text").attr("id","text_1").attr("font-size",e+"px").attr("font-weight",1e3).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif'),n.append("text").attr("id","text_2").attr("font-size",e+"px").attr("font-weight",1e3).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("transform",function(){return"translate(0,"+String(i)+")"}),n.append("text").attr("id","text_3").attr("font-size",e+"px").attr("font-weight",1e3).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("transform",function(){return"translate(0,"+String(2*i)+")"})}}},function(t,e,r){"use strict";var o=r(11),a=r(143);t.exports=function(t){var e=o(this.config,t);a(this,e)}},function(t,e,r){"use strict";var o=r(11),a=r(143);t.exports=function(t){var e,r=!(arguments.length<=1||void 0===arguments[1])&&arguments[1];e=r===!1?this:r;var n,i=e.params,s={};_.each(["row","col"],function(e){var r=i.inst_nodes[e+"_nodes"];if(_.has(t,e))if(t[e].length>0){var o=t[e];n=$.grep(r,function(t){return $.inArray(t.name,o)>-1})}else n=r;else n=r;s[e+"_nodes"]=n});var l=e.params.network_data.row_nodes,c=e.params.network_data.col_nodes,d=o(e.config,s);a(e,d),l.length>e.params.inst_nodes.row_nodes.length&&(e.params.inst_nodes.row_nodes=l),c.length>e.params.inst_nodes.col_nodes.length&&(e.params.inst_nodes.col_nodes=c)}},function(t,e,r){"use strict";var o=r(122),a=r(15),n=r(88),i=r(160);t.exports=function(t,e){null!=t.params.cat_update_callback&&t.params.cat_update_callback(this);var r=t.params.viz.cat_colors.col;i(e,t.params.network_data.row_nodes,!0),i(e,t.params.inst_nodes.row_nodes,!0),t.params=a(t.params,!1),o(t,!0),n(t),t.params.new_row_cats=e,t.params.viz.cat_colors.col=r}},function(t,e,r){"use strict";var o=r(122),a=r(15),n=r(88),i=r(160),s=r(176);t.exports=function(){var t=arguments.length<=0||void 0===arguments[0]||arguments[0],e=this,r=s(e),l=e.params.viz.cat_colors.col;if(i(r,e.params.network_data.row_nodes),i(r,e.params.inst_nodes.row_nodes),e.params.new_row_cats=r,e.params.viz.cat_colors.col=l,t){var c=!0;e.params=a(e.params,c),o(e,!0),n(e)}}},function(t,e){"use strict";t.exports=function(t){function e(t,e,a){r={},r.cat_title=t,r.cats=[],o={},o.cat_name=e,o.members=[],o.members.push(a),r.cats.push(o),p.push(r)}var r,o,a,n,i,s,l,c,d=t.config.network_data.row_nodes,u=": ",p=[],v=d[0],f=_.keys(v),m={};_.each(f,function(t){t.indexOf("cat-")>=0&&(s=v[t],c=parseInt(t.split("cat-")[1],10),l=s.indexOf(u)>=0?s.split(u)[0]:t,m[c]=l)});var h,g=_.keys(m).sort();return _.each(g,function(t){h={},h.cat_title=m[t],h.cats=[],p.push(h)}),_.each(d,function(t){var r=_.keys(t);_.each(r,function(r){if(r.indexOf("cat-")>-1){i=t[r],c=parseInt(r.split("cat-")[1],10);var s=r;i=t[r];var l=t[r],d=t.name;l.indexOf(u)>-1?(s=l.split(u)[0],i=l.split(u)[1]):(s=r,i=l),0===p.length?e(s,i,d):(a=!1,_.each(p,function(t){s===t.cat_title&&(a=!0,n=!1,_.each(t.cats,function(t){i===t.cat_name&&(n=!0,t.members.push(d))}),n===!1&&(o={},o.cat_name=i,o.members=[],o.members.push(d),t.cats.push(o)))}))}})}),p}},function(t,e,r){"use strict";var o=r(141),a=r(178);t.exports=function(t,e){var r=this,n={};n[t]=e,o(this,n),a(r,t,e)}},function(t,e,r){"use strict";var o=r(179);t.exports=function(t,e,r){var a,n,i=t.params;d3.select(i.root+" .slider_"+e).attr("current_state",r),_.each(_.keys(i.viz.possible_filters),function(r){if(a=e.indexOf("row")>-1?"row":e.indexOf("col")>-1?"col":"neither",n=r.indexOf("row")>-1?"row":r.indexOf("col")>-1?"col":"neither",e!=r&&"neither"!=a&&a==n){var s=o(i,r);t.slider_functions[r].value(0),d3.select(i.root+" .title_"+r).text(s.text+s.state),d3.select(i.root+" .slider_"+r).attr("current_state",s.state)}});var s=o(i,e);d3.select(i.root+" .title_"+e).text(s.text+r+s.suffix)}},function(t,e,r){"use strict";var o=r(5);t.exports=function(t,e){var r={},a={},n={};return r.state=o(t.viz.filter_data,e),n.top=e.split("_")[0],n.node=e.split("_")[1],n.measure=e.split("_")[2],"row"===n.node?a.node="rows":a.node="columns","N"===n.top&&(r.suffix=""),"pct"===n.top&&(r.suffix="%"),"sum"==n.measure?a.measure="sum":"var"==n.measure&&(a.measure="variance"),"sum"===n.measure&&(r.text="Top "+a.node+" "+a.measure+": "),"var"===n.measure&&(r.text="Top "+a.node+" "+a.measure+": "),_.keys(t.viz.possible_filters).indexOf("enr_score_type")>-1&&"col"===n.node&&(r.text="Top Enriched Terms: ",r.suffix=""),r}},function(t,e,r){"use strict";var o=r(181),a=r(182);t.exports=function(){var t=o(),e=this.params,r=a(e),n=new Blob([r],{type:"text/plain;charset=utf-8"});t(n,"clustergrammer.txt")}},function(t,e){"use strict";t.exports=function(){/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ +var t=t||navigator.msSaveBlob&&navigator.msSaveBlob.bind(navigator)||function(t){var e=t.document,r=function(){return t.URL||t.webkitURL||t},o=t.URL||t.webkitURL||t,a=e.createElementNS("http://www.w3.org/1999/xhtml","a"),n="download"in a,i=function(r){var o=e.createEvent("MouseEvents");o.initMouseEvent("click",!0,!1,t,0,0,0,0,0,!1,!1,!1,!1,0,null),r.dispatchEvent(o)},s=t.webkitRequestFileSystem,l=t.requestFileSystem||s||t.mozRequestFileSystem,c=function(e){(t.setImmediate||t.setTimeout)(function(){throw e},0)},d="application/octet-stream",_=0,u=[],p=function(){for(var t=u.length;t--;){var e=u[t];"string"==typeof e?o.revokeObjectURL(e):e.remove()}u.length=0},v=function(t,e,r){e=[].concat(e);for(var o=e.length;o--;){var a=t["on"+e[o]];if("function"==typeof a)try{a.call(t,r||t)}catch(n){c(n)}}},f=function(e,o){var c,p,f,m=this,h=e.type,g=!1,w=function(){var t=r().createObjectURL(e);return u.push(t),t},y=function(){v(m,"writestart progress write writeend".split(" "))},x=function(){!g&&c||(c=w(e)),p&&(p.location.href=c),m.readyState=m.DONE,y()},b=function(t){return function(){if(m.readyState!==m.DONE)return t.apply(this,arguments)}},z={create:!0,exclusive:!1};return m.readyState=m.INIT,o||(o="download"),n?(c=w(e),a.href=c,a.download=o,i(a),m.readyState=m.DONE,void y()):(t.chrome&&h&&h!==d&&(f=e.slice||e.webkitSlice,e=f.call(e,0,e.size,d),g=!0),s&&"download"!==o&&(o+=".download"),p=h===d||s?t:t.open(),l?(_+=e.size,void l(t.TEMPORARY,_,b(function(t){t.root.getDirectory("saved",z,b(function(t){var r=function(){t.getFile(o,z,b(function(t){t.createWriter(b(function(r){r.onwriteend=function(e){p.location.href=t.toURL(),u.push(t),m.readyState=m.DONE,v(m,"writeend",e)},r.onerror=function(){var t=r.error;t.code!==t.ABORT_ERR&&x()},"writestart progress write abort".split(" ").forEach(function(t){r["on"+t]=m["on"+t]}),r.write(e),m.abort=function(){r.abort(),m.readyState=m.DONE},m.readyState=m.WRITING}),x)}),x)};t.getFile(o,{create:!1},b(function(t){t.remove(),r()}),b(function(t){t.code===t.NOT_FOUND_ERR?r():x()}))}),x)}),x)):void x())},m=f.prototype,h=function(t,e){return new f(t,e)};return m.abort=function(){var t=this;t.readyState=t.DONE,v(t,"abort")},m.readyState=m.INIT=0,m.WRITING=1,m.DONE=2,m.error=m.onwritestart=m.onprogress=m.onwrite=m.onabort=m.onerror=m.onwriteend=null,t.addEventListener("unload",p,!1),h}(self);return t}},function(t,e,r){"use strict";var o=r(183);t.exports=function(t){var e,r=t.matrix,a={};_.each(["row","col"],function(o){var n;n="row"===o?"col":"row",e=t.inst_order[o],a[n]=r.orders[e+"_"+o]});for(var n="\t",i=t.network_data.row_nodes,s=t.network_data.col_nodes,l=0;l0){a="('"+a+"'";for(var i=0;ie&&(t=i[0],e=n[0]),r>o&&(r=i[1],o=n[1]),r-=a.viz.rect_height,t-=a.viz.rect_width;var s={};return s.row=[],s.col=[],_.each(a.matrix.matrix,function(t){var e=a.viz.y_scale(t.row_index);e>r&&et&&a=i[1])return;if(1===w)"array"==n(i)&&2==i.length&&("left"===_?d.style("left",l):d.style("bottom",l)),f?c.transition().styleTween(_,function(){return t.interpolate(a,l)}).duration("number"==typeof f?f:250):c.style(_,l);else{var u=100-parseFloat(l),p=100-parseFloat(l);"left"===_?d.style("right",u+"%"):d.style("top",p+"%"),f?k.transition().styleTween(_,function(){return t.interpolate(a,l)}).duration("number"==typeof f?f:250):k.style(_,l)}}}function o(t){if(t===s.domain()[0]||t===s.domain()[1])return t;var e=t;if(y)e=a(s(t));else{var r=(t-s.domain()[0])%v;e=t-r,2*Math.abs(r)>=v&&(e+=r>0?v:-v)}return e}function a(t){var e=s.ticks?s.ticks():s.domain(),r=e.map(function(e){return t-s(e)}),o=-1,a=0,n=s.ticks?s.range()[1]:s.rangeExtent()[1];do o++,Math.abs(r[o])0&&o-1)this._list=t.split(/\s*,\s*/);else if(t=a(t),t&&t.children){var e=[];l.apply(t.children).forEach(function(t){if(!t.disabled){var r=t.textContent.trim(),o=t.value||r,a=t.label||r;""!==o&&e.push({label:a,value:o})}}),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return!this.ul.hasAttribute("hidden")},close:function(t){this.opened&&(this.ul.setAttribute("hidden",""),this.index=-1,a.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.ul.removeAttribute("hidden"),this.autoFirst&&this.index===-1&&this["goto"](0),a.fire(this.input,"awesomplete-open")},next:function(){var t=this.ul.children.length;this["goto"](this.index-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.status.textContent=e[t].textContent,a.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e){if(t?this.index=a.siblingIndex(t):t=this.ul.children[this.index],t){var r=this.suggestions[this.index],o=a.fire(this.input,"awesomplete-select",{text:r,origin:e||t});o&&(this.replace(r),this.close({reason:"select"}),a.fire(this.input,"awesomplete-selectcomplete",{text:r}))}},evaluate:function(){var t=this,e=this.input.value;e.length>=this.minChars&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map(function(o){return new r(t.data(o,e))}).filter(function(r){return t.filter(r,e)}).sort(this.sort).slice(0,this.maxItems),this.suggestions.forEach(function(r){t.ul.appendChild(t.item(r,e))}),0===this.ul.children.length?this.close({reason:"nomatches"}):this.open()):this.close({reason:"nomatches"})}},s.all=[],s.FILTER_CONTAINS=function(t,e){return RegExp(a.regExpEscape(e.trim()),"i").test(t)},s.FILTER_STARTSWITH=function(t,e){return RegExp("^"+a.regExpEscape(e.trim()),"i").test(t)},s.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:t$&");return a.create("li",{innerHTML:r,"aria-selected":"false"})},s.REPLACE=function(t){this.input.value=t.value},s.DATA=function(t){return t},Object.defineProperty(r.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),r.prototype.toString=r.prototype.valueOf=function(){return""+this.label};var l=Array.prototype.slice;return a.create=function(t,e){var r=document.createElement(t);for(var o in e){var n=e[o];if("inside"===o)a(n).appendChild(r);else if("around"===o){var i=a(n);i.parentNode.insertBefore(r,i),r.appendChild(i)}else o in r?r[o]=n:r.setAttribute(o,n)}return r},a.bind=function(t,e){if(t)for(var r in e){var o=e[r];r.split(/\s+/).forEach(function(e){t.addEventListener(e,o)})}},a.fire=function(t,e,r){var o=document.createEvent("HTMLEvents");o.initEvent(e,!0,!0);for(var a in r)o[a]=r[a];return t.dispatchEvent(o)},a.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},a.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof Document&&("loading"!==document.readyState?i():document.addEventListener("DOMContentLoaded",i)),s.$=a,s.$$=n,"undefined"!=typeof self&&(self.Awesomplete=s),"object"===e(t)&&t.exports&&(t.exports=s),s}()}).call(e,r(189)(t))},function(t,e){"use strict";t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e,r){var o=r(191);"string"==typeof o&&(o=[[t.id,o,""]]);r(193)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,r){e=t.exports=r(192)(),e.push([t.id,".d3-slider{position:relative;font-family:Verdana,Arial,sans-serif;font-size:1.1em;border:1px solid #aaa;z-index:2}.d3-slider-horizontal{height:.8em}.d3-slider-range{height:.8em}.d3-slider-range,.d3-slider-range-vertical{background:#2980b9;left:0;right:0;position:absolute}.d3-slider-range-vertical{top:0}.d3-slider-vertical{width:.8em;height:100px}.d3-slider-handle{position:absolute;width:1.2em;height:1.2em;border:1px solid #d3d3d3;border-radius:4px;background:#eee;background:linear-gradient(180deg,#eee 0,#ddd);z-index:3}.d3-slider-handle:hover{border:1px solid #999}.d3-slider-horizontal .d3-slider-handle{top:-.3em;margin-left:-.6em}.d3-slider-axis{position:relative;z-index:1}.d3-slider-axis-bottom{top:.8em}.d3-slider-axis-right{left:.8em}.d3-slider-axis path{stroke-width:0;fill:none}.d3-slider-axis line{fill:none;stroke:#aaa;shape-rendering:crispEdges}.d3-slider-axis text{font-size:11px}.d3-slider-vertical .d3-slider-handle{left:-.25em;margin-left:0;margin-bottom:-.6em}",""])},function(t,e){"use strict";t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e=0&&w.splice(e,1)}function s(t){var e=document.createElement("style");return e.type="text/css",n(t,e),e}function l(t){var e=document.createElement("link");return e.rel="stylesheet",n(t,e),e}function c(t,e){var r,o,a;if(e.singleton){var n=g++;r=h||(h=s(e)),o=d.bind(null,r,n,!1),a=d.bind(null,r,n,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=l(e),o=u.bind(null,r),a=function(){i(r),r.href&&URL.revokeObjectURL(r.href)}):(r=s(e),o=_.bind(null,r),a=function(){i(r)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else a()}}function d(t,e,r,o){var a=r?"":o.css;if(t.styleSheet)t.styleSheet.cssText=y(e,a);else{var n=document.createTextNode(a),i=t.childNodes;i[e]&&t.removeChild(i[e]),i.length?t.insertBefore(n,i[e]):t.appendChild(n)}}function _(t,e){var r=e.css,o=e.media;if(o&&t.setAttribute("media",o),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}function u(t,e){var r=e.css,o=e.sourceMap;o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),n=t.href;t.href=URL.createObjectURL(a),n&&URL.revokeObjectURL(n)}var p={},v=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},f=v(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),m=v(function(){return document.head||document.getElementsByTagName("head")[0]}),h=null,g=0,w=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=f()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var r=a(t);return o(r,e),function(t){for(var n=[],i=0;iinput{display:block}div.awesomplete>ul{position:absolute;left:0;z-index:1;min-width:100%;box-sizing:border-box;list-style:none;padding:0;border-radius:.3em;margin:.2em 0 0;background:hsla(0,0%,100%,.9);background:linear-gradient(to bottom right,#fff,hsla(0,0%,100%,.8));border:1px solid rgba(0,0,0,.3);box-shadow:.05em .2em .6em rgba(0,0,0,.2);text-shadow:none}div.awesomplete>ul:empty,div.awesomplete>ul[hidden]{display:none}@supports (transform:scale(0)){div.awesomplete>ul{transition:.3s cubic-bezier(.4,.2,.5,1.4);transform-origin:1.43em -.43em}div.awesomplete>ul:empty,div.awesomplete>ul[hidden]{opacity:0;transform:scale(0);display:block;transition-timing-function:ease}}div.awesomplete>ul:before{content:"";position:absolute;top:-.43em;left:1em;width:0;height:0;padding:.4em;background:#fff;border:inherit;border-right:0;border-bottom:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}div.awesomplete>ul>li{position:relative;padding:.2em .5em;cursor:pointer}div.awesomplete>ul>li:hover{background:#b8d3e0;color:#000}div.awesomplete>ul>li[aria-selected=true]{background:#3d6d8f;color:#fff}div.awesomplete mark{background:#eaff00}div.awesomplete li:hover mark{background:#b5d100}div.awesomplete li[aria-selected=true] mark{background:#3d6b00;color:inherit}',""])},function(t,e,r){"use strict";var o=r(156),a=r(197),n=r(202),i=r(203),s=r(204),l=r(205),c=r(207),d=r(209);t.exports=function u(t){var e=t.params,u=d3.select(e.root+" .sidebar_wrapper");e.viz.is_expand&&u.style("display","none"),u.append("div").classed("title_section",!0),null!=e.sidebar.title&&u.select(".title_section").append("h4").style("margin-left","20px").style("margin-top","5px").style("margin-bottom","0px").text(e.sidebar.title),u.append("div").style("padding-right","2px").classed("about_section",!0),null!=e.sidebar.about&&u.select(".about_section").append("h5").classed("sidebar_text",!0).style("margin-left","7px").style("margin-top","5px").style("margin-bottom","2px").style("text-align","justify").html(e.sidebar.about),u.append("div").classed("icons_section",!0).style("text-align","center"),t.params.make_modals&&c(e),e.sidebar.icons&&l(t,u),i(e,u),n(u,e),d(u);var r=_.keys(e.viz.possible_filters);r.indexOf("enr_score_type")>-1&&r.sort(function(t,e){return t.toLowerCase().localeCompare(e.toLowerCase())}),t.slider_functions={},_.each(r,function(e){a(t,e)}),o(t),null!==e.ini_view&&(s(e),e.ini_view=null)}},function(t,e,r){"use strict";var o=r(198),a=r(201);t.exports=function(t,e){var r=t.params,n=d3.select(r.root+" .sidebar_wrapper").append("div").classed("div_filters",!0).style("padding-left","10px").style("padding-right","10px");"numerical"==r.viz.possible_filters[e]?o(t,e,n):"categorical"==r.viz.possible_filters[e]&&a(t,e,n)}},function(t,e,r){"use strict";var o=r(179),a=r(199),n=r(5),i=r(12);d3.slider=r(186),t.exports=function(t,e,r){var s=t.params,l={},c=_.keys(s.viz.possible_filters);_.each(c,function(t){if(t!=e){var r=n(s.viz.filter_data,t);l[t]=r}});var d=o(s,e);r.append("div").classed("title_"+e,!0).classed("sidebar_text",!0).classed("slider_description",!0).style("margin-top","5px").style("margin-bottom","3px").text(d.text+d.state+d.suffix),r.append("div").classed("slider_"+e,!0).classed("slider",!0).attr("current_state",d.state);var u=s.network_data.views,p=i(s,u,l);p=p.sort(function(t,r){return r[e]-t[e]});var v=p.length-1,f=0;if(null!==s.requested_view&&e in s.requested_view){var m=s.requested_view[e];if("all"!=m){var h=p.map(function(t){return t[e]}).indexOf(m);h>0&&(f=h)}}var g=d3.slider().value(f).min(0).max(v).step(1).on("slide",function(r,o){w(t,e,p,o)}).on("slideend",function(r,o){w(t,e,p,o)});t.slider_functions[e]=g,d3.select(t.params.root+" .slider_"+e).call(g);var w=_.debounce(a,800)}},function(t,e,r){"use strict";var o=r(141),a=r(178),n=r(200),i=r(14);t.exports=function(t,e,r,s){if(d3.select(t.params.viz.viz_svg).classed("running_update")===!1){var l=t.params,c=r[s][e];a(t,e,c),l=n(l);var d={};if(d[e]=c,d=i(l,d),_.has(r[0],"enr_score_type")){var u=d3.select(l.root+" .toggle_enr_score_type").attr("current_state");d.enr_score_type=u}o(t,d)}}},function(t,e){"use strict";t.exports=function(t){var e;return _.each(["row","col"],function(r){e="row"===r?"col":"row",d3.select(t.root+" .toggle_"+e+"_order .active").empty()===!1?t.viz.inst_order[r]=d3.select(t.root+" .toggle_"+e+"_order").select(".active").attr("name"):t.viz.inst_order[r]="clust"}),t}},function(t,e,r){"use strict";var o=r(14);t.exports=function(t,e,r,a){var n=a.append("div").classed("categorical_filter",!0).classed("toggle_"+r,!0).classed("btn-group-vertical",!0).style("width","100%").style("margin-top","10px").attr("current_state","combined_score"),i=e.viz.filter_data[r],s={combined_score:"Combined Score",pval:"P-Value",zscore:"Z-score"};n.selectAll("button").data(i).enter().append("button").attr("type","button").classed("btn",!0).classed("btn-primary",!0).classed(".filter_button",!0).classed("active",function(t){var e=!1;return"combined_score"==t&&(e=!0),e}).attr("name",function(t){return t}).html(function(t){return s[t]}),$(e.root+" .categorical_filter .btn").off().click(function(){d3.selectAll(e.root+" .categorical_filter .btn").classed("active",!1),d3.select(this).classed("active",!0);var t=d3.select(this).attr("name"),r={enr_score_type:t};o(e,r),d3.select(e.root+" .toggle_enr_score_type").attr("current_state",t)})}},function(t,e){"use strict";t.exports=function(t,e){var r=t.append("div").classed("gene_search_container",!0).style("padding-left","10px").style("padding-right","10px").style("margin-top","10px");r.append("input").classed("form-control",!0).classed("gene_search_box",!0).classed("sidebar_text",!0).attr("type","text").attr("placeholder",e.sidebar.row_search.placeholder).style("height",e.sidebar.row_search.box.height+"px").style("margin-top","10px"),r.append("div").classed("gene_search_button",!0).style("margin-top","5px").attr("data-toggle","buttons").append("button").classed("sidebar_text",!0).html("Search").attr("type","button").classed("btn",!0).classed("btn-primary",!0).classed("submit_gene_button",!0).style("width","100%").style("font-size","14px")}},function(t,e){"use strict";t.exports=function(t,e){var r,o,a,n,i,s={row:"Row",col:"Column",both:""},l=e.append("div").style("padding-left","10px").style("padding-right","10px").classed("reorder_section",!0);i=t.sim_mat?["both"]:["row","col"],_.each(i,function(e){r={clust:"Cluster",rank:"Rank by Sum",rankvar:"Rank by Variance",ini:"Initial Order",alpha:"Alphabetically"};var i;i="row"===e?"col":"row",o=Object.keys(t.matrix.orders);var c=[];_.each(o,function(t){t.indexOf(i)>-1&&(t=t.replace("_row","").replace("_col",""),t.indexOf("cat_")<0&&c.push(t))}),_.keys(t.viz.filter_data).indexOf("enr_score_type")>-1&&(c=["clust","rank"]),c=_.uniq(c),c=c.sort();var d;d="both"!=e?" Order":"Reorder Matrix",l.append("div").classed("sidebar_button_text",!0).style("clear","both").style("margin-top","10px").html(s[e]+d),n=l.append("div").classed("btn-group-vertical",!0).style("width","100%").classed("toggle_"+e+"_order",!0).attr("role","group"),n.selectAll(".button").data(c).enter().append("button").attr("type","button").classed("btn",!0).classed("btn-primary",!0).classed("sidebar_button_text",!0).classed("active",function(e){return a=!1,e==t.viz.inst_order[i]&&(a=!0),a}).attr("name",function(t){return t}).html(function(t){return r[t]})})}},function(t,e,r){"use strict";var o=r(179);t.exports=function(t){_.each(_.keys(t.ini_view),function(e){var r=t.ini_view[e],a=t.viz.possible_filters[e];if("numerical"===a){"all"!=r&&(r=parseInt(r,10)),t.viz.filter_data[e].indexOf(r)<=-1&&(r="all");var n=o(t,e);d3.select(t.root+" .title_"+e).text(n.text+r+n.suffix),d3.select(t.root+" .slider_"+e).attr("current_state",r)}})}},function(t,e,r){"use strict";var o=r(181),a=r(80),n=r(185),i=r(206);t.exports=function(t,e){function r(){d3.select(s.root+" .expand_button").style("opacity",0);var t=d3.select(s.root+" svg").attr("title","test2").attr("version",1.1).attr("xmlns","http://www.w3.org/2000/svg").node().parentNode.innerHTML,e=new Blob([t],{type:"image/svg+xml"});l(e,"clustergrammer.svg"),d3.select(s.root+" .expand_button").style("opacity",.4)}var s=t.params,l=o(),c=e.select(".icons_section").style("margin-top","7px").style("margin-left","5%"),d="22%",_="0px",u="0px";c.append("div").classed("clust_icon",!0).style("float","left").style("width",d).style("padding-left",_).style("padding-right",u).append("i").classed("fa",!0).classed("fa-share-alt",!0).classed("icon_buttons",!0).style("font-size","25px").on("click",function(){$(s.root+" .share_info").modal("toggle"),$(".share_url").val(window.location.href)}).classed("sidebar_tooltip",!0).append("span").classed("sidebar_tooltip_text",!0).html("Share").style("left","0%"),c.append("div").classed("clust_icon",!0).style("float","left").style("width",d).style("padding-left",_).style("padding-right",u).append("i").classed("fa",!0).classed("fa-camera",!0).classed("icon_buttons",!0).style("font-size","25px").on("click",function(){$(s.root+" .picture_info").modal("toggle")}).classed("sidebar_tooltip",!0).append("span").classed("sidebar_tooltip_text",!0).html("Take snapshot").style("left","-100%"),c.append("div").classed("clust_icon",!0).style("float","left").style("width",d).style("padding-left",_).style("padding-right",u).append("i").classed("fa",!0).classed("fa fa-cloud-download",!0).classed("icon_buttons",!0).style("font-size","25px").on("click",function(){t.save_matrix()}).classed("sidebar_tooltip",!0).append("span").classed("sidebar_tooltip_text",!0).html("Download matrix").style("left","-200%"),c.append("div").classed("clust_icon",!0).style("float","left").style("width",d).style("padding-left",_).style("padding-right","-5px").append("i").classed("fa",!0).classed("fa-crop",!0).classed("crop_button",!0).classed("icon_buttons",!0).style("font-size","25px").on("click",function(){if(t.params.dendro_filter.row===!1&&t.params.dendro_filter.col===!1){var e=d3.select(this).classed("fa-crop"),r=d3.select(this).classed("fa-undo");e&&(t.params.crop_filter_nodes={},t.params.crop_filter_nodes.row_nodes=t.params.network_data.row_nodes,t.params.crop_filter_nodes.col_nodes=t.params.network_data.col_nodes,t.brush_crop_matrix(),d3.select(this).classed("active_cropping")===!1?d3.select(this).classed("active_cropping",!0).style("color","red"):(d3.select(this).classed("active_cropping",!1).style("color","#337ab7"),n(t))),r&&(d3.select(s.root+" .crop_button").style("color","#337ab7").classed("fa-crop",!0).classed("fa-undo",!1),t.filter_viz_using_nodes(t.params.crop_filter_nodes),d3.select(t.params.root+" .col_dendro_icons_container").style("display","block"),d3.select(t.params.root+" .row_dendro_icons_container").style("display","block")),a(t,0,0,1)}}).classed("sidebar_tooltip",!0).append("span").classed("sidebar_tooltip_text",!0).html("Crop matrix").style("left","-400%"),d3.select(s.root+" .download_buttons").append("p").append("a").html("Download SVG").on("click",function(){r()});var p="svg_"+s.root.replace("#","");d3.select(s.root+" .download_buttons").append("p").append("a").html("Download PNG").on("click",function(){d3.select(s.root+" .expand_button").style("opacity",0),i.saveSvgAsPng(document.getElementById(p),"clustergrammer.png"),d3.select(s.root+" .expand_button").style("opacity",.4)})}},function(t,e,r){var o;!function(){function a(t){return t instanceof HTMLElement||t instanceof SVGElement; }function n(t){if(!a(t))throw new Error("an HTMLElement or SVGElement is required; got "+t)}function i(t){return t&&0==t.lastIndexOf("http",0)&&t.lastIndexOf(window.location.host)==-1}function s(t,e){n(t);var r=t.querySelectorAll("image"),o=r.length,a=function(){0===o&&e()};a();for(var s=0;s0)return e[a]}return console.error("Unknown font format for "+t+"; Fonts may not be working correctly"),"application/octet-stream"}function a(t){function e(e){function r(){var t=s.response,r=n(t);i(e,r)}function o(t){console.warn("Failed to load font from: "+e.url),console.warn(t),l+=e.text+"\n",a()}function i(e,r){var o='url("data:'+e.format+";base64,"+r+'")';l+=e.text.replace(e.fontUrlRegexp,o)+"\n",setTimeout(function(){a(t)},0)}var s=new XMLHttpRequest;s.addEventListener("load",r),s.addEventListener("error",o),s.addEventListener("abort",o),s.open("GET",e.url),s.responseType="arraybuffer",s.send()}if(t.length>0){var o=t.pop();e(o)}else r(l)}function n(t){for(var e="",r=new Uint8Array(t),o=r.byteLength,a=0;a";var o=document.createElement("defs");if(o.appendChild(e),d.insertBefore(o,d.firstChild),r){var a=s.innerHTML;a=a.replace(/NS\d+:href/gi,'xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href'),r(a,n,i)}}var n,i,s=document.createElement("div"),d=t.cloneNode(!0);if("svg"==t.tagName)n=e.width||c(t,d,"width"),i=e.height||c(t,d,"height");else{if(!t.getBBox)return void console.error("Attempted to render non-SVG element",t);var _=t.getBBox();n=_.x+_.width,i=_.y+_.height,d.setAttribute("transform",d.getAttribute("transform").replace(/translate\(.*?\)/,""));var u=document.createElementNS("http://www.w3.org/2000/svg","svg");u.appendChild(d),d=u}d.setAttribute("version","1.1"),d.getAttribute("xmlns")||d.setAttributeNS(o,"xmlns","http://www.w3.org/2000/svg"),d.getAttribute("xmlns:xlink")||d.setAttributeNS(o,"xmlns:xlink","http://www.w3.org/1999/xlink"),e.responsive?(d.removeAttribute("width"),d.removeAttribute("height"),d.setAttribute("preserveAspectRatio","xMinYMin meet")):(d.setAttribute("width",n*e.scale),d.setAttribute("height",i*e.scale)),d.setAttribute("viewBox",[e.left||0,e.top||0,n,i].join(" "));for(var p=d.querySelectorAll("foreignObject > *"),v=0;v1&&(e[t]=n)});var a={};return a.possible_filters=e,a.filter_data=r,a}},function(t,e){"use strict";t.exports=function(t,e){var r=t[e].sort(function(t,e){return e-t})[0];return r=String(r)}},function(t,e){"use strict";t.exports=function(){var t={row_label_scale:1,col_label_scale:1,super_labels:!1,"super":{},show_label_tooltips:!0,show_tile_tooltips:!0,transpose:!1,tile_colors:["#FF0000","#1C86EE"],bar_colors:["#FF0000","#1C86EE"],cat_value_colors:["#2F4F4F","#9370DB"],outline_colors:["orange","black"],highlight_color:"#FFFF00",tile_title:!1,input_domain:0,opacity_scale:"linear",do_zoom:!0,is_zoom:0,is_slider_drag:!1,is_cropping:!1,background_color:"#FFFFFF",super_border_color:"#F5F5F5",outer_margins:{top:0,bottom:0,left:0,right:0},ini_expand:!1,grey_border_width:2,tile_click_hlight:!1,super_label_scale:1,make_tile_tooltip:function(t){return t.info},ini_view:null,requested_view:null,use_sidebar:!0,title:null,about:null,sidebar_width:160,sidebar_icons:!0,row_search_placeholder:"Row",buffer_width:10,show_sim_mat:!1,cat_colors:null,resize:!0,clamp_opacity:.85,expand_button:!0,max_allow_fs:20,dendro_filter:{row:!1,col:!1},cat_filter:{row:!1,col:!1},crop_filter_nodes:{row:!1,col:!1},row_tip_callback:null,col_tip_callback:null,tile_tip_callback:null,matrix_update_callback:null,cat_update_callback:null,dendro_callback:null,dendro_click_callback:null,new_row_cats:null,make_modals:!0,show_viz_border:!1};return t}},function(t,e){"use strict";t.exports=function(t){var e=!1,r=t.network_data.row_nodes_names.length,o=t.network_data.col_nodes_names.length;if(r==o){var a=t.network_data.row_nodes_names,n=t.network_data.col_nodes_names;e=!0,_.each(a,function(t){var r=a.indexOf(t);t!==n[r]&&(e=!1)})}return e&&(t.expand_button=!1),e}},function(t,e){"use strict";t.exports=function(t){var e=": ",r=!0;return _.each(t,function(t){var o=String(t.name);o.indexOf(e)<0&&(r=!1)}),r}},function(t,e,r){"use strict";var o=r(10),a=r(13),n=r(14),i=r(4),s=r(15),l=r(36);t.exports=function(t){var e=$.extend(!0,{},t),r=e;if(r.inst_nodes={},r.inst_nodes.row_nodes=r.network_data.row_nodes,r.inst_nodes.col_nodes=r.network_data.col_nodes,null!==r.ini_view){var c=r.ini_view,d=i(r.network_data.views);r.viz={},r.viz.possible_filters=d.possible_filters,r.viz.filter_data=d.filter_data,c=n(r,c),r.network_data=o(e,r,c),r.requested_view=c}return r=s(r),r.use_sidebar&&(r.sidebar=a(r)),r.zoom_info=l(),r}},function(t,e,r){"use strict";var o=r(11),a=r(12);t.exports=function(t,e,r){var n=t.network_data.views,i=!1;_.has(n[0],"enr_score_type")&&(i=!0);var s=a(e,n,r);i&&0==s.length&&(r={N_row_sum:"all",N_col_sum:"10"},s=a(e,n,r));var l,c=s[0];if("undefined"!=typeof c){var d=c.nodes;l=o(t,d)}else l=t.network_data;return l}},function(t,e,r){"use strict";var o=r(2);t.exports=function(t,e){var r=t.network_data.links,a=o.pluck(e.row_nodes,"name"),n=o.pluck(e.col_nodes,"name"),i=_.filter(r,function(t){var e=t.name.split("_")[0],r=t.name.split("_")[1],o=_.indexOf(a,e),i=_.indexOf(n,r);if(o>-1&i>-1)return t.source=o,t.target=i,t}),s={};return s.row_nodes=e.row_nodes,s.row_nodes_names=a,s.col_nodes=e.col_nodes,s.col_nodes_names=n,s.links=i,s.all_links=r,s.views=t.network_data.views,_.has(t.network_data,"cat_colors")&&(s.cat_colors=t.network_data.cat_colors),s}},function(t,e,r){"use strict";var o=r(2),a=r(5);t.exports=function(t,e,r){var n,i,s=_.keys(r);_.each(s,function(t){n=r[t],/[^a-z_]/i.test(n)&&(n=parseInt(n,10)),i=!1,_.each(e,function(e){o.has(e,t)&&(i=!0)}),i&&(e=_.filter(e,function(e){return e[t]==n}))});var l,c,d=[],u=!1;return _.each(e,function(e){l=!0,_.each(_.keys(t.viz.possible_filters),function(r){c=a(t.viz.filter_data,r),e[r]!=c&&(l=!1)}),l?u===!1&&(u=!0,d.push(e)):d.push(e)}),d}},function(t,e){"use strict";t.exports=function(t){var e={};return e.wrapper={},e.row_search={},e.row_search.box={},e.row_search.box.height=34,e.row_search.box.width=95,e.row_search.placeholder=t.row_search_placeholder,e.row_search.margin_left=7,e.slider={},e.slider.width=t.sidebar_width-30,e.slider.margin_left=15,e.key_cat={},e.key_cat.width=t.sidebar_width-15,e.key_cat.margin_left=5,e.key_cat.max_height=100,e.title=t.title,e.title_margin_left=7,e.about=t.about,e.width=t.sidebar_width,e.buttons={},e.buttons.width=t.sidebar_width-15,e.text={},e.icons=t.sidebar_icons,e.icon_margin_left=-5,e}},function(t,e){"use strict";t.exports=function(t,e){var r=_.keys(e)[0];return _.each(_.keys(t.viz.possible_filters),function(o){if(o!=r&&!d3.select(t.root+" .slider_"+o).empty()){var a=d3.select(t.root+" .slider_"+o).attr("current_state");e[o]=a}}),e}},function(t,e,r){"use strict";var o=r(16),a=r(17),n=r(19),i=r(20),s=r(21),l=r(22),c=r(23),d=r(24),u=r(29),p=r(31),v=r(2),f=r(4),m=r(32);t.exports=function(t){function e(t){var e=arguments.length<=1||void 0===arguments[1]||arguments[1],r={};r.root=t.root,r.root_tips=t.root.replace("#",".")+"_d3-tip",r.viz_wrapper=t.root+" .viz_wrapper",r.do_zoom=t.do_zoom,r.background_color=t.background_color,r.super_border_color=t.super_border_color,r.outer_margins=t.outer_margins,r.is_expand=t.ini_expand,r.grey_border_width=t.grey_border_width,r.show_dendrogram=t.show_dendrogram,r.tile_click_hlight=t.tile_click_hlight,r.inst_order=t.inst_order,r.expand_button=t.expand_button,r.sim_mat=t.sim_mat,r.dendro_filter=t.dendro_filter,r.cat_filter=t.cat_filter,r.cat_value_colors=t.cat_value_colors,r.viz_svg=r.viz_wrapper+" .viz_svg",r.zoom_element=r.viz_wrapper+" .viz_svg",r.uni_duration=1e3,r.bottom_space=10,r.run_trans=!1,r.duration=1e3,r.resize=t.resize,v.has(t,"size")?r.fixed_size=t.size:r.fixed_size=!1,r.border_fraction=65,r.uni_margin=5,r.super_labels={},r.super_labels.margin={},r.super_labels.dim={},r.super_labels.margin.left=r.grey_border_width,r.super_labels.margin.top=r.grey_border_width,r.super_labels.dim.width=0,t.labels.super_labels&&(r.super_labels.dim.width=15*t.labels.super_label_scale),r.triangle_opacity=.6,r.norm_labels={},r.norm_labels.width={},r.dendro_room={},r.show_dendrogram?r.dendro_room.symbol_width=10:r.dendro_room.symbol_width=0,r.cat_colors=t.cat_colors,r=m(t,r,e),0==_.has(t,"group_level")&&(r.show_dendrogram&&(t.group_level={}),t.group_level.row=5,t.group_level.col=5),r.dendro_opacity=.35,r.spillover_col_slant=r.norm_labels.width.col;var o=f(t.network_data.views);return r.possible_filters=o.possible_filters,r.filter_data=o.filter_data,r.viz_nodes={},r.viz_nodes.row=t.network_data.row_nodes_names,r.viz_nodes.col=t.network_data.col_nodes_names,r.viz_nodes.curr_row=t.network_data.row_nodes_names,r.viz_nodes.curr_col=t.network_data.col_nodes_names,r.x_offset=0,r}var r=arguments.length<=1||void 0===arguments[1]||arguments[1];return t.labels=o(t),t.viz=e(t,r),a(t),t=n(t),t.viz=i(t.viz),t.viz=s(t.viz),t.viz=l(t.viz),t.sim_mat&&(t.viz.clust.dim.width<=t.viz.clust.dim.height?t.viz.clust.dim.height=t.viz.clust.dim.width:t.viz.clust.dim.width=t.viz.clust.dim.height),t=c(t),t=d(t),t=u(t),t=p(t)}},function(t,e){"use strict";t.exports=function(t){var e={};return e.super_label_scale=t.super_label_scale,e.super_labels=t.super_labels,e.super_label_fs=13.8,e.super_labels&&(e["super"]={},e["super"].row=t["super"].row,e["super"].col=t["super"].col),e.show_label_tooltips=t.show_label_tooltips,e.row_max_char=_.max(t.network_data.row_nodes,function(t){return t.name.length}).name.length,e.col_max_char=_.max(t.network_data.col_nodes,function(t){return t.name.length}).name.length,e.max_allow_fs=t.max_allow_fs,e}},function(t,e,r){"use strict";var o=r(18);t.exports=function(t){d3.select(t.root+" .viz_wrapper").empty()&&(d3.select(t.root).append("div").classed("sidebar_wrapper",!0),d3.select(t.root).append("div").classed("viz_wrapper",!0));var e=o(t);d3.select(t.root+" .sidebar_wrapper").style("float","left").style("width",t.sidebar_width+"px").style("height",e.height+"px").style("overflow","hidden"),d3.select(t.viz.viz_wrapper).style("float","left").style("width",e.width+"px").style("height",e.height+"px")}},function(t,e){"use strict";t.exports=function(t){var e,r={},o=t.buffer_width,a=d3.select(t.root).style("width").replace("px",""),n=d3.select(t.root).style("height").replace("px","");return t.viz.is_expand===!1?(e=t.viz.outer_margins,r.width=a-t.sidebar_width-o):(e=t.viz.outer_margins,r.width=a-o),r.top=e.top,r.left=e.left,t.viz.resize?r.height=n:(t.viz.is_expand?r.width=t.viz.fixed_size.width:r.width=t.viz.fixed_size.width-t.sidebar_width,r.height=t.viz.fixed_size.height),r}},function(t,e){"use strict";t.exports=function(t){return t.viz.svg_dim={},t.viz.svg_dim.width=Number(d3.select(t.viz.viz_wrapper).style("width").replace("px","")),t.viz.svg_dim.height=Number(d3.select(t.viz.viz_wrapper).style("height").replace("px","")),t}},function(t,e){"use strict";t.exports=function(t){return t.norm_labels.margin={},t.norm_labels.margin.left=t.super_labels.margin.left+t.super_labels.dim.width,t.norm_labels.margin.top=t.super_labels.margin.top+t.super_labels.dim.width,t.label_background={},t.label_background.row=t.norm_labels.width.row+t.cat_room.row+t.uni_margin,t.label_background.col=t.norm_labels.width.col+t.cat_room.col+t.uni_margin,t}},function(t,e){"use strict";t.exports=function(t){t.clust={},t.clust.margin={},t.clust.margin.left=t.norm_labels.margin.left+t.norm_labels.width.row+t.cat_room.row+t.uni_margin,t.clust.margin.top=t.norm_labels.margin.top+t.norm_labels.width.col+t.cat_room.col+t.uni_margin;var e=t.svg_dim.width-t.clust.margin.left-t.spillover_col_slant,r=d3.scale.ordinal().rangeBands([0,e]).domain(_.range(t.num_col_nodes)),o=r.rangeBand()/2;if(o>t.norm_labels.width.col){var a=t.norm_labels.width.col/o;e*=a}return t.clust.dim={},t.clust.dim.width=e,t}},function(t,e){"use strict";t.exports=function(t){var e=t.svg_dim.height-t.clust.margin.top-t.dendro_room.col-t.bottom_space;return t.clust.dim.height=e,t}},function(t,e){"use strict";t.exports=function(t){var e=Math.abs(_.max(t.network_data.col_nodes,function(t){return Math.abs(t.value)}).value);return t.labels.bar_scale_col=d3.scale.linear().domain([0,e]).range([0,.75*t.viz.norm_labels.width.col]),e=Math.abs(_.max(t.network_data.row_nodes,function(t){return Math.abs(t.value)}).value),t.labels.bar_scale_row=d3.scale.linear().domain([0,e]).range([0,t.viz.norm_labels.width.row]),t}},function(t,e,r){"use strict";var o=r(25),a=r(27);t.exports=function(t){t.matrix=o(t),t.viz.x_scale=d3.scale.ordinal().rangeBands([0,t.viz.clust.dim.width]),t.viz.y_scale=d3.scale.ordinal().rangeBands([0,t.viz.clust.dim.height]);var e;return _.each(["row","col"],function(r){e=t.viz.inst_order[r],"custom"===e&&(e="clust"),"row"===r?t.viz.x_scale.domain(t.matrix.orders[e+"_"+r]):t.viz.y_scale.domain(t.matrix.orders[e+"_"+r])}),t.viz.border_width={},t.viz.border_width.x=t.viz.x_scale.rangeBand()/t.viz.border_fraction,t.viz.border_width.y=t.viz.y_scale.rangeBand()/t.viz.border_fraction,t.viz.rect_width=t.viz.x_scale.rangeBand()-t.viz.border_width.x,t.viz.rect_height=t.viz.y_scale.rangeBand()-t.viz.border_width.y,a(t),t}},function(t,e,r){"use strict";var o=r(2),a=r(26);t.exports=function(t){var e={},r=t.network_data;e.tile_colors=t.tile_colors,e.bar_colors=t.bar_colors,e.outline_colors=t.outline_colors,e.hlight_color=t.highlight_color,e.tile_title=t.tile_title,e.show_tile_tooltips=t.show_tile_tooltips,e.make_tile_tooltip=t.make_tile_tooltip,e.click_hlight_x=-666,e.click_hlight_y=-666,e.click_hlight_row=-666,e.click_hlight_col=-666,e.def_large_matrix=1e4,e.opacity_function=t.opacity_scale,e.orders={},_.each(["row","col"],function(a){var n;n="row"===a?"col":"row";var i=r[n+"_nodes"],s=i.length,l=o.pluck(i,"name"),c=l.sort(),d=_.map(c,function(t){return r[n+"_nodes_names"].indexOf(t)});e.orders["alpha_"+a]=d;var u=["clust","rank"];_.has(i[0],"rankvar")&&u.push("rankvar"),t.viz.all_cats[n].length>0&&_.each(t.viz.all_cats[n],function(t){t=t.replace("-","_"),u.push(t+"_index")}),_.each(u,function(t){var r=d3.range(s).sort(function(e,r){return i[r][t]-i[e][t]});e.orders[t+"_"+a]=r})}),o.has(r,"all_links")?e.max_link=_.max(r.all_links,function(t){return Math.abs(t.value)}).value:e.max_link=_.max(r.links,function(t){return Math.abs(t.value)}).value,e.abs_max_val=Math.abs(e.max_link)*t.clamp_opacity,0===t.input_domain?"linear"===e.opacity_function?e.opacity_scale=d3.scale.linear().domain([0,e.abs_max_val]).clamp(!0).range([0,1]):"log"===e.opacity_function&&(e.opacity_scale=d3.scale.log().domain([.001,e.abs_max_val]).clamp(!0).range([0,1])):"linear"===e.opacity_function?e.opacity_scale=d3.scale.linear().domain([0,t.input_domain]).clamp(!0).range([0,1]):"log"===e.opacity_function&&(e.opacity_scale=d3.scale.log().domain([.001,t.input_domain]).clamp(!0).range([0,1]));var n=o.has(r.links[0],"value_up"),i=o.has(r.links[0],"value_dn");return n||i?e.tile_type="updn":e.tile_type="simple",o.has(r.links[0],"highlight")?e.highlight=1:e.highlight=0,e.matrix=a(r),e.wait_tooltip=0,e}},function(t,e,r){"use strict";var o=r(2);t.exports=function(t){var e,r,a=[];return r=!!o.has(t.links[0],"value_orig"),t.row_nodes.forEach(function(n,i){a[i]={},a[i].name=t.row_nodes[i].name,a[i].row_index=i,a[i].row_data=d3.range(t.col_nodes.length).map(function(a){return e=o.has(t.links[0],"value_up")||o.has(t.links[0],"value_dn")?{pos_x:a,pos_y:i,value:0,value_up:0,value_dn:0,highlight:0}:{pos_x:a,pos_y:i,value:0,highlight:0},r&&(e.value_orig=0),e})}),t.links.forEach(function(t){a[t.source].row_data[t.target].value=t.value,a[t.source].row_data[t.target].row_name=t.row_name,a[t.source].row_data[t.target].col_name=t.col_name,(o.has(t,"value_up")||o.has(t,"value_dn"))&&(a[t.source].row_data[t.target].value_up=t.value_up,a[t.source].row_data[t.target].value_dn=t.value_dn),r&&(a[t.source].row_data[t.target].value_orig=t.value_orig),t.highlight&&(a[t.source].row_data[t.target].highlight=t.highlight),t.info&&(a[t.source].row_data[t.target].info=t.info)}),a}},function(t,e,r){"use strict";var o=r(28);t.exports=function(t){var e=3,r=2,a=e/t.viz.rect_height,n=2;t.viz.ds_zt=n;var i=Math.floor(Math.log(a)/Math.log(n));if(t.viz.rect_height0){var s=2;t.viz.ds_opacity_scale=d3.scale.linear().domain([1,100]).range([1,s]).clamp(!0);var l;t.viz.ds_num_levels=i,t.viz.ds=[],t.matrix.ds_matrix=[];for(var c=t.viz.inst_order.row,d=$.extend(!0,{},t.matrix.matrix),_=0;_t.labels.max_allow_fs&&(t.labels.default_fs_row=t.labels.max_allow_fs),t.labels.default_fs_col>t.labels.max_allow_fs&&(t.labels.default_fs_col=t.labels.max_allow_fs),t}},function(t,e,r){"use strict";var o=r(33),a=r(2),n=r(34),i=r(35);t.exports=function(t,e){var r,s,l,c=arguments.length<=2||void 0===arguments[2]||arguments[2],d=": ";e.show_categories={},e.all_cats={},e.cat_names={},e.cat_info={};var u={};u.row=null,u.col=null,e.cat_colors={},e.cat_colors.value_opacity=u;var p=0;return _.each(["row","col"],function(o){e.show_categories[o]=!1,e.all_cats[o]=[];var u=_.keys(t.network_data[o+"_nodes"][0]);u=u.sort(),_.each(u,function(t){t.indexOf("cat-")>=0&&(e.show_categories[o]=!0,e.all_cats[o].push(t))}),e.cat_info[o]=null,e.show_categories[o]&&(e.cat_colors[o]={},e.cat_info[o]={},e.cat_names[o]={},_.each(e.all_cats[o],function(c){var u=t.network_data[o+"_nodes"][0];"string"==typeof u[c]&&u[c].indexOf(d)>0?(r=u[c].split(d)[0],e.cat_names[o][c]=r):e.cat_names[o][c]=c;var v=a.pluck(t.network_data[o+"_nodes"],c),f=_.uniq(v).sort();if(s=i(f),"cat_strings"===s.type){var m=_.countBy(v);s.cat_hist=m}else s.cat_hist=null;e.cat_info[o][c]=s,e.cat_colors[o][c]={},_.each(f,function(t,r){l=n.get_random_color(r+p),e.cat_colors[o][c][t]=l,"string"==typeof t&&(t.indexOf("Not ")>=0||t.indexOf(": false")>0)&&(e.cat_colors[o][c][t]="#eee"),p+=1})})),_.has(t.network_data,"cat_colors")&&c===!0&&(e.cat_colors[o]=t.network_data.cat_colors[o]),t.sim_mat&&(e.cat_colors.col=e.cat_colors.row)}),e.cat_colors=e.cat_colors,e.cat_colors.opacity=.6,e.cat_colors.active_opacity=.9,e=o(t,e)}},function(t,e){"use strict";t.exports=function(t,e){var r,o=d3.scale.linear().domain([5,15]).range([85,120]).clamp("true");return e.cat_room={},e.cat_room.symbol_width=12,e.cat_room.separation=3,_.each(["row","col"],function(a){e.norm_labels.width[a]=o(t.labels[a+"_max_char"])*t[a+"_label_scale"],e["num_"+a+"_nodes"]=t.network_data[a+"_nodes"].length,"row"===a?e.dendro_room[a]=e.dendro_room.symbol_width:e.dendro_room[a]=e.dendro_room.symbol_width+3*e.uni_margin;var n=e.all_cats[a].length;if(e.show_categories[a]){r=(n-1)*e.cat_room.separation;var i;i="row"===a?n+1:n,e.cat_room[a]=i*e.cat_room.symbol_width+r}else"row"==a?e.cat_room[a]=e.cat_room.symbol_width:e.cat_room[a]=0}),e}},function(t,e){"use strict";function r(){return"#EEE"}function o(t){return n[t%a()]}function a(){return n.length}var n;n=["#393b79","#aec7e8","#ff7f0e","#ffbb78","#98df8a","#bcbd22","#404040","#ff9896","#c5b0d5","#8c564b","#1f77b4","#5254a3","#FFDB58","#c49c94","#e377c2","#7f7f7f","#2ca02c","#9467bd","#dbdb8d","#17becf","#637939","#6b6ecf","#9c9ede","#d62728","#8ca252","#8c6d31","#bd9e39","#e7cb94","#843c39","#ad494a","#d6616b","#7b4173","#a55194","#ce6dbd","#de9ed6"],t.exports={get_default_color:r,get_random_color:o,get_num_colors:a}},function(t,e){"use strict";t.exports=function(t){var e=t[0],r=!1,o=!1,a="cat_strings",n=NaN,i=[],s=null,l=": ";if("string"==typeof e&&e.indexOf(l)>-1&&(r=!0,e=e.split(l)[1]),0==isNaN(e)&&(o=!0),o&&(a="cat_values",_.each(t,function(t){r&&(t=t.split(l)[1]),1==isNaN(t)?a="cat_strings":(t=parseFloat(t),i.push(t))})),"cat_values"===a){var c=_.max(i,function(t){return Math.abs(t)});n=Math.abs(c),s=d3.scale.linear().domain([0,n]).range([0,1])}var d={};return d.type=a,d.max_abs_val=n,d.cat_scale=s,d}},function(t,e){"use strict";t.exports=function(){var t={};return t.zoom_x=1,t.zoom_y=1,t.trans_x=0,t.trans_y=0,t}},function(t,e,r){"use strict";var o=r(38),a=r(49),n=r(67),i=r(75),s=r(76),l=r(87),c=r(97),d=r(116),u=r(122),p=r(82),v=r(123),f=r(124),m=r(125),h=r(128);t.exports=function(t){function e(){var t=r.viz.super_border_color;return(r.viz.is_expand||0==r.show_viz_border)&&(t="white"),t}var r=t.params;d3.select(r.viz.viz_wrapper+" svg").remove();var g=d3.select(r.viz.viz_wrapper).append("svg").attr("class","viz_svg").attr("id","svg_"+r.root.replace("#","")).attr("width",r.viz.svg_dim.width).attr("height",r.viz.svg_dim.height).attr("is_zoom",0).attr("stopped_zoom",1);g.append("rect").attr("class","super_background").style("width",r.viz.svg_dim.width).style("height",r.viz.svg_dim.height).style("fill","white"),o(r,g),a(t),r.viz.show_dendrogram&&(v(t),f(t)),h(t),n(t),r.viz.ds_level===-1&&_.each(["row","col"],function(t){var e=Number(d3.select("."+t+"_label_group").select("text").style("font-size").replace("px","")),o=8;e>o&&d3.selectAll(r.root+" ."+t+"_label_group").each(function(){p(r,this,t)})}),u(t),r.viz.show_categories.col&&d(t),s(t),r.labels.super_labels&&i(r),m(t),d3.select(r.viz.viz_svg).append("rect").classed("left_border",!0).classed("borders",!0).attr("fill",e).attr("width",r.viz.grey_border_width).attr("height",r.viz.svg_dim.height).attr("transform","translate(0,0)"),d3.select(r.viz.viz_svg).append("rect").classed("right_border",!0).classed("borders",!0).attr("fill",e).attr("width",r.viz.grey_border_width).attr("height",r.viz.svg_dim.height).attr("transform",function(){var t=r.viz.svg_dim.width-r.viz.grey_border_width;return"translate("+t+",0)"}),d3.select(r.viz.viz_svg).append("rect").classed("top_border",!0).classed("borders",!0).attr("fill",e).attr("width",r.viz.svg_dim.width).attr("height",r.viz.grey_border_width).attr("transform",function(){var t=0;return"translate("+t+",0)"}),d3.select(r.viz.viz_svg).append("rect").classed("bottom_border",!0).classed("borders",!0).attr("fill",e).attr("width",r.viz.svg_dim.width).attr("height",r.viz.grey_border_width).attr("transform",function(){var t=r.viz.svg_dim.height-r.viz.grey_border_width;return"translate(0,"+t+")"}),l(t),c(t),r.viz.do_zoom&&d3.select(r.viz.zoom_element).call(r.zoom_behavior),d3.select(r.viz.zoom_element).on("dblclick.zoom",null)}},function(t,e,r){"use strict";var o=r(2),a=r(39),n=r(40),i=r(41);t.exports=function(t,e){var r,s=t.network_data,l=[];r=e.append("g").attr("class","clust_container").attr("transform","translate("+t.viz.clust.margin.left+","+t.viz.clust.margin.top+")").append("g").attr("class","clust_group").classed("clust_group",!0),r.append("rect").classed("background",!0).classed("grey_background",!0).style("fill","#eee").style("opacity",.25).attr("width",t.viz.clust.dim.width).attr("height",t.viz.clust.dim.height),null===t.viz.ds?i(t,t.matrix.matrix,"all",t.viz.ds_level):i(t,t.matrix.ds_matrix[0],"all",t.viz.ds_level),"function"==typeof t.click_tile?d3.selectAll(t.root+" .tile").on("click",function(e){var r={};r.row=t.network_data.row_nodes[e.pos_y].name,r.col=t.network_data.col_nodes[e.pos_x].name,r.value=e.value,o.has(e,"value_up")&&(r.value_up=e.value_up),o.has(e,"value_dn")&&(r.value_dn=e.value_dn),o.has(e,"info")&&(r.info=e.info),t.click_tile(r),n(t,this)}):t.tile_click_hlight&&d3.selectAll(t.root+" .tile").on("click",function(){n(t,this)});var c={},d=0;return c.enter=0,a(t,c,d),{get_clust_group:function(){return r},get_matrix:function(){return l},get_nodes:function(t){return"row"===t?s.row_nodes:s.col_nodes}}}},function(t,e){"use strict";t.exports=function(t,e,r){}},function(t,e){"use strict";t.exports=function(t,e){d3.select(e).each(function(r){var o=r.pos_x,a=r.pos_y;if(d3.selectAll(t.root+" .click_hlight").remove(),o!=t.matrix.click_hlight_x||a!=t.matrix.click_hlight_y){t.matrix.click_hlight_x=o,t.matrix.click_hlight_y=a;var n=6,i=.85,s=n*t.viz.border_width.x,l=n*t.viz.border_width.y;d3.select(e.parentNode).append("rect").classed("click_hlight",!0).classed("top_hlight",!0).attr("width",t.viz.x_scale.rangeBand()).attr("height",l).attr("fill",t.matrix.hlight_color).attr("transform",function(){return"translate("+t.viz.x_scale(o)+",0)"}).attr("opacity",i),d3.select(e.parentNode).append("rect").classed("click_hlight",!0).classed("left_hlight",!0).attr("width",s).attr("height",t.viz.y_scale.rangeBand()-.99*l).attr("fill",t.matrix.hlight_color).attr("transform",function(){return"translate("+t.viz.x_scale(o)+","+.99*l+")"}).attr("opacity",i),d3.select(e.parentNode).append("rect").classed("click_hlight",!0).classed("right_hlight",!0).attr("width",s).attr("height",t.viz.y_scale.rangeBand()-.99*l).attr("fill",t.matrix.hlight_color).attr("transform",function(){var e=t.viz.x_scale(o)+t.viz.x_scale.rangeBand()-s;return"translate("+e+","+.99*l+")"}).attr("opacity",i),d3.select(e.parentNode).append("rect").classed("click_hlight",!0).classed("bottom_hlight",!0).attr("width",function(){return t.viz.x_scale.rangeBand()-1.98*s}).attr("height",l).attr("fill",t.matrix.hlight_color).attr("transform",function(){var e=t.viz.x_scale(o)+.99*s,r=t.viz.y_scale.rangeBand()-l;return"translate("+e+","+r+")"}).attr("opacity",i)}else t.matrix.click_hlight_x=-666,t.matrix.click_hlight_y=-666})}},function(t,e,r){"use strict";var o=r(42),a=r(48);t.exports=function(t,e){var r=arguments.length<=2||void 0===arguments[2]?"all":arguments[2],n=arguments.length<=3||void 0===arguments[3]?-1:arguments[3],i=t.viz.y_scale,s=!0,l="row";if(n>=0&&(i=t.viz.ds[n].y_scale,s=!1,l="ds"+String(n)+"_row"),s)var c=a().attr("class",function(){var e=t.viz.root_tips.replace(".",""),r=e+" d3-tip "+e+"_tile_tip";return r}).style("display","none").direction("nw").offset([0,0]).html(function(e){var r,o=String(e.value.toFixed(3));if(t.keep_orig){var a=String(e.value_orig.toFixed(3));r="

"+e.row_name+" and "+e.col_name+"

normalized value: "+o+"

original value: "+a+"
"}else r="

"+e.row_name+" and "+e.col_name+"

value: "+o+"
";return r});else c=null;var d=[];"all"===r?d=e:_.each(e,function(t){_.contains(r,t.name)&&d.push(t)}),d3.select(t.root+" .clust_group").selectAll(".row").data(d,function(t){return t.name}).enter().append("g").classed(l,!0).attr("transform",function(t){return"translate(0,"+i(t.row_index)+")"}).each(function(e){o(t,e,c,this,n)}),t.viz.ds_level===-1&&null!=c&&d3.selectAll(t.root+" .row").call(c)}},function(t,e,r){"use strict";var o=r(43),a=r(44),n=r(45),i=r(46),s=r(47);t.exports=function(t,e,r,l){var c=arguments.length<=4||void 0===arguments[4]?-1:arguments[4],d=e.row_data,u=!0,p=t.viz.rect_height;c>=0&&(p=t.viz.ds[c].rect_height);var v;v=!!_.has(t.network_data.links[0],"value_orig");var f;f=v===!1?_.filter(d,function(t){return 0!==t.value}):d;var m=d3.select(l).selectAll("rect").data(f,function(t){return t.col_name}).enter().append("rect").attr("class","tile row_tile").attr("width",t.viz.rect_width).attr("height",p).style("fill",function(e){var r;return r="NaN"===e.value_orig?"#000000":e.value>0?t.matrix.tile_colors[0]:t.matrix.tile_colors[1]}).style("fill-opacity",function(e){ -var r;return r="NaN"===e.value_orig?.175:t.matrix.opacity_scale(Math.abs(e.value))}).attr("transform",function(e){return s(t,e)});if(u&&m.on("mouseover",function(){for(var e=arguments.length,o=Array(e),a=0;a0&&(r=t.matrix.opacity_scale(Math.abs(e.value_up))),r}).on("mouseover",function(){for(var e=arguments.length,o=Array(e),a=0;a0&&(r=t.matrix.opacity_scale(Math.abs(e.value_dn))),r}).on("mouseover",function(){for(var e=arguments.length,o=Array(e),a=0;a0&&Math.abs(t.value_dn)>0&&d3.select(this).remove()})}t.matrix.tile_title&&m.append("title").text(function(t){var e="value: "+t.value;return e})}},function(t,e){"use strict";t.exports=function(t){var e=0,r=t.viz.x_scale.rangeBand()-t.viz.border_width.x,o=0,a=t.viz.y_scale.rangeBand()-t.viz.border_width.y,n="M"+e+","+o+", L"+e+", "+a+", L"+r+",0 Z";return n}},function(t,e){"use strict";t.exports=function(t){var e=0,r=t.viz.x_scale.rangeBand()-t.viz.border_width.x,o=t.viz.y_scale.rangeBand()-t.viz.border_width.y,a=t.viz.y_scale.rangeBand()-t.viz.border_width.y,n="M"+e+", "+o+" , L"+r+", "+a+", L"+r+",0 Z";return n}},function(t,e){"use strict";t.exports=function(t,e,r,o){function a(){if(d3.select(e).classed("hovering")){var o=Number(d3.select(t.root+" .viz_svg").attr("is_zoom"));if(0===o&&t.matrix.show_tile_tooltips&&null!==r&&(d3.selectAll(t.viz.root_tips+"_tile_tip").style("display","block"),r.show.apply(e,s),null!=t.tile_tip_callback)){var a=s[0];t.tile_tip_callback(a)}}}var n,i=o[0],s=[].slice.call(o),l=1e3;d3.select(e).classed("hovering",!0),_.each(["row","col"],function(e){d3.selectAll(t.root+" ."+e+"_label_group text").style("font-weight",function(t){var r,o=i[e+"_name"].replace(/_/g," ")===t.name;return r=o?"bold":"normal"})}),s.push(e),clearTimeout(n),n=setTimeout(a,l,e)}},function(t,e){"use strict";t.exports=function(t,e,r){d3.select(e).classed("hovering",!1),d3.selectAll(t.viz.root_tips+"_tile_tip").style("display","none"),_.each(["row","col"],function(e){d3.selectAll(t.root+" ."+e+"_label_group text").style("font-weight","normal")}),null!=r&&r.hide()}},function(t,e){"use strict";t.exports=function(t,e){var r;r=e.pos_x in t.viz.x_scale.domain()?t.viz.x_scale(e.pos_x):0;var o=r+.5*t.viz.border_width.x,a=.5*t.viz.border_width.y;return"translate("+o+","+a+")"}},function(t,e){"use strict";t.exports=function(){function t(t){b=v(t),z=b.createSVGPoint(),document.body.appendChild(x)}function e(){return"n"}function r(){return[0,0]}function o(){return" "}function a(){var t=f();return{top:t.s.y,left:t.s.x}}function n(){var t=f();return{top:t.n.y-x.offsetHeight,left:t.n.x-x.offsetWidth/2}}function i(){var t=f();return{top:t.s.y,left:t.s.x-x.offsetWidth/2}}function s(){var t=f();return{top:t.e.y-x.offsetHeight/2,left:t.e.x}}function l(){var t=f();return{top:t.w.y-x.offsetHeight/2,left:t.w.x-x.offsetWidth}}function c(){var t=f();return{top:t.nw.y-x.offsetHeight,left:t.nw.x-x.offsetWidth}}function d(){var t=f();return{top:t.ne.y-x.offsetHeight,left:t.ne.x}}function _(){var t=f();return{top:t.sw.y,left:t.sw.x-x.offsetWidth}}function u(){var t=f();return{top:t.se.y,left:t.e.x}}function p(){var t=d3.select(document.createElement("div"));return t.style({position:"absolute",opacity:0,pointerEvents:"none",boxSizing:"border-box"}),t.node()}function v(t){return t=t.node(),"svg"==t.tagName.toLowerCase()?t:t.ownerSVGElement}function f(){var t=k||d3.event.target,e={},r=t.getScreenCTM(),o=t.getBBox(),a=o.width,n=o.height,i=o.x,s=o.y,l=document.documentElement.scrollTop||document.body.scrollTop,c=document.documentElement.scrollLeft||document.body.scrollLeft;return r.a=1,r.d=1,r.e=r.e+c,r.f=r.f+l,z.x=i,z.y=s,e.nw=z.matrixTransform(r),z.x=z.x+a,e.ne=z.matrixTransform(r),z.y=z.y+n,e.se=z.matrixTransform(r),z.x=z.x-a,e.sw=z.matrixTransform(r),z.y=z.y-n/2,e.w=z.matrixTransform(r),z.x=z.x+a,e.e=z.matrixTransform(r),z.x=z.x-a/2,z.y=z.y-n/2,e.n=z.matrixTransform(r),z.y=z.y+n,e.s=z.matrixTransform(r),e}function m(t){var e=d3.select(t).classed("hovering");e&&d3.selectAll(".d3-tip").transition().duration(250).style("opacity",0).style("display","none")}function h(t){var e={};return t&&"[object Function]"===e.toString.call(t)}var g=e,w=r,y=o,x=p(),b=null,z=null,k=null;t.show=function(){var e=Array.prototype.slice.call(arguments);e[e.length-1]instanceof SVGElement&&(k=e.pop());var r,o=y.apply(this,e),a=w.apply(this,e),n=g.apply(this,e),i=d3.select(x),s=0;for(i.html(o).style({opacity:1,"pointer-events":"all"}).style("z-index",99);s--;)i.classed(T[s],!1);if(r=A.get(n).apply(this),i.classed(n,!0).style({top:r.top+a[0]+"px",left:r.left+a[1]+"px"}),h(this)===!1){var l=d3.select(this).attr("class");l.indexOf("tile")>=0&&setTimeout(m,5e3,this)}return t},t.hide=function(){var e=d3.select(x);return e.style({opacity:0,"pointer-events":"none"}),t},t.attr=function(e){if(arguments.length<2&&"string"==typeof e)return d3.select(x).attr(e);var r=Array.prototype.slice.call(arguments);return d3.selection.prototype.attr.apply(d3.select(x),r),t},t.style=function(e){if(arguments.length<2&&"string"==typeof e)return d3.select(x).style(e);var r=Array.prototype.slice.call(arguments);return d3.selection.prototype.style.apply(d3.select(x),r),t},t.direction=function(e){return arguments.length?(g=null==e?e:d3.functor(e),t):g},t.offset=function(e){return arguments.length?(w=null==e?e:d3.functor(e),t):w},t.html=function(e){return arguments.length?(y=null==e?e:d3.functor(e),t):y};var A=d3.map({n:n,s:i,e:s,w:l,nw:c,ne:d,sw:_,se:u,south_custom:a}),T=A.keys();return t}},function(t,e,r){"use strict";var o=r(50);t.exports=function(t,e){var r,a=t.params;r=d3.select(a.viz.viz_svg+" .row_container").empty()?d3.select(a.viz.viz_svg).append("g").classed("row_container",!0).attr("transform","translate("+a.viz.norm_labels.margin.left+","+a.viz.clust.margin.top+")"):d3.select(a.viz.viz_svg).select(".row_container").attr("transform","translate("+a.viz.norm_labels.margin.left+","+a.viz.clust.margin.top+")"),d3.select(a.root+" .row_white_background").empty()&&r.append("rect").classed("row_white_background",!0).classed("white_bars",!0).attr("fill",a.viz.background_color).attr("width",a.viz.label_background.row).attr("height",30*a.viz.clust.dim.height+"px"),d3.select(a.root+" .row_label_container").empty()?r.append("g").classed("row_label_container",!0).attr("transform","translate("+a.viz.norm_labels.width.row+",0)").append("g").classed("row_label_zoom_container",!0):r.select(a.root+" .row_label_container").attr("transform","translate("+a.viz.norm_labels.width.row+",0)"),a.viz.ds_level===-1&&o(t,"all",e)}},function(t,e,r){"use strict";var o=r(2),a=r(51),n=r(52),i=r(66);t.exports=function(t){var e=arguments.length<=1||void 0===arguments[1]?"all":arguments[1],r=arguments.length<=2||void 0===arguments[2]?0:arguments[2],s=t.params,l=[];"all"===e?l=s.network_data.row_nodes:_.each(s.network_data.row_nodes,function(t){_.contains(e,t.name)&&l.push(t)});var c=d3.select(s.root+" .row_label_zoom_container").selectAll("g").data(l,function(t){return t.name}).enter().append("g").classed("row_label_group",!0),d=s.network_data.row_nodes_names;c.attr("transform",function(t){var e=_.indexOf(d,t.name);return"translate(0,"+s.viz.y_scale(e)+")"}),c.on("dblclick",function(e){var r="__data__",o=this[r].name;n(t,this,o),s.tile_click_hlight&&a(this,e.ini)}),i(s),c.insert("rect").style("opacity",0),c.append("text").attr("y",.5*s.viz.rect_height+.35*s.labels.default_fs_row).attr("text-anchor","end").style("font-size",s.labels.default_fs_row+"px").text(function(t){return o.normal_name(t)}).attr("pointer-events","none").style("opacity",0).style("cursor","default").transition().delay(r).duration(r).style("opacity",1),c.each(function(){var t=d3.select(this).select("text")[0][0].getBBox();d3.select(this).select("rect").attr("x",t.x).attr("y",0).attr("width",t.width).attr("height",s.viz.y_scale.rangeBand()).style("fill",function(){var t="yellow";return t}).style("opacity",function(t){var e=0;return 1===t.target&&(e=1),e})}),o.has(s.network_data.row_nodes[0],"value")&&c.append("rect").classed("row_bars",!0).attr("width",function(t){var e=0;return e=s.labels.bar_scale_row(Math.abs(t.value))}).attr("x",function(t){var e=0;return e=-s.labels.bar_scale_row(Math.abs(t.value))}).attr("height",s.viz.y_scale.rangeBand()).attr("fill",function(t){return t.value>0?s.matrix.bar_colors[0]:s.matrix.bar_colors[1]}).attr("opacity",.4)}},function(t,e){"use strict";t.exports=function(t,e,r){if(r!=t.click_hlight_row){var o=6,a=.85,n=o*t.viz.border_width.x;d3.selectAll(t.root+" .click_hlight").remove(),d3.select(e).append("rect").classed("click_hlight",!0).classed("row_top_hlight",!0).attr("width",t.viz.svg_dim.width).attr("height",n).attr("fill",t.matrix.hlight_color).attr("opacity",a),d3.select(e).append("rect").classed("click_hlight",!0).classed("row_bottom_hlight",!0).attr("width",t.viz.svg_dim.width).attr("height",n).attr("fill",t.matrix.hlight_color).attr("opacity",a).attr("transform",function(){var e=t.viz.y_scale.rangeBand()-n;return"translate(0,"+e+")"})}else d3.selectAll(t.root+" .click_hlight").remove(),t.click_hlight_row=-666}},function(t,e,r){"use strict";var o=r(53),a=r(54),n=r(36),i=r(65),s=r(27);t.exports=function(t,e,r){var l=t.params,c=i(l);if(1===c.zoom_y&&1===c.zoom_x){l.viz.inst_order.row="custom",a(t,"col"),d3.selectAll(l.root+" .toggle_col_order .btn").classed("active",!1),l.viz.run_trans=!0;var d=$.extend(!0,{},l.matrix.matrix),u=l.network_data.row_nodes,p=l.network_data.col_nodes,v=[];u.forEach(function(t){v.push(t.name)}),r=_.indexOf(v,r),v=[],p.forEach(function(t,e){v.push(d[r].row_data[e].value)});var f=d3.range(v.length).sort(function(t,e){return v[e]-v[t]});l.viz.x_scale.domain(f),l.matrix.orders.custom_row=f;var m;m=l.network_data.links.length>l.matrix.def_large_matrix?d3.select(l.root+" .viz_svg"):d3.select(l.root+" .viz_svg").transition().duration(2500);var h=l.network_data.col_nodes_names;m.select(".col_zoom_container").selectAll(".col_label_text").attr("transform",function(t){var e=_.indexOf(h,t.name);return"translate("+l.viz.x_scale(e)+")rotate(-90)"}),m.selectAll(".col_cat_group").attr("transform",function(t){var e=_.indexOf(h,t.name);return"translate("+l.viz.x_scale(e)+",0)"}),l.viz.ds_level===-1&&(m.selectAll(".tile").attr("transform",function(t){return"translate("+l.viz.x_scale(t.pos_x)+",0)"}),m.selectAll(".tile_up").attr("transform",function(t){return"translate("+l.viz.x_scale(t.pos_x)+",0)"}),m.selectAll(".tile_dn").attr("transform",function(t){return"translate("+l.viz.x_scale(t.pos_x)+",0)"})),d3.selectAll(l.root+" .row_label_group").select("rect").style("opacity",0),d3.select(e).select("rect").style("opacity",1),o(l),l.network_data.links.forEach(function(t){t.x=l.viz.x_scale(t.target),t.y=l.viz.y_scale(t.source)}),l.zoom_info=n(),setTimeout(function(){l.viz.run_trans=!1},2500),l.viz.ds_num_levels>0&&l.viz.ds_level>=0&&s(l)}}},function(t,e){"use strict";t.exports=function(t){var e=6,r=e*t.viz.border_width.x,o=e*t.viz.border_width.y;d3.select(t.root+" .top_hlight").attr("width",t.viz.x_scale.rangeBand()).attr("height",o).transition().duration(2500).attr("transform",function(){return"translate("+t.viz.x_scale(t.matrix.click_hlight_x)+",0)"}),d3.select(t.root+" .left_hlight").attr("width",r).attr("height",t.viz.y_scale.rangeBand()-.99*o).transition().duration(2500).attr("transform",function(){return"translate("+t.viz.x_scale(t.matrix.click_hlight_x)+","+.99*o+")"}),d3.select(t.root+" .right_hlight").attr("width",r).attr("height",t.viz.y_scale.rangeBand()-.99*o).transition().duration(2500).attr("transform",function(){var e=t.viz.x_scale(t.matrix.click_hlight_x)+t.viz.x_scale.rangeBand()-r;return"translate("+e+","+.99*o+")"}),d3.select(t.root+" .bottom_hlight").attr("width",function(){return t.viz.x_scale.rangeBand()-1.98*r}).attr("height",o).transition().duration(2500).attr("transform",function(){var e=t.viz.x_scale(t.matrix.click_hlight_x)+.99*r,a=t.viz.y_scale.rangeBand()-o;return"translate("+e+","+a+")"})}},function(t,e,r){"use strict";var o=r(55);t.exports=function(t,e){var r=arguments.length<=2||void 0===arguments[2]?1500:arguments[2],a=t.params;"row"===e&&"clust"===a.viz.inst_order.col&&setTimeout(o,r,t,"row",!0),"col"===e&&"clust"===a.viz.inst_order.row&&setTimeout(o,r,t,"col",!0),"clust"!=a.viz.inst_order.row&&a.viz.dendro_filter.col===!1&&(d3.selectAll(a.root+" .col_dendro_group").style("opacity",0).on("mouseover",null).on("mouseout",null),d3.select(a.root+" .col_slider_group").style("opacity",0),d3.selectAll(a.root+" .col_dendro_crop_buttons").style("opacity",0).on("mouseover",null).on("mouseout",null)),"clust"!=a.viz.inst_order.col&&a.viz.dendro_filter.row===!1&&(d3.selectAll(a.root+" .row_dendro_group").style("opacity",0).on("mouseover",null).on("mouseout",null).on("click",null),d3.select(a.root+" .row_slider_group").style("opacity",0),d3.selectAll(a.root+" .row_dendro_crop_buttons").style("opacity",0).on("mouseover",null).on("mouseout",null))}},function(t,e,r){"use strict";var o=r(56),a=r(57),n=r(58),i=r(48),s=r(60),l=r(63);t.exports=function(t,e){function r(t,r,o){if(d3.select(t).classed("hovering")){var a=d.viz.root_tips+"_"+e+"_dendro_tip";d3.select(a+" .cat_graph").empty()&&null!==d.viz.cat_info[e]&&l(d,e,r,u[o],a,!0),d3.selectAll(d.viz.root_tips+"_"+e+"_dendro_tip").style("opacity",1)}}var c=!(arguments.length<=2||void 0===arguments[2])&&arguments[2],d=t.params;"both"===e&&(e="row");var _;_="row"===e?"col":"row","clust"===d.viz.inst_order[_]&&d3.select(d.root+" ."+e+"_slider_group").style("opacity",1);var u;u="row"===e?o(d):a(d),d3.select(t.params.root+" ."+e+"_dendro_crop_buttons").empty()===!1&&s(t,e);var p=d.viz.dendro_opacity,v=500;d3.selectAll(t.params.viz.root_tips+"_"+e+"_dendro_tip").remove();var f;d3.selectAll(d.root+" ."+e+"_dendro_group").empty()?f=!1:(f=!0,d3.selectAll(d.root+" ."+e+"_dendro_group").remove());var m=0,h=-5,g=i().attr("class",function(){var t=d.viz.root_tips.replace(".",""),r=t+" d3-tip "+t+"_"+e+"_dendro_tip";return r}).direction("nw").offset([m,h]).style("display","none").style("opacity",0);g.html(function(){var t='
Click for cluster information
and additional options.';return t}),c&&(f=!1);var w,y,x,b,z,k,A=d3.select(d.root+" ."+e+"_dendro_container").selectAll("path").data(u,function(t){return t.name}).enter().append("path").style("opacity",0).attr("class",e+"_dendro_group").style("fill","black");A.attr("d",function(t){"row"===e?(w=0,y=t.pos_top,x=30,b=t.pos_mid,z=0,k=t.pos_bot):(w=t.pos_top,y=0,x=t.pos_mid,b=30,z=t.pos_bot,k=0);var r="M"+w+","+y+", L"+x+", "+b+", L"+z+","+k+" Z";return r}),A.on("mouseover",function(o,a){d3.select(this).classed("hovering",!0),null!=t.params.dendro_callback&&t.params.dendro_callback(this),d3.select(d.viz.root_tips+"_"+e+"_dendro_tip").style("display","block"),n(d,this,o,e),g.show(o),d3.select(d.viz.root_tips+"_"+e+"_dendro_tip").style("opacity",0),setTimeout(r,v,this,o,a)}).on("mouseout",function(){"clust"===d.viz.inst_order[_]&&d3.select(this).style("opacity",p),d3.selectAll(d.root+" .dendro_shadow").remove(),d3.select(this).classed("hovering",!1),g.hide(this)}).on("click",function(r,o){$(d.root+" .dendro_info").modal("toggle");var a=r.all_names.join(", ");d3.select(d.root+" .dendro_info input").attr("value",a);var n=d.root+" .dendro_info";d3.selectAll(".dendro_info .cluster_info_container .cat_graph").remove(),null!==d.viz.cat_info[e]&&l(d,e,r,u[o],n),null!=t.params.dendro_click_callback&&t.params.dendro_click_callback(this)}).call(g);var T;T="clust"===d.viz.inst_order[_]?p:0,f?d3.select(d.root+" ."+e+"_dendro_container").selectAll("path").transition().delay(1e3).duration(1e3).style("opacity",T):d3.select(d.root+" ."+e+"_dendro_container").selectAll("path").style("opacity",T)}},function(t,e){"use strict";t.exports=function(t){var e={},r=t.group_level.row,o=t.network_data.row_nodes,a=t.network_data.row_nodes_names;_.each(o,function(o){var n=o.group[r],i=_.indexOf(a,o.name),s=t.viz.y_scale(i),l=s+t.viz.y_scale.rangeBand();_.has(e,n)===!1&&(e[n]={},e[n].name_top=o.name,e[n].name_bot=o.name,e[n].pos_top=s,e[n].pos_bot=l,e[n].pos_mid=(s+l)/2,e[n].name=n,e[n].all_names=[],e[n].inst_rc="row"),e[n].all_names.push(o.name),se[n].pos_bot&&(e[n].name_bot=o.name,e[n].pos_bot=l,e[n].pos_mid=(e[n].pos_top+l)/2)});var n=[];return _.each(e,function(t){n.push(t)}),n}},function(t,e){"use strict";t.exports=function(t){var e={},r=t.group_level.col,o=t.network_data.col_nodes,a=t.network_data.col_nodes_names;_.each(o,function(o){var n=o.group[r],i=_.indexOf(a,o.name),s=t.viz.x_scale(i),l=s+t.viz.x_scale.rangeBand();_.has(e,n)===!1&&(e[n]={},e[n].name_top=o.name,e[n].name_bot=o.name,e[n].pos_top=s,e[n].pos_bot=l,e[n].pos_mid=(s+l)/2,e[n].name=n,e[n].all_names=[],e[n].inst_rc="col"),e[n].all_names.push(o.name),se[n].pos_bot&&(e[n].name_bot=o.name,e[n].pos_bot=l,e[n].pos_mid=(e[n].pos_top+l)/2)});var n=[];return _.each(e,function(t){n.push(t)}),n}},function(t,e,r){"use strict";var o=r(59);t.exports=function(t,e,r,a){function n(){d3.select(e).classed("hovering")&&t.is_slider_drag===!1&&(d3.select(e).style("opacity",.7),d3.select(t.viz.viz_svg).classed("running_update")===!1&&i())}function i(){"row"===a?"clust"===t.viz.inst_order.col&&o(t,e,a,r):"col"===a?"clust"===t.viz.inst_order.row&&o(t,e,a,r):"both"===a&&("clust"===t.viz.inst_order.col&&o(t,e,"row",r),"clust"===t.viz.inst_order.row&&o(t,e,"col",r))}d3.selectAll(t.root+" ."+a+"_dendro_crop_buttons")[0].length>1?setTimeout(n,500):d3.selectAll(t.root+" .dendro_shadow").remove()}},function(t,e){"use strict";t.exports=function(t,e,r,o){var a,n=.2;d3.selectAll(t.root+" .dendro_shadow").remove(),"row"==r?(d3.select(t.root+" .clust_group").append("rect").style("width",t.viz.clust.dim.width+"px").style("height",o.pos_top+"px").style("fill","black").classed("dendro_shadow",!0).style("opacity",n),a=t.viz.clust.dim.height-o.pos_bot,d3.select(t.root+" .clust_group").append("rect").style("width",t.viz.clust.dim.width+"px").style("height",a+"px").attr("transform","translate(0,"+o.pos_bot+")").style("fill","black").classed("dendro_shadow",!0).style("opacity",n)):"col"===r&&(d3.select(t.root+" .clust_group").append("rect").style("width",o.pos_top+"px").style("height",t.viz.clust.dim.height+"px").style("fill","black").classed("dendro_shadow",!0).style("opacity",n),a=t.viz.clust.dim.width-o.pos_bot,d3.select(t.root+" .clust_group").append("rect").style("width",a+"px").style("height",t.viz.clust.dim.height+"px").attr("transform","translate("+o.pos_bot+",0)").style("fill","black").classed("dendro_shadow",!0).style("opacity",n))}},function(t,e,r){"use strict";var o=r(56),a=r(57),n=r(48),i=r(58),s=r(61),l=r(62);t.exports=function(t,e){function r(t){d3.select(t).classed("hovering")&&d3.selectAll(_.viz.root_tips+"_"+e+"_dendro_crop_tip").style("opacity",1).style("display","block")}var c,d,_=t.params,u=.6*_.viz.dendro_opacity;"row"===e?(c=o(_),d="col"):(c=a(_),d="row");var p=5,v=-5,f=n().attr("class",function(){var t=_.viz.root_tips.replace(".",""),r=t+" d3-tip "+t+"_"+e+"_dendro_crop_tip";return r}).direction("nw").style("display","none").offset([p,v]),m=500;d3.selectAll(_.viz.root_tips+"_"+e+"_dendro_crop_tip").remove(),d3.selectAll(_.root+" ."+e+"_dendro_crop_buttons").remove();var h,g,w,y,x,b,z,k,A,T,E=45,S=.25,B=e+"_dendro_crop_buttons";d3.select(t.params.root+" ."+e+"_dendro_icons_group").classed("ran_filter")===!1?(h=d3.select(_.root+" ."+e+"_dendro_icons_group").selectAll("path").data(c,function(t){return t.name}).enter().append("path").classed(B,!0).attr("d",function(t){k=10,A=10;var r=t.pos_bot-t.pos_top;"row"===e?(r0){var l=d3.select(n+" .cluster_info_container"),c=": ",d="

",u=225,p=23,v=20,f=15,m=135,h=27,g=3,w=20,y=20;_.each(s.slice(0,g),function(t){var e=t.bar_data.length;e>w&&(e=w),y+=h*(e+1)}),i&&l.append("text").text("Cluster Information");var x=l.append("div").style("margin-top","5px").classed("cat_graph",!0).append("svg").style("height",y+"px").style("width",u+"px");x.append("rect").classed("cat_background",!0).style("height",y+"px").style("width",u+"px").style("fill","white").style("opacity",1);var b=h;if(s=s.slice(0,g),_.each(s,function(e){e.bar_data=e.bar_data.slice(0,w),l.style("margin-bottom","5px");var r=x.append("g").classed("cat_graph_group",!0).attr("transform","translate(10, "+b+")");b+=h*(e.bar_data.length+1);var o=e.type_name;o.length>=f&&(o=o.slice(0,f)+".."),r.append("text").classed("cat_graph_title",!0).text(o).style("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').style("font-weight",800);var a=15;r.append("text").text("Count").attr("transform",function(){var t=m+a,e="translate("+t+", 0)";return e});var n=4;r.append("line").attr("x1",0).attr("x2",m).attr("y1",n).attr("y2",n).style("stroke","blue").style("stroke-width",1).style("opacity",1);var i=r.append("g").classed("cat_bar_container",!0).attr("transform","translate(0, 10)"),s=i.selectAll("g").data(e.bar_data).enter().append("g").attr("transform",function(t,e){var r=e*p;return"translate(0,"+r+")"}),_=d3.scale.linear().domain([0,e.bar_data[0][2]]).range([0,m]);s.append("rect").style("height",v+"px").style("width",function(t){var e=_(t[2]);return e+"px"}).style("fill",function(t){return t[3]}).style("opacity",t.viz.cat_colors.opacity).style("stroke","grey").style("stroke-width","0.5px"),s.append("text").classed("bar_labels",!0).text(function(t){var e=t[1];return e.indexOf(c)>0&&(e=e.split(c)[1]),e.indexOf(d)>0&&(e=e.split(d)[0]),e.length>=f&&(e=e.slice(0,f)+".."),e}).attr("transform",function(){return"translate(5, "+.75*v+")"}).style("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').style("font-weight",400);var u=25;s.append("text").classed("count_labels",!0).text(function(t){return String(t[4])}).attr("transform",function(){var t=m+a+u,e=.75*v;return"translate("+t+", "+e+")"}).style("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').style("font-weight",400).style("text-anchor","end")}),i){var z=d3.select(n),k=z.style("top").split(".px")[0],A=z.style("left").split(".px")[0],T=0,E=0;"row"===e?(T=0,E=32,a.pos_top=0&&n.push(t)});var s=[];if(null!==t.viz.cat_info[r]){for(var l,c,d,u=t.viz.cat_info[r],p=_.keys(u),v=[],f=[],m=0;m0){var z,k=a.length;_.each(v,function(e){if(c=e.split("-")[1],l=f[c],g)if(e.indexOf("-")>=0){var o=parseInt(e.split("-")[1],b)+1;l="Category "+String(o)}else l="Category";w[l]={},_.each(n,function(t){z=t[e],z.indexOf(": ")>=0&&(z=z.split(": ")[1]),z in w[l]?w[l][z]=w[l][z]+1:w[l][z]=1}),y={},y.type_name=l,y.num_in_clust=k,h=[];var a,i,d=w[l];for(var u in d){i=g?u:l+": "+u;var p=d[u];a=t.viz.cat_colors[r][e][i],h.push([e,i,d[u],a,p])}h.sort(function(t,e){return e[x]-t[x]}),y.bar_data=h,s.push(y)})}}return s}},function(t,e){"use strict";t.exports=function(t){var e={},r=d3.select(t.root+" .clust_group").attr("transform");return null!=r&&r.indexOf("scale")>0?(e.zoom_x=parseFloat(r.split("scale")[1].replace("(","").replace(")","").split(",")[0]),e.zoom_y=parseFloat(r.split("scale")[1].replace("(","").replace(")","").split(",")[1])):(e.zoom_x=1,e.zoom_y=1),e}},function(t,e,r){"use strict";var o=r(48);t.exports=function(t){if(t.labels.show_label_tooltips){d3.selectAll(t.viz.root_tips+"_row_tip").remove();var e=t.viz.root_tips.replace(".",""),r=o().attr("class",function(){var t=e+" d3-tip "+e+"_row_tip";return t}).direction("e").offset([0,10]).style("display","none").html(function(t){var e=t.name.replace(/_/g," ").split("#")[0];return""+e+""});d3.select(t.viz.viz_wrapper).select(t.root+" .row_container").call(r),d3.select(t.root+" .row_label_zoom_container").selectAll("g").on("mouseover",function(e){d3.select(t.viz.root_tips+"_row_tip").classed(e.name,!0),d3.selectAll(t.viz.root_tips+"_row_tip").style("display","block"),d3.select(this).select("text").classed("active",!0),r.show(e),null!=t.row_tip_callback&&t.row_tip_callback(t.viz.root_tips,e)}).on("mouseout",function(e){d3.selectAll(t.viz.root_tips+"_row_tip").style("display","none").classed(e.name,!1),d3.select(this).select("text").classed("active",!1),r.hide(e)})}else d3.select(t.root+" .row_label_zoom_container").selectAll("g").on("mouseover",function(){d3.select(this).select("text").classed("active",!0)}).on("mouseout",function(){d3.select(this).select("text").classed("active",!1)})}},function(t,e,r){"use strict";var o=r(2),a=r(68),n=r(69),i=r(52),s=r(73),l=r(74);t.exports=function(t){var e,r=arguments.length<=1||void 0===arguments[1]?0:arguments[1],c=t.params,d=c.network_data.col_nodes,_=c.viz.x_scale.rangeBand()/2+c.viz.border_width.x;d3.select(c.root+" .col_container").empty()?(e=d3.select(c.viz.viz_svg).append("g").attr("class","col_container").attr("transform","translate("+c.viz.clust.margin.left+","+c.viz.norm_labels.margin.top+")"),e.append("rect").attr("fill",c.viz.background_color).attr("width",30*c.viz.clust.dim.width+"px").attr("height",c.viz.label_background.col).attr("class","white_bars"),e.append("g").attr("class","col_label_outer_container").attr("transform","translate(0,"+c.viz.norm_labels.width.col+")").append("g").attr("class","col_zoom_container")):(e=d3.select(c.root+" .col_container").attr("transform","translate("+c.viz.clust.margin.left+","+c.viz.norm_labels.margin.top+")"),e.select(".white_bars").attr("fill",c.viz.background_color).attr("width",30*c.viz.clust.dim.width+"px").attr("height",c.viz.label_background.col),e.select(c.root+" .col_label_outer_container"));var u=d3.select(c.root+" .col_zoom_container").selectAll(".col_label_text").data(d,function(t){return t.name}).enter().append("g").attr("class","col_label_text").attr("transform",function(t){var e=t.col_index;return"translate("+c.viz.x_scale(e)+", 0) rotate(-90)"}),p=u.append("g").attr("class","col_label_group").attr("transform","translate("+c.viz.x_scale.rangeBand()/2+","+_+") rotate(45)").on("mouseover",function(){d3.select(this).select("text").classed("active",!0)}).on("mouseout",function(){d3.select(this).select("text").classed("active",!1)});o.has(c.network_data.col_nodes[0],"value")&&p.append("rect").attr("class","col_bars").attr("width",function(t){var e=0;return t.value>0&&(e=c.labels.bar_scale_col(t.value)),e}).attr("height",.66*c.viz.x_scale.rangeBand()).style("fill",function(t){return t.value>0?c.matrix.bar_colors[0]:c.matrix.bar_colors[1]; -}).attr("opacity",.6),p.append("text").attr("x",0).attr("y",.64*c.viz.x_scale.rangeBand()).attr("dx",c.viz.border_width.x).attr("text-anchor","start").attr("full_name",function(t){return t.name}).style("font-size",c.labels.default_fs_col+"px").style("cursor","default").text(function(t){return o.normal_name(t)}).style("opacity",0).transition().delay(r).duration(r).style("opacity",1),s(c),p.append("path").style("stroke-width",0).attr("d",function(){return l(c)}).attr("fill","#eee").style("opacity",0).transition().delay(r).duration(r).style("opacity",c.viz.triangle_opacity),d3.selectAll(c.root+" .col_label_text").on("click",function(t){"function"==typeof c.click_label?(c.click_label(t.name,"col"),a(c,this,t.ini)):c.tile_click_hlight&&a(c,this,t.ini)}).on("dblclick",function(e){var r="__data__",o=this[r].name;if(c.sim_mat){n(t,this,o);var s=d3.selectAll(c.root+" .row_label_group").filter(function(t){return t.name==o})[0][0];i(t,s,o)}else n(t,this,o);c.tile_click_hlight&&a(c,this,e.ini)})}},function(t,e){"use strict";t.exports=function(t,e,r){if(r!=t.click_hlight_col){t.click_hlight_col=r;var o=6,a=.85,n=o*t.viz.border_width.x;d3.selectAll(t.root+" .click_hlight").remove(),d3.select(e).append("rect").classed("click_hlight",!0).classed("col_top_hlight",!0).attr("width",t.viz.clust.dim.height).attr("height",n).attr("fill",t.matrix.hlight_color).attr("opacity",a).attr("transform",function(){var e=0,r=-(t.viz.clust.dim.height+t.viz.cat_room.col+t.viz.uni_margin);return"translate("+r+","+e+")"}),d3.select(e).append("rect").classed("click_hlight",!0).classed("col_bottom_hlight",!0).attr("width",t.viz.clust.dim.height).attr("height",n).attr("fill",t.matrix.hlight_color).attr("opacity",a).attr("transform",function(){var e=t.viz.x_scale.rangeBand()-n,r=-(t.viz.clust.dim.height+t.viz.cat_room.col+t.viz.uni_margin);return"translate("+r+","+e+")"})}else d3.selectAll(t.root+" .click_hlight").remove(),t.click_hlight_col=-666}},function(t,e,r){"use strict";var o=r(53),a=r(54),n=r(70),i=r(36),s=r(65),l=r(27);t.exports=function(t,e,r){var c=t.params,d=s(c);if(1===d.zoom_y&&1===d.zoom_x){c.viz.inst_order.col="custom",a(t,"col"),d3.selectAll(c.root+" .toggle_row_order .btn").classed("active",!1),c.viz.run_trans=!0;var u=$.extend(!0,{},c.matrix.matrix),p=c.network_data.row_nodes,v=c.network_data.col_nodes,f=[];v.forEach(function(t){f.push(t.name)});var m=_.indexOf(f,r);f=[],p.forEach(function(t,e){f.push(u[e].row_data[m].value)});var h=d3.range(f.length).sort(function(t,e){return f[e]-f[t]});c.viz.y_scale.domain(h),c.matrix.orders.custom_col=h;var g,w=c.network_data.row_nodes_names;if(g=c.network_data.links.length>c.matrix.def_large_matrix?d3.select(c.root+" .viz_svg"):d3.select(c.root+" .viz_svg").transition().duration(2500),g.selectAll(".row_cat_group").attr("transform",function(t){var e=_.indexOf(w,t.name);return"translate(0,"+c.viz.y_scale(e)+")"}),g.select(".row_label_zoom_container").selectAll(".row_label_group").attr("transform",function(t){var e=_.indexOf(w,t.name);return"translate(0,"+c.viz.y_scale(e)+")"}),c.viz.ds_level===-1&&g.selectAll(".row").attr("transform",function(t){var e=_.indexOf(w,t.name);return"translate(0,"+c.viz.y_scale(e)+")"}),d3.selectAll(c.root+" .col_label_text").select(".highlight_rect").style("opacity",0),d3.select(e).select(".highlight_rect").style("opacity",1),c.network_data.links.forEach(function(t){t.x=c.viz.x_scale(t.target),t.y=c.viz.y_scale(t.source)}),o(c),c.zoom_info=i(),setTimeout(function(){c.viz.run_trans=!1},2500),c.viz.ds_num_levels>0&&c.viz.ds_level>=0){l(c);var y=!0,x=!0,b=!0;n(t,y,x,b)}}}},function(t,e,r){"use strict";var o=r(71),a=r(41),n=r(50),i=r(72);t.exports=function(t){var e=!(arguments.length<=1||void 0===arguments[1])&&arguments[1],r=!(arguments.length<=2||void 0===arguments[2])&&arguments[2],s=!(arguments.length<=3||void 0===arguments[3])&&arguments[3],l=t.params,c=l.zoom_info,d=l.viz.ds_level,u=l.viz.ds_level;null===l.viz.ds?d=-1:(d=Math.floor(Math.log(c.zoom_y)/Math.log(l.viz.ds_zt)),d>l.viz.ds_num_levels-1&&(d=-1));var p=!1;u==-1?d>=0&&(p=!0):d=0&&(d3.selectAll(l.root+" .row").remove(),d3.selectAll(l.viz.root_tips+"_tile_tip").remove(),d3.selectAll(l.viz.root_tips+"_row_tip").remove());var w;if(v<0?(w=l.matrix.matrix,i(l)):(w=l.matrix.ds_matrix[v],d3.selectAll(l.root+" .row_cat_group path").remove()),r===!0&&d3.selectAll(l.root+" .row_cat_group path").remove(),e===!0&&(v>=0?d3.selectAll(l.root+" .ds"+String(v)+"_row").each(function(t){_.contains(l.viz.viz_nodes.row,t.name)===!1&&d3.select(this).remove()}):d3.selectAll(l.root+" .row").each(function(t){_.contains(l.viz.viz_nodes.row,t.name)===!1&&d3.select(this).remove()}),d3.selectAll(l.root+" .row_label_group").each(function(t){_.contains(l.viz.viz_nodes.row,t.name)===!1&&d3.select(this).remove()}),v!=u&&(h=l.viz.viz_nodes.row,d3.selectAll(l.root+" .ds"+String(u)+"_row").remove())),(h.length>=1||"all"===h)&&a(l,w,h,v),v===-1&&(r===!1||e)){var y=[];d3.selectAll(l.root+" .row_label_group").each(function(t){y.push(t.name)});var x=_.difference(l.viz.viz_nodes.row,y),b=1;x.length>b&&n(t,x)}}},function(t,e){"use strict";t.exports=function(t,e){var r,o=[],a=[],n=t.viz.y_scale,i=t.viz.ds_level,s=t.network_data.row_nodes_names,l=".row";i>=0&&(n=t.viz.ds[i].y_scale,s=d3.range(t.matrix.ds_matrix[i].length).map(String),l=".ds"+String(i)+"_row");for(var c=0;ce.min_y&&o.push(s[c]);d3.selectAll(t.root+" "+l).each(function(t){a.push(t.name)}),t.viz.viz_nodes.row=o,t.viz.viz_nodes.curr_row=a}},function(t,e){"use strict";t.exports=function(t){d3.select(t.root+" .row_cat_group path").empty()===!0&&d3.selectAll(t.root+" .row_cat_group").append("path").attr("d",function(){var e=t.viz.cat_room.symbol_width-1,r=0,o=1,a=t.viz.y_scale.rangeBand()/2,n=t.viz.cat_room.symbol_width-1,i=t.viz.y_scale.rangeBand(),s="M "+e+","+r+" L "+o+","+a+", L "+n+","+i+" Z";return s}).attr("fill","#eee").style("opacity",t.viz.triangle_opacity)}},function(t,e,r){"use strict";var o=r(48);t.exports=function(t){if(t.labels.show_label_tooltips){d3.selectAll(t.viz.root_tips+"_col_tip").remove();var e=o().attr("class",function(){var e=t.viz.root_tips.replace(".",""),r=e+" d3-tip "+e+"_col_tip";return r}).direction("w").offset([20,0]).style("display","none").html(function(t){var e=t.name.replace(/_/g," ").split("#")[0];return""+e+""});d3.select(t.viz.viz_wrapper).select("svg").select(t.root+" .col_zoom_container").selectAll(".col_label_group").select("text").call(e),d3.select(t.root+" .col_zoom_container").selectAll(".col_label_group").on("mouseover",function(r){d3.selectAll(t.viz.root_tips+"_col_tip").style("display","block"),e.show(r),null!=t.col_tip_callback&&t.col_tip_callback(r)}).on("mouseout",function(){e.hide(this),d3.selectAll(t.viz.root_tips+"_col_tip").style("display","none")})}}},function(t,e){"use strict";t.exports=function(t){var e=.36*t.viz.x_scale.rangeBand(),r=-t.viz.border_width.x,o=0,a=t.viz.x_scale.rangeBand()-e,n=-(t.viz.x_scale.rangeBand()-e+t.viz.border_width.x),i=-t.viz.border_width.x,s="M "+r+",0 L "+n+","+o+", L "+i+","+a+" Z";return s}},function(t,e){"use strict";t.exports=function(t){d3.select(t.viz.viz_svg).append("rect").attr("fill",t.viz.background_color).attr("height",t.viz.super_labels.dim.width+"px").attr("width","3000px").classed("super_col_bkg",!0).classed("white_bars",!0).attr("transform","translate("+t.viz.clust.margin.left+","+t.viz.super_labels.margin.top+")"),d3.select(t.viz.viz_svg).append("text").attr("class","super_col").text(t.labels["super"].col).attr("text-anchor","center").attr("transform",function(){var e=d3.select(this)[0][0].getBBox().width,r=t.viz.clust.dim.width/2+t.viz.norm_labels.width.row-e/2,o=t.viz.super_labels.dim.width;return"translate("+r+","+o+")"}).style("font-size",function(){var e=t.labels.super_label_fs*t.labels.super_label_scale;return e+"px"}).style("font-weight",300),d3.select(t.viz.viz_svg).append("rect").attr("fill",t.viz.background_color).attr("width",t.viz.super_labels.dim.width+"px").attr("height","3000px").classed("super_row_bkg",!0).classed("white_bars",!0).attr("transform","translate("+t.viz.super_labels.margin.left+",0)"),d3.select(t.viz.viz_svg).append("g").classed("super_row",!0).attr("transform",function(){var e=t.viz.super_labels.dim.width,r=t.viz.clust.dim.height/2+t.viz.norm_labels.width.col;return"translate("+e+","+r+")"}),d3.select(t.root+" .super_row").append("text").text(t.labels["super"].row).attr("text-anchor","center").attr("transform",function(){var e=d3.select(this)[0][0].getBBox().width,r=e/2+t.viz.norm_labels.width.col,o="translate(0,"+r+"), rotate(-90)";return o}).style("font-size",function(){var e=t.labels.super_label_fs*t.labels.super_label_scale;return e+"px"}).style("font-weight",300)}},function(t,e,r){"use strict";var o=r(77),a=r(78),n=r(86),i=r(60);t.exports=function(t){var e=t.params,r=e.viz;d3.select(r.root+" .col_container").append("path").style("stroke-width","0").attr("d","M 0,0 L 1000,-1000, L 1000,0 Z").attr("fill",r.background_color).attr("class","right_slant_triangle").attr("transform","translate("+r.clust.dim.width+","+r.norm_labels.width.col+")"),d3.select(r.root+" .col_container").append("path").style("stroke-width","0").attr("d","M 0,0 L 500,-500, L 0,-500 Z").attr("fill",r.background_color).attr("class","left_slant_triangle").attr("transform","translate(-1,"+r.norm_labels.width.col+")");var s=r.clust.margin.top+r.uni_margin/5;d3.select(r.viz_svg).append("rect").attr("fill",r.background_color).attr("width",r.clust.margin.left).attr("height",s).attr("class","top_left_white");var l=r.cat_room.col+1.5*r.uni_margin;d3.select(r.viz_svg).append("rect").attr("fill",r.background_color).attr("width",2*r.clust.dim.width).attr("height",l).attr("class","top_right_white").attr("transform",function(){var t=r.clust.margin.left+r.clust.dim.width,e=r.norm_labels.width.col+r.norm_labels.margin.top-r.uni_margin;return"translate("+t+", "+e+")"}),p=r.clust.margin.left+r.clust.dim.width+r.uni_margin,v=r.norm_labels.margin.top+r.norm_labels.width.col+2.5*r.uni_margin;var c=1.15*r.cat_room.symbol_width,d=.65,_=1.25;r.show_categories.col&&d3.select(r.viz_svg).selectAll().data(r.all_cats.col).enter().append("text").classed("col_cat_super",!0).style("font-size",c+"px").style("opacity",d).style("cursor","default").attr("transform",function(t){var e=parseInt(t.split("-")[1],10),o=v+_*r.cat_room.symbol_width*e;return"translate("+p+","+o+")"}).text(function(t){return o(r,t,"col")}),n(t),v=r.show_dendrogram?r.clust.margin.top+r.clust.dim.height+r.dendro_room.col-2*r.uni_margin:r.clust.margin.top+r.clust.dim.height;var u=d3.select(r.viz_svg).append("g").classed("bottom_spillover_container",!0).attr("transform",function(){return"translate(0,"+v+")"});u.append("rect").attr("class","bottom_spillover").attr("fill",r.background_color).attr("width",r.svg_dim.width).attr("height",2*r.svg_dim.height),p=r.clust.margin.left,v=0,u.append("g").classed("col_dendro_icons_container",!0).attr("transform","translate("+p+","+v+")").append("g").classed("col_dendro_icons_group",!0),i(t,"col");var p=r.clust.margin.left+r.clust.dim.width,v=r.clust.margin.top+r.clust.dim.height,f=r.cat_room.col+r.clust.dim.width,m=r.cat_room.row+10*r.uni_margin;d3.select(r.viz_svg).append("rect").attr("fill",r.background_color).attr("width",f).attr("height",m).attr("transform",function(){return"translate("+p+","+v+")"}).classed("white_bars",!0).classed("dendro_corner_spillover",!0),p=0,v=r.clust.margin.top+r.clust.dim.height,f=r.clust.margin.left,m=10*r.clust.dim.height,d3.select(r.viz_svg).append("rect").attr("fill",r.background_color).attr("width",f).attr("height",m).attr("transform",function(){return"translate("+p+","+v+")"}).classed("white_bars",!0).classed("dendro_col_spillover",!0),a(t)}},function(t,e){"use strict";t.exports=function(t,e,r){var o;if(t.cat_names[r][e]===e){var a=parseInt(e.split("-")[1],10)+1;o="Category "+a}else o=t.cat_names[r][e];return o}},function(t,e,r){"use strict";var o=r(79);t.exports=function(t){var e=t.params;_.each(["row","col"],function(r){e.viz.show_categories[r]&&d3.selectAll(e.root+" ."+r+"_cat_super").on("dblclick",function(){e.sim_mat&&(r="both"),d3.selectAll(e.root+" .toggle_"+r+"_order .btn").classed("active",!1);var a=this.__data__.replace("-","_")+"_index";e.viz.sim_mat?(o(t,a,"row"),o(t,a,"col")):o(t,a,r)})})}},function(t,e,r){"use strict";var o=r(54),a=r(70),n=r(36),i=r(27),s=r(80),l=r(65);t.exports=function(t,e,r){var c=t.params,d=l(c),u=0;1==d.zoom_y&&1==d.zoom_x||(s(t,0,0,1),u=1200);var p;"row"===r?p="col":"col"===r&&(p="row"),c.viz.run_trans=!0,"row"===p?c.viz.inst_order.row=e:"col"===p&&(c.viz.inst_order.col=e),c.viz.show_dendrogram&&o(t,r),"row"===p?c.viz.x_scale.domain(c.matrix.orders[c.viz.inst_order.row+"_row"]):"col"==p&&c.viz.y_scale.domain(c.matrix.orders[c.viz.inst_order.col+"_col"]);var v;v=d3.selectAll(c.root+" .tile")[0].length0&&c.viz.ds_level>=0){i(c);var h=!0,g=!0,w=!0;a(t,h,g,w)}setTimeout(function(){c.viz.run_trans=!1},2500)}},function(t,e,r){"use strict";var o=r(2),a=r(81),n=r(70),i=r(36),s=r(85);t.exports=function(t,e,r,l){function c(t,e){d3.selectAll(d.root+" ."+t+"_dendro_crop_buttons").transition().duration(g).style("opacity",e)}var d=t.params;if(d3.selectAll(d.viz.root_tips).style("display","none"),d.zoom_info=i(),n(t),!d.viz.run_trans){var u=d.viz.clust.dim.height/2,p=u/l;if(r>=u-p){var v=u-r,f=-u/l+v;r+=f}r<-(u-p)&&(v=u+r,f=u/l-v,r+=f);var m=l,h=1,g=700,w=-(m-1)*u;d3.select(d.root+" .clust_group").transition().duration(g).attr("transform","translate("+[0,0+w]+") scale("+h+","+m+")translate("+[e,r]+")"),d3.select(d.root+" .row_label_zoom_container").transition().duration(g).attr("transform","translate("+[0,w]+") scale("+m+","+m+")translate("+[0,r]+")"),d3.select(d.root+" .row_cat_container").transition().duration(g).attr("transform","translate("+[0,w]+") scale(1,"+m+")translate("+[0,r]+")"),d3.select(d.root+" .row_dendro_container").transition().duration(g).attr("transform","translate("+[0,w]+") scale("+h+","+m+")translate("+[d.viz.uni_margin/2,r]+")");var y;_.each(["row","col"],function(t){y=d3.select(d.root+" ."+t+"_dendro_crop_buttons").style("opacity"),d3.selectAll(d.root+" ."+t+"_dendro_crop_buttons").style("opacity",0),setTimeout(c,700,t,y)}),d3.select(d.root+" .col_zoom_container").transition().duration(g).attr("transform"," scale("+h+","+h+")translate("+[e,0]+")"),d3.select(d.root+" .col_cat_container").transition().duration(g).attr("transform"," scale("+h+",1)translate("+[e,0]+")"),d3.select(d.root+" .col_dendro_container").transition().duration(g).attr("transform"," scale("+h+",1)translate("+[e,d.viz.uni_margin/2]+")");var x=d.viz.clust.margin.top+w+r*m,b=d.viz.clust.margin.left+e;d.zoom_behavior.scale(m).translate([b,x]),a(d),d3.select(d.root+" .row_label_zoom_container text").empty()===!1&&d3.select(d.root+" .row_label_zoom_container").each(function(){var t=d3.select(this).select("text")[0][0].getBBox();d3.select(this).select("rect").attr("x",.5*t.x).attr("y",0).attr("width",.5*t.width).attr("height",d.viz.y_scale.rangeBand()).style("fill","yellow")}),d3.select(d.root+" .row_dendro_icons_group").attr("transform","translate("+[0,0+w]+") scale("+h+","+m+")translate("+[e,r]+")"),d3.select(d.root+" .row_dendro_icons_group").selectAll("path").attr("transform",function(t){var e=d.viz.uni_margin,r=t.pos_mid;return"translate("+e+","+r+") scale(1, "+1/m+")"}),d3.select(d.root+" .col_dendro_icons_group").attr("transform",function(){var t=" scale("+h+","+m+")";return t}),d3.select(d.root+" .col_dendro_icons_group").selectAll("path").attr("transform",function(t){var e=t.pos_mid,r=d.viz.uni_margin;return"translate("+e+","+r+") scale(1,1)"}),o.has(d.network_data.col_nodes[0],"value")&&d3.selectAll(d.root+" .col_bars").attr("width",function(t){var e=0;return t.value>0&&(e=d.labels.bar_scale_col(t.value)/h),e}),o.has(d.network_data.row_nodes[0],"value")&&d3.selectAll(d.root+" .row_bars").transition().duration(g).attr("width",function(t){var e=0;return e=d.labels.bar_scale_row(Math.abs(t.value))/m}).attr("x",function(t){var e=0;return e=-d.labels.bar_scale_row(Math.abs(t.value))/m}),s(d)}}},function(t,e,r){"use strict";var o=r(2),a=r(82),n=r(83);t.exports=function(t){d3.selectAll(t.root+" .row_label_group").select("text").text(function(t){return o.normal_name(t)}),d3.selectAll(t.root+" .col_label_text").select("text").text(function(t){return o.normal_name(t)}),n(t),d3.selectAll(t.root+" .row_label_group").each(function(){a(t,this,"row")}),d3.selectAll(t.root+" .col_label_group").each(function(){a(t,this,"col")})}},function(t,e){"use strict";t.exports=function(t,e,r){function o(){return d=d3.select(this).text(),c=d.length,u=c-3,l=d.substring(0,u)+".."}function a(t){return d=d3.select(this).text(),c=".."===d.slice(-2)?d.length-2:d.length,_=t.name,u=c+2,l=_.substring(0,u)+"..",l.length>_.length&&(l=_),l}function n(t,e){return s=e<1?t:t*e}if("none"!=d3.select(e).style("display")){var i,s,l,c,d,_,u,p,v=t.viz.norm_labels.width[r];i="row"===r?t.viz.zoom_ratio.y?t.zoom_behavior.scale()/t.viz.zoom_ratio.y:t.zoom_behavior.scale():t.viz.zoom_ratio.x>1?t.zoom_behavior.scale()/t.viz.zoom_ratio.x:t.zoom_behavior.scale();var f;d3.select(e).select("text").each(function(t){f=t.name.length});var m=d3.select(e).select("text").node().getBBox().width;if(s=n(m,i),s>v)for(p=1;pv&&(d3.select(e).select("text").text(o),m=d3.select(e).select("text").node().getBBox().width,s=n(m,i));else if(s<.75*v)for(p=1;pa&&(n.row>t.labels.max_allow_fs?(e=t.viz.zoom_ratio.y?t.zoom_behavior.scale()/t.viz.zoom_ratio.y:t.zoom_behavior.scale(),e<1&&(e=1),r=t.labels.max_allow_fs/e,d3.selectAll(t.root+" .row_label_group").select("text").style("font-size",r+"px").attr("y",.5*t.viz.rect_height+.35*r)):d3.selectAll(t.root+" .row_label_group").select("text").style("font-size",t.labels.default_fs_row+"px").attr("y",.5*t.viz.rect_height+.35*t.labels.default_fs_row)),n.col>a&&(n.col>t.labels.max_allow_fs?(e=t.viz.zoom_ratio.x>1?t.zoom_behavior.scale()/t.viz.zoom_ratio.x:t.zoom_behavior.scale(),e<1&&(e=1),r=t.labels.max_allow_fs/e,r>.7*t.viz.rect_width&&(r=.7*t.viz.rect_width),d3.selectAll(t.root+" .col_label_text").select("text").style("font-size",r+"px")):d3.selectAll(t.root+" .col_label_text").select("text").style("font-size",t.labels.default_fs_col+"px"))}},function(t,e){"use strict";t.exports=function(t){var e={};return t.viz.zoom_ratio.x>1?(e.row=t.labels.default_fs_row*t.zoom_behavior.scale(),e.col=t.labels.default_fs_col*t.zoom_behavior.scale()):(e.row=t.labels.default_fs_row*t.zoom_behavior.scale()/t.viz.zoom_ratio.y,e.col=t.labels.default_fs_col*t.zoom_behavior.scale()),e}},function(t,e){"use strict";t.exports=function(t){t.zoom_info.zoom_x*t.viz.border_width.x>1?d3.selectAll(t.root+" .vert_lines").select("line").style("display","block").style("opacity",0).transition().style("opacity",1):d3.selectAll(t.root+" .vert_lines").select("line").style("display","none"),t.zoom_info.zoom_y*t.viz.border_width.y>1?d3.selectAll(t.root+" .horz_lines").select("line").style("display","block").style("opacity",0).transition().style("opacity",1):d3.selectAll(t.root+" .horz_lines").select("line").style("display","none")}},function(t,e,r){"use strict";var o=r(77),a=r(48);t.exports=function(t){var e=t.params,r=e.viz,n=2.75;d3.select(e.root+" .row_cat_label_container").empty()&&(d3.select(t.params.viz.viz_svg).append("g").classed("row_cat_label_container",!0),d3.select(t.params.viz.viz_svg+" .row_cat_label_container").append("g").classed("row_cat_label_bar_container",!0));var i=r.clust.margin.left+r.clust.dim.width+r.uni_margin,s=r.norm_labels.margin.top+r.norm_labels.width.col+2.5*r.uni_margin,l=1.15*r.cat_room.symbol_width,c=.65,d=1.25;d3.select(e.root+" .row_cat_label_container").attr("transform",function(){return i=r.norm_labels.margin.left+r.norm_labels.width.row+r.cat_room.symbol_width+n*r.uni_margin,s=r.clust.margin.top-r.uni_margin,"translate("+i+","+s+") rotate(-90)"}),d3.selectAll(e.root+" .row_cat_label_container text").remove(),d3.selectAll(e.root+" .row_cat_selection_bar").remove(),d3.selectAll(t.params.viz.root_tips+"_row_cat_super").remove();var u=50,p=-75,v=a().attr("class",function(){var t=e.viz.root_tips.replace(".",""),r=t+" d3-tip "+t+"_row_cat_super";return r}).direction("south_custom").offset([u,p]).style("display","none").style("opacity",0).html(function(t){var a,n=e.network_data.row_nodes[0][t];if(n.indexOf("

")>-1){var i=n.split(": ")[0],s=n.split("

")[1];a=i+"

"+s}else a=o(r,t,"row");return a}),f=d*r.cat_room.symbol_width,m=.9*f;if(d3.select(e.root+" .row_cat_label_container").selectAll().data(r.all_cats.row).enter().append("text").style("width","100px").style("height",m+"px").classed("row_cat_super",!0).style("font-size",l+"px").style("opacity",c).style("cursor","default").attr("transform",function(t){var e=d*r.cat_room.symbol_width*parseInt(t.split("-")[1],10);return"translate(0,"+e+")"}).text(function(t){return o(r,t,"row")}),d3.select(e.root+" .row_cat_label_container").selectAll().data(r.all_cats.row).enter().append("rect").classed("row_cat_super",!0).classed("row_cat_selection_bar",!0).style("height",m+"px").style("fill","green").style("width","120px").style("opacity",0).attr("transform",function(t){var e=f*(parseInt(t.split("-")[1],10)-.75);return"translate(0,"+e+")"}).on("mouseover",function(t){d3.selectAll(e.viz.root_tips+"_row_cat_super").style("display","block").style("opacity",1),v.show(t)}).on("mouseout",function(){v.hide(this),d3.selectAll(".d3-tip").style("display","none"),d3.selectAll(e.viz.root_tips+"_row_cat_super").style("display","none").style("opacity",0)}),d3.select(e.root+" .row_cat_selection_bar").empty()===!1&&d3.selectAll(e.root+" .row_cat_selection_bar").call(v),_.has(e.network_data,"row_cat_bars")){d3.select(e.root+" .enr_title").remove();var h=d3.select(e.root+" .viz_svg").append("g").classed("enr_title",!0).attr("transform",function(){var t=d3.select(e.root+" .row_cat_label_container").attr("transform").split("(")[1].split(")")[0],r=Number(t.split(",")[0])-10;return"translate("+String(r)+", 0)"});h.append("rect").attr("width",e.viz.cat_room.row).attr("height",25).attr("fill","white");var g=e.network_data.enrichrgram_lib.substring(0,40);h.append("text").attr("transform","translate(0, 17)").text(g.replace(/_/g," ")).style("font-size","15px").attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif'),d3.selectAll(e.root+" .enrichr_bars").remove();var w=e.viz.clust.margin.top-35,y=e.network_data.row_cat_bars[0],x=d3.scale.linear().domain([0,y]).range([0,w]);d3.select(e.root+" .row_cat_label_bar_container").selectAll().data(e.network_data.row_cat_bars).enter().append("rect").classed("enrichr_bars",!0).attr("height",m+"px").attr("fill","red").attr("width",function(t){var e=x(t);return e+"px"}).attr("opacity",.4).attr("transform",function(t,e){var r=f*(e-.75);return"translate(0, "+r+")"})}}},function(t,e,r){"use strict";var o=r(88);t.exports=function(t){var e,r=t.params;d3.select(r.root+" .expand_button").on("click",null);var a=.4;e=d3.select(r.root+" .expand_button").empty()?d3.select(r.viz.viz_svg).append("text").attr("class","expand_button"):d3.select(r.root+" .expand_button"),e.attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-family","FontAwesome").attr("font-size","30px").text(function(){return r.viz.is_expand===!1?"":""}).attr("y","25px").attr("x","25px").style("cursor","pointer").style("opacity",a).on("mouseover",function(){d3.select(this).style("opacity",.75)}).on("mouseout",function(){d3.select(this).style("opacity",a)}).on("click",function(){r.viz.is_expand===!1?(d3.select(this).text(function(){return""}),r.viz.is_expand=!0,d3.selectAll(r.root+" .borders").style("fill","white"),d3.select(r.root+" .sidebar_wrapper").style("display","none")):(d3.select(this).text(function(){return""}),r.viz.is_expand=!1,d3.selectAll(r.root+" .borders").style("fill","#eee"),d3.select(r.root+" .viz_wrapper").style("width","100px"),d3.select(r.root+" .sidebar_wrapper").style("display","block")),d3.select(r.viz.viz_svg).style("opacity",.5);var e=500;1==r.viz.run_trans&&(e=2500),setTimeout(o,e,t)})}},function(t,e,r){"use strict";var o=r(2),a=r(89),n=r(97),i=r(98),s=r(99),l=r(100),c=r(101),d=r(102),u=r(103),p=r(104),v=r(105),f=r(106),m=r(107),h=r(108),g=r(109),w=r(110),y=r(111),x=r(112),b=r(81),z=r(55),k=r(54),A=r(70),T=r(18),E=r(113),S=r(86),B=r(78),O=r(114),M=r(36),N=r(115);t.exports=function(t){var e=t.params,r=T(e);d3.select(e.root+" .play_button"),d3.select(e.root+" .sidebar_wrapper").style("height",r.height+"px"),d3.select(e.viz.viz_wrapper).style("margin-top",r.top+"px").style("width",r.width+"px").style("height",r.height+"px"),e=w(e),e.zoom_info=M(),i(e);var C=d3.select(e.viz.viz_svg);_.each(e.network_data.links,function(t){t.x=e.viz.x_scale(t.target),t.y=e.viz.y_scale(t.source)}),C.on(".zoom",null),e.zoom_behavior.scaleExtent([1,e.viz.square_zoom*e.viz.zoom_ratio.x]).on("zoom",function(){a(t)}),e.viz.do_zoom&&C.call(e.zoom_behavior),n(t),C.attr("width",e.viz.svg_dim.width).attr("height",e.viz.svg_dim.height),C.select(".super_background").style("width",e.viz.svg_dim.width).style("height",e.viz.svg_dim.height),C.select(".grey_background").attr("width",e.viz.clust.dim.width).attr("height",e.viz.clust.dim.height),setTimeout(E,100,e);var L=e.network_data.row_nodes,R=o.pluck(L,"name");y(e,C),C.selectAll(".highlighting_rect").attr("width",.8*e.viz.x_scale.rangeBand()).attr("height",.8*e.viz.y_scale.rangeBand()),p(e),u(e,C),v(e,C),C.selectAll(".row_label_group").each(function(){var t=d3.select(this).select("text")[0][0].getBBox();d3.select(this).select("rect").attr("x",t.x).attr("y",0).attr("width",t.width).attr("height",e.viz.rect_height).style("fill","yellow").style("opacity",function(t){var e=0;return 1===t.target&&(e=1),e})}),C.selectAll(".row_label_group").select("text").attr("y",.5*e.viz.rect_height+.35*e.labels.default_fs_row),o.has(e.network_data.row_nodes[0],"value")&&x(t,C),C.selectAll(".row_cat_group").attr("transform",function(t){var r=_.indexOf(R,t.name);return"translate(0, "+e.viz.y_scale(r)+")"}),C.selectAll(".row_cat_group").select("path").attr("d",function(){var t=e.viz.cat_room.symbol_width-1,r=0,o=1,a=e.viz.rect_height/2,n=e.viz.cat_room.symbol_width-1,i=e.viz.rect_height,s="M "+t+","+r+" L "+o+","+a+", L "+n+","+i+" Z";return s});var F=!0;e.viz.show_dendrogram?(z(t,"row",F),z(t,"col",F),s(e,C),k(t,"row",0),k(t,"col",0)):s(e,C),f(e,C),m(e,C),h(e,C),g(e,C),l(e,C),c(e.viz,C),N(e),d(e,C),e.zoom_behavior.scale(1).translate([e.viz.clust.margin.left,e.viz.clust.margin.top]),b(e),d3.select(e.root+" .clust_container").attr("transform","translate("+e.viz.clust.margin.left+","+e.viz.clust.margin.top+")"),t.params.viz.ds_level===-1&&A(t),S(t),d3.select(e.viz.viz_svg).style("opacity",1),B(t),d3.select(t.params.root+" .row_slider_group").style("opacity",0),d3.select(t.params.root+" .col_slider_group").style("opacity",0),setTimeout(O,500,t,"row"),setTimeout(O,500,t,"col")}},function(t,e,r){"use strict";var o=r(90),a=r(95),n=r(96);t.exports=function(t){var e=t.params,r={};if(r.zoom_x=d3.event.scale,r.zoom_y=d3.event.scale,r.trans_x=e.zoom_behavior.translate()[0]-e.viz.clust.margin.left,r.trans_y=e.zoom_behavior.translate()[1]-e.viz.clust.margin.top,d3.selectAll(e.viz.root_tips).style("display","none"),e.zoom_info=a(e,r),e.zoom_info=n(e,r),e.is_slider_drag===!1&&e.is_cropping===!1){var i=e.zoom_info.trans_x+e.viz.clust.margin.left,s=e.zoom_info.trans_y+e.viz.clust.margin.top;e.zoom_behavior.translate([i,s]),t.params=e,o(t)}}},function(t,e,r){"use strict";var o=r(83),a=r(70),n=r(91),i=r(62),s=r(65),l=r(92),c=r(94);t.exports=function(t){function e(t){var e=t.params,r=c(e);r===!0&&setTimeout(l,50,t)}var r=t.params,d=r.zoom_info,_=s(r);d3.select(r.root+" .clust_group").attr("transform","translate("+[d.trans_x,d.trans_y]+") scale("+d.zoom_x+","+d.zoom_y+")"),d3.select(r.root+" .row_label_zoom_container").attr("transform","translate("+[0,d.trans_y]+") scale("+d.zoom_y+")"),d3.select(r.root+" .col_zoom_container").attr("transform","translate("+[d.trans_x,0]+") scale("+d.zoom_x+")"),d3.select(r.root+" .row_cat_container").attr("transform","translate("+[0,d.trans_y]+") scale( 1,"+d.zoom_y+")"),d3.select(r.root+" .row_dendro_container").attr("transform","translate("+[r.viz.uni_margin/2,d.trans_y]+") scale( 1,"+d.zoom_y+")"),d3.select(r.root+" .row_dendro_icons_group").attr("transform",function(){var t=d.trans_y,e="translate("+[0,t]+") ",r="scale(1, "+d.zoom_y+")",o=e+r;return o}),d3.select(r.root+" .col_dendro_icons_group").attr("transform",function(){var t=d.trans_x,e="translate("+[t,0]+")",r="scale("+d.zoom_x+", 1)",o=e+r;return o}),i(r,d,"row"),i(r,d,"col"),d3.select(r.root+" .col_cat_container").attr("transform","translate("+[d.trans_x,0]+") scale("+d.zoom_x+",1)"),d3.select(r.root+" .col_dendro_container").attr("transform","translate("+[d.trans_x,r.viz.uni_margin/2]+") scale("+d.zoom_x+",1)"),n(r,d),d3.select(r.root+" .viz_svg").attr("is_zoom",function(){var t=Number(d3.select(r.root+" .viz_svg").attr("is_zoom"));return d3.select(r.root+" .viz_svg").attr("stopped_zoom",1),t+1});var u=function(){d3.select(r.root+" .viz_svg").attr("is_zoom",function(){var t=Number(d3.select(r.root+" .viz_svg").attr("is_zoom"));return t-1})};if(o(r),d.zoom_y<=_.zoom_y){var p=!1;d.zoom_y<_.zoom_y&&(p=!0);var v=!1;a(t,v,p)}setTimeout(u,50),setTimeout(e,100,t)}},function(t,e,r){"use strict";var o=r(2);t.exports=function(t){var e=t.zoom_info;o.has(t.network_data.row_nodes[0],"value")&&d3.selectAll(t.root+" .row_bars").attr("width",function(r){var o=0;return o=t.labels.bar_scale_row(Math.abs(r.value))/e.zoom_y}).attr("x",function(r){var o=0;return o=-t.labels.bar_scale_row(Math.abs(r.value))/e.zoom_y}),o.has(t.network_data.col_nodes[0],"value")&&d3.selectAll(t.root+" .col_bars").attr("width",function(r){var o=0; -return r.value>0&&(o=t.labels.bar_scale_col(r.value)/e.zoom_x),o})}},function(t,e,r){"use strict";var o=r(83),a=r(82),n=r(93),i=r(85),s=r(70),l=r(94);t.exports=function(t){function e(){_.each(["row","col"],function(t){d3.selectAll(r.root+" ."+t+"_label_group").filter(function(){return"none"!=d3.select(this).style("display")}).select("text").style("font-size",function(){var t=Number(d3.select(this).style("font-size").replace("px",""));return t})})}var r=t.params,c=l(r);if(c===!0){_.each(["row","col"],function(t){d3.selectAll(r.root+" ."+t+"_label_group").select("text").style("opacity",1),d3.selectAll(r.root+" ."+t+"_cat_group").select("path").style("display","block")}),s(t,!0),d3.selectAll(r.viz.root_tips).style("display","block"),d3.selectAll(r.root+" .row_label_group").select("text").style("display","none"),d3.selectAll(r.root+" .row_label_group").select("text").style("display","block"),d3.select(r.root+" .viz_svg").attr("stopped_zoom",0),d3.selectAll(r.root+" .row_label_group").select("text").style("display","block"),d3.selectAll(r.root+" .col_label_group").select("text").style("display","block"),i(r),t.params.viz.x_offset=0;var d=150;_.each(["row","col"],function(t){var e=n(r,t);e1&&(e.zoom_y=0?e.trans_y=0:e.trans_y<=-e.pan_room_y&&(e.trans_y=-e.pan_room_y),e}},function(t,e){"use strict";t.exports=function(t,e){var r=t.viz;return r.zoom_ratio.x>1&&(e.zoom_x0?e.trans_x=0:e.trans_x<=-e.pan_room_x&&(e.trans_x=-e.pan_room_x),e}},function(t,e,r){"use strict";var o=r(80);t.exports=function(t){var e=t.params;d3.selectAll(e.viz.zoom_element).on("dblclick.zoom",null),d3.select(e.viz.zoom_element).on("dblclick",function(){o(t,0,0,1)})}},function(t,e){"use strict";t.exports=function(t){var e=1,r=0,o=0,a=t.viz.clust.dim.height/2,n=-(e-1)*a;d3.select(t.root+" .clust_group").attr("transform","translate("+[0,0+n]+") scale(1,"+e+")translate("+[r,o]+")"),d3.select(t.root+" .row_label_zoom_container").attr("transform","translate("+[0,n]+") scale("+e+","+e+")translate("+[0,o]+")"),d3.select(t.root+" .row_cat_container").attr("transform","translate("+[0,n]+") scale(1,"+e+")translate("+[0,o]+")"),d3.select(t.root+" .row_dendro_container").attr("transform","translate("+[0,n]+") scale("+e+","+e+")translate("+[t.viz.uni_margin/2,o]+")"),d3.select(t.root+" .col_zoom_container").attr("transform"," scale(1,1)translate("+[r,0]+")"),d3.select(t.root+" .col_cat_container").attr("transform"," scale(1,1)translate("+[r,0]+")"),d3.select(t.root+" .col_dendro_container").attr("transform"," scale(1,1)translate("+[r,t.viz.uni_margin/2]+")"),d3.select(t.root+" .row_dendro_icons_group").attr("transform",function(){return"translate(0,0) scale(1)"}),d3.select(t.root+" .row_dendro_icons_group").selectAll("path").attr("transform",function(t){var e=7,r=t.pos_mid;return"translate("+e+","+r+") scale(1, 1)"})}},function(t,e){"use strict";t.exports=function(t,e){var r=!(arguments.length<=2||void 0===arguments[2])&&arguments[2],o={};r===!1?o.run_transition=!1:o=r;var a,n=t.viz.duration,i=t.network_data.col_nodes,s=t.network_data.col_nodes_names;o.run_transition?(a=e.transition().delay(o.update).duration(n),e.selectAll(".col_cat_group").data(i,function(t){return t.name}).transition().delay(o.update).duration(n).attr("transform",function(e){var r=_.indexOf(s,e.name);return"translate("+t.viz.x_scale(r)+",0)"}),e.selectAll(".col_dendro_group").data(i,function(t){return t.name}).transition().delay(o.update).duration(n).attr("transform",function(e){var r=_.indexOf(s,e.name);return"translate("+t.viz.x_scale(r)+",0)"})):(a=e,e.selectAll(".col_cat_group").data(i,function(t){return t.name}).attr("transform",function(e){var r=_.indexOf(s,e.name);return"translate("+t.viz.x_scale(r)+",0)"}),d3.select(t.root).selectAll(".col_dendro_group").data(i,function(t){return t.name}).attr("transform",function(e){var r=_.indexOf(s,e.name);return"translate("+t.viz.x_scale(r)+",0)"}));var l,c;_.each(["row","col"],function(e){var r=t.viz.all_cats[e].length;for(l=0;l0&&(r=t.labels.bar_scale_col(e.value)),r}).attr("height",.66*t.viz.rect_width)}},function(t,e,r){"use strict";var o=r(19),a=r(22),n=r(21),i=r(31),s=r(30);t.exports=function(t){if(t=o(t),t.viz=n(t.viz),t.viz=a(t.viz),t.sim_mat&&(t.viz.clust.dim.width<=t.viz.clust.dim.height?t.viz.clust.dim.height=t.viz.clust.dim.width:t.viz.clust.dim.width=t.viz.clust.dim.height),t.viz=s(t.viz),t.viz.x_scale.rangeBands([0,t.viz.clust.dim.width]),t.viz.y_scale.rangeBands([0,t.viz.clust.dim.height]),t.viz.border_width.x=t.viz.x_scale.rangeBand()/t.viz.border_fraction,t.viz.border_width.y=t.viz.y_scale.rangeBand()/t.viz.border_fraction,t.viz.rect_width=t.viz.x_scale.rangeBand()-t.viz.border_width.x,t.viz.rect_height=t.viz.y_scale.rangeBand()-t.viz.border_width.y,null!=t.viz.ds)for(var e;e0&&_.each(t.viz.ds,function(e){e.y_scale=d3.scale.ordinal().rangeBands([0,t.viz.clust.dim.height]),e.y_scale.domain(d3.range(e.num_rows+1)),e.rect_height=e.y_scale.rangeBand()-t.viz.border_width.y}),t.viz.square_zoom=t.viz.norm_labels.width.col/(t.viz.rect_width/2),t=i(t)}},function(t,e,r){"use strict";var o=r(43),a=r(44),n=r(47);t.exports=function(t,e){var r=t.network_data.row_nodes_names;if(t.viz.ds_level===-1)e.selectAll(".row").attr("transform",function(e){var o=_.indexOf(r,e.name),a=t.viz.y_scale(o);return"translate(0,"+a+")"}),e.selectAll(".row").selectAll(".tile").attr("transform",function(e){return n(t,e)}).attr("width",t.viz.rect_width).attr("height",t.viz.rect_height),e.selectAll(".row").selectAll(".tile_up").attr("d",function(){return o(t)}).attr("transform",function(e){return n(t,e)}),e.selectAll(".row").selectAll(".tile_dn").attr("d",function(){return a(t)}).attr("transform",function(e){return n(t,e)});else{var i=t.viz.ds_level,s=".ds"+String(i)+"_row",l=t.viz.ds[i].rect_height;e.selectAll(s).attr("transform",function(e){var r=t.viz.ds[i].y_scale(e.row_index);return"translate(0,"+r+")"}),e.selectAll(s).selectAll(".tile").attr("transform",function(e){return n(t,e)}).attr("width",t.viz.rect_width).attr("height",l)}}},function(t,e,r){"use strict";var o=r(23);t.exports=function(t,e){var r=t.params;r=o(r),e.selectAll(".row_bars").attr("width",function(t){var e=0;return e=r.labels.bar_scale_row(Math.abs(t.value))}).attr("x",function(t){var e=0;return e=-r.labels.bar_scale_row(Math.abs(t.value))}).attr("height",r.viz.y_scale.rangeBand())}},function(t,e){"use strict";t.exports=function(t){var e=d3.select(t.root+" .clust_container").attr("transform"),r=Number(e.split("(")[1].split(",")[0]),o=Number(e.split(",")[1].replace(")","")),a=r+t.viz.clust.dim.width/2,n=o+t.viz.clust.dim.height/2;d3.select(t.root+" .play_button").attr("transform",function(){return"translate("+a+","+n+")"})}},function(t,e){"use strict";t.exports=function(t,e){var r,o,a=t.params.viz;if("row"===e){var n=a.svg_dim.width-3*a.uni_margin;r=a.clust.margin.left+a.clust.dim.width+5*a.dendro_room.row,r>n&&(r=n),o=a.clust.margin.top+3*a.uni_margin}else r=2*a.uni_margin,o=a.clust.margin.top+a.clust.dim.height+a.dendro_room.col-2*a.uni_margin;d3.select(t.params.root+" ."+e+"_slider_group").attr("transform",function(){var t;return t="row"===e?"translate("+r+","+o+")":"translate("+r+","+o+"), rotate(-90)"}).style("opacity",1)}},function(t,e){"use strict";t.exports=function(t){var e=arguments.length<=1||void 0===arguments[1]?0:arguments[1],r=0;e>0&&(r=2e3);var o=d3.selectAll(t.root+" .horz_lines"),a=d3.selectAll(t.root+" .vert_lines");o.style("opacity",0).attr("transform",function(e){var r=e.row_index,o=t.viz.y_scale(r);return"translate( 0,"+o+") rotate(0)"}).transition().duration(e).delay(r).style("opacity",1),o.append("line").attr("x1",0).attr("x2",t.viz.clust.dim.width).style("stroke-width",function(){var e=t.viz.border_width.y;return e+"px"}),a.style("opacity",0).attr("transform",function(e){var r=e.col_index,o=t.viz.x_scale(r);return"translate("+o+") rotate(-90)"}).transition().duration(e).delay(r).style("opacity",1),a.append("line").attr("x1",0).attr("x2",-t.viz.clust.dim.height).style("stroke-width",function(){var e=t.viz.border_width.x;return e+"px"})}},function(t,e,r){"use strict";var o=r(117),a=r(48),n=r(118),i=r(119),s=r(120),l=r(121);t.exports=function(t){var e=t.params;d3.select(e.root+" .col_cat_outer_container").empty()?d3.select(e.root+" .col_container").append("g").attr("class","col_cat_outer_container").attr("transform",function(){var t=e.viz.norm_labels.width.col+2;return"translate(0,"+t+")"}).append("g").attr("class","col_cat_container"):d3.select(e.root+" .col_container").select("col_cat_outer_container").attr("transform",function(){var t=e.viz.norm_labels.width.col+2;return"translate(0,"+t+")"}),d3.selectAll(e.viz.root_tips+"_col_cat_tip").remove();var r=a().attr("class",function(){var t=e.viz.root_tips.replace(".",""),r=t+" d3-tip "+t+"_col_cat_tip";return r}).direction("s").offset([5,0]).style("display","none").html(function(t){return o(e,t,this,"col")});d3.select(e.root+" .col_cat_container").selectAll("g").data(e.network_data.col_nodes,function(t){return t.name}).enter().append("g").attr("class","col_cat_group").attr("transform",function(t){var r=_.indexOf(e.network_data.col_nodes_names,t.name);return"translate("+e.viz.x_scale(r)+",0)"}),d3.select(e.root+" .col_cat_container").selectAll(".col_cat_group").call(r),d3.selectAll(e.root+" .col_cat_group").each(function(){var o,a=this;_.each(e.viz.all_cats.col,function(s){var d=parseInt(s.split("-")[1],10),_="col_cat_rect_"+String(d);o=d3.select(a).select("."+_).empty()?d3.select(a).append("rect").attr("class",_).attr("cat",s).attr("transform",function(){var t=e.viz.cat_room.symbol_width+e.viz.cat_room.separation,r=d*t;return"translate(0,"+r+")"}).on("click",function(r){if(d3.select(this).classed("cat_strings"))if(d3.event.shiftKey===!0)c(t,r,this,"col");else{var o=l(e,r,this,"col");$(e.root+" .dendro_info").modal("toggle");var a=o.join(", ");d3.select(e.root+" .dendro_info input").attr("value",a)}}):d3.select(a).select("."+_),o.attr("width",e.viz.x_scale.rangeBand()).attr("height",e.viz.cat_room.symbol_width).style("fill",function(t){var r=t[s],o=e.viz.cat_colors.col[s][r];return o}).on("mouseover",r.show).on("mouseout",function(){r.hide(this),n(e),d3.select(this).classed("hovering",!1),d3.selectAll(".d3-tip").style("display","none")}),i(e.viz,"col",o,s)})});var c=_.debounce(s,1500)}},function(t,e,r){"use strict";var o=r(77);t.exports=function(t,e,r,a){function n(){var e=!1;if(d3.select(r).classed("hovering")){var o=[a];t.viz.sim_mat&&(o=["row","col"]),_.each(o,function(r){"string"==typeof l&&l.indexOf("Not ")<0&&"false"!=l&&(e=!0),e&&d3.selectAll(t.root+" ."+r+"_cat_group").selectAll("rect").style("opacity",function(e){var r=d3.select(this).style("opacity");if(d3.select(this).classed("cat_strings")&&d3.select(this).classed("filtered_cat")===!1){var o,a=d3.select(this).attr("cat");o=e[a].indexOf(": ")>=0?e[a].split(": ")[1]:e[a],r=a===i&&o===l?t.viz.cat_colors.active_opacity:t.viz.cat_colors.opacity/4}return r})})}}d3.selectAll(t.viz.root_tips+"_col_cat_tip").style("display","block"),d3.selectAll(t.viz.root_tips+"_row_cat_tip").style("display","block");var i=d3.select(r).attr("cat"),s=o(t.viz,i,a),l=e[i];"string"==typeof l&&l.indexOf(": ")>=0&&(l=l.split(": ")[1]);var c=s+": "+l;return d3.select(r).classed("hovering",!0),setTimeout(n,500),c}},function(t,e){"use strict";t.exports=function(t){_.each(["row","col"],function(e){d3.selectAll(t.root+" ."+e+"_cat_group").selectAll("rect").style("opacity",function(){var e=d3.select(this).style("opacity");return d3.select(this).classed("cat_strings")&&d3.select(this).classed("filtered_cat")===!1&&(e=t.viz.cat_colors.opacity),e})})}},function(t,e){"use strict";t.exports=function(t,e,r,o){function a(t){"string"==typeof t&&t.indexOf(i)>-1&&(t=t.split(i)[1]);var e=parseFloat(t);return e}var n=!(arguments.length<=4||void 0===arguments[4])&&arguments[4],i=": ",s=t.cat_info[e][o].type;"cat_strings"===s?n?r.classed("cat_strings",!0).style("opacity",0).transition().duration(1e3).style("opacity",t.cat_colors.opacity):r.classed("cat_strings",!0).style("opacity",t.cat_colors.opacity):r.classed("cat_values",!0).style("opacity",function(r){var n=r[o],i=a(n);return t.cat_info[e][o].cat_scale(Math.abs(i))}).style("fill",function(e){var r,n=a(e[o]);return r=n>0?t.cat_value_colors[0]:t.cat_value_colors[1]})}},function(t,e,r){"use strict";var o=r(121);t.exports=function(t,e,r,a){function n(t,e,r){d3.selectAll(i.root+" ."+t+"_cat_group").selectAll("rect").style("opacity",function(t){var o=d3.select(this).style("opacity");if(d3.select(this).classed("cat_strings")){var a,n=d3.select(this).attr("cat");a=t[n],n===e&&a===r&&(o=1,d3.select(this).classed("filtered_cat",!0))}return o})}var i=t.params,s=d3.select(r).attr("cat"),l=e[s],c=o(i,e,r,a),d={row:"col",col:"row"},_=d[a],u={};if(u[a]=c,t.params.cat_filter[a]===!1){if(t.params.dendro_filter.row===!1&&t.params.dendro_filter.col===!1&&t.params.cat_filter[_]===!1){var p=t.params.network_data.col_nodes_names,v=t.params.network_data.row_nodes,f=t.params.network_data.col_nodes;t.filter_viz_using_names(u),t.params.inst_nodes.row_nodes=v,t.params.inst_nodes.col_nodes=f,t.params.cat_filter[a]=p,n(a,s,l)}}else u=t.params.cat_filter[a],t.filter_viz_using_names(u),t.params.cat_filter[a]=!1,d3.selectAll(i.root+" ."+a+"_cat_group").selectAll("rect").classed("filtered_cat",!1)}},function(t,e,r){"use strict";var o=r(2);t.exports=function(t,e,r,a){var n=d3.select(r).attr("cat"),i=e[n],s=t.network_data[a+"_nodes"],l=_.filter(s,function(t){return t[n]==i}),c=o.pluck(l,"name");return c}},function(t,e,r){"use strict";var o=r(117),a=r(48),n=r(118),i=r(119),s=r(120),l=r(121);t.exports=function(t){var e=!(arguments.length<=1||void 0===arguments[1])&&arguments[1],r=t.params;d3.select(r.root+" .row_cat_outer_container").empty()?d3.select(r.root+" .row_container").append("g").attr("class","row_cat_outer_container").attr("transform","translate("+r.viz.norm_labels.width.row+",0)").append("g").attr("class","row_cat_container"):d3.select(r.root+" .row_container").select("row_cat_outer_container").attr("transform","translate("+r.viz.norm_labels.width.row+",0)"),d3.select(r.root+" .row_cat_container").select(".white_bars").empty()?d3.select(r.root+" .row_cat_container").append("rect").attr("class","white_bars").attr("fill",r.viz.background_color).attr("width",r.viz.cat_room.row+"px").attr("height",function(){var t=r.viz.clust.dim.height;return t}):d3.select(r.root+" .row_cat_container").select(".white_bars").attr("fill",r.viz.background_color).attr("width",r.viz.cat_room.row+"px").attr("height",function(){var t=r.viz.clust.dim.height;return t}),d3.selectAll(r.viz.root_tips+"_row_cat_tip").remove();var c=a().attr("class",function(){var t=r.viz.root_tips.replace(".",""),e=t+" d3-tip "+t+"_row_cat_tip";return e}).direction("e").offset([5,0]).style("display","none").html(function(t){return o(r,t,this,"row")});d3.select(r.root+" .row_cat_container").selectAll("g").data(r.network_data.row_nodes,function(t){return t.name}).enter().append("g").attr("class","row_cat_group").attr("transform",function(t){var e=_.indexOf(r.network_data.row_nodes_names,t.name);return"translate(0, "+r.viz.y_scale(e)+")"}),d3.select(r.root+" .row_cat_container").selectAll(".row_cat_group").call(c);var d,u;d3.selectAll(r.root+" .row_cat_group rect").remove(),r.viz.show_categories.row&&d3.selectAll(r.root+" .row_cat_group").each(function(){u=this,_.each(r.viz.all_cats.row,function(o){var a=parseInt(o.split("-")[1],10),s="row_cat_rect_"+String(a);d=d3.select(u).select("."+s).empty()?d3.select(u).append("rect").attr("class",s).attr("cat",o):d3.select(u).select("."+s),d.attr("width",r.viz.cat_room.symbol_width).attr("height",r.viz.y_scale.rangeBand()).style("fill",function(t){var e=t[o],a=r.viz.cat_colors.row[o][e];return a}).attr("x",function(){var t=r.viz.cat_room.symbol_width+r.viz.uni_margin/2;return t+"px"}).attr("transform",function(){var t=r.viz.cat_room.symbol_width+r.viz.cat_room.separation,e=a*t;return"translate("+e+",0)"}).on("click",function(e){if(d3.select(this).classed("cat_strings"))if(d3.event.shiftKey===!0)p(t,e,this,"row");else{var o=l(r,e,this,"row");$(r.root+" .dendro_info").modal("toggle");var a=o.join(", ");d3.select(r.root+" .dendro_info input").attr("value",a)}}).on("mouseover",c.show).on("mouseout",function(){c.hide(this),n(r),d3.select(this).classed("hovering",!1),d3.selectAll(".d3-tip").style("display","none")}),i(r.viz,"row",d,o,e)})});var p=_.debounce(s,1500)}},function(t,e,r){"use strict";var o=r(55);t.exports=function(t){var e=t.params,r=e.viz.dendro_room.row+e.viz.uni_margin,a=e.viz.clust.margin.left+e.viz.clust.dim.width,n=e.viz.clust.margin.top;d3.select(e.root+" .row_dendro_outer_container").empty()?(d3.select(e.root+" .viz_svg").append("g").attr("class","row_dendro_outer_container").attr("transform","translate("+a+","+n+")"),d3.select(e.root+" .row_dendro_outer_container").append("rect").classed("row_dendro_spillover",!0).attr("fill",e.viz.background_color).attr("width",r+"px").attr("height",e.viz.svg_dim.height),d3.select(e.root+" .row_dendro_outer_container").append("g").attr("class","row_dendro_container").attr("transform","translate("+e.viz.uni_margin/2+",0)")):(d3.select(e.root+" .viz_svg").select("row_dendro_outer_container").attr("transform","translate("+a+","+n+")"),d3.select(e.root+" .row_dendro_outer_container").select(".row_dendro_spillover").attr("width",r+"px").attr("height",e.viz.svg_dim.height)),o(t,"row",!1),"clust"!=e.viz.inst_order.col&&d3.selectAll(e.root+" .row_dendro_group").remove()}},function(t,e,r){"use strict";var o=r(55);t.exports=function(t){var e=t.params,r=e.viz.clust.margin.left,a=e.viz.clust.margin.top+e.viz.clust.dim.height,n=e.viz.dendro_room.col+e.viz.uni_margin;d3.select(e.root+" .col_dendro_outer_container").empty()?(d3.select(e.root+" .viz_svg").append("g").attr("class","col_dendro_outer_container").attr("transform","translate("+r+","+a+")"),d3.select(e.root+" .col_dendro_outer_container").append("rect").classed("col_dendro_spillover",!0).attr("fill",e.viz.background_color).attr("width",e.viz.svg_dim.width).attr("height",n+"px"),d3.select(e.root+" .col_dendro_outer_container").append("g").attr("class","col_dendro_container").attr("transform","translate(0,"+e.viz.uni_margin/2+")"),d3.select(e.root+" .col_dendro_outer_container").append("rect").classed("col_dendro_spillover_top",!0).attr("fill",e.viz.background_color).attr("width",e.viz.svg_dim.width).attr("height",e.viz.svg_dim.height).attr("transform","translate(0,"+e.viz.dendro_room.col+")")):(d3.select(e.root+" .viz_svg").select("col_dendro_outer_container").attr("transform","translate("+r+","+a+")"),d3.select(e.root+" .col_dendro_outer_container").select(".col_dendro_spillover").attr("width",e.viz.svg_dim.width).attr("height",n+"px")),o(t,"col",!1),"clust"!=e.viz.inst_order.row&&d3.selectAll(e.root+" .col_dendro_group").remove()}},function(t,e,r){"use strict";var o=r(126);t.exports=function(t){o(t,"row"),o(t,"col")}},function(t,e,r){"use strict";var o=r(127),a=r(114);t.exports=function(t,e){function r(){t.params.is_slider_drag=!0;var r=d3.event.y;r<0&&(r=0),r>i&&(r=i),this.nextSibling&&this.parentNode.appendChild(this), -r=d3.round(r,-1);var a=10-r/10;d3.select(this).attr("transform","translate(0, "+r+")"),o(t,e,a)}function n(){var r=d3.mouse(this),a=d3.round(r[1],-1);d3.select(t.params.root+" ."+e+"_group_circle").attr("transform","translate(0, "+a+")");var n=10-a/10;o(t,e,n)}var i=100,s=d3.behavior.drag().on("drag",r).on("dragend",function(){t.params.is_slider_drag=!1}),l=d3.select(t.params.root+" .viz_svg").append("g").classed(e+"_slider_group",!0);a(t,e);var c=i+20,d=30;l.append("rect").classed(e+"_slider_background",!0).attr("height",c+"px").attr("width",d+"px").attr("fill",t.params.viz.background_color).attr("transform",function(){var t="translate(-10, -5)";return t}).style("opacity",0),l.append("line").style("stroke-width",i/7+"px").style("stroke","black").style("stroke-linecap","round").style("opacity",0).attr("y1",0).attr("y2",function(){return i-2}).on("click",n);var _=-i/40;l.append("path").style("fill","black").attr("transform","translate("+_+", 0)").attr("d",function(){var t=0,e=0,r=0,o=i,a=i/10,n=0,s="M"+t+","+e+", L"+r+", "+o+", L"+a+","+n+" Z";return s}).style("opacity",.35).on("click",n);var u=.35,p=.6;l.append("circle").classed(e+"_group_circle",!0).attr("r",.08*i).attr("transform",function(){return"translate(0, "+i/2+")"}).style("fill","blue").style("opacity",u).on("mouseover",function(){d3.select(this).style("opacity",p)}).on("mouseout",function(){d3.select(this).style("opacity",u)}).call(s)}},function(t,e,r){"use strict";var o=r(55);t.exports=function(t,e,r){var a=t.params;"row"===e?a.group_level.row=r:"col"===e&&(a.group_level.col=r);var n=!0;o(t,e,n)}},function(t,e,r){"use strict";var o=r(60);t.exports=function(t){var e=t.params.viz,r=e.clust.margin.left+e.clust.dim.width+e.uni_margin+e.dendro_room.row,a=d3.select(e.viz_svg).append("g").classed("right_spillover_container",!0).attr("transform",function(){return"translate("+r+", 0)"}),n=e.norm_labels.margin.top+e.norm_labels.width.col;a.append("rect").attr("fill",e.background_color).attr("width",10*e.clust.dim.width).attr("height",e.svg_dim.height+"px").attr("class","white_bars").attr("class","right_spillover").attr("transform",function(){return"translate( 0,"+n+")"});var i=0,s=e.clust.margin.top;a.append("g").classed("row_dendro_icons_container",!0).attr("transform","translate("+i+","+s+")").append("g").classed("row_dendro_icons_group",!0),o(t,"row"),i=e.clust.margin.left+e.clust.dim.width,s=n;var l=e.dendro_room.row+e.uni_margin,c=e.cat_room.col+e.uni_margin;d3.select(e.viz_svg).append("rect").attr("fill",e.background_color).attr("width",l).attr("height",c).attr("transform",function(){return"translate("+i+","+s+")"}).classed("white_bars",!0).classed("dendro_row_spillover",!0)}},function(t,e,r){"use strict";var o=r(130),a=r(131),n=r(133),i=r(134),s=r(136),l=r(137),c=r(139),d=r(140),_=r(163),u=r(164),p=r(165),v=r(166),f=r(167),m=r(168);t.exports=function(){var t=this,e=t.params;if(d3.select(e.root+" .running_demo").empty()){d3.select(e.root+" .play_button").classed("running_demo",!0),f(e,!1),$.blockUI({css:{border:"none",padding:"15px",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px",opacity:0,color:"#fff",cursor:"default"}}),d3.selectAll(".blockUI").style("opacity",0);var r=750;t.params.viz.is_expand===!1&&(r=o(e,r,_),r-=1500),r=o(e,r,a),r=o(e,r,n),r=o(t,r,i),r=o(e,r,p),r=o(e,r,s),r=o(e,r,m),r=o(e,r,u),r=o(e,r,l),r=o(e,r,c),r=o(t,r,d),r=o(e,r,_),r=o(e,r,v)}}},function(t,e){"use strict";t.exports=function(t,e,r){var o=(setTimeout(r().run,e,t),r().get_duration());return e+=o}},function(t,e,r){"use strict";var o=r(132);t.exports=function(){function t(t){var e="Clustergrammer allows users to generate\ninteractive and sharable visualizations\nby uploading a matrix",a="This demo will quickly overview some\nof Clustergrammer's interactive features";setTimeout(o,0,t,e,4500/r),setTimeout(o,4500/r,t,a,4500/r)}function e(){return 1e4/r}var r=1;return{run:t,get_duration:e}}},function(t,e){"use strict";t.exports=function(t,e,r){var o=e.split("\n");o.length<3&&o.push(""),d3.select(t.root+" .demo_group").style("opacity",0).transition().duration(250).style("opacity",1).transition().duration(250).delay(r).style("opacity",0);for(var a=0;a0?f.update=1e3:f.update=0,v>0?f.enter=1e3:f.enter=0,f.enter=f.enter+f.update,f.run_transition=!0;var m=t.network_data.links.length,h=e.network_data.links.length,g=.5*e.matrix.def_large_matrix;return(m>g||h>g)&&(f.run_transition=!1,f.update=0,f.enter=0),f}},function(t,e,r){"use strict";var o=r(146),a=r(49),n=r(67),i=r(147),s=r(151),l=r(39),c=r(152),d=r(155),_=r(81),u=r(48);t.exports=function(t,e,r){var p=t.params;d3.selectAll(p.viz.root_tips).remove();var v=u().attr("class",function(){var t=p.viz.root_tips.replace(".",""),e=t+" d3-tip "+t+"_tile_tip";return e}).direction("nw").offset([0,0]).style("display","none").html(function(t){var e,r=String(t.value.toFixed(3));if(p.keep_orig){var o=String(t.value_orig.toFixed(3));e="

"+t.row_name+" and "+t.col_name+"

normalized value: "+r+"

original value: "+o+"
"}else e="

"+t.row_name+" and "+t.col_name+"

value: "+r+"
";return e});d3.select(p.root+" .clust_group").call(v),d(p);for(var f=1e3,m=e.row_nodes,h=e.col_nodes,g=e.links,w=g,y=0;y0?t.matrix.tile_colors[0]:t.matrix.tile_colors[1]}).attr("fill-opacity",function(e){var r=t.matrix.opacity_scale(Math.abs(e.value));return r}):l.style("fill",function(e){return e.value>0?t.matrix.tile_colors[0]:t.matrix.tile_colors[1]}).attr("fill-opacity",function(e){var r=t.matrix.opacity_scale(Math.abs(e.value));return r}),l.each(function(t){Math.abs(t.value_up)>0&&Math.abs(t.value_dn)>0&&d3.select(this).remove()})}},function(t,e,r){"use strict";var o=r(43),a=r(44),n=r(45),i=r(46),s=r(47);t.exports=function(t,e,r,l,c,d,u){var p=_.filter(e,function(t){return 0!=t.value_up||0!=t.value_dn}),v=d3.select(r).selectAll(".tile_up").data(p,function(t){return t.col_name}),f=v.on("mouseover",function(){for(var e=arguments.length,r=Array(e),o=0;o0&&Math.abs(t.value_dn)>0&&d3.select(this).remove()})}},function(t,e){"use strict";t.exports=function(t,e,r){var o=t.network_data.row_nodes,a=t.network_data.col_nodes,n=d3.select(t.root+" .clust_group").selectAll(".row").data(t.matrix.matrix,function(t){return t.name}).exit();e.run_transition?n.transition().duration(r).style("opacity",0).remove():n.style("opacity",0).remove(),d3.selectAll(t.root+" .row_label_group").data(o,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .col_label_group").data(a,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .row_cat_group").data(o,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .row_dendro_group").data(o,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .col_label_text").data(a,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .horz_lines").data(o,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .vert_lines").data(a,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .col_cat_group").data(a,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .col_dendro_group").data(a,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove()}},function(t,e,r){"use strict";var o=r(153);t.exports=function(t,e,r,a){var n=d3.select(t.root+" .clust_group").selectAll(".row").data(t.matrix.matrix,function(t){return t.name}).enter().append("g").classed("row",!0).attr("transform",function(e){return"translate(0,"+t.viz.y_scale(e.row_index)+")"});n.each(function(n){o(t,n,e,r,a,this)})}},function(t,e,r){"use strict";var o=r(154),a=r(45),n=r(46),i=r(47);t.exports=function(t,e,r,s,l,c){var d=e.row_data,u=_.filter(d,function(t){return 0!==t.value}),p=d3.select(c).selectAll("rect").data(u,function(t){return t.col_name}).enter().append("rect").attr("class","tile row_tile").attr("width",t.viz.rect_width).attr("height",t.viz.rect_height).style("fill",function(e){return e.value>0?t.matrix.tile_colors[0]:t.matrix.tile_colors[1]}).on("mouseover",function(){for(var e=arguments.length,r=Array(e),o=0;o0&&(r=t.matrix.opacity_scale(Math.abs(e.value_up))),r});var p=d3.select(r).selectAll(".tile_dn").data(d,function(t){return t.col_name}).enter().append("path").attr("class","tile_dn").attr("d",function(){return a(t)}).attr("transform",function(e){return n(t,e)}).style("fill",function(){return t.matrix.tile_colors[1]}).on("mouseover",function(e){d3.selectAll(t.root+" .row_label_group text").classed("active",function(t){return e.row_name===t.name}),d3.selectAll(t.root+" .col_label_text text").classed("active",function(t){return e.col_name===t.name}),t.matrix.show_tile_tooltips&&i.show(e)}).on("mouseout",function(){d3.selectAll(t.root+" text").classed("active",!1),t.matrix.show_tile_tooltips&&i.hide()});p.style("fill-opacity",0).transition().delay(s.enter).duration(l).style("fill-opacity",function(e){var r=0;return Math.abs(e.value_up)>0&&(r=t.matrix.opacity_scale(Math.abs(e.value_dn))),r}),c.each(function(t){Math.abs(t.value_up)>0&&Math.abs(t.value_dn)>0&&d3.select(this).remove()})}},function(t,e){"use strict";t.exports=function(t){d3.select(t.root+" .clust_container").attr("transform","translate("+t.viz.clust.margin.left+","+t.viz.clust.margin.top+")"),d3.select(t.root+" .col_label_outer_container").attr("transform","translate(0,"+t.viz.norm_labels.width.col+")"),d3.select(t.root+" .col_cat_outer_container").attr("transform",function(){var e=t.viz.norm_labels.width.col+2;return"translate(0,"+e+")"})}},function(t,e,r){"use strict";var o=(r(127),r(79)),a=r(78),n=r(157);t.exports=function(t){function e(e,r){var o=2-r,a=t.params.matrix.abs_max_val*o;t.params.matrix.opacity_scale.domain([0,a]),d3.selectAll(t.params.root+" .tile").style("fill-opacity",function(e){var r=t.params.matrix.opacity_scale(Math.abs(e.value));return r})}var r=t.params,i=d3.select(r.root+" .gene_search_box")[0][0],s=new Awesomplete(i,{minChars:1,maxItems:15}),l=t.params.network_data.row_nodes_names;s.list=l,d3.selectAll(".awesomplete ul").style("z-index",99),$(r.root+" .gene_search_box").keyup(function(e){if(13===e.keyCode){var o=$(r.root+" .gene_search_box").val();n(t,o,l)}}),$(r.root+" .submit_gene_button").off().click(function(){var e=$(r.root+" .gene_search_box").val();n(t,e,l)});var c;if(c=r.sim_mat?["both"]:["row","col"],_.each(c,function(e){$(r.root+" .toggle_"+e+"_order .btn").off().click(function(a){var n=$(a.target).attr("name").replace("_row","").replace("_col","");d3.selectAll(r.root+" .toggle_"+e+"_order .btn").classed("active",!1),d3.select(this).classed("active",!0),"both"!=e?o(t,n,e):(o(t,n,"row"),o(t,n,"col"))})}),a(t),d3.select(t.params.root+" .opacity_slider").select("#handle-one").empty()){var d=d3.slider().snap(!0).value(1).min(.1).max(1.9).step(.1).on("slide",function(t,r){e(t,r)});d3.select(t.params.root+" .opacity_slider").call(d)}}},function(t,e,r){"use strict";var o=r(80);t.exports=function(t,e,r){var a="name";if(r.indexOf(e)!==-1){d3.selectAll(t.params.root+" .row_label_group").select("rect").style("opacity",0);var n=_.indexOf(r,e),i=t.params.viz.y_scale(n),s=t.params.viz.clust.dim.height/2-i,l=t.params.viz.zoom_ratio.x;o(t,0,s,l),t.params.zoom_info.zoom_y=l,d3.selectAll(t.params.root+" .row_label_group").filter(function(t){return t[a]===e}).select("rect").style("opacity",1)}}},function(t,e){"use strict";t.exports=function(t){t.dendro_filter.row===!1&&"clust"===t.viz.inst_order.col&&d3.select(t.root+" .row_slider_group").style("opacity",1).style("pointer-events","all"),d3.selectAll(t.root+" .toggle_row_order .btn").attr("disabled",null),t.dendro_filter.col===!1&&"clust"===t.viz.inst_order.row&&d3.select(t.root+" .col_slider_group").style("opacity",1).style("pointer-events","all"),d3.selectAll(t.root+" .toggle_col_order .btn").attr("disabled",null),d3.selectAll(t.root+" .gene_search_button .btn").attr("disabled",null),t.viz.run_trans=!1}},function(t,e){"use strict";t.exports=function(t,e){_.each(["row","col"],function(r){var o;o="row"===r?"col":"row",d3.selectAll(e.root+" .toggle_"+o+"_order .btn").filter(function(){return d3.select(this).attr("name")===t.inst_order[r]}).classed("active",!0)})}},function(t,e,r){"use strict";var o=r(161),a=r(2);t.exports=function(t,e){var r,n,i,s,l,c,d,u,p=!(arguments.length<=2||void 0===arguments[2])&&arguments[2],v=0,f=0;_.each(e,function(e){s=e.name,p===!0&&(s.indexOf(" ")?s=s.split(" ")[0]:s.indexOf("_")&&(s=s.split("_")[0])),v=0,o(e),_.each(t,function(t){if(r=t.cat_title,n=t.cats,l="false",f=-1,u=0,_.each(n,function(t){c=t.cat_name,i=t.members,_.contains(i,s)&&(l=c,f=u),u+=1}),a.has(t,"pval")){var o=t.pval.toExponential();d=r+": "+l+"

Pval "+String(o)+"

"}else d=r.indexOf("cat-")===-1?r+": "+l:l;e["cat-"+String(v)]=d,e["cat_"+String(v)+"_index"]=f,v+=1})})}},function(t,e){"use strict";t.exports=function(t){var e=_.keys(t);_.each(e,function(e){e.indexOf("cat-")>-1&&delete t[e],e.indexOf("cat_")>-1&&delete t[e]})}},function(t,e,r){"use strict";var o=r(146),a=r(67),n=r(70),i=r(155);t.exports=function(t){d3.selectAll(t.params.root+" .row_cat_group").remove(),d3.selectAll(t.params.root+" .row_label_group").remove(),d3.selectAll(t.params.root+" .row").remove();var e=!0,r=!0,s=!0;n(t,e,r,s),a(t);var l=t.params.network_data.col_nodes;d3.selectAll(t.params.root+" .col_label_group").data(l,function(t){return t.name}).exit().style("opacity",0).remove(),d3.selectAll(t.params.root+" .col_label_text").data(l,function(t){return t.name}).exit().style("opacity",0).remove(),d3.selectAll(t.params.root+" .col_cat_group").data(l,function(t){return t.name}).exit().style("opacity",0).remove(),d3.selectAll(t.params.root+" .col_dendro_group").data(l,function(t){return t.name}).exit().style("opacity",0).remove(),i(t.params);var c={};c.enter=0,c.update=0,c.run_transition=!1;var d=0;o(t,d,c)}},function(t,e,r){"use strict";var o=r(135);t.exports=function(){function t(t){var e=Number(d3.select(t.root+" .expand_button").attr("x").replace("px","")),n=Number(d3.select(t.root+" .expand_button").attr("y").replace("px","")),i=0,s=400;setTimeout(o,i,t,"single",e,n),setTimeout(r,s,t),setTimeout(a,1500,t)}function e(){return 3500}function r(t){$(t.root+" .expand_button").d3Click()}function a(t){n(t,"row","clust"),n(t,"col","clust")}function n(t,e,r){var o=d3.selectAll(".toggle_"+e+"_order .btn").filter(function(){return this.__data__==r})[0];$(o).click()}return jQuery.fn.d3Click=function(){this.each(function(t,e){var r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.dispatchEvent(r)})},{run:t,get_duration:e}}},function(t,e,r){"use strict";var o=r(132),a=r(138),n=r(127);t.exports=function(){function t(t){var e="Identify row and column groups\nof varying sizes using the\nsliders and dendrogram";o(t,e,1e4),setTimeout(a,3e3,t,"slider_col",7e3),setTimeout(r,4e3,t,"row",3),setTimeout(r,5e3,t,"row",4),setTimeout(r,6e3,t,"row",5),setTimeout(r,7e3,t,"row",6),setTimeout(r,8e3,t,"row",7),setTimeout(r,9e3,t,"row",5)}function e(){return 11e3}function r(t,e,r){$(cgm.params.root+" .slider_col").slider("value",r/10),n(cgm,e,r)}return{run:t,get_duration:e}}},function(t,e,r){"use strict";var o=r(132),a=r(135);t.exports=function(){function t(t){var e="Row and column categories\ncan be use to reorder\nby double-clicking";o(t,e,7e3);var n=d3.selectAll(t.root+" .col_cat_super").filter(function(){return"cat-1"===this.__data__})[0],i=d3.select(".col_cat_super").attr("transform"),s=Number(i.split("(")[1].split(",")[0].replace(")",""))+20,l=Number(i.split(",")[1].replace(")","")),c=4e3;setTimeout(a,c,t,"double",s,l);var d=c+300;setTimeout(r,d,t,n)}function e(){return 8e3}function r(t,e){$(e).d3DblClick()}return jQuery.fn.d3DblClick=function(){this.each(function(t,e){var r=document.createEvent("MouseEvents");r.initMouseEvent("dblclick",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null), -e.dispatchEvent(r)})},{run:t,get_duration:e}}},function(t,e,r){"use strict";var o=r(132),a=r(167);t.exports=function(){function t(t){var r="Clustergrammer is built with gene\nexpression data in mind and interfaces\nwith several Ma'ayan lab web tools",a="The example data being visualized is\ngene expression data obtained from the\nCancer Cell Line Encyclopedia",n="For more information please view\nthe help documentation";setTimeout(o,0,t,r,4500),setTimeout(o,4500,t,a,4500),setTimeout(o,9e3,t,n,4500),setTimeout(e,14e3,t)}function e(t){d3.select(t.root+" .play_button").classed("running_demo",!1),a(t,!0)}function r(){return 12e3}return{run:t,get_duration:r}}},function(t,e){"use strict";t.exports=function(t,e){e===!1?d3.select(t.root+" .play_button").transition().duration(500).style("opacity",0):(d3.select(t.root+" .play_button").transition().duration(500).style("opacity",1),$.unblockUI())}},function(t,e,r){"use strict";var o=r(132),a=r(135);t.exports=function(){function t(t){var e="View additional controls\nby clicking the menu button";o(t,e,4e3);var n=Number(d3.select(t.root+" .expand_button").attr("x").replace("px","")),i=Number(d3.select(t.root+" .expand_button").attr("y").replace("px","")),s=3e3,l=3400;setTimeout(a,s,t,"single",n,i),setTimeout(r,l,t)}function e(){return 5e3}function r(t){$(t.root+" .expand_button").d3Click()}return jQuery.fn.d3Click=function(){this.each(function(t,e){var r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.dispatchEvent(r)})},jQuery.fn.d3DblClick=function(){this.each(function(t,e){var r=document.createEvent("MouseEvents");r.initMouseEvent("dblclick",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.dispatchEvent(r)})},{run:t,get_duration:e}}},function(t,e,r){"use strict";var o=r(170),a=r(171);t.exports=function(){var t=this,e=t.params;o(t);var r=30;a(e,r)}},function(t,e,r){"use strict";var o=r(113);t.exports=function(t){var e=t.params;if(d3.select(e.root+" .play_button").empty()){var r=d3.select(e.root+" .viz_svg").append("g").classed("play_button",!0).classed("running_demo",!1);o(e),r.append("circle").style("r",45).style("fill","white").style("stroke","black").style("stroke-width","3px").style("opacity",.5),r.append("path").attr("d",function(){var t=40,e=22,r=15;return"M-"+r+",-"+e+" l "+t+","+e+" l -"+t+","+e+" z "}).style("fill","black").style("opacity",.5),r.on("mouseover",function(){d3.select(this).select("path").style("fill","red").style("opacity",1),d3.select(this).select("circle").style("opacity",1)}).on("mouseout",function(){d3.select(this).select("path").style("fill","black").style("opacity",.5),d3.select(this).select("circle").style("opacity",.5)}).on("click",function(){t.play_demo()})}}},function(t,e){"use strict";t.exports=function(t,e){if(d3.select(t.root+" .demo_group").empty()){var r=d3.select(t.root+" .clust_container").attr("transform"),o=Number(r.split("(")[1].split(",")[0]),a=Number(r.split(",")[1].replace(")","")),n=d3.select(t.root+" .viz_svg").append("g").classed("demo_group",!0).attr("transform",function(){var t=o+20,e=a+40;return"translate("+t+","+e+")"});n.append("rect").classed("rect_1",!0),n.append("rect").classed("rect_2",!0),n.append("rect").classed("rect_3",!0);var i=1.3*e;n.append("text").attr("id","text_1").attr("font-size",e+"px").attr("font-weight",1e3).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif'),n.append("text").attr("id","text_2").attr("font-size",e+"px").attr("font-weight",1e3).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("transform",function(){return"translate(0,"+String(i)+")"}),n.append("text").attr("id","text_3").attr("font-size",e+"px").attr("font-weight",1e3).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("transform",function(){return"translate(0,"+String(2*i)+")"})}}},function(t,e,r){"use strict";var o=r(11),a=r(143);t.exports=function(t){var e=o(this.config,t);a(this,e)}},function(t,e,r){"use strict";var o=r(11),a=r(143);t.exports=function(t){var e,r=!(arguments.length<=1||void 0===arguments[1])&&arguments[1];e=r===!1?this:r;var n,i=e.params,s={};_.each(["row","col"],function(e){var r=i.inst_nodes[e+"_nodes"];if(_.has(t,e))if(t[e].length>0){var o=t[e];n=$.grep(r,function(t){return $.inArray(t.name,o)>-1})}else n=r;else n=r;s[e+"_nodes"]=n});var l=e.params.network_data.row_nodes,c=e.params.network_data.col_nodes,d=o(e.config,s);a(e,d),l.length>e.params.inst_nodes.row_nodes.length&&(e.params.inst_nodes.row_nodes=l),c.length>e.params.inst_nodes.col_nodes.length&&(e.params.inst_nodes.col_nodes=c)}},function(t,e,r){"use strict";var o=r(122),a=r(15),n=r(88),i=r(160);t.exports=function(t,e){null!=t.params.cat_update_callback&&t.params.cat_update_callback(this);var r=t.params.viz.cat_colors.col;i(e,t.params.network_data.row_nodes,!0),i(e,t.params.inst_nodes.row_nodes,!0),t.params=a(t.params,!1),o(t,!0),n(t),t.params.new_row_cats=e,t.params.viz.cat_colors.col=r}},function(t,e,r){"use strict";var o=r(122),a=r(15),n=r(88),i=r(160),s=r(176);t.exports=function(){var t=arguments.length<=0||void 0===arguments[0]||arguments[0],e=this,r=s(e),l=e.params.viz.cat_colors.col;if(i(r,e.params.network_data.row_nodes),i(r,e.params.inst_nodes.row_nodes),e.params.new_row_cats=r,e.params.viz.cat_colors.col=l,t){var c=!0;e.params=a(e.params,c),o(e,!0),n(e)}}},function(t,e){"use strict";t.exports=function(t){function e(t,e,a){r={},r.cat_title=t,r.cats=[],o={},o.cat_name=e,o.members=[],o.members.push(a),r.cats.push(o),p.push(r)}var r,o,a,n,i,s,l,c,d=t.config.network_data.row_nodes,u=": ",p=[],v=d[0],f=_.keys(v),m={};_.each(f,function(t){t.indexOf("cat-")>=0&&(s=v[t],c=parseInt(t.split("cat-")[1],10),l=s.indexOf(u)>=0?s.split(u)[0]:t,m[c]=l)});var h,g=_.keys(m).sort();return _.each(g,function(t){h={},h.cat_title=m[t],h.cats=[],p.push(h)}),_.each(d,function(t){var r=_.keys(t);_.each(r,function(r){if(r.indexOf("cat-")>-1){i=t[r],c=parseInt(r.split("cat-")[1],10);var s=r;i=t[r];var l=t[r],d=t.name;l.indexOf(u)>-1?(s=l.split(u)[0],i=l.split(u)[1]):(s=r,i=l),0===p.length?e(s,i,d):(a=!1,_.each(p,function(t){s===t.cat_title&&(a=!0,n=!1,_.each(t.cats,function(t){i===t.cat_name&&(n=!0,t.members.push(d))}),n===!1&&(o={},o.cat_name=i,o.members=[],o.members.push(d),t.cats.push(o)))}))}})}),p}},function(t,e,r){"use strict";var o=r(141),a=r(178);t.exports=function(t,e){var r=this,n={};n[t]=e,o(this,n),a(r,t,e)}},function(t,e,r){"use strict";var o=r(179);t.exports=function(t,e,r){var a,n,i=t.params;d3.select(i.root+" .slider_"+e).attr("current_state",r),_.each(_.keys(i.viz.possible_filters),function(r){if(a=e.indexOf("row")>-1?"row":e.indexOf("col")>-1?"col":"neither",n=r.indexOf("row")>-1?"row":r.indexOf("col")>-1?"col":"neither",e!=r&&"neither"!=a&&a==n){var s=o(i,r);t.slider_functions[r].value(0),d3.select(i.root+" .title_"+r).text(s.text+s.state),d3.select(i.root+" .slider_"+r).attr("current_state",s.state)}});var s=o(i,e);d3.select(i.root+" .title_"+e).text(s.text+r+s.suffix)}},function(t,e,r){"use strict";var o=r(5);t.exports=function(t,e){var r={},a={},n={};return r.state=o(t.viz.filter_data,e),n.top=e.split("_")[0],n.node=e.split("_")[1],n.measure=e.split("_")[2],"row"===n.node?a.node="rows":a.node="columns","N"===n.top&&(r.suffix=""),"pct"===n.top&&(r.suffix="%"),"sum"==n.measure?a.measure="sum":"var"==n.measure&&(a.measure="variance"),"sum"===n.measure&&(r.text="Top "+a.node+" "+a.measure+": "),"var"===n.measure&&(r.text="Top "+a.node+" "+a.measure+": "),_.keys(t.viz.possible_filters).indexOf("enr_score_type")>-1&&"col"===n.node&&(r.text="Top Enriched Terms: ",r.suffix=""),r}},function(t,e,r){"use strict";var o=r(181),a=r(182);t.exports=function(){var t=o(),e=this.params,r=a(e),n=new Blob([r],{type:"text/plain;charset=utf-8"});t(n,"clustergrammer.txt")}},function(t,e){"use strict";t.exports=function(){/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ -var t=t||navigator.msSaveBlob&&navigator.msSaveBlob.bind(navigator)||function(t){var e=t.document,r=function(){return t.URL||t.webkitURL||t},o=t.URL||t.webkitURL||t,a=e.createElementNS("http://www.w3.org/1999/xhtml","a"),n="download"in a,i=function(r){var o=e.createEvent("MouseEvents");o.initMouseEvent("click",!0,!1,t,0,0,0,0,0,!1,!1,!1,!1,0,null),r.dispatchEvent(o)},s=t.webkitRequestFileSystem,l=t.requestFileSystem||s||t.mozRequestFileSystem,c=function(e){(t.setImmediate||t.setTimeout)(function(){throw e},0)},d="application/octet-stream",_=0,u=[],p=function(){for(var t=u.length;t--;){var e=u[t];"string"==typeof e?o.revokeObjectURL(e):e.remove()}u.length=0},v=function(t,e,r){e=[].concat(e);for(var o=e.length;o--;){var a=t["on"+e[o]];if("function"==typeof a)try{a.call(t,r||t)}catch(n){c(n)}}},f=function(e,o){var c,p,f,m=this,h=e.type,g=!1,w=function(){var t=r().createObjectURL(e);return u.push(t),t},y=function(){v(m,"writestart progress write writeend".split(" "))},x=function(){!g&&c||(c=w(e)),p&&(p.location.href=c),m.readyState=m.DONE,y()},b=function(t){return function(){if(m.readyState!==m.DONE)return t.apply(this,arguments)}},z={create:!0,exclusive:!1};return m.readyState=m.INIT,o||(o="download"),n?(c=w(e),a.href=c,a.download=o,i(a),m.readyState=m.DONE,void y()):(t.chrome&&h&&h!==d&&(f=e.slice||e.webkitSlice,e=f.call(e,0,e.size,d),g=!0),s&&"download"!==o&&(o+=".download"),p=h===d||s?t:t.open(),l?(_+=e.size,void l(t.TEMPORARY,_,b(function(t){t.root.getDirectory("saved",z,b(function(t){var r=function(){t.getFile(o,z,b(function(t){t.createWriter(b(function(r){r.onwriteend=function(e){p.location.href=t.toURL(),u.push(t),m.readyState=m.DONE,v(m,"writeend",e)},r.onerror=function(){var t=r.error;t.code!==t.ABORT_ERR&&x()},"writestart progress write abort".split(" ").forEach(function(t){r["on"+t]=m["on"+t]}),r.write(e),m.abort=function(){r.abort(),m.readyState=m.DONE},m.readyState=m.WRITING}),x)}),x)};t.getFile(o,{create:!1},b(function(t){t.remove(),r()}),b(function(t){t.code===t.NOT_FOUND_ERR?r():x()}))}),x)}),x)):void x())},m=f.prototype,h=function(t,e){return new f(t,e)};return m.abort=function(){var t=this;t.readyState=t.DONE,v(t,"abort")},m.readyState=m.INIT=0,m.WRITING=1,m.DONE=2,m.error=m.onwritestart=m.onprogress=m.onwrite=m.onabort=m.onerror=m.onwriteend=null,t.addEventListener("unload",p,!1),h}(self);return t}},function(t,e,r){"use strict";var o=r(183);t.exports=function(t){var e,r=t.matrix,a={};_.each(["row","col"],function(o){var n;n="row"===o?"col":"row",e=t.inst_order[o],a[n]=r.orders[e+"_"+o]});for(var n="\t",i=t.network_data.row_nodes,s=t.network_data.col_nodes,l=0;l0){a="('"+a+"'";for(var i=0;ie&&(t=i[0],e=n[0]),r>o&&(r=i[1],o=n[1]),r-=a.viz.rect_height,t-=a.viz.rect_width;var s={};return s.row=[],s.col=[],_.each(a.matrix.matrix,function(t){var e=a.viz.y_scale(t.row_index);e>r&&et&&a=i[1])return;if(1===w)"array"==n(i)&&2==i.length&&("left"===_?d.style("left",l):d.style("bottom",l)),f?c.transition().styleTween(_,function(){return t.interpolate(a,l)}).duration("number"==typeof f?f:250):c.style(_,l);else{var u=100-parseFloat(l),p=100-parseFloat(l);"left"===_?d.style("right",u+"%"):d.style("top",p+"%"),f?k.transition().styleTween(_,function(){return t.interpolate(a,l)}).duration("number"==typeof f?f:250):k.style(_,l)}}}function o(t){if(t===s.domain()[0]||t===s.domain()[1])return t;var e=t;if(y)e=a(s(t));else{var r=(t-s.domain()[0])%v;e=t-r,2*Math.abs(r)>=v&&(e+=r>0?v:-v)}return e}function a(t){var e=s.ticks?s.ticks():s.domain(),r=e.map(function(e){return t-s(e)}),o=-1,a=0,n=s.ticks?s.range()[1]:s.rangeExtent()[1];do o++,Math.abs(r[o])0&&o-1)this._list=t.split(/\s*,\s*/);else if(t=a(t),t&&t.children){var e=[];l.apply(t.children).forEach(function(t){if(!t.disabled){var r=t.textContent.trim(),o=t.value||r,a=t.label||r;""!==o&&e.push({label:a,value:o})}}),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return!this.ul.hasAttribute("hidden")},close:function(t){this.opened&&(this.ul.setAttribute("hidden",""),this.index=-1,a.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.ul.removeAttribute("hidden"),this.autoFirst&&this.index===-1&&this["goto"](0),a.fire(this.input,"awesomplete-open")},next:function(){var t=this.ul.children.length;this["goto"](this.index-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.status.textContent=e[t].textContent,a.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e){if(t?this.index=a.siblingIndex(t):t=this.ul.children[this.index],t){var r=this.suggestions[this.index],o=a.fire(this.input,"awesomplete-select",{text:r,origin:e||t});o&&(this.replace(r),this.close({reason:"select"}),a.fire(this.input,"awesomplete-selectcomplete",{text:r}))}},evaluate:function(){var t=this,e=this.input.value;e.length>=this.minChars&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map(function(o){return new r(t.data(o,e))}).filter(function(r){return t.filter(r,e)}).sort(this.sort).slice(0,this.maxItems),this.suggestions.forEach(function(r){t.ul.appendChild(t.item(r,e))}),0===this.ul.children.length?this.close({reason:"nomatches"}):this.open()):this.close({reason:"nomatches"})}},s.all=[],s.FILTER_CONTAINS=function(t,e){return RegExp(a.regExpEscape(e.trim()),"i").test(t)},s.FILTER_STARTSWITH=function(t,e){return RegExp("^"+a.regExpEscape(e.trim()),"i").test(t)},s.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:t$&");return a.create("li",{innerHTML:r,"aria-selected":"false"})},s.REPLACE=function(t){this.input.value=t.value},s.DATA=function(t){return t},Object.defineProperty(r.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),r.prototype.toString=r.prototype.valueOf=function(){return""+this.label};var l=Array.prototype.slice;return a.create=function(t,e){var r=document.createElement(t);for(var o in e){var n=e[o];if("inside"===o)a(n).appendChild(r);else if("around"===o){var i=a(n);i.parentNode.insertBefore(r,i),r.appendChild(i)}else o in r?r[o]=n:r.setAttribute(o,n)}return r},a.bind=function(t,e){if(t)for(var r in e){var o=e[r];r.split(/\s+/).forEach(function(e){t.addEventListener(e,o)})}},a.fire=function(t,e,r){var o=document.createEvent("HTMLEvents");o.initEvent(e,!0,!0);for(var a in r)o[a]=r[a];return t.dispatchEvent(o)},a.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},a.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof Document&&("loading"!==document.readyState?i():document.addEventListener("DOMContentLoaded",i)),s.$=a,s.$$=n,"undefined"!=typeof self&&(self.Awesomplete=s),"object"===e(t)&&t.exports&&(t.exports=s),s}()}).call(e,r(189)(t))},function(t,e){"use strict";t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e,r){var o=r(191);"string"==typeof o&&(o=[[t.id,o,""]]);r(193)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,r){e=t.exports=r(192)(),e.push([t.id,".d3-slider{position:relative;font-family:Verdana,Arial,sans-serif;font-size:1.1em;border:1px solid #aaa;z-index:2}.d3-slider-horizontal{height:.8em}.d3-slider-range{height:.8em}.d3-slider-range,.d3-slider-range-vertical{background:#2980b9;left:0;right:0;position:absolute}.d3-slider-range-vertical{top:0}.d3-slider-vertical{width:.8em;height:100px}.d3-slider-handle{position:absolute;width:1.2em;height:1.2em;border:1px solid #d3d3d3;border-radius:4px;background:#eee;background:linear-gradient(180deg,#eee 0,#ddd);z-index:3}.d3-slider-handle:hover{border:1px solid #999}.d3-slider-horizontal .d3-slider-handle{top:-.3em;margin-left:-.6em}.d3-slider-axis{position:relative;z-index:1}.d3-slider-axis-bottom{top:.8em}.d3-slider-axis-right{left:.8em}.d3-slider-axis path{stroke-width:0;fill:none}.d3-slider-axis line{fill:none;stroke:#aaa;shape-rendering:crispEdges}.d3-slider-axis text{font-size:11px}.d3-slider-vertical .d3-slider-handle{left:-.25em;margin-left:0;margin-bottom:-.6em}",""])},function(t,e){"use strict";t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e=0&&w.splice(e,1)}function s(t){var e=document.createElement("style");return e.type="text/css",n(t,e),e}function l(t){var e=document.createElement("link");return e.rel="stylesheet",n(t,e),e}function c(t,e){var r,o,a;if(e.singleton){var n=g++;r=h||(h=s(e)),o=d.bind(null,r,n,!1),a=d.bind(null,r,n,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=l(e),o=u.bind(null,r),a=function(){i(r),r.href&&URL.revokeObjectURL(r.href)}):(r=s(e),o=_.bind(null,r),a=function(){i(r)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else a()}}function d(t,e,r,o){var a=r?"":o.css;if(t.styleSheet)t.styleSheet.cssText=y(e,a);else{var n=document.createTextNode(a),i=t.childNodes;i[e]&&t.removeChild(i[e]),i.length?t.insertBefore(n,i[e]):t.appendChild(n)}}function _(t,e){var r=e.css,o=e.media;if(o&&t.setAttribute("media",o),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}function u(t,e){var r=e.css,o=e.sourceMap;o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),n=t.href;t.href=URL.createObjectURL(a),n&&URL.revokeObjectURL(n)}var p={},v=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},f=v(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),m=v(function(){return document.head||document.getElementsByTagName("head")[0]}),h=null,g=0,w=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=f()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var r=a(t);return o(r,e),function(t){for(var n=[],i=0;iinput{display:block}div.awesomplete>ul{position:absolute;left:0;z-index:1;min-width:100%;box-sizing:border-box;list-style:none;padding:0;border-radius:.3em;margin:.2em 0 0;background:hsla(0,0%,100%,.9);background:linear-gradient(to bottom right,#fff,hsla(0,0%,100%,.8));border:1px solid rgba(0,0,0,.3);box-shadow:.05em .2em .6em rgba(0,0,0,.2);text-shadow:none}div.awesomplete>ul:empty,div.awesomplete>ul[hidden]{display:none}@supports (transform:scale(0)){div.awesomplete>ul{transition:.3s cubic-bezier(.4,.2,.5,1.4);transform-origin:1.43em -.43em}div.awesomplete>ul:empty,div.awesomplete>ul[hidden]{opacity:0;transform:scale(0);display:block;transition-timing-function:ease}}div.awesomplete>ul:before{content:"";position:absolute;top:-.43em;left:1em;width:0;height:0;padding:.4em;background:#fff;border:inherit;border-right:0;border-bottom:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}div.awesomplete>ul>li{position:relative;padding:.2em .5em;cursor:pointer}div.awesomplete>ul>li:hover{background:#b8d3e0;color:#000}div.awesomplete>ul>li[aria-selected=true]{background:#3d6d8f;color:#fff}div.awesomplete mark{background:#eaff00}div.awesomplete li:hover mark{background:#b5d100}div.awesomplete li[aria-selected=true] mark{background:#3d6b00;color:inherit}',""])},function(t,e,r){"use strict";var o=r(156),a=r(197),n=r(202),i=r(203),s=r(204),l=r(205),c=r(207),d=r(209);t.exports=function u(t){var e=t.params,u=d3.select(e.root+" .sidebar_wrapper");e.viz.is_expand&&u.style("display","none"),u.append("div").classed("title_section",!0),null!=e.sidebar.title&&u.select(".title_section").append("h4").style("margin-left","20px").style("margin-top","5px").style("margin-bottom","0px").text(e.sidebar.title),u.append("div").style("padding-right","2px").classed("about_section",!0),null!=e.sidebar.about&&u.select(".about_section").append("h5").classed("sidebar_text",!0).style("margin-left","7px").style("margin-top","5px").style("margin-bottom","2px").style("text-align","justify").html(e.sidebar.about),u.append("div").classed("icons_section",!0).style("text-align","center"),t.params.make_modals&&c(e),e.sidebar.icons&&l(t,u),i(e,u),n(u,e),d(u);var r=_.keys(e.viz.possible_filters);r.indexOf("enr_score_type")>-1&&r.sort(function(t,e){return t.toLowerCase().localeCompare(e.toLowerCase())}),t.slider_functions={},_.each(r,function(e){a(t,e)}),o(t),null!==e.ini_view&&(s(e),e.ini_view=null)}},function(t,e,r){"use strict";var o=r(198),a=r(201);t.exports=function(t,e){var r=t.params,n=d3.select(r.root+" .sidebar_wrapper").append("div").classed("div_filters",!0).style("padding-left","10px").style("padding-right","10px");"numerical"==r.viz.possible_filters[e]?o(t,e,n):"categorical"==r.viz.possible_filters[e]&&a(t,e,n)}},function(t,e,r){"use strict";var o=r(179),a=r(199),n=r(5),i=r(12);d3.slider=r(186),t.exports=function(t,e,r){var s=t.params,l={},c=_.keys(s.viz.possible_filters);_.each(c,function(t){if(t!=e){var r=n(s.viz.filter_data,t);l[t]=r}});var d=o(s,e);r.append("div").classed("title_"+e,!0).classed("sidebar_text",!0).classed("slider_description",!0).style("margin-top","5px").style("margin-bottom","3px").text(d.text+d.state+d.suffix),r.append("div").classed("slider_"+e,!0).classed("slider",!0).attr("current_state",d.state);var u=s.network_data.views,p=i(s,u,l);p=p.sort(function(t,r){return r[e]-t[e]});var v=p.length-1,f=0;if(null!==s.requested_view&&e in s.requested_view){var m=s.requested_view[e];if("all"!=m){var h=p.map(function(t){return t[e]}).indexOf(m);h>0&&(f=h)}}var g=d3.slider().value(f).min(0).max(v).step(1).on("slide",function(r,o){w(t,e,p,o)}).on("slideend",function(r,o){w(t,e,p,o)});t.slider_functions[e]=g,d3.select(t.params.root+" .slider_"+e).call(g);var w=_.debounce(a,800)}},function(t,e,r){"use strict";var o=r(141),a=r(178),n=r(200),i=r(14);t.exports=function(t,e,r,s){if(d3.select(t.params.viz.viz_svg).classed("running_update")===!1){var l=t.params,c=r[s][e];a(t,e,c),l=n(l);var d={};if(d[e]=c,d=i(l,d),_.has(r[0],"enr_score_type")){var u=d3.select(l.root+" .toggle_enr_score_type").attr("current_state");d.enr_score_type=u}o(t,d)}}},function(t,e){"use strict";t.exports=function(t){var e;return _.each(["row","col"],function(r){e="row"===r?"col":"row",d3.select(t.root+" .toggle_"+e+"_order .active").empty()===!1?t.viz.inst_order[r]=d3.select(t.root+" .toggle_"+e+"_order").select(".active").attr("name"):t.viz.inst_order[r]="clust"}),t}},function(t,e,r){"use strict";var o=r(14);t.exports=function(t,e,r,a){var n=a.append("div").classed("categorical_filter",!0).classed("toggle_"+r,!0).classed("btn-group-vertical",!0).style("width","100%").style("margin-top","10px").attr("current_state","combined_score"),i=e.viz.filter_data[r],s={combined_score:"Combined Score",pval:"P-Value",zscore:"Z-score"};n.selectAll("button").data(i).enter().append("button").attr("type","button").classed("btn",!0).classed("btn-primary",!0).classed(".filter_button",!0).classed("active",function(t){var e=!1;return"combined_score"==t&&(e=!0),e}).attr("name",function(t){return t}).html(function(t){return s[t]}),$(e.root+" .categorical_filter .btn").off().click(function(){d3.selectAll(e.root+" .categorical_filter .btn").classed("active",!1),d3.select(this).classed("active",!0);var t=d3.select(this).attr("name"),r={enr_score_type:t};o(e,r),d3.select(e.root+" .toggle_enr_score_type").attr("current_state",t)})}},function(t,e){"use strict";t.exports=function(t,e){var r=t.append("div").classed("gene_search_container",!0).style("padding-left","10px").style("padding-right","10px").style("margin-top","10px");r.append("input").classed("form-control",!0).classed("gene_search_box",!0).classed("sidebar_text",!0).attr("type","text").attr("placeholder",e.sidebar.row_search.placeholder).style("height",e.sidebar.row_search.box.height+"px").style("margin-top","10px"),r.append("div").classed("gene_search_button",!0).style("margin-top","5px").attr("data-toggle","buttons").append("button").classed("sidebar_text",!0).html("Search").attr("type","button").classed("btn",!0).classed("btn-primary",!0).classed("submit_gene_button",!0).style("width","100%").style("font-size","14px")}},function(t,e){"use strict";t.exports=function(t,e){var r,o,a,n,i,s={row:"Row",col:"Column",both:""},l=e.append("div").style("padding-left","10px").style("padding-right","10px").classed("reorder_section",!0);i=t.sim_mat?["both"]:["row","col"],_.each(i,function(e){r={clust:"Cluster",rank:"Rank by Sum",rankvar:"Rank by Variance",ini:"Initial Order",alpha:"Alphabetically"};var i;i="row"===e?"col":"row",o=Object.keys(t.matrix.orders);var c=[];_.each(o,function(t){t.indexOf(i)>-1&&(t=t.replace("_row","").replace("_col",""),t.indexOf("cat_")<0&&c.push(t))}),_.keys(t.viz.filter_data).indexOf("enr_score_type")>-1&&(c=["clust","rank"]),c=_.uniq(c),c=c.sort();var d;d="both"!=e?" Order":"Reorder Matrix",l.append("div").classed("sidebar_button_text",!0).style("clear","both").style("margin-top","10px").html(s[e]+d),n=l.append("div").classed("btn-group-vertical",!0).style("width","100%").classed("toggle_"+e+"_order",!0).attr("role","group"),n.selectAll(".button").data(c).enter().append("button").attr("type","button").classed("btn",!0).classed("btn-primary",!0).classed("sidebar_button_text",!0).classed("active",function(e){return a=!1,e==t.viz.inst_order[i]&&(a=!0),a}).attr("name",function(t){return t}).html(function(t){return r[t]})})}},function(t,e,r){"use strict";var o=r(179);t.exports=function(t){_.each(_.keys(t.ini_view),function(e){var r=t.ini_view[e],a=t.viz.possible_filters[e];if("numerical"===a){"all"!=r&&(r=parseInt(r,10)),t.viz.filter_data[e].indexOf(r)<=-1&&(r="all");var n=o(t,e);d3.select(t.root+" .title_"+e).text(n.text+r+n.suffix),d3.select(t.root+" .slider_"+e).attr("current_state",r)}})}},function(t,e,r){"use strict";var o=r(181),a=r(80),n=r(185),i=r(206);t.exports=function(t,e){function r(){d3.select(s.root+" .expand_button").style("opacity",0);var t=d3.select(s.root+" svg").attr("title","test2").attr("version",1.1).attr("xmlns","http://www.w3.org/2000/svg").node().parentNode.innerHTML,e=new Blob([t],{type:"image/svg+xml"});l(e,"clustergrammer.svg"),d3.select(s.root+" .expand_button").style("opacity",.4)}var s=t.params,l=o(),c=e.select(".icons_section").style("margin-top","7px").style("margin-left","5%"),d="22%",_="0px",u="0px";c.append("div").classed("clust_icon",!0).style("float","left").style("width",d).style("padding-left",_).style("padding-right",u).append("i").classed("fa",!0).classed("fa-share-alt",!0).classed("icon_buttons",!0).style("font-size","25px").on("click",function(){$(s.root+" .share_info").modal("toggle"),$(".share_url").val(window.location.href)}).classed("sidebar_tooltip",!0).append("span").classed("sidebar_tooltip_text",!0).html("Share").style("left","0%"),c.append("div").classed("clust_icon",!0).style("float","left").style("width",d).style("padding-left",_).style("padding-right",u).append("i").classed("fa",!0).classed("fa-camera",!0).classed("icon_buttons",!0).style("font-size","25px").on("click",function(){$(s.root+" .picture_info").modal("toggle")}).classed("sidebar_tooltip",!0).append("span").classed("sidebar_tooltip_text",!0).html("Take snapshot").style("left","-100%"),c.append("div").classed("clust_icon",!0).style("float","left").style("width",d).style("padding-left",_).style("padding-right",u).append("i").classed("fa",!0).classed("fa fa-cloud-download",!0).classed("icon_buttons",!0).style("font-size","25px").on("click",function(){t.save_matrix()}).classed("sidebar_tooltip",!0).append("span").classed("sidebar_tooltip_text",!0).html("Download matrix").style("left","-200%"),c.append("div").classed("clust_icon",!0).style("float","left").style("width",d).style("padding-left",_).style("padding-right","-5px").append("i").classed("fa",!0).classed("fa-crop",!0).classed("crop_button",!0).classed("icon_buttons",!0).style("font-size","25px").on("click",function(){if(t.params.dendro_filter.row===!1&&t.params.dendro_filter.col===!1){var e=d3.select(this).classed("fa-crop"),r=d3.select(this).classed("fa-undo");e&&(t.params.crop_filter_nodes={},t.params.crop_filter_nodes.row_nodes=t.params.network_data.row_nodes,t.params.crop_filter_nodes.col_nodes=t.params.network_data.col_nodes,t.brush_crop_matrix(),d3.select(this).classed("active_cropping")===!1?d3.select(this).classed("active_cropping",!0).style("color","red"):(d3.select(this).classed("active_cropping",!1).style("color","#337ab7"),n(t))),r&&(d3.select(s.root+" .crop_button").style("color","#337ab7").classed("fa-crop",!0).classed("fa-undo",!1),t.filter_viz_using_nodes(t.params.crop_filter_nodes),d3.select(t.params.root+" .col_dendro_icons_container").style("display","block"),d3.select(t.params.root+" .row_dendro_icons_container").style("display","block")),a(t,0,0,1)}}).classed("sidebar_tooltip",!0).append("span").classed("sidebar_tooltip_text",!0).html("Crop matrix").style("left","-400%"),d3.select(s.root+" .download_buttons").append("p").append("a").html("Download SVG").on("click",function(){r()});var p="svg_"+s.root.replace("#","");d3.select(s.root+" .download_buttons").append("p").append("a").html("Download PNG").on("click",function(){d3.select(s.root+" .expand_button").style("opacity",0),i.saveSvgAsPng(document.getElementById(p),"clustergrammer.png"),d3.select(s.root+" .expand_button").style("opacity",.4)})}},function(t,e,r){var o;!function(){function a(t){ +module.exports=function(t){function e(o){if(r[o])return r[o].exports;var a=r[o]={exports:{},id:o,loaded:!1};return t[o].call(a.exports,a,a.exports,e),a.loaded=!0,a.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function o(t){function e(){d3.select(E.params.viz.viz_svg).style("opacity",.5);var t=500;this.params.viz.run_trans===!0&&(t=2500),setTimeout(o,t,this)}function o(t){s(t)}function b(t){u(this,t)}function z(t,e,r){v(this,t,e,r)}function k(){return w}function A(t,e){"sum"===e&&(e="rank"),"var"===e&&(e="rankvar"),y(this,e,t)}function T(){return x(this.params)}var S=a(t),E={};if(E.params=n(S),E.config=S,E.params.zoom_behavior=d3.behavior.zoom().scaleExtent([1,E.params.viz.square_zoom*E.params.viz.zoom_ratio.x]).on("zoom",function(){g(E)}),E.params.zoom_behavior.translate([E.params.viz.clust.margin.left,E.params.viz.clust.margin.top]),E.params.use_sidebar){var B=r(196);B(E)}return i(E),E.update_view=f,E.resize_viz=e,E.play_demo=l,E.ini_demo=c,E.filter_viz_using_nodes=d,E.filter_viz_using_names=_,E.update_cats=b,E.reset_cats=p,E.zoom=z,E.save_matrix=m,E.brush_crop_matrix=h,E.d3_tip_custom=k,E.reorder=A,E.export_matrix_string=T,E}var a=r(1),n=r(9),i=r(37),s=r(88),l=r(129),c=r(169),d=r(172),_=r(173),u=r(174),p=r(175),v=r(80),f=r(177),m=r(180),h=r(184),g=r(89),w=r(48),y=r(79),x=r(182);d3.slider=r(186);r(188);r(190),r(194),t.exports=o},function(t,e,r){"use strict";var o=r(2),a=r(3),n=r(4),i=r(5),s=r(6),l=r(7),c=r(8);t.exports=function(t){var e=s(),r=o.extend(e,t);r.network_data=t.network_data;var d=": ";_.each(["row","col"],function(t){var e=r.network_data[t+"_nodes"],o=c(e);e.forEach(function(e,a){e[t+"_index"]=a,o&&(r.super_labels=!0,r["super"][t]=e.name.split(d)[0],e.name=e.name.split(d)[1]),e.name=String(e.name),e.name=e.name.replace(/_/g," ")})}),r.network_data.row_nodes_names=o.pluck(r.network_data.row_nodes,"name"),r.network_data.col_nodes_names=o.pluck(r.network_data.col_nodes,"name"),r.sim_mat=l(r);var u=n(r.network_data.views),p={};_.each(_.keys(u.possible_filters),function(t){var e=i(u.filter_data,t);p[t]=e}),_.has(r.network_data,"views")&&r.network_data.views.forEach(function(t){_.each(_.keys(u.possible_filters),function(e){_.has(t,e)||(t[e]=p[e])});var e=t.nodes;_.each(["row","col"],function(t){var r=c(e[t+"_nodes"]);e[t+"_nodes"].forEach(function(e,o){e[t+"_index"]=o,r&&(e.name=e.name.split(d)[1]),e.name=String(e.name),e.name=e.name.replace(/_/g," ")})})});var v=r.network_data.col_nodes,f=r.network_data.row_nodes;if(_.has(r.network_data,"mat")){for(var m=[],h=r.network_data.mat,g={},w=0;w1&&(e[t]=n)});var a={};return a.possible_filters=e,a.filter_data=r,a}},function(t,e){"use strict";t.exports=function(t,e){var r=t[e].sort(function(t,e){return e-t})[0];return r=String(r)}},function(t,e){"use strict";t.exports=function(){var t={row_label_scale:1,col_label_scale:1,super_labels:!1,"super":{},show_label_tooltips:!0,show_tile_tooltips:!0,transpose:!1,tile_colors:["#FF0000","#1C86EE"],bar_colors:["#FF0000","#1C86EE"],cat_value_colors:["#2F4F4F","#9370DB"],outline_colors:["orange","black"],highlight_color:"#FFFF00",tile_title:!1,input_domain:0,opacity_scale:"linear",do_zoom:!0,is_zoom:0,is_slider_drag:!1,is_cropping:!1,background_color:"#FFFFFF",super_border_color:"#F5F5F5",outer_margins:{top:0,bottom:0,left:0,right:0},ini_expand:!1,grey_border_width:2,tile_click_hlight:!1,super_label_scale:1,make_tile_tooltip:function(t){return t.info},ini_view:null,requested_view:null,use_sidebar:!0,title:null,about:null,sidebar_width:160,sidebar_icons:!0,row_search_placeholder:"Row",buffer_width:10,show_sim_mat:!1,cat_colors:null,resize:!0,clamp_opacity:.85,expand_button:!0,max_allow_fs:20,dendro_filter:{row:!1,col:!1},cat_filter:{row:!1,col:!1},crop_filter_nodes:{row:!1,col:!1},row_tip_callback:null,col_tip_callback:null,tile_tip_callback:null,matrix_update_callback:null,cat_update_callback:null,dendro_callback:null,dendro_click_callback:null,new_row_cats:null,make_modals:!0,show_viz_border:!1};return t}},function(t,e){"use strict";t.exports=function(t){var e=!1,r=t.network_data.row_nodes_names.length,o=t.network_data.col_nodes_names.length;if(r==o){var a=t.network_data.row_nodes_names,n=t.network_data.col_nodes_names;e=!0,_.each(a,function(t){var r=a.indexOf(t);t!==n[r]&&(e=!1)})}return e&&(t.expand_button=!1),e}},function(t,e){"use strict";t.exports=function(t){var e=": ",r=!0;return _.each(t,function(t){var o=String(t.name);o.indexOf(e)<0&&(r=!1)}),r}},function(t,e,r){"use strict";var o=r(10),a=r(13),n=r(14),i=r(4),s=r(15),l=r(36);t.exports=function(t){var e=$.extend(!0,{},t),r=e;if(r.inst_nodes={},r.inst_nodes.row_nodes=r.network_data.row_nodes,r.inst_nodes.col_nodes=r.network_data.col_nodes,null!==r.ini_view){var c=r.ini_view,d=i(r.network_data.views);r.viz={},r.viz.possible_filters=d.possible_filters,r.viz.filter_data=d.filter_data,c=n(r,c),r.network_data=o(e,r,c),r.requested_view=c}return r=s(r),r.use_sidebar&&(r.sidebar=a(r)),r.zoom_info=l(),r}},function(t,e,r){"use strict";var o=r(11),a=r(12);t.exports=function(t,e,r){var n=t.network_data.views,i=!1;_.has(n[0],"enr_score_type")&&(i=!0);var s=a(e,n,r);i&&0==s.length&&(r={N_row_sum:"all",N_col_sum:"10"},s=a(e,n,r));var l,c=s[0];if("undefined"!=typeof c){var d=c.nodes;l=o(t,d)}else l=t.network_data;return l}},function(t,e,r){"use strict";var o=r(2);t.exports=function(t,e){var r=t.network_data.links,a=o.pluck(e.row_nodes,"name"),n=o.pluck(e.col_nodes,"name"),i=_.filter(r,function(t){var e=t.name.split("_")[0],r=t.name.split("_")[1],o=_.indexOf(a,e),i=_.indexOf(n,r);if(o>-1&i>-1)return t.source=o,t.target=i,t}),s={};return s.row_nodes=e.row_nodes,s.row_nodes_names=a,s.col_nodes=e.col_nodes,s.col_nodes_names=n,s.links=i,s.all_links=r,s.views=t.network_data.views,_.has(t.network_data,"cat_colors")&&(s.cat_colors=t.network_data.cat_colors),s}},function(t,e,r){"use strict";var o=r(2),a=r(5);t.exports=function(t,e,r){var n,i,s=_.keys(r);_.each(s,function(t){n=r[t],/[^a-z_]/i.test(n)&&(n=parseInt(n,10)),i=!1,_.each(e,function(e){o.has(e,t)&&(i=!0)}),i&&(e=_.filter(e,function(e){return e[t]==n}))});var l,c,d=[],u=!1;return _.each(e,function(e){l=!0,_.each(_.keys(t.viz.possible_filters),function(r){c=a(t.viz.filter_data,r),e[r]!=c&&(l=!1)}),l?u===!1&&(u=!0,d.push(e)):d.push(e)}),d}},function(t,e){"use strict";t.exports=function(t){var e={};return e.wrapper={},e.row_search={},e.row_search.box={},e.row_search.box.height=34,e.row_search.box.width=95,e.row_search.placeholder=t.row_search_placeholder,e.row_search.margin_left=7,e.slider={},e.slider.width=t.sidebar_width-30,e.slider.margin_left=15,e.key_cat={},e.key_cat.width=t.sidebar_width-15,e.key_cat.margin_left=5,e.key_cat.max_height=100,e.title=t.title,e.title_margin_left=7,e.about=t.about,e.width=t.sidebar_width,e.buttons={},e.buttons.width=t.sidebar_width-15,e.text={},e.icons=t.sidebar_icons,e.icon_margin_left=-5,e}},function(t,e){"use strict";t.exports=function(t,e){var r=_.keys(e)[0];return _.each(_.keys(t.viz.possible_filters),function(o){if(o!=r&&!d3.select(t.root+" .slider_"+o).empty()){var a=d3.select(t.root+" .slider_"+o).attr("current_state");e[o]=a}}),e}},function(t,e,r){"use strict";var o=r(16),a=r(17),n=r(19),i=r(20),s=r(21),l=r(22),c=r(23),d=r(24),u=r(29),p=r(31),v=r(2),f=r(4),m=r(32);t.exports=function(t){function e(t){var e=arguments.length<=1||void 0===arguments[1]||arguments[1],r={};r.root=t.root,r.root_tips=t.root.replace("#",".")+"_d3-tip",r.viz_wrapper=t.root+" .viz_wrapper",r.do_zoom=t.do_zoom,r.background_color=t.background_color,r.super_border_color=t.super_border_color,r.outer_margins=t.outer_margins,r.is_expand=t.ini_expand,r.grey_border_width=t.grey_border_width,r.show_dendrogram=t.show_dendrogram,r.tile_click_hlight=t.tile_click_hlight,r.inst_order=t.inst_order,r.expand_button=t.expand_button,r.sim_mat=t.sim_mat,r.dendro_filter=t.dendro_filter,r.cat_filter=t.cat_filter,r.cat_value_colors=t.cat_value_colors,r.viz_svg=r.viz_wrapper+" .viz_svg",r.zoom_element=r.viz_wrapper+" .viz_svg",r.uni_duration=1e3,r.bottom_space=10,r.run_trans=!1,r.duration=1e3,r.resize=t.resize,v.has(t,"size")?r.fixed_size=t.size:r.fixed_size=!1,r.border_fraction=65,r.uni_margin=5,r.super_labels={},r.super_labels.margin={},r.super_labels.dim={},r.super_labels.margin.left=r.grey_border_width,r.super_labels.margin.top=r.grey_border_width,r.super_labels.dim.width=0,t.labels.super_labels&&(r.super_labels.dim.width=15*t.labels.super_label_scale),r.triangle_opacity=.6,r.norm_labels={},r.norm_labels.width={},r.dendro_room={},r.show_dendrogram?r.dendro_room.symbol_width=10:r.dendro_room.symbol_width=0,r.cat_colors=t.cat_colors,r=m(t,r,e),0==_.has(t,"group_level")&&(r.show_dendrogram&&(t.group_level={}),t.group_level.row=5,t.group_level.col=5),r.dendro_opacity=.35,r.spillover_col_slant=r.norm_labels.width.col;var o=f(t.network_data.views);return r.possible_filters=o.possible_filters,r.filter_data=o.filter_data,r.viz_nodes={},r.viz_nodes.row=t.network_data.row_nodes_names,r.viz_nodes.col=t.network_data.col_nodes_names,r.viz_nodes.curr_row=t.network_data.row_nodes_names,r.viz_nodes.curr_col=t.network_data.col_nodes_names,r.x_offset=0,r}var r=arguments.length<=1||void 0===arguments[1]||arguments[1];return t.labels=o(t),t.viz=e(t,r),a(t),t=n(t),t.viz=i(t.viz),t.viz=s(t.viz),t.viz=l(t.viz),t.sim_mat&&(t.viz.clust.dim.width<=t.viz.clust.dim.height?t.viz.clust.dim.height=t.viz.clust.dim.width:t.viz.clust.dim.width=t.viz.clust.dim.height),t=c(t),t=d(t),t=u(t),t=p(t)}},function(t,e){"use strict";t.exports=function(t){var e={};return e.super_label_scale=t.super_label_scale,e.super_labels=t.super_labels,e.super_label_fs=13.8,e.super_labels&&(e["super"]={},e["super"].row=t["super"].row,e["super"].col=t["super"].col),e.show_label_tooltips=t.show_label_tooltips,e.row_max_char=_.max(t.network_data.row_nodes,function(t){return t.name.length}).name.length,e.col_max_char=_.max(t.network_data.col_nodes,function(t){return t.name.length}).name.length,e.max_allow_fs=t.max_allow_fs,e}},function(t,e,r){"use strict";var o=r(18);t.exports=function(t){d3.select(t.root+" .viz_wrapper").empty()&&(d3.select(t.root).append("div").classed("sidebar_wrapper",!0),d3.select(t.root).append("div").classed("viz_wrapper",!0));var e=o(t);d3.select(t.root+" .sidebar_wrapper").style("float","left").style("width",t.sidebar_width+"px").style("height",e.height+"px").style("overflow","hidden"),d3.select(t.viz.viz_wrapper).style("float","left").style("width",e.width+"px").style("height",e.height+"px")}},function(t,e){"use strict";t.exports=function(t){var e,r={},o=t.buffer_width,a=d3.select(t.root).style("width").replace("px",""),n=d3.select(t.root).style("height").replace("px","");return t.viz.is_expand===!1?(e=t.viz.outer_margins,r.width=a-t.sidebar_width-o):(e=t.viz.outer_margins,r.width=a-o),r.top=e.top,r.left=e.left,t.viz.resize?r.height=n:(t.viz.is_expand?r.width=t.viz.fixed_size.width:r.width=t.viz.fixed_size.width-t.sidebar_width,r.height=t.viz.fixed_size.height),r}},function(t,e){"use strict";t.exports=function(t){return t.viz.svg_dim={},t.viz.svg_dim.width=Number(d3.select(t.viz.viz_wrapper).style("width").replace("px","")),t.viz.svg_dim.height=Number(d3.select(t.viz.viz_wrapper).style("height").replace("px","")),t}},function(t,e){"use strict";t.exports=function(t){return t.norm_labels.margin={},t.norm_labels.margin.left=t.super_labels.margin.left+t.super_labels.dim.width,t.norm_labels.margin.top=t.super_labels.margin.top+t.super_labels.dim.width,t.label_background={},t.label_background.row=t.norm_labels.width.row+t.cat_room.row+t.uni_margin,t.label_background.col=t.norm_labels.width.col+t.cat_room.col+t.uni_margin,t}},function(t,e){"use strict";t.exports=function(t){t.clust={},t.clust.margin={},t.clust.margin.left=t.norm_labels.margin.left+t.norm_labels.width.row+t.cat_room.row+t.uni_margin,t.clust.margin.top=t.norm_labels.margin.top+t.norm_labels.width.col+t.cat_room.col+t.uni_margin;var e=t.svg_dim.width-t.clust.margin.left-t.spillover_col_slant,r=d3.scale.ordinal().rangeBands([0,e]).domain(_.range(t.num_col_nodes)),o=r.rangeBand()/2;if(o>t.norm_labels.width.col){var a=t.norm_labels.width.col/o;e*=a}return t.clust.dim={},t.clust.dim.width=e,t}},function(t,e){"use strict";t.exports=function(t){var e=t.svg_dim.height-t.clust.margin.top-t.dendro_room.col-t.bottom_space;return t.clust.dim.height=e,t}},function(t,e){"use strict";t.exports=function(t){var e=Math.abs(_.max(t.network_data.col_nodes,function(t){return Math.abs(t.value)}).value);return t.labels.bar_scale_col=d3.scale.linear().domain([0,e]).range([0,.75*t.viz.norm_labels.width.col]),e=Math.abs(_.max(t.network_data.row_nodes,function(t){return Math.abs(t.value)}).value),t.labels.bar_scale_row=d3.scale.linear().domain([0,e]).range([0,t.viz.norm_labels.width.row]),t}},function(t,e,r){"use strict";var o=r(25),a=r(27);t.exports=function(t){t.matrix=o(t),t.viz.x_scale=d3.scale.ordinal().rangeBands([0,t.viz.clust.dim.width]),t.viz.y_scale=d3.scale.ordinal().rangeBands([0,t.viz.clust.dim.height]);var e;return _.each(["row","col"],function(r){e=t.viz.inst_order[r],"custom"===e&&(e="clust"),"row"===r?t.viz.x_scale.domain(t.matrix.orders[e+"_"+r]):t.viz.y_scale.domain(t.matrix.orders[e+"_"+r])}),t.viz.border_width={},t.viz.border_width.x=t.viz.x_scale.rangeBand()/t.viz.border_fraction,t.viz.border_width.y=t.viz.y_scale.rangeBand()/t.viz.border_fraction,t.viz.rect_width=t.viz.x_scale.rangeBand()-t.viz.border_width.x,t.viz.rect_height=t.viz.y_scale.rangeBand()-t.viz.border_width.y,a(t),t}},function(t,e,r){"use strict";var o=r(2),a=r(26);t.exports=function(t){var e={},r=t.network_data;e.tile_colors=t.tile_colors,e.bar_colors=t.bar_colors,e.outline_colors=t.outline_colors,e.hlight_color=t.highlight_color,e.tile_title=t.tile_title,e.show_tile_tooltips=t.show_tile_tooltips,e.make_tile_tooltip=t.make_tile_tooltip,e.click_hlight_x=-666,e.click_hlight_y=-666,e.click_hlight_row=-666,e.click_hlight_col=-666,e.def_large_matrix=1e4,e.opacity_function=t.opacity_scale,e.orders={},_.each(["row","col"],function(a){var n;n="row"===a?"col":"row";var i=r[n+"_nodes"],s=i.length,l=o.pluck(i,"name"),c=l.sort(),d=_.map(c,function(t){return r[n+"_nodes_names"].indexOf(t)});e.orders["alpha_"+a]=d;var u=["clust","rank"];_.has(i[0],"rankvar")&&u.push("rankvar"),t.viz.all_cats[n].length>0&&_.each(t.viz.all_cats[n],function(t){t=t.replace("-","_"),u.push(t+"_index")}),_.each(u,function(t){var r=d3.range(s).sort(function(e,r){return i[r][t]-i[e][t]});e.orders[t+"_"+a]=r})}),o.has(r,"all_links")?e.max_link=_.max(r.all_links,function(t){return Math.abs(t.value)}).value:e.max_link=_.max(r.links,function(t){return Math.abs(t.value)}).value,e.abs_max_val=Math.abs(e.max_link)*t.clamp_opacity,0===t.input_domain?"linear"===e.opacity_function?e.opacity_scale=d3.scale.linear().domain([0,e.abs_max_val]).clamp(!0).range([0,1]):"log"===e.opacity_function&&(e.opacity_scale=d3.scale.log().domain([.001,e.abs_max_val]).clamp(!0).range([0,1])):"linear"===e.opacity_function?e.opacity_scale=d3.scale.linear().domain([0,t.input_domain]).clamp(!0).range([0,1]):"log"===e.opacity_function&&(e.opacity_scale=d3.scale.log().domain([.001,t.input_domain]).clamp(!0).range([0,1]));var n=o.has(r.links[0],"value_up"),i=o.has(r.links[0],"value_dn");return n||i?e.tile_type="updn":e.tile_type="simple",o.has(r.links[0],"highlight")?e.highlight=1:e.highlight=0,e.matrix=a(r),e.wait_tooltip=0,e}},function(t,e,r){"use strict";var o=r(2);t.exports=function(t){var e,r,a=[];return r=!!o.has(t.links[0],"value_orig"),t.row_nodes.forEach(function(n,i){a[i]={},a[i].name=t.row_nodes[i].name,a[i].row_index=i,a[i].row_data=d3.range(t.col_nodes.length).map(function(a){return e=o.has(t.links[0],"value_up")||o.has(t.links[0],"value_dn")?{pos_x:a,pos_y:i,value:0,value_up:0,value_dn:0,highlight:0}:{pos_x:a,pos_y:i,value:0,highlight:0},r&&(e.value_orig=0),e})}),t.links.forEach(function(t){a[t.source].row_data[t.target].value=t.value,a[t.source].row_data[t.target].row_name=t.row_name,a[t.source].row_data[t.target].col_name=t.col_name,(o.has(t,"value_up")||o.has(t,"value_dn"))&&(a[t.source].row_data[t.target].value_up=t.value_up,a[t.source].row_data[t.target].value_dn=t.value_dn),r&&(a[t.source].row_data[t.target].value_orig=t.value_orig),t.highlight&&(a[t.source].row_data[t.target].highlight=t.highlight),t.info&&(a[t.source].row_data[t.target].info=t.info)}),a}},function(t,e,r){"use strict";var o=r(28);t.exports=function(t){var e=3,r=2,a=e/t.viz.rect_height,n=2;t.viz.ds_zt=n;var i=Math.floor(Math.log(a)/Math.log(n));if(t.viz.rect_height0){var s=2;t.viz.ds_opacity_scale=d3.scale.linear().domain([1,100]).range([1,s]).clamp(!0);var l;t.viz.ds_num_levels=i,t.viz.ds=[],t.matrix.ds_matrix=[];for(var c=t.viz.inst_order.row,d=$.extend(!0,{},t.matrix.matrix),_=0;_t.labels.max_allow_fs&&(t.labels.default_fs_row=t.labels.max_allow_fs),t.labels.default_fs_col>t.labels.max_allow_fs&&(t.labels.default_fs_col=t.labels.max_allow_fs),t}},function(t,e,r){"use strict";var o=r(33),a=r(2),n=r(34),i=r(35);t.exports=function(t,e){var r,s,l,c=arguments.length<=2||void 0===arguments[2]||arguments[2],d=": ";e.show_categories={},e.all_cats={},e.cat_names={},e.cat_info={};var u={};u.row=null,u.col=null,e.cat_colors={},e.cat_colors.value_opacity=u;var p=0;return _.each(["row","col"],function(o){e.show_categories[o]=!1,e.all_cats[o]=[];var u=_.keys(t.network_data[o+"_nodes"][0]);u=u.sort(),_.each(u,function(t){t.indexOf("cat-")>=0&&(e.show_categories[o]=!0,e.all_cats[o].push(t))}),e.cat_info[o]=null,e.show_categories[o]&&(e.cat_colors[o]={},e.cat_info[o]={},e.cat_names[o]={},_.each(e.all_cats[o],function(c){var u=t.network_data[o+"_nodes"][0];"string"==typeof u[c]&&u[c].indexOf(d)>0?(r=u[c].split(d)[0],e.cat_names[o][c]=r):e.cat_names[o][c]=c;var v=a.pluck(t.network_data[o+"_nodes"],c),f=_.uniq(v).sort();if(s=i(f),"cat_strings"===s.type){var m=_.countBy(v);s.cat_hist=m}else s.cat_hist=null;e.cat_info[o][c]=s,e.cat_colors[o][c]={},_.each(f,function(t,r){l=n.get_random_color(r+p),e.cat_colors[o][c][t]=l,"string"==typeof t&&(t.indexOf("Not ")>=0||t.indexOf(": false")>0)&&(e.cat_colors[o][c][t]="#eee"),p+=1})})),_.has(t.network_data,"cat_colors")&&c===!0&&(e.cat_colors[o]=t.network_data.cat_colors[o]),t.sim_mat&&(e.cat_colors.col=e.cat_colors.row)}),e.cat_colors=e.cat_colors,e.cat_colors.opacity=.6,e.cat_colors.active_opacity=.9,e=o(t,e)}},function(t,e){"use strict";t.exports=function(t,e){var r,o=d3.scale.linear().domain([5,15]).range([85,120]).clamp("true");return e.cat_room={},e.cat_room.symbol_width=12,e.cat_room.separation=3,_.each(["row","col"],function(a){e.norm_labels.width[a]=o(t.labels[a+"_max_char"])*t[a+"_label_scale"],e["num_"+a+"_nodes"]=t.network_data[a+"_nodes"].length,"row"===a?e.dendro_room[a]=e.dendro_room.symbol_width:e.dendro_room[a]=e.dendro_room.symbol_width+3*e.uni_margin;var n=e.all_cats[a].length;if(e.show_categories[a]){r=(n-1)*e.cat_room.separation;var i;i="row"===a?n+1:n,e.cat_room[a]=i*e.cat_room.symbol_width+r}else"row"==a?e.cat_room[a]=e.cat_room.symbol_width:e.cat_room[a]=0}),e}},function(t,e){"use strict";function r(){return"#EEE"}function o(t){return n[t%a()]}function a(){return n.length}var n;n=["#393b79","#aec7e8","#ff7f0e","#ffbb78","#98df8a","#bcbd22","#404040","#ff9896","#c5b0d5","#8c564b","#1f77b4","#5254a3","#FFDB58","#c49c94","#e377c2","#7f7f7f","#2ca02c","#9467bd","#dbdb8d","#17becf","#637939","#6b6ecf","#9c9ede","#d62728","#8ca252","#8c6d31","#bd9e39","#e7cb94","#843c39","#ad494a","#d6616b","#7b4173","#a55194","#ce6dbd","#de9ed6"],t.exports={get_default_color:r,get_random_color:o,get_num_colors:a}},function(t,e){"use strict";t.exports=function(t){var e=t[0],r=!1,o=!1,a="cat_strings",n=NaN,i=[],s=null,l=": ";if("string"==typeof e&&e.indexOf(l)>-1&&(r=!0,e=e.split(l)[1]),0==isNaN(e)&&(o=!0),o&&(a="cat_values",_.each(t,function(t){r&&(t=t.split(l)[1]),isNaN(t)===!0?a="cat_strings":(t=parseFloat(t),i.push(t))})),"cat_values"===a){var c=_.max(i,function(t){return Math.abs(t)});n=Math.abs(c),s=d3.scale.linear().domain([0,n]).range([0,1])}var d={};return d.type=a,d.max_abs_val=n,d.cat_scale=s,d}},function(t,e){"use strict";t.exports=function(){var t={};return t.zoom_x=1,t.zoom_y=1,t.trans_x=0,t.trans_y=0,t}},function(t,e,r){"use strict";var o=r(38),a=r(49),n=r(67),i=r(75),s=r(76),l=r(87),c=r(97),d=r(116),u=r(122),p=r(82),v=r(123),f=r(124),m=r(125),h=r(128);t.exports=function(t){function e(){var t=r.viz.super_border_color;return(r.viz.is_expand||0==r.show_viz_border)&&(t="white"),t}var r=t.params;d3.select(r.viz.viz_wrapper+" svg").remove();var g=d3.select(r.viz.viz_wrapper).append("svg").attr("class","viz_svg").attr("id","svg_"+r.root.replace("#","")).attr("width",r.viz.svg_dim.width).attr("height",r.viz.svg_dim.height).attr("is_zoom",0).attr("stopped_zoom",1);g.append("rect").attr("class","super_background").style("width",r.viz.svg_dim.width).style("height",r.viz.svg_dim.height).style("fill","white"),o(r,g),a(t),r.viz.show_dendrogram&&(v(t),f(t)),h(t),n(t),r.viz.ds_level===-1&&_.each(["row","col"],function(t){var e=Number(d3.select("."+t+"_label_group").select("text").style("font-size").replace("px","")),o=8;e>o&&d3.selectAll(r.root+" ."+t+"_label_group").each(function(){p(r,this,t)})}),u(t),r.viz.show_categories.col&&d(t),s(t),r.labels.super_labels&&i(r),m(t),d3.select(r.viz.viz_svg).append("rect").classed("left_border",!0).classed("borders",!0).attr("fill",e).attr("width",r.viz.grey_border_width).attr("height",r.viz.svg_dim.height).attr("transform","translate(0,0)"),d3.select(r.viz.viz_svg).append("rect").classed("right_border",!0).classed("borders",!0).attr("fill",e).attr("width",r.viz.grey_border_width).attr("height",r.viz.svg_dim.height).attr("transform",function(){var t=r.viz.svg_dim.width-r.viz.grey_border_width;return"translate("+t+",0)"}),d3.select(r.viz.viz_svg).append("rect").classed("top_border",!0).classed("borders",!0).attr("fill",e).attr("width",r.viz.svg_dim.width).attr("height",r.viz.grey_border_width).attr("transform",function(){var t=0;return"translate("+t+",0)"}),d3.select(r.viz.viz_svg).append("rect").classed("bottom_border",!0).classed("borders",!0).attr("fill",e).attr("width",r.viz.svg_dim.width).attr("height",r.viz.grey_border_width).attr("transform",function(){var t=r.viz.svg_dim.height-r.viz.grey_border_width;return"translate(0,"+t+")"}),l(t),c(t),r.viz.do_zoom&&d3.select(r.viz.zoom_element).call(r.zoom_behavior),d3.select(r.viz.zoom_element).on("dblclick.zoom",null)}},function(t,e,r){"use strict";var o=r(2),a=r(39),n=r(40),i=r(41);t.exports=function(t,e){var r,s=t.network_data,l=[];r=e.append("g").attr("class","clust_container").attr("transform","translate("+t.viz.clust.margin.left+","+t.viz.clust.margin.top+")").append("g").attr("class","clust_group").classed("clust_group",!0),r.append("rect").classed("background",!0).classed("grey_background",!0).style("fill","#eee").style("opacity",.25).attr("width",t.viz.clust.dim.width).attr("height",t.viz.clust.dim.height),null===t.viz.ds?i(t,t.matrix.matrix,"all",t.viz.ds_level):i(t,t.matrix.ds_matrix[0],"all",t.viz.ds_level),"function"==typeof t.click_tile?d3.selectAll(t.root+" .tile").on("click",function(e){var r={};r.row=t.network_data.row_nodes[e.pos_y].name,r.col=t.network_data.col_nodes[e.pos_x].name,r.value=e.value,o.has(e,"value_up")&&(r.value_up=e.value_up),o.has(e,"value_dn")&&(r.value_dn=e.value_dn),o.has(e,"info")&&(r.info=e.info),t.click_tile(r),n(t,this)}):t.tile_click_hlight&&d3.selectAll(t.root+" .tile").on("click",function(){n(t,this)});var c={},d=0;return c.enter=0,a(t,c,d),{get_clust_group:function(){return r},get_matrix:function(){return l},get_nodes:function(t){return"row"===t?s.row_nodes:s.col_nodes}}}},function(t,e){"use strict";t.exports=function(t,e,r){}},function(t,e){"use strict";t.exports=function(t,e){d3.select(e).each(function(r){var o=r.pos_x,a=r.pos_y;if(d3.selectAll(t.root+" .click_hlight").remove(),o!=t.matrix.click_hlight_x||a!=t.matrix.click_hlight_y){t.matrix.click_hlight_x=o,t.matrix.click_hlight_y=a;var n=6,i=.85,s=n*t.viz.border_width.x,l=n*t.viz.border_width.y;d3.select(e.parentNode).append("rect").classed("click_hlight",!0).classed("top_hlight",!0).attr("width",t.viz.x_scale.rangeBand()).attr("height",l).attr("fill",t.matrix.hlight_color).attr("transform",function(){return"translate("+t.viz.x_scale(o)+",0)"}).attr("opacity",i),d3.select(e.parentNode).append("rect").classed("click_hlight",!0).classed("left_hlight",!0).attr("width",s).attr("height",t.viz.y_scale.rangeBand()-.99*l).attr("fill",t.matrix.hlight_color).attr("transform",function(){return"translate("+t.viz.x_scale(o)+","+.99*l+")"}).attr("opacity",i),d3.select(e.parentNode).append("rect").classed("click_hlight",!0).classed("right_hlight",!0).attr("width",s).attr("height",t.viz.y_scale.rangeBand()-.99*l).attr("fill",t.matrix.hlight_color).attr("transform",function(){var e=t.viz.x_scale(o)+t.viz.x_scale.rangeBand()-s;return"translate("+e+","+.99*l+")"}).attr("opacity",i),d3.select(e.parentNode).append("rect").classed("click_hlight",!0).classed("bottom_hlight",!0).attr("width",function(){return t.viz.x_scale.rangeBand()-1.98*s}).attr("height",l).attr("fill",t.matrix.hlight_color).attr("transform",function(){var e=t.viz.x_scale(o)+.99*s,r=t.viz.y_scale.rangeBand()-l;return"translate("+e+","+r+")"}).attr("opacity",i)}else t.matrix.click_hlight_x=-666,t.matrix.click_hlight_y=-666})}},function(t,e,r){"use strict";var o=r(42),a=r(48);t.exports=function(t,e){var r=arguments.length<=2||void 0===arguments[2]?"all":arguments[2],n=arguments.length<=3||void 0===arguments[3]?-1:arguments[3],i=t.viz.y_scale,s=!0,l="row";if(n>=0&&(i=t.viz.ds[n].y_scale,s=!1,l="ds"+String(n)+"_row"),s)var c=a().attr("class",function(){var e=t.viz.root_tips.replace(".",""),r=e+" d3-tip "+e+"_tile_tip";return r}).style("display","none").direction("nw").offset([0,0]).html(function(e){var r,o=String(e.value.toFixed(3));if(t.keep_orig){var a=String(e.value_orig.toFixed(3));r="

"+e.row_name+" and "+e.col_name+"

normalized value: "+o+"

original value: "+a+"
"}else r="

"+e.row_name+" and "+e.col_name+"

value: "+o+"
";return r});else c=null;var d=[];"all"===r?d=e:_.each(e,function(t){_.contains(r,t.name)&&d.push(t)}),d3.select(t.root+" .clust_group").selectAll(".row").data(d,function(t){return t.name}).enter().append("g").classed(l,!0).attr("transform",function(t){return"translate(0,"+i(t.row_index)+")"}).each(function(e){o(t,e,c,this,n)}),t.viz.ds_level===-1&&null!=c&&d3.selectAll(t.root+" .row").call(c)}},function(t,e,r){"use strict";var o=r(43),a=r(44),n=r(45),i=r(46),s=r(47);t.exports=function(t,e,r,l){var c=arguments.length<=4||void 0===arguments[4]?-1:arguments[4],d=e.row_data,u=!0,p=t.viz.rect_height;c>=0&&(p=t.viz.ds[c].rect_height);var v;v=!!_.has(t.network_data.links[0],"value_orig");var f;f=v===!1?_.filter(d,function(t){return 0!==t.value}):d;var m=d3.select(l).selectAll("rect").data(f,function(t){return t.col_name}).enter().append("rect").attr("class","tile row_tile").attr("width",t.viz.rect_width).attr("height",p).style("fill",function(e){var r;return r="NaN"===e.value_orig?"#000000":e.value>0?t.matrix.tile_colors[0]:t.matrix.tile_colors[1]}).style("fill-opacity",function(e){ +var r;return r="NaN"===e.value_orig?.175:t.matrix.opacity_scale(Math.abs(e.value))}).attr("transform",function(e){return s(t,e)});if(u&&m.on("mouseover",function(){for(var e=arguments.length,o=Array(e),a=0;a0&&(r=t.matrix.opacity_scale(Math.abs(e.value_up))),r}).on("mouseover",function(){for(var e=arguments.length,o=Array(e),a=0;a0&&(r=t.matrix.opacity_scale(Math.abs(e.value_dn))),r}).on("mouseover",function(){for(var e=arguments.length,o=Array(e),a=0;a0&&Math.abs(t.value_dn)>0&&d3.select(this).remove()})}t.matrix.tile_title&&m.append("title").text(function(t){var e="value: "+t.value;return e})}},function(t,e){"use strict";t.exports=function(t){var e=0,r=t.viz.x_scale.rangeBand()-t.viz.border_width.x,o=0,a=t.viz.y_scale.rangeBand()-t.viz.border_width.y,n="M"+e+","+o+", L"+e+", "+a+", L"+r+",0 Z";return n}},function(t,e){"use strict";t.exports=function(t){var e=0,r=t.viz.x_scale.rangeBand()-t.viz.border_width.x,o=t.viz.y_scale.rangeBand()-t.viz.border_width.y,a=t.viz.y_scale.rangeBand()-t.viz.border_width.y,n="M"+e+", "+o+" , L"+r+", "+a+", L"+r+",0 Z";return n}},function(t,e){"use strict";t.exports=function(t,e,r,o){function a(){if(d3.select(e).classed("hovering")){var o=Number(d3.select(t.root+" .viz_svg").attr("is_zoom"));if(0===o&&t.matrix.show_tile_tooltips&&null!==r&&(d3.selectAll(t.viz.root_tips+"_tile_tip").style("display","block"),r.show.apply(e,s),null!=t.tile_tip_callback)){var a=s[0];t.tile_tip_callback(a)}}}var n,i=o[0],s=[].slice.call(o),l=1e3;d3.select(e).classed("hovering",!0),_.each(["row","col"],function(e){d3.selectAll(t.root+" ."+e+"_label_group text").style("font-weight",function(t){var r,o=i[e+"_name"].replace(/_/g," ")===t.name;return r=o?"bold":"normal"})}),s.push(e),clearTimeout(n),n=setTimeout(a,l,e)}},function(t,e){"use strict";t.exports=function(t,e,r){d3.select(e).classed("hovering",!1),d3.selectAll(t.viz.root_tips+"_tile_tip").style("display","none"),_.each(["row","col"],function(e){d3.selectAll(t.root+" ."+e+"_label_group text").style("font-weight","normal")}),null!=r&&r.hide()}},function(t,e){"use strict";t.exports=function(t,e){var r;r=e.pos_x in t.viz.x_scale.domain()?t.viz.x_scale(e.pos_x):0;var o=r+.5*t.viz.border_width.x,a=.5*t.viz.border_width.y;return"translate("+o+","+a+")"}},function(t,e){"use strict";t.exports=function(){function t(t){b=v(t),z=b.createSVGPoint(),document.body.appendChild(x)}function e(){return"n"}function r(){return[0,0]}function o(){return" "}function a(){var t=f();return{top:t.s.y,left:t.s.x}}function n(){var t=f();return{top:t.n.y-x.offsetHeight,left:t.n.x-x.offsetWidth/2}}function i(){var t=f();return{top:t.s.y,left:t.s.x-x.offsetWidth/2}}function s(){var t=f();return{top:t.e.y-x.offsetHeight/2,left:t.e.x}}function l(){var t=f();return{top:t.w.y-x.offsetHeight/2,left:t.w.x-x.offsetWidth}}function c(){var t=f();return{top:t.nw.y-x.offsetHeight,left:t.nw.x-x.offsetWidth}}function d(){var t=f();return{top:t.ne.y-x.offsetHeight,left:t.ne.x}}function _(){var t=f();return{top:t.sw.y,left:t.sw.x-x.offsetWidth}}function u(){var t=f();return{top:t.se.y,left:t.e.x}}function p(){var t=d3.select(document.createElement("div"));return t.style({position:"absolute",opacity:0,pointerEvents:"none",boxSizing:"border-box"}),t.node()}function v(t){return t=t.node(),"svg"==t.tagName.toLowerCase()?t:t.ownerSVGElement}function f(){var t=k||d3.event.target,e={},r=t.getScreenCTM(),o=t.getBBox(),a=o.width,n=o.height,i=o.x,s=o.y,l=document.documentElement.scrollTop||document.body.scrollTop,c=document.documentElement.scrollLeft||document.body.scrollLeft;return r.a=1,r.d=1,r.e=r.e+c,r.f=r.f+l,z.x=i,z.y=s,e.nw=z.matrixTransform(r),z.x=z.x+a,e.ne=z.matrixTransform(r),z.y=z.y+n,e.se=z.matrixTransform(r),z.x=z.x-a,e.sw=z.matrixTransform(r),z.y=z.y-n/2,e.w=z.matrixTransform(r),z.x=z.x+a,e.e=z.matrixTransform(r),z.x=z.x-a/2,z.y=z.y-n/2,e.n=z.matrixTransform(r),z.y=z.y+n,e.s=z.matrixTransform(r),e}function m(t){var e=d3.select(t).classed("hovering");e&&d3.selectAll(".d3-tip").transition().duration(250).style("opacity",0).style("display","none")}function h(t){var e={};return t&&"[object Function]"===e.toString.call(t)}var g=e,w=r,y=o,x=p(),b=null,z=null,k=null;t.show=function(){var e=Array.prototype.slice.call(arguments);e[e.length-1]instanceof SVGElement&&(k=e.pop());var r,o=y.apply(this,e),a=w.apply(this,e),n=g.apply(this,e),i=d3.select(x),s=0;for(i.html(o).style({opacity:1,"pointer-events":"all"}).style("z-index",99);s--;)i.classed(T[s],!1);if(r=A.get(n).apply(this),i.classed(n,!0).style({top:r.top+a[0]+"px",left:r.left+a[1]+"px"}),h(this)===!1){var l=d3.select(this).attr("class");l.indexOf("tile")>=0&&setTimeout(m,5e3,this)}return t},t.hide=function(){var e=d3.select(x);return e.style({opacity:0,"pointer-events":"none"}),t},t.attr=function(e){if(arguments.length<2&&"string"==typeof e)return d3.select(x).attr(e);var r=Array.prototype.slice.call(arguments);return d3.selection.prototype.attr.apply(d3.select(x),r),t},t.style=function(e){if(arguments.length<2&&"string"==typeof e)return d3.select(x).style(e);var r=Array.prototype.slice.call(arguments);return d3.selection.prototype.style.apply(d3.select(x),r),t},t.direction=function(e){return arguments.length?(g=null==e?e:d3.functor(e),t):g},t.offset=function(e){return arguments.length?(w=null==e?e:d3.functor(e),t):w},t.html=function(e){return arguments.length?(y=null==e?e:d3.functor(e),t):y};var A=d3.map({n:n,s:i,e:s,w:l,nw:c,ne:d,sw:_,se:u,south_custom:a}),T=A.keys();return t}},function(t,e,r){"use strict";var o=r(50);t.exports=function(t,e){var r,a=t.params;r=d3.select(a.viz.viz_svg+" .row_container").empty()?d3.select(a.viz.viz_svg).append("g").classed("row_container",!0).attr("transform","translate("+a.viz.norm_labels.margin.left+","+a.viz.clust.margin.top+")"):d3.select(a.viz.viz_svg).select(".row_container").attr("transform","translate("+a.viz.norm_labels.margin.left+","+a.viz.clust.margin.top+")"),d3.select(a.root+" .row_white_background").empty()&&r.append("rect").classed("row_white_background",!0).classed("white_bars",!0).attr("fill",a.viz.background_color).attr("width",a.viz.label_background.row).attr("height",30*a.viz.clust.dim.height+"px"),d3.select(a.root+" .row_label_container").empty()?r.append("g").classed("row_label_container",!0).attr("transform","translate("+a.viz.norm_labels.width.row+",0)").append("g").classed("row_label_zoom_container",!0):r.select(a.root+" .row_label_container").attr("transform","translate("+a.viz.norm_labels.width.row+",0)"),a.viz.ds_level===-1&&o(t,"all",e)}},function(t,e,r){"use strict";var o=r(2),a=r(51),n=r(52),i=r(66);t.exports=function(t){var e=arguments.length<=1||void 0===arguments[1]?"all":arguments[1],r=arguments.length<=2||void 0===arguments[2]?0:arguments[2],s=t.params,l=[];"all"===e?l=s.network_data.row_nodes:_.each(s.network_data.row_nodes,function(t){_.contains(e,t.name)&&l.push(t)});var c=d3.select(s.root+" .row_label_zoom_container").selectAll("g").data(l,function(t){return t.name}).enter().append("g").classed("row_label_group",!0),d=s.network_data.row_nodes_names;c.attr("transform",function(t){var e=_.indexOf(d,t.name);return"translate(0,"+s.viz.y_scale(e)+")"}),c.on("dblclick",function(e){var r="__data__",o=this[r].name;n(t,this,o),s.tile_click_hlight&&a(this,e.ini)}),i(s),c.insert("rect").style("opacity",0),c.append("text").attr("y",.5*s.viz.rect_height+.35*s.labels.default_fs_row).attr("text-anchor","end").style("font-size",s.labels.default_fs_row+"px").text(function(t){return o.normal_name(t)}).attr("pointer-events","none").style("opacity",0).style("cursor","default").transition().delay(r).duration(r).style("opacity",1),c.each(function(){var t=d3.select(this).select("text")[0][0].getBBox();d3.select(this).select("rect").attr("x",t.x).attr("y",0).attr("width",t.width).attr("height",s.viz.y_scale.rangeBand()).style("fill",function(){var t="yellow";return t}).style("opacity",function(t){var e=0;return 1===t.target&&(e=1),e})}),o.has(s.network_data.row_nodes[0],"value")&&c.append("rect").classed("row_bars",!0).attr("width",function(t){var e=0;return e=s.labels.bar_scale_row(Math.abs(t.value))}).attr("x",function(t){var e=0;return e=-s.labels.bar_scale_row(Math.abs(t.value))}).attr("height",s.viz.y_scale.rangeBand()).attr("fill",function(t){return t.value>0?s.matrix.bar_colors[0]:s.matrix.bar_colors[1]}).attr("opacity",.4)}},function(t,e){"use strict";t.exports=function(t,e,r){if(r!=t.click_hlight_row){var o=6,a=.85,n=o*t.viz.border_width.x;d3.selectAll(t.root+" .click_hlight").remove(),d3.select(e).append("rect").classed("click_hlight",!0).classed("row_top_hlight",!0).attr("width",t.viz.svg_dim.width).attr("height",n).attr("fill",t.matrix.hlight_color).attr("opacity",a),d3.select(e).append("rect").classed("click_hlight",!0).classed("row_bottom_hlight",!0).attr("width",t.viz.svg_dim.width).attr("height",n).attr("fill",t.matrix.hlight_color).attr("opacity",a).attr("transform",function(){var e=t.viz.y_scale.rangeBand()-n;return"translate(0,"+e+")"})}else d3.selectAll(t.root+" .click_hlight").remove(),t.click_hlight_row=-666}},function(t,e,r){"use strict";var o=r(53),a=r(54),n=r(36),i=r(65),s=r(27);t.exports=function(t,e,r){var l=t.params,c=i(l);if(1===c.zoom_y&&1===c.zoom_x){l.viz.inst_order.row="custom",a(t,"col"),d3.selectAll(l.root+" .toggle_col_order .btn").classed("active",!1),l.viz.run_trans=!0;var d=$.extend(!0,{},l.matrix.matrix),u=l.network_data.row_nodes,p=l.network_data.col_nodes,v=[];u.forEach(function(t){v.push(t.name)}),r=_.indexOf(v,r),v=[],p.forEach(function(t,e){v.push(d[r].row_data[e].value)});var f=d3.range(v.length).sort(function(t,e){return v[e]-v[t]});l.viz.x_scale.domain(f),l.matrix.orders.custom_row=f;var m;m=l.network_data.links.length>l.matrix.def_large_matrix?d3.select(l.root+" .viz_svg"):d3.select(l.root+" .viz_svg").transition().duration(2500);var h=l.network_data.col_nodes_names;m.select(".col_zoom_container").selectAll(".col_label_text").attr("transform",function(t){var e=_.indexOf(h,t.name);return"translate("+l.viz.x_scale(e)+")rotate(-90)"}),m.selectAll(".col_cat_group").attr("transform",function(t){var e=_.indexOf(h,t.name);return"translate("+l.viz.x_scale(e)+",0)"}),l.viz.ds_level===-1&&(m.selectAll(".tile").attr("transform",function(t){return"translate("+l.viz.x_scale(t.pos_x)+",0)"}),m.selectAll(".tile_up").attr("transform",function(t){return"translate("+l.viz.x_scale(t.pos_x)+",0)"}),m.selectAll(".tile_dn").attr("transform",function(t){return"translate("+l.viz.x_scale(t.pos_x)+",0)"})),d3.selectAll(l.root+" .row_label_group").select("rect").style("opacity",0),d3.select(e).select("rect").style("opacity",1),o(l),l.network_data.links.forEach(function(t){t.x=l.viz.x_scale(t.target),t.y=l.viz.y_scale(t.source)}),l.zoom_info=n(),setTimeout(function(){l.viz.run_trans=!1},2500),l.viz.ds_num_levels>0&&l.viz.ds_level>=0&&s(l)}}},function(t,e){"use strict";t.exports=function(t){var e=6,r=e*t.viz.border_width.x,o=e*t.viz.border_width.y;d3.select(t.root+" .top_hlight").attr("width",t.viz.x_scale.rangeBand()).attr("height",o).transition().duration(2500).attr("transform",function(){return"translate("+t.viz.x_scale(t.matrix.click_hlight_x)+",0)"}),d3.select(t.root+" .left_hlight").attr("width",r).attr("height",t.viz.y_scale.rangeBand()-.99*o).transition().duration(2500).attr("transform",function(){return"translate("+t.viz.x_scale(t.matrix.click_hlight_x)+","+.99*o+")"}),d3.select(t.root+" .right_hlight").attr("width",r).attr("height",t.viz.y_scale.rangeBand()-.99*o).transition().duration(2500).attr("transform",function(){var e=t.viz.x_scale(t.matrix.click_hlight_x)+t.viz.x_scale.rangeBand()-r;return"translate("+e+","+.99*o+")"}),d3.select(t.root+" .bottom_hlight").attr("width",function(){return t.viz.x_scale.rangeBand()-1.98*r}).attr("height",o).transition().duration(2500).attr("transform",function(){var e=t.viz.x_scale(t.matrix.click_hlight_x)+.99*r,a=t.viz.y_scale.rangeBand()-o;return"translate("+e+","+a+")"})}},function(t,e,r){"use strict";var o=r(55);t.exports=function(t,e){var r=arguments.length<=2||void 0===arguments[2]?1500:arguments[2],a=t.params;"row"===e&&"clust"===a.viz.inst_order.col&&setTimeout(o,r,t,"row",!0),"col"===e&&"clust"===a.viz.inst_order.row&&setTimeout(o,r,t,"col",!0),"clust"!=a.viz.inst_order.row&&a.viz.dendro_filter.col===!1&&(d3.selectAll(a.root+" .col_dendro_group").style("opacity",0).on("mouseover",null).on("mouseout",null),d3.select(a.root+" .col_slider_group").style("opacity",0),d3.selectAll(a.root+" .col_dendro_crop_buttons").style("opacity",0).on("mouseover",null).on("mouseout",null)),"clust"!=a.viz.inst_order.col&&a.viz.dendro_filter.row===!1&&(d3.selectAll(a.root+" .row_dendro_group").style("opacity",0).on("mouseover",null).on("mouseout",null).on("click",null),d3.select(a.root+" .row_slider_group").style("opacity",0),d3.selectAll(a.root+" .row_dendro_crop_buttons").style("opacity",0).on("mouseover",null).on("mouseout",null))}},function(t,e,r){"use strict";var o=r(56),a=r(57),n=r(58),i=r(48),s=r(60),l=r(63);t.exports=function(t,e){function r(t,r,o){if(d3.select(t).classed("hovering")){var a=d.viz.root_tips+"_"+e+"_dendro_tip";d3.select(a+" .cat_graph").empty()&&null!==d.viz.cat_info[e]&&l(d,e,r,u[o],a,!0),d3.selectAll(d.viz.root_tips+"_"+e+"_dendro_tip").style("opacity",1)}}var c=!(arguments.length<=2||void 0===arguments[2])&&arguments[2],d=t.params;"both"===e&&(e="row");var _;_="row"===e?"col":"row","clust"===d.viz.inst_order[_]&&d3.select(d.root+" ."+e+"_slider_group").style("opacity",1);var u;u="row"===e?o(d):a(d),d3.select(t.params.root+" ."+e+"_dendro_crop_buttons").empty()===!1&&s(t,e);var p=d.viz.dendro_opacity,v=500;d3.selectAll(t.params.viz.root_tips+"_"+e+"_dendro_tip").remove();var f;d3.selectAll(d.root+" ."+e+"_dendro_group").empty()?f=!1:(f=!0,d3.selectAll(d.root+" ."+e+"_dendro_group").remove());var m=0,h=-5,g=i().attr("class",function(){var t=d.viz.root_tips.replace(".",""),r=t+" d3-tip "+t+"_"+e+"_dendro_tip";return r}).direction("nw").offset([m,h]).style("display","none").style("opacity",0);g.html(function(){var t='
Click for cluster information
and additional options.';return t}),c&&(f=!1);var w,y,x,b,z,k,A=d3.select(d.root+" ."+e+"_dendro_container").selectAll("path").data(u,function(t){return t.name}).enter().append("path").style("opacity",0).attr("class",e+"_dendro_group").style("fill","black");A.attr("d",function(t){"row"===e?(w=0,y=t.pos_top,x=30,b=t.pos_mid,z=0,k=t.pos_bot):(w=t.pos_top,y=0,x=t.pos_mid,b=30,z=t.pos_bot,k=0);var r="M"+w+","+y+", L"+x+", "+b+", L"+z+","+k+" Z";return r}),A.on("mouseover",function(o,a){d3.select(this).classed("hovering",!0),null!=t.params.dendro_callback&&t.params.dendro_callback(this),d3.select(d.viz.root_tips+"_"+e+"_dendro_tip").style("display","block"),n(d,this,o,e),g.show(o),d3.select(d.viz.root_tips+"_"+e+"_dendro_tip").style("opacity",0),setTimeout(r,v,this,o,a)}).on("mouseout",function(){"clust"===d.viz.inst_order[_]&&d3.select(this).style("opacity",p),d3.selectAll(d.root+" .dendro_shadow").remove(),d3.select(this).classed("hovering",!1),g.hide(this)}).on("click",function(r,o){$(d.root+" .dendro_info").modal("toggle");var a=r.all_names.join(", ");d3.select(d.root+" .dendro_info input").attr("value",a);var n=d.root+" .dendro_info";d3.selectAll(".dendro_info .cluster_info_container .cat_graph").remove(),null!==d.viz.cat_info[e]&&l(d,e,r,u[o],n),null!=t.params.dendro_click_callback&&t.params.dendro_click_callback(this)}).call(g);var T;T="clust"===d.viz.inst_order[_]?p:0,f?d3.select(d.root+" ."+e+"_dendro_container").selectAll("path").transition().delay(1e3).duration(1e3).style("opacity",T):d3.select(d.root+" ."+e+"_dendro_container").selectAll("path").style("opacity",T)}},function(t,e){"use strict";t.exports=function(t){var e={},r=t.group_level.row,o=t.network_data.row_nodes,a=t.network_data.row_nodes_names;_.each(o,function(o){var n=o.group[r],i=_.indexOf(a,o.name),s=t.viz.y_scale(i),l=s+t.viz.y_scale.rangeBand();_.has(e,n)===!1&&(e[n]={},e[n].name_top=o.name,e[n].name_bot=o.name,e[n].pos_top=s,e[n].pos_bot=l,e[n].pos_mid=(s+l)/2,e[n].name=n,e[n].all_names=[],e[n].inst_rc="row"),e[n].all_names.push(o.name),se[n].pos_bot&&(e[n].name_bot=o.name,e[n].pos_bot=l,e[n].pos_mid=(e[n].pos_top+l)/2)});var n=[];return _.each(e,function(t){n.push(t)}),n}},function(t,e){"use strict";t.exports=function(t){var e={},r=t.group_level.col,o=t.network_data.col_nodes,a=t.network_data.col_nodes_names;_.each(o,function(o){var n=o.group[r],i=_.indexOf(a,o.name),s=t.viz.x_scale(i),l=s+t.viz.x_scale.rangeBand();_.has(e,n)===!1&&(e[n]={},e[n].name_top=o.name,e[n].name_bot=o.name,e[n].pos_top=s,e[n].pos_bot=l,e[n].pos_mid=(s+l)/2,e[n].name=n,e[n].all_names=[],e[n].inst_rc="col"),e[n].all_names.push(o.name),se[n].pos_bot&&(e[n].name_bot=o.name,e[n].pos_bot=l,e[n].pos_mid=(e[n].pos_top+l)/2)});var n=[];return _.each(e,function(t){n.push(t)}),n}},function(t,e,r){"use strict";var o=r(59);t.exports=function(t,e,r,a){function n(){d3.select(e).classed("hovering")&&t.is_slider_drag===!1&&(d3.select(e).style("opacity",.7),d3.select(t.viz.viz_svg).classed("running_update")===!1&&i())}function i(){"row"===a?"clust"===t.viz.inst_order.col&&o(t,e,a,r):"col"===a?"clust"===t.viz.inst_order.row&&o(t,e,a,r):"both"===a&&("clust"===t.viz.inst_order.col&&o(t,e,"row",r),"clust"===t.viz.inst_order.row&&o(t,e,"col",r))}d3.selectAll(t.root+" ."+a+"_dendro_crop_buttons")[0].length>1?setTimeout(n,500):d3.selectAll(t.root+" .dendro_shadow").remove()}},function(t,e){"use strict";t.exports=function(t,e,r,o){var a,n=.2;d3.selectAll(t.root+" .dendro_shadow").remove(),"row"==r?(d3.select(t.root+" .clust_group").append("rect").style("width",t.viz.clust.dim.width+"px").style("height",o.pos_top+"px").style("fill","black").classed("dendro_shadow",!0).style("opacity",n),a=t.viz.clust.dim.height-o.pos_bot,d3.select(t.root+" .clust_group").append("rect").style("width",t.viz.clust.dim.width+"px").style("height",a+"px").attr("transform","translate(0,"+o.pos_bot+")").style("fill","black").classed("dendro_shadow",!0).style("opacity",n)):"col"===r&&(d3.select(t.root+" .clust_group").append("rect").style("width",o.pos_top+"px").style("height",t.viz.clust.dim.height+"px").style("fill","black").classed("dendro_shadow",!0).style("opacity",n),a=t.viz.clust.dim.width-o.pos_bot,d3.select(t.root+" .clust_group").append("rect").style("width",a+"px").style("height",t.viz.clust.dim.height+"px").attr("transform","translate("+o.pos_bot+",0)").style("fill","black").classed("dendro_shadow",!0).style("opacity",n))}},function(t,e,r){"use strict";var o=r(56),a=r(57),n=r(48),i=r(58),s=r(61),l=r(62);t.exports=function(t,e){function r(t){d3.select(t).classed("hovering")&&d3.selectAll(_.viz.root_tips+"_"+e+"_dendro_crop_tip").style("opacity",1).style("display","block")}var c,d,_=t.params,u=.6*_.viz.dendro_opacity;"row"===e?(c=o(_),d="col"):(c=a(_),d="row");var p=5,v=-5,f=n().attr("class",function(){var t=_.viz.root_tips.replace(".",""),r=t+" d3-tip "+t+"_"+e+"_dendro_crop_tip";return r}).direction("nw").style("display","none").offset([p,v]),m=500;d3.selectAll(_.viz.root_tips+"_"+e+"_dendro_crop_tip").remove(),d3.selectAll(_.root+" ."+e+"_dendro_crop_buttons").remove();var h,g,w,y,x,b,z,k,A,T,S=45,E=.25,B=e+"_dendro_crop_buttons";d3.select(t.params.root+" ."+e+"_dendro_icons_group").classed("ran_filter")===!1?(h=d3.select(_.root+" ."+e+"_dendro_icons_group").selectAll("path").data(c,function(t){return t.name}).enter().append("path").classed(B,!0).attr("d",function(t){k=10,A=10;var r=t.pos_bot-t.pos_top;"row"===e?(r0){var l=d3.select(n+" .cluster_info_container"),c=": ",d="

",u=300,p=23,v=20,f=30,m=205,h=27,g=107,w=4,y=5,x=140,b=!1;null!=s[0].bar_data[0][y]&&(u+=x,g+=x,b=!0);var z=w;b&&(z=y);var k=3,A=25,T=20;_.each(s.slice(0,k),function(t){var e=t.bar_data.length;e>A&&(e=A),T+=h*(e+1)}),i&&l.append("text").text("Cluster Information");var S=l.append("div").style("margin-top","5px").classed("cat_graph",!0).append("svg").style("height",T+"px").style("width",u+"px");S.append("rect").classed("cat_background",!0).attr("height",T+"px").attr("width",u+"px").attr("fill","white").attr("opacity",1);var E=h;if(s=s.slice(0,k),_.each(s,function(e){var r=e.bar_data[0][z],o=d3.scale.linear().domain([0,1e5]).range([30,40]);e.bar_data=e.bar_data.slice(0,A),l.style("margin-bottom","5px");var a=S.append("g").classed("cat_graph_group",!0).attr("transform","translate(10, "+E+")");E+=h*(e.bar_data.length+1);var n=e.type_name;n.length>=f&&(n=n.slice(0,f)+".."),a.append("text").classed("cat_graph_title",!0).text(n).style("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').style("font-weight",800);var i=o(r);a.append("text").text("Count").attr("transform",function(){var t=m+i,e="translate("+t+", 0)";return e}),b&&a.append("text").text("Cluster-Count").attr("transform",function(){var t=m+110,e="translate("+t+", 0)";return e});var s=4;a.append("line").attr("x1",0).attr("x2",m).attr("y1",s).attr("y2",s).attr("stroke","blue").attr("stroke-width",1).attr("opacity",1);var _=a.append("g").classed("cat_bar_container",!0).attr("transform","translate(0, 10)"),u=_.selectAll("g").data(e.bar_data).enter().append("g").attr("transform",function(t,e){var r=e*p;return"translate(0,"+r+")"}),g=d3.scale.linear().domain([0,r]).range([0,m]);u.append("rect").attr("height",v+"px").attr("width",function(t){var e=g(t[z]);return e+"px"}).attr("fill",function(t){return t[3]}).attr("opacity",t.viz.cat_colors.opacity).attr("stroke","grey").attr("stroke-width","0.5px"),u.append("text").classed("bar_labels",!0).text(function(t){var e=t[1];return e.indexOf(c)>0&&(e=e.split(c)[1]),e.indexOf(d)>0&&(e=e.split(d)[0]),e.length>=f&&(e=e.slice(0,f)+".."),e}).attr("transform",function(){return"translate(5, "+.75*v+")"}).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("font-weight",400).attr("text-anchor","right");var y=35;u.append("text").classed("count_labels",!0).text(function(t){return String(t[z].toLocaleString())}).attr("transform",function(){var t=m+i+y,e=.75*v;return"translate("+t+", "+e+")"}).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("font-weight",400).attr("text-anchor","end"),b&&u.append("text").classed("count_labels",!0).text(function(t){return String(t[w].toLocaleString())}).attr("transform",function(){var t=m+y+x+20,e=.75*v;return"translate("+t+", "+e+")"}).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("font-weight",400).attr("text-anchor","end")}),i){var B=d3.select(n),O=B.style("top").split(".px")[0],M=B.style("left").split(".px")[0],N=0,C=0;"row"===e?(N=0,C=g,a.pos_top=0&&n.push(t)});var c=[];if(null!==t.viz.cat_info[r]){for(var d,u,p,v=t.viz.cat_info[r],f=_.keys(v),m=[],h=[],g=0;g0){var A,T=a.length;_.each(m,function(e){if(u=e.split("-")[1],d=h[u],k)if(e.indexOf("-")>=0){var o=parseInt(e.split("-")[1],b)+1;d="Category "+String(o)}else d="Category";y[d]={},_.each(n,function(t){A=t[e],A.indexOf(": ")>=0&&(A=A.split(": ")[1]),A in y[d]?(y[d][A].num_nodes=y[d][A].num_nodes+1,null!=s&&(y[d][A].num_nodes_ds=y[d][A].num_nodes_ds+parseInt(t[s].split(": ")[1],b))):(y[d][A]={},y[d][A].num_nodes=1,null!=s&&(y[d][A].num_nodes_ds=parseInt(t[s].split(": ")[1],b)))}),x={},x.type_name=d,x.num_in_clust=T,w=[];var a,i,l=y[d];for(var p in l){i=k?p:d+": "+p;var v=l[p].num_nodes;if(_.has(l[p],"num_nodes_ds"))var f=l[p].num_nodes_ds;else f=null;a=t.viz.cat_colors[r][e][i],w.push([e,i,l[p],a,v,f])}w.sort(function(t,e){return e[z]-t[z]}),x.bar_data=w,c.push(x)})}}return c}},function(t,e){"use strict";t.exports=function(t){var e={},r=d3.select(t.root+" .clust_group").attr("transform");return null!=r&&r.indexOf("scale")>0?(e.zoom_x=parseFloat(r.split("scale")[1].replace("(","").replace(")","").split(",")[0]),e.zoom_y=parseFloat(r.split("scale")[1].replace("(","").replace(")","").split(",")[1])):(e.zoom_x=1,e.zoom_y=1),e}},function(t,e,r){"use strict";var o=r(48);t.exports=function(t){if(t.labels.show_label_tooltips){d3.selectAll(t.viz.root_tips+"_row_tip").remove();var e=t.viz.root_tips.replace(".",""),r=o().attr("class",function(){var t=e+" d3-tip "+e+"_row_tip";return t}).direction("e").offset([0,10]).style("display","none").html(function(t){var e=t.name.replace(/_/g," ").split("#")[0];return""+e+""});d3.select(t.viz.viz_wrapper).select(t.root+" .row_container").call(r),d3.select(t.root+" .row_label_zoom_container").selectAll("g").on("mouseover",function(e){d3.select(t.viz.root_tips+"_row_tip").classed(e.name,!0),d3.selectAll(t.viz.root_tips+"_row_tip").style("display","block"),d3.select(this).select("text").classed("active",!0),r.show(e),null!=t.row_tip_callback&&t.row_tip_callback(t.viz.root_tips,e)}).on("mouseout",function(e){d3.selectAll(t.viz.root_tips+"_row_tip").style("display","none").classed(e.name,!1),d3.select(this).select("text").classed("active",!1),r.hide(e)})}else d3.select(t.root+" .row_label_zoom_container").selectAll("g").on("mouseover",function(){d3.select(this).select("text").classed("active",!0)}).on("mouseout",function(){d3.select(this).select("text").classed("active",!1)})}},function(t,e,r){"use strict";var o=r(2),a=r(68),n=r(69),i=r(52),s=r(73),l=r(74);t.exports=function(t){var e,r=arguments.length<=1||void 0===arguments[1]?0:arguments[1],c=t.params,d=c.network_data.col_nodes,_=c.viz.x_scale.rangeBand()/2+c.viz.border_width.x;d3.select(c.root+" .col_container").empty()?(e=d3.select(c.viz.viz_svg).append("g").attr("class","col_container").attr("transform","translate("+c.viz.clust.margin.left+","+c.viz.norm_labels.margin.top+")"),e.append("rect").attr("fill",c.viz.background_color).attr("width",30*c.viz.clust.dim.width+"px").attr("height",c.viz.label_background.col).attr("class","white_bars"),e.append("g").attr("class","col_label_outer_container").attr("transform","translate(0,"+c.viz.norm_labels.width.col+")").append("g").attr("class","col_zoom_container")):(e=d3.select(c.root+" .col_container").attr("transform","translate("+c.viz.clust.margin.left+","+c.viz.norm_labels.margin.top+")"),e.select(".white_bars").attr("fill",c.viz.background_color).attr("width",30*c.viz.clust.dim.width+"px").attr("height",c.viz.label_background.col), +e.select(c.root+" .col_label_outer_container"));var u=d3.select(c.root+" .col_zoom_container").selectAll(".col_label_text").data(d,function(t){return t.name}).enter().append("g").attr("class","col_label_text").attr("transform",function(t){var e=t.col_index;return"translate("+c.viz.x_scale(e)+", 0) rotate(-90)"}),p=u.append("g").attr("class","col_label_group").attr("transform","translate("+c.viz.x_scale.rangeBand()/2+","+_+") rotate(45)").on("mouseover",function(){d3.select(this).select("text").classed("active",!0)}).on("mouseout",function(){d3.select(this).select("text").classed("active",!1)});o.has(c.network_data.col_nodes[0],"value")&&p.append("rect").attr("class","col_bars").attr("width",function(t){var e=0;return t.value>0&&(e=c.labels.bar_scale_col(t.value)),e}).attr("height",.66*c.viz.x_scale.rangeBand()).style("fill",function(t){return t.value>0?c.matrix.bar_colors[0]:c.matrix.bar_colors[1]}).attr("opacity",.6),p.append("text").attr("x",0).attr("y",.64*c.viz.x_scale.rangeBand()).attr("dx",c.viz.border_width.x).attr("text-anchor","start").attr("full_name",function(t){return t.name}).style("font-size",c.labels.default_fs_col+"px").style("cursor","default").text(function(t){return o.normal_name(t)}).style("opacity",0).transition().delay(r).duration(r).style("opacity",1),s(c),p.append("path").style("stroke-width",0).attr("d",function(){return l(c)}).attr("fill","#eee").style("opacity",0).transition().delay(r).duration(r).style("opacity",c.viz.triangle_opacity),d3.selectAll(c.root+" .col_label_text").on("click",function(t){"function"==typeof c.click_label?(c.click_label(t.name,"col"),a(c,this,t.ini)):c.tile_click_hlight&&a(c,this,t.ini)}).on("dblclick",function(e){var r="__data__",o=this[r].name;if(c.sim_mat){n(t,this,o);var s=d3.selectAll(c.root+" .row_label_group").filter(function(t){return t.name==o})[0][0];i(t,s,o)}else n(t,this,o);c.tile_click_hlight&&a(c,this,e.ini)})}},function(t,e){"use strict";t.exports=function(t,e,r){if(r!=t.click_hlight_col){t.click_hlight_col=r;var o=6,a=.85,n=o*t.viz.border_width.x;d3.selectAll(t.root+" .click_hlight").remove(),d3.select(e).append("rect").classed("click_hlight",!0).classed("col_top_hlight",!0).attr("width",t.viz.clust.dim.height).attr("height",n).attr("fill",t.matrix.hlight_color).attr("opacity",a).attr("transform",function(){var e=0,r=-(t.viz.clust.dim.height+t.viz.cat_room.col+t.viz.uni_margin);return"translate("+r+","+e+")"}),d3.select(e).append("rect").classed("click_hlight",!0).classed("col_bottom_hlight",!0).attr("width",t.viz.clust.dim.height).attr("height",n).attr("fill",t.matrix.hlight_color).attr("opacity",a).attr("transform",function(){var e=t.viz.x_scale.rangeBand()-n,r=-(t.viz.clust.dim.height+t.viz.cat_room.col+t.viz.uni_margin);return"translate("+r+","+e+")"})}else d3.selectAll(t.root+" .click_hlight").remove(),t.click_hlight_col=-666}},function(t,e,r){"use strict";var o=r(53),a=r(54),n=r(70),i=r(36),s=r(65),l=r(27);t.exports=function(t,e,r){var c=t.params,d=s(c);if(1===d.zoom_y&&1===d.zoom_x){c.viz.inst_order.col="custom",a(t,"col"),d3.selectAll(c.root+" .toggle_row_order .btn").classed("active",!1),c.viz.run_trans=!0;var u=$.extend(!0,{},c.matrix.matrix),p=c.network_data.row_nodes,v=c.network_data.col_nodes,f=[];v.forEach(function(t){f.push(t.name)});var m=_.indexOf(f,r);f=[],p.forEach(function(t,e){f.push(u[e].row_data[m].value)});var h=d3.range(f.length).sort(function(t,e){return f[e]-f[t]});c.viz.y_scale.domain(h),c.matrix.orders.custom_col=h;var g,w=c.network_data.row_nodes_names;if(g=c.network_data.links.length>c.matrix.def_large_matrix?d3.select(c.root+" .viz_svg"):d3.select(c.root+" .viz_svg").transition().duration(2500),g.selectAll(".row_cat_group").attr("transform",function(t){var e=_.indexOf(w,t.name);return"translate(0,"+c.viz.y_scale(e)+")"}),g.select(".row_label_zoom_container").selectAll(".row_label_group").attr("transform",function(t){var e=_.indexOf(w,t.name);return"translate(0,"+c.viz.y_scale(e)+")"}),c.viz.ds_level===-1&&g.selectAll(".row").attr("transform",function(t){var e=_.indexOf(w,t.name);return"translate(0,"+c.viz.y_scale(e)+")"}),d3.selectAll(c.root+" .col_label_text").select(".highlight_rect").style("opacity",0),d3.select(e).select(".highlight_rect").style("opacity",1),c.network_data.links.forEach(function(t){t.x=c.viz.x_scale(t.target),t.y=c.viz.y_scale(t.source)}),o(c),c.zoom_info=i(),setTimeout(function(){c.viz.run_trans=!1},2500),c.viz.ds_num_levels>0&&c.viz.ds_level>=0){l(c);var y=!0,x=!0,b=!0;n(t,y,x,b)}}}},function(t,e,r){"use strict";var o=r(71),a=r(41),n=r(50),i=r(72);t.exports=function(t){var e=!(arguments.length<=1||void 0===arguments[1])&&arguments[1],r=!(arguments.length<=2||void 0===arguments[2])&&arguments[2],s=!(arguments.length<=3||void 0===arguments[3])&&arguments[3],l=t.params,c=l.zoom_info,d=l.viz.ds_level,u=l.viz.ds_level;null===l.viz.ds?d=-1:(d=Math.floor(Math.log(c.zoom_y)/Math.log(l.viz.ds_zt)),d>l.viz.ds_num_levels-1&&(d=-1));var p=!1;u==-1?d>=0&&(p=!0):d=0&&(d3.selectAll(l.root+" .row").remove(),d3.selectAll(l.viz.root_tips+"_tile_tip").remove(),d3.selectAll(l.viz.root_tips+"_row_tip").remove());var w;if(v<0?(w=l.matrix.matrix,i(l)):(w=l.matrix.ds_matrix[v],d3.selectAll(l.root+" .row_cat_group path").remove()),r===!0&&d3.selectAll(l.root+" .row_cat_group path").remove(),e===!0&&(v>=0?d3.selectAll(l.root+" .ds"+String(v)+"_row").each(function(t){_.contains(l.viz.viz_nodes.row,t.name)===!1&&d3.select(this).remove()}):d3.selectAll(l.root+" .row").each(function(t){_.contains(l.viz.viz_nodes.row,t.name)===!1&&d3.select(this).remove()}),d3.selectAll(l.root+" .row_label_group").each(function(t){_.contains(l.viz.viz_nodes.row,t.name)===!1&&d3.select(this).remove()}),v!=u&&(h=l.viz.viz_nodes.row,d3.selectAll(l.root+" .ds"+String(u)+"_row").remove())),(h.length>=1||"all"===h)&&a(l,w,h,v),v===-1&&(r===!1||e)){var y=[];d3.selectAll(l.root+" .row_label_group").each(function(t){y.push(t.name)});var x=_.difference(l.viz.viz_nodes.row,y),b=1;x.length>b&&n(t,x)}}},function(t,e){"use strict";t.exports=function(t,e){var r,o=[],a=[],n=t.viz.y_scale,i=t.viz.ds_level,s=t.network_data.row_nodes_names,l=".row";i>=0&&(n=t.viz.ds[i].y_scale,s=d3.range(t.matrix.ds_matrix[i].length).map(String),l=".ds"+String(i)+"_row");for(var c=0;ce.min_y&&o.push(s[c]);d3.selectAll(t.root+" "+l).each(function(t){a.push(t.name)}),t.viz.viz_nodes.row=o,t.viz.viz_nodes.curr_row=a}},function(t,e){"use strict";t.exports=function(t){d3.select(t.root+" .row_cat_group path").empty()===!0&&d3.selectAll(t.root+" .row_cat_group").append("path").attr("d",function(){var e=t.viz.cat_room.symbol_width-1,r=0,o=1,a=t.viz.y_scale.rangeBand()/2,n=t.viz.cat_room.symbol_width-1,i=t.viz.y_scale.rangeBand(),s="M "+e+","+r+" L "+o+","+a+", L "+n+","+i+" Z";return s}).attr("fill","#eee").style("opacity",t.viz.triangle_opacity)}},function(t,e,r){"use strict";var o=r(48);t.exports=function(t){if(t.labels.show_label_tooltips){d3.selectAll(t.viz.root_tips+"_col_tip").remove();var e=o().attr("class",function(){var e=t.viz.root_tips.replace(".",""),r=e+" d3-tip "+e+"_col_tip";return r}).direction("w").offset([20,0]).style("display","none").html(function(t){var e=t.name.replace(/_/g," ").split("#")[0];return""+e+""});d3.select(t.viz.viz_wrapper).select("svg").select(t.root+" .col_zoom_container").selectAll(".col_label_group").select("text").call(e),d3.select(t.root+" .col_zoom_container").selectAll(".col_label_group").on("mouseover",function(r){d3.selectAll(t.viz.root_tips+"_col_tip").style("display","block"),e.show(r),null!=t.col_tip_callback&&t.col_tip_callback(r)}).on("mouseout",function(){e.hide(this),d3.selectAll(t.viz.root_tips+"_col_tip").style("display","none")})}}},function(t,e){"use strict";t.exports=function(t){var e=.36*t.viz.x_scale.rangeBand(),r=-t.viz.border_width.x,o=0,a=t.viz.x_scale.rangeBand()-e,n=-(t.viz.x_scale.rangeBand()-e+t.viz.border_width.x),i=-t.viz.border_width.x,s="M "+r+",0 L "+n+","+o+", L "+i+","+a+" Z";return s}},function(t,e){"use strict";t.exports=function(t){d3.select(t.viz.viz_svg).append("rect").attr("fill",t.viz.background_color).attr("height",t.viz.super_labels.dim.width+"px").attr("width","3000px").classed("super_col_bkg",!0).classed("white_bars",!0).attr("transform","translate("+t.viz.clust.margin.left+","+t.viz.super_labels.margin.top+")"),d3.select(t.viz.viz_svg).append("text").attr("class","super_col").text(t.labels["super"].col).attr("text-anchor","center").attr("transform",function(){var e=d3.select(this)[0][0].getBBox().width,r=t.viz.clust.dim.width/2+t.viz.norm_labels.width.row-e/2,o=t.viz.super_labels.dim.width;return"translate("+r+","+o+")"}).style("font-size",function(){var e=t.labels.super_label_fs*t.labels.super_label_scale;return e+"px"}).style("font-weight",300),d3.select(t.viz.viz_svg).append("rect").attr("fill",t.viz.background_color).attr("width",t.viz.super_labels.dim.width+"px").attr("height","3000px").classed("super_row_bkg",!0).classed("white_bars",!0).attr("transform","translate("+t.viz.super_labels.margin.left+",0)"),d3.select(t.viz.viz_svg).append("g").classed("super_row",!0).attr("transform",function(){var e=t.viz.super_labels.dim.width,r=t.viz.clust.dim.height/2+t.viz.norm_labels.width.col;return"translate("+e+","+r+")"}),d3.select(t.root+" .super_row").append("text").text(t.labels["super"].row).attr("text-anchor","center").attr("transform",function(){var e=d3.select(this)[0][0].getBBox().width,r=e/2+t.viz.norm_labels.width.col,o="translate(0,"+r+"), rotate(-90)";return o}).style("font-size",function(){var e=t.labels.super_label_fs*t.labels.super_label_scale;return e+"px"}).style("font-weight",300)}},function(t,e,r){"use strict";var o=r(77),a=r(78),n=r(86),i=r(60);t.exports=function(t){var e=t.params,r=e.viz;d3.select(r.root+" .col_container").append("path").style("stroke-width","0").attr("d","M 0,0 L 1000,-1000, L 1000,0 Z").attr("fill",r.background_color).attr("class","right_slant_triangle").attr("transform","translate("+r.clust.dim.width+","+r.norm_labels.width.col+")"),d3.select(r.root+" .col_container").append("path").style("stroke-width","0").attr("d","M 0,0 L 500,-500, L 0,-500 Z").attr("fill",r.background_color).attr("class","left_slant_triangle").attr("transform","translate(-1,"+r.norm_labels.width.col+")");var s=r.clust.margin.top+r.uni_margin/5;d3.select(r.viz_svg).append("rect").attr("fill",r.background_color).attr("width",r.clust.margin.left).attr("height",s).attr("class","top_left_white");var l=r.cat_room.col+1.5*r.uni_margin;d3.select(r.viz_svg).append("rect").attr("fill",r.background_color).attr("width",2*r.clust.dim.width).attr("height",l).attr("class","top_right_white").attr("transform",function(){var t=r.clust.margin.left+r.clust.dim.width,e=r.norm_labels.width.col+r.norm_labels.margin.top-r.uni_margin;return"translate("+t+", "+e+")"}),p=r.clust.margin.left+r.clust.dim.width+r.uni_margin,v=r.norm_labels.margin.top+r.norm_labels.width.col+2.5*r.uni_margin;var c=1.15*r.cat_room.symbol_width,d=.65,_=1.25;r.show_categories.col&&d3.select(r.viz_svg).selectAll().data(r.all_cats.col).enter().append("text").classed("col_cat_super",!0).style("font-size",c+"px").style("opacity",d).style("cursor","default").attr("transform",function(t){var e=parseInt(t.split("-")[1],10),o=v+_*r.cat_room.symbol_width*e;return"translate("+p+","+o+")"}).text(function(t){return o(r,t,"col")}),n(t),v=r.show_dendrogram?r.clust.margin.top+r.clust.dim.height+r.dendro_room.col-2*r.uni_margin:r.clust.margin.top+r.clust.dim.height;var u=d3.select(r.viz_svg).append("g").classed("bottom_spillover_container",!0).attr("transform",function(){return"translate(0,"+v+")"});u.append("rect").attr("class","bottom_spillover").attr("fill",r.background_color).attr("width",r.svg_dim.width).attr("height",2*r.svg_dim.height),p=r.clust.margin.left,v=0,u.append("g").classed("col_dendro_icons_container",!0).attr("transform","translate("+p+","+v+")").append("g").classed("col_dendro_icons_group",!0),i(t,"col");var p=r.clust.margin.left+r.clust.dim.width,v=r.clust.margin.top+r.clust.dim.height,f=r.cat_room.col+r.clust.dim.width,m=r.cat_room.row+10*r.uni_margin;d3.select(r.viz_svg).append("rect").attr("fill",r.background_color).attr("width",f).attr("height",m).attr("transform",function(){return"translate("+p+","+v+")"}).classed("white_bars",!0).classed("dendro_corner_spillover",!0),p=0,v=r.clust.margin.top+r.clust.dim.height,f=r.clust.margin.left,m=10*r.clust.dim.height,d3.select(r.viz_svg).append("rect").attr("fill",r.background_color).attr("width",f).attr("height",m).attr("transform",function(){return"translate("+p+","+v+")"}).classed("white_bars",!0).classed("dendro_col_spillover",!0),a(t)}},function(t,e){"use strict";t.exports=function(t,e,r){var o;if(t.cat_names[r][e]===e){var a=parseInt(e.split("-")[1],10)+1;o="Category "+a}else o=t.cat_names[r][e];return o}},function(t,e,r){"use strict";var o=r(79);t.exports=function(t){var e=t.params;_.each(["row","col"],function(r){e.viz.show_categories[r]&&d3.selectAll(e.root+" ."+r+"_cat_super").on("dblclick",function(){e.sim_mat&&(r="both"),d3.selectAll(e.root+" .toggle_"+r+"_order .btn").classed("active",!1);var a=this.__data__.replace("-","_")+"_index";e.viz.sim_mat?(o(t,a,"row"),o(t,a,"col")):o(t,a,r)})})}},function(t,e,r){"use strict";var o=r(54),a=r(70),n=r(36),i=r(27),s=r(80),l=r(65);t.exports=function(t,e,r){var c=t.params,d=l(c),u=0;1==d.zoom_y&&1==d.zoom_x||(s(t,0,0,1),u=1200);var p;"row"===r?p="col":"col"===r&&(p="row"),c.viz.run_trans=!0,"row"===p?c.viz.inst_order.row=e:"col"===p&&(c.viz.inst_order.col=e),c.viz.show_dendrogram&&o(t,r),"row"===p?c.viz.x_scale.domain(c.matrix.orders[c.viz.inst_order.row+"_row"]):"col"==p&&c.viz.y_scale.domain(c.matrix.orders[c.viz.inst_order.col+"_col"]);var v;v=d3.selectAll(c.root+" .tile")[0].length0&&c.viz.ds_level>=0){i(c);var h=!0,g=!0,w=!0;a(t,h,g,w)}setTimeout(function(){c.viz.run_trans=!1},2500)}},function(t,e,r){"use strict";var o=r(2),a=r(81),n=r(70),i=r(36),s=r(85);t.exports=function(t,e,r,l){function c(t,e){d3.selectAll(d.root+" ."+t+"_dendro_crop_buttons").transition().duration(g).style("opacity",e)}var d=t.params;if(d3.selectAll(d.viz.root_tips).style("display","none"),d.zoom_info=i(),n(t),!d.viz.run_trans){var u=d.viz.clust.dim.height/2,p=u/l;if(r>=u-p){var v=u-r,f=-u/l+v;r+=f}r<-(u-p)&&(v=u+r,f=u/l-v,r+=f);var m=l,h=1,g=700,w=-(m-1)*u;d3.select(d.root+" .clust_group").transition().duration(g).attr("transform","translate("+[0,0+w]+") scale("+h+","+m+")translate("+[e,r]+")"),d3.select(d.root+" .row_label_zoom_container").transition().duration(g).attr("transform","translate("+[0,w]+") scale("+m+","+m+")translate("+[0,r]+")"),d3.select(d.root+" .row_cat_container").transition().duration(g).attr("transform","translate("+[0,w]+") scale(1,"+m+")translate("+[0,r]+")"),d3.select(d.root+" .row_dendro_container").transition().duration(g).attr("transform","translate("+[0,w]+") scale("+h+","+m+")translate("+[d.viz.uni_margin/2,r]+")");var y;_.each(["row","col"],function(t){y=d3.select(d.root+" ."+t+"_dendro_crop_buttons").style("opacity"),d3.selectAll(d.root+" ."+t+"_dendro_crop_buttons").style("opacity",0),setTimeout(c,700,t,y)}),d3.select(d.root+" .col_zoom_container").transition().duration(g).attr("transform"," scale("+h+","+h+")translate("+[e,0]+")"),d3.select(d.root+" .col_cat_container").transition().duration(g).attr("transform"," scale("+h+",1)translate("+[e,0]+")"),d3.select(d.root+" .col_dendro_container").transition().duration(g).attr("transform"," scale("+h+",1)translate("+[e,d.viz.uni_margin/2]+")");var x=d.viz.clust.margin.top+w+r*m,b=d.viz.clust.margin.left+e;d.zoom_behavior.scale(m).translate([b,x]),a(d),d3.select(d.root+" .row_label_zoom_container text").empty()===!1&&d3.select(d.root+" .row_label_zoom_container").each(function(){var t=d3.select(this).select("text")[0][0].getBBox();d3.select(this).select("rect").attr("x",.5*t.x).attr("y",0).attr("width",.5*t.width).attr("height",d.viz.y_scale.rangeBand()).style("fill","yellow")}),d3.select(d.root+" .row_dendro_icons_group").attr("transform","translate("+[0,0+w]+") scale("+h+","+m+")translate("+[e,r]+")"),d3.select(d.root+" .row_dendro_icons_group").selectAll("path").attr("transform",function(t){var e=d.viz.uni_margin,r=t.pos_mid;return"translate("+e+","+r+") scale(1, "+1/m+")"}),d3.select(d.root+" .col_dendro_icons_group").attr("transform",function(){var t=" scale("+h+","+m+")";return t}),d3.select(d.root+" .col_dendro_icons_group").selectAll("path").attr("transform",function(t){var e=t.pos_mid,r=d.viz.uni_margin;return"translate("+e+","+r+") scale(1,1)"}),o.has(d.network_data.col_nodes[0],"value")&&d3.selectAll(d.root+" .col_bars").attr("width",function(t){var e=0;return t.value>0&&(e=d.labels.bar_scale_col(t.value)/h),e}),o.has(d.network_data.row_nodes[0],"value")&&d3.selectAll(d.root+" .row_bars").transition().duration(g).attr("width",function(t){var e=0;return e=d.labels.bar_scale_row(Math.abs(t.value))/m}).attr("x",function(t){var e=0;return e=-d.labels.bar_scale_row(Math.abs(t.value))/m}),s(d)}}},function(t,e,r){"use strict";var o=r(2),a=r(82),n=r(83);t.exports=function(t){d3.selectAll(t.root+" .row_label_group").select("text").text(function(t){return o.normal_name(t)}),d3.selectAll(t.root+" .col_label_text").select("text").text(function(t){return o.normal_name(t)}),n(t),d3.selectAll(t.root+" .row_label_group").each(function(){a(t,this,"row")}),d3.selectAll(t.root+" .col_label_group").each(function(){a(t,this,"col")})}},function(t,e){"use strict";t.exports=function(t,e,r){function o(){return d=d3.select(this).text(),c=d.length,u=c-3,l=d.substring(0,u)+".."}function a(t){return d=d3.select(this).text(),c=".."===d.slice(-2)?d.length-2:d.length,_=t.name,u=c+2,l=_.substring(0,u)+"..",l.length>_.length&&(l=_),l}function n(t,e){return s=e<1?t:t*e}if("none"!=d3.select(e).style("display")){var i,s,l,c,d,_,u,p,v=t.viz.norm_labels.width[r];i="row"===r?t.viz.zoom_ratio.y?t.zoom_behavior.scale()/t.viz.zoom_ratio.y:t.zoom_behavior.scale():t.viz.zoom_ratio.x>1?t.zoom_behavior.scale()/t.viz.zoom_ratio.x:t.zoom_behavior.scale();var f;d3.select(e).select("text").each(function(t){f=t.name.length});var m=d3.select(e).select("text").node().getBBox().width;if(s=n(m,i),s>v)for(p=1;pv&&(d3.select(e).select("text").text(o),m=d3.select(e).select("text").node().getBBox().width,s=n(m,i));else if(s<.75*v)for(p=1;pa&&(n.row>t.labels.max_allow_fs?(e=t.viz.zoom_ratio.y?t.zoom_behavior.scale()/t.viz.zoom_ratio.y:t.zoom_behavior.scale(),e<1&&(e=1),r=t.labels.max_allow_fs/e,d3.selectAll(t.root+" .row_label_group").select("text").style("font-size",r+"px").attr("y",.5*t.viz.rect_height+.35*r)):d3.selectAll(t.root+" .row_label_group").select("text").style("font-size",t.labels.default_fs_row+"px").attr("y",.5*t.viz.rect_height+.35*t.labels.default_fs_row)),n.col>a&&(n.col>t.labels.max_allow_fs?(e=t.viz.zoom_ratio.x>1?t.zoom_behavior.scale()/t.viz.zoom_ratio.x:t.zoom_behavior.scale(),e<1&&(e=1),r=t.labels.max_allow_fs/e,r>.7*t.viz.rect_width&&(r=.7*t.viz.rect_width),d3.selectAll(t.root+" .col_label_text").select("text").style("font-size",r+"px")):d3.selectAll(t.root+" .col_label_text").select("text").style("font-size",t.labels.default_fs_col+"px"))}},function(t,e){"use strict";t.exports=function(t){var e={};return t.viz.zoom_ratio.x>1?(e.row=t.labels.default_fs_row*t.zoom_behavior.scale(),e.col=t.labels.default_fs_col*t.zoom_behavior.scale()):(e.row=t.labels.default_fs_row*t.zoom_behavior.scale()/t.viz.zoom_ratio.y,e.col=t.labels.default_fs_col*t.zoom_behavior.scale()),e}},function(t,e){"use strict";t.exports=function(t){t.zoom_info.zoom_x*t.viz.border_width.x>1?d3.selectAll(t.root+" .vert_lines").select("line").style("display","block").style("opacity",0).transition().style("opacity",1):d3.selectAll(t.root+" .vert_lines").select("line").style("display","none"),t.zoom_info.zoom_y*t.viz.border_width.y>1?d3.selectAll(t.root+" .horz_lines").select("line").style("display","block").style("opacity",0).transition().style("opacity",1):d3.selectAll(t.root+" .horz_lines").select("line").style("display","none")}},function(t,e,r){"use strict";var o=r(77),a=r(48);t.exports=function(t){var e=t.params,r=e.viz,n=2.75;d3.select(e.root+" .row_cat_label_container").empty()&&(d3.select(t.params.viz.viz_svg).append("g").classed("row_cat_label_container",!0),d3.select(t.params.viz.viz_svg+" .row_cat_label_container").append("g").classed("row_cat_label_bar_container",!0));var i=r.clust.margin.left+r.clust.dim.width+r.uni_margin,s=r.norm_labels.margin.top+r.norm_labels.width.col+2.5*r.uni_margin,l=1.15*r.cat_room.symbol_width,c=.65,d=1.25;d3.select(e.root+" .row_cat_label_container").attr("transform",function(){return i=r.norm_labels.margin.left+r.norm_labels.width.row+r.cat_room.symbol_width+n*r.uni_margin,s=r.clust.margin.top-r.uni_margin,"translate("+i+","+s+") rotate(-90)"}),d3.selectAll(e.root+" .row_cat_label_container text").remove(),d3.selectAll(e.root+" .row_cat_selection_bar").remove(),d3.selectAll(t.params.viz.root_tips+"_row_cat_super").remove();var u=50,p=-75,v=a().attr("class",function(){var t=e.viz.root_tips.replace(".",""),r=t+" d3-tip "+t+"_row_cat_super";return r}).direction("south_custom").offset([u,p]).style("display","none").style("opacity",0).html(function(t){var a,n=e.network_data.row_nodes[0][t];if(n.indexOf("

")>-1){var i=n.split(": ")[0],s=n.split("

")[1];a=i+"

"+s}else a=o(r,t,"row");return a}),f=d*r.cat_room.symbol_width,m=.9*f;if(d3.select(e.root+" .row_cat_label_container").selectAll().data(r.all_cats.row).enter().append("text").style("width","100px").style("height",m+"px").classed("row_cat_super",!0).style("font-size",l+"px").style("opacity",c).style("cursor","default").attr("transform",function(t){var e=d*r.cat_room.symbol_width*parseInt(t.split("-")[1],10);return"translate(0,"+e+")"}).text(function(t){return o(r,t,"row")}),d3.select(e.root+" .row_cat_label_container").selectAll().data(r.all_cats.row).enter().append("rect").classed("row_cat_super",!0).classed("row_cat_selection_bar",!0).style("height",m+"px").style("fill","green").style("width","120px").style("opacity",0).attr("transform",function(t){var e=f*(parseInt(t.split("-")[1],10)-.75);return"translate(0,"+e+")"}).on("mouseover",function(t){d3.selectAll(e.viz.root_tips+"_row_cat_super").style("display","block").style("opacity",1),v.show(t)}).on("mouseout",function(){v.hide(this),d3.selectAll(".d3-tip").style("display","none"),d3.selectAll(e.viz.root_tips+"_row_cat_super").style("display","none").style("opacity",0)}),d3.select(e.root+" .row_cat_selection_bar").empty()===!1&&d3.selectAll(e.root+" .row_cat_selection_bar").call(v),_.has(e.network_data,"row_cat_bars")){d3.select(e.root+" .enr_title").remove();var h=d3.select(e.root+" .viz_svg").append("g").classed("enr_title",!0).attr("transform",function(){var t=d3.select(e.root+" .row_cat_label_container").attr("transform").split("(")[1].split(")")[0],r=Number(t.split(",")[0])-10;return"translate("+String(r)+", 0)"});h.append("rect").attr("width",e.viz.cat_room.row).attr("height",25).attr("fill","white");var g=e.network_data.enrichrgram_lib.substring(0,40);h.append("text").attr("transform","translate(0, 17)").text(g.replace(/_/g," ")).style("font-size","15px").attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif'),d3.selectAll(e.root+" .enrichr_bars").remove();var w=e.viz.clust.margin.top-35,y=e.network_data.row_cat_bars[0],x=d3.scale.linear().domain([0,y]).range([0,w]);d3.select(e.root+" .row_cat_label_bar_container").selectAll().data(e.network_data.row_cat_bars).enter().append("rect").classed("enrichr_bars",!0).attr("height",m+"px").attr("fill","red").attr("width",function(t){var e=x(t);return e+"px"}).attr("opacity",.4).attr("transform",function(t,e){var r=f*(e-.75);return"translate(0, "+r+")"})}}},function(t,e,r){"use strict";var o=r(88);t.exports=function(t){var e,r=t.params;d3.select(r.root+" .expand_button").on("click",null);var a=.4;e=d3.select(r.root+" .expand_button").empty()?d3.select(r.viz.viz_svg).append("text").attr("class","expand_button"):d3.select(r.root+" .expand_button"),e.attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-family","FontAwesome").attr("font-size","30px").text(function(){return r.viz.is_expand===!1?"":""}).attr("y","25px").attr("x","25px").style("cursor","pointer").style("opacity",a).on("mouseover",function(){d3.select(this).style("opacity",.75)}).on("mouseout",function(){d3.select(this).style("opacity",a)}).on("click",function(){r.viz.is_expand===!1?(d3.select(this).text(function(){return""}),r.viz.is_expand=!0,d3.selectAll(r.root+" .borders").style("fill","white"),d3.select(r.root+" .sidebar_wrapper").style("display","none")):(d3.select(this).text(function(){return""}),r.viz.is_expand=!1,d3.selectAll(r.root+" .borders").style("fill","#eee"),d3.select(r.root+" .viz_wrapper").style("width","100px"),d3.select(r.root+" .sidebar_wrapper").style("display","block")),d3.select(r.viz.viz_svg).style("opacity",.5);var e=500;1==r.viz.run_trans&&(e=2500),setTimeout(o,e,t)})}},function(t,e,r){"use strict";var o=r(2),a=r(89),n=r(97),i=r(98),s=r(99),l=r(100),c=r(101),d=r(102),u=r(103),p=r(104),v=r(105),f=r(106),m=r(107),h=r(108),g=r(109),w=r(110),y=r(111),x=r(112),b=r(81),z=r(55),k=r(54),A=r(70),T=r(18),S=r(113),E=r(86),B=r(78),O=r(114),M=r(36),N=r(115);t.exports=function(t){var e=t.params,r=T(e);d3.select(e.root+" .play_button"),d3.select(e.root+" .sidebar_wrapper").style("height",r.height+"px"),d3.select(e.viz.viz_wrapper).style("margin-top",r.top+"px").style("width",r.width+"px").style("height",r.height+"px"),e=w(e),e.zoom_info=M(),i(e);var C=d3.select(e.viz.viz_svg);_.each(e.network_data.links,function(t){t.x=e.viz.x_scale(t.target),t.y=e.viz.y_scale(t.source)}),C.on(".zoom",null),e.zoom_behavior.scaleExtent([1,e.viz.square_zoom*e.viz.zoom_ratio.x]).on("zoom",function(){a(t)}),e.viz.do_zoom&&C.call(e.zoom_behavior),n(t),C.attr("width",e.viz.svg_dim.width).attr("height",e.viz.svg_dim.height),C.select(".super_background").style("width",e.viz.svg_dim.width).style("height",e.viz.svg_dim.height),C.select(".grey_background").attr("width",e.viz.clust.dim.width).attr("height",e.viz.clust.dim.height),setTimeout(S,100,e);var L=e.network_data.row_nodes,R=o.pluck(L,"name");y(e,C),C.selectAll(".highlighting_rect").attr("width",.8*e.viz.x_scale.rangeBand()).attr("height",.8*e.viz.y_scale.rangeBand()),p(e),u(e,C),v(e,C),C.selectAll(".row_label_group").each(function(){var t=d3.select(this).select("text")[0][0].getBBox();d3.select(this).select("rect").attr("x",t.x).attr("y",0).attr("width",t.width).attr("height",e.viz.rect_height).style("fill","yellow").style("opacity",function(t){var e=0;return 1===t.target&&(e=1),e})}),C.selectAll(".row_label_group").select("text").attr("y",.5*e.viz.rect_height+.35*e.labels.default_fs_row),o.has(e.network_data.row_nodes[0],"value")&&x(t,C),C.selectAll(".row_cat_group").attr("transform",function(t){var r=_.indexOf(R,t.name);return"translate(0, "+e.viz.y_scale(r)+")"}),C.selectAll(".row_cat_group").select("path").attr("d",function(){var t=e.viz.cat_room.symbol_width-1,r=0,o=1,a=e.viz.rect_height/2,n=e.viz.cat_room.symbol_width-1,i=e.viz.rect_height,s="M "+t+","+r+" L "+o+","+a+", L "+n+","+i+" Z";return s});var F=!0;e.viz.show_dendrogram?(z(t,"row",F),z(t,"col",F),s(e,C),k(t,"row",0),k(t,"col",0)):s(e,C),f(e,C),m(e,C),h(e,C),g(e,C),l(e,C),c(e.viz,C),N(e),d(e,C),e.zoom_behavior.scale(1).translate([e.viz.clust.margin.left,e.viz.clust.margin.top]),b(e),d3.select(e.root+" .clust_container").attr("transform","translate("+e.viz.clust.margin.left+","+e.viz.clust.margin.top+")"),t.params.viz.ds_level===-1&&A(t),E(t),d3.select(e.viz.viz_svg).style("opacity",1),B(t),d3.select(t.params.root+" .row_slider_group").style("opacity",0),d3.select(t.params.root+" .col_slider_group").style("opacity",0),setTimeout(O,500,t,"row"),setTimeout(O,500,t,"col")}},function(t,e,r){"use strict";var o=r(90),a=r(95),n=r(96);t.exports=function(t){var e=t.params,r={};if(r.zoom_x=d3.event.scale,r.zoom_y=d3.event.scale,r.trans_x=e.zoom_behavior.translate()[0]-e.viz.clust.margin.left,r.trans_y=e.zoom_behavior.translate()[1]-e.viz.clust.margin.top,d3.selectAll(e.viz.root_tips).style("display","none"),e.zoom_info=a(e,r),e.zoom_info=n(e,r),e.is_slider_drag===!1&&e.is_cropping===!1){var i=e.zoom_info.trans_x+e.viz.clust.margin.left,s=e.zoom_info.trans_y+e.viz.clust.margin.top;e.zoom_behavior.translate([i,s]),t.params=e,o(t)}}},function(t,e,r){"use strict";var o=r(83),a=r(70),n=r(91),i=r(62),s=r(65),l=r(92),c=r(94);t.exports=function(t){function e(t){var e=t.params,r=c(e);r===!0&&setTimeout(l,50,t)}var r=t.params,d=r.zoom_info,_=s(r);d3.select(r.root+" .clust_group").attr("transform","translate("+[d.trans_x,d.trans_y]+") scale("+d.zoom_x+","+d.zoom_y+")"),d3.select(r.root+" .row_label_zoom_container").attr("transform","translate("+[0,d.trans_y]+") scale("+d.zoom_y+")"),d3.select(r.root+" .col_zoom_container").attr("transform","translate("+[d.trans_x,0]+") scale("+d.zoom_x+")"),d3.select(r.root+" .row_cat_container").attr("transform","translate("+[0,d.trans_y]+") scale( 1,"+d.zoom_y+")"),d3.select(r.root+" .row_dendro_container").attr("transform","translate("+[r.viz.uni_margin/2,d.trans_y]+") scale( 1,"+d.zoom_y+")"),d3.select(r.root+" .row_dendro_icons_group").attr("transform",function(){var t=d.trans_y,e="translate("+[0,t]+") ",r="scale(1, "+d.zoom_y+")",o=e+r;return o}),d3.select(r.root+" .col_dendro_icons_group").attr("transform",function(){var t=d.trans_x,e="translate("+[t,0]+")",r="scale("+d.zoom_x+", 1)",o=e+r;return o}),i(r,d,"row"),i(r,d,"col"),d3.select(r.root+" .col_cat_container").attr("transform","translate("+[d.trans_x,0]+") scale("+d.zoom_x+",1)"),d3.select(r.root+" .col_dendro_container").attr("transform","translate("+[d.trans_x,r.viz.uni_margin/2]+") scale("+d.zoom_x+",1)"), +n(r,d),d3.select(r.root+" .viz_svg").attr("is_zoom",function(){var t=Number(d3.select(r.root+" .viz_svg").attr("is_zoom"));return d3.select(r.root+" .viz_svg").attr("stopped_zoom",1),t+1});var u=function(){d3.select(r.root+" .viz_svg").attr("is_zoom",function(){var t=Number(d3.select(r.root+" .viz_svg").attr("is_zoom"));return t-1})};if(o(r),d.zoom_y<=_.zoom_y){var p=!1;d.zoom_y<_.zoom_y&&(p=!0);var v=!1;a(t,v,p)}setTimeout(u,50),setTimeout(e,100,t)}},function(t,e,r){"use strict";var o=r(2);t.exports=function(t){var e=t.zoom_info;o.has(t.network_data.row_nodes[0],"value")&&d3.selectAll(t.root+" .row_bars").attr("width",function(r){var o=0;return o=t.labels.bar_scale_row(Math.abs(r.value))/e.zoom_y}).attr("x",function(r){var o=0;return o=-t.labels.bar_scale_row(Math.abs(r.value))/e.zoom_y}),o.has(t.network_data.col_nodes[0],"value")&&d3.selectAll(t.root+" .col_bars").attr("width",function(r){var o=0;return r.value>0&&(o=t.labels.bar_scale_col(r.value)/e.zoom_x),o})}},function(t,e,r){"use strict";var o=r(83),a=r(82),n=r(93),i=r(85),s=r(70),l=r(94);t.exports=function(t){function e(){_.each(["row","col"],function(t){d3.selectAll(r.root+" ."+t+"_label_group").filter(function(){return"none"!=d3.select(this).style("display")}).select("text").style("font-size",function(){var t=Number(d3.select(this).style("font-size").replace("px",""));return t})})}var r=t.params,c=l(r);if(c===!0){_.each(["row","col"],function(t){d3.selectAll(r.root+" ."+t+"_label_group").select("text").style("opacity",1),d3.selectAll(r.root+" ."+t+"_cat_group").select("path").style("display","block")}),s(t,!0),d3.selectAll(r.viz.root_tips).style("display","block"),d3.selectAll(r.root+" .row_label_group").select("text").style("display","none"),d3.selectAll(r.root+" .row_label_group").select("text").style("display","block"),d3.select(r.root+" .viz_svg").attr("stopped_zoom",0),d3.selectAll(r.root+" .row_label_group").select("text").style("display","block"),d3.selectAll(r.root+" .col_label_group").select("text").style("display","block"),i(r),t.params.viz.x_offset=0;var d=150;_.each(["row","col"],function(t){var e=n(r,t);e1&&(e.zoom_y=0?e.trans_y=0:e.trans_y<=-e.pan_room_y&&(e.trans_y=-e.pan_room_y),e}},function(t,e){"use strict";t.exports=function(t,e){var r=t.viz;return r.zoom_ratio.x>1&&(e.zoom_x0?e.trans_x=0:e.trans_x<=-e.pan_room_x&&(e.trans_x=-e.pan_room_x),e}},function(t,e,r){"use strict";var o=r(80);t.exports=function(t){var e=t.params;d3.selectAll(e.viz.zoom_element).on("dblclick.zoom",null),d3.select(e.viz.zoom_element).on("dblclick",function(){o(t,0,0,1)})}},function(t,e){"use strict";t.exports=function(t){var e=1,r=0,o=0,a=t.viz.clust.dim.height/2,n=-(e-1)*a;d3.select(t.root+" .clust_group").attr("transform","translate("+[0,0+n]+") scale(1,"+e+")translate("+[r,o]+")"),d3.select(t.root+" .row_label_zoom_container").attr("transform","translate("+[0,n]+") scale("+e+","+e+")translate("+[0,o]+")"),d3.select(t.root+" .row_cat_container").attr("transform","translate("+[0,n]+") scale(1,"+e+")translate("+[0,o]+")"),d3.select(t.root+" .row_dendro_container").attr("transform","translate("+[0,n]+") scale("+e+","+e+")translate("+[t.viz.uni_margin/2,o]+")"),d3.select(t.root+" .col_zoom_container").attr("transform"," scale(1,1)translate("+[r,0]+")"),d3.select(t.root+" .col_cat_container").attr("transform"," scale(1,1)translate("+[r,0]+")"),d3.select(t.root+" .col_dendro_container").attr("transform"," scale(1,1)translate("+[r,t.viz.uni_margin/2]+")"),d3.select(t.root+" .row_dendro_icons_group").attr("transform",function(){return"translate(0,0) scale(1)"}),d3.select(t.root+" .row_dendro_icons_group").selectAll("path").attr("transform",function(t){var e=7,r=t.pos_mid;return"translate("+e+","+r+") scale(1, 1)"})}},function(t,e){"use strict";t.exports=function(t,e){var r=!(arguments.length<=2||void 0===arguments[2])&&arguments[2],o={};r===!1?o.run_transition=!1:o=r;var a,n=t.viz.duration,i=t.network_data.col_nodes,s=t.network_data.col_nodes_names;o.run_transition?(a=e.transition().delay(o.update).duration(n),e.selectAll(".col_cat_group").data(i,function(t){return t.name}).transition().delay(o.update).duration(n).attr("transform",function(e){var r=_.indexOf(s,e.name);return"translate("+t.viz.x_scale(r)+",0)"}),e.selectAll(".col_dendro_group").data(i,function(t){return t.name}).transition().delay(o.update).duration(n).attr("transform",function(e){var r=_.indexOf(s,e.name);return"translate("+t.viz.x_scale(r)+",0)"})):(a=e,e.selectAll(".col_cat_group").data(i,function(t){return t.name}).attr("transform",function(e){var r=_.indexOf(s,e.name);return"translate("+t.viz.x_scale(r)+",0)"}),d3.select(t.root).selectAll(".col_dendro_group").data(i,function(t){return t.name}).attr("transform",function(e){var r=_.indexOf(s,e.name);return"translate("+t.viz.x_scale(r)+",0)"}));var l,c;_.each(["row","col"],function(e){var r=t.viz.all_cats[e].length;for(l=0;l0&&(r=t.labels.bar_scale_col(e.value)),r}).attr("height",.66*t.viz.rect_width)}},function(t,e,r){"use strict";var o=r(19),a=r(22),n=r(21),i=r(31),s=r(30);t.exports=function(t){if(t=o(t),t.viz=n(t.viz),t.viz=a(t.viz),t.sim_mat&&(t.viz.clust.dim.width<=t.viz.clust.dim.height?t.viz.clust.dim.height=t.viz.clust.dim.width:t.viz.clust.dim.width=t.viz.clust.dim.height),t.viz=s(t.viz),t.viz.x_scale.rangeBands([0,t.viz.clust.dim.width]),t.viz.y_scale.rangeBands([0,t.viz.clust.dim.height]),t.viz.border_width.x=t.viz.x_scale.rangeBand()/t.viz.border_fraction,t.viz.border_width.y=t.viz.y_scale.rangeBand()/t.viz.border_fraction,t.viz.rect_width=t.viz.x_scale.rangeBand()-t.viz.border_width.x,t.viz.rect_height=t.viz.y_scale.rangeBand()-t.viz.border_width.y,null!=t.viz.ds)for(var e;e0&&_.each(t.viz.ds,function(e){e.y_scale=d3.scale.ordinal().rangeBands([0,t.viz.clust.dim.height]),e.y_scale.domain(d3.range(e.num_rows+1)),e.rect_height=e.y_scale.rangeBand()-t.viz.border_width.y}),t.viz.square_zoom=t.viz.norm_labels.width.col/(t.viz.rect_width/2),t=i(t)}},function(t,e,r){"use strict";var o=r(43),a=r(44),n=r(47);t.exports=function(t,e){var r=t.network_data.row_nodes_names;if(t.viz.ds_level===-1)e.selectAll(".row").attr("transform",function(e){var o=_.indexOf(r,e.name),a=t.viz.y_scale(o);return"translate(0,"+a+")"}),e.selectAll(".row").selectAll(".tile").attr("transform",function(e){return n(t,e)}).attr("width",t.viz.rect_width).attr("height",t.viz.rect_height),e.selectAll(".row").selectAll(".tile_up").attr("d",function(){return o(t)}).attr("transform",function(e){return n(t,e)}),e.selectAll(".row").selectAll(".tile_dn").attr("d",function(){return a(t)}).attr("transform",function(e){return n(t,e)});else{var i=t.viz.ds_level,s=".ds"+String(i)+"_row",l=t.viz.ds[i].rect_height;e.selectAll(s).attr("transform",function(e){var r=t.viz.ds[i].y_scale(e.row_index);return"translate(0,"+r+")"}),e.selectAll(s).selectAll(".tile").attr("transform",function(e){return n(t,e)}).attr("width",t.viz.rect_width).attr("height",l)}}},function(t,e,r){"use strict";var o=r(23);t.exports=function(t,e){var r=t.params;r=o(r),e.selectAll(".row_bars").attr("width",function(t){var e=0;return e=r.labels.bar_scale_row(Math.abs(t.value))}).attr("x",function(t){var e=0;return e=-r.labels.bar_scale_row(Math.abs(t.value))}).attr("height",r.viz.y_scale.rangeBand())}},function(t,e){"use strict";t.exports=function(t){var e=d3.select(t.root+" .clust_container").attr("transform"),r=Number(e.split("(")[1].split(",")[0]),o=Number(e.split(",")[1].replace(")","")),a=r+t.viz.clust.dim.width/2,n=o+t.viz.clust.dim.height/2;d3.select(t.root+" .play_button").attr("transform",function(){return"translate("+a+","+n+")"})}},function(t,e){"use strict";t.exports=function(t,e){var r,o,a=t.params.viz;if("row"===e){var n=a.svg_dim.width-3*a.uni_margin;r=a.clust.margin.left+a.clust.dim.width+5*a.dendro_room.row,r>n&&(r=n),o=a.clust.margin.top+3*a.uni_margin}else r=2*a.uni_margin,o=a.clust.margin.top+a.clust.dim.height+a.dendro_room.col-2*a.uni_margin;d3.select(t.params.root+" ."+e+"_slider_group").attr("transform",function(){var t;return t="row"===e?"translate("+r+","+o+")":"translate("+r+","+o+"), rotate(-90)"}).style("opacity",1)}},function(t,e){"use strict";t.exports=function(t){var e=arguments.length<=1||void 0===arguments[1]?0:arguments[1],r=0;e>0&&(r=2e3);var o=d3.selectAll(t.root+" .horz_lines"),a=d3.selectAll(t.root+" .vert_lines");o.style("opacity",0).attr("transform",function(e){var r=e.row_index,o=t.viz.y_scale(r);return"translate( 0,"+o+") rotate(0)"}).transition().duration(e).delay(r).style("opacity",1),o.append("line").attr("x1",0).attr("x2",t.viz.clust.dim.width).style("stroke-width",function(){var e=t.viz.border_width.y;return e+"px"}),a.style("opacity",0).attr("transform",function(e){var r=e.col_index,o=t.viz.x_scale(r);return"translate("+o+") rotate(-90)"}).transition().duration(e).delay(r).style("opacity",1),a.append("line").attr("x1",0).attr("x2",-t.viz.clust.dim.height).style("stroke-width",function(){var e=t.viz.border_width.x;return e+"px"})}},function(t,e,r){"use strict";var o=r(117),a=r(48),n=r(118),i=r(119),s=r(120),l=r(121);t.exports=function(t){var e=t.params;d3.select(e.root+" .col_cat_outer_container").empty()?d3.select(e.root+" .col_container").append("g").attr("class","col_cat_outer_container").attr("transform",function(){var t=e.viz.norm_labels.width.col+2;return"translate(0,"+t+")"}).append("g").attr("class","col_cat_container"):d3.select(e.root+" .col_container").select("col_cat_outer_container").attr("transform",function(){var t=e.viz.norm_labels.width.col+2;return"translate(0,"+t+")"}),d3.selectAll(e.viz.root_tips+"_col_cat_tip").remove();var r=a().attr("class",function(){var t=e.viz.root_tips.replace(".",""),r=t+" d3-tip "+t+"_col_cat_tip";return r}).direction("s").offset([5,0]).style("display","none").html(function(t){return o(e,t,this,"col")});d3.select(e.root+" .col_cat_container").selectAll("g").data(e.network_data.col_nodes,function(t){return t.name}).enter().append("g").attr("class","col_cat_group").attr("transform",function(t){var r=_.indexOf(e.network_data.col_nodes_names,t.name);return"translate("+e.viz.x_scale(r)+",0)"}),d3.select(e.root+" .col_cat_container").selectAll(".col_cat_group").call(r),d3.selectAll(e.root+" .col_cat_group").each(function(){var o,a=this;_.each(e.viz.all_cats.col,function(s){var d=parseInt(s.split("-")[1],10),_="col_cat_rect_"+String(d);o=d3.select(a).select("."+_).empty()?d3.select(a).append("rect").attr("class",_).attr("cat",s).attr("transform",function(){var t=e.viz.cat_room.symbol_width+e.viz.cat_room.separation,r=d*t;return"translate(0,"+r+")"}).on("click",function(r){if(d3.select(this).classed("cat_strings"))if(d3.event.shiftKey===!0)c(t,r,this,"col");else{var o=l(e,r,this,"col");$(e.root+" .dendro_info").modal("toggle");var a=o.join(", ");d3.select(e.root+" .dendro_info input").attr("value",a)}}):d3.select(a).select("."+_),o.attr("width",e.viz.x_scale.rangeBand()).attr("height",e.viz.cat_room.symbol_width).style("fill",function(t){var r=t[s],o=e.viz.cat_colors.col[s][r];return o}).on("mouseover",r.show).on("mouseout",function(){r.hide(this),n(e),d3.select(this).classed("hovering",!1),d3.selectAll(".d3-tip").style("display","none")}),i(e.viz,"col",o,s)})});var c=_.debounce(s,1500)}},function(t,e,r){"use strict";var o=r(77);t.exports=function(t,e,r,a){function n(){var e=!1;if(d3.select(r).classed("hovering")){var o=[a];t.viz.sim_mat&&(o=["row","col"]),_.each(o,function(r){"string"==typeof l&&l.indexOf("Not ")<0&&"false"!=l&&(e=!0),e&&d3.selectAll(t.root+" ."+r+"_cat_group").selectAll("rect").style("opacity",function(e){var r=d3.select(this).style("opacity");if(d3.select(this).classed("cat_strings")&&d3.select(this).classed("filtered_cat")===!1){var o,a=d3.select(this).attr("cat");o=e[a].indexOf(": ")>=0?e[a].split(": ")[1]:e[a],r=a===i&&o===l?t.viz.cat_colors.active_opacity:t.viz.cat_colors.opacity/4}return r})})}}d3.selectAll(t.viz.root_tips+"_col_cat_tip").style("display","block"),d3.selectAll(t.viz.root_tips+"_row_cat_tip").style("display","block");var i=d3.select(r).attr("cat"),s=o(t.viz,i,a),l=e[i];"string"==typeof l&&l.indexOf(": ")>=0&&(l=l.split(": ")[1]);var c=s+": "+l;return d3.select(r).classed("hovering",!0),setTimeout(n,500),c}},function(t,e){"use strict";t.exports=function(t){_.each(["row","col"],function(e){d3.selectAll(t.root+" ."+e+"_cat_group").selectAll("rect").style("opacity",function(){var e=d3.select(this).style("opacity");return d3.select(this).classed("cat_strings")&&d3.select(this).classed("filtered_cat")===!1&&(e=t.viz.cat_colors.opacity),e})})}},function(t,e){"use strict";t.exports=function(t,e,r,o){function a(t){"string"==typeof t&&t.indexOf(i)>-1&&(t=t.split(i)[1]);var e=parseFloat(t);return e}var n=!(arguments.length<=4||void 0===arguments[4])&&arguments[4],i=": ",s=t.cat_info[e][o].type;"cat_strings"===s?n?r.classed("cat_strings",!0).style("opacity",0).transition().duration(1e3).style("opacity",t.cat_colors.opacity):r.classed("cat_strings",!0).style("opacity",t.cat_colors.opacity):r.classed("cat_values",!0).style("opacity",function(r){var n=r[o],i=a(n);return t.cat_info[e][o].cat_scale(Math.abs(i))}).style("fill",function(e){var r,n=a(e[o]);return r=n>0?t.cat_value_colors[0]:t.cat_value_colors[1]})}},function(t,e,r){"use strict";var o=r(121);t.exports=function(t,e,r,a){function n(t,e,r){d3.selectAll(i.root+" ."+t+"_cat_group").selectAll("rect").style("opacity",function(t){var o=d3.select(this).style("opacity");if(d3.select(this).classed("cat_strings")){var a,n=d3.select(this).attr("cat");a=t[n],n===e&&a===r&&(o=1,d3.select(this).classed("filtered_cat",!0))}return o})}var i=t.params,s=d3.select(r).attr("cat"),l=e[s],c=o(i,e,r,a),d={row:"col",col:"row"},_=d[a],u={};if(u[a]=c,t.params.cat_filter[a]===!1){if(t.params.dendro_filter.row===!1&&t.params.dendro_filter.col===!1&&t.params.cat_filter[_]===!1){var p=t.params.network_data.col_nodes_names,v=t.params.network_data.row_nodes,f=t.params.network_data.col_nodes;t.filter_viz_using_names(u),t.params.inst_nodes.row_nodes=v,t.params.inst_nodes.col_nodes=f,t.params.cat_filter[a]=p,n(a,s,l)}}else u=t.params.cat_filter[a],t.filter_viz_using_names(u),t.params.cat_filter[a]=!1,d3.selectAll(i.root+" ."+a+"_cat_group").selectAll("rect").classed("filtered_cat",!1)}},function(t,e,r){"use strict";var o=r(2);t.exports=function(t,e,r,a){var n=d3.select(r).attr("cat"),i=e[n],s=t.network_data[a+"_nodes"],l=_.filter(s,function(t){return t[n]==i}),c=o.pluck(l,"name");return c}},function(t,e,r){"use strict";var o=r(117),a=r(48),n=r(118),i=r(119),s=r(120),l=r(121);t.exports=function(t){var e=!(arguments.length<=1||void 0===arguments[1])&&arguments[1],r=t.params;d3.select(r.root+" .row_cat_outer_container").empty()?d3.select(r.root+" .row_container").append("g").attr("class","row_cat_outer_container").attr("transform","translate("+r.viz.norm_labels.width.row+",0)").append("g").attr("class","row_cat_container"):d3.select(r.root+" .row_container").select("row_cat_outer_container").attr("transform","translate("+r.viz.norm_labels.width.row+",0)"),d3.select(r.root+" .row_cat_container").select(".white_bars").empty()?d3.select(r.root+" .row_cat_container").append("rect").attr("class","white_bars").attr("fill",r.viz.background_color).attr("width",r.viz.cat_room.row+"px").attr("height",function(){var t=r.viz.clust.dim.height;return t}):d3.select(r.root+" .row_cat_container").select(".white_bars").attr("fill",r.viz.background_color).attr("width",r.viz.cat_room.row+"px").attr("height",function(){var t=r.viz.clust.dim.height;return t}),d3.selectAll(r.viz.root_tips+"_row_cat_tip").remove();var c=a().attr("class",function(){var t=r.viz.root_tips.replace(".",""),e=t+" d3-tip "+t+"_row_cat_tip";return e}).direction("e").offset([5,0]).style("display","none").html(function(t){return o(r,t,this,"row")});d3.select(r.root+" .row_cat_container").selectAll("g").data(r.network_data.row_nodes,function(t){return t.name}).enter().append("g").attr("class","row_cat_group").attr("transform",function(t){var e=_.indexOf(r.network_data.row_nodes_names,t.name);return"translate(0, "+r.viz.y_scale(e)+")"}),d3.select(r.root+" .row_cat_container").selectAll(".row_cat_group").call(c);var d,u;d3.selectAll(r.root+" .row_cat_group rect").remove(),r.viz.show_categories.row&&d3.selectAll(r.root+" .row_cat_group").each(function(){u=this,_.each(r.viz.all_cats.row,function(o){var a=parseInt(o.split("-")[1],10),s="row_cat_rect_"+String(a);d=d3.select(u).select("."+s).empty()?d3.select(u).append("rect").attr("class",s).attr("cat",o):d3.select(u).select("."+s),d.attr("width",r.viz.cat_room.symbol_width).attr("height",r.viz.y_scale.rangeBand()).style("fill",function(t){var e=t[o],a=r.viz.cat_colors.row[o][e];return a}).attr("x",function(){var t=r.viz.cat_room.symbol_width+r.viz.uni_margin/2;return t+"px"}).attr("transform",function(){var t=r.viz.cat_room.symbol_width+r.viz.cat_room.separation,e=a*t;return"translate("+e+",0)"}).on("click",function(e){if(d3.select(this).classed("cat_strings"))if(d3.event.shiftKey===!0)p(t,e,this,"row");else{var o=l(r,e,this,"row");$(r.root+" .dendro_info").modal("toggle");var a=o.join(", ");d3.select(r.root+" .dendro_info input").attr("value",a)}}).on("mouseover",c.show).on("mouseout",function(){c.hide(this),n(r),d3.select(this).classed("hovering",!1),d3.selectAll(".d3-tip").style("display","none")}),i(r.viz,"row",d,o,e)})});var p=_.debounce(s,1500)}},function(t,e,r){"use strict";var o=r(55);t.exports=function(t){var e=t.params,r=e.viz.dendro_room.row+e.viz.uni_margin,a=e.viz.clust.margin.left+e.viz.clust.dim.width,n=e.viz.clust.margin.top;d3.select(e.root+" .row_dendro_outer_container").empty()?(d3.select(e.root+" .viz_svg").append("g").attr("class","row_dendro_outer_container").attr("transform","translate("+a+","+n+")"),d3.select(e.root+" .row_dendro_outer_container").append("rect").classed("row_dendro_spillover",!0).attr("fill",e.viz.background_color).attr("width",r+"px").attr("height",e.viz.svg_dim.height),d3.select(e.root+" .row_dendro_outer_container").append("g").attr("class","row_dendro_container").attr("transform","translate("+e.viz.uni_margin/2+",0)")):(d3.select(e.root+" .viz_svg").select("row_dendro_outer_container").attr("transform","translate("+a+","+n+")"),d3.select(e.root+" .row_dendro_outer_container").select(".row_dendro_spillover").attr("width",r+"px").attr("height",e.viz.svg_dim.height)),o(t,"row",!1),"clust"!=e.viz.inst_order.col&&d3.selectAll(e.root+" .row_dendro_group").remove()}},function(t,e,r){"use strict";var o=r(55);t.exports=function(t){var e=t.params,r=e.viz.clust.margin.left,a=e.viz.clust.margin.top+e.viz.clust.dim.height,n=e.viz.dendro_room.col+e.viz.uni_margin;d3.select(e.root+" .col_dendro_outer_container").empty()?(d3.select(e.root+" .viz_svg").append("g").attr("class","col_dendro_outer_container").attr("transform","translate("+r+","+a+")"),d3.select(e.root+" .col_dendro_outer_container").append("rect").classed("col_dendro_spillover",!0).attr("fill",e.viz.background_color).attr("width",e.viz.svg_dim.width).attr("height",n+"px"),d3.select(e.root+" .col_dendro_outer_container").append("g").attr("class","col_dendro_container").attr("transform","translate(0,"+e.viz.uni_margin/2+")"), +d3.select(e.root+" .col_dendro_outer_container").append("rect").classed("col_dendro_spillover_top",!0).attr("fill",e.viz.background_color).attr("width",e.viz.svg_dim.width).attr("height",e.viz.svg_dim.height).attr("transform","translate(0,"+e.viz.dendro_room.col+")")):(d3.select(e.root+" .viz_svg").select("col_dendro_outer_container").attr("transform","translate("+r+","+a+")"),d3.select(e.root+" .col_dendro_outer_container").select(".col_dendro_spillover").attr("width",e.viz.svg_dim.width).attr("height",n+"px")),o(t,"col",!1),"clust"!=e.viz.inst_order.row&&d3.selectAll(e.root+" .col_dendro_group").remove()}},function(t,e,r){"use strict";var o=r(126);t.exports=function(t){o(t,"row"),o(t,"col")}},function(t,e,r){"use strict";var o=r(127),a=r(114);t.exports=function(t,e){function r(){t.params.is_slider_drag=!0;var r=d3.event.y;r<0&&(r=0),r>i&&(r=i),this.nextSibling&&this.parentNode.appendChild(this),r=d3.round(r,-1);var a=10-r/10;d3.select(this).attr("transform","translate(0, "+r+")"),o(t,e,a)}function n(){var r=d3.mouse(this),a=d3.round(r[1],-1);d3.select(t.params.root+" ."+e+"_group_circle").attr("transform","translate(0, "+a+")");var n=10-a/10;o(t,e,n)}var i=100,s=d3.behavior.drag().on("drag",r).on("dragend",function(){t.params.is_slider_drag=!1}),l=d3.select(t.params.root+" .viz_svg").append("g").classed(e+"_slider_group",!0);a(t,e);var c=i+20,d=30;l.append("rect").classed(e+"_slider_background",!0).attr("height",c+"px").attr("width",d+"px").attr("fill",t.params.viz.background_color).attr("transform",function(){var t="translate(-10, -5)";return t}).style("opacity",0),l.append("line").style("stroke-width",i/7+"px").style("stroke","black").style("stroke-linecap","round").style("opacity",0).attr("y1",0).attr("y2",function(){return i-2}).on("click",n);var _=-i/40;l.append("path").style("fill","black").attr("transform","translate("+_+", 0)").attr("d",function(){var t=0,e=0,r=0,o=i,a=i/10,n=0,s="M"+t+","+e+", L"+r+", "+o+", L"+a+","+n+" Z";return s}).style("opacity",.35).on("click",n);var u=.35,p=.6;l.append("circle").classed(e+"_group_circle",!0).attr("r",.08*i).attr("transform",function(){return"translate(0, "+i/2+")"}).style("fill","blue").style("opacity",u).on("mouseover",function(){d3.select(this).style("opacity",p)}).on("mouseout",function(){d3.select(this).style("opacity",u)}).call(s)}},function(t,e,r){"use strict";var o=r(55);t.exports=function(t,e,r){var a=t.params;"row"===e?a.group_level.row=r:"col"===e&&(a.group_level.col=r);var n=!0;o(t,e,n)}},function(t,e,r){"use strict";var o=r(60);t.exports=function(t){var e=t.params.viz,r=e.clust.margin.left+e.clust.dim.width+e.uni_margin+e.dendro_room.row,a=d3.select(e.viz_svg).append("g").classed("right_spillover_container",!0).attr("transform",function(){return"translate("+r+", 0)"}),n=e.norm_labels.margin.top+e.norm_labels.width.col;a.append("rect").attr("fill",e.background_color).attr("width",10*e.clust.dim.width).attr("height",e.svg_dim.height+"px").attr("class","white_bars").attr("class","right_spillover").attr("transform",function(){return"translate( 0,"+n+")"});var i=0,s=e.clust.margin.top;a.append("g").classed("row_dendro_icons_container",!0).attr("transform","translate("+i+","+s+")").append("g").classed("row_dendro_icons_group",!0),o(t,"row"),i=e.clust.margin.left+e.clust.dim.width,s=n;var l=e.dendro_room.row+e.uni_margin,c=e.cat_room.col+e.uni_margin;d3.select(e.viz_svg).append("rect").attr("fill",e.background_color).attr("width",l).attr("height",c).attr("transform",function(){return"translate("+i+","+s+")"}).classed("white_bars",!0).classed("dendro_row_spillover",!0)}},function(t,e,r){"use strict";var o=r(130),a=r(131),n=r(133),i=r(134),s=r(136),l=r(137),c=r(139),d=r(140),_=r(163),u=r(164),p=r(165),v=r(166),f=r(167),m=r(168);t.exports=function(){var t=this,e=t.params;if(d3.select(e.root+" .running_demo").empty()){d3.select(e.root+" .play_button").classed("running_demo",!0),f(e,!1),$.blockUI({css:{border:"none",padding:"15px",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px",opacity:0,color:"#fff",cursor:"default"}}),d3.selectAll(".blockUI").style("opacity",0);var r=750;t.params.viz.is_expand===!1&&(r=o(e,r,_),r-=1500),r=o(e,r,a),r=o(e,r,n),r=o(t,r,i),r=o(e,r,p),r=o(e,r,s),r=o(e,r,m),r=o(e,r,u),r=o(e,r,l),r=o(e,r,c),r=o(t,r,d),r=o(e,r,_),r=o(e,r,v)}}},function(t,e){"use strict";t.exports=function(t,e,r){var o=(setTimeout(r().run,e,t),r().get_duration());return e+=o}},function(t,e,r){"use strict";var o=r(132);t.exports=function(){function t(t){var e="Clustergrammer allows users to generate\ninteractive and sharable visualizations\nby uploading a matrix",a="This demo will quickly overview some\nof Clustergrammer's interactive features";setTimeout(o,0,t,e,4500/r),setTimeout(o,4500/r,t,a,4500/r)}function e(){return 1e4/r}var r=1;return{run:t,get_duration:e}}},function(t,e){"use strict";t.exports=function(t,e,r){var o=e.split("\n");o.length<3&&o.push(""),d3.select(t.root+" .demo_group").style("opacity",0).transition().duration(250).style("opacity",1).transition().duration(250).delay(r).style("opacity",0);for(var a=0;a0?f.update=1e3:f.update=0,v>0?f.enter=1e3:f.enter=0,f.enter=f.enter+f.update,f.run_transition=!0;var m=t.network_data.links.length,h=e.network_data.links.length,g=.5*e.matrix.def_large_matrix;return(m>g||h>g)&&(f.run_transition=!1,f.update=0,f.enter=0),f}},function(t,e,r){"use strict";var o=r(146),a=r(49),n=r(67),i=r(147),s=r(151),l=r(39),c=r(152),d=r(155),_=r(81),u=r(48);t.exports=function(t,e,r){var p=t.params;d3.selectAll(p.viz.root_tips).remove();var v=u().attr("class",function(){var t=p.viz.root_tips.replace(".",""),e=t+" d3-tip "+t+"_tile_tip";return e}).direction("nw").offset([0,0]).style("display","none").html(function(t){var e,r=String(t.value.toFixed(3));if(p.keep_orig){var o=String(t.value_orig.toFixed(3));e="

"+t.row_name+" and "+t.col_name+"

normalized value: "+r+"

original value: "+o+"
"}else e="

"+t.row_name+" and "+t.col_name+"

value: "+r+"
";return e});d3.select(p.root+" .clust_group").call(v),d(p);for(var f=1e3,m=e.row_nodes,h=e.col_nodes,g=e.links,w=g,y=0;y0?t.matrix.tile_colors[0]:t.matrix.tile_colors[1]}).attr("fill-opacity",function(e){var r=t.matrix.opacity_scale(Math.abs(e.value));return r}):l.style("fill",function(e){return e.value>0?t.matrix.tile_colors[0]:t.matrix.tile_colors[1]}).attr("fill-opacity",function(e){var r=t.matrix.opacity_scale(Math.abs(e.value));return r}),l.each(function(t){Math.abs(t.value_up)>0&&Math.abs(t.value_dn)>0&&d3.select(this).remove()})}},function(t,e,r){"use strict";var o=r(43),a=r(44),n=r(45),i=r(46),s=r(47);t.exports=function(t,e,r,l,c,d,u){var p=_.filter(e,function(t){return 0!=t.value_up||0!=t.value_dn}),v=d3.select(r).selectAll(".tile_up").data(p,function(t){return t.col_name}),f=v.on("mouseover",function(){for(var e=arguments.length,r=Array(e),o=0;o0&&Math.abs(t.value_dn)>0&&d3.select(this).remove()})}},function(t,e){"use strict";t.exports=function(t,e,r){var o=t.network_data.row_nodes,a=t.network_data.col_nodes,n=d3.select(t.root+" .clust_group").selectAll(".row").data(t.matrix.matrix,function(t){return t.name}).exit();e.run_transition?n.transition().duration(r).style("opacity",0).remove():n.style("opacity",0).remove(),d3.selectAll(t.root+" .row_label_group").data(o,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .col_label_group").data(a,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .row_cat_group").data(o,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .row_dendro_group").data(o,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .col_label_text").data(a,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .horz_lines").data(o,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .vert_lines").data(a,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .col_cat_group").data(a,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove(),d3.selectAll(t.root+" .col_dendro_group").data(a,function(t){return t.name}).exit().transition().duration(r).style("opacity",0).remove()}},function(t,e,r){"use strict";var o=r(153);t.exports=function(t,e,r,a){var n=d3.select(t.root+" .clust_group").selectAll(".row").data(t.matrix.matrix,function(t){return t.name}).enter().append("g").classed("row",!0).attr("transform",function(e){return"translate(0,"+t.viz.y_scale(e.row_index)+")"});n.each(function(n){o(t,n,e,r,a,this)})}},function(t,e,r){"use strict";var o=r(154),a=r(45),n=r(46),i=r(47);t.exports=function(t,e,r,s,l,c){var d=e.row_data,u=_.filter(d,function(t){return 0!==t.value}),p=d3.select(c).selectAll("rect").data(u,function(t){return t.col_name}).enter().append("rect").attr("class","tile row_tile").attr("width",t.viz.rect_width).attr("height",t.viz.rect_height).style("fill",function(e){return e.value>0?t.matrix.tile_colors[0]:t.matrix.tile_colors[1]}).on("mouseover",function(){for(var e=arguments.length,r=Array(e),o=0;o0&&(r=t.matrix.opacity_scale(Math.abs(e.value_up))),r});var p=d3.select(r).selectAll(".tile_dn").data(d,function(t){return t.col_name}).enter().append("path").attr("class","tile_dn").attr("d",function(){return a(t)}).attr("transform",function(e){return n(t,e)}).style("fill",function(){return t.matrix.tile_colors[1]}).on("mouseover",function(e){d3.selectAll(t.root+" .row_label_group text").classed("active",function(t){return e.row_name===t.name}),d3.selectAll(t.root+" .col_label_text text").classed("active",function(t){return e.col_name===t.name}),t.matrix.show_tile_tooltips&&i.show(e)}).on("mouseout",function(){d3.selectAll(t.root+" text").classed("active",!1),t.matrix.show_tile_tooltips&&i.hide()});p.style("fill-opacity",0).transition().delay(s.enter).duration(l).style("fill-opacity",function(e){var r=0;return Math.abs(e.value_up)>0&&(r=t.matrix.opacity_scale(Math.abs(e.value_dn))),r}),c.each(function(t){Math.abs(t.value_up)>0&&Math.abs(t.value_dn)>0&&d3.select(this).remove()})}},function(t,e){"use strict";t.exports=function(t){d3.select(t.root+" .clust_container").attr("transform","translate("+t.viz.clust.margin.left+","+t.viz.clust.margin.top+")"),d3.select(t.root+" .col_label_outer_container").attr("transform","translate(0,"+t.viz.norm_labels.width.col+")"),d3.select(t.root+" .col_cat_outer_container").attr("transform",function(){var e=t.viz.norm_labels.width.col+2;return"translate(0,"+e+")"})}},function(t,e,r){"use strict";var o=(r(127),r(79)),a=r(78),n=r(157);t.exports=function(t){function e(e,r){var o=2-r,a=t.params.matrix.abs_max_val*o;t.params.matrix.opacity_scale.domain([0,a]),d3.selectAll(t.params.root+" .tile").style("fill-opacity",function(e){var r=t.params.matrix.opacity_scale(Math.abs(e.value));return r})}var r=t.params,i=d3.select(r.root+" .gene_search_box")[0][0],s=new Awesomplete(i,{minChars:1,maxItems:15}),l=t.params.network_data.row_nodes_names;s.list=l,d3.selectAll(".awesomplete ul").style("z-index",99),$(r.root+" .gene_search_box").keyup(function(e){if(13===e.keyCode){var o=$(r.root+" .gene_search_box").val();n(t,o,l)}}),$(r.root+" .submit_gene_button").off().click(function(){var e=$(r.root+" .gene_search_box").val();n(t,e,l)});var c;if(c=r.sim_mat?["both"]:["row","col"],_.each(c,function(e){$(r.root+" .toggle_"+e+"_order .btn").off().click(function(a){var n=$(a.target).attr("name").replace("_row","").replace("_col","");d3.selectAll(r.root+" .toggle_"+e+"_order .btn").classed("active",!1),d3.select(this).classed("active",!0),"both"!=e?o(t,n,e):(o(t,n,"row"),o(t,n,"col"))})}),a(t),d3.select(t.params.root+" .opacity_slider").select("#handle-one").empty()){var d=d3.slider().snap(!0).value(1).min(.1).max(1.9).step(.1).on("slide",function(t,r){e(t,r)});d3.select(t.params.root+" .opacity_slider").call(d)}}},function(t,e,r){"use strict";var o=r(80);t.exports=function(t,e,r){var a="name";if(r.indexOf(e)!==-1){d3.selectAll(t.params.root+" .row_label_group").select("rect").style("opacity",0);var n=_.indexOf(r,e),i=t.params.viz.y_scale(n),s=t.params.viz.clust.dim.height/2-i,l=t.params.viz.zoom_ratio.x;o(t,0,s,l),t.params.zoom_info.zoom_y=l,d3.selectAll(t.params.root+" .row_label_group").filter(function(t){return t[a]===e}).select("rect").style("opacity",1)}}},function(t,e){"use strict";t.exports=function(t){t.dendro_filter.row===!1&&"clust"===t.viz.inst_order.col&&d3.select(t.root+" .row_slider_group").style("opacity",1).style("pointer-events","all"),d3.selectAll(t.root+" .toggle_row_order .btn").attr("disabled",null),t.dendro_filter.col===!1&&"clust"===t.viz.inst_order.row&&d3.select(t.root+" .col_slider_group").style("opacity",1).style("pointer-events","all"),d3.selectAll(t.root+" .toggle_col_order .btn").attr("disabled",null),d3.selectAll(t.root+" .gene_search_button .btn").attr("disabled",null),t.viz.run_trans=!1}},function(t,e){"use strict";t.exports=function(t,e){_.each(["row","col"],function(r){var o;o="row"===r?"col":"row",d3.selectAll(e.root+" .toggle_"+o+"_order .btn").filter(function(){return d3.select(this).attr("name")===t.inst_order[r]}).classed("active",!0)})}},function(t,e,r){"use strict";var o=r(161),a=r(2);t.exports=function(t,e){var r,n,i,s,l,c,d,u,p=!(arguments.length<=2||void 0===arguments[2])&&arguments[2],v=0,f=0;_.each(e,function(e){s=e.name,p===!0&&(s.indexOf(" ")?s=s.split(" ")[0]:s.indexOf("_")&&(s=s.split("_")[0])),v=0,o(e),_.each(t,function(t){if(r=t.cat_title,n=t.cats,l="false",f=-1,u=0,_.each(n,function(t){c=t.cat_name,i=t.members,_.contains(i,s)&&(l=c,f=u),u+=1}),a.has(t,"pval")){var o=t.pval.toExponential();d=r+": "+l+"

Pval "+String(o)+"

"}else d=r.indexOf("cat-")===-1?r+": "+l:l;e["cat-"+String(v)]=d,e["cat_"+String(v)+"_index"]=f,v+=1})})}},function(t,e){"use strict";t.exports=function(t){var e=_.keys(t);_.each(e,function(e){e.indexOf("cat-")>-1&&delete t[e],e.indexOf("cat_")>-1&&delete t[e]})}},function(t,e,r){"use strict";var o=r(146),a=r(67),n=r(70),i=r(155);t.exports=function(t){d3.selectAll(t.params.root+" .row_cat_group").remove(),d3.selectAll(t.params.root+" .row_label_group").remove(),d3.selectAll(t.params.root+" .row").remove();var e=!0,r=!0,s=!0;n(t,e,r,s),a(t);var l=t.params.network_data.col_nodes;d3.selectAll(t.params.root+" .col_label_group").data(l,function(t){return t.name}).exit().style("opacity",0).remove(),d3.selectAll(t.params.root+" .col_label_text").data(l,function(t){return t.name}).exit().style("opacity",0).remove(),d3.selectAll(t.params.root+" .col_cat_group").data(l,function(t){return t.name}).exit().style("opacity",0).remove(),d3.selectAll(t.params.root+" .col_dendro_group").data(l,function(t){return t.name}).exit().style("opacity",0).remove(),i(t.params);var c={};c.enter=0,c.update=0,c.run_transition=!1;var d=0;o(t,d,c)}},function(t,e,r){"use strict";var o=r(135);t.exports=function(){function t(t){var e=Number(d3.select(t.root+" .expand_button").attr("x").replace("px","")),n=Number(d3.select(t.root+" .expand_button").attr("y").replace("px","")),i=0,s=400;setTimeout(o,i,t,"single",e,n),setTimeout(r,s,t),setTimeout(a,1500,t)}function e(){return 3500}function r(t){$(t.root+" .expand_button").d3Click()}function a(t){n(t,"row","clust"),n(t,"col","clust")}function n(t,e,r){var o=d3.selectAll(".toggle_"+e+"_order .btn").filter(function(){return this.__data__==r})[0];$(o).click()}return jQuery.fn.d3Click=function(){this.each(function(t,e){var r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.dispatchEvent(r)})},{run:t,get_duration:e}}},function(t,e,r){"use strict";var o=r(132),a=r(138),n=r(127);t.exports=function(){function t(t){var e="Identify row and column groups\nof varying sizes using the\nsliders and dendrogram";o(t,e,1e4),setTimeout(a,3e3,t,"slider_col",7e3),setTimeout(r,4e3,t,"row",3),setTimeout(r,5e3,t,"row",4),setTimeout(r,6e3,t,"row",5),setTimeout(r,7e3,t,"row",6), +setTimeout(r,8e3,t,"row",7),setTimeout(r,9e3,t,"row",5)}function e(){return 11e3}function r(t,e,r){$(cgm.params.root+" .slider_col").slider("value",r/10),n(cgm,e,r)}return{run:t,get_duration:e}}},function(t,e,r){"use strict";var o=r(132),a=r(135);t.exports=function(){function t(t){var e="Row and column categories\ncan be use to reorder\nby double-clicking";o(t,e,7e3);var n=d3.selectAll(t.root+" .col_cat_super").filter(function(){return"cat-1"===this.__data__})[0],i=d3.select(".col_cat_super").attr("transform"),s=Number(i.split("(")[1].split(",")[0].replace(")",""))+20,l=Number(i.split(",")[1].replace(")","")),c=4e3;setTimeout(a,c,t,"double",s,l);var d=c+300;setTimeout(r,d,t,n)}function e(){return 8e3}function r(t,e){$(e).d3DblClick()}return jQuery.fn.d3DblClick=function(){this.each(function(t,e){var r=document.createEvent("MouseEvents");r.initMouseEvent("dblclick",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.dispatchEvent(r)})},{run:t,get_duration:e}}},function(t,e,r){"use strict";var o=r(132),a=r(167);t.exports=function(){function t(t){var r="Clustergrammer is built with gene\nexpression data in mind and interfaces\nwith several Ma'ayan lab web tools",a="The example data being visualized is\ngene expression data obtained from the\nCancer Cell Line Encyclopedia",n="For more information please view\nthe help documentation";setTimeout(o,0,t,r,4500),setTimeout(o,4500,t,a,4500),setTimeout(o,9e3,t,n,4500),setTimeout(e,14e3,t)}function e(t){d3.select(t.root+" .play_button").classed("running_demo",!1),a(t,!0)}function r(){return 12e3}return{run:t,get_duration:r}}},function(t,e){"use strict";t.exports=function(t,e){e===!1?d3.select(t.root+" .play_button").transition().duration(500).style("opacity",0):(d3.select(t.root+" .play_button").transition().duration(500).style("opacity",1),$.unblockUI())}},function(t,e,r){"use strict";var o=r(132),a=r(135);t.exports=function(){function t(t){var e="View additional controls\nby clicking the menu button";o(t,e,4e3);var n=Number(d3.select(t.root+" .expand_button").attr("x").replace("px","")),i=Number(d3.select(t.root+" .expand_button").attr("y").replace("px","")),s=3e3,l=3400;setTimeout(a,s,t,"single",n,i),setTimeout(r,l,t)}function e(){return 5e3}function r(t){$(t.root+" .expand_button").d3Click()}return jQuery.fn.d3Click=function(){this.each(function(t,e){var r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.dispatchEvent(r)})},jQuery.fn.d3DblClick=function(){this.each(function(t,e){var r=document.createEvent("MouseEvents");r.initMouseEvent("dblclick",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.dispatchEvent(r)})},{run:t,get_duration:e}}},function(t,e,r){"use strict";var o=r(170),a=r(171);t.exports=function(){var t=this,e=t.params;o(t);var r=30;a(e,r)}},function(t,e,r){"use strict";var o=r(113);t.exports=function(t){var e=t.params;if(d3.select(e.root+" .play_button").empty()){var r=d3.select(e.root+" .viz_svg").append("g").classed("play_button",!0).classed("running_demo",!1);o(e),r.append("circle").style("r",45).style("fill","white").style("stroke","black").style("stroke-width","3px").style("opacity",.5),r.append("path").attr("d",function(){var t=40,e=22,r=15;return"M-"+r+",-"+e+" l "+t+","+e+" l -"+t+","+e+" z "}).style("fill","black").style("opacity",.5),r.on("mouseover",function(){d3.select(this).select("path").style("fill","red").style("opacity",1),d3.select(this).select("circle").style("opacity",1)}).on("mouseout",function(){d3.select(this).select("path").style("fill","black").style("opacity",.5),d3.select(this).select("circle").style("opacity",.5)}).on("click",function(){t.play_demo()})}}},function(t,e){"use strict";t.exports=function(t,e){if(d3.select(t.root+" .demo_group").empty()){var r=d3.select(t.root+" .clust_container").attr("transform"),o=Number(r.split("(")[1].split(",")[0]),a=Number(r.split(",")[1].replace(")","")),n=d3.select(t.root+" .viz_svg").append("g").classed("demo_group",!0).attr("transform",function(){var t=o+20,e=a+40;return"translate("+t+","+e+")"});n.append("rect").classed("rect_1",!0),n.append("rect").classed("rect_2",!0),n.append("rect").classed("rect_3",!0);var i=1.3*e;n.append("text").attr("id","text_1").attr("font-size",e+"px").attr("font-weight",1e3).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif'),n.append("text").attr("id","text_2").attr("font-size",e+"px").attr("font-weight",1e3).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("transform",function(){return"translate(0,"+String(i)+")"}),n.append("text").attr("id","text_3").attr("font-size",e+"px").attr("font-weight",1e3).attr("font-family",'"Helvetica Neue", Helvetica, Arial, sans-serif').attr("transform",function(){return"translate(0,"+String(2*i)+")"})}}},function(t,e,r){"use strict";var o=r(11),a=r(143);t.exports=function(t){var e=o(this.config,t);a(this,e)}},function(t,e,r){"use strict";var o=r(11),a=r(143);t.exports=function(t){var e,r=!(arguments.length<=1||void 0===arguments[1])&&arguments[1];e=r===!1?this:r;var n,i=e.params,s={};_.each(["row","col"],function(e){var r=i.inst_nodes[e+"_nodes"];if(_.has(t,e))if(t[e].length>0){var o=t[e];n=$.grep(r,function(t){return $.inArray(t.name,o)>-1})}else n=r;else n=r;s[e+"_nodes"]=n});var l=e.params.network_data.row_nodes,c=e.params.network_data.col_nodes,d=o(e.config,s);a(e,d),l.length>e.params.inst_nodes.row_nodes.length&&(e.params.inst_nodes.row_nodes=l),c.length>e.params.inst_nodes.col_nodes.length&&(e.params.inst_nodes.col_nodes=c)}},function(t,e,r){"use strict";var o=r(122),a=r(15),n=r(88),i=r(160);t.exports=function(t,e){null!=t.params.cat_update_callback&&t.params.cat_update_callback(this);var r=t.params.viz.cat_colors.col;i(e,t.params.network_data.row_nodes,!0),i(e,t.params.inst_nodes.row_nodes,!0),t.params=a(t.params,!1),o(t,!0),n(t),t.params.new_row_cats=e,t.params.viz.cat_colors.col=r}},function(t,e,r){"use strict";var o=r(122),a=r(15),n=r(88),i=r(160),s=r(176);t.exports=function(){var t=arguments.length<=0||void 0===arguments[0]||arguments[0],e=this,r=s(e),l=e.params.viz.cat_colors.col;if(i(r,e.params.network_data.row_nodes),i(r,e.params.inst_nodes.row_nodes),e.params.new_row_cats=r,e.params.viz.cat_colors.col=l,t){var c=!0;e.params=a(e.params,c),o(e,!0),n(e)}}},function(t,e){"use strict";t.exports=function(t){function e(t,e,a){r={},r.cat_title=t,r.cats=[],o={},o.cat_name=e,o.members=[],o.members.push(a),r.cats.push(o),p.push(r)}var r,o,a,n,i,s,l,c,d=t.config.network_data.row_nodes,u=": ",p=[],v=d[0],f=_.keys(v),m={};_.each(f,function(t){t.indexOf("cat-")>=0&&(s=v[t],c=parseInt(t.split("cat-")[1],10),l=s.indexOf(u)>=0?s.split(u)[0]:t,m[c]=l)});var h,g=_.keys(m).sort();return _.each(g,function(t){h={},h.cat_title=m[t],h.cats=[],p.push(h)}),_.each(d,function(t){var r=_.keys(t);_.each(r,function(r){if(r.indexOf("cat-")>-1){i=t[r],c=parseInt(r.split("cat-")[1],10);var s=r;i=t[r];var l=t[r],d=t.name;l.indexOf(u)>-1?(s=l.split(u)[0],i=l.split(u)[1]):(s=r,i=l),0===p.length?e(s,i,d):(a=!1,_.each(p,function(t){s===t.cat_title&&(a=!0,n=!1,_.each(t.cats,function(t){i===t.cat_name&&(n=!0,t.members.push(d))}),n===!1&&(o={},o.cat_name=i,o.members=[],o.members.push(d),t.cats.push(o)))}))}})}),p}},function(t,e,r){"use strict";var o=r(141),a=r(178);t.exports=function(t,e){var r=this,n={};n[t]=e,o(this,n),a(r,t,e)}},function(t,e,r){"use strict";var o=r(179);t.exports=function(t,e,r){var a,n,i=t.params;d3.select(i.root+" .slider_"+e).attr("current_state",r),_.each(_.keys(i.viz.possible_filters),function(r){if(a=e.indexOf("row")>-1?"row":e.indexOf("col")>-1?"col":"neither",n=r.indexOf("row")>-1?"row":r.indexOf("col")>-1?"col":"neither",e!=r&&"neither"!=a&&a==n){var s=o(i,r);t.slider_functions[r].value(0),d3.select(i.root+" .title_"+r).text(s.text+s.state),d3.select(i.root+" .slider_"+r).attr("current_state",s.state)}});var s=o(i,e);d3.select(i.root+" .title_"+e).text(s.text+r+s.suffix)}},function(t,e,r){"use strict";var o=r(5);t.exports=function(t,e){var r={},a={},n={};return r.state=o(t.viz.filter_data,e),n.top=e.split("_")[0],n.node=e.split("_")[1],n.measure=e.split("_")[2],"row"===n.node?a.node="rows":a.node="columns","N"===n.top&&(r.suffix=""),"pct"===n.top&&(r.suffix="%"),"sum"==n.measure?a.measure="sum":"var"==n.measure&&(a.measure="variance"),"sum"===n.measure&&(r.text="Top "+a.node+" "+a.measure+": "),"var"===n.measure&&(r.text="Top "+a.node+" "+a.measure+": "),_.keys(t.viz.possible_filters).indexOf("enr_score_type")>-1&&"col"===n.node&&(r.text="Top Enriched Terms: ",r.suffix=""),r}},function(t,e,r){"use strict";var o=r(181),a=r(182);t.exports=function(){var t=o(),e=this.params,r=a(e),n=new Blob([r],{type:"text/plain;charset=utf-8"});t(n,"clustergrammer.txt")}},function(t,e){"use strict";t.exports=function(){/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ +var t=t||navigator.msSaveBlob&&navigator.msSaveBlob.bind(navigator)||function(t){var e=t.document,r=function(){return t.URL||t.webkitURL||t},o=t.URL||t.webkitURL||t,a=e.createElementNS("http://www.w3.org/1999/xhtml","a"),n="download"in a,i=function(r){var o=e.createEvent("MouseEvents");o.initMouseEvent("click",!0,!1,t,0,0,0,0,0,!1,!1,!1,!1,0,null),r.dispatchEvent(o)},s=t.webkitRequestFileSystem,l=t.requestFileSystem||s||t.mozRequestFileSystem,c=function(e){(t.setImmediate||t.setTimeout)(function(){throw e},0)},d="application/octet-stream",_=0,u=[],p=function(){for(var t=u.length;t--;){var e=u[t];"string"==typeof e?o.revokeObjectURL(e):e.remove()}u.length=0},v=function(t,e,r){e=[].concat(e);for(var o=e.length;o--;){var a=t["on"+e[o]];if("function"==typeof a)try{a.call(t,r||t)}catch(n){c(n)}}},f=function(e,o){var c,p,f,m=this,h=e.type,g=!1,w=function(){var t=r().createObjectURL(e);return u.push(t),t},y=function(){v(m,"writestart progress write writeend".split(" "))},x=function(){!g&&c||(c=w(e)),p&&(p.location.href=c),m.readyState=m.DONE,y()},b=function(t){return function(){if(m.readyState!==m.DONE)return t.apply(this,arguments)}},z={create:!0,exclusive:!1};return m.readyState=m.INIT,o||(o="download"),n?(c=w(e),a.href=c,a.download=o,i(a),m.readyState=m.DONE,void y()):(t.chrome&&h&&h!==d&&(f=e.slice||e.webkitSlice,e=f.call(e,0,e.size,d),g=!0),s&&"download"!==o&&(o+=".download"),p=h===d||s?t:t.open(),l?(_+=e.size,void l(t.TEMPORARY,_,b(function(t){t.root.getDirectory("saved",z,b(function(t){var r=function(){t.getFile(o,z,b(function(t){t.createWriter(b(function(r){r.onwriteend=function(e){p.location.href=t.toURL(),u.push(t),m.readyState=m.DONE,v(m,"writeend",e)},r.onerror=function(){var t=r.error;t.code!==t.ABORT_ERR&&x()},"writestart progress write abort".split(" ").forEach(function(t){r["on"+t]=m["on"+t]}),r.write(e),m.abort=function(){r.abort(),m.readyState=m.DONE},m.readyState=m.WRITING}),x)}),x)};t.getFile(o,{create:!1},b(function(t){t.remove(),r()}),b(function(t){t.code===t.NOT_FOUND_ERR?r():x()}))}),x)}),x)):void x())},m=f.prototype,h=function(t,e){return new f(t,e)};return m.abort=function(){var t=this;t.readyState=t.DONE,v(t,"abort")},m.readyState=m.INIT=0,m.WRITING=1,m.DONE=2,m.error=m.onwritestart=m.onprogress=m.onwrite=m.onabort=m.onerror=m.onwriteend=null,t.addEventListener("unload",p,!1),h}(self);return t}},function(t,e,r){"use strict";var o=r(183);t.exports=function(t){var e,r=t.matrix,a={};_.each(["row","col"],function(o){var n;n="row"===o?"col":"row",e=t.inst_order[o],a[n]=r.orders[e+"_"+o]});for(var n="\t",i=t.network_data.row_nodes,s=t.network_data.col_nodes,l=0;l0){a="('"+a+"'";for(var i=0;ie&&(t=i[0],e=n[0]),r>o&&(r=i[1],o=n[1]),r-=a.viz.rect_height,t-=a.viz.rect_width;var s={};return s.row=[],s.col=[],_.each(a.matrix.matrix,function(t){var e=a.viz.y_scale(t.row_index);e>r&&et&&a=i[1])return;if(1===w)"array"==n(i)&&2==i.length&&("left"===_?d.style("left",l):d.style("bottom",l)),f?c.transition().styleTween(_,function(){return t.interpolate(a,l)}).duration("number"==typeof f?f:250):c.style(_,l);else{var u=100-parseFloat(l),p=100-parseFloat(l);"left"===_?d.style("right",u+"%"):d.style("top",p+"%"),f?k.transition().styleTween(_,function(){return t.interpolate(a,l)}).duration("number"==typeof f?f:250):k.style(_,l)}}}function o(t){if(t===s.domain()[0]||t===s.domain()[1])return t;var e=t;if(y)e=a(s(t));else{var r=(t-s.domain()[0])%v;e=t-r,2*Math.abs(r)>=v&&(e+=r>0?v:-v)}return e}function a(t){var e=s.ticks?s.ticks():s.domain(),r=e.map(function(e){return t-s(e)}),o=-1,a=0,n=s.ticks?s.range()[1]:s.rangeExtent()[1];do o++,Math.abs(r[o])0&&o-1)this._list=t.split(/\s*,\s*/);else if(t=a(t),t&&t.children){var e=[];l.apply(t.children).forEach(function(t){if(!t.disabled){var r=t.textContent.trim(),o=t.value||r,a=t.label||r;""!==o&&e.push({label:a,value:o})}}),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return!this.ul.hasAttribute("hidden")},close:function(t){this.opened&&(this.ul.setAttribute("hidden",""),this.index=-1,a.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.ul.removeAttribute("hidden"),this.autoFirst&&this.index===-1&&this["goto"](0),a.fire(this.input,"awesomplete-open")},next:function(){var t=this.ul.children.length;this["goto"](this.index-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.status.textContent=e[t].textContent,a.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e){if(t?this.index=a.siblingIndex(t):t=this.ul.children[this.index],t){var r=this.suggestions[this.index],o=a.fire(this.input,"awesomplete-select",{text:r,origin:e||t});o&&(this.replace(r),this.close({reason:"select"}),a.fire(this.input,"awesomplete-selectcomplete",{text:r}))}},evaluate:function(){var t=this,e=this.input.value;e.length>=this.minChars&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map(function(o){return new r(t.data(o,e))}).filter(function(r){return t.filter(r,e)}).sort(this.sort).slice(0,this.maxItems),this.suggestions.forEach(function(r){t.ul.appendChild(t.item(r,e))}),0===this.ul.children.length?this.close({reason:"nomatches"}):this.open()):this.close({reason:"nomatches"})}},s.all=[],s.FILTER_CONTAINS=function(t,e){return RegExp(a.regExpEscape(e.trim()),"i").test(t)},s.FILTER_STARTSWITH=function(t,e){return RegExp("^"+a.regExpEscape(e.trim()),"i").test(t)},s.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:t$&");return a.create("li",{innerHTML:r,"aria-selected":"false"})},s.REPLACE=function(t){this.input.value=t.value},s.DATA=function(t){return t},Object.defineProperty(r.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),r.prototype.toString=r.prototype.valueOf=function(){return""+this.label};var l=Array.prototype.slice;return a.create=function(t,e){var r=document.createElement(t);for(var o in e){var n=e[o];if("inside"===o)a(n).appendChild(r);else if("around"===o){var i=a(n);i.parentNode.insertBefore(r,i),r.appendChild(i)}else o in r?r[o]=n:r.setAttribute(o,n)}return r},a.bind=function(t,e){if(t)for(var r in e){var o=e[r];r.split(/\s+/).forEach(function(e){t.addEventListener(e,o)})}},a.fire=function(t,e,r){var o=document.createEvent("HTMLEvents");o.initEvent(e,!0,!0);for(var a in r)o[a]=r[a];return t.dispatchEvent(o)},a.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},a.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof Document&&("loading"!==document.readyState?i():document.addEventListener("DOMContentLoaded",i)),s.$=a,s.$$=n,"undefined"!=typeof self&&(self.Awesomplete=s),"object"===e(t)&&t.exports&&(t.exports=s),s}()}).call(e,r(189)(t))},function(t,e){"use strict";t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e,r){var o=r(191);"string"==typeof o&&(o=[[t.id,o,""]]);r(193)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,r){e=t.exports=r(192)(),e.push([t.id,".d3-slider{position:relative;font-family:Verdana,Arial,sans-serif;font-size:1.1em;border:1px solid #aaa;z-index:2}.d3-slider-horizontal{height:.8em}.d3-slider-range{height:.8em}.d3-slider-range,.d3-slider-range-vertical{background:#2980b9;left:0;right:0;position:absolute}.d3-slider-range-vertical{top:0}.d3-slider-vertical{width:.8em;height:100px}.d3-slider-handle{position:absolute;width:1.2em;height:1.2em;border:1px solid #d3d3d3;border-radius:4px;background:#eee;background:linear-gradient(180deg,#eee 0,#ddd);z-index:3}.d3-slider-handle:hover{border:1px solid #999}.d3-slider-horizontal .d3-slider-handle{top:-.3em;margin-left:-.6em}.d3-slider-axis{position:relative;z-index:1}.d3-slider-axis-bottom{top:.8em}.d3-slider-axis-right{left:.8em}.d3-slider-axis path{stroke-width:0;fill:none}.d3-slider-axis line{fill:none;stroke:#aaa;shape-rendering:crispEdges}.d3-slider-axis text{font-size:11px}.d3-slider-vertical .d3-slider-handle{left:-.25em;margin-left:0;margin-bottom:-.6em}",""])},function(t,e){"use strict";t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e=0&&w.splice(e,1)}function s(t){var e=document.createElement("style");return e.type="text/css",n(t,e),e}function l(t){var e=document.createElement("link");return e.rel="stylesheet",n(t,e),e}function c(t,e){var r,o,a;if(e.singleton){var n=g++;r=h||(h=s(e)),o=d.bind(null,r,n,!1),a=d.bind(null,r,n,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=l(e),o=u.bind(null,r),a=function(){i(r),r.href&&URL.revokeObjectURL(r.href)}):(r=s(e),o=_.bind(null,r),a=function(){i(r)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else a()}}function d(t,e,r,o){var a=r?"":o.css;if(t.styleSheet)t.styleSheet.cssText=y(e,a);else{var n=document.createTextNode(a),i=t.childNodes;i[e]&&t.removeChild(i[e]),i.length?t.insertBefore(n,i[e]):t.appendChild(n)}}function _(t,e){var r=e.css,o=e.media;if(o&&t.setAttribute("media",o),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}function u(t,e){var r=e.css,o=e.sourceMap;o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),n=t.href;t.href=URL.createObjectURL(a),n&&URL.revokeObjectURL(n)}var p={},v=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},f=v(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),m=v(function(){return document.head||document.getElementsByTagName("head")[0]}),h=null,g=0,w=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=f()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var r=a(t);return o(r,e),function(t){for(var n=[],i=0;iinput{display:block}div.awesomplete>ul{position:absolute;left:0;z-index:1;min-width:100%;box-sizing:border-box;list-style:none;padding:0;border-radius:.3em;margin:.2em 0 0;background:hsla(0,0%,100%,.9);background:linear-gradient(to bottom right,#fff,hsla(0,0%,100%,.8));border:1px solid rgba(0,0,0,.3);box-shadow:.05em .2em .6em rgba(0,0,0,.2);text-shadow:none}div.awesomplete>ul:empty,div.awesomplete>ul[hidden]{display:none}@supports (transform:scale(0)){div.awesomplete>ul{transition:.3s cubic-bezier(.4,.2,.5,1.4);transform-origin:1.43em -.43em}div.awesomplete>ul:empty,div.awesomplete>ul[hidden]{opacity:0;transform:scale(0);display:block;transition-timing-function:ease}}div.awesomplete>ul:before{content:"";position:absolute;top:-.43em;left:1em;width:0;height:0;padding:.4em;background:#fff;border:inherit;border-right:0;border-bottom:0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}div.awesomplete>ul>li{position:relative;padding:.2em .5em;cursor:pointer}div.awesomplete>ul>li:hover{background:#b8d3e0;color:#000}div.awesomplete>ul>li[aria-selected=true]{background:#3d6d8f;color:#fff}div.awesomplete mark{background:#eaff00}div.awesomplete li:hover mark{background:#b5d100}div.awesomplete li[aria-selected=true] mark{background:#3d6b00;color:inherit}',""])},function(t,e,r){"use strict";var o=r(156),a=r(197),n=r(202),i=r(203),s=r(204),l=r(205),c=r(207),d=r(209);t.exports=function u(t){var e=t.params,u=d3.select(e.root+" .sidebar_wrapper");e.viz.is_expand&&u.style("display","none"),u.append("div").classed("title_section",!0),null!=e.sidebar.title&&u.select(".title_section").append("h4").style("margin-left","20px").style("margin-top","5px").style("margin-bottom","0px").text(e.sidebar.title),u.append("div").style("padding-right","2px").classed("about_section",!0),null!=e.sidebar.about&&u.select(".about_section").append("h5").classed("sidebar_text",!0).style("margin-left","7px").style("margin-top","5px").style("margin-bottom","2px").style("text-align","justify").html(e.sidebar.about),u.append("div").classed("icons_section",!0).style("text-align","center"),t.params.make_modals&&c(e),e.sidebar.icons&&l(t,u),i(e,u),n(u,e),d(u);var r=_.keys(e.viz.possible_filters);r.indexOf("enr_score_type")>-1&&r.sort(function(t,e){return t.toLowerCase().localeCompare(e.toLowerCase())}),t.slider_functions={},_.each(r,function(e){a(t,e)}),o(t),null!==e.ini_view&&(s(e),e.ini_view=null)}},function(t,e,r){"use strict";var o=r(198),a=r(201);t.exports=function(t,e){var r=t.params,n=d3.select(r.root+" .sidebar_wrapper").append("div").classed("div_filters",!0).style("padding-left","10px").style("padding-right","10px");"numerical"==r.viz.possible_filters[e]?o(t,e,n):"categorical"==r.viz.possible_filters[e]&&a(t,e,n)}},function(t,e,r){"use strict";var o=r(179),a=r(199),n=r(5),i=r(12);d3.slider=r(186),t.exports=function(t,e,r){var s=t.params,l={},c=_.keys(s.viz.possible_filters);_.each(c,function(t){if(t!=e){var r=n(s.viz.filter_data,t);l[t]=r}});var d=o(s,e);r.append("div").classed("title_"+e,!0).classed("sidebar_text",!0).classed("slider_description",!0).style("margin-top","5px").style("margin-bottom","3px").text(d.text+d.state+d.suffix),r.append("div").classed("slider_"+e,!0).classed("slider",!0).attr("current_state",d.state);var u=s.network_data.views,p=i(s,u,l);p=p.sort(function(t,r){return r[e]-t[e]});var v=p.length-1,f=0;if(null!==s.requested_view&&e in s.requested_view){var m=s.requested_view[e];if("all"!=m){var h=p.map(function(t){return t[e]}).indexOf(m);h>0&&(f=h)}}var g=d3.slider().value(f).min(0).max(v).step(1).on("slide",function(r,o){w(t,e,p,o)}).on("slideend",function(r,o){w(t,e,p,o)});t.slider_functions[e]=g,d3.select(t.params.root+" .slider_"+e).call(g);var w=_.debounce(a,800)}},function(t,e,r){"use strict";var o=r(141),a=r(178),n=r(200),i=r(14);t.exports=function(t,e,r,s){if(d3.select(t.params.viz.viz_svg).classed("running_update")===!1){var l=t.params,c=r[s][e];a(t,e,c),l=n(l);var d={};if(d[e]=c,d=i(l,d),_.has(r[0],"enr_score_type")){var u=d3.select(l.root+" .toggle_enr_score_type").attr("current_state");d.enr_score_type=u}o(t,d)}}},function(t,e){"use strict";t.exports=function(t){var e;return _.each(["row","col"],function(r){e="row"===r?"col":"row",d3.select(t.root+" .toggle_"+e+"_order .active").empty()===!1?t.viz.inst_order[r]=d3.select(t.root+" .toggle_"+e+"_order").select(".active").attr("name"):t.viz.inst_order[r]="clust"}),t}},function(t,e,r){"use strict";var o=r(14);t.exports=function(t,e,r,a){var n=a.append("div").classed("categorical_filter",!0).classed("toggle_"+r,!0).classed("btn-group-vertical",!0).style("width","100%").style("margin-top","10px").attr("current_state","combined_score"),i=e.viz.filter_data[r],s={combined_score:"Combined Score",pval:"P-Value",zscore:"Z-score"};n.selectAll("button").data(i).enter().append("button").attr("type","button").classed("btn",!0).classed("btn-primary",!0).classed(".filter_button",!0).classed("active",function(t){var e=!1;return"combined_score"==t&&(e=!0),e}).attr("name",function(t){return t}).html(function(t){return s[t]}),$(e.root+" .categorical_filter .btn").off().click(function(){d3.selectAll(e.root+" .categorical_filter .btn").classed("active",!1),d3.select(this).classed("active",!0);var t=d3.select(this).attr("name"),r={enr_score_type:t};o(e,r),d3.select(e.root+" .toggle_enr_score_type").attr("current_state",t)})}},function(t,e){"use strict";t.exports=function(t,e){var r=t.append("div").classed("gene_search_container",!0).style("padding-left","10px").style("padding-right","10px").style("margin-top","10px");r.append("input").classed("form-control",!0).classed("gene_search_box",!0).classed("sidebar_text",!0).attr("type","text").attr("placeholder",e.sidebar.row_search.placeholder).style("height",e.sidebar.row_search.box.height+"px").style("margin-top","10px"),r.append("div").classed("gene_search_button",!0).style("margin-top","5px").attr("data-toggle","buttons").append("button").classed("sidebar_text",!0).html("Search").attr("type","button").classed("btn",!0).classed("btn-primary",!0).classed("submit_gene_button",!0).style("width","100%").style("font-size","14px")}},function(t,e){"use strict";t.exports=function(t,e){var r,o,a,n,i,s={row:"Row",col:"Column",both:""},l=e.append("div").style("padding-left","10px").style("padding-right","10px").classed("reorder_section",!0);i=t.sim_mat?["both"]:["row","col"],_.each(i,function(e){r={clust:"Cluster",rank:"Rank by Sum",rankvar:"Rank by Variance",ini:"Initial Order",alpha:"Alphabetically"};var i;i="row"===e?"col":"row",o=Object.keys(t.matrix.orders);var c=[];_.each(o,function(t){t.indexOf(i)>-1&&(t=t.replace("_row","").replace("_col",""),t.indexOf("cat_")<0&&c.push(t))}),_.keys(t.viz.filter_data).indexOf("enr_score_type")>-1&&(c=["clust","rank"]),c=_.uniq(c),c=c.sort();var d;d="both"!=e?" Order":"Reorder Matrix",l.append("div").classed("sidebar_button_text",!0).style("clear","both").style("margin-top","10px").html(s[e]+d),n=l.append("div").classed("btn-group-vertical",!0).style("width","100%").classed("toggle_"+e+"_order",!0).attr("role","group"),n.selectAll(".button").data(c).enter().append("button").attr("type","button").classed("btn",!0).classed("btn-primary",!0).classed("sidebar_button_text",!0).classed("active",function(e){return a=!1,e==t.viz.inst_order[i]&&(a=!0),a}).attr("name",function(t){return t}).html(function(t){return r[t]})})}},function(t,e,r){"use strict";var o=r(179);t.exports=function(t){_.each(_.keys(t.ini_view),function(e){var r=t.ini_view[e],a=t.viz.possible_filters[e];if("numerical"===a){"all"!=r&&(r=parseInt(r,10)),t.viz.filter_data[e].indexOf(r)<=-1&&(r="all");var n=o(t,e);d3.select(t.root+" .title_"+e).text(n.text+r+n.suffix),d3.select(t.root+" .slider_"+e).attr("current_state",r)}})}},function(t,e,r){"use strict";var o=r(181),a=r(80),n=r(185),i=r(206);t.exports=function(t,e){function r(){d3.select(s.root+" .expand_button").style("opacity",0);var t=d3.select(s.root+" svg").attr("title","test2").attr("version",1.1).attr("xmlns","http://www.w3.org/2000/svg").node().parentNode.innerHTML,e=new Blob([t],{type:"image/svg+xml"});l(e,"clustergrammer.svg"),d3.select(s.root+" .expand_button").style("opacity",.4)}var s=t.params,l=o(),c=e.select(".icons_section").style("margin-top","7px").style("margin-left","5%"),d="22%",_="0px",u="0px";c.append("div").classed("clust_icon",!0).style("float","left").style("width",d).style("padding-left",_).style("padding-right",u).append("i").classed("fa",!0).classed("fa-share-alt",!0).classed("icon_buttons",!0).style("font-size","25px").on("click",function(){$(s.root+" .share_info").modal("toggle"),$(".share_url").val(window.location.href)}).classed("sidebar_tooltip",!0).append("span").classed("sidebar_tooltip_text",!0).html("Share").style("left","0%"),c.append("div").classed("clust_icon",!0).style("float","left").style("width",d).style("padding-left",_).style("padding-right",u).append("i").classed("fa",!0).classed("fa-camera",!0).classed("icon_buttons",!0).style("font-size","25px").on("click",function(){$(s.root+" .picture_info").modal("toggle")}).classed("sidebar_tooltip",!0).append("span").classed("sidebar_tooltip_text",!0).html("Take snapshot").style("left","-100%"),c.append("div").classed("clust_icon",!0).style("float","left").style("width",d).style("padding-left",_).style("padding-right",u).append("i").classed("fa",!0).classed("fa fa-cloud-download",!0).classed("icon_buttons",!0).style("font-size","25px").on("click",function(){t.save_matrix()}).classed("sidebar_tooltip",!0).append("span").classed("sidebar_tooltip_text",!0).html("Download matrix").style("left","-200%"),c.append("div").classed("clust_icon",!0).style("float","left").style("width",d).style("padding-left",_).style("padding-right","-5px").append("i").classed("fa",!0).classed("fa-crop",!0).classed("crop_button",!0).classed("icon_buttons",!0).style("font-size","25px").on("click",function(){if(t.params.dendro_filter.row===!1&&t.params.dendro_filter.col===!1){var e=d3.select(this).classed("fa-crop"),r=d3.select(this).classed("fa-undo");e&&(t.params.crop_filter_nodes={},t.params.crop_filter_nodes.row_nodes=t.params.network_data.row_nodes,t.params.crop_filter_nodes.col_nodes=t.params.network_data.col_nodes,t.brush_crop_matrix(),d3.select(this).classed("active_cropping")===!1?d3.select(this).classed("active_cropping",!0).style("color","red"):(d3.select(this).classed("active_cropping",!1).style("color","#337ab7"),n(t))),r&&(d3.select(s.root+" .crop_button").style("color","#337ab7").classed("fa-crop",!0).classed("fa-undo",!1),t.filter_viz_using_nodes(t.params.crop_filter_nodes),d3.select(t.params.root+" .col_dendro_icons_container").style("display","block"),d3.select(t.params.root+" .row_dendro_icons_container").style("display","block")),a(t,0,0,1)}}).classed("sidebar_tooltip",!0).append("span").classed("sidebar_tooltip_text",!0).html("Crop matrix").style("left","-400%"),d3.select(s.root+" .download_buttons").append("p").append("a").html("Download SVG").on("click",function(){r()});var p="svg_"+s.root.replace("#","");d3.select(s.root+" .download_buttons").append("p").append("a").html("Download PNG").on("click",function(){d3.select(s.root+" .expand_button").style("opacity",0),i.saveSvgAsPng(document.getElementById(p),"clustergrammer.png"),d3.select(s.root+" .expand_button").style("opacity",.4)})}},function(t,e,r){var o;!function(){function a(t){ return t instanceof HTMLElement||t instanceof SVGElement}function n(t){if(!a(t))throw new Error("an HTMLElement or SVGElement is required; got "+t)}function i(t){return t&&0==t.lastIndexOf("http",0)&&t.lastIndexOf(window.location.host)==-1}function s(t,e){n(t);var r=t.querySelectorAll("image"),o=r.length,a=function(){0===o&&e()};a();for(var s=0;s0)return e[a]}return console.error("Unknown font format for "+t+"; Fonts may not be working correctly"),"application/octet-stream"}function a(t){function e(e){function r(){var t=s.response,r=n(t);i(e,r)}function o(t){console.warn("Failed to load font from: "+e.url),console.warn(t),l+=e.text+"\n",a()}function i(e,r){var o='url("data:'+e.format+";base64,"+r+'")';l+=e.text.replace(e.fontUrlRegexp,o)+"\n",setTimeout(function(){a(t)},0)}var s=new XMLHttpRequest;s.addEventListener("load",r),s.addEventListener("error",o),s.addEventListener("abort",o),s.open("GET",e.url),s.responseType="arraybuffer",s.send()}if(t.length>0){var o=t.pop();e(o)}else r(l)}function n(t){for(var e="",r=new Uint8Array(t),o=r.byteLength,a=0;a";var o=document.createElement("defs");if(o.appendChild(e),d.insertBefore(o,d.firstChild),r){var a=s.innerHTML;a=a.replace(/NS\d+:href/gi,'xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href'),r(a,n,i)}}var n,i,s=document.createElement("div"),d=t.cloneNode(!0);if("svg"==t.tagName)n=e.width||c(t,d,"width"),i=e.height||c(t,d,"height");else{if(!t.getBBox)return void console.error("Attempted to render non-SVG element",t);var _=t.getBBox();n=_.x+_.width,i=_.y+_.height,d.setAttribute("transform",d.getAttribute("transform").replace(/translate\(.*?\)/,""));var u=document.createElementNS("http://www.w3.org/2000/svg","svg");u.appendChild(d),d=u}d.setAttribute("version","1.1"),d.getAttribute("xmlns")||d.setAttributeNS(o,"xmlns","http://www.w3.org/2000/svg"),d.getAttribute("xmlns:xlink")||d.setAttributeNS(o,"xmlns:xlink","http://www.w3.org/1999/xlink"),e.responsive?(d.removeAttribute("width"),d.removeAttribute("height"),d.setAttribute("preserveAspectRatio","xMinYMin meet")):(d.setAttribute("width",n*e.scale),d.setAttribute("height",i*e.scale)),d.setAttribute("viewBox",[e.left||0,e.top||0,n,i].join(" "));for(var p=d.querySelectorAll("foreignObject > *"),v=0;v