@sjcrh/proteinpaint-client 2.76.1 → 2.76.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{2dmaf-593951c7.js → 2dmaf-f240211f.js} +1 -1
- package/dist/{AppHeader-29b88e14.js → AppHeader-c9432a24.js} +1 -1
- package/dist/{ColorScale-3d3c42dc.js → ColorScale-b991fc9e.js} +1 -1
- package/dist/{DEanalysis-f81e0f19.js → DEanalysis-bbfad00d.js} +1 -1
- package/dist/{Disco-db386f7a.js → Disco-b7c9bf72.js} +1 -1
- package/dist/{Disco.UI-8ed9cb39.js → Disco.UI-a5296c36.js} +1 -1
- package/dist/{DragControls-d6250d18.js → DragControls-ca3fa0cf.js} +1 -1
- package/dist/{DziViewer-9352e224.js → DziViewer-28915c11.js} +1 -1
- package/dist/{FilterRxComp-0f35b322.js → FilterRxComp-02e68f1b.js} +1 -1
- package/dist/{FilterStateless-b1c6ee04.js → FilterStateless-16a33070.js} +1 -1
- package/dist/{HicApp-14b94b20.js → HicApp-e713aa40.js} +1 -1
- package/dist/{OrbitControls-45f56ed4.js → OrbitControls-2466d420.js} +1 -1
- package/dist/{WSIViewer-80f60272.js → WSIViewer-957695a8.js} +1 -1
- package/dist/{adSandbox-94424b88.js → adSandbox-27d93bc0.js} +1 -1
- package/dist/app-42f69951.js +1 -0
- package/dist/{app-2cd97738.js → app-6fb77603.js} +1 -1
- package/dist/{app-686b9547.js → app-d215327f.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{bam-6631640f.js → bam-d67e5315.js} +1 -1
- package/dist/{barchart-3c5d734c.js → barchart-2898d229.js} +1 -1
- package/dist/{barchart.events-df44e666.js → barchart.events-426d737a.js} +1 -1
- package/dist/{bars.renderer-b232d882.js → bars.renderer-71935d34.js} +1 -1
- package/dist/{block-4134e823.js → block-75d4ff92.js} +1 -1
- package/dist/block.lazyload-d2951c91.js +1 -0
- package/dist/{block.legend-d2b7f1cb.js → block.legend-93d85a6e.js} +1 -1
- package/dist/{block.mds-ebe7b58d.js → block.mds-84b9d1c1.js} +1 -1
- package/dist/{block.mds.cnv-99f0a414.js → block.mds.cnv-a991ed79.js} +1 -1
- package/dist/{block.mds.expressionrank-96bf864b.js → block.mds.expressionrank-33b858de.js} +1 -1
- package/dist/{block.mds.expressionstat-dcab3fd1.js → block.mds.expressionstat-3093599f.js} +1 -1
- package/dist/{block.mds.geneboxplot-e5b2a4ce.js → block.mds.geneboxplot-b8391d18.js} +1 -1
- package/dist/{block.mds.junction-534eef9b.js → block.mds.junction-69708c7f.js} +1 -1
- package/dist/{block.mds.svcnv-de6a3c7d.js → block.mds.svcnv-322baea6.js} +1 -1
- package/dist/{block.mds.svcnv.share-2c2c16db.js → block.mds.svcnv.share-c5c38237.js} +1 -1
- package/dist/{block.mds2-373fcb4d.js → block.mds2-de4811dd.js} +1 -1
- package/dist/{block.svg-be5d741d.js → block.svg-ac9fec2d.js} +1 -1
- package/dist/{block.tk.aicheck-f2da5e81.js → block.tk.aicheck-ac4b8d4d.js} +1 -1
- package/dist/{block.tk.ase-ef848944.js → block.tk.ase-6dc0f9f1.js} +1 -1
- package/dist/{block.tk.bam-11fcba17.js → block.tk.bam-8f68b41d.js} +1 -1
- package/dist/{block.tk.bedgraphdot-a81b0709.js → block.tk.bedgraphdot-d8878860.js} +1 -1
- package/dist/{block.tk.bigwig.ui-f8e5ba71.js → block.tk.bigwig.ui-f6ed051c.js} +1 -1
- package/dist/{block.tk.hicstraw-e7072b25.js → block.tk.hicstraw-725bdc8a.js} +1 -1
- package/dist/{block.tk.junction-1c9a7854.js → block.tk.junction-f8b0b51d.js} +1 -1
- package/dist/{block.tk.junction.textmatrixui-ffecbb16.js → block.tk.junction.textmatrixui-252e7d7e.js} +1 -1
- package/dist/{block.tk.ld-274c3a82.js → block.tk.ld-11acf730.js} +1 -1
- package/dist/{block.tk.menu-e970cd4a.js → block.tk.menu-5e04436d.js} +1 -1
- package/dist/{block.tk.pgv-f4d4dbf7.js → block.tk.pgv-fef17dc4.js} +1 -1
- package/dist/{boxplot-44d3b48f.js → boxplot-4c9a5479.js} +1 -1
- package/dist/{brainImaging-2eaa419d.js → brainImaging-7716bc66.js} +1 -1
- package/dist/{brush-bb4ae2fb.js → brush-9faa7ae7.js} +1 -1
- package/dist/{categorical-db9b0175.js → categorical-1dea48ba.js} +1 -1
- package/dist/{condition-4e788f7d.js → condition-ebac4f75.js} +1 -1
- package/dist/{controls-3c1691d7.js → controls-268e40e6.js} +1 -1
- package/dist/{controls.btns-5b1240c8.js → controls.btns-5bf9e7d7.js} +1 -1
- package/dist/controls.config-2f0fa061.js +1 -0
- package/dist/{cuminc-c4db28f0.js → cuminc-8dffb765.js} +1 -1
- package/dist/{customdata.inputui-f9234d1f.js → customdata.inputui-b229d3a0.js} +1 -1
- package/dist/{dataDownload-a4dfa2d0.js → dataDownload-452ae3cd.js} +1 -1
- package/dist/{databrowser.ui-a64bab0c.js → databrowser.ui-2197fc73.js} +1 -1
- package/dist/{density-69a732f6.js → density-09feb0c9.js} +1 -1
- package/dist/{dictionary-e2232e84.js → dictionary-a132a3cc.js} +1 -1
- package/dist/{drag-d8daa62f.js → drag-2e9c80bb.js} +1 -1
- package/dist/{e2pca-f9324654.js → e2pca-4f1648e3.js} +1 -1
- package/dist/{ep-a5c1ee3a.js → ep-1d4c58b4.js} +1 -1
- package/dist/{facet-98971c68.js → facet-fa4fe49c.js} +1 -1
- package/dist/{fusion.parse-466ded6d.js → fusion.parse-7dfd6988.js} +1 -1
- package/dist/{geneExpClustering-66c05fb1.js → geneExpClustering-ed9121b8.js} +1 -1
- package/dist/{geneExpression-ff46a389.js → geneExpression-394672ff.js} +1 -1
- package/dist/{geneExpression-b5d0261f.js → geneExpression-66208299.js} +1 -1
- package/dist/geneExpression-c61e8f1c.js +1 -0
- package/dist/{geneORA-f1a90d02.js → geneORA-9456872c.js} +1 -1
- package/dist/{geneVariant-1cf17b3b.js → geneVariant-beaf9adb.js} +1 -1
- package/dist/{geneVariant-d0b9e1cb.js → geneVariant-f17cda85.js} +1 -1
- package/dist/{genefusion.ui-89a727ea.js → genefusion.ui-9238ec7f.js} +1 -1
- package/dist/{genesearch-41cb55ce.js → genesearch-ffd88bf2.js} +1 -1
- package/dist/{geneset-b63496eb.js → geneset-0315daf8.js} +1 -1
- package/dist/{genomeBrowser-ec8fbddc.js → genomeBrowser-608b924e.js} +1 -1
- package/dist/{genomeBrowser.controls-2dcaf4f5.js → genomeBrowser.controls-2601cab5.js} +1 -1
- package/dist/{groupsetting-3fef59f9.js → groupsetting-e3a4ecd5.js} +1 -1
- package/dist/{gsea-3075c82c.js → gsea-0c0cf8de.js} +1 -1
- package/dist/{hierCluster-33a828a1.js → hierCluster-7ab62ca5.js} +1 -1
- package/dist/hierCluster.config-f4daaf92.js +1 -0
- package/dist/{hierCluster.interactivity-6d453881.js → hierCluster.interactivity-7f475259.js} +1 -1
- package/dist/{hierCluster.renderers-6279d7fb.js → hierCluster.renderers-19b79639.js} +1 -1
- package/dist/{html.legend-fac5cb07.js → html.legend-80b2b3ec.js} +1 -1
- package/dist/{imagePlot-38254245.js → imagePlot-1ef24562.js} +1 -1
- package/dist/{lasso-e8b9500e.js → lasso-1a02a545.js} +1 -1
- package/dist/launch.adhoc-e124c993.js +1 -0
- package/dist/{leftlabel.sample-afcdcefd.js → leftlabel.sample-59f99ef5.js} +1 -1
- package/dist/{legacyDataset-3b08c91a.js → legacyDataset-fbaa5ebb.js} +1 -1
- package/dist/{log-4d84c357.js → log-c26b6cfd.js} +1 -1
- package/dist/{lollipop-64c5cdfc.js → lollipop-3aebe5d3.js} +1 -1
- package/dist/{maf-fd4ffbd0.js → maf-c439c851.js} +1 -1
- package/dist/{maftimeline-3e892da7.js → maftimeline-0da64e54.js} +1 -1
- package/dist/{matrix-e371888a.js → matrix-38cd47c3.js} +1 -1
- package/dist/{matrix.cells-eb4110a7.js → matrix.cells-a018d731.js} +1 -1
- package/dist/{matrix.cluster-0df274ed.js → matrix.cluster-a6e713e8.js} +1 -1
- package/dist/{matrix.config-3ef822b9.js → matrix.config-2c550b5d.js} +1 -1
- package/dist/matrix.controls-42ad4912.js +1 -0
- package/dist/{matrix.data-27b8e3a9.js → matrix.data-2b814c9f.js} +1 -1
- package/dist/{matrix.dom-1bbe1f39.js → matrix.dom-1e0da5b3.js} +1 -1
- package/dist/{matrix.groups-67606700.js → matrix.groups-824a7244.js} +1 -1
- package/dist/{matrix.interactivity-cdcc56c9.js → matrix.interactivity-1cb56534.js} +1 -1
- package/dist/{matrix.layout-857cd336.js → matrix.layout-47e44357.js} +1 -1
- package/dist/{matrix.legend-09f6dc57.js → matrix.legend-9af0c757.js} +1 -1
- package/dist/{matrix.renderers-d392fb69.js → matrix.renderers-337ce240.js} +1 -1
- package/dist/{matrix.serieses-b03b62aa.js → matrix.serieses-7b7184c9.js} +1 -1
- package/dist/{matrix.sort-9440c86a.js → matrix.sort-1ac05842.js} +1 -1
- package/dist/{matrix.sorterUi-2c5eb35f.js → matrix.sorterUi-1c60c145.js} +1 -1
- package/dist/{mavb-9d86df89.js → mavb-da8d1a0a.js} +1 -1
- package/dist/{mds.fimo-bffccb9f.js → mds.fimo-8604c3f8.js} +1 -1
- package/dist/{mds.samplescatterplot-b3908cc7.js → mds.samplescatterplot-3f09ae0e.js} +1 -1
- package/dist/{mds.survivalplot-9ad7dabc.js → mds.survivalplot-1d8f2b7e.js} +1 -1
- package/dist/{metaboliteIntensity-ec3176f4.js → metaboliteIntensity-bbb23c76.js} +1 -1
- package/dist/niceNumLabels-29a7c6ca.js +1 -0
- package/dist/{nodrag-ab7d5a9f.js → nodrag-b2737073.js} +1 -1
- package/dist/{notify-59f61230.js → notify-0cb8904f.js} +1 -1
- package/dist/{numeric-4853b665.js → numeric-24dacbee.js} +1 -1
- package/dist/{numeric.binary-1dd9a2b4.js → numeric.binary-f382cc98.js} +1 -1
- package/dist/{numeric.continuous-ed132eea.js → numeric.continuous-6feb34a7.js} +1 -1
- package/dist/{numeric.discrete-d780d076.js → numeric.discrete-ed10bbc1.js} +1 -1
- package/dist/{numeric.spline-abe07708.js → numeric.spline-a35cfbf0.js} +1 -1
- package/dist/{numeric.toggle-647423dd.js → numeric.toggle-2f98d6e5.js} +1 -1
- package/dist/oncomatrix-c0b2d635.js +1 -0
- package/dist/{parseData-567f3d70.js → parseData-292648dd.js} +1 -1
- package/dist/{plot.2dvaf-4016e75e.js → plot.2dvaf-6ae22dc1.js} +1 -1
- package/dist/plot.app-2a805759.js +1 -0
- package/dist/plot.barplot-34841e70.js +1 -0
- package/dist/{plot.boxplot-76229491.js → plot.boxplot-87ac2ce9.js} +1 -1
- package/dist/{plot.brainImaging-39b80a1c.js → plot.brainImaging-32a484b6.js} +1 -1
- package/dist/{plot.disco-9a544f9a.js → plot.disco-1fdfee3c.js} +1 -1
- package/dist/{plot.dzi-f1658ebf.js → plot.dzi-e3d0f610.js} +1 -1
- package/dist/{plot.ssgq-aeb2dabc.js → plot.ssgq-d33113d5.js} +1 -1
- package/dist/{plot.vaf2cov-ba8332ed.js → plot.vaf2cov-9f4f1776.js} +1 -1
- package/dist/{plot.wsi-2d802557.js → plot.wsi-dea124a7.js} +1 -1
- package/dist/{profileBarchart-72adc533.js → profileBarchart-58f0a8c0.js} +1 -1
- package/dist/{profileHome-37fd52e5.js → profileHome-7f404152.js} +1 -1
- package/dist/{profilePlot-0b897a05.js → profilePlot-4db8ca78.js} +1 -1
- package/dist/{profilePolar-a7248d48.js → profilePolar-50b8e40e.js} +1 -1
- package/dist/{profileRadar-1ba5d8fd.js → profileRadar-fff0b004.js} +1 -1
- package/dist/{profileRadarFacility-452e76ef.js → profileRadarFacility-d6d34c15.js} +1 -1
- package/dist/{profileSummary-7f0eacf0.js → profileSummary-04b8b15b.js} +1 -1
- package/dist/{recover-74f2e965.js → recover-299ffdb3.js} +1 -1
- package/dist/{regression.inputs-ff00f74e.js → regression.inputs-14df7c31.js} +1 -1
- package/dist/{regression.inputs.values.table-1753d56b.js → regression.inputs.values.table-d79efa9e.js} +1 -1
- package/dist/{regression.results-6f85a5dc.js → regression.results-4767144e.js} +1 -1
- package/dist/{renderPvalueTable-17558d6a.js → renderPvalueTable-002cc8ff.js} +1 -1
- package/dist/{sampleScatter-97917406.js → sampleScatter-55d9eb74.js} +1 -1
- package/dist/{sampleScatter.rendererThree-4649d1ec.js → sampleScatter.rendererThree-ef289434.js} +2 -2
- package/dist/{sampleView-f86dc5ea.js → sampleView-1dff3fca.js} +1 -1
- package/dist/{samplelst-4a5512df.js → samplelst-d2db0f24.js} +1 -1
- package/dist/{samplematrix-1192e5e2.js → samplematrix-0841387f.js} +1 -1
- package/dist/{scatter-cc1b0d07.js → scatter-f8285107.js} +1 -1
- package/dist/{select2Terms-d4f6ed9e.js → select2Terms-d48d037e.js} +1 -1
- package/dist/{selectGenomeWithTklst-b5cfd153.js → selectGenomeWithTklst-9af86d31.js} +1 -1
- package/dist/{singleCellCellType-d8c58253.js → singleCellCellType-fd1606b8.js} +1 -1
- package/dist/{singleCellGeneExpression-b7209531.js → singleCellGeneExpression-537f1157.js} +1 -1
- package/dist/{singleCellPlot-e6f83b2a.js → singleCellPlot-eff5760b.js} +1 -1
- package/dist/{singlecell-321dd973.js → singlecell-38336cbc.js} +1 -1
- package/dist/{singlecell-879235b3.js → singlecell-87b4b9a9.js} +1 -1
- package/dist/{snp-b046b7e6.js → snp-b81ef740.js} +1 -1
- package/dist/snp-f6123244.js +1 -0
- package/dist/{snplocus-61ff1c10.js → snplocus-acafb1ba.js} +1 -1
- package/dist/{spliceevent.a53ss.diagram-1a84db58.js → spliceevent.a53ss.diagram-5f8352eb.js} +1 -1
- package/dist/{spliceevent.exonskip.diagram-da10648b.js → spliceevent.exonskip.diagram-0d30a735.js} +1 -1
- package/dist/spliceevent.exonskip.getdefault-237c481c.js +1 -0
- package/dist/{spliceevent.noeventdiagram-1d6d790d.js → spliceevent.noeventdiagram-df9ce4bc.js} +1 -1
- package/dist/{spliceevent.phrase-2ca0ce59.js → spliceevent.phrase-a8401d53.js} +1 -1
- package/dist/{stattable-c5f12d9c.js → stattable-46cde32c.js} +1 -1
- package/dist/{style.gdc-5b7d90c6.js → style.gdc-72d730f2.js} +1 -1
- package/dist/{summary-0624f5e6.js → summary-a6c15c9e.js} +1 -1
- package/dist/{sunburst-30295714.js → sunburst-fe95832e.js} +1 -1
- package/dist/{survival-fcc7719f.js → survival-52714cd3.js} +1 -1
- package/dist/survival-57ff3c03.js +1 -0
- package/dist/{svg.download-e89a7369.js → svg.download-f4aa48e4.js} +1 -1
- package/dist/{svg.legend-c93f2980.js → svg.legend-749348e0.js} +1 -1
- package/dist/{svgraph-6ab3011b.js → svgraph-b46f1f92.js} +1 -1
- package/dist/{svmr-3ad3d600.js → svmr-9a76c6d4.js} +1 -1
- package/dist/{table-f50a9344.js → table-0daf2b89.js} +1 -1
- package/dist/{table-4d3a771e.js → table-bf40249b.js} +1 -1
- package/dist/{termInfo-d0a9e65f.js → termInfo-491b10af.js} +1 -1
- package/dist/{termdb.bins-01e8cce6.js → termdb.bins-39d11f24.js} +1 -1
- package/dist/termsetting-492eefa7.js +1 -0
- package/dist/{tk-e74c9beb.js → tk-ac524564.js} +1 -1
- package/dist/{toggleButtons-04c5ad7c.js → toggleButtons-c4d6f260.js} +1 -1
- package/dist/{tp.ui-7b24f0ef.js → tp.ui-0a476325.js} +1 -1
- package/dist/tvs.density-034b506d.js +1 -0
- package/dist/{tvs.geneVariant-418ed4ff.js → tvs.geneVariant-c59c8b54.js} +1 -1
- package/dist/{tvs.numeric-de14101f.js → tvs.numeric-aa1f892f.js} +1 -1
- package/dist/{tvs.samplelst-15bb62f1.js → tvs.samplelst-515f27b9.js} +1 -1
- package/dist/{uiUtils-ff2d4a6a.js → uiUtils-ea7dfea2.js} +1 -1
- package/dist/{variantBrowser-261373bf.js → variantBrowser-14d5c3f6.js} +1 -1
- package/dist/{vcf-145bf5dd.js → vcf-d357ce08.js} +1 -1
- package/dist/{violin-e647aac9.js → violin-74d26b75.js} +1 -1
- package/dist/{violin.interactivity-30a239fe.js → violin.interactivity-bf40ddde.js} +1 -1
- package/dist/{violin.renderer-e29d2700.js → violin.renderer-469fa0ff.js} +1 -1
- package/dist/{violinRenderer-08b3b58c.js → violinRenderer-14fa200d.js} +1 -1
- package/dist/{viridis-d86ad99b.js → viridis-cc59f478.js} +1 -1
- package/dist/{y-06b0d47c.js → y-59cbff5e.js} +1 -1
- package/dist/{zoom-d6ef6f3f.js → zoom-f445cfef.js} +1 -1
- package/package.json +1 -1
- package/dist/app-f031940d.js +0 -1
- package/dist/block.lazyload-eda77d9b.js +0 -1
- package/dist/controls.config-81cd5749.js +0 -1
- package/dist/geneExpression-5685eae2.js +0 -1
- package/dist/hierCluster.config-fa799d06.js +0 -1
- package/dist/launch.adhoc-2799109b.js +0 -1
- package/dist/matrix.controls-42bb2063.js +0 -1
- package/dist/niceNumLabels-5f45218a.js +0 -1
- package/dist/oncomatrix-7ac995a2.js +0 -1
- package/dist/plot.app-d6fe76e2.js +0 -1
- package/dist/plot.barplot-d2fc5020.js +0 -1
- package/dist/snp-541ec14d.js +0 -1
- package/dist/spliceevent.exonskip.getdefault-8028e522.js +0 -1
- package/dist/survival-816e055a.js +0 -1
- package/dist/termsetting-ad8c4f3a.js +0 -1
- package/dist/tvs.density-b2790080.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bB as n,_ as t}from"./app-
|
|
1
|
+
import{bB as n,_ as t}from"./app-6fb77603.js";function r(n){return function(){return n}}function e(n){return(n()-.5)*1e-6}const i=1664525;const f=1013904223;const u=4294967296;function o(){let n=1;return()=>(n=(i*n+f)%u)/u}var a=10,c=Math.PI*(3-Math.sqrt(5));function l(r){var e,i=1,f=.001,u=1-Math.pow(f,1/300),l=0,h=.6,s=new Map,y=n(p),g=t("tick","end"),v=o();if(r==null)r=[];function p(){x();g.call("tick",e);if(i<f){y.stop();g.call("end",e)}}function x(n){var t,f=r.length,o;if(n===undefined)n=1;for(var a=0;a<n;++a){i+=(l-i)*u;s.forEach((function(n){n(i)}));for(t=0;t<f;++t){o=r[t];if(o.fx==null)o.x+=o.vx*=h;else o.x=o.fx,o.vx=0;if(o.fy==null)o.y+=o.vy*=h;else o.y=o.fy,o.vy=0}}return e}function N(){for(var n=0,t=r.length,e;n<t;++n){e=r[n],e.index=n;if(e.fx!=null)e.x=e.fx;if(e.fy!=null)e.y=e.fy;if(isNaN(e.x)||isNaN(e.y)){var i=a*Math.sqrt(.5+n),f=n*c;e.x=i*Math.cos(f);e.y=i*Math.sin(f)}if(isNaN(e.vx)||isNaN(e.vy)){e.vx=e.vy=0}}}function d(n){if(n.initialize)n.initialize(r,v);return n}N();return e={tick:x,restart:function(){return y.restart(p),e},stop:function(){return y.stop(),e},nodes:function(n){return arguments.length?(r=n,N(),s.forEach(d),e):r},alpha:function(n){return arguments.length?(i=+n,e):i},alphaMin:function(n){return arguments.length?(f=+n,e):f},alphaDecay:function(n){return arguments.length?(u=+n,e):+u},alphaTarget:function(n){return arguments.length?(l=+n,e):l},velocityDecay:function(n){return arguments.length?(h=1-n,e):1-h},randomSource:function(n){return arguments.length?(v=n,s.forEach(d),e):v},force:function(n,t){return arguments.length>1?(t==null?s.delete(n):s.set(n,d(t)),e):s.get(n)},find:function(n,t,e){var i=0,f=r.length,u,o,a,c,l;if(e==null)e=Infinity;else e*=e;for(i=0;i<f;++i){c=r[i];u=n-c.x;o=t-c.y;a=u*u+o*o;if(a<e)l=c,e=a}return l},on:function(n,t){return arguments.length>1?(g.on(n,t),e):g.on(n)}}}function h(n){var t=r(.1),e,i,f;if(typeof n!=="function")n=r(n==null?0:+n);function u(n){for(var t=0,r=e.length,u;t<r;++t){u=e[t],u.vx+=(f[t]-u.x)*i[t]*n}}function o(){if(!e)return;var r,u=e.length;i=new Array(u);f=new Array(u);for(r=0;r<u;++r){i[r]=isNaN(f[r]=+n(e[r],r,e))?0:+t(e[r],r,e)}}u.initialize=function(n){e=n;o()};u.strength=function(n){return arguments.length?(t=typeof n==="function"?n:r(+n),o(),u):t};u.x=function(t){return arguments.length?(n=typeof t==="function"?t:r(+t),o(),u):n};return u}function s(n){var t=r(.1),e,i,f;if(typeof n!=="function")n=r(n==null?0:+n);function u(n){for(var t=0,r=e.length,u;t<r;++t){u=e[t],u.vy+=(f[t]-u.y)*i[t]*n}}function o(){if(!e)return;var r,u=e.length;i=new Array(u);f=new Array(u);for(r=0;r<u;++r){i[r]=isNaN(f[r]=+n(e[r],r,e))?0:+t(e[r],r,e)}}u.initialize=function(n){e=n;o()};u.strength=function(n){return arguments.length?(t=typeof n==="function"?n:r(+n),o(),u):t};u.y=function(t){return arguments.length?(n=typeof t==="function"?t:r(+t),o(),u):n};return u}export{r as c,e as j,l as s,h as x,s as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t,N as e,a6 as n,d as o,a0 as i}from"./app-
|
|
1
|
+
import{_ as t,N as e,a6 as n,d as o,a0 as i}from"./app-6fb77603.js";import{p as u}from"./pointer-c7475677.js";import{d as r,y as a}from"./nodrag-b2737073.js";var h=1e-12;function s(t){return((t=Math.exp(t))+1/t)/2}function c(t){return((t=Math.exp(t))-1/t)/2}function f(t){return((t=Math.exp(2*t))-1)/(t+1)}var l=function t(e,n,o){function i(t,i){var u=t[0],r=t[1],a=t[2],l=i[0],m=i[1],p=i[2],v=l-u,y=m-r,d=v*v+y*y,g,z;if(d<h){z=Math.log(p/a)/e;g=function(t){return[u+t*v,r+t*y,a*Math.exp(e*t*z)]}}else{var _=Math.sqrt(d),M=(p*p-a*a+o*d)/(2*a*n*_),x=(p*p-a*a-o*d)/(2*p*n*_),w=Math.log(Math.sqrt(M*M+1)-M),b=Math.log(Math.sqrt(x*x+1)-x);z=(b-w)/e;g=function(t){var o=t*z,i=s(w),h=a/(n*_)*(i*f(e*o+w)-c(w));return[u+h*v,r+h*y,a*i/s(e*o+w)]}}g.duration=z*1e3*e/Math.SQRT2;return g}i.rho=function(e){var n=Math.max(.001,+e),o=n*n,i=o*o;return t(n,o,i)};return i}(Math.SQRT2,2,4);var m=t=>()=>t;function p(t,{sourceEvent:e,target:n,transform:o,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:true,configurable:true},sourceEvent:{value:e,enumerable:true,configurable:true},target:{value:n,enumerable:true,configurable:true},transform:{value:o,enumerable:true,configurable:true},_:{value:i}})}function v(t){t.stopImmediatePropagation()}function y(t){t.preventDefault();t.stopImmediatePropagation()}function d(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function g(){var t=this;if(t instanceof SVGElement){t=t.ownerSVGElement||t;if(t.hasAttribute("viewBox")){t=t.viewBox.baseVal;return[[t.x,t.y],[t.x+t.width,t.y+t.height]]}return[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}return[[0,0],[t.clientWidth,t.clientHeight]]}function z(){return this.__zoom||e}function _(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function M(){return navigator.maxTouchPoints||"ontouchstart"in this}function x(t,e,n){var o=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],u=t.invertY(e[0][1])-n[0][1],r=t.invertY(e[1][1])-n[1][1];return t.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),r>u?(u+r)/2:Math.min(0,u)||Math.max(0,r))}function w(){var h=d,s=g,c=x,f=_,w=M,b=[0,Infinity],T=[[-Infinity,-Infinity],[Infinity,Infinity]],k=250,E=l,I=t("start","zoom","end"),q,V,Y,j=500,B=150,D=0,P=10;function S(t){t.property("__zoom",z).on("wheel.zoom",H,{passive:false}).on("mousedown.zoom",N).on("dblclick.zoom",O).filter(w).on("touchstart.zoom",W).on("touchmove.zoom",C).on("touchend.zoom touchcancel.zoom",F).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}S.transform=function(t,e,n,o){var i=t.selection?t.selection():t;i.property("__zoom",z);if(t!==i){Q(t,e,n,o)}else{i.interrupt().each((function(){R(this,arguments).event(o).start().zoom(null,typeof e==="function"?e.apply(this,arguments):e).end()}))}};S.scaleBy=function(t,e,n,o){S.scaleTo(t,(function(){var t=this.__zoom.k,n=typeof e==="function"?e.apply(this,arguments):e;return t*n}),n,o)};S.scaleTo=function(t,e,n,o){S.transform(t,(function(){var t=s.apply(this,arguments),o=this.__zoom,i=n==null?G(t):typeof n==="function"?n.apply(this,arguments):n,u=o.invert(i),r=typeof e==="function"?e.apply(this,arguments):e;return c(K(X(o,r),i,u),t,T)}),n,o)};S.translateBy=function(t,e,n,o){S.transform(t,(function(){return c(this.__zoom.translate(typeof e==="function"?e.apply(this,arguments):e,typeof n==="function"?n.apply(this,arguments):n),s.apply(this,arguments),T)}),null,o)};S.translateTo=function(t,n,o,i,u){S.transform(t,(function(){var t=s.apply(this,arguments),u=this.__zoom,r=i==null?G(t):typeof i==="function"?i.apply(this,arguments):i;return c(e.translate(r[0],r[1]).scale(u.k).translate(typeof n==="function"?-n.apply(this,arguments):-n,typeof o==="function"?-o.apply(this,arguments):-o),t,T)}),i,u)};function X(t,e){e=Math.max(b[0],Math.min(b[1],e));return e===t.k?t:new n(e,t.x,t.y)}function K(t,e,o){var i=e[0]-o[0]*t.k,u=e[1]-o[1]*t.k;return i===t.x&&u===t.y?t:new n(t.k,i,u)}function G(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function Q(t,e,o,i){t.on("start.zoom",(function(){R(this,arguments).event(i).start()})).on("interrupt.zoom end.zoom",(function(){R(this,arguments).event(i).end()})).tween("zoom",(function(){var t=this,u=arguments,r=R(t,u).event(i),a=s.apply(t,u),h=o==null?G(a):typeof o==="function"?o.apply(t,u):o,c=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),f=t.__zoom,l=typeof e==="function"?e.apply(t,u):e,m=E(f.invert(h).concat(c/f.k),l.invert(h).concat(c/l.k));return function(t){if(t===1)t=l;else{var e=m(t),o=c/e[2];t=new n(o,h[0]-e[0]*o,h[1]-e[1]*o)}r.zoom(null,t)}}))}function R(t,e,n){return!n&&t.__zooming||new A(t,e)}function A(t,e){this.that=t;this.args=e;this.active=0;this.sourceEvent=null;this.extent=s.apply(t,e);this.taps=0}A.prototype={event:function(t){if(t)this.sourceEvent=t;return this},start:function(){if(++this.active===1){this.that.__zooming=this;this.emit("start")}return this},zoom:function(t,e){if(this.mouse&&t!=="mouse")this.mouse[1]=e.invert(this.mouse[0]);if(this.touch0&&t!=="touch")this.touch0[1]=e.invert(this.touch0[0]);if(this.touch1&&t!=="touch")this.touch1[1]=e.invert(this.touch1[0]);this.that.__zoom=e;this.emit("zoom");return this},end:function(){if(--this.active===0){delete this.that.__zooming;this.emit("end")}return this},emit:function(t){var e=o(this.that).datum();I.call(t,this.that,new p(t,{sourceEvent:this.sourceEvent,target:S,type:t,transform:this.that.__zoom,dispatch:I}),e)}};function H(t,...e){if(!h.apply(this,arguments))return;var n=R(this,e).event(t),o=this.__zoom,r=Math.max(b[0],Math.min(b[1],o.k*Math.pow(2,f.apply(this,arguments)))),a=u(t);if(n.wheel){if(n.mouse[0][0]!==a[0]||n.mouse[0][1]!==a[1]){n.mouse[1]=o.invert(n.mouse[0]=a)}clearTimeout(n.wheel)}else if(o.k===r)return;else{n.mouse=[a,o.invert(a)];i(this);n.start()}y(t);n.wheel=setTimeout(s,B);n.zoom("mouse",c(K(X(o,r),n.mouse[0],n.mouse[1]),n.extent,T));function s(){n.wheel=null;n.end()}}function N(t,...e){if(Y||!h.apply(this,arguments))return;var n=t.currentTarget,s=R(this,e,true).event(t),f=o(t.view).on("mousemove.zoom",d,true).on("mouseup.zoom",g,true),l=u(t,n),m=t.clientX,p=t.clientY;r(t.view);v(t);s.mouse=[l,this.__zoom.invert(l)];i(this);s.start();function d(t){y(t);if(!s.moved){var e=t.clientX-m,o=t.clientY-p;s.moved=e*e+o*o>D}s.event(t).zoom("mouse",c(K(s.that.__zoom,s.mouse[0]=u(t,n),s.mouse[1]),s.extent,T))}function g(t){f.on("mousemove.zoom mouseup.zoom",null);a(t.view,s.moved);y(t);s.event(t).end()}}function O(t,...e){if(!h.apply(this,arguments))return;var n=this.__zoom,i=u(t.changedTouches?t.changedTouches[0]:t,this),r=n.invert(i),a=n.k*(t.shiftKey?.5:2),f=c(K(X(n,a),i,r),s.apply(this,e),T);y(t);if(k>0)o(this).transition().duration(k).call(Q,f,i,t);else o(this).call(S.transform,f,i,t)}function W(t,...e){if(!h.apply(this,arguments))return;var n=t.touches,o=n.length,r=R(this,e,t.changedTouches.length===o).event(t),a,s,c,f;v(t);for(s=0;s<o;++s){c=n[s],f=u(c,this);f=[f,this.__zoom.invert(f),c.identifier];if(!r.touch0)r.touch0=f,a=true,r.taps=1+!!q;else if(!r.touch1&&r.touch0[2]!==f[2])r.touch1=f,r.taps=0}if(q)q=clearTimeout(q);if(a){if(r.taps<2)V=f[0],q=setTimeout((function(){q=null}),j);i(this);r.start()}}function C(t,...e){if(!this.__zooming)return;var n=R(this,e).event(t),o=t.changedTouches,i=o.length,r,a,h,s;y(t);for(r=0;r<i;++r){a=o[r],h=u(a,this);if(n.touch0&&n.touch0[2]===a.identifier)n.touch0[0]=h;else if(n.touch1&&n.touch1[2]===a.identifier)n.touch1[0]=h}a=n.that.__zoom;if(n.touch1){var f=n.touch0[0],l=n.touch0[1],m=n.touch1[0],p=n.touch1[1],v=(v=m[0]-f[0])*v+(v=m[1]-f[1])*v,d=(d=p[0]-l[0])*d+(d=p[1]-l[1])*d;a=X(a,Math.sqrt(v/d));h=[(f[0]+m[0])/2,(f[1]+m[1])/2];s=[(l[0]+p[0])/2,(l[1]+p[1])/2]}else if(n.touch0)h=n.touch0[0],s=n.touch0[1];else return;n.zoom("touch",c(K(a,h,s),n.extent,T))}function F(t,...e){if(!this.__zooming)return;var n=R(this,e).event(t),i=t.changedTouches,r=i.length,a,h;v(t);if(Y)clearTimeout(Y);Y=setTimeout((function(){Y=null}),j);for(a=0;a<r;++a){h=i[a];if(n.touch0&&n.touch0[2]===h.identifier)delete n.touch0;else if(n.touch1&&n.touch1[2]===h.identifier)delete n.touch1}if(n.touch1&&!n.touch0)n.touch0=n.touch1,delete n.touch1;if(n.touch0)n.touch0[1]=this.__zoom.invert(n.touch0[0]);else{n.end();if(n.taps===2){h=u(h,this);if(Math.hypot(V[0]-h[0],V[1]-h[1])<P){var s=o(this).on("dblclick.zoom");if(s)s.apply(this,arguments)}}}}S.wheelDelta=function(t){return arguments.length?(f=typeof t==="function"?t:m(+t),S):f};S.filter=function(t){return arguments.length?(h=typeof t==="function"?t:m(!!t),S):h};S.touchable=function(t){return arguments.length?(w=typeof t==="function"?t:m(!!t),S):w};S.extent=function(t){return arguments.length?(s=typeof t==="function"?t:m([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),S):s};S.scaleExtent=function(t){return arguments.length?(b[0]=+t[0],b[1]=+t[1],S):[b[0],b[1]]};S.translateExtent=function(t){return arguments.length?(T[0][0]=+t[0][0],T[1][0]=+t[1][0],T[0][1]=+t[0][1],T[1][1]=+t[1][1],S):[[T[0][0],T[0][1]],[T[1][0],T[1][1]]]};S.constrain=function(t){return arguments.length?(c=t,S):c};S.duration=function(t){return arguments.length?(k=+t,S):k};S.interpolate=function(t){return arguments.length?(E=t,S):E};S.on=function(){var t=I.on.apply(I,arguments);return t===I?S:t};S.clickDistance=function(t){return arguments.length?(D=(t=+t)*t,S):Math.sqrt(D)};S.tapDistance=function(t){return arguments.length?(P=+t,S):P};return S}export{w as d};
|
package/package.json
CHANGED
package/dist/app-f031940d.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as t,d as e,M as s,o as r,n as o,y as i}from"./app-2cd97738.js";import{r as a,s as n}from"./recover-74f2e965.js";import{v as p}from"./FilterRxComp-0f35b322.js";import{n as c}from"./sampleScatter-97917406.js";import{summaryInit as l}from"./summary-0624f5e6.js";import"./termsetting-ad8c4f3a.js";import"./tslib.es6-c3c2d88f.js";import"path";import"./FilterStateless-b1c6ee04.js";import"./app-686b9547.js";import"./termInfo-d0a9e65f.js";import"./toggleButtons-04c5ad7c.js";import"./table-f50a9344.js";import"./genesearch-41cb55ce.js";import"./checkbox-96437f4d.js";import"./rehydrateFilter-12d118cb.js";import"./partjson.esm-b3f1fc21.js";import"./termdb.bins-01e8cce6.js";import"./controls-3c1691d7.js";import"./controls.btns-5b1240c8.js";import"./controls.config-81cd5749.js";import"./zoom-d6ef6f3f.js";import"./pointer-c7475677.js";import"./nodrag-ab7d5a9f.js";import"./lasso-e8b9500e.js";import"./drag-d8daa62f.js";import"./downloadTextfile-5723af95.js";import"./sampleView-f86dc5ea.js";import"./select2Terms-d4f6ed9e.js";import"./svg.download-e89a7369.js";import"./sampleScatter.rendererThree-4649d1ec.js";import"./axis-747c801e.js";import"./line-264f8f9e.js";import"./constant-426a1483.js";import"./violin-e647aac9.js";import"./violin.renderer-e29d2700.js";import"./brush-bb4ae2fb.js";import"./basis-3870f5ba.js";import"./log-4d84c357.js";import"./html.legend-fac5cb07.js";import"./violin.interactivity-30a239fe.js";import"./niceNumLabels-5f45218a.js";import"./barchart-3c5d734c.js";import"./bars.settings-64bb4642.js";import"./bars.renderer-b232d882.js";import"./svg.legend-c93f2980.js";import"./barchart.events-df44e666.js";function m(t){switch(t){case"../plots/DEanalysis.js":return import("./DEanalysis-f81e0f19.js");case"../plots/Disco.js":return import("./Disco-db386f7a.js");case"../plots/DziViewer.js":return import("./DziViewer-9352e224.js");case"../plots/WSIViewer.js":return import("./WSIViewer-80f60272.js");case"../plots/barchart.data.js":return import("./FilterRxComp-0f35b322.js").then((function(t){return t.j}));case"../plots/barchart.events.js":return import("./barchart.events-df44e666.js");case"../plots/barchart.js":return import("./barchart-3c5d734c.js");case"../plots/bars.renderer.js":return import("./bars.renderer-b232d882.js");case"../plots/bars.settings.js":return import("./bars.settings-64bb4642.js");case"../plots/boxplot.js":return import("./boxplot-44d3b48f.js");case"../plots/brainImaging.js":return import("./brainImaging-2eaa419d.js");case"../plots/controls.btns.js":return import("./controls.btns-5b1240c8.js");case"../plots/controls.config.js":return import("./controls.config-81cd5749.js");case"../plots/controls.js":return import("./controls-3c1691d7.js");case"../plots/cuminc.js":return import("./cuminc-c4db28f0.js");case"../plots/dataDownload.js":return import("./dataDownload-a4dfa2d0.js");case"../plots/dictionary.js":return import("./dictionary-e2232e84.js");case"../plots/facet.js":return import("./facet-98971c68.js");case"../plots/geneExpression.js":return import("./geneExpression-b5d0261f.js");case"../plots/geneORA.js":return import("./geneORA-f1a90d02.js");case"../plots/geneset.js":return import("./geneset-b63496eb.js");case"../plots/genomeBrowser.controls.js":return import("./genomeBrowser.controls-2dcaf4f5.js");case"../plots/genomeBrowser.js":return import("./genomeBrowser-ec8fbddc.js");case"../plots/gsea.js":return import("./gsea-3075c82c.js");case"../plots/hierCluster.config.js":return import("./hierCluster.config-fa799d06.js");case"../plots/hierCluster.interactivity.js":return import("./hierCluster.interactivity-6d453881.js").then((function(t){return t.i}));case"../plots/hierCluster.js":return import("./hierCluster-33a828a1.js");case"../plots/hierCluster.renderers.js":return import("./hierCluster.renderers-6279d7fb.js").then((function(t){return t.r}));case"../plots/imagePlot.js":return import("./imagePlot-38254245.js");case"../plots/matrix.cells.js":return import("./matrix.cells-eb4110a7.js");case"../plots/matrix.cluster.js":return import("./matrix.cluster-0df274ed.js");case"../plots/matrix.config.js":return import("./matrix.config-3ef822b9.js");case"../plots/matrix.controls.js":return import("./matrix.controls-42bb2063.js");case"../plots/matrix.data.js":return import("./matrix.data-27b8e3a9.js").then((function(t){return t.m}));case"../plots/matrix.dom.js":return import("./matrix.dom-1bbe1f39.js");case"../plots/matrix.groups.js":return import("./matrix.groups-67606700.js").then((function(t){return t.m}));case"../plots/matrix.interactivity.js":return import("./matrix.interactivity-cdcc56c9.js");case"../plots/matrix.js":return import("./matrix-e371888a.js");case"../plots/matrix.layout.js":return import("./matrix.layout-857cd336.js").then((function(t){return t.m}));case"../plots/matrix.legend.js":return import("./matrix.legend-09f6dc57.js").then((function(t){return t.m}));case"../plots/matrix.renderers.js":return import("./matrix.renderers-d392fb69.js");case"../plots/matrix.serieses.js":return import("./matrix.serieses-b03b62aa.js").then((function(t){return t.m}));case"../plots/matrix.sort.js":return import("./matrix.sort-9440c86a.js");case"../plots/matrix.sorterUi.js":return import("./matrix.sorterUi-2c5eb35f.js");case"../plots/plot.app.js":return import("./plot.app-d6fe76e2.js");case"../plots/plot.brainImaging.js":return import("./plot.brainImaging-39b80a1c.js");case"../plots/plot.disco.js":return import("./plot.disco-9a544f9a.js");case"../plots/plot.ssgq.js":return import("./plot.ssgq-aeb2dabc.js");case"../plots/profileBarchart.js":return import("./profileBarchart-72adc533.js");case"../plots/profilePlot.js":return import("./profilePlot-0b897a05.js");case"../plots/profilePolar.js":return import("./profilePolar-a7248d48.js");case"../plots/profileRadar.js":return import("./profileRadar-1ba5d8fd.js");case"../plots/profileRadarFacility.js":return import("./profileRadarFacility-452e76ef.js");case"../plots/profileSummary.js":return import("./profileSummary-7f0eacf0.js");case"../plots/regression.inputs.js":return import("./regression.inputs-ff00f74e.js").then((function(t){return t.b}));case"../plots/regression.inputs.term.js":return import("./regression.inputs-ff00f74e.js").then((function(t){return t.a}));case"../plots/regression.inputs.values.table.js":return import("./regression.inputs.values.table-1753d56b.js");case"../plots/regression.js":return import("./regression.inputs-ff00f74e.js").then((function(t){return t.r}));case"../plots/regression.results.js":return import("./regression.results-6f85a5dc.js").then((function(t){return t.r}));case"../plots/sampleScatter.interactivity.js":return import("./sampleScatter-97917406.js").then((function(t){return t.a}));case"../plots/sampleScatter.js":return import("./sampleScatter-97917406.js").then((function(t){return t.b}));case"../plots/sampleScatter.renderer.js":return import("./sampleScatter-97917406.js").then((function(t){return t.s}));case"../plots/sampleScatter.rendererThree.js":return import("./sampleScatter.rendererThree-4649d1ec.js").then((function(t){return t.c}));case"../plots/sampleView.js":return import("./sampleView-f86dc5ea.js");case"../plots/scatter.js":return import("./scatter-cc1b0d07.js");case"../plots/singleCellPlot.js":return import("./singleCellPlot-e6f83b2a.js");case"../plots/stattable.js":return import("./stattable-c5f12d9c.js");case"../plots/summary.js":return import("./summary-0624f5e6.js");case"../plots/survival.js":return import("./survival-fcc7719f.js");case"../plots/table.js":return import("./table-4d3a771e.js");case"../plots/variantBrowser.js":return import("./variantBrowser-261373bf.js");case"../plots/violin.interactivity.js":return import("./violin.interactivity-30a239fe.js");case"../plots/violin.js":return import("./violin-e647aac9.js");case"../plots/violin.renderer.js":return import("./violin.renderer-e29d2700.js");default:return new Promise((function(e,s){(typeof queueMicrotask==="function"?queueMicrotask:setTimeout)(s.bind(null,new Error("Unknown variable dynamic import: "+t)))}))}}class d{constructor(t){this.type="plot";u(this);this.initUi(t)}reactsTo(t){if(t.type.includes("cache_termq"))return true;if(t.type.endsWith("_group"))return true;if(t.type.startsWith("plot_"))return t.id===this.id;if(t.type.startsWith("filter"))return true;if(t.type.startsWith("cohort"))return true;if(t.type=="app_refresh")return true;if(t.type.endsWith("customTerm"))return true}getState(t){const e=t.plots.find((t=>t.id===this.id));if(!e){throw`No plot with id='${this.id}' found. Did you set this.id before this.api = getComponentApi(this)?`}return{config:e,groups:t.groups,_scope_:t._scope_}}async main(){this.dom.errdiv.style("display","none");if(!this.components)await this.setComponents(this.opts)}async setComponents(t){this.components={recover:await a({app:this.app,holder:this.dom.localRecoverDiv,getState:t=>this.getState(t),reactsTo:t=>t.id==this.id&&(t.type=="plot_edit"||t.type=="plot_nestedEdits")&&t._track_!="none",plot_id:this.id,maxHistoryLen:10})};const s=await m(`../plots/${t.chartType}.js`);this.components.chart=await s.componentInit({app:this.app,holder:this.dom.viz,header:this.dom.paneTitleDiv,id:this.id,plotDiv:e(this.dom.holder.app_div.node().parentNode)})}destroy(){this.dom.holder.app_div.selectAll("*").remove();this.dom.holder.app_div.remove();for(const t in this.dom){delete this.dom[t]}}}const j=t(d);function u(t){t.initUi=function(e){const r=e.holder;r.header.style("padding",0);try{t.dom={tip:new s({padding:"0px"}),holder:r,paneTitleDiv:r.header.append("div").style("display","inline-block").style("color","#555").style("padding-left","7px").style("vertical-align","sub"),localRecoverDiv:r.header.append("div").style("display","inline-block"),body:r.body.style("white-space","nowrap").style("overflow-x","auto"),errdiv:r.body.append("div").style("display","none").style("padding","5px").style("background-color","rgba(255,100,100,0.2)"),viz:r.body.append("div")}}catch(e){t.dom.errdiv.style("display","none").text(e)}}}class h{constructor(t){if(t.addLoginCallback){t.addLoginCallback((()=>this.api.dispatch({type:"app_refresh"})))}this.type="app";this.dom={holder:t.holder,topbar:t.holder.append("div"),errdiv:t.holder.append("div"),plotDiv:t.holder.append("div")};this.plotIdToSandboxId={}}validateOpts(t={}){if(!t.holder)throw`missing opts.holder in the MassApp constructor argument`;if(!t.callbacks)t.callbacks={};if(!t.state.vocab)t.state.vocab={};if(typeof t.state.vocab!="object")throw"opts.state.vocab{} is not an object";if(t.state.genome){t.state.vocab.genome=t.state.genome;delete t.state.genome}if(t.state.dslabel){t.state.vocab.dslabel=t.state.dslabel;delete t.state.dslabel}return t}async preApiFreeze(t){try{t.tip=new s({padding:"5px"});t.tip.d.on("keyup",(e=>{if(e.key=="Escape")t.tip.hide()}));t.printError=t=>this.printError(t);const e=this.opts.state.vocab;t.vocabApi=await p({app:t,state:{vocab:this.opts.state.vocab},fetchOpts:this.opts.fetchOpts,getDatasetAccessToken:this.opts.getDatasetAccessToken});t.hasWebGL=function(){try{var t=document.createElement("canvas");return!!(window.WebGLRenderingContext&&(t.getContext("webgl")||t.getContext("experimental-webgl")))}catch(t){return false}};this.opts.state.vocab=t.vocabApi.vocab}catch(t){throw t}}async init(){try{const t="debounceInterval"in this.opts?this.opts.debounceInterval:0;if(this.opts.embeddedSessionState){Object.assign(this.opts.state,this.opts.embeddedSessionState)}this.store=await n({app:this.api,state:this.opts.state,debounceInterval:t});this.state=await this.store.copyState();this.components={};if(this.state.nav.header_mode!="hidden"){this.components.nav=await c({app:this.api,holder:this.dom.topbar,header_mode:this.state&&this.state.nav&&this.state.nav.header_mode,vocab:this.state.vocab,massSessionDuration:this.state.termdbConfig.massSessionDuration})}this.components.plots={};await this.api.dispatch()}catch(t){this.printError(t);throw t}}async main(){await this.api.vocabApi.main();const t={};let e;for(const s of this.state.plots){if(this.components.plots&&!(s.id in this.components.plots)){e=o(this.dom.plotDiv,{close:()=>{this.api.dispatch({type:"plot_delete",id:s.id})},plotId:s.id,beforePlotId:s.insertBefore||null,style:{width:"98.5%"}});if(s.chartType=="summary")t[s.id]=l(Object.assign({app:this.api,holder:e},s));else t[s.id]=j(Object.assign({app:this.api,holder:e},s))}}const s=Object.keys(t).length;if(s){await Promise.all(Object.values(t));for(const e in t){this.components.plots[e]=await t[e]}}for(const t in this.components.plots){if(!this.state.plots.find((e=>e.id===t))){this.components.plots[t].destroy();delete this.components.plots[t]}}}printError(t){i(this.dom.errdiv||this.opts.holder,"Error: "+(t.message||t));if(t.stack)console.log(t.stack);this.bus.emit("error")}}const f=r(h);export{f as appInit};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let n;async function t(t){if(!n){const t=await import("./block-4134e823.js").then((function(n){return n.c}));n=t.Block}return new n(t)}export{t as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as t,h as e,K as s,r as n}from"./app-2cd97738.js";import{h as i}from"./termsetting-ad8c4f3a.js";import"./tslib.es6-c3c2d88f.js";import"path";function l(e){const s=e.holder.selectAll("div").data(e.options,(t=>t.value)).style("display","block");s.exit().each((function(e){t(this).on("input",null).on("click",null).remove()}));const n=s.enter().append("div").attr("aria-label",(t=>t.title)).style("display","block").style("padding",e.styles&&"padding"in e.styles?e.styles.padding:"5px").append("label");if(e.styles){for(const t in e.styles){n.style(t,e.styles[t])}}const i=n.append("input").attr("type","radio").attr("name",e.name).attr("value",(t=>t.value)).style("vertical-align","top").style("margin-top","2px").style("margin-right",0).property("checked",e.isCheckedFxn).on("mouseup",e.listeners.input).on("keyup",e.listeners.input);n.append("span").style("vertical-align","top").html((t=>" "+t.label)).on("mouseup",e.listeners.input).on("keyup",e.listeners.input);function l(t){return t.value==a.currValue}const a={main(t){a.currValue=t;i.property("checked",l)},dom:{divs:e.holder.selectAll("div"),labels:e.holder.selectAll("label").select("span"),inputs:n.selectAll("input")}};return a}let a=0;class o{constructor(t){this.type="controlsConfig";this.app=t.app;this.id=t.id;this.instanceNum=a++;r(this)}async init(){try{const t=this.app.dispatch;const e=this.setDom();const n=this.opts.debug;this.inputs={};const i={};for(const e of this.opts.inputs){if(typeof e=="object"){const s=e;if(s.type in w){this.inputs[s.settingsKey||s.configKey]=await w[s.type](Object.assign({},s,{holder:this.dom.table.append("tr"),dispatch:t,id:this.id,instanceNum:this.instanceNum,debug:this.opts.debug,parent:this}))}}else if(e in w){this.inputs[e]=await w[e]({holder:this.dom.table.append("tr"),dispatch:t,id:this.id,instanceNum:this.instanceNum,debug:this.opts.debug,parent:this})}else{throw`unsupported opts.inputs[] entry of '${e}' for controlsInit()`}}this.components=await s(i)}catch(t){throw t}}setDom(){this.dom={holder:this.opts.holder.style("max-width","50px").style("height",0).style("vertical-align","top").style("transition","0.2s ease-in-out").style("visibility","hidden").style("transition","0.2s")};this.dom.table=this.dom.holder.append("table").attr("cellpadding",0).attr("cellspacing",0);return this.dom.table}getState(t){const e=t.plots.find((t=>t.id===this.id));return{genome:t.genome,dslabel:t.dslabel,activeCohort:t.activeCohort,termfilter:t.termfilter,config:e,isOpen:this.opts.isOpen()}}main(){const t=this.state.config;const e=this.opts.isOpen();this.render(e);for(const e in this.inputs){const s=this.inputs[e];s.main(s.usestate?this.state:t)}}render(t){this.dom.holder.style("visibility",t?"visible":"hidden").style("max-width",t?"700px":"50px").style("height",t?"":0).style("resize",t?"both":"none");this.dom.table.selectAll("tr").filter(this.rowIsVisible).selectAll("td").style("border-top","2px solid #FFECDD").style("padding","5px 10px")}}const p=e(o);function r(t){t.rowIsVisible=function(){return this.style.display!="none"}}function d(t){const e={dom:{row:t.holder.style("display","table-row"),labelTd:t.holder.append("td").html(t.label).attr("class","sja-termdb-config-row-label").attr("aria-label",t.title),inputs:{}},values:{}};if(!t.inputs)t.inputs=[{min:t.min,max:t.max,step:t.step,width:t.width,settingsKey:t.settingsKey}];const s=t.debounceInterval||("debounceInterval"in t.parent?.app.opts?t.parent?.app.opts.debounceInterval:100);for(const i of t.inputs){let l;function a(t=false){if(l)clearTimeout(l);if(!t)l=setTimeout(o,s)}function o(){let s=Number(e.dom.inputs[i.settingsKey].property("value"));if(i.max&&i.max<s)s=i.max;if(i.min&&i.min>s)s=i.min;if(t.callback)t.callback(s);else{t.dispatch({type:"plot_edit",id:t.id,config:{settings:{[t.chartType]:{[i.settingsKey]:t.processInput?t.processInput(s):s}}}})}}const p=t.holder.append("td").style("text-align",t.align||"").attr("colspan",t.colspan||"");if(!i.settingsKey){p.style("color","#999").style("cursor","default").html(i.label)}else{e.dom.inputs[i.settingsKey]=p.append("input").attr("type","number").attr("min","min"in i?i.min:null).attr("max","max"in i?i.max:null).attr("step",i.step||t.step||null).style("width",(i.width||t.width||100)+"px").on("keyup",(s=>{const n=e.values[t.settingsKey]!==Number(e.dom.inputs[i.settingsKey].property("value"));a(s.key!=="Enter"&&n)})).on("change",(t=>{a(false)}))}}const n={main(s){const n=t.getDisplayStyle?.(s)||"table-row";t.holder.style("display",n);for(const n in e.dom.inputs){const i=s.settings[t.chartType][n];e.dom.inputs[n].property("value",i);e.values[n]=i}}};if(t.debug)n.Inner=e;return Object.freeze(n)}function c(t){const e={dom:{row:t.holder.style("display","table-row"),labelTd:t.holder.append("td").html(t.label).attr("class","sja-termdb-config-row-label").attr("aria-label",t.title).attr("overflow","visible"),inputTd:t.holder.append("td")}};const s={};e.dom.input=e.dom.inputTd.append("input").attr("type","text").style("width",(t.width||100)+"px").on("change",(()=>{const n=e.dom.input.property("value");const i=Number(n);if(isNaN(i))throw`non-numeric value for ${t.settingsKey}='${n}'`;s[i]=n;t.dispatch({type:"plot_edit",id:t.id,config:{settings:{[t.chartType]:{[t.settingsKey]:i}}}})}));const n={main(n){const i=n.settings[t.chartType][t.settingsKey];const l=typeof i=="number"?i:Number(i);if(typeof i!="number")s[l]=i;e.dom.input.property("value",i in s?s[l]:i)}};if(t.debug)n.Inner=e;return Object.freeze(n)}function u(t){const e={dom:{row:t.holder.style("display","table-row"),labelTd:t.holder.append("td").html(t.label).attr("class","sja-termdb-config-row-label").attr("aria-label",t.title),inputTd:t.holder.append("td")}};e.dom.input=e.dom.inputTd.append("input").attr("type","text").attr("placeholder",t.placeholder).style("width",(t.width||100)+"px").on("change",(()=>{const s=e.dom.input.property("value");t.dispatch({type:"plot_edit",id:t.id,config:{settings:{[t.chartType]:{[t.settingsKey]:t.processInput?t.processInput(s):s}}}})}));const s={main(s){e.dom.input.property("value",s.settings[t.chartType][t.settingsKey])}};if(t.debug)s.Inner=e;return Object.freeze(s)}function y(t){const e={dom:{row:t.holder.style("display","table-row"),labelTd:t.holder.append("td").attr("aria-label",t.title).html(t.label).attr("class","sja-termdb-config-row-label"),inputTd:t.holder.append("td").attr("colspan",t.colspan||"").style("text-align",t.align||"")}};e.dom.input=e.dom.inputTd.append("input").attr("type","color").on("change",(()=>{const s=e.dom.input.property("value");t.dispatch({type:"plot_edit",id:t.id,config:{settings:{[t.chartType]:{[t.settingsKey]:t.processInput?t.processInput(s):s}}}})}));const s={main(s){const i=s.settings[t.chartType][t.settingsKey];e.dom.input.property("value",n(i).formatHex());t.holder.style("display",t.getDisplayStyle?.(s)||"table-row")}};if(t.debug)s.Inner=e;return Object.freeze(s)}function h(t){const e={dom:{row:t.holder,labelTdb:t.holder.append("td").html(t.label).attr("aria-label",t.title).attr("class","sja-termdb-config-row-label")},inputs:{}};const s=t.inputs?t.inputs:[{settingsKey:t.settingsKey,options:t.options}];if(!("instanceNum"in t))t.instanceNum=`sjpp-${Math.random().toString().slice(-7)}-${Date.now()}`;const n=t.styles||{};for(const i of s){e.inputs[i.settingsKey]=l({name:`pp-control-${i.settingsKey}-${t.instanceNum}`,holder:t.holder.append("td").attr("colspan",t.colspan||"").style("text-align",t.align||""),options:i.options,getDisplayStyle:()=>"block",styles:n,listeners:{input(e,s){if(e.key&&e.key!=="Enter")return;if(t.callback){t.callback(s.value)}else{t.dispatch({type:"plot_edit",id:t.id,config:{settings:{[t.chartType]:{[i.settingsKey]:s.value}}}})}}}})}const i={main(s){const n=t.getDisplayStyle?.(s)||"table-row";e.dom.row.style("display",n);if(n=="none")return;for(const n in e.inputs){const i=e.inputs[n];i.main(s.settings[t.chartType][n]);i.dom.divs.style("display",(e=>e.getDisplayStyle?e.getDisplayStyle(s):t.labelDisplay||"inline-block"));if(t.setRadioLabel)i.dom.labels.html(t.setRadioLabel)}}};if(t.debug)i.Inner=e;return Object.freeze(i)}function m(t){const e={dom:{row:t.holder.style("display","table-row"),labelTd:t.holder.append("td").html(t.label).attr("class","sja-termdb-config-row-label"),inputTd:t.holder.append("td")}};e.dom.select=e.dom.inputTd.append("select").property("disabled",t.disabled).on("change",(()=>{const s=e.dom.select.property("value");if(t.callback)t.callback(s);else t.dispatch({type:"plot_edit",id:t.id,config:{settings:{[t.chartType]:{[t.settingsKey]:s}}}})}));e.dom.select.style("max-width","300px");e.dom.select.selectAll("option").data(t.options).enter().append("option").property("disabled",(t=>t.disabled)).attr("value",(t=>t.value)).attr("selected",(t=>t.selected)).html((t=>" "+t.label+" "));const s={main(s){t.holder.style("display",t.getDisplayStyle?.(s)||"table-row");e.dom.select.property("value",s.settings[t.chartType][t.settingsKey])}};if(t.debug)s.Inner=e;return Object.freeze(s)}function b(t){const e={dom:{row:t.holder.style("display","table-row"),labelTdb:t.holder.append("td").attr("aria-label",t.title).html(t.label).attr("class","sja-termdb-config-row-label"),inputTd:t.holder.append("td").attr("colspan",t.colspan||"").style("text-align",t.align||"")}};const s=e.dom.inputTd.append("label");e.dom.input=s.append("input").attr("type","checkbox").on("change",(()=>{const s=e.dom.input.property("checked");if(t.callback)t.callback(s);t.dispatch({type:"plot_edit",id:t.id,config:{settings:{[t.chartType]:{[t.settingsKey]:t.processInput?t.processInput(s):s}}}})}));s.append("span").html(" "+t.boxLabel);const n={main(s){const n=s.settings[t.chartType][t.settingsKey];e.dom.input.property("checked",t.processInput?t.processInput(n):n);t.holder.style("display",t.getDisplayStyle?.(s)||"table-row")}};if(t.debug)n.Inner=e;return Object.freeze(n)}function g(e){const s={dom:{row:e.holder.style("display","table-row"),labelTdb:e.holder.append("td").attr("aria-label",e.title).html(e.label).attr("class","sja-termdb-config-row-label"),inputTd:e.holder.append("td").attr("colspan",e.colspan||"").style("padding","5px").style("text-align",e.align||"")}};s.dom.labels=s.dom.inputTd.selectAll("label").data(e.options).enter().append("label").style("margin-right","8px").each((function(n){const i=t(this);s.dom.input=i.append("input").attr("type","checkbox").attr("value",(t=>t.value)).on("change",(()=>{const t=[];s.dom.labels.selectAll("input").each((function(e){if(this.checked)t.push(e.value)}));e.dispatch({type:"plot_edit",id:e.id,config:{settings:{[e.chartType]:{[e.settingsKey]:t}}}})}));i.append("span").html(n.label)}));s.dom.inputs=s.dom.labels.selectAll("input");const n={main(t){const n=t.settings[e.chartType][e.settingsKey];s.dom.inputs.property("checked",(t=>n.includes(t.value)));s.dom.labels.style("display",(e=>e.getDisplayStyle?.(t)||""));e.holder.style("display",e.getDisplayStyle?.(t)||"table-row")}};if(e.debug)n.Inner=s;return Object.freeze(n)}function f(t){const e={dom:{row:t.holder.style("display","table-row"),labelTd:t.holder.append("td").html(t.label).attr("class","sja-termdb-config-row-label").attr("aria-label",t.title).style("vertical-align","top"),inputTd:t.holder.append("td")}};e.api=t.init(e);if(t.debug)e.api.Inner=e;return Object.freeze(e.api)}async function v(t){const e={dom:{row:t.holder.style("display","table-row"),labelTd:t.holder.append("td").html(t.label).attr("class","sja-termdb-config-row-label").attr("aria-label",t.title),inputTd:t.holder.append("td")}};const s=await i({menuOptions:t.menuOptions||"*",numericEditMenuVersion:t.numericEditMenuVersion||["continuous","discrete"],vocabApi:t.vocabApi,vocab:t.state?.vocab,activeCohort:t.state?.activeCohort,holder:e.dom.inputTd.append("div"),debug:t.debug,usecase:t.usecase,getBodyParams:t.getBodyParams,defaultQ4fillTW:t.defaultQ4fillTW,callback:async e=>{if(t.parent.dom.loadingDiv&&t.parent.dom.svg){t.parent.dom.loadingDiv.selectAll("*").remove();t.parent.dom.loadingDiv.html("").style("display","").style("position","relative").style("left","45%");t.parent.dom.loadingDiv.html("Processing data ...");t.parent.dom.svg.style("opacity",.1).style("pointer-events","none")}if(e&&!e.q)throw"data.q{} missing from pill callback";if(t.processInput)await t.processInput(e);await s.main(e?e:{term:null,q:null});const n={[t.configKey]:e};if(t.processConfig)t.processConfig(n);t.dispatch({type:"plot_edit",id:t.id,config:n})}});const n={usestate:true,main(n){const i=t.getDisplayStyle?.(n)||"table-row";t.holder.style("display",i);const{config:l,activeCohort:a,termfilter:o}=JSON.parse(JSON.stringify(n));const p=n[t.configKey]||l&&l[t.configKey]||{};const r={term:p.term||null,q:p.q,activeCohort:a,filter:o&&o.filter};if("$id"in p)r.$id=p.$id;s.main(r);e.dom.labelTd.datum(p).html(t.label)}};if(t.debug)n.Inner=e;return Object.freeze(n)}const w={number:d,math:c,text:u,color:y,radio:h,dropdown:m,checkbox:b,multiCheckbox:g,custom:f,term:v};export{p as configUiInit,w as initByInput};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as e}from"./tslib.es6-c3c2d88f.js";import{M as t}from"./app-2cd97738.js";import{a}from"./genesearch-41cb55ce.js";import{T as s}from"./termsetting-ad8c4f3a.js";import"path";class c{init(e){this.callback=e.callback;this.app=e.app;const s=a({tip:new t({padding:"0px"}),genome:e.genomeObj,row:e.holder,searchOnly:"gene",callback:()=>this.selectGene(s.geneSymbol)})}selectGene(t){return e(this,void 0,void 0,(function*(){if(!t)throw new Error("No gene selected");this.callback({gene:t,type:s.GENE_EXPRESSION,name:t})}))}}export{c as SearchHandler};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{P as e}from"./app-2cd97738.js";import{getPlotConfig as t}from"./matrix.config-3ef822b9.js";import{T as r,f as s}from"./termsetting-ad8c4f3a.js";import"./matrix.sort-9440c86a.js";import"./tslib.es6-c3c2d88f.js";import"path";async function a(a={},i){a.chartType="hierCluster";const o=await t(a,i);delete o.genes;o.settings.hierCluster={dataType:o.dataType,clusterSamples:true,clusterMethod:"average",distanceMethod:"euclidean",zScoreCap:5,xDendrogramHeight:100,yDendrogramHeight:200,colorScale:"blueWhiteRed"};const n=i.vocabApi.termdbConfig.hierCluster||{};e(o.settings.hierCluster,n.settings,a.settings?.hierCluster||{});{const e=o.settings.hierCluster.colorScale;if(!e)throw"colorScale missing"}o.settings.matrix.collabelpos="top";const p=o.settings.hierCluster.termGroupName;const m=o.termgroups.find((e=>e.type=="hierCluster"||e.name==p))||{name:p};m.type="hierCluster";if(!m.lst?.length){if(!Array.isArray(a.terms))throw"opts.terms[] not array (may show geneset edit ui)";const e=[];for(const t of a.terms){const a=t.term?t:{term:t};if(!a.term.type){if(o.dataType==r.GENE_EXPRESSION||o.dataType==r.METABOLITE_INTENSITY){a.term.type=o.dataType}else{throw`term type missing and cannot be assigned by dataType`}}else if(!["geneExpression","metaboliteIntensity","float"].includes(a.term.type)){throw"term type not supported in hierCluster"}else if(o.dataType&&a.term.type!==o.dataType){throw`cannot have term type ${a.term.type} in ${o.dataType} term group`}e.push(s(a,i.vocabApi))}m.lst=await Promise.all(e);if(o.termgroups.indexOf(m)==-1)o.termgroups.unshift(m)}o.settings.matrix.maxSample=1e5;return o}export{a as getPlotConfig};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as t}from"./tslib.es6-c3c2d88f.js";import{appInit as e}from"./plot.app-d6fe76e2.js";import{ai as o,z as s}from"./app-2cd97738.js";import"./recover-74f2e965.js";import"./termsetting-ad8c4f3a.js";import"path";import"./FilterRxComp-0f35b322.js";import"./table-f50a9344.js";import"./partjson.esm-b3f1fc21.js";import"./termdb.bins-01e8cce6.js";import"./FilterStateless-b1c6ee04.js";import"./app-686b9547.js";import"./termInfo-d0a9e65f.js";import"./toggleButtons-04c5ad7c.js";import"./genesearch-41cb55ce.js";import"./checkbox-96437f4d.js";import"./rehydrateFilter-12d118cb.js";function n(s,n,i){return t(this,void 0,void 0,(function*(){const[t,c]=yield r(s);if(c===null||c===void 0?void 0:c.length){return o(c,i)}const p={holder:i,vocabApi:{vocab:{terms:[]},main:()=>{},getTermdbConfig:()=>({})},state:{args:{data:t,genome:n},plots:[{chartType:"Disco",subfolder:"disco",extension:"ts"}]}};const u=yield e(p);return u}))}function r(e){return t(this,void 0,void 0,(function*(){if(Array.isArray(e.mlst)){return[e.mlst,null]}const t=[];const o=[];if(e.snvText)i(e.snvText,t,o);if(e.svText)c(e.svText,t,o);if(e.cnvText)p(e.cnvText,t,o);return[t,o]}))}function i(t,e,o){for(const s of t.trim().split("\n")){const t=s.trim().split("\t");if(t.length!=5){o.push("snv input not equal to 5 columns");continue}let n;try{n={dt:1,chr:t[0],position:Number(t[1]),gene:t[2],mname:t[3],class:u(t[4],o)}}catch(t){o.push(t);continue}e.push(n)}}function c(t,e,o){for(const s of t.trim().split("\n")){const t=s.trim().split("\t");if(t.length<4||t.length>6){o.push("sv input not equal to 4 or 6 columns");continue}let n;try{const e=t.length;if(e==4){n={dt:2,chrA:t[0],posA:Number(t[1]),chrB:t[2],posB:Number(t[3])}}else{n={dt:2,chrA:t[0],posA:Number(t[1]),geneA:t[2],chrB:t[3],posB:Number(t[4]),geneB:t[5]}}}catch(t){o.push(t);continue}e.push(n)}}function p(t,e,o){for(const s of t.trim().split("\n")){const t=s.trim().split("\t");if(t.length!=4){o.push("cnv input not equal to 4 columns");continue}let n;try{n={dt:4,chr:t[0],start:Number(t[1]),stop:Number(t[2]),value:Number(t[3])}}catch(t){o.push(t);continue}e.push(n)}}function u(t,e){const o=t.toLowerCase();const n=Object.values(s).find((t=>t.key.toLowerCase()===o||t.label.toLowerCase()===o));if(n){return n.key}else{e.push(`Invalid mutation class: ${t}`)}}export{n as launch};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{initByInput as t}from"./controls.config-81cd5749.js";import{d as e,M as a,U as s,ak as n,B as i,z as o,ap as l,at as r,as as p,L as c}from"./app-2cd97738.js";import{getSorterUi as d}from"./matrix.sorterUi-2c5eb35f.js";import{i as m,f as h,T as u,g}from"./termsetting-ad8c4f3a.js";import{m as y}from"./radiobutton-09bff425.js";import{m as b}from"./checkbox-96437f4d.js";import{G as f}from"./recover-74f2e965.js";import"./tslib.es6-c3c2d88f.js";import"path";import"./FilterRxComp-0f35b322.js";import"./table-f50a9344.js";import"./partjson.esm-b3f1fc21.js";import"./termdb.bins-01e8cce6.js";import"./FilterStateless-b1c6ee04.js";import"./app-686b9547.js";import"./termInfo-d0a9e65f.js";import"./toggleButtons-04c5ad7c.js";import"./genesearch-41cb55ce.js";import"./rehydrateFilter-12d118cb.js";function x(t){if(!t.holder)throw`zoom requires an opts.holder`;if(typeof t.callback!="function")throw`zoom requires an opts.callback function`;const e={min:1,max:100,value:25,step:10,increment:1,numberInputWidth:"35px",showJumpBtns:false};const a=Object.assign({},e,t.settings||{});t.holder.attr("title",t.title||null).style("vertical-align","top").style("text-align","center").on("mouseenter",(()=>{o.style("display","inline-block").style("overflow","visible")})).on("mouseleave",(()=>{o.style("display","none").style("overflow","hidden")}));const s=t.holder.append("label");s.append("span").text("Zoom");const n=s.append("input").attr("title","Enter a desired zoom level").attr("type","number").attr("min",a.min).attr("max",a.max).attr("step",a.increment).style("min-width",a.numberInputWidth).style("width",t.width||"fit-content").style("margin","3px 5px").property("value",a.value).on("change",(e=>{const a=Number(e.target.value);c.update({value:a});t.callback(a)}));s.append("span").text("unit"in t?t.unit:"%");const i=t.holder.node().getBoundingClientRect();t.holder.style("max-height",i.height+"px").style("max-width",i.width+"px");t.holder.append("br");const o=t.holder.append("div").style("display","none");const l=!t.showJumpBtns?null:t.holder.append("button").attr("title","Zoom in").style("width","25px").html("-").on("click",(()=>{const e=Math.max(a.step*Math.ceil((a.value-a.step)/a.step),a.min);c.update({value:e});t.callback(e)}));const r=o.append("input").attr("title","Slide to desired zoom level").attr("type","range").attr("min",a.min).attr("max",a.max).attr("step",a.increment).style("margin","2px 5px").style("padding",0).style("vertical-align","middle").property("value",a.value).html("-").on("input",(t=>{n.property("value",t.target.value)})).on("change",(e=>{const a=Number(e.target.value);c.update({value:a});t.callback(a)}));const p=!t.showJumpBtns?null:t.holder.append("button").attr("title","Zoom out").style("width","25px").html("+").on("click",(()=>{const e=Math.min(a.step*Math.floor((a.value+a.step)/a.step),a.max);c.update({value:e});t.callback(e)}));o.append("span").style("text-decoration","underline").style("cursor","pointer").style("title","use the default zoom value").text("Reset").on("click",t.reset);const c={update(e={}){const s=t.holder.node().getBoundingClientRect();if(!s.height||!s.width){t.holder.style("max-height","").style("max-width","");const e=t.holder.node().getBoundingClientRect();t.holder.style("max-height",e.height+"px").style("max-width",e.width+"px")}Object.assign(a,e);r.property("value",a.value).attr("min",a.min).attr("max",a.max).attr("step",a.increment);n.property("value",a.value).attr("min",a.min).attr("max",a.max).attr("step",a.increment);l?.property("disabled",a.value<=a.min);p?.property("disabled",a.value>=a.max)}};if(t.debug)c.Inner={settings:a,number:n,slider:r,minusBtn:l,plusBtn:p};return c}function v(t){if(!t.holder)throw`missing svgScroll.opts.holder argument`;const a={height:12,zoomLevel:1,opacity:.3};const s=Object.assign({},a,t);function n(t){g.x=t.clientX;e("body").on("mousemove.sjppSvgScroll",i).on("mouseup.sjppSvgScroll",o)}function i(t){if(!("x"in g))return;const e=t.clientX-g.x;if(g.sliderX+g.sliderWidth+e>s.visibleWidth-1){return}if(g.sliderX+e<0){return}h.attr("x",g.sliderX+e);s.callback(g.dxFactor*e,"move")}function o(t){if(!("x"in g))return;const a=t.clientX-g.x;s.callback(g.dxFactor*Math.min(g.maxDx,Math.max(a,g.minDx)),"up");delete g.x;e("body").on("mousemove.sjppSvgScroll",null).on("mouseup.sjppSvgScroll",null)}function l(t){g.x=t.clientX;const e=t.clientX<u.getBoundingClientRect().x?-1:1;o({clientX:Math.floor(g.x+e*g.arrowDx)})}s.holder.attr("display","none").attr("opacity",s.opacity).on("mouseover",(()=>s.holder.attr("opacity",1))).on("mouseout",(()=>s.holder.attr("opacity",s.opacity)));const r=s.holder.append("rect").style("height",s.height).style("stroke","none").style("fill","#fff").on("click",l);const p=s.holder.append("line").style("stroke","#ccc").style("stroke-width",1).on("click",l);const c=s.holder.append("path").attr("y",-s.height).attr("d",`M0,${s.height/2}L${s.height},0L${s.height},${s.height}Z`).style("stroke","#ccc").style("stroke-width",1).style("fill","#ccc").on("click",(t=>{g.x=t.clientX;o({clientX:Math.round(g.x-g.arrowDx)})}));const d=s.holder.append("path").attr("y",-s.height).style("stroke","#ccc").style("stroke-width",1).style("fill","#ccc").attr("d",`M0,0L${s.height},${s.height/2}L0,${s.height}Z`).on("click",(t=>{g.x=t.clientX;o({clientX:Math.round(g.x+g.arrowDx)})}));const m=s.height-4;const h=s.holder.append("rect").attr("y",2).attr("height",m).attr("stroke","#aaa").attr("stroke-width",1).attr("fill","#ccc").attr("rx",m/2).on("mousedown",n).on("mousemove",i).on("mouseup",o);const u=h.node();const g={};const y={update(t){const e={v:s.visibleWidth,t:s.totalWidth,z:s.zoomCenter};Object.assign(s,t);const a=s.totalWidth;const n=s.visibleWidth;if(a<=n){s.holder.attr("display","none");return}s.holder.attr("transform",`translate(${s.x},${s.y})`).attr("display","");r.attr("width",n);p.attr("x1",0).attr("x2",n).attr("y1",s.height/2).attr("y2",s.height/2);c.attr("transform",`translate(0,0)`);d.attr("transform",`translate(${n-s.height},0)`);if(n!=e.v||a!=e.t){g.sliderWidth=n*n/a;g.dxFactor=(a-n)/(n-g.sliderWidth)}const i=n*(s.zoomCenter/a);g.sliderX=Math.max(0,Math.min(i-g.sliderWidth/2,n-g.sliderWidth-1));h.attr("width",g.sliderWidth).attr("x",g.sliderX);g.maxDx=s.visibleWidth-g.sliderX-g.sliderWidth;g.minDx=-g.sliderX;g.arrowDx=Math.round(.1*s.visibleWidth);delete g.x}};return y}const w=new a({padding:""});class C{constructor(t,e){this.type="matrixControls";this.opts=t;this.parent=t.parent;this.overrides={};this.opts.holder.style("margin","10px 10px 20px 10px").style("white-space","nowrap");const a=this.parent.getState(e);const s=a.config.settings.matrix;if(this.parent.setClusteringBtn)this.parent.setClusteringBtn(this.opts.holder,((t,e)=>this.callback(t,e)));this.setSamplesBtn(s);this.setGenesBtn(s);if(s.addMutationCNVButtons&&this.parent.chartType!=="hierCluster"){this.setMutationBtn();this.setCNVBtn()}this.setVariablesBtn(s);this.setDimensionsBtn(s);this.setLegendBtn(s);this.setDownloadBtn(s);this.setZoomInput();this.setDragToggle({holder:this.opts.holder.append("div").style("display","inline-block"),target:this.parent.dom.seriesesG});this.setSvgScroll(a);this.keyboardNavHandler=async t=>{if(t.target.tagName=="BUTTON")this.keyEventTarget=t.target;if(t.key=="Escape"){this.parent.app.tip.hide()}else if(t.key=="Enter"||t.key=="ArrowDown"){const e=t.target.tagName=="BUTTON"?this.parent.app.tip.d.node().querySelectorAll("input, select"):t.target.querySelectorAll("input, select");for(const t of e){if(t.checkVisibility?.()||!t.checkVisibility&&t.getBoundingClientRect().height){t.focus();return false}}}else if(t.key=="Tab"&&t.shiftKey||t.key=="Backspace"||t.key=="ArrowUp"){this.keyEventTarget.focus();return false}};this.btns=this.opts.holder.selectAll(":scope>button").filter((t=>t&&t.label)).on(`keyup.matrix-${this.parent.id}`,this.keyboardNavHandler)}setSamplesBtn(t){const e=t.controlLabels;const a=this;const s=this.parent;const n=[{label:`Maximum # ${e.Samples}`,title:`Limit the number of displayed ${e.samples}`,type:"number",chartType:"matrix",settingsKey:"maxSample",getDisplayStyle(t){return t.chartType=="hierCluster"?"none":"table-row"}},{label:`Sort ${e.Sample} Groups`,title:`Set how to sort ${e.sample} groups`,type:"radio",chartType:"matrix",settingsKey:"sortSampleGrpsBy",options:[{label:"Predefined or Group Name",value:"name",title:`Sort by group name`},{label:`${e.Sample} Count`,value:"sampleCount",title:`Sort by the number of samples in the group`},{label:`Hits`,value:"hits",title:`Sort by the total number of variants for every ${e.sample} in the group`}],getDisplayStyle(t){return t.divideBy&&!t.hierCluster?"table-row":"none"}},{label:`${e.Sample} Group Label Character Limit`,title:`Truncate the ${e.sample} group label if it exceeds this maximum number of characters`,type:"number",chartType:"matrix",settingsKey:"sampleGrpLabelMaxChars",getDisplayStyle(t){return t.divideBy&&!t.hierCluster?"table-row":"none"}},{label:`${e.Sample} Label Character Limit`,title:`Truncate the ${e.sample} label if it exceeds this maximum number of characters`,type:"number",chartType:"matrix",settingsKey:"collabelmaxchars"},{label:`Group ${e.Samples} By`,title:`Select a variable with discrete values to group ${e.samples}`,type:"term",chartType:"matrix",configKey:"divideBy",vocabApi:this.opts.app.vocabApi,state:{vocab:this.opts.vocab},processInput:async t=>{if(t?.term&&m(t.term)){t.q={...t.q,mode:"discrete"}}if(t)await h(t,this.opts.app.vocabApi);return t},processConfig:t=>{if(this.parent.chartType=="hierCluster"&&t["divideBy"]){t.settings={hierCluster:{yDendrogramHeight:0,clusterSamples:false}}}if(this.parent.config.divideBy)t.legendValueFilter=this.parent.mayRemoveTvsEntry(this.parent.config.divideBy)},getBodyParams:()=>{const t=this.parent.termOrder.filter((t=>t.tw.term.type==="geneVariant")).map((t=>t.tw.term.chr?`${t.tw.term.chr}:${t.tw.term.start}-${t.tw.term.stop}`:t.tw.term.gene||t.tw.term.name));return{currentGeneNames:t}}}];n.push({label:`Sort ${e.Sample} Priority`,title:`Set how to sort ${e.samples}`,type:"custom",init(t){const e=s.config.settings.matrix;if(!a.activeTab)a.activeTab="basic";t.dom.inputTd.style("padding","5px");const n=t.dom.inputTd.append("div").style("margin-bottom","5px");const i=n.append("div").style("display","inline-block").style("padding-right","5px").style("border-right","2px solid black").style("text-decoration",a.activeTab=="basic"?"underline":"").style("cursor","pointer").html("Basic").on("click",(()=>{a.activeTab="basic";i.style("text-decoration","underline");o.style("text-decoration","");l.style("display","");h.style("display","none")}));const o=n.append("div").style("display","inline-block").style("margin-left","5px").style("text-decoration",a.activeTab=="advanced"?"underline":"").style("cursor","pointer").html("Advanced").on("click",(()=>{a.activeTab="advanced";i.style("text-decoration","");o.style("text-decoration","underline");l.style("display","none");h.style("display","")}));const l=t.dom.inputTd.append("div").style("display",a.activeTab=="basic"?"":"none");const r=l.append("div");r.append("span").html("SSM");const{inputs:p}=y({holder:r.append("span"),options:[{label:"by consequence",value:"consequence",checked:e.sortByMutation==="consequence"},{label:"by presence",value:"presence",checked:e.sortByMutation==="presence"}],styles:{display:"inline-block"},callback:t=>{const e=s.config.settings.matrix.sortOptions;const a=e.a;const n=a.sortPriority[0].tiebreakers[1];n.disabled=!t;n.isOrdered=t==="consequence";s.app.dispatch({type:"plot_edit",id:s.id,config:{settings:{matrix:{sortByMutation:t,sortOptions:e}}}})}});p.style("margin","2px 0 0 2px").style("vertical-align","top");const c=l.append("div").style("display",e.showMatrixCNV!="none"&&!e.allMatrixCNVHidden?"block":"none");c.append("span").html("CNV");const m=b({holder:c.append("span"),divstyle:{display:"inline-block"},checked:e.sortByCNV,labeltext:"sort by CNV",callback:()=>{const t=m.property("checked");const e=s.config.settings.matrix.sortOptions;const a=e.a;const n=a.sortPriority[0].tiebreakers[2];n.disabled=!t;n.isOrdered=t;s.app.dispatch({type:"plot_edit",id:s.id,config:{settings:{matrix:{sortByCNV:t,sortOptions:e}}}})}});const h=t.dom.inputTd.append("div").style("display",a.activeTab=="advanced"?"":"none");t.dom.row.on("mouseover",(function(){this.style.backgroundColor="#fff";this.style.textShadow="none"}));if(!a.sorterUi){a.sorterUi=d({controls:this,holder:h,tip:this.parent.app.tip})}else{a.sorterUi.main(this.parent.config.settings.matrix,{holder:h})}return{main:t=>{const e=t.settings.matrix;p.property("checked",(t=>t.value==e.sortByMutation));m.property("checked",e.sortByCNV);c.style("display",e.showMatrixCNV!="none"&&!e.allMatrixCNVHidden?"block":"none")}}}});this.opts.holder.append("button").datum({label:e.Samples||`Samples`,getCount:()=>"sampleCount"in this.overrides?this.overrides.sampleCount:this.parent.sampleOrder?.length||0,rows:n,customInputs:this.updateSamplesControls}).html((t=>t.label)).style("margin","2px 0").on("click",((t,e)=>this.callback(t,e)))}setGenesBtn(t){const e=t.controlLabels;const a=[{label:` Stacked <span style="font-size:.7em;color:#858585;">Show stacked rectangles in the same matrix cell to render variants for the same ${e.sample} and gene</span>`,value:"",title:`Show stacked rectangles in the same matrix cell to render variants for the same ${e.sample} and gene`},{label:` OncoPrint <span style="font-size:.7em;color:#858585;">Show overlapping rectangles in the same matrix cell to render variants for the same ${e.sample} and gene</span>`,value:"oncoprint",title:`Show overlapping rectangles in the same matrix cell to render variants for the same ${e.sample} and gene`}];if(t.addMutationCNVButtons&&this.parent.chartType!=="hierCluster")a.unshift({label:` Single <span style="font-size:.7em;color:#858585;">Show a single rectangle in a matrix cell to render the most severe variant (truncating > indels > missense > synonymous) for the same ${e.sample} and gene</span>`,value:"single",title:`Show a single rectangle in a matrix cell to render the most severe variant (truncating > indels > missense > synonymous) for the same ${e.sample} and gene`});this.opts.holder.append("button").datum({label:"Genes",getCount:()=>this.parent.termOrder?.filter((t=>t.tw.term.type=="geneVariant"||t.tw.term.type==u.GENE_EXPRESSION)).length||0,customInputs:this.appendGeneInputs,rows:[{label:`Display ${e.Sample} Counts for Gene`,title:`Include the ${e.sample} count in the gene label`,type:"radio",chartType:"matrix",settingsKey:"samplecount4gene",options:[{label:"Absolute",value:"abs"},{label:`Percent`,value:"pct"},{label:`None`,value:""}]},{label:"Genomic Alterations Rendering",title:`Set how to indicate a ${e.sample}'s applicable variant types in the same matrix cell`,type:"radio",chartType:"matrix",settingsKey:"cellEncoding",options:a,styles:{padding:"5px 0px",margin:0},labelDisplay:"block",callback:this.parent.geneStyleControlCallback},{label:"Sort Genes",title:"Set how to order the genes as rows",type:"radio",chartType:"matrix",settingsKey:"sortTermsBy",options:[{label:"By Input Data Order",value:"asListed"},{label:`By ${e.sample} Count`,value:"sampleCount"}],styles:{padding:0,"padding-right":"10px",margin:0}}]}).html((t=>t.label)).style("margin","2px 0").on("click",((t,e)=>this.callback(t,e)))}setVariablesBtn(t){t.controlLabels;this.opts.holder.append("button").datum({label:t.controlLabels.Terms||`Variables`,rows:[{label:`Row Group Label Max Length`,title:`Truncate the row group label if it exceeds this maximum number of characters`,type:"number",chartType:"matrix",settingsKey:"termGrpLabelMaxChars"},{label:`Row Label Max Length`,title:`Truncate the row label if it exceeds this maximum number of characters`,type:"number",chartType:"matrix",settingsKey:"rowlabelmaxchars"}],customInputs:this.appendDictInputs}).html((t=>t.label)).style("margin","2px 0").on("click",((t,e)=>this.callback(t,e)))}setDimensionsBtn(t){const e=t.controlLabels;this.opts.holder.append("button").datum({label:"Cell Layout",tables:[{rows:[{label:"Grid",title:"Show grid lines, which creates borders around each matrix cells. "+" Note that grid lines are hidden when the auto-computed width <= 2, or when either the column and row spacing is set to 0.",type:"checkbox",boxLabel:"show",processInput:t=>t===true?"rect":t==="rect",chartType:"matrix",settingsKey:"showGrid",colspan:2,align:"center"},{label:"Outline Color",title:"Set a border color for the whole matrix",type:"color",chartType:"matrix",settingsKey:"outlineStroke",colspan:2,align:"center"},{label:"Beam Color",title:"Set a color for the beam highlighter",type:"color",chartType:"matrix",settingsKey:"beamStroke",colspan:2,align:"center"},{label:"Grid Line Color",title:"Set the grid color, equivalent to applying the same border color for each matrix cell",type:"color",chartType:"matrix",settingsKey:"gridStroke",colspan:2,align:"center"},{label:"Background Color",title:`Set the background color when there are no alterations or annotation data for a ${e.sample}`,type:"color",chartType:"matrix",settingsKey:"cellbg",colspan:2,align:"center"},{label:`Use Canvas If # ${e.sample} Exceeds`,title:`Switch from SVG to canvas rendering when the number of ${e.samples} exceeds this number`,type:"number",chartType:"matrix",settingsKey:"svgCanvasSwitch",colspan:2,align:"center",width:60,min:0,max:1e4,step:1},{label:"Canvas Min. Pixel Width",title:"Set a minimum pixel width for a matrix cell when using canvas, may affect the perceived sharpness of the canvas image",type:"checkbox",boxLabel:"apply",chartType:"matrix",settingsKey:"useMinPixelWidth",colspan:2,align:"center",getDisplayStyle:()=>this.parent.settings.matrix.useCanvas?"":"none"}]},{header:["Cells","Columns","Rows"],rows:[{label:"Row Height",title:"Set the height of a matrix row",type:"number",width:50,align:"center",chartType:"matrix",inputs:[{label:"N/A"},{settingsKey:"rowh",min:8,max:30,step:1}],getDisplayStyle(t){return t.chartType=="hierCluster"?"none":"table-row"}},{label:"Min Col. Width",title:"Set the minimum width of the auto-computed matrix column width",type:"number",width:50,align:"center",chartType:"matrix",inputs:[{settingsKey:"colwMin",min:.1,max:16,step:.2},{label:"N/A"}]},{label:"Max Col. Width",title:"Set the maximum width of the auto-computed matrix column width",type:"number",width:50,align:"center",chartType:"matrix",inputs:[{settingsKey:"colwMax",min:1,max:24,step:.2},{label:"N/A"}]},{label:"Spacing",title:"Set the column spacing. Note that this will be set to 0 when the auto-computed width < 2.",type:"number",width:50,align:"center",chartType:"matrix",inputs:[{settingsKey:"colspace",min:0,max:20,step:1},{settingsKey:"rowspace",min:0,max:20,step:1}],getDisplayStyle(t){return t.chartType=="hierCluster"?"none":"table-row"}},{label:"Group spacing",title:"Set the spacing between column and row groups.",type:"number",width:50,align:"center",chartType:"matrix",inputs:[this.parent.chartType=="hierCluster"?{label:"N/A"}:{settingsKey:"colgspace",min:0,max:20,step:1},{settingsKey:"rowgspace",min:0,max:20,step:1}]}]},{header:["Labels","Columns","Rows"],rows:[{label:"Offset",title:"Set the gap between the label text and matrix edge",type:"number",width:50,align:"center",chartType:"matrix",inputs:[{settingsKey:"collabelgap",min:0,max:20,step:1},{settingsKey:"rowlabelgap",min:0,max:20,step:1}]},{label:"Spacing",title:"Set the gap between labels",type:"number",width:50,align:"center",chartType:"matrix",inputs:[{settingsKey:"collabelpad",min:0,max:20,step:1},{settingsKey:"rowlabelpad",min:0,max:20,step:1}]},{label:"Min font size",title:"Set the minimum auto-computed font size for labels. Note that labels will be hidden if the auto-computed values falls below this minimum.",type:"number",width:50,align:"center",colspan:2,chartType:"matrix",settingsKey:"minLabelFontSize",min:0,max:24,step:.1},{label:"Max font size",title:"Set the maximum auto-computed font size for labels",type:"number",width:50,align:"center",colspan:2,chartType:"matrix",settingsKey:"maxLabelFontSize",min:0,max:24,step:.1},{label:"Group label<br/>position",title:"Set which side of the matrix to display group labels",type:"radio",width:50,chartType:"matrix",labelDisplay:"block",getDisplayStyle(t){return t.chartType=="hierCluster"?"none":"table-row"},inputs:[{settingsKey:"collabelpos",options:[{label:"Top",value:"bottom",title:`Display ${e.sample} group labels at the bottom`},{label:"Bottom",value:"top",title:`Display ${e.sample} group labels on top`}]},{settingsKey:"rowlabelpos",options:[{label:"Left",value:"right",title:`Display gene or variable group labels on the left side`},{label:"Right",value:"left",title:`Display gene or variable group labels on the right side`}]}]}]}]}).html((t=>t.label)).style("margin","2px 0").on("click",((t,e)=>this.callback(t,e)))}setLegendBtn(t){this.opts.holder.append("button").style("margin","2px 0").datum({label:"Legend Layout",rows:[{label:"Font Size",title:"Set the font size for the legend text",type:"number",chartType:"legend",settingsKey:"fontsize"},{label:"Line Height",title:"Set the line height for a legend group",type:"number",chartType:"legend",settingsKey:"lineh"},{label:"Icon Height",title:"Set the icon height for a legend item",type:"number",chartType:"legend",settingsKey:"iconh"},{label:"Icon Width",title:"Set the icon width for a legend item",type:"number",chartType:"legend",settingsKey:"iconw"},{label:"Item Left Pad",title:"Set a left margin for each legend item",type:"number",chartType:"legend",settingsKey:"padx"},{label:"Left Margin",title:"Set a left margin for the whole legend",type:"number",chartType:"legend",settingsKey:"padleft"},{label:"Left Indent",title:`Set a left margin for the first legend item in each group, and should be set to the length of the longest group label.`+` The left indent will align the legend group label text to the right.`,type:"number",chartType:"legend",settingsKey:"hangleft"},{label:"Item Layout",title:"Option to separate each legend item into a new line, instead of a horizontal layout in the same line.",type:"checkbox",chartType:"legend",settingsKey:"linesep",boxLabel:"Line separated"}]}).html((t=>t.label)).style("margin","2px 0").on("click",((t,e)=>this.callback(t,e)))}setMutationBtn(){this.opts.holder.append("button").style("margin","2px 0").datum({label:"Mutation",updateBtn:t=>{const e=this.parent.config.settings.matrix;t.style("text-decoration",e.allMatrixMutationHidden?"line-through":"").style("text-decoration-thickness",e.allMatrixMutationHidden?"2px":"")},rows:[{title:`Show mutation options`,type:"radio",chartType:"matrix",settingsKey:"showMatrixMutation",options:[{label:"Show all mutations",value:"all"},{label:`Show only truncating mutations`,value:"onlyTruncating"},{label:`Show only protein-changing mutations`,value:"onlyPC"},{label:`Do not show mutations`,value:"none"},{label:`Show selected mutation`,value:"bySelection"}],labelDisplay:"block",getDisplayStyle(t){return t.chartType=="hierCluster"?"none":"table-row"},callback:this.parent.mutationControlCallback}],customInputs:this.generateMutationItems}).html((t=>t.label)).style("margin","2px 0").on("click",((t,e)=>this.callback(t,e)))}setCNVBtn(){this.opts.holder.append("button").style("margin","2px 0").datum({label:"CNV",updateBtn:t=>{const e=this.parent.config.settings.matrix;const a=e.allMatrixCNVHidden;t.style("text-decoration",a?"line-through":"").style("text-decoration-thickness",a?"2px":"")},rows:[{title:`Show CNV options`,type:"radio",chartType:"matrix",settingsKey:"showMatrixCNV",options:[{label:"Show all CNV",value:"all"},{label:`Do not show CNV`,value:"none"},{label:`Show selected CNV`,value:"bySelection"}],labelDisplay:"block",getDisplayStyle(t){return t.chartType=="hierCluster"?"none":"table-row"},callback:this.parent.CNVControlCallback}],customInputs:this.generateCNVItems}).html((t=>t.label)).style("margin","2px 0").on("click",((t,e)=>this.callback(t,e)))}setDownloadBtn(t){this.opts.holder.append("button").style("margin","2px 0").text("Download").on("focus",(()=>this.parent.app.tip.hide())).on("click.sjpp-matrix-download",(t=>{const e=this.parent;if(!e.dom.downloadMenu)e.dom.downloadMenu=new a({padding:""});const c=e.dom.downloadMenu.clear();const d=c.d.append("div");d.append("div").attr("class","sja_menuoption sja_sharp_border").text(`SVG image`).on("click.sjpp-matrix-download",(()=>{s(this.opts.getSvg(),"matrix",{apply_dom_styles:true});e.dom.downloadMenu.destroy()}));d.append("div").attr("class","sja_menuoption sja_sharp_border").text(`TSV data`).on("click.sjpp-matrix-download",(()=>{const t=e.data.lst;const a=e.termOrder.map((t=>t.tw));const s=e.state.termdbConfig.assayAvailability;const c=e.settings.matrix.controlLabels;if(e.config.divideBy?.id&&!a.find((t=>t.id==e.config.divideBy.id))){a.push(e.config.divideBy)}const d=[];for(const e of t){for(const t of a){if(t.$id in e){d.push(e);break}}}const m=[c.Sample];for(const t of a)m.push(t.term.name);const h=[m];for(const t of d){const e=[t._ref_.label];for(const c of a){if(!t[c.$id]){e.push("")}else{if(c.term.type=="geneVariant"){const a=[];for(const e of t[c.$id].renderedValues){const t=s?.byDt?.[parseInt(e.dt)];if(e.dt==n){a.push((e.origin?`${e.origin} `:"")+(t?`${i[e.dt]}:`:"")+`${o[e.class]?.label}`+(e.mname?`,${e.mname}`:""))}else if(e.dt==l){const s=e.value?`${t?"":"CNV:"}${e.value}`:e.class=="CNV_amp"?"CNV gain":e.class=="CNV_loss"?"CNV loss":o[e.class]?.label;a.push((e.origin?`${e.origin} `:"")+(t?`${i[e.dt]}:`:"")+s)}else if(e.dt==r||e.dt==p){a.push((e.origin?`${e.origin} `:"")+(t?`${i[e.dt]}:`:"")+`${o[e.class]?.label}`+(e.gene&&e.mname?`(${e.gene}::${e.mname})`:""))}else{a.push(`DO NOT SUPPORT dt='${e.dt}'`)}}e.push(a.join("|"))}else if(c.term.type==u.GENE_EXPRESSION||c.term.type==u.METABOLITE_INTENSITY){e.push(t[c.$id]?.renderedValues?.[0]?.value||"")}else{e.push(t[c.$id]?.renderedValues?.[0]||t[c.$id]?.value||"")}}}h.push(e)}const g=h.map((t=>t.join("\t"))).join("\n");const y=document.createElement("a");document.body.appendChild(y);y.addEventListener("click",(function(){const t=(new Date).toISOString().split("T")[0];y.download=e.config.settings?.hierCluster?.termGroupName?.startsWith("Gene Expression")?`GeneExpression.${t}.tsv`:e.chartType=="hierCluster"?`HierCluster.${t}.tsv`:`${e.app.vocabApi.termdbConfig.matrix?.appName||"Matrix"}.${t}.tsv`;y.href=URL.createObjectURL(new Blob([g],{type:"text/tab-separated-values"}));document.body.removeChild(y)}),false);y.click();e.dom.downloadMenu.destroy()}));c.showunder(t.target)}))}main(t={}){this.overrides=t;this.parent.app.tip.hide();this.btns.text((t=>(t.getCount?`${t.getCount()} `:"")+t.label)).each((function(t){if(t.updateBtn)t.updateBtn(e(this))}));const a=this.parent.config.settings.matrix;const s=this.parent.dimensions;if(this.zoomApi)this.zoomApi.update({value:a.zoomLevel.toFixed(1),min:a.colwMin/a.colw,max:a.colwMax/a.colw,increment:a.zoomIncrement,step:a.zoomStep||1});if(this.svgScrollApi&&s){this.svgScrollApi.update({x:s.xOffset,y:s.yOffset-a.scrollHeight,totalWidth:s.zoomedMainW,visibleWidth:s.mainw,zoomCenter:a.zoomCenterPct*s.mainw-s.seriesXoffset})}if(this.dragToggleApi){this.dragToggleApi.update(a.mouseMode?{mouseMode:a.mouseMode}:{})}}getSettings(){return{mouseMode:this.dragToggleApi.getSettings().mouseMode}}async callback(e,a){const s=this.opts.app;const n=this.opts.parent;const i=a.tables||[a];e.target.focus();s.tip.clear();const o=s.tip.d.append("table").attr("class","sjpp-controls-table");for(const e of i){if(e.header){o.append("tr").selectAll("th").data(e.header).enter().append("th").html((t=>t))}for(const a of e.rows){const e=o.append("tr");const i=await t[a.type](Object.assign({},{holder:e,dispatch:s.dispatch,id:n.id,debug:this.opts.debug,parent:n},a));i.main(n.config)}if(e.customInputs)e.customInputs(this,s,n,o);o.selectAll("select, input, button").attr("tabindex",0).on("keydown",self.keyboardNavHandler)}s.tip.showunder(e.target)}prependInfo(t,e,a){const s=t.append("tr");s.append("td").text(e).attr("class","sja-termdb-config-row-label");s.append("td").text(a)}async appendGeneInputs(e,a,s,n){w.clear();if(!s.selectedGroup)s.selectedGroup=0;if(s.opts.customInputs?.genes){for(const a of s.opts.customInputs.genes){a.chartType="matrix";const i=n.append("tr");if(a.title)i.attr("aria-label",a.title);const o=await t[a.type](Object.assign({},{holder:i,id:s.id,debug:e.opts.debug,parent:s},a));o.main(s.config)}}e.addGenesetInput(event,a,s,n.append("tr"))}addGenesetInput(t,e,a,s){const n=this.btns.filter((t=>t.label=="Genes"))?.node();const i=e.tip;const o=a.config.termgroups;let l;const r=t=>{t.selectAll("*").remove();const a=l.lst.map((t=>({gene:t.name})));new f({holder:t,genome:e.opts.genome,geneList:a,customInputs:this.parent.opts.customInputs?.geneset,mode:l.mode,minNumGenes:l.mode=="geneExpression"?3:1,vocabApi:this.opts.app.vocabApi,callback:async({geneList:t,groupName:a})=>{if(!l)throw`missing selectedGroup`;i.hide();const s=l.status=="new"?{name:a,lst:[]}:o[l.index];if(l.status=="new")o.push(s);const n=l.mode=="geneExpression"?"geneExpression":"geneVariant";const r=s.lst.filter((t=>t.term.type!=n));const p=await Promise.all(t.map((async t=>{const e={gene:t.symbol||t.gene,name:t.symbol||t.gene,type:n};let a=s.lst.find((e=>e.term.name==t.symbol||e.term.name==t.gene));if(!a){a={term:e,q:{}};a.$id=await g(this.opts.app.vocabApi.getTwMinCopy(a))}else if(!a.$id){a.$id=await g(this.opts.app.vocabApi.getTwMinCopy({term:e}))}return a})));s.lst=[...r,...p];if(!s.lst.length)o.splice(l.index,1);e.dispatch({type:"plot_edit",id:this.parent.id,config:{termgroups:o}})},backBtn:{target:"Genes Menu",callback:()=>{n.click()}}})};const p=o.filter((t=>t.type!="hierCluster"||t.lst.find((t=>t.term.type=="geneExpression")))).length;s.append("td").attr("class","sja-termdb-config-row-label").html("Gene Set");if(p>0){const t=s.append("td").style("display","block").style("padding","5px 0px");const e=t.append("div");e.append("button").html(p>1?"Edit Selected Group":"Edit Current Group").on("click",(()=>{i.clear();this.setMenuBackBtn(i.d.append("div").style("padding","5px"),(()=>n.click()));const t=i.d.append("div");r(t)}));if(p>1){const{groups:t,groupSelect:a}=this.setTermGroupSelector(e,o);l=t.find((t=>t.selected));a.on("change",(()=>{l=t[a.property("value")]}))}else{const t=a.config.settings.hierCluster;const e=o.find((t=>t.type!="hierCluster"||t.lst.find((t=>t.term.type=="geneExpression"))));l={index:0,name:e.name,type:e.type,lst:e.lst.filter((t=>t.term.type.startsWith("gene"))).map((t=>({name:t.term.name}))),mode:this.parent.chartType=="hierCluster"&&(e.type=="hierCluster"||e.name==t?.termGroupName)?t.dataType:this.parent.state.termdbConfig.queries?.snvindel?u.GENE_VARIANT:"",selected:true}}}const c=s.append("td").style("display","block").style("padding","5px 0px");const d=c.append("div");const m=d.append("button").html("Create New Group").property("disabled",true).on("click",(()=>{i.clear();this.setMenuBackBtn(i.d.append("div"),(()=>n.click()));const t=h.property("value");a.config.settings.hierCluster;l={index:o.length,name:t,label:t,lst:[],status:"new",mode:a.state.termdbConfig.queries?.snvindel?u.GENE_VARIANT:""};r(i.d.append("div"))}));const h=d.append("input").style("margin","2px 5px").style("width","210px").attr("placeholder","Group Name").on("input",(()=>{m.property("disabled",!h.property("value"))})).on("keyup",(t=>{if(t.key=="Enter"&&!m.property("disabled")){m.node().click()}}))}setMenuBackBtn(t,e){t.attr("tabindex",0).style("padding","5px").style("text-decoration","underline").style("cursor","pointer").style("margin-bottom","12px").html(`« Back to Genes`).on("click",e).on("keyup",(t=>{if(t.key=="Enter")t.target.click()}))}setTermGroupSelector(t,e){const a=e.find((t=>t.lst.find((t=>t.term.type.startsWith("gene")))));const s=this.parent.config.settings.hierCluster;const n=e.map(((t,e)=>({index:e,name:t.name,type:t.type,lst:t.lst.filter((t=>t.term.type.startsWith("gene"))).map((t=>({name:t.term.name}))),mode:this.parent.chartType=="hierCluster"&&(t.type=="hierCluster"||t.name==s?.termGroupName)?s.dataType:this.parent.state.termdbConfig.queries?.snvindel?u.GENE_VARIANT:"",selected:this.parent.chartType=="hierCluster"&&(t.type=="hierCluster"||t.name&&t.name==s?.termGroupName)||t===a})));const i=t.append("select").style("width","218px").style("margin","2px 5px");for(const[t,e]of n.entries()){if(e.label)continue;if(e.name)e.label=e.name;else e.label=`Unlabeled group #${t+1}`}i.selectAll("option").data(n).enter().append("option").property("selected",(t=>t.selected)).attr("value",((t,e)=>e)).html((t=>t.label));return{groups:n,groupSelect:i}}appendDictInputs(t,e,a,s){w.clear();if(!a.selectedGroup)a.selectedGroup=t.chartType=="hierCluster"?1:0;e.tip.d.append("hr");t.addDictMenu(e,a,e.tip.d.append("div"))}generateCNVItems(t,e,a,s){s.attr("class",null);const i=a.config.settings.matrix;const o=a.legendData.find((t=>t.dt?.includes(n)));if(i.showMatrixCNV!=="none"&&(i.allMatrixMutationHidden||!o||o.crossedOut||!o.items.find((t=>!t.greyedOut&&!t.crossedOut)))){s.select("input[type='radio'][value='none']").property("disabled",true);s.select("input[type='radio'][value='none'] + span").style("opacity","0.5").on("mouseup",null)}if(i.addMutationCNVButtons&&a.chartType!=="hierCluster"&&i.showMatrixCNV=="bySelection")a.CNVControlCallback("bySelection")}generateMutationItems(t,e,a,s){s.attr("class",null);const n=a.config.settings.matrix;const i=a.legendData.find((t=>t.dt?.includes(l)));if(n.showMatrixMutation!=="none"&&(n.allMatrixCNVHidden||!i||i.crossedOut||!i.items.find((t=>!t.greyedOut&&!t.crossedOut)))){s.select("input[type='radio'][value='none']").property("disabled",true);s.select("input[type='radio'][value='none'] + span").style("opacity","0.5").on("mouseup",null)}if(n.addMutationCNVButtons&&a.chartType!=="hierCluster"&&n.showMatrixMutation=="bySelection")a.mutationControlCallback("bySelection")}updateSamplesControls(t,e,a,s){if(a.chartType=="hierCluster"&&a.config.settings.hierCluster.clusterSamples){const t=a.config.settings.matrix.controlLabels;const e=s.select(`tr[title='Set how to sort ${t.samples}']`);e.style("display","none")}}async addDictMenu(t,e,a,s=undefined){const n=await import("./app-686b9547.js");n.appInit({holder:s||t.tip.d,vocabApi:this.parent.app.vocabApi,focus:"off",state:{vocab:this.parent.state.vocab,activeCohort:this.parent.activeCohort,nav:{header_mode:"search_only"},tree:{usecase:{target:"matrix",detail:"termgroups"}}},tree:{submit_lst:e=>{this.submit_lst(e);t.tip.hide()}},search:{focus:"off"}})}async submit_lst(t){const e=await Promise.all(t.map((async t=>{const e=structuredClone(t);const a="id"in e?{id:e.id,term:e}:{term:e};await h(a,this.opts.app.vocabApi);return a})));this.parent.settings.matrix;const a=structuredClone(this.parent.config.termgroups);const s=a.findIndex((t=>t.name=="Variables"));if(s!==-1){const t=a[s];t.lst.push(...e);this.parent.app.dispatch({type:"plot_nestedEdits",id:this.parent.id,edits:[{nestedKeys:["termgroups",s,"lst"],value:t.lst}]})}else{const t={name:"Variables",lst:e};a.push(t);this.parent.app.dispatch({type:"plot_edit",id:this.parent.id,config:{termgroups:a}})}}setZoomInput(){const t=this.opts.holder.append("div").style("display","inline-block").style("margin-left","50px");const e=this.parent.config.settings.matrix;this.zoomApi=x({holder:t,title:"Zoom factor relative to the ideal column width, as computed for the number of columns versus available screen width",unit:"",width:"80px",settings:{value:1,min:.1,max:10,increment:e.zoomIncrement,step:e.zoomStep||5},callback:t=>{const e=this.parent;e.dimensions;e.settings.matrix;const a=e.getVisibleCenterCell(0);e.app.dispatch({type:"plot_edit",id:e.id,config:{settings:{matrix:{zoomLevel:t,zoomCenterPct:.5,zoomIndex:a.totalIndex,zoomGrpIndex:a.grpIndex}}}})},reset:()=>{this.parent.settings.matrix;this.parent.dimensions;this.parent.app.dispatch({type:"plot_edit",id:this.parent.id,config:{settings:{matrix:{zoomLevel:1,zoomCenterPct:0}}}})}})}setDragToggle(t={}){const e={mouseMode:"select",activeBgColor:"rgb(255, 255, 255)"};t.target.style("cursor","default");const a={opts:Object.assign({},e,t),dom:{selectBtn:t.holder.append("button").attr("aria-label","Click the matrix to select data").style("display","inline-block").style("width","25px").style("height","24.5px").style("background-color",e.activeBgColor).on("click",(()=>n("select"))),grabBtn:t.holder.append("button").attr("aria-label","Click the matrix to drag and move").style("display","inline-block").style("width","25px").style("height","24.5px").on("click",(()=>n("pan")))}};c.arrowPointer(a.dom.selectBtn,{width:14,height:14,transform:"translate(50,50)"});c.grab(a.dom.grabBtn,{width:14,height:14,transform:"translate(30,50)"});const s=this;function n(e){a.opts.mouseMode=e;s.parent.settings.matrix.mouseMode=e;t.target.style("cursor",e=="select"?"default":"grab");a.dom.selectBtn.style("background-color",e=="select"?a.opts.activeBgColor:"");a.dom.grabBtn.style("background-color",e=="pan"?a.opts.activeBgColor:"")}this.dragToggleApi={update(t={}){Object.assign(a.opts,t);n(a.opts.mouseMode)},getSettings(){return{mouseMode:a.opts.mouseMode}}}}setSvgScroll(t){this.svgScrollApi=v({holder:this.parent.dom.scroll,height:t.config.settings.matrix.scrollHeight,callback:(t,e)=>{const a=this.parent;const s=a.settings.matrix;const n=a.dimensions;if(e=="move"){a.dom.seriesesG.attr("transform",`translate(${n.xOffset+n.seriesXoffset-t},${n.yOffset})`);a.clusterRenderer.translateElems(-t,s,n);a.layout.top.attr.adjustBoxTransform(-t);a.layout.btm.attr.adjustBoxTransform(-t);if(a.dom.topDendrogram){a.dom.topDendrogram.attr("transform",`translate(${a.topDendroX-t},0)`)}}else if(e=="up"){const e=a.getVisibleCenterCell(-t);a.app.dispatch({type:"plot_edit",id:a.id,config:{settings:{matrix:{zoomCenterPct:.5,zoomIndex:e.totalIndex,zoomGrpIndex:e.grpIndex}}}})}}})}}export{C as MatrixControls};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./termsetting-ad8c4f3a.js";function n(n){const o=n.sort(((t,n)=>t-n));const s=Math.abs(o[0]-o[o.length-1]);const r=t(s);const a=s>=10?0:s>=1?1:r+2;return n.map((t=>Number(t.toFixed(a))))}export{n};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{appInit as e}from"./plot.app-d6fe76e2.js";import{d as t,P as r,b as i}from"./app-2cd97738.js";import{f as s}from"./termsetting-ad8c4f3a.js";import{v as a}from"./FilterRxComp-0f35b322.js";import"./recover-74f2e965.js";import"./FilterStateless-b1c6ee04.js";import"./app-686b9547.js";import"./termInfo-d0a9e65f.js";import"./tslib.es6-c3c2d88f.js";import"./toggleButtons-04c5ad7c.js";import"path";import"./table-f50a9344.js";import"./partjson.esm-b3f1fc21.js";import"./termdb.bins-01e8cce6.js";import"./genesearch-41cb55ce.js";import"./checkbox-96437f4d.js";import"./rehydrateFilter-12d118cb.js";const o="hg38";const n="GDC";async function p(i,p,l){const m=l[o];try{if(!m)throw o+" missing";const p=i.settings||{};if(typeof p!="object")throw"arg.settings{} not object";if(!p.matrix)p.matrix={};if(typeof p.matrix!="object")throw"arg.settings.matrix{} not object";if(!p.matrix.geneFilter)p.matrix.geneFilter="CGC";if(!Number.isInteger(p.matrix.maxGenes))p.matrix.maxGenes=50;if(i.filter0&&typeof i.filter0!="object")throw"arg.filter0 not object";const l=await a({state:{vocab:{genome:o,dslabel:n}}});l.getTermdbConfig();const f=await e({holder:t(i.holder).select(".sja_root_holder"),genome:m,state:{genome:o,dslabel:n,termfilter:{filter0:i.filter0},plots:[{chartType:"geneset",toolName:"OncoMatrix",settings:{maxGenes:p.matrix.maxGenes,geneFilter:p.matrix.geneFilter}}]},app:i.opts?.app||{},geneset:{mode:"geneVariant",genome:m,genes:i.genes,reactsTo(e){if(e.type.startsWith("plot_"))return e.id===this.id;if(e.type.startsWith("filter"))return true;if(e.type=="app_refresh")return true},showWaitMessage(e){e.style("margin","20px");e.append("div").text("Loading the top mutated genes in the current cohort...")},async callback(e,t){if(!e)return;g=e;if(!d){const e=f.getState().plots.find((e=>e.chartType=="matrix"));if(e)d=f.getComponents(`plots.${e.id}`)}const r=[...i.termgroups||[],{lst:t}];if(d){f.dispatch({type:"plot_edit",id:d.id,config:{termgroups:r}})}else{f.dispatch({type:"plot_create",config:{chartType:"matrix",termgroups:r,divideBy:i.divideBy||undefined,settings:p}})}}},recover:{undoHtml:"Undo",redoHtml:"Redo",resetHtml:"Restore",hide(e){return e.plots[0]?.chartType!="matrix"},adjustTrackedState:e=>{const t=structuredClone(e);delete t.termfilter.filter0;if(t.plots){for(const e of t.plots){if(!e.termgroups)continue;for(const t of e.termgroups){if(!t.lst)continue;for(const e of t.lst){if(!e?.term)continue;delete e.term.category2samplecount;delete e.term.values}}}}return t}},matrix:r({reactsTo(e){if(e.type.startsWith("plot_"))return e.id===this.id;if(e.type.startsWith("filter"))return true;if(e.type=="app_refresh")return true},customInputs:{genes:[{label:`Maximum # Genes`,title:"Limit the number of displayed genes",type:"number",chartType:"matrix",settingsKey:"maxGenes",callback:async e=>{for(const e in i.opts?.app?.callbacks){if(e.startsWith("preDispatch")){i.opts?.app?.callbacks[e]();break}}const t=await c(i,{maxGenes:e,geneFilter:p.matrix.geneFilter},l);u.update({termgroups:[{lst:t}],settings:{matrix:{maxGenes:e}}})}}]},callbacks:{"firstRender.gdcMatrix":async e=>{e.on("firstRender.gdcMatrix",null);if(!g)return;f.dispatch({type:"plot_delete",id:g.id});g=undefined}}},i.opts?.matrix||{})});let d,g;const u={update:async e=>{if(!d){const e=f.getState().plots.find((e=>e.chartType=="matrix"));if(e)d=f.getComponents(`plots.${e.id}`)}if(e.genes){f.dispatch({type:"plot_edit",id:d.id,config:{termgroups:[{lst:await Promise.all(e.genes.map((async e=>await s({term:{gene:e.gene,type:"geneVariant",name:e.gene}},l))))}]}})}else if("filter0"in e){f.dispatch({type:"filter_replace",filter0:e.filter0})}else if(d){f.dispatch({type:"plot_edit",id:d.id,config:e})}}};return u}catch(e){throw e}}async function c(e,t,r){const a={maxGenes:t.maxGenes,geneFilter:t.geneFilter};if(e.filter0)a.filter0=e.filter0;const o=await i("gdc/topMutatedGenes",{body:a});if(o.error)throw o.error;if(!o.genes)return;return await Promise.all(o.genes.map((async e=>await s({term:{gene:e.gene,type:"geneVariant"}},r))))}export{p as init};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as t,M as s,y as r}from"./app-2cd97738.js";import{s as e,r as o}from"./recover-74f2e965.js";import{v as i}from"./FilterRxComp-0f35b322.js";import"./termsetting-ad8c4f3a.js";import"./tslib.es6-c3c2d88f.js";import"path";import"./FilterStateless-b1c6ee04.js";import"./app-686b9547.js";import"./termInfo-d0a9e65f.js";import"./toggleButtons-04c5ad7c.js";import"./table-f50a9344.js";import"./partjson.esm-b3f1fc21.js";import"./termdb.bins-01e8cce6.js";import"./genesearch-41cb55ce.js";import"./checkbox-96437f4d.js";import"./rehydrateFilter-12d118cb.js";function a(t){switch(t){case"../plots/DEanalysis.js":return import("./DEanalysis-f81e0f19.js");case"../plots/Disco.js":return import("./Disco-db386f7a.js");case"../plots/DziViewer.js":return import("./DziViewer-9352e224.js");case"../plots/WSIViewer.js":return import("./WSIViewer-80f60272.js");case"../plots/barchart.data.js":return import("./FilterRxComp-0f35b322.js").then((function(t){return t.j}));case"../plots/barchart.events.js":return import("./barchart.events-df44e666.js");case"../plots/barchart.js":return import("./barchart-3c5d734c.js");case"../plots/bars.renderer.js":return import("./bars.renderer-b232d882.js");case"../plots/bars.settings.js":return import("./bars.settings-64bb4642.js");case"../plots/boxplot.js":return import("./boxplot-44d3b48f.js");case"../plots/brainImaging.js":return import("./brainImaging-2eaa419d.js");case"../plots/controls.btns.js":return import("./controls.btns-5b1240c8.js");case"../plots/controls.config.js":return import("./controls.config-81cd5749.js");case"../plots/controls.js":return import("./controls-3c1691d7.js");case"../plots/cuminc.js":return import("./cuminc-c4db28f0.js");case"../plots/dataDownload.js":return import("./dataDownload-a4dfa2d0.js");case"../plots/dictionary.js":return import("./dictionary-e2232e84.js");case"../plots/facet.js":return import("./facet-98971c68.js");case"../plots/geneExpression.js":return import("./geneExpression-b5d0261f.js");case"../plots/geneORA.js":return import("./geneORA-f1a90d02.js");case"../plots/geneset.js":return import("./geneset-b63496eb.js");case"../plots/genomeBrowser.controls.js":return import("./genomeBrowser.controls-2dcaf4f5.js");case"../plots/genomeBrowser.js":return import("./genomeBrowser-ec8fbddc.js");case"../plots/gsea.js":return import("./gsea-3075c82c.js");case"../plots/hierCluster.config.js":return import("./hierCluster.config-fa799d06.js");case"../plots/hierCluster.interactivity.js":return import("./hierCluster.interactivity-6d453881.js").then((function(t){return t.i}));case"../plots/hierCluster.js":return import("./hierCluster-33a828a1.js");case"../plots/hierCluster.renderers.js":return import("./hierCluster.renderers-6279d7fb.js").then((function(t){return t.r}));case"../plots/imagePlot.js":return import("./imagePlot-38254245.js");case"../plots/matrix.cells.js":return import("./matrix.cells-eb4110a7.js");case"../plots/matrix.cluster.js":return import("./matrix.cluster-0df274ed.js");case"../plots/matrix.config.js":return import("./matrix.config-3ef822b9.js");case"../plots/matrix.controls.js":return import("./matrix.controls-42bb2063.js");case"../plots/matrix.data.js":return import("./matrix.data-27b8e3a9.js").then((function(t){return t.m}));case"../plots/matrix.dom.js":return import("./matrix.dom-1bbe1f39.js");case"../plots/matrix.groups.js":return import("./matrix.groups-67606700.js").then((function(t){return t.m}));case"../plots/matrix.interactivity.js":return import("./matrix.interactivity-cdcc56c9.js");case"../plots/matrix.js":return import("./matrix-e371888a.js");case"../plots/matrix.layout.js":return import("./matrix.layout-857cd336.js").then((function(t){return t.m}));case"../plots/matrix.legend.js":return import("./matrix.legend-09f6dc57.js").then((function(t){return t.m}));case"../plots/matrix.renderers.js":return import("./matrix.renderers-d392fb69.js");case"../plots/matrix.serieses.js":return import("./matrix.serieses-b03b62aa.js").then((function(t){return t.m}));case"../plots/matrix.sort.js":return import("./matrix.sort-9440c86a.js");case"../plots/matrix.sorterUi.js":return import("./matrix.sorterUi-2c5eb35f.js");case"../plots/plot.app.js":return Promise.resolve().then((function(){return c}));case"../plots/plot.brainImaging.js":return import("./plot.brainImaging-39b80a1c.js");case"../plots/plot.disco.js":return import("./plot.disco-9a544f9a.js");case"../plots/plot.ssgq.js":return import("./plot.ssgq-aeb2dabc.js");case"../plots/profileBarchart.js":return import("./profileBarchart-72adc533.js");case"../plots/profilePlot.js":return import("./profilePlot-0b897a05.js");case"../plots/profilePolar.js":return import("./profilePolar-a7248d48.js");case"../plots/profileRadar.js":return import("./profileRadar-1ba5d8fd.js");case"../plots/profileRadarFacility.js":return import("./profileRadarFacility-452e76ef.js");case"../plots/profileSummary.js":return import("./profileSummary-7f0eacf0.js");case"../plots/regression.inputs.js":return import("./regression.inputs-ff00f74e.js").then((function(t){return t.b}));case"../plots/regression.inputs.term.js":return import("./regression.inputs-ff00f74e.js").then((function(t){return t.a}));case"../plots/regression.inputs.values.table.js":return import("./regression.inputs.values.table-1753d56b.js");case"../plots/regression.js":return import("./regression.inputs-ff00f74e.js").then((function(t){return t.r}));case"../plots/regression.results.js":return import("./regression.results-6f85a5dc.js").then((function(t){return t.r}));case"../plots/sampleScatter.interactivity.js":return import("./sampleScatter-97917406.js").then((function(t){return t.a}));case"../plots/sampleScatter.js":return import("./sampleScatter-97917406.js").then((function(t){return t.b}));case"../plots/sampleScatter.renderer.js":return import("./sampleScatter-97917406.js").then((function(t){return t.s}));case"../plots/sampleScatter.rendererThree.js":return import("./sampleScatter.rendererThree-4649d1ec.js").then((function(t){return t.c}));case"../plots/sampleView.js":return import("./sampleView-f86dc5ea.js");case"../plots/scatter.js":return import("./scatter-cc1b0d07.js");case"../plots/singleCellPlot.js":return import("./singleCellPlot-e6f83b2a.js");case"../plots/stattable.js":return import("./stattable-c5f12d9c.js");case"../plots/summary.js":return import("./summary-0624f5e6.js");case"../plots/survival.js":return import("./survival-fcc7719f.js");case"../plots/table.js":return import("./table-4d3a771e.js");case"../plots/variantBrowser.js":return import("./variantBrowser-261373bf.js");case"../plots/violin.interactivity.js":return import("./violin.interactivity-30a239fe.js");case"../plots/violin.js":return import("./violin-e647aac9.js");case"../plots/violin.renderer.js":return import("./violin.renderer-e29d2700.js");default:return new Promise((function(s,r){(typeof queueMicrotask==="function"?queueMicrotask:setTimeout)(r.bind(null,new Error("Unknown variable dynamic import: "+t)))}))}}class n{constructor(t){this.type="app";const s=t.violin?.mode=="minimal"?null:t.holder.append("div").style("white-space","nowrap");this.dom={holder:t.holder,errdiv:t.holder.append("div"),plotDiv:t.holder.append("div")};if(s){this.dom.plotControls=s.append("div").style("display","inline-block");this.dom.recoverControls=s.append("div").style("display","inline-block")}}validateOpts(t={}){if(!t.holder)throw`missing opts.holder in the MassApp constructor argument`;if(!t.callbacks)t.callbacks={};return t}async preApiFreeze(t){try{t.tip=new s({padding:"5px"});t.printError=t=>this.printError(t);const r=this.opts.state.vocab;t.vocabApi=this.opts.vocabApi?this.opts.vocabApi:await i({app:t,state:{vocab:{genome:r?.genome||this.opts.state.genome,dslabel:r?.dslabel||this.opts.state.dslabel,terms:r?.terms}},fetchOpts:this.opts.fetchOpts});this.opts.state.vocab=t.vocabApi.vocab}catch(t){throw t}}async init(){try{this.opts.state.nav={header_mode:"hidden"};this.store=await e({app:this.api,state:this.opts.state});this.state=await this.store.copyState();this.components={plots:{}};if(this.opts.app?.features?.includes("recover"))this.components.recover=await o({app:this.api,holder:this.dom.recoverControls,getState:t=>t,maxHistoryLen:10});await this.api.dispatch()}catch(t){this.printError(t);throw t}}async main(){this.api.vocabApi.main();for(const t in this.components.plots){const s=this.components.plots[t];if(!this.state.plots.find((t=>t.id===s.id))){s.destroy();delete this.components.plots[t]}}for(const[t,s]of this.state.plots.entries()){if(!this.components.plots[s.id]){const t=this.opts?.app?.getPlotHolder?this.opts.app.getPlotHolder(s,this.dom.holder):this.dom.holder.append("div");if(!this.dom.plotDiv)this.dom.plotDiv=t;const r=await a(`../plots/${s.chartType}.js`);const e=await r.componentInit({id:s.id,app:this.api,holder:t,controls:this.dom.plotControls});this.components.plots[s.id]=e}}}printError(t){r(this.dom.errdiv,"Error: "+(t.message||t));if(t.stack)console.log(t.stack);this.bus.emit("error")}destroy(){this.dom.holder.selectAll("*").remove()}}const p=t(n);var c=Object.freeze({__proto__:null,appInit:p});export{p as appInit};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Z as t,U as a,ah as e,I as o,W as n,ag as i}from"./app-2cd97738.js";import{c as l}from"./axis-747c801e.js";function r(a,e,o,n){const i=t({x:n.left+200,y:n.top});i.body.style("padding","10px");i.header.html(o);a.sort(((t,a)=>a.size-t.size));s({lst:a,holder:i.body,barcolor:e,limit:Math.min(a.length,20)})}function s(t){t.holder.selectAll("*").remove();const r=t.holder.append("div").style("margin-bottom","10px");r.append("button").text("more").on("click",(()=>{t.limit=Math.min(t.lst.length,t.limit+10);s(t)}));r.append("button").text("less").on("click",(()=>{t.limit=Math.max(1,t.limit-10);s(t)}));r.append("button").text("screenshot").on("click",(()=>a(b.node(),"barplot")));let c=20,m=300,d=5,p=c+5,h=c/8,x=0,f=0;const b=t.holder.append("svg");const g=b.append("g");for(let a=0;a<t.limit;a++){let o=t.lst[a];f=Math.max(f,o.size);b.append("text").text(o.name).attr("font-size",c-2).attr("font-family",e).each((function(){x=Math.max(x,this.getBBox().width)})).remove()}b.attr("width",x+d+m+d).attr("height",p+d+t.limit*(c+h));g.attr("transform","translate("+(x+d)+","+p+")").call(l().scale(o().domain([0,f]).range([0,m])).tickFormat(n("d")));i({axis:g,showline:true,fontsize:c*.8,color:"black"});let y=p+d;const u=m/f;for(let a=0;a<t.limit;a++){const o=t.lst[a];b.append("text").text(o.name).attr("x",x).attr("y",y+c/2).attr("text-anchor","end").attr("font-size",c-2).attr("font-family",e).attr("dominant-baseline","central");b.append("rect").attr("x",x+d).attr("y",y).attr("width",u*o.size).attr("height",c-1).attr("fill",t.barcolor);y+=c+h}}export{r as default};
|
package/dist/snp-541ec14d.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as s}from"./tslib.es6-c3c2d88f.js";import{M as t}from"./app-2cd97738.js";import{a as o}from"./genesearch-41cb55ce.js";class e{init(s){this.callback=s.callback;const e=o({tip:new t({padding:"0px"}),genome:s.genomeObj,row:s.holder,searchOnly:"snp",allowVariant:true,callback:()=>this.selectSnp(e)})}selectSnp(t){return s(this,void 0,void 0,(function*(){const{chr:s,ref:o,alt:e,fromWhat:r}=t;if(!s||!o||!e||!r)throw"missing chr, ref, alt, or fromWhat of snp";let a,c;if(!t.start&&!t.stop){if(t.pos){a=t.pos-1;c=t.pos}else{throw"missing coordinate of snp"}}else{a=t.start;c=t.stop}const i={id:r,chr:s,start:a,stop:c,name:r,ref:o,alt:typeof e=="string"?[e]:e,type:"snp"};this.callback(i)}))}}export{e as SearchHandler};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bX as e,bV as n}from"./app-2cd97738.js";function o(o){let t=0;for(let i=1;i<o.length;i++){const f=o[i];const r=o[t];if(f.isskipexon&&r.isaltexon){t=i;continue}if(f.frame==e&&r.framenocheck){t=i;continue}if(f.frame==n&&r.frame!=n){t=i;continue}}return t}export{o as e};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as t}from"./tslib.es6-c3c2d88f.js";import{o}from"./termsetting-ad8c4f3a.js";import{getHandler as i}from"./numeric.toggle-647423dd.js";import"./app-2cd97738.js";import"path";import"./toggleButtons-04c5ad7c.js";function e(e){return{showEditMenu(o){return t(this,void 0,void 0,(function*(){const t=yield i(e);yield t.showEditMenu(o)}))},getPillStatus(){},getPillName(t){return o(e,t)}}}function r(t,o){}export{r as fillTW,e as getHandler};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,b as t,_ as i}from"./tslib.es6-c3c2d88f.js";import{R as n,S as r,T as s,P as o,H as a,i as l,M as d,F as p,d as u}from"./app-2cd97738.js";import c from"path";const f=1;const h={continuous:"continuous",discrete:"discrete"};const m={GENE_VARIANT:"geneVariant",GENE_EXPRESSION:"geneExpression",CATEGORICAL:"categorical",INTEGER:"integer",FLOAT:"float",SNP:"snp",SNP_LIST:"snplst",SNP_LOCUS:"snplocus",CONDITION:"condition",SURVIVAL:"survival",SAMPLELST:"samplelst",METABOLITE_INTENSITY:"metaboliteIntensity",SINGLECELL_GENE_EXPRESSION:"singleCellGeneExpression",SINGLECELL_CELLTYPE:"singleCellCellType"};const y={[m.GENE_EXPRESSION]:n,[m.METABOLITE_INTENSITY]:r};const g={[m.CATEGORICAL]:s.DICTIONARY_VARIABLES,[m.CONDITION]:s.DICTIONARY_VARIABLES,[m.FLOAT]:s.DICTIONARY_VARIABLES,[m.INTEGER]:s.DICTIONARY_VARIABLES,[m.SAMPLELST]:s.DICTIONARY_VARIABLES,[m.SURVIVAL]:s.DICTIONARY_VARIABLES,[m.GENE_VARIANT]:s.MUTATION_CNV_FUSION,[m.SNP]:s.SNP,[m.SNP_LIST]:s.SNP_LIST,[m.SNP_LOCUS]:s.SNP_LOCUS,[m.GENE_EXPRESSION]:s.GENE_EXPRESSION,[m.METABOLITE_INTENSITY]:s.METABOLITE_INTENSITY};const v=new Set([m.SNP,m.SNP_LIST,m.SNP_LOCUS,m.GENE_EXPRESSION,m.GENE_VARIANT,m.METABOLITE_INTENSITY,m.SINGLECELL_GENE_EXPRESSION,m.SINGLECELL_CELLTYPE]);const b=new Set([m.INTEGER,m.FLOAT,m.GENE_EXPRESSION,m.METABOLITE_INTENSITY,m.SINGLECELL_GENE_EXPRESSION]);const w=new Set([m.CATEGORICAL,m.SNP]);function q(e){if(!e)return false;return b.has(e.type)}function T(e){if(!e)return false;return w.has(e.type)}function x(e){return!E(e)}function E(e){if(!e)throw new Error("Type is not defined");return v.has(e)}function S(e,t){if(!e)throw new Error("First term is not defined ");if(!t)throw new Error("Second term is not defined ");if(e.type!==t.type)return false;if(x(e.type)&&x(t.type)&&e.type!=m.SAMPLELST)return e.id===t.id;switch(e.type){case m.GENE_EXPRESSION:return e.gene==t.gene;case m.METABOLITE_INTENSITY:return e.name==t.name;case m.GENE_VARIANT:return e.gene==t.gene||e.chr==t.chr&&e.start==t.start&&e.stop==t.stop;default:return false}}var _=function(e,t){var i=[];for(var n=0;n<e.length;n++){var r=t(e[n],n);if(N(r))i.push.apply(i,r);else i.push(r)}return i};var N=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};var A=I;function I(e,t,i){if(e instanceof RegExp)e=C(e,i);if(t instanceof RegExp)t=C(t,i);var n=O(e,t,i);return n&&{start:n[0],end:n[1],pre:i.slice(0,n[0]),body:i.slice(n[0]+e.length,n[1]),post:i.slice(n[1]+t.length)}}function C(e,t){var i=t.match(e);return i?i[0]:null}I.range=O;function O(e,t,i){var n,r,s,o,a;var l=i.indexOf(e);var d=i.indexOf(t,l+1);var p=l;if(l>=0&&d>0){if(e===t){return[l,d]}n=[];s=i.length;while(p>=0&&!a){if(p==l){n.push(p);l=i.indexOf(e,p+1)}else if(n.length==1){a=[n.pop(),d]}else{r=n.pop();if(r<s){s=r;o=d}d=i.indexOf(t,p+1)}p=l<d&&l>=0?l:d}if(n.length){a=[s,o]}}return a}var j=V;var k="\0SLASH"+Math.random()+"\0";var P="\0OPEN"+Math.random()+"\0";var $="\0CLOSE"+Math.random()+"\0";var M="\0COMMA"+Math.random()+"\0";var L="\0PERIOD"+Math.random()+"\0";function R(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function W(e){return e.split("\\\\").join(k).split("\\{").join(P).split("\\}").join($).split("\\,").join(M).split("\\.").join(L)}function B(e){return e.split(k).join("\\").split(P).join("{").split($).join("}").split(M).join(",").split(L).join(".")}function G(e){if(!e)return[""];var t=[];var i=A("{","}",e);if(!i)return e.split(",");var n=i.pre;var r=i.body;var s=i.post;var o=n.split(",");o[o.length-1]+="{"+r+"}";var a=G(s);if(s.length){o[o.length-1]+=a.shift();o.push.apply(o,a)}t.push.apply(t,o);return t}function V(e){if(!e)return[];if(e.substr(0,2)==="{}"){e="\\{\\}"+e.substr(2)}return H(W(e),true).map(B)}function D(e){return"{"+e+"}"}function Q(e){return/^-?0\d/.test(e)}function U(e,t){return e<=t}function Y(e,t){return e>=t}function H(e,t){var i=[];var n=A("{","}",e);if(!n||/\$$/.test(n.pre))return[e];var r=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body);var s=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body);var o=r||s;var a=n.body.indexOf(",")>=0;if(!o&&!a){if(n.post.match(/,.*\}/)){e=n.pre+"{"+n.body+$+n.post;return H(e)}return[e]}var l;if(o){l=n.body.split(/\.\./)}else{l=G(n.body);if(l.length===1){l=H(l[0],false).map(D);if(l.length===1){var d=n.post.length?H(n.post,false):[""];return d.map((function(e){return n.pre+l[0]+e}))}}}var p=n.pre;var d=n.post.length?H(n.post,false):[""];var u;if(o){var c=R(l[0]);var f=R(l[1]);var h=Math.max(l[0].length,l[1].length);var m=l.length==3?Math.abs(R(l[2])):1;var y=U;var g=f<c;if(g){m*=-1;y=Y}var v=l.some(Q);u=[];for(var b=c;y(b,f);b+=m){var w;if(s){w=String.fromCharCode(b);if(w==="\\")w=""}else{w=String(b);if(v){var q=h-w.length;if(q>0){var T=new Array(q+1).join("0");if(b<0)w="-"+T+w.slice(1);else w=T+w}}}u.push(w)}}else{u=_(l,(function(e){return H(e,false)}))}for(var x=0;x<u.length;x++){for(var E=0;E<d.length;E++){var S=p+u[x]+d[E];if(!t||o||S)i.push(S)}}return i}var X=ae;ae.Minimatch=le;var F=function(){try{return c}catch(e){}}()||{sep:"/"};ae.sep=F.sep;var z=ae.GLOBSTAR=le.GLOBSTAR={};var J={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var Z="[^/]";var K=Z+"*?";var ee="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var te="(?:(?!(?:\\/|^)\\.).)*?";var ie=ne("().*{}+?[]^$\\!");function ne(e){return e.split("").reduce((function(e,t){e[t]=true;return e}),{})}var re=/\/+/;ae.filter=se;function se(e,t){t=t||{};return function(i,n,r){return ae(i,e,t)}}function oe(e,t){t=t||{};var i={};Object.keys(e).forEach((function(t){i[t]=e[t]}));Object.keys(t).forEach((function(e){i[e]=t[e]}));return i}ae.defaults=function(e){if(!e||typeof e!=="object"||!Object.keys(e).length){return ae}var t=ae;var i=function i(n,r,s){return t(n,r,oe(e,s))};i.Minimatch=function i(n,r){return new t.Minimatch(n,oe(e,r))};i.Minimatch.defaults=function i(n){return t.defaults(oe(e,n)).Minimatch};i.filter=function i(n,r){return t.filter(n,oe(e,r))};i.defaults=function i(n){return t.defaults(oe(e,n))};i.makeRe=function i(n,r){return t.makeRe(n,oe(e,r))};i.braceExpand=function i(n,r){return t.braceExpand(n,oe(e,r))};i.match=function(i,n,r){return t.match(i,n,oe(e,r))};return i};le.defaults=function(e){return ae.defaults(e).Minimatch};function ae(e,t,i){fe(t);if(!i)i={};if(!i.nocomment&&t.charAt(0)==="#"){return false}return new le(t,i).match(e)}function le(e,t){if(!(this instanceof le)){return new le(e,t)}fe(e);if(!t)t={};e=e.trim();if(!t.allowWindowsEscape&&F.sep!=="/"){e=e.split(F.sep).join("/")}this.options=t;this.set=[];this.pattern=e;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.partial=!!t.partial;this.make()}le.prototype.debug=function(){};le.prototype.make=de;function de(){var e=this.pattern;var t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=true;return}if(!e){this.empty=true;return}this.parseNegate();var i=this.globSet=this.braceExpand();if(t.debug)this.debug=function e(){console.error.apply(console,arguments)};this.debug(this.pattern,i);i=this.globParts=i.map((function(e){return e.split(re)}));this.debug(this.pattern,i);i=i.map((function(e,t,i){return e.map(this.parse,this)}),this);this.debug(this.pattern,i);i=i.filter((function(e){return e.indexOf(false)===-1}));this.debug(this.pattern,i);this.set=i}le.prototype.parseNegate=pe;function pe(){var e=this.pattern;var t=false;var i=this.options;var n=0;if(i.nonegate)return;for(var r=0,s=e.length;r<s&&e.charAt(r)==="!";r++){t=!t;n++}if(n)this.pattern=e.substr(n);this.negate=t}ae.braceExpand=function(e,t){return ue(e,t)};le.prototype.braceExpand=ue;function ue(e,t){if(!t){if(this instanceof le){t=this.options}else{t={}}}e=typeof e==="undefined"?this.pattern:e;fe(e);if(t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)){return[e]}return j(e)}var ce=1024*64;var fe=function(e){if(typeof e!=="string"){throw new TypeError("invalid pattern")}if(e.length>ce){throw new TypeError("pattern is too long")}};le.prototype.parse=me;var he={};function me(e,t){fe(e);var i=this.options;if(e==="**"){if(!i.noglobstar)return z;else e="*"}if(e==="")return"";var n="";var r=!!i.nocase;var s=false;var o=[];var a=[];var l;var d=false;var p=-1;var u=-1;var c=e.charAt(0)==="."?"":i.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var f=this;function h(){if(l){switch(l){case"*":n+=K;r=true;break;case"?":n+=Z;r=true;break;default:n+="\\"+l;break}f.debug("clearStateChar %j %j",l,n);l=false}}for(var m=0,y=e.length,g;m<y&&(g=e.charAt(m));m++){this.debug("%s\t%s %s %j",e,m,n,g);if(s&&ie[g]){n+="\\"+g;s=false;continue}switch(g){case"/":{return false}case"\\":h();s=true;continue;case"?":case"*":case"+":case"@":case"!":this.debug("%s\t%s %s %j <-- stateChar",e,m,n,g);if(d){this.debug(" in class");if(g==="!"&&m===u+1)g="^";n+=g;continue}f.debug("call clearStateChar %j",l);h();l=g;if(i.noext)h();continue;case"(":if(d){n+="(";continue}if(!l){n+="\\(";continue}o.push({type:l,start:m-1,reStart:n.length,open:J[l].open,close:J[l].close});n+=l==="!"?"(?:(?!(?:":"(?:";this.debug("plType %j %j",l,n);l=false;continue;case")":if(d||!o.length){n+="\\)";continue}h();r=true;var v=o.pop();n+=v.close;if(v.type==="!"){a.push(v)}v.reEnd=n.length;continue;case"|":if(d||!o.length||s){n+="\\|";s=false;continue}h();n+="|";continue;case"[":h();if(d){n+="\\"+g;continue}d=true;u=m;p=n.length;n+=g;continue;case"]":if(m===u+1||!d){n+="\\"+g;s=false;continue}var b=e.substring(u+1,m);try{RegExp("["+b+"]")}catch(e){var w=this.parse(b,he);n=n.substr(0,p)+"\\["+w[0]+"\\]";r=r||w[1];d=false;continue}r=true;d=false;n+=g;continue;default:h();if(s){s=false}else if(ie[g]&&!(g==="^"&&d)){n+="\\"}n+=g}}if(d){b=e.substr(u+1);w=this.parse(b,he);n=n.substr(0,p)+"\\["+w[0];r=r||w[1]}for(v=o.pop();v;v=o.pop()){var q=n.slice(v.reStart+v.open.length);this.debug("setting tail",n,v);q=q.replace(/((?:\\{2}){0,64})(\\?)\|/g,(function(e,t,i){if(!i){i="\\"}return t+t+i+"|"}));this.debug("tail=%j\n %s",q,q,v,n);var T=v.type==="*"?K:v.type==="?"?Z:"\\"+v.type;r=true;n=n.slice(0,v.reStart)+T+"\\("+q}h();if(s){n+="\\\\"}var x=false;switch(n.charAt(0)){case"[":case".":case"(":x=true}for(var E=a.length-1;E>-1;E--){var S=a[E];var _=n.slice(0,S.reStart);var N=n.slice(S.reStart,S.reEnd-8);var A=n.slice(S.reEnd-8,S.reEnd);var I=n.slice(S.reEnd);A+=I;var C=_.split("(").length-1;var O=I;for(m=0;m<C;m++){O=O.replace(/\)[+*?]?/,"")}I=O;var j="";if(I===""&&t!==he){j="$"}var k=_+N+I+j+A;n=k}if(n!==""&&r){n="(?=.)"+n}if(x){n=c+n}if(t===he){return[n,r]}if(!r){return ge(e)}var P=i.nocase?"i":"";try{var $=new RegExp("^"+n+"$",P)}catch(e){return new RegExp("$.")}$._glob=e;$._src=n;return $}ae.makeRe=function(e,t){return new le(e,t||{}).makeRe()};le.prototype.makeRe=ye;function ye(){if(this.regexp||this.regexp===false)return this.regexp;var e=this.set;if(!e.length){this.regexp=false;return this.regexp}var t=this.options;var i=t.noglobstar?K:t.dot?ee:te;var n=t.nocase?"i":"";var r=e.map((function(e){return e.map((function(e){return e===z?i:typeof e==="string"?ve(e):e._src})).join("\\/")})).join("|");r="^(?:"+r+")$";if(this.negate)r="^(?!"+r+").*$";try{this.regexp=new RegExp(r,n)}catch(e){this.regexp=false}return this.regexp}ae.match=function(e,t,i){i=i||{};var n=new le(t,i);e=e.filter((function(e){return n.match(e)}));if(n.options.nonull&&!e.length){e.push(t)}return e};le.prototype.match=function e(t,i){if(typeof i==="undefined")i=this.partial;this.debug("match",t,this.pattern);if(this.comment)return false;if(this.empty)return t==="";if(t==="/"&&i)return true;var n=this.options;if(F.sep!=="/"){t=t.split(F.sep).join("/")}t=t.split(re);this.debug(this.pattern,"split",t);var r=this.set;this.debug(this.pattern,"set",r);var s;var o;for(o=t.length-1;o>=0;o--){s=t[o];if(s)break}for(o=0;o<r.length;o++){var a=r[o];var l=t;if(n.matchBase&&a.length===1){l=[s]}var d=this.matchOne(l,a,i);if(d){if(n.flipNegate)return true;return!this.negate}}if(n.flipNegate)return false;return this.negate};le.prototype.matchOne=function(e,t,i){var n=this.options;this.debug("matchOne",{this:this,file:e,pattern:t});this.debug("matchOne",e.length,t.length);for(var r=0,s=0,o=e.length,a=t.length;r<o&&s<a;r++,s++){this.debug("matchOne loop");var l=t[s];var d=e[r];this.debug(t,l,d);if(l===false)return false;if(l===z){this.debug("GLOBSTAR",[t,l,d]);var p=r;var u=s+1;if(u===a){this.debug("** at the end");for(;r<o;r++){if(e[r]==="."||e[r]===".."||!n.dot&&e[r].charAt(0)===".")return false}return true}while(p<o){var c=e[p];this.debug("\nglobstar while",e,p,t,u,c);if(this.matchOne(e.slice(p),t.slice(u),i)){this.debug("globstar found match!",p,o,c);return true}else{if(c==="."||c===".."||!n.dot&&c.charAt(0)==="."){this.debug("dot detected!",e,p,t,u);break}this.debug("globstar swallow a segment, and continue");p++}}if(i){this.debug("\n>>> no match, partial?",e,p,t,u);if(p===o)return true}return false}var f;if(typeof l==="string"){f=d===l;this.debug("string match",l,d,f)}else{f=d.match(l);this.debug("pattern match",l,d,f)}if(!f)return false}if(r===o&&s===a){return true}else if(r===o){return i}else if(s===a){return r===o-1&&e[r]===""}throw new Error("wtf?")};function ge(e){return e.replace(/\\(.)/g,"$1")}function ve(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}class be{constructor(e,t){var i;this.isAtomic=true;this.type=e.type;this.isAtomic=true;if(e.$id)this.$id=e.$id;if((i=t.addons)===null||i===void 0?void 0:i[this.type]){Object.defineProperties(this,t.addons[this.type])}}static setHiddenValues(e,t){if(e.hiddenValues)return;e.hiddenValues={};if(t.values){for(const i in t.values){if(t.values[i].uncomputable)e.hiddenValues[i]=1}}}render(e){console.log(e);throw`should implement this method in subclass code, as needed`}}var we,qe,Te,xe,Ee,Se;class _e extends be{constructor(e,t){super(e,t);this.term=e.term}static fill(e,t={}){var i;if(!e.term)throw`missing tw.term, must already be filled in`;if(e.term.type!="categorical")throw`incorrect term.type='${(i=e.term)===null||i===void 0?void 0:i.type}', expecting 'categorical'`;if(t.defaultQ!=null){t.defaultQ.isAtomic=true;o(e.q,t.defaultQ)}if(!e.q.mode)e.q.mode="discrete";if(!e.q)e.q={type:"values",isAtomic:true};if(!e.type)e.type=!e.q.type||e.q.type=="values"?"CatTWValues":e.q.type=="predefined-groupset"?"CatTWPredefinedGS":e.q.type=="custom-groupset"?"CatTWCustomGS":undefined;switch(e.type){case"CatTWValues":return Ne.fill(e);case"CatTWPredefinedGS":return Ae.fill(e);case"CatTWCustomGS":return Ie.fill(e);default:throw`tw.type='${e.type} (q.mode:q.type=${e.q.mode}:${e.q.type}' is not supported by CategoricalBase.fill()`}}}class Ne extends _e{constructor(t,i={}){super(t,i);we.set(this,void 0);qe.set(this,void 0);this.q=t.q;e(this,we,t,"f");e(this,qe,i,"f")}getTw(){return t(this,we,"f")}static fill(e){if(!e.type)e.type="CatTWValues";else if(e.type!="CatTWValues")throw`expecting tw.type='CatTWValues', got '${e.type}'`;if(e.term.type!="categorical")throw`expecting tw.term.type='categorical', got '${e.term.type}'`;const{term:t,q:i}=e;if(!i.type)i.type="values";else if(i.type!="values")throw`expecting tw.q.type='values', got ${e.q.type}`;if(!t.values)t.values={};if(i.mode=="binary"){if(Object.keys(e.term.values).length!=2)throw"term.values must have exactly two keys"}vt(i,t);return e}}we=new WeakMap,qe=new WeakMap;class Ae extends _e{constructor(i,n={}){super(i,n);Te.set(this,void 0);xe.set(this,void 0);this.q=i.q;e(this,Te,i,"f");Object.defineProperty(this,"groupset",{value:this.term.groupsetting[t(this,Te,"f").q.predefined_groupset_idx]});e(this,xe,n,"f")}getTw(){return t(this,Te,"f")}static fill(e){var t,i;if(!e.type)e.type="CatTWPredefinedGS";else if(e.type!="CatTWPredefinedGS")throw`expecting tw.type='CatTWPredefinedGS', got '${e.type}'`;if(e.term.type!="categorical")throw`expecting tw.term.type='categorical', got '${e.term.type}'`;if(e.q.type!="predefined-groupset")throw`expecting tw.q.type='predefined-groupset', got '${e.q.type}'`;const{term:n,q:r}=e;const s=r.predefined_groupset_idx;if(s!==undefined&&!Number.isInteger(s))throw`missing or invalid tw.q.predefined_groupset_idx='${s}'`;r.predefined_groupset_idx=s||0;const o=e.term.groupsetting;if(!o)throw"no term.groupsetting";if(!((t=o.lst)===null||t===void 0?void 0:t.length))throw"term.groupsetting.lst is empty";const a=(i=o.lst)===null||i===void 0?void 0:i[r.predefined_groupset_idx];if(!a)throw`no groupset entry for groupsetting.lst?.[predefined_groupset_idx=${s}]`;if(r.mode=="binary"){if(a.groups.length!=2)throw"there must be exactly two groups"}vt(r,n);return e}}Te=new WeakMap,xe=new WeakMap;class Ie extends _e{constructor(t,i={}){super(t,i);Ee.set(this,void 0);Se.set(this,void 0);this.q=t.q;Object.defineProperty(this,"groupset",{value:this.q.customset});e(this,Ee,t,"f");e(this,Se,i,"f")}getTw(){return t(this,Ee,"f")}static fill(e){if(!e.type)e.type="CatTWCustomGS";else if(e.type!="CatTWCustomGS")throw`expecting tw.type='CatTWCustomGS', got '${e.type}'`;if(e.term.type!="categorical")throw`expecting tw.term.type='categorical', got '${e.term.type}'`;if(e.q.type!="custom-groupset")throw`expecting tw.q.type='custom-groupset', got '${e.q.type}'`;const{term:t,q:i}=e;if(!i.customset)throw`missing tw.q.customset`;if(i.mode=="binary"){if(i.customset.groups.length!=2)throw"there must be exactly two groups"}vt(i,t);return e}}Ee=new WeakMap,Se=new WeakMap;function Ce(e,t){const i=Number(e);if(Number.isInteger(i))return i;if(Math.abs(i)<1)return Number(i.toPrecision(t));return Number(i.toFixed(t))}function Oe(e){const t=je(e);let i=Math.abs(e)>1?2:t>0?t+1:2;return Ce(e,i)}function je(e){const t=e.toString();const i=t.indexOf(".");if(i===-1||i===t.length-1){return 0}let n=0;for(let e=i+1;e<t.length;e++){if(t[e]==="0"){n++}else if(t[e]>="1"&&t[e]<="9"){break}}return n}var ke,Pe,$e,Me,Le,Re,We,Be;class Ge extends be{constructor(e,t){super(e,t);this.term=e.term}static fill(e,t={}){return i(this,void 0,void 0,(function*(){if(!e.term)throw`missing tw.term, must already be filled in`;if(!Ge.termTypes.has(e.term.type))throw`non-numeric term.type='${e.term.type}'`;if(t.defaultQ){t.defaultQ.isAtomic=true;e.q.isAtomic=true;if(t.defaultQ.preferredBins=="median"){if(!t.defaultQ.type)t.defaultQ.type="custom-bin";else if(t.defaultQ.type!="custom-bin")throw".type must be custom-bin when .preferredBins=median"}o(e.q,t.defaultQ)}if(!e.q.mode)e.q.mode="discrete";if(!e.q.type){if(e.q.mode=="binary")e.q.type="custom-bin";else if(e.q.mode=="discrete")He(e)}e.type=e.q.type=="regular-bin"?"NumTWRegularBin":e.q.type=="custom-bin"||e.q.mode=="binary"?"NumTWCustomBin":e.q.mode=="continuous"?"NumTWCont":e.q.mode=="spline"?"NumTWSpline":e.type;switch(e.type){case"NumTWRegularBin":return yield Ve.fill(e);case"NumTWCustomBin":return yield De.fill(e,t);case"NumTWCont":return yield Qe.fill(e);case"NumTWSpline":return yield Ue.fill(e);default:throw`tw.type='${e.type} (q.mode:q.type=${e.q.mode}:${e.q.type}' is not supported by NumericBase.fill()`}}))}}Ge.termTypes=new Set(["integer","float","geneExpression","metaboliteIntensity"]);class Ve extends Ge{constructor(t,i={}){super(t,i);ke.set(this,void 0);Pe.set(this,void 0);this.q=t.q;e(this,ke,t,"f");e(this,Pe,i,"f")}getTw(){return t(this,ke,"f")}static fill(e){var t;return i(this,void 0,void 0,(function*(){if(!e.type)e.type="NumTWRegularBin";else if(e.type!="NumTWRegularBin")throw`expecting tw.type='NumTWRegularBin', got '${e.type}'`;if(!e.q.mode)e.q.mode="discrete";else if(e.q.mode!="discrete"&&e.q.mode!="binary"&&e.q.mode!="continuous")throw`expecting tw.q.mode='discrete'|'binary'|'continous', got '${e.q.mode}'`;if(e.q.type&&e.q.type!="regular-bin")throw`expecting tw.q.type='regular-bin', got '${e.q.type}'`;if(!e.q.first_bin||!a(e.q.bin_size))He(e);if(!a(e.q.bin_size))throw`tw.q.bin_size=${e.q.bin_size} is not numeric`;if(!e.q.first_bin)throw`missing tw.q.first_bin`;if(!a((t=e.q.first_bin)===null||t===void 0?void 0:t.stop))throw`tw.q.first_bin.stop is not numeric`;be.setHiddenValues(e.q,e.term);return e}))}}ke=new WeakMap,Pe=new WeakMap;class De extends Ge{constructor(t,i={}){super(t,i);$e.set(this,void 0);Me.set(this,void 0);this.q=t.q;e(this,$e,t,"f");e(this,Me,i,"f")}getTw(){return t(this,$e,"f")}static fill(e,t={}){return i(this,void 0,void 0,(function*(){if(!e.type)e.type="NumTWCustomBin";else if(e.type!="NumTWCustomBin")throw`expecting tw.type='NumTWCustomBin', got '${e.type}'`;if(!e.q.mode)e.q.mode="discrete";else if(e.q.mode!="discrete"&&e.q.mode!="binary")throw`expecting tw.q.mode='discrete'|binary', got '${e.q.mode}'`;if(e.q.mode=="binary"&&!e.q.preferredBins)e.q.preferredBins="median";if(e.q.preferredBins=="median"){const i=yield t.vocabApi.getPercentile(e.term.id,[50]);if(!i.values)throw".values[] missing from vocab.getPercentile()";const n=Oe(i.values[0]);if(!a(n))throw"median value not a number";e.q.type="custom-bin";e.q.lst=[{startunbounded:true,stop:n,stopinclusive:false,label:"<"+n},{start:n,startinclusive:true,stopunbounded:true,label:"≥"+n}];delete e.q.preferredBins}else if(e.q.type!="custom-bin")throw`expecting tw.q.type='custom-bin', got '${e.q.type}'`;if(!Array.isArray(e.q.lst))He(e);if(!e.q.lst||!e.q.lst.length)throw`missing or empty q.lst[] for custom-bin`;if(e.q.mode=="binary"&&e.q.lst.length!=2)throw`numeric q.mode='binary' requires exactly 2 bins`;be.setHiddenValues(e.q,e.term);e.type="NumTWCustomBin";return e}))}}$e=new WeakMap,Me=new WeakMap;class Qe extends Ge{constructor(t,i={}){super(t,i);Le.set(this,void 0);Re.set(this,void 0);this.q=t.q;e(this,Le,t,"f");e(this,Re,i,"f")}getTw(){return t(this,Le,"f")}static fill(e){return i(this,void 0,void 0,(function*(){if(!e.type)e.type="NumTWCont";else if(e.type!="NumTWCont")throw`expecting tw.type='NumTWCont', got '${e.type}'`;if(e.q.mode!="continuous")throw`tw.q.mode='${e.q.mode}', expecting 'continuous'`;be.setHiddenValues(e.q,e.term);e.type="NumTWCont";return e}))}}Le=new WeakMap,Re=new WeakMap;class Ue extends Ge{constructor(t,i={}){super(t,i);We.set(this,void 0);Be.set(this,void 0);this.q=t.q;e(this,We,t,"f");e(this,Be,i,"f")}static fill(e){return i(this,void 0,void 0,(function*(){if(!e.type)e.type="NumTWSpline";else if(e.type!="NumTWSpline")throw`expecting tw.type='NumTWSpline', got '${e.type}'`;if(e.q.mode!="spline")throw`tw.q.mode='${e.q.mode}', expecting 'spline'`;if(!e.q.knots)throw`missing tw.q.knots`;if(!e.q.knots.length)throw`empty tw.q.knots[]`;be.setHiddenValues(e.q,e.term);e.type="NumTWSpline";return e}))}}We=new WeakMap,Be=new WeakMap;const Ye=new Set(["default","less","median"]);function He(e){if(!e.term.bins)throw`missing tw.term.bins`;const t=e.q.preferredBins||"default";if(!Ye.has(t))throw`invalid preferredBins='${t}'`;if(t!="median"){if(!Object.keys(e.term.bins).includes(t));const i=e.term.bins[t];if(e.q.type&&e.q.type!=i.type)throw`mismatched tw.q.type and term.bins[preferredBins].type`;const n=Object.keys(e.q);for(const[t,r]of Object.entries(i)){if(!n.includes(t))e.q[t]=r}delete e.q.preferredBins}}class Xe{constructor(e){this.opts=e}static init(e,t={}){switch(e.type){case"CatTWValues":return new Ne(e,t);case"CatTWPredefinedGS":return new Ae(e,t);case"CatTWCustomGS":return new Ie(e,t);case"NumTWRegularBin":return new Ve(e,t);case"NumTWCustomBin":return new De(e,t);case"NumTWCont":return new Qe(e,t);default:throw`unable to init(tw)`}}static initRaw(e,t={}){return i(this,void 0,void 0,(function*(){const i=yield Xe.fill(e,t);return Xe.init(i,t)}))}static fill(e,t={}){var n,r;return i(this,void 0,void 0,(function*(){yield Xe.preprocess(e,t===null||t===void 0?void 0:t.vocabApi);const i=e.term.type=="float"||e.term.type=="integer"?"numeric":e.term.type;t.defaultQ=((n=t.defaultQByTsHandler)===null||n===void 0?void 0:n[i])||null;switch(e.term.type){case"categorical":{return yield _e.fill(e,t)}case"integer":case"float":return yield Ge.fill(e,t);default:throw`unrecognized tw.term?.type='${(r=e.term)===null||r===void 0?void 0:r.type}'`}}))}static preprocess(e,t){return i(this,void 0,void 0,(function*(){const i=Object.keys(e);if(!i.length)throw`empty tw object`;if(e.id&&!e.term){yield ct([e],t);delete e.id}if(!e.q)e.q={};e.q.isAtomic=true;Xe.reshapeLegacyTw(e)}))}static reshapeLegacyTw(e){if(Object.keys(e.q).includes("groupsetting")){if(!e.q.groupsetting.inuse){e.q.type="values"}else if(e.q.type=="predefined-groupset"){e.q.predefined_groupset_idx=e.q.groupsetting.predefined_groupset_idx}else if(e.q.type=="custom-groupset"){e.q.customset=e.q.groupsetting.customset}else{throw"invalid q.type"}delete e.q["groupsetting"]}}}function Fe(e){switch(e){case"./handlers/categorical.ts":return import("./categorical-db9b0175.js");case"./handlers/condition.ts":return import("./condition-4e788f7d.js");case"./handlers/density.ts":return import("./density-69a732f6.js");case"./handlers/geneExpression.ts":return import("./geneExpression-ff46a389.js");case"./handlers/geneVariant.ts":return import("./geneVariant-1cf17b3b.js");case"./handlers/groupsetting.ts":return import("./groupsetting-3fef59f9.js");case"./handlers/metaboliteIntensity.ts":return import("./metaboliteIntensity-ec3176f4.js");case"./handlers/numeric.binary.ts":return import("./numeric.binary-1dd9a2b4.js");case"./handlers/numeric.continuous.ts":return import("./numeric.continuous-ed132eea.js");case"./handlers/numeric.discrete.ts":return import("./numeric.discrete-d780d076.js");case"./handlers/numeric.spline.ts":return import("./numeric.spline-abe07708.js");case"./handlers/numeric.toggle.ts":return import("./numeric.toggle-647423dd.js");case"./handlers/numeric.ts":return import("./numeric-4853b665.js");case"./handlers/samplelst.ts":return import("./samplelst-4a5512df.js");case"./handlers/singleCellCellType.ts":return import("./singleCellCellType-d8c58253.js");case"./handlers/singleCellGeneExpression.ts":return import("./singleCellGeneExpression-b7209531.js");case"./handlers/snp.ts":return import("./snp-b046b7e6.js");case"./handlers/snplocus.ts":return import("./snplocus-61ff1c10.js");case"./handlers/snplst.sampleSum.ts":return import("./snplst.sampleSum-e47d05f0.js");case"./handlers/snplst.ts":return import("./snplst-6865d7c7.js");case"./handlers/survival.ts":return import("./survival-816e055a.js");default:return new Promise((function(t,i){(typeof queueMicrotask==="function"?queueMicrotask:setTimeout)(i.bind(null,new Error("Unknown variable dynamic import: "+e)))}))}}function ze(e){switch(e){case"./handlers/categorical.ts":return import("./categorical-db9b0175.js");case"./handlers/condition.ts":return import("./condition-4e788f7d.js");case"./handlers/density.ts":return import("./density-69a732f6.js");case"./handlers/geneExpression.ts":return import("./geneExpression-ff46a389.js");case"./handlers/geneVariant.ts":return import("./geneVariant-1cf17b3b.js");case"./handlers/groupsetting.ts":return import("./groupsetting-3fef59f9.js");case"./handlers/metaboliteIntensity.ts":return import("./metaboliteIntensity-ec3176f4.js");case"./handlers/numeric.binary.ts":return import("./numeric.binary-1dd9a2b4.js");case"./handlers/numeric.continuous.ts":return import("./numeric.continuous-ed132eea.js");case"./handlers/numeric.discrete.ts":return import("./numeric.discrete-d780d076.js");case"./handlers/numeric.spline.ts":return import("./numeric.spline-abe07708.js");case"./handlers/numeric.toggle.ts":return import("./numeric.toggle-647423dd.js");case"./handlers/numeric.ts":return import("./numeric-4853b665.js");case"./handlers/samplelst.ts":return import("./samplelst-4a5512df.js");case"./handlers/singleCellCellType.ts":return import("./singleCellCellType-d8c58253.js");case"./handlers/singleCellGeneExpression.ts":return import("./singleCellGeneExpression-b7209531.js");case"./handlers/snp.ts":return import("./snp-b046b7e6.js");case"./handlers/snplocus.ts":return import("./snplocus-61ff1c10.js");case"./handlers/snplst.sampleSum.ts":return import("./snplst.sampleSum-e47d05f0.js");case"./handlers/snplst.ts":return import("./snplst-6865d7c7.js");case"./handlers/survival.ts":return import("./survival-816e055a.js");default:return new Promise((function(t,i){(typeof queueMicrotask==="function"?queueMicrotask:setTimeout)(i.bind(null,new Error("Unknown variable dynamic import: "+e)))}))}}const Je=`_ts_${(+new Date).toString().slice(-8)}`;let Ze=0;function Ke(e){return i(this,void 0,void 0,(function*(){if(!e)return`${Ze++}${Je}`;delete e.$id;return yield tt(JSON.stringify(e))}))}const et=new TextEncoder;function tt(e){return i(this,void 0,void 0,(function*(){const t=et.encode(e);const i=yield crypto.subtle.digest("SHA-1",t);const n=Array.from(new Uint8Array(i));const r=n.map((e=>e.toString(16).padStart(2,"0"))).join("");return it(r).replace("=","-")}))}function it(e){return btoa([...e].reduce(((t,i,n)=>t+=!(n-1&1)?String.fromCharCode(parseInt(e.substring(n-1,n+1),16)):""),""))}const nt={menuOptions:"edit",menuLayout:"vertical"};class rt{constructor(e){this.opts=this.validateOpts(e);this.vocabApi=e.vocabApi;this.activeCohort=e.activeCohort;this.placeholder=e.placeholder;this.durations={exit:0};this.disable_terms=e.disable_terms;this.usecase=e.usecase;this.abbrCutoff=e.abbrCutoff;this.numqByTermIdModeType={};this.dom={holder:e.holder,tip:e.tip||new d({padding:"0px",parent_menu:this.opts.holder&&this.opts.holder.node()&&this.opts.holder.node().closest(".sja_menu_div")})};this.dom.tip2=new d({padding:"0px",parent_menu:this.dom.tip.d.node()});at(this);ot(this);this.initUI();const t=dt(this);this.handlerByType={default:t};this.handler=t;this.hasError=false;this.api={main:this.main.bind(this),runCallback:this.runCallback.bind(this),showTree:this.showTree,showMenu:this.showMenu.bind(this),showGeneSearch:this.showGeneSearch,hasError:()=>this.hasError,validateQ:e=>{if(!this.handler||!this.handler.validateQ)return;try{this.handler.validateQ(e)}catch(e){this.hasError=true;throw e}}}}runCallback(e=null){var t,i;const n=this.term?{term:this.term,q:this.q,isAtomic:true}:{};if("$id"in this)n.$id=this.$id;if(((t=n.q)===null||t===void 0?void 0:t.reuseId)&&n.q.reuseId===((i=this.data.q)===null||i===void 0?void 0:i.reuseId)){if(!p(n.q,this.data.q)){delete n.q.reuseId;delete n.q.name}}const r=e?JSON.parse(JSON.stringify(e)):{};if(this.opts.callback)this.opts.callback(e?o(JSON.stringify(n),r):n)}validateOpts(e){const t=Object.assign({},nt,e);if(!t.holder&&t.renderAs!="none")throw".holder missing";if(typeof t.callback!="function")throw".callback() is not a function";if(!t.vocabApi)throw".vocabApi missing";if(typeof t.vocabApi!="object");if("placeholder"in t&&!t.placeholder&&"placeholderIcon"in t&&!t.placeholderIcon)throw"must specify a non-empty opts.placeholder and/or .placeholderIcon";if(!("placeholder"in t))t.placeholder="Select term ";if(!("placeholderIcon"in t))t.placeholderIcon="+";if(!Number.isInteger(t.abbrCutoff))t.abbrCutoff=18;this.validateMenuOptions(t);if(!t.numericEditMenuVersion)t.numericEditMenuVersion=["discrete"];this.mayValidate_noTermPromptOptions(t);return t}main(e={}){return i(this,void 0,void 0,(function*(){try{if(this.doNotHideTipInMain){delete this.doNotHideTipInMain}else{this.dom.tip.hide()}this.hasError=false;delete this.error;this.validateMainData(e);this.data=e;this.term=e.term;this.q=JSON.parse(JSON.stringify(e.q));if("$id"in e)this.$id=e.$id;if("disable_terms"in e)this.disable_terms=e.disable_terms;if("filter"in e)this.filter=e.filter;if("activeCohort"in e)this.activeCohort=e.activeCohort;if("sampleCounts"in e)this.sampleCounts=e.sampleCounts;if("menuOptions"in e)this.opts.menuOptions=e.menuOptions;yield this.setHandler(this.term?this.term.type:null);if(e.term&&this.handler&&this.handler.validateQ)this.handler.validateQ(e);if(this.handler.postMain)yield this.handler.postMain();if(this.opts.renderAs!="none")this.updateUI()}catch(e){this.hasError=true;throw e}}))}validateMainData(e){if(e.term){if(!e.term.type)throw"data.term.type missing";if(x(e.term.type)){if(!e.term.id&&e.term.type!=m.SAMPLELST)throw"data.term.id missing";if(!e.term.name)throw"data.term.name missing"}}if(!e.q)e.q={};if(typeof e.q!="object")throw"data.q{} is not object";if(e.disable_terms){if(!Array.isArray(e.disable_terms))throw"data.disable_terms[] is not array"}this.mayValidate_noTermPromptOptions(e)}validateMenuOptions(e){if(!e.menuOptions)e.menuOptions=nt.menuOptions;if(e.menuOptions=="all")e.menuOptions="*";for(const t of["edit","replace","remove"]){if(X(t,e.menuOptions))return}throw`no matches found for termsetting opts.menuOptions='${e.menuOptions}'`}mayValidate_noTermPromptOptions(e){if(!e.noTermPromptOptions)return;if(!Array.isArray(e.noTermPromptOptions))throw"noTermPromptOptions[] is not array";for(const t of e.noTermPromptOptions){if(t.isDictionary);else{if(!t.termtype)throw"element of noTermPromptOptions[] missing both isDictionary=true and .termtype"}if(!t.text&&!t.html)throw"element of noTermPromptOptions[] missing both .text and .html";if(t.q&&typeof t.q!="object")throw"type.q{} is not object"}this.noTermPromptOptions=e.noTermPromptOptions}setHandler(e){return i(this,void 0,void 0,(function*(){if(!e){this.handler=this.handlerByType.default;return}const t=e=="integer"||e=="float"?"numeric":e;if(!this.handlerByType[t]){try{const e=yield ze(`./handlers/${t}.ts`);this.handlerByType[t]=yield e.getHandler(this)}catch(e){throw`error with handler='./handlers/${t}.ts': ${e}`}}this.handler=this.handlerByType[t]}))}}const st=l(rt);function ot(e){e.initUI=()=>{if(e.opts.$id){e.dom.tip.d.attr("id",e.opts.$id+"-ts-tip")}if(!e.dom.holder)return;e.dom.nopilldiv=e.dom.holder.append("div").style("cursor","pointer").on("click",e.clickNoPillDiv).on(`keyup.sjpp-termdb`,(t=>{if(t.key=="Enter")e.showTree(t)}));e.dom.pilldiv=e.dom.holder.append("div");if(e.opts.placeholder){e.dom.nopilldiv.append("div").html(e.placeholder).attr("class","sja_clbtext2").style("padding","3px 6px 3px 6px").style("display","inline-block")}if(e.opts.placeholderIcon){e.dom.nopilldiv.append("div").attr("class","sja_filter_tag_btn add_term_btn").style("padding","3px 6px 3px 6px").style("display","inline-block").style("border-radius","6px").style("background-color","#4888BF").text(e.opts.placeholderIcon)}e.dom.btnDiv=e.dom.holder.append("div");e.dom.content_holder=u(e.dom.holder.node().parentNode).append("div")};e.updateUI=()=>i(this,void 0,void 0,(function*(){e.dom.btnDiv.selectAll("*").remove();e.dom.content_holder.selectAll("*").remove();if(!e.term){e.dom.nopilldiv.style("display","block");e.dom.pilldiv.style("display","none");e.dom.btnDiv.style("display","none");return}if(e.term.hashtmldetail){if(e.opts.buttons&&!e.opts.buttons.includes("info"))e.opts.buttons.unshift("info");else e.opts.buttons=["info"]}else{e.opts.buttons=[]}if(e.opts.buttons.length){e.dom.btnDiv.selectAll("div").data(e.opts.buttons).enter().append("div").style("display","inline-block").style("padding","0px 5px").style("cursor","pointer").style("color","#999").style("font-size",".8em").html((e=>e.toUpperCase())).on("click",((t,i)=>{if(i=="delete")e.removeTerm();else if(i=="replace"){e.showTree(t.target)}else throw"unknown button"}));if(e.term.hashtmldetail){const t=e.dom.btnDiv.selectAll("div").filter((function(){return u(this).text()==="INFO"}));const i=yield import("./termInfo-d0a9e65f.js");i.termInfoInit({vocabApi:e.opts.vocabApi,icon_holder:t,content_holder:e.dom.content_holder,id:e.term.id,state:{term:e.term}})}}e.dom.nopilldiv.style("display","none");e.dom.pilldiv.style("display",e.opts.buttons?"inline-block":"block");e.dom.btnDiv.style("display",e.opts.buttons?"inline-block":"none");const t=e.dom.pilldiv.selectAll(".ts_pill").data([e.term],(e=>e.id));t.exit().each(e.exitPill);t.transition().duration(200).each(e.updatePill);t.enter().append("div").attr("class","ts_pill").style("display","grid").style("grid-template-columns","auto").style("grid-template-areas",'"left right"').style("cursor","pointer").style("margin","2px").on("click",e.showMenu).transition().duration(200).each(e.enterPill)}));e.enterPill=function(){return i(this,void 0,void 0,(function*(){const t=u(this);e.dom.pill_termname=t.append("div").attr("class","term_name_btn sja_filter_tag_btn").attr("tabindex",0).style("display","flex").style("grid-area","left").style("position","relative").style("align-items","center").style("padding","3px 6px 3px 6px").style("border-radius","6px").html(e.handler.getPillName).on(`keyup.sjpp-termdb`,(e=>{if(e.key=="Enter")e.target.click()}));e.updatePill.call(this)}))};e.updatePill=function(){return i(this,void 0,void 0,(function*(){const t=u(this);const i=e.handler.getPillStatus()||{};e.dom.pill_termname.style("border-radius",i.text?"6px 0 0 6px":"6px").html(e.handler.getPillName);const n=t.selectAll(".ts_summary_btn").data(i.text?[{txt:i.text}]:[],(e=>e.txt));n.exit().remove();const r=n.enter().append("div").attr("class","ts_summary_btn sja_filter_tag_btn").style("display","flex").style("grid-area","right").style("position","relative").style("align-items","center").style("padding","3px 6px 3px 6px").style("border-radius","0 6px 6px 0").style("font-style","italic").html((e=>e.txt)).style("opacity",0).transition().duration(200).style("opacity",1);if(i.bgcolor){r.transition().duration(200).style("background-color",i.bgcolor)}}))};e.exitPill=function(){u(this).style("opacity",1).transition().duration(e.durations.exit).style("opacity",0).remove()}}function at(e){e.removeTerm=()=>{e.opts.callback(null)};e.cancelGroupsetting=()=>{e.opts.callback({id:e.term.id,term:e.term,q:{mode:"discrete",type:"values",isAtomic:true}})};e.clickNoPillDiv=()=>i(this,void 0,void 0,(function*(){if(!e.noTermPromptOptions||e.noTermPromptOptions.length==0){yield e.showTree(e.dom.nopilldiv.node());return}e.dom.tip.clear().showunder(e.dom.nopilldiv.node());for(const t of e.noTermPromptOptions){const n=e.dom.tip.d.append("div").attr("class","sja_menuoption sja_sharp_border").on("click",(()=>i(this,void 0,void 0,(function*(){e.dom.tip.clear();if(t.isDictionary){yield e.showTree(e.dom.tip.d.node())}else if(t.termtype){if(t.q)e.q=structuredClone(t.q);yield e.setHandler(t.termtype);if(q(e.term)&&!e.term.bins&&e.term.type!="survival"){yield e.vocabApi.setTermBins({term:e.term,q:e.q})}e.handler.showEditMenu(e.dom.tip.d)}else{throw"termtype missing"}}))));if(t.text)n.text(t.text);else if(t.html)n.html(t.html)}}));e.showTree=function(t,n){return i(this,void 0,void 0,(function*(){e.dom.tip.clear();if(t)e.dom.tip.showunder(t instanceof Element?t:this instanceof Element?this:e.dom.holder.node());else e.dom.tip.show(n.clientX,n.clientY);if(!e.usecase)e.usecase={target:"default"};const r=yield import("./app-686b9547.js");r.appInit({holder:e.dom.tip.d,vocabApi:e.vocabApi,state:{activeCohort:e.activeCohort,tree:{usecase:e.usecase}},tree:{disable_terms:e.disable_terms,click_term:t=>i(this,void 0,void 0,(function*(){e.dom.tip.hide();let i;if(t.term)i=t;else{const e=t;i={term:e,q:{isAtomic:true},isAtomic:true}}if(e.opts.customFillTw)e.opts.customFillTw(i);yield yt(i,e.vocabApi,e.opts.defaultQ4fillTW);e.opts.callback(i)}))}})}))};e.showMenu=(t,n=null,r=null)=>{var s,o,a;const l=e.dom.tip;l.clear();if(e.opts.renderAs=="none"&&n)e.dom.holder=u(n);if(e.dom.holder){const i=(s=e.dom.holder)===null||s===void 0?void 0:s.node();if(i)l.showunder(i);else l.show(t.clientX,t.clientY)}const d=[];if(e.q.type=="predefined-groupset"||e.q.type=="custom-groupset"){if(e.q.mode!="binary"&&e.term.type!="geneVariant"){d.push({label:"Cancel grouping",callback:e.cancelGroupsetting})}}if(e.q&&!((o=e.term.groupsetting)===null||o===void 0?void 0:o.disabled)&&X("edit",e.opts.menuOptions)){d.push({label:"Edit",callback:t=>i(this,void 0,void 0,(function*(){if(e.term&&q(e.term)&&!e.term.bins&&e.term.type!="survival"){yield e.vocabApi.setTermBins({term:e.term,q:e.q})}e.handler.showEditMenu(t)}))})}if(X("replace",e.opts.menuOptions)){d.push({label:"Replace",callback:e.showTree})}if(X("remove",e.opts.menuOptions)){d.push({label:"Remove",callback:e.removeTerm})}if(e.opts.customMenuOptions)d.push(...e.opts.customMenuOptions);e.openMenu=r||l.d;e.openMenu.selectAll("div").data(d).enter().append("div").attr("class","sja_menuoption sja_sharp_border").attr("tabindex",((e,t)=>t+1)).style("display",e.opts.menuLayout=="horizontal"?"inline-block":"block").text((e=>e.label)).on("click",((t,i)=>{e.dom.tip.clear();i.callback(e.dom.tip.d)})).on("keyup",(e=>{if(e.key=="Enter")e.target.click()}));(a=e.openMenu.select(".sja_menuoption").node())===null||a===void 0?void 0:a.focus()};e.showReuseMenu=function(t){return i(this,void 0,void 0,(function*(){const n=t.append("div");n.style("display","block").style("padding","10px").append("span").style("color","#aaa").html("Save current setting as ");const r=e.vocabApi.getCustomTermQLst(e.term);const s=n.append("input").attr("type","text").attr("placeholder",r.nextReuseId).attr("value",e.q.reuseId||r.nextReuseId);n.append("button").style("margin-left","5px").html("Save").on("click",(()=>{const t=s.property("value").trim()||r.nextReuseId;e.q.reuseId=t;e.vocabApi.cacheTermQ(e.term,e.q);e.runCallback();e.dom.tip.hide()}));const o=t.append("div").style("margin","10px");const a={term:e.term,q:{}};yield ht(a,e.vocabApi);a.q.reuseId="Default";r.push(a.q);if(r.length>1){o.append("div").style("color","#aaa").html("Previously saved settings")}o.append("table").selectAll("tr").data(r).enter().append("tr").style("margin","2px 5px").each((function(t){const n=u(this);const r=lt(e.q,t);const s=t.name||t.reuseId;n.append("td").style("min-width","180px").style("text-align","center").html(s);const o=n.append("td").style("text-align","center");if(r){o.html(`In use <span style='color:#5a5;font-weight:600'>✓</span>`)}else{o.append("button").style("min-width","80px").html("Use").on("click",(()=>{if(t.reuseId==="Default"){delete t.reuseId;delete t.name}e.q=t;e.dom.tip.hide();e.runCallback()}))}const a=n.append("td").style("text-align","center");if(!r&&t.reuseId!="Default"){a.append("button").style("min-width","80px").html("Delete").on("click",(()=>i(this,void 0,void 0,(function*(){yield e.vocabApi.uncacheTermQ(e.term,t);e.dom.tip.hide();e.runCallback()}))))}}));t.append("div").style("margin","20px 5px 5px 5px").style("padding","5px").style("font-size","0.8em").style("color","#aaa").html(`Saving the setting will allow it to be reused at another chart.<br/>`+`The setting will be reusable in your current or saved session.`)}))};e.showGeneSearch=function(t,n){e.dom.tip.clear();if(t)e.dom.tip.showunder(t instanceof Element?t:this instanceof Element?this:e.dom.holder.node());else e.dom.tip.show(n.clientX,n.clientY);const r=new Set;const s=e.dom.tip.d.append("div").style("padding","5px");const o=s.append("label");o.append("span").text("Search: ");const a=o.append("input").attr("type","text").on("input",(()=>i(this,void 0,void 0,(function*(){const t=a.property("value");try{const i=!t?{lst:[]}:yield e.vocabApi.findTerm(t,e.activeCohort,e.usecase,"gene");l.selectAll("*").remove();l.selectAll("div").data(i.lst.filter((e=>!r.has(e)))).enter().append("div").attr("class","ts_pill sja_filter_tag_btn sja_tree_click_term").style("display","block").style("margin","2px 3px").style("width","fit-content").text((e=>e.name)).on("click",(t=>{e.dom.tip.hide();e.runCallback({term:{name:t.name,type:"geneVariant"},q:{exclude:[]}})}))}catch(e){alert("Search error: "+e)}}))));const l=e.dom.tip.d.append("div").style("margin","5px").style("padding-left","5px").style("border-left","2px solid #ccc")}}function lt(e,t){const i=[e,t].map((e=>JSON.parse(JSON.stringify(e))));for(const e of i){delete e.binLabelFormatter;if(e.reuseId==="Default")delete e.reuseId;if(e.mode==="continuous")delete e.mode;if(e.mode==="discrete"&&e.type=="custom-bin"&&e.lst){for(const t of e.lst){delete t.range}}}return p(...i)}function dt(e){return{showEditMenu(){},getPillStatus(){},getPillName(t){return pt(e,t)}}}function pt(e,t){if(!e.opts.abbrCutoff)return t.name;return t.name.length<=e.opts.abbrCutoff+2?t.name:'<label title="'+t.name+'">'+t.name.substring(0,e.opts.abbrCutoff)+"..."+"</label>"}function ut(e,t,n){return i(this,void 0,void 0,(function*(){yield ct(e,t);const i=[];for(const r of e){i.push(ht(r,t,n))}yield Promise.all(i)}))}function ct(e,t){return i(this,void 0,void 0,(function*(){const i=[];for(const t of e){if(t.term)continue;if(t.id===undefined||t.id==="")throw".id is required";i.push(t.id)}const n=i.length?yield t.getTerms(i):{};for(const t of i){if(!n[t])throw`missing dictionary term for id=${t}`;for(const t of e){if(t.id&&t.id in n)t.term=n[t.id]}}}))}console.warn("--- Using xtw ---");const ft=new Set(["categorical","integer","float"]);function ht(e,t,n){var r;return i(this,void 0,void 0,(function*(){e.isAtomic=true;if(!e.term&&e.id){yield ct([e],t)}if(ft.has((r=e.term)===null||r===void 0?void 0:r.type)){const i=yield Xe.fill(e,{vocabApi:t,defaultQByTsHandler:n});Object.assign(e,i);gt(e);if(!e.$id)e.$id=yield Ke(t.getTwMinCopy(e));if(e.q)e.q.isAtomic=true;return e}delete e.id;if(!e.q)e.q={};e.q.isAtomic=true;mt(e);yield yt(e,t,n);gt(e);if(!e.$id)e.$id=yield Ke(t.getTwMinCopy(e));return e}))}function mt(e){if(Object.keys(e.q).includes("groupsetting")){if(e.q["groupsetting"]["inuse"]){if(e.q.type=="predefined-groupset"){e.q["predefined_groupset_idx"]=e.q["groupsetting"]["predefined_groupset_idx"]}else if(e.q.type=="custom-groupset"){e.q["customset"]=e.q["groupsetting"]["customset"]}else{throw"invalid q.type"}}else{e.q.type="values"}delete e.q["groupsetting"]}}function yt(e,t,n){return i(this,void 0,void 0,(function*(){if(!e.$id)e.$id=yield Ke(t.getTwMinCopy(e));const i=e.term.type;const r=i=="float"||i=="integer"?"numeric":i;let s;if(e.term.type){try{s=yield Fe(`./handlers/${r}.ts`)}catch(e){throw`Type ${r} does not exist`}}else throw`Type not defined for ${JSON.stringify(e)}`;yield s.fillTW(e,t,n?n[r]:null)}))}function gt(e){if(!("mode"in e.q)){return}if(typeof e.q.mode!="string")throw"q.mode not string"}function vt(e,t){if(!e.hiddenValues){e.hiddenValues={};if(t.values){for(const i in t.values){if(t.values[i].uncomputable)e.hiddenValues[i]=1}}}}export{h as N,f as R,m as T,T as a,x as b,Oe as c,E as d,S as e,ht as f,Ke as g,st as h,q as i,je as j,y as k,Xe as l,ut as m,b as n,pt as o,Ce as r,vt as s,g as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as t}from"./brush-bb4ae2fb.js";import{c as n}from"./termsetting-ad8c4f3a.js";import{d as e}from"./app-2cd97738.js";import"./pointer-c7475677.js";import"./nodrag-ab7d5a9f.js";import"./tslib.es6-c3c2d88f.js";import"path";function s(t,n){const s=t.num_obj.brushes;const r=t.num_obj.density_data.maxvalue;const a=t.num_obj.density_data.minvalue;const i=(r-a)/10;const u=t.tvs.term.type=="integer"?Math.floor(i):i;for(const[e,o]of t.num_obj.ranges.entries()){const t=s.find((t=>t.orig===o));let e;if(!t){e={orig:o,range:JSON.parse(JSON.stringify(o))};s.push(e)}else{e=t}if(o.start===""){if(n=="center")e.range.start=a+u*4;else e.range.start=a+u*8}if(o.stop===""){if(n=="center")e.range.stop=a+u*6;else e.range.stop=Math.floor(r)}}const d=t.num_obj.brush_g.selectAll(".range_brush").data(s,(t=>s.indexOf(t)));d.exit().remove();d.each((function(t,n){e(this).selectAll(".overlay").style("pointer-events","all")}));d.enter().append("g").attr("class","range_brush").each((function(n,e){o(t,this,n)}))}function o(n,s,o){if(!o.elem)o.elem=e(s);const a=o.range;const i=n.num_obj.plot_size;const u=n.num_obj.xscale;const d=n.num_obj.density_data.maxvalue;const c=n.num_obj.density_data.minvalue;o.d3brush=t().extent([[0,0],[i.width,i.height]]).on("brush",(function(t,e){const s=t.selection;if(!s)return;const i=o.rangeInput.getRange();if(i.value!=undefined){o.range=i;return}r(u,s,a,i,c,d,n.tvs.term.type);const l=a.startunbounded?"":i.startinclusive?`${a.start} <=`:`${a.start} <`;const p=a.stopunbounded?"":i.stopinclusive?`<= ${a.stop}`:`< ${a.stop}`;o.rangeInput.getInput().node().value=`${l} x ${p}`})).on("end",(function(){o.elem.selectAll(".overlay").style("pointer-events","none")}));const l=a.startunbounded?c:a.start;const p=a.stopunbounded?d:a.stop;o.init=()=>{if(a.value==undefined)o.elem.call(o.d3brush).call(o.d3brush.move,[l,p].map(u))};if(a.startunbounded)delete a.start;if(a.stopunbounded)delete a.stop;o.elem.selectAll(".selection").style("fill",o.orig.start===""&&o.orig.stop===""||JSON.stringify(a)!=JSON.stringify(o.orig)?"#23cba7":"#777777")}function r(t,e,s,o,r,i,u){s.start=a(t,e[0]);s.stop=a(t,e[1]);const d=n(Number(r));const c=n(Number(i));s.startunbounded=d==s.start&&o.startunbounded;s.stopunbounded=c==s.stop&&o.stopunbounded;if(u=="integer"){s.start=s.startunbounded?"":Math.round(s.start);s.stop=s.stopunbounded?"":Math.round(s.stop)}}function a(t,e){let s=Number(t.invert(e));return n(s)}function i(t,n="end",e){const o={start:"",stop:"",index:t.tvs.ranges.length};t.num_obj.ranges.push(o);const r={orig:o,range:JSON.parse(JSON.stringify(o))};t.num_obj.brushes.push(r);s(t,n);if(e)e();r.init()}export{s as addBrushes,i as addNewBrush,r as updateTempRanges};
|