@agent-link/server 0.1.537 → 0.1.539
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/package.json +1 -1
- package/web/dist/assets/{abnfDiagram-VRR7QNED-v8zWrjoC.js → abnfDiagram-VRR7QNED-CYWjSLFB.js} +1 -1
- package/web/dist/assets/{arc-B5GKGWbC.js → arc-C5QqMw0D.js} +1 -1
- package/web/dist/assets/{architectureDiagram-ZJ3FMSHR-Dbl9Ux9-.js → architectureDiagram-ZJ3FMSHR-CiJkLkRK.js} +1 -1
- package/web/dist/assets/{blockDiagram-677ZJIJ3-1YKIFOf1.js → blockDiagram-677ZJIJ3--rNn03K2.js} +1 -1
- package/web/dist/assets/{c4Diagram-LMCZKHZV-BFjLi3Aq.js → c4Diagram-LMCZKHZV-DFv38F5W.js} +1 -1
- package/web/dist/assets/channel-BUPHzg7D.js +1 -0
- package/web/dist/assets/{chunk-2Q5K7J3B-DgdTCY8R.js → chunk-2Q5K7J3B-LcxWxL9X.js} +1 -1
- package/web/dist/assets/{chunk-32BRIVSS-C_Sdh-Gb.js → chunk-32BRIVSS-L5rSd5kx.js} +1 -1
- package/web/dist/assets/{chunk-5VM5RSS4-ClYZJ82b.js → chunk-5VM5RSS4-CqNmatdI.js} +1 -1
- package/web/dist/assets/{chunk-EX3LRPZG-CgTjRsVI.js → chunk-EX3LRPZG-2Wshn2od.js} +1 -1
- package/web/dist/assets/{chunk-JWPE2WC7-Dvi-x4dH.js → chunk-JWPE2WC7-OIu2tm43.js} +1 -1
- package/web/dist/assets/{chunk-MOJQB5TN-iK74YNWs.js → chunk-MOJQB5TN-GF0HoMD5.js} +1 -1
- package/web/dist/assets/{chunk-RYQCIY6F-BpEM4XKm.js → chunk-RYQCIY6F-esL_U6-9.js} +1 -1
- package/web/dist/assets/{chunk-V7JOEXUC-p6jkX0pp.js → chunk-V7JOEXUC-WNOLiPpt.js} +1 -1
- package/web/dist/assets/{chunk-VR4S4FIN-CdmfUGnI.js → chunk-VR4S4FIN-B-fO7gd6.js} +1 -1
- package/web/dist/assets/{chunk-XXDRQBXY-jQHvtf7Y.js → chunk-XXDRQBXY-D6g9o0gx.js} +1 -1
- package/web/dist/assets/classDiagram-OUVF2IWQ-CEHpjaOw.js +1 -0
- package/web/dist/assets/classDiagram-v2-EOCWNBFH-CEHpjaOw.js +1 -0
- package/web/dist/assets/{cose-bilkent-JH36ORCC-CYU7uAdH.js → cose-bilkent-JH36ORCC-CiWR02dm.js} +1 -1
- package/web/dist/assets/{cssMode-CkeIamVF.js → cssMode-CdZ6WkPb.js} +1 -1
- package/web/dist/assets/{cynefin-VYW2F7L2-CuE8IoQA.js → cynefin-VYW2F7L2-Cm5C7NQw.js} +1 -1
- package/web/dist/assets/{cynefinDiagram-TSTJHNR4-Bk3IY4v3.js → cynefinDiagram-TSTJHNR4-D4HWvIqR.js} +1 -1
- package/web/dist/assets/{dagre-VKFMJZFB-EJGJ8Unh.js → dagre-VKFMJZFB-Dydcg1Dj.js} +1 -1
- package/web/dist/assets/{diagram-FQU43EPY-B7-x7ujW.js → diagram-FQU43EPY-T1Gos5W9.js} +1 -1
- package/web/dist/assets/{diagram-G47NLZAW-CjVYgbBC.js → diagram-G47NLZAW-BiERNHwh.js} +1 -1
- package/web/dist/assets/{diagram-NH7WQ7WH-DOBiygSk.js → diagram-NH7WQ7WH-Bp4PAleB.js} +1 -1
- package/web/dist/assets/{diagram-OA4YK3LP-BeqAsIvC.js → diagram-OA4YK3LP-gaknvItq.js} +1 -1
- package/web/dist/assets/{diagram-WEI45ONY-Dz5ycNiE.js → diagram-WEI45ONY-DrPuSW85.js} +1 -1
- package/web/dist/assets/{ebnfDiagram-CCIWWBDH-Bcnqidg3.js → ebnfDiagram-CCIWWBDH-CAcdMMe7.js} +1 -1
- package/web/dist/assets/{editor.main-CgHXuI1T.js → editor.main-DGCQQuiO.js} +3 -3
- package/web/dist/assets/{erDiagram-Q63AITRT-BwaD538T.js → erDiagram-Q63AITRT-DzyOSwU9.js} +1 -1
- package/web/dist/assets/{flowDiagram-23GEKE2U-DBywwy14.js → flowDiagram-23GEKE2U-DOe-9kuu.js} +1 -1
- package/web/dist/assets/{freemarker2-attQ6DKC.js → freemarker2-1qw2nqEO.js} +1 -1
- package/web/dist/assets/{ganttDiagram-NO4QXBWP-CJg1vCCC.js → ganttDiagram-NO4QXBWP-B2rh6MaY.js} +1 -1
- package/web/dist/assets/{gitGraphDiagram-IHSO6WYX-Jx5rHBs_.js → gitGraphDiagram-IHSO6WYX-DvnGb_NE.js} +1 -1
- package/web/dist/assets/{handlebars-B-ygpenC.js → handlebars-BtUv9TxE.js} +1 -1
- package/web/dist/assets/{html-ndi3wy_l.js → html-wKYvqrG5.js} +1 -1
- package/web/dist/assets/{htmlMode-qTuZCS19.js → htmlMode-BSafVEUS.js} +1 -1
- package/web/dist/assets/{index-DyV-bHVC.js → index-DknoSkal.js} +6 -6
- package/web/dist/assets/{infoDiagram-FWYZ7A6U-BEFhMUXj.js → infoDiagram-FWYZ7A6U-DZimoK7P.js} +1 -1
- package/web/dist/assets/{ishikawaDiagram-FXEZZL3T-DExRNEBC.js → ishikawaDiagram-FXEZZL3T-DsvDmKxP.js} +1 -1
- package/web/dist/assets/{javascript-FEz7WVb9.js → javascript-h1g-Ucy8.js} +1 -1
- package/web/dist/assets/{journeyDiagram-5HDEW3XC-DIlSMYx4.js → journeyDiagram-5HDEW3XC-CY8i7id_.js} +1 -1
- package/web/dist/assets/{jsonMode-DiW0WmnW.js → jsonMode-DiNVkY3E.js} +1 -1
- package/web/dist/assets/{kanban-definition-HUTT4EX6-DOKCAcBv.js → kanban-definition-HUTT4EX6-qsS7eTpB.js} +1 -1
- package/web/dist/assets/{linear-eZ6eIIvZ.js → linear-pxgzmzBW.js} +1 -1
- package/web/dist/assets/{liquid-D8KsZQoZ.js → liquid-BScuE6Li.js} +1 -1
- package/web/dist/assets/{lspLanguageFeatures-BQKUKUbx.js → lspLanguageFeatures-Bvg2J_jV.js} +1 -1
- package/web/dist/assets/{mdx-GD_GAPZ8.js → mdx-DEgin56d.js} +1 -1
- package/web/dist/assets/{mermaid.core-C4a3RQhj.js → mermaid.core-DkcKZax1.js} +2 -2
- package/web/dist/assets/{mindmap-definition-LN4V7U3C-CKYYKk1-.js → mindmap-definition-LN4V7U3C-CdSHmqbA.js} +1 -1
- package/web/dist/assets/{pegDiagram-2B236MQR-CQhG4kxD.js → pegDiagram-2B236MQR-B5lYNF_c.js} +1 -1
- package/web/dist/assets/{pieDiagram-ENE6RG2P-dKij5CVx.js → pieDiagram-ENE6RG2P-C5XC449d.js} +1 -1
- package/web/dist/assets/{python-YGKRPDiw.js → python-LiSQlk9W.js} +1 -1
- package/web/dist/assets/{quadrantDiagram-ABIIQ3AL-v1_PVyp0.js → quadrantDiagram-ABIIQ3AL-B_lVz6fv.js} +1 -1
- package/web/dist/assets/{railroadDiagram-RFXS5EU6-DN_GgX6f.js → railroadDiagram-RFXS5EU6-Cqyazggh.js} +1 -1
- package/web/dist/assets/{razor-BCW3GQAg.js → razor-C-OT9rh_.js} +1 -1
- package/web/dist/assets/{requirementDiagram-TGXJPOKE-0DyHcCcr.js → requirementDiagram-TGXJPOKE-D1fFw8Za.js} +1 -1
- package/web/dist/assets/{sankeyDiagram-HTMAVEWB-C67sJXlQ.js → sankeyDiagram-HTMAVEWB-BmEnh6Zy.js} +1 -1
- package/web/dist/assets/{sequenceDiagram-DBY2YBRQ-DiC-QboR.js → sequenceDiagram-DBY2YBRQ-D6IE-IG5.js} +1 -1
- package/web/dist/assets/{sizeCapture-X5ZJPWSS-c8srD5kT.js → sizeCapture-X5ZJPWSS-BYkPr4jo.js} +1 -1
- package/web/dist/assets/{stateDiagram-2N3HPSRC-BOc1ntS6.js → stateDiagram-2N3HPSRC-BUCTdtKV.js} +1 -1
- package/web/dist/assets/stateDiagram-v2-6OUMAXLB-DvxjB9W-.js +1 -0
- package/web/dist/assets/{swimlanes-5IMT3BWC-CFgMT0Er.js → swimlanes-5IMT3BWC-DcMZ-6_P.js} +2 -2
- package/web/dist/assets/swimlanesDiagram-G3AALYLV-u9Y7eEve.js +1 -0
- package/web/dist/assets/{timeline-definition-FHXFAJF6-DgmH37q0.js → timeline-definition-FHXFAJF6-CevcptDf.js} +1 -1
- package/web/dist/assets/{tsMode-M3wbPnMH.js → tsMode-CQ3194z3.js} +1 -1
- package/web/dist/assets/{typescript-DZfPfOgw.js → typescript-D0PYBX18.js} +1 -1
- package/web/dist/assets/{vennDiagram-L72KCM5P-BcPfgqMW.js → vennDiagram-L72KCM5P-C4E35ru2.js} +1 -1
- package/web/dist/assets/{wardleyDiagram-EHGQE667-B8KESZXV.js → wardleyDiagram-EHGQE667-jZDfwkzC.js} +1 -1
- package/web/dist/assets/{xml-CwVvpm39.js → xml-BbyTLoF3.js} +1 -1
- package/web/dist/assets/{xychartDiagram-FW5EYKEG-QYcDNHiO.js → xychartDiagram-FW5EYKEG-CLEMD07_.js} +1 -1
- package/web/dist/assets/{yaml-GszwldOD.js → yaml-BQcG0ScU.js} +1 -1
- package/web/dist/index.html +1 -1
- package/web/dist/landing/icons/agent-claude.svg +1 -0
- package/web/dist/landing/icons/agent-codex.svg +1 -0
- package/web/dist/landing/icons/agent-copilot.svg +1 -0
- package/web/dist/landing.html +20 -20
- package/web/dist/landing.zh.html +20 -20
- package/web/dist/assets/channel-BqcAGGR5.js +0 -1
- package/web/dist/assets/classDiagram-OUVF2IWQ-BISqOfze.js +0 -1
- package/web/dist/assets/classDiagram-v2-EOCWNBFH-BISqOfze.js +0 -1
- package/web/dist/assets/stateDiagram-v2-6OUMAXLB-BBBUTIt4.js +0 -1
- package/web/dist/assets/swimlanesDiagram-G3AALYLV-BIw8cOLQ.js +0 -1
- /package/web/dist/{icons → landing/icons}/agent-pi.svg +0 -0
- /package/web/dist/{icons → landing/icons}/msclaude-animated.svg +0 -0
- /package/web/dist/{landing.css → landing/landing.css} +0 -0
- /package/web/dist/{landing.js → landing/landing.js} +0 -0
package/web/dist/assets/{infoDiagram-FWYZ7A6U-BEFhMUXj.js → infoDiagram-FWYZ7A6U-DZimoK7P.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,l as r,F as a,e as t}from"./mermaid.core-
|
|
1
|
+
import{_ as e,l as r,F as a,e as t}from"./mermaid.core-DkcKZax1.js";import{p as s}from"./cynefin-VYW2F7L2-Cm5C7NQw.js";import"./index-DknoSkal.js";var n="11.16.0",i={parser:{parse:e(async e=>{const a=await s("info",e);r.debug(a)},"parse")},db:{getVersion:e(()=>n,"getVersion")},renderer:{draw:e((e,s,n)=>{r.debug("rendering info diagram\n"+e);const i=a(s);t(i,100,400,!0);i.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${n}`)},"draw")}};export{i as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var t;import{_ as e,c as i,a1 as n,F as s,ak as a,q as r,k as h,o,a as l,b as c,g as u,s as d,p as y,e as p}from"./mermaid.core-C4a3RQhj.js";import"./index-DyV-bHVC.js";var g=function(){var t=e(function(t,e,i,n){for(i=i||{},n=t.length;n--;i[t[n]]=e);return i},"o"),i=[1,4],n=[1,14],s=[1,12],a=[1,13],r=[6,7,8],h=[1,20],o=[1,18],l=[1,19],c=[6,7,11],u=[1,6,13,14],d=[1,23],y=[1,24],p=[1,6,7,11,13,14],g={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(t,e,i,n,s,a,r){var h=a.length-1;switch(s){case 6:case 7:return n;case 15:n.addNode(a[h-1].length,a[h].trim());break;case 16:n.addNode(0,a[h].trim())}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:i},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:i},{6:n,7:[1,10],9:9,12:11,13:s,14:a},t(r,[2,3]),{1:[2,2]},t(r,[2,4]),t(r,[2,5]),{1:[2,6],6:n,12:15,13:s,14:a},{6:n,9:16,12:11,13:s,14:a},{6:h,7:o,10:17,11:l},t(c,[2,18],{14:[1,21]}),t(c,[2,16]),t(c,[2,17]),{6:h,7:o,10:22,11:l},{1:[2,7],6:n,12:15,13:s,14:a},t(u,[2,14],{7:d,11:y}),t(p,[2,8]),t(p,[2,9]),t(p,[2,10]),t(c,[2,15]),t(u,[2,13],{7:d,11:y}),t(p,[2,11]),t(p,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},"parseError"),parse:e(function(t){var i=this,n=[0],s=[],a=[null],r=[],h=this.table,o="",l=0,c=0,u=r.slice.call(arguments,1),d=Object.create(this.lexer),y={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(y.yy[p]=this.yy[p]);d.setInput(t,y.yy),y.yy.lexer=d,y.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;r.push(g);var f=d.options&&d.options.ranges;function k(){var t;return"number"!=typeof(t=s.pop()||d.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,e(function(t){n.length=n.length-2*t,a.length=a.length-t,r.length=r.length-t},"popStack"),e(k,"lex");for(var m,w,x,b,_,v,S,$,I={};;){if(w=n[n.length-1],this.defaultActions[w]?x=this.defaultActions[w]:(null==m&&(m=k()),x=h[w]&&h[w][m]),void 0===x||!x.length||!x[0]){var E="";for(_ in $=[],h[w])this.terminals_[_]&&_>2&&$.push("'"+this.terminals_[_]+"'");E=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(E,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:g,expected:$})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+m);switch(x[0]){case 1:n.push(m),a.push(d.yytext),r.push(d.yylloc),n.push(x[1]),m=null,c=d.yyleng,o=d.yytext,l=d.yylineno,g=d.yylloc;break;case 2:if(v=this.productions_[x[1]][1],I.$=a[a.length-v],I._$={first_line:r[r.length-(v||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(v||1)].first_column,last_column:r[r.length-1].last_column},f&&(I._$.range=[r[r.length-(v||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(I,[o,c,l,y.yy,x[1],a,r].concat(u))))return b;v&&(n=n.slice(0,-1*v*2),a=a.slice(0,-1*v),r=r.slice(0,-1*v)),n.push(this.productions_[x[1]][0]),a.push(I.$),r.push(I._$),S=h[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0},"parse")},f=function(){return{EOF:1,parseError:e(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:e(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:e(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:e(function(t){var e=t.length,i=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 n=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),i.length-1&&(this.yylineno-=i.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(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:e(function(t){this.unput(this.match.slice(t))},"less"),pastInput:e(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:e(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:e(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:e(function(t,e){var i,n,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var a in s)this[a]=s[a];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;var t,e,i,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),a=0;a<s.length;a++)if((i=this._input.match(this.rules[s[a]]))&&(!e||i[0].length>e[0].length)){if(e=i,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,s[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[n]))&&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:e(function(){var t=this.next();return t||this.lex()},"lex"),begin:e(function(t){this.conditionStack.push(t)},"begin"),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:e(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:e(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:e(function(t){this.begin(t)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(t,e,i,n){switch(i){case 0:case 3:return 6;case 1:case 2:return 8;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}}();function k(){this.yy={}}return g.lexer=f,e(k,"Parser"),k.prototype=g,g.Parser=k,new k}();g.parser=g;var f=g,k=(e(t=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,r()}getRoot(){return this.root}addNode(t,e){const n=h.sanitizeText(e,i());if(!this.root)return this.root={text:n,children:[]},this.stack=[{level:0,node:this.root}],void o(n);this.baseLevel??(this.baseLevel=t);let s=t-this.baseLevel+1;for(s<=0&&(s=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=s;)this.stack.pop();const a={text:n,children:[]};this.stack[this.stack.length-1].node.children.push(a),this.stack.push({level:s,node:a})}getAccTitle(){return l()}setAccTitle(t){c(t)}getAccDescription(){return u()}setAccDescription(t){d(t)}getDiagramTitle(){return y()}setDiagramTitle(t){o(t)}},"IshikawaDB"),t),m=250,w=82*Math.PI/180,x=Math.cos(w),b=Math.sin(w),_=e((t,e,i)=>{const n=t.node().getBBox(),s=n.width+2*e,a=n.height+2*e;p(t,a,s,i),t.attr("viewBox",`${n.x-e} ${n.y-e} ${s} ${a}`)},"applyPaddedViewBox"),v=e((t,e,r,h)=>{var o,l;const c=h.db.getRoot();if(!c)return;const u=i(),{look:d,handDrawnSeed:y,themeVariables:p}=u,g=n(u.fontSize)[0]??14,f="handDrawn"===d,k=c.children??[],w=(null==(o=u.ishikawa)?void 0:o.diagramPadding)??20,x=(null==(l=u.ishikawa)?void 0:l.useMaxWidth)??!1,b=s(e),v=b.append("g").attr("class","ishikawa"),I=f?a.svg(b.node()):void 0,E=I?{roughSvg:I,seed:y??0,lineColor:(null==p?void 0:p.lineColor)??"#333",fillColor:(null==p?void 0:p.mainBkg)??"#fff"}:void 0,A=`ishikawa-arrow-${e}`;f||v.append("defs").append("marker").attr("id",A).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let L=0,M=m;const P=f?void 0:B(v,L,M,L,M,"ishikawa-spine");if($(v,L,M,c.text,g,E),!k.length)return f&&B(v,L,M,L,M,"ishikawa-spine",E),void _(b,w,x);L-=20;const T=k.filter((t,e)=>e%2==0),N=k.filter((t,e)=>e%2==1),O=S(T),j=S(N),D=O.total+j.total;let W=m,z=m;if(D>0){const t=500,e=75;W=Math.max(e,t*(O.total/D)),z=Math.max(e,t*(j.total/D))}const F=2*g;W=Math.max(W,O.max*F),z=Math.max(z,j.max*F),M=Math.max(W,m),P&&P.attr("y1",M).attr("y2",M),v.select(".ishikawa-head-group").attr("transform",`translate(0,${M})`);const R=Math.ceil(k.length/2);for(let i=0;i<R;i++){const t=v.append("g").attr("class","ishikawa-pair");for(const[e,n,s]of[[k[2*i],-1,W],[k[2*i+1],1,z]])e&&C(t,e,L,M,n,s,g,E);L=t.selectAll("text").nodes().reduce((t,e)=>Math.min(t,e.getBBox().x),1/0)}if(f)B(v,L,M,0,M,"ishikawa-spine",E);else{P.attr("x1",L);const t=`url(#${A})`;v.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",t)}_(b,w,x)},"draw"),S=e(t=>{const i=e(t=>t.children.reduce((t,e)=>t+1+i(e),0),"countDescendants");return t.reduce((t,e)=>{const n=i(e);return t.total+=n,t.max=Math.max(t.max,n),t},{total:0,max:0})},"sideStats"),$=e((t,e,i,n,s,a)=>{const r=Math.max(6,Math.floor(110/(.6*s))),h=t.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${e},${i})`),o=P(h,M(n,r),0,0,"ishikawa-head-label","start",s),l=o.node().getBBox(),c=Math.max(60,l.width+6),u=Math.max(40,2*l.height+40),d=`M 0 ${-u/2} L 0 ${u/2} Q ${2.4*c} 0 0 ${-u/2} Z`;if(a){const t=a.roughSvg.path(d,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});h.insert(()=>t,":first-child").attr("class","ishikawa-head")}else h.insert("path",":first-child").attr("class","ishikawa-head").attr("d",d);o.attr("transform",`translate(${(c-l.width)/2-l.x+3},${-l.y-l.height/2})`)},"drawHead"),I=e((t,i)=>{const n=[],s=[],a=e((t,e,r)=>{const h=-1===i?[...t].reverse():t;for(const i of h){const t=n.length,h=i.children??[];n.push({depth:r,text:M(i.text,15),parentIndex:e,childCount:h.length}),r%2==0?(s.push(t),h.length&&a(h,t,r+1)):(h.length&&a(h,t,r+1),s.push(t))}},"walk");return a(t,-1,2),{entries:n,yOrder:s}},"flattenTree"),E=e((t,e,i,n,s,a,r)=>{const h=t.append("g").attr("class","ishikawa-label-group"),o=P(h,e,i,n+11*s,"ishikawa-label cause","middle",a).node().getBBox();if(r){const t=r.roughSvg.rectangle(o.x-20,o.y-2,o.width+40,o.height+4,{roughness:1.5,seed:r.seed,fill:r.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:r.lineColor,strokeWidth:2});h.insert(()=>t,":first-child").attr("class","ishikawa-label-box")}else h.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",o.x-20).attr("y",o.y-2).attr("width",o.width+40).attr("height",o.height+4)},"drawCauseLabel"),A=e((t,e,i,n,s,a)=>{const r=Math.sqrt(n*n+s*s);if(0===r)return;const h=n/r,o=s/r,l=6*-o,c=6*h,u=`M ${e} ${i} L ${e-6*h*2+l} ${i-6*o*2+c} L ${e-6*h*2-l} ${i-6*o*2-c} Z`,d=a.roughSvg.path(u,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:"solid",stroke:a.lineColor,strokeWidth:1});t.append(()=>d)},"drawArrowMarker"),C=e((t,e,i,n,s,a,r,h)=>{const o=e.children??[],l=a*(o.length?1:.2),c=b*l*s,u=i+-x*l,d=n+c;if(B(t,i,n,u,d,"ishikawa-branch",h),h&&A(t,i,n,i-u,n-d,h),E(t,e.text,u,d,s,r,h),!o.length)return;const{entries:y,yOrder:p}=I(o,s),g=y.length,f=new Array(g);for(const[x,b]of p.entries())f[b]=n+c*((x+1)/(g+1));const k=new Map;k.set(-1,{x0:i,y0:n,x1:u,y1:d,childCount:o.length,childrenDrawn:0});const m=-x,w=b*s,_=s<0?"ishikawa-label up":"ishikawa-label down";for(const[x,b]of y.entries()){const e=f[x],i=k.get(b.parentIndex),n=t.append("g").attr("class","ishikawa-sub-group");let s=0,a=0,o=0;if(b.depth%2==0){const t=i.y1-i.y0;s=T(i.x0,i.x1,t?(e-i.y0)/t:.5),a=e,o=s-(b.childCount>0?60+5*b.childCount:30),B(n,s,e,o,e,"ishikawa-sub-branch",h),h&&A(n,s,e,1,0,h),P(n,b.text,o,e,"ishikawa-label align","end",r)}else{const t=i.childrenDrawn++;s=T(i.x0,i.x1,(i.childCount-t)/(i.childCount+1)),a=i.y0,o=s+m*((e-a)/w),B(n,s,a,o,e,"ishikawa-sub-branch",h),h&&A(n,s,a,s-o,a-e,h),P(n,b.text,o,e,_,"end",r)}b.childCount>0&&k.set(x,{x0:s,y0:a,x1:o,y1:e,childCount:b.childCount,childrenDrawn:0})}},"drawBranch"),L=e(t=>t.split(/<br\s*\/?>|\n/),"splitLines"),M=e((t,e)=>{if(t.length<=e)return t;const i=[];for(const n of t.split(/\s+/)){const t=i.length-1;t>=0&&i[t].length+1+n.length<=e?i[t]+=" "+n:i.push(n)}return i.join("\n")},"wrapText"),P=e((t,e,i,n,s,a,r)=>{const h=L(e),o=1.05*r,l=t.append("text").attr("class",s).attr("text-anchor",a).attr("x",i).attr("y",n-(h.length-1)*o/2);for(const[c,u]of h.entries())l.append("tspan").attr("x",i).attr("dy",0===c?0:o).text(u);return l},"drawMultilineText"),T=e((t,e,i)=>t+(e-t)*i,"lerp"),B=e((t,e,i,n,s,a,r)=>{if(r){const h=r.roughSvg.line(e,i,n,s,{roughness:1.5,seed:r.seed,stroke:r.lineColor,strokeWidth:2});return void t.append(()=>h).attr("class",a)}return t.append("line").attr("class",a).attr("x1",e).attr("y1",i).attr("x2",n).attr("y2",s)},"drawLine"),N={draw:v},O=e(t=>`\n.ishikawa .ishikawa-spine,\n.ishikawa .ishikawa-branch,\n.ishikawa .ishikawa-sub-branch {\n stroke: ${t.lineColor};\n stroke-width: 2;\n fill: none;\n}\n\n.ishikawa .ishikawa-sub-branch {\n stroke-width: 1;\n}\n\n.ishikawa .ishikawa-arrow {\n fill: ${t.lineColor};\n}\n\n.ishikawa .ishikawa-head {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa .ishikawa-label-box {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa text {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n fill: ${t.textColor};\n}\n\n.ishikawa .ishikawa-head-label {\n font-weight: 600;\n text-anchor: middle;\n dominant-baseline: middle;\n font-size: 14px;\n}\n\n.ishikawa .ishikawa-label {\n text-anchor: end;\n}\n\n.ishikawa .ishikawa-label.cause {\n text-anchor: middle;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.align {\n text-anchor: end;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.up {\n dominant-baseline: baseline;\n}\n\n.ishikawa .ishikawa-label.down {\n dominant-baseline: hanging;\n}\n`,"getStyles"),j={parser:f,get db(){return new k},renderer:N,styles:O};export{j as diagram};
|
|
1
|
+
var t;import{_ as e,c as i,a1 as n,F as s,ak as a,q as r,k as h,o,a as l,b as c,g as u,s as d,p as y,e as p}from"./mermaid.core-DkcKZax1.js";import"./index-DknoSkal.js";var g=function(){var t=e(function(t,e,i,n){for(i=i||{},n=t.length;n--;i[t[n]]=e);return i},"o"),i=[1,4],n=[1,14],s=[1,12],a=[1,13],r=[6,7,8],h=[1,20],o=[1,18],l=[1,19],c=[6,7,11],u=[1,6,13,14],d=[1,23],y=[1,24],p=[1,6,7,11,13,14],g={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(t,e,i,n,s,a,r){var h=a.length-1;switch(s){case 6:case 7:return n;case 15:n.addNode(a[h-1].length,a[h].trim());break;case 16:n.addNode(0,a[h].trim())}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:i},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:i},{6:n,7:[1,10],9:9,12:11,13:s,14:a},t(r,[2,3]),{1:[2,2]},t(r,[2,4]),t(r,[2,5]),{1:[2,6],6:n,12:15,13:s,14:a},{6:n,9:16,12:11,13:s,14:a},{6:h,7:o,10:17,11:l},t(c,[2,18],{14:[1,21]}),t(c,[2,16]),t(c,[2,17]),{6:h,7:o,10:22,11:l},{1:[2,7],6:n,12:15,13:s,14:a},t(u,[2,14],{7:d,11:y}),t(p,[2,8]),t(p,[2,9]),t(p,[2,10]),t(c,[2,15]),t(u,[2,13],{7:d,11:y}),t(p,[2,11]),t(p,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},"parseError"),parse:e(function(t){var i=this,n=[0],s=[],a=[null],r=[],h=this.table,o="",l=0,c=0,u=r.slice.call(arguments,1),d=Object.create(this.lexer),y={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(y.yy[p]=this.yy[p]);d.setInput(t,y.yy),y.yy.lexer=d,y.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;r.push(g);var f=d.options&&d.options.ranges;function k(){var t;return"number"!=typeof(t=s.pop()||d.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,e(function(t){n.length=n.length-2*t,a.length=a.length-t,r.length=r.length-t},"popStack"),e(k,"lex");for(var m,w,x,b,_,v,S,$,I={};;){if(w=n[n.length-1],this.defaultActions[w]?x=this.defaultActions[w]:(null==m&&(m=k()),x=h[w]&&h[w][m]),void 0===x||!x.length||!x[0]){var E="";for(_ in $=[],h[w])this.terminals_[_]&&_>2&&$.push("'"+this.terminals_[_]+"'");E=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(E,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:g,expected:$})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+m);switch(x[0]){case 1:n.push(m),a.push(d.yytext),r.push(d.yylloc),n.push(x[1]),m=null,c=d.yyleng,o=d.yytext,l=d.yylineno,g=d.yylloc;break;case 2:if(v=this.productions_[x[1]][1],I.$=a[a.length-v],I._$={first_line:r[r.length-(v||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(v||1)].first_column,last_column:r[r.length-1].last_column},f&&(I._$.range=[r[r.length-(v||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(I,[o,c,l,y.yy,x[1],a,r].concat(u))))return b;v&&(n=n.slice(0,-1*v*2),a=a.slice(0,-1*v),r=r.slice(0,-1*v)),n.push(this.productions_[x[1]][0]),a.push(I.$),r.push(I._$),S=h[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0},"parse")},f=function(){return{EOF:1,parseError:e(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:e(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:e(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:e(function(t){var e=t.length,i=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 n=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),i.length-1&&(this.yylineno-=i.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(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:e(function(t){this.unput(this.match.slice(t))},"less"),pastInput:e(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:e(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:e(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:e(function(t,e){var i,n,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var a in s)this[a]=s[a];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;var t,e,i,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),a=0;a<s.length;a++)if((i=this._input.match(this.rules[s[a]]))&&(!e||i[0].length>e[0].length)){if(e=i,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,s[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[n]))&&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:e(function(){var t=this.next();return t||this.lex()},"lex"),begin:e(function(t){this.conditionStack.push(t)},"begin"),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:e(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:e(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:e(function(t){this.begin(t)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(t,e,i,n){switch(i){case 0:case 3:return 6;case 1:case 2:return 8;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}}();function k(){this.yy={}}return g.lexer=f,e(k,"Parser"),k.prototype=g,g.Parser=k,new k}();g.parser=g;var f=g,k=(e(t=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,r()}getRoot(){return this.root}addNode(t,e){const n=h.sanitizeText(e,i());if(!this.root)return this.root={text:n,children:[]},this.stack=[{level:0,node:this.root}],void o(n);this.baseLevel??(this.baseLevel=t);let s=t-this.baseLevel+1;for(s<=0&&(s=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=s;)this.stack.pop();const a={text:n,children:[]};this.stack[this.stack.length-1].node.children.push(a),this.stack.push({level:s,node:a})}getAccTitle(){return l()}setAccTitle(t){c(t)}getAccDescription(){return u()}setAccDescription(t){d(t)}getDiagramTitle(){return y()}setDiagramTitle(t){o(t)}},"IshikawaDB"),t),m=250,w=82*Math.PI/180,x=Math.cos(w),b=Math.sin(w),_=e((t,e,i)=>{const n=t.node().getBBox(),s=n.width+2*e,a=n.height+2*e;p(t,a,s,i),t.attr("viewBox",`${n.x-e} ${n.y-e} ${s} ${a}`)},"applyPaddedViewBox"),v=e((t,e,r,h)=>{var o,l;const c=h.db.getRoot();if(!c)return;const u=i(),{look:d,handDrawnSeed:y,themeVariables:p}=u,g=n(u.fontSize)[0]??14,f="handDrawn"===d,k=c.children??[],w=(null==(o=u.ishikawa)?void 0:o.diagramPadding)??20,x=(null==(l=u.ishikawa)?void 0:l.useMaxWidth)??!1,b=s(e),v=b.append("g").attr("class","ishikawa"),I=f?a.svg(b.node()):void 0,E=I?{roughSvg:I,seed:y??0,lineColor:(null==p?void 0:p.lineColor)??"#333",fillColor:(null==p?void 0:p.mainBkg)??"#fff"}:void 0,A=`ishikawa-arrow-${e}`;f||v.append("defs").append("marker").attr("id",A).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let L=0,M=m;const P=f?void 0:B(v,L,M,L,M,"ishikawa-spine");if($(v,L,M,c.text,g,E),!k.length)return f&&B(v,L,M,L,M,"ishikawa-spine",E),void _(b,w,x);L-=20;const T=k.filter((t,e)=>e%2==0),N=k.filter((t,e)=>e%2==1),O=S(T),j=S(N),D=O.total+j.total;let W=m,z=m;if(D>0){const t=500,e=75;W=Math.max(e,t*(O.total/D)),z=Math.max(e,t*(j.total/D))}const F=2*g;W=Math.max(W,O.max*F),z=Math.max(z,j.max*F),M=Math.max(W,m),P&&P.attr("y1",M).attr("y2",M),v.select(".ishikawa-head-group").attr("transform",`translate(0,${M})`);const R=Math.ceil(k.length/2);for(let i=0;i<R;i++){const t=v.append("g").attr("class","ishikawa-pair");for(const[e,n,s]of[[k[2*i],-1,W],[k[2*i+1],1,z]])e&&C(t,e,L,M,n,s,g,E);L=t.selectAll("text").nodes().reduce((t,e)=>Math.min(t,e.getBBox().x),1/0)}if(f)B(v,L,M,0,M,"ishikawa-spine",E);else{P.attr("x1",L);const t=`url(#${A})`;v.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",t)}_(b,w,x)},"draw"),S=e(t=>{const i=e(t=>t.children.reduce((t,e)=>t+1+i(e),0),"countDescendants");return t.reduce((t,e)=>{const n=i(e);return t.total+=n,t.max=Math.max(t.max,n),t},{total:0,max:0})},"sideStats"),$=e((t,e,i,n,s,a)=>{const r=Math.max(6,Math.floor(110/(.6*s))),h=t.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${e},${i})`),o=P(h,M(n,r),0,0,"ishikawa-head-label","start",s),l=o.node().getBBox(),c=Math.max(60,l.width+6),u=Math.max(40,2*l.height+40),d=`M 0 ${-u/2} L 0 ${u/2} Q ${2.4*c} 0 0 ${-u/2} Z`;if(a){const t=a.roughSvg.path(d,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});h.insert(()=>t,":first-child").attr("class","ishikawa-head")}else h.insert("path",":first-child").attr("class","ishikawa-head").attr("d",d);o.attr("transform",`translate(${(c-l.width)/2-l.x+3},${-l.y-l.height/2})`)},"drawHead"),I=e((t,i)=>{const n=[],s=[],a=e((t,e,r)=>{const h=-1===i?[...t].reverse():t;for(const i of h){const t=n.length,h=i.children??[];n.push({depth:r,text:M(i.text,15),parentIndex:e,childCount:h.length}),r%2==0?(s.push(t),h.length&&a(h,t,r+1)):(h.length&&a(h,t,r+1),s.push(t))}},"walk");return a(t,-1,2),{entries:n,yOrder:s}},"flattenTree"),E=e((t,e,i,n,s,a,r)=>{const h=t.append("g").attr("class","ishikawa-label-group"),o=P(h,e,i,n+11*s,"ishikawa-label cause","middle",a).node().getBBox();if(r){const t=r.roughSvg.rectangle(o.x-20,o.y-2,o.width+40,o.height+4,{roughness:1.5,seed:r.seed,fill:r.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:r.lineColor,strokeWidth:2});h.insert(()=>t,":first-child").attr("class","ishikawa-label-box")}else h.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",o.x-20).attr("y",o.y-2).attr("width",o.width+40).attr("height",o.height+4)},"drawCauseLabel"),A=e((t,e,i,n,s,a)=>{const r=Math.sqrt(n*n+s*s);if(0===r)return;const h=n/r,o=s/r,l=6*-o,c=6*h,u=`M ${e} ${i} L ${e-6*h*2+l} ${i-6*o*2+c} L ${e-6*h*2-l} ${i-6*o*2-c} Z`,d=a.roughSvg.path(u,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:"solid",stroke:a.lineColor,strokeWidth:1});t.append(()=>d)},"drawArrowMarker"),C=e((t,e,i,n,s,a,r,h)=>{const o=e.children??[],l=a*(o.length?1:.2),c=b*l*s,u=i+-x*l,d=n+c;if(B(t,i,n,u,d,"ishikawa-branch",h),h&&A(t,i,n,i-u,n-d,h),E(t,e.text,u,d,s,r,h),!o.length)return;const{entries:y,yOrder:p}=I(o,s),g=y.length,f=new Array(g);for(const[x,b]of p.entries())f[b]=n+c*((x+1)/(g+1));const k=new Map;k.set(-1,{x0:i,y0:n,x1:u,y1:d,childCount:o.length,childrenDrawn:0});const m=-x,w=b*s,_=s<0?"ishikawa-label up":"ishikawa-label down";for(const[x,b]of y.entries()){const e=f[x],i=k.get(b.parentIndex),n=t.append("g").attr("class","ishikawa-sub-group");let s=0,a=0,o=0;if(b.depth%2==0){const t=i.y1-i.y0;s=T(i.x0,i.x1,t?(e-i.y0)/t:.5),a=e,o=s-(b.childCount>0?60+5*b.childCount:30),B(n,s,e,o,e,"ishikawa-sub-branch",h),h&&A(n,s,e,1,0,h),P(n,b.text,o,e,"ishikawa-label align","end",r)}else{const t=i.childrenDrawn++;s=T(i.x0,i.x1,(i.childCount-t)/(i.childCount+1)),a=i.y0,o=s+m*((e-a)/w),B(n,s,a,o,e,"ishikawa-sub-branch",h),h&&A(n,s,a,s-o,a-e,h),P(n,b.text,o,e,_,"end",r)}b.childCount>0&&k.set(x,{x0:s,y0:a,x1:o,y1:e,childCount:b.childCount,childrenDrawn:0})}},"drawBranch"),L=e(t=>t.split(/<br\s*\/?>|\n/),"splitLines"),M=e((t,e)=>{if(t.length<=e)return t;const i=[];for(const n of t.split(/\s+/)){const t=i.length-1;t>=0&&i[t].length+1+n.length<=e?i[t]+=" "+n:i.push(n)}return i.join("\n")},"wrapText"),P=e((t,e,i,n,s,a,r)=>{const h=L(e),o=1.05*r,l=t.append("text").attr("class",s).attr("text-anchor",a).attr("x",i).attr("y",n-(h.length-1)*o/2);for(const[c,u]of h.entries())l.append("tspan").attr("x",i).attr("dy",0===c?0:o).text(u);return l},"drawMultilineText"),T=e((t,e,i)=>t+(e-t)*i,"lerp"),B=e((t,e,i,n,s,a,r)=>{if(r){const h=r.roughSvg.line(e,i,n,s,{roughness:1.5,seed:r.seed,stroke:r.lineColor,strokeWidth:2});return void t.append(()=>h).attr("class",a)}return t.append("line").attr("class",a).attr("x1",e).attr("y1",i).attr("x2",n).attr("y2",s)},"drawLine"),N={draw:v},O=e(t=>`\n.ishikawa .ishikawa-spine,\n.ishikawa .ishikawa-branch,\n.ishikawa .ishikawa-sub-branch {\n stroke: ${t.lineColor};\n stroke-width: 2;\n fill: none;\n}\n\n.ishikawa .ishikawa-sub-branch {\n stroke-width: 1;\n}\n\n.ishikawa .ishikawa-arrow {\n fill: ${t.lineColor};\n}\n\n.ishikawa .ishikawa-head {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa .ishikawa-label-box {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa text {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n fill: ${t.textColor};\n}\n\n.ishikawa .ishikawa-head-label {\n font-weight: 600;\n text-anchor: middle;\n dominant-baseline: middle;\n font-size: 14px;\n}\n\n.ishikawa .ishikawa-label {\n text-anchor: end;\n}\n\n.ishikawa .ishikawa-label.cause {\n text-anchor: middle;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.align {\n text-anchor: end;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.up {\n dominant-baseline: baseline;\n}\n\n.ishikawa .ishikawa-label.down {\n dominant-baseline: hanging;\n}\n`,"getStyles"),j={parser:f,get db(){return new k},renderer:N,styles:O};export{j as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{conf as e,language as t}from"./typescript-
|
|
1
|
+
import{conf as e,language as t}from"./typescript-D0PYBX18.js";import"./editor.main-DGCQQuiO.js";import"./index-DknoSkal.js";const s=e,i={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","static","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:t.operators,symbols:t.symbols,escapes:t.escapes,digits:t.digits,octaldigits:t.octaldigits,binarydigits:t.binarydigits,hexdigits:t.hexdigits,regexpctl:t.regexpctl,regexpesc:t.regexpesc,tokenizer:t.tokenizer};export{s as conf,i as language};
|
package/web/dist/assets/{journeyDiagram-5HDEW3XC-DIlSMYx4.js → journeyDiagram-5HDEW3XC-CY8i7id_.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as t}from"./chunk-5VM5RSS4-ClYZJ82b.js";import{a as e,g as n,h as i,d as s}from"./chunk-32BRIVSS-C_Sdh-Gb.js";import{g as r,s as a,a as o,b as l,p as c,o as h,_ as u,c as p,d as y,e as d,q as f}from"./mermaid.core-C4a3RQhj.js";import{d as g}from"./arc-B5GKGWbC.js";import"./index-DyV-bHVC.js";var m=function(){var t=u(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],s=[1,11],r=[1,12],a=[1,13],o=[1,14],l={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:u(function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 13:i.addTask(r[o-1],r[o]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:s,16:r,17:a,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:i,14:s,16:r,17:a,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:u(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:u(function(t){var e=this,n=[0],i=[],s=[null],r=[],a=this.table,o="",l=0,c=0,h=r.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(y.yy[d]=this.yy[d]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;r.push(f);var g=p.options&&p.options.ranges;function m(){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 y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,u(function(t){n.length=n.length-2*t,s.length=s.length-t,r.length=r.length-t},"popStack"),u(m,"lex");for(var x,k,_,b,w,v,$,M,T={};;){if(k=n[n.length-1],this.defaultActions[k]?_=this.defaultActions[k]:(null==x&&(x=m()),_=a[k]&&a[k][x]),void 0===_||!_.length||!_[0]){var S="";for(w in M=[],a[k])this.terminals_[w]&&w>2&&M.push("'"+this.terminals_[w]+"'");S=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:f,expected:M})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(_[0]){case 1:n.push(x),s.push(p.yytext),r.push(p.yylloc),n.push(_[1]),x=null,c=p.yyleng,o=p.yytext,l=p.yylineno,f=p.yylloc;break;case 2:if(v=this.productions_[_[1]][1],T.$=s[s.length-v],T._$={first_line:r[r.length-(v||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(v||1)].first_column,last_column:r[r.length-1].last_column},g&&(T._$.range=[r[r.length-(v||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(T,[o,c,l,y.yy,_[1],s,r].concat(h))))return b;v&&(n=n.slice(0,-1*v*2),s=s.slice(0,-1*v),r=r.slice(0,-1*v)),n.push(this.productions_[_[1]][0]),s.push(T.$),r.push(T._$),$=a[n[n.length-2]][n[n.length-1]],n.push($);break;case 3:return!0}}return!0},"parse")},c=function(){return{EOF:1,parseError:u(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:u(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:u(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:u(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 s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column: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=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(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:u(function(t){this.unput(this.match.slice(t))},"less"),pastInput:u(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:u(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:u(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:u(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],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 r in s)this[r]=s[r];return!1}return!1},"test_match"),next:u(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 s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:u(function(){var t=this.next();return t||this.lex()},"lex"),begin:u(function(t){this.conditionStack.push(t)},"begin"),popState:u(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:u(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:u(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:u(function(t){this.begin(t)},"pushState"),stateStackSize:u(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:u(function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\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,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}}();function h(){this.yy={}}return l.lexer=c,u(h,"Parser"),h.prototype=l,l.Parser=h,new h}();m.parser=m;var x=m,k="",_=[],b=[],w=[],v=u(function(){_.length=0,b.length=0,k="",w.length=0,f()},"clear"),$=u(function(t){k=t,_.push(t)},"addSection"),M=u(function(){return _},"getSections"),T=u(function(){let t=A();let e=0;for(;!t&&e<100;)t=A(),e++;return b.push(...w),b},"getTasks"),S=u(function(){const t=[];b.forEach(e=>{e.people&&t.push(...e.people)});return[...new Set(t)].sort()},"updateActors"),C=u(function(t,e){const n=e.substr(1).split(":");let i=0,s=[];1===n.length?(i=Number(n[0]),s=[]):(i=Number(n[0]),s=n[1].split(","));const r=s.map(t=>t.trim()),a={section:k,type:k,people:r,task:t,score:i};w.push(a)},"addTask"),E=u(function(t){const e={section:k,type:k,description:t,task:t,classes:[]};b.push(e)},"addTaskOrg"),A=u(function(){const t=u(function(t){return w[t].processed},"compileTask");let e=!0;for(const[n,i]of w.entries())t(n),e=e&&i.processed;return e},"compileTasks"),I=u(function(){return S()},"getActors"),P={getConfig:u(()=>p().journey,"getConfig"),clear:v,setDiagramTitle:h,getDiagramTitle:c,setAccTitle:l,getAccTitle:o,setAccDescription:a,getAccDescription:r,addSection:$,getSections:M,getTasks:T,addTask:C,addTaskOrg:E,getActors:I},j=u(e=>`.label {\n font-family: ${e.fontFamily};\n color: ${e.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${e.textColor}\n }\n\n .legend {\n fill: ${e.textColor};\n font-family: ${e.fontFamily};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${e.textColor}\n }\n\n .face {\n ${e.faceColor?`fill: ${e.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${e.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${e.fillType0?`fill: ${e.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${e.fillType0?`fill: ${e.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${e.fillType0?`fill: ${e.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${e.fillType0?`fill: ${e.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${e.fillType0?`fill: ${e.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${e.fillType0?`fill: ${e.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${e.fillType0?`fill: ${e.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${e.fillType0?`fill: ${e.fillType7}`:""};\n }\n\n .actor-0 {\n ${e.actor0?`fill: ${e.actor0}`:""};\n }\n .actor-1 {\n ${e.actor1?`fill: ${e.actor1}`:""};\n }\n .actor-2 {\n ${e.actor2?`fill: ${e.actor2}`:""};\n }\n .actor-3 {\n ${e.actor3?`fill: ${e.actor3}`:""};\n }\n .actor-4 {\n ${e.actor4?`fill: ${e.actor4}`:""};\n }\n .actor-5 {\n ${e.actor5?`fill: ${e.actor5}`:""};\n }\n ${t()}\n`,"getStyles"),V=u(function(t,e){return s(t,e)},"drawRect"),F=u(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"),s=t.append("g");function r(t){const i=g().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 a(t){const i=g().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 o(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 s.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"),s.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"),u(r,"smile"),u(a,"sad"),u(o,"ambivalent"),e.score>3?r(s):e.score<3?a(s):o(s),i},"drawFace"),B=u(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"),R=u(function(t,e){return i(t,e)},"drawText"),L=u(function(t,e){function n(t,e,n,i,s){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-s)+" "+(t+n-1.2*s)+","+(e+i)+" "+t+","+(e+i)}u(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,R(t,e)},"drawLabel"),O=u(function(t,e,i){const s=t.append("g"),r=n();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=i.width*e.taskCount+i.diagramMarginX*(e.taskCount-1),r.height=i.height,r.class="journey-section section-type-"+e.num,r.rx=3,r.ry=3,V(s,r),Y(i)(e.text,s,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+e.num},i,e.colour)},"drawSection"),D=-1,N=u(function(t,e,i,s){const r=e.x+i.width/2,a=t.append("g");D++;a.append("line").attr("id",s+"-task"+D).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"),F(a,{cx:r,cy:300+30*(5-e.score),score:e.score});const o=n();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=i.width,o.height=i.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,V(a,o);let l=e.x+14;e.people.forEach(t=>{const n=e.actors[t].color,i={cx:l,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};B(a,i),l+=10}),Y(i)(e.task,a,o.x,o.y,o.width,o.height,{class:"task"},i,e.colour)},"drawTask"),z=u(function(t,n){e(t,n)},"drawBackgroundRect"),Y=function(){function t(t,e,n,s,r,a,o,l){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function e(t,e,n,s,r,a,o,l,c){const{taskFontSize:h,taskFontFamily:u}=l,p=t.split(/<br\s*\/?>/gi);for(let y=0;y<p.length;y++){const t=y*h-h*(p.length-1)/2,l=e.append("text").attr("x",n+r/2).attr("y",s).attr("fill",c).style("text-anchor","middle").style("font-size",h).style("font-family",u);l.append("tspan").attr("x",n+r/2).attr("dy",t).text(p[y]),l.attr("y",s+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(l,o)}}function n(t,n,s,r,a,o,l,c){const h=n.append("switch"),u=h.append("foreignObject").attr("x",s).attr("y",r).attr("width",a).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,s,r,a,o,l,c),i(u,l)}function i(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return u(t,"byText"),u(e,"byTspan"),u(n,"byFo"),u(i,"_setTextAttrs"),function(i){return"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}}(),q={drawRect:V,drawCircle:B,drawSection:O,drawText:R,drawLabel:L,drawTask:N,drawBackgroundRect:z,initGraphics:u(function(t,e){D=-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")},W=u(function(t){Object.keys(t).forEach(function(e){H[e]=t[e]})},"setConf"),X={},G=0;function U(t){const e=p().journey,n=e.maxLabelWidth;G=0;let i=60;Object.keys(X).forEach(s=>{const r=X[s].color,a={cx:20,cy:i,r:7,fill:r,stroke:"#000",pos:X[s].position};q.drawCircle(t,a);let o=t.append("text").attr("visibility","hidden").text(s);const l=o.node().getBoundingClientRect().width;o.remove();let c=[];if(l<=n)c=[s];else{const e=s.split(" ");let i="";o=t.append("text").attr("visibility","hidden"),e.forEach(t=>{const e=i?`${i} ${t}`:t;o.text(e);if(o.node().getBoundingClientRect().width>n){if(i&&c.push(i),i=t,o.text(t),o.node().getBoundingClientRect().width>n){let e="";for(const i of t)e+=i,o.text(e+"-"),o.node().getBoundingClientRect().width>n&&(c.push(e.slice(0,-1)+"-"),e=i);i=e}}else i=e}),i&&c.push(i),o.remove()}c.forEach((n,s)=>{const r={x:40,y:i+7+20*s,fill:"#666",text:n,textMargin:e.boxTextMargin??5},a=q.drawText(t,r).node().getBoundingClientRect().width;a>G&&a>e.leftMargin-a&&(G=a)}),i+=Math.max(20,20*c.length)})}u(U,"drawActorLegend");var H=p().journey,Z=0,J=u(function(t,e,n,i){const s=p(),r=s.journey.titleColor,a=s.journey.titleFontSize,o=s.journey.titleFontFamily,l=s.securityLevel;let c;"sandbox"===l&&(c=y("#i"+e));const h=y("sandbox"===l?c.nodes()[0].contentDocument.body:"body");K.init();const u=h.select("#"+e);q.initGraphics(u,e);const f=i.db.getTasks(),g=i.db.getDiagramTitle(),m=i.db.getActors();for(const p in X)delete X[p];let x=0;m.forEach(t=>{X[t]={color:H.actorColours[x%H.actorColours.length],position:x},x++}),U(u),Z=H.leftMargin+G,K.insert(0,0,Z,50*Object.keys(X).length),et(u,f,0,e);const k=K.getBounds();g&&u.append("text").text(g).attr("x",Z).attr("font-size",a).attr("font-weight","bold").attr("y",25).attr("fill",r).attr("font-family",o);const _=k.stopy-k.starty+2*H.diagramMarginY,b=Z+k.stopx+2*H.diagramMarginX;d(u,_,b,H.useMaxWidth),u.append("line").attr("x1",Z).attr("y1",4*H.height).attr("x2",b-Z-4).attr("y2",4*H.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+e+"-arrowhead)");const w=g?70:0;u.attr("viewBox",`${k.startx} -25 ${b} ${_+w}`),u.attr("preserveAspectRatio","xMinYMin meet"),u.attr("height",_+w+25)},"draw"),K={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:u(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:u(function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])},"updateVal"),updateBounds:u(function(t,e,n,i){const s=p().journey,r=this;let a=0;function o(o){return u(function(l){a++;const c=r.sequenceItems.length-a+1;r.updateVal(l,"starty",e-c*s.boxMargin,Math.min),r.updateVal(l,"stopy",i+c*s.boxMargin,Math.max),r.updateVal(K.data,"startx",t-c*s.boxMargin,Math.min),r.updateVal(K.data,"stopx",n+c*s.boxMargin,Math.max),"activation"!==o&&(r.updateVal(l,"startx",t-c*s.boxMargin,Math.min),r.updateVal(l,"stopx",n+c*s.boxMargin,Math.max),r.updateVal(K.data,"starty",e-c*s.boxMargin,Math.min),r.updateVal(K.data,"stopy",i+c*s.boxMargin,Math.max))},"updateItemBounds")}u(o,"updateFn"),this.sequenceItems.forEach(o())},"updateBounds"),insert:u(function(t,e,n,i){const s=Math.min(t,n),r=Math.max(t,n),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(K.data,"startx",s,Math.min),this.updateVal(K.data,"starty",a,Math.min),this.updateVal(K.data,"stopx",r,Math.max),this.updateVal(K.data,"stopy",o,Math.max),this.updateBounds(s,a,r,o)},"insert"),bumpVerticalPos:u(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:u(function(){return this.verticalPos},"getVerticalPos"),getBounds:u(function(){return this.data},"getBounds")},Q=H.sectionFills,tt=H.sectionColours,et=u(function(t,e,n,i){const s=p().journey;let r="";const a=n+(2*s.height+s.diagramMarginY);let o=0,l="#CCC",c="black",h=0;for(const[u,p]of e.entries()){if(r!==p.section){l=Q[o%Q.length],h=o%Q.length,c=tt[o%tt.length];let n=0;const i=p.section;for(let t=u;t<e.length&&e[t].section==i;t++)n+=1;const a={x:u*s.taskMargin+u*s.width+Z,y:50,text:p.section,fill:l,num:h,colour:c,taskCount:n};q.drawSection(t,a,s),r=p.section,o++}const n=p.people.reduce((t,e)=>(X[e]&&(t[e]=X[e]),t),{});p.x=u*s.taskMargin+u*s.width+Z,p.y=a,p.width=s.diagramMarginX,p.height=s.diagramMarginY,p.colour=c,p.fill=l,p.num=h,p.actors=n,q.drawTask(t,p,s,i),K.insert(p.x,p.y,p.x+p.width+s.taskMargin,450)}},"drawTasks"),nt={setConf:W,draw:J},it={parser:x,db:P,renderer:nt,styles:j,init:u(t=>{nt.setConf(t.journey),P.clear()},"init")};export{it as diagram};
|
|
1
|
+
import{g as t}from"./chunk-5VM5RSS4-CqNmatdI.js";import{a as e,g as n,h as i,d as s}from"./chunk-32BRIVSS-L5rSd5kx.js";import{g as r,s as a,a as o,b as l,p as c,o as h,_ as u,c as p,d as y,e as d,q as f}from"./mermaid.core-DkcKZax1.js";import{d as g}from"./arc-C5QqMw0D.js";import"./index-DknoSkal.js";var m=function(){var t=u(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],s=[1,11],r=[1,12],a=[1,13],o=[1,14],l={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:u(function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 13:i.addTask(r[o-1],r[o]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:s,16:r,17:a,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:i,14:s,16:r,17:a,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:u(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:u(function(t){var e=this,n=[0],i=[],s=[null],r=[],a=this.table,o="",l=0,c=0,h=r.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(y.yy[d]=this.yy[d]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;r.push(f);var g=p.options&&p.options.ranges;function m(){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 y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,u(function(t){n.length=n.length-2*t,s.length=s.length-t,r.length=r.length-t},"popStack"),u(m,"lex");for(var x,k,_,b,w,v,$,M,T={};;){if(k=n[n.length-1],this.defaultActions[k]?_=this.defaultActions[k]:(null==x&&(x=m()),_=a[k]&&a[k][x]),void 0===_||!_.length||!_[0]){var S="";for(w in M=[],a[k])this.terminals_[w]&&w>2&&M.push("'"+this.terminals_[w]+"'");S=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:f,expected:M})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(_[0]){case 1:n.push(x),s.push(p.yytext),r.push(p.yylloc),n.push(_[1]),x=null,c=p.yyleng,o=p.yytext,l=p.yylineno,f=p.yylloc;break;case 2:if(v=this.productions_[_[1]][1],T.$=s[s.length-v],T._$={first_line:r[r.length-(v||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(v||1)].first_column,last_column:r[r.length-1].last_column},g&&(T._$.range=[r[r.length-(v||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(T,[o,c,l,y.yy,_[1],s,r].concat(h))))return b;v&&(n=n.slice(0,-1*v*2),s=s.slice(0,-1*v),r=r.slice(0,-1*v)),n.push(this.productions_[_[1]][0]),s.push(T.$),r.push(T._$),$=a[n[n.length-2]][n[n.length-1]],n.push($);break;case 3:return!0}}return!0},"parse")},c=function(){return{EOF:1,parseError:u(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:u(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:u(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:u(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 s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column: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=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(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:u(function(t){this.unput(this.match.slice(t))},"less"),pastInput:u(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:u(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:u(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:u(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],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 r in s)this[r]=s[r];return!1}return!1},"test_match"),next:u(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 s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:u(function(){var t=this.next();return t||this.lex()},"lex"),begin:u(function(t){this.conditionStack.push(t)},"begin"),popState:u(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:u(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:u(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:u(function(t){this.begin(t)},"pushState"),stateStackSize:u(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:u(function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\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,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}}();function h(){this.yy={}}return l.lexer=c,u(h,"Parser"),h.prototype=l,l.Parser=h,new h}();m.parser=m;var x=m,k="",_=[],b=[],w=[],v=u(function(){_.length=0,b.length=0,k="",w.length=0,f()},"clear"),$=u(function(t){k=t,_.push(t)},"addSection"),M=u(function(){return _},"getSections"),T=u(function(){let t=A();let e=0;for(;!t&&e<100;)t=A(),e++;return b.push(...w),b},"getTasks"),S=u(function(){const t=[];b.forEach(e=>{e.people&&t.push(...e.people)});return[...new Set(t)].sort()},"updateActors"),C=u(function(t,e){const n=e.substr(1).split(":");let i=0,s=[];1===n.length?(i=Number(n[0]),s=[]):(i=Number(n[0]),s=n[1].split(","));const r=s.map(t=>t.trim()),a={section:k,type:k,people:r,task:t,score:i};w.push(a)},"addTask"),E=u(function(t){const e={section:k,type:k,description:t,task:t,classes:[]};b.push(e)},"addTaskOrg"),A=u(function(){const t=u(function(t){return w[t].processed},"compileTask");let e=!0;for(const[n,i]of w.entries())t(n),e=e&&i.processed;return e},"compileTasks"),I=u(function(){return S()},"getActors"),P={getConfig:u(()=>p().journey,"getConfig"),clear:v,setDiagramTitle:h,getDiagramTitle:c,setAccTitle:l,getAccTitle:o,setAccDescription:a,getAccDescription:r,addSection:$,getSections:M,getTasks:T,addTask:C,addTaskOrg:E,getActors:I},j=u(e=>`.label {\n font-family: ${e.fontFamily};\n color: ${e.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${e.textColor}\n }\n\n .legend {\n fill: ${e.textColor};\n font-family: ${e.fontFamily};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${e.textColor}\n }\n\n .face {\n ${e.faceColor?`fill: ${e.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${e.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${e.fillType0?`fill: ${e.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${e.fillType0?`fill: ${e.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${e.fillType0?`fill: ${e.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${e.fillType0?`fill: ${e.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${e.fillType0?`fill: ${e.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${e.fillType0?`fill: ${e.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${e.fillType0?`fill: ${e.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${e.fillType0?`fill: ${e.fillType7}`:""};\n }\n\n .actor-0 {\n ${e.actor0?`fill: ${e.actor0}`:""};\n }\n .actor-1 {\n ${e.actor1?`fill: ${e.actor1}`:""};\n }\n .actor-2 {\n ${e.actor2?`fill: ${e.actor2}`:""};\n }\n .actor-3 {\n ${e.actor3?`fill: ${e.actor3}`:""};\n }\n .actor-4 {\n ${e.actor4?`fill: ${e.actor4}`:""};\n }\n .actor-5 {\n ${e.actor5?`fill: ${e.actor5}`:""};\n }\n ${t()}\n`,"getStyles"),V=u(function(t,e){return s(t,e)},"drawRect"),F=u(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"),s=t.append("g");function r(t){const i=g().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 a(t){const i=g().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 o(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 s.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"),s.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"),u(r,"smile"),u(a,"sad"),u(o,"ambivalent"),e.score>3?r(s):e.score<3?a(s):o(s),i},"drawFace"),B=u(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"),R=u(function(t,e){return i(t,e)},"drawText"),L=u(function(t,e){function n(t,e,n,i,s){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-s)+" "+(t+n-1.2*s)+","+(e+i)+" "+t+","+(e+i)}u(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,R(t,e)},"drawLabel"),O=u(function(t,e,i){const s=t.append("g"),r=n();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=i.width*e.taskCount+i.diagramMarginX*(e.taskCount-1),r.height=i.height,r.class="journey-section section-type-"+e.num,r.rx=3,r.ry=3,V(s,r),Y(i)(e.text,s,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+e.num},i,e.colour)},"drawSection"),D=-1,N=u(function(t,e,i,s){const r=e.x+i.width/2,a=t.append("g");D++;a.append("line").attr("id",s+"-task"+D).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"),F(a,{cx:r,cy:300+30*(5-e.score),score:e.score});const o=n();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=i.width,o.height=i.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,V(a,o);let l=e.x+14;e.people.forEach(t=>{const n=e.actors[t].color,i={cx:l,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};B(a,i),l+=10}),Y(i)(e.task,a,o.x,o.y,o.width,o.height,{class:"task"},i,e.colour)},"drawTask"),z=u(function(t,n){e(t,n)},"drawBackgroundRect"),Y=function(){function t(t,e,n,s,r,a,o,l){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function e(t,e,n,s,r,a,o,l,c){const{taskFontSize:h,taskFontFamily:u}=l,p=t.split(/<br\s*\/?>/gi);for(let y=0;y<p.length;y++){const t=y*h-h*(p.length-1)/2,l=e.append("text").attr("x",n+r/2).attr("y",s).attr("fill",c).style("text-anchor","middle").style("font-size",h).style("font-family",u);l.append("tspan").attr("x",n+r/2).attr("dy",t).text(p[y]),l.attr("y",s+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(l,o)}}function n(t,n,s,r,a,o,l,c){const h=n.append("switch"),u=h.append("foreignObject").attr("x",s).attr("y",r).attr("width",a).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,s,r,a,o,l,c),i(u,l)}function i(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return u(t,"byText"),u(e,"byTspan"),u(n,"byFo"),u(i,"_setTextAttrs"),function(i){return"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}}(),q={drawRect:V,drawCircle:B,drawSection:O,drawText:R,drawLabel:L,drawTask:N,drawBackgroundRect:z,initGraphics:u(function(t,e){D=-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")},W=u(function(t){Object.keys(t).forEach(function(e){H[e]=t[e]})},"setConf"),X={},G=0;function U(t){const e=p().journey,n=e.maxLabelWidth;G=0;let i=60;Object.keys(X).forEach(s=>{const r=X[s].color,a={cx:20,cy:i,r:7,fill:r,stroke:"#000",pos:X[s].position};q.drawCircle(t,a);let o=t.append("text").attr("visibility","hidden").text(s);const l=o.node().getBoundingClientRect().width;o.remove();let c=[];if(l<=n)c=[s];else{const e=s.split(" ");let i="";o=t.append("text").attr("visibility","hidden"),e.forEach(t=>{const e=i?`${i} ${t}`:t;o.text(e);if(o.node().getBoundingClientRect().width>n){if(i&&c.push(i),i=t,o.text(t),o.node().getBoundingClientRect().width>n){let e="";for(const i of t)e+=i,o.text(e+"-"),o.node().getBoundingClientRect().width>n&&(c.push(e.slice(0,-1)+"-"),e=i);i=e}}else i=e}),i&&c.push(i),o.remove()}c.forEach((n,s)=>{const r={x:40,y:i+7+20*s,fill:"#666",text:n,textMargin:e.boxTextMargin??5},a=q.drawText(t,r).node().getBoundingClientRect().width;a>G&&a>e.leftMargin-a&&(G=a)}),i+=Math.max(20,20*c.length)})}u(U,"drawActorLegend");var H=p().journey,Z=0,J=u(function(t,e,n,i){const s=p(),r=s.journey.titleColor,a=s.journey.titleFontSize,o=s.journey.titleFontFamily,l=s.securityLevel;let c;"sandbox"===l&&(c=y("#i"+e));const h=y("sandbox"===l?c.nodes()[0].contentDocument.body:"body");K.init();const u=h.select("#"+e);q.initGraphics(u,e);const f=i.db.getTasks(),g=i.db.getDiagramTitle(),m=i.db.getActors();for(const p in X)delete X[p];let x=0;m.forEach(t=>{X[t]={color:H.actorColours[x%H.actorColours.length],position:x},x++}),U(u),Z=H.leftMargin+G,K.insert(0,0,Z,50*Object.keys(X).length),et(u,f,0,e);const k=K.getBounds();g&&u.append("text").text(g).attr("x",Z).attr("font-size",a).attr("font-weight","bold").attr("y",25).attr("fill",r).attr("font-family",o);const _=k.stopy-k.starty+2*H.diagramMarginY,b=Z+k.stopx+2*H.diagramMarginX;d(u,_,b,H.useMaxWidth),u.append("line").attr("x1",Z).attr("y1",4*H.height).attr("x2",b-Z-4).attr("y2",4*H.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+e+"-arrowhead)");const w=g?70:0;u.attr("viewBox",`${k.startx} -25 ${b} ${_+w}`),u.attr("preserveAspectRatio","xMinYMin meet"),u.attr("height",_+w+25)},"draw"),K={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:u(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:u(function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])},"updateVal"),updateBounds:u(function(t,e,n,i){const s=p().journey,r=this;let a=0;function o(o){return u(function(l){a++;const c=r.sequenceItems.length-a+1;r.updateVal(l,"starty",e-c*s.boxMargin,Math.min),r.updateVal(l,"stopy",i+c*s.boxMargin,Math.max),r.updateVal(K.data,"startx",t-c*s.boxMargin,Math.min),r.updateVal(K.data,"stopx",n+c*s.boxMargin,Math.max),"activation"!==o&&(r.updateVal(l,"startx",t-c*s.boxMargin,Math.min),r.updateVal(l,"stopx",n+c*s.boxMargin,Math.max),r.updateVal(K.data,"starty",e-c*s.boxMargin,Math.min),r.updateVal(K.data,"stopy",i+c*s.boxMargin,Math.max))},"updateItemBounds")}u(o,"updateFn"),this.sequenceItems.forEach(o())},"updateBounds"),insert:u(function(t,e,n,i){const s=Math.min(t,n),r=Math.max(t,n),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(K.data,"startx",s,Math.min),this.updateVal(K.data,"starty",a,Math.min),this.updateVal(K.data,"stopx",r,Math.max),this.updateVal(K.data,"stopy",o,Math.max),this.updateBounds(s,a,r,o)},"insert"),bumpVerticalPos:u(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:u(function(){return this.verticalPos},"getVerticalPos"),getBounds:u(function(){return this.data},"getBounds")},Q=H.sectionFills,tt=H.sectionColours,et=u(function(t,e,n,i){const s=p().journey;let r="";const a=n+(2*s.height+s.diagramMarginY);let o=0,l="#CCC",c="black",h=0;for(const[u,p]of e.entries()){if(r!==p.section){l=Q[o%Q.length],h=o%Q.length,c=tt[o%tt.length];let n=0;const i=p.section;for(let t=u;t<e.length&&e[t].section==i;t++)n+=1;const a={x:u*s.taskMargin+u*s.width+Z,y:50,text:p.section,fill:l,num:h,colour:c,taskCount:n};q.drawSection(t,a,s),r=p.section,o++}const n=p.people.reduce((t,e)=>(X[e]&&(t[e]=X[e]),t),{});p.x=u*s.taskMargin+u*s.width+Z,p.y=a,p.width=s.diagramMarginX,p.height=s.diagramMarginY,p.colour=c,p.fill=l,p.num=h,p.actors=n,q.drawTask(t,p,s,i),K.insert(p.x,p.y,p.x+p.width+s.taskMargin,450)}},"drawTasks"),nt={setConf:W,draw:J},it={parser:x,db:P,renderer:nt,styles:j,init:u(t=>{nt.setConf(t.journey),P.clear()},"init")};export{it as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e,l as t,e as r}from"./editor.main-CgHXuI1T.js";import{f as n,g as a,C as s,H as o,b as i,d as c,F as l,S as d,e as u}from"./lspLanguageFeatures-BQKUKUbx.js";import{a as h,D as m,h as p,R as g,c as f,i as k,j as C,t as b,k as w}from"./lspLanguageFeatures-BQKUKUbx.js";import"./index-DyV-bHVC.js";class _{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>12e4&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=e({moduleId:"vs/language/json/jsonWorker",createWorker:()=>new Worker(new URL(""+new URL("json.worker-D2CYyGom.js",import.meta.url).href,import.meta.url),{type:"module"}),label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then(e=>{t=e}).then(t=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(e=>t)}}function v(e){return 32===e||9===e}function E(e){return 10===e||13===e}function I(e){return e>=48&&e<=57}var S,T;(T=S||(S={}))[T.lineFeed=10]="lineFeed",T[T.carriageReturn=13]="carriageReturn",T[T.space=32]="space",T[T._0=48]="_0",T[T._1=49]="_1",T[T._2=50]="_2",T[T._3=51]="_3",T[T._4=52]="_4",T[T._5=53]="_5",T[T._6=54]="_6",T[T._7=55]="_7",T[T._8=56]="_8",T[T._9=57]="_9",T[T.a=97]="a",T[T.b=98]="b",T[T.c=99]="c",T[T.d=100]="d",T[T.e=101]="e",T[T.f=102]="f",T[T.g=103]="g",T[T.h=104]="h",T[T.i=105]="i",T[T.j=106]="j",T[T.k=107]="k",T[T.l=108]="l",T[T.m=109]="m",T[T.n=110]="n",T[T.o=111]="o",T[T.p=112]="p",T[T.q=113]="q",T[T.r=114]="r",T[T.s=115]="s",T[T.t=116]="t",T[T.u=117]="u",T[T.v=118]="v",T[T.w=119]="w",T[T.x=120]="x",T[T.y=121]="y",T[T.z=122]="z",T[T.A=65]="A",T[T.B=66]="B",T[T.C=67]="C",T[T.D=68]="D",T[T.E=69]="E",T[T.F=70]="F",T[T.G=71]="G",T[T.H=72]="H",T[T.I=73]="I",T[T.J=74]="J",T[T.K=75]="K",T[T.L=76]="L",T[T.M=77]="M",T[T.N=78]="N",T[T.O=79]="O",T[T.P=80]="P",T[T.Q=81]="Q",T[T.R=82]="R",T[T.S=83]="S",T[T.T=84]="T",T[T.U=85]="U",T[T.V=86]="V",T[T.W=87]="W",T[T.X=88]="X",T[T.Y=89]="Y",T[T.Z=90]="Z",T[T.asterisk=42]="asterisk",T[T.backslash=92]="backslash",T[T.closeBrace=125]="closeBrace",T[T.closeBracket=93]="closeBracket",T[T.colon=58]="colon",T[T.comma=44]="comma",T[T.dot=46]="dot",T[T.doubleQuote=34]="doubleQuote",T[T.minus=45]="minus",T[T.openBrace=123]="openBrace",T[T.openBracket=91]="openBracket",T[T.plus=43]="plus",T[T.slash=47]="slash",T[T.formFeed=12]="formFeed",T[T.tab=9]="tab",new Array(20).fill(0).map((e,t)=>" ".repeat(t));const A=200;var x;new Array(A).fill(0).map((e,t)=>"\n"+" ".repeat(t)),new Array(A).fill(0).map((e,t)=>"\r"+" ".repeat(t)),new Array(A).fill(0).map((e,t)=>"\r\n"+" ".repeat(t)),new Array(A).fill(0).map((e,t)=>"\n"+"\t".repeat(t)),new Array(A).fill(0).map((e,t)=>"\r"+"\t".repeat(t)),new Array(A).fill(0).map((e,t)=>"\r\n"+"\t".repeat(t)),(x||(x={})).DEFAULT={allowTrailingComma:!1};const y=function(e,t=!1){const r=e.length;let n=0,a="",s=0,o=16,i=0,c=0,l=0,d=0,u=0;function h(t,r){let a=0,s=0;for(;a<t;){let t=e.charCodeAt(n);if(t>=48&&t<=57)s=16*s+t-48;else if(t>=65&&t<=70)s=16*s+t-65+10;else{if(!(t>=97&&t<=102))break;s=16*s+t-97+10}n++,a++}return a<t&&(s=-1),s}function m(){if(a="",u=0,s=n,c=i,d=l,n>=r)return s=r,o=17;let t=e.charCodeAt(n);if(v(t)){do{n++,a+=String.fromCharCode(t),t=e.charCodeAt(n)}while(v(t));return o=15}if(E(t))return n++,a+=String.fromCharCode(t),13===t&&10===e.charCodeAt(n)&&(n++,a+="\n"),i++,l=n,o=14;switch(t){case 123:return n++,o=1;case 125:return n++,o=2;case 91:return n++,o=3;case 93:return n++,o=4;case 58:return n++,o=6;case 44:return n++,o=5;case 34:return n++,a=function(){let t="",a=n;for(;;){if(n>=r){t+=e.substring(a,n),u=2;break}const s=e.charCodeAt(n);if(34===s){t+=e.substring(a,n),n++;break}if(92!==s){if(s>=0&&s<=31){if(E(s)){t+=e.substring(a,n),u=2;break}u=6}n++}else{if(t+=e.substring(a,n),n++,n>=r){u=2;break}switch(e.charCodeAt(n++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:const e=h(4);e>=0?t+=String.fromCharCode(e):u=4;break;default:u=5}a=n}}return t}(),o=10;case 47:const c=n-1;if(47===e.charCodeAt(n+1)){for(n+=2;n<r&&!E(e.charCodeAt(n));)n++;return a=e.substring(c,n),o=12}if(42===e.charCodeAt(n+1)){n+=2;const t=r-1;let s=!1;for(;n<t;){const t=e.charCodeAt(n);if(42===t&&47===e.charCodeAt(n+1)){n+=2,s=!0;break}n++,E(t)&&(13===t&&10===e.charCodeAt(n)&&n++,i++,l=n)}return s||(n++,u=1),a=e.substring(c,n),o=13}return a+=String.fromCharCode(t),n++,o=16;case 45:if(a+=String.fromCharCode(t),n++,n===r||!I(e.charCodeAt(n)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return a+=function(){let t=n;if(48===e.charCodeAt(n))n++;else for(n++;n<e.length&&I(e.charCodeAt(n));)n++;if(n<e.length&&46===e.charCodeAt(n)){if(n++,!(n<e.length&&I(e.charCodeAt(n))))return u=3,e.substring(t,n);for(n++;n<e.length&&I(e.charCodeAt(n));)n++}let r=n;if(n<e.length&&(69===e.charCodeAt(n)||101===e.charCodeAt(n)))if(n++,(n<e.length&&43===e.charCodeAt(n)||45===e.charCodeAt(n))&&n++,n<e.length&&I(e.charCodeAt(n))){for(n++;n<e.length&&I(e.charCodeAt(n));)n++;r=n}else u=3;return e.substring(t,r)}(),o=11;default:for(;n<r&&p(t);)n++,t=e.charCodeAt(n);if(s!==n){switch(a=e.substring(s,n),a){case"true":return o=8;case"false":return o=9;case"null":return o=7}return o=16}return a+=String.fromCharCode(t),n++,o=16}}function p(e){if(v(e)||E(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){n=e,a="",s=0,o=16,u=0},getPosition:()=>n,scan:t?function(){let e;do{e=m()}while(e>=12&&e<=15);return e}:m,getToken:()=>o,getTokenValue:()=>a,getTokenOffset:()=>s,getTokenLength:()=>n-s,getTokenStartLine:()=>c,getTokenStartCharacter:()=>s-d,getTokenError:()=>u}};var B,O,U,L,F,P;function j(e){return{getInitialState:()=>new J(null,null,!1,null),tokenize:(e,t)=>function(e,t,r,n=0){let a=0,s=!1;switch(r.scanError){case 2:t='"'+t,a=1;break;case 1:t="/*"+t,a=2}const o=y(t);let i=r.lastWasColon,c=r.parents;const l={tokens:[],endState:r.clone()};for(;;){let e=n+o.getPosition(),d="";const u=o.scan();if(17===u)break;if(e===n+o.getPosition())throw new Error("Scanner did not advance, next 3 characters are: "+t.substr(o.getPosition(),3));switch(s&&(e-=a),s=a>0,u){case 1:c=G.push(c,0),d=D,i=!1;break;case 2:c=G.pop(c),d=D,i=!1;break;case 3:c=G.push(c,1),d=R,i=!1;break;case 4:c=G.pop(c),d=R,i=!1;break;case 6:d=N,i=!0;break;case 5:d=W,i=!1;break;case 8:case 9:d=K,i=!1;break;case 7:d=q,i=!1;break;case 10:const e=c?c.type:0;d=i||1===e?H:M,i=!1;break;case 11:d=V,i=!1}switch(u){case 12:d=z;break;case 13:d=Q}l.endState=new J(r.getStateData(),o.getTokenError(),i,c),l.tokens.push({startIndex:e,scopes:d})}return l}(0,e,t)}}(O=B||(B={}))[O.None=0]="None",O[O.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",O[O.UnexpectedEndOfString=2]="UnexpectedEndOfString",O[O.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",O[O.InvalidUnicode=4]="InvalidUnicode",O[O.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",O[O.InvalidCharacter=6]="InvalidCharacter",(L=U||(U={}))[L.OpenBraceToken=1]="OpenBraceToken",L[L.CloseBraceToken=2]="CloseBraceToken",L[L.OpenBracketToken=3]="OpenBracketToken",L[L.CloseBracketToken=4]="CloseBracketToken",L[L.CommaToken=5]="CommaToken",L[L.ColonToken=6]="ColonToken",L[L.NullKeyword=7]="NullKeyword",L[L.TrueKeyword=8]="TrueKeyword",L[L.FalseKeyword=9]="FalseKeyword",L[L.StringLiteral=10]="StringLiteral",L[L.NumericLiteral=11]="NumericLiteral",L[L.LineCommentTrivia=12]="LineCommentTrivia",L[L.BlockCommentTrivia=13]="BlockCommentTrivia",L[L.LineBreakTrivia=14]="LineBreakTrivia",L[L.Trivia=15]="Trivia",L[L.Unknown=16]="Unknown",L[L.EOF=17]="EOF",(P=F||(F={}))[P.InvalidSymbol=1]="InvalidSymbol",P[P.InvalidNumberFormat=2]="InvalidNumberFormat",P[P.PropertyNameExpected=3]="PropertyNameExpected",P[P.ValueExpected=4]="ValueExpected",P[P.ColonExpected=5]="ColonExpected",P[P.CommaExpected=6]="CommaExpected",P[P.CloseBraceExpected=7]="CloseBraceExpected",P[P.CloseBracketExpected=8]="CloseBracketExpected",P[P.EndOfFileExpected=9]="EndOfFileExpected",P[P.InvalidCommentToken=10]="InvalidCommentToken",P[P.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",P[P.UnexpectedEndOfString=12]="UnexpectedEndOfString",P[P.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",P[P.InvalidUnicode=14]="InvalidUnicode",P[P.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",P[P.InvalidCharacter=16]="InvalidCharacter";const D="delimiter.bracket.json",R="delimiter.array.json",N="delimiter.colon.json",W="delimiter.comma.json",K="keyword.json",q="keyword.json",H="string.value.json",V="number.json",M="string.key.json",Q="comment.block.json",z="comment.line.json";class G{constructor(e,t){this.parent=e,this.type=t}static pop(e){return e?e.parent:null}static push(e,t){return new G(e,t)}static equals(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;for(;e&&t;){if(e===t)return!0;if(e.type!==t.type)return!1;e=e.parent,t=t.parent}return!0}}class J{constructor(e,t,r,n){this._state=e,this.scanError=t,this.lastWasColon=r,this.parents=n}clone(){return new J(this._state,this.scanError,this.lastWasColon,this.parents)}equals(e){return e===this||!!(e&&e instanceof J)&&(this.scanError===e.scanError&&this.lastWasColon===e.lastWasColon&&G.equals(this.parents,e.parents))}getStateData(){return this._state}setStateData(e){this._state=e}}let Y;function X(){return new Promise((e,t)=>{if(!Y)return t("JSON not registered!");e(Y)})}class Z extends u{constructor(e,t,n){super(e,t,n.onDidChange),this._disposables.push(r.onWillDisposeModel(e=>{this._resetSchema(e.uri)})),this._disposables.push(r.onDidChangeModelLanguage(e=>{this._resetSchema(e.model.uri)}))}_resetSchema(e){this._worker().then(t=>{t.resetSchema(e.toString())})}}function $(e){const r=[],u=[],h=new _(e);function m(){const{languageId:r,modeConfiguration:h}=e;te(u),h.documentFormattingEdits&&u.push(t.registerDocumentFormattingEditProvider(r,new n(Y))),h.documentRangeFormattingEdits&&u.push(t.registerDocumentRangeFormattingEditProvider(r,new a(Y))),h.completionItems&&u.push(t.registerCompletionItemProvider(r,new s(Y,[" ",":",'"']))),h.hovers&&u.push(t.registerHoverProvider(r,new o(Y))),h.documentSymbols&&u.push(t.registerDocumentSymbolProvider(r,new i(Y))),h.tokens&&u.push(t.setTokensProvider(r,j())),h.colors&&u.push(t.registerColorProvider(r,new c(Y))),h.foldingRanges&&u.push(t.registerFoldingRangeProvider(r,new l(Y))),h.diagnostics&&u.push(new Z(r,Y,e)),h.selectionRanges&&u.push(t.registerSelectionRangeProvider(r,new d(Y)))}r.push(h),Y=(...e)=>h.getLanguageServiceWorker(...e),m(),r.push(t.setLanguageConfiguration(e.languageId,re));let p=e.modeConfiguration;return e.onDidChange(e=>{e.modeConfiguration!==p&&(p=e.modeConfiguration,m())}),r.push(ee(u)),ee(r)}function ee(e){return{dispose:()=>te(e)}}function te(e){for(;e.length;)e.pop().dispose()}const re={wordPattern:/(-?\d*\.\d\w*)|([^\[\{\]\}\:\"\,\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:'"',close:'"',notIn:["string"]}]};export{s as CompletionAdapter,h as DefinitionAdapter,u as DiagnosticsAdapter,c as DocumentColorAdapter,n as DocumentFormattingEditProvider,m as DocumentHighlightAdapter,p as DocumentLinkAdapter,a as DocumentRangeFormattingEditProvider,i as DocumentSymbolAdapter,l as FoldingRangeAdapter,o as HoverAdapter,g as ReferenceAdapter,f as RenameAdapter,d as SelectionRangeAdapter,_ as WorkerManager,k as fromPosition,C as fromRange,X as getWorker,$ as setupMode,b as toRange,w as toTextEdit};
|
|
1
|
+
import{c as e,l as t,e as r}from"./editor.main-DGCQQuiO.js";import{f as n,g as a,C as s,H as o,b as i,d as c,F as l,S as d,e as u}from"./lspLanguageFeatures-Bvg2J_jV.js";import{a as h,D as m,h as p,R as g,c as f,i as k,j as C,t as b,k as w}from"./lspLanguageFeatures-Bvg2J_jV.js";import"./index-DknoSkal.js";class _{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),3e4),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>12e4&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=e({moduleId:"vs/language/json/jsonWorker",createWorker:()=>new Worker(new URL(""+new URL("json.worker-D2CYyGom.js",import.meta.url).href,import.meta.url),{type:"module"}),label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...e){let t;return this._getClient().then(e=>{t=e}).then(t=>{if(this._worker)return this._worker.withSyncedResources(e)}).then(e=>t)}}function v(e){return 32===e||9===e}function E(e){return 10===e||13===e}function I(e){return e>=48&&e<=57}var S,T;(T=S||(S={}))[T.lineFeed=10]="lineFeed",T[T.carriageReturn=13]="carriageReturn",T[T.space=32]="space",T[T._0=48]="_0",T[T._1=49]="_1",T[T._2=50]="_2",T[T._3=51]="_3",T[T._4=52]="_4",T[T._5=53]="_5",T[T._6=54]="_6",T[T._7=55]="_7",T[T._8=56]="_8",T[T._9=57]="_9",T[T.a=97]="a",T[T.b=98]="b",T[T.c=99]="c",T[T.d=100]="d",T[T.e=101]="e",T[T.f=102]="f",T[T.g=103]="g",T[T.h=104]="h",T[T.i=105]="i",T[T.j=106]="j",T[T.k=107]="k",T[T.l=108]="l",T[T.m=109]="m",T[T.n=110]="n",T[T.o=111]="o",T[T.p=112]="p",T[T.q=113]="q",T[T.r=114]="r",T[T.s=115]="s",T[T.t=116]="t",T[T.u=117]="u",T[T.v=118]="v",T[T.w=119]="w",T[T.x=120]="x",T[T.y=121]="y",T[T.z=122]="z",T[T.A=65]="A",T[T.B=66]="B",T[T.C=67]="C",T[T.D=68]="D",T[T.E=69]="E",T[T.F=70]="F",T[T.G=71]="G",T[T.H=72]="H",T[T.I=73]="I",T[T.J=74]="J",T[T.K=75]="K",T[T.L=76]="L",T[T.M=77]="M",T[T.N=78]="N",T[T.O=79]="O",T[T.P=80]="P",T[T.Q=81]="Q",T[T.R=82]="R",T[T.S=83]="S",T[T.T=84]="T",T[T.U=85]="U",T[T.V=86]="V",T[T.W=87]="W",T[T.X=88]="X",T[T.Y=89]="Y",T[T.Z=90]="Z",T[T.asterisk=42]="asterisk",T[T.backslash=92]="backslash",T[T.closeBrace=125]="closeBrace",T[T.closeBracket=93]="closeBracket",T[T.colon=58]="colon",T[T.comma=44]="comma",T[T.dot=46]="dot",T[T.doubleQuote=34]="doubleQuote",T[T.minus=45]="minus",T[T.openBrace=123]="openBrace",T[T.openBracket=91]="openBracket",T[T.plus=43]="plus",T[T.slash=47]="slash",T[T.formFeed=12]="formFeed",T[T.tab=9]="tab",new Array(20).fill(0).map((e,t)=>" ".repeat(t));const A=200;var x;new Array(A).fill(0).map((e,t)=>"\n"+" ".repeat(t)),new Array(A).fill(0).map((e,t)=>"\r"+" ".repeat(t)),new Array(A).fill(0).map((e,t)=>"\r\n"+" ".repeat(t)),new Array(A).fill(0).map((e,t)=>"\n"+"\t".repeat(t)),new Array(A).fill(0).map((e,t)=>"\r"+"\t".repeat(t)),new Array(A).fill(0).map((e,t)=>"\r\n"+"\t".repeat(t)),(x||(x={})).DEFAULT={allowTrailingComma:!1};const y=function(e,t=!1){const r=e.length;let n=0,a="",s=0,o=16,i=0,c=0,l=0,d=0,u=0;function h(t,r){let a=0,s=0;for(;a<t;){let t=e.charCodeAt(n);if(t>=48&&t<=57)s=16*s+t-48;else if(t>=65&&t<=70)s=16*s+t-65+10;else{if(!(t>=97&&t<=102))break;s=16*s+t-97+10}n++,a++}return a<t&&(s=-1),s}function m(){if(a="",u=0,s=n,c=i,d=l,n>=r)return s=r,o=17;let t=e.charCodeAt(n);if(v(t)){do{n++,a+=String.fromCharCode(t),t=e.charCodeAt(n)}while(v(t));return o=15}if(E(t))return n++,a+=String.fromCharCode(t),13===t&&10===e.charCodeAt(n)&&(n++,a+="\n"),i++,l=n,o=14;switch(t){case 123:return n++,o=1;case 125:return n++,o=2;case 91:return n++,o=3;case 93:return n++,o=4;case 58:return n++,o=6;case 44:return n++,o=5;case 34:return n++,a=function(){let t="",a=n;for(;;){if(n>=r){t+=e.substring(a,n),u=2;break}const s=e.charCodeAt(n);if(34===s){t+=e.substring(a,n),n++;break}if(92!==s){if(s>=0&&s<=31){if(E(s)){t+=e.substring(a,n),u=2;break}u=6}n++}else{if(t+=e.substring(a,n),n++,n>=r){u=2;break}switch(e.charCodeAt(n++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:const e=h(4);e>=0?t+=String.fromCharCode(e):u=4;break;default:u=5}a=n}}return t}(),o=10;case 47:const c=n-1;if(47===e.charCodeAt(n+1)){for(n+=2;n<r&&!E(e.charCodeAt(n));)n++;return a=e.substring(c,n),o=12}if(42===e.charCodeAt(n+1)){n+=2;const t=r-1;let s=!1;for(;n<t;){const t=e.charCodeAt(n);if(42===t&&47===e.charCodeAt(n+1)){n+=2,s=!0;break}n++,E(t)&&(13===t&&10===e.charCodeAt(n)&&n++,i++,l=n)}return s||(n++,u=1),a=e.substring(c,n),o=13}return a+=String.fromCharCode(t),n++,o=16;case 45:if(a+=String.fromCharCode(t),n++,n===r||!I(e.charCodeAt(n)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return a+=function(){let t=n;if(48===e.charCodeAt(n))n++;else for(n++;n<e.length&&I(e.charCodeAt(n));)n++;if(n<e.length&&46===e.charCodeAt(n)){if(n++,!(n<e.length&&I(e.charCodeAt(n))))return u=3,e.substring(t,n);for(n++;n<e.length&&I(e.charCodeAt(n));)n++}let r=n;if(n<e.length&&(69===e.charCodeAt(n)||101===e.charCodeAt(n)))if(n++,(n<e.length&&43===e.charCodeAt(n)||45===e.charCodeAt(n))&&n++,n<e.length&&I(e.charCodeAt(n))){for(n++;n<e.length&&I(e.charCodeAt(n));)n++;r=n}else u=3;return e.substring(t,r)}(),o=11;default:for(;n<r&&p(t);)n++,t=e.charCodeAt(n);if(s!==n){switch(a=e.substring(s,n),a){case"true":return o=8;case"false":return o=9;case"null":return o=7}return o=16}return a+=String.fromCharCode(t),n++,o=16}}function p(e){if(v(e)||E(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){n=e,a="",s=0,o=16,u=0},getPosition:()=>n,scan:t?function(){let e;do{e=m()}while(e>=12&&e<=15);return e}:m,getToken:()=>o,getTokenValue:()=>a,getTokenOffset:()=>s,getTokenLength:()=>n-s,getTokenStartLine:()=>c,getTokenStartCharacter:()=>s-d,getTokenError:()=>u}};var B,O,U,L,F,P;function j(e){return{getInitialState:()=>new J(null,null,!1,null),tokenize:(e,t)=>function(e,t,r,n=0){let a=0,s=!1;switch(r.scanError){case 2:t='"'+t,a=1;break;case 1:t="/*"+t,a=2}const o=y(t);let i=r.lastWasColon,c=r.parents;const l={tokens:[],endState:r.clone()};for(;;){let e=n+o.getPosition(),d="";const u=o.scan();if(17===u)break;if(e===n+o.getPosition())throw new Error("Scanner did not advance, next 3 characters are: "+t.substr(o.getPosition(),3));switch(s&&(e-=a),s=a>0,u){case 1:c=G.push(c,0),d=D,i=!1;break;case 2:c=G.pop(c),d=D,i=!1;break;case 3:c=G.push(c,1),d=R,i=!1;break;case 4:c=G.pop(c),d=R,i=!1;break;case 6:d=N,i=!0;break;case 5:d=W,i=!1;break;case 8:case 9:d=K,i=!1;break;case 7:d=q,i=!1;break;case 10:const e=c?c.type:0;d=i||1===e?H:M,i=!1;break;case 11:d=V,i=!1}switch(u){case 12:d=z;break;case 13:d=Q}l.endState=new J(r.getStateData(),o.getTokenError(),i,c),l.tokens.push({startIndex:e,scopes:d})}return l}(0,e,t)}}(O=B||(B={}))[O.None=0]="None",O[O.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",O[O.UnexpectedEndOfString=2]="UnexpectedEndOfString",O[O.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",O[O.InvalidUnicode=4]="InvalidUnicode",O[O.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",O[O.InvalidCharacter=6]="InvalidCharacter",(L=U||(U={}))[L.OpenBraceToken=1]="OpenBraceToken",L[L.CloseBraceToken=2]="CloseBraceToken",L[L.OpenBracketToken=3]="OpenBracketToken",L[L.CloseBracketToken=4]="CloseBracketToken",L[L.CommaToken=5]="CommaToken",L[L.ColonToken=6]="ColonToken",L[L.NullKeyword=7]="NullKeyword",L[L.TrueKeyword=8]="TrueKeyword",L[L.FalseKeyword=9]="FalseKeyword",L[L.StringLiteral=10]="StringLiteral",L[L.NumericLiteral=11]="NumericLiteral",L[L.LineCommentTrivia=12]="LineCommentTrivia",L[L.BlockCommentTrivia=13]="BlockCommentTrivia",L[L.LineBreakTrivia=14]="LineBreakTrivia",L[L.Trivia=15]="Trivia",L[L.Unknown=16]="Unknown",L[L.EOF=17]="EOF",(P=F||(F={}))[P.InvalidSymbol=1]="InvalidSymbol",P[P.InvalidNumberFormat=2]="InvalidNumberFormat",P[P.PropertyNameExpected=3]="PropertyNameExpected",P[P.ValueExpected=4]="ValueExpected",P[P.ColonExpected=5]="ColonExpected",P[P.CommaExpected=6]="CommaExpected",P[P.CloseBraceExpected=7]="CloseBraceExpected",P[P.CloseBracketExpected=8]="CloseBracketExpected",P[P.EndOfFileExpected=9]="EndOfFileExpected",P[P.InvalidCommentToken=10]="InvalidCommentToken",P[P.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",P[P.UnexpectedEndOfString=12]="UnexpectedEndOfString",P[P.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",P[P.InvalidUnicode=14]="InvalidUnicode",P[P.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",P[P.InvalidCharacter=16]="InvalidCharacter";const D="delimiter.bracket.json",R="delimiter.array.json",N="delimiter.colon.json",W="delimiter.comma.json",K="keyword.json",q="keyword.json",H="string.value.json",V="number.json",M="string.key.json",Q="comment.block.json",z="comment.line.json";class G{constructor(e,t){this.parent=e,this.type=t}static pop(e){return e?e.parent:null}static push(e,t){return new G(e,t)}static equals(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;for(;e&&t;){if(e===t)return!0;if(e.type!==t.type)return!1;e=e.parent,t=t.parent}return!0}}class J{constructor(e,t,r,n){this._state=e,this.scanError=t,this.lastWasColon=r,this.parents=n}clone(){return new J(this._state,this.scanError,this.lastWasColon,this.parents)}equals(e){return e===this||!!(e&&e instanceof J)&&(this.scanError===e.scanError&&this.lastWasColon===e.lastWasColon&&G.equals(this.parents,e.parents))}getStateData(){return this._state}setStateData(e){this._state=e}}let Y;function X(){return new Promise((e,t)=>{if(!Y)return t("JSON not registered!");e(Y)})}class Z extends u{constructor(e,t,n){super(e,t,n.onDidChange),this._disposables.push(r.onWillDisposeModel(e=>{this._resetSchema(e.uri)})),this._disposables.push(r.onDidChangeModelLanguage(e=>{this._resetSchema(e.model.uri)}))}_resetSchema(e){this._worker().then(t=>{t.resetSchema(e.toString())})}}function $(e){const r=[],u=[],h=new _(e);function m(){const{languageId:r,modeConfiguration:h}=e;te(u),h.documentFormattingEdits&&u.push(t.registerDocumentFormattingEditProvider(r,new n(Y))),h.documentRangeFormattingEdits&&u.push(t.registerDocumentRangeFormattingEditProvider(r,new a(Y))),h.completionItems&&u.push(t.registerCompletionItemProvider(r,new s(Y,[" ",":",'"']))),h.hovers&&u.push(t.registerHoverProvider(r,new o(Y))),h.documentSymbols&&u.push(t.registerDocumentSymbolProvider(r,new i(Y))),h.tokens&&u.push(t.setTokensProvider(r,j())),h.colors&&u.push(t.registerColorProvider(r,new c(Y))),h.foldingRanges&&u.push(t.registerFoldingRangeProvider(r,new l(Y))),h.diagnostics&&u.push(new Z(r,Y,e)),h.selectionRanges&&u.push(t.registerSelectionRangeProvider(r,new d(Y)))}r.push(h),Y=(...e)=>h.getLanguageServiceWorker(...e),m(),r.push(t.setLanguageConfiguration(e.languageId,re));let p=e.modeConfiguration;return e.onDidChange(e=>{e.modeConfiguration!==p&&(p=e.modeConfiguration,m())}),r.push(ee(u)),ee(r)}function ee(e){return{dispose:()=>te(e)}}function te(e){for(;e.length;)e.pop().dispose()}const re={wordPattern:/(-?\d*\.\d\w*)|([^\[\{\]\}\:\"\,\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:'"',close:'"',notIn:["string"]}]};export{s as CompletionAdapter,h as DefinitionAdapter,u as DiagnosticsAdapter,c as DocumentColorAdapter,n as DocumentFormattingEditProvider,m as DocumentHighlightAdapter,p as DocumentLinkAdapter,a as DocumentRangeFormattingEditProvider,i as DocumentSymbolAdapter,l as FoldingRangeAdapter,o as HoverAdapter,g as ReferenceAdapter,f as RenameAdapter,d as SelectionRangeAdapter,_ as WorkerManager,k as fromPosition,C as fromRange,X as getWorker,$ as setupMode,b as toRange,w as toTextEdit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t,l as e,c as n,F as i,ae as s,af as r,ag as o,ac as a,D as l,i as c,Y as h,Z as u,a9 as d,aa as g,ab as p}from"./mermaid.core-C4a3RQhj.js";import{g as y}from"./chunk-5VM5RSS4-ClYZJ82b.js";import"./index-DyV-bHVC.js";var f=function(){var e=t(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),n=[1,4],i=[1,13],s=[1,12],r=[1,15],o=[1,16],a=[1,20],l=[1,19],c=[6,7,8],h=[1,26],u=[1,24],d=[1,25],g=[6,7,11],p=[1,31],y=[6,7,11,24],f=[1,6,13,16,17,20,23],m=[1,35],b=[1,36],_=[1,6,7,11,13,16,17,20,23],k=[1,38],E={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:t(function(t,e,n,i,s,r,o){var a=r.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",r[a-1].id),i.addNode(r[a-2].length,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 16:i.getLogger().info("Node: ",r[a].id),i.addNode(r[a-1].length,r[a].id,r[a].descr,r[a].type);break;case 17:i.getLogger().trace("Icon: ",r[a]),i.decorateNode({icon:r[a]});break;case 18:case 23:i.decorateNode({class:r[a]});break;case 19:i.getLogger().trace("SPACELIST");break;case 20:i.getLogger().trace("Node: ",r[a-1].id),i.addNode(0,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 21:i.getLogger().trace("Node: ",r[a].id),i.addNode(0,r[a].id,r[a].descr,r[a].type);break;case 22:i.decorateNode({icon:r[a]});break;case 27:i.getLogger().trace("node found ..",r[a-2]),this.$={id:r[a-1],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 28:this.$={id:r[a],descr:r[a],type:0};break;case 29:i.getLogger().trace("node found ..",r[a-3]),this.$={id:r[a-3],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 30:this.$=r[a-1]+r[a];break;case 31:this.$=r[a]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:i,7:[1,10],9:9,12:11,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:l},e(c,[2,3]),{1:[2,2]},e(c,[2,4]),e(c,[2,5]),{1:[2,6],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:l},{6:i,9:22,12:11,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:l},{6:h,7:u,10:23,11:d},e(g,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:a,23:l}),e(g,[2,19]),e(g,[2,21],{15:30,24:p}),e(g,[2,22]),e(g,[2,23]),e(y,[2,25]),e(y,[2,26]),e(y,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:d},{1:[2,7],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:l},e(f,[2,14],{7:m,11:b}),e(_,[2,8]),e(_,[2,9]),e(_,[2,10]),e(g,[2,16],{15:37,24:p}),e(g,[2,17]),e(g,[2,18]),e(g,[2,20],{24:k}),e(y,[2,31]),{21:[1,39]},{22:[1,40]},e(f,[2,13],{7:m,11:b}),e(_,[2,11]),e(_,[2,12]),e(g,[2,15],{24:k}),e(y,[2,30]),{22:[1,41]},e(y,[2,27]),e(y,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:t(function(e){var n=this,i=[0],s=[],r=[null],o=[],a=this.table,l="",c=0,h=0,u=o.slice.call(arguments,1),d=Object.create(this.lexer),g={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(g.yy[p]=this.yy[p]);d.setInput(e,g.yy),g.yy.lexer=d,g.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc;o.push(y);var f=d.options&&d.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||d.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t(function(t){i.length=i.length-2*t,r.length=r.length-t,o.length=o.length-t},"popStack"),t(m,"lex");for(var b,_,k,E,S,N,v,x,D={};;){if(_=i[i.length-1],this.defaultActions[_]?k=this.defaultActions[_]:(null==b&&(b=m()),k=a[_]&&a[_][b]),void 0===k||!k.length||!k[0]){var L="";for(S in x=[],a[_])this.terminals_[S]&&S>2&&x.push("'"+this.terminals_[S]+"'");L=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(L,{text:d.match,token:this.terminals_[b]||b,line:d.yylineno,loc:y,expected:x})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(k[0]){case 1:i.push(b),r.push(d.yytext),o.push(d.yylloc),i.push(k[1]),b=null,h=d.yyleng,l=d.yytext,c=d.yylineno,y=d.yylloc;break;case 2:if(N=this.productions_[k[1]][1],D.$=r[r.length-N],D._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},f&&(D._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),void 0!==(E=this.performAction.apply(D,[l,h,c,g.yy,k[1],r,o].concat(u))))return E;N&&(i=i.slice(0,-1*N*2),r=r.slice(0,-1*N),o=o.slice(0,-1*N)),i.push(this.productions_[k[1]][0]),r.push(D.$),o.push(D._$),v=a[i[i.length-2]][i[i.length-1]],i.push(v);break;case 3:return!0}}return!0},"parse")},S=function(){return{EOF:1,parseError:t(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:t(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:t(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:t(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 s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column: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=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(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:t(function(t){this.unput(this.match.slice(t))},"less"),pastInput:t(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:t(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:t(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:t(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],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 r in s)this[r]=s[r];return!1}return!1},"test_match"),next:t(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 s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var t=this.next();return t||this.lex()},"lex"),begin:t(function(t){this.conditionStack.push(t)},"begin"),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:t(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:t(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:t(function(t){this.begin(t)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(t,e,n,i){switch(n){case 0:return this.pushState("shapeData"),e.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const n=/\n\s*/g;return e.yytext=e.yytext.replace(n,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}}();function N(){this.yy={}}return E.lexer=S,t(N,"Parser"),N.prototype=E,E.Parser=N,new N}();f.parser=f;var m=f,b=[],_=[],k=0,E={},S=t(()=>{b=[],_=[],k=0,E={}},"clear"),N=t(t=>{if(0===b.length)return null;const e=b[0].level;let n=null;for(let i=b.length-1;i>=0;i--)if(b[i].level!==e||n||(n=b[i]),b[i].level<e)throw new Error('Items without section detected, found section ("'+b[i].label+'")');return t===(null==n?void 0:n.level)?null:n},"getSection"),v=t(function(){return _},"getSections"),x=t(function(){const t=[],e=v(),i=n();for(const n of e){const e={id:n.id,label:c(n.label??"",i),labelType:"markdown",isGroup:!0,ticket:n.ticket,shape:"kanbanSection",level:n.level,look:i.look};t.push(e);const s=b.filter(t=>t.parentId===n.id);for(const r of s){const e={id:r.id,parentId:n.id,label:c(r.label??"",i),labelType:"markdown",isGroup:!1,ticket:null==r?void 0:r.ticket,priority:null==r?void 0:r.priority,assigned:null==r?void 0:r.assigned,icon:null==r?void 0:r.icon,shape:"kanbanItem",level:r.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(e)}}return{nodes:t,edges:[],other:{},config:n()}},"getData"),D=t((t,e,i,s,r)=>{var o,a;const d=n();let g=(null==(o=d.mindmap)?void 0:o.padding)??l.mindmap.padding;switch(s){case L.ROUNDED_RECT:case L.RECT:case L.HEXAGON:g*=2}const p={id:c(e,d)||"kbn"+k++,level:t,label:c(i,d),width:(null==(a=d.mindmap)?void 0:a.maxNodeWidth)??l.mindmap.maxNodeWidth,padding:g,isGroup:!1};if(void 0!==r){let t;t=r.includes("\n")?r+"\n":"{\n"+r+"\n}";const e=h(t,{schema:u});if(e.shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);(null==e?void 0:e.shape)&&"kanbanItem"===e.shape&&(p.shape=null==e?void 0:e.shape),(null==e?void 0:e.label)&&(p.label=null==e?void 0:e.label),(null==e?void 0:e.icon)&&(p.icon=null==e?void 0:e.icon.toString()),(null==e?void 0:e.assigned)&&(p.assigned=null==e?void 0:e.assigned.toString()),(null==e?void 0:e.ticket)&&(p.ticket=null==e?void 0:e.ticket.toString()),(null==e?void 0:e.priority)&&(p.priority=null==e?void 0:e.priority)}const y=N(t);y?p.parentId=y.id||"kbn"+k++:_.push(p),b.push(p)},"addNode"),L={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},I={clear:S,addNode:D,getSections:v,getData:x,nodeType:L,getType:t((t,n)=>{switch(e.debug("In get type",t,n),t){case"[":return L.RECT;case"(":return")"===n?L.ROUNDED_RECT:L.CLOUD;case"((":return L.CIRCLE;case")":return L.CLOUD;case"))":return L.BANG;case"{{":return L.HEXAGON;default:return L.DEFAULT}},"getType"),setElementForId:t((t,e)=>{E[t]=e},"setElementForId"),decorateNode:t(t=>{if(!t)return;const e=n(),i=b[b.length-1];t.icon&&(i.icon=c(t.icon,e)),t.class&&(i.cssClasses=c(t.class,e))},"decorateNode"),type2Str:t(t=>{switch(t){case L.DEFAULT:return"no-border";case L.RECT:return"rect";case L.ROUNDED_RECT:return"rounded-rect";case L.CIRCLE:return"circle";case L.CLOUD:return"cloud";case L.BANG:return"bang";case L.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:t(()=>e,"getLogger"),getElementById:t(t=>E[t],"getElementById")},O={draw:t(async(t,c,h,u)=>{var d,g,p,y,f;e.debug("Rendering kanban diagram\n"+t);const m=u.db.getData(),b=n();b.htmlLabels=!1;const _=i(c);for(const e of m.nodes)e.domId=`${c}-${e.id}`;const k=_.append("g");k.attr("class","sections");const E=_.append("g");E.attr("class","items");const S=m.nodes.filter(t=>t.isGroup);let N=0;const v=[];let x=25;for(const e of S){const t=(null==(d=null==b?void 0:b.kanban)?void 0:d.sectionWidth)||200;N+=1,e.x=t*N+10*(N-1)/2,e.width=t,e.y=0,e.height=3*t,e.rx=5,e.ry=5,e.cssClasses=e.cssClasses+" section-"+N;const n=await s(k,e);x=Math.max(x,null==(g=null==n?void 0:n.labelBBox)?void 0:g.height),v.push(n)}let D=0;for(const e of S){const t=v[D];D+=1;const n=(null==(p=null==b?void 0:b.kanban)?void 0:p.sectionWidth)||200,i=3*-n/2+x;let s=i;const a=m.nodes.filter(t=>t.parentId===e.id);for(const h of a){if(h.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");h.x=e.x,h.width=n-15;const t=(await r(E,h,{config:b})).node().getBBox();h.y=s+t.height/2,await o(h),s=h.y+t.height/2+5}const l=t.cluster.select("rect"),c=Math.max(s-i+30,50)+(x-25);l.attr("height",c)}a(void 0,_,(null==(y=b.mindmap)?void 0:y.padding)??l.kanban.padding,(null==(f=b.mindmap)?void 0:f.useMaxWidth)??l.kanban.useMaxWidth)},"draw")},C=t(e=>{let n="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],d(e["lineColor"+t])?e["lineColor"+t]=g(e["lineColor"+t],20):e["lineColor"+t]=p(e["lineColor"+t],20);const i=t((t,n)=>e.darkMode?p(t,n):g(t,n),"adjuster");for(let t=0;t<e.THEME_COLOR_LIMIT;t++){const s=""+(17-3*t);n+=`\n .section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} polygon, .section-${t-1} path {\n fill: ${i(e["cScale"+t],10)};\n stroke: ${i(e["cScale"+t],10)};\n\n }\n .section-${t-1} text {\n fill: ${e["cScaleLabel"+t]};\n }\n .node-icon-${t-1} {\n font-size: 40px;\n color: ${e["cScaleLabel"+t]};\n }\n .section-edge-${t-1}{\n stroke: ${e["cScale"+t]};\n }\n .edge-depth-${t-1}{\n stroke-width: ${s};\n }\n .section-${t-1} line {\n stroke: ${e["cScaleInv"+t]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n\n .kanban-ticket-link {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n text-decoration: underline;\n }\n `}return n},"genSections"),w={db:I,renderer:O,parser:m,styles:t(t=>`\n .edge {\n stroke-width: 3;\n }\n ${C(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\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 .cluster-label, .label {\n color: ${t.textColor};\n fill: ${t.textColor};\n }\n .kanban-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n ${y()}\n`,"getStyles")};export{w as diagram};
|
|
1
|
+
import{_ as t,l as e,c as n,F as i,ae as s,af as r,ag as o,ac as a,D as l,i as c,Y as h,Z as u,a9 as d,aa as g,ab as p}from"./mermaid.core-DkcKZax1.js";import{g as y}from"./chunk-5VM5RSS4-CqNmatdI.js";import"./index-DknoSkal.js";var f=function(){var e=t(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),n=[1,4],i=[1,13],s=[1,12],r=[1,15],o=[1,16],a=[1,20],l=[1,19],c=[6,7,8],h=[1,26],u=[1,24],d=[1,25],g=[6,7,11],p=[1,31],y=[6,7,11,24],f=[1,6,13,16,17,20,23],m=[1,35],b=[1,36],_=[1,6,7,11,13,16,17,20,23],k=[1,38],E={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:t(function(t,e,n,i,s,r,o){var a=r.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",r[a-1].id),i.addNode(r[a-2].length,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 16:i.getLogger().info("Node: ",r[a].id),i.addNode(r[a-1].length,r[a].id,r[a].descr,r[a].type);break;case 17:i.getLogger().trace("Icon: ",r[a]),i.decorateNode({icon:r[a]});break;case 18:case 23:i.decorateNode({class:r[a]});break;case 19:i.getLogger().trace("SPACELIST");break;case 20:i.getLogger().trace("Node: ",r[a-1].id),i.addNode(0,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 21:i.getLogger().trace("Node: ",r[a].id),i.addNode(0,r[a].id,r[a].descr,r[a].type);break;case 22:i.decorateNode({icon:r[a]});break;case 27:i.getLogger().trace("node found ..",r[a-2]),this.$={id:r[a-1],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 28:this.$={id:r[a],descr:r[a],type:0};break;case 29:i.getLogger().trace("node found ..",r[a-3]),this.$={id:r[a-3],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 30:this.$=r[a-1]+r[a];break;case 31:this.$=r[a]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:i,7:[1,10],9:9,12:11,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:l},e(c,[2,3]),{1:[2,2]},e(c,[2,4]),e(c,[2,5]),{1:[2,6],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:l},{6:i,9:22,12:11,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:l},{6:h,7:u,10:23,11:d},e(g,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:a,23:l}),e(g,[2,19]),e(g,[2,21],{15:30,24:p}),e(g,[2,22]),e(g,[2,23]),e(y,[2,25]),e(y,[2,26]),e(y,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:d},{1:[2,7],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:l},e(f,[2,14],{7:m,11:b}),e(_,[2,8]),e(_,[2,9]),e(_,[2,10]),e(g,[2,16],{15:37,24:p}),e(g,[2,17]),e(g,[2,18]),e(g,[2,20],{24:k}),e(y,[2,31]),{21:[1,39]},{22:[1,40]},e(f,[2,13],{7:m,11:b}),e(_,[2,11]),e(_,[2,12]),e(g,[2,15],{24:k}),e(y,[2,30]),{22:[1,41]},e(y,[2,27]),e(y,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:t(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:t(function(e){var n=this,i=[0],s=[],r=[null],o=[],a=this.table,l="",c=0,h=0,u=o.slice.call(arguments,1),d=Object.create(this.lexer),g={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(g.yy[p]=this.yy[p]);d.setInput(e,g.yy),g.yy.lexer=d,g.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc;o.push(y);var f=d.options&&d.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||d.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t(function(t){i.length=i.length-2*t,r.length=r.length-t,o.length=o.length-t},"popStack"),t(m,"lex");for(var b,_,k,E,S,N,v,x,D={};;){if(_=i[i.length-1],this.defaultActions[_]?k=this.defaultActions[_]:(null==b&&(b=m()),k=a[_]&&a[_][b]),void 0===k||!k.length||!k[0]){var L="";for(S in x=[],a[_])this.terminals_[S]&&S>2&&x.push("'"+this.terminals_[S]+"'");L=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(L,{text:d.match,token:this.terminals_[b]||b,line:d.yylineno,loc:y,expected:x})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(k[0]){case 1:i.push(b),r.push(d.yytext),o.push(d.yylloc),i.push(k[1]),b=null,h=d.yyleng,l=d.yytext,c=d.yylineno,y=d.yylloc;break;case 2:if(N=this.productions_[k[1]][1],D.$=r[r.length-N],D._$={first_line:o[o.length-(N||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(N||1)].first_column,last_column:o[o.length-1].last_column},f&&(D._$.range=[o[o.length-(N||1)].range[0],o[o.length-1].range[1]]),void 0!==(E=this.performAction.apply(D,[l,h,c,g.yy,k[1],r,o].concat(u))))return E;N&&(i=i.slice(0,-1*N*2),r=r.slice(0,-1*N),o=o.slice(0,-1*N)),i.push(this.productions_[k[1]][0]),r.push(D.$),o.push(D._$),v=a[i[i.length-2]][i[i.length-1]],i.push(v);break;case 3:return!0}}return!0},"parse")},S=function(){return{EOF:1,parseError:t(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:t(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:t(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:t(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 s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column: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=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(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:t(function(t){this.unput(this.match.slice(t))},"less"),pastInput:t(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:t(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:t(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:t(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],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 r in s)this[r]=s[r];return!1}return!1},"test_match"),next:t(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 s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var t=this.next();return t||this.lex()},"lex"),begin:t(function(t){this.conditionStack.push(t)},"begin"),popState:t(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:t(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:t(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:t(function(t){this.begin(t)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(t,e,n,i){switch(n){case 0:return this.pushState("shapeData"),e.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const n=/\n\s*/g;return e.yytext=e.yytext.replace(n,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}}();function N(){this.yy={}}return E.lexer=S,t(N,"Parser"),N.prototype=E,E.Parser=N,new N}();f.parser=f;var m=f,b=[],_=[],k=0,E={},S=t(()=>{b=[],_=[],k=0,E={}},"clear"),N=t(t=>{if(0===b.length)return null;const e=b[0].level;let n=null;for(let i=b.length-1;i>=0;i--)if(b[i].level!==e||n||(n=b[i]),b[i].level<e)throw new Error('Items without section detected, found section ("'+b[i].label+'")');return t===(null==n?void 0:n.level)?null:n},"getSection"),v=t(function(){return _},"getSections"),x=t(function(){const t=[],e=v(),i=n();for(const n of e){const e={id:n.id,label:c(n.label??"",i),labelType:"markdown",isGroup:!0,ticket:n.ticket,shape:"kanbanSection",level:n.level,look:i.look};t.push(e);const s=b.filter(t=>t.parentId===n.id);for(const r of s){const e={id:r.id,parentId:n.id,label:c(r.label??"",i),labelType:"markdown",isGroup:!1,ticket:null==r?void 0:r.ticket,priority:null==r?void 0:r.priority,assigned:null==r?void 0:r.assigned,icon:null==r?void 0:r.icon,shape:"kanbanItem",level:r.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(e)}}return{nodes:t,edges:[],other:{},config:n()}},"getData"),D=t((t,e,i,s,r)=>{var o,a;const d=n();let g=(null==(o=d.mindmap)?void 0:o.padding)??l.mindmap.padding;switch(s){case L.ROUNDED_RECT:case L.RECT:case L.HEXAGON:g*=2}const p={id:c(e,d)||"kbn"+k++,level:t,label:c(i,d),width:(null==(a=d.mindmap)?void 0:a.maxNodeWidth)??l.mindmap.maxNodeWidth,padding:g,isGroup:!1};if(void 0!==r){let t;t=r.includes("\n")?r+"\n":"{\n"+r+"\n}";const e=h(t,{schema:u});if(e.shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);(null==e?void 0:e.shape)&&"kanbanItem"===e.shape&&(p.shape=null==e?void 0:e.shape),(null==e?void 0:e.label)&&(p.label=null==e?void 0:e.label),(null==e?void 0:e.icon)&&(p.icon=null==e?void 0:e.icon.toString()),(null==e?void 0:e.assigned)&&(p.assigned=null==e?void 0:e.assigned.toString()),(null==e?void 0:e.ticket)&&(p.ticket=null==e?void 0:e.ticket.toString()),(null==e?void 0:e.priority)&&(p.priority=null==e?void 0:e.priority)}const y=N(t);y?p.parentId=y.id||"kbn"+k++:_.push(p),b.push(p)},"addNode"),L={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},I={clear:S,addNode:D,getSections:v,getData:x,nodeType:L,getType:t((t,n)=>{switch(e.debug("In get type",t,n),t){case"[":return L.RECT;case"(":return")"===n?L.ROUNDED_RECT:L.CLOUD;case"((":return L.CIRCLE;case")":return L.CLOUD;case"))":return L.BANG;case"{{":return L.HEXAGON;default:return L.DEFAULT}},"getType"),setElementForId:t((t,e)=>{E[t]=e},"setElementForId"),decorateNode:t(t=>{if(!t)return;const e=n(),i=b[b.length-1];t.icon&&(i.icon=c(t.icon,e)),t.class&&(i.cssClasses=c(t.class,e))},"decorateNode"),type2Str:t(t=>{switch(t){case L.DEFAULT:return"no-border";case L.RECT:return"rect";case L.ROUNDED_RECT:return"rounded-rect";case L.CIRCLE:return"circle";case L.CLOUD:return"cloud";case L.BANG:return"bang";case L.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:t(()=>e,"getLogger"),getElementById:t(t=>E[t],"getElementById")},O={draw:t(async(t,c,h,u)=>{var d,g,p,y,f;e.debug("Rendering kanban diagram\n"+t);const m=u.db.getData(),b=n();b.htmlLabels=!1;const _=i(c);for(const e of m.nodes)e.domId=`${c}-${e.id}`;const k=_.append("g");k.attr("class","sections");const E=_.append("g");E.attr("class","items");const S=m.nodes.filter(t=>t.isGroup);let N=0;const v=[];let x=25;for(const e of S){const t=(null==(d=null==b?void 0:b.kanban)?void 0:d.sectionWidth)||200;N+=1,e.x=t*N+10*(N-1)/2,e.width=t,e.y=0,e.height=3*t,e.rx=5,e.ry=5,e.cssClasses=e.cssClasses+" section-"+N;const n=await s(k,e);x=Math.max(x,null==(g=null==n?void 0:n.labelBBox)?void 0:g.height),v.push(n)}let D=0;for(const e of S){const t=v[D];D+=1;const n=(null==(p=null==b?void 0:b.kanban)?void 0:p.sectionWidth)||200,i=3*-n/2+x;let s=i;const a=m.nodes.filter(t=>t.parentId===e.id);for(const h of a){if(h.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");h.x=e.x,h.width=n-15;const t=(await r(E,h,{config:b})).node().getBBox();h.y=s+t.height/2,await o(h),s=h.y+t.height/2+5}const l=t.cluster.select("rect"),c=Math.max(s-i+30,50)+(x-25);l.attr("height",c)}a(void 0,_,(null==(y=b.mindmap)?void 0:y.padding)??l.kanban.padding,(null==(f=b.mindmap)?void 0:f.useMaxWidth)??l.kanban.useMaxWidth)},"draw")},C=t(e=>{let n="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],d(e["lineColor"+t])?e["lineColor"+t]=g(e["lineColor"+t],20):e["lineColor"+t]=p(e["lineColor"+t],20);const i=t((t,n)=>e.darkMode?p(t,n):g(t,n),"adjuster");for(let t=0;t<e.THEME_COLOR_LIMIT;t++){const s=""+(17-3*t);n+=`\n .section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} polygon, .section-${t-1} path {\n fill: ${i(e["cScale"+t],10)};\n stroke: ${i(e["cScale"+t],10)};\n\n }\n .section-${t-1} text {\n fill: ${e["cScaleLabel"+t]};\n }\n .node-icon-${t-1} {\n font-size: 40px;\n color: ${e["cScaleLabel"+t]};\n }\n .section-edge-${t-1}{\n stroke: ${e["cScale"+t]};\n }\n .edge-depth-${t-1}{\n stroke-width: ${s};\n }\n .section-${t-1} line {\n stroke: ${e["cScaleInv"+t]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n\n .kanban-ticket-link {\n fill: ${e.background};\n stroke: ${e.nodeBorder};\n text-decoration: underline;\n }\n `}return n},"genSections"),w={db:I,renderer:O,parser:m,styles:t(t=>`\n .edge {\n stroke-width: 3;\n }\n ${C(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\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 .cluster-label, .label {\n color: ${t.textColor};\n fill: ${t.textColor};\n }\n .kanban-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n ${y()}\n`,"getStyles")};export{w as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b8 as n,b9 as t,ba as r,bb as e,bc as a}from"./mermaid.core-
|
|
1
|
+
import{b8 as n,b9 as t,ba as r,bb as e,bc as a}from"./mermaid.core-DkcKZax1.js";import{i as u}from"./init-C0SZ43gy.js";import{e as o,f as i,a as f,b as c}from"./defaultLocale-BsH76t_G.js";function l(n,t){return null==n||null==t?NaN:n<t?-1:n>t?1:n>=t?0:NaN}function s(n,t){return null==n||null==t?NaN:t<n?-1:t>n?1:t>=n?0:NaN}function h(n){let t,r,e;function a(n,e,a=0,u=n.length){if(a<u){if(0!==t(e,e))return u;do{const t=a+u>>>1;r(n[t],e)<0?a=t+1:u=t}while(a<u)}return a}return 2!==n.length?(t=l,r=(t,r)=>l(n(t),r),e=(t,r)=>n(t)-r):(t=n===l||n===s?n:M,r=n,e=n),{left:a,center:function(n,t,r=0,u=n.length){const o=a(n,t,r,u-1);return o>r&&e(n[o-1],t)>-e(n[o],t)?o-1:o},right:function(n,e,a=0,u=n.length){if(a<u){if(0!==t(e,e))return u;do{const t=a+u>>>1;r(n[t],e)<=0?a=t+1:u=t}while(a<u)}return a}}}function M(){return 0}const m=h(l).right;h(function(n){return null===n?NaN:+n}).center;const p=Math.sqrt(50),g=Math.sqrt(10),N=Math.sqrt(2);function v(n,t,r){const e=(t-n)/Math.max(0,r),a=Math.floor(Math.log10(e)),u=e/Math.pow(10,a),o=u>=p?10:u>=g?5:u>=N?2:1;let i,f,c;return a<0?(c=Math.pow(10,-a)/o,i=Math.round(n*c),f=Math.round(t*c),i/c<n&&++i,f/c>t&&--f,c=-c):(c=Math.pow(10,a)*o,i=Math.round(n/c),f=Math.round(t/c),i*c<n&&++i,f*c>t&&--f),f<i&&.5<=r&&r<2?v(n,t,2*r):[i,f,c]}function b(n,t,r){return v(n=+n,t=+t,r=+r)[2]}function y(n,t,r){r=+r;const e=(t=+t)<(n=+n),a=e?b(t,n,r):b(n,t,r);return(e?-1:1)*(a<0?1/-a:a)}function w(n,t){t||(t=[]);var r,e=n?Math.min(t.length,n.length):0,a=t.slice();return function(u){for(r=0;r<e;++r)a[r]=n[r]*(1-u)+t[r]*u;return a}}function d(n,t){var r,e=t?t.length:0,a=n?Math.min(e,n.length):0,u=new Array(a),o=new Array(e);for(r=0;r<a;++r)u[r]=k(n[r],t[r]);for(;r<e;++r)o[r]=t[r];return function(n){for(r=0;r<a;++r)o[r]=u[r](n);return o}}function A(n,t){var r=new Date;return n=+n,t=+t,function(e){return r.setTime(n*(1-e)+t*e),r}}function x(n,t){var r,e={},a={};for(r in null!==n&&"object"==typeof n||(n={}),null!==t&&"object"==typeof t||(t={}),t)r in n?e[r]=k(n[r],t[r]):a[r]=t[r];return function(n){for(r in e)a[r]=e[r](n);return a}}function k(u,o){var i,f,c=typeof o;return null==o||"boolean"===c?n(o):("number"===c?t:"string"===c?(i=r(o))?(o=i,e):a:o instanceof r?e:o instanceof Date?A:(f=o,!ArrayBuffer.isView(f)||f instanceof DataView?Array.isArray(o)?d:"function"!=typeof o.valueOf&&"function"!=typeof o.toString||isNaN(o)?x:t:w))(u,o)}function j(n,t){return n=+n,t=+t,function(r){return Math.round(n*(1-r)+t*r)}}function D(n){return+n}var q=[0,1];function V(n){return n}function B(n,t){return(t-=n=+n)?function(r){return(r-n)/t}:(r=isNaN(t)?NaN:.5,function(){return r});var r}function F(n,t,r){var e=n[0],a=n[1],u=t[0],o=t[1];return a<e?(e=B(a,e),u=r(o,u)):(e=B(e,a),u=r(u,o)),function(n){return u(e(n))}}function L(n,t,r){var e=Math.min(n.length,t.length)-1,a=new Array(e),u=new Array(e),o=-1;for(n[e]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++o<e;)a[o]=B(n[o],n[o+1]),u[o]=r(t[o],t[o+1]);return function(t){var r=m(n,t,1,e)-1;return u[r](a[r](t))}}function O(n,t){return t.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function R(){var n,r,e,a,u,o,i=q,f=q,c=k,l=V;function s(){var n,t,r,e=Math.min(i.length,f.length);return l!==V&&(n=i[0],t=i[e-1],n>t&&(r=n,n=t,t=r),l=function(r){return Math.max(n,Math.min(t,r))}),a=e>2?L:F,u=o=null,h}function h(t){return null==t||isNaN(t=+t)?e:(u||(u=a(i.map(n),f,c)))(n(l(t)))}return h.invert=function(e){return l(r((o||(o=a(f,i.map(n),t)))(e)))},h.domain=function(n){return arguments.length?(i=Array.from(n,D),s()):i.slice()},h.range=function(n){return arguments.length?(f=Array.from(n),s()):f.slice()},h.rangeRound=function(n){return f=Array.from(n),c=j,s()},h.clamp=function(n){return arguments.length?(l=!!n||V,s()):l!==V},h.interpolate=function(n){return arguments.length?(c=n,s()):c},h.unknown=function(n){return arguments.length?(e=n,h):e},function(t,e){return n=t,r=e,s()}}function S(){return R()(V,V)}function T(n,t,r,e){var a,u=y(n,t,r);switch((e=i(null==e?",f":e)).type){case"s":var l=Math.max(Math.abs(n),Math.abs(t));return null!=e.precision||isNaN(a=function(n,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(o(t)/3)))-o(Math.abs(n)))}(u,l))||(e.precision=a),f(e,l);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(a=function(n,t){return n=Math.abs(n),t=Math.abs(t)-n,Math.max(0,o(t)-o(n))+1}(u,Math.max(Math.abs(n),Math.abs(t))))||(e.precision=a-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(a=function(n){return Math.max(0,-o(Math.abs(n)))}(u))||(e.precision=a-2*("%"===e.type))}return c(e)}function z(n){var t=n.domain;return n.ticks=function(n){var r=t();return function(n,t,r){if(!((r=+r)>0))return[];if((n=+n)===(t=+t))return[n];const e=t<n,[a,u,o]=e?v(t,n,r):v(n,t,r);if(!(u>=a))return[];const i=u-a+1,f=new Array(i);if(e)if(o<0)for(let c=0;c<i;++c)f[c]=(u-c)/-o;else for(let c=0;c<i;++c)f[c]=(u-c)*o;else if(o<0)for(let c=0;c<i;++c)f[c]=(a+c)/-o;else for(let c=0;c<i;++c)f[c]=(a+c)*o;return f}(r[0],r[r.length-1],null==n?10:n)},n.tickFormat=function(n,r){var e=t();return T(e[0],e[e.length-1],null==n?10:n,r)},n.nice=function(r){null==r&&(r=10);var e,a,u=t(),o=0,i=u.length-1,f=u[o],c=u[i],l=10;for(c<f&&(a=f,f=c,c=a,a=o,o=i,i=a);l-- >0;){if((a=b(f,c,r))===e)return u[o]=f,u[i]=c,t(u);if(a>0)f=Math.floor(f/a)*a,c=Math.ceil(c/a)*a;else{if(!(a<0))break;f=Math.ceil(f*a)/a,c=Math.floor(c*a)/a}e=a}return n},n}function C(){var n=S();return n.copy=function(){return O(n,C())},u.apply(n,arguments),z(n)}export{O as a,h as b,S as c,C as l,y as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e}from"./editor.main-
|
|
1
|
+
import{l as e}from"./editor.main-DGCQQuiO.js";import"./index-DknoSkal.js";const t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],i={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,brackets:[["\x3c!--","--\x3e"],["<",">"],["{{","}}"],["{%","%}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"%",close:"%"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${t.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:e.IndentAction.Indent}}]},n={defaultToken:"",tokenPostfix:"",builtinTags:["if","else","elseif","endif","render","assign","capture","endcapture","case","endcase","comment","endcomment","cycle","decrement","for","endfor","include","increment","layout","raw","endraw","render","tablerow","endtablerow","unless","endunless"],builtinFilters:["abs","append","at_least","at_most","capitalize","ceil","compact","date","default","divided_by","downcase","escape","escape_once","first","floor","join","json","last","lstrip","map","minus","modulo","newline_to_br","plus","prepend","remove","remove_first","replace","replace_first","reverse","round","rstrip","size","slice","sort","sort_natural","split","strip","strip_html","strip_newlines","times","truncate","truncatewords","uniq","upcase","url_decode","url_encode","where"],constants:["true","false"],operators:["==","!=",">","<",">=","<="],symbol:/[=><!]+/,identifier:/[a-zA-Z_][\w]*/,tokenizer:{root:[[/\{\%\s*comment\s*\%\}/,"comment.start.liquid","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@liquidState.root"}],[/\{\%/,{token:"@rematch",switchTo:"@liquidState.root"}],[/(<)([\w\-]+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/</,"delimiter.html"],[/\{/,"delimiter.html"],[/[^<{]+/]],comment:[[/\{\%\s*endcomment\s*\%\}/,"comment.end.liquid","@pop"],[/./,"comment.content.liquid"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@liquidState.otherTag"}],[/\{\%/,{token:"@rematch",switchTo:"@liquidState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],liquidState:[[/\{\{/,"delimiter.output.liquid"],[/\}\}/,{token:"delimiter.output.liquid",switchTo:"@$S2.$S3"}],[/\{\%/,"delimiter.tag.liquid"],[/raw\s*\%\}/,"delimiter.tag.liquid","@liquidRaw"],[/\%\}/,{token:"delimiter.tag.liquid",switchTo:"@$S2.$S3"}],{include:"liquidRoot"}],liquidRaw:[[/^(?!\{\%\s*endraw\s*\%\}).+/],[/\{\%/,"delimiter.tag.liquid"],[/@identifier/],[/\%\}/,{token:"delimiter.tag.liquid",next:"@root"}]],liquidRoot:[[/\d+(\.\d+)?/,"number.liquid"],[/"[^"]*"/,"string.liquid"],[/'[^']*'/,"string.liquid"],[/\s+/],[/@symbol/,{cases:{"@operators":"operator.liquid","@default":""}}],[/\./],[/@identifier/,{cases:{"@constants":"keyword.liquid","@builtinFilters":"predefined.liquid","@builtinTags":"predefined.liquid","@default":"variable.liquid"}}],[/[^}|%]/,"variable.liquid"]]}};export{i as conf,n as language};
|