mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-10 14:52:29 +02:00
4 lines
No EOL
22 KiB
JavaScript
4 lines
No EOL
22 KiB
JavaScript
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["18104"],{41322:function(t,e,n){n.d(e,{Z:()=>i});function i(t,e){let n;if(void 0===e)for(let e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let i=-1;for(let r of t)null!=(r=e(r,++i,t))&&(n<r||void 0===n&&r>=r)&&(n=r)}return n}},45354:function(t,e,n){n.d(e,{Z:()=>i});function i(t,e){let n;if(void 0===e)for(let e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let i=-1;for(let r of t)null!=(r=e(r,++i,t))&&(n>r||void 0===n&&r>=r)&&(n=r)}return n}},52460:function(t,e,n){n.d(e,{Z:()=>i});function i(t,e){let n=0;if(void 0===e)for(let e of t)(e*=1)&&(n+=e);else{let i=-1;for(let r of t)(r=+e(r,++i,t))&&(n+=r)}return n}},46177:function(t,e,n){n.d(e,{Z:()=>h});var i=Math.PI,r=2*i,s=r-1e-6;function o(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function l(){return new o}o.prototype=l.prototype={constructor:o,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,i){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(t,e,n,i,r,s){this._+="C"+ +t+","+ +e+","+ +n+","+ +i+","+(this._x1=+r)+","+(this._y1=+s)},arcTo:function(t,e,n,r,s){t*=1,e*=1,n*=1,r*=1,s*=1;var o=this._x1,l=this._y1,h=n-t,a=r-e,c=o-t,u=l-e,f=c*c+u*u;if(s<0)throw Error("negative radius: "+s);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>1e-6)if(Math.abs(u*h-a*c)>1e-6&&s){var y=n-o,p=r-l,d=h*h+a*a,g=Math.sqrt(d),_=Math.sqrt(f),x=s*Math.tan((i-Math.acos((d+f-(y*y+p*p))/(2*g*_)))/2),m=x/_,k=x/g;Math.abs(m-1)>1e-6&&(this._+="L"+(t+m*c)+","+(e+m*u)),this._+="A"+s+","+s+",0,0,"+ +(u*y>c*p)+","+(this._x1=t+k*h)+","+(this._y1=e+k*a)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,o,l,h){t*=1,e*=1,n*=1,h=!!h;var a=n*Math.cos(o),c=n*Math.sin(o),u=t+a,f=e+c,y=1^h,p=h?o-l:l-o;if(n<0)throw Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+f:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-f)>1e-6)&&(this._+="L"+u+","+f),n&&(p<0&&(p=p%r+r),p>s?this._+="A"+n+","+n+",0,1,"+y+","+(t-a)+","+(e-c)+"A"+n+","+n+",0,1,"+y+","+(this._x1=u)+","+(this._y1=f):p>1e-6&&(this._+="A"+n+","+n+",0,"+ +(p>=i)+","+y+","+(this._x1=t+n*Math.cos(l))+","+(this._y1=e+n*Math.sin(l))))},rect:function(t,e,n,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}};let h=l},28180:function(t,e,n){n.d(e,{t:()=>i});var i=Array.prototype.slice},98142:function(t,e,n){n.d(e,{Z:()=>i});function i(t){return function(){return t}}},33533:function(t,e,n){n.d(e,{h5:()=>c});var i=n(46177),r=n(28180),s=n(98142),o=n(49487);function l(t){return t.source}function h(t){return t.target}function a(t,e,n,i,r){t.moveTo(e,n),t.bezierCurveTo(e=(e+i)/2,n,e,r,i,r)}function c(){return function(t){var e=l,n=h,a=o.x,c=o.y,u=null;function f(){var s,o=r.t.call(arguments),l=e.apply(this,o),h=n.apply(this,o);if(u||(u=s=(0,i.Z)()),t(u,+a.apply(this,(o[0]=l,o)),+c.apply(this,o),+a.apply(this,(o[0]=h,o)),+c.apply(this,o)),s)return u=null,s+""||null}return f.source=function(t){return arguments.length?(e=t,f):e},f.target=function(t){return arguments.length?(n=t,f):n},f.x=function(t){return arguments.length?(a="function"==typeof t?t:(0,s.Z)(+t),f):a},f.y=function(t){return arguments.length?(c="function"==typeof t?t:(0,s.Z)(+t),f):c},f.context=function(t){return arguments.length?(u=null==t?null:t,f):u},f}(a)}},49487:function(t,e,n){function i(t){return t[0]}function r(t){return t[1]}n.d(e,{x:()=>i,y:()=>r})},21170:function(t,e,n){n.d(e,{F2:()=>o,PT:()=>l,be:()=>h,t$:()=>s});var i=n(45354);function r(t){return t.target.depth}function s(t){return t.depth}function o(t,e){return e-1-t.height}function l(t,e){return t.sourceLinks.length?t.depth:e-1}function h(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?(0,i.Z)(t.sourceLinks,r)-1:0}},97895:function(t,e,n){n.d(e,{Z:()=>i});function i(t){return function(){return t}}},23757:function(t,e,n){n.d(e,{Z:()=>_});var i=n(52460),r=n(41322),s=n(45354),o=n(21170),l=n(97895);function h(t,e){return c(t.source,e.source)||t.index-e.index}function a(t,e){return c(t.target,e.target)||t.index-e.index}function c(t,e){return t.y0-e.y0}function u(t){return t.value}function f(t){return t.index}function y(t){return t.nodes}function p(t){return t.links}function d(t,e){let n=t.get(e);if(!n)throw Error("missing: "+e);return n}function g({nodes:t}){for(let e of t){let t=e.y0,n=t;for(let n of e.sourceLinks)n.y0=t+n.width/2,t+=n.width;for(let t of e.targetLinks)t.y1=n+t.width/2,n+=t.width}}function _(){let t,e,n=0,_=0,x=1,m=1,k=24,v=8,b,S=f,w=o.PT,W=y,E=p,A=6;function L(){let o={nodes:W.apply(null,arguments),links:E.apply(null,arguments)};return function({nodes:t,links:n}){for(let[e,n]of t.entries())n.index=e,n.sourceLinks=[],n.targetLinks=[];let i=new Map(t.map((e,n)=>[S(e,n,t),e]));for(let[t,e]of n.entries()){e.index=t;let{source:n,target:r}=e;"object"!=typeof n&&(n=e.source=d(i,n)),"object"!=typeof r&&(r=e.target=d(i,r)),n.sourceLinks.push(e),r.targetLinks.push(e)}if(null!=e)for(let{sourceLinks:n,targetLinks:i}of t)n.sort(e),i.sort(e)}(o),function({nodes:t}){for(let e of t)e.value=void 0===e.fixedValue?Math.max((0,i.Z)(e.sourceLinks,u),(0,i.Z)(e.targetLinks,u)):e.fixedValue}(o),function({nodes:t}){let e=t.length,n=new Set(t),i=new Set,r=0;for(;n.size;){for(let t of n)for(let{target:e}of(t.depth=r,t.sourceLinks))i.add(e);if(++r>e)throw Error("circular link");n=i,i=new Set}}(o),function({nodes:t}){let e=t.length,n=new Set(t),i=new Set,r=0;for(;n.size;){for(let t of n)for(let{source:e}of(t.height=r,t.targetLinks))i.add(e);if(++r>e)throw Error("circular link");n=i,i=new Set}}(o),function(o){let l=function({nodes:e}){let i=(0,r.Z)(e,t=>t.depth)+1,s=(x-n-k)/(i-1),o=Array(i);for(let t of e){let e=Math.max(0,Math.min(i-1,Math.floor(w.call(null,t,i))));t.layer=e,t.x0=n+e*s,t.x1=t.x0+k,o[e]?o[e].push(t):o[e]=[t]}if(t)for(let e of o)e.sort(t);return o}(o);b=Math.min(v,(m-_)/((0,r.Z)(l,t=>t.length)-1));let f=(0,s.Z)(l,t=>(m-_-(t.length-1)*b)/(0,i.Z)(t,u));for(let t of l){let n=_;for(let e of t)for(let t of(e.y0=n,e.y1=n+e.value*f,n=e.y1+b,e.sourceLinks))t.width=t.value*f;n=(m-n+b)/(t.length+1);for(let e=0;e<t.length;++e){let i=t[e];i.y0+=n*(e+1),i.y1+=n*(e+1)}var y=t;if(void 0===e)for(let{sourceLinks:t,targetLinks:e}of y)t.sort(a),e.sort(h)}for(let e=0;e<A;++e){let n=Math.pow(.99,e),i=Math.max(1-n,(e+1)/A);(function(e,n,i){for(let r=e.length,s=r-2;s>=0;--s){let r=e[s];for(let t of r){let e=0,i=0;for(let{target:n,value:r}of t.sourceLinks){let s=r*(n.layer-t.layer);e+=function(t,e){let n=e.y0-(e.targetLinks.length-1)*b/2;for(let{source:i,width:r}of e.targetLinks){if(i===t)break;n+=r+b}for(let{target:i,width:r}of t.sourceLinks){if(i===e)break;n-=r}return n}(t,n)*s,i+=s}if(!(i>0))continue;let r=(e/i-t.y0)*n;t.y0+=r,t.y1+=r,Z(t)}void 0===t&&r.sort(c),M(r,i)}})(l,n,i),function(e,n,i){for(let r=1,s=e.length;r<s;++r){let s=e[r];for(let t of s){let e=0,i=0;for(let{source:n,value:r}of t.targetLinks){let s=r*(t.layer-n.layer);e+=function(t,e){let n=t.y0-(t.sourceLinks.length-1)*b/2;for(let{target:i,width:r}of t.sourceLinks){if(i===e)break;n+=r+b}for(let{source:i,width:r}of e.targetLinks){if(i===t)break;n-=r}return n}(n,t)*s,i+=s}if(!(i>0))continue;let r=(e/i-t.y0)*n;t.y0+=r,t.y1+=r,Z(t)}void 0===t&&s.sort(c),M(s,i)}}(l,n,i)}}(o),g(o),o}function M(t,e){let n=t.length>>1,i=t[n];T(t,i.y0-b,n-1,e),I(t,i.y1+b,n+1,e),T(t,m,t.length-1,e),I(t,_,0,e)}function I(t,e,n,i){for(;n<t.length;++n){let r=t[n],s=(e-r.y0)*i;s>1e-6&&(r.y0+=s,r.y1+=s),e=r.y1+b}}function T(t,e,n,i){for(;n>=0;--n){let r=t[n],s=(r.y1-e)*i;s>1e-6&&(r.y0-=s,r.y1-=s),e=r.y0-b}}function Z({sourceLinks:t,targetLinks:n}){if(void 0===e){for(let{source:{sourceLinks:t}}of n)t.sort(a);for(let{target:{targetLinks:e}}of t)e.sort(h)}}return L.update=function(t){return g(t),t},L.nodeId=function(t){return arguments.length?(S="function"==typeof t?t:(0,l.Z)(t),L):S},L.nodeAlign=function(t){return arguments.length?(w="function"==typeof t?t:(0,l.Z)(t),L):w},L.nodeSort=function(e){return arguments.length?(t=e,L):t},L.nodeWidth=function(t){return arguments.length?(k=+t,L):k},L.nodePadding=function(t){return arguments.length?(v=b=+t,L):v},L.nodes=function(t){return arguments.length?(W="function"==typeof t?t:(0,l.Z)(t),L):W},L.links=function(t){return arguments.length?(E="function"==typeof t?t:(0,l.Z)(t),L):E},L.linkSort=function(t){return arguments.length?(e=t,L):e},L.size=function(t){return arguments.length?(n=_=0,x=+t[0],m=+t[1],L):[x-n,m-_]},L.extent=function(t){return arguments.length?(n=+t[0][0],x=+t[1][0],_=+t[0][1],m=+t[1][1],L):[[n,_],[x,m]]},L.iterations=function(t){return arguments.length?(A=+t,L):A},L}},81380:function(t,e,n){n.d(e,{Z:()=>o});var i=n(33533);function r(t){return[t.source.x1,t.y0]}function s(t){return[t.target.x0,t.y1]}function o(){return(0,i.h5)().source(r).target(s)}},42782:function(t,e,n){n.d(e,{diagram:()=>A});var i=n(23024),r=n(17736),s=n(21170),o=n(23757),l=n(81380),h=function(){var t=(0,i.eW)(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[1,9],n=[1,10],r=[1,5,10,12],s={trace:(0,i.eW)(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.eW)(function(t,e,n,i,r,s,o){var l=s.length-1;switch(r){case 7:let h=i.findOrCreateNode(s[l-4].trim().replaceAll('""','"')),a=i.findOrCreateNode(s[l-2].trim().replaceAll('""','"')),c=parseFloat(s[l].trim());i.addLink(h,a,c);break;case 8:case 9:case 11:this.$=s[l];break;case 10:this.$=s[l-1]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:n},{1:[2,6],7:11,10:[1,12]},t(n,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(r,[2,8]),t(r,[2,9]),{19:[1,16]},t(r,[2,11]),{1:[2,1]},{1:[2,5]},t(n,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:n},{15:18,16:7,17:8,18:e,20:n},{18:[1,19]},t(n,[2,3]),{12:[1,20]},t(r,[2,10]),{15:21,16:7,17:8,18:e,20:n},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:(0,i.eW)(function(t,e){if(e.recoverable)this.trace(t);else{var n=Error(t);throw n.hash=e,n}},"parseError"),parse:(0,i.eW)(function(t){var e=this,n=[0],r=[],s=[null],o=[],l=this.table,h="",a=0,c=0,u=0,f=o.slice.call(arguments,1),y=Object.create(this.lexer),p={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(p.yy[d]=this.yy[d]);y.setInput(t,p.yy),p.yy.lexer=y,p.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var g=y.yylloc;o.push(g);var _=y.options&&y.options.ranges;function x(){var t;return"number"!=typeof(t=r.pop()||y.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.eW)(function(t){n.length=n.length-2*t,s.length=s.length-t,o.length=o.length-t},"popStack"),(0,i.eW)(x,"lex");for(var m,k,v,b,S,w,W,E,A,L={};;){if(v=n[n.length-1],this.defaultActions[v]?b=this.defaultActions[v]:(null==m&&(m=x()),b=l[v]&&l[v][m]),void 0===b||!b.length||!b[0]){var M="";for(w in A=[],l[v])this.terminals_[w]&&w>2&&A.push("'"+this.terminals_[w]+"'");M=y.showPosition?"Parse error on line "+(a+1)+":\n"+y.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(M,{text:y.match,token:this.terminals_[m]||m,line:y.yylineno,loc:g,expected:A})}if(b[0]instanceof Array&&b.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+m);switch(b[0]){case 1:n.push(m),s.push(y.yytext),o.push(y.yylloc),n.push(b[1]),m=null,k?(m=k,k=null):(c=y.yyleng,h=y.yytext,a=y.yylineno,g=y.yylloc,u>0&&u--);break;case 2:if(W=this.productions_[b[1]][1],L.$=s[s.length-W],L._$={first_line:o[o.length-(W||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(W||1)].first_column,last_column:o[o.length-1].last_column},_&&(L._$.range=[o[o.length-(W||1)].range[0],o[o.length-1].range[1]]),void 0!==(S=this.performAction.apply(L,[h,c,a,p.yy,b[1],s,o].concat(f))))return S;W&&(n=n.slice(0,-1*W*2),s=s.slice(0,-1*W),o=o.slice(0,-1*W)),n.push(this.productions_[b[1]][0]),s.push(L.$),o.push(L._$),E=l[n[n.length-2]][n[n.length-1]],n.push(E);break;case 3:return!0}}return!0},"parse")};function o(){this.yy={}}return s.lexer={EOF:1,parseError:(0,i.eW)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,i.eW)(function(t,e){return this.yy=e||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.eW)(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:(0,i.eW)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;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),n.length-1&&(this.yylineno-=n.length-1);var r=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:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,i.eW)(function(){return this._more=!0,this},"more"),reject:(0,i.eW)(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.eW)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,i.eW)(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.eW)(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.eW)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,i.eW)(function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.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],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack)for(var s in r)this[s]=r[s];return!1},"test_match"),next:(0,i.eW)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,n,i,r=this._currentRules(),s=0;s<r.length;s++)if((n=this._input.match(this.rules[r[s]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[s])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[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:(0,i.eW)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,i.eW)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,i.eW)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,i.eW)(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.eW)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,i.eW)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,i.eW)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,i.eW)(function(t,e,n,i){switch(n){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}}},(0,i.eW)(o,"Parser"),o.prototype=s,s.Parser=o,new o}();h.parser=h;var a=[],c=[],u=new Map,f=(0,i.eW)(()=>{a=[],c=[],u=new Map,(0,i.ZH)()},"clear"),y=class{constructor(t,e,n=0){this.source=t,this.target=e,this.value=n}static{(0,i.eW)(this,"SankeyLink")}},p=(0,i.eW)((t,e,n)=>{a.push(new y(t,e,n))},"addLink"),d=class{constructor(t){this.ID=t}static{(0,i.eW)(this,"SankeyNode")}},g=(0,i.eW)(t=>{t=i.SY.sanitizeText(t,(0,i.nV)());let e=u.get(t);return void 0===e&&(e=new d(t),u.set(t,e),c.push(e)),e},"findOrCreateNode"),_=(0,i.eW)(()=>c,"getNodes"),x=(0,i.eW)(()=>a,"getLinks"),m=(0,i.eW)(()=>({nodes:c.map(t=>({id:t.ID})),links:a.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),k={nodesMap:u,getConfig:(0,i.eW)(()=>(0,i.nV)().sankey,"getConfig"),getNodes:_,getLinks:x,getGraph:m,addLink:p,findOrCreateNode:g,getAccTitle:i.eu,setAccTitle:i.GN,getAccDescription:i.Mx,setAccDescription:i.U$,getDiagramTitle:i.Kr,setDiagramTitle:i.g2,clear:f},v=class t{static{(0,i.eW)(this,"Uid")}static{this.count=0}static next(e){return new t(e+ ++t.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}},b={left:s.t$,right:s.F2,center:s.be,justify:s.PT},S=(0,i.eW)(function(t,e,n,s){let h,a,{securityLevel:c,sankey:u}=(0,i.nV)(),f=i.Fy.sankey;"sandbox"===c&&(h=(0,r.Ys)("#i"+e));let y="sandbox"===c?(0,r.Ys)(h.nodes()[0].contentDocument.body):(0,r.Ys)("body"),p="sandbox"===c?y.select(`[id="${e}"]`):(0,r.Ys)(`[id="${e}"]`),d=u?.width??f.width,g=u?.height??f.width,_=u?.useMaxWidth??f.useMaxWidth,x=u?.nodeAlignment??f.nodeAlignment,m=u?.prefix??f.prefix,k=u?.suffix??f.suffix,S=u?.showValues??f.showValues,w=s.db.getGraph(),W=b[x];(0,o.Z)().nodeId(t=>t.id).nodeWidth(10).nodePadding(10+15*!!S).nodeAlign(W).extent([[0,0],[d,g]])(w);let E=(0,r.PKp)(r.K2I);p.append("g").attr("class","nodes").selectAll(".node").data(w.nodes).join("g").attr("class","node").attr("id",t=>(t.uid=v.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=>E(t.id));let A=(0,i.eW)(({id:t,value:e})=>S?`${t}
|
|
${m}${Math.round(100*e)/100}${k}`:t,"getText");p.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(w.nodes).join("text").attr("x",t=>t.x0<d/2?t.x1+6:t.x0-6).attr("y",t=>(t.y1+t.y0)/2).attr("dy",`${S?"0":"0.35"}em`).attr("text-anchor",t=>t.x0<d/2?"start":"end").text(A);let L=p.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(w.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),M=u?.linkColor??"gradient";if("gradient"===M){let t=L.append("linearGradient").attr("id",t=>(t.uid=v.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=>E(t.source.id)),t.append("stop").attr("offset","100%").attr("stop-color",t=>E(t.target.id))}switch(M){case"gradient":a=(0,i.eW)(t=>t.uid,"coloring");break;case"source":a=(0,i.eW)(t=>E(t.source.id),"coloring");break;case"target":a=(0,i.eW)(t=>E(t.target.id),"coloring");break;default:a=M}L.append("path").attr("d",(0,l.Z)()).attr("stroke",a).attr("stroke-width",t=>Math.max(1,t.width)),(0,i.j7)(void 0,p,0,_)},"draw"),w=(0,i.eW)(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,"\n").trim(),"prepareTextForParsing"),W=(0,i.eW)(t=>`.label {
|
|
font-family: ${t.fontFamily};
|
|
}`,"getStyles"),E=h.parse.bind(h);h.parse=t=>E(w(t));var A={styles:W,parser:h,db:k,renderer:{draw:S}}}}]); |