New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@hpcc-js/react

Package Overview
Dependencies
Maintainers
1
Versions
207
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hpcc-js/react - npm Package Compare versions

Comparing version 2.53.2 to 2.53.3

492

dist/index.es6.js
import { Utility, Palette, publish, HTMLWidget, SVGWidget } from '@hpcc-js/common';
var PKG_NAME$1 = "@hpcc-js/react";
var PKG_VERSION$1 = "2.53.2";
var BUILD_VERSION$1 = "2.104.13";
var PKG_VERSION$1 = "2.53.3";
var BUILD_VERSION$1 = "2.104.14";
var PKG_NAME = "@hpcc-js/preact-shim";
var PKG_VERSION = "2.16.3";
var BUILD_VERSION = "2.104.13";
var BUILD_VERSION = "2.104.14";
var n,l$1,u$1,t$1,o$1,f$1={},e$1=[],c$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function s(n,l){for(var u in l)n[u]=l[u];return n}function a$1(n){var l=n.parentNode;l&&l.removeChild(n);}function h$1(l,u,i){var t,o,r,f={};for(r in u)"key"==r?t=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return v$1(l,f,t,o,null)}function v$1(n,i,t,o,r){var f={type:n,props:i,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++u$1:r};return null==r&&null!=l$1.vnode&&l$1.vnode(f),f}function p$1(n){return n.children}function d$1(n,l){this.props=n,this.context=l;}function _(n,l){if(null==l)return n.__?_(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?_(n):null}function k$1(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return k$1(n)}}function b$1(n){(!n.__d&&(n.__d=!0)&&t$1.push(n)&&!g$1.__r++||o$1!==l$1.debounceRendering)&&((o$1=l$1.debounceRendering)||setTimeout)(g$1);}function g$1(){for(var n;g$1.__r=t$1.length;)n=t$1.sort(function(n,l){return n.__v.__b-l.__v.__b}),t$1=[],n.some(function(n){var l,u,i,t,o,r;n.__d&&(o=(t=(l=n).__v).__e,(r=l.__P)&&(u=[],(i=s({},t)).__v=t.__v+1,j$1(r,t,i,l.__n,void 0!==r.ownerSVGElement,null!=t.__h?[o]:null,u,null==o?_(t):o,t.__h),z$1(u,t),t.__e!=o&&k$1(t)));});}function w$1(n,l,u,i,t,o,r,c,s,a){var h,y,d,k,b,g,w,x=i&&i.__k||e$1,C=x.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(k=u.__k[h]=null==(k=l[h])||"boolean"==typeof k?null:"string"==typeof k||"number"==typeof k||"bigint"==typeof k?v$1(null,k,null,null,k):Array.isArray(k)?v$1(p$1,{children:k},null,null,null):k.__b>0?v$1(k.type,k.props,k.key,k.ref?k.ref:null,k.__v):k)){if(k.__=u,k.__b=u.__b+1,null===(d=x[h])||d&&k.key==d.key&&k.type===d.type)x[h]=void 0;else for(y=0;y<C;y++){if((d=x[y])&&k.key==d.key&&k.type===d.type){x[y]=void 0;break}d=null;}j$1(n,k,d=d||f$1,t,o,r,c,s,a),b=k.__e,(y=k.ref)&&d.ref!=y&&(w||(w=[]),d.ref&&w.push(d.ref,null,k),w.push(y,k.__c||b,k)),null!=b?(null==g&&(g=b),"function"==typeof k.type&&k.__k===d.__k?k.__d=s=m$1(k,s,n):s=A(n,k,d,x,b,s),"function"==typeof u.type&&(u.__d=s)):s&&d.__e==s&&s.parentNode!=n&&(s=_(d));}for(u.__e=g,h=C;h--;)null!=x[h]&&N(x[h],x[h]);if(w)for(h=0;h<w.length;h++)M(w[h],w[++h],w[++h]);}function m$1(n,l,u){for(var i,t=n.__k,o=0;t&&o<t.length;o++)(i=t[o])&&(i.__=n,l="function"==typeof i.type?m$1(i,l,u):A(u,i,i,t,i.__e,l));return l}function A(n,l,u,i,t,o){var r,f,e;if(void 0!==l.__d)r=l.__d,l.__d=void 0;else if(null==u||t!=o||null==t.parentNode)n:if(null==o||o.parentNode!==n)n.appendChild(t),r=null;else {for(f=o,e=0;(f=f.nextSibling)&&e<i.length;e+=2)if(f==t)break n;n.insertBefore(t,o),r=o;}return void 0!==r?r:t.nextSibling}function C(n,l,u,i,t){var o;for(o in u)"children"===o||"key"===o||o in l||H(n,o,null,u[o],i);for(o in l)t&&"function"!=typeof l[o]||"children"===o||"key"===o||"value"===o||"checked"===o||u[o]===l[o]||H(n,o,l[o],u[o],i);}function $(n,l,u){"-"===l[0]?n.setProperty(l,u):n[l]=null==u?"":"number"!=typeof u||c$1.test(l)?u:u+"px";}function H(n,l,u,i,t){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof i&&(n.style.cssText=i=""),i)for(l in i)u&&l in u||$(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||$(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?i||n.addEventListener(l,o?T$1:I,o):n.removeEventListener(l,o?T$1:I,o);else if("dangerouslySetInnerHTML"!==l){if(t)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&-1==l.indexOf("-")?n.removeAttribute(l):n.setAttribute(l,u));}}function I(n){this.l[n.type+!1](l$1.event?l$1.event(n):n);}function T$1(n){this.l[n.type+!0](l$1.event?l$1.event(n):n);}function j$1(n,u,i,t,o,r,f,e,c){var a,h,v,y,_,k,b,g,m,x,A,C,$,H,I,T=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,r=[e]),(a=l$1.__b)&&a(u);try{n:if("function"==typeof T){if(g=u.props,m=(a=T.contextType)&&t[a.__c],x=a?m?m.props.value:a.__:t,i.__c?b=(h=u.__c=i.__c).__=h.__E:("prototype"in T&&T.prototype.render?u.__c=h=new T(g,x):(u.__c=h=new d$1(g,x),h.constructor=T,h.render=O),m&&m.sub(h),h.props=g,h.state||(h.state={}),h.context=x,h.__n=t,v=h.__d=!0,h.__h=[],h._sb=[]),null==h.__s&&(h.__s=h.state),null!=T.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=s({},h.__s)),s(h.__s,T.getDerivedStateFromProps(g,h.__s))),y=h.props,_=h.state,v)null==T.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(null==T.getDerivedStateFromProps&&g!==y&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(g,x),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(g,h.__s,x)||u.__v===i.__v){for(h.props=g,h.state=h.__s,u.__v!==i.__v&&(h.__d=!1),h.__v=u,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u);}),A=0;A<h._sb.length;A++)h.__h.push(h._sb[A]);h._sb=[],h.__h.length&&f.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(g,h.__s,x),null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(y,_,k);});}if(h.context=x,h.props=g,h.__v=u,h.__P=n,C=l$1.__r,$=0,"prototype"in T&&T.prototype.render){for(h.state=h.__s,h.__d=!1,C&&C(u),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[];}else do{h.__d=!1,C&&C(u),a=h.render(h.props,h.state,h.context),h.state=h.__s;}while(h.__d&&++$<25);h.state=h.__s,null!=h.getChildContext&&(t=s(s({},t),h.getChildContext())),v||null==h.getSnapshotBeforeUpdate||(k=h.getSnapshotBeforeUpdate(y,_)),I=null!=a&&a.type===p$1&&null==a.key?a.props.children:a,w$1(n,Array.isArray(I)?I:[I],u,i,t,o,r,f,e,c),h.base=u.__e,u.__h=null,h.__h.length&&f.push(h),b&&(h.__E=h.__=null),h.__e=!1;}else null==r&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=L(i.__e,u,i,t,o,r,f,c);(a=l$1.diffed)&&a(u);}catch(n){u.__v=null,(c||null!=r)&&(u.__e=e,u.__h=!!c,r[r.indexOf(e)]=null),l$1.__e(n,u,i);}}function z$1(n,u){l$1.__c&&l$1.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$1.__e(n,u.__v);}});}function L(l,u,i,t,o,r,e,c){var s,h,v,y=i.props,p=u.props,d=u.type,k=0;if("svg"===d&&(o=!0),null!=r)for(;k<r.length;k++)if((s=r[k])&&"setAttribute"in s==!!d&&(d?s.localName===d:3===s.nodeType)){l=s,r[k]=null;break}if(null==l){if(null===d)return document.createTextNode(p);l=o?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,p.is&&p),r=null,c=!1;}if(null===d)y===p||c&&l.data===p||(l.data=p);else {if(r=r&&n.call(l.childNodes),h=(y=i.props||f$1).dangerouslySetInnerHTML,v=p.dangerouslySetInnerHTML,!c){if(null!=r)for(y={},k=0;k<l.attributes.length;k++)y[l.attributes[k].name]=l.attributes[k].value;(v||h)&&(v&&(h&&v.__html==h.__html||v.__html===l.innerHTML)||(l.innerHTML=v&&v.__html||""));}if(C(l,p,y,o,c),v)u.__k=[];else if(k=u.props.children,w$1(l,Array.isArray(k)?k:[k],u,i,t,o&&"foreignObject"!==d,r,e,r?r[0]:i.__k&&_(i,0),c),null!=r)for(k=r.length;k--;)null!=r[k]&&a$1(r[k]);c||("value"in p&&void 0!==(k=p.value)&&(k!==l.value||"progress"===d&&!k||"option"===d&&k!==y.value)&&H(l,"value",k,y.value,!1),"checked"in p&&void 0!==(k=p.checked)&&k!==l.checked&&H(l,"checked",k,y.checked,!1));}return l}function M(n,u,i){try{"function"==typeof n?n(u):n.current=u;}catch(n){l$1.__e(n,i);}}function N(n,u,i){var t,o;if(l$1.unmount&&l$1.unmount(n),(t=n.ref)&&(t.current&&t.current!==n.__e||M(t,null,u)),null!=(t=n.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount();}catch(n){l$1.__e(n,u);}t.base=t.__P=null,n.__c=void 0;}if(t=n.__k)for(o=0;o<t.length;o++)t[o]&&N(t[o],u,i||"function"!=typeof n.type);i||null==n.__e||a$1(n.__e),n.__=n.__e=n.__d=void 0;}function O(n,l,u){return this.constructor(n,u)}function P(u,i,t){var o,r,e;l$1.__&&l$1.__(u,i),r=(o="function"==typeof t)?null:t&&t.__k||i.__k,e=[],j$1(i,u=(!o&&t||i).__k=h$1(p$1,null,[u]),r||f$1,f$1,void 0!==i.ownerSVGElement,!o&&t?[t]:r?null:i.firstChild?n.call(i.childNodes):null,e,!o&&t?t:r?r.__e:i.firstChild,o),z$1(e,u);}n=e$1.slice,l$1={__e:function(n,l,u,i){for(var t,o,r;l=l.__;)if((t=l.__c)&&!t.__)try{if((o=t.constructor)&&null!=o.getDerivedStateFromError&&(t.setState(o.getDerivedStateFromError(n)),r=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(n,i||{}),r=t.__d),r)return t.__E=t}catch(l){n=l;}throw n}},u$1=0,d$1.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=s({},this.state),"function"==typeof n&&(n=n(s({},u),this.props)),n&&s(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),b$1(this));},d$1.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),b$1(this));},d$1.prototype.render=p$1,t$1=[],g$1.__r=0;
var t,r,u,i,o=0,f=[],c=[],e=l$1.__b,a=l$1.__r,v=l$1.diffed,l=l$1.__c,m=l$1.unmount;function d(t,u){l$1.__h&&l$1.__h(r,t,o||u),o=0;var i=r.__H||(r.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({__V:c}),i.__[t]}function p(n){return o=1,y$1(B,n)}function y$1(n,u,i){var o=d(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):B(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}));}],o.__c=r,!r.u)){r.u=!0;var f=r.shouldComponentUpdate;r.shouldComponentUpdate=function(n,t,r){if(!o.__c.__H)return !0;var u=o.__c.__H.__.filter(function(n){return n.__c});if(u.every(function(n){return !n.__N}))return !f||f.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0);}}),!(!i&&o.__c.props===n)&&(!f||f.call(this,n,t,r))};}return o.__N||o.__}function h(u,i){var o=d(t++,3);!l$1.__s&&z(o.__H,i)&&(o.__=u,o.i=i,r.__H.__h.push(o));}function F(n,r){var u=d(t++,7);return z(u.__H,r)?(u.__V=n(),u.i=r,u.__h=n,u.__V):u.__}function T(n,t){return o=8,F(function(){return n},t)}function b(){for(var t;t=f.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(k),t.__H.__h.forEach(w),t.__H.__h=[];}catch(r){t.__H.__h=[],l$1.__e(r,t.__v);}}l$1.__b=function(n){"function"!=typeof n.type||n.__m||null===n.__?n.__m||(n.__m=n.__&&n.__.__m?n.__.__m:""):n.__m=(n.__&&n.__.__m?n.__.__m:"")+(n.__&&n.__.__k?n.__.__k.indexOf(n):0),r=null,e&&e(n);},l$1.__r=function(n){a&&a(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=c,n.__N=n.i=void 0;})):(i.__h.forEach(k),i.__h.forEach(w),i.__h=[])),u=r;},l$1.diffed=function(t){v&&v(t);var o=t.__c;o&&o.__H&&(o.__H.__h.length&&(1!==f.push(o)&&i===l$1.requestAnimationFrame||((i=l$1.requestAnimationFrame)||j)(b)),o.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==c&&(n.__=n.__V),n.i=void 0,n.__V=c;})),u=r=null;},l$1.__c=function(t,r){r.some(function(t){try{t.__h.forEach(k),t.__h=t.__h.filter(function(n){return !n.__||w(n)});}catch(u){r.some(function(n){n.__h&&(n.__h=[]);}),r=[],l$1.__e(u,t.__v);}}),l&&l(t,r);},l$1.unmount=function(t){m&&m(t);var r,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{k(n);}catch(n){r=n;}}),u.__H=void 0,r&&l$1.__e(r,u.__v));};var g="function"==typeof requestAnimationFrame;function j(n){var t,r=function(){clearTimeout(u),g&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);g&&(t=requestAnimationFrame(r));}function k(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t;}function w(n){var t=r;n.__c=n.__(),r=t;}function z(n,t){return !n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function B(n,t){return "function"==typeof t?t(n):t}
var t,r,u,i,o=0,f=[],c=[],e=l$1.__b,a=l$1.__r,v=l$1.diffed,l=l$1.__c,m=l$1.unmount;function d(t,u){l$1.__h&&l$1.__h(r,t,o||u),o=0;var i=r.__H||(r.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({__V:c}),i.__[t]}function p(n){return o=1,y(B,n)}function y(n,u,i){var o=d(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):B(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}));}],o.__c=r,!r.u)){r.u=!0;var f=r.shouldComponentUpdate;r.shouldComponentUpdate=function(n,t,r){if(!o.__c.__H)return !0;var u=o.__c.__H.__.filter(function(n){return n.__c});if(u.every(function(n){return !n.__N}))return !f||f.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0);}}),!(!i&&o.__c.props===n)&&(!f||f.call(this,n,t,r))};}return o.__N||o.__}function h(u,i){var o=d(t++,3);!l$1.__s&&z(o.__H,i)&&(o.__=u,o.i=i,r.__H.__h.push(o));}function F(n,r){var u=d(t++,7);return z(u.__H,r)?(u.__V=n(),u.i=r,u.__h=n,u.__V):u.__}function T(n,t){return o=8,F(function(){return n},t)}function b(){for(var t;t=f.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(k),t.__H.__h.forEach(w),t.__H.__h=[];}catch(r){t.__H.__h=[],l$1.__e(r,t.__v);}}l$1.__b=function(n){"function"!=typeof n.type||n.__m||null===n.__?n.__m||(n.__m=n.__&&n.__.__m?n.__.__m:""):n.__m=(n.__&&n.__.__m?n.__.__m:"")+(n.__&&n.__.__k?n.__.__k.indexOf(n):0),r=null,e&&e(n);},l$1.__r=function(n){a&&a(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=c,n.__N=n.i=void 0;})):(i.__h.forEach(k),i.__h.forEach(w),i.__h=[])),u=r;},l$1.diffed=function(t){v&&v(t);var o=t.__c;o&&o.__H&&(o.__H.__h.length&&(1!==f.push(o)&&i===l$1.requestAnimationFrame||((i=l$1.requestAnimationFrame)||j)(b)),o.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==c&&(n.__=n.__V),n.i=void 0,n.__V=c;})),u=r=null;},l$1.__c=function(t,r){r.some(function(t){try{t.__h.forEach(k),t.__h=t.__h.filter(function(n){return !n.__||w(n)});}catch(u){r.some(function(n){n.__h&&(n.__h=[]);}),r=[],l$1.__e(u,t.__v);}}),l&&l(t,r);},l$1.unmount=function(t){m&&m(t);var r,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{k(n);}catch(n){r=n;}}),u.__H=void 0,r&&l$1.__e(r,u.__v));};var g="function"==typeof requestAnimationFrame;function j(n){var t,r=function(){clearTimeout(u),g&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);g&&(t=requestAnimationFrame(r));}function k(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t;}function w(n){var t=r;n.__c=n.__(),r=t;}function z(n,t){return !n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function B(n,t){return "function"==typeof t?t(n):t}
var index_es6 = /*#__PURE__*/Object.freeze({
__proto__: null,
BUILD_VERSION: BUILD_VERSION,
Component: d$1,
Fragment: p$1,
PKG_NAME: PKG_NAME,
PKG_VERSION: PKG_VERSION,
createElement: h$1,
h: h$1,
render: P,
useCallback: T,
useEffect: h,
useMemo: F,
useReducer: y$1,
useState: p
__proto__: null,
BUILD_VERSION: BUILD_VERSION,
Component: d$1,
Fragment: p$1,
PKG_NAME: PKG_NAME,
PKG_VERSION: PKG_VERSION,
createElement: h$1,
h: h$1,
render: P,
useCallback: T,
useEffect: h,
useMemo: F,
useReducer: y,
useState: p
});
var pi = Math.PI,
tau = 2 * pi,
epsilon = 1e-6,
tauEpsilon = tau - epsilon;
function Path() {
this._x0 = this._y0 = // start of current subpath
this._x1 = this._y1 = null; // end of current subpath
this._ = "";
}
function path() {
return new Path;
}
Path.prototype = path.prototype = {
constructor: Path,
moveTo: function(x, y) {
this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y);
},
closePath: function() {
if (this._x1 !== null) {
this._x1 = this._x0, this._y1 = this._y0;
this._ += "Z";
}
},
lineTo: function(x, y) {
this._ += "L" + (this._x1 = +x) + "," + (this._y1 = +y);
},
quadraticCurveTo: function(x1, y1, x, y) {
this._ += "Q" + (+x1) + "," + (+y1) + "," + (this._x1 = +x) + "," + (this._y1 = +y);
},
bezierCurveTo: function(x1, y1, x2, y2, x, y) {
this._ += "C" + (+x1) + "," + (+y1) + "," + (+x2) + "," + (+y2) + "," + (this._x1 = +x) + "," + (this._y1 = +y);
},
arcTo: function(x1, y1, x2, y2, r) {
x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;
var x0 = this._x1,
y0 = this._y1,
x21 = x2 - x1,
y21 = y2 - y1,
x01 = x0 - x1,
y01 = y0 - y1,
l01_2 = x01 * x01 + y01 * y01;
// Is the radius negative? Error.
if (r < 0) throw new Error("negative radius: " + r);
// Is this path empty? Move to (x1,y1).
if (this._x1 === null) {
this._ += "M" + (this._x1 = x1) + "," + (this._y1 = y1);
}
// Or, is (x1,y1) coincident with (x0,y0)? Do nothing.
else if (!(l01_2 > epsilon));
// Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?
// Equivalently, is (x1,y1) coincident with (x2,y2)?
// Or, is the radius zero? Line to (x1,y1).
else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {
this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1);
}
// Otherwise, draw an arc!
else {
var x20 = x2 - x0,
y20 = y2 - y0,
l21_2 = x21 * x21 + y21 * y21,
l20_2 = x20 * x20 + y20 * y20,
l21 = Math.sqrt(l21_2),
l01 = Math.sqrt(l01_2),
l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),
t01 = l / l01,
t21 = l / l21;
// If the start tangent is not coincident with (x0,y0), line to.
if (Math.abs(t01 - 1) > epsilon) {
this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01);
}
this._ += "A" + r + "," + r + ",0,0," + (+(y01 * x20 > x01 * y20)) + "," + (this._x1 = x1 + t21 * x21) + "," + (this._y1 = y1 + t21 * y21);
}
},
arc: function(x, y, r, a0, a1, ccw) {
x = +x, y = +y, r = +r, ccw = !!ccw;
var dx = r * Math.cos(a0),
dy = r * Math.sin(a0),
x0 = x + dx,
y0 = y + dy,
cw = 1 ^ ccw,
da = ccw ? a0 - a1 : a1 - a0;
// Is the radius negative? Error.
if (r < 0) throw new Error("negative radius: " + r);
// Is this path empty? Move to (x0,y0).
if (this._x1 === null) {
this._ += "M" + x0 + "," + y0;
}
// Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).
else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {
this._ += "L" + x0 + "," + y0;
}
// Is this arc empty? We’re done.
if (!r) return;
// Does the angle go the wrong way? Flip the direction.
if (da < 0) da = da % tau + tau;
// Is this a complete circle? Draw two arcs to complete the circle.
if (da > tauEpsilon) {
this._ += "A" + r + "," + r + ",0,1," + cw + "," + (x - dx) + "," + (y - dy) + "A" + r + "," + r + ",0,1," + cw + "," + (this._x1 = x0) + "," + (this._y1 = y0);
}
// Is this arc non-empty? Draw an arc!
else if (da > epsilon) {
this._ += "A" + r + "," + r + ",0," + (+(da >= pi)) + "," + cw + "," + (this._x1 = x + r * Math.cos(a1)) + "," + (this._y1 = y + r * Math.sin(a1));
}
},
rect: function(x, y, w, h) {
this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y) + "h" + (+w) + "v" + (+h) + "h" + (-w) + "Z";
},
toString: function() {
return this._;
}
};
function constant(x) {
return function constant() {
return x;
};
}
function Linear(context) {
this._context = context;
}
Linear.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._point = 0;
},
lineEnd: function() {
if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
this._line = 1 - this._line;
},
point: function(x, y) {
x = +x, y = +y;
switch (this._point) {
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
case 1: this._point = 2; // proceed
default: this._context.lineTo(x, y); break;
}
}
};
function curveLinear(context) {
return new Linear(context);
}
function x(p) {
return p[0];
}
function y(p) {
return p[1];
}
function d3Line() {
var x$1 = x,
y$1 = y,
defined = constant(true),
context = null,
curve = curveLinear,
output = null;
function line(data) {
var i,
n = data.length,
d,
defined0 = false,
buffer;
if (context == null) output = curve(buffer = path());
for (i = 0; i <= n; ++i) {
if (!(i < n && defined(d = data[i], i, data)) === defined0) {
if (defined0 = !defined0) output.lineStart();
else output.lineEnd();
}
if (defined0) output.point(+x$1(d, i, data), +y$1(d, i, data));
}
if (buffer) return output = null, buffer + "" || null;
}
line.x = function(_) {
return arguments.length ? (x$1 = typeof _ === "function" ? _ : constant(+_), line) : x$1;
};
line.y = function(_) {
return arguments.length ? (y$1 = typeof _ === "function" ? _ : constant(+_), line) : y$1;
};
line.defined = function(_) {
return arguments.length ? (defined = typeof _ === "function" ? _ : constant(!!_), line) : defined;
};
line.curve = function(_) {
return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;
};
line.context = function(_) {
return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;
};
return line;
}
function point(that, x, y) {
that._context.bezierCurveTo(
(2 * that._x0 + that._x1) / 3,
(2 * that._y0 + that._y1) / 3,
(that._x0 + 2 * that._x1) / 3,
(that._y0 + 2 * that._y1) / 3,
(that._x0 + 4 * that._x1 + x) / 6,
(that._y0 + 4 * that._y1 + y) / 6
);
}
function Basis(context) {
this._context = context;
}
Basis.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x0 = this._x1 =
this._y0 = this._y1 = NaN;
this._point = 0;
},
lineEnd: function() {
switch (this._point) {
case 3: point(this, this._x1, this._y1); // proceed
case 2: this._context.lineTo(this._x1, this._y1); break;
}
if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
this._line = 1 - this._line;
},
point: function(x, y) {
x = +x, y = +y;
switch (this._point) {
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
case 1: this._point = 2; break;
case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed
default: point(this, x, y); break;
}
this._x0 = this._x1, this._x1 = x;
this._y0 = this._y1, this._y1 = y;
}
};
function d3CurveBasis(context) {
return new Basis(context);
}
var line = d3Line()
.x(function (d) { return d[0]; })
.y(function (d) { return d[1]; })
.curve(d3CurveBasis);
function calcArc(points, curveDepth) {
if (points.length === 2 && curveDepth) {
var dx = points[0][0] - points[1][0];
var dy = points[0][1] - points[1][1];
var dist = Math.sqrt(dx * dx + dy * dy);
if (dist) {
var midX = (points[0][0] + points[1][0]) / 2 - dy * curveDepth / 100;
var midY = (points[0][1] + points[1][1]) / 2 + dx * curveDepth / 100;
return [points[0], [midX, midY], points[1]];
}
}
return points;
}
var Edge = function (_a) {
var _b = _a.points, points = _b === void 0 ? [] : _b, _c = _a.curveDepth, curveDepth = _c === void 0 ? 16 : _c, _d = _a.stroke, stroke = _d === void 0 ? "black" : _d, strokeDasharray = _a.strokeDasharray;
var d = F(function () {
return line(calcArc(points, curveDepth));
}, [curveDepth, points]);
return h$1("path", { stroke: stroke, "stroke-dasharray": strokeDasharray, d: d });
};
var ImageChar = function (_a) {
var x = _a.x, _b = _a.y, y = _b === void 0 ? 0 : _b, _c = _a.height, height = _c === void 0 ? 12 : _c, fill = _a.fill, stroke = _a.stroke, _d = _a.fontFamily, fontFamily = _d === void 0 ? "FontAwesome" : _d, _e = _a.char, char = _e === void 0 ? "" : _e;
var renderChar = F(function () {
return fontFamily === "FontAwesome" ? Utility.faChar(char) : char;
}, [char, fontFamily]);
return h$1("text", { x: x, y: y, fill: fill, stroke: stroke, "font-family": fontFamily, "font-size": "".concat(height, "px"), "dominant-baseline": "middle", style: "text-anchor: middle;alignment-baseline:middle;" }, renderChar);
};
/******************************************************************************

@@ -396,2 +85,10 @@ Copyright (c) Microsoft Corporation.

var ImageChar = function (_a) {
var x = _a.x, _b = _a.y, y = _b === void 0 ? 0 : _b, _c = _a.height, height = _c === void 0 ? 12 : _c, fill = _a.fill, stroke = _a.stroke, _d = _a.fontFamily, fontFamily = _d === void 0 ? "FontAwesome" : _d, _e = _a.char, char = _e === void 0 ? "" : _e;
var renderChar = F(function () {
return fontFamily === "FontAwesome" ? Utility.faChar(char) : char;
}, [char, fontFamily]);
return h$1("text", { x: x, y: y, fill: fill, stroke: stroke, "font-family": fontFamily, "font-size": "".concat(height, "px"), "dominant-baseline": "middle", style: "text-anchor: middle;alignment-baseline:middle;" }, renderChar);
};
var Circle = function (_a) {

@@ -437,2 +134,75 @@ var _b = _a.radius, radius = _b === void 0 ? 32 : _b, _c = _a.fill, fill = _c === void 0 ? "navy" : _c, _d = _a.stroke, stroke = _d === void 0 ? fill : _d, _e = _a.strokeWidth, strokeWidth = _e === void 0 ? 1 : _e, shapeRendering = _a.shapeRendering;

var TextLine = function (_a) {
var text = _a.text, _b = _a.height, height = _b === void 0 ? 12 : _b, _c = _a.anchor, anchor = _c === void 0 ? "middle" : _c, _d = _a.baseline, baseline = _d === void 0 ? "middle" : _d, _e = _a.fontFamily, fontFamily = _e === void 0 ? "Verdana" : _e, _f = _a.fill, fill = _f === void 0 ? "black" : _f;
return h$1("text", { "font-family": fontFamily, "font-size": "".concat(height, "px"), "text-anchor": anchor, "dominant-baseline": baseline, fill: fill }, text);
};
var Text = function (_a) {
var text = _a.text, _b = _a.height, height = _b === void 0 ? 12 : _b, _c = _a.fontFamily, fontFamily = _c === void 0 ? "Verdana" : _c, _d = _a.fill, fill = _d === void 0 ? "black" : _d, onSizeUpdate = _a.onSizeUpdate;
var _e = p(0), totalWidth = _e[0], setTotalWidthUpdate = _e[1];
var _f = p(0), totalHeight = _f[0], setTotalHeightUpdate = _f[1];
h(function () {
onSizeUpdate && onSizeUpdate({ width: totalWidth, height: totalHeight });
}, [totalWidth, totalHeight, onSizeUpdate]);
var parts = F(function () {
return text.split("\n");
}, [text]);
var ts = F(function () {
return Utility.textSize(parts, fontFamily, height);
}, [fontFamily, height, parts]);
setTotalWidthUpdate(ts.width);
setTotalHeightUpdate(parts.length * (height + 2) - 2);
var yOffset = -(totalHeight / 2) + (height / 2);
var TextLines = F(function () {
return parts.map(function (p, i) {
return h$1("g", { key: i, transform: "translate(0 ".concat(yOffset + i * (height + 2), ")") },
h$1(TextLine, { text: p, height: height, fontFamily: fontFamily, fill: fill }));
});
}, [fill, fontFamily, height, parts, yOffset]);
return h$1(p$1, null, TextLines);
};
var TextBox = function (_a) {
var text = _a.text, _b = _a.height, height = _b === void 0 ? 12 : _b, _c = _a.fontFamily, fontFamily = _c === void 0 ? "Verdana" : _c, _d = _a.padding, padding = _d === void 0 ? 4 : _d, _e = _a.fill, fill = _e === void 0 ? "whitesmoke" : _e, _f = _a.stroke, stroke = _f === void 0 ? "lightgray" : _f, _g = _a.textFill, textFill = _g === void 0 ? "black" : _g, _h = _a.strokeWidth, strokeWidth = _h === void 0 ? 1 : _h, _j = _a.cornerRadius, cornerRadius = _j === void 0 ? 0 : _j, onSizeUpdate = _a.onSizeUpdate;
var _k = p(0), textWidth = _k[0], setTextWidthUpdate = _k[1];
var _l = p(0), textHeight = _l[0], setTextHeightUpdate = _l[1];
h(function () {
onSizeUpdate && onSizeUpdate({ width: textWidth, height: textHeight });
}, [textWidth, textHeight, onSizeUpdate]);
var onTextSizeUpdate = T(function (size) {
setTextWidthUpdate(size.width);
setTextHeightUpdate(size.height);
}, []);
var w = textWidth + padding * 2 + strokeWidth;
var h$2 = textHeight + padding * 2 + strokeWidth;
var textOffsetY = Math.floor(height / 10);
return h$1(p$1, null,
h$1(Rectangle, { width: w, height: h$2, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
h$1("g", { transform: "translate(0 ".concat(textOffsetY, ")") },
h$1(Text, { text: text, fontFamily: fontFamily, height: height, fill: textFill, onSizeUpdate: onTextSizeUpdate })));
};
var LabelledRect = function (_a) {
var text = _a.text, _b = _a.height, height = _b === void 0 ? 12 : _b, _c = _a.width, width = _c === void 0 ? 12 : _c, _d = _a.fontFamily, fontFamily = _d === void 0 ? "Verdana" : _d, _e = _a.fontSize, fontSize = _e === void 0 ? 10 : _e, _f = _a.padding, padding = _f === void 0 ? 3 : _f, _g = _a.fill, fill = _g === void 0 ? "whitesmoke" : _g, _h = _a.stroke, stroke = _h === void 0 ? "lightgray" : _h, _j = _a.textFill, textFill = _j === void 0 ? "black" : _j, _k = _a.strokeWidth, strokeWidth = _k === void 0 ? 1 : _k, _l = _a.cornerRadius, cornerRadius = _l === void 0 ? 0 : _l; _a.onSizeUpdate;
return h$1(p$1, null,
h$1(Rectangle, { width: width, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
h$1("g", { transform: "translate(".concat(-(width / 2) + padding, " ").concat(-(height / 2) + padding, ")") },
h$1(TextLine, { text: text, fontFamily: fontFamily, height: fontSize, fill: textFill, anchor: "start", baseline: "hanging" })));
};
var IconLabelledRect = function (_a) {
var icon = _a.icon, iconFontFamily = _a.iconFontFamily, text = _a.text, _b = _a.height, height = _b === void 0 ? 12 : _b, _c = _a.width, width = _c === void 0 ? 12 : _c, _d = _a.fontFamily, fontFamily = _d === void 0 ? "Verdana" : _d, _e = _a.fontSize, fontSize = _e === void 0 ? 10 : _e, _f = _a.padding, padding = _f === void 0 ? 3 : _f, _g = _a.fill, fill = _g === void 0 ? "whitesmoke" : _g, _h = _a.stroke, stroke = _h === void 0 ? "lightgray" : _h, _j = _a.textFill, textFill = _j === void 0 ? "black" : _j, _k = _a.strokeWidth, strokeWidth = _k === void 0 ? 1 : _k, _l = _a.cornerRadius, cornerRadius = _l === void 0 ? 0 : _l; _a.onSizeUpdate;
return h$1(p$1, null,
h$1(Rectangle, { width: width, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
h$1("g", { transform: "translate(".concat(-(width / 2) + padding, " ").concat(-(height / 2) + padding, ")") },
h$1(Icon, { shape: "square", imageFontFamily: iconFontFamily, imageChar: icon, height: height, fill: fill, imageCharFill: textFill })),
h$1("g", { transform: "translate(".concat(-(width / 2) + (padding * 2) + height, " ").concat(-(height / 2) + padding, ")") },
h$1(TextLine, { text: text, fontFamily: fontFamily, height: fontSize, fill: textFill, anchor: "start", baseline: "hanging" })));
};
var Edge = function (_a) {
var label = _a.label, labelPos = _a.labelPos, _b = _a.labelFill, labelFill = _b === void 0 ? "black" : _b, _c = _a.labelHeight, labelHeight = _c === void 0 ? 12 : _c, path = _a.path, stroke = _a.stroke, strokeWidth = _a.strokeWidth, strokeDasharray = _a.strokeDasharray;
return h$1(p$1, null,
h$1("path", { d: path, stroke: stroke, style: { strokeWidth: strokeWidth, strokeDasharray: strokeDasharray } }),
label && labelPos && labelPos.length === 2 ?
h$1("g", { transform: "translate(".concat(labelPos[0], " ").concat(labelPos[1], ")") },
h$1(Text, { text: label, fill: labelFill, height: labelHeight })) : undefined);
};
function render(C, props, parent, replaceNode) {

@@ -505,66 +275,2 @@ P(h$1(C, props), parent, replaceNode);

var TextLine = function (_a) {
var text = _a.text, _b = _a.height, height = _b === void 0 ? 12 : _b, _c = _a.anchor, anchor = _c === void 0 ? "middle" : _c, _d = _a.baseline, baseline = _d === void 0 ? "middle" : _d, _e = _a.fontFamily, fontFamily = _e === void 0 ? "Verdana" : _e, _f = _a.fill, fill = _f === void 0 ? "black" : _f;
return h$1("text", { "font-family": fontFamily, "font-size": "".concat(height, "px"), "text-anchor": anchor, "dominant-baseline": baseline, fill: fill }, text);
};
var Text = function (_a) {
var text = _a.text, _b = _a.height, height = _b === void 0 ? 12 : _b, _c = _a.fontFamily, fontFamily = _c === void 0 ? "Verdana" : _c, _d = _a.fill, fill = _d === void 0 ? "black" : _d, onSizeUpdate = _a.onSizeUpdate;
var _e = p(0), totalWidth = _e[0], setTotalWidthUpdate = _e[1];
var _f = p(0), totalHeight = _f[0], setTotalHeightUpdate = _f[1];
h(function () {
onSizeUpdate && onSizeUpdate({ width: totalWidth, height: totalHeight });
}, [totalWidth, totalHeight, onSizeUpdate]);
var parts = F(function () {
return text.split("\n");
}, [text]);
var ts = F(function () {
return Utility.textSize(parts, fontFamily, height);
}, [fontFamily, height, parts]);
setTotalWidthUpdate(ts.width);
setTotalHeightUpdate(parts.length * (height + 2) - 2);
var yOffset = -(totalHeight / 2) + (height / 2);
var TextLines = F(function () {
return parts.map(function (p, i) {
return h$1("g", { key: i, transform: "translate(0 ".concat(yOffset + i * (height + 2), ")") },
h$1(TextLine, { text: p, height: height, fontFamily: fontFamily, fill: fill }));
});
}, [fill, fontFamily, height, parts, yOffset]);
return h$1(p$1, null, TextLines);
};
var TextBox = function (_a) {
var text = _a.text, _b = _a.height, height = _b === void 0 ? 12 : _b, _c = _a.fontFamily, fontFamily = _c === void 0 ? "Verdana" : _c, _d = _a.padding, padding = _d === void 0 ? 4 : _d, _e = _a.fill, fill = _e === void 0 ? "whitesmoke" : _e, _f = _a.stroke, stroke = _f === void 0 ? "lightgray" : _f, _g = _a.textFill, textFill = _g === void 0 ? "black" : _g, _h = _a.strokeWidth, strokeWidth = _h === void 0 ? 1 : _h, _j = _a.cornerRadius, cornerRadius = _j === void 0 ? 0 : _j, onSizeUpdate = _a.onSizeUpdate;
var _k = p(0), textWidth = _k[0], setTextWidthUpdate = _k[1];
var _l = p(0), textHeight = _l[0], setTextHeightUpdate = _l[1];
h(function () {
onSizeUpdate && onSizeUpdate({ width: textWidth, height: textHeight });
}, [textWidth, textHeight, onSizeUpdate]);
var onTextSizeUpdate = T(function (size) {
setTextWidthUpdate(size.width);
setTextHeightUpdate(size.height);
}, []);
var w = textWidth + padding * 2 + strokeWidth;
var h$2 = textHeight + padding * 2 + strokeWidth;
var textOffsetY = Math.floor(height / 10);
return h$1(p$1, null,
h$1(Rectangle, { width: w, height: h$2, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
h$1("g", { transform: "translate(0 ".concat(textOffsetY, ")") },
h$1(Text, { text: text, fontFamily: fontFamily, height: height, fill: textFill, onSizeUpdate: onTextSizeUpdate })));
};
var LabelledRect = function (_a) {
var text = _a.text, _b = _a.height, height = _b === void 0 ? 12 : _b, _c = _a.width, width = _c === void 0 ? 12 : _c, _d = _a.fontFamily, fontFamily = _d === void 0 ? "Verdana" : _d, _e = _a.fontSize, fontSize = _e === void 0 ? 10 : _e, _f = _a.padding, padding = _f === void 0 ? 3 : _f, _g = _a.fill, fill = _g === void 0 ? "whitesmoke" : _g, _h = _a.stroke, stroke = _h === void 0 ? "lightgray" : _h, _j = _a.textFill, textFill = _j === void 0 ? "black" : _j, _k = _a.strokeWidth, strokeWidth = _k === void 0 ? 1 : _k, _l = _a.cornerRadius, cornerRadius = _l === void 0 ? 0 : _l; _a.onSizeUpdate;
return h$1(p$1, null,
h$1(Rectangle, { width: width, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
h$1("g", { transform: "translate(".concat(-(width / 2) + padding, " ").concat(-(height / 2) + padding, ")") },
h$1(TextLine, { text: text, fontFamily: fontFamily, height: fontSize, fill: textFill, anchor: "start", baseline: "hanging" })));
};
var IconLabelledRect = function (_a) {
var icon = _a.icon, iconFontFamily = _a.iconFontFamily, text = _a.text, _b = _a.height, height = _b === void 0 ? 12 : _b, _c = _a.width, width = _c === void 0 ? 12 : _c, _d = _a.fontFamily, fontFamily = _d === void 0 ? "Verdana" : _d, _e = _a.fontSize, fontSize = _e === void 0 ? 10 : _e, _f = _a.padding, padding = _f === void 0 ? 3 : _f, _g = _a.fill, fill = _g === void 0 ? "whitesmoke" : _g, _h = _a.stroke, stroke = _h === void 0 ? "lightgray" : _h, _j = _a.textFill, textFill = _j === void 0 ? "black" : _j, _k = _a.strokeWidth, strokeWidth = _k === void 0 ? 1 : _k, _l = _a.cornerRadius, cornerRadius = _l === void 0 ? 0 : _l; _a.onSizeUpdate;
return h$1(p$1, null,
h$1(Rectangle, { width: width, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
h$1("g", { transform: "translate(".concat(-(width / 2) + padding, " ").concat(-(height / 2) + padding, ")") },
h$1(Icon, { shape: "square", imageFontFamily: iconFontFamily, imageChar: icon, height: height, fill: fill, imageCharFill: textFill })),
h$1("g", { transform: "translate(".concat(-(width / 2) + (padding * 2) + height, " ").concat(-(height / 2) + padding, ")") },
h$1(TextLine, { text: text, fontFamily: fontFamily, height: fontSize, fill: textFill, anchor: "start", baseline: "hanging" })));
};
var Annotations = function (_a) {

@@ -571,0 +277,0 @@ var x = _a.x, y = _a.y, _b = _a.annotationIDs, annotationIDs = _b === void 0 ? [] : _b, _c = _a.stepSize, stepSize = _c === void 0 ? -16 : _c;

(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@hpcc-js/common')) :
typeof define === 'function' && define.amd ? define(['exports', '@hpcc-js/common'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@hpcc-js/react"] = {}, global["@hpcc-js/common"]));
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@hpcc-js/common')) :
typeof define === 'function' && define.amd ? define(['exports', '@hpcc-js/common'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@hpcc-js/react"] = {}, global["@hpcc-js/common"]));
})(this, (function (exports, common) { 'use strict';
var PKG_NAME$1 = "@hpcc-js/react";
var PKG_VERSION$1 = "2.53.2";
var BUILD_VERSION$1 = "2.104.13";
var PKG_NAME$1 = "@hpcc-js/react";
var PKG_VERSION$1 = "2.53.3";
var BUILD_VERSION$1 = "2.104.14";
var PKG_NAME = "@hpcc-js/preact-shim";
var PKG_VERSION = "2.16.3";
var BUILD_VERSION = "2.104.13";
var PKG_NAME = "@hpcc-js/preact-shim";
var PKG_VERSION = "2.16.3";
var BUILD_VERSION = "2.104.14";
var n,l$1,u$1,t$1,o$1,f$1={},e$1=[],c$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function s(n,l){for(var u in l)n[u]=l[u];return n}function a$1(n){var l=n.parentNode;l&&l.removeChild(n);}function h$1(l,u,i){var t,o,r,f={};for(r in u)"key"==r?t=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return v$1(l,f,t,o,null)}function v$1(n,i,t,o,r){var f={type:n,props:i,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++u$1:r};return null==r&&null!=l$1.vnode&&l$1.vnode(f),f}function p$1(n){return n.children}function d$1(n,l){this.props=n,this.context=l;}function _(n,l){if(null==l)return n.__?_(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?_(n):null}function k$1(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return k$1(n)}}function b$1(n){(!n.__d&&(n.__d=!0)&&t$1.push(n)&&!g$1.__r++||o$1!==l$1.debounceRendering)&&((o$1=l$1.debounceRendering)||setTimeout)(g$1);}function g$1(){for(var n;g$1.__r=t$1.length;)n=t$1.sort(function(n,l){return n.__v.__b-l.__v.__b}),t$1=[],n.some(function(n){var l,u,i,t,o,r;n.__d&&(o=(t=(l=n).__v).__e,(r=l.__P)&&(u=[],(i=s({},t)).__v=t.__v+1,j$1(r,t,i,l.__n,void 0!==r.ownerSVGElement,null!=t.__h?[o]:null,u,null==o?_(t):o,t.__h),z$1(u,t),t.__e!=o&&k$1(t)));});}function w$1(n,l,u,i,t,o,r,c,s,a){var h,y,d,k,b,g,w,x=i&&i.__k||e$1,C=x.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(k=u.__k[h]=null==(k=l[h])||"boolean"==typeof k?null:"string"==typeof k||"number"==typeof k||"bigint"==typeof k?v$1(null,k,null,null,k):Array.isArray(k)?v$1(p$1,{children:k},null,null,null):k.__b>0?v$1(k.type,k.props,k.key,k.ref?k.ref:null,k.__v):k)){if(k.__=u,k.__b=u.__b+1,null===(d=x[h])||d&&k.key==d.key&&k.type===d.type)x[h]=void 0;else for(y=0;y<C;y++){if((d=x[y])&&k.key==d.key&&k.type===d.type){x[y]=void 0;break}d=null;}j$1(n,k,d=d||f$1,t,o,r,c,s,a),b=k.__e,(y=k.ref)&&d.ref!=y&&(w||(w=[]),d.ref&&w.push(d.ref,null,k),w.push(y,k.__c||b,k)),null!=b?(null==g&&(g=b),"function"==typeof k.type&&k.__k===d.__k?k.__d=s=m$1(k,s,n):s=A(n,k,d,x,b,s),"function"==typeof u.type&&(u.__d=s)):s&&d.__e==s&&s.parentNode!=n&&(s=_(d));}for(u.__e=g,h=C;h--;)null!=x[h]&&N(x[h],x[h]);if(w)for(h=0;h<w.length;h++)M(w[h],w[++h],w[++h]);}function m$1(n,l,u){for(var i,t=n.__k,o=0;t&&o<t.length;o++)(i=t[o])&&(i.__=n,l="function"==typeof i.type?m$1(i,l,u):A(u,i,i,t,i.__e,l));return l}function A(n,l,u,i,t,o){var r,f,e;if(void 0!==l.__d)r=l.__d,l.__d=void 0;else if(null==u||t!=o||null==t.parentNode)n:if(null==o||o.parentNode!==n)n.appendChild(t),r=null;else {for(f=o,e=0;(f=f.nextSibling)&&e<i.length;e+=2)if(f==t)break n;n.insertBefore(t,o),r=o;}return void 0!==r?r:t.nextSibling}function C(n,l,u,i,t){var o;for(o in u)"children"===o||"key"===o||o in l||H(n,o,null,u[o],i);for(o in l)t&&"function"!=typeof l[o]||"children"===o||"key"===o||"value"===o||"checked"===o||u[o]===l[o]||H(n,o,l[o],u[o],i);}function $(n,l,u){"-"===l[0]?n.setProperty(l,u):n[l]=null==u?"":"number"!=typeof u||c$1.test(l)?u:u+"px";}function H(n,l,u,i,t){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof i&&(n.style.cssText=i=""),i)for(l in i)u&&l in u||$(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||$(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?i||n.addEventListener(l,o?T$1:I,o):n.removeEventListener(l,o?T$1:I,o);else if("dangerouslySetInnerHTML"!==l){if(t)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&-1==l.indexOf("-")?n.removeAttribute(l):n.setAttribute(l,u));}}function I(n){this.l[n.type+!1](l$1.event?l$1.event(n):n);}function T$1(n){this.l[n.type+!0](l$1.event?l$1.event(n):n);}function j$1(n,u,i,t,o,r,f,e,c){var a,h,v,y,_,k,b,g,m,x,A,C,$,H,I,T=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,r=[e]),(a=l$1.__b)&&a(u);try{n:if("function"==typeof T){if(g=u.props,m=(a=T.contextType)&&t[a.__c],x=a?m?m.props.value:a.__:t,i.__c?b=(h=u.__c=i.__c).__=h.__E:("prototype"in T&&T.prototype.render?u.__c=h=new T(g,x):(u.__c=h=new d$1(g,x),h.constructor=T,h.render=O),m&&m.sub(h),h.props=g,h.state||(h.state={}),h.context=x,h.__n=t,v=h.__d=!0,h.__h=[],h._sb=[]),null==h.__s&&(h.__s=h.state),null!=T.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=s({},h.__s)),s(h.__s,T.getDerivedStateFromProps(g,h.__s))),y=h.props,_=h.state,v)null==T.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(null==T.getDerivedStateFromProps&&g!==y&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(g,x),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(g,h.__s,x)||u.__v===i.__v){for(h.props=g,h.state=h.__s,u.__v!==i.__v&&(h.__d=!1),h.__v=u,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u);}),A=0;A<h._sb.length;A++)h.__h.push(h._sb[A]);h._sb=[],h.__h.length&&f.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(g,h.__s,x),null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(y,_,k);});}if(h.context=x,h.props=g,h.__v=u,h.__P=n,C=l$1.__r,$=0,"prototype"in T&&T.prototype.render){for(h.state=h.__s,h.__d=!1,C&&C(u),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[];}else do{h.__d=!1,C&&C(u),a=h.render(h.props,h.state,h.context),h.state=h.__s;}while(h.__d&&++$<25);h.state=h.__s,null!=h.getChildContext&&(t=s(s({},t),h.getChildContext())),v||null==h.getSnapshotBeforeUpdate||(k=h.getSnapshotBeforeUpdate(y,_)),I=null!=a&&a.type===p$1&&null==a.key?a.props.children:a,w$1(n,Array.isArray(I)?I:[I],u,i,t,o,r,f,e,c),h.base=u.__e,u.__h=null,h.__h.length&&f.push(h),b&&(h.__E=h.__=null),h.__e=!1;}else null==r&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=L(i.__e,u,i,t,o,r,f,c);(a=l$1.diffed)&&a(u);}catch(n){u.__v=null,(c||null!=r)&&(u.__e=e,u.__h=!!c,r[r.indexOf(e)]=null),l$1.__e(n,u,i);}}function z$1(n,u){l$1.__c&&l$1.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$1.__e(n,u.__v);}});}function L(l,u,i,t,o,r,e,c){var s,h,v,y=i.props,p=u.props,d=u.type,k=0;if("svg"===d&&(o=!0),null!=r)for(;k<r.length;k++)if((s=r[k])&&"setAttribute"in s==!!d&&(d?s.localName===d:3===s.nodeType)){l=s,r[k]=null;break}if(null==l){if(null===d)return document.createTextNode(p);l=o?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,p.is&&p),r=null,c=!1;}if(null===d)y===p||c&&l.data===p||(l.data=p);else {if(r=r&&n.call(l.childNodes),h=(y=i.props||f$1).dangerouslySetInnerHTML,v=p.dangerouslySetInnerHTML,!c){if(null!=r)for(y={},k=0;k<l.attributes.length;k++)y[l.attributes[k].name]=l.attributes[k].value;(v||h)&&(v&&(h&&v.__html==h.__html||v.__html===l.innerHTML)||(l.innerHTML=v&&v.__html||""));}if(C(l,p,y,o,c),v)u.__k=[];else if(k=u.props.children,w$1(l,Array.isArray(k)?k:[k],u,i,t,o&&"foreignObject"!==d,r,e,r?r[0]:i.__k&&_(i,0),c),null!=r)for(k=r.length;k--;)null!=r[k]&&a$1(r[k]);c||("value"in p&&void 0!==(k=p.value)&&(k!==l.value||"progress"===d&&!k||"option"===d&&k!==y.value)&&H(l,"value",k,y.value,!1),"checked"in p&&void 0!==(k=p.checked)&&k!==l.checked&&H(l,"checked",k,y.checked,!1));}return l}function M(n,u,i){try{"function"==typeof n?n(u):n.current=u;}catch(n){l$1.__e(n,i);}}function N(n,u,i){var t,o;if(l$1.unmount&&l$1.unmount(n),(t=n.ref)&&(t.current&&t.current!==n.__e||M(t,null,u)),null!=(t=n.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount();}catch(n){l$1.__e(n,u);}t.base=t.__P=null,n.__c=void 0;}if(t=n.__k)for(o=0;o<t.length;o++)t[o]&&N(t[o],u,i||"function"!=typeof n.type);i||null==n.__e||a$1(n.__e),n.__=n.__e=n.__d=void 0;}function O(n,l,u){return this.constructor(n,u)}function P(u,i,t){var o,r,e;l$1.__&&l$1.__(u,i),r=(o="function"==typeof t)?null:t&&t.__k||i.__k,e=[],j$1(i,u=(!o&&t||i).__k=h$1(p$1,null,[u]),r||f$1,f$1,void 0!==i.ownerSVGElement,!o&&t?[t]:r?null:i.firstChild?n.call(i.childNodes):null,e,!o&&t?t:r?r.__e:i.firstChild,o),z$1(e,u);}n=e$1.slice,l$1={__e:function(n,l,u,i){for(var t,o,r;l=l.__;)if((t=l.__c)&&!t.__)try{if((o=t.constructor)&&null!=o.getDerivedStateFromError&&(t.setState(o.getDerivedStateFromError(n)),r=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(n,i||{}),r=t.__d),r)return t.__E=t}catch(l){n=l;}throw n}},u$1=0,d$1.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=s({},this.state),"function"==typeof n&&(n=n(s({},u),this.props)),n&&s(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),b$1(this));},d$1.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),b$1(this));},d$1.prototype.render=p$1,t$1=[],g$1.__r=0;
var n,l$1,u$1,t$1,o$1,f$1={},e$1=[],c$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function s(n,l){for(var u in l)n[u]=l[u];return n}function a$1(n){var l=n.parentNode;l&&l.removeChild(n);}function h$1(l,u,i){var t,o,r,f={};for(r in u)"key"==r?t=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return v$1(l,f,t,o,null)}function v$1(n,i,t,o,r){var f={type:n,props:i,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++u$1:r};return null==r&&null!=l$1.vnode&&l$1.vnode(f),f}function p$1(n){return n.children}function d$1(n,l){this.props=n,this.context=l;}function _(n,l){if(null==l)return n.__?_(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?_(n):null}function k$1(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return k$1(n)}}function b$1(n){(!n.__d&&(n.__d=!0)&&t$1.push(n)&&!g$1.__r++||o$1!==l$1.debounceRendering)&&((o$1=l$1.debounceRendering)||setTimeout)(g$1);}function g$1(){for(var n;g$1.__r=t$1.length;)n=t$1.sort(function(n,l){return n.__v.__b-l.__v.__b}),t$1=[],n.some(function(n){var l,u,i,t,o,r;n.__d&&(o=(t=(l=n).__v).__e,(r=l.__P)&&(u=[],(i=s({},t)).__v=t.__v+1,j$1(r,t,i,l.__n,void 0!==r.ownerSVGElement,null!=t.__h?[o]:null,u,null==o?_(t):o,t.__h),z$1(u,t),t.__e!=o&&k$1(t)));});}function w$1(n,l,u,i,t,o,r,c,s,a){var h,y,d,k,b,g,w,x=i&&i.__k||e$1,C=x.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(k=u.__k[h]=null==(k=l[h])||"boolean"==typeof k?null:"string"==typeof k||"number"==typeof k||"bigint"==typeof k?v$1(null,k,null,null,k):Array.isArray(k)?v$1(p$1,{children:k},null,null,null):k.__b>0?v$1(k.type,k.props,k.key,k.ref?k.ref:null,k.__v):k)){if(k.__=u,k.__b=u.__b+1,null===(d=x[h])||d&&k.key==d.key&&k.type===d.type)x[h]=void 0;else for(y=0;y<C;y++){if((d=x[y])&&k.key==d.key&&k.type===d.type){x[y]=void 0;break}d=null;}j$1(n,k,d=d||f$1,t,o,r,c,s,a),b=k.__e,(y=k.ref)&&d.ref!=y&&(w||(w=[]),d.ref&&w.push(d.ref,null,k),w.push(y,k.__c||b,k)),null!=b?(null==g&&(g=b),"function"==typeof k.type&&k.__k===d.__k?k.__d=s=m$1(k,s,n):s=A(n,k,d,x,b,s),"function"==typeof u.type&&(u.__d=s)):s&&d.__e==s&&s.parentNode!=n&&(s=_(d));}for(u.__e=g,h=C;h--;)null!=x[h]&&N(x[h],x[h]);if(w)for(h=0;h<w.length;h++)M(w[h],w[++h],w[++h]);}function m$1(n,l,u){for(var i,t=n.__k,o=0;t&&o<t.length;o++)(i=t[o])&&(i.__=n,l="function"==typeof i.type?m$1(i,l,u):A(u,i,i,t,i.__e,l));return l}function A(n,l,u,i,t,o){var r,f,e;if(void 0!==l.__d)r=l.__d,l.__d=void 0;else if(null==u||t!=o||null==t.parentNode)n:if(null==o||o.parentNode!==n)n.appendChild(t),r=null;else {for(f=o,e=0;(f=f.nextSibling)&&e<i.length;e+=2)if(f==t)break n;n.insertBefore(t,o),r=o;}return void 0!==r?r:t.nextSibling}function C(n,l,u,i,t){var o;for(o in u)"children"===o||"key"===o||o in l||H(n,o,null,u[o],i);for(o in l)t&&"function"!=typeof l[o]||"children"===o||"key"===o||"value"===o||"checked"===o||u[o]===l[o]||H(n,o,l[o],u[o],i);}function $(n,l,u){"-"===l[0]?n.setProperty(l,u):n[l]=null==u?"":"number"!=typeof u||c$1.test(l)?u:u+"px";}function H(n,l,u,i,t){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof i&&(n.style.cssText=i=""),i)for(l in i)u&&l in u||$(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||$(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?i||n.addEventListener(l,o?T$1:I,o):n.removeEventListener(l,o?T$1:I,o);else if("dangerouslySetInnerHTML"!==l){if(t)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&-1==l.indexOf("-")?n.removeAttribute(l):n.setAttribute(l,u));}}function I(n){this.l[n.type+!1](l$1.event?l$1.event(n):n);}function T$1(n){this.l[n.type+!0](l$1.event?l$1.event(n):n);}function j$1(n,u,i,t,o,r,f,e,c){var a,h,v,y,_,k,b,g,m,x,A,C,$,H,I,T=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,r=[e]),(a=l$1.__b)&&a(u);try{n:if("function"==typeof T){if(g=u.props,m=(a=T.contextType)&&t[a.__c],x=a?m?m.props.value:a.__:t,i.__c?b=(h=u.__c=i.__c).__=h.__E:("prototype"in T&&T.prototype.render?u.__c=h=new T(g,x):(u.__c=h=new d$1(g,x),h.constructor=T,h.render=O),m&&m.sub(h),h.props=g,h.state||(h.state={}),h.context=x,h.__n=t,v=h.__d=!0,h.__h=[],h._sb=[]),null==h.__s&&(h.__s=h.state),null!=T.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=s({},h.__s)),s(h.__s,T.getDerivedStateFromProps(g,h.__s))),y=h.props,_=h.state,v)null==T.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(null==T.getDerivedStateFromProps&&g!==y&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(g,x),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(g,h.__s,x)||u.__v===i.__v){for(h.props=g,h.state=h.__s,u.__v!==i.__v&&(h.__d=!1),h.__v=u,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u);}),A=0;A<h._sb.length;A++)h.__h.push(h._sb[A]);h._sb=[],h.__h.length&&f.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(g,h.__s,x),null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(y,_,k);});}if(h.context=x,h.props=g,h.__v=u,h.__P=n,C=l$1.__r,$=0,"prototype"in T&&T.prototype.render){for(h.state=h.__s,h.__d=!1,C&&C(u),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[];}else do{h.__d=!1,C&&C(u),a=h.render(h.props,h.state,h.context),h.state=h.__s;}while(h.__d&&++$<25);h.state=h.__s,null!=h.getChildContext&&(t=s(s({},t),h.getChildContext())),v||null==h.getSnapshotBeforeUpdate||(k=h.getSnapshotBeforeUpdate(y,_)),I=null!=a&&a.type===p$1&&null==a.key?a.props.children:a,w$1(n,Array.isArray(I)?I:[I],u,i,t,o,r,f,e,c),h.base=u.__e,u.__h=null,h.__h.length&&f.push(h),b&&(h.__E=h.__=null),h.__e=!1;}else null==r&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=L(i.__e,u,i,t,o,r,f,c);(a=l$1.diffed)&&a(u);}catch(n){u.__v=null,(c||null!=r)&&(u.__e=e,u.__h=!!c,r[r.indexOf(e)]=null),l$1.__e(n,u,i);}}function z$1(n,u){l$1.__c&&l$1.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$1.__e(n,u.__v);}});}function L(l,u,i,t,o,r,e,c){var s,h,v,y=i.props,p=u.props,d=u.type,k=0;if("svg"===d&&(o=!0),null!=r)for(;k<r.length;k++)if((s=r[k])&&"setAttribute"in s==!!d&&(d?s.localName===d:3===s.nodeType)){l=s,r[k]=null;break}if(null==l){if(null===d)return document.createTextNode(p);l=o?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,p.is&&p),r=null,c=!1;}if(null===d)y===p||c&&l.data===p||(l.data=p);else {if(r=r&&n.call(l.childNodes),h=(y=i.props||f$1).dangerouslySetInnerHTML,v=p.dangerouslySetInnerHTML,!c){if(null!=r)for(y={},k=0;k<l.attributes.length;k++)y[l.attributes[k].name]=l.attributes[k].value;(v||h)&&(v&&(h&&v.__html==h.__html||v.__html===l.innerHTML)||(l.innerHTML=v&&v.__html||""));}if(C(l,p,y,o,c),v)u.__k=[];else if(k=u.props.children,w$1(l,Array.isArray(k)?k:[k],u,i,t,o&&"foreignObject"!==d,r,e,r?r[0]:i.__k&&_(i,0),c),null!=r)for(k=r.length;k--;)null!=r[k]&&a$1(r[k]);c||("value"in p&&void 0!==(k=p.value)&&(k!==l.value||"progress"===d&&!k||"option"===d&&k!==y.value)&&H(l,"value",k,y.value,!1),"checked"in p&&void 0!==(k=p.checked)&&k!==l.checked&&H(l,"checked",k,y.checked,!1));}return l}function M(n,u,i){try{"function"==typeof n?n(u):n.current=u;}catch(n){l$1.__e(n,i);}}function N(n,u,i){var t,o;if(l$1.unmount&&l$1.unmount(n),(t=n.ref)&&(t.current&&t.current!==n.__e||M(t,null,u)),null!=(t=n.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount();}catch(n){l$1.__e(n,u);}t.base=t.__P=null,n.__c=void 0;}if(t=n.__k)for(o=0;o<t.length;o++)t[o]&&N(t[o],u,i||"function"!=typeof n.type);i||null==n.__e||a$1(n.__e),n.__=n.__e=n.__d=void 0;}function O(n,l,u){return this.constructor(n,u)}function P(u,i,t){var o,r,e;l$1.__&&l$1.__(u,i),r=(o="function"==typeof t)?null:t&&t.__k||i.__k,e=[],j$1(i,u=(!o&&t||i).__k=h$1(p$1,null,[u]),r||f$1,f$1,void 0!==i.ownerSVGElement,!o&&t?[t]:r?null:i.firstChild?n.call(i.childNodes):null,e,!o&&t?t:r?r.__e:i.firstChild,o),z$1(e,u);}n=e$1.slice,l$1={__e:function(n,l,u,i){for(var t,o,r;l=l.__;)if((t=l.__c)&&!t.__)try{if((o=t.constructor)&&null!=o.getDerivedStateFromError&&(t.setState(o.getDerivedStateFromError(n)),r=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(n,i||{}),r=t.__d),r)return t.__E=t}catch(l){n=l;}throw n}},u$1=0,d$1.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=s({},this.state),"function"==typeof n&&(n=n(s({},u),this.props)),n&&s(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),b$1(this));},d$1.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),b$1(this));},d$1.prototype.render=p$1,t$1=[],g$1.__r=0;
var t,r,u,i,o=0,f=[],c=[],e=l$1.__b,a=l$1.__r,v=l$1.diffed,l=l$1.__c,m=l$1.unmount;function d(t,u){l$1.__h&&l$1.__h(r,t,o||u),o=0;var i=r.__H||(r.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({__V:c}),i.__[t]}function p(n){return o=1,y$1(B,n)}function y$1(n,u,i){var o=d(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):B(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}));}],o.__c=r,!r.u)){r.u=!0;var f=r.shouldComponentUpdate;r.shouldComponentUpdate=function(n,t,r){if(!o.__c.__H)return !0;var u=o.__c.__H.__.filter(function(n){return n.__c});if(u.every(function(n){return !n.__N}))return !f||f.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0);}}),!(!i&&o.__c.props===n)&&(!f||f.call(this,n,t,r))};}return o.__N||o.__}function h(u,i){var o=d(t++,3);!l$1.__s&&z(o.__H,i)&&(o.__=u,o.i=i,r.__H.__h.push(o));}function F(n,r){var u=d(t++,7);return z(u.__H,r)?(u.__V=n(),u.i=r,u.__h=n,u.__V):u.__}function T(n,t){return o=8,F(function(){return n},t)}function b(){for(var t;t=f.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(k),t.__H.__h.forEach(w),t.__H.__h=[];}catch(r){t.__H.__h=[],l$1.__e(r,t.__v);}}l$1.__b=function(n){"function"!=typeof n.type||n.__m||null===n.__?n.__m||(n.__m=n.__&&n.__.__m?n.__.__m:""):n.__m=(n.__&&n.__.__m?n.__.__m:"")+(n.__&&n.__.__k?n.__.__k.indexOf(n):0),r=null,e&&e(n);},l$1.__r=function(n){a&&a(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=c,n.__N=n.i=void 0;})):(i.__h.forEach(k),i.__h.forEach(w),i.__h=[])),u=r;},l$1.diffed=function(t){v&&v(t);var o=t.__c;o&&o.__H&&(o.__H.__h.length&&(1!==f.push(o)&&i===l$1.requestAnimationFrame||((i=l$1.requestAnimationFrame)||j)(b)),o.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==c&&(n.__=n.__V),n.i=void 0,n.__V=c;})),u=r=null;},l$1.__c=function(t,r){r.some(function(t){try{t.__h.forEach(k),t.__h=t.__h.filter(function(n){return !n.__||w(n)});}catch(u){r.some(function(n){n.__h&&(n.__h=[]);}),r=[],l$1.__e(u,t.__v);}}),l&&l(t,r);},l$1.unmount=function(t){m&&m(t);var r,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{k(n);}catch(n){r=n;}}),u.__H=void 0,r&&l$1.__e(r,u.__v));};var g="function"==typeof requestAnimationFrame;function j(n){var t,r=function(){clearTimeout(u),g&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);g&&(t=requestAnimationFrame(r));}function k(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t;}function w(n){var t=r;n.__c=n.__(),r=t;}function z(n,t){return !n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function B(n,t){return "function"==typeof t?t(n):t}
var t,r,u,i,o=0,f=[],c=[],e=l$1.__b,a=l$1.__r,v=l$1.diffed,l=l$1.__c,m=l$1.unmount;function d(t,u){l$1.__h&&l$1.__h(r,t,o||u),o=0;var i=r.__H||(r.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({__V:c}),i.__[t]}function p(n){return o=1,y(B,n)}function y(n,u,i){var o=d(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):B(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}));}],o.__c=r,!r.u)){r.u=!0;var f=r.shouldComponentUpdate;r.shouldComponentUpdate=function(n,t,r){if(!o.__c.__H)return !0;var u=o.__c.__H.__.filter(function(n){return n.__c});if(u.every(function(n){return !n.__N}))return !f||f.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0);}}),!(!i&&o.__c.props===n)&&(!f||f.call(this,n,t,r))};}return o.__N||o.__}function h(u,i){var o=d(t++,3);!l$1.__s&&z(o.__H,i)&&(o.__=u,o.i=i,r.__H.__h.push(o));}function F(n,r){var u=d(t++,7);return z(u.__H,r)?(u.__V=n(),u.i=r,u.__h=n,u.__V):u.__}function T(n,t){return o=8,F(function(){return n},t)}function b(){for(var t;t=f.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(k),t.__H.__h.forEach(w),t.__H.__h=[];}catch(r){t.__H.__h=[],l$1.__e(r,t.__v);}}l$1.__b=function(n){"function"!=typeof n.type||n.__m||null===n.__?n.__m||(n.__m=n.__&&n.__.__m?n.__.__m:""):n.__m=(n.__&&n.__.__m?n.__.__m:"")+(n.__&&n.__.__k?n.__.__k.indexOf(n):0),r=null,e&&e(n);},l$1.__r=function(n){a&&a(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=c,n.__N=n.i=void 0;})):(i.__h.forEach(k),i.__h.forEach(w),i.__h=[])),u=r;},l$1.diffed=function(t){v&&v(t);var o=t.__c;o&&o.__H&&(o.__H.__h.length&&(1!==f.push(o)&&i===l$1.requestAnimationFrame||((i=l$1.requestAnimationFrame)||j)(b)),o.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==c&&(n.__=n.__V),n.i=void 0,n.__V=c;})),u=r=null;},l$1.__c=function(t,r){r.some(function(t){try{t.__h.forEach(k),t.__h=t.__h.filter(function(n){return !n.__||w(n)});}catch(u){r.some(function(n){n.__h&&(n.__h=[]);}),r=[],l$1.__e(u,t.__v);}}),l&&l(t,r);},l$1.unmount=function(t){m&&m(t);var r,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{k(n);}catch(n){r=n;}}),u.__H=void 0,r&&l$1.__e(r,u.__v));};var g="function"==typeof requestAnimationFrame;function j(n){var t,r=function(){clearTimeout(u),g&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);g&&(t=requestAnimationFrame(r));}function k(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t;}function w(n){var t=r;n.__c=n.__(),r=t;}function z(n,t){return !n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function B(n,t){return "function"==typeof t?t(n):t}
var index_es6 = /*#__PURE__*/Object.freeze({
__proto__: null,
BUILD_VERSION: BUILD_VERSION,
Component: d$1,
Fragment: p$1,
PKG_NAME: PKG_NAME,
PKG_VERSION: PKG_VERSION,
createElement: h$1,
h: h$1,
render: P,
useCallback: T,
useEffect: h,
useMemo: F,
useReducer: y$1,
useState: p
});
var index_es6 = /*#__PURE__*/Object.freeze({
__proto__: null,
BUILD_VERSION: BUILD_VERSION,
Component: d$1,
Fragment: p$1,
PKG_NAME: PKG_NAME,
PKG_VERSION: PKG_VERSION,
createElement: h$1,
h: h$1,
render: P,
useCallback: T,
useEffect: h,
useMemo: F,
useReducer: y,
useState: p
});
var pi = Math.PI,
tau = 2 * pi,
epsilon = 1e-6,
tauEpsilon = tau - epsilon;
/******************************************************************************
Copyright (c) Microsoft Corporation.
function Path() {
this._x0 = this._y0 = // start of current subpath
this._x1 = this._y1 = null; // end of current subpath
this._ = "";
}
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
function path() {
return new Path;
}
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise */
Path.prototype = path.prototype = {
constructor: Path,
moveTo: function(x, y) {
this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y);
},
closePath: function() {
if (this._x1 !== null) {
this._x1 = this._x0, this._y1 = this._y0;
this._ += "Z";
}
},
lineTo: function(x, y) {
this._ += "L" + (this._x1 = +x) + "," + (this._y1 = +y);
},
quadraticCurveTo: function(x1, y1, x, y) {
this._ += "Q" + (+x1) + "," + (+y1) + "," + (this._x1 = +x) + "," + (this._y1 = +y);
},
bezierCurveTo: function(x1, y1, x2, y2, x, y) {
this._ += "C" + (+x1) + "," + (+y1) + "," + (+x2) + "," + (+y2) + "," + (this._x1 = +x) + "," + (this._y1 = +y);
},
arcTo: function(x1, y1, x2, y2, r) {
x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;
var x0 = this._x1,
y0 = this._y1,
x21 = x2 - x1,
y21 = y2 - y1,
x01 = x0 - x1,
y01 = y0 - y1,
l01_2 = x01 * x01 + y01 * y01;
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
// Is the radius negative? Error.
if (r < 0) throw new Error("negative radius: " + r);
// Is this path empty? Move to (x1,y1).
if (this._x1 === null) {
this._ += "M" + (this._x1 = x1) + "," + (this._y1 = y1);
}
// Or, is (x1,y1) coincident with (x0,y0)? Do nothing.
else if (!(l01_2 > epsilon));
// Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?
// Equivalently, is (x1,y1) coincident with (x2,y2)?
// Or, is the radius zero? Line to (x1,y1).
else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {
this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1);
}
// Otherwise, draw an arc!
else {
var x20 = x2 - x0,
y20 = y2 - y0,
l21_2 = x21 * x21 + y21 * y21,
l20_2 = x20 * x20 + y20 * y20,
l21 = Math.sqrt(l21_2),
l01 = Math.sqrt(l01_2),
l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),
t01 = l / l01,
t21 = l / l21;
// If the start tangent is not coincident with (x0,y0), line to.
if (Math.abs(t01 - 1) > epsilon) {
this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01);
}
this._ += "A" + r + "," + r + ",0,0," + (+(y01 * x20 > x01 * y20)) + "," + (this._x1 = x1 + t21 * x21) + "," + (this._y1 = y1 + t21 * y21);
}
},
arc: function(x, y, r, a0, a1, ccw) {
x = +x, y = +y, r = +r, ccw = !!ccw;
var dx = r * Math.cos(a0),
dy = r * Math.sin(a0),
x0 = x + dx,
y0 = y + dy,
cw = 1 ^ ccw,
da = ccw ? a0 - a1 : a1 - a0;
// Is the radius negative? Error.
if (r < 0) throw new Error("negative radius: " + r);
// Is this path empty? Move to (x0,y0).
if (this._x1 === null) {
this._ += "M" + x0 + "," + y0;
}
// Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).
else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {
this._ += "L" + x0 + "," + y0;
}
// Is this arc empty? We’re done.
if (!r) return;
// Does the angle go the wrong way? Flip the direction.
if (da < 0) da = da % tau + tau;
// Is this a complete circle? Draw two arcs to complete the circle.
if (da > tauEpsilon) {
this._ += "A" + r + "," + r + ",0,1," + cw + "," + (x - dx) + "," + (y - dy) + "A" + r + "," + r + ",0,1," + cw + "," + (this._x1 = x0) + "," + (this._y1 = y0);
}
// Is this arc non-empty? Draw an arc!
else if (da > epsilon) {
this._ += "A" + r + "," + r + ",0," + (+(da >= pi)) + "," + cw + "," + (this._x1 = x + r * Math.cos(a1)) + "," + (this._y1 = y + r * Math.sin(a1));
}
},
rect: function(x, y, w, h) {
this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y) + "h" + (+w) + "v" + (+h) + "h" + (-w) + "Z";
},
toString: function() {
return this._;
function __extends(d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
};
function constant(x) {
return function constant() {
return x;
var __assign = function() {
__assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
}
function Linear(context) {
this._context = context;
}
Linear.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._point = 0;
},
lineEnd: function() {
if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
this._line = 1 - this._line;
},
point: function(x, y) {
x = +x, y = +y;
switch (this._point) {
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
case 1: this._point = 2; // proceed
default: this._context.lineTo(x, y); break;
}
function __decorate(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
};
function curveLinear(context) {
return new Linear(context);
}
function x(p) {
return p[0];
}
function y(p) {
return p[1];
}
function d3Line() {
var x$1 = x,
y$1 = y,
defined = constant(true),
context = null,
curve = curveLinear,
output = null;
function line(data) {
var i,
n = data.length,
d,
defined0 = false,
buffer;
if (context == null) output = curve(buffer = path());
for (i = 0; i <= n; ++i) {
if (!(i < n && defined(d = data[i], i, data)) === defined0) {
if (defined0 = !defined0) output.lineStart();
else output.lineEnd();
}
if (defined0) output.point(+x$1(d, i, data), +y$1(d, i, data));
}
if (buffer) return output = null, buffer + "" || null;
function __metadata(metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}
line.x = function(_) {
return arguments.length ? (x$1 = typeof _ === "function" ? _ : constant(+_), line) : x$1;
var ImageChar = function (_a) {
var x = _a.x, _b = _a.y, y = _b === void 0 ? 0 : _b, _c = _a.height, height = _c === void 0 ? 12 : _c, fill = _a.fill, stroke = _a.stroke, _d = _a.fontFamily, fontFamily = _d === void 0 ? "FontAwesome" : _d, _e = _a.char, char = _e === void 0 ? "" : _e;
var renderChar = F(function () {
return fontFamily === "FontAwesome" ? common.Utility.faChar(char) : char;
}, [char, fontFamily]);
return h$1("text", { x: x, y: y, fill: fill, stroke: stroke, "font-family": fontFamily, "font-size": "".concat(height, "px"), "dominant-baseline": "middle", style: "text-anchor: middle;alignment-baseline:middle;" }, renderChar);
};
line.y = function(_) {
return arguments.length ? (y$1 = typeof _ === "function" ? _ : constant(+_), line) : y$1;
var Circle = function (_a) {
var _b = _a.radius, radius = _b === void 0 ? 32 : _b, _c = _a.fill, fill = _c === void 0 ? "navy" : _c, _d = _a.stroke, stroke = _d === void 0 ? fill : _d, _e = _a.strokeWidth, strokeWidth = _e === void 0 ? 1 : _e, shapeRendering = _a.shapeRendering;
return h$1("circle", { r: radius, fill: fill, stroke: stroke, "stroke-width": strokeWidth, "shape-rendering": shapeRendering });
};
var Square = function (_a) {
var _b = _a.radius, radius = _b === void 0 ? 30 : _b, _c = _a.cornerRadius, cornerRadius = _c === void 0 ? 0 : _c, _d = _a.fill, fill = _d === void 0 ? "white" : _d, stroke = _a.stroke, _e = _a.strokeWidth, strokeWidth = _e === void 0 ? 1 : _e, shapeRendering = _a.shapeRendering;
return h$1("rect", { x: -radius, y: -radius, rx: cornerRadius, ry: cornerRadius, width: radius * 2, height: radius * 2, fill: fill, stroke: stroke || fill, "stroke-width": strokeWidth, "shape-rendering": shapeRendering });
};
var Rectangle = function (_a) {
var _b = _a.width, width = _b === void 0 ? 30 : _b, _c = _a.height, height = _c === void 0 ? 30 : _c, _d = _a.cornerRadius, cornerRadius = _d === void 0 ? 0 : _d, _e = _a.fill, fill = _e === void 0 ? "white" : _e, _f = _a.stroke, stroke = _f === void 0 ? "black" : _f, _g = _a.strokeWidth, strokeWidth = _g === void 0 ? 1 : _g, shapeRendering = _a.shapeRendering;
return h$1("rect", { x: -width / 2, y: -height / 2, rx: cornerRadius, ry: cornerRadius, width: width, height: height, fill: fill, stroke: stroke || fill, "stroke-width": strokeWidth, "shape-rendering": shapeRendering });
};
var Shape = function (_a) {
var _b = _a.shape, shape = _b === void 0 ? "circle" : _b, _c = _a.height, height = _c === void 0 ? 128 : _c, width = _a.width, fill = _a.fill, stroke = _a.stroke, _d = _a.strokeWidth, strokeWidth = _d === void 0 ? 1 : _d, shapeRendering = _a.shapeRendering, cornerRadius = _a.cornerRadius;
switch (shape) {
case "square":
return h$1(Square, { radius: height / 2, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering, cornerRadius: cornerRadius });
case "rectangle":
return h$1(Rectangle, { width: width !== null && width !== void 0 ? width : height, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering, cornerRadius: cornerRadius });
case "circle":
default:
return h$1(Circle, { radius: height / 2, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering });
}
};
line.defined = function(_) {
return arguments.length ? (defined = typeof _ === "function" ? _ : constant(!!_), line) : defined;
var Icon = function (_a) {
var _b = _a.shape, shape = _b === void 0 ? "circle" : _b, width = _a.width, _c = _a.height, height = _c === void 0 ? 32 : _c, fill = _a.fill, stroke = _a.stroke, _d = _a.strokeWidth, strokeWidth = _d === void 0 ? 0 : _d, _e = _a.imageFontFamily, imageFontFamily = _e === void 0 ? "FontAwesome" : _e, _f = _a.imageChar, imageChar = _f === void 0 ? "" : _f, _g = _a.imageCharFill, imageCharFill = _g === void 0 ? common.Palette.textColor(fill) : _g, _h = _a.padding, padding = _h === void 0 ? height / 5 : _h, _j = _a.xOffset, xOffset = _j === void 0 ? 0 : _j, _k = _a.yOffset, yOffset = _k === void 0 ? 0 : _k, cornerRadius = _a.cornerRadius, shapeRendering = _a.shapeRendering;
return h$1(p$1, null,
h$1(Shape, { shape: shape, width: width, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering, cornerRadius: cornerRadius }),
h$1(ImageChar, { x: xOffset, y: yOffset, height: height - padding, fontFamily: imageFontFamily, char: imageChar, fill: imageCharFill, "font-weight": 400 }));
};
var Icons = function (_a) {
var _b = _a.icons, icons = _b === void 0 ? [] : _b;
var IconComponents = icons.map(function (cat) {
return h$1("g", { key: cat.id, id: cat.id },
h$1(Icon, __assign({}, cat)));
});
return h$1(p$1, null, IconComponents);
};
line.curve = function(_) {
return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;
var TextLine = function (_a) {
var text = _a.text, _b = _a.height, height = _b === void 0 ? 12 : _b, _c = _a.anchor, anchor = _c === void 0 ? "middle" : _c, _d = _a.baseline, baseline = _d === void 0 ? "middle" : _d, _e = _a.fontFamily, fontFamily = _e === void 0 ? "Verdana" : _e, _f = _a.fill, fill = _f === void 0 ? "black" : _f;
return h$1("text", { "font-family": fontFamily, "font-size": "".concat(height, "px"), "text-anchor": anchor, "dominant-baseline": baseline, fill: fill }, text);
};
var Text = function (_a) {
var text = _a.text, _b = _a.height, height = _b === void 0 ? 12 : _b, _c = _a.fontFamily, fontFamily = _c === void 0 ? "Verdana" : _c, _d = _a.fill, fill = _d === void 0 ? "black" : _d, onSizeUpdate = _a.onSizeUpdate;
var _e = p(0), totalWidth = _e[0], setTotalWidthUpdate = _e[1];
var _f = p(0), totalHeight = _f[0], setTotalHeightUpdate = _f[1];
h(function () {
onSizeUpdate && onSizeUpdate({ width: totalWidth, height: totalHeight });
}, [totalWidth, totalHeight, onSizeUpdate]);
var parts = F(function () {
return text.split("\n");
}, [text]);
var ts = F(function () {
return common.Utility.textSize(parts, fontFamily, height);
}, [fontFamily, height, parts]);
setTotalWidthUpdate(ts.width);
setTotalHeightUpdate(parts.length * (height + 2) - 2);
var yOffset = -(totalHeight / 2) + (height / 2);
var TextLines = F(function () {
return parts.map(function (p, i) {
return h$1("g", { key: i, transform: "translate(0 ".concat(yOffset + i * (height + 2), ")") },
h$1(TextLine, { text: p, height: height, fontFamily: fontFamily, fill: fill }));
});
}, [fill, fontFamily, height, parts, yOffset]);
return h$1(p$1, null, TextLines);
};
var TextBox = function (_a) {
var text = _a.text, _b = _a.height, height = _b === void 0 ? 12 : _b, _c = _a.fontFamily, fontFamily = _c === void 0 ? "Verdana" : _c, _d = _a.padding, padding = _d === void 0 ? 4 : _d, _e = _a.fill, fill = _e === void 0 ? "whitesmoke" : _e, _f = _a.stroke, stroke = _f === void 0 ? "lightgray" : _f, _g = _a.textFill, textFill = _g === void 0 ? "black" : _g, _h = _a.strokeWidth, strokeWidth = _h === void 0 ? 1 : _h, _j = _a.cornerRadius, cornerRadius = _j === void 0 ? 0 : _j, onSizeUpdate = _a.onSizeUpdate;
var _k = p(0), textWidth = _k[0], setTextWidthUpdate = _k[1];
var _l = p(0), textHeight = _l[0], setTextHeightUpdate = _l[1];
h(function () {
onSizeUpdate && onSizeUpdate({ width: textWidth, height: textHeight });
}, [textWidth, textHeight, onSizeUpdate]);
var onTextSizeUpdate = T(function (size) {
setTextWidthUpdate(size.width);
setTextHeightUpdate(size.height);
}, []);
var w = textWidth + padding * 2 + strokeWidth;
var h$2 = textHeight + padding * 2 + strokeWidth;
var textOffsetY = Math.floor(height / 10);
return h$1(p$1, null,
h$1(Rectangle, { width: w, height: h$2, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
h$1("g", { transform: "translate(0 ".concat(textOffsetY, ")") },
h$1(Text, { text: text, fontFamily: fontFamily, height: height, fill: textFill, onSizeUpdate: onTextSizeUpdate })));
};
var LabelledRect = function (_a) {
var text = _a.text, _b = _a.height, height = _b === void 0 ? 12 : _b, _c = _a.width, width = _c === void 0 ? 12 : _c, _d = _a.fontFamily, fontFamily = _d === void 0 ? "Verdana" : _d, _e = _a.fontSize, fontSize = _e === void 0 ? 10 : _e, _f = _a.padding, padding = _f === void 0 ? 3 : _f, _g = _a.fill, fill = _g === void 0 ? "whitesmoke" : _g, _h = _a.stroke, stroke = _h === void 0 ? "lightgray" : _h, _j = _a.textFill, textFill = _j === void 0 ? "black" : _j, _k = _a.strokeWidth, strokeWidth = _k === void 0 ? 1 : _k, _l = _a.cornerRadius, cornerRadius = _l === void 0 ? 0 : _l; _a.onSizeUpdate;
return h$1(p$1, null,
h$1(Rectangle, { width: width, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
h$1("g", { transform: "translate(".concat(-(width / 2) + padding, " ").concat(-(height / 2) + padding, ")") },
h$1(TextLine, { text: text, fontFamily: fontFamily, height: fontSize, fill: textFill, anchor: "start", baseline: "hanging" })));
};
var IconLabelledRect = function (_a) {
var icon = _a.icon, iconFontFamily = _a.iconFontFamily, text = _a.text, _b = _a.height, height = _b === void 0 ? 12 : _b, _c = _a.width, width = _c === void 0 ? 12 : _c, _d = _a.fontFamily, fontFamily = _d === void 0 ? "Verdana" : _d, _e = _a.fontSize, fontSize = _e === void 0 ? 10 : _e, _f = _a.padding, padding = _f === void 0 ? 3 : _f, _g = _a.fill, fill = _g === void 0 ? "whitesmoke" : _g, _h = _a.stroke, stroke = _h === void 0 ? "lightgray" : _h, _j = _a.textFill, textFill = _j === void 0 ? "black" : _j, _k = _a.strokeWidth, strokeWidth = _k === void 0 ? 1 : _k, _l = _a.cornerRadius, cornerRadius = _l === void 0 ? 0 : _l; _a.onSizeUpdate;
return h$1(p$1, null,
h$1(Rectangle, { width: width, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
h$1("g", { transform: "translate(".concat(-(width / 2) + padding, " ").concat(-(height / 2) + padding, ")") },
h$1(Icon, { shape: "square", imageFontFamily: iconFontFamily, imageChar: icon, height: height, fill: fill, imageCharFill: textFill })),
h$1("g", { transform: "translate(".concat(-(width / 2) + (padding * 2) + height, " ").concat(-(height / 2) + padding, ")") },
h$1(TextLine, { text: text, fontFamily: fontFamily, height: fontSize, fill: textFill, anchor: "start", baseline: "hanging" })));
};
line.context = function(_) {
return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;
var Edge = function (_a) {
var label = _a.label, labelPos = _a.labelPos, _b = _a.labelFill, labelFill = _b === void 0 ? "black" : _b, _c = _a.labelHeight, labelHeight = _c === void 0 ? 12 : _c, path = _a.path, stroke = _a.stroke, strokeWidth = _a.strokeWidth, strokeDasharray = _a.strokeDasharray;
return h$1(p$1, null,
h$1("path", { d: path, stroke: stroke, style: { strokeWidth: strokeWidth, strokeDasharray: strokeDasharray } }),
label && labelPos && labelPos.length === 2 ?
h$1("g", { transform: "translate(".concat(labelPos[0], " ").concat(labelPos[1], ")") },
h$1(Text, { text: label, fill: labelFill, height: labelHeight })) : undefined);
};
return line;
}
function point(that, x, y) {
that._context.bezierCurveTo(
(2 * that._x0 + that._x1) / 3,
(2 * that._y0 + that._y1) / 3,
(that._x0 + 2 * that._x1) / 3,
(that._y0 + 2 * that._y1) / 3,
(that._x0 + 4 * that._x1 + x) / 6,
(that._y0 + 4 * that._y1 + y) / 6
);
}
function Basis(context) {
this._context = context;
}
Basis.prototype = {
areaStart: function() {
this._line = 0;
},
areaEnd: function() {
this._line = NaN;
},
lineStart: function() {
this._x0 = this._x1 =
this._y0 = this._y1 = NaN;
this._point = 0;
},
lineEnd: function() {
switch (this._point) {
case 3: point(this, this._x1, this._y1); // proceed
case 2: this._context.lineTo(this._x1, this._y1); break;
}
if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();
this._line = 1 - this._line;
},
point: function(x, y) {
x = +x, y = +y;
switch (this._point) {
case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;
case 1: this._point = 2; break;
case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed
default: point(this, x, y); break;
}
this._x0 = this._x1, this._x1 = x;
this._y0 = this._y1, this._y1 = y;
function render(C, props, parent, replaceNode) {
P(h$1(C, props), parent, replaceNode);
}
};
function svgRender(C, props, parent, replaceNode) {
P(h$1("svg", null, h$1(C, props)), parent, replaceNode);
}
var HTMLAdapter = /** @class */ (function (_super) {
__extends(HTMLAdapter, _super);
function HTMLAdapter(_component) {
var _this = _super.call(this) || this;
_this._component = _component;
_this._props = {};
return _this;
}
HTMLAdapter.prototype.props = function (_) {
if (!arguments.length)
return this._props;
this._props = __assign(__assign({}, this._props), _);
return this;
};
HTMLAdapter.prototype.prop = function (_, value) {
if (arguments.length === 1)
return this._props[_];
this._props[_] = value;
return this;
};
HTMLAdapter.prototype.update = function (domNode, element) {
_super.prototype.update.call(this, domNode, element);
render(this._component, this._props, domNode);
};
__decorate([
common.publish({}, "object", "Properties"),
__metadata("design:type", Object)
], HTMLAdapter.prototype, "_props", void 0);
return HTMLAdapter;
}(common.HTMLWidget));
var SVGAdapter = /** @class */ (function (_super) {
__extends(SVGAdapter, _super);
function SVGAdapter(_component) {
var _this = _super.call(this) || this;
_this._component = _component;
_this._props = {};
return _this;
}
SVGAdapter.prototype.props = function (_) {
if (!arguments.length)
return this._props;
this._props = __assign(__assign({}, this._props), _);
return this;
};
SVGAdapter.prototype.prop = function (_, value) {
if (arguments.length === 1)
return this._props[_];
this._props[_] = value;
return this;
};
SVGAdapter.prototype.update = function (domNode, element) {
_super.prototype.update.call(this, domNode, element);
render(this._component, this._props, domNode);
};
__decorate([
common.publish({}, "object", "Properties"),
__metadata("design:type", Object)
], SVGAdapter.prototype, "_props", void 0);
return SVGAdapter;
}(common.SVGWidget));
function d3CurveBasis(context) {
return new Basis(context);
}
var Annotations = function (_a) {
var x = _a.x, y = _a.y, _b = _a.annotationIDs, annotationIDs = _b === void 0 ? [] : _b, _c = _a.stepSize, stepSize = _c === void 0 ? -16 : _c;
var IconComponents = annotationIDs.map(function (id, i) { return h$1("g", { key: id, transform: "translate(".concat(x + i * stepSize, " ").concat(y, ")") },
h$1("use", { href: "#" + id })); });
return h$1(p$1, null, IconComponents);
};
var Vertex = function (_a) {
var _b = _a.categoryID, categoryID = _b === void 0 ? "" : _b, _c = _a.text, text = _c === void 0 ? "" : _c, _d = _a.textHeight, textHeight = _d === void 0 ? 12 : _d, _e = _a.textPadding, textPadding = _e === void 0 ? 4 : _e, _f = _a.icon, icon = _f === void 0 ? {} : _f, _g = _a.annotationsHeight, annotationsHeight = _g === void 0 ? 12 : _g, _h = _a.annotationIDs, annotationIDs = _h === void 0 ? [] : _h, textFill = _a.textFill, textboxFill = _a.textboxFill, textboxStroke = _a.textboxStroke, textFontFamily = _a.textFontFamily, onSizeUpdate = _a.onSizeUpdate, _j = _a.showLabel, showLabel = _j === void 0 ? true : _j, _k = _a.scale, scale = _k === void 0 ? 1 : _k;
var _l = p(0), textBoxWidth = _l[0], setTextBoxWidthUpdate = _l[1];
var _m = p(0), textBoxHeight = _m[0], setTextBoxHeightUpdate = _m[1];
h(function () {
onSizeUpdate && onSizeUpdate({ width: 0, height: 0 });
}, [textBoxWidth, textBoxHeight, onSizeUpdate]);
icon = __assign({ imageChar: "fa-question", height: 32, fill: "transparent" }, icon);
var width = textBoxWidth;
width += 4;
var offsetY = -(icon.height * 2 / 6 + textHeight + 8) / 2;
var textboxOffsetY = icon.height / 3 + textBoxHeight / 2 + textPadding;
var annotationOffsetY = icon.height / 3 + textBoxHeight + textPadding + annotationsHeight / 3;
if (!showLabel) {
offsetY += (textHeight + 8) / 2;
annotationOffsetY -= textBoxHeight + textPadding;
}
var onTextBoxSizeUpdate = T(function (size) {
setTextBoxWidthUpdate(size.width);
setTextBoxHeightUpdate(size.height);
}, []);
var label = showLabel ? h$1("g", { transform: "translate(0 ".concat(textboxOffsetY, ")") },
h$1(TextBox, { text: text, height: textHeight, padding: textPadding, onSizeUpdate: onTextBoxSizeUpdate, textFill: textFill, fill: textboxFill, stroke: textboxStroke, fontFamily: textFontFamily })) : undefined;
return categoryID ?
h$1("g", { transform: "translate(0 ".concat(offsetY, ") scale(").concat(scale, ")") },
h$1("use", { href: "#" + categoryID }),
label,
h$1(Annotations, { x: width / 2, y: annotationOffsetY, annotationIDs: annotationIDs })) :
h$1("g", { transform: "translate(0 ".concat(offsetY, ") scale(").concat(scale, ")") },
h$1(Icon, __assign({}, icon)),
label);
};
var line = d3Line()
.x(function (d) { return d[0]; })
.y(function (d) { return d[1]; })
.curve(d3CurveBasis);
function calcArc(points, curveDepth) {
if (points.length === 2 && curveDepth) {
var dx = points[0][0] - points[1][0];
var dy = points[0][1] - points[1][1];
var dist = Math.sqrt(dx * dx + dy * dy);
if (dist) {
var midX = (points[0][0] + points[1][0]) / 2 - dy * curveDepth / 100;
var midY = (points[0][1] + points[1][1]) / 2 + dx * curveDepth / 100;
return [points[0], [midX, midY], points[1]];
}
}
return points;
}
var Edge = function (_a) {
var _b = _a.points, points = _b === void 0 ? [] : _b, _c = _a.curveDepth, curveDepth = _c === void 0 ? 16 : _c, _d = _a.stroke, stroke = _d === void 0 ? "black" : _d, strokeDasharray = _a.strokeDasharray;
var d = F(function () {
return line(calcArc(points, curveDepth));
}, [curveDepth, points]);
return h$1("path", { stroke: stroke, "stroke-dasharray": strokeDasharray, d: d });
};
var Vertex2 = function (_a) {
var _b = _a.categoryID, categoryID = _b === void 0 ? "" : _b, _c = _a.text, text = _c === void 0 ? "" : _c, _d = _a.textHeight, textHeight = _d === void 0 ? 12 : _d, _e = _a.textPadding, textPadding = _e === void 0 ? 4 : _e, _f = _a.icon, icon = _f === void 0 ? {} : _f, _g = _a.textFill, textFill = _g === void 0 ? "black" : _g, _h = _a.textboxFill, textboxFill = _h === void 0 ? "white" : _h, _j = _a.textboxStroke, textboxStroke = _j === void 0 ? "black" : _j, textFontFamily = _a.textFontFamily, _k = _a.annotationsHeight, annotationsHeight = _k === void 0 ? 12 : _k, _l = _a.annotationIDs, annotationIDs = _l === void 0 ? [] : _l;
icon = __assign({ imageChar: "fa-question", imageCharFill: "white", height: 32, fill: "black", shape: "square" }, icon);
var textBoxHeight = textHeight + textPadding * 2;
var width = F(function () {
return common.Utility.textSize(text, textFontFamily, textHeight, false);
}, [text, textFontFamily, textHeight]).width;
var stepSize = annotationsHeight;
var textboxStrokeWidth = 1;
var halfTextboxHeight = textBoxHeight / 2;
var offsetX = 0;
var offsetY = -(icon.height * 2 / 6 + textHeight + 8) / 2;
var iconOffsetX = -icon.height / 2;
var iconOffsetY = 0;
var textboxOffsetX = Math.ceil((width / 2) + textPadding);
var textboxOffsetY = halfTextboxHeight - (icon.height / 2);
var annotationOffsetX = stepSize / 2;
var annotationOffsetY = halfTextboxHeight;
return categoryID ?
h$1("g", { transform: "translate(".concat(offsetX, " ").concat(offsetY, ")") },
h$1("g", { transform: "translate(".concat(iconOffsetX, " ").concat(iconOffsetY, ")") },
h$1("use", { href: "#" + categoryID })),
h$1("g", { transform: "translate(".concat(textboxOffsetX, " ").concat(textboxOffsetY, ")") },
h$1(TextBox, { text: text, height: textHeight, padding: textPadding, strokeWidth: textboxStrokeWidth, stroke: textboxStroke, fill: textboxFill, textFill: textFill, fontFamily: textFontFamily })),
h$1(Annotations, { x: annotationOffsetX, y: annotationOffsetY, annotationIDs: annotationIDs, stepSize: stepSize }))
:
h$1(p$1, null,
h$1("g", { transform: "translate(".concat(iconOffsetX, " ").concat(iconOffsetY, ")scale(1.0002)") },
h$1(Icon, __assign({}, icon, { shape: "square" }))),
h$1("g", { transform: "translate(".concat(textboxOffsetX, " ").concat(textboxOffsetY, ")scale(1.0002)") },
h$1(TextBox, { text: text, height: textHeight, padding: textPadding, stroke: textboxStroke, fill: textboxFill })));
};
var ImageChar = function (_a) {
var x = _a.x, _b = _a.y, y = _b === void 0 ? 0 : _b, _c = _a.height, height = _c === void 0 ? 12 : _c, fill = _a.fill, stroke = _a.stroke, _d = _a.fontFamily, fontFamily = _d === void 0 ? "FontAwesome" : _d, _e = _a.char, char = _e === void 0 ? "" : _e;
var renderChar = F(function () {
return fontFamily === "FontAwesome" ? common.Utility.faChar(char) : char;
}, [char, fontFamily]);
return h$1("text", { x: x, y: y, fill: fill, stroke: stroke, "font-family": fontFamily, "font-size": "".concat(height, "px"), "dominant-baseline": "middle", style: "text-anchor: middle;alignment-baseline:middle;" }, renderChar);
};
var Vertex3 = function (_a) {
var _b = _a.text, text = _b === void 0 ? "" : _b, _c = _a.textHeight, textHeight = _c === void 0 ? 10 : _c, _d = _a.textPadding, textPadding = _d === void 0 ? 4 : _d, _e = _a.textFill, textFill = _e === void 0 ? "#287EC4" : _e, _f = _a.textboxFill, textboxFill = _f === void 0 ? "white" : _f, _g = _a.textboxStroke, textboxStroke = _g === void 0 ? "#CCCCCC" : _g, _h = _a.textboxStrokeWidth, textboxStrokeWidth = _h === void 0 ? 1 : _h, _j = _a.textFontFamily, textFontFamily = _j === void 0 ? "Verdana" : _j, _k = _a.annotationGutter, annotationGutter = _k === void 0 ? 2 : _k, _l = _a.annotations, annotations = _l === void 0 ? [] : _l, _m = _a.cornerRadius, cornerRadius = _m === void 0 ? 3 : _m, _o = _a.icon, icon = _o === void 0 ? {} : _o, _p = _a.subText, subText = _p === void 0 ? {} : _p, _q = _a.showLabel, showLabel = _q === void 0 ? true : _q, _r = _a.noLabelRadius, noLabelRadius = _r === void 0 ? 5 : _r, expansionIcon = _a.expansionIcon, _s = _a.scale, scale = _s === void 0 ? 1 : _s;
icon = __assign({ height: 50, imageChar: "?", imageFontFamily: "FontAwesome", imageCharFill: "#555555", fill: "transparent", strokeWidth: 0 }, icon);
subText = __assign({ text: "", fill: "white", textFill: "#555555" }, subText);
expansionIcon = expansionIcon ? __assign({ height: 16, shape: "circle", padding: 6, imageChar: "?", imageFontFamily: "FontAwesome", imageCharFill: "black", fill: "whitesmoke", stroke: "whitesmoke", strokeWidth: 0 }, expansionIcon) : undefined;
var fullAnnotationWidth = 0;
var annoOffsetY = 0;
var labelWidth = F(function () {
return common.Utility.textSize(text, textFontFamily, textHeight, false).width;
}, [text, textFontFamily, textHeight]);
var labelShapeWidth = 0;
if (text !== "") {
labelShapeWidth = labelWidth + (textPadding * 2) + (textboxStrokeWidth * 2);
}
fullAnnotationWidth += labelShapeWidth + annotationGutter;
var textOffsetX = fullAnnotationWidth - (labelShapeWidth / 2);
var textShapeHeight = textHeight + (textPadding * 2) + (textboxStrokeWidth * 2);
var annotationArr = [];
annotations.forEach(function (anno, idx) {
var annoText = anno.imageChar;
var annoShapeWidth = textShapeHeight;
fullAnnotationWidth += annoShapeWidth + annotationGutter;
var annoOffsetX = fullAnnotationWidth - (annoShapeWidth / 2);
annotationArr.push(h$1("g", { key: idx, class: "vertex3-anno", "data-click": "annotation", "data-click-data": JSON.stringify(anno), transform: "translate(".concat(annoOffsetX, " ").concat(annoOffsetY, ")") },
h$1(Icon, __assign({}, anno, { shape: "square", height: textShapeHeight, imageChar: annoText, imageFontFamily: anno.imageFontFamily, cornerRadius: cornerRadius, strokeWidth: 0 }))));
});
if (annotations.length > 0) {
fullAnnotationWidth += annotationGutter * (annotations.length - 1);
}
var textElement = h$1("g", { "data-click": "text", transform: "translate(".concat(textOffsetX, " ").concat(annoOffsetY, ")") }, !showLabel || text === "" ? h$1("circle", { r: noLabelRadius, stroke: textboxStroke, fill: textFill }) : h$1(TextBox, { text: text, height: textHeight, padding: textPadding, strokeWidth: textboxStrokeWidth, stroke: textboxStroke, fill: textboxFill, textFill: textFill, fontFamily: textFontFamily, cornerRadius: cornerRadius }));
var iconHeight = icon.height || 20;
var iconStrokeWidth = icon.strokeWidth || 0;
var iconOffsetX = 0;
var iconOffsetY = 0;
var subTextOffsetX = 0;
var subTextOffsetY = textShapeHeight + (annotationGutter * 2);
if (text !== "" || annotationArr.length > 0) {
iconOffsetY = -(iconHeight / 2) - (iconStrokeWidth) - (textShapeHeight / 2) - (annotationGutter * 2);
}
else if (subText.text !== "") {
subTextOffsetY = (iconHeight / 2) + iconStrokeWidth + (annotationGutter * 2);
}
var subtextElement = subText.text === "" ? null : h$1("g", { "data-click": "subtext", transform: "translate(".concat(subTextOffsetX, " ").concat(subTextOffsetY, ")") },
h$1(TextBox, __assign({ fill: subText.fill || "#FFFFFF", textFill: subText.textFill || textFill }, subText, { height: textHeight, padding: textPadding, strokeWidth: 0, stroke: textboxStroke, fontFamily: textFontFamily, cornerRadius: cornerRadius })));
return h$1("g", { transform: "scale(".concat(scale, ")") },
h$1("g", { "data-click": "icon", transform: "translate(".concat(iconOffsetX, " ").concat(iconOffsetY, ")") },
h$1(Icon, __assign({}, icon)),
expansionIcon &&
h$1("g", { "data-click": "expanded-icon", "data-click-data": JSON.stringify(expansionIcon), transform: "translate(".concat((icon.height + iconStrokeWidth) / 2 - expansionIcon.height / 2, " ").concat(-(icon.height + iconStrokeWidth) / 2 + expansionIcon.height / 2, ")") },
h$1(Icon, __assign({}, expansionIcon)))),
h$1("g", { transform: "translate(".concat(-fullAnnotationWidth / 2, " ").concat(annoOffsetY, ")") },
textElement,
annotationArr),
subtextElement);
};
var CentroidVertex3 = function (_a) {
var id = _a.id, _b = _a.categoryID, categoryID = _b === void 0 ? "" : _b, _c = _a.text, text = _c === void 0 ? "" : _c, _d = _a.textHeight, textHeight = _d === void 0 ? 12 : _d, _e = _a.textPadding, textPadding = _e === void 0 ? 10 : _e, _f = _a.textFill, textFill = _f === void 0 ? "#287EC4" : _f, _g = _a.textboxFill, textboxFill = _g === void 0 ? "white" : _g, _h = _a.textboxStroke, textboxStroke = _h === void 0 ? "#CCCCCC" : _h, _j = _a.textboxStrokeWidth, textboxStrokeWidth = _j === void 0 ? 1 : _j, _k = _a.textFontFamily, textFontFamily = _k === void 0 ? "Verdana" : _k, _l = _a.annotationGutter, annotationGutter = _l === void 0 ? 2 : _l, _m = _a.annotations, annotations = _m === void 0 ? [] : _m, cornerRadius = _a.cornerRadius, _o = _a.icon, icon = _o === void 0 ? {} : _o, _p = _a.subText, subText = _p === void 0 ? {} : _p, expansionIcon = _a.expansionIcon, _q = _a.scale, scale = _q === void 0 ? 1 : _q;
icon = __assign({ height: 91, padding: 40, imageCharFill: "#555555", imageFontFamily: "FontAwesome", fill: "#FFCC33", stroke: "#DFDFDF", imageChar: "?", strokeWidth: 4, yOffset: -15 }, icon);
subText = __assign({ text: "", fill: "transparent", textFill: "#555555" }, subText);
var props = {
id: id,
categoryID: categoryID,
text: text,
textHeight: textHeight,
textPadding: textPadding,
textFill: textFill,
textboxFill: textboxFill,
textboxStroke: textboxStroke,
textboxStrokeWidth: textboxStrokeWidth,
textFontFamily: textFontFamily,
annotationGutter: annotationGutter,
annotations: annotations,
cornerRadius: cornerRadius,
icon: icon,
subText: subText,
expansionIcon: expansionIcon,
scale: scale
};
return h$1(Vertex3, __assign({}, props, { icon: icon, subText: subText }));
};
/******************************************************************************
Copyright (c) Microsoft Corporation.
var Vertex4 = function (_a) {
_a.categoryID; var _c = _a.text, text = _c === void 0 ? "" : _c, _d = _a.textHeight, textHeight = _d === void 0 ? 10 : _d, _e = _a.textPadding, textPadding = _e === void 0 ? 4 : _e, _f = _a.textFill, textFill = _f === void 0 ? "#287EC4" : _f, _g = _a.textboxFill, textboxFill = _g === void 0 ? "white" : _g, _h = _a.textboxStroke, textboxStroke = _h === void 0 ? "#CCCCCC" : _h, _j = _a.textboxStrokeWidth, textboxStrokeWidth = _j === void 0 ? 1 : _j, _k = _a.textFontFamily, textFontFamily = _k === void 0 ? "Verdana" : _k, _l = _a.annotationGutter, annotationGutter = _l === void 0 ? 2 : _l, _m = _a.annotations, annotations = _m === void 0 ? [] : _m, _o = _a.iconAnnotations, iconAnnotations = _o === void 0 ? [] : _o, _p = _a.cornerRadius, cornerRadius = _p === void 0 ? 3 : _p, _q = _a.icon, icon = _q === void 0 ? {} : _q, _r = _a.subText, subText = _r === void 0 ? {} : _r, _s = _a.showLabel, showLabel = _s === void 0 ? true : _s, _t = _a.noLabelRadius, noLabelRadius = _t === void 0 ? 5 : _t, _u = _a.iconBorderWidth, iconBorderWidth = _u === void 0 ? 1 : _u, _v = _a.iconBorderColor, iconBorderColor = _v === void 0 ? "#333" : _v, _w = _a.iconBackgroundColor, iconBackgroundColor = _w === void 0 ? "#fff" : _w, _x = _a.iconFontColor, iconFontColor = _x === void 0 ? "#000" : _x, _y = _a.iconFontSize, iconFontSize = _y === void 0 ? 20 : _y, _z = _a.iconFontFamily, iconFontFamily = _z === void 0 ? "FontAwesome" : _z, _0 = _a.shapeOffsetX, shapeOffsetX = _0 === void 0 ? 0 : _0, _1 = _a.shapeOffsetY, shapeOffsetY = _1 === void 0 ? 0 : _1, _2 = _a.iconOffsetX, iconOffsetX = _2 === void 0 ? 0 : _2, _3 = _a.iconOffsetY, iconOffsetY = _3 === void 0 ? 0 : _3, _4 = _a.iconPadding, iconPadding = _4 === void 0 ? 4 : _4, _5 = _a.iconText, iconText = _5 === void 0 ? "?" : _5, _6 = _a.shapeRendering, shapeRendering = _6 === void 0 ? "auto" : _6;
icon = __assign({ height: 50, imageChar: "?", imageFontFamily: "FontAwesome", imageCharFill: "#555555", fill: "transparent", strokeWidth: 0 }, icon);
subText = __assign({ text: "", fill: "white", textFill: "#555555" }, subText);
var annoOffsetY = 0;
var labelWidth = F(function () {
return common.Utility.textSize(text, textFontFamily, textHeight, false).width;
}, [text, textFontFamily, textHeight]);
var labelShapeWidth = 0;
if (text !== "") {
labelShapeWidth = labelWidth + (textPadding * 2) + (textboxStrokeWidth * 2);
}
var fullAnnotationWidth = labelShapeWidth + annotationGutter;
var textOffsetX = fullAnnotationWidth - (labelShapeWidth / 2);
var textShapeHeight = textHeight + (annotationGutter * 2) + (textboxStrokeWidth * 2);
var annoWidthArr = annotations.map(function (anno, i) {
return common.Utility.textSize(anno.imageChar, anno.imageFontFamily, anno.height, false).width;
});
var annotationArr = [];
var _labelAnnoOffsetX = fullAnnotationWidth;
annotations.forEach(function (anno, i) {
var _a;
var annoText = anno.imageChar;
var annoTextHeight = (_a = anno.height) !== null && _a !== void 0 ? _a : textShapeHeight;
_labelAnnoOffsetX += annoWidthArr[i] + annotationGutter;
var annoOffsetX = _labelAnnoOffsetX - (annoWidthArr[i] / 2);
annotationArr.push(h$1("g", { key: i, class: "vertex3-anno", "data-click": "annotation", "data-click-data": JSON.stringify(anno), transform: "translate(".concat(annoOffsetX, " ").concat(annoOffsetY, ")") },
h$1(Icon, __assign({}, anno, { shape: "rectangle", width: annoWidthArr[i], height: annoTextHeight, imageChar: annoText, imageFontFamily: anno.imageFontFamily, cornerRadius: cornerRadius, strokeWidth: 0 }))));
});
if (annotations.length > 0) {
fullAnnotationWidth += annotationGutter * (annotations.length - 1);
}
var iconAnnotationArr = [];
iconAnnotations.forEach(function (anno, i) {
var _a;
var x = anno.shapeOffsetX;
var y = anno.shapeOffsetY;
iconAnnotationArr.push(h$1("g", { key: i, class: "vertex3-iconAnno", "data-click": "icon-annotation", "data-click-data": JSON.stringify(anno), transform: "translate(".concat(x, " ").concat(y, ")") },
h$1(Icon, __assign({}, anno, { shape: (_a = anno.shape) !== null && _a !== void 0 ? _a : "square", imageChar: anno.imageChar, imageFontFamily: anno.imageFontFamily, cornerRadius: cornerRadius, stroke: anno.stroke, strokeWidth: anno.strokeWidth }))));
});
var textElement = h$1("g", { "data-click": "text", transform: "translate(".concat(textOffsetX, " ").concat(annoOffsetY, ")") }, !showLabel || text === "" ? h$1("circle", { r: noLabelRadius, stroke: textboxStroke, fill: textFill }) : h$1(TextBox, { text: text, height: textHeight, padding: textPadding, strokeWidth: textboxStrokeWidth, stroke: textboxStroke, fill: textboxFill, textFill: textFill, fontFamily: textFontFamily, cornerRadius: cornerRadius }));
var subTextOffsetX = 0;
var subTextOffsetY = textShapeHeight + (annotationGutter * 2);
var subtextElement = subText.text === "" ? null : h$1("g", { "data-click": "subtext", transform: "translate(".concat(subTextOffsetX, " ").concat(subTextOffsetY, ")") },
h$1(TextBox, __assign({ fill: subText.fill || "#FFFFFF", textFill: subText.textFill || textFill }, subText, { height: textHeight, padding: textPadding, strokeWidth: 0, stroke: textboxStroke, fontFamily: textFontFamily, cornerRadius: cornerRadius })));
return h$1("g", null,
h$1("g", { "data-click": "icon", transform: "translate(".concat(shapeOffsetX, " ").concat(shapeOffsetY, ")") },
h$1(Icon, __assign({}, icon, { strokeWidth: iconBorderWidth, shape: "circle", height: iconFontSize, fill: iconBackgroundColor, stroke: iconBorderColor, imageFontFamily: iconFontFamily, imageChar: iconText, imageCharFill: iconFontColor, padding: iconPadding, xOffset: iconOffsetX, yOffset: iconOffsetY, cornerRadius: cornerRadius, shapeRendering: shapeRendering })),
iconAnnotationArr),
h$1("g", { transform: "translate(".concat(-fullAnnotationWidth / 2, " ").concat(annoOffsetY, ")") },
textElement,
annotationArr),
subtextElement);
};
var CentroidVertex4 = function (_a) {
var id = _a.id, _b = _a.categoryID, categoryID = _b === void 0 ? "" : _b, _c = _a.text, text = _c === void 0 ? "" : _c, _d = _a.textHeight, textHeight = _d === void 0 ? 12 : _d, _e = _a.textPadding, textPadding = _e === void 0 ? 10 : _e, _f = _a.textFill, textFill = _f === void 0 ? "#287EC4" : _f, _g = _a.textboxFill, textboxFill = _g === void 0 ? "white" : _g, _h = _a.textboxStroke, textboxStroke = _h === void 0 ? "#CCCCCC" : _h, _j = _a.textboxStrokeWidth, textboxStrokeWidth = _j === void 0 ? 1 : _j, _k = _a.textFontFamily, textFontFamily = _k === void 0 ? "Verdana" : _k, _l = _a.annotationGutter, annotationGutter = _l === void 0 ? 2 : _l, _m = _a.annotations, annotations = _m === void 0 ? [] : _m, _o = _a.iconAnnotations, iconAnnotations = _o === void 0 ? [] : _o, cornerRadius = _a.cornerRadius, _p = _a.icon, icon = _p === void 0 ? {} : _p, _q = _a.subText, subText = _q === void 0 ? {} : _q, _r = _a.showLabel, showLabel = _r === void 0 ? true : _r, _s = _a.noLabelRadius, noLabelRadius = _s === void 0 ? 5 : _s, _t = _a.iconBorderWidth, iconBorderWidth = _t === void 0 ? 1 : _t, _u = _a.iconBorderColor, iconBorderColor = _u === void 0 ? "#333" : _u, _v = _a.iconBackgroundColor, iconBackgroundColor = _v === void 0 ? "#fff" : _v, _w = _a.iconFontColor, iconFontColor = _w === void 0 ? "#000" : _w, _x = _a.iconFontSize, iconFontSize = _x === void 0 ? 20 : _x, _y = _a.iconFontFamily, iconFontFamily = _y === void 0 ? "FontAwesome" : _y, _z = _a.shapeOffsetX, shapeOffsetX = _z === void 0 ? 0 : _z, _0 = _a.shapeOffsetY, shapeOffsetY = _0 === void 0 ? 0 : _0, _1 = _a.iconOffsetX, iconOffsetX = _1 === void 0 ? 0 : _1, _2 = _a.iconOffsetY, iconOffsetY = _2 === void 0 ? 0 : _2, _3 = _a.iconPadding, iconPadding = _3 === void 0 ? 4 : _3, _4 = _a.iconText, iconText = _4 === void 0 ? "?" : _4, _5 = _a.shapeRendering, shapeRendering = _5 === void 0 ? "auto" : _5;
icon = __assign({ height: 91, padding: 40, imageCharFill: "#555555", imageFontFamily: "FontAwesome", fill: "#FFCC33", stroke: "#DFDFDF", imageChar: "?", strokeWidth: 4, yOffset: -15 }, icon);
subText = __assign({ text: "", fill: "transparent", textFill: "#555555" }, subText);
var props = {
id: id,
categoryID: categoryID,
text: text,
textHeight: textHeight,
textPadding: textPadding,
textFill: textFill,
textboxFill: textboxFill,
textboxStroke: textboxStroke,
textboxStrokeWidth: textboxStrokeWidth,
textFontFamily: textFontFamily,
annotationGutter: annotationGutter,
annotations: annotations,
iconAnnotations: iconAnnotations,
cornerRadius: cornerRadius,
icon: icon,
subText: subText,
showLabel: showLabel,
noLabelRadius: noLabelRadius,
iconBorderWidth: iconBorderWidth,
iconBorderColor: iconBorderColor,
iconBackgroundColor: iconBackgroundColor,
iconFontColor: iconFontColor,
iconFontSize: iconFontSize,
iconFontFamily: iconFontFamily,
shapeOffsetX: shapeOffsetX,
shapeOffsetY: shapeOffsetY,
iconOffsetX: iconOffsetX,
iconOffsetY: iconOffsetY,
iconPadding: iconPadding,
iconText: iconText,
shapeRendering: shapeRendering
};
return h$1(Vertex4, __assign({}, props, { icon: icon, subText: subText }));
};
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
var Subgraph = function (_a) {
var text = _a.text, _b = _a.width, width = _b === void 0 ? 100 : _b, _c = _a.height, height = _c === void 0 ? 100 : _c, _d = _a.fill, fill = _d === void 0 ? "transparent" : _d, _e = _a.stroke, stroke = _e === void 0 ? "black" : _e, _f = _a.fontHeight, fontHeight = _f === void 0 ? 12 : _f, fontFamily = _a.fontFamily;
var tSize = common.Utility.textSize(text, fontFamily, fontHeight, false);
return h$1(p$1, null,
h$1(Rectangle, { width: width, height: height, fill: fill, stroke: stroke }),
h$1("g", { transform: "translate(".concat((-width + tSize.width) / 2 + 4, " ").concat((-height + tSize.height) / 2 + 4, ")") },
h$1(Text, { height: fontHeight, text: text, fontFamily: fontFamily })));
};
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise */
exports.Annotations = Annotations;
exports.BUILD_VERSION = BUILD_VERSION$1;
exports.CentroidVertex3 = CentroidVertex3;
exports.CentroidVertex4 = CentroidVertex4;
exports.Circle = Circle;
exports.Edge = Edge;
exports.HTMLAdapter = HTMLAdapter;
exports.Icon = Icon;
exports.IconLabelledRect = IconLabelledRect;
exports.Icons = Icons;
exports.ImageChar = ImageChar;
exports.LabelledRect = LabelledRect;
exports.PKG_NAME = PKG_NAME$1;
exports.PKG_VERSION = PKG_VERSION$1;
exports.React = index_es6;
exports.Rectangle = Rectangle;
exports.SVGAdapter = SVGAdapter;
exports.Shape = Shape;
exports.Square = Square;
exports.Subgraph = Subgraph;
exports.Text = Text;
exports.TextBox = TextBox;
exports.TextLine = TextLine;
exports.Vertex = Vertex;
exports.Vertex2 = Vertex2;
exports.Vertex3 = Vertex3;
exports.Vertex4 = Vertex4;
exports.render = render;
exports.svgRender = svgRender;
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
Object.defineProperty(exports, '__esModule', { value: true });
function __extends(d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}
var __assign = function() {
__assign = Object.assign || function __assign(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
function __decorate(decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
}
function __metadata(metadataKey, metadataValue) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}
var Circle = function (_a) {
var _b = _a.radius, radius = _b === void 0 ? 32 : _b, _c = _a.fill, fill = _c === void 0 ? "navy" : _c, _d = _a.stroke, stroke = _d === void 0 ? fill : _d, _e = _a.strokeWidth, strokeWidth = _e === void 0 ? 1 : _e, shapeRendering = _a.shapeRendering;
return h$1("circle", { r: radius, fill: fill, stroke: stroke, "stroke-width": strokeWidth, "shape-rendering": shapeRendering });
};
var Square = function (_a) {
var _b = _a.radius, radius = _b === void 0 ? 30 : _b, _c = _a.cornerRadius, cornerRadius = _c === void 0 ? 0 : _c, _d = _a.fill, fill = _d === void 0 ? "white" : _d, stroke = _a.stroke, _e = _a.strokeWidth, strokeWidth = _e === void 0 ? 1 : _e, shapeRendering = _a.shapeRendering;
return h$1("rect", { x: -radius, y: -radius, rx: cornerRadius, ry: cornerRadius, width: radius * 2, height: radius * 2, fill: fill, stroke: stroke || fill, "stroke-width": strokeWidth, "shape-rendering": shapeRendering });
};
var Rectangle = function (_a) {
var _b = _a.width, width = _b === void 0 ? 30 : _b, _c = _a.height, height = _c === void 0 ? 30 : _c, _d = _a.cornerRadius, cornerRadius = _d === void 0 ? 0 : _d, _e = _a.fill, fill = _e === void 0 ? "white" : _e, _f = _a.stroke, stroke = _f === void 0 ? "black" : _f, _g = _a.strokeWidth, strokeWidth = _g === void 0 ? 1 : _g, shapeRendering = _a.shapeRendering;
return h$1("rect", { x: -width / 2, y: -height / 2, rx: cornerRadius, ry: cornerRadius, width: width, height: height, fill: fill, stroke: stroke || fill, "stroke-width": strokeWidth, "shape-rendering": shapeRendering });
};
var Shape = function (_a) {
var _b = _a.shape, shape = _b === void 0 ? "circle" : _b, _c = _a.height, height = _c === void 0 ? 128 : _c, width = _a.width, fill = _a.fill, stroke = _a.stroke, _d = _a.strokeWidth, strokeWidth = _d === void 0 ? 1 : _d, shapeRendering = _a.shapeRendering, cornerRadius = _a.cornerRadius;
switch (shape) {
case "square":
return h$1(Square, { radius: height / 2, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering, cornerRadius: cornerRadius });
case "rectangle":
return h$1(Rectangle, { width: width !== null && width !== void 0 ? width : height, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering, cornerRadius: cornerRadius });
case "circle":
default:
return h$1(Circle, { radius: height / 2, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering });
}
};
var Icon = function (_a) {
var _b = _a.shape, shape = _b === void 0 ? "circle" : _b, width = _a.width, _c = _a.height, height = _c === void 0 ? 32 : _c, fill = _a.fill, stroke = _a.stroke, _d = _a.strokeWidth, strokeWidth = _d === void 0 ? 0 : _d, _e = _a.imageFontFamily, imageFontFamily = _e === void 0 ? "FontAwesome" : _e, _f = _a.imageChar, imageChar = _f === void 0 ? "" : _f, _g = _a.imageCharFill, imageCharFill = _g === void 0 ? common.Palette.textColor(fill) : _g, _h = _a.padding, padding = _h === void 0 ? height / 5 : _h, _j = _a.xOffset, xOffset = _j === void 0 ? 0 : _j, _k = _a.yOffset, yOffset = _k === void 0 ? 0 : _k, cornerRadius = _a.cornerRadius, shapeRendering = _a.shapeRendering;
return h$1(p$1, null,
h$1(Shape, { shape: shape, width: width, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering, cornerRadius: cornerRadius }),
h$1(ImageChar, { x: xOffset, y: yOffset, height: height - padding, fontFamily: imageFontFamily, char: imageChar, fill: imageCharFill, "font-weight": 400 }));
};
var Icons = function (_a) {
var _b = _a.icons, icons = _b === void 0 ? [] : _b;
var IconComponents = icons.map(function (cat) {
return h$1("g", { key: cat.id, id: cat.id },
h$1(Icon, __assign({}, cat)));
});
return h$1(p$1, null, IconComponents);
};
function render(C, props, parent, replaceNode) {
P(h$1(C, props), parent, replaceNode);
}
function svgRender(C, props, parent, replaceNode) {
P(h$1("svg", null, h$1(C, props)), parent, replaceNode);
}
var HTMLAdapter = /** @class */ (function (_super) {
__extends(HTMLAdapter, _super);
function HTMLAdapter(_component) {
var _this = _super.call(this) || this;
_this._component = _component;
_this._props = {};
return _this;
}
HTMLAdapter.prototype.props = function (_) {
if (!arguments.length)
return this._props;
this._props = __assign(__assign({}, this._props), _);
return this;
};
HTMLAdapter.prototype.prop = function (_, value) {
if (arguments.length === 1)
return this._props[_];
this._props[_] = value;
return this;
};
HTMLAdapter.prototype.update = function (domNode, element) {
_super.prototype.update.call(this, domNode, element);
render(this._component, this._props, domNode);
};
__decorate([
common.publish({}, "object", "Properties"),
__metadata("design:type", Object)
], HTMLAdapter.prototype, "_props", void 0);
return HTMLAdapter;
}(common.HTMLWidget));
var SVGAdapter = /** @class */ (function (_super) {
__extends(SVGAdapter, _super);
function SVGAdapter(_component) {
var _this = _super.call(this) || this;
_this._component = _component;
_this._props = {};
return _this;
}
SVGAdapter.prototype.props = function (_) {
if (!arguments.length)
return this._props;
this._props = __assign(__assign({}, this._props), _);
return this;
};
SVGAdapter.prototype.prop = function (_, value) {
if (arguments.length === 1)
return this._props[_];
this._props[_] = value;
return this;
};
SVGAdapter.prototype.update = function (domNode, element) {
_super.prototype.update.call(this, domNode, element);
render(this._component, this._props, domNode);
};
__decorate([
common.publish({}, "object", "Properties"),
__metadata("design:type", Object)
], SVGAdapter.prototype, "_props", void 0);
return SVGAdapter;
}(common.SVGWidget));
var TextLine = function (_a) {
var text = _a.text, _b = _a.height, height = _b === void 0 ? 12 : _b, _c = _a.anchor, anchor = _c === void 0 ? "middle" : _c, _d = _a.baseline, baseline = _d === void 0 ? "middle" : _d, _e = _a.fontFamily, fontFamily = _e === void 0 ? "Verdana" : _e, _f = _a.fill, fill = _f === void 0 ? "black" : _f;
return h$1("text", { "font-family": fontFamily, "font-size": "".concat(height, "px"), "text-anchor": anchor, "dominant-baseline": baseline, fill: fill }, text);
};
var Text = function (_a) {
var text = _a.text, _b = _a.height, height = _b === void 0 ? 12 : _b, _c = _a.fontFamily, fontFamily = _c === void 0 ? "Verdana" : _c, _d = _a.fill, fill = _d === void 0 ? "black" : _d, onSizeUpdate = _a.onSizeUpdate;
var _e = p(0), totalWidth = _e[0], setTotalWidthUpdate = _e[1];
var _f = p(0), totalHeight = _f[0], setTotalHeightUpdate = _f[1];
h(function () {
onSizeUpdate && onSizeUpdate({ width: totalWidth, height: totalHeight });
}, [totalWidth, totalHeight, onSizeUpdate]);
var parts = F(function () {
return text.split("\n");
}, [text]);
var ts = F(function () {
return common.Utility.textSize(parts, fontFamily, height);
}, [fontFamily, height, parts]);
setTotalWidthUpdate(ts.width);
setTotalHeightUpdate(parts.length * (height + 2) - 2);
var yOffset = -(totalHeight / 2) + (height / 2);
var TextLines = F(function () {
return parts.map(function (p, i) {
return h$1("g", { key: i, transform: "translate(0 ".concat(yOffset + i * (height + 2), ")") },
h$1(TextLine, { text: p, height: height, fontFamily: fontFamily, fill: fill }));
});
}, [fill, fontFamily, height, parts, yOffset]);
return h$1(p$1, null, TextLines);
};
var TextBox = function (_a) {
var text = _a.text, _b = _a.height, height = _b === void 0 ? 12 : _b, _c = _a.fontFamily, fontFamily = _c === void 0 ? "Verdana" : _c, _d = _a.padding, padding = _d === void 0 ? 4 : _d, _e = _a.fill, fill = _e === void 0 ? "whitesmoke" : _e, _f = _a.stroke, stroke = _f === void 0 ? "lightgray" : _f, _g = _a.textFill, textFill = _g === void 0 ? "black" : _g, _h = _a.strokeWidth, strokeWidth = _h === void 0 ? 1 : _h, _j = _a.cornerRadius, cornerRadius = _j === void 0 ? 0 : _j, onSizeUpdate = _a.onSizeUpdate;
var _k = p(0), textWidth = _k[0], setTextWidthUpdate = _k[1];
var _l = p(0), textHeight = _l[0], setTextHeightUpdate = _l[1];
h(function () {
onSizeUpdate && onSizeUpdate({ width: textWidth, height: textHeight });
}, [textWidth, textHeight, onSizeUpdate]);
var onTextSizeUpdate = T(function (size) {
setTextWidthUpdate(size.width);
setTextHeightUpdate(size.height);
}, []);
var w = textWidth + padding * 2 + strokeWidth;
var h$2 = textHeight + padding * 2 + strokeWidth;
var textOffsetY = Math.floor(height / 10);
return h$1(p$1, null,
h$1(Rectangle, { width: w, height: h$2, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
h$1("g", { transform: "translate(0 ".concat(textOffsetY, ")") },
h$1(Text, { text: text, fontFamily: fontFamily, height: height, fill: textFill, onSizeUpdate: onTextSizeUpdate })));
};
var LabelledRect = function (_a) {
var text = _a.text, _b = _a.height, height = _b === void 0 ? 12 : _b, _c = _a.width, width = _c === void 0 ? 12 : _c, _d = _a.fontFamily, fontFamily = _d === void 0 ? "Verdana" : _d, _e = _a.fontSize, fontSize = _e === void 0 ? 10 : _e, _f = _a.padding, padding = _f === void 0 ? 3 : _f, _g = _a.fill, fill = _g === void 0 ? "whitesmoke" : _g, _h = _a.stroke, stroke = _h === void 0 ? "lightgray" : _h, _j = _a.textFill, textFill = _j === void 0 ? "black" : _j, _k = _a.strokeWidth, strokeWidth = _k === void 0 ? 1 : _k, _l = _a.cornerRadius, cornerRadius = _l === void 0 ? 0 : _l; _a.onSizeUpdate;
return h$1(p$1, null,
h$1(Rectangle, { width: width, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
h$1("g", { transform: "translate(".concat(-(width / 2) + padding, " ").concat(-(height / 2) + padding, ")") },
h$1(TextLine, { text: text, fontFamily: fontFamily, height: fontSize, fill: textFill, anchor: "start", baseline: "hanging" })));
};
var IconLabelledRect = function (_a) {
var icon = _a.icon, iconFontFamily = _a.iconFontFamily, text = _a.text, _b = _a.height, height = _b === void 0 ? 12 : _b, _c = _a.width, width = _c === void 0 ? 12 : _c, _d = _a.fontFamily, fontFamily = _d === void 0 ? "Verdana" : _d, _e = _a.fontSize, fontSize = _e === void 0 ? 10 : _e, _f = _a.padding, padding = _f === void 0 ? 3 : _f, _g = _a.fill, fill = _g === void 0 ? "whitesmoke" : _g, _h = _a.stroke, stroke = _h === void 0 ? "lightgray" : _h, _j = _a.textFill, textFill = _j === void 0 ? "black" : _j, _k = _a.strokeWidth, strokeWidth = _k === void 0 ? 1 : _k, _l = _a.cornerRadius, cornerRadius = _l === void 0 ? 0 : _l; _a.onSizeUpdate;
return h$1(p$1, null,
h$1(Rectangle, { width: width, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
h$1("g", { transform: "translate(".concat(-(width / 2) + padding, " ").concat(-(height / 2) + padding, ")") },
h$1(Icon, { shape: "square", imageFontFamily: iconFontFamily, imageChar: icon, height: height, fill: fill, imageCharFill: textFill })),
h$1("g", { transform: "translate(".concat(-(width / 2) + (padding * 2) + height, " ").concat(-(height / 2) + padding, ")") },
h$1(TextLine, { text: text, fontFamily: fontFamily, height: fontSize, fill: textFill, anchor: "start", baseline: "hanging" })));
};
var Annotations = function (_a) {
var x = _a.x, y = _a.y, _b = _a.annotationIDs, annotationIDs = _b === void 0 ? [] : _b, _c = _a.stepSize, stepSize = _c === void 0 ? -16 : _c;
var IconComponents = annotationIDs.map(function (id, i) { return h$1("g", { key: id, transform: "translate(".concat(x + i * stepSize, " ").concat(y, ")") },
h$1("use", { href: "#" + id })); });
return h$1(p$1, null, IconComponents);
};
var Vertex = function (_a) {
var _b = _a.categoryID, categoryID = _b === void 0 ? "" : _b, _c = _a.text, text = _c === void 0 ? "" : _c, _d = _a.textHeight, textHeight = _d === void 0 ? 12 : _d, _e = _a.textPadding, textPadding = _e === void 0 ? 4 : _e, _f = _a.icon, icon = _f === void 0 ? {} : _f, _g = _a.annotationsHeight, annotationsHeight = _g === void 0 ? 12 : _g, _h = _a.annotationIDs, annotationIDs = _h === void 0 ? [] : _h, textFill = _a.textFill, textboxFill = _a.textboxFill, textboxStroke = _a.textboxStroke, textFontFamily = _a.textFontFamily, onSizeUpdate = _a.onSizeUpdate, _j = _a.showLabel, showLabel = _j === void 0 ? true : _j, _k = _a.scale, scale = _k === void 0 ? 1 : _k;
var _l = p(0), textBoxWidth = _l[0], setTextBoxWidthUpdate = _l[1];
var _m = p(0), textBoxHeight = _m[0], setTextBoxHeightUpdate = _m[1];
h(function () {
onSizeUpdate && onSizeUpdate({ width: 0, height: 0 });
}, [textBoxWidth, textBoxHeight, onSizeUpdate]);
icon = __assign({ imageChar: "fa-question", height: 32, fill: "transparent" }, icon);
var width = textBoxWidth;
width += 4;
var offsetY = -(icon.height * 2 / 6 + textHeight + 8) / 2;
var textboxOffsetY = icon.height / 3 + textBoxHeight / 2 + textPadding;
var annotationOffsetY = icon.height / 3 + textBoxHeight + textPadding + annotationsHeight / 3;
if (!showLabel) {
offsetY += (textHeight + 8) / 2;
annotationOffsetY -= textBoxHeight + textPadding;
}
var onTextBoxSizeUpdate = T(function (size) {
setTextBoxWidthUpdate(size.width);
setTextBoxHeightUpdate(size.height);
}, []);
var label = showLabel ? h$1("g", { transform: "translate(0 ".concat(textboxOffsetY, ")") },
h$1(TextBox, { text: text, height: textHeight, padding: textPadding, onSizeUpdate: onTextBoxSizeUpdate, textFill: textFill, fill: textboxFill, stroke: textboxStroke, fontFamily: textFontFamily })) : undefined;
return categoryID ?
h$1("g", { transform: "translate(0 ".concat(offsetY, ") scale(").concat(scale, ")") },
h$1("use", { href: "#" + categoryID }),
label,
h$1(Annotations, { x: width / 2, y: annotationOffsetY, annotationIDs: annotationIDs })) :
h$1("g", { transform: "translate(0 ".concat(offsetY, ") scale(").concat(scale, ")") },
h$1(Icon, __assign({}, icon)),
label);
};
var Vertex2 = function (_a) {
var _b = _a.categoryID, categoryID = _b === void 0 ? "" : _b, _c = _a.text, text = _c === void 0 ? "" : _c, _d = _a.textHeight, textHeight = _d === void 0 ? 12 : _d, _e = _a.textPadding, textPadding = _e === void 0 ? 4 : _e, _f = _a.icon, icon = _f === void 0 ? {} : _f, _g = _a.textFill, textFill = _g === void 0 ? "black" : _g, _h = _a.textboxFill, textboxFill = _h === void 0 ? "white" : _h, _j = _a.textboxStroke, textboxStroke = _j === void 0 ? "black" : _j, textFontFamily = _a.textFontFamily, _k = _a.annotationsHeight, annotationsHeight = _k === void 0 ? 12 : _k, _l = _a.annotationIDs, annotationIDs = _l === void 0 ? [] : _l;
icon = __assign({ imageChar: "fa-question", imageCharFill: "white", height: 32, fill: "black", shape: "square" }, icon);
var textBoxHeight = textHeight + textPadding * 2;
var width = F(function () {
return common.Utility.textSize(text, textFontFamily, textHeight, false);
}, [text, textFontFamily, textHeight]).width;
var stepSize = annotationsHeight;
var textboxStrokeWidth = 1;
var halfTextboxHeight = textBoxHeight / 2;
var offsetX = 0;
var offsetY = -(icon.height * 2 / 6 + textHeight + 8) / 2;
var iconOffsetX = -icon.height / 2;
var iconOffsetY = 0;
var textboxOffsetX = Math.ceil((width / 2) + textPadding);
var textboxOffsetY = halfTextboxHeight - (icon.height / 2);
var annotationOffsetX = stepSize / 2;
var annotationOffsetY = halfTextboxHeight;
return categoryID ?
h$1("g", { transform: "translate(".concat(offsetX, " ").concat(offsetY, ")") },
h$1("g", { transform: "translate(".concat(iconOffsetX, " ").concat(iconOffsetY, ")") },
h$1("use", { href: "#" + categoryID })),
h$1("g", { transform: "translate(".concat(textboxOffsetX, " ").concat(textboxOffsetY, ")") },
h$1(TextBox, { text: text, height: textHeight, padding: textPadding, strokeWidth: textboxStrokeWidth, stroke: textboxStroke, fill: textboxFill, textFill: textFill, fontFamily: textFontFamily })),
h$1(Annotations, { x: annotationOffsetX, y: annotationOffsetY, annotationIDs: annotationIDs, stepSize: stepSize }))
:
h$1(p$1, null,
h$1("g", { transform: "translate(".concat(iconOffsetX, " ").concat(iconOffsetY, ")scale(1.0002)") },
h$1(Icon, __assign({}, icon, { shape: "square" }))),
h$1("g", { transform: "translate(".concat(textboxOffsetX, " ").concat(textboxOffsetY, ")scale(1.0002)") },
h$1(TextBox, { text: text, height: textHeight, padding: textPadding, stroke: textboxStroke, fill: textboxFill })));
};
var Vertex3 = function (_a) {
var _b = _a.text, text = _b === void 0 ? "" : _b, _c = _a.textHeight, textHeight = _c === void 0 ? 10 : _c, _d = _a.textPadding, textPadding = _d === void 0 ? 4 : _d, _e = _a.textFill, textFill = _e === void 0 ? "#287EC4" : _e, _f = _a.textboxFill, textboxFill = _f === void 0 ? "white" : _f, _g = _a.textboxStroke, textboxStroke = _g === void 0 ? "#CCCCCC" : _g, _h = _a.textboxStrokeWidth, textboxStrokeWidth = _h === void 0 ? 1 : _h, _j = _a.textFontFamily, textFontFamily = _j === void 0 ? "Verdana" : _j, _k = _a.annotationGutter, annotationGutter = _k === void 0 ? 2 : _k, _l = _a.annotations, annotations = _l === void 0 ? [] : _l, _m = _a.cornerRadius, cornerRadius = _m === void 0 ? 3 : _m, _o = _a.icon, icon = _o === void 0 ? {} : _o, _p = _a.subText, subText = _p === void 0 ? {} : _p, _q = _a.showLabel, showLabel = _q === void 0 ? true : _q, _r = _a.noLabelRadius, noLabelRadius = _r === void 0 ? 5 : _r, expansionIcon = _a.expansionIcon, _s = _a.scale, scale = _s === void 0 ? 1 : _s;
icon = __assign({ height: 50, imageChar: "?", imageFontFamily: "FontAwesome", imageCharFill: "#555555", fill: "transparent", strokeWidth: 0 }, icon);
subText = __assign({ text: "", fill: "white", textFill: "#555555" }, subText);
expansionIcon = expansionIcon ? __assign({ height: 16, shape: "circle", padding: 6, imageChar: "?", imageFontFamily: "FontAwesome", imageCharFill: "black", fill: "whitesmoke", stroke: "whitesmoke", strokeWidth: 0 }, expansionIcon) : undefined;
var fullAnnotationWidth = 0;
var annoOffsetY = 0;
var labelWidth = F(function () {
return common.Utility.textSize(text, textFontFamily, textHeight, false).width;
}, [text, textFontFamily, textHeight]);
var labelShapeWidth = 0;
if (text !== "") {
labelShapeWidth = labelWidth + (textPadding * 2) + (textboxStrokeWidth * 2);
}
fullAnnotationWidth += labelShapeWidth + annotationGutter;
var textOffsetX = fullAnnotationWidth - (labelShapeWidth / 2);
var textShapeHeight = textHeight + (textPadding * 2) + (textboxStrokeWidth * 2);
var annotationArr = [];
annotations.forEach(function (anno, idx) {
var annoText = anno.imageChar;
var annoShapeWidth = textShapeHeight;
fullAnnotationWidth += annoShapeWidth + annotationGutter;
var annoOffsetX = fullAnnotationWidth - (annoShapeWidth / 2);
annotationArr.push(h$1("g", { key: idx, class: "vertex3-anno", "data-click": "annotation", "data-click-data": JSON.stringify(anno), transform: "translate(".concat(annoOffsetX, " ").concat(annoOffsetY, ")") },
h$1(Icon, __assign({}, anno, { shape: "square", height: textShapeHeight, imageChar: annoText, imageFontFamily: anno.imageFontFamily, cornerRadius: cornerRadius, strokeWidth: 0 }))));
});
if (annotations.length > 0) {
fullAnnotationWidth += annotationGutter * (annotations.length - 1);
}
var textElement = h$1("g", { "data-click": "text", transform: "translate(".concat(textOffsetX, " ").concat(annoOffsetY, ")") }, !showLabel || text === "" ? h$1("circle", { r: noLabelRadius, stroke: textboxStroke, fill: textFill }) : h$1(TextBox, { text: text, height: textHeight, padding: textPadding, strokeWidth: textboxStrokeWidth, stroke: textboxStroke, fill: textboxFill, textFill: textFill, fontFamily: textFontFamily, cornerRadius: cornerRadius }));
var iconHeight = icon.height || 20;
var iconStrokeWidth = icon.strokeWidth || 0;
var iconOffsetX = 0;
var iconOffsetY = 0;
var subTextOffsetX = 0;
var subTextOffsetY = textShapeHeight + (annotationGutter * 2);
if (text !== "" || annotationArr.length > 0) {
iconOffsetY = -(iconHeight / 2) - (iconStrokeWidth) - (textShapeHeight / 2) - (annotationGutter * 2);
}
else if (subText.text !== "") {
subTextOffsetY = (iconHeight / 2) + iconStrokeWidth + (annotationGutter * 2);
}
var subtextElement = subText.text === "" ? null : h$1("g", { "data-click": "subtext", transform: "translate(".concat(subTextOffsetX, " ").concat(subTextOffsetY, ")") },
h$1(TextBox, __assign({ fill: subText.fill || "#FFFFFF", textFill: subText.textFill || textFill }, subText, { height: textHeight, padding: textPadding, strokeWidth: 0, stroke: textboxStroke, fontFamily: textFontFamily, cornerRadius: cornerRadius })));
return h$1("g", { transform: "scale(".concat(scale, ")") },
h$1("g", { "data-click": "icon", transform: "translate(".concat(iconOffsetX, " ").concat(iconOffsetY, ")") },
h$1(Icon, __assign({}, icon)),
expansionIcon &&
h$1("g", { "data-click": "expanded-icon", "data-click-data": JSON.stringify(expansionIcon), transform: "translate(".concat((icon.height + iconStrokeWidth) / 2 - expansionIcon.height / 2, " ").concat(-(icon.height + iconStrokeWidth) / 2 + expansionIcon.height / 2, ")") },
h$1(Icon, __assign({}, expansionIcon)))),
h$1("g", { transform: "translate(".concat(-fullAnnotationWidth / 2, " ").concat(annoOffsetY, ")") },
textElement,
annotationArr),
subtextElement);
};
var CentroidVertex3 = function (_a) {
var id = _a.id, _b = _a.categoryID, categoryID = _b === void 0 ? "" : _b, _c = _a.text, text = _c === void 0 ? "" : _c, _d = _a.textHeight, textHeight = _d === void 0 ? 12 : _d, _e = _a.textPadding, textPadding = _e === void 0 ? 10 : _e, _f = _a.textFill, textFill = _f === void 0 ? "#287EC4" : _f, _g = _a.textboxFill, textboxFill = _g === void 0 ? "white" : _g, _h = _a.textboxStroke, textboxStroke = _h === void 0 ? "#CCCCCC" : _h, _j = _a.textboxStrokeWidth, textboxStrokeWidth = _j === void 0 ? 1 : _j, _k = _a.textFontFamily, textFontFamily = _k === void 0 ? "Verdana" : _k, _l = _a.annotationGutter, annotationGutter = _l === void 0 ? 2 : _l, _m = _a.annotations, annotations = _m === void 0 ? [] : _m, cornerRadius = _a.cornerRadius, _o = _a.icon, icon = _o === void 0 ? {} : _o, _p = _a.subText, subText = _p === void 0 ? {} : _p, expansionIcon = _a.expansionIcon, _q = _a.scale, scale = _q === void 0 ? 1 : _q;
icon = __assign({ height: 91, padding: 40, imageCharFill: "#555555", imageFontFamily: "FontAwesome", fill: "#FFCC33", stroke: "#DFDFDF", imageChar: "?", strokeWidth: 4, yOffset: -15 }, icon);
subText = __assign({ text: "", fill: "transparent", textFill: "#555555" }, subText);
var props = {
id: id,
categoryID: categoryID,
text: text,
textHeight: textHeight,
textPadding: textPadding,
textFill: textFill,
textboxFill: textboxFill,
textboxStroke: textboxStroke,
textboxStrokeWidth: textboxStrokeWidth,
textFontFamily: textFontFamily,
annotationGutter: annotationGutter,
annotations: annotations,
cornerRadius: cornerRadius,
icon: icon,
subText: subText,
expansionIcon: expansionIcon,
scale: scale
};
return h$1(Vertex3, __assign({}, props, { icon: icon, subText: subText }));
};
var Vertex4 = function (_a) {
_a.categoryID; var _c = _a.text, text = _c === void 0 ? "" : _c, _d = _a.textHeight, textHeight = _d === void 0 ? 10 : _d, _e = _a.textPadding, textPadding = _e === void 0 ? 4 : _e, _f = _a.textFill, textFill = _f === void 0 ? "#287EC4" : _f, _g = _a.textboxFill, textboxFill = _g === void 0 ? "white" : _g, _h = _a.textboxStroke, textboxStroke = _h === void 0 ? "#CCCCCC" : _h, _j = _a.textboxStrokeWidth, textboxStrokeWidth = _j === void 0 ? 1 : _j, _k = _a.textFontFamily, textFontFamily = _k === void 0 ? "Verdana" : _k, _l = _a.annotationGutter, annotationGutter = _l === void 0 ? 2 : _l, _m = _a.annotations, annotations = _m === void 0 ? [] : _m, _o = _a.iconAnnotations, iconAnnotations = _o === void 0 ? [] : _o, _p = _a.cornerRadius, cornerRadius = _p === void 0 ? 3 : _p, _q = _a.icon, icon = _q === void 0 ? {} : _q, _r = _a.subText, subText = _r === void 0 ? {} : _r, _s = _a.showLabel, showLabel = _s === void 0 ? true : _s, _t = _a.noLabelRadius, noLabelRadius = _t === void 0 ? 5 : _t, _u = _a.iconBorderWidth, iconBorderWidth = _u === void 0 ? 1 : _u, _v = _a.iconBorderColor, iconBorderColor = _v === void 0 ? "#333" : _v, _w = _a.iconBackgroundColor, iconBackgroundColor = _w === void 0 ? "#fff" : _w, _x = _a.iconFontColor, iconFontColor = _x === void 0 ? "#000" : _x, _y = _a.iconFontSize, iconFontSize = _y === void 0 ? 20 : _y, _z = _a.iconFontFamily, iconFontFamily = _z === void 0 ? "FontAwesome" : _z, _0 = _a.shapeOffsetX, shapeOffsetX = _0 === void 0 ? 0 : _0, _1 = _a.shapeOffsetY, shapeOffsetY = _1 === void 0 ? 0 : _1, _2 = _a.iconOffsetX, iconOffsetX = _2 === void 0 ? 0 : _2, _3 = _a.iconOffsetY, iconOffsetY = _3 === void 0 ? 0 : _3, _4 = _a.iconPadding, iconPadding = _4 === void 0 ? 4 : _4, _5 = _a.iconText, iconText = _5 === void 0 ? "?" : _5, _6 = _a.shapeRendering, shapeRendering = _6 === void 0 ? "auto" : _6;
icon = __assign({ height: 50, imageChar: "?", imageFontFamily: "FontAwesome", imageCharFill: "#555555", fill: "transparent", strokeWidth: 0 }, icon);
subText = __assign({ text: "", fill: "white", textFill: "#555555" }, subText);
var annoOffsetY = 0;
var labelWidth = F(function () {
return common.Utility.textSize(text, textFontFamily, textHeight, false).width;
}, [text, textFontFamily, textHeight]);
var labelShapeWidth = 0;
if (text !== "") {
labelShapeWidth = labelWidth + (textPadding * 2) + (textboxStrokeWidth * 2);
}
var fullAnnotationWidth = labelShapeWidth + annotationGutter;
var textOffsetX = fullAnnotationWidth - (labelShapeWidth / 2);
var textShapeHeight = textHeight + (annotationGutter * 2) + (textboxStrokeWidth * 2);
var annoWidthArr = annotations.map(function (anno, i) {
return common.Utility.textSize(anno.imageChar, anno.imageFontFamily, anno.height, false).width;
});
var annotationArr = [];
var _labelAnnoOffsetX = fullAnnotationWidth;
annotations.forEach(function (anno, i) {
var _a;
var annoText = anno.imageChar;
var annoTextHeight = (_a = anno.height) !== null && _a !== void 0 ? _a : textShapeHeight;
_labelAnnoOffsetX += annoWidthArr[i] + annotationGutter;
var annoOffsetX = _labelAnnoOffsetX - (annoWidthArr[i] / 2);
annotationArr.push(h$1("g", { key: i, class: "vertex3-anno", "data-click": "annotation", "data-click-data": JSON.stringify(anno), transform: "translate(".concat(annoOffsetX, " ").concat(annoOffsetY, ")") },
h$1(Icon, __assign({}, anno, { shape: "rectangle", width: annoWidthArr[i], height: annoTextHeight, imageChar: annoText, imageFontFamily: anno.imageFontFamily, cornerRadius: cornerRadius, strokeWidth: 0 }))));
});
if (annotations.length > 0) {
fullAnnotationWidth += annotationGutter * (annotations.length - 1);
}
var iconAnnotationArr = [];
iconAnnotations.forEach(function (anno, i) {
var _a;
var x = anno.shapeOffsetX;
var y = anno.shapeOffsetY;
iconAnnotationArr.push(h$1("g", { key: i, class: "vertex3-iconAnno", "data-click": "icon-annotation", "data-click-data": JSON.stringify(anno), transform: "translate(".concat(x, " ").concat(y, ")") },
h$1(Icon, __assign({}, anno, { shape: (_a = anno.shape) !== null && _a !== void 0 ? _a : "square", imageChar: anno.imageChar, imageFontFamily: anno.imageFontFamily, cornerRadius: cornerRadius, stroke: anno.stroke, strokeWidth: anno.strokeWidth }))));
});
var textElement = h$1("g", { "data-click": "text", transform: "translate(".concat(textOffsetX, " ").concat(annoOffsetY, ")") }, !showLabel || text === "" ? h$1("circle", { r: noLabelRadius, stroke: textboxStroke, fill: textFill }) : h$1(TextBox, { text: text, height: textHeight, padding: textPadding, strokeWidth: textboxStrokeWidth, stroke: textboxStroke, fill: textboxFill, textFill: textFill, fontFamily: textFontFamily, cornerRadius: cornerRadius }));
var subTextOffsetX = 0;
var subTextOffsetY = textShapeHeight + (annotationGutter * 2);
var subtextElement = subText.text === "" ? null : h$1("g", { "data-click": "subtext", transform: "translate(".concat(subTextOffsetX, " ").concat(subTextOffsetY, ")") },
h$1(TextBox, __assign({ fill: subText.fill || "#FFFFFF", textFill: subText.textFill || textFill }, subText, { height: textHeight, padding: textPadding, strokeWidth: 0, stroke: textboxStroke, fontFamily: textFontFamily, cornerRadius: cornerRadius })));
return h$1("g", null,
h$1("g", { "data-click": "icon", transform: "translate(".concat(shapeOffsetX, " ").concat(shapeOffsetY, ")") },
h$1(Icon, __assign({}, icon, { strokeWidth: iconBorderWidth, shape: "circle", height: iconFontSize, fill: iconBackgroundColor, stroke: iconBorderColor, imageFontFamily: iconFontFamily, imageChar: iconText, imageCharFill: iconFontColor, padding: iconPadding, xOffset: iconOffsetX, yOffset: iconOffsetY, cornerRadius: cornerRadius, shapeRendering: shapeRendering })),
iconAnnotationArr),
h$1("g", { transform: "translate(".concat(-fullAnnotationWidth / 2, " ").concat(annoOffsetY, ")") },
textElement,
annotationArr),
subtextElement);
};
var CentroidVertex4 = function (_a) {
var id = _a.id, _b = _a.categoryID, categoryID = _b === void 0 ? "" : _b, _c = _a.text, text = _c === void 0 ? "" : _c, _d = _a.textHeight, textHeight = _d === void 0 ? 12 : _d, _e = _a.textPadding, textPadding = _e === void 0 ? 10 : _e, _f = _a.textFill, textFill = _f === void 0 ? "#287EC4" : _f, _g = _a.textboxFill, textboxFill = _g === void 0 ? "white" : _g, _h = _a.textboxStroke, textboxStroke = _h === void 0 ? "#CCCCCC" : _h, _j = _a.textboxStrokeWidth, textboxStrokeWidth = _j === void 0 ? 1 : _j, _k = _a.textFontFamily, textFontFamily = _k === void 0 ? "Verdana" : _k, _l = _a.annotationGutter, annotationGutter = _l === void 0 ? 2 : _l, _m = _a.annotations, annotations = _m === void 0 ? [] : _m, _o = _a.iconAnnotations, iconAnnotations = _o === void 0 ? [] : _o, cornerRadius = _a.cornerRadius, _p = _a.icon, icon = _p === void 0 ? {} : _p, _q = _a.subText, subText = _q === void 0 ? {} : _q, _r = _a.showLabel, showLabel = _r === void 0 ? true : _r, _s = _a.noLabelRadius, noLabelRadius = _s === void 0 ? 5 : _s, _t = _a.iconBorderWidth, iconBorderWidth = _t === void 0 ? 1 : _t, _u = _a.iconBorderColor, iconBorderColor = _u === void 0 ? "#333" : _u, _v = _a.iconBackgroundColor, iconBackgroundColor = _v === void 0 ? "#fff" : _v, _w = _a.iconFontColor, iconFontColor = _w === void 0 ? "#000" : _w, _x = _a.iconFontSize, iconFontSize = _x === void 0 ? 20 : _x, _y = _a.iconFontFamily, iconFontFamily = _y === void 0 ? "FontAwesome" : _y, _z = _a.shapeOffsetX, shapeOffsetX = _z === void 0 ? 0 : _z, _0 = _a.shapeOffsetY, shapeOffsetY = _0 === void 0 ? 0 : _0, _1 = _a.iconOffsetX, iconOffsetX = _1 === void 0 ? 0 : _1, _2 = _a.iconOffsetY, iconOffsetY = _2 === void 0 ? 0 : _2, _3 = _a.iconPadding, iconPadding = _3 === void 0 ? 4 : _3, _4 = _a.iconText, iconText = _4 === void 0 ? "?" : _4, _5 = _a.shapeRendering, shapeRendering = _5 === void 0 ? "auto" : _5;
icon = __assign({ height: 91, padding: 40, imageCharFill: "#555555", imageFontFamily: "FontAwesome", fill: "#FFCC33", stroke: "#DFDFDF", imageChar: "?", strokeWidth: 4, yOffset: -15 }, icon);
subText = __assign({ text: "", fill: "transparent", textFill: "#555555" }, subText);
var props = {
id: id,
categoryID: categoryID,
text: text,
textHeight: textHeight,
textPadding: textPadding,
textFill: textFill,
textboxFill: textboxFill,
textboxStroke: textboxStroke,
textboxStrokeWidth: textboxStrokeWidth,
textFontFamily: textFontFamily,
annotationGutter: annotationGutter,
annotations: annotations,
iconAnnotations: iconAnnotations,
cornerRadius: cornerRadius,
icon: icon,
subText: subText,
showLabel: showLabel,
noLabelRadius: noLabelRadius,
iconBorderWidth: iconBorderWidth,
iconBorderColor: iconBorderColor,
iconBackgroundColor: iconBackgroundColor,
iconFontColor: iconFontColor,
iconFontSize: iconFontSize,
iconFontFamily: iconFontFamily,
shapeOffsetX: shapeOffsetX,
shapeOffsetY: shapeOffsetY,
iconOffsetX: iconOffsetX,
iconOffsetY: iconOffsetY,
iconPadding: iconPadding,
iconText: iconText,
shapeRendering: shapeRendering
};
return h$1(Vertex4, __assign({}, props, { icon: icon, subText: subText }));
};
var Subgraph = function (_a) {
var text = _a.text, _b = _a.width, width = _b === void 0 ? 100 : _b, _c = _a.height, height = _c === void 0 ? 100 : _c, _d = _a.fill, fill = _d === void 0 ? "transparent" : _d, _e = _a.stroke, stroke = _e === void 0 ? "black" : _e, _f = _a.fontHeight, fontHeight = _f === void 0 ? 12 : _f, fontFamily = _a.fontFamily;
var tSize = common.Utility.textSize(text, fontFamily, fontHeight, false);
return h$1(p$1, null,
h$1(Rectangle, { width: width, height: height, fill: fill, stroke: stroke }),
h$1("g", { transform: "translate(".concat((-width + tSize.width) / 2 + 4, " ").concat((-height + tSize.height) / 2 + 4, ")") },
h$1(Text, { height: fontHeight, text: text, fontFamily: fontFamily })));
};
exports.Annotations = Annotations;
exports.BUILD_VERSION = BUILD_VERSION$1;
exports.CentroidVertex3 = CentroidVertex3;
exports.CentroidVertex4 = CentroidVertex4;
exports.Circle = Circle;
exports.Edge = Edge;
exports.HTMLAdapter = HTMLAdapter;
exports.Icon = Icon;
exports.IconLabelledRect = IconLabelledRect;
exports.Icons = Icons;
exports.ImageChar = ImageChar;
exports.LabelledRect = LabelledRect;
exports.PKG_NAME = PKG_NAME$1;
exports.PKG_VERSION = PKG_VERSION$1;
exports.React = index_es6;
exports.Rectangle = Rectangle;
exports.SVGAdapter = SVGAdapter;
exports.Shape = Shape;
exports.Square = Square;
exports.Subgraph = Subgraph;
exports.Text = Text;
exports.TextBox = TextBox;
exports.TextLine = TextLine;
exports.Vertex = Vertex;
exports.Vertex2 = Vertex2;
exports.Vertex3 = Vertex3;
exports.Vertex4 = Vertex4;
exports.render = render;
exports.svgRender = svgRender;
Object.defineProperty(exports, '__esModule', { value: true });
}));
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@hpcc-js/common")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["@hpcc-js/react"]={},t["@hpcc-js/common"])}(this,(function(t,e){"use strict";var n,i,o,r,a,l={},_=[],s=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function c(t,e){for(var n in e)t[n]=e[n];return t}function h(t){var e=t.parentNode;e&&e.removeChild(t)}function d(t,e,i){var o,r,a,l={};for(a in e)"key"==a?o=e[a]:"ref"==a?r=e[a]:l[a]=e[a];if(arguments.length>2&&(l.children=arguments.length>3?n.call(arguments,2):i),"function"==typeof t&&null!=t.defaultProps)for(a in t.defaultProps)void 0===l[a]&&(l[a]=t.defaultProps[a]);return u(t,l,o,r,null)}function u(t,e,n,r,a){var l={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++o:a};return null==a&&null!=i.vnode&&i.vnode(l),l}function f(t){return t.children}function p(t,e){this.props=t,this.context=e}function v(t,e){if(null==e)return t.__?v(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?v(t):null}function g(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return g(t)}}function x(t){(!t.__d&&(t.__d=!0)&&r.push(t)&&!y.__r++||a!==i.debounceRendering)&&((a=i.debounceRendering)||setTimeout)(y)}function y(){for(var t;y.__r=r.length;)t=r.sort((function(t,e){return t.__v.__b-e.__v.__b})),r=[],t.some((function(t){var e,n,i,o,r,a;t.__d&&(r=(o=(e=t).__v).__e,(a=e.__P)&&(n=[],(i=c({},o)).__v=o.__v+1,R(a,o,i,e.__n,void 0!==a.ownerSVGElement,null!=o.__h?[r]:null,n,null==r?v(o):r,o.__h),W(n,o),o.__e!=r&&g(o)))}))}function m(t,e,n,i,o,r,a,s,c,h){var d,p,g,x,y,m,b,C=i&&i.__k||_,w=C.length;for(n.__k=[],d=0;d<e.length;d++)if(null!=(x=n.__k[d]=null==(x=e[d])||"boolean"==typeof x?null:"string"==typeof x||"number"==typeof x||"bigint"==typeof x?u(null,x,null,null,x):Array.isArray(x)?u(f,{children:x},null,null,null):x.__b>0?u(x.type,x.props,x.key,x.ref?x.ref:null,x.__v):x)){if(x.__=n,x.__b=n.__b+1,null===(g=C[d])||g&&x.key==g.key&&x.type===g.type)C[d]=void 0;else for(p=0;p<w;p++){if((g=C[p])&&x.key==g.key&&x.type===g.type){C[p]=void 0;break}g=null}R(t,x,g=g||l,o,r,a,s,c,h),y=x.__e,(p=x.ref)&&g.ref!=p&&(b||(b=[]),g.ref&&b.push(g.ref,null,x),b.push(p,x.__c||y,x)),null!=y?(null==m&&(m=y),"function"==typeof x.type&&x.__k===g.__k?x.__d=c=k(x,c,t):c=F(t,x,g,C,y,c),"function"==typeof n.type&&(n.__d=c)):c&&g.__e==c&&c.parentNode!=t&&(c=v(g))}for(n.__e=m,d=w;d--;)null!=C[d]&&E(C[d],C[d]);if(b)for(d=0;d<b.length;d++)T(b[d],b[++d],b[++d])}function k(t,e,n){for(var i,o=t.__k,r=0;o&&r<o.length;r++)(i=o[r])&&(i.__=t,e="function"==typeof i.type?k(i,e,n):F(n,i,i,o,i.__e,e));return e}function F(t,e,n,i,o,r){var a,l,_;if(void 0!==e.__d)a=e.__d,e.__d=void 0;else if(null==n||o!=r||null==o.parentNode)t:if(null==r||r.parentNode!==t)t.appendChild(o),a=null;else{for(l=r,_=0;(l=l.nextSibling)&&_<i.length;_+=2)if(l==o)break t;t.insertBefore(o,r),a=r}return void 0!==a?a:o.nextSibling}function b(t,e,n){"-"===e[0]?t.setProperty(e,n):t[e]=null==n?"":"number"!=typeof n||s.test(e)?n:n+"px"}function C(t,e,n,i,o){var r;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof i&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||b(t.style,e,"");if(n)for(e in n)i&&n[e]===i[e]||b(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])r=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=n,n?i||t.addEventListener(e,r?S:w,r):t.removeEventListener(e,r?S:w,r);else if("dangerouslySetInnerHTML"!==e){if(o)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null==n||!1===n&&-1==e.indexOf("-")?t.removeAttribute(e):t.setAttribute(e,n))}}function w(t){this.l[t.type+!1](i.event?i.event(t):t)}function S(t){this.l[t.type+!0](i.event?i.event(t):t)}function R(t,e,n,o,r,a,l,_,s){var h,d,u,v,g,x,y,k,F,b,C,w,S,R,W,T=e.type;if(void 0!==e.constructor)return null;null!=n.__h&&(s=n.__h,_=e.__e=n.__e,e.__h=null,a=[_]),(h=i.__b)&&h(e);try{t:if("function"==typeof T){if(k=e.props,F=(h=T.contextType)&&o[h.__c],b=h?F?F.props.value:h.__:o,n.__c?y=(d=e.__c=n.__c).__=d.__E:("prototype"in T&&T.prototype.render?e.__c=d=new T(k,b):(e.__c=d=new p(k,b),d.constructor=T,d.render=P),F&&F.sub(d),d.props=k,d.state||(d.state={}),d.context=b,d.__n=o,u=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=T.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=c({},d.__s)),c(d.__s,T.getDerivedStateFromProps(k,d.__s))),v=d.props,g=d.state,u)null==T.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==T.getDerivedStateFromProps&&k!==v&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(k,b),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(k,d.__s,b)||e.__v===n.__v){for(d.props=k,d.state=d.__s,e.__v!==n.__v&&(d.__d=!1),d.__v=e,e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),C=0;C<d._sb.length;C++)d.__h.push(d._sb[C]);d._sb=[],d.__h.length&&l.push(d);break t}null!=d.componentWillUpdate&&d.componentWillUpdate(k,d.__s,b),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(v,g,x)}))}if(d.context=b,d.props=k,d.__v=e,d.__P=t,w=i.__r,S=0,"prototype"in T&&T.prototype.render){for(d.state=d.__s,d.__d=!1,w&&w(e),h=d.render(d.props,d.state,d.context),R=0;R<d._sb.length;R++)d.__h.push(d._sb[R]);d._sb=[]}else do{d.__d=!1,w&&w(e),h=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++S<25);d.state=d.__s,null!=d.getChildContext&&(o=c(c({},o),d.getChildContext())),u||null==d.getSnapshotBeforeUpdate||(x=d.getSnapshotBeforeUpdate(v,g)),W=null!=h&&h.type===f&&null==h.key?h.props.children:h,m(t,Array.isArray(W)?W:[W],e,n,o,r,a,l,_,s),d.base=e.__e,e.__h=null,d.__h.length&&l.push(d),y&&(d.__E=d.__=null),d.__e=!1}else null==a&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=O(n.__e,e,n,o,r,a,l,s);(h=i.diffed)&&h(e)}catch(t){e.__v=null,(s||null!=a)&&(e.__e=_,e.__h=!!s,a[a.indexOf(_)]=null),i.__e(t,e,n)}}function W(t,e){i.__c&&i.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){i.__e(t,e.__v)}}))}function O(t,e,i,o,r,a,_,s){var c,d,u,f=i.props,p=e.props,g=e.type,x=0;if("svg"===g&&(r=!0),null!=a)for(;x<a.length;x++)if((c=a[x])&&"setAttribute"in c==!!g&&(g?c.localName===g:3===c.nodeType)){t=c,a[x]=null;break}if(null==t){if(null===g)return document.createTextNode(p);t=r?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,p.is&&p),a=null,s=!1}if(null===g)f===p||s&&t.data===p||(t.data=p);else{if(a=a&&n.call(t.childNodes),d=(f=i.props||l).dangerouslySetInnerHTML,u=p.dangerouslySetInnerHTML,!s){if(null!=a)for(f={},x=0;x<t.attributes.length;x++)f[t.attributes[x].name]=t.attributes[x].value;(u||d)&&(u&&(d&&u.__html==d.__html||u.__html===t.innerHTML)||(t.innerHTML=u&&u.__html||""))}if(function(t,e,n,i,o){var r;for(r in n)"children"===r||"key"===r||r in e||C(t,r,null,n[r],i);for(r in e)o&&"function"!=typeof e[r]||"children"===r||"key"===r||"value"===r||"checked"===r||n[r]===e[r]||C(t,r,e[r],n[r],i)}(t,p,f,r,s),u)e.__k=[];else if(x=e.props.children,m(t,Array.isArray(x)?x:[x],e,i,o,r&&"foreignObject"!==g,a,_,a?a[0]:i.__k&&v(i,0),s),null!=a)for(x=a.length;x--;)null!=a[x]&&h(a[x]);s||("value"in p&&void 0!==(x=p.value)&&(x!==t.value||"progress"===g&&!x||"option"===g&&x!==f.value)&&C(t,"value",x,f.value,!1),"checked"in p&&void 0!==(x=p.checked)&&x!==t.checked&&C(t,"checked",x,f.checked,!1))}return t}function T(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){i.__e(t,n)}}function E(t,e,n){var o,r;if(i.unmount&&i.unmount(t),(o=t.ref)&&(o.current&&o.current!==t.__e||T(o,null,e)),null!=(o=t.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(t){i.__e(t,e)}o.base=o.__P=null,t.__c=void 0}if(o=t.__k)for(r=0;r<o.length;r++)o[r]&&E(o[r],e,n||"function"!=typeof t.type);n||null==t.__e||h(t.__e),t.__=t.__e=t.__d=void 0}function P(t,e,n){return this.constructor(t,n)}function H(t,e,o){var r,a,_;i.__&&i.__(t,e),a=(r="function"==typeof o)?null:o&&o.__k||e.__k,_=[],R(e,t=(!r&&o||e).__k=d(f,null,[t]),a||l,l,void 0!==e.ownerSVGElement,!r&&o?[o]:a?null:e.firstChild?n.call(e.childNodes):null,_,!r&&o?o:a?a.__e:e.firstChild,r),W(_,t)}n=_.slice,i={__e:function(t,e,n,i){for(var o,r,a;e=e.__;)if((o=e.__c)&&!o.__)try{if((r=o.constructor)&&null!=r.getDerivedStateFromError&&(o.setState(r.getDerivedStateFromError(t)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(t,i||{}),a=o.__d),a)return o.__E=o}catch(e){t=e}throw t}},o=0,p.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=c({},this.state),"function"==typeof t&&(t=t(c({},n),this.props)),t&&c(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),x(this))},p.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),x(this))},p.prototype.render=f,r=[],y.__r=0;var A,N,D,M,I=0,V=[],L=[],U=i.__b,z=i.__r,j=i.diffed,q=i.__c,B=i.unmount;function G(t,e){i.__h&&i.__h(N,t,I||e),I=0;var n=N.__H||(N.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:L}),n.__[t]}function X(t){return I=1,Y(ot,t)}function Y(t,e,n){var i=G(A++,2);if(i.t=t,!i.__c&&(i.__=[n?n(e):ot(void 0,e),function(t){var e=i.__N?i.__N[0]:i.__[0],n=i.t(e,t);e!==n&&(i.__N=[n,i.__[1]],i.__c.setState({}))}],i.__c=N,!N.u)){N.u=!0;var o=N.shouldComponentUpdate;N.shouldComponentUpdate=function(t,e,n){if(!i.__c.__H)return!0;var r=i.__c.__H.__.filter((function(t){return t.__c}));if(r.every((function(t){return!t.__N})))return!o||o.call(this,t,e,n);var a=!1;return r.forEach((function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(a=!0)}})),!(!a&&i.__c.props===t)&&(!o||o.call(this,t,e,n))}}return i.__N||i.__}function J(t,e){var n=G(A++,3);!i.__s&&it(n.__H,e)&&(n.__=t,n.i=e,N.__H.__h.push(n))}function K(t,e){var n=G(A++,7);return it(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function $(t,e){return I=8,K((function(){return t}),e)}function Z(){for(var t;t=V.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(et),t.__H.__h.forEach(nt),t.__H.__h=[]}catch(e){t.__H.__h=[],i.__e(e,t.__v)}}i.__b=function(t){"function"!=typeof t.type||t.__m||null===t.__?t.__m||(t.__m=t.__&&t.__.__m?t.__.__m:""):t.__m=(t.__&&t.__.__m?t.__.__m:"")+(t.__&&t.__.__k?t.__.__k.indexOf(t):0),N=null,U&&U(t)},i.__r=function(t){z&&z(t),A=0;var e=(N=t.__c).__H;e&&(D===N?(e.__h=[],N.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=L,t.__N=t.i=void 0}))):(e.__h.forEach(et),e.__h.forEach(nt),e.__h=[])),D=N},i.diffed=function(t){j&&j(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==V.push(e)&&M===i.requestAnimationFrame||((M=i.requestAnimationFrame)||tt)(Z)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==L&&(t.__=t.__V),t.i=void 0,t.__V=L}))),D=N=null},i.__c=function(t,e){e.some((function(t){try{t.__h.forEach(et),t.__h=t.__h.filter((function(t){return!t.__||nt(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],i.__e(n,t.__v)}})),q&&q(t,e)},i.unmount=function(t){B&&B(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{et(t)}catch(t){e=t}})),n.__H=void 0,e&&i.__e(e,n.__v))};var Q="function"==typeof requestAnimationFrame;function tt(t){var e,n=function(){clearTimeout(i),Q&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(n,100);Q&&(e=requestAnimationFrame(n))}function et(t){var e=N,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),N=e}function nt(t){var e=N;t.__c=t.__(),N=e}function it(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function ot(t,e){return"function"==typeof e?e(t):e}var rt=Object.freeze({__proto__:null,BUILD_VERSION:"2.104.13",Component:p,Fragment:f,PKG_NAME:"@hpcc-js/preact-shim",PKG_VERSION:"2.16.3",createElement:d,h:d,render:H,useCallback:$,useEffect:J,useMemo:K,useReducer:Y,useState:X}),at=Math.PI,lt=2*at,_t=1e-6,st=lt-_t;function ct(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function ht(){return new ct}function dt(t){return function(){return t}}function ut(t){this._context=t}function ft(t){return new ut(t)}function pt(t){return t[0]}function vt(t){return t[1]}function gt(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function xt(t){this._context=t}ct.prototype=ht.prototype={constructor:ct,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,i){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(t,e,n,i,o,r){this._+="C"+ +t+","+ +e+","+ +n+","+ +i+","+(this._x1=+o)+","+(this._y1=+r)},arcTo:function(t,e,n,i,o){t=+t,e=+e,n=+n,i=+i,o=+o;var r=this._x1,a=this._y1,l=n-t,_=i-e,s=r-t,c=a-e,h=s*s+c*c;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>_t)if(Math.abs(c*l-_*s)>_t&&o){var d=n-r,u=i-a,f=l*l+_*_,p=d*d+u*u,v=Math.sqrt(f),g=Math.sqrt(h),x=o*Math.tan((at-Math.acos((f+h-p)/(2*v*g)))/2),y=x/g,m=x/v;Math.abs(y-1)>_t&&(this._+="L"+(t+y*s)+","+(e+y*c)),this._+="A"+o+","+o+",0,0,"+ +(c*d>s*u)+","+(this._x1=t+m*l)+","+(this._y1=e+m*_)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,i,o,r){t=+t,e=+e,r=!!r;var a=(n=+n)*Math.cos(i),l=n*Math.sin(i),_=t+a,s=e+l,c=1^r,h=r?i-o:o-i;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+_+","+s:(Math.abs(this._x1-_)>_t||Math.abs(this._y1-s)>_t)&&(this._+="L"+_+","+s),n&&(h<0&&(h=h%lt+lt),h>st?this._+="A"+n+","+n+",0,1,"+c+","+(t-a)+","+(e-l)+"A"+n+","+n+",0,1,"+c+","+(this._x1=_)+","+(this._y1=s):h>_t&&(this._+="A"+n+","+n+",0,"+ +(h>=at)+","+c+","+(this._x1=t+n*Math.cos(o))+","+(this._y1=e+n*Math.sin(o))))},rect:function(t,e,n,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}},ut.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},xt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:gt(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:gt(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var yt=function(){var t=pt,e=vt,n=dt(!0),i=null,o=ft,r=null;function a(a){var l,_,s,c=a.length,h=!1;for(null==i&&(r=o(s=ht())),l=0;l<=c;++l)!(l<c&&n(_=a[l],l,a))===h&&((h=!h)?r.lineStart():r.lineEnd()),h&&r.point(+t(_,l,a),+e(_,l,a));if(s)return r=null,s+""||null}return a.x=function(e){return arguments.length?(t="function"==typeof e?e:dt(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:dt(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:dt(!!t),a):n},a.curve=function(t){return arguments.length?(o=t,null!=i&&(r=o(i)),a):o},a.context=function(t){return arguments.length?(null==t?i=r=null:r=o(i=t),a):i},a}().x((function(t){return t[0]})).y((function(t){return t[1]})).curve((function(t){return new xt(t)}));var mt=function(t){var n=t.x,i=t.y,o=void 0===i?0:i,r=t.height,a=void 0===r?12:r,l=t.fill,_=t.stroke,s=t.fontFamily,c=void 0===s?"FontAwesome":s,h=t.char,u=void 0===h?"":h,f=K((function(){return"FontAwesome"===c?e.Utility.faChar(u):u}),[u,c]);return d("text",{x:n,y:o,fill:l,stroke:_,"font-family":c,"font-size":"".concat(a,"px"),"dominant-baseline":"middle",style:"text-anchor: middle;alignment-baseline:middle;"},f)},kt=function(t,e){return kt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},kt(t,e)};function Ft(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}kt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var bt=function(){return bt=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},bt.apply(this,arguments)};function Ct(t,e,n,i){var o,r=arguments.length,a=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(a=(r<3?o(a):r>3?o(e,n,a):o(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}function wt(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}var St=function(t){var e=t.radius,n=void 0===e?32:e,i=t.fill,o=void 0===i?"navy":i,r=t.stroke,a=void 0===r?o:r,l=t.strokeWidth;return d("circle",{r:n,fill:o,stroke:a,"stroke-width":void 0===l?1:l,"shape-rendering":t.shapeRendering})},Rt=function(t){var e=t.radius,n=void 0===e?30:e,i=t.cornerRadius,o=void 0===i?0:i,r=t.fill,a=void 0===r?"white":r,l=t.stroke,_=t.strokeWidth;return d("rect",{x:-n,y:-n,rx:o,ry:o,width:2*n,height:2*n,fill:a,stroke:l||a,"stroke-width":void 0===_?1:_,"shape-rendering":t.shapeRendering})},Wt=function(t){var e=t.width,n=void 0===e?30:e,i=t.height,o=void 0===i?30:i,r=t.cornerRadius,a=void 0===r?0:r,l=t.fill,_=void 0===l?"white":l,s=t.stroke,c=void 0===s?"black":s,h=t.strokeWidth;return d("rect",{x:-n/2,y:-o/2,rx:a,ry:a,width:n,height:o,fill:_,stroke:c||_,"stroke-width":void 0===h?1:h,"shape-rendering":t.shapeRendering})},Ot=function(t){var e=t.shape,n=void 0===e?"circle":e,i=t.height,o=void 0===i?128:i,r=t.width,a=t.fill,l=t.stroke,_=t.strokeWidth,s=void 0===_?1:_,c=t.shapeRendering,h=t.cornerRadius;switch(n){case"square":return d(Rt,{radius:o/2,fill:a,stroke:l,strokeWidth:s,shapeRendering:c,cornerRadius:h});case"rectangle":return d(Wt,{width:null!=r?r:o,height:o,fill:a,stroke:l,strokeWidth:s,shapeRendering:c,cornerRadius:h});default:return d(St,{radius:o/2,fill:a,stroke:l,strokeWidth:s,shapeRendering:c})}},Tt=function(t){var n=t.shape,i=void 0===n?"circle":n,o=t.width,r=t.height,a=void 0===r?32:r,l=t.fill,_=t.stroke,s=t.strokeWidth,c=void 0===s?0:s,h=t.imageFontFamily,u=void 0===h?"FontAwesome":h,p=t.imageChar,v=void 0===p?"":p,g=t.imageCharFill,x=void 0===g?e.Palette.textColor(l):g,y=t.padding,m=void 0===y?a/5:y,k=t.xOffset,F=void 0===k?0:k,b=t.yOffset,C=void 0===b?0:b,w=t.cornerRadius,S=t.shapeRendering;return d(f,null,d(Ot,{shape:i,width:o,height:a,fill:l,stroke:_,strokeWidth:c,shapeRendering:S,cornerRadius:w}),d(mt,{x:F,y:C,height:a-m,fontFamily:u,char:v,fill:x,"font-weight":400}))};function Et(t,e,n,i){H(d(t,e),n,i)}var Pt=function(t){function n(e){var n=t.call(this)||this;return n._component=e,n._props={},n}return Ft(n,t),n.prototype.props=function(t){return arguments.length?(this._props=bt(bt({},this._props),t),this):this._props},n.prototype.prop=function(t,e){return 1===arguments.length?this._props[t]:(this._props[t]=e,this)},n.prototype.update=function(e,n){t.prototype.update.call(this,e,n),Et(this._component,this._props,e)},Ct([e.publish({},"object","Properties"),wt("design:type",Object)],n.prototype,"_props",void 0),n}(e.HTMLWidget),Ht=function(t){function n(e){var n=t.call(this)||this;return n._component=e,n._props={},n}return Ft(n,t),n.prototype.props=function(t){return arguments.length?(this._props=bt(bt({},this._props),t),this):this._props},n.prototype.prop=function(t,e){return 1===arguments.length?this._props[t]:(this._props[t]=e,this)},n.prototype.update=function(e,n){t.prototype.update.call(this,e,n),Et(this._component,this._props,e)},Ct([e.publish({},"object","Properties"),wt("design:type",Object)],n.prototype,"_props",void 0),n}(e.SVGWidget),At=function(t){var e=t.text,n=t.height,i=void 0===n?12:n,o=t.anchor,r=void 0===o?"middle":o,a=t.baseline,l=void 0===a?"middle":a,_=t.fontFamily,s=void 0===_?"Verdana":_,c=t.fill,h=void 0===c?"black":c;return d("text",{"font-family":s,"font-size":"".concat(i,"px"),"text-anchor":r,"dominant-baseline":l,fill:h},e)},Nt=function(t){var n=t.text,i=t.height,o=void 0===i?12:i,r=t.fontFamily,a=void 0===r?"Verdana":r,l=t.fill,_=void 0===l?"black":l,s=t.onSizeUpdate,c=X(0),h=c[0],u=c[1],p=X(0),v=p[0],g=p[1];J((function(){s&&s({width:h,height:v})}),[h,v,s]);var x=K((function(){return n.split("\n")}),[n]);u(K((function(){return e.Utility.textSize(x,a,o)}),[a,o,x]).width),g(x.length*(o+2)-2);var y=-v/2+o/2,m=K((function(){return x.map((function(t,e){return d("g",{key:e,transform:"translate(0 ".concat(y+e*(o+2),")")},d(At,{text:t,height:o,fontFamily:a,fill:_}))}))}),[_,a,o,x,y]);return d(f,null,m)},Dt=function(t){var e=t.text,n=t.height,i=void 0===n?12:n,o=t.fontFamily,r=void 0===o?"Verdana":o,a=t.padding,l=void 0===a?4:a,_=t.fill,s=void 0===_?"whitesmoke":_,c=t.stroke,h=void 0===c?"lightgray":c,u=t.textFill,p=void 0===u?"black":u,v=t.strokeWidth,g=void 0===v?1:v,x=t.cornerRadius,y=void 0===x?0:x,m=t.onSizeUpdate,k=X(0),F=k[0],b=k[1],C=X(0),w=C[0],S=C[1];J((function(){m&&m({width:F,height:w})}),[F,w,m]);var R=$((function(t){b(t.width),S(t.height)}),[]),W=F+2*l+g,O=w+2*l+g,T=Math.floor(i/10);return d(f,null,d(Wt,{width:W,height:O,fill:s,stroke:h,strokeWidth:g,cornerRadius:y}),d("g",{transform:"translate(0 ".concat(T,")")},d(Nt,{text:e,fontFamily:r,height:i,fill:p,onSizeUpdate:R})))},Mt=function(t){var e=t.x,n=t.y,i=t.annotationIDs,o=void 0===i?[]:i,r=t.stepSize,a=void 0===r?-16:r,l=o.map((function(t,i){return d("g",{key:t,transform:"translate(".concat(e+i*a," ").concat(n,")")},d("use",{href:"#"+t}))}));return d(f,null,l)},It=function(t){var n=t.text,i=void 0===n?"":n,o=t.textHeight,r=void 0===o?10:o,a=t.textPadding,l=void 0===a?4:a,_=t.textFill,s=void 0===_?"#287EC4":_,c=t.textboxFill,h=void 0===c?"white":c,u=t.textboxStroke,f=void 0===u?"#CCCCCC":u,p=t.textboxStrokeWidth,v=void 0===p?1:p,g=t.textFontFamily,x=void 0===g?"Verdana":g,y=t.annotationGutter,m=void 0===y?2:y,k=t.annotations,F=void 0===k?[]:k,b=t.cornerRadius,C=void 0===b?3:b,w=t.icon,S=void 0===w?{}:w,R=t.subText,W=void 0===R?{}:R,O=t.showLabel,T=void 0===O||O,E=t.noLabelRadius,P=void 0===E?5:E,H=t.expansionIcon,A=t.scale,N=void 0===A?1:A;S=bt({height:50,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"#555555",fill:"transparent",strokeWidth:0},S),W=bt({text:"",fill:"white",textFill:"#555555"},W),H=H?bt({height:16,shape:"circle",padding:6,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"black",fill:"whitesmoke",stroke:"whitesmoke",strokeWidth:0},H):void 0;var D=0,M=K((function(){return e.Utility.textSize(i,x,r,!1).width}),[i,x,r]),I=0;""!==i&&(I=M+2*l+2*v);var V=(D+=I+m)-I/2,L=r+2*l+2*v,U=[];F.forEach((function(t,e){var n=t.imageChar,i=(D+=L+m)-L/2;U.push(d("g",{key:e,class:"vertex3-anno","data-click":"annotation","data-click-data":JSON.stringify(t),transform:"translate(".concat(i," ").concat(0,")")},d(Tt,bt({},t,{shape:"square",height:L,imageChar:n,imageFontFamily:t.imageFontFamily,cornerRadius:C,strokeWidth:0}))))})),F.length>0&&(D+=m*(F.length-1));var z=d("g",{"data-click":"text",transform:"translate(".concat(V," ").concat(0,")")},T&&""!==i?d(Dt,{text:i,height:r,padding:l,strokeWidth:v,stroke:f,fill:h,textFill:s,fontFamily:x,cornerRadius:C}):d("circle",{r:P,stroke:f,fill:s})),j=S.height||20,q=S.strokeWidth||0,B=0,G=L+2*m;""!==i||U.length>0?B=-j/2-q-L/2-2*m:""!==W.text&&(G=j/2+q+2*m);var X=""===W.text?null:d("g",{"data-click":"subtext",transform:"translate(".concat(0," ").concat(G,")")},d(Dt,bt({fill:W.fill||"#FFFFFF",textFill:W.textFill||s},W,{height:r,padding:l,strokeWidth:0,stroke:f,fontFamily:x,cornerRadius:C})));return d("g",{transform:"scale(".concat(N,")")},d("g",{"data-click":"icon",transform:"translate(".concat(0," ").concat(B,")")},d(Tt,bt({},S)),H&&d("g",{"data-click":"expanded-icon","data-click-data":JSON.stringify(H),transform:"translate(".concat((S.height+q)/2-H.height/2," ").concat(-(S.height+q)/2+H.height/2,")")},d(Tt,bt({},H)))),d("g",{transform:"translate(".concat(-D/2," ").concat(0,")")},z,U),X)},Vt=function(t){t.categoryID;var n=t.text,i=void 0===n?"":n,o=t.textHeight,r=void 0===o?10:o,a=t.textPadding,l=void 0===a?4:a,_=t.textFill,s=void 0===_?"#287EC4":_,c=t.textboxFill,h=void 0===c?"white":c,u=t.textboxStroke,f=void 0===u?"#CCCCCC":u,p=t.textboxStrokeWidth,v=void 0===p?1:p,g=t.textFontFamily,x=void 0===g?"Verdana":g,y=t.annotationGutter,m=void 0===y?2:y,k=t.annotations,F=void 0===k?[]:k,b=t.iconAnnotations,C=void 0===b?[]:b,w=t.cornerRadius,S=void 0===w?3:w,R=t.icon,W=void 0===R?{}:R,O=t.subText,T=void 0===O?{}:O,E=t.showLabel,P=void 0===E||E,H=t.noLabelRadius,A=void 0===H?5:H,N=t.iconBorderWidth,D=void 0===N?1:N,M=t.iconBorderColor,I=void 0===M?"#333":M,V=t.iconBackgroundColor,L=void 0===V?"#fff":V,U=t.iconFontColor,z=void 0===U?"#000":U,j=t.iconFontSize,q=void 0===j?20:j,B=t.iconFontFamily,G=void 0===B?"FontAwesome":B,X=t.shapeOffsetX,Y=void 0===X?0:X,J=t.shapeOffsetY,$=void 0===J?0:J,Z=t.iconOffsetX,Q=void 0===Z?0:Z,tt=t.iconOffsetY,et=void 0===tt?0:tt,nt=t.iconPadding,it=void 0===nt?4:nt,ot=t.iconText,rt=void 0===ot?"?":ot,at=t.shapeRendering,lt=void 0===at?"auto":at;W=bt({height:50,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"#555555",fill:"transparent",strokeWidth:0},W),T=bt({text:"",fill:"white",textFill:"#555555"},T);var _t=K((function(){return e.Utility.textSize(i,x,r,!1).width}),[i,x,r]),st=0;""!==i&&(st=_t+2*l+2*v);var ct=st+m,ht=ct-st/2,dt=r+2*m+2*v,ut=F.map((function(t,n){return e.Utility.textSize(t.imageChar,t.imageFontFamily,t.height,!1).width})),ft=[],pt=ct;F.forEach((function(t,e){var n,i=t.imageChar,o=null!==(n=t.height)&&void 0!==n?n:dt,r=(pt+=ut[e]+m)-ut[e]/2;ft.push(d("g",{key:e,class:"vertex3-anno","data-click":"annotation","data-click-data":JSON.stringify(t),transform:"translate(".concat(r," ").concat(0,")")},d(Tt,bt({},t,{shape:"rectangle",width:ut[e],height:o,imageChar:i,imageFontFamily:t.imageFontFamily,cornerRadius:S,strokeWidth:0}))))})),F.length>0&&(ct+=m*(F.length-1));var vt=[];C.forEach((function(t,e){var n,i=t.shapeOffsetX,o=t.shapeOffsetY;vt.push(d("g",{key:e,class:"vertex3-iconAnno","data-click":"icon-annotation","data-click-data":JSON.stringify(t),transform:"translate(".concat(i," ").concat(o,")")},d(Tt,bt({},t,{shape:null!==(n=t.shape)&&void 0!==n?n:"square",imageChar:t.imageChar,imageFontFamily:t.imageFontFamily,cornerRadius:S,stroke:t.stroke,strokeWidth:t.strokeWidth}))))}));var gt=d("g",{"data-click":"text",transform:"translate(".concat(ht," ").concat(0,")")},P&&""!==i?d(Dt,{text:i,height:r,padding:l,strokeWidth:v,stroke:f,fill:h,textFill:s,fontFamily:x,cornerRadius:S}):d("circle",{r:A,stroke:f,fill:s})),xt=dt+2*m,yt=""===T.text?null:d("g",{"data-click":"subtext",transform:"translate(".concat(0," ").concat(xt,")")},d(Dt,bt({fill:T.fill||"#FFFFFF",textFill:T.textFill||s},T,{height:r,padding:l,strokeWidth:0,stroke:f,fontFamily:x,cornerRadius:S})));return d("g",null,d("g",{"data-click":"icon",transform:"translate(".concat(Y," ").concat($,")")},d(Tt,bt({},W,{strokeWidth:D,shape:"circle",height:q,fill:L,stroke:I,imageFontFamily:G,imageChar:rt,imageCharFill:z,padding:it,xOffset:Q,yOffset:et,cornerRadius:S,shapeRendering:lt})),vt),d("g",{transform:"translate(".concat(-ct/2," ").concat(0,")")},gt,ft),yt)};t.Annotations=Mt,t.BUILD_VERSION="2.104.13",t.CentroidVertex3=function(t){var e=t.id,n=t.categoryID,i=void 0===n?"":n,o=t.text,r=void 0===o?"":o,a=t.textHeight,l=void 0===a?12:a,_=t.textPadding,s=void 0===_?10:_,c=t.textFill,h=void 0===c?"#287EC4":c,u=t.textboxFill,f=void 0===u?"white":u,p=t.textboxStroke,v=void 0===p?"#CCCCCC":p,g=t.textboxStrokeWidth,x=void 0===g?1:g,y=t.textFontFamily,m=void 0===y?"Verdana":y,k=t.annotationGutter,F=void 0===k?2:k,b=t.annotations,C=void 0===b?[]:b,w=t.cornerRadius,S=t.icon,R=void 0===S?{}:S,W=t.subText,O=void 0===W?{}:W,T=t.expansionIcon,E=t.scale,P=void 0===E?1:E;return R=bt({height:91,padding:40,imageCharFill:"#555555",imageFontFamily:"FontAwesome",fill:"#FFCC33",stroke:"#DFDFDF",imageChar:"?",strokeWidth:4,yOffset:-15},R),O=bt({text:"",fill:"transparent",textFill:"#555555"},O),d(It,bt({},{id:e,categoryID:i,text:r,textHeight:l,textPadding:s,textFill:h,textboxFill:f,textboxStroke:v,textboxStrokeWidth:x,textFontFamily:m,annotationGutter:F,annotations:C,cornerRadius:w,icon:R,subText:O,expansionIcon:T,scale:P},{icon:R,subText:O}))},t.CentroidVertex4=function(t){var e=t.id,n=t.categoryID,i=void 0===n?"":n,o=t.text,r=void 0===o?"":o,a=t.textHeight,l=void 0===a?12:a,_=t.textPadding,s=void 0===_?10:_,c=t.textFill,h=void 0===c?"#287EC4":c,u=t.textboxFill,f=void 0===u?"white":u,p=t.textboxStroke,v=void 0===p?"#CCCCCC":p,g=t.textboxStrokeWidth,x=void 0===g?1:g,y=t.textFontFamily,m=void 0===y?"Verdana":y,k=t.annotationGutter,F=void 0===k?2:k,b=t.annotations,C=void 0===b?[]:b,w=t.iconAnnotations,S=void 0===w?[]:w,R=t.cornerRadius,W=t.icon,O=void 0===W?{}:W,T=t.subText,E=void 0===T?{}:T,P=t.showLabel,H=void 0===P||P,A=t.noLabelRadius,N=void 0===A?5:A,D=t.iconBorderWidth,M=void 0===D?1:D,I=t.iconBorderColor,V=void 0===I?"#333":I,L=t.iconBackgroundColor,U=void 0===L?"#fff":L,z=t.iconFontColor,j=void 0===z?"#000":z,q=t.iconFontSize,B=void 0===q?20:q,G=t.iconFontFamily,X=void 0===G?"FontAwesome":G,Y=t.shapeOffsetX,J=void 0===Y?0:Y,K=t.shapeOffsetY,$=void 0===K?0:K,Z=t.iconOffsetX,Q=void 0===Z?0:Z,tt=t.iconOffsetY,et=void 0===tt?0:tt,nt=t.iconPadding,it=void 0===nt?4:nt,ot=t.iconText,rt=void 0===ot?"?":ot,at=t.shapeRendering,lt=void 0===at?"auto":at;return O=bt({height:91,padding:40,imageCharFill:"#555555",imageFontFamily:"FontAwesome",fill:"#FFCC33",stroke:"#DFDFDF",imageChar:"?",strokeWidth:4,yOffset:-15},O),E=bt({text:"",fill:"transparent",textFill:"#555555"},E),d(Vt,bt({},{id:e,categoryID:i,text:r,textHeight:l,textPadding:s,textFill:h,textboxFill:f,textboxStroke:v,textboxStrokeWidth:x,textFontFamily:m,annotationGutter:F,annotations:C,iconAnnotations:S,cornerRadius:R,icon:O,subText:E,showLabel:H,noLabelRadius:N,iconBorderWidth:M,iconBorderColor:V,iconBackgroundColor:U,iconFontColor:j,iconFontSize:B,iconFontFamily:X,shapeOffsetX:J,shapeOffsetY:$,iconOffsetX:Q,iconOffsetY:et,iconPadding:it,iconText:rt,shapeRendering:lt},{icon:O,subText:E}))},t.Circle=St,t.Edge=function(t){var e=t.points,n=void 0===e?[]:e,i=t.curveDepth,o=void 0===i?16:i,r=t.stroke;return d("path",{stroke:void 0===r?"black":r,"stroke-dasharray":t.strokeDasharray,d:K((function(){return yt(function(t,e){if(2===t.length&&e){var n=t[0][0]-t[1][0],i=t[0][1]-t[1][1];if(Math.sqrt(n*n+i*i)){var o=(t[0][0]+t[1][0])/2-i*e/100,r=(t[0][1]+t[1][1])/2+n*e/100;return[t[0],[o,r],t[1]]}}return t}(n,o))}),[o,n])})},t.HTMLAdapter=Pt,t.Icon=Tt,t.IconLabelledRect=function(t){var e=t.icon,n=t.iconFontFamily,i=t.text,o=t.height,r=void 0===o?12:o,a=t.width,l=void 0===a?12:a,_=t.fontFamily,s=void 0===_?"Verdana":_,c=t.fontSize,h=void 0===c?10:c,u=t.padding,p=void 0===u?3:u,v=t.fill,g=void 0===v?"whitesmoke":v,x=t.stroke,y=void 0===x?"lightgray":x,m=t.textFill,k=void 0===m?"black":m,F=t.strokeWidth,b=void 0===F?1:F,C=t.cornerRadius,w=void 0===C?0:C;return t.onSizeUpdate,d(f,null,d(Wt,{width:l,height:r,fill:g,stroke:y,strokeWidth:b,cornerRadius:w}),d("g",{transform:"translate(".concat(-l/2+p," ").concat(-r/2+p,")")},d(Tt,{shape:"square",imageFontFamily:n,imageChar:e,height:r,fill:g,imageCharFill:k})),d("g",{transform:"translate(".concat(-l/2+2*p+r," ").concat(-r/2+p,")")},d(At,{text:i,fontFamily:s,height:h,fill:k,anchor:"start",baseline:"hanging"})))},t.Icons=function(t){var e=t.icons,n=(void 0===e?[]:e).map((function(t){return d("g",{key:t.id,id:t.id},d(Tt,bt({},t)))}));return d(f,null,n)},t.ImageChar=mt,t.LabelledRect=function(t){var e=t.text,n=t.height,i=void 0===n?12:n,o=t.width,r=void 0===o?12:o,a=t.fontFamily,l=void 0===a?"Verdana":a,_=t.fontSize,s=void 0===_?10:_,c=t.padding,h=void 0===c?3:c,u=t.fill,p=void 0===u?"whitesmoke":u,v=t.stroke,g=void 0===v?"lightgray":v,x=t.textFill,y=void 0===x?"black":x,m=t.strokeWidth,k=void 0===m?1:m,F=t.cornerRadius,b=void 0===F?0:F;return t.onSizeUpdate,d(f,null,d(Wt,{width:r,height:i,fill:p,stroke:g,strokeWidth:k,cornerRadius:b}),d("g",{transform:"translate(".concat(-r/2+h," ").concat(-i/2+h,")")},d(At,{text:e,fontFamily:l,height:s,fill:y,anchor:"start",baseline:"hanging"})))},t.PKG_NAME="@hpcc-js/react",t.PKG_VERSION="2.53.2",t.React=rt,t.Rectangle=Wt,t.SVGAdapter=Ht,t.Shape=Ot,t.Square=Rt,t.Subgraph=function(t){var n=t.text,i=t.width,o=void 0===i?100:i,r=t.height,a=void 0===r?100:r,l=t.fill,_=void 0===l?"transparent":l,s=t.stroke,c=void 0===s?"black":s,h=t.fontHeight,u=void 0===h?12:h,p=t.fontFamily,v=e.Utility.textSize(n,p,u,!1);return d(f,null,d(Wt,{width:o,height:a,fill:_,stroke:c}),d("g",{transform:"translate(".concat((-o+v.width)/2+4," ").concat((-a+v.height)/2+4,")")},d(Nt,{height:u,text:n,fontFamily:p})))},t.Text=Nt,t.TextBox=Dt,t.TextLine=At,t.Vertex=function(t){var e=t.categoryID,n=void 0===e?"":e,i=t.text,o=void 0===i?"":i,r=t.textHeight,a=void 0===r?12:r,l=t.textPadding,_=void 0===l?4:l,s=t.icon,c=void 0===s?{}:s,h=t.annotationsHeight,u=void 0===h?12:h,f=t.annotationIDs,p=void 0===f?[]:f,v=t.textFill,g=t.textboxFill,x=t.textboxStroke,y=t.textFontFamily,m=t.onSizeUpdate,k=t.showLabel,F=void 0===k||k,b=t.scale,C=void 0===b?1:b,w=X(0),S=w[0],R=w[1],W=X(0),O=W[0],T=W[1];J((function(){m&&m({width:0,height:0})}),[S,O,m]);var E=S;E+=4;var P=-(2*(c=bt({imageChar:"fa-question",height:32,fill:"transparent"},c)).height/6+a+8)/2,H=c.height/3+O/2+_,A=c.height/3+O+_+u/3;F||(P+=(a+8)/2,A-=O+_);var N=$((function(t){R(t.width),T(t.height)}),[]),D=F?d("g",{transform:"translate(0 ".concat(H,")")},d(Dt,{text:o,height:a,padding:_,onSizeUpdate:N,textFill:v,fill:g,stroke:x,fontFamily:y})):void 0;return n?d("g",{transform:"translate(0 ".concat(P,") scale(").concat(C,")")},d("use",{href:"#"+n}),D,d(Mt,{x:E/2,y:A,annotationIDs:p})):d("g",{transform:"translate(0 ".concat(P,") scale(").concat(C,")")},d(Tt,bt({},c)),D)},t.Vertex2=function(t){var n=t.categoryID,i=void 0===n?"":n,o=t.text,r=void 0===o?"":o,a=t.textHeight,l=void 0===a?12:a,_=t.textPadding,s=void 0===_?4:_,c=t.icon,h=void 0===c?{}:c,u=t.textFill,p=void 0===u?"black":u,v=t.textboxFill,g=void 0===v?"white":v,x=t.textboxStroke,y=void 0===x?"black":x,m=t.textFontFamily,k=t.annotationsHeight,F=void 0===k?12:k,b=t.annotationIDs,C=void 0===b?[]:b;h=bt({imageChar:"fa-question",imageCharFill:"white",height:32,fill:"black",shape:"square"},h);var w=l+2*s,S=K((function(){return e.Utility.textSize(r,m,l,!1)}),[r,m,l]).width,R=F,W=w/2,O=-(2*h.height/6+l+8)/2,T=-h.height/2,E=Math.ceil(S/2+s),P=W-h.height/2,H=R/2,A=W;return i?d("g",{transform:"translate(".concat(0," ").concat(O,")")},d("g",{transform:"translate(".concat(T," ").concat(0,")")},d("use",{href:"#"+i})),d("g",{transform:"translate(".concat(E," ").concat(P,")")},d(Dt,{text:r,height:l,padding:s,strokeWidth:1,stroke:y,fill:g,textFill:p,fontFamily:m})),d(Mt,{x:H,y:A,annotationIDs:C,stepSize:R})):d(f,null,d("g",{transform:"translate(".concat(T," ").concat(0,")scale(1.0002)")},d(Tt,bt({},h,{shape:"square"}))),d("g",{transform:"translate(".concat(E," ").concat(P,")scale(1.0002)")},d(Dt,{text:r,height:l,padding:s,stroke:y,fill:g})))},t.Vertex3=It,t.Vertex4=Vt,t.render=Et,t.svgRender=function(t,e,n,i){H(d("svg",null,d(t,e)),n,i)},Object.defineProperty(t,"__esModule",{value:!0})}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@hpcc-js/common")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["@hpcc-js/react"]={},t["@hpcc-js/common"])}(this,(function(t,e){"use strict";var n,o,i,r,a,l={},_=[],c=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function s(t,e){for(var n in e)t[n]=e[n];return t}function d(t){var e=t.parentNode;e&&e.removeChild(t)}function h(t,e,o){var i,r,a,l={};for(a in e)"key"==a?i=e[a]:"ref"==a?r=e[a]:l[a]=e[a];if(arguments.length>2&&(l.children=arguments.length>3?n.call(arguments,2):o),"function"==typeof t&&null!=t.defaultProps)for(a in t.defaultProps)void 0===l[a]&&(l[a]=t.defaultProps[a]);return u(t,l,i,r,null)}function u(t,e,n,r,a){var l={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==a?++i:a};return null==a&&null!=o.vnode&&o.vnode(l),l}function f(t){return t.children}function p(t,e){this.props=t,this.context=e}function v(t,e){if(null==e)return t.__?v(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?v(t):null}function g(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return g(t)}}function m(t){(!t.__d&&(t.__d=!0)&&r.push(t)&&!y.__r++||a!==o.debounceRendering)&&((a=o.debounceRendering)||setTimeout)(y)}function y(){for(var t;y.__r=r.length;)t=r.sort((function(t,e){return t.__v.__b-e.__v.__b})),r=[],t.some((function(t){var e,n,o,i,r,a;t.__d&&(r=(i=(e=t).__v).__e,(a=e.__P)&&(n=[],(o=s({},i)).__v=i.__v+1,R(a,i,o,e.__n,void 0!==a.ownerSVGElement,null!=i.__h?[r]:null,n,null==r?v(i):r,i.__h),W(n,i),i.__e!=r&&g(i)))}))}function x(t,e,n,o,i,r,a,c,s,d){var h,p,g,m,y,x,b,C=o&&o.__k||_,w=C.length;for(n.__k=[],h=0;h<e.length;h++)if(null!=(m=n.__k[h]=null==(m=e[h])||"boolean"==typeof m?null:"string"==typeof m||"number"==typeof m||"bigint"==typeof m?u(null,m,null,null,m):Array.isArray(m)?u(f,{children:m},null,null,null):m.__b>0?u(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)){if(m.__=n,m.__b=n.__b+1,null===(g=C[h])||g&&m.key==g.key&&m.type===g.type)C[h]=void 0;else for(p=0;p<w;p++){if((g=C[p])&&m.key==g.key&&m.type===g.type){C[p]=void 0;break}g=null}R(t,m,g=g||l,i,r,a,c,s,d),y=m.__e,(p=m.ref)&&g.ref!=p&&(b||(b=[]),g.ref&&b.push(g.ref,null,m),b.push(p,m.__c||y,m)),null!=y?(null==x&&(x=y),"function"==typeof m.type&&m.__k===g.__k?m.__d=s=k(m,s,t):s=F(t,m,g,C,y,s),"function"==typeof n.type&&(n.__d=s)):s&&g.__e==s&&s.parentNode!=t&&(s=v(g))}for(n.__e=x,h=w;h--;)null!=C[h]&&P(C[h],C[h]);if(b)for(h=0;h<b.length;h++)H(b[h],b[++h],b[++h])}function k(t,e,n){for(var o,i=t.__k,r=0;i&&r<i.length;r++)(o=i[r])&&(o.__=t,e="function"==typeof o.type?k(o,e,n):F(n,o,o,i,o.__e,e));return e}function F(t,e,n,o,i,r){var a,l,_;if(void 0!==e.__d)a=e.__d,e.__d=void 0;else if(null==n||i!=r||null==i.parentNode)t:if(null==r||r.parentNode!==t)t.appendChild(i),a=null;else{for(l=r,_=0;(l=l.nextSibling)&&_<o.length;_+=2)if(l==i)break t;t.insertBefore(i,r),a=r}return void 0!==a?a:i.nextSibling}function b(t,e,n){"-"===e[0]?t.setProperty(e,n):t[e]=null==n?"":"number"!=typeof n||c.test(e)?n:n+"px"}function C(t,e,n,o,i){var r;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof o&&(t.style.cssText=o=""),o)for(e in o)n&&e in n||b(t.style,e,"");if(n)for(e in n)o&&n[e]===o[e]||b(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])r=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=n,n?o||t.addEventListener(e,r?S:w,r):t.removeEventListener(e,r?S:w,r);else if("dangerouslySetInnerHTML"!==e){if(i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null==n||!1===n&&-1==e.indexOf("-")?t.removeAttribute(e):t.setAttribute(e,n))}}function w(t){this.l[t.type+!1](o.event?o.event(t):t)}function S(t){this.l[t.type+!0](o.event?o.event(t):t)}function R(t,e,n,i,r,a,l,_,c){var d,h,u,v,g,m,y,k,F,b,C,w,S,R,W,H=e.type;if(void 0!==e.constructor)return null;null!=n.__h&&(c=n.__h,_=e.__e=n.__e,e.__h=null,a=[_]),(d=o.__b)&&d(e);try{t:if("function"==typeof H){if(k=e.props,F=(d=H.contextType)&&i[d.__c],b=d?F?F.props.value:d.__:i,n.__c?y=(h=e.__c=n.__c).__=h.__E:("prototype"in H&&H.prototype.render?e.__c=h=new H(k,b):(e.__c=h=new p(k,b),h.constructor=H,h.render=E),F&&F.sub(h),h.props=k,h.state||(h.state={}),h.context=b,h.__n=i,u=h.__d=!0,h.__h=[],h._sb=[]),null==h.__s&&(h.__s=h.state),null!=H.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=s({},h.__s)),s(h.__s,H.getDerivedStateFromProps(k,h.__s))),v=h.props,g=h.state,u)null==H.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==H.getDerivedStateFromProps&&k!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(k,b),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(k,h.__s,b)||e.__v===n.__v){for(h.props=k,h.state=h.__s,e.__v!==n.__v&&(h.__d=!1),h.__v=e,e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),C=0;C<h._sb.length;C++)h.__h.push(h._sb[C]);h._sb=[],h.__h.length&&l.push(h);break t}null!=h.componentWillUpdate&&h.componentWillUpdate(k,h.__s,b),null!=h.componentDidUpdate&&h.__h.push((function(){h.componentDidUpdate(v,g,m)}))}if(h.context=b,h.props=k,h.__v=e,h.__P=t,w=o.__r,S=0,"prototype"in H&&H.prototype.render){for(h.state=h.__s,h.__d=!1,w&&w(e),d=h.render(h.props,h.state,h.context),R=0;R<h._sb.length;R++)h.__h.push(h._sb[R]);h._sb=[]}else do{h.__d=!1,w&&w(e),d=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++S<25);h.state=h.__s,null!=h.getChildContext&&(i=s(s({},i),h.getChildContext())),u||null==h.getSnapshotBeforeUpdate||(m=h.getSnapshotBeforeUpdate(v,g)),W=null!=d&&d.type===f&&null==d.key?d.props.children:d,x(t,Array.isArray(W)?W:[W],e,n,i,r,a,l,_,c),h.base=e.__e,e.__h=null,h.__h.length&&l.push(h),y&&(h.__E=h.__=null),h.__e=!1}else null==a&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=O(n.__e,e,n,i,r,a,l,c);(d=o.diffed)&&d(e)}catch(t){e.__v=null,(c||null!=a)&&(e.__e=_,e.__h=!!c,a[a.indexOf(_)]=null),o.__e(t,e,n)}}function W(t,e){o.__c&&o.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){o.__e(t,e.__v)}}))}function O(t,e,o,i,r,a,_,c){var s,h,u,f=o.props,p=e.props,g=e.type,m=0;if("svg"===g&&(r=!0),null!=a)for(;m<a.length;m++)if((s=a[m])&&"setAttribute"in s==!!g&&(g?s.localName===g:3===s.nodeType)){t=s,a[m]=null;break}if(null==t){if(null===g)return document.createTextNode(p);t=r?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,p.is&&p),a=null,c=!1}if(null===g)f===p||c&&t.data===p||(t.data=p);else{if(a=a&&n.call(t.childNodes),h=(f=o.props||l).dangerouslySetInnerHTML,u=p.dangerouslySetInnerHTML,!c){if(null!=a)for(f={},m=0;m<t.attributes.length;m++)f[t.attributes[m].name]=t.attributes[m].value;(u||h)&&(u&&(h&&u.__html==h.__html||u.__html===t.innerHTML)||(t.innerHTML=u&&u.__html||""))}if(function(t,e,n,o,i){var r;for(r in n)"children"===r||"key"===r||r in e||C(t,r,null,n[r],o);for(r in e)i&&"function"!=typeof e[r]||"children"===r||"key"===r||"value"===r||"checked"===r||n[r]===e[r]||C(t,r,e[r],n[r],o)}(t,p,f,r,c),u)e.__k=[];else if(m=e.props.children,x(t,Array.isArray(m)?m:[m],e,o,i,r&&"foreignObject"!==g,a,_,a?a[0]:o.__k&&v(o,0),c),null!=a)for(m=a.length;m--;)null!=a[m]&&d(a[m]);c||("value"in p&&void 0!==(m=p.value)&&(m!==t.value||"progress"===g&&!m||"option"===g&&m!==f.value)&&C(t,"value",m,f.value,!1),"checked"in p&&void 0!==(m=p.checked)&&m!==t.checked&&C(t,"checked",m,f.checked,!1))}return t}function H(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){o.__e(t,n)}}function P(t,e,n){var i,r;if(o.unmount&&o.unmount(t),(i=t.ref)&&(i.current&&i.current!==t.__e||H(i,null,e)),null!=(i=t.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(t){o.__e(t,e)}i.base=i.__P=null,t.__c=void 0}if(i=t.__k)for(r=0;r<i.length;r++)i[r]&&P(i[r],e,n||"function"!=typeof t.type);n||null==t.__e||d(t.__e),t.__=t.__e=t.__d=void 0}function E(t,e,n){return this.constructor(t,n)}function D(t,e,i){var r,a,_;o.__&&o.__(t,e),a=(r="function"==typeof i)?null:i&&i.__k||e.__k,_=[],R(e,t=(!r&&i||e).__k=h(f,null,[t]),a||l,l,void 0!==e.ownerSVGElement,!r&&i?[i]:a?null:e.firstChild?n.call(e.childNodes):null,_,!r&&i?i:a?a.__e:e.firstChild,r),W(_,t)}n=_.slice,o={__e:function(t,e,n,o){for(var i,r,a;e=e.__;)if((i=e.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(t)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(t,o||{}),a=i.__d),a)return i.__E=i}catch(e){t=e}throw t}},i=0,p.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=s({},this.state),"function"==typeof t&&(t=t(s({},n),this.props)),t&&s(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),m(this))},p.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),m(this))},p.prototype.render=f,r=[],y.__r=0;var A,T,N,V,I=0,U=[],L=[],z=o.__b,j=o.__r,M=o.diffed,B=o.__c,q=o.unmount;function G(t,e){o.__h&&o.__h(T,t,I||e),I=0;var n=T.__H||(T.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({__V:L}),n.__[t]}function X(t){return I=1,Y(it,t)}function Y(t,e,n){var o=G(A++,2);if(o.t=t,!o.__c&&(o.__=[n?n(e):it(void 0,e),function(t){var e=o.__N?o.__N[0]:o.__[0],n=o.t(e,t);e!==n&&(o.__N=[n,o.__[1]],o.__c.setState({}))}],o.__c=T,!T.u)){T.u=!0;var i=T.shouldComponentUpdate;T.shouldComponentUpdate=function(t,e,n){if(!o.__c.__H)return!0;var r=o.__c.__H.__.filter((function(t){return t.__c}));if(r.every((function(t){return!t.__N})))return!i||i.call(this,t,e,n);var a=!1;return r.forEach((function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(a=!0)}})),!(!a&&o.__c.props===t)&&(!i||i.call(this,t,e,n))}}return o.__N||o.__}function J(t,e){var n=G(A++,3);!o.__s&&ot(n.__H,e)&&(n.__=t,n.i=e,T.__H.__h.push(n))}function K(t,e){var n=G(A++,7);return ot(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function $(t,e){return I=8,K((function(){return t}),e)}function Q(){for(var t;t=U.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(et),t.__H.__h.forEach(nt),t.__H.__h=[]}catch(e){t.__H.__h=[],o.__e(e,t.__v)}}o.__b=function(t){"function"!=typeof t.type||t.__m||null===t.__?t.__m||(t.__m=t.__&&t.__.__m?t.__.__m:""):t.__m=(t.__&&t.__.__m?t.__.__m:"")+(t.__&&t.__.__k?t.__.__k.indexOf(t):0),T=null,z&&z(t)},o.__r=function(t){j&&j(t),A=0;var e=(T=t.__c).__H;e&&(N===T?(e.__h=[],T.__h=[],e.__.forEach((function(t){t.__N&&(t.__=t.__N),t.__V=L,t.__N=t.i=void 0}))):(e.__h.forEach(et),e.__h.forEach(nt),e.__h=[])),N=T},o.diffed=function(t){M&&M(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==U.push(e)&&V===o.requestAnimationFrame||((V=o.requestAnimationFrame)||tt)(Q)),e.__H.__.forEach((function(t){t.i&&(t.__H=t.i),t.__V!==L&&(t.__=t.__V),t.i=void 0,t.__V=L}))),N=T=null},o.__c=function(t,e){e.some((function(t){try{t.__h.forEach(et),t.__h=t.__h.filter((function(t){return!t.__||nt(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],o.__e(n,t.__v)}})),B&&B(t,e)},o.unmount=function(t){q&&q(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{et(t)}catch(t){e=t}})),n.__H=void 0,e&&o.__e(e,n.__v))};var Z="function"==typeof requestAnimationFrame;function tt(t){var e,n=function(){clearTimeout(o),Z&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(n,100);Z&&(e=requestAnimationFrame(n))}function et(t){var e=T,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),T=e}function nt(t){var e=T;t.__c=t.__(),T=e}function ot(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function it(t,e){return"function"==typeof e?e(t):e}var rt=Object.freeze({__proto__:null,BUILD_VERSION:"2.104.14",Component:p,Fragment:f,PKG_NAME:"@hpcc-js/preact-shim",PKG_VERSION:"2.16.3",createElement:h,h:h,render:D,useCallback:$,useEffect:J,useMemo:K,useReducer:Y,useState:X}),at=function(t,e){return at=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},at(t,e)};function lt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}at(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var _t=function(){return _t=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},_t.apply(this,arguments)};function ct(t,e,n,o){var i,r=arguments.length,a=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var l=t.length-1;l>=0;l--)(i=t[l])&&(a=(r<3?i(a):r>3?i(e,n,a):i(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}function st(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}var dt=function(t){var n=t.x,o=t.y,i=void 0===o?0:o,r=t.height,a=void 0===r?12:r,l=t.fill,_=t.stroke,c=t.fontFamily,s=void 0===c?"FontAwesome":c,d=t.char,u=void 0===d?"":d,f=K((function(){return"FontAwesome"===s?e.Utility.faChar(u):u}),[u,s]);return h("text",{x:n,y:i,fill:l,stroke:_,"font-family":s,"font-size":"".concat(a,"px"),"dominant-baseline":"middle",style:"text-anchor: middle;alignment-baseline:middle;"},f)},ht=function(t){var e=t.radius,n=void 0===e?32:e,o=t.fill,i=void 0===o?"navy":o,r=t.stroke,a=void 0===r?i:r,l=t.strokeWidth;return h("circle",{r:n,fill:i,stroke:a,"stroke-width":void 0===l?1:l,"shape-rendering":t.shapeRendering})},ut=function(t){var e=t.radius,n=void 0===e?30:e,o=t.cornerRadius,i=void 0===o?0:o,r=t.fill,a=void 0===r?"white":r,l=t.stroke,_=t.strokeWidth;return h("rect",{x:-n,y:-n,rx:i,ry:i,width:2*n,height:2*n,fill:a,stroke:l||a,"stroke-width":void 0===_?1:_,"shape-rendering":t.shapeRendering})},ft=function(t){var e=t.width,n=void 0===e?30:e,o=t.height,i=void 0===o?30:o,r=t.cornerRadius,a=void 0===r?0:r,l=t.fill,_=void 0===l?"white":l,c=t.stroke,s=void 0===c?"black":c,d=t.strokeWidth;return h("rect",{x:-n/2,y:-i/2,rx:a,ry:a,width:n,height:i,fill:_,stroke:s||_,"stroke-width":void 0===d?1:d,"shape-rendering":t.shapeRendering})},pt=function(t){var e=t.shape,n=void 0===e?"circle":e,o=t.height,i=void 0===o?128:o,r=t.width,a=t.fill,l=t.stroke,_=t.strokeWidth,c=void 0===_?1:_,s=t.shapeRendering,d=t.cornerRadius;switch(n){case"square":return h(ut,{radius:i/2,fill:a,stroke:l,strokeWidth:c,shapeRendering:s,cornerRadius:d});case"rectangle":return h(ft,{width:null!=r?r:i,height:i,fill:a,stroke:l,strokeWidth:c,shapeRendering:s,cornerRadius:d});default:return h(ht,{radius:i/2,fill:a,stroke:l,strokeWidth:c,shapeRendering:s})}},vt=function(t){var n=t.shape,o=void 0===n?"circle":n,i=t.width,r=t.height,a=void 0===r?32:r,l=t.fill,_=t.stroke,c=t.strokeWidth,s=void 0===c?0:c,d=t.imageFontFamily,u=void 0===d?"FontAwesome":d,p=t.imageChar,v=void 0===p?"":p,g=t.imageCharFill,m=void 0===g?e.Palette.textColor(l):g,y=t.padding,x=void 0===y?a/5:y,k=t.xOffset,F=void 0===k?0:k,b=t.yOffset,C=void 0===b?0:b,w=t.cornerRadius,S=t.shapeRendering;return h(f,null,h(pt,{shape:o,width:i,height:a,fill:l,stroke:_,strokeWidth:s,shapeRendering:S,cornerRadius:w}),h(dt,{x:F,y:C,height:a-x,fontFamily:u,char:v,fill:m,"font-weight":400}))},gt=function(t){var e=t.text,n=t.height,o=void 0===n?12:n,i=t.anchor,r=void 0===i?"middle":i,a=t.baseline,l=void 0===a?"middle":a,_=t.fontFamily,c=void 0===_?"Verdana":_,s=t.fill,d=void 0===s?"black":s;return h("text",{"font-family":c,"font-size":"".concat(o,"px"),"text-anchor":r,"dominant-baseline":l,fill:d},e)},mt=function(t){var n=t.text,o=t.height,i=void 0===o?12:o,r=t.fontFamily,a=void 0===r?"Verdana":r,l=t.fill,_=void 0===l?"black":l,c=t.onSizeUpdate,s=X(0),d=s[0],u=s[1],p=X(0),v=p[0],g=p[1];J((function(){c&&c({width:d,height:v})}),[d,v,c]);var m=K((function(){return n.split("\n")}),[n]);u(K((function(){return e.Utility.textSize(m,a,i)}),[a,i,m]).width),g(m.length*(i+2)-2);var y=-v/2+i/2,x=K((function(){return m.map((function(t,e){return h("g",{key:e,transform:"translate(0 ".concat(y+e*(i+2),")")},h(gt,{text:t,height:i,fontFamily:a,fill:_}))}))}),[_,a,i,m,y]);return h(f,null,x)},yt=function(t){var e=t.text,n=t.height,o=void 0===n?12:n,i=t.fontFamily,r=void 0===i?"Verdana":i,a=t.padding,l=void 0===a?4:a,_=t.fill,c=void 0===_?"whitesmoke":_,s=t.stroke,d=void 0===s?"lightgray":s,u=t.textFill,p=void 0===u?"black":u,v=t.strokeWidth,g=void 0===v?1:v,m=t.cornerRadius,y=void 0===m?0:m,x=t.onSizeUpdate,k=X(0),F=k[0],b=k[1],C=X(0),w=C[0],S=C[1];J((function(){x&&x({width:F,height:w})}),[F,w,x]);var R=$((function(t){b(t.width),S(t.height)}),[]),W=F+2*l+g,O=w+2*l+g,H=Math.floor(o/10);return h(f,null,h(ft,{width:W,height:O,fill:c,stroke:d,strokeWidth:g,cornerRadius:y}),h("g",{transform:"translate(0 ".concat(H,")")},h(mt,{text:e,fontFamily:r,height:o,fill:p,onSizeUpdate:R})))};function xt(t,e,n,o){D(h(t,e),n,o)}var kt=function(t){function n(e){var n=t.call(this)||this;return n._component=e,n._props={},n}return lt(n,t),n.prototype.props=function(t){return arguments.length?(this._props=_t(_t({},this._props),t),this):this._props},n.prototype.prop=function(t,e){return 1===arguments.length?this._props[t]:(this._props[t]=e,this)},n.prototype.update=function(e,n){t.prototype.update.call(this,e,n),xt(this._component,this._props,e)},ct([e.publish({},"object","Properties"),st("design:type",Object)],n.prototype,"_props",void 0),n}(e.HTMLWidget),Ft=function(t){function n(e){var n=t.call(this)||this;return n._component=e,n._props={},n}return lt(n,t),n.prototype.props=function(t){return arguments.length?(this._props=_t(_t({},this._props),t),this):this._props},n.prototype.prop=function(t,e){return 1===arguments.length?this._props[t]:(this._props[t]=e,this)},n.prototype.update=function(e,n){t.prototype.update.call(this,e,n),xt(this._component,this._props,e)},ct([e.publish({},"object","Properties"),st("design:type",Object)],n.prototype,"_props",void 0),n}(e.SVGWidget),bt=function(t){var e=t.x,n=t.y,o=t.annotationIDs,i=void 0===o?[]:o,r=t.stepSize,a=void 0===r?-16:r,l=i.map((function(t,o){return h("g",{key:t,transform:"translate(".concat(e+o*a," ").concat(n,")")},h("use",{href:"#"+t}))}));return h(f,null,l)},Ct=function(t){var n=t.text,o=void 0===n?"":n,i=t.textHeight,r=void 0===i?10:i,a=t.textPadding,l=void 0===a?4:a,_=t.textFill,c=void 0===_?"#287EC4":_,s=t.textboxFill,d=void 0===s?"white":s,u=t.textboxStroke,f=void 0===u?"#CCCCCC":u,p=t.textboxStrokeWidth,v=void 0===p?1:p,g=t.textFontFamily,m=void 0===g?"Verdana":g,y=t.annotationGutter,x=void 0===y?2:y,k=t.annotations,F=void 0===k?[]:k,b=t.cornerRadius,C=void 0===b?3:b,w=t.icon,S=void 0===w?{}:w,R=t.subText,W=void 0===R?{}:R,O=t.showLabel,H=void 0===O||O,P=t.noLabelRadius,E=void 0===P?5:P,D=t.expansionIcon,A=t.scale,T=void 0===A?1:A;S=_t({height:50,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"#555555",fill:"transparent",strokeWidth:0},S),W=_t({text:"",fill:"white",textFill:"#555555"},W),D=D?_t({height:16,shape:"circle",padding:6,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"black",fill:"whitesmoke",stroke:"whitesmoke",strokeWidth:0},D):void 0;var N=0,V=K((function(){return e.Utility.textSize(o,m,r,!1).width}),[o,m,r]),I=0;""!==o&&(I=V+2*l+2*v);var U=(N+=I+x)-I/2,L=r+2*l+2*v,z=[];F.forEach((function(t,e){var n=t.imageChar,o=(N+=L+x)-L/2;z.push(h("g",{key:e,class:"vertex3-anno","data-click":"annotation","data-click-data":JSON.stringify(t),transform:"translate(".concat(o," ").concat(0,")")},h(vt,_t({},t,{shape:"square",height:L,imageChar:n,imageFontFamily:t.imageFontFamily,cornerRadius:C,strokeWidth:0}))))})),F.length>0&&(N+=x*(F.length-1));var j=h("g",{"data-click":"text",transform:"translate(".concat(U," ").concat(0,")")},H&&""!==o?h(yt,{text:o,height:r,padding:l,strokeWidth:v,stroke:f,fill:d,textFill:c,fontFamily:m,cornerRadius:C}):h("circle",{r:E,stroke:f,fill:c})),M=S.height||20,B=S.strokeWidth||0,q=0,G=L+2*x;""!==o||z.length>0?q=-M/2-B-L/2-2*x:""!==W.text&&(G=M/2+B+2*x);var X=""===W.text?null:h("g",{"data-click":"subtext",transform:"translate(".concat(0," ").concat(G,")")},h(yt,_t({fill:W.fill||"#FFFFFF",textFill:W.textFill||c},W,{height:r,padding:l,strokeWidth:0,stroke:f,fontFamily:m,cornerRadius:C})));return h("g",{transform:"scale(".concat(T,")")},h("g",{"data-click":"icon",transform:"translate(".concat(0," ").concat(q,")")},h(vt,_t({},S)),D&&h("g",{"data-click":"expanded-icon","data-click-data":JSON.stringify(D),transform:"translate(".concat((S.height+B)/2-D.height/2," ").concat(-(S.height+B)/2+D.height/2,")")},h(vt,_t({},D)))),h("g",{transform:"translate(".concat(-N/2," ").concat(0,")")},j,z),X)},wt=function(t){t.categoryID;var n=t.text,o=void 0===n?"":n,i=t.textHeight,r=void 0===i?10:i,a=t.textPadding,l=void 0===a?4:a,_=t.textFill,c=void 0===_?"#287EC4":_,s=t.textboxFill,d=void 0===s?"white":s,u=t.textboxStroke,f=void 0===u?"#CCCCCC":u,p=t.textboxStrokeWidth,v=void 0===p?1:p,g=t.textFontFamily,m=void 0===g?"Verdana":g,y=t.annotationGutter,x=void 0===y?2:y,k=t.annotations,F=void 0===k?[]:k,b=t.iconAnnotations,C=void 0===b?[]:b,w=t.cornerRadius,S=void 0===w?3:w,R=t.icon,W=void 0===R?{}:R,O=t.subText,H=void 0===O?{}:O,P=t.showLabel,E=void 0===P||P,D=t.noLabelRadius,A=void 0===D?5:D,T=t.iconBorderWidth,N=void 0===T?1:T,V=t.iconBorderColor,I=void 0===V?"#333":V,U=t.iconBackgroundColor,L=void 0===U?"#fff":U,z=t.iconFontColor,j=void 0===z?"#000":z,M=t.iconFontSize,B=void 0===M?20:M,q=t.iconFontFamily,G=void 0===q?"FontAwesome":q,X=t.shapeOffsetX,Y=void 0===X?0:X,J=t.shapeOffsetY,$=void 0===J?0:J,Q=t.iconOffsetX,Z=void 0===Q?0:Q,tt=t.iconOffsetY,et=void 0===tt?0:tt,nt=t.iconPadding,ot=void 0===nt?4:nt,it=t.iconText,rt=void 0===it?"?":it,at=t.shapeRendering,lt=void 0===at?"auto":at;W=_t({height:50,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"#555555",fill:"transparent",strokeWidth:0},W),H=_t({text:"",fill:"white",textFill:"#555555"},H);var ct=K((function(){return e.Utility.textSize(o,m,r,!1).width}),[o,m,r]),st=0;""!==o&&(st=ct+2*l+2*v);var dt=st+x,ht=dt-st/2,ut=r+2*x+2*v,ft=F.map((function(t,n){return e.Utility.textSize(t.imageChar,t.imageFontFamily,t.height,!1).width})),pt=[],gt=dt;F.forEach((function(t,e){var n,o=t.imageChar,i=null!==(n=t.height)&&void 0!==n?n:ut,r=(gt+=ft[e]+x)-ft[e]/2;pt.push(h("g",{key:e,class:"vertex3-anno","data-click":"annotation","data-click-data":JSON.stringify(t),transform:"translate(".concat(r," ").concat(0,")")},h(vt,_t({},t,{shape:"rectangle",width:ft[e],height:i,imageChar:o,imageFontFamily:t.imageFontFamily,cornerRadius:S,strokeWidth:0}))))})),F.length>0&&(dt+=x*(F.length-1));var mt=[];C.forEach((function(t,e){var n,o=t.shapeOffsetX,i=t.shapeOffsetY;mt.push(h("g",{key:e,class:"vertex3-iconAnno","data-click":"icon-annotation","data-click-data":JSON.stringify(t),transform:"translate(".concat(o," ").concat(i,")")},h(vt,_t({},t,{shape:null!==(n=t.shape)&&void 0!==n?n:"square",imageChar:t.imageChar,imageFontFamily:t.imageFontFamily,cornerRadius:S,stroke:t.stroke,strokeWidth:t.strokeWidth}))))}));var xt=h("g",{"data-click":"text",transform:"translate(".concat(ht," ").concat(0,")")},E&&""!==o?h(yt,{text:o,height:r,padding:l,strokeWidth:v,stroke:f,fill:d,textFill:c,fontFamily:m,cornerRadius:S}):h("circle",{r:A,stroke:f,fill:c})),kt=ut+2*x,Ft=""===H.text?null:h("g",{"data-click":"subtext",transform:"translate(".concat(0," ").concat(kt,")")},h(yt,_t({fill:H.fill||"#FFFFFF",textFill:H.textFill||c},H,{height:r,padding:l,strokeWidth:0,stroke:f,fontFamily:m,cornerRadius:S})));return h("g",null,h("g",{"data-click":"icon",transform:"translate(".concat(Y," ").concat($,")")},h(vt,_t({},W,{strokeWidth:N,shape:"circle",height:B,fill:L,stroke:I,imageFontFamily:G,imageChar:rt,imageCharFill:j,padding:ot,xOffset:Z,yOffset:et,cornerRadius:S,shapeRendering:lt})),mt),h("g",{transform:"translate(".concat(-dt/2," ").concat(0,")")},xt,pt),Ft)};t.Annotations=bt,t.BUILD_VERSION="2.104.14",t.CentroidVertex3=function(t){var e=t.id,n=t.categoryID,o=void 0===n?"":n,i=t.text,r=void 0===i?"":i,a=t.textHeight,l=void 0===a?12:a,_=t.textPadding,c=void 0===_?10:_,s=t.textFill,d=void 0===s?"#287EC4":s,u=t.textboxFill,f=void 0===u?"white":u,p=t.textboxStroke,v=void 0===p?"#CCCCCC":p,g=t.textboxStrokeWidth,m=void 0===g?1:g,y=t.textFontFamily,x=void 0===y?"Verdana":y,k=t.annotationGutter,F=void 0===k?2:k,b=t.annotations,C=void 0===b?[]:b,w=t.cornerRadius,S=t.icon,R=void 0===S?{}:S,W=t.subText,O=void 0===W?{}:W,H=t.expansionIcon,P=t.scale,E=void 0===P?1:P;return R=_t({height:91,padding:40,imageCharFill:"#555555",imageFontFamily:"FontAwesome",fill:"#FFCC33",stroke:"#DFDFDF",imageChar:"?",strokeWidth:4,yOffset:-15},R),O=_t({text:"",fill:"transparent",textFill:"#555555"},O),h(Ct,_t({},{id:e,categoryID:o,text:r,textHeight:l,textPadding:c,textFill:d,textboxFill:f,textboxStroke:v,textboxStrokeWidth:m,textFontFamily:x,annotationGutter:F,annotations:C,cornerRadius:w,icon:R,subText:O,expansionIcon:H,scale:E},{icon:R,subText:O}))},t.CentroidVertex4=function(t){var e=t.id,n=t.categoryID,o=void 0===n?"":n,i=t.text,r=void 0===i?"":i,a=t.textHeight,l=void 0===a?12:a,_=t.textPadding,c=void 0===_?10:_,s=t.textFill,d=void 0===s?"#287EC4":s,u=t.textboxFill,f=void 0===u?"white":u,p=t.textboxStroke,v=void 0===p?"#CCCCCC":p,g=t.textboxStrokeWidth,m=void 0===g?1:g,y=t.textFontFamily,x=void 0===y?"Verdana":y,k=t.annotationGutter,F=void 0===k?2:k,b=t.annotations,C=void 0===b?[]:b,w=t.iconAnnotations,S=void 0===w?[]:w,R=t.cornerRadius,W=t.icon,O=void 0===W?{}:W,H=t.subText,P=void 0===H?{}:H,E=t.showLabel,D=void 0===E||E,A=t.noLabelRadius,T=void 0===A?5:A,N=t.iconBorderWidth,V=void 0===N?1:N,I=t.iconBorderColor,U=void 0===I?"#333":I,L=t.iconBackgroundColor,z=void 0===L?"#fff":L,j=t.iconFontColor,M=void 0===j?"#000":j,B=t.iconFontSize,q=void 0===B?20:B,G=t.iconFontFamily,X=void 0===G?"FontAwesome":G,Y=t.shapeOffsetX,J=void 0===Y?0:Y,K=t.shapeOffsetY,$=void 0===K?0:K,Q=t.iconOffsetX,Z=void 0===Q?0:Q,tt=t.iconOffsetY,et=void 0===tt?0:tt,nt=t.iconPadding,ot=void 0===nt?4:nt,it=t.iconText,rt=void 0===it?"?":it,at=t.shapeRendering,lt=void 0===at?"auto":at;return O=_t({height:91,padding:40,imageCharFill:"#555555",imageFontFamily:"FontAwesome",fill:"#FFCC33",stroke:"#DFDFDF",imageChar:"?",strokeWidth:4,yOffset:-15},O),P=_t({text:"",fill:"transparent",textFill:"#555555"},P),h(wt,_t({},{id:e,categoryID:o,text:r,textHeight:l,textPadding:c,textFill:d,textboxFill:f,textboxStroke:v,textboxStrokeWidth:m,textFontFamily:x,annotationGutter:F,annotations:C,iconAnnotations:S,cornerRadius:R,icon:O,subText:P,showLabel:D,noLabelRadius:T,iconBorderWidth:V,iconBorderColor:U,iconBackgroundColor:z,iconFontColor:M,iconFontSize:q,iconFontFamily:X,shapeOffsetX:J,shapeOffsetY:$,iconOffsetX:Z,iconOffsetY:et,iconPadding:ot,iconText:rt,shapeRendering:lt},{icon:O,subText:P}))},t.Circle=ht,t.Edge=function(t){var e=t.label,n=t.labelPos,o=t.labelFill,i=void 0===o?"black":o,r=t.labelHeight,a=void 0===r?12:r;return h(f,null,h("path",{d:t.path,stroke:t.stroke,style:{strokeWidth:t.strokeWidth,strokeDasharray:t.strokeDasharray}}),e&&n&&2===n.length?h("g",{transform:"translate(".concat(n[0]," ").concat(n[1],")")},h(mt,{text:e,fill:i,height:a})):void 0)},t.HTMLAdapter=kt,t.Icon=vt,t.IconLabelledRect=function(t){var e=t.icon,n=t.iconFontFamily,o=t.text,i=t.height,r=void 0===i?12:i,a=t.width,l=void 0===a?12:a,_=t.fontFamily,c=void 0===_?"Verdana":_,s=t.fontSize,d=void 0===s?10:s,u=t.padding,p=void 0===u?3:u,v=t.fill,g=void 0===v?"whitesmoke":v,m=t.stroke,y=void 0===m?"lightgray":m,x=t.textFill,k=void 0===x?"black":x,F=t.strokeWidth,b=void 0===F?1:F,C=t.cornerRadius,w=void 0===C?0:C;return t.onSizeUpdate,h(f,null,h(ft,{width:l,height:r,fill:g,stroke:y,strokeWidth:b,cornerRadius:w}),h("g",{transform:"translate(".concat(-l/2+p," ").concat(-r/2+p,")")},h(vt,{shape:"square",imageFontFamily:n,imageChar:e,height:r,fill:g,imageCharFill:k})),h("g",{transform:"translate(".concat(-l/2+2*p+r," ").concat(-r/2+p,")")},h(gt,{text:o,fontFamily:c,height:d,fill:k,anchor:"start",baseline:"hanging"})))},t.Icons=function(t){var e=t.icons,n=(void 0===e?[]:e).map((function(t){return h("g",{key:t.id,id:t.id},h(vt,_t({},t)))}));return h(f,null,n)},t.ImageChar=dt,t.LabelledRect=function(t){var e=t.text,n=t.height,o=void 0===n?12:n,i=t.width,r=void 0===i?12:i,a=t.fontFamily,l=void 0===a?"Verdana":a,_=t.fontSize,c=void 0===_?10:_,s=t.padding,d=void 0===s?3:s,u=t.fill,p=void 0===u?"whitesmoke":u,v=t.stroke,g=void 0===v?"lightgray":v,m=t.textFill,y=void 0===m?"black":m,x=t.strokeWidth,k=void 0===x?1:x,F=t.cornerRadius,b=void 0===F?0:F;return t.onSizeUpdate,h(f,null,h(ft,{width:r,height:o,fill:p,stroke:g,strokeWidth:k,cornerRadius:b}),h("g",{transform:"translate(".concat(-r/2+d," ").concat(-o/2+d,")")},h(gt,{text:e,fontFamily:l,height:c,fill:y,anchor:"start",baseline:"hanging"})))},t.PKG_NAME="@hpcc-js/react",t.PKG_VERSION="2.53.3",t.React=rt,t.Rectangle=ft,t.SVGAdapter=Ft,t.Shape=pt,t.Square=ut,t.Subgraph=function(t){var n=t.text,o=t.width,i=void 0===o?100:o,r=t.height,a=void 0===r?100:r,l=t.fill,_=void 0===l?"transparent":l,c=t.stroke,s=void 0===c?"black":c,d=t.fontHeight,u=void 0===d?12:d,p=t.fontFamily,v=e.Utility.textSize(n,p,u,!1);return h(f,null,h(ft,{width:i,height:a,fill:_,stroke:s}),h("g",{transform:"translate(".concat((-i+v.width)/2+4," ").concat((-a+v.height)/2+4,")")},h(mt,{height:u,text:n,fontFamily:p})))},t.Text=mt,t.TextBox=yt,t.TextLine=gt,t.Vertex=function(t){var e=t.categoryID,n=void 0===e?"":e,o=t.text,i=void 0===o?"":o,r=t.textHeight,a=void 0===r?12:r,l=t.textPadding,_=void 0===l?4:l,c=t.icon,s=void 0===c?{}:c,d=t.annotationsHeight,u=void 0===d?12:d,f=t.annotationIDs,p=void 0===f?[]:f,v=t.textFill,g=t.textboxFill,m=t.textboxStroke,y=t.textFontFamily,x=t.onSizeUpdate,k=t.showLabel,F=void 0===k||k,b=t.scale,C=void 0===b?1:b,w=X(0),S=w[0],R=w[1],W=X(0),O=W[0],H=W[1];J((function(){x&&x({width:0,height:0})}),[S,O,x]);var P=S;P+=4;var E=-(2*(s=_t({imageChar:"fa-question",height:32,fill:"transparent"},s)).height/6+a+8)/2,D=s.height/3+O/2+_,A=s.height/3+O+_+u/3;F||(E+=(a+8)/2,A-=O+_);var T=$((function(t){R(t.width),H(t.height)}),[]),N=F?h("g",{transform:"translate(0 ".concat(D,")")},h(yt,{text:i,height:a,padding:_,onSizeUpdate:T,textFill:v,fill:g,stroke:m,fontFamily:y})):void 0;return n?h("g",{transform:"translate(0 ".concat(E,") scale(").concat(C,")")},h("use",{href:"#"+n}),N,h(bt,{x:P/2,y:A,annotationIDs:p})):h("g",{transform:"translate(0 ".concat(E,") scale(").concat(C,")")},h(vt,_t({},s)),N)},t.Vertex2=function(t){var n=t.categoryID,o=void 0===n?"":n,i=t.text,r=void 0===i?"":i,a=t.textHeight,l=void 0===a?12:a,_=t.textPadding,c=void 0===_?4:_,s=t.icon,d=void 0===s?{}:s,u=t.textFill,p=void 0===u?"black":u,v=t.textboxFill,g=void 0===v?"white":v,m=t.textboxStroke,y=void 0===m?"black":m,x=t.textFontFamily,k=t.annotationsHeight,F=void 0===k?12:k,b=t.annotationIDs,C=void 0===b?[]:b;d=_t({imageChar:"fa-question",imageCharFill:"white",height:32,fill:"black",shape:"square"},d);var w=l+2*c,S=K((function(){return e.Utility.textSize(r,x,l,!1)}),[r,x,l]).width,R=F,W=w/2,O=-(2*d.height/6+l+8)/2,H=-d.height/2,P=Math.ceil(S/2+c),E=W-d.height/2,D=R/2,A=W;return o?h("g",{transform:"translate(".concat(0," ").concat(O,")")},h("g",{transform:"translate(".concat(H," ").concat(0,")")},h("use",{href:"#"+o})),h("g",{transform:"translate(".concat(P," ").concat(E,")")},h(yt,{text:r,height:l,padding:c,strokeWidth:1,stroke:y,fill:g,textFill:p,fontFamily:x})),h(bt,{x:D,y:A,annotationIDs:C,stepSize:R})):h(f,null,h("g",{transform:"translate(".concat(H," ").concat(0,")scale(1.0002)")},h(vt,_t({},d,{shape:"square"}))),h("g",{transform:"translate(".concat(P," ").concat(E,")scale(1.0002)")},h(yt,{text:r,height:l,padding:c,stroke:y,fill:g})))},t.Vertex3=Ct,t.Vertex4=wt,t.render=xt,t.svgRender=function(t,e,n,o){D(h("svg",null,h(t,e)),n,o)},Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=index.min.js.map
{
"name": "@hpcc-js/react",
"version": "2.53.2",
"version": "2.53.3",
"description": "hpcc-js - Viz React",

@@ -41,3 +41,3 @@ "main": "dist/index.js",

"dependencies": {
"@hpcc-js/common": "^2.71.6",
"@hpcc-js/common": "^2.71.7",
"@hpcc-js/preact-shim": "^2.16.3"

@@ -47,3 +47,3 @@ },

"@hpcc-js/bundle": "^2.11.3",
"tslib": "2.4.0"
"tslib": "2.4.1"
},

@@ -61,3 +61,3 @@ "repository": {

"homepage": "https://github.com/hpcc-systems/Visualization",
"gitHead": "b5b4cf9ee4257885b41a3f90c11cbe6609704d0d"
"gitHead": "cec45fe4a28dff27d43cf0bb9238d751534c8e88"
}
export const PKG_NAME = "@hpcc-js/react";
export const PKG_VERSION = "2.53.2";
export const BUILD_VERSION = "2.104.13";
export const PKG_VERSION = "2.53.3";
export const BUILD_VERSION = "2.104.14";
export declare const PKG_NAME = "@hpcc-js/react";
export declare const PKG_VERSION = "2.53.2";
export declare const BUILD_VERSION = "2.104.13";
export declare const PKG_VERSION = "2.53.3";
export declare const BUILD_VERSION = "2.104.14";
//# sourceMappingURL=__package__.d.ts.map
import * as React from "@hpcc-js/preact-shim";
export interface Edge {
import { VertexProps } from "./vertex";
declare type Point = [
number,
number
];
export interface EdgeProps<V extends VertexProps = VertexProps> {
id: string | number;
origData?: any;
source: V;
target: V;
label?: string;
labelPos?: Point;
weight?: number;
strokeDasharray?: string;
strokeWidth?: number;
stroke?: string;
fontFamily?: string;
labelFill?: string;
labelHeight?: number;
path?: string;
points?: Array<[

@@ -8,7 +27,5 @@ number,

curveDepth?: number;
stroke?: string;
strokeDasharray?: string;
weight?: number;
}
export declare const Edge: React.FunctionComponent<Edge>;
export declare const Edge: React.FunctionComponent<EdgeProps>;
export {};
//# sourceMappingURL=edge.d.ts.map

@@ -12,2 +12,3 @@ import * as React from "@hpcc-js/preact-shim";

id: string | number;
origData?: any;
centroid?: boolean;

@@ -14,0 +15,0 @@ categoryID?: string;

@@ -5,3 +5,3 @@ import * as React from "@hpcc-js/preact-shim";

import { VertexProps } from "./vertex";
export interface IVertex3 extends VertexProps {
export interface Vertex3Props extends VertexProps {
id: string;

@@ -33,4 +33,4 @@ origData?: any;

}
export declare const Vertex3: React.FunctionComponent<IVertex3>;
export declare const CentroidVertex3: React.FunctionComponent<IVertex3>;
export declare const Vertex3: React.FunctionComponent<Vertex3Props>;
export declare const CentroidVertex3: React.FunctionComponent<Vertex3Props>;
//# sourceMappingURL=vertex3.d.ts.map
export declare const PKG_NAME = "@hpcc-js/react";
export declare const PKG_VERSION = "2.53.2";
export declare const BUILD_VERSION = "2.104.13";
export declare const PKG_VERSION = "2.53.3";
export declare const BUILD_VERSION = "2.104.14";
//# sourceMappingURL=__package__.d.ts.map
import * as React from "@hpcc-js/preact-shim";
export interface Edge {
import { VertexProps } from "./vertex";
declare type Point = [number, number];
export interface EdgeProps<V extends VertexProps = VertexProps> {
id: string | number;
origData?: any;
source: V;
target: V;
label?: string;
labelPos?: Point;
weight?: number;
strokeDasharray?: string;
strokeWidth?: number;
stroke?: string;
fontFamily?: string;
labelFill?: string;
labelHeight?: number;
path?: string;
points?: Array<[number, number]>;
curveDepth?: number;
stroke?: string;
strokeDasharray?: string;
weight?: number;
}
export declare const Edge: React.FunctionComponent<Edge>;
export declare const Edge: React.FunctionComponent<EdgeProps>;
export {};
//# sourceMappingURL=edge.d.ts.map

@@ -12,2 +12,3 @@ import * as React from "@hpcc-js/preact-shim";

id: string | number;
origData?: any;
centroid?: boolean;

@@ -14,0 +15,0 @@ categoryID?: string;

@@ -5,3 +5,3 @@ import * as React from "@hpcc-js/preact-shim";

import { VertexProps } from "./vertex";
export interface IVertex3 extends VertexProps {
export interface Vertex3Props extends VertexProps {
id: string;

@@ -33,4 +33,4 @@ origData?: any;

}
export declare const Vertex3: React.FunctionComponent<IVertex3>;
export declare const CentroidVertex3: React.FunctionComponent<IVertex3>;
export declare const Vertex3: React.FunctionComponent<Vertex3Props>;
export declare const CentroidVertex3: React.FunctionComponent<Vertex3Props>;
//# sourceMappingURL=vertex3.d.ts.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc