add lisp packages
This commit is contained in:
217
lisp/emacs-application-framework/app/mermaid/node_modules/d3-collection/dist/d3-collection.js
generated
vendored
Normal file
217
lisp/emacs-application-framework/app/mermaid/node_modules/d3-collection/dist/d3-collection.js
generated
vendored
Normal file
@@ -0,0 +1,217 @@
|
||||
// https://d3js.org/d3-collection/ v1.0.7 Copyright 2018 Mike Bostock
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||||
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
||||
(factory((global.d3 = global.d3 || {})));
|
||||
}(this, (function (exports) { 'use strict';
|
||||
|
||||
var prefix = "$";
|
||||
|
||||
function Map() {}
|
||||
|
||||
Map.prototype = map.prototype = {
|
||||
constructor: Map,
|
||||
has: function(key) {
|
||||
return (prefix + key) in this;
|
||||
},
|
||||
get: function(key) {
|
||||
return this[prefix + key];
|
||||
},
|
||||
set: function(key, value) {
|
||||
this[prefix + key] = value;
|
||||
return this;
|
||||
},
|
||||
remove: function(key) {
|
||||
var property = prefix + key;
|
||||
return property in this && delete this[property];
|
||||
},
|
||||
clear: function() {
|
||||
for (var property in this) if (property[0] === prefix) delete this[property];
|
||||
},
|
||||
keys: function() {
|
||||
var keys = [];
|
||||
for (var property in this) if (property[0] === prefix) keys.push(property.slice(1));
|
||||
return keys;
|
||||
},
|
||||
values: function() {
|
||||
var values = [];
|
||||
for (var property in this) if (property[0] === prefix) values.push(this[property]);
|
||||
return values;
|
||||
},
|
||||
entries: function() {
|
||||
var entries = [];
|
||||
for (var property in this) if (property[0] === prefix) entries.push({key: property.slice(1), value: this[property]});
|
||||
return entries;
|
||||
},
|
||||
size: function() {
|
||||
var size = 0;
|
||||
for (var property in this) if (property[0] === prefix) ++size;
|
||||
return size;
|
||||
},
|
||||
empty: function() {
|
||||
for (var property in this) if (property[0] === prefix) return false;
|
||||
return true;
|
||||
},
|
||||
each: function(f) {
|
||||
for (var property in this) if (property[0] === prefix) f(this[property], property.slice(1), this);
|
||||
}
|
||||
};
|
||||
|
||||
function map(object, f) {
|
||||
var map = new Map;
|
||||
|
||||
// Copy constructor.
|
||||
if (object instanceof Map) object.each(function(value, key) { map.set(key, value); });
|
||||
|
||||
// Index array by numeric index or specified key function.
|
||||
else if (Array.isArray(object)) {
|
||||
var i = -1,
|
||||
n = object.length,
|
||||
o;
|
||||
|
||||
if (f == null) while (++i < n) map.set(i, object[i]);
|
||||
else while (++i < n) map.set(f(o = object[i], i, object), o);
|
||||
}
|
||||
|
||||
// Convert object to map.
|
||||
else if (object) for (var key in object) map.set(key, object[key]);
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
function nest() {
|
||||
var keys = [],
|
||||
sortKeys = [],
|
||||
sortValues,
|
||||
rollup,
|
||||
nest;
|
||||
|
||||
function apply(array, depth, createResult, setResult) {
|
||||
if (depth >= keys.length) {
|
||||
if (sortValues != null) array.sort(sortValues);
|
||||
return rollup != null ? rollup(array) : array;
|
||||
}
|
||||
|
||||
var i = -1,
|
||||
n = array.length,
|
||||
key = keys[depth++],
|
||||
keyValue,
|
||||
value,
|
||||
valuesByKey = map(),
|
||||
values,
|
||||
result = createResult();
|
||||
|
||||
while (++i < n) {
|
||||
if (values = valuesByKey.get(keyValue = key(value = array[i]) + "")) {
|
||||
values.push(value);
|
||||
} else {
|
||||
valuesByKey.set(keyValue, [value]);
|
||||
}
|
||||
}
|
||||
|
||||
valuesByKey.each(function(values, key) {
|
||||
setResult(result, key, apply(values, depth, createResult, setResult));
|
||||
});
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function entries(map$$1, depth) {
|
||||
if (++depth > keys.length) return map$$1;
|
||||
var array, sortKey = sortKeys[depth - 1];
|
||||
if (rollup != null && depth >= keys.length) array = map$$1.entries();
|
||||
else array = [], map$$1.each(function(v, k) { array.push({key: k, values: entries(v, depth)}); });
|
||||
return sortKey != null ? array.sort(function(a, b) { return sortKey(a.key, b.key); }) : array;
|
||||
}
|
||||
|
||||
return nest = {
|
||||
object: function(array) { return apply(array, 0, createObject, setObject); },
|
||||
map: function(array) { return apply(array, 0, createMap, setMap); },
|
||||
entries: function(array) { return entries(apply(array, 0, createMap, setMap), 0); },
|
||||
key: function(d) { keys.push(d); return nest; },
|
||||
sortKeys: function(order) { sortKeys[keys.length - 1] = order; return nest; },
|
||||
sortValues: function(order) { sortValues = order; return nest; },
|
||||
rollup: function(f) { rollup = f; return nest; }
|
||||
};
|
||||
}
|
||||
|
||||
function createObject() {
|
||||
return {};
|
||||
}
|
||||
|
||||
function setObject(object, key, value) {
|
||||
object[key] = value;
|
||||
}
|
||||
|
||||
function createMap() {
|
||||
return map();
|
||||
}
|
||||
|
||||
function setMap(map$$1, key, value) {
|
||||
map$$1.set(key, value);
|
||||
}
|
||||
|
||||
function Set() {}
|
||||
|
||||
var proto = map.prototype;
|
||||
|
||||
Set.prototype = set.prototype = {
|
||||
constructor: Set,
|
||||
has: proto.has,
|
||||
add: function(value) {
|
||||
value += "";
|
||||
this[prefix + value] = value;
|
||||
return this;
|
||||
},
|
||||
remove: proto.remove,
|
||||
clear: proto.clear,
|
||||
values: proto.keys,
|
||||
size: proto.size,
|
||||
empty: proto.empty,
|
||||
each: proto.each
|
||||
};
|
||||
|
||||
function set(object, f) {
|
||||
var set = new Set;
|
||||
|
||||
// Copy constructor.
|
||||
if (object instanceof Set) object.each(function(value) { set.add(value); });
|
||||
|
||||
// Otherwise, assume it’s an array.
|
||||
else if (object) {
|
||||
var i = -1, n = object.length;
|
||||
if (f == null) while (++i < n) set.add(object[i]);
|
||||
else while (++i < n) set.add(f(object[i], i, object));
|
||||
}
|
||||
|
||||
return set;
|
||||
}
|
||||
|
||||
function keys(map) {
|
||||
var keys = [];
|
||||
for (var key in map) keys.push(key);
|
||||
return keys;
|
||||
}
|
||||
|
||||
function values(map) {
|
||||
var values = [];
|
||||
for (var key in map) values.push(map[key]);
|
||||
return values;
|
||||
}
|
||||
|
||||
function entries(map) {
|
||||
var entries = [];
|
||||
for (var key in map) entries.push({key: key, value: map[key]});
|
||||
return entries;
|
||||
}
|
||||
|
||||
exports.nest = nest;
|
||||
exports.set = set;
|
||||
exports.map = map;
|
||||
exports.keys = keys;
|
||||
exports.values = values;
|
||||
exports.entries = entries;
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
})));
|
||||
2
lisp/emacs-application-framework/app/mermaid/node_modules/d3-collection/dist/d3-collection.min.js
generated
vendored
Normal file
2
lisp/emacs-application-framework/app/mermaid/node_modules/d3-collection/dist/d3-collection.min.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
// https://d3js.org/d3-collection/ v1.0.7 Copyright 2018 Mike Bostock
|
||||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(n.d3=n.d3||{})}(this,function(n){"use strict";function t(){}function e(n,e){var r=new t;if(n instanceof t)n.each(function(n,t){r.set(t,n)});else if(Array.isArray(n)){var i,u=-1,o=n.length;if(null==e)for(;++u<o;)r.set(u,n[u]);else for(;++u<o;)r.set(e(i=n[u],u,n),i)}else if(n)for(var s in n)r.set(s,n[s]);return r}function r(){return{}}function i(n,t,e){n[t]=e}function u(){return e()}function o(n,t,e){n.set(t,e)}function s(){}t.prototype=e.prototype={constructor:t,has:function(n){return"$"+n in this},get:function(n){return this["$"+n]},set:function(n,t){return this["$"+n]=t,this},remove:function(n){var t="$"+n;return t in this&&delete this[t]},clear:function(){for(var n in this)"$"===n[0]&&delete this[n]},keys:function(){var n=[];for(var t in this)"$"===t[0]&&n.push(t.slice(1));return n},values:function(){var n=[];for(var t in this)"$"===t[0]&&n.push(this[t]);return n},entries:function(){var n=[];for(var t in this)"$"===t[0]&&n.push({key:t.slice(1),value:this[t]});return n},size:function(){var n=0;for(var t in this)"$"===t[0]&&++n;return n},empty:function(){for(var n in this)if("$"===n[0])return!1;return!0},each:function(n){for(var t in this)"$"===t[0]&&n(this[t],t.slice(1),this)}};var f=e.prototype;function c(n,t){var e=new s;if(n instanceof s)n.each(function(n){e.add(n)});else if(n){var r=-1,i=n.length;if(null==t)for(;++r<i;)e.add(n[r]);else for(;++r<i;)e.add(t(n[r],r,n))}return e}s.prototype=c.prototype={constructor:s,has:f.has,add:function(n){return this["$"+(n+="")]=n,this},remove:f.remove,clear:f.clear,values:f.keys,size:f.size,empty:f.empty,each:f.each},n.nest=function(){var n,t,s,f=[],c=[];function a(r,i,u,o){if(i>=f.length)return null!=n&&r.sort(n),null!=t?t(r):r;for(var s,c,h,l=-1,v=r.length,p=f[i++],y=e(),d=u();++l<v;)(h=y.get(s=p(c=r[l])+""))?h.push(c):y.set(s,[c]);return y.each(function(n,t){o(d,t,a(n,i,u,o))}),d}return s={object:function(n){return a(n,0,r,i)},map:function(n){return a(n,0,u,o)},entries:function(n){return function n(e,r){if(++r>f.length)return e;var i,u=c[r-1];return null!=t&&r>=f.length?i=e.entries():(i=[],e.each(function(t,e){i.push({key:e,values:n(t,r)})})),null!=u?i.sort(function(n,t){return u(n.key,t.key)}):i}(a(n,0,u,o),0)},key:function(n){return f.push(n),s},sortKeys:function(n){return c[f.length-1]=n,s},sortValues:function(t){return n=t,s},rollup:function(n){return t=n,s}}},n.set=c,n.map=e,n.keys=function(n){var t=[];for(var e in n)t.push(e);return t},n.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},n.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},Object.defineProperty(n,"__esModule",{value:!0})});
|
||||
Reference in New Issue
Block a user