agentic-mermaid 0.5.3 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/agent-core.d.ts +7 -7
  3. package/dist/agent-core.js +1 -1
  4. package/dist/agent.d.ts +7 -7
  5. package/dist/agent.js +1 -1
  6. package/dist/agentic-mermaid-mcp.js +1 -1
  7. package/dist/am.js +1 -1
  8. package/dist/browser-lazy/chunks/{agentic-producer-core-CC6OOLDW.js → agentic-producer-core-ECZ3CMZM.js} +1 -1
  9. package/dist/browser-lazy/chunks/{architecture-QUFVKYJR.js → architecture-H5LTMKQW.js} +6 -6
  10. package/dist/browser-lazy/chunks/{block-6J3Q63BO.js → block-566X6FNV.js} +5 -5
  11. package/dist/browser-lazy/chunks/{builtin-backends-7SOZZHPF.js → builtin-backends-VAFEZXKY.js} +6 -6
  12. package/dist/browser-lazy/chunks/{c4-SQVBZAKJ.js → c4-ZXFDLBFK.js} +5 -5
  13. package/dist/browser-lazy/chunks/{chunk-5X6MJX3H.js → chunk-2JQXRKBC.js} +1 -1
  14. package/dist/browser-lazy/chunks/{chunk-E2WMJZNM.js → chunk-37FZNMPR.js} +1 -1
  15. package/dist/browser-lazy/chunks/{chunk-TYZOZXUJ.js → chunk-3JTYTXA6.js} +6 -6
  16. package/dist/browser-lazy/chunks/{chunk-PQGPS2YV.js → chunk-4NILRBC7.js} +1 -1
  17. package/dist/browser-lazy/chunks/{chunk-AMJLVPUB.js → chunk-5LKPDHPC.js} +2 -2
  18. package/dist/browser-lazy/chunks/{chunk-BY2CPG6B.js → chunk-62MR3LWJ.js} +1 -1
  19. package/dist/browser-lazy/chunks/{chunk-J7FFAFQF.js → chunk-64JFHCJC.js} +1 -1
  20. package/dist/browser-lazy/chunks/chunk-6GPDLZFQ.js +1 -0
  21. package/dist/browser-lazy/chunks/{chunk-VWVZGQE2.js → chunk-6UOOATQR.js} +1 -1
  22. package/dist/browser-lazy/chunks/chunk-7TTFBJYA.js +1 -0
  23. package/dist/browser-lazy/chunks/chunk-7UFOFWBA.js +20 -0
  24. package/dist/browser-lazy/chunks/{chunk-5B2Z7575.js → chunk-A7V5VDKN.js} +1 -1
  25. package/dist/browser-lazy/chunks/chunk-CPO5P4L2.js +1 -0
  26. package/dist/browser-lazy/chunks/chunk-EIYLJ4FI.js +20 -0
  27. package/dist/browser-lazy/chunks/{chunk-X2UYKWKM.js → chunk-G4JBA7HU.js} +3 -3
  28. package/dist/browser-lazy/chunks/{chunk-2UIA2IME.js → chunk-IUI4DYC3.js} +1 -1
  29. package/dist/browser-lazy/chunks/{chunk-QA6GJQ4X.js → chunk-J57YRC2M.js} +1 -1
  30. package/dist/browser-lazy/chunks/{chunk-BU5LHXNJ.js → chunk-LBXXKLIR.js} +3 -3
  31. package/dist/browser-lazy/chunks/chunk-NKW2ZNCD.js +1 -0
  32. package/dist/browser-lazy/chunks/{chunk-ICC7HBJX.js → chunk-O34YYEQV.js} +1 -1
  33. package/dist/browser-lazy/chunks/{chunk-UL6NDWLL.js → chunk-OBI5U5XU.js} +1 -1
  34. package/dist/browser-lazy/chunks/{chunk-YCEICNM6.js → chunk-OFOS57WQ.js} +1 -1
  35. package/dist/browser-lazy/chunks/{chunk-OZ443IVJ.js → chunk-PSZEE64O.js} +7 -7
  36. package/dist/browser-lazy/chunks/{chunk-SZELX2EJ.js → chunk-PXTLV57R.js} +1 -1
  37. package/dist/browser-lazy/chunks/{chunk-HLWUNUCM.js → chunk-QVSZOF5M.js} +1 -1
  38. package/dist/browser-lazy/chunks/{chunk-2GPK4VFF.js → chunk-TT5GR5EJ.js} +1 -1
  39. package/dist/browser-lazy/chunks/{chunk-DF6765YX.js → chunk-V6I2VGNQ.js} +5 -5
  40. package/dist/browser-lazy/chunks/{chunk-CN7WTBWB.js → chunk-VRZKI33U.js} +1 -1
  41. package/dist/browser-lazy/chunks/{chunk-2SH76OTH.js → chunk-XHU3A432.js} +1 -1
  42. package/dist/browser-lazy/chunks/{chunk-NO7ZIVRU.js → chunk-YVNJDVQO.js} +1 -1
  43. package/dist/browser-lazy/chunks/chunk-Z7UHFVKN.js +6 -0
  44. package/dist/browser-lazy/chunks/{class-5QA4SCTS.js → class-XIFNVBFE.js} +8 -8
  45. package/dist/{zenuml/chunks/decode-BWERFDGK.js → browser-lazy/chunks/decode-5MFOG3AZ.js} +1 -1
  46. package/dist/browser-lazy/chunks/{elk.bundled-L4CADV5W.js → elk.bundled-RYWHIS5N.js} +8 -8
  47. package/dist/browser-lazy/chunks/er-VEUYJBGG.js +11 -0
  48. package/dist/browser-lazy/chunks/{eventmodeling-2BPLHWRN.js → eventmodeling-G7DITZX7.js} +10 -10
  49. package/dist/browser-lazy/chunks/{flowchart-NEIMZTB5.js → flowchart-SSFIU4EU.js} +1 -1
  50. package/dist/browser-lazy/chunks/{forest-implementation-AEP24AIP.js → forest-implementation-RWFF7XDV.js} +1 -1
  51. package/dist/browser-lazy/chunks/{gantt-RDPIFYAF.js → gantt-HQNVDX2B.js} +6 -6
  52. package/dist/browser-lazy/chunks/{gitgraph-N4Y5RYB7.js → gitgraph-Z5MN6M6L.js} +4 -4
  53. package/dist/browser-lazy/chunks/{ishikawa-LD3YBDJN.js → ishikawa-UEERNFQV.js} +2 -2
  54. package/dist/browser-lazy/chunks/{journey-6YQR5DJX.js → journey-3BEWWGB5.js} +6 -6
  55. package/dist/browser-lazy/chunks/{kanban-PLMJ7NBW.js → kanban-2WFNCWLB.js} +10 -10
  56. package/dist/browser-lazy/chunks/{mermaid-yaml-runtime-QVYX4EWK.js → mermaid-yaml-runtime-IK4ET4BT.js} +8 -8
  57. package/dist/browser-lazy/chunks/{mindmap-K2UBFO3Y.js → mindmap-R2C6SNYR.js} +4 -4
  58. package/dist/browser-lazy/chunks/{packet-CUW4QY6Y.js → packet-GMVCI5YZ.js} +3 -3
  59. package/dist/browser-lazy/chunks/{pie-7F7UUCG3.js → pie-WER45DKC.js} +7 -7
  60. package/dist/browser-lazy/chunks/{quadrant-TOONO2WC.js → quadrant-NCUPSFKN.js} +4 -4
  61. package/dist/browser-lazy/chunks/{radar-J6JVWVAX.js → radar-WLYS4YC5.js} +8 -8
  62. package/dist/browser-lazy/chunks/render-core-42UVWIPF.js +3 -0
  63. package/dist/browser-lazy/chunks/{requirement-CMAKDJPO.js → requirement-AK3NWMJ6.js} +7 -7
  64. package/dist/browser-lazy/chunks/{sankey-AWXQEP3F.js → sankey-C2DY6WVU.js} +4 -4
  65. package/dist/browser-lazy/chunks/{sequence-Q2RJRB4L.js → sequence-D4WJB44W.js} +1 -1
  66. package/dist/browser-lazy/chunks/{state-WRBFQEDX.js → state-YUQVESE7.js} +2 -2
  67. package/dist/browser-lazy/chunks/{timeline-D2KILFXM.js → timeline-BMBJJXWR.js} +4 -4
  68. package/dist/browser-lazy/chunks/{treemap-N3VYX5D4.js → treemap-B66XBZZ6.js} +3 -3
  69. package/dist/browser-lazy/chunks/{xychart-G73OGK66.js → xychart-HAVFROGT.js} +6 -6
  70. package/dist/browser-lazy/chunks/{zenuml-H4BXNYXR.js → zenuml-62RLYFWP.js} +7 -7
  71. package/dist/browser-lazy/index.js +1 -1
  72. package/dist/browser.global.js +507 -507
  73. package/dist/{chunk-DQDKA5ND.js → chunk-2DNGDTJD.js} +2 -2
  74. package/dist/{chunk-GVCHLSHH.js → chunk-4F2UGYTM.js} +2 -2
  75. package/dist/{chunk-H3NCS2XZ.js → chunk-7XYB2LNC.js} +2 -2
  76. package/dist/chunk-DOFB572I.js +58 -0
  77. package/dist/chunk-EHJI3QYE.js +52 -0
  78. package/dist/{chunk-UA234O4M.js → chunk-HINRNKPO.js} +2 -2
  79. package/dist/{chunk-JZOJ4YGS.js → chunk-KXMANAST.js} +33 -33
  80. package/dist/{chunk-7CRDX2QR.js → chunk-U4MT3RRE.js} +2 -2
  81. package/dist/{chunk-NKNFOREZ.js → chunk-WYIB6BUR.js} +2 -2
  82. package/dist/{cli-YGGTJZH7.js → cli-ZYIDBYNS.js} +2 -2
  83. package/dist/{index-EeXqJXr5.d.ts → index-Bvhprdxz.d.ts} +3 -3
  84. package/dist/index.d.ts +4 -4
  85. package/dist/index.js +1 -1
  86. package/dist/{mcp-cli-63DYXTVD.js → mcp-cli-YVDCORWA.js} +2 -2
  87. package/dist/{paint-certification-6rwQjIv_.d.ts → paint-certification-BoLyr006.d.ts} +2 -2
  88. package/dist/{server-5NEOHOFS.js → server-4JGAVXR3.js} +2 -2
  89. package/dist/{svg-styles-BdnoM7AT.d.ts → svg-styles-BnCoXyYe.d.ts} +1 -1
  90. package/dist/svg-styles.d.ts +1 -1
  91. package/dist/svg-styles.js +1 -1
  92. package/dist/svg.d.ts +4 -4
  93. package/dist/svg.js +1 -1
  94. package/dist/{types-BcS52Mjt.d.ts → types-CLVJCaH2.d.ts} +1 -1
  95. package/dist/zenuml/chunks/{appearance-UOQ5KA6O.js → appearance-5RM5MVM2.js} +1 -1
  96. package/dist/zenuml/chunks/{builtin-backends-KDKE7YHO.js → builtin-backends-UTNWL4N3.js} +11 -11
  97. package/dist/zenuml/chunks/{chunk-QWX77U7G.js → chunk-3A6S6GNB.js} +2 -2
  98. package/dist/zenuml/chunks/{chunk-OXQWRSBM.js → chunk-55WS466K.js} +11 -11
  99. package/dist/zenuml/chunks/chunk-6J4BGPB2.js +29 -0
  100. package/dist/zenuml/chunks/chunk-CNLL4BGF.js +1 -0
  101. package/dist/zenuml/chunks/{chunk-RZ6XK5CD.js → chunk-IARQ24W3.js} +13 -13
  102. package/dist/zenuml/chunks/{chunk-42DXZ5C6.js → chunk-ZNZRIISS.js} +2 -2
  103. package/dist/{browser-lazy/chunks/decode-63UIZGD2.js → zenuml/chunks/decode-LDNNXEAO.js} +1 -1
  104. package/dist/zenuml/chunks/{mermaid-yaml-runtime-KZVU74WU.js → mermaid-yaml-runtime-A5CNJ3IE.js} +8 -8
  105. package/dist/zenuml/chunks/render-core-ECIWU5ZS.js +3 -0
  106. package/dist/zenuml/chunks/{zenuml-EA2ZFRUX.js → zenuml-N3LZMB2G.js} +8 -8
  107. package/dist/zenuml.d.ts +2 -2
  108. package/dist/zenuml.js +1 -1
  109. package/docs/MCP-DIRECTORY-LISTINGS.md +81 -12
  110. package/docs/api.md +1 -1
  111. package/package.json +1 -1
  112. package/server.json +2 -2
  113. package/dist/browser-lazy/chunks/chunk-4LHYF3BS.js +0 -1
  114. package/dist/browser-lazy/chunks/chunk-FAIMVOX5.js +0 -6
  115. package/dist/browser-lazy/chunks/chunk-GVOEAY52.js +0 -1
  116. package/dist/browser-lazy/chunks/chunk-J35HAQQF.js +0 -20
  117. package/dist/browser-lazy/chunks/chunk-RIVTHZAQ.js +0 -1
  118. package/dist/browser-lazy/chunks/chunk-Z3FDIVLN.js +0 -20
  119. package/dist/browser-lazy/chunks/er-7ZSKGN7Y.js +0 -11
  120. package/dist/browser-lazy/chunks/render-core-BZOM3K7D.js +0 -3
  121. package/dist/chunk-EHCMJUMD.js +0 -52
  122. package/dist/chunk-OMY6NRQD.js +0 -58
  123. package/dist/zenuml/chunks/chunk-7TVYPTDW.js +0 -1
  124. package/dist/zenuml/chunks/chunk-RLJEI7YN.js +0 -29
  125. package/dist/zenuml/chunks/render-core-V5RQ737O.js +0 -3
  126. /package/dist/browser-lazy/chunks/{chunk-5FQ534HP.js → chunk-BMZ24VPS.js} +0 -0
  127. /package/dist/browser-lazy/chunks/{chunk-2I4UPL7Q.js → chunk-D6MQ7QSU.js} +0 -0
  128. /package/dist/browser-lazy/chunks/{chunk-CQE4HQEW.js → chunk-HJVO5VC3.js} +0 -0
  129. /package/dist/browser-lazy/chunks/{chunk-LH7HUDKW.js → chunk-L4UC3KGS.js} +0 -0
  130. /package/dist/browser-lazy/chunks/{chunk-NMQQMRIR.js → chunk-MFTQWHUB.js} +0 -0
  131. /package/dist/browser-lazy/chunks/{chunk-N5ELX7LR.js → chunk-PJJSDGLB.js} +0 -0
  132. /package/dist/browser-lazy/chunks/{chunk-CSFUKSU6.js → chunk-QCU5G5PZ.js} +0 -0
  133. /package/dist/browser-lazy/chunks/{chunk-VQYYGAXP.js → chunk-TLFX3U6S.js} +0 -0
  134. /package/dist/browser-lazy/chunks/{chunk-5UVGUSD6.js → chunk-YHMTSXIR.js} +0 -0
  135. /package/dist/zenuml/chunks/{chunk-EVPSMEKN.js → chunk-GC7IPQ5P.js} +0 -0
