@hpcc-js/react 3.2.2 → 3.2.3

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.
@@ -1,3 +1,3 @@
1
- (function(global,factory){typeof exports=="object"&&typeof module<"u"?factory(exports,require("@hpcc-js/common")):typeof define=="function"&&define.amd?define(["exports","@hpcc-js/common"],factory):(global=typeof globalThis<"u"?globalThis:global||self,factory(global["@hpcc-js/react"]={},global["@hpcc-js/common"]))})(this,function(exports2,common){"use strict";const PKG_NAME="@hpcc-js/react",PKG_VERSION="3.1.1",BUILD_VERSION="3.2.1";var n,l$1,u$2,i$1,o$1,r$1,f$2,e$1,c$1,s$1,h$1={},v$1=[],p$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,y$1=Array.isArray;function d$1(n2,l2){for(var u2 in l2)n2[u2]=l2[u2];return n2}function w$1(n2){n2&&n2.parentNode&&n2.parentNode.removeChild(n2)}function _$1(l2,u2,t2){var i2,o2,r2,f2={};for(r2 in u2)r2=="key"?i2=u2[r2]:r2=="ref"?o2=u2[r2]:f2[r2]=u2[r2];if(arguments.length>2&&(f2.children=arguments.length>3?n.call(arguments,2):t2),typeof l2=="function"&&l2.defaultProps!=null)for(r2 in l2.defaultProps)f2[r2]===void 0&&(f2[r2]=l2.defaultProps[r2]);return g$1(l2,f2,i2,o2,null)}function g$1(n2,t2,i2,o2,r2){var f2={type:n2,props:t2,key:i2,ref:o2,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:r2??++u$2,__i:-1,__u:0};return r2==null&&l$1.vnode!=null&&l$1.vnode(f2),f2}function b(n2){return n2.children}function k$1(n2,l2){this.props=n2,this.context=l2}function x(n2,l2){if(l2==null)return n2.__?x(n2.__,n2.__i+1):null;for(var u2;l2<n2.__k.length;l2++)if((u2=n2.__k[l2])!=null&&u2.__e!=null)return u2.__e;return typeof n2.type=="function"?x(n2):null}function C$1(n2){var l2,u2;if((n2=n2.__)!=null&&n2.__c!=null){for(n2.__e=n2.__c.base=null,l2=0;l2<n2.__k.length;l2++)if((u2=n2.__k[l2])!=null&&u2.__e!=null){n2.__e=n2.__c.base=u2.__e;break}return C$1(n2)}}function S(n2){(!n2.__d&&(n2.__d=!0)&&i$1.push(n2)&&!M$1.__r++||o$1!==l$1.debounceRendering)&&((o$1=l$1.debounceRendering)||r$1)(M$1)}function M$1(){var n2,u2,t2,o2,r2,e2,c2,s2;for(i$1.sort(f$2);n2=i$1.shift();)n2.__d&&(u2=i$1.length,o2=void 0,e2=(r2=(t2=n2).__v).__e,c2=[],s2=[],t2.__P&&((o2=d$1({},r2)).__v=r2.__v+1,l$1.vnode&&l$1.vnode(o2),O$1(t2.__P,o2,r2,t2.__n,t2.__P.namespaceURI,32&r2.__u?[e2]:null,c2,e2??x(r2),!!(32&r2.__u),s2),o2.__v=r2.__v,o2.__.__k[o2.__i]=o2,j$1(c2,o2,s2),o2.__e!=e2&&C$1(o2)),i$1.length>u2&&i$1.sort(f$2));M$1.__r=0}function P$1(n2,l2,u2,t2,i2,o2,r2,f2,e2,c2,s2){var a2,p2,y2,d2,w2,_2=t2&&t2.__k||v$1,g2=l2.length;for(u2.__d=e2,$$1(u2,l2,_2),e2=u2.__d,a2=0;a2<g2;a2++)(y2=u2.__k[a2])!=null&&(p2=y2.__i===-1?h$1:_2[y2.__i]||h$1,y2.__i=a2,O$1(n2,y2,p2,i2,o2,r2,f2,e2,c2,s2),d2=y2.__e,y2.ref&&p2.ref!=y2.ref&&(p2.ref&&E(p2.ref,null,y2),s2.push(y2.ref,y2.__c||d2,y2)),w2==null&&d2!=null&&(w2=d2),65536&y2.__u||p2.__k===y2.__k?e2=I$1(y2,e2,n2):typeof y2.type=="function"&&y2.__d!==void 0?e2=y2.__d:d2&&(e2=d2.nextSibling),y2.__d=void 0,y2.__u&=-196609);u2.__d=e2,u2.__e=w2}function $$1(n2,l2,u2){var t2,i2,o2,r2,f2,e2=l2.length,c2=u2.length,s2=c2,a2=0;for(n2.__k=[],t2=0;t2<e2;t2++)(i2=l2[t2])!=null&&typeof i2!="boolean"&&typeof i2!="function"?(r2=t2+a2,(i2=n2.__k[t2]=typeof i2=="string"||typeof i2=="number"||typeof i2=="bigint"||i2.constructor==String?g$1(null,i2,null,null,null):y$1(i2)?g$1(b,{children:i2},null,null,null):i2.constructor===void 0&&i2.__b>0?g$1(i2.type,i2.props,i2.key,i2.ref?i2.ref:null,i2.__v):i2).__=n2,i2.__b=n2.__b+1,o2=null,(f2=i2.__i=L(i2,u2,r2,s2))!==-1&&(s2--,(o2=u2[f2])&&(o2.__u|=131072)),o2==null||o2.__v===null?(f2==-1&&a2--,typeof i2.type!="function"&&(i2.__u|=65536)):f2!==r2&&(f2==r2-1?a2--:f2==r2+1?a2++:(f2>r2?a2--:a2++,i2.__u|=65536))):i2=n2.__k[t2]=null;if(s2)for(t2=0;t2<c2;t2++)(o2=u2[t2])!=null&&!(131072&o2.__u)&&(o2.__e==n2.__d&&(n2.__d=x(o2)),N(o2,o2))}function I$1(n2,l2,u2){var t2,i2;if(typeof n2.type=="function"){for(t2=n2.__k,i2=0;t2&&i2<t2.length;i2++)t2[i2]&&(t2[i2].__=n2,l2=I$1(t2[i2],l2,u2));return l2}n2.__e!=l2&&(l2&&n2.type&&!u2.contains(l2)&&(l2=x(n2)),u2.insertBefore(n2.__e,l2||null),l2=n2.__e);do l2=l2&&l2.nextSibling;while(l2!=null&&l2.nodeType===8);return l2}function H(n2,l2){return l2=l2||[],n2==null||typeof n2=="boolean"||(y$1(n2)?n2.some(function(n3){H(n3,l2)}):l2.push(n2)),l2}function L(n2,l2,u2,t2){var i2=n2.key,o2=n2.type,r2=u2-1,f2=u2+1,e2=l2[u2];if(e2===null||e2&&i2==e2.key&&o2===e2.type&&!(131072&e2.__u))return u2;if((typeof o2!="function"||o2===b||i2)&&t2>(e2!=null&&!(131072&e2.__u)?1:0))for(;r2>=0||f2<l2.length;){if(r2>=0){if((e2=l2[r2])&&!(131072&e2.__u)&&i2==e2.key&&o2===e2.type)return r2;r2--}if(f2<l2.length){if((e2=l2[f2])&&!(131072&e2.__u)&&i2==e2.key&&o2===e2.type)return f2;f2++}}return-1}function T$1(n2,l2,u2){l2[0]==="-"?n2.setProperty(l2,u2??""):n2[l2]=u2==null?"":typeof u2!="number"||p$1.test(l2)?u2:u2+"px"}function A(n2,l2,u2,t2,i2){var o2;n:if(l2==="style")if(typeof u2=="string")n2.style.cssText=u2;else{if(typeof t2=="string"&&(n2.style.cssText=t2=""),t2)for(l2 in t2)u2&&l2 in u2||T$1(n2.style,l2,"");if(u2)for(l2 in u2)t2&&u2[l2]===t2[l2]||T$1(n2.style,l2,u2[l2])}else if(l2[0]==="o"&&l2[1]==="n")o2=l2!==(l2=l2.replace(/(PointerCapture)$|Capture$/i,"$1")),l2=l2.toLowerCase()in n2||l2==="onFocusOut"||l2==="onFocusIn"?l2.toLowerCase().slice(2):l2.slice(2),n2.l||(n2.l={}),n2.l[l2+o2]=u2,u2?t2?u2.u=t2.u:(u2.u=e$1,n2.addEventListener(l2,o2?s$1:c$1,o2)):n2.removeEventListener(l2,o2?s$1:c$1,o2);else{if(i2=="http://www.w3.org/2000/svg")l2=l2.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(l2!="width"&&l2!="height"&&l2!="href"&&l2!="list"&&l2!="form"&&l2!="tabIndex"&&l2!="download"&&l2!="rowSpan"&&l2!="colSpan"&&l2!="role"&&l2!="popover"&&l2 in n2)try{n2[l2]=u2??"";break n}catch{}typeof u2=="function"||(u2==null||u2===!1&&l2[4]!=="-"?n2.removeAttribute(l2):n2.setAttribute(l2,l2=="popover"&&u2==1?"":u2))}}function F$1(n2){return function(u2){if(this.l){var t2=this.l[u2.type+n2];if(u2.t==null)u2.t=e$1++;else if(u2.t<t2.u)return;return l$1.event&&(u2=l$1.event(u2)),"handleEvent"in t2?t2.handleEvent(u2):t2(u2)}}}function O$1(n2,u2,t2,i2,o2,r2,f2,e2,c2,s2){var a2,h2,v2,p2,w2,_2,g2,m2,x2,C2,S2,M2,$2,I2,H2,L2,T2=u2.type;if(u2.constructor!==void 0)return null;128&t2.__u&&(c2=!!(32&t2.__u),r2=[e2=u2.__e=t2.__e]),(a2=l$1.__b)&&a2(u2);n:if(typeof T2=="function")try{if(m2=u2.props,x2="prototype"in T2&&T2.prototype.render,C2=(a2=T2.contextType)&&i2[a2.__c],S2=a2?C2?C2.props.value:a2.__:i2,t2.__c?g2=(h2=u2.__c=t2.__c).__=h2.__E:(x2?u2.__c=h2=new T2(m2,S2):(u2.__c=h2=new k$1(m2,S2),h2.constructor=T2,h2.render=V$1),C2&&C2.sub(h2),h2.props=m2,h2.state||(h2.state={}),h2.context=S2,h2.__n=i2,v2=h2.__d=!0,h2.__h=[],h2._sb=[]),x2&&h2.__s==null&&(h2.__s=h2.state),x2&&T2.getDerivedStateFromProps!=null&&(h2.__s==h2.state&&(h2.__s=d$1({},h2.__s)),d$1(h2.__s,T2.getDerivedStateFromProps(m2,h2.__s))),p2=h2.props,w2=h2.state,h2.__v=u2,v2)x2&&T2.getDerivedStateFromProps==null&&h2.componentWillMount!=null&&h2.componentWillMount(),x2&&h2.componentDidMount!=null&&h2.__h.push(h2.componentDidMount);else{if(x2&&T2.getDerivedStateFromProps==null&&m2!==p2&&h2.componentWillReceiveProps!=null&&h2.componentWillReceiveProps(m2,S2),!h2.__e&&(h2.shouldComponentUpdate!=null&&h2.shouldComponentUpdate(m2,h2.__s,S2)===!1||u2.__v===t2.__v)){for(u2.__v!==t2.__v&&(h2.props=m2,h2.state=h2.__s,h2.__d=!1),u2.__e=t2.__e,u2.__k=t2.__k,u2.__k.some(function(n3){n3&&(n3.__=u2)}),M2=0;M2<h2._sb.length;M2++)h2.__h.push(h2._sb[M2]);h2._sb=[],h2.__h.length&&f2.push(h2);break n}h2.componentWillUpdate!=null&&h2.componentWillUpdate(m2,h2.__s,S2),x2&&h2.componentDidUpdate!=null&&h2.__h.push(function(){h2.componentDidUpdate(p2,w2,_2)})}if(h2.context=S2,h2.props=m2,h2.__P=n2,h2.__e=!1,$2=l$1.__r,I2=0,x2){for(h2.state=h2.__s,h2.__d=!1,$2&&$2(u2),a2=h2.render(h2.props,h2.state,h2.context),H2=0;H2<h2._sb.length;H2++)h2.__h.push(h2._sb[H2]);h2._sb=[]}else do h2.__d=!1,$2&&$2(u2),a2=h2.render(h2.props,h2.state,h2.context),h2.state=h2.__s;while(h2.__d&&++I2<25);h2.state=h2.__s,h2.getChildContext!=null&&(i2=d$1(d$1({},i2),h2.getChildContext())),x2&&!v2&&h2.getSnapshotBeforeUpdate!=null&&(_2=h2.getSnapshotBeforeUpdate(p2,w2)),P$1(n2,y$1(L2=a2!=null&&a2.type===b&&a2.key==null?a2.props.children:a2)?L2:[L2],u2,t2,i2,o2,r2,f2,e2,c2,s2),h2.base=u2.__e,u2.__u&=-161,h2.__h.length&&f2.push(h2),g2&&(h2.__E=h2.__=null)}catch(n3){if(u2.__v=null,c2||r2!=null){for(u2.__u|=c2?160:128;e2&&e2.nodeType===8&&e2.nextSibling;)e2=e2.nextSibling;r2[r2.indexOf(e2)]=null,u2.__e=e2}else u2.__e=t2.__e,u2.__k=t2.__k;l$1.__e(n3,u2,t2)}else r2==null&&u2.__v===t2.__v?(u2.__k=t2.__k,u2.__e=t2.__e):u2.__e=z$2(t2.__e,u2,t2,i2,o2,r2,f2,c2,s2);(a2=l$1.diffed)&&a2(u2)}function j$1(n2,u2,t2){u2.__d=void 0;for(var i2=0;i2<t2.length;i2++)E(t2[i2],t2[++i2],t2[++i2]);l$1.__c&&l$1.__c(u2,n2),n2.some(function(u3){try{n2=u3.__h,u3.__h=[],n2.some(function(n3){n3.call(u3)})}catch(n3){l$1.__e(n3,u3.__v)}})}function z$2(u2,t2,i2,o2,r2,f2,e2,c2,s2){var a2,v2,p2,d2,_2,g2,m2,b2=i2.props,k2=t2.props,C2=t2.type;if(C2==="svg"?r2="http://www.w3.org/2000/svg":C2==="math"?r2="http://www.w3.org/1998/Math/MathML":r2||(r2="http://www.w3.org/1999/xhtml"),f2!=null){for(a2=0;a2<f2.length;a2++)if((_2=f2[a2])&&"setAttribute"in _2==!!C2&&(C2?_2.localName===C2:_2.nodeType===3)){u2=_2,f2[a2]=null;break}}if(u2==null){if(C2===null)return document.createTextNode(k2);u2=document.createElementNS(r2,C2,k2.is&&k2),c2&&(l$1.__m&&l$1.__m(t2,f2),c2=!1),f2=null}if(C2===null)b2===k2||c2&&u2.data===k2||(u2.data=k2);else{if(f2=f2&&n.call(u2.childNodes),b2=i2.props||h$1,!c2&&f2!=null)for(b2={},a2=0;a2<u2.attributes.length;a2++)b2[(_2=u2.attributes[a2]).name]=_2.value;for(a2 in b2)if(_2=b2[a2],a2!="children"){if(a2=="dangerouslySetInnerHTML")p2=_2;else if(!(a2 in k2)){if(a2=="value"&&"defaultValue"in k2||a2=="checked"&&"defaultChecked"in k2)continue;A(u2,a2,null,_2,r2)}}for(a2 in k2)_2=k2[a2],a2=="children"?d2=_2:a2=="dangerouslySetInnerHTML"?v2=_2:a2=="value"?g2=_2:a2=="checked"?m2=_2:c2&&typeof _2!="function"||b2[a2]===_2||A(u2,a2,_2,b2[a2],r2);if(v2)c2||p2&&(v2.__html===p2.__html||v2.__html===u2.innerHTML)||(u2.innerHTML=v2.__html),t2.__k=[];else if(p2&&(u2.innerHTML=""),P$1(u2,y$1(d2)?d2:[d2],t2,i2,o2,C2==="foreignObject"?"http://www.w3.org/1999/xhtml":r2,f2,e2,f2?f2[0]:i2.__k&&x(i2,0),c2,s2),f2!=null)for(a2=f2.length;a2--;)w$1(f2[a2]);c2||(a2="value",C2==="progress"&&g2==null?u2.removeAttribute("value"):g2!==void 0&&(g2!==u2[a2]||C2==="progress"&&!g2||C2==="option"&&g2!==b2[a2])&&A(u2,a2,g2,b2[a2],r2),a2="checked",m2!==void 0&&m2!==u2[a2]&&A(u2,a2,m2,b2[a2],r2))}return u2}function E(n2,u2,t2){try{if(typeof n2=="function"){var i2=typeof n2.__u=="function";i2&&n2.__u(),i2&&u2==null||(n2.__u=n2(u2))}else n2.current=u2}catch(n3){l$1.__e(n3,t2)}}function N(n2,u2,t2){var i2,o2;if(l$1.unmount&&l$1.unmount(n2),(i2=n2.ref)&&(i2.current&&i2.current!==n2.__e||E(i2,null,u2)),(i2=n2.__c)!=null){if(i2.componentWillUnmount)try{i2.componentWillUnmount()}catch(n3){l$1.__e(n3,u2)}i2.base=i2.__P=null}if(i2=n2.__k)for(o2=0;o2<i2.length;o2++)i2[o2]&&N(i2[o2],u2,t2||typeof n2.type!="function");t2||w$1(n2.__e),n2.__c=n2.__=n2.__e=n2.__d=void 0}function V$1(n2,l2,u2){return this.constructor(n2,u2)}function q$2(u2,t2,i2){var o2,r2,f2,e2;l$1.__&&l$1.__(u2,t2),r2=(o2=typeof i2=="function")?null:i2&&i2.__k||t2.__k,f2=[],e2=[],O$1(t2,u2=(!o2&&i2||t2).__k=_$1(b,null,[u2]),r2||h$1,h$1,t2.namespaceURI,!o2&&i2?[i2]:r2?null:t2.firstChild?n.call(t2.childNodes):null,f2,!o2&&i2?i2:r2?r2.__e:t2.firstChild,o2,e2),j$1(f2,u2,e2)}n=v$1.slice,l$1={__e:function(n2,l2,u2,t2){for(var i2,o2,r2;l2=l2.__;)if((i2=l2.__c)&&!i2.__)try{if((o2=i2.constructor)&&o2.getDerivedStateFromError!=null&&(i2.setState(o2.getDerivedStateFromError(n2)),r2=i2.__d),i2.componentDidCatch!=null&&(i2.componentDidCatch(n2,t2||{}),r2=i2.__d),r2)return i2.__E=i2}catch(l3){n2=l3}throw n2}},u$2=0,k$1.prototype.setState=function(n2,l2){var u2;u2=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=d$1({},this.state),typeof n2=="function"&&(n2=n2(d$1({},u2),this.props)),n2&&d$1(u2,n2),n2!=null&&this.__v&&(l2&&this._sb.push(l2),S(this))},k$1.prototype.forceUpdate=function(n2){this.__v&&(this.__e=!0,n2&&this.__h.push(n2),S(this))},k$1.prototype.render=b,i$1=[],r$1=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f$2=function(n2,l2){return n2.__v.__b-l2.__v.__b},M$1.__r=0,e$1=0,c$1=F$1(!1),s$1=F$1(!0);var f$1=0;function u$1(e2,t2,n2,o2,i2,u2){t2||(t2={});var a2,c2,l2=t2;"ref"in t2&&(a2=t2.ref,delete t2.ref);var p2={type:e2,props:l2,key:n2,ref:a2,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--f$1,__i:-1,__u:0,__source:i2,__self:u2};if(typeof e2=="function"&&(a2=e2.defaultProps))for(c2 in a2)l2[c2]===void 0&&(l2[c2]=a2[c2]);return l$1.vnode&&l$1.vnode(p2),p2}var t,r,u,i,o=0,f=[],c=l$1,e=c.__b,a=c.__r,v=c.diffed,l=c.__c,m=c.unmount,s=c.__;function d(n2,t2){c.__h&&c.__h(r,n2,o||t2),o=0;var u2=r.__H||(r.__H={__:[],__h:[]});return n2>=u2.__.length&&u2.__.push({}),u2.__[n2]}function h(n2){return o=1,p(D,n2)}function p(n2,u2,i2){var o2=d(t++,2);if(o2.t=n2,!o2.__c&&(o2.__=[i2?i2(u2):D(void 0,u2),function(n3){var t2=o2.__N?o2.__N[0]:o2.__[0],r2=o2.t(t2,n3);t2!==r2&&(o2.__N=[r2,o2.__[1]],o2.__c.setState({}))}],o2.__c=r,!r.u)){var f2=function(n3,t2,r2){if(!o2.__c.__H)return!0;var u3=o2.__c.__H.__.filter(function(n4){return!!n4.__c});if(u3.every(function(n4){return!n4.__N}))return!c2||c2.call(this,n3,t2,r2);var i3=o2.__c.props!==n3;return u3.forEach(function(n4){if(n4.__N){var t3=n4.__[0];n4.__=n4.__N,n4.__N=void 0,t3!==n4.__[0]&&(i3=!0)}}),c2&&c2.call(this,n3,t2,r2)||i3};r.u=!0;var c2=r.shouldComponentUpdate,e2=r.componentWillUpdate;r.componentWillUpdate=function(n3,t2,r2){if(this.__e){var u3=c2;c2=void 0,f2(n3,t2,r2),c2=u3}e2&&e2.call(this,n3,t2,r2)},r.shouldComponentUpdate=f2}return o2.__N||o2.__}function y(n2,u2){var i2=d(t++,3);!c.__s&&C(i2.__H,u2)&&(i2.__=n2,i2.i=u2,r.__H.__h.push(i2))}function _(n2,u2){var i2=d(t++,4);!c.__s&&C(i2.__H,u2)&&(i2.__=n2,i2.i=u2,r.__h.push(i2))}function T(n2,r2){var u2=d(t++,7);return C(u2.__H,r2)&&(u2.__=n2(),u2.__H=r2,u2.__h=n2),u2.__}function q$1(n2,t2){return o=8,T(function(){return n2},t2)}function j(){for(var n2;n2=f.shift();)if(n2.__P&&n2.__H)try{n2.__H.__h.forEach(z$1),n2.__H.__h.forEach(B$1),n2.__H.__h=[]}catch(t2){n2.__H.__h=[],c.__e(t2,n2.__v)}}c.__b=function(n2){r=null,e&&e(n2)},c.__=function(n2,t2){n2&&t2.__k&&t2.__k.__m&&(n2.__m=t2.__k.__m),s&&s(n2,t2)},c.__r=function(n2){a&&a(n2),t=0;var i2=(r=n2.__c).__H;i2&&(u===r?(i2.__h=[],r.__h=[],i2.__.forEach(function(n3){n3.__N&&(n3.__=n3.__N),n3.i=n3.__N=void 0})):(i2.__h.forEach(z$1),i2.__h.forEach(B$1),i2.__h=[],t=0)),u=r},c.diffed=function(n2){v&&v(n2);var t2=n2.__c;t2&&t2.__H&&(t2.__H.__h.length&&(f.push(t2)!==1&&i===c.requestAnimationFrame||((i=c.requestAnimationFrame)||w)(j)),t2.__H.__.forEach(function(n3){n3.i&&(n3.__H=n3.i),n3.i=void 0})),u=r=null},c.__c=function(n2,t2){t2.some(function(n3){try{n3.__h.forEach(z$1),n3.__h=n3.__h.filter(function(n4){return!n4.__||B$1(n4)})}catch(r2){t2.some(function(n4){n4.__h&&(n4.__h=[])}),t2=[],c.__e(r2,n3.__v)}}),l&&l(n2,t2)},c.unmount=function(n2){m&&m(n2);var t2,r2=n2.__c;r2&&r2.__H&&(r2.__H.__.forEach(function(n3){try{z$1(n3)}catch(n4){t2=n4}}),r2.__H=void 0,t2&&c.__e(t2,r2.__v))};var k=typeof requestAnimationFrame=="function";function w(n2){var t2,r2=function(){clearTimeout(u2),k&&cancelAnimationFrame(t2),setTimeout(n2)},u2=setTimeout(r2,100);k&&(t2=requestAnimationFrame(r2))}function z$1(n2){var t2=r,u2=n2.__c;typeof u2=="function"&&(n2.__c=void 0,u2()),r=t2}function B$1(n2){var t2=r;n2.__c=n2.__(),r=t2}function C(n2,t2){return!n2||n2.length!==t2.length||t2.some(function(t3,r2){return t3!==n2[r2]})}function D(n2,t2){return typeof t2=="function"?t2(n2):t2}function g(n2,t2){for(var e2 in n2)if(e2!=="__source"&&!(e2 in t2))return!0;for(var r2 in t2)if(r2!=="__source"&&n2[r2]!==t2[r2])return!0;return!1}function I(n2,t2){this.props=n2,this.context=t2}(I.prototype=new k$1).isPureReactComponent=!0,I.prototype.shouldComponentUpdate=function(n2,t2){return g(this.props,n2)||g(this.state,t2)};var M=l$1.__b;l$1.__b=function(n2){n2.type&&n2.type.__f&&n2.ref&&(n2.props.ref=n2.ref,n2.ref=null),M&&M(n2)};var O=l$1.__e;l$1.__e=function(n2,t2,e2,r2){if(n2.then){for(var u2,o2=t2;o2=o2.__;)if((u2=o2.__c)&&u2.__c)return t2.__e==null&&(t2.__e=e2.__e,t2.__k=e2.__k),u2.__c(n2,t2)}O(n2,t2,e2,r2)};var F=l$1.unmount;function U(n2,t2,e2){return n2&&(n2.__c&&n2.__c.__H&&(n2.__c.__H.__.forEach(function(n3){typeof n3.__c=="function"&&n3.__c()}),n2.__c.__H=null),(n2=function(n3,t3){for(var e3 in t3)n3[e3]=t3[e3];return n3}({},n2)).__c!=null&&(n2.__c.__P===e2&&(n2.__c.__P=t2),n2.__c=null),n2.__k=n2.__k&&n2.__k.map(function(n3){return U(n3,t2,e2)})),n2}function V(n2,t2,e2){return n2&&e2&&(n2.__v=null,n2.__k=n2.__k&&n2.__k.map(function(n3){return V(n3,t2,e2)}),n2.__c&&n2.__c.__P===t2&&(n2.__e&&e2.appendChild(n2.__e),n2.__c.__e=!0,n2.__c.__P=e2)),n2}function W(){this.__u=0,this.o=null,this.__b=null}function P(n2){var t2=n2.__.__c;return t2&&t2.__a&&t2.__a(n2)}function z(){this.i=null,this.l=null}l$1.unmount=function(n2){var t2=n2.__c;t2&&t2.__R&&t2.__R(),t2&&32&n2.__u&&(n2.type=null),F&&F(n2)},(W.prototype=new k$1).__c=function(n2,t2){var e2=t2.__c,r2=this;r2.o==null&&(r2.o=[]),r2.o.push(e2);var u2=P(r2.__v),o2=!1,i2=function(){o2||(o2=!0,e2.__R=null,u2?u2(c2):c2())};e2.__R=i2;var c2=function(){if(!--r2.__u){if(r2.state.__a){var n3=r2.state.__a;r2.__v.__k[0]=V(n3,n3.__c.__P,n3.__c.__O)}var t3;for(r2.setState({__a:r2.__b=null});t3=r2.o.pop();)t3.forceUpdate()}};r2.__u++||32&t2.__u||r2.setState({__a:r2.__b=r2.__v.__k[0]}),n2.then(i2,i2)},W.prototype.componentWillUnmount=function(){this.o=[]},W.prototype.render=function(n2,e2){if(this.__b){if(this.__v.__k){var r2=document.createElement("div"),o2=this.__v.__k[0].__c;this.__v.__k[0]=U(this.__b,r2,o2.__O=o2.__P)}this.__b=null}var i2=e2.__a&&_$1(b,null,n2.fallback);return i2&&(i2.__u&=-33),[_$1(b,null,e2.__a?null:n2.children),i2]};var B=function(n2,t2,e2){if(++e2[1]===e2[0]&&n2.l.delete(t2),n2.props.revealOrder&&(n2.props.revealOrder[0]!=="t"||!n2.l.size))for(e2=n2.i;e2;){for(;e2.length>3;)e2.pop()();if(e2[1]<e2[0])break;n2.i=e2=e2[2]}};(z.prototype=new k$1).__a=function(n2){var t2=this,e2=P(t2.__v),r2=t2.l.get(n2);return r2[0]++,function(u2){var o2=function(){t2.props.revealOrder?(r2.push(u2),B(t2,n2,r2)):u2()};e2?e2(o2):o2()}},z.prototype.render=function(n2){this.i=null,this.l=new Map;var t2=H(n2.children);n2.revealOrder&&n2.revealOrder[0]==="b"&&t2.reverse();for(var e2=t2.length;e2--;)this.l.set(t2[e2],this.i=[1,0,this.i]);return n2.children},z.prototype.componentDidUpdate=z.prototype.componentDidMount=function(){var n2=this;this.l.forEach(function(t2,e2){B(n2,e2,t2)})};var $=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,q=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,G=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,J=/[A-Z0-9]/g,K=typeof document<"u",Q=function(n2){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(n2)};k$1.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t2){Object.defineProperty(k$1.prototype,t2,{configurable:!0,get:function(){return this["UNSAFE_"+t2]},set:function(n2){Object.defineProperty(this,t2,{configurable:!0,writable:!0,value:n2})}})});var tn=l$1.event;function en(){}function rn(){return this.cancelBubble}function un(){return this.defaultPrevented}l$1.event=function(n2){return tn&&(n2=tn(n2)),n2.persist=en,n2.isPropagationStopped=rn,n2.isDefaultPrevented=un,n2.nativeEvent=n2};var cn={enumerable:!1,configurable:!0,get:function(){return this.class}},fn=l$1.vnode;l$1.vnode=function(n2){typeof n2.type=="string"&&function(n3){var t2=n3.props,e2=n3.type,u2={},o2=e2.indexOf("-")===-1;for(var i2 in t2){var c2=t2[i2];if(!(i2==="value"&&"defaultValue"in t2&&c2==null||K&&i2==="children"&&e2==="noscript"||i2==="class"||i2==="className")){var f2=i2.toLowerCase();i2==="defaultValue"&&"value"in t2&&t2.value==null?i2="value":i2==="download"&&c2===!0?c2="":f2==="translate"&&c2==="no"?c2=!1:f2[0]==="o"&&f2[1]==="n"?f2==="ondoubleclick"?i2="ondblclick":f2!=="onchange"||e2!=="input"&&e2!=="textarea"||Q(t2.type)?f2==="onfocus"?i2="onfocusin":f2==="onblur"?i2="onfocusout":G.test(i2)&&(i2=f2):f2=i2="oninput":o2&&q.test(i2)?i2=i2.replace(J,"-$&").toLowerCase():c2===null&&(c2=void 0),f2==="oninput"&&u2[i2=f2]&&(i2="oninputCapture"),u2[i2]=c2}}e2=="select"&&u2.multiple&&Array.isArray(u2.value)&&(u2.value=H(t2.children).forEach(function(n4){n4.props.selected=u2.value.indexOf(n4.props.value)!=-1})),e2=="select"&&u2.defaultValue!=null&&(u2.value=H(t2.children).forEach(function(n4){n4.props.selected=u2.multiple?u2.defaultValue.indexOf(n4.props.value)!=-1:u2.defaultValue==n4.props.value})),t2.class&&!t2.className?(u2.class=t2.class,Object.defineProperty(u2,"className",cn)):(t2.className&&!t2.class||t2.class&&t2.className)&&(u2.class=u2.className=t2.className),n3.props=u2}(n2),n2.$$typeof=$,fn&&fn(n2)};var ln=l$1.__r;l$1.__r=function(n2){ln&&ln(n2),n2.__c};var an=l$1.diffed;l$1.diffed=function(n2){an&&an(n2);var t2=n2.props,e2=n2.__e;e2!=null&&n2.type==="textarea"&&"value"in t2&&t2.value!==e2.value&&(e2.value=t2.value==null?"":t2.value)};function _n(n2){return!!n2.__k&&(q$2(null,n2),!0)}const preactShim=Object.freeze(Object.defineProperty({__proto__:null,Component:k$1,Fragment:b,createElement:_$1,h:_$1,render:q$2,unmountComponentAtNode:_n,useCallback:q$1,useEffect:y,useLayoutEffect:_,useMemo:T,useReducer:p,useState:h},Symbol.toStringTag,{value:"Module"})),Image=({href,x:x2,y:y2=0,height=12})=>u$1("image",{xlinkHref:href,x:x2-height/2,y:y2-height/2,width:height,height}),ImageChar=({x:x2,y:y2=0,height=12,fill,stroke,fontFamily="FontAwesome",char="",fontWeight})=>{const renderChar=T(()=>fontFamily==="FontAwesome"?common.Utility.faChar(char):char,[char,fontFamily]);return u$1("text",{x:x2,y:y2,fill,stroke,fontFamily,fontSize:`${height}px`,fontWeight,dominantBaseline:"middle",style:{textAnchor:"middle",alignmentBaseline:"middle"},children:renderChar})},Circle=({radius=32,fill="navy",stroke=fill,strokeWidth=1,shapeRendering})=>u$1("circle",{r:radius,fill,stroke,strokeWidth,shapeRendering}),Square=({radius=30,cornerRadius=0,fill="white",stroke,strokeWidth=1,shapeRendering})=>u$1("rect",{x:-radius,y:-radius,rx:cornerRadius,ry:cornerRadius,width:radius*2,height:radius*2,fill,stroke:stroke||fill,strokeWidth,shapeRendering}),Rectangle=({width=30,height=30,cornerRadius=0,fill="white",stroke="black",strokeWidth=1,shapeRendering})=>u$1("rect",{x:-width/2,y:-height/2,rx:cornerRadius,ry:cornerRadius,width,height,fill,stroke:stroke||fill,strokeWidth,shapeRendering}),Shape=({shape="circle",height=128,width,fill,stroke,strokeWidth=1,shapeRendering,cornerRadius})=>{switch(shape){case"square":return u$1(Square,{radius:height/2,fill,stroke,strokeWidth,shapeRendering,cornerRadius});case"rectangle":return u$1(Rectangle,{width:width??height,height,fill,stroke,strokeWidth,shapeRendering,cornerRadius});case"circle":default:return u$1(Circle,{radius:height/2,fill,stroke,strokeWidth,shapeRendering})}},Icon=({shape="circle",width,height=32,fill,stroke,strokeWidth=0,imageUrl="",imageFontFamily="FontAwesome",imageChar="",imageCharFill=common.Palette.textColor(fill),padding=height/5,xOffset=0,yOffset=0,cornerRadius,shapeRendering})=>u$1(b,{children:[u$1(Shape,{shape,width,height,fill,stroke,strokeWidth,shapeRendering,cornerRadius}),imageUrl?u$1(Image,{href:imageUrl,x:xOffset,y:yOffset,height:height-padding}):u$1(ImageChar,{x:xOffset,y:yOffset,height:height-padding,fontFamily:imageFontFamily,char:imageChar,fill:imageCharFill,fontWeight:400})]}),Icons=({icons=[]})=>{const IconComponents=icons.map(cat=>u$1("g",{id:cat.id,children:u$1(Icon,{...cat})},cat.id));return u$1(b,{children:IconComponents})},TextLine=({text,height=12,anchor="middle",baseline="middle",fontFamily="Verdana",fill="black"})=>u$1("text",{"font-family":fontFamily,"font-size":`${height}px`,"text-anchor":anchor,"dominant-baseline":baseline,fill,children:text}),Text=({text,height=12,fontFamily="Verdana",fill="black",onSizeUpdate})=>{const[totalWidth,setTotalWidth]=h(0),[totalHeight,setTotalHeight]=h(0);y(()=>{onSizeUpdate&&onSizeUpdate({width:totalWidth,height:totalHeight})},[totalWidth,totalHeight,onSizeUpdate]);const parts=T(()=>text.split(`
2
- `),[text]);_(()=>{const size=common.Utility.textSize(parts,fontFamily,height);setTotalWidth(size.width),setTotalHeight(size.height)},[fontFamily,height,parts]);const TextLines=T(()=>{const yOffset=-(totalHeight/2)+height/2;return parts.map((p2,i2)=>u$1("g",{transform:`translate(0 ${yOffset+i2*(height+2)})`,children:u$1(TextLine,{text:p2,height,fontFamily,fill})},`key-${i2}`))},[parts,totalHeight,height,fontFamily,fill]);return u$1("g",{children:TextLines})},TextBox=({text,height=12,fontFamily="Verdana",padding=4,fill="whitesmoke",stroke="lightgray",textFill="black",strokeWidth=1,cornerRadius=0,onSizeUpdate})=>{const[textWidth,setTextWidthUpdate]=h(0),[textHeight,setTextHeightUpdate]=h(0);y(()=>{onSizeUpdate&&onSizeUpdate({width:textWidth,height:textHeight})},[textWidth,textHeight,onSizeUpdate]);const onTextSizeUpdate=q$1(size=>{setTextWidthUpdate(size.width),setTextHeightUpdate(size.height)},[]),w2=textWidth+padding*2+strokeWidth,h$12=textHeight+padding*2+strokeWidth,textOffsetY=Math.floor(height/10);return u$1(b,{children:[u$1(Rectangle,{width:w2,height:h$12,fill,stroke,strokeWidth,cornerRadius}),u$1("g",{transform:`translate(0 ${textOffsetY})`,children:u$1(Text,{text,fontFamily,height,fill:textFill,onSizeUpdate:onTextSizeUpdate})})]})},LabelledRect=({text,height=12,width=12,fontFamily="Verdana",fontSize=10,padding=3,fill="whitesmoke",stroke="lightgray",textFill="black",strokeWidth=1,cornerRadius=0,onSizeUpdate})=>{const[actualWidth,setActualWidthUpdate]=h(width),[actualHeight,setActualHeightUpdate]=h(height);return _(()=>{const size=common.Utility.textSize(text,fontFamily,fontSize);setActualWidthUpdate(size.width+padding*2),setActualHeightUpdate(size.height+padding*2)},[text,fontFamily,fontSize,padding]),_(()=>{onSizeUpdate&&onSizeUpdate({width:actualWidth,height:actualHeight})},[actualWidth,actualHeight,padding,onSizeUpdate]),u$1(b,{children:[u$1(Rectangle,{width,height,fill,stroke,strokeWidth,cornerRadius}),u$1("g",{transform:`translate(${-(width/2)+padding} ${-(height/2)+padding})`,children:u$1(TextLine,{text,fontFamily,height:fontSize,fill:textFill,anchor:"start",baseline:"hanging"})})]})},IconLabelledRect=({icon,iconFontFamily,text,height=12,width=12,fontFamily="Verdana",fontSize=10,padding=3,fill="whitesmoke",stroke="lightgray",textFill="black",strokeWidth=1,cornerRadius=0})=>u$1(b,{children:[u$1(Rectangle,{width,height,fill,stroke,strokeWidth,cornerRadius}),u$1("g",{transform:`translate(${-(width/2)+padding} ${-(height/2)+padding})`,children:u$1(Icon,{shape:"square",imageFontFamily:iconFontFamily,imageChar:icon,height,fill,imageCharFill:textFill})}),u$1("g",{transform:`translate(${-(width/2)+padding*2+height} ${-(height/2)+padding})`,children:u$1(TextLine,{text,fontFamily,height:fontSize,fill:textFill,anchor:"start",baseline:"hanging"})})]}),Edge=({label,labelPos,labelFill="black",labelHeight=12,path,stroke,strokeWidth,strokeDasharray})=>u$1(b,{children:[u$1("path",{d:path,stroke,style:{strokeWidth,strokeDasharray}}),label&&labelPos&&labelPos.length===2?u$1("g",{transform:`translate(${labelPos[0]} ${labelPos[1]})`,children:u$1(Text,{text:label,fill:labelFill,height:labelHeight})}):void 0]});function render(C2,props,parent,replaceNode){q$2(_$1(C2,props),parent,replaceNode)}function svgRender(C2,props,parent,replaceNode){q$2(_$1("svg",null,_$1(C2,props)),parent,replaceNode)}class HTMLAdapter extends common.HTMLWidget{constructor(_component){super(),this._component=_component}props(_2){return arguments.length?(this._props={...this._props,..._2},this):this._props}prop(_2,value){return arguments.length===1?this._props[_2]:(this._props[_2]=value,this)}update(domNode,element){super.update(domNode,element),render(this._component,this._props,domNode)}}HTMLAdapter.prototype._class+=" react_HTMLAdapter",HTMLAdapter.prototype.publish("props",{},"object","Properties");class SVGAdapter extends common.SVGWidget{constructor(_component){super(),this._component=_component}props(_2){return arguments.length?(this._props={...this._props,..._2},this):this._props}prop(_2,value){return arguments.length===1?this._props[_2]:(this._props[_2]=value,this)}update(domNode,element){super.update(domNode,element),render(this._component,this._props,domNode)}}SVGAdapter.prototype._class+=" react_SVGAdapter",SVGAdapter.prototype.publish("props",{},"object","Properties");const Span=({text})=>u$1("span",{children:text}),Annotations=({x:x2,y:y2,annotationIDs=[],stepSize=-16})=>{const IconComponents=annotationIDs.map((id,i2)=>u$1("g",{transform:`translate(${x2+i2*stepSize} ${y2})`,children:u$1("use",{xlinkHref:"#"+id})},id));return u$1(b,{children:IconComponents})},Vertex=({categoryID="",text="",textHeight=12,textPadding=4,icon={},annotationsHeight=12,annotationIDs=[],textFill,textboxFill,textboxStroke,textFontFamily,onSizeUpdate,showLabel=!0,scale=1})=>{icon={imageChar:"fa-question",height:32,fill:"transparent",...icon};const[textBoxWidth,setTextBoxWidthUpdate]=h(0),[textBoxHeight,setTextBoxHeightUpdate]=h(0);y(()=>{onSizeUpdate&&onSizeUpdate({width:0,height:0})},[textBoxWidth,textBoxHeight,onSizeUpdate]);let width=textBoxWidth;width+=4;let offsetY=-(icon.height*2/6+textHeight+8)/2;const textboxOffsetY=icon.height/3+textBoxHeight/2+textPadding;let annotationOffsetY=icon.height/3+textBoxHeight+textPadding+annotationsHeight/3;showLabel||(offsetY+=(textHeight+8)/2,annotationOffsetY-=textBoxHeight+textPadding);const onTextBoxSizeUpdate=q$1(size=>{setTextBoxWidthUpdate(size.width),setTextBoxHeightUpdate(size.height)},[]),label=showLabel?u$1("g",{transform:`translate(0 ${textboxOffsetY})`,children:u$1(TextBox,{text,height:textHeight,padding:textPadding,onSizeUpdate:onTextBoxSizeUpdate,textFill,fill:textboxFill,stroke:textboxStroke,fontFamily:textFontFamily})}):void 0;return categoryID?u$1("g",{transform:`translate(0 ${offsetY}) scale(${scale})`,children:[u$1("use",{xlinkHref:"#"+categoryID}),label,u$1(Annotations,{x:width/2,y:annotationOffsetY,annotationIDs})]}):u$1("g",{transform:`translate(0 ${offsetY}) scale(${scale})`,children:[u$1(Icon,{...icon}),label]})},Vertex2=({categoryID="",text="",textHeight=12,textPadding=4,icon={},textFill="black",textboxFill="white",textboxStroke="black",textFontFamily,annotationsHeight=12,annotationIDs=[]})=>{icon={imageChar:"fa-question",imageCharFill:"white",height:32,fill:"black",shape:"square",...icon};const textBoxHeight=textHeight+textPadding*2,{width}=T(()=>common.Utility.textSize(text,textFontFamily,textHeight,!1),[text,textFontFamily,textHeight]),stepSize=annotationsHeight,textboxStrokeWidth=1,halfTextboxHeight=textBoxHeight/2,offsetX=0,offsetY=-(icon.height*2/6+textHeight+8)/2,iconOffsetX=-icon.height/2,iconOffsetY=0,textboxOffsetX=Math.ceil(width/2+textPadding),textboxOffsetY=halfTextboxHeight-icon.height/2,annotationOffsetX=stepSize/2,annotationOffsetY=halfTextboxHeight;return categoryID?u$1("g",{transform:`translate(${offsetX} ${offsetY})`,children:[u$1("g",{transform:`translate(${iconOffsetX} ${iconOffsetY})`,children:u$1("use",{xlinkHref:"#"+categoryID})}),u$1("g",{transform:`translate(${textboxOffsetX} ${textboxOffsetY})`,children:u$1(TextBox,{text,height:textHeight,padding:textPadding,strokeWidth:textboxStrokeWidth,stroke:textboxStroke,fill:textboxFill,textFill,fontFamily:textFontFamily})}),u$1(Annotations,{x:annotationOffsetX,y:annotationOffsetY,annotationIDs,stepSize})]}):u$1(b,{children:[u$1("g",{transform:`translate(${iconOffsetX} ${iconOffsetY})scale(1.0002)`,children:u$1(Icon,{...icon,shape:"square"})}),u$1("g",{transform:`translate(${textboxOffsetX} ${textboxOffsetY})scale(1.0002)`,children:u$1(TextBox,{text,height:textHeight,padding:textPadding,stroke:textboxStroke,fill:textboxFill})})]})},Vertex3=({text="",textHeight=10,textPadding=4,textFill="#287EC4",textboxFill="white",textboxStroke="#CCCCCC",textboxStrokeWidth=1,textFontFamily="Verdana",annotationGutter=2,annotations=[],cornerRadius=3,icon={},subText={text:""},showLabel=!0,noLabelRadius=5,expansionIcon,scale=1})=>{icon={height:50,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"#555555",fill:"transparent",strokeWidth:0,...icon},subText={text:"",fill:"white",textFill:"#555555",...subText},expansionIcon=expansionIcon?{height:16,shape:"circle",padding:6,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"black",fill:"whitesmoke",stroke:"whitesmoke",strokeWidth:0,...expansionIcon}:void 0;let fullAnnotationWidth=0;const annoOffsetY=0,labelWidth=T(()=>common.Utility.textSize(text,textFontFamily,textHeight,!1).width,[text,textFontFamily,textHeight]);let labelShapeWidth=0;text!==""&&(labelShapeWidth=labelWidth+textPadding*2+textboxStrokeWidth*2),fullAnnotationWidth+=labelShapeWidth+annotationGutter;const textOffsetX=fullAnnotationWidth-labelShapeWidth/2,textShapeHeight=textHeight+textPadding*2+textboxStrokeWidth*2,annotationArr=[];annotations.forEach((anno,idx)=>{const annoText=anno.imageChar,annoShapeWidth=textShapeHeight;fullAnnotationWidth+=annoShapeWidth+annotationGutter;const annoOffsetX=fullAnnotationWidth-annoShapeWidth/2;annotationArr.push(u$1("g",{className:"vertex3-anno","data-click":"annotation","data-click-data":JSON.stringify(anno),transform:`translate(${annoOffsetX} ${annoOffsetY})`,children:u$1(Icon,{...anno,shape:"square",height:textShapeHeight,imageChar:annoText,imageFontFamily:anno.imageFontFamily,cornerRadius,strokeWidth:0})},idx))}),annotations.length>0&&(fullAnnotationWidth+=annotationGutter*(annotations.length-1));const textElement=u$1("g",{"data-click":"text",transform:`translate(${textOffsetX} ${annoOffsetY})`,children:!showLabel||text===""?u$1("circle",{r:noLabelRadius,stroke:textboxStroke,fill:textFill}):u$1(TextBox,{text,height:textHeight,padding:textPadding,strokeWidth:textboxStrokeWidth,stroke:textboxStroke,fill:textboxFill,textFill,fontFamily:textFontFamily,cornerRadius})}),iconHeight=icon.height||20,iconStrokeWidth=icon.strokeWidth||0,iconOffsetX=0;let iconOffsetY=0;const subTextOffsetX=0;let subTextOffsetY=textShapeHeight+annotationGutter*2;text!==""||annotationArr.length>0?iconOffsetY=-(iconHeight/2)-iconStrokeWidth-textShapeHeight/2-annotationGutter*2:subText.text!==""&&(subTextOffsetY=iconHeight/2+iconStrokeWidth+annotationGutter*2);const subtextElement=subText.text===""?null:u$1("g",{"data-click":"subtext",transform:`translate(${subTextOffsetX} ${subTextOffsetY})`,children:u$1(TextBox,{fill:subText.fill||"#FFFFFF",textFill:subText.textFill||textFill,...subText,height:textHeight,padding:textPadding,strokeWidth:0,stroke:textboxStroke,fontFamily:textFontFamily,cornerRadius})});return u$1("g",{transform:`scale(${scale})`,children:[u$1("g",{"data-click":"icon",transform:`translate(${iconOffsetX} ${iconOffsetY})`,children:[u$1(Icon,{...icon}),expansionIcon&&u$1("g",{"data-click":"expanded-icon","data-click-data":JSON.stringify(expansionIcon),transform:`translate(${(icon.height+iconStrokeWidth)/2-expansionIcon.height/2} ${-(icon.height+iconStrokeWidth)/2+expansionIcon.height/2})`,children:u$1(Icon,{...expansionIcon})})]}),u$1("g",{transform:`translate(${-fullAnnotationWidth/2} ${annoOffsetY})`,children:[textElement,annotationArr]}),subtextElement]})},CentroidVertex3=function({id,categoryID="",text="",textHeight=12,textPadding=10,textFill="#287EC4",textboxFill="white",textboxStroke="#CCCCCC",textboxStrokeWidth=1,textFontFamily="Verdana",annotationGutter=2,annotations=[],cornerRadius,icon={},subText={},expansionIcon,scale=1}){return icon={height:91,padding:40,imageCharFill:"#555555",imageFontFamily:"FontAwesome",fill:"#FFCC33",stroke:"#DFDFDF",imageChar:"?",strokeWidth:4,yOffset:-15,...icon},subText={text:"",fill:"transparent",textFill:"#555555",...subText},u$1(Vertex3,{...{id,categoryID,text,textHeight,textPadding,textFill,textboxFill,textboxStroke,textboxStrokeWidth,textFontFamily,annotationGutter,annotations,cornerRadius,icon,subText,expansionIcon,scale},icon,subText})},Vertex4=({categoryID="",text="",textHeight=10,textPadding=4,textFill="#287EC4",textboxFill="white",textboxStroke="#CCCCCC",textboxStrokeWidth=1,textFontFamily="Verdana",annotationGutter=2,annotations=[],iconAnnotations=[],cornerRadius=3,icon={},subText={},showLabel=!0,noLabelRadius=5,iconBorderWidth=1,iconBorderColor="#333",iconBackgroundColor="#fff",iconFontColor="#000",iconFontSize=20,iconFontFamily="FontAwesome",shapeOffsetX=0,shapeOffsetY=0,iconOffsetX=0,iconOffsetY=0,iconPadding=4,iconText="?",shapeRendering="auto"})=>{icon={height:50,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"#555555",fill:"transparent",strokeWidth:0,...icon},subText={text:"",fill:"white",textFill:"#555555",...subText};const annoOffsetY=0,labelWidth=T(()=>common.Utility.textSize(text,textFontFamily,textHeight,!1).width,[text,textFontFamily,textHeight]);let labelShapeWidth=0;text!==""&&(labelShapeWidth=labelWidth+textPadding*2+textboxStrokeWidth*2);let fullAnnotationWidth=labelShapeWidth+annotationGutter;const textOffsetX=fullAnnotationWidth-labelShapeWidth/2,textShapeHeight=textHeight+annotationGutter*2+textboxStrokeWidth*2,annoWidthArr=annotations.map(anno=>common.Utility.textSize(anno.imageChar,anno.imageFontFamily,anno.height,!1).width),annotationArr=[];let _labelAnnoOffsetX=fullAnnotationWidth;annotations.forEach((anno,i2)=>{const annoText=anno.imageChar,annoTextHeight=anno.height??textShapeHeight;_labelAnnoOffsetX+=annoWidthArr[i2]+annotationGutter;const annoOffsetX=_labelAnnoOffsetX-annoWidthArr[i2]/2;annotationArr.push(u$1("g",{className:"vertex3-anno","data-click":"annotation","data-click-data":JSON.stringify(anno),transform:`translate(${annoOffsetX} ${annoOffsetY})`,children:u$1(Icon,{...anno,shape:"rectangle",width:annoWidthArr[i2],height:annoTextHeight,imageChar:annoText,imageFontFamily:anno.imageFontFamily,cornerRadius,strokeWidth:0})},i2))}),annotations.length>0&&(fullAnnotationWidth+=annotationGutter*(annotations.length-1));const iconAnnotationArr=[];iconAnnotations.forEach((anno,i2)=>{const x2=anno.shapeOffsetX,y2=anno.shapeOffsetY;iconAnnotationArr.push(u$1("g",{className:"vertex3-iconAnno","data-click":"icon-annotation","data-click-data":JSON.stringify(anno),transform:`translate(${x2} ${y2})`,children:u$1(Icon,{...anno,shape:anno.shape??"square",imageChar:anno.imageChar,imageFontFamily:anno.imageFontFamily,cornerRadius,stroke:anno.stroke,strokeWidth:anno.strokeWidth})},i2))});const textElement=u$1("g",{"data-click":"text",transform:`translate(${textOffsetX} ${annoOffsetY})`,children:!showLabel||text===""?u$1("circle",{r:noLabelRadius,stroke:textboxStroke,fill:textFill}):u$1(TextBox,{text,height:textHeight,padding:textPadding,strokeWidth:textboxStrokeWidth,stroke:textboxStroke,fill:textboxFill,textFill,fontFamily:textFontFamily,cornerRadius})}),subTextOffsetX=0,subTextOffsetY=textShapeHeight+annotationGutter*2,subtextElement=subText.text===""?null:u$1("g",{"data-click":"subtext",transform:`translate(${subTextOffsetX} ${subTextOffsetY})`,children:u$1(TextBox,{fill:subText.fill||"#FFFFFF",textFill:subText.textFill||textFill,...subText,height:textHeight,padding:textPadding,strokeWidth:0,stroke:textboxStroke,fontFamily:textFontFamily,cornerRadius})});return u$1("g",{children:[u$1("g",{"data-click":"icon",transform:`translate(${shapeOffsetX} ${shapeOffsetY})`,children:[u$1(Icon,{...icon,strokeWidth:iconBorderWidth,shape:"circle",height:iconFontSize,fill:iconBackgroundColor,stroke:iconBorderColor,imageFontFamily:iconFontFamily,imageChar:iconText,imageCharFill:iconFontColor,padding:iconPadding,xOffset:iconOffsetX,yOffset:iconOffsetY,cornerRadius,shapeRendering}),iconAnnotationArr]}),u$1("g",{transform:`translate(${-fullAnnotationWidth/2} ${annoOffsetY})`,children:[textElement,annotationArr]}),subtextElement]})},CentroidVertex4=function({id,categoryID="",text="",textHeight=12,textPadding=10,textFill="#287EC4",textboxFill="white",textboxStroke="#CCCCCC",textboxStrokeWidth=1,textFontFamily="Verdana",annotationGutter=2,annotations=[],iconAnnotations=[],cornerRadius,icon={},subText={},showLabel=!0,noLabelRadius=5,iconBorderWidth=1,iconBorderColor="#333",iconBackgroundColor="#fff",iconFontColor="#000",iconFontSize=20,iconFontFamily="FontAwesome",shapeOffsetX=0,shapeOffsetY=0,iconOffsetX=0,iconOffsetY=0,iconPadding=4,iconText="?",shapeRendering="auto"}){return icon={height:91,padding:40,imageCharFill:"#555555",imageFontFamily:"FontAwesome",fill:"#FFCC33",stroke:"#DFDFDF",imageChar:"?",strokeWidth:4,yOffset:-15,...icon},subText={text:"",fill:"transparent",textFill:"#555555",...subText},u$1(Vertex4,{...{id,categoryID,text,textHeight,textPadding,textFill,textboxFill,textboxStroke,textboxStrokeWidth,textFontFamily,annotationGutter,annotations,iconAnnotations,cornerRadius,icon,subText,showLabel,noLabelRadius,iconBorderWidth,iconBorderColor,iconBackgroundColor,iconFontColor,iconFontSize,iconFontFamily,shapeOffsetX,shapeOffsetY,iconOffsetX,iconOffsetY,iconPadding,iconText,shapeRendering},icon,subText})},Subgraph=({text,width=100,height=100,fill="transparent",stroke="black",fontHeight=12,fontFamily})=>{const tSize=common.Utility.textSize(text,fontFamily,fontHeight,!1);return u$1(b,{children:[u$1(Rectangle,{width,height,fill,stroke}),u$1("g",{transform:`translate(${(-width+tSize.width)/2+4} ${(-height+tSize.height)/2+4})`,children:u$1(Text,{height:fontHeight,text,fontFamily})})]})};exports2.Annotations=Annotations,exports2.BUILD_VERSION=BUILD_VERSION,exports2.CentroidVertex3=CentroidVertex3,exports2.CentroidVertex4=CentroidVertex4,exports2.Circle=Circle,exports2.Edge=Edge,exports2.HTMLAdapter=HTMLAdapter,exports2.Icon=Icon,exports2.IconLabelledRect=IconLabelledRect,exports2.Icons=Icons,exports2.Image=Image,exports2.ImageChar=ImageChar,exports2.LabelledRect=LabelledRect,exports2.PKG_NAME=PKG_NAME,exports2.PKG_VERSION=PKG_VERSION,exports2.React=preactShim,exports2.Rectangle=Rectangle,exports2.SVGAdapter=SVGAdapter,exports2.Shape=Shape,exports2.Span=Span,exports2.Square=Square,exports2.Subgraph=Subgraph,exports2.Text=Text,exports2.TextBox=TextBox,exports2.TextLine=TextLine,exports2.Vertex=Vertex,exports2.Vertex2=Vertex2,exports2.Vertex3=Vertex3,exports2.Vertex4=Vertex4,exports2.render=render,exports2.svgRender=svgRender,Object.defineProperty(exports2,Symbol.toStringTag,{value:"Module"})});
1
+ (function(global,factory){typeof exports=="object"&&typeof module<"u"?factory(exports,require("@hpcc-js/common")):typeof define=="function"&&define.amd?define(["exports","@hpcc-js/common"],factory):(global=typeof globalThis<"u"?globalThis:global||self,factory(global["@hpcc-js/react"]={},global["@hpcc-js/common"]))})(this,function(exports2,common){"use strict";const PKG_NAME="@hpcc-js/react",PKG_VERSION="3.1.1",BUILD_VERSION="3.2.1";var n,l$1,u$2,i$1,r$1,o$1,e$1,f$2,c$1,s$1,a$1,p$1={},y$1=[],v$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,w$1=Array.isArray;function d$1(n2,l2){for(var u2 in l2)n2[u2]=l2[u2];return n2}function g$1(n2){n2&&n2.parentNode&&n2.parentNode.removeChild(n2)}function _$1(l2,u2,t2){var i2,r2,o2,e2={};for(o2 in u2)o2=="key"?i2=u2[o2]:o2=="ref"?r2=u2[o2]:e2[o2]=u2[o2];if(arguments.length>2&&(e2.children=arguments.length>3?n.call(arguments,2):t2),typeof l2=="function"&&l2.defaultProps!=null)for(o2 in l2.defaultProps)e2[o2]==null&&(e2[o2]=l2.defaultProps[o2]);return m$1(l2,e2,i2,r2,null)}function m$1(n2,t2,i2,r2,o2){var e2={type:n2,props:t2,key:i2,ref:r2,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o2??++u$2,__i:-1,__u:0};return o2==null&&l$1.vnode!=null&&l$1.vnode(e2),e2}function k$1(n2){return n2.children}function x(n2,l2){this.props=n2,this.context=l2}function S(n2,l2){if(l2==null)return n2.__?S(n2.__,n2.__i+1):null;for(var u2;l2<n2.__k.length;l2++)if((u2=n2.__k[l2])!=null&&u2.__e!=null)return u2.__e;return typeof n2.type=="function"?S(n2):null}function C$1(n2){var l2,u2;if((n2=n2.__)!=null&&n2.__c!=null){for(n2.__e=n2.__c.base=null,l2=0;l2<n2.__k.length;l2++)if((u2=n2.__k[l2])!=null&&u2.__e!=null){n2.__e=n2.__c.base=u2.__e;break}return C$1(n2)}}function M(n2){(!n2.__d&&(n2.__d=!0)&&i$1.push(n2)&&!$.__r++||r$1!=l$1.debounceRendering)&&((r$1=l$1.debounceRendering)||o$1)($)}function $(){for(var n2,u2,t2,r2,o2,f2,c2,s2=1;i$1.length;)i$1.length>s2&&i$1.sort(e$1),n2=i$1.shift(),s2=i$1.length,n2.__d&&(t2=void 0,o2=(r2=(u2=n2).__v).__e,f2=[],c2=[],u2.__P&&((t2=d$1({},r2)).__v=r2.__v+1,l$1.vnode&&l$1.vnode(t2),O(u2.__P,t2,r2,u2.__n,u2.__P.namespaceURI,32&r2.__u?[o2]:null,f2,o2??S(r2),!!(32&r2.__u),c2),t2.__v=r2.__v,t2.__.__k[t2.__i]=t2,z$1(f2,t2,c2),t2.__e!=o2&&C$1(t2)));$.__r=0}function I(n2,l2,u2,t2,i2,r2,o2,e2,f2,c2,s2){var a2,h2,v2,w2,d2,g2,_2=t2&&t2.__k||y$1,m2=l2.length;for(f2=P$1(u2,l2,_2,f2,m2),a2=0;a2<m2;a2++)(v2=u2.__k[a2])!=null&&(h2=v2.__i==-1?p$1:_2[v2.__i]||p$1,v2.__i=a2,g2=O(n2,v2,h2,i2,r2,o2,e2,f2,c2,s2),w2=v2.__e,v2.ref&&h2.ref!=v2.ref&&(h2.ref&&q$2(h2.ref,null,v2),s2.push(v2.ref,v2.__c||w2,v2)),d2==null&&w2!=null&&(d2=w2),4&v2.__u||h2.__k===v2.__k?f2=A(v2,f2,n2):typeof v2.type=="function"&&g2!==void 0?f2=g2:w2&&(f2=w2.nextSibling),v2.__u&=-7);return u2.__e=d2,f2}function P$1(n2,l2,u2,t2,i2){var r2,o2,e2,f2,c2,s2=u2.length,a2=s2,h2=0;for(n2.__k=new Array(i2),r2=0;r2<i2;r2++)(o2=l2[r2])!=null&&typeof o2!="boolean"&&typeof o2!="function"?(f2=r2+h2,(o2=n2.__k[r2]=typeof o2=="string"||typeof o2=="number"||typeof o2=="bigint"||o2.constructor==String?m$1(null,o2,null,null,null):w$1(o2)?m$1(k$1,{children:o2},null,null,null):o2.constructor==null&&o2.__b>0?m$1(o2.type,o2.props,o2.key,o2.ref?o2.ref:null,o2.__v):o2).__=n2,o2.__b=n2.__b+1,e2=null,(c2=o2.__i=L(o2,u2,f2,a2))!=-1&&(a2--,(e2=u2[c2])&&(e2.__u|=2)),e2==null||e2.__v==null?(c2==-1&&(i2>s2?h2--:i2<s2&&h2++),typeof o2.type!="function"&&(o2.__u|=4)):c2!=f2&&(c2==f2-1?h2--:c2==f2+1?h2++:(c2>f2?h2--:h2++,o2.__u|=4))):n2.__k[r2]=null;if(a2)for(r2=0;r2<s2;r2++)(e2=u2[r2])!=null&&!(2&e2.__u)&&(e2.__e==t2&&(t2=S(e2)),B$2(e2,e2));return t2}function A(n2,l2,u2){var t2,i2;if(typeof n2.type=="function"){for(t2=n2.__k,i2=0;t2&&i2<t2.length;i2++)t2[i2]&&(t2[i2].__=n2,l2=A(t2[i2],l2,u2));return l2}n2.__e!=l2&&(l2&&n2.type&&!u2.contains(l2)&&(l2=S(n2)),u2.insertBefore(n2.__e,l2||null),l2=n2.__e);do l2=l2&&l2.nextSibling;while(l2!=null&&l2.nodeType==8);return l2}function H$1(n2,l2){return l2=l2||[],n2==null||typeof n2=="boolean"||(w$1(n2)?n2.some(function(n3){H$1(n3,l2)}):l2.push(n2)),l2}function L(n2,l2,u2,t2){var i2,r2,o2=n2.key,e2=n2.type,f2=l2[u2];if(f2===null&&n2.key==null||f2&&o2==f2.key&&e2==f2.type&&!(2&f2.__u))return u2;if(t2>(f2!=null&&!(2&f2.__u)?1:0))for(i2=u2-1,r2=u2+1;i2>=0||r2<l2.length;){if(i2>=0){if((f2=l2[i2])&&!(2&f2.__u)&&o2==f2.key&&e2==f2.type)return i2;i2--}if(r2<l2.length){if((f2=l2[r2])&&!(2&f2.__u)&&o2==f2.key&&e2==f2.type)return r2;r2++}}return-1}function T$2(n2,l2,u2){l2[0]=="-"?n2.setProperty(l2,u2??""):n2[l2]=u2==null?"":typeof u2!="number"||v$1.test(l2)?u2:u2+"px"}function j$2(n2,l2,u2,t2,i2){var r2;n:if(l2=="style")if(typeof u2=="string")n2.style.cssText=u2;else{if(typeof t2=="string"&&(n2.style.cssText=t2=""),t2)for(l2 in t2)u2&&l2 in u2||T$2(n2.style,l2,"");if(u2)for(l2 in u2)t2&&u2[l2]==t2[l2]||T$2(n2.style,l2,u2[l2])}else if(l2[0]=="o"&&l2[1]=="n")r2=l2!=(l2=l2.replace(f$2,"$1")),l2=l2.toLowerCase()in n2||l2=="onFocusOut"||l2=="onFocusIn"?l2.toLowerCase().slice(2):l2.slice(2),n2.l||(n2.l={}),n2.l[l2+r2]=u2,u2?t2?u2.u=t2.u:(u2.u=c$1,n2.addEventListener(l2,r2?a$1:s$1,r2)):n2.removeEventListener(l2,r2?a$1:s$1,r2);else{if(i2=="http://www.w3.org/2000/svg")l2=l2.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(l2!="width"&&l2!="height"&&l2!="href"&&l2!="list"&&l2!="form"&&l2!="tabIndex"&&l2!="download"&&l2!="rowSpan"&&l2!="colSpan"&&l2!="role"&&l2!="popover"&&l2 in n2)try{n2[l2]=u2??"";break n}catch{}typeof u2=="function"||(u2==null||u2===!1&&l2[4]!="-"?n2.removeAttribute(l2):n2.setAttribute(l2,l2=="popover"&&u2==1?"":u2))}}function F$1(n2){return function(u2){if(this.l){var t2=this.l[u2.type+n2];if(u2.t==null)u2.t=c$1++;else if(u2.t<t2.u)return;return t2(l$1.event?l$1.event(u2):u2)}}}function O(n2,u2,t2,i2,r2,o2,e2,f2,c2,s2){var a2,h2,p2,y2,v2,_2,m2,b,S2,C2,M2,$2,P2,A2,H2,L2,T2,j2=u2.type;if(u2.constructor!=null)return null;128&t2.__u&&(c2=!!(32&t2.__u),o2=[f2=u2.__e=t2.__e]),(a2=l$1.__b)&&a2(u2);n:if(typeof j2=="function")try{if(b=u2.props,S2="prototype"in j2&&j2.prototype.render,C2=(a2=j2.contextType)&&i2[a2.__c],M2=a2?C2?C2.props.value:a2.__:i2,t2.__c?m2=(h2=u2.__c=t2.__c).__=h2.__E:(S2?u2.__c=h2=new j2(b,M2):(u2.__c=h2=new x(b,M2),h2.constructor=j2,h2.render=D$1),C2&&C2.sub(h2),h2.props=b,h2.state||(h2.state={}),h2.context=M2,h2.__n=i2,p2=h2.__d=!0,h2.__h=[],h2._sb=[]),S2&&h2.__s==null&&(h2.__s=h2.state),S2&&j2.getDerivedStateFromProps!=null&&(h2.__s==h2.state&&(h2.__s=d$1({},h2.__s)),d$1(h2.__s,j2.getDerivedStateFromProps(b,h2.__s))),y2=h2.props,v2=h2.state,h2.__v=u2,p2)S2&&j2.getDerivedStateFromProps==null&&h2.componentWillMount!=null&&h2.componentWillMount(),S2&&h2.componentDidMount!=null&&h2.__h.push(h2.componentDidMount);else{if(S2&&j2.getDerivedStateFromProps==null&&b!==y2&&h2.componentWillReceiveProps!=null&&h2.componentWillReceiveProps(b,M2),!h2.__e&&h2.shouldComponentUpdate!=null&&h2.shouldComponentUpdate(b,h2.__s,M2)===!1||u2.__v==t2.__v){for(u2.__v!=t2.__v&&(h2.props=b,h2.state=h2.__s,h2.__d=!1),u2.__e=t2.__e,u2.__k=t2.__k,u2.__k.some(function(n3){n3&&(n3.__=u2)}),$2=0;$2<h2._sb.length;$2++)h2.__h.push(h2._sb[$2]);h2._sb=[],h2.__h.length&&e2.push(h2);break n}h2.componentWillUpdate!=null&&h2.componentWillUpdate(b,h2.__s,M2),S2&&h2.componentDidUpdate!=null&&h2.__h.push(function(){h2.componentDidUpdate(y2,v2,_2)})}if(h2.context=M2,h2.props=b,h2.__P=n2,h2.__e=!1,P2=l$1.__r,A2=0,S2){for(h2.state=h2.__s,h2.__d=!1,P2&&P2(u2),a2=h2.render(h2.props,h2.state,h2.context),H2=0;H2<h2._sb.length;H2++)h2.__h.push(h2._sb[H2]);h2._sb=[]}else do h2.__d=!1,P2&&P2(u2),a2=h2.render(h2.props,h2.state,h2.context),h2.state=h2.__s;while(h2.__d&&++A2<25);h2.state=h2.__s,h2.getChildContext!=null&&(i2=d$1(d$1({},i2),h2.getChildContext())),S2&&!p2&&h2.getSnapshotBeforeUpdate!=null&&(_2=h2.getSnapshotBeforeUpdate(y2,v2)),L2=a2,a2!=null&&a2.type===k$1&&a2.key==null&&(L2=N$1(a2.props.children)),f2=I(n2,w$1(L2)?L2:[L2],u2,t2,i2,r2,o2,e2,f2,c2,s2),h2.base=u2.__e,u2.__u&=-161,h2.__h.length&&e2.push(h2),m2&&(h2.__E=h2.__=null)}catch(n3){if(u2.__v=null,c2||o2!=null)if(n3.then){for(u2.__u|=c2?160:128;f2&&f2.nodeType==8&&f2.nextSibling;)f2=f2.nextSibling;o2[o2.indexOf(f2)]=null,u2.__e=f2}else for(T2=o2.length;T2--;)g$1(o2[T2]);else u2.__e=t2.__e,u2.__k=t2.__k;l$1.__e(n3,u2,t2)}else o2==null&&u2.__v==t2.__v?(u2.__k=t2.__k,u2.__e=t2.__e):f2=u2.__e=V$1(t2.__e,u2,t2,i2,r2,o2,e2,c2,s2);return(a2=l$1.diffed)&&a2(u2),128&u2.__u?void 0:f2}function z$1(n2,u2,t2){for(var i2=0;i2<t2.length;i2++)q$2(t2[i2],t2[++i2],t2[++i2]);l$1.__c&&l$1.__c(u2,n2),n2.some(function(u3){try{n2=u3.__h,u3.__h=[],n2.some(function(n3){n3.call(u3)})}catch(n3){l$1.__e(n3,u3.__v)}})}function N$1(n2){return typeof n2!="object"||n2==null||n2.__b&&n2.__b>0?n2:w$1(n2)?n2.map(N$1):d$1({},n2)}function V$1(u2,t2,i2,r2,o2,e2,f2,c2,s2){var a2,h2,y2,v2,d2,_2,m2,b=i2.props,k2=t2.props,x2=t2.type;if(x2=="svg"?o2="http://www.w3.org/2000/svg":x2=="math"?o2="http://www.w3.org/1998/Math/MathML":o2||(o2="http://www.w3.org/1999/xhtml"),e2!=null){for(a2=0;a2<e2.length;a2++)if((d2=e2[a2])&&"setAttribute"in d2==!!x2&&(x2?d2.localName==x2:d2.nodeType==3)){u2=d2,e2[a2]=null;break}}if(u2==null){if(x2==null)return document.createTextNode(k2);u2=document.createElementNS(o2,x2,k2.is&&k2),c2&&(l$1.__m&&l$1.__m(t2,e2),c2=!1),e2=null}if(x2==null)b===k2||c2&&u2.data==k2||(u2.data=k2);else{if(e2=e2&&n.call(u2.childNodes),b=i2.props||p$1,!c2&&e2!=null)for(b={},a2=0;a2<u2.attributes.length;a2++)b[(d2=u2.attributes[a2]).name]=d2.value;for(a2 in b)if(d2=b[a2],a2!="children"){if(a2=="dangerouslySetInnerHTML")y2=d2;else if(!(a2 in k2)){if(a2=="value"&&"defaultValue"in k2||a2=="checked"&&"defaultChecked"in k2)continue;j$2(u2,a2,null,d2,o2)}}for(a2 in k2)d2=k2[a2],a2=="children"?v2=d2:a2=="dangerouslySetInnerHTML"?h2=d2:a2=="value"?_2=d2:a2=="checked"?m2=d2:c2&&typeof d2!="function"||b[a2]===d2||j$2(u2,a2,d2,b[a2],o2);if(h2)c2||y2&&(h2.__html==y2.__html||h2.__html==u2.innerHTML)||(u2.innerHTML=h2.__html),t2.__k=[];else if(y2&&(u2.innerHTML=""),I(t2.type=="template"?u2.content:u2,w$1(v2)?v2:[v2],t2,i2,r2,x2=="foreignObject"?"http://www.w3.org/1999/xhtml":o2,e2,f2,e2?e2[0]:i2.__k&&S(i2,0),c2,s2),e2!=null)for(a2=e2.length;a2--;)g$1(e2[a2]);c2||(a2="value",x2=="progress"&&_2==null?u2.removeAttribute("value"):_2!=null&&(_2!==u2[a2]||x2=="progress"&&!_2||x2=="option"&&_2!=b[a2])&&j$2(u2,a2,_2,b[a2],o2),a2="checked",m2!=null&&m2!=u2[a2]&&j$2(u2,a2,m2,b[a2],o2))}return u2}function q$2(n2,u2,t2){try{if(typeof n2=="function"){var i2=typeof n2.__u=="function";i2&&n2.__u(),i2&&u2==null||(n2.__u=n2(u2))}else n2.current=u2}catch(n3){l$1.__e(n3,t2)}}function B$2(n2,u2,t2){var i2,r2;if(l$1.unmount&&l$1.unmount(n2),(i2=n2.ref)&&(i2.current&&i2.current!=n2.__e||q$2(i2,null,u2)),(i2=n2.__c)!=null){if(i2.componentWillUnmount)try{i2.componentWillUnmount()}catch(n3){l$1.__e(n3,u2)}i2.base=i2.__P=null}if(i2=n2.__k)for(r2=0;r2<i2.length;r2++)i2[r2]&&B$2(i2[r2],u2,t2||typeof n2.type!="function");t2||g$1(n2.__e),n2.__c=n2.__=n2.__e=void 0}function D$1(n2,l2,u2){return this.constructor(n2,u2)}function E$1(u2,t2,i2){var r2,o2,e2,f2;t2==document&&(t2=document.documentElement),l$1.__&&l$1.__(u2,t2),o2=(r2=typeof i2=="function")?null:i2&&i2.__k||t2.__k,e2=[],f2=[],O(t2,u2=(!r2&&i2||t2).__k=_$1(k$1,null,[u2]),o2||p$1,p$1,t2.namespaceURI,!r2&&i2?[i2]:o2?null:t2.firstChild?n.call(t2.childNodes):null,e2,!r2&&i2?i2:o2?o2.__e:t2.firstChild,r2,f2),z$1(e2,u2,f2)}n=y$1.slice,l$1={__e:function(n2,l2,u2,t2){for(var i2,r2,o2;l2=l2.__;)if((i2=l2.__c)&&!i2.__)try{if((r2=i2.constructor)&&r2.getDerivedStateFromError!=null&&(i2.setState(r2.getDerivedStateFromError(n2)),o2=i2.__d),i2.componentDidCatch!=null&&(i2.componentDidCatch(n2,t2||{}),o2=i2.__d),o2)return i2.__E=i2}catch(l3){n2=l3}throw n2}},u$2=0,x.prototype.setState=function(n2,l2){var u2;u2=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=d$1({},this.state),typeof n2=="function"&&(n2=n2(d$1({},u2),this.props)),n2&&d$1(u2,n2),n2!=null&&this.__v&&(l2&&this._sb.push(l2),M(this))},x.prototype.forceUpdate=function(n2){this.__v&&(this.__e=!0,n2&&this.__h.push(n2),M(this))},x.prototype.render=k$1,i$1=[],o$1=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e$1=function(n2,l2){return n2.__v.__b-l2.__v.__b},$.__r=0,f$2=/(PointerCapture)$|Capture$/i,c$1=0,s$1=F$1(!1),a$1=F$1(!0);var f$1=0;function u$1(e2,t2,n2,o2,i2,u2){t2||(t2={});var a2,c2,p2=t2;if("ref"in p2)for(c2 in p2={},t2)c2=="ref"?a2=t2[c2]:p2[c2]=t2[c2];var l2={type:e2,props:p2,key:n2,ref:a2,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--f$1,__i:-1,__u:0,__source:i2,__self:u2};if(typeof e2=="function"&&(a2=e2.defaultProps))for(c2 in a2)p2[c2]===void 0&&(p2[c2]=a2[c2]);return l$1.vnode&&l$1.vnode(l2),l2}var t,r,u,i,o=0,f=[],c=l$1,e=c.__b,a=c.__r,v=c.diffed,l=c.__c,m=c.unmount,s=c.__;function p(n2,t2){c.__h&&c.__h(r,n2,o||t2),o=0;var u2=r.__H||(r.__H={__:[],__h:[]});return n2>=u2.__.length&&u2.__.push({}),u2.__[n2]}function d(n2){return o=1,h(D,n2)}function h(n2,u2,i2){var o2=p(t++,2);if(o2.t=n2,!o2.__c&&(o2.__=[i2?i2(u2):D(void 0,u2),function(n3){var t2=o2.__N?o2.__N[0]:o2.__[0],r2=o2.t(t2,n3);t2!==r2&&(o2.__N=[r2,o2.__[1]],o2.__c.setState({}))}],o2.__c=r,!r.__f)){var f2=function(n3,t2,r2){if(!o2.__c.__H)return!0;var u3=o2.__c.__H.__.filter(function(n4){return!!n4.__c});if(u3.every(function(n4){return!n4.__N}))return!c2||c2.call(this,n3,t2,r2);var i3=o2.__c.props!==n3;return u3.forEach(function(n4){if(n4.__N){var t3=n4.__[0];n4.__=n4.__N,n4.__N=void 0,t3!==n4.__[0]&&(i3=!0)}}),c2&&c2.call(this,n3,t2,r2)||i3};r.__f=!0;var c2=r.shouldComponentUpdate,e2=r.componentWillUpdate;r.componentWillUpdate=function(n3,t2,r2){if(this.__e){var u3=c2;c2=void 0,f2(n3,t2,r2),c2=u3}e2&&e2.call(this,n3,t2,r2)},r.shouldComponentUpdate=f2}return o2.__N||o2.__}function y(n2,u2){var i2=p(t++,3);!c.__s&&C(i2.__H,u2)&&(i2.__=n2,i2.u=u2,r.__H.__h.push(i2))}function _(n2,u2){var i2=p(t++,4);!c.__s&&C(i2.__H,u2)&&(i2.__=n2,i2.u=u2,r.__h.push(i2))}function T$1(n2,r2){var u2=p(t++,7);return C(u2.__H,r2)&&(u2.__=n2(),u2.__H=r2,u2.__h=n2),u2.__}function q$1(n2,t2){return o=8,T$1(function(){return n2},t2)}function j$1(){for(var n2;n2=f.shift();)if(n2.__P&&n2.__H)try{n2.__H.__h.forEach(z),n2.__H.__h.forEach(B$1),n2.__H.__h=[]}catch(t2){n2.__H.__h=[],c.__e(t2,n2.__v)}}c.__b=function(n2){r=null,e&&e(n2)},c.__=function(n2,t2){n2&&t2.__k&&t2.__k.__m&&(n2.__m=t2.__k.__m),s&&s(n2,t2)},c.__r=function(n2){a&&a(n2),t=0;var i2=(r=n2.__c).__H;i2&&(u===r?(i2.__h=[],r.__h=[],i2.__.forEach(function(n3){n3.__N&&(n3.__=n3.__N),n3.u=n3.__N=void 0})):(i2.__h.forEach(z),i2.__h.forEach(B$1),i2.__h=[],t=0)),u=r},c.diffed=function(n2){v&&v(n2);var t2=n2.__c;t2&&t2.__H&&(t2.__H.__h.length&&(f.push(t2)!==1&&i===c.requestAnimationFrame||((i=c.requestAnimationFrame)||w)(j$1)),t2.__H.__.forEach(function(n3){n3.u&&(n3.__H=n3.u),n3.u=void 0})),u=r=null},c.__c=function(n2,t2){t2.some(function(n3){try{n3.__h.forEach(z),n3.__h=n3.__h.filter(function(n4){return!n4.__||B$1(n4)})}catch(r2){t2.some(function(n4){n4.__h&&(n4.__h=[])}),t2=[],c.__e(r2,n3.__v)}}),l&&l(n2,t2)},c.unmount=function(n2){m&&m(n2);var t2,r2=n2.__c;r2&&r2.__H&&(r2.__H.__.forEach(function(n3){try{z(n3)}catch(n4){t2=n4}}),r2.__H=void 0,t2&&c.__e(t2,r2.__v))};var k=typeof requestAnimationFrame=="function";function w(n2){var t2,r2=function(){clearTimeout(u2),k&&cancelAnimationFrame(t2),setTimeout(n2)},u2=setTimeout(r2,100);k&&(t2=requestAnimationFrame(r2))}function z(n2){var t2=r,u2=n2.__c;typeof u2=="function"&&(n2.__c=void 0,u2()),r=t2}function B$1(n2){var t2=r;n2.__c=n2.__(),r=t2}function C(n2,t2){return!n2||n2.length!==t2.length||t2.some(function(t3,r2){return t3!==n2[r2]})}function D(n2,t2){return typeof t2=="function"?t2(n2):t2}function g(n2,t2){for(var e2 in t2)n2[e2]=t2[e2];return n2}function E(n2,t2){for(var e2 in n2)if(e2!=="__source"&&!(e2 in t2))return!0;for(var r2 in t2)if(r2!=="__source"&&n2[r2]!==t2[r2])return!0;return!1}function N(n2,t2){this.props=n2,this.context=t2}(N.prototype=new x).isPureReactComponent=!0,N.prototype.shouldComponentUpdate=function(n2,t2){return E(this.props,n2)||E(this.state,t2)};var T=l$1.__b;l$1.__b=function(n2){n2.type&&n2.type.__f&&n2.ref&&(n2.props.ref=n2.ref,n2.ref=null),T&&T(n2)};var F=l$1.__e;l$1.__e=function(n2,t2,e2,r2){if(n2.then){for(var u2,o2=t2;o2=o2.__;)if((u2=o2.__c)&&u2.__c)return t2.__e==null&&(t2.__e=e2.__e,t2.__k=e2.__k),u2.__c(n2,t2)}F(n2,t2,e2,r2)};var U=l$1.unmount;function V(n2,t2,e2){return n2&&(n2.__c&&n2.__c.__H&&(n2.__c.__H.__.forEach(function(n3){typeof n3.__c=="function"&&n3.__c()}),n2.__c.__H=null),(n2=g({},n2)).__c!=null&&(n2.__c.__P===e2&&(n2.__c.__P=t2),n2.__c.__e=!0,n2.__c=null),n2.__k=n2.__k&&n2.__k.map(function(n3){return V(n3,t2,e2)})),n2}function W(n2,t2,e2){return n2&&e2&&(n2.__v=null,n2.__k=n2.__k&&n2.__k.map(function(n3){return W(n3,t2,e2)}),n2.__c&&n2.__c.__P===t2&&(n2.__e&&e2.appendChild(n2.__e),n2.__c.__e=!0,n2.__c.__P=e2)),n2}function P(){this.__u=0,this.o=null,this.__b=null}function j(n2){var t2=n2.__.__c;return t2&&t2.__a&&t2.__a(n2)}function B(){this.i=null,this.l=null}l$1.unmount=function(n2){var t2=n2.__c;t2&&t2.__R&&t2.__R(),t2&&32&n2.__u&&(n2.type=null),U&&U(n2)},(P.prototype=new x).__c=function(n2,t2){var e2=t2.__c,r2=this;r2.o==null&&(r2.o=[]),r2.o.push(e2);var u2=j(r2.__v),o2=!1,i2=function(){o2||(o2=!0,e2.__R=null,u2?u2(c2):c2())};e2.__R=i2;var c2=function(){if(!--r2.__u){if(r2.state.__a){var n3=r2.state.__a;r2.__v.__k[0]=W(n3,n3.__c.__P,n3.__c.__O)}var t3;for(r2.setState({__a:r2.__b=null});t3=r2.o.pop();)t3.forceUpdate()}};r2.__u++||32&t2.__u||r2.setState({__a:r2.__b=r2.__v.__k[0]}),n2.then(i2,i2)},P.prototype.componentWillUnmount=function(){this.o=[]},P.prototype.render=function(n2,e2){if(this.__b){if(this.__v.__k){var r2=document.createElement("div"),o2=this.__v.__k[0].__c;this.__v.__k[0]=V(this.__b,r2,o2.__O=o2.__P)}this.__b=null}var i2=e2.__a&&_$1(k$1,null,n2.fallback);return i2&&(i2.__u&=-33),[_$1(k$1,null,e2.__a?null:n2.children),i2]};var H=function(n2,t2,e2){if(++e2[1]===e2[0]&&n2.l.delete(t2),n2.props.revealOrder&&(n2.props.revealOrder[0]!=="t"||!n2.l.size))for(e2=n2.i;e2;){for(;e2.length>3;)e2.pop()();if(e2[1]<e2[0])break;n2.i=e2=e2[2]}};(B.prototype=new x).__a=function(n2){var t2=this,e2=j(t2.__v),r2=t2.l.get(n2);return r2[0]++,function(u2){var o2=function(){t2.props.revealOrder?(r2.push(u2),H(t2,n2,r2)):u2()};e2?e2(o2):o2()}},B.prototype.render=function(n2){this.i=null,this.l=new Map;var t2=H$1(n2.children);n2.revealOrder&&n2.revealOrder[0]==="b"&&t2.reverse();for(var e2=t2.length;e2--;)this.l.set(t2[e2],this.i=[1,0,this.i]);return n2.children},B.prototype.componentDidUpdate=B.prototype.componentDidMount=function(){var n2=this;this.l.forEach(function(t2,e2){H(n2,e2,t2)})};var q=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,G=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,J=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,K=/[A-Z0-9]/g,Q=typeof document<"u",X=function(n2){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(n2)};x.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t2){Object.defineProperty(x.prototype,t2,{configurable:!0,get:function(){return this["UNSAFE_"+t2]},set:function(n2){Object.defineProperty(this,t2,{configurable:!0,writable:!0,value:n2})}})});var en=l$1.event;function rn(){}function un(){return this.cancelBubble}function on(){return this.defaultPrevented}l$1.event=function(n2){return en&&(n2=en(n2)),n2.persist=rn,n2.isPropagationStopped=un,n2.isDefaultPrevented=on,n2.nativeEvent=n2};var ln={enumerable:!1,configurable:!0,get:function(){return this.class}},fn=l$1.vnode;l$1.vnode=function(n2){typeof n2.type=="string"&&function(n3){var t2=n3.props,e2=n3.type,u2={},o2=e2.indexOf("-")===-1;for(var i2 in t2){var c2=t2[i2];if(!(i2==="value"&&"defaultValue"in t2&&c2==null||Q&&i2==="children"&&e2==="noscript"||i2==="class"||i2==="className")){var l2=i2.toLowerCase();i2==="defaultValue"&&"value"in t2&&t2.value==null?i2="value":i2==="download"&&c2===!0?c2="":l2==="translate"&&c2==="no"?c2=!1:l2[0]==="o"&&l2[1]==="n"?l2==="ondoubleclick"?i2="ondblclick":l2!=="onchange"||e2!=="input"&&e2!=="textarea"||X(t2.type)?l2==="onfocus"?i2="onfocusin":l2==="onblur"?i2="onfocusout":J.test(i2)&&(i2=l2):l2=i2="oninput":o2&&G.test(i2)?i2=i2.replace(K,"-$&").toLowerCase():c2===null&&(c2=void 0),l2==="oninput"&&u2[i2=l2]&&(i2="oninputCapture"),u2[i2]=c2}}e2=="select"&&u2.multiple&&Array.isArray(u2.value)&&(u2.value=H$1(t2.children).forEach(function(n4){n4.props.selected=u2.value.indexOf(n4.props.value)!=-1})),e2=="select"&&u2.defaultValue!=null&&(u2.value=H$1(t2.children).forEach(function(n4){n4.props.selected=u2.multiple?u2.defaultValue.indexOf(n4.props.value)!=-1:u2.defaultValue==n4.props.value})),t2.class&&!t2.className?(u2.class=t2.class,Object.defineProperty(u2,"className",ln)):(t2.className&&!t2.class||t2.class&&t2.className)&&(u2.class=u2.className=t2.className),n3.props=u2}(n2),n2.$$typeof=q,fn&&fn(n2)};var an=l$1.__r;l$1.__r=function(n2){an&&an(n2),n2.__c};var sn=l$1.diffed;l$1.diffed=function(n2){sn&&sn(n2);var t2=n2.props,e2=n2.__e;e2!=null&&n2.type==="textarea"&&"value"in t2&&t2.value!==e2.value&&(e2.value=t2.value==null?"":t2.value)};function bn(n2){return!!n2.__k&&(E$1(null,n2),!0)}const preactShim=Object.freeze(Object.defineProperty({__proto__:null,Component:x,Fragment:k$1,createElement:_$1,h:_$1,render:E$1,unmountComponentAtNode:bn,useCallback:q$1,useEffect:y,useLayoutEffect:_,useMemo:T$1,useReducer:h,useState:d},Symbol.toStringTag,{value:"Module"})),Image=({href,x:x2,y:y2=0,height=12})=>u$1("image",{xlinkHref:href,x:x2-height/2,y:y2-height/2,width:height,height}),ImageChar=({x:x2,y:y2=0,height=12,fill,stroke,fontFamily="FontAwesome",char="",fontWeight})=>{const renderChar=T$1(()=>fontFamily==="FontAwesome"?common.Utility.faChar(char):char,[char,fontFamily]);return u$1("text",{x:x2,y:y2,fill,stroke,fontFamily,fontSize:`${height}px`,fontWeight,dominantBaseline:"middle",style:{textAnchor:"middle",alignmentBaseline:"middle"},children:renderChar})},Circle=({radius=32,fill="navy",stroke=fill,strokeWidth=1,shapeRendering})=>u$1("circle",{r:radius,fill,stroke,strokeWidth,shapeRendering}),Square=({radius=30,cornerRadius=0,fill="white",stroke,strokeWidth=1,shapeRendering})=>u$1("rect",{x:-radius,y:-radius,rx:cornerRadius,ry:cornerRadius,width:radius*2,height:radius*2,fill,stroke:stroke||fill,strokeWidth,shapeRendering}),Rectangle=({width=30,height=30,cornerRadius=0,fill="white",stroke="black",strokeWidth=1,shapeRendering})=>u$1("rect",{x:-width/2,y:-height/2,rx:cornerRadius,ry:cornerRadius,width,height,fill,stroke:stroke||fill,strokeWidth,shapeRendering}),Shape=({shape="circle",height=128,width,fill,stroke,strokeWidth=1,shapeRendering,cornerRadius})=>{switch(shape){case"square":return u$1(Square,{radius:height/2,fill,stroke,strokeWidth,shapeRendering,cornerRadius});case"rectangle":return u$1(Rectangle,{width:width??height,height,fill,stroke,strokeWidth,shapeRendering,cornerRadius});case"circle":default:return u$1(Circle,{radius:height/2,fill,stroke,strokeWidth,shapeRendering})}},Icon=({shape="circle",width,height=32,fill,stroke,strokeWidth=0,imageUrl="",imageFontFamily="FontAwesome",imageChar="",imageCharFill=common.Palette.textColor(fill),padding=height/5,xOffset=0,yOffset=0,cornerRadius,shapeRendering})=>u$1(k$1,{children:[u$1(Shape,{shape,width,height,fill,stroke,strokeWidth,shapeRendering,cornerRadius}),imageUrl?u$1(Image,{href:imageUrl,x:xOffset,y:yOffset,height:height-padding}):u$1(ImageChar,{x:xOffset,y:yOffset,height:height-padding,fontFamily:imageFontFamily,char:imageChar,fill:imageCharFill,fontWeight:400})]}),Icons=({icons=[]})=>{const IconComponents=icons.map(cat=>u$1("g",{id:cat.id,children:u$1(Icon,{...cat})},cat.id));return u$1(k$1,{children:IconComponents})},TextLine=({text,height=12,anchor="middle",baseline="middle",fontFamily="Verdana",fill="black"})=>u$1("text",{"font-family":fontFamily,"font-size":`${height}px`,"text-anchor":anchor,"dominant-baseline":baseline,fill,children:text}),Text=({text,height=12,fontFamily="Verdana",fill="black",onSizeUpdate})=>{const[totalWidth,setTotalWidth]=d(0),[totalHeight,setTotalHeight]=d(0);y(()=>{onSizeUpdate&&onSizeUpdate({width:totalWidth,height:totalHeight})},[totalWidth,totalHeight,onSizeUpdate]);const parts=T$1(()=>text.split(`
2
+ `),[text]);_(()=>{const size=common.Utility.textSize(parts,fontFamily,height);setTotalWidth(size.width),setTotalHeight(size.height)},[fontFamily,height,parts]);const TextLines=T$1(()=>{const yOffset=-(totalHeight/2)+height/2;return parts.map((p2,i2)=>u$1("g",{transform:`translate(0 ${yOffset+i2*(height+2)})`,children:u$1(TextLine,{text:p2,height,fontFamily,fill})},`key-${i2}`))},[parts,totalHeight,height,fontFamily,fill]);return u$1("g",{children:TextLines})},TextBox=({text,height=12,fontFamily="Verdana",padding=4,fill="whitesmoke",stroke="lightgray",textFill="black",strokeWidth=1,cornerRadius=0,onSizeUpdate})=>{const[textWidth,setTextWidthUpdate]=d(0),[textHeight,setTextHeightUpdate]=d(0);y(()=>{onSizeUpdate&&onSizeUpdate({width:textWidth,height:textHeight})},[textWidth,textHeight,onSizeUpdate]);const onTextSizeUpdate=q$1(size=>{setTextWidthUpdate(size.width),setTextHeightUpdate(size.height)},[]),w2=textWidth+padding*2+strokeWidth,h2=textHeight+padding*2+strokeWidth,textOffsetY=Math.floor(height/10);return u$1(k$1,{children:[u$1(Rectangle,{width:w2,height:h2,fill,stroke,strokeWidth,cornerRadius}),u$1("g",{transform:`translate(0 ${textOffsetY})`,children:u$1(Text,{text,fontFamily,height,fill:textFill,onSizeUpdate:onTextSizeUpdate})})]})},LabelledRect=({text,height=12,width=12,fontFamily="Verdana",fontSize=10,padding=3,fill="whitesmoke",stroke="lightgray",textFill="black",strokeWidth=1,cornerRadius=0,onSizeUpdate})=>{const[actualWidth,setActualWidthUpdate]=d(width),[actualHeight,setActualHeightUpdate]=d(height);return _(()=>{const size=common.Utility.textSize(text,fontFamily,fontSize);setActualWidthUpdate(size.width+padding*2),setActualHeightUpdate(size.height+padding*2)},[text,fontFamily,fontSize,padding]),_(()=>{onSizeUpdate&&onSizeUpdate({width:actualWidth,height:actualHeight})},[actualWidth,actualHeight,padding,onSizeUpdate]),u$1(k$1,{children:[u$1(Rectangle,{width,height,fill,stroke,strokeWidth,cornerRadius}),u$1("g",{transform:`translate(${-(width/2)+padding} ${-(height/2)+padding})`,children:u$1(TextLine,{text,fontFamily,height:fontSize,fill:textFill,anchor:"start",baseline:"hanging"})})]})},IconLabelledRect=({icon,iconFontFamily,text,height=12,width=12,fontFamily="Verdana",fontSize=10,padding=3,fill="whitesmoke",stroke="lightgray",textFill="black",strokeWidth=1,cornerRadius=0})=>u$1(k$1,{children:[u$1(Rectangle,{width,height,fill,stroke,strokeWidth,cornerRadius}),u$1("g",{transform:`translate(${-(width/2)+padding} ${-(height/2)+padding})`,children:u$1(Icon,{shape:"square",imageFontFamily:iconFontFamily,imageChar:icon,height,fill,imageCharFill:textFill})}),u$1("g",{transform:`translate(${-(width/2)+padding*2+height} ${-(height/2)+padding})`,children:u$1(TextLine,{text,fontFamily,height:fontSize,fill:textFill,anchor:"start",baseline:"hanging"})})]}),Edge=({label,labelPos,labelFill="black",labelHeight=12,path,stroke,strokeWidth,strokeDasharray})=>u$1(k$1,{children:[u$1("path",{d:path,stroke,style:{strokeWidth,strokeDasharray}}),label&&labelPos&&labelPos.length===2?u$1("g",{transform:`translate(${labelPos[0]} ${labelPos[1]})`,children:u$1(Text,{text:label,fill:labelFill,height:labelHeight})}):void 0]});function render(C2,props,parent,replaceNode){E$1(_$1(C2,props),parent,replaceNode)}function svgRender(C2,props,parent,replaceNode){E$1(_$1("svg",null,_$1(C2,props)),parent,replaceNode)}class HTMLAdapter extends common.HTMLWidget{constructor(_component){super(),this._component=_component}props(_2){return arguments.length?(this._props={...this._props,..._2},this):this._props}prop(_2,value){return arguments.length===1?this._props[_2]:(this._props[_2]=value,this)}update(domNode,element){super.update(domNode,element),render(this._component,this._props,domNode)}}HTMLAdapter.prototype._class+=" react_HTMLAdapter",HTMLAdapter.prototype.publish("props",{},"object","Properties");class SVGAdapter extends common.SVGWidget{constructor(_component){super(),this._component=_component}props(_2){return arguments.length?(this._props={...this._props,..._2},this):this._props}prop(_2,value){return arguments.length===1?this._props[_2]:(this._props[_2]=value,this)}update(domNode,element){super.update(domNode,element),render(this._component,this._props,domNode)}}SVGAdapter.prototype._class+=" react_SVGAdapter",SVGAdapter.prototype.publish("props",{},"object","Properties");const Span=({text})=>u$1("span",{children:text}),Annotations=({x:x2,y:y2,annotationIDs=[],stepSize=-16})=>{const IconComponents=annotationIDs.map((id,i2)=>u$1("g",{transform:`translate(${x2+i2*stepSize} ${y2})`,children:u$1("use",{xlinkHref:"#"+id})},id));return u$1(k$1,{children:IconComponents})},Vertex=({categoryID="",text="",textHeight=12,textPadding=4,icon={},annotationsHeight=12,annotationIDs=[],textFill,textboxFill,textboxStroke,textFontFamily,onSizeUpdate,showLabel=!0,scale=1})=>{icon={imageChar:"fa-question",height:32,fill:"transparent",...icon};const[textBoxWidth,setTextBoxWidthUpdate]=d(0),[textBoxHeight,setTextBoxHeightUpdate]=d(0);y(()=>{onSizeUpdate&&onSizeUpdate({width:0,height:0})},[textBoxWidth,textBoxHeight,onSizeUpdate]);let width=textBoxWidth;width+=4;let offsetY=-(icon.height*2/6+textHeight+8)/2;const textboxOffsetY=icon.height/3+textBoxHeight/2+textPadding;let annotationOffsetY=icon.height/3+textBoxHeight+textPadding+annotationsHeight/3;showLabel||(offsetY+=(textHeight+8)/2,annotationOffsetY-=textBoxHeight+textPadding);const onTextBoxSizeUpdate=q$1(size=>{setTextBoxWidthUpdate(size.width),setTextBoxHeightUpdate(size.height)},[]),label=showLabel?u$1("g",{transform:`translate(0 ${textboxOffsetY})`,children:u$1(TextBox,{text,height:textHeight,padding:textPadding,onSizeUpdate:onTextBoxSizeUpdate,textFill,fill:textboxFill,stroke:textboxStroke,fontFamily:textFontFamily})}):void 0;return categoryID?u$1("g",{transform:`translate(0 ${offsetY}) scale(${scale})`,children:[u$1("use",{xlinkHref:"#"+categoryID}),label,u$1(Annotations,{x:width/2,y:annotationOffsetY,annotationIDs})]}):u$1("g",{transform:`translate(0 ${offsetY}) scale(${scale})`,children:[u$1(Icon,{...icon}),label]})},Vertex2=({categoryID="",text="",textHeight=12,textPadding=4,icon={},textFill="black",textboxFill="white",textboxStroke="black",textFontFamily,annotationsHeight=12,annotationIDs=[]})=>{icon={imageChar:"fa-question",imageCharFill:"white",height:32,fill:"black",shape:"square",...icon};const textBoxHeight=textHeight+textPadding*2,{width}=T$1(()=>common.Utility.textSize(text,textFontFamily,textHeight,!1),[text,textFontFamily,textHeight]),stepSize=annotationsHeight,textboxStrokeWidth=1,halfTextboxHeight=textBoxHeight/2,offsetX=0,offsetY=-(icon.height*2/6+textHeight+8)/2,iconOffsetX=-icon.height/2,iconOffsetY=0,textboxOffsetX=Math.ceil(width/2+textPadding),textboxOffsetY=halfTextboxHeight-icon.height/2,annotationOffsetX=stepSize/2,annotationOffsetY=halfTextboxHeight;return categoryID?u$1("g",{transform:`translate(${offsetX} ${offsetY})`,children:[u$1("g",{transform:`translate(${iconOffsetX} ${iconOffsetY})`,children:u$1("use",{xlinkHref:"#"+categoryID})}),u$1("g",{transform:`translate(${textboxOffsetX} ${textboxOffsetY})`,children:u$1(TextBox,{text,height:textHeight,padding:textPadding,strokeWidth:textboxStrokeWidth,stroke:textboxStroke,fill:textboxFill,textFill,fontFamily:textFontFamily})}),u$1(Annotations,{x:annotationOffsetX,y:annotationOffsetY,annotationIDs,stepSize})]}):u$1(k$1,{children:[u$1("g",{transform:`translate(${iconOffsetX} ${iconOffsetY})scale(1.0002)`,children:u$1(Icon,{...icon,shape:"square"})}),u$1("g",{transform:`translate(${textboxOffsetX} ${textboxOffsetY})scale(1.0002)`,children:u$1(TextBox,{text,height:textHeight,padding:textPadding,stroke:textboxStroke,fill:textboxFill})})]})},Vertex3=({text="",textHeight=10,textPadding=4,textFill="#287EC4",textboxFill="white",textboxStroke="#CCCCCC",textboxStrokeWidth=1,textFontFamily="Verdana",annotationGutter=2,annotations=[],cornerRadius=3,icon={},subText={text:""},showLabel=!0,noLabelRadius=5,expansionIcon,scale=1})=>{icon={height:50,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"#555555",fill:"transparent",strokeWidth:0,...icon},subText={text:"",fill:"white",textFill:"#555555",...subText},expansionIcon=expansionIcon?{height:16,shape:"circle",padding:6,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"black",fill:"whitesmoke",stroke:"whitesmoke",strokeWidth:0,...expansionIcon}:void 0;let fullAnnotationWidth=0;const annoOffsetY=0,labelWidth=T$1(()=>common.Utility.textSize(text,textFontFamily,textHeight,!1).width,[text,textFontFamily,textHeight]);let labelShapeWidth=0;text!==""&&(labelShapeWidth=labelWidth+textPadding*2+textboxStrokeWidth*2),fullAnnotationWidth+=labelShapeWidth+annotationGutter;const textOffsetX=fullAnnotationWidth-labelShapeWidth/2,textShapeHeight=textHeight+textPadding*2+textboxStrokeWidth*2,annotationArr=[];annotations.forEach((anno,idx)=>{const annoText=anno.imageChar,annoShapeWidth=textShapeHeight;fullAnnotationWidth+=annoShapeWidth+annotationGutter;const annoOffsetX=fullAnnotationWidth-annoShapeWidth/2;annotationArr.push(u$1("g",{className:"vertex3-anno","data-click":"annotation","data-click-data":JSON.stringify(anno),transform:`translate(${annoOffsetX} ${annoOffsetY})`,children:u$1(Icon,{...anno,shape:"square",height:textShapeHeight,imageChar:annoText,imageFontFamily:anno.imageFontFamily,cornerRadius,strokeWidth:0})},idx))}),annotations.length>0&&(fullAnnotationWidth+=annotationGutter*(annotations.length-1));const textElement=u$1("g",{"data-click":"text",transform:`translate(${textOffsetX} ${annoOffsetY})`,children:!showLabel||text===""?u$1("circle",{r:noLabelRadius,stroke:textboxStroke,fill:textFill}):u$1(TextBox,{text,height:textHeight,padding:textPadding,strokeWidth:textboxStrokeWidth,stroke:textboxStroke,fill:textboxFill,textFill,fontFamily:textFontFamily,cornerRadius})}),iconHeight=icon.height||20,iconStrokeWidth=icon.strokeWidth||0,iconOffsetX=0;let iconOffsetY=0;const subTextOffsetX=0;let subTextOffsetY=textShapeHeight+annotationGutter*2;text!==""||annotationArr.length>0?iconOffsetY=-(iconHeight/2)-iconStrokeWidth-textShapeHeight/2-annotationGutter*2:subText.text!==""&&(subTextOffsetY=iconHeight/2+iconStrokeWidth+annotationGutter*2);const subtextElement=subText.text===""?null:u$1("g",{"data-click":"subtext",transform:`translate(${subTextOffsetX} ${subTextOffsetY})`,children:u$1(TextBox,{fill:subText.fill||"#FFFFFF",textFill:subText.textFill||textFill,...subText,height:textHeight,padding:textPadding,strokeWidth:0,stroke:textboxStroke,fontFamily:textFontFamily,cornerRadius})});return u$1("g",{transform:`scale(${scale})`,children:[u$1("g",{"data-click":"icon",transform:`translate(${iconOffsetX} ${iconOffsetY})`,children:[u$1(Icon,{...icon}),expansionIcon&&u$1("g",{"data-click":"expanded-icon","data-click-data":JSON.stringify(expansionIcon),transform:`translate(${(icon.height+iconStrokeWidth)/2-expansionIcon.height/2} ${-(icon.height+iconStrokeWidth)/2+expansionIcon.height/2})`,children:u$1(Icon,{...expansionIcon})})]}),u$1("g",{transform:`translate(${-fullAnnotationWidth/2} ${annoOffsetY})`,children:[textElement,annotationArr]}),subtextElement]})},CentroidVertex3=function({id,categoryID="",text="",textHeight=12,textPadding=10,textFill="#287EC4",textboxFill="white",textboxStroke="#CCCCCC",textboxStrokeWidth=1,textFontFamily="Verdana",annotationGutter=2,annotations=[],cornerRadius,icon={},subText={},expansionIcon,scale=1}){return icon={height:91,padding:40,imageCharFill:"#555555",imageFontFamily:"FontAwesome",fill:"#FFCC33",stroke:"#DFDFDF",imageChar:"?",strokeWidth:4,yOffset:-15,...icon},subText={text:"",fill:"transparent",textFill:"#555555",...subText},u$1(Vertex3,{...{id,categoryID,text,textHeight,textPadding,textFill,textboxFill,textboxStroke,textboxStrokeWidth,textFontFamily,annotationGutter,annotations,cornerRadius,icon,subText,expansionIcon,scale},icon,subText})},Vertex4=({categoryID="",text="",textHeight=10,textPadding=4,textFill="#287EC4",textboxFill="white",textboxStroke="#CCCCCC",textboxStrokeWidth=1,textFontFamily="Verdana",annotationGutter=2,annotations=[],iconAnnotations=[],cornerRadius=3,icon={},subText={},showLabel=!0,noLabelRadius=5,iconBorderWidth=1,iconBorderColor="#333",iconBackgroundColor="#fff",iconFontColor="#000",iconFontSize=20,iconFontFamily="FontAwesome",shapeOffsetX=0,shapeOffsetY=0,iconOffsetX=0,iconOffsetY=0,iconPadding=4,iconText="?",shapeRendering="auto"})=>{icon={height:50,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"#555555",fill:"transparent",strokeWidth:0,...icon},subText={text:"",fill:"white",textFill:"#555555",...subText};const annoOffsetY=0,labelWidth=T$1(()=>common.Utility.textSize(text,textFontFamily,textHeight,!1).width,[text,textFontFamily,textHeight]);let labelShapeWidth=0;text!==""&&(labelShapeWidth=labelWidth+textPadding*2+textboxStrokeWidth*2);let fullAnnotationWidth=labelShapeWidth+annotationGutter;const textOffsetX=fullAnnotationWidth-labelShapeWidth/2,textShapeHeight=textHeight+annotationGutter*2+textboxStrokeWidth*2,annoWidthArr=annotations.map(anno=>common.Utility.textSize(anno.imageChar,anno.imageFontFamily,anno.height,!1).width),annotationArr=[];let _labelAnnoOffsetX=fullAnnotationWidth;annotations.forEach((anno,i2)=>{const annoText=anno.imageChar,annoTextHeight=anno.height??textShapeHeight;_labelAnnoOffsetX+=annoWidthArr[i2]+annotationGutter;const annoOffsetX=_labelAnnoOffsetX-annoWidthArr[i2]/2;annotationArr.push(u$1("g",{className:"vertex3-anno","data-click":"annotation","data-click-data":JSON.stringify(anno),transform:`translate(${annoOffsetX} ${annoOffsetY})`,children:u$1(Icon,{...anno,shape:"rectangle",width:annoWidthArr[i2],height:annoTextHeight,imageChar:annoText,imageFontFamily:anno.imageFontFamily,cornerRadius,strokeWidth:0})},i2))}),annotations.length>0&&(fullAnnotationWidth+=annotationGutter*(annotations.length-1));const iconAnnotationArr=[];iconAnnotations.forEach((anno,i2)=>{const x2=anno.shapeOffsetX,y2=anno.shapeOffsetY;iconAnnotationArr.push(u$1("g",{className:"vertex3-iconAnno","data-click":"icon-annotation","data-click-data":JSON.stringify(anno),transform:`translate(${x2} ${y2})`,children:u$1(Icon,{...anno,shape:anno.shape??"square",imageChar:anno.imageChar,imageFontFamily:anno.imageFontFamily,cornerRadius,stroke:anno.stroke,strokeWidth:anno.strokeWidth})},i2))});const textElement=u$1("g",{"data-click":"text",transform:`translate(${textOffsetX} ${annoOffsetY})`,children:!showLabel||text===""?u$1("circle",{r:noLabelRadius,stroke:textboxStroke,fill:textFill}):u$1(TextBox,{text,height:textHeight,padding:textPadding,strokeWidth:textboxStrokeWidth,stroke:textboxStroke,fill:textboxFill,textFill,fontFamily:textFontFamily,cornerRadius})}),subTextOffsetX=0,subTextOffsetY=textShapeHeight+annotationGutter*2,subtextElement=subText.text===""?null:u$1("g",{"data-click":"subtext",transform:`translate(${subTextOffsetX} ${subTextOffsetY})`,children:u$1(TextBox,{fill:subText.fill||"#FFFFFF",textFill:subText.textFill||textFill,...subText,height:textHeight,padding:textPadding,strokeWidth:0,stroke:textboxStroke,fontFamily:textFontFamily,cornerRadius})});return u$1("g",{children:[u$1("g",{"data-click":"icon",transform:`translate(${shapeOffsetX} ${shapeOffsetY})`,children:[u$1(Icon,{...icon,strokeWidth:iconBorderWidth,shape:"circle",height:iconFontSize,fill:iconBackgroundColor,stroke:iconBorderColor,imageFontFamily:iconFontFamily,imageChar:iconText,imageCharFill:iconFontColor,padding:iconPadding,xOffset:iconOffsetX,yOffset:iconOffsetY,cornerRadius,shapeRendering}),iconAnnotationArr]}),u$1("g",{transform:`translate(${-fullAnnotationWidth/2} ${annoOffsetY})`,children:[textElement,annotationArr]}),subtextElement]})},CentroidVertex4=function({id,categoryID="",text="",textHeight=12,textPadding=10,textFill="#287EC4",textboxFill="white",textboxStroke="#CCCCCC",textboxStrokeWidth=1,textFontFamily="Verdana",annotationGutter=2,annotations=[],iconAnnotations=[],cornerRadius,icon={},subText={},showLabel=!0,noLabelRadius=5,iconBorderWidth=1,iconBorderColor="#333",iconBackgroundColor="#fff",iconFontColor="#000",iconFontSize=20,iconFontFamily="FontAwesome",shapeOffsetX=0,shapeOffsetY=0,iconOffsetX=0,iconOffsetY=0,iconPadding=4,iconText="?",shapeRendering="auto"}){return icon={height:91,padding:40,imageCharFill:"#555555",imageFontFamily:"FontAwesome",fill:"#FFCC33",stroke:"#DFDFDF",imageChar:"?",strokeWidth:4,yOffset:-15,...icon},subText={text:"",fill:"transparent",textFill:"#555555",...subText},u$1(Vertex4,{...{id,categoryID,text,textHeight,textPadding,textFill,textboxFill,textboxStroke,textboxStrokeWidth,textFontFamily,annotationGutter,annotations,iconAnnotations,cornerRadius,icon,subText,showLabel,noLabelRadius,iconBorderWidth,iconBorderColor,iconBackgroundColor,iconFontColor,iconFontSize,iconFontFamily,shapeOffsetX,shapeOffsetY,iconOffsetX,iconOffsetY,iconPadding,iconText,shapeRendering},icon,subText})},Subgraph=({text,width=100,height=100,fill="transparent",stroke="black",fontHeight=12,fontFamily})=>{const tSize=common.Utility.textSize(text,fontFamily,fontHeight,!1);return u$1(k$1,{children:[u$1(Rectangle,{width,height,fill,stroke}),u$1("g",{transform:`translate(${(-width+tSize.width)/2+4} ${(-height+tSize.height)/2+4})`,children:u$1(Text,{height:fontHeight,text,fontFamily})})]})};exports2.Annotations=Annotations,exports2.BUILD_VERSION=BUILD_VERSION,exports2.CentroidVertex3=CentroidVertex3,exports2.CentroidVertex4=CentroidVertex4,exports2.Circle=Circle,exports2.Edge=Edge,exports2.HTMLAdapter=HTMLAdapter,exports2.Icon=Icon,exports2.IconLabelledRect=IconLabelledRect,exports2.Icons=Icons,exports2.Image=Image,exports2.ImageChar=ImageChar,exports2.LabelledRect=LabelledRect,exports2.PKG_NAME=PKG_NAME,exports2.PKG_VERSION=PKG_VERSION,exports2.React=preactShim,exports2.Rectangle=Rectangle,exports2.SVGAdapter=SVGAdapter,exports2.Shape=Shape,exports2.Span=Span,exports2.Square=Square,exports2.Subgraph=Subgraph,exports2.Text=Text,exports2.TextBox=TextBox,exports2.TextLine=TextLine,exports2.Vertex=Vertex,exports2.Vertex2=Vertex2,exports2.Vertex3=Vertex3,exports2.Vertex4=Vertex4,exports2.render=render,exports2.svgRender=svgRender,Object.defineProperty(exports2,Symbol.toStringTag,{value:"Module"})});
3
3
  //# sourceMappingURL=index.umd.cjs.map