@hpcc-js/react 2.48.0 → 2.49.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es6.js CHANGED
@@ -1,31 +1,31 @@
1
1
  import { Utility, Palette, publish, HTMLWidget, SVGWidget } from '@hpcc-js/common';
2
2
 
3
- var PKG_NAME = "@hpcc-js/react";
4
- var PKG_VERSION = "2.48.0";
5
- var BUILD_VERSION = "2.101.0";
3
+ var PKG_NAME$1 = "@hpcc-js/react";
4
+ var PKG_VERSION$1 = "2.49.1";
5
+ var BUILD_VERSION$1 = "2.102.4";
6
6
 
7
- var PKG_NAME$1 = "@hpcc-js/preact-shim";
8
- var PKG_VERSION$1 = "2.13.22";
9
- var BUILD_VERSION$1 = "2.101.0";
7
+ var PKG_NAME = "@hpcc-js/preact-shim";
8
+ var PKG_VERSION = "2.14.1";
9
+ var BUILD_VERSION = "2.102.4";
10
10
 
11
- var n,u,i,t,o,f,r={},e=[],c=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function s(n,l){for(var u in l)n[u]=l[u];return n}function a(n){var l=n.parentNode;l&&l.removeChild(n);}function h(n,l,u){var i,t=arguments,o={};for(i in l)"key"!==i&&"ref"!==i&&(o[i]=l[i]);if(arguments.length>3)for(u=[u],i=3;i<arguments.length;i++)u.push(t[i]);if(null!=u&&(o.children=u),"function"==typeof n&&null!=n.defaultProps)for(i in n.defaultProps)void 0===o[i]&&(o[i]=n.defaultProps[i]);return v(n,o,l&&l.key,l&&l.ref)}function v(l,u,i,t){var o={type:l,props:u,key:i,ref:t,__k:null,__:null,__b:0,__e:null,__d:null,__c:null,constructor:void 0};return n.vnode&&n.vnode(o),o}function y(n){return n.children}function d(n,l){this.props=n,this.context=l;}function m(n,l){if(null==l)return n.__?m(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?m(n):null}function w(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 w(n)}}function g(l){(!l.__d&&(l.__d=!0)&&1===u.push(l)||t!==n.debounceRendering)&&((t=n.debounceRendering)||i)(k);}function k(){var n,l,i,t,o,f,r;for(u.sort(function(n,l){return l.__v.__b-n.__v.__b});n=u.pop();)n.__d&&(i=void 0,t=void 0,f=(o=(l=n).__v).__e,(r=l.__P)&&(i=[],t=T(r,o,s({},o),l.__n,void 0!==r.ownerSVGElement,null,i,null==f?m(o):f),$(i,o),t!=f&&w(o)));}function _(n,l,u,i,t,o,f,c,s){var h,v,p,y,d,w,g,k=u&&u.__k||e,_=k.length;if(c==r&&(c=null!=o?o[0]:_?m(u,0):null),h=0,l.__k=b(l.__k,function(u){if(null!=u){if(u.__=l,u.__b=l.__b+1,null===(p=k[h])||p&&u.key==p.key&&u.type===p.type)k[h]=void 0;else for(v=0;v<_;v++){if((p=k[v])&&u.key==p.key&&u.type===p.type){k[v]=void 0;break}p=null;}if(y=T(n,u,p=p||r,i,t,o,f,c,s),(v=u.ref)&&p.ref!=v&&(g||(g=[]),p.ref&&g.push(p.ref,null,u),g.push(v,u.__c||y,u)),null!=y){if(null==w&&(w=y),null!=u.__d)y=u.__d,u.__d=null;else if(o==p||y!=c||null==y.parentNode){n:if(null==c||c.parentNode!==n)n.appendChild(y);else {for(d=c,v=0;(d=d.nextSibling)&&v<_;v+=2)if(d==y)break n;n.insertBefore(y,c);}"option"==l.type&&(n.value="");}c=y.nextSibling,"function"==typeof l.type&&(l.__d=y);}}return h++,u}),l.__e=w,null!=o&&"function"!=typeof l.type)for(h=o.length;h--;)null!=o[h]&&a(o[h]);for(h=_;h--;)null!=k[h]&&A(k[h],k[h]);if(g)for(h=0;h<g.length;h++)z(g[h],g[++h],g[++h]);}function b(n,l,u){if(null==u&&(u=[]),null==n||"boolean"==typeof n)l&&u.push(l(null));else if(Array.isArray(n))for(var i=0;i<n.length;i++)b(n[i],l,u);else u.push(l?l("string"==typeof n||"number"==typeof n?v(null,n,null,null):null!=n.__e||null!=n.__c?v(n.type,n.props,n.key,null):n):n);return u}function x(n,l,u,i,t){var o;for(o in u)o in l||P(n,o,null,u[o],i);for(o in l)t&&"function"!=typeof l[o]||"value"===o||"checked"===o||u[o]===l[o]||P(n,o,l[o],u[o],i);}function C(n,l,u){"-"===l[0]?n.setProperty(l,u):n[l]="number"==typeof u&&!1===c.test(l)?u+"px":null==u?"":u;}function P(n,l,u,i,t){var o,f,r,e,c;if(t?"className"===l&&(l="class"):"class"===l&&(l="className"),"key"===l||"children"===l);else if("style"===l)if(o=n.style,"string"==typeof u)o.cssText=u;else {if("string"==typeof i&&(o.cssText="",i=null),i)for(f in i)u&&f in u||C(o,f,"");if(u)for(r in u)i&&u[r]===i[r]||C(o,r,u[r]);}else "o"===l[0]&&"n"===l[1]?(e=l!==(l=l.replace(/Capture$/,"")),c=l.toLowerCase(),l=(c in n?c:l).slice(2),u?(i||n.addEventListener(l,N,e),(n.l||(n.l={}))[l]=u):n.removeEventListener(l,N,e)):"list"!==l&&"tagName"!==l&&"form"!==l&&"type"!==l&&!t&&l in n?n[l]=null==u?"":u:"function"!=typeof u&&"dangerouslySetInnerHTML"!==l&&(l!==(l=l.replace(/^xlink:?/,""))?null==u||!1===u?n.removeAttributeNS("http://www.w3.org/1999/xlink",l.toLowerCase()):n.setAttributeNS("http://www.w3.org/1999/xlink",l.toLowerCase(),u):null==u||!1===u?n.removeAttribute(l):n.setAttribute(l,u));}function N(l){this.l[l.type](n.event?n.event(l):l);}function T(l,u,i,t,o,f,r,e,c){var a,h,v,p,m,w,g,k,x,C,P=u.type;if(void 0!==u.constructor)return null;(a=n.__b)&&a(u);try{n:if("function"==typeof P){if(k=u.props,x=(a=P.contextType)&&t[a.__c],C=a?x?x.props.value:a.__:t,i.__c?g=(h=u.__c=i.__c).__=h.__E:("prototype"in P&&P.prototype.render?u.__c=h=new P(k,C):(u.__c=h=new d(k,C),h.constructor=P,h.render=D),x&&x.sub(h),h.props=k,h.state||(h.state={}),h.context=C,h.__n=t,v=h.__d=!0,h.__h=[]),null==h.__s&&(h.__s=h.state),null!=P.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=s({},h.__s)),s(h.__s,P.getDerivedStateFromProps(k,h.__s))),p=h.props,m=h.state,v)null==P.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(null==P.getDerivedStateFromProps&&k!==p&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(k,C),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(k,h.__s,C)){for(h.props=k,h.state=h.__s,h.__d=!1,h.__v=u,u.__e=i.__e,u.__k=i.__k,h.__h.length&&r.push(h),a=0;a<u.__k.length;a++)u.__k[a]&&(u.__k[a].__=u);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(k,h.__s,C),null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(p,m,w);});}h.context=C,h.props=k,h.state=h.__s,(a=n.__r)&&a(u),h.__d=!1,h.__v=u,h.__P=l,a=h.render(h.props,h.state,h.context),u.__k=b(null!=a&&a.type==y&&null==a.key?a.props.children:a),null!=h.getChildContext&&(t=s(s({},t),h.getChildContext())),v||null==h.getSnapshotBeforeUpdate||(w=h.getSnapshotBeforeUpdate(p,m)),_(l,u,i,t,o,f,r,e,c),h.base=u.__e,h.__h.length&&r.push(h),g&&(h.__E=h.__=null),h.__e=null;}else u.__e=j(i.__e,u,i,t,o,f,r,c);(a=n.diffed)&&a(u);}catch(l){n.__e(l,u,i);}return u.__e}function $(l,u){n.__c&&n.__c(u,l),l.some(function(u){try{l=u.__h,u.__h=[],l.some(function(n){n.call(u);});}catch(l){n.__e(l,u.__v);}});}function j(n,l,u,i,t,o,f,c){var s,a,h,v,p,y=u.props,d=l.props;if(t="svg"===l.type||t,null==n&&null!=o)for(s=0;s<o.length;s++)if(null!=(a=o[s])&&(null===l.type?3===a.nodeType:a.localName===l.type)){n=a,o[s]=null;break}if(null==n){if(null===l.type)return document.createTextNode(d);n=t?document.createElementNS("http://www.w3.org/2000/svg",l.type):document.createElement(l.type),o=null;}if(null===l.type)null!=o&&(o[o.indexOf(n)]=null),y!==d&&(n.data=d);else if(l!==u){if(null!=o&&(o=e.slice.call(n.childNodes)),h=(y=u.props||r).dangerouslySetInnerHTML,v=d.dangerouslySetInnerHTML,!c){if(y===r)for(y={},p=0;p<n.attributes.length;p++)y[n.attributes[p].name]=n.attributes[p].value;(v||h)&&(v&&h&&v.__html==h.__html||(n.innerHTML=v&&v.__html||""));}x(n,d,y,t,c),l.__k=l.props.children,v||_(n,l,u,i,"foreignObject"!==l.type&&t,o,f,r,c),c||("value"in d&&void 0!==d.value&&d.value!==n.value&&(n.value=null==d.value?"":d.value),"checked"in d&&void 0!==d.checked&&d.checked!==n.checked&&(n.checked=d.checked));}return n}function z(l,u,i){try{"function"==typeof l?l(u):l.current=u;}catch(l){n.__e(l,i);}}function A(l,u,i){var t,o,f;if(n.unmount&&n.unmount(l),(t=l.ref)&&z(t,null,u),i||"function"==typeof l.type||(i=null!=(o=l.__e)),l.__e=l.__d=null,null!=(t=l.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount();}catch(l){n.__e(l,u);}t.base=t.__P=null;}if(t=l.__k)for(f=0;f<t.length;f++)t[f]&&A(t[f],u,i);null!=o&&a(o);}function D(n,l,u){return this.constructor(n,u)}function E(l,u,i){var t,f,c;n.__&&n.__(l,u),f=(t=i===o)?null:i&&i.__k||u.__k,l=h(y,null,[l]),c=[],T(u,(t?u:i||u).__k=l,f||r,r,void 0!==u.ownerSVGElement,i&&!t?[i]:f?null:e.slice.call(u.childNodes),c,i||r,t),$(c,l);}n={__e:function(n,l){for(var u;l=l.__;)if((u=l.__c)&&!u.__)try{if(u.constructor&&null!=u.constructor.getDerivedStateFromError)u.setState(u.constructor.getDerivedStateFromError(n));else {if(null==u.componentDidCatch)continue;u.componentDidCatch(n);}return g(u.__E=u)}catch(l){n=l;}throw n}},d.prototype.setState=function(n,l){var u;u=this.__s!==this.state?this.__s:this.__s=s({},this.state),"function"==typeof n&&(n=n(u,this.props)),n&&s(u,n),null!=n&&this.__v&&(this.__e=!1,l&&this.__h.push(l),g(this));},d.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),g(this));},d.prototype.render=y,u=[],i="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,o=r,f=0;
11
+ var n,l$1,u$1,t$1,o$1,r$1,e$1={},c$1=[],s=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function a$1(n,l){for(var u in l)n[u]=l[u];return n}function h(n){var l=n.parentNode;l&&l.removeChild(n);}function v$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 y$1(l,f,t,o,null)}function y$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 d$1(n){return n.children}function _(n,l){this.props=n,this.context=l;}function k$1(n,l){if(null==l)return n.__?k$1(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?k$1(n):null}function b$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 b$1(n)}}function m$1(n){(!n.__d&&(n.__d=!0)&&t$1.push(n)&&!g$1.__r++||r$1!==l$1.debounceRendering)&&((r$1=l$1.debounceRendering)||o$1)(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=a$1({},t)).__v=t.__v+1,j$1(r,t,i,l.__n,void 0!==r.ownerSVGElement,null!=t.__h?[o]:null,u,null==o?k$1(t):o,t.__h),z(u,t),t.__e!=o&&b$1(t)));});}function w$1(n,l,u,i,t,o,r,f,s,a){var h,v,p,_,b,m,g,w=i&&i.__k||c$1,A=w.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(_=u.__k[h]=null==(_=l[h])||"boolean"==typeof _?null:"string"==typeof _||"number"==typeof _||"bigint"==typeof _?y$1(null,_,null,null,_):Array.isArray(_)?y$1(d$1,{children:_},null,null,null):_.__b>0?y$1(_.type,_.props,_.key,null,_.__v):_)){if(_.__=u,_.__b=u.__b+1,null===(p=w[h])||p&&_.key==p.key&&_.type===p.type)w[h]=void 0;else for(v=0;v<A;v++){if((p=w[v])&&_.key==p.key&&_.type===p.type){w[v]=void 0;break}p=null;}j$1(n,_,p=p||e$1,t,o,r,f,s,a),b=_.__e,(v=_.ref)&&p.ref!=v&&(g||(g=[]),p.ref&&g.push(p.ref,null,_),g.push(v,_.__c||b,_)),null!=b?(null==m&&(m=b),"function"==typeof _.type&&_.__k===p.__k?_.__d=s=x$1(_,s,n):s=P(n,_,p,w,b,s),"function"==typeof u.type&&(u.__d=s)):s&&p.__e==s&&s.parentNode!=n&&(s=k$1(p));}for(u.__e=m,h=A;h--;)null!=w[h]&&("function"==typeof u.type&&null!=w[h].__e&&w[h].__e==u.__d&&(u.__d=k$1(i,h+1)),N(w[h],w[h]));if(g)for(h=0;h<g.length;h++)M(g[h],g[++h],g[++h]);}function x$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?x$1(i,l,u):P(u,i,i,t,i.__e,l));return l}function P(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||s.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:I,o):n.removeEventListener(l,o?T: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||"a"===l[0]&&"r"===l[1])?n.setAttribute(l,u):n.removeAttribute(l));}}function I(n){this.l[n.type+!1](l$1.event?l$1.event(n):n);}function T(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 s,h,v,y,p,k,b,m,g,x,A,P=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]),(s=l$1.__b)&&s(u);try{n:if("function"==typeof P){if(m=u.props,g=(s=P.contextType)&&t[s.__c],x=s?g?g.props.value:s.__:t,i.__c?b=(h=u.__c=i.__c).__=h.__E:("prototype"in P&&P.prototype.render?u.__c=h=new P(m,x):(u.__c=h=new _(m,x),h.constructor=P,h.render=O),g&&g.sub(h),h.props=m,h.state||(h.state={}),h.context=x,h.__n=t,v=h.__d=!0,h.__h=[]),null==h.__s&&(h.__s=h.state),null!=P.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=a$1({},h.__s)),a$1(h.__s,P.getDerivedStateFromProps(m,h.__s))),y=h.props,p=h.state,v)null==P.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(null==P.getDerivedStateFromProps&&m!==y&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(m,x),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(m,h.__s,x)||u.__v===i.__v){h.props=m,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);}),h.__h.length&&f.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(m,h.__s,x),null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(y,p,k);});}h.context=x,h.props=m,h.state=h.__s,(s=l$1.__r)&&s(u),h.__d=!1,h.__v=u,h.__P=n,s=h.render(h.props,h.state,h.context),h.state=h.__s,null!=h.getChildContext&&(t=a$1(a$1({},t),h.getChildContext())),v||null==h.getSnapshotBeforeUpdate||(k=h.getSnapshotBeforeUpdate(y,p)),A=null!=s&&s.type===d$1&&null==s.key?s.props.children:s,w$1(n,Array.isArray(A)?A:[A],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);(s=l$1.diffed)&&s(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(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,f,c){var s,a,v,y=i.props,p=u.props,d=u.type,_=0;if("svg"===d&&(o=!0),null!=r)for(;_<r.length;_++)if((s=r[_])&&"setAttribute"in s==!!d&&(d?s.localName===d:3===s.nodeType)){l=s,r[_]=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),a=(y=i.props||e$1).dangerouslySetInnerHTML,v=p.dangerouslySetInnerHTML,!c){if(null!=r)for(y={},_=0;_<l.attributes.length;_++)y[l.attributes[_].name]=l.attributes[_].value;(v||a)&&(v&&(a&&v.__html==a.__html||v.__html===l.innerHTML)||(l.innerHTML=v&&v.__html||""));}if(C(l,p,y,o,c),v)u.__k=[];else if(_=u.props.children,w$1(l,Array.isArray(_)?_:[_],u,i,t,o&&"foreignObject"!==d,r,f,r?r[0]:i.__k&&k$1(i,0),c),null!=r)for(_=r.length;_--;)null!=r[_]&&h(r[_]);c||("value"in p&&void 0!==(_=p.value)&&(_!==l.value||"progress"===d&&!_||"option"===d&&_!==y.value)&&H(l,"value",_,y.value,!1),"checked"in p&&void 0!==(_=p.checked)&&_!==l.checked&&H(l,"checked",_,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;}if(t=n.__k)for(o=0;o<t.length;o++)t[o]&&N(t[o],u,"function"!=typeof n.type);i||null==n.__e||h(n.__e),n.__e=n.__d=void 0;}function O(n,l,u){return this.constructor(n,u)}function S(u,i,t){var o,r,f;l$1.__&&l$1.__(u,i),r=(o="function"==typeof t)?null:t&&t.__k||i.__k,f=[],j$1(i,u=(!o&&t||i).__k=v$1(d$1,null,[u]),r||e$1,e$1,void 0!==i.ownerSVGElement,!o&&t?[t]:r?null:i.firstChild?n.call(i.childNodes):null,f,!o&&t?t:r?r.__e:i.firstChild,o),z(f,u);}n=c$1.slice,l$1={__e:function(n,l){for(var u,i,t;l=l.__;)if((u=l.__c)&&!u.__)try{if((i=u.constructor)&&null!=i.getDerivedStateFromError&&(u.setState(i.getDerivedStateFromError(n)),t=u.__d),null!=u.componentDidCatch&&(u.componentDidCatch(n),t=u.__d),t)return u.__E=u}catch(l){n=l;}throw n}},u$1=0,_.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=a$1({},this.state),"function"==typeof n&&(n=n(a$1({},u),this.props)),n&&a$1(u,n),null!=n&&this.__v&&(l&&this.__h.push(l),m$1(this));},_.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),m$1(this));},_.prototype.render=d$1,t$1=[],o$1="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,g$1.__r=0;
12
12
 
