@agent-workshop/adoc-webapp 0.1.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 (204) hide show
  1. package/LICENSE +5 -0
  2. package/THIRD_PARTY_NOTICES.md +49 -0
  3. package/dist/assets/app.css +406 -0
  4. package/dist/assets/app.js +201 -0
  5. package/dist/assets/chunks/abnfDiagram-YUKMZFIV-UTBMKFXS.js +1 -0
  6. package/dist/assets/chunks/architecture-WOLXFQ4H-S6WNHT5H.js +1 -0
  7. package/dist/assets/chunks/architectureDiagram-47P4ROYG-SQCOEPXG.js +36 -0
  8. package/dist/assets/chunks/blockDiagram-E7TT5TSB-F5DSMBHI.js +140 -0
  9. package/dist/assets/chunks/c4Diagram-CRA5TL53-G4W35RYC.js +38 -0
  10. package/dist/assets/chunks/chunk-2TCGAX73.js +1 -0
  11. package/dist/assets/chunks/chunk-35SWHG2Z.js +1 -0
  12. package/dist/assets/chunks/chunk-4UKVVSLZ.js +2 -0
  13. package/dist/assets/chunks/chunk-56PLA4MI.js +1 -0
  14. package/dist/assets/chunks/chunk-6QSLXF4I.js +1 -0
  15. package/dist/assets/chunks/chunk-7DQROAU7.js +1 -0
  16. package/dist/assets/chunks/chunk-7FXP6RHI.js +1 -0
  17. package/dist/assets/chunks/chunk-7ITQOSYJ.js +15 -0
  18. package/dist/assets/chunks/chunk-7W3KTJUJ.js +1 -0
  19. package/dist/assets/chunks/chunk-ABLFMIK7.js +1 -0
  20. package/dist/assets/chunks/chunk-AVITUR4K.js +1 -0
  21. package/dist/assets/chunks/chunk-AVJJGJEF.js +1 -0
  22. package/dist/assets/chunks/chunk-BYKZQKZN.js +1 -0
  23. package/dist/assets/chunks/chunk-CBAFHIQV.js +213 -0
  24. package/dist/assets/chunks/chunk-CMFTFM5L.js +1 -0
  25. package/dist/assets/chunks/chunk-E2AIA637.js +14 -0
  26. package/dist/assets/chunks/chunk-ENUKY65A.js +72 -0
  27. package/dist/assets/chunks/chunk-EPS7YYLR.js +2 -0
  28. package/dist/assets/chunks/chunk-FDHLSHAZ.js +1 -0
  29. package/dist/assets/chunks/chunk-GBOXGTKU.js +1 -0
  30. package/dist/assets/chunks/chunk-GDF64WIG.js +1 -0
  31. package/dist/assets/chunks/chunk-GTJDAHEV.js +2 -0
  32. package/dist/assets/chunks/chunk-H57PPMTP.js +1 -0
  33. package/dist/assets/chunks/chunk-HHYS5L3R.js +1 -0
  34. package/dist/assets/chunks/chunk-INV6BDXO.js +2 -0
  35. package/dist/assets/chunks/chunk-IR3NHMOO.js +1 -0
  36. package/dist/assets/chunks/chunk-KLF2A562.js +1 -0
  37. package/dist/assets/chunks/chunk-LZTAJOGZ.js +1 -0
  38. package/dist/assets/chunks/chunk-M3XBBO6R.js +135 -0
  39. package/dist/assets/chunks/chunk-NBZPV65B.js +62 -0
  40. package/dist/assets/chunks/chunk-NCTJNXDF.js +1 -0
  41. package/dist/assets/chunks/chunk-O4U2B2FP.js +339 -0
  42. package/dist/assets/chunks/chunk-OB665XPY.js +1 -0
  43. package/dist/assets/chunks/chunk-OFD4YTIR.js +10 -0
  44. package/dist/assets/chunks/chunk-PHKIAKHS.js +1 -0
  45. package/dist/assets/chunks/chunk-R4OZRASH.js +32 -0
  46. package/dist/assets/chunks/chunk-UAGOPMXU.js +1 -0
  47. package/dist/assets/chunks/chunk-UAQETDSH.js +3 -0
  48. package/dist/assets/chunks/chunk-UORYZEAD.js +1 -0
  49. package/dist/assets/chunks/chunk-W4ELJFHG.js +1 -0
  50. package/dist/assets/chunks/chunk-WBPRABWA.js +136 -0
  51. package/dist/assets/chunks/chunk-XISCFCXG.js +88 -0
  52. package/dist/assets/chunks/chunk-XLJVPE6C.js +1 -0
  53. package/dist/assets/chunks/chunk-XQHNSJKC.js +1 -0
  54. package/dist/assets/chunks/chunk-XYDA52BE.js +1 -0
  55. package/dist/assets/chunks/chunk-YAHQK6MQ.js +1 -0
  56. package/dist/assets/chunks/chunk-ZGUCZDEK.js +1 -0
  57. package/dist/assets/chunks/chunk-ZRBDUQXP.js +1 -0
  58. package/dist/assets/chunks/classDiagram-v2-K4WV4PDN-EMBTPOHC.js +217 -0
  59. package/dist/assets/chunks/cose-bilkent-JH36ORCC-CNYFETCT.js +1 -0
  60. package/dist/assets/chunks/cynefin-EF2NZ3EQ-2AP5N5QY.js +1 -0
  61. package/dist/assets/chunks/cynefinDiagram-3GCD6N5R-WVTLESK3.js +62 -0
  62. package/dist/assets/chunks/dagre-W4DXFKR2-FPRZGQVB.js +4 -0
  63. package/dist/assets/chunks/diagram-2UJZ2QOL-VPSSQLZN.js +200 -0
  64. package/dist/assets/chunks/diagram-OVF4WLC6-PZ2RN37Y.js +24 -0
  65. package/dist/assets/chunks/diagram-PFPMY2P6-5GPN6RRZ.js +30 -0
  66. package/dist/assets/chunks/diagram-UMYRVEAY-OHFOPEFR.js +24 -0
  67. package/dist/assets/chunks/diagram-YEKJPTXX-PFA7KRZC.js +41 -0
  68. package/dist/assets/chunks/diagram-ZIFT7M5P-XOPZR7XN.js +3 -0
  69. package/dist/assets/chunks/ebnfDiagram-VR2GEFS7-MAGCN3HN.js +1 -0
  70. package/dist/assets/chunks/elk-IJKZMXRS-FZ2NQWIX.js +27 -0
  71. package/dist/assets/chunks/erDiagram-O2IAPWRE-746JHX2P.js +99 -0
  72. package/dist/assets/chunks/eventmodeling-K75KTNOO-FKRVI4N2.js +1 -0
  73. package/dist/assets/chunks/flowDiagram-OXPTDLAJ-XYHRK7XD.js +1 -0
  74. package/dist/assets/chunks/ganttDiagram-R7TSEDQI-DN5XENJA.js +292 -0
  75. package/dist/assets/chunks/gitGraph-VSP46ZUC-YT36MSRW.js +1 -0
  76. package/dist/assets/chunks/gitGraphDiagram-XJZIOB7I-NXP267LJ.js +106 -0
  77. package/dist/assets/chunks/info-OHQRW6UA-BRTC44VB.js +1 -0
  78. package/dist/assets/chunks/infoDiagram-5W2HQ5XZ-RT6YEU7N.js +2 -0
  79. package/dist/assets/chunks/ishikawaDiagram-K3B6WC7H-EJP5H2KV.js +70 -0
  80. package/dist/assets/chunks/journeyDiagram-COXZFDF6-M6MBFVND.js +139 -0
  81. package/dist/assets/chunks/kanban-definition-P3RFRI5V-WBYRNWVT.js +89 -0
  82. package/dist/assets/chunks/katex-42FXWECD.js +257 -0
  83. package/dist/assets/chunks/mermaid.core-SMXJOLYJ.js +18 -0
  84. package/dist/assets/chunks/mindmap-definition-LZFPQGKD-KVJVOCR5.js +96 -0
  85. package/dist/assets/chunks/packet-JDAUHWVQ-SGFXPYMB.js +1 -0
  86. package/dist/assets/chunks/pegDiagram-BGZESJAR-ECEGDREM.js +1 -0
  87. package/dist/assets/chunks/pie-XZMESJXO-LSQBPXPC.js +1 -0
  88. package/dist/assets/chunks/pieDiagram-CAPJLFHJ-D75MPXOK.js +39 -0
  89. package/dist/assets/chunks/quadrantDiagram-GDMTTRAM-HMUXMSEH.js +7 -0
  90. package/dist/assets/chunks/radar-ABXABTNO-TPYHBLNO.js +1 -0
  91. package/dist/assets/chunks/railroad-I3PHUGI6-WWIXL3LY.js +1 -0
  92. package/dist/assets/chunks/railroad-abnf-LNEFI6M7-DHJUY4R6.js +1 -0
  93. package/dist/assets/chunks/railroad-ebnf-DWYD2UWJ-4OJ4ECXX.js +1 -0
  94. package/dist/assets/chunks/railroad-peg-JR7BVNR7-VUOBDVLQ.js +1 -0
  95. package/dist/assets/chunks/railroadDiagram-SM67HX2B-Z757I54E.js +1 -0
  96. package/dist/assets/chunks/requirementDiagram-X7JNWC4A-7BW46JLY.js +84 -0
  97. package/dist/assets/chunks/sankeyDiagram-UM26HJRW-273BIID3.js +40 -0
  98. package/dist/assets/chunks/sequenceDiagram-ZO4K6R2Y-KG23HXTI.js +169 -0
  99. package/dist/assets/chunks/sizeCapture-INFHLROL-5N3POCQZ.js +1 -0
  100. package/dist/assets/chunks/stateDiagram-v2-TBUQTH76-AIML3PSW.js +291 -0
  101. package/dist/assets/chunks/swimlanes-N4OXWK64-TBFQZWAR.js +1 -0
  102. package/dist/assets/chunks/swimlanesDiagram-K3J5GTZL-TREAP6RB.js +8 -0
  103. package/dist/assets/chunks/timeline-definition-YOQAKGHF-QHTD5EBR.js +120 -0
  104. package/dist/assets/chunks/treeView-D4JQ5SDB-JJEYBPMW.js +1 -0
  105. package/dist/assets/chunks/treemap-SAJKECNS-I3YRCM2B.js +1 -0
  106. package/dist/assets/chunks/usecaseDiagram-VIAY4XPW-GNNFV4RS.js +370 -0
  107. package/dist/assets/chunks/vennDiagram-BLWOH2XV-YE23JXYX.js +34 -0
  108. package/dist/assets/chunks/wardley-7MLQ67FV-AKOGXXNF.js +1 -0
  109. package/dist/assets/chunks/wardleyDiagram-YMQ3BMBF-D7XYLZCZ.js +78 -0
  110. package/dist/assets/chunks/xychartDiagram-TAQBALBS-AT4Y7JWY.js +7 -0
  111. package/dist/assets/fonts/D2Coding-Bold.woff2 +0 -0
  112. package/dist/assets/fonts/D2Coding-OFL.txt +97 -0
  113. package/dist/assets/fonts/D2Coding.woff2 +0 -0
  114. package/dist/assets/fonts/Pretendard-LICENSE.txt +94 -0
  115. package/dist/assets/fonts/PretendardVariable.woff2 +0 -0
  116. package/dist/assets/fonts/SymbolsNerdFont-LICENSE.txt +21 -0
  117. package/dist/assets/fonts/SymbolsNerdFontMono.woff2 +0 -0
  118. package/dist/assets/xterm.css +285 -0
  119. package/dist/index.html +14 -0
  120. package/dist/licenses/@braintree__sanitize-url@7.1.2/LICENSE +21 -0
  121. package/dist/licenses/@chevrotain__cst-dts-gen@13.2.0/LICENSE.txt +202 -0
  122. package/dist/licenses/@chevrotain__gast@13.2.0/LICENSE.txt +202 -0
  123. package/dist/licenses/@chevrotain__regexp-to-ast@13.2.0/LICENSE.txt +202 -0
  124. package/dist/licenses/@chevrotain__utils@13.2.0/LICENSE.txt +202 -0
  125. package/dist/licenses/@iconify__utils@3.1.7/license.txt +21 -0
  126. package/dist/licenses/@mermaid-js__parser@2.0.1/LICENSE +21 -0
  127. package/dist/licenses/@remix-run__route-pattern@0.22.1/LICENSE +21 -0
  128. package/dist/licenses/@upsetjs__venn.js@2.0.0/LICENSE +22 -0
  129. package/dist/licenses/@xterm__addon-fit@0.11.0/LICENSE +19 -0
  130. package/dist/licenses/@xterm__xterm@6.0.0/LICENSE +21 -0
  131. package/dist/licenses/chevrotain@13.2.0/LICENSE.txt +202 -0
  132. package/dist/licenses/cookie-es@3.1.1/LICENSE +28 -0
  133. package/dist/licenses/cose-base@1.0.3/LICENSE +21 -0
  134. package/dist/licenses/cose-base@2.2.0/LICENSE +21 -0
  135. package/dist/licenses/cytoscape-cose-bilkent@4.1.0/LICENSE +21 -0
  136. package/dist/licenses/cytoscape-fcose@2.2.0/LICENSE +19 -0
  137. package/dist/licenses/cytoscape@3.34.3/LICENSE +19 -0
  138. package/dist/licenses/cytoscape@3.34.3/license-update.mjs +32 -0
  139. package/dist/licenses/d3-array@2.12.1/LICENSE +27 -0
  140. package/dist/licenses/d3-array@3.2.4/LICENSE +13 -0
  141. package/dist/licenses/d3-axis@3.0.0/LICENSE +13 -0
  142. package/dist/licenses/d3-brush@3.0.0/LICENSE +13 -0
  143. package/dist/licenses/d3-chord@3.0.1/LICENSE +13 -0
  144. package/dist/licenses/d3-color@3.1.0/LICENSE +13 -0
  145. package/dist/licenses/d3-contour@4.0.2/LICENSE +13 -0
  146. package/dist/licenses/d3-delaunay@6.0.4/LICENSE +14 -0
  147. package/dist/licenses/d3-dispatch@3.0.1/LICENSE +13 -0
  148. package/dist/licenses/d3-drag@3.0.0/LICENSE +13 -0
  149. package/dist/licenses/d3-dsv@3.0.1/LICENSE +13 -0
  150. package/dist/licenses/d3-ease@3.0.1/LICENSE +28 -0
  151. package/dist/licenses/d3-fetch@3.0.1/LICENSE +13 -0
  152. package/dist/licenses/d3-force@3.0.0/LICENSE +13 -0
  153. package/dist/licenses/d3-format@3.1.2/LICENSE +13 -0
  154. package/dist/licenses/d3-geo@3.1.1/LICENSE +34 -0
  155. package/dist/licenses/d3-hierarchy@3.1.2/LICENSE +13 -0
  156. package/dist/licenses/d3-interpolate@3.0.1/LICENSE +13 -0
  157. package/dist/licenses/d3-path@1.0.9/LICENSE +27 -0
  158. package/dist/licenses/d3-path@3.1.0/LICENSE +13 -0
  159. package/dist/licenses/d3-polygon@3.0.1/LICENSE +13 -0
  160. package/dist/licenses/d3-quadtree@3.0.1/LICENSE +13 -0
  161. package/dist/licenses/d3-random@3.0.1/LICENSE +13 -0
  162. package/dist/licenses/d3-sankey@0.12.3/LICENSE +27 -0
  163. package/dist/licenses/d3-scale-chromatic@3.1.0/LICENSE +28 -0
  164. package/dist/licenses/d3-scale@4.0.2/LICENSE +13 -0
  165. package/dist/licenses/d3-selection@3.0.0/LICENSE +13 -0
  166. package/dist/licenses/d3-shape@1.3.7/LICENSE +27 -0
  167. package/dist/licenses/d3-shape@3.2.0/LICENSE +13 -0
  168. package/dist/licenses/d3-time-format@4.1.0/LICENSE +13 -0
  169. package/dist/licenses/d3-time@3.1.0/LICENSE +13 -0
  170. package/dist/licenses/d3-timer@3.0.1/LICENSE +13 -0
  171. package/dist/licenses/d3-transition@3.0.1/LICENSE +13 -0
  172. package/dist/licenses/d3-zoom@3.0.0/LICENSE +13 -0
  173. package/dist/licenses/d3@7.9.0/LICENSE +13 -0
  174. package/dist/licenses/dagre-d3-es@7.0.14/LICENSE.md +23 -0
  175. package/dist/licenses/dayjs@1.11.23/LICENSE +21 -0
  176. package/dist/licenses/delaunator@5.1.0/LICENSE +15 -0
  177. package/dist/licenses/dompurify@3.4.16/LICENSE +202 -0
  178. package/dist/licenses/dompurify@3.4.16/LICENSE-MPL +373 -0
  179. package/dist/licenses/elkjs@0.9.3/LICENSE.md +264 -0
  180. package/dist/licenses/es-toolkit@1.52.0/LICENSE +21 -0
  181. package/dist/licenses/es-toolkit@1.52.0/NOTICE +39 -0
  182. package/dist/licenses/internmap@1.0.1/LICENSE +13 -0
  183. package/dist/licenses/internmap@2.0.3/LICENSE +13 -0
  184. package/dist/licenses/katex@0.16.47/LICENSE +21 -0
  185. package/dist/licenses/khroma@2.1.0/license +21 -0
  186. package/dist/licenses/layout-base@1.0.2/LICENSE +21 -0
  187. package/dist/licenses/layout-base@2.0.1/LICENSE +21 -0
  188. package/dist/licenses/lodash-es@4.18.1/LICENSE +47 -0
  189. package/dist/licenses/lucide-react@1.50.0/LICENSE +43 -0
  190. package/dist/licenses/lucide-react@1.50.0/copyright.mjs +22 -0
  191. package/dist/licenses/marked@16.4.2/LICENSE.md +44 -0
  192. package/dist/licenses/mermaid@12.1.0/LICENSE +21 -0
  193. package/dist/licenses/packages.json +945 -0
  194. package/dist/licenses/pretendard@1.3.9/LICENSE.txt +94 -0
  195. package/dist/licenses/react-dom@19.3.0/LICENSE +21 -0
  196. package/dist/licenses/react-router@8.4.0/LICENSE.md +23 -0
  197. package/dist/licenses/react@19.3.0/LICENSE +21 -0
  198. package/dist/licenses/robust-predicates@3.0.3/LICENSE +24 -0
  199. package/dist/licenses/roughjs@4.6.6/LICENSE +21 -0
  200. package/dist/licenses/scheduler@0.28.0/LICENSE +21 -0
  201. package/dist/licenses/stylis@4.4.0/LICENSE +21 -0
  202. package/dist/licenses/ts-dedent@2.3.0/LICENSE +21 -0
  203. package/dist/licenses/uuid@14.0.2/LICENSE.md +9 -0
  204. package/package.json +44 -0
