local-operator-ui 0.40.0 → 0.41.0

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.
Files changed (91) hide show
  1. package/out/main/index.js +43 -1
  2. package/out/renderer/assets/{_basePickBy-DpS1gi-o.js → _basePickBy--UFblcLV.js} +1 -1
  3. package/out/renderer/assets/{_baseUniq-BU_W0zZ3.js → _baseUniq-Ct7pRnI4.js} +1 -1
  4. package/out/renderer/assets/{agent-details-page-mS7IJBVP.js → agent-details-page-Col1VcjS.js} +1 -1
  5. package/out/renderer/assets/{agent-hub-page-CWGw4Aok.js → agent-hub-page-CTPn6yGs.js} +1 -1
  6. package/out/renderer/assets/{agents-page-CzMpVd20.js → agents-page-CBWj1DTr.js} +3 -3
  7. package/out/renderer/assets/{arc-T0TkGR-7.js → arc-B-YNVaQW.js} +1 -1
  8. package/out/renderer/assets/{architectureDiagram-IEHRJDOE-FOFq1O67.js → architectureDiagram-IEHRJDOE-DCzmuMLj.js} +1 -1
  9. package/out/renderer/assets/{blockDiagram-JOT3LUYC-Dbo2qDB8.js → blockDiagram-JOT3LUYC-f1GS2_U0.js} +1 -1
  10. package/out/renderer/assets/{book-open-Dt6NrEVH.js → book-open-Cb4F-cRs.js} +1 -1
  11. package/out/renderer/assets/browser-page-BfJd3-qS.js +1 -0
  12. package/out/renderer/assets/{browser-webauthn-prompt-CwtoTzl0.js → browser-webauthn-prompt-ghcPWp0R.js} +1 -1
  13. package/out/renderer/assets/{building-2-C1lADJ7I.js → building-2-C_YBTC7O.js} +1 -1
  14. package/out/renderer/assets/{c4Diagram-VJAJSXHY-B5h8VwBj.js → c4Diagram-VJAJSXHY-BlePs8Im.js} +1 -1
  15. package/out/renderer/assets/channel-BFAjMbH6.js +1 -0
  16. package/out/renderer/assets/{chunk-4BMEZGHF-MR8YxQC8.js → chunk-4BMEZGHF-Bse1IaHb.js} +1 -1
  17. package/out/renderer/assets/{chunk-A2AXSNBT-DCwZuOlD.js → chunk-A2AXSNBT-CncpJ5It.js} +1 -1
  18. package/out/renderer/assets/{chunk-AEK57VVT-DiUHgqSA.js → chunk-AEK57VVT-37Z6jWz2.js} +1 -1
  19. package/out/renderer/assets/{chunk-D6G4REZN-BLBf1anZ.js → chunk-D6G4REZN-BR9ZpBMV.js} +1 -1
  20. package/out/renderer/assets/{chunk-RZ5BOZE2-8iG8Y9sJ.js → chunk-RZ5BOZE2-KrZ6g0pV.js} +1 -1
  21. package/out/renderer/assets/{chunk-XZIHB7SX-BUzPkuyD.js → chunk-XZIHB7SX-BUwRYMe9.js} +1 -1
  22. package/out/renderer/assets/classDiagram-GIVACNV2-CmW0Ezdi.js +1 -0
  23. package/out/renderer/assets/classDiagram-v2-COTLJTTW-CmW0Ezdi.js +1 -0
  24. package/out/renderer/assets/clone-B_pc7cSP.js +1 -0
  25. package/out/renderer/assets/{console-mirror-VlsurRTu.js → console-mirror-DPVG6sWK.js} +1 -1
  26. package/out/renderer/assets/{consoleCapture-BAEbuUE1.js → consoleCapture-Coky9UhD.js} +1 -1
  27. package/out/renderer/assets/{conversation-input-sync-D8QfxmnI.js → conversation-input-sync-C2vqs6ad.js} +242 -242
  28. package/out/renderer/assets/{dagre-OKDRZEBW-BVOSa9Ir.js → dagre-OKDRZEBW-CGv1CEcm.js} +1 -1
  29. package/out/renderer/assets/{diagram-SSKATNLV-Cd2OUAVJ.js → diagram-SSKATNLV-u_zFGYu8.js} +1 -1
  30. package/out/renderer/assets/{diagram-VNBRO52H-CtrjNGKr.js → diagram-VNBRO52H-Bme6bFvQ.js} +1 -1
  31. package/out/renderer/assets/{erDiagram-Q7BY3M3F-DfVP3bcN.js → erDiagram-Q7BY3M3F-B-KkjVtc.js} +1 -1
  32. package/out/renderer/assets/{error-boundary-B3EFBlFF.js → error-boundary-DJSaJHcb.js} +1 -1
  33. package/out/renderer/assets/{flowDiagram-4HSFHLVR-CGAjhZfs.js → flowDiagram-4HSFHLVR-CSZy2b_d.js} +1 -1
  34. package/out/renderer/assets/{ganttDiagram-APWFNJXF-Drljtxgq.js → ganttDiagram-APWFNJXF-CpYOSVKU.js} +1 -1
  35. package/out/renderer/assets/{gitGraphDiagram-7IBYFJ6S-BHemdXzF.js → gitGraphDiagram-7IBYFJ6S-WOOSBsBb.js} +1 -1
  36. package/out/renderer/assets/{graph-CHQd8w8o.js → graph-Du8nFp-Q.js} +1 -1
  37. package/out/renderer/assets/{hash-CgPb_SeD.js → hash--PQTQMu2.js} +1 -1
  38. package/out/renderer/assets/{heart-NsStSoql.js → heart-CVGkdUzT.js} +1 -1
  39. package/out/renderer/assets/{index-CGOyAbPs.js → index-AGCqaeOI.js} +1 -1
  40. package/out/renderer/assets/index-ALGblIL0.css +1 -0
  41. package/out/renderer/assets/index-BYeiLB51.js +57 -0
  42. package/out/renderer/assets/{index-ew1hMKtY.js → index-D8L83jtw.js} +199 -199
  43. package/out/renderer/assets/{index-Y7gJQGpG.js → index-fw54FEnm.js} +1 -1
  44. package/out/renderer/assets/{infoDiagram-PH2N3AL5-DAlyVNJm.js → infoDiagram-PH2N3AL5-BprulvMk.js} +1 -1
  45. package/out/renderer/assets/{installer-BUHF69aB.js → installer-muZhWyyS.js} +1 -1
  46. package/out/renderer/assets/{journeyDiagram-U35MCT3I-1EO-cM2S.js → journeyDiagram-U35MCT3I-DfdLRQAF.js} +1 -1
  47. package/out/renderer/assets/{kanban-definition-NDS4AKOZ-BjWHx1j6.js → kanban-definition-NDS4AKOZ-R6IsuYWB.js} +1 -1
  48. package/out/renderer/assets/{layout-BITZWXG5.js → layout-05Xak_7z.js} +1 -1
  49. package/out/renderer/assets/{legacy-agents-page-EkXsYE5Y.js → legacy-agents-page-Dpl33Kla.js} +1 -1
  50. package/out/renderer/assets/{library-page-A0nXlev9.js → library-page-BNrffbLi.js} +31 -31
  51. package/out/renderer/assets/{mermaid.core-BoximGnF.js → mermaid.core-BzKfajYZ.js} +5 -5
  52. package/out/renderer/assets/{mesh-page-CbJ0YzZR.js → mesh-page-D6ZzFOeG.js} +1 -1
  53. package/out/renderer/assets/{mindmap-definition-ALO5MXBD-CtxUEaL0.js → mindmap-definition-ALO5MXBD-Dn_l0i7j.js} +1 -1
  54. package/out/renderer/assets/{mini-B95cJkWv.js → mini-BgJE9L7J.js} +1 -1
  55. package/out/renderer/assets/{notebook-pen-BxTTwLf8.js → notebook-pen-CtAKsfVm.js} +1 -1
  56. package/out/renderer/assets/{org-access-BO4A2FAr.js → org-access-BHt55LAw.js} +1 -1
  57. package/out/renderer/assets/{org-surface-gate-Bp_arWAv.js → org-surface-gate-CqFJQYmV.js} +1 -1
  58. package/out/renderer/assets/{page-header-DhME4jBY.js → page-header-BlIvE-Ti.js} +1 -1
  59. package/out/renderer/assets/{path-utils-DXMoAzHL.js → path-utils-CYBk4q7C.js} +1 -1
  60. package/out/renderer/assets/{pieDiagram-IB7DONF6-BET_kuRa.js → pieDiagram-IB7DONF6-_W_OzAAk.js} +1 -1
  61. package/out/renderer/assets/{projects-page-CrvzCjsd.js → projects-page-DtZ_g9gZ.js} +1 -1
  62. package/out/renderer/assets/{publication-validation-BSKuV2BJ.js → publication-validation-D7f3xAgF.js} +1 -1
  63. package/out/renderer/assets/{quadrantDiagram-7GDLP6J5-Wn0SqLL-.js → quadrantDiagram-7GDLP6J5-FQ5Wvxqm.js} +1 -1
  64. package/out/renderer/assets/{radar-MK3ICKWK-DrM9X8dD.js → radar-MK3ICKWK-BRufXucA.js} +1 -1
  65. package/out/renderer/assets/{radient-auth-buttons-DQnvQV0I.js → radient-auth-buttons-7i7blC-7.js} +1 -1
  66. package/out/renderer/assets/{requirementDiagram-KVF5MWMF-BdDYpNvz.js → requirementDiagram-KVF5MWMF-CHO8Cq1H.js} +1 -1
  67. package/out/renderer/assets/{sankeyDiagram-QLVOVGJD-C5mpSMB8.js → sankeyDiagram-QLVOVGJD-C4JDJOwX.js} +1 -1
  68. package/out/renderer/assets/{schedules-page-C4tiK1q4.js → schedules-page-6tPgFgS_.js} +1 -1
  69. package/out/renderer/assets/{sequenceDiagram-X6HHIX6F-B3Cs3RcE.js → sequenceDiagram-X6HHIX6F-BFf3HnKw.js} +1 -1
  70. package/out/renderer/assets/{settings-page-BZEp-NUB.js → settings-page-CXOFCx8w.js} +1 -1
  71. package/out/renderer/assets/{smartart-0y9MEJnm.js → smartart-crAq3DvJ.js} +1 -1
  72. package/out/renderer/assets/{stateDiagram-DGXRK772-TzXzPiSs.js → stateDiagram-DGXRK772-BqFVSIKA.js} +1 -1
  73. package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-aaVC-oiG.js +1 -0
  74. package/out/renderer/assets/{team-bridge-page-ybfd-TgP.js → team-bridge-page-BgjJrT3v.js} +6 -6
  75. package/out/renderer/assets/{timeline-definition-BDJGKUSR-D9poGZsh.js → timeline-definition-BDJGKUSR-Cp3uYUSs.js} +1 -1
  76. package/out/renderer/assets/{use-download-agent-mutation-CpziX3j_.js → use-download-agent-mutation-C_W8yx0C.js} +2 -2
  77. package/out/renderer/assets/{use-session-snapshot-uuzUNGgk.js → use-session-snapshot-vFZD5qIO.js} +1 -1
  78. package/out/renderer/assets/{xychartDiagram-VJFVF3MP-Bpq99cbF.js → xychartDiagram-VJFVF3MP-DFcICu1Q.js} +1 -1
  79. package/out/renderer/console-capture.html +5 -5
  80. package/out/renderer/index.html +7 -7
  81. package/out/renderer/installer.html +4 -4
  82. package/out/renderer/mini.html +7 -7
  83. package/package.json +2 -2
  84. package/out/renderer/assets/browser-page-4D5CfHGL.js +0 -1
  85. package/out/renderer/assets/channel-ChMTCIo9.js +0 -1
  86. package/out/renderer/assets/classDiagram-GIVACNV2-olxpExNZ.js +0 -1
  87. package/out/renderer/assets/classDiagram-v2-COTLJTTW-olxpExNZ.js +0 -1
  88. package/out/renderer/assets/clone-BH-xWYVr.js +0 -1
  89. package/out/renderer/assets/index-BkGcHmBa.css +0 -1
  90. package/out/renderer/assets/index-DAftzhq_.js +0 -57
  91. package/out/renderer/assets/stateDiagram-v2-YXO3MK2T-CvQ7ch2C.js +0 -1
