cmcts-c-agent-embedding 1.1.1-cmcuni → 1.1.3-cmcuni
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/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 +1 -0
- package/dist/components/bubbles/BotBubble.d.ts.map +1 -1
- package/dist/components/buttons/ConsultationButton.d.ts +1 -0
- package/dist/components/buttons/ConsultationButton.d.ts.map +1 -1
- package/dist/components/buttons/PopupToast.d.ts +1 -1
- package/dist/components/buttons/PopupToast.d.ts.map +1 -1
- 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/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/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/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/index.d.ts +69 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/redisAndQueue.d.ts +32 -0
- package/dist/utils/redisAndQueue.d.ts.map +1 -0
- package/dist/utils/transcriptApi.d.ts.map +1 -1
- 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 +2 -2
- package/public/index.html +7 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as t,S as e,a}from"./chunk-DI55MBZ5-95d71f6f.js";import{_ as r,d as i,j as d,l as n,k as s,e as o,R as g,S as p,N as h,u as l}from"./web-0016ac81.js";import{G as c}from"./graph-db4953aa.js";import{l as x}from"./layout-40652dba.js";import"./chunk-55IACEB6-5a7b1be3.js";import"./chunk-QN33PNHL-b00655c9.js";import"./_baseUniq-38ea2195.js";import"./_basePickBy-cbf78fb3.js";var u,f=r((t=>t.append("circle").attr("class","start-state").attr("r",i().state.sizeUnit).attr("cx",i().state.padding+i().state.sizeUnit).attr("cy",i().state.padding+i().state.sizeUnit)),"drawStartState"),y=r((t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",i().state.textHeight).attr("class","divider").attr("x2",2*i().state.textHeight).attr("y1",0).attr("y2",0)),"drawDivider"),w=r(((t,e)=>{var a=(e=t.append("text").attr("x",2*i().state.padding).attr("y",i().state.textHeight+2*i().state.padding).attr("font-size",i().state.fontSize).attr("class","state-title").text(e.id)).node().getBBox();return t.insert("rect",":first-child").attr("x",i().state.padding).attr("y",i().state.padding).attr("width",a.width+2*i().state.padding).attr("height",a.height+2*i().state.padding).attr("rx",i().state.radius),e}),"drawSimpleState"),m=r(((t,e)=>{const a=r((function(t,e,a){t=t.append("tspan").attr("x",2*i().state.padding).text(e),a||t.attr("dy",i().state.textHeight)}),"addTspan");var d=(p=t.append("text").attr("x",2*i().state.padding).attr("y",i().state.textHeight+1.3*i().state.padding).attr("font-size",i().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox()).height;const n=t.append("text").attr("x",i().state.padding).attr("y",d+.4*i().state.padding+i().state.dividerMargin+i().state.textHeight).attr("class","state-description");let s=!0,o=!0;e.descriptions.forEach((function(t){s||(a(n,t,o),o=!1),s=!1}));e=t.append("line").attr("x1",i().state.padding).attr("y1",i().state.padding+d+i().state.dividerMargin/2).attr("y2",i().state.padding+d+i().state.dividerMargin/2).attr("class","descr-divider");var g=n.node().getBBox(),p=Math.max(g.width,p.width);return e.attr("x2",p+3*i().state.padding),t.insert("rect",":first-child").attr("x",i().state.padding).attr("y",i().state.padding).attr("width",p+2*i().state.padding).attr("height",g.height+d+2*i().state.padding).attr("rx",i().state.radius),t}),"drawDescrState"),b=r(((t,e,a)=>{var r=i().state.padding,d=2*i().state.padding,n=(s=t.node().getBBox()).width,s=s.x,o=t.append("text").attr("x",0).attr("y",i().state.titleShift).attr("font-size",i().state.fontSize).attr("class","state-title").text(e.id),g=o.node().getBBox().width+d;let p,h=Math.max(g,n);h===n&&(h+=d);var l=t.node().getBBox();e.doc,p=s-r,n<g&&(p=(n-h)/2+r),Math.abs(s-l.x)<r&&n<g&&(p=s-(g-n)/2),e=1-i().state.textHeight;return t.insert("rect",":first-child").attr("x",p).attr("y",e).attr("class",a?"alt-composit":"composit").attr("width",h).attr("height",l.height+i().state.textHeight+i().state.titleShift+1).attr("rx","0"),o.attr("x",p+r),g<=n&&o.attr("x",s+(h-d)/2-g/2+r),t.insert("rect",":first-child").attr("x",p).attr("y",i().state.titleShift-i().state.textHeight-i().state.padding).attr("width",h).attr("height",3*i().state.textHeight).attr("rx",i().state.radius),t.insert("rect",":first-child").attr("x",p).attr("y",i().state.titleShift-i().state.textHeight-i().state.padding).attr("width",h).attr("height",l.height+3+2*i().state.textHeight).attr("rx",i().state.radius),t}),"addTitleAndBox"),B=r((t=>(t.append("circle").attr("class","end-state-outer").attr("r",i().state.sizeUnit+i().state.miniPadding).attr("cx",i().state.padding+i().state.sizeUnit+i().state.miniPadding).attr("cy",i().state.padding+i().state.sizeUnit+i().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",i().state.sizeUnit).attr("cx",i().state.padding+i().state.sizeUnit+2).attr("cy",i().state.padding+i().state.sizeUnit+2))),"drawEndState"),v=r(((t,e)=>{let a=i().state.forkWidth,r=i().state.forkHeight;return e.parentId&&(e=a,a=r,r=e),t.append("rect").style("stroke","black").style("fill","black").attr("width",a).attr("height",r).attr("x",i().state.padding).attr("y",i().state.padding)}),"drawForkJoinState"),k=r(((t,e,a,r)=>{let d=0;var n=r.append("text");n.style("text-anchor","start"),n.attr("class","noteText");let s=t.replace(/\r\n/g,"<br/>");r=(s=s.replace(/\n/g,"<br/>")).split(o.lineBreakRegex);let g=1.25*i().state.noteMargin;for(const t of r){var p,h=t.trim();0<h.length&&((p=n.append("tspan")).text(h),0===g&&(g+=(h=p.node().getBBox()).height),d+=g,p.attr("x",e+i().state.noteMargin),p.attr("y",a+d+1.25*i().state.noteMargin))}return{textWidth:n.node().getBBox().width,textHeight:d}}),"_drawLongText"),N=r(((t,e)=>{e.attr("class","state-note");var a=e.append("rect").attr("x",0).attr("y",i().state.padding),{textWidth:t,textHeight:e}=(e=e.append("g"),k(t,0,0,e));return a.attr("height",e+2*i().state.noteMargin),a.attr("width",t+2*i().state.noteMargin),a}),"drawNote"),S=r((function(t,e){var a={id:r=e.id,label:e.id,width:0,height:0},r=(t=t.append("g").attr("id",r).attr("class","stateGroup"),"start"===e.type&&f(t),"end"===e.type&&B(t),"fork"!==e.type&&"join"!==e.type||v(t,e),"note"===e.type&&N(e.note.text,t),"divider"===e.type&&y(t),"default"===e.type&&0===e.descriptions.length&&w(t,e),"default"===e.type&&0<e.descriptions.length&&m(t,e),t.node().getBBox());return a.width=r.width+2*i().state.padding,a.height=r.height+2*i().state.padding,a}),"drawState"),E=0,M=r((function(t,a,d){var s=r((function(t){switch(t){case e.relationType.AGGREGATION:return"aggregation";case e.relationType.EXTENSION:return"extension";case e.relationType.COMPOSITION:return"composition";case e.relationType.DEPENDENCY:return"dependency"}}),"getRelationType"),c=(a.points=a.points.filter((t=>!Number.isNaN(t.y))),a.points),x=g().x((function(t){return t.x})).y((function(t){return t.y})).curve(p);x=t.append("path").attr("d",x(c)).attr("id","edge"+E).attr("class","transition");let u="";if(i().state.arrowMarkerAbsolute&&(u=h(!0)),x.attr("marker-end","url("+u+"#"+s(e.relationType.DEPENDENCY)+"End)"),void 0!==d.title){var f=t.append("g").attr("class","stateLabel");const{x:e,y:r}=l.calcLabelPosition(a.points);var y=o.getRows(d.title);let s=0;var w=[];let g=0,p=0;for(let t=0;t<=y.length;t++){var m=f.append("text").attr("text-anchor","middle").text(y[t]).attr("x",e).attr("y",r+s),b=m.node().getBBox();g=Math.max(g,b.width),p=Math.min(p,b.x),n.info(b.x,e,r+s),0===s&&(b=m.node().getBBox(),s=b.height,n.info("Title height",s,r)),w.push(m)}let h=s*y.length;if(1<y.length){const t=(y.length-1)*s*.5;w.forEach(((e,a)=>e.attr("y",r+a*s-t))),h=s*y.length}c=f.node().getBBox(),f.insert("rect",":first-child").attr("class","box").attr("x",e-g/2-i().state.padding/2).attr("y",r-h/2-i().state.padding/2-3.5).attr("width",g+i().state.padding).attr("height",h+i().state.padding),n.info(c)}E++}),"drawEdge"),z={},H=r((function(){}),"setConf"),T=r((function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}),"insertMarkers"),D=r((function(t,e,a,r){let o;u=i().state,"sandbox"===(p=i().securityLevel)&&(o=d("#i"+e));var g=d("sandbox"===p?o.nodes()[0].contentDocument.body:"body"),p="sandbox"===p?o.nodes()[0].contentDocument:document;n.debug("Rendering diagram "+t),t=g.select(`[id='${e}']`),T(t),e=r.db.getRootDoc(),A(e,t,void 0,!1,g,p,r),e=u.padding,p=(g=t.node().getBBox()).width+2*e,r=g.height+2*e;s(t,r,1.75*p,u.useMaxWidth),t.attr("viewBox",`${g.x-u.padding} ${g.y-u.padding} `+p+" "+r)}),"draw"),L=r((t=>t?t.length*u.fontSizeFactor:1),"getLabelWidth"),A=r(((t,e,a,r,i,d,s)=>{const g=new c({compound:!0,multigraph:!0});let p,h=!0;for(p=0;p<t.length;p++)if("relation"===t[p].stmt){h=!1;break}a?g.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:h?1:u.edgeLengthFactor,nodeSep:h?1:50,isMultiGraph:!0}):g.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:h?1:u.edgeLengthFactor,nodeSep:h?1:50,ranker:"tight-tree",isMultiGraph:!0}),g.setDefaultEdgeLabel((function(){return{}}));var l=s.db.getStates(),f=s.db.getRelations();for(const t of Object.keys(l)){var y,w,m=l[t];let n;a&&(m.parentId=a),m.doc?(y=e.append("g").attr("id",m.id).attr("class","stateGroup"),n=A(m.doc,y,m.id,!r,i,d,s),y=(y=b(y,m,r)).node().getBBox(),n.width=y.width,n.height=y.height+u.padding/2,z[m.id]={y:u.compositTitleSize}):n=S(e,m,g),m.note?(y={descriptions:[],id:m.id+"-note",note:m.note,type:"note"},w=S(e,y,g),"left of"===m.note.position?(g.setNode(n.id+"-note",w),g.setNode(n.id,n)):(g.setNode(n.id,n),g.setNode(n.id+"-note",w)),g.setParent(n.id,n.id+"-group"),g.setParent(n.id+"-note",n.id+"-group")):g.setNode(n.id,n)}n.debug("Count=",g.nodeCount(),g);let B=0;f.forEach((function(t){B++,n.debug("Setting edge",t),g.setEdge(t.id1,t.id2,{relation:t,width:L(t.title),height:u.labelHeight*o.getRows(t.title).length,labelpos:"c"},"id"+B)})),x(g),n.debug("Graph after layout",g.nodes());const v=e.node();g.nodes().forEach((function(t){void 0!==t&&void 0!==g.node(t)?(n.warn("Node "+t+": "+JSON.stringify(g.node(t))),i.select("#"+v.id+" #"+t).attr("transform","translate("+(g.node(t).x-g.node(t).width/2)+","+(g.node(t).y+(z[t]?z[t].y:0)-g.node(t).height/2)+" )"),i.select("#"+v.id+" #"+t).attr("data-x-shift",g.node(t).x-g.node(t).width/2),d.querySelectorAll("#"+v.id+" #"+t+" .divider").forEach((t=>{var e=t.parentElement;let a=0,r=0;e&&(e.parentElement&&(a=e.parentElement.getBBox().width),r=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(r))&&(r=0),t.setAttribute("x1",0-r+8),t.setAttribute("x2",a-r-8)}))):n.debug("No Node "+t+": "+JSON.stringify(g.node(t)))})),v.getBBox(),g.edges().forEach((function(t){void 0!==t&&void 0!==g.edge(t)&&(n.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(g.edge(t))),M(e,g.edge(t),g.edge(t).relation))})),f=v.getBBox();var k={id:a||"root",label:a||"root",width:0,height:0};return k.width=f.width+2*u.padding,k.height=f.height+2*u.padding,n.debug("Doc rendered",k,g),k}),"renderDoc"),j={parser:t,get db(){return new e(1)},renderer:{setConf:H,draw:D},styles:a,init:r((t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute}),"init")};export{j as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as t,S as e,a}from"./chunk-DI55MBZ5-5dc4f926.js";import{_ as r,d as i,j as d,l as n,k as s,e as o,R as g,S as p,N as h,u as l}from"./web-4e6d8ea9.js";import{G as c}from"./graph-834f6046.js";import{l as x}from"./layout-54ffc604.js";import"./chunk-55IACEB6-78729976.js";import"./chunk-QN33PNHL-0bf10733.js";import"./_baseUniq-52a47b7b.js";import"./_basePickBy-1057a1b4.js";var u,f=r((t=>t.append("circle").attr("class","start-state").attr("r",i().state.sizeUnit).attr("cx",i().state.padding+i().state.sizeUnit).attr("cy",i().state.padding+i().state.sizeUnit)),"drawStartState"),y=r((t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",i().state.textHeight).attr("class","divider").attr("x2",2*i().state.textHeight).attr("y1",0).attr("y2",0)),"drawDivider"),w=r(((t,e)=>{var a=(e=t.append("text").attr("x",2*i().state.padding).attr("y",i().state.textHeight+2*i().state.padding).attr("font-size",i().state.fontSize).attr("class","state-title").text(e.id)).node().getBBox();return t.insert("rect",":first-child").attr("x",i().state.padding).attr("y",i().state.padding).attr("width",a.width+2*i().state.padding).attr("height",a.height+2*i().state.padding).attr("rx",i().state.radius),e}),"drawSimpleState"),m=r(((t,e)=>{const a=r((function(t,e,a){t=t.append("tspan").attr("x",2*i().state.padding).text(e),a||t.attr("dy",i().state.textHeight)}),"addTspan");var d=(p=t.append("text").attr("x",2*i().state.padding).attr("y",i().state.textHeight+1.3*i().state.padding).attr("font-size",i().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox()).height;const n=t.append("text").attr("x",i().state.padding).attr("y",d+.4*i().state.padding+i().state.dividerMargin+i().state.textHeight).attr("class","state-description");let s=!0,o=!0;e.descriptions.forEach((function(t){s||(a(n,t,o),o=!1),s=!1}));e=t.append("line").attr("x1",i().state.padding).attr("y1",i().state.padding+d+i().state.dividerMargin/2).attr("y2",i().state.padding+d+i().state.dividerMargin/2).attr("class","descr-divider");var g=n.node().getBBox(),p=Math.max(g.width,p.width);return e.attr("x2",p+3*i().state.padding),t.insert("rect",":first-child").attr("x",i().state.padding).attr("y",i().state.padding).attr("width",p+2*i().state.padding).attr("height",g.height+d+2*i().state.padding).attr("rx",i().state.radius),t}),"drawDescrState"),b=r(((t,e,a)=>{var r=i().state.padding,d=2*i().state.padding,n=(s=t.node().getBBox()).width,s=s.x,o=t.append("text").attr("x",0).attr("y",i().state.titleShift).attr("font-size",i().state.fontSize).attr("class","state-title").text(e.id),g=o.node().getBBox().width+d;let p,h=Math.max(g,n);h===n&&(h+=d);var l=t.node().getBBox();e.doc,p=s-r,n<g&&(p=(n-h)/2+r),Math.abs(s-l.x)<r&&n<g&&(p=s-(g-n)/2),e=1-i().state.textHeight;return t.insert("rect",":first-child").attr("x",p).attr("y",e).attr("class",a?"alt-composit":"composit").attr("width",h).attr("height",l.height+i().state.textHeight+i().state.titleShift+1).attr("rx","0"),o.attr("x",p+r),g<=n&&o.attr("x",s+(h-d)/2-g/2+r),t.insert("rect",":first-child").attr("x",p).attr("y",i().state.titleShift-i().state.textHeight-i().state.padding).attr("width",h).attr("height",3*i().state.textHeight).attr("rx",i().state.radius),t.insert("rect",":first-child").attr("x",p).attr("y",i().state.titleShift-i().state.textHeight-i().state.padding).attr("width",h).attr("height",l.height+3+2*i().state.textHeight).attr("rx",i().state.radius),t}),"addTitleAndBox"),B=r((t=>(t.append("circle").attr("class","end-state-outer").attr("r",i().state.sizeUnit+i().state.miniPadding).attr("cx",i().state.padding+i().state.sizeUnit+i().state.miniPadding).attr("cy",i().state.padding+i().state.sizeUnit+i().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",i().state.sizeUnit).attr("cx",i().state.padding+i().state.sizeUnit+2).attr("cy",i().state.padding+i().state.sizeUnit+2))),"drawEndState"),v=r(((t,e)=>{let a=i().state.forkWidth,r=i().state.forkHeight;return e.parentId&&(e=a,a=r,r=e),t.append("rect").style("stroke","black").style("fill","black").attr("width",a).attr("height",r).attr("x",i().state.padding).attr("y",i().state.padding)}),"drawForkJoinState"),k=r(((t,e,a,r)=>{let d=0;var n=r.append("text");n.style("text-anchor","start"),n.attr("class","noteText");let s=t.replace(/\r\n/g,"<br/>");r=(s=s.replace(/\n/g,"<br/>")).split(o.lineBreakRegex);let g=1.25*i().state.noteMargin;for(const t of r){var p,h=t.trim();0<h.length&&((p=n.append("tspan")).text(h),0===g&&(g+=(h=p.node().getBBox()).height),d+=g,p.attr("x",e+i().state.noteMargin),p.attr("y",a+d+1.25*i().state.noteMargin))}return{textWidth:n.node().getBBox().width,textHeight:d}}),"_drawLongText"),N=r(((t,e)=>{e.attr("class","state-note");var a=e.append("rect").attr("x",0).attr("y",i().state.padding),{textWidth:t,textHeight:e}=(e=e.append("g"),k(t,0,0,e));return a.attr("height",e+2*i().state.noteMargin),a.attr("width",t+2*i().state.noteMargin),a}),"drawNote"),S=r((function(t,e){var a={id:r=e.id,label:e.id,width:0,height:0},r=(t=t.append("g").attr("id",r).attr("class","stateGroup"),"start"===e.type&&f(t),"end"===e.type&&B(t),"fork"!==e.type&&"join"!==e.type||v(t,e),"note"===e.type&&N(e.note.text,t),"divider"===e.type&&y(t),"default"===e.type&&0===e.descriptions.length&&w(t,e),"default"===e.type&&0<e.descriptions.length&&m(t,e),t.node().getBBox());return a.width=r.width+2*i().state.padding,a.height=r.height+2*i().state.padding,a}),"drawState"),E=0,M=r((function(t,a,d){var s=r((function(t){switch(t){case e.relationType.AGGREGATION:return"aggregation";case e.relationType.EXTENSION:return"extension";case e.relationType.COMPOSITION:return"composition";case e.relationType.DEPENDENCY:return"dependency"}}),"getRelationType"),c=(a.points=a.points.filter((t=>!Number.isNaN(t.y))),a.points),x=g().x((function(t){return t.x})).y((function(t){return t.y})).curve(p);x=t.append("path").attr("d",x(c)).attr("id","edge"+E).attr("class","transition");let u="";if(i().state.arrowMarkerAbsolute&&(u=h(!0)),x.attr("marker-end","url("+u+"#"+s(e.relationType.DEPENDENCY)+"End)"),void 0!==d.title){var f=t.append("g").attr("class","stateLabel");const{x:e,y:r}=l.calcLabelPosition(a.points);var y=o.getRows(d.title);let s=0;var w=[];let g=0,p=0;for(let t=0;t<=y.length;t++){var m=f.append("text").attr("text-anchor","middle").text(y[t]).attr("x",e).attr("y",r+s),b=m.node().getBBox();g=Math.max(g,b.width),p=Math.min(p,b.x),n.info(b.x,e,r+s),0===s&&(b=m.node().getBBox(),s=b.height,n.info("Title height",s,r)),w.push(m)}let h=s*y.length;if(1<y.length){const t=(y.length-1)*s*.5;w.forEach(((e,a)=>e.attr("y",r+a*s-t))),h=s*y.length}c=f.node().getBBox(),f.insert("rect",":first-child").attr("class","box").attr("x",e-g/2-i().state.padding/2).attr("y",r-h/2-i().state.padding/2-3.5).attr("width",g+i().state.padding).attr("height",h+i().state.padding),n.info(c)}E++}),"drawEdge"),z={},H=r((function(){}),"setConf"),T=r((function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}),"insertMarkers"),D=r((function(t,e,a,r){let o;u=i().state,"sandbox"===(p=i().securityLevel)&&(o=d("#i"+e));var g=d("sandbox"===p?o.nodes()[0].contentDocument.body:"body"),p="sandbox"===p?o.nodes()[0].contentDocument:document;n.debug("Rendering diagram "+t),t=g.select(`[id='${e}']`),T(t),e=r.db.getRootDoc(),A(e,t,void 0,!1,g,p,r),e=u.padding,p=(g=t.node().getBBox()).width+2*e,r=g.height+2*e;s(t,r,1.75*p,u.useMaxWidth),t.attr("viewBox",`${g.x-u.padding} ${g.y-u.padding} `+p+" "+r)}),"draw"),L=r((t=>t?t.length*u.fontSizeFactor:1),"getLabelWidth"),A=r(((t,e,a,r,i,d,s)=>{const g=new c({compound:!0,multigraph:!0});let p,h=!0;for(p=0;p<t.length;p++)if("relation"===t[p].stmt){h=!1;break}a?g.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:h?1:u.edgeLengthFactor,nodeSep:h?1:50,isMultiGraph:!0}):g.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:h?1:u.edgeLengthFactor,nodeSep:h?1:50,ranker:"tight-tree",isMultiGraph:!0}),g.setDefaultEdgeLabel((function(){return{}}));var l=s.db.getStates(),f=s.db.getRelations();for(const t of Object.keys(l)){var y,w,m=l[t];let n;a&&(m.parentId=a),m.doc?(y=e.append("g").attr("id",m.id).attr("class","stateGroup"),n=A(m.doc,y,m.id,!r,i,d,s),y=(y=b(y,m,r)).node().getBBox(),n.width=y.width,n.height=y.height+u.padding/2,z[m.id]={y:u.compositTitleSize}):n=S(e,m,g),m.note?(y={descriptions:[],id:m.id+"-note",note:m.note,type:"note"},w=S(e,y,g),"left of"===m.note.position?(g.setNode(n.id+"-note",w),g.setNode(n.id,n)):(g.setNode(n.id,n),g.setNode(n.id+"-note",w)),g.setParent(n.id,n.id+"-group"),g.setParent(n.id+"-note",n.id+"-group")):g.setNode(n.id,n)}n.debug("Count=",g.nodeCount(),g);let B=0;f.forEach((function(t){B++,n.debug("Setting edge",t),g.setEdge(t.id1,t.id2,{relation:t,width:L(t.title),height:u.labelHeight*o.getRows(t.title).length,labelpos:"c"},"id"+B)})),x(g),n.debug("Graph after layout",g.nodes());const v=e.node();g.nodes().forEach((function(t){void 0!==t&&void 0!==g.node(t)?(n.warn("Node "+t+": "+JSON.stringify(g.node(t))),i.select("#"+v.id+" #"+t).attr("transform","translate("+(g.node(t).x-g.node(t).width/2)+","+(g.node(t).y+(z[t]?z[t].y:0)-g.node(t).height/2)+" )"),i.select("#"+v.id+" #"+t).attr("data-x-shift",g.node(t).x-g.node(t).width/2),d.querySelectorAll("#"+v.id+" #"+t+" .divider").forEach((t=>{var e=t.parentElement;let a=0,r=0;e&&(e.parentElement&&(a=e.parentElement.getBBox().width),r=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(r))&&(r=0),t.setAttribute("x1",0-r+8),t.setAttribute("x2",a-r-8)}))):n.debug("No Node "+t+": "+JSON.stringify(g.node(t)))})),v.getBBox(),g.edges().forEach((function(t){void 0!==t&&void 0!==g.edge(t)&&(n.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(g.edge(t))),M(e,g.edge(t),g.edge(t).relation))})),f=v.getBBox();var k={id:a||"root",label:a||"root",width:0,height:0};return k.width=f.width+2*u.padding,k.height=f.height+2*u.padding,n.debug("Doc rendered",k,g),k}),"renderDoc"),j={parser:t,get db(){return new e(1)},renderer:{setConf:H,draw:D},styles:a,init:r((t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute}),"init")};export{j as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as r,S as s,b as t,a as e}from"./chunk-DI55MBZ5-5dc4f926.js";import{_ as a}from"./web-4e6d8ea9.js";import"./chunk-55IACEB6-78729976.js";import"./chunk-QN33PNHL-0bf10733.js";var o={parser:r,get db(){return new s(2)},renderer:t,styles:e,init:a((r=>{r.state||(r.state={}),r.state.arrowMarkerAbsolute=r.arrowMarkerAbsolute}),"init")};export{o as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as r,S as s,b as t,a as e}from"./chunk-DI55MBZ5-95d71f6f.js";import{_ as a}from"./web-0016ac81.js";import"./chunk-55IACEB6-5a7b1be3.js";import"./chunk-QN33PNHL-b00655c9.js";var o={parser:r,get db(){return new s(2)},renderer:t,styles:e,init:a((r=>{r.state||(r.state={}),r.state.arrowMarkerAbsolute=r.arrowMarkerAbsolute}),"init")};export{o as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t,B as e,V as n,t as i,j as r,d as a,l as s,W as o,X as l,Y as c,$ as h}from"./web-4e6d8ea9.js";import{d}from"./arc-8928af28.js";var u=function(){var e=t((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),n=[6,8,10,11,12,14,16,17,20,21],i=[1,9],r=[1,10],a=[1,11],s=[1,12],o=[1,13],l=[1,16],c=[1,17];i={trace:t((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,timeline: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,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",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",20:"period",21:"event"},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,1],[9,1],[18,1],[19,1]],performAction:t((function(t,e,n,i,r,a,s){var o=a.length-1;switch(r){case 1:return a[o-1];case 2:case 6:case 7:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 8:i.getCommonDb().setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),i.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),i.getCommonDb().setAccDescription(this.$);break;case 12:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 15:i.addTask(a[o],0,""),this.$=a[o];break;case 16:i.addEvent(a[o].substr(2)),this.$=a[o]}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:i,12:r,14:a,16:s,17:o,18:14,19:15,20:l,21:c},e(n,[2,7],{1:[2,1]}),e(n,[2,3]),{9:18,11:i,12:r,14:a,16:s,17:o,18:14,19:15,20:l,21:c},e(n,[2,5]),e(n,[2,6]),e(n,[2,8]),{13:[1,19]},{15:[1,20]},e(n,[2,11]),e(n,[2,12]),e(n,[2,13]),e(n,[2,14]),e(n,[2,15]),e(n,[2,16]),e(n,[2,4]),e(n,[2,9]),e(n,[2,10])],defaultActions:{},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,r=[0],a=[],s=[null],o=[],l=this.table,c="",h=0,d=0,u=o.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(n in this.yy)Object.prototype.hasOwnProperty.call(this.yy,n)&&(y.yy[n]=this.yy[n]);p.setInput(e,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var g=p.yylloc,f=(o.push(g),p.options&&p.options.ranges);function m(){var t=a.pop()||p.lex()||1;return"number"!=typeof t&&(t instanceof Array&&(t=(a=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t((function(t){r.length=r.length-2*t,s.length=s.length-t,o.length=o.length-t}),"popStack"),t(m,"lex");for(var x,b,k,_,v,w,S={};;){if(b=r[r.length-1],void 0===(k=this.defaultActions[b]||(null==x&&(x=m()),l[b]&&l[b][x]))||!k.length||!k[0]){var $,E=[];for(_ in l[b])this.terminals_[_]&&2<_&&E.push("'"+this.terminals_[_]+"'");$=p.showPosition?"Parse error on line "+(h+1)+":\n"+p.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError($,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:g,expected:E})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+x);switch(k[0]){case 1:r.push(x),s.push(p.yytext),o.push(p.yylloc),r.push(k[1]),x=null,d=p.yyleng,c=p.yytext,h=p.yylineno,g=p.yylloc;break;case 2:if(v=this.productions_[k[1]][1],S.$=s[s.length-v],S._$={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},f&&(S._$.range=[o[o.length-(v||1)].range[0],o[o.length-1].range[1]]),void 0!==(w=this.performAction.apply(S,[c,d,h,y.yy,k[1],s,o].concat(u))))return w;v&&(r=r.slice(0,-1*v*2),s=s.slice(0,-1*v),o=o.slice(0,-1*v)),r.push(this.productions_[k[1]][0]),s.push(S.$),o.push(S._$),w=l[r[r.length-2]][r[r.length-1]],r.push(w);break;case 3:return!0}}return!0}),"parse")},r={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 r in i)this[r]=i[r];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,r=this._currentRules(),a=0;a<r.length;a++)if((n=this._input.match(this.rules[r[a]]))&&(!e||n[0].length>e[0].length))if(e=n,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[a])))return t;if(!this._backtrack)return!1;e=!1}else if(!this.options.flex)break;return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex: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: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 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}}),"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[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],inclusive:!0}}};function h(){this.yy={}}return i.lexer=r,t(h,"Parser"),new((h.prototype=i).Parser=h)}(),p=u.parser=u,y={},g=(e(y,{addEvent:()=>E,addSection:()=>v,addTask:()=>$,addTaskOrg:()=>T,clear:()=>_,default:()=>M,getCommonDb:()=>k,getSections:()=>w,getTasks:()=>S}),""),f=0,m=[],x=[],b=[],k=t((()=>n),"getCommonDb"),_=t((function(){m.length=0,x.length=0,g="",b.length=0,i()}),"clear"),v=t((function(t){g=t,m.push(t)}),"addSection"),w=t((function(){return m}),"getSections"),S=t((function(){let t=I(),e=0;for(;!t&&e<100;)t=I(),e++;return x.push(...b),x}),"getTasks"),$=t((function(t,e,n){t={id:f++,section:g,type:g,task:t,score:e||0,events:n?[n]:[]},b.push(t)}),"addTask"),E=t((function(t){b.find((t=>t.id===f-1)).events.push(t)}),"addEvent"),T=t((function(t){t={section:g,type:g,description:t,task:t,classes:[]},x.push(t)}),"addTaskOrg"),I=t((function(){var e,n,i=t((function(t){return b[t].processed}),"compileTask");let r=!0;for([e,n]of b.entries())i(e),r=r&&n.processed;return r}),"compileTasks"),M={clear:_,getCommonDb:k,addSection:v,getSections:w,getTasks:S,addTask:$,addTaskOrg:T,addEvent:E},N=t((function(t,e){return(t=t.append("rect")).attr("x",e.x),t.attr("y",e.y),t.attr("fill",e.fill),t.attr("stroke",e.stroke),t.attr("width",e.width),t.attr("height",e.height),t.attr("rx",e.rx),t.attr("ry",e.ry),void 0!==e.class&&t.attr("class",e.class),t}),"drawRect"),A=t((function(e,n){var i=e.append("circle").attr("cx",n.cx).attr("cy",n.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible");function r(t){var e=d().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+n.cx+","+(n.cy+2)+")")}function a(t){var e=d().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",e).attr("transform","translate("+n.cx+","+(n.cy+7)+")")}function s(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",n.cx-5).attr("y1",n.cy+7).attr("x2",n.cx+5).attr("y2",n.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return(e=e.append("g")).append("circle").attr("cx",n.cx-5).attr("cy",n.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),e.append("circle").attr("cx",n.cx+5).attr("cy",n.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),t(r,"smile"),t(a,"sad"),t(s,"ambivalent"),(3<n.score?r:n.score<3?a:s)(e),i}),"drawFace"),C=t((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=t((function(t,e){var n=e.text.replace(/<br\s*\/?>/gi," "),i=((t=t.append("text")).attr("x",e.x),t.attr("y",e.y),t.attr("class","legend"),t.style("text-anchor",e.anchor),void 0!==e.class&&t.attr("class",e.class),t.append("tspan"));return i.attr("x",e.x+2*e.textMargin),i.text(n),t}),"drawText"),P=t((function(e,n){function i(t,e,n,i,r){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-r)+" "+(t+n-1.2*r)+","+(e+i)+" "+t+","+(e+i)}t(i,"genPoints");var r=e.append("polygon");r.attr("points",i(n.x,n.y,50,20,7)),r.attr("class","labelBox"),n.y=n.y+n.labelMargin,n.x=n.x+.5*n.labelMargin,L(e,n)}),"drawLabel"),H=t((function(t,e,n){t=t.append("g");var i=z();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=n.width,i.height=n.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,N(t,i),B(n)(e.text,t,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},n,e.colour)}),"drawSection"),O=-1,j=t((function(t,e,n){var i=e.x+n.width/2;t=t.append("g");(i=(O++,t.append("line").attr("id","task"+O).attr("x1",i).attr("y1",e.y).attr("x2",i).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),A(t,{cx:i,cy:300+30*(5-e.score),score:e.score}),z())).x=e.x,i.y=e.y,i.fill=e.fill,i.width=n.width,i.height=n.height,i.class="task task-type-"+e.num,i.rx=3,i.ry=3,N(t,i),B(n)(e.task,t,i.x,i.y,i.width,i.height,{class:"task"},n,e.colour)}),"drawTask"),R=t((function(t,e){N(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()}),"drawBackgroundRect"),D=t((function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}}),"getTextObj"),z=t((function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}}),"getNoteRect"),B=function(){function e(t,e,n,i,a,s,o,l){r(e.append("text").attr("x",n+a/2).attr("y",i+s/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function n(t,e,n,i,a,s,o,l,c){var{taskFontSize:h,taskFontFamily:d}=l,u=t.split(/<br\s*\/?>/gi);for(let t=0;t<u.length;t++){var p=t*h-h*(u.length-1)/2,y=e.append("text").attr("x",n+a/2).attr("y",i).attr("fill",c).style("text-anchor","middle").style("font-size",h).style("font-family",d);y.append("tspan").attr("x",n+a/2).attr("dy",p).text(u[t]),y.attr("y",i+s/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(y,o)}}function i(t,e,i,a,s,o,l,c){var h=(e=e.append("switch")).append("foreignObject").attr("x",i).attr("y",a).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),n(t,e,i,a,s,o,l,c),r(h,l)}function r(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return t(e,"byText"),t(n,"byTspan"),t(i,"byFo"),t(r,"_setTextAttrs"),function(t){return"fo"===t.textPlacement?i:"old"===t.textPlacement?e:n}}(),F=t((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");function W(t,e){t.each((function(){var t,n=r(this),i=n.text().split(/(\s+|<br>)/).reverse(),a=[],s=n.attr("y"),o=parseFloat(n.attr("dy")),l=n.text(null).append("tspan").attr("x",0).attr("y",s).attr("dy",o+"em");for(let r=0;r<i.length;r++)t=i[i.length-1-r],a.push(t),l.text(a.join(" ").trim()),(l.node().getComputedTextLength()>e||"<br>"===t)&&(a.pop(),l.text(a.join(" ").trim()),a="<br>"===t?[""]:[t],l=n.append("tspan").attr("x",0).attr("y",s).attr("dy","1.1em").text(t))}))}t(W,"wrap");var V=t((function(t,e,n,i){n=n%12-1,t=t.append("g");var r=(e.section=n,t.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+n),t.append("g")),a=(t=t.append("g")).append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(W,e.width).node().getBBox(),s=i.fontSize?.replace?i.fontSize.replace("px",""):i.fontSize;return e.height=a.height+1.1*s*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,t.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),Y(r,e,n,i),e}),"drawNode"),G=t((function(t,e,n){var i=(t=t.append("g")).append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(W,e.width).node().getBBox();n=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return t.remove(),i.height+1.1*n*.5+e.padding}),"getVirtualNodeHeight"),Y=t((function(t,e,n){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${10-e.height} q0,-5 5,-5 h${e.width-10} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)}),"defaultBkg"),q={drawRect:N,drawCircle:C,drawSection:H,drawText:L,drawLabel:P,drawTask:j,drawBackgroundRect:R,getTextObj:D,getNoteRect:z,initGraphics:F,drawNode:V,getVirtualNodeHeight:G},U=t((function(t,e,n,i){const l=a();var c=l.timeline?.leftMargin??50,h=(s.debug("timeline",i.db),l.securityLevel);let d;"sandbox"===h&&(d=r("#i"+e));const u=r("sandbox"===h?d.nodes()[0].contentDocument.body:"body").select("#"+e),p=(u.append("g"),i.db.getTasks());h=i.db.getCommonDb().getDiagramTitle(),s.debug("task",p),q.initGraphics(u),e=i.db.getSections(),s.debug("sections",e);let y=0,g=0;var f,m;let x,b=50+c,k=50,_=(x=50,0),v=!0,w=(e.forEach((function(t){t={number:_,descr:t,section:_,width:150,padding:20,maxHeight:y},t=q.getVirtualNodeHeight(u,t,l),s.debug("sectionHeight before draw",t),y=Math.max(y,t+20)})),0),S=0;for([f,m]of(s.debug("tasks.length",p.length),p.entries())){var $={number:f,descr:m,section:m.section,width:150,padding:20,maxHeight:g};$=q.getVirtualNodeHeight(u,$,l);s.debug("taskHeight before draw",$),g=Math.max(g,$+20),w=Math.max(w,m.events.length);let t=0;for(const e of m.events){var E={descr:e,section:m.section,number:m.section,width:150,padding:20,maxHeight:50};t+=q.getVirtualNodeHeight(u,E,l)}0<m.events.length&&(t+=10*(m.events.length-1)),S=Math.max(S,t)}s.debug("maxSectionHeight before draw",y),s.debug("maxTaskHeight before draw",g),e&&0<e.length?e.forEach((t=>{var e=p.filter((e=>e.section===t)),n={number:_,descr:t,section:_,width:200*Math.max(e.length,1)-50,padding:20,maxHeight:y},i=(s.debug("sectionNode",n),u.append("g"));n=q.drawNode(i,n,_,l);s.debug("sectionNode output",n),i.attr("transform",`translate(${b}, 50)`),k+=y+50,0<e.length&&X(u,e,_,b,k,g,l,w,S,y,!1),b+=200*Math.max(e.length,1),k=50,_++})):(v=!1,X(u,p,_,b,k,g,l,w,S,y,!0)),i=u.node().getBBox(),s.debug("bounds",i),h&&u.append("text").text(h).attr("x",i.width/2-c).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),e=v?y+g+150:g+100,u.append("g").attr("class","lineWrapper").append("line").attr("x1",c).attr("y1",e).attr("x2",i.width+3*c).attr("y2",e).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),o(void 0,u,l.timeline?.padding??50,l.timeline?.useMaxWidth??!1)}),"draw"),X=t((function(t,e,n,i,r,a,o,l,c,h,d){for(const l of e){var u={descr:l.task,section:n,number:n,width:150,padding:20,maxHeight:a},p=(s.debug("taskNode",u),t.append("g").attr("class","taskWrapper"));u=q.drawNode(p,u,n,o).height;s.debug("taskHeight after draw",u),p.attr("transform",`translate(${i}, ${r})`),a=Math.max(a,u),l.events&&(p=t.append("g").attr("class","lineWrapper"),r+=100,Z(t,l.events,n,i,r,o),r-=100,p.append("line").attr("x1",i+95).attr("y1",r+a).attr("x2",i+95).attr("y2",r+a+100+c+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")),i+=200,d&&!o.timeline?.disableMulticolor&&n++}}),"drawTasks"),Z=t((function(t,e,n,i,r,a){let o=0;var l=r;r+=100;for(const l of e){var c={descr:l,section:n,number:n,width:150,padding:20,maxHeight:50},h=(s.debug("eventNode",c),t.append("g").attr("class","eventWrapper"));o+=c=q.drawNode(h,c,n,a).height,h.attr("transform",`translate(${i}, ${r})`),r=r+10+c}return r=l,o}),"drawEvents"),J={setConf:t((()=>{}),"setConf"),draw:U},K=t((t=>{let e="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)t["lineColor"+e]=t["lineColor"+e]||t["cScaleInv"+e],l(t["lineColor"+e])?t["lineColor"+e]=c(t["lineColor"+e],20):t["lineColor"+e]=h(t["lineColor"+e],20);for(let i=0;i<t.THEME_COLOR_LIMIT;i++){var n=""+(17-3*i);e+=`\n .section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} path {\n fill: ${t["cScale"+i]};\n }\n .section-${i-1} text {\n fill: ${t["cScaleLabel"+i]};\n }\n .node-icon-${i-1} {\n font-size: 40px;\n color: ${t["cScaleLabel"+i]};\n }\n .section-edge-${i-1}{\n stroke: ${t["cScale"+i]};\n }\n .edge-depth-${i-1}{\n stroke-width: ${n};\n }\n .section-${i-1} line {\n stroke: ${t["cScaleInv"+i]} ;\n stroke-width: 3;\n }\n\n .lineWrapper line{\n stroke: ${t["cScaleLabel"+i]} ;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n `}return e}),"genSections"),Q=t((t=>`\n .edge {\n stroke-width: 3;\n }\n ${K(t)}\n .section-root rect, .section-root path, .section-root circle {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .eventWrapper {\n filter: brightness(120%);\n }\n`),"getStyles"),tt={db:y,renderer:J,parser:p,styles:Q};export{tt as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t,B as e,V as n,t as i,j as r,d as a,l as s,W as o,X as l,Y as c,$ as h}from"./web-0016ac81.js";import{d}from"./arc-6b847bc0.js";var u=function(){var e=t((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),n=[6,8,10,11,12,14,16,17,20,21],i=[1,9],r=[1,10],a=[1,11],s=[1,12],o=[1,13],l=[1,16],c=[1,17];i={trace:t((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,timeline: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,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",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",20:"period",21:"event"},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,1],[9,1],[18,1],[19,1]],performAction:t((function(t,e,n,i,r,a,s){var o=a.length-1;switch(r){case 1:return a[o-1];case 2:case 6:case 7:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 8:i.getCommonDb().setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),i.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),i.getCommonDb().setAccDescription(this.$);break;case 12:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 15:i.addTask(a[o],0,""),this.$=a[o];break;case 16:i.addEvent(a[o].substr(2)),this.$=a[o]}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:i,12:r,14:a,16:s,17:o,18:14,19:15,20:l,21:c},e(n,[2,7],{1:[2,1]}),e(n,[2,3]),{9:18,11:i,12:r,14:a,16:s,17:o,18:14,19:15,20:l,21:c},e(n,[2,5]),e(n,[2,6]),e(n,[2,8]),{13:[1,19]},{15:[1,20]},e(n,[2,11]),e(n,[2,12]),e(n,[2,13]),e(n,[2,14]),e(n,[2,15]),e(n,[2,16]),e(n,[2,4]),e(n,[2,9]),e(n,[2,10])],defaultActions:{},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,r=[0],a=[],s=[null],o=[],l=this.table,c="",h=0,d=0,u=o.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(n in this.yy)Object.prototype.hasOwnProperty.call(this.yy,n)&&(y.yy[n]=this.yy[n]);p.setInput(e,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var g=p.yylloc,f=(o.push(g),p.options&&p.options.ranges);function m(){var t=a.pop()||p.lex()||1;return"number"!=typeof t&&(t instanceof Array&&(t=(a=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t((function(t){r.length=r.length-2*t,s.length=s.length-t,o.length=o.length-t}),"popStack"),t(m,"lex");for(var x,b,k,_,v,w,S={};;){if(b=r[r.length-1],void 0===(k=this.defaultActions[b]||(null==x&&(x=m()),l[b]&&l[b][x]))||!k.length||!k[0]){var $,E=[];for(_ in l[b])this.terminals_[_]&&2<_&&E.push("'"+this.terminals_[_]+"'");$=p.showPosition?"Parse error on line "+(h+1)+":\n"+p.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError($,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:g,expected:E})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+x);switch(k[0]){case 1:r.push(x),s.push(p.yytext),o.push(p.yylloc),r.push(k[1]),x=null,d=p.yyleng,c=p.yytext,h=p.yylineno,g=p.yylloc;break;case 2:if(v=this.productions_[k[1]][1],S.$=s[s.length-v],S._$={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},f&&(S._$.range=[o[o.length-(v||1)].range[0],o[o.length-1].range[1]]),void 0!==(w=this.performAction.apply(S,[c,d,h,y.yy,k[1],s,o].concat(u))))return w;v&&(r=r.slice(0,-1*v*2),s=s.slice(0,-1*v),o=o.slice(0,-1*v)),r.push(this.productions_[k[1]][0]),s.push(S.$),o.push(S._$),w=l[r[r.length-2]][r[r.length-1]],r.push(w);break;case 3:return!0}}return!0}),"parse")},r={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 r in i)this[r]=i[r];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,r=this._currentRules(),a=0;a<r.length;a++)if((n=this._input.match(this.rules[r[a]]))&&(!e||n[0].length>e[0].length))if(e=n,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[a])))return t;if(!this._backtrack)return!1;e=!1}else if(!this.options.flex)break;return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex: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: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 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}}),"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[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],inclusive:!0}}};function h(){this.yy={}}return i.lexer=r,t(h,"Parser"),new((h.prototype=i).Parser=h)}(),p=u.parser=u,y={},g=(e(y,{addEvent:()=>E,addSection:()=>v,addTask:()=>$,addTaskOrg:()=>T,clear:()=>_,default:()=>M,getCommonDb:()=>k,getSections:()=>w,getTasks:()=>S}),""),f=0,m=[],x=[],b=[],k=t((()=>n),"getCommonDb"),_=t((function(){m.length=0,x.length=0,g="",b.length=0,i()}),"clear"),v=t((function(t){g=t,m.push(t)}),"addSection"),w=t((function(){return m}),"getSections"),S=t((function(){let t=I(),e=0;for(;!t&&e<100;)t=I(),e++;return x.push(...b),x}),"getTasks"),$=t((function(t,e,n){t={id:f++,section:g,type:g,task:t,score:e||0,events:n?[n]:[]},b.push(t)}),"addTask"),E=t((function(t){b.find((t=>t.id===f-1)).events.push(t)}),"addEvent"),T=t((function(t){t={section:g,type:g,description:t,task:t,classes:[]},x.push(t)}),"addTaskOrg"),I=t((function(){var e,n,i=t((function(t){return b[t].processed}),"compileTask");let r=!0;for([e,n]of b.entries())i(e),r=r&&n.processed;return r}),"compileTasks"),M={clear:_,getCommonDb:k,addSection:v,getSections:w,getTasks:S,addTask:$,addTaskOrg:T,addEvent:E},N=t((function(t,e){return(t=t.append("rect")).attr("x",e.x),t.attr("y",e.y),t.attr("fill",e.fill),t.attr("stroke",e.stroke),t.attr("width",e.width),t.attr("height",e.height),t.attr("rx",e.rx),t.attr("ry",e.ry),void 0!==e.class&&t.attr("class",e.class),t}),"drawRect"),A=t((function(e,n){var i=e.append("circle").attr("cx",n.cx).attr("cy",n.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible");function r(t){var e=d().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+n.cx+","+(n.cy+2)+")")}function a(t){var e=d().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",e).attr("transform","translate("+n.cx+","+(n.cy+7)+")")}function s(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",n.cx-5).attr("y1",n.cy+7).attr("x2",n.cx+5).attr("y2",n.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return(e=e.append("g")).append("circle").attr("cx",n.cx-5).attr("cy",n.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),e.append("circle").attr("cx",n.cx+5).attr("cy",n.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),t(r,"smile"),t(a,"sad"),t(s,"ambivalent"),(3<n.score?r:n.score<3?a:s)(e),i}),"drawFace"),C=t((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=t((function(t,e){var n=e.text.replace(/<br\s*\/?>/gi," "),i=((t=t.append("text")).attr("x",e.x),t.attr("y",e.y),t.attr("class","legend"),t.style("text-anchor",e.anchor),void 0!==e.class&&t.attr("class",e.class),t.append("tspan"));return i.attr("x",e.x+2*e.textMargin),i.text(n),t}),"drawText"),P=t((function(e,n){function i(t,e,n,i,r){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-r)+" "+(t+n-1.2*r)+","+(e+i)+" "+t+","+(e+i)}t(i,"genPoints");var r=e.append("polygon");r.attr("points",i(n.x,n.y,50,20,7)),r.attr("class","labelBox"),n.y=n.y+n.labelMargin,n.x=n.x+.5*n.labelMargin,L(e,n)}),"drawLabel"),H=t((function(t,e,n){t=t.append("g");var i=z();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=n.width,i.height=n.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,N(t,i),B(n)(e.text,t,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},n,e.colour)}),"drawSection"),O=-1,j=t((function(t,e,n){var i=e.x+n.width/2;t=t.append("g");(i=(O++,t.append("line").attr("id","task"+O).attr("x1",i).attr("y1",e.y).attr("x2",i).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),A(t,{cx:i,cy:300+30*(5-e.score),score:e.score}),z())).x=e.x,i.y=e.y,i.fill=e.fill,i.width=n.width,i.height=n.height,i.class="task task-type-"+e.num,i.rx=3,i.ry=3,N(t,i),B(n)(e.task,t,i.x,i.y,i.width,i.height,{class:"task"},n,e.colour)}),"drawTask"),R=t((function(t,e){N(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()}),"drawBackgroundRect"),D=t((function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}}),"getTextObj"),z=t((function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}}),"getNoteRect"),B=function(){function e(t,e,n,i,a,s,o,l){r(e.append("text").attr("x",n+a/2).attr("y",i+s/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function n(t,e,n,i,a,s,o,l,c){var{taskFontSize:h,taskFontFamily:d}=l,u=t.split(/<br\s*\/?>/gi);for(let t=0;t<u.length;t++){var p=t*h-h*(u.length-1)/2,y=e.append("text").attr("x",n+a/2).attr("y",i).attr("fill",c).style("text-anchor","middle").style("font-size",h).style("font-family",d);y.append("tspan").attr("x",n+a/2).attr("dy",p).text(u[t]),y.attr("y",i+s/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(y,o)}}function i(t,e,i,a,s,o,l,c){var h=(e=e.append("switch")).append("foreignObject").attr("x",i).attr("y",a).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),n(t,e,i,a,s,o,l,c),r(h,l)}function r(t,e){for(const n in e)n in e&&t.attr(n,e[n])}return t(e,"byText"),t(n,"byTspan"),t(i,"byFo"),t(r,"_setTextAttrs"),function(t){return"fo"===t.textPlacement?i:"old"===t.textPlacement?e:n}}(),F=t((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");function W(t,e){t.each((function(){var t,n=r(this),i=n.text().split(/(\s+|<br>)/).reverse(),a=[],s=n.attr("y"),o=parseFloat(n.attr("dy")),l=n.text(null).append("tspan").attr("x",0).attr("y",s).attr("dy",o+"em");for(let r=0;r<i.length;r++)t=i[i.length-1-r],a.push(t),l.text(a.join(" ").trim()),(l.node().getComputedTextLength()>e||"<br>"===t)&&(a.pop(),l.text(a.join(" ").trim()),a="<br>"===t?[""]:[t],l=n.append("tspan").attr("x",0).attr("y",s).attr("dy","1.1em").text(t))}))}t(W,"wrap");var V=t((function(t,e,n,i){n=n%12-1,t=t.append("g");var r=(e.section=n,t.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+n),t.append("g")),a=(t=t.append("g")).append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(W,e.width).node().getBBox(),s=i.fontSize?.replace?i.fontSize.replace("px",""):i.fontSize;return e.height=a.height+1.1*s*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,t.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),Y(r,e,n,i),e}),"drawNode"),G=t((function(t,e,n){var i=(t=t.append("g")).append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(W,e.width).node().getBBox();n=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return t.remove(),i.height+1.1*n*.5+e.padding}),"getVirtualNodeHeight"),Y=t((function(t,e,n){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${10-e.height} q0,-5 5,-5 h${e.width-10} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)}),"defaultBkg"),q={drawRect:N,drawCircle:C,drawSection:H,drawText:L,drawLabel:P,drawTask:j,drawBackgroundRect:R,getTextObj:D,getNoteRect:z,initGraphics:F,drawNode:V,getVirtualNodeHeight:G},U=t((function(t,e,n,i){const l=a();var c=l.timeline?.leftMargin??50,h=(s.debug("timeline",i.db),l.securityLevel);let d;"sandbox"===h&&(d=r("#i"+e));const u=r("sandbox"===h?d.nodes()[0].contentDocument.body:"body").select("#"+e),p=(u.append("g"),i.db.getTasks());h=i.db.getCommonDb().getDiagramTitle(),s.debug("task",p),q.initGraphics(u),e=i.db.getSections(),s.debug("sections",e);let y=0,g=0;var f,m;let x,b=50+c,k=50,_=(x=50,0),v=!0,w=(e.forEach((function(t){t={number:_,descr:t,section:_,width:150,padding:20,maxHeight:y},t=q.getVirtualNodeHeight(u,t,l),s.debug("sectionHeight before draw",t),y=Math.max(y,t+20)})),0),S=0;for([f,m]of(s.debug("tasks.length",p.length),p.entries())){var $={number:f,descr:m,section:m.section,width:150,padding:20,maxHeight:g};$=q.getVirtualNodeHeight(u,$,l);s.debug("taskHeight before draw",$),g=Math.max(g,$+20),w=Math.max(w,m.events.length);let t=0;for(const e of m.events){var E={descr:e,section:m.section,number:m.section,width:150,padding:20,maxHeight:50};t+=q.getVirtualNodeHeight(u,E,l)}0<m.events.length&&(t+=10*(m.events.length-1)),S=Math.max(S,t)}s.debug("maxSectionHeight before draw",y),s.debug("maxTaskHeight before draw",g),e&&0<e.length?e.forEach((t=>{var e=p.filter((e=>e.section===t)),n={number:_,descr:t,section:_,width:200*Math.max(e.length,1)-50,padding:20,maxHeight:y},i=(s.debug("sectionNode",n),u.append("g"));n=q.drawNode(i,n,_,l);s.debug("sectionNode output",n),i.attr("transform",`translate(${b}, 50)`),k+=y+50,0<e.length&&X(u,e,_,b,k,g,l,w,S,y,!1),b+=200*Math.max(e.length,1),k=50,_++})):(v=!1,X(u,p,_,b,k,g,l,w,S,y,!0)),i=u.node().getBBox(),s.debug("bounds",i),h&&u.append("text").text(h).attr("x",i.width/2-c).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),e=v?y+g+150:g+100,u.append("g").attr("class","lineWrapper").append("line").attr("x1",c).attr("y1",e).attr("x2",i.width+3*c).attr("y2",e).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),o(void 0,u,l.timeline?.padding??50,l.timeline?.useMaxWidth??!1)}),"draw"),X=t((function(t,e,n,i,r,a,o,l,c,h,d){for(const l of e){var u={descr:l.task,section:n,number:n,width:150,padding:20,maxHeight:a},p=(s.debug("taskNode",u),t.append("g").attr("class","taskWrapper"));u=q.drawNode(p,u,n,o).height;s.debug("taskHeight after draw",u),p.attr("transform",`translate(${i}, ${r})`),a=Math.max(a,u),l.events&&(p=t.append("g").attr("class","lineWrapper"),r+=100,Z(t,l.events,n,i,r,o),r-=100,p.append("line").attr("x1",i+95).attr("y1",r+a).attr("x2",i+95).attr("y2",r+a+100+c+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")),i+=200,d&&!o.timeline?.disableMulticolor&&n++}}),"drawTasks"),Z=t((function(t,e,n,i,r,a){let o=0;var l=r;r+=100;for(const l of e){var c={descr:l,section:n,number:n,width:150,padding:20,maxHeight:50},h=(s.debug("eventNode",c),t.append("g").attr("class","eventWrapper"));o+=c=q.drawNode(h,c,n,a).height,h.attr("transform",`translate(${i}, ${r})`),r=r+10+c}return r=l,o}),"drawEvents"),J={setConf:t((()=>{}),"setConf"),draw:U},K=t((t=>{let e="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)t["lineColor"+e]=t["lineColor"+e]||t["cScaleInv"+e],l(t["lineColor"+e])?t["lineColor"+e]=c(t["lineColor"+e],20):t["lineColor"+e]=h(t["lineColor"+e],20);for(let i=0;i<t.THEME_COLOR_LIMIT;i++){var n=""+(17-3*i);e+=`\n .section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} path {\n fill: ${t["cScale"+i]};\n }\n .section-${i-1} text {\n fill: ${t["cScaleLabel"+i]};\n }\n .node-icon-${i-1} {\n font-size: 40px;\n color: ${t["cScaleLabel"+i]};\n }\n .section-edge-${i-1}{\n stroke: ${t["cScale"+i]};\n }\n .edge-depth-${i-1}{\n stroke-width: ${n};\n }\n .section-${i-1} line {\n stroke: ${t["cScaleInv"+i]} ;\n stroke-width: 3;\n }\n\n .lineWrapper line{\n stroke: ${t["cScaleLabel"+i]} ;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n `}return e}),"genSections"),Q=t((t=>`\n .edge {\n stroke-width: 3;\n }\n ${K(t)}\n .section-root rect, .section-root path, .section-root circle {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .eventWrapper {\n filter: brightness(120%);\n }\n`),"getStyles"),tt={db:y,renderer:J,parser:p,styles:Q};export{tt as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{T as TreemapModule,h as createTreemapServices}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{T as TreemapModule,h as createTreemapServices}from"./mermaid-parser.core-0cfa7d2a.js";import"./web-0016ac81.js";import"./_baseUniq-38ea2195.js";import"./_basePickBy-cbf78fb3.js";import"./clone-8494eb3f.js";
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export declare const isNotEmpty: (value: string | undefined | null) => value is
|
|
|
6
6
|
* Clears authentication data from localStorage
|
|
7
7
|
* Used when 401 errors are detected or user logs out
|
|
8
8
|
*/
|
|
9
|
+
export declare const clearAuthenticationData: () => void;
|
|
9
10
|
export declare const sendRequest: <ResponseData>(params: string | {
|
|
10
11
|
url: string;
|
|
11
12
|
method: string;
|
|
@@ -23,6 +24,74 @@ export declare const getLocalStorageChatflow: (chatflowid: string) => any;
|
|
|
23
24
|
export declare const removeLocalStorageChatHistory: (chatflowid: string) => void;
|
|
24
25
|
export declare const getBubbleButtonSize: (size: 'small' | 'medium' | 'large' | number | undefined) => number;
|
|
25
26
|
export declare const setCookie: (cname: string, cvalue: string, exdays: number) => void;
|
|
27
|
+
/**
|
|
28
|
+
* Type definitions for user info API response
|
|
29
|
+
*/
|
|
30
|
+
export type UserInfoApiResponse = {
|
|
31
|
+
RESULT: {
|
|
32
|
+
CODE: number;
|
|
33
|
+
MSG: string;
|
|
34
|
+
};
|
|
35
|
+
OBJRETURN: {
|
|
36
|
+
data: {
|
|
37
|
+
id: string;
|
|
38
|
+
_id: number;
|
|
39
|
+
loginname: string;
|
|
40
|
+
fullname: string;
|
|
41
|
+
fullnameen: string;
|
|
42
|
+
email: string;
|
|
43
|
+
code: string;
|
|
44
|
+
mobile?: string;
|
|
45
|
+
imageurl?: string;
|
|
46
|
+
roleName: string[];
|
|
47
|
+
techGroup: Array<{
|
|
48
|
+
id: number;
|
|
49
|
+
name: string;
|
|
50
|
+
}>;
|
|
51
|
+
permissions: Record<string, string>;
|
|
52
|
+
[key: string]: any;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Fetches user info from /api/user-info endpoint with cookies
|
|
58
|
+
* @param apiHost - The API host URL
|
|
59
|
+
* @param onRequest - Optional request interceptor
|
|
60
|
+
* @returns Promise with user info data or error
|
|
61
|
+
*/
|
|
62
|
+
export declare const fetchUserInfo: (_apiHost: string, onRequest?: ((request: RequestInit) => Promise<void>) | undefined) => Promise<{
|
|
63
|
+
data?: UserInfoApiResponse;
|
|
64
|
+
error?: Error;
|
|
65
|
+
}>;
|
|
66
|
+
/**
|
|
67
|
+
* Maps API response to dataLogin format expected by the application
|
|
68
|
+
* @param apiResponse - The API response from /api/user-info
|
|
69
|
+
* @returns Mapped dataLogin object
|
|
70
|
+
*/
|
|
71
|
+
export declare const mapApiResponseToDataLogin: (apiResponse: UserInfoApiResponse) => any;
|
|
72
|
+
/**
|
|
73
|
+
* Validates dataLogin from localStorage and maps user data to cmcts:userInfo
|
|
74
|
+
* @returns true if successful mapping occurred, false otherwise
|
|
75
|
+
*/
|
|
76
|
+
export declare const validateAndMapUserInfo: () => boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Checks and initializes authentication for popup embedding
|
|
79
|
+
* If dataLogin doesn't exist, fetches user info from API and creates it
|
|
80
|
+
* @param apiHost - The API host URL
|
|
81
|
+
* @param onRequest - Optional request interceptor
|
|
82
|
+
* @param isFullPage - Whether the chatbot is in full page mode
|
|
83
|
+
* @returns Promise<boolean> - true if authentication is successful, false otherwise
|
|
84
|
+
*/
|
|
85
|
+
export declare const checkAndInitializeAuth: (apiHost?: string, onRequest?: ((request: RequestInit) => Promise<void>) | undefined, isFullPage?: boolean) => Promise<boolean>;
|
|
86
|
+
/**
|
|
87
|
+
* Forces reload of user information from API and remaps to dataLogin
|
|
88
|
+
* Used when popup opens to ensure fresh user data
|
|
89
|
+
* @param apiHost - The API host URL
|
|
90
|
+
* @param onRequest - Optional request interceptor
|
|
91
|
+
* @param isFullPage - Whether the chatbot is in full page mode
|
|
92
|
+
* @returns Promise<boolean> - true if reload and mapping successful, false otherwise
|
|
93
|
+
*/
|
|
94
|
+
export declare const reloadAndMapUserInfo: (apiHost?: string, onRequest?: ((request: RequestInit) => Promise<void>) | undefined, isFullPage?: boolean) => Promise<boolean>;
|
|
26
95
|
export declare const ZALO_LINKS: {
|
|
27
96
|
readonly UNIVERSAL_LINK: "https://zalo.me/3148145427775905051";
|
|
28
97
|
readonly MOBILE_CHAT: "https://chat.zalo.me/?c=464468171261789431";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,+DAAuG,CAAC;AAEjI,eAAO,MAAM,SAAS,6DAAqG,CAAC;AAE5H,eAAO,MAAM,OAAO,UAAW,MAAM,GAAG,SAAS,GAAG,IAAI,uBAA8E,CAAC;AAEvI,eAAO,MAAM,UAAU,UAAW,MAAM,GAAG,SAAS,GAAG,IAAI,oBAA2E,CAAC;AAEvI;;;GAGG;AACH,eAAO,MAAM,WAAW;SAGX,MAAM;YACH,MAAM;;;;;2BAKQ,WAAW,KAAK,QAAQ,IAAI,CAAC;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,+DAAuG,CAAC;AAEjI,eAAO,MAAM,SAAS,6DAAqG,CAAC;AAE5H,eAAO,MAAM,OAAO,UAAW,MAAM,GAAG,SAAS,GAAG,IAAI,uBAA8E,CAAC;AAEvI,eAAO,MAAM,UAAU,UAAW,MAAM,GAAG,SAAS,GAAG,IAAI,oBAA2E,CAAC;AAEvI;;;GAGG;AACH,eAAO,MAAM,uBAAuB,QAAO,IAQ1C,CAAC;AAEF,eAAO,MAAM,WAAW;SAGX,MAAM;YACH,MAAM;;;;;2BAKQ,WAAW,KAAK,QAAQ,IAAI,CAAC;;;;EA6D1D,CAAC;AAEF,eAAO,MAAM,uBAAuB,eAAgB,MAAM,UAAU,MAAM,YAAW,OAAO,MAAM,EAAE,GAAG,CAAC,SAiBvG,CAAC;AAEF,eAAO,MAAM,uBAAuB,eAAgB,MAAM,QAQzD,CAAC;AAEF,eAAO,MAAM,6BAA6B,eAAgB,MAAM,SAyB/D,CAAC;AAEF,eAAO,MAAM,mBAAmB,SAAU,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,WAO1F,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,MAAM,UAAU,MAAM,UAAU,MAAM,SAKtE,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,SAAS,EAAE;QACT,IAAI,EAAE;YACJ,EAAE,EAAE,MAAM,CAAC;YACX,GAAG,EAAE,MAAM,CAAC;YACZ,SAAS,EAAE,MAAM,CAAC;YAClB,QAAQ,EAAE,MAAM,CAAC;YACjB,UAAU,EAAE,MAAM,CAAC;YACnB,KAAK,EAAE,MAAM,CAAC;YACd,IAAI,EAAE,MAAM,CAAC;YACb,MAAM,CAAC,EAAE,MAAM,CAAC;YAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;YAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;YACnB,SAAS,EAAE,KAAK,CAAC;gBACf,EAAE,EAAE,MAAM,CAAC;gBACX,IAAI,EAAE,MAAM,CAAC;aACd,CAAC,CAAC;YACH,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YACpC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;SACpB,CAAC;KACH,CAAC;CACH,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,aAAa,aACd,MAAM,yBACM,WAAW,KAAK,QAAQ,IAAI,CAAC,kBAClD,QAAQ;IAAE,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAuBvD,CAAC;AACF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,gBAAiB,mBAAmB,KAAG,GAmC5E,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,QAAO,OA0FzC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,aACvB,MAAM,yBACM,WAAW,KAAK,QAAQ,IAAI,CAAC,4BACtC,OAAO,KACnB,QAAQ,OAAO,CAoEjB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,aACrB,MAAM,yBACM,WAAW,KAAK,QAAQ,IAAI,CAAC,4BACtC,OAAO,KACnB,QAAQ,OAAO,CA6DjB,CAAC;AAGF,eAAO,MAAM,UAAU;;;;;;CAUb,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,cAAc,QAAO,OAiBjC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,QAAO,IAWzC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,QAAO,IAuBjC,CAAC;AAiFF;;GAEG;AACH,eAAO,MAAM,WAAW,QAAO,MAE9B,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,MAAM,KAAG,MAczC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
interface RedisConfig {
|
|
2
|
+
host: string;
|
|
3
|
+
port: number;
|
|
4
|
+
password?: string;
|
|
5
|
+
url?: string;
|
|
6
|
+
}
|
|
7
|
+
declare class RedisService {
|
|
8
|
+
private client;
|
|
9
|
+
private isConnected;
|
|
10
|
+
private connectionPromise;
|
|
11
|
+
constructor(config: RedisConfig);
|
|
12
|
+
connect(): Promise<void>;
|
|
13
|
+
private _connect;
|
|
14
|
+
disconnect(): Promise<void>;
|
|
15
|
+
set(key: string, value: string, expireSeconds?: number): Promise<string | null>;
|
|
16
|
+
get(key: string): Promise<string | null>;
|
|
17
|
+
del(key: string): Promise<number>;
|
|
18
|
+
exists(key: string): Promise<number>;
|
|
19
|
+
expire(key: string, seconds: number): Promise<boolean>;
|
|
20
|
+
keys(pattern: string): Promise<string[]>;
|
|
21
|
+
private ensureConnection;
|
|
22
|
+
getConnectionStatus(): boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare const REDIS_CONFIG: {
|
|
25
|
+
HOST: string;
|
|
26
|
+
PORT: number;
|
|
27
|
+
PASSWORD: string;
|
|
28
|
+
URL: string;
|
|
29
|
+
};
|
|
30
|
+
export { RedisService };
|
|
31
|
+
export type { RedisConfig };
|
|
32
|
+
//# sourceMappingURL=redisAndQueue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redisAndQueue.d.ts","sourceRoot":"","sources":["../../src/utils/redisAndQueue.ts"],"names":[],"mappings":"AAIA,UAAU,WAAW;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,cAAM,YAAY;IAChB,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,iBAAiB,CAA8B;gBAE3C,MAAM,EAAE,WAAW;IAsCzB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;YAahB,QAAQ;IAYhB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAa3B,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAmB/E,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAUxC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAUjC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAUpC,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAWtD,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;YAUhC,gBAAgB;IAM9B,mBAAmB,IAAI,OAAO;CAG/B;AAGD,eAAO,MAAM,YAAY;;;;;CAKxB,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,YAAY,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transcriptApi.d.ts","sourceRoot":"","sources":["../../src/utils/transcriptApi.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"transcriptApi.d.ts","sourceRoot":"","sources":["../../src/utils/transcriptApi.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,SAAgB,IAAI,0BAA0B,MAAM,KAAG,QAAQ,MAAM,CAoCzG,CAAC"}
|