13
- var t$1,u$1,r$1,i$1=[],o$1=n.__r,f$1=n.diffed,c$1=n.__c,e$1=n.unmount;function a$1(t){n.__h&&n.__h(u$1);var r=u$1.__H||(u$1.__H={t:[],u:[]});return t>=r.t.length&&r.t.push({}),r.t[t]}function v$1(n){return m$1(x$1,n)}function m$1(n,r,i){var o=a$1(t$1++);return o.__c||(o.__c=u$1,o.i=[i?i(r):x$1(void 0,r),function(t){var u=n(o.i[0],t);o.i[0]!==u&&(o.i[0]=u,o.__c.setState({}));}]),o.i}function p(n,r){var i=a$1(t$1++);q(i.o,r)&&(i.i=n,i.o=r,u$1.__H.u.push(i));}function y$1(n,u){var r=a$1(t$1++);return q(r.o,u)?(r.o=u,r.v=n,r.i=n()):r.i}function F(){i$1.some(function(n){n.__P&&(n.__H.u.forEach(_$1),n.__H.u.forEach(g$1),n.__H.u=[]);}),i$1=[];}function _$1(n){n.m&&n.m();}function g$1(n){var t=n.i();"function"==typeof t&&(n.m=t);}function q(n,t){return !n||t.some(function(t,u){return t!==n[u]})}function x$1(n,t){return "function"==typeof t?t(n):t}n.__r=function(n){o$1&&o$1(n),t$1=0,(u$1=n.__c).__H&&(u$1.__H.u.forEach(_$1),u$1.__H.u.forEach(g$1),u$1.__H.u=[]);},n.diffed=function(t){f$1&&f$1(t);var u=t.__c;if(u){var o=u.__H;o&&o.u.length&&(1!==i$1.push(u)&&r$1===n.requestAnimationFrame||((r$1=n.requestAnimationFrame)||function(n){var t,u=function(){clearTimeout(r),cancelAnimationFrame(t),setTimeout(n);},r=setTimeout(u,100);"undefined"!=typeof window&&(t=requestAnimationFrame(u));})(F));}},n.__c=function(n,t){t.some(function(n){n.__h.forEach(_$1),n.__h=n.__h.filter(function(n){return !n.i||g$1(n)});}),c$1&&c$1(n,t);},n.unmount=function(n){e$1&&e$1(n);var t=n.__c;if(t){var u=t.__H;u&&u.t.forEach(function(n){return n.m&&n.m()});}};
13
+ var t,u,r,o=0,i=[],c=l$1.__b,f=l$1.__r,e=l$1.diffed,a=l$1.__c,v=l$1.unmount;function m(t,r){l$1.__h&&l$1.__h(u,t,o||r),o=0;var i=u.__H||(u.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({}),i.__[t]}function l(n){return o=1,p(w,n)}function p(n,r,o){var i=m(t++,2);return i.t=n,i.__c||(i.__=[o?o(r):w(void 0,r),function(n){var t=i.t(i.__[0],n);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}));}],i.__c=u),i.__}function y$2(r,o){var i=m(t++,3);!l$1.__s&&k(i.__H,o)&&(i.__=r,i.__H=o,u.__H.__h.push(i));}function d(n,u){var r=m(t++,7);return k(r.__H,u)&&(r.__=n(),r.__H=u,r.__h=n),r.__}function x$2(){for(var t;t=i.shift();)if(t.__P)try{t.__H.__h.forEach(g),t.__H.__h.forEach(j),t.__H.__h=[];}catch(u){t.__H.__h=[],l$1.__e(u,t.__v);}}l$1.__b=function(n){u=null,c&&c(n);},l$1.__r=function(n){f&&f(n),t=0;var r=(u=n.__c).__H;r&&(r.__h.forEach(g),r.__h.forEach(j),r.__h=[]);},l$1.diffed=function(t){e&&e(t);var o=t.__c;o&&o.__H&&o.__H.__h.length&&(1!==i.push(o)&&r===l$1.requestAnimationFrame||((r=l$1.requestAnimationFrame)||function(n){var t,u=function(){clearTimeout(r),b&&cancelAnimationFrame(t),setTimeout(n);},r=setTimeout(u,100);b&&(t=requestAnimationFrame(u));})(x$2)),u=null;},l$1.__c=function(t,u){u.some(function(t){try{t.__h.forEach(g),t.__h=t.__h.filter(function(n){return !n.__||j(n)});}catch(r){u.some(function(n){n.__h&&(n.__h=[]);}),u=[],l$1.__e(r,t.__v);}}),a&&a(t,u);},l$1.unmount=function(t){v&&v(t);var u,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{g(n);}catch(n){u=n;}}),u&&l$1.__e(u,r.__v));};var b="function"==typeof requestAnimationFrame;function g(n){var t=u,r=n.__c;"function"==typeof r&&(n.__c=void 0,r()),u=t;}function j(n){var t=u;n.__c=n.__(),u=t;}function k(n,t){return !n||n.length!==t.length||t.some(function(t,u){return t!==n[u]})}function w(n,t){return "function"==typeof t?t(n):t}
14
14
 
