index.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. module.exports = (function() {
  2. var __MODS__ = {};
  3. var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexports: {} }; __MODS__[modId] = { status: 0, func: func, req: req, m: m }; };
  4. var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
  5. var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
  6. var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
  7. __DEFINE__(1676793464763, function(require, module, exports) {
  8. // https://d3js.org/d3-dispatch/ v1.0.6 Copyright 2019 Mike Bostock
  9. (function (global, factory) {
  10. typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
  11. typeof define === 'function' && define.amd ? define(['exports'], factory) :
  12. (global = global || self, factory(global.d3 = global.d3 || {}));
  13. }(this, function (exports) {
  14. var noop = {value: function() {}};
  15. function dispatch() {
  16. for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {
  17. if (!(t = arguments[i] + "") || (t in _) || /[\s.]/.test(t)) throw new Error("illegal type: " + t);
  18. _[t] = [];
  19. }
  20. return new Dispatch(_);
  21. }
  22. function Dispatch(_) {
  23. this._ = _;
  24. }
  25. function parseTypenames(typenames, types) {
  26. return typenames.trim().split(/^|\s+/).map(function(t) {
  27. var name = "", i = t.indexOf(".");
  28. if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
  29. if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t);
  30. return {type: t, name: name};
  31. });
  32. }
  33. Dispatch.prototype = dispatch.prototype = {
  34. constructor: Dispatch,
  35. on: function(typename, callback) {
  36. var _ = this._,
  37. T = parseTypenames(typename + "", _),
  38. t,
  39. i = -1,
  40. n = T.length;
  41. // If no callback was specified, return the callback of the given type and name.
  42. if (arguments.length < 2) {
  43. while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;
  44. return;
  45. }
  46. // If a type was specified, set the callback for the given type and name.
  47. // Otherwise, if a null callback was specified, remove callbacks of the given name.
  48. if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback);
  49. while (++i < n) {
  50. if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);
  51. else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);
  52. }
  53. return this;
  54. },
  55. copy: function() {
  56. var copy = {}, _ = this._;
  57. for (var t in _) copy[t] = _[t].slice();
  58. return new Dispatch(copy);
  59. },
  60. call: function(type, that) {
  61. if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];
  62. if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
  63. for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
  64. },
  65. apply: function(type, that, args) {
  66. if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
  67. for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
  68. }
  69. };
  70. function get(type, name) {
  71. for (var i = 0, n = type.length, c; i < n; ++i) {
  72. if ((c = type[i]).name === name) {
  73. return c.value;
  74. }
  75. }
  76. }
  77. function set(type, name, callback) {
  78. for (var i = 0, n = type.length; i < n; ++i) {
  79. if (type[i].name === name) {
  80. type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));
  81. break;
  82. }
  83. }
  84. if (callback != null) type.push({name: name, value: callback});
  85. return type;
  86. }
  87. exports.dispatch = dispatch;
  88. Object.defineProperty(exports, '__esModule', { value: true });
  89. }));
  90. }, function(modId) {var map = {}; return __REQUIRE__(map[modId], modId); })
  91. return __REQUIRE__(1676793464763);
  92. })()
  93. //miniprogram-npm-outsideDeps=[]
  94. //# sourceMappingURL=index.js.map