@bkm016/basalt 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{chunk-x1xss1d7.js → chunk-1vd0f74z.js} +2 -2
- package/{chunk-v9fea96h.js → chunk-2hbfk5xd.js} +2 -2
- package/{chunk-5j1krv9v.js → chunk-2zp1mv3q.js} +1 -1
- package/{chunk-d2j735sd.js → chunk-3ct2tkr8.js} +2 -2
- package/{chunk-c7x1zq39.js → chunk-3x94302m.js} +1 -1
- package/{chunk-gzxnene8.js → chunk-4w17tzp5.js} +2 -2
- package/{chunk-1zdwrgd4.js → chunk-5dfbezv9.js} +1 -1
- package/{chunk-bxn5kmpz.js → chunk-5x1sankd.js} +24 -24
- package/{chunk-pmqtkqsf.js → chunk-71h08f4g.js} +1 -1
- package/{chunk-fm0k0qtz.js → chunk-7afmgncg.js} +2 -2
- package/{chunk-v258nxcz.js → chunk-7nzhdrv9.js} +1 -1
- package/{chunk-zmsgwr3s.js → chunk-7q51n619.js} +1 -1
- package/{chunk-y0m980k3.js → chunk-7tbya5b5.js} +3 -3
- package/{chunk-8tjad3r0.js → chunk-8wc8qdx8.js} +5 -5
- package/{chunk-gp7y0fja.js → chunk-9rmqgc3c.js} +9 -9
- package/{chunk-nbb9trwz.js → chunk-akr0a8nc.js} +2 -2
- package/{chunk-k506w58v.js → chunk-aky4tztg.js} +2 -2
- package/{chunk-8296hw9m.js → chunk-em187cy3.js} +2 -2
- package/{chunk-2esbgxps.js → chunk-ev6yvy5y.js} +5 -5
- package/{chunk-75m78j7x.js → chunk-f3xadvab.js} +2 -2
- package/{chunk-5c9j8qe4.js → chunk-fvn32nzj.js} +26 -26
- package/{chunk-bannb9xm.js → chunk-jk25nt60.js} +1 -1
- package/{chunk-27gntzs5.js → chunk-kp22kaez.js} +1 -1
- package/{chunk-6hssbcgj.js → chunk-nmca5h6m.js} +1 -1
- package/{chunk-d8gtbw9g.js → chunk-pjyn2s97.js} +1 -1
- package/{chunk-rtzqqngy.js → chunk-q7t30zz2.js} +2 -2
- package/{chunk-aefadsy6.js → chunk-r0scgfwx.js} +1 -1
- package/{chunk-hwr56pfj.js → chunk-rmj5b73e.js} +1 -1
- package/{chunk-1qpces5a.js → chunk-vexrrw1b.js} +2 -2
- package/chunk-vkpvcxjr.js +2 -0
- package/{chunk-3cjsd292.js → chunk-whvj83b7.js} +2 -2
- package/{chunk-z55bmysw.js → chunk-xh3vr5vz.js} +1 -1
- package/{chunk-10xzzn07.js → chunk-zggzfa7j.js} +2 -2
- package/compiled.js +3 -3
- package/package.json +1 -1
- package/ui-test-worker.js +13 -13
- package/web/{chunk-7520nrbb.js → chunk-0b47eyrf.js} +1 -1
- package/web/{chunk-g46f421r.js → chunk-0h0vb6gt.js} +1 -1
- package/web/{chunk-h18tnrf2.js → chunk-0rmkpsgp.js} +1 -1
- package/web/{chunk-t7bwsdbr.js → chunk-0xkyryrq.js} +1 -1
- package/web/{chunk-h288yd5w.js → chunk-0z0y25zf.js} +1 -1
- package/web/{chunk-7ba8vrfc.js → chunk-1eg9sbbt.js} +1 -1
- package/web/{chunk-p9hsd3rn.js → chunk-1gbd61z0.js} +1 -1
- package/web/{chunk-vd6y2pcm.js → chunk-2s0bmrkv.js} +1 -1
- package/web/{chunk-33qwz9bc.js → chunk-2z1rwr28.js} +1 -1
- package/web/{chunk-tse9gvyq.js → chunk-344bq59c.js} +1 -1
- package/web/{chunk-0z0jycs8.js → chunk-3re8y26v.js} +1 -1
- package/web/chunk-3t0211rw.js +1 -0
- package/web/{chunk-5hmfk69r.js → chunk-42e3b9hv.js} +1 -1
- package/web/chunk-44rmrmcn.js +1 -0
- package/web/{chunk-fhnypcrm.js → chunk-4bzqrwr0.js} +81 -81
- package/web/{chunk-j0bwwc1g.js → chunk-4d3a7xs2.js} +1 -1
- package/web/{chunk-y3ajqthy.js → chunk-4jmazh6x.js} +1 -1
- package/web/{chunk-z4x331rx.js → chunk-4re74xwm.js} +1 -1
- package/web/{chunk-61jahh35.js → chunk-5qtyq3ce.js} +1 -1
- package/web/{chunk-wmvd6j0b.js → chunk-5z4jcqct.js} +1 -1
- package/web/{chunk-fv60p68p.js → chunk-5z6x2n5h.js} +1 -1
- package/web/{chunk-sn9ecfvy.js → chunk-6cnek1xh.js} +1 -1
- package/web/chunk-6f5ke0x9.js +1 -0
- package/web/{chunk-3qjnwsph.js → chunk-6xaqxcq8.js} +1 -1
- package/web/chunk-7q6wvv2x.js +1 -0
- package/web/{chunk-cwtdnacf.js → chunk-7qsa4p8h.js} +1 -1
- package/web/chunk-8nja0ygy.js +1 -0
- package/web/{chunk-z6bpamwq.js → chunk-8y64fkpz.js} +1 -1
- package/web/{chunk-90xqeczk.js → chunk-92ssjk2y.js} +1 -1
- package/web/chunk-9ad7v7bm.js +8 -0
- package/web/{chunk-7yc083xj.js → chunk-9cx1be43.js} +1 -1
- package/web/{chunk-wdtnhpd6.js → chunk-9dzxv335.js} +1 -1
- package/web/{chunk-w7snhcyg.js → chunk-9t5dnjaz.js} +2 -2
- package/web/{chunk-7v5rxabp.js → chunk-a408enpy.js} +1 -1
- package/web/{chunk-hszjc2ny.js → chunk-a497tykb.js} +1 -1
- package/web/{chunk-n8gfjj9a.js → chunk-aqfpnhmt.js} +2 -2
- package/web/{chunk-axkyft9f.js → chunk-b1bgzz66.js} +1 -1
- package/web/{chunk-sb1cjpq8.js → chunk-b53bfkys.js} +1 -1
- package/web/{chunk-6parf7sy.js → chunk-b6k9w215.js} +1 -1
- package/web/{chunk-es28k2t7.js → chunk-bhsaj6qq.js} +1 -1
- package/web/chunk-cjfssg3m.js +2 -0
- package/web/{chunk-5qqw2e0t.js → chunk-d11v5s7w.js} +1 -1
- package/web/{chunk-acybsx44.js → chunk-df5zx17h.js} +1 -1
- package/web/chunk-e0zre35a.js +1 -0
- package/web/{chunk-a5sg33w2.js → chunk-e9twvs9n.js} +1 -1
- package/web/chunk-f2kgtyfp.js +1 -0
- package/web/{chunk-23c1df7e.js → chunk-f4tacm06.js} +1 -1
- package/web/chunk-f8bn5tzf.js +1 -0
- package/web/chunk-fdp9bsj7.js +1 -0
- package/web/{chunk-7xk0ntav.js → chunk-fh2vj0wv.js} +1 -1
- package/web/{chunk-sgvp8vge.js → chunk-gmzqdm7v.js} +1 -1
- package/web/{chunk-tx8240k4.js → chunk-hvw3gn2a.js} +1 -1
- package/web/{chunk-rks7ksv3.js → chunk-khxcn8tt.js} +1 -1
- package/web/{chunk-eqsd8zta.js → chunk-kmr7r9xj.js} +1 -1
- package/web/chunk-kqqmp1am.js +1 -0
- package/web/{chunk-mb4qx9hy.js → chunk-kwccs9f6.js} +1 -1
- package/web/chunk-nbgqbxcy.js +1 -0
- package/web/{chunk-rcx1aee5.js → chunk-ncpnpe9w.js} +1 -1
- package/web/{chunk-jzfd7cyh.js → chunk-ne0v8mfb.js} +1 -1
- package/web/{chunk-yd1ez3wd.js → chunk-ngx2cp8x.js} +1 -1
- package/web/{chunk-4fzj0azw.js → chunk-nvhmq4z5.js} +1 -1
- package/web/chunk-nxcgf7ec.js +1 -0
- package/web/{chunk-zmdnxn6m.js → chunk-p0kvmf28.js} +1 -1
- package/web/chunk-p3k7m5nr.js +1 -0
- package/web/{chunk-9bgey148.js → chunk-pggaffrh.js} +1 -1
- package/web/{chunk-5b2nw6j1.js → chunk-pjkdrgm0.js} +1 -1
- package/web/{chunk-97b62pvb.js → chunk-pws2seas.js} +1 -1
- package/web/{chunk-mwj9tpkz.js → chunk-pz9ps2jm.js} +1 -1
- package/web/chunk-qpmbxhh6.js +1 -0
- package/web/chunk-r0rctnxz.js +1 -0
- package/web/chunk-rn3dnqm8.js +1 -0
- package/web/{chunk-47q4hmfp.js → chunk-rvrf0f3h.js} +1 -1
- package/web/{chunk-7qxhk1kz.js → chunk-sfg2wkhe.js} +1 -1
- package/web/{chunk-ep37qp12.js → chunk-sspfxp5e.js} +1 -1
- package/web/{chunk-2hd1pe9w.js → chunk-t4c8xavd.js} +1 -1
- package/web/{chunk-8qgpfxkz.js → chunk-tdr6x2xc.js} +1 -1
- package/web/chunk-tncvg1nn.js +1 -0
- package/web/{chunk-9xh96b33.js → chunk-vyp0ns1f.js} +1 -1
- package/web/{chunk-b0a8nbj0.js → chunk-wnskxerq.js} +1 -1
- package/web/{chunk-vymqrpm3.js → chunk-wvdehm9y.js} +66 -66
- package/web/chunk-x7ahcpj7.js +1 -0
- package/web/chunk-y38bf0wm.js +1 -0
- package/web/{chunk-89fkdgbp.js → chunk-y56aaba5.js} +1 -1
- package/web/{chunk-24h1rfje.js → chunk-ybrf9mhz.js} +1 -1
- package/web/{chunk-vpa55vje.js → chunk-ye58t45p.js} +3 -3
- package/web/{chunk-xnq41dgs.js → chunk-yqbnps3a.js} +1 -1
- package/web/{chunk-jqa39f8t.js → chunk-z1h20s8c.js} +1 -1
- package/web/{chunk-9a3q0jsh.js → chunk-zj4q9jth.js} +1 -1
- package/web/{chunk-ywp4s71k.js → chunk-zj5k94dk.js} +1 -1
- package/web/{chunk-xvsmtetz.js → chunk-zqch0sc8.js} +1 -1
- package/web/{chunk-0xc2c540.js → chunk-zx8zec24.js} +1 -1
- package/web/index.html +1 -1
- package/chunk-09rj27b2.js +0 -2
- package/web/chunk-166qe5j6.js +0 -2
- package/web/chunk-1c95wfvq.js +0 -1
- package/web/chunk-329rtxa9.js +0 -1
- package/web/chunk-6gxf3vsg.js +0 -1
- package/web/chunk-a91vxtx4.js +0 -1
- package/web/chunk-agec7jj4.js +0 -1
- package/web/chunk-c516cghj.js +0 -1
- package/web/chunk-dg1vas6z.js +0 -8
- package/web/chunk-fc0nx23g.js +0 -1
- package/web/chunk-jvbbrnpa.js +0 -1
- package/web/chunk-ka9ak8wr.js +0 -1
- package/web/chunk-mnjd59jk.js +0 -1
- package/web/chunk-ng0nbfhh.js +0 -1
- package/web/chunk-nz9nxk48.js +0 -1
- package/web/chunk-phw908hn.js +0 -1
- package/web/chunk-pjmmma1k.js +0 -1
- package/web/chunk-q7yn4m3t.js +0 -1
- package/web/chunk-qnhqexe0.js +0 -1
- package/web/chunk-rjqj6ffe.js +0 -1
- package/web/chunk-sjjwte12.js +0 -1
- package/web/chunk-yfbxtg5p.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ar}from"./chunk-aqfpnhmt.js";export{ar as createRailroadEbnfServices};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{W}from"./chunk-
|
|
1
|
+
import{W}from"./chunk-y56aaba5.js";import{e,r,D,b,O,C,S,E,T,A,I,L,s,wr,p,Dn,Zr,U}from"./chunk-wvdehm9y.js";import{$r,X}from"./chunk-aqfpnhmt.js";var G="position frame",V="frame positioned",F="position relation",j="relation positioned",pe=e(function(t){r.debug("options str",t)},"setOptions"),ve=e(function(){return{}},"getOptions"),be=e(function(){Y(),C()},"clear");function Y(){M={}}e(Y,"reset");var we=D.eventmodeling,ye=e(()=>U({...we,...b().eventmodeling}),"getConfig"),M={};function z(){let t=Pe,{ast:i}=M,n=N();if(!i)throw Error("No data for EventModel");return i.frames.forEach((a,o)=>{let d=te(a,i.dataEntities,n);t=P(t,{$kind:G,index:o,frame:a,textProps:d});let c=void 0;if(se(a))r.debug("source frame",a.sourceFrames),c=i.frames.filter((m)=>a.sourceFrames.some((u)=>u.$refText===m.name)),c.forEach((m)=>{t=P(t,{$kind:F,index:o,frame:a,sourceFrame:m})});else t=P(t,{$kind:F,index:o,frame:a})}),t={...t,sortedSwimlanesArray:H(t.swimlanes)},t}e(z,"getState");function K(t){M.ast=void 0;let i=new Set;for(let n of t.frames){if(i.has(n.name)){let a=n.$cstNode?.range.start.line,o=a===void 0?"":` on line ${a+1}`;throw Error(`Duplicate event modeling frame ID "${n.name}"${o}`)}i.add(n.name)}M.ast=t}e(K,"setAst");var l={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function N(){return l}e(N,"getDiagramProps");var Pe={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function q(t){let i=t.split(".");if(i.length===2)return i[0];return}e(q,"extractNamespace");function J(t){let i=t.split(".");if(i.length===2)return i[1];return t}e(J,"extractName");function Q(t,i){if(!i||i.length===0)return;return Object.values(t).find((n)=>n.namespace===i)}e(Q,"findSwimlaneByNamespace");function y(t,i,n){return Math.max(i,...Object.keys(t).filter((a)=>{let o=Number.parseInt(a);return o>i&&o<n}).map((a)=>Number.parseInt(a)))+1}e(y,"findNextAvailableIndex");function Z(t,i){let n=q(t.entityIdentifier),a=Q(i,n);switch(t.modelEntityType){case"ui":case"pcr":case"processor":if(a)return{index:a.index,label:a.namespace||l.labelUiAutomation};else if(n)return{index:y(i,0,100),label:l.labelUiAutomationPrefix+n};return{index:0,label:l.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":if(a)return{index:a.index,label:a.namespace||l.labelCommandReadModel};else if(n)return{index:y(i,100,200),label:l.labelCommandReadModelPrefix+n};return{index:100,label:l.labelCommandReadModel};case"evt":case"event":default:if(a)return{index:a.index,label:a.namespace||l.labelEvents};else if(n)return{index:y(i,200,300),label:l.labelEventsPrefix+n};return{index:200,label:l.labelEvents}}}e(Z,"calculateSwimlaneProps");function ee(t){let{themeVariables:i}=b();switch(t.modelEntityType){case"ui":return{fill:i.emUiFill??"white",stroke:i.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:i.emProcessorFill??"#edb3f6",stroke:i.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:i.emReadModelFill??"#d3f1a2",stroke:i.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:i.emCommandFill??"#bcd6fe",stroke:i.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:i.emEventFill??"#ffb778",stroke:i.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}e(ee,"calculateEntityVisualProps");function te(t,i,n){let a=b(),o=O(J(t.entityIdentifier)??"",a),d,c={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"},u=`<b>${Dn(o,n.textMaxWidth,c)}</b>`;if(t.dataInlineValue)d=t.dataInlineValue,d=d.substring(d.indexOf("{")+1),d=d.substring(0,d.lastIndexOf("}")-1),d=O(d,a),d=Dn(d,n.textMaxWidth,c),d=d.replaceAll(" "," ");if(t.dataReference){let w=i.find((k)=>k.name===t.dataReference?.$refText);if(w)d=w.dataBlockValue,d=d.substring(d.indexOf(`{
|
|
2
2
|
`)+2),d=d.substring(0,d.lastIndexOf("}")-1),d=O(d,a),d=Dn(d,n.textMaxWidth,c),d=d.replaceAll(" "," "),d+="<br/>"}let x=d!==void 0;if(x)u+=`<br/><br/><code style="text-align: left; display: block;max-width:${n.textMaxWidth}px">${d}</code>`;let g={fontSize:c.fontSize,fontWeight:c.fontWeight,fontFamily:c.fontFamily},f=Zr(u,g),v=x?f.width/3:f.width,h={content:u,width:v,height:f.height};return r.debug(`[${t.name}] ${t.entityIdentifier} text`,h),h}e(te,"calculateTextProps");function ne(t,i){let n=i,a=ee(n.frame),o={width:n.textProps.width+2*l.boxTextPadding,height:n.textProps.height+2*l.boxTextPadding};return[{$kind:V,frame:n.frame,index:n.index,visual:a,dimension:o,textProps:n.textProps}]}e(ne,"decidePositionFrame");function ie(t,i,n){if(i===void 0)return l.contentStartX;if(i.index===t.index&&t.r)return t.r+l.boxPadding;if(n===void 0)return l.contentStartX;return n.r-l.boxOverlap+l.boxPadding}e(ie,"calculateX");function re(t,i){let n=[...t.map((a)=>a.r),i];return Math.max(...n)}e(re,"calculateMaxRight");function H(t){return Object.values(t).sort((i,n)=>i.index-n.index)}e(H,"sortedSwimlanesArray");function ae(t,i){let n=i,a=Z(n.frame,t.swimlanes),o;if(a.index in t.swimlanes)o=t.swimlanes[a.index];else o={index:a.index,label:a.label,r:0,y:a.index*l.swimlaneMinHeight+l.swimlaneGap,height:l.swimlaneMinHeight,maxHeight:l.swimlaneMinHeight};let d=t.boxes.length>0?t.boxes[t.boxes.length-1]:void 0,c=t.previousSwimlaneNumber!==void 0?t.swimlanes[t.previousSwimlaneNumber]:void 0,m={width:Math.max(l.boxMinWidth,Math.min(l.boxMaxWidth,n.dimension.width))+2*l.boxPadding,height:Math.max(l.boxMinHeight,Math.min(l.boxMaxHeight,n.dimension.height))+2*l.boxPadding},u=ie(o,c,d),x=u+m.width+l.boxPadding,g=re(Object.values(t.swimlanes),x);o.r=u+m.width,o.maxHeight=Math.max(o.maxHeight,m.height),o.height=Math.max(l.swimlaneMinHeight,o.maxHeight)+2*l.swimlanePadding;let f={x:u,y:l.swimlanePadding+o.y,r:x,dimension:m,leftSibling:!1,swimlane:o,visual:n.visual,text:n.textProps.content,frame:n.frame,index:n.index},v={...t,boxes:[...t.boxes,f],swimlanes:{...t.swimlanes,[`${o.index}`]:o},previousSwimlaneNumber:a.index,previousFrame:n.frame,maxR:g},h=H(v.swimlanes);if(h.length>0)h[0].y=0;for(let w=1;w<h.length;w++){let k=h[w],_=h[w-1];k.y=_.y+_.height+l.swimlaneGap}return v}e(ae,"evolveFramePositioned");function oe(t,i){if(t===0&&i.sourceFrames.length===0)return!0;return!1}e(oe,"isFirstFrame");function se(t){return t.sourceFrames!==void 0&&t.sourceFrames!==null&&t.sourceFrames.length>0}e(se,"hasSourceFrame");function B(t,i){if(i===void 0||i===null)return;return t.find((n)=>n.frame.name===i.name)}e(B,"findBoxByFrame");function de(t,i,n){if(n<0)return;for(let a=n;a>=0;a--){let o=t[a];if(o.swimlane.index!==i)return o}return}e(de,"findBoxByLineIndex");function le(t,i){let n=i;if(oe(n.index,n.frame))return[];let a=B(t.boxes,n.frame);if(a===void 0)throw Error(`Target box not found for frame ${n.frame.name}`);let o;if(n.sourceFrame)o=B(t.boxes,n.sourceFrame);else{if($r(n.frame))return[];o=de(t.boxes,a.swimlane.index,n.index-1)}if(o===void 0)return[];return[{$kind:j,frame:n.frame,index:n.index,sourceBox:o,targetBox:a}]}e(le,"decidePositionRelation");function ce(t,i){let n=i,a={visual:{fill:"none",stroke:"#000"},source:{x:n.sourceBox.x,y:n.sourceBox.y},target:{x:n.targetBox.x,y:n.targetBox.y},sourceBox:n.sourceBox,targetBox:n.targetBox};return{...t,relations:[...t.relations,a]}}e(ce,"evolveRelationPositioned");var Se={[G]:ne,[F]:le},Me={[V]:ae,[j]:ce};function me(t,i){let n=Se[i.$kind];if(n===void 0||n===null)return[];let a=n(t,i);return r.debug("decided events",a),a}e(me,"decide");function ue(t,i){let n=i.reduce((a,o)=>{let d=Me[o.$kind];if(d===void 0||d===null)return a;return d(a,o)},t);return r.debug("evolve events",{state:t,newState:n,events:i}),n}e(ue,"evolve");function P(t,i){let n=me(t,i);return ue(t,n)}e(P,"dispatch");var R={getConfig:ye,preserveCommentsWhenParsing:!0,setOptions:pe,getOptions:ve,clear:be,setAccTitle:S,getAccTitle:E,getAccDescription:A,setAccDescription:T,setDiagramTitle:I,getDiagramTitle:L,setAst:K,getDiagramProps:N,getState:z},ke={parse:e(async(t)=>{let i=await X("eventmodeling",t);r.debug(i),R.setAst(i),W(i,R)},"parse")},Fe=s(),Be=Fe?.eventmodeling;function xe(t,i){return(n)=>{let a=n.swimlane.y+i.swimlanePadding,o=t.append("g").attr("class","em-box");o.append("rect").attr("x",n.x).attr("y",a).attr("rx","3").attr("width",n.dimension.width).attr("height",n.dimension.height).attr("stroke",n.visual.stroke).attr("fill",n.visual.fill),o.append("foreignObject").attr("x",n.x+i.boxPadding).attr("y",a+10).attr("width",n.dimension.width-2*i.boxPadding).attr("height",n.dimension.height-2*i.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(n.text)}}e(xe,"renderD3Box");function fe(t,i){return t>i}e(fe,"dirUpwards");function ge(t,i,n,a){return(o)=>{let d=o.sourceBox.swimlane.y+i.swimlanePadding,c=o.targetBox.swimlane.y+i.swimlanePadding,m=fe(d,c),u=o.sourceBox.x+o.sourceBox.dimension.width*2/3,x=o.targetBox.x+o.targetBox.dimension.width/3,g,f;if(r.debug(`rendering relation up=${m} for `,{sourceBox:o.sourceBox,targetBox:o.targetBox}),m)g=d,f=c+o.targetBox.dimension.height;else g=d+o.sourceBox.dimension.height,f=c;let v=a.emRelationStroke??o.visual.stroke;t.append("path").attr("class","em-relation").attr("fill",o.visual.fill).attr("stroke",v).attr("stroke-width","1").attr("marker-end",`url(#${n})`).attr("d",`M${u} ${g} L${x} ${f}`)}}e(ge,"renderD3Relation");function he(t,i,n,a){return(o)=>{let d=t.append("g").attr("class","em-swimlane"),c=a.emSwimlaneBackgroundOdd??"rgb(250,250,250)",m=a.emSwimlaneBackgroundStroke??"rgb(240,240,240)";d.append("rect").attr("x",0).attr("y",o.y).attr("rx","3").attr("width",i+n.swimlanePadding).attr("height",o.height).attr("fill",c).attr("stroke",m),d.append("text").attr("font-weight",n.swimlaneTextFontWeight).attr("x",30).attr("y",o.y+30).text(o.label)}}e(he,"renderD3Swimlane");var Ee=e(function(t,i,n,a){if(r.debug("in eventmodeling renderer",t+`
|
|
3
3
|
`,"id:",i,n),!Be)throw Error("EventModeling config not found");let o=a.db,{themeVariables:d,eventmodeling:c}=s(),m=p(`[id="${i}"]`),u=o.getDiagramProps(),x=o.getState(),g=`em-arrowhead-${i}`,f=d.emArrowhead??"#000000";x.sortedSwimlanesArray.forEach(he(m,x.maxR,u,d)),x.boxes.forEach(xe(m,u)),x.relations.forEach(ge(m,u,g,d)),m.append("defs").append("marker").attr("id",g).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",f),wr(void 0,m,c?.padding??30,c?.useMaxWidth)},"draw"),Ae={draw:Ee},$e=e((t)=>"","getStyles"),Re=$e,Ue={parser:ke,db:R,renderer:Ae,styles:Re};export{Ue as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{wo}from"./chunk-4bzqrwr0.js";export{wo as QuestionDock};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h,o,a,t,n,_,Z,te,rt,vt}from"./chunk-
|
|
1
|
+
import{h,o,a,t,n,_,Z,te,rt,vt}from"./chunk-4bzqrwr0.js";import{gn}from"./chunk-ngx2cp8x.js";var I="/api/plugins/prompt-optimizer";function j({connection:u,onClose:x}){let{Button:g,ModelSelector:O,Select:D,SettingGroup:S,SettingRow:b,cn:C}=_(),[m,z]=a(null),[s,p]=a(null),[L,B]=a({models:[]}),[d,M]=a(!0),[N,R]=a(!1),[l,w]=a(!1),[f,r]=a(null),y=h(async(i=!1)=>{if(i)R(!0);else M(!0);r(null);try{let[e,c]=await Promise.all([u.request(`${I}/settings`),u.request("/api/models")]);z(e),p(e),B(c)}catch(e){r({type:"error",text:e instanceof Error?e.message:"读取优化插件设置失败"})}finally{M(!1),R(!1)}},[u]);o(()=>{y()},[y]);let P=s&&m?s.primaryModel?.providerID!==m.primaryModel?.providerID||s.primaryModel?.modelID!==m.primaryModel?.modelID||s.maxClarificationRounds!==m.maxClarificationRounds:!1,E=async(i)=>{if(i?.preventDefault(),!s||l||d)return;w(!0),r(null);try{let e=await u.request(`${I}/settings`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({schemaVersion:1,revision:s.revision,primaryModel:s.primaryModel,maxClarificationRounds:s.maxClarificationRounds})});z(e),p(e),r({type:"success",text:"设置已保存"})}catch(e){r({type:"error",text:e instanceof Error?e.message:"保存设置失败"})}finally{w(!1)}},T=()=>{p(m),r(null)},v=s?.primaryModel??null,q=v?`${v.providerID}/${v.modelID}`:"";return n("form",{onSubmit:E,className:"min-w-0 space-y-6",children:[t(S,{title:"模型策略",description:"提示词优化专用的改写模型配置",action:n(g,{type:"button",size:"sm",variant:"ghost",disabled:d||N||l,onClick:()=>void y(!0),className:"h-8 px-2.5 text-xs text-dim hover:text-ink",children:[t(te,{className:C("mr-1.5 size-3.5",N&&"animate-spin")}),"刷新模型"]}),children:t(b,{vertical:!0,title:"默认优化模型",description:"优化插件必须显式绑定模型才能发起改写;未选定模型时将拒绝调用,绝不隐式自动回退。",children:t("div",{className:"pt-1",children:t(O,{variant:"field",models:L,value:q,onChange:(i)=>{let e=i.indexOf("/"),c=e<0?"":i.slice(0,e),G=e<0?i:i.slice(e+1);p((k)=>k?{...k,primaryModel:{providerID:c,modelID:G}}:null),r(null)}})})})}),t(S,{title:"交互模式",description:"控制生成过程中的意图确认与澄清策略",children:t(b,{title:"澄清提问轮数",description:"当草稿存在关键歧义无法从上下文判定时,允许模型主动提问的最大轮数",children:t("div",{className:"w-48",children:t(D,{value:String(s?.maxClarificationRounds??1),disabled:d||l,onValueChange:(i)=>{let e=i==="2"?2:1;p((c)=>c?{...c,maxClarificationRounds:e}:null),r(null)},groups:[{options:[{value:"1",label:"单轮澄清(推荐)",description:"提问一次后直接输出改写结果"},{value:"2",label:"最多两轮澄清",description:"首轮澄清后可针对残留疑问追问一次"}]}]})})})}),n("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-3 px-0.5",children:[t("div",{className:"min-w-0 flex-1",children:f&&n("div",{className:C("flex items-center gap-2 text-xs",f.type==="success"?"text-success":"text-danger"),children:[f.type==="success"?t(gn,{className:"size-3.5 shrink-0"}):t(Z,{className:"size-3.5 shrink-0"}),t("span",{children:f.text})]})}),n("div",{className:"flex items-center gap-2",children:[P&&n(g,{type:"button",variant:"ghost",size:"sm",disabled:d||l,onClick:T,children:[t(rt,{className:"mr-1.5 size-3.5"}),"重置"]}),n(g,{type:"submit",variant:"primary",size:"sm",disabled:d||l||!P,children:[t(vt,{className:"mr-1.5 size-3.5"}),l?"保存中…":"保存"]}),x&&t(g,{type:"button",variant:"secondary",size:"sm",onClick:x,children:"关闭"})]})]})]})}export{j as PromptOptimizerSettingsSection};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ki,Co,Qi,So,To,Ji}from"./chunk-9dzxv335.js";import"./chunk-ne0v8mfb.js";import"./chunk-fh2vj0wv.js";import"./chunk-wvdehm9y.js";export{Co as applyDagreLayoutResult,Ki as getEdgesToRender,So as measureDagreLayout,Qi as prepareLayoutForDagre,Ji as render,To as runDagreLayoutCore};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-wvdehm9y.js";import"./chunk-fh2vj0wv.js";import"./chunk-ne0v8mfb.js";import{Ji}from"./chunk-9dzxv335.js";export{Ji as render};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{At}from"./chunk-fhnypcrm.js";var Z={};At(Z,{default:()=>kt});var V={};At(V,{default:()=>Gt});var Kr=typeof global=="object"&&global&&global.Object===Object&&global,q=Kr;var Hr=typeof self=="object"&&self&&self.Object===Object&&self,qr=q||Hr||Function("return this")(),be=qr;var $r=be.Symbol,Pe=$r;var Pt=Object.prototype,{hasOwnProperty:kr,toString:Yr}=Pt,G=Pe?Pe.toStringTag:void 0;function Xr(t){var e=kr.call(t,G),r=t[G];try{t[G]=void 0;var o=!0}catch(i){}var a=Yr.call(t);if(o)if(e)t[G]=r;else delete t[G];return a}var Ct=Xr;var Zr=Object.prototype,Jr=Zr.toString;function Qr(t){return Jr.call(t)}var Et=Qr;var Vr="[object Null]",to="[object Undefined]",It=Pe?Pe.toStringTag:void 0;function eo(t){if(t==null)return t===void 0?to:Vr;return It&&It in Object(t)?Ct(t):Et(t)}var Qe=eo;function ro(t){return t!=null&&typeof t=="object"}var Te=ro;var oo="[object Symbol]";function ao(t){return typeof t=="symbol"||Te(t)&&Qe(t)==oo}var ct=ao;function fo(t,e){var r=-1,o=t==null?0:t.length,a=Array(o);while(++r<o)a[r]=e(t[r],r,t);return a}var qt=fo;var io=Array.isArray,H=io;var no=1/0,Lt=Pe?Pe.prototype:void 0,jt=Lt?Lt.toString:void 0;function Mt(t){if(typeof t=="string")return t;if(H(t))return qt(t,Mt)+"";if(ct(t))return jt?jt.call(t):"";var e=t+"";return e=="0"&&1/t==-no?"-0":e}var Nt=Mt;function so(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var me=so;function po(t){return t}var at=po;var uo="[object AsyncFunction]",mo="[object Function]",lo="[object GeneratorFunction]",xo="[object Proxy]";function ho(t){if(!me(t))return!1;var e=Qe(t);return e==mo||e==lo||e==uo||e==xo}var Vt=ho;var co=be["__core-js_shared__"],k=co;var Dt=function(){var t=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function go(t){return!!Dt&&Dt in t}var Rt=go;var yo=Function.prototype,_o=yo.toString;function bo(t){if(t!=null){try{return _o.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var _=bo;var vo=/[\\^$.*+?()[\]{}|]/g,Oo=/^\[object .+?Constructor\]$/,Ao=Function.prototype,To=Object.prototype,wo=Ao.toString,So=To.hasOwnProperty,Po=RegExp("^"+wo.call(So).replace(vo,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Co(t){if(!me(t)||Rt(t))return!1;var e=Vt(t)?Po:Oo;return e.test(_(t))}var Ft=Co;function Eo(t,e){return t==null?void 0:t[e]}var Bt=Eo;function Io(t,e){var r=Bt(t,e);return Ft(r)?r:void 0}var h=Io;var Lo=h(be,"WeakMap"),Y=Lo;function jo(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var Ut=jo;function Mo(){}var zt=Mo;var No=800,Do=16,Ro=Date.now;function Fo(t){var e=0,r=0;return function(){var o=Ro(),a=Do-(o-r);if(r=o,a>0){if(++e>=No)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Kt=Fo;function Bo(t){return function(){return t}}var it=Bo;var Go=function(){try{var t=h(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),cr=Go;var Uo=!cr?at:function(t,e){return cr(t,"toString",{configurable:!0,enumerable:!1,value:it(e),writable:!0})},Xt=Uo;var zo=Kt(Xt),ua=zo;function Wo(t,e){var r=-1,o=t==null?0:t.length;while(++r<o)if(e(t[r],r,t)===!1)break;return t}var da=Wo;function Ko(t,e,r,o){var a=t.length,i=r+(o?1:-1);while(o?i--:++i<a)if(e(t[i],i,t))return i;return-1}var pa=Ko;function Ho(t){return t!==t}var Zt=Ho;function qo(t,e,r){var o=r-1,a=t.length;while(++o<a)if(t[o]===e)return o;return-1}var Jt=qo;function $o(t,e,r){return e===e?Jt(t,e,r):pa(t,Zt,r)}var Qt=$o;function ko(t,e){var r=t==null?0:t.length;return!!r&&Qt(t,e,0)>-1}var te=ko;var Yo=9007199254740991,Xo=/^(?:0|[1-9]\d*)$/;function Zo(t,e){var r=typeof t;return e=e==null?Yo:e,!!e&&(r=="number"||r!="symbol"&&Xo.test(t))&&(t>-1&&t%1==0&&t<e)}var yn=Zo;function Jo(t,e){return t===e||t!==t&&e!==e}var wt=Jo;var ee=Math.max;function Qo(t,e,r){return e=ee(e===void 0?t.length-1:e,0),function(){var o=arguments,a=-1,i=ee(o.length-e,0),n=Array(i);while(++a<i)n[a]=o[e+a];a=-1;var s=Array(e+1);while(++a<e)s[a]=o[a];return s[e]=r(n),Ut(t,this,s)}}var ma=Qo;function Vo(t,e){return ua(ma(t,e,at),t+"")}var vn=Vo;var ta=9007199254740991;function ea(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ta}var j=ea;function ra(t){return t!=null&&j(t.length)&&!Vt(t)}var Oe=ra;var oa=Object.prototype;function aa(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||oa;return t===r}var bn=aa;function ia(t,e){var r=-1,o=Array(t);while(++r<t)o[r]=e(r);return o}var re=ia;var na="[object Arguments]";function sa(t){return Te(t)&&Qe(t)==na}var gt=sa;var oe=Object.prototype,{hasOwnProperty:la,propertyIsEnumerable:ca}=oe,Oa=gt(function(){return arguments}())?gt:function(t){return Te(t)&&la.call(t,"callee")&&!ca.call(t,"callee")},$t=Oa;function Aa(){return!1}var ae=Aa;var ne=typeof Z=="object"&&Z&&!Z.nodeType&&Z,fe=ne&&typeof X=="object"&&X&&!X.nodeType&&X,Ta=fe&&fe.exports===ne,ie=Ta?be.Buffer:void 0,Sa=ie?ie.isBuffer:void 0,Pa=Sa||ae,kt=Pa;var Ca="[object Arguments]",Ea="[object Array]",Ia="[object Boolean]",La="[object Date]",ja="[object Error]",Ma="[object Function]",Na="[object Map]",Da="[object Number]",Ra="[object Object]",Fa="[object RegExp]",Ba="[object Set]",Ga="[object String]",Ua="[object WeakMap]",za="[object ArrayBuffer]",Wa="[object DataView]",Ka="[object Float32Array]",Ha="[object Float64Array]",qa="[object Int8Array]",$a="[object Int16Array]",ka="[object Int32Array]",Ya="[object Uint8Array]",Xa="[object Uint8ClampedArray]",Za="[object Uint16Array]",Ja="[object Uint32Array]",m={};m[Ka]=m[Ha]=m[qa]=m[$a]=m[ka]=m[Ya]=m[Xa]=m[Za]=m[Ja]=!0;m[Ca]=m[Ea]=m[za]=m[Ia]=m[Wa]=m[La]=m[ja]=m[Ma]=m[Na]=m[Da]=m[Ra]=m[Fa]=m[Ba]=m[Ga]=m[Ua]=!1;function Qa(t){return Te(t)&&j(t.length)&&!!m[Qe(t)]}var se=Qa;function Va(t){return function(e){return t(e)}}var xn=Va;var pe=typeof V=="object"&&V&&!V.nodeType&&V,U=pe&&typeof J=="object"&&J&&!J.nodeType&&J,tf=U&&U.exports===pe,yt=tf&&q.process,ef=function(){try{var t=U&&U.require&&U.require("util").types;if(t)return t;return yt&&yt.binding&&yt.binding("util")}catch(e){}}(),Gt=ef;var ue=Gt&&Gt.isTypedArray,rf=ue?xn(ue):se,_n=rf;var of=Object.prototype,af=of.hasOwnProperty;function ff(t,e){var r=H(t),o=!r&&$t(t),a=!r&&!o&&kt(t),i=!r&&!o&&!a&&_n(t),n=r||o||a||i,s=n?re(t.length,String):[],p=s.length;for(var u in t)if((e||af.call(t,u))&&!(n&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||yn(u,p))))s.push(u);return s}var fa=ff;function nf(t,e){return function(r){return t(e(r))}}var ha=nf;var sf=ha(Object.keys,Object),le=sf;var pf=Object.prototype,uf=pf.hasOwnProperty;function mf(t){if(!bn(t))return le(t);var e=[];for(var r in Object(t))if(uf.call(t,r)&&r!="constructor")e.push(r);return e}var ur=mf;function lf(t){return Oe(t)?fa(t):ur(t)}var xe=lf;var df=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xf=/^\w*$/;function hf(t,e){if(H(t))return!1;var r=typeof t;if(r=="number"||r=="symbol"||r=="boolean"||t==null||ct(t))return!0;return xf.test(t)||!df.test(t)||e!=null&&t in Object(e)}var M=hf;var cf=h(Object,"create"),b=cf;function gf(){this.__data__=b?b(null):{},this.size=0}var de=gf;function yf(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var he=yf;var _f="__lodash_hash_undefined__",bf=Object.prototype,vf=bf.hasOwnProperty;function Of(t){var e=this.__data__;if(b){var r=e[t];return r===_f?void 0:r}return vf.call(e,t)?e[t]:void 0}var ce=Of;var Af=Object.prototype,Tf=Af.hasOwnProperty;function wf(t){var e=this.__data__;return b?e[t]!==void 0:Tf.call(e,t)}var ge=wf;var Sf="__lodash_hash_undefined__";function Pf(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=b&&e===void 0?Sf:e,this}var ye=Pf;function N(t){var e=-1,r=t==null?0:t.length;this.clear();while(++e<r){var o=t[e];this.set(o[0],o[1])}}N.prototype.clear=de;N.prototype.delete=he;N.prototype.get=ce;N.prototype.has=ge;N.prototype.set=ye;var _t=N;function Cf(){this.__data__=[],this.size=0}var ve=Cf;function Ef(t,e){var r=t.length;while(r--)if(wt(t[r][0],e))return r;return-1}var O=Ef;var If=Array.prototype,Lf=If.splice;function jf(t){var e=this.__data__,r=O(e,t);if(r<0)return!1;var o=e.length-1;if(r==o)e.pop();else Lf.call(e,r,1);return--this.size,!0}var Ae=jf;function Mf(t){var e=this.__data__,r=O(e,t);return r<0?void 0:e[r][1]}var we=Mf;function Nf(t){return O(this.__data__,t)>-1}var Se=Nf;function Df(t,e){var r=this.__data__,o=O(r,t);if(o<0)++this.size,r.push([t,e]);else r[o][1]=e;return this}var Ce=Df;function D(t){var e=-1,r=t==null?0:t.length;this.clear();while(++e<r){var o=t[e];this.set(o[0],o[1])}}D.prototype.clear=ve;D.prototype.delete=Ae;D.prototype.get=we;D.prototype.has=Se;D.prototype.set=Ce;var A=D;var Rf=h(be,"Map"),T=Rf;function Ff(){this.size=0,this.__data__={hash:new _t,map:new(T||A),string:new _t}}var Ee=Ff;function Bf(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var Ie=Bf;function Gf(t,e){var r=t.__data__;return Ie(e)?r[typeof e=="string"?"string":"hash"]:r.map}var w=Gf;function Uf(t){var e=w(this,t).delete(t);return this.size-=e?1:0,e}var Le=Uf;function zf(t){return w(this,t).get(t)}var je=zf;function Wf(t){return w(this,t).has(t)}var Me=Wf;function Kf(t,e){var r=w(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}var Ne=Kf;function R(t){var e=-1,r=t==null?0:t.length;this.clear();while(++e<r){var o=t[e];this.set(o[0],o[1])}}R.prototype.clear=Ee;R.prototype.delete=Le;R.prototype.get=je;R.prototype.has=Me;R.prototype.set=Ne;var E=R;var Hf="Expected a function";function bt(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw TypeError(Hf);var r=function(){var o=arguments,a=e?e.apply(this,o):o[0],i=r.cache;if(i.has(a))return i.get(a);var n=t.apply(this,o);return r.cache=i.set(a,n)||i,n};return r.cache=new(bt.Cache||E),r}bt.Cache=E;var De=bt;var qf=500;function $f(t){var e=De(t,function(o){if(r.size===qf)r.clear();return o}),r=e.cache;return e}var Re=$f;var kf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yf=/\\(\\)?/g,Xf=Re(function(t){var e=[];if(t.charCodeAt(0)===46)e.push("");return t.replace(kf,function(r,o,a,i){e.push(a?i.replace(Yf,"$1"):o||r)}),e}),Fe=Xf;function Zf(t){return t==null?"":Nt(t)}var ga=Zf;function Jf(t,e){if(H(t))return t;return M(t,e)?[t]:Fe(ga(t))}var wn=Jf;var Qf=1/0;function Vf(t){if(typeof t=="string"||ct(t))return t;var e=t+"";return e=="0"&&1/t==-Qf?"-0":e}var Wt=Vf;function ti(t,e){e=wn(e,t);var r=0,o=e.length;while(t!=null&&r<o)t=t[Wt(e[r++])];return r&&r==o?t:void 0}var kn=ti;function ei(t,e,r){var o=t==null?void 0:kn(t,e);return o===void 0?r:o}var Be=ei;function ri(t,e){var r=-1,o=e.length,a=t.length;while(++r<o)t[a+r]=e[r];return t}var dr=ri;var Ge=Pe?Pe.isConcatSpreadable:void 0;function oi(t){return H(t)||$t(t)||!!(Ge&&t&&t[Ge])}var Ue=oi;function ze(t,e,r,o,a){var i=-1,n=t.length;r||(r=Ue),a||(a=[]);while(++i<n){var s=t[i];if(e>0&&r(s))if(e>1)ze(s,e-1,r,o,a);else dr(a,s);else if(!o)a[a.length]=s}return a}var pr=ze;function ai(t,e,r,o){var a=-1,i=t==null?0:t.length;if(o&&i)r=t[++a];while(++a<i)r=e(r,t[a],a,t);return r}var Ke=ai;function fi(){this.__data__=new A,this.size=0}var He=fi;function ii(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var qe=ii;function ni(t){return this.__data__.get(t)}var $e=ni;function si(t){return this.__data__.has(t)}var ke=si;var pi=200;function ui(t,e){var r=this.__data__;if(r instanceof A){var o=r.__data__;if(!T||o.length<pi-1)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new E(o)}return r.set(t,e),this.size=r.size,this}var Ye=ui;function F(t){var e=this.__data__=new A(t);this.size=e.size}F.prototype.clear=He;F.prototype.delete=qe;F.prototype.get=$e;F.prototype.has=ke;F.prototype.set=Ye;var Ht=F;function mi(t,e){var r=-1,o=t==null?0:t.length,a=0,i=[];while(++r<o){var n=t[r];if(e(n,r,t))i[a++]=n}return i}var tt=mi;function li(){return[]}var ya=li;var di=Object.prototype,xi=di.propertyIsEnumerable,Xe=Object.getOwnPropertySymbols,hi=!Xe?ya:function(t){if(t==null)return[];return t=Object(t),tt(Xe(t),function(e){return xi.call(t,e)})},mr=hi;function ci(t,e,r){var o=e(t);return H(t)?o:dr(o,r(t))}var va=ci;function gi(t){return va(t,xe,mr)}var zr=gi;var yi=h(be,"DataView"),et=yi;var _i=h(be,"Promise"),rt=_i;var bi=h(be,"Set"),S=bi;var Ze="[object Map]",vi="[object Object]",Ve="[object Promise]",tr="[object Set]",er="[object WeakMap]",rr="[object DataView]",Oi=_(et),Ai=_(T),Ti=_(rt),wi=_(S),Si=_(Y),I=Qe;if(et&&I(new et(new ArrayBuffer(1)))!=rr||T&&I(new T)!=Ze||rt&&I(rt.resolve())!=Ve||S&&I(new S)!=tr||Y&&I(new Y)!=er)I=function(t){var e=Qe(t),r=e==vi?t.constructor:void 0,o=r?_(r):"";if(o)switch(o){case Oi:return rr;case Ai:return Ze;case Ti:return Ve;case wi:return tr;case Si:return er}return e};var ut=I;var Pi=be.Uint8Array,fr=Pi;var Ci="__lodash_hash_undefined__";function Ei(t){return this.__data__.set(t,Ci),this}var or=Ei;function Ii(t){return this.__data__.has(t)}var ar=Ii;function ot(t){var e=-1,r=t==null?0:t.length;this.__data__=new E;while(++e<r)this.add(t[e])}ot.prototype.add=ot.prototype.push=or;ot.prototype.has=ar;var ft=ot;function Li(t,e){var r=-1,o=t==null?0:t.length;while(++r<o)if(e(t[r],r,t))return!0;return!1}var ir=Li;function ji(t,e){return t.has(e)}var nt=ji;var Mi=1,Ni=2;function Di(t,e,r,o,a,i){var n=r&Mi,s=t.length,p=e.length;if(s!=p&&!(n&&p>s))return!1;var u=i.get(t),x=i.get(e);if(u&&x)return u==e&&x==t;var d=-1,l=!0,y=r&Ni?new ft:void 0;i.set(t,e),i.set(e,t);while(++d<s){var c=t[d],g=e[d];if(o)var v=n?o(g,c,d,e,t,i):o(c,g,d,t,e,i);if(v!==void 0){if(v)continue;l=!1;break}if(y){if(!ir(e,function(P,C){if(!nt(y,C)&&(c===P||a(c,P,r,o,i)))return y.push(C)})){l=!1;break}}else if(!(c===g||a(c,g,r,o,i))){l=!1;break}}return i.delete(t),i.delete(e),l}var st=Di;function Ri(t){var e=-1,r=Array(t.size);return t.forEach(function(o,a){r[++e]=[a,o]}),r}var nr=Ri;function Fi(t){var e=-1,r=Array(t.size);return t.forEach(function(o){r[++e]=o}),r}var B=Fi;var Bi=1,Gi=2,Ui="[object Boolean]",zi="[object Date]",Wi="[object Error]",Ki="[object Map]",Hi="[object Number]",qi="[object RegExp]",$i="[object Set]",ki="[object String]",Yi="[object Symbol]",Xi="[object ArrayBuffer]",Zi="[object DataView]",sr=Pe?Pe.prototype:void 0,vt=sr?sr.valueOf:void 0;function Ji(t,e,r,o,a,i,n){switch(r){case Zi:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Xi:if(t.byteLength!=e.byteLength||!i(new fr(t),new fr(e)))return!1;return!0;case Ui:case zi:case Hi:return wt(+t,+e);case Wi:return t.name==e.name&&t.message==e.message;case qi:case ki:return t==e+"";case Ki:var s=nr;case $i:var p=o&Bi;if(s||(s=B),t.size!=e.size&&!p)return!1;var u=n.get(t);if(u)return u==e;o|=Gi,n.set(t,e);var x=st(s(t),s(e),o,a,i,n);return n.delete(t),x;case Yi:if(vt)return vt.call(t)==vt.call(e)}return!1}var lr=Ji;var Qi=1,Vi=Object.prototype,tn=Vi.hasOwnProperty;function en(t,e,r,o,a,i){var n=r&Qi,s=zr(t),p=s.length,u=zr(e),x=u.length;if(p!=x&&!n)return!1;var d=p;while(d--){var l=s[d];if(!(n?l in e:tn.call(e,l)))return!1}var y=i.get(t),c=i.get(e);if(y&&c)return y==e&&c==t;var g=!0;i.set(t,e),i.set(e,t);var v=n;while(++d<p){l=s[d];var P=t[l],C=e[l];if(o)var St=n?o(C,P,l,e,t,i):o(P,C,l,t,e,i);if(!(St===void 0?P===C||a(P,C,r,o,i):St)){g=!1;break}v||(v=l=="constructor")}if(g&&!v){var W=t.constructor,K=e.constructor;if(W!=K&&(("constructor"in t)&&("constructor"in e))&&!(typeof W=="function"&&W instanceof W&&typeof K=="function"&&K instanceof K))g=!1}return i.delete(t),i.delete(e),g}var xr=en;var rn=1,_r="[object Arguments]",br="[object Array]",pt="[object Object]",on=Object.prototype,vr=on.hasOwnProperty;function an(t,e,r,o,a,i){var n=H(t),s=H(e),p=n?br:ut(t),u=s?br:ut(e);p=p==_r?pt:p,u=u==_r?pt:u;var x=p==pt,d=u==pt,l=p==u;if(l&&kt(t)){if(!kt(e))return!1;n=!0,x=!1}if(l&&!x)return i||(i=new Ht),n||_n(t)?st(t,e,r,o,a,i):lr(t,e,p,r,o,a,i);if(!(r&rn)){var y=x&&vr.call(t,"__wrapped__"),c=d&&vr.call(e,"__wrapped__");if(y||c){var g=y?t.value():t,v=c?e.value():e;return i||(i=new Ht),a(g,v,r,o,i)}}if(!l)return!1;return i||(i=new Ht),xr(t,e,r,o,a,i)}var Or=an;function Ar(t,e,r,o,a){if(t===e)return!0;if(t==null||e==null||!Te(t)&&!Te(e))return t!==t&&e!==e;return Or(t,e,r,o,Ar,a)}var mt=Ar;var fn=1,nn=2;function sn(t,e,r,o){var a=r.length,i=a,n=!o;if(t==null)return!i;t=Object(t);while(a--){var s=r[a];if(n&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}while(++a<i){s=r[a];var p=s[0],u=t[p],x=s[1];if(n&&s[2]){if(u===void 0&&!(p in t))return!1}else{var d=new Ht;if(o)var l=o(u,x,p,t,e,d);if(!(l===void 0?mt(x,u,fn|nn,o,d):l))return!1}}return!0}var Tr=sn;function pn(t){return t===t&&!me(t)}var lt=pn;function un(t){var e=xe(t),r=e.length;while(r--){var o=e[r],a=t[o];e[r]=[o,a,lt(a)]}return e}var wr=un;function mn(t,e){return function(r){if(r==null)return!1;return r[t]===e&&(e!==void 0||(t in Object(r)))}}var xt=mn;function ln(t){var e=wr(t);if(e.length==1&&e[0][2])return xt(e[0][0],e[0][1]);return function(r){return r===t||Tr(r,t,e)}}var Sr=ln;function dn(t,e){return t!=null&&e in Object(t)}var Pr=dn;function hn(t,e,r){e=wn(e,t);var o=-1,a=e.length,i=!1;while(++o<a){var n=Wt(e[o]);if(!(i=t!=null&&r(t,n)))break;t=t[n]}if(i||++o!=a)return i;return a=t==null?0:t.length,!!a&&j(a)&&yn(n,a)&&(H(t)||$t(t))}var ba=hn;function cn(t,e){return t!=null&&ba(t,e,Pr)}var xa=cn;var gn=1,On=2;function An(t,e){if(M(t)&<(e))return xt(Wt(t),e);return function(r){var o=Be(r,t);return o===void 0&&o===e?xa(r,t):mt(e,o,gn|On)}}var Cr=An;function Tn(t){return function(e){return e==null?void 0:e[t]}}var _a=Tn;function Sn(t){return function(e){return kn(e,t)}}var Er=Sn;function Pn(t){return M(t)?_a(Wt(t)):Er(t)}var Ir=Pn;function En(t){if(typeof t=="function")return t;if(t==null)return at;if(typeof t=="object")return H(t)?Cr(t[0],t[1]):Sr(t);return Ir(t)}var We=En;function In(t){return function(e,r,o){var a=-1,i=Object(e),n=o(e),s=n.length;while(s--){var p=n[t?s:++a];if(r(i[p],p,i)===!1)break}return e}}var Lr=In;var Ln=Lr(),hr=Ln;function jn(t,e){return t&&hr(t,e,xe)}var gr=jn;function Mn(t,e){return function(r,o){if(r==null)return r;if(!Oe(r))return t(r,o);var a=r.length,i=e?a:-1,n=Object(r);while(e?i--:++i<a)if(o(n[i],i,n)===!1)break;return r}}var jr=Mn;var Nn=jr(gr),Cn=Nn;function Dn(t){return Te(t)&&Oe(t)}var wa=Dn;function Rn(t,e,r){var o=-1,a=t==null?0:t.length;while(++o<a)if(r(e,t[o]))return!0;return!1}var Mr=Rn;function Fn(t){return typeof t=="function"?t:at}var yr=Fn;function Bn(t,e){var r=H(t)?da:Cn;return r(t,yr(e))}var f=Bn;function Gn(t,e){var r=[];return Cn(t,function(o,a,i){if(e(o,a,i))r.push(o)}),r}var Nr=Gn;function Un(t,e){var r=H(t)?tt:Nr;return r(t,We(e,3))}var Je=Un;function zn(t,e){return qt(e,function(r){return t[r]})}var Dr=zn;function Wn(t){return t==null?[]:Dr(t,xe(t))}var dt=Wn;var Kn="[object Map]",Hn="[object Set]",qn=Object.prototype,$n=qn.hasOwnProperty;function Yn(t){if(t==null)return!0;if(Oe(t)&&(H(t)||typeof t=="string"||typeof t.splice=="function"||kt(t)||_n(t)||$t(t)))return!t.length;var e=ut(t);if(e==Kn||e==Hn)return!t.size;if(bn(t))return!ur(t).length;for(var r in t)if($n.call(t,r))return!1;return!0}var ht=Yn;function Xn(t){return t===void 0}var _e=Xn;function Zn(t,e,r,o,a){return a(t,function(i,n,s){r=o?(o=!1,i):e(r,i,n,s)}),r}var Rr=Zn;function Jn(t,e,r){var o=H(t)?Ke:Rr,a=arguments.length<3;return o(t,We(e,4),r,a,Cn)}var Yt=Jn;var Qn=1/0,Vn=!(S&&1/B(new S([,-0]))[1]==Qn)?zt:function(t){return new S(t)},Fr=Vn;var ts=200;function es(t,e,r){var o=-1,a=te,i=t.length,n=!0,s=[],p=s;if(r)n=!1,a=Mr;else if(i>=ts){var u=e?null:Fr(t);if(u)return B(u);n=!1,a=nt,p=new ft}else p=e?[]:s;t:while(++o<i){var x=t[o],d=e?e(x):x;if(x=r||x!==0?x:0,n&&d===d){var l=p.length;while(l--)if(p[l]===d)continue t;if(e)p.push(d);s.push(x)}else if(!a(p,d,r)){if(p!==s)p.push(d);s.push(x)}}return s}var Br=es;var rs=vn(function(t){return Br(pr(t,1,wa,!0))}),Ot=rs;var as="\x00",L="\x00",Gr="\x01";class Q{constructor(t={}){if(this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=it(void 0),this._defaultEdgeLabelFn=it(void 0),this._nodes={},this._isCompound)this._parent={},this._children={},this._children[L]={};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(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){if(!Vt(t))t=it(t);return this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return xe(this._nodes)}sources(){var t=this;return Je(this.nodes(),function(e){return ht(t._in[e])})}sinks(){var t=this;return Je(this.nodes(),function(e){return ht(t._out[e])})}setNodes(t,e){var r=arguments,o=this;return f(t,function(a){if(r.length>1)o.setNode(a,e);else o.setNode(a)}),this}setNode(t,e){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){if(arguments.length>1)this._nodes[t]=e;return this}if(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound)this._parent[t]=L,this._children[t]={},this._children[L][t]=!0;return this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var e=(r)=>this.removeEdge(this._edgeObjs[r]);if(delete this._nodes[t],this._isCompound)this._removeFromParentsChildList(t),delete this._parent[t],f(this.children(t),(r)=>{this.setParent(r)}),delete this._children[t];f(xe(this._in[t]),e),delete this._in[t],delete this._preds[t],f(xe(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw Error("Cannot set parent in a non-compound graph");if(_e(e))e=L;else{e+="";for(var r=e;!_e(r);r=this.parent(r))if(r===t)throw Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==L)return e}}children(t){if(_e(t))t=L;if(this._isCompound){var e=this._children[t];if(e)return xe(e)}else if(t===L)return this.nodes();else if(this.hasNode(t))return[]}predecessors(t){var e=this._preds[t];if(e)return xe(e)}successors(t){var e=this._sucs[t];if(e)return xe(e)}neighbors(t){var e=this.predecessors(t);if(e)return Ot(e,this.successors(t))}isLeaf(t){var e;if(this.isDirected())e=this.successors(t);else e=this.neighbors(t);return e.length===0}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var r=this;f(this._nodes,function(i,n){if(t(n))e.setNode(n,i)}),f(this._edgeObjs,function(i){if(e.hasNode(i.v)&&e.hasNode(i.w))e.setEdge(i,r.edge(i))});var o={};function a(i){var n=r.parent(i);if(n===void 0||e.hasNode(n))return o[i]=n,n;else if(n in o)return o[n];else return a(n)}if(this._isCompound)f(e.nodes(),function(i){e.setParent(i,a(i))});return e}setDefaultEdgeLabel(t){if(!Vt(t))t=it(t);return this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return dt(this._edgeObjs)}setPath(t,e){var r=this,o=arguments;return Yt(t,function(a,i){if(o.length>1)r.setEdge(a,i,e);else r.setEdge(a,i);return i}),this}setEdge(){var t,e,r,o,a=!1,i=arguments[0];if(typeof i==="object"&&i!==null&&"v"in i){if(t=i.v,e=i.w,r=i.name,arguments.length===2)o=arguments[1],a=!0}else if(t=i,e=arguments[1],r=arguments[3],arguments.length>2)o=arguments[2],a=!0;if(t=""+t,e=""+e,!_e(r))r=""+r;var n=z(this._isDirected,t,e,r);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n)){if(a)this._edgeLabels[n]=o;return this}if(!_e(r)&&!this._isMultigraph)throw Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[n]=a?o:this._defaultEdgeLabelFn(t,e,r);var s=fs(this._isDirected,t,e,r);return t=s.v,e=s.w,Object.freeze(s),this._edgeObjs[n]=s,Ur(this._preds[e],t),Ur(this._sucs[t],e),this._in[e][n]=s,this._out[t][n]=s,this._edgeCount++,this}edge(t,e,r){var o=arguments.length===1?Tt(this._isDirected,arguments[0]):z(this._isDirected,t,e,r);return this._edgeLabels[o]}hasEdge(t,e,r){var o=arguments.length===1?Tt(this._isDirected,arguments[0]):z(this._isDirected,t,e,r);return Object.prototype.hasOwnProperty.call(this._edgeLabels,o)}removeEdge(t,e,r){var o=arguments.length===1?Tt(this._isDirected,arguments[0]):z(this._isDirected,t,e,r),a=this._edgeObjs[o];if(a)t=a.v,e=a.w,delete this._edgeLabels[o],delete this._edgeObjs[o],Wr(this._preds[e],t),Wr(this._sucs[t],e),delete this._in[e][o],delete this._out[t][o],this._edgeCount--;return this}inEdges(t,e){var r=this._in[t];if(r){var o=dt(r);if(!e)return o;return Je(o,function(a){return a.v===e})}}outEdges(t,e){var r=this._out[t];if(r){var o=dt(r);if(!e)return o;return Je(o,function(a){return a.w===e})}}nodeEdges(t,e){var r=this.inEdges(t,e);if(r)return r.concat(this.outEdges(t,e))}}Q.prototype._nodeCount=0;Q.prototype._edgeCount=0;function Ur(t,e){if(t[e])t[e]++;else t[e]=1}function Wr(t,e){if(!--t[e])delete t[e]}function z(t,e,r,o){var a=""+e,i=""+r;if(!t&&a>i){var n=a;a=i,i=n}return a+Gr+i+Gr+(_e(o)?as:o)}function fs(t,e,r,o){var a=""+e,i=""+r;if(!t&&a>i){var n=a;a=i,i=n}var s={v:a,w:i};if(o)s.name=o;return s}function Tt(t,e){return z(t,e.v,e.w,e.name)}
|
|
1
|
+
import{At}from"./chunk-4bzqrwr0.js";var Z={};At(Z,{default:()=>kt});var V={};At(V,{default:()=>Gt});var Kr=typeof global=="object"&&global&&global.Object===Object&&global,q=Kr;var Hr=typeof self=="object"&&self&&self.Object===Object&&self,qr=q||Hr||Function("return this")(),be=qr;var $r=be.Symbol,Pe=$r;var Pt=Object.prototype,{hasOwnProperty:kr,toString:Yr}=Pt,G=Pe?Pe.toStringTag:void 0;function Xr(t){var e=kr.call(t,G),r=t[G];try{t[G]=void 0;var o=!0}catch(i){}var a=Yr.call(t);if(o)if(e)t[G]=r;else delete t[G];return a}var Ct=Xr;var Zr=Object.prototype,Jr=Zr.toString;function Qr(t){return Jr.call(t)}var Et=Qr;var Vr="[object Null]",to="[object Undefined]",It=Pe?Pe.toStringTag:void 0;function eo(t){if(t==null)return t===void 0?to:Vr;return It&&It in Object(t)?Ct(t):Et(t)}var Qe=eo;function ro(t){return t!=null&&typeof t=="object"}var Te=ro;var oo="[object Symbol]";function ao(t){return typeof t=="symbol"||Te(t)&&Qe(t)==oo}var ct=ao;function fo(t,e){var r=-1,o=t==null?0:t.length,a=Array(o);while(++r<o)a[r]=e(t[r],r,t);return a}var qt=fo;var io=Array.isArray,H=io;var no=1/0,Lt=Pe?Pe.prototype:void 0,jt=Lt?Lt.toString:void 0;function Mt(t){if(typeof t=="string")return t;if(H(t))return qt(t,Mt)+"";if(ct(t))return jt?jt.call(t):"";var e=t+"";return e=="0"&&1/t==-no?"-0":e}var Nt=Mt;function so(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var me=so;function po(t){return t}var at=po;var uo="[object AsyncFunction]",mo="[object Function]",lo="[object GeneratorFunction]",xo="[object Proxy]";function ho(t){if(!me(t))return!1;var e=Qe(t);return e==mo||e==lo||e==uo||e==xo}var Vt=ho;var co=be["__core-js_shared__"],k=co;var Dt=function(){var t=/[^.]+$/.exec(k&&k.keys&&k.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function go(t){return!!Dt&&Dt in t}var Rt=go;var yo=Function.prototype,_o=yo.toString;function bo(t){if(t!=null){try{return _o.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var _=bo;var vo=/[\\^$.*+?()[\]{}|]/g,Oo=/^\[object .+?Constructor\]$/,Ao=Function.prototype,To=Object.prototype,wo=Ao.toString,So=To.hasOwnProperty,Po=RegExp("^"+wo.call(So).replace(vo,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Co(t){if(!me(t)||Rt(t))return!1;var e=Vt(t)?Po:Oo;return e.test(_(t))}var Ft=Co;function Eo(t,e){return t==null?void 0:t[e]}var Bt=Eo;function Io(t,e){var r=Bt(t,e);return Ft(r)?r:void 0}var h=Io;var Lo=h(be,"WeakMap"),Y=Lo;function jo(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var Ut=jo;function Mo(){}var zt=Mo;var No=800,Do=16,Ro=Date.now;function Fo(t){var e=0,r=0;return function(){var o=Ro(),a=Do-(o-r);if(r=o,a>0){if(++e>=No)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Kt=Fo;function Bo(t){return function(){return t}}var it=Bo;var Go=function(){try{var t=h(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),cr=Go;var Uo=!cr?at:function(t,e){return cr(t,"toString",{configurable:!0,enumerable:!1,value:it(e),writable:!0})},Xt=Uo;var zo=Kt(Xt),ua=zo;function Wo(t,e){var r=-1,o=t==null?0:t.length;while(++r<o)if(e(t[r],r,t)===!1)break;return t}var da=Wo;function Ko(t,e,r,o){var a=t.length,i=r+(o?1:-1);while(o?i--:++i<a)if(e(t[i],i,t))return i;return-1}var pa=Ko;function Ho(t){return t!==t}var Zt=Ho;function qo(t,e,r){var o=r-1,a=t.length;while(++o<a)if(t[o]===e)return o;return-1}var Jt=qo;function $o(t,e,r){return e===e?Jt(t,e,r):pa(t,Zt,r)}var Qt=$o;function ko(t,e){var r=t==null?0:t.length;return!!r&&Qt(t,e,0)>-1}var te=ko;var Yo=9007199254740991,Xo=/^(?:0|[1-9]\d*)$/;function Zo(t,e){var r=typeof t;return e=e==null?Yo:e,!!e&&(r=="number"||r!="symbol"&&Xo.test(t))&&(t>-1&&t%1==0&&t<e)}var yn=Zo;function Jo(t,e){return t===e||t!==t&&e!==e}var wt=Jo;var ee=Math.max;function Qo(t,e,r){return e=ee(e===void 0?t.length-1:e,0),function(){var o=arguments,a=-1,i=ee(o.length-e,0),n=Array(i);while(++a<i)n[a]=o[e+a];a=-1;var s=Array(e+1);while(++a<e)s[a]=o[a];return s[e]=r(n),Ut(t,this,s)}}var ma=Qo;function Vo(t,e){return ua(ma(t,e,at),t+"")}var vn=Vo;var ta=9007199254740991;function ea(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ta}var j=ea;function ra(t){return t!=null&&j(t.length)&&!Vt(t)}var Oe=ra;var oa=Object.prototype;function aa(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||oa;return t===r}var bn=aa;function ia(t,e){var r=-1,o=Array(t);while(++r<t)o[r]=e(r);return o}var re=ia;var na="[object Arguments]";function sa(t){return Te(t)&&Qe(t)==na}var gt=sa;var oe=Object.prototype,{hasOwnProperty:la,propertyIsEnumerable:ca}=oe,Oa=gt(function(){return arguments}())?gt:function(t){return Te(t)&&la.call(t,"callee")&&!ca.call(t,"callee")},$t=Oa;function Aa(){return!1}var ae=Aa;var ne=typeof Z=="object"&&Z&&!Z.nodeType&&Z,fe=ne&&typeof X=="object"&&X&&!X.nodeType&&X,Ta=fe&&fe.exports===ne,ie=Ta?be.Buffer:void 0,Sa=ie?ie.isBuffer:void 0,Pa=Sa||ae,kt=Pa;var Ca="[object Arguments]",Ea="[object Array]",Ia="[object Boolean]",La="[object Date]",ja="[object Error]",Ma="[object Function]",Na="[object Map]",Da="[object Number]",Ra="[object Object]",Fa="[object RegExp]",Ba="[object Set]",Ga="[object String]",Ua="[object WeakMap]",za="[object ArrayBuffer]",Wa="[object DataView]",Ka="[object Float32Array]",Ha="[object Float64Array]",qa="[object Int8Array]",$a="[object Int16Array]",ka="[object Int32Array]",Ya="[object Uint8Array]",Xa="[object Uint8ClampedArray]",Za="[object Uint16Array]",Ja="[object Uint32Array]",m={};m[Ka]=m[Ha]=m[qa]=m[$a]=m[ka]=m[Ya]=m[Xa]=m[Za]=m[Ja]=!0;m[Ca]=m[Ea]=m[za]=m[Ia]=m[Wa]=m[La]=m[ja]=m[Ma]=m[Na]=m[Da]=m[Ra]=m[Fa]=m[Ba]=m[Ga]=m[Ua]=!1;function Qa(t){return Te(t)&&j(t.length)&&!!m[Qe(t)]}var se=Qa;function Va(t){return function(e){return t(e)}}var xn=Va;var pe=typeof V=="object"&&V&&!V.nodeType&&V,U=pe&&typeof J=="object"&&J&&!J.nodeType&&J,tf=U&&U.exports===pe,yt=tf&&q.process,ef=function(){try{var t=U&&U.require&&U.require("util").types;if(t)return t;return yt&&yt.binding&&yt.binding("util")}catch(e){}}(),Gt=ef;var ue=Gt&&Gt.isTypedArray,rf=ue?xn(ue):se,_n=rf;var of=Object.prototype,af=of.hasOwnProperty;function ff(t,e){var r=H(t),o=!r&&$t(t),a=!r&&!o&&kt(t),i=!r&&!o&&!a&&_n(t),n=r||o||a||i,s=n?re(t.length,String):[],p=s.length;for(var u in t)if((e||af.call(t,u))&&!(n&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||yn(u,p))))s.push(u);return s}var fa=ff;function nf(t,e){return function(r){return t(e(r))}}var ha=nf;var sf=ha(Object.keys,Object),le=sf;var pf=Object.prototype,uf=pf.hasOwnProperty;function mf(t){if(!bn(t))return le(t);var e=[];for(var r in Object(t))if(uf.call(t,r)&&r!="constructor")e.push(r);return e}var ur=mf;function lf(t){return Oe(t)?fa(t):ur(t)}var xe=lf;var df=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xf=/^\w*$/;function hf(t,e){if(H(t))return!1;var r=typeof t;if(r=="number"||r=="symbol"||r=="boolean"||t==null||ct(t))return!0;return xf.test(t)||!df.test(t)||e!=null&&t in Object(e)}var M=hf;var cf=h(Object,"create"),b=cf;function gf(){this.__data__=b?b(null):{},this.size=0}var de=gf;function yf(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var he=yf;var _f="__lodash_hash_undefined__",bf=Object.prototype,vf=bf.hasOwnProperty;function Of(t){var e=this.__data__;if(b){var r=e[t];return r===_f?void 0:r}return vf.call(e,t)?e[t]:void 0}var ce=Of;var Af=Object.prototype,Tf=Af.hasOwnProperty;function wf(t){var e=this.__data__;return b?e[t]!==void 0:Tf.call(e,t)}var ge=wf;var Sf="__lodash_hash_undefined__";function Pf(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=b&&e===void 0?Sf:e,this}var ye=Pf;function N(t){var e=-1,r=t==null?0:t.length;this.clear();while(++e<r){var o=t[e];this.set(o[0],o[1])}}N.prototype.clear=de;N.prototype.delete=he;N.prototype.get=ce;N.prototype.has=ge;N.prototype.set=ye;var _t=N;function Cf(){this.__data__=[],this.size=0}var ve=Cf;function Ef(t,e){var r=t.length;while(r--)if(wt(t[r][0],e))return r;return-1}var O=Ef;var If=Array.prototype,Lf=If.splice;function jf(t){var e=this.__data__,r=O(e,t);if(r<0)return!1;var o=e.length-1;if(r==o)e.pop();else Lf.call(e,r,1);return--this.size,!0}var Ae=jf;function Mf(t){var e=this.__data__,r=O(e,t);return r<0?void 0:e[r][1]}var we=Mf;function Nf(t){return O(this.__data__,t)>-1}var Se=Nf;function Df(t,e){var r=this.__data__,o=O(r,t);if(o<0)++this.size,r.push([t,e]);else r[o][1]=e;return this}var Ce=Df;function D(t){var e=-1,r=t==null?0:t.length;this.clear();while(++e<r){var o=t[e];this.set(o[0],o[1])}}D.prototype.clear=ve;D.prototype.delete=Ae;D.prototype.get=we;D.prototype.has=Se;D.prototype.set=Ce;var A=D;var Rf=h(be,"Map"),T=Rf;function Ff(){this.size=0,this.__data__={hash:new _t,map:new(T||A),string:new _t}}var Ee=Ff;function Bf(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var Ie=Bf;function Gf(t,e){var r=t.__data__;return Ie(e)?r[typeof e=="string"?"string":"hash"]:r.map}var w=Gf;function Uf(t){var e=w(this,t).delete(t);return this.size-=e?1:0,e}var Le=Uf;function zf(t){return w(this,t).get(t)}var je=zf;function Wf(t){return w(this,t).has(t)}var Me=Wf;function Kf(t,e){var r=w(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}var Ne=Kf;function R(t){var e=-1,r=t==null?0:t.length;this.clear();while(++e<r){var o=t[e];this.set(o[0],o[1])}}R.prototype.clear=Ee;R.prototype.delete=Le;R.prototype.get=je;R.prototype.has=Me;R.prototype.set=Ne;var E=R;var Hf="Expected a function";function bt(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw TypeError(Hf);var r=function(){var o=arguments,a=e?e.apply(this,o):o[0],i=r.cache;if(i.has(a))return i.get(a);var n=t.apply(this,o);return r.cache=i.set(a,n)||i,n};return r.cache=new(bt.Cache||E),r}bt.Cache=E;var De=bt;var qf=500;function $f(t){var e=De(t,function(o){if(r.size===qf)r.clear();return o}),r=e.cache;return e}var Re=$f;var kf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yf=/\\(\\)?/g,Xf=Re(function(t){var e=[];if(t.charCodeAt(0)===46)e.push("");return t.replace(kf,function(r,o,a,i){e.push(a?i.replace(Yf,"$1"):o||r)}),e}),Fe=Xf;function Zf(t){return t==null?"":Nt(t)}var ga=Zf;function Jf(t,e){if(H(t))return t;return M(t,e)?[t]:Fe(ga(t))}var wn=Jf;var Qf=1/0;function Vf(t){if(typeof t=="string"||ct(t))return t;var e=t+"";return e=="0"&&1/t==-Qf?"-0":e}var Wt=Vf;function ti(t,e){e=wn(e,t);var r=0,o=e.length;while(t!=null&&r<o)t=t[Wt(e[r++])];return r&&r==o?t:void 0}var kn=ti;function ei(t,e,r){var o=t==null?void 0:kn(t,e);return o===void 0?r:o}var Be=ei;function ri(t,e){var r=-1,o=e.length,a=t.length;while(++r<o)t[a+r]=e[r];return t}var dr=ri;var Ge=Pe?Pe.isConcatSpreadable:void 0;function oi(t){return H(t)||$t(t)||!!(Ge&&t&&t[Ge])}var Ue=oi;function ze(t,e,r,o,a){var i=-1,n=t.length;r||(r=Ue),a||(a=[]);while(++i<n){var s=t[i];if(e>0&&r(s))if(e>1)ze(s,e-1,r,o,a);else dr(a,s);else if(!o)a[a.length]=s}return a}var pr=ze;function ai(t,e,r,o){var a=-1,i=t==null?0:t.length;if(o&&i)r=t[++a];while(++a<i)r=e(r,t[a],a,t);return r}var Ke=ai;function fi(){this.__data__=new A,this.size=0}var He=fi;function ii(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}var qe=ii;function ni(t){return this.__data__.get(t)}var $e=ni;function si(t){return this.__data__.has(t)}var ke=si;var pi=200;function ui(t,e){var r=this.__data__;if(r instanceof A){var o=r.__data__;if(!T||o.length<pi-1)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new E(o)}return r.set(t,e),this.size=r.size,this}var Ye=ui;function F(t){var e=this.__data__=new A(t);this.size=e.size}F.prototype.clear=He;F.prototype.delete=qe;F.prototype.get=$e;F.prototype.has=ke;F.prototype.set=Ye;var Ht=F;function mi(t,e){var r=-1,o=t==null?0:t.length,a=0,i=[];while(++r<o){var n=t[r];if(e(n,r,t))i[a++]=n}return i}var tt=mi;function li(){return[]}var ya=li;var di=Object.prototype,xi=di.propertyIsEnumerable,Xe=Object.getOwnPropertySymbols,hi=!Xe?ya:function(t){if(t==null)return[];return t=Object(t),tt(Xe(t),function(e){return xi.call(t,e)})},mr=hi;function ci(t,e,r){var o=e(t);return H(t)?o:dr(o,r(t))}var va=ci;function gi(t){return va(t,xe,mr)}var zr=gi;var yi=h(be,"DataView"),et=yi;var _i=h(be,"Promise"),rt=_i;var bi=h(be,"Set"),S=bi;var Ze="[object Map]",vi="[object Object]",Ve="[object Promise]",tr="[object Set]",er="[object WeakMap]",rr="[object DataView]",Oi=_(et),Ai=_(T),Ti=_(rt),wi=_(S),Si=_(Y),I=Qe;if(et&&I(new et(new ArrayBuffer(1)))!=rr||T&&I(new T)!=Ze||rt&&I(rt.resolve())!=Ve||S&&I(new S)!=tr||Y&&I(new Y)!=er)I=function(t){var e=Qe(t),r=e==vi?t.constructor:void 0,o=r?_(r):"";if(o)switch(o){case Oi:return rr;case Ai:return Ze;case Ti:return Ve;case wi:return tr;case Si:return er}return e};var ut=I;var Pi=be.Uint8Array,fr=Pi;var Ci="__lodash_hash_undefined__";function Ei(t){return this.__data__.set(t,Ci),this}var or=Ei;function Ii(t){return this.__data__.has(t)}var ar=Ii;function ot(t){var e=-1,r=t==null?0:t.length;this.__data__=new E;while(++e<r)this.add(t[e])}ot.prototype.add=ot.prototype.push=or;ot.prototype.has=ar;var ft=ot;function Li(t,e){var r=-1,o=t==null?0:t.length;while(++r<o)if(e(t[r],r,t))return!0;return!1}var ir=Li;function ji(t,e){return t.has(e)}var nt=ji;var Mi=1,Ni=2;function Di(t,e,r,o,a,i){var n=r&Mi,s=t.length,p=e.length;if(s!=p&&!(n&&p>s))return!1;var u=i.get(t),x=i.get(e);if(u&&x)return u==e&&x==t;var d=-1,l=!0,y=r&Ni?new ft:void 0;i.set(t,e),i.set(e,t);while(++d<s){var c=t[d],g=e[d];if(o)var v=n?o(g,c,d,e,t,i):o(c,g,d,t,e,i);if(v!==void 0){if(v)continue;l=!1;break}if(y){if(!ir(e,function(P,C){if(!nt(y,C)&&(c===P||a(c,P,r,o,i)))return y.push(C)})){l=!1;break}}else if(!(c===g||a(c,g,r,o,i))){l=!1;break}}return i.delete(t),i.delete(e),l}var st=Di;function Ri(t){var e=-1,r=Array(t.size);return t.forEach(function(o,a){r[++e]=[a,o]}),r}var nr=Ri;function Fi(t){var e=-1,r=Array(t.size);return t.forEach(function(o){r[++e]=o}),r}var B=Fi;var Bi=1,Gi=2,Ui="[object Boolean]",zi="[object Date]",Wi="[object Error]",Ki="[object Map]",Hi="[object Number]",qi="[object RegExp]",$i="[object Set]",ki="[object String]",Yi="[object Symbol]",Xi="[object ArrayBuffer]",Zi="[object DataView]",sr=Pe?Pe.prototype:void 0,vt=sr?sr.valueOf:void 0;function Ji(t,e,r,o,a,i,n){switch(r){case Zi:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Xi:if(t.byteLength!=e.byteLength||!i(new fr(t),new fr(e)))return!1;return!0;case Ui:case zi:case Hi:return wt(+t,+e);case Wi:return t.name==e.name&&t.message==e.message;case qi:case ki:return t==e+"";case Ki:var s=nr;case $i:var p=o&Bi;if(s||(s=B),t.size!=e.size&&!p)return!1;var u=n.get(t);if(u)return u==e;o|=Gi,n.set(t,e);var x=st(s(t),s(e),o,a,i,n);return n.delete(t),x;case Yi:if(vt)return vt.call(t)==vt.call(e)}return!1}var lr=Ji;var Qi=1,Vi=Object.prototype,tn=Vi.hasOwnProperty;function en(t,e,r,o,a,i){var n=r&Qi,s=zr(t),p=s.length,u=zr(e),x=u.length;if(p!=x&&!n)return!1;var d=p;while(d--){var l=s[d];if(!(n?l in e:tn.call(e,l)))return!1}var y=i.get(t),c=i.get(e);if(y&&c)return y==e&&c==t;var g=!0;i.set(t,e),i.set(e,t);var v=n;while(++d<p){l=s[d];var P=t[l],C=e[l];if(o)var St=n?o(C,P,l,e,t,i):o(P,C,l,t,e,i);if(!(St===void 0?P===C||a(P,C,r,o,i):St)){g=!1;break}v||(v=l=="constructor")}if(g&&!v){var W=t.constructor,K=e.constructor;if(W!=K&&(("constructor"in t)&&("constructor"in e))&&!(typeof W=="function"&&W instanceof W&&typeof K=="function"&&K instanceof K))g=!1}return i.delete(t),i.delete(e),g}var xr=en;var rn=1,_r="[object Arguments]",br="[object Array]",pt="[object Object]",on=Object.prototype,vr=on.hasOwnProperty;function an(t,e,r,o,a,i){var n=H(t),s=H(e),p=n?br:ut(t),u=s?br:ut(e);p=p==_r?pt:p,u=u==_r?pt:u;var x=p==pt,d=u==pt,l=p==u;if(l&&kt(t)){if(!kt(e))return!1;n=!0,x=!1}if(l&&!x)return i||(i=new Ht),n||_n(t)?st(t,e,r,o,a,i):lr(t,e,p,r,o,a,i);if(!(r&rn)){var y=x&&vr.call(t,"__wrapped__"),c=d&&vr.call(e,"__wrapped__");if(y||c){var g=y?t.value():t,v=c?e.value():e;return i||(i=new Ht),a(g,v,r,o,i)}}if(!l)return!1;return i||(i=new Ht),xr(t,e,r,o,a,i)}var Or=an;function Ar(t,e,r,o,a){if(t===e)return!0;if(t==null||e==null||!Te(t)&&!Te(e))return t!==t&&e!==e;return Or(t,e,r,o,Ar,a)}var mt=Ar;var fn=1,nn=2;function sn(t,e,r,o){var a=r.length,i=a,n=!o;if(t==null)return!i;t=Object(t);while(a--){var s=r[a];if(n&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}while(++a<i){s=r[a];var p=s[0],u=t[p],x=s[1];if(n&&s[2]){if(u===void 0&&!(p in t))return!1}else{var d=new Ht;if(o)var l=o(u,x,p,t,e,d);if(!(l===void 0?mt(x,u,fn|nn,o,d):l))return!1}}return!0}var Tr=sn;function pn(t){return t===t&&!me(t)}var lt=pn;function un(t){var e=xe(t),r=e.length;while(r--){var o=e[r],a=t[o];e[r]=[o,a,lt(a)]}return e}var wr=un;function mn(t,e){return function(r){if(r==null)return!1;return r[t]===e&&(e!==void 0||(t in Object(r)))}}var xt=mn;function ln(t){var e=wr(t);if(e.length==1&&e[0][2])return xt(e[0][0],e[0][1]);return function(r){return r===t||Tr(r,t,e)}}var Sr=ln;function dn(t,e){return t!=null&&e in Object(t)}var Pr=dn;function hn(t,e,r){e=wn(e,t);var o=-1,a=e.length,i=!1;while(++o<a){var n=Wt(e[o]);if(!(i=t!=null&&r(t,n)))break;t=t[n]}if(i||++o!=a)return i;return a=t==null?0:t.length,!!a&&j(a)&&yn(n,a)&&(H(t)||$t(t))}var ba=hn;function cn(t,e){return t!=null&&ba(t,e,Pr)}var xa=cn;var gn=1,On=2;function An(t,e){if(M(t)&<(e))return xt(Wt(t),e);return function(r){var o=Be(r,t);return o===void 0&&o===e?xa(r,t):mt(e,o,gn|On)}}var Cr=An;function Tn(t){return function(e){return e==null?void 0:e[t]}}var _a=Tn;function Sn(t){return function(e){return kn(e,t)}}var Er=Sn;function Pn(t){return M(t)?_a(Wt(t)):Er(t)}var Ir=Pn;function En(t){if(typeof t=="function")return t;if(t==null)return at;if(typeof t=="object")return H(t)?Cr(t[0],t[1]):Sr(t);return Ir(t)}var We=En;function In(t){return function(e,r,o){var a=-1,i=Object(e),n=o(e),s=n.length;while(s--){var p=n[t?s:++a];if(r(i[p],p,i)===!1)break}return e}}var Lr=In;var Ln=Lr(),hr=Ln;function jn(t,e){return t&&hr(t,e,xe)}var gr=jn;function Mn(t,e){return function(r,o){if(r==null)return r;if(!Oe(r))return t(r,o);var a=r.length,i=e?a:-1,n=Object(r);while(e?i--:++i<a)if(o(n[i],i,n)===!1)break;return r}}var jr=Mn;var Nn=jr(gr),Cn=Nn;function Dn(t){return Te(t)&&Oe(t)}var wa=Dn;function Rn(t,e,r){var o=-1,a=t==null?0:t.length;while(++o<a)if(r(e,t[o]))return!0;return!1}var Mr=Rn;function Fn(t){return typeof t=="function"?t:at}var yr=Fn;function Bn(t,e){var r=H(t)?da:Cn;return r(t,yr(e))}var f=Bn;function Gn(t,e){var r=[];return Cn(t,function(o,a,i){if(e(o,a,i))r.push(o)}),r}var Nr=Gn;function Un(t,e){var r=H(t)?tt:Nr;return r(t,We(e,3))}var Je=Un;function zn(t,e){return qt(e,function(r){return t[r]})}var Dr=zn;function Wn(t){return t==null?[]:Dr(t,xe(t))}var dt=Wn;var Kn="[object Map]",Hn="[object Set]",qn=Object.prototype,$n=qn.hasOwnProperty;function Yn(t){if(t==null)return!0;if(Oe(t)&&(H(t)||typeof t=="string"||typeof t.splice=="function"||kt(t)||_n(t)||$t(t)))return!t.length;var e=ut(t);if(e==Kn||e==Hn)return!t.size;if(bn(t))return!ur(t).length;for(var r in t)if($n.call(t,r))return!1;return!0}var ht=Yn;function Xn(t){return t===void 0}var _e=Xn;function Zn(t,e,r,o,a){return a(t,function(i,n,s){r=o?(o=!1,i):e(r,i,n,s)}),r}var Rr=Zn;function Jn(t,e,r){var o=H(t)?Ke:Rr,a=arguments.length<3;return o(t,We(e,4),r,a,Cn)}var Yt=Jn;var Qn=1/0,Vn=!(S&&1/B(new S([,-0]))[1]==Qn)?zt:function(t){return new S(t)},Fr=Vn;var ts=200;function es(t,e,r){var o=-1,a=te,i=t.length,n=!0,s=[],p=s;if(r)n=!1,a=Mr;else if(i>=ts){var u=e?null:Fr(t);if(u)return B(u);n=!1,a=nt,p=new ft}else p=e?[]:s;t:while(++o<i){var x=t[o],d=e?e(x):x;if(x=r||x!==0?x:0,n&&d===d){var l=p.length;while(l--)if(p[l]===d)continue t;if(e)p.push(d);s.push(x)}else if(!a(p,d,r)){if(p!==s)p.push(d);s.push(x)}}return s}var Br=es;var rs=vn(function(t){return Br(pr(t,1,wa,!0))}),Ot=rs;var as="\x00",L="\x00",Gr="\x01";class Q{constructor(t={}){if(this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=it(void 0),this._defaultEdgeLabelFn=it(void 0),this._nodes={},this._isCompound)this._parent={},this._children={},this._children[L]={};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(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){if(!Vt(t))t=it(t);return this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return xe(this._nodes)}sources(){var t=this;return Je(this.nodes(),function(e){return ht(t._in[e])})}sinks(){var t=this;return Je(this.nodes(),function(e){return ht(t._out[e])})}setNodes(t,e){var r=arguments,o=this;return f(t,function(a){if(r.length>1)o.setNode(a,e);else o.setNode(a)}),this}setNode(t,e){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){if(arguments.length>1)this._nodes[t]=e;return this}if(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound)this._parent[t]=L,this._children[t]={},this._children[L][t]=!0;return this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var e=(r)=>this.removeEdge(this._edgeObjs[r]);if(delete this._nodes[t],this._isCompound)this._removeFromParentsChildList(t),delete this._parent[t],f(this.children(t),(r)=>{this.setParent(r)}),delete this._children[t];f(xe(this._in[t]),e),delete this._in[t],delete this._preds[t],f(xe(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw Error("Cannot set parent in a non-compound graph");if(_e(e))e=L;else{e+="";for(var r=e;!_e(r);r=this.parent(r))if(r===t)throw Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==L)return e}}children(t){if(_e(t))t=L;if(this._isCompound){var e=this._children[t];if(e)return xe(e)}else if(t===L)return this.nodes();else if(this.hasNode(t))return[]}predecessors(t){var e=this._preds[t];if(e)return xe(e)}successors(t){var e=this._sucs[t];if(e)return xe(e)}neighbors(t){var e=this.predecessors(t);if(e)return Ot(e,this.successors(t))}isLeaf(t){var e;if(this.isDirected())e=this.successors(t);else e=this.neighbors(t);return e.length===0}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var r=this;f(this._nodes,function(i,n){if(t(n))e.setNode(n,i)}),f(this._edgeObjs,function(i){if(e.hasNode(i.v)&&e.hasNode(i.w))e.setEdge(i,r.edge(i))});var o={};function a(i){var n=r.parent(i);if(n===void 0||e.hasNode(n))return o[i]=n,n;else if(n in o)return o[n];else return a(n)}if(this._isCompound)f(e.nodes(),function(i){e.setParent(i,a(i))});return e}setDefaultEdgeLabel(t){if(!Vt(t))t=it(t);return this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return dt(this._edgeObjs)}setPath(t,e){var r=this,o=arguments;return Yt(t,function(a,i){if(o.length>1)r.setEdge(a,i,e);else r.setEdge(a,i);return i}),this}setEdge(){var t,e,r,o,a=!1,i=arguments[0];if(typeof i==="object"&&i!==null&&"v"in i){if(t=i.v,e=i.w,r=i.name,arguments.length===2)o=arguments[1],a=!0}else if(t=i,e=arguments[1],r=arguments[3],arguments.length>2)o=arguments[2],a=!0;if(t=""+t,e=""+e,!_e(r))r=""+r;var n=z(this._isDirected,t,e,r);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n)){if(a)this._edgeLabels[n]=o;return this}if(!_e(r)&&!this._isMultigraph)throw Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[n]=a?o:this._defaultEdgeLabelFn(t,e,r);var s=fs(this._isDirected,t,e,r);return t=s.v,e=s.w,Object.freeze(s),this._edgeObjs[n]=s,Ur(this._preds[e],t),Ur(this._sucs[t],e),this._in[e][n]=s,this._out[t][n]=s,this._edgeCount++,this}edge(t,e,r){var o=arguments.length===1?Tt(this._isDirected,arguments[0]):z(this._isDirected,t,e,r);return this._edgeLabels[o]}hasEdge(t,e,r){var o=arguments.length===1?Tt(this._isDirected,arguments[0]):z(this._isDirected,t,e,r);return Object.prototype.hasOwnProperty.call(this._edgeLabels,o)}removeEdge(t,e,r){var o=arguments.length===1?Tt(this._isDirected,arguments[0]):z(this._isDirected,t,e,r),a=this._edgeObjs[o];if(a)t=a.v,e=a.w,delete this._edgeLabels[o],delete this._edgeObjs[o],Wr(this._preds[e],t),Wr(this._sucs[t],e),delete this._in[e][o],delete this._out[t][o],this._edgeCount--;return this}inEdges(t,e){var r=this._in[t];if(r){var o=dt(r);if(!e)return o;return Je(o,function(a){return a.v===e})}}outEdges(t,e){var r=this._out[t];if(r){var o=dt(r);if(!e)return o;return Je(o,function(a){return a.w===e})}}nodeEdges(t,e){var r=this.inEdges(t,e);if(r)return r.concat(this.outEdges(t,e))}}Q.prototype._nodeCount=0;Q.prototype._edgeCount=0;function Ur(t,e){if(t[e])t[e]++;else t[e]=1}function Wr(t,e){if(!--t[e])delete t[e]}function z(t,e,r,o){var a=""+e,i=""+r;if(!t&&a>i){var n=a;a=i,i=n}return a+Gr+i+Gr+(_e(o)?as:o)}function fs(t,e,r,o){var a=""+e,i=""+r;if(!t&&a>i){var n=a;a=i,i=n}var s={v:a,w:i};if(o)s.name=o;return s}function Tt(t,e){return z(t,e.v,e.w,e.name)}
|
|
2
2
|
export{be,Pe,Qe,Te,ct,qt,H,me,at,Vt,it,cr,ua,da,pa,yn,wt,ma,vn,Oe,bn,$t,kt,xn,Gt,_n,fa,ha,ur,xe,ga,wn,Wt,kn,dr,pr,Ht,ya,mr,va,zr,ut,fr,ba,xa,_a,We,hr,gr,Cn,wa,yr,f,Je,dt,_e,Yt,Q};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e,r}from"./chunk-
|
|
1
|
+
import{e,r}from"./chunk-wvdehm9y.js";import{K,It,Rt}from"./chunk-344bq59c.js";import{W}from"./chunk-y56aaba5.js";import{rr,_t}from"./chunk-aqfpnhmt.js";var o=rr().Railroad.parser.LangiumParser,n=e((a)=>{switch(a.$type){case"RailroadTerminalExpr":return{type:"terminal",value:a.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:a.name};case"RailroadSpecialExpr":return{type:"special",text:a.text};case"RailroadSequenceExpr":{let t=a.elements.map(n);return t.length===1?t[0]:{type:"sequence",elements:t}}case"RailroadChoiceExpr":{let t=a.alternatives.map(n);return t.length===1?t[0]:{type:"choice",alternatives:t}}case"RailroadOptionalExpr":return{type:"optional",element:n(a.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:n(a.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:n(a.element),min:0,max:1/0};default:throw Error(`Unsupported railroad expression: ${a.$type}`)}},"transformExpression"),l=e((a)=>({name:a.name,definition:n(a.definition)}),"transformRule"),s=e((a)=>{if(W(a,K),a.title)K.setTitle(a.title);a.rules.map((t)=>K.addRule(l(t)))},"populateDb"),m={parse:e((a)=>{K.clear(),r.debug("[Railroad Parser] Starting Langium parse");let t=o.parse(a);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new _t(t);let i=t.value;r.debug("[Railroad Parser] Parsed rules:",i.rules.length),s(i),r.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:K}},R={parser:m,db:K,renderer:Rt,styles:It};export{R as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e,r,le,Le,y,C,S,E,T,A,I,L,s,an,Tn,p,et,tt,N,Fe,ce,ae,ie,Ye,Dr,ge,ye}from"./chunk-
|
|
1
|
+
import{e,r,le,Le,y,C,S,E,T,A,I,L,s,an,Tn,p,et,tt,N,Fe,ce,ae,ie,Ye,Dr,ge,ye}from"./chunk-wvdehm9y.js";import{Pt}from"./chunk-rvrf0f3h.js";import{je}from"./chunk-0b47eyrf.js";import{Ot}from"./chunk-cjfssg3m.js";import{he}from"./chunk-bhsaj6qq.js";import{se}from"./chunk-p0kvmf28.js";var A1="flowchart-",m1=class{constructor(){this.vertexCounter=0,this.config=s(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=S,this.setAccDescription=T,this.setDiagramTitle=I,this.getAccTitle=E,this.getAccDescription=A,this.getDiagramTitle=L,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{e(this,"FlowDB")}sanitizeText(t){return y.sanitizeText(t,this.config)}sanitizeNodeLabelType(t){switch(t){case"markdown":case"string":case"text":return t;default:return"markdown"}}setDiagramId(t){this.diagramId=t}lookUpDomId(t){for(let n of this.vertices.values())if(n.id===t)return this.diagramId?`${this.diagramId}-${n.domId}`:n.domId;return this.diagramId?`${this.diagramId}-${t}`:t}addVertex(t,n,u,o,c,g,d={},D){if(!t||t.trim().length===0)return;let f;if(D!==void 0){let _;if(!D.includes(`
|
|
2
2
|
`))_=`{
|
|
3
3
|
`+D+`
|
|
4
4
|
}`;else _=D+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{hn}from"./chunk-7ba8vrfc.js";import{W}from"./chunk-89fkdgbp.js";import{e,r,D,b,y,C,S,E,T,A,I,L,s,wr,p,Ui,U,N}from"./chunk-vymqrpm3.js";import{X}from"./chunk-n8gfjj9a.js";var v={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Ce=D.gitGraph,J=e(()=>U({...Ce,...b().gitGraph}),"getConfig"),m=new hn(()=>{let t=J(),{mainBranchName:a,mainBranchOrder:o}=t;return{mainBranchName:a,commits:new Map,head:null,branchConfig:new Map([[a,{name:a,order:o}]]),branches:new Map([[a,null]]),currBranch:a,direction:"LR",seq:0,options:{}}});function ne(){return Ui({length:7})}e(ne,"getID");function pe(t,a){let o=Object.create(null);return t.reduce((i,d)=>{let l=a(d);if(!o[l])o[l]=!0,i.push(d);return i},[])}e(pe,"uniqBy");var ve=e(function(t){m.records.direction=t},"setDirection"),Ee=e(function(t){r.debug("options str",t),t=t?.trim(),t=t||"{}";try{m.records.options=JSON.parse(t)}catch(a){r.error("error while parsing gitGraph options",a.message)}},"setOptions"),Te=e(function(){return m.records.options},"getOptions"),Le=e(function(t){let{msg:a,id:o,type:i,tags:d}=t;r.info("commit",a,o,i,d),r.debug("Entering commit:",a,o,i,d);let l=J();o=y.sanitizeText(o,l),a=y.sanitizeText(a,l),d=d?.map((n)=>y.sanitizeText(n,l));let c={id:o?o:m.records.seq+"-"+ne(),message:a,seq:m.records.seq++,type:i??v.NORMAL,tags:d??[],parents:m.records.head==null?[]:[m.records.head.id],branch:m.records.currBranch};if(m.records.head=c,r.info("main branch",l.mainBranchName),m.records.commits.has(c.id))r.warn(`Commit ID ${c.id} already exists`);m.records.commits.set(c.id,c),m.records.branches.set(m.records.currBranch,c.id),r.debug("in pushCommit "+c.id)},"commit"),Me=e(function(t){let{name:a,order:o}=t;if(a=y.sanitizeText(a,J()),m.records.branches.has(a))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${a}")`);m.records.branches.set(a,m.records.head!=null?m.records.head.id:null),m.records.branchConfig.set(a,{name:a,order:o}),ye(a),r.debug("in createBranch")},"branch"),Pe=e((t)=>{let{branch:a,id:o,type:i,tags:d}=t,l=J();if(a=y.sanitizeText(a,l),o)o=y.sanitizeText(o,l);let c=m.records.branches.get(m.records.currBranch),n=m.records.branches.get(a),g=c?m.records.commits.get(c):void 0,x=n?m.records.commits.get(n):void 0;if(g&&x&&g.branch===a)throw Error(`Cannot merge branch '${a}' into itself.`);if(m.records.currBranch===a){let h=Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw h.hash={text:`merge ${a}`,token:`merge ${a}`,expected:["branch abc"]},h}if(g===void 0||!g){let h=Error(`Incorrect usage of "merge". Current branch (${m.records.currBranch})has no commits`);throw h.hash={text:`merge ${a}`,token:`merge ${a}`,expected:["commit"]},h}if(!m.records.branches.has(a)){let h=Error('Incorrect usage of "merge". Branch to be merged ('+a+") does not exist");throw h.hash={text:`merge ${a}`,token:`merge ${a}`,expected:[`branch ${a}`]},h}if(x===void 0||!x){let h=Error('Incorrect usage of "merge". Branch to be merged ('+a+") has no commits");throw h.hash={text:`merge ${a}`,token:`merge ${a}`,expected:['"commit"']},h}if(g===x){let h=Error('Incorrect usage of "merge". Both branches have same head');throw h.hash={text:`merge ${a}`,token:`merge ${a}`,expected:["branch abc"]},h}if(o&&m.records.commits.has(o)){let h=Error('Incorrect usage of "merge". Commit with id:'+o+" already exists, use different custom id");throw h.hash={text:`merge ${a} ${o} ${i} ${d?.join(" ")}`,token:`merge ${a} ${o} ${i} ${d?.join(" ")}`,expected:[`merge ${a} ${o}_UNIQUE ${i} ${d?.join(" ")}`]},h}let u=n?n:"",f={id:o||`${m.records.seq}-${ne()}`,message:`merged branch ${a} into ${m.records.currBranch}`,seq:m.records.seq++,parents:m.records.head==null?[]:[m.records.head.id,u],branch:m.records.currBranch,type:v.MERGE,customType:i,customId:o?!0:!1,tags:d??[]};m.records.head=f,m.records.commits.set(f.id,f),m.records.branches.set(m.records.currBranch,f.id),r.debug(m.records.branches),r.debug("in mergeBranch")},"merge"),Re=e(function(t){let{id:a,targetId:o,tags:i,parent:d}=t;r.debug("Entering cherryPick:",a,o,i);let l=J();if(a=y.sanitizeText(a,l),o=y.sanitizeText(o,l),i=i?.map((g)=>y.sanitizeText(g,l)),d=y.sanitizeText(d,l),!a||!m.records.commits.has(a)){let g=Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw g.hash={text:`cherryPick ${a} ${o}`,token:`cherryPick ${a} ${o}`,expected:["cherry-pick abc"]},g}let c=m.records.commits.get(a);if(c===void 0||!c)throw Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(d&&!(Array.isArray(c.parents)&&c.parents.includes(d)))throw Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let n=c.branch;if(c.type===v.MERGE&&!d)throw Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!o||!m.records.commits.has(o)){if(n===m.records.currBranch){let f=Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${a} ${o}`,token:`cherryPick ${a} ${o}`,expected:["cherry-pick abc"]},f}let g=m.records.branches.get(m.records.currBranch);if(g===void 0||!g){let f=Error(`Incorrect usage of "cherry-pick". Current branch (${m.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${a} ${o}`,token:`cherryPick ${a} ${o}`,expected:["cherry-pick abc"]},f}let x=m.records.commits.get(g);if(x===void 0||!x){let f=Error(`Incorrect usage of "cherry-pick". Current branch (${m.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${a} ${o}`,token:`cherryPick ${a} ${o}`,expected:["cherry-pick abc"]},f}let u={id:m.records.seq+"-"+ne(),message:`cherry-picked ${c?.message} into ${m.records.currBranch}`,seq:m.records.seq++,parents:m.records.head==null?[]:[m.records.head.id,c.id],branch:m.records.currBranch,type:v.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${c.id}${c.type===v.MERGE?`|parent:${d}`:""}`]};m.records.head=u,m.records.commits.set(u.id,u),m.records.branches.set(m.records.currBranch,u.id),r.debug(m.records.branches),r.debug("in cherryPick")}},"cherryPick"),ye=e(function(t){if(t=y.sanitizeText(t,J()),!m.records.branches.has(t)){let a=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw a.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},a}else{m.records.currBranch=t;let a=m.records.branches.get(m.records.currBranch);if(a===void 0||!a)m.records.head=null;else m.records.head=m.records.commits.get(a)??null}},"checkout");function he(t,a,o){let i=t.indexOf(a);if(i===-1)t.push(o);else t.splice(i,1,o)}e(he,"upsert");function me(t){let a=t.reduce((d,l)=>{if(d.seq>l.seq)return d;return l},t[0]),o="";t.forEach(function(d){if(d===a)o+="\t*";else o+="\t|"});let i=[o,a.id,a.seq];for(let d in m.records.branches)if(m.records.branches.get(d)===a.id)i.push(d);if(r.debug(i.join(" ")),a.parents&&a.parents.length==2&&a.parents[0]&&a.parents[1]){let d=m.records.commits.get(a.parents[0]);if(he(t,a,d),a.parents[1])t.push(m.records.commits.get(a.parents[1]))}else if(a.parents.length==0)return;else if(a.parents[0]){let d=m.records.commits.get(a.parents[0]);he(t,a,d)}t=pe(t,(d)=>d.id),me(t)}e(me,"prettyPrintCommitHistory");var Oe=e(function(){r.debug(m.records.commits);let t=xe()[0];me([t])},"prettyPrint"),Ie=e(function(){m.reset(),C()},"clear"),_e=e(function(){return[...m.records.branchConfig.values()].map((a,o)=>{if(a.order!==null&&a.order!==void 0)return a;return{...a,order:parseFloat(`0.${o}`)}}).sort((a,o)=>(a.order??0)-(o.order??0)).map(({name:a})=>({name:a}))},"getBranchesAsObjArray"),Ge=e(function(){return m.records.branches},"getBranches"),De=e(function(){return m.records.commits},"getCommits"),xe=e(function(){let t=[...m.records.commits.values()];return t.forEach(function(a){r.debug(a.id)}),t.sort((a,o)=>a.seq-o.seq),t},"getCommitsArray"),We=e(function(){return m.records.currBranch},"getCurrentBranch"),qe=e(function(){return m.records.direction},"getDirection"),Ae=e(function(){return m.records.head},"getHead"),ue={commitType:v,getConfig:J,setDirection:ve,setOptions:Ee,getOptions:Te,commit:Le,branch:Me,merge:Pe,cherryPick:Re,checkout:ye,prettyPrint:Oe,clear:Ie,getBranchesAsObjArray:_e,getBranches:Ge,getCommits:De,getCommitsArray:xe,getCurrentBranch:We,getDirection:qe,getHead:Ae,setAccTitle:S,getAccTitle:E,getAccDescription:A,setAccDescription:T,setDiagramTitle:I,getDiagramTitle:L},He=e((t,a)=>{if(W(t,a),t.dir)a.setDirection(t.dir);for(let o of t.statements)Se(o,a)},"populate"),Se=e((t,a)=>{let i={Commit:e((d)=>a.commit(Ne(d)),"Commit"),Branch:e((d)=>a.branch(Fe(d)),"Branch"),Merge:e((d)=>a.merge(ze(d)),"Merge"),Checkout:e((d)=>a.checkout(Ye(d)),"Checkout"),CherryPicking:e((d)=>a.cherryPick(je(d)),"CherryPicking")}[t.$type];if(i)i(t);else r.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),Ne=e((t)=>({id:t.id,msg:t.message??"",type:t.type!==void 0?v[t.type]:v.NORMAL,tags:t.tags??void 0}),"parseCommit"),Fe=e((t)=>({name:t.name,order:t.order??0}),"parseBranch"),ze=e((t)=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?v[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),Ye=e((t)=>t.branch,"parseCheckout"),je=e((t)=>({id:t.id,targetId:"",tags:t.tags?.length===0?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),Ke={parse:e(async(t)=>{let a=await X("gitGraph",t);r.debug(a),He(a,ue)},"parse")},j=10,K=40,H=4,z=2,V=8,ce=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),le=12,ge=new Set(["redux-color","redux-dark-color"]),Ue=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),Z=e((t,a,o=!1)=>{if(o&&t>0)return(t-1)%(a-1)+1;return t%a},"calcColorIndex"),_=new Map,G=new Map,oe=30,te=new Map,se=[],Y=0,B="LR",Ve=e(()=>{_.clear(),G.clear(),te.clear(),Y=0,se=[],B="LR"},"clear"),be=e((t)=>{let a=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t==="string"?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach((i)=>{let d=document.createElementNS("http://www.w3.org/2000/svg","tspan");d.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),d.setAttribute("dy","1em"),d.setAttribute("x","0"),d.setAttribute("class","row"),d.textContent=i.trim(),a.appendChild(d)}),a},"drawText"),we=e((t)=>{let a,o,i;if(B==="BT")o=e((d,l)=>d<=l,"comparisonFunc"),i=1/0;else o=e((d,l)=>d>=l,"comparisonFunc"),i=0;return t.forEach((d)=>{let l=B==="TB"||B=="BT"?G.get(d)?.y:G.get(d)?.x;if(l!==void 0&&o(l,i))a=d,i=l}),a},"findClosestParent"),Ze=e((t)=>{let a="",o=1/0;return t.forEach((i)=>{let d=G.get(i).y;if(d<=o)a=i,o=d}),a||void 0},"findClosestParentBT"),Xe=e((t,a,o)=>{let i=o,d=o,l=[];t.forEach((c)=>{let n=a.get(c);if(!n)throw Error(`Commit not found for key ${c}`);if(n.parents.length)i=Qe(n),d=Math.max(i,d);else l.push(n);et(n,i)}),i=d,l.forEach((c)=>{tt(c,i,o)}),t.forEach((c)=>{let n=a.get(c);if(n?.parents.length){let g=Ze(n.parents);if(i=G.get(g).y-K,i<=d)d=i;let x=_.get(n.branch).pos,u=i-j;G.set(n.id,{x,y:u})}})},"setParallelBTPos"),Je=e((t)=>{let a=we(t.parents.filter((i)=>i!==null));if(!a)throw Error(`Closest parent not found for commit ${t.id}`);let o=G.get(a)?.y;if(o===void 0)throw Error(`Closest parent position not found for commit ${t.id}`);return o},"findClosestParentPos"),Qe=e((t)=>Je(t)+K,"calculateCommitPosition"),et=e((t,a)=>{let o=_.get(t.branch);if(!o)throw Error(`Branch not found for commit ${t.id}`);let i=o.pos,d=a+j;return G.set(t.id,{x:i,y:d}),{x:i,y:d}},"setCommitPosition"),tt=e((t,a,o)=>{let i=_.get(t.branch);if(!i)throw Error(`Branch not found for commit ${t.id}`);let d=a+o,l=i.pos;G.set(t.id,{x:l,y:d})},"setRootPosition"),rt=e((t,a,o,i,d,l)=>{let{theme:c}=s(),n=ce.has(c??""),g=ge.has(c??""),x=Ue.has(c??"");if(l===v.HIGHLIGHT)t.append("rect").attr("x",o.x-10+(n?3:0)).attr("y",o.y-10+(n?3:0)).attr("width",n?14:20).attr("height",n?14:20).attr("class",`commit ${a.id} commit-highlight${Z(d,V,g)} ${i}-outer`),t.append("rect").attr("x",o.x-6+(n?2:0)).attr("y",o.y-6+(n?2:0)).attr("width",n?8:12).attr("height",n?8:12).attr("class",`commit ${a.id} commit${Z(d,V,g)} ${i}-inner`);else if(l===v.CHERRY_PICK)t.append("circle").attr("cx",o.x).attr("cy",o.y).attr("r",n?7:10).attr("class",`commit ${a.id} ${i}`),t.append("circle").attr("cx",o.x-3).attr("cy",o.y+2).attr("r",n?2.5:2.75).attr("fill",x?"#000000":"#fff").attr("class",`commit ${a.id} ${i}`),t.append("circle").attr("cx",o.x+3).attr("cy",o.y+2).attr("r",n?2.5:2.75).attr("fill",x?"#000000":"#fff").attr("class",`commit ${a.id} ${i}`),t.append("line").attr("x1",o.x+3).attr("y1",o.y+1).attr("x2",o.x).attr("y2",o.y-5).attr("stroke",x?"#000000":"#fff").attr("class",`commit ${a.id} ${i}`),t.append("line").attr("x1",o.x-3).attr("y1",o.y+1).attr("x2",o.x).attr("y2",o.y-5).attr("stroke",x?"#000000":"#fff").attr("class",`commit ${a.id} ${i}`);else{let u=t.append("circle");if(u.attr("cx",o.x),u.attr("cy",o.y),u.attr("r",n?7:10),u.attr("class",`commit ${a.id} commit${Z(d,V,g)}`),l===v.MERGE){let f=t.append("circle");f.attr("cx",o.x),f.attr("cy",o.y),f.attr("r",n?5:6),f.attr("class",`commit ${i} ${a.id} commit${Z(d,V,g)}`)}if(l===v.REVERSE){let f=t.append("path"),h=n?4:5;f.attr("d",`M ${o.x-h},${o.y-h}L${o.x+h},${o.y+h}M${o.x-h},${o.y+h}L${o.x+h},${o.y-h}`).attr("class",`commit ${i} ${a.id} commit${Z(d,V,g)}`)}}},"drawCommitBullet"),at=e((t,a,o,i,d)=>{if(a.type!==v.CHERRY_PICK&&(a.customId&&a.type===v.MERGE||a.type!==v.MERGE)&&d.showCommitLabel){let l=t.append("g"),c=l.insert("rect").attr("class","commit-label-bkg"),n=l.append("text").attr("x",i).attr("y",o.y+25).attr("class","commit-label").text(a.id),g=n.node()?.getBBox();if(g){if(c.attr("x",o.posWithOffset-g.width/2-z).attr("y",o.y+13.5).attr("width",g.width+2*z).attr("height",g.height+2*z),B==="TB"||B==="BT")c.attr("x",o.x-(g.width+4*H+5)).attr("y",o.y-12),n.attr("x",o.x-(g.width+4*H)).attr("y",o.y+g.height-12);else n.attr("x",o.posWithOffset-g.width/2);if(d.rotateCommitLabel)if(B==="TB"||B==="BT")n.attr("transform","rotate(-45, "+o.x+", "+o.y+")"),c.attr("transform","rotate(-45, "+o.x+", "+o.y+")");else{let x=-7.5-(g.width+10)/25*9.5,u=10+g.width/25*8.5;l.attr("transform","translate("+x+", "+u+") rotate(-45, "+i+", "+o.y+")")}}}},"drawCommitLabel"),ot=e((t,a,o,i)=>{if(a.tags.length>0){let d=0,l=0,c=0,n=[];for(let g of a.tags.reverse()){let x=t.insert("polygon"),u=t.append("circle"),f=t.append("text").attr("y",o.y-16-d).attr("class","tag-label").text(g),h=f.node()?.getBBox();if(!h)throw Error("Tag bbox not found");l=Math.max(l,h.width),c=Math.max(c,h.height),f.attr("x",o.posWithOffset-h.width/2),n.push({tag:f,hole:u,rect:x,yOffset:d}),d+=20}for(let{tag:g,hole:x,rect:u,yOffset:f}of n){let h=c/2,k=o.y-19.2-f;if(u.attr("class","tag-label-bkg").attr("points",`
|
|
1
|
+
import{hn}from"./chunk-1eg9sbbt.js";import{W}from"./chunk-y56aaba5.js";import{e,r,D,b,y,C,S,E,T,A,I,L,s,wr,p,Ui,U,N}from"./chunk-wvdehm9y.js";import{X}from"./chunk-aqfpnhmt.js";var v={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Ce=D.gitGraph,J=e(()=>U({...Ce,...b().gitGraph}),"getConfig"),m=new hn(()=>{let t=J(),{mainBranchName:a,mainBranchOrder:o}=t;return{mainBranchName:a,commits:new Map,head:null,branchConfig:new Map([[a,{name:a,order:o}]]),branches:new Map([[a,null]]),currBranch:a,direction:"LR",seq:0,options:{}}});function ne(){return Ui({length:7})}e(ne,"getID");function pe(t,a){let o=Object.create(null);return t.reduce((i,d)=>{let l=a(d);if(!o[l])o[l]=!0,i.push(d);return i},[])}e(pe,"uniqBy");var ve=e(function(t){m.records.direction=t},"setDirection"),Ee=e(function(t){r.debug("options str",t),t=t?.trim(),t=t||"{}";try{m.records.options=JSON.parse(t)}catch(a){r.error("error while parsing gitGraph options",a.message)}},"setOptions"),Te=e(function(){return m.records.options},"getOptions"),Le=e(function(t){let{msg:a,id:o,type:i,tags:d}=t;r.info("commit",a,o,i,d),r.debug("Entering commit:",a,o,i,d);let l=J();o=y.sanitizeText(o,l),a=y.sanitizeText(a,l),d=d?.map((n)=>y.sanitizeText(n,l));let c={id:o?o:m.records.seq+"-"+ne(),message:a,seq:m.records.seq++,type:i??v.NORMAL,tags:d??[],parents:m.records.head==null?[]:[m.records.head.id],branch:m.records.currBranch};if(m.records.head=c,r.info("main branch",l.mainBranchName),m.records.commits.has(c.id))r.warn(`Commit ID ${c.id} already exists`);m.records.commits.set(c.id,c),m.records.branches.set(m.records.currBranch,c.id),r.debug("in pushCommit "+c.id)},"commit"),Me=e(function(t){let{name:a,order:o}=t;if(a=y.sanitizeText(a,J()),m.records.branches.has(a))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${a}")`);m.records.branches.set(a,m.records.head!=null?m.records.head.id:null),m.records.branchConfig.set(a,{name:a,order:o}),ye(a),r.debug("in createBranch")},"branch"),Pe=e((t)=>{let{branch:a,id:o,type:i,tags:d}=t,l=J();if(a=y.sanitizeText(a,l),o)o=y.sanitizeText(o,l);let c=m.records.branches.get(m.records.currBranch),n=m.records.branches.get(a),g=c?m.records.commits.get(c):void 0,x=n?m.records.commits.get(n):void 0;if(g&&x&&g.branch===a)throw Error(`Cannot merge branch '${a}' into itself.`);if(m.records.currBranch===a){let h=Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw h.hash={text:`merge ${a}`,token:`merge ${a}`,expected:["branch abc"]},h}if(g===void 0||!g){let h=Error(`Incorrect usage of "merge". Current branch (${m.records.currBranch})has no commits`);throw h.hash={text:`merge ${a}`,token:`merge ${a}`,expected:["commit"]},h}if(!m.records.branches.has(a)){let h=Error('Incorrect usage of "merge". Branch to be merged ('+a+") does not exist");throw h.hash={text:`merge ${a}`,token:`merge ${a}`,expected:[`branch ${a}`]},h}if(x===void 0||!x){let h=Error('Incorrect usage of "merge". Branch to be merged ('+a+") has no commits");throw h.hash={text:`merge ${a}`,token:`merge ${a}`,expected:['"commit"']},h}if(g===x){let h=Error('Incorrect usage of "merge". Both branches have same head');throw h.hash={text:`merge ${a}`,token:`merge ${a}`,expected:["branch abc"]},h}if(o&&m.records.commits.has(o)){let h=Error('Incorrect usage of "merge". Commit with id:'+o+" already exists, use different custom id");throw h.hash={text:`merge ${a} ${o} ${i} ${d?.join(" ")}`,token:`merge ${a} ${o} ${i} ${d?.join(" ")}`,expected:[`merge ${a} ${o}_UNIQUE ${i} ${d?.join(" ")}`]},h}let u=n?n:"",f={id:o||`${m.records.seq}-${ne()}`,message:`merged branch ${a} into ${m.records.currBranch}`,seq:m.records.seq++,parents:m.records.head==null?[]:[m.records.head.id,u],branch:m.records.currBranch,type:v.MERGE,customType:i,customId:o?!0:!1,tags:d??[]};m.records.head=f,m.records.commits.set(f.id,f),m.records.branches.set(m.records.currBranch,f.id),r.debug(m.records.branches),r.debug("in mergeBranch")},"merge"),Re=e(function(t){let{id:a,targetId:o,tags:i,parent:d}=t;r.debug("Entering cherryPick:",a,o,i);let l=J();if(a=y.sanitizeText(a,l),o=y.sanitizeText(o,l),i=i?.map((g)=>y.sanitizeText(g,l)),d=y.sanitizeText(d,l),!a||!m.records.commits.has(a)){let g=Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw g.hash={text:`cherryPick ${a} ${o}`,token:`cherryPick ${a} ${o}`,expected:["cherry-pick abc"]},g}let c=m.records.commits.get(a);if(c===void 0||!c)throw Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(d&&!(Array.isArray(c.parents)&&c.parents.includes(d)))throw Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let n=c.branch;if(c.type===v.MERGE&&!d)throw Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!o||!m.records.commits.has(o)){if(n===m.records.currBranch){let f=Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${a} ${o}`,token:`cherryPick ${a} ${o}`,expected:["cherry-pick abc"]},f}let g=m.records.branches.get(m.records.currBranch);if(g===void 0||!g){let f=Error(`Incorrect usage of "cherry-pick". Current branch (${m.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${a} ${o}`,token:`cherryPick ${a} ${o}`,expected:["cherry-pick abc"]},f}let x=m.records.commits.get(g);if(x===void 0||!x){let f=Error(`Incorrect usage of "cherry-pick". Current branch (${m.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${a} ${o}`,token:`cherryPick ${a} ${o}`,expected:["cherry-pick abc"]},f}let u={id:m.records.seq+"-"+ne(),message:`cherry-picked ${c?.message} into ${m.records.currBranch}`,seq:m.records.seq++,parents:m.records.head==null?[]:[m.records.head.id,c.id],branch:m.records.currBranch,type:v.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${c.id}${c.type===v.MERGE?`|parent:${d}`:""}`]};m.records.head=u,m.records.commits.set(u.id,u),m.records.branches.set(m.records.currBranch,u.id),r.debug(m.records.branches),r.debug("in cherryPick")}},"cherryPick"),ye=e(function(t){if(t=y.sanitizeText(t,J()),!m.records.branches.has(t)){let a=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw a.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},a}else{m.records.currBranch=t;let a=m.records.branches.get(m.records.currBranch);if(a===void 0||!a)m.records.head=null;else m.records.head=m.records.commits.get(a)??null}},"checkout");function he(t,a,o){let i=t.indexOf(a);if(i===-1)t.push(o);else t.splice(i,1,o)}e(he,"upsert");function me(t){let a=t.reduce((d,l)=>{if(d.seq>l.seq)return d;return l},t[0]),o="";t.forEach(function(d){if(d===a)o+="\t*";else o+="\t|"});let i=[o,a.id,a.seq];for(let d in m.records.branches)if(m.records.branches.get(d)===a.id)i.push(d);if(r.debug(i.join(" ")),a.parents&&a.parents.length==2&&a.parents[0]&&a.parents[1]){let d=m.records.commits.get(a.parents[0]);if(he(t,a,d),a.parents[1])t.push(m.records.commits.get(a.parents[1]))}else if(a.parents.length==0)return;else if(a.parents[0]){let d=m.records.commits.get(a.parents[0]);he(t,a,d)}t=pe(t,(d)=>d.id),me(t)}e(me,"prettyPrintCommitHistory");var Oe=e(function(){r.debug(m.records.commits);let t=xe()[0];me([t])},"prettyPrint"),Ie=e(function(){m.reset(),C()},"clear"),_e=e(function(){return[...m.records.branchConfig.values()].map((a,o)=>{if(a.order!==null&&a.order!==void 0)return a;return{...a,order:parseFloat(`0.${o}`)}}).sort((a,o)=>(a.order??0)-(o.order??0)).map(({name:a})=>({name:a}))},"getBranchesAsObjArray"),Ge=e(function(){return m.records.branches},"getBranches"),De=e(function(){return m.records.commits},"getCommits"),xe=e(function(){let t=[...m.records.commits.values()];return t.forEach(function(a){r.debug(a.id)}),t.sort((a,o)=>a.seq-o.seq),t},"getCommitsArray"),We=e(function(){return m.records.currBranch},"getCurrentBranch"),qe=e(function(){return m.records.direction},"getDirection"),Ae=e(function(){return m.records.head},"getHead"),ue={commitType:v,getConfig:J,setDirection:ve,setOptions:Ee,getOptions:Te,commit:Le,branch:Me,merge:Pe,cherryPick:Re,checkout:ye,prettyPrint:Oe,clear:Ie,getBranchesAsObjArray:_e,getBranches:Ge,getCommits:De,getCommitsArray:xe,getCurrentBranch:We,getDirection:qe,getHead:Ae,setAccTitle:S,getAccTitle:E,getAccDescription:A,setAccDescription:T,setDiagramTitle:I,getDiagramTitle:L},He=e((t,a)=>{if(W(t,a),t.dir)a.setDirection(t.dir);for(let o of t.statements)Se(o,a)},"populate"),Se=e((t,a)=>{let i={Commit:e((d)=>a.commit(Ne(d)),"Commit"),Branch:e((d)=>a.branch(Fe(d)),"Branch"),Merge:e((d)=>a.merge(ze(d)),"Merge"),Checkout:e((d)=>a.checkout(Ye(d)),"Checkout"),CherryPicking:e((d)=>a.cherryPick(je(d)),"CherryPicking")}[t.$type];if(i)i(t);else r.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),Ne=e((t)=>({id:t.id,msg:t.message??"",type:t.type!==void 0?v[t.type]:v.NORMAL,tags:t.tags??void 0}),"parseCommit"),Fe=e((t)=>({name:t.name,order:t.order??0}),"parseBranch"),ze=e((t)=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?v[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),Ye=e((t)=>t.branch,"parseCheckout"),je=e((t)=>({id:t.id,targetId:"",tags:t.tags?.length===0?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),Ke={parse:e(async(t)=>{let a=await X("gitGraph",t);r.debug(a),He(a,ue)},"parse")},j=10,K=40,H=4,z=2,V=8,ce=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),le=12,ge=new Set(["redux-color","redux-dark-color"]),Ue=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),Z=e((t,a,o=!1)=>{if(o&&t>0)return(t-1)%(a-1)+1;return t%a},"calcColorIndex"),_=new Map,G=new Map,oe=30,te=new Map,se=[],Y=0,B="LR",Ve=e(()=>{_.clear(),G.clear(),te.clear(),Y=0,se=[],B="LR"},"clear"),be=e((t)=>{let a=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t==="string"?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach((i)=>{let d=document.createElementNS("http://www.w3.org/2000/svg","tspan");d.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),d.setAttribute("dy","1em"),d.setAttribute("x","0"),d.setAttribute("class","row"),d.textContent=i.trim(),a.appendChild(d)}),a},"drawText"),we=e((t)=>{let a,o,i;if(B==="BT")o=e((d,l)=>d<=l,"comparisonFunc"),i=1/0;else o=e((d,l)=>d>=l,"comparisonFunc"),i=0;return t.forEach((d)=>{let l=B==="TB"||B=="BT"?G.get(d)?.y:G.get(d)?.x;if(l!==void 0&&o(l,i))a=d,i=l}),a},"findClosestParent"),Ze=e((t)=>{let a="",o=1/0;return t.forEach((i)=>{let d=G.get(i).y;if(d<=o)a=i,o=d}),a||void 0},"findClosestParentBT"),Xe=e((t,a,o)=>{let i=o,d=o,l=[];t.forEach((c)=>{let n=a.get(c);if(!n)throw Error(`Commit not found for key ${c}`);if(n.parents.length)i=Qe(n),d=Math.max(i,d);else l.push(n);et(n,i)}),i=d,l.forEach((c)=>{tt(c,i,o)}),t.forEach((c)=>{let n=a.get(c);if(n?.parents.length){let g=Ze(n.parents);if(i=G.get(g).y-K,i<=d)d=i;let x=_.get(n.branch).pos,u=i-j;G.set(n.id,{x,y:u})}})},"setParallelBTPos"),Je=e((t)=>{let a=we(t.parents.filter((i)=>i!==null));if(!a)throw Error(`Closest parent not found for commit ${t.id}`);let o=G.get(a)?.y;if(o===void 0)throw Error(`Closest parent position not found for commit ${t.id}`);return o},"findClosestParentPos"),Qe=e((t)=>Je(t)+K,"calculateCommitPosition"),et=e((t,a)=>{let o=_.get(t.branch);if(!o)throw Error(`Branch not found for commit ${t.id}`);let i=o.pos,d=a+j;return G.set(t.id,{x:i,y:d}),{x:i,y:d}},"setCommitPosition"),tt=e((t,a,o)=>{let i=_.get(t.branch);if(!i)throw Error(`Branch not found for commit ${t.id}`);let d=a+o,l=i.pos;G.set(t.id,{x:l,y:d})},"setRootPosition"),rt=e((t,a,o,i,d,l)=>{let{theme:c}=s(),n=ce.has(c??""),g=ge.has(c??""),x=Ue.has(c??"");if(l===v.HIGHLIGHT)t.append("rect").attr("x",o.x-10+(n?3:0)).attr("y",o.y-10+(n?3:0)).attr("width",n?14:20).attr("height",n?14:20).attr("class",`commit ${a.id} commit-highlight${Z(d,V,g)} ${i}-outer`),t.append("rect").attr("x",o.x-6+(n?2:0)).attr("y",o.y-6+(n?2:0)).attr("width",n?8:12).attr("height",n?8:12).attr("class",`commit ${a.id} commit${Z(d,V,g)} ${i}-inner`);else if(l===v.CHERRY_PICK)t.append("circle").attr("cx",o.x).attr("cy",o.y).attr("r",n?7:10).attr("class",`commit ${a.id} ${i}`),t.append("circle").attr("cx",o.x-3).attr("cy",o.y+2).attr("r",n?2.5:2.75).attr("fill",x?"#000000":"#fff").attr("class",`commit ${a.id} ${i}`),t.append("circle").attr("cx",o.x+3).attr("cy",o.y+2).attr("r",n?2.5:2.75).attr("fill",x?"#000000":"#fff").attr("class",`commit ${a.id} ${i}`),t.append("line").attr("x1",o.x+3).attr("y1",o.y+1).attr("x2",o.x).attr("y2",o.y-5).attr("stroke",x?"#000000":"#fff").attr("class",`commit ${a.id} ${i}`),t.append("line").attr("x1",o.x-3).attr("y1",o.y+1).attr("x2",o.x).attr("y2",o.y-5).attr("stroke",x?"#000000":"#fff").attr("class",`commit ${a.id} ${i}`);else{let u=t.append("circle");if(u.attr("cx",o.x),u.attr("cy",o.y),u.attr("r",n?7:10),u.attr("class",`commit ${a.id} commit${Z(d,V,g)}`),l===v.MERGE){let f=t.append("circle");f.attr("cx",o.x),f.attr("cy",o.y),f.attr("r",n?5:6),f.attr("class",`commit ${i} ${a.id} commit${Z(d,V,g)}`)}if(l===v.REVERSE){let f=t.append("path"),h=n?4:5;f.attr("d",`M ${o.x-h},${o.y-h}L${o.x+h},${o.y+h}M${o.x-h},${o.y+h}L${o.x+h},${o.y-h}`).attr("class",`commit ${i} ${a.id} commit${Z(d,V,g)}`)}}},"drawCommitBullet"),at=e((t,a,o,i,d)=>{if(a.type!==v.CHERRY_PICK&&(a.customId&&a.type===v.MERGE||a.type!==v.MERGE)&&d.showCommitLabel){let l=t.append("g"),c=l.insert("rect").attr("class","commit-label-bkg"),n=l.append("text").attr("x",i).attr("y",o.y+25).attr("class","commit-label").text(a.id),g=n.node()?.getBBox();if(g){if(c.attr("x",o.posWithOffset-g.width/2-z).attr("y",o.y+13.5).attr("width",g.width+2*z).attr("height",g.height+2*z),B==="TB"||B==="BT")c.attr("x",o.x-(g.width+4*H+5)).attr("y",o.y-12),n.attr("x",o.x-(g.width+4*H)).attr("y",o.y+g.height-12);else n.attr("x",o.posWithOffset-g.width/2);if(d.rotateCommitLabel)if(B==="TB"||B==="BT")n.attr("transform","rotate(-45, "+o.x+", "+o.y+")"),c.attr("transform","rotate(-45, "+o.x+", "+o.y+")");else{let x=-7.5-(g.width+10)/25*9.5,u=10+g.width/25*8.5;l.attr("transform","translate("+x+", "+u+") rotate(-45, "+i+", "+o.y+")")}}}},"drawCommitLabel"),ot=e((t,a,o,i)=>{if(a.tags.length>0){let d=0,l=0,c=0,n=[];for(let g of a.tags.reverse()){let x=t.insert("polygon"),u=t.append("circle"),f=t.append("text").attr("y",o.y-16-d).attr("class","tag-label").text(g),h=f.node()?.getBBox();if(!h)throw Error("Tag bbox not found");l=Math.max(l,h.width),c=Math.max(c,h.height),f.attr("x",o.posWithOffset-h.width/2),n.push({tag:f,hole:u,rect:x,yOffset:d}),d+=20}for(let{tag:g,hole:x,rect:u,yOffset:f}of n){let h=c/2,k=o.y-19.2-f;if(u.attr("class","tag-label-bkg").attr("points",`
|
|
2
2
|
${i-l/2-H/2},${k+z}
|
|
3
3
|
${i-l/2-H/2},${k-z}
|
|
4
4
|
${o.posWithOffset-l/2-H},${k-h-z}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Dt,fn,Nt,ra}from"./chunk-ds7srg4p.js";import{Mt}from"./chunk-cqp1d4p0.js";import{Bt,Cr,Fn,$e,Sr}from"./chunk-
|
|
1
|
+
import{Dt,fn,Nt,ra}from"./chunk-ds7srg4p.js";import{Mt}from"./chunk-cqp1d4p0.js";import{Bt,Cr,Fn,$e,Sr}from"./chunk-wvdehm9y.js";function s(r,n){return r==null||n==null?NaN:r<n?-1:r>n?1:r>=n?0:NaN}function x(r,n){return r==null||n==null?NaN:n<r?-1:n>r?1:n>=r?0:NaN}function nr(r){let n,e,t;if(r.length!==2)n=s,e=(f,c)=>s(r(f),c),t=(f,c)=>r(f)-c;else n=r===s||r===x?r:O,e=r,t=r;function o(f,c,i=0,p=f.length){if(i<p){if(n(c,c)!==0)return p;do{let l=i+p>>>1;if(e(f[l],c)<0)i=l+1;else p=l}while(i<p)}return i}function a(f,c,i=0,p=f.length){if(i<p){if(n(c,c)!==0)return p;do{let l=i+p>>>1;if(e(f[l],c)<=0)i=l+1;else p=l}while(i<p)}return i}function u(f,c,i=0,p=f.length){let l=o(f,c,i,p-1);return l>i&&t(f[l-1],c)>-t(f[l],c)?l-1:l}return{left:o,center:u,right:a}}function O(){return 0}function y(r){return r===null?NaN:+r}var V=nr(s),{right:T,left:or}=V,ur=nr(y).center,z=T;var E=Math.sqrt(50),G=Math.sqrt(10),H=Math.sqrt(2);function g(r,n,e){let t=(n-r)/Math.max(0,e),o=Math.floor(Math.log10(t)),a=t/Math.pow(10,o),u=a>=E?10:a>=G?5:a>=H?2:1,f,c,i;if(o<0){if(i=Math.pow(10,-o)/u,f=Math.round(r*i),c=Math.round(n*i),f/i<r)++f;if(c/i>n)--c;i=-i}else{if(i=Math.pow(10,o)*u,f=Math.round(r/i),c=Math.round(n/i),f*i<r)++f;if(c*i>n)--c}if(c<f&&0.5<=e&&e<2)return g(r,n,e*2);return[f,c,i]}function v(r,n,e){if(n=+n,r=+r,e=+e,!(e>0))return[];if(r===n)return[r];let t=n<r,[o,a,u]=t?g(n,r,e):g(r,n,e);if(!(a>=o))return[];let f=a-o+1,c=Array(f);if(t)if(u<0)for(let i=0;i<f;++i)c[i]=(a-i)/-u;else for(let i=0;i<f;++i)c[i]=(a-i)*u;else if(u<0)for(let i=0;i<f;++i)c[i]=(o+i)/-u;else for(let i=0;i<f;++i)c[i]=(o+i)*u;return c}function M(r,n,e){return n=+n,r=+r,e=+e,g(r,n,e)[2]}function Pr(r,n,e){n=+n,r=+r,e=+e;let t=n<r,o=t?M(n,r,e):M(r,n,e);return(t?-1:1)*(o<0?1/-o:o)}function N(r,n){if(!n)n=[];var e=r?Math.min(n.length,r.length):0,t=n.slice(),o;return function(a){for(o=0;o<e;++o)t[o]=r[o]*(1-a)+n[o]*a;return t}}function B(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function P(r,n){var e=n?n.length:0,t=r?Math.min(e,r.length):0,o=Array(t),a=Array(e),u;for(u=0;u<t;++u)o[u]=h(r[u],n[u]);for(;u<e;++u)a[u]=n[u];return function(f){for(u=0;u<t;++u)a[u]=o[u](f);return a}}function w(r,n){var e=new Date;return r=+r,n=+n,function(t){return e.setTime(r*(1-t)+n*t),e}}function k(r,n){var e={},t={},o;if(r===null||typeof r!=="object")r={};if(n===null||typeof n!=="object")n={};for(o in n)if(o in r)e[o]=h(r[o],n[o]);else t[o]=n[o];return function(a){for(o in e)t[o]=e[o](a);return t}}function h(r,n){var e=typeof n,t;return n==null||e==="boolean"?Cr(n):(e==="number"?$e:e==="string"?(t=Bt(n))?(n=t,Fn):Sr:n instanceof Bt?Fn:n instanceof Date?w:B(n)?N:Array.isArray(n)?P:typeof n.valueOf!=="function"&&typeof n.toString!=="function"||isNaN(n)?k:$e)(r,n)}function A(r,n){return r=+r,n=+n,function(e){return Math.round(r*(1-e)+n*e)}}function R(r){return Math.max(0,-Dt(Math.abs(r)))}function S(r,n){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Dt(n)/3)))*3-Dt(Math.abs(r)))}function j(r,n){return r=Math.abs(r),n=Math.abs(n)-r,Math.max(0,Dt(n)-Dt(r))+1}function F(r){return function(){return r}}function q(r){return+r}var C=[0,1];function d(r){return r}function D(r,n){return(n-=r=+r)?function(e){return(e-r)/n}:F(isNaN(n)?NaN:0.5)}function J(r,n){var e;if(r>n)e=r,r=n,n=e;return function(t){return Math.max(r,Math.min(n,t))}}function K(r,n,e){var t=r[0],o=r[1],a=n[0],u=n[1];if(o<t)t=D(o,t),a=e(u,a);else t=D(t,o),a=e(a,u);return function(f){return a(t(f))}}function Q(r,n,e){var t=Math.min(r.length,n.length)-1,o=Array(t),a=Array(t),u=-1;if(r[t]<r[0])r=r.slice().reverse(),n=n.slice().reverse();while(++u<t)o[u]=D(r[u],r[u+1]),a[u]=e(n[u],n[u+1]);return function(f){var c=z(r,f,1,t)-1;return a[c](o[c](f))}}function na(r,n){return n.domain(r.domain()).range(r.range()).interpolate(r.interpolate()).clamp(r.clamp()).unknown(r.unknown())}function U(){var r=C,n=C,e=h,t,o,a,u=d,f,c,i;function p(){var m=Math.min(r.length,n.length);if(u!==d)u=J(r[0],r[m-1]);return f=m>2?Q:K,c=i=null,l}function l(m){return m==null||isNaN(m=+m)?a:(c||(c=f(r.map(t),n,e)))(t(u(m)))}return l.invert=function(m){return u(o((i||(i=f(n,r.map(t),$e)))(m)))},l.domain=function(m){return arguments.length?(r=Array.from(m,q),p()):r.slice()},l.range=function(m){return arguments.length?(n=Array.from(m),p()):n.slice()},l.rangeRound=function(m){return n=Array.from(m),e=A,p()},l.clamp=function(m){return arguments.length?(u=m?!0:d,p()):u!==d},l.interpolate=function(m){return arguments.length?(e=m,p()):e},l.unknown=function(m){return arguments.length?(a=m,l):a},function(m,L){return t=m,o=L,p()}}function Or(){return U()(d,d)}function I(r,n,e,t){var o=Pr(r,n,e),a;switch(t=fn(t==null?",f":t),t.type){case"s":{var u=Math.max(Math.abs(r),Math.abs(n));if(t.precision==null&&!isNaN(a=S(o,u)))t.precision=a;return ra(t,u)}case"":case"e":case"g":case"p":case"r":{if(t.precision==null&&!isNaN(a=j(o,Math.max(Math.abs(r),Math.abs(n)))))t.precision=a-(t.type==="e");break}case"f":case"%":{if(t.precision==null&&!isNaN(a=R(o)))t.precision=a-(t.type==="%")*2;break}}return Nt(t)}function W(r){var n=r.domain;return r.ticks=function(e){var t=n();return v(t[0],t[t.length-1],e==null?10:e)},r.tickFormat=function(e,t){var o=n();return I(o[0],o[o.length-1],e==null?10:e,t)},r.nice=function(e){if(e==null)e=10;var t=n(),o=0,a=t.length-1,u=t[o],f=t[a],c,i,p=10;if(f<u)i=u,u=f,f=i,i=o,o=a,a=i;while(p-- >0){if(i=M(u,f,e),i===c)return t[o]=u,t[a]=f,n(t);else if(i>0)u=Math.floor(u/i)*i,f=Math.ceil(f/i)*i;else if(i<0)u=Math.ceil(u*i)/i,f=Math.floor(f*i)/i;else break;c=i}return r},r}function xt(){var r=Or();return r.copy=function(){return na(r,xt())},Mt.apply(r,arguments),W(r)}
|
|
2
2
|
export{nr,Pr,na,Or,xt};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{xi}from"./chunk-aqfpnhmt.js";export{xi as createGitGraphServices};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e,r,Le,y,C,S,E,T,A,I,L,s,p,zi,N,ce,ae,ie,ft,ge,ye}from"./chunk-
|
|
1
|
+
import{e,r,Le,y,C,S,E,T,A,I,L,s,p,zi,N,ce,ae,ie,ft,ge,ye}from"./chunk-wvdehm9y.js";import{Pt}from"./chunk-rvrf0f3h.js";import{he}from"./chunk-bhsaj6qq.js";import{se}from"./chunk-p0kvmf28.js";var Bt=function(){var t=e(function(Q,h,g,o){for(g=g||{},o=Q.length;o--;g[Q[o]]=h);return g},"o"),i=[1,2],c=[1,3],a=[1,4],u=[2,4],f=[1,9],b=[1,11],k=[1,16],l=[1,17],D=[1,18],x=[1,19],Y=[1,33],V=[1,20],j=[1,21],F=[1,22],m=[1,23],M=[1,24],P=[1,26],z=[1,27],W=[1,28],K=[1,29],R=[1,30],st=[1,31],St=[1,32],gt=[1,35],yt=[1,36],mt=[1,37],bt=[1,38],rt=[1,34],_=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],kt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],Mt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],Lt={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:e(function(h,g,o,v,w,n,it){var d=n.length-1;switch(w){case 3:return v.setRootDoc(n[d]),n[d];break;case 4:this.$=[];break;case 5:if(n[d]!="nl")n[d-1].push(n[d]),this.$=n[d-1];break;case 6:case 7:this.$=n[d];break;case 8:this.$="nl";break;case 12:this.$=n[d];break;case 13:let Et=n[d-1];Et.description=v.trimColon(n[d]),this.$=Et;break;case 14:this.$={stmt:"relation",state1:n[d-2],state2:n[d]};break;case 15:let _t=v.trimColon(n[d]);this.$={stmt:"relation",state1:n[d-3],state2:n[d-1],description:_t};break;case 19:this.$={stmt:"state",id:n[d-3],type:"default",description:"",doc:n[d-1]};break;case 20:var X=n[d],J=n[d-2].trim();if(n[d].match(":")){var lt=n[d].split(":");X=lt[0],J=[J,lt[1]]}this.$={stmt:"state",id:X,type:"default",description:J};break;case 21:this.$={stmt:"state",id:n[d-3],type:"default",description:n[d-5],doc:n[d-1]};break;case 22:this.$={stmt:"state",id:n[d],type:"fork"};break;case 23:this.$={stmt:"state",id:n[d],type:"join"};break;case 24:this.$={stmt:"state",id:n[d],type:"choice"};break;case 25:this.$={stmt:"state",id:v.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:n[d-1].trim(),note:{position:n[d-2].trim(),text:n[d].trim()}};break;case 29:this.$=n[d].trim(),v.setAccTitle(this.$);break;case 30:case 31:this.$=n[d].trim(),v.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:n[d-3],url:n[d-2],tooltip:n[d-1]};break;case 33:this.$={stmt:"click",id:n[d-3],url:n[d-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:n[d-1].trim(),classes:n[d].trim()};break;case 36:this.$={stmt:"style",id:n[d-1].trim(),styleClass:n[d].trim()};break;case 37:this.$={stmt:"applyClass",id:n[d-1].trim(),styleClass:n[d].trim()};break;case 38:v.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:v.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:v.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:v.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:n[d].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:n[d-2].trim(),classes:[n[d].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:n[d-2].trim(),classes:[n[d].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:i,5:c,6:a},{1:[3]},{3:5,4:i,5:c,6:a},{3:6,4:i,5:c,6:a},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],u,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:f,5:b,8:8,9:10,10:12,11:13,12:14,13:15,16:k,17:l,19:D,22:x,24:Y,25:V,26:j,27:F,28:m,29:M,32:25,33:P,35:z,37:W,38:K,41:R,45:st,48:St,51:gt,52:yt,53:mt,54:bt,57:rt},t(_,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:k,17:l,19:D,22:x,24:Y,25:V,26:j,27:F,28:m,29:M,32:25,33:P,35:z,37:W,38:K,41:R,45:st,48:St,51:gt,52:yt,53:mt,54:bt,57:rt},t(_,[2,7]),t(_,[2,8]),t(_,[2,9]),t(_,[2,10]),t(_,[2,11]),t(_,[2,12],{14:[1,40],15:[1,41]}),t(_,[2,16]),{18:[1,42]},t(_,[2,18],{20:[1,43]}),{23:[1,44]},t(_,[2,22]),t(_,[2,23]),t(_,[2,24]),t(_,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(_,[2,28]),{34:[1,49]},{36:[1,50]},t(_,[2,31]),{13:51,24:Y,57:rt},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(kt,[2,44],{58:[1,56]}),t(kt,[2,45],{58:[1,57]}),t(_,[2,38]),t(_,[2,39]),t(_,[2,40]),t(_,[2,41]),t(_,[2,6]),t(_,[2,13]),{13:58,24:Y,57:rt},t(_,[2,17]),t(Mt,u,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(_,[2,29]),t(_,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(_,[2,14],{14:[1,71]}),{4:f,5:b,8:8,9:10,10:12,11:13,12:14,13:15,16:k,17:l,19:D,21:[1,72],22:x,24:Y,25:V,26:j,27:F,28:m,29:M,32:25,33:P,35:z,37:W,38:K,41:R,45:st,48:St,51:gt,52:yt,53:mt,54:bt,57:rt},t(_,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(_,[2,34]),t(_,[2,35]),t(_,[2,36]),t(_,[2,37]),t(kt,[2,46]),t(kt,[2,47]),t(_,[2,15]),t(_,[2,19]),t(Mt,u,{7:78}),t(_,[2,26]),t(_,[2,27]),{5:[1,79]},{5:[1,80]},{4:f,5:b,8:8,9:10,10:12,11:13,12:14,13:15,16:k,17:l,19:D,21:[1,81],22:x,24:Y,25:V,26:j,27:F,28:m,29:M,32:25,33:P,35:z,37:W,38:K,41:R,45:st,48:St,51:gt,52:yt,53:mt,54:bt,57:rt},t(_,[2,32]),t(_,[2,33]),t(_,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:e(function(h,g){if(g.recoverable)this.trace(h);else{var o=Error(h);throw o.hash=g,o}},"parseError"),parse:e(function(h){var g=this,o=[0],v=[],w=[null],n=[],it=this.table,d="",X=0,J=0,lt=0,Et=2,_t=1,be=n.slice.call(arguments,1),O=Object.create(this.lexer),tt={yy:{}};for(var wt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,wt))tt.yy[wt]=this.yy[wt];if(O.setInput(h,tt.yy),tt.yy.lexer=O,tt.yy.parser=this,typeof O.yylloc>"u")O.yylloc={};var It=O.yylloc;n.push(It);var ke=O.options&&O.options.ranges;if(typeof tt.yy.parseError==="function")this.parseError=tt.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function Te(H){o.length=o.length-2*H,w.length=w.length-H,n.length=n.length-H}e(Te,"popStack");function Wt(){var H=v.pop()||O.lex()||_t;if(typeof H!=="number"){if(H instanceof Array)v=H,H=v.pop();H=g.symbols_[H]||H}return H}e(Wt,"lex");var B,Nt,et,U,ts,Ot,at={},vt,q,jt,Dt;while(!0){if(et=o[o.length-1],this.defaultActions[et])U=this.defaultActions[et];else{if(B===null||typeof B>"u")B=Wt();U=it[et]&&it[et][B]}if(typeof U>"u"||!U.length||!U[0]){var Rt="";Dt=[];for(vt in it[et])if(this.terminals_[vt]&&vt>Et)Dt.push("'"+this.terminals_[vt]+"'");if(O.showPosition)Rt="Parse error on line "+(X+1)+`:
|
|
2
2
|
`+O.showPosition()+`
|
|
3
3
|
Expecting `+Dt.join(", ")+", got '"+(this.terminals_[B]||B)+"'";else Rt="Parse error on line "+(X+1)+": Unexpected "+(B==_t?"end of input":"'"+(this.terminals_[B]||B)+"'");this.parseError(Rt,{text:O.match,token:this.terminals_[B]||B,line:O.yylineno,loc:It,expected:Dt})}if(U[0]instanceof Array&&U.length>1)throw Error("Parse Error: multiple actions possible at state: "+et+", token: "+B);switch(U[0]){case 1:if(o.push(B),w.push(O.yytext),n.push(O.yylloc),o.push(U[1]),B=null,!Nt){if(J=O.yyleng,d=O.yytext,X=O.yylineno,It=O.yylloc,lt>0)lt--}else B=Nt,Nt=null;break;case 2:if(q=this.productions_[U[1]][1],at.$=w[w.length-q],at._$={first_line:n[n.length-(q||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(q||1)].first_column,last_column:n[n.length-1].last_column},ke)at._$.range=[n[n.length-(q||1)].range[0],n[n.length-1].range[1]];if(Ot=this.performAction.apply(at,[d,J,X,tt.yy,U[1],w,n].concat(be)),typeof Ot<"u")return Ot;if(q)o=o.slice(0,-1*q*2),w=w.slice(0,-1*q),n=n.slice(0,-1*q);o.push(this.productions_[U[1]][0]),w.push(at.$),n.push(at._$),jt=it[o[o.length-2]][o[o.length-1]],o.push(jt);break;case 3:return!0}}return!0},"parse")},me=function(){var Q={EOF:1,parseError:e(function(g,o){if(this.yy.parser)this.yy.parser.parseError(g,o);else throw Error(g)},"parseError"),setInput:e(function(h,g){if(this.yy=g||this.yy||{},this._input=h,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];return this.offset=0,this},"setInput"),input:e(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var g=h.match(/(?:\r\n?|\n).*/g);if(g)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),h},"input"),unput:e(function(h){var g=h.length,o=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var v=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),o.length-1)this.yylineno-=o.length-1;var w=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===v.length?this.yylloc.first_column:0)+v[v.length-o.length].length-o[0].length:this.yylloc.first_column-g},this.options.ranges)this.yylloc.range=[w[0],w[0]+this.yyleng-g];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(h){this.unput(this.match.slice(h))},"less"),pastInput:e(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var h=this.match;if(h.length<20)h+=this._input.substr(0,20-h.length);return(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var h=this.pastInput(),g=Array(h.length+1).join("-");return h+this.upcomingInput()+`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ti}from"./chunk-aqfpnhmt.js";export{Ti as createEventModelingServices};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e,Zt,r,le,y,C,S,E,T,A,I,L,s,p,N,Fe,Xr,ce,ae,ie,ft,ge,ye}from"./chunk-vymqrpm3.js";import{Ot}from"./chunk-166qe5j6.js";import{he}from"./chunk-es28k2t7.js";import{se}from"./chunk-zmdnxn6m.js";var Ue=function(){var i=e(function(q,l,h,f){for(h=h||{},f=q.length;f--;h[q[f]]=l);return h},"o"),c=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],b=[2,2],o=[1,7],u=[1,9],g=[1,10],R=[1,11],_=[1,12],v=[1,30],k=[1,23],m=[1,24],B=[1,25],W=[1,26],X=[1,27],D=[1,19],Y=[1,28],te=[1,29],G=[1,20],P=[1,18],z=[1,21],U=[1,22],Ke=[2,6],d=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],Re=[1,36],ve=[1,37],De=[1,38],Le=[1,39],we=[1,40],re=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],K=[1,46],Z=[1,47],ne=[1,57],oe=[43,51,53,54,55,74,75],ue=[1,70],de=[1,68],j=[1,65],be=[1,69],pe=[1,71],_e=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],me=[1,78],Ee=[1,77],Se=[1,76],Ze=[69,70,71,72,73],je=[1,91],qe=[6,9,45,50],J=[6,9,12,44,45,50,51,52],Te=[1,101],Ce=[1,100],Oe=[1,99],fe=[18,61],We=[1,110],He=[1,109],Qe=[20,43,51,53,54,55],Ve=[18,61,64,66],Me={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:e(function(l,h,f,n,O,t,ke){var a=t.length-1;switch(O){case 1:break;case 2:this.$=[];break;case 3:this.$=t[a-1].concat(t[a]);break;case 4:this.$=t[a];break;case 5:case 6:this.$=[];break;case 7:n.addEntity(t[a-4]),n.addEntity(t[a-2]),n.addRelationship(t[a-4],t[a],t[a-2],t[a-3]),this.$=[t[a-4],t[a-2]];break;case 8:n.addEntity(t[a-8]),n.addEntity(t[a-4]),n.addRelationship(t[a-8],t[a],t[a-4],t[a-5]),n.setClass([t[a-8]],t[a-6]),n.setClass([t[a-4]],t[a-2]),this.$=[t[a-8],t[a-4]];break;case 9:n.addEntity(t[a-6]),n.addEntity(t[a-2]),n.addRelationship(t[a-6],t[a],t[a-2],t[a-3]),n.setClass([t[a-6]],t[a-4]),this.$=[t[a-6],t[a-2]];break;case 10:n.addEntity(t[a-6]),n.addEntity(t[a-4]),n.addRelationship(t[a-6],t[a],t[a-4],t[a-5]),n.setClass([t[a-4]],t[a-2]),this.$=[t[a-6],t[a-4]];break;case 11:n.addEntity(t[a-3]),n.addAttributes(t[a-3],t[a-1]),this.$=[t[a-3]];break;case 12:n.addEntity(t[a-5]),n.addAttributes(t[a-5],t[a-1]),n.setClass([t[a-5]],t[a-3]),this.$=[t[a-5]];break;case 13:n.addEntity(t[a-2]),this.$=[t[a-2]];break;case 14:n.addEntity(t[a-4]),n.setClass([t[a-4]],t[a-2]),this.$=[t[a-4]];break;case 15:n.addEntity(t[a]),this.$=[t[a]];break;case 16:n.addEntity(t[a-2]),n.setClass([t[a-2]],t[a]),this.$=[t[a-2]];break;case 17:n.addEntity(t[a-6],t[a-4]),n.addAttributes(t[a-6],t[a-1]),this.$=[t[a-6]];break;case 18:n.addEntity(t[a-8],t[a-6]),n.addAttributes(t[a-8],t[a-1]),n.setClass([t[a-8]],t[a-3]),this.$=[t[a-8]];break;case 19:n.addEntity(t[a-5],t[a-3]),this.$=[t[a-5]];break;case 20:n.addEntity(t[a-7],t[a-5]),n.setClass([t[a-7]],t[a-2]),this.$=[t[a-7]];break;case 21:n.addEntity(t[a-3],t[a-1]);break;case 22:n.addEntity(t[a-5],t[a-3]),n.setClass([t[a-5]],t[a]);break;case 23:case 24:this.$=t[a].trim(),n.setAccTitle(this.$);break;case 25:case 26:this.$=t[a].trim(),n.setAccDescription(this.$);break;case 27:if(!n.subgraphDepth)n.setDirection(t[a].value),this.$=[];else this.$=t[a];break;case 31:n.subgraphDepth=(n.subgraphDepth||1)-1,this.$=n.addSubGraph({text:t[a-2].id},t[a-1],{text:t[a-2].text});break;case 32:n.subgraphDepth=(n.subgraphDepth||0)+1,this.$={id:t[a-1],text:t[a-1]};break;case 33:n.subgraphDepth=(n.subgraphDepth||0)+1,this.$={id:t[a-4],text:t[a-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=t[a];break;case 35:this.$=t[a-1]+" "+t[a];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=t[a-3],n.addClass(t[a-2],t[a-1]);break;case 41:case 42:case 63:case 72:this.$=[t[a]];break;case 43:case 44:this.$=t[a-2].concat([t[a]]);break;case 45:this.$=t[a-2],n.setClass(t[a-1],t[a]);break;case 46:this.$=t[a-3],n.addCssStyles(t[a-2],t[a-1]);break;case 47:this.$=[t[a]];break;case 48:t[a-2].push(t[a]),this.$=t[a-2];break;case 50:this.$=t[a-1]+t[a];break;case 58:case 84:case 85:this.$=t[a].replace(/"/g,"");break;case 64:t[a].push(t[a-1]),this.$=t[a];break;case 65:this.$={type:t[a-1],name:t[a]};break;case 66:this.$={type:t[a-2],name:t[a-1],keys:t[a]};break;case 67:this.$={type:t[a-2],name:t[a-1],comment:t[a]};break;case 68:this.$={type:t[a-3],name:t[a-2],keys:t[a-1],comment:t[a]};break;case 69:case 71:case 74:this.$=t[a];break;case 70:this.$=t[a-1]+t[a];break;case 73:t[a-2].push(t[a]),this.$=t[a-2];break;case 75:this.$=t[a].replace(/"/g,"");break;case 76:this.$={cardA:t[a],relType:t[a-1],cardB:t[a-2]};break;case 77:this.$=n.Cardinality.ZERO_OR_ONE;break;case 78:this.$=n.Cardinality.ZERO_OR_MORE;break;case 79:this.$=n.Cardinality.ONE_OR_MORE;break;case 80:this.$=n.Cardinality.ONLY_ONE;break;case 81:this.$=n.Cardinality.MD_PARENT;break;case 82:this.$=n.Identification.NON_IDENTIFYING;break;case 83:this.$=n.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},i(c,b,{5:3}),{6:[1,4],7:5,8:6,9:o,10:8,21:u,23:g,25:R,27:_,28:13,29:14,30:15,31:16,32:17,34:v,37:k,38:m,39:B,40:W,41:X,43:D,46:Y,47:te,51:G,53:P,54:z,55:U},i(c,Ke,{1:[2,1]}),i(d,[2,3]),i(d,[2,4]),i(d,[2,5]),i(d,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:Re,70:ve,71:De,72:Le,73:we}),{22:[1,41]},{24:[1,42]},{26:[1,43]},i(d,[2,26]),i(d,[2,27]),i(d,[2,28]),i(d,[2,29]),i(d,[2,30]),i(d,b,{5:44}),i(re,[2,58]),i(re,[2,59]),i(re,[2,60]),i(re,[2,61]),i(re,[2,62]),i(d,[2,36]),i(d,[2,37]),i(d,[2,38]),i(d,[2,39]),{15:45,43:K,44:Z},{15:48,43:K,44:Z},{15:49,43:K,44:Z},{10:50,43:D,51:G,53:P,54:z,55:U},{10:51,43:D,51:G,53:P,54:z,55:U},{15:52,43:K,44:Z},{17:53,18:[1,54],56:55,57:56,61:ne},{10:58,43:D,51:G,53:P,54:z,55:U},{68:59,74:[1,60],75:[1,61]},i(oe,[2,77]),i(oe,[2,78]),i(oe,[2,79]),i(oe,[2,80]),i(oe,[2,81]),i(d,[2,23]),i(d,[2,24]),i(d,[2,25]),{6:[1,63],7:5,8:6,9:o,10:8,21:u,23:g,25:R,27:_,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:v,37:k,38:m,39:B,40:W,41:X,43:D,46:Y,47:te,51:G,53:P,54:z,55:U},{12:ue,42:64,44:de,45:j,48:66,49:67,51:be,52:pe},i(_e,[2,41]),i(_e,[2,42]),{15:72,43:K,44:Z,45:j},{12:ue,42:73,44:de,45:j,48:66,49:67,51:be,52:pe},{6:me,9:Ee,19:[1,75],35:74,50:Se},{12:[1,79],14:[1,80]},i(d,[2,16],{67:35,11:81,16:[1,82],45:j,69:Re,70:ve,71:De,72:Le,73:we}),{18:[1,83]},i(d,[2,13]),{17:84,18:[2,63],56:55,57:56,61:ne},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:Re,70:ve,71:De,72:Le,73:we},i(Ze,[2,82]),i(Ze,[2,83]),i(d,[2,31]),i(d,Ke),{6:me,9:Ee,35:90,45:je,50:Se},{43:[1,92],44:[1,93]},i(qe,[2,47],{49:94,12:ue,44:de,51:be,52:pe}),i(J,[2,49]),i(J,[2,54]),i(J,[2,55]),i(J,[2,56]),i(J,[2,57]),i(d,[2,45],{45:j}),{6:me,9:Ee,35:95,45:je,50:Se},i(d,[2,32]),{10:97,36:96,43:D,51:G,53:P,54:z,55:U},i(d,[2,51]),i(d,[2,52]),i(d,[2,53]),{13:98,43:Te,53:Ce,76:Oe},{15:102,43:K,44:Z},{10:103,43:D,51:G,53:P,54:z,55:U},{17:104,18:[1,105],56:55,57:56,61:ne},i(d,[2,11]),{18:[2,64]},i(fe,[2,65],{59:106,60:107,63:108,65:We,66:He}),i([18,61,65,66],[2,71]),{61:[2,70]},i(d,[2,21],{14:[1,112],16:[1,111]}),i([43,51,53,54,55],[2,76]),i(d,[2,40]),{12:ue,44:de,48:113,49:67,51:be,52:pe},i(_e,[2,43]),i(_e,[2,44]),i(J,[2,50]),i(d,[2,46]),{10:115,20:[1,114],43:D,51:G,53:P,54:z,55:U},i(Qe,[2,34]),i(d,[2,7]),i(d,[2,84]),i(d,[2,85]),i(d,[2,86]),{12:[1,116],45:j},{12:[1,118],14:[1,117]},{18:[1,119]},i(d,[2,14]),i(fe,[2,66],{60:120,64:[1,121],66:He}),i(fe,[2,67]),i(Ve,[2,72]),i(fe,[2,75]),i(Ve,[2,74]),{17:122,18:[1,123],56:55,57:56,61:ne},{15:124,43:K,44:Z},i(qe,[2,48],{49:94,12:ue,44:de,51:be,52:pe}),{6:me,9:Ee,35:125,50:Se},i(Qe,[2,35]),{13:126,43:Te,53:Ce,76:Oe},{15:127,43:K,44:Z},{13:128,43:Te,53:Ce,76:Oe},i(d,[2,12]),i(fe,[2,68]),{63:129,65:We},{18:[1,130]},i(d,[2,19]),i(d,[2,22],{16:[1,131],45:j}),i(d,[2,33]),i(d,[2,10]),{12:[1,132],45:j},i(d,[2,9]),i(Ve,[2,73]),i(d,[2,17]),{17:133,18:[1,134],56:55,57:56,61:ne},{13:135,43:Te,53:Ce,76:Oe},{18:[1,136]},i(d,[2,20]),i(d,[2,8]),i(d,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:e(function(l,h){if(h.recoverable)this.trace(l);else{var f=Error(l);throw f.hash=h,f}},"parseError"),parse:e(function(l){var h=this,f=[0],n=[],O=[null],t=[],ke=this.table,a="",xe=0,Xe=0,Je=0,at=2,$e=1,nt=t.slice.call(arguments,1),x=Object.create(this.lexer),H={yy:{}};for(var Be in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Be))H.yy[Be]=this.yy[Be];if(x.setInput(l,H.yy),H.yy.lexer=x,H.yy.parser=this,typeof x.yylloc>"u")x.yylloc={};var Ge=x.yylloc;t.push(Ge);var ot=x.options&&x.options.ranges;if(typeof H.yy.parseError==="function")this.parseError=H.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function lt(M){f.length=f.length-2*M,O.length=O.length-M,t.length=t.length-M}e(lt,"popStack");function et(){var M=n.pop()||x.lex()||$e;if(typeof M!=="number"){if(M instanceof Array)n=M,M=n.pop();M=h.symbols_[M]||M}return M}e(et,"lex");var w,Ye,Q,V,kt,Pe,ee={},Ae,F,tt,Ie;while(!0){if(Q=f[f.length-1],this.defaultActions[Q])V=this.defaultActions[Q];else{if(w===null||typeof w>"u")w=et();V=ke[Q]&&ke[Q][w]}if(typeof V>"u"||!V.length||!V[0]){var ze="";Ie=[];for(Ae in ke[Q])if(this.terminals_[Ae]&&Ae>at)Ie.push("'"+this.terminals_[Ae]+"'");if(x.showPosition)ze="Parse error on line "+(xe+1)+`:
|
|
1
|
+
import{e,Zt,r,le,y,C,S,E,T,A,I,L,s,p,N,Fe,Xr,ce,ae,ie,ft,ge,ye}from"./chunk-wvdehm9y.js";import{Ot}from"./chunk-cjfssg3m.js";import{he}from"./chunk-bhsaj6qq.js";import{se}from"./chunk-p0kvmf28.js";var Ue=function(){var i=e(function(q,l,h,f){for(h=h||{},f=q.length;f--;h[q[f]]=l);return h},"o"),c=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],b=[2,2],o=[1,7],u=[1,9],g=[1,10],R=[1,11],_=[1,12],v=[1,30],k=[1,23],m=[1,24],B=[1,25],W=[1,26],X=[1,27],D=[1,19],Y=[1,28],te=[1,29],G=[1,20],P=[1,18],z=[1,21],U=[1,22],Ke=[2,6],d=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],Re=[1,36],ve=[1,37],De=[1,38],Le=[1,39],we=[1,40],re=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],K=[1,46],Z=[1,47],ne=[1,57],oe=[43,51,53,54,55,74,75],ue=[1,70],de=[1,68],j=[1,65],be=[1,69],pe=[1,71],_e=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],me=[1,78],Ee=[1,77],Se=[1,76],Ze=[69,70,71,72,73],je=[1,91],qe=[6,9,45,50],J=[6,9,12,44,45,50,51,52],Te=[1,101],Ce=[1,100],Oe=[1,99],fe=[18,61],We=[1,110],He=[1,109],Qe=[20,43,51,53,54,55],Ve=[18,61,64,66],Me={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:e(function(l,h,f,n,O,t,ke){var a=t.length-1;switch(O){case 1:break;case 2:this.$=[];break;case 3:this.$=t[a-1].concat(t[a]);break;case 4:this.$=t[a];break;case 5:case 6:this.$=[];break;case 7:n.addEntity(t[a-4]),n.addEntity(t[a-2]),n.addRelationship(t[a-4],t[a],t[a-2],t[a-3]),this.$=[t[a-4],t[a-2]];break;case 8:n.addEntity(t[a-8]),n.addEntity(t[a-4]),n.addRelationship(t[a-8],t[a],t[a-4],t[a-5]),n.setClass([t[a-8]],t[a-6]),n.setClass([t[a-4]],t[a-2]),this.$=[t[a-8],t[a-4]];break;case 9:n.addEntity(t[a-6]),n.addEntity(t[a-2]),n.addRelationship(t[a-6],t[a],t[a-2],t[a-3]),n.setClass([t[a-6]],t[a-4]),this.$=[t[a-6],t[a-2]];break;case 10:n.addEntity(t[a-6]),n.addEntity(t[a-4]),n.addRelationship(t[a-6],t[a],t[a-4],t[a-5]),n.setClass([t[a-4]],t[a-2]),this.$=[t[a-6],t[a-4]];break;case 11:n.addEntity(t[a-3]),n.addAttributes(t[a-3],t[a-1]),this.$=[t[a-3]];break;case 12:n.addEntity(t[a-5]),n.addAttributes(t[a-5],t[a-1]),n.setClass([t[a-5]],t[a-3]),this.$=[t[a-5]];break;case 13:n.addEntity(t[a-2]),this.$=[t[a-2]];break;case 14:n.addEntity(t[a-4]),n.setClass([t[a-4]],t[a-2]),this.$=[t[a-4]];break;case 15:n.addEntity(t[a]),this.$=[t[a]];break;case 16:n.addEntity(t[a-2]),n.setClass([t[a-2]],t[a]),this.$=[t[a-2]];break;case 17:n.addEntity(t[a-6],t[a-4]),n.addAttributes(t[a-6],t[a-1]),this.$=[t[a-6]];break;case 18:n.addEntity(t[a-8],t[a-6]),n.addAttributes(t[a-8],t[a-1]),n.setClass([t[a-8]],t[a-3]),this.$=[t[a-8]];break;case 19:n.addEntity(t[a-5],t[a-3]),this.$=[t[a-5]];break;case 20:n.addEntity(t[a-7],t[a-5]),n.setClass([t[a-7]],t[a-2]),this.$=[t[a-7]];break;case 21:n.addEntity(t[a-3],t[a-1]);break;case 22:n.addEntity(t[a-5],t[a-3]),n.setClass([t[a-5]],t[a]);break;case 23:case 24:this.$=t[a].trim(),n.setAccTitle(this.$);break;case 25:case 26:this.$=t[a].trim(),n.setAccDescription(this.$);break;case 27:if(!n.subgraphDepth)n.setDirection(t[a].value),this.$=[];else this.$=t[a];break;case 31:n.subgraphDepth=(n.subgraphDepth||1)-1,this.$=n.addSubGraph({text:t[a-2].id},t[a-1],{text:t[a-2].text});break;case 32:n.subgraphDepth=(n.subgraphDepth||0)+1,this.$={id:t[a-1],text:t[a-1]};break;case 33:n.subgraphDepth=(n.subgraphDepth||0)+1,this.$={id:t[a-4],text:t[a-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=t[a];break;case 35:this.$=t[a-1]+" "+t[a];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=t[a-3],n.addClass(t[a-2],t[a-1]);break;case 41:case 42:case 63:case 72:this.$=[t[a]];break;case 43:case 44:this.$=t[a-2].concat([t[a]]);break;case 45:this.$=t[a-2],n.setClass(t[a-1],t[a]);break;case 46:this.$=t[a-3],n.addCssStyles(t[a-2],t[a-1]);break;case 47:this.$=[t[a]];break;case 48:t[a-2].push(t[a]),this.$=t[a-2];break;case 50:this.$=t[a-1]+t[a];break;case 58:case 84:case 85:this.$=t[a].replace(/"/g,"");break;case 64:t[a].push(t[a-1]),this.$=t[a];break;case 65:this.$={type:t[a-1],name:t[a]};break;case 66:this.$={type:t[a-2],name:t[a-1],keys:t[a]};break;case 67:this.$={type:t[a-2],name:t[a-1],comment:t[a]};break;case 68:this.$={type:t[a-3],name:t[a-2],keys:t[a-1],comment:t[a]};break;case 69:case 71:case 74:this.$=t[a];break;case 70:this.$=t[a-1]+t[a];break;case 73:t[a-2].push(t[a]),this.$=t[a-2];break;case 75:this.$=t[a].replace(/"/g,"");break;case 76:this.$={cardA:t[a],relType:t[a-1],cardB:t[a-2]};break;case 77:this.$=n.Cardinality.ZERO_OR_ONE;break;case 78:this.$=n.Cardinality.ZERO_OR_MORE;break;case 79:this.$=n.Cardinality.ONE_OR_MORE;break;case 80:this.$=n.Cardinality.ONLY_ONE;break;case 81:this.$=n.Cardinality.MD_PARENT;break;case 82:this.$=n.Identification.NON_IDENTIFYING;break;case 83:this.$=n.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},i(c,b,{5:3}),{6:[1,4],7:5,8:6,9:o,10:8,21:u,23:g,25:R,27:_,28:13,29:14,30:15,31:16,32:17,34:v,37:k,38:m,39:B,40:W,41:X,43:D,46:Y,47:te,51:G,53:P,54:z,55:U},i(c,Ke,{1:[2,1]}),i(d,[2,3]),i(d,[2,4]),i(d,[2,5]),i(d,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:Re,70:ve,71:De,72:Le,73:we}),{22:[1,41]},{24:[1,42]},{26:[1,43]},i(d,[2,26]),i(d,[2,27]),i(d,[2,28]),i(d,[2,29]),i(d,[2,30]),i(d,b,{5:44}),i(re,[2,58]),i(re,[2,59]),i(re,[2,60]),i(re,[2,61]),i(re,[2,62]),i(d,[2,36]),i(d,[2,37]),i(d,[2,38]),i(d,[2,39]),{15:45,43:K,44:Z},{15:48,43:K,44:Z},{15:49,43:K,44:Z},{10:50,43:D,51:G,53:P,54:z,55:U},{10:51,43:D,51:G,53:P,54:z,55:U},{15:52,43:K,44:Z},{17:53,18:[1,54],56:55,57:56,61:ne},{10:58,43:D,51:G,53:P,54:z,55:U},{68:59,74:[1,60],75:[1,61]},i(oe,[2,77]),i(oe,[2,78]),i(oe,[2,79]),i(oe,[2,80]),i(oe,[2,81]),i(d,[2,23]),i(d,[2,24]),i(d,[2,25]),{6:[1,63],7:5,8:6,9:o,10:8,21:u,23:g,25:R,27:_,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:v,37:k,38:m,39:B,40:W,41:X,43:D,46:Y,47:te,51:G,53:P,54:z,55:U},{12:ue,42:64,44:de,45:j,48:66,49:67,51:be,52:pe},i(_e,[2,41]),i(_e,[2,42]),{15:72,43:K,44:Z,45:j},{12:ue,42:73,44:de,45:j,48:66,49:67,51:be,52:pe},{6:me,9:Ee,19:[1,75],35:74,50:Se},{12:[1,79],14:[1,80]},i(d,[2,16],{67:35,11:81,16:[1,82],45:j,69:Re,70:ve,71:De,72:Le,73:we}),{18:[1,83]},i(d,[2,13]),{17:84,18:[2,63],56:55,57:56,61:ne},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:Re,70:ve,71:De,72:Le,73:we},i(Ze,[2,82]),i(Ze,[2,83]),i(d,[2,31]),i(d,Ke),{6:me,9:Ee,35:90,45:je,50:Se},{43:[1,92],44:[1,93]},i(qe,[2,47],{49:94,12:ue,44:de,51:be,52:pe}),i(J,[2,49]),i(J,[2,54]),i(J,[2,55]),i(J,[2,56]),i(J,[2,57]),i(d,[2,45],{45:j}),{6:me,9:Ee,35:95,45:je,50:Se},i(d,[2,32]),{10:97,36:96,43:D,51:G,53:P,54:z,55:U},i(d,[2,51]),i(d,[2,52]),i(d,[2,53]),{13:98,43:Te,53:Ce,76:Oe},{15:102,43:K,44:Z},{10:103,43:D,51:G,53:P,54:z,55:U},{17:104,18:[1,105],56:55,57:56,61:ne},i(d,[2,11]),{18:[2,64]},i(fe,[2,65],{59:106,60:107,63:108,65:We,66:He}),i([18,61,65,66],[2,71]),{61:[2,70]},i(d,[2,21],{14:[1,112],16:[1,111]}),i([43,51,53,54,55],[2,76]),i(d,[2,40]),{12:ue,44:de,48:113,49:67,51:be,52:pe},i(_e,[2,43]),i(_e,[2,44]),i(J,[2,50]),i(d,[2,46]),{10:115,20:[1,114],43:D,51:G,53:P,54:z,55:U},i(Qe,[2,34]),i(d,[2,7]),i(d,[2,84]),i(d,[2,85]),i(d,[2,86]),{12:[1,116],45:j},{12:[1,118],14:[1,117]},{18:[1,119]},i(d,[2,14]),i(fe,[2,66],{60:120,64:[1,121],66:He}),i(fe,[2,67]),i(Ve,[2,72]),i(fe,[2,75]),i(Ve,[2,74]),{17:122,18:[1,123],56:55,57:56,61:ne},{15:124,43:K,44:Z},i(qe,[2,48],{49:94,12:ue,44:de,51:be,52:pe}),{6:me,9:Ee,35:125,50:Se},i(Qe,[2,35]),{13:126,43:Te,53:Ce,76:Oe},{15:127,43:K,44:Z},{13:128,43:Te,53:Ce,76:Oe},i(d,[2,12]),i(fe,[2,68]),{63:129,65:We},{18:[1,130]},i(d,[2,19]),i(d,[2,22],{16:[1,131],45:j}),i(d,[2,33]),i(d,[2,10]),{12:[1,132],45:j},i(d,[2,9]),i(Ve,[2,73]),i(d,[2,17]),{17:133,18:[1,134],56:55,57:56,61:ne},{13:135,43:Te,53:Ce,76:Oe},{18:[1,136]},i(d,[2,20]),i(d,[2,8]),i(d,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:e(function(l,h){if(h.recoverable)this.trace(l);else{var f=Error(l);throw f.hash=h,f}},"parseError"),parse:e(function(l){var h=this,f=[0],n=[],O=[null],t=[],ke=this.table,a="",xe=0,Xe=0,Je=0,at=2,$e=1,nt=t.slice.call(arguments,1),x=Object.create(this.lexer),H={yy:{}};for(var Be in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Be))H.yy[Be]=this.yy[Be];if(x.setInput(l,H.yy),H.yy.lexer=x,H.yy.parser=this,typeof x.yylloc>"u")x.yylloc={};var Ge=x.yylloc;t.push(Ge);var ot=x.options&&x.options.ranges;if(typeof H.yy.parseError==="function")this.parseError=H.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function lt(M){f.length=f.length-2*M,O.length=O.length-M,t.length=t.length-M}e(lt,"popStack");function et(){var M=n.pop()||x.lex()||$e;if(typeof M!=="number"){if(M instanceof Array)n=M,M=n.pop();M=h.symbols_[M]||M}return M}e(et,"lex");var w,Ye,Q,V,kt,Pe,ee={},Ae,F,tt,Ie;while(!0){if(Q=f[f.length-1],this.defaultActions[Q])V=this.defaultActions[Q];else{if(w===null||typeof w>"u")w=et();V=ke[Q]&&ke[Q][w]}if(typeof V>"u"||!V.length||!V[0]){var ze="";Ie=[];for(Ae in ke[Q])if(this.terminals_[Ae]&&Ae>at)Ie.push("'"+this.terminals_[Ae]+"'");if(x.showPosition)ze="Parse error on line "+(xe+1)+`:
|
|
2
2
|
`+x.showPosition()+`
|
|
3
3
|
Expecting `+Ie.join(", ")+", got '"+(this.terminals_[w]||w)+"'";else ze="Parse error on line "+(xe+1)+": Unexpected "+(w==$e?"end of input":"'"+(this.terminals_[w]||w)+"'");this.parseError(ze,{text:x.match,token:this.terminals_[w]||w,line:x.yylineno,loc:Ge,expected:Ie})}if(V[0]instanceof Array&&V.length>1)throw Error("Parse Error: multiple actions possible at state: "+Q+", token: "+w);switch(V[0]){case 1:if(f.push(w),O.push(x.yytext),t.push(x.yylloc),f.push(V[1]),w=null,!Ye){if(Xe=x.yyleng,a=x.yytext,xe=x.yylineno,Ge=x.yylloc,Je>0)Je--}else w=Ye,Ye=null;break;case 2:if(F=this.productions_[V[1]][1],ee.$=O[O.length-F],ee._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},ot)ee._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]];if(Pe=this.performAction.apply(ee,[a,Xe,xe,H.yy,V[1],O,t].concat(nt)),typeof Pe<"u")return Pe;if(F)f=f.slice(0,-1*F*2),O=O.slice(0,-1*F),t=t.slice(0,-1*F);f.push(this.productions_[V[1]][0]),O.push(ee.$),t.push(ee._$),tt=ke[f[f.length-2]][f[f.length-1]],f.push(tt);break;case 3:return!0}}return!0},"parse")},rt=function(){var q={EOF:1,parseError:e(function(h,f){if(this.yy.parser)this.yy.parser.parseError(h,f);else throw Error(h)},"parseError"),setInput:e(function(l,h){if(this.yy=h||this.yy||{},this._input=l,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];return this.offset=0,this},"setInput"),input:e(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var h=l.match(/(?:\r\n?|\n).*/g);if(h)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),l},"input"),unput:e(function(l){var h=l.length,f=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var n=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),f.length-1)this.yylineno-=f.length-1;var O=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:f?(f.length===n.length?this.yylloc.first_column:0)+n[n.length-f.length].length-f[0].length:this.yylloc.first_column-h},this.options.ranges)this.yylloc.range=[O[0],O[0]+this.yyleng-h];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(l){this.unput(this.match.slice(l))},"less"),pastInput:e(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var l=this.match;if(l.length<20)l+=this._input.substr(0,20-l.length);return(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var l=this.pastInput(),h=Array(l.length+1).join("-");return l+this.upcomingInput()+`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e,r,b,s,N,M,Ct,St,go,ht,Qt,yo,Wn,Me,vo,Vi,Tt,Gi,Jt,Yn}from"./chunk-
|
|
1
|
+
import{e,r,b,s,N,M,Ct,St,go,ht,Qt,yo,Wn,Me,vo,Vi,Tt,Gi,Jt,Yn}from"./chunk-wvdehm9y.js";import{Q}from"./chunk-fh2vj0wv.js";import{x}from"./chunk-4bzqrwr0.js";function sa(t,{edgePathsClass:i="edges edgePaths"}={}){let n=t.insert("g").attr("class","root"),a=n.insert("g").attr("class","clusters"),o=n.insert("g").attr("class",i),c=n.insert("g").attr("class","edgeLabels"),u=n.insert("g").attr("class","nodes");return{clusters:a,edgePaths:o,edgeLabels:c,nodes:u,rootGroups:n}}e(sa,"createLayoutElementGroups");async function S(t,i,n){if(i.label){let{shapeSvg:a,bbox:o}=await M(t,n===void 0?i:{...i,width:n});i.labelBBox={width:o.width,height:o.height},a.remove()}else i.labelBBox={width:0,height:0}}e(S,"measureGroupLabel");async function la(t,i,n){let a=await St(t,i,n),o=a.node()?.getBBox()??{width:0,height:0};return i.width=o.width,i.height=o.height,a}e(la,"insertMeasuredNode");function k(t,i,n){let a=t,o=new Set;while(a){if(a.dir)return a.dir;if(!a.parentId||o.has(a.parentId))break;o.add(a.parentId),a=i.get(a.parentId)}return n}e(k,"resolveNodeDir");async function R(t,i,n={}){let a=new Q({multigraph:!0,compound:!0}),o=[...i.edges],c=s(),u=sa(t),{edgeLabels:d,nodes:l}=u,g=new Map,h=new Map(i.nodes.map((f)=>[f.id,f])),C=i.direction,w=t.node()!=null;await Promise.all(i.nodes.map(async(f)=>{if(f.isGroup){if(w){let p=n.unwrapGroupLabels&&f.labelType!=="markdown";await S(l,f,p?Number.POSITIVE_INFINITY:void 0)}a.setNode(f.id,{...f})}else{if(w){let p=await la(l,f,{config:c,dir:k(f,h,C)});g.set(f.id,p)}a.setNode(f.id,{...f})}}));for(let f of o){if(w&&Vi(f))await Tt(d,f);if(a.setEdge(f.start,f.end,{...f},f.id),!i.edges.some((E)=>E.id===f.id))i.edges.push(f)}if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:f}=await (x("pjkdrgm0"),import("./chunk-pjkdrgm0.js"));f(t,i)}return{graph:a,groups:u,nodeElements:g}}e(R,"createGraphWithElements");var G=new Map,m=new Map,T=new Map,Z=e(()=>{m.clear(),T.clear(),G.clear()},"clear"),v=e((t,i)=>{let n=m.get(i)||[];return r.trace("In isDescendant",i," ",t," = ",n.includes(t)),n.includes(t)},"isDescendant"),I=e((t,i)=>{let n=m.get(i)||[];if(r.info("Descendants of ",i," is ",n),r.info("Edge is ",t),t.v===i||t.w===i)return!1;if(!n)return r.debug("Tilt, ",i,",not in descendants"),!1;return n.includes(t.v)||v(t.v,i)||v(t.w,i)||n.includes(t.w)},"edgeInCluster"),P=e((t,i,n,a)=>{r.debug("Copying children of ",t,"root",a,"data",i.node(t),a);let o=i.children(t)||[];if(t!==a)o.push(t);r.debug("Copying (nodes) clusterId",t,"nodes",o),o.forEach((c)=>{if(i.children(c).length>0)P(c,i,n,a);else{let u=i.node(c);if(r.info("cp ",c," to ",a," with parent ",t),n.setNode(c,u),a!==i.parent(c))r.debug("Setting parent",c,i.parent(c)),n.setParent(c,i.parent(c));if(t!==a&&c!==t)r.debug("Setting parent",c,t),n.setParent(c,t);else r.info("In copy ",t,"root",a,"data",i.node(t),a),r.debug("Not Setting parent for node=",c,"cluster!==rootId",t!==a,"node!==clusterId",c!==t);let d=i.edges(c);r.debug("Copying Edges",d),d.forEach((l)=>{r.info("Edge",l);let g=i.edge(l.v,l.w,l.name);r.info("Edge data",g,a);try{if(I(l,a))r.info("Copying as ",l.v,l.w,g,l.name),n.setEdge(l.v,l.w,g,l.name),r.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]));else r.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",a," clusterId:",t)}catch(h){r.error(h)}})}r.debug("Removing node",c),i.removeNode(c)})},"copy"),B=e((t,i)=>{let n=i.children(t),a=[...n];for(let o of n)T.set(o,t),a=[...a,...B(o,i)];return a},"extractDescendants"),ee=e((t,i,n)=>{let a=t.edges().filter((l)=>l.v===i||l.w===i),o=t.edges().filter((l)=>l.v===n||l.w===n),c=a.map((l)=>({v:l.v===i?n:l.v,w:l.w===i?i:l.w})),u=o.map((l)=>({v:l.v,w:l.w}));return c.filter((l)=>u.some((g)=>l.v===g.v&&l.w===g.w))},"findCommonEdges"),$n=e((t,i,n)=>{let a=i.children(t);if(r.trace("Searching children of id ",t,a),a.length<1)return t;let o;for(let c of a){let u=$n(c,i,n),d=ee(i,n,u);if(u)if(d.length>0)o=u;else return u}return o},"findNonClusterChild"),D=e((t)=>{if(!G.has(t))return t;if(!G.get(t).externalConnections)return t;if(G.has(t))return G.get(t).id;return t},"getAnchorId"),eo=e((t,i)=>{if(!t||i>10){r.debug("Opting out, no graph ");return}else r.debug("Opting in, graph ");t.nodes().forEach(function(n){if(t.children(n).length>0)r.debug("Cluster identified",n," Replacement id in edges: ",$n(n,t,n)),m.set(n,B(n,t)),G.set(n,{id:$n(n,t,n),clusterData:t.node(n)})}),t.nodes().forEach(function(n){let a=t.children(n),o=t.edges();if(a.length>0)r.debug("Cluster identified",n,m),o.forEach((c)=>{let u=v(c.v,n),d=v(c.w,n);if(u^d)r.debug("Edge: ",c," leaves cluster ",n),r.debug("Descendants of XXX ",n,": ",m.get(n)),G.get(n).externalConnections=!0});else r.debug("Not a cluster ",n,m)});for(let n of G.keys()){let a=G.get(n).id,o=t.parent(a);if(o!==n&&G.has(o)&&!G.get(o).externalConnections)G.get(n).id=o;let c=t.edges().some((u)=>u.v===n);if(a&&G.get(n)?.externalConnections&&c&&_(t,a,n)){let u=te(t,n,t.parent(a));if(u)G.get(n).id=u}}t.edges().forEach(function(n){let a=t.edge(n);r.debug("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),r.debug("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(t.edge(n)));let{v:o,w:c}=n;if(r.debug("Fix XXX",G,"ids:",n.v,n.w,"Translating: ",G.get(n.v)," --- ",G.get(n.w)),G.get(n.v)||G.get(n.w)){if(r.debug("Fixing and trying - removing XXX",n.v,n.w,n.name),o=D(n.v),c=D(n.w),t.removeEdge(n.v,n.w,n.name),o!==n.v){let u=t.parent(o);G.get(u).externalConnections=!0,a.fromCluster=n.v}if(c!==n.w){let u=t.parent(c);G.get(u).externalConnections=!0,a.toCluster=n.w}r.debug("Fix Replacing with XXX",o,c,n.name),t.setEdge(o,c,a,n.name)}}),A(t,0),r.trace(G)},"adjustClustersAndEdges"),A=e((t,i)=>{if(i>10){r.error("Bailing out");return}let n=t.nodes(),a=!1;for(let o of n){let c=t.children(o);a=a||c.length>0}if(!a){r.debug("Done, no node has children",t.nodes());return}r.debug("Nodes = ",n,i);for(let o of n)if(r.debug("Extracting node",o,G,G.has(o)&&!G.get(o).externalConnections,!t.parent(o),t.node(o),t.children("D")," Depth ",i),!G.has(o))r.debug("Not a cluster",o,i);else if(!G.get(o).externalConnections&&t.children(o)&&t.children(o).length>0){r.debug("Cluster without external connections, without a parent and with children",o,i);let u=t.graph().rankdir==="TB"?"LR":"TB";if(G.get(o)?.clusterData?.dir)u=G.get(o).clusterData.dir,r.debug("Fixing dir",G.get(o).clusterData.dir,u);let d=new Q({multigraph:!0,compound:!0}).setGraph({rankdir:u,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});P(o,t,d,o),t.setNode(o,{clusterNode:!0,id:o,clusterData:G.get(o).clusterData,label:G.get(o).label,graph:d})}else r.debug("Cluster ** ",o," **not meeting the criteria !externalConnections:",!G.get(o).externalConnections," no parent: ",!t.parent(o)," children ",t.children(o)&&t.children(o).length>0,t.children("D"),i),r.debug(G);n=t.nodes(),r.debug("New list of nodes",n);for(let o of n){let c=t.node(o);if(r.debug(" Now next level",o,c),c?.clusterNode)A(c.graph,i+1)}},"extractor"),X=e((t,i)=>{if(i.length===0)return[];let n=Object.assign([],i);return i.forEach((a)=>{let o=t.children(a),c=X(t,o);n=[...n,...c]}),n},"sorter"),ca=e((t)=>X(t,t.children()),"sortNodesByHierarchy"),_=e((t,i,n)=>{let a=t.parent(i);while(a&&a!==n){let o=G.get(a);if(o&&!o.externalConnections)return!0;a=t.parent(a)}return!1},"isNodeInExtractableCluster"),te=e((t,i,n)=>{let a=t.children(i)??[];for(let o of a){if(o===n||v(o,n))continue;let c=$n(o,t,i);if(!c)continue;if(!_(t,c,i))return c}return null},"findSafeAnchorNode");function lr({prepareLayout:t,measureLayout:i,runLayoutCore:n,paintLayout:a,afterPaint:o,paintOptions:c}){let u=i??F;return e(async function(l,g,h,C){let w=g.select("g");(h?.insertMarkers??Yn)(w,l.markers,l.type,l.diagramId),O();let f={element:w,helpers:h,options:C};f.preparedLayout=await t?.(l,f);let p=await u(l,f),E=await n(l,f),y={...f,measure:p};if(a)await a(l,y,E);else await j(l,y,c);await o?.(l,y,E)},"render")}e(lr,"createCommonLayoutRenderer");function O(){go(),vo(),yo(),Z()}e(O,"clearLayoutRenderState");async function F(t,{element:i},n){return await R(i,t,n)}e(F,"defaultMeasureLayout");async function j(t,i,n={}){let{measure:a}=i,{groups:o}=a;for(let u of n.getNodes?.(t,i)??t.nodes){if(n.skipNode?.(u,i))continue;await H(o,u,i,n)}let c=J(t.nodes);for(let u of t.edges){if(W(u,n))continue;await V(o,u,c,t,n,i)}}e(j,"paintLayoutData");async function H(t,i,n,a){if(i.clusterNode)ht(i);else if(z(i,n,a))await Qt(t.clusters,i);else ht(i)}e(H,"paintLayoutNode");function z(t,i,n){return t.isGroup===!0&&(n.isCluster?.(t,i)??!0)}e(z,"shouldPaintAsCluster");function J(t){let i=new Map;for(let n of t)if(n?.id)i.set(n.id,n);return i}e(J,"buildNodeLookup");function W(t,i){return t.isLayoutOnly||Boolean(i.skipEdge?.(t))}e(W,"shouldSkipPaintEdge");async function V(t,i,n,a,o,c){let u=Jt(t.edgePaths,{...i},o.clusterDb??new Map,a.type,L(i.start,i,n,c,o),L(i.end,i,n,c,o),a.diagramId,Y(i,o),a.layoutAlgorithm);if(Vi(i)){if(!Wn.has(i.id))await Tt(t.edgeLabels,i);q(i,u)}}e(V,"paintLayoutEdge");function L(t,i,n,a,o){return o.getEdgeNode?.(t,i,a)??(t?n.get(t)??{}:{})}e(L,"getRenderedNode");function Y(t,i){return typeof i.skipIntersect==="function"?i.skipIntersect(t):i.skipIntersect??!1}e(Y,"shouldSkipIntersect");function q(t,i){let n=i?.updatedPath??i?.originalPath,a=b(),{subGraphTitleTotalMargin:o}=Ct({flowchart:a.flowchart??{}});if(t.label){let c=Wn.get(t.id),{x:u,y:d}=Gi(t,i);c.attr("transform",`translate(${u}, ${d+o/2})`)}for(let[c,u]of[["startLeft",t.startLabelLeft],["startRight",t.startLabelRight],["endLeft",t.endLabelLeft],["endRight",t.endLabelRight]])if(u){let{x:d,y:l}=K(t,c,n);Me.get(t.id)[c].attr("transform",`translate(${d}, ${l})`)}}e(q,"positionRenderedEdgeLabel");var ne={startLeft:"start_left",startRight:"start_right",endLeft:"end_left",endRight:"end_right"};function K(t,i,n){let a=t.terminalLabelCenters?.[i];if(a)return{...a};if(!n)return{x:t.x,y:t.y};let o=i.startsWith("start")?t.arrowTypeStart:t.arrowTypeEnd;return N.calcTerminalLabelPosition(o?10:0,ne[i],n)}e(K,"terminalLabelTranslate");
|
|
2
2
|
export{sa,la,G,$n,eo,ca,lr};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{l}from"./chunk-
|
|
1
|
+
import{l}from"./chunk-4bzqrwr0.js";var c=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],gn=l("circle-check",c);
|
|
2
2
|
export{gn};
|