@intent-hq/web 2.361.0 → 2.361.2

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 (158) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/assets/{chat-search.CWdkjFsY.css → chat-search.BEJJqsqt.css} +1 -1
  3. package/web/app/immutable/chunks/{C-UIC-T7.js → -7du9lfn.js} +1 -1
  4. package/web/app/immutable/chunks/{kcZjzSP7.js → 0_7FQkiC.js} +1 -1
  5. package/web/app/immutable/chunks/{c4wFHOws.js → 1EW4b83o.js} +1 -1
  6. package/web/app/immutable/chunks/{B9t82so5.js → 2wJjyVNk.js} +2 -2
  7. package/web/app/immutable/chunks/{BN7TE2rx.js → 52-_4pXR.js} +1 -1
  8. package/web/app/immutable/chunks/{cFIrJg-T.js → 5NiJCy7J.js} +1 -1
  9. package/web/app/immutable/chunks/{VFkYp0FY.js → 5u3dQlae.js} +1 -1
  10. package/web/app/immutable/chunks/{C9ujJ6il.js → 6d4Jv8Hz.js} +2 -2
  11. package/web/app/immutable/chunks/{BUd39PAw.js → 7tcI69cn.js} +1 -1
  12. package/web/app/immutable/chunks/{CKxDlPZO.js → 8HLudOb-.js} +1 -1
  13. package/web/app/immutable/chunks/{B1Qwlozr.js → 96DwTK9j.js} +2 -2
  14. package/web/app/immutable/chunks/{PsyApth6.js → As8lK70V.js} +1 -1
  15. package/web/app/immutable/chunks/{cqV5ArDy.js → AxCVH26S.js} +1 -1
  16. package/web/app/immutable/chunks/B07OdpUU.js +305 -0
  17. package/web/app/immutable/chunks/{DDA9SIgp.js → B0JbhmMb.js} +1 -1
  18. package/web/app/immutable/chunks/{Dd5jECmn.js → B1Tr5BPZ.js} +1 -1
  19. package/web/app/immutable/chunks/{COGpUz3t.js → B2ns9OTA.js} +1 -1
  20. package/web/app/immutable/chunks/{D-2XEcTW.js → B4kCZd9W.js} +1 -1
  21. package/web/app/immutable/chunks/{D27yNjLf.js → B5Pg9_MZ.js} +1 -1
  22. package/web/app/immutable/chunks/{f178PQSp.js → B9pYL5w0.js} +1 -1
  23. package/web/app/immutable/chunks/{sUAKfW_e.js → B9tRD7MQ.js} +1 -1
  24. package/web/app/immutable/chunks/{B2islIT9.js → BAgFsuQz.js} +1 -1
  25. package/web/app/immutable/chunks/{DZ-8xGs3.js → BD9wTbmm.js} +1 -1
  26. package/web/app/immutable/chunks/{B3a7OI2F.js → BG4tBRsm.js} +1 -1
  27. package/web/app/immutable/chunks/{BinCXnWY.js → BGOuxFsr.js} +1 -1
  28. package/web/app/immutable/chunks/{Lpw6MOlz.js → BKHUH54N.js} +1 -1
  29. package/web/app/immutable/chunks/{D_rNeuD7.js → BKw6wLyE.js} +1 -1
  30. package/web/app/immutable/chunks/{BeTn7XSu.js → BLFlTVjy.js} +4 -4
  31. package/web/app/immutable/chunks/{D7Vw4JcL.js → BMYcVUUM.js} +1 -1
  32. package/web/app/immutable/chunks/{BWmQZ9-W.js → BOSMtVmb.js} +1 -1
  33. package/web/app/immutable/chunks/{CVFwlr2Z.js → BPG9IRUj.js} +1 -1
  34. package/web/app/immutable/chunks/{qWbeHdf9.js → BPRz9VyT.js} +1 -1
  35. package/web/app/immutable/chunks/{Bv2wmdPv.js → BSM5O6JV.js} +1 -1
  36. package/web/app/immutable/chunks/{VPOqbJP9.js → BTR14c-t.js} +3 -3
  37. package/web/app/immutable/chunks/{C9vs7bl5.js → BWUH3HmG.js} +1 -1
  38. package/web/app/immutable/chunks/{CIDE3x9D.js → BZp1yALL.js} +1 -1
  39. package/web/app/immutable/chunks/{CyPGin7U.js → BbIMIfqX.js} +1 -1
  40. package/web/app/immutable/chunks/BbV7MtxC.js +1 -0
  41. package/web/app/immutable/chunks/{C1RT5V9K.js → BeLtysng.js} +1 -1
  42. package/web/app/immutable/chunks/{_2nk2_Hn.js → Bgk8kfr8.js} +1 -1
  43. package/web/app/immutable/chunks/Bhx5E4sN.js +2 -0
  44. package/web/app/immutable/chunks/{t3JsxPaO.js → Big1YQpq.js} +1 -1
  45. package/web/app/immutable/chunks/{j3M2P1q-.js → Bl0Adq86.js} +1 -1
  46. package/web/app/immutable/chunks/{Bw8AD9dJ.js → Bl2aLOn5.js} +1 -1
  47. package/web/app/immutable/chunks/{BsOXr_0z.js → BskEvHZa.js} +1 -1
  48. package/web/app/immutable/chunks/{BqVB3HSC.js → Bt_RDNlI.js} +1 -1
  49. package/web/app/immutable/chunks/{CSSLtQaO.js → Bx_nP_MK.js} +1 -1
  50. package/web/app/immutable/chunks/{Rn1PSvxr.js → Bya2sQrR.js} +1 -1
  51. package/web/app/immutable/chunks/{DgLG2932.js → Byj6QL5F.js} +1 -1
  52. package/web/app/immutable/chunks/{D93k--bp.js → C-Qm3bfA.js} +1 -1
  53. package/web/app/immutable/chunks/{Bkvyt2Uf.js → C1wjuTFV.js} +1 -1
  54. package/web/app/immutable/chunks/{YgZ9xfEe.js → C3L3GwMq.js} +1 -1
  55. package/web/app/immutable/chunks/{CKn-VDhm.js → C4qqiNcA.js} +1 -1
  56. package/web/app/immutable/chunks/{D-RdTqFP.js → C5cRG0yV.js} +3 -3
  57. package/web/app/immutable/chunks/{CTNuszHC.js → C9otdzZM.js} +4 -4
  58. package/web/app/immutable/chunks/{Dads5On7.js → CGINFMqT.js} +1 -1
  59. package/web/app/immutable/chunks/CJHViisg.js +12 -0
  60. package/web/app/immutable/chunks/{C27IcubQ.js → CNUg0Cs8.js} +1 -1
  61. package/web/app/immutable/chunks/{kV-fkifL.js → CO15VKbw.js} +1 -1
  62. package/web/app/immutable/chunks/{BzRgELGj.js → CVOsommd.js} +2 -2
  63. package/web/app/immutable/chunks/{BhQ7Nd7i.js → C_z20mJT.js} +1 -1
  64. package/web/app/immutable/chunks/{Cot5yElc.js → Cb4s3Dt_.js} +3 -3
  65. package/web/app/immutable/chunks/{KnX_02Jn.js → CgS1Dv_8.js} +1 -1
  66. package/web/app/immutable/chunks/{B-gNGby7.js → Ch9oF0ek.js} +1 -1
  67. package/web/app/immutable/chunks/{Bep3Jqpc.js → CjorBqRt.js} +1 -1
  68. package/web/app/immutable/chunks/{B5XDKjvt.js → CkVsI2Jc.js} +1 -1
  69. package/web/app/immutable/chunks/{CTRLupPR.js → CmVyGqNV.js} +2 -2
  70. package/web/app/immutable/chunks/{BvyARSUu.js → CpBPE3-0.js} +1 -1
  71. package/web/app/immutable/chunks/{1j8IB6qY.js → CpHAR9_T.js} +1 -1
  72. package/web/app/immutable/chunks/{BfLVjdWH.js → CpY-WDD9.js} +1 -1
  73. package/web/app/immutable/chunks/{VSdJtUTR.js → Cq0xvhw9.js} +3 -3
  74. package/web/app/immutable/chunks/{BYAWXKUB.js → Cq8fk3CH.js} +1 -1
  75. package/web/app/immutable/chunks/{DqKDx046.js → CrLichOk.js} +1 -1
  76. package/web/app/immutable/chunks/CsqD9xz6.js +2 -0
  77. package/web/app/immutable/chunks/{CuHcMIuh.js → CssvkQD7.js} +1 -1
  78. package/web/app/immutable/chunks/{MMcMOHPP.js → CuoerPJp.js} +3 -3
  79. package/web/app/immutable/chunks/{BYMZ452w.js → CvH6beJr.js} +1 -1
  80. package/web/app/immutable/chunks/{CiCc1qZy.js → CyQJi5fM.js} +1 -1
  81. package/web/app/immutable/chunks/{DxuDR3-b.js → CytLF-ur.js} +6 -6
  82. package/web/app/immutable/chunks/{aF9CaLLA.js → D00mCTUs.js} +1 -1
  83. package/web/app/immutable/chunks/{D_sZQPLm.js → D0VMf2Fp.js} +3 -3
  84. package/web/app/immutable/chunks/{D7HGt2gg.js → D0g6v2_u.js} +1 -1
  85. package/web/app/immutable/chunks/{BkNoKwFt.js → D1FSU9Gk.js} +1 -1
  86. package/web/app/immutable/chunks/{DP_4YjFn.js → D1Vat_ZV.js} +1 -1
  87. package/web/app/immutable/chunks/{BW5RQ7dH.js → D3rVaYU0.js} +1 -1
  88. package/web/app/immutable/chunks/{B81eIwbi.js → D4LnecGU.js} +2 -2
  89. package/web/app/immutable/chunks/{1c0lZJrV.js → D5kZvSPC.js} +1 -1
  90. package/web/app/immutable/chunks/{DwC7M61S.js → D9H2UCuG.js} +1 -1
  91. package/web/app/immutable/chunks/{vSqR6YVO.js → DAwOD17b.js} +1 -1
  92. package/web/app/immutable/chunks/{CIeKs3Fz.js → DC3pczce.js} +1 -1
  93. package/web/app/immutable/chunks/{C2NcLB2u.js → DD4-FHBp.js} +1 -1
  94. package/web/app/immutable/chunks/{Bz8fykGF.js → DHBQy6St.js} +1 -1
  95. package/web/app/immutable/chunks/{CpV8u0F6.js → DHbwKi-E.js} +2 -2
  96. package/web/app/immutable/chunks/{CFuZ1Me4.js → DQTzZEWU.js} +2 -2
  97. package/web/app/immutable/chunks/{D81z2pn-.js → DVlYg0SZ.js} +3 -3
  98. package/web/app/immutable/chunks/{D7Qg9UsC.js → DWWTsFh-.js} +1 -1
  99. package/web/app/immutable/chunks/{BKkSBqXG.js → DXcrfgZH.js} +1 -1
  100. package/web/app/immutable/chunks/{Dm7totry.js → Db7PzaF_.js} +1 -1
  101. package/web/app/immutable/chunks/{Khf-yjCZ.js → DjKDfA1m.js} +2 -2
  102. package/web/app/immutable/chunks/{DR2khMiR.js → DkNdI_Wp.js} +1 -1
  103. package/web/app/immutable/chunks/{OJCFNlvY.js → DkgfeEA0.js} +1 -1
  104. package/web/app/immutable/chunks/{BJf3iy0S.js → DlBKZ9jQ.js} +2 -2
  105. package/web/app/immutable/chunks/{XwrZ1aRW.js → Ds8ezw9K.js} +1 -1
  106. package/web/app/immutable/chunks/{DFrHql0h.js → DsCJG1hb.js} +1 -1
  107. package/web/app/immutable/chunks/{CL0ULjU-.js → Dtqu7Pxg.js} +1 -1
  108. package/web/app/immutable/chunks/{BkBez7WX.js → DuTju9rc.js} +1 -1
  109. package/web/app/immutable/chunks/{BzFCW_oO.js → DvCS4TTw.js} +1 -1
  110. package/web/app/immutable/chunks/{CK61dfwH.js → DyIRpoZq.js} +1 -1
  111. package/web/app/immutable/chunks/{DXJZHh0A.js → DzmdzUVi.js} +1 -1
  112. package/web/app/immutable/chunks/{Cmh4buXt.js → MzfVdJbX.js} +1 -1
  113. package/web/app/immutable/chunks/{EtMoREaX.js → OiHDtgNp.js} +1 -1
  114. package/web/app/immutable/chunks/{ByVGRZX6.js → QWfAA7k-.js} +1 -1
  115. package/web/app/immutable/chunks/{DwM4HivY.js → TaZ6zGN1.js} +1 -1
  116. package/web/app/immutable/chunks/{CPuPCqZE.js → Tqm9-f9l.js} +1 -1
  117. package/web/app/immutable/chunks/{BEXbHJh4.js → Vfi0Dmt8.js} +1 -1
  118. package/web/app/immutable/chunks/{BM-7iiyp.js → W67SWYQh.js} +1 -1
  119. package/web/app/immutable/chunks/{CSykTYZD.js → YhYmjxML.js} +1 -1
  120. package/web/app/immutable/chunks/{Bw3Jc49z.js → aCDFJfWo.js} +1 -1
  121. package/web/app/immutable/chunks/{Bs7k0nr9.js → aokikQw5.js} +47 -47
  122. package/web/app/immutable/chunks/{BVPML882.js → buVzC4lf.js} +1 -1
  123. package/web/app/immutable/chunks/{CjLcyZTM.js → c1DCm8IK.js} +1 -1
  124. package/web/app/immutable/chunks/{Bwq11IJN.js → cU6Fqv3g.js} +1 -1
  125. package/web/app/immutable/chunks/{95Q5Q_xW.js → dGnsWF4N.js} +1 -1
  126. package/web/app/immutable/chunks/{C5ak_0Xq.js → ivBdCvd6.js} +1 -1
  127. package/web/app/immutable/chunks/{D5Y-fh7x.js → kbpbXlKS.js} +1 -1
  128. package/web/app/immutable/chunks/{hvIpWr_e.js → lZNvj_WH.js} +1 -1
  129. package/web/app/immutable/chunks/{Dd5fSdFI.js → rUCEwUE_.js} +1 -1
  130. package/web/app/immutable/chunks/{CucLWNXy.js → t94_2IkW.js} +1 -1
  131. package/web/app/immutable/chunks/{BSxTNz_Y.js → tSlfPnTD.js} +1 -1
  132. package/web/app/immutable/chunks/y2YthUTc.js +1 -0
  133. package/web/app/immutable/chunks/{BMiSQSg-.js → yTlZ1Sih.js} +1 -1
  134. package/web/app/immutable/entry/{app.BcpofzE6.js → app.CYYj7JvH.js} +2 -2
  135. package/web/app/immutable/entry/start.BH_-Ros5.js +1 -0
  136. package/web/app/immutable/nodes/{0.BQUOze-j.js → 0.vJoG8nTo.js} +1 -1
  137. package/web/app/immutable/nodes/{1.Bp05_YjA.js → 1.Di6AbyQm.js} +1 -1
  138. package/web/app/immutable/nodes/{10.3aTkNQpJ.js → 10.BkazfxT8.js} +16 -16
  139. package/web/app/immutable/nodes/{11.BXjLtpXc.js → 11.Ck_7PTgk.js} +4 -4
  140. package/web/app/immutable/nodes/{15.DfBroLQA.js → 15.DWwqZzAg.js} +1 -1
  141. package/web/app/immutable/nodes/{19.-ypsiFbk.js → 19.CjDPuA-n.js} +2 -2
  142. package/web/app/immutable/nodes/{2.DULGAXhA.js → 2.B7bl9OWL.js} +4 -4
  143. package/web/app/immutable/nodes/{3.CM-CFkEo.js → 3.CY1Mye6q.js} +1 -1
  144. package/web/app/immutable/nodes/{4.DiNldv1M.js → 4.sNrk6dxf.js} +1 -1
  145. package/web/app/immutable/nodes/{5.DDbl8ORw.js → 5.BrOibHKo.js} +1 -1
  146. package/web/app/immutable/nodes/{6.CGP2STrw.js → 6.BVYLHxv3.js} +1 -1
  147. package/web/app/immutable/nodes/{7.xmorhsK4.js → 7.BZ0ZLzU_.js} +1 -1
  148. package/web/app/immutable/nodes/{8.D_BxSNz-.js → 8.BNlg4qDc.js} +1 -1
  149. package/web/app/immutable/nodes/{9.BUD_PMUy.js → 9.C8X38wWW.js} +4 -4
  150. package/web/app/version.json +1 -1
  151. package/web/index.html +9 -9
  152. package/web/app/immutable/chunks/CA6_Ao_-.js +0 -305
  153. package/web/app/immutable/chunks/CZXdxwZ-.js +0 -2
  154. package/web/app/immutable/chunks/D9WrKwE8.js +0 -1
  155. package/web/app/immutable/chunks/DSDcLbxr.js +0 -12
  156. package/web/app/immutable/chunks/DbaZdUr0.js +0 -1
  157. package/web/app/immutable/chunks/DbgIztcj.js +0 -2
  158. package/web/app/immutable/entry/start.BYusRIxF.js +0 -1
