view static/js/main.303f671d.chunk.js @ 3:7cc457aa78b1 draft default tip

planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/vitessce commit af71ccb3b89c9735c6f985a3e8ffe22cd14c0e04
author goeckslab
date Thu, 30 May 2024 17:24:44 +0000
parents 9f60ef2d586e
children
line wrap: on
line source

(this.webpackJsonpvitessce=this.webpackJsonpvitessce||[]).push([[0],{1107:function(e,t){},1145:function(e,t,n){},1148:function(e,t,n){"use strict";n.r(t);n(748);var a=n(39),r=n.n(a),o=n(8),i=n(0),s=n.n(i),l=n(7),c=n(2),p=n(11),u=n(1),d=n(4);function m(e){return Object(p.a)(e).reduce((function(e,t){var n=t[0],a=t[1];return Object.assign(e,Object(c.a)({},n,a))}),{})}function f(e,t,n){return 1===n?e:t}function y(e){return e.charAt(0).toUpperCase()+e.slice(1)}function h(e){var t,n="ABCDEFGHIJKLMNOPQRSTUVWXYZ",a=[0];function r(){var e=[];a.forEach((function(t){e.unshift(n[t])}));for(var t=!0,r=0;r<a.length;r++){if(!(++a[r]>=n.length)){t=!1;break}a[r]=0}return t&&a.push(0),e.join("")}do{t=r()}while(e.includes(t));return t}function g(e,t){var n=e.data;return Array.isArray(n)?n[t||n.length-1]:n}function v(e){var t=g(e),n=t.shape,a=t.dtype;return 3===n[t.labels.indexOf("c")]&&"Uint8"===a}var b={DESCRIPTION:"description",STATUS:"status",GENES:"genes",CELL_SETS:"cellSets",SCATTERPLOT:"scatterplot",SPATIAL:"spatial",HEATMAP:"heatmap",LAYER_CONTROLLER:"layerController",CELL_SET_SIZES:"cellSetSizes",GENOMIC_PROFILES:"genomicProfiles",CELL_SET_EXPRESSION:"cellSetExpression",EXPRESSION_HISTOGRAM:"expressionHistogram"},x={CELLS_JSON:"cells.json",CELL_SETS_JSON:"cell-sets.json",EXPRESSION_MATRIX_ZARR:"expression-matrix.zarr",GENOMIC_PROFILES_ZARR:"genomic-profiles.zarr",MOLECULES_JSON:"molecules.json",NEIGHBORHOODS_JSON:"neighborhoods.json",RASTER_JSON:"raster.json",RASTER_OME_ZARR:"raster.ome-zarr",CLUSTERS_JSON:"clusters.json",GENES_JSON:"genes.json",ANNDATA_CELL_SETS_ZARR:"anndata-cell-sets.zarr",ANNDATA_CELLS_ZARR:"anndata-cells.zarr",ANNDATA_EXPRESSION_MATRIX_ZARR:"anndata-expression-matrix.zarr"},O={DATASET:"dataset",EMBEDDING_TYPE:"embeddingType",EMBEDDING_ZOOM:"embeddingZoom",EMBEDDING_ROTATION:"embeddingRotation",EMBEDDING_TARGET_X:"embeddingTargetX",EMBEDDING_TARGET_Y:"embeddingTargetY",EMBEDDING_TARGET_Z:"embeddingTargetZ",EMBEDDING_CELL_SET_POLYGONS_VISIBLE:"embeddingCellSetPolygonsVisible",EMBEDDING_CELL_SET_LABELS_VISIBLE:"embeddingCellSetLabelsVisible",EMBEDDING_CELL_SET_LABEL_SIZE:"embeddingCellSetLabelSize",EMBEDDING_CELL_RADIUS:"embeddingCellRadius",EMBEDDING_CELL_RADIUS_MODE:"embeddingCellRadiusMode",EMBEDDING_CELL_OPACITY:"embeddingCellOpacity",EMBEDDING_CELL_OPACITY_MODE:"embeddingCellOpacityMode",SPATIAL_ZOOM:"spatialZoom",SPATIAL_ROTATION:"spatialRotation",SPATIAL_TARGET_X:"spatialTargetX",SPATIAL_TARGET_Y:"spatialTargetY",SPATIAL_TARGET_Z:"spatialTargetZ",SPATIAL_ROTATION_X:"spatialRotationX",SPATIAL_ROTATION_Y:"spatialRotationY",SPATIAL_ROTATION_Z:"spatialRotationZ",SPATIAL_ROTATION_ORBIT:"spatialRotationOrbit",SPATIAL_ORBIT_AXIS:"spatialOrbitAxis",SPATIAL_AXIS_FIXED:"spatialAxisFixed",HEATMAP_ZOOM_X:"heatmapZoomX",HEATMAP_ZOOM_Y:"heatmapZoomY",HEATMAP_TARGET_X:"heatmapTargetX",HEATMAP_TARGET_Y:"heatmapTargetY",CELL_FILTER:"cellFilter",CELL_HIGHLIGHT:"cellHighlight",CELL_SET_SELECTION:"cellSetSelection",CELL_SET_HIGHLIGHT:"cellSetHighlight",CELL_SET_COLOR:"cellSetColor",GENE_FILTER:"geneFilter",GENE_HIGHLIGHT:"geneHighlight",GENE_SELECTION:"geneSelection",GENE_EXPRESSION_COLORMAP:"geneExpressionColormap",GENE_EXPRESSION_TRANSFORM:"geneExpressionTransform",GENE_EXPRESSION_COLORMAP_RANGE:"geneExpressionColormapRange",CELL_COLOR_ENCODING:"cellColorEncoding",SPATIAL_RASTER_LAYERS:"spatialRasterLayers",SPATIAL_CELLS_LAYER:"spatialCellsLayer",SPATIAL_MOLECULES_LAYER:"spatialMoleculesLayer",SPATIAL_NEIGHBORHOODS_LAYER:"spatialNeighborhoodsLayer",GENOMIC_ZOOM_X:"genomicZoomX",GENOMIC_ZOOM_Y:"genomicZoomY",GENOMIC_TARGET_X:"genomicTargetX",GENOMIC_TARGET_Y:"genomicTargetY",ADDITIONAL_CELL_SETS:"additionalCellSets",MOLECULE_HIGHLIGHT:"moleculeHighlight"},j=function(){function e(t,n,a,r){Object(u.a)(this,e),this.file=Object(l.a)({url:t,type:n,fileType:a},null!==r?{options:r}:{})}return Object(d.a)(e,[{key:"toJSON",value:function(){return this.file}}]),e}(),E=function(){function e(t,n,a){Object(u.a)(this,e),this.dataset={uid:t,name:n,description:a,files:[]}}return Object(d.a)(e,[{key:"addFile",value:function(e,t,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return this.dataset.files.push(new j(e,t,n,a)),this}},{key:"toJSON",value:function(){return Object(l.a)({},this.dataset,{files:this.dataset.files.map((function(e){return e.toJSON()}))})}}]),e}(),S=function(){function e(t,n,a,r,o,i){Object(u.a)(this,e),this.view={component:t,coordinationScopes:n,x:a,y:r,w:o,h:i}}return Object(d.a)(e,[{key:"useCoordination",value:function(){for(var e=this,t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];var r=n;return r.forEach((function(t){e.view.coordinationScopes[t.cType]=t.cScope})),this}},{key:"setXYWH",value:function(e,t,n,a){return this.view.x=e,this.view.y=t,this.view.w=n,this.view.h=a,this}},{key:"setProps",value:function(e){return this.view.props=Object(l.a)({},this.view.props||{},{},e),this}},{key:"toJSON",value:function(){return this.view}}]),e}(),C=function e(t){Object(u.a)(this,e),this.views=t},_=function e(t){Object(u.a)(this,e),this.views=t};var T=function(){function e(t,n){Object(u.a)(this,e),this.cType=t,this.cScope=n,this.cValue=null}return Object(d.a)(e,[{key:"setValue",value:function(e){return this.cValue=e,this}}]),e}(),w="https://s3.amazonaws.com/vitessce-data/0.0.31/master_release";function L(e){return function(t){return{type:t,fileType:"".concat(t,".json"),url:"".concat(w,"/").concat(e,"/").concat(e,".").concat(t,".json")}}}function P(e,t){return"".concat(w,"/").concat(e,"/").concat(e,".").concat(t,".json")}function I(e){return Object(l.a)({},e,{public:void 0})}var A={VitessceConfig:function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;Object(u.a)(this,e),this.config={version:"1.0.4",name:t,description:n,datasets:[],coordinationSpace:{},layout:[],initStrategy:"auto"}}return Object(d.a)(e,[{key:"addDataset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=n||{},r=a.uid,i=this.config.datasets.map((function(e){return e.dataset.uid})),s=r||h(i),l=new E(s,e,t);this.config.datasets.push(l);var c=this.addCoordination(O.DATASET),p=Object(o.a)(c,1),u=p[0];return u.setValue(s),l}},{key:"addView",value:function(e,t,n){var a,r=n||{},i=r.x,s=void 0===i?0:i,l=r.y,p=void 0===l?0:l,u=r.w,d=void 0===u?1:u,m=r.h,f=void 0===m?1:m,y=r.mapping,h=void 0===y?null:y,g=this.config.coordinationSpace[O.DATASET]?Object.entries(this.config.coordinationSpace[O.DATASET]).filter((function(t){var n=Object(o.a)(t,2);n[0];return n[1].cValue===e.dataset.uid})).map((function(e){return Object(o.a)(e,1)[0]})):[];if(1!==g.length)throw new Error("No coordination scope matching the dataset parameter could be found in the coordination space.");a=Object(o.a)(g,1)[0];var v=Object(c.a)({},O.DATASET,a),b=new S(t,v,s,p,d,f);if(h){var x=this.addCoordination(O.EMBEDDING_TYPE),j=Object(o.a)(x,1)[0];j.setValue(h),b.useCoordination(j)}return this.config.layout.push(b),b}},{key:"addCoordination",value:function(){for(var e=this,t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];var r=n,o=[];return r.forEach((function(t){var n=e.config.coordinationSpace[t]?Object.keys(e.config.coordinationSpace[t]):[],a=new T(t,h(n));e.config.coordinationSpace[a.cType]||(e.config.coordinationSpace[a.cType]={}),e.config.coordinationSpace[a.cType][a.cScope]=a,o.push(a)})),o}},{key:"linkViews",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.addCoordination.apply(this,Object(p.a)(t));return e.forEach((function(e){a.forEach((function(t){e.useCoordination(t)}))})),Array.isArray(n)&&n.length===t.length&&a.forEach((function(e,t){e.setValue(n[t])})),this}},{key:"layout",value:function(e){return function e(t,n,a,r,o){var i=a-n,s=o-r;if(t instanceof S)t.setXYWH(n,r,i,s);else if(t instanceof C){var l=t.views,c=l.length;l.forEach((function(t,a){e(t,n+i/c*a,n+i/c*(a+1),r,o)}))}else if(t instanceof _){var p=t.views,u=p.length;p.forEach((function(t,o){e(t,n,a,r+s/u*o,r+s/u*(o+1))}))}}(e,0,12,0,12),this}},{key:"toJSON",value:function(){return Object(l.a)({},this.config,{datasets:this.config.datasets.map((function(e){return e.toJSON()})),coordinationSpace:m(Object.entries(this.config.coordinationSpace).map((function(e){var t=Object(o.a)(e,2),n=t[0],a=t[1];return[n,m(Object.entries(a).map((function(e){var t=Object(o.a)(e,2);return[t[0],t[1].cValue]})))]}))),layout:this.config.layout.map((function(e){return e.toJSON()}))})}}],[{key:"fromJSON",value:function(t){var n=new e(t.name,t.description);return t.datasets.forEach((function(e){var t=n.addDataset(e.name,e.description,{uid:e.uid});e.files.forEach((function(e){t.addFile(e.url,e.type,e.fileType)}))})),Object.keys(t.coordinationSpace).forEach((function(e){if(e!==O.DATASET){var a=t.coordinationSpace[e];n.config.coordinationSpace[e]={},Object.entries(a).forEach((function(t){var a=Object(o.a)(t,2),r=a[0],i=a[1],s=new T(e,r);s.setValue(i),n.config.coordinationSpace[e][r]=s}))}})),t.layout.forEach((function(e){var t=new S(e.component,e.coordinationScopes,e.x,e.y,e.w,e.h);n.config.layout.push(t)})),n}}]),e}(),hconcat:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var a=new C(t);return a},vconcat:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var a=new _(t);return a},cm:b,dt:{CELLS:"cells",CELL_SETS:"cell-sets",EXPRESSION_MATRIX:"expression-matrix",GENOMIC_PROFILES:"genomic-profiles",MOLECULES:"molecules",NEIGHBORHOODS:"neighborhoods",RASTER:"raster"},ft:x,ct:O},k=["cells","cell-sets","raster","molecules","neighborhoods"],R="Codeluppi et al., Nature Methods 2018",N="Spatial organization of the somatosensory cortex revealed by osmFISH",M={name:R,description:N,version:"1.0.0",initStrategy:"auto",datasets:[{uid:"codeluppi",name:"Codeluppi",files:[].concat(Object(p.a)(k.map(L("linnarsson"))),[Object(l.a)({},L("linnarsson")("clusters"),{type:"expression-matrix"})])}]},D={name:R,description:N,version:"1.0.0",initStrategy:"auto",datasets:[{uid:"codeluppi",name:"Codeluppi",files:[].concat(Object(p.a)(k.filter((function(e){return"molecules"!==e})).map(L("linnarsson"))),[Object(l.a)({},L("linnarsson")("clusters"),{type:"expression-matrix"})])}]},G={version:"1.0.0",name:"Codeluppi, just scatterplot",public:!1,initStrategy:"auto",datasets:[{uid:"codeluppi",name:"Codeluppi",files:[Object(l.a)({},L("linnarsson")("cells"),{requestInit:{method:"GET",headers:{"x-foo":"FAKE"},mode:"cors",credentials:"omit",cache:"no-store",redirect:"error",referrer:"FAKE",integrity:"FAKE"}})]}],coordinationSpace:{embeddingType:{A:"t-SNE"},embeddingZoom:{A:.75}},layout:[{component:"scatterplot",coordinationScopes:{embeddingType:"A",embeddingZoom:"A"},x:0,y:0,w:12,h:2}]},z={version:"1.0.0",name:"Codeluppi, just scatterplot and expression",public:!1,initStrategy:"auto",datasets:[{uid:"codeluppi",name:"Codeluppi",files:[L("linnarsson")("cells"),L("linnarsson")("genes")]}],coordinationSpace:{embeddingType:{A:"t-SNE"},embeddingZoom:{A:.75}},layout:[{component:"scatterplot",coordinationScopes:{embeddingType:"A",embeddingZoom:"A"},x:0,y:0,w:12,h:2},{component:"genes",x:8,y:2,w:4,h:2}]},H=Object(l.a)({},M,{coordinationSpace:{spatialZoom:{A:-6.5},spatialTargetX:{A:18e3},spatialTargetY:{A:18e3}},layout:[{component:"spatial",coordinationScopes:{spatialZoom:"A",spatialTargetX:"A",spatialTargetY:"A"},x:0,y:0,w:10,h:2},{component:"genes",x:10,y:1,w:2,h:1}]}),F=Object(l.a)({},M,{public:!0,coordinationSpace:{embeddingZoom:{PCA:0,TSNE:.75},embeddingType:{PCA:"PCA",TSNE:"t-SNE"},spatialZoom:{A:-5.5},spatialTargetX:{A:16e3},spatialTargetY:{A:2e4}},layout:[{component:"description",props:{description:"".concat(R,": ").concat(N)},x:0,y:0,w:2,h:1},{component:"layerController",x:0,y:1,w:2,h:4},{component:"status",x:0,y:5,w:2,h:1},{component:"spatial",coordinationScopes:{spatialZoom:"A",spatialTargetX:"A",spatialTargetY:"A"},x:2,y:0,w:4,h:4},{component:"genes",x:9,y:0,w:3,h:2},{component:"cellSets",x:9,y:3,w:3,h:2},{component:"heatmap",props:{transpose:!0},x:2,y:4,w:5,h:2},{component:"cellSetExpression",x:7,y:4,w:5,h:2},{component:"scatterplot",coordinationScopes:{embeddingType:"PCA",embeddingZoom:"PCA"},x:6,y:0,w:3,h:2},{component:"scatterplot",coordinationScopes:{embeddingType:"TSNE",embeddingZoom:"TSNE"},x:6,y:2,w:3,h:2}]});Object(l.a)({},D,{coordinationSpace:{embeddingZoom:{PCA:0,TSNE:.75},embeddingType:{PCA:"PCA",TSNE:"t-SNE"},spatialZoom:{A:-5.5},spatialTargetX:{A:16e3},spatialTargetY:{A:2e4},geneSelection:{A:["Rorb"]},geneExpressionColormapRange:{A:[0,.75]}},layout:[{component:"description",props:{description:"".concat(R,": ").concat(N)},x:0,y:0,w:2,h:2},{component:"layerController",x:0,y:2,w:2,h:4},{component:"spatial",coordinationScopes:{spatialZoom:"A",spatialTargetX:"A",spatialTargetY:"A",geneSelection:"A"},x:2,y:0,w:4,h:4},{component:"genes",coordinationScopes:{geneSelection:"A"},x:9,y:0,w:3,h:2},{component:"cellSets",x:9,y:3,w:3,h:2},{component:"heatmap",coordinationScopes:{geneSelection:"A",geneExpressionColormapRange:"A"},props:{transpose:!0},x:2,y:4,w:10,h:2},{component:"scatterplot",coordinationScopes:{embeddingType:"TSNE",embeddingZoom:"TSNE",geneSelection:"A"},x:6,y:0,w:3,h:4}]});function X(e,t){var n=new A.VitessceConfig(e,t),a=n.addDataset(R,N).addFile(P("linnarsson","cells"),A.dt.CELLS,A.ft.CELLS_JSON).addFile(P("linnarsson","cell-sets"),A.dt.CELL_SETS,A.ft.CELL_SETS_JSON).addFile(P("linnarsson","raster"),A.dt.RASTER,A.ft.RASTER_JSON).addFile(P("linnarsson","molecules"),A.dt.MOLECULES,A.ft.MOLECULES_JSON);return[n,a]}var Z="Eng et al., Nature 2019",V="Transcriptome-scale super-resolved imaging in tissues by RNA seqFISH",B={name:Z,version:"1.0.0",description:V,public:!0,datasets:[{uid:"dries-2019",name:"Dries 2019",files:["cells","cell-sets"].map(L("dries"))}],initStrategy:"auto",coordinationSpace:{embeddingType:{TSNE:"t-SNE",UMAP:"UMAP"},embeddingCellSetPolygonsVisible:{A:!1},embeddingCellSetLabelsVisible:{A:!0},embeddingCellSetLabelSize:{A:16},embeddingCellRadius:{A:1},embeddingZoom:{TSNE:3,UMAP:3},spatialZoom:{A:-4.4},spatialTargetX:{A:3800},spatialTargetY:{A:-900}},layout:[{component:"description",props:{description:"".concat(Z,": ").concat(V)},x:9,y:0,w:3,h:2},{component:"status",x:9,y:2,w:3,h:2},{component:"cellSets",x:9,y:4,w:3,h:4},{component:"cellSetSizes",x:5,y:4,w:4,h:4},{component:"scatterplot",coordinationScopes:{embeddingType:"TSNE",embeddingZoom:"TSNE",embeddingCellSetLabelsVisible:"A",embeddingCellSetLabelSize:"A",embeddingCellSetPolygonsVisible:"A",embeddingCellRadius:"A"},x:0,y:2,w:5,h:4},{component:"spatial",props:{cellRadius:50},coordinationScopes:{spatialZoom:"A",spatialTargetX:"A",spatialTargetY:"A"},x:5,y:0,w:4,h:4},{component:"scatterplot",coordinationScopes:{embeddingType:"UMAP",embeddingZoom:"UMAP",embeddingCellSetLabelsVisible:"A",embeddingCellSetLabelSize:"A",embeddingCellSetPolygonsVisible:"A",embeddingCellRadius:"A"},x:0,y:0,w:5,h:4}]};var Y={name:"Wang et al., Scientific Reports 2018",version:"1.0.0",description:"Multiplexed imaging of high-density libraries of RNAs with MERFISH and expansion microscopy",public:!0,datasets:[{uid:"wang-2018",name:"Wang 2018",files:[].concat(Object(p.a)(["cells","molecules"].map(L("wang"))),[Object(l.a)({},L("wang")("genes"),{type:"expression-matrix"})])}],initStrategy:"auto",coordinationSpace:{spatialZoom:{A:-1},spatialLayers:{A:[{type:"molecules",radius:2,opacity:1,visible:!0},{type:"cells",opacity:1,radius:50,visible:!0,stroked:!1}]}},layout:[{component:"spatial",coordinationScopes:{spatialZoom:"A",spatialLayers:"A"},x:0,y:0,w:10,h:2},{component:"genes",x:10,y:0,w:2,h:2}]},U={description:"High bit depth (uint16) multiplex immunofluorescence images of the kidney by the BIOmolecular Multimodal Imaging Center (BIOMIC) at Vanderbilt University",layers:[{name:"raster",type:"RASTER",fileType:"raster.json",url:"".concat(w,"/spraggins/spraggins.raster.json")}]},q=Object(l.a)({},U,{version:"0.1.0",name:"Spraggins",public:!0,staticLayout:[{component:"spatial",props:{view:{zoom:-6.5,target:[2e4,2e4,0]}},x:0,y:0,w:9,h:2},{component:"layerController",x:9,y:0,w:3,h:2}]}),W="Spleen scRNA-seq HuBMAP dataset with cell type annotations generated by the Satija lab and the Seurat v3.1 Label Transfer workflow",$={version:"1.0.0",name:"HBM336.FWTN.636",description:W,public:!0,datasets:[{uid:"339952f4-a47f-46dc-9228-18ba2ca256f2",name:"339952f4-a47f-46dc-9228-18ba2ca256f2",files:[{type:"cells",fileType:"cells.json",url:"https://s3.amazonaws.com/vitessce-data/0.0.31/master_release/satija/2dca1bf5832a4102ba780e9e54f6c350.cells.json"},{type:"cell-sets",fileType:"cell-sets.json",url:"https://s3.amazonaws.com/vitessce-data/0.0.31/master_release/satija/2dca1bf5832a4102ba780e9e54f6c350.cell-sets.json"},{type:"expression-matrix",fileType:"expression-matrix.zarr",url:"https://vitessce-data.storage.googleapis.com/0.0.31/master_release/satija/2dca1bf5832a4102ba780e9e54f6c350.expression-matrix.zarr"}]}],initStrategy:"auto",coordinationSpace:{embeddingType:{UMAP:"UMAP"},embeddingZoom:{A:3},embeddingTargetX:{A:0},embeddingTargetY:{A:0},spatialZoom:{},spatialTargetX:{},spatialTargetY:{},geneExpressionColormapRange:{A:[0,.25]}},layout:[{component:"cellSets",h:4,w:4,x:4,y:0,coordinationScopes:{}},{component:"cellSetSizes",h:4,w:4,x:8,y:0,coordinationScopes:{}},{component:"scatterplot",h:4,props:{mapping:"UMAP",view:{target:[0,0,0],zoom:3}},w:4,x:0,y:0,coordinationScopes:{embeddingType:"UMAP",embeddingZoom:"A",embeddingTargetX:"A",embeddingTargetY:"A"}},{component:"heatmap",h:4,w:10,x:0,y:4,coordinationScopes:{geneExpressionColormapRange:"A"}},{component:"description",h:4,w:2,x:10,y:4,props:{description:"".concat("HBM336.FWTN.636",": ").concat(W)}}]},J={version:"1.0.6",name:"Blin et al., PLoS Biol 2019",description:"Mouse blastocysts imaged by confocal microscopy",public:!0,datasets:[{uid:"idr0062-blin-nuclearsegmentation/6001240",name:"idr0062-blin-nuclearsegmentation/6001240",files:[{type:"raster",fileType:"raster.ome-zarr",url:"https://minio-dev.openmicroscopy.org/idr/v0.3/idr0062-blin-nuclearsegmentation/6001240.zarr"}]}],initStrategy:"auto",layout:[{component:"spatial",x:0,y:0,w:8,h:12},{component:"layerController",x:8,y:0,w:4,h:6},{component:"description",x:8,y:6,w:4,h:3},{component:"status",x:8,y:9,w:4,h:3}]},K={version:"1.0.6",name:"179706",description:"Example of OME-NGFF v0.1",public:!1,datasets:[{uid:"179706",name:"179706",files:[{type:"raster",fileType:"raster.ome-zarr",url:"https://s3.embassy.ebi.ac.uk/idr/zarr/v0.1/179706.zarr"}]}],coordinationSpace:{spatialZoom:{A:-.38015},spatialTargetX:{A:807.843},spatialTargetY:{A:537.031}},initStrategy:"auto",layout:[{component:"spatial",coordinationScopes:{spatialZoom:"A",spatialTargetX:"A",spatialTargetY:"A"},x:0,y:0,w:8,h:12},{component:"layerController",x:8,y:0,w:4,h:6},{component:"description",x:8,y:6,w:4,h:3},{component:"status",x:8,y:9,w:4,h:3}]};var Q=function(){var e=new A.VitessceConfig("HBM485.TBWH.322","Large intestine snATAC-seq HuBMAP dataset with genomic data visualization powered by HiGlass"),t="https://vitessce-data.s3.amazonaws.com/0.0.32/master_release/human_intestine_2020_hubmap",n=e.addDataset("HBM485.TBWH.322","Human large intestine, snATAC-seq").addFile("".concat(t,"/human_intestine_2020_hubmap.cells.json"),A.dt.CELLS,A.ft.CELLS_JSON).addFile("".concat(t,"/human_intestine_2020_hubmap.cell-sets.json"),A.dt.CELL_SETS,A.ft.CELL_SETS_JSON).addFile("".concat(t,"/human_intestine_2020_hubmap.genomic-profiles.zarr"),A.dt.GENOMIC_PROFILES,A.ft.GENOMIC_PROFILES_ZARR),a=e.addView(n,A.cm.SCATTERPLOT,{mapping:"UMAP"}),r=e.addView(n,A.cm.CELL_SETS),o=e.addView(n,A.cm.GENOMIC_PROFILES);return e.layout(A.vconcat(o,A.hconcat(a,r))),e.toJSON()}();var ee=function(){var e=X("Coordination Type: ".concat(A.ct.EMBEDDING_ZOOM),"Zoom levels in the scatterplots are coordinated."),t=Object(o.a)(e,2),n=t[0],a=t[1],r=n.addView(a,A.cm.SCATTERPLOT,{mapping:"t-SNE"}),i=n.addView(a,A.cm.SCATTERPLOT,{mapping:"t-SNE"});return n.linkViews([r,i],[A.ct.EMBEDDING_ZOOM],[-1]),n.layout(A.hconcat(r,i)),n.toJSON()}();var te=function(){var e=X("Coordination Type: ".concat(A.ct.EMBEDDING_TARGET_X),"Panning along the x-axis of the scatterplots is coordinated."),t=Object(o.a)(e,2),n=t[0],a=t[1],r=n.addView(a,A.cm.SCATTERPLOT,{mapping:"t-SNE"}),i=n.addView(a,A.cm.SCATTERPLOT,{mapping:"t-SNE"});return n.linkViews([r,i],[A.ct.EMBEDDING_TARGET_X],[0]),n.layout(A.hconcat(r,i)),n.toJSON()}();var ne=function(){var e=X("Coordination Type: ".concat(A.ct.EMBEDDING_TARGET_Y),"Panning along the y-axis of the scatterplots is coordinated."),t=Object(o.a)(e,2),n=t[0],a=t[1],r=n.addView(a,A.cm.SCATTERPLOT,{mapping:"t-SNE"}),i=n.addView(a,A.cm.SCATTERPLOT,{mapping:"t-SNE"});return n.linkViews([r,i],[A.ct.EMBEDDING_TARGET_Y],[0]),n.layout(A.hconcat(r,i)),n.toJSON()}();var ae,re=function(){var e=function(e,t){var n=new A.VitessceConfig(e,t),a=n.addDataset(Z,V).addFile(P("dries","cells"),A.dt.CELLS,A.ft.CELLS_JSON).addFile(P("dries","cell-sets"),A.dt.CELL_SETS,A.ft.CELL_SETS_JSON);return[n,a]}("Coordination Type: ".concat(A.ct.EMBEDDING_CELL_SET_POLYGONS_VISIBLE),'Visibility of polygon overlays is coordinated in the top two scatterplots, and independent in the bottom two. Try clicking the gear above each plot and toggling the "Cell Set Polygons Visible" checkboxes.'),t=Object(o.a)(e,2),n=t[0],a=t[1],r=n.addView(a,A.cm.SCATTERPLOT,{mapping:"t-SNE",x:0,y:0,w:5,h:6}),i=n.addView(a,A.cm.SCATTERPLOT,{mapping:"t-SNE",x:5,y:0,w:5,h:6});n.addView(a,A.cm.SCATTERPLOT,{mapping:"t-SNE",x:0,y:6,w:5,h:6});var s=n.addView(a,A.cm.SCATTERPLOT,{mapping:"t-SNE",x:5,y:6,w:5,h:6});return n.addView(a,A.cm.CELL_SETS,{x:10,y:0,w:2,h:12}),n.linkViews([r,i],[A.ct.EMBEDDING_CELL_SET_POLYGONS_VISIBLE],[!0]),n.linkViews([s],[A.ct.EMBEDDING_CELL_SET_POLYGONS_VISIBLE],[!0]),n.toJSON()}(),oe=(ae={},Object(c.a)(ae,A.ct.EMBEDDING_ZOOM,ee),Object(c.a)(ae,A.ct.EMBEDDING_TARGET_X,te),Object(c.a)(ae,A.ct.EMBEDDING_TARGET_Y,ne),Object(c.a)(ae,A.ct.EMBEDDING_CELL_SET_POLYGONS_VISIBLE,re),ae),ie=Object(l.a)({"just-scatter":G,"just-scatter-expression":z,"just-spatial":H,"just-higlass":{public:!1,initStrategy:"auto",version:"1.0.0",datasets:[{uid:"higlass-dataset",name:"HiGlass Dataset",files:[]}],name:"HiGlass demo",coordinationSpace:{genomicZoomX:{A:0},genomicZoomY:{A:0},genomicTargetX:{A:1549999999.5},genomicTargetY:{A:1549999999.5}},layout:[{component:"higlass",coordinationScopes:{genomicZoomX:"A",genomicZoomY:"A",genomicTargetX:"A",genomicTargetY:"A"},props:{hgViewConfig:{uid:"aa",autocompleteSource:"/api/v1/suggest/?d=OHJakQICQD6gTD7skx4EWA&",genomePositionSearchBox:{autocompleteServer:"//higlass.io/api/v1",autocompleteId:"OHJakQICQD6gTD7skx4EWA",chromInfoServer:"//higlass.io/api/v1",chromInfoId:"hg19",visible:!0},chromInfoPath:"//s3.amazonaws.com/pkerp/data/hg19/chromSizes.tsv",tracks:{top:[{type:"horizontal-gene-annotations",height:60,tilesetUid:"OHJakQICQD6gTD7skx4EWA",server:"//higlass.io/api/v1",uid:"OHJakQICQD6gTD7skx4EWA",options:{name:"Gene Annotations (hg19)",fontSize:10,labelPosition:"hidden",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,minHeight:24,geneAnnotationHeight:16,geneLabelPosition:"outside",geneStrandSpacing:4,showMousePosition:!0,mousePositionColor:"#ff00ff",plusStrandColor:"#fdff54",minusStrandColor:"#68bf30",labelColor:"black",trackBorderWidth:0,trackBorderColor:"black"}},{chromInfoPath:"//s3.amazonaws.com/pkerp/data/hg19/chromSizes.tsv",type:"horizontal-chromosome-labels",height:30,uid:"X4e_1DKiQHmyghDa6lLMVA",options:{color:"#808080",stroke:"black",fontSize:12,fontIsLeftAligned:!1,showMousePosition:!0,mousePositionColor:"#ff00ff"}}],left:[{type:"vertical-gene-annotations",width:60,tilesetUid:"OHJakQICQD6gTD7skx4EWA",server:"//higlass.io/api/v1",options:{labelPosition:"bottomRight",name:"Gene Annotations (hg19)",fontSize:10,labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,minWidth:24,geneAnnotationHeight:16,geneLabelPosition:"outside",geneStrandSpacing:4,showMousePosition:!0,mousePositionColor:"#ff00ff",plusStrandColor:"#fdff54",minusStrandColor:"#68bf30",labelColor:"black",trackBorderWidth:0,trackBorderColor:"black"},uid:"dqBTMH78Rn6DeSyDBoAEXw"},{chromInfoPath:"//s3.amazonaws.com/pkerp/data/hg19/chromSizes.tsv",type:"vertical-chromosome-labels",width:30,uid:"RHdQK4IRQ7yJeDmKWb7Pcg",options:{color:"#777777",stroke:"black",fontSize:12,fontIsLeftAligned:!1,minWidth:35,showMousePosition:!0,mousePositionColor:"#ff00ff"}}],center:[{uid:"c1",type:"combined",height:600,contents:[{server:"//higlass.io/api/v1",tilesetUid:"CQMd6V_cRw6iCI_-Unl3PQ",type:"heatmap",options:{maxZoom:null,labelPosition:"bottomRight",name:"Rao et al. (2014) GM12878 MboI (allreps) 1kb",backgroundColor:"black",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,labelShowResolution:!0,labelShowAssembly:!0,labelColor:"#ffffff",labelTextOpacity:.5,labelBackgroundColor:"black",labelBackgroundOpacity:.01,colorRange:["#000000","#222e54","#448db2","#68bf30","#fdff54","#FFFFFF"],colorbarBackgroundColor:"black",colorbarBackgroundOpacity:.01,colorbarPosition:"topRight",trackBorderWidth:0,trackBorderColor:"black",heatmapValueScaling:"log",showMousePosition:!0,mousePositionColor:"#ff00ff",showTooltip:!1,extent:"full",zeroValueColor:null,scaleStartPercent:"0.00000",scaleEndPercent:"1.00000"},height:500,uid:"GjuZed1ySGW1IzZZqFB9BA",transforms:[{name:"ICE",value:"weight"}]}],options:{}}],right:[],bottom:[],whole:[],gallery:[]},layout:{w:12,h:12,x:0,y:0,moved:!1,static:!1}}},x:0,y:0,w:8,h:2},{component:"higlass",coordinationScopes:{genomicZoomX:"A",genomicZoomY:"A",genomicTargetX:"A",genomicTargetY:"A"},props:{hgViewConfig:{uid:"aa",autocompleteSource:"/api/v1/suggest/?d=OHJakQICQD6gTD7skx4EWA&",genomePositionSearchBox:{autocompleteServer:"//higlass.io/api/v1",autocompleteId:"OHJakQICQD6gTD7skx4EWA",chromInfoServer:"//higlass.io/api/v1",chromInfoId:"hg19",visible:!0},chromInfoPath:"//s3.amazonaws.com/pkerp/data/hg19/chromSizes.tsv",tracks:{top:[{type:"horizontal-gene-annotations",height:60,tilesetUid:"OHJakQICQD6gTD7skx4EWA",server:"//higlass.io/api/v1",uid:"OHJakQICQD6gTD7skx4EWA",options:{name:"Gene Annotations (hg19)",fontSize:10,labelPosition:"hidden",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,minHeight:24,geneAnnotationHeight:16,geneLabelPosition:"outside",geneStrandSpacing:4,showMousePosition:!0,mousePositionColor:"#ff00ff",plusStrandColor:"#fdff54",minusStrandColor:"#68bf30",labelColor:"black",trackBorderWidth:0,trackBorderColor:"black"}},{chromInfoPath:"//s3.amazonaws.com/pkerp/data/hg19/chromSizes.tsv",type:"horizontal-chromosome-labels",height:30,uid:"X4e_1DKiQHmyghDa6lLMVA",options:{color:"#808080",stroke:"black",fontSize:12,fontIsLeftAligned:!1,showMousePosition:!0,mousePositionColor:"#ff00ff"}}],left:[{type:"vertical-gene-annotations",width:60,tilesetUid:"OHJakQICQD6gTD7skx4EWA",server:"//higlass.io/api/v1",options:{labelPosition:"bottomRight",name:"Gene Annotations (hg19)",fontSize:10,labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,minWidth:24,geneAnnotationHeight:16,geneLabelPosition:"outside",geneStrandSpacing:4,showMousePosition:!0,mousePositionColor:"#ff00ff",plusStrandColor:"#fdff54",minusStrandColor:"#68bf30",labelColor:"black",trackBorderWidth:0,trackBorderColor:"black"},uid:"dqBTMH78Rn6DeSyDBoAEXw"},{chromInfoPath:"//s3.amazonaws.com/pkerp/data/hg19/chromSizes.tsv",type:"vertical-chromosome-labels",width:30,uid:"RHdQK4IRQ7yJeDmKWb7Pcg",options:{color:"#777777",stroke:"black",fontSize:12,fontIsLeftAligned:!1,minWidth:35,showMousePosition:!0,mousePositionColor:"#ff00ff"}}],center:[{uid:"c1",type:"combined",height:600,contents:[{server:"//higlass.io/api/v1",tilesetUid:"CQMd6V_cRw6iCI_-Unl3PQ",type:"heatmap",options:{maxZoom:null,labelPosition:"bottomRight",name:"Rao et al. (2014) GM12878 MboI (allreps) 1kb",backgroundColor:"black",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,labelShowResolution:!0,labelShowAssembly:!0,labelColor:"#ffffff",labelTextOpacity:.5,labelBackgroundColor:"black",labelBackgroundOpacity:.01,colorRange:["#000000","#222e54","#448db2","#68bf30","#fdff54","#FFFFFF"],colorbarBackgroundColor:"black",colorbarBackgroundOpacity:.01,colorbarPosition:"topRight",trackBorderWidth:0,trackBorderColor:"black",heatmapValueScaling:"log",showMousePosition:!0,mousePositionColor:"#ff00ff",showTooltip:!1,extent:"full",zeroValueColor:null,scaleStartPercent:"0.00000",scaleEndPercent:"1.00000"},height:500,uid:"GjuZed1ySGW1IzZZqFB9BA",transforms:[{name:"ICE",value:"weight"}]}],options:{}}],right:[],bottom:[],whole:[],gallery:[]},layout:{w:12,h:12,x:0,y:0,moved:!1,static:!1}}},x:8,y:0,w:4,h:2}]},"codeluppi-2018":F,"eng-2019":B,"wang-2018":Y,"spraggins-2020":q,"neumann-2020":{version:"1.0.1",name:"Neumann et al., 2020",description:"Four registered imaging modalities (PAS, IMS, AF) from HuBMAP collection HBM876.XNRH.336",datasets:[{uid:"A",name:"Spraggins",files:[{type:"raster",fileType:"raster.json",options:{schemaVersion:"0.0.2",images:[{name:"PAS",type:"ome-tiff",url:"https://assets.hubmapconsortium.org/f4188a148e4c759092d19369d310883b/ometiff-pyramids/processedMicroscopy/VAN0006-LK-2-85-PAS_images/VAN0006-LK-2-85-PAS_registered.ome.tif?token="},{name:"AF",type:"ome-tiff",url:"https://assets.hubmapconsortium.org/2130d5f91ce61d7157a42c0497b06de8/ometiff-pyramids/processedMicroscopy/VAN0006-LK-2-85-AF_preIMS_images/VAN0006-LK-2-85-AF_preIMS_registered.ome.tif?token="},{name:"IMS PosMode",type:"ome-tiff",url:"https://assets.hubmapconsortium.org/be503a021ed910c0918842e318e6efa2/ometiff-pyramids/ometiffs/VAN0006-LK-2-85-IMS_PosMode_multilayer.ome.tif?token="},{name:"IMS NegMode",type:"ome-tiff",url:"https://assets.hubmapconsortium.org/ca886a630b2038997a4cfbbf4abfd283/ometiff-pyramids/ometiffs/VAN0006-LK-2-85-IMS_NegMode_multilayer.ome.tif?token="}],usePhysicalSizeScaling:!0,renderLayers:["PAS","AF","IMS PosMode","IMS NegMode"]}}]}],coordinationSpace:{},layout:[{component:"spatial",coordinationScopes:{},x:0,y:0,w:9,h:12},{component:"layerController",coordinationScopes:{},x:9,y:0,w:3,h:12}],initStrategy:"auto"},"satija-2020":$,"sn-atac-seq-hubmap-2020":Q,"sc-atac-seq-10x-genomics-pbmc":{version:"1.0.0",name:"HiGlass serverless demo with 10x Genomics scATAC-seq 5k PBMC dataset",datasets:[{uid:"10x-genomics-pbmc",name:"10x Genomics PBMC",files:[{type:"genomic-profiles",fileType:"genomic-profiles.zarr",url:"http://higlass-serverless.s3.amazonaws.com/multivec/pbmc_10x_peaks_by_cluster.zarr"}]}],layout:[{component:"genomicProfiles",props:{profileTrackUidKey:"file"},x:0,y:0,w:8,h:2},{component:"description",props:{description:"10x Genomics scATAC-seq of 5k PBMCs. Note: the Zarr HiGlass Plugin Datafetcher is not yet optimized. Please be patient while the HiGlass tracks load."},x:8,y:0,w:4,h:2}],initStrategy:"auto"},"blin-2019":J,"ome-ngff-v0.1":K,"linnarsson-2018":I(F),vanderbilt:I(q),"dries-2019":I(B)},oe);var se="card card-body my-2 ".concat("tooltip-ancestor"),le="".concat(se," bg-primary"),ce="".concat(se," bg-secondary"),pe="".concat(se," bg-black"),ue="".concat(le," scroll");function de(e){var t=e.title,n=e.preformatted,a=e.unformatted,r=e.theme;return s.a.createElement("div",{className:"vitessce-container vitessce-theme-".concat(r)},s.a.createElement("div",{className:"warning-layout container-fluid"},s.a.createElement("div",{className:"row"},s.a.createElement("div",{className:"col-12"},s.a.createElement("div",{className:le},s.a.createElement("h1",null,t),s.a.createElement("pre",null,n),s.a.createElement("div",null,a))))))}var me=n(1243),fe=n(1285),ye=n(1277),he=n(38),ge=n.n(he),ve=n(1241),be=n(716),xe=n(426),Oe=Object(ve.a)((function(){return{paper:{maxHeight:200,overflow:"auto"},container:{position:"relative",left:0,top:0},span:{width:"70px",textAlign:"center",paddingLeft:"2px",paddingRight:"2px"}}})),je={dark:Object(be.a)({palette:{type:"dark",primary:xe.a,secondary:xe.a,primaryBackground:"#222222",primaryBackgroundHighlight:"#000000",primaryBackgroundInput:"#D3D3D3",primaryBackgroundDim:"#333333",primaryBackgroundLight:"#757575",primaryForeground:"#D3D3D3",primaryForegroundDim:"#000000",primaryForegroundActive:"#9bb7d6",secondaryBackground:"#000000",secondaryBackgroundDim:"#444444",secondaryForeground:"#D3D3D3"},props:{MuiButtonBase:{disableRipple:!0}}}),light:Object(be.a)({palette:{type:"light",primary:xe.a,secondary:xe.a,primaryBackground:"#F1F1F1",primaryBackgroundHighlight:"#FFFFFF",primaryBackgroundInput:"#FFFFFF",primaryBackgroundDim:"#8A8A8A",primaryBackgroundLight:"#e0e0e0",primaryForeground:"#333333",primaryForegroundDim:"#808080",primaryForegroundActive:"#0074D9",secondaryBackground:"#F1F1F1",secondaryBackgroundDim:"#C0C0C0",secondaryForeground:"#222222"},props:{MuiButtonBase:{disableRipple:!0}}})},Ee=n(239),Se=n.n(Ee),Ce=n(514),_e=n.n(Ce),Te=n(515),we=n.n(Te),Le=_e()(),Pe=Le.Provider,Ie=Le.useStore,Ae=Le.useStoreApi,ke=Pe,Re=Ie,Ne=Ae,Me=_e()(),De=Me.Provider,Ge=Me.useStore,ze=De,He=Ge,Fe=function(){return Se()((function(e){return{viewConfig:null,loaders:null,setViewConfig:function(t){return e({viewConfig:t})},setLoaders:function(t){return e({loaders:t})},setCoordinationValue:function(t){var n=t.parameter,a=t.scope,r=t.value;return e((function(e){return{viewConfig:Object(l.a)({},e.viewConfig,{coordinationSpace:Object(l.a)({},e.viewConfig.coordinationSpace,Object(c.a)({},n,Object(l.a)({},e.viewConfig.coordinationSpace[n],Object(c.a)({},a,r))))})}}))},removeComponent:function(t){return e((function(e){var n=e.viewConfig.layout.slice();return n.splice(t,1),{viewConfig:Object(l.a)({},e.viewConfig,{layout:n})}}))},changeLayout:function(t){return e((function(e){var n=e.viewConfig.layout.slice();return t.forEach((function(e){var t=Object(o.a)(e,2),a=t[0],r=t[1];n[a]=Object(l.a)({},n[a],{},r)})),{viewConfig:Object(l.a)({},e.viewConfig,{layout:n})}}))}}}))},Xe=function(){return Se()((function(e){return{auxiliaryStore:null,setCoordinationValue:function(t){var n=t.parameter,a=t.scope,r=t.value;return e((function(e){return{auxiliaryStore:Object(l.a)({},e.auxiliaryStore,Object(c.a)({},n,Object(c.a)({},a,r)))}}))}}}))},Ze=Se()((function(e){return{componentHover:null,setComponentHover:function(t){return e({componentHover:t})}}})),Ve=Se()((function(e){return{warning:null,setWarning:function(t){return e({warning:t})}}})),Be=Se()((function(e){return{viewInfo:{},setComponentViewInfo:function(t,n){return e((function(e){return{viewInfo:Object(l.a)({},e.viewInfo,Object(c.a)({},t,n))}}))}}})),Ye=Se()((function(e){return{resizeCount:{},incrementResizeCount:function(){return e((function(e){return{resizeCount:e.resizeCount+1}}))}}}));function Ue(e,t){var n=Re((function(e){return e.setCoordinationValue}));return[Re((function(n){var a=n.viewConfig.coordinationSpace;return m(e.map((function(e){return a&&a[e]?[e,a[e][t[e]]]:[e,void 0]})))}),we.a),Object(i.useMemo)((function(){return m(e.map((function(e){return["set".concat(y(e)),function(a){return n({parameter:e,scope:t[e],value:a})}]})))}),[e,t])]}var qe={spatialRasterLayers:["rasterLayersCallbacks","areLoadingRasterChannnels"]};function We(e,t){var n=He((function(e){return e.setCoordinationValue})),a=function(e){var t={};return Object.keys(e).forEach((function(n){(qe[n]||[]).forEach((function(a){t[a||n]=e[n]}))})),t}(t),r=function(e){return e.map((function(e){return qe[e]})).filter(Boolean).flat()}(e);return[He((function(e){var t=e.auxiliaryStore;return m(r.map((function(e){return t&&t[e]?[e,t[e][a[e]]]:[e,void 0]})))}),we.a),Object(i.useMemo)((function(){return m(r.map((function(e){return["set".concat(y(e)),function(t){return n({parameter:e,scope:a[e],value:t})}]})))}),[e,t])]}function $e(){return Re((function(e){return e.loaders}))}function Je(){return Ze((function(e){return e.componentHover}))}function Ke(){return Ze((function(e){return e.setComponentHover}))}function Qe(){return Ve((function(e){return e.warning}))}function et(){return Ve((function(e){return e.setWarning}))}function tt(e){return Be(Object(i.useCallback)((function(t){return t.viewInfo[e]}),[e]))}function nt(e){var t=Object(i.useRef)(Be.getState().setComponentViewInfo);return function(n){return t.current(e,n)}}function at(){return Ye((function(e){return e.resizeCount}))}function rt(){return Ye((function(e){return e.incrementResizeCount}))}var ot=n(9),it=n(10),st=n(516),lt=n(82),ct=n.n(lt);function pt(e,t){for(var n=[],a=0;a<e.length;a++)n.push(e[a+1]-e[a]);return Object.entries(t).map((function(t){var a,r=Object(o.a)(t,2),i=r[0],s=r[1];return{i:i,y:s.y,h:s.h||1,x:e[s.x],w:(a=n.slice(s.x,s.x+(s.w||1)),a.reduce((function(e,t){return e+t}),0))}}))}var ut=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(){return Object(u.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"componentDidUpdate",value:function(e){this.props.height!==e.height&&this.onWindowResize()}}]),n}(Object(st.WidthProvider)(st.Responsive));function dt(e){var t,n=e.layout,a=e.getComponent,r=e.padding,i=e.margin,l=e.draggableHandle,c=e.reactGridLayoutProps,u=e.rowHeight,d=e.theme,m=e.height,f=e.onRemoveComponent,y=e.onLayoutChange,h=function(e){var t={},n={},a={},r={},i={};if(("components"in e?e.components:e).forEach((function(e,t){var n="".concat("i").concat(t);r[n]={component:e.component,props:e.props||{},coordinationScopes:e.coordinationScopes||{}},i[n]={id:n,x:e.x,y:e.y,w:e.w,h:e.h}})),"components"in e)Object.entries(e.columns).forEach((function(e){var r=Object(o.a)(e,2),s=r[0],l=r[1];t[s]=l[l.length-1],n[s]=pt(l,i),a[s]=s}));else{t.ID=12,n.ID=pt(ct()(13),i),a.ID=1e3}return{cols:t,layouts:n,breakpoints:a,components:r}}(n),g=h.cols,v=h.layouts,b=h.breakpoints,x=h.components,O=(t=v,Math.max.apply(Math,Object(p.a)(Object.values(t).map((function(e){return Math.max.apply(Math,Object(p.a)(e.map((function(e){return e.y+e.h}))))}))))),j=s.a.createElement("style",null,"\n        ".concat(l," {\n          cursor: grab;\n        }\n        ").concat(l,":active {\n          cursor: grabbing;\n        }\n     ")),E=Object.entries(x).map((function(e,t){var n=Object(o.a)(e,2),r=n[0],i=n[1],l=a(i.component);return s.a.createElement("div",{key:r},s.a.createElement(l,Object.assign({},i.props,{uuid:t,coordinationScopes:i.coordinationScopes,theme:d,removeGridComponent:function(){f(t)}})))}));return v&&x&&b&&g&&s.a.createElement(s.a.Fragment,null,j,s.a.createElement(ut,Object.assign({className:"layout",cols:g,layouts:v,breakpoints:b,height:m,rowHeight:u||(window.innerHeight-2*r-(O-1)*i)/O,containerPadding:[r,r],margin:[i,i],draggableHandle:l,onLayoutChange:function(e){if(e.length===Object.entries(x).length){var t=[];e.forEach((function(e){var n=e.i,a=x[n];if(a){var r=parseInt(n.substring(n.indexOf("i")+1),10),o={x:e.x,y:e.y,w:e.w,h:e.h},i={x:a.x,y:a.y,w:a.w,h:a.h};ge()(o,i)||t.push([r,o])}})),t.length>0&&y(t)}}},c),E))}dt.defaultProps={padding:10,margin:10};var mt=n(121),ft=n.n(mt),yt=n(149),ht=n.n(yt),gt=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(e,a){var r;return Object(u.a)(this,n),(r=t.call(this,a)).dataSource=e,r}return n}(function(){function e(t){var n=t.type,a=t.url,r=t.requestInit,o=t.options;Object(u.a)(this,e),this.type=n,this.url=a,this.requestInit=r,this.options=o,this.subscriptions={}}return Object(d.a)(e,[{key:"load",value:function(){throw new Error("The load() method has not been implemented.")}},{key:"subscribe",value:function(e){var t=ht()();return this.subscriptions[t]=e,t}},{key:"unsubscribe",value:function(e){delete this.subscriptions[e]}},{key:"publish",value:function(e){Object.values(this.subscriptions).forEach((function(t){t(e)}))}}]),e}()),vt=function(){function e(t){Object(u.a)(this,e),this.message=t}return Object(d.a)(e,[{key:"warnInConsole",value:function(){throw new Error("The warnInConsole() method has not been implemented.")}}]),e}(),bt=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(e,a,r,o){var i;return Object(u.a)(this,n),(i=t.call(this,"Error while validating ".concat(e,"."))).name="LoaderValidationError",i.datasetType=e,i.datasetFileType=a,i.datasetUrl=r,i.reason=o,i}return Object(d.a)(n,[{key:"warnInConsole",value:function(){var e=this.datasetType,t=this.datasetUrl,n=this.reason;console.warn("".concat(e," from ").concat(t,": validation failed"),JSON.stringify(n,null,2))}}]),n}(vt),xt=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(e,a,r){var o;return Object(u.a)(this,n),(o=t.call(this,"Error finding loader for ".concat(e,"."))).name="LoaderNotFoundError",o.datasetType=e,o.datasetFileType=a,o.datasetUrl=r,o}return Object(d.a)(n,[{key:"warnInConsole",value:function(){var e=this.datasetType,t=this.datasetFileType,n=this.datasetUrl;t&&n?console.warn("".concat(e," from ").concat(n,": unable to find loader for fileType ").concat(t)):console.warn("".concat(e,": unable to find loader"))}}]),n}(vt),Ot=function e(t,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Object(u.a)(this,e),this.data=t,this.url=n,this.coordinationValues=a},jt=n(656),Et=n(657),St=n(658),Ct=n(138),_t=n(118),Tt={cells:jt,molecules:Et,neighborhoods:St,raster:Ct,"cell-sets":_t},wt=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(e,a){var r;Object(u.a)(this,n),r=t.call(this,e,a);var o=a.type;return r.schema=Tt[o],r}return Object(d.a)(n,[{key:"load",value:function(){var e=this,t=this.url,n=this.type,a=this.fileType;return this.data||(this.data=this.dataSource.data.then((function(r){if(r instanceof vt)return Promise.reject(r);var i=e.validate(r),s=Object(o.a)(i,2),l=s[0],c=s[1];return l?Promise.resolve(new Ot(r,t)):Promise.reject(new bt(n,a,t,c))}))),this.data}},{key:"validate",value:function(e){var t=this.schema,n=this.type;if(!t)throw Error("No schema for ".concat(n));var a,r=(new ft.a).compile(t),o=r(e);return o||(a=r.errors),[o,a]}}]),n}(gt),Lt=n(71),Pt=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(){return Object(u.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"loadAttrs",value:function(){return this.attrs||(this.attrs=this.dataSource.getJson(".zattrs")),this.attrs}},{key:"loadArr",value:function(){var e=this.dataSource.store;return this.arr||(this.arr=Object(Lt.d)({store:e,path:"/",mode:"r"}).then((function(e){return new Promise((function(t){e.getRaw([null,null]).then(t)}))}))),this.arr}},{key:"load",value:function(){return Promise.all([this.loadAttrs(),this.loadArr()]).then((function(e){return Promise.resolve(new Ot(e,null))}))}}]),n}(gt),It=n(3),At=n.n(It),kt=n(12),Rt=n(16),Nt=n(17),Mt=n(659),Dt=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(e,a){var r;return Object(u.a)(this,n),(r=t.call(this,e,a)).schema=Mt,r}return Object(d.a)(n,[{key:"load",value:function(){var e=Object(kt.a)(At.a.mark((function e(){var t,a,r,o,i,s,l,c;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Nt.a)(Object(Rt.a)(n.prototype),"load",this).call(this).catch((function(e){return Promise.resolve(e)}));case 2:if(!((t=e.sent)instanceof vt)){e.next=5;break}return e.abrupt("return",Promise.reject(t));case 5:return a=t.data,r=t.url,o=Object.keys(a),i=o.length>0?Object.keys(a[o[0]].cells):[],s={rows:i,cols:o},l=i.flatMap((function(e){return o.map((function(t){return a[t].cells[e]/a[t].max*255}))})),c={data:Uint8Array.from(l)},e.abrupt("return",Promise.resolve(new Ot([s,c],r)));case 12:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),n}(wt),Gt=n(1244),zt=n(660),Ht=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(e,a){var r;return Object(u.a)(this,n),(r=t.call(this,e,a)).schema=zt,r}return Object(d.a)(n,[{key:"load",value:function(){var e=Object(kt.a)(At.a.mark((function e(){var t,a,r,i,s,l,c,p,u,d,m,f;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Nt.a)(Object(Rt.a)(n.prototype),"load",this).call(this).catch((function(e){return Promise.resolve(e)}));case 2:if(!((t=e.sent)instanceof vt)){e.next=5;break}return e.abrupt("return",Promise.reject(t));case 5:return a=t.data,r=t.url,i=a.rows,s=a.cols,l=a.matrix,p=[(c={rows:s,cols:i}).rows.length,c.cols.length],u=l.map((function(e){var t=Object(Gt.a)(e),n=Object(o.a)(t,2),a=n[0],r=n[1];return e.map((function(e){return Math.floor((e-a)/(r-a)*255)}))})),d=ct()(p[0]).map((function(e){return ct()(p[1]).map((function(t){return u[t][e]}))})),m=d.flat(),f={data:Uint8Array.from(m)},e.abrupt("return",Promise.resolve(new Ot([c,f],r)));case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),n}(wt),Ft=n(53),Xt=n(676),Zt=n.n(Xt),Vt=n(23),Bt=n(1279),Yt=n(36),Ut=n(677),qt={cell:{latestVersion:"0.1.3",schema:_t}},Wt={cell:{schema:Ut}};function $t(e,t,n,a){return{coordinateSystem:Yt.a.CARTESIAN,data:e,pickable:!0,autoHighlight:!0,stroked:!0,filled:!0,getElevation:0,onHover:function(e){if(a&&a(),e.object){var r=Object(o.a)(e.object,2),i=r[0],s=r[1].factors;t&&t((l=void 0===s?{}:s,Object.entries(l).map((function(e){var t=Object(o.a)(e,2),n=t[0],a=t[1];return"".concat(n,": ").concat(a)})).join("; "))),n&&n(i)}else n&&n("");var l}}}var Jt=[50,50,50],Kt=[200,200,200];function Qt(e){return"dark"===e?Jt:Kt}var en=[[68,119,170],[136,204,238],[68,170,153],[17,119,51],[153,153,51],[221,204,119],[204,102,119],[136,34,85],[170,68,153]],tn=[[0,0,255],[0,255,0],[255,0,255],[255,255,0],[0,255,255],[255,255,255],[255,128,0],[255,0,0]],nn=["viridis","greys","magma","jet","hot","bone","copper","summer","density","inferno"],an={webgl2:!0};function rn(e,t){var n=1;if(e)for(;e.find((function(e){return e.name==="".concat(t).concat(n)}));)n++;return"".concat(t).concat(n)}function on(e,t,n,a,r,o,i){var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"Selection ",l="My Selections",c=null===t||void 0===t?void 0:t.tree.find((function(e){return e.name===l})),u={version:qt.cell.latestVersion,datatype:"cell",tree:Object(p.a)(t?t.tree:[])},d=rn(null===c||void 0===c?void 0:c.children,s),m=0;c?(m=c.children.length,c.children.push({name:d,set:e.map((function(e){return[e,null]}))})):u.tree.push({name:l,children:[{name:d,set:e.map((function(e){return[e,null]}))}]}),r(u);var f=["My Selections",d];o([].concat(Object(p.a)(n||[]),[{path:f,color:en[m%en.length]}])),a([f]),i("cellSetSelection")}function sn(e,t){return{version:qt.cell.latestVersion,datatype:"cell",tree:[].concat(Object(p.a)(e?e.tree:[]),Object(p.a)(t?t.tree:[]))}}function ln(e){return{__esModule:!0,default:e}}var cn=function(e,t){var n=e[t],a=n.shape,r=n.labels,o=a[r.indexOf("y")],i=a[r.indexOf("x")],s=a[r.indexOf("z")],l=Math.max(1,s>>t);return{height:o,width:i,depthDownsampled:l,totalBytes:4*o*i*l}},pn=function(e,t){var n,a,r,o=cn(e,t),i=o.totalBytes,s=o.height,l=o.width,c=o.depthDownsampled;return i<((null===(n=window.performance)||void 0===n?void 0:n.memory)&&(null===(a=window.performance)||void 0===a||null===(r=a.memory)||void 0===r?void 0:r.jsHeapSizeLimit)/2||Math.pow(2,31)-1)&&s<=2048&&c<=2048&&l<=2048&&c>1},un=["z","t"],dn={visible:!0,colormap:null,opacity:1,domainType:"Min/Max",transparentColor:[0,0,0],renderingMode:Ft.g.ADDITIVE,use3d:!1},mn={opacity:1,radius:20,visible:!0},fn={opacity:1,radius:50,visible:!0,stroked:!1},yn={visible:!1},hn=n(22),gn=n(575),vn=n(576),bn=n(232),xn=n(18),On=["plasma","viridis","jet"];function jn(e,t,n){for(var a=Object(p.a)(e),r=0;r<n;r+=1)a.push(t);return a}var En={hoveredCell:{type:"number",value:null,compare:!0},cellColorData:{type:"object",value:null,compare:!0},colormap:{type:"string",value:"plasma",compare:!0},expressionData:{type:"object",value:null,compare:!0}},Sn=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(){return Object(u.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"getShaders",value:function(){var e=this.props.colormap;return{fs:"\n#define SHADER_NAME bitmask-layer-fragment-shader\nprecision highp float;\n\nvec4 plasma (float x_1306414511) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.050980392156862744,0.03137254901960784,0.5294117647058824,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.29411764705882354,0.011764705882352941,0.6313725490196078,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.49019607843137253,0.011764705882352941,0.6588235294117647,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.6588235294117647,0.13333333333333333,0.5882352941176471,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.796078431372549,0.27450980392156865,0.4745098039215686,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.8980392156862745,0.4196078431372549,0.36470588235294116,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.9725490196078431,0.5803921568627451,0.2549019607843137,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.9921568627450981,0.7647058823529411,0.1568627450980392,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9411764705882353,0.9764705882352941,0.12941176470588237,1);\n  float a0 = smoothstep(e0,e1,x_1306414511);\n  float a1 = smoothstep(e1,e2,x_1306414511);\n  float a2 = smoothstep(e2,e3,x_1306414511);\n  float a3 = smoothstep(e3,e4,x_1306414511);\n  float a4 = smoothstep(e4,e5,x_1306414511);\n  float a5 = smoothstep(e5,e6,x_1306414511);\n  float a6 = smoothstep(e6,e7,x_1306414511);\n  float a7 = smoothstep(e7,e8,x_1306414511);\n  return max(mix(v0,v1,a0)*step(e0,x_1306414511)*step(x_1306414511,e1),\n    max(mix(v1,v2,a1)*step(e1,x_1306414511)*step(x_1306414511,e2),\n    max(mix(v2,v3,a2)*step(e2,x_1306414511)*step(x_1306414511,e3),\n    max(mix(v3,v4,a3)*step(e3,x_1306414511)*step(x_1306414511,e4),\n    max(mix(v4,v5,a4)*step(e4,x_1306414511)*step(x_1306414511,e5),\n    max(mix(v5,v6,a5)*step(e5,x_1306414511)*step(x_1306414511,e6),\n    max(mix(v6,v7,a6)*step(e6,x_1306414511)*step(x_1306414511,e7),mix(v7,v8,a7)*step(e7,x_1306414511)*step(x_1306414511,e8)\n  )))))));\n}\n\nvec4 viridis (float x_1870111103) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.26666666666666666,0.00392156862745098,0.32941176470588235,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.2784313725490196,0.17254901960784313,0.47843137254901963,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.23137254901960785,0.3176470588235294,0.5450980392156862,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.17254901960784313,0.44313725490196076,0.5568627450980392,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.12941176470588237,0.5647058823529412,0.5529411764705883,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.15294117647058825,0.6784313725490196,0.5058823529411764,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.3607843137254902,0.7843137254901961,0.38823529411764707,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.6666666666666666,0.8627450980392157,0.19607843137254902,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9921568627450981,0.9058823529411765,0.1450980392156863,1);\n  float a0 = smoothstep(e0,e1,x_1870111103);\n  float a1 = smoothstep(e1,e2,x_1870111103);\n  float a2 = smoothstep(e2,e3,x_1870111103);\n  float a3 = smoothstep(e3,e4,x_1870111103);\n  float a4 = smoothstep(e4,e5,x_1870111103);\n  float a5 = smoothstep(e5,e6,x_1870111103);\n  float a6 = smoothstep(e6,e7,x_1870111103);\n  float a7 = smoothstep(e7,e8,x_1870111103);\n  return max(mix(v0,v1,a0)*step(e0,x_1870111103)*step(x_1870111103,e1),\n    max(mix(v1,v2,a1)*step(e1,x_1870111103)*step(x_1870111103,e2),\n    max(mix(v2,v3,a2)*step(e2,x_1870111103)*step(x_1870111103,e3),\n    max(mix(v3,v4,a3)*step(e3,x_1870111103)*step(x_1870111103,e4),\n    max(mix(v4,v5,a4)*step(e4,x_1870111103)*step(x_1870111103,e5),\n    max(mix(v5,v6,a5)*step(e5,x_1870111103)*step(x_1870111103,e6),\n    max(mix(v6,v7,a6)*step(e6,x_1870111103)*step(x_1870111103,e7),mix(v7,v8,a7)*step(e7,x_1870111103)*step(x_1870111103,e8)\n  )))))));\n}\n\nvec4 greys (float x_1268378094) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0,1);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(1,1,1,1);\n  float a0 = smoothstep(e0,e1,x_1268378094);\n  return mix(v0,v1,a0)*step(e0,x_1268378094)*step(x_1268378094,e1);\n}\n\nvec4 magma (float x_2443053725) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0.01568627450980392,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.10980392156862745,0.06274509803921569,0.26666666666666666,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.30980392156862746,0.07058823529411765,0.4823529411764706,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.5058823529411764,0.1450980392156863,0.5058823529411764,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.7098039215686275,0.21176470588235294,0.47843137254901963,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.8980392156862745,0.3137254901960784,0.39215686274509803,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.984313725490196,0.5294117647058824,0.3803921568627451,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.996078431372549,0.7607843137254902,0.5294117647058824,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9882352941176471,0.9921568627450981,0.7490196078431373,1);\n  float a0 = smoothstep(e0,e1,x_2443053725);\n  float a1 = smoothstep(e1,e2,x_2443053725);\n  float a2 = smoothstep(e2,e3,x_2443053725);\n  float a3 = smoothstep(e3,e4,x_2443053725);\n  float a4 = smoothstep(e4,e5,x_2443053725);\n  float a5 = smoothstep(e5,e6,x_2443053725);\n  float a6 = smoothstep(e6,e7,x_2443053725);\n  float a7 = smoothstep(e7,e8,x_2443053725);\n  return max(mix(v0,v1,a0)*step(e0,x_2443053725)*step(x_2443053725,e1),\n    max(mix(v1,v2,a1)*step(e1,x_2443053725)*step(x_2443053725,e2),\n    max(mix(v2,v3,a2)*step(e2,x_2443053725)*step(x_2443053725,e3),\n    max(mix(v3,v4,a3)*step(e3,x_2443053725)*step(x_2443053725,e4),\n    max(mix(v4,v5,a4)*step(e4,x_2443053725)*step(x_2443053725,e5),\n    max(mix(v5,v6,a5)*step(e5,x_2443053725)*step(x_2443053725,e6),\n    max(mix(v6,v7,a6)*step(e6,x_2443053725)*step(x_2443053725,e7),mix(v7,v8,a7)*step(e7,x_2443053725)*step(x_2443053725,e8)\n  )))))));\n}\n\nvec4 jet (float x_623120303) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0.5137254901960784,1);\n  const float e1 = 0.125;\n  const vec4 v1 = vec4(0,0.23529411764705882,0.6666666666666666,1);\n  const float e2 = 0.375;\n  const vec4 v2 = vec4(0.0196078431372549,1,1,1);\n  const float e3 = 0.625;\n  const vec4 v3 = vec4(1,1,0,1);\n  const float e4 = 0.875;\n  const vec4 v4 = vec4(0.9803921568627451,0,0,1);\n  const float e5 = 1.0;\n  const vec4 v5 = vec4(0.5019607843137255,0,0,1);\n  float a0 = smoothstep(e0,e1,x_623120303);\n  float a1 = smoothstep(e1,e2,x_623120303);\n  float a2 = smoothstep(e2,e3,x_623120303);\n  float a3 = smoothstep(e3,e4,x_623120303);\n  float a4 = smoothstep(e4,e5,x_623120303);\n  return max(mix(v0,v1,a0)*step(e0,x_623120303)*step(x_623120303,e1),\n    max(mix(v1,v2,a1)*step(e1,x_623120303)*step(x_623120303,e2),\n    max(mix(v2,v3,a2)*step(e2,x_623120303)*step(x_623120303,e3),\n    max(mix(v3,v4,a3)*step(e3,x_623120303)*step(x_623120303,e4),mix(v4,v5,a4)*step(e4,x_623120303)*step(x_623120303,e5)\n  ))));\n}\n\nvec4 bone (float x_783795047) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0,1);\n  const float e1 = 0.376;\n  const vec4 v1 = vec4(0.32941176470588235,0.32941176470588235,0.4549019607843137,1);\n  const float e2 = 0.753;\n  const vec4 v2 = vec4(0.6627450980392157,0.7843137254901961,0.7843137254901961,1);\n  const float e3 = 1.0;\n  const vec4 v3 = vec4(1,1,1,1);\n  float a0 = smoothstep(e0,e1,x_783795047);\n  float a1 = smoothstep(e1,e2,x_783795047);\n  float a2 = smoothstep(e2,e3,x_783795047);\n  return max(mix(v0,v1,a0)*step(e0,x_783795047)*step(x_783795047,e1),\n    max(mix(v1,v2,a1)*step(e1,x_783795047)*step(x_783795047,e2),mix(v2,v3,a2)*step(e2,x_783795047)*step(x_783795047,e3)\n  ));\n}\n\nvec4 copper (float x_3932431844) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0,1);\n  const float e1 = 0.804;\n  const vec4 v1 = vec4(1,0.6274509803921569,0.4,1);\n  const float e2 = 1.0;\n  const vec4 v2 = vec4(1,0.7803921568627451,0.4980392156862745,1);\n  float a0 = smoothstep(e0,e1,x_3932431844);\n  float a1 = smoothstep(e1,e2,x_3932431844);\n  return max(mix(v0,v1,a0)*step(e0,x_3932431844)*step(x_3932431844,e1),mix(v1,v2,a1)*step(e1,x_3932431844)*step(x_3932431844,e2)\n  );\n}\n\nvec4 density (float x_2921433544) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.21176470588235294,0.054901960784313725,0.1411764705882353,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.34901960784313724,0.09019607843137255,0.3137254901960784,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.43137254901960786,0.17647058823529413,0.5176470588235295,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.47058823529411764,0.30196078431372547,0.6980392156862745,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.47058823529411764,0.44313725490196076,0.8352941176470589,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.45098039215686275,0.592156862745098,0.8941176470588236,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.5254901960784314,0.7254901960784313,0.8901960784313725,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.6941176470588235,0.8392156862745098,0.8901960784313725,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9019607843137255,0.9450980392156862,0.9450980392156862,1);\n  float a0 = smoothstep(e0,e1,x_2921433544);\n  float a1 = smoothstep(e1,e2,x_2921433544);\n  float a2 = smoothstep(e2,e3,x_2921433544);\n  float a3 = smoothstep(e3,e4,x_2921433544);\n  float a4 = smoothstep(e4,e5,x_2921433544);\n  float a5 = smoothstep(e5,e6,x_2921433544);\n  float a6 = smoothstep(e6,e7,x_2921433544);\n  float a7 = smoothstep(e7,e8,x_2921433544);\n  return max(mix(v0,v1,a0)*step(e0,x_2921433544)*step(x_2921433544,e1),\n    max(mix(v1,v2,a1)*step(e1,x_2921433544)*step(x_2921433544,e2),\n    max(mix(v2,v3,a2)*step(e2,x_2921433544)*step(x_2921433544,e3),\n    max(mix(v3,v4,a3)*step(e3,x_2921433544)*step(x_2921433544,e4),\n    max(mix(v4,v5,a4)*step(e4,x_2921433544)*step(x_2921433544,e5),\n    max(mix(v5,v6,a5)*step(e5,x_2921433544)*step(x_2921433544,e6),\n    max(mix(v6,v7,a6)*step(e6,x_2921433544)*step(x_2921433544,e7),mix(v7,v8,a7)*step(e7,x_2921433544)*step(x_2921433544,e8)\n  )))))));\n}\n\nvec4 inferno (float x_1987546174) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0.01568627450980392,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.12156862745098039,0.047058823529411764,0.2823529411764706,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.3333333333333333,0.058823529411764705,0.42745098039215684,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.5333333333333333,0.13333333333333333,0.41568627450980394,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.7294117647058823,0.21176470588235294,0.3333333333333333,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.8901960784313725,0.34901960784313724,0.2,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.9764705882352941,0.5490196078431373,0.0392156862745098,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.9764705882352941,0.788235294117647,0.19607843137254902,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9882352941176471,1,0.6431372549019608,1);\n  float a0 = smoothstep(e0,e1,x_1987546174);\n  float a1 = smoothstep(e1,e2,x_1987546174);\n  float a2 = smoothstep(e2,e3,x_1987546174);\n  float a3 = smoothstep(e3,e4,x_1987546174);\n  float a4 = smoothstep(e4,e5,x_1987546174);\n  float a5 = smoothstep(e5,e6,x_1987546174);\n  float a6 = smoothstep(e6,e7,x_1987546174);\n  float a7 = smoothstep(e7,e8,x_1987546174);\n  return max(mix(v0,v1,a0)*step(e0,x_1987546174)*step(x_1987546174,e1),\n    max(mix(v1,v2,a1)*step(e1,x_1987546174)*step(x_1987546174,e2),\n    max(mix(v2,v3,a2)*step(e2,x_1987546174)*step(x_1987546174,e3),\n    max(mix(v3,v4,a3)*step(e3,x_1987546174)*step(x_1987546174,e4),\n    max(mix(v4,v5,a4)*step(e4,x_1987546174)*step(x_1987546174,e5),\n    max(mix(v5,v6,a5)*step(e5,x_1987546174)*step(x_1987546174,e6),\n    max(mix(v6,v7,a6)*step(e6,x_1987546174)*step(x_1987546174,e7),mix(v7,v8,a7)*step(e7,x_1987546174)*step(x_1987546174,e8)\n  )))))));\n}\n\nvec4 cool (float x_761030515) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.49019607843137253,0,0.7019607843137254,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.4549019607843137,0,0.8549019607843137,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.3843137254901961,0.2901960784313726,0.9294117647058824,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.26666666666666666,0.5725490196078431,0.9058823529411765,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0,0.8,0.7725490196078432,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0,0.9686274509803922,0.5725490196078431,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0,1,0.34509803921568627,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.1568627450980392,1,0.03137254901960784,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.5764705882352941,1,0,1);\n  float a0 = smoothstep(e0,e1,x_761030515);\n  float a1 = smoothstep(e1,e2,x_761030515);\n  float a2 = smoothstep(e2,e3,x_761030515);\n  float a3 = smoothstep(e3,e4,x_761030515);\n  float a4 = smoothstep(e4,e5,x_761030515);\n  float a5 = smoothstep(e5,e6,x_761030515);\n  float a6 = smoothstep(e6,e7,x_761030515);\n  float a7 = smoothstep(e7,e8,x_761030515);\n  return max(mix(v0,v1,a0)*step(e0,x_761030515)*step(x_761030515,e1),\n    max(mix(v1,v2,a1)*step(e1,x_761030515)*step(x_761030515,e2),\n    max(mix(v2,v3,a2)*step(e2,x_761030515)*step(x_761030515,e3),\n    max(mix(v3,v4,a3)*step(e3,x_761030515)*step(x_761030515,e4),\n    max(mix(v4,v5,a4)*step(e4,x_761030515)*step(x_761030515,e5),\n    max(mix(v5,v6,a5)*step(e5,x_761030515)*step(x_761030515,e6),\n    max(mix(v6,v7,a6)*step(e6,x_761030515)*step(x_761030515,e7),mix(v7,v8,a7)*step(e7,x_761030515)*step(x_761030515,e8)\n  )))))));\n}\n\nvec4 hot (float x_180130041) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0,1);\n  const float e1 = 0.3;\n  const vec4 v1 = vec4(0.9019607843137255,0,0,1);\n  const float e2 = 0.6;\n  const vec4 v2 = vec4(1,0.8235294117647058,0,1);\n  const float e3 = 1.0;\n  const vec4 v3 = vec4(1,1,1,1);\n  float a0 = smoothstep(e0,e1,x_180130041);\n  float a1 = smoothstep(e1,e2,x_180130041);\n  float a2 = smoothstep(e2,e3,x_180130041);\n  return max(mix(v0,v1,a0)*step(e0,x_180130041)*step(x_180130041,e1),\n    max(mix(v1,v2,a1)*step(e1,x_180130041)*step(x_180130041,e2),mix(v2,v3,a2)*step(e2,x_180130041)*step(x_180130041,e3)\n  ));\n}\n\nvec4 spring (float x_755571360) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(1,0,1,1);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(1,1,0,1);\n  float a0 = smoothstep(e0,e1,x_755571360);\n  return mix(v0,v1,a0)*step(e0,x_755571360)*step(x_755571360,e1);\n}\n\nvec4 summer (float x_2651158874) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0.5019607843137255,0.4,1);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(1,1,0.4,1);\n  float a0 = smoothstep(e0,e1,x_2651158874);\n  return mix(v0,v1,a0)*step(e0,x_2651158874)*step(x_2651158874,e1);\n}\n\nvec4 autumn (float x_626866098) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(1,0,0,1);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(1,1,0,1);\n  float a0 = smoothstep(e0,e1,x_626866098);\n  return mix(v0,v1,a0)*step(e0,x_626866098)*step(x_626866098,e1);\n}\n\nvec4 winter (float x_2098958741) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,1,1);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(0,1,0.5019607843137255,1);\n  float a0 = smoothstep(e0,e1,x_2098958741);\n  return mix(v0,v1,a0)*step(e0,x_2098958741)*step(x_2098958741,e1);\n}\n\n// Data (mask) texture\nuniform sampler2D channel0;\nuniform sampler2D channel1;\nuniform sampler2D channel2;\nuniform sampler2D channel3;\nuniform sampler2D channel4;\nuniform sampler2D channel5;\n\n// Color texture\nuniform sampler2D colorTex;\nuniform float colorTexHeight;\nuniform float colorTexWidth;\nuniform float hovered;\n// range\nuniform bool channelsVisible[6];\n\n// Expression mapping\nuniform vec2 uColorScaleRange;\nuniform bool uIsExpressionMode;\nuniform sampler2D expressionTex;\n\n// opacity\nuniform float opacity;\n\nvarying vec2 vTexCoord;\n\nvec4 sampleAndGetColor(sampler2D dataTex, vec2 coord, bool isOn){\n  float sampledData = texture(dataTex, coord).r;\n  vec4 hoveredColor = float(sampledData == hovered && sampledData > 0. && hovered > 0.) * vec4(0., 0., 1., 1.);\n  // Colors are laid out corresponding to ids in row-major order in the texture.  So if width of the texture is 10, and you want ID 25,\n  // you need coordinate (1, 4) (i.e 2 rows down, and 5 columns over indexed from 0 for a total of 25 units covered in row major order).\n  vec2 colorTexCoord = vec2(mod(sampledData, colorTexWidth) / colorTexWidth, floor(sampledData / colorTexWidth) / (colorTexHeight - 1.));\n  float expressionValue = texture(expressionTex, colorTexCoord).r / 255.;\n  float scaledExpressionValue = (expressionValue - uColorScaleRange[0]) / max(0.005, (uColorScaleRange[1] - uColorScaleRange[0]));\n  vec4 sampledColor = float(uIsExpressionMode) * COLORMAP_FUNC(clamp(scaledExpressionValue, 0.0, 1.0)) +  (1. - float(uIsExpressionMode)) * vec4(texture(colorTex, colorTexCoord).rgb, 1.);\n  // Only return a color if the data is non-zero.\n  return max(0., min(sampledData, 1.)) * float(isOn) * (sampledColor + hoveredColor);\n}\n\nvoid main() {\n\n  gl_FragColor = sampleAndGetColor(channel0, vTexCoord, channelsVisible[0]);\n\n  // If the sampled color and the currently stored color (gl_FragColor) are identical, don't blend and use the sampled color,\n  // otherwise just use the currently stored color.  Repeat this for all channels.\n  vec4 sampledColor = sampleAndGetColor(channel1, vTexCoord, channelsVisible[1]);\n  gl_FragColor = (sampledColor == gl_FragColor || sampledColor == vec4(0.)) ? gl_FragColor : sampledColor;\n  sampledColor = sampleAndGetColor(channel2, vTexCoord, channelsVisible[2]);\n  gl_FragColor = (sampledColor == gl_FragColor || sampledColor == vec4(0.)) ? gl_FragColor : sampledColor;\n  sampledColor = sampleAndGetColor(channel3, vTexCoord, channelsVisible[3]);\n  gl_FragColor = (sampledColor == gl_FragColor || sampledColor == vec4(0.)) ? gl_FragColor : sampledColor;\n  sampledColor = sampleAndGetColor(channel4, vTexCoord, channelsVisible[4]);\n  gl_FragColor = (sampledColor == gl_FragColor || sampledColor == vec4(0.)) ? gl_FragColor : sampledColor;\n  sampledColor = sampleAndGetColor(channel5, vTexCoord, channelsVisible[5]);\n  gl_FragColor = (sampledColor == gl_FragColor || sampledColor == vec4(0.)) ? gl_FragColor : sampledColor;\n  // Apply the opacity if there is pixel data, and if the pixel data is empty i.e no segmentation, use 0 opacity.\n  gl_FragColor = vec4(gl_FragColor.rgb, (gl_FragColor.rgb == vec3(0., 0., 0.)) ? 0.0 : opacity);\n\n  geometry.uv = vTexCoord;\n  DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",vs:"\n#define SHADER_NAME bitmask-layer-vertex-shader\n\nattribute vec2 texCoords;\nattribute vec3 positions;\nattribute vec3 positions64Low;\nattribute vec3 instancePickingColors;\n\nvarying vec2 vTexCoord;\n\nvoid main(void) {\n  geometry.worldPosition = positions;\n  geometry.uv = texCoords;\n  geometry.pickingColor = instancePickingColors;\n  gl_Position = project_position_to_clipspace(positions, positions64Low, vec3(0.0), geometry.position);\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n  vTexCoord = texCoords;\n  vec4 color = vec4(0.0);\n  DECKGL_FILTER_COLOR(color, geometry);\n}\n",modules:[gn.a,vn.a],defines:Object(c.a)({},"COLORMAP_FUNC",On.includes(e)?e:"plasma")}}},{key:"updateState",value:function(e){var t=e.props,a=e.oldProps,r=e.changeFlags;if(Object(Nt.a)(Object(Rt.a)(n.prototype),"updateState",this).call(this,{props:t,oldProps:a,changeFlags:r}),t.cellColorData!==a.cellColorData&&this.setColorTexture(),t.expressionData!==a.expressionData){var o=this.props,i=o.expressionData,s=o.cellTexHeight,l=o.cellTexWidth,c=this.dataToTexture(i,l,s);this.setState({expressionTex:c})}if(t.colormap!==a.colormap){var p=this.context.gl;this.state.model&&this.state.model.delete(),this.setState({model:this._getModel(p)}),this.getAttributeManager().invalidateAll()}}},{key:"setColorTexture",value:function(){var e,t=this.props,n=t.cellColorData,a=t.cellTexHeight,r=t.cellTexWidth,o=new bn.a(this.context.gl,{width:r,height:a,data:n,mipmaps:!1,parameters:(e={},Object(c.a)(e,hn.default.TEXTURE_MIN_FILTER,hn.default.NEAREST),Object(c.a)(e,hn.default.TEXTURE_MAG_FILTER,hn.default.NEAREST),Object(c.a)(e,hn.default.TEXTURE_WRAP_S,hn.default.CLAMP_TO_EDGE),Object(c.a)(e,hn.default.TEXTURE_WRAP_T,hn.default.CLAMP_TO_EDGE),e),format:hn.default.RGB,dataFormat:hn.default.RGB,type:hn.default.UNSIGNED_BYTE});this.setState({colorTex:o})}},{key:"draw",value:function(e){var t=e.uniforms,n=this.props,a=n.channelsVisible,r=n.hoveredCell,o=n.colorScaleLo,i=n.colorScaleHi,s=n.isExpressionMode,c=this.state,p=c.textures,u=c.model,d=c.colorTex,m=c.expressionTex;p&&u&&d&&u.setUniforms(Object.assign({},t,Object(l.a)({hovered:r||0,colorTex:d,expressionTex:m,colorTexHeight:d.height,colorTexWidth:d.width,channelsVisible:jn(a,!1,6-a.length),uColorScaleRange:[o,i],uIsExpressionMode:s},p))).draw()}},{key:"dataToTexture",value:function(e,t,n){var a,r=Object(xn.j)(this.context.gl);return new bn.a(this.context.gl,{width:t,height:n,data:new Float32Array(e),mipmaps:!1,parameters:(a={},Object(c.a)(a,hn.default.TEXTURE_MIN_FILTER,hn.default.NEAREST),Object(c.a)(a,hn.default.TEXTURE_MAG_FILTER,hn.default.NEAREST),Object(c.a)(a,hn.default.TEXTURE_WRAP_S,hn.default.CLAMP_TO_EDGE),Object(c.a)(a,hn.default.TEXTURE_WRAP_T,hn.default.CLAMP_TO_EDGE),a),format:r?hn.default.R32F:hn.default.LUMINANCE,dataFormat:r?hn.default.RED:hn.default.LUMINANCE,type:hn.default.FLOAT})}}]),n}(Ft.j);function Cn(e){return _n.apply(this,arguments)}function _n(){return(_n=Object(kt.a)(At.a.mark((function e(t){var n,a,r,o,i,s,l;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.loader,a=t.selection,r=Array.isArray(n)?n[n.length-1]:n,e.next=4,r.getRaster({selection:a});case 4:return o=e.sent,i=Object(Ft.l)(o.data),s=i.domain,l=i.contrastLimits,e.abrupt("return",{domain:s,slider:l});case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Tn(e){return wn.apply(this,arguments)}function wn(){return(wn=Object(kt.a)(At.a.mark((function e(t){var n,a,r,o,i,s,c,p,u,d,m,f;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.loader,a=t.selection,r=n[n.length-1],o=r.shape,i=r.labels,s=o[i.indexOf("z")]>>n.length-1,e.next=6,r.getRaster({selection:Object(l.a)({},a,{z:0})});case 6:return c=e.sent,e.next=9,r.getRaster({selection:Object(l.a)({},a,{z:Math.floor(s/2)})});case 9:return p=e.sent,e.next=12,r.getRaster({selection:Object(l.a)({},a,{z:Math.max(0,s-1)})});case 12:return u=e.sent,d=Object(Ft.l)(c.data),m=Object(Ft.l)(p.data),f=Object(Ft.l)(u.data),e.abrupt("return",{domain:[Math.min(d.domain[0],m.domain[0],f.domain[0]),Math.max(d.domain[1],m.domain[1],f.domain[1])],slider:[Math.min(d.contrastLimits[0],m.contrastLimits[0],f.contrastLimits[0]),Math.max(d.contrastLimits[1],m.contrastLimits[1],f.contrastLimits[1])]});case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}Sn.layerName="BitmaskLayer",Sn.defaultProps=En;var Ln=function(){var e=Object(kt.a)(At.a.mark((function e(t){var n,a,r,o;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.loader,a=t.selection,r=t.use3d,o=r?Tn:Cn,e.abrupt("return",o({loader:n,selection:a}));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Pn=function(){var e=Object(kt.a)(At.a.mark((function e(t){var n,a,r,o,i,s;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.loader,a=t.selections,r=t.use3d,e.next=3,Promise.all(a.map((function(e){return Ln({loader:n,selection:e,use3d:r})})));case 3:return o=e.sent,i=o.map((function(e){return e.domain})),s=o.map((function(e){return e.slider})),e.abrupt("return",{domains:i,sliders:s});case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function In(e){var t=Array.isArray(e)?e[0]:e,n=t.shape,a=t.labels,r=function(e){var t,n,a=null!==(t=null===e||void 0===e||null===(n=e.meta)||void 0===n?void 0:n.physicalSizes)&&void 0!==t?t:{},r=a.x,o=a.y,i=a.z;if((null===r||void 0===r?void 0:r.size)&&(null===o||void 0===o?void 0:o.size)&&(null===i||void 0===i?void 0:i.size)){var s=Math.min(i.size,r.size,o.size),l=[r.size/s,o.size/s,i.size/s];return(new Vt.Matrix4).scale(l)}return(new Vt.Matrix4).identity()}(t);return[[0,r[0]*n[a.indexOf("x")]],[0,r[5]*n[a.indexOf("y")]],[0,r[10]*n[a.indexOf("z")]]]}function An(e){for(var t=[],n=function(e){var t=e.labels.filter((function(e){return un.includes(e)})),n={};return t.forEach((function(t){n[t]=Math.floor((e.shape[e.labels.indexOf(t)]||0)/2)})),n}(e),a=e.labels.filter((function(t){return!un.includes(t)&&e.shape[e.labels.indexOf(t)]}))[0],r=0;r<Math.min(4,e.shape[e.labels.indexOf(a)]);r+=1)t.push(Object(l.a)(Object(c.a)({},a,r),n));return t}function kn(e){var t=e[e.length-1];return 3===t||4===t}function Rn(e,t){return Nn.apply(this,arguments)}function Nn(){return(Nn=Object(kt.a)(At.a.mark((function e(t,n){var a,r,o,i,s,c,p;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=[],r=g(t),o=An(r),o=kn(r.shape)?[Object(l.a)({},o[0],{c:0})]:o,e.next=6,Pn({loader:t.data,selections:o,use3d:n});case 6:return i=e.sent,s=v(t)?[[0,255],[0,255],[0,255]]:i.domains,c=v(t)?[[255,0,0],[0,255,0],[0,0,255]]:null,p=v(t)?[[0,255],[0,255],[0,255]]:i.sliders,o.forEach((function(e,t){var n=s[t],r=p[t],i={selection:e,color:c?c[t]:1!==o.length?tn[t]:[255,255,255],visible:!0,slider:r||n};a.push(i)})),e.abrupt("return",a);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Mn(e,t){var n=t.map((function(e){return g(e)}));if(e.map((function(e){var t,n,a,r,o,i;return(null===e||void 0===e||null===(t=e.metadata)||void 0===t||null===(n=t.transform)||void 0===n?void 0:n.matrix)||(null===e||void 0===e||null===(a=e.metadata)||void 0===a||null===(r=a.transform)||void 0===r?void 0:r.scale)||(null===e||void 0===e||null===(o=e.metadata)||void 0===o||null===(i=o.transform)||void 0===i?void 0:i.translate)})).some(Boolean)||n.every((function(e){var t,n,a,r;return!(null===(t=e.meta)||void 0===t||null===(n=t.physicalSizes)||void 0===n?void 0:n.x)||!(null===(a=e.meta)||void 0===a||null===(r=a.physicalSizes)||void 0===r?void 0:r.y)})))return e;var a=n.reduce((function(e,t){var n,a,r,o,i,s,l,c,p,u=null===(n=t.meta)||void 0===n||null===(a=n.physicalSizes)||void 0===a||null===(r=a.z)||void 0===r?void 0:r.size,d=[Object(Bt.c)("".concat(null===(o=t.meta)||void 0===o?void 0:o.physicalSizes.x.size," ").concat(null===(i=t.meta)||void 0===i?void 0:i.physicalSizes.x.unit).replace("\xb5","u")),Object(Bt.c)("".concat(null===(s=t.meta)||void 0===s?void 0:s.physicalSizes.y.size," ").concat(null===(l=t.meta)||void 0===l?void 0:l.physicalSizes.y.unit).replace("\xb5","u"))];u&&d.push(Object(Bt.c)("".concat(null===(c=t.meta)||void 0===c?void 0:c.physicalSizes.z.size," ").concat(null===(p=t.meta)||void 0===p?void 0:p.physicalSizes.z.unit).replace("\xb5","u")));return e[0]=void 0===e[0]||-1===Object(Bt.a)(d[0],e[0])?d[0]:e[0],e[1]=void 0===e[1]||-1===Object(Bt.a)(d[1],e[1])?d[1]:e[1],e[2]=void 0===e[2]||-1===Object(Bt.a)(d[2],e[2])?d[2]:e[2],e}),[]);return e.map((function(e,t){var r,o,i,s,c,u,d,m,f,y=n[t],h=null===(r=y.meta)||void 0===r||null===(o=r.physicalSizes)||void 0===o||null===(i=o.z)||void 0===i?void 0:i.size,g=[Object(Bt.c)("".concat(null===(s=y.meta)||void 0===s?void 0:s.physicalSizes.x.size," ").concat(null===(c=y.meta)||void 0===c?void 0:c.physicalSizes.x.unit).replace("\xb5","u")),Object(Bt.c)("".concat(null===(u=y.meta)||void 0===u?void 0:u.physicalSizes.y.size," ").concat(null===(d=y.meta)||void 0===d?void 0:d.physicalSizes.y.unit).replace("\xb5","u"))];h&&g.push(Object(Bt.c)("".concat(null===(m=y.meta)||void 0===m?void 0:m.physicalSizes.z.size," ").concat(null===(f=y.meta)||void 0===f?void 0:f.physicalSizes.z.unit).replace("\xb5","u")));var v=g.map((function(e,t){return Object(Bt.b)(e,a[t])}));if(v[2]||(v[2]=1),ge()(v,[1,1,1]))return e;var b=(new Vt.Matrix4).scale(Object(p.a)(v)),x=Object(l.a)({},e);return x.metadata=Object(l.a)({},x.metadata,{transform:{matrix:b.toArray()}}),x}))}function Dn(e,t,n){return Gn.apply(this,arguments)}function Gn(){return(Gn=Object(kt.a)(At.a.mark((function e(t,n,a){var r,o,i,s,c,p,u,d,m,f,y,h,g,v;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=[],o=[],i=[],e.next=5,Promise.all(t.map((function(e){return e.loaderCreator()})));case 5:for(s=e.sent,c=0;c<t.length;c++)p=t[c],u=s[c],r[c]=u,o[c]=p;if(a&&(o=Mn(o,r)),n)for(y=n.map((function(e){return t.findIndex((function(t){return t.name===e}))})),h=function(e){var t=y[e],n=Rn(r[t]).then((function(n){var a,r,i,s,c;return Promise.resolve(Object(l.a)({type:(null===(a=o[t])||void 0===a||null===(r=a.metadata)||void 0===r?void 0:r.isBitmask)?"bitmask":"raster",index:t},dn,{channels:n.map((function(e,n){return Object(l.a)({},e,{},o[t].channels?o[t].channels[n]:[])})),domainType:"Min/Max",modelMatrix:null===(i=o[t])||void 0===i||null===(s=i.metadata)||void 0===s||null===(c=s.transform)||void 0===c?void 0:c.matrix,transparentColor:e>0?[0,0,0]:null}))}));i.push(n)},g=0;g<y.length;g++)h(g);else d=Math.floor(t.length/2),m=r[d],f=Rn(m).then((function(e){var t,n,a,r,i;return Promise.resolve(Object(l.a)({type:(null===(t=o[d])||void 0===t||null===(n=t.metadata)||void 0===n?void 0:n.isBitmask)?"bitmask":"raster",index:d},dn,{channels:e.map((function(e,t){return Object(l.a)({},e,{},o[d].channels?o[d].channels[t]:[])})),modelMatrix:null===(a=o[d])||void 0===a||null===(r=a.metadata)||void 0===r||null===(i=r.transform)||void 0===i?void 0:i.matrix,transparentColor:d>0?[0,0,0]:null}))})),i.push(f);return e.next=11,Promise.all(i);case 11:return v=e.sent,e.abrupt("return",[v,r,o]);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function zn(e){var t=e.tile,n=t.bbox,a=n.left,r=n.top,i=n.right,s=n.bottom,l=t.x,c=t.y,p=t.z,u=e.data,d=e.id,m=e.loader;if([a,s,i,r].some((function(e){return e<0}))||!u)return null;var f=m[0],y=m[0].shape.slice(-2),h=Object(o.a)(y,2),g=h[0],v=h[1],b=[a,u.height<f.tileSize?g:s,u.width<f.tileSize?v:i,r];return new Sn(e,{channelData:u,bounds:b,id:"sub-layer-".concat(b,"-").concat(d),tileId:{x:l,y:c,z:p}})}function Hn(e){return Fn.apply(this,arguments)}function Fn(){return(Fn=Object(kt.a)(At.a.mark((function e(t){var n,a,r,i,s,c,p,u,d,m,f,y,h,g,v,b,x,O,j,E,S,C,_,T,w,L,P,I,A;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.type,a=t.url,r=t.metadata,i=t.requestInit,e.t0=n,e.next="zarr"===e.t0?4:"ome-tiff"===e.t0?30:53;break;case 4:if(c=(s=r||{}).dimensions,p=s.isPyramid,u=s.transform,d=c.map((function(e){return e.field})),!p){e.next=25;break}return f="".concat(a).concat("/"===a.slice(-1)?"":"/",".zmetadata"),e.next=10,fetch(f);case 10:return y=e.sent,e.next=13,y.json();case 13:return h=e.sent,g=h.metadata,v=Object.keys(g).filter((function(e){return e.includes(".zarray")})).map((function(e){return e.slice(0,-7)})),e.next=18,Promise.all(v.map((function(e){return Object(Lt.d)({store:a,path:e})})));case 18:b=e.sent,x=b[0].chunks.slice(-2),O=Object(o.a)(x,2),j=O[0],E=O[1],S=Math.min(j,E),C=Math.pow(2,Math.floor(Math.log2(S))),m=b.map((function(e){return new Ft.k(e,d,C)})),e.next=29;break;case 25:return e.next=27,Object(Lt.d)({store:a});case 27:_=e.sent,m=new Ft.k(_,d);case 29:return e.abrupt("return",{data:m,metadata:{dimensions:c,transform:u},channels:(c.find((function(e){return"channel"===e.field}))||c[0]).values});case 30:if(!r||!("omeTiffOffsetsUrl"in r)){e.next=47;break}return w=r.omeTiffOffsetsUrl,e.next=34,fetch(w,i||{});case 34:if(!(L=e.sent).ok){e.next=44;break}return e.next=38,L.json();case 38:return P=e.sent,e.next=41,Object(Ft.n)(a,{offsets:P,headers:null===i||void 0===i?void 0:i.headers});case 41:T=e.sent,e.next=45;break;case 44:throw new Error("Offsets not found but provided.");case 45:e.next=50;break;case 47:return e.next=49,Object(Ft.n)(a,{headers:null===i||void 0===i?void 0:i.headers});case 49:T=e.sent;case 50:return I=T.metadata.Pixels.Channels,A=Array.isArray(I)?I.map((function(e,t){return e.Name||"Channel ".concat(t)})):[I.Name||"Channel ".concat(0)],e.abrupt("return",Object(l.a)({},T,{channels:A}));case 53:throw Error("Image type (".concat(n,") is not supported"));case 54:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Xn=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(e,a){var r;Object(u.a)(this,n);var o=a.url,i=a.options;return!o&&i&&(e.url=URL.createObjectURL(new Blob([JSON.stringify(i)]))),(r=t.call(this,e,a)).schema=Ct,r}return Object(d.a)(n,[{key:"load",value:function(){var e=Object(kt.a)(At.a.mark((function e(){var t,a,r,i,s,c,p,u;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Nt.a)(Object(Rt.a)(n.prototype),"load",this).call(this).catch((function(e){return Promise.resolve(e)}));case 2:if(!((t=e.sent)instanceof vt)){e.next=5;break}return e.abrupt("return",Promise.reject(t));case 5:return a=t.data,r=a.images,i=a.renderLayers,s=a.usePhysicalSizeScaling,c=void 0!==s&&s,p=r.filter((function(e){return!e.url.includes("zarr")})).map((function(e){return[e.url,e.name]})),u=r.map((function(e){return Object(l.a)({},e,{loaderCreator:function(){var t=Object(kt.a)(At.a.mark((function t(){return At.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Hn(e));case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()})})),this.autoImageCache||(this.autoImageCache=Dn(u,i,c)),e.abrupt("return",this.autoImageCache.then((function(e){var t=Object(o.a)(e,3),n=t[0],a=t[1],r=t[2];return new Ot({loaders:a,meta:r},p,{spatialRasterLayers:n})})));case 11:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),n}(wt);function Zn(e){var t=/^#?([A-F\d]{2})([A-F\d]{2})([A-F\d]{2})$/i.exec(e);return[parseInt(t[1].toLowerCase(),16),parseInt(t[2].toLowerCase(),16),parseInt(t[3].toLowerCase(),16)]}var Vn=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(){return Object(u.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"load",value:function(){var e=Object(kt.a)(At.a.mark((function e(){var t,n,a,r,i,s,c,p,u,d,m,f,y,h,g,v,b,x,O;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.dataSource.getJson(".zattrs").catch((function(e){return Promise.resolve(e)}));case 2:if(!((a=e.sent)instanceof vt)){e.next=5;break}return e.abrupt("return",Promise.reject(a));case 5:return e.next=7,Object(Ft.o)(this.url,{fetchOptions:this.requestInit,type:"multiscales"});case 7:if(r=e.sent,i=r.metadata,s=r.data,c=i.omero){e.next=13;break}return console.error("Path for image not valid"),e.abrupt("return",Promise.reject(a));case 13:return p=c.rdefs,u=c.channels,d=null!==(t=p.defaultT)&&void 0!==t?t:0,m=null!==(n=p.defaultZ)&&void 0!==n?n:0,f=function(e){if(s.length>0){var t={},n=s[0].labels;return Object.keys(e).forEach((function(a){n.includes(a)&&(t[a]=e[a])})),t}return e},y=[{name:c.name||"Image",channels:u.map((function(e,t){return{selection:f({z:m,t:d,c:t}),slider:[e.window.start,e.window.end],color:Zn(e.color)}})),loaderCreator:function(){var e=Object(kt.a)(At.a.mark((function e(){return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Object(l.a)({},r,{channels:u.map((function(e){return e.label}))}));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}],e.next=20,Dn(y,void 0);case 20:return h=e.sent,g=Object(o.a)(h,3),v=g[0],b=g[1],x=g[2],O={spatialRasterLayers:v},e.abrupt("return",Promise.resolve(new Ot({loaders:b,meta:x},[],O)));case 27:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),n}(gt),Bn=n(327),Yn=n.n(Bn),Un=n(1248),qn=n(678),Wn=n(412),$n=n.n(Wn);function Jn(e,t,n){e.key===t&&(e.preventDefault(),n())}function Kn(e){return $n()({r:e[0],g:e[1],b:e[2]}).toHexString()}function Qn(e){var t=$n()(e).toRgb();return[t.r,t.g,t.b]}function ea(e){if(0===e)return"Color by hierarchy";if(e<=2){return"Color by ".concat("sub".repeat(e-1),"cluster")}return"Color by cluster level ".concat(e)}function ta(e,t){return e.length<=t.length&&ge()(e,t.slice(0,e.length))}function na(e,t,n){return ta(e,t)?[].concat(Object(p.a)(n),Object(p.a)(t.slice(n.length))):t}function aa(e){return e.join("___")}var ra=n(59),oa=n(307),ia=n.n(oa),sa=n(679),la=n.n(sa);function ca(e){return e?e.children?e.children.flatMap((function(e){return ca(e)})):e.set||[]:[]}function pa(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!e.children)return t;var n=t+1,a=e.children.map((function(e){return pa(e,n)}));return Math.max.apply(Math,Object(p.a)(a).concat([n]))}function ua(e){return e?e.children?e.children.reduce((function(e,t){return e+ua(t)}),0):(null===(t=e.set)||void 0===t?void 0:t.length)||0:0;var t}function da(e,t){var n=e.tree.map((function(e){return function e(t,n,a){var r=n[a];if(t.name===r){if(a===n.length-1)return t;if(t.children){var o=t.children.map((function(t){return e(t,n,a+1)})).filter(Boolean);if(1===o.length)return o[0]}}return null}(e,t,0)})).filter(Boolean);return 1===n.length?n[0]:null}function ma(e,t,n,a,r){var o;return o=r?Object(p.a)(r):[e.name],t(e,o)?(a.push(o),n(e,o)):e.children?Object(l.a)({},e,{children:e.children.map((function(e){return ma(e,t,n,a,o.concat([e.name]))}))}):e}function fa(e,t){return Object(l.a)({},e,{children:[].concat(Object(p.a)(e.children),[t])})}function ya(e,t){var n=t.map((function(t){return da(e,t)})).map((function(e){return ca(e).map((function(e){return Object(o.a)(e,1)[0]}))}));return n.reduce((function(e,t){return e.concat(t.filter((function(t){return!e.includes(t)})))}),n[0]||[])}function ha(e,t,n){var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return e.children?0===t?[[].concat(Object(p.a)(n),[e.name])]:e.children.flatMap((function(r){return ha(r,t-1,[].concat(Object(p.a)(n),[e.name]),a)})).filter(Boolean):a?[[].concat(Object(p.a)(n),[e.name])]:null}function ga(e,t){return{version:qt[t].latestVersion,datatype:t,tree:e.tree}}function va(e,t,n,a,r){var o=da(e,t),i=function e(t,n,a,r,o){var i;i=o?Object(p.a)(o):[t.name];var s=t;return n(t,i)&&(r.push(i),s=a(t,i)),t.children?Object(l.a)({},s,{children:s.children.map((function(t){return e(t,n,a,r,i.concat([t.name]))}))}):s}(o,(function(){return!0}),(function(e,t){var n,o,i=null!==(n=null===a||void 0===a||null===(o=a.find((function(e){return ge()(e.path,t)})))||void 0===o?void 0:o.color)&&void 0!==n?n:Qt(r);return Object(l.a)({},e,{color:i.slice(0,3)})}),[]);return{treeToExport:ga(Object(l.a)({},e,{tree:[i]}),n),nodeName:o.name}}function ba(e){return{version:qt[e].latestVersion,datatype:e,tree:[]}}function xa(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[128,128,128];return[(e[0]-n[0])*t+n[0],(e[1]-n[1])*t+n[1],(e[2]-n[2])*t+n[2]]}function Oa(e,t,n,a){var r=[];return t.forEach((function(t){var o=da(e,t);if(o){var i,s=ca(o),l=(null===n||void 0===n||null===(i=n.find((function(e){return ge()(e.path,t)})))||void 0===i?void 0:i.color)||Qt(a);r.push({key:ht()(),name:o.name,size:s.length,color:l})}})),r}function ja(e,t,n){return ge()([].concat(Object(p.a)(t),[e.name]),n)?null:e.children?Object(l.a)({},e,{children:e.children.map((function(a){return ja(a,[].concat(Object(p.a)(t),[e.name]),n)})).filter(Boolean)}):e}function Ea(e,t){var n=[],a=[],r=!1;function o(e,t){n.push([].concat(Object(p.a)(t),[e.name])),e.children&&e.children.forEach((function(n){return o(n,[].concat(Object(p.a)(t),[e.name]))}))}return e.tree.forEach((function(e){return o(e,[])})),t.tree.forEach((function(e){return t=e,n=[],a.push([].concat(Object(p.a)(n),[t.name])),void(t.children&&t.children.forEach((function(e){return o(e,[].concat(Object(p.a)(n),[t.name]))})));var t,n})),a.forEach((function(e){n.find((function(t){return ge()(t,e)}))&&(r=!0)})),r}function Sa(e,t){var n=Object(p.a)(t||[]),a=e.tree.map((function(e){return Array.from({length:pa(e)+1}).fill(0)}));return e.tree.forEach((function(e,t){return function e(t,r,o,i){var s=a[i][o],l=[].concat(Object(p.a)(r),[t.name]);if(!n.find((function(e){return ge()(e.path,l)}))){var c=t.color?t.color:en[s%en.length];n.push({path:l,color:c})}a[i][o]+=1,t.children&&t.children.forEach((function(t){return e(t,l,o+1,i)}))}(e,[],0,t)})),n}function Ca(e){var t=e.cells,n=e.mapping,a=e.cellSets,r=e.cellSetSelection,i=e.cellSetColor,s=e.theme;return r&&r.length>0&&a&&t?function(e,t,n,a,r,i){var s=[];return a.forEach((function(a){var l=da(e,a);if(l){var c,p=ca(l),u=(null===r||void 0===r||null===(c=r.find((function(e){return ge()(e.path,a)})))||void 0===c?void 0:c.color)||Qt(i),d=p.map((function(e){var a,r,i=Object(o.a)(e,1)[0];return[null===(a=t[i])||void 0===a?void 0:a.mappings[n][0],-(null===(r=t[i])||void 0===r?void 0:r.mappings[n][1])]})).filter((function(e){return e.every((function(e){return"number"===typeof e}))}));if(d.length>2){var m=Object(ra.featureCollection)(d.map(ra.point)),f=la()(d,1/0);if(f){var y=ia()(m).geometry.coordinates;s.push({path:a,name:a[a.length-1],hull:f,color:u,centroid:y})}}}})),s}(a,t,n,r,i,s):[]}function _a(e,t){var n=(new ft.a).compile(qt[t].schema);if(!n(e)){var a=JSON.stringify(n.errors,null,2);throw new Error("Tree validation failed: ".concat(a))}if(e.datatype!==t)throw new Error("The data type does not match the expected data type of '".concat(t,"'."));return"0.1.2"===e.version?Object(l.a)({},e,{version:qt[t].latestVersion,tree:e.tree.map((function(e){return ma(e,(function(e){return!e.children&&Array.isArray(e.set)}),(function(e){return Object(l.a)({},e,{set:e.set.map((function(e){return[e,null]}))})}),[])}))}):e}function Ta(e,t,n){var a=JSON.parse(e);return a=_a(a,t)}function wa(e,t,n){var a=Object(Un.a)(",").parse(e,(function(e){return{groupName:e.groupName,setName:e.setName,setColor:e.setColor?Qn(e.setColor):Qt(n),obsId:e.obsId,predictionScore:Yn()(e.predictionScore)||"NA"===e.predictionScore?null:+e.predictionScore}})),r=(new ft.a).compile(Wt[t].schema);if(r(a)){var o={version:qt[t].latestVersion,datatype:t,tree:[]};return Array.from(new Set(a.map((function(e){return e.groupName})))).forEach((function(e){var t={name:e,children:[]},n=a.filter((function(t){return t.groupName===e}));Array.from(new Set(n.map((function(e){return e.setName})))).forEach((function(e){var a=n.filter((function(t){return t.setName===e})),r=a[0].setColor,o={name:e,color:r,set:a.map((function(e){return[e.obsId,e.predictionScore]}))};t.children.push(o)})),o.tree.push(t)})),o}var i=JSON.stringify(r.errors,null,2);throw new Error("Import validation failed: ".concat(i))}function La(e){var t=JSON.stringify(e);return"data:".concat("application/json",";charset=utf-8,").concat(encodeURIComponent(t))}function Pa(e,t){var n=document.createElement("a");n.setAttribute("href",e),n.setAttribute("download",t),document.body.appendChild(n),n.click(),n.remove()}var Ia=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(e,a){var r;return Object(u.a)(this,n),(r=t.call(this,e,a)).schema=_t,r}return Object(d.a)(n,[{key:"load",value:function(){var e=Object(kt.a)(At.a.mark((function e(){var t,a,r,o,i,s,l,c,p;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Nt.a)(Object(Rt.a)(n.prototype),"load",this).call(this).catch((function(e){return Promise.resolve(e)}));case 2:if(!((t=e.sent)instanceof vt)){e.next=5;break}return e.abrupt("return",Promise.reject(t));case 5:return a=t.data,r=t.url,o=_a(a,"cell"),i={cellSetSelection:[],cellSetColor:[]},o&&o.tree.length>=1&&(s=o.tree,l=s[0].name,c=s[0].children.map((function(e){return[l,e.name]})),p=Sa(o,[]),i.cellSetSelection=c,i.cellSetColor=p),e.abrupt("return",Promise.resolve(new Ot(o,r,i)));case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),n}(wt),Aa=n(680);function ka(e,t){var n=Object(o.a)(e,3),a=n[0],r=n[1],i=n[2],s=ba("cell");return r.forEach((function(e,n){var r={name:t[n].groupName,children:[]};if(e.length>0&&Array.isArray(e[0])){var o=new Aa.a([],JSON.stringify);a.forEach((function(t,n){var a=e.map((function(e){return e[n]}));o.has(a)?o.get(a).push([t,null]):o.set(a,[[t,null]])}));var l=Array.from(o.keys()),c=function(e){return Array.from(new Set(e.map((function(e){return e[0]})))).sort((function(e,t){return e.localeCompare(t)}))},u=c(l).map((function(e){return function e(t,n,a){var r=0===a.length,i={name:n};if(r)i.set=o.get([].concat(Object(p.a)(t),[n]));else if(1===a.length&&n===a[0][a[0].length-1])i.set=o.get([].concat(Object(p.a)(t),[n],Object(p.a)(a[0])));else{var s=c(a);i.children=s.map((function(r){return e([].concat(Object(p.a)(t),[n]),r,a.filter((function(e){return e[0]===r})).map((function(e){return e.slice(1)})).filter((function(e){return e.length>0})))}))}return i}([],e,l.filter((function(t){return t[0]===e})).map((function(e){return e.slice(1)})))}));r.children=u}else{var d=Array.from(new Set(e)).sort(),m={};d.forEach((function(e){return m[e]={name:e,set:[]}})),i[n]?e.forEach((function(e,t){return m[e].set.push([a[t],i[n][t]])})):e.forEach((function(e,t){return m[e].set.push([a[t],null])})),Object.values(m).forEach((function(e){return r=fa(r,e)}))}s.tree.push(r)})),s}var Ra=function(e){var t=Object(Gt.a)(e),n=Object(o.a)(t,2),a=n[0],r=255/(n[1]-a);return{data:new Uint8Array(e.map((function(e){return Math.floor((e-a)*r)})))}},Na=function(e){for(var t=e.length,n=e[0].length,a=e[0].BYTES_PER_ELEMENT,r=new DataView(new ArrayBuffer(t*n*a)),o=e[0].constructor,i=o.name.replace("Array",""),s=0;s<t;s+=1)for(var l=0;l<n;l+=1)r["set".concat(i)](a*(l*t+s),e[s][l],!0);return new o(r.buffer)},Ma={CellSetsZarrLoader:function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(){return Object(u.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"loadCellSetIds",value:function(){var e=this.options.map((function(e){return e.setName}));return this.dataSource.loadObsVariables(e)}},{key:"loadCellSetScores",value:function(){var e=this.options.map((function(e){return e.scoreName||void 0}));return this.dataSource.loadObsVariables(e)}},{key:"load",value:function(){var e=Object(kt.a)(At.a.mark((function e(){var t,n,a,r,o,i,s;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.cellSetsTree||(t=this.options,this.cellSetsTree=Promise.all([this.dataSource.loadObsIndex(),this.loadCellSetIds(),this.loadCellSetScores()]).then((function(e){return ka(e,t)}))),e.next=3,this.cellSetsTree;case 3:return n=e.sent,a={},r=n.tree,o=r[0].name,i=r[0].children.map((function(e){return[o,e.name]})),s=Sa(n,[]),a.cellSetSelection=i,a.cellSetColor=s,e.abrupt("return",Promise.resolve(new Ot(n,null,a)));case 12:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),n}(gt),CellsZarrLoader:function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(){return Object(u.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"loadXy",value:function(){var e=(this.options||{}).xy;return this.xy?this.xy:!this.xy&&e?(this.xy=this.dataSource.loadNumeric(e),this.xy):(this.xy=Promise.resolve(null),this.xy)}},{key:"loadPoly",value:function(){var e=(this.options||{}).poly;return this.poly?this.poly:!this.poly&&e?(this.poly=this.dataSource.loadNumeric(e),this.poly):(this.poly=Promise.resolve(null),this.poly)}},{key:"loadMappings",value:function(){var e=this,t=(this.options||{}).mappings;return this.mappings?this.mappings:!this.mappings&&t?(this.mappings=Promise.all(Object.keys(t).map(function(){var n=Object(kt.a)(At.a.mark((function n(a){var r;return At.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=t[a].key,n.t0=a,n.next=4,e.dataSource.loadNumeric(r);case 4:return n.t1=n.sent,n.abrupt("return",{coordinationName:n.t0,arr:n.t1});case 6:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}())),this.mappings):(this.mappings=Promise.resolve(null),this.mappings)}},{key:"loadFactors",value:function(){var e=(this.options||{}).factors;return e?this.dataSource.loadObsVariables(e):Promise.resolve(null)}},{key:"load",value:function(){var e=Object(kt.a)(At.a.mark((function e(){var t=this;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.cells||(this.cells=Promise.all([this.loadMappings(),this.loadXy(),this.loadPoly(),this.dataSource.loadObsIndex(),this.loadFactors()]).then((function(e){var n=Object(o.a)(e,5),a=n[0],r=n[1],i=n[2],s=n[3],l=n[4],c={};return s.forEach((function(e,n){if(c[e]={},a&&a.forEach((function(a){var r=a.coordinationName,o=a.arr;c[e].mappings||(c[e].mappings={});var i=t.options.mappings[r].dims;c[e].mappings[r]=i.map((function(e){return o.data[n][e]}))})),r&&(c[e].xy=r.data[n]),i&&(c[e].poly=i.data[n]),l){var o={};l.forEach((function(e,a){return o[t.options.factors[a].split("/").slice(-1)]=e[n]})),c[e].factors=o}})),c}))),e.t0=Promise,e.t1=Ot,e.next=5,this.cells;case 5:return e.t2=e.sent,e.t3=new e.t1(e.t2,null),e.abrupt("return",e.t0.resolve.call(e.t0,e.t3));case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),n}(gt),MatrixZarrLoader:function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(){return Object(u.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"loadFilteredGeneNames",value:function(){var e=Object(kt.a)(At.a.mark((function e(){var t,n,a=this;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.filteredGeneNames){e.next=2;break}return e.abrupt("return",this.filteredGeneNames);case 2:return t=this.options.geneFilter,n=function(){var e=Object(kt.a)(At.a.mark((function e(){var n;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return",(function(e){return e}));case 2:return e.next=4,a.dataSource.getFlatArrDecompressed(t);case 4:return n=e.sent,e.abrupt("return",(function(e){return e.filter((function(e,t){return n[t]}))}));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),this.filteredGeneNames=Promise.all([this.dataSource.loadVarIndex(),n()]).then((function(e){var t=Object(o.a)(e,2),n=t[0];return(0,t[1])(n)})),e.abrupt("return",this.filteredGeneNames);case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_getFilteredGenes",value:function(){var e=Object(kt.a)(At.a.mark((function e(t){var n,a,r;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.dataSource.getFlatArrDecompressed(t);case 2:return n=e.sent,e.next=5,this.loadFilteredGeneNames();case 5:return a=e.sent,r=a.filter((function(e,t){return n[t]})),e.abrupt("return",r);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_getGeneIndices",value:function(){var e=Object(kt.a)(At.a.mark((function e(t){var n;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.loadFilteredGeneNames();case 2:return n=e.sent,e.abrupt("return",t.map((function(e){return n.indexOf(e)})));case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_getNumCells",value:function(){var e=Object(kt.a)(At.a.mark((function e(){var t;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.dataSource.loadObsIndex();case 2:return t=e.sent,e.abrupt("return",t.length);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_getNumGenes",value:function(){var e=Object(kt.a)(At.a.mark((function e(){var t;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.loadFilteredGeneNames();case 2:return t=e.sent,e.abrupt("return",t.length);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_openSparseArrays",value:function(){var e=Object(kt.a)(At.a.mark((function e(){var t,n;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.options.matrix,n=this.dataSource.store,!this.sparseArrays){e.next=4;break}return e.abrupt("return",this.sparseArrays);case 4:return this.sparseArrays=Promise.all(["indptr","indices","data"].map((function(e){return Object(Lt.d)({store:n,path:"".concat(t,"/").concat(e),mode:"r"})}))),e.abrupt("return",this.sparseArrays);case 6:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_loadCSCGeneSelection",value:function(){var e=Object(kt.a)(At.a.mark((function e(t){var n,a,r,i,s,l,c,p,u;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getGeneIndices(t);case 2:return n=e.sent,e.next=5,this._openSparseArrays();case 5:return a=e.sent,r=Object(o.a)(a,3),i=r[0],s=r[1],l=r[2],e.next=12,this._getNumCells();case 12:return c=e.sent,e.next=15,i.getRaw(null);case 15:return p=e.sent,u=p.data,e.abrupt("return",Promise.all(n.map(function(){var e=Object(kt.a)(At.a.mark((function e(t){var n,a,r,o,i,p,d,m,f;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=u[t],a=u[t+1],r=n===a,o=new Float32Array(c).fill(0),!r){e.next=6;break}return e.abrupt("return",o);case 6:return e.next=8,s.get([Object(Lt.f)(n,a)]);case 8:return i=e.sent,p=i.data,e.next=12,l.get([Object(Lt.f)(n,a)]);case 12:for(d=e.sent,m=d.data,f=0;f<p.length;f+=1)o[p[f]]=m[f];return e.abrupt("return",o);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 18:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_loadCSRGeneSelection",value:function(){var e=Object(kt.a)(At.a.mark((function e(t){var n,a,r,o;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getGeneIndices(t);case 2:return n=e.sent,e.next=5,this._getNumGenes();case 5:return a=e.sent,e.next=8,this._getNumCells();case 8:return r=e.sent,e.next=11,this._loadCSRSparseCellXGene();case 11:return o=e.sent,e.abrupt("return",n.map((function(e){for(var t=new Float32Array(r).fill(0),n=0;n<r;n+=1)t[n]=o[n*a+e];return t})));case 13:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"_loadCSRSparseCellXGene",value:function(){var e=Object(kt.a)(At.a.mark((function e(){var t=this;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._sparseMatrix){e.next=2;break}return e.abrupt("return",this._sparseMatrix);case 2:return this._sparseMatrix=this._openSparseArrays().then(function(){var e=Object(kt.a)(At.a.mark((function e(n){var a,r,i,s,l,c,p,u,d,m;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.options.matrix,e.next=3,t.dataSource.getJson("".concat(a,"/.zattrs"));case 3:return r=e.sent,i=r.shape,e.next=7,Promise.all(n.map(function(){var e=Object(kt.a)(At.a.mark((function e(t){var n,a;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getRaw(null);case 2:return n=e.sent,a=n.data,e.abrupt("return",a);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 7:return s=e.sent,l=Object(o.a)(s,3),c=l[0],p=l[1],u=l[2],d=new Float32Array(i[0]*i[1]).fill(0),m=0,c.forEach((function(e,t){for(var n=c[t],a=c[t+1],r=n;r<a;r+=1){var o=u[r],s=p[r];d[m*i[1]+s]=o}m+=1})),e.abrupt("return",d);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.abrupt("return",this._sparseMatrix);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"_loadCSCSparseCellXGene",value:function(){var e=Object(kt.a)(At.a.mark((function e(){var t=this;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._sparseMatrix){e.next=2;break}return e.abrupt("return",this._sparseMatrix);case 2:return this._sparseMatrix=this._openSparseArrays().then(function(){var e=Object(kt.a)(At.a.mark((function e(n){var a,r,i,s,l,c,p,u,d,m;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.options.matrix,e.next=3,t.dataSource.getJson("".concat(a,"/.zattrs"));case 3:return r=e.sent,i=r.shape,e.next=7,Promise.all(n.map(function(){var e=Object(kt.a)(At.a.mark((function e(t){var n,a;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getRaw(null);case 2:return n=e.sent,a=n.data,e.abrupt("return",a);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 7:return s=e.sent,l=Object(o.a)(s,3),c=l[0],p=l[1],u=l[2],d=new Float32Array(i[0]*i[1]).fill(0),m=0,c.forEach((function(e,t){for(var n=c[t],a=c[t+1],r=n;r<a;r+=1){var o=u[r],s=p[r];d[s*i[1]+m]=o}m+=1})),e.abrupt("return",d);case 16:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.abrupt("return",this._sparseMatrix);case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"loadCellXGene",value:function(){var e=Object(kt.a)(At.a.mark((function e(){var t,n,a,r,o,i,s=this;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.dataSource.store,!this.cellXGene){e.next=3;break}return e.abrupt("return",this.cellXGene);case 3:if(n=this.options,a=n.matrix,r=n.matrixGeneFilter,this._matrixZattrs){e.next=8;break}return e.next=7,this.dataSource.getJson("".concat(a,"/.zattrs"));case 7:this._matrixZattrs=e.sent;case 8:if(o=this._matrixZattrs["encoding-type"],r){e.next=13;break}"csr_matrix"===o?this.cellXGene=this._loadCSRSparseCellXGene().then((function(e){return Ra(e)})):"csc_matrix"===o?this.cellXGene=this._loadCSCSparseCellXGene().then((function(e){return Ra(e)})):(this.arr||(this.arr=Object(Lt.d)({store:t,path:a,mode:"r"})),this.cellXGene=this.arr.then((function(e){return e.getRaw(null).then((function(e){var t=e.data;return Ra(t)}))}))),e.next=21;break;case 13:if("csr_matrix"!==o){e.next=17;break}this.cellXGene=this._loadCSRSparseCellXGene().then(function(){var e=Object(kt.a)(At.a.mark((function e(t){var n,a,o,i,l,c,p,u,d;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s._getFilteredGenes(r);case 2:return n=e.sent,a=n.length,e.next=6,s.loadFilteredGeneNames();case 6:return o=e.sent,i=o.length,e.next=10,s._getNumCells();case 10:for(l=e.sent,c=new Float32Array(l*a).fill(0),p=0;p<a;p+=1)for(u=o.indexOf(n[p]),d=0;d<l;d+=1)c[d*a+p]=t[d*i+u];return e.abrupt("return",Ra(c));case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=21;break;case 17:return e.next=19,this._getFilteredGenes(r);case 19:i=e.sent,this.cellXGene=this.loadGeneSelection({selection:i,shouldNormalize:!1}).then((function(e){var t=e.data;return Ra(Na(t))}));case 21:return e.abrupt("return",this.cellXGene);case 22:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"loadGeneSelection",value:function(){var e=Object(kt.a)(At.a.mark((function e(t){var n,a,r,o,i,s,l,c,p=this;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.selection,a=t.shouldNormalize,r=void 0===a||a,o=this.options.matrix,i=this.dataSource.store,this._matrixZattrs){e.next=7;break}return e.next=6,this.dataSource.getJson("".concat(o,"/.zattrs"));case 6:this._matrixZattrs=e.sent;case 7:if("csc_matrix"!==(s=this._matrixZattrs["encoding-type"])){e.next=14;break}return e.next=11,this._loadCSCGeneSelection(n);case 11:l=e.sent,e.next=27;break;case 14:if("csr_matrix"!==s){e.next=20;break}return e.next=17,this._loadCSRGeneSelection(n);case 17:l=e.sent,e.next=27;break;case 20:return this.arr||(this.arr=Object(Lt.d)({store:i,path:o,mode:"r"})),e.next=23,this._getGeneIndices(n);case 23:return c=e.sent,e.next=26,Promise.all(c.map((function(e){return p.arr.then((function(t){return t.get([null,e])})).then((function(e){return e.data}))})));case 26:l=e.sent;case 27:return e.abrupt("return",{data:l.map((function(e){return r?Ra(e).data:e})),url:null});case 28:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"loadAttrs",value:function(){return Promise.all([this.dataSource.loadObsIndex(),this.loadFilteredGeneNames()]).then((function(e){var t=Object(o.a)(e,2);return{data:{rows:t[0],cols:t[1]},url:null}}))}},{key:"load",value:function(){var e=this;return Promise.all([this.loadAttrs(),this.loadCellXGene()]).then(function(){var t=Object(kt.a)(At.a.mark((function t(n){var a,r,i,s,l;return At.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=Object(o.a)(n,2),r=a[0].data,i=a[1],!(s=e.options.matrixGeneFilter)){t.next=7;break}return t.next=5,e.dataSource.getFlatArrDecompressed(s);case 5:l=t.sent,r.cols=r.cols.filter((function(e,t){return l[t]}));case 7:return t.abrupt("return",Promise.resolve(new Ot([r,i],null)));case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}}]),n}(gt)},Da=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(){return Object(u.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"loadAttrs",value:function(){return this.attrs||(this.attrs=this.dataSource.getJson(".zattrs")),this.attrs}},{key:"load",value:function(){var e=this.url;return this.loadAttrs().then((function(t){return Promise.resolve(new Ot(t,e))}))}}]),n}(gt),Ga=function(){function e(t){var n=t.url,a=t.requestInit;Object(u.a)(this,e);this.store=new Lt.b(n,{supportedMethods:["GET"],fetchOptions:a})}return Object(d.a)(e,[{key:"getJson",value:function(){var e=Object(kt.a)(At.a.mark((function e(t){var n,a;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.store.getItem(t);case 3:return n=e.sent,a=new TextDecoder("utf-8").decode(n),e.abrupt("return",JSON.parse(a));case 8:if(e.prev=8,e.t0=e.catch(0),!(e.t0 instanceof Lt.c)){e.next=12;break}return e.abrupt("return",{});case 12:throw e.t0;case 13:case"end":return e.stop()}}),e,this,[[0,8]])})));return function(t){return e.apply(this,arguments)}}()}]),e}(),za=function(e){if(4!==e.length)throw new Error("readFloat32 only takes in length 4 byte buffers");return new Int32Array(e.buffer)[0]};function Ha(e){var t=new TextDecoder,n=0,a=n+e.length,r=za(e.slice(n,4));if(e.length<4)throw new Error("corrupt buffer, missing or truncated header");n+=4;for(var o=new Array(r),i=0;i<r;i+=1){if(n+4>a)throw new Error("corrupt buffer, data seem truncated");var s=za(e.slice(n,n+4));if((n+=4)+s>a)throw new Error("corrupt buffer, data seem truncated");o[i]=t.decode(e.slice(n,n+s)),n+=s}return o}var Fa,Xa=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(){var e;Object(u.a)(this,n);for(var a=arguments.length,r=new Array(a),o=0;o<a;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))).obsPromises=new Map,e}return Object(d.a)(n,[{key:"loadObsVariables",value:function(e){var t=this,n=e.map((function(e){var n=function(e){if(!t.obsPromises.has(e)){var n=t._loadObsVariable(e).catch((function(n){throw t.obsPromises.delete(e),n}));t.obsPromises.set(e,n)}return t.obsPromises.get(e)};return e?Array.isArray(e)?Promise.resolve(Promise.all(e.map(n))):n(e):Promise.resolve(void 0)}));return Promise.all(n)}},{key:"_loadObsVariable",value:function(){var e=Object(kt.a)(At.a.mark((function e(t){var n,a,r,o,i,s,l,c,p;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.store,e.next=3,this.getJson("".concat(t,"/.zattrs"));case 3:if(a=e.sent,!(r=a.categories)){e.next=14;break}return e.next=8,this.getJson("/obs/".concat(r,"/.zarray"));case 8:if(i=e.sent,"|O"!==i.dtype){e.next=14;break}return e.next=13,this.getFlatArrDecompressed("/obs/".concat(r));case 13:o=e.sent;case 14:return e.next=16,Object(Lt.d)({store:n,path:t,mode:"r"});case 16:return s=e.sent,e.next=19,s.get();case 19:return l=e.sent,c=l.data,p=Array.from(c).map((function(e){return o?o[e]:String(e)})),e.abrupt("return",p);case 23:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"loadNumeric",value:function(e){var t=this.store;return Object(Lt.d)({store:t,path:e,mode:"r"}).then((function(e){return e.get()}))}},{key:"getFlatArrDecompressed",value:function(e){var t=this.store;return Object(Lt.d)({store:t,path:e,mode:"r"}).then(function(){var e=Object(kt.a)(At.a.mark((function e(n){var a,r,i,s,l,c,p;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=function(e){var t=Ha(e);a=a?a.concat(t):t},i=function(e){if(a){var t=new Uint8Array(e.buffer.byteLength+a.buffer.byteLength);t.set(new Uint8Array(a.buffer),0),t.set(e,a.buffer.byteLength),a=t}else a=e},s=Math.ceil(n.meta.shape[0]/n.meta.chunks[0]),l=ct()(s).map(function(){var e=Object(kt.a)(At.a.mark((function e(a){return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.getItem("".concat(n.keyPrefix).concat(String(a))).then((function(e){return n.compressor.then((function(t){return t.decode(e)}))})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=6,Promise.all(l);case 6:return e.sent.forEach((function(e){Array.isArray(n.meta.filters)&&"vlen-utf8"===n.meta.filters[0].id?r(e):i(e)})),c=Object(o.a)(n.meta.shape,1),p=c[0],e.abrupt("return",a.slice(0,p));case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}},{key:"loadObsIndex",value:function(){var e=this;return this.obsIndex||(this.obsIndex=this.getJson("obs/.zattrs").then((function(t){var n=t._index;return e.getFlatArrDecompressed("/obs/".concat(n))}))),this.obsIndex}},{key:"loadVarIndex",value:function(){var e=this;return this.varIndex||(this.varIndex=this.getJson("var/.zattrs").then((function(t){var n=t._index;return e.getFlatArrDecompressed("/var/".concat(n))}))),this.varIndex}}]),n}(Ga),Za=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(e,a,r){var o;return Object(u.a)(this,n),(o=t.call(this,"".concat(e," Error HTTP Status fetching from ").concat(a))).source=e,o.url=a,o.headers=r,o}return Object(d.a)(n,[{key:"warnInConsole",value:function(){var e=this.source,t=this.url,n=this.headers;console.warn("".concat(e," failed to fetch from ").concat(t," with headers ").concat(n))}}]),n}(vt),Va=function(){function e(t){var n=t.url,a=t.requestInit;Object(u.a)(this,e),this.url=n,this.requestInit=a}return Object(d.a)(e,[{key:"data",get:function(){var e=this;return this._data||(this._data=fetch(this.url,this.requestInit).then((function(t){return t.ok?t.json():Promise.reject(new Za("JsonSource",e.url,t.headers))})).catch((function(){return Promise.reject(new Za("JsonSource",e.url,{}))}))),this._data}}]),e}(),Ba=(Fa={},Object(c.a)(Fa,x.EXPRESSION_MATRIX_ZARR,[Ga,Pt]),Object(c.a)(Fa,x.CLUSTERS_JSON,[Va,Ht]),Object(c.a)(Fa,x.GENES_JSON,[Va,Dt]),Object(c.a)(Fa,x.CELLS_JSON,[Va,wt]),Object(c.a)(Fa,x.MOLECULES_JSON,[Va,wt]),Object(c.a)(Fa,x.NEIGHBORHOODS_JSON,[Va,wt]),Object(c.a)(Fa,x.RASTER_JSON,[Va,Xn]),Object(c.a)(Fa,x.RASTER_OME_ZARR,[Ga,Vn]),Object(c.a)(Fa,x.CELL_SETS_JSON,[Va,Ia]),Object(c.a)(Fa,x.ANNDATA_CELL_SETS_ZARR,[Xa,Ma.CellSetsZarrLoader]),Object(c.a)(Fa,x.ANNDATA_CELLS_ZARR,[Xa,Ma.CellsZarrLoader]),Object(c.a)(Fa,x.ANNDATA_EXPRESSION_MATRIX_ZARR,[Xa,Ma.MatrixZarrLoader]),Object(c.a)(Fa,x.GENOMIC_PROFILES_ZARR,[Ga,Da]),Fa);function Ya(e,t){var n={},a={};return e.forEach((function(e){var r={name:e.name,description:e.description||t,loaders:{}};e.files.forEach((function(e){var t,n=(t=e.fileType,Ba[t]||[Va,wt]),i=Object(o.a)(n,2),s=i[0],l=i[1],c=e.url,p=e.options,u=e.requestInit,d=c||JSON.stringify(p);d in a||(a[d]=new s({url:c,requestInit:u}));var m=new l(a[d],e);r.loaders[e.type]=m})),n[e.uid]=r})),n}var Ua=n(107),qa=n.n(Ua);function Wa(){var e=window;return{width:e.innerWidth,height:e.innerHeight}}function $a(e){return Object(i.useCallback)((function(){return e.current?e.current.closest(".".concat("vitessce-container")):null}),[e])}function Ja(){var e=Object(i.useRef)(),t=Object(i.useState)(),n=Object(o.a)(t,2),a=n[0],r=n[1],s=Object(i.useState)(),l=Object(o.a)(s,2),c=l[0],p=l[1],u=at(),d=rt();return Object(i.useEffect)((function(){function e(){d()}var t=qa()(e,100,{trailing:!0});return window.addEventListener("resize",t),e(),function(){window.removeEventListener("resize",t)}}),[d]),Object(i.useEffect)((function(){if(e.current){var t=e.current.getBoundingClientRect();r(t.height),p(t.width)}}),[u]),[c,a,e]}function Ka(){var e=Object(i.useRef)(),t=Object(i.useState)(),n=Object(o.a)(t,2),a=n[0],r=n[1],s=Object(i.useState)(),l=Object(o.a)(s,2),c=l[0],p=l[1],u=at(),d=rt();return Object(i.useEffect)((function(){function e(){d()}var t=qa()(e,100,{trailing:!0});return window.addEventListener("resize",t),e(),function(){window.removeEventListener("resize",t)}}),[d]),Object(i.useEffect)((function(){if(e.current){var t=e.current.deck.canvas.getBoundingClientRect();r(t.height),p(t.width)}}),[u]),[c,a,e]}function Qa(e){var t=e,n=Object(i.useState)(t),a=Object(o.a)(n,2),r=a[0],s=a[1],l=Object(i.useCallback)((function(e){s((function(t){var n=t.filter((function(t){return t!==e}));return console.log("cleared ".concat(e,"; waiting on ").concat(n.length,": ").concat(JSON.stringify(n))),n}))}),[s]),c=Object(i.useCallback)((function(e){s((function(t){var n=[].concat(Object(p.a)(t),[e]);return console.log("waiting on ".concat(n.length,": ").concat(JSON.stringify(n))),n}))}),[s]),u=Object(i.useCallback)((function(){s(t),console.log("waiting on ".concat(t.length,": ").concat(JSON.stringify(t)))}),[s,t]);return[0===r.length,l,c,u]}function er(){var e=Object(i.useState)([]),t=Object(o.a)(e,2),n=t[0],a=t[1];return[n,Object(i.useCallback)((function(e,t){e&&a((function(n){return[].concat(Object(p.a)(n),[{url:e,name:t}])}))}),[a]),Object(i.useCallback)((function(){a([])}),[a])]}function tr(e){var t=Object(i.useState)(),n=Object(o.a)(t,2),a=n[0],r=n[1],s=Object(i.useState)(),l=Object(o.a)(s,2),c=l[0],p=l[1];return Object(i.useEffect)((function(){function t(){if(e.current){var t=e.current.closest(".vitessce-container"),n=t.clientHeight,a=t.clientWidth;p(a),r(n)}}var n=qa()(t,100,{trailing:!0});return window.addEventListener("resize",n),t(),function(){window.removeEventListener("resize",n)}}),[e]),[c,a]}function nr(e){var t=e.attrs,n=e.expressionData,a=Object(i.useMemo)((function(){var e={};if(t&&t.rows)for(var n=0;n<t.rows.length;n++)e[t.rows[n]]=n;return e}),[t]);return Object(i.useCallback)((function(e){var t=e[0];if(a&&n&&n[0]){var r=a[t];return n[0][r]}return 0}),[a,n])}function ar(e){var t=e.rowHeight,n=e.config,a=e.getComponent,r=e.theme,l=e.height,c=function(e,t,n,a,r){var s=Object(i.useState)(n),l=Object(o.a)(s,2),c=l[0],p=l[1],u=Object(i.useState)(t),d=Object(o.a)(u,2),m=d[0],f=d[1],y=Object(i.useRef)();return Object(i.useEffect)((function(){var t=function(e){for(var t,n=0,a=0,r=e.length;a<r;a++)(t=e[a].y+e[a].h)>n&&(n=t);return n}(e.layout),n=function(e,t,n,a){return(e-2*a-(t-1)*n)/t}(c,t,a,r);f(n)}),[c,e,a,r]),Object(i.useEffect)((function(){null!==n&&void 0!==n&&p(n)}),[n]),Object(i.useEffect)((function(){if(null!==n&&void 0!==n)return function(){};function e(){if(y.current){var e=y.current.getBoundingClientRect();p(e.height)}}return window.addEventListener("resize",e),e(),function(){window.removeEventListener("resize",e)}}),[y,n]),[m,y]}(n,t,l,5,10),p=Object(o.a)(c,2),u=p[0],d=p[1],m=rt(),f=tr(d),y=Object(o.a)(f,1)[0];Object(i.useEffect)((function(){m()}),[u,m]);var h=function(e){return Object(i.useRef)(e.getState().setViewConfig).current}(Ne()),g=Re((function(e){return e.setLoaders})),v=Re((function(e){return e.removeComponent})),b=Re((function(e){return e.changeLayout})),x=Re((function(e){var t;return null===(t=e.viewConfig)||void 0===t?void 0:t.layout})),O=Object(i.useCallback)((function(){return y>0?b:function(){}}),[b,y]);return Object(i.useEffect)((function(){if(n){h(n);var e=Ya(n.datasets,n.description);g(e)}else g({})}),[n,h,g]),s.a.createElement("div",{ref:d,className:"vitessce-container vitessce-theme-".concat(r)},x&&s.a.createElement(dt,{layout:x,height:l,rowHeight:u,theme:r,getComponent:a,draggableHandle:".title",margin:5,padding:10,onRemoveComponent:v,onLayoutChange:O,reactGridLayoutProps:{onResize:m,onResizeStop:m}}))}var rr,or,ir=n(681),sr=n(682),lr=n(683),cr=n(684),pr=n(685),ur=n(686),dr=n(687),mr=n(688),fr=n(235),yr=n.n(fr),hr=(rr={},Object(c.a)(rr,O.EMBEDDING_ZOOM,null),Object(c.a)(rr,O.EMBEDDING_ROTATION,0),Object(c.a)(rr,O.EMBEDDING_TARGET_X,null),Object(c.a)(rr,O.EMBEDDING_TARGET_Y,null),Object(c.a)(rr,O.EMBEDDING_TARGET_Z,0),Object(c.a)(rr,O.EMBEDDING_CELL_SET_POLYGONS_VISIBLE,!1),Object(c.a)(rr,O.EMBEDDING_CELL_SET_LABELS_VISIBLE,!1),Object(c.a)(rr,O.EMBEDDING_CELL_SET_LABEL_SIZE,14),Object(c.a)(rr,O.EMBEDDING_CELL_RADIUS,1),Object(c.a)(rr,O.EMBEDDING_CELL_RADIUS_MODE,"auto"),Object(c.a)(rr,O.EMBEDDING_CELL_OPACITY,1),Object(c.a)(rr,O.EMBEDDING_CELL_OPACITY_MODE,"auto"),Object(c.a)(rr,O.SPATIAL_ZOOM,null),Object(c.a)(rr,O.SPATIAL_ROTATION,0),Object(c.a)(rr,O.SPATIAL_TARGET_X,null),Object(c.a)(rr,O.SPATIAL_TARGET_Y,null),Object(c.a)(rr,O.SPATIAL_TARGET_Z,null),Object(c.a)(rr,O.SPATIAL_ROTATION_X,null),Object(c.a)(rr,O.SPATIAL_ROTATION_Y,null),Object(c.a)(rr,O.SPATIAL_ROTATION_Z,null),Object(c.a)(rr,O.SPATIAL_AXIS_FIXED,!1),Object(c.a)(rr,O.SPATIAL_ROTATION_ORBIT,0),Object(c.a)(rr,O.SPATIAL_ORBIT_AXIS,"Y"),Object(c.a)(rr,O.SPATIAL_RASTER_LAYERS,null),Object(c.a)(rr,O.SPATIAL_CELLS_LAYER,null),Object(c.a)(rr,O.SPATIAL_MOLECULES_LAYER,null),Object(c.a)(rr,O.SPATIAL_NEIGHBORHOODS_LAYER,null),Object(c.a)(rr,O.HEATMAP_ZOOM_X,0),Object(c.a)(rr,O.HEATMAP_ZOOM_Y,0),Object(c.a)(rr,O.HEATMAP_TARGET_X,0),Object(c.a)(rr,O.HEATMAP_TARGET_Y,0),Object(c.a)(rr,O.GENE_EXPRESSION_COLORMAP,"plasma"),Object(c.a)(rr,O.GENE_EXPRESSION_COLORMAP_RANGE,[0,1]),Object(c.a)(rr,O.GENE_EXPRESSION_TRANSFORM,null),Object(c.a)(rr,O.GENE_FILTER,null),Object(c.a)(rr,O.GENE_HIGHLIGHT,null),Object(c.a)(rr,O.GENE_SELECTION,null),Object(c.a)(rr,O.CELL_FILTER,null),Object(c.a)(rr,O.CELL_HIGHLIGHT,null),Object(c.a)(rr,O.CELL_SET_SELECTION,null),Object(c.a)(rr,O.CELL_SET_HIGHLIGHT,null),Object(c.a)(rr,O.CELL_SET_COLOR,null),Object(c.a)(rr,O.CELL_COLOR_ENCODING,"cellSetSelection"),Object(c.a)(rr,O.GENOMIC_ZOOM_X,0),Object(c.a)(rr,O.GENOMIC_ZOOM_Y,0),Object(c.a)(rr,O.GENOMIC_TARGET_X,1549999999.5),Object(c.a)(rr,O.GENOMIC_TARGET_Y,1549999999.5),Object(c.a)(rr,O.ADDITIONAL_CELL_SETS,null),Object(c.a)(rr,O.MOLECULE_HIGHLIGHT,null),rr),gr=[O.HEATMAP_ZOOM_X,O.HEATMAP_ZOOM_Y,O.HEATMAP_TARGET_X,O.HEATMAP_TARGET_Y,O.EMBEDDING_ZOOM,O.EMBEDDING_TARGET_X,O.EMBEDDING_TARGET_Y,O.EMBEDDING_TARGET_Z,O.EMBEDDING_CELL_SET_POLYGONS_VISIBLE,O.EMBEDDING_CELL_SET_LABELS_VISIBLE,O.EMBEDDING_CELL_SET_LABEL_SIZE,O.EMBEDDING_CELL_RADIUS,O.EMBEDDING_CELL_OPACITY],vr=(or={},Object(c.a)(or,b.SCATTERPLOT,[O.DATASET,O.EMBEDDING_TYPE,O.EMBEDDING_ZOOM,O.EMBEDDING_ROTATION,O.EMBEDDING_TARGET_X,O.EMBEDDING_TARGET_Y,O.EMBEDDING_TARGET_Z,O.EMBEDDING_CELL_SET_POLYGONS_VISIBLE,O.EMBEDDING_CELL_SET_LABELS_VISIBLE,O.EMBEDDING_CELL_SET_LABEL_SIZE,O.EMBEDDING_CELL_RADIUS,O.EMBEDDING_CELL_RADIUS_MODE,O.EMBEDDING_CELL_OPACITY,O.EMBEDDING_CELL_OPACITY_MODE,O.CELL_FILTER,O.CELL_HIGHLIGHT,O.CELL_SET_SELECTION,O.CELL_SET_HIGHLIGHT,O.CELL_SET_COLOR,O.GENE_HIGHLIGHT,O.GENE_SELECTION,O.GENE_EXPRESSION_COLORMAP,O.GENE_EXPRESSION_COLORMAP_RANGE,O.CELL_COLOR_ENCODING,O.ADDITIONAL_CELL_SETS]),Object(c.a)(or,b.SPATIAL,[O.DATASET,O.SPATIAL_ZOOM,O.SPATIAL_ROTATION,O.SPATIAL_RASTER_LAYERS,O.SPATIAL_CELLS_LAYER,O.SPATIAL_MOLECULES_LAYER,O.SPATIAL_NEIGHBORHOODS_LAYER,O.SPATIAL_TARGET_X,O.SPATIAL_TARGET_Y,O.SPATIAL_TARGET_Z,O.SPATIAL_ROTATION_X,O.SPATIAL_ROTATION_Y,O.SPATIAL_ROTATION_Z,O.SPATIAL_ROTATION_ORBIT,O.SPATIAL_ORBIT_AXIS,O.SPATIAL_AXIS_FIXED,O.CELL_FILTER,O.CELL_HIGHLIGHT,O.CELL_SET_SELECTION,O.CELL_SET_HIGHLIGHT,O.CELL_SET_COLOR,O.GENE_HIGHLIGHT,O.GENE_SELECTION,O.GENE_EXPRESSION_COLORMAP,O.GENE_EXPRESSION_COLORMAP_RANGE,O.CELL_COLOR_ENCODING,O.ADDITIONAL_CELL_SETS,O.MOLECULE_HIGHLIGHT]),Object(c.a)(or,b.HEATMAP,[O.DATASET,O.HEATMAP_ZOOM_X,O.HEATMAP_ZOOM_Y,O.HEATMAP_TARGET_X,O.HEATMAP_TARGET_Y,O.CELL_FILTER,O.CELL_HIGHLIGHT,O.CELL_SET_SELECTION,O.CELL_SET_HIGHLIGHT,O.CELL_SET_COLOR,O.GENE_FILTER,O.GENE_HIGHLIGHT,O.GENE_SELECTION,O.GENE_EXPRESSION_COLORMAP,O.GENE_EXPRESSION_COLORMAP_RANGE,O.CELL_COLOR_ENCODING,O.ADDITIONAL_CELL_SETS]),Object(c.a)(or,b.CELL_SETS,[O.DATASET,O.CELL_SET_SELECTION,O.CELL_SET_HIGHLIGHT,O.CELL_SET_COLOR,O.CELL_COLOR_ENCODING,O.ADDITIONAL_CELL_SETS,O.GENE_SELECTION]),Object(c.a)(or,b.CELL_SET_SIZES,[O.DATASET,O.CELL_SET_SELECTION,O.CELL_SET_HIGHLIGHT,O.CELL_SET_COLOR,O.ADDITIONAL_CELL_SETS]),Object(c.a)(or,b.STATUS,[O.DATASET,O.CELL_HIGHLIGHT,O.GENE_HIGHLIGHT,O.CELL_SET_HIGHLIGHT,O.MOLECULE_HIGHLIGHT]),Object(c.a)(or,b.GENES,[O.DATASET,O.GENE_FILTER,O.GENE_HIGHLIGHT,O.GENE_SELECTION,O.CELL_COLOR_ENCODING,O.CELL_SET_SELECTION]),Object(c.a)(or,b.CELL_SET_EXPRESSION,[O.DATASET,O.GENE_SELECTION,O.GENE_EXPRESSION_TRANSFORM,O.CELL_SET_SELECTION,O.CELL_SET_HIGHLIGHT,O.CELL_SET_COLOR,O.ADDITIONAL_CELL_SETS]),Object(c.a)(or,b.EXPRESSION_HISTOGRAM,[O.DATASET,O.GENE_SELECTION]),Object(c.a)(or,b.LAYER_CONTROLLER,[O.DATASET,O.SPATIAL_RASTER_LAYERS,O.SPATIAL_CELLS_LAYER,O.SPATIAL_MOLECULES_LAYER,O.SPATIAL_NEIGHBORHOODS_LAYER,O.SPATIAL_ZOOM,O.SPATIAL_TARGET_X,O.SPATIAL_TARGET_Y,O.SPATIAL_TARGET_Z,O.SPATIAL_ROTATION_X,O.SPATIAL_ROTATION_Y,O.SPATIAL_ROTATION_Z,O.SPATIAL_ROTATION_ORBIT,O.SPATIAL_ORBIT_AXIS]),Object(c.a)(or,b.GENOMIC_PROFILES,[O.DATASET,O.GENOMIC_ZOOM_X,O.GENOMIC_ZOOM_Y,O.GENOMIC_TARGET_X,O.GENOMIC_TARGET_Y,O.GENE_FILTER,O.GENE_HIGHLIGHT,O.GENE_SELECTION,O.CELL_SET_SELECTION,O.CELL_SET_HIGHLIGHT,O.CELL_SET_COLOR,O.ADDITIONAL_CELL_SETS]),Object(c.a)(or,b.DESCRIPTION,[O.DATASET,O.SPATIAL_RASTER_LAYERS]),Object(c.a)(or,"higlass",[O.DATASET,O.GENOMIC_ZOOM_X,O.GENOMIC_ZOOM_Y,O.GENOMIC_TARGET_X,O.GENOMIC_TARGET_Y,O.GENE_FILTER,O.GENE_HIGHLIGHT,O.GENE_SELECTION]),or);function br(e,t,n){var a,r=Object.keys(n["".concat(e,"Zoom")]),i=Object.keys(n["".concat(e,"TargetX")]),s=Object.keys(n["".concat(e,"TargetY")]),l=h(r),p=h(i),u=h(s),d=t.zoom,m=Object(o.a)(t.target,2),f=m[0],y=m[1];return n["".concat(e,"Zoom")][l]=d,n["".concat(e,"TargetX")][p]=f,n["".concat(e,"TargetY")][u]=y,a={},Object(c.a)(a,"".concat(e,"Zoom"),l),Object(c.a)(a,"".concat(e,"TargetX"),p),Object(c.a)(a,"".concat(e,"TargetY"),u),a}var xr={"0.1.0":[(new ft.a).compile(ir),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n={embeddingType:{},embeddingZoom:{},embeddingTargetX:{},embeddingTargetY:{},spatialZoom:{},spatialTargetX:{},spatialTargetY:{}},a=[];e.staticLayout.forEach((function(e){var t,r=Object(l.a)({},e,{coordinationScopes:{}});if("scatterplot"===e.component&&(e.props.mapping&&(n.embeddingType[e.props.mapping]=e.props.mapping,r=Object(l.a)({},r,{coordinationScopes:Object(l.a)({},r.coordinationScopes,{embeddingType:e.props.mapping})})),e.props.view)){var o=br("embedding",e.props.view,n);r=Object(l.a)({},r,{coordinationScopes:Object(l.a)({},r.coordinationScopes,{},o)})}if("spatial"===e.component&&(null===e||void 0===e||null===(t=e.props)||void 0===t?void 0:t.view)){var i=br("spatial",e.props.view,n);r=Object(l.a)({},r,{coordinationScopes:Object(l.a)({},r.coordinationScopes,{},i)})}a.push(r)}));var r=t||ht()();return{version:"1.0.1",name:e.name,description:e.description,public:e.public,datasets:[{uid:r,name:r,files:e.layers.map((function(e){return{type:e.type.toLowerCase(),fileType:e.fileType,url:e.url}}))}],initStrategy:"auto",coordinationSpace:n,layout:a}}],"1.0.0":[(new ft.a).addSchema(_t).addSchema(Ct).compile(sr),function(e){var t=Object(l.a)({},e.coordinationSpace);function n(e){var n="raster"===e;t["spatial".concat(y(e),"Layer").concat(n?"s":"")]={},Object.entries(t.spatialLayers).forEach((function(a){var r=Object(o.a)(a,2),i=r[0],s=r[1];if(Array.isArray(s)&&s.find((function(t){return t.type===e}))){var c=s.filter((function(t){return t.type===e})).map((function(e){var t=Object(l.a)({},e);return delete t.type,t}));t["spatial".concat(y(e),"Layer").concat(n?"s":"")][i]=n?c:c[0]}else t["spatial".concat(y(e),"Layer").concat(n?"s":"")][i]=null}))}t.spatialLayers&&(n("raster"),n("cells"),n("molecules"),n("neighborhoods"),delete t.spatialLayers);var a=e.layout.map((function(e){var t=Object(l.a)({},e);function n(e){var n="raster"===e;vr[t.component].includes("spatial".concat(y(e),"Layer").concat(n?"s":""))&&(t.coordinationScopes["spatial".concat(y(e),"Layer").concat(n?"s":"")]=t.coordinationScopes.spatialLayers)}return t.coordinationScopes&&t.coordinationScopes.spatialLayers&&(n("raster"),n("cells"),n("molecules"),n("neighborhoods"),delete t.coordinationScopes.spatialLayers),t}));return Object(l.a)({},e,{coordinationSpace:t,layout:a,version:"1.0.1"})}],"1.0.1":[(new ft.a).addSchema(_t).addSchema(Ct).compile(lr),function(e){var t,n=e.layout.map((function(e){var t=Object(l.a)({},e);return"layerController"===t.component&&(t.props=Object(l.a)({},t.props,{globalDisable3d:!0})),t})),a=yr()(e);return Object.keys((null===a||void 0===a||null===(t=a.coordinationSpace)||void 0===t?void 0:t.spatialRasterLayers)||{}).forEach((function(e){a.coordinationSpace.spatialRasterLayers[e]&&a.coordinationSpace.spatialRasterLayers[e].forEach((function(t,n){a.coordinationSpace.spatialRasterLayers[e][n].type=["bitmask","raster"].includes(t.type)?t.type:"raster"}))})),Object(l.a)({},a,{layout:n,version:"1.0.2"})}],"1.0.2":[(new ft.a).addSchema(_t).addSchema(Ct).compile(cr),function(e){var t=e.layout.map((function(e){var t=Object(l.a)({},e);return"layerController"===t.component&&(t.props=Object(l.a)({},t.props,{disableChannelsIfRgbDetected:!0})),t})),n=yr()(e);return Object(l.a)({},n,{layout:t,version:"1.0.3"})}],"1.0.3":[(new ft.a).addSchema(_t).addSchema(Ct).compile(pr),function(e){var t=yr()(e);return Object(l.a)({},t,{version:"1.0.4"})}],"1.0.4":[(new ft.a).addSchema(_t).addSchema(Ct).compile(ur),function(e){var t=yr()(e);return Object(l.a)({},t,{version:"1.0.5"})}],"1.0.5":[(new ft.a).addSchema(_t).addSchema(Ct).compile(dr),function(e){var t=yr()(e);return Object(l.a)({},t,{version:"1.0.6"})}],"1.0.6":[(new ft.a).addSchema(_t).addSchema(Ct).compile(mr),null]};function Or(e){var t=e.onWarn,n=e.onConfigChange,a=e.onLoaderChange,r=e.validateOnConfigChange,o=Qe(),s=$e(),l=Ne();return Object(i.useEffect)((function(){return l.subscribe((function(e){r&&e&&function(e){try{var t=xr["1.0.6"][0];if(!t(e)){var n=JSON.stringify(t.errors,null,2);throw new Error("Config validation failed: ".concat(n))}}catch(a){console.error(a)}}(e),n&&e&&n(e)}),(function(e){return e.viewConfig}))}),[n,r,l]),Object(i.useEffect)((function(){t&&o&&t(o)}),[o,t]),Object(i.useEffect)((function(){a&&s&&a(s)}),[s,a]),null}var jr=n(146),Er=n.n(jr);function Sr(e,t){t(e.message),console.warn(e.message),e instanceof vt&&e.warnInConsole()}function Cr(e,t,n){e&&t&&Object.entries(e).forEach((function(e){var a=Object(o.a)(e,2),r=a[0],i=a[1],s="set".concat(y(r)),l=t[s],c=n&&n[r];Er()(c,hr[r])&&l&&l(i)}))}function _r(e,t,n,a,r,s,c){var p=Object(i.useState)({}),u=Object(o.a)(p,2),d=u[0],m=u[1],f=Object(i.useState)(0),y=Object(o.a)(f,2),h=y[0],g=y[1],v=et();return Object(i.useEffect)((function(){e[t]&&(e[t].loaders.cells?e[t].loaders.cells.load().catch((function(e){return Sr(e,v)})).then((function(e){if(e){var t=e.data,r=e.url,o=e.coordinationValues;m(t),g(Object.keys(t).length),a(r,"Cells"),Cr(Object(l.a)({spatialCellsLayer:fn},o),s,c),n("cells")}})):(m({}),g(0),r?Sr(new xt(t,"cells",null,null),v):n("cells")))}),[e,t]),[d,h]}function Tr(e,t,n,a,r,s,l){var c=Object(i.useState)(),p=Object(o.a)(c,2),u=p[0],d=p[1],m=et();return Object(i.useEffect)((function(){e[t]&&(e[t].loaders["cell-sets"]?e[t].loaders["cell-sets"].load().catch((function(e){return Sr(e,m)})).then((function(e){if(e){var t=e.data,r=e.url,o=e.coordinationValues;d(t),a(r,"Cell Sets"),Cr(o,s,l),n("cell-sets")}})):(d(null),r?Sr(new xt(t,"cell-sets",null,null),m):n("cell-sets")))}),[e,t]),[u]}function wr(e,t,n,a,r,s,l){var c=Object(i.useState)(),p=Object(o.a)(c,2),u=p[0],d=p[1],m=et();return Object(i.useEffect)((function(){e[t]&&(e[t].loaders["expression-matrix"]?e[t].loaders["expression-matrix"].load().catch((function(e){return Sr(e,m)})).then((function(e){if(e){var t=e.data,r=e.url,i=e.coordinationValues,c=Object(o.a)(t,2),p=c[0],u=c[1];d({cols:p.cols,rows:p.rows,matrix:u.data}),a(r,"Expression Matrix"),Cr(i,s,l),n("expression-matrix")}})):(d(null),r?Sr(new xt(t,"expression-matrix",null,null),m):n("expression-matrix")))}),[e,t]),[u]}function Lr(e,t,n,a,r,s){var l=Object(i.useState)(),c=Object(o.a)(l,2),p=c[0],u=c[1],d=et();return Object(i.useEffect)((function(){if(e[t])if(r){var i=e[t].loaders["expression-matrix"];if(i)s("expression-matrix"),"function"===typeof i.loadGeneSelection?e[t].loaders["expression-matrix"].loadGeneSelection({selection:r}).catch((function(e){return Sr(e,d)})).then((function(e){if(e){var t=e.data;u(t),n("expression-matrix")}})):i.load().catch((function(e){return Sr(e,d)})).then((function(e){if(e){var t=e.data,a=Object(o.a)(t,2),i=a[0],s=a[1].data,l=r.map((function(e){for(var t=i.cols.indexOf(e),n=i.cols.length,a=i.rows.length,r=new Uint8Array(a),o=0;o<a;o+=1)r[o]=s[o*n+t];return r}));u(l),n("expression-matrix")}}));else u(null),a?Sr(new xt(t,"expression-matrix",null,null),d):n("expression-matrix")}else n("expression-matrix")}),[e,t,r]),[p]}function Pr(e,t,n,a,r){var s=Object(i.useState)(),l=Object(o.a)(s,2),c=l[0],p=l[1],u=et();return Object(i.useEffect)((function(){if(e[t]){var o=e[t].loaders["expression-matrix"];if(o)"function"===typeof o.loadAttrs?o.loadAttrs().catch((function(e){return Sr(e,u)})).then((function(e){if(e){var t=e.data,r=e.url;p(t),a(r,"Expression Matrix"),n("expression-matrix")}})):o.load().catch((function(e){return Sr(e,u)})).then((function(e){if(e){var t=e.data,r=e.url;p(t[0]),a(r,"Expression Matrix"),n("expression-matrix")}}));else p(null),r?Sr(new xt(t,"expression-matrix",null,null),u):n("expression-matrix")}}),[e,t]),[c]}function Ir(e,t,n,a,r,s,c){var p=Object(i.useState)(),u=Object(o.a)(p,2),d=u[0],m=u[1],f=Object(i.useState)(0),y=Object(o.a)(f,2),h=y[0],g=y[1],v=Object(i.useState)(0),b=Object(o.a)(v,2),x=b[0],O=b[1],j=et();return Object(i.useEffect)((function(){e[t]&&(e[t].loaders.molecules?e[t].loaders.molecules.load().catch((function(e){return Sr(e,j)})).then((function(e){if(e){var t=e.data,r=e.url,o=e.coordinationValues;m(t),g(Object.keys(t).length),O(Object.values(t).map((function(e){return e.length})).reduce((function(e,t){return e+t}),0)),a(r,"Molecules"),Cr(Object(l.a)({spatialMoleculesLayer:mn},o),s,c),n("molecules")}})):(m({}),g(0),O(0),r?Sr(new xt(t,"molecules",null,null),j):n("molecules")))}),[e,t]),[d,h,x]}function Ar(e,t,n,a,r,s,l){var c=Object(i.useState)(),p=Object(o.a)(c,2),u=p[0],d=p[1],m=Object(i.useState)([]),f=Object(o.a)(m,2),y=f[0],h=f[1],g=Object(i.useState)([]),v=Object(o.a)(g,2),b=v[0],x=v[1],O=et();return Object(i.useEffect)((function(){e[t]&&(e[t].loaders.raster?e[t].loaders.raster.load().catch((function(e){return Sr(e,O)})).then((function(e){if(e){var t=e.data,r=e.url,i=e.coordinationValues;d(t),r.forEach((function(e){var t=Object(o.a)(e,2),n=t[0],r=t[1];a(n,r)}));var c=t.loaders,p=t.meta;h(c),x(p),Cr(i,s,l),n("raster")}})):(h([]),x([]),r?Sr(new xt(t,"raster",null,null),O):n("raster")))}),[e,t]),[u,y,b]}var kr=n(691),Rr=n.n(kr),Nr=n(1298),Mr=n(1159),Dr=n(1255),Gr=n(520),zr=n.n(Gr),Hr=n(519),Fr=n.n(Hr),Xr=n(690),Zr=n.n(Xr),Vr=n(692),Br=n.n(Vr),Yr=n(1249);function Ur(){return s.a.createElement("div",{className:"loading-indicator-backdrop"},s.a.createElement("div",{className:"loading-indicator-container"},s.a.createElement(Yr.a,null)))}var qr=n(1254),Wr=n(1251),$r=n(1300),Jr=n(1252),Kr=n(1253);function Qr(e){var t=e.children,n=Oe();return s.a.createElement("span",{className:n.span},t)}function eo(e){var t=e.buttonIcon,n=e.open,a=e.setOpen,r=e.children,o=e.buttonClassName,l=e.placement,c=void 0===l?"bottom-end":l,p=Oe(),u=Object(i.useRef)(),d=function(){a(!1)},m=n?"v-popover-menu":void 0,f=$a(u);return s.a.createElement("div",{ref:u,className:p.container},s.a.createElement(Mr.a,{"aria-describedby":m,onClick:function(){a((function(e){return!e}))},size:"small",className:o},t),s.a.createElement(Wr.a,{id:m,open:n,anchorEl:u&&u.current,container:f,onClose:d,placement:c,transition:!0},(function(e){var t=e.TransitionProps;return s.a.createElement(Jr.a,{onClickAway:d},s.a.createElement(Kr.a,Object.assign({},t,{timeout:100}),s.a.createElement(qr.a,{elevation:4,className:p.paper},s.a.createElement($r.a,null,r))))})))}var to=Object(ve.a)((function(e){return{iconButton:{border:"none",marginLeft:0,background:"none",color:e.palette.primaryForeground,paddingLeft:"0.25em",paddingRight:"0.25em",borderRadius:"2px","&:hover":{backgroundColor:e.palette.primaryBackgroundLight},"&:first-child":{marginLeft:"0.25em"},"&:last-child":{marginRight:"0.25em"},"& svg":{width:"0.7em",height:"0.7em",verticalAlign:"middle",overflow:"visible"}},downloadLink:{color:e.palette.primaryForeground}}}));function no(e){var t=e.open;return s.a.createElement(s.a.Fragment,null,s.a.createElement(Zr.a,null),t?s.a.createElement(Fr.a,null):s.a.createElement(zr.a,null))}function ao(e){var t=e.options,n=Object(i.useState)(!1),a=Object(o.a)(n,2),r=a[0],l=a[1],c=to();return s.a.createElement(eo,{open:r,setOpen:l,buttonIcon:s.a.createElement(no,{open:r}),buttonClassName:c.iconButton,placement:"bottom-end"},t)}function ro(e){var t=e.open;return s.a.createElement(s.a.Fragment,null,s.a.createElement(Rr.a,null),t?s.a.createElement(Fr.a,null):s.a.createElement(zr.a,null))}function oo(e){var t=e.urls,n=Object(i.useState)(!1),a=Object(o.a)(n,2),r=a[0],l=a[1],c=to();return s.a.createElement(eo,{open:r,setOpen:l,buttonIcon:s.a.createElement(ro,{open:r}),buttonClassName:c.iconButton,placement:"bottom-end"},t.map((function(e){var t=e.url,n=e.name;return s.a.createElement(Nr.a,{dense:!0,key:t},s.a.createElement(Dr.a,{underline:"none",href:t,target:"_blank",rel:"noopener",className:c.downloadLink},"Download ",n))})))}function io(e){var t=e.removeGridComponent,n=to();return s.a.createElement(Mr.a,{onClick:t,size:"small",className:n.iconButton,title:"close"},s.a.createElement(Br.a,null))}function so(e){var t=e.title,n=e.info,a=e.children,r=e.isScroll,o=e.isSpatial,i=e.removeGridComponent,l=e.urls,c=e.isReady,p=e.options,u=r?ue:o?pe:ce;return s.a.createElement(s.a.Fragment,null,s.a.createElement("div",{className:"title"},s.a.createElement("div",{className:"title-left"},t),s.a.createElement("div",{className:"title-info",title:n},n),s.a.createElement("div",{className:"title-buttons"},p&&s.a.createElement(ao,{options:p}),l&&l.length>0&&s.a.createElement(oo,{urls:l}),s.a.createElement(io,{removeGridComponent:i}))),s.a.createElement("div",{className:u},!c&&s.a.createElement(Ur,null),a))}function lo(e){var t=e.description,n=e.metadata;return s.a.createElement("div",{className:"description"},s.a.createElement("p",null,t),n&&Array.from(n.entries()).map((function(e){var t=Object(o.a)(e,2),n=t[0],a=t[1],r=a.name,i=a.metadata;return i&&Object.entries(i).length>0?s.a.createElement("details",{key:n},s.a.createElement("summary",null,r),s.a.createElement("div",{className:"metadata-container"},s.a.createElement("table",null,s.a.createElement("tbody",null,Object.entries(i).map((function(e){var t=Object(o.a)(e,2),n=t[0],a=t[1];return s.a.createElement("tr",{key:n},s.a.createElement("th",{title:n},n),s.a.createElement("td",{title:a},a))})))))):null})))}var co=["raster"];function po(e){var t=e.info,n=e.warn,a=[];return t&&a.push(s.a.createElement("p",{className:"details",key:"info"},t)),n&&a.push(s.a.createElement("p",{className:"alert alert-warning my-0 details",key:"warn"},n)),a}var uo=n(526),mo=n(695),fo=n.n(mo),yo=n(696),ho=n.n(yo);function go(e){var t=e.hasColorEncoding,n=e.columns,a=e.data,r=e.onChange,l=e.idKey,p=void 0===l?"id":l,u=e.valueKey,d=void 0===u?"value":u,m=e.allowMultiple,f=void 0!==m&&m,y=e.allowUncheck,h=void 0!==y&&y,g=e.showTableHead,v=void 0===g||g,b=e.showTableInputs,x=void 0!==b&&b,O=e.testHeight,j=void 0===O?void 0:O,E=e.testWidth,S=void 0===E?void 0:E,C=Object(i.useState)(null),_=Object(o.a)(C,2),T=_[0],w=_[1],L=Object(i.useCallback)((function(e,t){(t||h)&&w(f?t?fo()(T||[],[e]):ho()(T||[],[e]):t?[e]:[])}),[f,h,T]),P=Object(i.useCallback)((function(e){var t=e.target,n=t.checked,a=t.value;L(a,n)}),[L]),I=Object(i.useCallback)((function(e){return e.map((function(e){var t;return t={},Object(c.a)(t,p,e),Object(c.a)(t,"data",a.find((function(t){return t[p]===e}))),t}))}),[a,p]),A=Object(i.useCallback)((function(e){return Array.isArray(T)&&T.includes(e)}),[T]);Object(i.useEffect)((function(){var e=a.map((function(e){return e[d]?e[p]:null})).filter(Boolean);ge()(e,T)||(e.length>0?w(e):w(null))}),[a,p,d]),Object(i.useEffect)((function(){if(r&&T){var e=I(T);f?r(e):1===T.length?r(e[0]):0===T.length&&r(null)}}),[T]);var k=ht()(),R=x?"":"hidden-input-column",N=function(e){var r=e.index,o=e.style;return s.a.createElement("div",{key:a[r][p],className:"table-item table-row ".concat(A(a[r][p])?"row-checked ":""),style:o,role:"button",onClick:function(){return L(a[r][p],!A(a[r][p])||!t)}},s.a.createElement("div",{className:"input-container ".concat(R," table-cell")},s.a.createElement("label",{htmlFor:"".concat(k,"_").concat(a[r][p])},s.a.createElement("input",{id:"".concat(k,"_").concat(a[r][p]),type:"checkbox",className:f?"checkbox":"radio",name:k,value:a[r][p],onChange:P,checked:A(a[r][p])}))),n.map((function(e){return s.a.createElement("div",{className:"table-cell",key:e},a[r][e])})))},M=function(e){var t=e.style;return s.a.createElement("div",{className:"".concat(R," table-row"),style:t},n.map((function(e){return s.a.createElement("div",{key:e},e)})))};return s.a.createElement("div",{className:"selectable-table"},s.a.createElement(uo.a,null,(function(e){var t=e.width,n=e.height;return s.a.createElement(uo.b,{height:j||n,gridStyle:{outline:"none"},rowCount:a.length,rowHeight:24,headerHeight:v?24:void 0,rowRenderer:N,width:S||t,headerRowRenderer:v?M:void 0,rowGetter:function(e){var t=e.index;return a[t]}})})))}function vo(e){var t=e.hasColorEncoding,n=e.geneList,a=void 0===n?[]:n,r=e.geneSelection,l=void 0===r?[]:r,c=e.geneFilter,p=void 0===c?null:c,u=e.setGeneSelection,d=Object(i.useState)(""),m=Object(o.a)(d,2),f=m[0],y=m[1],h=Object(i.useState)(a),g=Object(o.a)(h,2),v=g[0],b=g[1];Object(i.useEffect)((function(){var e=a.filter((function(e){return e.toLowerCase().includes(f.toLowerCase())}));b(e)}),[f,a]);var x=v.filter((function(e){return!p||p.includes(e)})).sort((function(e,t){return e.localeCompare(t)})).map((function(e){return{name:e,value:!!l&&l.includes(e)}}));return s.a.createElement(s.a.Fragment,null,s.a.createElement("input",{className:"search-bar",type:"text",placeholder:"Search",value:f,onChange:function(e){y(e.target.value)}}),s.a.createElement(go,{columns:["name"],data:x,hasColorEncoding:t,idKey:"name",valueKey:"value",onChange:function(e){u&&e&&e.name&&u([e.name])},allowUncheck:!1,showTableHead:!1}))}var bo=["expression-matrix"];var xo=n(182),Oo=n(425),jo=n(61),Eo=n.n(jo),So=s.a.forwardRef((function(e,t){var n,a=e.prefixCls,r=e.className,o=e.showIcon,i=e.blockNode,l=e.children,p=e.checkable;return s.a.createElement(Oo.b,Object.assign({itemHeight:32,ref:t},e,{className:Eo()(r,(n={},Object(c.a)(n,"".concat(a,"-icon-hide"),!o),Object(c.a)(n,"".concat(a,"-block-node"),i),n)),checkable:p?s.a.createElement("span",{className:"".concat(a,"-checkbox-inner")}):p}),l)}));So.defaultProps={virtual:!1,checkable:!1,showIcon:!1,blockNode:!0,prefixCls:"rc-tree"};var Co=So,_o=n(83),To=n(24),wo=n(19),Lo=n(52),Po=n(697),Io=n(715);function Ao(e){var t=e.title,n=e.content,a=e.overlayClassName,r=Object(i.useRef)(),o=$a(r),l=t||n;return s.a.createElement(s.a.Fragment,null,s.a.createElement("span",{ref:r}),s.a.createElement(Io.a,Object.assign({getTooltipContainer:o,overlayClassName:a,overlay:l},e)))}function ko(e){return s.a.createElement(Ao,e)}function Ro(e){var t=e.title,n=e.subtitle,a=e.onClick,r=e.handler,l=e.handlerKey,c=e.confirm,p=e.visible,u=Object(i.useState)(!1),d=Object(o.a)(u,2),m=d[0],f=d[1];function y(){!c||m?(a(),r()):f(!0)}Object(i.useEffect)((function(){f(!1)}),[p]);var h="".concat(m?"Confirm ":"").concat(t);return s.a.createElement("button",{title:h,type:"button",onClick:y,onKeyPress:function(e){return Jn(e,l,y)}},h,n&&s.a.createElement(s.a.Fragment,null,s.a.createElement("br",null),s.a.createElement("span",{className:"small"},n)))}function No(e){var t=e.menuConfig,n=e.onClick,a=e.color,r=void 0===a?null:a,o=e.palette,i=void 0===o?null:o,l=e.setColor,c=void 0===l?null:l,p=e.visible;var u=i?i.map(Kn):en.concat([[255,255,255],[128,128,128],[0,0,0]]).map(Kn);return s.a.createElement("div",null,r&&c&&u&&s.a.createElement(Po.TwitterPicker,{className:"popover-menu-color",disableAlpha:!0,width:108,triangle:"hide",colors:u,color:Kn(r),onChangeComplete:function(e){var t=e.rgb;t&&c&&c([t.r,t.g,t.b])}}),s.a.createElement("ul",{className:"popover-menu-list"},t.map((function(e){return s.a.createElement("li",{key:e.title+e.subtitle},s.a.createElement(Ro,Object.assign({},e,{onClick:n,visible:p})))}))))}function Mo(e){var t=e.menuConfig,n=e.placement,a=e.children,r=e.color,l=void 0===r?null:r,c=e.setColor,p=void 0===c?null:c,u=e.palette,d=void 0===u?null:u,m=Object(i.useState)(!1),f=Object(o.a)(m,2),y=f[0],h=f[1];return s.a.createElement(ko,{content:s.a.createElement(No,{menuConfig:t,onClick:function(){return h(!1)},color:l,setColor:p,palette:d,visible:y}),placement:n,visible:y,onVisibleChange:h},a)}function Do(){return(Do=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}function Go(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}Ao.defaultProps={overlayClassName:"help-tooltip",placement:"top",trigger:"hover",mouseEnterDelay:.2,mouseLeaveDelay:0},ko.defaultProps={overlayClassName:"popover",placement:"top",trigger:"click",mouseEnterDelay:0,mouseLeaveDelay:0};var zo=i.createElement("path",{d:"M12 18c1.657 0 3 1.343 3 3s-1.343 3-3 3-3-1.343-3-3 1.343-3 3-3zm0-9c1.657 0 3 1.343 3 3s-1.343 3-3 3-3-1.343-3-3 1.343-3 3-3zm0-9c1.657 0 3 1.343 3 3s-1.343 3-3 3-3-1.343-3-3 1.343-3 3-3z"});function Ho(e){var t=e.svgRef,n=e.title,a=e.titleId,r=Go(e,["svgRef","title","titleId"]);return i.createElement("svg",Do({width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":a},r),n?i.createElement("title",{id:a},n):null,zo)}var Fo=i.forwardRef((function(e,t){return i.createElement(Ho,Do({svgRef:t},e))}));n.p;function Xo(e){var t=e.path,n=e.level,a=e.height,r=e.onCheckNode,o=e.onNodeRemove,i=e.onNodeSetIsEditing,s=e.onExportLevelZeroNodeJSON,l=e.onExportLevelZeroNodeTabular,c=e.onExportSetJSON,u=e.checkable,d=e.editable,m=e.exportable,f=e.checked;return[].concat(Object(p.a)(d?[{title:"Rename",handler:function(){i(t,!0)},handlerKey:"r"},{title:"Delete",confirm:!0,handler:function(){o(t)},handlerKey:"d"}]:[]),Object(p.a)(0===n&&m?[{title:"Export hierarchy",subtitle:"(to JSON file)",handler:function(){s(t)},handlerKey:"j"}].concat(Object(p.a)(a<=1?[{title:"Export hierarchy",subtitle:"(to CSV file)",handler:function(){l(t)},handlerKey:"t"}]:[])):[]),Object(p.a)(n>0?[].concat(Object(p.a)(u?[{title:f?"Uncheck":"Check",handler:function(){r(t,!f)},handlerKey:"s"}]:[]),Object(p.a)(m?[{title:"Export set",subtitle:"(to JSON file)",handler:function(){c(t)},handlerKey:"e"}]:[])):[]))}function Zo(e){var t,n=e.title,a=e.path,r=e.nodeKey,o=e.level,i=e.height,l=e.color,c=e.checkbox,p=e.isChecking,u=e.isLeaf,d=e.onNodeSetColor,m=e.onNodeView,f=e.expanded,y=e.onCheckLevel,h=e.checkedLevelPath,g=e.checkedLevelIndex,v=e.disableTooltip,b=e.size,x=e.datatype,O=e.editable,j=e.theme,E=0===o&&!f,S=g&&ge()(a,h)&&g<i?g+1:1,C=new Intl.NumberFormat("en-US").format(b);t=E?ea(S):u||!f?"Color individual set (".concat(C," ").concat(x).concat(1===b?"":"s",")"):"Color by expanded descendants";var _=0!==o||f?function(){return m(a)}:function(){return y(r,S)},T=v?{visible:!1}:{},w=Xo(e);return s.a.createElement("span",null,s.a.createElement(Ao,Object.assign({title:t},T),s.a.createElement("button",{type:"button",onClick:_,onKeyPress:function(e){return Jn(e,"v",(function(){return m(a)}))},className:"title-button"},n)),w.length>0?s.a.createElement(Mo,{menuConfig:Xo(e),color:o>0&&O?l||Qt(j):null,setColor:function(e){return d(a,e)}},s.a.createElement(Fo,{className:"node-menu-icon"})):null,o>0&&p?c:null,o>0&&s.a.createElement("span",{className:"node-size-label"},C))}function Vo(e){var t=e.title,n=e.path,a=e.onNodeSetName,r=e.onNodeCheckNewName,l=Object(i.useState)(t),c=Object(o.a)(l,2),p=c[0],u=c[1],d=r(n,p);function m(){d||a(n,p,!0)}return s.a.createElement("span",{className:"title-button-with-input"},s.a.createElement("input",{autoFocus:!0,className:"title-input",type:"text",value:p,onChange:function(e){u(e.target.value)},onKeyPress:function(e){return Jn(e,"Enter",m)},onFocus:function(e){return e.target.select()}}),!d&&s.a.createElement("button",{type:"button",className:"title-save-button",onClick:m},"Save"))}function Bo(e){var t=e.isEditing,n=e.isCurrentSet;return t||n?s.a.createElement(Vo,e):s.a.createElement(Zo,e)}function Yo(e){var t=e.nodeKey,n=e.path,a=e.height,r=e.onCheckLevel,o=e.checkedLevelPath,i=e.checkedLevelIndex,l=e.hasColorEncoding;function c(e){if(e.target.checked){var n=parseInt(e.target.value,10);r(t,n)}}return s.a.createElement("div",{className:"level-buttons-container"},ct()(1,a+1).map((function(e){var t=ge()(n,o)&&e===i;return s.a.createElement("div",{className:"level-buttons",key:e},s.a.createElement(Ao,{title:ea(e)},s.a.createElement("input",{className:Object(wo.a)("level-radio-button",{checked:t&&!l}),type:"checkbox",value:e,checked:t&&l,onChange:c})))})))}function Uo(e){var t=e.isLeaf,n=e.isOpen,a=e.color,r=a?Kn(a):void 0;return t?s.a.createElement("i",{className:"anticon anticon-circle rc-tree-switcher-icon"},s.a.createElement("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"caret-down",width:"1em",height:"1em","aria-hidden":"true"},s.a.createElement("rect",{fill:r,x:300,y:300,width:424,height:424}))):s.a.createElement("i",{className:"anticon anticon-caret-down rc-tree-switcher-icon"},s.a.createElement("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"caret-down",width:"1em",height:"1em","aria-hidden":"true"},s.a.createElement("path",{fill:n?"#444":r,d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"})))}var qo=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(){var e;Object(u.a)(this,n);for(var a=arguments.length,r=new Array(a),o=0;o<a;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))).renderSelector=function(){var t=e.props,n=t.title,a=t.isCurrentSet,r=t.isSelected,o=t.isEditing,i=t.onDragStart,l=e.context.rcTree,c=l.prefixCls,p=l.draggable,u="".concat(c,"-node-content-wrapper"),d=!a&&!o&&p;return s.a.createElement("span",{ref:e.setSelectHandle,title:n,className:Eo()(u,"".concat(u,"-").concat(e.getNodeState()||"normal"),r&&"".concat(c,"-node-selected"),d&&"draggable"),draggable:d,"aria-grabbed":d,onDragStart:d?function(t){i(),e.onDragStart(t)}:void 0},s.a.createElement(Bo,Object.assign({},e.props,{prefixClass:c,checkbox:e.renderCheckbox()})),e.renderLevels())},e.renderLevels=function(){var t=e.props,n=t.level,a=t.expanded;return 0!==n||a?null:s.a.createElement(Yo,e.props)},e.renderSwitcher=function(){var t=e.props,n=t.expanded,a=t.isLeaf,r=t.color,o=e.context.rcTree,i=o.prefixCls,l=o.onNodeExpand,p=function(t){a||l(t,Object(To.a)(e))},u=Eo()("".concat(i,"-switcher"),Object(c.a)({},"".concat(i,"-switcher_").concat(n?"open":"close"),!a));return s.a.createElement("span",{className:u,onClick:p,onKeyPress:function(e){return Jn(e,"d",p)},role:"button",tabIndex:"0"},s.a.createElement(Uo,{isLeaf:a,isOpen:n,color:r}))},e}return Object(d.a)(n,[{key:"render",value:function(){var e,t=this,n=this.props,a=n.style,r=n.loading,o=n.level,i=n.dragOver,l=n.dragOverGapTop,p=n.dragOverGapBottom,u=n.isLeaf,d=n.expanded,m=n.selected,f=n.checked,y=n.halfChecked,h=n.onDragEnd,g=n.expandable,v=Object(_o.a)(n,["style","loading","level","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","expanded","selected","checked","halfChecked","onDragEnd","expandable"]),b=this.context.rcTree,x=b.prefixCls,O=b.filterTreeNode,j=b.draggable,E=this.isDisabled(),S=Object(Lo.i)(v);return s.a.createElement("li",Object.assign({className:Eo()("rc-tree-treenode","level-".concat(o,"-treenode"),(e={},Object(c.a)(e,"".concat(x,"-treenode-disabled"),E),Object(c.a)(e,"".concat(x,"-treenode-switcher-").concat(d?"open":"close"),!u),Object(c.a)(e,"".concat(x,"-treenode-checkbox-checked"),f),Object(c.a)(e,"".concat(x,"-treenode-checkbox-indeterminate"),y),Object(c.a)(e,"".concat(x,"-treenode-selected"),m),Object(c.a)(e,"".concat(x,"-treenode-loading"),r),Object(c.a)(e,"drag-over",!E&&i),Object(c.a)(e,"drag-over-gap-top",!E&&l),Object(c.a)(e,"drag-over-gap-bottom",!E&&p),Object(c.a)(e,"filter-node",O&&O(this)),e)),style:a,role:"treeitem",onDragEnter:j?this.onDragEnter:void 0,onDragOver:j?this.onDragOver:void 0,onDragLeave:j?this.onDragLeave:void 0,onDrop:j?this.onDrop.bind(this):void 0,onDragEnd:j?function(e){h(),t.onDragEnd(e)}:void 0},S),g?this.renderSwitcher():null,this.renderSelector(),this.renderChildren())}}]),n}(Oo.a);function Wo(){return(Wo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}function $o(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Jo(e){var t=e.svgRef,n=e.title,a=e.titleId,r=$o(e,["svgRef","title","titleId"]);return i.createElement("svg",Wo({viewBox:"0 0 16.433999 10.234",height:12,width:18,ref:t,"aria-labelledby":a},r),n?i.createElement("title",{id:a},n):null,i.createElement("g",{transform:"translate(0.117,-2.883)"},i.createElement("path",{d:"m 11.467471,11.811278 c 0.198237,-0.322177 0.508,-1.011333 0.653661,-1.454255 0.659343,-2.0049141 0.44323,-4.2620847 -0.577734,-6.0340822 l -0.168844,-0.2930481 0.105744,0.017887 c 0.759902,0.1285441 1.368762,0.3699553 1.856675,0.7361658 1.988296,1.4923476 2.192477,4.3353549 0.434717,6.0529895 -0.641216,0.626581 -1.299647,0.94683 -2.294136,1.115833 l -0.108488,0.01844 z M 4.3162122,11.919169 C 1.9278944,11.487872 0.46692382,9.0323123 1.234873,6.7401372 1.5621727,5.763213 2.2610593,4.9489746 3.1840041,4.4693005 3.5978035,4.2542401 3.9427842,4.145371 4.5197023,4.0477802 L 4.6254464,4.0298927 4.4571836,4.3223069 C 3.4332707,6.1017061 3.2180432,8.3476022 3.878868,10.357023 c 0.1458466,0.443487 0.4554716,1.132155 0.6542959,1.455285 0.054471,0.08853 0.087814,0.159599 0.074096,0.157937 -0.013718,-0.0017 -0.1446898,-0.02465 -0.2910477,-0.05108 z M 5.0000001,3 C 2.2,3 0,5.2 0,8 c 0,2.8 2.2,5 5.0000001,5 0.6,0 1.1,-0.1 1.6,-0.3 C 5.3000001,11.6 4.5,9.7999998 4.5,8 4.5,6.2 5.3000001,4.5 6.6000001,3.3 c -0.5,-0.2 -1,-0.3 -1.6,-0.3 z M 4.65,4.02 C 3.92,5.17 3.51,6.54 3.51,8 c 0,1.4599998 0.42,2.83 1.14,3.98 C 2.61,11.8 1.01,10.08 1.01,8 1.01,5.92 2.61,4.2 4.65,4.02 Z M 8,4 C 6.8,4.9 6,6.4 6,8 6,9.6 6.8,11.1 8,12 9.2,11.1 10,9.7 10,8 10,6.3 9.2,4.9 8,4 Z m 3,-1 c 2.8,0 5,2.2 5,5 0,2.8 -2.2,5 -5,5 C 10.4,13 9.9,12.9 9.4,12.7 10.7,11.6 11.5,9.8 11.5,8 11.5,6.2 10.7,4.5 9.4,3.3 9.9,3.1 10.4,3 11,3 Z m 0.35,1.02 c 0.73,1.15 1.14,2.52 1.14,3.98 0,1.46 -0.42,2.83 -1.14,3.98 2.04,-0.18 3.64,-1.9 3.64,-3.98 0,-2.08 -1.6,-3.8 -3.64,-3.98 z",style:{strokeWidth:.234,strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1}})))}var Ko=i.forwardRef((function(e,t){return i.createElement(Jo,Wo({svgRef:t},e))}));n.p;function Qo(){return(Qo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}function ei(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ti(e){var t=e.svgRef,n=e.title,a=e.titleId,r=ei(e,["svgRef","title","titleId"]);return i.createElement("svg",Qo({width:18,height:12,viewBox:"0 0 16 10",ref:t,"aria-labelledby":a},r),n?i.createElement("title",{id:a},n):null,i.createElement("g",{transform:"translate(0,-3)"},i.createElement("path",{d:"M 5.0000001,3 C 2.2,3 0,5.2 0,8 c 0,2.8 2.2,5 5.0000001,5 0.6,0 1.1,-0.1 1.6,-0.3 C 5.3000001,11.6 4.5,9.7999998 4.5,8 4.5,6.2 5.3000001,4.5 6.6000001,3.3 c -0.5,-0.2 -1,-0.3 -1.6,-0.3 z M 4.65,4.02 C 3.92,5.17 3.51,6.54 3.51,8 c 0,1.4599998 0.42,2.83 1.14,3.98 C 2.61,11.8 1.01,10.08 1.01,8 1.01,5.92 2.61,4.2 4.65,4.02 Z M 8,4 C 6.8,4.9 6,6.4 6,8 6,9.6 6.8,11.1 8,12 9.2,11.1 10,9.7 10,8 10,6.3 9.2,4.9 8,4 Z m 3,-1 c 2.8,0 5,2.2 5,5 0,2.8 -2.2,5 -5,5 C 10.4,13 9.9,12.9 9.4,12.7 10.7,11.6 11.5,9.8 11.5,8 11.5,6.2 10.7,4.5 9.4,3.3 9.9,3.1 10.4,3 11,3 Z m 0.35,1.02 c 0.73,1.15 1.14,2.52 1.14,3.98 0,1.46 -0.42,2.83 -1.14,3.98 2.04,-0.18 3.64,-1.9 3.64,-3.98 0,-2.08 -1.6,-3.8 -3.64,-3.98 z",style:{strokeWidth:.234,strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1}})))}var ni=i.forwardRef((function(e,t){return i.createElement(ti,Qo({svgRef:t},e))}));n.p;function ai(){return(ai=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}function ri(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var oi=i.createElement("rect",{x:"5%",width:"90%",height:"100%",fill:"white"}),ii=i.createElement("g",null,i.createElement("rect",{x:0,y:0,width:25.3804963846,height:16,mask:"url(#union-mask)"}));function si(e){var t=e.svgRef,n=e.title,a=e.titleId,r=ri(e,["svgRef","title","titleId"]);return i.createElement("svg",ai({id:"svg14",viewBox:"0 0 25.3804963846 16",height:16,width:25.3804963846,ref:t,"aria-labelledby":a},r),n?i.createElement("title",{id:a},n):null,i.createElement("defs",null,i.createElement("mask",{id:"union-mask",x:0,y:0,width:25.3804963846,height:16},oi,i.createElement("g",{transform:"translate(4.69,0)"},i.createElement("path",{d:"m 11.467471,11.811278 c 0.198237,-0.322177 0.508,-1.011333 0.653661,-1.454255 0.659343,-2.0049141 0.44323,-4.2620847 -0.577734,-6.0340822 l -0.168844,-0.2930481 0.105744,0.017887 c 0.759902,0.1285441 1.368762,0.3699553 1.856675,0.7361658 1.988296,1.4923476 2.192477,4.3353549 0.434717,6.0529895 -0.641216,0.626581 -1.299647,0.94683 -2.294136,1.115833 l -0.108488,0.01844 z M 4.3162122,11.919169 C 1.9278944,11.487872 0.46692382,9.0323123 1.234873,6.7401372 1.5621727,5.763213 2.2610593,4.9489746 3.1840041,4.4693005 3.5978035,4.2542401 3.9427842,4.145371 4.5197023,4.0477802 L 4.6254464,4.0298927 4.4571836,4.3223069 C 3.4332707,6.1017061 3.2180432,8.3476022 3.878868,10.357023 c 0.1458466,0.443487 0.4554716,1.132155 0.6542959,1.455285 0.054471,0.08853 0.087814,0.159599 0.074096,0.157937 -0.013718,-0.0017 -0.1446898,-0.02465 -0.2910477,-0.05108 z M 5.0000001,3 C 2.2,3 0,5.2 0,8 c 0,2.8 2.2,5 5.0000001,5 0.6,0 1.1,-0.1 1.6,-0.3 C 5.3000001,11.6 4.5,9.7999998 4.5,8 4.5,6.2 5.3000001,4.5 6.6000001,3.3 c -0.5,-0.2 -1,-0.3 -1.6,-0.3 z M 4.65,4.02 C 3.92,5.17 3.51,6.54 3.51,8 c 0,1.4599998 0.42,2.83 1.14,3.98 C 2.61,11.8 1.01,10.08 1.01,8 1.01,5.92 2.61,4.2 4.65,4.02 Z M 8,4 C 6.8,4.9 6,6.4 6,8 6,9.6 6.8,11.1 8,12 9.2,11.1 10,9.7 10,8 10,6.3 9.2,4.9 8,4 Z m 3,-1 c 2.8,0 5,2.2 5,5 0,2.8 -2.2,5 -5,5 C 10.4,13 9.9,12.9 9.4,12.7 10.7,11.6 11.5,9.8 11.5,8 11.5,6.2 10.7,4.5 9.4,3.3 9.9,3.1 10.4,3 11,3 Z m 0.35,1.02 c 0.73,1.15 1.14,2.52 1.14,3.98 0,1.46 -0.42,2.83 -1.14,3.98 2.04,-0.18 3.64,-1.9 3.64,-3.98 0,-2.08 -1.6,-3.8 -3.64,-3.98 z",style:{strokeWidth:.234,strokeMiterlimit:4,strokeDasharray:"none",strokeOpacity:1},fill:"black"})))),ii)}var li=i.forwardRef((function(e,t){return i.createElement(si,ai({svgRef:t},e))}));n.p;function ci(e){var t=e.datatype,n=e.onError,a=e.onImportTree,r=e.onCreateLevelZeroNode,o=e.importable,l=e.editable,c=Object(i.useCallback)((function(e,r){return function(){var o=document.createElement("input");o.setAttribute("type","file"),o.setAttribute("accept",r),document.body.appendChild(o),o.click(),o.addEventListener("change",(function(r){if(window.File&&window.FileReader&&window.FileList&&window.Blob){var o=r.target.files;if(o&&1===o.length){var i=new FileReader;i.addEventListener("load",(function(){var r=i.result;try{var o=e(r,t);n(!1),a(o)}catch(s){n(s.message)}}),!1),i.readAsText(o[0])}else n("Incorrect number of files selected.")}else n("Local file reading APIs are not fully supported in this browser.")})),o.remove()}}),[t,n,a]),u=[].concat(Object(p.a)(l?[{title:"Create hierarchy",handler:r,handlerKey:"n"}]:[]),Object(p.a)(o?[{title:"Import hierarchy",subtitle:"(from CSV file)",handler:c(wa,"text/csv"),handlerKey:"c"},{title:"Import hierarchy",subtitle:"(from JSON file)",handler:c(Ta,"application/json"),handlerKey:"j"}]:[]));return u.length>0?s.a.createElement(Mo,{menuConfig:u},s.a.createElement("button",{className:"plus-button",type:"submit"},"+")):null}function pi(e){var t=e.onUnion,n=e.onIntersection,a=e.onComplement,r=e.operatable,o=e.hasCheckedSetsToUnion,i=e.hasCheckedSetsToIntersect,l=e.hasCheckedSetsToComplement;return s.a.createElement(s.a.Fragment,null,r&&s.a.createElement(s.a.Fragment,null,s.a.createElement("button",{onClick:t,title:"New set from union of checked sets",type:"submit",disabled:!o},s.a.createElement(Ko,null)),s.a.createElement("button",{onClick:n,title:"New set from intersection of checked sets",type:"submit",disabled:!i},s.a.createElement(ni,null)),s.a.createElement("button",{onClick:a,title:"New set from complement of checked sets",type:"submit",disabled:!l},s.a.createElement(li,null))))}function ui(e,t,n){return Object(l.a)({},e,{tree:e?e.tree.map((function(e){return function e(t,n,a,r){var o,i=[].concat(Object(p.a)(n),[t.name]);return Object(l.a)({},t,{},t.children?{children:t.children.map((function(t){return e(t,i,a)}))}:{},{color:(null===a||void 0===a||null===(o=a.find((function(e){return ge()(e.path,i)})))||void 0===o?void 0:o.color)||Qt(r)})}(e,[],t,n)})):[]})}function di(e){var t=e.theme,n=e.sets,a=e.additionalSets,r=e.setColor,l=e.levelSelection,c=e.setSelection,u=e.setExpansion,d=e.hasColorEncoding,m=e.datatype,f=e.draggable,y=void 0===f||f,h=e.checkable,g=void 0===h||h,v=e.editable,b=void 0===v||v,x=e.expandable,O=void 0===x||x,j=e.operatable,E=void 0===j||j,S=e.exportable,C=void 0===S||S,_=e.importable,T=void 0===_||_,w=e.onError,L=e.onCheckNode,P=e.onExpandNode,I=e.onDropNode,A=e.onCheckLevel,k=e.onNodeSetColor,R=e.onNodeSetName,N=e.onNodeCheckNewName,M=e.onNodeRemove,D=e.onNodeView,G=e.onImportTree,z=e.onCreateLevelZeroNode,H=e.onExportLevelZeroNodeJSON,F=e.onExportLevelZeroNodeTabular,X=e.onExportSetJSON,Z=e.onUnion,V=e.onIntersection,B=e.onComplement,Y=e.hasCheckedSetsToUnion,U=e.hasCheckedSetsToIntersect,q=e.hasCheckedSetsToComplement,W=Object(i.useState)(!1),$=Object(o.a)(W,2),J=$[0],K=$[1],Q=Object(i.useState)(null),ee=Object(o.a)(Q,2),te=ee[0],ne=ee[1],ae=Object(i.useMemo)((function(){return ui(n,r,t)}),[n,r,t]),re=Object(i.useMemo)((function(){return ui(a,r,t)}),[a,r,t]),oe=re?re.tree.flatMap((function(e){return function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!t)return null;var a=[].concat(Object(p.a)(n),[t.name]);return t.children?[aa(a)].concat(Object(p.a)(t.children.flatMap((function(t){return e(t,a)})))):aa(a)}(e,[])})):[],ie=(c||[]).map(aa),se=(u||[]).map(aa),le=ie.filter((function(e){return!oe.includes(e)})),ce=se.filter((function(e){return!oe.includes(e)})),pe=ie.filter((function(e){return oe.includes(e)})),ue=se.filter((function(e){return oe.includes(e)}));function de(e,n,a){return e?e.map((function(e){var o=[].concat(Object(p.a)(a),[e.name]);return s.a.createElement(qo,Object.assign({theme:t,key:aa(o)},function(e,t,n){var a,r=t.length-1;return{title:e.name,nodeKey:aa(t),path:t,size:ua(e),color:null===n||void 0===n||null===(a=n.find((function(e){return ge()(e.path,t)})))||void 0===a?void 0:a.color,level:r,isLeaf:(!e.children||0===e.children.length)&&Boolean(e.set),height:pa(e)}}(e,o,r),{isEditing:ge()(te,o),datatype:m,draggable:y&&!n,editable:b&&!n,checkable:g,expandable:O,exportable:C,hasColorEncoding:d,isChecking:!0,checkedLevelPath:l?l.levelZeroPath:null,checkedLevelIndex:l?l.levelIndex:null,onCheckNode:L,onCheckLevel:A,onNodeView:D,onNodeSetColor:k,onNodeSetName:function(e,t){R(e,t),ne(null)},onNodeCheckNewName:N,onNodeSetIsEditing:ne,onNodeRemove:M,onExportLevelZeroNodeJSON:H,onExportLevelZeroNodeTabular:F,onExportSetJSON:X,disableTooltip:J,onDragStart:function(){return K(!0)},onDragEnd:function(){return K(!1)}}),de(e.children,n,o))})):null}return s.a.createElement("div",{className:"sets-manager"},s.a.createElement("div",{className:"sets-manager-tree"},s.a.createElement(Co,{draggable:!1,checkable:g,checkedKeys:le,expandedKeys:ce,autoExpandParent:!0,onCheck:function(e,t){return L(t.node.props.nodeKey,t.checked)},onExpand:function(e,t){return P(e,t.node.props.nodeKey,t.expanded)}},de(ae.tree,!0,[])),s.a.createElement(Co,{draggable:!0,checkable:g,checkedKeys:pe,expandedKeys:ue,autoExpandParent:!0,onCheck:function(e,t){return L(t.node.props.nodeKey,t.checked)},onExpand:function(e,t){return P(e,t.node.props.nodeKey,t.expanded)},onDrop:function(e){var t=e.node.props.eventKey,n=e.dragNode.props.eventKey,a=e.dropToGap,r=e.dropPosition;I(t,n,r,a)}},de(re.tree,!1,[])),s.a.createElement(ci,{datatype:m,onError:w,onImportTree:G,onCreateLevelZeroNode:z,importable:T,editable:b})),s.a.createElement("div",{className:"set-operation-buttons"},s.a.createElement(pi,{onUnion:Z,onIntersection:V,onComplement:B,operatable:E,hasCheckedSetsToUnion:Y,hasCheckedSetsToIntersect:U,hasCheckedSetsToComplement:q})))}var mi=["cells","cell-sets"];var fi;(fi=function(e){var t=e.length-1;return function(n){var a=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),r=e[a],o=e[a+1],i=a>0?e[a-1]:2*r-o,s=a<t-1?e[a+2]:2*o-r;return function(e,t,n,a,r){var o=e*e,i=o*e;return((1-3*e+3*o-i)*t+(4-6*o+3*i)*n+(1+3*e+3*o-3*i)*a+i*r)/6}((n-a/t)*t,i,r,o,s)}},function(e){var t,n,a=e.length,r=new Array(a),o=new Array(a),i=new Array(a);for(t=0;t<a;++t)n=[e[t][0],e[t][1],e[t][2]],r[t]=n[0]||0,o[t]=n[1]||0,i[t]=n[2]||0;return r=fi(r),o=fi(o),i=fi(i),function(e){return[r(e),o(e),i(e)]}})([[103,0,31],[178,24,43],[214,96,77],[244,165,130],[253,219,199],[247,247,247],[209,229,240],[146,197,222],[67,147,195],[33,102,172],[5,48,97]]);var yi=function(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}([[13,8,135],[16,7,136],[19,7,137],[22,7,138],[25,6,140],[27,6,141],[29,6,142],[32,6,143],[34,6,144],[36,6,145],[38,5,145],[40,5,146],[42,5,147],[44,5,148],[46,5,149],[47,5,150],[49,5,151],[51,5,151],[53,4,152],[55,4,153],[56,4,154],[58,4,154],[60,4,155],[62,4,156],[63,4,156],[65,4,157],[67,3,158],[68,3,158],[70,3,159],[72,3,159],[73,3,160],[75,3,161],[76,2,161],[78,2,162],[80,2,162],[81,2,163],[83,2,163],[85,2,164],[86,1,164],[88,1,164],[89,1,165],[91,1,165],[92,1,166],[94,1,166],[96,1,166],[97,0,167],[99,0,167],[100,0,167],[102,0,167],[103,0,168],[105,0,168],[106,0,168],[108,0,168],[110,0,168],[111,0,168],[113,0,168],[114,1,168],[116,1,168],[117,1,168],[119,1,168],[120,1,168],[122,2,168],[123,2,168],[125,3,168],[126,3,168],[128,4,168],[129,4,167],[131,5,167],[132,5,167],[134,6,166],[135,7,166],[136,8,166],[138,9,165],[139,10,165],[141,11,165],[142,12,164],[143,13,164],[145,14,163],[146,15,163],[148,16,162],[149,17,161],[150,19,161],[152,20,160],[153,21,159],[154,22,159],[156,23,158],[157,24,157],[158,25,157],[160,26,156],[161,27,155],[162,29,154],[163,30,154],[165,31,153],[166,32,152],[167,33,151],[168,34,150],[170,35,149],[171,36,148],[172,38,148],[173,39,147],[174,40,146],[176,41,145],[177,42,144],[178,43,143],[179,44,142],[180,46,141],[181,47,140],[182,48,139],[183,49,138],[184,50,137],[186,51,136],[187,52,136],[188,53,135],[189,55,134],[190,56,133],[191,57,132],[192,58,131],[193,59,130],[194,60,129],[195,61,128],[196,62,127],[197,64,126],[198,65,125],[199,66,124],[200,67,123],[201,68,122],[202,69,122],[203,70,121],[204,71,120],[204,73,119],[205,74,118],[206,75,117],[207,76,116],[208,77,115],[209,78,114],[210,79,113],[211,81,113],[212,82,112],[213,83,111],[213,84,110],[214,85,109],[215,86,108],[216,87,107],[217,88,106],[218,90,106],[218,91,105],[219,92,104],[220,93,103],[221,94,102],[222,95,101],[222,97,100],[223,98,99],[224,99,99],[225,100,98],[226,101,97],[226,102,96],[227,104,95],[228,105,94],[229,106,93],[229,107,93],[230,108,92],[231,110,91],[231,111,90],[232,112,89],[233,113,88],[233,114,87],[234,116,87],[235,117,86],[235,118,85],[236,119,84],[237,121,83],[237,122,82],[238,123,81],[239,124,81],[239,126,80],[240,127,79],[240,128,78],[241,129,77],[241,131,76],[242,132,75],[243,133,75],[243,135,74],[244,136,73],[244,137,72],[245,139,71],[245,140,70],[246,141,69],[246,143,68],[247,144,68],[247,145,67],[247,147,66],[248,148,65],[248,149,64],[249,151,63],[249,152,62],[249,154,62],[250,155,61],[250,156,60],[250,158,59],[251,159,58],[251,161,57],[251,162,56],[252,163,56],[252,165,55],[252,166,54],[252,168,53],[252,169,52],[253,171,51],[253,172,51],[253,174,50],[253,175,49],[253,177,48],[253,178,47],[253,180,47],[253,181,46],[254,183,45],[254,184,44],[254,186,44],[254,187,43],[254,189,42],[254,190,42],[254,192,41],[253,194,41],[253,195,40],[253,197,39],[253,198,39],[253,200,39],[253,202,38],[253,203,38],[252,205,37],[252,206,37],[252,208,37],[252,210,37],[251,211,36],[251,213,36],[251,215,36],[250,216,36],[250,218,36],[249,220,36],[249,221,37],[248,223,37],[248,225,37],[247,226,37],[247,228,37],[246,230,38],[246,232,38],[245,233,38],[245,235,39],[244,237,39],[243,238,39],[243,240,39],[242,242,39],[241,244,38],[241,245,37],[240,247,36],[240,249,33]]);function hi(e){var t=e.cellColorEncoding,n=e.expressionData,a=e.cellSets,r=e.cellSetSelection,i=e.cellSetColor,s=e.expressionDataAttrs,l=e.theme;if("geneSelection"===t&&n&&s){for(var c=yi,u=new Map,d=0;d<n.length;d+=1){var m=c(n[d]/255);u.set(s.rows[d],m)}return u}return"cellSetSelection"===t&&r&&a?function(e,t,n,a){var r=[];return t.forEach((function(t){var i=da(e,t);if(i){var s,l=ca(i),c=(null===n||void 0===n||null===(s=n.find((function(e){return ge()(e.path,t)})))||void 0===s?void 0:s.color)||Qt(a);r=[].concat(Object(p.a)(r),Object(p.a)(l.map((function(e){var t=Object(o.a)(e,2),n=t[0],a=t[1];return[n,Yn()(a)?c:xa(c,a)]}))))}})),new Map(r)}(a,r,i,l):new Map}var gi,vi=n(388),bi=n(580),xi=n(386),Oi=n(529),ji=(n(1294),n(511)),Ei=n(700),Si=n.n(Ei),Ci=n(701),_i=n.n(Ci),Ti=n(702),wi=n.n(Ti),Li=n(308),Pi=n.n(Li),Ii=n(185),Ai=n(309),ki=n(202),Ri=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(){return Object(u.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"handleClick",value:function(e,t){t.onEdit({editType:"clearFeatures"})}}]),n}(ki.DrawRectangleMode),Ni=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(){return Object(u.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"handleClick",value:function(e,t){t.onEdit({editType:"clearFeatures"})}}]),n}(ki.DrawPolygonByDraggingMode),Mi=(gi={},Object(c.a)(gi,Ii.SELECTION_TYPE.RECTANGLE,Ri),Object(c.a)(gi,Ii.SELECTION_TYPE.POLYGON,Ni),gi),Di={selectionType:Ii.SELECTION_TYPE.RECTANGLE,layerIds:[],onSelect:function(){}},Gi={type:"FeatureCollection",features:[]},zi=["lineWidthScale","lineWidthMinPixels","lineWidthMaxPixels","lineWidthUnits","lineJointRounded","lineMiterLimit","pointRadiusScale","pointRadiusMinPixels","pointRadiusMaxPixels","lineDashJustified","getLineColor","getFillColor","getRadius","getLineWidth","getLineDashArray","getTentativeLineDashArray","getTentativeLineColor","getTentativeFillColor","getTentativeLineWidth","editHandlePointRadiusScale","editHandlePointRadiusMinPixels","editHandlePointRadiusMaxPixels","getEditHandlePointColor","getEditHandlePointRadius","modeHandlers"],Hi=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(){return Object(u.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"_selectPolygonObjects",value:function(e){var t=this.props,n=t.onSelect,a=t.getCellCoords,r=t.cellsQuadTree,o=t.flipY?e.map((function(e){return e.map((function(e){return[e[0],-e[1]]}))})):e,i=Object(ra.polygon)(o),s=[];r.visit((function(e,t,n,r,o){var l=[[[t,n],[r,n],[r,o],[t,o],[t,n]]],c=Object(ra.polygon)(l),p=_i()(c,i),u=Si()(c,i),d=wi()(c,i);return!(p||u||d)||(e.data&&Pi()(Object(ra.point)([].slice.call(a(e.data[1]))),i)&&s.push(e.data),!1)})),n({pickingInfos:s})}},{key:"renderLayers",value:function(){var e=this,t=this.props.onSelect,n=Mi[this.props.selectionType]||ki.ViewMode,a={};return zi.forEach((function(t){void 0!==e.props[t]&&(a[t]=e.props[t])})),[new Ai.EditableGeoJsonLayer(this.getSubLayerProps(Object(l.a)({id:"selection-geojson",pickable:!0,mode:n,modeConfig:{dragToDraw:!0},selectedFeatureIndexes:[],data:Gi,onEdit:function(n){var a=n.updatedData,r=n.editType;if("addFeature"===r){var o=a.features[0].geometry.coordinates;e._selectPolygonObjects(o)}else"clearFeatures"===r&&t({pickingInfos:[]})},_subLayerProps:{guides:{pointType:"circle",_subLayerProps:{"points-circle":{type:vi.a,radiusScale:1,stroked:!0,getLineWidth:1,radiusMinPixels:1,radiusMaxPixels:3,getRadius:2}}}}},a)))]}}]),n}(ji.a);function Fi(e){return"base-".concat(e)}function Xi(e,t,n,a,r,o){var i=arguments.length>6&&void 0!==arguments[6]&&arguments[6];if(!e)return[];var s=Fi(n),l=5/(t+16);return[new Hi({id:"selection",flipY:i,cellsQuadTree:o,getCellCoords:a,coordinateSystem:Yt.a.CARTESIAN,selectionType:e,onSelect:function(e){var t=e.pickingInfos.map((function(e){return e[0]}));r&&r(t)},layerIds:[s],getTentativeFillColor:function(){return[255,255,255,95]},getTentativeLineColor:function(){return[143,143,143,255]},getTentativeLineDashArray:function(){return[7,4]},lineWidthMinPixels:2,lineWidthMaxPixels:2,getEditHandlePointColor:function(){return[255,255,255,255]},getEditHandlePointRadius:function(){return l},editHandlePointRadiusScale:1,editHandlePointRadiusMinPixels:l,editHandlePointRadiusMaxPixels:2*l})]}Hi.layerName="SelectionLayer",Hi.defaultProps=Di;var Zi,Vi=n(378),Bi=n(648),Yi={dark:[224,224,224],light:[64,64,64]},Ui="-apple-system, 'Helvetica Neue', Arial, sans-serif",qi=(Zi={},Object(c.a)(Zi,hn.default.TEXTURE_MIN_FILTER,hn.default.NEAREST),Object(c.a)(Zi,hn.default.TEXTURE_MAG_FILTER,hn.default.NEAREST),Object(c.a)(Zi,hn.default.TEXTURE_WRAP_S,hn.default.CLAMP_TO_EDGE),Object(c.a)(Zi,hn.default.TEXTURE_WRAP_T,hn.default.CLAMP_TO_EDGE),Zi),Wi="\n#define SHADER_NAME heatmap-bitmap-layer-fragment-shader\n\n#ifdef GL_ES\nprecision mediump float;\n#endif\n\nvec4 rdbu (float x_2865134303) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.0196078431372549,0.0392156862745098,0.6745098039215687,1);\n  const float e1 = 0.35;\n  const vec4 v1 = vec4(0.41568627450980394,0.5372549019607843,0.9686274509803922,1);\n  const float e2 = 0.5;\n  const vec4 v2 = vec4(0.7450980392156863,0.7450980392156863,0.7450980392156863,1);\n  const float e3 = 0.6;\n  const vec4 v3 = vec4(0.8627450980392157,0.6666666666666666,0.5176470588235295,1);\n  const float e4 = 0.7;\n  const vec4 v4 = vec4(0.9019607843137255,0.5686274509803921,0.35294117647058826,1);\n  const float e5 = 1.0;\n  const vec4 v5 = vec4(0.6980392156862745,0.0392156862745098,0.10980392156862745,1);\n  float a0 = smoothstep(e0,e1,x_2865134303);\n  float a1 = smoothstep(e1,e2,x_2865134303);\n  float a2 = smoothstep(e2,e3,x_2865134303);\n  float a3 = smoothstep(e3,e4,x_2865134303);\n  float a4 = smoothstep(e4,e5,x_2865134303);\n  return max(mix(v0,v1,a0)*step(e0,x_2865134303)*step(x_2865134303,e1),\n    max(mix(v1,v2,a1)*step(e1,x_2865134303)*step(x_2865134303,e2),\n    max(mix(v2,v3,a2)*step(e2,x_2865134303)*step(x_2865134303,e3),\n    max(mix(v3,v4,a3)*step(e3,x_2865134303)*step(x_2865134303,e4),mix(v4,v5,a4)*step(e4,x_2865134303)*step(x_2865134303,e5)\n  ))));\n}\n\nvec4 plasma (float x_4113959278) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.050980392156862744,0.03137254901960784,0.5294117647058824,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.29411764705882354,0.011764705882352941,0.6313725490196078,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.49019607843137253,0.011764705882352941,0.6588235294117647,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.6588235294117647,0.13333333333333333,0.5882352941176471,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.796078431372549,0.27450980392156865,0.4745098039215686,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.8980392156862745,0.4196078431372549,0.36470588235294116,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.9725490196078431,0.5803921568627451,0.2549019607843137,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.9921568627450981,0.7647058823529411,0.1568627450980392,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9411764705882353,0.9764705882352941,0.12941176470588237,1);\n  float a0 = smoothstep(e0,e1,x_4113959278);\n  float a1 = smoothstep(e1,e2,x_4113959278);\n  float a2 = smoothstep(e2,e3,x_4113959278);\n  float a3 = smoothstep(e3,e4,x_4113959278);\n  float a4 = smoothstep(e4,e5,x_4113959278);\n  float a5 = smoothstep(e5,e6,x_4113959278);\n  float a6 = smoothstep(e6,e7,x_4113959278);\n  float a7 = smoothstep(e7,e8,x_4113959278);\n  return max(mix(v0,v1,a0)*step(e0,x_4113959278)*step(x_4113959278,e1),\n    max(mix(v1,v2,a1)*step(e1,x_4113959278)*step(x_4113959278,e2),\n    max(mix(v2,v3,a2)*step(e2,x_4113959278)*step(x_4113959278,e3),\n    max(mix(v3,v4,a3)*step(e3,x_4113959278)*step(x_4113959278,e4),\n    max(mix(v4,v5,a4)*step(e4,x_4113959278)*step(x_4113959278,e5),\n    max(mix(v5,v6,a5)*step(e5,x_4113959278)*step(x_4113959278,e6),\n    max(mix(v6,v7,a6)*step(e6,x_4113959278)*step(x_4113959278,e7),mix(v7,v8,a7)*step(e7,x_4113959278)*step(x_4113959278,e8)\n  )))))));\n}\n\nvec4 viridis (float x_1156145534) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.26666666666666666,0.00392156862745098,0.32941176470588235,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.2784313725490196,0.17254901960784313,0.47843137254901963,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.23137254901960785,0.3176470588235294,0.5450980392156862,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.17254901960784313,0.44313725490196076,0.5568627450980392,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.12941176470588237,0.5647058823529412,0.5529411764705883,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.15294117647058825,0.6784313725490196,0.5058823529411764,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.3607843137254902,0.7843137254901961,0.38823529411764707,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.6666666666666666,0.8627450980392157,0.19607843137254902,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9921568627450981,0.9058823529411765,0.1450980392156863,1);\n  float a0 = smoothstep(e0,e1,x_1156145534);\n  float a1 = smoothstep(e1,e2,x_1156145534);\n  float a2 = smoothstep(e2,e3,x_1156145534);\n  float a3 = smoothstep(e3,e4,x_1156145534);\n  float a4 = smoothstep(e4,e5,x_1156145534);\n  float a5 = smoothstep(e5,e6,x_1156145534);\n  float a6 = smoothstep(e6,e7,x_1156145534);\n  float a7 = smoothstep(e7,e8,x_1156145534);\n  return max(mix(v0,v1,a0)*step(e0,x_1156145534)*step(x_1156145534,e1),\n    max(mix(v1,v2,a1)*step(e1,x_1156145534)*step(x_1156145534,e2),\n    max(mix(v2,v3,a2)*step(e2,x_1156145534)*step(x_1156145534,e3),\n    max(mix(v3,v4,a3)*step(e3,x_1156145534)*step(x_1156145534,e4),\n    max(mix(v4,v5,a4)*step(e4,x_1156145534)*step(x_1156145534,e5),\n    max(mix(v5,v6,a5)*step(e5,x_1156145534)*step(x_1156145534,e6),\n    max(mix(v6,v7,a6)*step(e6,x_1156145534)*step(x_1156145534,e7),mix(v7,v8,a7)*step(e7,x_1156145534)*step(x_1156145534,e8)\n  )))))));\n}\n\nvec4 greys (float x_2073311089) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0,1);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(1,1,1,1);\n  float a0 = smoothstep(e0,e1,x_2073311089);\n  return mix(v0,v1,a0)*step(e0,x_2073311089)*step(x_2073311089,e1);\n}\n\nvec4 magma (float x_2664132035) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0.01568627450980392,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.10980392156862745,0.06274509803921569,0.26666666666666666,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.30980392156862746,0.07058823529411765,0.4823529411764706,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.5058823529411764,0.1450980392156863,0.5058823529411764,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.7098039215686275,0.21176470588235294,0.47843137254901963,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.8980392156862745,0.3137254901960784,0.39215686274509803,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.984313725490196,0.5294117647058824,0.3803921568627451,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.996078431372549,0.7607843137254902,0.5294117647058824,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9882352941176471,0.9921568627450981,0.7490196078431373,1);\n  float a0 = smoothstep(e0,e1,x_2664132035);\n  float a1 = smoothstep(e1,e2,x_2664132035);\n  float a2 = smoothstep(e2,e3,x_2664132035);\n  float a3 = smoothstep(e3,e4,x_2664132035);\n  float a4 = smoothstep(e4,e5,x_2664132035);\n  float a5 = smoothstep(e5,e6,x_2664132035);\n  float a6 = smoothstep(e6,e7,x_2664132035);\n  float a7 = smoothstep(e7,e8,x_2664132035);\n  return max(mix(v0,v1,a0)*step(e0,x_2664132035)*step(x_2664132035,e1),\n    max(mix(v1,v2,a1)*step(e1,x_2664132035)*step(x_2664132035,e2),\n    max(mix(v2,v3,a2)*step(e2,x_2664132035)*step(x_2664132035,e3),\n    max(mix(v3,v4,a3)*step(e3,x_2664132035)*step(x_2664132035,e4),\n    max(mix(v4,v5,a4)*step(e4,x_2664132035)*step(x_2664132035,e5),\n    max(mix(v5,v6,a5)*step(e5,x_2664132035)*step(x_2664132035,e6),\n    max(mix(v6,v7,a6)*step(e6,x_2664132035)*step(x_2664132035,e7),mix(v7,v8,a7)*step(e7,x_2664132035)*step(x_2664132035,e8)\n  )))))));\n}\n\nvec4 jet (float x_2485945205) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0.5137254901960784,1);\n  const float e1 = 0.125;\n  const vec4 v1 = vec4(0,0.23529411764705882,0.6666666666666666,1);\n  const float e2 = 0.375;\n  const vec4 v2 = vec4(0.0196078431372549,1,1,1);\n  const float e3 = 0.625;\n  const vec4 v3 = vec4(1,1,0,1);\n  const float e4 = 0.875;\n  const vec4 v4 = vec4(0.9803921568627451,0,0,1);\n  const float e5 = 1.0;\n  const vec4 v5 = vec4(0.5019607843137255,0,0,1);\n  float a0 = smoothstep(e0,e1,x_2485945205);\n  float a1 = smoothstep(e1,e2,x_2485945205);\n  float a2 = smoothstep(e2,e3,x_2485945205);\n  float a3 = smoothstep(e3,e4,x_2485945205);\n  float a4 = smoothstep(e4,e5,x_2485945205);\n  return max(mix(v0,v1,a0)*step(e0,x_2485945205)*step(x_2485945205,e1),\n    max(mix(v1,v2,a1)*step(e1,x_2485945205)*step(x_2485945205,e2),\n    max(mix(v2,v3,a2)*step(e2,x_2485945205)*step(x_2485945205,e3),\n    max(mix(v3,v4,a3)*step(e3,x_2485945205)*step(x_2485945205,e4),mix(v4,v5,a4)*step(e4,x_2485945205)*step(x_2485945205,e5)\n  ))));\n}\n\nvec4 bone (float x_2693572714) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0,1);\n  const float e1 = 0.376;\n  const vec4 v1 = vec4(0.32941176470588235,0.32941176470588235,0.4549019607843137,1);\n  const float e2 = 0.753;\n  const vec4 v2 = vec4(0.6627450980392157,0.7843137254901961,0.7843137254901961,1);\n  const float e3 = 1.0;\n  const vec4 v3 = vec4(1,1,1,1);\n  float a0 = smoothstep(e0,e1,x_2693572714);\n  float a1 = smoothstep(e1,e2,x_2693572714);\n  float a2 = smoothstep(e2,e3,x_2693572714);\n  return max(mix(v0,v1,a0)*step(e0,x_2693572714)*step(x_2693572714,e1),\n    max(mix(v1,v2,a1)*step(e1,x_2693572714)*step(x_2693572714,e2),mix(v2,v3,a2)*step(e2,x_2693572714)*step(x_2693572714,e3)\n  ));\n}\n\nvec4 copper (float x_2606013778) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0,1);\n  const float e1 = 0.804;\n  const vec4 v1 = vec4(1,0.6274509803921569,0.4,1);\n  const float e2 = 1.0;\n  const vec4 v2 = vec4(1,0.7803921568627451,0.4980392156862745,1);\n  float a0 = smoothstep(e0,e1,x_2606013778);\n  float a1 = smoothstep(e1,e2,x_2606013778);\n  return max(mix(v0,v1,a0)*step(e0,x_2606013778)*step(x_2606013778,e1),mix(v1,v2,a1)*step(e1,x_2606013778)*step(x_2606013778,e2)\n  );\n}\n\nvec4 density (float x_4072297271) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.21176470588235294,0.054901960784313725,0.1411764705882353,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.34901960784313724,0.09019607843137255,0.3137254901960784,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.43137254901960786,0.17647058823529413,0.5176470588235295,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.47058823529411764,0.30196078431372547,0.6980392156862745,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.47058823529411764,0.44313725490196076,0.8352941176470589,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.45098039215686275,0.592156862745098,0.8941176470588236,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.5254901960784314,0.7254901960784313,0.8901960784313725,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.6941176470588235,0.8392156862745098,0.8901960784313725,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9019607843137255,0.9450980392156862,0.9450980392156862,1);\n  float a0 = smoothstep(e0,e1,x_4072297271);\n  float a1 = smoothstep(e1,e2,x_4072297271);\n  float a2 = smoothstep(e2,e3,x_4072297271);\n  float a3 = smoothstep(e3,e4,x_4072297271);\n  float a4 = smoothstep(e4,e5,x_4072297271);\n  float a5 = smoothstep(e5,e6,x_4072297271);\n  float a6 = smoothstep(e6,e7,x_4072297271);\n  float a7 = smoothstep(e7,e8,x_4072297271);\n  return max(mix(v0,v1,a0)*step(e0,x_4072297271)*step(x_4072297271,e1),\n    max(mix(v1,v2,a1)*step(e1,x_4072297271)*step(x_4072297271,e2),\n    max(mix(v2,v3,a2)*step(e2,x_4072297271)*step(x_4072297271,e3),\n    max(mix(v3,v4,a3)*step(e3,x_4072297271)*step(x_4072297271,e4),\n    max(mix(v4,v5,a4)*step(e4,x_4072297271)*step(x_4072297271,e5),\n    max(mix(v5,v6,a5)*step(e5,x_4072297271)*step(x_4072297271,e6),\n    max(mix(v6,v7,a6)*step(e6,x_4072297271)*step(x_4072297271,e7),mix(v7,v8,a7)*step(e7,x_4072297271)*step(x_4072297271,e8)\n  )))))));\n}\n\nvec4 inferno (float x_524681000) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0.01568627450980392,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.12156862745098039,0.047058823529411764,0.2823529411764706,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.3333333333333333,0.058823529411764705,0.42745098039215684,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.5333333333333333,0.13333333333333333,0.41568627450980394,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.7294117647058823,0.21176470588235294,0.3333333333333333,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.8901960784313725,0.34901960784313724,0.2,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.9764705882352941,0.5490196078431373,0.0392156862745098,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.9764705882352941,0.788235294117647,0.19607843137254902,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9882352941176471,1,0.6431372549019608,1);\n  float a0 = smoothstep(e0,e1,x_524681000);\n  float a1 = smoothstep(e1,e2,x_524681000);\n  float a2 = smoothstep(e2,e3,x_524681000);\n  float a3 = smoothstep(e3,e4,x_524681000);\n  float a4 = smoothstep(e4,e5,x_524681000);\n  float a5 = smoothstep(e5,e6,x_524681000);\n  float a6 = smoothstep(e6,e7,x_524681000);\n  float a7 = smoothstep(e7,e8,x_524681000);\n  return max(mix(v0,v1,a0)*step(e0,x_524681000)*step(x_524681000,e1),\n    max(mix(v1,v2,a1)*step(e1,x_524681000)*step(x_524681000,e2),\n    max(mix(v2,v3,a2)*step(e2,x_524681000)*step(x_524681000,e3),\n    max(mix(v3,v4,a3)*step(e3,x_524681000)*step(x_524681000,e4),\n    max(mix(v4,v5,a4)*step(e4,x_524681000)*step(x_524681000,e5),\n    max(mix(v5,v6,a5)*step(e5,x_524681000)*step(x_524681000,e6),\n    max(mix(v6,v7,a6)*step(e6,x_524681000)*step(x_524681000,e7),mix(v7,v8,a7)*step(e7,x_524681000)*step(x_524681000,e8)\n  )))))));\n}\n\nvec4 cool (float x_3050536724) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.49019607843137253,0,0.7019607843137254,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.4549019607843137,0,0.8549019607843137,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.3843137254901961,0.2901960784313726,0.9294117647058824,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.26666666666666666,0.5725490196078431,0.9058823529411765,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0,0.8,0.7725490196078432,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0,0.9686274509803922,0.5725490196078431,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0,1,0.34509803921568627,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.1568627450980392,1,0.03137254901960784,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.5764705882352941,1,0,1);\n  float a0 = smoothstep(e0,e1,x_3050536724);\n  float a1 = smoothstep(e1,e2,x_3050536724);\n  float a2 = smoothstep(e2,e3,x_3050536724);\n  float a3 = smoothstep(e3,e4,x_3050536724);\n  float a4 = smoothstep(e4,e5,x_3050536724);\n  float a5 = smoothstep(e5,e6,x_3050536724);\n  float a6 = smoothstep(e6,e7,x_3050536724);\n  float a7 = smoothstep(e7,e8,x_3050536724);\n  return max(mix(v0,v1,a0)*step(e0,x_3050536724)*step(x_3050536724,e1),\n    max(mix(v1,v2,a1)*step(e1,x_3050536724)*step(x_3050536724,e2),\n    max(mix(v2,v3,a2)*step(e2,x_3050536724)*step(x_3050536724,e3),\n    max(mix(v3,v4,a3)*step(e3,x_3050536724)*step(x_3050536724,e4),\n    max(mix(v4,v5,a4)*step(e4,x_3050536724)*step(x_3050536724,e5),\n    max(mix(v5,v6,a5)*step(e5,x_3050536724)*step(x_3050536724,e6),\n    max(mix(v6,v7,a6)*step(e6,x_3050536724)*step(x_3050536724,e7),mix(v7,v8,a7)*step(e7,x_3050536724)*step(x_3050536724,e8)\n  )))))));\n}\n\nvec4 hot (float x_4009354686) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0,1);\n  const float e1 = 0.3;\n  const vec4 v1 = vec4(0.9019607843137255,0,0,1);\n  const float e2 = 0.6;\n  const vec4 v2 = vec4(1,0.8235294117647058,0,1);\n  const float e3 = 1.0;\n  const vec4 v3 = vec4(1,1,1,1);\n  float a0 = smoothstep(e0,e1,x_4009354686);\n  float a1 = smoothstep(e1,e2,x_4009354686);\n  float a2 = smoothstep(e2,e3,x_4009354686);\n  return max(mix(v0,v1,a0)*step(e0,x_4009354686)*step(x_4009354686,e1),\n    max(mix(v1,v2,a1)*step(e1,x_4009354686)*step(x_4009354686,e2),mix(v2,v3,a2)*step(e2,x_4009354686)*step(x_4009354686,e3)\n  ));\n}\n\nvec4 spring (float x_2270446359) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(1,0,1,1);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(1,1,0,1);\n  float a0 = smoothstep(e0,e1,x_2270446359);\n  return mix(v0,v1,a0)*step(e0,x_2270446359)*step(x_2270446359,e1);\n}\n\nvec4 summer (float x_1101081466) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0.5019607843137255,0.4,1);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(1,1,0.4,1);\n  float a0 = smoothstep(e0,e1,x_1101081466);\n  return mix(v0,v1,a0)*step(e0,x_1101081466)*step(x_1101081466,e1);\n}\n\nvec4 autumn (float x_3652770500) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(1,0,0,1);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(1,1,0,1);\n  float a0 = smoothstep(e0,e1,x_3652770500);\n  return mix(v0,v1,a0)*step(e0,x_3652770500)*step(x_3652770500,e1);\n}\n\nvec4 winter (float x_1155565894) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,1,1);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(0,1,0.5019607843137255,1);\n  float a0 = smoothstep(e0,e1,x_1155565894);\n  return mix(v0,v1,a0)*step(e0,x_1155565894)*step(x_1155565894,e1);\n}\n\n// The texture (GL.LUMINANCE & Uint8Array).\nuniform sampler2D uBitmapTexture;\n\n// What are the dimensions of the texture (width, height)?\nuniform vec2 uTextureSize;\n\n// How many consecutive pixels should be aggregated together along each axis?\nuniform vec2 uAggSize;\n\n// What are the values of the color scale sliders?\nuniform vec2 uColorScaleRange;\n\n// The texture coordinate, varying (interpolated between values set by the vertex shader).\nvarying vec2 vTexCoord;\n\nvoid main(void) {\n  // Compute 1 pixel in texture coordinates\n  vec2 onePixel = vec2(1.0, 1.0) / uTextureSize;\n  \n  vec2 viewCoord = vec2(floor(vTexCoord.x * uTextureSize.x), floor(vTexCoord.y * uTextureSize.y));\n\n  // Compute (x % aggSizeX, y % aggSizeY).\n  // These values will be the number of values to the left / above the current position to consider.\n  vec2 modAggSize = vec2(-1.0 * mod(viewCoord.x, uAggSize.x), -1.0 * mod(viewCoord.y, uAggSize.y));\n\n  // Take the sum of values along each axis.\n  float intensitySum = 0.0;\n  vec2 offsetPixels = vec2(0.0, 0.0);\n\n  for(int i = 0; i < 16; i++) {\n    // Check to break outer loop early.\n    // Uniforms cannot be used as conditions in GLSL for loops.\n    if(float(i) >= uAggSize.y) {\n      // Done in the y direction.\n      break;\n    }\n\n    offsetPixels = vec2(offsetPixels.x, (modAggSize.y + float(i)) * onePixel.y);\n\n    for(int j = 0; j < 16; j++) {\n      // Check to break inner loop early.\n      // Uniforms cannot be used as conditions in GLSL for loops.\n      if(float(j) >= uAggSize.x) {\n        // Done in the x direction.\n        break;\n      }\n\n      offsetPixels = vec2((modAggSize.x + float(j)) * onePixel.x, offsetPixels.y);\n      intensitySum += texture2D(uBitmapTexture, vTexCoord + offsetPixels).r;\n    }\n  }\n  \n  // Compute the mean value.\n  float intensityMean = intensitySum / (uAggSize.x * uAggSize.y);\n  \n  // Re-scale using the color scale slider values.\n  float scaledIntensityMean = (intensityMean - uColorScaleRange[0]) / max(0.005, (uColorScaleRange[1] - uColorScaleRange[0]));\n\n  gl_FragColor = COLORMAP_FUNC(clamp(scaledIntensityMean, 0.0, 1.0));\n\n  geometry.uv = vTexCoord;\n  DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",$i={image:{type:"object",value:null,async:!0},colormap:{type:"string",value:"plasma",compare:!0},bounds:{type:"array",value:[1,0,0,1],compare:!0},aggSizeX:{type:"number",value:8,compare:!0},aggSizeY:{type:"number",value:8,compare:!0},colorScaleLo:{type:"number",value:0,compare:!0},colorScaleHi:{type:"number",value:1,compare:!0}},Ji=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(){return Object(u.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"_getShaders",value:function(e){var t=this;return this.props.extensions.forEach((function(n){e=Object(Vi.a)(e,n.getShaders.call(t,n))})),e}},{key:"getShaders",value:function(){var e=this.props.colormap,t=On.includes(e)?Wi.replace("COLORMAP_FUNC",e):Wi.replace("COLORMAP_FUNC","plasma");return this._getShaders({vs:"\n#define SHADER_NAME heatmap-bitmap-layer-vertex-shader\n\nattribute vec2 texCoords;\nattribute vec3 positions;\nattribute vec3 positions64Low;\n\nvarying vec2 vTexCoord;\n\nconst vec3 pickingColor = vec3(1.0, 0.0, 0.0);\n\nvoid main(void) {\n  geometry.worldPosition = positions;\n  geometry.uv = texCoords;\n  geometry.pickingColor = pickingColor;\n\n  gl_Position = project_position_to_clipspace(positions, positions64Low, vec3(0.0), geometry.position);\n  DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n  vTexCoord = texCoords;\n\n  vec4 color = vec4(0.0);\n  DECKGL_FILTER_COLOR(color, geometry);\n}\n",fs:t,modules:[gn.a,vn.a]})}},{key:"updateState",value:function(e){Object(Nt.a)(Object(Rt.a)(n.prototype),"updateState",this).call(this,e),this.loadTexture(this.props.image);var t=e.props,a=e.oldProps;if(t.colormap!==a.colormap){var r,o=this.context.gl;null===(r=this.state.model)||void 0===r||r.delete(),this.state.model=this._getModel(o),this.getAttributeManager().invalidateAll()}}},{key:"draw",value:function(e){var t=e.uniforms,n=this.state,a=n.bitmapTexture,r=n.model,o=this.props,i=o.aggSizeX,s=o.aggSizeY,l=o.colorScaleLo,c=o.colorScaleHi;a&&r&&r.setUniforms(Object.assign({},t,{uBitmapTexture:a,uTextureSize:[2048,2048],uAggSize:[i,s],uColorScaleRange:[l,c]})).draw()}},{key:"loadTexture",value:function(e){var t=this.context.gl;this.state.bitmapTexture&&this.state.bitmapTexture.delete(),e instanceof bn.a?this.setState({bitmapTexture:e}):e&&this.setState({bitmapTexture:new bn.a(t,{data:e,mipmaps:!1,parameters:qi,format:hn.default.LUMINANCE,dataFormat:hn.default.LUMINANCE,type:hn.default.UNSIGNED_BYTE,width:2048,height:2048})})}}]),n}(Bi.a);Ji.layerName="HeatmapBitmapLayer",Ji.defaultProps=$i;var Ki=Object(l.a)({},Bi.a.defaultProps,{image:{type:"object",value:null,async:!0},bounds:{type:"array",value:[1,0,0,1],compare:!0},desaturate:{type:"number",min:0,max:1,value:0},transparentColor:{type:"color",value:[0,0,0,0]},tintColor:{type:"color",value:[255,255,255]}}),Qi=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(){return Object(u.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"renderLayers",value:function(){var e=this.props.image;return new Bi.a(this.props,{id:"".concat(this.props.id,"-wrapped"),image:e,textureParameters:qi})}}]),n}(ji.a);Qi.layerName="PixelatedBitmapLayer",Qi.defaultProps=Ki;var es=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(){return Object(u.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"_renderAxisTopLayers",value:function(){var e=this.props,t=e.axisTopLabelData,n=e.matrixLeft,a=e.width,r=e.matrixWidth,o=e.viewWidth,i=e.theme,s=e.targetX,l=e.targetY,c=e.axisTopTitle,p=e.cellWidth>=9,u=l+(e.axisOffsetTop-3)/2/e.scaleFactor;return[new xi.a({id:"axisTopLabels",coordinateSystem:Yt.a.CARTESIAN,data:t,getText:function(e){return e[1]},getPosition:function(e){return[n+(e[0]+.5)/a*r,u]},getTextAnchor:"start",getColor:function(){return Yi[i]},getSize:p?9:0,getAngle:75,fontFamily:Ui,updateTriggers:{getPosition:[u,n,r,o],getSize:[p],getColor:[i]}}),new xi.a({id:"axisTopTitle",coordinateSystem:Yt.a.CARTESIAN,data:[{title:c}],getText:function(e){return e.title},getPosition:[s,l],getTextAnchor:"middle",getColor:function(){return Yi[i]},getSize:p?0:15,getAngle:0,fontFamily:Ui,updateTriggers:{getSize:[p],getColor:[i]}})]}},{key:"_renderAxisLeftLayers",value:function(){var e=this.props,t=e.axisLeftLabelData,n=e.matrixTop,a=e.height,r=e.matrixHeight,o=e.viewHeight,i=e.theme,s=e.axisLeftTitle,l=e.targetX,c=e.targetY,p=e.cellHeight>=9,u=l+(e.axisOffsetLeft-3)/2/e.scaleFactor;return[new xi.a({id:"axisLeftLabels",coordinateSystem:Yt.a.CARTESIAN,data:t,getText:function(e){return e[1]},getPosition:function(e){return[u,n+(e[0]+.5)/a*r]},getTextAnchor:"end",getColor:function(){return Yi[i]},getSize:p?9:0,getAngle:0,fontFamily:Ui,updateTriggers:{getPosition:[u,n,r,o],getSize:[p],getColor:[i]}}),new xi.a({id:"axisLeftTitle",coordinateSystem:Yt.a.CARTESIAN,data:[{title:s}],getText:function(e){return e.title},getPosition:[l,c],getTextAnchor:"middle",getColor:function(){return Yi[i]},getSize:p?0:15,getAngle:90,fontFamily:Ui,updateTriggers:{getSize:[p],getColor:[i]}})]}},{key:"renderLayers",value:function(){return[this._renderAxisTopLayers(),this._renderAxisLeftLayers()]}}]),n}(ji.a);es.layerName="HeatmapCompositeTextLayer";var ts=n(1284);function ns(e,t){return e&&e.length&&t(e[0][1])?Object(ts.a)().x((function(e){return t(e[1])[0]})).y((function(e){return t(e[1])[1]})).addAll(e):null}var as=n(1290),rs=n(582),os=n(581);function is(){return(is=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}function ss(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var ls=i.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),cs=i.createElement("path",{d:"M21 3L3 10.53v.98l6.84 2.65L12.48 21h.98L21 3z"});function ps(e){var t=e.svgRef,n=e.title,a=e.titleId,r=ss(e,["svgRef","title","titleId"]);return i.createElement("svg",is({width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":a},r),n?i.createElement("title",{id:a},n):null,ls,cs)}var us=i.forwardRef((function(e,t){return i.createElement(ps,is({svgRef:t},e))}));n.p;function ds(){return(ds=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}function ms(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var fs=i.createElement("path",{d:"       M19 19h2v2h-2v-2zm0-2h2v-2h-2v2z       M3 13h2v-2H3v2zm0 4h2v-2H3v2z       m0-8h2V7H3v2zm0-4h2V3H3v2z       m4 0h2V3H7v2zm8 16h2v-2h-2v2z       m-4 0h2v-2h-2v2z       m4 0h2v-2h-2v2z       m-8 0h2v-2H7v2z       m-4 0h2v-2H3v2z       M11 5h2v-2h-2v2z       M15 5h2v-2h-2v2z       M19 5h2v-2h-2v2z       M19 9h2v-2h-2v2z       M19 13h2v-2h-2v2z     "});function ys(e){var t=e.svgRef,n=e.title,a=e.titleId,r=ms(e,["svgRef","title","titleId"]);return i.createElement("svg",ds({width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":a},r),n?i.createElement("title",{id:a},n):null,fs)}var hs=i.forwardRef((function(e,t){return i.createElement(ys,ds({svgRef:t},e))}));n.p;function gs(){return(gs=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}function vs(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function bs(e){var t=e.svgRef,n=e.title,a=e.titleId,r=vs(e,["svgRef","title","titleId"]);return i.createElement("svg",gs({width:24,height:24,viewBox:"0 0 24 24",ref:t,"aria-labelledby":a},r),n?i.createElement("title",{id:a},n):null,i.createElement("g",{transform:"translate(0,3)"},i.createElement("path",{style:{strokeWidth:.343565},d:"M 23.942314,4.6958443 C 23.446206,1.8868581 19.727461,0 14.687364,0 13.437819,0 12.150138,0.11543779 10.859708,0.34287772 4.1629423,1.5250844 -0.58168816,5.2884937 0.05768601,8.911385 c 0.25355086,1.439193 1.35605049,2.63583 3.04638949,3.461072 -0.2569865,0.387198 -0.4074679,0.826617 -0.4074679,1.29524 0,1.337498 1.1863293,2.457176 2.7639791,2.728248 l -1.3615475,2.333149 c -0.1576963,0.271073 -0.066308,0.61876 0.2047647,0.776457 0.090014,0.05291 0.1886171,0.07799 0.2858459,0.07799 0.1951448,0 0.3851362,-0.100665 0.4912977,-0.281723 l 1.6803757,-2.88148 C 8.41868,16.20561 9.6895264,15.063601 9.6998333,13.683844 c 6.872e-4,-0.0055 0.00137,-0.01065 0.00137,-0.01615 0,-0.02336 -0.00344,-0.04569 -0.00481,-0.06837 1.1292977,-0.0213 2.2847067,-0.130211 3.4435507,-0.334975 6.69711,-1.181863 11.44174,-4.9456164 10.802366,-8.5685077 z M 3.83312,13.667353 c 0,-0.30749 0.1281497,-0.59849 0.3470005,-0.848261 0.1219655,0.04295 0.2456489,0.08383 0.3717372,0.123339 l 1.2234344,2.352045 C 4.6865351,15.149835 3.83312,14.46408 3.83312,13.667353 Z M 7.0141869,15.216144 6.0223152,13.309702 5.4008064,12.114097 c 0.121622,-0.03161 0.2477103,-0.05634 0.3772342,-0.07387 0.1367388,-0.0189 0.2772568,-0.02886 0.420867,-0.02886 0.5067581,0 0.980534,0.11956 1.3701366,0.317454 0.5696305,0.289968 0.9554538,0.750345 0.9904974,1.262944 0.00137,0.02542 0.0055,0.05016 0.0055,0.07593 0,0.698124 -0.6562089,1.310356 -1.5508518,1.548447 z m 5.9185921,-3.126441 c -1.217251,0.214728 -2.429691,0.323982 -3.6060571,0.324669 -0.5765018,-0.911821 -1.7614569,-1.53917 -3.1278143,-1.53917 -0.4717146,0 -0.921441,0.07593 -1.332001,0.211292 -0.3061162,0.100665 -0.5878394,0.237403 -0.8427645,0.39991 C 2.4598914,10.828133 1.4360682,9.8579062 1.2319907,8.7035283 0.72660678,5.8381974 5.2307418,2.5475333 11.067221,1.5175259 c 1.222061,-0.2161023 2.439998,-0.3246688 3.620143,-0.3246688 4.371863,0 7.694479,1.5250844 8.080645,3.7101568 0.505041,2.8653309 -3.998751,6.1566821 -9.83523,7.1866891 z",id:"path10"})))}var xs=i.forwardRef((function(e,t){return i.createElement(bs,gs({svgRef:t},e))}));n.p;function Os(e){var t=e.alt,n=e.onClick,a=e.isActive,r=e.children,o="btn btn-outline-secondary mr-2 icon",i="".concat(o," active");return s.a.createElement("button",{className:a?i:o,onClick:n,type:"button",title:t},r)}function js(e){var t=e.setActiveTool,n=e.activeTool,a=e.visibleTools,r=void 0===a?{pan:!0,selectRectangle:!0,selectLasso:!0}:a;return s.a.createElement("div",{className:"tool"},r.pan&&s.a.createElement(Os,{alt:"pointer tool",onClick:function(){return t(null)},isActive:null===n},s.a.createElement(us,null)),r.selectRectangle?s.a.createElement(Os,{alt:"select rectangle",onClick:function(){return t(Ii.SELECTION_TYPE.RECTANGLE)},isActive:n===Ii.SELECTION_TYPE.RECTANGLE},s.a.createElement(hs,null)):null,r.selectLasso?s.a.createElement(Os,{alt:"select lasso",onClick:function(){return t(Ii.SELECTION_TYPE.POLYGON)},isActive:n===Ii.SELECTION_TYPE.POLYGON},s.a.createElement(xs,null)):null)}var Es=function(){return"crosshair"},Ss=function(e){return e.isDragging?"grabbing":"default"},Cs=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(e){var a;return Object(u.a)(this,n),(a=t.call(this,e)).state={gl:null,tool:null},a.viewport=null,a.onViewStateChange=a.onViewStateChange.bind(Object(To.a)(a)),a.onInitializeViewInfo=a.onInitializeViewInfo.bind(Object(To.a)(a)),a.onWebGLInitialized=a.onWebGLInitialized.bind(Object(To.a)(a)),a.onToolChange=a.onToolChange.bind(Object(To.a)(a)),a.onHover=a.onHover.bind(Object(To.a)(a)),a}return Object(d.a)(n,[{key:"onViewStateChange",value:function(e){var t=e.viewState,n=this.props,a=n.setViewState,r=n.viewState,o=n.layers,i=n.spatialAxisFixed,s=null===o||void 0===o?void 0:o.some((function(e){return e.use3d}));a(Object(l.a)({},t,{target:i&&s?r.target:t.target}))}},{key:"onInitializeViewInfo",value:function(e){var t=e.viewport;this.viewport=t}},{key:"onWebGLInitialized",value:function(e){this.setState({gl:e})}},{key:"onToolChange",value:function(e){var t=this.props.onToolChange;this.setState({tool:e}),t&&t(e)}},{key:"getLayers",value:function(){return[]}},{key:"onHover",value:function(e){var t=e.coordinate,n=e.sourceLayer,a=e.tile,r=this.props,o=r.setCellHighlight,i=r.cellHighlight,s=r.setComponentHover,l=(r.layers||[]).some((function(e){return"bitmask"===e.type}));if(!o||!a)return null;if(!n||!t)return i&&l&&o(null),null;var c=a.content,p=a.bbox,u=a.z;if(!c)return i&&l&&o(null),null;var d=c.data,m=c.width,f=c.height,y=p.left,h=p.right,g=p.top,v=p.bottom,b=[y,d.height<n.tileSize?f:v,d.width<n.tileSize?m:h,g];if(!d)return i&&l&&o(null),null;if(n.id.includes("bitmask")){var x=Math.max(1,Math.pow(2,Math.round(-u))),O=[Math.floor((t[0]-b[0])/x),Math.floor((t[1]-b[3])/x)],j=O[1]*m+O[0],E=d.map((function(e){return e[j]})).find((function(e){return e>0}));E!==Number(i)&&(s&&s(),o(E?String(E):null))}}},{key:"viewInfoDidUpdate",value:function(e){var t=this.props,n=t.updateViewInfo,a=t.cells,r=t.uuid,i=this.viewport;n&&i&&n({uuid:r,project:function(t){var n=a[t];try{var r=e(n),s=Object(o.a)(r,2),l=s[0],c=s[1];return i.project([l,c])}catch(p){return[null,null]}}})}},{key:"componentDidUpdate",value:function(){}},{key:"render",value:function(){var e=this.props,t=e.deckRef,n=e.viewState,a=e.uuid,r=e.layers,o=this.state,i=o.gl,l=o.tool,c=this.getLayers(),p=(r||[]).some((function(e){return e.use3d})),u=null!==this.cellsLayer||this.cellsEntries.length&&this.cellsEntries[0][1].xy,d=null!==this.cellsLayer||r.findIndex((function(e){return"bitmask"===e.type||"raster"===e.type}))>=0,m=this.cellsEntries.length<1e5&&!p;return s.a.createElement(s.a.Fragment,null,s.a.createElement(js,{activeTool:l,setActiveTool:this.onToolChange,visibleTools:{pan:d,selectRectangle:u,selectLasso:u}}),s.a.createElement(as.a,{id:"deckgl-overlay-".concat(a),ref:t,views:[p?new rs.a({id:"orbit",controller:!0,orbitAxis:"Y"}):new os.a({id:"ortho"})],layers:i&&n.target.slice(0,2).every((function(e){return"number"===typeof e}))?c:[],glOptions:an,onWebGLInitialized:this.onWebGLInitialized,onViewStateChange:this.onViewStateChange,viewState:n,useDevicePixels:m,controller:!l||{dragPan:!1},getCursor:l?Es:Ss,onHover:this.onHover},this.onInitializeViewInfo))}}]),n}(i.PureComponent);function _s(e){return function(){return e}}function Ts(e){return e+1e-6*(Math.random()-.5)}var ws=n(579),Ls={name:"scaled-expression",vs:"\nvec4 plasma (float x_1648624884) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.050980392156862744,0.03137254901960784,0.5294117647058824,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.29411764705882354,0.011764705882352941,0.6313725490196078,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.49019607843137253,0.011764705882352941,0.6588235294117647,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.6588235294117647,0.13333333333333333,0.5882352941176471,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.796078431372549,0.27450980392156865,0.4745098039215686,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.8980392156862745,0.4196078431372549,0.36470588235294116,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.9725490196078431,0.5803921568627451,0.2549019607843137,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.9921568627450981,0.7647058823529411,0.1568627450980392,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9411764705882353,0.9764705882352941,0.12941176470588237,1);\n  float a0 = smoothstep(e0,e1,x_1648624884);\n  float a1 = smoothstep(e1,e2,x_1648624884);\n  float a2 = smoothstep(e2,e3,x_1648624884);\n  float a3 = smoothstep(e3,e4,x_1648624884);\n  float a4 = smoothstep(e4,e5,x_1648624884);\n  float a5 = smoothstep(e5,e6,x_1648624884);\n  float a6 = smoothstep(e6,e7,x_1648624884);\n  float a7 = smoothstep(e7,e8,x_1648624884);\n  return max(mix(v0,v1,a0)*step(e0,x_1648624884)*step(x_1648624884,e1),\n    max(mix(v1,v2,a1)*step(e1,x_1648624884)*step(x_1648624884,e2),\n    max(mix(v2,v3,a2)*step(e2,x_1648624884)*step(x_1648624884,e3),\n    max(mix(v3,v4,a3)*step(e3,x_1648624884)*step(x_1648624884,e4),\n    max(mix(v4,v5,a4)*step(e4,x_1648624884)*step(x_1648624884,e5),\n    max(mix(v5,v6,a5)*step(e5,x_1648624884)*step(x_1648624884,e6),\n    max(mix(v6,v7,a6)*step(e6,x_1648624884)*step(x_1648624884,e7),mix(v7,v8,a7)*step(e7,x_1648624884)*step(x_1648624884,e8)\n  )))))));\n}\n\nvec4 viridis (float x_686877309) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.26666666666666666,0.00392156862745098,0.32941176470588235,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.2784313725490196,0.17254901960784313,0.47843137254901963,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.23137254901960785,0.3176470588235294,0.5450980392156862,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.17254901960784313,0.44313725490196076,0.5568627450980392,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.12941176470588237,0.5647058823529412,0.5529411764705883,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.15294117647058825,0.6784313725490196,0.5058823529411764,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.3607843137254902,0.7843137254901961,0.38823529411764707,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.6666666666666666,0.8627450980392157,0.19607843137254902,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9921568627450981,0.9058823529411765,0.1450980392156863,1);\n  float a0 = smoothstep(e0,e1,x_686877309);\n  float a1 = smoothstep(e1,e2,x_686877309);\n  float a2 = smoothstep(e2,e3,x_686877309);\n  float a3 = smoothstep(e3,e4,x_686877309);\n  float a4 = smoothstep(e4,e5,x_686877309);\n  float a5 = smoothstep(e5,e6,x_686877309);\n  float a6 = smoothstep(e6,e7,x_686877309);\n  float a7 = smoothstep(e7,e8,x_686877309);\n  return max(mix(v0,v1,a0)*step(e0,x_686877309)*step(x_686877309,e1),\n    max(mix(v1,v2,a1)*step(e1,x_686877309)*step(x_686877309,e2),\n    max(mix(v2,v3,a2)*step(e2,x_686877309)*step(x_686877309,e3),\n    max(mix(v3,v4,a3)*step(e3,x_686877309)*step(x_686877309,e4),\n    max(mix(v4,v5,a4)*step(e4,x_686877309)*step(x_686877309,e5),\n    max(mix(v5,v6,a5)*step(e5,x_686877309)*step(x_686877309,e6),\n    max(mix(v6,v7,a6)*step(e6,x_686877309)*step(x_686877309,e7),mix(v7,v8,a7)*step(e7,x_686877309)*step(x_686877309,e8)\n  )))))));\n}\n\nvec4 greys (float x_3692066534) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0,1);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(1,1,1,1);\n  float a0 = smoothstep(e0,e1,x_3692066534);\n  return mix(v0,v1,a0)*step(e0,x_3692066534)*step(x_3692066534,e1);\n}\n\nvec4 magma (float x_652973032) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0.01568627450980392,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.10980392156862745,0.06274509803921569,0.26666666666666666,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.30980392156862746,0.07058823529411765,0.4823529411764706,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.5058823529411764,0.1450980392156863,0.5058823529411764,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.7098039215686275,0.21176470588235294,0.47843137254901963,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.8980392156862745,0.3137254901960784,0.39215686274509803,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.984313725490196,0.5294117647058824,0.3803921568627451,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.996078431372549,0.7607843137254902,0.5294117647058824,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9882352941176471,0.9921568627450981,0.7490196078431373,1);\n  float a0 = smoothstep(e0,e1,x_652973032);\n  float a1 = smoothstep(e1,e2,x_652973032);\n  float a2 = smoothstep(e2,e3,x_652973032);\n  float a3 = smoothstep(e3,e4,x_652973032);\n  float a4 = smoothstep(e4,e5,x_652973032);\n  float a5 = smoothstep(e5,e6,x_652973032);\n  float a6 = smoothstep(e6,e7,x_652973032);\n  float a7 = smoothstep(e7,e8,x_652973032);\n  return max(mix(v0,v1,a0)*step(e0,x_652973032)*step(x_652973032,e1),\n    max(mix(v1,v2,a1)*step(e1,x_652973032)*step(x_652973032,e2),\n    max(mix(v2,v3,a2)*step(e2,x_652973032)*step(x_652973032,e3),\n    max(mix(v3,v4,a3)*step(e3,x_652973032)*step(x_652973032,e4),\n    max(mix(v4,v5,a4)*step(e4,x_652973032)*step(x_652973032,e5),\n    max(mix(v5,v6,a5)*step(e5,x_652973032)*step(x_652973032,e6),\n    max(mix(v6,v7,a6)*step(e6,x_652973032)*step(x_652973032,e7),mix(v7,v8,a7)*step(e7,x_652973032)*step(x_652973032,e8)\n  )))))));\n}\n\nvec4 jet (float x_799389509) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0.5137254901960784,1);\n  const float e1 = 0.125;\n  const vec4 v1 = vec4(0,0.23529411764705882,0.6666666666666666,1);\n  const float e2 = 0.375;\n  const vec4 v2 = vec4(0.0196078431372549,1,1,1);\n  const float e3 = 0.625;\n  const vec4 v3 = vec4(1,1,0,1);\n  const float e4 = 0.875;\n  const vec4 v4 = vec4(0.9803921568627451,0,0,1);\n  const float e5 = 1.0;\n  const vec4 v5 = vec4(0.5019607843137255,0,0,1);\n  float a0 = smoothstep(e0,e1,x_799389509);\n  float a1 = smoothstep(e1,e2,x_799389509);\n  float a2 = smoothstep(e2,e3,x_799389509);\n  float a3 = smoothstep(e3,e4,x_799389509);\n  float a4 = smoothstep(e4,e5,x_799389509);\n  return max(mix(v0,v1,a0)*step(e0,x_799389509)*step(x_799389509,e1),\n    max(mix(v1,v2,a1)*step(e1,x_799389509)*step(x_799389509,e2),\n    max(mix(v2,v3,a2)*step(e2,x_799389509)*step(x_799389509,e3),\n    max(mix(v3,v4,a3)*step(e3,x_799389509)*step(x_799389509,e4),mix(v4,v5,a4)*step(e4,x_799389509)*step(x_799389509,e5)\n  ))));\n}\n\nvec4 bone (float x_1404936397) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0,1);\n  const float e1 = 0.376;\n  const vec4 v1 = vec4(0.32941176470588235,0.32941176470588235,0.4549019607843137,1);\n  const float e2 = 0.753;\n  const vec4 v2 = vec4(0.6627450980392157,0.7843137254901961,0.7843137254901961,1);\n  const float e3 = 1.0;\n  const vec4 v3 = vec4(1,1,1,1);\n  float a0 = smoothstep(e0,e1,x_1404936397);\n  float a1 = smoothstep(e1,e2,x_1404936397);\n  float a2 = smoothstep(e2,e3,x_1404936397);\n  return max(mix(v0,v1,a0)*step(e0,x_1404936397)*step(x_1404936397,e1),\n    max(mix(v1,v2,a1)*step(e1,x_1404936397)*step(x_1404936397,e2),mix(v2,v3,a2)*step(e2,x_1404936397)*step(x_1404936397,e3)\n  ));\n}\n\nvec4 copper (float x_41650866) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0,1);\n  const float e1 = 0.804;\n  const vec4 v1 = vec4(1,0.6274509803921569,0.4,1);\n  const float e2 = 1.0;\n  const vec4 v2 = vec4(1,0.7803921568627451,0.4980392156862745,1);\n  float a0 = smoothstep(e0,e1,x_41650866);\n  float a1 = smoothstep(e1,e2,x_41650866);\n  return max(mix(v0,v1,a0)*step(e0,x_41650866)*step(x_41650866,e1),mix(v1,v2,a1)*step(e1,x_41650866)*step(x_41650866,e2)\n  );\n}\n\nvec4 density (float x_681601952) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.21176470588235294,0.054901960784313725,0.1411764705882353,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.34901960784313724,0.09019607843137255,0.3137254901960784,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.43137254901960786,0.17647058823529413,0.5176470588235295,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.47058823529411764,0.30196078431372547,0.6980392156862745,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.47058823529411764,0.44313725490196076,0.8352941176470589,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.45098039215686275,0.592156862745098,0.8941176470588236,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.5254901960784314,0.7254901960784313,0.8901960784313725,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.6941176470588235,0.8392156862745098,0.8901960784313725,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9019607843137255,0.9450980392156862,0.9450980392156862,1);\n  float a0 = smoothstep(e0,e1,x_681601952);\n  float a1 = smoothstep(e1,e2,x_681601952);\n  float a2 = smoothstep(e2,e3,x_681601952);\n  float a3 = smoothstep(e3,e4,x_681601952);\n  float a4 = smoothstep(e4,e5,x_681601952);\n  float a5 = smoothstep(e5,e6,x_681601952);\n  float a6 = smoothstep(e6,e7,x_681601952);\n  float a7 = smoothstep(e7,e8,x_681601952);\n  return max(mix(v0,v1,a0)*step(e0,x_681601952)*step(x_681601952,e1),\n    max(mix(v1,v2,a1)*step(e1,x_681601952)*step(x_681601952,e2),\n    max(mix(v2,v3,a2)*step(e2,x_681601952)*step(x_681601952,e3),\n    max(mix(v3,v4,a3)*step(e3,x_681601952)*step(x_681601952,e4),\n    max(mix(v4,v5,a4)*step(e4,x_681601952)*step(x_681601952,e5),\n    max(mix(v5,v6,a5)*step(e5,x_681601952)*step(x_681601952,e6),\n    max(mix(v6,v7,a6)*step(e6,x_681601952)*step(x_681601952,e7),mix(v7,v8,a7)*step(e7,x_681601952)*step(x_681601952,e8)\n  )))))));\n}\n\nvec4 inferno (float x_902288871) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0.01568627450980392,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.12156862745098039,0.047058823529411764,0.2823529411764706,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.3333333333333333,0.058823529411764705,0.42745098039215684,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.5333333333333333,0.13333333333333333,0.41568627450980394,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0.7294117647058823,0.21176470588235294,0.3333333333333333,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0.8901960784313725,0.34901960784313724,0.2,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0.9764705882352941,0.5490196078431373,0.0392156862745098,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.9764705882352941,0.788235294117647,0.19607843137254902,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.9882352941176471,1,0.6431372549019608,1);\n  float a0 = smoothstep(e0,e1,x_902288871);\n  float a1 = smoothstep(e1,e2,x_902288871);\n  float a2 = smoothstep(e2,e3,x_902288871);\n  float a3 = smoothstep(e3,e4,x_902288871);\n  float a4 = smoothstep(e4,e5,x_902288871);\n  float a5 = smoothstep(e5,e6,x_902288871);\n  float a6 = smoothstep(e6,e7,x_902288871);\n  float a7 = smoothstep(e7,e8,x_902288871);\n  return max(mix(v0,v1,a0)*step(e0,x_902288871)*step(x_902288871,e1),\n    max(mix(v1,v2,a1)*step(e1,x_902288871)*step(x_902288871,e2),\n    max(mix(v2,v3,a2)*step(e2,x_902288871)*step(x_902288871,e3),\n    max(mix(v3,v4,a3)*step(e3,x_902288871)*step(x_902288871,e4),\n    max(mix(v4,v5,a4)*step(e4,x_902288871)*step(x_902288871,e5),\n    max(mix(v5,v6,a5)*step(e5,x_902288871)*step(x_902288871,e6),\n    max(mix(v6,v7,a6)*step(e6,x_902288871)*step(x_902288871,e7),mix(v7,v8,a7)*step(e7,x_902288871)*step(x_902288871,e8)\n  )))))));\n}\n\nvec4 cool (float x_2444426143) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0.49019607843137253,0,0.7019607843137254,1);\n  const float e1 = 0.13;\n  const vec4 v1 = vec4(0.4549019607843137,0,0.8549019607843137,1);\n  const float e2 = 0.25;\n  const vec4 v2 = vec4(0.3843137254901961,0.2901960784313726,0.9294117647058824,1);\n  const float e3 = 0.38;\n  const vec4 v3 = vec4(0.26666666666666666,0.5725490196078431,0.9058823529411765,1);\n  const float e4 = 0.5;\n  const vec4 v4 = vec4(0,0.8,0.7725490196078432,1);\n  const float e5 = 0.63;\n  const vec4 v5 = vec4(0,0.9686274509803922,0.5725490196078431,1);\n  const float e6 = 0.75;\n  const vec4 v6 = vec4(0,1,0.34509803921568627,1);\n  const float e7 = 0.88;\n  const vec4 v7 = vec4(0.1568627450980392,1,0.03137254901960784,1);\n  const float e8 = 1.0;\n  const vec4 v8 = vec4(0.5764705882352941,1,0,1);\n  float a0 = smoothstep(e0,e1,x_2444426143);\n  float a1 = smoothstep(e1,e2,x_2444426143);\n  float a2 = smoothstep(e2,e3,x_2444426143);\n  float a3 = smoothstep(e3,e4,x_2444426143);\n  float a4 = smoothstep(e4,e5,x_2444426143);\n  float a5 = smoothstep(e5,e6,x_2444426143);\n  float a6 = smoothstep(e6,e7,x_2444426143);\n  float a7 = smoothstep(e7,e8,x_2444426143);\n  return max(mix(v0,v1,a0)*step(e0,x_2444426143)*step(x_2444426143,e1),\n    max(mix(v1,v2,a1)*step(e1,x_2444426143)*step(x_2444426143,e2),\n    max(mix(v2,v3,a2)*step(e2,x_2444426143)*step(x_2444426143,e3),\n    max(mix(v3,v4,a3)*step(e3,x_2444426143)*step(x_2444426143,e4),\n    max(mix(v4,v5,a4)*step(e4,x_2444426143)*step(x_2444426143,e5),\n    max(mix(v5,v6,a5)*step(e5,x_2444426143)*step(x_2444426143,e6),\n    max(mix(v6,v7,a6)*step(e6,x_2444426143)*step(x_2444426143,e7),mix(v7,v8,a7)*step(e7,x_2444426143)*step(x_2444426143,e8)\n  )))))));\n}\n\nvec4 hot (float x_1123650753) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,0,1);\n  const float e1 = 0.3;\n  const vec4 v1 = vec4(0.9019607843137255,0,0,1);\n  const float e2 = 0.6;\n  const vec4 v2 = vec4(1,0.8235294117647058,0,1);\n  const float e3 = 1.0;\n  const vec4 v3 = vec4(1,1,1,1);\n  float a0 = smoothstep(e0,e1,x_1123650753);\n  float a1 = smoothstep(e1,e2,x_1123650753);\n  float a2 = smoothstep(e2,e3,x_1123650753);\n  return max(mix(v0,v1,a0)*step(e0,x_1123650753)*step(x_1123650753,e1),\n    max(mix(v1,v2,a1)*step(e1,x_1123650753)*step(x_1123650753,e2),mix(v2,v3,a2)*step(e2,x_1123650753)*step(x_1123650753,e3)\n  ));\n}\n\nvec4 spring (float x_3460271019) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(1,0,1,1);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(1,1,0,1);\n  float a0 = smoothstep(e0,e1,x_3460271019);\n  return mix(v0,v1,a0)*step(e0,x_3460271019)*step(x_3460271019,e1);\n}\n\nvec4 summer (float x_1787574999) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0.5019607843137255,0.4,1);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(1,1,0.4,1);\n  float a0 = smoothstep(e0,e1,x_1787574999);\n  return mix(v0,v1,a0)*step(e0,x_1787574999)*step(x_1787574999,e1);\n}\n\nvec4 autumn (float x_204634793) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(1,0,0,1);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(1,1,0,1);\n  float a0 = smoothstep(e0,e1,x_204634793);\n  return mix(v0,v1,a0)*step(e0,x_204634793)*step(x_204634793,e1);\n}\n\nvec4 winter (float x_4071283602) {\n  const float e0 = 0.0;\n  const vec4 v0 = vec4(0,0,1,1);\n  const float e1 = 1.0;\n  const vec4 v1 = vec4(0,1,0.5019607843137255,1);\n  float a0 = smoothstep(e0,e1,x_4071283602);\n  return mix(v0,v1,a0)*step(e0,x_4071283602)*step(x_4071283602,e1);\n}\n\n// Custom attributes for Vitessce:\nattribute float expressionValue;\n\n// Custom uniforms for Vitessce:\nuniform vec2 uColorScaleRange;\nuniform bool uIsExpressionMode;\n\n",inject:{"vs:DECKGL_FILTER_COLOR":"\n    if(uIsExpressionMode) {\n      float normalizedExpressionValue = expressionValue / 255.0;\n      float scaledExpressionValue = (normalizedExpressionValue - uColorScaleRange[0]) / max(0.005, (uColorScaleRange[1] - uColorScaleRange[0]));\n      color.rgb = COLORMAP_FUNC(clamp(scaledExpressionValue, 0.0, 1.0)).rgb;\n    }\n  "}},Ps={colormap:{type:"string",value:"plasma",compare:!0},colorScaleLo:{type:"number",value:0,compare:!0},colorScaleHi:{type:"number",value:1,compare:!0},isExpressionMode:!1,getExpressionValue:{type:"accessor",value:0},getSelectionState:{type:"accessor",value:0}},Is=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(){return Object(u.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"getShaders",value:function(){var e=this.props.colormap;return{modules:[Ls],defines:Object(c.a)({},"COLORMAP_FUNC",On.includes(e)?e:"plasma")}}},{key:"updateState",value:function(e){var t=e.props,n=e.oldProps;if(t.colormap!==n.colormap){var a=this.context.gl;if(this.state.model){var r;null===(r=this.state.model)||void 0===r||r.delete(),this.state.model=this._getModel(a)}else{var o,i,s;if(this.state.models)null===(o=this.state.models)||void 0===o||o.forEach((function(e){return null===e||void 0===e?void 0:e.delete()}));if(this.state.topModel)null===(i=this.state.topModel)||void 0===i||i.delete();if(this.state.sideModel)null===(s=this.state.sideModel)||void 0===s||s.delete();this._getModels&&this.setState(this._getModels(this.context.gl))}this.getAttributeManager()&&this.getAttributeManager().invalidateAll()}}},{key:"initializeState",value:function(){if(!this.getCurrentLayer().isComposite){var e=this.getAttributeManager();e&&e.add({expressionValue:{type:hn.default.FLOAT,size:1,transition:!0,accessor:"getExpressionValue",defaultValue:1,divisor:Object.values(e.attributes)[0].settings.divisor}})}}},{key:"draw",value:function(){var e=this.props,t=e.colorScaleLo,n=e.colorScaleHi,a=e.isExpressionMode,r=this.state,o=r.topModel,i=r.sideModel,s=r.models,l=r.model,c={uColorScaleRange:[t,n],uIsExpressionMode:a};null===l||void 0===l||l.setUniforms(c),null===s||void 0===s||s.forEach((function(e){return e.setUniforms(c)})),null===o||void 0===o||o.setUniforms(c),null===i||void 0===i||i.setUniforms(c)}}]),n}(ws.a);Is.extensionName="ScaledExpressionExtension",Is.defaultProps=Ps;var As=Is,ks={name:"selection",vs:"\nattribute float isSelected;\n",inject:{"vs:DECKGL_FILTER_GL_POSITION":"\n    position.z += (1. - isSelected) * .00005; // Add a small z offset for unselected points in the positive direction i.e into the screen.\n  ","fs:#main-start":" // Gets rid of bad border effects (active after deck.gl 8.5): https://github.com/visgl/deck.gl/pull/6081\n    float distToCenterNew = length(unitPosition) * outerRadiusPixels;\n    float inCircleNew = step(distToCenterNew, outerRadiusPixels);\n    if (inCircleNew == 0.0) {\n      discard;\n    }\n  "}},Rs=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(){return Object(u.a)(this,n),t.apply(this,arguments)}return Object(d.a)(n,[{key:"getShaders",value:function(){return{modules:[ks]}}},{key:"initializeState",value:function(e,t){var n=this.getAttributeManager();n&&n.add({isSelected:{type:hn.default.FLOAT,size:1,transition:!0,accessor:"getCellIsSelected",defaultValue:1,divisor:Number(t.opts.instanced)}})}}]),n}(ws.a);Rs.extensionName="SelectionExtension";var Ns=Rs,Ms=function(e){return function(t){var n=t[1].mappings;if(!(e in n)){var a=Object.keys(n).map((function(e){return'"'.concat(e,'"')})).join(", ");throw new Error('Expected to find "'.concat(e,'", but available mappings are: ').concat(a))}var r=n[e];return[r[0],-r[1],0]}},Ds=function(e){return function(t){return t.mappings[e]}},Gs=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(e){var a;return Object(u.a)(this,n),(a=t.call(this,e)).cellsEntries=[],a.cellsQuadTree=null,a.cellsLayer=null,a.cellSetsForceSimulation=function(){var e,t,n,a=1,r=1,o=_s([0,0]);function i(e){return e.x+e.vx+n[e.index][0]/2}function s(e){return e.y+e.vy+n[e.index][1]/2}function l(e){if(e.data)e.size=n[e.data.index];else{e.size=[0,0];for(var t=0;t<4;t++)e[t]&&e[t].size&&(e.size[0]=Math.max(e.size[0],e[t].size[0]),e.size[1]=Math.max(e.size[1],e[t].size[1]))}}function c(){var o,c,p,u,d,m=Object(ts.a)(e,i,s).visitAfter(l);function f(e,n,r,l,m){var f=e.data,y=(c[0]+e.size[0])/2,h=(c[1]+e.size[1])/2;if(f&&f.index>o.index){var g=Ts(u-i(f)),v=Ts(d-s(f)),b=Math.abs(g)-y,x=Math.abs(v)-h;if(b<0&&x<0){var O=Math.sqrt(g*g+v*v),j=t[f.index]/(p+t[f.index]);Math.abs(b)<Math.abs(x)?(o.vx-=(g*=b/O*a)*j,f.vx+=g*(1-j)):(o.vy-=(v*=x/O*a)*j,f.vy+=v*(1-j))}return n>u+y||l<u-y||r>d+h||m<d-h}return!1}function y(){for(var a=0;a<e.length;a++)o=e[a],c=n[a],p=t[a],u=i(o),d=s(o),m.visit(f)}for(var h=0;h<r;h++)y()}return c.initialize=function(a){n=(e=a).map(o),t=n.map((function(e){return e[0]+e[1]}))},c.iterations=function(){return arguments.length?(r=+(arguments.length<=0?void 0:arguments[0]),c):r},c.strength=function(){return arguments.length?(a=+(arguments.length<=0?void 0:arguments[0]),c):a},c.size=function(){return arguments.length?(o="function"===typeof(arguments.length<=0?void 0:arguments[0])?arguments.length<=0?void 0:arguments[0]:_s(arguments.length<=0?void 0:arguments[0]),c):o},c}(),a.cellSetsLabelPrevZoom=null,a.cellSetsLayers=[],a.onUpdateCellsData(),a.onUpdateCellsLayer(),a.onUpdateCellSetsLayers(),a}return Object(d.a)(n,[{key:"createCellsLayer",value:function(){var e=this.cellsEntries,t=this.props,n=t.theme,a=t.mapping,r=t.getCellPosition,i=void 0===r?Ms(a):r,s=t.cellRadius,c=void 0===s?1:s,p=t.cellOpacity,u=void 0===p?1:p,d=t.cellFilter,m=t.cellSelection,f=t.setCellHighlight,y=t.setComponentHover,h=t.getCellIsSelected,g=t.cellColors,v=t.getCellColor,b=void 0===v?function(e,t){return function(n){var a=e&&e.get(n[0])||Qt(t),r=Object(o.a)(a,4);return[r[0],r[1],r[2],255*(r[3]||1)]}}(g,n):v,x=t.getExpressionValue,O=t.onCellClick,j=t.geneExpressionColormap,E=t.geneExpressionColormapRange,S=void 0===E?[0,1]:E,C=t.cellColorEncoding,_=d?e.filter((function(e){return d.includes(e[0])})):e;return new vi.a(Object(l.a)({id:"scatterplot",backgroundColor:"dark"===n?[0,0,0]:[241,241,241],getCellIsSelected:h,opacity:u,radiusScale:c,radiusMinPixels:1,radiusMaxPixels:30,radiusUnits:"pixels",lineWidthUnits:"pixels",getPosition:i,getFillColor:b,getLineColor:b,getRadius:1,getExpressionValue:x,getLineWidth:0,extensions:[new As,new Ns({instanced:!0})],colorScaleLo:S[0],colorScaleHi:S[1],isExpressionMode:"geneSelection"===C,colormap:j,onClick:function(e){O&&O(e)},updateTriggers:{getExpressionValue:x,getFillColor:[C,m,g],getLineColor:[C,m,g],getCellIsSelected:h}},$t(_,void 0,f,y),{stroked:0}))}},{key:"createCellSetsLayers",value:function(){var e=this.props,t=e.theme,n=e.cellSetPolygons,a=e.viewState,r=e.cellSetPolygonsVisible,o=e.cellSetLabelsVisible,i=e.cellSetLabelSize,s=[];if(r&&s.push(new bi.a({id:"cell-sets-polygon-layer",data:n,stroked:!0,filled:!1,wireframe:!0,lineWidthMaxPixels:1,getPolygon:function(e){return e.hull},getLineColor:function(e){return e.color},getLineWidth:1})),o){var l=a.zoom,c=n.map((function(e){return{x:e.centroid[0],y:e.centroid[1],label:e.name}})),p=this.cellSetsForceSimulation.size((function(e){return[1*i/Math.pow(2,l)*4*e.label.length,1*i/Math.pow(2,l)*1.5]}));Object(Oi.a)().nodes(c).force("collision",p).tick(100),s.push(new xi.a({id:"cell-sets-text-layer",data:c,getPosition:function(e){return[e.x,e.y]},getText:function(e){return e.label},getColor:"dark"===t?[255,255,255]:[0,0,0],getSize:i,getAngle:0,getTextAnchor:"middle",getAlignmentBaseline:"center",fontFamily:"-apple-system, 'Helvetica Neue', Arial, sans-serif",fontWeight:"normal"}))}return s}},{key:"createSelectionLayers",value:function(){var e=this.props,t=e.viewState,n=e.mapping,a=e.getCellCoords,r=void 0===a?Ds(n):a,o=e.setCellSelection,i=this.state.tool,s=this.cellsQuadTree;return Xi(i,t.zoom,"scatterplot",r,o,s,!0)}},{key:"getLayers",value:function(){var e=this.cellsLayer,t=this.cellSetsLayers;return[e].concat(Object(p.a)(t),Object(p.a)(this.createSelectionLayers()))}},{key:"onUpdateCellsData",value:function(){var e=this.props,t=e.cells,n=void 0===t?{}:t,a=e.mapping,r=e.getCellCoords,o=void 0===r?Ds(a):r,i=Object.entries(n);this.cellsEntries=i,this.cellsQuadTree=ns(i,o)}},{key:"onUpdateCellsLayer",value:function(){this.cellsLayer=this.createCellsLayer()}},{key:"onUpdateCellSetsLayers",value:function(e){if(e){var t=this.props,n=t.viewState,a=t.cellSetLabelsVisible,r=n.zoom,o=this.cellSetsLabelPrevZoom;a&&(null===o||Math.abs(o-r)>.25)&&(this.cellSetsLayers=this.createCellSetsLayers(),this.cellSetsLabelPrevZoom=r)}else this.cellSetsLayers=this.createCellSetsLayers()}},{key:"viewInfoDidUpdate",value:function(){var e=this.props,t=e.mapping,a=e.getCellPosition,r=void 0===a?Ms(t):a;Object(Nt.a)(Object(Rt.a)(n.prototype),"viewInfoDidUpdate",this).call(this,(function(e){return r([null,e])}))}},{key:"componentDidUpdate",value:function(e){var t=this;this.viewInfoDidUpdate();var n=function(n){return e[n]!==t.props[n]};["cells"].some(n)&&(this.onUpdateCellsData(),this.forceUpdate()),["cells","cellFilter","cellSelection","cellColors","cellRadius","cellOpacity","cellRadiusMode","geneExpressionColormap","geneExpressionColormapRange","geneSelection","cellColorEncoding"].some(n)&&(this.onUpdateCellsLayer(),this.forceUpdate()),["cellSetPolygons","cellSetPolygonsVisible","cellSetLabelsVisible","cellSetLabelSize"].some(n)&&(this.onUpdateCellSetsLayers(!1),this.forceUpdate()),n("viewState")&&(this.onUpdateCellSetsLayers(!0),this.forceUpdate())}}]),n}(Cs),zs=Object(i.forwardRef)((function(e,t){return s.a.createElement(Gs,Object.assign({},e,{deckRef:t}))})),Hs=Object(ve.a)((function(){return{tooltipAnchor:{position:"relative",width:"0px",height:"0px",pointerEvents:"none",userSelect:"none"},tooltipContent:{opacity:.9,padding:"5px",pointerEvents:"none","& table > tbody > tr > th, & table > tbody > tr > td":{fontSize:"80%",opacity:.8,outline:0,padding:"0 2px"},"& table":{borderCollapse:"collapse"}}}}));function Fs(e){var t=e.x,n=e.y,a=e.parentWidth,r=e.parentHeight,l=e.children,c=Object(i.useRef)(),p=Hs(),u=Object(i.useState)("start"),d=Object(o.a)(u,2),m=d[0],f=d[1],y=Object(i.useState)("bottom"),h=Object(o.a)(y,2),g=h[0],v=h[1],b=$a(c);return Object(i.useEffect)((function(){if(c&&c.current){var e=t>a/2,o=n>r/2;f(e?"end":"start"),v(o?"top":"bottom"),c.current.style.left="".concat(t+(e?-20:5),"px"),c.current.style.top="".concat(n+(o?-20:5),"px")}}),[t,n,a,r]),s.a.createElement("div",{ref:c,className:p.tooltipAnchor},c&&c.current?s.a.createElement(Wr.a,{open:!0,anchorEl:c.current,container:b,transition:!0,placement:"".concat(g,"-").concat(m)},s.a.createElement(qr.a,{elevation:4,className:p.tooltipContent},l)):null)}function Xs(e){var t=e.parentUuid,n=e.sourceUuid,a=e.x,r=e.y,o=e.parentWidth,i=e.parentHeight,l=e.children;if(a<0||a>o||r<0||r>i)return null;var c=t===n;return s.a.createElement(s.a.Fragment,null,c?s.a.createElement(Fs,{x:a,y:r,parentWidth:o,parentHeight:i},l):s.a.createElement(s.a.Fragment,null,null!==a?s.a.createElement("div",{className:"cell-emphasis-crosshair",style:{left:"".concat(a-.5,"px"),top:0,width:"".concat(1,"px"),height:"".concat(i,"px")}}):null,null!==r?s.a.createElement("div",{className:"cell-emphasis-crosshair",style:{left:0,top:"".concat(r-.5,"px"),width:"".concat(o,"px"),height:"".concat(1,"px")}}):null))}function Zs(e){var t=e.info;return s.a.createElement("table",null,s.a.createElement("tbody",null,Object.entries(t).map((function(e){var t=Object(o.a)(e,2),n=t[0],a=t[1];return s.a.createElement("tr",{key:n},s.a.createElement("th",null,n),s.a.createElement("td",null,a))}))))}function Vs(e){var t=e.parentUuid,n=e.cellHighlight,a=e.width,r=e.height,i=e.getCellInfo,l=Je(),c=tt(t),u=n&&i?[i(n)].concat(Object(p.a)(c&&c.project?c.project(n):[null,null])):[null,null,null],d=Object(o.a)(u,3),m=d[0],f=d[1],y=d[2];return m?s.a.createElement(Xs,{x:f,y:y,parentUuid:t,sourceUuid:l,parentWidth:a,parentHeight:r},s.a.createElement(Zs,{info:m})):null}var Bs=n(1291),Ys=n(1299),Us=n(1262),qs=n(1261),Ws=Object(ve.a)((function(e){return{box:{boxSizing:"border-box"},checkbox:{padding:"3px",color:e.palette.primaryForeground,"&:checked":{color:e.palette.primaryForeground},"& input":{height:"100%"}},slider:{color:e.palette.primaryForeground,minWidth:"60px",padding:"10px 0 10px 0"},sliderValueLabel:{"& span":{"& span":{color:e.palette.primaryBackground}}},tableContainer:{overflow:"hidden",overflowX:"hidden !important"},labelCell:{padding:"2px 8px 2px 16px"},inputCell:{padding:"2px 16px 2px 8px",overflow:"visible"},select:{"& select":{fontSize:".875rem"}},selectRoot:{padding:0,height:"auto"}}})),$s=n(1282),Js=n(1259),Ks=n(1260),Qs=n(1258);function el(e){var t=e.children,n=Ws();return s.a.createElement($s.a,{className:n.box},s.a.createElement(Qs.a,{className:n.tableContainer},s.a.createElement(Js.a,{className:n.table,size:"small"},s.a.createElement(Ks.a,null,t))))}var tl=n(1280);function nl(e){var t=e.classes,n=void 0===t?{}:t,a=Ws();return s.a.createElement(tl.a,Object.assign({native:!0,disableUnderline:!0},e,{classes:Object(l.a)({root:a.selectRoot},n)}))}function al(e){var t=e.observationsLabel,n=e.cellColorEncoding,a=e.setCellColorEncoding,r=Ws(),o=y(t);return s.a.createElement(qs.a,null,s.a.createElement(Us.a,{className:r.labelCell,htmlFor:"cell-color-encoding-select"},o," Color Encoding"),s.a.createElement(Us.a,{className:r.inputCell},s.a.createElement(nl,{className:r.select,value:n,onChange:function(e){a(e.target.value)},inputProps:{id:"cell-color-encoding-select"}},s.a.createElement("option",{value:"cellSetSelection"},"Cell Sets"),s.a.createElement("option",{value:"geneSelection"},"Gene Expression"))))}function rl(e){var t=e.observationsLabel,n=e.cellRadius,a=e.setCellRadius,r=e.cellRadiusMode,o=e.setCellRadiusMode,l=e.cellOpacity,c=e.setCellOpacity,p=e.cellOpacityMode,u=e.setCellOpacityMode,d=e.cellSetLabelsVisible,m=e.setCellSetLabelsVisible,f=e.cellSetLabelSize,h=e.setCellSetLabelSize,g=e.cellSetPolygonsVisible,v=e.setCellSetPolygonsVisible,b=e.cellColorEncoding,x=e.setCellColorEncoding,O=e.geneExpressionColormap,j=e.setGeneExpressionColormap,E=e.geneExpressionColormapRange,S=e.setGeneExpressionColormapRange,C=y(t),_=Ws();function T(e,t){S(t)}var w=Object(i.useCallback)(qa()(T,5,{trailing:!0}),[T]);return s.a.createElement(el,null,s.a.createElement(al,{observationsLabel:t,cellColorEncoding:b,setCellColorEncoding:x}),s.a.createElement(qs.a,null,s.a.createElement(Us.a,{className:_.labelCell},C," Set Labels Visible"),s.a.createElement(Us.a,{className:_.inputCell},s.a.createElement(Bs.a,{className:_.checkbox,checked:d,onChange:function(e){m(e.target.checked)},name:"scatterplot-option-cell-set-labels",color:"default"}))),s.a.createElement(qs.a,null,s.a.createElement(Us.a,{className:_.labelCell},C," Set Label Size"),s.a.createElement(Us.a,{className:_.inputCell},s.a.createElement(Ys.a,{disabled:!d,classes:{root:_.slider,valueLabel:_.sliderValueLabel},value:f,onChange:function(e,t){h(t)},"aria-labelledby":"cell-set-label-size-slider",valueLabelDisplay:"auto",step:1,min:8,max:36}))),s.a.createElement(qs.a,null,s.a.createElement(Us.a,{className:_.labelCell},C," Set Polygons Visible"),s.a.createElement(Us.a,{className:_.inputCell},s.a.createElement(Bs.a,{className:_.checkbox,checked:g,onChange:function(e){v(e.target.checked)},name:"scatterplot-option-cell-set-polygons",color:"default"}))),s.a.createElement(qs.a,null,s.a.createElement(Us.a,{className:_.labelCell,htmlFor:"cell-radius-mode-select"},C," Radius Mode"),s.a.createElement(Us.a,{className:_.inputCell},s.a.createElement(nl,{className:_.select,value:r,onChange:function(e){o(e.target.value)},inputProps:{id:"cell-radius-mode-select"}},s.a.createElement("option",{value:"auto"},"Auto"),s.a.createElement("option",{value:"manual"},"Manual")))),s.a.createElement(qs.a,null,s.a.createElement(Us.a,{className:_.labelCell},C," Radius"),s.a.createElement(Us.a,{className:_.inputCell},s.a.createElement(Ys.a,{disabled:"manual"!==r,classes:{root:_.slider,valueLabel:_.sliderValueLabel},value:n,onChange:function(e,t){a(t)},"aria-labelledby":"cell-radius-slider",valueLabelDisplay:"auto",step:.01,min:.01,max:10}))),s.a.createElement(qs.a,null,s.a.createElement(Us.a,{className:_.labelCell,htmlFor:"cell-opacity-mode-select"},C," Opacity Mode"),s.a.createElement(Us.a,{className:_.inputCell},s.a.createElement(nl,{className:_.select,value:p,onChange:function(e){u(e.target.value)},inputProps:{id:"cell-opacity-mode-select"}},s.a.createElement("option",{value:"auto"},"Auto"),s.a.createElement("option",{value:"manual"},"Manual")))),s.a.createElement(qs.a,null,s.a.createElement(Us.a,{className:_.labelCell},C," Opacity"),s.a.createElement(Us.a,{className:_.inputCell},s.a.createElement(Ys.a,{disabled:"manual"!==p,classes:{root:_.slider,valueLabel:_.sliderValueLabel},value:l,onChange:function(e,t){c(t)},"aria-labelledby":"cell-opacity-slider",valueLabelDisplay:"auto",step:.05,min:0,max:1}))),s.a.createElement(qs.a,null,s.a.createElement(Us.a,{className:_.labelCell,htmlFor:"gene-expression-colormap-select"},"Gene Expression Colormap"),s.a.createElement(Us.a,{className:_.inputCell},s.a.createElement(nl,{className:_.select,value:O,onChange:function(e){j(e.target.value)},inputProps:{id:"gene-expression-colormap-select"}},On.map((function(e){return s.a.createElement("option",{key:e,value:e},e)}))))),s.a.createElement(qs.a,null,s.a.createElement(Us.a,{className:_.labelCell},"Gene Expression Colormap Range"),s.a.createElement(Us.a,{className:_.inputCell},s.a.createElement(Ys.a,{classes:{root:_.slider,valueLabel:_.sliderValueLabel},value:E,onChange:w,"aria-labelledby":"gene-expression-colormap-range-slider",valueLabelDisplay:"auto",step:.005,min:0,max:1}))))}var ol=n(88),il=n.n(ol);var sl=["cells","expression-matrix","cell-sets"];var ll=n(6),cl=function(e){return e.xy},pl=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(e){var a;return Object(u.a)(this,n),(a=t.call(this,e)).cellsEntries=[],a.moleculesEntries=[],a.cellsQuadTree=null,a.cellsLayer=null,a.moleculesLayer=null,a.neighborhoodsLayer=null,a.imageLayers=[],a.layerLoaderSelections={},a.randomColorData={data:new Uint8Array(12582912).map((function(e,t){return t<4?0:Math.round(255*Math.random())})),height:2048,width:2048},a.color=Object(l.a)({},a.randomColorData),a.expression={data:new Uint8Array(4194304),height:2048,width:2048},a.onUpdateCellsData(),a.onUpdateCellsLayer(),a.onUpdateMoleculesData(),a.onUpdateMoleculesLayer(),a.onUpdateNeighborhoodsData(),a.onUpdateNeighborhoodsLayer(),a.onUpdateImages(),a}return Object(d.a)(n,[{key:"createCellsLayer",value:function(e){var t=e.radius,n=e.stroked,a=e.visible,r=e.opacity,i=this.cellsEntries,s=this.props,c=s.theme,p=s.cellFilter,u=s.cellSelection,d=s.setCellHighlight,m=s.setComponentHover,f=s.getCellIsSelected,y=void 0===f?function(e){if(e){var t=new Set(e);return function(e){return t.has(e[0])?1:0}}return function(){return 0}}(i.length===u.length?null:u):f,h=s.cellColors,g=s.getCellColor,v=void 0===g?function(e,t){return function(n){var a=e&&e.get(n[0])||Qt(t),r=Object(o.a)(a,4);return[r[0],r[1],r[2],255*(r[3]||1)]}}(h,c):g,b=s.getCellPolygon,x=void 0===b?function(e){return function(t){var n,a,r,o,i=t[1];return(null===(n=i.poly)||void 0===n?void 0:n.length)?i.poly:(a=i.xy[0],r=i.xy[1],[[a,r+(o=e)],[a+o,r],[a,r-o],[a-o,r]])}}(t):b,O=s.onCellClick,j=s.lineWidthScale,E=void 0===j?10:j,S=s.lineWidthMaxPixels,C=void 0===S?2:S,_=s.geneExpressionColormapRange,T=s.cellColorEncoding,w=s.getExpressionValue,L=s.geneExpressionColormap,P=p?i.filter((function(e){return p.includes(e[0])})):i;return new bi.a(Object(l.a)({id:"cells-layer",backgroundColor:[0,0,0],isSelected:y,getPolygon:x,updateTriggers:{getLineWidth:[n],isSelected:u,getExpressionValue:w,getFillColor:[r,T,u,h],getLineColor:[T,u,h]},getFillColor:function(e){var t=v(e);return t[3]=255*r,t},getLineColor:function(e){var t=v(e);return t[3]=255,t},onClick:function(e){O&&O(e)},visible:a,getLineWidth:n?1:0,lineWidthScale:E,lineWidthMaxPixels:C,getExpressionValue:w,extensions:[new As],colorScaleLo:_[0],colorScaleHi:_[1],isExpressionMode:"geneSelection"===T,colormap:L},$t(P,void 0,d,m)))}},{key:"createMoleculesLayer",value:function(e){var t=this.props,n=t.setMoleculeHighlight,a=t.getMoleculeColor,r=void 0===a?function(e){return en[e[2]%en.length]}:a,o=t.getMoleculePosition,i=void 0===o?function(e){return[e[0],e[1],0]}:o,s=this.moleculesEntries;return new vi.a({id:"molecules-layer",coordinateSystem:Yt.a.CARTESIAN,data:s,pickable:!0,autoHighlight:!0,radiusMaxPixels:3,opacity:e.opacity,visible:e.visible,getRadius:e.radius,getPosition:i,getLineColor:r,getFillColor:r,onHover:function(e){n&&(e.object?n(e.object[3]):n(null))}})}},{key:"createNeighborhoodsLayer",value:function(e){var t=this.props.getNeighborhoodPolygon,n=void 0===t?function(e){return e[1].poly}:t,a=this.neighborhoodsEntries;return new bi.a({id:"neighborhoods-layer",getPolygon:n,coordinateSystem:Yt.a.CARTESIAN,data:a,pickable:!0,autoHighlight:!0,stroked:!0,filled:!1,getElevation:0,getLineWidth:10,visible:e.visible})}},{key:"createSelectionLayers",value:function(){var e=this.props,t=e.viewState,n=e.getCellCoords,a=void 0===n?cl:n,r=e.setCellSelection,o=this.state.tool,i=this.cellsQuadTree;return Xi(o,t.zoom,"cells-layer",a,r,i)}},{key:"createScaleBarLayer",value:function(){var e=this.props,t=e.viewState,n=e.width,a=e.height,r=e.imageLayerLoaders,o=void 0===r?{}:r,i=(e.layers||[]).some((function(e){return e.use3d})),s=Object.values(o);if(!t||!n||!a||s.length<1)return null;var c=s[0];if(!c)return null;var p=g(c);if(!p.meta)return null;var u=p.meta.physicalSizes;if(u&&!i){var d=u.x,m=d.unit,f=d.size;return m&&f?new Ft.h({id:"scalebar-layer",unit:m,size:f,viewState:Object(l.a)({},t,{width:n,height:a})}):null}return null}},{key:"createImageLayer",value:function(e,t,n){var a,r=Object(l.a)({},e,{channels:e.channels.filter((function(e){return e.selection&&e.color&&e.slider}))}),i=r.channels.map((function(e){return e.selection})),s=this.layerLoaderSelections[r.index];ge()(s,i)?a=s:(a=i,this.layerLoaderSelections[r.index]=i);var c=!r.visible&&"boolean"===typeof r.visible||Boolean(r.transparentColor),u=c?[0,0,0]:null,d={colormap:r.colormap,opacity:r.opacity,useTransparentColor:c,transparentColor:u,colors:r.channels.map((function(e){return e.color})),sliders:r.channels.map((function(e){return e.slider})),resolution:r.resolution,renderingMode:r.renderingMode,xSlice:r.xSlice,ySlice:r.ySlice,zSlice:r.zSlice,callback:r.callback,visibilities:r.channels.map((function(e){return!(!r.visible&&"boolean"===typeof r.visible)&&e.visible}))};if(!t||!d)return null;var m,f=t.metadata.transform,y=t.data;if(f){var h=f.scale,g=f.translate;m=(new Vt.Matrix4).translate([g.x,g.y,0]).scale(h)}else r.modelMatrix&&(m=new Vt.Matrix4(r.modelMatrix));if("bitmask"===e.type){var v=this.props,b=v.geneExpressionColormap,x=v.geneExpressionColormapRange,O=void 0===x?[0,1]:x,j=v.cellColorEncoding;return new Ft.f({id:"bitmask-layer-".concat(r.index,"-").concat(n),channelsVisible:d.visibilities,opacity:d.opacity,modelMatrix:m,hoveredCell:Number(this.props.cellHighlight),renderSubLayers:zn,loader:y,selections:a,cellColorData:this.color.data,cellTexHeight:this.color.height,cellTexWidth:this.color.width,excludeBackground:!0,onViewportLoad:d.callback,colorScaleLo:O[0],colorScaleHi:O[1],isExpressionMode:"geneSelection"===j,colormap:b,expressionData:this.expression.data})}var E=function(e,t){var n=Array.isArray(e)&&e.length>1||!Array.isArray(e)?e:e[0];return t?[Ft.i,Array.isArray(n)?n:[n]]:[Array.isArray(e)&&e.length>1?Ft.f:Ft.d,n]}(y,r.use3d),S=Object(o.a)(E,2),C=S[0],_=S[1],T=r.use3d?[]:Object(p.a)(d.colormap?[new Ft.a]:[new Ft.b]);return new C({loader:_,id:"".concat(r.use3d?"volume":"image","-layer-").concat(r.index,"-").concat(n),colors:d.colors,contrastLimits:d.sliders,selections:a,channelsVisible:d.visibilities,opacity:d.opacity,colormap:d.colormap,modelMatrix:m,transparentColor:d.transparentColor,useTransparentColor:d.useTransparentColor,resolution:d.resolution,renderingMode:d.renderingMode,pickable:!1,xSlice:d.xSlice,ySlice:d.ySlice,zSlice:d.zSlice,onViewportLoad:d.callback,extensions:T})}},{key:"createImageLayers",value:function(){var e=this,t=this.props,n=t.layers,a=t.imageLayerLoaders,r=void 0===a?{}:a,o=t.rasterLayersCallbacks,i=void 0===o?[]:o,s=(n||[]).some((function(e){return e.use3d})),c=(n||[]).findIndex((function(e){return e.use3d}));return(n||[]).filter((function(e){return"raster"===e.type||"bitmask"===e.type})).filter((function(e){return!s||e.use3d===s})).map((function(t,n){return e.createImageLayer(Object(l.a)({},t,{callback:i[s?c:n]}),r[t.index],n)}))}},{key:"getLayers",value:function(){var e=this.imageLayers,t=this.cellsLayer,n=this.neighborhoodsLayer,a=this.moleculesLayer;return[].concat(Object(p.a)(e),[t,n,a,this.createScaleBarLayer()],Object(p.a)(this.createSelectionLayers()))}},{key:"onUpdateCellsData",value:function(){var e=this.props,t=e.cells,n=void 0===t?{}:t,a=e.getCellCoords,r=void 0===a?cl:a,o=Object.entries(n);this.cellsEntries=o,this.cellsQuadTree=ns(o,r)}},{key:"onUpdateCellsLayer",value:function(){var e=(this.props.layers||[]).find((function(e){return"cells"===e.type}));this.cellsLayer=e?this.createCellsLayer(e):null}},{key:"onUpdateCellColors",value:function(){var e=this.randomColorData;if("number"===typeof this.props.cellColors.size){var t=this.props.cellColors.keys();e.data=new Uint8Array(e.height*e.width*3).fill(Qt(this.props.theme)[0]),e.data[0]=0,e.data[1]=0,e.data[2]=0;var n,a=Object(ll.a)(t);try{for(a.s();!(n=a.n()).done;){var r=n.value;if(r>0){var o=this.props.cellColors.get(r);o&&e.data.set(o.slice(0,3),3*Number(r))}}}catch(i){a.e(i)}finally{a.f()}}this.color=e}},{key:"onUpdateExpressionData",value:function(){var e,t=this.props.expressionData;(null===(e=t[0])||void 0===e?void 0:e.length)&&(this.expression.data=new Uint8Array(this.expression.height*this.expression.width),this.expression.data.set(t[0]))}},{key:"onUpdateMoleculesData",value:function(){var e=this.props.molecules,t=void 0===e?{}:e,n=Object.entries(t).flatMap((function(e,t){var n=Object(o.a)(e,2),a=n[0];return n[1].map((function(e){var n=Object(o.a)(e,2);return[n[0],n[1],t,a]}))}));this.moleculesEntries=n}},{key:"onUpdateMoleculesLayer",value:function(){var e=(this.props.layers||[]).find((function(e){return"molecules"===e.type}));this.moleculesLayer=e?this.createMoleculesLayer(e):null}},{key:"onUpdateNeighborhoodsData",value:function(){var e=this.props.neighborhoods,t=void 0===e?{}:e,n=Object.entries(t);this.neighborhoodsEntries=n}},{key:"onUpdateNeighborhoodsLayer",value:function(){var e=(this.props.layers||[]).find((function(e){return"neighborhoods"===e.type}));this.neighborhoodsLayer=e?this.createNeighborhoodsLayer(e):null}},{key:"onUpdateImages",value:function(){this.imageLayers=this.createImageLayers()}},{key:"viewInfoDidUpdate",value:function(){var e=this.props.getCellCoords,t=void 0===e?cl:e;Object(Nt.a)(Object(Rt.a)(n.prototype),"viewInfoDidUpdate",this).call(this,t)}},{key:"componentDidUpdate",value:function(e){var t=this;this.viewInfoDidUpdate();var n=function(n){return e[n]!==t.props[n]};["cells"].some(n)&&(this.onUpdateCellsData(),this.forceUpdate()),["layers","cells","cellFilter","cellSelection","cellColors","geneExpressionColormapRange","cellColorEncoding","geneExpressionColormap"].some(n)&&(this.onUpdateCellsLayer(),this.forceUpdate()),["cellColors"].some(n)&&(this.onUpdateCellColors(),this.forceUpdate()),["expressionData"].some(n)&&(this.onUpdateExpressionData(),this.forceUpdate()),["molecules"].some(n)&&(this.onUpdateMoleculesData(),this.forceUpdate()),["layers","molecules"].some(n)&&(this.onUpdateMoleculesLayer(),this.forceUpdate()),["neighborhoods"].some(n)&&(this.onUpdateNeighborhoodsData(),this.forceUpdate()),["layers","neighborhoods"].some(n)&&(this.onUpdateNeighborhoodsLayer(),this.forceUpdate()),["layers","imageLayerLoaders","cellColors","cellHighlight","geneExpressionColormapRange","expressionData","rasterLayersCallbacks","geneExpressionColormap"].some(n)&&(this.onUpdateImages(),this.forceUpdate())}}]),n}(Cs),ul=Object(i.forwardRef)((function(e,t){return s.a.createElement(pl,Object.assign({},e,{deckRef:t}))})),dl=n(1296),ml=Object(ve.a)((function(){return Object(dl.a)({cameraLabel:{padding:"0px 0px 0px 16px"},box:{padding:"0px"},button:{padding:"0px 0px 0px 8px"}})})),fl=function(e){var t=e.setSpatialAxisFixed,n=e.spatialAxisFixed,a=e.use3d,r=ml();return s.a.createElement(qs.a,null,s.a.createElement(Us.a,{className:r.cameraLabel},"Fix Camera Axis"),s.a.createElement(Us.a,{className:r.box},s.a.createElement(Bs.a,{onClick:function(){return t(!n)},disabled:!a,checked:Boolean(n)})))};function yl(e){var t=e.observationsLabel,n=e.cellColorEncoding,a=e.setCellColorEncoding,r=e.setSpatialAxisFixed,o=e.spatialAxisFixed,l=e.use3d,c=e.geneExpressionColormap,p=e.setGeneExpressionColormap,u=e.geneExpressionColormapRange,d=e.setGeneExpressionColormapRange,m=e.canShowExpressionOptions,f=e.canShowColorEncodingOption,y=e.canShow3DOptions;function h(e,t){d(t)}var g=Object(i.useCallback)(qa()(h,5,{trailing:!0}),[h]),v=Ws();return s.a.createElement(el,null,f?s.a.createElement(al,{observationsLabel:t,cellColorEncoding:n,setCellColorEncoding:a}):null,y?s.a.createElement(fl,{setSpatialAxisFixed:r,spatialAxisFixed:o,use3d:l}):null,m?s.a.createElement(s.a.Fragment,null,s.a.createElement(qs.a,null,s.a.createElement(Us.a,{className:v.labelCell,htmlFor:"gene-expression-colormap-select"},"Gene Expression Colormap"),s.a.createElement(Us.a,{className:v.inputCell},s.a.createElement(nl,{className:v.select,value:c,onChange:function(e){p(e.target.value)},inputProps:{id:"gene-expression-colormap-select"}},On.map((function(e){return s.a.createElement("option",{key:e,value:e},e)}))))),s.a.createElement(qs.a,null,s.a.createElement(Us.a,{className:v.labelCell},"Gene Expression Colormap Range"),s.a.createElement(Us.a,{className:v.inputCell},s.a.createElement(Ys.a,{classes:{root:v.slider,valueLabel:v.sliderValueLabel},value:u,onChange:g,"aria-labelledby":"gene-expression-colormap-range-slider",valueLabelDisplay:"auto",step:.005,min:0,max:1})))):null)}function hl(e){var t=e.parentUuid,n=e.cellHighlight,a=e.width,r=e.height,i=e.getCellInfo,l=Je(),c=tt(t),u=n&&i?[i(n)].concat(Object(p.a)(c&&c.project?c.project(n):[null,null])):[null,null,null],d=Object(o.a)(u,3),m=d[0],f=d[1],y=d[2];return m?s.a.createElement(Xs,{x:f,y:y,parentUuid:t,sourceUuid:l,parentWidth:a,parentHeight:r},s.a.createElement(Zs,{info:m})):null}var gl=["cells","molecules","raster","cell-sets","expression-matrix"];var vl=n(1263);function bl(e){var t=e.layer,n=e.viewport;return"axisLeft"===n.id?t.id.startsWith("axisLeft"):"axisTop"===n.id?t.id.startsWith("axisTop"):"heatmap"===n.id?t.id.startsWith("heatmap"):"colorsLeft"===n.id?t.id.startsWith("colorsLeft"):"colorsTop"===n.id&&t.id.startsWith("colorsTop")}var xl=n(704),Ol=n.n(xl),jl="undefined"!==typeof navigator?navigator.hardwareConcurrency||4:null,El=function(e){Object(ot.a)(n,e);var t=Object(it.a)(n);function n(){return Object(u.a)(this,n),t.call(this,Ol.a)}return Object(d.a)(n,[{key:"process",value:function(){var e=Object(kt.a)(At.a.mark((function e(t){var n,a=this;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.waitForWorker();case 2:return n=e.sent,e.abrupt("return",new Promise((function(e,r){n.onmessage=function(t){a.finishTask(n),e(t.data)},n.onerror=function(e){a.finishTask(n),r(e)},n.postMessage(["getTile",t],[t.data])})));case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),n}(function(){function e(t){Object(u.a)(this,e),this.workers=[],this.idleWorkers=[],this.waitQueue=[],this.decoder=null;for(var n=0;n<jl;++n){var a=new t;this.workers.push(a),this.idleWorkers.push(a)}}return Object(d.a)(e,[{key:"process",value:function(){var e=Object(kt.a)(At.a.mark((function e(){return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error('Pool needs to implement "process" method');case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"waitForWorker",value:function(){var e=Object(kt.a)(At.a.mark((function e(){var t,n,a;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=this.idleWorkers.pop())){e.next=3;break}return e.abrupt("return",t);case 3:return n={},a=new Promise((function(e){n.resolve=e})),this.waitQueue.push(n),e.abrupt("return",a);case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"finishTask",value:function(){var e=Object(kt.a)(At.a.mark((function e(t){var n;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=this.waitQueue.pop())?n.resolve(t):this.idleWorkers.push(t);case 2:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"destroy",value:function(){for(var e=0;e<this.workers.length;++e)this.workers[e].terminate()}}]),e}()),Sl=Object(i.forwardRef)((function(e,t){var n,a=e.uuid,r=e.theme,c=e.viewState,u=e.setViewState,d=e.width,m=e.height,f=e.expressionMatrix,y=e.cellColors,h=e.colormap,g=e.colormapRange,v=e.clearPleaseWait,b=e.setComponentHover,x=e.setCellHighlight,O=void 0===x?(n="Heatmap",function(e){return console.warn("".concat(n," updateCellsHover: ").concat(e.cellId))}):x,j=e.setGeneHighlight,E=void 0===j?function(e){return function(t){return console.warn("".concat(e," updateGenesHover: ").concat(t.geneId))}}("Heatmap"):j,S=e.updateViewInfo,C=void 0===S?function(e){return function(t){return console.warn("".concat(e," updateViewInfo: ").concat(t))}}("Heatmap"):S,_=e.setIsRendering,T=void 0===_?function(){}:_,w=e.transpose,L=void 0!==w&&w,P=e.variablesTitle,I=void 0===P?"Genes":P,A=e.observationsTitle,k=void 0===A?"Cells":A,R=Object(l.a)({},c,{target:L?[c.target[1],c.target[0]]:c.target,minZoom:0}),N=L?I:k,M=L?k:I,D=Object(i.useMemo)((function(){return new El}),[]);Object(i.useEffect)((function(){v&&f&&v("expression-matrix")}),[v,f]);var G=Object(i.useRef)(),z=Object(i.useRef)(),H=Object(i.useState)([]),F=Object(o.a)(H,2),X=F[0],Z=F[1],V=Object(i.useState)([]),B=Object(o.a)(V,2),Y=B[0],U=B[1],q=Object(i.useReducer)((function(e){return e+1}),0),W=Object(o.a)(q,2),$=W[0],J=W[1],K=Object(i.useState)([]),Q=Object(o.a)(K,2),ee=Q[0],te=Q[1];Object(i.useEffect)((function(){f&&f.matrix&&(z.current=function(e){var t=new ArrayBuffer(e.buffer.byteLength),n=new Uint8Array(t);return n.set(e),n}(f.matrix))}),[z,f]),Object(i.useEffect)((function(){if(f){var e=y&&0!==y.size?Array.from(y.keys()):f.rows,t=L?Y:X;ge()(t,e)||(L?U(e):Z(e))}}),[f,y,Y,X,L]),Object(i.useEffect)((function(){f&&(L?Z(f.cols):U(f.cols))}),[f,L]);var ne=Object(i.useMemo)((function(){return f?[Object(vl.a)(f.rows.map((function(e){return e.length}))),Object(vl.a)(f.cols.map((function(e){return e.length})))]:[0,0]}),[f]),ae=Object(o.a)(ne,2),re=ae[0],oe=ae[1],ie=Y.length,se=X.length,le=function(e,t,n){return[il()(9*(e?t:n),10,90),il()(9*(e?n:t),10,90)]}(L,oe,re),ce=Object(o.a)(le,2),pe=ce[0],ue=ce[1],de=ue+20,me=pe+20,fe=d-me,ye=m-de,he=-fe/2,ve=fe/2,be=-ye/2,xe=ye/2,Oe=Math.ceil(ie/2048),je=Math.ceil(se/2048),Ee=fe/(1-(2048-ie%2048)/(2048*Oe))/Oe,Se=ye/(1-(2048-se%2048)/(2048*je))/je,Ce=Math.pow(2,R.zoom),_e=ye*Ce/se,Te=fe*Ce/ie,we=il()(Math.pow(2,Math.ceil(Math.log2(1/Te))),1,16),Le=il()(Math.pow(2,Math.ceil(Math.log2(1/_e))),1,16),Pe=Object(o.a)(R.target,2),Ie=Pe[0],Ae=Pe[1];Object(i.useEffect)((function(){C({uuid:a,project:function(e,t){return function(e,t,n){var a=n.offsetLeft,r=n.offsetTop,o=n.targetX,i=n.targetY,s=n.scaleFactor,l=n.matrixWidth,c=n.matrixHeight,p=n.numRows,u=n.numCols,d=null,m=null;if(null!==t){var f=-c*s/2,y=i*s-c/2,h=i*s+c/2,g=f+(t+.5)/p*(c*s/2-f);y<=g&&g<=h&&(d=r+(g-y)/(h-y)*c)}if(null!==e){var v=-l*s/2,b=o*s-l/2,x=o*s+l/2,O=v+(e+.5)/u*(l*s/2-v);b<=O&&O<=x&&(m=a+(O-b)/(x-b)*l)}return[m,d]}(L?Y.indexOf(e):Y.indexOf(t),L?X.indexOf(t):X.indexOf(e),{offsetLeft:me,offsetTop:de,targetX:R.target[0],targetY:R.target[1],scaleFactor:Ce,matrixWidth:fe,matrixHeight:ye,numRows:se,numCols:ie})}})}),[a,C,L,Y,X,me,de,R,Ce,fe,ye,se,ie]);var ke=Object(i.useCallback)((function(e){var t=e.viewState,n=t.zoom,a=Math.pow(2,n),r=0===n?0:-(ve-ve/a),o=-1*r,i=0===n?0:-(xe-xe/a),s=-1*i,l=[il()(t.target[0],r,o),il()(t.target[1],i,s)];u({zoom:n,target:L?[l[1],l[0]]:l})}),[ve,xe,L,u]);Object(i.useEffect)((function(){f&&Y&&X&&Oe&&je&&te((function(e){return[].concat(Object(p.a)(e),[ht()()])}))}),[z,f,Y,X,Oe,je]),Object(i.useEffect)((function(){if(!(ee.length<1)){var e=ee[ee.length-1];if(z.current&&z.current.buffer.byteLength){var t=f.rows,n=f.cols,a=f.matrix,r=ct()(je).map((function(r){return ct()(Oe).map(function(){var o=Object(kt.a)(At.a.mark((function o(i){return At.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",D.process({curr:e,tileI:r,tileJ:i,tileSize:2048,cellOrdering:L?Y:X,rows:t,cols:n,transpose:L,data:a.buffer.slice()}));case 1:case"end":return o.stop()}}),o)})));return function(e){return o.apply(this,arguments)}}())}));(function(){var e=Object(kt.a)(At.a.mark((function e(){var t,n;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(r.flat());case 2:t=e.sent,G.current=t.map((function(e){return e.tile})),J(),z.current=new Uint8Array(t[0].buffer),n=t[0].curr,te((function(e){var t=e.indexOf(n);return e.slice(t+1,e.length)}));case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()}}}),[X,Y,ee,f,L,Oe,je,D]),Object(i.useEffect)((function(){T(ee.length>0)}),[ee,T]);var Re=Object(i.useMemo)((function(){if(!G.current||ee.length)return[];return G.current.map((function(e,t){return function(e,t,n){return new Ji({id:"heatmapLayer-".concat($,"-").concat(e,"-").concat(t),image:n,bounds:[he+t*Ee,be+e*Se,he+(t+1)*Ee,be+(e+1)*Se],aggSizeX:we,aggSizeY:Le,colormap:h,colorScaleLo:g[0],colorScaleHi:g[1],updateTriggers:{image:[X,Y],bounds:[Se,Ee]}})}(Math.floor(t/Oe),t%Oe,e)}))}),[ee,$,he,Ee,be,Se,we,Le,h,g,X,Y,Oe]),Ne=Object(i.useMemo)((function(){return Y.map((function(e,t){return[t,e]}))}),[Y]),Me=Object(i.useMemo)((function(){return X.map((function(e,t){return[t,e]}))}),[X]),De=[new es({targetX:Ie,targetY:Ae,scaleFactor:Ce,axisLeftLabelData:Me,matrixTop:be,height:se,matrixHeight:ye,cellHeight:_e,cellWidth:Te,axisTopLabelData:Ne,matrixLeft:he,width:ie,matrixWidth:fe,viewHeight:m,viewWidth:d,theme:r,axisLeftTitle:N,axisTopTitle:M,axisOffsetLeft:pe,axisOffsetTop:ue})],Ge=Object(i.useMemo)((function(){if(!y)return null;var e,t,n,a,r=L?Y:X,i=L?2048:1,s=L?1:2048;return ct()(L?Oe:je).map((function(l){var c=new Uint8ClampedArray(8192);return ct()(2048).forEach((function(i){if((a=2048*l+i)<r.length&&(e=r[a],n=y.get(e),t=4*(L?i:2048-i-1),n)){var s=n,p=Object(o.a)(s,3),u=p[0],d=p[1],m=p[2];c[t+0]=u,c[t+1]=d,c[t+2]=m,c[t+3]=255}})),new ImageData(c,i,s)}))}),[y,L,Y,X,Oe,je]),ze=Object(i.useMemo)((function(){return Ge?Ge.map((function(e,t){return new Qi({id:"".concat(L?"colorsTopLayer":"colorsLeftLayer","-").concat(t,"-").concat(ht()()),image:e,bounds:L?[he+t*Ee,-ye/2,he+(t+1)*Ee,ye/2]:[-fe/2,be+t*Se,fe/2,be+(t+1)*Se]})})):[]}),[Ge,be,he,ye,fe,Ee,Se,L]),He=Re.concat(De).concat(ze);return s.a.createElement(as.a,{id:"deckgl-overlay-".concat(a),ref:t,views:[new os.a({id:"heatmap",controller:!0,x:me,y:de,width:fe,height:ye}),new os.a({id:"axisLeft",controller:!1,x:L?20:0,y:de,width:pe,height:ye}),new os.a({id:"axisTop",controller:!1,x:me,y:L?0:20,width:fe,height:ue}),new os.a({id:"colorsLeft",controller:!1,x:pe,y:de,width:17,height:ye}),new os.a({id:"colorsTop",controller:!1,x:me,y:ue,width:fe,height:17})],layers:He,layerFilter:bl,getCursor:function(e){return e.isDragging?"grabbing":"default"},glOptions:an,onViewStateChange:ke,viewState:R,onHover:function(e,t){if(f){var n=t.offsetCenter,a=function(e,t,n){var a=n.offsetLeft,r=n.offsetTop,o=n.targetX,i=n.targetY,s=n.scaleFactor,l=n.matrixWidth,c=n.matrixHeight,p=n.numRows,u=n.numCols,d=e-a,m=t-r;if(d<0||m<0)return[null,null];var f=(o*s+l*s/2-l/2)/(l*s)+d/(l*s),y=(i*s+c*s/2-c/2)/(c*s)+m/(c*s),h=Math.floor(y*p);return[Math.floor(f*u),h]}(n.x,n.y,{offsetLeft:me,offsetTop:de,targetX:Ie,targetY:Ae,scaleFactor:Ce,matrixWidth:fe,matrixHeight:ye,numRows:se,numCols:ie}),r=Object(o.a)(a,2),i=r[0],s=r[1];null===i&&(L?O(null):E(null)),null===s&&(L?E(null):O(null));var l=f.rows.indexOf(L?Y[i]:X[s]),c=f.cols.indexOf(L?X[s]:Y[i]),p=f.rows[l],u=f.cols[c];b&&b(),O(p||null),E(u||null)}}})}));function Cl(e){var t=e.parentUuid,n=e.width,a=e.height,r=e.transpose,i=e.getCellInfo,c=e.getGeneInfo,p=e.cellHighlight,u=e.geneHighlight,d=Je(),m=tt(t),f=p&&i?[i(p),m&&m.project?m.project(p,null)[r?0:1]:null]:[null,null],y=Object(o.a)(f,2),h=y[0],g=y[1],v=u&&c?[c(u),m&&m.project?m.project(null,u)[r?1:0]:null]:[null,null],b=Object(o.a)(v,2),x=b[0],O=b[1],j=r?g:O,E=r?O:g;return h||x?s.a.createElement(Xs,{x:j,y:E,parentUuid:t,parentWidth:n,parentHeight:a,sourceUuid:d},s.a.createElement(Zs,{info:Object(l.a)({},x,{},h)})):null}function _l(e){var t=e.geneExpressionColormap,n=e.setGeneExpressionColormap,a=e.geneExpressionColormapRange,r=e.setGeneExpressionColormapRange,o=Ws();function l(e,t){r(t)}var c=Object(i.useCallback)(qa()(l,5,{trailing:!0}),[l]);return s.a.createElement(el,null,s.a.createElement(qs.a,null,s.a.createElement(Us.a,{className:o.labelCell,htmlFor:"gene-expression-colormap-select"},"Gene Expression Colormap"),s.a.createElement(Us.a,{className:o.inputCell},s.a.createElement(nl,{className:o.select,value:t,onChange:function(e){n(e.target.value)},inputProps:{id:"gene-expression-colormap-select"}},On.map((function(e){return s.a.createElement("option",{key:e,value:e},e)}))))),s.a.createElement(qs.a,null,s.a.createElement(Us.a,{className:o.labelCell},"Gene Expression Colormap Range"),s.a.createElement(Us.a,{className:o.inputCell},s.a.createElement(Ys.a,{classes:{root:o.slider,valueLabel:o.sliderValueLabel},value:a,onChange:c,"aria-labelledby":"gene-expression-colormap-range-slider",valueLabelDisplay:"auto",step:.005,min:0,max:1}))))}var Tl=["cells","cell-sets","expression-matrix"];var wl=n(1266),Ll=n(706),Pl=n.n(Ll),Il=n(705),Al=n.n(Il),kl=Object(ve.a)((function(e){return{container:{width:"70px",height:"40px",display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap"},button:{padding:"3px",width:"16px"},icon:{width:"17px",height:"17px",stroke:e.palette.action.selected,"stroke-width":"1px"}}})),Rl=function(e){var t=e.handleChange,n=kl();return s.a.createElement("div",{className:n.container,"aria-label":"color-swatch"},tn.map((function(e){return s.a.createElement(Mr.a,{className:n.button,key:e,onClick:function(){return t(e)}},s.a.createElement(Al.a,{fontSize:"small",style:{color:"rgb(".concat(e,")")},className:n.icon}))})))},Nl=Object(ve.a)((function(){return{menuButton:{backgroundColor:"transparent"},colors:{"&:hover":{backgroundColor:"transparent"},paddingLeft:"2px",paddingRight:"2px"}}}));var Ml=function(e){var t=e.handlePropertyChange,n=e.handleChannelRemove,a=e.handleIQRUpdate,r=Object(i.useState)(!1),l=Object(o.a)(r,2),c=l[0],p=l[1],u=Nl();return s.a.createElement(eo,{open:c,setOpen:p,buttonIcon:s.a.createElement(Pl.a,{fontSize:"small"}),buttonClassName:u.menuButton},s.a.createElement(Nr.a,{dense:!0,disableGutters:!0,onClick:function(){p(!1),n()}},s.a.createElement(Qr,null,"Remove")),s.a.createElement(Nr.a,{dense:!0,disableGutters:!0,onClick:a},s.a.createElement(Qr,null,"Use IQR")),s.a.createElement(Nr.a,{dense:!0,disableGutters:!0,className:u.colors},s.a.createElement(Rl,{handleChange:function(e){t("color",e)}})))};var Dl=function(){var e={},t=["Int8","Int16","Int32"];return Object.keys(Ft.c).forEach((function(n){var a=Ft.c[n].max,r=t.includes(n)?-(a+1):0;e[n]=[r,a]})),e}(),Gl=n(28),zl=n(1265),Hl=n(1264),Fl=n(1301),Xl=Object(ve.a)((function(){return{selectRoot:{padding:0,height:"auto",margin:"4px 0"}}})),Zl=(Object(Gl.a)((function(e){return{paper:{backgroundColor:e.palette.background.paper},span:{width:"70px",textAlign:"center",paddingLeft:"2px",paddingRight:"2px"},colors:{"&:hover":{backgroundColor:"transparent"},paddingLeft:"2px",paddingRight:"2px"},popper:{zIndex:4}}})),{width:"100%",flexDirection:"column"}),Vl=Object(ve.a)((function(){return{root:Object(l.a)({},Zl,{padding:"0px 8px"})}})),Bl=Object(Gl.a)((function(){return{root:Object(l.a)({},Zl,{padding:"8px 8px 24px 8px"})}}))(Hl.a),Yl=Object(Gl.a)((function(e){return{root:{padding:"0px 8px"},content:{margin:"4px 0px",minWidth:"0px"},expanded:{marginBottom:e.spacing(-3),top:e.spacing(-1)},expandIcon:{"&$expanded":{top:e.spacing(-1.3)}}}}))(zl.a),Ul=Object(Gl.a)((function(){return{root:{fontSize:"14px"}}}))(Fl.a),ql=Object(Gl.a)((function(){return{item:{width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}}}))(wl.a),Wl=Object(Gl.a)((function(){return{root:{marginTop:"7px"},markActive:{backgroundColor:"rgba(128, 128, 128, 0.7)"}}}))(Ys.a);function $l(e){var t=e.handleChange,n=e.disabled,a=e.channelOptions,r=e.selectionIndex,o=Xl();return s.a.createElement(tl.a,{classes:{root:o.selectRoot},native:!0,value:r,onChange:function(e){return t(Number(e.target.value))}},a.map((function(e,t){return s.a.createElement("option",{disabled:n,key:e,value:t},e)})))}function Jl(e){var t=e.color,n=e.checked,a=e.toggle,r=e.disabled;return s.a.createElement(Bs.a,{onChange:a,checked:n,disabled:r,style:{color:t,"&$checked":{color:t}}})}function Kl(e){var t=5;Number.isInteger(e)||--t,e<1&&--t;var n=Intl.NumberFormat("en-US",{maximumSignificantDigits:t,useGrouping:!1}).format(e);return n.length<=5?n:e.toExponential(0)}function Ql(e){var t=e.color,n=e.slider,a=void 0===n?[0,0]:n,r=e.handleChange,l=e.domain,c=void 0===l?[0,0]:l,p=e.dtype,u=e.disabled,d=Object(o.a)(c,2),m=d[0],f=d[1],y=Object(i.useCallback)(qa()(r,3,{trailing:!0}),[r]),h=f-m<500&&"Float32"===p?(f-m)/500:1;return s.a.createElement(Ys.a,{value:a,valueLabelFormat:Kl,onChange:function(e,t){return y(t)},valueLabelDisplay:"auto",getAriaLabel:function(){return"".concat(t,"-").concat(a)},min:m,max:f,step:h,orientation:"horizontal",style:{color:t,marginTop:"7px"},disabled:u})}var ec=function(e){var t=e.visibility,n=void 0!==t&&t,a=e.slider,r=e.color,p=e.channels,u=e.channelId,d=e.domainType,m=e.dimName,f=e.theme,y=e.loader,h=e.colormapOn,v=e.channelOptions,b=e.handlePropertyChange,x=e.handleChannelRemove,O=e.handleIQRUpdate,j=e.selectionIndex,E=e.isLoading,S=e.use3d,C=g(y).dtype,_=Object(i.useState)(null),T=Object(o.a)(_,2),w=T[0],L=T[1],P=Object(i.useState)(null),I=Object(o.a)(P,2),A=I[0],k=I[1],R=Object(i.useState)(null),N=Object(o.a)(R,2),M=N[0],D=N[1],G=Object(i.useState)([Object(l.a)({},p[u].selection)]),z=Object(o.a)(G,2),H=z[0],F=z[1],X=function(e,t,n){var a=e||"light"===n&&t.every((function(e){return 255===e}))?[220,220,220]:t;return"rgb(".concat(a,")")}(h,r,f);return Object(i.useEffect)((function(){var e=!0;if(C&&y&&p){var t=[Object(l.a)({},p[u].selection)],n=d!==A,a=M!==S,r=!ge()(t,H);if(n||r||a)if("Full"===d){var i=[Dl[C]],s=Object(o.a)(i,1)[0];e&&(L(s),k(d),r&&F(t),a&&D(S))}else Pn({loader:y.data,selections:t,use3d:S}).then((function(n){var i=n.domains,s=Object(o.a)(i,1)[0];e&&(L(s),k(d),r&&F(t),a&&D(S))}))}return function(){e=!1}}),[A,p,u,y,C,d,H,S,M]),s.a.createElement(wl.a,{container:!0,direction:"column",m:1,justifyContent:"center"},s.a.createElement(wl.a,{container:!0,direction:"row",justifyContent:"space-between"},s.a.createElement(wl.a,{item:!0,xs:10},s.a.createElement($l,{handleChange:function(e){return b("selection",(t=e,Object(c.a)({},m,t)));var t},selectionIndex:j,channelOptions:v,disabled:E})),s.a.createElement(wl.a,{item:!0,xs:1,style:{marginTop:"4px"}},s.a.createElement(Ml,{handlePropertyChange:b,handleChannelRemove:x,handleIQRUpdate:O,disabled:E}))),s.a.createElement(wl.a,{container:!0,direction:"row",justifyContent:"space-between"},s.a.createElement(wl.a,{item:!0,xs:2},s.a.createElement(Jl,{color:X,checked:n,toggle:function(){return b("visible",!n)},disabled:E})),s.a.createElement(wl.a,{item:!0,xs:9},s.a.createElement(Ql,{color:X,slider:a,domain:w||Dl[C],dtype:C,handleChange:function(e){return b("slider",e)},disabled:E}))))},tc=n(707),nc=n.n(tc);var ac=function(e){var t=e.visibility,n=void 0!==t&&t,a=e.dimName,r=e.channelOptions,o=e.handlePropertyChange,i=e.handleChannelRemove,l=e.selectionIndex,p=e.disableOptions,u=void 0!==p&&p;return s.a.createElement(wl.a,{container:!0,direction:"row",justify:"space-between"},s.a.createElement(wl.a,{item:!0,xs:2},s.a.createElement(Jl,{color:[220,220,220],checked:n,toggle:function(){return o("visible",!n)}})),s.a.createElement(wl.a,{item:!0,xs:9},s.a.createElement($l,{handleChange:function(e){return o("selection",(t=e,Object(c.a)({},a,t)));var t},selectionIndex:l,disableOptions:u,channelOptions:r})),s.a.createElement(wl.a,{item:!0,xs:1},s.a.createElement(Mr.a,{onClick:i,style:{padding:"6px 6px 6px 0px"}},s.a.createElement(nc.a,null))))},rc=n(1161);function oc(e){var t=e.label,n=e.layer,a=e.layerType,r=e.handleLayerChange,o=n.opacity,i=n.visible;var c=Vl();return s.a.createElement(wl.a,{item:!0,style:{marginTop:"10px"}},s.a.createElement(qr.a,{className:c.root},s.a.createElement(rc.a,{style:{padding:"15px 8px 0px 8px",marginBottom:"-5px"}},t),s.a.createElement(wl.a,{container:!0,direction:"row",justifyContent:"space-between"},s.a.createElement(wl.a,{item:!0,xs:2},s.a.createElement(Bs.a,{color:"primary",checked:i,onChange:function(e,t){return function(e){r(Object(l.a)({},n,{visible:e}))}(t)}})),s.a.createElement(wl.a,{item:!0,xs:9,style:{paddingRight:"8px"}},s.a.createElement(Ys.a,{value:o,min:0,max:1,step:.001,onChange:function(e,t){return function(e){if("cells"===a){var t=e<.7;r(Object(l.a)({},n,{opacity:e,stroked:t}))}else r(Object(l.a)({},n,{opacity:e}))}(t)},style:{marginTop:"7px"},orientation:"horizontal"})))))}var ic=n(1268),sc=n(419),lc=n.n(sc),cc=n(1287),pc=n(1269),uc=n(1292),dc=n(710),mc=n.n(dc),fc=n(708),yc=n.n(fc),hc=n(709),gc=n.n(hc),vc=["Full","Min/Max"];function bc(e){var t=e.loader,n=e.handleMultiPropertyChange,a=e.resolution,r=e.disable3d,i=e.setRasterLayerCallback,c=e.setAreAllChannelsLoading,u=e.setViewState,d=e.spatialHeight,m=e.spatialWidth,f=e.channels,y=e.use3d,h=e.modelMatrix,g=Xl(),v=f.map((function(e){return e.selection})),b=t.data,x=function(){var e=Object(kt.a)(At.a.mark((function e(t){var a,r,s,g,x,O,j,E,S,C,_,T,w,L;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a="number"===typeof t,c(!0),i((function(){c(!1),i(null)})),!a){e.next=18;break}if(r=In(b),s=Object(o.a)(r,3),g=s[0],x=s[1],O=s[2],j={resolution:t,xSlice:g,ySlice:x,zSlice:O,use3d:a},y){e.next=13;break}return e.next=9,Pn({loader:b,selections:v,use3d:a});case 9:E=e.sent,S=E.sliders,j.channels=Object(p.a)(f),j.channels.forEach((function(e,t){e.slider=S[t]}));case 13:n(j),C=Object(Ft.m)(b,{height:d,width:m},1.5,!0,new Vt.Matrix4(h)),u(Object(l.a)({},C,{rotationX:0,rotationOrbit:0})),e.next=27;break;case 18:return e.next=20,Pn({loader:b,selections:v,use3d:a});case 20:_=e.sent,T=_.sliders,(w=Object(p.a)(f)).forEach((function(e,t){e.slider=T[t]})),n({resolution:t,use3d:a,spatialAxisFixed:!1,channels:w}),L=Object(Ft.m)(b,{height:d,width:m},.5,!1,new Vt.Matrix4(h)),u(Object(l.a)({},L,{rotationX:null,rotationOrbit:null,orbitAxis:null}));case 27:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),O=Array.isArray(b)?b[0]:b,j=O.labels,E=O.shape[j.indexOf("z")]>1;return s.a.createElement(s.a.Fragment,null,s.a.createElement(tl.a,{native:!0,value:a,onChange:function(e){return x("2D"===e.target.value?e.target.value:Number(e.target.value))},classes:{root:g.selectRoot}},s.a.createElement("option",{key:"2D",value:"2D"},"2D Visualization"),Array.from({length:b.length}).fill(0).map((function(e,t){if(b&&pn(b,t)){var n=cn(b,t),a=n.height,o=n.width,i=n.depthDownsampled,l=n.totalBytes;return s.a.createElement("option",{key:"(".concat(a,", ").concat(o,", ").concat(i,")"),value:t,disabled:r||!E},"3D: ".concat(t,"x Downsampled, ~").concat(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(0===e)return"0 Bytes";var n=1024,a=t<0?0:t,r=["Bytes","KB","MB","GB"],o=Math.floor(Math.log(e)/Math.log(n));return"".concat(parseFloat((e/Math.pow(n,o)).toFixed(a))," ").concat(r[o])}(l)," per channel, (").concat(a,", ").concat(o,", ").concat(i,")"))}return null}))))}function xc(e){var t=e.value,n=e.inputId,a=e.handleChange,r=Xl();return s.a.createElement(tl.a,{native:!0,onChange:function(e){return a(""===e.target.value?null:e.target.value)},value:t,inputProps:{name:"colormap",id:n},style:{width:"100%"},classes:{root:r.selectRoot}},s.a.createElement("option",{"aria-label":"None",value:""},"None"),nn.map((function(e){return s.a.createElement("option",{key:e,value:e},e)})))}function Oc(e){var t=e.value,n=e.handleChange;return s.a.createElement(Bs.a,{style:{float:"left",padding:0},color:"default",onChange:function(){n(t?null:[0,0,0])},checked:Boolean(t)})}function jc(e){var t=e.value,n=e.handleChange;return s.a.createElement(Ys.a,{value:t,onChange:function(e,t){return n(t)},valueLabelDisplay:"auto",getAriaLabel:function(){return"opacity slider"},min:0,max:1,step:.01,orientation:"horizontal",style:{marginTop:"7px"}})}function Ec(e){var t=e.value,n=e.inputId,a=e.handleChange,r=Xl();return s.a.createElement(tl.a,{native:!0,onChange:function(e){return a(e.target.value)},value:t,inputProps:{name:"domain-selector",id:n},style:{width:"100%"},classes:{root:r.selectRoot}},vc.map((function(e){return s.a.createElement("option",{key:e,value:e},e)})))}function Sc(e){var t=e.field,n=e.value,a=e.handleChange,r=e.possibleValues;return s.a.createElement(Wl,{value:n,onChange:function(e,n){a({selection:Object(c.a)({},t,n),event:e})},onChangeCommitted:function(e,n){a({selection:Object(c.a)({},t,n),event:e})},valueLabelDisplay:"auto",getAriaLabel:function(){return"".concat(t," slider")},marks:r.map((function(e){return{value:e}})),min:Number(r[0]),max:Number(r.slice(-1)),orientation:"horizontal",step:null})}function Cc(e){var t=e.name,n=e.inputId,a=e.children;return s.a.createElement(wl.a,{container:!0,direction:"row",alignItems:"center",justifyContent:"center"},s.a.createElement(wl.a,{item:!0,xs:6},s.a.createElement(Fl.a,{htmlFor:n},t,":")),s.a.createElement(wl.a,{item:!0,xs:6},a))}var _c=function(e){var t=e.colormap,n=e.opacity,a=e.handleColormapChange,r=e.handleOpacityChange,o=e.handleTransparentColorChange,i=e.globalControlLabels,l=e.globalLabelValues,c=e.handleGlobalChannelsSelectionChange,p=e.handleSliderChange,u=e.handleDomainChange,d=e.transparentColor,m=e.channels,f=e.domainType,y=e.disableChannelsIfRgbDetected,h=e.shouldShowTransparentColor,g=e.shouldShowDomain,v=e.shouldShowColormap,b=e.use3d,x=e.loader,O=e.handleMultiPropertyChange,j=e.resolution,E=e.disable3d,S=e.setRasterLayerCallback,C=e.setAreAllChannelsLoading,_=e.setViewState,T=e.spatialHeight,w=e.spatialWidth,L=e.modelMatrix,P=Array.isArray(x.data)?x.data[0]:x.data,I=P.labels,A=P.shape,k=I.length>0&&m.length>0,R=A[I.indexOf("z")]>1,N=Boolean(Array.from({length:x.data.length}).filter((function(e,t){return pn(x.data,t)})).length);return s.a.createElement(wl.a,{container:!0,direction:"column",style:{width:"100%"}},R&&!E&&N&&s.a.createElement(bc,{loader:x,handleSliderChange:p,handleDomainChange:u,channels:m,handleMultiPropertyChange:O,resolution:j,disable3d:E,setRasterLayerCallback:S,setAreAllChannelsLoading:C,setViewState:_,spatialHeight:T,spatialWidth:w,use3d:b,modelMatrix:L}),k&&!b&&i.map((function(e){return A[I.indexOf(e)]>1&&s.a.createElement(Cc,{name:e,inputId:"".concat(e,"-slider"),key:e},s.a.createElement(Sc,{field:e,value:l[e],handleChange:c,possibleValues:ct()(A[I.indexOf(e)])}))})),y?null:s.a.createElement(s.a.Fragment,null,v&&s.a.createElement(wl.a,{item:!0},s.a.createElement(Cc,{name:"Colormap",inputId:"colormap-select"},s.a.createElement(xc,{value:t||"",inputId:"colormap-select",handleChange:a}))),g&&s.a.createElement(wl.a,{item:!0},s.a.createElement(Cc,{name:"Domain",inputId:"domain-selector"},s.a.createElement(Ec,{value:f||"Min/Max",handleChange:function(e){u(e)}})))),!b&&s.a.createElement(wl.a,{item:!0},s.a.createElement(Cc,{name:"Opacity",inputId:"opacity-slider"},s.a.createElement(jc,{value:n,handleChange:r}))),h&&!b&&s.a.createElement(wl.a,{item:!0},s.a.createElement(Cc,{name:"Zero Transparent",inputId:"transparent-color-selector"},s.a.createElement(Oc,{value:d,handleChange:o}))))},Tc=n(1267),wc=Object(ve.a)((function(e){return Object(dl.a)({enabled:{},disabled:{color:e.palette.text.disabled,"& .MuiSlider-thumb":{color:"rgb(100, 100, 100, 1.0)"},"&  .MuiSlider-track":{color:"rgb(100, 100, 100, 1.0)"}}})})),Lc=function(e){var t=e.xSlice,n=e.ySlice,a=e.zSlice,r=e.handleSlicerSetting,i=e.loader,l=e.use3d,c=In(i.data),p=Object(o.a)(c,3),u=[[t,function(e){return r("x",e)},"x",p[0]],[n,function(e){return r("y",e)},"y",p[1]],[a,function(e){return r("z",e)},"z",p[2]]],d=wc(),m=u.map((function(e){var t=Object(o.a)(e,4),n=t[0],a=t[1],r=t[2],i=Object(o.a)(t[3],2),c=i[0],p=i[1];return s.a.createElement(wl.a,{container:!0,direction:"row",justifyContent:"flex-start",alignItems:"center",key:r},s.a.createElement(wl.a,{item:!0,xs:1},s.a.createElement(rc.a,{className:l?d.enabled:d.disabled,style:{marginBottom:0}},r,":")),s.a.createElement(wl.a,{item:!0,xs:11},s.a.createElement(Ys.a,{disabled:!l,className:l?d.enabled:d.disabled,value:n,onChange:function(e,t){return a(t)},valueLabelDisplay:"auto",valueLabelFormat:function(e){return function(e){var t=5;Number.isInteger(e)||--t,e<1&&--t;var n=Intl.NumberFormat("en-US",{maximumSignificantDigits:t,useGrouping:!1}).format(e);return n.length<=5?n:e.toExponential(0)}(e)},getAriaLabel:function(){return"".concat(r," slider")},min:c,max:p,step:.005,orientation:"horizontal"})))}));return s.a.createElement(s.a.Fragment,null,s.a.createElement(rc.a,{className:l?d.enabled:d.disabled,style:{marginTop:16,marginBottom:0}},"Clipping Planes:"," ")," ",m)},Pc=Object.values(Ft.g);function Ic(e){var t=e.handleRenderingModeChange,n=e.renderingMode,a=e.use3d,r=Xl(),o=a?Pc:[].concat(Object(p.a)(Pc),[""]);return s.a.createElement(Tc.a,{fullWidth:!0},s.a.createElement(Fl.a,{htmlFor:"rendering-mode-select"},"Rendering Mode"),s.a.createElement(tl.a,{native:!0,onChange:function(e){return t(e.target.value)},value:a?n:"",inputProps:{name:"rendering-mode",id:"rendering-mode-select"},disabled:!a,classes:{root:r.selectRoot}},o.map((function(e){return s.a.createElement("option",{key:e,value:e},e)}))))}var Ac=function(e){var t=e.setViewState,n=e.use3d,a=e.spatialHeight,r=e.spatialWidth,o=e.loader,i=e.modelMatrix;return s.a.createElement(wl.a,{item:!0,xs:"auto",key:"recenter"},s.a.createElement(ic.a,{onClick:function(){var e=Object(Ft.m)(o.data,{height:a,width:r},1.5,n,new Vt.Matrix4(i));t(Object(l.a)({},e,{rotationX:0,rotationOrbit:0}))},disabled:!n,style:{padding:0,marginBottom:6}},"Re-Center"))},kc=function(e){var t=e.handleSlicerSetting,n=e.handleRenderingModeChange,a=e.renderingMode,r=e.xSlice,o=e.ySlice,i=e.zSlice,l=e.use3d,c=e.loader,p=e.setViewState,u=e.spatialHeight,d=e.spatialWidth,m=e.modelMatrix;return s.a.createElement(s.a.Fragment,null,s.a.createElement(Ic,{handleRenderingModeChange:n,renderingMode:a,use3d:l}),s.a.createElement(Lc,{xSlice:r,ySlice:o,zSlice:i,handleSlicerSetting:t,use3d:l,loader:c}),s.a.createElement(Ac,{setViewState:p,use3d:l,spatialHeight:u,spatialWidth:d,loader:c,modelMatrix:m}))};function Rc(e){var t=e.children,n=e.value,a=e.index,r=Object(_o.a)(e,["children","value","index"]);return s.a.createElement("div",Object.assign({role:"tabpanel",hidden:n!==a,id:"simple-tabpanel-".concat(a),"aria-labelledby":"simple-tab-".concat(a)},r),n===a&&t)}function Nc(e,t,n,a){return Mc.apply(this,arguments)}function Mc(){return(Mc=Object(kt.a)(At.a.mark((function e(t,n,a,r){var o,i,s,l;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pn({loader:t.data,selections:n,use3d:r});case 2:return i=e.sent,s=i.sliders,"Min/Max"===a&&(o=i.domains),"Full"===a&&(l=g(t),o=n.map((function(){return Dl[l.dtype]}))),e.abrupt("return",{domains:o,sliders:s});case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Dc={borderStyle:"dashed",marginTop:"10px",fontWeight:400};function Gc(e){var t,n=e.layer,a=e.name,r=e.loader,u=e.theme,d=e.handleLayerRemove,m=e.handleLayerChange,f=e.shouldShowTransparentColor,y=e.shouldShowDomain,h=e.shouldShowColormap,g=e.ChannelController,b=e.setViewState,x=e.disable3d,O=e.setRasterLayerCallback,j=e.setAreLayerChannelsLoading,E=e.areLayerChannelsLoading,S=e.disabled,C=e.spatialHeight,_=e.spatialWidth,T=e.disableChannelsIfRgbDetected,w=e.shouldShowRemoveLayerButton,L=n.colormap,P=n.opacity,I=n.channels,A=n.transparentColor,k=n.renderingMode,R=n.xSlice,N=n.ySlice,M=n.zSlice,D=n.resolution,G=n.use3d,z=n.modelMatrix,H=Object(i.useRef)(I);Object(i.useEffect)((function(){H.current=I}),[I]);var F=(null===(t=I[0])||void 0===t?void 0:t.selection)||{},X=r.data,Z=r.channels,V=Object(i.useState)(0),B=Object(o.a)(V,2),Y=B[0],U=B[1],q=Array.isArray(X)?X[X.length-1]:X,W=q.labels,$=q.shape,J=Object(i.useState)(n.domainType),K=Object(o.a)(J,2),Q=K[0],ee=K[1],te=Object(i.useState)(!0),ne=Object(o.a)(te,2),ae=ne[0],re=ne[1],oe=Object(i.useState)(un.filter((function(e){return"number"===typeof F[e]})).reduce((function(e,t){return Object(l.a)({},e,Object(c.a)({},t,F[t]))}),{})),ie=Object(o.a)(oe,2),se=ie[0],le=ie[1];function ce(e){m(Object(l.a)({},n,{opacity:e}))}function pe(e){m(Object(l.a)({},n,{channels:e}))}function ue(e,t){m(Object(l.a)({},n,{channels:e,domainType:t}))}function de(e,t){var a=Object(p.a)(H.current);a[t]=e,m(Object(l.a)({},n,{channels:a}))}function me(e){var t=[].concat(Object(p.a)(H.current),[e]);m(Object(l.a)({},n,{channels:t}))}var fe=function(e){var t=H.current.map((function(){return e}));j(t)},ye=function(){var e=Object(kt.a)(At.a.mark((function e(){var t,n,a,o,i,s,c,u,d,m;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={},W.forEach((function(e){t[e]=un.includes(e)&&se[e]||0})),e.next=4,Nc(r,[t],Q,G);case 4:n=e.sent,a=n.domains,o=n.sliders,i=a[0],s=i,c=[255,255,255],!0,u=I.length,(d=Object(p.a)(E))[u]=!0,j(d),m={selection:t,slider:s,visible:!0,color:c},O((function(){de(Object(l.a)({},m,{slider:o[0]}),u);var e=Object(p.a)(d);e[u]=!1,j(e),O(null)})),me(m);case 18:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),he=function(){var e=Object(kt.a)(At.a.mark((function e(t){var n,a,i,s;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return ee(t),n=I.map((function(e){return e.selection})),a=I.map((function(e){return e.slider})),e.next=5,Nc(r,n,t,G);case 5:i=e.sent,s=i.domains,a=a.map((function(e,t){var n=Object(o.a)(e,2),a=n[0],r=n[1];return[Math.max(a,s[t][0]),Math.min(r,s[t][1])]})),ue(I.map((function(e,t){return Object(l.a)({},e,{slider:a[t]})})),t);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ge=function(){var e=Object(kt.a)(At.a.mark((function e(t){var n,a,o;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.selection,a=t.event,o=I.map((function(e){return Object(l.a)({},e.selection,{},n)})),("mouseup"===a.type||"keydown"===a.type)&&(fe(!0),Nc(r,o,Q,G).then((function(e){var t=e.sliders,a=I.map((function(e){return Object(l.a)({},e,{selection:Object(l.a)({},e.selection,{},n)})}));O((function(){O(null),fe(!1),pe(Object(p.a)(a).map((function(e,n){return Object(l.a)({},e,{slider:t[n]})})))})),pe(a)}))),le((function(e){return Object(l.a)({},e,{},n)}));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ve=[];if(W.length>0){var be=W.find((function(e){return"channel"===e||"c"===e}))||W[0];ve=I.map((function(e,t){var a=function(e){var n=Object(p.a)(E);n[t]=e,j(n)},i=function(){var n=Object(kt.a)(At.a.mark((function n(){var a,o,i,s,c,p;return At.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=r.data,o=Array.isArray(a)?a[a.length-1]:a,n.next=4,o.getRaster({selection:I[t].selection});case 4:i=n.sent,s=Object(Ft.l)(i.data),c=s.q1,p=s.q3,de(Object(l.a)({},e,{slider:[c,p]}),t);case 8:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}();return s.a.createElement(g,{key:"channel-controller-".concat(t),dimName:be,visibility:e.visible,selectionIndex:e.selection[be],slider:e.slider,color:e.color,channels:I,channelId:t,domainType:Q,loader:r,globalLabelValues:se,theme:u,channelOptions:Z,colormapOn:Boolean(L),handlePropertyChange:function(n,i){var s=Object(c.a)({},n,i);"selection"===n?(a(!0),s.selection=Object(l.a)({},se,{},s.selection),de(Object(l.a)({},e,{},s),t),O(Object(kt.a)(At.a.mark((function c(){var p,u,d,m;return At.a.wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return p=[Object(l.a)({},I[t][n],{},i)],c.next=3,Nc(r,p,Q,G);case 3:u=c.sent,d=u.sliders,m=Object(o.a)(d,1),s.slider=m[0],de(Object(l.a)({},e,{},s),t),O(null),a(!1);case 10:case"end":return c.stop()}}),c)}))))):de(Object(l.a)({},e,{},s),t)},handleChannelRemove:function(){!function(e){var t=Object(p.a)(H.current);t.splice(e,1),m(Object(l.a)({},n,{channels:t}))}(t)},handleIQRUpdate:i,setRasterLayerCallback:O,isLoading:E[t],use3d:G})}))}var xe=Vl(),Oe=n.visible,je="boolean"!==typeof Oe||Oe?yc.a:gc.a,Ee=Boolean(Array.from({length:r.data.length}).filter((function(e,t){return pn(r.data,t)})).length),Se=!x&&$[W.indexOf("z")]>1&&Ee,Ce=s.a.createElement(s.a.Fragment,null,s.a.createElement(_c,{channels:I,opacity:P,colormap:L,transparentColor:A,domainType:Q,globalControlLabels:W.filter((function(e){return un.includes(e)})),globalLabelValues:se,handleOpacityChange:ce,handleColormapChange:function(e){m(Object(l.a)({},n,{colormap:e}))},handleGlobalChannelsSelectionChange:ge,handleTransparentColorChange:function(e){m(Object(l.a)({},n,{transparentColor:e}))},disableChannelsIfRgbDetected:v(r)&&T,handleDomainChange:he,shouldShowTransparentColor:f,shouldShowDomain:y,shouldShowColormap:h,use3d:G,loader:r,handleMultiPropertyChange:function(e){m(Object(l.a)({},n,{},e))},resolution:D,disable3d:x,setRasterLayerCallback:O,setAreAllChannelsLoading:fe,setViewState:b,spatialHeight:C,spatialWidth:_,modelMatrix:z}),v(r)&&T?null:ve,v(r)&&T?null:s.a.createElement(ic.a,{disabled:I.length===Ft.e,onClick:ye,fullWidth:!0,variant:"outlined",style:Dc,startIcon:s.a.createElement(lc.a,null),size:"small"},"Add Channel"));return s.a.createElement(uc.a,{className:xe.root,onChange:function(e,t){var n,a,r;return!S&&re(t&&"presentation"===(null===e||void 0===e||null===(n=e.target)||void 0===n||null===(a=n.attributes)||void 0===a||null===(r=a.role)||void 0===r?void 0:r.value))},TransitionProps:{enter:!1},expanded:!S&&ae},s.a.createElement(Yl,{expandIcon:s.a.createElement(mc.a,{role:"presentation"}),"aria-controls":"layer-".concat(a,"-controls")},s.a.createElement(wl.a,{container:!0,direction:"column",m:1,justifyContent:"center"},s.a.createElement(ql,{item:!0},s.a.createElement(ic.a,{onClick:function(e){var t;S||(e.stopPropagation(),t="boolean"===typeof Oe&&!Oe,m(Object(l.a)({},n,{visible:t})))},style:{marginRight:8,marginBottom:2,padding:0,minWidth:0}},s.a.createElement(je,null)),a),!S&&!ae&&!G&&s.a.createElement(wl.a,{container:!0,direction:"row",alignItems:"center",justifyContent:"center"},s.a.createElement(wl.a,{item:!0,xs:6},s.a.createElement(Ul,{htmlFor:"layer-".concat(a,"-opacity-closed")},"Opacity:")),s.a.createElement(wl.a,{item:!0,xs:6},s.a.createElement(Ys.a,{id:"layer-".concat(a,"-opacity-closed"),value:P,onChange:function(e,t){return ce(t)},valueLabelDisplay:"auto",getAriaLabel:function(){return"opacity slider"},min:0,max:1,step:.01,orientation:"horizontal"}))))),s.a.createElement(Bl,null,Se?s.a.createElement(s.a.Fragment,null,s.a.createElement(cc.a,{value:Y,onChange:function(e,t){U(t)},"aria-label":"simple tabs example",style:{height:"24px",minHeight:"24px"}},s.a.createElement(pc.a,{label:"Channels",style:{fontSize:".75rem",bottom:12,width:"50%",minWidth:"50%"},disableRipple:!0}),s.a.createElement(pc.a,{label:"Volume",style:{fontSize:".75rem",bottom:12,width:"50%",minWidth:"50%"}})),s.a.createElement(Rc,{value:Y,index:0},Ce),s.a.createElement(Rc,{value:Y,index:1,style:{marginTop:4}},s.a.createElement(kc,{loader:r,handleSlicerSetting:function(e,t){m(Object(l.a)({},n,Object(c.a)({},"".concat(e,"Slice"),t)))},handleRenderingModeChange:function(e){m(Object(l.a)({},n,{renderingMode:e}))},renderingMode:k,xSlice:R,ySlice:N,zSlice:M,use3d:G,setViewState:b,spatialHeight:C,spatialWidth:_,modelMatrix:z}))):Ce,w?s.a.createElement(ic.a,{onClick:d,fullWidth:!0,variant:"outlined",style:Dc,size:"small"},"Remove Image Layer"):null))}var zc=Object(ve.a)((function(){return{addButton:{marginTop:"10px",marginBottom:"10px",fontWeight:400}}}));function Hc(){return s.a.createElement(s.a.Fragment,null,s.a.createElement(lc.a,null),"Add Image Layer")}var Fc=function(e){var t=e.imageOptions,n=e.handleImageAdd,a=Object(i.useState)(!1),r=Object(o.a)(a,2),l=r[0],c=r[1],p=zc();return t?s.a.createElement(eo,{open:l,setOpen:c,buttonIcon:s.a.createElement(Hc,null),buttonClassName:p.addButton,placement:"bottom-start"},t.map((function(e,t){return s.a.createElement(Nr.a,{dense:!0,key:e.name,onClick:function(){return function(e){c((function(e){return!e})),n(e)}(t)}},s.a.createElement("span",null,e.name))}))):null},Xc=["raster"],Zc=s.a.memo(Object(i.forwardRef)((function(e,t){var n=e.title,a=e.removeGridComponent,r=e.theme,o=e.isReady,i=e.moleculesLayer,l=e.dataset,c=e.setMoleculesLayer,u=e.cellsLayer,d=e.canShowCellVecmask,m=e.setCellsLayer,f=e.rasterLayers,y=e.imageLayerLoaders,h=e.imageLayerMeta,g=e.rasterLayersCallbacks,v=e.setRasterLayersCallbacks,b=e.areLoadingRasterChannnels,x=e.setAreLoadingRasterChannnels,O=e.handleRasterLayerChange,j=e.handleRasterLayerRemove,E=e.disable3d,S=e.globalDisable3d,C=e.disableChannelsIfRgbDetected,_=e.layerIs3DIndex,T=e.setZoom,w=e.setTargetX,L=e.setTargetY,P=e.setTargetZ,I=e.setRotationX,A=e.setRotationOrbit,k=e.componentHeight,R=e.componentWidth,N=e.spatialLayout,M=e.handleImageAdd,D=e.enableLayerButtonsWithOneLayer,G=Boolean(D||(null===y||void 0===y?void 0:y.length)>1);return s.a.createElement(so,{title:n,isScroll:!0,removeGridComponent:a,theme:r,isReady:o},s.a.createElement("div",{className:"layer-controller-container",ref:t},i&&s.a.createElement(oc,{key:"".concat(l,"-molecules"),label:"Molecules",layerType:"molecules",layer:i,handleLayerChange:c}),u&&d&&s.a.createElement(oc,{key:"".concat(l,"-cells"),label:"Cell Segmentations",layerType:"cells",layer:u,handleLayerChange:m}),f&&f.map((function(e,t){var n,a=e.index,o=y[a],i=h[a],c=!(null===i||void 0===i||null===(n=i.metadata)||void 0===n?void 0:n.isBitmask),u=c?ec:ac,d=(b||[])[t]||[];return o&&i?s.a.createElement(wl.a,{key:"".concat(l,"-raster-").concat(a,"-").concat(t),item:!0,style:{marginTop:"10px"}},s.a.createElement(Gc,{name:i.name,layer:e,loader:o,theme:r,handleLayerChange:function(e){return O(e,t)},handleLayerRemove:function(){return j(t)},ChannelController:u,shouldShowTransparentColor:c,shouldShowDomain:c,shouldShowColormap:c,disable3d:S||(E||[]).indexOf(i.name)>=0||"number"===typeof _&&-1!==_&&_!==t,disabled:"number"===typeof _&&-1!==_&&_!==t,disableChannelsIfRgbDetected:C,rasterLayersCallbacks:g,setRasterLayerCallback:function(e){var n=Object(p.a)(g||[]);n[t]=e,v(n)},setViewState:function(e){var t=e.zoom,n=e.target,a=e.rotationX,r=e.rotationOrbit;T(t),w(n[0]),L(n[1]),P(n[2]),I(a),A(r)},setAreLayerChannelsLoading:function(e){var n=Object(p.a)(b||[]);n[t]=e,x(n)},areLayerChannelsLoading:d,spatialHeight:k*(N?N.h:1)/12,spatialWidth:R*(N?N.w:1)/12,shouldShowRemoveLayerButton:G})):null})),G?s.a.createElement(wl.a,{item:!0},s.a.createElement(Fc,{imageOptions:h,handleImageAdd:M})):null))})));var Vc=function(e){var t=e.coordinationScopes,n=e.removeGridComponent,a=e.theme,r=e.title,c=void 0===r?"Spatial Layers":r,u=e.disable3d,d=e.globalDisable3d,m=e.disableChannelsIfRgbDetected,f=e.enableLayerButtonsWithOneLayer,y=$e(),h=Ue(vr.layerController,t),g=Object(o.a)(h,2),v=g[0],b=v.dataset,x=v.spatialRasterLayers,O=v.spatialCellsLayer,j=v.spatialMoleculesLayer,E=g[1],S=E.setSpatialRasterLayers,C=E.setSpatialCellsLayer,_=E.setSpatialMoleculesLayer,T=E.setSpatialTargetX,w=E.setSpatialTargetY,L=E.setSpatialTargetZ,P=E.setSpatialRotationX,I=E.setSpatialRotationOrbit,A=E.setSpatialZoom,k=We(vr.layerController,t),R=Object(o.a)(k,2),N=R[0],M=N.rasterLayersCallbacks,D=N.areLoadingRasterChannnels,G=R[1],z=G.setRasterLayersCallbacks,H=G.setAreLoadingRasterChannnels,F=function(e,t,n){return Re((function(a){return a.viewConfig.layout.filter((function(t){return t.component===e})).filter((function(e){return t.every((function(t){return e.coordinationScopes[t]===n[t]}))}))}))}("spatial",["spatialRasterLayers"],t),X=Object(o.a)(F,1)[0],Z=Object(i.useRef)(),V=tr(Z),B=Object(o.a)(V,2),Y=B[0],U=B[1],q=function(){var e=Object(i.useState)(Wa()),t=Object(o.a)(e,2),n=t[0],a=t[1];return Object(i.useEffect)((function(){var e=qa()((function(){a(Wa())}),100,{trailing:!0});return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),n}(),W=q.height,$=q.width,J=Qa(Xc),K=Object(o.a)(J,4),Q=K[0],ee=K[1],te=(K[2],K[3]);Object(i.useEffect)((function(){te()}),[y,b]);var ne=Ar(y,b,ee,(function(){}),!1,{setSpatialRasterLayers:S},{spatialRasterLayers:x}),ae=Object(o.a)(ne,3),re=(ae[0],ae[1]),oe=ae[2];_r(y,b,ee,(function(){}),!1,{setSpatialCellsLayer:C},{spatialCellsLayer:O}),Ir(y,b,ee,(function(){}),!1,{setSpatialMoleculesLayer:_},{spatialMoleculesLayer:j});var ie=Object(i.useCallback)(function(){var e=Object(kt.a)(At.a.mark((function e(t){var n,a,r,o,i,s,c,u,d;return At.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=re[t],e.next=3,Rn(s,(x[t]||{}).use3d);case 3:c=e.sent,u=Object(l.a)({index:t,modelMatrix:null===(n=oe[t])||void 0===n||null===(a=n.metadata)||void 0===a||null===(r=a.transform)||void 0===r?void 0:r.matrix},dn,{channels:c,type:(null===(o=oe[t])||void 0===o||null===(i=o.metadata)||void 0===i?void 0:i.isBitmask)?"bitmask":"raster"}),d=[].concat(Object(p.a)(x),[u]),S(d);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[re,oe,x,S]),se=Object(i.useCallback)((function(e,t){var n=Object(p.a)(x);n[t]=e,S(n)}),[x,S]),le=Object(i.useCallback)((function(e){var t=Object(p.a)(x);t.splice(e,1),S(t)}),[x,S]),ce=(oe.length?oe:[{metadata:{isBitmask:!0}}]).every((function(e){var t;return!(null===e||void 0===e||null===(t=e.metadata)||void 0===t?void 0:t.isBitmask)})),pe=(null===x||void 0===x?void 0:x.findIndex)&&x.findIndex((function(e){return e.use3d}));return s.a.createElement(Zc,{ref:Z,title:c,removeGridComponent:n,theme:a,isReady:Q,moleculesLayer:j,dataset:b,setMoleculesLayer:_,cellsLayer:O,canShowCellVecmask:ce,setCellsLayer:C,rasterLayers:x,imageLayerLoaders:re,imageLayerMeta:oe,rasterLayersCallbacks:M,setRasterLayersCallbacks:z,areLoadingRasterChannnels:D,setAreLoadingRasterChannnels:H,handleRasterLayerChange:se,handleRasterLayerRemove:le,disable3d:u,globalDisable3d:d,layerIs3DIndex:pe,disableChannelsIfRgbDetected:m,enableLayerButtonsWithOneLayer:f,setZoom:A,setTargetX:T,setTargetY:w,setTargetZ:L,setRotationX:P,setRotationOrbit:I,componentHeight:U||W,componentWidth:Y||$,spatialLayout:X,handleImageAdd:ie})},Bc=n(522),Yc=n(711),Uc=n(523),qc=xo.dependencies["window-pixi"],Wc=xo.dependencies.higlass,$c="https://unpkg.com/window-pixi@".concat(qc,"/dist/pixi.").concat("min.js"),Jc="https://unpkg.com/higlass@".concat(Wc,"/dist/hglib.").concat("min.js");Bc.a&&Bc.a.initialize(),Object(Yc.a)({dataFetcher:Uc.a,config:Uc.a.config},{pluginType:"dataFetcher"});var Kc=s.a.lazy((function(){return window.React||(window.React=s.a),window.ReactDOM||(window.ReactDOM=r.a),new Promise((function(e){var t=function(t){var n;console.warn(t),e(ln((n={title:"Could not load HiGlass",message:"The HiGlass scripts could not be dynamically imported."},function(){var e=n.title,t=n.message;return s.a.createElement("div",{className:le},s.a.createElement("h1",null,e),s.a.createElement("div",null,t))})))};__import__($c).then((function(){__import__(Jc).then((function(){e(ln(window.hglib.HiGlassComponent))})).catch(t)})).catch(t)}))}));function Qc(e){var t=e.coordinationScopes,n=e.theme,a=e.hgViewConfig,r=e.hgOptions,c=e.genomeSize,p=e.height,u=Ue(vr.higlass,t),d=Object(o.a)(u,2),m=d[0],f=m.genomicZoomX,y=m.genomicZoomY,h=m.genomicTargetX,g=m.genomicTargetY,v=d[1],b=v.setGenomicZoomX,x=v.setGenomicZoomY,O=v.setGenomicTargetX,j=v.setGenomicTargetY,E=Ja(),S=Object(o.a)(E,3),C=S[0],_=(S[1],S[2]),T=Object(i.useState)(),w=Object(o.a)(T,2),L=w[0],P=w[1],I=Object(i.useRef)(),A=Object(i.useMemo)((function(){return Object(l.a)({},r,{theme:n})}),[r,n]),k=Object(i.useMemo)((function(){var e=h,t=c/Math.pow(2,f),n=C/800,r=[e-t*n/2,e+t*n/2],o=g,i=c/Math.pow(2,y),s=p/800,u=[o-i*s/2,o+i*s/2];return{editable:!1,zoomFixed:!1,trackSourceServers:["//higlass.io/api/v1"],exportViewUrl:"//higlass.io/api/v1/viewconfs",views:[Object(l.a)({uid:"main"},a,{initialXDomain:r,initialYDomain:u})],zoomLocks:{locksByViewUid:{},locksDict:{}},locationLocks:{locksByViewUid:{},locksDict:{}},valueScaleLocks:{locksByViewUid:{},locksDict:{}}}}),[h,c,f,C,g,y,p,a]);return Object(i.useEffect)((function(){var e=function(){I.current=!0},t=function(){I.current=!1},n=_.current;return n.addEventListener("mouseenter",e),n.addEventListener("mouseleave",t),function(){n.removeEventListener("mouseenter",e),n.removeEventListener("mouseenter",t)}}),[_]),Object(i.useEffect)((function(){return L?(L.api.on("viewConfig",(function(e){if(I.current){var t=JSON.parse(e),n=t.views[0].initialXDomain,a=t.views[0].initialYDomain,r=Math.log2(c/((n[1]-n[0])*(800/C))),o=Math.log2(c/((a[1]-a[0])*(800/p))),i=n[0]+(n[1]-n[0])/2,s=a[0]+(a[1]-a[0])/2;b(r),x(o),O(i),j(s)}})),function(){return L.api.off("viewConfig")}):function(){}}),[L,c,C,p,b,x,O,j]),s.a.createElement("div",{className:"higlass-wrapper-parent"},s.a.createElement("div",{className:"higlass-wrapper",ref:_,style:{height:"".concat(p,"px")}},s.a.createElement(i.Suspense,{fallback:s.a.createElement("div",null,"Loading...")},s.a.createElement(Kc,{ref:P,zoomFixed:!1,viewConfig:k,options:A}))))}Qc.defaultProps={hgOptions:{bounded:!0,pixelPreciseMarginPadding:!0,containerPaddingX:0,containerPaddingY:0,sizeMode:"default"},genomeSize:31e8};var ep=[];var tp=n(420),np=n(1278),ap="table";function rp(e){return"https://vega.github.io/schema/vega/v5.json"===e.$schema}function op(e){var t=e.spec,n=e.data,a=e.signalListeners,r=Object(l.a)({},t,{data:rp(t)?[{name:ap}].concat(Object(p.a)(t.data)):{name:ap}}),o=Object(i.useMemo)((function(){return s.a.createElement(np.a,{spec:r,data:Object(c.a)({},ap,n),signalListeners:a,tooltip:(new tp.a).call,renderer:"canvas",scaleFactor:3})}),[r,n,a]);return r&&n&&n.length>0?s.a.createElement(i.Suspense,{fallback:s.a.createElement("div",null,"Loading...")},o):null}var ip={dark:{background:null,title:{color:"#fff"},style:{"guide-label":{fill:"#fff"},"guide-title":{fill:"#fff"}},axis:{domainColor:"#fff",gridColor:"#888",tickColor:"#fff"}},light:{background:null}};function sp(e){var t=e.data,n=e.theme,a=e.width,r=e.height,o=e.marginRight,i=void 0===o?90:o,c=e.marginBottom,p=void 0===c?120:c,u=e.keyLength,d=void 0===u?36:u,m=t.map((function(e){return Object(l.a)({},e,{keyName:e.key+e.name,colorString:Kn(e.color)})})),f={domain:m.map((function(e){return e.key})),range:m.map((function(e){return e.colorString}))},y=m.map((function(e){return e.keyName})),h={mark:{type:"bar"},encoding:{x:{field:"keyName",type:"nominal",axis:{labelExpr:"substring(datum.label, ".concat(d,")")},title:"Cell Set",sort:y},y:{field:"size",type:"quantitative",title:"Cell Set Size"},color:{field:"key",type:"nominal",scale:f,legend:null},tooltip:{field:"size",type:"quantitative"}},width:il()(a-i,10,1/0),height:il()(r-p,10,1/0),config:ip[n]};return s.a.createElement(op,{data:m,spec:h})}var lp=["cell-sets"];var cp=n(1276),pp=["genomic-profiles"],up={hg38:{chromosomes:"NyITQvZsS_mOFNlz5C2LJg",genes:"P0PLbQMwTYGy-5uPIQid7A"},hg19:{chromosomes:"N12wVGG9SPiTkk03yUayUw",genes:"OHJakQICQD6gTD7skx4EWA"},mm9:{chromosomes:"WAVhNHYxQVueq6KulwgWiQ",genes:"GUm5aBiLRCyz2PsBea7Yzg"},mm10:{chromosomes:"EtrWT0VtScixmsmwFSd7zg",genes:"QDutvmyiSrec5nX4pA5WGQ"}};function dp(e){var t=e.geneSelection,n=e.data,a=e.theme,r=e.width,o=e.height,i=e.marginRight,l=void 0===i?90:i,c=e.marginBottom,p=void 0===c?50:c,u={mark:{type:"bar"},encoding:{x:{field:"value",type:"quantitative",bin:{maxbins:50},title:t&&t.length>=1?"Normalized Expression Value":"Total Normalized Transcript Count"},y:{type:"quantitative",aggregate:"count",title:"Number of Cells"},color:{value:"gray"}},width:il()(r-l,10,1/0),height:il()(o-p,10,1/0),config:ip[a]};return s.a.createElement(op,{data:n,spec:u})}var mp=["expression-matrix"];function fp(e,t,n,a,r,s,l,c,p){var u=Object(i.useMemo)((function(){return sn(n,a)}),[n,a]),d=Object(i.useMemo)((function(){if(u&&s&&r&&r.length>=1&&e){for(var n=function(e,t,n,a){for(var r=[],i=function(i){var s=t[i],l=da(e,s);if(l){var c,p=ca(l),u=(null===n||void 0===n||null===(c=n.find((function(e){return ge()(e.path,s)})))||void 0===c?void 0:c.color)||Qt(a);r=r.concat(p.map((function(e){return{obsId:Object(o.a)(e,1)[0],name:l.name,color:u}})))}},s=0;s<t.length;s+=1)i(s);return r}(u,s,l,p),a=r[0],i=-1/0,d={},m=0;m<t.rows.length;m+=1)d[t.rows[m]]=m;return[n.map((function(t){var n=d[t.obsId],r=100*e[0][n]/255,o=c?Math.log(1+r):r;return i=Math.max(o,i),{value:o,gene:a,set:t.name}})),i]}return[null,null]}),[e,t,r,p,u,s,l,c]),m=Object(o.a)(d,2),f=m[0],y=m[1];return[f,Object(i.useMemo)((function(){return u&&s&&l?Oa(u,s,l,p):[]}),[u,s,l,p]),y]}function yp(e){var t=e.toggleGeneExpressionTransform,n=e.useGeneExpressionTransform,a=Ws();return s.a.createElement(el,null,s.a.createElement(qs.a,null,s.a.createElement(Us.a,{className:a.labelCell},"Log Transform"),s.a.createElement(Us.a,{className:a.inputCell},s.a.createElement(Bs.a,{className:a.checkbox,checked:Boolean(n),onChange:function(){t()},name:"scatterplot-option-cell-set-labels",color:"default"}))))}function hp(e){var t=e.domainMax,n=void 0===t?100:t,a=e.colors,r=e.data,o=e.theme,i=e.width,c=e.height,p=e.marginRight,u=void 0===p?90:p,d=e.marginBottom,m=e.useGeneExpressionTransform,f=r.reduce((function(e,t){return e=void 0===e||t.set.length>e?t.set.length:e}),0),y=d||30+30*Math.sqrt(f/2),h={domain:a.map((function(e){return e.name})),range:a.map((function(e){return Kn(e.color)}))},g=il()(i-u,10,1/0),v=il()(c-y,10,1/0),b=g/a.length,x="dark"===o?"white":"black",O={$schema:"https://vega.github.io/schema/vega/v5.json",description:"A violin plot showing distributions of expression levels for selected cell sets.",width:g,height:v,config:Object(l.a)({},ip[o],{axisBand:{bandPosition:1,tickExtra:!0,tickOffset:0}}),signals:[{name:"bandWidth",value:b},{name:"width",value:g},{name:"height",value:v},{name:"trim",value:!0}],data:[{name:"density",source:ap,transform:[{type:"kde",field:"value",groupby:["set"],bandwidth:0,extent:[0,n]}]},{name:"stats",source:ap,transform:[{type:"aggregate",groupby:["set"],fields:["value","value","value"],ops:["q1","median","q3"],as:["q1","median","q3"]}]}],scales:[{name:"layout",type:"band",range:"width",domain:{data:ap,field:"set"}},{name:"yscale",type:"linear",range:"height",domain:[0,n]},{name:"wscale",type:"linear",range:[0,{signal:"bandWidth"}],domain:{data:"density",field:"density"}},{name:"wscaleReversed",type:"linear",reverse:!0,range:[0,{signal:"bandWidth"}],domain:{data:"density",field:"density"}},Object(l.a)({name:"color",type:"ordinal"},h)],axes:[{orient:"left",scale:"yscale",zindex:1,title:m?["Log-Transformed","Normalized Expression Values"]:"Normalized Expression Values"},{orient:"bottom",scale:"layout",tickCount:5,zindex:1,title:"Cell Set",labelAngle:-45,labelAlign:"right"}],marks:[{type:"group",from:{facet:{data:"density",name:"violin",groupby:"set"}},encode:{enter:{xc:{scale:"layout",field:"set",band:.5},width:{signal:"bandWidth"},height:{signal:"height"}}},data:[{name:"summary",source:"stats",transform:[{type:"filter",expr:"datum.set === parent.set"}]}],marks:[{type:"area",orient:"vertical",from:{data:"violin"},encode:{enter:{fill:{scale:"color",field:{parent:"set"}}},update:{width:{scale:"wscale",field:"density"},xc:{signal:"bandWidth / 2"},y2:{scale:"yscale",field:"value"},y:{scale:"yscale",value:0}}}},{type:"area",orient:"vertical",from:{data:"violin"},encode:{enter:{fill:{scale:"color",field:{parent:"set"}}},update:{width:{scale:"wscaleReversed",field:"density"},xc:{signal:"bandWidth"},y2:{scale:"yscale",field:"value"},y:{scale:"yscale",value:0}}}},{type:"rect",from:{data:"summary"},encode:{enter:{fill:{value:x},width:{value:2}},update:{y:{scale:"yscale",field:"q1"},y2:{scale:"yscale",field:"q3"},xc:{signal:"bandWidth / 2"}}}},{type:"rect",from:{data:"summary"},encode:{enter:{fill:{value:x},height:{value:2},width:{value:8}},update:{y:{scale:"yscale",field:"median"},xc:{signal:"bandWidth / 2"}}}}]}]};return s.a.createElement(op,{data:r,spec:O})}var gp,vp=["cell-sets","expression-matrix"];var bp=(gp={},Object(c.a)(gp,b.DESCRIPTION,(function(e){var t=e.coordinationScopes,n=e.description,a=e.removeGridComponent,r=e.theme,l=e.title,c=void 0===l?"Data Set":l,p=$e(),u=Ue(vr.description,t),d=Object(o.a)(u,1)[0],m=d.dataset,f=d.spatialRasterLayers,y=Qa(co),h=Object(o.a)(y,4),g=h[0],v=h[1],b=(h[2],h[3]);Object(i.useEffect)((function(){b()}),[p,m]);var x=function(e,t){var n=Object(i.useState)(),a=Object(o.a)(n,2),r=a[0],s=a[1];return Object(i.useEffect)((function(){e[t]&&(e[t].description?s(e[t].description):s(null))}),[e,t]),[r]}(p,m),O=Object(o.a)(x,1)[0],j=Ar(p,m,v,(function(){}),!1),E=Object(o.a)(j,3),S=E[0],C=E[1],_=E[2],T=Object(i.useMemo)((function(){var e=new Map;return f&&f.length>0&&S&&_&&C&&f.forEach((function(t){if(_[t.index]){var n=C[t.index].metadata.format;e.set("".concat(t.index),{name:S.meta[t.index].name,metadata:n&&n()})}})),e}),[S,f,_,C]);return s.a.createElement(so,{title:c,removeGridComponent:a,isScroll:!0,theme:r,isReady:g},s.a.createElement(lo,{description:n||O,metadata:T}))})),Object(c.a)(gp,b.STATUS,(function(e){var t=e.coordinationScopes,n=e.removeGridComponent,a=e.theme,r=e.title,i=void 0===r?"Status":r,l=Ue(vr.status,t),c=Object(o.a)(l,1)[0],u=c.cellHighlight,d=c.geneHighlight,m=c.moleculeHighlight,f=Qe(),y=[].concat(Object(p.a)(u?["Hovered cell ".concat(u)]:[]),Object(p.a)(d?["Hovered gene ".concat(d)]:[]),Object(p.a)(m?["Hovered gene ".concat(m)]:[])).join("; ");return s.a.createElement(so,{title:i,theme:a,removeGridComponent:n,isScroll:!0,isReady:!0},s.a.createElement(po,{warn:f,info:y}))})),Object(c.a)(gp,b.GENES,(function(e){var t=e.coordinationScopes,n=e.removeGridComponent,a=e.variablesLabelOverride,r=void 0===a?"gene":a,l=e.variablesPluralLabelOverride,c=void 0===l?"".concat(r,"s"):l,p=e.theme,u=e.title,d=void 0===u?"Expression Levels":u,m=$e(),y=Ue(vr.genes,t),h=Object(o.a)(y,2),g=h[0],v=g.dataset,b=g.geneSelection,x=g.geneFilter,O=g.cellColorEncoding,j=h[1],E=j.setGeneSelection,S=j.setGeneFilter,C=j.setGeneHighlight,_=j.setCellColorEncoding,T=er(),w=Object(o.a)(T,3),L=w[0],P=w[1],I=w[2],A=Qa(bo),k=Object(o.a)(A,4),R=k[0],N=k[1],M=(k[2],k[3]);Object(i.useEffect)((function(){I(),M()}),[m,v]);var D=Pr(m,v,N,P,!0),G=Object(o.a)(D,1)[0],z=G?G.cols:[],H=z.length;return s.a.createElement(so,{title:d,info:"".concat(H," ").concat(f(r,c,H)),theme:p,isScroll:!0,removeGridComponent:n,isReady:R,urls:L},s.a.createElement(vo,{hasColorEncoding:"geneSelection"===O,geneList:z,geneSelection:b,geneFilter:x,setGeneSelection:function(e){E(e),_("geneSelection")},setGeneFilter:S,setGeneHighlight:C}))})),Object(c.a)(gp,b.CELL_SETS,(function(e){var t=e.coordinationScopes,n=e.removeGridComponent,a=e.theme,r=e.title,c=void 0===r?"Cell Sets":r,u=$e(),d=et(),m=Ue(vr.cellSets,t),f=Object(o.a)(m,2),y=f[0],h=y.dataset,g=y.cellSetSelection,v=y.cellSetColor,b=y.additionalCellSets,x=y.cellColorEncoding,O=f[1],j=O.setCellSetSelection,E=O.setCellColorEncoding,S=O.setCellSetColor,C=O.setAdditionalCellSets,_=er(),T=Object(o.a)(_,3),w=T[0],L=T[1],P=T[2],I=Qa(mi),A=Object(o.a)(I,4),k=A[0],R=A[1],N=(A[2],A[3]),M=Object(i.useState)([]),D=Object(o.a)(M,2),G=D[0],z=D[1];Object(i.useEffect)((function(){P(),N(),z([])}),[u,h]);var H=_r(u,h,R,L,!0),F=Object(o.a)(H,1)[0],X=Tr(u,h,R,L,!0,{setCellSetSelection:j,setCellSetColor:S},{cellSetSelection:g,cellSetColor:v}),Z=Object(o.a)(X,1)[0];Object(i.useEffect)((function(){if(b){var e;try{e=_a(b,"cell")}catch(t){return void d(t.message)}C(e)}}),[b,C,d]);var V=Object(i.useMemo)((function(){return F?Object.keys(F):[]}),[F]);function B(){E("cellSetSelection")}var Y=Object(i.useMemo)((function(){return sn(Z,b)}),[Z,b]),U=Object(i.useMemo)((function(){return g&&g.length>0&&Y&&Y.tree.length>0?function(e,t){var n=null;return e&&e.tree.forEach((function(e){var a=[e.name],r=pa(e);ct()(r).forEach((function(r){var o=r+1,i=ha(e,o,[],!0);ge()(i,t)&&(n={levelZeroPath:a,levelIndex:o})}))})),n}(Y,g):null}),[g,Y]);return s.a.createElement(so,{title:c,isScroll:!0,removeGridComponent:n,urls:w,theme:a,isReady:k},s.a.createElement(di,{setColor:v,sets:Z,additionalSets:b,levelSelection:U,setSelection:g,setExpansion:G,hasColorEncoding:"cellSetSelection"===x,draggable:!0,datatype:"cell",onError:d,onCheckNode:function(e,t){var n=Array.isArray(e)?e:e.split("___");e&&(j(t?[].concat(Object(p.a)(g),[n]):g.filter((function(e){return!ge()(e,n)}))),B())},onExpandNode:function(e,t,n){z(n?function(e){return[].concat(Object(p.a)(e),[t.split("___")])}:function(e){return e.filter((function(e){return!ge()(e,t.split("___"))}))})},onDropNode:function(e,t,n,a){var r=e.split("___"),o=da(b,r);if(o.children||a){var i=0===r.length-1,s=t.split("___"),c=da(b,s);if(!i||!a||c.children){var u,d,m;i?m=b.tree.findIndex((function(e){return e.name===o.name})):(d=r.slice(0,-1),m=(u=da(b,d)).children.findIndex((function(e){return e.name===o.name})));var f=c.name;if(!(!i&&a?u.children.find((function(e){return e!==c&&e.name===f})):a?b.tree.find((function(e){return e!==c&&e.name===f})):o.children.find((function(e){return e!==c&&e.name===f})))){var y=Object(l.a)({},b,{tree:b.tree.map((function(e){return ja(e,[],s)})).filter(Boolean)});m=i?y.tree.findIndex((function(e){return e.name===o.name})):u.children.findIndex((function(e){return e.name===o.name}));var h=[];if(a&&i)if(-1===n)y.tree.unshift(c),C(y),h=[c.name],j([h]);else{var g=m+(n>m?1:0),x=Array.from(y.tree);x.splice(g,0,c),y.tree=x,C(y),h=[c.name],j([h])}else{var O,E,_=[];if(a){if(!i)if(E=function(e){return ge()(e,d)},-1===n)O=function(e){return t=e,n=c,Object(l.a)({},t,{children:[n].concat(Object(p.a)(t.children))});var t,n};else{var T=m+(n>m?1:0);O=function(e){return function(e,t,n){var a=Array.from(e.children);return a.splice(n,0,t),Object(l.a)({},e,{children:a})}(e,c,T)}}}else O=function(e){return fa(e,c)},E=function(e){return ge()(e,r)};y.tree=y.tree.map((function(e){return ma(e,(function(e,t){return E(t)}),(function(e){return O(e)}),_)})),C(y),h=[].concat(Object(p.a)(_[0]),[c.name]),j([h])}var w=v.filter((function(e){return ta(s,e.path)})).map((function(e){return Object(l.a)({},e,{path:ge()(e.path,s)?h:h.concat(e.path.slice(s.length))})})),L=v.filter((function(e){return!ta(s,e.path)}));L.push.apply(L,Object(p.a)(w)),S(L)}}}},onCheckLevel:function(e,t){var n=Y.tree.find((function(t){return t.name===e}));if(n){var a=ha(n,t,[],!0);j(a),B()}},onNodeSetColor:function(e,t){var n=null===v||void 0===v?void 0:v.find((function(t){return ge()(t.path,e)}));S([].concat(n?Object(p.a)(v.filter((function(t){return!ge()(t.path,e)}))):Object(p.a)(v||[]),[{path:e,color:t}]))},onNodeSetName:function(e,t){var n=Object(p.a)(e);n.pop(),n.push(t);var a=Object(l.a)({},b,{tree:b.tree.map((function(n){return function n(a,r){return ge()([].concat(Object(p.a)(r),[a.name]),e)?Object(l.a)({},a,{name:t}):a.children?Object(l.a)({},a,{children:a.children.map((function(e){return n(e,[].concat(Object(p.a)(r),[a.name]))}))}):a}(n,[])}))}),r=v.map((function(t){return{path:na(e,t.path,n),color:t.color}})),o=g.map((function(t){return na(e,t,n)})),i=G.map((function(t){return na(e,t,n)}));C(a),S(r),j(o),z(i)},onNodeCheckNewName:function(e,t){var n=Object(p.a)(e);return n.pop(),n.push(t),!ge()(e,n)&&da(b,n)},onNodeRemove:function(e){var t=Object(l.a)({},b,{tree:b.tree.map((function(t){return ja(t,[],e)})).filter(Boolean)}),n=v.filter((function(t){return!ta(e,t.path)})),a=g.filter((function(t){return!ta(e,t)})),r=G.filter((function(t){return!ta(e,t)}));C(t),S(n),j(a),z(r)},onNodeView:function(e){var t=[];!function e(n,a){G.find((function(e){return ge()(a,e)}))&&n.children?n.children.forEach((function(t){e(t,[].concat(Object(p.a)(a),[t.name]))})):t.push(a)}(da(Y,e),e),j(t),B()},onImportTree:function(e){if(!Ea(Y,e)){C(Object(l.a)({},b||ba("cell"),{tree:[].concat(Object(p.a)(b?b.tree:[]),Object(p.a)(e.tree))}));var t=Sa(e,v);S([].concat(Object(p.a)(v),Object(p.a)(t)))}},onCreateLevelZeroNode:function(){var e=rn(null===b||void 0===b?void 0:b.tree,"My hierarchy ");C(Object(l.a)({},b||ba("cell"),{tree:[].concat(Object(p.a)(b?b.tree:[]),[{name:e,children:[]}])}))},onExportLevelZeroNodeJSON:function(e){var t=va(Y,e,"cell",v,a),n=t.treeToExport,r=t.nodeName;Pa(La(n),"".concat(r,"_").concat(xo.name,"-").concat("cell","-hierarchy.").concat("json"))},onExportLevelZeroNodeTabular:function(e){var t=va(Y,e,"cell",v,a),n=t.treeToExport,r=t.nodeName;Pa(function(e){var t=[];e.tree.forEach((function(e){e.children.forEach((function(n){n.set&&n.set.forEach((function(a){var r=Object(o.a)(a,2),i=r[0],s=r[1];t.push({groupName:e.name,setName:n.name,setColor:Kn(n.color),obsId:i,predictionScore:Yn()(s)?"NA":s})}))}))}));var n=Object(qn.parse)(t,{fields:["groupName","setName","setColor","obsId","predictionScore"],delimiter:","});return"data:".concat("text/csv",";charset=utf-8,").concat(encodeURIComponent(n))}(n),"".concat(r,"_").concat(xo.name,"-").concat("cell","-hierarchy.").concat("csv"))},onExportSetJSON:function(e){var t=function(e,t){var n=da(e,t);return{setToExport:ca(n),nodeName:n.name}}(Y,e),n=t.setToExport,a=t.nodeName;Pa(La(n),"".concat(a,"_").concat(xo.name,"-").concat("cell","-set.").concat("json"))},onUnion:function(){on(ya(Y,g),b,v,j,C,S,E,"Union ")},onIntersection:function(){on(function(e,t){var n=t.map((function(t){return da(e,t)})).map((function(e){return ca(e).map((function(e){return Object(o.a)(e,1)[0]}))}));return n.reduce((function(e,t){return t.filter((function(t){return e.includes(t)}))}),n[0]||[])}(Y,g),b,v,j,C,S,E,"Intersection ")},onComplement:function(){on(function(e,t,n){var a=ya(e,t);return n.filter((function(e){return!a.includes(e)}))}(Y,g,V),b,v,j,C,S,E,"Complement ")},hasCheckedSetsToUnion:(null===g||void 0===g?void 0:g.length)>1,hasCheckedSetsToIntersect:(null===g||void 0===g?void 0:g.length)>1,hasCheckedSetsToComplement:(null===g||void 0===g?void 0:g.length)>0,theme:a}))})),Object(c.a)(gp,b.SCATTERPLOT,(function(e){var t=e.uuid,n=e.coordinationScopes,a=e.removeGridComponent,r=e.theme,u=e.disableTooltip,d=void 0!==u&&u,m=e.observationsLabelOverride,h=void 0===m?"cell":m,g=e.observationsPluralLabelOverride,v=void 0===g?"".concat(h,"s"):g,b=e.title,x=e.averageFillDensity,O=$e(),j=Ke(),E=nt(t),S=Ue(vr.scatterplot,n),C=Object(o.a)(S,2),_=C[0],T=_.dataset,w=_.embeddingZoom,L=_.embeddingTargetX,P=_.embeddingTargetY,I=_.embeddingTargetZ,A=_.embeddingType,k=_.cellFilter,R=_.cellHighlight,N=_.geneSelection,M=_.cellSetSelection,D=_.cellSetColor,G=_.cellColorEncoding,z=_.additionalCellSets,H=_.embeddingCellSetPolygonsVisible,F=_.embeddingCellSetLabelsVisible,X=_.embeddingCellSetLabelSize,Z=_.embeddingCellRadius,V=_.embeddingCellRadiusMode,B=_.embeddingCellOpacity,Y=_.embeddingCellOpacityMode,U=_.geneExpressionColormap,q=_.geneExpressionColormapRange,W=C[1],$=W.setEmbeddingZoom,J=W.setEmbeddingTargetX,K=W.setEmbeddingTargetY,Q=W.setEmbeddingTargetZ,ee=W.setCellFilter,te=W.setCellSetSelection,ne=W.setCellHighlight,ae=W.setCellSetColor,re=W.setCellColorEncoding,oe=W.setAdditionalCellSets,ie=W.setEmbeddingCellSetPolygonsVisible,se=W.setEmbeddingCellSetLabelsVisible,le=W.setEmbeddingCellSetLabelSize,ce=W.setEmbeddingCellRadius,pe=W.setEmbeddingCellRadiusMode,ue=W.setEmbeddingCellOpacity,de=W.setEmbeddingCellOpacityMode,me=W.setGeneExpressionColormap,fe=W.setGeneExpressionColormapRange,ye=er(),he=Object(o.a)(ye,3),ve=he[0],be=he[1],xe=he[2],Oe=Ka(),je=Object(o.a)(Oe,3),Ee=je[0],Se=je[1],Ce=je[2],_e=Qa(sl),Te=Object(o.a)(_e,4),we=Te[0],Le=Te[1],Pe=Te[2],Ie=Te[3],Ae=b||"Scatterplot (".concat(A,")");Object(i.useEffect)((function(){xe(),Ie()}),[O,T]);var ke=_r(O,T,Le,be,!0),Re=Object(o.a)(ke,2),Ne=Re[0],Me=Re[1],De=Tr(O,T,Le,be,!1,{setCellSetSelection:te,setCellSetColor:ae},{cellSetSelection:M,cellSetColor:D}),Ge=Object(o.a)(De,1)[0],ze=Lr(O,T,Le,!1,N,Pe),He=Object(o.a)(ze,1)[0],Fe=Pr(O,T,Le,be,!1),Xe=Object(o.a)(Fe,1)[0],Ze=Object(i.useState)(Z),Ve=Object(o.a)(Ze,2),Be=Ve[0],Ye=Ve[1],qe=Object(i.useState)(B),We=Object(o.a)(qe,2),Je=We[0],Qe=We[1],et=Object(i.useMemo)((function(){return sn(Ge,z)}),[Ge,z]),tt=Object(i.useCallback)((function(e){on(e,z,D,te,oe,ae,re)}),[z,D,re,oe,ae,te]),at=Object(i.useMemo)((function(){return hi({cellColorEncoding:G,expressionData:He&&He[0],geneSelection:N,cellSets:et,cellSetSelection:M,cellSetColor:D,expressionDataAttrs:Xe,theme:r})}),[G,N,et,r,M,D,He,Xe]),rt=Object(i.useState)([]),ot=Object(o.a)(rt,2),it=ot[0],st=ot[1],lt=Object(i.useMemo)((function(){var e,t;if((F||H)&&(t=M,-1===it.findIndex((function(e){return ge()(e[0],t)})))&&(null===et||void 0===et||null===(e=et.tree)||void 0===e?void 0:e.length)&&Object.values(Ne).length&&(null===D||void 0===D?void 0:D.length)){var n=Ca({cells:Ne,mapping:A,cellSets:et,cellSetSelection:M,cellSetColor:D,theme:r});return st((function(e){return[].concat(Object(p.a)(e),[[M,n]])})),n}return function(e,t){var n;return null===(n=e.find((function(e){return ge()(e[0],t)})))||void 0===n?void 0:n[1]}(it,M)||[]}),[H,it,F,r,Ne,A,et,M,D]),ct=Object(i.useMemo)((function(){return Array.from(at.keys())}),[at]),pt=Object(i.useMemo)((function(){var e=Ne&&Object.values(Ne);if(null===e||void 0===e?void 0:e.length){var t=Object.values(Ne).map((function(e){return e.mappings[A]})),n=Object(Gt.a)(t,(function(e){return e[0]})),a=Object(Gt.a)(t,(function(e){return e[1]}));return[n[1]-n[0],a[1]-a[0],n,a,e.length]}return[null,null,null,null,null]}),[Ne,A]),ut=Object(o.a)(pt,5),dt=ut[0],mt=ut[1],ft=ut[2],yt=ut[3],ht=ut[4];Object(i.useEffect)((function(){if(dt&&mt){var e=function(e,t,n,a,r,o){var i=1/e,s=Math.pow(2,t),l=2/(n*s/r),c=2/(a*s/o),p=Math.sqrt(Math.pow(r,2)+Math.pow(o,2)),u=.001/Math.sqrt(Math.pow(l,2)+Math.pow(c,2))*p;return il()(u,i,10)}(window.devicePixelRatio,w,dt,mt,Ee,Se);Ye(e);var t=function(e,t,n,a,r,i,s){var l=i,c=new os.a({zoom:e}).makeViewport({height:r,width:a,viewState:{zoom:e,target:[0,0,0]}}).getBounds(),p=Object(o.a)(c,4),u=p[0],d=p[1],m=p[2],f=p[3]-d,y=m-u,h=t,g=n,v=a,b=r,x=s;x||(x=Math.min(1,1/Math.pow(10,Math.log10(l)-3)));var O=x*v*b/l*(g/y)*(h/f);return il()(O,1.01/255,1)}(w,dt,mt,Ee,Se,ht,x);if(Qe(t),"number"!==typeof L||"number"!==typeof P){var n=ft[0]+dt/2,a=yt[0]+mt/2,r=Math.log2(Math.min(Ee/dt,Se/mt));J(n),K(-a),$(r)}}}),[dt,mt,ft,yt,ht,Ne,A,Ee,Se,w,x]);var gt=Object(i.useCallback)((function(e){var t=Ne[e];return Object(l.a)(Object(c.a)({},"".concat(y(h)," ID"),e),t?t.factors:{})}),[Ne,h]),vt=Object(i.useMemo)((function(){return new Set(ct)}),[ct]),bt=Object(i.useCallback)((function(e){return(vt||new Set([])).has(e[0])?1:0}),[vt]),xt="manual"===V?Z:Be,Ot="manual"===Y?B:Je,jt=nr({attrs:Xe,expressionData:He});return s.a.createElement(so,{title:Ae,info:"".concat(Me," ").concat(f(h,v,Me)),removeGridComponent:a,urls:ve,theme:r,isReady:we,options:s.a.createElement(rl,{observationsLabel:h,cellRadius:Z,setCellRadius:ce,cellRadiusMode:V,setCellRadiusMode:pe,cellOpacity:B,setCellOpacity:ue,cellOpacityMode:Y,setCellOpacityMode:de,cellSetLabelsVisible:F,setCellSetLabelsVisible:se,cellSetLabelSize:X,setCellSetLabelSize:le,cellSetPolygonsVisible:H,setCellSetPolygonsVisible:ie,cellColorEncoding:G,setCellColorEncoding:re,geneExpressionColormap:U,setGeneExpressionColormap:me,geneExpressionColormapRange:q,setGeneExpressionColormapRange:fe})},s.a.createElement(zs,{ref:Ce,uuid:t,theme:r,viewState:{zoom:w,target:[L,P,I]},setViewState:function(e){var t=e.zoom,n=e.target;$(t),J(n[0]),K(n[1]),Q(n[2]||0)},cells:Ne,mapping:A,cellFilter:k,cellSelection:ct,cellHighlight:R,cellColors:at,cellSetPolygons:lt,cellSetLabelSize:X,cellSetLabelsVisible:F,cellSetPolygonsVisible:H,setCellFilter:ee,setCellSelection:tt,setCellHighlight:ne,cellRadius:xt,cellOpacity:Ot,cellColorEncoding:G,geneExpressionColormap:U,geneExpressionColormapRange:q,setComponentHover:function(){j(t)},updateViewInfo:E,getExpressionValue:jt,getCellIsSelected:bt}),!d&&s.a.createElement(Vs,{parentUuid:t,cellHighlight:R,width:Ee,height:Se,getCellInfo:gt}))})),Object(c.a)(gp,b.SPATIAL,(function(e){var t=e.uuid,n=e.coordinationScopes,a=e.removeGridComponent,r=e.observationsLabelOverride,u=void 0===r?"cell":r,d=e.observationsPluralLabelOverride,m=void 0===d?"".concat(u,"s"):d,h=e.subobservationsLabelOverride,g=void 0===h?"molecule":h,v=e.subobservationsPluralLabelOverride,b=void 0===v?"".concat(g,"s"):v,x=e.theme,O=e.disableTooltip,j=void 0!==O&&O,E=e.title,S=void 0===E?"Spatial":E,C=e.disable3d,_=e.globalDisable3d,T=$e(),w=Ke(),L=nt(t),P=Ue(vr.spatial,n),I=Object(o.a)(P,2),A=I[0],k=A.dataset,R=A.spatialZoom,N=A.spatialTargetX,M=A.spatialTargetY,D=A.spatialTargetZ,G=A.spatialRotationX,z=A.spatialRotationY,H=A.spatialRotationZ,F=A.spatialRotationOrbit,X=A.spatialOrbitAxis,Z=A.spatialRasterLayers,V=A.spatialCellsLayer,B=A.spatialMoleculesLayer,Y=A.spatialNeighborhoodsLayer,U=A.cellFilter,q=A.cellHighlight,W=A.geneSelection,$=A.cellSetSelection,J=A.cellSetColor,K=A.cellColorEncoding,Q=A.additionalCellSets,ee=A.spatialAxisFixed,te=A.geneExpressionColormap,ne=A.geneExpressionColormapRange,ae=I[1],re=ae.setSpatialZoom,oe=ae.setSpatialTargetX,ie=ae.setSpatialTargetY,se=ae.setSpatialTargetZ,le=ae.setSpatialRotationX,ce=ae.setSpatialRotationOrbit,pe=ae.setSpatialOrbitAxis,ue=ae.setSpatialRasterLayers,de=ae.setSpatialCellsLayer,me=ae.setSpatialMoleculesLayer,fe=ae.setSpatialNeighborhoodsLayer,ye=ae.setCellFilter,he=ae.setCellSetSelection,ge=ae.setCellHighlight,ve=ae.setCellSetColor,be=ae.setCellColorEncoding,xe=ae.setAdditionalCellSets,Oe=ae.setMoleculeHighlight,je=ae.setSpatialAxisFixed,Ee=ae.setGeneExpressionColormap,Se=ae.setGeneExpressionColormapRange,Ce=We(vr.layerController,n),_e=Object(o.a)(Ce,1)[0].rasterLayersCallbacks,Te=null===Z||void 0===Z?void 0:Z.some((function(e){return e.use3d})),we=er(),Le=Object(o.a)(we,3),Pe=Le[0],Ie=Le[1],Ae=Le[2],ke=Qa(gl),Re=Object(o.a)(ke,4),Ne=Re[0],Me=Re[1],De=Re[2],Ge=Re[3],ze=Ka(),He=Object(o.a)(ze,3),Fe=He[0],Xe=He[1],Ze=He[2];Object(i.useEffect)((function(){Ae(),Ge()}),[T,k]);var Ve=_r(T,k,Me,Ie,!1,{setSpatialCellsLayer:de},{spatialCellsLayer:V}),Be=Object(o.a)(Ve,2),Ye=Be[0],qe=Be[1],Je=Ir(T,k,Me,Ie,!1,{setSpatialMoleculesLayer:me},{spatialMoleculesLayer:B}),Qe=Object(o.a)(Je,3),tt=Qe[0],at=Qe[1],rt=Qe[2],ot=function(e,t,n,a,r,s,c){var p=Object(i.useState)(),u=Object(o.a)(p,2),d=u[0],m=u[1],f=et();return Object(i.useEffect)((function(){e[t]&&(e[t].loaders.neighborhoods?e[t].loaders.neighborhoods.load().catch((function(e){return Sr(e,f)})).then((function(e){if(e){var t=e.data,r=e.url,o=e.coordinationValues;m(t),a(r,"Neighborhoods"),Cr(Object(l.a)({spatialNeighborhoodsLayer:yn},o),s,c),n("neighborhoods")}})):(m({}),r?Sr(new xt(t,"neighborhoods",null,null),f):n("neighborhoods")))}),[e,t]),[d]}(T,k,Me,Ie,!1,{setSpatialNeighborhoodsLayer:fe},{spatialNeighborhoodsLayer:Y}),it=Object(o.a)(ot,1)[0],st=Tr(T,k,Me,Ie,!1,{setCellSetSelection:he,setCellSetColor:ve},{cellSetSelection:$,cellSetColor:J}),lt=Object(o.a)(st,1)[0],ct=Lr(T,k,Me,!1,W,De),pt=Object(o.a)(ct,1)[0],ut=Pr(T,k,Me,Ie,!1),dt=Object(o.a)(ut,1)[0],mt=Ar(T,k,Me,Ie,!1,{setSpatialRasterLayers:ue},{spatialRasterLayers:Z}),ft=Object(o.a)(mt,3),yt=(ft[0],ft[1]),ht=ft[2],gt=Object(i.useMemo)((function(){var e=!ht.some((function(e){var t;return null===e||void 0===e||null===(t=e.metadata)||void 0===t?void 0:t.isBitmask}));return[].concat(Object(p.a)(B?[Object(l.a)({},B,{type:"molecules"})]:[]),Object(p.a)(V&&e?[Object(l.a)({},V,{type:"cells"})]:[]),Object(p.a)(Y?[Object(l.a)({},Y,{type:"neighborhoods"})]:[]),Object(p.a)(Z?Z.map((function(e){return Object(l.a)({},e,{type:e.type&&["raster","bitmask"].includes(e.type)?e.type:"raster"})})):[]))}),[V,B,Y,Z,ht]);Object(i.useEffect)((function(){if("number"!==typeof N||"number"!==typeof M){var e=function(e){var t=e.width,n=e.height,a=e.cells,r=e.imageLayerLoaders,o=e.useRaster,i=e.use3d,s=-1/0,l=-1/0,c=-1/0,u=-1/0,d=i?1.5:.1,m=Object.values(a);if(r.length>0&&o)for(var f=0;f<r.length;f+=1){var y={height:n,width:t},h=Object(Ft.m)(r[f].data,y,d,i),g=h.target,v=h.zoom;g[0]>s&&(s=g[0],u=v),g[1]>l&&(l=g[1],u=v),g[2]>c?(c=g[2],u=v):c=null}else{if(!(m.length>0&&m[0].xy)||o)return{initialTargetX:null,initialTargetY:null,initialTargetZ:null,initialZoom:null};var b=m.map((function(e){return e.xy})),x=Object(Gt.a)(b,(function(e){return e[0]})),O=Object(Gt.a)(b,(function(e){return e[1]})),j=x[1]-x[0],E=O[1]-O[0],S=function(e){return[Math.min.apply(Math,Object(p.a)(e.map((function(e){return e[0]})))),Math.max.apply(Math,Object(p.a)(e.map((function(e){return e[1]}))))]};0===j&&(j=(x=S(m.map((function(e){return Object(Gt.a)(e.poly,(function(e){return e[0]}))}))))[1]-x[0]);0===E&&(E=(O=S(m.map((function(e){return Object(Gt.a)(e.poly,(function(e){return e[1]}))}))))[1]-O[0]);s=x[0]+j/2,l=O[0]+E/2,c=null,u=Math.log2(Math.min(t/j,n/E))-d}return{initialTargetX:s,initialTargetY:l,initialZoom:u,initialTargetZ:c}}({width:Fe,height:Xe,cells:Ye,imageLayerLoaders:yt,useRaster:Boolean(T[k].loaders.raster),use3d:Te}),t=e.initialTargetX,n=e.initialTargetY,a=e.initialTargetZ,r=e.initialZoom;oe(t),ie(n),se(a),re(r)}}),[yt,Ye,N,M,oe,ie,re,Te]);var vt=Object(i.useMemo)((function(){return sn(lt,Q)}),[lt,Q]),bt=Object(i.useCallback)((function(e){on(e,Q,J,he,xe,ve,be)}),[Q,J,be,xe,ve,he]),Ot=Object(i.useMemo)((function(){return hi({cellColorEncoding:K,expressionData:pt&&pt[0],geneSelection:W,cellSets:vt,cellSetSelection:$,cellSetColor:J,expressionDataAttrs:dt,theme:x})}),[K,W,vt,x,J,$,pt,dt]),jt=Object(i.useMemo)((function(){var e=ht.some((function(e){var t;return null===e||void 0===e||null===(t=e.metadata)||void 0===t?void 0:t.isBitmask}));if((null===dt||void 0===dt?void 0:dt.rows)&&pt&&e){for(var t=dt.rows.reduce((function(e,t){return Math.max(e,Number(t))})),n=new Uint8Array(t+1),a=0;a<dt.rows.length;a++){var r=dt.rows[a];n.set(pt[0].slice(a,a+1),Number(r))}return[n]}return[new Uint8Array]}),[dt,pt,ht]),Et=Object(i.useMemo)((function(){return Array.from(Ot.keys())}),[Ot]),St=function(e){var t=e.observationsCount,n=e.observationsLabel,a=e.observationsPluralLabel,r=e.subobservationsCount,o=e.subobservationsLabel,i=e.subobservationsPluralLabel,s=e.locationsCount,l=[];if(r>0){var c="".concat(r," ").concat(f(o,i,r));s>0&&(c+=" at ".concat(Zt()(s)," locations")),l.push(c)}return t>0&&l.push("".concat(t," ").concat(f(n,a,t))),l.join(", ")}({observationsCount:qe,observationsLabel:u,observationsPluralLabel:m,subobservationsCount:at,subobservationsLabel:g,subobservationsPluralLabel:b,locationsCount:rt}),Ct=nr({attrs:dt,expressionData:pt}),_t=T[k].loaders["expression-matrix"],Tt=T[k].loaders.cells||ht.some((function(e){var t;return null===e||void 0===e||null===(t=e.metadata)||void 0===t?void 0:t.isBitmask})),wt=yt.some((function(e){return Boolean(Array.from({length:e.data.length}).filter((function(t,n){return pn(e.data,n)})).length)}))&&!((null===C||void 0===C?void 0:C.length)===yt.length)&&!_;return s.a.createElement(so,{title:S,info:St,isSpatial:!0,urls:Pe,theme:x,removeGridComponent:a,isReady:Ne,options:wt||_t?s.a.createElement(yl,{observationsLabel:u,cellColorEncoding:K,setCellColorEncoding:be,setSpatialAxisFixed:je,spatialAxisFixed:ee,use3d:Te,geneExpressionColormap:te,setGeneExpressionColormap:Ee,geneExpressionColormapRange:ne,setGeneExpressionColormapRange:Se,canShowExpressionOptions:_t,canShowColorEncodingOption:Tt&&_t,canShow3DOptions:wt}):null},s.a.createElement(ul,{ref:Ze,uuid:t,width:Fe,height:Xe,viewState:{zoom:R,target:[N,M,D],rotationX:G,rotationY:z,rotationZ:H,rotationOrbit:F,orbitAxis:X},setViewState:function(e){var t=e.zoom,n=e.target,a=e.rotationX,r=e.rotationOrbit,o=e.orbitAxis;re(t),oe(n[0]),ie(n[1]),se(n[2]||null),le(a),ce(r),pe(o||null)},layers:gt,cells:Ye,cellFilter:U,cellSelection:Et,cellHighlight:q,cellColors:Ot,molecules:tt,neighborhoods:it,imageLayerLoaders:yt,setCellFilter:ye,setCellSelection:bt,setCellHighlight:ge,setMoleculeHighlight:Oe,setComponentHover:function(){w(t)},updateViewInfo:L,rasterLayersCallbacks:_e,spatialAxisFixed:ee,geneExpressionColormap:te,geneExpressionColormapRange:ne,expressionData:jt,cellColorEncoding:K,getExpressionValue:Ct,theme:x}),!j&&s.a.createElement(hl,{parentUuid:t,cellHighlight:q,width:Fe,height:Xe,getCellInfo:function(e){var t=Ye[e];return t?Object(l.a)(Object(c.a)({},"".concat(y(u)," ID"),e),t.factors):null}}))})),Object(c.a)(gp,b.HEATMAP,(function(e){var t=e.uuid,n=e.coordinationScopes,a=e.removeGridComponent,r=e.theme,p=e.transpose,u=e.observationsLabelOverride,d=void 0===u?"cell":u,m=e.observationsPluralLabelOverride,h=void 0===m?"".concat(d,"s"):m,g=e.variablesLabelOverride,v=void 0===g?"gene":g,b=e.variablesPluralLabelOverride,x=void 0===b?"".concat(v,"s"):b,O=e.disableTooltip,j=void 0!==O&&O,E=e.title,S=void 0===E?"Heatmap":E,C=$e(),_=Ke(),T=nt(t),w=Ue(vr.heatmap,n),L=Object(o.a)(w,2),P=L[0],I=P.dataset,A=P.heatmapZoomX,k=P.heatmapTargetX,R=P.heatmapTargetY,N=P.geneSelection,M=P.cellHighlight,D=P.geneHighlight,G=P.cellSetSelection,z=P.cellSetColor,H=P.additionalCellSets,F=P.geneExpressionColormap,X=P.geneExpressionColormapRange,Z=L[1],V=Z.setHeatmapZoomX,B=Z.setHeatmapZoomY,Y=Z.setHeatmapTargetX,U=Z.setHeatmapTargetY,q=Z.setCellHighlight,W=Z.setGeneHighlight,$=Z.setCellSetSelection,J=Z.setCellSetColor,K=Z.setGeneExpressionColormapRange,Q=Z.setGeneExpressionColormap,ee=y(h),te=y(x),ne=Object(i.useState)(!1),ae=Object(o.a)(ne,2),re=ae[0],oe=ae[1],ie=Qa(Tl),se=Object(o.a)(ie,4),le=se[0],ce=se[1],pe=(se[2],se[3]),ue=er(),de=Object(o.a)(ue,3),me=de[0],fe=de[1],ye=de[2],he=Ka(),ge=Object(o.a)(he,3),ve=ge[0],be=ge[1],xe=ge[2];Object(i.useEffect)((function(){ye(),pe()}),[C,I]);var Oe=_r(C,I,ce,fe,!0),je=Object(o.a)(Oe,1)[0],Ee=wr(C,I,ce,fe,!0),Se=Object(o.a)(Ee,1)[0],Ce=Tr(C,I,ce,fe,!1,{setCellSetSelection:$,setCellSetColor:J},{cellSetSelection:G,cellSetColor:z}),_e=Object(o.a)(Ce,1)[0],Te=Object(i.useMemo)((function(){return sn(_e,H)}),[_e,H]),we=Object(i.useMemo)((function(){return hi({cellColorEncoding:"cellSetSelection",geneSelection:N,cellSets:Te,cellSetSelection:G,cellSetColor:z,expressionDataAttrs:Se,theme:r})}),[Te,N,r,z,G,Se]),Le=Object(i.useCallback)((function(e){if(e){var t=je[e];return Object(l.a)(Object(c.a)({},"".concat(y(d)," ID"),e),t?t.factors:{})}return null}),[je,d]),Pe=Object(i.useCallback)((function(e){return e?Object(c.a)({},"".concat(y(v)," ID"),e):null}),[v]),Ie=Se&&Se.rows?Se.rows.length:0,Ae=Se&&Se.cols?Se.cols.length:0,ke=we.size;return s.a.createElement(so,{title:S,info:"".concat(Ie," ").concat(f(d,h,Ie)," \xd7 ").concat(Ae," ").concat(f(v,x,Ae),",\n             with ").concat(ke," ").concat(f(d,h,ke)," selected"),urls:me,theme:r,removeGridComponent:a,isReady:le&&!re,options:s.a.createElement(_l,{geneExpressionColormap:F,setGeneExpressionColormap:Q,geneExpressionColormapRange:X,setGeneExpressionColormapRange:K})},s.a.createElement(Sl,{ref:xe,transpose:p,viewState:{zoom:A,target:[k,R]},setViewState:function(e){var t=e.zoom,n=e.target;V(t),B(t),Y(n[0]),U(n[1])},colormapRange:X,setColormapRange:K,height:be,width:ve,theme:r,uuid:t,expressionMatrix:Se,cellColors:we,colormap:F,setIsRendering:oe,setCellHighlight:q,setGeneHighlight:W,setComponentHover:function(){_(t)},updateViewInfo:T,observationsTitle:ee,variablesTitle:te}),!j&&s.a.createElement(Cl,{parentUuid:t,width:ve,height:be,transpose:p,getCellInfo:Le,getGeneInfo:Pe,cellHighlight:M,geneHighlight:D}))})),Object(c.a)(gp,b.LAYER_CONTROLLER,Vc),Object(c.a)(gp,b.CELL_SET_SIZES,(function(e){var t=e.coordinationScopes,n=e.removeGridComponent,a=e.theme,r=e.title,l=void 0===r?"Cell Set Sizes":r,c=$e(),p=Ue(vr.cellSetSizes,t),u=Object(o.a)(p,2),d=u[0],m=d.dataset,f=d.cellSetSelection,y=d.cellSetColor,h=d.additionalCellSets,g=u[1],v=g.setCellSetSelection,b=g.setCellSetColor,x=Ja(),O=Object(o.a)(x,3),j=O[0],E=O[1],S=O[2],C=er(),_=Object(o.a)(C,3),T=_[0],w=_[1],L=_[2],P=Qa(lp),I=Object(o.a)(P,4),A=I[0],k=I[1],R=(I[2],I[3]);Object(i.useEffect)((function(){L(),R()}),[c,m]);var N=Tr(c,m,k,w,!0,{setCellSetSelection:v,setCellSetColor:b},{cellSetSelection:f,cellSetColor:y}),M=Object(o.a)(N,1)[0],D=Object(i.useMemo)((function(){return sn(M,h)}),[M,h]),G=Object(i.useMemo)((function(){return D&&f&&y?Oa(D,f,y,a):[]}),[D,f,y,a]);return s.a.createElement(so,{title:l,removeGridComponent:n,urls:T,theme:a,isReady:A},s.a.createElement("div",{ref:S,className:"vega-container"},s.a.createElement(sp,{data:G,theme:a,width:j,height:E})))})),Object(c.a)(gp,b.GENOMIC_PROFILES,(function(e){var t=e.coordinationScopes,n=e.theme,a=e.removeGridComponent,r=e.profileTrackUidKey,l=void 0===r?"path":r,c=e.profileTrackNameKey,u=void 0===c?null:c,d=e.higlassServer,m=void 0===d?"https://higlass.io/api/v1":d,f=e.assembly,y=void 0===f?"hg38":f,h=e.title,g=void 0===h?"Genomic Profiles":h,v=Ja(),b=Object(o.a)(v,3),x=(b[0],b[1]),O=b[2],j=$e(),E=Ue(vr.genomicProfiles,t),S=Object(o.a)(E,1)[0],C=S.dataset,_=S.cellSetColor,T=S.cellSetSelection,w=Qa(pp),L=Object(o.a)(w,4),P=L[0],I=L[1],A=(L[2],L[3]),k=er(),R=Object(o.a)(k,3),N=R[0],M=R[1],D=R[2],G=function(e,t,n,a,r,s,l){var c=Object(i.useState)(),p=Object(o.a)(c,2),u=p[0],d=p[1],m=et();return Object(i.useEffect)((function(){e[t]&&(e[t].loaders["genomic-profiles"]?e[t].loaders["genomic-profiles"].load().catch((function(e){return Sr(e,m)})).then((function(e){if(e){var t=e.data,r=e.url,o=e.coordinationValues;d(t),a(r),Cr(o,s,l),n("genomic-profiles")}})):(d(null),r?Sr(new xt(t,"genomic-profiles",null,null),m):n("genomic-profiles")))}),[e,t]),[u]}(j,C,I,M,!0),z=Object(o.a)(G,1)[0],H=Object(i.useMemo)((function(){if(!z||1!==N.length)return null;var e=N[0].url,t="dark"===n?"#C0C0C0":"#000000",a="dark"===n?"#000000":"#f1f1f1",r="dark"===n?"dimgray":"silver",o=[{type:"horizontal-chromosome-labels",server:m,tilesetUid:up[y].chromosomes,uid:"chromosome-labels",options:{color:t,fontSize:12,fontIsLeftAligned:!1,showMousePosition:!0,mousePositionColor:t},height:30},{type:"horizontal-gene-annotations",server:m,tilesetUid:up[y].genes,uid:"gene-annotations",options:{name:"Gene Annotations (hg38)",fontSize:10,labelPosition:"hidden",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,minHeight:24,geneAnnotationHeight:16,geneLabelPosition:"outside",geneStrandSpacing:4,showMousePosition:!0,mousePositionColor:t,plusStrandColor:t,minusStrandColor:t,labelColor:"black",labelBackgroundColor:a,trackBorderWidth:0,trackBorderColor:"black"},height:70}],i=Object(cp.a)(o.map((function(e){return e.height}))),s=(x-i-10)/z.row_infos.length,c=z.row_infos.map((function(a,o){var i,c=a[l],p=Array.isArray(c),d=u?a[u]:p?c[c.length-1]:c,m=!!p&&(null===T||void 0===T?void 0:T.find((function(e){return ge()(e,c)}))),f=p?null===_||void 0===_||null===(i=_.find((function(e){return ge()(e.path,c)})))||void 0===i?void 0:i.color:null,y=p?c.join("__"):c,h={type:"horizontal-bar",uid:"bar-track-".concat(y),data:{type:"zarr-multivec",url:e,row:o},options:{name:d,showMousePosition:!0,mousePositionColor:t,labelColor:"dark"===n?"white":"black",labelBackgroundColor:"dark"===n?"black":"white",labelShowAssembly:!1},height:s};if(f&&m){var g=f;h.options.barFillColor="rgb(".concat(g[0],",").concat(g[1],",").concat(g[2],")")}else h.options.barFillColor=r;return h}));return{tracks:{top:[].concat(o,Object(p.a)(c)),left:[],center:[],right:[],bottom:[],whole:[],gallery:[]},layout:{w:12,h:12,x:0,y:0,static:!1}}}),[z,N,n,x,l,u,T,_,m,y]);return Object(i.useEffect)((function(){D(),A()}),[j,C]),s.a.createElement("div",{className:"higlass-title-wrapper"},s.a.createElement(so,{title:g,removeGridComponent:a,theme:n,isReady:P,urls:N},s.a.createElement("div",{className:"higlass-lazy-wrapper",ref:O},H?s.a.createElement(Qc,{coordinationScopes:t,theme:n,hgViewConfig:H,height:x}):null)))})),Object(c.a)(gp,b.EXPRESSION_HISTOGRAM,(function(e){var t=e.coordinationScopes,n=e.removeGridComponent,a=e.theme,r=$e(),l=Ue(vr.expressionHistogram,t),c=Object(o.a)(l,1)[0],p=c.dataset,u=c.geneSelection,d=Ja(),m=Object(o.a)(d,3),f=m[0],y=m[1],h=m[2],g=er(),v=Object(o.a)(g,3),b=v[0],x=v[1],O=v[2],j=Qa(mp),E=Object(o.a)(j,4),S=E[0],C=E[1],_=E[2],T=E[3];Object(i.useEffect)((function(){O(),T()}),[r,p]);var w=wr(r,p,C,x,!0),L=Object(o.a)(w,1)[0],P=Lr(r,p,C,!1,u,_),I=Object(o.a)(P,1)[0],A=u&&u.length>=1?u[0]:null,k=Object(i.useMemo)((function(){if(A&&L&&I)return Array.from(I[0]).map((function(e,t){return{value:100*I[0][t]/255,gene:A}}));if(L){var e=L.cols.length;return L.rows.map((function(t,n){var a=L.matrix.subarray(n*e,(n+1)*e);return{value:100*Object(cp.a)(a)/255,gene:null}}))}return null}),[L,A,I]);return s.a.createElement(so,{title:"Expression Histogram".concat(A?" (".concat(A,")"):""),removeGridComponent:n,urls:b,theme:a,isReady:S},s.a.createElement("div",{ref:h,className:"vega-container"},s.a.createElement(dp,{geneSelection:u,data:k,theme:a,width:f,height:y})))})),Object(c.a)(gp,b.CELL_SET_EXPRESSION,(function(e){var t=e.coordinationScopes,n=e.removeGridComponent,a=e.theme,r=$e(),l=Ue(vr.cellSetExpression,t),c=Object(o.a)(l,2),p=c[0],u=p.dataset,d=p.geneSelection,m=p.geneExpressionTransform,f=p.cellSetSelection,y=p.cellSetColor,h=p.additionalCellSets,g=c[1].setGeneExpressionTransform,v=Ja(),b=Object(o.a)(v,3),x=b[0],O=b[1],j=b[2],E=er(),S=Object(o.a)(E,3),C=S[0],_=S[1],T=S[2],w=Qa(vp),L=Object(o.a)(w,4),P=L[0],I=L[1],A=L[2],k=L[3],R=Object(i.useReducer)((function(e){var t=!e;return g(t?"log1p":null),t}),m),N=Object(o.a)(R,2),M=N[0],D=N[1];Object(i.useEffect)((function(){T(),k()}),[r,u]);var G=Lr(r,u,I,!1,d,A),z=Object(o.a)(G,1)[0],H=Pr(r,u,I,_,!1),F=Object(o.a)(H,1)[0],X=Tr(r,u,I,_,!0),Z=fp(z,F,Object(o.a)(X,1)[0],h,d,f,y,M,a),V=Object(o.a)(Z,3),B=V[0],Y=V[1],U=V[2],q=d&&d.length>=1?d[0]:null;return s.a.createElement(so,{title:"Expression by Cell Set".concat(q?" (".concat(q,")"):""),removeGridComponent:n,urls:C,theme:a,isReady:P,options:s.a.createElement(yp,{useGeneExpressionTransform:M,toggleGeneExpressionTransform:D})},s.a.createElement("div",{ref:j,className:"vega-container"},B?s.a.createElement(hp,{domainMax:U,colors:Y,data:B,theme:a,width:x,height:O,useGeneExpressionTransform:M}):s.a.createElement("span",null,"Select a gene.")))})),Object(c.a)(gp,"higlass",(function(e){var t=e.coordinationScopes,n=e.theme,a=e.hgViewConfig,r=e.removeGridComponent,i=Ja(),l=Object(o.a)(i,3),c=(l[0],l[1]),p=l[2],u=Qa(ep),d=Object(o.a)(u,4),m=d[0],f=(d[1],d[2],d[3],er()),y=Object(o.a)(f,3),h=y[0];return y[1],y[2],s.a.createElement("div",{className:"higlass-title-wrapper"},s.a.createElement(so,{title:"HiGlass",removeGridComponent:r,theme:n,isReady:m,urls:h},s.a.createElement("div",{className:"higlass-lazy-wrapper",ref:p},s.a.createElement(Qc,{coordinationScopes:t,theme:n,hgViewConfig:a,height:c}))))})),gp);function xp(e){if(void 0===bp[e])throw new Error('Could not find definition for "'.concat(e,'" in registry.'));return bp[e]}function Op(e,t){var n,a=Object.keys((null===e||void 0===e||null===(n=e.coordinationSpace)||void 0===n?void 0:n[t])||{}),r=e.layout.map((function(e){var n;return null===(n=e.coordinationScopes)||void 0===n?void 0:n[t]}));return Array.from(new Set([].concat(Object(p.a)(a),Object(p.a)(r))))}function jp(e){var t=e,n=t,a=n.layout,r=n.datasets;return Object.values(O).forEach((function(e){if(!a.every((function(t){var n;return!vr[t.component].includes(e)||(null===(n=t.coordinationScopes)||void 0===n?void 0:n[e])}))){var n=hr[e];"dataset"===e&&r.length>=1&&(n=r[0].uid),t=gr.includes(e)?function(e,t,n){var a=Object(l.a)({},e,{layout:Object(p.a)(e.layout)}),r={};return a.layout.forEach((function(o,i){var s;if(vr[o.component].includes(t)&&!(null===(s=o.coordinationScopes)||void 0===s?void 0:s[t])){var u=h([].concat(Object(p.a)(Op(e,t)),Object(p.a)(Object.keys(r))));r[u]=n,a.layout[i]=Object(l.a)({},o,{coordinationScopes:Object(l.a)({},o.coordinationScopes,Object(c.a)({},t,u))})}})),a.coordinationSpace=Object(l.a)({},a.coordinationSpace,Object(c.a)({},t,Object(l.a)({},a.coordinationSpace[t],{},r))),a}(t,e,n):function(e,t,n){var a,r=h(Op(e,t));return Object(l.a)({},e,{coordinationSpace:Object(l.a)({},e.coordinationSpace,Object(c.a)({},t,Object(l.a)({},null===e||void 0===e||null===(a=e.coordinationSpace)||void 0===a?void 0:a[t],Object(c.a)({},r,n)))),layout:e.layout.map((function(e){var n;return Object(l.a)({},e,{coordinationScopes:Object(l.a)({},e.coordinationScopes,{},vr[e.component].includes(t)&&!(null===(n=e.coordinationScopes)||void 0===n?void 0:n[t])?Object(c.a)({},t,r):{})})}))})}(t,e,n)}})),t}var Ep=Object(me.a)({disableGlobal:!0});function Sp(e){var t=e.config,n=e.rowHeight,a=e.height,r=e.theme,l=e.onWarn,c=e.onConfigChange,p=e.onLoaderChange,u=e.validateOnConfigChange,d=void 0!==u&&u,m=Object(i.useMemo)((function(){if(!t)return[{title:"No such dataset",unformatted:"The dataset configuration could not be found."},!1];if(!t.version)return[{title:"Missing version",unformatted:"The dataset configuration is missing a version, preventing validation."},!1];var e=function(e){var t,n,a,r=e;do{if(t=r.version,!Object.keys(xr).includes(t))return[{title:"Config validation failed",preformatted:"Unknown config version."},!1];var i=Object(o.a)(xr[t],2);if(a=i[0],n=i[1],!a(r))return[{title:"Config validation failed",preformatted:JSON.stringify(a.errors,null,2)},!1];n&&(r=n(r))}while(n);return console.groupCollapsed("\ud83d\ude84 Vitessce (".concat(xo.version,") view configuration")),console.info("data:,".concat(JSON.stringify(r))),console.info(JSON.stringify(r,null,2)),console.groupEnd(),[r,!0]}(t),n=Object(o.a)(e,2),a=n[0];return n[1]?[function(e){return"auto"===e.initStrategy?jp(e):e}(a),!0]:[a,!1]}),[t]),f=Object(o.a)(m,2),y=f[0],h=f[1];return Object(i.useEffect)((function(){h&&!ge()(y,t)&&c&&c(y)}),[h,t,y,c]),h?s.a.createElement(fe.b,{generateClassName:Ep},s.a.createElement(ye.a,{theme:je[r]},s.a.createElement(ke,{createStore:Fe},s.a.createElement(ze,{createStore:Xe},s.a.createElement(ar,{config:y,getComponent:xp,rowHeight:n,height:a,theme:r}),s.a.createElement(Or,{onWarn:l,onConfigChange:c,onLoaderChange:p,validateOnConfigChange:d}))))):s.a.createElement(de,Object.assign({theme:r},y))}n(1145),n(1146),n(1147);function Cp(e){var t=e.response,n=e.theme,a=Object(i.useState)(!0),r=Object(o.a)(a,2),l=r[0],c=r[1],p=Object(i.useRef)();return Object(i.useEffect)((function(){t.then((function(e){p.current=e,c(!1)}))}),[t]),l?s.a.createElement(de,{title:"Loading...",theme:n}):s.a.createElement(p.current)}function _p(e){return"\n    ok: ".concat(e.ok,"\n    status: ").concat(e.status,"\n    statusText: ").concat(e.statusText,"\n    redirected: ").concat(e.redirected,"\n    type: ").concat(e.type,"\n    url: ").concat(e.url)}n(714),n(525);!function(e,t){r.a.render(e,document.getElementById(t))}(function(){var e=new URLSearchParams(window.location.search).get("dataset");if(e){var t=ie[e];return s.a.createElement(Sp,{config:t,rowHeight:600,theme:"dark"})}var n=fetch("config.json").then((function(e){return function(e,t){return e.ok?e.text().then((function(n){try{var a=window.location.href.split("?")[0],r=n.replaceAll("http://localhost/",a),o=JSON.parse(r);return Promise.resolve((function(){return s.a.createElement(Sp,{config:o,rowHeight:600,theme:t})}))}catch(i){return Promise.resolve((function(){return s.a.createElement(de,{title:"Error parsing JSON",preformatted:_p(e),unformatted:"".concat(i.message,": ").concat(n),theme:t})}))}})):Promise.resolve((function(){return s.a.createElement(de,{title:"Fetch response not OK",preformatted:_p(e),theme:t})}))}(e,"dark")})).catch((function(e){return Promise.resolve((function(){return s.a.createElement(de,{title:"Error fetching",unformatted:e.message,theme:"dark"})}))}));return s.a.createElement(Cp,{response:n,theme:"dark"})}(),"full-app")},118:function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://github.com/vitessce/vitessce/#cell-sets","title":"Vitessce cell sets data","type":"object","definitions":{"stringArray":{"type":"array","items":{"type":"string"}},"stringProbabilityTupleArray":{"type":"array","items":{"type":"array","additionalItems":false,"items":[{"type":"string"},{"oneOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}]}},"colorArray":{"type":"array","items":{"type":"integer","minimum":0,"maximum":255},"minItems":3,"maxItems":3},"treeNodeLeaf":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"color":{"$ref":"#/definitions/colorArray"},"set":{"$ref":"#/definitions/stringArray"}}},"treeNodeNonLeaf":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"color":{"$ref":"#/definitions/colorArray"},"children":{"type":"array","items":{"$ref":"#/definitions/treeNode"}}}},"treeNode":{"oneOf":[{"$ref":"#/definitions/treeNodeNonLeaf"},{"$ref":"#/definitions/treeNodeLeaf"}]},"version0.1.2":{"type":"object","additionalProperties":false,"required":["version","datatype","tree"],"properties":{"dataset":{"type":"string"},"version":{"type":"string","enum":["0.1.2"]},"datatype":{"type":"string","enum":["cell"]},"tree":{"type":"array","items":{"$ref":"#/definitions/treeNodeNonLeaf"}}}},"treeNodeLeafProbabilistic":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"color":{"$ref":"#/definitions/colorArray"},"set":{"$ref":"#/definitions/stringProbabilityTupleArray"}}},"treeNodeNonLeafProbabilistic":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"color":{"$ref":"#/definitions/colorArray"},"children":{"type":"array","items":{"$ref":"#/definitions/treeNodeProbabilistic"}}}},"treeNodeProbabilistic":{"oneOf":[{"$ref":"#/definitions/treeNodeNonLeafProbabilistic"},{"$ref":"#/definitions/treeNodeLeafProbabilistic"}]},"version0.1.3":{"type":"object","additionalProperties":false,"required":["version","datatype","tree"],"properties":{"dataset":{"type":"string"},"version":{"type":"string","enum":["0.1.3"]},"datatype":{"type":"string","enum":["cell"]},"tree":{"type":"array","items":{"$ref":"#/definitions/treeNodeNonLeafProbabilistic"}}}}},"oneOf":[{"$ref":"#/definitions/version0.1.2"},{"$ref":"#/definitions/version0.1.3"}]}')},138:function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://github.com/vitessce/vitessce/#raster","title":"Vitessce image data","type":"object","definitions":{"transform":{"type":"object","additionalProperties":false,"oneOf":[{"required":["scale","translate"]},{"required":["matrix"]}],"properties":{"scale":{"type":"number"},"translate":{"type":"object","additionalProperties":false,"required":["y","x"],"properties":{"y":{"type":"number"},"x":{"type":"number"}}},"matrix":{"type":"array","items":{"type":"number"},"minItems":16,"maxItems":16}}},"dimensions":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["field","type","values"],"properties":{"field":{"type":"string"},"type":{"type":"string","enum":["quantitative","nominal","ordinal","temporal"]},"values":{"type":["array","null"],"items":{"type":"string"}}}}},"metadata":{"type":"object","additionalProperties":false,"anyOf":[{"required":["dimensions","isPyramid"]},{"required":["transform"]},{"required":["omeTiffOffsetsUrl"]},{"required":["isBitmask"]}],"properties":{"dimensions":{"$ref":"#/definitions/dimensions"},"isPyramid":{"type":"boolean"},"transform":{"$ref":"#/definitions/transform"},"isBitmask":{"type":"boolean"},"omeTiffOffsetsUrl":{"type":"string","format":"uri"}}},"requestInit":{"type":"object","additionalProperties":false,"required":[],"properties":{"method":{"type":"string"},"headers":{"type":"object"},"body":{"type":"string"},"mode":{"type":"string"},"credentials":{"type":"string"},"cache":{"type":"string"},"redirect":{"type":"string"},"referrer":{"type":"string"},"integrity":{"type":"string"}}},"image":{"type":"object","additionalProperties":false,"required":["name","url","type"],"properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri"},"type":{"type":"string"},"metadata":{"$ref":"#/definitions/metadata"},"requestInit":{"$ref":"#/definitions/requestInit"}}}},"additionalProperties":false,"required":["schemaVersion","images"],"properties":{"schemaVersion":{"type":"string"},"usePhysicalSizeScaling":{"type":"boolean","description":"Default is false: passing true in will infer scaling from the reported physcial size"},"renderLayers":{"type":"array","items":{"type":"string"}},"images":{"type":"array","items":{"$ref":"#/definitions/image"}}}}')},182:function(e){e.exports=JSON.parse('{"name":"vitessce","version":"1.1.17","description":"Vitessce app and React component library","author":"C McCallum","homepage":"http://vitessce.io/","license":"MIT","repository":"https://github.com/vitessce/vitessce/","keywords":["react-component"],"files":["dist","src"],"main":"dist/umd/production/index.min.js","module":"dist/esm/index.js","peerDependencies":{"react":"^16.8.6","react-dom":"^16.8.6"},"dependencies":{"@babel/runtime":"7.8.7","@hms-dbmi/viv":"~0.12.0","@loaders.gl/3d-tiles":"^3.0.0","@loaders.gl/core":"^3.0.0","@loaders.gl/images":"^3.0.0","@loaders.gl/loader-utils":"^3.0.0","@luma.gl/core":"~8.5.10","@material-ui/core":"~4.12.3","@material-ui/icons":"~4.11.2","@math.gl/core":"^3.5.6","@turf/area":"^6.5.0","@turf/boolean-contains":"^6.0.1","@turf/boolean-overlap":"^6.0.1","@turf/boolean-point-in-polygon":"^6.0.1","@turf/boolean-within":"^6.0.1","@turf/centroid":"^6.0.2","@turf/helpers":"^6.1.4","ajv":"^6.10.0","bowser":"^2.11.0","classnames":"^2.2.6","clsx":"^1.1.1","concaveman":"^1.2.1","d3-array":"^2.4.0","d3-dsv":"^1.1.1","d3-force":"^2.1.1","d3-quadtree":"^1.0.7","d3-scale-chromatic":"^1.3.3","deck.gl":"~8.6.0","dynamic-import-polyfill":"^0.1.1","fast-deep-equal":"^3.1.3","glslify":"^7.0.0","higlass":"1.11.4","higlass-register":"^0.3.0","higlass-zarr-datafetchers":"^0.2.1","internmap":"^2.0.3","json2csv":"^4.5.2","lodash":"^4.17.15","lz-string":"^1.4.4","math.gl":"^3.5.6","mathjs":"^9.2.0","nebula.gl":"^0.23.8","prop-types":"^15.7.2","rc-tooltip":"^4.0.3","rc-tree":"2.1.0","react-color":"^2.18.0","react-grid-layout":"^1.1.1","react-vega":"^7.4.4","react-virtualized":"^9.22.2","short-number":"^1.0.6","store":"^2.0.12","tinycolor2":"^1.4.1","uuid":"^3.3.2","vega":"^5.21.0","vega-lite":"^5.1.1","vega-tooltip":"^0.27.0","whatwg-fetch":"^3.0.0","window-pixi":"5.3.3","zarr":"^0.5.1","zustand":"^3.5.10"},"devDependencies":{"@babel/core":"7.9.0","@babel/plugin-proposal-class-properties":"7.14.5","@svgr/webpack":"5.3.1","@typescript-eslint/eslint-plugin":"^2.10.0","@typescript-eslint/parser":"^2.10.0","babel-eslint":"10.0.3","babel-loader":"8.1.0","babel-plugin-glsl":"^1.0.0","babel-plugin-named-asset-import":"^0.3.6","babel-preset-react-app":"9.1.2","camelcase":"^5.3.1","case-sensitive-paths-webpack-plugin":"2.3.0","concurrently":"^5.3.0","css-loader":"3.4.2","cypress":"^3.6.1","cypress-fail-on-console-error":"^2.0.6","dotenv":"8.2.0","dotenv-expand":"5.1.0","enzyme":"^3.9.0","enzyme-adapter-react-16":"^1.11.2","esbuild":"^0.12.28","esbuild-plugin-babel":"^0.2.3","esbuild-plugin-sass":"^0.6.0","eslint":"^6.6.0","eslint-config-airbnb":"^17.1.0","eslint-config-react-app":"^5.2.0","eslint-loader":"3.0.3","eslint-plugin-cypress":"^2.2.1","eslint-plugin-flowtype":"4.6.0","eslint-plugin-import":"2.20.0","eslint-plugin-jsx-a11y":"6.2.3","eslint-plugin-react":"7.18.0","eslint-plugin-react-hooks":"^1.6.1","eslint-plugin-vitessce-rules":"file:eslint","expect":"^24.5.0","file-loader":"4.3.0","fs-extra":"^8.1.0","glsl-colormap":"^1.0.1","html-webpack-plugin":"4.0.0-beta.11","http-server":"^0.12.3","identity-obj-proxy":"3.0.0","js-yaml":"^3.13.1","karma":"4.4.1","karma-chrome-launcher":"3.1.0","karma-mocha":"1.3.0","karma-mocha-reporter":"2.2.5","karma-sourcemap-loader":"0.3.7","karma-webpack":"4.0.2","mini-css-extract-plugin":"0.9.0","mocha":"7.1.0","node-sass":"^6.0.0","object.fromentries":"^2.0.2","optimize-css-assets-webpack-plugin":"5.0.3","pnp-webpack-plugin":"1.6.0","postcss-flexbugs-fixes":"4.1.0","postcss-loader":"3.0.0","postcss-normalize":"8.0.1","postcss-preset-env":"6.7.0","postcss-safe-parser":"4.0.1","react":"^16.14.0","react-app-polyfill":"^1.0.6","react-dev-utils":"^10.2.0","react-dom":"^16.14.0","resolve":"1.15.0","resolve-url-loader":"3.1.1","sass-loader":"^10.0.1","semver":"6.3.0","style-loader":"0.23.1","terser-webpack-plugin":"2.3.4","url-loader":"2.3.0","wait-on":"^3.2.0","webpack":"4.41.5","webpack-dev-server":"3.10.2","webpack-node-externals":"^2.5.2","workbox-webpack-plugin":"4.3.1","worker-loader":"^2.0.0"},"resolutions":{"@turf/difference":"6.0.1"},"scripts":{"build-demo:prod":"node scripts/build-demo.js production","build-lib:prod":"NODE_ENV=production node scripts/build-esm.mjs && node scripts/build-lib.js production","build-demo:dev":"node scripts/build-demo.js development","build-lib:dev":"NODE_ENV=development node scripts/build-esm.mjs && node scripts/build-lib.js development","build:prod":"npm run build-demo:prod && npm run build-lib:prod","build:dev":"npm run build-demo:dev && npm run build-lib:dev","build-lib:esm":"NODE_ENV=production node scripts/build-esm.mjs","prepublishOnly":"npm run build-lib:prod","clean":"rm -r dist-demo dist","start":"node scripts/start-demo.js","start:fixtures":"http-server src/loaders/fixtures/ --cors=\\"*\\" -s","start:fixtures-concurrently":"concurrently --kill-others \\"npm run start:fixtures\\"","test":"npm run start:fixtures-concurrently -- --success first \\"karma start scripts/karma.config.js --single-run\\"","test:watch":"npm run start:fixtures-concurrently -- \\"karma start scripts/karma.config.js --auto-watch\\"","cypress:open":"npm run start:fixtures-concurrently -- \\"cypress open\\"","cypress:run":"npm run start:fixtures-concurrently -- --success first --kill-others \\"cypress run\\"","lint-fix":"eslint -c .eslintrc.yml --ext .js --fix src/"},"browserslist":{"production":[">0.2%","not dead","not op_mini all"],"development":["last 1 chrome version","last 1 firefox version","last 1 safari version"]},"babel":{"presets":["react-app"],"plugins":["glsl"]}}')},331:function(e,t){},333:function(e,t){},334:function(e,t){},366:function(e,t){},637:function(e,t){},656:function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://github.com/vitessce/vitessce/#cells","title":"Vitessce cell data","type":"object","definitions":{"coord":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"number"}},"positiveFloatValues":{"type":"object","patternProperties":{".":{"type":"number","minimum":0}}},"stringValues":{"type":"object","patternProperties":{".":{"type":"string"}}}},"patternProperties":{".":{"additionalProperties":false,"required":[],"properties":{"mappings":{"type":"object","patternProperties":{".":{"$ref":"#/definitions/coord"}}},"xy":{"$ref":"#/definitions/coord"},"genes":{"$ref":"#/definitions/positiveFloatValues"},"factors":{"$ref":"#/definitions/stringValues"},"poly":{"type":"array","items":{"$ref":"#/definitions/coord"}}}}}}')},657:function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://github.com/vitessce/vitessce/#molecules","title":"Vitessce molecule data","type":"object","definitions":{"coord":{"type":"array","maxItems":2,"minItems":2,"items":{"type":"number"}}},"patternProperties":{".":{"type":"array","items":{"$ref":"#/definitions/coord"}}}}')},658:function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://github.com/vitessce/vitessce/#neighborhoods","title":"Vitessce neighborhood data","type":"object","definitions":{"coord":{"type":"array","maxItems":2,"minItems":2,"items":{"type":"number"}}},"patternProperties":{".":{"additionalProperties":false,"required":["poly"],"properties":{"poly":{"type":"array","maxItems":3,"minItems":3,"items":{"$ref":"#/definitions/coord"}}}}}}')},659:function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://github.com/vitessce/vitessce/#genes","title":"Vitessce gene data","type":"object","definitions":{"positiveFloatValues":{"type":"object","patternProperties":{".":{"type":"number","minimum":0}}}},"patternProperties":{".":{"additionalProperties":false,"required":["max","cells"],"properties":{"max":{"type":"number"},"cells":{"$ref":"#/definitions/positiveFloatValues"}}}}}')},660:function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://github.com/vitessce/vitessce/#clusters","title":"Vitessce cluster data","type":"object","definitions":{"stringArray":{"type":"array","items":{"type":"string"}},"matrix":{"type":"array","items":{"type":"array","items":{"type":"number","minimum":0,"maximum":1}}}},"additionalProperties":false,"required":["rows","cols","matrix"],"properties":{"rows":{"$ref":"#/definitions/stringArray"},"cols":{"$ref":"#/definitions/stringArray"},"matrix":{"$ref":"#/definitions/matrix"}}}')},672:function(e,t){},673:function(e,t){},674:function(e,t){},677:function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://github.com/vitessce/vitessce/#cell-sets-tabular","title":"Vitessce cell sets data, tabular format","definitions":{"colorArray":{"type":"array","items":{"type":"integer","minimum":0,"maximum":255},"minItems":3,"maxItems":3}},"type":"array","items":{"type":"object","additionalProperties":false,"required":["groupName","setName","obsId"],"properties":{"groupName":{"type":"string"},"setName":{"type":"string"},"setColor":{"$ref":"#/definitions/colorArray"},"obsId":{"type":"string"},"predictionScore":{"oneOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]}}}}')},681:function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://github.com/vitessce/vitessce/#dataset","title":"Vitessce data set","type":"object","definitions":{"components":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["component","x","y"],"properties":{"component":{"type":"string"},"props":{"type":"object"},"x":{"type":"integer"},"y":{"type":"integer"},"w":{"type":"integer"},"h":{"type":"integer"}}}},"requestInit":{"type":"object","additionalProperties":false,"required":[],"properties":{"method":{"type":"string"},"headers":{"type":"object"},"body":{"type":"string"},"mode":{"type":"string"},"credentials":{"type":"string"},"cache":{"type":"string"},"redirect":{"type":"string"},"referrer":{"type":"string"},"integrity":{"type":"string"}}}},"additionalProperties":false,"required":["version","name","layers"],"properties":{"name":{"type":"string"},"public":{"type":"boolean"},"description":{"type":"string"},"layers":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["name","type","fileType","url"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"fileType":{"type":"string"},"url":{"type":"string"},"requestInit":{"$ref":"#/definitions/requestInit"}}}},"staticLayout":{"$ref":"#/definitions/components"},"version":{"type":"string","enum":["0.1.0"]}}}')},682:function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://github.com/vitessce/vitessce/#dataset","title":"Vitessce data set","type":"object","definitions":{"components":{"description":"The layout array defines the views, or components, rendered in the grid.","type":"array","items":{"type":"object","additionalProperties":false,"required":["component","x","y"],"properties":{"component":{"type":"string","description":"Specify a component using a name defined in the component registry."},"props":{"type":"object","description":"Extra prop values for the component."},"x":{"type":"integer"},"y":{"type":"integer"},"w":{"type":"integer"},"h":{"type":"integer"},"coordinationScopes":{"type":"object","description":"Component-level coordination scope mappings define which coordination object values a particular component can read and write, for each coordination type.","additionalProperties":false,"required":[],"properties":{"dataset":{"type":"string"},"embeddingType":{"type":"string"},"embeddingZoom":{"type":"string"},"embeddingRotation":{"type":"string"},"embeddingTargetX":{"type":"string"},"embeddingTargetY":{"type":"string"},"embeddingTargetZ":{"type":"string"},"embeddingCellSetPolygonsVisible":{"type":"string"},"embeddingCellSetLabelsVisible":{"type":"string"},"embeddingCellSetLabelSize":{"type":"string"},"embeddingCellRadius":{"type":"string"},"spatialZoom":{"type":"string"},"spatialRotation":{"type":"string"},"spatialTargetX":{"type":"string"},"spatialTargetY":{"type":"string"},"spatialTargetZ":{"type":"string"},"heatmapZoomX":{"type":"string"},"heatmapZoomY":{"type":"string"},"heatmapTargetX":{"type":"string"},"heatmapTargetY":{"type":"string"},"cellFilter":{"type":"string"},"cellHighlight":{"type":"string"},"cellSetSelection":{"type":"string"},"cellSetHighlight":{"type":"string"},"cellSetColor":{"type":"string"},"geneFilter":{"type":"string"},"geneHighlight":{"type":"string"},"geneSelection":{"type":"string"},"geneExpressionTransform":{"type":"string"},"geneExpressionColormap":{"type":"string"},"geneExpressionColormapRange":{"type":"string"},"cellColorEncoding":{"type":"string"},"spatialLayers":{"type":"string"},"genomicZoomX":{"type":"string"},"genomicZoomY":{"type":"string"},"genomicTargetX":{"type":"string"},"genomicTargetY":{"type":"string"},"additionalCellSets":{"type":"string"},"moleculeHighlight":{"type":"string"}}}}}},"annDataCellSets":{"type":"array","description":"Array of cell set configuration, following closely the conventions of the tabular schema","items":{"type":"object","additionalProperties":false,"required":["groupName","setName"],"properties":{"groupName":{"type":"string","description":"The display name for the set, like \'Cell Type\' or \'Louvain.\'"},"setName":{"type":"string","description":"The location in the AnnData store for the set, like \'obs/louvain\' or \'obs/celltype.\'"}}}},"annDataCells":{"type":"object","description":"The properties of this object are the configuration for how to layout scatterplots and spatial information","minProperties":1,"additionalProperties":false,"required":[],"properties":{"xy":{"type":"string","description":"The location in the AnnData store of cell centroids, like \'obsm/X_centroids.\'"},"poly":{"type":"string","description":"The location in the AnnData store of cell polygon outlines, like \'obsm/X_polygons.\'"},"factors":{"type":"array","description":"List of locations in the AnnData store of cell sets, like \'obs/louvain\'","items":{"type":"string"}},"mappings":{"patternProperties":{".":{"type":"object","description":"An object containing key-values for mappings like { UMAP: { key: \'obsm/X_umap\', dims: [0, 1] } }.","additionalProperties":false,"required":["key"],"properties":{"key":{"type":"string","description":"Where to look in the AnnData store for this mapping, like \'obsm/X_umap.\'"},"dims":{"type":"array","description":"Which indices of the obsm object to take for a scatterplot, allowing for, for example, different PCs from obsm/X_pca","minItems":2,"maxItems":2,"items":{"type":"number"}}}}}}}},"annDataExpressionMatrix":{"type":"object","description":"The properties of this object are the configuration for how to fetch the cell x genes matrix","additionalProperties":false,"required":["matrix"],"properties":{"matrix":{"type":"string","description":"The location in the AnnData store of the cell x gene matrix, like \'obsm/hvg_subset.\' or \'X\'"},"geneFilter":{"type":"string","description":"The location in the AnnData store of a filter for the genes if using a subset of the data, like \'var.highly_variable.\' if the matrix comes from \'obsm/hvg_subset.\'"},"matrixGeneFilter":{"type":"string","description":"The location in the AnnData store of a filter for the matrix data (used in heatmap and histogram), like \'var.highly_variable.\'\'"}}},"requestInit":{"type":"object","description":"The properties of this object correspond to the parameters of the JavaScript fetch() function.","additionalProperties":false,"required":[],"properties":{"method":{"type":"string"},"headers":{"type":"object"},"body":{"type":"string"},"mode":{"type":"string"},"credentials":{"type":"string"},"cache":{"type":"string"},"redirect":{"type":"string"},"referrer":{"type":"string"},"integrity":{"type":"string"}}},"rasterLayer":{"description":"The properties of this object are the rendering settings for the raster layer.","additionalProperties":false,"required":["channels","colormap","index","opacity","type"],"properties":{"channels":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["selection"],"properties":{"color":{"type":"array","items":{"type":"number"},"description":"The color to use when rendering this channel under the null colormap."},"selection":{"type":"object","description":"Determines the channel selection, e.g. some Z and time slice."},"slider":{"type":"array","items":{"type":"number"},"description":"Determines the range for color mapping."},"visible":{"type":"boolean","description":"Determines whether this channel of the layer will be rendered in the spatial component."}}}},"colormap":{"oneOf":[{"type":"string","description":"The name of the colormap to use for this layer."},{"type":"null","description":"Use the solid color definitions."}]},"transparentColor":{"oneOf":[{"type":"array","minItems":3,"maxItems":3,"items":{"type":"number","description":"One of R G or B (0 - 255)."},"description":"Determines the color to be set to opacity 0"},{"type":"null","description":"No selection."}]},"index":{"type":"number","description":"The index of the layer among the array of layers available in the image file."},"modelMatrix":{"oneOf":[{"type":"array","minItems":16,"maxItems":16,"description":"transformation matrix for this layer"},{"type":"null","description":"Use no transformation."}]},"opacity":{"type":"number"},"domainType":{"type":"string","enum":["Full","Min/Max"],"description":"Determines the extent of the channel slider input element in the layer controller."},"type":{"type":"string","enum":["raster"]}}},"moleculesLayer":{"description":"The properties of this object are the rendering settings for the molecules layer.","additionalProperties":false,"required":["visible","radius","opacity","type"],"properties":{"visible":{"type":"boolean"},"radius":{"type":"number"},"opacity":{"type":"number"},"type":{"type":"string","enum":["molecules"]}}},"cellsLayer":{"description":"The properties of this object are the rendering settings for the cells layer.","additionalProperties":false,"required":["visible","stroked","radius","opacity","type"],"properties":{"visible":{"type":"boolean"},"stroked":{"type":"boolean"},"radius":{"type":"number"},"opacity":{"type":"number"},"type":{"type":"string","enum":["cells"]}}},"neighborhoodsLayer":{"description":"The properties of this object are the rendering settings for the neighborhoods layer.","additionalProperties":false,"required":["visible","type"],"properties":{"visible":{"type":"boolean"},"type":{"type":"string","enum":["neighborhoods"]}}},"spatialLayers":{"type":"array","description":"Array of Spatial Layers","items":{"oneOf":[{"$ref":"#/definitions/rasterLayer"},{"$ref":"#/definitions/cellsLayer"},{"$ref":"#/definitions/moleculesLayer"},{"$ref":"#/definitions/neighborhoodsLayer"}]}}},"additionalProperties":false,"required":["version","name","datasets","layout","initStrategy"],"properties":{"name":{"type":"string"},"public":{"type":"boolean"},"description":{"type":"string"},"datasets":{"type":"array","description":"The datasets array defines groups of files, where the files within each dataset reference the same entities (cells, genes, cell sets, etc).","items":{"type":"object","additionalProperties":false,"required":["uid","files"],"properties":{"uid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"files":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["type","fileType"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"fileType":{"type":"string"},"url":{"type":"string"},"options":{"oneOf":[{"$ref":"#/definitions/annDataCellSets"},{"$ref":"https://github.com/vitessce/vitessce/#raster"},{"$ref":"#/definitions/annDataCells"},{"$ref":"#/definitions/annDataExpressionMatrix"}]},"requestInit":{"$ref":"#/definitions/requestInit"}}}}}}},"coordinationSpace":{"type":"object","description":"The coordination space stores the values for each scope of each coordination object.","additionalProperties":false,"required":[],"properties":{"dataset":{"type":"object","patternProperties":{".":{"type":"string"}}},"embeddingZoom":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"embeddingRotation":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingTargetX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"embeddingTargetY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"embeddingTargetZ":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingType":{"type":"object","patternProperties":{".":{"type":"string"}}},"embeddingCellSetPolygonsVisible":{"type":"object","patternProperties":{".":{"type":"boolean"}}},"embeddingCellSetLabelsVisible":{"type":"object","patternProperties":{".":{"type":"boolean"}}},"embeddingCellSetLabelSize":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingCellRadius":{"type":"object","patternProperties":{".":{"type":"number"}}},"spatialZoom":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialRotation":{"type":"object","patternProperties":{".":{"type":"number"}}},"spatialTargetX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialTargetY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialTargetZ":{"type":"object","patternProperties":{".":{"type":"number"}}},"spatialLayers":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/spatialLayers"}]}}},"heatmapZoomX":{"type":"object","patternProperties":{".":{"type":"number"}}},"heatmapZoomY":{"type":"object","patternProperties":{".":{"type":"number"}}},"heatmapTargetX":{"type":"object","patternProperties":{".":{"type":"number"}}},"heatmapTargetY":{"type":"object","patternProperties":{".":{"type":"number"}}},"cellFilter":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cells will be filtered out initially."},{"type":"array","items":{"type":"string"}}]}}},"cellHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cell will be highlighted initially."},{"type":"string"}]}}},"cellSetSelection":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto cell set initialization is enabled, cell set selections will be automatically initialized."},{"type":"array"}]}}},"cellSetHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cell sets will be highlighted initially."},{"type":"string"}]}}},"cellSetColor":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, cell set colors will be automatically initialized."},{"type":"array","items":{"type":"object","additionalProperties":false,"required":["path","color"],"properties":{"path":{"type":"array","items":{"type":"string"}},"color":{"type":"array","items":{"type":"number"}}}}}]}}},"cellColorEncoding":{"type":"object","patternProperties":{".":{"type":"string"}}},"geneFilter":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no genes will be filtered out initially."},{"type":"array","items":{"type":"string"}}]}}},"geneHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no genes will be highlighted initially."},{"type":"string"}]}}},"geneSelection":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null"},{"type":"array","items":{"type":"string"}}]}}},"geneExpressionTransform":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null"},{"type":"string","pattern":"log1p"}]}}},"geneExpressionColormap":{"type":"object","patternProperties":{".":{"type":"string"}}},"geneExpressionColormapRange":{"type":"object","patternProperties":{".":{"type":"array","items":{"type":"number"}}}},"genomicZoomX":{"type":"object","patternProperties":{".":{"type":"number"}}},"genomicZoomY":{"type":"object","patternProperties":{".":{"type":"number"}}},"genomicTargetX":{"type":"object","patternProperties":{".":{"type":"number"}}},"genomicTargetY":{"type":"object","patternProperties":{".":{"type":"number"}}},"additionalCellSets":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cell will be highlighted initially."},{"$ref":"https://github.com/vitessce/vitessce/#cell-sets"}]}}},"moleculeHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no molecule will be highlighted initially."},{"type":"string"}]}}}}},"layout":{"$ref":"#/definitions/components"},"initStrategy":{"type":"string","enum":["none","auto"],"description":"The initialization strategy determines how missing coordination objects and coordination scope mappings are initially filled in."},"version":{"type":"string","enum":["1.0.0"],"description":"The schema version for the view config."}}}')},683:function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://github.com/vitessce/vitessce/#dataset","title":"Vitessce data set","type":"object","definitions":{"components":{"description":"The layout array defines the views, or components, rendered in the grid.","type":"array","items":{"type":"object","additionalProperties":false,"required":["component","x","y"],"properties":{"component":{"type":"string","description":"Specify a component using a name defined in the component registry."},"props":{"type":"object","description":"Extra prop values for the component."},"x":{"type":"integer"},"y":{"type":"integer"},"w":{"type":"integer"},"h":{"type":"integer"},"coordinationScopes":{"type":"object","description":"Component-level coordination scope mappings define which coordination object values a particular component can read and write, for each coordination type.","additionalProperties":false,"required":[],"properties":{"dataset":{"type":"string"},"embeddingType":{"type":"string"},"embeddingZoom":{"type":"string"},"embeddingRotation":{"type":"string"},"embeddingTargetX":{"type":"string"},"embeddingTargetY":{"type":"string"},"embeddingTargetZ":{"type":"string"},"embeddingCellSetPolygonsVisible":{"type":"string"},"embeddingCellSetLabelsVisible":{"type":"string"},"embeddingCellSetLabelSize":{"type":"string"},"embeddingCellRadius":{"type":"string"},"spatialZoom":{"type":"string"},"spatialRotation":{"type":"string"},"spatialTargetX":{"type":"string"},"spatialTargetY":{"type":"string"},"spatialTargetZ":{"type":"string"},"spatialRotationX":{"type":"string"},"spatialRotationY":{"type":"string"},"spatialRotationZ":{"type":"string"},"spatialRotationOrbit":{"type":"string"},"spatialOrbitAxis":{"type":"string"},"spatialAxisFixed":{"type":"string"},"heatmapZoomX":{"type":"string"},"heatmapZoomY":{"type":"string"},"heatmapTargetX":{"type":"string"},"heatmapTargetY":{"type":"string"},"cellFilter":{"type":"string"},"cellHighlight":{"type":"string"},"cellSetSelection":{"type":"string"},"cellSetHighlight":{"type":"string"},"cellSetColor":{"type":"string"},"geneFilter":{"type":"string"},"geneHighlight":{"type":"string"},"geneSelection":{"type":"string"},"geneExpressionTransform":{"type":"string"},"geneExpressionColormap":{"type":"string"},"geneExpressionColormapRange":{"type":"string"},"cellColorEncoding":{"type":"string"},"spatialRasterLayers":{"type":"string"},"spatialCellsLayer":{"type":"string"},"spatialMoleculesLayer":{"type":"string"},"spatialNeighborhoodsLayer":{"type":"string"},"genomicZoomX":{"type":"string"},"genomicZoomY":{"type":"string"},"genomicTargetX":{"type":"string"},"genomicTargetY":{"type":"string"},"additionalCellSets":{"type":"string"},"moleculeHighlight":{"type":"string"}}}}}},"annDataCellSets":{"type":"array","description":"Array of cell set configuration, following closely the conventions of the tabular schema","items":{"type":"object","additionalProperties":false,"required":["groupName","setName"],"properties":{"groupName":{"type":"string","description":"The display name for the set, like \'Cell Type\' or \'Louvain.\'"},"setName":{"type":"string","description":"The location in the AnnData store for the set, like \'obs/louvain\' or \'obs/celltype.\'"}}}},"annDataCells":{"type":"object","description":"The properties of this object are the configuration for how to layout scatterplots and spatial information","minProperties":1,"additionalProperties":false,"required":[],"properties":{"xy":{"type":"string","description":"The location in the AnnData store of cell centroids, like \'obsm/X_centroids.\'"},"poly":{"type":"string","description":"The location in the AnnData store of cell polygon outlines, like \'obsm/X_polygons.\'"},"factors":{"type":"array","description":"List of locations in the AnnData store of cell sets, like \'obs/louvain\'","items":{"type":"string"}},"mappings":{"patternProperties":{".":{"type":"object","description":"An object containing key-values for mappings like { UMAP: { key: \'obsm/X_umap\', dims: [0, 1] } }.","additionalProperties":false,"required":["key"],"properties":{"key":{"type":"string","description":"Where to look in the AnnData store for this mapping, like \'obsm/X_umap.\'"},"dims":{"type":"array","description":"Which indices of the obsm object to take for a scatterplot, allowing for, for example, different PCs from obsm/X_pca","minItems":2,"maxItems":2,"items":{"type":"number"}}}}}}}},"annDataExpressionMatrix":{"type":"object","description":"The properties of this object are the configuration for how to fetch the cell x genes matrix","additionalProperties":false,"required":["matrix"],"properties":{"matrix":{"type":"string","description":"The location in the AnnData store of the cell x gene matrix, like \'obsm/hvg_subset.\' or \'X\'"},"geneFilter":{"type":"string","description":"The location in the AnnData store of a filter for the genes if using a subset of the data, like \'var.highly_variable.\' if the matrix comes from \'obsm/hvg_subset.\'"},"matrixGeneFilter":{"type":"string","description":"The location in the AnnData store of a filter for the matrix data (used in heatmap and histogram), like \'var.highly_variable.\'\'"}}},"requestInit":{"type":"object","description":"The properties of this object correspond to the parameters of the JavaScript fetch() function.","additionalProperties":false,"required":[],"properties":{"method":{"type":"string"},"headers":{"type":"object"},"body":{"type":"string"},"mode":{"type":"string"},"credentials":{"type":"string"},"cache":{"type":"string"},"redirect":{"type":"string"},"referrer":{"type":"string"},"integrity":{"type":"string"}}},"rasterLayer":{"description":"The properties of this object are the rendering settings for the raster layer.","additionalProperties":false,"required":["channels","colormap","index","opacity"],"properties":{"channels":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["selection"],"properties":{"color":{"type":"array","items":{"type":"number"},"description":"The color to use when rendering this channel under the null colormap."},"selection":{"type":"object","description":"Determines the channel selection, e.g. some Z and time slice."},"slider":{"type":"array","items":{"type":"number"},"description":"Determines the range for color mapping."},"visible":{"type":"boolean","description":"Determines whether this channel of the layer will be rendered in the spatial component."}}}},"colormap":{"oneOf":[{"type":"string","description":"The name of the colormap to use for this layer."},{"type":"null","description":"Use the solid color definitions."}]},"transparentColor":{"oneOf":[{"type":"array","minItems":3,"maxItems":3,"items":{"type":"number","description":"One of R G or B (0 - 255)."},"description":"Determines the color to be set to opacity 0"},{"type":"null","description":"No selection."}]},"index":{"type":"number","description":"The index of the layer among the array of layers available in the image file."},"opacity":{"type":"number"},"modelMatrix":{"oneOf":[{"type":"array","minItems":16,"maxItems":16,"description":"transformation matrix for this layer"},{"type":"null","description":"Use no transformation."}]},"domainType":{"type":"string","enum":["Full","Min/Max"],"description":"Determines the extent of the channel slider input element in the layer controller."},"resolution":{"type":"number","description":"Resolution of 3D volumetric rendering"},"xSlice":{"oneOf":[{"type":"array","minItems":2,"maxItems":2,"description":"Slice bounds"},{"type":"null","description":"No slicing"}]},"renderingMode":{"type":"string","description":"Rendering mode of 3D volumetric rendering"},"ySlice":{"oneOf":[{"type":"array","minItems":2,"maxItems":2,"description":"Slice bounds"},{"type":"null","description":"No slicing"}]},"zSlice":{"oneOf":[{"type":"array","minItems":2,"maxItems":2,"description":"Slice bounds"},{"type":"null","description":"No slicing"}]},"type":{"type":"string"},"use3d":{"type":"boolean"},"visible":{"type":"boolean","description":"Determines whether this entire layer will be rendered in the spatial component."}}},"moleculesLayer":{"type":"object","description":"The properties of this object are the rendering settings for the molecules layer.","additionalProperties":false,"required":["visible","radius","opacity"],"properties":{"visible":{"type":"boolean"},"radius":{"type":"number"},"opacity":{"type":"number"}}},"cellsLayer":{"type":"object","description":"The properties of this object are the rendering settings for the cells layer.","additionalProperties":false,"required":["visible","stroked","radius","opacity"],"properties":{"visible":{"type":"boolean"},"stroked":{"type":"boolean"},"radius":{"type":"number"},"opacity":{"type":"number"}}},"neighborhoodsLayer":{"type":"object","description":"The properties of this object are the rendering settings for the neighborhoods layer.","additionalProperties":false,"required":["visible"],"properties":{"visible":{"type":"boolean"}}},"spatialRasterLayers":{"type":"array","description":"Array of Spatial Layers","items":{"$ref":"#/definitions/rasterLayer"}}},"additionalProperties":false,"required":["version","name","datasets","layout","initStrategy"],"properties":{"name":{"type":"string"},"public":{"type":"boolean"},"description":{"type":"string"},"datasets":{"type":"array","description":"The datasets array defines groups of files, where the files within each dataset reference the same entities (cells, genes, cell sets, etc).","items":{"type":"object","additionalProperties":false,"required":["uid","files"],"properties":{"uid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"files":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["type","fileType"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"fileType":{"type":"string"},"url":{"type":"string"},"options":{"oneOf":[{"$ref":"#/definitions/annDataCellSets"},{"$ref":"https://github.com/vitessce/vitessce/#raster"},{"$ref":"#/definitions/annDataCells"},{"$ref":"#/definitions/annDataExpressionMatrix"}]},"requestInit":{"$ref":"#/definitions/requestInit"}}}}}}},"coordinationSpace":{"type":"object","description":"The coordination space stores the values for each scope of each coordination object.","additionalProperties":false,"required":[],"properties":{"dataset":{"type":"object","patternProperties":{".":{"type":"string"}}},"embeddingZoom":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"embeddingRotation":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingTargetX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"embeddingTargetY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"embeddingTargetZ":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingType":{"type":"object","patternProperties":{".":{"type":"string"}}},"embeddingCellSetPolygonsVisible":{"type":"object","patternProperties":{".":{"type":"boolean"}}},"embeddingCellSetLabelsVisible":{"type":"object","patternProperties":{".":{"type":"boolean"}}},"embeddingCellSetLabelSize":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingCellRadius":{"type":"object","patternProperties":{".":{"type":"number"}}},"spatialZoom":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialRotation":{"type":"object","patternProperties":{".":{"type":"number"}}},"spatialTargetX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialTargetY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialTargetZ":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialRotationX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialRotationY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialRotationZ":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialRotationOrbit":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialOrbitAxis":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"string"}]}}},"spatialAxisFixed":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"Whether or not to have a fixed axis for the camera. Only useful for 3D viewing."},{"type":"boolean"}]}}},"spatialRasterLayers":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/spatialRasterLayers"}]}}},"spatialCellsLayer":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/cellsLayer"}]}}},"spatialNeighborhoodsLayer":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/neighborhoodsLayer"}]}}},"spatialMoleculesLayer":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/moleculesLayer"}]}}},"heatmapZoomX":{"type":"object","patternProperties":{".":{"type":"number"}}},"heatmapZoomY":{"type":"object","patternProperties":{".":{"type":"number"}}},"heatmapTargetX":{"type":"object","patternProperties":{".":{"type":"number"}}},"heatmapTargetY":{"type":"object","patternProperties":{".":{"type":"number"}}},"cellFilter":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cells will be filtered out initially."},{"type":"array","items":{"type":"string"}}]}}},"cellHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cell will be highlighted initially."},{"type":"string"}]}}},"cellSetSelection":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto cell set initialization is enabled, cell set selections will be automatically initialized."},{"type":"array"}]}}},"cellSetHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cell sets will be highlighted initially."},{"type":"string"}]}}},"cellSetColor":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, cell set colors will be automatically initialized."},{"type":"array","items":{"type":"object","additionalProperties":false,"required":["path","color"],"properties":{"path":{"type":"array","items":{"type":"string"}},"color":{"type":"array","items":{"type":"number"}}}}}]}}},"cellColorEncoding":{"type":"object","patternProperties":{".":{"type":"string"}}},"geneFilter":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no genes will be filtered out initially."},{"type":"array","items":{"type":"string"}}]}}},"geneHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no genes will be highlighted initially."},{"type":"string"}]}}},"geneSelection":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null"},{"type":"array","items":{"type":"string"}}]}}},"geneExpressionTransform":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null"},{"type":"string","pattern":"log1p"}]}}},"geneExpressionColormap":{"type":"object","patternProperties":{".":{"type":"string"}}},"geneExpressionColormapRange":{"type":"object","patternProperties":{".":{"type":"array","items":{"type":"number"}}}},"genomicZoomX":{"type":"object","patternProperties":{".":{"type":"number"}}},"genomicZoomY":{"type":"object","patternProperties":{".":{"type":"number"}}},"genomicTargetX":{"type":"object","patternProperties":{".":{"type":"number"}}},"genomicTargetY":{"type":"object","patternProperties":{".":{"type":"number"}}},"additionalCellSets":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cell will be highlighted initially."},{"$ref":"https://github.com/vitessce/vitessce/#cell-sets"}]}}},"moleculeHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no molecule will be highlighted initially."},{"type":"string"}]}}}}},"layout":{"$ref":"#/definitions/components"},"initStrategy":{"type":"string","enum":["none","auto"],"description":"The initialization strategy determines how missing coordination objects and coordination scope mappings are initially filled in."},"version":{"type":"string","enum":["1.0.1"],"description":"The schema version for the view config."}}}')},684:function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://github.com/vitessce/vitessce/#dataset","title":"Vitessce data set","type":"object","definitions":{"components":{"description":"The layout array defines the views, or components, rendered in the grid.","type":"array","items":{"type":"object","additionalProperties":false,"required":["component","x","y"],"properties":{"component":{"type":"string","description":"Specify a component using a name defined in the component registry."},"props":{"type":"object","description":"Extra prop values for the component."},"x":{"type":"integer"},"y":{"type":"integer"},"w":{"type":"integer"},"h":{"type":"integer"},"coordinationScopes":{"type":"object","description":"Component-level coordination scope mappings define which coordination object values a particular component can read and write, for each coordination type.","additionalProperties":false,"required":[],"properties":{"dataset":{"type":"string"},"embeddingType":{"type":"string"},"embeddingZoom":{"type":"string"},"embeddingRotation":{"type":"string"},"embeddingTargetX":{"type":"string"},"embeddingTargetY":{"type":"string"},"embeddingTargetZ":{"type":"string"},"embeddingCellSetPolygonsVisible":{"type":"string"},"embeddingCellSetLabelsVisible":{"type":"string"},"embeddingCellSetLabelSize":{"type":"string"},"embeddingCellRadius":{"type":"string"},"spatialZoom":{"type":"string"},"spatialRotation":{"type":"string"},"spatialTargetX":{"type":"string"},"spatialTargetY":{"type":"string"},"spatialTargetZ":{"type":"string"},"spatialRotationX":{"type":"string"},"spatialRotationY":{"type":"string"},"spatialRotationZ":{"type":"string"},"spatialRotationOrbit":{"type":"string"},"spatialOrbitAxis":{"type":"string"},"spatialAxisFixed":{"type":"string"},"heatmapZoomX":{"type":"string"},"heatmapZoomY":{"type":"string"},"heatmapTargetX":{"type":"string"},"heatmapTargetY":{"type":"string"},"cellFilter":{"type":"string"},"cellHighlight":{"type":"string"},"cellSetSelection":{"type":"string"},"cellSetHighlight":{"type":"string"},"cellSetColor":{"type":"string"},"geneFilter":{"type":"string"},"geneHighlight":{"type":"string"},"geneSelection":{"type":"string"},"geneExpressionTransform":{"type":"string"},"geneExpressionColormap":{"type":"string"},"geneExpressionColormapRange":{"type":"string"},"cellColorEncoding":{"type":"string"},"spatialRasterLayers":{"type":"string"},"spatialCellsLayer":{"type":"string"},"spatialMoleculesLayer":{"type":"string"},"spatialNeighborhoodsLayer":{"type":"string"},"genomicZoomX":{"type":"string"},"genomicZoomY":{"type":"string"},"genomicTargetX":{"type":"string"},"genomicTargetY":{"type":"string"},"additionalCellSets":{"type":"string"},"moleculeHighlight":{"type":"string"}}}}}},"annDataCellSets":{"type":"array","description":"Array of cell set configuration, following closely the conventions of the tabular schema","items":{"type":"object","additionalProperties":false,"required":["groupName","setName"],"properties":{"groupName":{"type":"string","description":"The display name for the set, like \'Cell Type\' or \'Louvain.\'"},"setName":{"type":"string","description":"The location in the AnnData store for the set, like \'obs/louvain\' or \'obs/celltype.\'"}}}},"annDataCells":{"type":"object","description":"The properties of this object are the configuration for how to layout scatterplots and spatial information","minProperties":1,"additionalProperties":false,"required":[],"properties":{"xy":{"type":"string","description":"The location in the AnnData store of cell centroids, like \'obsm/X_centroids.\'"},"poly":{"type":"string","description":"The location in the AnnData store of cell polygon outlines, like \'obsm/X_polygons.\'"},"factors":{"type":"array","description":"List of locations in the AnnData store of cell sets, like \'obs/louvain\'","items":{"type":"string"}},"mappings":{"patternProperties":{".":{"type":"object","description":"An object containing key-values for mappings like { UMAP: { key: \'obsm/X_umap\', dims: [0, 1] } }.","additionalProperties":false,"required":["key"],"properties":{"key":{"type":"string","description":"Where to look in the AnnData store for this mapping, like \'obsm/X_umap.\'"},"dims":{"type":"array","description":"Which indices of the obsm object to take for a scatterplot, allowing for, for example, different PCs from obsm/X_pca","minItems":2,"maxItems":2,"items":{"type":"number"}}}}}}}},"annDataExpressionMatrix":{"type":"object","description":"The properties of this object are the configuration for how to fetch the cell x genes matrix","additionalProperties":false,"required":["matrix"],"properties":{"matrix":{"type":"string","description":"The location in the AnnData store of the cell x gene matrix, like \'obsm/hvg_subset.\' or \'X\'"},"geneFilter":{"type":"string","description":"The location in the AnnData store of a filter for the genes if using a subset of the data, like \'var.highly_variable.\' if the matrix comes from \'obsm/hvg_subset.\'"},"matrixGeneFilter":{"type":"string","description":"The location in the AnnData store of a filter for the matrix data (used in heatmap and histogram), like \'var.highly_variable.\'\'"}}},"requestInit":{"type":"object","description":"The properties of this object correspond to the parameters of the JavaScript fetch() function.","additionalProperties":false,"required":[],"properties":{"method":{"type":"string"},"headers":{"type":"object"},"body":{"type":"string"},"mode":{"type":"string"},"credentials":{"type":"string"},"cache":{"type":"string"},"redirect":{"type":"string"},"referrer":{"type":"string"},"integrity":{"type":"string"}}},"rasterLayer":{"description":"The properties of this object are the rendering settings for the raster layer.","additionalProperties":false,"required":["channels","colormap","index","opacity"],"properties":{"channels":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["selection"],"properties":{"color":{"type":"array","items":{"type":"number"},"description":"The color to use when rendering this channel under the null colormap."},"selection":{"type":"object","description":"Determines the channel selection, e.g. some Z and time slice."},"slider":{"type":"array","items":{"type":"number"},"description":"Determines the range for color mapping."},"visible":{"type":"boolean","description":"Determines whether this channel of the layer will be rendered in the spatial component."}}}},"colormap":{"oneOf":[{"type":"string","description":"The name of the colormap to use for this layer."},{"type":"null","description":"Use the solid color definitions."}]},"transparentColor":{"oneOf":[{"type":"array","minItems":3,"maxItems":3,"items":{"type":"number","description":"One of R G or B (0 - 255)."},"description":"Determines the color to be set to opacity 0"},{"type":"null","description":"No selection."}]},"index":{"type":"number","description":"The index of the layer among the array of layers available in the image file."},"opacity":{"type":"number"},"modelMatrix":{"oneOf":[{"type":"array","minItems":16,"maxItems":16,"description":"transformation matrix for this layer"},{"type":"null","description":"Use no transformation."}]},"domainType":{"type":"string","enum":["Full","Min/Max"],"description":"Determines the extent of the channel slider input element in the layer controller."},"resolution":{"type":"number","description":"Resolution of 3D volumetric rendering"},"xSlice":{"oneOf":[{"type":"array","minItems":2,"maxItems":2,"description":"Slice bounds"},{"type":"null","description":"No slicing"}]},"renderingMode":{"type":"string","description":"Rendering mode of 3D volumetric rendering"},"ySlice":{"oneOf":[{"type":"array","minItems":2,"maxItems":2,"description":"Slice bounds"},{"type":"null","description":"No slicing"}]},"zSlice":{"oneOf":[{"type":"array","minItems":2,"maxItems":2,"description":"Slice bounds"},{"type":"null","description":"No slicing"}]},"type":{"type":"string","enum":["raster","bitmask"]},"use3d":{"type":"boolean"},"visible":{"type":"boolean","description":"Determines whether this entire layer will be rendered in the spatial component."}}},"moleculesLayer":{"type":"object","description":"The properties of this object are the rendering settings for the molecules layer.","additionalProperties":false,"required":["visible","radius","opacity"],"properties":{"visible":{"type":"boolean"},"radius":{"type":"number"},"opacity":{"type":"number"}}},"cellsLayer":{"type":"object","description":"The properties of this object are the rendering settings for the cells layer.","additionalProperties":false,"required":["visible","stroked","radius","opacity"],"properties":{"visible":{"type":"boolean"},"stroked":{"type":"boolean"},"radius":{"type":"number"},"opacity":{"type":"number"}}},"neighborhoodsLayer":{"type":"object","description":"The properties of this object are the rendering settings for the neighborhoods layer.","additionalProperties":false,"required":["visible"],"properties":{"visible":{"type":"boolean"}}},"spatialRasterLayers":{"type":"array","description":"Array of Spatial Layers","items":{"$ref":"#/definitions/rasterLayer"}}},"additionalProperties":false,"required":["version","name","datasets","layout","initStrategy"],"properties":{"name":{"type":"string"},"public":{"type":"boolean"},"description":{"type":"string"},"datasets":{"type":"array","description":"The datasets array defines groups of files, where the files within each dataset reference the same entities (cells, genes, cell sets, etc).","items":{"type":"object","additionalProperties":false,"required":["uid","files"],"properties":{"uid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"files":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["type","fileType"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"fileType":{"type":"string"},"url":{"type":"string"},"options":{"oneOf":[{"$ref":"#/definitions/annDataCellSets"},{"$ref":"https://github.com/vitessce/vitessce/#raster"},{"$ref":"#/definitions/annDataCells"},{"$ref":"#/definitions/annDataExpressionMatrix"}]},"requestInit":{"$ref":"#/definitions/requestInit"}}}}}}},"coordinationSpace":{"type":"object","description":"The coordination space stores the values for each scope of each coordination object.","additionalProperties":false,"required":[],"properties":{"dataset":{"type":"object","patternProperties":{".":{"type":"string"}}},"embeddingZoom":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"embeddingRotation":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingTargetX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"embeddingTargetY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"embeddingTargetZ":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingType":{"type":"object","patternProperties":{".":{"type":"string"}}},"embeddingCellSetPolygonsVisible":{"type":"object","patternProperties":{".":{"type":"boolean"}}},"embeddingCellSetLabelsVisible":{"type":"object","patternProperties":{".":{"type":"boolean"}}},"embeddingCellSetLabelSize":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingCellRadius":{"type":"object","patternProperties":{".":{"type":"number"}}},"spatialZoom":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialRotation":{"type":"object","patternProperties":{".":{"type":"number"}}},"spatialTargetX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialTargetY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialTargetZ":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialRotationX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialRotationY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialRotationZ":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialRotationOrbit":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialOrbitAxis":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"string"}]}}},"spatialAxisFixed":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"Whether or not to have a fixed axis for the camera. Only useful for 3D viewing."},{"type":"boolean"}]}}},"spatialRasterLayers":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/spatialRasterLayers"}]}}},"spatialCellsLayer":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/cellsLayer"}]}}},"spatialNeighborhoodsLayer":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/neighborhoodsLayer"}]}}},"spatialMoleculesLayer":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/moleculesLayer"}]}}},"heatmapZoomX":{"type":"object","patternProperties":{".":{"type":"number"}}},"heatmapZoomY":{"type":"object","patternProperties":{".":{"type":"number"}}},"heatmapTargetX":{"type":"object","patternProperties":{".":{"type":"number"}}},"heatmapTargetY":{"type":"object","patternProperties":{".":{"type":"number"}}},"cellFilter":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cells will be filtered out initially."},{"type":"array","items":{"type":"string"}}]}}},"cellHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cell will be highlighted initially."},{"type":"string"}]}}},"cellSetSelection":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto cell set initialization is enabled, cell set selections will be automatically initialized."},{"type":"array"}]}}},"cellSetHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cell sets will be highlighted initially."},{"type":"string"}]}}},"cellSetColor":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, cell set colors will be automatically initialized."},{"type":"array","items":{"type":"object","additionalProperties":false,"required":["path","color"],"properties":{"path":{"type":"array","items":{"type":"string"}},"color":{"type":"array","items":{"type":"number"}}}}}]}}},"cellColorEncoding":{"type":"object","patternProperties":{".":{"type":"string"}}},"geneFilter":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no genes will be filtered out initially."},{"type":"array","items":{"type":"string"}}]}}},"geneHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no genes will be highlighted initially."},{"type":"string"}]}}},"geneSelection":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null"},{"type":"array","items":{"type":"string"}}]}}},"geneExpressionTransform":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null"},{"type":"string","pattern":"log1p"}]}}},"geneExpressionColormap":{"type":"object","patternProperties":{".":{"type":"string"}}},"geneExpressionColormapRange":{"type":"object","patternProperties":{".":{"type":"array","items":{"type":"number"}}}},"genomicZoomX":{"type":"object","patternProperties":{".":{"type":"number"}}},"genomicZoomY":{"type":"object","patternProperties":{".":{"type":"number"}}},"genomicTargetX":{"type":"object","patternProperties":{".":{"type":"number"}}},"genomicTargetY":{"type":"object","patternProperties":{".":{"type":"number"}}},"additionalCellSets":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cell will be highlighted initially."},{"$ref":"https://github.com/vitessce/vitessce/#cell-sets"}]}}},"moleculeHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no molecule will be highlighted initially."},{"type":"string"}]}}}}},"layout":{"$ref":"#/definitions/components"},"initStrategy":{"type":"string","enum":["none","auto"],"description":"The initialization strategy determines how missing coordination objects and coordination scope mappings are initially filled in."},"version":{"type":"string","enum":["1.0.2"],"description":"The schema version for the view config."}}}')},685:function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://github.com/vitessce/vitessce/#dataset","title":"Vitessce data set","type":"object","definitions":{"components":{"description":"The layout array defines the views, or components, rendered in the grid.","type":"array","items":{"type":"object","additionalProperties":false,"required":["component","x","y"],"properties":{"component":{"type":"string","description":"Specify a component using a name defined in the component registry."},"props":{"type":"object","description":"Extra prop values for the component."},"x":{"type":"integer"},"y":{"type":"integer"},"w":{"type":"integer"},"h":{"type":"integer"},"coordinationScopes":{"type":"object","description":"Component-level coordination scope mappings define which coordination object values a particular component can read and write, for each coordination type.","additionalProperties":false,"required":[],"properties":{"dataset":{"type":"string"},"embeddingType":{"type":"string"},"embeddingZoom":{"type":"string"},"embeddingRotation":{"type":"string"},"embeddingTargetX":{"type":"string"},"embeddingTargetY":{"type":"string"},"embeddingTargetZ":{"type":"string"},"embeddingCellSetPolygonsVisible":{"type":"string"},"embeddingCellSetLabelsVisible":{"type":"string"},"embeddingCellSetLabelSize":{"type":"string"},"embeddingCellRadius":{"type":"string"},"spatialZoom":{"type":"string"},"spatialRotation":{"type":"string"},"spatialTargetX":{"type":"string"},"spatialTargetY":{"type":"string"},"spatialTargetZ":{"type":"string"},"spatialRotationX":{"type":"string"},"spatialRotationY":{"type":"string"},"spatialRotationZ":{"type":"string"},"spatialRotationOrbit":{"type":"string"},"spatialOrbitAxis":{"type":"string"},"spatialAxisFixed":{"type":"string"},"heatmapZoomX":{"type":"string"},"heatmapZoomY":{"type":"string"},"heatmapTargetX":{"type":"string"},"heatmapTargetY":{"type":"string"},"cellFilter":{"type":"string"},"cellHighlight":{"type":"string"},"cellSetSelection":{"type":"string"},"cellSetHighlight":{"type":"string"},"cellSetColor":{"type":"string"},"geneFilter":{"type":"string"},"geneHighlight":{"type":"string"},"geneSelection":{"type":"string"},"geneExpressionTransform":{"type":"string"},"geneExpressionColormap":{"type":"string"},"geneExpressionColormapRange":{"type":"string"},"cellColorEncoding":{"type":"string"},"spatialRasterLayers":{"type":"string"},"spatialCellsLayer":{"type":"string"},"spatialMoleculesLayer":{"type":"string"},"spatialNeighborhoodsLayer":{"type":"string"},"genomicZoomX":{"type":"string"},"genomicZoomY":{"type":"string"},"genomicTargetX":{"type":"string"},"genomicTargetY":{"type":"string"},"additionalCellSets":{"type":"string"},"moleculeHighlight":{"type":"string"}}}}}},"annDataCellSets":{"type":"array","description":"Array of cell set configuration, following closely the conventions of the tabular schema","items":{"type":"object","additionalProperties":false,"required":["groupName","setName"],"properties":{"groupName":{"type":"string","description":"The display name for the set, like \'Cell Type\' or \'Louvain.\'"},"setName":{"type":"string","description":"The location in the AnnData store for the set, like \'obs/louvain\' or \'obs/celltype.\'"}}}},"annDataCells":{"type":"object","description":"The properties of this object are the configuration for how to layout scatterplots and spatial information","minProperties":1,"additionalProperties":false,"required":[],"properties":{"xy":{"type":"string","description":"The location in the AnnData store of cell centroids, like \'obsm/X_centroids.\'"},"poly":{"type":"string","description":"The location in the AnnData store of cell polygon outlines, like \'obsm/X_polygons.\'"},"factors":{"type":"array","description":"List of locations in the AnnData store of cell sets, like \'obs/louvain\'","items":{"type":"string"}},"mappings":{"patternProperties":{".":{"type":"object","description":"An object containing key-values for mappings like { UMAP: { key: \'obsm/X_umap\', dims: [0, 1] } }.","additionalProperties":false,"required":["key"],"properties":{"key":{"type":"string","description":"Where to look in the AnnData store for this mapping, like \'obsm/X_umap.\'"},"dims":{"type":"array","description":"Which indices of the obsm object to take for a scatterplot, allowing for, for example, different PCs from obsm/X_pca","minItems":2,"maxItems":2,"items":{"type":"number"}}}}}}}},"annDataExpressionMatrix":{"type":"object","description":"The properties of this object are the configuration for how to fetch the cell x genes matrix","additionalProperties":false,"required":["matrix"],"properties":{"matrix":{"type":"string","description":"The location in the AnnData store of the cell x gene matrix, like \'obsm/hvg_subset.\' or \'X\'"},"geneFilter":{"type":"string","description":"The location in the AnnData store of a filter for the genes if using a subset of the data, like \'var.highly_variable.\' if the matrix comes from \'obsm/hvg_subset.\'"},"matrixGeneFilter":{"type":"string","description":"The location in the AnnData store of a filter for the matrix data (used in heatmap and histogram), like \'var.highly_variable.\'\'"}}},"requestInit":{"type":"object","description":"The properties of this object correspond to the parameters of the JavaScript fetch() function.","additionalProperties":false,"required":[],"properties":{"method":{"type":"string"},"headers":{"type":"object"},"body":{"type":"string"},"mode":{"type":"string"},"credentials":{"type":"string"},"cache":{"type":"string"},"redirect":{"type":"string"},"referrer":{"type":"string"},"integrity":{"type":"string"}}},"rasterLayer":{"description":"The properties of this object are the rendering settings for the raster layer.","additionalProperties":false,"required":["channels","colormap","index","opacity"],"properties":{"channels":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["selection"],"properties":{"color":{"type":"array","items":{"type":"number"},"description":"The color to use when rendering this channel under the null colormap."},"selection":{"type":"object","description":"Determines the channel selection, e.g. some Z and time slice."},"slider":{"type":"array","items":{"type":"number"},"description":"Determines the range for color mapping."},"visible":{"type":"boolean","description":"Determines whether this channel of the layer will be rendered in the spatial component."}}}},"colormap":{"oneOf":[{"type":"string","description":"The name of the colormap to use for this layer."},{"type":"null","description":"Use the solid color definitions."}]},"transparentColor":{"oneOf":[{"type":"array","minItems":3,"maxItems":3,"items":{"type":"number","description":"One of R G or B (0 - 255)."},"description":"Determines the color to be set to opacity 0"},{"type":"null","description":"No selection."}]},"index":{"type":"number","description":"The index of the layer among the array of layers available in the image file."},"opacity":{"type":"number"},"modelMatrix":{"oneOf":[{"type":"array","minItems":16,"maxItems":16,"description":"transformation matrix for this layer"},{"type":"null","description":"Use no transformation."}]},"domainType":{"type":"string","enum":["Full","Min/Max"],"description":"Determines the extent of the channel slider input element in the layer controller."},"resolution":{"type":"number","description":"Resolution of 3D volumetric rendering"},"xSlice":{"oneOf":[{"type":"array","minItems":2,"maxItems":2,"description":"Slice bounds"},{"type":"null","description":"No slicing"}]},"renderingMode":{"type":"string","description":"Rendering mode of 3D volumetric rendering"},"ySlice":{"oneOf":[{"type":"array","minItems":2,"maxItems":2,"description":"Slice bounds"},{"type":"null","description":"No slicing"}]},"zSlice":{"oneOf":[{"type":"array","minItems":2,"maxItems":2,"description":"Slice bounds"},{"type":"null","description":"No slicing"}]},"type":{"type":"string","enum":["raster","bitmask"]},"use3d":{"type":"boolean"},"visible":{"type":"boolean","description":"Determines whether this entire layer will be rendered in the spatial component."}}},"moleculesLayer":{"type":"object","description":"The properties of this object are the rendering settings for the molecules layer.","additionalProperties":false,"required":["visible","radius","opacity"],"properties":{"visible":{"type":"boolean"},"radius":{"type":"number"},"opacity":{"type":"number"}}},"cellsLayer":{"type":"object","description":"The properties of this object are the rendering settings for the cells layer.","additionalProperties":false,"required":["visible","stroked","radius","opacity"],"properties":{"visible":{"type":"boolean"},"stroked":{"type":"boolean"},"radius":{"type":"number"},"opacity":{"type":"number"}}},"neighborhoodsLayer":{"type":"object","description":"The properties of this object are the rendering settings for the neighborhoods layer.","additionalProperties":false,"required":["visible"],"properties":{"visible":{"type":"boolean"}}},"spatialRasterLayers":{"type":"array","description":"Array of Spatial Layers","items":{"$ref":"#/definitions/rasterLayer"}}},"additionalProperties":false,"required":["version","name","datasets","layout","initStrategy"],"properties":{"name":{"type":"string"},"public":{"type":"boolean"},"description":{"type":"string"},"datasets":{"type":"array","description":"The datasets array defines groups of files, where the files within each dataset reference the same entities (cells, genes, cell sets, etc).","items":{"type":"object","additionalProperties":false,"required":["uid","files"],"properties":{"uid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"files":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["type","fileType"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"fileType":{"type":"string"},"url":{"type":"string"},"options":{"oneOf":[{"$ref":"#/definitions/annDataCellSets"},{"$ref":"https://github.com/vitessce/vitessce/#raster"},{"$ref":"#/definitions/annDataCells"},{"$ref":"#/definitions/annDataExpressionMatrix"}]},"requestInit":{"$ref":"#/definitions/requestInit"}}}}}}},"coordinationSpace":{"type":"object","description":"The coordination space stores the values for each scope of each coordination object.","additionalProperties":false,"required":[],"properties":{"dataset":{"type":"object","patternProperties":{".":{"type":"string"}}},"embeddingZoom":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"embeddingRotation":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingTargetX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"embeddingTargetY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"embeddingTargetZ":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingType":{"type":"object","patternProperties":{".":{"type":"string"}}},"embeddingCellSetPolygonsVisible":{"type":"object","patternProperties":{".":{"type":"boolean"}}},"embeddingCellSetLabelsVisible":{"type":"object","patternProperties":{".":{"type":"boolean"}}},"embeddingCellSetLabelSize":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingCellRadius":{"type":"object","patternProperties":{".":{"type":"number"}}},"spatialZoom":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialRotation":{"type":"object","patternProperties":{".":{"type":"number"}}},"spatialTargetX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialTargetY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialTargetZ":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialRotationX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialRotationY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialRotationZ":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialRotationOrbit":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialOrbitAxis":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"string"}]}}},"spatialAxisFixed":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"Whether or not to have a fixed axis for the camera. Only useful for 3D viewing."},{"type":"boolean"}]}}},"spatialRasterLayers":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/spatialRasterLayers"}]}}},"spatialCellsLayer":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/cellsLayer"}]}}},"spatialNeighborhoodsLayer":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/neighborhoodsLayer"}]}}},"spatialMoleculesLayer":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/moleculesLayer"}]}}},"heatmapZoomX":{"type":"object","patternProperties":{".":{"type":"number"}}},"heatmapZoomY":{"type":"object","patternProperties":{".":{"type":"number"}}},"heatmapTargetX":{"type":"object","patternProperties":{".":{"type":"number"}}},"heatmapTargetY":{"type":"object","patternProperties":{".":{"type":"number"}}},"cellFilter":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cells will be filtered out initially."},{"type":"array","items":{"type":"string"}}]}}},"cellHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cell will be highlighted initially."},{"type":"string"}]}}},"cellSetSelection":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto cell set initialization is enabled, cell set selections will be automatically initialized."},{"type":"array"}]}}},"cellSetHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cell sets will be highlighted initially."},{"type":"string"}]}}},"cellSetColor":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, cell set colors will be automatically initialized."},{"type":"array","items":{"type":"object","additionalProperties":false,"required":["path","color"],"properties":{"path":{"type":"array","items":{"type":"string"}},"color":{"type":"array","items":{"type":"number"}}}}}]}}},"cellColorEncoding":{"type":"object","patternProperties":{".":{"type":"string"}}},"geneFilter":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no genes will be filtered out initially."},{"type":"array","items":{"type":"string"}}]}}},"geneHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no genes will be highlighted initially."},{"type":"string"}]}}},"geneSelection":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null"},{"type":"array","items":{"type":"string"}}]}}},"geneExpressionTransform":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null"},{"type":"string","pattern":"log1p"}]}}},"geneExpressionColormap":{"type":"object","patternProperties":{".":{"type":"string"}}},"geneExpressionColormapRange":{"type":"object","patternProperties":{".":{"type":"array","items":{"type":"number"}}}},"genomicZoomX":{"type":"object","patternProperties":{".":{"type":"number"}}},"genomicZoomY":{"type":"object","patternProperties":{".":{"type":"number"}}},"genomicTargetX":{"type":"object","patternProperties":{".":{"type":"number"}}},"genomicTargetY":{"type":"object","patternProperties":{".":{"type":"number"}}},"additionalCellSets":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cell will be highlighted initially."},{"$ref":"https://github.com/vitessce/vitessce/#cell-sets"}]}}},"moleculeHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no molecule will be highlighted initially."},{"type":"string"}]}}}}},"layout":{"$ref":"#/definitions/components"},"initStrategy":{"type":"string","enum":["none","auto"],"description":"The initialization strategy determines how missing coordination objects and coordination scope mappings are initially filled in."},"version":{"type":"string","enum":["1.0.3"],"description":"The schema version for the view config."}}}')},686:function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://github.com/vitessce/vitessce/#dataset","title":"Vitessce data set","type":"object","definitions":{"components":{"description":"The layout array defines the views, or components, rendered in the grid.","type":"array","items":{"type":"object","additionalProperties":false,"required":["component","x","y"],"properties":{"component":{"type":"string","description":"Specify a component using a name defined in the component registry."},"props":{"type":"object","description":"Extra prop values for the component."},"x":{"type":"integer"},"y":{"type":"integer"},"w":{"type":"integer"},"h":{"type":"integer"},"coordinationScopes":{"type":"object","description":"Component-level coordination scope mappings define which coordination object values a particular component can read and write, for each coordination type.","additionalProperties":false,"required":[],"properties":{"dataset":{"type":"string"},"embeddingType":{"type":"string"},"embeddingZoom":{"type":"string"},"embeddingRotation":{"type":"string"},"embeddingTargetX":{"type":"string"},"embeddingTargetY":{"type":"string"},"embeddingTargetZ":{"type":"string"},"embeddingCellSetPolygonsVisible":{"type":"string"},"embeddingCellSetLabelsVisible":{"type":"string"},"embeddingCellSetLabelSize":{"type":"string"},"embeddingCellRadius":{"type":"string"},"embeddingCellOpacity":{"type":"string"},"embeddingCellRadiusMode":{"type":"string"},"embeddingCellOpacityMode":{"type":"string"},"spatialZoom":{"type":"string"},"spatialRotation":{"type":"string"},"spatialTargetX":{"type":"string"},"spatialTargetY":{"type":"string"},"spatialTargetZ":{"type":"string"},"spatialRotationX":{"type":"string"},"spatialRotationY":{"type":"string"},"spatialRotationZ":{"type":"string"},"spatialRotationOrbit":{"type":"string"},"spatialOrbitAxis":{"type":"string"},"spatialAxisFixed":{"type":"string"},"heatmapZoomX":{"type":"string"},"heatmapZoomY":{"type":"string"},"heatmapTargetX":{"type":"string"},"heatmapTargetY":{"type":"string"},"cellFilter":{"type":"string"},"cellHighlight":{"type":"string"},"cellSetSelection":{"type":"string"},"cellSetHighlight":{"type":"string"},"cellSetColor":{"type":"string"},"geneFilter":{"type":"string"},"geneHighlight":{"type":"string"},"geneSelection":{"type":"string"},"geneExpressionTransform":{"type":"string"},"geneExpressionColormap":{"type":"string"},"geneExpressionColormapRange":{"type":"string"},"cellColorEncoding":{"type":"string"},"spatialRasterLayers":{"type":"string"},"spatialCellsLayer":{"type":"string"},"spatialMoleculesLayer":{"type":"string"},"spatialNeighborhoodsLayer":{"type":"string"},"genomicZoomX":{"type":"string"},"genomicZoomY":{"type":"string"},"genomicTargetX":{"type":"string"},"genomicTargetY":{"type":"string"},"additionalCellSets":{"type":"string"},"moleculeHighlight":{"type":"string"}}}}}},"annDataCellSets":{"type":"array","description":"Array of cell set configuration, following closely the conventions of the tabular schema","items":{"type":"object","additionalProperties":false,"required":["groupName","setName"],"properties":{"groupName":{"type":"string","description":"The display name for the set, like \'Cell Type\' or \'Louvain.\'"},"setName":{"type":"string","description":"The location in the AnnData store for the set, like \'obs/louvain\' or \'obs/celltype.\'"}}}},"annDataCells":{"type":"object","description":"The properties of this object are the configuration for how to layout scatterplots and spatial information","minProperties":1,"additionalProperties":false,"required":[],"properties":{"xy":{"type":"string","description":"The location in the AnnData store of cell centroids, like \'obsm/X_centroids.\'"},"poly":{"type":"string","description":"The location in the AnnData store of cell polygon outlines, like \'obsm/X_polygons.\'"},"factors":{"type":"array","description":"List of locations in the AnnData store of cell sets, like \'obs/louvain\'","items":{"type":"string"}},"mappings":{"patternProperties":{".":{"type":"object","description":"An object containing key-values for mappings like { UMAP: { key: \'obsm/X_umap\', dims: [0, 1] } }.","additionalProperties":false,"required":["key"],"properties":{"key":{"type":"string","description":"Where to look in the AnnData store for this mapping, like \'obsm/X_umap.\'"},"dims":{"type":"array","description":"Which indices of the obsm object to take for a scatterplot, allowing for, for example, different PCs from obsm/X_pca","minItems":2,"maxItems":2,"items":{"type":"number"}}}}}}}},"annDataExpressionMatrix":{"type":"object","description":"The properties of this object are the configuration for how to fetch the cell x genes matrix","additionalProperties":false,"required":["matrix"],"properties":{"matrix":{"type":"string","description":"The location in the AnnData store of the cell x gene matrix, like \'obsm/hvg_subset.\' or \'X\'"},"geneFilter":{"type":"string","description":"The location in the AnnData store of a filter for the genes if using a subset of the data, like \'var.highly_variable.\' if the matrix comes from \'obsm/hvg_subset.\'"},"matrixGeneFilter":{"type":"string","description":"The location in the AnnData store of a filter for the matrix data (used in heatmap and histogram), like \'var.highly_variable.\'\'"}}},"requestInit":{"type":"object","description":"The properties of this object correspond to the parameters of the JavaScript fetch() function.","additionalProperties":false,"required":[],"properties":{"method":{"type":"string"},"headers":{"type":"object"},"body":{"type":"string"},"mode":{"type":"string"},"credentials":{"type":"string"},"cache":{"type":"string"},"redirect":{"type":"string"},"referrer":{"type":"string"},"integrity":{"type":"string"}}},"rasterLayer":{"description":"The properties of this object are the rendering settings for the raster layer.","additionalProperties":false,"required":["channels","colormap","index","opacity"],"properties":{"channels":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["selection"],"properties":{"color":{"type":"array","items":{"type":"number"},"description":"The color to use when rendering this channel under the null colormap."},"selection":{"type":"object","description":"Determines the channel selection, e.g. some Z and time slice."},"slider":{"type":"array","items":{"type":"number"},"description":"Determines the range for color mapping."},"visible":{"type":"boolean","description":"Determines whether this channel of the layer will be rendered in the spatial component."}}}},"colormap":{"oneOf":[{"type":"string","description":"The name of the colormap to use for this layer."},{"type":"null","description":"Use the solid color definitions."}]},"transparentColor":{"oneOf":[{"type":"array","minItems":3,"maxItems":3,"items":{"type":"number","description":"One of R G or B (0 - 255)."},"description":"Determines the color to be set to opacity 0"},{"type":"null","description":"No selection."}]},"index":{"type":"number","description":"The index of the layer among the array of layers available in the image file."},"opacity":{"type":"number"},"modelMatrix":{"oneOf":[{"type":"array","minItems":16,"maxItems":16,"description":"transformation matrix for this layer"},{"type":"null","description":"Use no transformation."}]},"domainType":{"type":"string","enum":["Full","Min/Max"],"description":"Determines the extent of the channel slider input element in the layer controller."},"resolution":{"type":"number","description":"Resolution of 3D volumetric rendering"},"xSlice":{"oneOf":[{"type":"array","minItems":2,"maxItems":2,"description":"Slice bounds"},{"type":"null","description":"No slicing"}]},"renderingMode":{"type":"string","description":"Rendering mode of 3D volumetric rendering"},"ySlice":{"oneOf":[{"type":"array","minItems":2,"maxItems":2,"description":"Slice bounds"},{"type":"null","description":"No slicing"}]},"zSlice":{"oneOf":[{"type":"array","minItems":2,"maxItems":2,"description":"Slice bounds"},{"type":"null","description":"No slicing"}]},"type":{"type":"string","enum":["raster","bitmask"]},"use3d":{"type":"boolean"},"visible":{"type":"boolean","description":"Determines whether this entire layer will be rendered in the spatial component."}}},"moleculesLayer":{"type":"object","description":"The properties of this object are the rendering settings for the molecules layer.","additionalProperties":false,"required":["visible","radius","opacity"],"properties":{"visible":{"type":"boolean"},"radius":{"type":"number"},"opacity":{"type":"number"}}},"cellsLayer":{"type":"object","description":"The properties of this object are the rendering settings for the cells layer.","additionalProperties":false,"required":["visible","stroked","radius","opacity"],"properties":{"visible":{"type":"boolean"},"stroked":{"type":"boolean"},"radius":{"type":"number"},"opacity":{"type":"number"}}},"neighborhoodsLayer":{"type":"object","description":"The properties of this object are the rendering settings for the neighborhoods layer.","additionalProperties":false,"required":["visible"],"properties":{"visible":{"type":"boolean"}}},"spatialRasterLayers":{"type":"array","description":"Array of Spatial Layers","items":{"$ref":"#/definitions/rasterLayer"}}},"additionalProperties":false,"required":["version","name","datasets","layout","initStrategy"],"properties":{"name":{"type":"string"},"public":{"type":"boolean"},"description":{"type":"string"},"datasets":{"type":"array","description":"The datasets array defines groups of files, where the files within each dataset reference the same entities (cells, genes, cell sets, etc).","items":{"type":"object","additionalProperties":false,"required":["uid","files"],"properties":{"uid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"files":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["type","fileType"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"fileType":{"type":"string"},"url":{"type":"string"},"options":{"oneOf":[{"$ref":"#/definitions/annDataCellSets"},{"$ref":"https://github.com/vitessce/vitessce/#raster"},{"$ref":"#/definitions/annDataCells"},{"$ref":"#/definitions/annDataExpressionMatrix"}]},"requestInit":{"$ref":"#/definitions/requestInit"}}}}}}},"coordinationSpace":{"type":"object","description":"The coordination space stores the values for each scope of each coordination object.","additionalProperties":false,"required":[],"properties":{"dataset":{"type":"object","patternProperties":{".":{"type":"string"}}},"embeddingZoom":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"embeddingRotation":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingTargetX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"embeddingTargetY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"embeddingTargetZ":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingType":{"type":"object","patternProperties":{".":{"type":"string"}}},"embeddingCellSetPolygonsVisible":{"type":"object","patternProperties":{".":{"type":"boolean"}}},"embeddingCellSetLabelsVisible":{"type":"object","patternProperties":{".":{"type":"boolean"}}},"embeddingCellSetLabelSize":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingCellRadius":{"type":"object","patternProperties":{".":{"type":"number","description":"The cell radius value, used when embeddingCellRadiusMode is absolute or relative."}}},"embeddingCellOpacity":{"type":"object","patternProperties":{".":{"type":"number","description":"The cell opacity value, used when embeddingCellOpacityMode is static."}}},"embeddingCellRadiusMode":{"type":"object","patternProperties":{".":{"type":"string","enum":["manual","auto"],"description":"Should data points representing cells be assigned a static (manual) or dynamic (auto, based on zoom level and data extent) radius?"}}},"embeddingCellOpacityMode":{"type":"object","patternProperties":{".":{"type":"string","enum":["manual","auto"],"description":"Should data points representing cells be assigned a static (manual) or dynamic (auto, based on zoom level and data extent) opacity?"}}},"spatialZoom":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialRotation":{"type":"object","patternProperties":{".":{"type":"number"}}},"spatialTargetX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialTargetY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialTargetZ":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialRotationX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialRotationY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialRotationZ":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialRotationOrbit":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialOrbitAxis":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"string"}]}}},"spatialAxisFixed":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"Whether or not to have a fixed axis for the camera. Only useful for 3D viewing."},{"type":"boolean"}]}}},"spatialRasterLayers":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/spatialRasterLayers"}]}}},"spatialCellsLayer":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/cellsLayer"}]}}},"spatialNeighborhoodsLayer":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/neighborhoodsLayer"}]}}},"spatialMoleculesLayer":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/moleculesLayer"}]}}},"heatmapZoomX":{"type":"object","patternProperties":{".":{"type":"number"}}},"heatmapZoomY":{"type":"object","patternProperties":{".":{"type":"number"}}},"heatmapTargetX":{"type":"object","patternProperties":{".":{"type":"number"}}},"heatmapTargetY":{"type":"object","patternProperties":{".":{"type":"number"}}},"cellFilter":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cells will be filtered out initially."},{"type":"array","items":{"type":"string"}}]}}},"cellHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cell will be highlighted initially."},{"type":"string"}]}}},"cellSetSelection":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto cell set initialization is enabled, cell set selections will be automatically initialized."},{"type":"array"}]}}},"cellSetHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cell sets will be highlighted initially."},{"type":"string"}]}}},"cellSetColor":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, cell set colors will be automatically initialized."},{"type":"array","items":{"type":"object","additionalProperties":false,"required":["path","color"],"properties":{"path":{"type":"array","items":{"type":"string"}},"color":{"type":"array","items":{"type":"number"}}}}}]}}},"cellColorEncoding":{"type":"object","patternProperties":{".":{"type":"string","enum":["geneSelection","cellSetSelection"],"description":"How should data points representing cells be colored?"}}},"geneFilter":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no genes will be filtered out initially."},{"type":"array","items":{"type":"string"}}]}}},"geneHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no genes will be highlighted initially."},{"type":"string"}]}}},"geneSelection":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null"},{"type":"array","items":{"type":"string"}}]}}},"geneExpressionTransform":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null"},{"type":"string","pattern":"log1p"}]}}},"geneExpressionColormap":{"type":"object","patternProperties":{".":{"type":"string"}}},"geneExpressionColormapRange":{"type":"object","patternProperties":{".":{"type":"array","items":{"type":"number"}}}},"genomicZoomX":{"type":"object","patternProperties":{".":{"type":"number"}}},"genomicZoomY":{"type":"object","patternProperties":{".":{"type":"number"}}},"genomicTargetX":{"type":"object","patternProperties":{".":{"type":"number"}}},"genomicTargetY":{"type":"object","patternProperties":{".":{"type":"number"}}},"additionalCellSets":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cell will be highlighted initially."},{"$ref":"https://github.com/vitessce/vitessce/#cell-sets"}]}}},"moleculeHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no molecule will be highlighted initially."},{"type":"string"}]}}}}},"layout":{"$ref":"#/definitions/components"},"initStrategy":{"type":"string","enum":["none","auto"],"description":"The initialization strategy determines how missing coordination objects and coordination scope mappings are initially filled in."},"version":{"type":"string","enum":["1.0.4"],"description":"The schema version for the view config."}}}')},687:function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://github.com/vitessce/vitessce/#dataset","title":"Vitessce data set","type":"object","definitions":{"components":{"description":"The layout array defines the views, or components, rendered in the grid.","type":"array","items":{"type":"object","additionalProperties":false,"required":["component","x","y"],"properties":{"component":{"type":"string","description":"Specify a component using a name defined in the component registry."},"props":{"type":"object","description":"Extra prop values for the component."},"x":{"type":"integer"},"y":{"type":"integer"},"w":{"type":"integer"},"h":{"type":"integer"},"coordinationScopes":{"type":"object","description":"Component-level coordination scope mappings define which coordination object values a particular component can read and write, for each coordination type.","additionalProperties":false,"required":[],"properties":{"dataset":{"type":"string"},"embeddingType":{"type":"string"},"embeddingZoom":{"type":"string"},"embeddingRotation":{"type":"string"},"embeddingTargetX":{"type":"string"},"embeddingTargetY":{"type":"string"},"embeddingTargetZ":{"type":"string"},"embeddingCellSetPolygonsVisible":{"type":"string"},"embeddingCellSetLabelsVisible":{"type":"string"},"embeddingCellSetLabelSize":{"type":"string"},"embeddingCellRadius":{"type":"string"},"embeddingCellOpacity":{"type":"string"},"embeddingCellRadiusMode":{"type":"string"},"embeddingCellOpacityMode":{"type":"string"},"spatialZoom":{"type":"string"},"spatialRotation":{"type":"string"},"spatialTargetX":{"type":"string"},"spatialTargetY":{"type":"string"},"spatialTargetZ":{"type":"string"},"spatialRotationX":{"type":"string"},"spatialRotationY":{"type":"string"},"spatialRotationZ":{"type":"string"},"spatialRotationOrbit":{"type":"string"},"spatialOrbitAxis":{"type":"string"},"spatialAxisFixed":{"type":"string"},"heatmapZoomX":{"type":"string"},"heatmapZoomY":{"type":"string"},"heatmapTargetX":{"type":"string"},"heatmapTargetY":{"type":"string"},"cellFilter":{"type":"string"},"cellHighlight":{"type":"string"},"cellSetSelection":{"type":"string"},"cellSetHighlight":{"type":"string"},"cellSetColor":{"type":"string"},"geneFilter":{"type":"string"},"geneHighlight":{"type":"string"},"geneSelection":{"type":"string"},"geneExpressionTransform":{"type":"string"},"geneExpressionColormap":{"type":"string"},"geneExpressionColormapRange":{"type":"string"},"cellColorEncoding":{"type":"string"},"spatialRasterLayers":{"type":"string"},"spatialCellsLayer":{"type":"string"},"spatialMoleculesLayer":{"type":"string"},"spatialNeighborhoodsLayer":{"type":"string"},"genomicZoomX":{"type":"string"},"genomicZoomY":{"type":"string"},"genomicTargetX":{"type":"string"},"genomicTargetY":{"type":"string"},"additionalCellSets":{"type":"string"},"moleculeHighlight":{"type":"string"}}}}}},"annDataCellSets":{"type":"array","description":"Array of cell set configuration, following closely the conventions of the tabular schema","items":{"type":"object","additionalProperties":false,"required":["groupName","setName"],"properties":{"groupName":{"type":"string","description":"The display name for the set, like \'Cell Type\' or \'Louvain.\'"},"setName":{"oneOf":[{"type":"string","description":"The location in the AnnData store for the set, like \'obs/louvain\' or \'obs/celltype.\'"},{"type":"array","items":{"type":"string"},"description":"An array of locations in the AnnData store for a hierarchy of set names, from coarse to fine levels."}]}}}},"annDataCells":{"type":"object","description":"The properties of this object are the configuration for how to layout scatterplots and spatial information","minProperties":1,"additionalProperties":false,"required":[],"properties":{"xy":{"type":"string","description":"The location in the AnnData store of cell centroids, like \'obsm/X_centroids.\'"},"poly":{"type":"string","description":"The location in the AnnData store of cell polygon outlines, like \'obsm/X_polygons.\'"},"factors":{"type":"array","description":"List of locations in the AnnData store of cell sets, like \'obs/louvain\'","items":{"type":"string"}},"mappings":{"patternProperties":{".":{"type":"object","description":"An object containing key-values for mappings like { UMAP: { key: \'obsm/X_umap\', dims: [0, 1] } }.","additionalProperties":false,"required":["key"],"properties":{"key":{"type":"string","description":"Where to look in the AnnData store for this mapping, like \'obsm/X_umap.\'"},"dims":{"type":"array","description":"Which indices of the obsm object to take for a scatterplot, allowing for, for example, different PCs from obsm/X_pca","minItems":2,"maxItems":2,"items":{"type":"number"}}}}}}}},"annDataExpressionMatrix":{"type":"object","description":"The properties of this object are the configuration for how to fetch the cell x genes matrix","additionalProperties":false,"required":["matrix"],"properties":{"matrix":{"type":"string","description":"The location in the AnnData store of the cell x gene matrix, like \'obsm/hvg_subset.\' or \'X\'"},"geneFilter":{"type":"string","description":"The location in the AnnData store of a filter for the genes if using a subset of the data, like \'var.highly_variable.\' if the matrix comes from \'obsm/hvg_subset.\'"},"matrixGeneFilter":{"type":"string","description":"The location in the AnnData store of a filter for the matrix data (used in heatmap and histogram), like \'var.highly_variable.\'\'"}}},"requestInit":{"type":"object","description":"The properties of this object correspond to the parameters of the JavaScript fetch() function.","additionalProperties":false,"required":[],"properties":{"method":{"type":"string"},"headers":{"type":"object"},"body":{"type":"string"},"mode":{"type":"string"},"credentials":{"type":"string"},"cache":{"type":"string"},"redirect":{"type":"string"},"referrer":{"type":"string"},"integrity":{"type":"string"}}},"rasterLayer":{"description":"The properties of this object are the rendering settings for the raster layer.","additionalProperties":false,"required":["channels","colormap","index","opacity"],"properties":{"channels":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["selection"],"properties":{"color":{"type":"array","items":{"type":"number"},"description":"The color to use when rendering this channel under the null colormap."},"selection":{"type":"object","description":"Determines the channel selection, e.g. some Z and time slice."},"slider":{"type":"array","items":{"type":"number"},"description":"Determines the range for color mapping."},"visible":{"type":"boolean","description":"Determines whether this channel of the layer will be rendered in the spatial component."}}}},"colormap":{"oneOf":[{"type":"string","description":"The name of the colormap to use for this layer."},{"type":"null","description":"Use the solid color definitions."}]},"transparentColor":{"oneOf":[{"type":"array","minItems":3,"maxItems":3,"items":{"type":"number","description":"One of R G or B (0 - 255)."},"description":"Determines the color to be set to opacity 0"},{"type":"null","description":"No selection."}]},"index":{"type":"number","description":"The index of the layer among the array of layers available in the image file."},"opacity":{"type":"number"},"modelMatrix":{"oneOf":[{"type":"array","minItems":16,"maxItems":16,"description":"transformation matrix for this layer"},{"type":"null","description":"Use no transformation."}]},"domainType":{"type":"string","enum":["Full","Min/Max"],"description":"Determines the extent of the channel slider input element in the layer controller."},"resolution":{"type":"number","description":"Resolution of 3D volumetric rendering"},"xSlice":{"oneOf":[{"type":"array","minItems":2,"maxItems":2,"description":"Slice bounds"},{"type":"null","description":"No slicing"}]},"renderingMode":{"type":"string","description":"Rendering mode of 3D volumetric rendering"},"ySlice":{"oneOf":[{"type":"array","minItems":2,"maxItems":2,"description":"Slice bounds"},{"type":"null","description":"No slicing"}]},"zSlice":{"oneOf":[{"type":"array","minItems":2,"maxItems":2,"description":"Slice bounds"},{"type":"null","description":"No slicing"}]},"type":{"type":"string","enum":["raster","bitmask"]},"use3d":{"type":"boolean"},"visible":{"type":"boolean","description":"Determines whether this entire layer will be rendered in the spatial component."}}},"moleculesLayer":{"type":"object","description":"The properties of this object are the rendering settings for the molecules layer.","additionalProperties":false,"required":["visible","radius","opacity"],"properties":{"visible":{"type":"boolean"},"radius":{"type":"number"},"opacity":{"type":"number"}}},"cellsLayer":{"type":"object","description":"The properties of this object are the rendering settings for the cells layer.","additionalProperties":false,"required":["visible","stroked","radius","opacity"],"properties":{"visible":{"type":"boolean"},"stroked":{"type":"boolean"},"radius":{"type":"number"},"opacity":{"type":"number"}}},"neighborhoodsLayer":{"type":"object","description":"The properties of this object are the rendering settings for the neighborhoods layer.","additionalProperties":false,"required":["visible"],"properties":{"visible":{"type":"boolean"}}},"spatialRasterLayers":{"type":"array","description":"Array of Spatial Layers","items":{"$ref":"#/definitions/rasterLayer"}}},"additionalProperties":false,"required":["version","name","datasets","layout","initStrategy"],"properties":{"name":{"type":"string"},"public":{"type":"boolean"},"description":{"type":"string"},"datasets":{"type":"array","description":"The datasets array defines groups of files, where the files within each dataset reference the same entities (cells, genes, cell sets, etc).","items":{"type":"object","additionalProperties":false,"required":["uid","files"],"properties":{"uid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"files":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["type","fileType"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"fileType":{"type":"string"},"url":{"type":"string"},"options":{"oneOf":[{"$ref":"#/definitions/annDataCellSets"},{"$ref":"https://github.com/vitessce/vitessce/#raster"},{"$ref":"#/definitions/annDataCells"},{"$ref":"#/definitions/annDataExpressionMatrix"}]},"requestInit":{"$ref":"#/definitions/requestInit"}}}}}}},"coordinationSpace":{"type":"object","description":"The coordination space stores the values for each scope of each coordination object.","additionalProperties":false,"required":[],"properties":{"dataset":{"type":"object","patternProperties":{".":{"type":"string"}}},"embeddingZoom":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"embeddingRotation":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingTargetX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"embeddingTargetY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"embeddingTargetZ":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingType":{"type":"object","patternProperties":{".":{"type":"string"}}},"embeddingCellSetPolygonsVisible":{"type":"object","patternProperties":{".":{"type":"boolean"}}},"embeddingCellSetLabelsVisible":{"type":"object","patternProperties":{".":{"type":"boolean"}}},"embeddingCellSetLabelSize":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingCellRadius":{"type":"object","patternProperties":{".":{"type":"number","description":"The cell radius value, used when embeddingCellRadiusMode is absolute or relative."}}},"embeddingCellOpacity":{"type":"object","patternProperties":{".":{"type":"number","description":"The cell opacity value, used when embeddingCellOpacityMode is static."}}},"embeddingCellRadiusMode":{"type":"object","patternProperties":{".":{"type":"string","enum":["manual","auto"],"description":"Should data points representing cells be assigned a static (manual) or dynamic (auto, based on zoom level and data extent) radius?"}}},"embeddingCellOpacityMode":{"type":"object","patternProperties":{".":{"type":"string","enum":["manual","auto"],"description":"Should data points representing cells be assigned a static (manual) or dynamic (auto, based on zoom level and data extent) opacity?"}}},"spatialZoom":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialRotation":{"type":"object","patternProperties":{".":{"type":"number"}}},"spatialTargetX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialTargetY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialTargetZ":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialRotationX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialRotationY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialRotationZ":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialRotationOrbit":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialOrbitAxis":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"string"}]}}},"spatialAxisFixed":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"Whether or not to have a fixed axis for the camera. Only useful for 3D viewing."},{"type":"boolean"}]}}},"spatialRasterLayers":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/spatialRasterLayers"}]}}},"spatialCellsLayer":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/cellsLayer"}]}}},"spatialNeighborhoodsLayer":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/neighborhoodsLayer"}]}}},"spatialMoleculesLayer":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/moleculesLayer"}]}}},"heatmapZoomX":{"type":"object","patternProperties":{".":{"type":"number"}}},"heatmapZoomY":{"type":"object","patternProperties":{".":{"type":"number"}}},"heatmapTargetX":{"type":"object","patternProperties":{".":{"type":"number"}}},"heatmapTargetY":{"type":"object","patternProperties":{".":{"type":"number"}}},"cellFilter":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cells will be filtered out initially."},{"type":"array","items":{"type":"string"}}]}}},"cellHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cell will be highlighted initially."},{"type":"string"}]}}},"cellSetSelection":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto cell set initialization is enabled, cell set selections will be automatically initialized."},{"type":"array"}]}}},"cellSetHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cell sets will be highlighted initially."},{"type":"string"}]}}},"cellSetColor":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, cell set colors will be automatically initialized."},{"type":"array","items":{"type":"object","additionalProperties":false,"required":["path","color"],"properties":{"path":{"type":"array","items":{"type":"string"}},"color":{"type":"array","items":{"type":"number"}}}}}]}}},"cellColorEncoding":{"type":"object","patternProperties":{".":{"type":"string","enum":["geneSelection","cellSetSelection"],"description":"How should data points representing cells be colored?"}}},"geneFilter":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no genes will be filtered out initially."},{"type":"array","items":{"type":"string"}}]}}},"geneHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no genes will be highlighted initially."},{"type":"string"}]}}},"geneSelection":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null"},{"type":"array","items":{"type":"string"}}]}}},"geneExpressionTransform":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null"},{"type":"string","pattern":"log1p"}]}}},"geneExpressionColormap":{"type":"object","patternProperties":{".":{"type":"string"}}},"geneExpressionColormapRange":{"type":"object","patternProperties":{".":{"type":"array","items":{"type":"number"}}}},"genomicZoomX":{"type":"object","patternProperties":{".":{"type":"number"}}},"genomicZoomY":{"type":"object","patternProperties":{".":{"type":"number"}}},"genomicTargetX":{"type":"object","patternProperties":{".":{"type":"number"}}},"genomicTargetY":{"type":"object","patternProperties":{".":{"type":"number"}}},"additionalCellSets":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cell will be highlighted initially."},{"$ref":"https://github.com/vitessce/vitessce/#cell-sets"}]}}},"moleculeHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no molecule will be highlighted initially."},{"type":"string"}]}}}}},"layout":{"$ref":"#/definitions/components"},"initStrategy":{"type":"string","enum":["none","auto"],"description":"The initialization strategy determines how missing coordination objects and coordination scope mappings are initially filled in."},"version":{"type":"string","enum":["1.0.5"],"description":"The schema version for the view config."}}}')},688:function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://github.com/vitessce/vitessce/#dataset","title":"Vitessce data set","type":"object","definitions":{"components":{"description":"The layout array defines the views, or components, rendered in the grid.","type":"array","items":{"type":"object","additionalProperties":false,"required":["component","x","y"],"properties":{"component":{"type":"string","description":"Specify a component using a name defined in the component registry."},"props":{"type":"object","description":"Extra prop values for the component."},"x":{"type":"integer"},"y":{"type":"integer"},"w":{"type":"integer"},"h":{"type":"integer"},"coordinationScopes":{"type":"object","description":"Component-level coordination scope mappings define which coordination object values a particular component can read and write, for each coordination type.","additionalProperties":false,"required":[],"properties":{"dataset":{"type":"string"},"embeddingType":{"type":"string"},"embeddingZoom":{"type":"string"},"embeddingRotation":{"type":"string"},"embeddingTargetX":{"type":"string"},"embeddingTargetY":{"type":"string"},"embeddingTargetZ":{"type":"string"},"embeddingCellSetPolygonsVisible":{"type":"string"},"embeddingCellSetLabelsVisible":{"type":"string"},"embeddingCellSetLabelSize":{"type":"string"},"embeddingCellRadius":{"type":"string"},"embeddingCellOpacity":{"type":"string"},"embeddingCellRadiusMode":{"type":"string"},"embeddingCellOpacityMode":{"type":"string"},"spatialZoom":{"type":"string"},"spatialRotation":{"type":"string"},"spatialTargetX":{"type":"string"},"spatialTargetY":{"type":"string"},"spatialTargetZ":{"type":"string"},"spatialRotationX":{"type":"string"},"spatialRotationY":{"type":"string"},"spatialRotationZ":{"type":"string"},"spatialRotationOrbit":{"type":"string"},"spatialOrbitAxis":{"type":"string"},"spatialAxisFixed":{"type":"string"},"heatmapZoomX":{"type":"string"},"heatmapZoomY":{"type":"string"},"heatmapTargetX":{"type":"string"},"heatmapTargetY":{"type":"string"},"cellFilter":{"type":"string"},"cellHighlight":{"type":"string"},"cellSetSelection":{"type":"string"},"cellSetHighlight":{"type":"string"},"cellSetColor":{"type":"string"},"geneFilter":{"type":"string"},"geneHighlight":{"type":"string"},"geneSelection":{"type":"string"},"geneExpressionTransform":{"type":"string"},"geneExpressionColormap":{"type":"string"},"geneExpressionColormapRange":{"type":"string"},"cellColorEncoding":{"type":"string"},"spatialRasterLayers":{"type":"string"},"spatialCellsLayer":{"type":"string"},"spatialMoleculesLayer":{"type":"string"},"spatialNeighborhoodsLayer":{"type":"string"},"genomicZoomX":{"type":"string"},"genomicZoomY":{"type":"string"},"genomicTargetX":{"type":"string"},"genomicTargetY":{"type":"string"},"additionalCellSets":{"type":"string"},"moleculeHighlight":{"type":"string"}}}}}},"annDataCellSets":{"type":"array","description":"Array of cell set configuration, following closely the conventions of the tabular schema","items":{"type":"object","additionalProperties":false,"required":["groupName","setName"],"properties":{"groupName":{"type":"string","description":"The display name for the set, like \'Cell Type\' or \'Louvain.\'"},"setName":{"oneOf":[{"type":"string","description":"The location in the AnnData store for the set, like \'obs/louvain\' or \'obs/celltype.\'"},{"type":"array","items":{"type":"string"},"description":"An array of locations in the AnnData store for a hierarchy of set names, from coarse to fine levels."}]},"scoreName":{"oneOf":[{"type":"string","description":"The location in the AnnData store for the set confidence scores, like \'obs/celltype_prediction_score.\'"}]}}}},"annDataCells":{"type":"object","description":"The properties of this object are the configuration for how to layout scatterplots and spatial information","minProperties":1,"additionalProperties":false,"required":[],"properties":{"xy":{"type":"string","description":"The location in the AnnData store of cell centroids, like \'obsm/X_centroids.\'"},"poly":{"type":"string","description":"The location in the AnnData store of cell polygon outlines, like \'obsm/X_polygons.\'"},"factors":{"type":"array","description":"List of locations in the AnnData store of cell sets, like \'obs/louvain\'","items":{"type":"string"}},"mappings":{"patternProperties":{".":{"type":"object","description":"An object containing key-values for mappings like { UMAP: { key: \'obsm/X_umap\', dims: [0, 1] } }.","additionalProperties":false,"required":["key"],"properties":{"key":{"type":"string","description":"Where to look in the AnnData store for this mapping, like \'obsm/X_umap.\'"},"dims":{"type":"array","description":"Which indices of the obsm object to take for a scatterplot, allowing for, for example, different PCs from obsm/X_pca","minItems":2,"maxItems":2,"items":{"type":"number"}}}}}}}},"annDataExpressionMatrix":{"type":"object","description":"The properties of this object are the configuration for how to fetch the cell x genes matrix","additionalProperties":false,"required":["matrix"],"properties":{"matrix":{"type":"string","description":"The location in the AnnData store of the cell x gene matrix, like \'obsm/hvg_subset.\' or \'X\'"},"geneFilter":{"type":"string","description":"The location in the AnnData store of a filter for the genes if using a subset of the data, like \'var.highly_variable.\' if the matrix comes from \'obsm/hvg_subset.\'"},"matrixGeneFilter":{"type":"string","description":"The location in the AnnData store of a filter for the matrix data (used in heatmap and histogram), like \'var.highly_variable.\'\'"}}},"requestInit":{"type":"object","description":"The properties of this object correspond to the parameters of the JavaScript fetch() function.","additionalProperties":false,"required":[],"properties":{"method":{"type":"string"},"headers":{"type":"object"},"body":{"type":"string"},"mode":{"type":"string"},"credentials":{"type":"string"},"cache":{"type":"string"},"redirect":{"type":"string"},"referrer":{"type":"string"},"integrity":{"type":"string"}}},"rasterLayer":{"description":"The properties of this object are the rendering settings for the raster layer.","additionalProperties":false,"required":["channels","colormap","index","opacity"],"properties":{"channels":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["selection"],"properties":{"color":{"type":"array","items":{"type":"number"},"description":"The color to use when rendering this channel under the null colormap."},"selection":{"type":"object","description":"Determines the channel selection, e.g. some Z and time slice."},"slider":{"type":"array","items":{"type":"number"},"description":"Determines the range for color mapping."},"visible":{"type":"boolean","description":"Determines whether this channel of the layer will be rendered in the spatial component."}}}},"colormap":{"oneOf":[{"type":"string","description":"The name of the colormap to use for this layer."},{"type":"null","description":"Use the solid color definitions."}]},"transparentColor":{"oneOf":[{"type":"array","minItems":3,"maxItems":3,"items":{"type":"number","description":"One of R G or B (0 - 255)."},"description":"Determines the color to be set to opacity 0"},{"type":"null","description":"No selection."}]},"index":{"type":"number","description":"The index of the layer among the array of layers available in the image file."},"opacity":{"type":"number"},"modelMatrix":{"oneOf":[{"type":"array","minItems":16,"maxItems":16,"description":"transformation matrix for this layer"},{"type":"null","description":"Use no transformation."}]},"domainType":{"type":"string","enum":["Full","Min/Max"],"description":"Determines the extent of the channel slider input element in the layer controller."},"resolution":{"type":"number","description":"Resolution of 3D volumetric rendering"},"xSlice":{"oneOf":[{"type":"array","minItems":2,"maxItems":2,"description":"Slice bounds"},{"type":"null","description":"No slicing"}]},"renderingMode":{"type":"string","description":"Rendering mode of 3D volumetric rendering"},"ySlice":{"oneOf":[{"type":"array","minItems":2,"maxItems":2,"description":"Slice bounds"},{"type":"null","description":"No slicing"}]},"zSlice":{"oneOf":[{"type":"array","minItems":2,"maxItems":2,"description":"Slice bounds"},{"type":"null","description":"No slicing"}]},"type":{"type":"string","enum":["raster","bitmask"]},"use3d":{"type":"boolean"},"visible":{"type":"boolean","description":"Determines whether this entire layer will be rendered in the spatial component."}}},"moleculesLayer":{"type":"object","description":"The properties of this object are the rendering settings for the molecules layer.","additionalProperties":false,"required":["visible","radius","opacity"],"properties":{"visible":{"type":"boolean"},"radius":{"type":"number"},"opacity":{"type":"number"}}},"cellsLayer":{"type":"object","description":"The properties of this object are the rendering settings for the cells layer.","additionalProperties":false,"required":["visible","stroked","radius","opacity"],"properties":{"visible":{"type":"boolean"},"stroked":{"type":"boolean"},"radius":{"type":"number"},"opacity":{"type":"number"}}},"neighborhoodsLayer":{"type":"object","description":"The properties of this object are the rendering settings for the neighborhoods layer.","additionalProperties":false,"required":["visible"],"properties":{"visible":{"type":"boolean"}}},"spatialRasterLayers":{"type":"array","description":"Array of Spatial Layers","items":{"$ref":"#/definitions/rasterLayer"}}},"additionalProperties":false,"required":["version","name","datasets","layout","initStrategy"],"properties":{"name":{"type":"string"},"public":{"type":"boolean"},"description":{"type":"string"},"datasets":{"type":"array","description":"The datasets array defines groups of files, where the files within each dataset reference the same entities (cells, genes, cell sets, etc).","items":{"type":"object","additionalProperties":false,"required":["uid","files"],"properties":{"uid":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"files":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["type","fileType"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"fileType":{"type":"string"},"url":{"type":"string"},"options":{"oneOf":[{"$ref":"#/definitions/annDataCellSets"},{"$ref":"https://github.com/vitessce/vitessce/#raster"},{"$ref":"#/definitions/annDataCells"},{"$ref":"#/definitions/annDataExpressionMatrix"}]},"requestInit":{"$ref":"#/definitions/requestInit"}}}}}}},"coordinationSpace":{"type":"object","description":"The coordination space stores the values for each scope of each coordination object.","additionalProperties":false,"required":[],"properties":{"dataset":{"type":"object","patternProperties":{".":{"type":"string"}}},"embeddingZoom":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"embeddingRotation":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingTargetX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"embeddingTargetY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"embeddingTargetZ":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingType":{"type":"object","patternProperties":{".":{"type":"string"}}},"embeddingCellSetPolygonsVisible":{"type":"object","patternProperties":{".":{"type":"boolean"}}},"embeddingCellSetLabelsVisible":{"type":"object","patternProperties":{".":{"type":"boolean"}}},"embeddingCellSetLabelSize":{"type":"object","patternProperties":{".":{"type":"number"}}},"embeddingCellRadius":{"type":"object","patternProperties":{".":{"type":"number","description":"The cell radius value, used when embeddingCellRadiusMode is absolute or relative."}}},"embeddingCellOpacity":{"type":"object","patternProperties":{".":{"type":"number","description":"The cell opacity value, used when embeddingCellOpacityMode is static."}}},"embeddingCellRadiusMode":{"type":"object","patternProperties":{".":{"type":"string","enum":["manual","auto"],"description":"Should data points representing cells be assigned a static (manual) or dynamic (auto, based on zoom level and data extent) radius?"}}},"embeddingCellOpacityMode":{"type":"object","patternProperties":{".":{"type":"string","enum":["manual","auto"],"description":"Should data points representing cells be assigned a static (manual) or dynamic (auto, based on zoom level and data extent) opacity?"}}},"spatialZoom":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialRotation":{"type":"object","patternProperties":{".":{"type":"number"}}},"spatialTargetX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialTargetY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialTargetZ":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set."},{"type":"number"}]}}},"spatialRotationX":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialRotationY":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialRotationZ":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialRotationOrbit":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"number"}]}}},"spatialOrbitAxis":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, value will be automatically set. Only useful for 3D viewing."},{"type":"string"}]}}},"spatialAxisFixed":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"Whether or not to have a fixed axis for the camera. Only useful for 3D viewing."},{"type":"boolean"}]}}},"spatialRasterLayers":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/spatialRasterLayers"}]}}},"spatialCellsLayer":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/cellsLayer"}]}}},"spatialNeighborhoodsLayer":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/neighborhoodsLayer"}]}}},"spatialMoleculesLayer":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto layer initialization is enabled, layers will be automatically initialized."},{"$ref":"#/definitions/moleculesLayer"}]}}},"heatmapZoomX":{"type":"object","patternProperties":{".":{"type":"number"}}},"heatmapZoomY":{"type":"object","patternProperties":{".":{"type":"number"}}},"heatmapTargetX":{"type":"object","patternProperties":{".":{"type":"number"}}},"heatmapTargetY":{"type":"object","patternProperties":{".":{"type":"number"}}},"cellFilter":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cells will be filtered out initially."},{"type":"array","items":{"type":"string"}}]}}},"cellHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cell will be highlighted initially."},{"type":"string"}]}}},"cellSetSelection":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided and auto cell set initialization is enabled, cell set selections will be automatically initialized."},{"type":"array"}]}}},"cellSetHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cell sets will be highlighted initially."},{"type":"string"}]}}},"cellSetColor":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, cell set colors will be automatically initialized."},{"type":"array","items":{"type":"object","additionalProperties":false,"required":["path","color"],"properties":{"path":{"type":"array","items":{"type":"string"}},"color":{"type":"array","items":{"type":"number"}}}}}]}}},"cellColorEncoding":{"type":"object","patternProperties":{".":{"type":"string","enum":["geneSelection","cellSetSelection"],"description":"How should data points representing cells be colored?"}}},"geneFilter":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no genes will be filtered out initially."},{"type":"array","items":{"type":"string"}}]}}},"geneHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no genes will be highlighted initially."},{"type":"string"}]}}},"geneSelection":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null"},{"type":"array","items":{"type":"string"}}]}}},"geneExpressionTransform":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null"},{"type":"string","pattern":"log1p"}]}}},"geneExpressionColormap":{"type":"object","patternProperties":{".":{"type":"string"}}},"geneExpressionColormapRange":{"type":"object","patternProperties":{".":{"type":"array","items":{"type":"number"}}}},"genomicZoomX":{"type":"object","patternProperties":{".":{"type":"number"}}},"genomicZoomY":{"type":"object","patternProperties":{".":{"type":"number"}}},"genomicTargetX":{"type":"object","patternProperties":{".":{"type":"number"}}},"genomicTargetY":{"type":"object","patternProperties":{".":{"type":"number"}}},"additionalCellSets":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no cell will be highlighted initially."},{"$ref":"https://github.com/vitessce/vitessce/#cell-sets"}]}}},"moleculeHighlight":{"type":"object","patternProperties":{".":{"oneOf":[{"type":"null","description":"If null is provided, no molecule will be highlighted initially."},{"type":"string"}]}}}}},"layout":{"$ref":"#/definitions/components"},"initStrategy":{"type":"string","enum":["none","auto"],"description":"The initialization strategy determines how missing coordination objects and coordination scope mappings are initially filled in."},"version":{"type":"string","enum":["1.0.6"],"description":"The schema version for the view config."}}}')},704:function(e,t,n){e.exports=function(){return n(1109)('!function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="./",e(e.s=23)}([function(t,n){t.exports=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}},function(t,n,e){var r=e(6),o=e(3);t.exports=function(t,n,e){return void 0===e&&(e=n,n=void 0),void 0!==e&&(e=(e=o(e))===e?e:0),void 0!==n&&(n=(n=o(n))===n?n:0),r(o(t),n,e)}},function(t,n,e){var r=e(14)();t.exports=r},function(t,n,e){var r=e(0),o=e(7),i=/^\\s+|\\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,f=/^0o[0-7]+$/i,l=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(o(t))return NaN;if(r(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=r(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(i,"");var e=c.test(t);return e||f.test(t)?l(t.slice(2),e?2:8):u.test(t)?NaN:+t}},function(t,n,e){var r=e(5),o=e(11),i=e(12),u=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":u&&u in Object(t)?o(t):i(t)}},function(t,n,e){var r=e(8).Symbol;t.exports=r},function(t,n){t.exports=function(t,n,e){return t===t&&(void 0!==e&&(t=t<=e?t:e),void 0!==n&&(t=t>=n?t:n)),t}},function(t,n,e){var r=e(4),o=e(13);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},function(t,n,e){var r=e(9),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,n,e){(function(n){var e="object"==typeof n&&n&&n.Object===Object&&n;t.exports=e}).call(this,e(10))},function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(r){"object"===typeof window&&(e=window)}t.exports=e},function(t,n,e){var r=e(5),o=Object.prototype,i=o.hasOwnProperty,u=o.toString,c=r?r.toStringTag:void 0;t.exports=function(t){var n=i.call(t,c),e=t[c];try{t[c]=void 0;var r=!0}catch(f){}var o=u.call(t);return r&&(n?t[c]=e:delete t[c]),o}},function(t,n){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},function(t,n){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,n,e){var r=e(15),o=e(16),i=e(22);t.exports=function(t){return function(n,e,u){return u&&"number"!=typeof u&&o(n,e,u)&&(e=u=void 0),n=i(n),void 0===e?(e=n,n=0):e=i(e),u=void 0===u?n<e?1:-1:i(u),r(n,e,u,t)}}},function(t,n){var e=Math.ceil,r=Math.max;t.exports=function(t,n,o,i){for(var u=-1,c=r(e((n-t)/(o||1)),0),f=Array(c);c--;)f[i?c:++u]=t,t+=o;return f}},function(t,n,e){var r=e(17),o=e(18),i=e(21),u=e(0);t.exports=function(t,n,e){if(!u(e))return!1;var c=typeof n;return!!("number"==c?o(e)&&i(n,e.length):"string"==c&&n in e)&&r(e[n],t)}},function(t,n){t.exports=function(t,n){return t===n||t!==t&&n!==n}},function(t,n,e){var r=e(19),o=e(20);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},function(t,n,e){var r=e(4),o=e(0);t.exports=function(t){if(!o(t))return!1;var n=r(t);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}},function(t,n){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},function(t,n){var e=/^(?:0|[1-9]\\d*)$/;t.exports=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}},function(t,n,e){var r=e(3);t.exports=function(t){return t?(t=r(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t===t?t:0:0===t?t:0}},function(t,n,e){"use strict";e.r(n);e(1);var r=e(2),o=e.n(r);function i(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var u,c=9728,f=10240,l=10241,a=10242,s=10243,p=33071;i(u={},l,c),i(u,f,c),i(u,a,p),i(u,s,p);function v(t,n){var e,r,i,u=n.tileSize,c=n.tileI,f=n.tileJ,l=n.numCells,a=n.numGenes,s=n.cellOrdering,p=n.cells,v=new Uint8Array(u*u),d=o()(u);return d.forEach((function(n){(r=f*u+n)<l&&(i=p.indexOf(s[r]))>=-1&&d.forEach((function(r){e=t[i*a+(c*u+r)],v[(u-r-1)*u+n]=e}))})),v}function d(t,n){var e,r,i,u,c=n.tileSize,f=n.tileI,l=n.tileJ,a=n.numCells,s=n.numGenes,p=n.cellOrdering,v=n.cells,d=new Uint8Array(c*c),b=o()(c);return b.forEach((function(n){(r=f*c+n)<a&&(u=v.indexOf(p[r]))>=-1&&b.forEach((function(r){e=(i=l*c+r)<s?t[u*s+i]:0,d[(c-n-1)*c+r]=e}))})),d}if("undefined"!==typeof self){const t={getTile:function({curr:t,tileI:n,tileJ:e,tileSize:r,cellOrdering:o,rows:i,cols:u,data:c,transpose:f}){const l=new Uint8Array(c),a=u.length;return[{tile:(f?v:d)(l,{tileSize:r,tileI:n,tileJ:e,numCells:o.length,numGenes:a,cellOrdering:o,cells:i}),buffer:c,curr:t},[c]]}};self.addEventListener("message",n=>{try{const[e,r]=n.data,[o,i]=t[e](r);self.postMessage(o,i)}catch(e){console.warn(e)}})}}]);\n//# sourceMappingURL=6f6f723a7874f4178a42.worker.js.map',null)}},747:function(e,t,n){e.exports=n(1148)},863:function(e,t){},875:function(e,t){}},[[747,1,2]]]);
//# sourceMappingURL=main.303f671d.chunk.js.map