@@ -1,4 +1,4 @@
1
- import{a as fe,b as Vt,g as Pt,d as xe,c as Te,e as ye}from"./chunk-D6G4REZN-BLBf1anZ.js";import{I as Ee}from"./chunk-XZIHB7SX-BUzPkuyD.js";import{_ as u,o as be,c as $,d as It,l as G,j as Jt,e as me,f as we,k as v,b as Ut,s as ve,q as Ie,a as Le,g as _e,t as Pe,z as Ae,i as Lt,u as Y,O as ot,P as Et,Q as Zt,Z as ke,R as Qt,G as Dt}from"./mermaid.core-BoximGnF.js";import"./conversation-input-sync-D8QfxmnI.js";import"./index-DAftzhq_.js";import"./path-utils-DXMoAzHL.js";import"./error-boundary-B3EFBlFF.js";var Ct=function(){var t=u(function(ht,w,L,P){for(L=L||{},P=ht.length;P--;L[ht[P]]=w);return L},"o"),e=[1,2],c=[1,3],s=[1,4],r=[2,4],i=[1,9],o=[1,11],h=[1,13],d=[1,14],a=[1,16],f=[1,17],E=[1,18],g=[1,24],T=[1,25],m=[1,26],I=[1,27],A=[1,28],O=[1,29],S=[1,30],B=[1,31],D=[1,32],F=[1,33],q=[1,34],X=[1,35],tt=[1,36],z=[1,37],H=[1,38],W=[1,39],M=[1,41],J=[1,42],K=[1,43],Z=[1,44],et=[1,45],N=[1,46],y=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],_=[4,5,16,50,52,53],Q=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],at=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],k=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],Ft=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],it=[68,69,70],ct=[1,122],kt={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",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",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,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],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:u(function(w,L,P,b,R,l,yt){var p=l.length-1;switch(R){case 3:return b.apply(l[p]),l[p];case 4:case 9:this.$=[];break;case 5:case 10:l[p-1].push(l[p]),this.$=l[p-1];break;case 6:case 7:case 11:case 12:this.$=l[p];break;case 8:case 13:this.$=[];break;case 15:l[p].type="createParticipant",this.$=l[p];break;case 16:l[p-1].unshift({type:"boxStart",boxData:b.parseBoxData(l[p-2])}),l[p-1].push({type:"boxEnd",boxText:l[p-2]}),this.$=l[p-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(l[p-2]),sequenceIndexStep:Number(l[p-1]),sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(l[p-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:b.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:l[p-1].actor};break;case 23:this.$={type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:l[p-1].actor};break;case 29:b.setDiagramTitle(l[p].substring(6)),this.$=l[p].substring(6);break;case 30:b.setDiagramTitle(l[p].substring(7)),this.$=l[p].substring(7);break;case 31:this.$=l[p].trim(),b.setAccTitle(this.$);break;case 32:case 33:this.$=l[p].trim(),b.setAccDescription(this.$);break;case 34:l[p-1].unshift({type:"loopStart",loopText:b.parseMessage(l[p-2]),signalType:b.LINETYPE.LOOP_START}),l[p-1].push({type:"loopEnd",loopText:l[p-2],signalType:b.LINETYPE.LOOP_END}),this.$=l[p-1];break;case 35:l[p-1].unshift({type:"rectStart",color:b.parseMessage(l[p-2]),signalType:b.LINETYPE.RECT_START}),l[p-1].push({type:"rectEnd",color:b.parseMessage(l[p-2]),signalType:b.LINETYPE.RECT_END}),this.$=l[p-1];break;case 36:l[p-1].unshift({type:"optStart",optText:b.parseMessage(l[p-2]),signalType:b.LINETYPE.OPT_START}),l[p-1].push({type:"optEnd",optText:b.parseMessage(l[p-2]),signalType:b.LINETYPE.OPT_END}),this.$=l[p-1];break;case 37:l[p-1].unshift({type:"altStart",altText:b.parseMessage(l[p-2]),signalType:b.LINETYPE.ALT_START}),l[p-1].push({type:"altEnd",signalType:b.LINETYPE.ALT_END}),this.$=l[p-1];break;case 38:l[p-1].unshift({type:"parStart",parText:b.parseMessage(l[p-2]),signalType:b.LINETYPE.PAR_START}),l[p-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=l[p-1];break;case 39:l[p-1].unshift({type:"parStart",parText:b.parseMessage(l[p-2]),signalType:b.LINETYPE.PAR_OVER_START}),l[p-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=l[p-1];break;case 40:l[p-1].unshift({type:"criticalStart",criticalText:b.parseMessage(l[p-2]),signalType:b.LINETYPE.CRITICAL_START}),l[p-1].push({type:"criticalEnd",signalType:b.LINETYPE.CRITICAL_END}),this.$=l[p-1];break;case 41:l[p-1].unshift({type:"breakStart",breakText:b.parseMessage(l[p-2]),signalType:b.LINETYPE.BREAK_START}),l[p-1].push({type:"breakEnd",optText:b.parseMessage(l[p-2]),signalType:b.LINETYPE.BREAK_END}),this.$=l[p-1];break;case 43:this.$=l[p-3].concat([{type:"option",optionText:b.parseMessage(l[p-1]),signalType:b.LINETYPE.CRITICAL_OPTION},l[p]]);break;case 45:this.$=l[p-3].concat([{type:"and",parText:b.parseMessage(l[p-1]),signalType:b.LINETYPE.PAR_AND},l[p]]);break;case 47:this.$=l[p-3].concat([{type:"else",altText:b.parseMessage(l[p-1]),signalType:b.LINETYPE.ALT_ELSE},l[p]]);break;case 48:l[p-3].draw="participant",l[p-3].type="addParticipant",l[p-3].description=b.parseMessage(l[p-1]),this.$=l[p-3];break;case 49:l[p-1].draw="participant",l[p-1].type="addParticipant",this.$=l[p-1];break;case 50:l[p-3].draw="actor",l[p-3].type="addParticipant",l[p-3].description=b.parseMessage(l[p-1]),this.$=l[p-3];break;case 51:l[p-1].draw="actor",l[p-1].type="addParticipant",this.$=l[p-1];break;case 52:l[p-1].type="destroyParticipant",this.$=l[p-1];break;case 53:this.$=[l[p-1],{type:"addNote",placement:l[p-2],actor:l[p-1].actor,text:l[p]}];break;case 54:l[p-2]=[].concat(l[p-1],l[p-1]).slice(0,2),l[p-2][0]=l[p-2][0].actor,l[p-2][1]=l[p-2][1].actor,this.$=[l[p-1],{type:"addNote",placement:b.PLACEMENT.OVER,actor:l[p-2].slice(0,2),text:l[p]}];break;case 55:this.$=[l[p-1],{type:"addLinks",actor:l[p-1].actor,text:l[p]}];break;case 56:this.$=[l[p-1],{type:"addALink",actor:l[p-1].actor,text:l[p]}];break;case 57:this.$=[l[p-1],{type:"addProperties",actor:l[p-1].actor,text:l[p]}];break;case 58:this.$=[l[p-1],{type:"addDetails",actor:l[p-1].actor,text:l[p]}];break;case 61:this.$=[l[p-2],l[p]];break;case 62:this.$=l[p];break;case 63:this.$=b.PLACEMENT.LEFTOF;break;case 64:this.$=b.PLACEMENT.RIGHTOF;break;case 65:this.$=[l[p-4],l[p-1],{type:"addMessage",from:l[p-4].actor,to:l[p-1].actor,signalType:l[p-3],msg:l[p],activate:!0},{type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:l[p-1].actor}];break;case 66:this.$=[l[p-4],l[p-1],{type:"addMessage",from:l[p-4].actor,to:l[p-1].actor,signalType:l[p-3],msg:l[p]},{type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:l[p-4].actor}];break;case 67:this.$=[l[p-3],l[p-1],{type:"addMessage",from:l[p-3].actor,to:l[p-1].actor,signalType:l[p-2],msg:l[p]}];break;case 68:this.$={type:"addParticipant",actor:l[p]};break;case 69:this.$=b.LINETYPE.SOLID_OPEN;break;case 70:this.$=b.LINETYPE.DOTTED_OPEN;break;case 71:this.$=b.LINETYPE.SOLID;break;case 72:this.$=b.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=b.LINETYPE.DOTTED;break;case 74:this.$=b.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=b.LINETYPE.SOLID_CROSS;break;case 76:this.$=b.LINETYPE.DOTTED_CROSS;break;case 77:this.$=b.LINETYPE.SOLID_POINT;break;case 78:this.$=b.LINETYPE.DOTTED_POINT;break;case 79:this.$=b.parseMessage(l[p].trim().substring(1));break}},"anonymous"),table:[{3:1,4:e,5:c,6:s},{1:[3]},{3:5,4:e,5:c,6:s},{3:6,4:e,5:c,6:s},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:o,8:8,9:10,12:12,13:h,14:d,17:15,18:a,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:I,35:A,36:O,37:S,38:B,39:D,41:F,43:q,44:X,46:tt,50:z,52:H,53:W,54:M,59:J,60:K,61:Z,62:et,70:N},t(y,[2,5]),{9:47,12:12,13:h,14:d,17:15,18:a,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:I,35:A,36:O,37:S,38:B,39:D,41:F,43:q,44:X,46:tt,50:z,52:H,53:W,54:M,59:J,60:K,61:Z,62:et,70:N},t(y,[2,7]),t(y,[2,8]),t(y,[2,14]),{12:48,50:z,52:H,53:W},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:N},{22:55,70:N},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(y,[2,29]),t(y,[2,30]),{32:[1,61]},{34:[1,62]},t(y,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:N},{22:72,70:N},{22:73,70:N},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:N},{22:90,70:N},{22:91,70:N},{22:92,70:N},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(y,[2,6]),t(y,[2,15]),t(_,[2,9],{10:93}),t(y,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(y,[2,21]),{5:[1,97]},{5:[1,98]},t(y,[2,24]),t(y,[2,25]),t(y,[2,26]),t(y,[2,27]),t(y,[2,28]),t(y,[2,31]),t(y,[2,32]),t(Q,r,{7:99}),t(Q,r,{7:100}),t(Q,r,{7:101}),t(at,r,{40:102,7:103}),t(k,r,{42:104,7:105}),t(k,r,{7:105,42:106}),t(Ft,r,{45:107,7:108}),t(Q,r,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:N},t(it,[2,69]),t(it,[2,70]),t(it,[2,71]),t(it,[2,72]),t(it,[2,73]),t(it,[2,74]),t(it,[2,75]),t(it,[2,76]),t(it,[2,77]),t(it,[2,78]),{22:118,70:N},{22:120,58:119,70:N},{70:[2,63]},{70:[2,64]},{56:121,81:ct},{56:123,81:ct},{56:124,81:ct},{56:125,81:ct},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:z,52:H,53:W},{5:[1,131]},t(y,[2,19]),t(y,[2,20]),t(y,[2,22]),t(y,[2,23]),{4:i,5:o,8:8,9:10,12:12,13:h,14:d,16:[1,132],17:15,18:a,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:I,35:A,36:O,37:S,38:B,39:D,41:F,43:q,44:X,46:tt,50:z,52:H,53:W,54:M,59:J,60:K,61:Z,62:et,70:N},{4:i,5:o,8:8,9:10,12:12,13:h,14:d,16:[1,133],17:15,18:a,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:I,35:A,36:O,37:S,38:B,39:D,41:F,43:q,44:X,46:tt,50:z,52:H,53:W,54:M,59:J,60:K,61:Z,62:et,70:N},{4:i,5:o,8:8,9:10,12:12,13:h,14:d,16:[1,134],17:15,18:a,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:I,35:A,36:O,37:S,38:B,39:D,41:F,43:q,44:X,46:tt,50:z,52:H,53:W,54:M,59:J,60:K,61:Z,62:et,70:N},{16:[1,135]},{4:i,5:o,8:8,9:10,12:12,13:h,14:d,16:[2,46],17:15,18:a,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:I,35:A,36:O,37:S,38:B,39:D,41:F,43:q,44:X,46:tt,49:[1,136],50:z,52:H,53:W,54:M,59:J,60:K,61:Z,62:et,70:N},{16:[1,137]},{4:i,5:o,8:8,9:10,12:12,13:h,14:d,16:[2,44],17:15,18:a,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:I,35:A,36:O,37:S,38:B,39:D,41:F,43:q,44:X,46:tt,48:[1,138],50:z,52:H,53:W,54:M,59:J,60:K,61:Z,62:et,70:N},{16:[1,139]},{16:[1,140]},{4:i,5:o,8:8,9:10,12:12,13:h,14:d,16:[2,42],17:15,18:a,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:I,35:A,36:O,37:S,38:B,39:D,41:F,43:q,44:X,46:tt,47:[1,141],50:z,52:H,53:W,54:M,59:J,60:K,61:Z,62:et,70:N},{4:i,5:o,8:8,9:10,12:12,13:h,14:d,16:[1,142],17:15,18:a,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:I,35:A,36:O,37:S,38:B,39:D,41:F,43:q,44:X,46:tt,50:z,52:H,53:W,54:M,59:J,60:K,61:Z,62:et,70:N},{15:[1,143]},t(y,[2,49]),{15:[1,144]},t(y,[2,51]),t(y,[2,52]),{22:145,70:N},{22:146,70:N},{56:147,81:ct},{56:148,81:ct},{56:149,81:ct},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(y,[2,16]),t(_,[2,10]),{12:151,50:z,52:H,53:W},t(_,[2,12]),t(_,[2,13]),t(y,[2,18]),t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),t(y,[2,37]),{15:[1,152]},t(y,[2,38]),{15:[1,153]},t(y,[2,39]),t(y,[2,40]),{15:[1,154]},t(y,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:ct},{56:158,81:ct},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:N},t(_,[2,11]),t(at,r,{7:103,40:160}),t(k,r,{7:105,42:161}),t(Ft,r,{7:108,45:162}),t(y,[2,48]),t(y,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:u(function(w,L){if(L.recoverable)this.trace(w);else{var P=new Error(w);throw P.hash=L,P}},"parseError"),parse:u(function(w){var L=this,P=[0],b=[],R=[null],l=[],yt=this.table,p="",mt=0,qt=0,de=2,zt=1,pe=l.slice.call(arguments,1),V=Object.create(this.lexer),dt={yy:{}};for(var Nt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Nt)&&(dt.yy[Nt]=this.yy[Nt]);V.setInput(w,dt.yy),dt.yy.lexer=V,dt.yy.parser=this,typeof V.yylloc>"u"&&(V.yylloc={});var St=V.yylloc;l.push(St);var ue=V.options&&V.options.ranges;typeof dt.yy.parseError=="function"?this.parseError=dt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ge(j){P.length=P.length-2*j,R.length=R.length-j,l.length=l.length-j}u(ge,"popStack");function Ht(){var j;return j=b.pop()||V.lex()||zt,typeof j!="number"&&(j instanceof Array&&(b=j,j=b.pop()),j=L.symbols_[j]||j),j}u(Ht,"lex");for(var U,pt,st,Mt,ft={},wt,lt,Kt,vt;;){if(pt=P[P.length-1],this.defaultActions[pt]?st=this.defaultActions[pt]:((U===null||typeof U>"u")&&(U=Ht()),st=yt[pt]&&yt[pt][U]),typeof st>"u"||!st.length||!st[0]){var Rt="";vt=[];for(wt in yt[pt])this.terminals_[wt]&&wt>de&&vt.push("'"+this.terminals_[wt]+"'");V.showPosition?Rt="Parse error on line "+(mt+1)+`:
1
+ import{a as fe,b as Vt,g as Pt,d as xe,c as Te,e as ye}from"./chunk-D6G4REZN-BR9ZpBMV.js";import{I as Ee}from"./chunk-XZIHB7SX-BUwRYMe9.js";import{_ as u,o as be,c as $,d as It,l as G,j as Jt,e as me,f as we,k as v,b as Ut,s as ve,q as Ie,a as Le,g as _e,t as Pe,z as Ae,i as Lt,u as Y,O as ot,P as Et,Q as Zt,Z as ke,R as Qt,G as Dt}from"./mermaid.core-BzKfajYZ.js";import"./conversation-input-sync-C2vqs6ad.js";import"./index-BYeiLB51.js";import"./path-utils-CYBk4q7C.js";import"./error-boundary-DJSaJHcb.js";var Ct=function(){var t=u(function(ht,w,L,P){for(L=L||{},P=ht.length;P--;L[ht[P]]=w);return L},"o"),e=[1,2],c=[1,3],s=[1,4],r=[2,4],i=[1,9],o=[1,11],h=[1,13],d=[1,14],a=[1,16],f=[1,17],E=[1,18],g=[1,24],T=[1,25],m=[1,26],I=[1,27],A=[1,28],O=[1,29],S=[1,30],B=[1,31],D=[1,32],F=[1,33],q=[1,34],X=[1,35],tt=[1,36],z=[1,37],H=[1,38],W=[1,39],M=[1,41],J=[1,42],K=[1,43],Z=[1,44],et=[1,45],N=[1,46],y=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],_=[4,5,16,50,52,53],Q=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],at=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],k=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],Ft=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],it=[68,69,70],ct=[1,122],kt={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",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",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,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],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:u(function(w,L,P,b,R,l,yt){var p=l.length-1;switch(R){case 3:return b.apply(l[p]),l[p];case 4:case 9:this.$=[];break;case 5:case 10:l[p-1].push(l[p]),this.$=l[p-1];break;case 6:case 7:case 11:case 12:this.$=l[p];break;case 8:case 13:this.$=[];break;case 15:l[p].type="createParticipant",this.$=l[p];break;case 16:l[p-1].unshift({type:"boxStart",boxData:b.parseBoxData(l[p-2])}),l[p-1].push({type:"boxEnd",boxText:l[p-2]}),this.$=l[p-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(l[p-2]),sequenceIndexStep:Number(l[p-1]),sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(l[p-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:b.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:l[p-1].actor};break;case 23:this.$={type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:l[p-1].actor};break;case 29:b.setDiagramTitle(l[p].substring(6)),this.$=l[p].substring(6);break;case 30:b.setDiagramTitle(l[p].substring(7)),this.$=l[p].substring(7);break;case 31:this.$=l[p].trim(),b.setAccTitle(this.$);break;case 32:case 33:this.$=l[p].trim(),b.setAccDescription(this.$);break;case 34:l[p-1].unshift({type:"loopStart",loopText:b.parseMessage(l[p-2]),signalType:b.LINETYPE.LOOP_START}),l[p-1].push({type:"loopEnd",loopText:l[p-2],signalType:b.LINETYPE.LOOP_END}),this.$=l[p-1];break;case 35:l[p-1].unshift({type:"rectStart",color:b.parseMessage(l[p-2]),signalType:b.LINETYPE.RECT_START}),l[p-1].push({type:"rectEnd",color:b.parseMessage(l[p-2]),signalType:b.LINETYPE.RECT_END}),this.$=l[p-1];break;case 36:l[p-1].unshift({type:"optStart",optText:b.parseMessage(l[p-2]),signalType:b.LINETYPE.OPT_START}),l[p-1].push({type:"optEnd",optText:b.parseMessage(l[p-2]),signalType:b.LINETYPE.OPT_END}),this.$=l[p-1];break;case 37:l[p-1].unshift({type:"altStart",altText:b.parseMessage(l[p-2]),signalType:b.LINETYPE.ALT_START}),l[p-1].push({type:"altEnd",signalType:b.LINETYPE.ALT_END}),this.$=l[p-1];break;case 38:l[p-1].unshift({type:"parStart",parText:b.parseMessage(l[p-2]),signalType:b.LINETYPE.PAR_START}),l[p-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=l[p-1];break;case 39:l[p-1].unshift({type:"parStart",parText:b.parseMessage(l[p-2]),signalType:b.LINETYPE.PAR_OVER_START}),l[p-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=l[p-1];break;case 40:l[p-1].unshift({type:"criticalStart",criticalText:b.parseMessage(l[p-2]),signalType:b.LINETYPE.CRITICAL_START}),l[p-1].push({type:"criticalEnd",signalType:b.LINETYPE.CRITICAL_END}),this.$=l[p-1];break;case 41:l[p-1].unshift({type:"breakStart",breakText:b.parseMessage(l[p-2]),signalType:b.LINETYPE.BREAK_START}),l[p-1].push({type:"breakEnd",optText:b.parseMessage(l[p-2]),signalType:b.LINETYPE.BREAK_END}),this.$=l[p-1];break;case 43:this.$=l[p-3].concat([{type:"option",optionText:b.parseMessage(l[p-1]),signalType:b.LINETYPE.CRITICAL_OPTION},l[p]]);break;case 45:this.$=l[p-3].concat([{type:"and",parText:b.parseMessage(l[p-1]),signalType:b.LINETYPE.PAR_AND},l[p]]);break;case 47:this.$=l[p-3].concat([{type:"else",altText:b.parseMessage(l[p-1]),signalType:b.LINETYPE.ALT_ELSE},l[p]]);break;case 48:l[p-3].draw="participant",l[p-3].type="addParticipant",l[p-3].description=b.parseMessage(l[p-1]),this.$=l[p-3];break;case 49:l[p-1].draw="participant",l[p-1].type="addParticipant",this.$=l[p-1];break;case 50:l[p-3].draw="actor",l[p-3].type="addParticipant",l[p-3].description=b.parseMessage(l[p-1]),this.$=l[p-3];break;case 51:l[p-1].draw="actor",l[p-1].type="addParticipant",this.$=l[p-1];break;case 52:l[p-1].type="destroyParticipant",this.$=l[p-1];break;case 53:this.$=[l[p-1],{type:"addNote",placement:l[p-2],actor:l[p-1].actor,text:l[p]}];break;case 54:l[p-2]=[].concat(l[p-1],l[p-1]).slice(0,2),l[p-2][0]=l[p-2][0].actor,l[p-2][1]=l[p-2][1].actor,this.$=[l[p-1],{type:"addNote",placement:b.PLACEMENT.OVER,actor:l[p-2].slice(0,2),text:l[p]}];break;case 55:this.$=[l[p-1],{type:"addLinks",actor:l[p-1].actor,text:l[p]}];break;case 56:this.$=[l[p-1],{type:"addALink",actor:l[p-1].actor,text:l[p]}];break;case 57:this.$=[l[p-1],{type:"addProperties",actor:l[p-1].actor,text:l[p]}];break;case 58:this.$=[l[p-1],{type:"addDetails",actor:l[p-1].actor,text:l[p]}];break;case 61:this.$=[l[p-2],l[p]];break;case 62:this.$=l[p];break;case 63:this.$=b.PLACEMENT.LEFTOF;break;case 64:this.$=b.PLACEMENT.RIGHTOF;break;case 65:this.$=[l[p-4],l[p-1],{type:"addMessage",from:l[p-4].actor,to:l[p-1].actor,signalType:l[p-3],msg:l[p],activate:!0},{type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:l[p-1].actor}];break;case 66:this.$=[l[p-4],l[p-1],{type:"addMessage",from:l[p-4].actor,to:l[p-1].actor,signalType:l[p-3],msg:l[p]},{type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:l[p-4].actor}];break;case 67:this.$=[l[p-3],l[p-1],{type:"addMessage",from:l[p-3].actor,to:l[p-1].actor,signalType:l[p-2],msg:l[p]}];break;case 68:this.$={type:"addParticipant",actor:l[p]};break;case 69:this.$=b.LINETYPE.SOLID_OPEN;break;case 70:this.$=b.LINETYPE.DOTTED_OPEN;break;case 71:this.$=b.LINETYPE.SOLID;break;case 72:this.$=b.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=b.LINETYPE.DOTTED;break;case 74:this.$=b.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=b.LINETYPE.SOLID_CROSS;break;case 76:this.$=b.LINETYPE.DOTTED_CROSS;break;case 77:this.$=b.LINETYPE.SOLID_POINT;break;case 78:this.$=b.LINETYPE.DOTTED_POINT;break;case 79:this.$=b.parseMessage(l[p].trim().substring(1));break}},"anonymous"),table:[{3:1,4:e,5:c,6:s},{1:[3]},{3:5,4:e,5:c,6:s},{3:6,4:e,5:c,6:s},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:o,8:8,9:10,12:12,13:h,14:d,17:15,18:a,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:I,35:A,36:O,37:S,38:B,39:D,41:F,43:q,44:X,46:tt,50:z,52:H,53:W,54:M,59:J,60:K,61:Z,62:et,70:N},t(y,[2,5]),{9:47,12:12,13:h,14:d,17:15,18:a,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:I,35:A,36:O,37:S,38:B,39:D,41:F,43:q,44:X,46:tt,50:z,52:H,53:W,54:M,59:J,60:K,61:Z,62:et,70:N},t(y,[2,7]),t(y,[2,8]),t(y,[2,14]),{12:48,50:z,52:H,53:W},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:N},{22:55,70:N},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(y,[2,29]),t(y,[2,30]),{32:[1,61]},{34:[1,62]},t(y,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:N},{22:72,70:N},{22:73,70:N},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:N},{22:90,70:N},{22:91,70:N},{22:92,70:N},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(y,[2,6]),t(y,[2,15]),t(_,[2,9],{10:93}),t(y,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(y,[2,21]),{5:[1,97]},{5:[1,98]},t(y,[2,24]),t(y,[2,25]),t(y,[2,26]),t(y,[2,27]),t(y,[2,28]),t(y,[2,31]),t(y,[2,32]),t(Q,r,{7:99}),t(Q,r,{7:100}),t(Q,r,{7:101}),t(at,r,{40:102,7:103}),t(k,r,{42:104,7:105}),t(k,r,{7:105,42:106}),t(Ft,r,{45:107,7:108}),t(Q,r,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:N},t(it,[2,69]),t(it,[2,70]),t(it,[2,71]),t(it,[2,72]),t(it,[2,73]),t(it,[2,74]),t(it,[2,75]),t(it,[2,76]),t(it,[2,77]),t(it,[2,78]),{22:118,70:N},{22:120,58:119,70:N},{70:[2,63]},{70:[2,64]},{56:121,81:ct},{56:123,81:ct},{56:124,81:ct},{56:125,81:ct},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:z,52:H,53:W},{5:[1,131]},t(y,[2,19]),t(y,[2,20]),t(y,[2,22]),t(y,[2,23]),{4:i,5:o,8:8,9:10,12:12,13:h,14:d,16:[1,132],17:15,18:a,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:I,35:A,36:O,37:S,38:B,39:D,41:F,43:q,44:X,46:tt,50:z,52:H,53:W,54:M,59:J,60:K,61:Z,62:et,70:N},{4:i,5:o,8:8,9:10,12:12,13:h,14:d,16:[1,133],17:15,18:a,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:I,35:A,36:O,37:S,38:B,39:D,41:F,43:q,44:X,46:tt,50:z,52:H,53:W,54:M,59:J,60:K,61:Z,62:et,70:N},{4:i,5:o,8:8,9:10,12:12,13:h,14:d,16:[1,134],17:15,18:a,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:I,35:A,36:O,37:S,38:B,39:D,41:F,43:q,44:X,46:tt,50:z,52:H,53:W,54:M,59:J,60:K,61:Z,62:et,70:N},{16:[1,135]},{4:i,5:o,8:8,9:10,12:12,13:h,14:d,16:[2,46],17:15,18:a,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:I,35:A,36:O,37:S,38:B,39:D,41:F,43:q,44:X,46:tt,49:[1,136],50:z,52:H,53:W,54:M,59:J,60:K,61:Z,62:et,70:N},{16:[1,137]},{4:i,5:o,8:8,9:10,12:12,13:h,14:d,16:[2,44],17:15,18:a,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:I,35:A,36:O,37:S,38:B,39:D,41:F,43:q,44:X,46:tt,48:[1,138],50:z,52:H,53:W,54:M,59:J,60:K,61:Z,62:et,70:N},{16:[1,139]},{16:[1,140]},{4:i,5:o,8:8,9:10,12:12,13:h,14:d,16:[2,42],17:15,18:a,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:I,35:A,36:O,37:S,38:B,39:D,41:F,43:q,44:X,46:tt,47:[1,141],50:z,52:H,53:W,54:M,59:J,60:K,61:Z,62:et,70:N},{4:i,5:o,8:8,9:10,12:12,13:h,14:d,16:[1,142],17:15,18:a,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:I,35:A,36:O,37:S,38:B,39:D,41:F,43:q,44:X,46:tt,50:z,52:H,53:W,54:M,59:J,60:K,61:Z,62:et,70:N},{15:[1,143]},t(y,[2,49]),{15:[1,144]},t(y,[2,51]),t(y,[2,52]),{22:145,70:N},{22:146,70:N},{56:147,81:ct},{56:148,81:ct},{56:149,81:ct},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(y,[2,16]),t(_,[2,10]),{12:151,50:z,52:H,53:W},t(_,[2,12]),t(_,[2,13]),t(y,[2,18]),t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),t(y,[2,37]),{15:[1,152]},t(y,[2,38]),{15:[1,153]},t(y,[2,39]),t(y,[2,40]),{15:[1,154]},t(y,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:ct},{56:158,81:ct},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:N},t(_,[2,11]),t(at,r,{7:103,40:160}),t(k,r,{7:105,42:161}),t(Ft,r,{7:108,45:162}),t(y,[2,48]),t(y,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:u(function(w,L){if(L.recoverable)this.trace(w);else{var P=new Error(w);throw P.hash=L,P}},"parseError"),parse:u(function(w){var L=this,P=[0],b=[],R=[null],l=[],yt=this.table,p="",mt=0,qt=0,de=2,zt=1,pe=l.slice.call(arguments,1),V=Object.create(this.lexer),dt={yy:{}};for(var Nt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Nt)&&(dt.yy[Nt]=this.yy[Nt]);V.setInput(w,dt.yy),dt.yy.lexer=V,dt.yy.parser=this,typeof V.yylloc>"u"&&(V.yylloc={});var St=V.yylloc;l.push(St);var ue=V.options&&V.options.ranges;typeof dt.yy.parseError=="function"?this.parseError=dt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ge(j){P.length=P.length-2*j,R.length=R.length-j,l.length=l.length-j}u(ge,"popStack");function Ht(){var j;return j=b.pop()||V.lex()||zt,typeof j!="number"&&(j instanceof Array&&(b=j,j=b.pop()),j=L.symbols_[j]||j),j}u(Ht,"lex");for(var U,pt,st,Mt,ft={},wt,lt,Kt,vt;;){if(pt=P[P.length-1],this.defaultActions[pt]?st=this.defaultActions[pt]:((U===null||typeof U>"u")&&(U=Ht()),st=yt[pt]&&yt[pt][U]),typeof st>"u"||!st.length||!st[0]){var Rt="";vt=[];for(wt in yt[pt])this.terminals_[wt]&&wt>de&&vt.push("'"+this.terminals_[wt]+"'");V.showPosition?Rt="Parse error on line "+(mt+1)+`:
2
2
  `+V.showPosition()+`
3
3
  Expecting `+vt.join(", ")+", got '"+(this.terminals_[U]||U)+"'":Rt="Parse error on line "+(mt+1)+": Unexpected "+(U==zt?"end of input":"'"+(this.terminals_[U]||U)+"'"),this.parseError(Rt,{text:V.match,token:this.terminals_[U]||U,line:V.yylineno,loc:St,expected:vt})}if(st[0]instanceof Array&&st.length>1)throw new Error("Parse Error: multiple actions possible at state: "+pt+", token: "+U);switch(st[0]){case 1:P.push(U),R.push(V.yytext),l.push(V.yylloc),P.push(st[1]),U=null,qt=V.yyleng,p=V.yytext,mt=V.yylineno,St=V.yylloc;break;case 2:if(lt=this.productions_[st[1]][1],ft.$=R[R.length-lt],ft._$={first_line:l[l.length-(lt||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(lt||1)].first_column,last_column:l[l.length-1].last_column},ue&&(ft._$.range=[l[l.length-(lt||1)].range[0],l[l.length-1].range[1]]),Mt=this.performAction.apply(ft,[p,qt,mt,dt.yy,st[1],R,l].concat(pe)),typeof Mt<"u")return Mt;lt&&(P=P.slice(0,-1*lt*2),R=R.slice(0,-1*lt),l=l.slice(0,-1*lt)),P.push(this.productions_[st[1]][0]),R.push(ft.$),l.push(ft._$),Kt=yt[P[P.length-2]][P[P.length-1]],P.push(Kt);break;case 3:return!0}}return!0},"parse")},he=function(){var ht={EOF:1,parseError:u(function(L,P){if(this.yy.parser)this.yy.parser.parseError(L,P);else throw new Error(L)},"parseError"),setInput:u(function(w,L){return this.yy=L||this.yy||{},this._input=w,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:u(function(){var w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var L=w.match(/(?:\r\n?|\n).*/g);return L?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),w},"input"),unput:u(function(w){var L=w.length,P=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-L),this.offset-=L;var b=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),P.length-1&&(this.yylineno-=P.length-1);var R=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:P?(P.length===b.length?this.yylloc.first_column:0)+b[b.length-P.length].length-P[0].length:this.yylloc.first_column-L},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-L]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(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:u(function(w){this.unput(this.match.slice(w))},"less"),pastInput:u(function(){var w=this.matched.substr(0,this.matched.length-this.match.length);return(w.length>20?"...":"")+w.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var w=this.match;return w.length<20&&(w+=this._input.substr(0,20-w.length)),(w.substr(0,20)+(w.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var w=this.pastInput(),L=new Array(w.length+1).join("-");return w+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{r as l,t as n,j as t,c as ue,h as Us,L as Bs}from"./index-DAftzhq_.js";import{o as Vs}from"./console-mirror-VlsurRTu.js";import{c7 as Dt,c8 as Hs,c9 as xn,ca as Ke,bu as qs,a3 as Qn,a4 as Xt,T as Zn,ap as Gs,aq as Ys,cb as Ws,cc as Qs,cd as Zs,ce as Js,cf as Jn,cg as en,a1 as Xn,ch as Xs,ci as ea,as as zt,cj as yn,ck as ta,cl as pt,cm as na,aZ as sa,cn as $t,bc as es,co as tn,bF as ht,b1 as aa,cp as ts,a0 as ia,cq as oa,cr as ra,cs as la,ct as ca,cu as da,cv as ua,S as ns,au as Pt,av as Kt,az as ga,bS as Ut,cw as ma,cx as _a,cy as Bt,cz as pa,cA as ha,cB as fa,cC as ss,cD as xa,cE as ya,cF as va,ao as ba,cG as as,at as is,cH as os,cI as ka,cJ as ja,cK as wa,cL as Na,cM as Sa,cN as Ma,cO as Ca,cP as Aa,bj as rs,aY as Ea,cQ as et,cR as vn,cS as Ia,cT as Ra,cU as Ta,cV as La,cW as Oa,cX as Fa,bw as Da,cY as za,cZ as $a,c_ as Pa,c$ as bn,d0 as Ka,d1 as Ua,d2 as Ba,bL as Va}from"./conversation-input-sync-D8QfxmnI.js";import{l as Ie,u as nn,ad as Ha,ae as Ge,a as sn,c as Vt,af as qa,ag as Ga,ah as Ya,ai as Wa,d as _e,aj as Qa,A as Ue,ak as Za,al as Ja,am as Xa,D as an,an as ei,w as st,ao as ti,E as ls,r as ni,O as si,ap as Ht,aq as ai,ar as cs,Z as ii}from"./path-utils-DXMoAzHL.js";import{cC as ds,cD as oi,cE as ri,cF as us,cG as li,cH as ci,cI as Fe,cJ as di,S as gs,ca as rt,cb as me,cK as ce,cL as ui,cw as gi,cM as mi,aL as kn,cN as _i,cO as pi,cP as dt,c9 as hi,cl as fi,cQ as xi,cR as yi,cS as vi,cT as bi,b$ as jn,cU as ki,bS as ji,c6 as wn,cv as wi,c7 as Ni,c8 as Si,cV as Mi,b4 as Ci,cW as Ai}from"./index-ew1hMKtY.js";import{P as Ei}from"./page-header-DhME4jBY.js";import{c as R,u as se,B as D,S as ye,M as ms,l as Je,Y as kt,Z as jt,_ as Qe,A as ae,m as wt,n as Ae,k as xe,F as on,G as rn,H as ln,J as cn,K as Ze,L as Ee,I as De,a7 as Nt,N as Ii,z as it,C as qt,ad as Ri,g as _s,ag as Nn,T as ps,q as Ti,r as Li,s as Oi,v as Fi,w as Sn,p as Di,E as zi,ah as $i,a9 as Pi}from"./error-boundary-B3EFBlFF.js";import{R as Ki}from"./radient-auth-buttons-DQnvQV0I.js";import{N as Ui}from"./notebook-pen-BxTTwLf8.js";import{B as Bi}from"./book-open-Dt6NrEVH.js";import{a as Vi,p as Ct}from"./parseISO-BHJWTxrA.js";import{i as Hi,a as qe,f as qi}from"./format-esAOn2VS.js";import{t as Gi}from"./en-US-CHJkXXr4.js";/**
1
+ import{r as l,t as n,j as t,c as ue,h as Us,L as Bs}from"./index-BYeiLB51.js";import{o as Vs}from"./console-mirror-DPVG6sWK.js";import{c8 as Dt,c9 as Hs,ca as xn,cb as Ke,bu as qs,a3 as Qn,a4 as Xt,T as Zn,ap as Gs,aq as Ys,cc as Ws,cd as Qs,ce as Zs,cf as Js,cg as Jn,ch as en,a1 as Xn,ci as Xs,cj as ea,as as zt,ck as yn,cl as ta,cm as pt,cn as na,aZ as sa,co as $t,bc as es,cp as tn,bG as ht,b1 as aa,cq as ts,a0 as ia,cr as oa,cs as ra,ct as la,cu as ca,cv as da,cw as ua,S as ns,au as Pt,av as Kt,az as ga,bU as Ut,cx as ma,cy as _a,cz as Bt,cA as pa,cB as ha,cC as fa,cD as ss,cE as xa,cF as ya,cG as va,ao as ba,cH as as,at as is,cI as os,cJ as ka,cK as ja,cL as wa,cM as Na,cN as Sa,cO as Ma,cP as Ca,cQ as Aa,bj as rs,aY as Ea,cR as et,cS as vn,cT as Ia,cU as Ra,cV as Ta,cW as La,cX as Oa,cY as Fa,bw as Da,cZ as za,c_ as $a,c$ as Pa,d0 as bn,d1 as Ka,d2 as Ua,d3 as Ba,bN as Va}from"./conversation-input-sync-C2vqs6ad.js";import{l as Ie,u as nn,ad as Ha,ae as Ge,a as sn,c as Vt,af as qa,ag as Ga,ah as Ya,ai as Wa,d as _e,aj as Qa,A as Ue,ak as Za,al as Ja,am as Xa,D as an,an as ei,w as st,ao as ti,E as ls,r as ni,O as si,ap as Ht,aq as ai,ar as cs,Z as ii}from"./path-utils-CYBk4q7C.js";import{cH as ds,cI as oi,cJ as ri,cK as us,cL as li,cM as ci,cN as Fe,cO as di,S as gs,cf as rt,cg as me,cP as ce,cQ as ui,cB as gi,cR as mi,aL as kn,cS as _i,cT as pi,cU as dt,ce as hi,cq as fi,cV as xi,cW as yi,cX as vi,cY as bi,c4 as jn,cZ as ki,bX as ji,cb as wn,cA as wi,cc as Ni,cd as Si,c_ as Mi,b4 as Ci,c$ as Ai}from"./index-D8L83jtw.js";import{P as Ei}from"./page-header-BlIvE-Ti.js";import{c as R,u as se,B as D,S as ye,M as ms,l as Je,Y as kt,Z as jt,_ as Qe,A as ae,m as wt,n as Ae,k as xe,F as on,G as rn,H as ln,J as cn,K as Ze,L as Ee,I as De,a7 as Nt,N as Ii,z as it,C as qt,ad as Ri,g as _s,ag as Nn,T as ps,q as Ti,r as Li,s as Oi,v as Fi,w as Sn,p as Di,E as zi,ah as $i,a9 as Pi}from"./error-boundary-DJSaJHcb.js";import{R as Ki}from"./radient-auth-buttons-7i7blC-7.js";import{N as Ui}from"./notebook-pen-CtAKsfVm.js";import{B as Bi}from"./book-open-Cb4F-cRs.js";import{a as Vi,p as Ct}from"./parseISO-BHJWTxrA.js";import{i as Hi,a as qe,f as qi}from"./format-esAOn2VS.js";import{t as Gi}from"./en-US-CHJkXXr4.js";/**
2
2
  * @license lucide-react v0.507.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{g as Y,a as E,b as F}from"./library-page-A0nXlev9.js";import"./index-DAftzhq_.js";import"./console-mirror-VlsurRTu.js";import"./path-utils-DXMoAzHL.js";import"./page-header-DhME4jBY.js";import"./error-boundary-B3EFBlFF.js";import"./index-ew1hMKtY.js";import"./conversation-input-sync-D8QfxmnI.js";import"./hash-CgPb_SeD.js";import"./heart-NsStSoql.js";import"./use-session-snapshot-uuzUNGgk.js";const B=["#4472C4","#ED7D31","#A9D18E","#FF0000","#FFC000","#5B9BD5","#70AD47","#C00000","#7030A0","#00B0F0"];function W(n,t){const c=`accent${n%6+1}`;return t[c]?"#"+t[c]:B[n%B.length]}function j(n,t=.45){const c=parseInt(n.slice(1,3),16),s=parseInt(n.slice(3,5),16),a=parseInt(n.slice(5,7),16),p=Math.round(c+(255-c)*t),M=Math.round(s+(255-s)*t),o=Math.round(a+(255-a)*t);return`rgb(${p},${M},${o})`}function G(n){const t=[];for(const c of E(n,"t")){const s=c.textContent.trim();s&&t.push(s)}return t.join(" ")}function V(n){if(!n)return[];const t=Y(n,"ptLst");if(!t)return[];const c=[];for(const s of E(t,"pt")){const a=F(s,"type","node");if(a==="parTrans"||a==="sibTrans")continue;const p=G(s);(p||a==="node")&&c.push({id:F(s,"modelId",""),type:a,text:p})}return c.filter(s=>s.text)}function z(n){if(!n)return"list";const t=Y(n,"layoutDef")||n,s=(F(t,"uniqueId","")||F(t,"defStyle","")||"").toLowerCase();return s.includes("chevron")||s.includes("arrowprocess")||s.includes("process")?"process":s.includes("cycle")||s.includes("continuouscycle")?"cycle":s.includes("hierarchy")||s.includes("orgchart")||s.includes("org")?"hierarchy":s.includes("radial")||s.includes("diverging")?"radial":s.includes("pyramid")||s.includes("invertedpyramid")?"pyramid":s.includes("funnel")?"funnel":s.includes("venn")?"venn":s.includes("matrix")?"matrix":s.includes("list")||s.includes("bullet")?"list":s.includes("relationship")||s.includes("balance")?"relationship":"list"}function $(n,t,c,s,a,p,M,o="#fff",f="center"){if(!t)return;n.save(),n.fillStyle=o,n.textAlign=f,n.textBaseline="middle";const l=t.split(" "),g=M*1.3;let h=[],r="";for(const u of l){const y=r?r+" "+u:u;n.measureText(y).width>a-4&&r?(h.push(r),r=u):r=y}r&&h.push(r);const i=Math.max(1,Math.floor(p/g));h.length>i&&(h=h.slice(0,i));const e=s-(h.length-1)*g/2;for(let u=0;u<h.length;u++)n.fillText(h[u],c,e+u*g);n.restore()}function I(n,t,c,s=14){const a=Math.floor(t/(s*.55)),p=n.split(" "),M=Math.ceil(p.join(" ").length/Math.max(a,1)),o=c/(M*1.4);return Math.max(8,Math.min(s,o))}function L(n,t,c,s,a,p,M,o){n.save(),n.beginPath(),p=Math.min(p,s/2,a/2),n.moveTo(t+p,c),n.arcTo(t+s,c,t+s,c+a,p),n.arcTo(t+s,c+a,t,c+a,p),n.arcTo(t,c+a,t,c,p),n.arcTo(t,c,t+s,c,p),n.closePath(),M&&(n.fillStyle=M,n.fill()),n.restore()}function X(n,t,c,s,a,p,M=1.5){const o=Math.atan2(a-c,s-t),f=8;n.save(),n.strokeStyle=p,n.fillStyle=p,n.lineWidth=M,n.beginPath(),n.moveTo(t,c),n.lineTo(s,a),n.stroke(),n.beginPath(),n.moveTo(s,a),n.lineTo(s-f*Math.cos(o-.4),a-f*Math.sin(o-.4)),n.lineTo(s-f*Math.cos(o+.4),a-f*Math.sin(o+.4)),n.closePath(),n.fill(),n.restore()}function J(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t.length,l=a/f,g=Math.min(l*.08,10*o),h=Math.min(l*.12,18*o),r=l-h-g,i=p*.7,e=s+(p-i)/2;for(let u=0;u<f;u++){const y=W(u,M),d=c+l*u+g/2,b=u===f-1;n.save(),n.beginPath();const P=d+r+(b?0:h);n.moveTo(d,e),n.lineTo(d+r,e),b||n.lineTo(P,e+i/2),n.lineTo(d+r,e+i),n.lineTo(d,e+i),u>0&&n.lineTo(d+h,e+i/2),n.closePath(),n.fillStyle=y,n.fill(),n.restore();const m=I(t[u].text,r-h,i)*o;n.font=`${m}px sans-serif`;const T=d+(r+(u>0?h:0))/2;$(n,t[u].text,T,e+i/2,r,i,m)}}function K(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t.length,l=c+a/2,g=s+p/2,h=Math.min(a,p)*.33,r=Math.min(h*.32,40*o);n.save(),n.strokeStyle="#ccc",n.lineWidth=2*o,n.setLineDash([4*o,4*o]),n.beginPath(),n.arc(l,g,h,0,Math.PI*2),n.stroke(),n.setLineDash([]),n.restore();for(let i=0;i<f;i++){const e=i/f*Math.PI*2-Math.PI/2,u=l+h*Math.cos(e),y=g+h*Math.sin(e),d=W(i,M);if(n.save(),n.beginPath(),n.arc(u,y,r,0,Math.PI*2),n.fillStyle=d,n.fill(),n.restore(),f>1){const P=(i+1)/f*Math.PI*2-Math.PI/2,m=(e+P)/2,T=l+h*Math.cos(e+.15),v=g+h*Math.sin(e+.15),k=l+h*Math.cos(P-.15),S=g+h*Math.sin(P-.15);n.save(),n.strokeStyle=d+"99",n.lineWidth=1.5*o,n.beginPath(),n.moveTo(T,v),n.quadraticCurveTo(l+h*1.1*Math.cos(m),g+h*1.1*Math.sin(m),k,S),n.stroke(),n.restore()}const b=I(t[i].text,r*1.7,r*1.2)*o;n.font=`${b}px sans-serif`,$(n,t[i].text,u,y,r*2,r*1.8,b)}}function O(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t[0],l=t.slice(1),g=Math.max(l.length,1),h=p/(l.length>0?2.8:1.2),r=h*.75,i=Math.min(a*.3,160*o),e=r,u=c+(a-i)/2,y=s+(h-e)/2,d=W(0,M);L(n,u,y,i,e,6*o,d);const b=I(f.text,i-10*o,e)*o;if(n.font=`bold ${b}px sans-serif`,$(n,f.text,u+i/2,y+e/2,i-10,e,b),!l.length)return;const P=(a-20*o)/g,m=s+h*1.5,T=y+e,v=m-4*o;n.save(),n.strokeStyle="#999",n.lineWidth=1.5*o,n.beginPath(),n.moveTo(u+i/2,T),n.lineTo(u+i/2,(T+v)/2),n.lineTo(c+10*o,(T+v)/2),n.lineTo(c+a-10*o,(T+v)/2),n.stroke(),n.restore();for(let k=0;k<l.length;k++){const S=c+P*k+8*o,R=m,A=P-16*o,H=r,N=W(k+1,M);n.save(),n.strokeStyle="#999",n.lineWidth=1.5*o,n.beginPath(),n.moveTo(S+A/2,(T+v)/2),n.lineTo(S+A/2,R),n.stroke(),n.restore(),L(n,S,R,A,H,5*o,N);const D=I(l[k].text,A-8*o,H)*o;n.font=`${D}px sans-serif`,$(n,l[k].text,S+A/2,R+H/2,A-8,H,D)}}function Q(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t[0],l=t.slice(1),g=c+a/2,h=s+p/2,r=Math.min(a,p)*.18,i=Math.min(a,p)*.36,e=Math.min(i*.28,38*o),u=l.length||1,y=W(0,M);n.save(),n.beginPath(),n.arc(g,h,r,0,Math.PI*2),n.fillStyle=y,n.fill(),n.restore();const d=I(f.text,r*1.6,r*1.2)*o;n.font=`bold ${d}px sans-serif`,$(n,f.text,g,h,r*2,r*2,d);for(let b=0;b<u;b++){const P=b/u*Math.PI*2-Math.PI/2,m=g+i*Math.cos(P),T=h+i*Math.sin(P),v=W(b+1,M),k=g+r*Math.cos(P),S=h+r*Math.sin(P),R=m-e*Math.cos(P),A=T-e*Math.sin(P);X(n,k,S,R,A,v+"99",1.5*o),n.save(),n.beginPath(),n.arc(m,T,e,0,Math.PI*2),n.fillStyle=v,n.fill(),n.restore();const H=I(l[b].text,e*1.7,e*1.2)*o;n.font=`${H}px sans-serif`,$(n,l[b].text,m,T,e*2,e*1.8,H)}}function U(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t.length,l=p/f;for(let g=0;g<f;g++){const h=(f-g)/f,r=a*h,i=c+(a-r)/2,e=s+g*l,u=W(g,M);n.save(),n.beginPath(),n.moveTo(i,e+l),n.lineTo(i+r,e+l);const y=a*((f-g-1)/f);n.lineTo(c+(a+y)/2,e),n.lineTo(c+(a-y)/2,e),n.closePath(),n.fillStyle=u,n.strokeStyle="#fff",n.lineWidth=2*o,n.fill(),n.stroke(),n.restore();const d=I(t[g].text,r*.6,l*.7)*o;n.font=`${d}px sans-serif`,$(n,t[g].text,c+a/2,e+l/2,r*.6,l*.7,d)}}function Z(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t.length,l=p/f;for(let g=0;g<f;g++){const h=1-g/f*.55,r=1-(g+1)/f*.55,i=a*h,e=a*r,u=c+(a-i)/2,y=c+(a-e)/2,d=s+g*l,b=W(g,M);n.save(),n.beginPath(),n.moveTo(u,d),n.lineTo(u+i,d),n.lineTo(y+e,d+l),n.lineTo(y,d+l),n.closePath(),n.fillStyle=b,n.strokeStyle="#fff",n.lineWidth=2*o,n.fill(),n.stroke(),n.restore();const P=(i+e)/2,m=I(t[g].text,P*.8,l*.7)*o;n.font=`${m}px sans-serif`,$(n,t[g].text,c+a/2,d+l/2,P*.8,l*.7,m)}}function _(n,t,c,s,a,p,M,o){if(!t.length)return;const f=Math.min(t.length,4),l=c+a/2,g=s+p/2,h=Math.min(a,p)*(f<=2?.32:.28),r=h*.65,i=[];for(let e=0;e<f;e++)i.push(e/f*Math.PI*2-Math.PI/2);for(let e=0;e<f;e++){const u=f>1?l+r*Math.cos(i[e]):l,y=f>1?g+r*Math.sin(i[e]):g,d=W(e,M);n.save(),n.globalAlpha=.55,n.beginPath(),n.arc(u,y,h,0,Math.PI*2),n.fillStyle=d,n.fill(),n.globalAlpha=1,n.strokeStyle="#fff",n.lineWidth=1.5*o,n.stroke(),n.restore();const b=f>1?l+(r+h*.45)*Math.cos(i[e]):l,P=f>1?g+(r+h*.45)*Math.sin(i[e]):g,m=I(t[e].text,h*1.2,h*.7)*o;n.font=`${m}px sans-serif`,$(n,t[e].text,b,P,h*1.2,h*.7,m,"#333")}}function w(n,t,c,s,a,p,M,o){const f=[t[0]||{text:""},t[1]||{text:""},t[2]||{text:""},t[3]||{text:""}],l=a/2,g=p/2,h=8*o;for(let r=0;r<2;r++)for(let i=0;i<2;i++){const e=r*2+i,u=c+i*l+h,y=s+r*g+h,d=l-h*2,b=g-h*2,P=W(e,M);L(n,u,y,d,b,8*o,P);const m=I(f[e].text,d-10,b)*o;n.font=`${m}px sans-serif`,$(n,f[e].text,u+d/2,y+b/2,d-10,b,m)}}function q(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t.length,l=p/f,g=Math.min(l*.2,14*o),h=g*3;for(let r=0;r<f;r++){const i=s+r*l,e=i+l/2,u=W(r,M);n.save(),n.beginPath(),n.arc(c+g,e,g,0,Math.PI*2),n.fillStyle=u,n.fill(),n.restore(),L(n,c+h,i+l*.1,a-h-4*o,l*.8,4*o,u+"22");const y=I(t[r].text,a-h-20*o,l*.7)*o;n.font=`${y}px sans-serif`,n.fillStyle="#333",n.textAlign="left",n.textBaseline="middle",n.fillText(t[r].text,c+h+8*o,e)}}function C(n,t,c,s,a,p,M,o){if(t.length<2){q(n,t,c,s,a,p,M,o);return}const f=t[Math.floor(t.length/2)],l=t.slice(0,Math.floor(t.length/2)),g=t.slice(Math.floor(t.length/2)+1),h=c+a/2,r=s+p/2,i=Math.min(a*.14,p*.25),e=W(Math.floor(t.length/2),M);n.save(),n.beginPath(),n.arc(h,r,i,0,Math.PI*2),n.fillStyle=e,n.fill(),n.restore();const u=I(f.text,i*1.6,i*1.2)*o;n.font=`bold ${u}px sans-serif`,$(n,f.text,h,r,i*2,i*1.8,u);const y=p/Math.max(l.length,g.length,1),d=a*.3,b=y*.7,P=(m,T)=>{const v=T==="left"?c:c+a-d,k=T==="left"?h-i:h+i;for(let S=0;S<m.length;S++){const R=s+y*S+(y-b)/2,A=W(S+(T==="right"?l.length+1:0),M);L(n,v,R,d,b,5*o,A);const H=I(m[S].text,d-8,b)*o;n.font=`${H}px sans-serif`,$(n,m[S].text,v+d/2,R+b/2,d-8,b,H);const N=T==="left"?v+d:v;X(n,N,R+b/2,k,r,A+"88",1.5*o)}};P(l,"left"),P(g,"right")}function x(n,t,c,s,a,p,M,o){const f=t.length;if(!f)return;const l=Math.ceil(Math.sqrt(f)),g=Math.ceil(f/l),h=a/l,r=p/g,i=Math.min(h,r)*.1;for(let e=0;e<f;e++){const u=e%l,y=Math.floor(e/l),d=c+u*h+i,b=s+y*r+i,P=h-i*2,m=r-i*2,T=W(e,M);L(n,d,b,P,m,8*o,T),j(T),n.save();const v=n.createLinearGradient(d,b,d,b+m*.5);v.addColorStop(0,"rgba(255,255,255,0.18)"),v.addColorStop(1,"rgba(255,255,255,0)"),n.fillStyle=v,n.beginPath(),n.roundRect?.(d,b,P,m,8*o),n.fill(),n.restore();const k=I(t[e].text,P-12*o,m)*o;n.font=`${k}px sans-serif`,$(n,t[e].text,d+P/2,b+m/2,P-12*o,m,k)}}function un(n,t,c,s,a,p,M,o,f){const l=V(t),g=z(c),h=16*f;n.save(),n.fillStyle="#f7f9fc",n.strokeStyle="#e0e4ec",n.lineWidth=1,n.beginPath(),n.roundRect?.(s,a,p,M,6*f)||n.rect(s,a,p,M),n.fill(),n.stroke();const r=s+h,i=a+h,e=p-h*2,u=M-h*2;if(!l.length){n.fillStyle="#aaa",n.font=`${12*f}px sans-serif`,n.textAlign="center",n.textBaseline="middle",n.fillText("SmartArt Diagram",s+p/2,a+M/2),n.restore();return}switch(g){case"process":J(n,l,r,i,e,u,o,f);break;case"cycle":K(n,l,r,i,e,u,o,f);break;case"hierarchy":O(n,l,r,i,e,u,o,f);break;case"radial":Q(n,l,r,i,e,u,o,f);break;case"pyramid":U(n,l,r,i,e,u,o,f);break;case"funnel":Z(n,l,r,i,e,u,o,f);break;case"venn":_(n,l,r,i,e,u,o,f);break;case"matrix":w(n,l,r,i,e,u,o,f);break;case"list":q(n,l,r,i,e,u,o,f);break;case"relationship":C(n,l,r,i,e,u,o,f);break;default:x(n,l,r,i,e,u,o,f)}n.restore()}export{un as renderSmartArt};
1
+ import{g as Y,a as E,b as F}from"./library-page-BNrffbLi.js";import"./index-BYeiLB51.js";import"./console-mirror-DPVG6sWK.js";import"./path-utils-CYBk4q7C.js";import"./page-header-BlIvE-Ti.js";import"./error-boundary-DJSaJHcb.js";import"./index-D8L83jtw.js";import"./conversation-input-sync-C2vqs6ad.js";import"./hash--PQTQMu2.js";import"./heart-CVGkdUzT.js";import"./use-session-snapshot-vFZD5qIO.js";const B=["#4472C4","#ED7D31","#A9D18E","#FF0000","#FFC000","#5B9BD5","#70AD47","#C00000","#7030A0","#00B0F0"];function W(n,t){const c=`accent${n%6+1}`;return t[c]?"#"+t[c]:B[n%B.length]}function j(n,t=.45){const c=parseInt(n.slice(1,3),16),s=parseInt(n.slice(3,5),16),a=parseInt(n.slice(5,7),16),p=Math.round(c+(255-c)*t),M=Math.round(s+(255-s)*t),o=Math.round(a+(255-a)*t);return`rgb(${p},${M},${o})`}function G(n){const t=[];for(const c of E(n,"t")){const s=c.textContent.trim();s&&t.push(s)}return t.join(" ")}function V(n){if(!n)return[];const t=Y(n,"ptLst");if(!t)return[];const c=[];for(const s of E(t,"pt")){const a=F(s,"type","node");if(a==="parTrans"||a==="sibTrans")continue;const p=G(s);(p||a==="node")&&c.push({id:F(s,"modelId",""),type:a,text:p})}return c.filter(s=>s.text)}function z(n){if(!n)return"list";const t=Y(n,"layoutDef")||n,s=(F(t,"uniqueId","")||F(t,"defStyle","")||"").toLowerCase();return s.includes("chevron")||s.includes("arrowprocess")||s.includes("process")?"process":s.includes("cycle")||s.includes("continuouscycle")?"cycle":s.includes("hierarchy")||s.includes("orgchart")||s.includes("org")?"hierarchy":s.includes("radial")||s.includes("diverging")?"radial":s.includes("pyramid")||s.includes("invertedpyramid")?"pyramid":s.includes("funnel")?"funnel":s.includes("venn")?"venn":s.includes("matrix")?"matrix":s.includes("list")||s.includes("bullet")?"list":s.includes("relationship")||s.includes("balance")?"relationship":"list"}function $(n,t,c,s,a,p,M,o="#fff",f="center"){if(!t)return;n.save(),n.fillStyle=o,n.textAlign=f,n.textBaseline="middle";const l=t.split(" "),g=M*1.3;let h=[],r="";for(const u of l){const y=r?r+" "+u:u;n.measureText(y).width>a-4&&r?(h.push(r),r=u):r=y}r&&h.push(r);const i=Math.max(1,Math.floor(p/g));h.length>i&&(h=h.slice(0,i));const e=s-(h.length-1)*g/2;for(let u=0;u<h.length;u++)n.fillText(h[u],c,e+u*g);n.restore()}function I(n,t,c,s=14){const a=Math.floor(t/(s*.55)),p=n.split(" "),M=Math.ceil(p.join(" ").length/Math.max(a,1)),o=c/(M*1.4);return Math.max(8,Math.min(s,o))}function L(n,t,c,s,a,p,M,o){n.save(),n.beginPath(),p=Math.min(p,s/2,a/2),n.moveTo(t+p,c),n.arcTo(t+s,c,t+s,c+a,p),n.arcTo(t+s,c+a,t,c+a,p),n.arcTo(t,c+a,t,c,p),n.arcTo(t,c,t+s,c,p),n.closePath(),M&&(n.fillStyle=M,n.fill()),n.restore()}function X(n,t,c,s,a,p,M=1.5){const o=Math.atan2(a-c,s-t),f=8;n.save(),n.strokeStyle=p,n.fillStyle=p,n.lineWidth=M,n.beginPath(),n.moveTo(t,c),n.lineTo(s,a),n.stroke(),n.beginPath(),n.moveTo(s,a),n.lineTo(s-f*Math.cos(o-.4),a-f*Math.sin(o-.4)),n.lineTo(s-f*Math.cos(o+.4),a-f*Math.sin(o+.4)),n.closePath(),n.fill(),n.restore()}function J(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t.length,l=a/f,g=Math.min(l*.08,10*o),h=Math.min(l*.12,18*o),r=l-h-g,i=p*.7,e=s+(p-i)/2;for(let u=0;u<f;u++){const y=W(u,M),d=c+l*u+g/2,b=u===f-1;n.save(),n.beginPath();const P=d+r+(b?0:h);n.moveTo(d,e),n.lineTo(d+r,e),b||n.lineTo(P,e+i/2),n.lineTo(d+r,e+i),n.lineTo(d,e+i),u>0&&n.lineTo(d+h,e+i/2),n.closePath(),n.fillStyle=y,n.fill(),n.restore();const m=I(t[u].text,r-h,i)*o;n.font=`${m}px sans-serif`;const T=d+(r+(u>0?h:0))/2;$(n,t[u].text,T,e+i/2,r,i,m)}}function K(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t.length,l=c+a/2,g=s+p/2,h=Math.min(a,p)*.33,r=Math.min(h*.32,40*o);n.save(),n.strokeStyle="#ccc",n.lineWidth=2*o,n.setLineDash([4*o,4*o]),n.beginPath(),n.arc(l,g,h,0,Math.PI*2),n.stroke(),n.setLineDash([]),n.restore();for(let i=0;i<f;i++){const e=i/f*Math.PI*2-Math.PI/2,u=l+h*Math.cos(e),y=g+h*Math.sin(e),d=W(i,M);if(n.save(),n.beginPath(),n.arc(u,y,r,0,Math.PI*2),n.fillStyle=d,n.fill(),n.restore(),f>1){const P=(i+1)/f*Math.PI*2-Math.PI/2,m=(e+P)/2,T=l+h*Math.cos(e+.15),v=g+h*Math.sin(e+.15),k=l+h*Math.cos(P-.15),S=g+h*Math.sin(P-.15);n.save(),n.strokeStyle=d+"99",n.lineWidth=1.5*o,n.beginPath(),n.moveTo(T,v),n.quadraticCurveTo(l+h*1.1*Math.cos(m),g+h*1.1*Math.sin(m),k,S),n.stroke(),n.restore()}const b=I(t[i].text,r*1.7,r*1.2)*o;n.font=`${b}px sans-serif`,$(n,t[i].text,u,y,r*2,r*1.8,b)}}function O(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t[0],l=t.slice(1),g=Math.max(l.length,1),h=p/(l.length>0?2.8:1.2),r=h*.75,i=Math.min(a*.3,160*o),e=r,u=c+(a-i)/2,y=s+(h-e)/2,d=W(0,M);L(n,u,y,i,e,6*o,d);const b=I(f.text,i-10*o,e)*o;if(n.font=`bold ${b}px sans-serif`,$(n,f.text,u+i/2,y+e/2,i-10,e,b),!l.length)return;const P=(a-20*o)/g,m=s+h*1.5,T=y+e,v=m-4*o;n.save(),n.strokeStyle="#999",n.lineWidth=1.5*o,n.beginPath(),n.moveTo(u+i/2,T),n.lineTo(u+i/2,(T+v)/2),n.lineTo(c+10*o,(T+v)/2),n.lineTo(c+a-10*o,(T+v)/2),n.stroke(),n.restore();for(let k=0;k<l.length;k++){const S=c+P*k+8*o,R=m,A=P-16*o,H=r,N=W(k+1,M);n.save(),n.strokeStyle="#999",n.lineWidth=1.5*o,n.beginPath(),n.moveTo(S+A/2,(T+v)/2),n.lineTo(S+A/2,R),n.stroke(),n.restore(),L(n,S,R,A,H,5*o,N);const D=I(l[k].text,A-8*o,H)*o;n.font=`${D}px sans-serif`,$(n,l[k].text,S+A/2,R+H/2,A-8,H,D)}}function Q(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t[0],l=t.slice(1),g=c+a/2,h=s+p/2,r=Math.min(a,p)*.18,i=Math.min(a,p)*.36,e=Math.min(i*.28,38*o),u=l.length||1,y=W(0,M);n.save(),n.beginPath(),n.arc(g,h,r,0,Math.PI*2),n.fillStyle=y,n.fill(),n.restore();const d=I(f.text,r*1.6,r*1.2)*o;n.font=`bold ${d}px sans-serif`,$(n,f.text,g,h,r*2,r*2,d);for(let b=0;b<u;b++){const P=b/u*Math.PI*2-Math.PI/2,m=g+i*Math.cos(P),T=h+i*Math.sin(P),v=W(b+1,M),k=g+r*Math.cos(P),S=h+r*Math.sin(P),R=m-e*Math.cos(P),A=T-e*Math.sin(P);X(n,k,S,R,A,v+"99",1.5*o),n.save(),n.beginPath(),n.arc(m,T,e,0,Math.PI*2),n.fillStyle=v,n.fill(),n.restore();const H=I(l[b].text,e*1.7,e*1.2)*o;n.font=`${H}px sans-serif`,$(n,l[b].text,m,T,e*2,e*1.8,H)}}function U(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t.length,l=p/f;for(let g=0;g<f;g++){const h=(f-g)/f,r=a*h,i=c+(a-r)/2,e=s+g*l,u=W(g,M);n.save(),n.beginPath(),n.moveTo(i,e+l),n.lineTo(i+r,e+l);const y=a*((f-g-1)/f);n.lineTo(c+(a+y)/2,e),n.lineTo(c+(a-y)/2,e),n.closePath(),n.fillStyle=u,n.strokeStyle="#fff",n.lineWidth=2*o,n.fill(),n.stroke(),n.restore();const d=I(t[g].text,r*.6,l*.7)*o;n.font=`${d}px sans-serif`,$(n,t[g].text,c+a/2,e+l/2,r*.6,l*.7,d)}}function Z(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t.length,l=p/f;for(let g=0;g<f;g++){const h=1-g/f*.55,r=1-(g+1)/f*.55,i=a*h,e=a*r,u=c+(a-i)/2,y=c+(a-e)/2,d=s+g*l,b=W(g,M);n.save(),n.beginPath(),n.moveTo(u,d),n.lineTo(u+i,d),n.lineTo(y+e,d+l),n.lineTo(y,d+l),n.closePath(),n.fillStyle=b,n.strokeStyle="#fff",n.lineWidth=2*o,n.fill(),n.stroke(),n.restore();const P=(i+e)/2,m=I(t[g].text,P*.8,l*.7)*o;n.font=`${m}px sans-serif`,$(n,t[g].text,c+a/2,d+l/2,P*.8,l*.7,m)}}function _(n,t,c,s,a,p,M,o){if(!t.length)return;const f=Math.min(t.length,4),l=c+a/2,g=s+p/2,h=Math.min(a,p)*(f<=2?.32:.28),r=h*.65,i=[];for(let e=0;e<f;e++)i.push(e/f*Math.PI*2-Math.PI/2);for(let e=0;e<f;e++){const u=f>1?l+r*Math.cos(i[e]):l,y=f>1?g+r*Math.sin(i[e]):g,d=W(e,M);n.save(),n.globalAlpha=.55,n.beginPath(),n.arc(u,y,h,0,Math.PI*2),n.fillStyle=d,n.fill(),n.globalAlpha=1,n.strokeStyle="#fff",n.lineWidth=1.5*o,n.stroke(),n.restore();const b=f>1?l+(r+h*.45)*Math.cos(i[e]):l,P=f>1?g+(r+h*.45)*Math.sin(i[e]):g,m=I(t[e].text,h*1.2,h*.7)*o;n.font=`${m}px sans-serif`,$(n,t[e].text,b,P,h*1.2,h*.7,m,"#333")}}function w(n,t,c,s,a,p,M,o){const f=[t[0]||{text:""},t[1]||{text:""},t[2]||{text:""},t[3]||{text:""}],l=a/2,g=p/2,h=8*o;for(let r=0;r<2;r++)for(let i=0;i<2;i++){const e=r*2+i,u=c+i*l+h,y=s+r*g+h,d=l-h*2,b=g-h*2,P=W(e,M);L(n,u,y,d,b,8*o,P);const m=I(f[e].text,d-10,b)*o;n.font=`${m}px sans-serif`,$(n,f[e].text,u+d/2,y+b/2,d-10,b,m)}}function q(n,t,c,s,a,p,M,o){if(!t.length)return;const f=t.length,l=p/f,g=Math.min(l*.2,14*o),h=g*3;for(let r=0;r<f;r++){const i=s+r*l,e=i+l/2,u=W(r,M);n.save(),n.beginPath(),n.arc(c+g,e,g,0,Math.PI*2),n.fillStyle=u,n.fill(),n.restore(),L(n,c+h,i+l*.1,a-h-4*o,l*.8,4*o,u+"22");const y=I(t[r].text,a-h-20*o,l*.7)*o;n.font=`${y}px sans-serif`,n.fillStyle="#333",n.textAlign="left",n.textBaseline="middle",n.fillText(t[r].text,c+h+8*o,e)}}function C(n,t,c,s,a,p,M,o){if(t.length<2){q(n,t,c,s,a,p,M,o);return}const f=t[Math.floor(t.length/2)],l=t.slice(0,Math.floor(t.length/2)),g=t.slice(Math.floor(t.length/2)+1),h=c+a/2,r=s+p/2,i=Math.min(a*.14,p*.25),e=W(Math.floor(t.length/2),M);n.save(),n.beginPath(),n.arc(h,r,i,0,Math.PI*2),n.fillStyle=e,n.fill(),n.restore();const u=I(f.text,i*1.6,i*1.2)*o;n.font=`bold ${u}px sans-serif`,$(n,f.text,h,r,i*2,i*1.8,u);const y=p/Math.max(l.length,g.length,1),d=a*.3,b=y*.7,P=(m,T)=>{const v=T==="left"?c:c+a-d,k=T==="left"?h-i:h+i;for(let S=0;S<m.length;S++){const R=s+y*S+(y-b)/2,A=W(S+(T==="right"?l.length+1:0),M);L(n,v,R,d,b,5*o,A);const H=I(m[S].text,d-8,b)*o;n.font=`${H}px sans-serif`,$(n,m[S].text,v+d/2,R+b/2,d-8,b,H);const N=T==="left"?v+d:v;X(n,N,R+b/2,k,r,A+"88",1.5*o)}};P(l,"left"),P(g,"right")}function x(n,t,c,s,a,p,M,o){const f=t.length;if(!f)return;const l=Math.ceil(Math.sqrt(f)),g=Math.ceil(f/l),h=a/l,r=p/g,i=Math.min(h,r)*.1;for(let e=0;e<f;e++){const u=e%l,y=Math.floor(e/l),d=c+u*h+i,b=s+y*r+i,P=h-i*2,m=r-i*2,T=W(e,M);L(n,d,b,P,m,8*o,T),j(T),n.save();const v=n.createLinearGradient(d,b,d,b+m*.5);v.addColorStop(0,"rgba(255,255,255,0.18)"),v.addColorStop(1,"rgba(255,255,255,0)"),n.fillStyle=v,n.beginPath(),n.roundRect?.(d,b,P,m,8*o),n.fill(),n.restore();const k=I(t[e].text,P-12*o,m)*o;n.font=`${k}px sans-serif`,$(n,t[e].text,d+P/2,b+m/2,P-12*o,m,k)}}function un(n,t,c,s,a,p,M,o,f){const l=V(t),g=z(c),h=16*f;n.save(),n.fillStyle="#f7f9fc",n.strokeStyle="#e0e4ec",n.lineWidth=1,n.beginPath(),n.roundRect?.(s,a,p,M,6*f)||n.rect(s,a,p,M),n.fill(),n.stroke();const r=s+h,i=a+h,e=p-h*2,u=M-h*2;if(!l.length){n.fillStyle="#aaa",n.font=`${12*f}px sans-serif`,n.textAlign="center",n.textBaseline="middle",n.fillText("SmartArt Diagram",s+p/2,a+M/2),n.restore();return}switch(g){case"process":J(n,l,r,i,e,u,o,f);break;case"cycle":K(n,l,r,i,e,u,o,f);break;case"hierarchy":O(n,l,r,i,e,u,o,f);break;case"radial":Q(n,l,r,i,e,u,o,f);break;case"pyramid":U(n,l,r,i,e,u,o,f);break;case"funnel":Z(n,l,r,i,e,u,o,f);break;case"venn":_(n,l,r,i,e,u,o,f);break;case"matrix":w(n,l,r,i,e,u,o,f);break;case"list":q(n,l,r,i,e,u,o,f);break;case"relationship":C(n,l,r,i,e,u,o,f);break;default:x(n,l,r,i,e,u,o,f)}n.restore()}export{un as renderSmartArt};
@@ -1 +1 @@
1
- import{s as W,a as P,S as N}from"./chunk-AEK57VVT-DiUHgqSA.js";import{_ as u,c as t,d as H,l as S,e as C,k as z,u as U}from"./mermaid.core-BoximGnF.js";import{G as F}from"./graph-CHQd8w8o.js";import{l as O}from"./layout-BITZWXG5.js";import{n as J,o as X}from"./conversation-input-sync-D8QfxmnI.js";import"./chunk-RZ5BOZE2-8iG8Y9sJ.js";import"./index-DAftzhq_.js";import"./_baseUniq-BU_W0zZ3.js";import"./_basePickBy-DpS1gi-o.js";import"./path-utils-DXMoAzHL.js";import"./error-boundary-B3EFBlFF.js";var L={},D=u((e,i)=>{L[e]=i},"set"),Y=u(e=>L[e],"get"),G=u(()=>Object.keys(L),"keys"),I=u(()=>G().length,"size"),$={get:Y,set:D,keys:G,size:I},j=u(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"),q=u(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"),Z=u((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),o=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",o.width+2*t().state.padding).attr("height",o.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),K=u((e,i)=>{const d=u(function(l,B,m){const k=l.append("tspan").attr("x",2*t().state.padding).text(B);m||k.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(),g=n.height,x=e.append("text").attr("x",t().state.padding).attr("y",g+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(l){a||(d(x,l,s),s=!1),a=!1});const y=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+g+t().state.dividerMargin/2).attr("y2",t().state.padding+g+t().state.dividerMargin/2).attr("class","descr-divider"),p=x.node().getBBox(),c=Math.max(p.width,n.width);return y.attr("x2",c+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c+2*t().state.padding).attr("height",p.height+g+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),Q=u((e,i,d)=>{const o=t().state.padding,n=2*t().state.padding,g=e.node().getBBox(),x=g.width,a=g.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),p=s.node().getBBox().width+n;let c=Math.max(p,x);c===x&&(c=c+n);let l;const B=e.node().getBBox();i.doc,l=a-o,p>x&&(l=(x-c)/2+o),Math.abs(a-B.x)<o&&p>x&&(l=a-(p-x)/2);const m=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",l).attr("y",m).attr("class",d?"alt-composit":"composit").attr("width",c).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",l+o),p<=x&&s.attr("x",a+(c-n)/2-p/2+o),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),V=u(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"),tt=u((e,i)=>{let d=t().state.forkWidth,o=t().state.forkHeight;if(i.parentId){let n=d;d=o,o=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",o).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),et=u((e,i,d,o)=>{let n=0;const g=o.append("text");g.style("text-anchor","start"),g.attr("class","noteText");let x=e.replace(/\r\n/g,"<br/>");x=x.replace(/\n/g,"<br/>");const a=x.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const y of a){const p=y.trim();if(p.length>0){const c=g.append("tspan");if(c.text(p),s===0){const l=c.node().getBBox();s+=l.height}n+=s,c.attr("x",i+t().state.noteMargin),c.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:g.node().getBBox().width,textHeight:n}},"_drawLongText"),at=u((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),o=i.append("g"),{textWidth:n,textHeight:g}=et(e,0,0,o);return d.attr("height",g+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),_=u(function(e,i){const d=i.id,o={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&j(n),i.type==="end"&&V(n),(i.type==="fork"||i.type==="join")&&tt(n,i),i.type==="note"&&at(i.note.text,n),i.type==="divider"&&q(n),i.type==="default"&&i.descriptions.length===0&&Z(n,i),i.type==="default"&&i.descriptions.length>0&&K(n,i);const g=n.node().getBBox();return o.width=g.width+2*t().state.padding,o.height=g.height+2*t().state.padding,$.set(d,o),o},"drawState"),A=0,it=u(function(e,i,d){const o=u(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,g=J().x(function(s){return s.x}).y(function(s){return s.y}).curve(X),x=e.append("path").attr("d",g(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)")),x.attr("marker-end","url("+a+"#"+o(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:y,y:p}=U.calcLabelPosition(i.points),c=z.getRows(d.title);let l=0;const B=[];let m=0,k=0;for(let f=0;f<=c.length;f++){const h=s.append("text").attr("text-anchor","middle").text(c[f]).attr("x",y).attr("y",p+l),w=h.node().getBBox();m=Math.max(m,w.width),k=Math.min(k,w.x),S.info(w.x,y,p+l),l===0&&(l=h.node().getBBox().height,S.info("Title height",l,p)),B.push(h)}let E=l*c.length;if(c.length>1){const f=(c.length-1)*l*.5;B.forEach((h,w)=>h.attr("y",p+w*l-f)),E=l*c.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",y-m/2-t().state.padding/2).attr("y",p-E/2-t().state.padding/2-3.5).attr("width",m+t().state.padding).attr("height",E+t().state.padding),S.info(r)}A++},"drawEdge"),b,T={},rt=u(function(){},"setConf"),nt=u(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"),st=u(function(e,i,d,o){b=t().state;const n=t().securityLevel;let g;n==="sandbox"&&(g=H("#i"+i));const x=n==="sandbox"?H(g.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?g.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=x.select(`[id='${i}']`);nt(s);const y=o.db.getRootDoc();R(y,s,void 0,!1,x,a,o);const p=b.padding,c=s.node().getBBox(),l=c.width+p*2,B=c.height+p*2,m=l*1.75;C(s,B,m,b.useMaxWidth),s.attr("viewBox",`${c.x-b.padding} ${c.y-b.padding} `+l+" "+B)},"draw"),dt=u(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),R=u((e,i,d,o,n,g,x)=>{const a=new F({compound:!0,multigraph:!0});let s,y=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){y=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:y?1:b.edgeLengthFactor,nodeSep:y?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:y?1:b.edgeLengthFactor,nodeSep:y?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const p=x.db.getStates(),c=x.db.getRelations(),l=Object.keys(p);for(const r of l){const f=p[r];d&&(f.parentId=d);let h;if(f.doc){let w=i.append("g").attr("id",f.id).attr("class","stateGroup");h=R(f.doc,w,f.id,!o,n,g,x);{w=Q(w,f,o);let v=w.node().getBBox();h.width=v.width,h.height=v.height+b.padding/2,T[f.id]={y:b.compositTitleSize}}}else h=_(i,f,a);if(f.note){const w={descriptions:[],id:f.id+"-note",note:f.note,type:"note"},v=_(i,w,a);f.note.position==="left of"?(a.setNode(h.id+"-note",v),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",v)),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;c.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:dt(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),O(a),S.debug("Graph after layout",a.nodes());const m=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("#"+m.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("#"+m.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),g.querySelectorAll("#"+m.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let v=0,M=0;w&&(w.parentElement&&(v=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",v-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let k=m.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))),it(i,a.edge(r),a.edge(r).relation))}),k=m.getBBox();const E={id:d||"root",label:d||"root",width:0,height:0};return E.width=k.width+2*b.padding,E.height=k.height+2*b.padding,S.debug("Doc rendered",E,a),E},"renderDoc"),ot={setConf:rt,draw:st},Bt={parser:P,get db(){return new N(1)},renderer:ot,styles:W,init:u(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{Bt as diagram};
1
+ import{s as W,a as P,S as N}from"./chunk-AEK57VVT-37Z6jWz2.js";import{_ as u,c as t,d as H,l as S,e as C,k as z,u as U}from"./mermaid.core-BzKfajYZ.js";import{G as F}from"./graph-Du8nFp-Q.js";import{l as O}from"./layout-05Xak_7z.js";import{n as J,o as X}from"./conversation-input-sync-C2vqs6ad.js";import"./chunk-RZ5BOZE2-KrZ6g0pV.js";import"./index-BYeiLB51.js";import"./_baseUniq-Ct7pRnI4.js";import"./_basePickBy--UFblcLV.js";import"./path-utils-CYBk4q7C.js";import"./error-boundary-DJSaJHcb.js";var L={},D=u((e,i)=>{L[e]=i},"set"),Y=u(e=>L[e],"get"),G=u(()=>Object.keys(L),"keys"),I=u(()=>G().length,"size"),$={get:Y,set:D,keys:G,size:I},j=u(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"),q=u(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"),Z=u((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),o=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",o.width+2*t().state.padding).attr("height",o.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),K=u((e,i)=>{const d=u(function(l,B,m){const k=l.append("tspan").attr("x",2*t().state.padding).text(B);m||k.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(),g=n.height,x=e.append("text").attr("x",t().state.padding).attr("y",g+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(l){a||(d(x,l,s),s=!1),a=!1});const y=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+g+t().state.dividerMargin/2).attr("y2",t().state.padding+g+t().state.dividerMargin/2).attr("class","descr-divider"),p=x.node().getBBox(),c=Math.max(p.width,n.width);return y.attr("x2",c+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c+2*t().state.padding).attr("height",p.height+g+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),Q=u((e,i,d)=>{const o=t().state.padding,n=2*t().state.padding,g=e.node().getBBox(),x=g.width,a=g.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),p=s.node().getBBox().width+n;let c=Math.max(p,x);c===x&&(c=c+n);let l;const B=e.node().getBBox();i.doc,l=a-o,p>x&&(l=(x-c)/2+o),Math.abs(a-B.x)<o&&p>x&&(l=a-(p-x)/2);const m=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",l).attr("y",m).attr("class",d?"alt-composit":"composit").attr("width",c).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",l+o),p<=x&&s.attr("x",a+(c-n)/2-p/2+o),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),V=u(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"),tt=u((e,i)=>{let d=t().state.forkWidth,o=t().state.forkHeight;if(i.parentId){let n=d;d=o,o=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",o).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),et=u((e,i,d,o)=>{let n=0;const g=o.append("text");g.style("text-anchor","start"),g.attr("class","noteText");let x=e.replace(/\r\n/g,"<br/>");x=x.replace(/\n/g,"<br/>");const a=x.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const y of a){const p=y.trim();if(p.length>0){const c=g.append("tspan");if(c.text(p),s===0){const l=c.node().getBBox();s+=l.height}n+=s,c.attr("x",i+t().state.noteMargin),c.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:g.node().getBBox().width,textHeight:n}},"_drawLongText"),at=u((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),o=i.append("g"),{textWidth:n,textHeight:g}=et(e,0,0,o);return d.attr("height",g+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),_=u(function(e,i){const d=i.id,o={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&j(n),i.type==="end"&&V(n),(i.type==="fork"||i.type==="join")&&tt(n,i),i.type==="note"&&at(i.note.text,n),i.type==="divider"&&q(n),i.type==="default"&&i.descriptions.length===0&&Z(n,i),i.type==="default"&&i.descriptions.length>0&&K(n,i);const g=n.node().getBBox();return o.width=g.width+2*t().state.padding,o.height=g.height+2*t().state.padding,$.set(d,o),o},"drawState"),A=0,it=u(function(e,i,d){const o=u(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,g=J().x(function(s){return s.x}).y(function(s){return s.y}).curve(X),x=e.append("path").attr("d",g(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)")),x.attr("marker-end","url("+a+"#"+o(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:y,y:p}=U.calcLabelPosition(i.points),c=z.getRows(d.title);let l=0;const B=[];let m=0,k=0;for(let f=0;f<=c.length;f++){const h=s.append("text").attr("text-anchor","middle").text(c[f]).attr("x",y).attr("y",p+l),w=h.node().getBBox();m=Math.max(m,w.width),k=Math.min(k,w.x),S.info(w.x,y,p+l),l===0&&(l=h.node().getBBox().height,S.info("Title height",l,p)),B.push(h)}let E=l*c.length;if(c.length>1){const f=(c.length-1)*l*.5;B.forEach((h,w)=>h.attr("y",p+w*l-f)),E=l*c.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",y-m/2-t().state.padding/2).attr("y",p-E/2-t().state.padding/2-3.5).attr("width",m+t().state.padding).attr("height",E+t().state.padding),S.info(r)}A++},"drawEdge"),b,T={},rt=u(function(){},"setConf"),nt=u(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"),st=u(function(e,i,d,o){b=t().state;const n=t().securityLevel;let g;n==="sandbox"&&(g=H("#i"+i));const x=n==="sandbox"?H(g.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?g.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=x.select(`[id='${i}']`);nt(s);const y=o.db.getRootDoc();R(y,s,void 0,!1,x,a,o);const p=b.padding,c=s.node().getBBox(),l=c.width+p*2,B=c.height+p*2,m=l*1.75;C(s,B,m,b.useMaxWidth),s.attr("viewBox",`${c.x-b.padding} ${c.y-b.padding} `+l+" "+B)},"draw"),dt=u(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),R=u((e,i,d,o,n,g,x)=>{const a=new F({compound:!0,multigraph:!0});let s,y=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){y=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:y?1:b.edgeLengthFactor,nodeSep:y?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:y?1:b.edgeLengthFactor,nodeSep:y?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const p=x.db.getStates(),c=x.db.getRelations(),l=Object.keys(p);for(const r of l){const f=p[r];d&&(f.parentId=d);let h;if(f.doc){let w=i.append("g").attr("id",f.id).attr("class","stateGroup");h=R(f.doc,w,f.id,!o,n,g,x);{w=Q(w,f,o);let v=w.node().getBBox();h.width=v.width,h.height=v.height+b.padding/2,T[f.id]={y:b.compositTitleSize}}}else h=_(i,f,a);if(f.note){const w={descriptions:[],id:f.id+"-note",note:f.note,type:"note"},v=_(i,w,a);f.note.position==="left of"?(a.setNode(h.id+"-note",v),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",v)),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;c.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:dt(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),O(a),S.debug("Graph after layout",a.nodes());const m=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("#"+m.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("#"+m.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),g.querySelectorAll("#"+m.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let v=0,M=0;w&&(w.parentElement&&(v=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",v-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let k=m.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))),it(i,a.edge(r),a.edge(r).relation))}),k=m.getBBox();const E={id:d||"root",label:d||"root",width:0,height:0};return E.width=k.width+2*b.padding,E.height=k.height+2*b.padding,S.debug("Doc rendered",E,a),E},"renderDoc"),ot={setConf:rt,draw:st},Bt={parser:P,get db(){return new N(1)},renderer:ot,styles:W,init:u(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{Bt as diagram};
@@ -0,0 +1 @@
1
+ import{s as r,b as e,a,S as s}from"./chunk-AEK57VVT-37Z6jWz2.js";import{_ as i}from"./mermaid.core-BzKfajYZ.js";import"./chunk-RZ5BOZE2-KrZ6g0pV.js";import"./conversation-input-sync-C2vqs6ad.js";import"./index-BYeiLB51.js";import"./path-utils-CYBk4q7C.js";import"./error-boundary-DJSaJHcb.js";var n={parser:a,get db(){return new s(2)},renderer:e,styles:r,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{n as diagram};