-
Notifications
You must be signed in to change notification settings - Fork 38
/
inet-henge.min.js.map
1 lines (1 loc) · 145 KB
/
inet-henge.min.js.map
1
{"version":3,"file":"inet-henge.min.js","mappings":";CAAA,SAA2CA,EAAMC,GAChD,GAAsB,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,MAAOA,QAAQ,cAC5C,GAAqB,mBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,CAAC,KAAM,QAASJ,OACnB,CACJ,IAAIM,EAAuB,iBAAZL,QAAuBD,EAAQG,QAAQ,MAAOA,QAAQ,SAAWH,EAAQD,EAAS,GAAGA,EAAW,MAC/G,IAAI,IAAIQ,KAAKD,GAAuB,iBAAZL,QAAuBA,QAAUF,GAAMQ,GAAKD,EAAEC,EACvE,CACA,CATD,CASGC,MAAM,CAACC,EAAkCC,IAC5C,gCCVE,IAoBGC,EAjBHT,EAAOD,SAiBJU,EAAWA,GAAa,SAAUC,GAElC,IAAIC,EA4BJ,GAzBsB,oBAAXC,QAA0BA,OAAOD,SACxCA,EAASC,OAAOD,QAIA,oBAATL,MAAwBA,KAAKK,SACpCA,EAASL,KAAKK,QAIQ,oBAAfE,YAA8BA,WAAWF,SAChDA,EAASE,WAAWF,SAInBA,GAA4B,oBAAXC,QAA0BA,OAAOE,WACnDH,EAASC,OAAOE,WAIfH,QAA4B,IAAX,EAAAI,GAA0B,EAAAA,EAAOJ,SACnDA,EAAS,EAAAI,EAAOJ,SAIfA,EACD,IACIA,EAAS,EAAQ,IACrB,CAAE,MAAOK,GAAM,CAQnB,IAAIC,EAAwB,WACxB,GAAIN,EAAQ,CAER,GAAsC,mBAA3BA,EAAOO,gBACd,IACI,OAAOP,EAAOO,gBAAgB,IAAIC,YAAY,IAAI,EACtD,CAAE,MAAOH,GAAM,CAInB,GAAkC,mBAAvBL,EAAOS,YACd,IACI,OAAOT,EAAOS,YAAY,GAAGC,aACjC,CAAE,MAAOL,GAAM,CAEvB,CAEA,MAAM,IA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AKpD5E,KAAK6J,KAAK0T,YAAYC,EACxB,CAEQ,iBAAAlB,GACNtc,KAAK6J,KAAK0T,YAAY,GACxB,EAGF,MAUM,EAAa1d,GACjB,cAAsBA,EAGpB,WAAA0L,CAAY+G,EAAmBqH,EAAuCnL,GACpEuB,MAAMuC,EAAWqH,EAAWnL,GAE5BxO,KAAKkQ,SAAW,WAAY,WAC9B,CAEA,MAAA3D,CAAOuR,GACL/N,MAAMxD,OAAOuR,GACb9d,KAAKkQ,SAASE,UAChB,CAGA,EAAAC,CAAG9B,EAAc+B,GACftQ,KAAKkQ,SAASG,GAAG9B,EAAM+B,EACzB,GAMJ,MAAMyN,UAlCY,CAACle,GACjB,cAAsBA,EACpB,aAAOme,CAAOlG,EAAKtJ,EAAU,CAAC,GAC5BsJ,EAAI2B,KAAKpK,EAAOsC,EAAMuB,EAAM1E,EAC9B,GA8B2B,CAAUkL,KAElC,MAAMuE,UAAgB,EAAUF,arBtbvC","sources":["webpack://inet-henge/webpack/universalModuleDefinition","webpack://inet-henge/./node_modules/crypto-js/core.js","webpack://inet-henge/./node_modules/crypto-js/md5.js","webpack://inet-henge/./src/hack_cola.js","webpack://inet-henge/external umd \"cola\"","webpack://inet-henge/external umd \"d3\"","webpack://inet-henge/webpack/bootstrap","webpack://inet-henge/webpack/runtime/define property getters","webpack://inet-henge/webpack/runtime/global","webpack://inet-henge/webpack/runtime/hasOwnProperty shorthand","webpack://inet-henge/webpack/runtime/make namespace object","webpack://inet-henge/./src/bundle.ts","webpack://inet-henge/./src/util.ts","webpack://inet-henge/./src/group.ts","webpack://inet-henge/./src/meta_data.ts","webpack://inet-henge/./src/node.ts","webpack://inet-henge/./src/link.ts","webpack://inet-henge/./src/tooltip.ts","webpack://inet-henge/./src/link_tooltip.ts","webpack://inet-henge/./src/node_tooltip.ts","webpack://inet-henge/./src/position_cache.ts","webpack://inet-henge/./src/diagram.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"d3\"), require(\"cola\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"d3\", \"cola\"], factory);\n\telse {\n\t\tvar a = typeof exports === 'object' ? factory(require(\"d3\"), require(\"cola\")) : factory(root[\"d3\"], root[\"cola\"]);\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(self, (__WEBPACK_EXTERNAL_MODULE__893__, __WEBPACK_EXTERNAL_MODULE__109__) => {\nreturn ",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory();\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\troot.CryptoJS = factory();\n\t}\n}(this, function () {\n\n\t/*globals window, global, require*/\n\n\t/**\n\t * CryptoJS core components.\n\t */\n\tvar CryptoJS = CryptoJS || (function (Math, undefined) {\n\n\t var crypto;\n\n\t // Native crypto from window (Browser)\n\t if (typeof window !== 'undefined' && window.crypto) {\n\t crypto = window.crypto;\n\t }\n\n\t // Native crypto in web worker (Browser)\n\t if (typeof self !== 'undefined' && self.crypto) {\n\t crypto = self.crypto;\n\t }\n\n\t // Native crypto from worker\n\t if (typeof globalThis !== 'undefined' && globalThis.crypto) {\n\t crypto = globalThis.crypto;\n\t }\n\n\t // Native (experimental IE 11) crypto from window (Browser)\n\t if (!crypto && typeof window !== 'undefined' && window.msCrypto) {\n\t crypto = window.msCrypto;\n\t }\n\n\t // Native crypto from global (NodeJS)\n\t if (!crypto && typeof global !== 'undefined' && global.crypto) {\n\t crypto = global.crypto;\n\t }\n\n\t // Native crypto import via require (NodeJS)\n\t if (!crypto && typeof require === 'function') {\n\t try {\n\t crypto = require('crypto');\n\t } catch (err) {}\n\t }\n\n\t /*\n\t * Cryptographically secure pseudorandom number generator\n\t *\n\t * As Math.random() is cryptographically not safe to use\n\t */\n\t var cryptoSecureRandomInt = function () {\n\t if (crypto) {\n\t // Use getRandomValues method (Browser)\n\t if (typeof crypto.getRandomValues === 'function') {\n\t try {\n\t return crypto.getRandomValues(new Uint32Array(1))[0];\n\t } catch (err) {}\n\t }\n\n\t // Use randomBytes method (NodeJS)\n\t if (typeof crypto.randomBytes === 'function') {\n\t try {\n\t return crypto.randomBytes(4).readInt32LE();\n\t } catch (err) {}\n\t }\n\t }\n\n\t throw new Error('Native crypto module could not be used to get secure random number.');\n\t };\n\n\t /*\n\t * Local polyfill of Object.create\n\n\t */\n\t var create = Object.create || (function () {\n\t function F() {}\n\n\t return function (obj) {\n\t var subtype;\n\n\t F.prototype = obj;\n\n\t subtype = new F();\n\n\t F.prototype = null;\n\n\t return subtype;\n\t };\n\t }());\n\n\t /**\n\t * CryptoJS namespace.\n\t */\n\t var C = {};\n\n\t /**\n\t * Library namespace.\n\t */\n\t var C_lib = C.lib = {};\n\n\t /**\n\t * Base object for prototypal inheritance.\n\t */\n\t var Base = C_lib.Base = (function () {\n\n\n\t return {\n\t /**\n\t * Creates a new object that inherits from this object.\n\t *\n\t * @param {Object} overrides Properties to copy into the new object.\n\t *\n\t * @return {Object} The new object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var MyType = CryptoJS.lib.Base.extend({\n\t * field: 'value',\n\t *\n\t * method: function () {\n\t * }\n\t * });\n\t */\n\t extend: function (overrides) {\n\t // Spawn\n\t var subtype = create(this);\n\n\t // Augment\n\t if (overrides) {\n\t subtype.mixIn(overrides);\n\t }\n\n\t // Create default initializer\n\t if (!subtype.hasOwnProperty('init') || this.init === subtype.init) {\n\t subtype.init = function () {\n\t subtype.$super.init.apply(this, arguments);\n\t };\n\t }\n\n\t // Initializer's prototype is the subtype object\n\t subtype.init.prototype = subtype;\n\n\t // Reference supertype\n\t subtype.$super = this;\n\n\t return subtype;\n\t },\n\n\t /**\n\t * Extends this object and runs the init method.\n\t * Arguments to create() will be passed to init().\n\t *\n\t * @return {Object} The new object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var instance = MyType.create();\n\t */\n\t create: function () {\n\t var instance = this.extend();\n\t instance.init.apply(instance, arguments);\n\n\t return instance;\n\t },\n\n\t /**\n\t * Initializes a newly created object.\n\t * Override this method to add some logic when your objects are created.\n\t *\n\t * @example\n\t *\n\t * var MyType = CryptoJS.lib.Base.extend({\n\t * init: function () {\n\t * // ...\n\t * }\n\t * });\n\t */\n\t init: function () {\n\t },\n\n\t /**\n\t * Copies properties into this object.\n\t *\n\t * @param {Object} properties The properties to mix in.\n\t *\n\t * @example\n\t *\n\t * MyType.mixIn({\n\t * field: 'value'\n\t * });\n\t */\n\t mixIn: function (properties) {\n\t for (var propertyName in properties) {\n\t if (properties.hasOwnProperty(propertyName)) {\n\t this[propertyName] = properties[propertyName];\n\t }\n\t }\n\n\t // IE won't copy toString using the loop above\n\t if (properties.hasOwnProperty('toString')) {\n\t this.toString = properties.toString;\n\t }\n\t },\n\n\t /**\n\t * Creates a copy of this object.\n\t *\n\t * @return {Object} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = instance.clone();\n\t */\n\t clone: function () {\n\t return this.init.prototype.extend(this);\n\t }\n\t };\n\t }());\n\n\t /**\n\t * An array of 32-bit words.\n\t *\n\t * @property {Array} words The array of 32-bit words.\n\t * @property {number} sigBytes The number of significant bytes in this word array.\n\t */\n\t var WordArray = C_lib.WordArray = Base.extend({\n\t /**\n\t * Initializes a newly created word array.\n\t *\n\t * @param {Array} words (Optional) An array of 32-bit words.\n\t * @param {number} sigBytes (Optional) The number of significant bytes in the words.\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.lib.WordArray.create();\n\t * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);\n\t * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);\n\t */\n\t init: function (words, sigBytes) {\n\t words = this.words = words || [];\n\n\t if (sigBytes != undefined) {\n\t this.sigBytes = sigBytes;\n\t } else {\n\t this.sigBytes = words.length * 4;\n\t }\n\t },\n\n\t /**\n\t * Converts this word array to a string.\n\t *\n\t * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex\n\t *\n\t * @return {string} The stringified word array.\n\t *\n\t * @example\n\t *\n\t * var string = wordArray + '';\n\t * var string = wordArray.toString();\n\t * var string = wordArray.toString(CryptoJS.enc.Utf8);\n\t */\n\t toString: function (encoder) {\n\t return (encoder || Hex).stringify(this);\n\t },\n\n\t /**\n\t * Concatenates a word array to this word array.\n\t *\n\t * @param {WordArray} wordArray The word array to append.\n\t *\n\t * @return {WordArray} This word array.\n\t *\n\t * @example\n\t *\n\t * wordArray1.concat(wordArray2);\n\t */\n\t concat: function (wordArray) {\n\t // Shortcuts\n\t var thisWords = this.words;\n\t var thatWords = wordArray.words;\n\t var thisSigBytes = this.sigBytes;\n\t var thatSigBytes = wordArray.sigBytes;\n\n\t // Clamp excess bits\n\t this.clamp();\n\n\t // Concat\n\t if (thisSigBytes % 4) {\n\t // Copy one byte at a time\n\t for (var i = 0; i < thatSigBytes; i++) {\n\t var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8);\n\t }\n\t } else {\n\t // Copy one word at a time\n\t for (var j = 0; j < thatSigBytes; j += 4) {\n\t thisWords[(thisSigBytes + j) >>> 2] = thatWords[j >>> 2];\n\t }\n\t }\n\t this.sigBytes += thatSigBytes;\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Removes insignificant bits.\n\t *\n\t * @example\n\t *\n\t * wordArray.clamp();\n\t */\n\t clamp: function () {\n\t // Shortcuts\n\t var words = this.words;\n\t var sigBytes = this.sigBytes;\n\n\t // Clamp\n\t words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8);\n\t words.length = Math.ceil(sigBytes / 4);\n\t },\n\n\t /**\n\t * Creates a copy of this word array.\n\t *\n\t * @return {WordArray} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = wordArray.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\t clone.words = this.words.slice(0);\n\n\t return clone;\n\t },\n\n\t /**\n\t * Creates a word array filled with random bytes.\n\t *\n\t * @param {number} nBytes The number of random bytes to generate.\n\t *\n\t * @return {WordArray} The random word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.lib.WordArray.random(16);\n\t */\n\t random: function (nBytes) {\n\t var words = [];\n\n\t for (var i = 0; i < nBytes; i += 4) {\n\t words.push(cryptoSecureRandomInt());\n\t }\n\n\t return new WordArray.init(words, nBytes);\n\t }\n\t });\n\n\t /**\n\t * Encoder namespace.\n\t */\n\t var C_enc = C.enc = {};\n\n\t /**\n\t * Hex encoding strategy.\n\t */\n\t var Hex = C_enc.Hex = {\n\t /**\n\t * Converts a word array to a hex string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The hex string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hexString = CryptoJS.enc.Hex.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var hexChars = [];\n\t for (var i = 0; i < sigBytes; i++) {\n\t var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t hexChars.push((bite >>> 4).toString(16));\n\t hexChars.push((bite & 0x0f).toString(16));\n\t }\n\n\t return hexChars.join('');\n\t },\n\n\t /**\n\t * Converts a hex string to a word array.\n\t *\n\t * @param {string} hexStr The hex string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Hex.parse(hexString);\n\t */\n\t parse: function (hexStr) {\n\t // Shortcut\n\t var hexStrLength = hexStr.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < hexStrLength; i += 2) {\n\t words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4);\n\t }\n\n\t return new WordArray.init(words, hexStrLength / 2);\n\t }\n\t };\n\n\t /**\n\t * Latin1 encoding strategy.\n\t */\n\t var Latin1 = C_enc.Latin1 = {\n\t /**\n\t * Converts a word array to a Latin1 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The Latin1 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var latin1Chars = [];\n\t for (var i = 0; i < sigBytes; i++) {\n\t var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t latin1Chars.push(String.fromCharCode(bite));\n\t }\n\n\t return latin1Chars.join('');\n\t },\n\n\t /**\n\t * Converts a Latin1 string to a word array.\n\t *\n\t * @param {string} latin1Str The Latin1 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);\n\t */\n\t parse: function (latin1Str) {\n\t // Shortcut\n\t var latin1StrLength = latin1Str.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < latin1StrLength; i++) {\n\t words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8);\n\t }\n\n\t return new WordArray.init(words, latin1StrLength);\n\t }\n\t };\n\n\t /**\n\t * UTF-8 encoding strategy.\n\t */\n\t var Utf8 = C_enc.Utf8 = {\n\t /**\n\t * Converts a word array to a UTF-8 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The UTF-8 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t try {\n\t return decodeURIComponent(escape(Latin1.stringify(wordArray)));\n\t } catch (e) {\n\t throw new Error('Malformed UTF-8 data');\n\t }\n\t },\n\n\t /**\n\t * Converts a UTF-8 string to a word array.\n\t *\n\t * @param {string} utf8Str The UTF-8 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);\n\t */\n\t parse: function (utf8Str) {\n\t return Latin1.parse(unescape(encodeURIComponent(utf8Str)));\n\t }\n\t };\n\n\t /**\n\t * Abstract buffered block algorithm template.\n\t *\n\t * The property blockSize must be implemented in a concrete subtype.\n\t *\n\t * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0\n\t */\n\t var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({\n\t /**\n\t * Resets this block algorithm's data buffer to its initial state.\n\t *\n\t * @example\n\t *\n\t * bufferedBlockAlgorithm.reset();\n\t */\n\t reset: function () {\n\t // Initial values\n\t this._data = new WordArray.init();\n\t this._nDataBytes = 0;\n\t },\n\n\t /**\n\t * Adds new data to this block algorithm's buffer.\n\t *\n\t * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.\n\t *\n\t * @example\n\t *\n\t * bufferedBlockAlgorithm._append('data');\n\t * bufferedBlockAlgorithm._append(wordArray);\n\t */\n\t _append: function (data) {\n\t // Convert string to WordArray, else assume WordArray already\n\t if (typeof data == 'string') {\n\t data = Utf8.parse(data);\n\t }\n\n\t // Append\n\t this._data.concat(data);\n\t this._nDataBytes += data.sigBytes;\n\t },\n\n\t /**\n\t * Processes available data blocks.\n\t *\n\t * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.\n\t *\n\t * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.\n\t *\n\t * @return {WordArray} The processed data.\n\t *\n\t * @example\n\t *\n\t * var processedData = bufferedBlockAlgorithm._process();\n\t * var processedData = bufferedBlockAlgorithm._process(!!'flush');\n\t */\n\t _process: function (doFlush) {\n\t var processedWords;\n\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\t var dataSigBytes = data.sigBytes;\n\t var blockSize = this.blockSize;\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count blocks ready\n\t var nBlocksReady = dataSigBytes / blockSizeBytes;\n\t if (doFlush) {\n\t // Round up to include partial blocks\n\t nBlocksReady = Math.ceil(nBlocksReady);\n\t } else {\n\t // Round down to include only full blocks,\n\t // less the number of blocks that must remain in the buffer\n\t nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);\n\t }\n\n\t // Count words ready\n\t var nWordsReady = nBlocksReady * blockSize;\n\n\t // Count bytes ready\n\t var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);\n\n\t // Process blocks\n\t if (nWordsReady) {\n\t for (var offset = 0; offset < nWordsReady; offset += blockSize) {\n\t // Perform concrete-algorithm logic\n\t this._doProcessBlock(dataWords, offset);\n\t }\n\n\t // Remove processed words\n\t processedWords = dataWords.splice(0, nWordsReady);\n\t data.sigBytes -= nBytesReady;\n\t }\n\n\t // Return processed words\n\t return new WordArray.init(processedWords, nBytesReady);\n\t },\n\n\t /**\n\t * Creates a copy of this object.\n\t *\n\t * @return {Object} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = bufferedBlockAlgorithm.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\t clone._data = this._data.clone();\n\n\t return clone;\n\t },\n\n\t _minBufferSize: 0\n\t });\n\n\t /**\n\t * Abstract hasher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits)\n\t */\n\t var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({\n\t /**\n\t * Configuration options.\n\t */\n\t cfg: Base.extend(),\n\n\t /**\n\t * Initializes a newly created hasher.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for this hash computation.\n\t *\n\t * @example\n\t *\n\t * var hasher = CryptoJS.algo.SHA256.create();\n\t */\n\t init: function (cfg) {\n\t // Apply config defaults\n\t this.cfg = this.cfg.extend(cfg);\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this hasher to its initial state.\n\t *\n\t * @example\n\t *\n\t * hasher.reset();\n\t */\n\t reset: function () {\n\t // Reset data buffer\n\t BufferedBlockAlgorithm.reset.call(this);\n\n\t // Perform concrete-hasher logic\n\t this._doReset();\n\t },\n\n\t /**\n\t * Updates this hasher with a message.\n\t *\n\t * @param {WordArray|string} messageUpdate The message to append.\n\t *\n\t * @return {Hasher} This hasher.\n\t *\n\t * @example\n\t *\n\t * hasher.update('message');\n\t * hasher.update(wordArray);\n\t */\n\t update: function (messageUpdate) {\n\t // Append\n\t this._append(messageUpdate);\n\n\t // Update the hash\n\t this._process();\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Finalizes the hash computation.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} messageUpdate (Optional) A final message update.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @example\n\t *\n\t * var hash = hasher.finalize();\n\t * var hash = hasher.finalize('message');\n\t * var hash = hasher.finalize(wordArray);\n\t */\n\t finalize: function (messageUpdate) {\n\t // Final message update\n\t if (messageUpdate) {\n\t this._append(messageUpdate);\n\t }\n\n\t // Perform concrete-hasher logic\n\t var hash = this._doFinalize();\n\n\t return hash;\n\t },\n\n\t blockSize: 512/32,\n\n\t /**\n\t * Creates a shortcut function to a hasher's object interface.\n\t *\n\t * @param {Hasher} hasher The hasher to create a helper for.\n\t *\n\t * @return {Function} The shortcut function.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);\n\t */\n\t _createHelper: function (hasher) {\n\t return function (message, cfg) {\n\t return new hasher.init(cfg).finalize(message);\n\t };\n\t },\n\n\t /**\n\t * Creates a shortcut function to the HMAC's object interface.\n\t *\n\t * @param {Hasher} hasher The hasher to use in this HMAC helper.\n\t *\n\t * @return {Function} The shortcut function.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);\n\t */\n\t _createHmacHelper: function (hasher) {\n\t return function (message, key) {\n\t return new C_algo.HMAC.init(hasher, key).finalize(message);\n\t };\n\t }\n\t });\n\n\t /**\n\t * Algorithm namespace.\n\t */\n\t var C_algo = C.algo = {};\n\n\t return C;\n\t}(Math));\n\n\n\treturn CryptoJS;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Constants table\n\t var T = [];\n\n\t // Compute constants\n\t (function () {\n\t for (var i = 0; i < 64; i++) {\n\t T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0;\n\t }\n\t }());\n\n\t /**\n\t * MD5 hash algorithm.\n\t */\n\t var MD5 = C_algo.MD5 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init([\n\t 0x67452301, 0xefcdab89,\n\t 0x98badcfe, 0x10325476\n\t ]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Swap endian\n\t for (var i = 0; i < 16; i++) {\n\t // Shortcuts\n\t var offset_i = offset + i;\n\t var M_offset_i = M[offset_i];\n\n\t M[offset_i] = (\n\t (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |\n\t (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)\n\t );\n\t }\n\n\t // Shortcuts\n\t var H = this._hash.words;\n\n\t var M_offset_0 = M[offset + 0];\n\t var M_offset_1 = M[offset + 1];\n\t var M_offset_2 = M[offset + 2];\n\t var M_offset_3 = M[offset + 3];\n\t var M_offset_4 = M[offset + 4];\n\t var M_offset_5 = M[offset + 5];\n\t var M_offset_6 = M[offset + 6];\n\t var M_offset_7 = M[offset + 7];\n\t var M_offset_8 = M[offset + 8];\n\t var M_offset_9 = M[offset + 9];\n\t var M_offset_10 = M[offset + 10];\n\t var M_offset_11 = M[offset + 11];\n\t var M_offset_12 = M[offset + 12];\n\t var M_offset_13 = M[offset + 13];\n\t var M_offset_14 = M[offset + 14];\n\t var M_offset_15 = M[offset + 15];\n\n\t // Working variables\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\n\t // Computation\n\t a = FF(a, b, c, d, M_offset_0, 7, T[0]);\n\t d = FF(d, a, b, c, M_offset_1, 12, T[1]);\n\t c = FF(c, d, a, b, M_offset_2, 17, T[2]);\n\t b = FF(b, c, d, a, M_offset_3, 22, T[3]);\n\t a = FF(a, b, c, d, M_offset_4, 7, T[4]);\n\t d = FF(d, a, b, c, M_offset_5, 12, T[5]);\n\t c = FF(c, d, a, b, M_offset_6, 17, T[6]);\n\t b = FF(b, c, d, a, M_offset_7, 22, T[7]);\n\t a = FF(a, b, c, d, M_offset_8, 7, T[8]);\n\t d = FF(d, a, b, c, M_offset_9, 12, T[9]);\n\t c = FF(c, d, a, b, M_offset_10, 17, T[10]);\n\t b = FF(b, c, d, a, M_offset_11, 22, T[11]);\n\t a = FF(a, b, c, d, M_offset_12, 7, T[12]);\n\t d = FF(d, a, b, c, M_offset_13, 12, T[13]);\n\t c = FF(c, d, a, b, M_offset_14, 17, T[14]);\n\t b = FF(b, c, d, a, M_offset_15, 22, T[15]);\n\n\t a = GG(a, b, c, d, M_offset_1, 5, T[16]);\n\t d = GG(d, a, b, c, M_offset_6, 9, T[17]);\n\t c = GG(c, d, a, b, M_offset_11, 14, T[18]);\n\t b = GG(b, c, d, a, M_offset_0, 20, T[19]);\n\t a = GG(a, b, c, d, M_offset_5, 5, T[20]);\n\t d = GG(d, a, b, c, M_offset_10, 9, T[21]);\n\t c = GG(c, d, a, b, M_offset_15, 14, T[22]);\n\t b = GG(b, c, d, a, M_offset_4, 20, T[23]);\n\t a = GG(a, b, c, d, M_offset_9, 5, T[24]);\n\t d = GG(d, a, b, c, M_offset_14, 9, T[25]);\n\t c = GG(c, d, a, b, M_offset_3, 14, T[26]);\n\t b = GG(b, c, d, a, M_offset_8, 20, T[27]);\n\t a = GG(a, b, c, d, M_offset_13, 5, T[28]);\n\t d = GG(d, a, b, c, M_offset_2, 9, T[29]);\n\t c = GG(c, d, a, b, M_offset_7, 14, T[30]);\n\t b = GG(b, c, d, a, M_offset_12, 20, T[31]);\n\n\t a = HH(a, b, c, d, M_offset_5, 4, T[32]);\n\t d = HH(d, a, b, c, M_offset_8, 11, T[33]);\n\t c = HH(c, d, a, b, M_offset_11, 16, T[34]);\n\t b = HH(b, c, d, a, M_offset_14, 23, T[35]);\n\t a = HH(a, b, c, d, M_offset_1, 4, T[36]);\n\t d = HH(d, a, b, c, M_offset_4, 11, T[37]);\n\t c = HH(c, d, a, b, M_offset_7, 16, T[38]);\n\t b = HH(b, c, d, a, M_offset_10, 23, T[39]);\n\t a = HH(a, b, c, d, M_offset_13, 4, T[40]);\n\t d = HH(d, a, b, c, M_offset_0, 11, T[41]);\n\t c = HH(c, d, a, b, M_offset_3, 16, T[42]);\n\t b = HH(b, c, d, a, M_offset_6, 23, T[43]);\n\t a = HH(a, b, c, d, M_offset_9, 4, T[44]);\n\t d = HH(d, a, b, c, M_offset_12, 11, T[45]);\n\t c = HH(c, d, a, b, M_offset_15, 16, T[46]);\n\t b = HH(b, c, d, a, M_offset_2, 23, T[47]);\n\n\t a = II(a, b, c, d, M_offset_0, 6, T[48]);\n\t d = II(d, a, b, c, M_offset_7, 10, T[49]);\n\t c = II(c, d, a, b, M_offset_14, 15, T[50]);\n\t b = II(b, c, d, a, M_offset_5, 21, T[51]);\n\t a = II(a, b, c, d, M_offset_12, 6, T[52]);\n\t d = II(d, a, b, c, M_offset_3, 10, T[53]);\n\t c = II(c, d, a, b, M_offset_10, 15, T[54]);\n\t b = II(b, c, d, a, M_offset_1, 21, T[55]);\n\t a = II(a, b, c, d, M_offset_8, 6, T[56]);\n\t d = II(d, a, b, c, M_offset_15, 10, T[57]);\n\t c = II(c, d, a, b, M_offset_6, 15, T[58]);\n\t b = II(b, c, d, a, M_offset_13, 21, T[59]);\n\t a = II(a, b, c, d, M_offset_4, 6, T[60]);\n\t d = II(d, a, b, c, M_offset_11, 10, T[61]);\n\t c = II(c, d, a, b, M_offset_2, 15, T[62]);\n\t b = II(b, c, d, a, M_offset_9, 21, T[63]);\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\n\t var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000);\n\t var nBitsTotalL = nBitsTotal;\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = (\n\t (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) |\n\t (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00)\n\t );\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (\n\t (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) |\n\t (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00)\n\t );\n\n\t data.sigBytes = (dataWords.length + 1) * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Shortcuts\n\t var hash = this._hash;\n\t var H = hash.words;\n\n\t // Swap endian\n\t for (var i = 0; i < 4; i++) {\n\t // Shortcut\n\t var H_i = H[i];\n\n\t H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |\n\t (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);\n\t }\n\n\t // Return final computed hash\n\t return hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t function FF(a, b, c, d, x, s, t) {\n\t var n = a + ((b & c) | (~b & d)) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t function GG(a, b, c, d, x, s, t) {\n\t var n = a + ((b & d) | (c & ~d)) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t function HH(a, b, c, d, x, s, t) {\n\t var n = a + (b ^ c ^ d) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t function II(a, b, c, d, x, s, t) {\n\t var n = a + (c ^ (b | ~d)) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.MD5('message');\n\t * var hash = CryptoJS.MD5(wordArray);\n\t */\n\t C.MD5 = Hasher._createHelper(MD5);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacMD5(message, key);\n\t */\n\t C.HmacMD5 = Hasher._createHmacHelper(MD5);\n\t}(Math));\n\n\n\treturn CryptoJS.MD5;\n\n}));","/* eslint-disable */\n\n// Ported from WebCola/cola.js and overrode jaccardLinkLengths()\n\nfunction unionCount(a, b) {\n var u = {};\n for (var i in a) u[i] = {};\n for (var i in b) u[i] = {};\n return Object.keys(u).length;\n}\n\nfunction intersectionCount(a, b) {\n var n = 0;\n for (var i in a) if (typeof b[i] !== \"undefined\") ++n;\n return n;\n}\n\nfunction getNeighbours(links, la) {\n var neighbours = {};\n var addNeighbours = function (u, v) {\n if (typeof neighbours[u] === \"undefined\") neighbours[u] = {};\n neighbours[u][v] = {};\n };\n links.forEach(function (e) {\n var u = la.getSourceIndex(e),\n v = la.getTargetIndex(e);\n addNeighbours(u, v);\n addNeighbours(v, u);\n });\n return neighbours;\n}\n\nfunction computeLinkLengths(links, w, f, la) {\n var neighbours = getNeighbours(links, la);\n links.forEach(function (l) {\n var a = neighbours[la.getSourceIndex(l)];\n var b = neighbours[la.getTargetIndex(l)];\n la.setLength(l, 1 + w * f(a, b));\n });\n}\n\nfunction jaccardLinkLengths(links, la, w) {\n if (w === void 0) {\n w = 1;\n }\n computeLinkLengths(\n links,\n w,\n function (a, b) {\n return Math.min(Object.keys(a).length, Object.keys(b).length) < 1.1\n ? 0\n : 1 - intersectionCount(a, b) / unionCount(a, b);\n },\n la,\n );\n}\n\ncola.Layout.prototype.jaccardLinkLengths = function (idealLength, w) {\n var _this = this;\n if (w === void 0) {\n w = 1;\n }\n this.linkDistance(function (l) {\n return idealLength * l.length;\n });\n this._linkLengthCalculator = function () {\n return jaccardLinkLengths(_this._links, _this.linkAccessor, w);\n };\n return this;\n};\n","module.exports = __WEBPACK_EXTERNAL_MODULE__109__;","module.exports = __WEBPACK_EXTERNAL_MODULE__893__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import * as d3 from \"d3\";\n\nimport { Link, LinkDataType } from \"./link\";\n\nexport class Bundle {\n // Bundle group in the whole graph\n // {\n // \"[<source node id>, <target node id>, \\\"<bundle id>\\\"]\": [<link id>, ...],\n // }\n private static groups: Record<string, number[]>;\n\n // member Links of this Bundle\n protected readonly links: Link[];\n\n private color: string;\n private width: number;\n private space: number;\n private _shiftMultiplier: number;\n\n constructor(\n links: Link[],\n public id: number,\n ) {\n this.links = links;\n this.color = \"#7a4e4e\";\n this.width = 2;\n this.space = 4;\n }\n\n static divide(links: Link[]) {\n Bundle.groups = {};\n\n for (const l of links) {\n if (l.bundle) {\n const key = this.groupKey(l);\n (Bundle.groups[key] || (Bundle.groups[key] = [])).push(l.id);\n }\n }\n\n return Object.values(Bundle.groups).map((ids, i) => {\n return new Bundle(\n ids.map((id) => links[id]),\n i,\n );\n });\n }\n\n private static groupKey(link: Link) {\n return JSON.stringify([link.source, link.target, link.bundle]);\n }\n\n static render(\n linkLayer: d3.Selection<any>, // eslint-disable-line @typescript-eslint/no-explicit-any\n bundles: Bundle[],\n ) {\n const bundleGroup = linkLayer\n .selectAll(\".bundle\")\n .data(bundles)\n .enter()\n .append(\"g\")\n .attr(\"class\", (d) => d.class());\n\n const bundle = bundleGroup\n .append(\"path\")\n .attr(\"d\", (d) => d.d())\n .attr(\"stroke\", (d) => d.color)\n .attr(\"stroke-width\", (d) => d.width)\n .attr(\"fill\", \"none\")\n .attr(\"id\", (d) => d.bundleId());\n\n return bundle;\n }\n\n static reset() {\n Bundle.groups = null;\n }\n\n // sort by bundle with preserving order\n static sortByBundle(links: LinkDataType[]) {\n return links.sort((a, b) => {\n switch (true) {\n case !!a.bundle && !b.bundle:\n return -1;\n case !a.bundle && !!b.bundle:\n return 1;\n case !a.bundle && !b.bundle:\n return 0;\n\n // !!a.bundle && !!b.bundle === true\n case a.bundle.toString() < b.bundle.toString():\n return -1;\n case a.bundle.toString() > b.bundle.toString():\n return 1;\n\n default:\n return 0;\n }\n });\n }\n\n d() {\n const first = this.links[0].centerCoordinates();\n const last = this.links[this.links.length - 1].centerCoordinates();\n const gap = Math.sqrt(Math.pow(first[0] - last[0], 2) + Math.pow(first[1] - last[1], 2));\n\n if (gap === 0) {\n return \"\";\n }\n\n const angle = this.links[0].angle() + 90;\n const start = [\n ((first[0] - last[0]) * this.space) / gap + first[0],\n ((first[1] - last[1]) * this.space) / gap + first[1],\n ];\n const end = [\n ((last[0] - first[0]) * this.space) / gap + last[0],\n ((last[1] - first[1]) * this.space) / gap + last[1],\n ];\n\n return `M ${start[0]} ${start[1]} A ${gap / 2 + 10},5 ${angle} 1,0 ${end[0]} ${end[1]}`;\n }\n\n private shiftMultiplier() {\n if (!this._shiftMultiplier) {\n const members = this.links[0].group() || [];\n this._shiftMultiplier = this.links.reduce((sum, l) => (sum += l.id - (members.length - 1) / 2), 0) / 2;\n }\n\n return this._shiftMultiplier;\n }\n\n static shiftBundle(bundle: d3.Selection<Bundle>) {\n bundle.attr(\"d\", (d) => d.d());\n }\n\n private class() {\n // modified link's class\n return this.links[0].class().replace(/^link/, \"bundle\");\n }\n\n private bundleId() {\n return `bundle${this.id}`;\n }\n}\n","export function classify(string: string) {\n return string.replace(\" \", \"-\").toLowerCase();\n}\n","import * as d3 from \"d3\";\n\nimport { Color } from \"./diagram\";\nimport { Node } from \"./node\";\nimport { GroupPosition } from \"./position_cache\";\nimport { classify } from \"./util\";\n\nexport type Constructor = (name: string, color: Color) => void;\n\nexport type GroupOptions = {\n color: Color;\n padding: number;\n};\n\nexport class GroupBase {\n private padding: number;\n\n // Not appropriately defined in @types/d3/index.d.ts\n private bounds: any; // eslint-disable-line @typescript-eslint/no-explicit-any\n\n constructor(\n private name: string,\n private options: GroupOptions,\n ) {\n this.padding = options.padding;\n }\n\n transform() {\n return `translate(${this.bounds.x}, ${this.bounds.y})`;\n }\n\n private groupWidth() {\n return this.bounds.width();\n }\n\n private groupHeight() {\n return this.bounds.height();\n }\n\n static divide(nodes: Node[], pattern: RegExp, options: GroupOptions) {\n const groups = {};\n const register = (name: string, node: Node, parent?: string) => {\n const key = `${parent}:${name}`;\n groups[key] = groups[key] || new Group(name, options);\n // hacky but required due to WebCola implementation\n groups[key].push(node);\n };\n\n nodes.forEach((node) => {\n let result = null;\n\n if (pattern) {\n result = node.name.match(pattern);\n if (result) {\n register(result[1] || result[0], node);\n }\n }\n\n // Node type based group\n node.group.forEach((name) => register(name, node, String(result)));\n });\n\n return Object.values(groups as Record<string, Group>);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static render(layer: d3.Selection<any>, groups: Group[]) {\n const group: d3.Selection<Group> = layer\n .selectAll(\".group\")\n .data(groups)\n .enter()\n .append(\"g\")\n .attr(\"class\", (d) => `group ${classify(d.name)}`)\n .attr(\"transform\", (d) => d.transform());\n\n group\n .append(\"rect\")\n .attr(\"rx\", 8)\n .attr(\"ry\", 8)\n .attr(\"width\", (d) => d.groupWidth())\n .attr(\"height\", (d) => d.groupHeight())\n // Fix @types/d3/index.d.ts. Should be \"d3.scale.Ordinal<number, string>\" but \"d3.scale.Ordinal<string, string>\" somehow\n .style(\"fill\", (d, i) => d.options.color(i.toString()));\n\n group.append(\"text\").text((d) => d.name);\n\n return group;\n }\n\n static tick(group: d3.Selection<Group>) {\n group.attr(\"transform\", (d) => d.transform());\n group\n .selectAll(\"rect\")\n .attr(\"width\", (d) => d.groupWidth())\n .attr(\"height\", (d) => d.groupHeight());\n }\n\n static setPosition(group: d3.Selection<Group>, position: GroupPosition[]) {\n group.attr(\"transform\", (d, i) => {\n d.bounds.x = position[i].x;\n d.bounds.y = position[i].y;\n return d.transform();\n });\n group\n .selectAll(\"rect\")\n .attr(\"width\", (d, i) => position[i].width)\n .attr(\"height\", (d, i) => position[i].height);\n }\n}\n\nconst WebColable = (Base: typeof GroupBase) => {\n class Group extends Base {\n private leaves: number[]; // WebCola requires this\n\n constructor(name: string, options: GroupOptions) {\n super(name, options);\n\n this.leaves = [];\n }\n\n push(node: Node) {\n this.leaves.push(node.id);\n }\n }\n\n return Group;\n};\n\nconst Eventable = (Base: typeof GroupBase) => {\n class EventableGroup extends Base {\n private dispatch: d3.Dispatch;\n\n constructor(name: string, options: GroupOptions) {\n super(name, options);\n\n this.dispatch = d3.dispatch(\"rendered\");\n }\n\n static render(layer, groups) {\n const group = super.render(layer, groups);\n\n group.each(function (this: SVGGElement, d: Group & EventableGroup) {\n d.dispatch.rendered(this);\n });\n\n return group;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n on(name: string, callback: (element: SVGGElement) => any) {\n this.dispatch.on(name, callback);\n }\n }\n\n return EventableGroup;\n};\n\nconst Pluggable = (Base: typeof GroupBase) => {\n class Group extends Base {\n private static pluginConstructors: Constructor[] = [];\n\n constructor(name: string, options: GroupOptions) {\n super(name, options);\n\n for (const constructor of Group.pluginConstructors) {\n // Call Pluggable at last as constructor may call methods defined in other classes\n constructor.bind(this)(name, options);\n }\n }\n\n static registerConstructor(func: Constructor) {\n Group.pluginConstructors.push(func);\n }\n }\n\n return Group;\n};\n\nclass WebColableGroup extends WebColable(GroupBase) {}\n\nclass EventableGroup extends Eventable(WebColableGroup) {}\n\n// Call Pluggable at last as constructor may call methods defined in other classes\nclass Group extends Pluggable(EventableGroup) {}\n\nexport { Group };\n","export type MetaDataType = { class: string; value: any }; // eslint-disable-line @typescript-eslint/no-explicit-any\n\nexport class MetaData {\n constructor(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private data: Record<string, any>,\n private extraKey?: string,\n ) {}\n\n get(keys: string[]) {\n return this.slice(keys).filter((k) => typeof k.value === \"string\");\n }\n\n private slice(keys: string[]) {\n if (!this.data) return [];\n\n if (this.extraKey) return this.sliceWithExtraKey(keys);\n else return this.sliceWithoutExtraKey(keys);\n }\n\n private sliceWithExtraKey(keys: string[]) {\n const data: MetaDataType[] = [];\n\n keys.forEach((k) => {\n if (this.data[k] && this.data[k][this.extraKey]) data.push({ class: k, value: this.data[k][this.extraKey] });\n });\n\n return data;\n }\n\n private sliceWithoutExtraKey(keys: string[]) {\n const data: MetaDataType[] = [];\n\n keys.forEach((k) => {\n if (this.data[k]) data.push({ class: k, value: this.data[k] });\n });\n\n return data;\n }\n}\n","import * as d3 from \"d3\";\n\nimport { Color } from \"./diagram\";\nimport { MetaData, MetaDataType } from \"./meta_data\";\nimport { NodePosition } from \"./position_cache\";\nimport { classify } from \"./util\";\n\nexport type Constructor = (data: NodeDataType, id: number, options: NodeOptions) => void;\n\nexport type NodeDataType = {\n name: string;\n group: string[];\n icon: string;\n meta: Record<string, any>; // eslint-disable-line @typescript-eslint/no-explicit-any\n class: string;\n};\n\nexport type NodeOptions = {\n width: number;\n height: number;\n metaKeys: string[];\n color: Color;\n tooltip: boolean;\n};\n\nclass NodeBase {\n private static all: Record<string, any>; // eslint-disable-line @typescript-eslint/no-explicit-any\n\n public name: string;\n public group: string[];\n public metaList: MetaDataType[];\n public meta: Record<string, any>; // eslint-disable-line @typescript-eslint/no-explicit-any\n public x: number;\n public y: number;\n\n private icon: string;\n private extraClass: string;\n private width: number;\n private height: number;\n private padding: number;\n private tspanOffset: string;\n\n constructor(\n data: NodeDataType,\n public id: number,\n private options: NodeOptions,\n ) {\n this.name = data.name;\n this.group = typeof data.group === \"string\" ? [data.group] : data.group || [];\n this.icon = data.icon;\n this.metaList = new MetaData(data.meta).get(options.metaKeys);\n this.meta = data.meta;\n this.extraClass = data.class || \"\";\n\n this.width = options.width || 60;\n this.height = options.height || 40;\n this.padding = 3;\n this.tspanOffset = \"1.1em\";\n\n this.register(id);\n }\n\n private register(id: number) {\n Node.all = Node.all || {};\n Node.all[this.name] = id;\n }\n\n transform() {\n const x = this.x - this.width / 2 + this.padding;\n const y = this.y - this.height / 2 + this.padding;\n return `translate(${x}, ${y})`;\n }\n\n private nodeWidth() {\n return this.width - 2 * this.padding;\n }\n\n private nodeHeight() {\n return this.height - 2 * this.padding;\n }\n\n private xForText() {\n return this.nodeWidth() / 2;\n }\n\n private yForText() {\n // svg ignores padding for some reason\n return this.height / 2;\n }\n\n static idByName(name: string) {\n if (Node.all[name] === undefined) throw `Unknown node \"${name}\"`;\n return Node.all[name];\n }\n\n public nodeId() {\n return classify(this.name);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static render(layer: d3.Selection<any>, nodes: Node[]) {\n const node: d3.Selection<Node> = layer\n .selectAll(\".node\")\n .data(nodes)\n .enter()\n .append(\"g\")\n .attr(\"id\", (d) => d.nodeId())\n .attr(\"name\", (d) => d.name)\n .attr(\"transform\", (d) => d.transform());\n\n node.each(function (this: SVGGElement, d) {\n if (d.icon) Node.appendImage(this);\n else Node.appendRect(this);\n\n Node.appendText(this);\n });\n\n return node;\n }\n\n private static appendText(container: SVGGElement) {\n const text = (d3.select(container) as d3.Selection<Node>)\n .append(\"text\")\n .attr(\"text-anchor\", \"middle\")\n .attr(\"x\", (d) => d.xForText())\n .attr(\"y\", (d) => d.yForText());\n text\n .append(\"tspan\")\n .text((d) => d.name)\n .attr(\"x\", (d) => d.xForText());\n\n text.each((d) => {\n // Show meta only when \"tooltip\" option is not configured\n if (!d.options.tooltip) {\n Node.appendMetaText(text, d.metaList);\n }\n });\n }\n\n private static appendMetaText(container: d3.Selection<Node>, meta: MetaDataType[]) {\n meta.forEach((m) => {\n container\n .append(\"tspan\")\n .attr(\"x\", (d) => d.xForText())\n .attr(\"dy\", (d) => d.tspanOffset)\n .attr(\"class\", m.class)\n .text(m.value);\n });\n }\n\n private static appendImage(container: SVGGElement) {\n (d3.select(container) as d3.Selection<Node>)\n .attr(\"class\", (d) => `node image ${classify(d.name)} ${d.extraClass}`)\n .append(\"image\")\n .attr(\"xlink:href\", (d) => d.icon)\n .attr(\"width\", (d) => d.nodeWidth())\n .attr(\"height\", (d) => d.nodeHeight());\n }\n\n private static appendRect(container: SVGGElement) {\n (d3.select(container) as d3.Selection<Node>)\n .attr(\"class\", (d) => `node rect ${classify(d.name)} ${d.extraClass}`)\n .append(\"rect\")\n .attr(\"width\", (d) => d.nodeWidth())\n .attr(\"height\", (d) => d.nodeHeight())\n .attr(\"rx\", 5)\n .attr(\"ry\", 5)\n .style(\"fill\", (d) => d.options.color(undefined));\n }\n\n static tick(node: d3.Selection<Node>) {\n node.attr(\"transform\", (d) => d.transform());\n }\n\n static setPosition(node: d3.Selection<Node>, position: NodePosition[]) {\n node.attr(\"transform\", (d, i) => {\n if (\n position[i]?.x !== null &&\n position[i]?.x !== undefined &&\n position[i]?.y !== null &&\n position[i]?.y !== undefined\n ) {\n d.x = position[i].x;\n d.y = position[i].y;\n }\n return d.transform();\n });\n }\n\n static reset() {\n Node.all = null;\n }\n}\n\nconst Eventable = (Base: typeof NodeBase) => {\n class EventableNode extends Base {\n private dispatch: d3.Dispatch;\n\n constructor(data: NodeDataType, id: number, options: NodeOptions) {\n super(data, id, options);\n\n this.dispatch = d3.dispatch(\"rendered\");\n }\n\n static render(layer, nodes) {\n const node = super.render(layer, nodes);\n\n node.each(function (this: SVGGElement, d: Node & EventableNode) {\n d.dispatch.rendered(this);\n });\n\n return node;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n on(name: string, callback: (element: SVGGElement) => any) {\n this.dispatch.on(name, callback);\n }\n }\n\n return EventableNode;\n};\n\nconst Pluggable = (Base: typeof NodeBase) => {\n class Node extends Base {\n private static pluginConstructors: Constructor[] = [];\n\n constructor(data: NodeDataType, id: number, options: NodeOptions) {\n super(data, id, options);\n\n for (const constructor of Node.pluginConstructors) {\n // Call Pluggable at last as constructor may call methods defined in other classes\n constructor.bind(this)(data, id, options);\n }\n }\n\n static registerConstructor(func: Constructor) {\n Node.pluginConstructors.push(func);\n }\n }\n\n return Node;\n};\n\nclass EventableNode extends Eventable(NodeBase) {}\n\n// Call Pluggable at last as constructor may call methods defined in other classes\nclass Node extends Pluggable(EventableNode) {}\n\nexport { Node };\n","import * as d3 from \"d3\";\n\nimport { Bundle } from \"./bundle\";\nimport { MetaData, MetaDataType } from \"./meta_data\";\nimport { Node } from \"./node\";\nimport { LinkPosition } from \"./position_cache\";\nimport { classify } from \"./util\";\n\nexport type Constructor = (data: LinkDataType, id: number, metaKeys: string[], linkWidth: (object) => number) => void;\n\nexport type LinkDataType = {\n source: string;\n target: string;\n bundle?: number | string;\n meta: Record<string, any>; // eslint-disable-line @typescript-eslint/no-explicit-any\n class: string;\n};\n\nexport type LinkOptions = {\n metaKeys: string[];\n linkWidth: (object) => number;\n};\n\nexport class LinkBase {\n private static groups: Record<string, number[]>;\n private static scale?: number;\n\n public readonly bundle?: number | string;\n public readonly source: number | Node;\n public readonly target: number | Node;\n public readonly metaList: MetaDataType[];\n public readonly sourceMeta: MetaDataType[];\n public readonly targetMeta: MetaDataType[];\n\n private readonly extraClass: string;\n private width: number;\n private readonly defaultMargin: number;\n private readonly labelXOffset: number;\n private readonly labelYOffset: number;\n private color: string;\n private _margin: number;\n private _shiftMultiplier: number;\n\n constructor(\n data: LinkDataType,\n public id: number,\n private options: LinkOptions,\n ) {\n this.source = Node.idByName(data.source);\n this.target = Node.idByName(data.target);\n this.bundle = data.bundle;\n this.metaList = new MetaData(data.meta).get(options.metaKeys);\n this.sourceMeta = new MetaData(data.meta, \"source\").get(options.metaKeys);\n this.targetMeta = new MetaData(data.meta, \"target\").get(options.metaKeys);\n this.extraClass = data.class || \"\";\n\n if (typeof options.linkWidth === \"function\") this.width = options.linkWidth(data.meta) || 3;\n else this.width = options.linkWidth || 3;\n\n this.defaultMargin = 15;\n this.labelXOffset = 20;\n this.labelYOffset = 1.5; // em\n this.color = \"#7a4e4e\";\n\n this.register(id);\n }\n\n private register(id: number) {\n Link.groups = Link.groups || {};\n\n // source and target\n const key = [this.source, this.target].sort().toString();\n (Link.groups[key] || (Link.groups[key] = [])).push(id);\n }\n\n private isLabelledPath() {\n return this.metaList.length > 0;\n }\n\n private isReversePath() {\n return this.targetMeta.length > 0;\n }\n\n d() {\n return `M ${(this.source as Node).x} ${(this.source as Node).y} L ${(this.target as Node).x} ${\n (this.target as Node).y\n }`;\n }\n\n private pathId() {\n return `path${this.id}`;\n }\n\n public linkId() {\n return `link${this.id}`;\n }\n\n private margin() {\n if (!this._margin) {\n const margin = window.getComputedStyle(document.getElementById(this.linkId())).margin;\n\n // NOTE: Assuming that window.getComputedStyle() returns some value link \"10px\"\n // or \"0px\" even when not defined in .css\n if (!margin || margin === \"0px\") {\n this._margin = this.defaultMargin;\n } else {\n this._margin = parseInt(margin);\n }\n }\n\n return this._margin;\n }\n\n private isLabelVisible() {\n const pathLength = (document.getElementById(this.pathId()) as unknown as SVGPathElement).getTotalLength();\n\n const isShort = Array.from(document.getElementsByClassName(this.pathId())).some((p) => {\n // <text /> has only one <textPath />\n const tp = p.firstChild as SVGTextPathElement;\n // center label\n if (tp.classList.contains(\"center\")) {\n return tp.getComputedTextLength() > pathLength;\n } else {\n return tp.getComputedTextLength() + this.labelXOffset > pathLength;\n }\n });\n\n d3.selectAll(`text.${this.pathId()}`).classed(\"short\", isShort);\n\n // Link.scale is initially undefined\n return Link.scale > 1.5 && !isShort;\n }\n\n group(): number[] {\n return Link.groups[[(this.source as Node).id, (this.target as Node).id].sort().toString()];\n }\n\n // OPTIMIZE: Implement better right-alignment of the path, especially for multi tspans\n private tspanXOffset() {\n switch (true) {\n case this.isLabelledPath():\n return 0;\n case this.isReversePath():\n return -this.labelXOffset;\n default:\n return this.labelXOffset;\n }\n }\n\n private tspanYOffset() {\n if (this.isLabelledPath()) return `${-this.labelYOffset + 0.7}em`;\n else return `${this.labelYOffset}em`;\n }\n\n private rotate(bbox: SVGRect) {\n if ((this.source as Node).x > (this.target as Node).x)\n return `rotate(180 ${bbox.x + bbox.width / 2} ${bbox.y + bbox.height / 2})`;\n else return \"rotate(0)\";\n }\n\n private split() {\n if (!this.metaList && !this.sourceMeta && !this.targetMeta) return [this];\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const meta: Record<string, any>[] = [];\n [\"metaList\", \"sourceMeta\", \"targetMeta\"].forEach((key, i, keys) => {\n if (this[key]) {\n const duped = Object.assign(Object.create(this), this);\n\n keys.filter((k) => k !== key).forEach((k) => (duped[k] = []));\n meta.push(duped);\n }\n });\n\n return meta;\n }\n\n private hasMeta() {\n return this.metaList.length > 0 || this.sourceMeta.length > 0 || this.targetMeta.length > 0;\n }\n\n class() {\n return `link ${classify((this.source as Node).name)} ${classify((this.target as Node).name)} ${classify(\n (this.source as Node).name,\n )}-${classify((this.target as Node).name)} ${this.extraClass}`;\n }\n\n // after transform is applied\n centerCoordinates() {\n const link = d3.select(`.link #${this.linkId()}`).node() as SVGLineElement;\n const bbox = link.getBBox();\n const transform = link.transform.baseVal.consolidate();\n\n return [\n bbox.x + bbox.width / 2 + (transform?.matrix.e || 0),\n bbox.y + bbox.height / 2 + (transform?.matrix.f || 0),\n ];\n }\n\n angle() {\n const link = d3.select(`.link #${this.linkId()}`).node() as SVGLineElement;\n return (\n (Math.atan2(link.y2.baseVal.value - link.y1.baseVal.value, link.x2.baseVal.value - link.x1.baseVal.value) * 180) /\n Math.PI\n );\n }\n\n static render(\n linkLayer: d3.Selection<any>, // eslint-disable-line @typescript-eslint/no-explicit-any\n labelLayer: d3.Selection<any>, // eslint-disable-line @typescript-eslint/no-explicit-any\n links: Link[],\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ): [d3.Selection<Link>, d3.Selection<Link>, d3.Selection<any>] {\n // Render lines\n const pathGroup = linkLayer\n .selectAll(\".link\")\n .data(links)\n .enter()\n .append(\"g\")\n .attr(\"class\", (d) => d.class());\n\n const link = pathGroup\n .append(\"line\")\n .attr(\"x1\", (d) => (d.source as Node).x)\n .attr(\"y1\", (d) => (d.source as Node).y)\n .attr(\"x2\", (d) => (d.target as Node).x)\n .attr(\"y2\", (d) => (d.target as Node).y)\n .attr(\"stroke\", (d) => d.color)\n .attr(\"stroke-width\", (d) => d.width)\n .attr(\"id\", (d) => d.linkId())\n .on(\"mouseover.line\", (d) => textGroup.selectAll(`text.${d.pathId()}`).classed(\"hover\", true))\n .on(\"mouseout.line\", (d) => textGroup.selectAll(`text.${d.pathId()}`).classed(\"hover\", false));\n\n const path = pathGroup\n .append(\"path\")\n .attr(\"d\", (d) => d.d())\n .attr(\"id\", (d) => d.pathId());\n\n // Render texts\n const textGroup = labelLayer\n .selectAll(\".link\")\n .data(links)\n .enter()\n .append(\"g\")\n .attr(\"class\", (d) => d.class());\n\n const text = textGroup\n .selectAll(\"text\")\n .data((d: Link) => d.split().filter((l: Link) => l.hasMeta()))\n .enter()\n .append(\"text\")\n .attr(\"class\", (d: Link) => d.pathId()); // Bind text with pathId as class\n\n const textPath = text.append(\"textPath\").attr(\"xlink:href\", (d: Link) => `#${d.pathId()}`);\n\n textPath.each(function (d: Link) {\n Link.appendMetaText(this, d.metaList);\n Link.appendMetaText(this, d.sourceMeta);\n Link.appendMetaText(this, d.targetMeta);\n\n if (d.isLabelledPath()) Link.center(this);\n\n if (d.isReversePath()) Link.theOtherEnd(this);\n });\n\n Link.zoom(); // Initialize\n return [link, path, text];\n }\n\n private static theOtherEnd(container: SVGGElement) {\n d3.select(container).attr(\"class\", \"reverse\").attr(\"text-anchor\", \"end\").attr(\"startOffset\", \"100%\");\n }\n\n private static center(container: SVGGElement) {\n d3.select(container).attr(\"class\", \"center\").attr(\"text-anchor\", \"middle\").attr(\"startOffset\", \"50%\");\n }\n\n private static appendMetaText(container: SVGGElement, meta: MetaDataType[]) {\n meta.forEach((m) => {\n d3.select(container)\n .append(\"tspan\")\n .attr(\"x\", (d: Link) => d.tspanXOffset())\n .attr(\"dy\", (d: Link) => d.tspanYOffset())\n .attr(\"class\", m.class)\n .text(m.value);\n });\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static tick(link: d3.Selection<Link>, path?: d3.Selection<Link>, label?: d3.Selection<any>) {\n link\n .attr(\"x1\", (d) => (d.source as Node).x)\n .attr(\"y1\", (d) => (d.source as Node).y)\n .attr(\"x2\", (d) => (d.target as Node).x)\n .attr(\"y2\", (d) => (d.target as Node).y);\n\n if(path) {\n path.attr(\"d\", (d) => d.d());\n }\n\n if(label) {\n label.attr(\"transform\", function(d: Link) {\n return d.rotate(this.getBBox());\n });\n }\n\n // hide labels when the path is too short\n d3.selectAll(\".link text\").style(\"visibility\", (d: Link) => (d.isLabelVisible() ? \"visible\" : \"hidden\"));\n }\n\n static zoom(scale?: number) {\n Link.scale = scale;\n\n d3.selectAll(\".link text\").style(\"visibility\", (d: Link) => (d.isLabelVisible() ? \"visible\" : \"hidden\"));\n }\n\n static setPosition(link: d3.Selection<Link>, position: LinkPosition[]) {\n link\n .attr(\"x1\", (d, i) => position[i].x1)\n .attr(\"y1\", (d, i) => position[i].y1)\n .attr(\"x2\", (d, i) => position[i].x2)\n .attr(\"y2\", (d, i) => position[i].y2);\n }\n\n private shiftMultiplier() {\n if (!this._shiftMultiplier) {\n const members = this.group() || [];\n this._shiftMultiplier = members.indexOf(this.id) - (members.length - 1) / 2;\n }\n\n return this._shiftMultiplier;\n }\n\n static shiftBundle(\n link: d3.Selection<Link>,\n path: d3.Selection<Link>,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n label: d3.Selection<any>,\n bundle: d3.Selection<Bundle>,\n ) {\n const transform = (d: Link) => d.shiftBundle(d.shiftMultiplier());\n\n link.attr(\"transform\", transform);\n path.attr(\"transform\", transform);\n label.attr(\"transform\", transform);\n Bundle.shiftBundle(bundle);\n }\n\n shiftBundle(multiplier: number) {\n const gap = this.margin() * multiplier;\n\n const x = (this.target as Node).x - (this.source as Node).x;\n const y = (this.target as Node).y - (this.source as Node).y;\n const length = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));\n\n return `translate(${(-gap * y) / length}, ${(gap * x) / length})`;\n }\n\n static reset() {\n Link.groups = null;\n }\n}\n\nconst Eventable = (Base: typeof LinkBase) => {\n class EventableLink extends Base {\n private dispatch: d3.Dispatch;\n\n constructor(data: LinkDataType, id: number, options: LinkOptions) {\n super(data, id, options);\n\n this.dispatch = d3.dispatch(\"rendered\");\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static render(linkLayer, labelLayer, links): [d3.Selection<Link>, d3.Selection<Link>, d3.Selection<any>] {\n const [link, path, text] = super.render(linkLayer, labelLayer, links);\n\n link.each(function (this: SVGLineElement, d: Link & EventableLink) {\n d.dispatch.rendered(this);\n });\n\n return [link, path, text];\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n on(name: string, callback: (element: SVGGElement) => any) {\n this.dispatch.on(name, callback);\n }\n }\n\n return EventableLink;\n};\n\nconst Pluggable = (Base: typeof LinkBase) => {\n class Link extends Base {\n private static pluginConstructors: Constructor[] = [];\n\n constructor(data: LinkDataType, id: number, options: LinkOptions) {\n super(data, id, options);\n\n for (const constructor of Link.pluginConstructors) {\n // Call Pluggable at last as constructor may call methods defined in other classes\n constructor.bind(this)(data, id, options);\n }\n }\n\n static registerConstructor(func: Constructor) {\n Link.pluginConstructors.push(func);\n }\n }\n\n return Link;\n};\n\nclass EventableLink extends Eventable(LinkBase) {}\n\n// Call Pluggable at last as constructor may call methods defined in other classes\nclass Link extends Pluggable(EventableLink) {}\n\nexport { Link };\n","import * as d3 from \"d3\";\n\nimport { HrefFunction } from \"./diagram\";\n\ntype TooltipOptions = {\n offsetX?: number;\n};\n\nexport abstract class Tooltip {\n static href: HrefFunction;\n protected static type: \"node\" | \"link\";\n\n protected offsetX: number;\n private visibility: string;\n\n constructor(\n private eventType: string,\n options: TooltipOptions = {},\n ) {\n this.offsetX = options.offsetX !== undefined ? options.offsetX : 30;\n this.visibility = \"hidden\";\n }\n\n protected tspanOffsetY(marginTop: boolean) {\n return marginTop ? \"2em\" : \"1.1em\";\n }\n\n transform(): string {\n throw new Error(\"not implemented\");\n }\n\n private class() {\n return `tooltip ${(this.constructor as typeof Tooltip).type}-tooltip ${this.objectId()}`;\n }\n\n // Object id which has this tooltip\n protected abstract objectId(boolean?): string;\n\n private setVisibility(visibility: string | null) {\n this.visibility = visibility === \"visible\" ? \"visible\" : \"hidden\";\n }\n\n // This doesn't actually toggle visibility, but returns string for toggled visibility\n private toggleVisibility() {\n this.visibility = this.visibility === \"hidden\" ? \"visible\" : \"hidden\";\n return this.visibility;\n }\n\n private toggleVisibilityCallback(element: SVGGElement) {\n return () => {\n // Do nothing for dragging\n if ((d3.event as MouseEvent).defaultPrevented) {\n return;\n }\n\n d3.select(element)\n .attr(\"visibility\", function (d) {\n // Sync visibility before toggling. External script may change the visibility.\n d.setVisibility(this.getAttribute(\"visibility\"));\n return d.toggleVisibility();\n })\n // bootstrap.css unexpectedly sets \"opacity: 0\". Reset if it's visible.\n .style(\"opacity\", function (d) {\n return d.visibility === \"visible\" ? 1 : null;\n });\n };\n }\n\n private configureObjectClickCallback(element: SVGGElement) {\n d3.select(`#${this.objectId(true)}`).on(\"click.tooltip\", this.toggleVisibilityCallback(element));\n }\n\n private configureObjectHoverCallback(element: SVGGElement) {\n d3.select(`#${this.objectId(true)}`).on(\"mouseenter.tooltip\", this.toggleVisibilityCallback(element));\n d3.select(`#${this.objectId(true)}`).on(\"mouseleave.tooltip\", this.toggleVisibilityCallback(element));\n }\n\n // Make tooltip selectable\n private disableZoom(element: SVGGElement) {\n d3.select(element).on(\"mousedown.tooltip\", () => {\n (d3.event as MouseEvent).stopPropagation();\n });\n }\n\n static setHref(callback: HrefFunction) {\n if (callback) this.href = callback;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static render<T extends Tooltip>(layer: d3.Selection<any>, tooltips: T[]) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const cls = this;\n const tooltip = layer\n .selectAll(`.tooltip.${cls.type}-tooltip`)\n .data(tooltips)\n .enter()\n .append(\"g\")\n .attr(\"visibility\", (d) => d.visibility)\n .attr(\"class\", (d) => d.class())\n .attr(\"transform\", (d) => d.transform());\n\n tooltip.each(function (d) {\n cls.appendText(this);\n\n if (typeof (d.constructor as typeof Tooltip).href === \"function\") {\n cls.appendExternalLinkIcon(this);\n }\n\n if (d.eventType === \"hover\") {\n d.configureObjectHoverCallback(this);\n } else {\n d.configureObjectClickCallback(this);\n }\n\n d.disableZoom(this);\n });\n\n return tooltip;\n }\n\n protected static fill(element: SVGPathElement) {\n // If no \"fill\" style is defined\n if (getComputedStyle(element).fill.match(/\\(0,\\s*0,\\s*0\\)/)) {\n return \"#f8f1e9\";\n }\n }\n\n protected static pathD(x: number, y: number, width: number, height: number) {\n const round = 8;\n\n return (\n `M ${x},${y} L ${x + 20},${y - 10} ${x + 20},${y - 20}` +\n `Q ${x + 20},${y - 20 - round} ${x + 20 + round},${y - 20 - round}` +\n `L ${x + 20 + width - round},${y - 20 - round}` +\n `Q ${x + 20 + width},${y - 20 - round} ${x + 20 + width},${y - 20}` +\n `L ${x + 20 + width},${y - 20 + height}` +\n `Q ${x + 20 + width},${y - 20 + height + round} ${x + 20 + width - round},${y - 20 + height + round}` +\n `L ${x + 20 + round},${y - 20 + height + round}` +\n `Q ${x + 20},${y - 20 + height + round} ${x + 20},${y - 20 + height}` +\n `L ${x + 20},${y + 10} Z`\n );\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected static appendText(container: SVGGElement) {\n throw new Error(\"not implemented\");\n }\n\n /**\n * Append \"name: value\" to the container\n * @param container\n * @param name\n * @param value\n * @param marginTop Render wide margin if true, ordinary marin if false, and no margin if undefined\n * @protected\n */\n protected static appendNameValue<T extends Tooltip>(\n container: d3.Selection<T>,\n name: string,\n value: (d: T) => string,\n marginTop?: boolean,\n ) {\n container\n .append(\"tspan\")\n .attr(\"x\", (d) => d.offsetX + 40)\n .attr(\"dy\", (d) => (marginTop === undefined ? undefined : d.tspanOffsetY(marginTop)))\n .attr(\"class\", \"name\")\n .text(`${name}:`);\n\n container.append(\"tspan\").attr(\"dx\", 10).attr(\"class\", \"value\").text(value);\n }\n\n // modified https://tabler-icons.io/i/external-link\n protected static appendExternalLinkIcon(container: SVGGElement) {\n const bbox = container.getBBox();\n const a = d3\n .select(container)\n .append(\"a\")\n .attr(\"href\", (d) => (d.constructor as typeof Tooltip).href(d, (d.constructor as typeof Tooltip).type));\n const size = 20;\n const svg = a\n .append(\"svg\")\n .attr(\"x\", (d) => bbox.width + d.offsetX - 2 - size)\n .attr(\"y\", bbox.height - 30 - size)\n .attr(\"width\", size)\n .attr(\"height\", size)\n .attr(\"viewBox\", `0 0 24 24`)\n .attr(\"stroke-width\", 2)\n .attr(\"fill\", \"none\")\n .attr(\"stroke-linecap\", \"round\")\n .attr(\"stroke-linejoin\", \"round\")\n .attr(\"class\", \"icon external-link\");\n svg.append(\"path\").attr(\"d\", `M0 0h24v24H0z`).attr(\"stroke\", \"none\").attr(\"fill\", \"#fff\").attr(\"fill-opacity\", 0);\n svg.append(\"path\").attr(\"d\", \"M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6\");\n svg.append(\"path\").attr(\"d\", \"M11 13l9 -9\");\n svg.append(\"path\").attr(\"d\", \"M15 4h5v5\");\n }\n\n static followObject(tooltip: d3.Selection<Tooltip>) {\n tooltip.attr(\"transform\", (d) => d.transform());\n }\n}\n","import * as d3 from \"d3\";\n\nimport { Link } from \"./link\";\nimport { Node } from \"./node\";\nimport { Tooltip } from \"./tooltip\";\nimport { classify } from \"./util\";\n\nexport class LinkTooltip extends Tooltip {\n protected static type = \"link\" as const;\n\n constructor(\n private link: Link,\n eventType: string,\n ) {\n super(eventType, { offsetX: 10 });\n }\n\n transform() {\n const [x, y] = this.link.centerCoordinates();\n return `translate(${x}, ${y})`;\n }\n\n protected objectId(escape = false) {\n let id = classify(this.link.linkId());\n\n if (escape) {\n id = CSS.escape(id);\n }\n\n return id;\n }\n\n protected static appendText(container: SVGGElement) {\n const path = d3.select(container).append(\"path\") as d3.Selection<LinkTooltip>;\n const text = d3.select(container).append(\"text\") as d3.Selection<LinkTooltip>;\n\n LinkTooltip.appendNameValue(text, \"source\", (d) => (d.link.source as Node).name);\n text.each(function (d) {\n d.link.sourceMeta.forEach((m) => {\n LinkTooltip.appendNameValue(text, m.class, m.value, false);\n });\n });\n\n LinkTooltip.appendNameValue(text, \"target\", (d) => (d.link.target as Node).name, true);\n text.each(function (d) {\n d.link.targetMeta.forEach((m) => {\n LinkTooltip.appendNameValue(text, m.class, m.value, false);\n });\n });\n\n text.each(function (d) {\n d.link.metaList.forEach((m, i) => {\n LinkTooltip.appendNameValue(text, m.class, m.value, i === 0);\n });\n\n // Add \"d\" after bbox calculation\n const bbox = this.getBBox();\n path\n .attr(\"d\", (d) => LinkTooltip.pathD(d.offsetX, 0, bbox.width + 40, bbox.height + 20))\n .style(\"fill\", function () {\n return LinkTooltip.fill(this);\n });\n });\n }\n}\n","import * as d3 from \"d3\";\n\nimport { Node } from \"./node\";\nimport { Tooltip } from \"./tooltip\";\n\nexport class NodeTooltip extends Tooltip {\n protected static type = \"node\" as const;\n\n constructor(\n private node: Node,\n eventType: string,\n ) {\n super(eventType);\n }\n\n transform() {\n return `translate(${this.node.x}, ${this.node.y})`;\n }\n\n protected objectId(escape = false) {\n let id = this.node.nodeId();\n\n if (escape) {\n id = CSS.escape(id);\n }\n\n return id;\n }\n\n protected static appendText(container: SVGGElement) {\n const path = d3.select(container).append(\"path\") as d3.Selection<NodeTooltip>;\n const text = d3.select(container).append(\"text\") as d3.Selection<NodeTooltip>;\n\n NodeTooltip.appendNameValue(text, \"node\", (d) => d.node.name);\n\n text.each(function (d) {\n d.node.metaList.forEach((m, i) => {\n NodeTooltip.appendNameValue(text, m.class, m.value, i === 0);\n });\n\n // Add \"d\" after bbox calculation\n const bbox = this.getBBox();\n path\n .attr(\"d\", (d) => NodeTooltip.pathD(d.offsetX, 0, bbox.width + 40, bbox.height + 20))\n .style(\"fill\", function () {\n return NodeTooltip.fill(this);\n });\n });\n }\n}\n","import * as md5 from \"crypto-js/md5\";\nimport * as d3 from \"d3\";\n\nimport { InetHengeDataType } from \"./diagram\";\nimport { Group } from \"./group\";\nimport { Link } from \"./link\";\nimport { Node } from \"./node\";\n\nexport type GroupPosition = { x: number; y: number; width: number; height: number };\nexport type NodePosition = { x: number; y: number };\nexport type LinkPosition = { x1: number; y1: number; x2: number; y2: number };\ntype ExtendedInetHengeDataType = InetHengeDataType & { pop: string };\ntype CacheDataType = {\n md5: string;\n group: GroupPosition[];\n node: NodePosition[];\n link: LinkPosition[];\n};\n\nexport class PositionCache {\n private readonly cachedMd5: string;\n public group: GroupPosition[];\n public node: NodePosition[];\n public link: LinkPosition[];\n\n constructor(\n public data: InetHengeDataType,\n public pop?: RegExp,\n md5?: string,\n ) {\n // NOTE: properties below can be undefined\n this.cachedMd5 = md5;\n }\n\n private static getAll(): Record<string, CacheDataType> {\n return JSON.parse(localStorage.getItem(\"positionCache\")) || {};\n }\n\n private static key() {\n return `${location.pathname}${location.search}`;\n }\n\n private static get() {\n return this.getAll()[this.key()] || ({} as CacheDataType);\n }\n\n save(group: d3.Selection<Group>, node: d3.Selection<Node>, link: d3.Selection<Link>) {\n const cache = PositionCache.getAll();\n cache[PositionCache.key()] = {\n md5: this.md5(),\n group: this.groupPosition(group),\n node: this.nodePosition(node),\n link: this.linkPosition(link),\n };\n\n localStorage.setItem(\"positionCache\", JSON.stringify(cache));\n }\n\n private md5(data?: ExtendedInetHengeDataType, pop?: RegExp) {\n data = structuredClone(data || this.data) as ExtendedInetHengeDataType;\n data.pop = String(pop || this.pop);\n if (data.pop === \"undefined\") {\n data.pop = \"null\"; // NOTE: unify undefined with null\n }\n\n if (data.nodes) {\n data.nodes.forEach((i) => {\n delete i.icon;\n delete i.meta;\n });\n }\n if (data.links) {\n data.links.forEach((i) => {\n delete i.meta;\n });\n }\n\n return md5(JSON.stringify(data)).toString();\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private groupPosition(group: d3.Selection<any>) {\n const position: GroupPosition[] = [];\n\n group.each((d) => {\n position.push({\n x: d.bounds.x,\n y: d.bounds.y,\n width: d.bounds.width(),\n height: d.bounds.height(),\n });\n });\n\n return position;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private nodePosition(node: d3.Selection<any>) {\n const position: NodePosition[] = [];\n\n node.each((d: Node) => {\n position.push({\n x: d.x,\n y: d.y,\n });\n });\n\n return position;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private linkPosition(link: d3.Selection<any>) {\n const position: LinkPosition[] = [];\n\n link.each((d) => {\n position.push({\n x1: d.source.x,\n y1: d.source.y,\n x2: d.target.x,\n y2: d.target.y,\n });\n });\n\n return position;\n }\n\n private match(data: InetHengeDataType, pop: RegExp) {\n return this.cachedMd5 === this.md5(data as ExtendedInetHengeDataType, pop);\n }\n\n static load(data: InetHengeDataType, pop: RegExp) {\n const cache = this.get();\n if (cache) {\n const position = new PositionCache(data, pop, cache.md5);\n if (position.match(data, pop)) {\n // if data and pop match saved md5\n position.group = cache.group;\n position.node = cache.node;\n position.link = cache.link;\n\n return position;\n }\n }\n }\n}\n","import \"./hack_cola\";\n\nimport * as d3 from \"d3\";\n\nimport { WebColaConstraint } from \"../types/WebCola\";\nimport { Bundle } from \"./bundle\";\nimport { Group, GroupOptions } from \"./group\";\nimport { Link, LinkDataType } from \"./link\";\nimport { LinkTooltip } from \"./link_tooltip\";\nimport { Node, NodeDataType, NodeOptions } from \"./node\";\nimport { NodeTooltip } from \"./node_tooltip\";\nimport { NodePosition, PositionCache } from \"./position_cache\";\n\nconst cola = require(\"cola\"); // eslint-disable-line @typescript-eslint/no-require-imports\n\ntype LinkWidthFunction = (object) => number;\nexport type HrefFunction = (object, type?: \"node\" | \"link\") => string;\nexport type InetHengeDataType = { nodes: NodeDataType[]; links: LinkDataType[] };\n// Fix @types/d3/index.d.ts. Should be \"d3.scale.Ordinal<number, string>\" but \"d3.scale.Ordinal<string, string>\" somehow\nexport type Color = d3.scale.Ordinal<string, string>;\ntype PositionHint = {\n nodeCallback?: (node: Node) => NodePosition;\n};\ntype PositionConstraint = {\n axis: \"x\" | \"y\";\n nodesCallback: (nodes: Node[]) => Node[][];\n};\ntype DiagramOptionType = {\n // Options publicly available\n width: number;\n height: number;\n nodeWidth: number;\n nodeHeight: number;\n groupPadding: number;\n initialTicks: number;\n ticks: number;\n positionCache: boolean | string;\n positionHint: PositionHint;\n positionConstraints: PositionConstraint[];\n bundle: boolean;\n pop: RegExp;\n distance: LinkWidthFunction;\n tooltip: string;\n href: HrefFunction;\n\n // Internal options\n selector: string;\n urlOrData: string | InetHengeDataType;\n groupPattern: RegExp | undefined;\n color: Color;\n maxTicks: number;\n\n meta: string[];\n};\n\nclass DiagramBase {\n public tickCallback: () => void;\n\n private options: DiagramOptionType;\n private readonly setDistance: (object) => number;\n private getLinkWidth: LinkWidthFunction;\n private zoom: d3.behavior.Zoom<unknown>;\n private cola;\n private uniqueUrl: string;\n private positionCache: PositionCache;\n private indicator: d3.Selection<any>; // eslint-disable-line @typescript-eslint/no-explicit-any\n private initialTranslate: [number, number];\n private initialScale: number;\n private svg: d3.Selection<any>; // eslint-disable-line @typescript-eslint/no-explicit-any\n\n constructor(container: string, urlOrData: string | InetHengeDataType, options: DiagramOptionType) {\n options ||= {} as DiagramOptionType;\n this.options = Object.assign({}, options);\n this.options.selector = container;\n this.options.urlOrData = urlOrData;\n this.options.groupPattern = options.pop;\n this.options.width = options.width || 960;\n this.options.height = options.height || 600;\n this.options.positionHint = options.positionHint || {};\n this.options.positionConstraints = options.positionConstraints || [];\n\n this.options.color = d3.scale.category20();\n this.options.initialTicks = options.initialTicks || 0;\n this.options.maxTicks = options.ticks || 1000;\n // NOTE: true or 'fixed' (experimental) affects behavior\n this.options.positionCache = \"positionCache\" in options ? options.positionCache : true;\n // NOTE: This is an experimental option\n this.options.bundle = \"bundle\" in options ? options.bundle : false;\n this.options.tooltip = options.tooltip;\n\n this.setDistance = this.linkDistance(options.distance || 150);\n NodeTooltip.setHref(options.href);\n LinkTooltip.setHref(options.href);\n }\n\n init(...meta: string[]) {\n this.options.meta = meta;\n this.cola = this.initCola();\n this.svg = this.initSvg();\n\n this.displayLoadMessage();\n\n if (typeof this.options.urlOrData === \"object\") {\n setTimeout(() => {\n // Run asynchronously\n this.render(this.options.urlOrData as InetHengeDataType);\n });\n } else {\n d3.json(this.url(), (error, data) => {\n if (error) {\n console.error(error);\n this.showMessage(`Failed to load \"${this.url()}\"`);\n }\n\n this.render(data);\n });\n }\n }\n\n initCola() {\n return cola\n .d3adaptor()\n .avoidOverlaps(true)\n .handleDisconnected(false)\n .size([this.options.width, this.options.height]);\n }\n\n initSvg() {\n this.zoom = d3.behavior.zoom();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const container: d3.Selection<any> = d3\n .select(this.options.selector)\n .append(\"svg\")\n .attr(\"width\", this.options.width)\n .attr(\"height\", this.options.height)\n .append(\"g\")\n .call(this.zoom.on(\"zoom\", () => this.zoomCallback(container)))\n .append(\"g\");\n\n container\n .append(\"rect\")\n .attr(\"width\", this.options.width * 10) // 10 is huge enough\n .attr(\"height\", this.options.height * 10)\n .attr(\"transform\", `translate(-${this.options.width * 5}, -${this.options.height * 5})`)\n .style(\"opacity\", 0);\n\n return container;\n }\n\n render(data: InetHengeDataType) {\n try {\n const nodes = data.nodes\n ? data.nodes.map(\n (n, i) =>\n new Node(n, i, {\n width: this.options.nodeWidth,\n height: this.options.nodeHeight,\n metaKeys: this.options.meta,\n color: this.options.color,\n tooltip: !!this.options.tooltip,\n } as NodeOptions),\n )\n : [];\n const links = data.links\n ? Bundle.sortByBundle(data.links).map(\n (l, i) =>\n new Link(l, i, {\n metaKeys: this.options.meta,\n linkWidth: this.getLinkWidth,\n }),\n )\n : [];\n const groups = Group.divide(nodes, this.options.groupPattern, {\n color: this.options.color,\n padding: this.options.groupPadding,\n } as GroupOptions);\n const nodeTooltips = nodes.map((n) => new NodeTooltip(n, this.options.tooltip));\n const linkTooltips = links.map((l) => new LinkTooltip(l, this.options.tooltip));\n const bundles = Bundle.divide(links);\n\n this.cola.nodes(nodes).links(links).groups(groups);\n this.applyConstraints(this.options.positionConstraints, nodes);\n this.setDistance(this.cola);\n\n // Start to update Link.source and Link.target with Node object after\n // initial layout iterations without any constraints.\n this.cola.start(this.options.initialTicks);\n\n const groupLayer = this.svg.append(\"g\").attr(\"id\", \"groups\");\n const linkLayer = this.svg.append(\"g\").attr(\"id\", \"links\");\n const nodeLayer = this.svg.append(\"g\").attr(\"id\", \"nodes\");\n const linkLabelLayer = this.svg.append(\"g\").attr(\"id\", \"link-labels\");\n const tooltipLayer = this.svg.append(\"g\").attr(\"id\", \"tooltips\");\n\n const [link, path, label] = Link.render(linkLayer, linkLabelLayer, links);\n const bundle = Bundle.render(linkLayer, bundles);\n\n const group = Group.render(groupLayer, groups).call(\n this.cola\n .drag()\n .on(\"dragstart\", DiagramBase.dragstartCallback)\n .on(\"drag\", () => {\n if (this.options.bundle) {\n Link.shiftBundle(link, path, label, bundle);\n }\n\n NodeTooltip.followObject(nodeTooltip);\n LinkTooltip.followObject(linkTooltip);\n }),\n );\n\n const node = Node.render(nodeLayer, nodes).call(\n this.cola\n .drag()\n .on(\"dragstart\", DiagramBase.dragstartCallback)\n .on(\"drag\", () => {\n if (this.options.bundle) {\n Link.shiftBundle(link, path, label, bundle);\n }\n\n NodeTooltip.followObject(nodeTooltip);\n LinkTooltip.followObject(linkTooltip);\n }),\n );\n\n // without path calculation\n this.configureTick(group, node, link);\n\n this.positionCache = PositionCache.load(data, this.options.groupPattern);\n if (this.options.positionCache && this.positionCache) {\n // NOTE: Evaluate only when positionCache: true or 'fixed', and\n // when the stored position cache matches a pair of given data and pop\n Group.setPosition(group, this.positionCache.group);\n Node.setPosition(node, this.positionCache.node);\n Link.setPosition(link, this.positionCache.link);\n } else {\n if (this.options.positionHint.nodeCallback) {\n Node.setPosition(\n node,\n node.data().map((d) => this.options.positionHint.nodeCallback(d)),\n );\n this.cola.start(); // update internal positions of objects before ticks forward\n }\n\n this.ticksForward();\n this.positionCache = new PositionCache(data, this.options.groupPattern);\n this.savePosition(group, node, link);\n }\n\n this.hideLoadMessage();\n\n this.configureTick(group, node, link, path, label); // render path\n this.removeConstraints();\n\n this.cola.start();\n if (this.options.bundle) {\n Link.shiftBundle(link, path, label, bundle);\n }\n\n path.attr(\"d\", (d) => d.d()); // make sure path calculation is done\n DiagramBase.freeze(node);\n\n const nodeTooltip = NodeTooltip.render<NodeTooltip>(tooltipLayer, nodeTooltips);\n const linkTooltip = LinkTooltip.render<LinkTooltip>(tooltipLayer, linkTooltips);\n\n // NOTE: This is an experimental option\n if (this.options.positionCache === \"fixed\") {\n this.cola.on(\"end\", () => {\n this.savePosition(group, node, link);\n });\n }\n } catch (e) {\n this.showMessage(e);\n throw e;\n }\n }\n\n linkWidth(func: LinkWidthFunction) {\n this.getLinkWidth = func;\n }\n\n attr(name: string, value: string) {\n if (!this.initialTranslate) {\n this.saveInitialTranslate();\n }\n\n this.svg.attr(name, value);\n\n const transform = d3.transform(this.svg.attr(\"transform\")); // FIXME: This is valid only for d3.js v3\n this.zoom.scale(transform.scale[0]); // NOTE: Assuming ky = kx\n this.zoom.translate(transform.translate);\n }\n\n destroy() {\n d3.select(\"body svg\").remove();\n Node.reset();\n Link.reset();\n Bundle.reset();\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private static freeze(container: d3.Selection<any>) {\n container.each((d) => (d.fixed = true));\n }\n\n private static dragstartCallback() {\n (d3.event as d3.ZoomEvent).sourceEvent.stopPropagation();\n }\n\n private linkDistance(distance: number | ((any) => number)) {\n if (typeof distance === \"function\") return distance;\n else return (cola) => cola.linkDistance(distance);\n }\n\n private url() {\n if (this.uniqueUrl) {\n return this.uniqueUrl;\n }\n\n this.uniqueUrl = `${this.options.urlOrData}?${new Date().getTime()}`;\n return this.uniqueUrl;\n }\n\n private configureTick(\n group: d3.Selection<Group>,\n node: d3.Selection<Node>,\n link: d3.Selection<Link>,\n path?: d3.Selection<Link>,\n label?: d3.Selection<any>, // eslint-disable-line @typescript-eslint/no-explicit-any\n ) {\n // this.cola.on() overrides existing listener, not additionally register it.\n // May need to call it manually.\n this.tickCallback = () => {\n Node.tick(node);\n Link.tick(link, path, label);\n Group.tick(group);\n };\n\n this.cola.on(\"tick\", this.tickCallback);\n }\n\n private ticksForward(count?: number) {\n count = count || this.options.maxTicks;\n\n for (let i = 0; i < count; i++) this.cola.tick();\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private zoomCallback(container: d3.Selection<any>) {\n if (!this.initialTranslate) {\n this.saveInitialTranslate();\n }\n\n const event = d3.event as d3.ZoomEvent;\n\n event.scale *= this.initialScale;\n event.translate[0] += this.initialTranslate[0];\n event.translate[1] += this.initialTranslate[1];\n\n Link.zoom(event.scale);\n container.attr(\"transform\", `translate(${event.translate}) scale(${event.scale})`);\n }\n\n private displayLoadMessage() {\n this.indicator = this.svg\n .append(\"text\")\n .attr(\"x\", this.options.width / 2)\n .attr(\"y\", this.options.height / 2)\n .attr(\"dy\", \".35em\")\n .style(\"text-anchor\", \"middle\")\n .text(\"Simulating. Just a moment ...\");\n }\n\n private hideLoadMessage() {\n if (this.indicator) this.indicator.remove();\n }\n\n private showMessage(message: string) {\n if (this.indicator) this.indicator.text(message);\n }\n\n private saveInitialTranslate() {\n const transform = d3.transform(this.svg.attr(\"transform\")); // FIXME: This is valid only for d3.js v3\n this.initialScale = transform.scale[0]; // NOTE: Assuming ky = kx\n this.initialTranslate = transform.translate;\n }\n\n private savePosition(group: d3.Selection<Group>, node: d3.Selection<Node>, link: d3.Selection<Link>) {\n this.positionCache.save(group, node, link);\n }\n\n private applyConstraints(constraints: PositionConstraint[], nodes: Node[]) {\n const colaConstraints: WebColaConstraint[] = [];\n\n for (const constraint of constraints) {\n for (const ns of constraint.nodesCallback(nodes)) {\n colaConstraints.push({\n type: \"alignment\",\n axis: constraint.axis,\n offsets: ns.map((n) => ({ node: n.id, offset: 0 })),\n });\n }\n }\n\n this.cola.constraints(colaConstraints);\n }\n\n private removeConstraints() {\n this.cola.constraints([]);\n }\n}\n\nconst Pluggable = (Base: typeof DiagramBase) => {\n class Diagram extends Base {\n static plugin(cls, options = {}) {\n cls.load(Group, Node, Link, options);\n }\n }\n\n return Diagram;\n};\n\nconst Eventable = (Base: typeof DiagramBase) => {\n class Diagram extends Base {\n private dispatch: d3.Dispatch;\n\n constructor(container: string, urlOrData: string | InetHengeDataType, options: DiagramOptionType) {\n super(container, urlOrData, options);\n\n this.dispatch = d3.dispatch(\"rendered\");\n }\n\n render(arg) {\n super.render(arg);\n this.dispatch.rendered();\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n on(name: string, callback: () => any) {\n this.dispatch.on(name, callback);\n }\n }\n\n return Diagram;\n};\n\nclass PluggableDiagram extends Pluggable(DiagramBase) {}\n\nexport class Diagram extends Eventable(PluggableDiagram) {}\n"],"names":["root","factory","exports","module","require","define","amd","a","i","self","__WEBPACK_EXTERNAL_MODULE__893__","__WEBPACK_EXTERNAL_MODULE__109__","CryptoJS","Math","crypto","window","globalThis","msCrypto","g","err","cryptoSecureRandomInt","getRandomValues","Uint32Array","randomBytes","readInt32LE","Error","create","Object","F","obj","subtype","prototype","C","C_lib","lib","Base","extend","overrides","this","mixIn","hasOwnProperty","init","$super","apply","arguments","instance","properties","propertyName","toString","clone","WordArray","words","sigBytes","length","encoder","Hex","stringify","concat","wordArray","thisWords","thatWords","thisSigBytes","thatSigBytes","clamp","thatByte","j","ceil","call","slice","random","nBytes","push","C_enc","enc","hexChars","bite","join","parse","hexStr","hexStrLength","parseInt","substr","Latin1","latin1Chars","String","fromCharCode","latin1Str","latin1StrLength","charCodeAt","Utf8","decodeURIComponent","escape","e","utf8Str","unescape","encodeURIComponent","BufferedBlockAlgorithm","reset","_data","_nDataBytes","_append","data","_process","doFlush","processedWords","dataWords","dataSigBytes","blockSize","nBlocksReady","nWordsReady","max","_minBufferSize","nBytesReady","min","offset","_doProcessBlock","splice","C_algo","Hasher","cfg","_doReset","update","messageUpdate","finalize","_doFinalize","_createHelper","hasher","message","_createHmacHelper","key","HMAC","algo","T","abs","sin","MD5","_hash","M","offset_i","M_offset_i","H","M_offset_0","M_offset_1","M_offset_2","M_offset_3","M_offset_4","M_offset_5","M_offset_6","M_offset_7","M_offset_8","M_offset_9","M_offset_10","M_offset_11","M_offset_12","M_offset_13","M_offset_14","M_offset_15","b","c","d","FF","GG","HH","II","nBitsTotal","nBitsLeft","nBitsTotalH","floor","nBitsTotalL","hash","H_i","x","s","t","n","HmacMD5","jaccardLinkLengths","links","la","w","f","neighbours","addNeighbours","u","v","forEach","getSourceIndex","getTargetIndex","getNeighbours","l","setLength","keys","intersectionCount","unionCount","computeLinkLengths","cola","Layout","idealLength","_this","linkDistance","_linkLengthCalculator","_links","linkAccessor","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","definition","o","defineProperty","enumerable","get","Function","prop","r","Symbol","toStringTag","value","Bundle","constructor","id","color","width","space","divide","groups","bundle","groupKey","values","map","ids","link","JSON","source","target","render","linkLayer","bundles","selectAll","enter","append","attr","class","bundleId","sortByBundle","sort","first","centerCoordinates","last","gap","sqrt","pow","angle","start","end","shiftMultiplier","_shiftMultiplier","members","group","reduce","sum","shiftBundle","replace","classify","string","toLowerCase","GroupBase","name","options","padding","transform","bounds","y","groupWidth","groupHeight","height","nodes","pattern","register","node","parent","Group","result","match","layer","style","text","tick","setPosition","position","WebColable","super","leaves","Eventable","dispatch","each","rendered","on","callback","Pluggable","pluginConstructors","bind","registerConstructor","func","WebColableGroup","EventableGroup","MetaData","extraKey","filter","k","sliceWithExtraKey","sliceWithoutExtraKey","NodeBase","icon","metaList","meta","metaKeys","extraClass","tspanOffset","Node","all","nodeWidth","nodeHeight","xForText","yForText","idByName","nodeId","appendImage","appendRect","appendText","container","tooltip","appendMetaText","m","EventableNode","LinkBase","sourceMeta","targetMeta","linkWidth","defaultMargin","labelXOffset","labelYOffset","Link","isLabelledPath","isReversePath","pathId","linkId","margin","_margin","getComputedStyle","document","getElementById","isLabelVisible","pathLength","getTotalLength","isShort","Array","from","getElementsByClassName","some","p","tp","firstChild","classList","contains","getComputedTextLength","classed","scale","tspanXOffset","tspanYOffset","rotate","bbox","split","duped","assign","hasMeta","getBBox","baseVal","consolidate","matrix","atan2","y2","y1","x2","x1","PI","labelLayer","pathGroup","textGroup","path","center","theOtherEnd","zoom","label","indexOf","multiplier","EventableLink","Tooltip","eventType","offsetX","visibility","tspanOffsetY","marginTop","type","objectId","setVisibility","toggleVisibility","toggleVisibilityCallback","element","defaultPrevented","getAttribute","configureObjectClickCallback","configureObjectHoverCallback","disableZoom","stopPropagation","setHref","href","tooltips","cls","appendExternalLinkIcon","fill","pathD","appendNameValue","svg","followObject","LinkTooltip","CSS","NodeTooltip","PositionCache","pop","md5","cachedMd5","getAll","localStorage","getItem","location","pathname","search","save","cache","groupPosition","nodePosition","linkPosition","setItem","structuredClone","load","DiagramBase","urlOrData","selector","groupPattern","positionHint","positionConstraints","category20","initialTicks","maxTicks","ticks","positionCache","setDistance","distance","initCola","initSvg","displayLoadMessage","setTimeout","url","error","console","showMessage","d3adaptor","avoidOverlaps","handleDisconnected","size","zoomCallback","getLinkWidth","groupPadding","nodeTooltips","linkTooltips","applyConstraints","groupLayer","nodeLayer","linkLabelLayer","tooltipLayer","drag","dragstartCallback","nodeTooltip","linkTooltip","configureTick","nodeCallback","ticksForward","savePosition","hideLoadMessage","removeConstraints","freeze","initialTranslate","saveInitialTranslate","translate","destroy","remove","fixed","sourceEvent","uniqueUrl","Date","getTime","tickCallback","count","event","initialScale","indicator","constraints","colaConstraints","constraint","ns","nodesCallback","axis","offsets","arg","PluggableDiagram","plugin","Diagram"],"sourceRoot":""}