treeGraph.js 49 KB

1234567891011121314151617
  1. !function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.f6=n():t.f6=n()}(this,(function(){return function(t){var n={};function r(e){if(n[e])return n[e].exports;var i=n[e]={i:e,l:!1,exports:{}};return t[e].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=n,r.d=function(t,n,e){r.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,n){if(1&n&&(t=r(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(r.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)r.d(e,i,function(n){return t[n]}.bind(null,i));return e},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,"a",n),n},r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.p="",r(r.s=214)}({0:function(t,n,r){"use strict";r.d(n,"e",(function(){return O})),r.d(n,"x",(function(){return j})),r.d(n,"l",(function(){return w})),r.d(n,"p",(function(){return v})),r.d(n,"q",(function(){return y})),r.d(n,"s",(function(){return A})),r.d(n,"u",(function(){return P})),r.d(n,"w",(function(){return M})),r.d(n,"f",(function(){return c})),r.d(n,"g",(function(){return C})),r.d(n,"i",(function(){return u})),r.d(n,"j",(function(){return a})),r.d(n,"k",(function(){return x})),r.d(n,"m",(function(){return s})),r.d(n,"n",(function(){return p})),r.d(n,"o",(function(){return b})),r.d(n,"a",(function(){return N})),r.d(n,"b",(function(){return k})),r.d(n,"c",(function(){return l})),r.d(n,"h",(function(){return T})),r.d(n,"r",(function(){return I})),r.d(n,"d",(function(){return D})),r.d(n,"v",(function(){return F})),r.d(n,"t",(function(){return R}));var e=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},i={}.toString,o=function(t,n){return i.call(t)==="[object "+n+"]"},u=function(t){return o(t,"Function")},a=function(t){return null==t},c=function(t){return Array.isArray?Array.isArray(t):o(t,"Array")};function f(t){return(f="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)}var s=function(t){var n=f(t);return null!==t&&"object"===n||"function"===n};var l=function(t,n){if(t)if(c(t))for(var r=0,e=t.length;r<e&&!1!==n(t[r],r);r++);else if(s(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===n(t[i],i))break};Object.keys;function d(t){return(d="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)}var h=function(t){return"object"===d(t)&&null!==t},p=function(t){if(!h(t)||!o(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n};var v=function(t){if(c(t))return t.reduce((function(t,n){return Math.max(t,n)}),t[0])},y=function(t){if(c(t))return t.reduce((function(t,n){return Math.min(t,n)}),t[0])},g=Array.prototype,b=(g.splice,g.indexOf,Array.prototype.splice,function(t){return o(t,"String")});var m=Object.prototype.hasOwnProperty;var O=function(t,n){if(!n||!c(t))return{};for(var r,e={},i=u(n)?n:function(t){return t[n]},o=0;o<t.length;o++){var a=t[o];r=i(a),m.call(e,r)?e[r].push(a):e[r]=[a]}return e};var j=function(t,n){if(t["_wrap_"+n])return t["_wrap_"+n];var r=function(r){t[n](r)};return t["_wrap_"+n]=r,r};var x=function(t){return o(t,"Number")};Number.isInteger&&Number.isInteger;function w(t,n,r){return void 0===r&&(r=1e-5),Math.abs(t-n)<r}var A=function(t,n){return(t%n+n)%n},S=(Math.PI,parseInt,Math.PI/180),P=function(t){return S*t},_=(Object.values,function(t){return a(t)?"":t.toString()});var M=function(t){var n=_(t);return n.charAt(0).toUpperCase()+n.substring(1)},C=function(t){return o(t,"Boolean")};Object.prototype;function E(t,n){for(var r in n)n.hasOwnProperty(r)&&"constructor"!==r&&void 0!==n[r]&&(t[r]=n[r])}function I(t,n,r,e){return n&&E(t,n),r&&E(t,r),e&&E(t,e),t}function B(t){return(B="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)}var N=function t(n){if("object"!==B(n)||null===n)return n;var r;if(c(n)){r=[];for(var e=0,i=n.length;e<i;e++)"object"===B(n[e])&&null!=n[e]?r[e]=t(n[e]):r[e]=n[e]}else for(var o in r={},n)"object"===B(n[o])&&null!=n[o]?r[o]=t(n[o]):r[o]=n[o];return r};function L(t,n,r,e){for(var i in r=r||0,e=e||5,n)if(n.hasOwnProperty(i)){var o=n[i];null!==o&&p(o)?(p(t[i])||(t[i]={}),r<e?L(t[i],o,r+1,e):t[i]=n[i]):c(o)?(t[i]=[],t[i]=t[i].concat(o)):void 0!==o&&(t[i]=o)}}var k=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];for(var e=0;e<n.length;e+=1)L(t,n[e]);return t};Object.prototype.hasOwnProperty;var T=function t(n,r){if(n===r)return!0;if(!n||!r)return!1;if(b(n)||b(r))return!1;if(e(n)||e(r)){if(n.length!==r.length)return!1;for(var i=!0,o=0;o<n.length&&(i=t(n[o],r[o]));o++);return i}if(h(n)||h(r)){var u=Object.keys(n),a=Object.keys(r);if(u.length!==a.length)return!1;for(i=!0,o=0;o<u.length&&(i=t(n[u[o]],r[u[o]]));o++);return i}return!1},D=function(t,n,r){for(var e=0,i=b(n)?n.split("."):n;t&&e<i.length;)t=t[i[e++]];return void 0===t||e<i.length?r:t},H=(Object.prototype.hasOwnProperty,{}),F=function(t){return H[t=t||"g"]?H[t]+=1:H[t]=1,t+H[t]},R=function(){};!function(){function t(){this.map={}}t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,n){var r=this.map[t];return void 0===r?n:r},t.prototype.set=function(t,n){this.map[t]=n},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length}}()},1:function(t,n,r){"use strict";r.d(n,"c",(function(){return i})),r.d(n,"a",(function(){return o})),r.d(n,"e",(function(){return u})),r.d(n,"b",(function(){return a})),r.d(n,"d",(function(){return c})),r.d(n,"g",(function(){return f})),r.d(n,"f",(function(){return s}));
  2. /*! *****************************************************************************
  3. Copyright (c) Microsoft Corporation.
  4. Permission to use, copy, modify, and/or distribute this software for any
  5. purpose with or without fee is hereby granted.
  6. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  7. REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  8. AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  9. INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  10. LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  11. OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  12. PERFORMANCE OF THIS SOFTWARE.
  13. ***************************************************************************** */
  14. var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])})(t,n)};function i(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var o=function(){return(o=Object.assign||function(t){for(var n,r=1,e=arguments.length;r<e;r++)for(var i in n=arguments[r])Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t}).apply(this,arguments)};function u(t,n){var r={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&n.indexOf(e)<0&&(r[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(e=Object.getOwnPropertySymbols(t);i<e.length;i++)n.indexOf(e[i])<0&&Object.prototype.propertyIsEnumerable.call(t,e[i])&&(r[e[i]]=t[e[i]])}return r}function a(t,n,r,e){return new(r||(r=Promise))((function(i,o){function u(t){try{c(e.next(t))}catch(t){o(t)}}function a(t){try{c(e.throw(t))}catch(t){o(t)}}function c(t){var n;t.done?i(t.value):(n=t.value,n instanceof r?n:new r((function(t){t(n)}))).then(u,a)}c((e=e.apply(t,n||[])).next())}))}function c(t,n){var r,e,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,e&&(i=2&o[0]?e.return:o[0]?e.throw||((i=e.return)&&i.call(e),0):e.next)&&!(i=i.call(e,o[1])).done)return i;switch(e=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,e=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=u.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=n.call(t,u)}catch(t){o=[6,t],e=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}Object.create;function f(){for(var t=0,n=0,r=arguments.length;n<r;n++)t+=arguments[n].length;var e=Array(t),i=0;for(n=0;n<r;n++)for(var o=arguments[n],u=0,a=o.length;u<a;u++,i++)e[i]=o[u];return e}function s(t,n,r){if(r||2===arguments.length)for(var e,i=0,o=n.length;i<o;i++)!e&&i in n||(e||(e=Array.prototype.slice.call(n,0,i)),e[i]=n[i]);return t.concat(e||n)}Object.create},104:function(t,n,r){(function(t){var r,e,i,o;function u(t){return(u="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)}"undefined"!=typeof self&&self,o=function(){return function(t){var n={};function r(e){if(n[e])return n[e].exports;var i=n[e]={i:e,l:!1,exports:{}};return t[e].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=n,r.d=function(t,n,e){r.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:e})},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,"a",n),n},r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.p="",r(r.s=31)}([function(t,n,r){"use strict";var e=r(4);n.a=function(t){return Array.isArray?Array.isArray(t):Object(e.a)(t,"Array")}},function(t,n,r){"use strict";n.a=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)}},function(t,n,r){"use strict";var e=r(0),i=r(13);n.a=function(t,n){if(t)if(Object(e.a)(t))for(var r=0,o=t.length;r<o&&!1!==n(t[r],r);r++);else if(Object(i.a)(t))for(var u in t)if(t.hasOwnProperty(u)&&!1===n(t[u],u))break}},function(t,n,r){"use strict";var e=r(4);n.a=function(t){return Object(e.a)(t,"Function")}},function(t,n,r){"use strict";var e={}.toString;n.a=function(t,n){return e.call(t)==="[object "+n+"]"}},function(t,n,r){"use strict";var e=r(4);n.a=function(t){return Object(e.a)(t,"Number")}},function(t,n,r){"use strict";n.a=function(t){return null==t}},function(t,n,r){var e=r(33).mix;t.exports={assign:e}},function(t,n,r){"use strict";var e=r(4);n.a=function(t){return Object(e.a)(t,"String")}},function(t,n,r){"use strict";var e=r(15),i=r(4);n.a=function(t){if(!Object(e.a)(t)||!Object(i.a)(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n}},function(t,n,r){"use strict";var e=r(6);n.a=function(t){return Object(e.a)(t)?"":t.toString()}},function(t,n,r){var e=r(18),i=function(){function t(t,n){void 0===n&&(n={}),this.options=n,this.rootNode=e(t,n)}return t.prototype.execute=function(){throw new Error("please override this method")},t}();t.exports=i},function(t,n,r){"use strict";var e=r(1);n.a=function(t,n){return!!Object(e.a)(t)&&t.indexOf(n)>-1}},function(t,n,r){"use strict";n.a=function(t){var n=u(t);return null!==t&&"object"===n||"function"===n}},function(t,n,r){"use strict";var e=r(2),i=r(1);n.a=function(t,n){if(!Object(i.a)(t))return t;var r=[];return Object(e.a)(t,(function(t,e){n(t,e)&&r.push(t)})),r}},function(t,n,r){"use strict";n.a=function(t){return"object"===u(t)&&null!==t}},function(t,n,r){"use strict";function e(t,n){for(var r in n)n.hasOwnProperty(r)&&"constructor"!==r&&void 0!==n[r]&&(t[r]=n[r])}n.a=function(t,n,r,i){return n&&e(t,n),r&&e(t,r),i&&e(t,i),t}},function(t,n,r){var e=r(30),i=["LR","RL","TB","BT","H","V"],o=["LR","RL","H"],u=i[0];t.exports=function(t,n,r){var a=n.direction||u;if(n.isHorizontal=function(t){return o.indexOf(t)>-1}(a),a&&-1===i.indexOf(a))throw new TypeError("Invalid direction: "+a);if(a===i[0])r(t,n);else if(a===i[1])r(t,n),t.right2left();else if(a===i[2])r(t,n);else if(a===i[3])r(t,n),t.bottom2top();else if(a===i[4]||a===i[5]){var c=e(t,n),f=c.left,s=c.right;r(f,n),r(s,n),n.isHorizontal?f.right2left():f.bottom2top(),s.translate(f.x-s.x,f.y-s.y),t.x=f.x,t.y=s.y;var l=t.getBoundingBox();n.isHorizontal?l.top<0&&t.translate(0,-l.top):l.left<0&&t.translate(-l.left,0)}var d=n.fixedRoot;return void 0===d&&(d=!0),d&&t.translate(-(t.x+t.width/2+t.hgap),-(t.y+t.height/2+t.vgap)),t}},function(t,n,r){var e=r(7),i={getId:function(t){return t.id||t.name},getPreH:function(t){return t.preH||0},getPreV:function(t){return t.preV||0},getHGap:function(t){return t.hgap||18},getVGap:function(t){return t.vgap||18},getChildren:function(t){return t.children},getHeight:function(t){return t.height||36},getWidth:function(t){var n=t.label||" ";return t.width||18*n.split("").length}};function o(t,n){var r=this;if(r.vgap=r.hgap=0,t instanceof o)return t;r.data=t;var e=n.getHGap(t),i=n.getVGap(t);return r.preH=n.getPreH(t),r.preV=n.getPreV(t),r.width=n.getWidth(t),r.height=n.getHeight(t),r.width+=r.preH,r.height+=r.preV,r.id=n.getId(t),r.x=r.y=0,r.depth=0,r.children||(r.children=[]),r.addGap(e,i),r}e.assign(o.prototype,{isRoot:function(){return 0===this.depth},isLeaf:function(){return 0===this.children.length},addGap:function(t,n){this.hgap+=t,this.vgap+=n,this.width+=2*t,this.height+=2*n},eachNode:function(t){for(var n,r=[this];n=r.shift();)t(n),r=n.children.concat(r)},DFTraverse:function(t){this.eachNode(t)},BFTraverse:function(t){for(var n,r=[this];n=r.shift();)t(n),r=r.concat(n.children)},getBoundingBox:function(){var t={left:Number.MAX_VALUE,top:Number.MAX_VALUE,width:0,height:0};return this.eachNode((function(n){t.left=Math.min(t.left,n.x),t.top=Math.min(t.top,n.y),t.width=Math.max(t.width,n.x+n.width),t.height=Math.max(t.height,n.y+n.height)})),t},translate:function(t,n){void 0===t&&(t=0),void 0===n&&(n=0),this.eachNode((function(r){r.x+=t,r.y+=n,r.x+=r.preH,r.y+=r.preV}))},right2left:function(){var t=this.getBoundingBox();this.eachNode((function(n){n.x=n.x-2*(n.x-t.left)-n.width})),this.translate(t.width,0)},bottom2top:function(){var t=this.getBoundingBox();this.eachNode((function(n){n.y=n.y-2*(n.y-t.top)-n.height})),this.translate(0,t.height)}}),t.exports=function(t,n,r){void 0===n&&(n={});var u,a=new o(t,n=e.assign({},i,n)),c=[a];if(!r&&!t.collapsed)for(;u=c.shift();)if(!u.data.collapsed){var f=n.getChildren(u.data),s=f?f.length:0;if(u.children=new Array(s),f&&s)for(var l=0;l<s;l++){var d=new o(f[l],n);u.children[l]=d,c.push(d),d.parent=u,d.depth=u.depth+1}}return a}},function(t,n,r){"use strict";var e=r(6),i=r(20);n.a=function(t,n){var r=Object(i.a)(n),o=r.length;if(Object(e.a)(t))return!o;for(var u=0;u<o;u+=1){var a=r[u];if(n[a]!==t[a]||!(a in t))return!1}return!0}},function(t,n,r){"use strict";var e=r(2),i=r(3),o=Object.keys?function(t){return Object.keys(t)}:function(t){var n=[];return Object(e.a)(t,(function(r,e){Object(i.a)(t)&&"prototype"===e||n.push(e)})),n};n.a=o},function(t,n,r){"use strict";var e=r(1),i=Array.prototype.splice;n.a=function(t,n){if(!Object(e.a)(t))return[];for(var r=t?n.length:0,o=r-1;r--;){var u=void 0,a=n[r];r!==o&&a===u||(u=a,i.call(t,a,1))}return t}},function(t,n,r){"use strict";var e=r(12),i=r(2);n.a=function(t){var n=[];return Object(i.a)(t,(function(t){Object(e.a)(n,t)||n.push(t)})),n}},function(t,n,r){"use strict";var e=r(0),i=r(3),o=r(24);n.a=function(t,n){if(!n)return{0:t};if(!Object(i.a)(n)){var r=Object(e.a)(n)?n:n.replace(/\s+/g,"").split("*");n=function(t){for(var n="_",e=0,i=r.length;e<i;e++)n+=t[r[e]]&&t[r[e]].toString();return n}}return Object(o.a)(t,n)}},function(t,n,r){"use strict";var e=r(2),i=r(0),o=r(3),u=Object.prototype.hasOwnProperty;n.a=function(t,n){if(!n||!Object(i.a)(t))return{};var r,a={},c=Object(o.a)(n)?n:function(t){return t[n]};return Object(e.a)(t,(function(t){r=c(t),u.call(a,r)?a[r].push(t):a[r]=[t]})),a}},function(t,n,r){"use strict";n.a=function(t,n){return t.hasOwnProperty(n)}},function(t,n,r){"use strict";var e=r(2),i=r(3),o=Object.values?function(t){return Object.values(t)}:function(t){var n=[];return Object(e.a)(t,(function(r,e){Object(i.a)(t)&&"prototype"===e||n.push(r)})),n};n.a=o},function(t,n,r){"use strict";var e={}.toString;n.a=function(t){return e.call(t).replace(/^\[object /,"").replace(/]$/,"")}},function(t,n,r){"use strict";var e=Object.prototype;n.a=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},function(t,n,r){"use strict";var e=r(15),i=r(1),o=r(8);n.a=function t(n,r){if(n===r)return!0;if(!n||!r)return!1;if(Object(o.a)(n)||Object(o.a)(r))return!1;if(Object(i.a)(n)||Object(i.a)(r)){if(n.length!==r.length)return!1;for(var u=!0,a=0;a<n.length&&(u=t(n[a],r[a]));a++);return u}if(Object(e.a)(n)||Object(e.a)(r)){var c=Object.keys(n),f=Object.keys(r);if(c.length!==f.length)return!1;for(u=!0,a=0;a<c.length&&(u=t(n[c[a]],r[c[a]]));a++);return u}return!1}},function(t,n,r){var e=r(18);t.exports=function(t,n){for(var r=e(t.data,n,!0),i=e(t.data,n,!0),o=t.children.length,u=Math.round(o/2),a=n.getSide||function(t,n){return n<u?"right":"left"},c=0;c<o;c++){var f=t.children[c];"right"===a(f,c)?i.children.push(f):r.children.push(f)}return r.eachNode((function(t){t.isRoot()||(t.side="left")})),i.eachNode((function(t){t.isRoot()||(t.side="right")})),{left:r,right:i}}},function(t,n,r){var e={compactBox:r(32),dendrogram:r(114),indented:r(116),mindmap:r(118)};t.exports=e},function(t,n,r){var e=r(11),i=r(113),o=r(17),u=r(7),a=function(t){var n,r;function e(){return t.apply(this,arguments)||this}return r=t,(n=e).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,e.prototype.execute=function(){return o(this.rootNode,this.options,i)},e}(e),c={};t.exports=function(t,n){return n=u.assign({},c,n),new a(t,n).execute()}},function(t,n,r){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var e=r(12);r.d(n,"contains",(function(){return e.a})),r.d(n,"includes",(function(){return e.a}));var i=r(34);r.d(n,"difference",(function(){return i.a}));var o=r(35);r.d(n,"find",(function(){return o.a}));var u=r(36);r.d(n,"findIndex",(function(){return u.a}));var a=r(37);r.d(n,"firstValue",(function(){return a.a}));var c=r(38);r.d(n,"flatten",(function(){return c.a}));var f=r(39);r.d(n,"flattenDeep",(function(){return f.a}));var s=r(40);r.d(n,"getRange",(function(){return s.a}));var l=r(41);r.d(n,"pull",(function(){return l.a}));var d=r(21);r.d(n,"pullAt",(function(){return d.a}));var h=r(42);r.d(n,"reduce",(function(){return h.a}));var p=r(43);r.d(n,"remove",(function(){return p.a}));var v=r(44);r.d(n,"sortBy",(function(){return v.a}));var y=r(45);r.d(n,"union",(function(){return y.a}));var g=r(22);r.d(n,"uniq",(function(){return g.a}));var b=r(46);r.d(n,"valuesOfKey",(function(){return b.a}));var m=r(47);r.d(n,"head",(function(){return m.a}));var O=r(48);r.d(n,"last",(function(){return O.a}));var j=r(49);r.d(n,"startsWith",(function(){return j.a}));var x=r(50);r.d(n,"endsWith",(function(){return x.a}));var w=r(14);r.d(n,"filter",(function(){return w.a}));var A=r(51);r.d(n,"every",(function(){return A.a}));var S=r(52);r.d(n,"some",(function(){return S.a}));var P=r(53);r.d(n,"group",(function(){return P.a}));var _=r(24);r.d(n,"groupBy",(function(){return _.a}));var M=r(23);r.d(n,"groupToMap",(function(){return M.a}));var C=r(54);r.d(n,"getWrapBehavior",(function(){return C.a}));var E=r(55);r.d(n,"wrapBehavior",(function(){return E.a}));var I=r(56);r.d(n,"number2color",(function(){return I.a}));var B=r(57);r.d(n,"parseRadius",(function(){return B.a}));var N=r(58);r.d(n,"clamp",(function(){return N.a}));var L=r(59);r.d(n,"fixedBase",(function(){return L.a}));var k=r(60);r.d(n,"isDecimal",(function(){return k.a}));var T=r(61);r.d(n,"isEven",(function(){return T.a}));var D=r(62);r.d(n,"isInteger",(function(){return D.a}));var H=r(63);r.d(n,"isNegative",(function(){return H.a}));var F=r(64);r.d(n,"isNumberEqual",(function(){return F.a}));var R=r(65);r.d(n,"isOdd",(function(){return R.a}));var V=r(66);r.d(n,"isPositive",(function(){return V.a}));var z=r(67);r.d(n,"maxBy",(function(){return z.a}));var q=r(68);r.d(n,"minBy",(function(){return q.a}));var U=r(69);r.d(n,"mod",(function(){return U.a}));var G=r(70);r.d(n,"toDegree",(function(){return G.a}));var Y=r(71);r.d(n,"toInteger",(function(){return Y.a}));var W=r(72);r.d(n,"toRadian",(function(){return W.a}));var K=r(73);r.d(n,"forIn",(function(){return K.a}));var X=r(25);r.d(n,"has",(function(){return X.a}));var $=r(74);r.d(n,"hasKey",(function(){return $.a}));var J=r(75);r.d(n,"hasValue",(function(){return J.a}));var Q=r(20);r.d(n,"keys",(function(){return Q.a}));var Z=r(19);r.d(n,"isMatch",(function(){return Z.a}));var tt=r(26);r.d(n,"values",(function(){return tt.a}));var nt=r(76);r.d(n,"lowerCase",(function(){return nt.a}));var rt=r(77);r.d(n,"lowerFirst",(function(){return rt.a}));var et=r(78);r.d(n,"substitute",(function(){return et.a}));var it=r(79);r.d(n,"upperCase",(function(){return it.a}));var ot=r(80);r.d(n,"upperFirst",(function(){return ot.a}));var ut=r(27);r.d(n,"getType",(function(){return ut.a}));var at=r(81);r.d(n,"isArguments",(function(){return at.a}));var ct=r(0);r.d(n,"isArray",(function(){return ct.a}));var ft=r(1);r.d(n,"isArrayLike",(function(){return ft.a}));var st=r(82);r.d(n,"isBoolean",(function(){return st.a}));var lt=r(83);r.d(n,"isDate",(function(){return lt.a}));var dt=r(84);r.d(n,"isError",(function(){return dt.a}));var ht=r(3);r.d(n,"isFunction",(function(){return ht.a}));var pt=r(85);r.d(n,"isFinite",(function(){return pt.a}));var vt=r(6);r.d(n,"isNil",(function(){return vt.a}));var yt=r(86);r.d(n,"isNull",(function(){return yt.a}));var gt=r(5);r.d(n,"isNumber",(function(){return gt.a}));var bt=r(13);r.d(n,"isObject",(function(){return bt.a}));var mt=r(15);r.d(n,"isObjectLike",(function(){return mt.a}));var Ot=r(9);r.d(n,"isPlainObject",(function(){return Ot.a}));var jt=r(28);r.d(n,"isPrototype",(function(){return jt.a}));var xt=r(87);r.d(n,"isRegExp",(function(){return xt.a}));var wt=r(8);r.d(n,"isString",(function(){return wt.a}));var At=r(4);r.d(n,"isType",(function(){return At.a}));var St=r(88);r.d(n,"isUndefined",(function(){return St.a}));var Pt=r(89);r.d(n,"isElement",(function(){return Pt.a}));var _t=r(90);r.d(n,"requestAnimationFrame",(function(){return _t.a}));var Mt=r(91);r.d(n,"clearAnimationFrame",(function(){return Mt.a}));var Ct=r(92);r.d(n,"augment",(function(){return Ct.a}));var Et=r(93);r.d(n,"clone",(function(){return Et.a}));var It=r(94);r.d(n,"debounce",(function(){return It.a}));var Bt=r(95);r.d(n,"memoize",(function(){return Bt.a}));var Nt=r(96);r.d(n,"deepMix",(function(){return Nt.a}));var Lt=r(2);r.d(n,"each",(function(){return Lt.a}));var kt=r(97);r.d(n,"extend",(function(){return kt.a}));var Tt=r(98);r.d(n,"indexOf",(function(){return Tt.a}));var Dt=r(99);r.d(n,"isEmpty",(function(){return Dt.a}));var Ht=r(29);r.d(n,"isEqual",(function(){return Ht.a}));var Ft=r(100);r.d(n,"isEqualWith",(function(){return Ft.a}));var Rt=r(101);r.d(n,"map",(function(){return Rt.a}));var Vt=r(102);r.d(n,"mapValues",(function(){return Vt.a}));var zt=r(16);r.d(n,"mix",(function(){return zt.a})),r.d(n,"assign",(function(){return zt.a}));var qt=r(103);r.d(n,"get",(function(){return qt.a}));var Ut=r(104);r.d(n,"set",(function(){return Ut.a}));var Gt=r(105);r.d(n,"pick",(function(){return Gt.a}));var Yt=r(106);r.d(n,"throttle",(function(){return Yt.a}));var Wt=r(107);r.d(n,"toArray",(function(){return Wt.a}));var Kt=r(10);r.d(n,"toString",(function(){return Kt.a}));var Xt=r(108);r.d(n,"uniqueId",(function(){return Xt.a}));var $t=r(109);r.d(n,"noop",(function(){return $t.a}));var Jt=r(110);r.d(n,"identity",(function(){return Jt.a}));var Qt=r(111);r.d(n,"size",(function(){return Qt.a}));var Zt=r(112);r.d(n,"Cache",(function(){return Zt.a}))},function(t,n,r){"use strict";var e=r(14),i=r(12);n.a=function(t,n){return void 0===n&&(n=[]),Object(e.a)(t,(function(t){return!Object(i.a)(n,t)}))}},function(t,n,r){"use strict";var e=r(3),i=r(19),o=r(0),u=r(9);n.a=function(t,n){if(!Object(o.a)(t))return null;var r;if(Object(e.a)(n)&&(r=n),Object(u.a)(n)&&(r=function(t){return Object(i.a)(t,n)}),r)for(var a=0;a<t.length;a+=1)if(r(t[a]))return t[a];return null}},function(t,n,r){"use strict";n.a=function(t,n,r){void 0===r&&(r=0);for(var e=r;e<t.length;e++)if(n(t[e],e))return e;return-1}},function(t,n,r){"use strict";var e=r(6),i=r(0);n.a=function(t,n){for(var r=null,o=0;o<t.length;o++){var u=t[o][n];if(!Object(e.a)(u)){r=Object(i.a)(u)?u[0]:u;break}}return r}},function(t,n,r){"use strict";var e=r(0);n.a=function(t){if(!Object(e.a)(t))return[];for(var n=[],r=0;r<t.length;r++)n=n.concat(t[r]);return n}},function(t,n,r){"use strict";var e=r(0);n.a=function t(n,r){if(void 0===r&&(r=[]),Object(e.a)(n))for(var i=0;i<n.length;i+=1)t(n[i],r);else r.push(n);return r}},function(t,n,r){"use strict";var e=r(0),i=r(14);n.a=function(t){if(!(t=Object(i.a)(t,(function(t){return!isNaN(t)}))).length)return{min:0,max:0};if(Object(e.a)(t[0])){for(var n=[],r=0;r<t.length;r++)n=n.concat(t[r]);t=n}var o=Math.max.apply(null,t);return{min:Math.min.apply(null,t),max:o}}},function(t,n,r){"use strict";var e=Array.prototype,i=e.splice,o=e.indexOf;n.a=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];for(var e=0;e<n.length;e++)for(var u=n[e],a=-1;(a=o.call(t,u))>-1;)i.call(t,a,1);return t}},function(t,n,r){"use strict";var e=r(2),i=r(0),o=r(9);n.a=function(t,n,r){if(!Object(i.a)(t)&&!Object(o.a)(t))return t;var u=r;return Object(e.a)(t,(function(t,r){u=n(u,t,r)})),u}},function(t,n,r){"use strict";var e=r(1),i=r(21);n.a=function(t,n){var r=[];if(!Object(e.a)(t))return r;for(var o=-1,u=[],a=t.length;++o<a;){var c=t[o];n(c,o,t)&&(r.push(c),u.push(o))}return Object(i.a)(t,u),r}},function(t,n,r){"use strict";var e=r(0),i=r(8),o=r(3);n.a=function(t,n){var r;if(Object(o.a)(n))r=function(t,r){return n(t)-n(r)};else{var u=[];Object(i.a)(n)?u.push(n):Object(e.a)(n)&&(u=n),r=function(t,n){for(var r=0;r<u.length;r+=1){var e=u[r];if(t[e]>n[e])return 1;if(t[e]<n[e])return-1}return 0}}return t.sort(r),t}},function(t,n,r){"use strict";var e=r(22);n.a=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Object(e.a)([].concat.apply([],t))}},function(t,n,r){"use strict";var e=r(2),i=r(0),o=r(6);n.a=function(t,n){var r=[],u={};return t.forEach((function(t){var a=t[n];Object(o.a)(a)||(Object(i.a)(a)||(a=[a]),Object(e.a)(a,(function(t){u[t]||(r.push(t),u[t]=!0)})))})),r}},function(t,n,r){"use strict";n.a=function(t){if(Object(e.a)(t))return t[0]};var e=r(1)},function(t,n,r){"use strict";n.a=function(t){if(Object(e.a)(t))return t[t.length-1]};var e=r(1)},function(t,n,r){"use strict";var e=r(0),i=r(8);n.a=function(t,n){return!(!Object(e.a)(t)&&!Object(i.a)(t))&&t[0]===n}},function(t,n,r){"use strict";var e=r(0),i=r(8);n.a=function(t,n){return!(!Object(e.a)(t)&&!Object(i.a)(t))&&t[t.length-1]===n}},function(t,n,r){"use strict";n.a=function(t,n){for(var r=0;r<t.length;r++)if(!n(t[r],r))return!1;return!0}},function(t,n,r){"use strict";n.a=function(t,n){for(var r=0;r<t.length;r++)if(n(t[r],r))return!0;return!1}},function(t,n,r){"use strict";var e=r(23);n.a=function(t,n){if(!n)return[t];var r=Object(e.a)(t,n),i=[];for(var o in r)i.push(r[o]);return i}},function(t,n,r){"use strict";n.a=function(t,n){return t["_wrap_"+n]}},function(t,n,r){"use strict";n.a=function(t,n){if(t["_wrap_"+n])return t["_wrap_"+n];var r=function(r){t[n](r)};return t["_wrap_"+n]=r,r}},function(t,n,r){"use strict";var e={};n.a=function(t){var n=e[t];if(!n){for(var r=t.toString(16),i=r.length;i<6;i++)r="0"+r;n="#"+r,e[t]=n}return n}},function(t,n,r){"use strict";var e=r(0);n.a=function(t){var n=0,r=0,i=0,o=0;return Object(e.a)(t)?1===t.length?n=r=i=o=t[0]:2===t.length?(n=i=t[0],r=o=t[1]):3===t.length?(n=t[0],r=o=t[1],i=t[2]):(n=t[0],r=t[1],i=t[2],o=t[3]):n=r=i=o=t,{r1:n,r2:r,r3:i,r4:o}}},function(t,n,r){"use strict";n.a=function(t,n,r){return t<n?n:t>r?r:t}},function(t,n,r){"use strict";n.a=function(t,n){var r=n.toString(),e=r.indexOf(".");if(-1===e)return Math.round(t);var i=r.substr(e+1).length;return i>20&&(i=20),parseFloat(t.toFixed(i))}},function(t,n,r){"use strict";var e=r(5);n.a=function(t){return Object(e.a)(t)&&t%1!=0}},function(t,n,r){"use strict";var e=r(5);n.a=function(t){return Object(e.a)(t)&&t%2==0}},function(t,n,r){"use strict";var e=r(5),i=Number.isInteger?Number.isInteger:function(t){return Object(e.a)(t)&&t%1==0};n.a=i},function(t,n,r){"use strict";var e=r(5);n.a=function(t){return Object(e.a)(t)&&t<0}},function(t,n,r){"use strict";n.a=function(t,n,r){return void 0===r&&(r=1e-5),Math.abs(t-n)<r}},function(t,n,r){"use strict";var e=r(5);n.a=function(t){return Object(e.a)(t)&&t%2!=0}},function(t,n,r){"use strict";var e=r(5);n.a=function(t){return Object(e.a)(t)&&t>0}},function(t,n,r){"use strict";var e=r(2),i=r(0),o=r(3);n.a=function(t,n){if(Object(i.a)(t)){var r,u,a=t[0];return r=Object(o.a)(n)?n(t[0]):t[0][n],Object(e.a)(t,(function(t){(u=Object(o.a)(n)?n(t):t[n])>r&&(a=t,r=u)})),a}}},function(t,n,r){"use strict";var e=r(2),i=r(0),o=r(3);n.a=function(t,n){if(Object(i.a)(t)){var r,u,a=t[0];return r=Object(o.a)(n)?n(t[0]):t[0][n],Object(e.a)(t,(function(t){(u=Object(o.a)(n)?n(t):t[n])<r&&(a=t,r=u)})),a}}},function(t,n,r){"use strict";n.a=function(t,n){return(t%n+n)%n}},function(t,n,r){"use strict";var e=180/Math.PI;n.a=function(t){return e*t}},function(t,n,r){"use strict";n.a=parseInt},function(t,n,r){"use strict";var e=Math.PI/180;n.a=function(t){return e*t}},function(t,n,r){"use strict";var e=r(2);n.a=e.a},function(t,n,r){"use strict";var e=r(25);n.a=e.a},function(t,n,r){"use strict";var e=r(12),i=r(26);n.a=function(t,n){return Object(e.a)(Object(i.a)(t),n)}},function(t,n,r){"use strict";var e=r(10);n.a=function(t){return Object(e.a)(t).toLowerCase()}},function(t,n,r){"use strict";var e=r(10);n.a=function(t){var n=Object(e.a)(t);return n.charAt(0).toLowerCase()+n.substring(1)}},function(t,n,r){"use strict";n.a=function(t,n){return t&&n?t.replace(/\\?\{([^{}]+)\}/g,(function(t,r){return"\\"===t.charAt(0)?t.slice(1):void 0===n[r]?"":n[r]})):t}},function(t,n,r){"use strict";var e=r(10);n.a=function(t){return Object(e.a)(t).toUpperCase()}},function(t,n,r){"use strict";var e=r(10);n.a=function(t){var n=Object(e.a)(t);return n.charAt(0).toUpperCase()+n.substring(1)}},function(t,n,r){"use strict";var e=r(4);n.a=function(t){return Object(e.a)(t,"Arguments")}},function(t,n,r){"use strict";var e=r(4);n.a=function(t){return Object(e.a)(t,"Boolean")}},function(t,n,r){"use strict";var e=r(4);n.a=function(t){return Object(e.a)(t,"Date")}},function(t,n,r){"use strict";var e=r(4);n.a=function(t){return Object(e.a)(t,"Error")}},function(t,n,r){"use strict";var e=r(5);n.a=function(t){return Object(e.a)(t)&&isFinite(t)}},function(t,n,r){"use strict";n.a=function(t){return null===t}},function(t,n,r){"use strict";var e=r(4);n.a=function(t){return Object(e.a)(t,"RegExp")}},function(t,n,r){"use strict";n.a=function(t){return void 0===t}},function(t,n,r){"use strict";n.a=function(t){return t instanceof Element||t instanceof HTMLDocument}},function(t,n,r){"use strict";n.a=function(t){return(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return setTimeout(t,16)})(t)}},function(t,n,r){"use strict";n.a=function(t){(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame||clearTimeout)(t)}},function(t,n,r){"use strict";var e=r(16),i=r(3);n.a=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=t[0],o=1;o<t.length;o++){var u=t[o];Object(i.a)(u)&&(u=u.prototype),Object(e.a)(r.prototype,u)}}},function(t,n,r){"use strict";var e=r(0);n.a=function t(n){if("object"!==u(n)||null===n)return n;var r;if(Object(e.a)(n)){r=[];for(var i=0,o=n.length;i<o;i++)"object"===u(n[i])&&null!=n[i]?r[i]=t(n[i]):r[i]=n[i]}else for(var a in r={},n)"object"===u(n[a])&&null!=n[a]?r[a]=t(n[a]):r[a]=n[a];return r}},function(t,n,r){"use strict";n.a=function(t,n,r){var e;return function(){var i=this,o=arguments,u=function(){e=null,r||t.apply(i,o)},a=r&&!e;clearTimeout(e),e=setTimeout(u,n),a&&t.apply(i,o)}}},function(t,n,r){"use strict";var e=r(3);n.a=function(t,n){if(!Object(e.a)(t))throw new TypeError("Expected a function");var r=function r(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var o=n?n.apply(this,e):e[0],u=r.cache;if(u.has(o))return u.get(o);var a=t.apply(this,e);return u.set(o,a),a};return r.cache=new Map,r}},function(t,n,r){"use strict";var e=r(0),i=r(9);function o(t,n,r,u){for(var a in r=r||0,u=u||5,n)if(n.hasOwnProperty(a)){var c=n[a];null!==c&&Object(i.a)(c)?(Object(i.a)(t[a])||(t[a]={}),r<u?o(t[a],c,r+1,u):t[a]=n[a]):Object(e.a)(c)?(t[a]=[],t[a]=t[a].concat(c)):void 0!==c&&(t[a]=c)}}n.a=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];for(var e=0;e<n.length;e+=1)o(t,n[e]);return t}},function(t,n,r){"use strict";var e=r(16),i=r(3);n.a=function(t,n,r,o){Object(i.a)(n)||(r=n,n=t,t=function(){});var u=Object.create?function(t,n){return Object.create(t,{constructor:{value:n}})}:function(t,n){function r(){}r.prototype=t;var e=new r;return e.constructor=n,e},a=u(n.prototype,t);return t.prototype=Object(e.a)(a,t.prototype),t.superclass=u(n.prototype,n),Object(e.a)(a,r),Object(e.a)(t,o),t}},function(t,n,r){"use strict";var e=r(1);n.a=function(t,n){if(!Object(e.a)(t))return-1;var r=Array.prototype.indexOf;if(r)return r.call(t,n);for(var i=-1,o=0;o<t.length;o++)if(t[o]===n){i=o;break}return i}},function(t,n,r){"use strict";var e=r(6),i=r(1),o=r(27),u=r(28),a=Object.prototype.hasOwnProperty;n.a=function(t){if(Object(e.a)(t))return!0;if(Object(i.a)(t))return!t.length;var n=Object(o.a)(t);if("Map"===n||"Set"===n)return!t.size;if(Object(u.a)(t))return!Object.keys(t).length;for(var r in t)if(a.call(t,r))return!1;return!0}},function(t,n,r){"use strict";var e=r(3),i=r(29);n.a=function(t,n,r){return Object(e.a)(r)?!!r(t,n):Object(i.a)(t,n)}},function(t,n,r){"use strict";var e=r(2),i=r(1);n.a=function(t,n){if(!Object(i.a)(t))return t;var r=[];return Object(e.a)(t,(function(t,e){r.push(n(t,e))})),r}},function(t,n,r){"use strict";var e=r(6),i=r(13),o=function(t){return t};n.a=function(t,n){void 0===n&&(n=o);var r={};return Object(i.a)(t)&&!Object(e.a)(t)&&Object.keys(t).forEach((function(e){r[e]=n(t[e],e)})),r}},function(t,n,r){"use strict";var e=r(8);n.a=function(t,n,r){for(var i=0,o=Object(e.a)(n)?n.split("."):n;t&&i<o.length;)t=t[o[i++]];return void 0===t||i<o.length?r:t}},function(t,n,r){"use strict";var e=r(13),i=r(8),o=r(5);n.a=function(t,n,r){var u=t,a=Object(i.a)(n)?n.split("."):n;return a.forEach((function(t,n){n<a.length-1?(Object(e.a)(u[t])||(u[t]=Object(o.a)(a[n+1])?[]:{}),u=u[t]):u[t]=r})),t}},function(t,n,r){"use strict";var e=r(2),i=r(9),o=Object.prototype.hasOwnProperty;n.a=function(t,n){if(null===t||!Object(i.a)(t))return{};var r={};return Object(e.a)(n,(function(n){o.call(t,n)&&(r[n]=t[n])})),r}},function(t,n,r){"use strict";n.a=function(t,n,r){var e,i,o,u,a=0;r||(r={});var c=function(){a=!1===r.leading?0:Date.now(),e=null,u=t.apply(i,o),e||(i=o=null)},f=function(){var f=Date.now();a||!1!==r.leading||(a=f);var s=n-(f-a);return i=this,o=arguments,s<=0||s>n?(e&&(clearTimeout(e),e=null),a=f,u=t.apply(i,o),e||(i=o=null)):e||!1===r.trailing||(e=setTimeout(c,s)),u};return f.cancel=function(){clearTimeout(e),a=0,e=i=o=null},f}},function(t,n,r){"use strict";var e=r(1);n.a=function(t){return Object(e.a)(t)?Array.prototype.slice.call(t):[]}},function(t,n,r){"use strict";var e={};n.a=function(t){return e[t=t||"g"]?e[t]+=1:e[t]=1,t+e[t]}},function(t,n,r){"use strict";n.a=function(){}},function(t,n,r){"use strict";n.a=function(t){return t}},function(t,n,r){"use strict";n.a=function(t){return Object(e.a)(t)?0:Object(i.a)(t)?t.length:Object.keys(t).length};var e=r(6),i=r(1)},function(t,n,r){"use strict";var e=function(){function t(){this.map={}}return t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,n){var r=this.map[t];return void 0===r?n:r},t.prototype.set=function(t,n){this.map[t]=n},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length},t}();n.a=e},function(t,n){function r(t,n,r,e){void 0===e&&(e=[]);var i=this;i.w=t||0,i.h=n||0,i.y=r||0,i.x=0,i.c=e||[],i.cs=e.length,i.prelim=0,i.mod=0,i.shift=0,i.change=0,i.tl=null,i.tr=null,i.el=null,i.er=null,i.msel=0,i.mser=0}function e(t,n){var r=function t(n,r){var e=r?n.y:n.x;return n.children.forEach((function(n){e=Math.min(t(n,r),e)})),e}(t,n);!function t(n,r,e){e?n.y+=r:n.x+=r,n.children.forEach((function(n){t(n,r,e)}))}(t,-r,n)}r.fromNode=function(t,n){if(!t)return null;var e=[];return t.children.forEach((function(t){e.push(r.fromNode(t,n))})),n?new r(t.height,t.width,t.x,e):new r(t.width,t.height,t.y,e)},t.exports=function(t,n){void 0===n&&(n={});var i=n.isHorizontal;function o(t){0===t.cs?(t.el=t,t.er=t,t.msel=t.mser=0):(t.el=t.c[0].el,t.msel=t.c[0].msel,t.er=t.c[t.cs-1].er,t.mser=t.c[t.cs-1].mser)}function u(t,n,r){for(var e=t.c[n-1],i=e.mod,o=t.c[n],u=o.mod;null!==e&&null!==o;){s(e)>r.low&&(r=r.nxt);var l=i+e.prelim+e.w-(u+o.prelim);l>0&&(u+=l,a(t,n,r.index,l));var d=s(e),h=s(o);d<=h&&null!==(e=f(e))&&(i+=e.mod),d>=h&&null!==(o=c(o))&&(u+=o.mod)}!e&&o?function(t,n,r,e){var i=t.c[0].el;i.tl=r;var o=e-r.mod-t.c[0].msel;i.mod+=o,i.prelim-=o,t.c[0].el=t.c[n].el,t.c[0].msel=t.c[n].msel}(t,n,o,u):e&&!o&&function(t,n,r,e){var i=t.c[n].er;i.tr=r;var o=e-r.mod-t.c[n].mser;i.mod+=o,i.prelim-=o,t.c[n].er=t.c[n-1].er,t.c[n].mser=t.c[n-1].mser}(t,n,e,i)}function a(t,n,r,e){t.c[n].mod+=e,t.c[n].msel+=e,t.c[n].mser+=e,function(t,n,r,e){if(r!==n-1){var i=n-r;t.c[r+1].shift+=e/i,t.c[n].shift-=e/i,t.c[n].change-=e-e/i}}(t,n,r,e)}function c(t){return 0===t.cs?t.tl:t.c[0]}function f(t){return 0===t.cs?t.tr:t.c[t.cs-1]}function s(t){return t.y+t.h}function l(t,n,r){for(;null!==r&&t>=r.low;)r=r.nxt;return{low:t,index:n,nxt:r}}!function t(n,r,e){void 0===e&&(e=0),r?(n.x=e,e+=n.width):(n.y=e,e+=n.height),n.children.forEach((function(n){t(n,r,e)}))}(t,i);var d=r.fromNode(t,i);return function t(n){if(0!==n.cs){t(n.c[0]);for(var r=l(s(n.c[0].el),0,null),e=1;e<n.cs;++e){t(n.c[e]);var i=s(n.c[e].er);u(n,e,r),r=l(i,e,r)}!function(t){t.prelim=(t.c[0].prelim+t.c[0].mod+t.c[t.cs-1].mod+t.c[t.cs-1].prelim+t.c[t.cs-1].w)/2-t.w/2}(n),o(n)}else o(n)}(d),function t(n,r){r+=n.mod,n.x=n.prelim+r,function(t){for(var n=0,r=0,e=0;e<t.cs;e++)n+=t.c[e].shift,r+=n+t.c[e].change,t.c[e].mod+=r}(n);for(var e=0;e<n.cs;e++)t(n.c[e],r)}(d,0),function t(n,r,e){e?r.y=n.x:r.x=n.x,n.c.forEach((function(n,i){t(n,r.children[i],e)}))}(d,t,i),e(t,i),t}},function(t,n,r){var e=r(11),i=r(115),o=r(17),u=r(7),a=function(t){var n,r;function e(){return t.apply(this,arguments)||this}return r=t,(n=e).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,e.prototype.execute=function(){return this.rootNode.width=0,o(this.rootNode,this.options,i)},e}(e),c={};t.exports=function(t,n){return n=u.assign({},c,n),new a(t,n).execute()}},function(t,n,r){var e=r(7);function i(t,n){void 0===t&&(t=0),void 0===n&&(n=[]);var r=this;r.x=r.y=0,r.leftChild=r.rightChild=null,r.height=0,r.children=n}var o={isHorizontal:!0,nodeSep:20,nodeSize:20,rankSep:200,subTreeSep:10};t.exports=function(t,n){void 0===n&&(n={}),n=e.assign({},o,n);var r,u=0,a=function t(n){if(!n)return null;n.width=0,n.depth&&n.depth>u&&(u=n.depth);var r=n.children,e=r.length,o=new i(n.height,[]);return r.forEach((function(n,r){var i=t(n);o.children.push(i),0===r&&(o.leftChild=i),r===e-1&&(o.rightChild=i)})),o.originNode=n,o.isLeaf=n.isLeaf(),o}(t);return function t(n){if(n.isLeaf||0===n.children.length)n.drawingDepth=u;else{var r=n.children.map((function(n){return t(n)})),e=Math.min.apply(null,r);n.drawingDepth=e-1}return n.drawingDepth}(a),function t(e){e.x=e.drawingDepth*n.rankSep,e.isLeaf?(e.y=0,r&&(e.y=r.y+r.height+n.nodeSep,e.originNode.parent!==r.originNode.parent&&(e.y+=n.subTreeSep)),r=e):(e.children.forEach((function(n){t(n)})),e.y=(e.leftChild.y+e.rightChild.y)/2)}(a),function t(n,r,e){e?(r.x=n.x,r.y=n.y):(r.x=n.y,r.y=n.x),n.children.forEach((function(n,i){t(n,r.children[i],e)}))}(a,t,n.isHorizontal),t}},function(t,n,r){var e=r(11),i=r(117),o=r(30),u=r(7),a=["LR","RL","H"],c=a[0],f=function(t){var n,r;function e(){return t.apply(this,arguments)||this}return r=t,(n=e).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,e.prototype.execute=function(){var t=this.options,n=this.rootNode;t.isHorizontal=!0;var r=t.indent,e=void 0===r?20:r,u=t.dropCap,f=void 0===u||u,s=t.direction||c;if(s&&-1===a.indexOf(s))throw new TypeError("Invalid direction: "+s);if(s===a[0])i(n,e,f);else if(s===a[1])i(n,e,f),n.right2left();else if(s===a[2]){var l=o(n,t),d=l.left,h=l.right;i(d,e,f),d.right2left(),i(h,e,f);var p=d.getBoundingBox();h.translate(p.width,0),n.x=h.x-n.width/2}return n},e}(e),s={};t.exports=function(t,n){return n=u.assign({},s,n),new f(t,n).execute()}},function(t,n){t.exports=function(t,n,r){var e=null;t.eachNode((function(t){!function(t,n,r,e){if(!e)try{if(t.id===t.parent.children[0].id)return t.x+=r*t.depth,void(t.y=n?n.y:0)}catch(t){}t.x+=r*t.depth,t.y=n?n.y+n.height:0}(t,e,n,r),e=t}))}},function(t,n,r){var e=r(11),i=r(119),o=r(17),u=r(7),a=function(t){var n,r;function e(){return t.apply(this,arguments)||this}return r=t,(n=e).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,e.prototype.execute=function(){return o(this.rootNode,this.options,i)},e}(e),c={};t.exports=function(t,n){return n=u.assign({},c,n),new a(t,n).execute()}},function(t,n,r){var e=r(7),i={getSubTreeSep:function(){return 0}};t.exports=function(t,n){void 0===n&&(n={}),n=e.assign({},i,n),t.parent={x:0,width:0,height:0,y:0},t.BFTraverse((function(t){t.x=t.parent.x+t.parent.width})),t.parent=null,function t(n,r){var e=0;return n.children.length?n.children.forEach((function(n){e+=t(n,r)})):e=n.height,n._subTreeSep=r.getSubTreeSep(n.data),n.totalHeight=Math.max(n.height,e)+2*n._subTreeSep,n.totalHeight}(t,n),t.startY=0,t.y=t.totalHeight/2-t.height/2,t.eachNode((function(t){var n=t.children,r=n.length;if(r){var e=n[0];if(e.startY=t.startY+t._subTreeSep,1===r)e.y=t.y+t.height/2-e.height/2;else{e.y=e.startY+e.totalHeight/2-e.height/2;for(var i=1;i<r;i++){var o=n[i];o.startY=n[i-1].startY+n[i-1].totalHeight,o.y=o.startY+o.totalHeight/2-o.height/2}}}})),function t(n){var r=n.children,e=r.length;if(e){r.forEach((function(n){t(n)}));var i=r[0],o=r[e-1],u=o.y-i.y+o.height,a=0;if(r.forEach((function(t){a+=t.totalHeight})),u>n.height)n.y=i.y+u/2-n.height/2;else if(1!==r.length||n.height>a){var c=n.y+(n.height-u)/2-i.y;r.forEach((function(t){t.translate(0,c)}))}else n.y=(i.y+i.height/2+o.y+o.height/2)/2-n.height/2}}(t)}}])},"object"===u(n)&&"object"===u(t)?t.exports=o():(e=[],void 0===(i="function"==typeof(r=o)?r.apply(n,e):r)||(t.exports=i))}).call(this,r(50)(t))},214:function(t,n,r){"use strict";r.r(n);var e=r(1),i=r(104),o=r.n(i),u=r(0);n.default=function(t){var n=t.Graph,r=t.Util,i=r.radialLayout,a=r.traverseTree;return function(t){function n(n){var r=t.call(this,n)||this;return r.layoutAnimating=!1,r.set("removeList",[]),r.set("layoutMethod",r.getLayout()),r}return Object(e.c)(n,t),n.prototype.getLayout=function(){var t=this.get("layout");return t?"function"==typeof t?t:(t.type||(t.type="dendrogram"),t.direction||(t.direction="TB"),t.radial?function(n){var r=o.a[t.type](n,t);return i(r),r}:function(n){return o.a[t.type](n,t)}):null},n.indexOfChild=function(t,n){var r=-1;return Object(u.c)(t,(function(t,e){if(n===t.id)return r=e,!1})),r},n.prototype.getDefaultCfg=function(){var n=t.prototype.getDefaultCfg.call(this);return n.animate=!0,n},n.prototype.innerAddChild=function(t,n,r){var e=this,i=t.data;i&&(i.x=t.x,i.y=t.y,i.depth=t.depth);var o=e.addItem("node",i,!1);if(n){if(o.set("parent",n),r){var a=n.get("originAttrs");if(a)o.set("originAttrs",a);else{var c=n.getModel();o.set("originAttrs",{x:c.x,y:c.y})}}var f=n.get("children");f?f.push(o):n.set("children",[o]),e.addItem("edge",{source:n,target:o,id:n.get("id")+":"+o.get("id")},!1)}return Object(u.c)(t.children||[],(function(t){e.innerAddChild(t,o,r)})),e.emit("afteraddchild",{item:o,parent:n}),o},n.prototype.innerUpdateChild=function(t,r,e){var i=this,o=i.findById(t.id);if(o){Object(u.c)(t.children||[],(function(t){i.innerUpdateChild(t,o,e)}));var a,c,f=o.get("children");if(f)if(f.length>0)for(var s=f.length-1;s>=0;s--){var l=f[s].getModel();-1===n.indexOfChild(t.children||[],l.id)&&(i.innerRemoveChild(l.id,{x:t.x,y:t.y},e),f.splice(s,1))}o.get("originAttrs")&&(a=o.get("originAttrs").x,c=o.get("originAttrs").y);var d=o.getModel();e&&o.set("originAttrs",{x:d.x,y:d.y}),o.set("model",t.data),a===t.x&&c===t.y||o.updatePosition({x:t.x,y:t.y})}else i.innerAddChild(t,r,e)},n.prototype.innerRemoveChild=function(t,n,r){var e=this,i=e.findById(t);if(i)if(Object(u.c)(i.get("children"),(function(t){e.innerRemoveChild(t.getModel().id,n,r)})),r){var o=i.getModel();i.set("to",n),i.set("originAttrs",{x:o.x,y:o.y}),e.get("removeList").push(i)}else e.removeItem(i)},n.prototype.changeData=function(t){var n=this;this.getNodes().map((function(t){return n.clearItemStates(t)})),this.getEdges().map((function(t){return n.clearItemStates(t)})),t?(n.data(t),n.render()):n.layout(this.get("fitView"))},n.prototype.changeLayout=function(t){console.warn("Please call updateLayout instead of changeLayout. changeLayout will be discarded soon");this.updateLayout(t)},n.prototype.updateLayout=function(t){t?(this.set("layout",t),this.set("layoutMethod",this.getLayout()),this.layout()):console.warn("layout cannot be null")},n.prototype.refreshLayout=function(t){console.warn("Please call layout instead of refreshLayout. refreshLayout will be discarded soon");this.layout(t)},n.prototype.layout=function(t){var n=this.get("data"),r=this.get("layoutMethod")(n,this.get("layout")),e=this.get("animate");(this.emit("beforerefreshlayout",{data:n,layoutData:r}),this.emit("beforelayout"),this.innerUpdateChild(r,void 0,e),t)&&this.get("viewController").fitView();e?this.layoutAnimate(r):(this.refresh(),this.paint()),this.emit("afterrefreshlayout",{data:n,layoutData:r}),this.emit("afterlayout")},n.prototype.addChild=function(t,n){this.emit("beforeaddchild",{model:t,parent:n}),Object(u.o)(n)||(n=n.get("id"));var r=this.findDataById(n);r&&(r.children||(r.children=[]),r.children.push(t),this.changeData())},n.prototype.updateChildren=function(t,n){n&&this.findById(n)?(this.findDataById(n).children=t,this.changeData()):console.warn("Update children failed! There is no node with id '"+n+"'")},n.prototype.updateChild=function(t,r){if(r&&this.findById(r)){var e=this.findDataById(r),i=this.findById(t.id);if(e.children||(e.children=[]),i){var o=n.indexOfChild(e.children,t.id);e.children[o]=t}else e.children.push(t);this.changeData()}else this.changeData(t)},n.prototype.removeChild=function(t){var r=this.findById(t);if(r){var e=r.get("parent");if(e&&!e.destroyed){var i=this.findDataById(e.get("id")),o=i&&i.children||[],u=r.getModel(),a=n.indexOfChild(o,u.id);o.splice(a,1)}this.changeData()}},n.prototype.findDataById=function(t,n){var r=this;if(n||(n=r.get("data")),t===n.id)return n;var e=null;return Object(u.c)(n.children||[],(function(n){return n.id===t?(e=n,!1):!(e=r.findDataById(t,n))&&void 0})),e},n.prototype.layoutAnimate=function(t,n){var r=this,e=this.get("animateCfg");r.emit("beforeanimate",{data:t}),r.getEdges().forEach((function(t){var n=t.get("model");n.sourceAnchor||(n.sourceAnchor=t.get("sourceAnchorIndex"))})),this.get("canvas").animate((function(e){a(t,(function(i){var o=r.findById(i.id);if(o){var u=o.get("originAttrs"),a=o.get("model");if(u||(u={x:a.x,y:a.y},o.set("originAttrs",u)),n){var c=n(o,e,u,t);o.set("model",Object.assign(a,c))}else a.x=u.x+(i.x-u.x)*e,a.y=u.y+(i.y-u.y)*e}return!0})),Object(u.c)(r.get("removeList"),(function(t){var n=t.getModel(),r=t.get("originAttrs"),i=t.get("to");n.x=r.x+(i.x-r.x)*e,n.y=r.y+(i.y-r.y)*e})),r.refreshPositions()}),{duration:e.duration,easing:e.ease,callback:function(){Object(u.c)(r.getNodes(),(function(t){t.set("originAttrs",null)})),Object(u.c)(r.get("removeList"),(function(t){r.removeItem(t)})),r.set("removeList",[]),e.callback&&e.callback(),r.emit("afteranimate",{data:t})},delay:e.delay})},n.prototype.stopLayoutAnimate=function(){this.get("canvas").stopAnimate(),this.emit("layoutanimateend",{data:this.get("data")}),this.layoutAnimating=!1},n.prototype.isLayoutAnimating=function(){return this.layoutAnimating},n.prototype.render=function(){if(!this.get("data"))throw new Error("data must be defined first");this.clear(),this.emit("beforerender"),this.layout(this.get("fitView")),this.emit("afterrender")},n.prototype.save=function(){return this.get("data")},n}(n)}},50:function(t,n){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}}}).default}));
  15. //# sourceMappingURL=treeGraph.js.map