@elliemae/pui-cli 8.62.2 → 8.62.4
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.
- package/build/docs/404.html +16 -0
- package/build/docs/api/functions/loadRoutes/index.html +22 -0
- package/build/docs/api/index.html +22 -0
- package/build/docs/api/type-aliases/LIB_NAME/index.html +17 -0
- package/build/docs/api/variables/babelConfig/index.html +40 -0
- package/build/docs/api/variables/commitlintConfig/index.html +20 -0
- package/build/docs/api/variables/eslintBaseConfig/index.html +130 -0
- package/build/docs/api/variables/eslintConfig/index.html +178 -0
- package/build/docs/api/variables/jestConfig/index.html +98 -0
- package/build/docs/api/variables/jestNodeConfig/index.html +98 -0
- package/build/docs/api/variables/lintStagedConfig/index.html +24 -0
- package/build/docs/api/variables/prettierConfig/index.html +30 -0
- package/build/docs/api/variables/stylelintConfig/index.html +30 -0
- package/build/docs/api/variables/vitestConfig/index.html +17 -0
- package/build/docs/assets/css/styles.5e594f8e.css +1 -0
- package/build/docs/assets/js/04ee7372.6701a521.js +1 -0
- package/build/docs/assets/js/0551d4dd.58dce19e.js +1 -0
- package/build/docs/assets/js/1038.7eccbe83.js +1 -0
- package/build/docs/assets/js/1200.62fdfb17.js +1 -0
- package/build/docs/assets/js/1340.e320589e.js +1 -0
- package/build/docs/assets/js/1348.fdba76ee.js +1 -0
- package/build/docs/assets/js/1591.b2d5d84b.js +1 -0
- package/build/docs/assets/js/16b7bc88.98d0e7e1.js +1 -0
- package/build/docs/assets/js/17896441.4a6e0d00.js +1 -0
- package/build/docs/assets/js/1912.edd5c016.js +1 -0
- package/build/docs/assets/js/1b9df811.cbc3937e.js +1 -0
- package/build/docs/assets/js/213.e69351b3.js +1 -0
- package/build/docs/assets/js/2154.9723abaf.js +1 -0
- package/build/docs/assets/js/2185.f2209249.js +1 -0
- package/build/docs/assets/js/2186.40926696.js +1 -0
- package/build/docs/assets/js/2327.22ae5940.js +1 -0
- package/build/docs/assets/js/234.83bc0029.js +1 -0
- package/build/docs/assets/js/2399.63cd96a9.js +1 -0
- package/build/docs/assets/js/2421.0a678e37.js +1 -0
- package/build/docs/assets/js/2534.dbf7919d.js +1 -0
- package/build/docs/assets/js/2650.eb69c6a5.js +1 -0
- package/build/docs/assets/js/2652.3c5e01f6.js +1 -0
- package/build/docs/assets/js/2675.413b1881.js +1 -0
- package/build/docs/assets/js/2856.434d8532.js +1 -0
- package/build/docs/assets/js/3075.8eb78c50.js +1 -0
- package/build/docs/assets/js/3171.c208ec80.js +1 -0
- package/build/docs/assets/js/3186.4706e934.js +1 -0
- package/build/docs/assets/js/3242.80d2f573.js +1 -0
- package/build/docs/assets/js/3380.fa624efa.js +1 -0
- package/build/docs/assets/js/3720.8e7f36d4.js +2 -0
- package/build/docs/assets/js/3720.8e7f36d4.js.LICENSE.txt +9 -0
- package/build/docs/assets/js/3731.3625e619.js +1 -0
- package/build/docs/assets/js/3749.25d3a9dc.js +1 -0
- package/build/docs/assets/js/3753.ad43bbbf.js +1 -0
- package/build/docs/assets/js/37d86055.ac328609.js +1 -0
- package/build/docs/assets/js/386.82e1d440.js +2 -0
- package/build/docs/assets/js/386.82e1d440.js.LICENSE.txt +1 -0
- package/build/docs/assets/js/3938.381439b7.js +1 -0
- package/build/docs/assets/js/3995.9c7a08d7.js +1 -0
- package/build/docs/assets/js/4074.2d89387a.js +1 -0
- package/build/docs/assets/js/4567.40926696.js +1 -0
- package/build/docs/assets/js/4570.22eef064.js +1 -0
- package/build/docs/assets/js/4832.f41ebb6a.js +1 -0
- package/build/docs/assets/js/4944.20a6ae14.js +1 -0
- package/build/docs/assets/js/504.082248a2.js +1 -0
- package/build/docs/assets/js/5111.1b6768c7.js +1 -0
- package/build/docs/assets/js/5153.ccd7118e.js +1 -0
- package/build/docs/assets/js/5463.df303412.js +1 -0
- package/build/docs/assets/js/5529.a57e8e4a.js +1 -0
- package/build/docs/assets/js/5663.13fc2f9f.js +1 -0
- package/build/docs/assets/js/5818.62ee6d97.js +1 -0
- package/build/docs/assets/js/5850.e0052526.js +1 -0
- package/build/docs/assets/js/5973.50ffe932.js +1 -0
- package/build/docs/assets/js/5d5f1db0.ee0a2786.js +1 -0
- package/build/docs/assets/js/5e8c322a.03e5f869.js +1 -0
- package/build/docs/assets/js/5e95c892.0b2807a1.js +1 -0
- package/build/docs/assets/js/5fb3c522.7fa934f6.js +1 -0
- package/build/docs/assets/js/6001.475cf9bc.js +1 -0
- package/build/docs/assets/js/6216.81ed3f71.js +1 -0
- package/build/docs/assets/js/6286.1e2004df.js +1 -0
- package/build/docs/assets/js/6737.cba35710.js +1 -0
- package/build/docs/assets/js/6779.48fa5e85.js +1 -0
- package/build/docs/assets/js/6780.35d6b408.js +1 -0
- package/build/docs/assets/js/681.7048216c.js +1 -0
- package/build/docs/assets/js/6bd11e52.4a64999a.js +1 -0
- package/build/docs/assets/js/6e96545e.82b3f634.js +1 -0
- package/build/docs/assets/js/7129.6a95a014.js +1 -0
- package/build/docs/assets/js/7173.3df1d101.js +1 -0
- package/build/docs/assets/js/71f6d02b.f4ef9e77.js +1 -0
- package/build/docs/assets/js/7330.25c0f54a.js +1 -0
- package/build/docs/assets/js/777.6cc435d2.js +1 -0
- package/build/docs/assets/js/80e87108.fb514ef2.js +1 -0
- package/build/docs/assets/js/821.8d4e2a80.js +1 -0
- package/build/docs/assets/js/8335.7c94cd06.js +1 -0
- package/build/docs/assets/js/8347.ba32afd0.js +1 -0
- package/build/docs/assets/js/8398.64ed21da.js +1 -0
- package/build/docs/assets/js/8585.38199cd1.js +1 -0
- package/build/docs/assets/js/8725.440f4f8c.js +1 -0
- package/build/docs/assets/js/918.44c83d98.js +1 -0
- package/build/docs/assets/js/9242.e3fb85ca.js +1 -0
- package/build/docs/assets/js/940.c104b973.js +1 -0
- package/build/docs/assets/js/9661.e5f9a8b1.js +1 -0
- package/build/docs/assets/js/9718.706df9d5.js +1 -0
- package/build/docs/assets/js/9737.81795237.js +1 -0
- package/build/docs/assets/js/9805.40926696.js +1 -0
- package/build/docs/assets/js/9998.2236d038.js +1 -0
- package/build/docs/assets/js/a7bd4aaa.82b76b67.js +1 -0
- package/build/docs/assets/js/a94703ab.8fd80ed9.js +1 -0
- package/build/docs/assets/js/aba21aa0.3bbcf0cc.js +1 -0
- package/build/docs/assets/js/b8ac1d98.eac62e10.js +1 -0
- package/build/docs/assets/js/bde5209a.1f661437.js +1 -0
- package/build/docs/assets/js/c377a04b.54071de3.js +1 -0
- package/build/docs/assets/js/common.469f0e39.js +1 -0
- package/build/docs/assets/js/e5f79924.3b9434d6.js +1 -0
- package/build/docs/assets/js/f736c962.1745b6ff.js +1 -0
- package/build/docs/assets/js/main.ceaf5a1d.js +2 -0
- package/build/docs/assets/js/main.ceaf5a1d.js.LICENSE.txt +51 -0
- package/build/docs/assets/js/runtime~main.2ef68500.js +1 -0
- package/build/docs/img/favicon.ico +0 -0
- package/build/docs/img/logo.jpeg +0 -0
- package/build/docs/img/logo.svg +22 -0
- package/build/docs/img/readme.md +1 -0
- package/build/docs/index.html +175 -0
- package/build/docs/readme.md +1 -0
- package/build/docs/sitemap.xml +1 -0
- package/build/docs/ssl-certificate-setup/index.html +284 -0
- package/build/docs/usage-guide/index.html +416 -0
- package/dist/cjs/build/vite.config.js +16 -0
- package/dist/cjs/package.json +1 -4
- package/dist/esm/build/vite.config.js +16 -0
- package/dist/esm/package.json +1 -4
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +42 -41
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_elliemae_pui_cli=globalThis.webpackChunk_elliemae_pui_cli||[]).push([[2856],{2856(t,e,n){n.d(e,{diagram:()=>ht});var i=n(4969),r=n(3639),a=n(4689),s=n(2371),o=n(8053),c=n(7012),l=n(3212),h=n(8480),d=n(9515),u=function(){var t=(0,o.K)(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],r=[1,14],a=[1,15],s=[1,16],c=[1,19],l=[1,20],h={trace:(0,o.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:(0,o.K)(function(t,e,n,i,r,a,s){var o=a.length-1;switch(r){case 1:return a[o-1];case 3:i.setDirection("LR");break;case 4:i.setDirection("TD");break;case 5:case 9:case 10:this.$=[];break;case 6:a[o-1].push(a[o]),this.$=a[o-1];break;case 7:case 8:this.$=a[o];break;case 11:i.getCommonDb().setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 12:this.$=a[o].trim(),i.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=a[o].trim(),i.getCommonDb().setAccDescription(this.$);break;case 15:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 18:i.addTask(a[o],0,""),this.$=a[o];break;case 19:i.addEvent(a[o].substr(2)),this.$=a[o]}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},t(e,[2,5],{5:6}),t(e,[2,2]),t(e,[2,3]),t(e,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:i,17:r,19:a,20:s,21:17,22:18,23:c,24:l},t(e,[2,10],{1:[2,1]}),t(e,[2,6]),{12:21,14:n,15:i,17:r,19:a,20:s,21:17,22:18,23:c,24:l},t(e,[2,8]),t(e,[2,9]),t(e,[2,11]),{16:[1,22]},{18:[1,23]},t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,7]),t(e,[2,12]),t(e,[2,13])],defaultActions:{},parseError:(0,o.K)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,o.K)(function(t){var e=this,n=[0],i=[],r=[null],a=[],s=this.table,c="",l=0,h=0,d=0,u=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;a.push(f);var m=p.options&&p.options.ranges;function x(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K)(function(t){n.length=n.length-2*t,r.length=r.length-t,a.length=a.length-t},"popStack"),(0,o.K)(x,"lex");for(var b,k,w,_,v,$,K,S,E,R={};;){if(w=n[n.length-1],this.defaultActions[w]?_=this.defaultActions[w]:(null==b&&(b=x()),_=s[w]&&s[w][b]),void 0===_||!_.length||!_[0]){var T="";for($ in E=[],s[w])this.terminals_[$]&&$>2&&E.push("'"+this.terminals_[$]+"'");T=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(T,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:f,expected:E})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(_[0]){case 1:n.push(b),r.push(p.yytext),a.push(p.yylloc),n.push(_[1]),b=null,k?(b=k,k=null):(h=p.yyleng,c=p.yytext,l=p.yylineno,f=p.yylloc,d>0&&d--);break;case 2:if(K=this.productions_[_[1]][1],R.$=r[r.length-K],R._$={first_line:a[a.length-(K||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(K||1)].first_column,last_column:a[a.length-1].last_column},m&&(R._$.range=[a[a.length-(K||1)].range[0],a[a.length-1].range[1]]),void 0!==(v=this.performAction.apply(R,[c,h,l,g.yy,_[1],r,a].concat(u))))return v;K&&(n=n.slice(0,-1*K*2),r=r.slice(0,-1*K),a=a.slice(0,-1*K)),n.push(this.productions_[_[1]][0]),r.push(R.$),a.push(R._$),S=s[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0},"parse")},d=function(){return{EOF:1,parseError:(0,o.K)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,o.K)(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,o.K)(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,o.K)(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,o.K)(function(){return this._more=!0,this},"more"),reject:(0,o.K)(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,o.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,o.K)(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,o.K)(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,o.K)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,o.K)(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 a in r)this[a]=r[a];return!1}return!1},"test_match"),next:(0,o.K)(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),a=0;a<r.length;a++)if((n=this._input.match(this.rules[r[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[a])))return t;if(this._backtrack){e=!1;continue}return!1}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,o.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,o.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,o.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,o.K)(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,o.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,o.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,o.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,o.K)(function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 13;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin("acc_title"),15;case 10:return this.popState(),"acc_title_value";case 11:return this.begin("acc_descr"),17;case 12:return this.popState(),"acc_descr_value";case 13:this.begin("acc_descr_multiline");break;case 14:this.popState();break;case 15:return"acc_descr_multiline_value";case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}}}();function u(){this.yy={}}return h.lexer=d,(0,o.K)(u,"Parser"),u.prototype=h,h.Parser=u,new u}();u.parser=u;var p=u,g={};(0,o.V)(g,{addEvent:()=>T,addSection:()=>K,addTask:()=>R,addTaskOrg:()=>I,clear:()=>_,default:()=>L,getCommonDb:()=>w,getDirection:()=>$,getSections:()=>S,getTasks:()=>E,setDirection:()=>v});var y="",f=0,m="LR",x=[],b=[],k=[],w=(0,o.K)(()=>a.Wt,"getCommonDb"),_=(0,o.K)(function(){x.length=0,b.length=0,y="",k.length=0,m="LR",(0,a.IU)()},"clear"),v=(0,o.K)(function(t){m=t},"setDirection"),$=(0,o.K)(function(){return m},"getDirection"),K=(0,o.K)(function(t){y=t,x.push(t)},"addSection"),S=(0,o.K)(function(){return x},"getSections"),E=(0,o.K)(function(){let t=M();let e=0;for(;!t&&e<100;)t=M(),e++;return b.push(...k),b},"getTasks"),R=(0,o.K)(function(t,e,n){const i={id:f++,section:y,type:y,task:t,score:e||0,events:n?[n]:[]};k.push(i)},"addTask"),T=(0,o.K)(function(t){k.find(t=>t.id===f-1).events.push(t)},"addEvent"),I=(0,o.K)(function(t){const e={section:y,type:y,description:t,task:t,classes:[]};b.push(e)},"addTaskOrg"),M=(0,o.K)(function(){const t=(0,o.K)(function(t){return k[t].processed},"compileTask");let e=!0;for(const[n,i]of k.entries())t(n),e=e&&i.processed;return e},"compileTasks"),L={clear:_,getCommonDb:w,getDirection:$,setDirection:v,addSection:K,getSections:S,getTasks:E,addTask:R,addTaskOrg:I,addEvent:T},H=0,C=(0,o.K)(function(t,e){const n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},"drawRect"),N=(0,o.K)(function(t,e){const n=15,i=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",n).attr("stroke-width",2).attr("overflow","visible"),r=t.append("g");function a(t){const i=(0,c.JLW)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function s(t){const i=(0,c.JLW)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function l(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return r.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),(0,o.K)(a,"smile"),(0,o.K)(s,"sad"),(0,o.K)(l,"ambivalent"),e.score>3?a(r):e.score<3?s(r):l(r),i},"drawFace"),D=(0,o.K)(function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},"drawCircle"),A=(0,o.K)(function(t,e){const n=e.text.replace(/<br\s*\/?>/gi," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),void 0!==e.class&&i.attr("class",e.class);const r=i.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.text(n),i},"drawText"),O=(0,o.K)(function(t,e){function n(t,e,n,i,r){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-r)+" "+(t+n-1.2*r)+","+(e+i)+" "+t+","+(e+i)}(0,o.K)(n,"genPoints");const i=t.append("polygon");i.attr("points",n(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,A(t,e)},"drawLabel"),B=(0,o.K)(function(t,e,n){const i=t.append("g"),r=F();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=n.width,r.height=n.height,r.class="journey-section section-type-"+e.num,r.rx=3,r.ry=3,C(i,r),V(n)(e.text,i,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+e.num},n,e.colour)},"drawSection"),P=-1,W=(0,o.K)(function(t,e,n,i){const r=e.x+n.width/2,a=t.append("g");P++;a.append("line").attr("id",i+"-task"+P).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),N(a,{cx:r,cy:300+30*(5-e.score),score:e.score});const s=F();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=n.width,s.height=n.height,s.class="task task-type-"+e.num,s.rx=3,s.ry=3,C(a,s),V(n)(e.task,a,s.x,s.y,s.width,s.height,{class:"task"},n,e.colour)},"drawTask"),j=(0,o.K)(function(t,e){C(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),z=(0,o.K)(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),F=(0,o.K)(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),V=function(){function t(t,e,n,r,a,s,o,c){i(e.append("text").attr("x",n+a/2).attr("y",r+s/2+5).style("font-color",c).style("text-anchor","middle").text(t),o)}function e(t,e,n,r,a,s,o,c,l){const{taskFontSize:h,taskFontFamily:d}=c,u=t.split(/<br\s*\/?>/gi);for(let p=0;p<u.length;p++){const t=p*h-h*(u.length-1)/2,c=e.append("text").attr("x",n+a/2).attr("y",r).attr("fill",l).style("text-anchor","middle").style("font-size",h).style("font-family",d);c.append("tspan").attr("x",n+a/2).attr("dy",t).text(u[p]),c.attr("y",r+s/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(c,o)}}function n(t,n,r,a,s,o,c,l){const h=n.append("switch"),d=h.append("foreignObject").attr("x",r).attr("y",a).attr("width",s).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");d.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,r,a,s,o,c,l),i(d,c)}function i(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return(0,o.K)(t,"byText"),(0,o.K)(e,"byTspan"),(0,o.K)(n,"byFo"),(0,o.K)(i,"_setTextAttrs"),function(i){return"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}}(),G=(0,o.K)(function(t,e){H=0,P=-1,t.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics");function U(t,e){t.each(function(){var t,n=(0,c.Ltv)(this),i=n.text().split(/(\s+|<br>)/).reverse(),r=[],a=n.attr("y"),s=parseFloat(n.attr("dy")),o=n.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",s+"em");for(let c=0;c<i.length;c++)t=i[i.length-1-c],r.push(t),o.text(r.join(" ").trim()),(o.node().getComputedTextLength()>e||"<br>"===t)&&(r.pop(),o.text(r.join(" ").trim()),r="<br>"===t?[""]:[t],o=n.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(t))})}(0,o.K)(U,"wrap");var Z=(0,o.K)(function(t,e,n,i,r,a=!1){const{theme:s,look:o}=i,l=s?.includes("redux"),h=n%(i?.themeVariables?.THEME_COLOR_LIMIT??12)-1,d=t.append("g");e.section=h,d.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+h);const u=d.append("g"),p=d.append("g"),g=p.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(U,e.width).node().getBBox(),y=i.fontSize?.replace?i.fontSize.replace("px",""):i.fontSize;if(e.height=g.height+1.1*y*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,p.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),l&&p.attr("transform",`translate(${e.width/2}, ${a?e.padding/2+3:e.padding})`),J(u,e,h,r,i),"neo"===o&&(d.attr("data-look","neo"),l)){const e=s.includes("dark"),n=t.node()?.ownerSVGElement??t.node(),i=(0,c.Ltv)(n),r=i.attr("id")??"",a=r?`${r}-drop-shadow`:"drop-shadow";if(i.select(`#${a}`).empty()){const t=i.select("defs");(t.empty()?i.append("defs"):t).append("filter").attr("id",a).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity",e?"0.2":"0.06").attr("flood-color",e?"#FFFFFF":"#000000")}}return e},"drawNode"),q=(0,o.K)(function(t,e,n){const i=t.append("g"),r=i.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(U,e.width).node().getBBox(),a=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return i.remove(),r.height+1.1*a*.5+e.padding},"getVirtualNodeHeight"),J=(0,o.K)(function(t,e,n,i,r){const{theme:a}=r,s=a?.includes("redux")?0:5,o=s>0?`M0 ${e.height-5} v${10-e.height} q0,-${s},${s},-${s} h${e.width-10} q${s},0,${s},${s} v${e.height-5} H0 Z`:`M0 ${e.height-5} v${-(e.height-5)} h${e.width} v${e.height} H0 Z`;t.append("path").attr("id",i+"-node-"+H++).attr("class","node-bkg node-"+e.type).attr("d",o),a?.includes("redux")||t.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},"defaultBkg"),Y={drawRect:C,drawCircle:D,drawSection:B,drawText:A,drawLabel:O,drawTask:W,drawBackgroundRect:j,getTextObj:z,getNoteRect:F,initGraphics:G,drawNode:Z,getVirtualNodeHeight:q},X=(0,o.K)(function(t,e,n,i){const r=(0,a.D7)(),{look:o,theme:l,themeVariables:h}=r,{useGradient:d,gradientStart:u,gradientStop:p}=h,g=r.timeline?.leftMargin??50;s.R.debug("timeline",i.db);const y=r.securityLevel;let f;"sandbox"===y&&(f=(0,c.Ltv)("#i"+e));const m=("sandbox"===y?(0,c.Ltv)(f.nodes()[0].contentDocument.body):(0,c.Ltv)("body")).select("#"+e);m.append("g");const x=i.db.getTasks(),b=i.db.getCommonDb().getDiagramTitle();s.R.debug("task",x),Y.initGraphics(m,e);const k=i.db.getSections();s.R.debug("sections",k);let w=0,_=0,v=0,$=0,K=50+g,S=50;$=50;let E=0,R=!0;k.forEach(function(t){const e={number:E,descr:t,section:E,width:150,padding:20,maxHeight:w},n=Y.getVirtualNodeHeight(m,e,r);s.R.debug("sectionHeight before draw",n),w=Math.max(w,n+20)});let T=0,I=0;s.R.debug("tasks.length",x.length);for(const[a,c]of x.entries()){const t={number:a,descr:c,section:c.section,width:150,padding:20,maxHeight:_},e=Y.getVirtualNodeHeight(m,t,r);s.R.debug("taskHeight before draw",e),_=Math.max(_,e+20),T=Math.max(T,c.events.length);let n=0;for(const i of c.events){const t={descr:i,section:c.section,number:c.section,width:150,padding:20,maxHeight:50};n+=Y.getVirtualNodeHeight(m,t,r)}c.events.length>0&&(n+=10*(c.events.length-1)),I=Math.max(I,n)}s.R.debug("maxSectionHeight before draw",w),s.R.debug("maxTaskHeight before draw",_),k&&k.length>0?k.forEach(t=>{const n=x.filter(e=>e.section===t),i={number:E,descr:t,section:E,width:200*Math.max(n.length,1)-50,padding:20,maxHeight:w};s.R.debug("sectionNode",i);const a=m.append("g"),o=Y.drawNode(a,i,E,r,e);s.R.debug("sectionNode output",o),a.attr("transform",`translate(${K}, 50)`),S+=w+50,n.length>0&&Q(m,n,E,K,S,_,r,T,I,w,!1,e),K+=200*Math.max(n.length,1),S=50,E++}):(R=!1,Q(m,x,E,K,S,_,r,T,I,w,!0,e));const M=m.node().getBBox();s.R.debug("bounds",M),b&&m.append("text").text(b).attr("x","neo"===o?2*M.x+g:M.width/2-g).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),v=R?w+_+150:_+100;if(m.append("g").attr("class","lineWrapper").append("line").attr("x1",g).attr("y1",v).attr("x2",M.width+3*g).attr("y2",v).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${e}-arrowhead)`),"neo"===o&&d&&"neutral"!==l){const t=m.select("defs"),e=(t.empty()?m.append("defs"):t).append("linearGradient").attr("id",m.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");e.append("stop").attr("offset","0%").attr("stop-color",u).attr("stop-opacity",1),e.append("stop").attr("offset","100%").attr("stop-color",p).attr("stop-opacity",1)}(0,a.ot)(void 0,m,r.timeline?.padding??50,r.timeline?.useMaxWidth??!1)},"draw"),Q=(0,o.K)(function(t,e,n,i,r,a,o,c,l,h,d,u){for(const p of e){const e={descr:p.task,section:n,number:n,width:150,padding:20,maxHeight:a};s.R.debug("taskNode",e);const c=t.append("g").attr("class","taskWrapper"),h=Y.drawNode(c,e,n,o,u).height;if(s.R.debug("taskHeight after draw",h),c.attr("transform",`translate(${i}, ${r})`),a=Math.max(a,h),p.events){const e=t.append("g").attr("class","lineWrapper");let s=a;r+=100,s+=tt(t,p.events,n,i,r,o,u),r-=100,e.append("line").attr("x1",i+95).attr("y1",r+a).attr("x2",i+95).attr("y2",r+a+100+l+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${u}-arrowhead)`).attr("stroke-dasharray","5,5")}i+=200,d&&!o.timeline?.disableMulticolor&&n++}r-=10},"drawTasks"),tt=(0,o.K)(function(t,e,n,i,r,a,o){let c=0;const l=r;r+=100;for(const h of e){const e={descr:h,section:n,number:n,width:150,padding:20,maxHeight:50};s.R.debug("eventNode",e);const l=t.append("g").attr("class","eventWrapper"),d=Y.drawNode(l,e,n,a,o,!0).height;c+=d,l.attr("transform",`translate(${i}, ${r})`),r=r+10+d}return r=l,c},"drawEvents"),et={setConf:(0,o.K)(()=>{},"setConf"),draw:X},nt=200,it=(0,o.K)(function(t,e,n,o){const c=(0,a.D7)(),l=c.timeline?.leftMargin??50;s.R.debug("timeline",o.db);const h=(0,i.D)(e);h.append("g");const d=o.db.getTasks(),u=o.db.getCommonDb().getDiagramTitle();s.R.debug("task",d),Y.initGraphics(h);const p=o.db.getSections();s.R.debug("sections",p);let g=0,y=0;const f=50+l;let m=50;const x=m,b=230,k=f+b;let w=0;const _=p&&p.length>0,v=_?k:f+b,$=Math.max(50,580);p.forEach(function(t){const e={number:w,descr:t,section:w,width:$,padding:5,maxHeight:g},n=Y.getVirtualNodeHeight(h,e,c);s.R.debug("sectionHeight before draw",n),g=Math.max(g,n)});let K=0;s.R.debug("tasks.length",d.length);for(const[i,r]of d.entries()){const t={number:i,descr:r,section:r.section,width:nt,padding:5,maxHeight:y},e=Y.getVirtualNodeHeight(h,t,c);s.R.debug("taskHeight before draw",e),y=Math.max(y,e);let n=0;for(const i of r.events){const t={descr:i,section:r.section,number:r.section,width:300,padding:5,maxHeight:50};n+=Y.getVirtualNodeHeight(h,t,c)}r.events.length>0&&(n+=10*(r.events.length-1)),K=Math.max(K,n)+0}s.R.debug("maxSectionHeight before draw",g),s.R.debug("maxTaskHeight before draw",y);const S=Math.max(y,K)+30;_?p.forEach(t=>{const e=d.filter(e=>e.section===t),n={number:w,descr:t,section:w,width:$,padding:5,maxHeight:g};s.R.debug("sectionNode",n);const i=h.append("g"),r=Y.drawNode(i,n,w,c);s.R.debug("sectionNode output",r);const a=v-b;i.attr("transform",`translate(${a}, ${m})`);const o=m+r.height+20;e.length>0&&rt(h,e,w,v,o,y,c,S,!1);const l=e.length,u=r.height+20+S*Math.max(l,1)-(l>0?60:0);m+=u,w++}):rt(h,d,w,v,m,y,c,S,!0);let E=h.node()?.getBBox();if(!E)throw new Error("bbox not found");if(s.R.debug("bounds",E),u){if(h.append("text").text(u).attr("x",E.width/2-l).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),E=h.node()?.getBBox(),!E)throw new Error("bbox not found");s.R.debug("bounds after title",E)}const[R]=(0,r.I5)(c.fontSize),T=2*(R??16),I=.5*(R??16)+20,M=h.append("g").attr("class","lineWrapper");M.append("line").attr("x1",v).attr("y1",x-T).attr("x2",v).attr("y2",E.y+E.height+I).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),M.lower(),(0,a.ot)(void 0,h,c.timeline?.padding??50,c.timeline?.useMaxWidth??!1)},"draw"),rt=(0,o.K)(function(t,e,n,i,r,a,o,c,l){for(const h of e){const e={descr:h.task,section:n,number:n,width:nt,padding:5,maxHeight:a};s.R.debug("taskNode",e);const d=t.append("g").attr("class","taskWrapper"),u=Y.drawNode(d,e,n,o),p=u.height;s.R.debug("taskHeight after draw",p);const g=i-20-u.width;if(d.attr("transform",`translate(${g}, ${r})`),a=Math.max(a,p),h.events&&h.events.length>0){const e=r,a=i+50;at(t,h.events,n,i,a,e,o)}r+=c,l&&!o.timeline?.disableMulticolor&&n++}},"drawTasks"),at=(0,o.K)(function(t,e,n,i,r,a,o){let c=a;for(const l of e){const e={descr:l,section:n,number:n,width:300,padding:5,maxHeight:0};s.R.debug("eventNode",e);const a=t.append("g").attr("class","eventWrapper"),h=Y.drawNode(a,e,n,o).height;a.attr("transform",`translate(${r}, ${c})`);const d=c+h/2;t.append("g").attr("class","lineWrapper").append("line").attr("x1",i).attr("y1",d).attr("x2",r).attr("y2",d).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),c=c+h+10}return c-a},"drawEvents"),st={setConf:(0,o.K)(()=>{},"setConf"),draw:it},ot=(0,o.K)(t=>{const{theme:e}=(0,a.zj)(),n=e?.includes("dark"),i=e?.includes("color"),r=t.svgId?.replace(/^#/,"")??"",s=r?`url(#${r}-drop-shadow)`:t.dropShadow??"none";let o="";for(let a=0;a<t.THEME_COLOR_LIMIT;a++){const e=""+(17-3*a),r=i?t.borderColorArray[a]:t.mainBkg,c=i?t.borderColorArray[a]:t.nodeBorder;o+=`\n .section-${a-1} rect,\n .section-${a-1} path,\n .section-${a-1} circle {\n fill: ${n&&i?t.mainBkg:r};\n stroke: ${c};\n stroke-width: ${t.strokeWidth};\n filter: ${s};\n }\n\n .section-${a-1} text {\n fill: ${t.nodeBorder};\n font-weight: ${t.fontWeight}\n }\n\n .node-icon-${a-1} {\n font-size: 40px;\n color: ${t["cScaleLabel"+a]};\n }\n\n .section-edge-${a-1} {\n stroke: ${t["cScale"+a]};\n }\n\n .edge-depth-${a-1} {\n stroke-width: ${e};\n }\n\n .section-${a-1} line {\n stroke: ${t["cScaleInv"+a]};\n stroke-width: 3;\n }\n\n .lineWrapper line {\n stroke: ${t.nodeBorder};\n stroke-width:${t.strokeWidth}\n }\n\n .disabled,\n .disabled circle,\n .disabled text {\n fill: ${t.tertiaryColor??"lightgray"};\n }\n\n .disabled text {\n fill: ${t.clusterBorder??"#efefef"};\n }\n `}return o},"genReduxSections"),ct=(0,o.K)(t=>{let e="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++)t["lineColor"+n]=t["lineColor"+n]||t["cScaleInv"+n],(0,l.A)(t["lineColor"+n])?t["lineColor"+n]=(0,h.A)(t["lineColor"+n],20):t["lineColor"+n]=(0,d.A)(t["lineColor"+n],20);for(let n=0;n<t.THEME_COLOR_LIMIT;n++){const i=""+(17-3*n);e+=`\n .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} path {\n fill: ${t["cScale"+n]};\n }\n .section-${n-1} text {\n fill: ${t["cScaleLabel"+n]};\n }\n .node-icon-${n-1} {\n font-size: 40px;\n color: ${t["cScaleLabel"+n]};\n }\n .section-edge-${n-1}{\n stroke: ${t["cScale"+n]};\n }\n .edge-depth-${n-1}{\n stroke-width: ${i};\n }\n .section-${n-1} line {\n stroke: ${t["cScaleInv"+n]} ;\n stroke-width: 3;\n }\n\n .lineWrapper line{\n stroke: ${t["cScaleLabel"+n]} ;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: ${t.tertiaryColor??"lightgray"};\n }\n .disabled text {\n fill: ${t.clusterBorder??"#efefef"};\n }\n `}return e},"genSections"),lt=(0,o.K)(t=>{const{theme:e}=(0,a.zj)(),n=e?.includes("redux"),i="neutral"===e,r=t.svgId?.replace(/^#/,"")??"";let s="";if(t.useGradient&&r&&t.THEME_COLOR_LIMIT&&!i)for(let a=0;a<t.THEME_COLOR_LIMIT;a++)s+=`\n .section-${a-1}[data-look="neo"] rect,\n .section-${a-1}[data-look="neo"] path,\n .section-${a-1}[data-look="neo"] circle {\n fill: ${t.mainBkg};\n stroke: url(#${r}-gradient);\n stroke-width: 2;\n }\n .section-${a-1}[data-look="neo"] line {\n stroke: url(#${r}-gradient);\n stroke-width: 2;\n }`;return`\n .edge {\n stroke-width: 3;\n }\n ${n?ot(t):ct(t)}\n ${s}\n .section-root rect, .section-root path, .section-root circle {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .eventWrapper {\n filter: brightness(120%);\n }\n`},"getStyles"),ht={db:g,renderer:{setConf:(0,o.K)(()=>{},"setConf"),draw:(0,o.K)((t,e,n,i)=>"TD"===(i?.db?.getDirection?.()??"LR")?st.draw(t,e,n,i):et.draw(t,e,n,i),"draw")},parser:p,styles:lt}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_elliemae_pui_cli=globalThis.webpackChunk_elliemae_pui_cli||[]).push([[3075],{3075(e,t,a){a.d(t,{diagram:()=>C});var l=a(3492),s=a(4969),r=a(1355),n=a(2679),i=a(3639),o=a(4689),c=a(2371),d=a(8053),p=a(9183),h=a(7012),m=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=o.SV,this.getAccTitle=o.iN,this.setDiagramTitle=o.ke,this.getDiagramTitle=o.ab,this.getAccDescription=o.m7,this.setAccDescription=o.EI}static{(0,d.K)(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const e=o.UI,t=(0,o.zj)();return(0,i.$t)({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),0===t&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,t){const a=this.classes.get(e)??{id:e,styles:[],textStyles:[]},l=t.replace(/\\,/g,"\xa7\xa7\xa7").replace(/,/g,";").replace(/\xa7\xa7\xa7/g,",").split(";");l&&l.forEach(e=>{(0,n.KX)(e)&&(a?.textStyles?a.textStyles.push(e):a.textStyles=[e]),a?.styles?a.styles.push(e):a.styles=[e]}),this.classes.set(e,a)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){(0,o.IU)(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function y(e){if(!e.length)return[];const t=[],a=[];return e.forEach(e=>{const l={name:e.name,children:"Leaf"===e.type?void 0:[]};for(l.classSelector=e?.classSelector,e?.cssCompiledStyles&&(l.cssCompiledStyles=e.cssCompiledStyles),"Leaf"===e.type&&void 0!==e.value&&(l.value=e.value);a.length>0&&a[a.length-1].level>=e.level;)a.pop();if(0===a.length)t.push(l);else{const e=a[a.length-1].node;e.children?e.children.push(l):e.children=[l]}"Leaf"!==e.type&&a.push({node:l,level:e.level})}),t}(0,d.K)(y,"buildHierarchy");var f=(0,d.K)((e,t)=>{(0,l.S)(e,t);const a=[];for(const l of e.TreemapRows??[])"ClassDefStatement"===l.$type&&t.addClass(l.className??"",l.styleText??"");for(const l of e.TreemapRows??[]){const e=l.item;if(!e)continue;const s=l.indent?parseInt(l.indent):0,r=u(e),n=e.classSelector?t.getStylesForClass(e.classSelector):[],i=n.length>0?n:void 0,o={level:s,name:r,type:e.$type,value:e.value,classSelector:e.classSelector,cssCompiledStyles:i};a.push(o)}const s=y(a),r=(0,d.K)((e,a)=>{for(const l of e)t.addNode(l,a),l.children&&l.children.length>0&&r(l.children,a+1)},"addNodesRecursively");r(s,0)},"populate"),u=(0,d.K)(e=>e.name?String(e.name):"","getItemName"),S={parser:{yy:void 0},parse:(0,d.K)(async e=>{try{const t=p.qg,a=await t("treemap",e);c.R.debug("Treemap AST:",a);const l=S.parser?.yy;if(!(l instanceof m))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");f(a,l)}catch(t){throw c.R.error("Error parsing treemap:",t),t}},"parse")},g=10,x={draw:(0,d.K)((e,t,a,l)=>{const i=l.db,p=i.getConfig(),m=p.padding??10,y=i.getDiagramTitle(),f=i.getRoot(),{themeVariables:u}=(0,o.zj)();if(!f)return;const S=y?30:0,x=(0,s.D)(t),b=p.nodeWidth?p.nodeWidth*g:960,$=p.nodeHeight?p.nodeHeight*g:500,C=b,v=$+S;let w;x.attr("viewBox",`0 0 ${C} ${v}`),(0,o.a$)(x,v,C,p.useMaxWidth);try{const e=p.valueFormat||",";if("$0,0"===e)w=(0,d.K)(e=>"$"+(0,h.GPZ)(",")(e),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const t=/\.\d+/.exec(e),a=t?t[0]:"";w=(0,d.K)(e=>"$"+(0,h.GPZ)(","+a)(e),"valueFormat")}else if(e.startsWith("$")){const t=e.substring(1);w=(0,d.K)(e=>"$"+(0,h.GPZ)(t||"")(e),"valueFormat")}else w=(0,h.GPZ)(e)}catch(j){c.R.error("Error creating format function:",j),w=(0,h.GPZ)(",")}const L=(0,h.UMr)().range(["transparent",u.cScale0,u.cScale1,u.cScale2,u.cScale3,u.cScale4,u.cScale5,u.cScale6,u.cScale7,u.cScale8,u.cScale9,u.cScale10,u.cScale11]),k=(0,h.UMr)().range(["transparent",u.cScalePeer0,u.cScalePeer1,u.cScalePeer2,u.cScalePeer3,u.cScalePeer4,u.cScalePeer5,u.cScalePeer6,u.cScalePeer7,u.cScalePeer8,u.cScalePeer9,u.cScalePeer10,u.cScalePeer11]),M=(0,h.UMr)().range([u.cScaleLabel0,u.cScaleLabel1,u.cScaleLabel2,u.cScaleLabel3,u.cScaleLabel4,u.cScaleLabel5,u.cScaleLabel6,u.cScaleLabel7,u.cScaleLabel8,u.cScaleLabel9,u.cScaleLabel10,u.cScaleLabel11]);y&&x.append("text").attr("x",C/2).attr("y",S/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(y);const T=x.append("g").attr("transform",`translate(0, ${S})`).attr("class","treemapContainer"),z=(0,h.Sk5)(f).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),P=(0,h.hkb)().size([b,$]).paddingTop(e=>e.children&&e.children.length>0?35:0).paddingInner(m).paddingLeft(e=>e.children&&e.children.length>0?g:0).paddingRight(e=>e.children&&e.children.length>0?g:0).paddingBottom(e=>e.children&&e.children.length>0?g:0).round(!0)(z),F=P.descendants().filter(e=>e.children&&e.children.length>0),N=T.selectAll(".treemapSection").data(F).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);N.append("rect").attr("width",e=>e.x1-e.x0).attr("height",25).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>0===e.depth?"display: none;":""),N.append("clipPath").attr("id",(e,a)=>`clip-section-${t}-${a}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",25),N.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>L(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>k(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(0===e.depth)return"display: none;";const t=(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),N.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",12.5).attr("dominant-baseline","middle").text(e=>0===e.depth?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,a)=>`url(#clip-section-${t}-${a})`).attr("style",e=>{if(0===e.depth)return"display: none;";return"dominant-baseline: middle; font-size: 12px; fill:"+M(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")}).each(function(e){if(0===e.depth)return;const t=(0,h.Ltv)(this),a=e.data.name;t.text(a);const l=e.x1-e.x0;let s;if(!1!==p.showValues&&e.value){s=l-10-30-10-6}else{s=l-6-6}const r=Math.max(15,s),n=t.node();if(n.getComputedTextLength()>r){const e="...";let l=a;for(;l.length>0;){if(l=a.substring(0,l.length-1),0===l.length){t.text(e),n.getComputedTextLength()>r&&t.text("");break}if(t.text(l+e),n.getComputedTextLength()<=r)break}}}),!1!==p.showValues&&N.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",12.5).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?w(e.value):"").attr("font-style","italic").attr("style",e=>{if(0===e.depth)return"display: none;";return"text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+M(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")});const G=P.leaves(),K=G.length>20,W=K?16:38,D=K?14:28,R=K?4:8,V=K?4:6,A=K?2:4,I=K?8:10,X=K?1:2,E=T.selectAll(".treemapLeafGroup").data(G).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);E.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?L(e.parent.data.name):L(e.data.name)).attr("style",e=>(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?L(e.parent.data.name):L(e.data.name)).attr("stroke-width",3),E.append("clipPath").attr("id",(e,a)=>`clip-${t}-${a}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4));if(E.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>`text-anchor: middle; dominant-baseline: middle; font-size: ${W}px;fill:`+M(e.data.name)+";"+(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,a)=>`url(#clip-${t}-${a})`).text(e=>e.data.name).each(function(e){const t=(0,h.Ltv)(this),a=e.x1-e.x0,l=e.y1-e.y0,s=t.node(),r=a-2*A,n=l-2*A;if(r<I||n<I)return void t.style("display","none");let i=parseInt(t.style("font-size"),10);for(;s.getComputedTextLength()>r&&i>R;)i--,t.style("font-size",`${i}px`);let o=Math.max(V,Math.min(D,Math.round(.6*i))),c=i+X+o;for(;c>n&&i>R&&(i--,o=Math.max(V,Math.min(D,Math.round(.6*i))),!(o<V&&i===R));)t.style("font-size",`${i}px`),c=i+X+o;t.style("font-size",`${i}px`),K?(i<R||n<R)&&t.style("display","none"):(s.getComputedTextLength()>r||i<R||n<i)&&t.style("display","none")}),!1!==p.showValues){E.append("text").attr("class","treemapValue").attr("x",e=>(e.x1-e.x0)/2).attr("y",function(e){return(e.y1-e.y0)/2}).attr("style",e=>`text-anchor: middle; dominant-baseline: hanging; font-size: ${D}px;fill:`+M(e.data.name)+";"+(0,n.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,a)=>`url(#clip-${t}-${a})`).text(e=>e.value?w(e.value):"").each(function(e){const t=(0,h.Ltv)(this),a=this.parentNode;if(!a)return void t.style("display","none");const l=(0,h.Ltv)(a).select(".treemapLabel");if(l.empty()||"none"===l.style("display"))return void t.style("display","none");const s=parseFloat(l.style("font-size")),r=Math.max(V,Math.min(D,Math.round(.6*s)));t.style("font-size",`${r}px`);const n=(e.y1-e.y0)/2+s/2+X;t.attr("y",n);const i=e.x1-e.x0,o=e.y1-e.y0-4,c=i-2*A;t.node().getComputedTextLength()>c||n+r>o||r<V?t.style("display","none"):t.style("display",null)})}const _=p.diagramPadding??8;(0,r.P)(x,_,"flowchart",p?.useMaxWidth||!1)},"draw"),getClasses:(0,d.K)(function(e,t){return t.db.getClasses()},"getClasses")},b={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},$=(0,d.K)(({treemap:e}={})=>{const t=(0,o.P$)(),a=(0,o.zj)(),l=(0,i.$t)(t,a.themeVariables),s=(0,i.$t)(b,e),r=s.titleColor??l.titleColor,n=s.labelColor??l.textColor,c=s.valueColor??l.textColor;return`\n .treemapNode.section {\n stroke: ${s.sectionStrokeColor};\n stroke-width: ${s.sectionStrokeWidth};\n fill: ${s.sectionFillColor};\n }\n .treemapNode.leaf {\n stroke: ${s.leafStrokeColor};\n stroke-width: ${s.leafStrokeWidth};\n fill: ${s.leafFillColor};\n }\n .treemapLabel {\n fill: ${n};\n font-size: ${s.labelFontSize};\n }\n .treemapValue {\n fill: ${c};\n font-size: ${s.valueFontSize};\n }\n .treemapTitle {\n fill: ${r};\n font-size: ${s.titleFontSize};\n }\n `},"getStyles"),C={parser:S,get db(){return new m},renderer:x,styles:$}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_elliemae_pui_cli=globalThis.webpackChunk_elliemae_pui_cli||[]).push([[3171],{3171(e,r,t){t.d(r,{diagram:()=>y});var n=t(681),a=t(3492),s=(t(4969),t(4689),t(2371)),i=t(8053),l=t(9183),p=(0,l.WG)().RailroadEbnf.parser.LangiumParser,o=(0,i.K)(e=>{const r=e.alternatives.map(m);return 1===r.length?r[0]:{type:"choice",alternatives:r}},"transformChoice"),m=(0,i.K)(e=>{const r=e.elements.map(f);return 1===r.length?r[0]:{type:"sequence",elements:r}},"transformSequence"),u=(0,i.K)(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return o(e.element);case"EbnfOptional":return{type:"optional",element:o(e.element)};case"EbnfRepetition":return{type:"repetition",element:o(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),c=(0,i.K)((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},u(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),f=(0,i.K)(e=>e.postfixes.reduce((e,r)=>c(e,r),u(e.base)),"transformTerm"),b=(0,i.K)(e=>({name:e.name,definition:o(e.definition)}),"transformRule"),d=(0,i.K)(e=>{(0,a.S)(e,n.db),e.title&&n.db.setTitle(e.title),e.rules.map(e=>n.db.addRule(b(e)))},"populateDb"),y={parser:{parse:(0,i.K)(e=>{n.db.clear(),s.R.debug("[EBNF Parser] Starting Langium parse");const r=p.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new l.zg(r);const t=r.value;s.R.debug("[EBNF Parser] Parsed rules:",t.rules.length),d(t),s.R.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n.db}},db:n.db,renderer:n.U,styles:n.$}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_elliemae_pui_cli=globalThis.webpackChunk_elliemae_pui_cli||[]).push([[3186],{3186(t,e,a){a.d(e,{diagram:()=>F});var r=a(3492),n=a(4969),o=a(3639),i=a(4689),s=a(2371),l=a(8053),d=a(9183),c=(0,l.K)((t,e)=>{const a=t<=1?100*t:t;if(a<0||a>100)throw new Error(`${e} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${t}`);return a},"toPercent"),p=(0,l.K)((t,e,a)=>({x:c(e,`${a} evolution`),y:c(t,`${a} visibility`)}),"toCoordinates"),h=(0,l.K)(t=>{if(t)return"+<>"===t?"bidirectional":"+<"===t?"backward":"+>"===t?"forward":void 0},"getFlowFromPort"),x=(0,l.K)(t=>{if(!t?.startsWith("+"))return{};const e=/^\+'([^']*)'/.exec(t),a=e?.[1];return t.includes("<>")?{flow:"bidirectional",label:a}:t.includes("<")?{flow:"backward",label:a}:t.includes(">")?{flow:"forward",label:a}:{label:a}},"extractFlowFromArrow"),y=(0,l.K)((t,e)=>{if((0,r.S)(t,e),t.size&&e.setSize(t.size.width,t.size.height),t.evolution){const a=t.evolution.stages.map(t=>t.secondName?`${t.name.trim()} / ${t.secondName.trim()}`:t.name.trim()),r=t.evolution.stages.filter(t=>void 0!==t.boundary).map(t=>t.boundary);e.updateAxes({stages:a,stageBoundaries:r})}if(t.anchors.forEach(t=>{const a=p(t.visibility,t.evolution,`Anchor "${t.name}"`);e.addNode(t.name,t.name,a.x,a.y,"anchor")}),t.components.forEach(t=>{const a=p(t.visibility,t.evolution,`Component "${t.name}"`),r=t.label?(t.label.negX?-1:1)*t.label.offsetX:void 0,n=t.label?(t.label.negY?-1:1)*t.label.offsetY:void 0,o=t.decorator?.strategy;e.addNode(t.name,t.name,a.x,a.y,"component",r,n,t.inertia,o)}),t.notes.forEach(t=>{const a=p(t.visibility,t.evolution,`Note "${t.text}"`);e.addNote(t.text,a.x,a.y)}),t.pipelines.forEach(t=>{const a=e.getNode(t.parent);if(!a||"number"!=typeof a.y)throw new Error(`Pipeline "${t.parent}" must reference an existing component with coordinates.`);const r=a.y;e.startPipeline(t.parent),t.components.forEach(a=>{const n=`${t.parent}_${a.name}`,o=a.label?(a.label.negX?-1:1)*a.label.offsetX:void 0,i=a.label?(a.label.negY?-1:1)*a.label.offsetY:void 0,s=c(a.evolution,`Pipeline component "${a.name}" evolution`);e.addNode(n,a.name,s,r,"pipeline-component",o,i),e.addPipelineComponent(t.parent,n)})}),t.links.forEach(t=>{const a=!!t.arrow&&(t.arrow.includes("-.->")||t.arrow.includes(".-."));let r=h(t.fromPort)??h(t.toPort);const{flow:n,label:o}=x(t.arrow);!r&&n&&(r=n);const i=t.linkLabel,s=o??i;e.addLink(e.resolveNodeId(t.from),e.resolveNodeId(t.to),a,s,r)}),t.evolves.forEach(t=>{const a=e.getNode(t.component);if(void 0!==a?.y){const r=c(t.target,`Evolve target for "${t.component}"`);e.addTrend(t.component,r,a.y)}}),t.annotations.length>0){const a=t.annotations[0],r=p(a.x,a.y,"Annotations box");e.setAnnotationsBox(r.x,r.y)}t.annotation.forEach(t=>{const a=p(t.x,t.y,`Annotation ${t.number}`);e.addAnnotation(t.number,[{x:a.x,y:a.y}],t.text)}),t.accelerators.forEach(t=>{const a=p(t.x,t.y,`Accelerator "${t.name}"`);e.addAccelerator(t.name,a.x,a.y)}),t.deaccelerators.forEach(t=>{const a=p(t.x,t.y,`Deaccelerator "${t.name}"`);e.addDeaccelerator(t.name,a.x,a.y)})},"populateDb"),g={parser:{yy:void 0},parse:(0,l.K)(async t=>{const e=await(0,d.qg)("wardley",t);s.R.debug(e);const a=g.parser?.yy;if(!a||"function"!=typeof a.addNode)throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");y(e,a)},"parse")},f=new class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{(0,l.K)(this,"WardleyBuilder")}addNode(t){const e=this.nodes.get(t.id)??{id:t.id,label:t.label},a={...e,...t,className:t.className??e.className,labelOffsetX:t.labelOffsetX??e.labelOffsetX,labelOffsetY:t.labelOffsetY??e.labelOffsetY};this.nodes.set(t.id,a)}addLink(t){this.links.push(t)}addTrend(t){this.trends.set(t.nodeId,t)}startPipeline(t){this.pipelines.set(t,{nodeId:t,componentIds:[]});const e=this.nodes.get(t);e&&(e.isPipelineParent=!0)}addPipelineComponent(t,e){const a=this.pipelines.get(t);a&&a.componentIds.push(e);const r=this.nodes.get(e);r&&(r.inPipeline=!0)}addAnnotation(t){this.annotations.push(t)}addNote(t){this.notes.push(t)}addAccelerator(t){this.accelerators.push(t)}addDeaccelerator(t){this.deaccelerators.push(t)}setAnnotationsBox(t,e){this.annotationsBox={x:t,y:e}}setAxes(t){this.axes={...this.axes,...t}}setSize(t,e){this.size={width:t,height:e}}getNode(t){return this.nodes.get(t)}resolveNodeId(t){if(this.nodes.has(t))return t;for(const[e,a]of this.nodes)if(a.label===t)return e;return t}build(){const t=[];for(const e of this.nodes.values()){if("number"!=typeof e.x||"number"!=typeof e.y)throw new Error(`Node "${e.label}" is missing coordinates`);t.push(e)}return{nodes:t,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}};function u(){return(0,i.D7)()["wardley-beta"]}function w(t,e,a,r,n,o,i,s,l){f.addNode({id:t,label:e,x:a,y:r,className:n,labelOffsetX:o,labelOffsetY:i,inertia:s,sourceStrategy:l})}function m(t,e,a=!1,r,n){f.addLink({source:t,target:e,dashed:a,label:r,flow:n})}function k(t,e,a){f.addTrend({nodeId:t,targetX:e,targetY:a})}function b(t,e,a){f.addAnnotation({number:t,coordinates:e,text:a})}function $(t,e,a){f.addNote({text:t,x:e,y:a})}function S(t,e,a){f.addAccelerator({name:t,x:e,y:a})}function v(t,e,a){f.addDeaccelerator({name:t,x:e,y:a})}function C(t,e){f.setAnnotationsBox(t,e)}function M(t,e){f.setSize(t,e)}function P(t){f.startPipeline(t)}function N(t,e){f.addPipelineComponent(t,e)}function z(t){f.setAxes(t)}function T(t){return f.getNode(t)}function L(t){return f.resolveNodeId(t)}function A(){return f.build()}function I(){f.clear(),(0,i.IU)()}(0,l.K)(u,"getConfig"),(0,l.K)(w,"addNode"),(0,l.K)(m,"addLink"),(0,l.K)(k,"addTrend"),(0,l.K)(b,"addAnnotation"),(0,l.K)($,"addNote"),(0,l.K)(S,"addAccelerator"),(0,l.K)(v,"addDeaccelerator"),(0,l.K)(C,"setAnnotationsBox"),(0,l.K)(M,"setSize"),(0,l.K)(P,"startPipeline"),(0,l.K)(N,"addPipelineComponent"),(0,l.K)(z,"updateAxes"),(0,l.K)(T,"getNode"),(0,l.K)(L,"resolveNodeId"),(0,l.K)(A,"getWardleyData"),(0,l.K)(I,"clear");var E={getConfig:u,addNode:w,addLink:m,addTrend:k,addAnnotation:b,addNote:$,addAccelerator:S,addDeaccelerator:v,setAnnotationsBox:C,setSize:M,startPipeline:P,addPipelineComponent:N,updateAxes:z,getNode:T,resolveNodeId:L,getWardleyData:A,clear:I,setAccTitle:i.SV,getAccTitle:i.iN,setDiagramTitle:i.ke,getDiagramTitle:i.ab,getAccDescription:i.m7,setAccDescription:i.EI},K=["Genesis","Custom Built","Product","Commodity"],R=(0,l.K)(()=>{const{themeVariables:t}=(0,i.D7)();return{backgroundColor:t.wardley?.backgroundColor??t.background??"#fff",axisColor:t.wardley?.axisColor??"#000",axisTextColor:t.wardley?.axisTextColor??t.primaryTextColor??"#222",gridColor:t.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:t.wardley?.componentFill??"#fff",componentStroke:t.wardley?.componentStroke??"#000",componentLabelColor:t.wardley?.componentLabelColor??t.primaryTextColor??"#222",linkStroke:t.wardley?.linkStroke??"#000",evolutionStroke:t.wardley?.evolutionStroke??"#dc3545",annotationStroke:t.wardley?.annotationStroke??"#000",annotationTextColor:t.wardley?.annotationTextColor??t.primaryTextColor??"#222",annotationFill:t.wardley?.annotationFill??t.background??"#fff"}},"getTheme"),B=(0,l.K)(()=>{const t=(0,i.D7)()["wardley-beta"];return{width:t?.width??900,height:t?.height??600,padding:t?.padding??48,nodeRadius:t?.nodeRadius??6,nodeLabelOffset:t?.nodeLabelOffset??8,axisFontSize:t?.axisFontSize??12,labelFontSize:t?.labelFontSize??10,showGrid:t?.showGrid??!1,useMaxWidth:t?.useMaxWidth??!0}},"getConfigValues"),F={parser:g,db:E,renderer:{draw:(0,l.K)((t,e,a,r)=>{s.R.debug("Rendering Wardley map\n"+t);const o=B(),d=R(),c=1.6*o.nodeRadius,p=r.db,h=p.getWardleyData(),x=p.getDiagramTitle(),y=h.size?.width??o.width,g=h.size?.height??o.height,f=(0,n.D)(e);f.selectAll("*").remove(),(0,i.a$)(f,g,y,o.useMaxWidth),f.attr("viewBox",`0 0 ${y} ${g}`);const u=f.append("g").attr("class","wardley-map"),w=f.append("defs");w.append("marker").attr("id",`arrow-${e}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),w.append("marker").attr("id",`link-arrow-end-${e}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),w.append("marker").attr("id",`link-arrow-start-${e}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),u.append("rect").attr("class","wardley-background").attr("width",y).attr("height",g).attr("fill",d.backgroundColor);const m=y-2*o.padding,k=g-2*o.padding;x&&u.append("text").attr("class","wardley-title").attr("x",y/2).attr("y",o.padding/2).attr("fill",d.axisTextColor).attr("font-size",1.05*o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(x);const b=(0,l.K)(t=>o.padding+t/100*m,"projectX"),$=(0,l.K)(t=>g-o.padding-t/100*k,"projectY"),S=u.append("g").attr("class","wardley-axes");S.append("line").attr("x1",o.padding).attr("x2",y-o.padding).attr("y1",g-o.padding).attr("y2",g-o.padding).attr("stroke",d.axisColor).attr("stroke-width",1),S.append("line").attr("x1",o.padding).attr("x2",o.padding).attr("y1",o.padding).attr("y2",g-o.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const v=h.axes.xLabel??"Evolution",C=h.axes.yLabel??"Visibility";S.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",o.padding+m/2).attr("y",g-o.padding/4).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(v),S.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",o.padding/3).attr("y",o.padding+k/2).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${o.padding/3} ${o.padding+k/2})`).text(C);const M=h.axes.stages&&h.axes.stages.length>0?h.axes.stages:K;if(M.length>0){const t=u.append("g").attr("class","wardley-stages"),e=h.axes.stageBoundaries,a=[];if(e&&e.length===M.length){let t=0;e.forEach(e=>{a.push({start:t,end:e}),t=e})}else{const t=1/M.length;M.forEach((e,r)=>{a.push({start:r*t,end:(r+1)*t})})}M.forEach((e,r)=>{const n=a[r],i=o.padding+n.start*m,s=(i+(o.padding+n.end*m))/2;r>0&&t.append("line").attr("x1",i).attr("x2",i).attr("y1",o.padding).attr("y2",g-o.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",s).attr("y",g-o.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize-2).attr("text-anchor","middle").text(e)})}if(o.showGrid){const t=u.append("g").attr("class","wardley-grid");for(let e=1;e<4;e++){const a=e/4,r=o.padding+m*a;t.append("line").attr("x1",r).attr("x2",r).attr("y1",o.padding).attr("y2",g-o.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",o.padding).attr("x2",y-o.padding).attr("y1",g-o.padding-k*a).attr("y2",g-o.padding-k*a).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const P=new Map;if(h.nodes.forEach(t=>{P.set(t.id,{x:b(t.x),y:$(t.y),node:t})}),h.pipelines.length>0){const t=u.append("g").attr("class","wardley-pipelines"),e=u.append("g").attr("class","wardley-pipeline-links");h.pipelines.forEach(a=>{if(0===a.componentIds.length)return;const r=a.componentIds.map(t=>({id:t,pos:P.get(t),node:h.nodes.find(e=>e.id===t)})).filter(t=>t.pos&&t.node).sort((t,e)=>t.node.x-e.node.x);for(let t=0;t<r.length-1;t++){const a=r[t],n=r[t+1];e.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",a.pos.x).attr("y1",a.pos.y).attr("x2",n.pos.x).attr("y2",n.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let n=1/0,i=-1/0,s=0;if(a.componentIds.forEach(t=>{const e=P.get(t);e&&(n=Math.min(n,e.x),i=Math.max(i,e.x),s=e.y)}),n!==1/0&&i!==-1/0){const e=15,r=4*o.nodeRadius,l=s-r/2,p=P.get(a.nodeId);if(p){const t=(n+i)/2;p.x=t,p.y=l-c/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",n-e).attr("y",l).attr("width",i-n+2*e).attr("height",r).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const N=u.append("g").attr("class","wardley-links"),z=new Map;h.pipelines.forEach(t=>{z.set(t.nodeId,new Set(t.componentIds))});const T=h.links.filter(t=>{if(!P.has(t.source)||!P.has(t.target))return!1;const e=z.get(t.target);return!e?.has(t.source)});N.selectAll("line").data(T).enter().append("line").attr("class",t=>"wardley-link"+(t.dashed?" wardley-link--dashed":"")).attr("x1",t=>{const e=P.get(t.source),a=P.get(t.target),r=h.nodes.find(e=>e.id===t.source).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,n=a.x-e.x,i=a.y-e.y,s=Math.sqrt(n*n+i*i);return e.x+n/s*r}).attr("y1",t=>{const e=P.get(t.source),a=P.get(t.target),r=h.nodes.find(e=>e.id===t.source).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,n=a.x-e.x,i=a.y-e.y,s=Math.sqrt(n*n+i*i);return e.y+i/s*r}).attr("x2",t=>{const e=P.get(t.source),a=P.get(t.target),r=h.nodes.find(e=>e.id===t.target).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,n=e.x-a.x,i=e.y-a.y,s=Math.sqrt(n*n+i*i);return a.x+n/s*r}).attr("y2",t=>{const e=P.get(t.source),a=P.get(t.target),r=h.nodes.find(e=>e.id===t.target).isPipelineParent?c/Math.sqrt(2):o.nodeRadius,n=e.x-a.x,i=e.y-a.y,s=Math.sqrt(n*n+i*i);return a.y+i/s*r}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>"forward"===t.flow||"bidirectional"===t.flow?`url(#link-arrow-end-${e})`:null).attr("marker-start",t=>"backward"===t.flow||"bidirectional"===t.flow?`url(#link-arrow-start-${e})`:null),N.selectAll("text").data(T.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const e=P.get(t.source),a=P.get(t.target),r=(e.x+a.x)/2,n=a.y-e.y,o=a.x-e.x;return r+8*(n/Math.sqrt(o*o+n*n))}).attr("y",t=>{const e=P.get(t.source),a=P.get(t.target),r=(e.y+a.y)/2,n=a.x-e.x,o=a.y-e.y;return r+8*(-n/Math.sqrt(n*n+o*o))}).attr("fill",d.axisTextColor).attr("font-size",o.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const e=P.get(t.source),a=P.get(t.target),r=(e.x+a.x)/2,n=(e.y+a.y)/2,o=a.x-e.x,i=a.y-e.y,s=Math.sqrt(o*o+i*i),l=r+8*(i/s),d=n+8*(-o/s);let c=180*Math.atan2(i,o)/Math.PI;return(c>90||c<-90)&&(c+=180),`rotate(${c} ${l} ${d})`}).text(t=>t.label);const L=u.append("g").attr("class","wardley-trends"),A=h.trends.map(t=>{const e=P.get(t.nodeId);if(!e)return null;const a=b(t.targetX),r=$(t.targetY),n=a-e.x,i=r-e.y,s=Math.sqrt(n*n+i*i),l=o.nodeRadius+2;return{origin:e,targetX:a,targetY:r,adjustedX2:s>l?a-n/s*l:a,adjustedY2:s>l?r-i/s*l:r}}).filter(t=>null!==t);L.selectAll("line").data(A).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${e})`);const I=u.append("g").attr("class","wardley-nodes").selectAll("g").data(h.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));I.filter(t=>"outsource"===t.sourceStrategy).append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y).attr("r",2*o.nodeRadius).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),I.filter(t=>"buy"===t.sourceStrategy).append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y).attr("r",2*o.nodeRadius).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),I.filter(t=>"build"===t.sourceStrategy).append("circle").attr("class","wardley-build-overlay").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y).attr("r",2*o.nodeRadius).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const E=I.filter(t=>"market"===t.sourceStrategy);E.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y).attr("r",2*o.nodeRadius).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),I.filter(t=>!t.isPipelineParent&&"market"!==t.sourceStrategy&&"anchor"!==t.className).append("circle").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y).attr("r",o.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const F=.7*o.nodeRadius,X=1.2*o.nodeRadius;if(E.append("line").attr("class","wardley-market-line").attr("x1",t=>P.get(t.id).x).attr("y1",t=>P.get(t.id).y-X).attr("x2",t=>P.get(t.id).x-X*Math.cos(Math.PI/6)).attr("y2",t=>P.get(t.id).y+X*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),E.append("line").attr("class","wardley-market-line").attr("x1",t=>P.get(t.id).x-X*Math.cos(Math.PI/6)).attr("y1",t=>P.get(t.id).y+X*Math.sin(Math.PI/6)).attr("x2",t=>P.get(t.id).x+X*Math.cos(Math.PI/6)).attr("y2",t=>P.get(t.id).y+X*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),E.append("line").attr("class","wardley-market-line").attr("x1",t=>P.get(t.id).x+X*Math.cos(Math.PI/6)).attr("y1",t=>P.get(t.id).y+X*Math.sin(Math.PI/6)).attr("x2",t=>P.get(t.id).x).attr("y2",t=>P.get(t.id).y-X).attr("stroke",d.componentStroke).attr("stroke-width",1),E.append("circle").attr("class","wardley-market-dot").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y-X).attr("r",F).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),E.append("circle").attr("class","wardley-market-dot").attr("cx",t=>P.get(t.id).x-X*Math.cos(Math.PI/6)).attr("cy",t=>P.get(t.id).y+X*Math.sin(Math.PI/6)).attr("r",F).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),E.append("circle").attr("class","wardley-market-dot").attr("cx",t=>P.get(t.id).x+X*Math.cos(Math.PI/6)).attr("cy",t=>P.get(t.id).y+X*Math.sin(Math.PI/6)).attr("r",F).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),I.filter(t=>!0===t.isPipelineParent).append("rect").attr("x",t=>P.get(t.id).x-c/2).attr("y",t=>P.get(t.id).y-c/2).attr("width",c).attr("height",c).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),I.filter(t=>!0===t.inertia).append("line").attr("class","wardley-inertia").attr("x1",t=>{const e=P.get(t.id);let a=t.isPipelineParent?c/2+15:o.nodeRadius+15;return t.sourceStrategy&&(a+=o.nodeRadius+10),e.x+a}).attr("y1",t=>{const e=P.get(t.id),a=t.isPipelineParent?c:2*o.nodeRadius;return e.y-a/2}).attr("x2",t=>{const e=P.get(t.id);let a=t.isPipelineParent?c/2+15:o.nodeRadius+15;return t.sourceStrategy&&(a+=o.nodeRadius+10),e.x+a}).attr("y2",t=>{const e=P.get(t.id),a=t.isPipelineParent?c:2*o.nodeRadius;return e.y+a/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),I.append("text").attr("x",t=>{const e=P.get(t.id);if("anchor"===t.className)return void 0!==t.labelOffsetX?e.x+t.labelOffsetX:e.x;let a=o.nodeLabelOffset;t.sourceStrategy&&void 0===t.labelOffsetX&&(a+=10);const r=t.labelOffsetX??a;return e.x+r}).attr("y",t=>{const e=P.get(t.id);if("anchor"===t.className)return void 0!==t.labelOffsetY?e.y+t.labelOffsetY:e.y-3;let a=-o.nodeLabelOffset;t.sourceStrategy&&void 0===t.labelOffsetY&&(a-=10);const r=t.labelOffsetY??a;return e.y+r}).attr("class","wardley-node-label").attr("fill",t=>"evolved"===t.className?d.evolutionStroke:"anchor"===t.className?"#000":d.componentLabelColor).attr("font-size",o.labelFontSize).attr("font-weight",t=>"anchor"===t.className?"bold":"normal").attr("text-anchor",t=>"anchor"===t.className?"middle":"start").attr("dominant-baseline",t=>"anchor"===t.className?"middle":"auto").text(t=>t.label),h.annotations.length>0){const t=u.append("g").attr("class","wardley-annotations");if(h.annotations.forEach(e=>{const a=e.coordinates.map(t=>({x:b(t.x),y:$(t.y)}));if(a.length>1)for(let r=0;r<a.length-1;r++)t.append("line").attr("class","wardley-annotation-line").attr("x1",a[r].x).attr("y1",a[r].y).attr("x2",a[r+1].x).attr("y2",a[r+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");a.forEach(a=>{const r=t.append("g").attr("class","wardley-annotation");r.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),r.append("text").attr("x",a.x).attr("y",a.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(e.number)})}),h.annotationsBox){let e=b(h.annotationsBox.x),a=$(h.annotationsBox.y);const r=10,n=16,i=11,s=t.append("g").attr("class","wardley-annotations-box"),l=[...h.annotations].filter(t=>t.text).sort((t,e)=>t.number-e.number),c=[];if(l.forEach((t,o)=>{const l=s.append("text").attr("x",e+r).attr("y",a+r+(o+1)*n).attr("font-size",i).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${t.number}. ${t.text}`);c.push(l)}),c.length>0){let t=0,i=0;c.forEach(e=>{const a=e.node(),r=a.getComputedTextLength();t=Math.max(t,r);const n=a.getBBox();i=Math.max(i,n.height)});const p=t+2*r+105,h=l.length*n+2*r+i/2,x=o.padding,f=y-o.padding-p,u=o.padding,w=g-o.padding-h;e=Math.max(x,Math.min(e,f)),a=Math.max(u,Math.min(a,w)),c.forEach((t,o)=>{t.attr("x",e+r).attr("y",a+r+(o+1)*n)}),s.insert("rect","text").attr("x",e).attr("y",a).attr("width",p).attr("height",h).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(h.notes.length>0){const t=u.append("g").attr("class","wardley-notes");h.notes.forEach(e=>{const a=b(e.x),r=$(e.y);t.append("text").attr("x",a).attr("y",r).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(e.text)})}if(h.accelerators.length>0){const t=u.append("g").attr("class","wardley-accelerators");h.accelerators.forEach(e=>{const a=b(e.x),r=$(e.y),n=60,o=`\n M ${a} ${r-15}\n L ${a+n-20} ${r-15}\n L ${a+n-20} ${r-15-8}\n L ${a+n} ${r}\n L ${a+n-20} ${r+15+8}\n L ${a+n-20} ${r+15}\n L ${a} ${r+15}\n Z\n `;t.append("path").attr("d",o).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),t.append("text").attr("x",a+30).attr("y",r+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(e.name)})}if(h.deaccelerators.length>0){const t=u.append("g").attr("class","wardley-deaccelerators");h.deaccelerators.forEach(e=>{const a=b(e.x),r=$(e.y),n=`\n M ${a+60} ${r-15}\n L ${a+20} ${r-15}\n L ${a+20} ${r-15-8}\n L ${a} ${r}\n L ${a+20} ${r+15+8}\n L ${a+20} ${r+15}\n L ${a+60} ${r+15}\n Z\n `;t.append("path").attr("d",n).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),t.append("text").attr("x",a+30).attr("y",r+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(e.name)})}},"draw")},styles:(0,l.K)(({wardley:t}={})=>{const e=(0,i.P$)(),a=(0,i.zj)(),r=(0,o.$t)(e,a.themeVariables),n=(0,o.$t)(r.wardley,t);return`\n .wardley-background {\n fill: ${n.backgroundColor};\n }\n .wardley-axes line, .wardley-axes path {\n stroke: ${n.axisColor};\n }\n .wardley-axis-label {\n fill: ${n.axisTextColor};\n }\n .wardley-stage-label {\n fill: ${n.axisTextColor};\n }\n .wardley-grid line {\n stroke: ${n.gridColor};\n }\n .wardley-node circle {\n fill: ${n.componentFill};\n stroke: ${n.componentStroke};\n }\n .wardley-node-label {\n fill: ${n.componentLabelColor};\n }\n .wardley-link {\n stroke: ${n.linkStroke};\n }\n .wardley-link--dashed {\n stroke-dasharray: 4 4;\n }\n .wardley-link-label {\n fill: ${n.axisTextColor};\n }\n .wardley-trend line {\n stroke: ${n.evolutionStroke};\n }\n .wardley-annotation-line {\n stroke: ${n.annotationStroke};\n }\n .wardley-annotation circle {\n fill: ${n.annotationFill};\n stroke: ${n.annotationStroke};\n }\n .wardley-annotation text {\n fill: ${n.annotationTextColor};\n }\n .wardley-annotations-box rect {\n fill: ${n.annotationFill};\n stroke: ${n.annotationStroke};\n }\n .wardley-annotations-box text {\n fill: ${n.annotationTextColor};\n }\n .wardley-pipeline-box {\n stroke: ${n.componentStroke};\n }\n .wardley-notes text {\n fill: ${n.axisTextColor};\n }\n `},"styles")}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_elliemae_pui_cli=globalThis.webpackChunk_elliemae_pui_cli||[]).push([[3242],{3242(e,t,n){n.d(t,{diagram:()=>ie});var i=n(3492),a=n(3639),r=n(4689),o=n(2371),s=n(8053),l=n(9183),d=n(7012),m="position frame",c="frame positioned",x="position relation",u="relation positioned",f=(0,s.K)(function(e){o.R.debug("options str",e)},"setOptions"),g=(0,s.K)(function(){return{}},"getOptions"),h=(0,s.K)(function(){b(),(0,r.IU)()},"clear");function b(){v={}}(0,s.K)(b,"reset");var p=r.UI.eventmodeling,w=(0,s.K)(()=>(0,a.$t)({...p,...(0,r.zj)().eventmodeling}),"getConfig"),v={};function y(){let e=K;const{ast:t}=v,n=M();if(!t)throw new Error("No data for EventModel");return t.frames.forEach((i,a)=>{const r=A(i,t.dataEntities,n);let s;e=L(e,{$kind:m,index:a,frame:i,textProps:r}),C(i)?(o.R.debug("source frame",i.sourceFrames),s=t.frames.filter(e=>i.sourceFrames.some(t=>t.$refText===e.name)),s.forEach(t=>{e=L(e,{$kind:x,index:a,frame:i,sourceFrame:t})})):e=L(e,{$kind:x,index:a,frame:i})}),e={...e,sortedSwimlanesArray:I(e.swimlanes)},e}function P(e){v.ast=e}(0,s.K)(y,"getState"),(0,s.K)(P,"setAst");var k={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function M(){return k}(0,s.K)(M,"getDiagramProps");var K={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function S(e){const t=e.split(".");if(2===t.length)return t[0]}function B(e){const t=e.split(".");return 2===t.length?t[1]:e}function F(e,t){if(t&&0!==t.length)return Object.values(e).find(e=>e.namespace===t)}function R(e,t,n){return Math.max(t,...Object.keys(e).filter(e=>{const i=Number.parseInt(e);return i>t&&i<n}).map(e=>Number.parseInt(e)))+1}function $(e,t){const n=S(e.entityIdentifier),i=F(t,n);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||k.labelUiAutomation}:n?{index:R(t,0,100),label:k.labelUiAutomationPrefix+n}:{index:0,label:k.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||k.labelCommandReadModel}:n?{index:R(t,100,200),label:k.labelCommandReadModelPrefix+n}:{index:100,label:k.labelCommandReadModel};default:return i?{index:i.index,label:i.namespace||k.labelEvents}:n?{index:R(t,200,300),label:k.labelEventsPrefix+n}:{index:200,label:k.labelEvents}}}function E(e){const{themeVariables:t}=(0,r.zj)();switch(e.modelEntityType){case"ui":return{fill:t.emUiFill??"white",stroke:t.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:t.emProcessorFill??"#edb3f6",stroke:t.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:t.emReadModelFill??"#d3f1a2",stroke:t.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:t.emCommandFill??"#bcd6fe",stroke:t.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:t.emEventFill??"#ffb778",stroke:t.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}function A(e,t,n){const i=(0,r.zj)(),s=(0,r.jZ)(B(e.entityIdentifier)??"",i);let l;const d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"};let m=`<b>${(0,a.bH)(s,n.textMaxWidth,d)}</b>`;if(e.dataInlineValue&&(l=e.dataInlineValue,l=l.substring(l.indexOf("{")+1),l=l.substring(0,l.lastIndexOf("}")-1),l=(0,r.jZ)(l,i),l=(0,a.bH)(l,n.textMaxWidth,d),l=l.replaceAll(" "," ")),e.dataReference){const o=t.find(t=>t.name===e.dataReference?.$refText);o&&(l=o.dataBlockValue,l=l.substring(l.indexOf("{\n")+2),l=l.substring(0,l.lastIndexOf("}")-1),l=(0,r.jZ)(l,i),l=(0,a.bH)(l,n.textMaxWidth,d),l=l.replaceAll(" "," "),l+="<br/>")}const c=void 0!==l;c&&(m+=`<br/><br/><code style="text-align: left; display: block;max-width:${n.textMaxWidth}px">${l}</code>`);const x={fontSize:d.fontSize,fontWeight:d.fontWeight,fontFamily:d.fontFamily},u=(0,a.PX)(m,x),f={content:m,width:c?u.width/3:u.width,height:u.height};return o.R.debug(`[${e.name}] ${e.entityIdentifier} text`,f),f}function T(e,t){const n=t,i=E(n.frame),a={width:n.textProps.width+2*k.boxTextPadding,height:n.textProps.height+2*k.boxTextPadding};return[{$kind:c,frame:n.frame,index:n.index,visual:i,dimension:a,textProps:n.textProps}]}function W(e,t,n){return void 0===t?k.contentStartX:t.index===e.index&&e.r?e.r+k.boxPadding:void 0===n?k.contentStartX:n.r-k.boxOverlap+k.boxPadding}function H(e,t){const n=[...e.map(e=>e.r),t];return Math.max(...n)}function I(e){return Object.values(e).sort((e,t)=>e.index-t.index)}function O(e,t){const n=t,i=$(n.frame,e.swimlanes);let a;a=i.index in e.swimlanes?e.swimlanes[i.index]:{index:i.index,label:i.label,r:0,y:i.index*k.swimlaneMinHeight+k.swimlaneGap,height:k.swimlaneMinHeight,maxHeight:k.swimlaneMinHeight};const r=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,o=void 0!==e.previousSwimlaneNumber?e.swimlanes[e.previousSwimlaneNumber]:void 0,s={width:Math.max(k.boxMinWidth,Math.min(k.boxMaxWidth,n.dimension.width))+2*k.boxPadding,height:Math.max(k.boxMinHeight,Math.min(k.boxMaxHeight,n.dimension.height))+2*k.boxPadding},l=W(a,o,r),d=l+s.width+k.boxPadding,m=H(Object.values(e.swimlanes),d);a.r=l+s.width,a.maxHeight=Math.max(a.maxHeight,s.height),a.height=Math.max(k.swimlaneMinHeight,a.maxHeight)+2*k.swimlanePadding;const c={x:l,y:k.swimlanePadding+a.y,r:d,dimension:s,leftSibling:!1,swimlane:a,visual:n.visual,text:n.textProps.content,frame:n.frame,index:n.index},x={...e,boxes:[...e.boxes,c],swimlanes:{...e.swimlanes,[`${a.index}`]:a},previousSwimlaneNumber:i.index,previousFrame:n.frame,maxR:m},u=I(x.swimlanes);u.length>0&&(u[0].y=0);for(let f=1;f<u.length;f++){const e=u[f],t=u[f-1];e.y=t.y+t.height+k.swimlaneGap}return x}function j(e,t){return 0===e&&0===t.sourceFrames.length}function C(e){return void 0!==e.sourceFrames&&null!==e.sourceFrames&&e.sourceFrames.length>0}function D(e,t){if(null!=t)return e.find(e=>e.frame.name===t.name)}function U(e,t,n){if(!(n<0))for(let i=n;i>=0;i--){const n=e[i];if(n.swimlane.index!==t)return n}}function N(e,t){const n=t;if((0,l.F5)(n.frame)||j(n.index,n.frame))return[];const i=D(e.boxes,n.frame);if(void 0===i)throw new Error(`Target box not found for frame ${n.frame.name}`);let a;if(a=n.sourceFrame?D(e.boxes,n.sourceFrame):U(e.boxes,i.swimlane.index,n.index-1),void 0===a)return[];return[{$kind:u,frame:n.frame,index:n.index,sourceBox:a,targetBox:i}]}function V(e,t){const n=t,i={visual:{fill:"none",stroke:"#000"},source:{x:n.sourceBox.x,y:n.sourceBox.y},target:{x:n.targetBox.x,y:n.targetBox.y},sourceBox:n.sourceBox,targetBox:n.targetBox};return{...e,relations:[...e.relations,i]}}(0,s.K)(S,"extractNamespace"),(0,s.K)(B,"extractName"),(0,s.K)(F,"findSwimlaneByNamespace"),(0,s.K)(R,"findNextAvailableIndex"),(0,s.K)($,"calculateSwimlaneProps"),(0,s.K)(E,"calculateEntityVisualProps"),(0,s.K)(A,"calculateTextProps"),(0,s.K)(T,"decidePositionFrame"),(0,s.K)(W,"calculateX"),(0,s.K)(H,"calculateMaxRight"),(0,s.K)(I,"sortedSwimlanesArray"),(0,s.K)(O,"evolveFramePositioned"),(0,s.K)(j,"isFirstFrame"),(0,s.K)(C,"hasSourceFrame"),(0,s.K)(D,"findBoxByFrame"),(0,s.K)(U,"findBoxByLineIndex"),(0,s.K)(N,"decidePositionRelation"),(0,s.K)(V,"evolveRelationPositioned");var z={[m]:T,[x]:N},X={[c]:O,[u]:V};function _(e,t){const n=z[t.$kind];if(null==n)return[];const i=n(e,t);return o.R.debug("decided events",i),i}function G(e,t){const n=t.reduce((e,t)=>{const n=X[t.$kind];return null==n?e:n(e,t)},e);return o.R.debug("evolve events",{state:e,newState:n,events:t}),n}function L(e,t){return G(e,_(e,t))}(0,s.K)(_,"decide"),(0,s.K)(G,"evolve"),(0,s.K)(L,"dispatch");var Z={getConfig:w,setOptions:f,getOptions:g,clear:h,setAccTitle:r.SV,getAccTitle:r.iN,getAccDescription:r.m7,setAccDescription:r.EI,setDiagramTitle:r.ke,getDiagramTitle:r.ab,setAst:P,getDiagramProps:M,getState:y},Y={parse:(0,s.K)(async e=>{const t=await(0,l.qg)("eventmodeling",e);o.R.debug(t),Z.setAst(t),(0,i.S)(t,Z)},"parse")};var q=(0,r.D7)(),J=q?.eventmodeling;function Q(e,t){return n=>{const i=n.swimlane.y+t.swimlanePadding,a=e.append("g").attr("class","em-box");a.append("rect").attr("x",n.x).attr("y",i).attr("rx","3").attr("width",n.dimension.width).attr("height",n.dimension.height).attr("stroke",n.visual.stroke).attr("fill",n.visual.fill);a.append("foreignObject").attr("x",n.x+t.boxPadding).attr("y",i+10).attr("width",n.dimension.width-2*t.boxPadding).attr("height",n.dimension.height-2*t.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(n.text)}}function ee(e,t){return e>t}function te(e,t,n,i){return a=>{const r=a.sourceBox.swimlane.y+t.swimlanePadding,s=a.targetBox.swimlane.y+t.swimlanePadding,l=ee(r,s),d=a.sourceBox.x+2*a.sourceBox.dimension.width/3,m=a.targetBox.x+a.targetBox.dimension.width/3;let c,x;o.R.debug(`rendering relation up=${l} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),l?(c=r,x=s+a.targetBox.dimension.height):(c=r+a.sourceBox.dimension.height,x=s);const u=i.emRelationStroke??a.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",a.visual.fill).attr("stroke",u).attr("stroke-width","1").attr("marker-end",`url(#${n})`).attr("d",`M${d} ${c} L${m} ${x}`)}}function ne(e,t,n,i){return a=>{const r=e.append("g").attr("class","em-swimlane"),o=i.emSwimlaneBackgroundOdd??"rgb(250,250,250)",s=i.emSwimlaneBackgroundStroke??"rgb(240,240,240)";r.append("rect").attr("x",0).attr("y",a.y).attr("rx","3").attr("width",t+n.swimlanePadding).attr("height",a.height).attr("fill",o).attr("stroke",s),r.append("text").attr("font-weight",n.swimlaneTextFontWeight).attr("x",30).attr("y",a.y+30).text(a.label)}}(0,s.K)(Q,"renderD3Box"),(0,s.K)(ee,"dirUpwards"),(0,s.K)(te,"renderD3Relation"),(0,s.K)(ne,"renderD3Swimlane");var ie={parser:Y,db:Z,renderer:{draw:(0,s.K)(function(e,t,n,i){if(o.R.debug("in eventmodeling renderer",e+"\n","id:",t,n),!J)throw new Error("EventModeling config not found");const a=i.db,{themeVariables:s,eventmodeling:l}=(0,r.D7)(),m=(0,d.Ltv)(`[id="${t}"]`),c=a.getDiagramProps(),x=a.getState(),u=`em-arrowhead-${t}`,f=s.emArrowhead??"#000000";x.sortedSwimlanesArray.forEach(ne(m,x.maxR,c,s)),x.boxes.forEach(Q(m,c)),x.relations.forEach(te(m,c,u,s));m.append("defs").append("marker").attr("id",u).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",f),(0,r.mj)(void 0,m,l?.padding??30,l?.useMaxWidth)},"draw")},styles:(0,s.K)(e=>"","getStyles")}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_elliemae_pui_cli=globalThis.webpackChunk_elliemae_pui_cli||[]).push([[3380],{3380(e,a,r){r.d(a,{diagram:()=>o});var t=r(4969),i=r(4689),n=r(2371),s=r(8053),d=r(9183),l={version:"11.16.0"},o={parser:{parse:(0,s.K)(async e=>{const a=await(0,d.qg)("info",e);n.R.debug(a)},"parse")},db:{getVersion:(0,s.K)(()=>l.version,"getVersion")},renderer:{draw:(0,s.K)((e,a,r)=>{n.R.debug("rendering info diagram\n"+e);const s=(0,t.D)(a);(0,i.a$)(s,100,400,!0);s.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${r}`)},"draw")}}}}]);
|