{"version":3,"sources":["jsdelivr-header.js","/npm/d3-measure-text@0.0.2/lib/d3-measure-text.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,CCLA,SAAU,GAcV,SAAS,EAAe,EAAM,GAC5B,IAAK,GAAwB,IAAhB,EAAK,OAChB,MAAO,CAAC,OAAQ,EAAG,MAAO,GAE5B,IAAI,EAAY,EAAc,GAAG,OAAO,QAAQ,OAAO,OACnD,GACF,EAAU,KAAK,QAAS,GAE1B,EAAU,OAAO,QAAQ,KAAK,CAAC,GAAI,IAAM,GAAI,MAAO,KAAK,GAEzD,IAAI,EAAO,EAAU,OAAO,UAG5B,OAFA,EAAU,SAEH,CAAC,OAAQ,EAAK,OAAQ,MAAO,EAAK,MAC3C,CAzBsB,oBAAX,QAA0B,OAAO,IAC1C,OAAO,IAAI,WACT,OAAO,CACT,IAC2B,oBAAX,QAA0B,OAAO,QACjD,OAAO,QAAU,EAEjB,EAAQ,cAAgB,EAoB1B,EAAc,GAAK,EAAc,IAAM,EAAQ,EAE9C,CAhCD,CAgCG","file":"/npm/d3-measure-text@0.0.2/lib/d3-measure-text.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/d3-measure-text@0.0.2/lib/d3-measure-text.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","//this code is modified from http://stackoverflow.com/a/14615428/10333\n(function(globals){\n\n//UMD\nif (typeof define !== 'undefined' && define.amd) { //require.js / AMD\n  define([], function() {\n    return d3MeasureText\n  })\n} else if (typeof module !== 'undefined' && module.exports) { //CommonJS\n  module.exports = d3MeasureText\n} else {\n  globals.d3MeasureText = d3MeasureText\n}\n\n//lowercase because it's not a constructor function\nfunction d3MeasureText (text, className) {\n  if (!text || text.length === 0)\n    return {height: 0, width: 0}\n\n  var container = d3MeasureText.d3.select('body').append('svg')\n  if (className)\n    container.attr('class', className)\n\n  container.append('text').attr({x: -1000, y: -1000}).text(text)\n\n  var bbox = container.node().getBBox()\n  container.remove()\n\n  return {height: bbox.height, width: bbox.width}\n}\n\nd3MeasureText.d3 = d3MeasureText.d3 || globals.d3 //<--- if this doesn't exist, user will have to set it\n\n})(this);"]}