PageSourceSearch

https://rohitk06.in/_astro/sankeyDiagram-TZEHDZUN.BgBXBYVr.js

js rohitk06.in collected 2026-09-25 21:09:47 UTC 22,112 bytes, 1 lines download raw bytes

1import{_ as g,q as mt,t as kt,s as _t,g as xt,b as vt,a as bt,c as ot,A as wt,d as G,ac as St,z as Lt,k as Et}from"./mermaid.core.WGjpPNMl.js";import"./transform.zNxubOlu.js";import{o as At}from"./ordinal.BYWQX77i.js";import"./preload-helper.BlTxHScW.js";import"./init.Gi6I4Gst.js";function Tt(t){for(var n=t.length/6|0,e=new Array(n),i=0;i<n;)e[i]="#"+t.slice(6*i,6*++i);return e}const Mt=Tt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function at(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e<n||void 0===e&&n>=n)&&(e=n);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 dt(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e>n||void 0===e&&n>=n)&&(e=n);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 J(t,n){let e=0;if(void 0===n)for(let n of t)(n=+n)&&(e+=n);else{let i=-1;for(let s of t)(s=+n(s,++i,t))&&(e+=s)}return e}function Nt(t){return t.target.depth}function It(t){return t.depth}function Pt(t,n){return n-1-t.height}function gt(t,n){return t.sourceLinks.length?t.depth:n-1}function Ct(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?dt(t.sourceLinks,Nt)-1:0}function Y(t){return function(){return t}}function lt(t,n){return q(t.source,n.source)||t.index-n.index}function ct(t,n){return q(t.target,n.target)||t.index-n.index}function q(t,n){return t.y0-n.y0}function tt(t){return t.value}function Ot(t){return t.index}function zt(t){return t.nodes}function Dt(t){return t.links}function ut(t,n){const e=t.get(n);if(!e)throw new Error("missing: "+n);return e}function ht({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const e of n.sourceLinks)e.y0=t+e.width/2,t+=e.width;for(const t of n.targetLinks)t.y1=e+t.width/2,e+=t.width}}function $t(){let t,n,e,i=0,s=0,r=1,o=1,a=24,c=8,l=Ot,h=gt,u=zt,f=Dt,y=6;function g(){const g={nodes:u.apply(null,arguments),links:f.apply(null,arguments)};return function({nodes:t,links:n}){for(const[n,e]of t.entries())e.index=n,e.sourceLinks=[],e.targetLinks=[];const i=new Map(t.map(((n,e)=>[l(n,e,t),n])));for(const[t,e]of n.entries()){e.index=t;let{source:n,target:s}=e;"object"!=typeof n&&(n=e.source=ut(i,n)),"object"!=typeof s&&(s=e.target=ut(i,s)),n.sourceLinks.push(e),s.targetLinks.push(e)}if(null!=e)for(const{sourceLinks:n,targetLinks:i}of t)n.sort(e),i.sort(e)}(g),function({nodes:t}){for(const n of t)n.value=void 0===n.fixedValue?Math.max(J(n.sourceLinks,tt),J(n.targetLinks,tt)):n.fixedValue}(g),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,s=0;for(;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}}(g),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,s=0;for(;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}}(g),function(e){const l=function({nodes:t}){const e=at(t,(t=>t.depth))+1,s=(r-i-a)/(e-1),o=new Array(e);for(const n of t){const t=Math.max(0,Math.min(e-1,Math.floor(h.call(null,n,e))));n.layer=t,n.x0=i+t*s,n.x1=n.x0+a,o[t]?o[t].push(n):o[t]=[n]}if(n)for(const t of o)t.sort(n);return o}(e);t=Math.min(c,(o-s)/(at(l,(t=>t.length))-1)),function(n){const e=dt(n,(n=>(o-s-(n.length-1)*t)/J(n,tt)));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=(o-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)}v(i)}}(l);for(let t=0;t<y;++t){const n=Math.pow(.99,t),e=Math.max(1-n,(t+1)/y);d(l,n,e),p(l,n,e)}}(g),ht(g),g}function p(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:s}of t.targetLinks){let r=s*(t.layer-e.layer);n+=b(e,t)*r,i+=r}if(!(i>0))continue;let s=(n/i-t.y0)*e;t.y0+=s,t.y1+=s,k(t)}void 0===n&&r.sort(q),_(r,i)}}function d(t,e,i){for(let s=t.length-2;s>=0;--s){const r=t[s];for(const t of r){let n=0,i=0;for(const{target:e,value:s}of t.sourceLinks){let r=s*(e.layer-t.layer);n+=w(t,e)*r,i+=r}if(!(i>0))continue;let s=(n/i-t.y0)*e;t.y0+=s,t.y1+=s,k(t)}void 0===n&&r.sort(q),_(r,i)}}function _(n,e){const i=n.length>>1,r=n[i];x(n,r.y0-t,i-1,e),m(n,r.y1+t,i+1,e),x(n,o,n.length-1,e),m(n,s,0,e)}function m(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 x(n,e,i,s){for(;i>=0;--i){const r=n[i],o=(r.y1-e)*s;o>
11e-6&&(r.y0-=o,r.y1-=o),e=r.y0-t}}function k({sourceLinks:t,targetLinks:n}){if(void 0===e){for(const{source:{sourceLinks:t}}of n)t.sort(ct);for(const{target:{targetLinks:n}}of t)n.sort(lt)}}function v(t){if(void 0===e)for(const{sourceLinks:n,targetLinks:e}of t)n.sort(ct),e.sort(lt)}function b(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 w(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 g.update=function(t){return ht(t),t},g.nodeId=function(t){return arguments.length?(l="function"==typeof t?t:Y(t),g):l},g.nodeAlign=function(t){return arguments.length?(h="function"==typeof t?t:Y(t),g):h},g.nodeSort=function(t){return arguments.length?(n=t,g):n},g.nodeWidth=function(t){return arguments.length?(a=+t,g):a},g.nodePadding=function(n){return arguments.length?(c=t=+n,g):c},g.nodes=function(t){return arguments.length?(u="function"==typeof t?t:Y(t),g):u},g.links=function(t){return arguments.length?(f="function"==typeof t?t:Y(t),g):f},g.linkSort=function(t){return arguments.length?(e=t,g):e},g.size=function(t){return arguments.length?(i=s=0,r=+t[0],o=+t[1],g):[r-i,o-s]},g.extent=function(t){return arguments.length?(i=+t[0][0],r=+t[1][0],s=+t[0][1],o=+t[1][1],g):[[i,s],[r,o]]},g.iterations=function(t){return arguments.length?(y=+t,g):y},g}var et=Math.PI,nt=2*et,F=1e-6,jt=nt-F;function it(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function pt(){return new it}function ft(t){return function(){return t}}function Bt(t){return t[0]}function Rt(t){return t[1]}it.prototype=pt.prototype={constructor:it,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,a=e-t,c=i-n,l=r-t,h=o-n,u=l*l+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>F)if(Math.abs(h*a-c*l)>F&&s){var f=e-r,y=i-o,g=a*a+c*c,p=f*f+y*y,d=Math.sqrt(g),_=Math.sqrt(u),m=s*Math.tan((et-Math.acos((g+u-p)/(2*d*_)))/2),x=m/_,k=m/d;Math.abs(x-1)>F&&(this._+="L"+(t+x*l)+","+(n+x*h)),this._+="A"+s+","+s+",0,0,"+ +(h*f>l*y)+","+(this._x1=t+k*a)+","+(this._y1=n+k*c)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,e,i,s,r){t=+t,n=+n,r=!!r;var o=(e=+e)*Math.cos(i),a=e*Math.sin(i),c=t+o,l=n+a,h=1^r,u=r?i-s:s-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+c+","+l:(Math.abs(this._x1-c)>F||Math.abs(this._y1-l)>F)&&(this._+="L"+c+","+l),e&&(u<0&&(u=u%nt+nt),u>jt?this._+="A"+e+","+e+",0,1,"+h+","+(t-o)+","+(n-a)+"A"+e+","+e+",0,1,"+h+","+(this._x1=c)+","+(this._y1=l):u>F&&(this._+="A"+e+","+e+",0,"+ +(u>=et)+","+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 Ft=Array.prototype.slice;function Vt(t){return t.source}function Ut(t){return t.target}function Wt(t){var n=Vt,e=Ut,i=Bt,s=Rt,r=null;function o(){var o,a=Ft.call(arguments),c=n.apply(this,a),l=e.apply(this,a);if(r||(r=o=pt()),t(r,+i.apply(this,(a[0]=c,a)),+s.apply(this,a),+i.apply(this,(a[0]=l,a)),+s.apply(this,a)),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:ft(+t),o):i},o.y=function(t){return arguments.length?(s="function"==typeof t?t:ft(+t),o):s},o.context=function(t){return arguments.length?(r=t??null,o):r},o}function Gt(t,n,e,i,s){t.moveTo(n,e),t.bezierCurveTo(n=(n+i)/2,e,n,s,i,s)}function Yt(){return Wt(Gt)}function qt(t){return[t.source.x1,t.y0]}function Ht(t){return[t.target.x0,t.y1]}function Xt(){return Yt().source(qt).target(Ht)}var st=function(){var t=g((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],i=[1,5,10,12],s={trace:g((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:g((function(t,n,e,i,s,r,o){var a=r.length-1;switch(s){case 7:const t=i.findOrCreateNode(r[a-4].trim().replaceAll('""','"')),n=i.findOrCreateNode(r[a-2].trim().replaceAll('""','"')),e=parseFloat(r[a].trim());i.addLink(t,n,e);break;
1case 8:case 9:case 11:this.$=r[a];break;case 10:this.$=r[a-1]}}),"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(i,[2,8]),t(i,[2,9]),{19:[1,16]},t(i,[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(i,[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:g((function(t,n){if(!n.recoverable){var e=new Error(t);throw e.hash=n,e}this.trace(t)}),"parseError"),parse:g((function(t){var n=this,e=[0],i=[],s=[null],r=[],o=this.table,a="",c=0,l=0,h=r.slice.call(arguments,1),u=Object.create(this.lexer),f={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(f.yy[y]=this.yy[y]);u.setInput(t,f.yy),f.yy.lexer=u,f.yy.parser=this,typeof u.yylloc>"u"&&(u.yylloc={});var p=u.yylloc;r.push(p);var d=u.options&&u.options.ranges;function _(){var t;return"number"!=typeof(t=i.pop()||u.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,g((function(t){e.length=e.length-2*t,s.length=s.length-t,r.length=r.length-t}),"popStack"),g(_,"lex");for(var m,x,k,v,b,w,S,E,L={};;){if(x=e[e.length-1],this.defaultActions[x]?k=this.defaultActions[x]:((null===m||typeof m>"u")&&(m=_()),k=o[x]&&o[x][m]),typeof k>"u"||!k.length||!k[0]){var A="";for(b in E=[],o[x])this.terminals_[b]&&b>2&&E.push("'"+this.terminals_[b]+"'");A=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(A,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:p,expected:E})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+m);switch(k[0]){case 1:e.push(m),s.push(u.yytext),r.push(u.yylloc),e.push(k[1]),m=null,l=u.yyleng,a=u.yytext,c=u.yylineno,p=u.yylloc;break;case 2:if(w=this.productions_[k[1]][1],L.$=s[s.length-w],L._$={first_line:r[r.length-(w||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(w||1)].first_column,last_column:r[r.length-1].last_column},d&&(L._$.range=[r[r.length-(w||1)].range[0],r[r.length-1].range[1]]),typeof(v=this.performAction.apply(L,[a,l,c,f.yy,k[1],s,r].concat(h)))<"u")return v;w&&(e=e.slice(0,-1*w*2),s=s.slice(0,-1*w),r=r.slice(0,-1*w)),e.push(this.productions_[k[1]][0]),s.push(L.$),r.push(L._$),S=o[e[e.length-2]][e[e.length-1]],e.push(S);break;case 3:return!0}}return!0}),"parse")},r={EOF:1,parseError:g((function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)}),"parseError"),setInput:g((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:g((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(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:g((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:g((function(){return this._more=!0,this}),"more"),reject:g((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:g((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:g((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:g((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:g((function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"}),"showPosition"),test_match:g((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))&&(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:g((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]]))&&(!n||e[0].length>n[0].length)){if(n=e,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,s[r])))return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?!1!==(t=this.test_match(n,s[i]))&&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:g((function(){return this.next()||this.lex()}),"lex"),begin:g((function(t){this.conditionStack.push(t)}),"begin"),popState:g((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:g((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:g((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:g((function(t){this.begin(t)}),"pushState"),stateStackSize:g((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:g((function(t,n,e,i){switch(e){case 0:case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}}),"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\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:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};function o(){this.yy={}}return s.lexer=r,g(o,"Parser"),o.prototype=s,s.Parser=o,new o}();st.parser=st;var H=st,Q=[],K=[],X=new Map,Qt=g((()=>{Q=[],K=[],X=new Map,Lt()}),"clear"),Kt=class{constructor(t,n,e=0){this.source=t,this.target=n,this.value=e}static{g(this,"SankeyLink")}},Zt=g(((t,n,e)=>{Q.push(new Kt(t,n,e))}),"addLink"),Jt=class{constructor(t){this.ID=t}static{g(this,"SankeyNode")}},te=g((t=>{t=Et.sanitizeText(t,ot());let n=X.get(t);return void 0===n&&(n=new Jt(t),X.set(t,n),K.push(n)),n}),"findOrCreateNode"),ee=g((()=>K),"getNodes"),ne=g((()=>Q),"getLinks"),ie=g((()=>({nodes:K.map((t=>({id:t.ID}))),links:Q.map((t=>({source:t.source.ID,target:t.target.ID,value:t.value})))})),"getGraph"),se={nodesMap:X,getConfig:g((()=>ot().sankey),"getConfig"),getNodes:ee,getLinks:ne,getGraph:ie,addLink:Zt,findOrCreateNode:te,getAccTitle:bt,setAccTitle:vt,getAccDescription:xt,setAccDescription:_t,getDiagramTitle:kt,
1setDiagramTitle:mt,clear:Qt},yt=class t{static{g(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+")"}},re={left:It,right:Pt,center:Ct,justify:gt},oe=g((function(t,n,e,i){const{securityLevel:s,sankey:r}=ot(),o=wt.sankey;let a;"sandbox"===s&&(a=G("#i"+n));const c=G("sandbox"===s?a.nodes()[0].contentDocument.body:"body"),l="sandbox"===s?c.select(`[id="${n}"]`):G(`[id="${n}"]`),h=r?.width??o.width,u=r?.height??o.width,f=r?.useMaxWidth??o.useMaxWidth,y=r?.nodeAlignment??o.nodeAlignment,p=r?.prefix??o.prefix,d=r?.suffix??o.suffix,_=r?.showValues??o.showValues,m=i.db.getGraph(),x=re[y];$t().nodeId((t=>t.id)).nodeWidth(10).nodePadding(10+(_?15:0)).nodeAlign(x).extent([[0,0],[h,u]])(m);const k=At(Mt);l.append("g").attr("class","nodes").selectAll(".node").data(m.nodes).join("g").attr("class","node").attr("id",(t=>(t.uid=yt.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=>k(t.id)));const v=g((({id:t,value:n})=>_?`${t}\n${p}${Math.round(100*n)/100}${d}`:t),"getText");l.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(m.nodes).join("text").attr("x",(t=>t.x0<h/2?t.x1+6:t.x0-6)).attr("y",(t=>(t.y1+t.y0)/2)).attr("dy",(_?"0":"0.35")+"em").attr("text-anchor",(t=>t.x0<h/2?"start":"end")).text(v);const b=l.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(m.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),w=r?.linkColor??"gradient";if("gradient"===w){const t=b.append("linearGradient").attr("id",(t=>(t.uid=yt.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=>k(t.source.id))),t.append("stop").attr("offset","100%").attr("stop-color",(t=>k(t.target.id)))}let S;switch(w){case"gradient":S=g((t=>t.uid),"coloring");break;case"source":S=g((t=>k(t.source.id)),"coloring");break;case"target":S=g((t=>k(t.target.id)),"coloring");break;default:S=w}b.append("path").attr("d",Xt()).attr("stroke",S).attr("stroke-width",(t=>Math.max(1,t.width))),St(void 0,l,0,f)}),"draw"),ae={draw:oe},le=g((t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,"\n").trim()),"prepareTextForParsing"),ce=g((t=>`.label {\n      font-family: ${t.fontFamily};\n    }`),"getStyles"),ue=ce,he=H.parse.bind(H);H.parse=t=>he(le(t));var me={styles:ue,parser:H,db:se,renderer:ae};export{me as diagram};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.