@@ -1,12 +1,12 @@
1
- import{i as t,p as e,r as s,s as r,t as n,u as a,y as i}from"./chunk-J35HAQQF.js";import{m as o}from"./chunk-TYZOZXUJ.js";import{Ka as l,N as h,Q as u,Ub as p,Vb as c,W as f,ea as d,fb as g,n as k,qa as y,sa as M,ta as m,ub as x}from"./chunk-Z3FDIVLN.js";import"./chunk-5UVGUSD6.js";import"./chunk-CSFUKSU6.js";function v(t,e,s){if(t&&t.length){let[r,n]=e,a=Math.PI/180*s,i=Math.cos(a),o=Math.sin(a);for(let e of t){let[t,s]=e;e[0]=(t-r)*i-(s-n)*o+r,e[1]=(t-r)*o+(s-n)*i+n}}}function b(t,e){var s;let r=e.hachureAngle+90,n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return e.roughness>=1&&((null==(s=e.randomizer)?void 0:s.next())||Math.random())>.7&&(a=n),function(t,e,s,r=1){let n=Math.max(e,.1),a=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,i=[0,0];if(s)for(let t of a)v(t,i,s);let o=function(t,e,s){let r=[];for(let e of t){var n,a;let t=[...e];n=t[0],a=t[t.length-1],n[0]===a[0]&&n[1]===a[1]||t.push([t[0][0],t[0][1]]),t.length>2&&r.push(t)}let i=[];e=Math.max(e,.1);let o=[];for(let t of r)for(let e=0;e<t.length-1;e++){let s=t[e],r=t[e+1];if(s[1]!==r[1]){let t=Math.min(s[1],r[1]);o.push({ymin:t,ymax:Math.max(s[1],r[1]),x:t===s[1]?s[0]:r[0],islope:(r[0]-s[0])/(r[1]-s[1])})}}if(o.sort((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),!o.length)return i;let l=[],h=o[0].ymin,u=0;for(;l.length||o.length;){if(o.length){let t=-1;for(let e=0;e<o.length&&!(o[e].ymin>h);e++)t=e;o.splice(0,t+1).forEach(t=>{l.push({s:h,edge:t})})}if((l=l.filter(t=>!(t.edge.ymax<=h))).sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==s||u%e==0)&&l.length>1)for(let t=0;t<l.length;t+=2){let e=t+1;if(e>=l.length)break;let s=l[t].edge,r=l[e].edge;i.push([[Math.round(s.x),h],[Math.round(r.x),h]])}h+=s,l.forEach(t=>{t.edge.x=t.edge.x+s*t.edge.islope}),u++}return i}(a,n,r);if(s){let t;for(let t of a)v(t,i,-s);t=[],o.forEach(e=>t.push(...e)),v(t,i,-s)}return o}(t,n,r,a||1)}var $=class{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){let s=b(t,e);return{type:"fillSketch",ops:this.renderLines(s,e)}}renderLines(t,e){let s=[];for(let r of t)s.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],e));return s}};function P(t){let e=t[0],s=t[1];return Math.sqrt(Math.pow(e[0]-s[0],2)+Math.pow(e[1]-s[1],2))}var w=class extends ${fillPolygons(t,e){let s=e.hachureGap;s<0&&(s=4*e.strokeWidth);let r=b(t,Object.assign({},e,{hachureGap:s=Math.max(s,.1)})),n=Math.PI/180*e.hachureAngle,a=[],i=.5*s*Math.cos(n),o=.5*s*Math.sin(n);for(let[t,e]of r)P([t,e])&&a.push([[t[0]-i,t[1]+o],[...e]],[[t[0]+i,t[1]-o],[...e]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}},S=class extends ${fillPolygons(t,e){let s=this._fillPolygons(t,e),r=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),n=this._fillPolygons(t,r);return s.ops=s.ops.concat(n.ops),s}},O=class{constructor(t){this.helper=t}fillPolygons(t,e){let s=b(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(s,e)}dotsOnLines(t,e){let s=[],r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);let n=e.fillWeight;n<0&&(n=e.strokeWidth/2);let a=r/4;for(let i of t){let t=P(i),o=Math.ceil(t/r)-1,l=t-o*r,h=(i[0][0]+i[1][0])/2-r/4,u=Math.min(i[0][1],i[1][1]);for(let t=0;t<o;t++){let i=h-a+2*Math.random()*a,o=u+l+t*r-a+2*Math.random()*a,p=this.helper.ellipse(i,o,n,n,e);s.push(...p.ops)}}return{type:"fillSketch",ops:s}}},L=class{constructor(t){this.helper=t}fillPolygons(t,e){let s=b(t,e);return{type:"fillSketch",ops:this.dashedLine(s,e)}}dashedLine(t,e){let s=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,r=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,n=[];return t.forEach(t=>{let a=P(t),i=Math.floor(a/(s+r)),o=(a+r-i*(s+r))/2,l=t[0],h=t[1];l[0]>h[0]&&(l=t[1],h=t[0]);let u=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let t=0;t<i;t++){let a=t*(s+r),i=a+s,h=[l[0]+a*Math.cos(u)+o*Math.cos(u),l[1]+a*Math.sin(u)+o*Math.sin(u)],p=[l[0]+i*Math.cos(u)+o*Math.cos(u),l[1]+i*Math.sin(u)+o*Math.sin(u)];n.push(...this.helper.doubleLineOps(h[0],h[1],p[0],p[1],e))}}),n}},j=class{constructor(t){this.helper=t}fillPolygons(t,e){let s=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,r=e.zigzagOffset<0?s:e.zigzagOffset,n=b(t,e=Object.assign({},e,{hachureGap:s+r}));return{type:"fillSketch",ops:this.zigzagLines(n,r,e)}}zigzagLines(t,e,s){let r=[];return t.forEach(t=>{let n=Math.round(P(t)/(2*e)),a=t[0],i=t[1];a[0]>i[0]&&(a=t[1],i=t[0]);let o=Math.atan((i[1]-a[1])/(i[0]-a[0]));for(let t=0;t<n;t++){let n=2*t*e,i=(t+1)*2*e,l=Math.sqrt(2*Math.pow(e,2)),h=[a[0]+n*Math.cos(o),a[1]+n*Math.sin(o)],u=[a[0]+i*Math.cos(o),a[1]+i*Math.sin(o)],p=[h[0]+l*Math.cos(o+Math.PI/4),h[1]+l*Math.sin(o+Math.PI/4)];r.push(...this.helper.doubleLineOps(h[0],h[1],p[0],p[1],s),...this.helper.doubleLineOps(p[0],p[1],u[0],u[1],s))}}),r}},I={},_=class{constructor(t){this.seed=t}next(){return this.seed?(0x80000000-1&(this.seed=Math.imul(48271,this.seed)))/0x80000000:Math.random()}},W={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function z(t){let e=[],s=function(t){let e=[];for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:0,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:1,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:2,text:""},e}(t),r="BOD",n=0,a=s[0];for(;2!==a.type;){let i=0,o=[];if("BOD"===r)if("M"!==a.text&&"m"!==a.text)return z("M0,0"+t);else n++,i=W[a.text],r=a.text;else 1===a.type?i=W[r]:(n++,i=W[a.text],r=a.text);if(n+i<s.length){for(let t=n;t<n+i;t++){let e=s[t];if(1===e.type)o[o.length]=+e.text;else throw Error("Param not a number: "+r+","+e.text)}if("number"==typeof W[r]){let t={key:r,data:o};e.push(t),n+=i,a=s[n],"M"===r&&(r="L"),"m"===r&&(r="l")}else throw Error("Bad segment: "+r)}else throw Error("Path data ended short")}return e}function A(t){let e=0,s=0,r=0,n=0,a=[];for(let{key:i,data:o}of t)switch(i){case"M":a.push({key:"M",data:[...o]}),[e,s]=o,[r,n]=o;break;case"m":e+=o[0],s+=o[1],a.push({key:"M",data:[e,s]}),r=e,n=s;break;case"L":a.push({key:"L",data:[...o]}),[e,s]=o;break;case"l":e+=o[0],s+=o[1],a.push({key:"L",data:[e,s]});break;case"C":a.push({key:"C",data:[...o]}),e=o[4],s=o[5];break;case"c":{let t=o.map((t,r)=>r%2?t+s:t+e);a.push({key:"C",data:t}),e=t[4],s=t[5];break}case"Q":a.push({key:"Q",data:[...o]}),e=o[2],s=o[3];break;case"q":{let t=o.map((t,r)=>r%2?t+s:t+e);a.push({key:"Q",data:t}),e=t[2],s=t[3];break}case"A":a.push({key:"A",data:[...o]}),e=o[5],s=o[6];break;case"a":e+=o[5],s+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],e,s]});break;case"H":a.push({key:"H",data:[...o]}),e=o[0];break;case"h":e+=o[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...o]}),s=o[0];break;case"v":s+=o[0],a.push({key:"V",data:[s]});break;case"S":a.push({key:"S",data:[...o]}),e=o[2],s=o[3];break;case"s":{let t=o.map((t,r)=>r%2?t+s:t+e);a.push({key:"S",data:t}),e=t[2],s=t[3];break}case"T":a.push({key:"T",data:[...o]}),e=o[0],s=o[1];break;case"t":e+=o[0],s+=o[1],a.push({key:"T",data:[e,s]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=r,s=n}return a}function C(t){let e=[],s="",r=0,n=0,a=0,i=0,o=0,l=0;for(let{key:h,data:u}of t){switch(h){case"M":e.push({key:"M",data:[...u]}),[r,n]=u,[a,i]=u;break;case"C":e.push({key:"C",data:[...u]}),r=u[4],n=u[5],o=u[2],l=u[3];break;case"L":e.push({key:"L",data:[...u]}),[r,n]=u;break;case"H":r=u[0],e.push({key:"L",data:[r,n]});break;case"V":n=u[0],e.push({key:"L",data:[r,n]});break;case"S":{let t=0,a=0;"C"===s||"S"===s?(t=r+(r-o),a=n+(n-l)):(t=r,a=n),e.push({key:"C",data:[t,a,...u]}),o=u[0],l=u[1],r=u[2],n=u[3];break}case"T":{let[t,a]=u,i=0,h=0;"Q"===s||"T"===s?(i=r+(r-o),h=n+(n-l)):(i=r,h=n);let p=r+2*(i-r)/3,c=n+2*(h-n)/3,f=t+2*(i-t)/3,d=a+2*(h-a)/3;e.push({key:"C",data:[p,c,f,d,t,a]}),o=i,l=h,r=t,n=a;break}case"Q":{let[t,s,a,i]=u,h=r+2*(t-r)/3,p=n+2*(s-n)/3,c=a+2*(t-a)/3,f=i+2*(s-i)/3;e.push({key:"C",data:[h,p,c,f,a,i]}),o=t,l=s,r=a,n=i;break}case"A":{let t=Math.abs(u[0]),s=Math.abs(u[1]),a=u[2],i=u[3],o=u[4],l=u[5],h=u[6];0===t||0===s?(e.push({key:"C",data:[r,n,l,h,l,h]}),r=l,n=h):(r!==l||n!==h)&&((function t(e,s,r,n,a,i,o,l,h,u){let p=Math.PI*o/180,c=[],f=0,d=0,g=0,k=0;if(u)[f,d,g,k]=u;else{[e,s]=T(e,s,-p),[r,n]=T(r,n,-p);let t=(e-r)/2,o=(s-n)/2,u=t*t/(a*a)+o*o/(i*i);u>1&&(a*=u=Math.sqrt(u),i*=u);let c=a*a,y=i*i,M=(l===h?-1:1)*Math.sqrt(Math.abs((c*y-c*o*o-y*t*t)/(c*o*o+y*t*t)));g=M*a*o/i+(e+r)/2,k=-(M*i)*t/a+(s+n)/2,f=Math.asin(parseFloat(((s-k)/i).toFixed(9))),d=Math.asin(parseFloat(((n-k)/i).toFixed(9))),e<g&&(f=Math.PI-f),r<g&&(d=Math.PI-d),f<0&&(f=2*Math.PI+f),d<0&&(d=2*Math.PI+d),h&&f>d&&(f-=2*Math.PI),!h&&d>f&&(d-=2*Math.PI)}let y=d-f;if(Math.abs(y)>120*Math.PI/180){let e=d,s=r,l=n;c=t(r=g+a*Math.cos(d=h&&d>f?f+120*Math.PI/180*1:f+-(120*Math.PI/180*1)),n=k+i*Math.sin(d),s,l,a,i,o,0,h,[d,e,g,k])}y=d-f;let M=Math.cos(f),m=Math.cos(d),x=Math.tan(y/4),v=4/3*a*x,b=4/3*i*x,$=[e,s],P=[e+v*Math.sin(f),s-b*M],w=[r+v*Math.sin(d),n-b*m],S=[r,n];if(P[0]=2*$[0]-P[0],P[1]=2*$[1]-P[1],u)return[P,w,S].concat(c);{c=[P,w,S].concat(c);let t=[];for(let e=0;e<c.length;e+=3){let s=T(c[e][0],c[e][1],p),r=T(c[e+1][0],c[e+1][1],p),n=T(c[e+2][0],c[e+2][1],p);t.push([s[0],s[1],r[0],r[1],n[0],n[1]])}return t}})(r,n,l,h,t,s,a,i,o).forEach(function(t){e.push({key:"C",data:t})}),r=l,n=h);break}case"Z":e.push({key:"Z",data:[]}),r=a,n=i}s=h}return e}function T(t,e,s){return[t*Math.cos(s)-e*Math.sin(s),t*Math.sin(s)+e*Math.cos(s)]}var G={randOffset:function(t,e){return J(t,e)},randOffsetWithRange:function(t,e,s){return D(t,e,s)},ellipse:function(t,e,s,r,n){let a=Z(s,r,n);return Q(t,e,n,a).opset},doubleLineOps:function(t,e,s,r,n){return K(t,e,s,r,n,!0)}};function E(t,e,s,r,n){return{type:"path",ops:K(t,e,s,r,n)}}function F(t,e,s){let r=(t||[]).length;if(r>2){let n=[];for(let e=0;e<r-1;e++)n.push(...K(t[e][0],t[e][1],t[e+1][0],t[e+1][1],s));return e&&n.push(...K(t[r-1][0],t[r-1][1],t[0][0],t[0][1],s)),{type:"path",ops:n}}return 2===r?E(t[0][0],t[0][1],t[1][0],t[1][1],s):{type:"path",ops:[]}}function R(t,e){if(t.length){let s="number"==typeof t[0][0]?[t]:t,r=Y(s[0],+(1+.2*e.roughness),e),n=e.disableMultiStroke?[]:Y(s[0],1.5*(1+.22*e.roughness),H(e));for(let t=1;t<s.length;t++){let a=s[t];if(a.length){let t=Y(a,+(1+.2*e.roughness),e),s=e.disableMultiStroke?[]:Y(a,1.5*(1+.22*e.roughness),H(e));for(let e of t)"move"!==e.op&&r.push(e);for(let t of s)"move"!==t.op&&n.push(t)}}return{type:"path",ops:r.concat(n)}}return{type:"path",ops:[]}}function Z(t,e,s){let r=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),n=2*Math.PI/Math.ceil(Math.max(s.curveStepCount,s.curveStepCount/Math.sqrt(200)*r)),a=Math.abs(t/2),i=Math.abs(e/2),o=1-s.curveFitting;return a+=J(a*o,s),i+=J(i*o,s),{increment:n,rx:a,ry:i}}function Q(t,e,s,r){let[n,a]=te(r.increment,t,e,r.rx,r.ry,1,r.increment*D(.1,D(.4,1,s),s),s),i=tt(n,null,s);if(!s.disableMultiStroke&&0!==s.roughness){let[n]=te(r.increment,t,e,r.rx,r.ry,1.5,0,s),a=tt(n,null,s);i=i.concat(a)}return{estimatedPoints:a,opset:{type:"path",ops:i}}}function q(t,e,s,r,n,a,i,o,l){let h=Math.abs(s/2),u=Math.abs(r/2);h+=J(.01*h,l),u+=J(.01*u,l);let p=n,c=a;for(;p<0;)p+=2*Math.PI,c+=2*Math.PI;c-p>2*Math.PI&&(p=0,c=2*Math.PI);let f=Math.min(2*Math.PI/l.curveStepCount/2,(c-p)/2),d=ts(f,t,e,h,u,p,c,1,l);if(!l.disableMultiStroke){let s=ts(f,t,e,h,u,p,c,1.5,l);d.push(...s)}return i&&(o?d.push(...K(t,e,t+h*Math.cos(p),e+u*Math.sin(p),l),...K(t,e,t+h*Math.cos(c),e+u*Math.sin(c),l)):d.push({op:"lineTo",data:[t,e]},{op:"lineTo",data:[t+h*Math.cos(p),e+u*Math.sin(p)]})),{type:"path",ops:d}}function B(t,e){let s=C(A(z(t))),r=[],n=[0,0],a=[0,0];for(let{key:t,data:i}of s)switch(t){case"M":a=[i[0],i[1]],n=[i[0],i[1]];break;case"L":r.push(...K(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]];break;case"C":{let[t,s,n,o,l,h]=i;r.push(...function(t,e,s,r,n,a,i,o){let l=[],h=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3],u=[0,0],p=o.disableMultiStroke?1:2,c=o.preserveVertices;for(let f=0;f<p;f++)0===f?l.push({op:"move",data:[i[0],i[1]]}):l.push({op:"move",data:[i[0]+(c?0:J(h[0],o)),i[1]+(c?0:J(h[0],o))]}),u=c?[n,a]:[n+J(h[f],o),a+J(h[f],o)],l.push({op:"bcurveTo",data:[t+J(h[f],o),e+J(h[f],o),s+J(h[f],o),r+J(h[f],o),u[0],u[1]]});return l}(t,s,n,o,l,h,a,e)),a=[l,h];break}case"Z":r.push(...K(a[0],a[1],n[0],n[1],e)),a=[n[0],n[1]]}return{type:"path",ops:r}}function V(t,e){let s=[];for(let r of t)if(r.length){let t=e.maxRandomnessOffset||0,n=r.length;if(n>2){s.push({op:"move",data:[r[0][0]+J(t,e),r[0][1]+J(t,e)]});for(let a=1;a<n;a++)s.push({op:"lineTo",data:[r[a][0]+J(t,e),r[a][1]+J(t,e)]})}}return{type:"fillPath",ops:s}}function N(t,e){return(function(t,e){let s=t.fillStyle||"hachure";if(!I[s])switch(s){case"zigzag":I[s]||(I[s]=new w(e));break;case"cross-hatch":I[s]||(I[s]=new S(e));break;case"dots":I[s]||(I[s]=new O(e));break;case"dashed":I[s]||(I[s]=new L(e));break;case"zigzag-line":I[s]||(I[s]=new j(e));break;default:I[s="hachure"]||(I[s]=new $(e))}return I[s]})(e,G).fillPolygons(t,e)}function H(t){let e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function U(t){return t.randomizer||(t.randomizer=new _(t.seed||0)),t.randomizer.next()}function D(t,e,s,r=1){return s.roughness*r*(U(s)*(e-t)+t)}function J(t,e,s=1){return D(-t,t,e,s)}function K(t,e,s,r,n,a=!1){let i=a?n.disableMultiStrokeFill:n.disableMultiStroke,o=X(t,e,s,r,n,!0,!1);if(i)return o;let l=X(t,e,s,r,n,!0,!0);return o.concat(l)}function X(t,e,s,r,n,a,i){let o=Math.pow(t-s,2)+Math.pow(e-r,2),l=Math.sqrt(o),h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let u=n.maxRandomnessOffset||0;u*u*100>o&&(u=l/10);let p=u/2,c=.2+.2*U(n),f=n.bowing*n.maxRandomnessOffset*(r-e)/200,d=n.bowing*n.maxRandomnessOffset*(t-s)/200;f=J(f,n,h),d=J(d,n,h);let g=[],k=n.preserveVertices;return a&&(i?g.push({op:"move",data:[t+(k?0:J(p,n,h)),e+(k?0:J(p,n,h))]}):g.push({op:"move",data:[t+(k?0:J(u,n,h)),e+(k?0:J(u,n,h))]})),i?g.push({op:"bcurveTo",data:[f+t+(s-t)*c+J(p,n,h),d+e+(r-e)*c+J(p,n,h),f+t+2*(s-t)*c+J(p,n,h),d+e+2*(r-e)*c+J(p,n,h),s+(k?0:J(p,n,h)),r+(k?0:J(p,n,h))]}):g.push({op:"bcurveTo",data:[f+t+(s-t)*c+J(u,n,h),d+e+(r-e)*c+J(u,n,h),f+t+2*(s-t)*c+J(u,n,h),d+e+2*(r-e)*c+J(u,n,h),s+(k?0:J(u,n,h)),r+(k?0:J(u,n,h))]}),g}function Y(t,e,s){if(!t.length)return[];let r=[];r.push([t[0][0]+J(e,s),t[0][1]+J(e,s)]),r.push([t[0][0]+J(e,s),t[0][1]+J(e,s)]);for(let n=1;n<t.length;n++)r.push([t[n][0]+J(e,s),t[n][1]+J(e,s)]),n===t.length-1&&r.push([t[n][0]+J(e,s),t[n][1]+J(e,s)]);return tt(r,null,s)}function tt(t,e,s){let r=t.length,n=[];if(r>3){let a=[],i=1-s.curveTightness;n.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<r;e++){let s=t[e];a[0]=[s[0],s[1]],a[1]=[s[0]+(i*t[e+1][0]-i*t[e-1][0])/6,s[1]+(i*t[e+1][1]-i*t[e-1][1])/6],a[2]=[t[e+1][0]+(i*t[e][0]-i*t[e+2][0])/6,t[e+1][1]+(i*t[e][1]-i*t[e+2][1])/6],a[3]=[t[e+1][0],t[e+1][1]],n.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&2===e.length){let t=s.maxRandomnessOffset;n.push({op:"lineTo",data:[e[0]+J(t,s),e[1]+J(t,s)]})}}else 3===r?(n.push({op:"move",data:[t[1][0],t[1][1]]}),n.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===r&&n.push(...X(t[0][0],t[0][1],t[1][0],t[1][1],s,!0,!0));return n}function te(t,e,s,r,n,a,i,o){let l=0===o.roughness,h=[],u=[];if(l){t/=4,u.push([e+r*Math.cos(-t),s+n*Math.sin(-t)]);for(let a=0;a<=2*Math.PI;a+=t){let t=[e+r*Math.cos(a),s+n*Math.sin(a)];h.push(t),u.push(t)}u.push([e+ +r,s+0*n]),u.push([e+r*Math.cos(t),s+n*Math.sin(t)])}else{let l=J(.5,o)-Math.PI/2;u.push([J(a,o)+e+.9*r*Math.cos(l-t),J(a,o)+s+.9*n*Math.sin(l-t)]);let p=2*Math.PI+l-.01;for(let i=l;i<p;i+=t){let t=[J(a,o)+e+r*Math.cos(i),J(a,o)+s+n*Math.sin(i)];h.push(t),u.push(t)}u.push([J(a,o)+e+r*Math.cos(l+2*Math.PI+.5*i),J(a,o)+s+n*Math.sin(l+2*Math.PI+.5*i)]),u.push([J(a,o)+e+.98*r*Math.cos(l+i),J(a,o)+s+.98*n*Math.sin(l+i)]),u.push([J(a,o)+e+.9*r*Math.cos(l+.5*i),J(a,o)+s+.9*n*Math.sin(l+.5*i)])}return[u,h]}function ts(t,e,s,r,n,a,i,o,l){let h=a+J(.1,l),u=[];u.push([J(o,l)+e+.9*r*Math.cos(h-t),J(o,l)+s+.9*n*Math.sin(h-t)]);for(let a=h;a<=i;a+=t)u.push([J(o,l)+e+r*Math.cos(a),J(o,l)+s+n*Math.sin(a)]);return u.push([e+r*Math.cos(i),s+n*Math.sin(i)]),u.push([e+r*Math.cos(i),s+n*Math.sin(i)]),tt(u,null,l)}function tr(t,e=0){let s=t.length;if(s<3)throw Error("A curve must have at least three points.");let r=[];if(3===s)r.push([...t[0]],[...t[1]],[...t[2]],[...t[2]]);else{let s=[];s.push(t[0],t[0]);for(let e=1;e<t.length;e++)s.push(t[e]),e===t.length-1&&s.push(t[e]);let n=[],a=1-e;r.push([...s[0]]);for(let t=1;t+2<s.length;t++){let e=s[t];n[0]=[e[0],e[1]],n[1]=[e[0]+(a*s[t+1][0]-a*s[t-1][0])/6,e[1]+(a*s[t+1][1]-a*s[t-1][1])/6],n[2]=[s[t+1][0]+(a*s[t][0]-a*s[t+2][0])/6,s[t+1][1]+(a*s[t][1]-a*s[t+2][1])/6],n[3]=[s[t+1][0],s[t+1][1]],r.push(n[1],n[2],n[3])}}return r}function tn(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function ta(t,e,s){return[t[0]+(e[0]-t[0])*s,t[1]+(e[1]-t[1])*s]}function ti(t,e,s,r,n){let a=n||[],i=t[e],o=t[s-1],l=0,h=1;for(let r=e+1;r<s-1;++r){let e=function(t,e,s){let r=tn(e,s);if(0===r)return tn(t,e);let n=((t[0]-e[0])*(s[0]-e[0])+(t[1]-e[1])*(s[1]-e[1]))/r;return tn(t,ta(e,s,n=Math.max(0,Math.min(1,n))))}(t[r],i,o);e>l&&(l=e,h=r)}return Math.sqrt(l)>r?(ti(t,e,h+1,r,a),ti(t,h,s,r,a)):(a.length||a.push(i),a.push(o)),a}function to(t,e=.15,s){let r=[],n=(t.length-1)/3;for(let s=0;s<n;s++)!function t(e,s,r,n){let a,i,o,l,h,u,p,c,f=n||[];if(a=e[s+0],i=e[s+1],o=e[s+2],l=e[s+3],h=3*i[0]-2*a[0]-l[0],h*=h,u=3*i[1]-2*a[1]-l[1],u*=u,p=3*o[0]-2*l[0]-a[0],p*=p,c=3*o[1]-2*l[1]-a[1],c*=c,h<p&&(h=p),u<c&&(u=c),h+u<r){let t=e[s+0];f.length?Math.sqrt(tn(f[f.length-1],t))>1&&f.push(t):f.push(t),f.push(e[s+3])}else{let n=e[s+0],a=e[s+1],i=e[s+2],o=e[s+3],l=ta(n,a,.5),h=ta(a,i,.5),u=ta(i,o,.5),p=ta(l,h,.5),c=ta(h,u,.5),d=ta(p,c,.5);t([n,l,p,d],0,r,f),t([d,c,u,o],0,r,f)}return f}(t,3*s,e,r);return s&&s>0?ti(r,0,r.length,s):r}var tl="none",th=new class{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(0x80000000*Math.random())}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,s){return{shape:t,sets:e||[],options:s||this.defaultOptions}}line(t,e,s,r,n){let a=this._o(n);return this._d("line",[E(t,e,s,r,a)],a)}rectangle(t,e,s,r,n){let a=this._o(n),i=[],o=F([[t,e],[t+s,e],[t+s,e+r],[t,e+r]],!0,a);if(a.fill){let n=[[t,e],[t+s,e],[t+s,e+r],[t,e+r]];"solid"===a.fillStyle?i.push(V([n],a)):i.push(N([n],a))}return a.stroke!==tl&&i.push(o),this._d("rectangle",i,a)}ellipse(t,e,s,r,n){let a=this._o(n),i=[],o=Z(s,r,a),l=Q(t,e,a,o);if(a.fill)if("solid"===a.fillStyle){let s=Q(t,e,a,o).opset;s.type="fillPath",i.push(s)}else i.push(N([l.estimatedPoints],a));return a.stroke!==tl&&i.push(l.opset),this._d("ellipse",i,a)}circle(t,e,s,r){let n=this.ellipse(t,e,s,s,r);return n.shape="circle",n}linearPath(t,e){let s=this._o(e);return this._d("linearPath",[F(t,!1,s)],s)}arc(t,e,s,r,n,a,i=!1,o){let l=this._o(o),h=[],u=q(t,e,s,r,n,a,i,!0,l);if(i&&l.fill)if("solid"===l.fillStyle){let i=Object.assign({},l);i.disableMultiStroke=!0;let o=q(t,e,s,r,n,a,!0,!1,i);o.type="fillPath",h.push(o)}else h.push(function(t,e,s,r,n,a,i){let o=Math.abs(s/2),l=Math.abs(r/2);o+=J(.01*o,i),l+=J(.01*l,i);let h=n,u=a;for(;h<0;)h+=2*Math.PI,u+=2*Math.PI;u-h>2*Math.PI&&(h=0,u=2*Math.PI);let p=(u-h)/i.curveStepCount,c=[];for(let s=h;s<=u;s+=p)c.push([t+o*Math.cos(s),e+l*Math.sin(s)]);return c.push([t+o*Math.cos(u),e+l*Math.sin(u)]),c.push([t,e]),N([c],i)}(t,e,s,r,n,a,l));return l.stroke!==tl&&h.push(u),this._d("arc",h,l)}curve(t,e){let s=this._o(e),r=[],n=R(t,s);if(s.fill&&s.fill!==tl)if("solid"===s.fillStyle){let e=R(t,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{let e=[];if(t.length)for(let r of"number"==typeof t[0][0]?[t]:t)r.length<3?e.push(...r):3===r.length?e.push(...to(tr([r[0],r[0],r[1],r[2]]),10,(1+s.roughness)/2)):e.push(...to(tr(r),10,(1+s.roughness)/2));e.length&&r.push(N([e],s))}return s.stroke!==tl&&r.push(n),this._d("curve",r,s)}polygon(t,e){let s=this._o(e),r=[],n=F(t,!0,s);return s.fill&&("solid"===s.fillStyle?r.push(V([t],s)):r.push(N([t],s))),s.stroke!==tl&&r.push(n),this._d("polygon",r,s)}path(t,e){let s=this._o(e),r=[];if(!t)return this._d("path",r,s);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let n=s.fill&&"transparent"!==s.fill&&s.fill!==tl,a=s.stroke!==tl,i=!!(s.simplification&&s.simplification<1),o=i?4-4*(s.simplification||1):(1+s.roughness)/2,l=function(t,e,s){let r=C(A(z(t))),n=[],a=[],i=[0,0],o=[],l=()=>{o.length>=4&&a.push(...to(o,1)),o=[]},h=()=>{l(),a.length&&(n.push(a),a=[])};for(let{key:t,data:e}of r)switch(t){case"M":h(),i=[e[0],e[1]],a.push(i);break;case"L":l(),a.push([e[0],e[1]]);break;case"C":if(!o.length){let t=a.length?a[a.length-1]:i;o.push([t[0],t[1]])}o.push([e[0],e[1]]),o.push([e[2],e[3]]),o.push([e[4],e[5]]);break;case"Z":l(),a.push([i[0],i[1]])}if(h(),!s)return n;let u=[];for(let t of n){let e=ti(t,0,t.length,s);e.length&&u.push(e)}return u}(t,0,o),h=B(t,s);if(n)if("solid"===s.fillStyle)if(1===l.length){let e=B(t,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else r.push(V(l,s));else r.push(N(l,s));return a&&(i?l.forEach(t=>{r.push(F(t,!1,s))}):r.push(h)),this._d("path",r,s)}opsToPath(t,e){let s="";for(let r of t.ops){let t="number"==typeof e&&e>=0?r.data.map(t=>+t.toFixed(e)):r.data;switch(r.op){case"move":s+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":s+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":s+=`L${t[0]} ${t[1]} `}}return s.trim()}toPaths(t){let e=t.sets||[],s=t.options||this.defaultOptions,r=[];for(let t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:s.stroke,strokeWidth:s.strokeWidth,fill:tl};break;case"fillPath":e={d:this.opsToPath(t),stroke:tl,strokeWidth:0,fill:s.fill||tl};break;case"fillSketch":e=this.fillSketch(t,s)}e&&r.push(e)}return r}fillSketch(t,e){let s=e.fillWeight;return s<0&&(s=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||tl,strokeWidth:s,fill:tl}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}};function tu(t){return{roughness:t?.roughness??1,bowing:t?.bowing??1,passes:t?.passes??2,strokeWidth:t?.strokeWidth??1.6,fill:t?.fill??"none",hachureAngle:t?.hachureAngle??-41,hachureGap:t?.hachureGap??5,fillWeight:t?.fillWeight??.9}}function tp(t,e,s,r,n,a={},i){let o=[],l=function(t={}){return[`stroke-linecap="${t.lineCap??"round"}"`,`stroke-linejoin="${t.lineJoin??"round"}"`,...void 0!==t.miterLimit?[`stroke-miterlimit="${h(String(t.miterLimit))}"`]:[],...void 0!==t.dashArray?[`stroke-dasharray="${h(t.dashArray)}"`]:[],...void 0!==t.dashOffset?[`stroke-dashoffset="${h(String(t.dashOffset))}"`]:[],...void 0!==t.opacity?[`stroke-opacity="${h(String(t.opacity))}"`]:[],...void 0!==t.pathLength?[`pathLength="${h(String(t.pathLength))}"`]:[],...void 0!==t.paintOrder?[`paint-order="${h(t.paintOrder)}"`]:[],...void 0!==t.mixBlendMode?[`style="mix-blend-mode:${t.mixBlendMode}"`]:[],...t.nonScaling?['vector-effect="non-scaling-stroke"']:[]].join(" ")}(a),p=l?` ${l}`:" ",c=i?.stroke===void 0?"":` stroke-opacity="${h(String(i.stroke))}"`,f=i?.fill===void 0?"":` stroke-opacity="${h(String(i.fill))}"`;for(let a of t){let t=th.opsToPath(a,2);t&&("path"===a.type?o.push(`<path d="${t}" fill="none" stroke="${e}" stroke-width="${u(s)}"${p}${c} />`):"fillPath"===a.type?o.push(`<path d="${t}" fill="${r}" fill-opacity="${h(String(i?.fill??.92))}" stroke="none" />`):"fillSketch"===a.type&&o.push(`<path d="${t}" fill="none" stroke="${r}" stroke-width="${u(n.fillWeight)}"${f} />`))}return o.join(`
1
+ import{i as t,p as e,r as s,s as r,t as n,u as a,y as i}from"./chunk-7UFOFWBA.js";import{m as o}from"./chunk-3JTYTXA6.js";import{Ka as l,N as h,Q as u,W as p,Wb as c,Xb as f,fa as d,fb as g,n as k,ra as y,ta as M,ua as m,vb as x}from"./chunk-EIYLJ4FI.js";import"./chunk-YHMTSXIR.js";import"./chunk-QCU5G5PZ.js";function v(t,e,s){if(t&&t.length){let[r,n]=e,a=Math.PI/180*s,i=Math.cos(a),o=Math.sin(a);for(let e of t){let[t,s]=e;e[0]=(t-r)*i-(s-n)*o+r,e[1]=(t-r)*o+(s-n)*i+n}}}function b(t,e){var s;let r=e.hachureAngle+90,n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return e.roughness>=1&&((null==(s=e.randomizer)?void 0:s.next())||Math.random())>.7&&(a=n),function(t,e,s,r=1){let n=Math.max(e,.1),a=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,i=[0,0];if(s)for(let t of a)v(t,i,s);let o=function(t,e,s){let r=[];for(let e of t){var n,a;let t=[...e];n=t[0],a=t[t.length-1],n[0]===a[0]&&n[1]===a[1]||t.push([t[0][0],t[0][1]]),t.length>2&&r.push(t)}let i=[];e=Math.max(e,.1);let o=[];for(let t of r)for(let e=0;e<t.length-1;e++){let s=t[e],r=t[e+1];if(s[1]!==r[1]){let t=Math.min(s[1],r[1]);o.push({ymin:t,ymax:Math.max(s[1],r[1]),x:t===s[1]?s[0]:r[0],islope:(r[0]-s[0])/(r[1]-s[1])})}}if(o.sort((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),!o.length)return i;let l=[],h=o[0].ymin,u=0;for(;l.length||o.length;){if(o.length){let t=-1;for(let e=0;e<o.length&&!(o[e].ymin>h);e++)t=e;o.splice(0,t+1).forEach(t=>{l.push({s:h,edge:t})})}if((l=l.filter(t=>!(t.edge.ymax<=h))).sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==s||u%e==0)&&l.length>1)for(let t=0;t<l.length;t+=2){let e=t+1;if(e>=l.length)break;let s=l[t].edge,r=l[e].edge;i.push([[Math.round(s.x),h],[Math.round(r.x),h]])}h+=s,l.forEach(t=>{t.edge.x=t.edge.x+s*t.edge.islope}),u++}return i}(a,n,r);if(s){let t;for(let t of a)v(t,i,-s);t=[],o.forEach(e=>t.push(...e)),v(t,i,-s)}return o}(t,n,r,a||1)}var $=class{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){let s=b(t,e);return{type:"fillSketch",ops:this.renderLines(s,e)}}renderLines(t,e){let s=[];for(let r of t)s.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],e));return s}};function P(t){let e=t[0],s=t[1];return Math.sqrt(Math.pow(e[0]-s[0],2)+Math.pow(e[1]-s[1],2))}var w=class extends ${fillPolygons(t,e){let s=e.hachureGap;s<0&&(s=4*e.strokeWidth);let r=b(t,Object.assign({},e,{hachureGap:s=Math.max(s,.1)})),n=Math.PI/180*e.hachureAngle,a=[],i=.5*s*Math.cos(n),o=.5*s*Math.sin(n);for(let[t,e]of r)P([t,e])&&a.push([[t[0]-i,t[1]+o],[...e]],[[t[0]+i,t[1]-o],[...e]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}},S=class extends ${fillPolygons(t,e){let s=this._fillPolygons(t,e),r=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),n=this._fillPolygons(t,r);return s.ops=s.ops.concat(n.ops),s}},O=class{constructor(t){this.helper=t}fillPolygons(t,e){let s=b(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(s,e)}dotsOnLines(t,e){let s=[],r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);let n=e.fillWeight;n<0&&(n=e.strokeWidth/2);let a=r/4;for(let i of t){let t=P(i),o=Math.ceil(t/r)-1,l=t-o*r,h=(i[0][0]+i[1][0])/2-r/4,u=Math.min(i[0][1],i[1][1]);for(let t=0;t<o;t++){let i=h-a+2*Math.random()*a,o=u+l+t*r-a+2*Math.random()*a,p=this.helper.ellipse(i,o,n,n,e);s.push(...p.ops)}}return{type:"fillSketch",ops:s}}},L=class{constructor(t){this.helper=t}fillPolygons(t,e){let s=b(t,e);return{type:"fillSketch",ops:this.dashedLine(s,e)}}dashedLine(t,e){let s=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,r=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,n=[];return t.forEach(t=>{let a=P(t),i=Math.floor(a/(s+r)),o=(a+r-i*(s+r))/2,l=t[0],h=t[1];l[0]>h[0]&&(l=t[1],h=t[0]);let u=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let t=0;t<i;t++){let a=t*(s+r),i=a+s,h=[l[0]+a*Math.cos(u)+o*Math.cos(u),l[1]+a*Math.sin(u)+o*Math.sin(u)],p=[l[0]+i*Math.cos(u)+o*Math.cos(u),l[1]+i*Math.sin(u)+o*Math.sin(u)];n.push(...this.helper.doubleLineOps(h[0],h[1],p[0],p[1],e))}}),n}},j=class{constructor(t){this.helper=t}fillPolygons(t,e){let s=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,r=e.zigzagOffset<0?s:e.zigzagOffset,n=b(t,e=Object.assign({},e,{hachureGap:s+r}));return{type:"fillSketch",ops:this.zigzagLines(n,r,e)}}zigzagLines(t,e,s){let r=[];return t.forEach(t=>{let n=Math.round(P(t)/(2*e)),a=t[0],i=t[1];a[0]>i[0]&&(a=t[1],i=t[0]);let o=Math.atan((i[1]-a[1])/(i[0]-a[0]));for(let t=0;t<n;t++){let n=2*t*e,i=(t+1)*2*e,l=Math.sqrt(2*Math.pow(e,2)),h=[a[0]+n*Math.cos(o),a[1]+n*Math.sin(o)],u=[a[0]+i*Math.cos(o),a[1]+i*Math.sin(o)],p=[h[0]+l*Math.cos(o+Math.PI/4),h[1]+l*Math.sin(o+Math.PI/4)];r.push(...this.helper.doubleLineOps(h[0],h[1],p[0],p[1],s),...this.helper.doubleLineOps(p[0],p[1],u[0],u[1],s))}}),r}},I={},_=class{constructor(t){this.seed=t}next(){return this.seed?(0x80000000-1&(this.seed=Math.imul(48271,this.seed)))/0x80000000:Math.random()}},W={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function z(t){let e=[],s=function(t){let e=[];for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:0,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:1,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:2,text:""},e}(t),r="BOD",n=0,a=s[0];for(;2!==a.type;){let i=0,o=[];if("BOD"===r)if("M"!==a.text&&"m"!==a.text)return z("M0,0"+t);else n++,i=W[a.text],r=a.text;else 1===a.type?i=W[r]:(n++,i=W[a.text],r=a.text);if(n+i<s.length){for(let t=n;t<n+i;t++){let e=s[t];if(1===e.type)o[o.length]=+e.text;else throw Error("Param not a number: "+r+","+e.text)}if("number"==typeof W[r]){let t={key:r,data:o};e.push(t),n+=i,a=s[n],"M"===r&&(r="L"),"m"===r&&(r="l")}else throw Error("Bad segment: "+r)}else throw Error("Path data ended short")}return e}function T(t){let e=0,s=0,r=0,n=0,a=[];for(let{key:i,data:o}of t)switch(i){case"M":a.push({key:"M",data:[...o]}),[e,s]=o,[r,n]=o;break;case"m":e+=o[0],s+=o[1],a.push({key:"M",data:[e,s]}),r=e,n=s;break;case"L":a.push({key:"L",data:[...o]}),[e,s]=o;break;case"l":e+=o[0],s+=o[1],a.push({key:"L",data:[e,s]});break;case"C":a.push({key:"C",data:[...o]}),e=o[4],s=o[5];break;case"c":{let t=o.map((t,r)=>r%2?t+s:t+e);a.push({key:"C",data:t}),e=t[4],s=t[5];break}case"Q":a.push({key:"Q",data:[...o]}),e=o[2],s=o[3];break;case"q":{let t=o.map((t,r)=>r%2?t+s:t+e);a.push({key:"Q",data:t}),e=t[2],s=t[3];break}case"A":a.push({key:"A",data:[...o]}),e=o[5],s=o[6];break;case"a":e+=o[5],s+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],e,s]});break;case"H":a.push({key:"H",data:[...o]}),e=o[0];break;case"h":e+=o[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...o]}),s=o[0];break;case"v":s+=o[0],a.push({key:"V",data:[s]});break;case"S":a.push({key:"S",data:[...o]}),e=o[2],s=o[3];break;case"s":{let t=o.map((t,r)=>r%2?t+s:t+e);a.push({key:"S",data:t}),e=t[2],s=t[3];break}case"T":a.push({key:"T",data:[...o]}),e=o[0],s=o[1];break;case"t":e+=o[0],s+=o[1],a.push({key:"T",data:[e,s]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=r,s=n}return a}function A(t){let e=[],s="",r=0,n=0,a=0,i=0,o=0,l=0;for(let{key:h,data:u}of t){switch(h){case"M":e.push({key:"M",data:[...u]}),[r,n]=u,[a,i]=u;break;case"C":e.push({key:"C",data:[...u]}),r=u[4],n=u[5],o=u[2],l=u[3];break;case"L":e.push({key:"L",data:[...u]}),[r,n]=u;break;case"H":r=u[0],e.push({key:"L",data:[r,n]});break;case"V":n=u[0],e.push({key:"L",data:[r,n]});break;case"S":{let t=0,a=0;"C"===s||"S"===s?(t=r+(r-o),a=n+(n-l)):(t=r,a=n),e.push({key:"C",data:[t,a,...u]}),o=u[0],l=u[1],r=u[2],n=u[3];break}case"T":{let[t,a]=u,i=0,h=0;"Q"===s||"T"===s?(i=r+(r-o),h=n+(n-l)):(i=r,h=n);let p=r+2*(i-r)/3,c=n+2*(h-n)/3,f=t+2*(i-t)/3,d=a+2*(h-a)/3;e.push({key:"C",data:[p,c,f,d,t,a]}),o=i,l=h,r=t,n=a;break}case"Q":{let[t,s,a,i]=u,h=r+2*(t-r)/3,p=n+2*(s-n)/3,c=a+2*(t-a)/3,f=i+2*(s-i)/3;e.push({key:"C",data:[h,p,c,f,a,i]}),o=t,l=s,r=a,n=i;break}case"A":{let t=Math.abs(u[0]),s=Math.abs(u[1]),a=u[2],i=u[3],o=u[4],l=u[5],h=u[6];0===t||0===s?(e.push({key:"C",data:[r,n,l,h,l,h]}),r=l,n=h):(r!==l||n!==h)&&((function t(e,s,r,n,a,i,o,l,h,u){let p=Math.PI*o/180,c=[],f=0,d=0,g=0,k=0;if(u)[f,d,g,k]=u;else{[e,s]=C(e,s,-p),[r,n]=C(r,n,-p);let t=(e-r)/2,o=(s-n)/2,u=t*t/(a*a)+o*o/(i*i);u>1&&(a*=u=Math.sqrt(u),i*=u);let c=a*a,y=i*i,M=(l===h?-1:1)*Math.sqrt(Math.abs((c*y-c*o*o-y*t*t)/(c*o*o+y*t*t)));g=M*a*o/i+(e+r)/2,k=-(M*i)*t/a+(s+n)/2,f=Math.asin(parseFloat(((s-k)/i).toFixed(9))),d=Math.asin(parseFloat(((n-k)/i).toFixed(9))),e<g&&(f=Math.PI-f),r<g&&(d=Math.PI-d),f<0&&(f=2*Math.PI+f),d<0&&(d=2*Math.PI+d),h&&f>d&&(f-=2*Math.PI),!h&&d>f&&(d-=2*Math.PI)}let y=d-f;if(Math.abs(y)>120*Math.PI/180){let e=d,s=r,l=n;c=t(r=g+a*Math.cos(d=h&&d>f?f+120*Math.PI/180*1:f+-(120*Math.PI/180*1)),n=k+i*Math.sin(d),s,l,a,i,o,0,h,[d,e,g,k])}y=d-f;let M=Math.cos(f),m=Math.cos(d),x=Math.tan(y/4),v=4/3*a*x,b=4/3*i*x,$=[e,s],P=[e+v*Math.sin(f),s-b*M],w=[r+v*Math.sin(d),n-b*m],S=[r,n];if(P[0]=2*$[0]-P[0],P[1]=2*$[1]-P[1],u)return[P,w,S].concat(c);{c=[P,w,S].concat(c);let t=[];for(let e=0;e<c.length;e+=3){let s=C(c[e][0],c[e][1],p),r=C(c[e+1][0],c[e+1][1],p),n=C(c[e+2][0],c[e+2][1],p);t.push([s[0],s[1],r[0],r[1],n[0],n[1]])}return t}})(r,n,l,h,t,s,a,i,o).forEach(function(t){e.push({key:"C",data:t})}),r=l,n=h);break}case"Z":e.push({key:"Z",data:[]}),r=a,n=i}s=h}return e}function C(t,e,s){return[t*Math.cos(s)-e*Math.sin(s),t*Math.sin(s)+e*Math.cos(s)]}var G={randOffset:function(t,e){return U(t,e)},randOffsetWithRange:function(t,e,s){return D(t,e,s)},ellipse:function(t,e,s,r,n){let a=B(s,r,n);return Q(t,e,n,a).opset},doubleLineOps:function(t,e,s,r,n){return X(t,e,s,r,n,!0)}};function E(t,e,s,r,n){return{type:"path",ops:X(t,e,s,r,n)}}function R(t,e,s){let r=(t||[]).length;if(r>2){let n=[];for(let e=0;e<r-1;e++)n.push(...X(t[e][0],t[e][1],t[e+1][0],t[e+1][1],s));return e&&n.push(...X(t[r-1][0],t[r-1][1],t[0][0],t[0][1],s)),{type:"path",ops:n}}return 2===r?E(t[0][0],t[0][1],t[1][0],t[1][1],s):{type:"path",ops:[]}}function F(t,e){if(t.length){let s="number"==typeof t[0][0]?[t]:t,r=K(s[0],+(1+.2*e.roughness),e),n=e.disableMultiStroke?[]:K(s[0],1.5*(1+.22*e.roughness),H(e));for(let t=1;t<s.length;t++){let a=s[t];if(a.length){let t=K(a,+(1+.2*e.roughness),e),s=e.disableMultiStroke?[]:K(a,1.5*(1+.22*e.roughness),H(e));for(let e of t)"move"!==e.op&&r.push(e);for(let t of s)"move"!==t.op&&n.push(t)}}return{type:"path",ops:r.concat(n)}}return{type:"path",ops:[]}}function B(t,e,s){let r=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),n=2*Math.PI/Math.ceil(Math.max(s.curveStepCount,s.curveStepCount/Math.sqrt(200)*r)),a=Math.abs(t/2),i=Math.abs(e/2),o=1-s.curveFitting;return a+=U(a*o,s),i+=U(i*o,s),{increment:n,rx:a,ry:i}}function Q(t,e,s,r){let[n,a]=te(r.increment,t,e,r.rx,r.ry,1,r.increment*D(.1,D(.4,1,s),s),s),i=tt(n,null,s);if(!s.disableMultiStroke&&0!==s.roughness){let[n]=te(r.increment,t,e,r.rx,r.ry,1.5,0,s),a=tt(n,null,s);i=i.concat(a)}return{estimatedPoints:a,opset:{type:"path",ops:i}}}function Z(t,e,s,r,n,a,i,o,l){let h=Math.abs(s/2),u=Math.abs(r/2);h+=U(.01*h,l),u+=U(.01*u,l);let p=n,c=a;for(;p<0;)p+=2*Math.PI,c+=2*Math.PI;c-p>2*Math.PI&&(p=0,c=2*Math.PI);let f=Math.min(2*Math.PI/l.curveStepCount/2,(c-p)/2),d=ts(f,t,e,h,u,p,c,1,l);if(!l.disableMultiStroke){let s=ts(f,t,e,h,u,p,c,1.5,l);d.push(...s)}return i&&(o?d.push(...X(t,e,t+h*Math.cos(p),e+u*Math.sin(p),l),...X(t,e,t+h*Math.cos(c),e+u*Math.sin(c),l)):d.push({op:"lineTo",data:[t,e]},{op:"lineTo",data:[t+h*Math.cos(p),e+u*Math.sin(p)]})),{type:"path",ops:d}}function q(t,e){let s=A(T(z(t))),r=[],n=[0,0],a=[0,0];for(let{key:t,data:i}of s)switch(t){case"M":a=[i[0],i[1]],n=[i[0],i[1]];break;case"L":r.push(...X(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]];break;case"C":{let[t,s,n,o,l,h]=i;r.push(...function(t,e,s,r,n,a,i,o){let l=[],h=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3],u=[0,0],p=o.disableMultiStroke?1:2,c=o.preserveVertices;for(let f=0;f<p;f++)0===f?l.push({op:"move",data:[i[0],i[1]]}):l.push({op:"move",data:[i[0]+(c?0:U(h[0],o)),i[1]+(c?0:U(h[0],o))]}),u=c?[n,a]:[n+U(h[f],o),a+U(h[f],o)],l.push({op:"bcurveTo",data:[t+U(h[f],o),e+U(h[f],o),s+U(h[f],o),r+U(h[f],o),u[0],u[1]]});return l}(t,s,n,o,l,h,a,e)),a=[l,h];break}case"Z":r.push(...X(a[0],a[1],n[0],n[1],e)),a=[n[0],n[1]]}return{type:"path",ops:r}}function N(t,e){let s=[];for(let r of t)if(r.length){let t=e.maxRandomnessOffset||0,n=r.length;if(n>2){s.push({op:"move",data:[r[0][0]+U(t,e),r[0][1]+U(t,e)]});for(let a=1;a<n;a++)s.push({op:"lineTo",data:[r[a][0]+U(t,e),r[a][1]+U(t,e)]})}}return{type:"fillPath",ops:s}}function V(t,e){return(function(t,e){let s=t.fillStyle||"hachure";if(!I[s])switch(s){case"zigzag":I[s]||(I[s]=new w(e));break;case"cross-hatch":I[s]||(I[s]=new S(e));break;case"dots":I[s]||(I[s]=new O(e));break;case"dashed":I[s]||(I[s]=new L(e));break;case"zigzag-line":I[s]||(I[s]=new j(e));break;default:I[s="hachure"]||(I[s]=new $(e))}return I[s]})(e,G).fillPolygons(t,e)}function H(t){let e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function J(t){return t.randomizer||(t.randomizer=new _(t.seed||0)),t.randomizer.next()}function D(t,e,s,r=1){return s.roughness*r*(J(s)*(e-t)+t)}function U(t,e,s=1){return D(-t,t,e,s)}function X(t,e,s,r,n,a=!1){let i=a?n.disableMultiStrokeFill:n.disableMultiStroke,o=Y(t,e,s,r,n,!0,!1);if(i)return o;let l=Y(t,e,s,r,n,!0,!0);return o.concat(l)}function Y(t,e,s,r,n,a,i){let o=Math.pow(t-s,2)+Math.pow(e-r,2),l=Math.sqrt(o),h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let u=n.maxRandomnessOffset||0;u*u*100>o&&(u=l/10);let p=u/2,c=.2+.2*J(n),f=n.bowing*n.maxRandomnessOffset*(r-e)/200,d=n.bowing*n.maxRandomnessOffset*(t-s)/200;f=U(f,n,h),d=U(d,n,h);let g=[],k=n.preserveVertices;return a&&(i?g.push({op:"move",data:[t+(k?0:U(p,n,h)),e+(k?0:U(p,n,h))]}):g.push({op:"move",data:[t+(k?0:U(u,n,h)),e+(k?0:U(u,n,h))]})),i?g.push({op:"bcurveTo",data:[f+t+(s-t)*c+U(p,n,h),d+e+(r-e)*c+U(p,n,h),f+t+2*(s-t)*c+U(p,n,h),d+e+2*(r-e)*c+U(p,n,h),s+(k?0:U(p,n,h)),r+(k?0:U(p,n,h))]}):g.push({op:"bcurveTo",data:[f+t+(s-t)*c+U(u,n,h),d+e+(r-e)*c+U(u,n,h),f+t+2*(s-t)*c+U(u,n,h),d+e+2*(r-e)*c+U(u,n,h),s+(k?0:U(u,n,h)),r+(k?0:U(u,n,h))]}),g}function K(t,e,s){if(!t.length)return[];let r=[];r.push([t[0][0]+U(e,s),t[0][1]+U(e,s)]),r.push([t[0][0]+U(e,s),t[0][1]+U(e,s)]);for(let n=1;n<t.length;n++)r.push([t[n][0]+U(e,s),t[n][1]+U(e,s)]),n===t.length-1&&r.push([t[n][0]+U(e,s),t[n][1]+U(e,s)]);return tt(r,null,s)}function tt(t,e,s){let r=t.length,n=[];if(r>3){let a=[],i=1-s.curveTightness;n.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<r;e++){let s=t[e];a[0]=[s[0],s[1]],a[1]=[s[0]+(i*t[e+1][0]-i*t[e-1][0])/6,s[1]+(i*t[e+1][1]-i*t[e-1][1])/6],a[2]=[t[e+1][0]+(i*t[e][0]-i*t[e+2][0])/6,t[e+1][1]+(i*t[e][1]-i*t[e+2][1])/6],a[3]=[t[e+1][0],t[e+1][1]],n.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&2===e.length){let t=s.maxRandomnessOffset;n.push({op:"lineTo",data:[e[0]+U(t,s),e[1]+U(t,s)]})}}else 3===r?(n.push({op:"move",data:[t[1][0],t[1][1]]}),n.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===r&&n.push(...Y(t[0][0],t[0][1],t[1][0],t[1][1],s,!0,!0));return n}function te(t,e,s,r,n,a,i,o){let l=0===o.roughness,h=[],u=[];if(l){t/=4,u.push([e+r*Math.cos(-t),s+n*Math.sin(-t)]);for(let a=0;a<=2*Math.PI;a+=t){let t=[e+r*Math.cos(a),s+n*Math.sin(a)];h.push(t),u.push(t)}u.push([e+ +r,s+0*n]),u.push([e+r*Math.cos(t),s+n*Math.sin(t)])}else{let l=U(.5,o)-Math.PI/2;u.push([U(a,o)+e+.9*r*Math.cos(l-t),U(a,o)+s+.9*n*Math.sin(l-t)]);let p=2*Math.PI+l-.01;for(let i=l;i<p;i+=t){let t=[U(a,o)+e+r*Math.cos(i),U(a,o)+s+n*Math.sin(i)];h.push(t),u.push(t)}u.push([U(a,o)+e+r*Math.cos(l+2*Math.PI+.5*i),U(a,o)+s+n*Math.sin(l+2*Math.PI+.5*i)]),u.push([U(a,o)+e+.98*r*Math.cos(l+i),U(a,o)+s+.98*n*Math.sin(l+i)]),u.push([U(a,o)+e+.9*r*Math.cos(l+.5*i),U(a,o)+s+.9*n*Math.sin(l+.5*i)])}return[u,h]}function ts(t,e,s,r,n,a,i,o,l){let h=a+U(.1,l),u=[];u.push([U(o,l)+e+.9*r*Math.cos(h-t),U(o,l)+s+.9*n*Math.sin(h-t)]);for(let a=h;a<=i;a+=t)u.push([U(o,l)+e+r*Math.cos(a),U(o,l)+s+n*Math.sin(a)]);return u.push([e+r*Math.cos(i),s+n*Math.sin(i)]),u.push([e+r*Math.cos(i),s+n*Math.sin(i)]),tt(u,null,l)}function tr(t,e=0){let s=t.length;if(s<3)throw Error("A curve must have at least three points.");let r=[];if(3===s)r.push([...t[0]],[...t[1]],[...t[2]],[...t[2]]);else{let s=[];s.push(t[0],t[0]);for(let e=1;e<t.length;e++)s.push(t[e]),e===t.length-1&&s.push(t[e]);let n=[],a=1-e;r.push([...s[0]]);for(let t=1;t+2<s.length;t++){let e=s[t];n[0]=[e[0],e[1]],n[1]=[e[0]+(a*s[t+1][0]-a*s[t-1][0])/6,e[1]+(a*s[t+1][1]-a*s[t-1][1])/6],n[2]=[s[t+1][0]+(a*s[t][0]-a*s[t+2][0])/6,s[t+1][1]+(a*s[t][1]-a*s[t+2][1])/6],n[3]=[s[t+1][0],s[t+1][1]],r.push(n[1],n[2],n[3])}}return r}function tn(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function ta(t,e,s){return[t[0]+(e[0]-t[0])*s,t[1]+(e[1]-t[1])*s]}function ti(t,e,s,r,n){let a=n||[],i=t[e],o=t[s-1],l=0,h=1;for(let r=e+1;r<s-1;++r){let e=function(t,e,s){let r=tn(e,s);if(0===r)return tn(t,e);let n=((t[0]-e[0])*(s[0]-e[0])+(t[1]-e[1])*(s[1]-e[1]))/r;return tn(t,ta(e,s,n=Math.max(0,Math.min(1,n))))}(t[r],i,o);e>l&&(l=e,h=r)}return Math.sqrt(l)>r?(ti(t,e,h+1,r,a),ti(t,h,s,r,a)):(a.length||a.push(i),a.push(o)),a}function to(t,e=.15,s){let r=[],n=(t.length-1)/3;for(let s=0;s<n;s++)!function t(e,s,r,n){let a,i,o,l,h,u,p,c,f=n||[];if(a=e[s+0],i=e[s+1],o=e[s+2],l=e[s+3],h=3*i[0]-2*a[0]-l[0],h*=h,u=3*i[1]-2*a[1]-l[1],u*=u,p=3*o[0]-2*l[0]-a[0],p*=p,c=3*o[1]-2*l[1]-a[1],c*=c,h<p&&(h=p),u<c&&(u=c),h+u<r){let t=e[s+0];f.length?Math.sqrt(tn(f[f.length-1],t))>1&&f.push(t):f.push(t),f.push(e[s+3])}else{let n=e[s+0],a=e[s+1],i=e[s+2],o=e[s+3],l=ta(n,a,.5),h=ta(a,i,.5),u=ta(i,o,.5),p=ta(l,h,.5),c=ta(h,u,.5),d=ta(p,c,.5);t([n,l,p,d],0,r,f),t([d,c,u,o],0,r,f)}return f}(t,3*s,e,r);return s&&s>0?ti(r,0,r.length,s):r}var tl="none",th=new class{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(0x80000000*Math.random())}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,s){return{shape:t,sets:e||[],options:s||this.defaultOptions}}line(t,e,s,r,n){let a=this._o(n);return this._d("line",[E(t,e,s,r,a)],a)}rectangle(t,e,s,r,n){let a=this._o(n),i=[],o=R([[t,e],[t+s,e],[t+s,e+r],[t,e+r]],!0,a);if(a.fill){let n=[[t,e],[t+s,e],[t+s,e+r],[t,e+r]];"solid"===a.fillStyle?i.push(N([n],a)):i.push(V([n],a))}return a.stroke!==tl&&i.push(o),this._d("rectangle",i,a)}ellipse(t,e,s,r,n){let a=this._o(n),i=[],o=B(s,r,a),l=Q(t,e,a,o);if(a.fill)if("solid"===a.fillStyle){let s=Q(t,e,a,o).opset;s.type="fillPath",i.push(s)}else i.push(V([l.estimatedPoints],a));return a.stroke!==tl&&i.push(l.opset),this._d("ellipse",i,a)}circle(t,e,s,r){let n=this.ellipse(t,e,s,s,r);return n.shape="circle",n}linearPath(t,e){let s=this._o(e);return this._d("linearPath",[R(t,!1,s)],s)}arc(t,e,s,r,n,a,i=!1,o){let l=this._o(o),h=[],u=Z(t,e,s,r,n,a,i,!0,l);if(i&&l.fill)if("solid"===l.fillStyle){let i=Object.assign({},l);i.disableMultiStroke=!0;let o=Z(t,e,s,r,n,a,!0,!1,i);o.type="fillPath",h.push(o)}else h.push(function(t,e,s,r,n,a,i){let o=Math.abs(s/2),l=Math.abs(r/2);o+=U(.01*o,i),l+=U(.01*l,i);let h=n,u=a;for(;h<0;)h+=2*Math.PI,u+=2*Math.PI;u-h>2*Math.PI&&(h=0,u=2*Math.PI);let p=(u-h)/i.curveStepCount,c=[];for(let s=h;s<=u;s+=p)c.push([t+o*Math.cos(s),e+l*Math.sin(s)]);return c.push([t+o*Math.cos(u),e+l*Math.sin(u)]),c.push([t,e]),V([c],i)}(t,e,s,r,n,a,l));return l.stroke!==tl&&h.push(u),this._d("arc",h,l)}curve(t,e){let s=this._o(e),r=[],n=F(t,s);if(s.fill&&s.fill!==tl)if("solid"===s.fillStyle){let e=F(t,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{let e=[];if(t.length)for(let r of"number"==typeof t[0][0]?[t]:t)r.length<3?e.push(...r):3===r.length?e.push(...to(tr([r[0],r[0],r[1],r[2]]),10,(1+s.roughness)/2)):e.push(...to(tr(r),10,(1+s.roughness)/2));e.length&&r.push(V([e],s))}return s.stroke!==tl&&r.push(n),this._d("curve",r,s)}polygon(t,e){let s=this._o(e),r=[],n=R(t,!0,s);return s.fill&&("solid"===s.fillStyle?r.push(N([t],s)):r.push(V([t],s))),s.stroke!==tl&&r.push(n),this._d("polygon",r,s)}path(t,e){let s=this._o(e),r=[];if(!t)return this._d("path",r,s);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let n=s.fill&&"transparent"!==s.fill&&s.fill!==tl,a=s.stroke!==tl,i=!!(s.simplification&&s.simplification<1),o=i?4-4*(s.simplification||1):(1+s.roughness)/2,l=function(t,e,s){let r=A(T(z(t))),n=[],a=[],i=[0,0],o=[],l=()=>{o.length>=4&&a.push(...to(o,1)),o=[]},h=()=>{l(),a.length&&(n.push(a),a=[])};for(let{key:t,data:e}of r)switch(t){case"M":h(),i=[e[0],e[1]],a.push(i);break;case"L":l(),a.push([e[0],e[1]]);break;case"C":if(!o.length){let t=a.length?a[a.length-1]:i;o.push([t[0],t[1]])}o.push([e[0],e[1]]),o.push([e[2],e[3]]),o.push([e[4],e[5]]);break;case"Z":l(),a.push([i[0],i[1]])}if(h(),!s)return n;let u=[];for(let t of n){let e=ti(t,0,t.length,s);e.length&&u.push(e)}return u}(t,0,o),h=q(t,s);if(n)if("solid"===s.fillStyle)if(1===l.length){let e=q(t,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else r.push(N(l,s));else r.push(V(l,s));return a&&(i?l.forEach(t=>{r.push(R(t,!1,s))}):r.push(h)),this._d("path",r,s)}opsToPath(t,e){let s="";for(let r of t.ops){let t="number"==typeof e&&e>=0?r.data.map(t=>+t.toFixed(e)):r.data;switch(r.op){case"move":s+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":s+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":s+=`L${t[0]} ${t[1]} `}}return s.trim()}toPaths(t){let e=t.sets||[],s=t.options||this.defaultOptions,r=[];for(let t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:s.stroke,strokeWidth:s.strokeWidth,fill:tl};break;case"fillPath":e={d:this.opsToPath(t),stroke:tl,strokeWidth:0,fill:s.fill||tl};break;case"fillSketch":e=this.fillSketch(t,s)}e&&r.push(e)}return r}fillSketch(t,e){let s=e.fillWeight;return s<0&&(s=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||tl,strokeWidth:s,fill:tl}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}};function tu(t){return{roughness:t?.roughness??1,bowing:t?.bowing??1,passes:t?.passes??2,strokeWidth:t?.strokeWidth??1.6,fill:t?.fill??"none",hachureAngle:t?.hachureAngle??-41,hachureGap:t?.hachureGap??5,fillWeight:t?.fillWeight??.9}}function tp(t,e,s,r,n,a={},i){let o=[],l=function(t={}){return[`stroke-linecap="${t.lineCap??"round"}"`,`stroke-linejoin="${t.lineJoin??"round"}"`,...void 0!==t.miterLimit?[`stroke-miterlimit="${h(String(t.miterLimit))}"`]:[],...void 0!==t.dashArray?[`stroke-dasharray="${h(t.dashArray)}"`]:[],...void 0!==t.dashOffset?[`stroke-dashoffset="${h(String(t.dashOffset))}"`]:[],...void 0!==t.opacity?[`stroke-opacity="${h(String(t.opacity))}"`]:[],...void 0!==t.pathLength?[`pathLength="${h(String(t.pathLength))}"`]:[],...void 0!==t.paintOrder?[`paint-order="${h(t.paintOrder)}"`]:[],...void 0!==t.mixBlendMode?[`style="mix-blend-mode:${t.mixBlendMode}"`]:[],...t.nonScaling?['vector-effect="non-scaling-stroke"']:[]].join(" ")}(a),p=l?` ${l}`:" ",c=i?.stroke===void 0?"":` stroke-opacity="${h(String(i.stroke))}"`,f=i?.fill===void 0?"":` stroke-opacity="${h(String(i.fill))}"`;for(let a of t){let t=th.opsToPath(a,2);t&&("path"===a.type?o.push(`<path d="${t}" fill="none" stroke="${e}" stroke-width="${u(s)}"${p}${c} />`):"fillPath"===a.type?o.push(`<path d="${t}" fill="${r}" fill-opacity="${h(String(i?.fill??.92))}" stroke="none" />`):"fillSketch"===a.type&&o.push(`<path d="${t}" fill="none" stroke="${r}" stroke-width="${u(n.fillWeight)}"${f} />`))}return o.join(`
2
2
  `)}function tc(t,e,s,r,n,a,i,o,l){var h,u,p,c,f;let d={...o,...void 0!==i?{dashArray:i}:{}},g={seed:e,roughness:a.roughness,bowing:a.bowing,stroke:s,strokeWidth:r,disableMultiStroke:a.passes<2,...n?{fill:n,fillStyle:"solid"===a.fill?"solid":"hachure",fillWeight:a.fillWeight,hachureGap:a.hachureGap,hachureAngle:a.hachureAngle}:{},preserveVertices:!1};try{switch(t.kind){case"rect":let e;return(t.rx??0)>.5?tp(th.path((h=t.x,u=t.y,p=t.width,c=t.height,f=t.rx,e=Math.min(f,p/2,c/2),`M ${h+e} ${u} L ${h+p-e} ${u} Q ${h+p} ${u} ${h+p} ${u+e} L ${h+p} ${u+c-e} Q ${h+p} ${u+c} ${h+p-e} ${u+c} L ${h+e} ${u+c} Q ${h} ${u+c} ${h} ${u+c-e} L ${h} ${u+e} Q ${h} ${u} ${h+e} ${u} Z`),g).sets,s,r,n,a,d,l):tp(th.rectangle(t.x,t.y,t.width,t.height,g).sets,s,r,n,a,d,l);case"circle":return tp(th.circle(t.cx,t.cy,2*t.r,g).sets,s,r,n,a,d,l);case"ellipse":return tp(th.ellipse(t.cx,t.cy,2*t.rx,2*t.ry,g).sets,s,r,n,a,d,l);case"line":return tp(th.line(t.x1,t.y1,t.x2,t.y2,g).sets,s,r,void 0,a,d,l);case"polygon":return tp(th.polygon(t.points.map(t=>[t.x,t.y]),g).sets,s,r,n,a,d,l);case"polyline":return tp(th.linearPath(t.points.map(t=>[t.x,t.y]),g).sets,s,r,void 0,a,d,l);case"path":return tp(th.path(t.d,g).sets,s,r,n,a,d,l);case"compound":return""}}catch{return""}}function tf(t,e,s,r,n,a,i,o,l){if(t.sketcher){let h=t.sketcher(e,{seed:s,stroke:r,width:n,fill:a,p:t.p,style:t.ctx.style,dash:i,strokeProjection:o,opacity:l});if(null!==h)return h}return tc(e,s,r,n,a,t.p,i,o,l)}function td(t,e,s){return t.replace(`<${e} `,`<${e} ${s} `)}function tg(t){if(void 0===t)return 1;let e="number"==typeof t?t:parseFloat(t);return Number.isNaN(e)?1:e}function tk(t,e){return void 0!==t?t:e}function ty(t,e){return e&&""!==t?`<g transform="${l(e)}">${t}</g>`:t}function tM(t){return t.startsWith("var(--_node-fill")||t.startsWith("var(--_group")||"var(--bg)"===t||"var(--surface)"===t}function tm(t,e){return/<text\b[^>]*?\sfill="/.test(t)?t.replace(/(<text\b[^>]*?\sfill=")[^"]*(")/,`$1${h(e)}$2`):t.replace(/<text /,`<text fill="${h(e)}" `)}function tx(t,e){switch(t.kind){case"document":return x(t);case"shape":return"shape"===k(t.role).sketch?function(t,e){let s=e.p,r=x(t),n=function(t){let e=[],s=0,r,n=/<\/([a-zA-Z][a-zA-Z0-9-]*)>/g,a=[];for(let e of g(t)){let t=new Map(e.attributes.map(t=>[t.name,t.value]));a.push({index:e.start,kind:e.selfClosing?"self":"open",tag:e.name,attrs:t})}for(;null!==(r=n.exec(t));)a.push({index:r.index,kind:"close",tag:r[1]});for(let t of(a.sort((t,e)=>t.index-e.index),a))"self"===t.kind?0===s&&e.push({tag:t.tag,attrs:t.attrs}):"open"===t.kind?(0===s&&e.push({tag:t.tag,attrs:t.attrs}),s++):s--;return e}(r),a="compound"===t.geometry.kind?t.geometry.children:[t.geometry];if(n.length<a.length)return r;let i=r.split(`
3
- `),o=t=>1===i.length&&0===t?r:i[t]??"",l=[];for(let r=0;r<a.length;r++){var h,u;let i=n[r],p=tk(i.attrs.get("stroke"),t.paint.stroke),f=tk(i.attrs.get("fill"),t.paint.fill),d=c(e.ctx.seed,t.id,`outline:${r}`)||1,g=tg(tk(i.attrs.get("stroke-width"),t.paint.strokeWidth)),k=tk(i.attrs.get("stroke-dasharray"),t.paint.strokeDasharray),y=void 0!==p&&"none"!==p&&g>0,M=void 0!==f&&"none"!==f,m=M&&"none"!==s.fill?f:void 0,x=function(t,e){let s=t.get("opacity")??e.opacity,r=t.get("fill-opacity")??e.fillOpacity,n=t.get("stroke-opacity")??e.strokeOpacity;if(void 0===s&&void 0===r&&void 0===n)return;let a=t=>void 0===t?s:void 0===s?t:Number(s)*Number(t);return{fill:a(r),stroke:a(n)}}(i.attrs,t.paint)??{};if("wash"===s.fill&&t.channels?.category!==void 0&&["pie-slice","actor","legend","point","bar"].includes(t.role)&&(x.fill??="1"),!y){if(t.surfaceFragment&&M&&"none"===s.fill&&tM(f))continue;if(m){let s=tf(e,a[r],d,"none",0,m,k,void 0,x);if(s){l.push(ty(s,t.transform));continue}}l.push(o(r));continue}let v=Math.max(.6,Math.min(s.strokeWidth*g,4*s.strokeWidth)),b=tf(e,a[r],d,p,v,m,k,void 0,x);if(!b){l.push(o(r));continue}M&&"none"===s.fill&&!tM(f)&&l.push((h=o(r),u=i.tag,/style="/.test(h)?h.replace(/style="([^"]*)"/,(t,e)=>{let s=0===e.trim().length||/;\s*$/.test(e)?"":";";return`style="${e}${s}stroke:none"`}):td(h,u,'style="stroke:none"'))),l.push(ty(b,t.transform))}let p=l.filter(Boolean).join(`
4
- `);return t.identity&&!/\sdata-id=/.test(p)?f(p,t.identity):p}(t,e):x(t);case"connector":return"connector"===k(t.role).sketch?function(t,e){let s=x(t);if("invisible"===t.lineStyle||""===s)return s;let r=t.stroke.color,n=tg(t.stroke.width);if(n<=0)return s;let a=t.stroke.encodesValue?n:e.p.strokeWidth*n,i=c(e.ctx.seed,t.id,"stroke")||1,o=t.stroke.dash?"string"==typeof t.stroke.dash.array?t.stroke.dash.array:t.stroke.dash.array.join(" "):void 0,l={...void 0!==o?{dashArray:o}:{},...t.stroke.dash?.offset!==void 0?{dashOffset:t.stroke.dash.offset}:{},lineCap:t.stroke.lineCap,lineJoin:t.stroke.lineJoin,miterLimit:t.stroke.miterLimit,...void 0!==t.stroke.opacity?{opacity:t.stroke.opacity}:{},...void 0!==t.stroke.pathLength?{pathLength:t.stroke.pathLength}:{},...void 0!==t.stroke.paintOrder?{paintOrder:t.stroke.paintOrder}:{},...void 0!==t.stroke.mixBlendMode?{mixBlendMode:t.stroke.mixBlendMode}:{},nonScaling:t.stroke.nonScaling},h="",u=t.route.geometry;if("polyline"===u.kind)h=tf(e,{kind:"polyline",points:u.points},i,r,a,void 0,o,l);else if("line"===u.kind)h=tf(e,u,i,r,a,void 0,o,l);else{let s=d(u,t.route.closed);if(1===s.length&&(h=tf(e,{kind:"path",d:u.d},i,r,a,void 0,o,l)),!h&&u.points.length>1){let t=s.map((t,s)=>{let n=t.points[0],h=t.points.at(-1);return tf(e,{kind:"polyline",points:[...t.closed&&n&&h&&(n.x!==h.x||n.y!==h.y)?[...t.points,n]:t.points]},i+s,r,a,void 0,o,l)});h=t.every(Boolean)?t.join(`
3
+ `),o=t=>1===i.length&&0===t?r:i[t]??"",l=[];for(let r=0;r<a.length;r++){var h,u;let i=n[r],p=tk(i.attrs.get("stroke"),t.paint.stroke),c=tk(i.attrs.get("fill"),t.paint.fill),d=f(e.ctx.seed,t.id,`outline:${r}`)||1,g=tg(tk(i.attrs.get("stroke-width"),t.paint.strokeWidth)),k=tk(i.attrs.get("stroke-dasharray"),t.paint.strokeDasharray),y=void 0!==p&&"none"!==p&&g>0,M=void 0!==c&&"none"!==c,m=M&&"none"!==s.fill?c:void 0,x=function(t,e){let s=t.get("opacity")??e.opacity,r=t.get("fill-opacity")??e.fillOpacity,n=t.get("stroke-opacity")??e.strokeOpacity;if(void 0===s&&void 0===r&&void 0===n)return;let a=t=>void 0===t?s:void 0===s?t:Number(s)*Number(t);return{fill:a(r),stroke:a(n)}}(i.attrs,t.paint)??{};if("wash"===s.fill&&t.channels?.category!==void 0&&["pie-slice","actor","legend","point","bar"].includes(t.role)&&(x.fill??="1"),!y){if(t.surfaceFragment&&M&&"none"===s.fill&&tM(c))continue;if(m){let s=tf(e,a[r],d,"none",0,m,k,void 0,x);if(s){l.push(ty(s,t.transform));continue}}l.push(o(r));continue}let v=Math.max(.6,Math.min(s.strokeWidth*g,4*s.strokeWidth)),b=tf(e,a[r],d,p,v,m,k,void 0,x);if(!b){l.push(o(r));continue}M&&"none"===s.fill&&!tM(c)&&l.push((h=o(r),u=i.tag,/style="/.test(h)?h.replace(/style="([^"]*)"/,(t,e)=>{let s=0===e.trim().length||/;\s*$/.test(e)?"":";";return`style="${e}${s}stroke:none"`}):td(h,u,'style="stroke:none"'))),l.push(ty(b,t.transform))}let c=l.filter(Boolean).join(`
4
+ `);return t.identity&&!/\sdata-id=/.test(c)?p(c,t.identity):c}(t,e):x(t);case"connector":return"connector"===k(t.role).sketch?function(t,e){let s=x(t);if("invisible"===t.lineStyle||""===s)return s;let r=t.stroke.color,n=tg(t.stroke.width);if(n<=0)return s;let a=t.stroke.encodesValue?n:e.p.strokeWidth*n,i=f(e.ctx.seed,t.id,"stroke")||1,o=t.stroke.dash?"string"==typeof t.stroke.dash.array?t.stroke.dash.array:t.stroke.dash.array.join(" "):void 0,l={...void 0!==o?{dashArray:o}:{},...t.stroke.dash?.offset!==void 0?{dashOffset:t.stroke.dash.offset}:{},lineCap:t.stroke.lineCap,lineJoin:t.stroke.lineJoin,miterLimit:t.stroke.miterLimit,...void 0!==t.stroke.opacity?{opacity:t.stroke.opacity}:{},...void 0!==t.stroke.pathLength?{pathLength:t.stroke.pathLength}:{},...void 0!==t.stroke.paintOrder?{paintOrder:t.stroke.paintOrder}:{},...void 0!==t.stroke.mixBlendMode?{mixBlendMode:t.stroke.mixBlendMode}:{},nonScaling:t.stroke.nonScaling},h="",u=t.route.geometry;if("polyline"===u.kind)h=tf(e,{kind:"polyline",points:u.points},i,r,a,void 0,o,l);else if("line"===u.kind)h=tf(e,u,i,r,a,void 0,o,l);else{let s=d(u,t.route.closed);if(1===s.length&&(h=tf(e,{kind:"path",d:u.d},i,r,a,void 0,o,l)),!h&&u.points.length>1){let t=s.map((t,s)=>{let n=t.points[0],h=t.points.at(-1);return tf(e,{kind:"polyline",points:[...t.closed&&n&&h&&(n.x!==h.x||n.y!==h.y)?[...t.points,n]:t.points]},i+s,r,a,void 0,o,l)});h=t.every(Boolean)?t.join(`
5
5
  `):""}}if(!h)return s;let p=s.replace(/\sstroke-opacity=(?:"[^"]*"|'[^']*')/,' stroke-opacity="0"');return`${p===s?td(s,t.route.geometry.kind,'stroke-opacity="0"'):p}
6
6
  ${ty(h,t.transform)}`}(t,e):x(t);case"text":return k(t.role).textHalo?(void 0!==t.pageFill?tm(x(t),t.pageFill):function(t,e,s){let r=s.colors,n=void 0===r?void 0:o("var(--bg)",r);if(void 0===r||void 0===n)return t;let a=e.fontSize>=24?m:M,i=t=>{let e=o(t,r);return void 0!==e&&(y(e,n)??a)<a};return(void 0!==e.paint.fill&&i(e.paint.fill)?tm(t,"var(--_text)"):t).replace(/(<tspan\b[^>]*?\sfill=")([^"]*)(")/g,(t,e,s,r)=>i(s)?`${e}var(--_text)${r}`:t)}(x(t),t,e)).replace(/<text\b[^>]*>/g,t=>t.replace(/\s(?:paint-order|stroke|stroke-width|stroke-linejoin|stroke-linecap)="[^"]*"/g,"").replace(/^<text/,'<text paint-order="stroke" stroke="var(--bg)" stroke-width="3" stroke-linejoin="round" stroke-linecap="round"')):x(t);case"group":return r(t.open,t.close,t.join,t.children.map(t=>({serialized:tx(t.node,e),indent:t.indent})))}}function tv(r,a){return{id:r,capabilities:t(`backend:${r}`,"sketch",a?"hybrid":"rough"),drawNode:(t,e)=>tx(t,{ctx:e,p:tu(e.style),sketcher:a}),render(t,r){let i=e(t),o={ctx:r,p:tu(r.style),sketcher:a,colors:i.colors},l=[];for(let t=0;t<i.parts.length;t++){let e=i.parts[t];if(l.push(s(r,e,tx(e,o))),0===t&&"document"===e.kind&&"open"===e.element){let t=n(i,r);t&&l.push(t);let e=function(t,e){let s=t?.backdrop??"plain";if("paper-ruled"===s){let t=['<g data-backdrop="paper-ruled">'];for(let s=26;s<e.height;s+=26)t.push(` <line x1="0" y1="${s}" x2="${e.width}" y2="${s}" stroke="var(--_line)" stroke-width="0.5" opacity="0.14" />`);return t.push("</g>"),t.join(`
7
7
  `)}if("grid"===s){let t=['<g data-backdrop="grid">'];for(let s=22;s<e.width;s+=22)t.push(` <line x1="${s}" y1="0" x2="${s}" y2="${e.height}" stroke="var(--_line)" stroke-width="0.5" opacity="0.10" />`);for(let s=22;s<e.height;s+=22)t.push(` <line x1="0" y1="${s}" x2="${e.width}" y2="${s}" stroke="var(--_line)" stroke-width="0.5" opacity="0.10" />`);return t.push("</g>"),t.join(`
8
8
  `)}return""}(r.style,i);e&&l.push(e)}}return l.join(`
9
- `)}}}var tb=tv("rough"),{PI:t$}=Math,tP=t$+1e-4,tw=.5,tS=[1,1];function tO(t,e,s,r=t=>t){return t*r(.5-e*(.5-s))}var{min:tL}=Math;function tj(t,e,s){let r=tL(1,e/s);return tL(1,t+(tL(1,1-r)-t)*(.275*r))}function tI(t,e){return[t[0]+e[0],t[1]+e[1]]}function t_(t,e,s){return t[0]=e[0]+s[0],t[1]=e[1]+s[1],t}function tW(t,e){return[t[0]-e[0],t[1]-e[1]]}function tz(t,e,s){return t[0]=e[0]-s[0],t[1]=e[1]-s[1],t}function tA(t,e){return[t[0]*e,t[1]*e]}function tC(t,e,s){return t[0]=e[0]*s,t[1]=e[1]*s,t}function tT(t){return[t[1],-t[0]]}function tG(t,e){let s=e[0];return t[0]=e[1],t[1]=-s,t}function tE(t,e){return t[0]*e[0]+t[1]*e[1]}function tF(t,e){let s=t[0]-e[0],r=t[1]-e[1];return s*s+r*r}function tR(t){var e;return e=Math.hypot(t[0],t[1]),[t[0]/e,t[1]/e]}function tZ(t,e,s){let r=Math.sin(s),n=Math.cos(s),a=t[0]-e[0],i=t[1]-e[1];return[a*n-i*r+e[0],a*r+i*n+e[1]]}function tQ(t,e,s,r){let n=Math.sin(r),a=Math.cos(r),i=e[0]-s[0],o=e[1]-s[1];return t[0]=i*a-o*n+s[0],t[1]=i*n+o*a+s[1],t}function tq(t,e,s){return tI(t,tA(tW(e,t),s))}var tB=[0,0],tV=[0,0],tN=[0,0];function tH(t,e,s){return!1===t||void 0===t?0:!0===t?Math.max(e,s):t}var tU=[0,0];function tD(t){return null!=t&&t>=0}var tJ=t=>Math.round(1e3*t)/1e3,tK=(t,e,s)=>t+(e-t)*s,tX=t=>Math.max(0,Math.min(1,t));function tY(t){switch(t.kind){case"rect":return[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}];case"polygon":return t.points;case"circle":{let e=[];for(let s=0;s<24;s++){let r=s/24*Math.PI*2;e.push({x:t.cx+Math.cos(r)*t.r,y:t.cy+Math.sin(r)*t.r})}return e}case"ellipse":{let e=[];for(let s=0;s<28;s++){let r=s/28*Math.PI*2;e.push({x:t.cx+Math.cos(r)*t.rx,y:t.cy+Math.sin(r)*t.ry})}return e}default:return null}}function t0(t,e,s){if(t.length<2)return"";var r=function(t,e={}){return function(t,e={}){var s,r;let{size:n=16,smoothing:a=.5,thinning:i=.5,simulatePressure:o=!0,easing:l=t=>t,start:h={},end:u={},last:p=!1}=e,{cap:c=!0,easing:f=t=>t*(2-t)}=h,{cap:d=!0,easing:g=t=>--t*t*t+1}=u;if(0===t.length||n<=0)return[];let k=t[t.length-1].runningLength,y=tH(h.taper,n,k),M=tH(u.taper,n,k),m=(n*a)**2,x=[],v=[],b=t.slice(0,10).reduce((t,e)=>{let s=e.pressure;return o&&(s=tj(t,e.distance,n)),(t+s)/2},t[0].pressure),$=tO(n,i,t[t.length-1].pressure,l),P,w=t[0].vector,S=t[0].point,O=S,L=S,j=O,I=!1;for(let e=0;e<t.length;e++){let{pressure:s}=t[e],{point:r,vector:a,distance:h,runningLength:u}=t[e],p=e===t.length-1;if(!p&&k-u<3)continue;i?(o&&(s=tj(b,h,n)),$=tO(n,i,s,l)):$=n/2,void 0===P&&(P=$),$=Math.max(.01,$*Math.min(u<y?f(u/y):1,k-u<M?g((k-u)/M):1));let c=(p?t[e]:t[e+1]).vector,d=p?1:tE(a,c),_=0>tE(a,w)&&!I,W=null!==d&&d<0;if(_||W){tG(tB,w),tC(tB,tB,$);for(let t=0;t<=1;t+=.07692307692307693)tz(tV,r,tB),tQ(tV,tV,r,tP*t),L=[tV[0],tV[1]],x.push(L),t_(tN,r,tB),tQ(tN,tN,r,-(tP*t)),j=[tN[0],tN[1]],v.push(j);S=L,O=j,W&&(I=!0);continue}if(I=!1,p){tG(tB,a),tC(tB,tB,$),x.push(tW(r,tB)),v.push(tI(r,tB));continue}(function(t,e,s,r){let n=s[0]-e[0],a=s[1]-e[1];t[0]=e[0]+n*r,t[1]=e[1]+a*r})(tB,c,a,d),tG(tB,tB),tC(tB,tB,$),tz(tV,r,tB),L=[tV[0],tV[1]],(e<=1||tF(S,L)>m)&&(x.push(L),S=L),t_(tN,r,tB),j=[tN[0],tN[1]],(e<=1||tF(O,j)>m)&&(v.push(j),O=j),b=s,w=a}let _=[t[0].point[0],t[0].point[1]],W=t.length>1?[t[t.length-1].point[0],t[t.length-1].point[1]]:tI(t[0].point,[1,1]),z=[],A=[];if(1===t.length){if(!(y||M)||p)return function(t,e){var s;let r=(s=tR(tT(tW(t,tI(t,[1,1])))),tI(t,tA(s,-e))),n=[],a=1/13;for(let e=a;e<=1;e+=a)n.push(tZ(r,t,2*tP*e));return n}(_,P||$)}else{let e,n,a;y||M&&1===t.length||(c?z.push(...function(t,e,s){let r=[],n=1/13;for(let s=n;s<=1;s+=n)r.push(tZ(e,t,tP*s));return r}(_,v[0],0)):z.push(...(n=tA(e=tW(x[0],v[0]),.5),a=tA(e,.51),[tW(_,n),tW(_,a),tI(_,a),tI(_,n)])));let i=tT([-(s=t[t.length-1].vector)[0],-s[1]]);M||y&&1===t.length?A.push(W):d?A.push(...function(t,e,s,r){let n=[],a=tI(t,tA(e,s)),i=1/29;for(let e=i;e<1;e+=i)n.push(tZ(a,t,3*tP*e));return n}(W,i,$,0)):A.push(tI(W,tA(i,r=$)),tI(W,tA(i,.99*r)),tW(W,tA(i,.99*r)),tW(W,tA(i,r)))}return x.concat(A,v.reverse(),z)}(function(t,e={}){let{streamline:s=.5,size:r=16,last:n=!1}=e;if(0===t.length)return[];let a=.15+(1-s)*.85,i=Array.isArray(t[0])?t:t.map(({x:t,y:e,pressure:s=tw})=>[t,e,s]);if(2===i.length){let t=i[1];i=i.slice(0,-1);for(let e=1;e<5;e++)i.push(tq(i[0],t,e/4))}1===i.length&&(i=[...i,[...tI(i[0],tS),...i[0].slice(2)]]);let o=[{point:[i[0][0],i[0][1]],pressure:tD(i[0][2])?i[0][2]:.25,vector:[...tS],distance:0,runningLength:0}],l=!1,h=0,u=o[0],p=i.length-1;for(let t=1;t<i.length;t++){var c,f;let e=n&&t===p?[i[t][0],i[t][1]]:tq(u.point,i[t],a);if((c=u.point)[0]===e[0]&&c[1]===e[1])continue;let s=(f=u.point,Math.hypot(e[1]-f[1],e[0]-f[0]));if(h+=s,t<p&&!l){if(h<r)continue;l=!0}tz(tU,u.point,e),u={point:e,pressure:tD(i[t][2])?i[t][2]:tw,vector:tR(tU),distance:s,runningLength:h},o.push(u)}return o[0].vector=o[1]?.vector||[0,0],o}(t,e),e)}(function(t,e,s,r){let n=s?[...t,t[0]]:t,a=[];for(let t=0;t<n.length-1;t++){let r=n[t],i=n[t+1],o=Math.hypot(i.x-r.x,i.y-r.y)||1,l=Math.max(1,Math.ceil(o/14)),h=-(i.y-r.y)/o,u=(i.x-r.x)/o;for(let o=0;o<l;o++){if(t>0&&0===o)continue;let p=o/l,c=s||(0!==t||0!==o)&&(t!==n.length-2||o!==l)?(e()-.5)*2:0,f={x:tK(r.x,i.x,p)+h*c,y:tK(r.y,i.y,p)+u*c},d=tX(.52+.12*Math.sin((t+p)/Math.max(1,n.length-1)*Math.PI*2)+(e()-.5)*.16);a.push([f.x,f.y,d])}}let i=n[n.length-1];return a.push([i.x,i.y,s?a[0]?.[2]??.55:.46]),a}(t,e,s.closed,0),{size:s.width,thinning:.58,smoothing:.62,streamline:.35,simulatePressure:!1,start:{cap:!0,taper:10*!s.closed},end:{cap:!0,taper:14*!s.closed},last:!0});if(r.length<2)return"";let n=[`M${tJ(r[0][0])},${tJ(r[0][1])}`];for(let t=1;t<r.length;t++){let[e,s]=r[t],[a,i]=r[(t+1)%r.length];n.push(`Q${tJ(e)},${tJ(s)} ${tJ((e+a)/2)},${tJ((s+i)/2)}`)}return n.push("Z"),n.join(" ")}var t1=Object.freeze([a,tb,tv("hybrid",(t,e)=>{var s,r,n,a,i,o,l,u;let c=e.style?.stroke??"jittered",f=(e.style?.fill??"none")==="wash"&&void 0!==e.fill,d="freehand"===c,g=e.opacity?.fill===void 0?void 0:Number(e.opacity.fill),k=e.opacity?.stroke===void 0?void 0:Number(e.opacity.stroke);if(!f&&!d)return null;let y=[];if(f){let a,i=p((0x9e3779b9^e.seed)>>>0),o="path"===t.kind?null:tY(t);o?y.push((s=e.fill,r=g??e.style?.washOpacity??.3,n=e.style?.washEdge??.34,a=o.map(t=>({x:t.x+(i()-.5)*3,y:t.y+(i()-.5)*3})).map((t,e)=>`${e?"L":"M"}${tJ(t.x)},${tJ(t.y)}`).join(" ")+" Z",`<path d="${a}" fill="${s}" fill-opacity="${r}" stroke="none" />
10
- <path d="${a}" fill="none" stroke="${s}" stroke-width="1.4" stroke-opacity="${n}" />`)):"path"===t.kind&&y.push(`<path d="${t.d}" fill="${e.fill}" fill-opacity="${g??e.style?.washOpacity??.3}" stroke="${e.fill}" stroke-width="1.4" stroke-opacity="${e.style?.washEdge??.34}" />`)}if(d&&!e.dash){let s=p(e.seed||1),r=Math.max(2.5,2.2*e.width),n="";if("polyline"===t.kind)n=t0(t.points,s,{width:r,closed:!1});else if("line"===t.kind)n=t0([{x:t.x1,y:t.y1},{x:t.x2,y:t.y2}],s,{width:r,closed:!1});else{let e=tY(t);e&&(n=t0(e,s,{width:r,closed:!0}))}if(n){let t=e.strokeProjection?[...void 0!==e.strokeProjection.opacity?[`opacity="${h(String(e.strokeProjection.opacity))}"`]:[],...void 0!==e.strokeProjection.paintOrder?[`paint-order="${h(e.strokeProjection.paintOrder)}"`]:[],...void 0!==e.strokeProjection.mixBlendMode?[`style="mix-blend-mode:${e.strokeProjection.mixBlendMode}"`]:[]].join(" "):"",s=void 0===k?"":` fill-opacity="${h(String(k))}"`;return y.push(`<path d="${n}" fill="${e.stroke}" stroke="none"${s}${t?` ${t}`:""} />`),y.join(`
11
- `)}}let M=(a=e.seed,i=e.stroke,o=e.width,l=f?void 0:e.fill,u=e.p,tc(t,a,i,o,l,u,e.dash,e.strokeProjection,e.opacity));return M&&y.push(M),y.length>0?y.join(`
9
+ `)}}}var tb=tv("rough"),{PI:t$}=Math,tP=t$+1e-4,tw=.5,tS=[1,1];function tO(t,e,s,r=t=>t){return t*r(.5-e*(.5-s))}var{min:tL}=Math;function tj(t,e,s){let r=tL(1,e/s);return tL(1,t+(tL(1,1-r)-t)*(.275*r))}function tI(t,e){return[t[0]+e[0],t[1]+e[1]]}function t_(t,e,s){return t[0]=e[0]+s[0],t[1]=e[1]+s[1],t}function tW(t,e){return[t[0]-e[0],t[1]-e[1]]}function tz(t,e,s){return t[0]=e[0]-s[0],t[1]=e[1]-s[1],t}function tT(t,e){return[t[0]*e,t[1]*e]}function tA(t,e,s){return t[0]=e[0]*s,t[1]=e[1]*s,t}function tC(t){return[t[1],-t[0]]}function tG(t,e){let s=e[0];return t[0]=e[1],t[1]=-s,t}function tE(t,e){return t[0]*e[0]+t[1]*e[1]}function tR(t,e){let s=t[0]-e[0],r=t[1]-e[1];return s*s+r*r}function tF(t){var e;return e=Math.hypot(t[0],t[1]),[t[0]/e,t[1]/e]}function tB(t,e,s){let r=Math.sin(s),n=Math.cos(s),a=t[0]-e[0],i=t[1]-e[1];return[a*n-i*r+e[0],a*r+i*n+e[1]]}function tQ(t,e,s,r){let n=Math.sin(r),a=Math.cos(r),i=e[0]-s[0],o=e[1]-s[1];return t[0]=i*a-o*n+s[0],t[1]=i*n+o*a+s[1],t}function tZ(t,e,s){return tI(t,tT(tW(e,t),s))}var tq=[0,0],tN=[0,0],tV=[0,0];function tH(t,e,s){return!1===t||void 0===t?0:!0===t?Math.max(e,s):t}var tJ=[0,0];function tD(t){return null!=t&&t>=0}var tU=t=>Math.round(1e3*t)/1e3,tX=(t,e,s)=>t+(e-t)*s,tY=t=>Math.max(0,Math.min(1,t));function tK(t){switch(t.kind){case"rect":return[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}];case"polygon":return t.points;case"circle":{let e=[];for(let s=0;s<24;s++){let r=s/24*Math.PI*2;e.push({x:t.cx+Math.cos(r)*t.r,y:t.cy+Math.sin(r)*t.r})}return e}case"ellipse":{let e=[];for(let s=0;s<28;s++){let r=s/28*Math.PI*2;e.push({x:t.cx+Math.cos(r)*t.rx,y:t.cy+Math.sin(r)*t.ry})}return e}default:return null}}function t0(t,e,s){if(t.length<2)return"";var r=function(t,e={}){return function(t,e={}){var s,r;let{size:n=16,smoothing:a=.5,thinning:i=.5,simulatePressure:o=!0,easing:l=t=>t,start:h={},end:u={},last:p=!1}=e,{cap:c=!0,easing:f=t=>t*(2-t)}=h,{cap:d=!0,easing:g=t=>--t*t*t+1}=u;if(0===t.length||n<=0)return[];let k=t[t.length-1].runningLength,y=tH(h.taper,n,k),M=tH(u.taper,n,k),m=(n*a)**2,x=[],v=[],b=t.slice(0,10).reduce((t,e)=>{let s=e.pressure;return o&&(s=tj(t,e.distance,n)),(t+s)/2},t[0].pressure),$=tO(n,i,t[t.length-1].pressure,l),P,w=t[0].vector,S=t[0].point,O=S,L=S,j=O,I=!1;for(let e=0;e<t.length;e++){let{pressure:s}=t[e],{point:r,vector:a,distance:h,runningLength:u}=t[e],p=e===t.length-1;if(!p&&k-u<3)continue;i?(o&&(s=tj(b,h,n)),$=tO(n,i,s,l)):$=n/2,void 0===P&&(P=$),$=Math.max(.01,$*Math.min(u<y?f(u/y):1,k-u<M?g((k-u)/M):1));let c=(p?t[e]:t[e+1]).vector,d=p?1:tE(a,c),_=0>tE(a,w)&&!I,W=null!==d&&d<0;if(_||W){tG(tq,w),tA(tq,tq,$);for(let t=0;t<=1;t+=.07692307692307693)tz(tN,r,tq),tQ(tN,tN,r,tP*t),L=[tN[0],tN[1]],x.push(L),t_(tV,r,tq),tQ(tV,tV,r,-(tP*t)),j=[tV[0],tV[1]],v.push(j);S=L,O=j,W&&(I=!0);continue}if(I=!1,p){tG(tq,a),tA(tq,tq,$),x.push(tW(r,tq)),v.push(tI(r,tq));continue}(function(t,e,s,r){let n=s[0]-e[0],a=s[1]-e[1];t[0]=e[0]+n*r,t[1]=e[1]+a*r})(tq,c,a,d),tG(tq,tq),tA(tq,tq,$),tz(tN,r,tq),L=[tN[0],tN[1]],(e<=1||tR(S,L)>m)&&(x.push(L),S=L),t_(tV,r,tq),j=[tV[0],tV[1]],(e<=1||tR(O,j)>m)&&(v.push(j),O=j),b=s,w=a}let _=[t[0].point[0],t[0].point[1]],W=t.length>1?[t[t.length-1].point[0],t[t.length-1].point[1]]:tI(t[0].point,[1,1]),z=[],T=[];if(1===t.length){if(!(y||M)||p)return function(t,e){var s;let r=(s=tF(tC(tW(t,tI(t,[1,1])))),tI(t,tT(s,-e))),n=[],a=1/13;for(let e=a;e<=1;e+=a)n.push(tB(r,t,2*tP*e));return n}(_,P||$)}else{let e,n,a;y||M&&1===t.length||(c?z.push(...function(t,e,s){let r=[],n=1/13;for(let s=n;s<=1;s+=n)r.push(tB(e,t,tP*s));return r}(_,v[0],0)):z.push(...(n=tT(e=tW(x[0],v[0]),.5),a=tT(e,.51),[tW(_,n),tW(_,a),tI(_,a),tI(_,n)])));let i=tC([-(s=t[t.length-1].vector)[0],-s[1]]);M||y&&1===t.length?T.push(W):d?T.push(...function(t,e,s,r){let n=[],a=tI(t,tT(e,s)),i=1/29;for(let e=i;e<1;e+=i)n.push(tB(a,t,3*tP*e));return n}(W,i,$,0)):T.push(tI(W,tT(i,r=$)),tI(W,tT(i,.99*r)),tW(W,tT(i,.99*r)),tW(W,tT(i,r)))}return x.concat(T,v.reverse(),z)}(function(t,e={}){let{streamline:s=.5,size:r=16,last:n=!1}=e;if(0===t.length)return[];let a=.15+(1-s)*.85,i=Array.isArray(t[0])?t:t.map(({x:t,y:e,pressure:s=tw})=>[t,e,s]);if(2===i.length){let t=i[1];i=i.slice(0,-1);for(let e=1;e<5;e++)i.push(tZ(i[0],t,e/4))}1===i.length&&(i=[...i,[...tI(i[0],tS),...i[0].slice(2)]]);let o=[{point:[i[0][0],i[0][1]],pressure:tD(i[0][2])?i[0][2]:.25,vector:[...tS],distance:0,runningLength:0}],l=!1,h=0,u=o[0],p=i.length-1;for(let t=1;t<i.length;t++){var c,f;let e=n&&t===p?[i[t][0],i[t][1]]:tZ(u.point,i[t],a);if((c=u.point)[0]===e[0]&&c[1]===e[1])continue;let s=(f=u.point,Math.hypot(e[1]-f[1],e[0]-f[0]));if(h+=s,t<p&&!l){if(h<r)continue;l=!0}tz(tJ,u.point,e),u={point:e,pressure:tD(i[t][2])?i[t][2]:tw,vector:tF(tJ),distance:s,runningLength:h},o.push(u)}return o[0].vector=o[1]?.vector||[0,0],o}(t,e),e)}(function(t,e,s,r){let n=s?[...t,t[0]]:t,a=[];for(let t=0;t<n.length-1;t++){let r=n[t],i=n[t+1],o=Math.hypot(i.x-r.x,i.y-r.y)||1,l=Math.max(1,Math.ceil(o/14)),h=-(i.y-r.y)/o,u=(i.x-r.x)/o;for(let o=0;o<l;o++){if(t>0&&0===o)continue;let p=o/l,c=s||(0!==t||0!==o)&&(t!==n.length-2||o!==l)?(e()-.5)*2:0,f={x:tX(r.x,i.x,p)+h*c,y:tX(r.y,i.y,p)+u*c},d=tY(.52+.12*Math.sin((t+p)/Math.max(1,n.length-1)*Math.PI*2)+(e()-.5)*.16);a.push([f.x,f.y,d])}}let i=n[n.length-1];return a.push([i.x,i.y,s?a[0]?.[2]??.55:.46]),a}(t,e,s.closed,0),{size:s.width,thinning:.58,smoothing:.62,streamline:.35,simulatePressure:!1,start:{cap:!0,taper:10*!s.closed},end:{cap:!0,taper:14*!s.closed},last:!0});if(r.length<2)return"";let n=[`M${tU(r[0][0])},${tU(r[0][1])}`];for(let t=1;t<r.length;t++){let[e,s]=r[t],[a,i]=r[(t+1)%r.length];n.push(`Q${tU(e)},${tU(s)} ${tU((e+a)/2)},${tU((s+i)/2)}`)}return n.push("Z"),n.join(" ")}var t1=Object.freeze([a,tb,tv("hybrid",(t,e)=>{var s,r,n,a,i;let o=e.style?.stroke??"jittered",l=(e.style?.fill??"none")==="wash"&&void 0!==e.fill,u="freehand"===o,p=e.opacity?.fill===void 0?void 0:Number(e.opacity.fill),f=e.opacity?.stroke===void 0?void 0:Number(e.opacity.stroke);if(!l&&!u)return null;let d=[];if(l){let a,i=c((0x9e3779b9^e.seed)>>>0),o="path"===t.kind?null:tK(t);o?d.push((s=e.fill,r=p??e.style?.washOpacity??.3,n=e.style?.washEdge??.34,a=o.map(t=>({x:t.x+(i()-.5)*3,y:t.y+(i()-.5)*3})).map((t,e)=>`${e?"L":"M"}${tU(t.x)},${tU(t.y)}`).join(" ")+" Z",`<path d="${a}" fill="${s}" fill-opacity="${r}" stroke="none" />
10
+ <path d="${a}" fill="none" stroke="${s}" stroke-width="1.4" stroke-opacity="${n}" />`)):"path"===t.kind&&d.push(`<path d="${t.d}" fill="${e.fill}" fill-opacity="${p??e.style?.washOpacity??.3}" stroke="${e.fill}" stroke-width="1.4" stroke-opacity="${e.style?.washEdge??.34}" />`)}if(u&&!e.dash){let s=c(e.seed||1),r=Math.max(2.5,2.2*e.width),n="";if("polyline"===t.kind)n=t0(t.points,s,{width:r,closed:!1});else if("line"===t.kind)n=t0([{x:t.x1,y:t.y1},{x:t.x2,y:t.y2}],s,{width:r,closed:!1});else{let e=tK(t);e&&(n=t0(e,s,{width:r,closed:!0}))}if(n){let t=e.strokeProjection?[...void 0!==e.strokeProjection.opacity?[`opacity="${h(String(e.strokeProjection.opacity))}"`]:[],...void 0!==e.strokeProjection.paintOrder?[`paint-order="${h(e.strokeProjection.paintOrder)}"`]:[],...void 0!==e.strokeProjection.mixBlendMode?[`style="mix-blend-mode:${e.strokeProjection.mixBlendMode}"`]:[]].join(" "):"",s=void 0===f?"":` fill-opacity="${h(String(f))}"`;return d.push(`<path d="${n}" fill="${e.stroke}" stroke="none"${s}${t?` ${t}`:""} />`),d.join(`
11
+ `)}}let g=(a=e.seed,i=e.stroke,tc(t,a,i,e.width,l?void 0:e.fill,e.p,e.dash,e.strokeProjection,e.opacity));return g&&d.push(g),d.length>0?d.join(`
12
12
  `):null})]);for(let t of t1)t!==a&&i(t);export{t1 as BUILTIN_BACKENDS};