@@ -1,4 +1,4 @@
1
- import{g as k1}from"./D5Y-fh7x.js";import{g as E1}from"./KnX_02Jn.js";import{s as C1}from"./Bz8fykGF.js";import{b as k,a$ as t1,ay as oe,X as Ce,a1 as S1,aP as x1,bh as Gt,a_ as T1,aZ as D1,b0 as _1,V as v1,U as F1,Y as V1,z as I1,ax as s1,J as i1,as as L1,$ as Rt,aW as Ot,r as B1,N as M1,am as y1,aU as w1,ab as N1,x as R1,aT as O1,p as P1}from"./CTNuszHC.js";import{c as G1}from"./95Q5Q_xW.js";import{aR as U1}from"./DDA9SIgp.js";var tt={SHAPE_UNSUPPORTED:"SHAPE_UNSUPPORTED",SHAPE_REMOVED:"SHAPE_REMOVED",EDGE_OPERATOR_UNSUPPORTED:"EDGE_OPERATOR_UNSUPPORTED",REFERENCE_EDGE_LABEL_REJECTED:"REFERENCE_EDGE_LABEL_REJECTED",CONNECTOR_REF_UNRESOLVED:"CONNECTOR_REF_UNRESOLVED",CONNECTOR_REF_NOT_A_CONNECTOR:"CONNECTOR_REF_NOT_A_CONNECTOR",METADATA_KEY_MISAPPLIED:"METADATA_KEY_MISAPPLIED",DUPLICATE_ID_NODE:"DUPLICATE_ID_NODE",RESERVED_SYNTHETIC_ID:"RESERVED_SYNTHETIC_ID",CONTAINMENT_VIOLATION:"CONTAINMENT_VIOLATION",EDGE_SEMANTIC_CONTRADICTION:"EDGE_SEMANTIC_CONTRADICTION",FLOW_NO_INPUT:"FLOW_NO_INPUT"},j1=new Set([tt.SHAPE_UNSUPPORTED,tt.SHAPE_REMOVED,tt.CONTAINMENT_VIOLATION]);new Set(Object.values(tt).filter(s=>!j1.has(s)));var z1=new Map([["task","roundedRect"],["tool","subroutine"],["input","lean-right"],["lean_right","lean-right"],["decision","diamond"],["refdoc","lin-doc"],["action","hexagon"],["round","rect"]]),W1=new Set(["doc","stadium","terminal","circle","trapezoid","inv_trapezoid","inv-trapezoid","doublecircle","double-circle","typeDeclaration","procs","lean_left","lean-left","in-out","cylinder","ellipse","odd","tag-rect","tagged-rectangle","delay","half-rounded-rectangle","lin-rect","lined-rectangle","win-pane","window-pane","curv-trap","curved-trapezoid"]),K1=new Set(["roundedRect","subroutine","subprocess","subproc","framed-rectangle","lean-right","diamond","lin-doc","lined-document","hexagon","hex","connector","collapsedGroup"]),$e="roundedRect";function et(s){return s&&(z1.get(s)??s)}k(et,"resolveShapeAlias");function r1(s,i){for(const n of s)if(!n.isGroup){if((!n.shape||n.shape==="squareRect"||n.shape==="rect")&&(n.shape=$e),W1.has(n.shape)){const r=`shape "${n.shape}" was removed in v0.8.1, using "${$e}"`;i?.emitError?i.emitError("SHAPE_REMOVED",r,{nodeId:n.id}):oe.warn(`agentflow: ${r}`),n.shape=$e;continue}if(!K1.has(n.shape)){const r=`shape "${n.shape}" is not supported, using "${$e}"`;i?.emitWarning?i.emitWarning("SHAPE_UNSUPPORTED",r,{nodeId:n.id}):oe.warn(`agentflow: ${r}`),n.shape=$e}}}k(r1,"normaliseNodeShapes");var Lt=new Map([["tool",0],["task",1],["decision",2],["input",3],["refdoc",4],["connector",5],["action",6]]),a1=Lt.size,o1=k(s=>`af-kind-${s}`,"kindClass"),H1=[...Lt.keys()],u1=k(s=>Math.max(1,s-a1),"containerSlotCount"),l1=k((s,i)=>{const n=a1+s%u1(i);return i>0?n%i:n},"containerSlot");function c1(s,i,n){const r=Ce().themeVariables?.borderColorArray,u=Array.isArray(r)?r.length:0;let l=n.size;for(const c of s??[]){if(c.isGroup||c.shape==="collapsedGroup"){const h=n.get(String(c.id))??l++;c.colorIndex=l1(h,u);continue}const a=i(String(c.id));a&&Lt.has(a)&&(c.cssClasses=`${c.cssClasses??""} ${o1(a)}`.replace(/\s+/g," ").trim())}}k(c1,"assignColorSlots");var n1="agentflow-",Pt=new Set(["shape","view","icon","img","form","pos","w","h","class","style","labelType"]),Y1=new Set(["subroutine","subprocess","subproc","framed-rectangle","tool"]),q1={flow:"flowGroup"};function It(s){if(Array.isArray(s))return s.map(n=>It(n));if(s===null||typeof s!="object")return s;const i={};for(const n of Object.keys(s))n==="__proto__"||n==="constructor"||n==="prototype"||(i[n]=It(s[n]));return i}k(It,"stripPrototypeKeys");function d1(s){let i=!1,n=!1,r=0,u;const l=[];for(const c of s.split(`
1
+ import{g as k1}from"./kbpbXlKS.js";import{g as E1}from"./CgS1Dv_8.js";import{s as C1}from"./DHBQy6St.js";import{b as k,a$ as t1,ay as oe,X as Ce,a1 as S1,aP as x1,bh as Gt,a_ as T1,aZ as D1,b0 as _1,V as v1,U as F1,Y as V1,z as I1,ax as s1,J as i1,as as L1,$ as Rt,aW as Ot,r as B1,N as M1,am as y1,aU as w1,ab as N1,x as R1,aT as O1,p as P1}from"./C9otdzZM.js";import{c as G1}from"./dGnsWF4N.js";import{aR as U1}from"./B0JbhmMb.js";var tt={SHAPE_UNSUPPORTED:"SHAPE_UNSUPPORTED",SHAPE_REMOVED:"SHAPE_REMOVED",EDGE_OPERATOR_UNSUPPORTED:"EDGE_OPERATOR_UNSUPPORTED",REFERENCE_EDGE_LABEL_REJECTED:"REFERENCE_EDGE_LABEL_REJECTED",CONNECTOR_REF_UNRESOLVED:"CONNECTOR_REF_UNRESOLVED",CONNECTOR_REF_NOT_A_CONNECTOR:"CONNECTOR_REF_NOT_A_CONNECTOR",METADATA_KEY_MISAPPLIED:"METADATA_KEY_MISAPPLIED",DUPLICATE_ID_NODE:"DUPLICATE_ID_NODE",RESERVED_SYNTHETIC_ID:"RESERVED_SYNTHETIC_ID",CONTAINMENT_VIOLATION:"CONTAINMENT_VIOLATION",EDGE_SEMANTIC_CONTRADICTION:"EDGE_SEMANTIC_CONTRADICTION",FLOW_NO_INPUT:"FLOW_NO_INPUT"},j1=new Set([tt.SHAPE_UNSUPPORTED,tt.SHAPE_REMOVED,tt.CONTAINMENT_VIOLATION]);new Set(Object.values(tt).filter(s=>!j1.has(s)));var z1=new Map([["task","roundedRect"],["tool","subroutine"],["input","lean-right"],["lean_right","lean-right"],["decision","diamond"],["refdoc","lin-doc"],["action","hexagon"],["round","rect"]]),W1=new Set(["doc","stadium","terminal","circle","trapezoid","inv_trapezoid","inv-trapezoid","doublecircle","double-circle","typeDeclaration","procs","lean_left","lean-left","in-out","cylinder","ellipse","odd","tag-rect","tagged-rectangle","delay","half-rounded-rectangle","lin-rect","lined-rectangle","win-pane","window-pane","curv-trap","curved-trapezoid"]),K1=new Set(["roundedRect","subroutine","subprocess","subproc","framed-rectangle","lean-right","diamond","lin-doc","lined-document","hexagon","hex","connector","collapsedGroup"]),$e="roundedRect";function et(s){return s&&(z1.get(s)??s)}k(et,"resolveShapeAlias");function r1(s,i){for(const n of s)if(!n.isGroup){if((!n.shape||n.shape==="squareRect"||n.shape==="rect")&&(n.shape=$e),W1.has(n.shape)){const r=`shape "${n.shape}" was removed in v0.8.1, using "${$e}"`;i?.emitError?i.emitError("SHAPE_REMOVED",r,{nodeId:n.id}):oe.warn(`agentflow: ${r}`),n.shape=$e;continue}if(!K1.has(n.shape)){const r=`shape "${n.shape}" is not supported, using "${$e}"`;i?.emitWarning?i.emitWarning("SHAPE_UNSUPPORTED",r,{nodeId:n.id}):oe.warn(`agentflow: ${r}`),n.shape=$e}}}k(r1,"normaliseNodeShapes");var Lt=new Map([["tool",0],["task",1],["decision",2],["input",3],["refdoc",4],["connector",5],["action",6]]),a1=Lt.size,o1=k(s=>`af-kind-${s}`,"kindClass"),H1=[...Lt.keys()],u1=k(s=>Math.max(1,s-a1),"containerSlotCount"),l1=k((s,i)=>{const n=a1+s%u1(i);return i>0?n%i:n},"containerSlot");function c1(s,i,n){const r=Ce().themeVariables?.borderColorArray,u=Array.isArray(r)?r.length:0;let l=n.size;for(const c of s??[]){if(c.isGroup||c.shape==="collapsedGroup"){const h=n.get(String(c.id))??l++;c.colorIndex=l1(h,u);continue}const a=i(String(c.id));a&&Lt.has(a)&&(c.cssClasses=`${c.cssClasses??""} ${o1(a)}`.replace(/\s+/g," ").trim())}}k(c1,"assignColorSlots");var n1="agentflow-",Pt=new Set(["shape","view","icon","img","form","pos","w","h","class","style","labelType"]),Y1=new Set(["subroutine","subprocess","subproc","framed-rectangle","tool"]),q1={flow:"flowGroup"};function It(s){if(Array.isArray(s))return s.map(n=>It(n));if(s===null||typeof s!="object")return s;const i={};for(const n of Object.keys(s))n==="__proto__"||n==="constructor"||n==="prototype"||(i[n]=It(s[n]));return i}k(It,"stripPrototypeKeys");function d1(s){let i=!1,n=!1,r=0,u;const l=[];for(const c of s.split(`
2
2
  `)){if(u!==void 0){const p=c.length-c.trimStart().length;if(c.trim()===""||p>u){l.push(c);continue}u=void 0}let a=-1;for(let p=0;p<c.length;p++){const A=c[p];if(n)A==="\\"?p++:A==='"'&&(n=!1);else if(i)A==="'"&&(i=!1);else if(A==='"')n=!0;else if(A==="'")i=!0;else if(A==="#"&&(p===0||c[p-1]===" "||c[p-1]===" ")){a=p;break}else A==="["||A==="{"?r++:(A==="]"||A==="}")&&(r=Math.max(0,r-1))}if(i||n||r>0){l.push(c);continue}const h=a>=0?c.slice(0,a):c,g=a>=0?c.slice(a):"";if(/:\s*[>|][\d+-]*\s*$/.test(h)){u=c.length-c.trimStart().length,l.push(c);continue}l.push(h.replace(/,([\t ]*)$/,"$1")+g)}return l.join(`
3
3
  `)}k(d1,"stripLineTrailingCommas");var Ze,X1=(Ze=class{constructor(){this.vertexCounter=0,this.config=Ce(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.diagramId="",this.preserveCommentsWhenParsing=!0,this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,this.funs=[],this.setAccTitle=T1,this.setAccDescription=D1,this.setDiagramTitle=_1,this.getAccTitle=v1,this.getAccDescription=F1,this.getDiagramTitle=V1,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addGlobal=this.addGlobal.bind(this),this.addConnector=this.addConnector.bind(this),this.addConnectorMapping=this.addConnectorMapping.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.setFrontmatterLineOffset=this.setFrontmatterLineOffset.bind(this),this.addVertexMapping=this.addVertexMapping.bind(this),this.extendVertexMapping=this.extendVertexMapping.bind(this),this.addEdgeMapping=this.addEdgeMapping.bind(this),this.addSubgraphMapping=this.addSubgraphMapping.bind(this),this.emitWarning=this.emitWarning.bind(this),this.emitError=this.emitError.bind(this),this.getDiagnostics=this.getDiagnostics.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return I1.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const n of this.vertices.values())if(n.id===i)return this.diagramId?`${this.diagramId}-${n.domId}`:n.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,n,r,u,l,c,a={},h,g){if(!i||i.trim().length===0)return;let p;if(h!==void 0){let m;h.includes(`
4
4
  `)?m=h+`
@@ -1 +1 @@
1
- import{a as S}from"./BdWqymET.js";import{aE as l}from"./CJxGDkBm.js";import{g as c}from"./DxuDR3-b.js";import{p as g}from"./D27yNjLf.js";import{d as I}from"./B0Z-1lwJ.js";import{dD as f}from"./BEyxbMng.js";import{B_ as u,i as y,IX as o,gZ as A,vp as m,vq as N,vs as b}from"./BkzMrEqG.js";import{g as D,n as h}from"./CAYSf4zc.js";import{S as W,a as R,n as _}from"./B1Qwlozr.js";import{n as E,o as v}from"./BkNoKwFt.js";const k="intent:onboarding-skip:v1";function P(e){return u.getItem(h(k,e))==="1"}function re(e){P(e)||u.setItem(h(k,e),"1")}function O(e){return e.connections?.hasReceivedList===!0&&P(D(e))}function F(e,a){return e.some(t=>t.id!==y&&t.id!==a&&t.status!=="Archived"&&t.status!=="Deleted")}function j(e,a,t=!1){return t||F(e,a)?"/":"/workspace/new"}function d(e,a){return j(f.select(e),a,O(e))}const se=Object.freeze(Object.defineProperty({__proto__:null,resolveWindowEmptyDestination:d},Symbol.toStringTag,{value:"Module"})),r=new S("WorkspaceNavigation");async function L(e){r.info(`[navigateToAgent] Navigating to agent: ${e}`);const t=l(g).params.id;if(!t){r.error("[navigateToAgent] No workspace ID found in current page params");return}const n=new URL(window.location.href);n.searchParams.set("drawerOpen","1"),n.searchParams.set("drawerType","agent"),n.searchParams.set("selectedAgent",e),n.searchParams.delete("selectedTerminal"),await c(n.toString(),{replaceState:!0}),o.dispatch(m(t,"agent",e))}async function $(e){r.info(`[navigateToTerminal] Navigating to terminal: ${e}`);const t=l(g).params.id;if(!t){r.error("[navigateToTerminal] No workspace ID found in current page params");return}const n=new URL(window.location.href),i=n.searchParams.get("drawerOpen")==="1",s=n.searchParams.get("drawerType")==="terminal";(!i||!s)&&n.searchParams.set("drawerOpen","1"),n.searchParams.set("drawerType","terminal"),n.searchParams.set("selectedTerminal",e),n.searchParams.delete("selectedAgent"),await c(n.toString(),{replaceState:!0}),o.dispatch(m(t,"terminal",e))}function C(e){return!e||!(e instanceof Element)?void 0:e.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0}async function p(e,a){r.info(`[navigateToNote] Navigating to note: ${e}`,a);const t=l(g),n=a?.workspaceId??t.params.id;if(!n){r.error("[navigateToNote] No workspace ID found in current page params");return}o.dispatch(b(n,e,{openInAdjacentPanel:a?.openInAdjacentPanel??!1,openInNewAdjacentPanel:a?.openInNewAdjacentPanel??!1,sourcePanelId:a?.sourcePanelId}))}async function U(e,a,t){r.info(`[navigateToFile] Navigating to file: ${e}${a?` (line ${a})`:""}`,t);const i=l(g).params.id;if(!i){r.error("[navigateToFile] No workspace ID found in current page params");return}o.dispatch(N(i,e,{line:a,openInAdjacentPanel:t?.openInAdjacentPanel??!1,sourcePanelId:t?.sourcePanelId}))}async function B(){r.info("[navigateToSpec] Navigating to workspace spec"),await p("spec")}async function M(){r.info("[closeDrawer] Closing drawer");const a=l(g).params.id;if(!a){r.error("[closeDrawer] No workspace ID found in current page params");return}const t=new URL(window.location.href);t.searchParams.set("drawerOpen","0"),t.searchParams.delete("selectedAgent"),t.searchParams.delete("selectedTerminal"),await c(t.toString(),{replaceState:!0}),o.dispatch(A(a))}async function K(){r.info("[clearMainContent] Clearing main content");const e=new URL(window.location.href);e.searchParams.set("mainContentType","empty"),e.searchParams.delete("selectedNoteId"),e.searchParams.delete("selectedFile"),e.searchParams.delete("line"),await c(e.toString(),{replaceState:!1})}async function G(e,a,t){r.info("[navigateToTask] Navigating to task",{noteId:e,taskPosition:a,taskText:t}),await p(e);const n=()=>{I("scroll-to-task",{noteId:e,taskPosition:a,taskText:t},{bubbles:!0}),r.debug("[navigateToTask] Dispatched scroll-to-task event",{noteId:e,taskPosition:a})},i=[100,300,600];for(const s of i)setTimeout(n,s)}async function H(e){r.info("[navigateToSettings] Navigating to settings",e);const a=new URL("/settings",window.location.origin),t=window.location.pathname.match(/^\/workspace\/([^/]+)/)?.[1],n=t==="new"?void 0:t,i=e?.workspaceId??n;if(e?.tab&&a.searchParams.set("tab",e.tab),e?.specialist&&a.searchParams.set("specialist",e.specialist),e?.view&&a.searchParams.set("view",e.view),i&&a.searchParams.set("workspaceId",i),e?.hash&&(a.hash=e.hash),typeof window<"u"&&window.location.pathname==="/settings"){if(e?.tab||e?.specialist||e?.view||e?.workspaceId){const s=new URL(window.location.href);e?.tab&&s.searchParams.set("tab",e.tab),e?.specialist&&s.searchParams.set("specialist",e.specialist),e?.view&&s.searchParams.set("view",e.view),e?.workspaceId&&s.searchParams.set("workspaceId",e.workspaceId),e?.hash&&(s.hash=e.hash),await c(s.toString(),{replaceState:!0});return}if(e?.hash){const s=`#${e.hash}`;window.location.hash===s&&(window.location.hash=""),window.location.hash=s;return}return}await _(a.pathname+a.search+a.hash)}function T(){const e=typeof sessionStorage>"u"?null:sessionStorage.getItem(W);if(e&&e!=="/"&&!R(e))return e;const a=w();return a?`/workspace/${a.id}`:d(o.state)}async function z(){const e=T();r.info("[navigateBackFromSettings] Navigating back to:",e),await E(e)}function w(e){return f.select(o.state).find(a=>a.id!==e&&a.status!=="Archived"&&a.status!=="Deleted")}async function Y(){const e=w();if(e){r.info("[navigateToFirstWorkspace] Showing workspace:",e.id),await v(e.id);return}const a=d(o.state);r.info("[navigateToFirstWorkspace] Navigating to:",a),await c(a)}async function q(e){const a=w(e);if(a){r.info("[navigateAfterWorkspaceRemoval] Showing workspace:",a.id),await v(a.id);return}const t=d(o.state,e);r.info("[navigateAfterWorkspaceRemoval] Navigating to:",t),await c(t)}const ie=Object.freeze(Object.defineProperty({__proto__:null,clearMainContent:K,closeDrawer:M,findSourcePanelId:C,getSettingsPreviousPath:T,navigateAfterWorkspaceRemoval:q,navigateBackFromSettings:z,navigateToAgent:L,navigateToFile:U,navigateToFirstWorkspace:Y,navigateToNote:p,navigateToSettings:H,navigateToSpec:B,navigateToTask:G,navigateToTerminal:$},Symbol.toStringTag,{value:"Module"}));export{U as a,Y as b,p as c,H as d,G as e,C as f,d as g,ie as h,O as i,z as n,re as r,se as w};
1
+ import{a as S}from"./BdWqymET.js";import{aE as l}from"./CJxGDkBm.js";import{g as c}from"./CytLF-ur.js";import{p as g}from"./B5Pg9_MZ.js";import{d as I}from"./B0Z-1lwJ.js";import{dD as f}from"./BEyxbMng.js";import{B_ as u,i as y,IX as o,gZ as A,vp as m,vq as N,vs as b}from"./BkzMrEqG.js";import{g as D,n as h}from"./CAYSf4zc.js";import{S as W,a as R,n as _}from"./96DwTK9j.js";import{n as E,o as v}from"./D1FSU9Gk.js";const k="intent:onboarding-skip:v1";function P(e){return u.getItem(h(k,e))==="1"}function re(e){P(e)||u.setItem(h(k,e),"1")}function O(e){return e.connections?.hasReceivedList===!0&&P(D(e))}function F(e,a){return e.some(t=>t.id!==y&&t.id!==a&&t.status!=="Archived"&&t.status!=="Deleted")}function j(e,a,t=!1){return t||F(e,a)?"/":"/workspace/new"}function d(e,a){return j(f.select(e),a,O(e))}const se=Object.freeze(Object.defineProperty({__proto__:null,resolveWindowEmptyDestination:d},Symbol.toStringTag,{value:"Module"})),r=new S("WorkspaceNavigation");async function L(e){r.info(`[navigateToAgent] Navigating to agent: ${e}`);const t=l(g).params.id;if(!t){r.error("[navigateToAgent] No workspace ID found in current page params");return}const n=new URL(window.location.href);n.searchParams.set("drawerOpen","1"),n.searchParams.set("drawerType","agent"),n.searchParams.set("selectedAgent",e),n.searchParams.delete("selectedTerminal"),await c(n.toString(),{replaceState:!0}),o.dispatch(m(t,"agent",e))}async function $(e){r.info(`[navigateToTerminal] Navigating to terminal: ${e}`);const t=l(g).params.id;if(!t){r.error("[navigateToTerminal] No workspace ID found in current page params");return}const n=new URL(window.location.href),i=n.searchParams.get("drawerOpen")==="1",s=n.searchParams.get("drawerType")==="terminal";(!i||!s)&&n.searchParams.set("drawerOpen","1"),n.searchParams.set("drawerType","terminal"),n.searchParams.set("selectedTerminal",e),n.searchParams.delete("selectedAgent"),await c(n.toString(),{replaceState:!0}),o.dispatch(m(t,"terminal",e))}function C(e){return!e||!(e instanceof Element)?void 0:e.closest("[data-panel-id]")?.getAttribute("data-panel-id")??void 0}async function p(e,a){r.info(`[navigateToNote] Navigating to note: ${e}`,a);const t=l(g),n=a?.workspaceId??t.params.id;if(!n){r.error("[navigateToNote] No workspace ID found in current page params");return}o.dispatch(b(n,e,{openInAdjacentPanel:a?.openInAdjacentPanel??!1,openInNewAdjacentPanel:a?.openInNewAdjacentPanel??!1,sourcePanelId:a?.sourcePanelId}))}async function U(e,a,t){r.info(`[navigateToFile] Navigating to file: ${e}${a?` (line ${a})`:""}`,t);const i=l(g).params.id;if(!i){r.error("[navigateToFile] No workspace ID found in current page params");return}o.dispatch(N(i,e,{line:a,openInAdjacentPanel:t?.openInAdjacentPanel??!1,sourcePanelId:t?.sourcePanelId}))}async function B(){r.info("[navigateToSpec] Navigating to workspace spec"),await p("spec")}async function M(){r.info("[closeDrawer] Closing drawer");const a=l(g).params.id;if(!a){r.error("[closeDrawer] No workspace ID found in current page params");return}const t=new URL(window.location.href);t.searchParams.set("drawerOpen","0"),t.searchParams.delete("selectedAgent"),t.searchParams.delete("selectedTerminal"),await c(t.toString(),{replaceState:!0}),o.dispatch(A(a))}async function K(){r.info("[clearMainContent] Clearing main content");const e=new URL(window.location.href);e.searchParams.set("mainContentType","empty"),e.searchParams.delete("selectedNoteId"),e.searchParams.delete("selectedFile"),e.searchParams.delete("line"),await c(e.toString(),{replaceState:!1})}async function G(e,a,t){r.info("[navigateToTask] Navigating to task",{noteId:e,taskPosition:a,taskText:t}),await p(e);const n=()=>{I("scroll-to-task",{noteId:e,taskPosition:a,taskText:t},{bubbles:!0}),r.debug("[navigateToTask] Dispatched scroll-to-task event",{noteId:e,taskPosition:a})},i=[100,300,600];for(const s of i)setTimeout(n,s)}async function H(e){r.info("[navigateToSettings] Navigating to settings",e);const a=new URL("/settings",window.location.origin),t=window.location.pathname.match(/^\/workspace\/([^/]+)/)?.[1],n=t==="new"?void 0:t,i=e?.workspaceId??n;if(e?.tab&&a.searchParams.set("tab",e.tab),e?.specialist&&a.searchParams.set("specialist",e.specialist),e?.view&&a.searchParams.set("view",e.view),i&&a.searchParams.set("workspaceId",i),e?.hash&&(a.hash=e.hash),typeof window<"u"&&window.location.pathname==="/settings"){if(e?.tab||e?.specialist||e?.view||e?.workspaceId){const s=new URL(window.location.href);e?.tab&&s.searchParams.set("tab",e.tab),e?.specialist&&s.searchParams.set("specialist",e.specialist),e?.view&&s.searchParams.set("view",e.view),e?.workspaceId&&s.searchParams.set("workspaceId",e.workspaceId),e?.hash&&(s.hash=e.hash),await c(s.toString(),{replaceState:!0});return}if(e?.hash){const s=`#${e.hash}`;window.location.hash===s&&(window.location.hash=""),window.location.hash=s;return}return}await _(a.pathname+a.search+a.hash)}function T(){const e=typeof sessionStorage>"u"?null:sessionStorage.getItem(W);if(e&&e!=="/"&&!R(e))return e;const a=w();return a?`/workspace/${a.id}`:d(o.state)}async function z(){const e=T();r.info("[navigateBackFromSettings] Navigating back to:",e),await E(e)}function w(e){return f.select(o.state).find(a=>a.id!==e&&a.status!=="Archived"&&a.status!=="Deleted")}async function Y(){const e=w();if(e){r.info("[navigateToFirstWorkspace] Showing workspace:",e.id),await v(e.id);return}const a=d(o.state);r.info("[navigateToFirstWorkspace] Navigating to:",a),await c(a)}async function q(e){const a=w(e);if(a){r.info("[navigateAfterWorkspaceRemoval] Showing workspace:",a.id),await v(a.id);return}const t=d(o.state,e);r.info("[navigateAfterWorkspaceRemoval] Navigating to:",t),await c(t)}const ie=Object.freeze(Object.defineProperty({__proto__:null,clearMainContent:K,closeDrawer:M,findSourcePanelId:C,getSettingsPreviousPath:T,navigateAfterWorkspaceRemoval:q,navigateBackFromSettings:z,navigateToAgent:L,navigateToFile:U,navigateToFirstWorkspace:Y,navigateToNote:p,navigateToSettings:H,navigateToSpec:B,navigateToTask:G,navigateToTerminal:$},Symbol.toStringTag,{value:"Module"}));export{U as a,Y as b,p as c,H as d,G as e,C as f,d as g,ie as h,O as i,z as n,re as r,se as w};
@@ -1 +1 @@
1
- import{t as T,bo as r,bw as W,bq as S,b as $,bs as x}from"./AeC4KVgG.js";import{bs as B,cd as C,ca as q,a7 as u,ay as f,W as k,bn as D,aA as o}from"./CJxGDkBm.js";import{i as H}from"./k2awEenT.js";import{k as L}from"./HftJbvyF.js";import{a as X}from"./kcZjzSP7.js";import{ds as j}from"./BEyxbMng.js";import{IX as z,gS as E}from"./BkzMrEqG.js";function F(i,t){if(new.target)return T({component:F,...i});B(t,!0);const d=()=>x(g,"$workspace$",b),[b,w]=S();let c=r(t,"tab",7),a=r(t,"workspaceId",7),n=r(t,"layoutId",7),p=r(t,"isActive",7);const m=C(a());q(()=>m.set(a()));const g=j(m);var v={get tab(){return c()},set tab(e){c(e),o()},get workspaceId(){return a()},set workspaceId(e){a(e),o()},get layoutId(){return n()},set layoutId(e){n(e),o()},get isActive(){return p()},set isActive(e){p(e),o()},$set:W,$on:(e,s)=>$(t,e,s)},l=u(),_=f(l);{var y=e=>{var s=u(),A=f(s);L(A,a,h=>{X(h,{get workspace(){return d()},showBackToList:!1,onclose:()=>z.dispatch(E(n()??a(),c().id))})}),k(e,s)};H(_,e=>{p()&&d()&&e(y)})}k(i,l);var I=D(v);return w(),I}export{F as default};
1
+ import{t as T,bo as r,bw as W,bq as S,b as $,bs as x}from"./AeC4KVgG.js";import{bs as B,cd as C,ca as q,a7 as u,ay as f,W as k,bn as D,aA as o}from"./CJxGDkBm.js";import{i as H}from"./k2awEenT.js";import{k as L}from"./HftJbvyF.js";import{a as X}from"./0_7FQkiC.js";import{ds as j}from"./BEyxbMng.js";import{IX as z,gS as E}from"./BkzMrEqG.js";function F(i,t){if(new.target)return T({component:F,...i});B(t,!0);const d=()=>x(g,"$workspace$",b),[b,w]=S();let c=r(t,"tab",7),a=r(t,"workspaceId",7),n=r(t,"layoutId",7),p=r(t,"isActive",7);const m=C(a());q(()=>m.set(a()));const g=j(m);var v={get tab(){return c()},set tab(e){c(e),o()},get workspaceId(){return a()},set workspaceId(e){a(e),o()},get layoutId(){return n()},set layoutId(e){n(e),o()},get isActive(){return p()},set isActive(e){p(e),o()},$set:W,$on:(e,s)=>$(t,e,s)},l=u(),_=f(l);{var y=e=>{var s=u(),A=f(s);L(A,a,h=>{X(h,{get workspace(){return d()},showBackToList:!1,onclose:()=>z.dispatch(E(n()??a(),c().id))})}),k(e,s)};H(_,e=>{p()&&d()&&e(y)})}k(i,l);var I=D(v);return w(),I}export{F as default};
@@ -1,4 +1,4 @@
1
- import{b as p,ay as C,aX as H,W as _,r as q,a6 as G,B as U,aV as j,X as K}from"./CTNuszHC.js";var A="",M="",O="",D=[],b=new Map,v=p(e=>j(e,K()),"sanitizeText"),y=p(e=>{switch(e.type){case"terminal":return{...e,value:v(e.value)};case"nonterminal":return{...e,name:v(e.name)};case"sequence":return{...e,elements:e.elements.map(y)};case"choice":return{...e,alternatives:e.alternatives.map(y)};case"optional":return{...e,element:y(e.element)};case"repetition":return{...e,element:y(e.element),separator:e.separator?y(e.separator):void 0};case"special":return{...e,text:v(e.text)}}},"sanitizeAstNode"),J=p(()=>{A="",M="",O="",D.length=0,b.clear(),q(),C.debug("[Railroad] Database cleared")},"clear"),Y=p(e=>{A=v(e),C.debug("[Railroad] Title set:",e)},"setTitle"),P=p(()=>A,"getTitle"),Q=p(e=>{const i={...e,name:v(e.name),definition:y(e.definition),comment:e.comment?v(e.comment):void 0};C.debug("[Railroad] Adding rule:",i.name),b.has(i.name)&&C.warn(`[Railroad] Rule '${i.name}' is already defined. Overwriting.`),D.push(i),b.set(i.name,i)},"addRule"),Z=p(()=>D,"getRules"),V=p(e=>b.get(e),"getRule"),ee=p(e=>{M=v(e).replace(/^\s+/g,""),C.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),te=p(()=>M,"getAccTitle"),re=p(e=>{O=v(e).replace(/\n\s+/g,`
1
+ import{b as p,ay as C,aX as H,W as _,r as q,a6 as G,B as U,aV as j,X as K}from"./C9otdzZM.js";var A="",M="",O="",D=[],b=new Map,v=p(e=>j(e,K()),"sanitizeText"),y=p(e=>{switch(e.type){case"terminal":return{...e,value:v(e.value)};case"nonterminal":return{...e,name:v(e.name)};case"sequence":return{...e,elements:e.elements.map(y)};case"choice":return{...e,alternatives:e.alternatives.map(y)};case"optional":return{...e,element:y(e.element)};case"repetition":return{...e,element:y(e.element),separator:e.separator?y(e.separator):void 0};case"special":return{...e,text:v(e.text)}}},"sanitizeAstNode"),J=p(()=>{A="",M="",O="",D.length=0,b.clear(),q(),C.debug("[Railroad] Database cleared")},"clear"),Y=p(e=>{A=v(e),C.debug("[Railroad] Title set:",e)},"setTitle"),P=p(()=>A,"getTitle"),Q=p(e=>{const i={...e,name:v(e.name),definition:y(e.definition),comment:e.comment?v(e.comment):void 0};C.debug("[Railroad] Adding rule:",i.name),b.has(i.name)&&C.warn(`[Railroad] Rule '${i.name}' is already defined. Overwriting.`),D.push(i),b.set(i.name,i)},"addRule"),Z=p(()=>D,"getRules"),V=p(e=>b.get(e),"getRule"),ee=p(e=>{M=v(e).replace(/^\s+/g,""),C.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),te=p(()=>M,"getAccTitle"),re=p(e=>{O=v(e).replace(/\n\s+/g,`
2
2
  `),C.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),ie=p(()=>O,"getAccDescription"),ae=Y,ne=P,oe={clear:J,setTitle:Y,getTitle:P,addRule:Q,getRules:Z,getRule:V,setAccTitle:ee,getAccTitle:te,setAccDescription:re,getAccDescription:ie,setDiagramTitle:ae,getDiagramTitle:ne},f={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},le=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,se=/^[\w "',.-]+$/,de=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),L=p(e=>e?Object.keys(e).every(i=>i==="railroad"||de.has(i)):!1,"isRailroadStyleOptions"),ce=p(e=>e?"railroad"in e&&e.railroad?e.railroad:L(e)?e:{}:{},"extractRailroadOverrides"),me=p(e=>{if(!e||L(e))return{};const{railroad:i,svgId:n,theme:a,look:t,...r}=e;return r},"extractThemeOverrides"),m=p((e,i)=>{if(typeof e!="string")return i;const n=e.trim();return le.test(n)?n:i},"sanitizeColorValue"),X=p((e,i)=>{if(typeof e!="string")return i;const n=e.trim();return se.test(n)?n:i},"sanitizeFontFamilyValue"),F=p((e,i)=>{const n=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(n)&&n>=0?n:i},"sanitizeNumberValue"),he=p(e=>{const i=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(i)&&i>0?i:void 0},"parseThemeFontSize"),pe=p(e=>{const i=X(e.fontFamily,f.fontFamily),n=he(e.fontSize)??f.fontSize;return{...f,fontFamily:i,fontSize:n,terminalFill:m(e.secondBkg??e.secondaryColor,f.terminalFill),terminalStroke:m(e.secondaryBorderColor??e.lineColor,f.terminalStroke),terminalTextColor:m(e.secondaryTextColor??e.textColor,f.terminalTextColor),nonTerminalFill:m(e.mainBkg??e.background,f.nonTerminalFill),nonTerminalStroke:m(e.primaryBorderColor??e.lineColor,f.nonTerminalStroke),nonTerminalTextColor:m(e.primaryTextColor??e.textColor,f.nonTerminalTextColor),lineColor:m(e.lineColor,f.lineColor),markerFill:m(e.lineColor,f.markerFill),commentFill:m(e.labelBackground??e.tertiaryColor,f.commentFill),commentStroke:m(e.tertiaryBorderColor??e.lineColor,f.commentStroke),commentTextColor:m(e.tertiaryTextColor??e.textColor,f.commentTextColor),specialFill:m(e.tertiaryColor??e.secondaryColor,f.specialFill),specialStroke:m(e.tertiaryBorderColor??e.secondaryBorderColor,f.specialStroke),ruleNameColor:m(e.titleColor??e.textColor,f.ruleNameColor)}},"buildThemeDefaults"),E=p(e=>{const i=_(),n={...G(),...i.themeVariables??{},...me(e)},a=pe(n),t={...i.railroad??{},...ce(e)};return{compactMode:t.compactMode??a.compactMode,padding:F(t.padding,a.padding),verticalSeparation:F(t.verticalSeparation,a.verticalSeparation),horizontalSeparation:F(t.horizontalSeparation,a.horizontalSeparation),arcRadius:F(t.arcRadius,a.arcRadius),fontSize:F(t.fontSize,a.fontSize),fontFamily:X(t.fontFamily,a.fontFamily),terminalFill:m(t.terminalFill,a.terminalFill),terminalStroke:m(t.terminalStroke,a.terminalStroke),terminalTextColor:m(t.terminalTextColor,a.terminalTextColor),nonTerminalFill:m(t.nonTerminalFill,a.nonTerminalFill),nonTerminalStroke:m(t.nonTerminalStroke,a.nonTerminalStroke),nonTerminalTextColor:m(t.nonTerminalTextColor,a.nonTerminalTextColor),lineColor:m(t.lineColor,a.lineColor),strokeWidth:F(t.strokeWidth,a.strokeWidth),markerFill:m(t.markerFill,a.markerFill),commentFill:m(t.commentFill,a.commentFill),commentStroke:m(t.commentStroke,a.commentStroke),commentTextColor:m(t.commentTextColor,a.commentTextColor),specialFill:m(t.specialFill,a.specialFill),specialStroke:m(t.specialStroke,a.specialStroke),ruleNameColor:m(t.ruleNameColor,a.ruleNameColor),showMarkers:t.showMarkers??a.showMarkers,markerRadius:F(t.markerRadius,a.markerRadius)}},"buildRailroadStyleOptions"),Te=p(e=>{const{fontFamily:i,fontSize:n,terminalFill:a,terminalStroke:t,terminalTextColor:r,nonTerminalFill:o,nonTerminalStroke:g,nonTerminalTextColor:l,lineColor:s,strokeWidth:h,markerFill:u,commentFill:c,commentStroke:w,commentTextColor:d,specialFill:T,specialStroke:z,ruleNameColor:S}=E(e);return`
3
3
  .railroad-diagram {
4
4
  font-family: ${i};