You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
65 KiB

{"version":3,"file":null,"sources":["../node_modules/lodash-es/isObject.js","../node_modules/lodash-es/isFunction.js","../node_modules/lodash-es/_freeGlobal.js","../node_modules/lodash-es/_root.js","../node_modules/lodash-es/now.js","../node_modules/lodash-es/isObjectLike.js","../node_modules/lodash-es/isSymbol.js","../node_modules/lodash-es/toNumber.js","../node_modules/lodash-es/debounce.js","../node_modules/lodash-es/throttle.js","../src/helper.js","../node_modules/slimfit/src/Helper.js","../node_modules/slimfit/src/Dimension.js","../node_modules/slimfit/src/Fitter.js","../node_modules/slimfit/src/Watcher.js","../node_modules/slimfit/src/FitWatcher.js","../src/Base.js","../src/charts/AbstractChart.js","../src/plates/AbstractPlate.js","../src/plates/CanvasPlate.js","../src/charts/CanvasChart.js","../src/layerOrganizer.js","../src/plates/SvgPlate.js","../src/charts/HybridChart.js","../src/charts/SvgChart.js","../src/plates/DivPlate.js"],"sourcesContent":["/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nexport default isObject;\n","import isObject from './isObject.js';\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag || tag == proxyTag;\n}\n\nexport default isFunction;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n","import root from './_root.js';\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nexport default now;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n","import isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\nexport default isSymbol;\n","import isObject from './isObject.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nexport default toNumber;\n","import isObject from './isObject.js';\nimport now from './now.js';\nimport toNumber from './toNumber.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nexport default debounce;\n","import debounce from './debounce.js';\nimport isObject from './isObject.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nexport default throttle;\n","import isFunction from 'lodash-es/isFunction.js';\nimport isObject from 'lodash-es/isObject.js';\n\nexport { isObject, isFunction };\nexport { default as debounce } from 'lodash-es/debounce.js';\nexport { default as throttle } from 'lodash-es/throttle.js';\n\n//---------------------------------------------------\n// From underscore.string\n//---------------------------------------------------\n/* jshint ignore:start */\n\nconst nativeTrim = String.prototype.trim;\n\nfunction escapeRegExp(str) {\n if (str == null) return '';\n return String(str).replace(/([.*+?^=!:${}()|[\\]\\/\\\\])/g, '\\\\$1');\n}\n\nfunction defaultToWhiteSpace(characters) {\n if (characters == null) {\n return '\\\\s';\n } else if (characters.source) {\n return characters.source;\n }\n return `[${escapeRegExp(characters)}]`;\n}\n\nfunction trim(str, characters) {\n if (str == null) return '';\n if (!characters && nativeTrim) return nativeTrim.call(str);\n const chars = defaultToWhiteSpace(characters);\n const pattern = new RegExp(`\\^${chars}+|${chars}+$`, 'g');\n return String(str).replace(pattern, '');\n}\n\nexport function kebabCase(str) {\n return trim(str)\n .replace(/([A-Z])/g, '-$1')\n .replace(/[-_\\s]+/g, '-')\n .toLowerCase();\n}\n\n//---------------------------------------------------\n// From http://youmightnotneedjquery.com/\n//---------------------------------------------------\n\nexport function deepExtend(out) {\n out = out || {};\n\n for (let i = 1; i < arguments.length; i++) {\n const obj = arguments[i];\n\n if (!obj)\n continue;\n\n for (const key in obj) {\n if (obj.hasOwnProperty(key)) {\n const value = obj[key];\n if (isObject(value) && !Array.isArray(value) && !isFunction(value)) {\n out[key] = deepExtend(out[key], value);\n }\n else\n out[key] = value;\n }\n }\n }\n\n return out;\n}\n\nexport function extend(out) {\n out = out || {};\n\n for (let i = 1; i < arguments.length; i++) {\n if (!arguments[i])\n continue;\n\n for (const key in arguments[i]) {\n if (arguments[i].hasOwnProperty(key))\n out[key] = arguments[i][key];\n }\n }\n\n return out;\n}\n\n//---------------------------------------------------\n// From D3 v3\n//---------------------------------------------------\n\n// Method is assumed to be a standard D3 getter-setter:\n// If passed with no arguments, gets the value.\n// If passed with arguments, sets the value and returns the target.\nfunction d3Rebind(target, source, method) {\n return function () {\n const value = method.apply(source, arguments);\n return value === source ? target : value;\n };\n}\n\n// Copies a variable number of methods from source to target.\nexport function rebind(target, source) {\n let i = 1, n = arguments.length, method;\n while (++i < n) target[method = arguments[i]] = d3Rebind(target, source, source[method]);\n return target;\n}\n\nexport function functor(v) {\n return isFunction(v) ? v : () => v;\n}\n","export { default as isObject } from 'lodash-es/isObject.js';\nexport { default as isFunction } from 'lodash-es/isFunction.js';\nexport { default as debounce } from 'lodash-es/debounce.js';\nexport { default as throttle } from 'lodash-es/throttle.js';\n\nexport function isRequired(name) {\n throw new Error(`Missing parameter ${name}`);\n}\n\nexport function isDefined(x) {\n return x !== null && x !== undefined;\n}\n\nexport function isNotDefined(x) {\n return x === null || x === undefined;\n}\n\nexport function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n}\n\nexport function parseModifier(value) {\n // Return current value\n if (isNotDefined(value)) {\n return (x, cx) => Math.min(x, cx);\n }\n // Return percent of container\n const str = `${value}`.trim().toLowerCase();\n if (str.indexOf('%') > -1) {\n const percent = (+ str.replace('%', '')) / 100;\n return (x, cx) => cx * percent;\n }\n // Return fixed value\n return () => +(str.replace('px', ''));\n}\n","import { isDefined, isElement, isFunction } from './Helper.js';\n\nclass Dimension {\n\n constructor(...args) {\n if (args.length === 1) {\n const inputOrGetter = args[0];\n const input = isFunction(inputOrGetter) ? inputOrGetter() : inputOrGetter;\n\n if (input instanceof Dimension) {\n this.width = input.width;\n this.height = input.height;\n } else if (isElement(input)) {\n this.width = input.clientWidth;\n this.height = input.clientHeight;\n } else if (Array.isArray(input)) {\n this.width = input[0];\n this.height = input[1];\n } else if (isDefined(input) && isDefined(input.width) && isDefined(input.height)) {\n this.width = input.width;\n this.height = input.height;\n } else {\n const err = new Error(`Unsupported input. Must be either\n DOMNode, Array or Object with field width and height,\n or a function that returns any of the above.`);\n err.value = inputOrGetter;\n throw err;\n }\n } else {\n const [width, height] = args;\n this.width = width;\n this.height = height;\n }\n }\n\n isEqual(x) {\n if (x instanceof Dimension) {\n return this.width === x.width && this.height === x.height;\n }\n const dim2 = new Dimension(x);\n return this.width === dim2.width && this.height === dim2.height;\n }\n\n toArray() {\n return [this.width, this.height];\n }\n\n toObject() {\n return {\n width: this.width,\n height: this.height,\n };\n }\n\n}\n\nexport default Dimension;\n","import Dimension from './Dimension.js';\nimport { isRequired, parseModifier } from './Helper.js';\n\nclass Fitter {\n constructor(options = {}) {\n const {\n mode = Fitter.MODE_BASIC,\n // for basic mode\n width = '100%',\n height = null,\n // for aspectRatio mode\n ratio = 1,\n maxWidth = null,\n maxHeight = null,\n } = (options || {});\n\n if (mode === Fitter.MODE_ASPECT_RATIO) {\n this.wFn = parseModifier(maxWidth);\n this.hFn = parseModifier(maxHeight);\n this.options = {\n mode,\n ratio,\n maxWidth,\n maxHeight,\n };\n } else {\n this.wFn = parseModifier(width);\n this.hFn = parseModifier(height);\n this.options = {\n mode,\n width,\n height,\n };\n }\n }\n\n fit(\n box = isRequired('box'),\n container = isRequired('container')\n ) {\n const boxDim = new Dimension(box);\n const w = boxDim.width;\n const h = boxDim.height;\n const containerDim = new Dimension(container);\n const cw = containerDim.width;\n const ch = containerDim.height;\n\n let dim;\n if (this.options.mode === Fitter.MODE_ASPECT_RATIO) {\n const ratio = this.options.ratio;\n const maxW = this.wFn(cw, cw);\n const maxH = this.hFn(ch, ch);\n const newWFromHeight = Math.floor(ratio * maxH);\n if (newWFromHeight <= maxW) {\n dim = new Dimension(newWFromHeight, maxH);\n } else {\n dim = new Dimension(maxW, Math.floor(maxW / ratio));\n }\n } else {\n dim = new Dimension(\n this.wFn(w, cw),\n this.hFn(h, ch)\n );\n }\n\n return {\n dimension: dim,\n changed: !dim.isEqual(boxDim),\n };\n }\n}\n\nFitter.MODE_BASIC = 'basic';\nFitter.MODE_ASPECT_RATIO = 'aspectRatio';\n\nexport default Fitter;\n","import Dimension from './Dimension.js';\nimport { isRequired, throttle } from './Helper.js';\n\nclass Watcher {\n constructor(options = {}) {\n const {\n mode = Watcher.MODE_WINDOW,\n target = null,\n interval = 200,\n } = (options || {});\n\n if (mode === Watcher.MODE_POLLING && !target) {\n isRequired('options.target');\n }\n\n this.mode = mode;\n this.target = target;\n this.interval = interval;\n\n this.check = this.check.bind(this);\n this.throttledCheck = throttle(this.check, this.interval);\n this.isWatching = false;\n\n this.listeners = { change: [] };\n }\n\n hasTargetChanged() {\n if (!this.target) {\n return true;\n }\n const newDim = new Dimension(this.target);\n if (!this.currentDim || !newDim.isEqual(this.currentDim)) {\n this.currentDim = newDim;\n return true;\n }\n return false;\n }\n\n check() {\n if (this.hasTargetChanged()) {\n this.dispatch('change', this.currentDim);\n }\n return this;\n }\n\n dispatch(name, ...args) {\n this.listeners[name].forEach(l => l.apply(this, args));\n return this;\n }\n\n on(name, listener) {\n if (this.listeners[name].indexOf(listener) === -1) {\n this.listeners[name].push(listener);\n }\n return this;\n }\n\n off(name, listener) {\n this.listeners[name] = this.listeners[name]\n .filter(l => l !== listener);\n return this;\n }\n\n start() {\n if (!this.isWatching) {\n if (this.target) {\n this.currentDim = new Dimension(this.target);\n }\n if (this.mode === Watcher.MODE_WINDOW) {\n window.addEventListener('resize', this.throttledCheck);\n } else if (this.mode === Watcher.MODE_POLLING) {\n this.intervalId = window.setInterval(this.check, this.interval);\n }\n this.isWatching = true;\n }\n return this;\n }\n\n stop() {\n if (this.isWatching) {\n if (this.mode === Watcher.MODE_WINDOW) {\n window.removeEventListener('resize', this.throttledCheck);\n } else if (this.mode === Watcher.MODE_POLLING && this.intervalId) {\n window.clearInterval(this.intervalId);\n this.intervalId = null;\n }\n this.isWatching = false;\n }\n return this;\n }\n\n destroy() {\n this.stop();\n this.listeners.change = [];\n return this;\n }\n}\n\nWatcher.MODE_WINDOW = 'window';\nWatcher.MODE_POLLING = 'polling';\n\nexport default Watcher;\n","import Fitter from './Fitter.js';\nimport Watcher from './Watcher.js';\nimport { isRequired } from './Helper.js';\n\nclass FitWatcher extends Watcher {\n constructor(\n box = isRequired('box'),\n container = isRequired('container'),\n fitterOptions,\n watcherOptions\n ) {\n super(watcherOptions);\n\n const fitter = new Fitter(fitterOptions);\n this.fit = () => fitter.fit(box, container);\n }\n\n check() {\n if (this.hasTargetChanged()) {\n const { changed, dimension } = this.fit();\n if (changed) {\n this.dispatch('change', dimension);\n }\n }\n return this;\n }\n}\n\nexport default FitWatcher;\n","import { debounce, deepExtend, extend } from './helper.js';\n\nclass Base {\n static getDefaultOptions(...options) {\n return deepExtend({\n initialWidth: 720,\n initialHeight: 500,\n margin: {\n top: 30,\n right: 30,\n bottom: 30,\n left: 30,\n },\n offset: [0.5, 0.5],\n pixelRatio: window.devicePixelRatio || 1,\n }, ...options);\n }\n\n constructor(...options) {\n const mergedOptions = deepExtend(\n this.constructor.getDefaultOptions(),\n ...options\n );\n\n this._state = {\n width: mergedOptions.initialWidth,\n height: mergedOptions.initialHeight,\n options: mergedOptions,\n };\n\n this._updateDimension = debounce(this._updateDimension.bind(this), 1);\n }\n\n copyDimension(another) {\n if (another) {\n const { width, height } = another._state;\n const { offset, margin, pixelRatio } = another._state.options;\n\n deepExtend(this._state, {\n width,\n height,\n options: {\n offset: offset.concat(),\n margin,\n pixelRatio,\n },\n });\n this._updateDimension();\n }\n return this;\n }\n\n width(...args) {\n if (args.length === 0) return this._state.width;\n const newValue = Math.floor(+args[0]);\n if (newValue !== this._state.width) {\n this._state.width = newValue;\n this._updateDimension();\n }\n return this;\n }\n\n height(...args) {\n if (args.length === 0) return this._state.height;\n const newValue = Math.floor(+args[0]);\n if (newValue !== this._state.height) {\n this._state.height = newValue;\n this._updateDimension();\n }\n return this;\n }\n\n dimension(...args) {\n if (args.length === 0) {\n return [this._state.width, this._state.height];\n }\n const [w, h] = args[0];\n this.width(w).height(h);\n return this;\n }\n\n margin(...args) {\n if (args.length === 0) return this._state.options.margin;\n const oldMargin = this._state.options.margin;\n const newMargin = extend({}, this._state.options.margin, args[0]);\n const changed = Object.keys(newMargin)\n .some(field => oldMargin[field] !== newMargin[field]);\n if (changed) {\n this._state.options.margin = newMargin;\n this._updateDimension();\n }\n return this;\n }\n\n offset(...args) {\n if (args.length === 0) return this._state.options.offset;\n const newOffset = args[0];\n const [ox, oy] = this._state.options.offset;\n const [nx, ny] = newOffset;\n if (ox !== nx || oy !== ny) {\n this._state.options.offset = newOffset;\n this._updateDimension();\n }\n return this;\n }\n\n pixelRatio(...args) {\n if (args.length === 0) return this._state.options.pixelRatio;\n const newValue = +args[0];\n if (newValue !== this._state.options.pixelRatio) {\n this._state.options.pixelRatio = newValue;\n this._updateDimension();\n }\n return this;\n }\n\n _updateDimension() {\n // Intentionally do nothing\n // Subclasses can override this function\n return this;\n }\n\n updateDimensionNow() {\n this._updateDimension();\n this._updateDimension.flush();\n return this;\n }\n}\n\nexport default Base;\n","import { select } from 'd3-selection';\nimport { dispatch } from 'd3-dispatch';\nimport FitWatcher from 'slimfit/src/FitWatcher.js';\nimport Fitter from 'slimfit/src/Fitter.js';\nimport Base from '../Base.js';\nimport { debounce, deepExtend, extend, isObject } from '../helper.js';\n\nclass AbstractChart extends Base {\n static getCustomEventNames() {\n return [];\n }\n\n constructor(selector, ...options) {\n super(...options);\n\n extend(this._state, {\n innerWidth: 0,\n innerHeight: 0,\n fitOptions: null,\n data: null,\n plates: [],\n });\n\n this.container = select(selector);\n // Enforce line-height = 0 to fix issue with height resizing\n // https://github.com/twitter/d3kit/issues/13\n this.container.style('line-height', 0);\n\n this.chartRoot = this.container.append('div')\n .classed('d3kit-chart-root', true)\n .style('display', 'inline-block')\n .style('position', 'relative')\n .style('line-height', 0);\n\n this.plates = {};\n\n const customEvents = this.constructor.getCustomEventNames();\n this.setupDispatcher(customEvents);\n\n this._dispatchData = debounce(this._dispatchData.bind(this), 1);\n this._dispatchOptions = debounce(this._dispatchOptions.bind(this), 1);\n }\n\n addPlate(name, plate, doNotAppend) {\n if(this.plates[name]) {\n throw new Error('Plate with this name already exists', name);\n }\n this._state.plates.push(plate);\n this.plates[name] = plate;\n if (doNotAppend) return plate;\n plate.getSelection()\n .classed('d3kit-plate', true)\n .style('position', 'absolute')\n .style('top', 0)\n .style('left', 0);\n this.chartRoot.append(() => plate.getNode());\n return this;\n }\n\n removePlate(name) {\n const plate = this.plates[name];\n if (plate) {\n const index = this._state.plates.indexOf(plate);\n if (index > -1) {\n this._state.plates.splice(index, 1);\n }\n if (plate.getNode().parentNode === this.chartRoot.node()) {\n this.chartRoot.node().removeChild(plate.getNode());\n }\n delete this.plates[name];\n }\n return this;\n }\n\n setupDispatcher(customEventNames = []) {\n this._customEventNames = customEventNames;\n this._eventNames = AbstractChart.DEFAULT_EVENTS.concat(customEventNames);\n this.dispatcher = dispatch.apply(this, this._eventNames);\n return this;\n }\n\n getCustomEventNames() {\n return this._customEventNames;\n }\n\n getInnerWidth() {\n return this._state.innerWidth;\n }\n\n getInnerHeight() {\n return this._state.innerHeight;\n }\n\n data(...args) {\n if (args.length === 0) return this._state.data;\n const [newData] = args;\n this._state.data = newData;\n this._dispatchData();\n return this;\n }\n\n options(...args) {\n if (args.length === 0) return this._state.options;\n const [newOptions] = args;\n const copy = extend({}, newOptions);\n\n if (newOptions.margin) {\n this.margin(newOptions.margin);\n delete copy.margin;\n }\n if (newOptions.offset) {\n this.offset(newOptions.offset);\n delete copy.offset;\n }\n if (newOptions.pixelRatio) {\n this.pixelRatio(newOptions.pixelRatio);\n delete copy.pixelRatio;\n }\n\n this._state.options = deepExtend(this._state.options, copy);\n\n this._dispatchOptions();\n return this;\n }\n\n _updateDimension() {\n const { width, height, plates } = this._state;\n const { margin } = this._state.options;\n const { top, right, bottom, left } = margin;\n\n this._state.innerWidth = width - left - right;\n this._state.innerHeight = height - top - bottom;\n\n this.chartRoot\n .style('width', `${width}px`)\n .style('height', `${height}px`);\n\n plates.forEach(plate => {\n plate.copyDimension(this)\n .updateDimensionNow();\n });\n\n // Dispatch resize event\n const { innerWidth, innerHeight } = this._state;\n this.dispatcher.apply('resize', this, [width, height, innerWidth, innerHeight]);\n\n return this;\n }\n\n hasData() {\n const { data } = this._state;\n return data !== null && data !== undefined;\n }\n\n hasNonZeroArea() {\n const { innerWidth, innerHeight } = this._state;\n return (innerWidth > 0 && innerHeight > 0);\n }\n\n fit(fitOptions, watchOptions = false) {\n if (fitOptions) {\n this._state.fitOptions = fitOptions;\n }\n\n // Fit once\n const fitter = new Fitter(this._state.fitOptions);\n const { changed, dimension } = fitter.fit(\n this.dimension(),\n this.container.node()\n );\n\n if (changed) {\n this.dimension([dimension.width, dimension.height]);\n }\n\n // Setup watcher\n const enable = !!watchOptions;\n if (enable) {\n if (this.fitWatcher) {\n this.fitWatcher.destroy();\n }\n this.fitWatcher = new FitWatcher(\n // pass getter instead of value\n // because the value may change when time the watcher checks\n () => this.dimension(),\n this.container.node(),\n this._state.fitOptions,\n isObject(watchOptions) ? watchOptions : null\n )\n .on('change', dim => this.dimension([dim.width, dim.height]))\n .start();\n }\n\n return this;\n }\n\n stopFitWatcher() {\n if (this.fitWatcher) {\n this.fitWatcher.destroy();\n this.fitWatcher = null;\n }\n return this;\n }\n\n _dispatchData() {\n this.dispatcher.call('data', this, this._state.data);\n return this;\n }\n\n _dispatchOptions() {\n this.dispatcher.call('options', this, this._state.options);\n return this;\n }\n\n on(name, listener) {\n this.dispatcher.on(name, listener);\n return this;\n }\n\n off(name) {\n this.dispatcher.on(name, null);\n return this;\n }\n\n dispatchAs(name) {\n return (...args) => {\n this.dispatcher.apply(name, this, args);\n };\n }\n\n destroy() {\n this._eventNames.forEach(name => {\n this.off(name);\n });\n this.stopFitWatcher();\n return this;\n }\n}\n\nAbstractChart.DEFAULT_EVENTS = ['data', 'options', 'resize'];\n\nexport default AbstractChart;\n","import { select } from 'd3-selection';\nimport Base from '../Base.js';\n\nclass AbstractPlate extends Base {\n constructor(node, ...options) {\n super(...options);\n this.node = node;\n this.selection = select(this.node);\n }\n\n getNode() {\n return this.node;\n }\n\n getSelection() {\n return this.selection;\n }\n}\n\nexport default AbstractPlate;\n","import AbstractPlate from './AbstractPlate.js';\n\nclass CanvasPlate extends AbstractPlate {\n constructor(...options) {\n super(document.createElement('canvas'), ...options);\n }\n\n getContext2d() {\n const width = this.width();\n const height = this.height();\n const pixelRatio = this.pixelRatio();\n const { top, left } = this.margin();\n const [x, y] = this.offset();\n\n const ctx = this.node.getContext('2d');\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.scale(pixelRatio, pixelRatio);\n ctx.translate(left + x, top + y);\n return ctx;\n }\n\n clear() {\n const width = this.width();\n const height = this.height();\n const pixelRatio = this.pixelRatio();\n\n const ctx = this.node.getContext('2d');\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.scale(pixelRatio, pixelRatio);\n ctx.clearRect(0, 0, width, height);\n return this;\n }\n\n _updateDimension() {\n const width = this.width();\n const height = this.height();\n const pixelRatio = this.pixelRatio();\n\n this.node.setAttribute('width', width * pixelRatio);\n this.node.setAttribute('height', height * pixelRatio);\n this.node.style.width = `${width}px`;\n this.node.style.height = `${height}px`;\n\n return this;\n }\n}\n\nexport default CanvasPlate;\n","import AbstractChart from './AbstractChart.js';\nimport CanvasPlate from '../plates/CanvasPlate.js';\n\nclass CanvasChart extends AbstractChart {\n constructor(selector, ...options) {\n super(selector, ...options);\n\n this.addPlate('canvas', new CanvasPlate());\n this.canvas = this.plates.canvas.getSelection();\n this.updateDimensionNow();\n }\n\n getContext2d() {\n return this.plates.canvas.getContext2d();\n }\n\n clear() {\n this.plates.canvas.clear();\n return this;\n }\n}\n\nexport default CanvasChart;\n","import { isObject, kebabCase } from './helper.js';\n\n// EXAMPLE USAGE:\n//\n// var layers = new d3LayerOrganizer(vis);\n// layers.create([\n// {'axis': ['bar', 'mark']},\n// 'glass',\n// 'label'\n// ]);\n//\n// Then access the layers via\n// layers.get('axis'),\n// layers.get('axis/bar'),\n// layers.get('axis/mark'),\n// layers.get('glass'),\n// layers.get('label')\n\nexport default function (mainContainer, defaultTag = 'g') {\n const layers = {};\n\n function createLayerFromName(container, layerName, prefix = '') {\n const chunks = layerName.split('.');\n let name;\n let tag;\n if (chunks.length > 1) {\n tag = chunks[0].length > 0 ? chunks[0] : defaultTag;\n name = chunks[1];\n } else {\n tag = defaultTag;\n name = chunks[0];\n }\n\n const id = `${prefix}${name}`;\n if (layers.hasOwnProperty(id)) {\n throw new Error(`invalid or duplicate layer id: ${id}`);\n }\n const className = `${kebabCase(name)}-layer`;\n const layer = container.append(tag)\n .classed(className, true);\n\n layers[id] = layer;\n return layer;\n }\n\n function createLayerFromConfig(container, config, prefix = '') {\n if (Array.isArray(config)) {\n return config\n .map(info => createLayerFromConfig(container, info, prefix));\n } else if (isObject(config)) {\n const [parentKey] = Object.keys(config);\n const parentLayer = createLayerFromName(container, parentKey, prefix);\n createLayerFromConfig(parentLayer, config[parentKey], `${prefix}${parentKey}/`);\n return parentLayer;\n }\n\n return createLayerFromName(container, config, prefix);\n }\n\n function createLayer(config) {\n return createLayerFromConfig(mainContainer, config);\n }\n\n function create(layerNames) {\n return Array.isArray(layerNames)\n ? layerNames.map(createLayer)\n : createLayer(layerNames);\n }\n\n function get(layerName) {\n return layers[layerName];\n }\n\n function has(layerName) {\n return !!layers[layerName];\n }\n\n return {\n create,\n get,\n has,\n };\n}\n","import AbstractPlate from './AbstractPlate.js';\nimport LayerOrganizer from '../layerOrganizer.js';\n\nclass SvgPlate extends AbstractPlate {\n constructor(...options) {\n super(document.createElementNS('http://www.w3.org/2000/svg', 'svg'), ...options);\n this.rootG = this.selection.append('g');\n this.layers = new LayerOrganizer(this.rootG);\n }\n\n _updateDimension() {\n const width = this.width();\n const height = this.height();\n const { top, left } = this.margin();\n const [x, y] = this.offset();\n\n this.selection\n .attr('width', width)\n .attr('height', height);\n\n this.rootG.attr(\n 'transform',\n `translate(${left + x},${top + y})`\n );\n\n return this;\n }\n}\n\nexport default SvgPlate;\n","import CanvasChart from './CanvasChart.js';\nimport SvgPlate from '../plates/SvgPlate.js';\n\nclass HybridChart extends CanvasChart {\n constructor(selector, ...options) {\n super(selector, ...options);\n\n this.addPlate('svg', new SvgPlate());\n const plate = this.plates.svg;\n this.svg = plate.getSelection();\n this.rootG = plate.rootG;\n this.layers = plate.layers;\n this.updateDimensionNow();\n }\n}\n\nexport default HybridChart;\n","import AbstractChart from './AbstractChart.js';\nimport SvgPlate from '../plates/SvgPlate.js';\n\nclass SvgChart extends AbstractChart {\n constructor(selector, ...options) {\n super(selector, ...options);\n\n this.addPlate('svg', new SvgPlate());\n const plate = this.plates.svg;\n this.svg = plate.getSelection();\n this.rootG = plate.rootG;\n this.layers = plate.layers;\n this.updateDimensionNow();\n }\n}\n\nexport default SvgChart;\n","import AbstractPlate from './AbstractPlate.js';\n\nclass DivPlate extends AbstractPlate {\n constructor(...options) {\n super(document.createElement('div'), ...options);\n }\n\n _updateDimension() {\n const width = this.width();\n const height = this.height();\n const margin = this.margin();\n\n this.node.style.width = `${width - margin.left - margin.right}px`;\n this.node.style.height = `${height - margin.top - margin.bottom}px`;\n this.node.style.marginLeft = `${margin.left}px`;\n this.node.style.marginRight = `${margin.right}px`;\n this.node.style.marginTop = `${margin.top}px`;\n this.node.style.marginBottom = `${margin.bottom}px`;\n\n return this;\n }\n}\n\nexport default DivPlate;\n"],"names":["objectProto","objectToString","FUNC_ERROR_TEXT","select","dispatch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,SAAS,QAAT,CAAkB,KAAlB,EAAyB;MACnB,cAAc,KAAd,yCAAc,KAAd,CAAJ;SACO,SAAS,IAAT,KAAkB,QAAQ,QAAR,IAAoB,QAAQ,UAA9C,CAAP;CAGF;;AC3BI,IAAA,UAAU,mBAAd,CAAA;AACI,IAAA,SAAS,4BADb,CAAA;AAEI,IAAA,WAAW,gBAFf,CAAA;AAIA;AACA,IAAI,cAAc,OAAO,SAAzB;;;;;;;AAOA,IAAI,iBAAiB,YAAY,QAAjC;;;;;;;;;;;;;;;;;;;AAmBA,SAAS,UAAT,CAAoB,KAApB,EAA2B;;;MAGrB,MAAM,SAAS,KAAT,IAAkB,eAAe,IAAf,CAAoB,KAApB,CAAlB,GAA+C,EAAzD;SACO,OAAO,OAAP,IAAkB,OAAO,MAAzB,IAAmC,OAAO,QAAjD;CAGF;;ACzCA;AACA,IAAI,aAAa,QAAO,MAAP,yCAAO,MAAP,MAAiB,QAAjB,IAA6B,MAA7B,IAAuC,OA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