@@ -0,0 +1,34 @@
1
+ import{a as Pt}from"./chunk-LZTAJOGZ.js";import{a as Bt}from"./chunk-NCTJNXDF.js";import{p as Vt}from"./chunk-GTJDAHEV.js";import"./chunk-XLJVPE6C.js";import{C as ct,P as Dt,U as Rt,V as Ct,W as Nt,X as Ot,Y as Lt,Z as Ft,_ as jt,c as Et,d as Tt,e as zt,f as lt,r as At}from"./chunk-M3XBBO6R.js";import{h as it}from"./chunk-W4ELJFHG.js";import{a as w}from"./chunk-UAGOPMXU.js";import"./chunk-PHKIAKHS.js";function rt(t,n){let s=fe(t),e=s.filter(l=>ue(l,t)),i=0,r=0,o=[];if(e.length>1){let l=Wt(e);for(let u=0;u<e.length;++u){let a=e[u];a.angle=Math.atan2(a.x-l.x,a.y-l.y)}e.sort((u,a)=>a.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){let a=e[u];r+=(f.x+a.x)*(a.y-f.y);let y={x:(a.x+f.x)/2,y:(a.y+f.y)/2},d=null;for(let b=0;b<a.parentIndex.length;++b)if(f.parentIndex.includes(a.parentIndex[b])){let p=t[a.parentIndex[b]],M=Math.atan2(a.x-p.x,a.y-p.y),T=Math.atan2(f.x-p.x,f.y-p.y),_=T-M;_<0&&(_+=2*Math.PI);let S=T-_/2,g=U(y,{x:p.x+p.radius*Math.sin(S),y:p.y+p.radius*Math.cos(S)});g>p.radius*2&&(g=p.radius*2),(d==null||d.width>g)&&(d={circle:p,width:g,p1:a,p2:f,large:g>p.radius,sweep:!0})}d!=null&&(o.push(d),i+=ht(d.circle.radius,d.width),f=a)}}else{let l=t[0];for(let u=1;u<t.length;++u)t[u].radius<l.radius&&(l=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(U(t[u],l)>Math.abs(l.radius-t[u].radius)){f=!0;break}f?i=r=0:(i=l.radius*l.radius*Math.PI,o.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-1e-10,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return r/=2,n&&(n.area=i+r,n.arcArea=i,n.polygonArea=r,n.arcs=o,n.innerPoints=e,n.intersectionPoints=s),i+r}function ue(t,n){return n.every(s=>U(t,s)<s.radius+1e-10)}function fe(t){let n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){let i=Gt(t[s],t[e]);for(let r of i)r.parentIndex=[s,e],n.push(r)}return n}function ht(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function U(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function mt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);let e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return ht(t,e)+ht(n,i)}function Gt(t,n){let s=U(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];let r=(e*e-i*i+s*s)/(2*s),o=Math.sqrt(e*e-r*r),l=t.x+r*(n.x-t.x)/s,f=t.y+r*(n.y-t.y)/s,u=-(n.y-t.y)*(o/s),a=-(n.x-t.x)*(o/s);return[{x:l+u,y:f-a},{x:l-u,y:f+a}]}function Wt(t){let n={x:0,y:0};for(let s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function he(t,n,s,e){e=e||{};let i=e.maxIterations||100,r=e.tolerance||1e-10,o=t(n),l=t(s),f=s-n;if(o*l>0)throw"Initial bisect points must have opposite signs";if(o===0)return n;if(l===0)return s;for(let u=0;u<i;++u){f/=2;let a=n+f,y=t(a);if(y*o>=0&&(n=a),Math.abs(f)<r||y===0)return a}return n+f}function dt(t){let n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function qt(t,n){return dt(t).map(()=>dt(n))}function tt(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function gt(t){return Math.sqrt(tt(t,t))}function xt(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function J(t,n,s,e,i){for(let r=0;r<t.length;++r)t[r]=n*s[r]+e*i[r]}function Kt(t,n,s){s=s||{};let e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,r=s.zeroDelta||.001,o=s.minErrorDelta||1e-6,l=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5,d,b=n.length,p=new Array(b+1);p[0]=n,p[0].fx=t(n),p[0].id=0;for(let v=0;v<b;++v){let c=n.slice();c[v]=c[v]?c[v]*i:r,p[v+1]=c,p[v+1].fx=t(c),p[v+1].id=v+1}function M(v){for(let c=0;c<v.length;c++)p[b][c]=v[c];p[b].fx=v.fx}let T=(v,c)=>v.fx-c.fx,_=n.slice(),S=n.slice(),g=n.slice(),m=n.slice();for(let v=0;v<e;++v){if(p.sort(T),s.history){let x=p.map(h=>{let D=h.slice();return D.fx=h.fx,D.id=h.id,D});x.sort((h,D)=>h.id-D.id),s.history.push({x:p[0].slice(),fx:p[0].fx,simplex:x})}d=0;for(let x=0;x<b;++x)d=Math.max(d,Math.abs(p[0][x]-p[1][x]));if(Math.abs(p[0].fx-p[b].fx)<o&&d<l)break;for(let x=0;x<b;++x){_[x]=0;for(let h=0;h<b;++h)_[x]+=p[h][x];_[x]/=b}let c=p[b];if(J(S,1+f,_,-f,c),S.fx=t(S),S.fx<p[0].fx)J(m,1+u,_,-u,c),m.fx=t(m),m.fx<S.fx?M(m):M(S);else if(S.fx>=p[b-1].fx){let x=!1;if(S.fx>c.fx?(J(g,1+a,_,-a,c),g.fx=t(g),g.fx<c.fx?M(g):x=!0):(J(g,1-a*f,_,a*f,c),g.fx=t(g),g.fx<S.fx?M(g):x=!0),x){if(y>=1)break;for(let h=1;h<p.length;++h)J(p[h],1-y,p[0],y,p[h]),p[h].fx=t(p[h])}}else M(S)}return p.sort(T),{fx:p[0].fx,x:p[0]}}function de(t,n,s,e,i,r,o){let l=s.fx,f=tt(s.fxprime,n),u=l,a=l,y=f,d=0;i=i||1,r=r||1e-6,o=o||.1;function b(p,M,T){for(let _=0;_<16;++_)if(i=(p+M)/2,J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),u>l+r*i*f||u>=T)M=i;else{if(Math.abs(y)<=-o*f)return i;y*(M-p)>=0&&(M=p),p=i,T=u}return 0}for(let p=0;p<10;++p){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),u>l+r*i*f||p&&u>=a)return b(d,i,a);if(Math.abs(y)<=-o*f)return i;if(y>=0)return b(i,d,u);a=u,d=i,i*=2}return i}function ge(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()},r=n.slice(),o,l,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),o=e.fxprime.slice(),xt(o,e.fxprime,-1);for(let a=0;a<u;++a){if(f=de(t,o,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)xt(o,e.fxprime,-1);else{J(r,1,i.fxprime,-1,e.fxprime);let y=tt(e.fxprime,e.fxprime),d=Math.max(0,tt(r,i.fxprime)/y);J(o,d,o,-1,i.fxprime),l=e,e=i,i=l}if(gt(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}function Ht(t,n={}){n.maxIterations=n.maxIterations||500;let s=n.initialLayout||me,e=n.lossFunction||et,i=xe(t,n),r=s(i,n),o=Object.keys(r),l=[];for(let a of o)l.push(r[a].x),l.push(r[a].y);let u=Kt(a=>{let y={};for(let d=0;d<o.length;++d){let b=o[d];y[b]={x:a[2*d],y:a[2*d+1],radius:r[b].radius}}return e(y,i)},l,n).x;for(let a=0;a<o.length;++a){let y=o[a];r[y].x=u[2*a],r[y].y=u[2*a+1]}return r}var Yt=1e-10;function yt(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Yt?Math.abs(t-n):he(e=>mt(t,n,e)-s,0,t+n)}function xe(t,n={}){let s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(s){let l=new Map;for(let f of e)for(let u=0;u<f.sets.length;u++){let a=String(f.sets[u]);l.set(a,f.size+(l.get(a)||0));for(let y=u+1;y<f.sets.length;y++){let d=String(f.sets[y]),b=`${a};${d}`,p=`${d};${a}`;l.set(b,f.size+(l.get(b)||0)),l.set(p,f.size+(l.get(p)||0))}}for(let f of e)f.sets.length<3&&(f.size=l.get(i(f.sets)))}let r=[],o=new Set;for(let l of e)if(l.sets.length===1)r.push(l.sets[0]);else if(l.sets.length===2){let f=l.sets[0],u=l.sets[1];o.add(i(l.sets)),o.add(i([u,f]))}r.sort((l,f)=>l===f?0:l<f?-1:1);for(let l=0;l<r.length;++l){let f=r[l];for(let u=l+1;u<r.length;++u){let a=r[u];o.has(i([f,a]))||e.push({sets:[f,a],size:0})}}return e}function ye(t,n,s){let e=qt(n.length,n.length),i=qt(n.length,n.length);return t.filter(r=>r.sets.length===2).forEach(r=>{let o=s[r.sets[0]],l=s[r.sets[1]],f=Math.sqrt(n[o].size/Math.PI),u=Math.sqrt(n[l].size/Math.PI),a=yt(f,u,r.size);e[o][l]=e[l][o]=a;let y=0;r.size+1e-10>=Math.min(n[o].size,n[l].size)?y=1:r.size<=1e-10&&(y=-1),i[o][l]=i[l][o]=y}),{distances:e,constraints:i}}function pe(t,n,s,e){for(let r=0;r<n.length;++r)n[r]=0;let i=0;for(let r=0;r<s.length;++r){let o=t[2*r],l=t[2*r+1];for(let f=r+1;f<s.length;++f){let u=t[2*f],a=t[2*f+1],y=s[r][f],d=e[r][f],b=(u-o)*(u-o)+(a-l)*(a-l),p=Math.sqrt(b),M=b-y*y;d>0&&p<=y||d<0&&p>=y||(i+=2*M*M,n[2*r]+=4*M*(o-u),n[2*r+1]+=4*M*(l-a),n[2*f]+=4*M*(u-o),n[2*f+1]+=4*M*(a-l))}}return i}function me(t,n={}){let s=ve(t,n),e=n.lossFunction||et;if(t.length>=8){let i=be(t,n),r=e(i,t),o=e(s,t);r+1e-8<o&&(s=i)}return s}function be(t,n={}){let s=n.restarts||10,e=[],i={};for(let d of t)d.sets.length===1&&(i[d.sets[0]]=e.length,e.push(d));let{distances:r,constraints:o}=ye(t,e,i),l=gt(r.map(gt))/r.length;r=r.map(d=>d.map(b=>b/l));let f=(d,b)=>pe(d,b,r,o),u=null;for(let d=0;d<s;++d){let b=dt(r.length*2).map(Math.random),p=ge(f,b,n);(!u||p.fx<u.fx)&&(u=p)}let a=u.x,y={};for(let d=0;d<e.length;++d){let b=e[d];y[b.sets[0]]={x:a[2*d]*l,y:a[2*d+1]*l,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(let d of n.history)xt(d.x,l);return y}function ve(t,n){let s=n&&n.lossFunction?n.lossFunction:et,e={},i={};for(let y of t)if(y.sets.length===1){let d=y.sets[0];e[d]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[d]=[]}t=t.filter(y=>y.sets.length===2);for(let y of t){let d=y.weight!=null?y.weight:1,b=y.sets[0],p=y.sets[1];y.size+Yt>=Math.min(e[b].size,e[p].size)&&(d=0),i[b].push({set:p,size:y.size,weight:d}),i[p].push({set:b,size:y.size,weight:d})}let r=[];Object.keys(i).forEach(y=>{let d=0;for(let b=0;b<i[y].length;++b)d+=i[y][b].size*i[y][b].weight;r.push({set:y,size:d})});function o(y,d){return d.size-y.size}r.sort(o);let l={};function f(y){return y.set in l}function u(y,d){e[d].x=y.x,e[d].y=y.y,l[d]=!0}u({x:0,y:0},r[0].set);for(let y=1;y<r.length;++y){let d=r[y].set,b=i[d].filter(f),p=e[d];if(b.sort(o),b.length===0)throw"ERROR: missing pairwise overlap information";let M=[];for(var a=0;a<b.length;++a){let S=e[b[a].set],g=yt(p.radius,S.radius,b[a].size);M.push({x:S.x+g,y:S.y}),M.push({x:S.x-g,y:S.y}),M.push({y:S.y+g,x:S.x}),M.push({y:S.y-g,x:S.x});for(let m=a+1;m<b.length;++m){let v=e[b[m].set],c=yt(p.radius,v.radius,b[m].size),x=Gt({x:S.x,y:S.y,radius:g},{x:v.x,y:v.y,radius:c});M.push(...x)}}let T=1e50,_=M[0];for(let S of M){e[d].x=S.x,e[d].y=S.y;let g=s(e,t);g<T&&(T=g,_=S)}u(_,d)}return e}function et(t,n){let s=0;for(let e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){let o=t[e.sets[0]],l=t[e.sets[1]];i=mt(o.radius,l.radius,U(o,l))}else i=rt(e.sets.map(o=>t[o]));let r=e.weight!=null?e.weight:1;s+=r*(i-e.size)*(i-e.size)}return s}function Xt(t,n){let s=0;for(let e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){let l=t[e.sets[0]],f=t[e.sets[1]];i=mt(l.radius,f.radius,U(l,f))}else i=rt(e.sets.map(l=>t[l]));let r=e.weight!=null?e.weight:1,o=Math.log((i+1)/(e.size+1));s+=r*o*o}return s}function ke(t,n,s){if(s==null?t.sort((i,r)=>r.radius-i.radius):t.sort(s),t.length>0){let i=t[0].x,r=t[0].y;for(let o of t)o.x-=i,o.y-=r}if(t.length===2&&U(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){let i=Math.atan2(t[1].x,t[1].y)-n,r=Math.cos(i),o=Math.sin(i);for(let l of t){let f=l.x,u=l.y;l.x=r*f-o*u,l.y=o*f+r*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){let r=t[1].y/(1e-10+t[1].x);for(let o of t){var e=(o.x+r*o.y)/(1+r*r);o.x=2*e-o.x,o.y=2*e*r-o.y}}}}function Ie(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,r){let o=n(i),l=n(r);o.parent=l}for(let i=0;i<t.length;++i)for(let r=i+1;r<t.length;++r){let o=t[i].radius+t[r].radius;U(t[i],t[r])+1e-10<o&&s(t[r],t[i])}let e=new Map;for(let i=0;i<t.length;++i){let r=n(t[i]).parent.setid;e.has(r)||e.set(r,[]),e.get(r).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function pt(t){let n=s=>{let e=t.reduce((r,o)=>Math.max(r,o[s]+o.radius),Number.NEGATIVE_INFINITY),i=t.reduce((r,o)=>Math.min(r,o[s]-o.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Zt(t,n,s){n==null&&(n=Math.PI/2);let e=$t(t).map(u=>Object.assign({},u)),i=Ie(e);for(let u of i){ke(u,n,s);let a=pt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let r=e.bounds,o=(r.xRange.max-r.xRange.min)/50;function l(u,a,y){if(!u)return;let d=u.bounds,b,p;if(a)b=r.xRange.max-d.xRange.min+o;else{b=r.xRange.max-d.xRange.max;let M=(d.xRange.max-d.xRange.min)/2-(r.xRange.max-r.xRange.min)/2;M<0&&(b+=M)}if(y)p=r.yRange.max-d.yRange.min+o;else{p=r.yRange.max-d.yRange.max;let M=(d.yRange.max-d.yRange.min)/2-(r.yRange.max-r.yRange.min)/2;M<0&&(p+=M)}for(let M of u)M.x+=b,M.y+=p,e.push(M)}let f=1;for(;f<i.length;)l(i[f],!0,!1),l(i[f+1],!1,!0),l(i[f+2],!0,!0),f+=3,r=pt(e);return Qt(e)}function Jt(t,n,s,e,i){let r=$t(t);n-=2*e,s-=2*e;let{xRange:o,yRange:l}=pt(r);if(o.max===o.min||l.max===l.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){let b=Math.sqrt(i/Math.PI)*2;f=n/b,u=s/b}else f=n/(o.max-o.min),u=s/(l.max-l.min);let a=Math.min(u,f),y=(n-(o.max-o.min)*a)/2,d=(s-(l.max-l.min)*a)/2;return Qt(r.map(b=>({radius:a*b.radius,x:e+y+(b.x-o.min)*a,y:e+d+(b.y-l.min)*a,setid:b.setid})))}function Qt(t){let n={};for(let s of t)n[s.setid]=s;return n}function $t(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function te(t={}){let n=!1,s=600,e=350,i=15,r=1e3,o=Math.PI/2,l=!0,f=null,u=!0,a=!0,y=null,d=null,b=!1,p=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,T={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],S=0,g=function(x){if(x in T)return T[x];var h=T[x]=_[S];return S+=1,S>=_.length&&(S=0),h},m=Ht,v=et;function c(x){let h=x.datum(),D=new Set;h.forEach(k=>{k.size==0&&k.sets.length==1&&D.add(k.sets[0])}),h=h.filter(k=>!k.sets.some(O=>D.has(O)));let I={},R={};if(h.length>0){let k=m(h,{lossFunction:v,distinct:b});l&&(k=Zt(k,o,d)),I=Jt(k,s,e,i,f),R=ne(I,h,M)}let G={};h.forEach(k=>{k.label&&(G[k.sets]=k.label)});function P(k){if(k.sets in G)return G[k.sets];if(k.sets.length==1)return""+k.sets[0]}x.selectAll("svg").data([I]).enter().append("svg");let N=x.select("svg");n?N.attr("viewBox",`0 0 ${s} ${e}`):N.attr("width",s).attr("height",e);let A={},C=!1;N.selectAll(".venn-area path").each(function(k){let O=this.getAttribute("d");k.sets.length==1&&O&&!b&&(C=!0,A[k.sets[0]]=we(O))});function E(k){return O=>{let $=k.sets.map(Z=>{let X=A[Z],q=I[Z];return X||(X={x:s/2,y:e/2,radius:1}),q||(q={x:s/2,y:e/2,radius:1}),{x:X.x*(1-O)+q.x*O,y:X.y*(1-O)+q.y*O,radius:X.radius*(1-O)+q.radius*O}});return Ut($,p)}}let L=N.selectAll(".venn-area").data(h,k=>k.sets),V=L.enter().append("g").attr("class",k=>`venn-area venn-${k.sets.length==1?"circle":"intersection"}${k.colour||k.color?" venn-coloured":""}`).attr("data-venn-sets",k=>k.sets.join("_")),F=V.append("path"),W=V.append("text").attr("class","label").text(k=>P(k)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(F.style("fill-opacity","0").filter(k=>k.sets.length==1).style("fill",k=>k.colour?k.colour:k.color?k.color:g(k.sets)).style("fill-opacity",".25"),W.style("fill",k=>k.colour||k.color?"#FFF":t.textFill?t.textFill:k.sets.length==1?g(k.sets):"#444"));function B(k){return typeof k.transition=="function"?k.transition("venn").duration(r):k}let j=x;C&&typeof j.transition=="function"?(j=B(x),j.selectAll("path").attrTween("d",E)):j.selectAll("path").attr("d",k=>Ut(k.sets.map(O=>I[O])),p);let z=j.selectAll("text").filter(k=>k.sets in R).text(k=>P(k)).attr("x",k=>Math.floor(R[k.sets].x)).attr("y",k=>Math.floor(R[k.sets].y));u&&(C?"on"in z?z.on("end",ut(I,P)):z.each("end",ut(I,P)):z.each(ut(I,P)));let Y=B(L.exit()).remove();typeof L.transition=="function"&&Y.selectAll("path").attrTween("d",E);let H=Y.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(W.style("font-size","0px"),z.style("font-size",y),H.style("font-size","0px")),{circles:I,textCentres:R,nodes:L,enter:V,update:j,exit:Y}}return c.wrap=function(x){return arguments.length?(u=x,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(x){return arguments.length?(s=x,c):s},c.height=function(x){return arguments.length?(e=x,c):e},c.padding=function(x){return arguments.length?(i=x,c):i},c.distinct=function(x){return arguments.length?(b=x,c):b},c.colours=function(x){return arguments.length?(g=x,c):g},c.colors=function(x){return arguments.length?(g=x,c):g},c.fontSize=function(x){return arguments.length?(y=x,c):y},c.round=function(x){return arguments.length?(p=x,c):p},c.duration=function(x){return arguments.length?(r=x,c):r},c.layoutFunction=function(x){return arguments.length?(m=x,c):m},c.normalize=function(x){return arguments.length?(l=x,c):l},c.scaleToFit=function(x){return arguments.length?(f=x,c):f},c.styled=function(x){return arguments.length?(a=x,c):a},c.orientation=function(x){return arguments.length?(o=x,c):o},c.orientationOrder=function(x){return arguments.length?(d=x,c):d},c.lossFunction=function(x){return arguments.length?(v=x==="default"?et:x==="logRatio"?Xt:x,c):v},c}function ut(t,n){return function(s){let e=this,i=t[s.sets[0]].radius||50,r=n(s)||"",o=r.split(/\s+/).reverse(),f=(r.length+o.length)/3,u=o.pop(),a=[u],y=0,d=1.1;e.textContent=null;let b=[];function p(g){let m=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return m.textContent=g,b.push(m),e.append(m),m}let M=p(u);for(;u=o.pop(),!!u;){a.push(u);let g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=p(u),y++)}let T=.35-y*d/2,_=e.getAttribute("x"),S=e.getAttribute("y");b.forEach((g,m)=>{g.setAttribute("x",_),g.setAttribute("y",S),g.setAttribute("dy",`${T+m*d}em`)})}}function ft(t,n,s){let e=n[0].radius-U(n[0],t);for(let i=1;i<n.length;++i){let r=n[i].radius-U(n[i],t);r<=e&&(e=r)}for(let i=0;i<s.length;++i){let r=U(s[i],t)-s[i].radius;r<=e&&(e=r)}return e}function ee(t,n,s){let e=[];for(let a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],r=ft(e[0],t,n);for(let a=1;a<e.length;++a){let y=ft(e[a],t,n);y>=r&&(i=e[a],r=y)}let o=Kt(a=>-1*ft({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:s?0:o[0],y:o[1]},f=!0;for(let a of t)if(U(l,a)>a.radius){f=!1;break}for(let a of n)if(U(l,a)<a.radius){f=!1;break}if(f)return l;if(t.length==1)return{x:t[0].x,y:t[0].y};let u={};return rt(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?ee(t,[]):Wt(u.arcs.map(a=>a.p1))}function Me(t){let n={},s=Object.keys(t);for(let e of s)n[e]=[];for(let e=0;e<s.length;e++){let i=s[e],r=t[i];for(let o=e+1;o<s.length;++o){let l=s[o],f=t[l],u=U(r,f);u+f.radius<=r.radius+1e-10?n[l].push(i):u+r.radius<=f.radius+1e-10&&n[i].push(l)}}return n}function ne(t,n,s){let e={},i=Me(t);for(let r=0;r<n.length;++r){let o=n[r].sets,l={},f={};for(let d=0;d<o.length;++d){l[o[d]]=!0;let b=i[o[d]];for(let p=0;p<b.length;++p)f[b[p]]=!0}let u=[],a=[];for(let d in t)d in l?u.push(t[d]):d in f||a.push(t[d]);let y=ee(u,a,s);e[o]=y,y.disjoint&&n[r].size>0&&console.log("WARNING: area "+o+" not represented on screen")}return e}function Se(t,n,s){let e=[];return e.push(`
2
+ M`,t,n),e.push(`
3
+ m`,-s,0),e.push(`
4
+ a`,s,s,0,1,0,s*2,0),e.push(`
5
+ a`,s,s,0,1,0,-s*2,0),e.join(" ")}function we(t){let n=t.split(" ");return{x:Number.parseFloat(n[1]),y:Number.parseFloat(n[2]),radius:-Number.parseFloat(n[4])}}function se(t){if(t.length===0)return[];let n={};return rt(t,n),n.arcs}function ie(t,n){if(t.length===0)return"M 0 0";let s=Math.pow(10,n||0),e=n!=null?r=>Math.round(r*s)/s:r=>r;if(t.length==1){let r=t[0].circle;return Se(e(r.x),e(r.y),e(r.radius))}let i=[`
6
+ M`,e(t[0].p2.x),e(t[0].p2.y)];for(let r of t){let o=e(r.circle.radius);i.push(`
7
+ A`,o,o,0,r.large?1:0,r.sweep?1:0,e(r.p1.x),e(r.p1.y))}return i.join(" ")}function Ut(t,n){return ie(se(t),n)}function re(t,n={}){let{lossFunction:s,layoutFunction:e=Ht,normalize:i=!0,orientation:r=Math.PI/2,orientationOrder:o,width:l=600,height:f=350,padding:u=15,scaleToFit:a=!1,symmetricalTextCentre:y=!1,distinct:d,round:b=2}=n,p=e(t,{lossFunction:s==="default"||!s?et:s==="logRatio"?Xt:s,distinct:d});i&&(p=Zt(p,r,o));let M=Jt(p,l,f,u,a),T=ne(M,t,y),_=new Map(Object.keys(M).map(m=>[m,{set:m,x:M[m].x,y:M[m].y,radius:M[m].radius}])),S=t.map(m=>{let v=m.sets.map(h=>_.get(h)),c=se(v),x=ie(c,b);return{circles:v,arcs:c,path:x,area:m,has:new Set(m.sets)}});function g(m){let v="";for(let c of S)c.has.size>m.length&&m.every(x=>c.has.has(x))&&(v+=" "+c.path);return v}return S.map(({circles:m,arcs:v,path:c,area:x})=>({data:x,text:T[x.sets],circles:m,arcs:v,path:c,distinctPath:c+g(x.sets)}))}var bt=(function(){var t=w(function(S,g,m,v){for(m=m||{},v=S.length;v--;m[S[v]]=g);return m},"o"),n=[5,8],s=[7,8,11,12,17,19,22,24],e=[1,17],i=[1,18],r=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],o=[1,31],l=[1,39],f=[7,8,11,12,17,19,22,24,27],u=[1,57],a=[1,56],y=[1,58],d=[1,59],b=[1,60],p=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],M={trace:w(function(){},"trace"),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:"error",5:"VENN",7:"EOF",8:"NEWLINE",11:"TITLE",12:"SET",14:"BRACKET_LABEL",15:"COLON",16:"NUMERIC",17:"UNION",19:"TEXT",20:"IDENTIFIER",21:"STRING",22:"INDENT_TEXT",24:"STYLE",27:"COMMA",31:"HEXCOLOR",32:"RGBCOLOR",33:"RGBACOLOR"},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:w(function(g,m,v,c,x,h,D){var I=h.length-1;switch(x){case 1:return h[I-1];case 2:case 3:case 4:this.$=[];break;case 5:h[I-1].push(h[I]),this.$=h[I-1];break;case 6:this.$=[];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:this.$=h[I];break;case 8:c.setDiagramTitle(h[I].substr(6)),this.$=h[I].substr(6);break;case 9:c.addSubsetData([h[I]],void 0,void 0),c.setIndentMode&&c.setIndentMode(!0);break;case 10:c.addSubsetData([h[I-1]],h[I],void 0),c.setIndentMode&&c.setIndentMode(!0);break;case 11:c.addSubsetData([h[I-2]],void 0,parseFloat(h[I])),c.setIndentMode&&c.setIndentMode(!0);break;case 12:c.addSubsetData([h[I-3]],h[I-2],parseFloat(h[I])),c.setIndentMode&&c.setIndentMode(!0);break;case 13:if(h[I].length<2)throw new Error("union requires multiple identifiers");c.validateUnionIdentifiers&&c.validateUnionIdentifiers(h[I]),c.addSubsetData(h[I],void 0,void 0),c.setIndentMode&&c.setIndentMode(!0);break;case 14:if(h[I-1].length<2)throw new Error("union requires multiple identifiers");c.validateUnionIdentifiers&&c.validateUnionIdentifiers(h[I-1]),c.addSubsetData(h[I-1],h[I],void 0),c.setIndentMode&&c.setIndentMode(!0);break;case 15:if(h[I-2].length<2)throw new Error("union requires multiple identifiers");c.validateUnionIdentifiers&&c.validateUnionIdentifiers(h[I-2]),c.addSubsetData(h[I-2],void 0,parseFloat(h[I])),c.setIndentMode&&c.setIndentMode(!0);break;case 16:if(h[I-3].length<2)throw new Error("union requires multiple identifiers");c.validateUnionIdentifiers&&c.validateUnionIdentifiers(h[I-3]),c.addSubsetData(h[I-3],h[I-2],parseFloat(h[I])),c.setIndentMode&&c.setIndentMode(!0);break;case 17:case 18:case 19:c.addTextData(h[I-1],h[I],void 0);break;case 20:case 21:c.addTextData(h[I-2],h[I-1],h[I]);break;case 23:c.addStyleData(h[I-1],h[I]);break;case 24:case 25:case 26:var R=c.getCurrentSets();if(!R)throw new Error("text requires set");c.addTextData(R,h[I],void 0);break;case 27:case 28:var R=c.getCurrentSets();if(!R)throw new Error("text requires set");c.addTextData(R,h[I-1],h[I]);break;case 29:case 41:this.$=[h[I]];break;case 30:case 42:this.$=[...h[I-2],h[I]];break;case 31:this.$=[h[I-2],h[I]];break;case 33:this.$=h[I].join(" ");break;case 34:this.$=[h[I]];break;case 35:h[I-1].push(h[I]),this.$=h[I-1];break;case 43:case 44:this.$=h[I];break}},"anonymous"),table:[t(n,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},t(s,[2,4],{6:5}),t(n,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},t(s,[2,5]),t(s,[2,6]),t(s,[2,7]),t(s,[2,8]),{13:16,20:e,21:i},{13:20,18:19,20:e,21:i},{13:20,18:21,20:e,21:i},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:e,21:i},t(s,[2,9],{14:[1,27],15:[1,28]}),t(r,[2,43]),t(r,[2,44]),t(s,[2,13],{14:[1,29],15:[1,30],27:o}),t(r,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:o},t(s,[2,22]),t(s,[2,24],{14:[1,35]}),t(s,[2,25],{14:[1,36]}),t(s,[2,26]),{20:l,25:37,26:38,27:o},t(s,[2,10],{15:[1,40]}),{16:[1,41]},t(s,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:e,21:i},t(s,[2,17],{14:[1,45]}),t(s,[2,18],{14:[1,46]}),t(s,[2,19]),t(s,[2,27]),t(s,[2,28]),t(s,[2,23],{27:[1,47]}),t(f,[2,29]),{15:[1,48]},{16:[1,49]},t(s,[2,11]),{16:[1,50]},t(s,[2,15]),t(r,[2,42]),t(s,[2,20]),t(s,[2,21]),{20:l,26:51},{16:u,20:a,21:[1,53],28:52,29:54,30:55,31:y,32:d,33:b},t(s,[2,12]),t(s,[2,16]),t(f,[2,30]),t(f,[2,31]),t(f,[2,32]),t(f,[2,33],{30:61,16:u,20:a,31:y,32:d,33:b}),t(p,[2,34]),t(p,[2,36]),t(p,[2,37]),t(p,[2,38]),t(p,[2,39]),t(p,[2,40]),t(p,[2,35])],defaultActions:{6:[2,1]},parseError:w(function(g,m){if(m.recoverable)this.trace(g);else{var v=new Error(g);throw v.hash=m,v}},"parseError"),parse:w(function(g){var m=this,v=[0],c=[],x=[null],h=[],D=this.table,I="",R=0,G=0,P=0,N=2,A=1,C=h.slice.call(arguments,1),E=Object.create(this.lexer),L={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(L.yy[V]=this.yy[V]);E.setInput(g,L.yy),L.yy.lexer=E,L.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var F=E.yylloc;h.push(F);var W=E.options&&E.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function B(K){v.length=v.length-2*K,x.length=x.length-K,h.length=h.length-K}w(B,"popStack");function j(){var K;return K=c.pop()||E.lex()||A,typeof K!="number"&&(K instanceof Array&&(c=K,K=c.pop()),K=m.symbols_[K]||K),K}w(j,"lex");for(var z,Y,H,k,O,$,Z={},X,q,_t,st;;){if(H=v[v.length-1],this.defaultActions[H]?k=this.defaultActions[H]:((z===null||typeof z>"u")&&(z=j()),k=D[H]&&D[H][z]),typeof k>"u"||!k.length||!k[0]){var at="";st=[];for(X in D[H])this.terminals_[X]&&X>N&&st.push("'"+this.terminals_[X]+"'");E.showPosition?at="Parse error on line "+(R+1)+`:
8
+ `+E.showPosition()+`
9
+ Expecting `+st.join(", ")+", got '"+(this.terminals_[z]||z)+"'":at="Parse error on line "+(R+1)+": Unexpected "+(z==A?"end of input":"'"+(this.terminals_[z]||z)+"'"),this.parseError(at,{text:E.match,token:this.terminals_[z]||z,line:E.yylineno,loc:F,expected:st})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+z);switch(k[0]){case 1:v.push(z),x.push(E.yytext),h.push(E.yylloc),v.push(k[1]),z=null,Y?(z=Y,Y=null):(G=E.yyleng,I=E.yytext,R=E.yylineno,F=E.yylloc,P>0&&P--);break;case 2:if(q=this.productions_[k[1]][1],Z.$=x[x.length-q],Z._$={first_line:h[h.length-(q||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(q||1)].first_column,last_column:h[h.length-1].last_column},W&&(Z._$.range=[h[h.length-(q||1)].range[0],h[h.length-1].range[1]]),$=this.performAction.apply(Z,[I,G,R,L.yy,k[1],x,h].concat(C)),typeof $<"u")return $;q&&(v=v.slice(0,-1*q*2),x=x.slice(0,-1*q),h=h.slice(0,-1*q)),v.push(this.productions_[k[1]][0]),x.push(Z.$),h.push(Z._$),_t=D[v[v.length-2]][v[v.length-1]],v.push(_t);break;case 3:return!0}}return!0},"parse")},T=(function(){var S={EOF:1,parseError:w(function(m,v){if(this.yy.parser)this.yy.parser.parseError(m,v);else throw new Error(m)},"parseError"),setInput:w(function(g,m){return this.yy=m||this.yy||{},this._input=g,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:w(function(){var g=this._input[0];this.yytext+=g,this.yyleng++,this.offset++,this.match+=g,this.matched+=g;var m=g.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),g},"input"),unput:w(function(g){var m=g.length,v=g.split(/(?:\r\n?|\n)/g);this._input=g+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var c=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),v.length-1&&(this.yylineno-=v.length-1);var x=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:v?(v.length===c.length?this.yylloc.first_column:0)+c[c.length-v.length].length-v[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:w(function(){return this._more=!0,this},"more"),reject:w(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).
10
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:w(function(g){this.unput(this.match.slice(g))},"less"),pastInput:w(function(){var g=this.matched.substr(0,this.matched.length-this.match.length);return(g.length>20?"...":"")+g.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:w(function(){var g=this.match;return g.length<20&&(g+=this._input.substr(0,20-g.length)),(g.substr(0,20)+(g.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:w(function(){var g=this.pastInput(),m=new Array(g.length+1).join("-");return g+this.upcomingInput()+`
11
+ `+m+"^"},"showPosition"),test_match:w(function(g,m){var v,c,x;if(this.options.backtrack_lexer&&(x={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(x.yylloc.range=this.yylloc.range.slice(0))),c=g[0].match(/(?:\r\n?|\n).*/g),c&&(this.yylineno+=c.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:c?c[c.length-1].length-c[c.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+g[0].length},this.yytext+=g[0],this.match+=g[0],this.matches=g,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(g[0].length),this.matched+=g[0],v=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),v)return v;if(this._backtrack){for(var h in x)this[h]=x[h];return!1}return!1},"test_match"),next:w(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var g,m,v,c;this._more||(this.yytext="",this.match="");for(var x=this._currentRules(),h=0;h<x.length;h++)if(v=this._input.match(this.rules[x[h]]),v&&(!m||v[0].length>m[0].length)){if(m=v,c=h,this.options.backtrack_lexer){if(g=this.test_match(v,x[h]),g!==!1)return g;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(g=this.test_match(m,x[c]),g!==!1?g:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
12
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:w(function(){var m=this.next();return m||this.lex()},"lex"),begin:w(function(m){this.conditionStack.push(m)},"begin"),popState:w(function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:w(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:w(function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},"topState"),pushState:w(function(m){this.begin(m)},"pushState"),stateStackSize:w(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:w(function(m,v,c,x){var h=x;switch(c){case 0:break;case 1:break;case 2:break;case 3:if(m.getIndentMode&&m.getIndentMode())return m.consumeIndentText=!0,this.begin("INITIAL"),22;break;case 4:break;case 5:m.setIndentMode&&m.setIndentMode(!1),this.begin("INITIAL"),this.unput(v.yytext);break;case 6:return this.begin("bol"),8;break;case 7:break;case 8:break;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(m.consumeIndentText)m.consumeIndentText=!1;else return 19;break;case 15:return 24;case 16:return v.yytext=v.yytext.slice(2,-2),14;break;case 17:return v.yytext=v.yytext.slice(1,-1).trim(),14;break;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}};return S})();M.lexer=T;function _(){this.yy={}}return w(_,"Parser"),_.prototype=M,M.Parser=_,new _})();bt.parser=bt;var Ee=bt,vt=[],kt=[],It=[],Mt=new Set,St,wt=!1,Te=w((t,n,s)=>{let e=ot(t).sort(),i=s??10/Math.pow(t.length,2);St=e,e.length===1&&Mt.add(e[0]),vt.push({sets:e,size:i,label:n?nt(n):void 0})},"addSubsetData"),ze=w(()=>vt,"getSubsetData"),nt=w(t=>{let n=t.trim();return n.length>=2&&n.startsWith('"')&&n.endsWith('"')?n.slice(1,-1):n},"normalizeText"),Ae=w(t=>t&&nt(t),"normalizeStyleValue"),De=w((t,n,s)=>{let e=nt(n);kt.push({sets:ot(t).sort(),id:e,label:s?nt(s):void 0})},"addTextData"),Re=w((t,n)=>{let s=ot(t).sort(),e={};for(let[i,r]of n)e[i]=Ae(r)??r;It.push({targets:s,styles:e})},"addStyleData"),Ce=w(()=>It,"getStyleData"),ot=w(t=>t.map(n=>nt(n)),"normalizeIdentifierList"),Ne=w(t=>{let s=ot(t).filter(e=>!Mt.has(e));if(s.length>0)throw new Error(`unknown set identifier: ${s.join(", ")}`)},"validateUnionIdentifiers"),Oe=w(()=>kt,"getTextData"),Le=w(()=>St,"getCurrentSets"),Fe=w(()=>wt,"getIndentMode"),je=w(t=>{wt=t},"setIndentMode"),Pe=At.venn;function oe(){return Vt(Pe,ct().venn)}w(oe,"getConfig");var Ve=w(()=>{Rt(),vt.length=0,kt.length=0,It.length=0,Mt.clear(),St=void 0,wt=!1},"customClear"),Be={getConfig:oe,clear:Ve,setAccTitle:Ct,getAccTitle:Nt,setDiagramTitle:Ft,getDiagramTitle:jt,getAccDescription:Lt,setAccDescription:Ot,addSubsetData:Te,getSubsetData:ze,addTextData:De,addStyleData:Re,validateUnionIdentifiers:Ne,getTextData:Oe,getStyleData:Ce,getCurrentSets:Le,getIndentMode:Fe,setIndentMode:je},qe=w(t=>`
13
+ .venn-title {
14
+ font-size: 32px;
15
+ fill: ${t.vennTitleTextColor};
16
+ font-family: ${t.fontFamily};
17
+ }
18
+
19
+ .venn-circle text {
20
+ font-size: 48px;
21
+ font-family: ${t.fontFamily};
22
+ }
23
+
24
+ .venn-intersection text {
25
+ font-size: 48px;
26
+ fill: ${t.vennSetTextColor};
27
+ font-family: ${t.fontFamily};
28
+ }
29
+
30
+ .venn-text-node {
31
+ font-family: ${t.fontFamily};
32
+ color: ${t.vennSetTextColor};
33
+ }
34
+ `,"getStyles"),Ue=qe;function ae(t){let n=new Map;for(let s of t){let e=s.targets.join("|"),i=n.get(e);i?Object.assign(i,s.styles):n.set(e,{...s.styles})}return n}w(ae,"buildStyleByKey");var Ge=w((t,n,s,e)=>{let i=e.db,r=i.getConfig?.(),{themeVariables:o,look:l,handDrawnSeed:f}=ct(),u=l==="handDrawn",a=[o.venn1,o.venn2,o.venn3,o.venn4,o.venn5,o.venn6,o.venn7,o.venn8].filter(Boolean),y=i.getDiagramTitle?.(),d=i.getSubsetData(),b=i.getTextData(),p=ae(i.getStyleData()),M=ce(d),T=r?.width??800,_=r?.height??450,g=T/1600,m=y?48*g:0,v=o.primaryTextColor??o.textColor,c=Pt(n);c.attr("viewBox",`0 0 ${T} ${_}`),y&&c.append("text").text(y).attr("class","venn-title").attr("font-size",`${32*g}px`).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("x","50%").attr("y",32*g).style("fill",o.vennTitleTextColor||o.titleColor);let x=it(document.createElement("div")),h=te().width(T).height(_-m);x.datum(M).call(h);let D=u?Bt.svg(x.select("svg").node()):void 0,I=re(M,{width:T,height:_-m,padding:r?.padding??15}),R=new Map;for(let A of I){let C=Q([...A.data.sets].sort());R.set(C,A)}b.length>0&&le(r,R,x,b,g,p);let G=Et(o.background||"#f4f4f4");x.selectAll(".venn-circle").each(function(A,C){let E=it(this),V=Q([...A.sets].sort()),F=p.get(V),W=a.length>0?a[C%a.length]:void 0,B=F?.fill||W||o.primaryColor;E.classed(`venn-set-${C%8}`,!0);let j=F?.["fill-opacity"]??.1,z=F?.stroke||B,Y=F?.["stroke-width"]||`${5*g}`;if(u&&D){let k=R.get(V);if(k&&k.circles.length>0){let O=k.circles[0],$=D.circle(O.x,O.y,O.radius*2,{roughness:.7,seed:f,fill:lt(B,.7),fillStyle:"hachure",fillWeight:2,hachureGap:8,hachureAngle:-41+C*60,stroke:z,strokeWidth:parseFloat(String(Y))});E.select("path").remove(),E.node()?.insertBefore($,E.select("text").node())}}else E.select("path").style("fill",B).style("fill-opacity",j).style("stroke",z).style("stroke-width",Y).style("stroke-opacity",.95);let H=F?.color||(G?Tt(B,30):zt(B,30));E.select("text").style("font-size",`${48*g}px`).style("fill",H)}),u&&D?x.selectAll(".venn-intersection").each(function(A){let C=it(this),L=Q([...A.sets].sort()),V=p.get(L),F=V?.fill;if(F){let W=C.select("path"),B=W.attr("d");if(B){let j=D.path(B,{roughness:.7,seed:f,fill:lt(F,.3),fillStyle:"cross-hatch",fillWeight:2,hachureGap:6,hachureAngle:60,stroke:"none"}),z=W.node();z?.parentNode?.insertBefore(j,z),W.remove()}}else C.select("path").style("fill-opacity",0);C.select("text").style("font-size",`${48*g}px`).style("fill",V?.color??o.vennSetTextColor??v)}):(x.selectAll(".venn-intersection text").style("font-size",`${48*g}px`).style("fill",A=>{let E=Q([...A.sets].sort());return p.get(E)?.color??o.vennSetTextColor??v}),x.selectAll(".venn-intersection path").style("fill-opacity",A=>{let E=Q([...A.sets].sort());return p.get(E)?.fill?1:0}).style("fill",A=>{let E=Q([...A.sets].sort());return p.get(E)?.fill??"transparent"}));let P=c.append("g").attr("transform",`translate(0, ${m})`),N=x.select("svg").node();if(N&&"childNodes"in N)for(let A of[...N.childNodes])P.node()?.appendChild(A);Dt(c,_,T,r?.useMaxWidth??!0)},"draw");function Q(t){return t.join("|")}w(Q,"stableSetsKey");function le(t,n,s,e,i,r){let o=t?.useDebugLayout??!1,f=s.select("svg").append("g").attr("class","venn-text-nodes"),u=new Map;for(let a of e){let y=Q(a.sets),d=u.get(y);d?d.push(a):u.set(y,[a])}for(let[a,y]of u.entries()){let d=n.get(a);if(!d?.text)continue;let b=d.text.x,p=d.text.y,M=Math.min(...d.circles.map(N=>N.radius)),T=Math.min(...d.circles.map(N=>N.radius-Math.hypot(b-N.x,p-N.y))),_=Number.isFinite(T)?Math.max(0,T):0;_===0&&Number.isFinite(M)&&(_=M*.6);let S=f.append("g").attr("class","venn-text-area").attr("font-size",`${40*i}px`);o&&S.append("circle").attr("class","venn-text-debug-circle").attr("cx",b).attr("cy",p).attr("r",_).attr("fill","none").attr("stroke","purple").attr("stroke-width",1.5*i).attr("stroke-dasharray",`${6*i} ${4*i}`);let g=Math.max(80*i,_*2*.95),m=Math.max(60*i,_*2*.95),x=(d.data.label&&d.data.label.length>0?Math.min(32*i,_*.25):0)+(y.length<=2?30*i:0),h=b-g/2,D=p-m/2+x,I=Math.max(1,Math.ceil(Math.sqrt(y.length))),R=Math.max(1,Math.ceil(y.length/I)),G=g/I,P=m/R;for(let[N,A]of y.entries()){let C=N%I,E=Math.floor(N/I),L=h+G*(C+.5),V=D+P*(E+.5);o&&S.append("rect").attr("class","venn-text-debug-cell").attr("x",h+G*C).attr("y",D+P*E).attr("width",G).attr("height",P).attr("fill","none").attr("stroke","teal").attr("stroke-width",1*i).attr("stroke-dasharray",`${4*i} ${3*i}`);let F=G*.9,W=P*.9,B=S.append("foreignObject").attr("class","venn-text-node-fo").attr("width",F).attr("height",W).attr("x",L-F/2).attr("y",V-W/2).attr("overflow","visible"),j=r.get(A.id)?.color,z=B.append("xhtml:span").attr("class","venn-text-node").style("display","flex").style("width","100%").style("height","100%").style("white-space","normal").style("align-items","center").style("justify-content","center").style("text-align","center").style("overflow-wrap","normal").style("word-break","normal").text(A.label??A.id);j&&z.style("color",j)}}}w(le,"renderTextNodes");function ce(t){let n=new Set(t.map(i=>[...i.sets].sort().join("|"))),s=new Map(t.filter(i=>i.sets.length===1&&i.size!==void 0).map(i=>[i.sets[0],i.size])),e=[];for(let i of t){if(i.sets.length<3)continue;let r=[...i.sets].sort();for(let o=0;o<r.length-1;o++)for(let l=o+1;l<r.length;l++){let f=[r[o],r[l]],u=f.join("|");if(!n.has(u)){n.add(u);let a=s.get(f[0]),y=s.get(f[1]),d=a!==void 0&&y!==void 0?Math.min(a,y)/4:2.5;e.push({sets:f,size:d,label:""})}}}return e.length>0?[...t,...e]:t}w(ce,"ensurePairwiseSubsets");var We={draw:Ge},tn={parser:Ee,db:Be,renderer:We,styles:Ue};export{tn as diagram};
@@ -0,0 +1 @@
1
+ import{a as e,b as r}from"./chunk-7W3KTJUJ.js";import"./chunk-WBPRABWA.js";import"./chunk-PHKIAKHS.js";export{e as WardleyModule,r as createWardleyServices};
@@ -0,0 +1,78 @@
1
+ import{a as lt}from"./chunk-OB665XPY.js";import{a as dt}from"./chunk-LZTAJOGZ.js";import{a as ct}from"./chunk-UAQETDSH.js";import"./chunk-ABLFMIK7.js";import"./chunk-7W3KTJUJ.js";import"./chunk-AVJJGJEF.js";import"./chunk-AVITUR4K.js";import"./chunk-UORYZEAD.js";import"./chunk-2TCGAX73.js";import"./chunk-XQHNSJKC.js";import"./chunk-EPS7YYLR.js";import"./chunk-INV6BDXO.js";import"./chunk-56PLA4MI.js";import"./chunk-4UKVVSLZ.js";import"./chunk-CMFTFM5L.js";import"./chunk-7FXP6RHI.js";import"./chunk-FDHLSHAZ.js";import"./chunk-GDF64WIG.js";import"./chunk-WBPRABWA.js";import{p as _}from"./chunk-GTJDAHEV.js";import"./chunk-XLJVPE6C.js";import{$ as D,C as Q,P as tt,U as et,V as at,W as rt,X as ot,Y as nt,Z as st,_ as it,p as K}from"./chunk-M3XBBO6R.js";import{b as V}from"./chunk-W4ELJFHG.js";import{a as u}from"./chunk-UAGOPMXU.js";import"./chunk-PHKIAKHS.js";var G=u((e,n)=>{let r=e<=1?e*100:e;if(r<0||r>100)throw new Error(`${n} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return r},"toPercent"),A=u((e,n,r)=>({x:G(n,`${r} evolution`),y:G(e,`${r} visibility`)}),"toCoordinates"),pt=u(e=>{if(e){if(e==="+<>")return"bidirectional";if(e==="+<")return"backward";if(e==="+>")return"forward"}},"getFlowFromPort"),Rt=u(e=>{if(!e?.startsWith("+"))return{};let r=/^\+'([^']*)'/.exec(e)?.[1];return e.includes("<>")?{flow:"bidirectional",label:r}:e.includes("<")?{flow:"backward",label:r}:e.includes(">")?{flow:"forward",label:r}:{label:r}},"extractFlowFromArrow"),Ot=u((e,n)=>{if(lt(e,n),e.size&&n.setSize(e.size.width,e.size.height),e.evolution){let r=e.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),x=e.evolution.stages.filter(a=>a.boundary!==void 0).map(a=>a.boundary);n.updateAxes({stages:r,stageBoundaries:x})}if(e.anchors.forEach(r=>{let x=A(r.visibility,r.evolution,`Anchor "${r.name}"`);n.addNode(r.name,r.name,x.x,x.y,"anchor")}),e.components.forEach(r=>{let x=A(r.visibility,r.evolution,`Component "${r.name}"`),a=r.label?(r.label.negX?-1:1)*r.label.offsetX:void 0,d=r.label?(r.label.negY?-1:1)*r.label.offsetY:void 0,m=r.decorator?.strategy;n.addNode(r.name,r.name,x.x,x.y,"component",a,d,r.inertia,m)}),e.notes.forEach(r=>{let x=A(r.visibility,r.evolution,`Note "${r.text}"`);n.addNote(r.text,x.x,x.y)}),e.pipelines.forEach(r=>{let x=n.getNode(r.parent);if(!x||typeof x.y!="number")throw new Error(`Pipeline "${r.parent}" must reference an existing component with coordinates.`);let a=x.y;n.startPipeline(r.parent),r.components.forEach(d=>{let m=`${r.parent}_${d.name}`,C=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,F=G(d.evolution,`Pipeline component "${d.name}" evolution`);n.addNode(m,d.name,F,a,"pipeline-component",C,g),n.addPipelineComponent(r.parent,m)})}),e.links.forEach(r=>{let x=!!r.arrow&&(r.arrow.includes("-.->")||r.arrow.includes(".-.")),a=pt(r.fromPort)??pt(r.toPort),{flow:d,label:m}=Rt(r.arrow);!a&&d&&(a=d);let C=r.linkLabel,g=m??C;n.addLink(n.resolveNodeId(r.from),n.resolveNodeId(r.to),x,g,a)}),e.evolves.forEach(r=>{let x=n.getNode(r.component);if(x?.y!==void 0){let a=G(r.target,`Evolve target for "${r.component}"`);n.addTrend(r.component,a,x.y)}}),e.annotations.length>0){let r=e.annotations[0],x=A(r.x,r.y,"Annotations box");n.setAnnotationsBox(x.x,x.y)}e.annotation.forEach(r=>{let x=A(r.x,r.y,`Annotation ${r.number}`);n.addAnnotation(r.number,[{x:x.x,y:x.y}],r.text)}),e.accelerators.forEach(r=>{let x=A(r.x,r.y,`Accelerator "${r.name}"`);n.addAccelerator(r.name,x.x,x.y)}),e.deaccelerators.forEach(r=>{let x=A(r.x,r.y,`Deaccelerator "${r.name}"`);n.addDeaccelerator(r.name,x.x,x.y)})},"populateDb"),ft={parser:{yy:void 0},parse:u(async e=>{let n=await ct("wardley",e);V.debug(n);let r=ft.parser?.yy;if(!r||typeof r.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ot(n,r)},"parse")},Wt=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{u(this,"WardleyBuilder")}addNode(e){let n=this.nodes.get(e.id)??{id:e.id,label:e.label},r={...n,...e,className:e.className??n.className,labelOffsetX:e.labelOffsetX??n.labelOffsetX,labelOffsetY:e.labelOffsetY??n.labelOffsetY};this.nodes.set(e.id,r)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});let n=this.nodes.get(e);n&&(n.isPipelineParent=!0)}addPipelineComponent(e,n){let r=this.pipelines.get(e);r&&r.componentIds.push(n);let x=this.nodes.get(n);x&&(x.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,n){this.annotationsBox={x:e,y:n}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,n){this.size={width:e,height:n}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(let[n,r]of this.nodes)if(r.label===e)return n;return e}build(){let e=[];for(let n of this.nodes.values()){if(typeof n.x!="number"||typeof n.y!="number")throw new Error(`Node "${n.label}" is missing coordinates`);e.push(n)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},k=new Wt;function ht(){return D()["wardley-beta"]}u(ht,"getConfig");function xt(e,n,r,x,a,d,m,C,g){k.addNode({id:e,label:n,x:r,y:x,className:a,labelOffsetX:d,labelOffsetY:m,inertia:C,sourceStrategy:g})}u(xt,"addNode");function gt(e,n,r=!1,x,a){k.addLink({source:e,target:n,dashed:r,label:x,flow:a})}u(gt,"addLink");function yt(e,n,r){k.addTrend({nodeId:e,targetX:n,targetY:r})}u(yt,"addTrend");function ut(e,n,r){k.addAnnotation({number:e,coordinates:n,text:r})}u(ut,"addAnnotation");function mt(e,n,r){k.addNote({text:e,x:n,y:r})}u(mt,"addNote");function wt(e,n,r){k.addAccelerator({name:e,x:n,y:r})}u(wt,"addAccelerator");function kt(e,n,r){k.addDeaccelerator({name:e,x:n,y:r})}u(kt,"addDeaccelerator");function bt(e,n){k.setAnnotationsBox(e,n)}u(bt,"setAnnotationsBox");function $t(e,n){k.setSize(e,n)}u($t,"setSize");function vt(e){k.startPipeline(e)}u(vt,"startPipeline");function Pt(e,n){k.addPipelineComponent(e,n)}u(Pt,"addPipelineComponent");function Ct(e){k.setAxes(e)}u(Ct,"updateAxes");function St(e){return k.getNode(e)}u(St,"getNode");function Mt(e){return k.resolveNodeId(e)}u(Mt,"resolveNodeId");function Nt(){return k.build()}u(Nt,"getWardleyData");function zt(){k.clear(),et()}u(zt,"clear");var Dt={getConfig:ht,addNode:xt,addLink:gt,addTrend:yt,addAnnotation:ut,addNote:mt,addAccelerator:wt,addDeaccelerator:kt,setAnnotationsBox:bt,setSize:$t,startPipeline:vt,addPipelineComponent:Pt,updateAxes:Ct,getNode:St,resolveNodeId:Mt,getWardleyData:Nt,clear:zt,setAccTitle:at,getAccTitle:rt,setDiagramTitle:st,getDiagramTitle:it,getAccDescription:nt,setAccDescription:ot},Gt=["Genesis","Custom Built","Product","Commodity"],qt=u(()=>{let{themeVariables:e}=D();return{backgroundColor:e.wardley?.backgroundColor??e.background??"#fff",axisColor:e.wardley?.axisColor??"#000",axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??"#222",gridColor:e.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:e.wardley?.componentFill??"#fff",componentStroke:e.wardley?.componentStroke??"#000",componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??"#222",linkStroke:e.wardley?.linkStroke??"#000",evolutionStroke:e.wardley?.evolutionStroke??"#dc3545",annotationStroke:e.wardley?.annotationStroke??"#000",annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??"#222",annotationFill:e.wardley?.annotationFill??e.background??"#fff"}},"getTheme"),Ht=u(()=>{let e=D()["wardley-beta"];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},"getConfigValues"),jt=u((e,n,r,x)=>{V.debug(`Rendering Wardley map
2
+ `+e);let a=Ht(),d=qt(),m=a.nodeRadius*1.6,C=x.db,g=C.getWardleyData(),F=C.getDiagramTitle(),S=g.size?.width??a.width,b=g.size?.height??a.height,E=dt(n);E.selectAll("*").remove(),tt(E,b,S,a.useMaxWidth),E.attr("viewBox",`0 0 ${S} ${b}`);let v=E.append("g").attr("class","wardley-map"),q=E.append("defs");q.append("marker").attr("id",`arrow-${n}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),q.append("marker").attr("id",`link-arrow-end-${n}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),q.append("marker").attr("id",`link-arrow-start-${n}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),v.append("rect").attr("class","wardley-background").attr("width",S).attr("height",b).attr("fill",d.backgroundColor);let Y=S-a.padding*2,I=b-a.padding*2;F&&v.append("text").attr("class","wardley-title").attr("x",S/2).attr("y",a.padding/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(F);let z=u(t=>a.padding+t/100*Y,"projectX"),L=u(t=>b-a.padding-t/100*I,"projectY"),R=v.append("g").attr("class","wardley-axes");R.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1),R.append("line").attr("x1",a.padding).attr("x2",a.padding).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1);let Lt=g.axes.xLabel??"Evolution",Tt=g.axes.yLabel??"Visibility";R.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",a.padding+Y/2).attr("y",b-a.padding/4).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(Lt),R.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",a.padding/3).attr("y",a.padding+I/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${a.padding/3} ${a.padding+I/2})`).text(Tt);let B=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:Gt;if(B.length>0){let t=v.append("g").attr("class","wardley-stages"),s=g.axes.stageBoundaries,o=[];if(s&&s.length===B.length){let i=0;s.forEach(p=>{o.push({start:i,end:p}),i=p})}else{let i=1/B.length;B.forEach((p,l)=>{o.push({start:l*i,end:(l+1)*i})})}B.forEach((i,p)=>{let l=o[p],f=a.padding+l.start*Y,h=a.padding+l.end*Y,y=(f+h)/2;p>0&&t.append("line").attr("x1",f).attr("x2",f).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",y).attr("y",b-a.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(a.showGrid){let t=v.append("g").attr("class","wardley-grid");for(let s=1;s<4;s++){let o=s/4,i=a.padding+Y*o;t.append("line").attr("x1",i).attr("x2",i).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",a.padding).attr("x2",S-a.padding).attr("y1",b-a.padding-I*o).attr("y2",b-a.padding-I*o).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}let c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:z(t.x),y:L(t.y),node:t})}),g.pipelines.length>0){let t=v.append("g").attr("class","wardley-pipelines"),s=v.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(o=>{if(o.componentIds.length===0)return;let i=o.componentIds.map(h=>({id:h,pos:c.get(h),node:g.nodes.find(y=>y.id===h)})).filter(h=>h.pos&&h.node).sort((h,y)=>h.node.x-y.node.x);for(let h=0;h<i.length-1;h++){let y=i[h],w=i[h+1];s.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",y.pos.x).attr("y1",y.pos.y).attr("x2",w.pos.x).attr("y2",w.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let p=1/0,l=-1/0,f=0;if(o.componentIds.forEach(h=>{let y=c.get(h);y&&(p=Math.min(p,y.x),l=Math.max(l,y.x),f=y.y)}),p!==1/0&&l!==-1/0){let y=a.nodeRadius*4,w=f-y/2,P=c.get(o.nodeId);if(P){let N=(p+l)/2;P.x=N,P.y=w-m/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",p-15).attr("y",w).attr("width",l-p+30).attr("height",y).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}let Z=v.append("g").attr("class","wardley-links"),U=new Map;g.pipelines.forEach(t=>{U.set(t.nodeId,new Set(t.componentIds))});let J=g.links.filter(t=>!(!c.has(t.source)||!c.has(t.target)||U.get(t.target)?.has(t.source)));Z.selectAll("line").data(J).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{let s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?m/Math.sqrt(2):a.nodeRadius,l=o.x-s.x,f=o.y-s.y,h=Math.sqrt(l*l+f*f);return s.x+l/h*p}).attr("y1",t=>{let s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.source).isPipelineParent?m/Math.sqrt(2):a.nodeRadius,l=o.x-s.x,f=o.y-s.y,h=Math.sqrt(l*l+f*f);return s.y+f/h*p}).attr("x2",t=>{let s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?m/Math.sqrt(2):a.nodeRadius,l=s.x-o.x,f=s.y-o.y,h=Math.sqrt(l*l+f*f);return o.x+l/h*p}).attr("y2",t=>{let s=c.get(t.source),o=c.get(t.target),p=g.nodes.find(y=>y.id===t.target).isPipelineParent?m/Math.sqrt(2):a.nodeRadius,l=s.x-o.x,f=s.y-o.y,h=Math.sqrt(l*l+f*f);return o.y+f/h*p}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${n})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${n})`:null),Z.selectAll("text").data(J.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{let s=c.get(t.source),o=c.get(t.target),i=(s.x+o.x)/2,p=o.y-s.y,l=o.x-s.x,f=Math.sqrt(l*l+p*p),h=8,y=p/f;return i+y*h}).attr("y",t=>{let s=c.get(t.source),o=c.get(t.target),i=(s.y+o.y)/2,p=o.x-s.x,l=o.y-s.y,f=Math.sqrt(p*p+l*l),h=8,y=-p/f;return i+y*h}).attr("fill",d.axisTextColor).attr("font-size",a.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{let s=c.get(t.source),o=c.get(t.target),i=(s.x+o.x)/2,p=(s.y+o.y)/2,l=o.x-s.x,f=o.y-s.y,h=Math.sqrt(l*l+f*f),y=8,w=f/h,P=-l/h,N=i+w*y,O=p+P*y,X=Math.atan2(f,l)*180/Math.PI;return(X>90||X<-90)&&(X+=180),`rotate(${X} ${N} ${O})`}).text(t=>t.label);let At=v.append("g").attr("class","wardley-trends"),Xt=g.trends.map(t=>{let s=c.get(t.nodeId);if(!s)return null;let o=z(t.targetX),i=L(t.targetY),p=o-s.x,l=i-s.y,f=Math.sqrt(p*p+l*l),h=a.nodeRadius+2,y=f>h?o-p/f*h:o,w=f>h?i-l/f*h:i;return{origin:s,targetX:o,targetY:i,adjustedX2:y,adjustedY2:w}}).filter(t=>t!==null);At.selectAll("line").data(Xt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${n})`);let M=v.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));M.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);let T=M.filter(t=>t.sourceStrategy==="market");T.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",a.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);let H=a.nodeRadius*.7,$=a.nodeRadius*1.2;if(T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-$).attr("x2",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-$).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-$).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),M.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-m/2).attr("y",t=>c.get(t.id).y-m/2).attr("width",m).attr("height",m).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),M.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{let s=c.get(t.id),o=t.isPipelineParent?m/2+15:a.nodeRadius+15;return t.sourceStrategy&&(o+=a.nodeRadius+10),s.x+o}).attr("y1",t=>{let s=c.get(t.id),o=t.isPipelineParent?m:a.nodeRadius*2;return s.y-o/2}).attr("x2",t=>{let s=c.get(t.id),o=t.isPipelineParent?m/2+15:a.nodeRadius+15;return t.sourceStrategy&&(o+=a.nodeRadius+10),s.x+o}).attr("y2",t=>{let s=c.get(t.id),o=t.isPipelineParent?m:a.nodeRadius*2;return s.y+o/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),M.append("text").attr("x",t=>{let s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?s.x+t.labelOffsetX:s.x;let o=a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(o+=10);let i=t.labelOffsetX??o;return s.x+i}).attr("y",t=>{let s=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?s.y+t.labelOffsetY:s.y-3;let o=-a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(o-=10);let i=t.labelOffsetY??o;return s.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",a.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){let t=v.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(s=>{let o=s.coordinates.map(i=>({x:z(i.x),y:L(i.y)}));if(o.length>1)for(let i=0;i<o.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",o[i].x).attr("y1",o[i].y).attr("x2",o[i+1].x).attr("y2",o[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");o.forEach(i=>{let p=t.append("g").attr("class","wardley-annotation");p.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),p.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.number)})}),g.annotationsBox){let s=z(g.annotationsBox.x),o=L(g.annotationsBox.y),i=10,p=16,l=11,f=t.append("g").attr("class","wardley-annotations-box"),h=[...g.annotations].filter(w=>w.text).sort((w,P)=>w.number-P.number),y=[];if(h.forEach((w,P)=>{let N=f.append("text").attr("x",s+i).attr("y",o+i+(P+1)*p).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${w.number}. ${w.text}`);y.push(N)}),y.length>0){let w=0,P=0;y.forEach(j=>{let W=j.node(),Bt=W.getComputedTextLength();w=Math.max(w,Bt);let Ft=W.getBBox();P=Math.max(P,Ft.height)});let N=w+i*2+105,O=h.length*p+i*2+P/2,X=a.padding,Et=S-a.padding-N,Yt=a.padding,It=b-a.padding-O;s=Math.max(X,Math.min(s,Et)),o=Math.max(Yt,Math.min(o,It)),y.forEach((j,W)=>{j.attr("x",s+i).attr("y",o+i+(W+1)*p)}),f.insert("rect","text").attr("x",s).attr("y",o).attr("width",N).attr("height",O).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){let t=v.append("g").attr("class","wardley-notes");g.notes.forEach(s=>{let o=z(s.x),i=L(s.y);t.append("text").attr("x",o).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.text)})}if(g.accelerators.length>0){let t=v.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(s=>{let o=z(s.x),i=L(s.y),p=60,l=30,f=20,h=`
3
+ M ${o} ${i-l/2}
4
+ L ${o+p-f} ${i-l/2}
5
+ L ${o+p-f} ${i-l/2-8}
6
+ L ${o+p} ${i}
7
+ L ${o+p-f} ${i+l/2+8}
8
+ L ${o+p-f} ${i+l/2}
9
+ L ${o} ${i+l/2}
10
+ Z
11
+ `;t.append("path").attr("d",h).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),t.append("text").attr("x",o+p/2).attr("y",i+l/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.name)})}if(g.deaccelerators.length>0){let t=v.append("g").attr("class","wardley-deaccelerators");g.deaccelerators.forEach(s=>{let o=z(s.x),i=L(s.y),p=60,l=30,f=20,h=`
12
+ M ${o+p} ${i-l/2}
13
+ L ${o+f} ${i-l/2}
14
+ L ${o+f} ${i-l/2-8}
15
+ L ${o} ${i}
16
+ L ${o+f} ${i+l/2+8}
17
+ L ${o+f} ${i+l/2}
18
+ L ${o+p} ${i+l/2}
19
+ Z
20
+ `;t.append("path").attr("d",h).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),t.append("text").attr("x",o+p/2).attr("y",i+l/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(s.name)})}},"draw"),Vt={draw:jt},_t=u(({wardley:e}={})=>{let n=K(),r=Q(),x=_(n,r.themeVariables),a=_(x.wardley,e);return`
21
+ .wardley-background {
22
+ fill: ${a.backgroundColor};
23
+ }
24
+ .wardley-axes line, .wardley-axes path {
25
+ stroke: ${a.axisColor};
26
+ }
27
+ .wardley-axis-label {
28
+ fill: ${a.axisTextColor};
29
+ }
30
+ .wardley-stage-label {
31
+ fill: ${a.axisTextColor};
32
+ }
33
+ .wardley-grid line {
34
+ stroke: ${a.gridColor};
35
+ }
36
+ .wardley-node circle {
37
+ fill: ${a.componentFill};
38
+ stroke: ${a.componentStroke};
39
+ }
40
+ .wardley-node-label {
41
+ fill: ${a.componentLabelColor};
42
+ }
43
+ .wardley-link {
44
+ stroke: ${a.linkStroke};
45
+ }
46
+ .wardley-link--dashed {
47
+ stroke-dasharray: 4 4;
48
+ }
49
+ .wardley-link-label {
50
+ fill: ${a.axisTextColor};
51
+ }
52
+ .wardley-trend line {
53
+ stroke: ${a.evolutionStroke};
54
+ }
55
+ .wardley-annotation-line {
56
+ stroke: ${a.annotationStroke};
57
+ }
58
+ .wardley-annotation circle {
59
+ fill: ${a.annotationFill};
60
+ stroke: ${a.annotationStroke};
61
+ }
62
+ .wardley-annotation text {
63
+ fill: ${a.annotationTextColor};
64
+ }
65
+ .wardley-annotations-box rect {
66
+ fill: ${a.annotationFill};
67
+ stroke: ${a.annotationStroke};
68
+ }
69
+ .wardley-annotations-box text {
70
+ fill: ${a.annotationTextColor};
71
+ }
72
+ .wardley-pipeline-box {
73
+ stroke: ${a.componentStroke};
74
+ }
75
+ .wardley-notes text {
76
+ fill: ${a.axisTextColor};
77
+ }
78
+ `},"styles"),re={parser:ft,db:Dt,renderer:Vt,styles:_t};export{re as diagram};
@@ -0,0 +1,7 @@
1
+ import{a as Gt}from"./chunk-LZTAJOGZ.js";import{d as qt}from"./chunk-ENUKY65A.js";import"./chunk-HHYS5L3R.js";import{p as yt}from"./chunk-GTJDAHEV.js";import"./chunk-XLJVPE6C.js";import{C as nt,I as Wt,P as Ft,U as Xt,V as Yt,W as Nt,X as Ht,Y as $t,Z as Ut,_ as ft,p as Ot,r as Vt}from"./chunk-M3XBBO6R.js";import{H as bt,b as xt,n as pt,o as mt}from"./chunk-W4ELJFHG.js";import{a}from"./chunk-UAGOPMXU.js";import"./chunk-PHKIAKHS.js";var wt=(function(){var t=a(function(z,r,h,g){for(h=h||{},g=z.length;g--;h[z[g]]=r);return h},"o"),e=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],d=[1,6],l=[1,7],f=[1,5,10,12,14,16,18,19,21,23,36,37,38],u=[1,25],A=[1,26],R=[1,28],_=[1,29],B=[1,30],F=[1,31],X=[1,32],v=[1,33],V=[1,34],Y=[1,35],N=[1,36],b=[1,37],E=[1,43],c=[1,42],L=[1,47],I=[1,50],w=[1,10,12,14,16,18,19,21,23,36,37,38],$=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],D=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],Q=[1,65],S=[26,28],y={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:a(function(r,h,g,x,k,o,U){var p=o.length-1;switch(k){case 5:x.setOrientation(o[p]);break;case 9:x.setDiagramTitle(o[p].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[p]);break;case 13:x.setLineData(o[p-1],o[p]);break;case 14:x.setBarData({text:"",type:"text"},o[p]);break;case 15:x.setBarData(o[p-1],o[p]);break;case 16:this.$=o[p].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[p].trim(),x.setAccDescription(this.$);break;case 19:this.$=o[p-1];break;case 20:case 30:this.$=[o[p-2],...o[p]];break;case 21:case 31:this.$=[o[p]];break;case 22:this.$={value:Number(o[p-1]),label:o[p]};break;case 23:this.$={value:Number(o[p]),label:""};break;case 24:x.setXAxisTitle(o[p]);break;case 25:x.setXAxisTitle(o[p-1]);break;case 26:x.setXAxisTitle({type:"text",text:""});break;case 27:x.setXAxisBand(o[p]);break;case 28:x.setXAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 29:this.$=o[p-1];break;case 32:x.setYAxisTitle(o[p]);break;case 33:x.setYAxisTitle(o[p-1]);break;case 34:x.setYAxisTitle({type:"text",text:""});break;case 35:x.setYAxisRangeData(Number(o[p-2]),Number(o[p]));break;case 39:this.$={text:o[p],type:"text"};break;case 40:this.$={text:o[p],type:"text"};break;case 41:this.$={text:o[p],type:"markdown"};break;case 42:this.$=o[p];break;case 43:this.$=o[p-1]+""+o[p];break}},"anonymous"),table:[t(e,i,{3:1,4:2,7:4,5:s,36:n,37:d,38:l}),{1:[3]},t(e,i,{4:2,7:4,3:8,5:s,36:n,37:d,38:l}),t(e,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],36:n,37:d,38:l}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(f,[2,36]),t(f,[2,37]),t(f,[2,38]),{1:[2,1]},t(e,i,{4:2,7:4,3:21,5:s,36:n,37:d,38:l}),{1:[2,3]},t(f,[2,5]),t(e,[2,7],{4:22,36:n,37:d,38:l}),{11:23,30:u,39:24,40:A,41:27,42:R,43:_,44:B,45:F,46:X,47:v,48:V,49:Y,50:N,51:b},{11:39,13:38,24:E,29:c,30:u,31:40,32:41,39:24,40:A,41:27,42:R,43:_,44:B,45:F,46:X,47:v,48:V,49:Y,50:N,51:b},{11:45,15:44,29:L,30:u,35:46,39:24,40:A,41:27,42:R,43:_,44:B,45:F,46:X,47:v,48:V,49:Y,50:N,51:b},{11:49,17:48,24:I,30:u,39:24,40:A,41:27,42:R,43:_,44:B,45:F,46:X,47:v,48:V,49:Y,50:N,51:b},{11:52,17:51,24:I,30:u,39:24,40:A,41:27,42:R,43:_,44:B,45:F,46:X,47:v,48:V,49:Y,50:N,51:b},{20:[1,53]},{22:[1,54]},t(w,[2,18]),{1:[2,2]},t(w,[2,8]),t(w,[2,9]),t($,[2,39],{41:55,42:R,43:_,44:B,45:F,46:X,47:v,48:V,49:Y,50:N,51:b}),t($,[2,40]),t($,[2,41]),t(D,[2,42]),t(D,[2,44]),t(D,[2,45]),t(D,[2,46]),t(D,[2,47]),t(D,[2,48]),t(D,[2,49]),t(D,[2,50]),t(D,[2,51]),t(D,[2,52]),t(D,[2,53]),t(w,[2,10]),t(w,[2,24],{32:41,31:56,24:E,29:c}),t(w,[2,26]),t(w,[2,27]),{33:[1,57]},{11:59,30:u,34:58,39:24,40:A,41:27,42:R,43:_,44:B,45:F,46:X,47:v,48:V,49:Y,50:N,51:b},t(w,[2,11]),t(w,[2,32],{35:60,29:L}),t(w,[2,34]),{33:[1,61]},t(w,[2,12]),{17:62,24:I},{25:63,27:64,29:Q},t(w,[2,14]),{17:66,24:I},t(w,[2,16]),t(w,[2,17]),t(D,[2,43]),t(w,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},t(w,[2,33]),{29:[1,70]},t(w,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},t(S,[2,23],{30:[1,73]}),t(w,[2,15]),t(w,[2,28]),t(w,[2,29]),{11:59,30:u,34:74,39:24,40:A,41:27,42:R,43:_,44:B,45:F,46:X,47:v,48:V,49:Y,50:N,51:b},t(w,[2,35]),t(w,[2,19]),{25:75,27:64,29:Q},t(S,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:a(function(r,h){if(h.recoverable)this.trace(r);else{var g=new Error(r);throw g.hash=h,g}},"parseError"),parse:a(function(r){var h=this,g=[0],x=[],k=[null],o=[],U=this.table,p="",it=0,Et=0,It=0,fe=2,Mt=1,pe=o.slice.call(arguments,1),T=Object.create(this.lexer),G={yy:{}};for(var lt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,lt)&&(G.yy[lt]=this.yy[lt]);T.setInput(r,G.yy),G.yy.lexer=T,G.yy.parser=this,typeof T.yylloc>"u"&&(T.yylloc={});var ct=T.yylloc;o.push(ct);var me=T.options&&T.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function be(M){g.length=g.length-2*M,k.length=k.length-M,o.length=o.length-M}a(be,"popStack");function Bt(){var M;return M=x.pop()||T.lex()||Mt,typeof M!="number"&&(M instanceof Array&&(x=M,M=x.pop()),M=h.symbols_[M]||M),M}a(Bt,"lex");for(var P,gt,q,O,ze,ut,K={},st,H,zt,at;;){if(q=g[g.length-1],this.defaultActions[q]?O=this.defaultActions[q]:((P===null||typeof P>"u")&&(P=Bt()),O=U[q]&&U[q][P]),typeof O>"u"||!O.length||!O[0]){var dt="";at=[];for(st in U[q])this.terminals_[st]&&st>fe&&at.push("'"+this.terminals_[st]+"'");T.showPosition?dt="Parse error on line "+(it+1)+`:
2
+ `+T.showPosition()+`
3
+ Expecting `+at.join(", ")+", got '"+(this.terminals_[P]||P)+"'":dt="Parse error on line "+(it+1)+": Unexpected "+(P==Mt?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(dt,{text:T.match,token:this.terminals_[P]||P,line:T.yylineno,loc:ct,expected:at})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+P);switch(O[0]){case 1:g.push(P),k.push(T.yytext),o.push(T.yylloc),g.push(O[1]),P=null,gt?(P=gt,gt=null):(Et=T.yyleng,p=T.yytext,it=T.yylineno,ct=T.yylloc,It>0&&It--);break;case 2:if(H=this.productions_[O[1]][1],K.$=k[k.length-H],K._$={first_line:o[o.length-(H||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(H||1)].first_column,last_column:o[o.length-1].last_column},me&&(K._$.range=[o[o.length-(H||1)].range[0],o[o.length-1].range[1]]),ut=this.performAction.apply(K,[p,Et,it,G.yy,O[1],k,o].concat(pe)),typeof ut<"u")return ut;H&&(g=g.slice(0,-1*H*2),k=k.slice(0,-1*H),o=o.slice(0,-1*H)),g.push(this.productions_[O[1]][0]),k.push(K.$),o.push(K._$),zt=U[g[g.length-2]][g[g.length-1]],g.push(zt);break;case 3:return!0}}return!0},"parse")},W=(function(){var z={EOF:1,parseError:a(function(h,g){if(this.yy.parser)this.yy.parser.parseError(h,g);else throw new Error(h)},"parseError"),setInput:a(function(r,h){return this.yy=h||this.yy||{},this._input=r,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:a(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var h=r.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:a(function(r){var h=r.length,g=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var x=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),g.length-1&&(this.yylineno-=g.length-1);var k=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:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[k[0],k[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(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
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(r){this.unput(this.match.slice(r))},"less"),pastInput:a(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var r=this.pastInput(),h=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
5
+ `+h+"^"},"showPosition"),test_match:a(function(r,h){var g,x,k;if(this.options.backtrack_lexer&&(k={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(k.yylloc.range=this.yylloc.range.slice(0))),x=r[0].match(/(?:\r\n?|\n).*/g),x&&(this.yylineno+=x.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(r[0].length),this.matched+=r[0],g=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var o in k)this[o]=k[o];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,h,g,x;this._more||(this.yytext="",this.match="");for(var k=this._currentRules(),o=0;o<k.length;o++)if(g=this._input.match(this.rules[k[o]]),g&&(!h||g[0].length>h[0].length)){if(h=g,x=o,this.options.backtrack_lexer){if(r=this.test_match(g,k[o]),r!==!1)return r;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(r=this.test_match(h,k[x]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var h=this.next();return h||this.lex()},"lex"),begin:a(function(h){this.conditionStack.push(h)},"begin"),popState:a(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:a(function(h){this.begin(h)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(h,g,x,k){var o=k;switch(x){case 0:break;case 1:break;case 2:return this.popState(),36;break;case 3:return this.popState(),36;break;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";break;case 18:return this.pushState("axis_data"),"Y_AXIS";break;case 19:return this.pushState("axis_band_data"),24;break;case 20:return 33;case 21:return this.pushState("data"),16;break;case 22:return this.pushState("data"),18;break;case 23:return this.pushState("data_inner"),24;break;case 24:return 29;case 25:return this.popState(),26;break;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return z})();y.lexer=W;function C(){this.yy={}}return a(C,"Parser"),C.prototype=y,y.Parser=C,new C})();wt.parser=wt;var ye=wt;function ot(t){return t.type==="bar"}a(ot,"isBarPlot");function rt(t){return t.type==="band"}a(rt,"isBandAxisData");function Z(t){return t.type==="linear"}a(Z,"isLinearAxisData");var St=class{constructor(t){this.parentGroup=t}static{a(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,e){if(!this.parentGroup)return{width:t.reduce((u,A)=>Math.max(A.length,u),0)*e,height:e};let i={width:0,height:0},s=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",e),n=s.node()?.getScreenCTM?.(),d=a(u=>u&&u>0?u:1,"toScale"),l=d(n?.a),f=d(n?.d);for(let u of t){let A=qt(s,1,u),R=A?A.width/l:u.length*e,_=A?A.height/f:e;i.width=Math.max(i.width,R),i.height=Math.max(i.height,_)}return s.remove(),i}},jt=.7,Qt=.2,Kt=class{constructor(t,e,i,s){this.axisConfig=t,this.title=e,this.textDimensionCalculator=i,this.axisThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{a(this,"BaseAxis")}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){let t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){jt*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(jt*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let e=t.height;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let i=this.getLabelDimension(),s=Qt*t.width;this.outerPadding=Math.min(i.width/2,s);let n=i.height;this.axisPosition==="bottom"&&this.normalizedLabelRotationInRad!==0&&(n=Math.max(n,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*i.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*i.height))),n+=this.axisConfig.labelPadding*2,this.labelTextHeight=i.height,n<=e&&(e-=n,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let i=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),s=i.height+this.axisConfig.titlePadding*2;this.titleTextHeight=i.height,s<=e&&(e-=s,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-e}calculateSpaceIfDrawnVertical(t){let e=t.width;if(this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let i=this.getLabelDimension(),s=Qt*t.height;this.outerPadding=Math.min(i.height/2,s);let n=i.width+this.axisConfig.labelPadding*2;n<=e&&(e-=n,this.showLabel=!0)}if(this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let i=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),s=i.height+this.axisConfig.titlePadding*2;this.titleTextHeight=i.height,s<=e&&(e-=s,this.showTitle=!0)}this.boundingRect.width=t.width-e,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateOffsetByRotation(t){let e=this.normalizedLabelRotationInRad;return e===0?0:Math.sin(e)*this.getLabelDimension()[t]/2}getDrawableElementsForLeftAxis(){let t=[];if(this.showAxisLine){let e=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${e},${this.boundingRect.y} L ${e},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(e),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let e=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(i=>({path:`M ${e},${this.getScaleValue(i)} L ${e-this.axisConfig.tickLength},${this.getScaleValue(i)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){let t=[];if(this.showAxisLine){let e=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e)+this.calculateOffsetByRotation("height"),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation("width")),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:this.normalizedLabelRotationInRad*180/Math.PI,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let e=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(i=>({path:`M ${this.getScaleValue(i)},${e} L ${this.getScaleValue(i)},${e+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){let t=[];if(this.showAxisLine){let e=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},${e}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let e=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(i=>({path:`M ${this.getScaleValue(i)},${e+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(i)},${e+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},we=class extends Kt{static{a(this,"BandAxis")}constructor(t,e,i,s,n){super(t,s,n,e),this.categories=i,this.scale=pt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=pt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),xt.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},Ae=class extends Kt{static{a(this,"LinearAxis")}constructor(t,e,i,s,n){super(t,s,n,e),this.domain=i,this.scale=mt().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=mt().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function At(t,e,i,s){let n=new St(s);return rt(t)?new we(e,i,t.categories,t.title,n):new Ae(e,i,[t.min,t.max],t.title,n)}a(At,"getAxis");var ke=class{constructor(t,e,i,s){this.textDimensionCalculator=t,this.chartConfig=e,this.chartData=i,this.chartThemeConfig=s,this.titleWidth=0,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{a(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){let e=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),i=Math.max(e.width,t.width),s=e.height+2*this.chartConfig.titlePadding;return s<=t.height&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=i,this.boundingRect.height=s,this.titleWidth=e.width,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}alignTo(t,e){let i=Math.min(this.titleWidth,this.chartConfig.width)/2,s=Math.min(Math.max((t+e)/2,i),this.chartConfig.width-i);this.boundingRect.x=s-i,this.boundingRect.width=i*2}getDrawableElements(){let t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}};function Zt(t,e,i,s){let n=new St(s);return new ke(n,t,e,i)}a(Zt,"getChartTitleComponent");var Ce=.75,Se=.5,Re=.35;function kt(t){return{fontSize:t,markerSize:t*Ce,markerSpacing:t*Re,itemSpacing:t*Se}}a(kt,"getLegendLayout");var _e=class{constructor(t,e,i,s){this.textDimensionCalculator=t,this.chartConfig=e,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}static{a(this,"ChartLegend")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter(u=>u.title):[],this.visiblePlots.length===0)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};let{fontSize:e,markerSize:i,markerSpacing:s,itemSpacing:n}=kt(this.chartConfig.legendFontSize),d=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map(u=>u.title),e),l=this.chartConfig.legendPadding*2+i+s+d.width,f=this.chartConfig.legendPadding*2+this.visiblePlots.length*e+(this.visiblePlots.length-1)*n;return l<=t.width&&f<=t.height?(this.boundingRect.width=l,this.boundingRect.height=f):(this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(this.visiblePlots.length===0)return[];let{fontSize:t,markerSize:e,markerSpacing:i,itemSpacing:s}=kt(this.chartConfig.legendFontSize),n=t+s,d=this.boundingRect.x+this.chartConfig.legendPadding,l=this.boundingRect.y+this.chartConfig.legendPadding,f=[],u=[];for(let[A,R]of this.visiblePlots.entries())if(ot(R))f.push({x:d,y:l+A*n,width:e,height:e,fill:R.fill,strokeFill:R.fill,strokeWidth:0});else{let _=l+A*n+e/2;u.push({path:`M ${d},${_} L ${d+e},${_}`,strokeFill:R.strokeFill,strokeWidth:R.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:f},{groupTexts:["legend","markers"],type:"path",data:u},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((A,R)=>({text:A.title,x:d+e+i,y:l+R*n+e/2,fill:this.chartThemeConfig.legendTextColor,fontSize:t,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};function Jt(t,e,i,s){let n=new St(s);return new _e(n,t,e,i)}a(Jt,"getChartLegendComponent");var Te=class{constructor(t,e,i,s,n){this.plotData=t,this.xAxis=e,this.yAxis=i,this.orientation=s,this.plotIndex=n}static{a(this,"LinePlot")}getDrawableElement(){let t=this.plotData.data.map(s=>[this.xAxis.getScaleValue(s[0]),this.yAxis.getScaleValue(s[1])]),e;if(this.orientation==="horizontal"?e=bt().y(s=>s[0]).x(s=>s[1])(t):e=bt().x(s=>s[0]).y(s=>s[1])(t),!e)return[];let i=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:e,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let d=[];for(let[l,[f,u]]of t.entries()){let A=this.plotData.pointLabels[l];A&&(this.orientation==="horizontal"?d.push({x:u+10,y:f,text:A,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0}):d.push({x:f,y:u-10,text:A,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0}))}d.length>0&&i.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:d})}return i}},De=class{constructor(t,e,i,s,n,d){this.barData=t,this.boundingRect=e,this.xAxis=i,this.yAxis=s,this.orientation=n,this.plotIndex=d}static{a(this,"BarPlot")}getDrawableElement(){let t=this.barData.data.map(n=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]),i=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),s=i/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(n=>({x:this.boundingRect.x,y:n[0]-s,height:i,width:n[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(n=>({x:n[0]-s,y:n[1],width:i,height:this.boundingRect.y+this.boundingRect.height-n[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},Pe=class{constructor(t,e,i){this.chartConfig=t,this.chartData=e,this.chartThemeConfig=i,this.boundingRect={x:0,y:0,width:0,height:0}}static{a(this,"BasePlot")}setAxes(t,e){this.xAxis=t,this.yAxis=e}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let t=[];for(let[e,i]of this.chartData.plots.entries())switch(i.type){case"line":{let s=new Te(i,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...s.getDrawableElement())}break;case"bar":{let s=new De(i,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);t.push(...s.getDrawableElement())}break}return t}};function te(t,e,i){return new Pe(t,e,i)}a(te,"getPlotComponent");var Le=class{constructor(t,e,i,s){this.chartConfig=t,this.chartData=e,this.componentStore={title:Zt(t,e,i,s),plot:te(t,e,i),legend:Jt(t,e,i,s),xAxis:At(e.xAxis,t.xAxis,{titleColor:i.xAxisTitleColor,labelColor:i.xAxisLabelColor,tickColor:i.xAxisTickColor,axisLineColor:i.xAxisLineColor},s),yAxis:At(e.yAxis,t.yAxis,{titleColor:i.yAxisTitleColor,labelColor:i.yAxisLabelColor,tickColor:i.yAxisTickColor,axisLineColor:i.yAxisLineColor},s)}}static{a(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,i=0,s=0,n={width:0,height:0},d=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),l=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:d,height:l});t-=f.width,e-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),s=f.height,e-=f.height,this.componentStore.xAxis.setAxisPosition("bottom"),f=this.componentStore.xAxis.calculateSpace({width:t,height:e}),e-=f.height,this.componentStore.yAxis.setAxisPosition("left"),f=this.componentStore.yAxis.calculateSpace({width:t,height:e}),i=f.width,t-=f.width,n=this.componentStore.legend.calculateSpace({width:t,height:l}),t-=n.width,t>0&&(d+=t,t=0),e>0&&(l+=e,e=0),this.componentStore.plot.calculateSpace({width:d,height:l}),this.componentStore.plot.setBoundingBoxXY({x:i,y:s}),this.componentStore.title.alignTo(i,i+d),this.componentStore.legend.setBoundingBoxXY({x:i+d,y:s+Math.max((l-n.height)/2,0)}),this.componentStore.xAxis.setRange([i,i+d]),this.componentStore.xAxis.setBoundingBoxXY({x:i,y:s+l}),this.componentStore.yAxis.setRange([s,s+l]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some(u=>ot(u))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,i=0,s=0,n=0,d={width:0,height:0},l=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),f=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),u=this.componentStore.plot.calculateSpace({width:l,height:f});t-=u.width,e-=u.height,u=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e}),i=u.height,e-=u.height,this.componentStore.xAxis.setAxisPosition("left"),u=this.componentStore.xAxis.calculateSpace({width:t,height:e}),t-=u.width,s=u.width,this.componentStore.yAxis.setAxisPosition("top"),u=this.componentStore.yAxis.calculateSpace({width:t,height:e}),e-=u.height,n=i+u.height,d=this.componentStore.legend.calculateSpace({width:t,height:f}),t-=d.width,t>0&&(l+=t,t=0),e>0&&(f+=e,e=0),this.componentStore.plot.calculateSpace({width:l,height:f}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.title.alignTo(s,s+l),this.componentStore.legend.setBoundingBoxXY({x:s+l,y:n+Math.max((f-d.height)/2,0)}),this.componentStore.yAxis.setRange([s,s+l]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:i}),this.componentStore.xAxis.setRange([n,n+f]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(A=>ot(A))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let e of Object.values(this.componentStore))t.push(...e.getDrawableElements());return t}},ve=class{static{a(this,"XYChartBuilder")}static build(t,e,i,s){return new Le(t,e,i,s).getDrawableElement()}},J=0,ee,tt=Tt(),et=_t(),m=Dt(),Ct=et.plotColorPalette.split(",").map(t=>t.trim()),ht=!1,Rt=!1;function _t(){let t=Ot(),e=nt();return yt(t.xyChart,e.themeVariables.xyChart)}a(_t,"getChartDefaultThemeConfig");function Tt(){let t=nt();return yt(Vt.xyChart,t.xyChart)}a(Tt,"getChartDefaultConfig");function Dt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}a(Dt,"getChartDefaultData");function j(t){let e=nt();return Wt(t.trim(),e)}a(j,"textSanitizer");function ie(t){ee=t}a(ie,"setTmpSVGG");function se(t){t==="horizontal"?tt.chartOrientation="horizontal":tt.chartOrientation="vertical"}a(se,"setOrientation");function ae(t){m.xAxis.title=j(t.text)}a(ae,"setXAxisTitle");function Pt(t,e){m.xAxis={type:"linear",title:m.xAxis.title,min:t,max:e},ht=!0}a(Pt,"setXAxisRangeData");function ne(t){m.xAxis={type:"band",title:m.xAxis.title,categories:t.map(e=>j(e.text))},ht=!0}a(ne,"setXAxisBand");function oe(t){m.yAxis.title=j(t.text)}a(oe,"setYAxisTitle");function re(t,e){m.yAxis={type:"linear",title:m.yAxis.title,min:t,max:e},Rt=!0}a(re,"setYAxisRangeData");function he(t){let e=Math.min(...t),i=Math.max(...t),s=Z(m.yAxis)?m.yAxis.min:1/0,n=Z(m.yAxis)?m.yAxis.max:-1/0;m.yAxis={type:"linear",title:m.yAxis.title,min:Math.min(s,e),max:Math.max(n,i)}}a(he,"setYAxisRangeFromPlotData");function Lt(t){let e=[];if(t.length===0)return e;if(!ht){let i=Z(m.xAxis)?m.xAxis.min:1/0,s=Z(m.xAxis)?m.xAxis.max:-1/0;Pt(Math.min(i,1),Math.max(s,t.length))}if(rt(m.xAxis)&&t.length>m.xAxis.categories.length&&(t=t.slice(0,m.xAxis.categories.length)),Rt||he(t),rt(m.xAxis)&&(e=m.xAxis.categories.map((i,s)=>[i,t[s]])),Z(m.xAxis)){let i=m.xAxis.min,s=m.xAxis.max;if(t.length===1)e=[[`${i}`,t[0]]];else{let n=(s-i)/(t.length-1);e=t.map((d,l)=>[`${i+l*n}`,d])}}return e}a(Lt,"transformDataWithoutCategory");function vt(t){return Ct[t===0?0:t%Ct.length]}a(vt,"getPlotColorFromPalette");function le(t,e){let i=e.map(l=>l.value),s=e.map(l=>l.label?j(l.label):""),n=Lt(i),d=s.some(l=>l!=="");m.plots.push({type:"line",title:j(t.text),strokeFill:vt(J),strokeWidth:2,data:n,...d?{pointLabels:s}:{}}),J++}a(le,"setLineData");function ce(t,e){let i=e.map(n=>n.value),s=Lt(i);m.plots.push({type:"bar",title:j(t.text),fill:vt(J),data:s}),J++}a(ce,"setBarData");function ge(){if(m.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return m.title=ft(),ve.build(tt,m,et,ee)}a(ge,"getDrawableElem");function ue(){return et}a(ue,"getChartThemeConfig");function de(){return tt}a(de,"getChartConfig");function xe(){return m}a(xe,"getXYChartData");var Ee=a(function(){Xt(),J=0,tt=Tt(),m=Dt(),et=_t(),Ct=et.plotColorPalette.split(",").map(t=>t.trim()),ht=!1,Rt=!1},"clear"),Ie={getDrawableElem:ge,clear:Ee,setAccTitle:Yt,getAccTitle:Nt,setDiagramTitle:Ut,getDiagramTitle:ft,getAccDescription:$t,setAccDescription:Ht,setOrientation:se,setXAxisTitle:ae,setXAxisRangeData:Pt,setXAxisBand:ne,setYAxisTitle:oe,setYAxisRangeData:re,setLineData:le,setBarData:ce,setTmpSVGG:ie,getChartThemeConfig:ue,getChartConfig:de,getXYChartData:xe},Me=a((t,e,i,s)=>{let n=s.db,d=n.getChartThemeConfig(),l=n.getChartConfig(),f=n.getXYChartData().plots[0].data.map(b=>b[1]);function u(b){return b==="top"?"text-before-edge":"middle"}a(u,"getDominantBaseLine");function A(b){return b==="left"?"start":b==="right"?"end":"middle"}a(A,"getTextAnchor");function R(b){return`translate(${b.x}, ${b.y}) rotate(${b.rotation||0})`}a(R,"getTextTransformation"),xt.debug(`Rendering xychart chart
7
+ `+t);let _=Gt(e),B=_.append("g").attr("class","main"),F=B.append("rect").attr("width",l.width).attr("height",l.height).attr("class","background");Ft(_,l.height,l.width,!0),_.attr("viewBox",`0 0 ${l.width} ${l.height}`),F.attr("fill",d.backgroundColor),n.setTmpSVGG(_.append("g").attr("class","mermaid-tmp-group"));let X=n.getDrawableElem(),v={};function V(b){let E=B,c="";for(let[L]of b.entries()){let I=B;L>0&&v[c]&&(I=v[c]),c+=b[L],E=v[c],E||(E=v[c]=I.append("g").attr("class",b[L]))}return E}a(V,"getGroup");for(let b of X){if(b.data.length===0)continue;let E=V(b.groupTexts);switch(b.type){case"rect":if(E.selectAll("rect").data(b.data).enter().append("rect").attr("x",c=>c.x).attr("y",c=>c.y).attr("width",c=>c.width).attr("height",c=>c.height).attr("fill",c=>c.fill).attr("stroke",c=>c.strokeFill).attr("stroke-width",c=>c.strokeWidth),l.showDataLabel){let c=l.showDataLabelOutsideBar;if(l.chartOrientation==="horizontal"){let L=function(y,W){let{data:C,label:z}=y;return W*z.length*I<=C.width-w};var Y=L;a(L,"fitsHorizontally");let I=.7,w=10,$=b.data.map((y,W)=>({data:y,label:f[W].toString()})).filter(y=>y.data.width>0&&y.data.height>0),D=$.map(y=>{let{data:W}=y,C=W.height*.7;for(;!L(y,C)&&C>0;)C-=1;return C}),Q=Math.floor(Math.min(...D)),S=a(y=>c?y.data.x+y.data.width+w:y.data.x+y.data.width-w,"determineLabelXPosition");E.selectAll("text").data($).enter().append("text").attr("x",S).attr("y",y=>y.data.y+y.data.height/2).attr("text-anchor",c?"start":"end").attr("dominant-baseline","middle").attr("fill",d.dataLabelColor).attr("font-size",`${Q}px`).text(y=>y.label)}else{let L=function(S,y,W){let{data:C,label:z}=S,h=y*z.length*.7,g=C.x+C.width/2,x=g-h/2,k=g+h/2,o=x>=C.x&&k<=C.x+C.width,U=C.y+W+y<=C.y+C.height;return o&&U};var N=L;a(L,"fitsInBar");let I=10,w=b.data.map((S,y)=>({data:S,label:f[y].toString()})).filter(S=>S.data.width>0&&S.data.height>0),$=w.map(S=>{let{data:y,label:W}=S,C=y.width/(W.length*.7);for(;!L(S,C,I)&&C>0;)C-=1;return C}),D=Math.floor(Math.min(...$)),Q=a(S=>c?S.data.y-I:S.data.y+I,"determineLabelYPosition");E.selectAll("text").data(w).enter().append("text").attr("x",S=>S.data.x+S.data.width/2).attr("y",Q).attr("text-anchor","middle").attr("dominant-baseline",c?"auto":"hanging").attr("fill",d.dataLabelColor).attr("font-size",`${D}px`).text(S=>S.label)}}break;case"text":E.selectAll("text").data(b.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",c=>c.fill).attr("font-size",c=>c.fontSize).attr("dominant-baseline",c=>u(c.verticalPos)).attr("text-anchor",c=>A(c.horizontalPos)).attr("transform",c=>R(c)).text(c=>c.text);break;case"path":E.selectAll("path").data(b.data).enter().append("path").attr("d",c=>c.path).attr("fill",c=>c.fill?c.fill:"none").attr("stroke",c=>c.strokeFill).attr("stroke-width",c=>c.strokeWidth);break}}},"draw"),Be={draw:Me},Ge={parser:ye,db:Ie,renderer:Be};export{Ge as diagram};
@@ -0,0 +1,97 @@
1
+ Copyright (c) 2015, NAVER Corporation (https://www.navercorp.com),
2
+ with Reserved Font Name D2Coding.
3
+
4
+ Copyright (c) 2015, NAVER Corporation (https://www.navercorp.com),
5
+ with Reserved Font Name D2Coding-Bold.
6
+
7
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
8
+ This license is copied below, and is also available with a FAQ at:
9
+ https://openfontlicense.org
10
+
11
+
12
+ -----------------------------------------------------------
13
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
14
+ -----------------------------------------------------------
15
+
16
+ PREAMBLE
17
+ The goals of the Open Font License (OFL) are to stimulate worldwide
18
+ development of collaborative font projects, to support the font creation
19
+ efforts of academic and linguistic communities, and to provide a free and
20
+ open framework in which fonts may be shared and improved in partnership
21
+ with others.
22
+
23
+ The OFL allows the licensed fonts to be used, studied, modified and
24
+ redistributed freely as long as they are not sold by themselves. The
25
+ fonts, including any derivative works, can be bundled, embedded,
26
+ redistributed and/or sold with any software provided that any reserved
27
+ names are not used by derivative works. The fonts and derivatives,
28
+ however, cannot be released under any other type of license. The
29
+ requirement for fonts to remain under this license does not apply
30
+ to any document created using the fonts or their derivatives.
31
+
32
+ DEFINITIONS
33
+ "Font Software" refers to the set of files released by the Copyright
34
+ Holder(s) under this license and clearly marked as such. This may
35
+ include source files, build scripts and documentation.
36
+
37
+ "Reserved Font Name" refers to any names specified as such after the
38
+ copyright statement(s).
39
+
40
+ "Original Version" refers to the collection of Font Software components as
41
+ distributed by the Copyright Holder(s).
42
+
43
+ "Modified Version" refers to any derivative made by adding to, deleting,
44
+ or substituting -- in part or in whole -- any of the components of the
45
+ Original Version, by changing formats or by porting the Font Software to a
46
+ new environment.
47
+
48
+ "Author" refers to any designer, engineer, programmer, technical
49
+ writer or other person who contributed to the Font Software.
50
+
51
+ PERMISSION & CONDITIONS
52
+ Permission is hereby granted, free of charge, to any person obtaining
53
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
54
+ redistribute, and sell modified and unmodified copies of the Font
55
+ Software, subject to the following conditions:
56
+
57
+ 1) Neither the Font Software nor any of its individual components,
58
+ in Original or Modified Versions, may be sold by itself.
59
+
60
+ 2) Original or Modified Versions of the Font Software may be bundled,
61
+ redistributed and/or sold with any software, provided that each copy
62
+ contains the above copyright notice and this license. These can be
63
+ included either as stand-alone text files, human-readable headers or
64
+ in the appropriate machine-readable metadata fields within text or
65
+ binary files as long as those fields can be easily viewed by the user.
66
+
67
+ 3) No Modified Version of the Font Software may use the Reserved Font
68
+ Name(s) unless explicit written permission is granted by the corresponding
69
+ Copyright Holder. This restriction only applies to the primary font name as
70
+ presented to the users.
71
+
72
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
73
+ Software shall not be used to promote, endorse or advertise any
74
+ Modified Version, except to acknowledge the contribution(s) of the
75
+ Copyright Holder(s) and the Author(s) or with their explicit written
76
+ permission.
77
+
78
+ 5) The Font Software, modified or unmodified, in part or in whole,
79
+ must be distributed entirely under this license, and must not be
80
+ distributed under any other license. The requirement for fonts to
81
+ remain under this license does not apply to any document created
82
+ using the Font Software.
83
+
84
+ TERMINATION
85
+ This license becomes null and void if any of the above conditions are
86
+ not met.
87
+
88
+ DISCLAIMER
89
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
90
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
91
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
92
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
93
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
94
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
95
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
96
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
97
+ OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file
@@ -0,0 +1,94 @@
1
+ Copyright (c) 2021, Kil Hyung-jin (https://github.com/orioncactus/pretendard),
2
+ with Reserved Font Name Pretendard.
3
+
4
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
5
+ This license is copied below, and is also available with a FAQ at:
6
+ https://scripts.sil.org/OFL
7
+
8
+
9
+ -----------------------------------------------------------
10
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
11
+ -----------------------------------------------------------
12
+
13
+ PREAMBLE
14
+ The goals of the Open Font License (OFL) are to stimulate worldwide
15
+ development of collaborative font projects, to support the font creation
16
+ efforts of academic and linguistic communities, and to provide a free and
17
+ open framework in which fonts may be shared and improved in partnership
18
+ with others.
19
+
20
+ The OFL allows the licensed fonts to be used, studied, modified and
21
+ redistributed freely as long as they are not sold by themselves. The
22
+ fonts, including any derivative works, can be bundled, embedded,
23
+ redistributed and/or sold with any software provided that any reserved
24
+ names are not used by derivative works. The fonts and derivatives,
25
+ however, cannot be released under any other type of license. The
26
+ requirement for fonts to remain under this license does not apply
27
+ to any document created using the fonts or their derivatives.
28
+
29
+ DEFINITIONS
30
+ "Font Software" refers to the set of files released by the Copyright
31
+ Holder(s) under this license and clearly marked as such. This may
32
+ include source files, build scripts and documentation.
33
+
34
+ "Reserved Font Name" refers to any names specified as such after the
35
+ copyright statement(s).
36
+
37
+ "Original Version" refers to the collection of Font Software components as
38
+ distributed by the Copyright Holder(s).
39
+
40
+ "Modified Version" refers to any derivative made by adding to, deleting,
41
+ or substituting -- in part or in whole -- any of the components of the
42
+ Original Version, by changing formats or by porting the Font Software to a
43
+ new environment.
44
+
45
+ "Author" refers to any designer, engineer, programmer, technical
46
+ writer or other person who contributed to the Font Software.
47
+
48
+ PERMISSION & CONDITIONS
49
+ Permission is hereby granted, free of charge, to any person obtaining
50
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
51
+ redistribute, and sell modified and unmodified copies of the Font
52
+ Software, subject to the following conditions:
53
+
54
+ 1) Neither the Font Software nor any of its individual components,
55
+ in Original or Modified Versions, may be sold by itself.
56
+
57
+ 2) Original or Modified Versions of the Font Software may be bundled,
58
+ redistributed and/or sold with any software, provided that each copy
59
+ contains the above copyright notice and this license. These can be
60
+ included either as stand-alone text files, human-readable headers or
61
+ in the appropriate machine-readable metadata fields within text or
62
+ binary files as long as those fields can be easily viewed by the user.
63
+
64
+ 3) No Modified Version of the Font Software may use the Reserved Font
65
+ Name(s) unless explicit written permission is granted by the corresponding
66
+ Copyright Holder. This restriction only applies to the primary font name as
67
+ presented to the users.
68
+
69
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
70
+ Software shall not be used to promote, endorse or advertise any
71
+ Modified Version, except to acknowledge the contribution(s) of the
72
+ Copyright Holder(s) and the Author(s) or with their explicit written
73
+ permission.
74
+
75
+ 5) The Font Software, modified or unmodified, in part or in whole,
76
+ must be distributed entirely under this license, and must not be
77
+ distributed under any other license. The requirement for fonts to
78
+ remain under this license does not apply to any document created
79
+ using the Font Software.
80
+
81
+ TERMINATION
82
+ This license becomes null and void if any of the above conditions are
83
+ not met.
84
+
85
+ DISCLAIMER
86
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
87
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
88
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
89
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
90
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
91
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
92
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
93
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
94
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 Ryan L McIntyre
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.