diff x/static/js/9088.9fbbeb5c.chunk.js.map @ 125:49f3d3878413 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
author fubar
date Sat, 05 Oct 2024 23:58:05 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/x/static/js/9088.9fbbeb5c.chunk.js.map	Sat Oct 05 23:58:05 2024 +0000
@@ -0,0 +1,1 @@
+{"version":3,"file":"static/js/9088.9fbbeb5c.chunk.js","mappings":"sQAQA,SAASA,IACP,IAEIC,EACAC,EACAC,EACAC,EAGAC,EARAC,EAAK,EACLC,EAAK,EAKLC,EAAe,KACfC,GAAQ,EAGZ,SAASC,EAAMC,GACb,OAAY,MAALA,GAAaC,MAAMD,GAAKA,GAAKN,EAAUG,EAAqB,IAARL,EAAY,IAAOQ,GAAKP,EAAUO,GAAKV,GAAME,EAAKM,EAAQI,KAAKC,IAAI,EAAGD,KAAKE,IAAI,EAAGJ,IAAMA,GACrJ,CAcA,SAASK,EAAMC,GACb,OAAO,SAASC,GACd,IAAIC,EAAIC,EACR,OAAOC,UAAUC,SAAWH,EAAIC,GAAMF,EAAGV,EAAeS,EAAYE,EAAIC,GAAKV,GAAS,CAACF,EAAa,GAAIA,EAAa,GACvH,CACF,CAUA,OA3BAE,EAAMa,OAAS,SAASL,GACtB,OAAOG,UAAUC,SAAWhB,EAAIC,GAAMW,EAAGjB,EAAKG,EAAUE,GAAMA,GAAKJ,EAAKE,EAAUG,GAAMA,GAAKJ,EAAMF,IAAOC,EAAK,EAAI,GAAKA,EAAKD,GAAKS,GAAS,CAACJ,EAAIC,EAClJ,EAEAG,EAAMD,MAAQ,SAASS,GACrB,OAAOG,UAAUC,QAAUb,IAAUS,EAAGR,GAASD,CACnD,EAEAC,EAAMF,aAAe,SAASU,GAC5B,OAAOG,UAAUC,QAAUd,EAAeU,EAAGR,GAASF,CACxD,EASAE,EAA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AAO,IAExBlB,EAAI8C,QAAQ9E,KAAK+E,GAAK,GACtB,IAAI3B,EAAQ4B,KAAKC,MACjB,IAAK,MAAM,KAAElB,EAAI,KAAEC,EAAI,OAAEC,KAAY/B,EACnCF,EAAIkD,WAAYzB,EAAAA,EAAAA,gBAAetB,EAAQ,QAAS,CAC9CgD,MAAOlB,EACPN,WACAJ,YACA1D,QACA4C,gBAEFT,EAAIoD,UAAUrB,EAAOL,GAAUL,GAAIW,EAAON,GAAUL,EAAGA,EAAGA,IACrD2B,KAAKC,MAAQ7B,EAAQ,YAClBU,EAAAA,EAAAA,iBAAgBzB,GACtBe,GAAS4B,KAAKC,OAGlBjD,EAAIqD,SACN,CAEF,C","sources":["../../../node_modules/d3-scale/src/sequential.js","../../../plugins/hic/src/HicRenderer/viridis.ts","../../../plugins/hic/src/HicRenderer/makeImageData.ts"],"sourcesContent":["import {interpolate, interpolateRound} from \"d3-interpolate\";\nimport {identity} from \"./continuous.js\";\nimport {initInterpolator} from \"./init.js\";\nimport {linearish} from \"./linear.js\";\nimport {loggish} from \"./log.js\";\nimport {symlogish} from \"./symlog.js\";\nimport {powish} from \"./pow.js\";\n\nfunction transformer() {\n  var x0 = 0,\n      x1 = 1,\n      t0,\n      t1,\n      k10,\n      transform,\n      interpolator = identity,\n      clamp = false,\n      unknown;\n\n  function scale(x) {\n    return x == null || isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x));\n  }\n\n  scale.domain = function(_) {\n    return arguments.length ? ([x0, x1] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1];\n  };\n\n  scale.clamp = function(_) {\n    return arguments.length ? (clamp = !!_, scale) : clamp;\n  };\n\n  scale.interpolator = function(_) {\n    return arguments.length ? (interpolator = _, scale) : interpolator;\n  };\n\n  function range(interpolate) {\n    return function(_) {\n      var r0, r1;\n      return arguments.length ? ([r0, r1] = _, interpolator = interpolate(r0, r1), scale) : [interpolator(0), interpolator(1)];\n    };\n  }\n\n  scale.range = range(interpolate);\n\n  scale.rangeRound = range(interpolateRound);\n\n  scale.unknown = function(_) {\n    return arguments.length ? (unknown = _, scale) : unknown;\n  };\n\n  return function(t) {\n    transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0);\n    return scale;\n  };\n}\n\nexport function copy(source, target) {\n  return target\n      .domain(source.domain())\n      .interpolator(source.interpolator())\n      .clamp(source.clamp())\n      .unknown(source.unknown());\n}\n\nexport default function sequential() {\n  var scale = linearish(transformer()(identity));\n\n  scale.copy = function() {\n    return copy(scale, sequential());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialLog() {\n  var scale = loggish(transformer()).domain([1, 10]);\n\n  scale.copy = function() {\n    return copy(scale, sequentialLog()).base(scale.base());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSymlog() {\n  var scale = symlogish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, sequentialSymlog()).constant(scale.constant());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialPow() {\n  var scale = powish(transformer());\n\n  scale.copy = function() {\n    return copy(scale, sequentialPow()).exponent(scale.exponent());\n  };\n\n  return initInterpolator.apply(scale, arguments);\n}\n\nexport function sequentialSqrt() {\n  return sequentialPow.apply(null, arguments).exponent(0.5);\n}\n","// @ts-nocheck\n// vendored from\n// https://github.com/d3/d3-scale-chromatic/blob/main/src/sequential-multi/viridis.js,\n// license reproduced below\n//\n// Copyright 2010-2024 Mike Bostock\n\n// Permission to use, copy, modify, and/or distribute this software for any purpose\n// with or without fee is hereby granted, provided that the above copyright notice\n// and this permission notice appear in all copies.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\n// FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS\n// OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\n// TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF\n// THIS SOFTWARE.\nfunction colors(specifier) {\n  const n = (specifier.length / 6) | 0\n  const colors = new Array(n)\n  let i = 0\n  while (i < n) {\n    colors[i] = `#${specifier.slice(i * 6, ++i * 6)}`\n  }\n  return colors\n}\n\nfunction ramp(range) {\n  const n = range.length\n  return function (t) {\n    return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))]\n  }\n}\n\nexport default ramp(\n  colors(\n    '44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725',\n  ),\n)\n","import { RenderArgs as ServerSideRenderArgs } from '@jbrowse/core/pluggableElementTypes/renderers/ServerSideRendererType'\nimport { Region } from '@jbrowse/core/util/types'\nimport { abortBreakPoint } from '@jbrowse/core/util'\nimport { readConfObject } from '@jbrowse/core/configuration'\nimport { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter'\nimport { getAdapter } from '@jbrowse/core/data_adapters/dataAdapterCache'\nimport { colord } from '@jbrowse/core/util/colord'\nimport {\n  scaleSequential,\n  scaleSequentialLog,\n} from '@mui/x-charts-vendor/d3-scale'\nimport { interpolateRgbBasis } from '@mui/x-charts-vendor/d3-interpolate'\nimport PluginManager from '@jbrowse/core/PluginManager'\n\nimport interpolateViridis from './viridis'\nimport { RenderArgsDeserializedWithFeatures } from './HicRenderer'\n\ninterface HicDataAdapter extends BaseFeatureDataAdapter {\n  getResolution: (bp: number) => Promise<number>\n}\n\nexport interface RenderArgs extends ServerSideRenderArgs {\n  regions: Region[]\n}\n\nexport async function makeImageData(\n  ctx: CanvasRenderingContext2D,\n  props: RenderArgsDeserializedWithFeatures & { pluginManager: PluginManager },\n) {\n  const {\n    features,\n    config,\n    bpPerPx,\n    signal,\n    resolution,\n    sessionId,\n    adapterConfig,\n    useLogScale,\n    colorScheme,\n    regions,\n    pluginManager,\n  } = props\n  const region = regions[0]!\n  const { dataAdapter } = await getAdapter(\n    pluginManager,\n    sessionId,\n    adapterConfig,\n  )\n  const res = await (dataAdapter as HicDataAdapter).getResolution(\n    bpPerPx / resolution,\n  )\n\n  const width = (region.end - region.start) / bpPerPx\n  const w = res / (bpPerPx * Math.sqrt(2))\n  const baseColor = colord(readConfObject(config, 'baseColor'))\n  const offset = Math.floor(region.start / res)\n  if (features.length) {\n    let maxScore = 0\n    let minBin = 0\n    let maxBin = 0\n    await abortBreakPoint(signal)\n    for (const { bin1, bin2, counts } of features) {\n      maxScore = Math.max(counts, maxScore)\n      minBin = Math.min(Math.min(bin1, bin2), minBin)\n      maxBin = Math.max(Math.max(bin1, bin2), maxBin)\n    }\n    await abortBreakPoint(signal)\n    const colorSchemes = {\n      juicebox: ['rgba(0,0,0,0)', 'red'],\n      fall: interpolateRgbBasis([\n        'rgb(255, 255, 255)',\n        'rgb(255, 255, 204)',\n        'rgb(255, 237, 160)',\n        'rgb(254, 217, 118)',\n        'rgb(254, 178, 76)',\n        'rgb(253, 141, 60)',\n        'rgb(252, 78, 42)',\n        'rgb(227, 26, 28)',\n        'rgb(189, 0, 38)',\n        'rgb(128, 0, 38)',\n        'rgb(0, 0, 0)',\n      ]),\n      viridis: interpolateViridis,\n    }\n    const m = useLogScale ? maxScore : maxScore / 20\n\n    // @ts-expect-error\n    const x1 = colorSchemes[colorScheme] || colorSchemes.juicebox\n    const scale = useLogScale\n      ? scaleSequentialLog(x1).domain([1, m])\n      : scaleSequential(x1).domain([0, m])\n    ctx.save()\n\n    if (region.reversed === true) {\n      ctx.scale(-1, 1)\n      ctx.translate(-width, 0)\n    }\n    ctx.rotate(-Math.PI / 4)\n    let start = Date.now()\n    for (const { bin1, bin2, counts } of features) {\n      ctx.fillStyle = readConfObject(config, 'color', {\n        count: counts,\n        maxScore,\n        baseColor,\n        scale,\n        useLogScale,\n      })\n      ctx.fillRect((bin1 - offset) * w, (bin2 - offset) * w, w, w)\n      if (+Date.now() - start > 400) {\n        await abortBreakPoint(signal)\n        start = +Date.now()\n      }\n    }\n    ctx.restore()\n  }\n  return undefined\n}\n"],"names":["transformer","t0","t1","k10","transform","unknown","x0","x1","interpolator","clamp","scale","x","isNaN","Math","max","min","range","interpolate","_","r0","r1","arguments","length","domain","rangeRound","t","copy","source","target","sequential","linear","init","apply","sequentialLog","log","base","n","floor","specifier","colors","Array","i","slice","async","makeImageData","ctx","props","features","config","bpPerPx","signal","resolution","sessionId","adapterConfig","useLogScale","colorScheme","regions","pluginManager","region","dataAdapter","getAdapter","res","getResolution","width","end","start","w","sqrt","baseColor","colord","readConfObject","offset","maxScore","minBin","maxBin","abortBreakPoint","bin1","bin2","counts","colorSchemes","juicebox","fall","interpolateRgbBasis","viridis","interpolateViridis","m","scaleSequentialLog","scaleSequential","save","reversed","translate","rotate","PI","Date","now","fillStyle","count","fillRect","restore"],"sourceRoot":""}
\ No newline at end of file