markdown-markdown 0.2.0 → 0.2.1
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/AGENT.md +12 -0
- package/dist/cli.js +0 -0
- package/dist/server/host.d.ts +20 -0
- package/dist/server/host.d.ts.map +1 -0
- package/dist/server/host.js +190 -0
- package/dist/server/host.js.map +1 -0
- package/dist/server/runtime.d.ts +2 -2
- package/dist/server/runtime.d.ts.map +1 -1
- package/dist/server/runtime.js +13 -61
- package/dist/server/runtime.js.map +1 -1
- package/dist/server/session-store.d.ts +15 -0
- package/dist/server/session-store.d.ts.map +1 -0
- package/dist/server/session-store.js +151 -0
- package/dist/server/session-store.js.map +1 -0
- package/dist/types.d.ts +29 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/web/assets/{_baseUniq-DWSAgCYE.js → _baseUniq-nFqJWqJf.js} +1 -1
- package/dist/web/assets/{arc-BLgyBygL.js → arc-Jg9CFoKt.js} +1 -1
- package/dist/web/assets/{architectureDiagram-Q4EWVU46-WgZ5UMvM.js → architectureDiagram-Q4EWVU46-DYR5Lm08.js} +1 -1
- package/dist/web/assets/{blockDiagram-DXYQGD6D-CLfiyr9S.js → blockDiagram-DXYQGD6D-30J7_LoM.js} +1 -1
- package/dist/web/assets/{c4Diagram-AHTNJAMY-DetWrVzN.js → c4Diagram-AHTNJAMY-BClBvNDA.js} +1 -1
- package/dist/web/assets/channel-B-PozOMc.js +1 -0
- package/dist/web/assets/{chunk-4BX2VUAB-CwFW4HRp.js → chunk-4BX2VUAB-Bgzv4fI5.js} +1 -1
- package/dist/web/assets/{chunk-4TB4RGXK-jdkxDJTI.js → chunk-4TB4RGXK-BKN4Lng_.js} +1 -1
- package/dist/web/assets/{chunk-55IACEB6-LHLQ9Mhr.js → chunk-55IACEB6-CXq43BG4.js} +1 -1
- package/dist/web/assets/{chunk-EDXVE4YY-gXBG7iiV.js → chunk-EDXVE4YY-DokDvDhv.js} +1 -1
- package/dist/web/assets/{chunk-FMBD7UC4-D0c2ufl0.js → chunk-FMBD7UC4-BNN1454L.js} +1 -1
- package/dist/web/assets/{chunk-OYMX7WX6-Cam5t0AC.js → chunk-OYMX7WX6-CMHPjdY3.js} +1 -1
- package/dist/web/assets/{chunk-QZHKN3VN-VDTy7PR1.js → chunk-QZHKN3VN-D9Xdgwdu.js} +1 -1
- package/dist/web/assets/{chunk-YZCP3GAM-DDQlY4hF.js → chunk-YZCP3GAM-CNVT9piY.js} +1 -1
- package/dist/web/assets/classDiagram-6PBFFD2Q-DZU9TAgg.js +1 -0
- package/dist/web/assets/classDiagram-v2-HSJHXN6E-DZU9TAgg.js +1 -0
- package/dist/web/assets/clone-BUwPWatq.js +1 -0
- package/dist/web/assets/{cose-bilkent-S5V4N54A-CydpJVOO.js → cose-bilkent-S5V4N54A-Bhn6pAUV.js} +1 -1
- package/dist/web/assets/{dagre-KV5264BT-DfWRqVQs.js → dagre-KV5264BT-C4y39Usr.js} +1 -1
- package/dist/web/assets/{diagram-5BDNPKRD-DYocjsGb.js → diagram-5BDNPKRD-rlvQhIY0.js} +1 -1
- package/dist/web/assets/{diagram-G4DWMVQ6-BwxP9kS5.js → diagram-G4DWMVQ6-CxlsuhBt.js} +1 -1
- package/dist/web/assets/{diagram-MMDJMWI5-BmV1mUfz.js → diagram-MMDJMWI5-aO59UQJW.js} +1 -1
- package/dist/web/assets/{diagram-TYMM5635-DMUZyCDV.js → diagram-TYMM5635-DboqCGxD.js} +1 -1
- package/dist/web/assets/{erDiagram-SMLLAGMA-CDgJ2VS3.js → erDiagram-SMLLAGMA-BfTNK70Y.js} +1 -1
- package/dist/web/assets/{flowDiagram-DWJPFMVM-aLxzOWpe.js → flowDiagram-DWJPFMVM-D5GqUELM.js} +1 -1
- package/dist/web/assets/{ganttDiagram-T4ZO3ILL-ct-v0U4O.js → ganttDiagram-T4ZO3ILL-0oluOY8-.js} +1 -1
- package/dist/web/assets/{gitGraphDiagram-UUTBAWPF-DJ-FLYU_.js → gitGraphDiagram-UUTBAWPF-DOvCDomy.js} +1 -1
- package/dist/web/assets/{graph-DUCnU9ms.js → graph-D6tF7y1b.js} +1 -1
- package/dist/web/assets/index-4xbK2CF5.css +1 -0
- package/dist/web/assets/{index-D7013kRO.js → index-CLPXS5Pa.js} +140 -140
- package/dist/web/assets/{infoDiagram-42DDH7IO-DmMBz9mk.js → infoDiagram-42DDH7IO-DzqzFgrP.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-UXIWVN3A-D-dfZT_7.js → ishikawaDiagram-UXIWVN3A-WJU0OO5B.js} +1 -1
- package/dist/web/assets/{journeyDiagram-VCZTEJTY-DCLyO8ny.js → journeyDiagram-VCZTEJTY-Bo7zyWBb.js} +1 -1
- package/dist/web/assets/{kanban-definition-6JOO6SKY-DaSer7-n.js → kanban-definition-6JOO6SKY-DqDWBbmi.js} +1 -1
- package/dist/web/assets/{layout-BaZRT940.js → layout-eCIhMhgM.js} +1 -1
- package/dist/web/assets/{linear-CH1vCRmv.js → linear-DhP7p6ZM.js} +1 -1
- package/dist/web/assets/{min-C200fz71.js → min-CmgCLj3n.js} +1 -1
- package/dist/web/assets/{mindmap-definition-QFDTVHPH-CCqZjE9I.js → mindmap-definition-QFDTVHPH-B7bz994e.js} +1 -1
- package/dist/web/assets/{pieDiagram-DEJITSTG-Beh4XRu6.js → pieDiagram-DEJITSTG-DlKyyMAM.js} +1 -1
- package/dist/web/assets/{quadrantDiagram-34T5L4WZ-DOPc33qF.js → quadrantDiagram-34T5L4WZ-B3C_LSAl.js} +1 -1
- package/dist/web/assets/{requirementDiagram-MS252O5E-DwblBLZK.js → requirementDiagram-MS252O5E-D7q7Uv1-.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-XADWPNL6-DlMTDWAl.js → sankeyDiagram-XADWPNL6-B3AHI7j9.js} +1 -1
- package/dist/web/assets/{sequenceDiagram-FGHM5R23-CPvNK8NS.js → sequenceDiagram-FGHM5R23-C0ym1rK1.js} +1 -1
- package/dist/web/assets/{stateDiagram-FHFEXIEX-C51anF0K.js → stateDiagram-FHFEXIEX-_NYky71o.js} +1 -1
- package/dist/web/assets/stateDiagram-v2-QKLJ7IA2-BMjcTPNs.js +1 -0
- package/dist/web/assets/{timeline-definition-GMOUNBTQ-B0M6txNM.js → timeline-definition-GMOUNBTQ-BPub2z2y.js} +1 -1
- package/dist/web/assets/{vennDiagram-DHZGUBPP-DuNg6iKA.js → vennDiagram-DHZGUBPP-B1ao3Y4V.js} +1 -1
- package/dist/web/assets/{wardley-RL74JXVD-CnLmvQxW.js → wardley-RL74JXVD-xqk6dIJX.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-NUSXRM2D-DVMWnQbQ.js → wardleyDiagram-NUSXRM2D-DHkUBrSw.js} +1 -1
- package/dist/web/assets/{xychartDiagram-5P7HB3ND-Cec8luZO.js → xychartDiagram-5P7HB3ND-D62ziF_o.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +2 -4
- package/dist/web/assets/channel-B52zE7C-.js +0 -1
- package/dist/web/assets/classDiagram-6PBFFD2Q-Bn5mNtvt.js +0 -1
- package/dist/web/assets/classDiagram-v2-HSJHXN6E-Bn5mNtvt.js +0 -1
- package/dist/web/assets/clone-CWdO33LD.js +0 -1
- package/dist/web/assets/index-Lxs7QZQJ.css +0 -1
- package/dist/web/assets/stateDiagram-v2-QKLJ7IA2-DgIcCuV2.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as g,n as er,c as j,d as Bt,l as st,j as Me,e as rr,f as ar,k as P,b as De,s as sr,p as ir,a as nr,g as or,q as cr,t as lr,J as hr,z as dr,i as Vt,u as Z,L as $,M as mt,N as Be,Z as Tr,D as Wt,O as pr,P as Ve}from"./index-D7013kRO.js";import{a as Er,b as re,g as dt,d as ur,e as ae,f as se}from"./chunk-YZCP3GAM-DDQlY4hF.js";import{I as fr}from"./chunk-QZHKN3VN-VDTy7PR1.js";var jt=(function(){var e=g(function(ut,N,v,k){for(v=v||{},k=ut.length;k--;v[ut[k]]=N);return v},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],n=[1,9],s=[1,11],c=[1,12],E=[1,14],d=[1,15],l=[1,17],x=[1,18],u=[1,19],O=[1,25],p=[1,26],f=[1,27],_=[1,28],I=[1,29],L=[1,30],b=[1,31],m=[1,32],w=[1,33],S=[1,34],Y=[1,35],M=[1,36],V=[1,37],U=[1,38],G=[1,39],X=[1,40],Q=[1,42],q=[1,43],it=[1,44],tt=[1,45],nt=[1,46],W=[1,47],C=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],Pt=[1,74],A=[1,80],D=[1,81],et=[1,82],rt=[1,83],K=[1,84],ie=[1,85],ne=[1,86],oe=[1,87],ce=[1,88],le=[1,89],he=[1,90],de=[1,91],Te=[1,92],pe=[1,93],Ee=[1,94],ue=[1,95],fe=[1,96],_e=[1,97],ge=[1,98],xe=[1,99],Ie=[1,100],ye=[1,101],Re=[1,102],Oe=[1,103],Le=[1,104],be=[1,105],Ae=[2,78],St=[4,5,17,51,53,54],kt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],Se=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],zt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],we=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Ut=[5,52],F=[70,71,72,73],ct=[1,151],Gt={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:g(function(N,v,k,y,z,o,wt){var T=o.length-1;switch(z){case 3:return y.apply(o[T]),o[T];case 4:case 10:this.$=[];break;case 5:case 11:o[T-1].push(o[T]),this.$=o[T-1];break;case 6:case 7:case 12:case 13:this.$=o[T];break;case 8:case 9:case 14:this.$=[];break;case 16:o[T].type="createParticipant",this.$=o[T];break;case 17:o[T-1].unshift({type:"boxStart",boxData:y.parseBoxData(o[T-2])}),o[T-1].push({type:"boxEnd",boxText:o[T-2]}),this.$=o[T-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(o[T-2]),sequenceIndexStep:Number(o[T-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(o[T-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:o[T-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:o[T-1].actor};break;case 30:y.setDiagramTitle(o[T].substring(6)),this.$=o[T].substring(6);break;case 31:y.setDiagramTitle(o[T].substring(7)),this.$=o[T].substring(7);break;case 32:this.$=o[T].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=o[T].trim(),y.setAccDescription(this.$);break;case 35:o[T-1].unshift({type:"loopStart",loopText:y.parseMessage(o[T-2]),signalType:y.LINETYPE.LOOP_START}),o[T-1].push({type:"loopEnd",loopText:o[T-2],signalType:y.LINETYPE.LOOP_END}),this.$=o[T-1];break;case 36:o[T-1].unshift({type:"rectStart",color:y.parseMessage(o[T-2]),signalType:y.LINETYPE.RECT_START}),o[T-1].push({type:"rectEnd",color:y.parseMessage(o[T-2]),signalType:y.LINETYPE.RECT_END}),this.$=o[T-1];break;case 37:o[T-1].unshift({type:"optStart",optText:y.parseMessage(o[T-2]),signalType:y.LINETYPE.OPT_START}),o[T-1].push({type:"optEnd",optText:y.parseMessage(o[T-2]),signalType:y.LINETYPE.OPT_END}),this.$=o[T-1];break;case 38:o[T-1].unshift({type:"altStart",altText:y.parseMessage(o[T-2]),signalType:y.LINETYPE.ALT_START}),o[T-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=o[T-1];break;case 39:o[T-1].unshift({type:"parStart",parText:y.parseMessage(o[T-2]),signalType:y.LINETYPE.PAR_START}),o[T-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=o[T-1];break;case 40:o[T-1].unshift({type:"parStart",parText:y.parseMessage(o[T-2]),signalType:y.LINETYPE.PAR_OVER_START}),o[T-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=o[T-1];break;case 41:o[T-1].unshift({type:"criticalStart",criticalText:y.parseMessage(o[T-2]),signalType:y.LINETYPE.CRITICAL_START}),o[T-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=o[T-1];break;case 42:o[T-1].unshift({type:"breakStart",breakText:y.parseMessage(o[T-2]),signalType:y.LINETYPE.BREAK_START}),o[T-1].push({type:"breakEnd",optText:y.parseMessage(o[T-2]),signalType:y.LINETYPE.BREAK_END}),this.$=o[T-1];break;case 44:this.$=o[T-3].concat([{type:"option",optionText:y.parseMessage(o[T-1]),signalType:y.LINETYPE.CRITICAL_OPTION},o[T]]);break;case 46:this.$=o[T-3].concat([{type:"and",parText:y.parseMessage(o[T-1]),signalType:y.LINETYPE.PAR_AND},o[T]]);break;case 48:this.$=o[T-3].concat([{type:"else",altText:y.parseMessage(o[T-1]),signalType:y.LINETYPE.ALT_ELSE},o[T]]);break;case 49:o[T-3].draw="participant",o[T-3].type="addParticipant",o[T-3].description=y.parseMessage(o[T-1]),this.$=o[T-3];break;case 50:o[T-1].draw="participant",o[T-1].type="addParticipant",this.$=o[T-1];break;case 51:o[T-3].draw="actor",o[T-3].type="addParticipant",o[T-3].description=y.parseMessage(o[T-1]),this.$=o[T-3];break;case 52:case 57:o[T-1].draw="actor",o[T-1].type="addParticipant",this.$=o[T-1];break;case 53:o[T-1].type="destroyParticipant",this.$=o[T-1];break;case 54:o[T-3].draw="participant",o[T-3].type="addParticipant",o[T-3].description=y.parseMessage(o[T-1]),this.$=o[T-3];break;case 55:o[T-1].draw="participant",o[T-1].type="addParticipant",this.$=o[T-1];break;case 56:o[T-3].draw="actor",o[T-3].type="addParticipant",o[T-3].description=y.parseMessage(o[T-1]),this.$=o[T-3];break;case 58:this.$=[o[T-1],{type:"addNote",placement:o[T-2],actor:o[T-1].actor,text:o[T]}];break;case 59:o[T-2]=[].concat(o[T-1],o[T-1]).slice(0,2),o[T-2][0]=o[T-2][0].actor,o[T-2][1]=o[T-2][1].actor,this.$=[o[T-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:o[T-2].slice(0,2),text:o[T]}];break;case 60:this.$=[o[T-1],{type:"addLinks",actor:o[T-1].actor,text:o[T]}];break;case 61:this.$=[o[T-1],{type:"addALink",actor:o[T-1].actor,text:o[T]}];break;case 62:this.$=[o[T-1],{type:"addProperties",actor:o[T-1].actor,text:o[T]}];break;case 63:this.$=[o[T-1],{type:"addDetails",actor:o[T-1].actor,text:o[T]}];break;case 66:this.$=[o[T-2],o[T]];break;case 67:this.$=o[T];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:o[T-1].actor}];break;case 71:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:o[T-4].actor}];break;case 72:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:o[T-1].actor}];break;case 73:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-2],msg:o[T],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:o[T-4].actor}];break;case 74:this.$=[o[T-5],o[T-1],{type:"addMessage",from:o[T-5].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:o[T-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:o[T-5].actor}];break;case 75:this.$=[o[T-3],o[T-1],{type:"addMessage",from:o[T-3].actor,to:o[T-1].actor,signalType:o[T-2],msg:o[T]}];break;case 76:this.$={type:"addParticipant",actor:o[T-1],config:o[T]};break;case 77:this.$=o[T-1].trim();break;case 78:this.$={type:"addParticipant",actor:o[T]};break;case 79:this.$=y.LINETYPE.SOLID_OPEN;break;case 80:this.$=y.LINETYPE.DOTTED_OPEN;break;case 81:this.$=y.LINETYPE.SOLID;break;case 82:this.$=y.LINETYPE.SOLID_TOP;break;case 83:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=y.LINETYPE.STICK_TOP;break;case 85:this.$=y.LINETYPE.STICK_BOTTOM;break;case 86:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=y.LINETYPE.DOTTED;break;case 100:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=y.LINETYPE.SOLID_CROSS;break;case 102:this.$=y.LINETYPE.DOTTED_CROSS;break;case 103:this.$=y.LINETYPE.SOLID_POINT;break;case 104:this.$=y.LINETYPE.DOTTED_POINT;break;case 105:this.$=y.parseMessage(o[T].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:d,18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,51:U,53:G,54:X,56:Q,61:q,62:it,63:tt,64:nt,73:W},e(C,[2,5]),{9:48,13:13,14:E,15:d,18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,51:U,53:G,54:X,56:Q,61:q,62:it,63:tt,64:nt,73:W},e(C,[2,7]),e(C,[2,8]),e(C,[2,9]),e(C,[2,15]),{13:49,51:U,53:G,54:X},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:W},{23:56,73:W},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(C,[2,30]),e(C,[2,31]),{33:[1,62]},{35:[1,63]},e(C,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:Pt},{23:75,55:76,73:Pt},{23:77,73:W},{69:78,72:[1,79],78:A,79:D,80:et,81:rt,82:K,83:ie,84:ne,85:oe,86:ce,87:le,88:he,89:de,90:Te,91:pe,92:Ee,93:ue,94:fe,95:_e,96:ge,97:xe,98:Ie,99:ye,100:Re,101:Oe,102:Le,103:be},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:W},{23:111,73:W},{23:112,73:W},{23:113,73:W},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],Ae),e(C,[2,6]),e(C,[2,16]),e(St,[2,10],{11:114}),e(C,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(C,[2,22]),{5:[1,118]},{5:[1,119]},e(C,[2,25]),e(C,[2,26]),e(C,[2,27]),e(C,[2,28]),e(C,[2,29]),e(C,[2,32]),e(C,[2,33]),e(kt,i,{7:120}),e(kt,i,{7:121}),e(kt,i,{7:122}),e(Se,i,{41:123,7:124}),e(zt,i,{43:125,7:126}),e(zt,i,{7:126,43:127}),e(we,i,{46:128,7:129}),e(kt,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Ut,Ae,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:W},{69:146,78:A,79:D,80:et,81:rt,82:K,83:ie,84:ne,85:oe,86:ce,87:le,88:he,89:de,90:Te,91:pe,92:Ee,93:ue,94:fe,95:_e,96:ge,97:xe,98:Ie,99:ye,100:Re,101:Oe,102:Le,103:be},e(F,[2,79]),e(F,[2,80]),e(F,[2,81]),e(F,[2,82]),e(F,[2,83]),e(F,[2,84]),e(F,[2,85]),e(F,[2,86]),e(F,[2,87]),e(F,[2,88]),e(F,[2,89]),e(F,[2,90]),e(F,[2,91]),e(F,[2,92]),e(F,[2,93]),e(F,[2,94]),e(F,[2,95]),e(F,[2,96]),e(F,[2,97]),e(F,[2,98]),e(F,[2,99]),e(F,[2,100]),e(F,[2,101]),e(F,[2,102]),e(F,[2,103]),e(F,[2,104]),{23:147,73:W},{23:149,60:148,73:W},{73:[2,68]},{73:[2,69]},{58:150,104:ct},{58:152,104:ct},{58:153,104:ct},{58:154,104:ct},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:U,53:G,54:X},{5:[1,160]},e(C,[2,20]),e(C,[2,21]),e(C,[2,23]),e(C,[2,24]),{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:d,17:[1,161],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,51:U,53:G,54:X,56:Q,61:q,62:it,63:tt,64:nt,73:W},{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:d,17:[1,162],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,51:U,53:G,54:X,56:Q,61:q,62:it,63:tt,64:nt,73:W},{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:d,17:[1,163],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,51:U,53:G,54:X,56:Q,61:q,62:it,63:tt,64:nt,73:W},{17:[1,164]},{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:d,17:[2,47],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,50:[1,165],51:U,53:G,54:X,56:Q,61:q,62:it,63:tt,64:nt,73:W},{17:[1,166]},{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:d,17:[2,45],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,49:[1,167],51:U,53:G,54:X,56:Q,61:q,62:it,63:tt,64:nt,73:W},{17:[1,168]},{17:[1,169]},{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:d,17:[2,43],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,48:[1,170],51:U,53:G,54:X,56:Q,61:q,62:it,63:tt,64:nt,73:W},{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:d,17:[1,171],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,51:U,53:G,54:X,56:Q,61:q,62:it,63:tt,64:nt,73:W},{16:[1,172]},e(C,[2,50]),{16:[1,173]},e(C,[2,55]),e(Ut,[2,76]),{76:[1,174]},{16:[1,175]},e(C,[2,52]),{16:[1,176]},e(C,[2,57]),e(C,[2,53]),{23:177,73:W},{23:178,73:W},{23:179,73:W},{58:180,104:ct},{23:181,72:[1,182],73:W},{58:183,104:ct},{58:184,104:ct},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(C,[2,17]),e(St,[2,11]),{13:186,51:U,53:G,54:X},e(St,[2,13]),e(St,[2,14]),e(C,[2,19]),e(C,[2,35]),e(C,[2,36]),e(C,[2,37]),e(C,[2,38]),{16:[1,187]},e(C,[2,39]),{16:[1,188]},e(C,[2,40]),e(C,[2,41]),{16:[1,189]},e(C,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:ct},{58:196,104:ct},{58:197,104:ct},{5:[2,75]},{58:198,104:ct},{23:199,73:W},{5:[2,58]},{5:[2,59]},{23:200,73:W},e(St,[2,12]),e(Se,i,{7:124,41:201}),e(zt,i,{7:126,43:202}),e(we,i,{7:129,46:203}),e(C,[2,49]),e(C,[2,54]),e(Ut,[2,77]),e(C,[2,51]),e(C,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:ct},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:g(function(N,v){if(v.recoverable)this.trace(N);else{var k=new Error(N);throw k.hash=v,k}},"parseError"),parse:g(function(N){var v=this,k=[0],y=[],z=[null],o=[],wt=this.table,T="",vt=0,Ne=0,Qe=2,me=1,$e=o.slice.call(arguments,1),J=Object.create(this.lexer),gt={yy:{}};for(var Xt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Xt)&&(gt.yy[Xt]=this.yy[Xt]);J.setInput(N,gt.yy),gt.yy.lexer=J,gt.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var Jt=J.yylloc;o.push(Jt);var je=J.options&&J.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function tr(ot){k.length=k.length-2*ot,z.length=z.length-ot,o.length=o.length-ot}g(tr,"popStack");function Pe(){var ot;return ot=y.pop()||J.lex()||me,typeof ot!="number"&&(ot instanceof Array&&(y=ot,ot=y.pop()),ot=v.symbols_[ot]||ot),ot}g(Pe,"lex");for(var at,xt,lt,Zt,Ot={},Ct,Tt,ke,Mt;;){if(xt=k[k.length-1],this.defaultActions[xt]?lt=this.defaultActions[xt]:((at===null||typeof at>"u")&&(at=Pe()),lt=wt[xt]&&wt[xt][at]),typeof lt>"u"||!lt.length||!lt[0]){var Qt="";Mt=[];for(Ct in wt[xt])this.terminals_[Ct]&&Ct>Qe&&Mt.push("'"+this.terminals_[Ct]+"'");J.showPosition?Qt="Parse error on line "+(vt+1)+`:
|
|
1
|
+
import{_ as g,n as er,c as j,d as Bt,l as st,j as Me,e as rr,f as ar,k as P,b as De,s as sr,p as ir,a as nr,g as or,q as cr,t as lr,J as hr,z as dr,i as Vt,u as Z,L as $,M as mt,N as Be,Z as Tr,D as Wt,O as pr,P as Ve}from"./index-CLPXS5Pa.js";import{a as Er,b as re,g as dt,d as ur,e as ae,f as se}from"./chunk-YZCP3GAM-CNVT9piY.js";import{I as fr}from"./chunk-QZHKN3VN-D9Xdgwdu.js";var jt=(function(){var e=g(function(ut,N,v,k){for(v=v||{},k=ut.length;k--;v[ut[k]]=N);return v},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],n=[1,9],s=[1,11],c=[1,12],E=[1,14],d=[1,15],l=[1,17],x=[1,18],u=[1,19],O=[1,25],p=[1,26],f=[1,27],_=[1,28],I=[1,29],L=[1,30],b=[1,31],m=[1,32],w=[1,33],S=[1,34],Y=[1,35],M=[1,36],V=[1,37],U=[1,38],G=[1,39],X=[1,40],Q=[1,42],q=[1,43],it=[1,44],tt=[1,45],nt=[1,46],W=[1,47],C=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],Pt=[1,74],A=[1,80],D=[1,81],et=[1,82],rt=[1,83],K=[1,84],ie=[1,85],ne=[1,86],oe=[1,87],ce=[1,88],le=[1,89],he=[1,90],de=[1,91],Te=[1,92],pe=[1,93],Ee=[1,94],ue=[1,95],fe=[1,96],_e=[1,97],ge=[1,98],xe=[1,99],Ie=[1,100],ye=[1,101],Re=[1,102],Oe=[1,103],Le=[1,104],be=[1,105],Ae=[2,78],St=[4,5,17,51,53,54],kt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],Se=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],zt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],we=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Ut=[5,52],F=[70,71,72,73],ct=[1,151],Gt={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:g(function(N,v,k,y,z,o,wt){var T=o.length-1;switch(z){case 3:return y.apply(o[T]),o[T];case 4:case 10:this.$=[];break;case 5:case 11:o[T-1].push(o[T]),this.$=o[T-1];break;case 6:case 7:case 12:case 13:this.$=o[T];break;case 8:case 9:case 14:this.$=[];break;case 16:o[T].type="createParticipant",this.$=o[T];break;case 17:o[T-1].unshift({type:"boxStart",boxData:y.parseBoxData(o[T-2])}),o[T-1].push({type:"boxEnd",boxText:o[T-2]}),this.$=o[T-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(o[T-2]),sequenceIndexStep:Number(o[T-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(o[T-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:o[T-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:o[T-1].actor};break;case 30:y.setDiagramTitle(o[T].substring(6)),this.$=o[T].substring(6);break;case 31:y.setDiagramTitle(o[T].substring(7)),this.$=o[T].substring(7);break;case 32:this.$=o[T].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=o[T].trim(),y.setAccDescription(this.$);break;case 35:o[T-1].unshift({type:"loopStart",loopText:y.parseMessage(o[T-2]),signalType:y.LINETYPE.LOOP_START}),o[T-1].push({type:"loopEnd",loopText:o[T-2],signalType:y.LINETYPE.LOOP_END}),this.$=o[T-1];break;case 36:o[T-1].unshift({type:"rectStart",color:y.parseMessage(o[T-2]),signalType:y.LINETYPE.RECT_START}),o[T-1].push({type:"rectEnd",color:y.parseMessage(o[T-2]),signalType:y.LINETYPE.RECT_END}),this.$=o[T-1];break;case 37:o[T-1].unshift({type:"optStart",optText:y.parseMessage(o[T-2]),signalType:y.LINETYPE.OPT_START}),o[T-1].push({type:"optEnd",optText:y.parseMessage(o[T-2]),signalType:y.LINETYPE.OPT_END}),this.$=o[T-1];break;case 38:o[T-1].unshift({type:"altStart",altText:y.parseMessage(o[T-2]),signalType:y.LINETYPE.ALT_START}),o[T-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=o[T-1];break;case 39:o[T-1].unshift({type:"parStart",parText:y.parseMessage(o[T-2]),signalType:y.LINETYPE.PAR_START}),o[T-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=o[T-1];break;case 40:o[T-1].unshift({type:"parStart",parText:y.parseMessage(o[T-2]),signalType:y.LINETYPE.PAR_OVER_START}),o[T-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=o[T-1];break;case 41:o[T-1].unshift({type:"criticalStart",criticalText:y.parseMessage(o[T-2]),signalType:y.LINETYPE.CRITICAL_START}),o[T-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=o[T-1];break;case 42:o[T-1].unshift({type:"breakStart",breakText:y.parseMessage(o[T-2]),signalType:y.LINETYPE.BREAK_START}),o[T-1].push({type:"breakEnd",optText:y.parseMessage(o[T-2]),signalType:y.LINETYPE.BREAK_END}),this.$=o[T-1];break;case 44:this.$=o[T-3].concat([{type:"option",optionText:y.parseMessage(o[T-1]),signalType:y.LINETYPE.CRITICAL_OPTION},o[T]]);break;case 46:this.$=o[T-3].concat([{type:"and",parText:y.parseMessage(o[T-1]),signalType:y.LINETYPE.PAR_AND},o[T]]);break;case 48:this.$=o[T-3].concat([{type:"else",altText:y.parseMessage(o[T-1]),signalType:y.LINETYPE.ALT_ELSE},o[T]]);break;case 49:o[T-3].draw="participant",o[T-3].type="addParticipant",o[T-3].description=y.parseMessage(o[T-1]),this.$=o[T-3];break;case 50:o[T-1].draw="participant",o[T-1].type="addParticipant",this.$=o[T-1];break;case 51:o[T-3].draw="actor",o[T-3].type="addParticipant",o[T-3].description=y.parseMessage(o[T-1]),this.$=o[T-3];break;case 52:case 57:o[T-1].draw="actor",o[T-1].type="addParticipant",this.$=o[T-1];break;case 53:o[T-1].type="destroyParticipant",this.$=o[T-1];break;case 54:o[T-3].draw="participant",o[T-3].type="addParticipant",o[T-3].description=y.parseMessage(o[T-1]),this.$=o[T-3];break;case 55:o[T-1].draw="participant",o[T-1].type="addParticipant",this.$=o[T-1];break;case 56:o[T-3].draw="actor",o[T-3].type="addParticipant",o[T-3].description=y.parseMessage(o[T-1]),this.$=o[T-3];break;case 58:this.$=[o[T-1],{type:"addNote",placement:o[T-2],actor:o[T-1].actor,text:o[T]}];break;case 59:o[T-2]=[].concat(o[T-1],o[T-1]).slice(0,2),o[T-2][0]=o[T-2][0].actor,o[T-2][1]=o[T-2][1].actor,this.$=[o[T-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:o[T-2].slice(0,2),text:o[T]}];break;case 60:this.$=[o[T-1],{type:"addLinks",actor:o[T-1].actor,text:o[T]}];break;case 61:this.$=[o[T-1],{type:"addALink",actor:o[T-1].actor,text:o[T]}];break;case 62:this.$=[o[T-1],{type:"addProperties",actor:o[T-1].actor,text:o[T]}];break;case 63:this.$=[o[T-1],{type:"addDetails",actor:o[T-1].actor,text:o[T]}];break;case 66:this.$=[o[T-2],o[T]];break;case 67:this.$=o[T];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:o[T-1].actor}];break;case 71:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:o[T-4].actor}];break;case 72:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:o[T-1].actor}];break;case 73:this.$=[o[T-4],o[T-1],{type:"addMessage",from:o[T-4].actor,to:o[T-1].actor,signalType:o[T-2],msg:o[T],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:o[T-4].actor}];break;case 74:this.$=[o[T-5],o[T-1],{type:"addMessage",from:o[T-5].actor,to:o[T-1].actor,signalType:o[T-3],msg:o[T],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:o[T-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:o[T-5].actor}];break;case 75:this.$=[o[T-3],o[T-1],{type:"addMessage",from:o[T-3].actor,to:o[T-1].actor,signalType:o[T-2],msg:o[T]}];break;case 76:this.$={type:"addParticipant",actor:o[T-1],config:o[T]};break;case 77:this.$=o[T-1].trim();break;case 78:this.$={type:"addParticipant",actor:o[T]};break;case 79:this.$=y.LINETYPE.SOLID_OPEN;break;case 80:this.$=y.LINETYPE.DOTTED_OPEN;break;case 81:this.$=y.LINETYPE.SOLID;break;case 82:this.$=y.LINETYPE.SOLID_TOP;break;case 83:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=y.LINETYPE.STICK_TOP;break;case 85:this.$=y.LINETYPE.STICK_BOTTOM;break;case 86:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=y.LINETYPE.DOTTED;break;case 100:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=y.LINETYPE.SOLID_CROSS;break;case 102:this.$=y.LINETYPE.DOTTED_CROSS;break;case 103:this.$=y.LINETYPE.SOLID_POINT;break;case 104:this.$=y.LINETYPE.DOTTED_POINT;break;case 105:this.$=y.parseMessage(o[T].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:d,18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,51:U,53:G,54:X,56:Q,61:q,62:it,63:tt,64:nt,73:W},e(C,[2,5]),{9:48,13:13,14:E,15:d,18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,51:U,53:G,54:X,56:Q,61:q,62:it,63:tt,64:nt,73:W},e(C,[2,7]),e(C,[2,8]),e(C,[2,9]),e(C,[2,15]),{13:49,51:U,53:G,54:X},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:W},{23:56,73:W},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(C,[2,30]),e(C,[2,31]),{33:[1,62]},{35:[1,63]},e(C,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:Pt},{23:75,55:76,73:Pt},{23:77,73:W},{69:78,72:[1,79],78:A,79:D,80:et,81:rt,82:K,83:ie,84:ne,85:oe,86:ce,87:le,88:he,89:de,90:Te,91:pe,92:Ee,93:ue,94:fe,95:_e,96:ge,97:xe,98:Ie,99:ye,100:Re,101:Oe,102:Le,103:be},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:W},{23:111,73:W},{23:112,73:W},{23:113,73:W},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],Ae),e(C,[2,6]),e(C,[2,16]),e(St,[2,10],{11:114}),e(C,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(C,[2,22]),{5:[1,118]},{5:[1,119]},e(C,[2,25]),e(C,[2,26]),e(C,[2,27]),e(C,[2,28]),e(C,[2,29]),e(C,[2,32]),e(C,[2,33]),e(kt,i,{7:120}),e(kt,i,{7:121}),e(kt,i,{7:122}),e(Se,i,{41:123,7:124}),e(zt,i,{43:125,7:126}),e(zt,i,{7:126,43:127}),e(we,i,{46:128,7:129}),e(kt,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Ut,Ae,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:W},{69:146,78:A,79:D,80:et,81:rt,82:K,83:ie,84:ne,85:oe,86:ce,87:le,88:he,89:de,90:Te,91:pe,92:Ee,93:ue,94:fe,95:_e,96:ge,97:xe,98:Ie,99:ye,100:Re,101:Oe,102:Le,103:be},e(F,[2,79]),e(F,[2,80]),e(F,[2,81]),e(F,[2,82]),e(F,[2,83]),e(F,[2,84]),e(F,[2,85]),e(F,[2,86]),e(F,[2,87]),e(F,[2,88]),e(F,[2,89]),e(F,[2,90]),e(F,[2,91]),e(F,[2,92]),e(F,[2,93]),e(F,[2,94]),e(F,[2,95]),e(F,[2,96]),e(F,[2,97]),e(F,[2,98]),e(F,[2,99]),e(F,[2,100]),e(F,[2,101]),e(F,[2,102]),e(F,[2,103]),e(F,[2,104]),{23:147,73:W},{23:149,60:148,73:W},{73:[2,68]},{73:[2,69]},{58:150,104:ct},{58:152,104:ct},{58:153,104:ct},{58:154,104:ct},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:U,53:G,54:X},{5:[1,160]},e(C,[2,20]),e(C,[2,21]),e(C,[2,23]),e(C,[2,24]),{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:d,17:[1,161],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,51:U,53:G,54:X,56:Q,61:q,62:it,63:tt,64:nt,73:W},{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:d,17:[1,162],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,51:U,53:G,54:X,56:Q,61:q,62:it,63:tt,64:nt,73:W},{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:d,17:[1,163],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,51:U,53:G,54:X,56:Q,61:q,62:it,63:tt,64:nt,73:W},{17:[1,164]},{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:d,17:[2,47],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,50:[1,165],51:U,53:G,54:X,56:Q,61:q,62:it,63:tt,64:nt,73:W},{17:[1,166]},{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:d,17:[2,45],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,49:[1,167],51:U,53:G,54:X,56:Q,61:q,62:it,63:tt,64:nt,73:W},{17:[1,168]},{17:[1,169]},{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:d,17:[2,43],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,48:[1,170],51:U,53:G,54:X,56:Q,61:q,62:it,63:tt,64:nt,73:W},{4:n,5:s,8:8,9:10,10:c,13:13,14:E,15:d,17:[1,171],18:16,19:l,22:x,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:p,32:f,34:_,36:I,37:L,38:b,39:m,40:w,42:S,44:Y,45:M,47:V,51:U,53:G,54:X,56:Q,61:q,62:it,63:tt,64:nt,73:W},{16:[1,172]},e(C,[2,50]),{16:[1,173]},e(C,[2,55]),e(Ut,[2,76]),{76:[1,174]},{16:[1,175]},e(C,[2,52]),{16:[1,176]},e(C,[2,57]),e(C,[2,53]),{23:177,73:W},{23:178,73:W},{23:179,73:W},{58:180,104:ct},{23:181,72:[1,182],73:W},{58:183,104:ct},{58:184,104:ct},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(C,[2,17]),e(St,[2,11]),{13:186,51:U,53:G,54:X},e(St,[2,13]),e(St,[2,14]),e(C,[2,19]),e(C,[2,35]),e(C,[2,36]),e(C,[2,37]),e(C,[2,38]),{16:[1,187]},e(C,[2,39]),{16:[1,188]},e(C,[2,40]),e(C,[2,41]),{16:[1,189]},e(C,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:ct},{58:196,104:ct},{58:197,104:ct},{5:[2,75]},{58:198,104:ct},{23:199,73:W},{5:[2,58]},{5:[2,59]},{23:200,73:W},e(St,[2,12]),e(Se,i,{7:124,41:201}),e(zt,i,{7:126,43:202}),e(we,i,{7:129,46:203}),e(C,[2,49]),e(C,[2,54]),e(Ut,[2,77]),e(C,[2,51]),e(C,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:ct},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:g(function(N,v){if(v.recoverable)this.trace(N);else{var k=new Error(N);throw k.hash=v,k}},"parseError"),parse:g(function(N){var v=this,k=[0],y=[],z=[null],o=[],wt=this.table,T="",vt=0,Ne=0,Qe=2,me=1,$e=o.slice.call(arguments,1),J=Object.create(this.lexer),gt={yy:{}};for(var Xt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Xt)&&(gt.yy[Xt]=this.yy[Xt]);J.setInput(N,gt.yy),gt.yy.lexer=J,gt.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var Jt=J.yylloc;o.push(Jt);var je=J.options&&J.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function tr(ot){k.length=k.length-2*ot,z.length=z.length-ot,o.length=o.length-ot}g(tr,"popStack");function Pe(){var ot;return ot=y.pop()||J.lex()||me,typeof ot!="number"&&(ot instanceof Array&&(y=ot,ot=y.pop()),ot=v.symbols_[ot]||ot),ot}g(Pe,"lex");for(var at,xt,lt,Zt,Ot={},Ct,Tt,ke,Mt;;){if(xt=k[k.length-1],this.defaultActions[xt]?lt=this.defaultActions[xt]:((at===null||typeof at>"u")&&(at=Pe()),lt=wt[xt]&&wt[xt][at]),typeof lt>"u"||!lt.length||!lt[0]){var Qt="";Mt=[];for(Ct in wt[xt])this.terminals_[Ct]&&Ct>Qe&&Mt.push("'"+this.terminals_[Ct]+"'");J.showPosition?Qt="Parse error on line "+(vt+1)+`:
|
|
2
2
|
`+J.showPosition()+`
|
|
3
3
|
Expecting `+Mt.join(", ")+", got '"+(this.terminals_[at]||at)+"'":Qt="Parse error on line "+(vt+1)+": Unexpected "+(at==me?"end of input":"'"+(this.terminals_[at]||at)+"'"),this.parseError(Qt,{text:J.match,token:this.terminals_[at]||at,line:J.yylineno,loc:Jt,expected:Mt})}if(lt[0]instanceof Array&<.length>1)throw new Error("Parse Error: multiple actions possible at state: "+xt+", token: "+at);switch(lt[0]){case 1:k.push(at),z.push(J.yytext),o.push(J.yylloc),k.push(lt[1]),at=null,Ne=J.yyleng,T=J.yytext,vt=J.yylineno,Jt=J.yylloc;break;case 2:if(Tt=this.productions_[lt[1]][1],Ot.$=z[z.length-Tt],Ot._$={first_line:o[o.length-(Tt||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(Tt||1)].first_column,last_column:o[o.length-1].last_column},je&&(Ot._$.range=[o[o.length-(Tt||1)].range[0],o[o.length-1].range[1]]),Zt=this.performAction.apply(Ot,[T,Ne,vt,gt.yy,lt[1],z,o].concat($e)),typeof Zt<"u")return Zt;Tt&&(k=k.slice(0,-1*Tt*2),z=z.slice(0,-1*Tt),o=o.slice(0,-1*Tt)),k.push(this.productions_[lt[1]][0]),z.push(Ot.$),o.push(Ot._$),ke=wt[k[k.length-2]][k[k.length-1]],k.push(ke);break;case 3:return!0}}return!0},"parse")},Ze=(function(){var ut={EOF:1,parseError:g(function(v,k){if(this.yy.parser)this.yy.parser.parseError(v,k);else throw new Error(v)},"parseError"),setInput:g(function(N,v){return this.yy=v||this.yy||{},this._input=N,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:g(function(){var N=this._input[0];this.yytext+=N,this.yyleng++,this.offset++,this.match+=N,this.matched+=N;var v=N.match(/(?:\r\n?|\n).*/g);return v?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),N},"input"),unput:g(function(N){var v=N.length,k=N.split(/(?:\r\n?|\n)/g);this._input=N+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),k.length-1&&(this.yylineno-=k.length-1);var z=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:k?(k.length===y.length?this.yylloc.first_column:0)+y[y.length-k.length].length-k[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[z[0],z[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(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:g(function(N){this.unput(this.match.slice(N))},"less"),pastInput:g(function(){var N=this.matched.substr(0,this.matched.length-this.match.length);return(N.length>20?"...":"")+N.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var N=this.match;return N.length<20&&(N+=this._input.substr(0,20-N.length)),(N.substr(0,20)+(N.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var N=this.pastInput(),v=new Array(N.length+1).join("-");return N+this.upcomingInput()+`
|
package/dist/web/assets/{stateDiagram-FHFEXIEX-C51anF0K.js → stateDiagram-FHFEXIEX-_NYky71o.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as A,a as W,S as N}from"./chunk-OYMX7WX6-Cam5t0AC.js";import{_ as f,c as t,d as H,l as S,e as P,k as z,R as _,S as U,O as C,u as F}from"./index-D7013kRO.js";import{G as O}from"./graph-DUCnU9ms.js";import{l as J}from"./layout-BaZRT940.js";import"./chunk-55IACEB6-LHLQ9Mhr.js";import"./chunk-EDXVE4YY-gXBG7iiV.js";import"./_baseUniq-DWSAgCYE.js";import"./min-C200fz71.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-B.x)<c&&x>p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Z=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),j=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"<br/>");p=p.replace(/\n/g,"<br/>");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=j(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Z(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),G=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=_().x(function(s){return s.x}).y(function(s){return s.y}).curve(U),p=e.append("path").attr("d",l(n)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=F.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),B.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}G++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");R(m,x,void 0,!1,p,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;P(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),R=f((e,i,d,c,n,l,p)=>{const a=new O({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){m=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const x=p.db.getStates(),g=p.db.getRelations(),o=Object.keys(x);for(const r of o){const u=x[r];d&&(u.parentId=d);let h;if(u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");h=R(u.doc,w,u.id,!c,n,l,p);{w=$(w,u,c);let E=w.node().getBBox();h.width=E.width,h.height=E.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const w={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},E=L(i,w,a);u.note.position==="left of"?(a.setNode(h.id+"-note",E),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",E)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;g.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),J(a),S.debug("Graph after layout",a.nodes());const y=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+y.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+y.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+y.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},ht={parser:W,get db(){return new N(1)},renderer:it,styles:A,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{ht as diagram};
|
|
1
|
+
import{s as A,a as W,S as N}from"./chunk-OYMX7WX6-CMHPjdY3.js";import{_ as f,c as t,d as H,l as S,e as P,k as z,R as _,S as U,O as C,u as F}from"./index-CLPXS5Pa.js";import{G as O}from"./graph-D6tF7y1b.js";import{l as J}from"./layout-eCIhMhgM.js";import"./chunk-55IACEB6-CXq43BG4.js";import"./chunk-EDXVE4YY-DokDvDhv.js";import"./_baseUniq-nFqJWqJf.js";import"./min-CmgCLj3n.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-B.x)<c&&x>p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Z=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),j=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"<br/>");p=p.replace(/\n/g,"<br/>");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=j(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Z(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),G=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=_().x(function(s){return s.x}).y(function(s){return s.y}).curve(U),p=e.append("path").attr("d",l(n)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=F.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),B.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}G++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");R(m,x,void 0,!1,p,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;P(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),R=f((e,i,d,c,n,l,p)=>{const a=new O({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){m=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const x=p.db.getStates(),g=p.db.getRelations(),o=Object.keys(x);for(const r of o){const u=x[r];d&&(u.parentId=d);let h;if(u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");h=R(u.doc,w,u.id,!c,n,l,p);{w=$(w,u,c);let E=w.node().getBBox();h.width=E.width,h.height=E.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const w={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},E=L(i,w,a);u.note.position==="left of"?(a.setNode(h.id+"-note",E),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",E)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;g.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),J(a),S.debug("Graph after layout",a.nodes());const y=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+y.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+y.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+y.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},ht={parser:W,get db(){return new N(1)},renderer:it,styles:A,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{ht as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as t,b as r,a,S as s}from"./chunk-OYMX7WX6-CMHPjdY3.js";import{_ as i}from"./index-CLPXS5Pa.js";import"./chunk-55IACEB6-CXq43BG4.js";import"./chunk-EDXVE4YY-DokDvDhv.js";var l={parser:a,get db(){return new s(2)},renderer:r,styles:t,init:i(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{l as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as l,D as pt,V as Wt,W as Pt,X as Bt,c as gt,l as S,I as Vt,N as Ft,Y as ft,d as J,C as zt,$ as Gt,z as Ot}from"./index-
|
|
1
|
+
import{_ as l,D as pt,V as Wt,W as Pt,X as Bt,c as gt,l as S,I as Vt,N as Ft,Y as ft,d as J,C as zt,$ as Gt,z as Ot}from"./index-CLPXS5Pa.js";import{d as ot}from"./arc-Jg9CFoKt.js";var tt=(function(){var e=l(function(k,s,d,h){for(d=d||{},h=k.length;h--;d[k[h]]=s);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],r=[1,14],o=[1,15],c=[1,16],a=[1,19],p=[1,20],y={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:l(function(s,d,h,g,m,u,w){var v=u.length-1;switch(m){case 1:return u[v-1];case 3:g.setDirection("LR");break;case 4:g.setDirection("TD");break;case 5:this.$=[];break;case 6:u[v-1].push(u[v]),this.$=u[v-1];break;case 7:case 8:this.$=u[v];break;case 9:case 10:this.$=[];break;case 11:g.getCommonDb().setDiagramTitle(u[v].substr(6)),this.$=u[v].substr(6);break;case 12:this.$=u[v].trim(),g.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[v].trim(),g.getCommonDb().setAccDescription(this.$);break;case 15:g.addSection(u[v].substr(8)),this.$=u[v].substr(8);break;case 18:g.addTask(u[v],0,""),this.$=u[v];break;case 19:g.addEvent(u[v].substr(2)),this.$=u[v];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:i,17:r,19:o,20:c,21:17,22:18,23:a,24:p},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:i,17:r,19:o,20:c,21:17,22:18,23:a,24:p},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:l(function(s,d){if(d.recoverable)this.trace(s);else{var h=new Error(s);throw h.hash=d,h}},"parseError"),parse:l(function(s){var d=this,h=[0],g=[],m=[null],u=[],w=this.table,v="",M=0,R=0,P=2,V=1,L=u.slice.call(arguments,1),_=Object.create(this.lexer),C={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(C.yy[F]=this.yy[F]);_.setInput(s,C.yy),C.yy.lexer=_,C.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var z=_.yylloc;u.push(z);var q=_.options&&_.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function X(A){h.length=h.length-2*A,m.length=m.length-A,u.length=u.length-A}l(X,"popStack");function O(){var A;return A=g.pop()||_.lex()||V,typeof A!="number"&&(A instanceof Array&&(g=A,A=g.pop()),A=d.symbols_[A]||A),A}l(O,"lex");for(var $,N,b,T,E={},H,I,B,D;;){if(N=h[h.length-1],this.defaultActions[N]?b=this.defaultActions[N]:(($===null||typeof $>"u")&&($=O()),b=w[N]&&w[N][$]),typeof b>"u"||!b.length||!b[0]){var K="";D=[];for(H in w[N])this.terminals_[H]&&H>P&&D.push("'"+this.terminals_[H]+"'");_.showPosition?K="Parse error on line "+(M+1)+`:
|
|
2
2
|
`+_.showPosition()+`
|
|
3
3
|
Expecting `+D.join(", ")+", got '"+(this.terminals_[$]||$)+"'":K="Parse error on line "+(M+1)+": Unexpected "+($==V?"end of input":"'"+(this.terminals_[$]||$)+"'"),this.parseError(K,{text:_.match,token:this.terminals_[$]||$,line:_.yylineno,loc:z,expected:D})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+N+", token: "+$);switch(b[0]){case 1:h.push($),m.push(_.yytext),u.push(_.yylloc),h.push(b[1]),$=null,R=_.yyleng,v=_.yytext,M=_.yylineno,z=_.yylloc;break;case 2:if(I=this.productions_[b[1]][1],E.$=m[m.length-I],E._$={first_line:u[u.length-(I||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(I||1)].first_column,last_column:u[u.length-1].last_column},q&&(E._$.range=[u[u.length-(I||1)].range[0],u[u.length-1].range[1]]),T=this.performAction.apply(E,[v,R,M,C.yy,b[1],m,u].concat(L)),typeof T<"u")return T;I&&(h=h.slice(0,-1*I*2),m=m.slice(0,-1*I),u=u.slice(0,-1*I)),h.push(this.productions_[b[1]][0]),m.push(E.$),u.push(E._$),B=w[h[h.length-2]][h[h.length-1]],h.push(B);break;case 3:return!0}}return!0},"parse")},x=(function(){var k={EOF:1,parseError:l(function(d,h){if(this.yy.parser)this.yy.parser.parseError(d,h);else throw new Error(d)},"parseError"),setInput:l(function(s,d){return this.yy=d||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:l(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var d=s.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:l(function(s){var d=s.length,h=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var g=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var m=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===g.length?this.yylloc.first_column:0)+g[g.length-h.length].length-h[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[m[0],m[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(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:l(function(s){this.unput(this.match.slice(s))},"less"),pastInput:l(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var s=this.pastInput(),d=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
package/dist/web/assets/{vennDiagram-DHZGUBPP-DuNg6iKA.js → vennDiagram-DHZGUBPP-B1ao3Y4V.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aD as Gt,s as Wt,g as Kt,q as Ht,p as Xt,a as Yt,b as Zt,_ as S,D as St,I as Jt,d as rt,as as Qt,V as $t,W as te,X as ee,e as ne,z as se,F as ie,G as re}from"./index-D7013kRO.js";const kt=(t,n)=>Gt(t,"a",-n),_t=1e-10;function st(t,n){const s=ae(t),e=s.filter(c=>oe(c,t));let i=0,r=0;const o=[];if(e.length>1){const c=Et(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-c.x,a.y-c.y)}e.sort((u,a)=>a.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];r+=(f.x+a.x)*(a.y-f.y);const y={x:(a.x+f.x)/2,y:(a.y+f.y)/2};let d=null;for(let m=0;m<a.parentIndex.length;++m)if(f.parentIndex.includes(a.parentIndex[m])){const x=t[a.parentIndex[m]],M=Math.atan2(a.x-x.x,a.y-x.y),E=Math.atan2(f.x-x.x,f.y-x.y);let _=E-M;_<0&&(_+=2*Math.PI);const w=E-_/2;let g=W(y,{x:x.x+x.radius*Math.sin(w),y:x.y+x.radius*Math.cos(w)});g>x.radius*2&&(g=x.radius*2),(d==null||d.width>g)&&(d={circle:x,width:g,p1:a,p2:f,large:g>x.radius,sweep:!0})}d!=null&&(o.push(d),i+=lt(d.circle.radius,d.width),f=a)}}else{let c=t[0];for(let u=1;u<t.length;++u)t[u].radius<c.radius&&(c=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(W(t[u],c)>Math.abs(c.radius-t[u].radius)){f=!0;break}f?i=r=0:(i=c.radius*c.radius*Math.PI,o.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-_t,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0}))}return r/=2,n&&(n.area=i+r,n.arcArea=i,n.polygonArea=r,n.arcs=o,n.innerPoints=e,n.intersectionPoints=s),i+r}function oe(t,n){return n.every(s=>W(t,s)<s.radius+_t)}function ae(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Tt(t[s],t[e]);for(const r of i)r.parentIndex=[s,e],n.push(r)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function W(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Tt(t,n){const s=W(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const r=(e*e-i*i+s*s)/(2*s),o=Math.sqrt(e*e-r*r),c=t.x+r*(n.x-t.x)/s,f=t.y+r*(n.y-t.y)/s,u=-(n.y-t.y)*(o/s),a=-(n.x-t.x)*(o/s);return[{x:c+u,y:f-a},{x:c-u,y:f+a}]}function Et(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function le(t,n,s,e){e=e||{};const i=e.maxIterations||100,r=e.tolerance||1e-10,o=t(n),c=t(s);let f=s-n;if(o*c>0)throw"Initial bisect points must have opposite signs";if(o===0)return n;if(c===0)return s;for(let u=0;u<i;++u){f/=2;const a=n+f,y=t(a);if(y*o>=0&&(n=a),Math.abs(f)<r||y===0)return a}return n+f}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function tt(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt(tt(t,t))}function ht(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function Q(t,n,s,e,i){for(let r=0;r<t.length;++r)t[r]=n*s[r]+e*i[r]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,r=s.zeroDelta||.001,o=s.minErrorDelta||1e-6,c=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let d;const m=n.length,x=new Array(m+1);x[0]=n,x[0].fx=t(n),x[0].id=0;for(let v=0;v<m;++v){const l=n.slice();l[v]=l[v]?l[v]*i:r,x[v+1]=l,x[v+1].fx=t(l),x[v+1].id=v+1}function M(v){for(let l=0;l<v.length;l++)x[m][l]=v[l];x[m].fx=v.fx}const E=(v,l)=>v.fx-l.fx,_=n.slice(),w=n.slice(),g=n.slice(),b=n.slice();for(let v=0;v<e;++v){if(x.sort(E),s.history){const p=x.map(h=>{const j=h.slice();return j.fx=h.fx,j.id=h.id,j});p.sort((h,j)=>h.id-j.id),s.history.push({x:x[0].slice(),fx:x[0].fx,simplex:p})}d=0;for(let p=0;p<m;++p)d=Math.max(d,Math.abs(x[0][p]-x[1][p]));if(Math.abs(x[0].fx-x[m].fx)<o&&d<c)break;for(let p=0;p<m;++p){_[p]=0;for(let h=0;h<m;++h)_[p]+=x[h][p];_[p]/=m}const l=x[m];if(Q(w,1+f,_,-f,l),w.fx=t(w),w.fx<x[0].fx)Q(b,1+u,_,-u,l),b.fx=t(b),b.fx<w.fx?M(b):M(w);else if(w.fx>=x[m-1].fx){let p=!1;if(w.fx>l.fx?(Q(g,1+a,_,-a,l),g.fx=t(g),g.fx<l.fx?M(g):p=!0):(Q(g,1-a*f,_,a*f,l),g.fx=t(g),g.fx<w.fx?M(g):p=!0),p){if(y>=1)break;for(let h=1;h<x.length;++h)Q(x[h],1-y,x[0],y,x[h]),x[h].fx=t(x[h])}}else M(w)}return x.sort(E),{fx:x[0].fx,x:x[0]}}function ce(t,n,s,e,i,r,o){const c=s.fx,f=tt(s.fxprime,n);let u=c,a=c,y=f,d=0;i=i||1,r=r||1e-6,o=o||.1;function m(x,M,E){for(let _=0;_<16;++_)if(i=(x+M)/2,Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),u>c+r*i*f||u>=E)M=i;else{if(Math.abs(y)<=-o*f)return i;y*(M-x)>=0&&(M=x),x=i,E=u}return 0}for(let x=0;x<10;++x){if(Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),u>c+r*i*f||x&&u>=a)return m(d,i,a);if(Math.abs(y)<=-o*f)return i;if(y>=0)return m(i,d,u);a=u,d=i,i*=2}return i}function ue(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const r=n.slice();let o,c,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),o=e.fxprime.slice(),ht(o,e.fxprime,-1);for(let a=0;a<u;++a){if(f=ce(t,o,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ht(o,e.fxprime,-1);else{Q(r,1,i.fxprime,-1,e.fxprime);const y=tt(e.fxprime,e.fxprime),d=Math.max(0,tt(r,i.fxprime)/y);Q(o,d,o,-1,i.fxprime),c=e,e=i,i=c}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||ge,e=n.lossFunction||et,i=he(t,n),r=s(i,n),o=Object.keys(r),c=[];for(const a of o)c.push(r[a].x),c.push(r[a].y);const u=zt(a=>{const y={};for(let d=0;d<o.length;++d){const m=o[d];y[m]={x:a[2*d],y:a[2*d+1],radius:r[m].radius}}return e(y,i)},c,n).x;for(let a=0;a<o.length;++a){const y=o[a];r[y].x=u[2*a],r[y].y=u[2*a+1]}return r}const Dt=1e-10;function ft(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Dt?Math.abs(t-n):le(e=>xt(t,n,e)-s,0,t+n)}function he(t,n={}){const s=n.distinct,e=t.map(c=>Object.assign({},c));function i(c){return c.join(";")}if(s){const c=new Map;for(const f of e)for(let u=0;u<f.sets.length;u++){const a=String(f.sets[u]);c.set(a,f.size+(c.get(a)||0));for(let y=u+1;y<f.sets.length;y++){const d=String(f.sets[y]),m=`${a};${d}`,x=`${d};${a}`;c.set(m,f.size+(c.get(m)||0)),c.set(x,f.size+(c.get(x)||0))}}for(const f of e)f.sets.length<3&&(f.size=c.get(i(f.sets)))}const r=[],o=new Set;for(const c of e)if(c.sets.length===1)r.push(c.sets[0]);else if(c.sets.length===2){const f=c.sets[0],u=c.sets[1];o.add(i(c.sets)),o.add(i([u,f]))}r.sort((c,f)=>c===f?0:c<f?-1:1);for(let c=0;c<r.length;++c){const f=r[c];for(let u=c+1;u<r.length;++u){const a=r[u];o.has(i([f,a]))||e.push({sets:[f,a],size:0})}}return e}function fe(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(r=>r.sets.length===2).forEach(r=>{const o=s[r.sets[0]],c=s[r.sets[1]],f=Math.sqrt(n[o].size/Math.PI),u=Math.sqrt(n[c].size/Math.PI),a=ft(f,u,r.size);e[o][c]=e[c][o]=a;let y=0;r.size+1e-10>=Math.min(n[o].size,n[c].size)?y=1:r.size<=1e-10&&(y=-1),i[o][c]=i[c][o]=y}),{distances:e,constraints:i}}function de(t,n,s,e){for(let r=0;r<n.length;++r)n[r]=0;let i=0;for(let r=0;r<s.length;++r){const o=t[2*r],c=t[2*r+1];for(let f=r+1;f<s.length;++f){const u=t[2*f],a=t[2*f+1],y=s[r][f],d=e[r][f],m=(u-o)*(u-o)+(a-c)*(a-c),x=Math.sqrt(m),M=m-y*y;d>0&&x<=y||d<0&&x>=y||(i+=2*M*M,n[2*r]+=4*M*(o-u),n[2*r+1]+=4*M*(c-a),n[2*f]+=4*M*(u-o),n[2*f+1]+=4*M*(a-c))}}return i}function ge(t,n={}){let s=ye(t,n);const e=n.lossFunction||et;if(t.length>=8){const i=xe(t,n),r=e(i,t),o=e(s,t);r+1e-8<o&&(s=i)}return s}function xe(t,n={}){const s=n.restarts||10,e=[],i={};for(const d of t)d.sets.length===1&&(i[d.sets[0]]=e.length,e.push(d));let{distances:r,constraints:o}=fe(t,e,i);const c=ut(r.map(ut))/r.length;r=r.map(d=>d.map(m=>m/c));const f=(d,m)=>de(d,m,r,o);let u=null;for(let d=0;d<s;++d){const m=ct(r.length*2).map(Math.random),x=ue(f,m,n);(!u||x.fx<u.fx)&&(u=x)}const a=u.x,y={};for(let d=0;d<e.length;++d){const m=e[d];y[m.sets[0]]={x:a[2*d]*c,y:a[2*d+1]*c,radius:Math.sqrt(m.size/Math.PI)}}if(n.history)for(const d of n.history)ht(d.x,c);return y}function ye(t,n){const s=n&&n.lossFunction?n.lossFunction:et,e={},i={};for(const y of t)if(y.sets.length===1){const d=y.sets[0];e[d]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[d]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let d=y.weight!=null?y.weight:1;const m=y.sets[0],x=y.sets[1];y.size+Dt>=Math.min(e[m].size,e[x].size)&&(d=0),i[m].push({set:x,size:y.size,weight:d}),i[x].push({set:m,size:y.size,weight:d})}const r=[];Object.keys(i).forEach(y=>{let d=0;for(let m=0;m<i[y].length;++m)d+=i[y][m].size*i[y][m].weight;r.push({set:y,size:d})});function o(y,d){return d.size-y.size}r.sort(o);const c={};function f(y){return y.set in c}function u(y,d){e[d].x=y.x,e[d].y=y.y,c[d]=!0}u({x:0,y:0},r[0].set);for(let y=1;y<r.length;++y){const d=r[y].set,m=i[d].filter(f),x=e[d];if(m.sort(o),m.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<m.length;++a){const w=e[m[a].set],g=ft(x.radius,w.radius,m[a].size);M.push({x:w.x+g,y:w.y}),M.push({x:w.x-g,y:w.y}),M.push({y:w.y+g,x:w.x}),M.push({y:w.y-g,x:w.x});for(let b=a+1;b<m.length;++b){const v=e[m[b].set],l=ft(x.radius,v.radius,m[b].size),p=Tt({x:w.x,y:w.y,radius:g},{x:v.x,y:v.y,radius:l});M.push(...p)}}let E=1e50,_=M[0];for(const w of M){e[d].x=w.x,e[d].y=w.y;const g=s(e,t);g<E&&(E=g,_=w)}u(_,d)}return e}function et(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const o=t[e.sets[0]],c=t[e.sets[1]];i=xt(o.radius,c.radius,W(o,c))}else i=st(e.sets.map(o=>t[o]));const r=e.weight!=null?e.weight:1;s+=r*(i-e.size)*(i-e.size)}return s}function Rt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const c=t[e.sets[0]],f=t[e.sets[1]];i=xt(c.radius,f.radius,W(c,f))}else i=st(e.sets.map(c=>t[c]));const r=e.weight!=null?e.weight:1,o=Math.log((i+1)/(e.size+1));s+=r*o*o}return s}function pe(t,n,s){if(s==null?t.sort((i,r)=>r.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,r=t[0].y;for(const o of t)o.x-=i,o.y-=r}if(t.length===2&&W(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,r=Math.cos(i),o=Math.sin(i);for(const c of t){const f=c.x,u=c.y;c.x=r*f-o*u,c.y=o*f+r*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const r=t[1].y/(1e-10+t[1].x);for(const o of t){var e=(o.x+r*o.y)/(1+r*r);o.x=2*e-o.x,o.y=2*e*r-o.y}}}}function me(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,r){const o=n(i),c=n(r);o.parent=c}for(let i=0;i<t.length;++i)for(let r=i+1;r<t.length;++r){const o=t[i].radius+t[r].radius;W(t[i],t[r])+1e-10<o&&s(t[r],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const r=n(t[i]).parent.setid;e.has(r)||e.set(r,[]),e.get(r).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((r,o)=>Math.max(r,o[s]+o.radius),Number.NEGATIVE_INFINITY),i=t.reduce((r,o)=>Math.min(r,o[s]-o.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Ct(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=me(e);for(const u of i){pe(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let r=e.bounds;const o=(r.xRange.max-r.xRange.min)/50;function c(u,a,y){if(!u)return;const d=u.bounds;let m,x;if(a)m=r.xRange.max-d.xRange.min+o;else{m=r.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(r.xRange.max-r.xRange.min)/2;M<0&&(m+=M)}if(y)x=r.yRange.max-d.yRange.min+o;else{x=r.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(r.yRange.max-r.yRange.min)/2;M<0&&(x+=M)}for(const M of u)M.x+=m,M.y+=x,e.push(M)}let f=1;for(;f<i.length;)c(i[f],!0,!1),c(i[f+1],!1,!0),c(i[f+2],!0,!0),f+=3,r=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const r=Ft(t);n-=2*e,s-=2*e;const{xRange:o,yRange:c}=dt(r);if(o.max===o.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){const m=Math.sqrt(i/Math.PI)*2;f=n/m,u=s/m}else f=n/(o.max-o.min),u=s/(c.max-c.min);const a=Math.min(u,f),y=(n-(o.max-o.min)*a)/2,d=(s-(c.max-c.min)*a)/2;return Ot(r.map(m=>({radius:a*m.radius,x:e+y+(m.x-o.min)*a,y:e+d+(m.y-c.min)*a,setid:m.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function be(t={}){let n=!1,s=600,e=350,i=15,r=1e3,o=Math.PI/2,c=!0,f=null,u=!0,a=!0,y=null,d=null,m=!1,x=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],w=0,g=function(p){if(p in E)return E[p];var h=E[p]=_[w];return w+=1,w>=_.length&&(w=0),h},b=At,v=et;function l(p){let h=p.datum();const j=new Set;h.forEach(I=>{I.size==0&&I.sets.length==1&&j.add(I.sets[0])}),h=h.filter(I=>!I.sets.some(L=>j.has(L)));let k={},N={};if(h.length>0){let I=b(h,{lossFunction:v,distinct:m});c&&(I=Ct(I,o,d)),k=Nt(I,s,e,i,f),N=jt(k,h,M)}const X={};h.forEach(I=>{I.label&&(X[I.sets]=I.label)});function B(I){if(I.sets in X)return X[I.sets];if(I.sets.length==1)return""+I.sets[0]}p.selectAll("svg").data([k]).enter().append("svg");const U=p.select("svg");n?U.attr("viewBox",`0 0 ${s} ${e}`):U.attr("width",s).attr("height",e);const q={};let z=!1;U.selectAll(".venn-area path").each(function(I){const L=this.getAttribute("d");I.sets.length==1&&L&&!m&&(z=!0,q[I.sets[0]]=ke(L))});function A(I){return L=>{const G=I.sets.map(Z=>{let H=q[Z],J=k[Z];return H||(H={x:s/2,y:e/2,radius:1}),J||(J={x:s/2,y:e/2,radius:1}),{x:H.x*(1-L)+J.x*L,y:H.y*(1-L)+J.y*L,radius:H.radius*(1-L)+J.radius*L}});return wt(G,x)}}const R=U.selectAll(".venn-area").data(h,I=>I.sets),O=R.enter().append("g").attr("class",I=>`venn-area venn-${I.sets.length==1?"circle":"intersection"}${I.colour||I.color?" venn-coloured":""}`).attr("data-venn-sets",I=>I.sets.join("_")),P=O.append("path"),V=O.append("text").attr("class","label").text(I=>B(I)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(P.style("fill-opacity","0").filter(I=>I.sets.length==1).style("fill",I=>I.colour?I.colour:I.color?I.color:g(I.sets)).style("fill-opacity",".25"),V.style("fill",I=>I.colour||I.color?"#FFF":t.textFill?t.textFill:I.sets.length==1?g(I.sets):"#444"));function D(I){return typeof I.transition=="function"?I.transition("venn").duration(r):I}let T=p;z&&typeof T.transition=="function"?(T=D(p),T.selectAll("path").attrTween("d",A)):T.selectAll("path").attr("d",I=>wt(I.sets.map(L=>k[L])),x);const F=T.selectAll("text").filter(I=>I.sets in N).text(I=>B(I)).attr("x",I=>Math.floor(N[I.sets].x)).attr("y",I=>Math.floor(N[I.sets].y));u&&(z?"on"in F?F.on("end",ot(k,B)):F.each("end",ot(k,B)):F.each(ot(k,B)));const C=D(R.exit()).remove();typeof R.transition=="function"&&C.selectAll("path").attrTween("d",A);const Y=C.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(V.style("font-size","0px"),F.style("font-size",y),Y.style("font-size","0px")),{circles:k,textCentres:N,nodes:R,enter:O,update:T,exit:C}}return l.wrap=function(p){return arguments.length?(u=p,l):u},l.useViewBox=function(){return n=!0,l},l.width=function(p){return arguments.length?(s=p,l):s},l.height=function(p){return arguments.length?(e=p,l):e},l.padding=function(p){return arguments.length?(i=p,l):i},l.distinct=function(p){return arguments.length?(m=p,l):m},l.colours=function(p){return arguments.length?(g=p,l):g},l.colors=function(p){return arguments.length?(g=p,l):g},l.fontSize=function(p){return arguments.length?(y=p,l):y},l.round=function(p){return arguments.length?(x=p,l):x},l.duration=function(p){return arguments.length?(r=p,l):r},l.layoutFunction=function(p){return arguments.length?(b=p,l):b},l.normalize=function(p){return arguments.length?(c=p,l):c},l.scaleToFit=function(p){return arguments.length?(f=p,l):f},l.styled=function(p){return arguments.length?(a=p,l):a},l.orientation=function(p){return arguments.length?(o=p,l):o},l.orientationOrder=function(p){return arguments.length?(d=p,l):d},l.lossFunction=function(p){return arguments.length?(v=p==="default"?et:p==="logRatio"?Rt:p,l):v},l}function ot(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,r=n(s)||"",o=r.split(/\s+/).reverse(),f=(r.length+o.length)/3;let u=o.pop(),a=[u],y=0;const d=1.1;e.textContent=null;const m=[];function x(g){const b=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return b.textContent=g,m.push(b),e.append(b),b}let M=x(u);for(;u=o.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=x(u),y++)}const E=.35-y*d/2,_=e.getAttribute("x"),w=e.getAttribute("y");m.forEach((g,b)=>{g.setAttribute("x",_),g.setAttribute("y",w),g.setAttribute("dy",`${E+b*d}em`)})}}function at(t,n,s){let e=n[0].radius-W(n[0],t);for(let i=1;i<n.length;++i){const r=n[i].radius-W(n[i],t);r<=e&&(e=r)}for(let i=0;i<s.length;++i){const r=W(s[i],t)-s[i].radius;r<=e&&(e=r)}return e}function Lt(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],r=at(e[0],t,n);for(let a=1;a<e.length;++a){const y=at(e[a],t,n);y>=r&&(i=e[a],r=y)}const o=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:o[0],y:o[1]};let f=!0;for(const a of t)if(W(c,a)>a.radius){f=!1;break}for(const a of n)if(W(c,a)<a.radius){f=!1;break}if(f)return c;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?Lt(t,[]):Et(u.arcs.map(a=>a.p1))}function ve(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],r=t[i];for(let o=e+1;o<s.length;++o){const c=s[o],f=t[c],u=W(r,f);u+f.radius<=r.radius+1e-10?n[c].push(i):u+r.radius<=f.radius+1e-10&&n[i].push(c)}}return n}function jt(t,n,s){const e={},i=ve(t);for(let r=0;r<n.length;++r){const o=n[r].sets,c={},f={};for(let d=0;d<o.length;++d){c[o[d]]=!0;const m=i[o[d]];for(let x=0;x<m.length;++x)f[m[x]]=!0}const u=[],a=[];for(let d in t)d in c?u.push(t[d]):d in f||a.push(t[d]);const y=Lt(u,a,s);e[o]=y,y.disjoint&&n[r].size>0&&console.log("WARNING: area "+o+" not represented on screen")}return e}function Ie(t,n,s){const e=[];return e.push(`
|
|
1
|
+
import{aD as Gt,s as Wt,g as Kt,q as Ht,p as Xt,a as Yt,b as Zt,_ as S,D as St,I as Jt,d as rt,as as Qt,V as $t,W as te,X as ee,e as ne,z as se,F as ie,G as re}from"./index-CLPXS5Pa.js";const kt=(t,n)=>Gt(t,"a",-n),_t=1e-10;function st(t,n){const s=ae(t),e=s.filter(c=>oe(c,t));let i=0,r=0;const o=[];if(e.length>1){const c=Et(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-c.x,a.y-c.y)}e.sort((u,a)=>a.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];r+=(f.x+a.x)*(a.y-f.y);const y={x:(a.x+f.x)/2,y:(a.y+f.y)/2};let d=null;for(let m=0;m<a.parentIndex.length;++m)if(f.parentIndex.includes(a.parentIndex[m])){const x=t[a.parentIndex[m]],M=Math.atan2(a.x-x.x,a.y-x.y),E=Math.atan2(f.x-x.x,f.y-x.y);let _=E-M;_<0&&(_+=2*Math.PI);const w=E-_/2;let g=W(y,{x:x.x+x.radius*Math.sin(w),y:x.y+x.radius*Math.cos(w)});g>x.radius*2&&(g=x.radius*2),(d==null||d.width>g)&&(d={circle:x,width:g,p1:a,p2:f,large:g>x.radius,sweep:!0})}d!=null&&(o.push(d),i+=lt(d.circle.radius,d.width),f=a)}}else{let c=t[0];for(let u=1;u<t.length;++u)t[u].radius<c.radius&&(c=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(W(t[u],c)>Math.abs(c.radius-t[u].radius)){f=!0;break}f?i=r=0:(i=c.radius*c.radius*Math.PI,o.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-_t,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0}))}return r/=2,n&&(n.area=i+r,n.arcArea=i,n.polygonArea=r,n.arcs=o,n.innerPoints=e,n.intersectionPoints=s),i+r}function oe(t,n){return n.every(s=>W(t,s)<s.radius+_t)}function ae(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Tt(t[s],t[e]);for(const r of i)r.parentIndex=[s,e],n.push(r)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function W(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Tt(t,n){const s=W(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const r=(e*e-i*i+s*s)/(2*s),o=Math.sqrt(e*e-r*r),c=t.x+r*(n.x-t.x)/s,f=t.y+r*(n.y-t.y)/s,u=-(n.y-t.y)*(o/s),a=-(n.x-t.x)*(o/s);return[{x:c+u,y:f-a},{x:c-u,y:f+a}]}function Et(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function le(t,n,s,e){e=e||{};const i=e.maxIterations||100,r=e.tolerance||1e-10,o=t(n),c=t(s);let f=s-n;if(o*c>0)throw"Initial bisect points must have opposite signs";if(o===0)return n;if(c===0)return s;for(let u=0;u<i;++u){f/=2;const a=n+f,y=t(a);if(y*o>=0&&(n=a),Math.abs(f)<r||y===0)return a}return n+f}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function tt(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt(tt(t,t))}function ht(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function Q(t,n,s,e,i){for(let r=0;r<t.length;++r)t[r]=n*s[r]+e*i[r]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,r=s.zeroDelta||.001,o=s.minErrorDelta||1e-6,c=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let d;const m=n.length,x=new Array(m+1);x[0]=n,x[0].fx=t(n),x[0].id=0;for(let v=0;v<m;++v){const l=n.slice();l[v]=l[v]?l[v]*i:r,x[v+1]=l,x[v+1].fx=t(l),x[v+1].id=v+1}function M(v){for(let l=0;l<v.length;l++)x[m][l]=v[l];x[m].fx=v.fx}const E=(v,l)=>v.fx-l.fx,_=n.slice(),w=n.slice(),g=n.slice(),b=n.slice();for(let v=0;v<e;++v){if(x.sort(E),s.history){const p=x.map(h=>{const j=h.slice();return j.fx=h.fx,j.id=h.id,j});p.sort((h,j)=>h.id-j.id),s.history.push({x:x[0].slice(),fx:x[0].fx,simplex:p})}d=0;for(let p=0;p<m;++p)d=Math.max(d,Math.abs(x[0][p]-x[1][p]));if(Math.abs(x[0].fx-x[m].fx)<o&&d<c)break;for(let p=0;p<m;++p){_[p]=0;for(let h=0;h<m;++h)_[p]+=x[h][p];_[p]/=m}const l=x[m];if(Q(w,1+f,_,-f,l),w.fx=t(w),w.fx<x[0].fx)Q(b,1+u,_,-u,l),b.fx=t(b),b.fx<w.fx?M(b):M(w);else if(w.fx>=x[m-1].fx){let p=!1;if(w.fx>l.fx?(Q(g,1+a,_,-a,l),g.fx=t(g),g.fx<l.fx?M(g):p=!0):(Q(g,1-a*f,_,a*f,l),g.fx=t(g),g.fx<w.fx?M(g):p=!0),p){if(y>=1)break;for(let h=1;h<x.length;++h)Q(x[h],1-y,x[0],y,x[h]),x[h].fx=t(x[h])}}else M(w)}return x.sort(E),{fx:x[0].fx,x:x[0]}}function ce(t,n,s,e,i,r,o){const c=s.fx,f=tt(s.fxprime,n);let u=c,a=c,y=f,d=0;i=i||1,r=r||1e-6,o=o||.1;function m(x,M,E){for(let _=0;_<16;++_)if(i=(x+M)/2,Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),u>c+r*i*f||u>=E)M=i;else{if(Math.abs(y)<=-o*f)return i;y*(M-x)>=0&&(M=x),x=i,E=u}return 0}for(let x=0;x<10;++x){if(Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),u>c+r*i*f||x&&u>=a)return m(d,i,a);if(Math.abs(y)<=-o*f)return i;if(y>=0)return m(i,d,u);a=u,d=i,i*=2}return i}function ue(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const r=n.slice();let o,c,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),o=e.fxprime.slice(),ht(o,e.fxprime,-1);for(let a=0;a<u;++a){if(f=ce(t,o,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ht(o,e.fxprime,-1);else{Q(r,1,i.fxprime,-1,e.fxprime);const y=tt(e.fxprime,e.fxprime),d=Math.max(0,tt(r,i.fxprime)/y);Q(o,d,o,-1,i.fxprime),c=e,e=i,i=c}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||ge,e=n.lossFunction||et,i=he(t,n),r=s(i,n),o=Object.keys(r),c=[];for(const a of o)c.push(r[a].x),c.push(r[a].y);const u=zt(a=>{const y={};for(let d=0;d<o.length;++d){const m=o[d];y[m]={x:a[2*d],y:a[2*d+1],radius:r[m].radius}}return e(y,i)},c,n).x;for(let a=0;a<o.length;++a){const y=o[a];r[y].x=u[2*a],r[y].y=u[2*a+1]}return r}const Dt=1e-10;function ft(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Dt?Math.abs(t-n):le(e=>xt(t,n,e)-s,0,t+n)}function he(t,n={}){const s=n.distinct,e=t.map(c=>Object.assign({},c));function i(c){return c.join(";")}if(s){const c=new Map;for(const f of e)for(let u=0;u<f.sets.length;u++){const a=String(f.sets[u]);c.set(a,f.size+(c.get(a)||0));for(let y=u+1;y<f.sets.length;y++){const d=String(f.sets[y]),m=`${a};${d}`,x=`${d};${a}`;c.set(m,f.size+(c.get(m)||0)),c.set(x,f.size+(c.get(x)||0))}}for(const f of e)f.sets.length<3&&(f.size=c.get(i(f.sets)))}const r=[],o=new Set;for(const c of e)if(c.sets.length===1)r.push(c.sets[0]);else if(c.sets.length===2){const f=c.sets[0],u=c.sets[1];o.add(i(c.sets)),o.add(i([u,f]))}r.sort((c,f)=>c===f?0:c<f?-1:1);for(let c=0;c<r.length;++c){const f=r[c];for(let u=c+1;u<r.length;++u){const a=r[u];o.has(i([f,a]))||e.push({sets:[f,a],size:0})}}return e}function fe(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(r=>r.sets.length===2).forEach(r=>{const o=s[r.sets[0]],c=s[r.sets[1]],f=Math.sqrt(n[o].size/Math.PI),u=Math.sqrt(n[c].size/Math.PI),a=ft(f,u,r.size);e[o][c]=e[c][o]=a;let y=0;r.size+1e-10>=Math.min(n[o].size,n[c].size)?y=1:r.size<=1e-10&&(y=-1),i[o][c]=i[c][o]=y}),{distances:e,constraints:i}}function de(t,n,s,e){for(let r=0;r<n.length;++r)n[r]=0;let i=0;for(let r=0;r<s.length;++r){const o=t[2*r],c=t[2*r+1];for(let f=r+1;f<s.length;++f){const u=t[2*f],a=t[2*f+1],y=s[r][f],d=e[r][f],m=(u-o)*(u-o)+(a-c)*(a-c),x=Math.sqrt(m),M=m-y*y;d>0&&x<=y||d<0&&x>=y||(i+=2*M*M,n[2*r]+=4*M*(o-u),n[2*r+1]+=4*M*(c-a),n[2*f]+=4*M*(u-o),n[2*f+1]+=4*M*(a-c))}}return i}function ge(t,n={}){let s=ye(t,n);const e=n.lossFunction||et;if(t.length>=8){const i=xe(t,n),r=e(i,t),o=e(s,t);r+1e-8<o&&(s=i)}return s}function xe(t,n={}){const s=n.restarts||10,e=[],i={};for(const d of t)d.sets.length===1&&(i[d.sets[0]]=e.length,e.push(d));let{distances:r,constraints:o}=fe(t,e,i);const c=ut(r.map(ut))/r.length;r=r.map(d=>d.map(m=>m/c));const f=(d,m)=>de(d,m,r,o);let u=null;for(let d=0;d<s;++d){const m=ct(r.length*2).map(Math.random),x=ue(f,m,n);(!u||x.fx<u.fx)&&(u=x)}const a=u.x,y={};for(let d=0;d<e.length;++d){const m=e[d];y[m.sets[0]]={x:a[2*d]*c,y:a[2*d+1]*c,radius:Math.sqrt(m.size/Math.PI)}}if(n.history)for(const d of n.history)ht(d.x,c);return y}function ye(t,n){const s=n&&n.lossFunction?n.lossFunction:et,e={},i={};for(const y of t)if(y.sets.length===1){const d=y.sets[0];e[d]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[d]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let d=y.weight!=null?y.weight:1;const m=y.sets[0],x=y.sets[1];y.size+Dt>=Math.min(e[m].size,e[x].size)&&(d=0),i[m].push({set:x,size:y.size,weight:d}),i[x].push({set:m,size:y.size,weight:d})}const r=[];Object.keys(i).forEach(y=>{let d=0;for(let m=0;m<i[y].length;++m)d+=i[y][m].size*i[y][m].weight;r.push({set:y,size:d})});function o(y,d){return d.size-y.size}r.sort(o);const c={};function f(y){return y.set in c}function u(y,d){e[d].x=y.x,e[d].y=y.y,c[d]=!0}u({x:0,y:0},r[0].set);for(let y=1;y<r.length;++y){const d=r[y].set,m=i[d].filter(f),x=e[d];if(m.sort(o),m.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<m.length;++a){const w=e[m[a].set],g=ft(x.radius,w.radius,m[a].size);M.push({x:w.x+g,y:w.y}),M.push({x:w.x-g,y:w.y}),M.push({y:w.y+g,x:w.x}),M.push({y:w.y-g,x:w.x});for(let b=a+1;b<m.length;++b){const v=e[m[b].set],l=ft(x.radius,v.radius,m[b].size),p=Tt({x:w.x,y:w.y,radius:g},{x:v.x,y:v.y,radius:l});M.push(...p)}}let E=1e50,_=M[0];for(const w of M){e[d].x=w.x,e[d].y=w.y;const g=s(e,t);g<E&&(E=g,_=w)}u(_,d)}return e}function et(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const o=t[e.sets[0]],c=t[e.sets[1]];i=xt(o.radius,c.radius,W(o,c))}else i=st(e.sets.map(o=>t[o]));const r=e.weight!=null?e.weight:1;s+=r*(i-e.size)*(i-e.size)}return s}function Rt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const c=t[e.sets[0]],f=t[e.sets[1]];i=xt(c.radius,f.radius,W(c,f))}else i=st(e.sets.map(c=>t[c]));const r=e.weight!=null?e.weight:1,o=Math.log((i+1)/(e.size+1));s+=r*o*o}return s}function pe(t,n,s){if(s==null?t.sort((i,r)=>r.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,r=t[0].y;for(const o of t)o.x-=i,o.y-=r}if(t.length===2&&W(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,r=Math.cos(i),o=Math.sin(i);for(const c of t){const f=c.x,u=c.y;c.x=r*f-o*u,c.y=o*f+r*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const r=t[1].y/(1e-10+t[1].x);for(const o of t){var e=(o.x+r*o.y)/(1+r*r);o.x=2*e-o.x,o.y=2*e*r-o.y}}}}function me(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,r){const o=n(i),c=n(r);o.parent=c}for(let i=0;i<t.length;++i)for(let r=i+1;r<t.length;++r){const o=t[i].radius+t[r].radius;W(t[i],t[r])+1e-10<o&&s(t[r],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const r=n(t[i]).parent.setid;e.has(r)||e.set(r,[]),e.get(r).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((r,o)=>Math.max(r,o[s]+o.radius),Number.NEGATIVE_INFINITY),i=t.reduce((r,o)=>Math.min(r,o[s]-o.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Ct(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=me(e);for(const u of i){pe(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let r=e.bounds;const o=(r.xRange.max-r.xRange.min)/50;function c(u,a,y){if(!u)return;const d=u.bounds;let m,x;if(a)m=r.xRange.max-d.xRange.min+o;else{m=r.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(r.xRange.max-r.xRange.min)/2;M<0&&(m+=M)}if(y)x=r.yRange.max-d.yRange.min+o;else{x=r.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(r.yRange.max-r.yRange.min)/2;M<0&&(x+=M)}for(const M of u)M.x+=m,M.y+=x,e.push(M)}let f=1;for(;f<i.length;)c(i[f],!0,!1),c(i[f+1],!1,!0),c(i[f+2],!0,!0),f+=3,r=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const r=Ft(t);n-=2*e,s-=2*e;const{xRange:o,yRange:c}=dt(r);if(o.max===o.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){const m=Math.sqrt(i/Math.PI)*2;f=n/m,u=s/m}else f=n/(o.max-o.min),u=s/(c.max-c.min);const a=Math.min(u,f),y=(n-(o.max-o.min)*a)/2,d=(s-(c.max-c.min)*a)/2;return Ot(r.map(m=>({radius:a*m.radius,x:e+y+(m.x-o.min)*a,y:e+d+(m.y-c.min)*a,setid:m.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function be(t={}){let n=!1,s=600,e=350,i=15,r=1e3,o=Math.PI/2,c=!0,f=null,u=!0,a=!0,y=null,d=null,m=!1,x=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],w=0,g=function(p){if(p in E)return E[p];var h=E[p]=_[w];return w+=1,w>=_.length&&(w=0),h},b=At,v=et;function l(p){let h=p.datum();const j=new Set;h.forEach(I=>{I.size==0&&I.sets.length==1&&j.add(I.sets[0])}),h=h.filter(I=>!I.sets.some(L=>j.has(L)));let k={},N={};if(h.length>0){let I=b(h,{lossFunction:v,distinct:m});c&&(I=Ct(I,o,d)),k=Nt(I,s,e,i,f),N=jt(k,h,M)}const X={};h.forEach(I=>{I.label&&(X[I.sets]=I.label)});function B(I){if(I.sets in X)return X[I.sets];if(I.sets.length==1)return""+I.sets[0]}p.selectAll("svg").data([k]).enter().append("svg");const U=p.select("svg");n?U.attr("viewBox",`0 0 ${s} ${e}`):U.attr("width",s).attr("height",e);const q={};let z=!1;U.selectAll(".venn-area path").each(function(I){const L=this.getAttribute("d");I.sets.length==1&&L&&!m&&(z=!0,q[I.sets[0]]=ke(L))});function A(I){return L=>{const G=I.sets.map(Z=>{let H=q[Z],J=k[Z];return H||(H={x:s/2,y:e/2,radius:1}),J||(J={x:s/2,y:e/2,radius:1}),{x:H.x*(1-L)+J.x*L,y:H.y*(1-L)+J.y*L,radius:H.radius*(1-L)+J.radius*L}});return wt(G,x)}}const R=U.selectAll(".venn-area").data(h,I=>I.sets),O=R.enter().append("g").attr("class",I=>`venn-area venn-${I.sets.length==1?"circle":"intersection"}${I.colour||I.color?" venn-coloured":""}`).attr("data-venn-sets",I=>I.sets.join("_")),P=O.append("path"),V=O.append("text").attr("class","label").text(I=>B(I)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(P.style("fill-opacity","0").filter(I=>I.sets.length==1).style("fill",I=>I.colour?I.colour:I.color?I.color:g(I.sets)).style("fill-opacity",".25"),V.style("fill",I=>I.colour||I.color?"#FFF":t.textFill?t.textFill:I.sets.length==1?g(I.sets):"#444"));function D(I){return typeof I.transition=="function"?I.transition("venn").duration(r):I}let T=p;z&&typeof T.transition=="function"?(T=D(p),T.selectAll("path").attrTween("d",A)):T.selectAll("path").attr("d",I=>wt(I.sets.map(L=>k[L])),x);const F=T.selectAll("text").filter(I=>I.sets in N).text(I=>B(I)).attr("x",I=>Math.floor(N[I.sets].x)).attr("y",I=>Math.floor(N[I.sets].y));u&&(z?"on"in F?F.on("end",ot(k,B)):F.each("end",ot(k,B)):F.each(ot(k,B)));const C=D(R.exit()).remove();typeof R.transition=="function"&&C.selectAll("path").attrTween("d",A);const Y=C.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(V.style("font-size","0px"),F.style("font-size",y),Y.style("font-size","0px")),{circles:k,textCentres:N,nodes:R,enter:O,update:T,exit:C}}return l.wrap=function(p){return arguments.length?(u=p,l):u},l.useViewBox=function(){return n=!0,l},l.width=function(p){return arguments.length?(s=p,l):s},l.height=function(p){return arguments.length?(e=p,l):e},l.padding=function(p){return arguments.length?(i=p,l):i},l.distinct=function(p){return arguments.length?(m=p,l):m},l.colours=function(p){return arguments.length?(g=p,l):g},l.colors=function(p){return arguments.length?(g=p,l):g},l.fontSize=function(p){return arguments.length?(y=p,l):y},l.round=function(p){return arguments.length?(x=p,l):x},l.duration=function(p){return arguments.length?(r=p,l):r},l.layoutFunction=function(p){return arguments.length?(b=p,l):b},l.normalize=function(p){return arguments.length?(c=p,l):c},l.scaleToFit=function(p){return arguments.length?(f=p,l):f},l.styled=function(p){return arguments.length?(a=p,l):a},l.orientation=function(p){return arguments.length?(o=p,l):o},l.orientationOrder=function(p){return arguments.length?(d=p,l):d},l.lossFunction=function(p){return arguments.length?(v=p==="default"?et:p==="logRatio"?Rt:p,l):v},l}function ot(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,r=n(s)||"",o=r.split(/\s+/).reverse(),f=(r.length+o.length)/3;let u=o.pop(),a=[u],y=0;const d=1.1;e.textContent=null;const m=[];function x(g){const b=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return b.textContent=g,m.push(b),e.append(b),b}let M=x(u);for(;u=o.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=x(u),y++)}const E=.35-y*d/2,_=e.getAttribute("x"),w=e.getAttribute("y");m.forEach((g,b)=>{g.setAttribute("x",_),g.setAttribute("y",w),g.setAttribute("dy",`${E+b*d}em`)})}}function at(t,n,s){let e=n[0].radius-W(n[0],t);for(let i=1;i<n.length;++i){const r=n[i].radius-W(n[i],t);r<=e&&(e=r)}for(let i=0;i<s.length;++i){const r=W(s[i],t)-s[i].radius;r<=e&&(e=r)}return e}function Lt(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],r=at(e[0],t,n);for(let a=1;a<e.length;++a){const y=at(e[a],t,n);y>=r&&(i=e[a],r=y)}const o=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:o[0],y:o[1]};let f=!0;for(const a of t)if(W(c,a)>a.radius){f=!1;break}for(const a of n)if(W(c,a)<a.radius){f=!1;break}if(f)return c;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?Lt(t,[]):Et(u.arcs.map(a=>a.p1))}function ve(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],r=t[i];for(let o=e+1;o<s.length;++o){const c=s[o],f=t[c],u=W(r,f);u+f.radius<=r.radius+1e-10?n[c].push(i):u+r.radius<=f.radius+1e-10&&n[i].push(c)}}return n}function jt(t,n,s){const e={},i=ve(t);for(let r=0;r<n.length;++r){const o=n[r].sets,c={},f={};for(let d=0;d<o.length;++d){c[o[d]]=!0;const m=i[o[d]];for(let x=0;x<m.length;++x)f[m[x]]=!0}const u=[],a=[];for(let d in t)d in c?u.push(t[d]):d in f||a.push(t[d]);const y=Lt(u,a,s);e[o]=y,y.disjoint&&n[r].size>0&&console.log("WARNING: area "+o+" not represented on screen")}return e}function Ie(t,n,s){const e=[];return e.push(`
|
|
2
2
|
M`,t,n),e.push(`
|
|
3
3
|
m`,-s,0),e.push(`
|
|
4
4
|
a`,s,s,0,1,0,s*2,0),e.push(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Ah=Object.defineProperty;var $h=(t,e,r)=>e in t?Ah(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Jt=(t,e,r)=>$h(t,typeof e!="symbol"?e+"":e,r);import{bb as Ch,bE as Sh,bF as St}from"./index-D7013kRO.js";import{m as Gt,f as wh,d as kh}from"./min-C200fz71.js";import{b as bh,l as _h,c as Nh,m as Ih,r as vc,n as xs}from"./_baseUniq-DWSAgCYE.js";function Ph(t,e){return bh(Gt(t,e))}function Oh(t,e){return t&&t.length?_h(t,Nh(e)):[]}function Fe(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function ut(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}function Qt(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}function Lh(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function Jn(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}class Af{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){var i;const r=this.types[e.container.$type];if(!r)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const n=(i=r.properties[e.property])==null?void 0:i.referenceType;if(!n)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){const r=this.types[e];return r||{name:e,properties:{},superTypes:[]}}isInstance(e,r){return Fe(e)&&this.isSubtype(e.$type,r)}isSubtype(e,r){if(e===r)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});const i=n[r];if(i!==void 0)return i;{const a=this.types[e],s=a?a.superTypes.some(o=>this.isSubtype(o,r)):!1;return n[r]=s,s}}getAllSubTypes(e){const r=this.allSubtypes[e];if(r)return r;{const n=this.getAllTypes(),i=[];for(const a of n)this.isSubtype(a,e)&&i.push(a);return this.allSubtypes[e]=i,i}}}function Ii(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function $f(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function Cf(t){return Ii(t)&&typeof t.fullText=="string"}class xe{constructor(e,r){this.startFn=e,this.nextFn=r}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){const e=this.iterator();let r=0,n=e.next();for(;!n.done;)r++,n=e.next();return r}toArray(){const e=[],r=this.iterator();let n;do n=r.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,r){const n=this.map(i=>[e?e(i):i,r?r(i):i]);return new Map(n)}toString(){return this.join()}concat(e){return new xe(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),r=>{let n;if(!r.firstDone){do if(n=this.nextFn(r.first),!n.done)return n;while(!n.done);r.firstDone=!0}do if(n=r.iterator.next(),!n.done)return n;while(!n.done);return Ze})}join(e=","){const r=this.iterator();let n="",i,a=!1;do i=r.next(),i.done||(a&&(n+=e),n+=xh(i.value)),a=!0;while(!i.done);return n}indexOf(e,r=0){const n=this.iterator();let i=0,a=n.next();for(;!a.done;){if(i>=r&&a.value===e)return i;a=n.next(),i++}return-1}every(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(!e(n.value))return!1;n=r.next()}return!0}some(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(e(n.value))return!0;n=r.next()}return!1}forEach(e){const r=this.iterator();let n=0,i=r.next();for(;!i.done;)e(i.value,n),i=r.next(),n++}map(e){return new xe(this.startFn,r=>{const{done:n,value:i}=this.nextFn(r);return n?Ze:{done:!1,value:e(i)}})}filter(e){return new xe(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&e(n.value))return n;while(!n.done);return Ze})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,r){const n=this.iterator();let i=r,a=n.next();for(;!a.done;)i===void 0?i=a.value:i=e(i,a.value),a=n.next();return i}reduceRight(e,r){return this.recursiveReduce(this.iterator(),e,r)}recursiveReduce(e,r,n){const i=e.next();if(i.done)return n;const a=this.recursiveReduce(e,r,n);return a===void 0?i.value:r(a,i.value)}find(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(e(n.value))return n.value;n=r.next()}}findIndex(e){const r=this.iterator();let n=0,i=r.next();for(;!i.done;){if(e(i.value))return n;i=r.next(),n++}return-1}includes(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(n.value===e)return!0;n=r.next()}return!1}flatMap(e){return new xe(()=>({this:this.startFn()}),r=>{do{if(r.iterator){const a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}const{done:n,value:i}=this.nextFn(r.this);if(!n){const a=e(i);if(Za(a))r.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}}while(r.iterator);return Ze})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const r=e>1?this.flat(e-1):this;return new xe(()=>({this:r.startFn()}),n=>{do{if(n.iterator){const s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}const{done:i,value:a}=r.nextFn(n.this);if(!i)if(Za(a))n.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}while(n.iterator);return Ze})}head(){const r=this.iterator().next();if(!r.done)return r.value}tail(e=1){return new xe(()=>{const r=this.startFn();for(let n=0;n<e;n++)if(this.nextFn(r).done)return r;return r},this.nextFn)}limit(e){return new xe(()=>({size:0,state:this.startFn()}),r=>(r.size++,r.size>e?Ze:this.nextFn(r.state)))}distinct(e){return new xe(()=>({set:new Set,internalState:this.startFn()}),r=>{let n;do if(n=this.nextFn(r.internalState),!n.done){const i=e?e(n.value):n.value;if(!r.set.has(i))return r.set.add(i),n}while(!n.done);return Ze})}exclude(e,r){const n=new Set;for(const i of e){const a=r?r(i):i;n.add(a)}return this.filter(i=>{const a=r?r(i):i;return!n.has(a)})}}function xh(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function Za(t){return!!t&&typeof t[Symbol.iterator]=="function"}const Sf=new xe(()=>{},()=>Ze),Ze=Object.freeze({done:!0,value:void 0});function de(...t){if(t.length===1){const e=t[0];if(e instanceof xe)return e;if(Za(e))return new xe(()=>e[Symbol.iterator](),r=>r.next());if(typeof e.length=="number")return new xe(()=>({index:0}),r=>r.index<e.length?{done:!1,value:e[r.index++]}:Ze)}return t.length>1?new xe(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const r=e.iterator.next();if(!r.done)return r;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){const r=t[e.collIndex++];Za(r)?e.iterator=r[Symbol.iterator]():r&&typeof r.length=="number"&&(e.array=r)}}while(e.iterator||e.array||e.collIndex<t.length);return Ze}):Sf}class Jl extends xe{constructor(e,r,n){super(()=>({iterators:n!=null&&n.includeRoot?[[e][Symbol.iterator]()]:[r(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){const s=i.iterators[i.iterators.length-1].next();if(s.done)i.iterators.pop();else return i.iterators.push(r(s.value)[Symbol.iterator]()),s}return Ze})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var fo;(function(t){function e(a){return a.reduce((s,o)=>s+o,0)}t.sum=e;function r(a){return a.reduce((s,o)=>s*o,0)}t.product=r;function n(a){return a.reduce((s,o)=>Math.min(s,o))}t.min=n;function i(a){return a.reduce((s,o)=>Math.max(s,o))}t.max=i})(fo||(fo={}));function ho(t,e={}){for(const[r,n]of Object.entries(t))r.startsWith("$")||(Array.isArray(n)?n.forEach((i,a)=>{Fe(i)&&(i.$container=t,i.$containerProperty=r,i.$containerIndex=a,e.deep&&ho(i,e))}):Fe(n)&&(n.$container=t,n.$containerProperty=r,e.deep&&ho(n,e)))}function vs(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function jt(t){const r=Ma(t).$document;if(!r)throw new Error("AST node has no document.");return r}function Ma(t){for(;t.$container;)t=t.$container;return t}function Ec(t){return ut(t)?t.ref?[t.ref]:[]:Qt(t)?t.items.map(e=>e.ref):[]}function Zl(t,e){if(!t)throw new Error("Node must be an AstNode.");const r=e==null?void 0:e.range;return new xe(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndex<n.keys.length;){const i=n.keys[n.keyIndex];if(!i.startsWith("$")){const a=t[i];if(Fe(a)){if(n.keyIndex++,Ac(a,r))return{done:!1,value:a}}else if(Array.isArray(a)){for(;n.arrayIndex<a.length;){const s=n.arrayIndex++,o=a[s];if(Fe(o)&&Ac(o,r))return{done:!1,value:o}}n.arrayIndex=0}}n.keyIndex++}return Ze})}function qi(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Jl(t,r=>Zl(r,e))}function zt(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Jl(t,r=>Zl(r,e),{includeRoot:!0})}function Ac(t,e){var n;if(!e)return!0;const r=(n=t.$cstNode)==null?void 0:n.range;return r?ip(r,e):!1}function Qa(t){return new xe(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const r=e.keys[e.keyIndex];if(!r.startsWith("$")){const n=t[r];if(ut(n)||Qt(n))return e.keyIndex++,{done:!1,value:{reference:n,container:t,property:r}};if(Array.isArray(n)){for(;e.arrayIndex<n.length;){const i=e.arrayIndex++,a=n[i];if(ut(a)||Qt(n))return{done:!1,value:{reference:a,container:t,property:r,index:i}}}e.arrayIndex=0}}e.keyIndex++}return Ze})}function Dh(t,e){const r=t.getTypeMetaData(e.$type),n=e;for(const i of Object.values(r.properties))i.defaultValue!==void 0&&n[i.name]===void 0&&(n[i.name]=wf(i.defaultValue))}function wf(t){return Array.isArray(t)?[...t.map(wf)]:t}const Je={$type:"AbstractElement",cardinality:"cardinality"};function Mh(t){return J.isInstance(t,Je.$type)}const Fa={$type:"AbstractParserRule"};function Bi(t){return J.isInstance(t,Fa.$type)}const ga={$type:"AbstractRule"},ot={$type:"AbstractType"},vr={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function Es(t){return J.isInstance(t,vr.$type)}const Ga={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function kf(t){return J.isInstance(t,Ga.$type)}const $c={$type:"ArrayLiteral",elements:"elements"},Cc={$type:"ArrayType",elementType:"elementType"},Er={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function br(t){return J.isInstance(t,Er.$type)}const po={$type:"BooleanLiteral",true:"true"};function Fh(t){return J.isInstance(t,po.$type)}const Ar={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function Gh(t){return J.isInstance(t,Ar.$type)}const Fr={$type:"Condition"},ja={$type:"Conjunction",left:"left",right:"right"};function jh(t){return J.isInstance(t,ja.$type)}const $r={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function As(t){return J.isInstance(t,$r.$type)}const za={$type:"Disjunction",left:"left",right:"right"};function zh(t){return J.isInstance(t,za.$type)}const mo={$type:"EndOfFile",cardinality:"cardinality"};function Uh(t){return J.isInstance(t,mo.$type)}const sr={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},Sc={$type:"GrammarImport",path:"path"},Br={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function Ql(t){return J.isInstance(t,Br.$type)}const go={$type:"InferredType",name:"name"};function bf(t){return J.isInstance(t,go.$type)}const Lt={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function es(t){return J.isInstance(t,Lt.$type)}const Ds={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},wc={$type:"InfixRuleOperators",precedences:"precedences"},Ei={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function qh(t){return J.isInstance(t,Ei.$type)}const Ai={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function _r(t){return J.isInstance(t,Ai.$type)}const ya={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},Wr={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Bh(t){return J.isInstance(t,Wr.$type)}const yo={$type:"Negation",value:"value"};function Wh(t){return J.isInstance(t,yo.$type)}const kc={$type:"NumberLiteral",value:"value"},Ta={$type:"Parameter",name:"name"},To={$type:"ParameterReference",parameter:"parameter"};function Vh(t){return J.isInstance(t,To.$type)}const pt={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function Bt(t){return J.isInstance(t,pt.$type)}const Ms={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},Vr={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function Kh(t){return J.isInstance(t,Vr.$type)}const Ro={$type:"ReturnType",name:"name"};function Hh(t){return J.isInstance(t,Ro.$type)}const Kr={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function Nr(t){return J.isInstance(t,Kr.$type)}const $i={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function Xh(t){return J.isInstance(t,$i.$type)}const bc={$type:"StringLiteral",value:"value"},Hr={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Yh(t){return J.isInstance(t,Hr.$type)}const rt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},Xr={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Jh(t){return J.isInstance(t,Xr.$type)}const Zt={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function Wt(t){return J.isInstance(t,Zt.$type)}const Yr={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function Zh(t){return J.isInstance(t,Yr.$type)}const Ua={$type:"Type",name:"name",type:"type"};function Qh(t){return J.isInstance(t,Ua.$type)}const Zn={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},Qn={$type:"TypeDefinition"},_c={$type:"UnionType",types:"types"},qa={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function _f(t){return J.isInstance(t,qa.$type)}const Jr={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function ep(t){return J.isInstance(t,Jr.$type)}const ei={$type:"ValueLiteral"},Ci={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function tp(t){return J.isInstance(t,Ci.$type)}class Nf extends Af{constructor(){super(...arguments),this.types={AbstractElement:{name:Je.$type,properties:{cardinality:{name:Je.cardinality}},superTypes:[]},AbstractParserRule:{name:Fa.$type,properties:{},superTypes:[ga.$type,ot.$type]},AbstractRule:{name:ga.$type,properties:{},superTypes:[]},AbstractType:{name:ot.$type,properties:{},superTypes:[]},Action:{name:vr.$type,properties:{cardinality:{name:vr.cardinality},feature:{name:vr.feature},inferredType:{name:vr.inferredType},operator:{name:vr.operator},type:{name:vr.type,referenceType:ot.$type}},superTypes:[Je.$type]},Alternatives:{name:Ga.$type,properties:{cardinality:{name:Ga.cardinality},elements:{name:Ga.elements,defaultValue:[]}},superTypes:[Je.$type]},ArrayLiteral:{name:$c.$type,properties:{elements:{name:$c.elements,defaultValue:[]}},superTypes:[ei.$type]},ArrayType:{name:Cc.$type,properties:{elementType:{name:Cc.elementType}},superTypes:[Qn.$type]},Assignment:{name:Er.$type,properties:{cardinality:{name:Er.cardinality},feature:{name:Er.feature},operator:{name:Er.operator},predicate:{name:Er.predicate},terminal:{name:Er.terminal}},superTypes:[Je.$type]},BooleanLiteral:{name:po.$type,properties:{true:{name:po.true,defaultValue:!1}},superTypes:[Fr.$type,ei.$type]},CharacterRange:{name:Ar.$type,properties:{cardinality:{name:Ar.cardinality},left:{name:Ar.left},lookahead:{name:Ar.lookahead},parenthesized:{name:Ar.parenthesized,defaultValue:!1},right:{name:Ar.right}},superTypes:[rt.$type]},Condition:{name:Fr.$type,properties:{},superTypes:[]},Conjunction:{name:ja.$type,properties:{left:{name:ja.left},right:{name:ja.right}},superTypes:[Fr.$type]},CrossReference:{name:$r.$type,properties:{cardinality:{name:$r.cardinality},deprecatedSyntax:{name:$r.deprecatedSyntax,defaultValue:!1},isMulti:{name:$r.isMulti,defaultValue:!1},terminal:{name:$r.terminal},type:{name:$r.type,referenceType:ot.$type}},superTypes:[Je.$type]},Disjunction:{name:za.$type,properties:{left:{name:za.left},right:{name:za.right}},superTypes:[Fr.$type]},EndOfFile:{name:mo.$type,properties:{cardinality:{name:mo.cardinality}},superTypes:[Je.$type]},Grammar:{name:sr.$type,properties:{imports:{name:sr.imports,defaultValue:[]},interfaces:{name:sr.interfaces,defaultValue:[]},isDeclared:{name:sr.isDeclared,defaultValue:!1},name:{name:sr.name},rules:{name:sr.rules,defaultValue:[]},types:{name:sr.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:Sc.$type,properties:{path:{name:Sc.path}},superTypes:[]},Group:{name:Br.$type,properties:{cardinality:{name:Br.cardinality},elements:{name:Br.elements,defaultValue:[]},guardCondition:{name:Br.guardCondition},predicate:{name:Br.predicate}},superTypes:[Je.$type]},InferredType:{name:go.$type,properties:{name:{name:go.name}},superTypes:[ot.$type]},InfixRule:{name:Lt.$type,properties:{call:{name:Lt.call},dataType:{name:Lt.dataType},inferredType:{name:Lt.inferredType},name:{name:Lt.name},operators:{name:Lt.operators},parameters:{name:Lt.parameters,defaultValue:[]},returnType:{name:Lt.returnType,referenceType:ot.$type}},superTypes:[Fa.$type]},InfixRuleOperatorList:{name:Ds.$type,properties:{associativity:{name:Ds.associativity},operators:{name:Ds.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:wc.$type,properties:{precedences:{name:wc.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Ei.$type,properties:{attributes:{name:Ei.attributes,defaultValue:[]},name:{name:Ei.name},superTypes:{name:Ei.superTypes,defaultValue:[],referenceType:ot.$type}},superTypes:[ot.$type]},Keyword:{name:Ai.$type,properties:{cardinality:{name:Ai.cardinality},predicate:{name:Ai.predicate},value:{name:Ai.value}},superTypes:[Je.$type]},NamedArgument:{name:ya.$type,properties:{calledByName:{name:ya.calledByName,defaultValue:!1},parameter:{name:ya.parameter,referenceType:Ta.$type},value:{name:ya.value}},superTypes:[]},NegatedToken:{name:Wr.$type,properties:{cardinality:{name:Wr.cardinality},lookahead:{name:Wr.lookahead},parenthesized:{name:Wr.parenthesized,defaultValue:!1},terminal:{name:Wr.terminal}},superTypes:[rt.$type]},Negation:{name:yo.$type,properties:{value:{name:yo.value}},superTypes:[Fr.$type]},NumberLiteral:{name:kc.$type,properties:{value:{name:kc.value}},superTypes:[ei.$type]},Parameter:{name:Ta.$type,properties:{name:{name:Ta.name}},superTypes:[]},ParameterReference:{name:To.$type,properties:{parameter:{name:To.parameter,referenceType:Ta.$type}},superTypes:[Fr.$type]},ParserRule:{name:pt.$type,properties:{dataType:{name:pt.dataType},definition:{name:pt.definition},entry:{name:pt.entry,defaultValue:!1},fragment:{name:pt.fragment,defaultValue:!1},inferredType:{name:pt.inferredType},name:{name:pt.name},parameters:{name:pt.parameters,defaultValue:[]},returnType:{name:pt.returnType,referenceType:ot.$type}},superTypes:[Fa.$type]},ReferenceType:{name:Ms.$type,properties:{isMulti:{name:Ms.isMulti,defaultValue:!1},referenceType:{name:Ms.referenceType}},superTypes:[Qn.$type]},RegexToken:{name:Vr.$type,properties:{cardinality:{name:Vr.cardinality},lookahead:{name:Vr.lookahead},parenthesized:{name:Vr.parenthesized,defaultValue:!1},regex:{name:Vr.regex}},superTypes:[rt.$type]},ReturnType:{name:Ro.$type,properties:{name:{name:Ro.name}},superTypes:[]},RuleCall:{name:Kr.$type,properties:{arguments:{name:Kr.arguments,defaultValue:[]},cardinality:{name:Kr.cardinality},predicate:{name:Kr.predicate},rule:{name:Kr.rule,referenceType:ga.$type}},superTypes:[Je.$type]},SimpleType:{name:$i.$type,properties:{primitiveType:{name:$i.primitiveType},stringType:{name:$i.stringType},typeRef:{name:$i.typeRef,referenceType:ot.$type}},superTypes:[Qn.$type]},StringLiteral:{name:bc.$type,properties:{value:{name:bc.value}},superTypes:[ei.$type]},TerminalAlternatives:{name:Hr.$type,properties:{cardinality:{name:Hr.cardinality},elements:{name:Hr.elements,defaultValue:[]},lookahead:{name:Hr.lookahead},parenthesized:{name:Hr.parenthesized,defaultValue:!1}},superTypes:[rt.$type]},TerminalElement:{name:rt.$type,properties:{cardinality:{name:rt.cardinality},lookahead:{name:rt.lookahead},parenthesized:{name:rt.parenthesized,defaultValue:!1}},superTypes:[Je.$type]},TerminalGroup:{name:Xr.$type,properties:{cardinality:{name:Xr.cardinality},elements:{name:Xr.elements,defaultValue:[]},lookahead:{name:Xr.lookahead},parenthesized:{name:Xr.parenthesized,defaultValue:!1}},superTypes:[rt.$type]},TerminalRule:{name:Zt.$type,properties:{definition:{name:Zt.definition},fragment:{name:Zt.fragment,defaultValue:!1},hidden:{name:Zt.hidden,defaultValue:!1},name:{name:Zt.name},type:{name:Zt.type}},superTypes:[ga.$type]},TerminalRuleCall:{name:Yr.$type,properties:{cardinality:{name:Yr.cardinality},lookahead:{name:Yr.lookahead},parenthesized:{name:Yr.parenthesized,defaultValue:!1},rule:{name:Yr.rule,referenceType:Zt.$type}},superTypes:[rt.$type]},Type:{name:Ua.$type,properties:{name:{name:Ua.name},type:{name:Ua.type}},superTypes:[ot.$type]},TypeAttribute:{name:Zn.$type,properties:{defaultValue:{name:Zn.defaultValue},isOptional:{name:Zn.isOptional,defaultValue:!1},name:{name:Zn.name},type:{name:Zn.type}},superTypes:[]},TypeDefinition:{name:Qn.$type,properties:{},superTypes:[]},UnionType:{name:_c.$type,properties:{types:{name:_c.types,defaultValue:[]}},superTypes:[Qn.$type]},UnorderedGroup:{name:qa.$type,properties:{cardinality:{name:qa.cardinality},elements:{name:qa.elements,defaultValue:[]}},superTypes:[Je.$type]},UntilToken:{name:Jr.$type,properties:{cardinality:{name:Jr.cardinality},lookahead:{name:Jr.lookahead},parenthesized:{name:Jr.parenthesized,defaultValue:!1},terminal:{name:Jr.terminal}},superTypes:[rt.$type]},ValueLiteral:{name:ei.$type,properties:{},superTypes:[]},Wildcard:{name:Ci.$type,properties:{cardinality:{name:Ci.cardinality},lookahead:{name:Ci.lookahead},parenthesized:{name:Ci.parenthesized,defaultValue:!1}},superTypes:[rt.$type]}}}}const J=new Nf;function vo(t){return new Jl(t,e=>Ii(e)?e.content:[],{includeRoot:!0})}function rp(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function Eo(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function ts(t){if(!t)return;const{offset:e,end:r,range:n}=t;return{range:n,offset:e,end:r,length:r-e}}var Mt;(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside"})(Mt||(Mt={}));function np(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return Mt.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return Mt.After;const r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,n=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return r&&n?Mt.Inside:r?Mt.OverlapBack:n?Mt.OverlapFront:Mt.Outside}function ip(t,e){return np(t,e)>Mt.After}const ap=/^[\w\p{L}]$/u;function sp(t,e){if(t){const r=op(t,!0);if(r&&Nc(r,e))return r;if(Cf(t)){const n=t.content.findIndex(i=>!i.hidden);for(let i=n-1;i>=0;i--){const a=t.content[i];if(Nc(a,e))return a}}}}function Nc(t,e){return $f(t)&&e.includes(t.tokenType.name)}function op(t,e=!0){for(;t.container;){const r=t.container;let n=r.content.indexOf(t);for(;n>0;){n--;const i=r.content[n];if(e||!i.hidden)return i}t=r}}class If extends Error{constructor(e,r){super(e?`${r} at ${e.range.start.line}:${e.range.start.character}`:r)}}function Wi(t,e="Error: Got unexpected value."){throw new Error(e)}function U(t){return t.charCodeAt(0)}function Fs(t,e){Array.isArray(t)?t.forEach(function(r){e.push(r)}):e.push(t)}function ti(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function Gr(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function lp(){throw Error("Internal Error - Should never get here!")}function Ic(t){return t.type==="Character"}const rs=[];for(let t=U("0");t<=U("9");t++)rs.push(t);const ns=[U("_")].concat(rs);for(let t=U("a");t<=U("z");t++)ns.push(t);for(let t=U("A");t<=U("Z");t++)ns.push(t);const Pc=[U(" "),U("\f"),U(`
|
|
1
|
+
var Ah=Object.defineProperty;var $h=(t,e,r)=>e in t?Ah(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Jt=(t,e,r)=>$h(t,typeof e!="symbol"?e+"":e,r);import{bb as Ch,bE as Sh,bF as St}from"./index-CLPXS5Pa.js";import{m as Gt,f as wh,d as kh}from"./min-CmgCLj3n.js";import{b as bh,l as _h,c as Nh,m as Ih,r as vc,n as xs}from"./_baseUniq-nFqJWqJf.js";function Ph(t,e){return bh(Gt(t,e))}function Oh(t,e){return t&&t.length?_h(t,Nh(e)):[]}function Fe(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function ut(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}function Qt(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}function Lh(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function Jn(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}class Af{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){var i;const r=this.types[e.container.$type];if(!r)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const n=(i=r.properties[e.property])==null?void 0:i.referenceType;if(!n)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){const r=this.types[e];return r||{name:e,properties:{},superTypes:[]}}isInstance(e,r){return Fe(e)&&this.isSubtype(e.$type,r)}isSubtype(e,r){if(e===r)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});const i=n[r];if(i!==void 0)return i;{const a=this.types[e],s=a?a.superTypes.some(o=>this.isSubtype(o,r)):!1;return n[r]=s,s}}getAllSubTypes(e){const r=this.allSubtypes[e];if(r)return r;{const n=this.getAllTypes(),i=[];for(const a of n)this.isSubtype(a,e)&&i.push(a);return this.allSubtypes[e]=i,i}}}function Ii(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function $f(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function Cf(t){return Ii(t)&&typeof t.fullText=="string"}class xe{constructor(e,r){this.startFn=e,this.nextFn=r}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){const e=this.iterator();let r=0,n=e.next();for(;!n.done;)r++,n=e.next();return r}toArray(){const e=[],r=this.iterator();let n;do n=r.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,r){const n=this.map(i=>[e?e(i):i,r?r(i):i]);return new Map(n)}toString(){return this.join()}concat(e){return new xe(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),r=>{let n;if(!r.firstDone){do if(n=this.nextFn(r.first),!n.done)return n;while(!n.done);r.firstDone=!0}do if(n=r.iterator.next(),!n.done)return n;while(!n.done);return Ze})}join(e=","){const r=this.iterator();let n="",i,a=!1;do i=r.next(),i.done||(a&&(n+=e),n+=xh(i.value)),a=!0;while(!i.done);return n}indexOf(e,r=0){const n=this.iterator();let i=0,a=n.next();for(;!a.done;){if(i>=r&&a.value===e)return i;a=n.next(),i++}return-1}every(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(!e(n.value))return!1;n=r.next()}return!0}some(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(e(n.value))return!0;n=r.next()}return!1}forEach(e){const r=this.iterator();let n=0,i=r.next();for(;!i.done;)e(i.value,n),i=r.next(),n++}map(e){return new xe(this.startFn,r=>{const{done:n,value:i}=this.nextFn(r);return n?Ze:{done:!1,value:e(i)}})}filter(e){return new xe(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&e(n.value))return n;while(!n.done);return Ze})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,r){const n=this.iterator();let i=r,a=n.next();for(;!a.done;)i===void 0?i=a.value:i=e(i,a.value),a=n.next();return i}reduceRight(e,r){return this.recursiveReduce(this.iterator(),e,r)}recursiveReduce(e,r,n){const i=e.next();if(i.done)return n;const a=this.recursiveReduce(e,r,n);return a===void 0?i.value:r(a,i.value)}find(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(e(n.value))return n.value;n=r.next()}}findIndex(e){const r=this.iterator();let n=0,i=r.next();for(;!i.done;){if(e(i.value))return n;i=r.next(),n++}return-1}includes(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(n.value===e)return!0;n=r.next()}return!1}flatMap(e){return new xe(()=>({this:this.startFn()}),r=>{do{if(r.iterator){const a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}const{done:n,value:i}=this.nextFn(r.this);if(!n){const a=e(i);if(Za(a))r.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}}while(r.iterator);return Ze})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const r=e>1?this.flat(e-1):this;return new xe(()=>({this:r.startFn()}),n=>{do{if(n.iterator){const s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}const{done:i,value:a}=r.nextFn(n.this);if(!i)if(Za(a))n.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}while(n.iterator);return Ze})}head(){const r=this.iterator().next();if(!r.done)return r.value}tail(e=1){return new xe(()=>{const r=this.startFn();for(let n=0;n<e;n++)if(this.nextFn(r).done)return r;return r},this.nextFn)}limit(e){return new xe(()=>({size:0,state:this.startFn()}),r=>(r.size++,r.size>e?Ze:this.nextFn(r.state)))}distinct(e){return new xe(()=>({set:new Set,internalState:this.startFn()}),r=>{let n;do if(n=this.nextFn(r.internalState),!n.done){const i=e?e(n.value):n.value;if(!r.set.has(i))return r.set.add(i),n}while(!n.done);return Ze})}exclude(e,r){const n=new Set;for(const i of e){const a=r?r(i):i;n.add(a)}return this.filter(i=>{const a=r?r(i):i;return!n.has(a)})}}function xh(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function Za(t){return!!t&&typeof t[Symbol.iterator]=="function"}const Sf=new xe(()=>{},()=>Ze),Ze=Object.freeze({done:!0,value:void 0});function de(...t){if(t.length===1){const e=t[0];if(e instanceof xe)return e;if(Za(e))return new xe(()=>e[Symbol.iterator](),r=>r.next());if(typeof e.length=="number")return new xe(()=>({index:0}),r=>r.index<e.length?{done:!1,value:e[r.index++]}:Ze)}return t.length>1?new xe(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const r=e.iterator.next();if(!r.done)return r;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){const r=t[e.collIndex++];Za(r)?e.iterator=r[Symbol.iterator]():r&&typeof r.length=="number"&&(e.array=r)}}while(e.iterator||e.array||e.collIndex<t.length);return Ze}):Sf}class Jl extends xe{constructor(e,r,n){super(()=>({iterators:n!=null&&n.includeRoot?[[e][Symbol.iterator]()]:[r(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){const s=i.iterators[i.iterators.length-1].next();if(s.done)i.iterators.pop();else return i.iterators.push(r(s.value)[Symbol.iterator]()),s}return Ze})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var fo;(function(t){function e(a){return a.reduce((s,o)=>s+o,0)}t.sum=e;function r(a){return a.reduce((s,o)=>s*o,0)}t.product=r;function n(a){return a.reduce((s,o)=>Math.min(s,o))}t.min=n;function i(a){return a.reduce((s,o)=>Math.max(s,o))}t.max=i})(fo||(fo={}));function ho(t,e={}){for(const[r,n]of Object.entries(t))r.startsWith("$")||(Array.isArray(n)?n.forEach((i,a)=>{Fe(i)&&(i.$container=t,i.$containerProperty=r,i.$containerIndex=a,e.deep&&ho(i,e))}):Fe(n)&&(n.$container=t,n.$containerProperty=r,e.deep&&ho(n,e)))}function vs(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function jt(t){const r=Ma(t).$document;if(!r)throw new Error("AST node has no document.");return r}function Ma(t){for(;t.$container;)t=t.$container;return t}function Ec(t){return ut(t)?t.ref?[t.ref]:[]:Qt(t)?t.items.map(e=>e.ref):[]}function Zl(t,e){if(!t)throw new Error("Node must be an AstNode.");const r=e==null?void 0:e.range;return new xe(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndex<n.keys.length;){const i=n.keys[n.keyIndex];if(!i.startsWith("$")){const a=t[i];if(Fe(a)){if(n.keyIndex++,Ac(a,r))return{done:!1,value:a}}else if(Array.isArray(a)){for(;n.arrayIndex<a.length;){const s=n.arrayIndex++,o=a[s];if(Fe(o)&&Ac(o,r))return{done:!1,value:o}}n.arrayIndex=0}}n.keyIndex++}return Ze})}function qi(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Jl(t,r=>Zl(r,e))}function zt(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Jl(t,r=>Zl(r,e),{includeRoot:!0})}function Ac(t,e){var n;if(!e)return!0;const r=(n=t.$cstNode)==null?void 0:n.range;return r?ip(r,e):!1}function Qa(t){return new xe(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const r=e.keys[e.keyIndex];if(!r.startsWith("$")){const n=t[r];if(ut(n)||Qt(n))return e.keyIndex++,{done:!1,value:{reference:n,container:t,property:r}};if(Array.isArray(n)){for(;e.arrayIndex<n.length;){const i=e.arrayIndex++,a=n[i];if(ut(a)||Qt(n))return{done:!1,value:{reference:a,container:t,property:r,index:i}}}e.arrayIndex=0}}e.keyIndex++}return Ze})}function Dh(t,e){const r=t.getTypeMetaData(e.$type),n=e;for(const i of Object.values(r.properties))i.defaultValue!==void 0&&n[i.name]===void 0&&(n[i.name]=wf(i.defaultValue))}function wf(t){return Array.isArray(t)?[...t.map(wf)]:t}const Je={$type:"AbstractElement",cardinality:"cardinality"};function Mh(t){return J.isInstance(t,Je.$type)}const Fa={$type:"AbstractParserRule"};function Bi(t){return J.isInstance(t,Fa.$type)}const ga={$type:"AbstractRule"},ot={$type:"AbstractType"},vr={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function Es(t){return J.isInstance(t,vr.$type)}const Ga={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function kf(t){return J.isInstance(t,Ga.$type)}const $c={$type:"ArrayLiteral",elements:"elements"},Cc={$type:"ArrayType",elementType:"elementType"},Er={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function br(t){return J.isInstance(t,Er.$type)}const po={$type:"BooleanLiteral",true:"true"};function Fh(t){return J.isInstance(t,po.$type)}const Ar={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function Gh(t){return J.isInstance(t,Ar.$type)}const Fr={$type:"Condition"},ja={$type:"Conjunction",left:"left",right:"right"};function jh(t){return J.isInstance(t,ja.$type)}const $r={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function As(t){return J.isInstance(t,$r.$type)}const za={$type:"Disjunction",left:"left",right:"right"};function zh(t){return J.isInstance(t,za.$type)}const mo={$type:"EndOfFile",cardinality:"cardinality"};function Uh(t){return J.isInstance(t,mo.$type)}const sr={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},Sc={$type:"GrammarImport",path:"path"},Br={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function Ql(t){return J.isInstance(t,Br.$type)}const go={$type:"InferredType",name:"name"};function bf(t){return J.isInstance(t,go.$type)}const Lt={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function es(t){return J.isInstance(t,Lt.$type)}const Ds={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},wc={$type:"InfixRuleOperators",precedences:"precedences"},Ei={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function qh(t){return J.isInstance(t,Ei.$type)}const Ai={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function _r(t){return J.isInstance(t,Ai.$type)}const ya={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},Wr={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Bh(t){return J.isInstance(t,Wr.$type)}const yo={$type:"Negation",value:"value"};function Wh(t){return J.isInstance(t,yo.$type)}const kc={$type:"NumberLiteral",value:"value"},Ta={$type:"Parameter",name:"name"},To={$type:"ParameterReference",parameter:"parameter"};function Vh(t){return J.isInstance(t,To.$type)}const pt={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function Bt(t){return J.isInstance(t,pt.$type)}const Ms={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},Vr={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function Kh(t){return J.isInstance(t,Vr.$type)}const Ro={$type:"ReturnType",name:"name"};function Hh(t){return J.isInstance(t,Ro.$type)}const Kr={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function Nr(t){return J.isInstance(t,Kr.$type)}const $i={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function Xh(t){return J.isInstance(t,$i.$type)}const bc={$type:"StringLiteral",value:"value"},Hr={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Yh(t){return J.isInstance(t,Hr.$type)}const rt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},Xr={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Jh(t){return J.isInstance(t,Xr.$type)}const Zt={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function Wt(t){return J.isInstance(t,Zt.$type)}const Yr={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function Zh(t){return J.isInstance(t,Yr.$type)}const Ua={$type:"Type",name:"name",type:"type"};function Qh(t){return J.isInstance(t,Ua.$type)}const Zn={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},Qn={$type:"TypeDefinition"},_c={$type:"UnionType",types:"types"},qa={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function _f(t){return J.isInstance(t,qa.$type)}const Jr={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function ep(t){return J.isInstance(t,Jr.$type)}const ei={$type:"ValueLiteral"},Ci={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function tp(t){return J.isInstance(t,Ci.$type)}class Nf extends Af{constructor(){super(...arguments),this.types={AbstractElement:{name:Je.$type,properties:{cardinality:{name:Je.cardinality}},superTypes:[]},AbstractParserRule:{name:Fa.$type,properties:{},superTypes:[ga.$type,ot.$type]},AbstractRule:{name:ga.$type,properties:{},superTypes:[]},AbstractType:{name:ot.$type,properties:{},superTypes:[]},Action:{name:vr.$type,properties:{cardinality:{name:vr.cardinality},feature:{name:vr.feature},inferredType:{name:vr.inferredType},operator:{name:vr.operator},type:{name:vr.type,referenceType:ot.$type}},superTypes:[Je.$type]},Alternatives:{name:Ga.$type,properties:{cardinality:{name:Ga.cardinality},elements:{name:Ga.elements,defaultValue:[]}},superTypes:[Je.$type]},ArrayLiteral:{name:$c.$type,properties:{elements:{name:$c.elements,defaultValue:[]}},superTypes:[ei.$type]},ArrayType:{name:Cc.$type,properties:{elementType:{name:Cc.elementType}},superTypes:[Qn.$type]},Assignment:{name:Er.$type,properties:{cardinality:{name:Er.cardinality},feature:{name:Er.feature},operator:{name:Er.operator},predicate:{name:Er.predicate},terminal:{name:Er.terminal}},superTypes:[Je.$type]},BooleanLiteral:{name:po.$type,properties:{true:{name:po.true,defaultValue:!1}},superTypes:[Fr.$type,ei.$type]},CharacterRange:{name:Ar.$type,properties:{cardinality:{name:Ar.cardinality},left:{name:Ar.left},lookahead:{name:Ar.lookahead},parenthesized:{name:Ar.parenthesized,defaultValue:!1},right:{name:Ar.right}},superTypes:[rt.$type]},Condition:{name:Fr.$type,properties:{},superTypes:[]},Conjunction:{name:ja.$type,properties:{left:{name:ja.left},right:{name:ja.right}},superTypes:[Fr.$type]},CrossReference:{name:$r.$type,properties:{cardinality:{name:$r.cardinality},deprecatedSyntax:{name:$r.deprecatedSyntax,defaultValue:!1},isMulti:{name:$r.isMulti,defaultValue:!1},terminal:{name:$r.terminal},type:{name:$r.type,referenceType:ot.$type}},superTypes:[Je.$type]},Disjunction:{name:za.$type,properties:{left:{name:za.left},right:{name:za.right}},superTypes:[Fr.$type]},EndOfFile:{name:mo.$type,properties:{cardinality:{name:mo.cardinality}},superTypes:[Je.$type]},Grammar:{name:sr.$type,properties:{imports:{name:sr.imports,defaultValue:[]},interfaces:{name:sr.interfaces,defaultValue:[]},isDeclared:{name:sr.isDeclared,defaultValue:!1},name:{name:sr.name},rules:{name:sr.rules,defaultValue:[]},types:{name:sr.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:Sc.$type,properties:{path:{name:Sc.path}},superTypes:[]},Group:{name:Br.$type,properties:{cardinality:{name:Br.cardinality},elements:{name:Br.elements,defaultValue:[]},guardCondition:{name:Br.guardCondition},predicate:{name:Br.predicate}},superTypes:[Je.$type]},InferredType:{name:go.$type,properties:{name:{name:go.name}},superTypes:[ot.$type]},InfixRule:{name:Lt.$type,properties:{call:{name:Lt.call},dataType:{name:Lt.dataType},inferredType:{name:Lt.inferredType},name:{name:Lt.name},operators:{name:Lt.operators},parameters:{name:Lt.parameters,defaultValue:[]},returnType:{name:Lt.returnType,referenceType:ot.$type}},superTypes:[Fa.$type]},InfixRuleOperatorList:{name:Ds.$type,properties:{associativity:{name:Ds.associativity},operators:{name:Ds.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:wc.$type,properties:{precedences:{name:wc.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Ei.$type,properties:{attributes:{name:Ei.attributes,defaultValue:[]},name:{name:Ei.name},superTypes:{name:Ei.superTypes,defaultValue:[],referenceType:ot.$type}},superTypes:[ot.$type]},Keyword:{name:Ai.$type,properties:{cardinality:{name:Ai.cardinality},predicate:{name:Ai.predicate},value:{name:Ai.value}},superTypes:[Je.$type]},NamedArgument:{name:ya.$type,properties:{calledByName:{name:ya.calledByName,defaultValue:!1},parameter:{name:ya.parameter,referenceType:Ta.$type},value:{name:ya.value}},superTypes:[]},NegatedToken:{name:Wr.$type,properties:{cardinality:{name:Wr.cardinality},lookahead:{name:Wr.lookahead},parenthesized:{name:Wr.parenthesized,defaultValue:!1},terminal:{name:Wr.terminal}},superTypes:[rt.$type]},Negation:{name:yo.$type,properties:{value:{name:yo.value}},superTypes:[Fr.$type]},NumberLiteral:{name:kc.$type,properties:{value:{name:kc.value}},superTypes:[ei.$type]},Parameter:{name:Ta.$type,properties:{name:{name:Ta.name}},superTypes:[]},ParameterReference:{name:To.$type,properties:{parameter:{name:To.parameter,referenceType:Ta.$type}},superTypes:[Fr.$type]},ParserRule:{name:pt.$type,properties:{dataType:{name:pt.dataType},definition:{name:pt.definition},entry:{name:pt.entry,defaultValue:!1},fragment:{name:pt.fragment,defaultValue:!1},inferredType:{name:pt.inferredType},name:{name:pt.name},parameters:{name:pt.parameters,defaultValue:[]},returnType:{name:pt.returnType,referenceType:ot.$type}},superTypes:[Fa.$type]},ReferenceType:{name:Ms.$type,properties:{isMulti:{name:Ms.isMulti,defaultValue:!1},referenceType:{name:Ms.referenceType}},superTypes:[Qn.$type]},RegexToken:{name:Vr.$type,properties:{cardinality:{name:Vr.cardinality},lookahead:{name:Vr.lookahead},parenthesized:{name:Vr.parenthesized,defaultValue:!1},regex:{name:Vr.regex}},superTypes:[rt.$type]},ReturnType:{name:Ro.$type,properties:{name:{name:Ro.name}},superTypes:[]},RuleCall:{name:Kr.$type,properties:{arguments:{name:Kr.arguments,defaultValue:[]},cardinality:{name:Kr.cardinality},predicate:{name:Kr.predicate},rule:{name:Kr.rule,referenceType:ga.$type}},superTypes:[Je.$type]},SimpleType:{name:$i.$type,properties:{primitiveType:{name:$i.primitiveType},stringType:{name:$i.stringType},typeRef:{name:$i.typeRef,referenceType:ot.$type}},superTypes:[Qn.$type]},StringLiteral:{name:bc.$type,properties:{value:{name:bc.value}},superTypes:[ei.$type]},TerminalAlternatives:{name:Hr.$type,properties:{cardinality:{name:Hr.cardinality},elements:{name:Hr.elements,defaultValue:[]},lookahead:{name:Hr.lookahead},parenthesized:{name:Hr.parenthesized,defaultValue:!1}},superTypes:[rt.$type]},TerminalElement:{name:rt.$type,properties:{cardinality:{name:rt.cardinality},lookahead:{name:rt.lookahead},parenthesized:{name:rt.parenthesized,defaultValue:!1}},superTypes:[Je.$type]},TerminalGroup:{name:Xr.$type,properties:{cardinality:{name:Xr.cardinality},elements:{name:Xr.elements,defaultValue:[]},lookahead:{name:Xr.lookahead},parenthesized:{name:Xr.parenthesized,defaultValue:!1}},superTypes:[rt.$type]},TerminalRule:{name:Zt.$type,properties:{definition:{name:Zt.definition},fragment:{name:Zt.fragment,defaultValue:!1},hidden:{name:Zt.hidden,defaultValue:!1},name:{name:Zt.name},type:{name:Zt.type}},superTypes:[ga.$type]},TerminalRuleCall:{name:Yr.$type,properties:{cardinality:{name:Yr.cardinality},lookahead:{name:Yr.lookahead},parenthesized:{name:Yr.parenthesized,defaultValue:!1},rule:{name:Yr.rule,referenceType:Zt.$type}},superTypes:[rt.$type]},Type:{name:Ua.$type,properties:{name:{name:Ua.name},type:{name:Ua.type}},superTypes:[ot.$type]},TypeAttribute:{name:Zn.$type,properties:{defaultValue:{name:Zn.defaultValue},isOptional:{name:Zn.isOptional,defaultValue:!1},name:{name:Zn.name},type:{name:Zn.type}},superTypes:[]},TypeDefinition:{name:Qn.$type,properties:{},superTypes:[]},UnionType:{name:_c.$type,properties:{types:{name:_c.types,defaultValue:[]}},superTypes:[Qn.$type]},UnorderedGroup:{name:qa.$type,properties:{cardinality:{name:qa.cardinality},elements:{name:qa.elements,defaultValue:[]}},superTypes:[Je.$type]},UntilToken:{name:Jr.$type,properties:{cardinality:{name:Jr.cardinality},lookahead:{name:Jr.lookahead},parenthesized:{name:Jr.parenthesized,defaultValue:!1},terminal:{name:Jr.terminal}},superTypes:[rt.$type]},ValueLiteral:{name:ei.$type,properties:{},superTypes:[]},Wildcard:{name:Ci.$type,properties:{cardinality:{name:Ci.cardinality},lookahead:{name:Ci.lookahead},parenthesized:{name:Ci.parenthesized,defaultValue:!1}},superTypes:[rt.$type]}}}}const J=new Nf;function vo(t){return new Jl(t,e=>Ii(e)?e.content:[],{includeRoot:!0})}function rp(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function Eo(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function ts(t){if(!t)return;const{offset:e,end:r,range:n}=t;return{range:n,offset:e,end:r,length:r-e}}var Mt;(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside"})(Mt||(Mt={}));function np(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return Mt.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return Mt.After;const r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,n=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return r&&n?Mt.Inside:r?Mt.OverlapBack:n?Mt.OverlapFront:Mt.Outside}function ip(t,e){return np(t,e)>Mt.After}const ap=/^[\w\p{L}]$/u;function sp(t,e){if(t){const r=op(t,!0);if(r&&Nc(r,e))return r;if(Cf(t)){const n=t.content.findIndex(i=>!i.hidden);for(let i=n-1;i>=0;i--){const a=t.content[i];if(Nc(a,e))return a}}}}function Nc(t,e){return $f(t)&&e.includes(t.tokenType.name)}function op(t,e=!0){for(;t.container;){const r=t.container;let n=r.content.indexOf(t);for(;n>0;){n--;const i=r.content[n];if(e||!i.hidden)return i}t=r}}class If extends Error{constructor(e,r){super(e?`${r} at ${e.range.start.line}:${e.range.start.character}`:r)}}function Wi(t,e="Error: Got unexpected value."){throw new Error(e)}function U(t){return t.charCodeAt(0)}function Fs(t,e){Array.isArray(t)?t.forEach(function(r){e.push(r)}):e.push(t)}function ti(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function Gr(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function lp(){throw Error("Internal Error - Should never get here!")}function Ic(t){return t.type==="Character"}const rs=[];for(let t=U("0");t<=U("9");t++)rs.push(t);const ns=[U("_")].concat(rs);for(let t=U("a");t<=U("z");t++)ns.push(t);for(let t=U("A");t<=U("Z");t++)ns.push(t);const Pc=[U(" "),U("\f"),U(`
|
|
2
2
|
`),U("\r"),U(" "),U("\v"),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U(" "),U("\u2028"),U("\u2029"),U(" "),U(" "),U(" "),U("\uFEFF")],cp=/[0-9a-fA-F]/,Ra=/[0-9]/,up=/[1-9]/;class Pf{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const r=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":ti(n,"global");break;case"i":ti(n,"ignoreCase");break;case"m":ti(n,"multiLine");break;case"u":ti(n,"unicode");break;case"y":ti(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:r,loc:this.loc(0)}}disjunction(){const e=[],r=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(r)}}alternative(){const e=[],r=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(r)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":r="Lookbehind";break;case"!":r="NegativeLookbehind"}break}}Gr(r);const n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(e)}}return lp()}quantifier(e=!1){let r;const n=this.idx;switch(this.popChar()){case"*":r={atLeast:0,atMost:1/0};break;case"+":r={atLeast:1,atMost:1/0};break;case"?":r={atLeast:0,atMost:1};break;case"{":const i=this.integerIncludingZero();switch(this.popChar()){case"}":r={atLeast:i,atMost:i};break;case",":let a;this.isDigit()?(a=this.integerIncludingZero(),r={atLeast:i,atMost:a}):r={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&r===void 0)return;Gr(r);break}if(!(e===!0&&r===void 0)&&Gr(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(n),r}atom(){let e;const r=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}if(e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),Gr(e))return e.loc=this.loc(r),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[U(`
|
|
3
3
|
`),U("\r"),U("\u2028"),U("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,r=!1;switch(this.popChar()){case"d":e=rs;break;case"D":e=rs,r=!0;break;case"s":e=Pc;break;case"S":e=Pc,r=!0;break;case"w":e=ns;break;case"W":e=ns,r=!0;break}if(Gr(e))return{type:"Set",value:e,complement:r}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=U("\f");break;case"n":e=U(`
|
|
4
4
|
`);break;case"r":e=U("\r");break;case"t":e=U(" ");break;case"v":e=U("\v");break}if(Gr(e))return{type:"Character",value:e}}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:U("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){const e=this.popChar();return{type:"Character",value:U(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
package/dist/web/assets/{wardleyDiagram-NUSXRM2D-DVMWnQbQ.js → wardleyDiagram-NUSXRM2D-DHkUBrSw.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as zt,g as Lt,q as Xt,p as At,a as Ct,b as Et,_ as y,l as et,I as Tt,e as Yt,z as Bt,c as H,i as Rt}from"./index-
|
|
1
|
+
import{s as zt,g as Lt,q as Xt,p as At,a as Ct,b as Et,_ as y,l as et,I as Tt,e as Yt,z as Bt,c as H,i as Rt}from"./index-CLPXS5Pa.js";import{p as Ft}from"./chunk-4BX2VUAB-Bgzv4fI5.js";import{p as It}from"./wardley-RL74JXVD-xqk6dIJX.js";import"./min-CmgCLj3n.js";import"./_baseUniq-nFqJWqJf.js";var q=y((a,r)=>{const e=a<=1?a*100:a;if(e<0||e>100)throw new Error(`${r} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return e},"toPercent"),Y=y((a,r,e)=>({x:q(r,`${e} evolution`),y:q(a,`${e} visibility`)}),"toCoordinates"),tt=y(a=>{if(a){if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward"}},"getFlowFromPort"),Ot=y(a=>{if(!(a!=null&&a.startsWith("+")))return{};const r=/^\+'([^']*)'/.exec(a),e=r==null?void 0:r[1];return a.includes("<>")?{flow:"bidirectional",label:e}:a.includes("<")?{flow:"backward",label:e}:a.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Wt=y((a,r)=>{if(Ft(a,r),a.size&&r.setSize(a.size.width,a.size.height),a.evolution){const e=a.evolution.stages.map(o=>o.secondName?`${o.name.trim()} / ${o.secondName.trim()}`:o.name.trim()),h=a.evolution.stages.filter(o=>o.boundary!==void 0).map(o=>o.boundary);r.updateAxes({stages:e,stageBoundaries:h})}if(a.anchors.forEach(e=>{const h=Y(e.visibility,e.evolution,`Anchor "${e.name}"`);r.addNode(e.name,e.name,h.x,h.y,"anchor")}),a.components.forEach(e=>{var v;const h=Y(e.visibility,e.evolution,`Component "${e.name}"`),o=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,m=(v=e.decorator)==null?void 0:v.strategy;r.addNode(e.name,e.name,h.x,h.y,"component",o,d,e.inertia,m)}),a.notes.forEach(e=>{const h=Y(e.visibility,e.evolution,`Note "${e.text}"`);r.addNote(e.text,h.x,h.y)}),a.pipelines.forEach(e=>{const h=r.getNode(e.parent);if(!h||typeof h.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const o=h.y;r.startPipeline(e.parent),e.components.forEach(d=>{const m=`${e.parent}_${d.name}`,v=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,A=q(d.evolution,`Pipeline component "${d.name}" evolution`);r.addNode(m,d.name,A,o,"pipeline-component",v,g),r.addPipelineComponent(e.parent,m)})}),a.links.forEach(e=>{const h=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let o=tt(e.fromPort)??tt(e.toPort);const{flow:d,label:m}=Ot(e.arrow);!o&&d&&(o=d);const v=e.linkLabel,g=m??v;r.addLink(e.from,e.to,h,g,o)}),a.evolves.forEach(e=>{const h=r.getNode(e.component);if((h==null?void 0:h.y)!==void 0){const o=q(e.target,`Evolve target for "${e.component}"`);r.addTrend(e.component,o,h.y)}}),a.annotations.length>0){const e=a.annotations[0],h=Y(e.x,e.y,"Annotations box");r.setAnnotationsBox(h.x,h.y)}a.annotation.forEach(e=>{const h=Y(e.x,e.y,`Annotation ${e.number}`);r.addAnnotation(e.number,[{x:h.x,y:h.y}],e.text)}),a.accelerators.forEach(e=>{const h=Y(e.x,e.y,`Accelerator "${e.name}"`);r.addAccelerator(e.name,h.x,h.y)}),a.deaccelerators.forEach(e=>{const h=Y(e.x,e.y,`Deaccelerator "${e.name}"`);r.addDeaccelerator(e.name,h.x,h.y)})},"populateDb"),at={parser:{yy:void 0},parse:y(async a=>{var h;const r=await It("wardley",a);et.debug(r);const e=(h=at.parser)==null?void 0:h.yy;if(!e||typeof e.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Wt(r,e)},"parse")},R,Dt=(R=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(r){const e=this.nodes.get(r.id)??{id:r.id,label:r.label},h={...e,...r,className:r.className??e.className,labelOffsetX:r.labelOffsetX??e.labelOffsetX,labelOffsetY:r.labelOffsetY??e.labelOffsetY};this.nodes.set(r.id,h)}addLink(r){this.links.push(r)}addTrend(r){this.trends.set(r.nodeId,r)}startPipeline(r){this.pipelines.set(r,{nodeId:r,componentIds:[]});const e=this.nodes.get(r);e&&(e.isPipelineParent=!0)}addPipelineComponent(r,e){const h=this.pipelines.get(r);h&&h.componentIds.push(e);const o=this.nodes.get(e);o&&(o.inPipeline=!0)}addAnnotation(r){this.annotations.push(r)}addNote(r){this.notes.push(r)}addAccelerator(r){this.accelerators.push(r)}addDeaccelerator(r){this.deaccelerators.push(r)}setAnnotationsBox(r,e){this.annotationsBox={x:r,y:e}}setAxes(r){this.axes={...this.axes,...r}}setSize(r,e){this.size={width:r,height:e}}getNode(r){return this.nodes.get(r)}build(){const r=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);r.push(e)}return{nodes:r,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},y(R,"WardleyBuilder"),R),P=new Dt;function N(a){const r=H();return Rt(a.trim(),r)}y(N,"textSanitizer");function rt(){return H()["wardley-beta"]}y(rt,"getConfig");function ot(a,r,e,h,o,d,m,v,g){P.addNode({id:a,label:N(r),x:e,y:h,className:o,labelOffsetX:d,labelOffsetY:m,inertia:v,sourceStrategy:g})}y(ot,"addNode");function st(a,r,e=!1,h,o){P.addLink({source:a,target:r,dashed:e,label:h,flow:o})}y(st,"addLink");function nt(a,r,e){P.addTrend({nodeId:a,targetX:r,targetY:e})}y(nt,"addTrend");function it(a,r,e){P.addAnnotation({number:a,coordinates:r,text:e?N(e):void 0})}y(it,"addAnnotation");function dt(a,r,e){P.addNote({text:N(a),x:r,y:e})}y(dt,"addNote");function lt(a,r,e){P.addAccelerator({name:N(a),x:r,y:e})}y(lt,"addAccelerator");function ct(a,r,e){P.addDeaccelerator({name:N(a),x:r,y:e})}y(ct,"addDeaccelerator");function pt(a,r){P.setAnnotationsBox(a,r)}y(pt,"setAnnotationsBox");function ht(a,r){P.setSize(a,r)}y(ht,"setSize");function xt(a){P.startPipeline(a)}y(xt,"startPipeline");function ft(a,r){P.addPipelineComponent(a,r)}y(ft,"addPipelineComponent");function gt(a){const r={};a.xLabel&&(r.xLabel=N(a.xLabel)),a.yLabel&&(r.yLabel=N(a.yLabel)),a.stages&&(r.stages=a.stages.map(e=>N(e))),a.stageBoundaries&&(r.stageBoundaries=a.stageBoundaries),P.setAxes(r)}y(gt,"updateAxes");function ut(a){return P.getNode(a)}y(ut,"getNode");function yt(){return P.build()}y(yt,"getWardleyData");function mt(){P.clear(),Bt()}y(mt,"clear");var Gt={getConfig:rt,addNode:ot,addLink:st,addTrend:nt,addAnnotation:it,addNote:dt,addAccelerator:lt,addDeaccelerator:ct,setAnnotationsBox:pt,setSize:ht,startPipeline:xt,addPipelineComponent:ft,updateAxes:gt,getNode:ut,getWardleyData:yt,clear:mt,setAccTitle:Et,getAccTitle:Ct,setDiagramTitle:At,getDiagramTitle:Xt,getAccDescription:Lt,setAccDescription:zt},qt=["Genesis","Custom Built","Product","Commodity"],Ht=y(()=>{var r,e,h,o,d,m,v,g,A,M,b,z;const{themeVariables:a}=H();return{backgroundColor:((r=a.wardley)==null?void 0:r.backgroundColor)??a.background??"#fff",axisColor:((e=a.wardley)==null?void 0:e.axisColor)??"#000",axisTextColor:((h=a.wardley)==null?void 0:h.axisTextColor)??a.primaryTextColor??"#222",gridColor:((o=a.wardley)==null?void 0:o.gridColor)??"rgba(100, 100, 100, 0.2)",componentFill:((d=a.wardley)==null?void 0:d.componentFill)??"#fff",componentStroke:((m=a.wardley)==null?void 0:m.componentStroke)??"#000",componentLabelColor:((v=a.wardley)==null?void 0:v.componentLabelColor)??a.primaryTextColor??"#222",linkStroke:((g=a.wardley)==null?void 0:g.linkStroke)??"#000",evolutionStroke:((A=a.wardley)==null?void 0:A.evolutionStroke)??"#dc3545",annotationStroke:((M=a.wardley)==null?void 0:M.annotationStroke)??"#000",annotationTextColor:((b=a.wardley)==null?void 0:b.annotationTextColor)??a.primaryTextColor??"#222",annotationFill:((z=a.wardley)==null?void 0:z.annotationFill)??a.background??"#fff"}},"getTheme"),jt=y(()=>{const a=H()["wardley-beta"];return{width:(a==null?void 0:a.width)??900,height:(a==null?void 0:a.height)??600,padding:(a==null?void 0:a.padding)??48,nodeRadius:(a==null?void 0:a.nodeRadius)??6,nodeLabelOffset:(a==null?void 0:a.nodeLabelOffset)??8,axisFontSize:(a==null?void 0:a.axisFontSize)??12,labelFontSize:(a==null?void 0:a.labelFontSize)??10,showGrid:(a==null?void 0:a.showGrid)??!1,useMaxWidth:(a==null?void 0:a.useMaxWidth)??!0}},"getConfigValues"),_t=y((a,r,e,h)=>{var K,Q;et.debug(`Rendering Wardley map
|
|
2
2
|
`+a);const o=jt(),d=Ht(),m=o.nodeRadius*1.6,v=h.db,g=v.getWardleyData(),A=v.getDiagramTitle(),M=((K=g.size)==null?void 0:K.width)??o.width,b=((Q=g.size)==null?void 0:Q.height)??o.height,z=Tt(r);z.selectAll("*").remove(),Yt(z,b,M,o.useMaxWidth),z.attr("viewBox",`0 0 ${M} ${b}`);const S=z.append("g").attr("class","wardley-map"),j=z.append("defs");j.append("marker").attr("id",`arrow-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),j.append("marker").attr("id",`link-arrow-end-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),j.append("marker").attr("id",`link-arrow-start-${r}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),S.append("rect").attr("class","wardley-background").attr("width",M).attr("height",b).attr("fill",d.backgroundColor);const F=M-o.padding*2,I=b-o.padding*2;A&&S.append("text").attr("class","wardley-title").attr("x",M/2).attr("y",o.padding/2).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(A);const C=y(t=>o.padding+t/100*F,"projectX"),E=y(t=>b-o.padding-t/100*I,"projectY"),W=S.append("g").attr("class","wardley-axes");W.append("line").attr("x1",o.padding).attr("x2",M-o.padding).attr("y1",b-o.padding).attr("y2",b-o.padding).attr("stroke",d.axisColor).attr("stroke-width",1),W.append("line").attr("x1",o.padding).attr("x2",o.padding).attr("y1",o.padding).attr("y2",b-o.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const wt=g.axes.xLabel??"Evolution",bt=g.axes.yLabel??"Visibility";W.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",o.padding+F/2).attr("y",b-o.padding/4).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(wt),W.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",o.padding/3).attr("y",o.padding+I/2).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${o.padding/3} ${o.padding+I/2})`).text(bt);const O=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:qt;if(O.length>0){const t=S.append("g").attr("class","wardley-stages"),n=g.axes.stageBoundaries,s=[];if(n&&n.length===O.length){let i=0;n.forEach(p=>{s.push({start:i,end:p}),i=p})}else{const i=1/O.length;O.forEach((p,l)=>{s.push({start:l*i,end:(l+1)*i})})}O.forEach((i,p)=>{const l=s[p],x=o.padding+l.start*F,f=o.padding+l.end*F,u=(x+f)/2;p>0&&t.append("line").attr("x1",x).attr("x2",x).attr("y1",o.padding).attr("y2",b-o.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",u).attr("y",b-o.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(o.showGrid){const t=S.append("g").attr("class","wardley-grid");for(let n=1;n<4;n++){const s=n/4,i=o.padding+F*s;t.append("line").attr("x1",i).attr("x2",i).attr("y1",o.padding).attr("y2",b-o.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",o.padding).attr("x2",M-o.padding).attr("y1",b-o.padding-I*s).attr("y2",b-o.padding-I*s).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:C(t.x),y:E(t.y),node:t})}),g.pipelines.length>0){const t=S.append("g").attr("class","wardley-pipelines"),n=S.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(s=>{if(s.componentIds.length===0)return;const i=s.componentIds.map(f=>({id:f,pos:c.get(f),node:g.nodes.find(u=>u.id===f)})).filter(f=>f.pos&&f.node).sort((f,u)=>f.node.x-u.node.x);for(let f=0;f<i.length-1;f++){const u=i[f],w=i[f+1];n.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",u.pos.x).attr("y1",u.pos.y).attr("x2",w.pos.x).attr("y2",w.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let p=1/0,l=-1/0,x=0;if(s.componentIds.forEach(f=>{const u=c.get(f);u&&(p=Math.min(p,u.x),l=Math.max(l,u.x),x=u.y)}),p!==1/0&&l!==-1/0){const u=o.nodeRadius*4,w=x-u/2,$=c.get(s.nodeId);if($){const X=(p+l)/2;$.x=X,$.y=w-m/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",p-15).attr("y",w).attr("width",l-p+30).attr("height",u).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const Z=S.append("g").attr("class","wardley-links"),U=new Map;g.pipelines.forEach(t=>{U.set(t.nodeId,new Set(t.componentIds))});const J=g.links.filter(t=>{if(!c.has(t.source)||!c.has(t.target))return!1;const n=U.get(t.target);return!(n!=null&&n.has(t.source))});Z.selectAll("line").data(J).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.x+l/f*p}).attr("y1",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.y+x/f*p}).attr("x2",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.x+l/f*p}).attr("y2",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.y+x/f*p}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${r})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${r})`:null),Z.selectAll("text").data(J.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,p=s.y-n.y,l=s.x-n.x,x=Math.sqrt(l*l+p*p),f=8,u=p/x;return i+u*f}).attr("y",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.y+s.y)/2,p=s.x-n.x,l=s.y-n.y,x=Math.sqrt(p*p+l*l),f=8,u=-p/x;return i+u*f}).attr("fill",d.axisTextColor).attr("font-size",o.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,p=(n.y+s.y)/2,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x),u=8,w=x/f,$=-l/f,X=i+w*u,D=p+$*u;let B=Math.atan2(x,l)*180/Math.PI;return(B>90||B<-90)&&(B+=180),`rotate(${B} ${X} ${D})`}).text(t=>t.label);const kt=S.append("g").attr("class","wardley-trends"),Pt=g.trends.map(t=>{const n=c.get(t.nodeId);if(!n)return null;const s=C(t.targetX),i=E(t.targetY),p=s-n.x,l=i-n.y,x=Math.sqrt(p*p+l*l),f=o.nodeRadius+2,u=x>f?s-p/x*f:s,w=x>f?i-l/x*f:i;return{origin:n,targetX:s,targetY:i,adjustedX2:u,adjustedY2:w}}).filter(t=>t!==null);kt.selectAll("line").data(Pt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${r})`);const L=S.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));L.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),L.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),L.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const T=L.filter(t=>t.sourceStrategy==="market");T.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),L.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const _=o.nodeRadius*.7,k=o.nodeRadius*1.2;if(T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-k).attr("x2",t=>c.get(t.id).x-k*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-k*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+k*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+k*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-k).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-k).attr("r",_).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-k*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("r",_).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+k*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("r",_).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),L.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-m/2).attr("y",t=>c.get(t.id).y-m/2).attr("width",m).attr("height",m).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),L.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:o.nodeRadius+15;return t.sourceStrategy&&(s+=o.nodeRadius+10),n.x+s}).attr("y1",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:o.nodeRadius*2;return n.y-s/2}).attr("x2",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:o.nodeRadius+15;return t.sourceStrategy&&(s+=o.nodeRadius+10),n.x+s}).attr("y2",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:o.nodeRadius*2;return n.y+s/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),L.append("text").attr("x",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?n.x+t.labelOffsetX:n.x;let s=o.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(s+=10);const i=t.labelOffsetX??s;return n.x+i}).attr("y",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?n.y+t.labelOffsetY:n.y-3;let s=-o.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(s-=10);const i=t.labelOffsetY??s;return n.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",o.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){const t=S.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(n=>{const s=n.coordinates.map(i=>({x:C(i.x),y:E(i.y)}));if(s.length>1)for(let i=0;i<s.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",s[i].x).attr("y1",s[i].y).attr("x2",s[i+1].x).attr("y2",s[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");s.forEach(i=>{const p=t.append("g").attr("class","wardley-annotation");p.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),p.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.number)})}),g.annotationsBox){let n=C(g.annotationsBox.x),s=E(g.annotationsBox.y);const i=10,p=16,l=11,x=t.append("g").attr("class","wardley-annotations-box"),f=[...g.annotations].filter(w=>w.text).sort((w,$)=>w.number-$.number),u=[];if(f.forEach((w,$)=>{const X=x.append("text").attr("x",n+i).attr("y",s+i+($+1)*p).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${w.number}. ${w.text}`);u.push(X)}),u.length>0){let w=0,$=0;u.forEach(V=>{const G=V.node(),Mt=G.getComputedTextLength();w=Math.max(w,Mt);const Nt=G.getBBox();$=Math.max($,Nt.height)});const X=w+i*2+105,D=f.length*p+i*2+$/2,B=o.padding,vt=M-o.padding-X,St=o.padding,$t=b-o.padding-D;n=Math.max(B,Math.min(n,vt)),s=Math.max(St,Math.min(s,$t)),u.forEach((V,G)=>{V.attr("x",n+i).attr("y",s+i+(G+1)*p)}),x.insert("rect","text").attr("x",n).attr("y",s).attr("width",X).attr("height",D).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=S.append("g").attr("class","wardley-notes");g.notes.forEach(n=>{const s=C(n.x),i=E(n.y);t.append("text").attr("x",s).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.text)})}if(g.accelerators.length>0){const t=S.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(n=>{const s=C(n.x),i=E(n.y),p=60,l=30,x=20,f=`
|
|
3
3
|
M ${s} ${i-l/2}
|
|
4
4
|
L ${s+p-x} ${i-l/2}
|