cmcts-c-agent-embedding 1.0.64-vib → 1.0.66-vib
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/.env.example +34 -34
- package/.eslintrc.cjs +14 -14
- package/.prettierignore +3 -3
- package/.prettierrc +8 -8
- package/base.json +21 -21
- package/dist/_basePickBy-1057a1b4.js +1 -0
- package/dist/_basePickBy-cbf78fb3.js +1 -0
- package/dist/_baseUniq-38ea2195.js +1 -0
- package/dist/_baseUniq-52a47b7b.js +1 -0
- package/dist/arc-6b847bc0.js +1 -0
- package/dist/arc-8928af28.js +1 -0
- package/dist/architecture-O4VJ6CD3-42323263.js +1 -0
- package/dist/architecture-O4VJ6CD3-b506967f.js +1 -0
- package/dist/architectureDiagram-VXUJARFQ-1bd867b6.js +1 -0
- package/dist/architectureDiagram-VXUJARFQ-2b851c59.js +1 -0
- package/dist/blockDiagram-VD42YOAC-5cea96b0.js +1 -0
- package/dist/blockDiagram-VD42YOAC-a909b757.js +1 -0
- package/dist/c4Diagram-YG6GDRKO-24d24519.js +1 -0
- package/dist/c4Diagram-YG6GDRKO-54783ab3.js +1 -0
- package/dist/channel-2af69aa2.js +1 -0
- package/dist/channel-f240e622.js +1 -0
- package/dist/chunk-4BX2VUAB-7747ae72.js +1 -0
- package/dist/chunk-4BX2VUAB-d05d937e.js +1 -0
- package/dist/chunk-55IACEB6-5a7b1be3.js +1 -0
- package/dist/chunk-55IACEB6-78729976.js +1 -0
- package/dist/chunk-B4BG7PRW-a97e69ff.js +1 -0
- package/dist/chunk-B4BG7PRW-cbf800c4.js +1 -0
- package/dist/chunk-DI55MBZ5-5dc4f926.js +1 -0
- package/dist/chunk-DI55MBZ5-95d71f6f.js +1 -0
- package/dist/chunk-FMBD7UC4-2c653fda.js +1 -0
- package/dist/chunk-FMBD7UC4-d75ed695.js +1 -0
- package/dist/chunk-QN33PNHL-0bf10733.js +1 -0
- package/dist/chunk-QN33PNHL-b00655c9.js +1 -0
- package/dist/chunk-QZHKN3VN-a979a9fe.js +1 -0
- package/dist/chunk-QZHKN3VN-d57979be.js +1 -0
- package/dist/chunk-TZMSLE5B-6755c559.js +1 -0
- package/dist/chunk-TZMSLE5B-ed6d6d7e.js +1 -0
- package/dist/classDiagram-2ON5EDUG-8b5a2a93.js +1 -0
- package/dist/classDiagram-2ON5EDUG-fa9ecfbb.js +1 -0
- package/dist/classDiagram-v2-WZHVMYZB-8b5a2a93.js +1 -0
- package/dist/classDiagram-v2-WZHVMYZB-fa9ecfbb.js +1 -0
- package/dist/clone-6cd174cf.js +1 -0
- package/dist/clone-8494eb3f.js +1 -0
- package/dist/components/Bot.d.ts.map +1 -1
- package/dist/components/bubbles/BotBubble.d.ts.map +1 -1
- package/dist/components/buttons/ConsultationButton.d.ts +14 -0
- package/dist/components/buttons/ConsultationButton.d.ts.map +1 -0
- package/dist/components/buttons/CopyMessageButton.d.ts +10 -0
- package/dist/components/buttons/CopyMessageButton.d.ts.map +1 -0
- package/dist/components/buttons/EditMessageButton.d.ts +8 -0
- package/dist/components/buttons/EditMessageButton.d.ts.map +1 -0
- package/dist/components/buttons/PopupToast.d.ts +7 -0
- package/dist/components/buttons/PopupToast.d.ts.map +1 -0
- package/dist/components/buttons/ZaloChatButton.d.ts +16 -0
- package/dist/components/buttons/ZaloChatButton.d.ts.map +1 -0
- package/dist/components/demo/ZaloChatDemo.d.ts +2 -0
- package/dist/components/demo/ZaloChatDemo.d.ts.map +1 -0
- package/dist/components/dialogs/EditMessageDialog.d.ts +9 -0
- package/dist/components/dialogs/EditMessageDialog.d.ts.map +1 -0
- package/dist/components/icons/CheckIcon.d.ts +3 -0
- package/dist/components/icons/CheckIcon.d.ts.map +1 -0
- package/dist/components/icons/CopyIcon.d.ts +5 -0
- package/dist/components/icons/CopyIcon.d.ts.map +1 -0
- package/dist/components/icons/EditIcon.d.ts +5 -0
- package/dist/components/icons/EditIcon.d.ts.map +1 -0
- package/dist/components/icons/SupportIcon.d.ts +3 -0
- package/dist/components/icons/SupportIcon.d.ts.map +1 -0
- package/dist/components/inputs/textInput/components/TextInput.d.ts +9 -1
- package/dist/components/inputs/textInput/components/TextInput.d.ts.map +1 -1
- package/dist/components/modals/QuickChatModal.d.ts +10 -0
- package/dist/components/modals/QuickChatModal.d.ts.map +1 -0
- package/dist/components/modals/ZaloHybridWidget.d.ts +9 -0
- package/dist/components/modals/ZaloHybridWidget.d.ts.map +1 -0
- package/dist/components/modals/ZaloOfficialWidget.d.ts +12 -0
- package/dist/components/modals/ZaloOfficialWidget.d.ts.map +1 -0
- package/dist/components/modals/ZaloQRModal.d.ts +8 -0
- package/dist/components/modals/ZaloQRModal.d.ts.map +1 -0
- package/dist/components/modals/ZaloSmartWidget.d.ts +9 -0
- package/dist/components/modals/ZaloSmartWidget.d.ts.map +1 -0
- package/dist/components/modals/ZaloWebChatWidget.d.ts +9 -0
- package/dist/components/modals/ZaloWebChatWidget.d.ts.map +1 -0
- package/dist/components/quickchat/AlwaysOpenChat.d.ts +13 -0
- package/dist/components/quickchat/AlwaysOpenChat.d.ts.map +1 -0
- package/dist/components/quickchat/QuickChatButton.d.ts +10 -0
- package/dist/components/quickchat/QuickChatButton.d.ts.map +1 -0
- package/dist/components/quickchat/QuickChatConfig.d.ts +9 -0
- package/dist/components/quickchat/QuickChatConfig.d.ts.map +1 -0
- package/dist/components/quickchat/QuickChatPanel.d.ts +10 -0
- package/dist/components/quickchat/QuickChatPanel.d.ts.map +1 -0
- package/dist/components/quickchat/QuickChatWidget.d.ts +32 -0
- package/dist/components/quickchat/QuickChatWidget.d.ts.map +1 -0
- package/dist/components/quickchat/index.d.ts +7 -0
- package/dist/components/quickchat/index.d.ts.map +1 -0
- package/dist/cose-bilkent-S5V4N54A-2f5eb275.js +1 -0
- package/dist/cose-bilkent-S5V4N54A-3cda82b5.js +1 -0
- package/dist/cytoscape.esm-9acb9bfe.js +1 -0
- package/dist/dagre-6UL2VRFP-9b648c54.js +1 -0
- package/dist/dagre-6UL2VRFP-e997588d.js +1 -0
- package/dist/defaultLocale-1fe70b7d.js +1 -0
- package/dist/diagram-PSM6KHXK-1234d08d.js +1 -0
- package/dist/diagram-PSM6KHXK-15013de5.js +1 -0
- package/dist/diagram-QEK2KX5R-489b9505.js +1 -0
- package/dist/diagram-QEK2KX5R-9e94df2a.js +1 -0
- package/dist/diagram-S2PKOQOG-6fef3823.js +1 -0
- package/dist/diagram-S2PKOQOG-c943ed25.js +1 -0
- package/dist/erDiagram-Q2GNP2WA-2b1823f2.js +1 -0
- package/dist/erDiagram-Q2GNP2WA-7e6c6a04.js +1 -0
- package/dist/features/bubble/components/BubbleButton.d.ts.map +1 -1
- package/dist/flowDiagram-NV44I4VS-709c6479.js +1 -0
- package/dist/flowDiagram-NV44I4VS-98a84da9.js +1 -0
- package/dist/ganttDiagram-LVOFAZNH-1d379d6a.js +1 -0
- package/dist/ganttDiagram-LVOFAZNH-d8342586.js +1 -0
- package/dist/gitGraph-ZV4HHKMB-788776f3.js +1 -0
- package/dist/gitGraph-ZV4HHKMB-ba420dcc.js +1 -0
- package/dist/gitGraphDiagram-NY62KEGX-804d1363.js +1 -0
- package/dist/gitGraphDiagram-NY62KEGX-919097ea.js +1 -0
- package/dist/graph-834f6046.js +1 -0
- package/dist/graph-db4953aa.js +1 -0
- package/dist/info-63CPKGFF-2dccc483.js +1 -0
- package/dist/info-63CPKGFF-ef40f1c4.js +1 -0
- package/dist/infoDiagram-F6ZHWCRC-579d50b4.js +1 -0
- package/dist/infoDiagram-F6ZHWCRC-c9877bad.js +1 -0
- package/dist/init-cf76ae07.js +1 -0
- package/dist/journeyDiagram-XKPGCS4Q-25d3c922.js +1 -0
- package/dist/journeyDiagram-XKPGCS4Q-2d2cda1c.js +1 -0
- package/dist/kanban-definition-3W4ZIXB7-c556bee0.js +1 -0
- package/dist/kanban-definition-3W4ZIXB7-cdb93ec0.js +1 -0
- package/dist/katex-0a18b0df.js +1 -0
- package/dist/layout-40652dba.js +1 -0
- package/dist/layout-54ffc604.js +1 -0
- package/dist/linear-2f639b72.js +1 -0
- package/dist/linear-ed2367ff.js +1 -0
- package/dist/mermaid-parser.core-0cfa7d2a.js +1 -0
- package/dist/mermaid-parser.core-10bed742.js +1 -0
- package/dist/mindmap-definition-VGOIOE7T-169f5fe5.js +1 -0
- package/dist/mindmap-definition-VGOIOE7T-dea1c792.js +1 -0
- package/dist/ordinal-221e41d7.js +1 -0
- package/dist/packet-HUATNLJX-6f2471ea.js +1 -0
- package/dist/packet-HUATNLJX-c69e28eb.js +1 -0
- package/dist/pie-WTHONI2E-4143e44b.js +1 -0
- package/dist/pie-WTHONI2E-82b1fe3f.js +1 -0
- package/dist/pieDiagram-ADFJNKIX-499eec78.js +1 -0
- package/dist/pieDiagram-ADFJNKIX-657effd5.js +1 -0
- package/dist/quadrantDiagram-AYHSOK5B-138a0c93.js +1 -0
- package/dist/quadrantDiagram-AYHSOK5B-91137c4d.js +1 -0
- package/dist/radar-NJJJXTRR-5e934a95.js +1 -0
- package/dist/radar-NJJJXTRR-94d77527.js +1 -0
- package/dist/requirementDiagram-UZGBJVZJ-a5d9fb39.js +1 -0
- package/dist/requirementDiagram-UZGBJVZJ-d7aeec99.js +1 -0
- package/dist/sankeyDiagram-TZEHDZUN-15053ae0.js +1 -0
- package/dist/sankeyDiagram-TZEHDZUN-aadd2125.js +1 -0
- package/dist/sequenceDiagram-WL72ISMW-12e778ef.js +1 -0
- package/dist/sequenceDiagram-WL72ISMW-9330a98a.js +1 -0
- package/dist/stateDiagram-FKZM4ZOC-01225f0f.js +1 -0
- package/dist/stateDiagram-FKZM4ZOC-af4836d7.js +1 -0
- package/dist/stateDiagram-v2-4FDKWEC3-4774cc10.js +1 -0
- package/dist/stateDiagram-v2-4FDKWEC3-5ef8e019.js +1 -0
- package/dist/timeline-definition-IT6M3QCI-9921f937.js +1 -0
- package/dist/timeline-definition-IT6M3QCI-a7a9bbec.js +1 -0
- package/dist/treemap-75Q7IDZK-100ddeb7.js +1 -0
- package/dist/treemap-75Q7IDZK-851117b4.js +1 -0
- package/dist/utils/redisAndQueue.d.ts +32 -0
- package/dist/utils/redisAndQueue.d.ts.map +1 -0
- package/dist/utils/transcriptApi.d.ts +8 -0
- package/dist/utils/transcriptApi.d.ts.map +1 -0
- package/dist/web-0016ac81.js +1 -0
- package/dist/web-4e6d8ea9.js +1 -0
- package/dist/web.js +1 -1
- package/dist/xychartDiagram-PRI3JC2R-003630a4.js +1 -0
- package/dist/xychartDiagram-PRI3JC2R-df869780.js +1 -0
- package/package.json +78 -78
- package/public/index.html +46 -46
- package/.env +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as r}from"./chunk-4BX2VUAB-7747ae72.js";import{I as t}from"./chunk-QZHKN3VN-a979a9fe.js";import{C as e,_ as a,d as o,D as n,E as i,F as s,l as c,s as h,g as d,b as m,c as $,n as y,o as l,e as g,t as p,j as x,u as f,G as u}from"./web-0016ac81.js";import{p as b}from"./mermaid-parser.core-0cfa7d2a.js";import"./_baseUniq-38ea2195.js";import"./_basePickBy-cbf78fb3.js";import"./clone-8494eb3f.js";var w={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},B=e.gitGraph,E=a((()=>n({...B,...i().gitGraph})),"getConfig"),v=new t((()=>{var r=(t=E()).mainBranchName,t=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}}));function k(){return s({length:7})}function C(r,t){const e=Object.create(null);return r.reduce(((r,a)=>{var o=t(a);return e[o]||(e[o]=!0,r.push(a)),r}),[])}a(k,"getID"),a(C,"uniqBy");var L=a((function(r){v.records.direction=r}),"setDirection"),T=a((function(r){c.debug("options str",r),r=(r=r?.trim())||"{}";try{v.records.options=JSON.parse(r)}catch(r){c.error("error while parsing gitGraph options",r.message)}}),"setOptions"),M=a((function(){return v.records.options}),"getOptions"),P=a((function(r){var t=r.msg,e=r.id,a=r.type;let o=r.tags;c.info("commit",t,e,a,o),c.debug("Entering commit:",t,e,a,o);const n=E();e=g.sanitizeText(e,n),t=g.sanitizeText(t,n),o=o?.map((r=>g.sanitizeText(r,n))),r={id:e||v.records.seq+"-"+k(),message:t,seq:v.records.seq++,type:a??w.NORMAL,tags:o??[],parents:null==v.records.head?[]:[v.records.head.id],branch:v.records.currBranch},v.records.head=r,c.info("main branch",n.mainBranchName),v.records.commits.has(r.id)&&c.warn(`Commit ID ${r.id} already exists`),v.records.commits.set(r.id,r),v.records.branches.set(v.records.currBranch,r.id),c.debug("in pushCommit "+r.id)}),"commit"),R=a((function(r){var t=r.name;r=r.order,t=g.sanitizeText(t,E());if(v.records.branches.has(t))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);v.records.branches.set(t,null!=v.records.head?v.records.head.id:null),v.records.branchConfig.set(t,{name:t,order:r}),G(t),c.debug("in createBranch")}),"branch"),I=a((r=>{var t=r.branch;let e=r.id;var a=r.type,o=(r=r.tags,E()),n=(t=g.sanitizeText(t,o),o=(e=e&&g.sanitizeText(e,o),v.records.branches.get(v.records.currBranch)),v.records.branches.get(t)),i=(o=o?v.records.commits.get(o):void 0,n?v.records.commits.get(n):void 0);if(o&&i&&o.branch===t)throw new Error(`Cannot merge branch '${t}' into itself.`);if(v.records.currBranch===t)throw(s=new Error('Incorrect usage of "merge". Cannot merge a branch to itself')).hash={text:"merge "+t,token:"merge "+t,expected:["branch abc"]},s;if(void 0===o||!o)throw(s=new Error(`Incorrect usage of "merge". Current branch (${v.records.currBranch})has no commits`)).hash={text:"merge "+t,token:"merge "+t,expected:["commit"]},s;if(!v.records.branches.has(t))throw(s=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist")).hash={text:"merge "+t,token:"merge "+t,expected:["branch "+t]},s;if(void 0===i||!i)throw(s=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits")).hash={text:"merge "+t,token:"merge "+t,expected:['"commit"']},s;if(o===i)throw(s=new Error('Incorrect usage of "merge". Both branches have same head')).hash={text:"merge "+t,token:"merge "+t,expected:["branch abc"]},s;if(e&&v.records.commits.has(e))throw(o=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom id")).hash={text:`merge ${t} ${e} ${a} `+r?.join(" "),token:`merge ${t} ${e} ${a} `+r?.join(" "),expected:[`merge ${t} ${e}_UNIQUE ${a} `+r?.join(" ")]},o;i=n||"";var s={id:e||v.records.seq+"-"+k(),message:`merged branch ${t} into `+v.records.currBranch,seq:v.records.seq++,parents:null==v.records.head?[]:[v.records.head.id,i],branch:v.records.currBranch,type:w.MERGE,customType:a,customId:!!e,tags:r??[]};v.records.head=s,v.records.commits.set(s.id,s),v.records.branches.set(v.records.currBranch,s.id),c.debug(v.records.branches),c.debug("in mergeBranch")}),"merge"),A=a((function(r){var t=r.id,e=r.targetId;let a=r.tags;r=r.parent,c.debug("Entering cherryPick:",t,e,a);const o=E();if(t=g.sanitizeText(t,o),e=g.sanitizeText(e,o),a=a?.map((r=>g.sanitizeText(r,o))),r=g.sanitizeText(r,o),!t||!v.records.commits.has(t))throw(n=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided')).hash={text:`cherryPick ${t} `+e,token:`cherryPick ${t} `+e,expected:["cherry-pick abc"]},n;var n=v.records.commits.get(t);if(void 0===n||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(r&&(!Array.isArray(n.parents)||!n.parents.includes(r)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");var i=n.branch;if(n.type===w.MERGE&&!r)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!e||!v.records.commits.has(e)){if(i===v.records.currBranch)throw(i=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch')).hash={text:`cherryPick ${t} `+e,token:`cherryPick ${t} `+e,expected:["cherry-pick abc"]},i;if(void 0===(i=v.records.branches.get(v.records.currBranch))||!i)throw(s=new Error(`Incorrect usage of "cherry-pick". Current branch (${v.records.currBranch})has no commits`)).hash={text:`cherryPick ${t} `+e,token:`cherryPick ${t} `+e,expected:["cherry-pick abc"]},s;var s=v.records.commits.get(i);if(void 0===s||!s)throw(i=new Error(`Incorrect usage of "cherry-pick". Current branch (${v.records.currBranch})has no commits`)).hash={text:`cherryPick ${t} `+e,token:`cherryPick ${t} `+e,expected:["cherry-pick abc"]},i;s={id:v.records.seq+"-"+k(),message:`cherry-picked ${n?.message} into `+v.records.currBranch,seq:v.records.seq++,parents:null==v.records.head?[]:[v.records.head.id,n.id],branch:v.records.currBranch,type:w.CHERRY_PICK,tags:a?a.filter(Boolean):["cherry-pick:"+n.id+(n.type===w.MERGE?"|parent:"+r:"")]},v.records.head=s,v.records.commits.set(s.id,s),v.records.branches.set(v.records.currBranch,s.id),c.debug(v.records.branches),c.debug("in cherryPick")}}),"cherryPick"),G=a((function(r){var t;if(r=g.sanitizeText(r,E()),!v.records.branches.has(r))throw(t=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${r}")`)).hash={text:"checkout "+r,token:"checkout "+r,expected:["branch "+r]},t;v.records.currBranch=r,t=v.records.branches.get(v.records.currBranch),v.records.head=void 0!==t&&t?v.records.commits.get(t)??null:null}),"checkout");function O(r,t,e){-1===(t=r.indexOf(t))?r.push(e):r.splice(t,1,e)}function q(r){const t=r.reduce(((r,t)=>r.seq>t.seq?r:t),r[0]);let e="";r.forEach((function(r){e+=r===t?"\t*":"\t|"}));var a=[e,t.id,t.seq];for(const r in v.records.branches)v.records.branches.get(r)===t.id&&a.push(r);if(c.debug(a.join(" ")),t.parents&&2==t.parents.length&&t.parents[0]&&t.parents[1]){var o=v.records.commits.get(t.parents[0]);O(r,t,o),t.parents[1]&&r.push(v.records.commits.get(t.parents[1]))}else{if(0==t.parents.length)return;t.parents[0]&&(o=v.records.commits.get(t.parents[0]),O(r,t,o))}q(r=C(r,(r=>r.id)))}a(O,"upsert"),a(q,"prettyPrintCommitHistory");var H=a((function(){c.debug(v.records.commits),q([N()[0]])}),"prettyPrint"),z=a((function(){v.reset(),p()}),"clear"),j=a((function(){return[...v.records.branchConfig.values()].map(((r,t)=>null!==r.order&&void 0!==r.order?r:{...r,order:parseFloat("0."+t)})).sort(((r,t)=>(r.order??0)-(t.order??0))).map((({name:r})=>({name:r})))}),"getBranchesAsObjArray"),S=a((function(){return v.records.branches}),"getBranches"),D=a((function(){return v.records.commits}),"getCommits"),N=a((function(){var r=[...v.records.commits.values()];return r.forEach((function(r){c.debug(r.id)})),r.sort(((r,t)=>r.seq-t.seq)),r}),"getCommitsArray"),W=a((function(){return v.records.currBranch}),"getCurrentBranch"),_=a((function(){return v.records.direction}),"getDirection"),F=a((function(){return v.records.head}),"getHead"),K={commitType:w,getConfig:E,setDirection:L,setOptions:T,getOptions:M,commit:P,branch:R,merge:I,cherryPick:A,checkout:G,prettyPrint:H,clear:z,getBranchesAsObjArray:j,getBranches:S,getCommits:D,getCommitsArray:N,getCurrentBranch:W,getDirection:_,getHead:F,setAccTitle:h,getAccTitle:d,getAccDescription:m,setAccDescription:$,setDiagramTitle:y,getDiagramTitle:l},U=a(((t,e)=>{r(t,e),t.dir&&e.setDirection(t.dir);for(const r of t.statements)V(r,e)}),"populate"),V=a(((r,t)=>{var e={Commit:a((r=>t.commit(Y(r))),"Commit"),Branch:a((r=>t.branch(Q(r))),"Branch"),Merge:a((r=>t.merge(X(r))),"Merge"),Checkout:a((r=>t.checkout(J(r))),"Checkout"),CherryPicking:a((r=>t.cherryPick(Z(r))),"CherryPicking")}[r.$type];e?e(r):c.error("Unknown statement type: "+r.$type)}),"parseStatement"),Y=a((r=>({id:r.id,msg:r.message??"",type:void 0!==r.type?w[r.type]:w.NORMAL,tags:r.tags??void 0})),"parseCommit"),Q=a((r=>({name:r.name,order:r.order??0})),"parseBranch"),X=a((r=>({branch:r.branch,id:r.id??"",type:void 0!==r.type?w[r.type]:void 0,tags:r.tags??void 0})),"parseMerge"),J=a((r=>r.branch),"parseCheckout"),Z=a((r=>({id:r.id,targetId:"",tags:0===r.tags?.length?void 0:r.tags,parent:r.parent})),"parseCherryPicking"),rr={parse:a((async r=>{r=await b("gitGraph",r),c.debug(r),U(r,K)}),"parse")},tr=o(),er=tr?.gitGraph,ar=10,or=40,nr=new Map,ir=new Map,sr=new Map,cr=[],hr=0,dr="LR",mr=a((()=>{nr.clear(),ir.clear(),sr.clear(),hr=0,cr=[],dr="LR"}),"clear"),$r=a((r=>{const t=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof r?r.split(/\\n|\n|<br\s*\/?>/gi):r).forEach((r=>{var e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=r.trim(),t.appendChild(e)})),t}),"drawText"),yr=a((r=>{let t,e,o;return o="BT"===dr?(e=a(((r,t)=>r<=t),"comparisonFunc"),1/0):(e=a(((r,t)=>t<=r),"comparisonFunc"),0),r.forEach((r=>{var a="TB"===dr||"BT"==dr?ir.get(r)?.y:ir.get(r)?.x;void 0!==a&&e(a,o)&&(t=r,o=a)})),t}),"findClosestParent"),lr=a((r=>{let t="",e=1/0;return r.forEach((r=>{var a=ir.get(r).y;a<=e&&(t=r,e=a)})),t||void 0}),"findClosestParentBT"),gr=a(((r,t,e)=>{let a=e,o=e;const n=[];r.forEach((r=>{var e=t.get(r);if(!e)throw new Error("Commit not found for key "+r);e.parents.length?(a=xr(e),o=Math.max(a,o)):n.push(e),fr(e,a)})),a=o,n.forEach((r=>{ur(r,a,e)})),r.forEach((r=>{var e,n;r=t.get(r);r?.parents.length&&(e=lr(r.parents),(a=ir.get(e).y-or)<=o&&(o=a),e=nr.get(r.branch).pos,n=a-ar,ir.set(r.id,{x:e,y:n}))}))}),"setParallelBTPos"),pr=a((r=>{var t=yr(r.parents.filter((r=>null!==r)));if(!t)throw new Error("Closest parent not found for commit "+r.id);if(t=ir.get(t)?.y,void 0===t)throw new Error("Closest parent position not found for commit "+r.id);return t}),"findClosestParentPos"),xr=a((r=>pr(r)+or),"calculateCommitPosition"),fr=a(((r,t)=>{var e=nr.get(r.branch);if(e)return e=e.pos,ir.set(r.id,{x:e,y:t+=ar}),{x:e,y:t};throw new Error("Branch not found for commit "+r.id)}),"setCommitPosition"),ur=a(((r,t,e)=>{var a=nr.get(r.branch);if(!a)throw new Error("Branch not found for commit "+r.id);a=a.pos,ir.set(r.id,{x:a,y:t+e})}),"setRootPosition"),br=a(((r,t,e,a,o,n)=>{var i;n===w.HIGHLIGHT?(r.append("rect").attr("x",e.x-10).attr("y",e.y-10).attr("width",20).attr("height",20).attr("class",`commit ${t.id} commit-highlight${o%8} ${a}-outer`),r.append("rect").attr("x",e.x-6).attr("y",e.y-6).attr("width",12).attr("height",12).attr("class",`commit ${t.id} commit${o%8} ${a}-inner`)):n===w.CHERRY_PICK?(r.append("circle").attr("cx",e.x).attr("cy",e.y).attr("r",10).attr("class",`commit ${t.id} `+a),r.append("circle").attr("cx",e.x-3).attr("cy",e.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} `+a),r.append("circle").attr("cx",e.x+3).attr("cy",e.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} `+a),r.append("line").attr("x1",e.x+3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke","#fff").attr("class",`commit ${t.id} `+a),r.append("line").attr("x1",e.x-3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke","#fff").attr("class",`commit ${t.id} `+a)):((i=r.append("circle")).attr("cx",e.x),i.attr("cy",e.y),i.attr("r",t.type===w.MERGE?9:10),i.attr("class",`commit ${t.id} commit`+o%8),n===w.MERGE&&((i=r.append("circle")).attr("cx",e.x),i.attr("cy",e.y),i.attr("r",6),i.attr("class",`commit ${a} ${t.id} commit`+o%8)),n===w.REVERSE&&r.append("path").attr("d",`M ${e.x-5},${e.y-5}L${e.x+5},${e.y+5}M${e.x-5},${e.y+5}L${e.x+5},`+(e.y-5)).attr("class",`commit ${a} ${t.id} commit`+o%8))}),"drawCommitBullet"),wr=a(((r,t,e,a)=>{var o,n;t.type!==w.CHERRY_PICK&&(t.customId&&t.type===w.MERGE||t.type!==w.MERGE)&&er?.showCommitLabel&&(n=(r=r.append("g")).insert("rect").attr("class","commit-label-bkg"),o=(t=r.append("text").attr("x",a).attr("y",e.y+25).attr("class","commit-label").text(t.id)).node()?.getBBox())&&(n.attr("x",e.posWithOffset-o.width/2-2).attr("y",e.y+13.5).attr("width",o.width+4).attr("height",o.height+4),"TB"===dr||"BT"===dr?(n.attr("x",e.x-(o.width+16+5)).attr("y",e.y-12),t.attr("x",e.x-(o.width+16)).attr("y",e.y+o.height-12)):t.attr("x",e.posWithOffset-o.width/2),er.rotateCommitLabel)&&("TB"===dr||"BT"===dr?(t.attr("transform","rotate(-45, "+e.x+", "+e.y+")"),n.attr("transform","rotate(-45, "+e.x+", "+e.y+")")):(t=-7.5-(o.width+10)/25*9.5,n=10+o.width/25*8.5,r.attr("transform","translate("+t+", "+n+") rotate(-45, "+a+", "+e.y+")")))}),"drawCommitLabel"),Br=a(((r,t,e,a)=>{if(0<t.tags.length){let g=0,p=0,x=0;var o,n,i,s,c=[];for(const a of t.tags.reverse()){var h=r.insert("polygon"),d=r.append("circle"),m=r.append("text").attr("y",e.y-16-g).attr("class","tag-label").text(a),$=m.node()?.getBBox();if(!$)throw new Error("Tag bbox not found");p=Math.max(p,$.width),x=Math.max(x,$.height),m.attr("x",e.posWithOffset-$.width/2),c.push({tag:m,hole:d,rect:h,yOffset:g}),g+=20}for({tag:o,hole:n,rect:i,yOffset:s}of c){var y=x/2,l=e.y-19.2-s;i.attr("class","tag-label-bkg").attr("points",`\n ${a-p/2-2},${l+2} \n ${a-p/2-2},${l-2}\n ${e.posWithOffset-p/2-4},${l-y-2}\n ${e.posWithOffset+p/2+4},${l-y-2}\n ${e.posWithOffset+p/2+4},${l+y+2}\n ${e.posWithOffset-p/2-4},`+(l+y+2)),n.attr("cy",l).attr("cx",a-p/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"!==dr&&"BT"!==dr||(l=a+s,i.attr("class","tag-label-bkg").attr("points",`\n ${e.x},${l+2}\n ${e.x},${l-2}\n ${e.x+ar},${l-y-2}\n ${e.x+ar+p+4},${l-y-2}\n ${e.x+ar+p+4},${l+y+2}\n ${e.x+ar},`+(l+y+2)).attr("transform","translate(12,12) rotate(45, "+e.x+","+a+")"),n.attr("cx",e.x+2).attr("cy",l).attr("transform","translate(12,12) rotate(45, "+e.x+","+a+")"),o.attr("x",e.x+5).attr("y",l+3).attr("transform","translate(14,14) rotate(45, "+e.x+","+a+")"))}}}),"drawCommitTags"),Er=a((r=>{switch(r.customType??r.type){case w.NORMAL:return"commit-normal";case w.REVERSE:return"commit-reverse";case w.HIGHLIGHT:return"commit-highlight";case w.MERGE:return"commit-merge";case w.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}}),"getCommitClassType"),vr=a(((r,t,e,a)=>{var o,n={x:0,y:0};return 0<r.parents.length?(o=yr(r.parents))?(o=a.get(o)??n,"TB"===t?o.y+or:"BT"===t?(a.get(r.id)??n).y-or:o.x+or):0:"TB"===t?30:"BT"===t?(a.get(r.id)??n).y-or:0}),"calculatePosition"),kr=a(((r,t,e)=>{e="BT"===dr&&e?t:t+ar,t="TB"===dr||"BT"===dr?e:nr.get(r.branch)?.pos;var a="TB"===dr||"BT"===dr?nr.get(r.branch)?.pos:e;if(void 0===a||void 0===t)throw new Error("Position were undefined for commit "+r.id);return{x:a,y:t,posWithOffset:e}}),"getCommitPosition"),Cr=a(((r,t,e)=>{if(!er)throw new Error("GitGraph config not found");const o=r.append("g").attr("class","commit-bullets"),n=r.append("g").attr("class","commit-labels");let i="TB"===dr||"BT"===dr?30:0;r=[...t.keys()];const s=er?.parallelCommits??!1;var c=a(((r,e)=>(r=t.get(r)?.seq,e=t.get(e)?.seq,void 0!==r&&void 0!==e?r-e:0)),"sortKeys");let h=r.sort(c);"BT"===dr&&(s&&gr(h,t,i),h=h.reverse()),h.forEach((r=>{var a=t.get(r);if(!a)throw new Error("Commit not found for key "+r);s&&(i=vr(a,dr,i,ir));var c,h,d;r=kr(a,i,s);e&&(c=Er(a),h=a.customType??a.type,d=nr.get(a.branch)?.index??0,br(o,a,r,c,d,h),wr(n,a,r,i),Br(n,a,r,i)),"TB"===dr||"BT"===dr?ir.set(a.id,{x:r.x,y:r.posWithOffset}):ir.set(a.id,{x:r.posWithOffset,y:r.y}),(i="BT"===dr&&s?i+or:i+or+ar)>hr&&(hr=i)}))}),"drawCommits"),Lr=a(((r,t,e,o,n)=>{const i=(("TB"===dr||"BT"===dr?e.x<o.x:e.y<o.y)?t:r).branch,s=a((r=>r.branch===i),"isOnBranchToGetCurve"),c=a((e=>e.seq>r.seq&&e.seq<t.seq),"isBetweenCommits");return[...n.values()].some((r=>c(r)&&s(r)))}),"shouldRerouteArrow"),Tr=a(((r,t,e=0)=>{const a=r+Math.abs(r-t)/2;var o;return 5<e?a:cr.every((r=>10<=Math.abs(r-a)))?(cr.push(a),a):(o=Math.abs(r-t),Tr(r,t-o/5,e+1))}),"findLane"),Mr=a(((r,t,e,a)=>{var o=ir.get(t.id),n=ir.get(e.id);if(void 0===o||void 0===n)throw new Error(`Commit positions not found for commits ${t.id} and `+e.id);var i;a=Lr(t,e,o,n,a);let s,c="",h="",d=0,m=0,$=nr.get(e.branch)?.index;if(e.type===w.MERGE&&t.id!==e.parents[0]&&($=nr.get(t.branch)?.index),a?(c="A 10 10, 0, 0, 0,",h="A 10 10, 0, 0, 1,",d=10,m=10,a=o.y<n.y?Tr(o.y,n.y):Tr(n.y,o.y),i=o.x<n.x?Tr(o.x,n.x):Tr(n.x,o.x),s="TB"===dr?o.x<n.x?`M ${o.x} ${o.y} L ${i-d} ${o.y} ${h} ${i} ${o.y+m} L ${i} ${n.y-d} ${c} ${i+m} ${n.y} L ${n.x} `+n.y:($=nr.get(t.branch)?.index,`M ${o.x} ${o.y} L ${i+d} ${o.y} ${c} ${i} ${o.y+m} L ${i} ${n.y-d} ${h} ${i-m} ${n.y} L ${n.x} `+n.y):"BT"===dr?o.x<n.x?`M ${o.x} ${o.y} L ${i-d} ${o.y} ${c} ${i} ${o.y-m} L ${i} ${n.y+d} ${h} ${i+m} ${n.y} L ${n.x} `+n.y:($=nr.get(t.branch)?.index,`M ${o.x} ${o.y} L ${i+d} ${o.y} ${h} ${i} ${o.y-m} L ${i} ${n.y+d} ${c} ${i-m} ${n.y} L ${n.x} `+n.y):o.y<n.y?`M ${o.x} ${o.y} L ${o.x} ${a-d} ${c} ${o.x+m} ${a} L ${n.x-d} ${a} ${h} ${n.x} ${a+m} L ${n.x} `+n.y:($=nr.get(t.branch)?.index,`M ${o.x} ${o.y} L ${o.x} ${a+d} ${h} ${o.x+m} ${a} L ${n.x-d} ${a} ${c} ${n.x} ${a-m} L ${n.x} `+n.y)):(c="A 20 20, 0, 0, 0,",h="A 20 20, 0, 0, 1,",d=20,m=20,"TB"===dr?(o.x<n.x&&(s=e.type===w.MERGE&&t.id!==e.parents[0]?`M ${o.x} ${o.y} L ${o.x} ${n.y-d} ${c} ${o.x+m} ${n.y} L ${n.x} `+n.y:`M ${o.x} ${o.y} L ${n.x-d} ${o.y} ${h} ${n.x} ${o.y+m} L ${n.x} `+n.y),o.x>n.x&&(c="A 20 20, 0, 0, 0,",h="A 20 20, 0, 0, 1,",d=20,m=20,s=e.type===w.MERGE&&t.id!==e.parents[0]?`M ${o.x} ${o.y} L ${o.x} ${n.y-d} ${h} ${o.x-m} ${n.y} L ${n.x} `+n.y:`M ${o.x} ${o.y} L ${n.x+d} ${o.y} ${c} ${n.x} ${o.y+m} L ${n.x} `+n.y),o.x===n.x&&(s=`M ${o.x} ${o.y} L ${n.x} `+n.y)):"BT"===dr?(o.x<n.x&&(s=e.type===w.MERGE&&t.id!==e.parents[0]?`M ${o.x} ${o.y} L ${o.x} ${n.y+d} ${h} ${o.x+m} ${n.y} L ${n.x} `+n.y:`M ${o.x} ${o.y} L ${n.x-d} ${o.y} ${c} ${n.x} ${o.y-m} L ${n.x} `+n.y),o.x>n.x&&(c="A 20 20, 0, 0, 0,",h="A 20 20, 0, 0, 1,",d=20,m=20,s=e.type===w.MERGE&&t.id!==e.parents[0]?`M ${o.x} ${o.y} L ${o.x} ${n.y+d} ${c} ${o.x-m} ${n.y} L ${n.x} `+n.y:`M ${o.x} ${o.y} L ${n.x-d} ${o.y} ${c} ${n.x} ${o.y-m} L ${n.x} `+n.y),o.x===n.x&&(s=`M ${o.x} ${o.y} L ${n.x} `+n.y)):(o.y<n.y&&(s=e.type===w.MERGE&&t.id!==e.parents[0]?`M ${o.x} ${o.y} L ${n.x-d} ${o.y} ${h} ${n.x} ${o.y+m} L ${n.x} `+n.y:`M ${o.x} ${o.y} L ${o.x} ${n.y-d} ${c} ${o.x+m} ${n.y} L ${n.x} `+n.y),o.y>n.y&&(s=e.type===w.MERGE&&t.id!==e.parents[0]?`M ${o.x} ${o.y} L ${n.x-d} ${o.y} ${c} ${n.x} ${o.y-m} L ${n.x} `+n.y:`M ${o.x} ${o.y} L ${o.x} ${n.y+d} ${h} ${o.x+m} ${n.y} L ${n.x} `+n.y),o.y===n.y&&(s=`M ${o.x} ${o.y} L ${n.x} `+n.y))),void 0===s)throw new Error("Line definition not found");r.append("path").attr("d",s).attr("class","arrow arrow"+$%8)}),"drawArrow"),Pr=a(((r,t)=>{const e=r.append("g").attr("class","commit-arrows");[...t.keys()].forEach((r=>{const a=t.get(r);a.parents&&0<a.parents.length&&a.parents.forEach((r=>{Mr(e,t.get(r),a,t)}))}))}),"drawArrows"),Rr=a(((r,t)=>{const e=r.append("g");t.forEach(((r,t)=>{t%=8;var a=nr.get(r.name)?.pos;if(void 0===a)throw new Error("Position not found for branch "+r.name);var o=((o=e.append("line")).attr("x1",0),o.attr("y1",a),o.attr("x2",hr),o.attr("y2",a),o.attr("class","branch branch"+t),"TB"===dr?(o.attr("y1",30),o.attr("x1",a),o.attr("y2",hr),o.attr("x2",a)):"BT"===dr&&(o.attr("y1",hr),o.attr("x1",a),o.attr("y2",30),o.attr("x2",a)),cr.push(a),r.name),n=(r=$r(o),o=e.insert("rect"),e.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+t));n.node().appendChild(r),r=r.getBBox();o.attr("class","branchLabelBkg label"+t).attr("rx",4).attr("ry",4).attr("x",-r.width-4-(!0===er?.rotateCommitLabel?30:0)).attr("y",-r.height/2+8).attr("width",r.width+18).attr("height",r.height+4),n.attr("transform","translate("+(-r.width-14-(!0===er?.rotateCommitLabel?30:0))+", "+(a-r.height/2-1)+")"),"TB"===dr?(o.attr("x",a-r.width/2-10).attr("y",0),n.attr("transform","translate("+(a-r.width/2-5)+", 0)")):"BT"===dr?(o.attr("x",a-r.width/2-10).attr("y",hr),n.attr("transform","translate("+(a-r.width/2-5)+", "+hr+")")):o.attr("transform","translate(-19, "+(a-r.height/2)+")")}))}),"drawBranches"),Ir=a((function(r,t,e,a,o){return nr.set(r,{pos:t,index:e}),t+(50+(o?40:0)+("TB"===dr||"BT"===dr?a.width/2:0))}),"setBranchPosition"),Ar={draw:a((function(r,t,e,a){if(mr(),c.debug("in gitgraph renderer",r+"\n","id:",t,e),!er)throw new Error("GitGraph config not found");const o=er.rotateCommitLabel??!1;r=a.db,sr=r.getCommits(),e=r.getBranchesAsObjArray(),dr=r.getDirection();const n=x(`[id="${t}"]`);let i=0;e.forEach(((r,t)=>{var e=$r(r.name),a=n.append("g"),s=a.insert("g").attr("class","branchLabel"),c=s.insert("g").attr("class","label branch-label");c.node()?.appendChild(e),e=e.getBBox();i=Ir(r.name,i,t,e,o),c.remove(),s.remove(),a.remove()})),Cr(n,sr,!1),er.showBranches&&Rr(n,e),Pr(n,sr),Cr(n,sr,!0),f.insertTitle(n,"gitTitleText",er.titleTopMargin??0,r.getDiagramTitle()),u(void 0,n,er.diagramPadding,er.useMaxWidth)}),"draw")},Gr=a((r=>`\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n ${[0,1,2,3,4,5,6,7].map((t=>`\n .branch-label${t} { fill: ${r["gitBranchLabel"+t]}; }\n .commit${t} { stroke: ${r["git"+t]}; fill: ${r["git"+t]}; }\n .commit-highlight${t} { stroke: ${r["gitInv"+t]}; fill: ${r["gitInv"+t]}; }\n .label${t} { fill: ${r["git"+t]}; }\n .arrow${t} { stroke: ${r["git"+t]}; }\n `)).join("\n")}\n\n .branch {\n stroke-width: 1;\n stroke: ${r.lineColor};\n stroke-dasharray: 2;\n }\n .commit-label { font-size: ${r.commitLabelFontSize}; fill: ${r.commitLabelColor};}\n .commit-label-bkg { font-size: ${r.commitLabelFontSize}; fill: ${r.commitLabelBackground}; opacity: 0.5; }\n .tag-label { font-size: ${r.tagLabelFontSize}; fill: ${r.tagLabelColor};}\n .tag-label-bkg { fill: ${r.tagLabelBackground}; stroke: ${r.tagLabelBorder}; }\n .tag-hole { fill: ${r.textColor}; }\n\n .commit-merge {\n stroke: ${r.primaryColor};\n fill: ${r.primaryColor};\n }\n .commit-reverse {\n stroke: ${r.primaryColor};\n fill: ${r.primaryColor};\n stroke-width: 3;\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${r.primaryColor};\n fill: ${r.primaryColor};\n }\n\n .arrow { stroke-width: 8; stroke-linecap: round; fill: none}\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${r.textColor};\n }\n`),"getStyles"),Or={parser:rr,db:K,renderer:Ar,styles:Gr};export{Or as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aA as e,aB as t,aC as s,aD as i,aE as r}from"./web-4e6d8ea9.js";import{a as n,c as h,k as o,f as d,d as a,i as u,v as _,r as l}from"./_baseUniq-52a47b7b.js";var c=e((function(e){return n(h(e,1,t,!0))})),p="\0",g="\0",f="";class b{constructor(e={}){this._isDirected=!Object.prototype.hasOwnProperty.call(e,"directed")||e.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(e,"multigraph")&&e.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=s(void 0),this._defaultEdgeLabelFn=s(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[g]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return i(e)||(e=s(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return o(this._nodes)}sources(){var e=this;return d(this.nodes(),(function(t){return r(e._in[t])}))}sinks(){var e=this;return d(this.nodes(),(function(t){return r(e._out[t])}))}setNodes(e,t){var s=arguments,i=this;return a(e,(function(e){1<s.length?i.setNode(e,t):i.setNode(e)})),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?1<arguments.length&&(this._nodes[e]=t):(this._nodes[e]=1<arguments.length?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=g,this._children[e]={},this._children[g][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount),this}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){var t;return Object.prototype.hasOwnProperty.call(this._nodes,e)&&(t=e=>this.removeEdge(this._edgeObjs[e]),delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],a(this.children(e),(e=>{this.setParent(e)})),delete this._children[e]),a(o(this._in[e]),t),delete this._in[e],delete this._preds[e],a(o(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount),this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(u(t))t=g;else{for(var s=t+="";!u(s);s=this.parent(s))if(s===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound&&(e=this._parent[e])!==g)return e}children(e){var t;return u(e)&&(e=g),this._isCompound?(t=this._children[e])?o(t):void 0:e===g?this.nodes():this.hasNode(e)?[]:void 0}predecessors(e){if(e=this._preds[e])return o(e)}successors(e){if(e=this._sucs[e])return o(e)}neighbors(e){var t=this.predecessors(e);if(t)return c(t,this.successors(e))}isLeaf(e){return 0===(e=this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound}),s=(t.setGraph(this.graph()),this),i=(a(this._nodes,(function(s,i){e(i)&&t.setNode(i,s)})),a(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,s.edge(e))})),{});return this._isCompound&&a(t.nodes(),(function(e){t.setParent(e,function e(r){var n=s.parent(r);return void 0===n||t.hasNode(n)?i[r]=n:n in i?i[n]:e(n)}(e))})),t}setDefaultEdgeLabel(e){return i(e)||(e=s(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return _(this._edgeObjs)}setPath(e,t){var s=this,i=arguments;return l(e,(function(e,r){return 1<i.length?s.setEdge(e,r,t):s.setEdge(e,r),r})),this}setEdge(){var e,t,s=!1,i=("object"==typeof(i=arguments[0])&&null!==i&&"v"in i?(r=i.v,n=i.w,e=i.name,2===arguments.length&&(t=arguments[1],s=!0)):(r=i,n=arguments[1],e=arguments[3],2<arguments.length&&(t=arguments[2],s=!0)),r=""+r,n=""+n,u(e)||(e=""+e),C(this._isDirected,r,n,e));if(Object.prototype.hasOwnProperty.call(this._edgeLabels,i))s&&(this._edgeLabels[i]=t);else{if(!u(e)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(r),this.setNode(n),this._edgeLabels[i]=s?t:this._defaultEdgeLabelFn(r,n,e);s=function(e,t,s,i){return t=""+t,s=""+s,!e&&s<t&&(e=t,t=s,s=e),e={v:t,w:s},i&&(e.name=i),e}(this._isDirected,r,n,e);var r=s.v,n=s.w;Object.freeze(s),this._edgeObjs[i]=s,v(this._preds[n],r),v(this._sucs[r],n),this._in[n][i]=s,this._out[r][i]=s,this._edgeCount++}return this}edge(e,t,s){return e=1===arguments.length?w(this._isDirected,e):C(this._isDirected,e,t,s),this._edgeLabels[e]}hasEdge(e,t,s){return e=1===arguments.length?w(this._isDirected,e):C(this._isDirected,e,t,s),Object.prototype.hasOwnProperty.call(this._edgeLabels,e)}removeEdge(e,t,s){s=1===arguments.length?w(this._isDirected,arguments[0]):C(this._isDirected,e,t,s);var i=this._edgeObjs[s];return i&&(e=i.v,t=i.w,delete this._edgeLabels[s],delete this._edgeObjs[s],m(this._preds[t],e),m(this._sucs[e],t),delete this._in[t][s],delete this._out[e][s],this._edgeCount--),this}inEdges(e,t){if(e=this._in[e])return e=_(e),t?d(e,(function(e){return e.v===t})):e}outEdges(e,t){if(e=this._out[e])return e=_(e),t?d(e,(function(e){return e.w===t})):e}nodeEdges(e,t){var s=this.inEdges(e,t);if(s)return s.concat(this.outEdges(e,t))}}function v(e,t){e[t]?e[t]++:e[t]=1}function m(e,t){--e[t]||delete e[t]}function C(e,t,s,i){return t=""+t,s=""+s,!e&&s<t&&(e=t,t=s,s=e),t+f+s+f+(u(i)?p:i)}function w(e,t){return C(e,t.v,t.w,t.name)}b.prototype._nodeCount=0,b.prototype._edgeCount=0;export{b as G};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aA as e,aB as t,aC as s,aD as i,aE as r}from"./web-0016ac81.js";import{a as n,c as h,k as o,f as d,d as a,i as u,v as _,r as l}from"./_baseUniq-38ea2195.js";var c=e((function(e){return n(h(e,1,t,!0))})),p="\0",g="\0",f="";class b{constructor(e={}){this._isDirected=!Object.prototype.hasOwnProperty.call(e,"directed")||e.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(e,"multigraph")&&e.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=s(void 0),this._defaultEdgeLabelFn=s(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[g]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return i(e)||(e=s(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return o(this._nodes)}sources(){var e=this;return d(this.nodes(),(function(t){return r(e._in[t])}))}sinks(){var e=this;return d(this.nodes(),(function(t){return r(e._out[t])}))}setNodes(e,t){var s=arguments,i=this;return a(e,(function(e){1<s.length?i.setNode(e,t):i.setNode(e)})),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?1<arguments.length&&(this._nodes[e]=t):(this._nodes[e]=1<arguments.length?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=g,this._children[e]={},this._children[g][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount),this}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){var t;return Object.prototype.hasOwnProperty.call(this._nodes,e)&&(t=e=>this.removeEdge(this._edgeObjs[e]),delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],a(this.children(e),(e=>{this.setParent(e)})),delete this._children[e]),a(o(this._in[e]),t),delete this._in[e],delete this._preds[e],a(o(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount),this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(u(t))t=g;else{for(var s=t+="";!u(s);s=this.parent(s))if(s===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound&&(e=this._parent[e])!==g)return e}children(e){var t;return u(e)&&(e=g),this._isCompound?(t=this._children[e])?o(t):void 0:e===g?this.nodes():this.hasNode(e)?[]:void 0}predecessors(e){if(e=this._preds[e])return o(e)}successors(e){if(e=this._sucs[e])return o(e)}neighbors(e){var t=this.predecessors(e);if(t)return c(t,this.successors(e))}isLeaf(e){return 0===(e=this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound}),s=(t.setGraph(this.graph()),this),i=(a(this._nodes,(function(s,i){e(i)&&t.setNode(i,s)})),a(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,s.edge(e))})),{});return this._isCompound&&a(t.nodes(),(function(e){t.setParent(e,function e(r){var n=s.parent(r);return void 0===n||t.hasNode(n)?i[r]=n:n in i?i[n]:e(n)}(e))})),t}setDefaultEdgeLabel(e){return i(e)||(e=s(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return _(this._edgeObjs)}setPath(e,t){var s=this,i=arguments;return l(e,(function(e,r){return 1<i.length?s.setEdge(e,r,t):s.setEdge(e,r),r})),this}setEdge(){var e,t,s=!1,i=("object"==typeof(i=arguments[0])&&null!==i&&"v"in i?(r=i.v,n=i.w,e=i.name,2===arguments.length&&(t=arguments[1],s=!0)):(r=i,n=arguments[1],e=arguments[3],2<arguments.length&&(t=arguments[2],s=!0)),r=""+r,n=""+n,u(e)||(e=""+e),C(this._isDirected,r,n,e));if(Object.prototype.hasOwnProperty.call(this._edgeLabels,i))s&&(this._edgeLabels[i]=t);else{if(!u(e)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(r),this.setNode(n),this._edgeLabels[i]=s?t:this._defaultEdgeLabelFn(r,n,e);s=function(e,t,s,i){return t=""+t,s=""+s,!e&&s<t&&(e=t,t=s,s=e),e={v:t,w:s},i&&(e.name=i),e}(this._isDirected,r,n,e);var r=s.v,n=s.w;Object.freeze(s),this._edgeObjs[i]=s,v(this._preds[n],r),v(this._sucs[r],n),this._in[n][i]=s,this._out[r][i]=s,this._edgeCount++}return this}edge(e,t,s){return e=1===arguments.length?w(this._isDirected,e):C(this._isDirected,e,t,s),this._edgeLabels[e]}hasEdge(e,t,s){return e=1===arguments.length?w(this._isDirected,e):C(this._isDirected,e,t,s),Object.prototype.hasOwnProperty.call(this._edgeLabels,e)}removeEdge(e,t,s){s=1===arguments.length?w(this._isDirected,arguments[0]):C(this._isDirected,e,t,s);var i=this._edgeObjs[s];return i&&(e=i.v,t=i.w,delete this._edgeLabels[s],delete this._edgeObjs[s],m(this._preds[t],e),m(this._sucs[e],t),delete this._in[t][s],delete this._out[e][s],this._edgeCount--),this}inEdges(e,t){if(e=this._in[e])return e=_(e),t?d(e,(function(e){return e.v===t})):e}outEdges(e,t){if(e=this._out[e])return e=_(e),t?d(e,(function(e){return e.w===t})):e}nodeEdges(e,t){var s=this.inEdges(e,t);if(s)return s.concat(this.outEdges(e,t))}}function v(e,t){e[t]?e[t]++:e[t]=1}function m(e,t){--e[t]||delete e[t]}function C(e,t,s,i){return t=""+t,s=""+s,!e&&s<t&&(e=t,t=s,s=e),t+f+s+f+(u(i)?p:i)}function w(e,t){return C(e,t.v,t.w,t.name)}b.prototype._nodeCount=0,b.prototype._edgeCount=0;export{b as G};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{I as InfoModule,c as createInfoServices}from"./mermaid-parser.core-10bed742.js";import"./web-4e6d8ea9.js";import"./_baseUniq-52a47b7b.js";import"./_basePickBy-1057a1b4.js";import"./clone-6cd174cf.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{I as InfoModule,c as createInfoServices}from"./mermaid-parser.core-0cfa7d2a.js";import"./web-0016ac81.js";import"./_baseUniq-38ea2195.js";import"./_basePickBy-cbf78fb3.js";import"./clone-8494eb3f.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as r,l as e,H as a,k as s,I as t}from"./web-4e6d8ea9.js";import{p as i}from"./mermaid-parser.core-10bed742.js";import"./_baseUniq-52a47b7b.js";import"./_basePickBy-1057a1b4.js";import"./clone-6cd174cf.js";var o={parse:r((async r=>{r=await i("info",r),e.debug(r)}),"parse")},n={version:t.version+""},p={parser:o,db:{getVersion:r((()=>n.version),"getVersion")},renderer:{draw:r(((r,t,i)=>{e.debug("rendering info diagram\n"+r),r=a(t),s(r,100,400,!0),r.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text("v"+i)}),"draw")}};export{p as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as r,l as e,H as a,k as s,I as t}from"./web-0016ac81.js";import{p as i}from"./mermaid-parser.core-0cfa7d2a.js";import"./_baseUniq-38ea2195.js";import"./_basePickBy-cbf78fb3.js";import"./clone-8494eb3f.js";var o={parse:r((async r=>{r=await i("info",r),e.debug(r)}),"parse")},n={version:t.version+""},p={parser:o,db:{getVersion:r((()=>n.version),"getVersion")},renderer:{draw:r(((r,t,i)=>{e.debug("rendering info diagram\n"+r),r=a(t),s(r,100,400,!0),r.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text("v"+i)}),"draw")}};export{p as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,a){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(a).domain(e)}return this}export{e as i};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as t,f as e,g as n,b as i}from"./chunk-TZMSLE5B-6755c559.js";import{g as a}from"./chunk-FMBD7UC4-d75ed695.js";import{_ as r,d as s,n as o,o as l,s as c,g as h,c as u,b as p,t as y,j as d,k as f}from"./web-4e6d8ea9.js";import{d as g}from"./arc-8928af28.js";var m=function(){var t=r((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],a=[1,11],s=[1,12],o=[1,13],l=[1,14];n={trace:r((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:r((function(t,e,n,i,a,r,s){var o=r.length-1;switch(a){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:a,16:s,17:o,18:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:i,14:a,16:s,17:o,18:l},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:r((function(t,e){var n;if(!e.recoverable)throw(n=new Error(t)).hash=e,n;this.trace(t)}),"parseError"),parse:r((function(t){var e,n=this,i=[0],a=[],s=[null],o=[],l=this.table,c="",h=0,u=0,p=o.slice.call(arguments,1),y=Object.create(this.lexer),d={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(d.yy[e]=this.yy[e]);y.setInput(t,d.yy),d.yy.lexer=y,d.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var f=y.yylloc,g=(o.push(f),y.options&&y.options.ranges);function m(){var t=a.pop()||y.lex()||1;return"number"!=typeof t&&(t instanceof Array&&(t=(a=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,r((function(t){i.length=i.length-2*t,s.length=s.length-t,o.length=o.length-t}),"popStack"),r(m,"lex");for(var x,k,_,b,v,w,M={};;){if(k=i[i.length-1],void 0===(_=this.defaultActions[k]||(null==x&&(x=m()),l[k]&&l[k][x]))||!_.length||!_[0]){var T,$=[];for(b in l[k])this.terminals_[b]&&2<b&&$.push("'"+this.terminals_[b]+"'");T=y.showPosition?"Parse error on line "+(h+1)+":\n"+y.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(T,{text:y.match,token:this.terminals_[x]||x,line:y.yylineno,loc:f,expected:$})}if(_[0]instanceof Array&&1<_.length)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(_[0]){case 1:i.push(x),s.push(y.yytext),o.push(y.yylloc),i.push(_[1]),x=null,u=y.yyleng,c=y.yytext,h=y.yylineno,f=y.yylloc;break;case 2:if(v=this.productions_[_[1]][1],M.$=s[s.length-v],M._$={first_line:o[o.length-(v||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(v||1)].first_column,last_column:o[o.length-1].last_column},g&&(M._$.range=[o[o.length-(v||1)].range[0],o[o.length-1].range[1]]),void 0!==(w=this.performAction.apply(M,[c,u,h,d.yy,_[1],s,o].concat(p))))return w;v&&(i=i.slice(0,-1*v*2),s=s.slice(0,-1*v),o=o.slice(0,-1*v)),i.push(this.productions_[_[1]][0]),s.push(M.$),o.push(M._$),w=l[i[i.length-2]][i[i.length-1]],i.push(w);break;case 3:return!0}}return!0}),"parse")},i={EOF:1,parseError:r((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:r((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:r((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:r((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g),i=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,t=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),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===t.length?this.yylloc.first_column:0)+t[t.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:r((function(){return this._more=!0,this}),"more"),reject:r((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:r((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:r((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:r((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:r((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:r((function(t,e){var n,i;if(this.options.backtrack_lexer&&(i={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)&&(i.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],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack)for(var a in i)this[a]=i[a];return!1}),"test_match"),next:r((function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,n,i,a=this._currentRules(),r=0;r<a.length;r++)if((n=this._input.match(this.rules[a[r]]))&&(!e||n[0].length>e[0].length))if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,a[r])))return t;if(!this._backtrack)return!1;e=!1}else if(!this.options.flex)break;return e?!1!==(t=this.test_match(e,a[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:r((function(){return this.next()||this.lex()}),"lex"),begin:r((function(t){this.conditionStack.push(t)}),"begin"),popState:r((function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:r((function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules}),"_currentRules"),topState:r((function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:r((function(t){this.begin(t)}),"pushState"),stateStackSize:r((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:r((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 c(){this.yy={}}return n.lexer=i,r(c,"Parser"),new((c.prototype=n).Parser=c)}(),x=m.parser=m,k="",_=[],b=[],v=[],w=r((function(){_.length=0,b.length=0,k="",v.length=0,y()}),"clear"),M=r((function(t){k=t,_.push(t)}),"addSection"),T=r((function(){return _}),"getSections"),$=r((function(){let t=I(),e=0;for(;!t&&e<100;)t=I(),e++;return b.push(...v),b}),"getTasks"),S=r((function(){const t=[];return b.forEach((e=>{e.people&&t.push(...e.people)})),[...new Set(t)].sort()}),"updateActors"),E=r((function(t,e){let n=0,i=[];e=(1===(e=e.substr(1).split(":")).length?(n=Number(e[0]),[]):(n=Number(e[0]),e[1].split(","))).map((t=>t.trim())),e={section:k,type:k,people:e,task:t,score:n},v.push(e)}),"addTask"),C=r((function(t){t={section:k,type:k,description:t,task:t,classes:[]},b.push(t)}),"addTaskOrg"),I=r((function(){var t,e,n=r((function(t){return v[t].processed}),"compileTask");let i=!0;for([t,e]of v.entries())n(t),i=i&&e.processed;return i}),"compileTasks"),P=r((function(){return S()}),"getActors"),A={getConfig:r((()=>s().journey),"getConfig"),clear:w,setDiagramTitle:o,getDiagramTitle:l,setAccTitle:c,getAccTitle:h,setAccDescription:u,getAccDescription:p,addSection:M,getSections:T,getTasks:$,addTask:E,addTaskOrg:C,getActors:P},j=r((t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${t.textColor}\n }\n\n .legend {\n fill: ${t.textColor};\n font-family: ${t.fontFamily};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${t.textColor}\n }\n\n .face {\n ${t.faceColor?"fill: "+t.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: ${t.mainBkg};\n stroke: ${t.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: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${t.fillType0?"fill: "+t.fillType0:""};\n }\n .task-type-1, .section-type-1 {\n ${t.fillType0?"fill: "+t.fillType1:""};\n }\n .task-type-2, .section-type-2 {\n ${t.fillType0?"fill: "+t.fillType2:""};\n }\n .task-type-3, .section-type-3 {\n ${t.fillType0?"fill: "+t.fillType3:""};\n }\n .task-type-4, .section-type-4 {\n ${t.fillType0?"fill: "+t.fillType4:""};\n }\n .task-type-5, .section-type-5 {\n ${t.fillType0?"fill: "+t.fillType5:""};\n }\n .task-type-6, .section-type-6 {\n ${t.fillType0?"fill: "+t.fillType6:""};\n }\n .task-type-7, .section-type-7 {\n ${t.fillType0?"fill: "+t.fillType7:""};\n }\n\n .actor-0 {\n ${t.actor0?"fill: "+t.actor0:""};\n }\n .actor-1 {\n ${t.actor1?"fill: "+t.actor1:""};\n }\n .actor-2 {\n ${t.actor2?"fill: "+t.actor2:""};\n }\n .actor-3 {\n ${t.actor3?"fill: "+t.actor3:""};\n }\n .actor-4 {\n ${t.actor4?"fill: "+t.actor4:""};\n }\n .actor-5 {\n ${t.actor5?"fill: "+t.actor5:""};\n }\n ${a()}\n`),"getStyles"),F=r((function(e,n){return t(e,n)}),"drawRect"),B=r((function(t,e){var n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible");function i(t){var n=g().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function a(t){var n=g().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function s(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(t=t.append("g")).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"),t.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r(i,"smile"),r(a,"sad"),r(s,"ambivalent"),(3<e.score?i:e.score<3?a:s)(t),n}),"drawFace"),V=r((function(t,e){return(t=t.append("circle")).attr("cx",e.cx),t.attr("cy",e.cy),t.attr("class","actor-"+e.pos),t.attr("fill",e.fill),t.attr("stroke",e.stroke),t.attr("r",e.r),void 0!==t.class&&t.attr("class",t.class),void 0!==e.title&&t.append("title").text(e.title),t}),"drawCircle"),L=r((function(t,n){return e(t,n)}),"drawText"),R=r((function(t,e){function n(t,e,n,i,a){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-a)+" "+(t+n-1.2*a)+","+(e+i)+" "+t+","+(e+i)}r(n,"genPoints");var 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,L(t,e)}),"drawLabel"),O=r((function(t,e,i){t=t.append("g");var a=n();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=i.width*e.taskCount+i.diagramMarginX*(e.taskCount-1),a.height=i.height,a.class="journey-section section-type-"+e.num,a.rx=3,a.ry=3,F(t,a),Y(i)(e.text,t,a.x,a.y,a.width,a.height,{class:"journey-section section-type-"+e.num},i,e.colour)}),"drawSection"),D=-1,N=r((function(t,e,i){var a=e.x+i.width/2;const r=t.append("g");D++,r.append("line").attr("id","task"+D).attr("x1",a).attr("y1",e.y).attr("x2",a).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),B(r,{cx:a,cy:300+30*(5-e.score),score:e.score}),(t=n()).x=e.x,t.y=e.y,t.fill=e.fill,t.width=i.width,t.height=i.height,t.class="task task-type-"+e.num,t.rx=3,t.ry=3,F(r,t);let s=e.x+14;e.people.forEach((t=>{var n=e.actors[t].color;n={cx:s,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};V(r,n),s+=10})),Y(i)(e.task,r,t.x,t.y,t.width,t.height,{class:"task"},i,e.colour)}),"drawTask"),z=r((function(t,e){i(t,e)}),"drawBackgroundRect"),Y=function(){function t(t,e,n,a,r,s,o,l){i(e.append("text").attr("x",n+r/2).attr("y",a+s/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function e(t,e,n,a,r,s,o,l,c){var{taskFontSize:h,taskFontFamily:u}=l,p=t.split(/<br\s*\/?>/gi);for(let t=0;t<p.length;t++){var y=t*h-h*(p.length-1)/2,d=e.append("text").attr("x",n+r/2).attr("y",a).attr("fill",c).style("text-anchor","middle").style("font-size",h).style("font-family",u);d.append("tspan").attr("x",n+r/2).attr("dy",y).text(p[t]),d.attr("y",a+s/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(d,o)}}function n(t,n,a,r,s,o,l,c){var h=(n=n.append("switch")).append("foreignObject").attr("x",a).attr("y",r).attr("width",s).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,n,a,r,s,o,l,c),i(h,l)}function i(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return r(t,"byText"),r(e,"byTspan"),r(n,"byFo"),r(i,"_setTextAttrs"),function(i){return"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}}(),W=r((function(t){t.append("defs").append("marker").attr("id","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"),q={drawRect:F,drawCircle:V,drawSection:O,drawText:L,drawLabel:R,drawTask:N,drawBackgroundRect:z,initGraphics:W},X=r((function(t){Object.keys(t).forEach((function(e){H[e]=t[e]}))}),"setConf"),G={},U=0;function Z(t){const e=s().journey,n=e.maxLabelWidth;U=0;let i=60;Object.keys(G).forEach((a=>{var r=G[a].color;r={cx:20,cy:i,r:7,fill:r,stroke:"#000",pos:G[a].position};q.drawCircle(t,r);let s=t.append("text").attr("visibility","hidden").text(a);r=s.node().getBoundingClientRect().width,s.remove();let o=[];if(r<=n)o=[a];else{r=a.split(" ");let e="";s=t.append("text").attr("visibility","hidden"),r.forEach((t=>{var i=e?e+" "+t:t;if((s.text(i),s.node().getBoundingClientRect().width)>n){if(e&&o.push(e),e=t,s.text(t),s.node().getBoundingClientRect().width>n){let i="";for(const e of t)i+=e,s.text(i+"-"),s.node().getBoundingClientRect().width>n&&(o.push(i.slice(0,-1)+"-"),i=e);e=i}}else e=i})),e&&o.push(e),s.remove()}o.forEach(((n,a)=>{a={x:40,y:i+7+20*a,fill:"#666",text:n,textMargin:e.boxTextMargin??5},n=q.drawText(t,a).node().getBoundingClientRect().width,U<n&&n>e.leftMargin-n&&(U=n)})),i+=Math.max(20,20*o.length)}))}r(Z,"drawActorLegend");var H=s().journey,J=0,K=r((function(t,e,n,i){var a=(c=s()).journey.titleColor,r=c.journey.titleFontSize,o=c.journey.titleFontFamily;let l;"sandbox"===(c=c.securityLevel)&&(l=d("#i"+e));var c=d("sandbox"===c?l.nodes()[0].contentDocument.body:"body"),h=(c=(Q.init(),c.select("#"+e)),e=(q.initGraphics(c),i.db.getTasks()),i.db.getDiagramTitle());i=i.db.getActors();for(const t in G)delete G[t];let u=0;i.forEach((t=>{G[t]={color:H.actorColours[u%H.actorColours.length],position:u},u++})),Z(c),J=H.leftMargin+U,Q.insert(0,0,J,50*Object.keys(G).length),nt(c,e,0),i=Q.getBounds(),h&&c.append("text").text(h).attr("x",J).attr("font-size",r).attr("font-weight","bold").attr("y",25).attr("fill",a).attr("font-family",o),e=i.stopy-i.starty+2*H.diagramMarginY,r=J+i.stopx+2*H.diagramMarginX,f(c,e,r,H.useMaxWidth),c.append("line").attr("x1",J).attr("y1",4*H.height).attr("x2",r-J-4).attr("y2",4*H.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),a=h?70:0,c.attr("viewBox",i.startx+` -25 ${r} `+(e+a)),c.attr("preserveAspectRatio","xMinYMin meet"),c.attr("height",e+a+25)}),"draw"),Q={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:r((function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0}),"init"),updateVal:r((function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])}),"updateVal"),updateBounds:r((function(t,e,n,i){const a=s().journey,o=this;let l=0;function c(s){return r((function(r){l++;var c=o.sequenceItems.length-l+1;o.updateVal(r,"starty",e-c*a.boxMargin,Math.min),o.updateVal(r,"stopy",i+c*a.boxMargin,Math.max),o.updateVal(Q.data,"startx",t-c*a.boxMargin,Math.min),o.updateVal(Q.data,"stopx",n+c*a.boxMargin,Math.max),"activation"!==s&&(o.updateVal(r,"startx",t-c*a.boxMargin,Math.min),o.updateVal(r,"stopx",n+c*a.boxMargin,Math.max),o.updateVal(Q.data,"starty",e-c*a.boxMargin,Math.min),o.updateVal(Q.data,"stopy",i+c*a.boxMargin,Math.max))}),"updateItemBounds")}r(c,"updateFn"),this.sequenceItems.forEach(c())}),"updateBounds"),insert:r((function(t,e,n,i){var a=Math.min(t,n);t=Math.max(t,n),n=Math.min(e,i),e=Math.max(e,i);this.updateVal(Q.data,"startx",a,Math.min),this.updateVal(Q.data,"starty",n,Math.min),this.updateVal(Q.data,"stopx",t,Math.max),this.updateVal(Q.data,"stopy",e,Math.max),this.updateBounds(a,n,t,e)}),"insert"),bumpVerticalPos:r((function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos}),"bumpVerticalPos"),getVerticalPos:r((function(){return this.verticalPos}),"getVerticalPos"),getBounds:r((function(){return this.data}),"getBounds")},tt=H.sectionFills,et=H.sectionColours,nt=r((function(t,e,n){var i=s().journey;let a="";var r,o,l=n+(2*i.height+i.diagramMarginY);let c=0,h="#CCC",u="black",p=0;for([r,o]of e.entries()){if(a!==o.section){h=tt[c%tt.length],p=c%tt.length,u=et[c%et.length];let n=0;var y=o.section;for(let t=r;t<e.length&&e[t].section==y;t++)n+=1;var d={x:r*i.taskMargin+r*i.width+J,y:50,text:o.section,fill:h,num:p,colour:u,taskCount:n};q.drawSection(t,d,i),a=o.section,c++}d=o.people.reduce(((t,e)=>(G[e]&&(t[e]=G[e]),t)),{}),o.x=r*i.taskMargin+r*i.width+J,o.y=l,o.width=i.diagramMarginX,o.height=i.diagramMarginY,o.colour=u,o.fill=h,o.num=p,o.actors=d,q.drawTask(t,o,i),Q.insert(o.x,o.y,o.x+o.width+i.taskMargin,450)}}),"drawTasks"),it={setConf:X,draw:K},at={parser:x,db:A,renderer:it,styles:j,init:r((t=>{it.setConf(t.journey),A.clear()}),"init")};export{at as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as t,f as e,g as n,b as i}from"./chunk-TZMSLE5B-ed6d6d7e.js";import{g as a}from"./chunk-FMBD7UC4-2c653fda.js";import{_ as r,d as s,n as o,o as l,s as c,g as h,c as u,b as p,t as y,j as d,k as f}from"./web-0016ac81.js";import{d as g}from"./arc-6b847bc0.js";var m=function(){var t=r((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],a=[1,11],s=[1,12],o=[1,13],l=[1,14];n={trace:r((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:r((function(t,e,n,i,a,r,s){var o=r.length-1;switch(a){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:a,16:s,17:o,18:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:i,14:a,16:s,17:o,18:l},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:r((function(t,e){var n;if(!e.recoverable)throw(n=new Error(t)).hash=e,n;this.trace(t)}),"parseError"),parse:r((function(t){var e,n=this,i=[0],a=[],s=[null],o=[],l=this.table,c="",h=0,u=0,p=o.slice.call(arguments,1),y=Object.create(this.lexer),d={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(d.yy[e]=this.yy[e]);y.setInput(t,d.yy),d.yy.lexer=y,d.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var f=y.yylloc,g=(o.push(f),y.options&&y.options.ranges);function m(){var t=a.pop()||y.lex()||1;return"number"!=typeof t&&(t instanceof Array&&(t=(a=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,r((function(t){i.length=i.length-2*t,s.length=s.length-t,o.length=o.length-t}),"popStack"),r(m,"lex");for(var x,k,_,b,v,w,M={};;){if(k=i[i.length-1],void 0===(_=this.defaultActions[k]||(null==x&&(x=m()),l[k]&&l[k][x]))||!_.length||!_[0]){var T,$=[];for(b in l[k])this.terminals_[b]&&2<b&&$.push("'"+this.terminals_[b]+"'");T=y.showPosition?"Parse error on line "+(h+1)+":\n"+y.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(T,{text:y.match,token:this.terminals_[x]||x,line:y.yylineno,loc:f,expected:$})}if(_[0]instanceof Array&&1<_.length)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(_[0]){case 1:i.push(x),s.push(y.yytext),o.push(y.yylloc),i.push(_[1]),x=null,u=y.yyleng,c=y.yytext,h=y.yylineno,f=y.yylloc;break;case 2:if(v=this.productions_[_[1]][1],M.$=s[s.length-v],M._$={first_line:o[o.length-(v||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(v||1)].first_column,last_column:o[o.length-1].last_column},g&&(M._$.range=[o[o.length-(v||1)].range[0],o[o.length-1].range[1]]),void 0!==(w=this.performAction.apply(M,[c,u,h,d.yy,_[1],s,o].concat(p))))return w;v&&(i=i.slice(0,-1*v*2),s=s.slice(0,-1*v),o=o.slice(0,-1*v)),i.push(this.productions_[_[1]][0]),s.push(M.$),o.push(M._$),w=l[i[i.length-2]][i[i.length-1]],i.push(w);break;case 3:return!0}}return!0}),"parse")},i={EOF:1,parseError:r((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:r((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:r((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:r((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g),i=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,t=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),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===t.length?this.yylloc.first_column:0)+t[t.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:r((function(){return this._more=!0,this}),"more"),reject:r((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:r((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:r((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:r((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:r((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:r((function(t,e){var n,i;if(this.options.backtrack_lexer&&(i={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)&&(i.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],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack)for(var a in i)this[a]=i[a];return!1}),"test_match"),next:r((function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,n,i,a=this._currentRules(),r=0;r<a.length;r++)if((n=this._input.match(this.rules[a[r]]))&&(!e||n[0].length>e[0].length))if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,a[r])))return t;if(!this._backtrack)return!1;e=!1}else if(!this.options.flex)break;return e?!1!==(t=this.test_match(e,a[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:r((function(){return this.next()||this.lex()}),"lex"),begin:r((function(t){this.conditionStack.push(t)}),"begin"),popState:r((function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:r((function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules}),"_currentRules"),topState:r((function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:r((function(t){this.begin(t)}),"pushState"),stateStackSize:r((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:r((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 c(){this.yy={}}return n.lexer=i,r(c,"Parser"),new((c.prototype=n).Parser=c)}(),x=m.parser=m,k="",_=[],b=[],v=[],w=r((function(){_.length=0,b.length=0,k="",v.length=0,y()}),"clear"),M=r((function(t){k=t,_.push(t)}),"addSection"),T=r((function(){return _}),"getSections"),$=r((function(){let t=I(),e=0;for(;!t&&e<100;)t=I(),e++;return b.push(...v),b}),"getTasks"),S=r((function(){const t=[];return b.forEach((e=>{e.people&&t.push(...e.people)})),[...new Set(t)].sort()}),"updateActors"),E=r((function(t,e){let n=0,i=[];e=(1===(e=e.substr(1).split(":")).length?(n=Number(e[0]),[]):(n=Number(e[0]),e[1].split(","))).map((t=>t.trim())),e={section:k,type:k,people:e,task:t,score:n},v.push(e)}),"addTask"),C=r((function(t){t={section:k,type:k,description:t,task:t,classes:[]},b.push(t)}),"addTaskOrg"),I=r((function(){var t,e,n=r((function(t){return v[t].processed}),"compileTask");let i=!0;for([t,e]of v.entries())n(t),i=i&&e.processed;return i}),"compileTasks"),P=r((function(){return S()}),"getActors"),A={getConfig:r((()=>s().journey),"getConfig"),clear:w,setDiagramTitle:o,getDiagramTitle:l,setAccTitle:c,getAccTitle:h,setAccDescription:u,getAccDescription:p,addSection:M,getSections:T,getTasks:$,addTask:E,addTaskOrg:C,getActors:P},j=r((t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${t.textColor}\n }\n\n .legend {\n fill: ${t.textColor};\n font-family: ${t.fontFamily};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${t.textColor}\n }\n\n .face {\n ${t.faceColor?"fill: "+t.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: ${t.mainBkg};\n stroke: ${t.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: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${t.fillType0?"fill: "+t.fillType0:""};\n }\n .task-type-1, .section-type-1 {\n ${t.fillType0?"fill: "+t.fillType1:""};\n }\n .task-type-2, .section-type-2 {\n ${t.fillType0?"fill: "+t.fillType2:""};\n }\n .task-type-3, .section-type-3 {\n ${t.fillType0?"fill: "+t.fillType3:""};\n }\n .task-type-4, .section-type-4 {\n ${t.fillType0?"fill: "+t.fillType4:""};\n }\n .task-type-5, .section-type-5 {\n ${t.fillType0?"fill: "+t.fillType5:""};\n }\n .task-type-6, .section-type-6 {\n ${t.fillType0?"fill: "+t.fillType6:""};\n }\n .task-type-7, .section-type-7 {\n ${t.fillType0?"fill: "+t.fillType7:""};\n }\n\n .actor-0 {\n ${t.actor0?"fill: "+t.actor0:""};\n }\n .actor-1 {\n ${t.actor1?"fill: "+t.actor1:""};\n }\n .actor-2 {\n ${t.actor2?"fill: "+t.actor2:""};\n }\n .actor-3 {\n ${t.actor3?"fill: "+t.actor3:""};\n }\n .actor-4 {\n ${t.actor4?"fill: "+t.actor4:""};\n }\n .actor-5 {\n ${t.actor5?"fill: "+t.actor5:""};\n }\n ${a()}\n`),"getStyles"),F=r((function(e,n){return t(e,n)}),"drawRect"),B=r((function(t,e){var n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible");function i(t){var n=g().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function a(t){var n=g().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function s(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(t=t.append("g")).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"),t.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r(i,"smile"),r(a,"sad"),r(s,"ambivalent"),(3<e.score?i:e.score<3?a:s)(t),n}),"drawFace"),V=r((function(t,e){return(t=t.append("circle")).attr("cx",e.cx),t.attr("cy",e.cy),t.attr("class","actor-"+e.pos),t.attr("fill",e.fill),t.attr("stroke",e.stroke),t.attr("r",e.r),void 0!==t.class&&t.attr("class",t.class),void 0!==e.title&&t.append("title").text(e.title),t}),"drawCircle"),L=r((function(t,n){return e(t,n)}),"drawText"),R=r((function(t,e){function n(t,e,n,i,a){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-a)+" "+(t+n-1.2*a)+","+(e+i)+" "+t+","+(e+i)}r(n,"genPoints");var 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,L(t,e)}),"drawLabel"),O=r((function(t,e,i){t=t.append("g");var a=n();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=i.width*e.taskCount+i.diagramMarginX*(e.taskCount-1),a.height=i.height,a.class="journey-section section-type-"+e.num,a.rx=3,a.ry=3,F(t,a),Y(i)(e.text,t,a.x,a.y,a.width,a.height,{class:"journey-section section-type-"+e.num},i,e.colour)}),"drawSection"),D=-1,N=r((function(t,e,i){var a=e.x+i.width/2;const r=t.append("g");D++,r.append("line").attr("id","task"+D).attr("x1",a).attr("y1",e.y).attr("x2",a).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),B(r,{cx:a,cy:300+30*(5-e.score),score:e.score}),(t=n()).x=e.x,t.y=e.y,t.fill=e.fill,t.width=i.width,t.height=i.height,t.class="task task-type-"+e.num,t.rx=3,t.ry=3,F(r,t);let s=e.x+14;e.people.forEach((t=>{var n=e.actors[t].color;n={cx:s,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};V(r,n),s+=10})),Y(i)(e.task,r,t.x,t.y,t.width,t.height,{class:"task"},i,e.colour)}),"drawTask"),z=r((function(t,e){i(t,e)}),"drawBackgroundRect"),Y=function(){function t(t,e,n,a,r,s,o,l){i(e.append("text").attr("x",n+r/2).attr("y",a+s/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function e(t,e,n,a,r,s,o,l,c){var{taskFontSize:h,taskFontFamily:u}=l,p=t.split(/<br\s*\/?>/gi);for(let t=0;t<p.length;t++){var y=t*h-h*(p.length-1)/2,d=e.append("text").attr("x",n+r/2).attr("y",a).attr("fill",c).style("text-anchor","middle").style("font-size",h).style("font-family",u);d.append("tspan").attr("x",n+r/2).attr("dy",y).text(p[t]),d.attr("y",a+s/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(d,o)}}function n(t,n,a,r,s,o,l,c){var h=(n=n.append("switch")).append("foreignObject").attr("x",a).attr("y",r).attr("width",s).attr("height",o).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,n,a,r,s,o,l,c),i(h,l)}function i(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return r(t,"byText"),r(e,"byTspan"),r(n,"byFo"),r(i,"_setTextAttrs"),function(i){return"fo"===i.textPlacement?n:"old"===i.textPlacement?t:e}}(),W=r((function(t){t.append("defs").append("marker").attr("id","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"),q={drawRect:F,drawCircle:V,drawSection:O,drawText:L,drawLabel:R,drawTask:N,drawBackgroundRect:z,initGraphics:W},X=r((function(t){Object.keys(t).forEach((function(e){H[e]=t[e]}))}),"setConf"),G={},U=0;function Z(t){const e=s().journey,n=e.maxLabelWidth;U=0;let i=60;Object.keys(G).forEach((a=>{var r=G[a].color;r={cx:20,cy:i,r:7,fill:r,stroke:"#000",pos:G[a].position};q.drawCircle(t,r);let s=t.append("text").attr("visibility","hidden").text(a);r=s.node().getBoundingClientRect().width,s.remove();let o=[];if(r<=n)o=[a];else{r=a.split(" ");let e="";s=t.append("text").attr("visibility","hidden"),r.forEach((t=>{var i=e?e+" "+t:t;if((s.text(i),s.node().getBoundingClientRect().width)>n){if(e&&o.push(e),e=t,s.text(t),s.node().getBoundingClientRect().width>n){let i="";for(const e of t)i+=e,s.text(i+"-"),s.node().getBoundingClientRect().width>n&&(o.push(i.slice(0,-1)+"-"),i=e);e=i}}else e=i})),e&&o.push(e),s.remove()}o.forEach(((n,a)=>{a={x:40,y:i+7+20*a,fill:"#666",text:n,textMargin:e.boxTextMargin??5},n=q.drawText(t,a).node().getBoundingClientRect().width,U<n&&n>e.leftMargin-n&&(U=n)})),i+=Math.max(20,20*o.length)}))}r(Z,"drawActorLegend");var H=s().journey,J=0,K=r((function(t,e,n,i){var a=(c=s()).journey.titleColor,r=c.journey.titleFontSize,o=c.journey.titleFontFamily;let l;"sandbox"===(c=c.securityLevel)&&(l=d("#i"+e));var c=d("sandbox"===c?l.nodes()[0].contentDocument.body:"body"),h=(c=(Q.init(),c.select("#"+e)),e=(q.initGraphics(c),i.db.getTasks()),i.db.getDiagramTitle());i=i.db.getActors();for(const t in G)delete G[t];let u=0;i.forEach((t=>{G[t]={color:H.actorColours[u%H.actorColours.length],position:u},u++})),Z(c),J=H.leftMargin+U,Q.insert(0,0,J,50*Object.keys(G).length),nt(c,e,0),i=Q.getBounds(),h&&c.append("text").text(h).attr("x",J).attr("font-size",r).attr("font-weight","bold").attr("y",25).attr("fill",a).attr("font-family",o),e=i.stopy-i.starty+2*H.diagramMarginY,r=J+i.stopx+2*H.diagramMarginX,f(c,e,r,H.useMaxWidth),c.append("line").attr("x1",J).attr("y1",4*H.height).attr("x2",r-J-4).attr("y2",4*H.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),a=h?70:0,c.attr("viewBox",i.startx+` -25 ${r} `+(e+a)),c.attr("preserveAspectRatio","xMinYMin meet"),c.attr("height",e+a+25)}),"draw"),Q={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:r((function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0}),"init"),updateVal:r((function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])}),"updateVal"),updateBounds:r((function(t,e,n,i){const a=s().journey,o=this;let l=0;function c(s){return r((function(r){l++;var c=o.sequenceItems.length-l+1;o.updateVal(r,"starty",e-c*a.boxMargin,Math.min),o.updateVal(r,"stopy",i+c*a.boxMargin,Math.max),o.updateVal(Q.data,"startx",t-c*a.boxMargin,Math.min),o.updateVal(Q.data,"stopx",n+c*a.boxMargin,Math.max),"activation"!==s&&(o.updateVal(r,"startx",t-c*a.boxMargin,Math.min),o.updateVal(r,"stopx",n+c*a.boxMargin,Math.max),o.updateVal(Q.data,"starty",e-c*a.boxMargin,Math.min),o.updateVal(Q.data,"stopy",i+c*a.boxMargin,Math.max))}),"updateItemBounds")}r(c,"updateFn"),this.sequenceItems.forEach(c())}),"updateBounds"),insert:r((function(t,e,n,i){var a=Math.min(t,n);t=Math.max(t,n),n=Math.min(e,i),e=Math.max(e,i);this.updateVal(Q.data,"startx",a,Math.min),this.updateVal(Q.data,"starty",n,Math.min),this.updateVal(Q.data,"stopx",t,Math.max),this.updateVal(Q.data,"stopy",e,Math.max),this.updateBounds(a,n,t,e)}),"insert"),bumpVerticalPos:r((function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos}),"bumpVerticalPos"),getVerticalPos:r((function(){return this.verticalPos}),"getVerticalPos"),getBounds:r((function(){return this.data}),"getBounds")},tt=H.sectionFills,et=H.sectionColours,nt=r((function(t,e,n){var i=s().journey;let a="";var r,o,l=n+(2*i.height+i.diagramMarginY);let c=0,h="#CCC",u="black",p=0;for([r,o]of e.entries()){if(a!==o.section){h=tt[c%tt.length],p=c%tt.length,u=et[c%et.length];let n=0;var y=o.section;for(let t=r;t<e.length&&e[t].section==y;t++)n+=1;var d={x:r*i.taskMargin+r*i.width+J,y:50,text:o.section,fill:h,num:p,colour:u,taskCount:n};q.drawSection(t,d,i),a=o.section,c++}d=o.people.reduce(((t,e)=>(G[e]&&(t[e]=G[e]),t)),{}),o.x=r*i.taskMargin+r*i.width+J,o.y=l,o.width=i.diagramMarginX,o.height=i.diagramMarginY,o.colour=u,o.fill=h,o.num=p,o.actors=d,q.drawTask(t,o,i),Q.insert(o.x,o.y,o.x+o.width+i.taskMargin,450)}}),"drawTasks"),it={setConf:X,draw:K},at={parser:x,db:A,renderer:it,styles:j,init:r((t=>{it.setConf(t.journey),A.clear()}),"init")};export{at as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t,l as e,d as n,H as i,af as s,ag as r,ah as o,W as a,C as c,i as l,p as h,J as g,X as u,Y as d,$ as p}from"./web-0016ac81.js";import{g as y}from"./chunk-FMBD7UC4-2c653fda.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],c=[1,19],l=[6,7,8],h=[1,26],g=[1,24],u=[1,25],d=[6,7,11],p=[1,31],y=[6,7,11,24],f=[1,6,13,16,17,20,23],m=[1,35],_=[1,36],b=[1,6,7,11,13,16,17,20,23],k=[1,38];n={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:c},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},{6:i,9:22,12:11,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},{6:h,7:g,10:23,11:u},e(d,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:a,23:c}),e(d,[2,19]),e(d,[2,21],{15:30,24:p}),e(d,[2,22]),e(d,[2,23]),e(y,[2,25]),e(y,[2,26]),e(y,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:g,10:34,11:u},{1:[2,7],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},e(f,[2,14],{7:m,11:_}),e(b,[2,8]),e(b,[2,9]),e(b,[2,10]),e(d,[2,16],{15:37,24:p}),e(d,[2,17]),e(d,[2,18]),e(d,[2,20],{24:k}),e(y,[2,31]),{21:[1,39]},{22:[1,40]},e(f,[2,13],{7:m,11:_}),e(b,[2,11]),e(b,[2,12]),e(d,[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){var n;if(!e.recoverable)throw(n=new Error(t)).hash=e,n;this.trace(t)}),"parseError"),parse:t((function(e){var n,i=this,s=[0],r=[],o=[null],a=[],c=this.table,l="",h=0,g=0,u=a.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(n in this.yy)Object.prototype.hasOwnProperty.call(this.yy,n)&&(p.yy[n]=this.yy[n]);d.setInput(e,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc,f=(a.push(y),d.options&&d.options.ranges);function m(){var t=r.pop()||d.lex()||1;return"number"!=typeof t&&(t instanceof Array&&(t=(r=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t((function(t){s.length=s.length-2*t,o.length=o.length-t,a.length=a.length-t}),"popStack"),t(m,"lex");for(var _,b,k,E,S,N,x={};;){if(b=s[s.length-1],void 0===(k=this.defaultActions[b]||(null==_&&(_=m()),c[b]&&c[b][_]))||!k.length||!k[0]){var D,L=[];for(E in c[b])this.terminals_[E]&&2<E&&L.push("'"+this.terminals_[E]+"'");D=d.showPosition?"Parse error on line "+(h+1)+":\n"+d.showPosition()+"\nExpecting "+L.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(D,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:y,expected:L})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+_);switch(k[0]){case 1:s.push(_),o.push(d.yytext),a.push(d.yylloc),s.push(k[1]),_=null,g=d.yyleng,l=d.yytext,h=d.yylineno,y=d.yylloc;break;case 2:if(S=this.productions_[k[1]][1],x.$=o[o.length-S],x._$={first_line:a[a.length-(S||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(S||1)].first_column,last_column:a[a.length-1].last_column},f&&(x._$.range=[a[a.length-(S||1)].range[0],a[a.length-1].range[1]]),void 0!==(N=this.performAction.apply(x,[l,g,h,p.yy,k[1],o,a].concat(u))))return N;S&&(s=s.slice(0,-1*S*2),o=o.slice(0,-1*S),a=a.slice(0,-1*S)),s.push(this.productions_[k[1]][0]),o.push(x.$),a.push(x._$),N=c[s[s.length-2]][s[s.length-1]],s.push(N);break;case 3:return!0}}return!0}),"parse")},l={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),i=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,t=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),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===t.length?this.yylloc.first_column:0)+t[t.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[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(20<t.length?"...":"")+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)+(20<t.length?"...":"")).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;if(this.options.backtrack_lexer&&(i={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)&&(i.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],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack)for(var s in i)this[s]=i[s];return!1}),"test_match"),next:t((function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,n,i,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)return!1;e=!1}else 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(){return this.next()||this.lex()}),"lex"),begin:t((function(t){this.conditionStack.push(t)}),"begin"),popState:t((function(){return 0<this.conditionStack.length-1?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]]:this.conditions.INITIAL).rules}),"_currentRules"),topState:t((function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||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:return e.yytext=e.yytext.replace(/\n\s*/g,"<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 E(){this.yy={}}return n.lexer=l,t(E,"Parser"),new((E.prototype=n).Parser=E)}(),m=f.parser=f,_=[],b=[],k=0,E={},S=t((()=>{_=[],b=[],k=0,E={}}),"clear"),N=t((t=>{if(0===_.length)return null;var e=_[0].level;let n=null;for(let t=_.length-1;0<=t;t--)if(_[t].level===e&&(n=n||_[t]),_[t].level<e)throw new Error('Items without section detected, found section ("'+_[t].label+'")');return t===n?.level?null:n}),"getSection"),x=t((function(){return b}),"getSections"),D=t((function(){var t=[],e=x(),i=n();for(const n of e){var s={id:n.id,label:l(n.label??"",i),isGroup:!0,ticket:n.ticket,shape:"kanbanSection",level:n.level,look:i.look};s=(t.push(s),_.filter((t=>t.parentId===n.id)));for(const e of s){var r={id:e.id,parentId:n.id,label:l(e.label??"",i),isGroup:!1,ticket:e?.ticket,priority:e?.priority,assigned:e?.assigned,icon:e?.icon,shape:"kanbanItem",level:e.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(r)}}return{nodes:t,edges:[],other:{},config:n()}}),"getData"),L=t(((t,e,i,s,r)=>{var o=n();let a=o.mindmap?.padding??c.mindmap.padding;switch(s){case v.ROUNDED_RECT:case v.RECT:case v.HEXAGON:a*=2}if(s={id:l(e,o)||"kbn"+k++,level:t,label:l(i,o),width:o.mindmap?.maxNodeWidth??c.mindmap.maxNodeWidth,padding:a,isGroup:!1},void 0!==r){let t;if(t=r.includes("\n")?r+"\n":"{\n"+r+"\n}",(e=h(t,{schema:g})).shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);e?.shape&&"kanbanItem"===e.shape&&(s.shape=e?.shape),e?.label&&(s.label=e?.label),e?.icon&&(s.icon=e?.icon.toString()),e?.assigned&&(s.assigned=e?.assigned.toString()),e?.ticket&&(s.ticket=e?.ticket.toString()),e?.priority&&(s.priority=e?.priority)}(i=N(t))?s.parentId=i.id||"kbn"+k++:b.push(s),_.push(s)}),"addNode"),v={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},I=t(((t,n)=>{switch(e.debug("In get type",t,n),t){case"[":return v.RECT;case"(":return")"===n?v.ROUNDED_RECT:v.CLOUD;case"((":return v.CIRCLE;case")":return v.CLOUD;case"))":return v.BANG;case"{{":return v.HEXAGON;default:return v.DEFAULT}}),"getType"),C=t(((t,e)=>{E[t]=e}),"setElementForId"),O=t((t=>{var e,i;t&&(e=n(),i=_[_.length-1],t.icon&&(i.icon=l(t.icon,e)),t.class)&&(i.cssClasses=l(t.class,e))}),"decorateNode"),w=t((t=>{switch(t){case v.DEFAULT:return"no-border";case v.RECT:return"rect";case v.ROUNDED_RECT:return"rounded-rect";case v.CIRCLE:return"circle";case v.CLOUD:return"cloud";case v.BANG:return"bang";case v.HEXAGON:return"hexgon";default:return"no-border"}}),"type2Str"),A=t((()=>e),"getLogger"),$=t((t=>E[t]),"getElementById"),T={clear:S,addNode:L,getSections:x,getData:D,nodeType:v,getType:I,setElementForId:C,decorateNode:O,type2Str:w,getLogger:A,getElementById:$},R={draw:t((async(t,l,h,g)=>{e.debug("Rendering kanban diagram\n"+t);var u=g.db.getData(),d=n(),p=(t=(d.htmlLabels=!1,i(l))).append("g"),y=(p.attr("class","sections"),t.append("g"));y.attr("class","items"),g=u.nodes.filter((t=>t.isGroup));let f=0;var m=[];let _=25;for(const t of g){var b=d?.kanban?.sectionWidth||200;b=(f+=1,t.x=b*f+10*(f-1)/2,t.width=b,t.y=0,t.height=3*b,t.rx=5,t.ry=5,t.cssClasses=t.cssClasses+" section-"+f,await s(p,t));_=Math.max(_,b?.labelBBox?.height),m.push(b)}let k=0;for(const t of g){var E=m[k],S=(k+=1,d?.kanban?.sectionWidth||200),N=3*-S/2+_;let e=N;for(const n of u.nodes.filter((e=>e.parentId===t.id))){if(n.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");n.x=t.x,n.width=S-15;var x=(await r(y,n,{config:d})).node().getBBox();n.y=e+x.height/2,await o(n),e=n.y+x.height/2+5}E=E.cluster.select("rect"),N=Math.max(e-N+30,50)+(_-25),E.attr("height",N)}a(void 0,t,d.mindmap?.padding??c.kanban.padding,d.mindmap?.useMaxWidth??c.kanban.useMaxWidth)}),"draw")},P=t((e=>{let n="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],u(e["lineColor"+t])?e["lineColor"+t]=d(e["lineColor"+t],20):e["lineColor"+t]=p(e["lineColor"+t],20);var i=t(((t,n)=>(e.darkMode?p:d)(t,n)),"adjuster");for(let t=0;t<e.THEME_COLOR_LIMIT;t++){var 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"),B=t((t=>`\n .edge {\n stroke-width: 3;\n }\n ${P(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"),F={db:T,renderer:R,parser:m,styles:B};export{F as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t,l as e,d as n,H as i,af as s,ag as r,ah as o,W as a,C as c,i as l,p as h,J as g,X as u,Y as d,$ as p}from"./web-4e6d8ea9.js";import{g as y}from"./chunk-FMBD7UC4-d75ed695.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],c=[1,19],l=[6,7,8],h=[1,26],g=[1,24],u=[1,25],d=[6,7,11],p=[1,31],y=[6,7,11,24],f=[1,6,13,16,17,20,23],m=[1,35],_=[1,36],b=[1,6,7,11,13,16,17,20,23],k=[1,38];n={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:c},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},{6:i,9:22,12:11,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},{6:h,7:g,10:23,11:u},e(d,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:a,23:c}),e(d,[2,19]),e(d,[2,21],{15:30,24:p}),e(d,[2,22]),e(d,[2,23]),e(y,[2,25]),e(y,[2,26]),e(y,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:g,10:34,11:u},{1:[2,7],6:i,12:21,13:s,14:14,16:r,17:o,18:17,19:18,20:a,23:c},e(f,[2,14],{7:m,11:_}),e(b,[2,8]),e(b,[2,9]),e(b,[2,10]),e(d,[2,16],{15:37,24:p}),e(d,[2,17]),e(d,[2,18]),e(d,[2,20],{24:k}),e(y,[2,31]),{21:[1,39]},{22:[1,40]},e(f,[2,13],{7:m,11:_}),e(b,[2,11]),e(b,[2,12]),e(d,[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){var n;if(!e.recoverable)throw(n=new Error(t)).hash=e,n;this.trace(t)}),"parseError"),parse:t((function(e){var n,i=this,s=[0],r=[],o=[null],a=[],c=this.table,l="",h=0,g=0,u=a.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(n in this.yy)Object.prototype.hasOwnProperty.call(this.yy,n)&&(p.yy[n]=this.yy[n]);d.setInput(e,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc,f=(a.push(y),d.options&&d.options.ranges);function m(){var t=r.pop()||d.lex()||1;return"number"!=typeof t&&(t instanceof Array&&(t=(r=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t((function(t){s.length=s.length-2*t,o.length=o.length-t,a.length=a.length-t}),"popStack"),t(m,"lex");for(var _,b,k,E,S,N,x={};;){if(b=s[s.length-1],void 0===(k=this.defaultActions[b]||(null==_&&(_=m()),c[b]&&c[b][_]))||!k.length||!k[0]){var D,L=[];for(E in c[b])this.terminals_[E]&&2<E&&L.push("'"+this.terminals_[E]+"'");D=d.showPosition?"Parse error on line "+(h+1)+":\n"+d.showPosition()+"\nExpecting "+L.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(D,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:y,expected:L})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+_);switch(k[0]){case 1:s.push(_),o.push(d.yytext),a.push(d.yylloc),s.push(k[1]),_=null,g=d.yyleng,l=d.yytext,h=d.yylineno,y=d.yylloc;break;case 2:if(S=this.productions_[k[1]][1],x.$=o[o.length-S],x._$={first_line:a[a.length-(S||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(S||1)].first_column,last_column:a[a.length-1].last_column},f&&(x._$.range=[a[a.length-(S||1)].range[0],a[a.length-1].range[1]]),void 0!==(N=this.performAction.apply(x,[l,g,h,p.yy,k[1],o,a].concat(u))))return N;S&&(s=s.slice(0,-1*S*2),o=o.slice(0,-1*S),a=a.slice(0,-1*S)),s.push(this.productions_[k[1]][0]),o.push(x.$),a.push(x._$),N=c[s[s.length-2]][s[s.length-1]],s.push(N);break;case 3:return!0}}return!0}),"parse")},l={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),i=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,t=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),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===t.length?this.yylloc.first_column:0)+t[t.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[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(20<t.length?"...":"")+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)+(20<t.length?"...":"")).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;if(this.options.backtrack_lexer&&(i={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)&&(i.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],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack)for(var s in i)this[s]=i[s];return!1}),"test_match"),next:t((function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,n,i,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)return!1;e=!1}else 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(){return this.next()||this.lex()}),"lex"),begin:t((function(t){this.conditionStack.push(t)}),"begin"),popState:t((function(){return 0<this.conditionStack.length-1?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]]:this.conditions.INITIAL).rules}),"_currentRules"),topState:t((function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||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:return e.yytext=e.yytext.replace(/\n\s*/g,"<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 E(){this.yy={}}return n.lexer=l,t(E,"Parser"),new((E.prototype=n).Parser=E)}(),m=f.parser=f,_=[],b=[],k=0,E={},S=t((()=>{_=[],b=[],k=0,E={}}),"clear"),N=t((t=>{if(0===_.length)return null;var e=_[0].level;let n=null;for(let t=_.length-1;0<=t;t--)if(_[t].level===e&&(n=n||_[t]),_[t].level<e)throw new Error('Items without section detected, found section ("'+_[t].label+'")');return t===n?.level?null:n}),"getSection"),x=t((function(){return b}),"getSections"),D=t((function(){var t=[],e=x(),i=n();for(const n of e){var s={id:n.id,label:l(n.label??"",i),isGroup:!0,ticket:n.ticket,shape:"kanbanSection",level:n.level,look:i.look};s=(t.push(s),_.filter((t=>t.parentId===n.id)));for(const e of s){var r={id:e.id,parentId:n.id,label:l(e.label??"",i),isGroup:!1,ticket:e?.ticket,priority:e?.priority,assigned:e?.assigned,icon:e?.icon,shape:"kanbanItem",level:e.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(r)}}return{nodes:t,edges:[],other:{},config:n()}}),"getData"),L=t(((t,e,i,s,r)=>{var o=n();let a=o.mindmap?.padding??c.mindmap.padding;switch(s){case v.ROUNDED_RECT:case v.RECT:case v.HEXAGON:a*=2}if(s={id:l(e,o)||"kbn"+k++,level:t,label:l(i,o),width:o.mindmap?.maxNodeWidth??c.mindmap.maxNodeWidth,padding:a,isGroup:!1},void 0!==r){let t;if(t=r.includes("\n")?r+"\n":"{\n"+r+"\n}",(e=h(t,{schema:g})).shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);e?.shape&&"kanbanItem"===e.shape&&(s.shape=e?.shape),e?.label&&(s.label=e?.label),e?.icon&&(s.icon=e?.icon.toString()),e?.assigned&&(s.assigned=e?.assigned.toString()),e?.ticket&&(s.ticket=e?.ticket.toString()),e?.priority&&(s.priority=e?.priority)}(i=N(t))?s.parentId=i.id||"kbn"+k++:b.push(s),_.push(s)}),"addNode"),v={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},I=t(((t,n)=>{switch(e.debug("In get type",t,n),t){case"[":return v.RECT;case"(":return")"===n?v.ROUNDED_RECT:v.CLOUD;case"((":return v.CIRCLE;case")":return v.CLOUD;case"))":return v.BANG;case"{{":return v.HEXAGON;default:return v.DEFAULT}}),"getType"),C=t(((t,e)=>{E[t]=e}),"setElementForId"),O=t((t=>{var e,i;t&&(e=n(),i=_[_.length-1],t.icon&&(i.icon=l(t.icon,e)),t.class)&&(i.cssClasses=l(t.class,e))}),"decorateNode"),w=t((t=>{switch(t){case v.DEFAULT:return"no-border";case v.RECT:return"rect";case v.ROUNDED_RECT:return"rounded-rect";case v.CIRCLE:return"circle";case v.CLOUD:return"cloud";case v.BANG:return"bang";case v.HEXAGON:return"hexgon";default:return"no-border"}}),"type2Str"),A=t((()=>e),"getLogger"),$=t((t=>E[t]),"getElementById"),T={clear:S,addNode:L,getSections:x,getData:D,nodeType:v,getType:I,setElementForId:C,decorateNode:O,type2Str:w,getLogger:A,getElementById:$},R={draw:t((async(t,l,h,g)=>{e.debug("Rendering kanban diagram\n"+t);var u=g.db.getData(),d=n(),p=(t=(d.htmlLabels=!1,i(l))).append("g"),y=(p.attr("class","sections"),t.append("g"));y.attr("class","items"),g=u.nodes.filter((t=>t.isGroup));let f=0;var m=[];let _=25;for(const t of g){var b=d?.kanban?.sectionWidth||200;b=(f+=1,t.x=b*f+10*(f-1)/2,t.width=b,t.y=0,t.height=3*b,t.rx=5,t.ry=5,t.cssClasses=t.cssClasses+" section-"+f,await s(p,t));_=Math.max(_,b?.labelBBox?.height),m.push(b)}let k=0;for(const t of g){var E=m[k],S=(k+=1,d?.kanban?.sectionWidth||200),N=3*-S/2+_;let e=N;for(const n of u.nodes.filter((e=>e.parentId===t.id))){if(n.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");n.x=t.x,n.width=S-15;var x=(await r(y,n,{config:d})).node().getBBox();n.y=e+x.height/2,await o(n),e=n.y+x.height/2+5}E=E.cluster.select("rect"),N=Math.max(e-N+30,50)+(_-25),E.attr("height",N)}a(void 0,t,d.mindmap?.padding??c.kanban.padding,d.mindmap?.useMaxWidth??c.kanban.useMaxWidth)}),"draw")},P=t((e=>{let n="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],u(e["lineColor"+t])?e["lineColor"+t]=d(e["lineColor"+t],20):e["lineColor"+t]=p(e["lineColor"+t],20);var i=t(((t,n)=>(e.darkMode?p:d)(t,n)),"adjuster");for(let t=0;t<e.THEME_COLOR_LIMIT;t++){var 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"),B=t((t=>`\n .edge {\n stroke-width: 3;\n }\n ${P(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"),F={db:T,renderer:R,parser:m,styles:B};export{F as diagram};
|