15
15
  var index_es6 = /*#__PURE__*/Object.freeze({
16
16
  __proto__: null,
17
- BUILD_VERSION: BUILD_VERSION$1,
18
- Component: d,
19
- Fragment: y,
20
- PKG_NAME: PKG_NAME$1,
21
- PKG_VERSION: PKG_VERSION$1,
22
- createElement: h,
23
- h: h,
24
- render: E,
25
- useEffect: p,
26
- useMemo: y$1,
27
- useReducer: m$1,
28
- useState: v$1
17
+ BUILD_VERSION: BUILD_VERSION,
18
+ Component: _,
19
+ Fragment: d$1,
20
+ PKG_NAME: PKG_NAME,
21
+ PKG_VERSION: PKG_VERSION,
22
+ createElement: v$1,
23
+ h: v$1,
24
+ render: S,
25
+ useEffect: y$2,
26
+ useMemo: d,
27
+ useReducer: p,
28
+ useState: l
29
29
  });
30
30
 
31
31
  var pi = Math.PI,
@@ -195,17 +195,17 @@ function curveLinear(context) {
195
195
  return new Linear(context);
196
196
  }
197
197
 
198
- function x$2(p) {
198
+ function x(p) {
199
199
  return p[0];
200
200
  }
201
201
 
202
- function y$2(p) {
202
+ function y(p) {
203
203
  return p[1];
204
204
  }
205
205
 
206
206
  function d3Line() {
207
- var x = x$2,
208
- y = y$2,
207
+ var x$1 = x,
208
+ y$1 = y,
209
209
  defined = constant(true),
210
210
  context = null,
211
211
  curve = curveLinear,
@@ -225,18 +225,18 @@ function d3Line() {
225
225
  if (defined0 = !defined0) output.lineStart();
226
226
  else output.lineEnd();
227
227
  }
228
- if (defined0) output.point(+x(d, i, data), +y(d, i, data));
228
+ if (defined0) output.point(+x$1(d, i, data), +y$1(d, i, data));
229
229
  }
230
230
 
231
231
  if (buffer) return output = null, buffer + "" || null;
232
232
  }
233
233
 
234
234
  line.x = function(_) {
235
- return arguments.length ? (x = typeof _ === "function" ? _ : constant(+_), line) : x;
235
+ return arguments.length ? (x$1 = typeof _ === "function" ? _ : constant(+_), line) : x$1;
236
236
  };
237
237
 
238
238
  line.y = function(_) {
239
- return arguments.length ? (y = typeof _ === "function" ? _ : constant(+_), line) : y;
239
+ return arguments.length ? (y$1 = typeof _ === "function" ? _ : constant(+_), line) : y$1;
240
240
  };
241
241
 
242
242
  line.defined = function(_) {
@@ -326,12 +326,12 @@ function calcArc(points, curveDepth) {
326
326
  var Edge = function (_a) {
327
327
  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;
328
328
  console.log("strokeDasharray", strokeDasharray);
329
- return h("path", { stroke: stroke, "stroke-dasharray": strokeDasharray, d: line(calcArc(points, curveDepth)) });
329
+ return v$1("path", { stroke: stroke, "stroke-dasharray": strokeDasharray, d: line(calcArc(points, curveDepth)) });
330
330
  };
331
331
 
332
332
  var ImageChar = function (_a) {
333
333
  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;
334
- return h("text", { x: x, y: y, fill: fill, stroke: stroke, "font-family": fontFamily, "font-size": height + "px", "dominant-baseline": "middle", style: "text-anchor: middle;alignment-baseline:middle;" }, fontFamily === "FontAwesome" ? Utility.faChar(char) : char);
334
+ return v$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;" }, fontFamily === "FontAwesome" ? Utility.faChar(char) : char);
335
335
  };
336
336
 
337
337
  /*! *****************************************************************************
@@ -389,47 +389,47 @@ function __metadata(metadataKey, metadataValue) {
389
389
 
390
390
  var Circle = function (_a) {
391
391
  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;
392
- return h("circle", { r: radius, fill: fill, stroke: stroke, "stroke-width": strokeWidth, "shape-rendering": shapeRendering });
392
+ return v$1("circle", { r: radius, fill: fill, stroke: stroke, "stroke-width": strokeWidth, "shape-rendering": shapeRendering });
393
393
  };
394
394
  var Square = function (_a) {
395
395
  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;
396
- return h("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 });
396
+ return v$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 });
397
397
  };
398
398
  var Rectangle = function (_a) {
399
399
  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;
400
- return h("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 });
400
+ return v$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 });
401
401
  };
402
402
  var Shape = function (_a) {
403
403
  var _b = _a.shape, shape = _b === void 0 ? "circle" : _b, _c = _a.height, height = _c === void 0 ? 128 : _c, fill = _a.fill, stroke = _a.stroke, _d = _a.strokeWidth, strokeWidth = _d === void 0 ? 1 : _d, shapeRendering = _a.shapeRendering, cornerRadius = _a.cornerRadius;
404
404
  switch (shape) {
405
405
  case "square":
406
- return h(Square, { radius: height / 2, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering, cornerRadius: cornerRadius });
406
+ return v$1(Square, { radius: height / 2, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering, cornerRadius: cornerRadius });
407
407
  case "circle":
408
408
  default:
409
- return h(Circle, { radius: height / 2, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering });
409
+ return v$1(Circle, { radius: height / 2, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering });
410
410
  }
411
411
  };
412
412
 
413
413
  var Icon = function (_a) {
414
414
  var _b = _a.shape, shape = _b === void 0 ? "circle" : _b, _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 ? Palette.textColor(fill) : _g, _h = _a.padding, padding = _h === void 0 ? height / 5 : _h, _j = _a.yOffset, yOffset = _j === void 0 ? 0 : _j, cornerRadius = _a.cornerRadius, shapeRendering = _a.shapeRendering;
415
- return h(y, null,
416
- h(Shape, { shape: shape, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering, cornerRadius: cornerRadius }),
417
- h(ImageChar, { y: yOffset, height: height - padding, fontFamily: imageFontFamily, char: imageChar, fill: imageCharFill, "font-weight": 400 }));
415
+ return v$1(d$1, null,
416
+ v$1(Shape, { shape: shape, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering, cornerRadius: cornerRadius }),
417
+ v$1(ImageChar, { y: yOffset, height: height - padding, fontFamily: imageFontFamily, char: imageChar, fill: imageCharFill, "font-weight": 400 }));
418
418
  };
419
419
  var Icons = function (_a) {
420
420
  var _b = _a.icons, icons = _b === void 0 ? [] : _b;
421
421
  var IconComponents = icons.map(function (cat) {
422
- return h("g", { key: cat.id, id: cat.id },
423
- h(Icon, __assign({}, cat)));
422
+ return v$1("g", { key: cat.id, id: cat.id },
423
+ v$1(Icon, __assign({}, cat)));
424
424
  });
425
- return h(y, null, IconComponents);
425
+ return v$1(d$1, null, IconComponents);
426
426
  };
427
427
 
428
428
  function render(C, props, parent, replaceNode) {
429
- E(h(C, props), parent, replaceNode);
429
+ S(v$1(C, props), parent, replaceNode);
430
430
  }
431
431
  function svgRender(C, props, parent, replaceNode) {
432
- E(h("svg", null, h(C, props)), parent, replaceNode);
432
+ S(v$1("svg", null, v$1(C, props)), parent, replaceNode);
433
433
  }
434
434
  var HTMLAdapter = /** @class */ (function (_super) {
435
435
  __extends(HTMLAdapter, _super);
@@ -494,69 +494,69 @@ var SVGAdapter = /** @class */ (function (_super) {
494
494
 
495
495
  var TextLine = function (_a) {
496
496
  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;
497
- return h("text", { "font-family": fontFamily, "font-size": height + "px", "text-anchor": anchor, "dominant-baseline": baseline, fill: fill }, text);
497
+ return v$1("text", { "font-family": fontFamily, "font-size": "".concat(height, "px"), "text-anchor": anchor, "dominant-baseline": baseline, fill: fill }, text);
498
498
  };
499
499
  var Text = function (_a) {
500
500
  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, _e = _a.onSizeUpdate, onSizeUpdate = _e === void 0 ? function (size) { } : _e;
501
- var _f = v$1(0), totalWidth = _f[0], onTotalWidthUpdate = _f[1];
502
- var _g = v$1(0), totalHeight = _g[0], onTotalHeightUpdate = _g[1];
503
- p(function () { return onSizeUpdate({ width: totalWidth, height: totalHeight }); }, [totalWidth, totalHeight]);
501
+ var _f = l(0), totalWidth = _f[0], onTotalWidthUpdate = _f[1];
502
+ var _g = l(0), totalHeight = _g[0], onTotalHeightUpdate = _g[1];
503
+ y$2(function () { return onSizeUpdate({ width: totalWidth, height: totalHeight }); }, [totalWidth, totalHeight]);
504
504
  var parts = text.split("\n");
505
505
  var ts = Utility.textSize(parts, fontFamily, height);
506
506
  onTotalWidthUpdate(ts.width);
507
507
  onTotalHeightUpdate(parts.length * (height + 2) - 2);
508
508
  var yOffset = -(totalHeight / 2) + (height / 2);
509
509
  var TextLines = parts.map(function (p, i) {
510
- return h("g", { transform: "translate(0 " + (yOffset + i * (height + 2)) + ")" },
511
- h(TextLine, { text: p, height: height, fontFamily: fontFamily, fill: fill }));
510
+ return v$1("g", { transform: "translate(0 ".concat(yOffset + i * (height + 2), ")") },
511
+ v$1(TextLine, { text: p, height: height, fontFamily: fontFamily, fill: fill }));
512
512
  });
513
- return h(y, null, TextLines);
513
+ return v$1(d$1, null, TextLines);
514
514
  };
515
515
  var TextBox = function (_a) {
516
516
  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, _k = _a.onSizeUpdate, onSizeUpdate = _k === void 0 ? function (size) { } : _k;
517
- var _l = v$1(0), textWidth = _l[0], onTextWidthUpdate = _l[1];
518
- var _m = v$1(0), textHeight = _m[0], onTextHeightUpdate = _m[1];
519
- p(function () { return onSizeUpdate({ width: textWidth, height: textHeight }); }, [textWidth, textHeight]);
517
+ var _l = l(0), textWidth = _l[0], onTextWidthUpdate = _l[1];
518
+ var _m = l(0), textHeight = _m[0], onTextHeightUpdate = _m[1];
519
+ y$2(function () { return onSizeUpdate({ width: textWidth, height: textHeight }); }, [textWidth, textHeight]);
520
520
  var w = textWidth + padding * 2 + strokeWidth;
521
- var h$1 = textHeight + padding * 2 + strokeWidth;
521
+ var h = textHeight + padding * 2 + strokeWidth;
522
522
  var textOffsetY = Math.floor(height / 10);
523
- return h(y, null,
524
- h(Rectangle, { width: w, height: h$1, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
525
- h("g", { transform: "translate(0 " + textOffsetY + ")" },
526
- h(Text, { text: text, fontFamily: fontFamily, height: height, fill: textFill, onSizeUpdate: onTextSizeUpdate })));
523
+ return v$1(d$1, null,
524
+ v$1(Rectangle, { width: w, height: h, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
525
+ v$1("g", { transform: "translate(0 ".concat(textOffsetY, ")") },
526
+ v$1(Text, { text: text, fontFamily: fontFamily, height: height, fill: textFill, onSizeUpdate: onTextSizeUpdate })));
527
527
  function onTextSizeUpdate(size) {
528
528
  onTextWidthUpdate(size.width);
529
529
  onTextHeightUpdate(size.height);
530
530
  }
531
531
  };
532
532
  var LabelledRect = function (_a) {
533
- 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, _m = _a.onSizeUpdate;
534
- return h(y, null,
535
- h(Rectangle, { width: width, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
536
- h("g", { transform: "translate(" + (-(width / 2) + padding) + " " + (-(height / 2) + padding) + ")" },
537
- h(TextLine, { text: text, fontFamily: fontFamily, height: fontSize, fill: textFill, anchor: "start", baseline: "hanging" })));
533
+ 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;
534
+ return v$1(d$1, null,
535
+ v$1(Rectangle, { width: width, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
536
+ v$1("g", { transform: "translate(".concat(-(width / 2) + padding, " ").concat(-(height / 2) + padding, ")") },
537
+ v$1(TextLine, { text: text, fontFamily: fontFamily, height: fontSize, fill: textFill, anchor: "start", baseline: "hanging" })));
538
538
  };
539
539
  var IconLabelledRect = function (_a) {
540
- 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, _m = _a.onSizeUpdate;
541
- return h(y, null,
542
- h(Rectangle, { width: width, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
543
- h("g", { transform: "translate(" + (-(width / 2) + padding) + " " + (-(height / 2) + padding) + ")" },
544
- h(Icon, { shape: "square", imageFontFamily: iconFontFamily, imageChar: icon, height: height, fill: fill, imageCharFill: textFill })),
545
- h("g", { transform: "translate(" + (-(width / 2) + (padding * 2) + height) + " " + (-(height / 2) + padding) + ")" },
546
- h(TextLine, { text: text, fontFamily: fontFamily, height: fontSize, fill: textFill, anchor: "start", baseline: "hanging" })));
540
+ 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;
541
+ return v$1(d$1, null,
542
+ v$1(Rectangle, { width: width, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
543
+ v$1("g", { transform: "translate(".concat(-(width / 2) + padding, " ").concat(-(height / 2) + padding, ")") },
544
+ v$1(Icon, { shape: "square", imageFontFamily: iconFontFamily, imageChar: icon, height: height, fill: fill, imageCharFill: textFill })),
545
+ v$1("g", { transform: "translate(".concat(-(width / 2) + (padding * 2) + height, " ").concat(-(height / 2) + padding, ")") },
546
+ v$1(TextLine, { text: text, fontFamily: fontFamily, height: fontSize, fill: textFill, anchor: "start", baseline: "hanging" })));
547
547
  };
548
548
 
549
549
  var Annotations = function (_a) {
550
- var x = _a.x, y$1 = _a.y, _b = _a.annotationIDs, annotationIDs = _b === void 0 ? [] : _b, _c = _a.stepSize, stepSize = _c === void 0 ? -16 : _c;
551
- var IconComponents = annotationIDs.map(function (id, i) { return h("g", { key: id, transform: "translate(" + (x + i * stepSize) + " " + y$1 + ")" },
552
- h("use", { href: "#" + id })); });
553
- return h(y, null, IconComponents);
550
+ var x = _a.x, y = _a.y, _b = _a.annotationIDs, annotationIDs = _b === void 0 ? [] : _b, _c = _a.stepSize, stepSize = _c === void 0 ? -16 : _c;
551
+ var IconComponents = annotationIDs.map(function (id, i) { return v$1("g", { key: id, transform: "translate(".concat(x + i * stepSize, " ").concat(y, ")") },
552
+ v$1("use", { href: "#" + id })); });
553
+ return v$1(d$1, null, IconComponents);
554
554
  };
555
555
  var Vertex = function (_a) {
556
556
  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, _j = _a.onSizeUpdate, onSizeUpdate = _j === void 0 ? function (size) { } : _j, _k = _a.showLabel, showLabel = _k === void 0 ? true : _k;
557
- var _l = v$1(0), textBoxWidth = _l[0], onTextBoxWidthUpdate = _l[1];
558
- var _m = v$1(0), textBoxHeight = _m[0], onTextBoxHeightUpdate = _m[1];
559
- p(function () { return onSizeUpdate({ width: 0, height: 0 }); }, [textBoxWidth, textBoxHeight]);
557
+ var _l = l(0), textBoxWidth = _l[0], onTextBoxWidthUpdate = _l[1];
558
+ var _m = l(0), textBoxHeight = _m[0], onTextBoxHeightUpdate = _m[1];
559
+ y$2(function () { return onSizeUpdate({ width: 0, height: 0 }); }, [textBoxWidth, textBoxHeight]);
560
560
  icon = __assign({ imageChar: "fa-question", height: 32, fill: "transparent" }, icon);
561
561
  var width = textBoxWidth;
562
562
  width += 4;
@@ -567,15 +567,15 @@ var Vertex = function (_a) {
567
567
  offsetY += (textHeight + 8) / 2;
568
568
  annotationOffsetY -= textBoxHeight + textPadding;
569
569
  }
570
- var label = showLabel ? h("g", { transform: "translate(0 " + textboxOffsetY + ")" },
571
- h(TextBox, { text: text, height: textHeight, padding: textPadding, onSizeUpdate: onTextBoxSizeUpdate, textFill: textFill, fill: textboxFill, stroke: textboxStroke, fontFamily: textFontFamily })) : undefined;
570
+ var label = showLabel ? v$1("g", { transform: "translate(0 ".concat(textboxOffsetY, ")") },
571
+ v$1(TextBox, { text: text, height: textHeight, padding: textPadding, onSizeUpdate: onTextBoxSizeUpdate, textFill: textFill, fill: textboxFill, stroke: textboxStroke, fontFamily: textFontFamily })) : undefined;
572
572
  return categoryID ?
573
- h("g", { transform: "translate(0 " + offsetY + ")" },
574
- h("use", { href: "#" + categoryID }),
573
+ v$1("g", { transform: "translate(0 ".concat(offsetY, ")") },
574
+ v$1("use", { href: "#" + categoryID }),
575
575
  label,
576
- h(Annotations, { x: width / 2, y: annotationOffsetY, annotationIDs: annotationIDs })) :
577
- h("g", { transform: "translate(0 " + offsetY + ")" },
578
- h(Icon, __assign({}, icon)),
576
+ v$1(Annotations, { x: width / 2, y: annotationOffsetY, annotationIDs: annotationIDs })) :
577
+ v$1("g", { transform: "translate(0 ".concat(offsetY, ")") },
578
+ v$1(Icon, __assign({}, icon)),
579
579
  label);
580
580
  function onTextBoxSizeUpdate(size) {
581
581
  onTextBoxWidthUpdate(size.width);
@@ -600,22 +600,22 @@ var Vertex2 = function (_a) {
600
600
  var annotationOffsetX = stepSize / 2;
601
601
  var annotationOffsetY = halfTextboxHeight;
602
602
  return categoryID ?
603
- h("g", { transform: "translate(" + offsetX + " " + offsetY + ")" },
604
- h("g", { transform: "translate(" + iconOffsetX + " " + iconOffsetY + ")" },
605
- h("use", { href: "#" + categoryID })),
606
- h("g", { transform: "translate(" + textboxOffsetX + " " + textboxOffsetY + ")" },
607
- h(TextBox, { text: text, height: textHeight, padding: textPadding, strokeWidth: textboxStrokeWidth, stroke: textboxStroke, fill: textboxFill, textFill: textFill, fontFamily: textFontFamily })),
608
- h(Annotations, { x: annotationOffsetX, y: annotationOffsetY, annotationIDs: annotationIDs, stepSize: stepSize }))
603
+ v$1("g", { transform: "translate(".concat(offsetX, " ").concat(offsetY, ")") },
604
+ v$1("g", { transform: "translate(".concat(iconOffsetX, " ").concat(iconOffsetY, ")") },
605
+ v$1("use", { href: "#" + categoryID })),
606
+ v$1("g", { transform: "translate(".concat(textboxOffsetX, " ").concat(textboxOffsetY, ")") },
607
+ v$1(TextBox, { text: text, height: textHeight, padding: textPadding, strokeWidth: textboxStrokeWidth, stroke: textboxStroke, fill: textboxFill, textFill: textFill, fontFamily: textFontFamily })),
608
+ v$1(Annotations, { x: annotationOffsetX, y: annotationOffsetY, annotationIDs: annotationIDs, stepSize: stepSize }))
609
609
  :
610
- h(y, null,
611
- h("g", { transform: "translate(" + iconOffsetX + " " + iconOffsetY + ")scale(1.0002)" },
612
- h(Icon, __assign({}, icon, { shape: "square" }))),
613
- h("g", { transform: "translate(" + textboxOffsetX + " " + textboxOffsetY + ")scale(1.0002)" },
614
- h(TextBox, { text: text, height: textHeight, padding: textPadding, stroke: textboxStroke, fill: textboxFill })));
610
+ v$1(d$1, null,
611
+ v$1("g", { transform: "translate(".concat(iconOffsetX, " ").concat(iconOffsetY, ")scale(1.0002)") },
612
+ v$1(Icon, __assign({}, icon, { shape: "square" }))),
613
+ v$1("g", { transform: "translate(".concat(textboxOffsetX, " ").concat(textboxOffsetY, ")scale(1.0002)") },
614
+ v$1(TextBox, { text: text, height: textHeight, padding: textPadding, stroke: textboxStroke, fill: textboxFill })));
615
615
  };
616
616
 
617
617
  var Vertex3 = function (_a) {
618
- var _b = _a.categoryID, _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.cornerRadius, cornerRadius = _o === void 0 ? 3 : _o, _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;
618
+ _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.cornerRadius, cornerRadius = _o === void 0 ? 3 : _o, _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;
619
619
  icon = __assign({ height: 50, imageChar: "?", imageFontFamily: "FontAwesome", imageCharFill: "#555555", fill: "transparent", strokeWidth: 0 }, icon);
620
620
  subText = __assign({ text: "", fill: "white", textFill: "#555555" }, subText);
621
621
  var fullAnnotationWidth = 0;
@@ -634,13 +634,13 @@ var Vertex3 = function (_a) {
634
634
  var annoShapeWidth = textShapeHeight;
635
635
  fullAnnotationWidth += annoShapeWidth + annotationGutter;
636
636
  var annoOffsetX = fullAnnotationWidth - (annoShapeWidth / 2);
637
- annotationArr.push(h("g", { class: "vertex3-anno", transform: "translate(" + annoOffsetX + " " + annoOffsetY + ")" },
638
- h(Icon, __assign({}, anno, { shape: "square", height: textShapeHeight, imageChar: annoText, imageFontFamily: anno.imageFontFamily, cornerRadius: cornerRadius, strokeWidth: 0 }))));
637
+ annotationArr.push(v$1("g", { class: "vertex3-anno", transform: "translate(".concat(annoOffsetX, " ").concat(annoOffsetY, ")") },
638
+ v$1(Icon, __assign({}, anno, { shape: "square", height: textShapeHeight, imageChar: annoText, imageFontFamily: anno.imageFontFamily, cornerRadius: cornerRadius, strokeWidth: 0 }))));
639
639
  });
640
640
  if (annotations.length > 0) {
641
641
  fullAnnotationWidth += annotationGutter * (annotations.length - 1);
642
642
  }
643
- var textElement = h("g", { transform: "translate(" + textOffsetX + " " + annoOffsetY + ")" }, !showLabel || text === "" ? h("circle", { r: noLabelRadius, stroke: textboxStroke, fill: textFill }) : h(TextBox, { text: text, height: textHeight, padding: textPadding, strokeWidth: textboxStrokeWidth, stroke: textboxStroke, fill: textboxFill, textFill: textFill, fontFamily: textFontFamily, cornerRadius: cornerRadius }));
643
+ var textElement = v$1("g", { transform: "translate(".concat(textOffsetX, " ").concat(annoOffsetY, ")") }, !showLabel || text === "" ? v$1("circle", { r: noLabelRadius, stroke: textboxStroke, fill: textFill }) : v$1(TextBox, { text: text, height: textHeight, padding: textPadding, strokeWidth: textboxStrokeWidth, stroke: textboxStroke, fill: textboxFill, textFill: textFill, fontFamily: textFontFamily, cornerRadius: cornerRadius }));
644
644
  var iconHeight = icon.height || 20;
645
645
  var iconStrokeWidth = icon.strokeWidth || 0;
646
646
  var iconOffsetX = 0;
@@ -653,12 +653,12 @@ var Vertex3 = function (_a) {
653
653
  else if (subText.text !== "") {
654
654
  subTextOffsetY = (iconHeight / 2) + iconStrokeWidth + (annotationGutter * 2);
655
655
  }
656
- var subtextElement = subText.text === "" ? null : h("g", { transform: "translate(" + subTextOffsetX + " " + subTextOffsetY + ")" },
657
- h(TextBox, __assign({ fill: subText.fill || "#FFFFFF", textFill: subText.textFill || textFill }, subText, { height: textHeight, padding: textPadding, strokeWidth: 0, stroke: textboxStroke, fontFamily: textFontFamily, cornerRadius: cornerRadius })));
658
- return h("g", null,
659
- h("g", { transform: "translate(" + iconOffsetX + " " + iconOffsetY + ")" },
660
- h(Icon, __assign({}, icon))),
661
- h("g", { transform: "translate(" + -fullAnnotationWidth / 2 + " " + annoOffsetY + ")" },
656
+ var subtextElement = subText.text === "" ? null : v$1("g", { transform: "translate(".concat(subTextOffsetX, " ").concat(subTextOffsetY, ")") },
657
+ v$1(TextBox, __assign({ fill: subText.fill || "#FFFFFF", textFill: subText.textFill || textFill }, subText, { height: textHeight, padding: textPadding, strokeWidth: 0, stroke: textboxStroke, fontFamily: textFontFamily, cornerRadius: cornerRadius })));
658
+ return v$1("g", null,
659
+ v$1("g", { transform: "translate(".concat(iconOffsetX, " ").concat(iconOffsetY, ")") },
660
+ v$1(Icon, __assign({}, icon))),
661
+ v$1("g", { transform: "translate(".concat(-fullAnnotationWidth / 2, " ").concat(annoOffsetY, ")") },
662
662
  textElement,
663
663
  annotationArr),
664
664
  subtextElement);
@@ -683,17 +683,17 @@ var CentroidVertex3 = function (_a) {
683
683
  icon: icon,
684
684
  subText: subText
685
685
  };
686
- return h(Vertex3, __assign({}, props, { icon: icon, subText: subText }));
686
+ return v$1(Vertex3, __assign({}, props, { icon: icon, subText: subText }));
687
687
  };
688
688
 
689
689
  var Subgraph = function (_a) {
690
690
  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;
691
691
  var tSize = Utility.textSize(text, fontFamily, fontHeight, false);
692
- return h(y, null,
693
- h(Rectangle, { width: width, height: height, fill: fill, stroke: stroke }),
694
- h("g", { transform: "translate(" + ((-width + tSize.width) / 2 + 4) + " " + ((-height + tSize.height) / 2 + 4) + ")" },
695
- h(Text, { height: fontHeight, text: text, fontFamily: fontFamily })));
692
+ return v$1(d$1, null,
693
+ v$1(Rectangle, { width: width, height: height, fill: fill, stroke: stroke }),
694
+ v$1("g", { transform: "translate(".concat((-width + tSize.width) / 2 + 4, " ").concat((-height + tSize.height) / 2 + 4, ")") },
695
+ v$1(Text, { height: fontHeight, text: text, fontFamily: fontFamily })));
696
696
  };
697
697
 
698
- export { Annotations, BUILD_VERSION, CentroidVertex3, Circle, Edge, HTMLAdapter, Icon, IconLabelledRect, Icons, ImageChar, LabelledRect, PKG_NAME, PKG_VERSION, index_es6 as React, Rectangle, SVGAdapter, Shape, Square, Subgraph, Text, TextBox, TextLine, Vertex, Vertex2, Vertex3, render, svgRender };
698
+ export { Annotations, BUILD_VERSION$1 as BUILD_VERSION, CentroidVertex3, Circle, Edge, HTMLAdapter, Icon, IconLabelledRect, Icons, ImageChar, LabelledRect, PKG_NAME$1 as PKG_NAME, PKG_VERSION$1 as PKG_VERSION, index_es6 as React, Rectangle, SVGAdapter, Shape, Square, Subgraph, Text, TextBox, TextLine, Vertex, Vertex2, Vertex3, render, svgRender };
699
699
  //# sourceMappingURL=index.es6.js.map