UNPKG

@nodefony/monitoring-bundle

Version:
1 lines 22.3 kB
"use strict";(self["webpackChunk_nodefony_monitoring_bundle"]=self["webpackChunk_nodefony_monitoring_bundle"]||[]).push([[4697],{34697:function(t,n,e){e.d(n,{diagram:function(){return at}});var i=e(10009),s=e(20007);function r(t,n){let e;if(void 0===n)for(const i of t)null!=i&&(e>i||void 0===e&&i>=i)&&(e=i);else{let i=-1;for(let s of t)null!=(s=n(s,++i,t))&&(e>s||void 0===e&&s>=s)&&(e=s)}return e}function o(t){return t.target.depth}function c(t){return t.depth}function l(t,n){return n-1-t.height}function a(t,n){return t.sourceLinks.length?t.depth:n-1}function h(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?r(t.sourceLinks,o)-1:0}function u(t,n){let e=0;if(void 0===n)for(let i of t)(i=+i)&&(e+=i);else{let i=-1;for(let s of t)(s=+n(s,++i,t))&&(e+=s)}return e}function f(t,n){let e;if(void 0===n)for(const i of t)null!=i&&(e<i||void 0===e&&i>=i)&&(e=i);else{let i=-1;for(let s of t)null!=(s=n(s,++i,t))&&(e<s||void 0===e&&s>=s)&&(e=s)}return e}function y(t){return function(){return t}}function d(t,n){return g(t.source,n.source)||t.index-n.index}function p(t,n){return g(t.target,n.target)||t.index-n.index}function g(t,n){return t.y0-n.y0}function _(t){return t.value}function k(t){return t.index}function x(t){return t.nodes}function m(t){return t.links}function v(t,n){const e=t.get(n);if(!e)throw new Error("missing: "+n);return e}function b({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const i of n.sourceLinks)i.y0=t+i.width/2,t+=i.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function w(){let t,n,e,i=0,s=0,o=1,c=1,l=24,h=8,w=k,L=a,S=x,E=m,A=6;function K(){const t={nodes:S.apply(null,arguments),links:E.apply(null,arguments)};return M(t),I(t),T(t),D(t),C(t),b(t),t}function M({nodes:t,links:n}){for(const[e,s]of t.entries())s.index=e,s.sourceLinks=[],s.targetLinks=[];const i=new Map(t.map(((n,e)=>[w(n,e,t),n])));for(const[e,s]of n.entries()){s.index=e;let{source:t,target:n}=s;"object"!==typeof t&&(t=s.source=v(i,t)),"object"!==typeof n&&(n=s.target=v(i,n)),t.sourceLinks.push(s),n.targetLinks.push(s)}if(null!=e)for(const{sourceLinks:s,targetLinks:r}of t)s.sort(e),r.sort(e)}function I({nodes:t}){for(const n of t)n.value=void 0===n.fixedValue?Math.max(u(n.sourceLinks,_),u(n.targetLinks,_)):n.fixedValue}function T({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,s=0;while(e.size){for(const t of e){t.depth=s;for(const{target:n}of t.sourceLinks)i.add(n)}if(++s>n)throw new Error("circular link");e=i,i=new Set}}function D({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,s=0;while(e.size){for(const t of e){t.height=s;for(const{source:n}of t.targetLinks)i.add(n)}if(++s>n)throw new Error("circular link");e=i,i=new Set}}function N({nodes:t}){const e=f(t,(t=>t.depth))+1,s=(o-i-l)/(e-1),r=new Array(e);for(const n of t){const t=Math.max(0,Math.min(e-1,Math.floor(L.call(null,n,e))));n.layer=t,n.x0=i+t*s,n.x1=n.x0+l,r[t]?r[t].push(n):r[t]=[n]}if(n)for(const i of r)i.sort(n);return r}function P(n){const e=r(n,(n=>(c-s-(n.length-1)*t)/u(n,_)));for(const i of n){let n=s;for(const s of i){s.y0=n,s.y1=n+s.value*e,n=s.y1+t;for(const t of s.sourceLinks)t.width=t.value*e}n=(c-n+t)/(i.length+1);for(let t=0;t<i.length;++t){const e=i[t];e.y0+=n*(t+1),e.y1+=n*(t+1)}W(i)}}function C(n){const e=N(n);t=Math.min(h,(c-s)/(f(e,(t=>t.length))-1)),P(e);for(let t=0;t<A;++t){const n=Math.pow(.99,t),i=Math.max(1-n,(t+1)/A);$(e,n,i),O(e,n,i)}}function O(t,e,i){for(let s=1,r=t.length;s<r;++s){const r=t[s];for(const t of r){let n=0,i=0;for(const{source:e,value:r}of t.targetLinks){let s=r*(t.layer-e.layer);n+=G(e,t)*s,i+=s}if(!(i>0))continue;let s=(n/i-t.y0)*e;t.y0+=s,t.y1+=s,F(t)}void 0===n&&r.sort(g),j(r,i)}}function $(t,e,i){for(let s=t.length,r=s-2;r>=0;--r){const s=t[r];for(const t of s){let n=0,i=0;for(const{target:e,value:r}of t.sourceLinks){let s=r*(e.layer-t.layer);n+=V(t,e)*s,i+=s}if(!(i>0))continue;let s=(n/i-t.y0)*e;t.y0+=s,t.y1+=s,F(t)}void 0===n&&s.sort(g),j(s,i)}}function j(n,e){const i=n.length>>1,r=n[i];U(n,r.y0-t,i-1,e),z(n,r.y1+t,i+1,e),U(n,c,n.length-1,e),z(n,s,0,e)}function z(n,e,i,s){for(;i<n.length;++i){const r=n[i],o=(e-r.y0)*s;o>1e-6&&(r.y0+=o,r.y1+=o),e=r.y1+t}}function U(n,e,i,s){for(;i>=0;--i){const r=n[i],o=(r.y1-e)*s;o>1e-6&&(r.y0-=o,r.y1-=o),e=r.y0-t}}function F({sourceLinks:t,targetLinks:n}){if(void 0===e){for(const{source:{sourceLinks:t}}of n)t.sort(p);for(const{target:{targetLinks:n}}of t)n.sort(d)}}function W(t){if(void 0===e)for(const{sourceLinks:n,targetLinks:e}of t)n.sort(p),e.sort(d)}function G(n,e){let i=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:s,width:r}of n.sourceLinks){if(s===e)break;i+=r+t}for(const{source:t,width:s}of e.targetLinks){if(t===n)break;i-=s}return i}function V(n,e){let i=e.y0-(e.targetLinks.length-1)*t/2;for(const{source:s,width:r}of e.targetLinks){if(s===n)break;i+=r+t}for(const{target:t,width:s}of n.sourceLinks){if(t===e)break;i-=s}return i}return K.update=function(t){return b(t),t},K.nodeId=function(t){return arguments.length?(w="function"===typeof t?t:y(t),K):w},K.nodeAlign=function(t){return arguments.length?(L="function"===typeof t?t:y(t),K):L},K.nodeSort=function(t){return arguments.length?(n=t,K):n},K.nodeWidth=function(t){return arguments.length?(l=+t,K):l},K.nodePadding=function(n){return arguments.length?(h=t=+n,K):h},K.nodes=function(t){return arguments.length?(S="function"===typeof t?t:y(t),K):S},K.links=function(t){return arguments.length?(E="function"===typeof t?t:y(t),K):E},K.linkSort=function(t){return arguments.length?(e=t,K):e},K.size=function(t){return arguments.length?(i=s=0,o=+t[0],c=+t[1],K):[o-i,c-s]},K.extent=function(t){return arguments.length?(i=+t[0][0],o=+t[1][0],s=+t[0][1],c=+t[1][1],K):[[i,s],[o,c]]},K.iterations=function(t){return arguments.length?(A=+t,K):A},K}var L=Math.PI,S=2*L,E=1e-6,A=S-E;function K(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function M(){return new K}K.prototype=M.prototype={constructor:K,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,s,r){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+s)+","+(this._y1=+r)},arcTo:function(t,n,e,i,s){t=+t,n=+n,e=+e,i=+i,s=+s;var r=this._x1,o=this._y1,c=e-t,l=i-n,a=r-t,h=o-n,u=a*a+h*h;if(s<0)throw new Error("negative radius: "+s);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(u>E)if(Math.abs(h*c-l*a)>E&&s){var f=e-r,y=i-o,d=c*c+l*l,p=f*f+y*y,g=Math.sqrt(d),_=Math.sqrt(u),k=s*Math.tan((L-Math.acos((d+u-p)/(2*g*_)))/2),x=k/_,m=k/g;Math.abs(x-1)>E&&(this._+="L"+(t+x*a)+","+(n+x*h)),this._+="A"+s+","+s+",0,0,"+ +(h*f>a*y)+","+(this._x1=t+m*c)+","+(this._y1=n+m*l)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,i,s,r){t=+t,n=+n,e=+e,r=!!r;var o=e*Math.cos(i),c=e*Math.sin(i),l=t+o,a=n+c,h=1^r,u=r?i-s:s-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+l+","+a:(Math.abs(this._x1-l)>E||Math.abs(this._y1-a)>E)&&(this._+="L"+l+","+a),e&&(u<0&&(u=u%S+S),u>A?this._+="A"+e+","+e+",0,1,"+h+","+(t-o)+","+(n-c)+"A"+e+","+e+",0,1,"+h+","+(this._x1=l)+","+(this._y1=a):u>E&&(this._+="A"+e+","+e+",0,"+ +(u>=L)+","+h+","+(this._x1=t+e*Math.cos(s))+","+(this._y1=n+e*Math.sin(s))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};var I=M,T=Array.prototype.slice;function D(t){return function(){return t}}function N(t){return t[0]}function P(t){return t[1]}function C(t){return t.source}function O(t){return t.target}function $(t){var n=C,e=O,i=N,s=P,r=null;function o(){var o,c=T.call(arguments),l=n.apply(this,c),a=e.apply(this,c);if(r||(r=o=I()),t(r,+i.apply(this,(c[0]=l,c)),+s.apply(this,c),+i.apply(this,(c[0]=a,c)),+s.apply(this,c)),o)return r=null,o+""||null}return o.source=function(t){return arguments.length?(n=t,o):n},o.target=function(t){return arguments.length?(e=t,o):e},o.x=function(t){return arguments.length?(i="function"===typeof t?t:D(+t),o):i},o.y=function(t){return arguments.length?(s="function"===typeof t?t:D(+t),o):s},o.context=function(t){return arguments.length?(r=null==t?null:t,o):r},o}function j(t,n,e,i,s){t.moveTo(n,e),t.bezierCurveTo(n=(n+i)/2,e,n,s,i,s)}function z(){return $(j)}function U(t){return[t.source.x1,t.y0]}function F(t){return[t.target.x0,t.y1]}function W(){return z().source(U).target(F)}var G=function(){var t=(0,i.K2)((function(t,n,e,i){for(e=e||{},i=t.length;i--;e[t[i]]=n);return e}),"o"),n=[1,9],e=[1,10],s=[1,5,10,12],r={trace:(0,i.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:(0,i.K2)((function(t,n,e,i,s,r,o){var c=r.length-1;switch(s){case 7:const t=i.findOrCreateNode(r[c-4].trim().replaceAll('""','"')),n=i.findOrCreateNode(r[c-2].trim().replaceAll('""','"')),e=parseFloat(r[c].trim());i.addLink(t,n,e);break;case 8:case 9:case 11:this.$=r[c];break;case 10:this.$=r[c-1];break}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:e},{1:[2,6],7:11,10:[1,12]},t(e,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(s,[2,8]),t(s,[2,9]),{19:[1,16]},t(s,[2,11]),{1:[2,1]},{1:[2,5]},t(e,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:e},{15:18,16:7,17:8,18:n,20:e},{18:[1,19]},t(e,[2,3]),{12:[1,20]},t(s,[2,10]),{15:21,16:7,17:8,18:n,20:e},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:(0,i.K2)((function(t,n){if(!n.recoverable){var e=new Error(t);throw e.hash=n,e}this.trace(t)}),"parseError"),parse:(0,i.K2)((function(t){var n=this,e=[0],s=[],r=[null],o=[],c=this.table,l="",a=0,h=0,u=0,f=2,y=1,d=o.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var k=p.yylloc;o.push(k);var x=p.options&&p.options.ranges;function m(t){e.length=e.length-2*t,r.length=r.length-t,o.length=o.length-t}function v(){var t;return t=s.pop()||p.lex()||y,"number"!==typeof t&&(t instanceof Array&&(s=t,t=s.pop()),t=n.symbols_[t]||t),t}"function"===typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)(m,"popStack"),(0,i.K2)(v,"lex");var b,w,L,S,E,A,K,M,I,T={};while(1){if(L=e[e.length-1],this.defaultActions[L]?S=this.defaultActions[L]:(null!==b&&"undefined"!=typeof b||(b=v()),S=c[L]&&c[L][b]),"undefined"===typeof S||!S.length||!S[0]){var D="";for(A in I=[],c[L])this.terminals_[A]&&A>f&&I.push("'"+this.terminals_[A]+"'");D=p.showPosition?"Parse error on line "+(a+1)+":\n"+p.showPosition()+"\nExpecting "+I.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(a+1)+": Unexpected "+(b==y?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(D,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:k,expected:I})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+L+", token: "+b);switch(S[0]){case 1:e.push(b),r.push(p.yytext),o.push(p.yylloc),e.push(S[1]),b=null,w?(b=w,w=null):(h=p.yyleng,l=p.yytext,a=p.yylineno,k=p.yylloc,u>0&&u--);break;case 2:if(K=this.productions_[S[1]][1],T.$=r[r.length-K],T._$={first_line:o[o.length-(K||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(K||1)].first_column,last_column:o[o.length-1].last_column},x&&(T._$.range=[o[o.length-(K||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(T,[l,h,a,g.yy,S[1],r,o].concat(d)),"undefined"!==typeof E)return E;K&&(e=e.slice(0,-1*K*2),r=r.slice(0,-1*K),o=o.slice(0,-1*K)),e.push(this.productions_[S[1]][0]),r.push(T.$),o.push(T._$),M=c[e[e.length-2]][e[e.length-1]],e.push(M);break;case 3:return!0}}return!0}),"parse")},o=function(){var t={EOF:1,parseError:(0,i.K2)((function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)}),"parseError"),setInput:(0,i.K2)((function(t,n){return this.yy=n||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,i.K2)((function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var n=t.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,i.K2)((function(t){var n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===i.length?this.yylloc.first_column:0)+i[i.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,i.K2)((function(){return this._more=!0,this}),"more"),reject:(0,i.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,i.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,i.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,i.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,i.K2)((function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"}),"showPosition"),test_match:(0,i.K2)((function(t,n){var e,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),i=t[0].match(/(?:\r\n?|\n).*/g),i&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1}),"test_match"),next:(0,i.K2)((function(){if(this.done)return this.EOF;var t,n,e,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if(e=this._input.match(this.rules[s[r]]),e&&(!n||e[0].length>n[0].length)){if(n=e,i=r,this.options.backtrack_lexer){if(t=this.test_match(e,s[r]),!1!==t)return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?(t=this.test_match(n,s[i]),!1!==t&&t):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,i.K2)((function(){var t=this.next();return t||this.lex()}),"lex"),begin:(0,i.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,i.K2)((function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,i.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions["INITIAL"].rules}),"_currentRules"),topState:(0,i.K2)((function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,i.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,i.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,i.K2)((function(t,n,e,i){switch(e){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}}),"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return t}();function c(){this.yy={}}return r.lexer=o,(0,i.K2)(c,"Parser"),c.prototype=r,r.Parser=c,new c}();G.parser=G;var V=G,X=[],Y=[],q=new Map,Q=(0,i.K2)((()=>{X=[],Y=[],q=new Map,(0,i.IU)()}),"clear"),R=class{constructor(t,n,e=0){this.source=t,this.target=n,this.value=e}static{(0,i.K2)(this,"SankeyLink")}},B=(0,i.K2)(((t,n,e)=>{X.push(new R(t,n,e))}),"addLink"),Z=class{constructor(t){this.ID=t}static{(0,i.K2)(this,"SankeyNode")}},H=(0,i.K2)((t=>{t=i.Y2.sanitizeText(t,(0,i.D7)());let n=q.get(t);return void 0===n&&(n=new Z(t),q.set(t,n),Y.push(n)),n}),"findOrCreateNode"),J=(0,i.K2)((()=>Y),"getNodes"),tt=(0,i.K2)((()=>X),"getLinks"),nt=(0,i.K2)((()=>({nodes:Y.map((t=>({id:t.ID}))),links:X.map((t=>({source:t.source.ID,target:t.target.ID,value:t.value})))})),"getGraph"),et={nodesMap:q,getConfig:(0,i.K2)((()=>(0,i.D7)().sankey),"getConfig"),getNodes:J,getLinks:tt,getGraph:nt,addLink:B,findOrCreateNode:H,getAccTitle:i.iN,setAccTitle:i.SV,getAccDescription:i.m7,setAccDescription:i.EI,getDiagramTitle:i.ab,setDiagramTitle:i.ke,clear:Q},it=class t{static{(0,i.K2)(this,"Uid")}static{this.count=0}static next(n){return new t(n+ ++t.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}},st={left:c,right:l,center:h,justify:a},rt=(0,i.K2)((function(t,n,e,r){const{securityLevel:o,sankey:c}=(0,i.D7)(),l=i.ME.sankey;let a;"sandbox"===o&&(a=(0,s.Ltv)("#i"+n));const h="sandbox"===o?(0,s.Ltv)(a.nodes()[0].contentDocument.body):(0,s.Ltv)("body"),u="sandbox"===o?h.select(`[id="${n}"]`):(0,s.Ltv)(`[id="${n}"]`),f=c?.width??l.width,y=c?.height??l.width,d=c?.useMaxWidth??l.useMaxWidth,p=c?.nodeAlignment??l.nodeAlignment,g=c?.prefix??l.prefix,_=c?.suffix??l.suffix,k=c?.showValues??l.showValues,x=r.db.getGraph(),m=st[p],v=10,b=w().nodeId((t=>t.id)).nodeWidth(v).nodePadding(10+(k?15:0)).nodeAlign(m).extent([[0,0],[f,y]]);b(x);const L=(0,s.UMr)(s.zt);u.append("g").attr("class","nodes").selectAll(".node").data(x.nodes).join("g").attr("class","node").attr("id",(t=>(t.uid=it.next("node-")).id)).attr("transform",(function(t){return"translate("+t.x0+","+t.y0+")"})).attr("x",(t=>t.x0)).attr("y",(t=>t.y0)).append("rect").attr("height",(t=>t.y1-t.y0)).attr("width",(t=>t.x1-t.x0)).attr("fill",(t=>L(t.id)));const S=(0,i.K2)((({id:t,value:n})=>k?`${t}\n${g}${Math.round(100*n)/100}${_}`:t),"getText");u.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(x.nodes).join("text").attr("x",(t=>t.x0<f/2?t.x1+6:t.x0-6)).attr("y",(t=>(t.y1+t.y0)/2)).attr("dy",(k?"0":"0.35")+"em").attr("text-anchor",(t=>t.x0<f/2?"start":"end")).text(S);const E=u.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(x.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),A=c?.linkColor??"gradient";if("gradient"===A){const t=E.append("linearGradient").attr("id",(t=>(t.uid=it.next("linearGradient-")).id)).attr("gradientUnits","userSpaceOnUse").attr("x1",(t=>t.source.x1)).attr("x2",(t=>t.target.x0));t.append("stop").attr("offset","0%").attr("stop-color",(t=>L(t.source.id))),t.append("stop").attr("offset","100%").attr("stop-color",(t=>L(t.target.id)))}let K;switch(A){case"gradient":K=(0,i.K2)((t=>t.uid),"coloring");break;case"source":K=(0,i.K2)((t=>L(t.source.id)),"coloring");break;case"target":K=(0,i.K2)((t=>L(t.target.id)),"coloring");break;default:K=A}E.append("path").attr("d",W()).attr("stroke",K).attr("stroke-width",(t=>Math.max(1,t.width))),(0,i.ot)(void 0,u,0,d)}),"draw"),ot={draw:rt},ct=(0,i.K2)((t=>{const n=t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,"\n").trim();return n}),"prepareTextForParsing"),lt=V.parse.bind(V);V.parse=t=>lt(ct(t));var at={parser:V,db:et,renderer:ot}}}]);