UNPKG

gg-editor

Version:

A visual graph editor based on G6 and React

7 lines 512 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.GGEditor=e(require("react")):t.GGEditor=e(t.React)}("undefined"!=typeof self?self:this,function(t){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=49)}([function(e,n){e.exports=t},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.upperFirst=e.uniqueId=e.toQueryString=e.pick=e.merge=void 0;var i=n(52),o=r(i),a=n(116),u=r(a),s=n(135),c=r(s),f=n(136),l=r(f),h=function(t){return Object.keys(t).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])}).join("&")};e.merge=o.default,e.pick=u.default,e.toQueryString=h,e.uniqueId=c.default,e.upperFirst=l.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=(e.FLOW_CONTAINER="J_FlowContainer",e.MIND_CONTAINER="J_MindContainer",e.KONI_CONTAINER="J_KoniContainer",e.TOOLBAR_CONTAINER="J_ToolbarContainer",e.MINIMAP_CONTAINER="J_MinimapContainer",e.CONTEXT_MENU_CONTAINER="J_ContextMenuContainer",e.FLOW_CLASS_NAME="Flow",e.MIND_CLASS_NAME="Mind",e.KONI_CLASS_NAME="Koni",e.EVENT_BEFORE_ADD_PAGE="beforeAddPage",e.EVENT_AFTER_ADD_PAGE="afterAddPage",e.STATUS_CANVAS_SELECTED="canvas-selected",e.STATUS_NODE_SELECTED="node-selected",e.STATUS_EDGE_SELECTED="edge-selected",e.STATUS_GROUP_SELECTED="group-selected",e.STATUS_MULTI_SELECTED="multi-selected",e.GRAPH_MOUSE_REACT_EVENTS={click:"Click",contextmenu:"ContextMenu",dblclick:"DoubleClick",drag:"Drag",dragend:"DragEnd",dragenter:"DragEnter",dragleave:"DragLeave",dragstart:"DragStart",drop:"Drop",mousedown:"MouseDown",mouseenter:"MouseEnter",mouseleave:"MouseLeave",mousemove:"MouseMove",mouseup:"MouseUp"}),i=e.GRAPH_OTHER_REACT_EVENTS={afterchange:"onAfterChange",afterchangesize:"onAfterChangeSize",afterviewportchange:"onAfterViewportChange",beforechange:"onBeforeChange",beforechangesize:"onBeforeChangeSize",beforeviewportchange:"onBeforeViewportChange",keydown:"onKeyDown",keyup:"onKeyUp",mousewheel:"onMouseWheel"},o=e.PAGE_REACT_EVENTS={afteritemactived:"onAfterItemActived",afteriteminactivated:"onAfterItemInactivated",afteritemselected:"onAfterItemSelected",afteritemunactived:"onAfterItemInactivated",afteritemunselected:"onAfterItemUnselected",beforeitemactived:"onBeforeItemActived",beforeiteminactivated:"onBeforeItemInactivated",beforeitemselected:"onBeforeItemSelected",beforeitemunactived:"onBeforeItemInactivated",beforeitemunselected:"onBeforeItemUnselected",keyUpEditLabel:"onKeyUpEditLabel"},a=e.EDITOR_REACT_EVENTS={aftercommandexecute:"onAfterCommandExecute",beforecommandexecute:"onBeforeCommandExecute"};e.GRAPH_MOUSE_EVENTS=Object.keys(r),e.GRAPH_OTHER_EVENTS=Object.keys(i),e.PAGE_EVENTS=Object.keys(o),e.EDITOR_EVENTS=Object.keys(a)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},c=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();e.default=function(t){var e=function(e){function n(){return o(this,n),a(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return u(n,e),c(n,[{key:"render",value:function(){var e=this.props,n=e.forwardRef,r=i(e,["forwardRef"]);return l.default.createElement(d.default.Consumer,null,function(e){return l.default.createElement(t,s({ref:n},r,e))})}}]),n}(l.default.Component);return l.default.forwardRef(function(t,n){return l.default.createElement(e,s({},t,{forwardRef:n}))})};var f=n(0),l=r(f),h=n(47),d=r(h)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=n(29),s=r(u),c=n(2),f=n(51),l=r(f),h=n(1),d=function(t){function e(t){i(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.id=(0,h.uniqueId)(),n.on(c.EVENT_BEFORE_ADD_PAGE,function(t){var e=t.className;(0,l.default)({c1:e})}),n}return a(e,t),e}(s.default);e.default=d},function(t,e,n){"use strict";function r(t){var e=void 0===t?"undefined":i(t);return null!=t&&("object"==e||"function"==e)}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=r},function(t,e,n){"use strict";var r=Array.isArray;t.exports=r},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=n(32),o="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,a=i||o||Function("return this")();t.exports=a},function(t,e,n){"use strict";function r(t){return null!=t&&"object"==(void 0===t?"undefined":i(t))}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=r},function(t,e,n){"use strict";function r(t){return null==t?void 0===t?s:u:c&&c in Object(t)?o(t):a(t)}var i=n(14),o=n(67),a=n(68),u="[object Null]",s="[object Undefined]",c=i?i.toStringTag:void 0;t.exports=r},function(t,e,n){"use strict";t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";function r(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}var i=n(55),o=n(56),a=n(57),u=n(58),s=n(59);r.prototype.clear=i,r.prototype.delete=o,r.prototype.get=a,r.prototype.has=u,r.prototype.set=s,t.exports=r},function(t,e,n){"use strict";function r(t,e){for(var n=t.length;n--;)if(i(t[n][0],e))return n;return-1}var i=n(13);t.exports=r},function(t,e,n){"use strict";function r(t,e){return t===e||t!==t&&e!==e}t.exports=r},function(t,e,n){"use strict";var r=n(7),i=r.Symbol;t.exports=i},function(t,e,n){"use strict";var r=n(20),i=r(Object,"create");t.exports=i},function(t,e,n){"use strict";function r(t,e){var n=t.__data__;return i(e)?n["string"==typeof e?"string":"hash"]:n.map}var i=n(81);t.exports=r},function(t,e,n){"use strict";var r=n(96),i=n(8),o=Object.prototype,a=o.hasOwnProperty,u=o.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(t){return i(t)&&a.call(t,"callee")&&!u.call(t,"callee")};t.exports=s},function(t,e,n){"use strict";function r(t,e){var n=void 0===t?"undefined":i(t);return!!(e=null==e?o:e)&&("number"==n||"symbol"!=n&&a.test(t))&&t>-1&&t%1==0&&t<e}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=9007199254740991,a=/^(?:0|[1-9]\d*)$/;t.exports=r},function(t,e,n){"use strict";function r(t,e){return i(t)?t:o(t,e)?[t]:a(u(t))}var i=n(6),o=n(120),a=n(121),u=n(26);t.exports=r},function(t,e,n){"use strict";function r(t,e){var n=o(t,e);return i(n)?n:void 0}var i=n(65),o=n(72);t.exports=r},function(t,e,n){"use strict";function r(t){if(!o(t))return!1;var e=i(t);return e==u||e==s||e==a||e==c}var i=n(9),o=n(5),a="[object AsyncFunction]",u="[object Function]",s="[object GeneratorFunction]",c="[object Proxy]";t.exports=r},function(t,e,n){"use strict";function r(t,e,n){"__proto__"==e&&i?i(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var i=n(35);t.exports=r},function(t,e,n){"use strict";function r(t){return null!=t&&o(t.length)&&!i(t)}var i=n(21),o=n(24);t.exports=r},function(t,e,n){"use strict";function r(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=i}var i=9007199254740991;t.exports=r},function(t,e,n){"use strict";function r(t){return"symbol"==(void 0===t?"undefined":i(t))||a(t)&&o(t)==u}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=n(9),a=n(8),u="[object Symbol]";t.exports=r},function(t,e,n){"use strict";function r(t){return null==t?"":i(t)}var i=n(124);t.exports=r},function(t,e,n){"use strict";function r(t){if("string"==typeof t||i(t))return t;var e=t+"";return"0"==e&&1/t==-o?"-0":e}var i=n(25),o=1/0;t.exports=r},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=n(0),c=function(t){return t&&t.__esModule?t:{default:t}}(s),f=n(1),l=n(2),h=function(t){function e(){var t,n,o,a;r(this,e);for(var u=arguments.length,s=Array(u),c=0;c<u;c++)s[c]=arguments[c];return n=o=i(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[this].concat(s))),o.config={},o.addListener=function(t,e,n){"function"==typeof n&&t.on(e,n)},a=n,i(o,a)}return o(e,t),u(e,[{key:"componentDidMount",value:function(){this.init(),this.bindEvent(),this.forceUpdate()}},{key:"shouldComponentUpdate",value:function(t){var e=t.data,n=this.props.data,r=t.graph||{},i=r.mode;return i!==(this.props.graph||{}).mode&&this.page.changeMode(i),e!==n&&(this.page.read(e),!0)}},{key:"initPage",value:function(){}},{key:"readData",value:function(){var t=this.config.data;t&&this.page.read(t)}},{key:"init",value:function(){(0,f.merge)(this.config,this.props,{graph:{container:this.pageId}}),this.initPage(),this.readData()}},{key:"bindEvent",value:function(){var t=this,e=this.addListener;l.GRAPH_MOUSE_EVENTS.forEach(function(n){var r=l.GRAPH_MOUSE_REACT_EVENTS[n];e(t.graph,""+n,t.props["on"+r]),e(t.graph,"node:"+n,t.props["onNode"+r]),e(t.graph,"edge:"+n,t.props["onEdge"+r]),e(t.graph,"group:"+n,t.props["onGroup"+r]),e(t.graph,"guide:"+n,t.props["onGuide"+r]),e(t.graph,"anchor:"+n,t.props["onAnchor"+r])}),l.GRAPH_OTHER_EVENTS.forEach(function(n){e(t.graph,[n],t.props[l.GRAPH_OTHER_REACT_EVENTS[n]])}),l.PAGE_EVENTS.forEach(function(n){e(t.page,[n],t.props[l.PAGE_REACT_EVENTS[n]])})}},{key:"render",value:function(){var t=this.page,e=this.pageId,n=this.props.children;return c.default.createElement("div",a({id:e},(0,f.pick)(this.props,["style","className"])),t?n:null)}},{key:"graph",get:function(){return this.page.getGraph()}}]),e}(c.default.Component);e.default=h},function(t,e,n){"use strict";(function(t){var n,r,i,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(a,u){"object"==o(e)&&"object"==o(t)?t.exports=u():(r=[],n=u,void 0!==(i="function"==typeof n?n.apply(e,r):n)&&(t.exports=i))}(window,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==(void 0===t?"undefined":o(t))&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(e){return t[e]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=16)}([,,,,,,,,,function(t,e,n){function r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){i(t,e,n[e])})}return t}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e,n){var r=[];return s.isString(t)?r=[e,t]:s.isArray(t)?(t.unshift(e),r=t):r=[e],n&&r.unshift(n+"-base"),r}var a=n(17),u=n(12),s=n(14),c={getActivedStyle:function(){},getSelectedStyle:function(){},getStyle:function(){},getPath:function(){}};a.registerNode("page-base",r({},c)),a.registerEdge("page-base",r({},c)),a.registerGroup("page-base",r({},c)),a.registerGuide("page-base",r({},c)),u.setRegister=function(t,e,n){t.registerNode=function(t,r,i){a.registerNode(t,r,o(i,e+"-base",n))},t.registerEdge=function(t,r,i){a.registerEdge(t,r,o(i,e+"-base",n))},t.registerGroup=function(t,r,i){a.registerGroup(t,r,o(i,e+"-base",n))},t.registerGuide=function(t,r,i){a.registerGuide(t,r,o(i,e+"-base",n))},t.registerBehaviour=function(t,e,n){a.registerBehaviour(t,function(t){var n=t.get("page");n.set("_graph",t),e(n)},n)}},u.setRegister(u,"page"),n(166),t.exports=u},,function(t,e,n){function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var i=n(17),o=n(63),a=n(146),u=n(145),s=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(e){r(t,e,n[e])})}return t}({},i.Util,o,a,u);t.exports=s},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==o(Symbol.iterator)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":o(t)})(t)}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){a(t,e,n[e])})}return t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var l=n(65),h=n(14),d=n(27),p=n(176),g=n(175),v=n(173),m=[p,n(172),n(171),g,v,n(170),n(168),n(167)],y=function(t){function e(t){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r={defaultData:null,shortcut:{redo:!0,undo:!0,delete:!0,resetZoom:!0,autoZoom:!0,zoomIn:!0,zoomOut:!0},_controllers:{},_signals:{}};return h.each(m,function(t){h.mix(r,t.CFG)}),h.mix(!0,r,t),(n=s(this,c(e).call(this,r))).isPage=!0,n.type="page",n._init(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(e,l),function(t,e,n){e&&u(t.prototype,e)}(e,[{key:"getDelegation",value:function(t,e){var n;if(1!==t.length||t[0].isNode||t[0].isGroup){var r=h.getTotalBBox(t.map(function(t){return t.getBBox()}));(n=h.getRectByBox(r,e,d.nodeDelegationStyle)).set("capture",!1)}else t[0].isEdge?n=e.addShape("path",{attrs:i({path:"M0 0L 1 1"},d.edgeDelegationStyle),capture:!1}):(n=h.getRectByBox(t[0],e,d.nodeDelegationStyle)).set("capture",!1);return n}},{key:"focusGraphWrapper",value:function(){this.getGraph().getKeyboardEventWrapper().focus()}},{key:"saveImage",value:function(t){var e,n,r=this,o=this.getGraph(),a=o.getBBox(),u=o.getFitViewPadding();return o.saveImage(i({width:a.width+u[1]+u[3],height:a.height+u[0]+u[2],beforeTransform:function(){e=r.getSelected().map(function(t){return t.id}),n=r.getSelected().map(function(t){return t.id}),r.clearSelected(),r.clearActived()},afterTransform:function(){r.setSelected(e,!0),r.setActived(n,!0)}},t))}},{key:"_init",value:function(){var t=this;h.each(m,function(e){e.INIT&&t[e.INIT]()}),this.bindEvent(),this._cacheBBox()}},{key:"executeCommand",value:function(t,e){var n=this.editor;n?n.executeCommand(t,e):t()}},{key:"_cacheBBox",value:function(){var t=this.getGraph();this.set("bboxCache",t.getBBox())}},{key:"bindEvent",value:function(){var t=this;this.getGraph().on("afterchange",function(){t._cacheBBox()})}},{key:"translateLimt",value:function(t){var e=this.getGraph(),n=this.get("bboxCache"),r=e.getWidth(),i=e.getHeight(),o=[n.minX,n.minY,1],a=[n.maxX,n.maxY,1];return h.vec3.transformMat3(o,o,t),h.vec3.transformMat3(a,a,t),a[0]<100&&h.mat3.translate(t,t,[100-a[0],0]),a[1]<100&&h.mat3.translate(t,t,[0,100-a[1]]),o[1]>i-100&&h.mat3.translate(t,t,[0,i-100-o[1]]),o[0]>r-100&&h.mat3.translate(t,t,[r-100-o[0],0]),!0}},{key:"setSignal",value:function(t,e){this.get("_signals")[t]=e}},{key:"getSignal",value:function(t){return this.get("_signals")[t]}},{key:"setController",value:function(t,e){this.get("_controllers")[t]=e}},{key:"getController",value:function(t){return this.get("_controllers")[t]}},{key:"destroy",value:function(){var t=this.get("_graph"),e=this.get("_controllers");h.each(e,function(t){t.destroy()}),t.destroy()}}]),e}();h.each(m,function(t){h.mix(y.prototype,t.AUGMENT)}),t.exports=y},function(t,e){t.exports={orbitGap:10,nodeDefaultShape:"flow-node",edgeDefaultShape:"flow-smooth",groupDefaultShape:"flow-group",nodeActivedOutterStyle:{lineWidth:0},groupSelectedOutterStyle:{stroke:"#E0F0FF",lineWidth:2},nodeSelectedOutterStyle:{stroke:"#E0F0FF",lineWidth:2},edgeActivedStyle:{stroke:"#1890FF",strokeOpacity:.92},nodeActivedStyle:{fill:"#F3F9FF",stroke:"#1890FF"},groupActivedStyle:{stroke:"#1890FF"},edgeSelectedStyle:{lineWidth:2,strokeOpacity:.92,stroke:"#A3B1BF"},nodeSelectedStyle:{fill:"#F3F9FF",stroke:"#1890FF"},groupSelectedStyle:{stroke:"#1890FF",fillOpacity:.92},nodeStyle:{stroke:"#CED4D9",fill:"#FFFFFF",shadowOffsetX:0,shadowOffsetY:4,shadowBlur:10,shadowColor:"rgba(13, 26, 38, 0.08)",lineWidth:1,radius:4,fillOpacity:.92},edgeStyle:{stroke:"#A3B1BF",strokeOpacity:.92,lineWidth:1,lineAppendWidth:8,endArrow:!0},groupBackgroundPadding:[40,10,10,10],groupLabelOffsetX:10,groupLabelOffsetY:10,edgeLabelStyle:{fill:"#666",textAlign:"center",textBaseline:"middle"},edgeLabelRectPadding:4,edgeLabelRectStyle:{fill:"white"},nodeLabelStyle:{fill:"#666",textAlign:"center",textBaseline:"middle"},groupStyle:{stroke:"#CED4D9",radius:4},groupLabelStyle:{fill:"#666",textAlign:"left",textBaseline:"top"},multiSelectRectStyle:{fill:"#1890FF",fillOpacity:.08,stroke:"#1890FF",opacity:.1},dragNodeHoverToGroupStyle:{stroke:"#1890FF",lineWidth:2},dragNodeLeaveFromGroupStyle:{stroke:"#BAE7FF",lineWidth:2},anchorPointStyle:{radius:3.5,fill:"#fff",stroke:"#1890FF",lineAppendWidth:12},anchorHotsoptStyle:{radius:12,fill:"#1890FF",fillOpacity:.25},anchorHotsoptActivedStyle:{radius:14},anchorPointHoverStyle:{radius:4,fill:"#1890FF",fillOpacity:1,stroke:"#1890FF"},nodeControlPointStyle:{radius:4,fill:"#fff",shadowBlur:4,shadowColor:"#666"},edgeControlPointStyle:{radius:6,symbol:"square",lineAppendWidth:6,fillOpacity:0,strokeOpacity:0},nodeSelectedBoxStyle:{stroke:"#C2C2C2"},cursor:{panningCanvas:"-webkit-grabbing",beforePanCanvas:"-webkit-grab",hoverNode:"move",hoverEffectiveAnchor:"crosshair",hoverEdge:"default",hoverGroup:"move",hoverUnEffectiveAnchor:"default",hoverEdgeControllPoint:"crosshair",multiSelect:"crosshair"},zIndex:{anchorPoint:3,anchorHotsopt:2,selectedBox:1,controlPoint:4},polylineEdgeStyle:{offset:10,borderRadius:5},addToGroupDelayTime:400,outFromGroupDelayTime:400}},function(t,e,n){function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var i=n(19),o=n(27),a=i.createDOM("<canvas>").getContext("2d");t.exports=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(e){r(t,e,n[e])})}return t}({},i,{getPanCanvasBehaviour:function(t){return function(e){var n,r,a=e.getGraph();a.behaviourOn("canvas:mouseenter",function(){e.css({cursor:o.cursor.beforePanCanvas})}),a.behaviourOn("mouseleave",function(t){t.toShape||e.css({cursor:o.cursor.beforePanCanvas})}),a.behaviourOn("dragstart",function(i){(2!==i.button&&!t||!i.shape||i.item&&!1===i.item.dragable)&&(n={x:i.domX,y:i.domY},e.css({cursor:o.cursor.panningCanvas}),r=a.getMatrix(),e.setCapture(!1))}),a.behaviourOn("drag",function(t){if(n){var o=t.domX-n.x,u=t.domY-n.y,s=[];i.mat3.translate(s,r,[o,u]),e.translateLimt(s)&&(a.updateMatrix(s),a.draw())}}),a.behaviourOn("dragend",function(){n=void 0,r=void 0,e.setCapture(!0),e.css({cursor:o.cursor.beforePanCanvas})})}},getLabelTextByTextLineWidth:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:320;a.font=e;var r=a.measureText(t).width;if(r>n){r=0;for(var i=1;i<t.length;i++)(r+=a.measureText(t[i]).width)>=n&&(t=t.substring(0,i)+"\n"+t.substring(i,t.length),i+=1,r=0)}return t}})},,function(t,e,n){function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var i=n(184),o=n(19),a=n(38),u=n(177),s=n(17);i.Editor=i,i.Util=o,i.Page=n(9),i.Flow=n(147),i.Koni=n(109),i.Mind=n(104),i.Minimap=n(89),i.Toolbar=n(87),i.Contextmenu=n(86),i.Itempannel=n(85),i.Detailpannel=n(84),i.Command=n(38),i.registerBehaviour=i.Page.registerBehaviour,i.registerNode=i.Page.registerNode,i.registerEdge=i.Page.registerEdge,i.registerGroup=i.Page.registerGroup,i.registerGuide=i.Page.registerGuide,i.registerCommand=a.registerCommand,i.version=u,i.track=function(t){var e={G6Editor:!0};o.isObject(t)?s.track(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(e){r(t,e,n[e])})}return t}({},e,t)):t?s.track(e):s.track(t)},i.track(!0),t.exports=i},function(t,e,n){window,t.exports=function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==(void 0===t?"undefined":o(t))&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(e){return t[e]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=594)}([,function(t,e,n){function r(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function i(){}function o(t){var e;return t=(t+"").trim().toLowerCase(),(e=B.exec(t))?new f((e=parseInt(e[1],16))>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):(e=N.exec(t))?a(parseInt(e[1],16)):(e=L.exec(t))?new f(e[1],e[2],e[3],1):(e=D.exec(t))?new f(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=R.exec(t))?u(e[1],e[2],e[3],e[4]):(e=G.exec(t))?u(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Y.exec(t))?h(e[1],e[2]/100,e[3]/100,1):(e=F.exec(t))?h(e[1],e[2]/100,e[3]/100,e[4]):X.hasOwnProperty(t)?a(X[t]):"transparent"===t?new f(NaN,NaN,NaN,0):null}function a(t){return new f(t>>16&255,t>>8&255,255&t,1)}function u(t,e,n,r){return r<=0&&(t=e=n=NaN),new f(t,e,n,r)}function s(t){return t instanceof i||(t=o(t)),t?new f((t=t.rgb()).r,t.g,t.b,t.opacity):new f}function c(t,e,n,r){return 1===arguments.length?s(t):new f(t,e,n,null==r?1:r)}function f(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function l(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function h(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new p(t,e,n,r)}function d(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof p)return new p(t.h,t.s,t.l,t.opacity);if(t instanceof i||(t=o(t)),!t)return new p;if(t instanceof p)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,a=Math.min(e,n,r),u=Math.max(e,n,r),s=NaN,c=u-a,f=(u+a)/2;return c?(s=e===u?(n-r)/c+6*(n<r):n===u?(r-e)/c+2:(e-n)/c+4,c/=f<.5?u+a:2-u-a,s*=60):c=f>0&&f<1?0:s,new p(s,c,f,t.opacity)}(t):new p(t,e,n,null==r?1:r)}function p(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function g(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function v(t){if(t instanceof b)return new b(t.l,t.a,t.b,t.opacity);if(t instanceof E){if(isNaN(t.h))return new b(t.l,0,0,t.opacity);var e=t.h*z;return new b(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof f||(t=s(t));var n,r,i=S(t.r),o=S(t.g),a=S(t.b),u=x((.2225045*i+.7168786*o+.0606169*a)/q);return i===o&&o===a?n=r=u:(n=x((.4360747*i+.3850649*o+.1430804*a)/U),r=x((.0139322*i+.0971045*o+.7141733*a)/V)),new b(116*u-16,500*(n-u),200*(u-r),t.opacity)}function m(t,e){return new b(t,0,0,null==e?1:e)}function y(t,e,n,r){return 1===arguments.length?v(t):new b(t,e,n,null==r?1:r)}function b(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function x(t){return t>Q?Math.pow(t,1/3):t/Z+W}function _(t){return t>K?t*t*t:Z*(t-W)}function w(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function S(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function M(t){if(t instanceof E)return new E(t.h,t.c,t.l,t.opacity);if(t instanceof b||(t=v(t)),0===t.a&&0===t.b)return new E(NaN,0,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*H;return new E(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function O(t,e,n,r){return 1===arguments.length?M(t):new E(n,e,t,null==r?1:r)}function P(t,e,n,r){return 1===arguments.length?M(t):new E(t,e,n,null==r?1:r)}function E(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function A(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof C)return new C(t.h,t.s,t.l,t.opacity);t instanceof f||(t=s(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(ot*r+rt*e-it*n)/(ot+rt-it),o=r-i,a=(nt*(n-i)-tt*o)/et,u=Math.sqrt(a*a+o*o)/(nt*i*(1-i)),c=u?Math.atan2(a,o)*H-120:NaN;return new C(c<0?c+360:c,u,i,t.opacity)}(t):new C(t,e,n,null==r?1:r)}function C(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}var k=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t},j="\\s*([+-]?\\d+)\\s*",I="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",T="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",B=/^#([0-9a-f]{3})$/,N=/^#([0-9a-f]{6})$/,L=new RegExp("^rgb\\("+[j,j,j]+"\\)$"),D=new RegExp("^rgb\\("+[T,T,T]+"\\)$"),R=new RegExp("^rgba\\("+[j,j,j,I]+"\\)$"),G=new RegExp("^rgba\\("+[T,T,T,I]+"\\)$"),Y=new RegExp("^hsl\\("+[I,T,T]+"\\)$"),F=new RegExp("^hsla\\("+[I,T,T,I]+"\\)$"),X={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};k(i,o,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),k(f,c,r(i,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new f(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new f(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+l(this.r)+l(this.g)+l(this.b)},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),k(p,d,r(i,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new p(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new p(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new f(g(t>=240?t-240:t+120,i,r),g(t,i,r),g(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var z=Math.PI/180,H=180/Math.PI,U=.96422,q=1,V=.82521,W=4/29,K=6/29,Z=3*K*K,Q=K*K*K;k(b,y,r(i,{brighter:function(t){return new b(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new b(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new f(w(3.1338561*(e=U*_(e))-1.6168667*(t=q*_(t))-.4906146*(n=V*_(n))),w(-.9787684*e+1.9161415*t+.033454*n),w(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),k(E,P,r(i,{brighter:function(t){return new E(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new E(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return v(this).rgb()}}));var $=-.14861,J=1.78277,tt=-.29227,et=-.90649,nt=1.97294,rt=nt*et,it=nt*J,ot=J*tt-et*$;k(C,A,r(i,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new C(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new C(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*z,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new f(255*(e+n*($*r+J*i)),255*(e+n*(tt*r+et*i)),255*(e+n*(nt*r)),this.opacity)}})),n.d(e,"a",function(){return o}),n.d(e,"h",function(){return c}),n.d(e,"e",function(){return d}),n.d(e,"f",function(){return y}),n.d(e,"d",function(){return P}),n.d(e,"g",function(){return O}),n.d(e,"c",function(){return m}),n.d(e,"b",function(){return A})},,,,,,,,,,,,,,function(t,e,n){function r(){return b||(w(i),b=_.now()+x)}function i(){b=0}function a(){this._call=this._time=this._next=null}function u(t,e,n){var r=new a;return r.restart(t,e,n),r}function s(){r(),++p;for(var t,e=h;e;)(t=b-e._time)>=0&&e._call.call(null,t),e=e._next;--p}function c(){b=(y=_.now())+x,p=g=0;try{s()}finally{p=0,function(){for(var t,e,n=h,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:h=e);d=t,l(r)}(),b=0}}function f(){var t=_.now(),e=t-y;e>m&&(x-=e,y=t)}function l(t){p||(g&&(g=clearTimeout(g)),t-b>24?(t<1/0&&(g=setTimeout(c,t-_.now()-x)),v&&(v=clearInterval(v))):(v||(y=_.now(),v=setInterval(f,m)),p=1,w(c)))}n.r(e);var h,d,p=0,g=0,v=0,m=1e3,y=0,b=0,x=0,_="object"==("undefined"==typeof performance?"undefined":o(performance))&&performance.now?performance:Date,w="object"==("undefined"==typeof window?"undefined":o(window))&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};a.prototype=u.prototype={constructor:a,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?r():+n)+(null==e?0:+e),this._next||d===this||(d?d._next=this:h=this,d=this),this._call=t,this._time=n,l()},stop:function(){this._call&&(this._call=null,this._time=1/0,l())}};var S=function(t,e,n){var r=new a;return e=null==e?0:+e,r.restart(function(n){r.stop(),t(n+e)},e,n),r},M=function(t,e,n){var i=new a,o=e;return null==e?(i.restart(t,e,n),i):(e=+e,n=null==n?r():+n,i.restart(function r(a){a+=o,i.restart(r,o+=e,n),t(a)},e,n),i)};n.d(e,"now",function(){return r}),n.d(e,"timer",function(){return u}),n.d(e,"timerFlush",function(){return s}),n.d(e,"timeout",function(){return S}),n.d(e,"interval",function(){return M})},,function(t,e,n){var r=n(408),i={};r.merge(i,r,{mixin:function(t,e){var n=t.CFG?"CFG":"ATTRS";if(t&&e){t._mixins=e,t[n]=t[n]||{};var r={};i.each(e,function(e){i.augment(t,e);var o=e[n];o&&i.merge(r,o)}),t[n]=i.merge(r,t[n])}}}),t.exports=i},,,,,function(t,e,n){var r={},i=n(448),o=n(514),a=n(152),u=n(493),s=n(492),c=n(491);a.mix(r,a,s,c,u,o,i),t.exports=r},,,,,,function(t,e,n){function r(t){return+t}function i(t){return t*t}function o(t){return t*(2-t)}function a(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function u(t){return t*t*t}function s(t){return--t*t*t+1}function c(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}function f(t){return 1-Math.cos(t*P)}function l(t){return Math.sin(t*P)}function h(t){return(1-Math.cos(O*t))/2}function d(t){return Math.pow(2,10*t-10)}function p(t){return 1-Math.pow(2,-10*t)}function g(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function v(t){return 1-Math.sqrt(1-t*t)}function m(t){return Math.sqrt(1- --t*t)}function y(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}function b(t){return 1-x(1-t)}function x(t){return(t=+t)<E?L*t*t:t<C?L*(t-=A)*t+k:t<I?L*(t-=j)*t+T:L*(t-=B)*t+N}function _(t){return((t*=2)<=1?1-x(1-t):x(t-1)+1)/2}n.r(e);var w=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),S=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),M=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),O=Math.PI,P=O/2,E=4/11,A=6/11,C=8/11,k=.75,j=9/11,I=10/11,T=.9375,B=21/22,N=63/64,L=1/E/E,D=function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n}(1.70158),R=function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),G=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158),Y=2*Math.PI,F=function t(e,n){function r(t){return e*Math.pow(2,10*--t)*Math.sin((i-t)/n)}var i=Math.asin(1/(e=Math.max(1,e)))*(n/=Y);return r.amplitude=function(e){return t(e,n*Y)},r.period=function(n){return t(e,n)},r}(1,.3),X=function t(e,n){function r(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+i)/n)}var i=Math.asin(1/(e=Math.max(1,e)))*(n/=Y);return r.amplitude=function(e){return t(e,n*Y)},r.period=function(n){return t(e,n)},r}(1,.3),z=function t(e,n){function r(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((i-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((i+t)/n))/2}var i=Math.asin(1/(e=Math.max(1,e)))*(n/=Y);return r.amplitude=function(e){return t(e,n*Y)},r.period=function(n){return t(e,n)},r}(1,.3);n.d(e,"easeLinear",function(){return r}),n.d(e,"easeQuad",function(){return a}),n.d(e,"easeQuadIn",function(){return i}),n.d(e,"easeQuadOut",function(){return o}),n.d(e,"easeQuadInOut",function(){return a}),n.d(e,"easeCubic",function(){return c}),n.d(e,"easeCubicIn",function(){return u}),n.d(e,"easeCubicOut",function(){return s}),n.d(e,"easeCubicInOut",function(){return c}),n.d(e,"easePoly",function(){return M}),n.d(e,"easePolyIn",function(){return w}),n.d(e,"easePolyOut",function(){return S}),n.d(e,"easePolyInOut",function(){return M}),n.d(e,"easeSin",function(){return h}),n.d(e,"easeSinIn",function(){return f}),n.d(e,"easeSinOut",function(){return l}),n.d(e,"easeSinInOut",function(){return h}),n.d(e,"easeExp",function(){return g}),n.d(e,"easeExpIn",function(){return d}),n.d(e,"easeExpOut",function(){return p}),n.d(e,"easeExpInOut",function(){return g}),n.d(e,"easeCircle",function(){return y}),n.d(e,"easeCircleIn",function(){return v}),n.d(e,"easeCircleOut",function(){return m}),n.d(e,"easeCircleInOut",function(){return y}),n.d(e,"easeBounce",function(){return x}),n.d(e,"easeBounceIn",function(){return b}),n.d(e,"easeBounceOut",function(){return x}),n.d(e,"easeBounceInOut",function(){return _}),n.d(e,"easeBack",function(){return G}),n.d(e,"easeBackIn",function(){return D}),n.d(e,"easeBackOut",function(){return R}),n.d(e,"easeBackInOut",function(){return G}),n.d(e,"easeElastic",function(){return X}),n.d(e,"easeElasticIn",function(){return F}),n.d(e,"easeElasticOut",function(){return X}),n.d(e,"easeElasticInOut",function(){return z})},function(t,e,n){var r=n(60),i=Array.isArray?Array.isArray:function(t){return r(t,"Array")};t.exports=i},function(t,e,n){var r=n(385),i=n(29);t.exports=function(t,e){if(t)if(i(t))for(var n=0,o=t.length;n<o&&!1!==e(t[n],n);n++);else if(r(t))for(var a in t)if(t.hasOwnProperty(a)&&!1===e(t[a],a))break}},,,,,,,function(t,e,n){var r=n(17),i=n(508),o=n(405),a=n(376),u=function t(e){t.superclass.constructor.call(this,e)};u.ATTRS={},r.extend(u,o);var s={matrix:"matrix",path:"path",points:"points",lineDash:"lineDash"};r.augment(u,i,{isShape:!0,drawInner:function(t){var e=this._attrs;this.createPath(t);var n=t.globalAlpha;if(this.hasFill()){var i=e.fillOpacity;r.isNil(i)||1===i?t.fill():(t.globalAlpha=i,t.fill(),t.globalAlpha=n)}if(this.hasStroke()&&this._attrs.lineWidth>0){var o=e.strokeOpacity;r.isNil(o)||1===o||(t.globalAlpha=o),t.stroke()}this.afterPath(t)},afterPath:function(){},isHitBox:function(){return!0},isHit:function(t,e){var n=[t,e,1];if(this.invert(n),this.isHitBox()){var r=this.getBBox();if(r&&!a.box(r.minX,r.maxX,r.minY,r.maxY,n[0],n[1]))return!1}var i=this._attrs.clip;return i?(i.invert(n,this.get("canvas")),!!i.isPointInPath(n[0],n[1])&&this.isPointInPath(n[0],n[1])):this.isPointInPath(n[0],n[1])},calculateBox:function(){return null},getHitLineWidth:function(){var t=this._attrs,e=t.lineAppendWidth||0;return(t.lineWidth||0)+e},clearTotalMatrix:function(){this._cfg.totalMatrix=null,this._cfg.region=null},clearBBox:function(){this._cfg.box=null,this._cfg.region=null},getBBox:function(){var t=this._cfg.box;return t||((t=this.calculateBox())&&(t.x=t.minX,t.y=t.minY,t.width=t.maxX-t.minX,t.height=t.maxY-t.minY),this._cfg.box=t),t},clone:function(){var t=null,e=this._attrs,n={};return r.each(e,function(t,i){s[i]&&r.isArray(e[i])?n[i]=function(t){for(var e=[],n=0;n<t.length;n++)r.isArray(t[n])?e.push([].concat(t[n])):e.push(t[n]);return e}(e[i]):n[i]=e[i]}),(t=new this.constructor({attrs:n}))._cfg.zIndex=this._cfg.zIndex,t}}),t.exports=u},function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.setMatrixArrayType=function(t){e.ARRAY_TYPE=t},e.toRadian=function(t){return t*i},e.equals=function(t,e){return Math.abs(t-e)<=r*Math.max(1,Math.abs(t),Math.abs(e))};var r=e.EPSILON=1e-6;e.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,e.RANDOM=Math.random;var i=Math.PI/180},,,,,,,,,function(t,e,n){var r=n(60);t.exports=function(t){return r(t,"Function")}},,,,,,,,,,,,,function(t,e){var n={}.toString;t.exports=function(t,e){return n.call(t)==="[object "+e+"]"}},function(t,e,n){var r;/*! * EventEmitter v5.1.0 - git.io/ee * Unlicense - http://unlicense.org/ * Oliver Caldwell - http://oli.me.uk/ * @preserve */ !function(e){function i(){}function a(t,e){for(var n=t.length;n--;)if(t[n].listener===e)return n;return-1}function u(t){return function(){return this[t].apply(this,arguments)}}var s=i.prototype,c=e.EventEmitter;s.getListeners=function(t){var e,n,r=this._getEvents();if(t instanceof RegExp)for(n in e={},r)r.hasOwnProperty(n)&&t.test(n)&&(e[n]=r[n]);else e=r[t]||(r[t]=[]);return e},s.flattenListeners=function(t){var e,n=[];for(e=0;e<t.length;e+=1)n.push(t[e].listener);return n},s.getListenersAsObject=function(t){var e,n=this.getListeners(t);return n instanceof Array&&((e={})[t]=n),e||n},s.addListener=function(t,e){if(!function t(e){return"function"==typeof e||e instanceof RegExp||!(!e||"object"!=(void 0===e?"undefined":o(e)))&&t(e.listener)}(e))throw new TypeError("listener must be a function");var n,r=this.getListenersAsObject(t),i="object"==(void 0===e?"undefined":o(e));for(n in r)r.hasOwnProperty(n)&&-1===a(r[n],e)&&r[n].push(i?e:{listener:e,once:!1});return this},s.on=u("addListener"),s.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},s.once=u("addOnceListener"),s.defineEvent=function(t){return this.getListeners(t),this},s.defineEvents=function(t){for(var e=0;e<t.length;e+=1)this.defineEvent(t[e]);return this},s.removeListener=function(t,e){var n,r,i=this.getListenersAsObject(t);for(r in i)i.hasOwnProperty(r)&&-1!==(n=a(i[r],e))&&i[r].splice(n,1);return this},s.off=u("removeListener"),s.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},s.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)},s.manipulateListeners=function(t,e,n){var r,i,a=t?this.removeListener:this.addListener,u=t?this.removeListeners:this.addListeners;if("object"!=(void 0===e?"undefined":o(e))||e instanceof RegExp)for(r=n.length;r--;)a.call(this,e,n[r]);else for(r in e)e.hasOwnProperty(r)&&(i=e[r])&&("function"==typeof i?a.call(this,r,i):u.call(this,r,i));return this},s.removeEvent=function(t){var e,n=void 0===t?"undefined":o(t),r=this._getEvents();if("string"===n)delete r[t];else if(t instanceof RegExp)for(e in r)r.hasOwnProperty(e)&&t.test(e)&&delete r[e];else delete this._events;return this},s.removeAllListeners=u("removeEvent"),s.emitEvent=function(t,e){var n,r,i,o,a=this.getListenersAsObject(t);for(o in a)if(a.hasOwnProperty(o))for(n=a[o].slice(0),i=0;i<n.length;i++)!0===(r=n[i]).once&&this.removeListener(t,r.listener),r.listener.apply(this,e||[])===this._getOnceReturnValue()&&this.removeListener(t,r.listener);return this},s.trigger=u("emitEvent"),s.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},s.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},s._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},s._getEvents=function(){return this._events||(this._events={})},i.noConflict=function(){return e.EventEmitter=c,i},void 0===(r=function(){return i}.call(e,n,e,t))||(t.exports=r)}(this||{})},function(t,e){t.exports=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){var r=n(60);t.exports=function(t){return r(t,"Number")}},function(t,e){t.exports=function(t){return null===t||void 0===t}},function(t,e,n){function r(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}function i(t,e){return function(n){return t+n*e}}function a(t,e){var n=e-t;return n?i(t,n>180||n<-180?n-360*Math.round(n/360):n):w(isNaN(t)?e:t)}function u(t,e){var n=e-t;return n?i(t,n):w(isNaN(t)?e:t)}function s(t){return function(e){var n,r,i=e.length,o=new Array(i),a=new Array(i),u=new Array(i);for(n=0;n<i;++n)r=Object(b.h)(e[n]),o[n]=r.r||0,a[n]=r.g||0,u[n]=r.b||0;return o=t(o),a=t(a),u=t(u),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=u(t),r+""}}}function c(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var u=[],s=[];return o=t(o),a=t(a),function(t,r,i,o,a,u){if(t!==i||r!==o){var s=a.push("translate(",null,e,null,n);u.push({i:s-4,x:A(t,i)},{i:s-2,x:A(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,u,s),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:A(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,u,s),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:A(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,u,s),function(t,e,n,r,o,a){if(t!==n||e!==r){var u=o.push(i(o)+"scale(",null,",",null,")");a.push({i:u-4,x:A(t,n)},{i:u-2,x:A(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,u,s),o=a=n