{if(!((a-=s)>=i))return;let o=t*n[i];const l=s*t;for(let u=i,h=i+l;u 0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],s[i[0]]=1,i.length===2&&(s[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(e){return new Nv(this,e)}*neighbors(e){const{inedges:r,hull:n,_hullIndex:i,halfedges:a,triangles:s,collinear:o}=this;if(o){const d=o.indexOf(e);d>0&&(yield o[d-1]),d 0&&a(h)?i>1?r(h,i-1,a,s,o):t(o,h):s||(o[o.length]=h)}return o}return ub=r,ub}var fb,bC;function EQ(){if(bC)return fb;bC=1;function t(e,r,n){switch(n.length){case 0:return e.call(r);case 1:return e.call(r,n[0]);case 2:return e.call(r,n[0],n[1]);case 3:return e.call(r,n[0],n[1],n[2])}return e.apply(r,n)}return fb=t,fb}var db,_C;function vC(){if(_C)return db;_C=1;var t=EQ(),e=Math.max;function r(n,i,a){return i=e(i===void 0?n.length-1:i,0),function(){for(var s=arguments,o=-1,l=e(s.length-i,0),u=Array(l);++o 1?n.setNode(i,e):n.setNode(i)}),this},Le.prototype.setNode=function(t,e){return _e.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=Gs,this._children[t]={},this._children[Gs][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},Le.prototype.node=function(t){return this._nodes[t]},Le.prototype.hasNode=function(t){return _e.has(this._nodes,t)},Le.prototype.removeNode=function(t){var e=this;if(_e.has(this._nodes,t)){var r=function(n){e.removeEdge(e._edgeObjs[n])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],_e.each(this.children(t),function(n){e.setParent(n)}),delete this._children[t]),_e.each(_e.keys(this._in[t]),r),delete this._in[t],delete this._preds[t],_e.each(_e.keys(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},Le.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(_e.isUndefined(e))e=Gs;else{e+="";for(var r=e;!_e.isUndefined(r);r=this.parent(r))if(r===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},Le.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},Le.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if(e!==Gs)return e}},Le.prototype.children=function(t){if(_e.isUndefined(t)&&(t=Gs),this._isCompound){var e=this._children[t];if(e)return _e.keys(e)}else{if(t===Gs)return this.nodes();if(this.hasNode(t))return[]}},Le.prototype.predecessors=function(t){var e=this._preds[t];if(e)return _e.keys(e)},Le.prototype.successors=function(t){var e=this._sucs[t];if(e)return _e.keys(e)},Le.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return _e.union(e,this.successors(t))},Le.prototype.isLeaf=function(t){var e;return this.isDirected()?e=this.successors(t):e=this.neighbors(t),e.length===0},Le.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var r=this;_e.each(this._nodes,function(a,s){t(s)&&e.setNode(s,a)}),_e.each(this._edgeObjs,function(a){e.hasNode(a.v)&&e.hasNode(a.w)&&e.setEdge(a,r.edge(a))});var n={};function i(a){var s=r.parent(a);return s===void 0||e.hasNode(s)?(n[a]=s,s):s in n?n[s]:i(s)}return this._isCompound&&_e.each(e.nodes(),function(a){e.setParent(a,i(a))}),e},Le.prototype.setDefaultEdgeLabel=function(t){return _e.isFunction(t)||(t=_e.constant(t)),this._defaultEdgeLabelFn=t,this},Le.prototype.edgeCount=function(){return this._edgeCount},Le.prototype.edges=function(){return _e.values(this._edgeObjs)},Le.prototype.setPath=function(t,e){var r=this,n=arguments;return _e.reduce(t,function(i,a){return n.length>1?r.setEdge(i,a,e):r.setEdge(i,a),a}),this},Le.prototype.setEdge=function(){var t,e,r,n,i=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(t=a.v,e=a.w,r=a.name,arguments.length===2&&(n=arguments[1],i=!0)):(t=a,e=arguments[1],r=arguments[3],arguments.length>2&&(n=arguments[2],i=!0)),t=""+t,e=""+e,_e.isUndefined(r)||(r=""+r);var s=Xc(this._isDirected,t,e,r);if(_e.has(this._edgeLabels,s))return i&&(this._edgeLabels[s]=n),this;if(!_e.isUndefined(r)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[s]=i?n:this._defaultEdgeLabelFn(t,e,r);var o=qQ(this._isDirected,t,e,r);return t=o.v,e=o.w,Object.freeze(o),this._edgeObjs[s]=o,UC(this._preds[e],t),UC(this._sucs[t],e),this._in[e][s]=o,this._out[t][s]=o,this._edgeCount++,this},Le.prototype.edge=function(t,e,r){var n=arguments.length===1?Ib(this._isDirected,arguments[0]):Xc(this._isDirected,t,e,r);return this._edgeLabels[n]},Le.prototype.hasEdge=function(t,e,r){var n=arguments.length===1?Ib(this._isDirected,arguments[0]):Xc(this._isDirected,t,e,r);return _e.has(this._edgeLabels,n)},Le.prototype.removeEdge=function(t,e,r){var n=arguments.length===1?Ib(this._isDirected,arguments[0]):Xc(this._isDirected,t,e,r),i=this._edgeObjs[n];return i&&(t=i.v,e=i.w,delete this._edgeLabels[n],delete this._edgeObjs[n],WC(this._preds[e],t),WC(this._sucs[t],e),delete this._in[e][n],delete this._out[t][n],this._edgeCount--),this},Le.prototype.inEdges=function(t,e){var r=this._in[t];if(r){var n=_e.values(r);return e?_e.filter(n,function(i){return i.v===e}):n}},Le.prototype.outEdges=function(t,e){var r=this._out[t];if(r){var n=_e.values(r);return e?_e.filter(n,function(i){return i.w===e}):n}},Le.prototype.nodeEdges=function(t,e){var r=this.inEdges(t,e);if(r)return r.concat(this.outEdges(t,e))};function UC(t,e){t[e]?t[e]++:t[e]=1}function WC(t,e){--t[e]||delete t[e]}function Xc(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var s=i;i=a,a=s}return i+YC+a+YC+(_e.isUndefined(n)?PQ:n)}function qQ(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var s=i;i=a,a=s}var o={v:i,w:a};return n&&(o.name=n),o}function Ib(t,e){return Xc(t,e.v,e.w,e.name)}var VQ="2.1.8",zQ={Graph:Rb,version:VQ},Pi=Wn,YQ=Rb,UQ={write:WQ,read:jQ};function WQ(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:HQ(t),edges:GQ(t)};return Pi.isUndefined(t.graph())||(e.value=Pi.clone(t.graph())),e}function HQ(t){return Pi.map(t.nodes(),function(e){var r=t.node(e),n=t.parent(e),i={v:e};return Pi.isUndefined(r)||(i.value=r),Pi.isUndefined(n)||(i.parent=n),i})}function GQ(t){return Pi.map(t.edges(),function(e){var r=t.edge(e),n={v:e.v,w:e.w};return Pi.isUndefined(e.name)||(n.name=e.name),Pi.isUndefined(r)||(n.value=r),n})}function jQ(t){var e=new YQ(t.options).setGraph(t.value);return Pi.each(t.nodes,function(r){e.setNode(r.v,r.value),r.parent&&e.setParent(r.v,r.parent)}),Pi.each(t.edges,function(r){e.setEdge({v:r.v,w:r.w,name:r.name},r.value)}),e}var O1=Wn,$Q=XQ;function XQ(t){var e={},r=[],n;function i(a){O1.has(e,a)||(e[a]=!0,n.push(a),O1.each(t.successors(a),i),O1.each(t.predecessors(a),i))}return O1.each(t.nodes(),function(a){n=[],i(a),n.length&&r.push(n)}),r}var HC=Wn,GC=Hn;function Hn(){this._arr=[],this._keyIndices={}}Hn.prototype.size=function(){return this._arr.length},Hn.prototype.keys=function(){return this._arr.map(function(t){return t.key})},Hn.prototype.has=function(t){return HC.has(this._keyIndices,t)},Hn.prototype.priority=function(t){var e=this._keyIndices[t];if(e!==void 0)return this._arr[e].priority},Hn.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},Hn.prototype.add=function(t,e){var r=this._keyIndices;if(t=String(t),!HC.has(r,t)){var n=this._arr,i=n.length;return r[t]=i,n.push({key:t,priority:e}),this._decrease(i),!0}return!1},Hn.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},Hn.prototype.decrease=function(t,e){var r=this._keyIndices[t];if(e>this._arr[r].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[r].priority+" New: "+e);this._arr[r].priority=e,this._decrease(r)},Hn.prototype._heapify=function(t){var e=this._arr,r=2*t,n=r+1,i=t;r=f)if(b>=f&&e===xl){const k=oo(d,f,x);isFinite(k)&&(k>0?f=(Math.floor(f/k)+1)*k:k<0&&(f=(Math.ceil(f*-k)+1)/-k))}else p.pop()}for(var m=p.length;p[0]<=d;)p.shift(),--m;for(;p[m-1]>f;)p.pop(),--m;var _=new Array(m+1),y;for(a=0;a<=m;++a)y=_[a]=[],y.x0=a>0?p[a-1]:d,y.x1=a=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r=i)&&(r=i)}return r}function H0(t,e){let r,n=-1,i=-1;if(e===void 0)for(const a of t)++i,a!=null&&(r=a)&&(r=a,n=i);else for(let a of t)(a=e(a,++i,t))!=null&&(r=a)&&(r=a,n=i);return n}function Tl(t,e){let r;if(e===void 0)for(const n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}function G0(t,e){let r,n=-1,i=-1;if(e===void 0)for(const a of t)++i,a!=null&&(r>a||r===void 0&&a>=a)&&(r=a,n=i);else for(let a of t)(a=e(a,++i,t))!=null&&(r>a||r===void 0&&a>=a)&&(r=a,n=i);return n}function Eu(t,e,r=0,n=t.length-1,i){for(i=i===void 0?so:V0(i);n>r;){if(n-r>600){const l=n-r+1,u=e-r+1,h=Math.log(l),d=.5*Math.exp(2*h/3),f=.5*Math.sqrt(h*d*(l-d)/l)*(u-l/2<0?-1:1),p=Math.max(r,Math.floor(e-u*d/l+f)),m=Math.min(n,Math.floor(e+(l-u)*d/l+f));Eu(t,e,p,m,i)}const a=t[e];let s=r,o=n;for(El(t,r,e),i(t[n],a)>0&&El(t,r,n);s0)for(var r=new Array(i),n=0,i,a;n=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),K0.hasOwnProperty(e)?{space:K0[e],local:t}:t}function BI(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===X0&&e.documentElement.namespaceURI===X0?e.createElement(t):e.createElementNS(r,t)}}function DI(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Lu(t){var e=Al(t);return(e.local?DI:BI)(e)}function OI(){}function Ru(t){return t==null?OI:function(){return this.querySelector(t)}}function FI(t){typeof t!="function"&&(t=Ru(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i=1))throw new Error("invalid cell size");return s=Math.floor(Math.log(x)/Math.LN2),b()},f.thresholds=function(x){return arguments.length?(h=typeof x=="function"?x:Array.isArray(x)?Ia(Sv.call(x)):Ia(x),f):h},f.bandwidth=function(x){if(!arguments.length)return Math.sqrt(a*(a+1));if(!((x=+x)>=0))throw new Error("invalid bandwidth");return a=(Math.sqrt(4*x*x+1)-1)/2,b()},f}const Zi=11102230246251565e-32,Pr=134217729,TF=(3+8*Zi)*Zi;function Wd(t,e,r,n,i){let a,s,o,l,u=e[0],h=n[0],d=0,f=0;h>u==h>-u?(a=u,u=e[++d]):(a=h,h=n[++f]);let p=0;if(du&&(u=v),B>h&&(h=B),this._ids[L]=L}const d=(o+u)/2,f=(l+h)/2;let p=1/0,m,_,y;for(let L=0;L0&&(_=L,p=v)}let k=e[2*_],T=e[2*_+1],C=1/0;for(let L=0;Lw&&(L[v++]=D,w=this._dists[D])}this.hull=L.subarray(0,v),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(oh(b,x,k,T,M,S)<0){const L=_,v=k,B=T;_=y,k=M,T=S,y=L,M=v,S=B}const R=NF(b,x,k,T,M,S);this._cx=R.x,this._cy=R.y;for(let L=0;L0&&Math.abs(D-v)<=Rv&&Math.abs(N-B)<=Rv||(v=D,B=N,w===m||w===_||w===y))continue;let z=0;for(let $=0,lt=this._hashKey(D,N);$=(d=(o+u)/2))?o=d:u=d,(y=r>=(f=(l+h)/2))?l=f:h=f,i=a,!(a=a[b=y<<1|_]))return i[b]=s,t;if(p=+t._x.call(null,a.data),m=+t._y.call(null,a.data),e===p&&r===m)return s.next=a,i?i[b]=s:t._root=s,t;do i=i?i[b]=new Array(4):t._root=new Array(4),(_=e>=(d=(o+u)/2))?o=d:u=d,(y=r>=(f=(l+h)/2))?l=f:h=f;while((b=y<<1|_)===(x=(m>=f)<<1|p>=d));return i[x]=a,i[b]=s,t}function kP(t){var e,r,n=t.length,i,a,s=new Array(n),o=new Array(n),l=1/0,u=1/0,h=-1/0,d=-1/0;for(r=0;r=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function dh(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}function Eo(t){return t=dh(Math.abs(t)),t?t[1]:NaN}function eq(t,e){return function(r,n){for(var i=r.length,a=[],s=0,o=t[0],l=0;i>0&&o>0&&(l+o+1>n&&(o=Math.max(1,n-l)),a.push(r.substring(i-=o,i+o)),!((l+=o+1)>n));)o=t[s=(s+1)%t.length];return a.reverse().join(e)}}function rq(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var nq=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Co(t){if(!(e=nq.exec(t)))throw new Error("invalid format: "+t);var e;return new ph({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Co.prototype=ph.prototype;function ph(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}ph.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function iq(t){t:for(var e=t.length,r=1,n=-1,i;rnr&&(nr=t)):t>Ss?Cn(tr,t)>Cn(tr,nr)&&(nr=t):Cn(t,nr)>Cn(tr,nr)&&(tr=t)}else Ba.push(Qi=[tr=t,nr=t]);e 0;){if(u=oo(s,o,r),u===l)return n[i]=s,n[a]=o,e(n);if(u>0)s=Math.floor(s/u)*u,o=Math.ceil(o/u)*u;else if(u<0)s=Math.ceil(s*u)/u,o=Math.floor(o*u)/u;else break;l=u}return t},t}function sp(){var t=ap();return t.copy=function(){return fc(t,sp())},On.apply(t,arguments),Oa(t)}function Ux(t){var e;function r(n){return n==null||isNaN(n=+n)?e:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(t=Array.from(n,af),r):t.slice()},r.unknown=function(n){return arguments.length?(e=n,r):e},r.copy=function(){return Ux(t).unknown(e)},t=arguments.length?Array.from(t,af):[0,1],Oa(r)}function Wx(t,e){t=t.slice();var r=0,n=t.length-1,i=t[r],a=t[n],s;return aMath.pow(t,e)}function Xz(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function jx(t){return(e,r)=>-t(-e,r)}function op(t){const e=t(Hx,Gx),r=e.domain;let n=10,i,a;function s(){return i=Xz(n),a=$z(n),r()[0]<0?(i=jx(i),a=jx(a),t(Hz,Gz)):t(Hx,Gx),e}return e.base=function(o){return arguments.length?(n=+o,s()):n},e.domain=function(o){return arguments.length?(r(o),s()):r()},e.ticks=o=>{const l=r();let u=l[0],h=l[l.length-1];const d=h0){for(;f<=p;++f)for(m=1;m53)return null;"w"in U||(U.w=1),"Z"in U?(j=Ep(mc(U.y,0,1)),P=j.getUTCDay(),j=P>4||P===0?yc.ceil(j):yc(j),j=gc.offset(j,(U.V-1)*7),U.y=j.getUTCFullYear(),U.m=j.getUTCMonth(),U.d=j.getUTCDate()+(U.w+6)%7):(j=Tp(mc(U.y,0,1)),P=j.getDay(),j=P>4||P===0?pc.ceil(j):pc(j),j=dc.offset(j,(U.V-1)*7),U.y=j.getFullYear(),U.m=j.getMonth(),U.d=j.getDate()+(U.w+6)%7)}else("W"in U||"U"in U)&&("w"in U||(U.w="u"in U?U.u%7:"W"in U?1:0),P="Z"in U?Ep(mc(U.y,0,1)).getUTCDay():Tp(mc(U.y,0,1)).getDay(),U.m=0,U.d="W"in U?(U.w+6)%7+U.W*7-(P+5)%7:U.w+U.U*7-(P+6)%7);return"Z"in U?(U.H+=U.Z/100|0,U.M+=U.Z%100,Ep(U)):Tp(U)}}function R(V,Q,q,U){for(var F=0,j=Q.length,P=q.length,et,at;F=0;)r[e]=e;return r}function lH(t,e){return t[e]}function cH(t){const e=[];return e.key=t,e}function uH(){var t=xe([]),e=Vo,r=qo,n=lH;function i(a){var s=Array.from(t.apply(this,arguments),cH),o,l=s.length,u=-1,h;for(const d of a)for(o=0,++u;o
/gi,rG=t=>If.test(t),nG=t=>t.split(If),iG=t=>t.replace(/#br#/g,"
"),zk=t=>t.replace(If,"#br#"),aG=t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},Mr=t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),ja=function(t){let e=t;return t.indexOf("~")!==-1?(e=e.replace(/~([^~].*)/,"<$1"),e=e.replace(/~([^~]*)$/,">$1"),ja(e)):e},pe={getRows:tG,sanitizeText:ai,sanitizeTextOrArray:eG,hasBreaks:rG,splitBreaks:nG,lineBreakRegex:If,removeScript:qk,getUrl:aG,evaluate:Mr},Nf={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},n)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;const i=r<.5?r*(1+e):r+e-r*e,a=2*r-i;switch(n){case"r":return Nf.hue2rgb(a,i,t+1/3)*255;case"g":return Nf.hue2rgb(a,i,t)*255;case"b":return Nf.hue2rgb(a,i,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;const i=Math.max(t,e,r),a=Math.min(t,e,r),s=(i+a)/2;if(n==="l")return s*100;if(i===a)return 0;const o=i-a,l=s>.5?o/(2-i-a):o/(i+a);if(n==="s")return l*100;switch(i){case t:return((e-r)/o+(e=1&&(o={x:d.x,y:d.y}),p>0&&p<1&&(o={x:(1-p)*i.x+p*d.x,y:(1-p)*i.y+p*d.y})}}i=d});const l=10+t*.5,u=Math.atan2(n[0].y-o.y,n[0].x-o.x),h={x:0,y:0};return h.x=Math.sin(u)*l+(n[0].x+o.x)/2,h.y=-Math.cos(u)*l+(n[0].y+o.y)/2,e==="start_left"&&(h.x=Math.sin(u+Math.PI)*l+(n[0].x+o.x)/2,h.y=-Math.cos(u+Math.PI)*l+(n[0].y+o.y)/2),e==="end_right"&&(h.x=Math.sin(u-Math.PI)*l+(n[0].x+o.x)/2-5,h.y=-Math.cos(u-Math.PI)*l+(n[0].y+o.y)/2-5),e==="end_left"&&(h.x=Math.sin(u)*l+(n[0].x+o.x)/2-5,h.y=-Math.cos(u)*l+(n[0].y+o.y)/2-5),h},Ka=t=>{let e="",r="";for(let n=0;n
"},r),pe.lineBreakRegex.test(t)))return t;const n=t.split(" "),i=[];let a="";return n.forEach((s,o)=>{const l=Bi(`${s} `,r),u=Bi(a,r);if(l>e){const{hyphenatedStrings:f,remainingWord:p}=lX(s,e,"-",r);i.push(a,...f),a=p}else u+l>=e?(i.push(a),a=s):a=[a,s].filter(Boolean).join(" ");o+1===n.length&&i.push(a)}),i.filter(s=>s!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),lX=Gf((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const i=t.split(""),a=[];let s="";return i.forEach((o,l)=>{const u=`${s}${o}`;if(Bi(u,n)>=e){const d=l+1,f=i.length===d,p=`${u}${r}`;a.push(f?u:p),s=""}else s=u}),{hyphenatedStrings:a,remainingWord:s}},(t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`),eg=function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),rg(t,e).height},Bi=function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),rg(t,e).width},rg=Gf(function(t,e){e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e);const{fontSize:r,fontFamily:n,fontWeight:i}=e;if(!t)return{width:0,height:0};const a=["sans-serif",n],s=t.split(pe.lineBreakRegex),o=[],l=St("body");if(!l.remove)return{width:0,height:0,lineHeight:0};const u=l.append("svg");for(const d of a){let f=0;const p={width:0,height:0,lineHeight:0};for(const m of s){const _=sX();_.text=m;const y=oX(u,_).style("font-size",r).style("font-weight",i).style("font-family",d),b=(y._groups||y)[0][0].getBBox();p.width=Math.round(Math.max(p.width,b.width)),f=Math.round(b.height),p.height+=f,p.lineHeight=Math.round(Math.max(p.lineHeight,f))}o.push(p)}u.remove();const h=isNaN(o[1].height)||isNaN(o[1].width)||isNaN(o[1].lineHeight)||o[0].height>o[1].height&&o[0].width>o[1].width&&o[0].lineHeight>o[1].lineHeight?0:1;return o[h]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),cX=class{constructor(e,r){this.deterministic=e,this.seed=r,this.count=r?r.length:0}next(){return this.deterministic?this.count++:Date.now()}};let jf;const uX=function(t){return jf=jf||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),jf.innerHTML=t,unescape(jf.textContent)},Vs=t=>{if(H.debug("directiveSanitizer called with",t),typeof t=="object"&&(t.length?t.forEach(e=>Vs(e)):Object.keys(t).forEach(e=>{H.debug("Checking key",e),e.indexOf("__")===0&&(H.debug("sanitize deleting __ option",e),delete t[e]),e.indexOf("proto")>=0&&(H.debug("sanitize deleting proto option",e),delete t[e]),e.indexOf("constr")>=0&&(H.debug("sanitize deleting constr option",e),delete t[e]),e.indexOf("themeCSS")>=0&&(H.debug("sanitizing themeCss option"),t[e]=$f(t[e])),e.indexOf("fontFamily")>=0&&(H.debug("sanitizing fontFamily option"),t[e]=$f(t[e])),e.indexOf("altFontFamily")>=0&&(H.debug("sanitizing altFontFamily option"),t[e]=$f(t[e])),vG.indexOf(e)<0?(H.debug("sanitize deleting option",e),delete t[e]):typeof t[e]=="object"&&(H.debug("sanitize deleting object",e),Vs(t[e]))})),t.themeVariables){const e=Object.keys(t.themeVariables);for(let r=0;r
/gi):Array.isArray(t)?r=t:r=[];for(let n=0;nr}return Zb=t,Zb}var Qb,TS;function zJ(){if(TS)return Qb;TS=1;var t=Kb(),e=VJ(),r=Hs();function n(i){return i&&i.length?t(i,r,e):void 0}return Qb=n,Qb}var Jb,ES;function CS(){if(ES)return Jb;ES=1;var t=x1(),e=Wo;function r(n,i,a){(a!==void 0&&!e(n[i],a)||a===void 0&&!(i in n))&&t(n,i,a)}return Jb=r,Jb}var t3,SS;function AS(){if(SS)return t3;SS=1;var t=Ps,e=M1(),r=Fi(),n="[object Object]",i=Function.prototype,a=Object.prototype,s=i.toString,o=a.hasOwnProperty,l=s.call(Object);function u(h){if(!r(h)||t(h)!=n)return!1;var d=e(h);if(d===null)return!0;var f=o.call(d,"constructor")&&d.constructor;return typeof f=="function"&&f instanceof f&&s.call(f)==l}return t3=u,t3}var e3,MS;function LS(){if(MS)return e3;MS=1;function t(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}return e3=t,e3}var r3,RS;function YJ(){if(RS)return r3;RS=1;var t=Hc(),e=Ws();function r(n){return t(n,e(n))}return r3=r,r3}var n3,IS;function UJ(){if(IS)return n3;IS=1;var t=CS(),e=Z9(),r=LT(),n=J9(),i=DT(),a=Gc(),s=gr(),o=FC(),l=tl(),u=Yo,h=Vn,d=AS(),f=jc(),p=LS(),m=YJ();function _(y,b,x,k,T,C,M){var S=p(y,x),R=p(b,x),A=M.get(R);if(A){t(y,x,A);return}var L=C?C(S,R,x+"",y,b,M):void 0,v=L===void 0;if(v){var B=s(R),w=!B&&l(R),D=!B&&!w&&f(R);L=R,B||w||D?s(S)?L=S:o(S)?L=n(S):w?(v=!1,L=e(R,!0)):D?(v=!1,L=r(R,!0)):L=[]:d(R)||a(R)?(L=S,a(S)?L=m(S):(!h(S)||u(S))&&(L=i(R))):v=!1}v&&(M.set(R,L),T(L,R,k,C,M),M.delete(R)),t(y,x,L)}return n3=_,n3}var i3,NS;function WJ(){if(NS)return i3;NS=1;var t=v1(),e=CS(),r=Zy(),n=UJ(),i=Vn,a=Ws(),s=LS();function o(l,u,h,d,f){l!==u&&r(u,function(p,m){if(f||(f=new t),i(p))n(l,u,m,h,o,d,f);else{var _=d?d(s(l,m),p,m+"",l,u,f):void 0;_===void 0&&(_=p),e(l,m,_)}},a)}return i3=o,i3}var a3,BS;function HJ(){if(BS)return a3;BS=1;var t=B1(),e=q1();function r(n){return t(function(i,a){var s=-1,o=a.length,l=o>1?a[o-1]:void 0,u=o>2?a[2]:void 0;for(l=n.length>3&&typeof l=="function"?(o--,l):void 0,u&&e(a[0],a[1],u)&&(l=o<3?void 0:l,o=1),i=Object(i);++s