@antv/infographic 0.2.7 → 0.2.8

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 (142) hide show
  1. package/dist/infographic.min.js +191 -191
  2. package/dist/infographic.min.js.map +1 -1
  3. package/esm/designs/items/BadgeCard.js +6 -1
  4. package/esm/designs/items/SimpleCircleNode.d.ts +8 -0
  5. package/esm/designs/items/SimpleCircleNode.js +14 -0
  6. package/esm/designs/items/index.d.ts +1 -0
  7. package/esm/designs/items/index.js +1 -0
  8. package/esm/designs/structures/hierarchy-mindmap.js +19 -5
  9. package/esm/designs/structures/hierarchy-tree.d.ts +2 -1
  10. package/esm/designs/structures/hierarchy-tree.js +23 -20
  11. package/esm/designs/structures/index.d.ts +1 -0
  12. package/esm/designs/structures/index.js +1 -0
  13. package/esm/designs/structures/relation-dagre-flow.d.ts +21 -0
  14. package/esm/designs/structures/relation-dagre-flow.js +497 -0
  15. package/esm/designs/utils/hierarchy-color.d.ts +1 -1
  16. package/esm/editor/plugins/edit-bar/edit-bar.js +27 -9
  17. package/esm/index.js +1 -1
  18. package/esm/jsx/global.d.ts +1 -0
  19. package/esm/jsx/types/element.d.ts +5 -1
  20. package/esm/jsx/utils/svg.js +2 -0
  21. package/esm/renderer/composites/icon.js +2 -0
  22. package/esm/renderer/composites/illus.d.ts +1 -1
  23. package/esm/renderer/composites/illus.js +9 -4
  24. package/esm/renderer/composites/text.js +4 -2
  25. package/esm/renderer/fonts/loader.js +3 -1
  26. package/esm/renderer/fonts/registry.js +1 -1
  27. package/esm/renderer/renderer.js +28 -25
  28. package/esm/resource/loader.js +3 -1
  29. package/esm/runtime/Infographic.js +1 -1
  30. package/esm/ssr/dom-shim.d.ts +4 -0
  31. package/esm/ssr/dom-shim.js +107 -0
  32. package/esm/ssr/index.d.ts +1 -0
  33. package/esm/ssr/index.js +1 -0
  34. package/esm/ssr/renderer.d.ts +2 -0
  35. package/esm/ssr/renderer.js +60 -0
  36. package/esm/syntax/index.js +57 -1
  37. package/esm/syntax/parser.js +44 -0
  38. package/esm/syntax/relations.d.ts +6 -0
  39. package/esm/syntax/relations.js +251 -0
  40. package/esm/syntax/schema.d.ts +1 -0
  41. package/esm/syntax/schema.js +12 -0
  42. package/esm/templates/built-in.js +2 -0
  43. package/esm/templates/relation-dagre-flow.d.ts +2 -0
  44. package/esm/templates/relation-dagre-flow.js +68 -0
  45. package/esm/types/data.d.ts +24 -3
  46. package/esm/utils/data.js +1 -1
  47. package/esm/utils/index.d.ts +1 -0
  48. package/esm/utils/index.js +1 -0
  49. package/esm/utils/is-browser.js +5 -9
  50. package/esm/utils/measure-text.d.ts +2 -2
  51. package/esm/utils/measure-text.js +4 -4
  52. package/esm/utils/recognizer.js +8 -5
  53. package/esm/utils/text.js +27 -19
  54. package/lib/designs/items/BadgeCard.js +6 -1
  55. package/lib/designs/items/SimpleCircleNode.d.ts +8 -0
  56. package/lib/designs/items/SimpleCircleNode.js +18 -0
  57. package/lib/designs/items/index.d.ts +1 -0
  58. package/lib/designs/items/index.js +1 -0
  59. package/lib/designs/structures/hierarchy-mindmap.js +19 -5
  60. package/lib/designs/structures/hierarchy-tree.d.ts +2 -1
  61. package/lib/designs/structures/hierarchy-tree.js +23 -20
  62. package/lib/designs/structures/index.d.ts +1 -0
  63. package/lib/designs/structures/index.js +1 -0
  64. package/lib/designs/structures/relation-dagre-flow.d.ts +21 -0
  65. package/lib/designs/structures/relation-dagre-flow.js +501 -0
  66. package/lib/designs/utils/hierarchy-color.d.ts +1 -1
  67. package/lib/editor/plugins/edit-bar/edit-bar.js +27 -9
  68. package/lib/jsx/global.d.ts +1 -0
  69. package/lib/jsx/types/element.d.ts +5 -1
  70. package/lib/jsx/utils/svg.js +2 -0
  71. package/lib/renderer/composites/icon.js +2 -0
  72. package/lib/renderer/composites/illus.d.ts +1 -1
  73. package/lib/renderer/composites/illus.js +8 -3
  74. package/lib/renderer/composites/text.js +4 -2
  75. package/lib/renderer/fonts/loader.js +2 -0
  76. package/lib/renderer/fonts/registry.js +6 -6
  77. package/lib/renderer/renderer.js +27 -24
  78. package/lib/resource/loader.js +3 -1
  79. package/lib/runtime/Infographic.js +1 -1
  80. package/lib/ssr/dom-shim.d.ts +4 -0
  81. package/lib/ssr/dom-shim.js +110 -0
  82. package/lib/ssr/index.d.ts +1 -0
  83. package/lib/ssr/index.js +5 -0
  84. package/lib/ssr/renderer.d.ts +2 -0
  85. package/lib/ssr/renderer.js +63 -0
  86. package/lib/syntax/index.js +57 -1
  87. package/lib/syntax/parser.js +44 -0
  88. package/lib/syntax/relations.d.ts +6 -0
  89. package/lib/syntax/relations.js +254 -0
  90. package/lib/syntax/schema.d.ts +1 -0
  91. package/lib/syntax/schema.js +13 -1
  92. package/lib/templates/built-in.js +2 -0
  93. package/lib/templates/relation-dagre-flow.d.ts +2 -0
  94. package/lib/templates/relation-dagre-flow.js +71 -0
  95. package/lib/types/data.d.ts +24 -3
  96. package/lib/utils/data.js +2 -5
  97. package/lib/utils/index.d.ts +1 -0
  98. package/lib/utils/index.js +1 -0
  99. package/lib/utils/is-browser.js +5 -9
  100. package/lib/utils/measure-text.d.ts +2 -2
  101. package/lib/utils/measure-text.js +4 -4
  102. package/lib/utils/recognizer.js +8 -5
  103. package/lib/utils/text.js +28 -23
  104. package/package.json +19 -7
  105. package/src/designs/items/BadgeCard.tsx +9 -2
  106. package/src/designs/items/SimpleCircleNode.tsx +46 -0
  107. package/src/designs/items/index.ts +1 -0
  108. package/src/designs/structures/hierarchy-mindmap.tsx +15 -2
  109. package/src/designs/structures/hierarchy-tree.tsx +33 -31
  110. package/src/designs/structures/index.ts +1 -0
  111. package/src/designs/structures/relation-dagre-flow.tsx +782 -0
  112. package/src/designs/utils/hierarchy-color.ts +6 -1
  113. package/src/editor/plugins/edit-bar/edit-bar.ts +41 -17
  114. package/src/index.ts +1 -1
  115. package/src/jsx/global.ts +1 -0
  116. package/src/jsx/types/element.ts +15 -6
  117. package/src/jsx/utils/svg.ts +2 -0
  118. package/src/renderer/composites/icon.ts +2 -0
  119. package/src/renderer/composites/illus.ts +16 -3
  120. package/src/renderer/composites/text.ts +7 -2
  121. package/src/renderer/fonts/loader.ts +7 -1
  122. package/src/renderer/fonts/registry.ts +1 -1
  123. package/src/renderer/renderer.ts +42 -24
  124. package/src/resource/loader.ts +3 -1
  125. package/src/runtime/Infographic.tsx +1 -1
  126. package/src/ssr/dom-shim.ts +120 -0
  127. package/src/ssr/index.ts +1 -0
  128. package/src/ssr/renderer.ts +72 -0
  129. package/src/syntax/index.ts +58 -1
  130. package/src/syntax/parser.ts +49 -0
  131. package/src/syntax/relations.ts +291 -0
  132. package/src/syntax/schema.ts +16 -0
  133. package/src/templates/built-in.ts +4 -2
  134. package/src/templates/relation-dagre-flow.ts +73 -0
  135. package/src/types/data.ts +26 -3
  136. package/src/utils/data.ts +1 -1
  137. package/src/utils/index.ts +1 -0
  138. package/src/utils/is-browser.ts +3 -9
  139. package/src/utils/measure-text.ts +6 -7
  140. package/src/utils/recognizer.ts +9 -5
  141. package/src/utils/svg.ts +0 -1
  142. package/src/utils/text.ts +25 -19
@@ -1,33 +1,28 @@
1
- (function(W,_e){typeof exports=="object"&&typeof module!="undefined"?_e(exports):typeof define=="function"&&define.amd?define(["exports"],_e):(W=typeof globalThis!="undefined"?globalThis:W||self,_e(W.AntVInfographic={}))})(this,(function(W){"use strict";var uW=Object.defineProperty,fW=Object.defineProperties;var pW=Object.getOwnPropertyDescriptors;var ox=Object.getOwnPropertySymbols;var gW=Object.prototype.hasOwnProperty,mW=Object.prototype.propertyIsEnumerable;var no=Math.pow,sx=(W,_e,Ye)=>_e in W?uW(W,_e,{enumerable:!0,configurable:!0,writable:!0,value:Ye}):W[_e]=Ye,Ce=(W,_e)=>{for(var Ye in _e||(_e={}))gW.call(_e,Ye)&&sx(W,Ye,_e[Ye]);if(ox)for(var Ye of ox(_e))mW.call(_e,Ye)&&sx(W,Ye,_e[Ye]);return W},He=(W,_e)=>fW(W,pW(_e));const Ye={version:"0.2.7"},Ma=new Map;function Kh(t,e){Ma.set(t,e)}function Qh(t){return Ma.get(t)}function ax(){return Array.from(Ma.keys())}var lx=Object.defineProperty,Jh=Object.getOwnPropertySymbols,cx=Object.prototype.hasOwnProperty,hx=Object.prototype.propertyIsEnumerable,td=(t,e,n)=>e in t?lx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ed=(t,e)=>{for(var n in e||(e={}))cx.call(e,n)&&td(t,n,e[n]);if(Jh)for(var n of Jh(e))hx.call(e,n)&&td(t,n,e[n]);return t};const ei={edgeType:"curved",edgeColorMode:"gradient",edgeWidth:2,colorMode:"branch",levelGap:80,nodeGap:18},ni={edgeType:"curved",edgeWidth:2,edgeColorMode:"gradient",colorMode:"level",levelGap:80,nodeGap:18},nd={type:"lined-text",usePaletteColor:!0,showUnderline:!0,underlineThickness:2},rd={type:"capsule-item"},id={type:"circular-progress"},od={type:"rounded-rect-node",positionH:"center"},sd={type:"compact-card"},dx=(t,e)=>ed(ed({type:"hierarchy-mindmap"},e!==void 0?{edgeAlign:e}:{}),t),nn=(t,e,n,r)=>[t,{design:{structure:dx(e,r),item:n}}],ux=Object.fromEntries([nn("hierarchy-mindmap-branch-gradient-lined-palette",ei,nd,"bottom"),nn("hierarchy-mindmap-level-gradient-lined-palette",ni,nd,"bottom"),nn("hierarchy-mindmap-branch-gradient-capsule-item",ei,rd),nn("hierarchy-mindmap-level-gradient-capsule-item",ni,rd),nn("hierarchy-mindmap-branch-gradient-circle-progress",ei,id,.4),nn("hierarchy-mindmap-level-gradient-circle-progress",ni,id,.4),nn("hierarchy-mindmap-branch-gradient-rounded-rect",ei,od),nn("hierarchy-mindmap-level-gradient-rounded-rect",ni,od),nn("hierarchy-mindmap-branch-gradient-compact-card",ei,sd),nn("hierarchy-mindmap-level-gradient-compact-card",ni,sd)]),fx={"hierarchy-structure":{design:{title:"default",structure:{type:"hierarchy-structure"},item:"simple"}},"hierarchy-structure-mirror":{design:{title:"default",structure:{type:"hierarchy-structure",layerLabelPosition:"right"},item:"simple"}}};var px=Object.defineProperty,ad=Object.getOwnPropertySymbols,gx=Object.prototype.hasOwnProperty,mx=Object.prototype.propertyIsEnumerable,ld=(t,e,n)=>e in t?px(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cd=(t,e)=>{for(var n in e||(e={}))gx.call(e,n)&&ld(t,n,e[n]);if(ad)for(var n of ad(e))mx.call(e,n)&&ld(t,n,e[n]);return t};const yx={"tech-style":{edgeType:"straight",edgeStyle:"solid",edgeColorMode:"gradient",edgeMarker:"arrow",markerSize:12,edgeCornerRadius:5},"dashed-line":{edgeStyle:"dashed",edgeCornerRadius:10,edgeDashPattern:"10,5",edgeColorMode:"gradient",edgeMarker:"dot",markerSize:6,edgeOffset:6},"distributed-origin":{edgeOrigin:"distributed",edgeOriginPadding:30,edgeMarker:"arrow",edgeCornerRadius:10,markerSize:12,edgeColorMode:"gradient"},"curved-line":{edgeType:"curved",edgeColorMode:"gradient",edgeMarker:"none"},"dashed-arrow":{edgeType:"straight",edgeStyle:"dashed",edgeDashPattern:"8,4",edgeMarker:"arrow",markerSize:10,edgeCornerRadius:0}},vx=["capsule-item","rounded-rect-node","compact-card","badge-card","ribbon-card"],hd={},dd="hierarchy-tree",xx=[{key:""},{key:"bt",orientation:"bottom-top"},{key:"lr",orientation:"left-right"},{key:"rl",orientation:"right-left"}],bx=(t,e,n)=>t?`${dd}-${t}-${e}-${n}`:`${dd}-${e}-${n}`;for(const t of vx)for(const[e,n]of Object.entries(yx))for(const{key:r,orientation:i}of xx){const o=bx(r,e,t);hd[o]={design:{structure:cd(cd({type:"hierarchy-tree"},i?{orientation:i}:{}),n),item:{type:t}}}}const wx={"list-zigzag-up-compact-card":{design:{title:"default",structure:{type:"list-zigzag-up"},items:[{type:"compact-card"}]},themeConfig:{colorPrimary:"#17CA2C"}},"list-zigzag-up-simple":{design:{title:"default",structure:{type:"list-zigzag-up"},items:[{type:"simple",usePaletteColor:!0}]},themeConfig:{colorPrimary:"#17CA2C"}},"list-zigzag-down-compact-card":{design:{title:"default",structure:{type:"list-zigzag-down"},items:[{type:"compact-card"}]},themeConfig:{colorPrimary:"#17CA2C"}},"list-zigzag-down-simple":{design:{title:"default",structure:{type:"list-zigzag-down"},items:[{type:"simple",usePaletteColor:!0}]},themeConfig:{colorPrimary:"#17CA2C"}}},_x={"sequence-stairs-front-pill-badge":{design:{title:"default",structure:{type:"sequence-stairs-front"},items:[{type:"pill-badge"}]}},"sequence-stairs-front-compact-card":{design:{title:"default",structure:{type:"sequence-stairs-front"},items:[{type:"compact-card"}]}},"sequence-stairs-front-simple":{design:{title:"default",structure:{type:"sequence-stairs-front"},items:[{type:"simple",usePaletteColor:!0}]}}},$x={"chart-wordcloud-rotate":{design:{structure:{type:"chart-wordcloud"},item:"simple"}},"chart-wordcloud":{design:{structure:{type:"chart-wordcloud",enableRotate:!1},item:"simple"}}};var Px=Object.defineProperty,ud=Object.getOwnPropertySymbols,Cx=Object.prototype.hasOwnProperty,Ox=Object.prototype.propertyIsEnumerable,fd=(t,e,n)=>e in t?Px(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_r=(t,e)=>{for(var n in e||(e={}))Cx.call(e,n)&&fd(t,n,e[n]);if(ud)for(var n of ud(e))Ox.call(e,n)&&fd(t,n,e[n]);return t};const Mx=_r(_r(_r(_r(_r(_r({"compare-hierarchy-left-right-circle-node-pill-badge":{design:{structure:{type:"compare-hierarchy-left-right",decoration:"split-line",surround:!1,groupGap:-20},title:"default",items:[{type:"circle-node",width:240},"pill-badge"]},themeConfig:{}},"compare-hierarchy-left-right-circle-node-plain-text":{design:{title:"default",structure:{type:"compare-hierarchy-left-right",decoration:"dot-line",flipLeaf:!0,groupGap:-10},items:[{type:"circle-node",width:180},{type:"plain-text"}]}},"list-pyramid-rounded-rect-node":{design:{title:"default",structure:{type:"list-pyramid"},items:[{type:"rounded-rect-node"}]}},"list-pyramid-badge-card":{design:{title:"default",structure:{type:"list-pyramid"},items:[{type:"badge-card"}]}},"list-pyramid-compact-card":{design:{title:"default",structure:{type:"list-pyramid"},items:[{type:"compact-card"}]}},"list-column-done-list":{design:{title:"default",structure:{type:"list-column"},items:[{type:"done-list"}]}},"list-column-vertical-icon-arrow":{design:{title:"default",structure:{type:"list-column",gap:-5,zigzag:!0},items:[{type:"vertical-icon-arrow"}]}},"list-grid-badge-card":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"badge-card"}]}},"list-grid-candy-card-lite":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"candy-card-lite"}]}},"chart-column-simple":{design:{title:"default",structure:{type:"chart-column"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"list-grid-circular-progress":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"circular-progress"}]}},"list-grid-compact-card":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"compact-card"}]}},"list-grid-done-list":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"done-list"}]}},"list-grid-horizontal-icon-arrow":{design:{title:"default",structure:{type:"list-grid",gap:0,zigzag:!0},items:[{type:"horizontal-icon-arrow"}]}},"list-grid-progress-card":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"progress-card"}]}},"list-grid-ribbon-card":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"ribbon-card"}]}},"list-grid-simple":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"simple"}]}},"list-row-circular-progress":{design:{title:"default",structure:{type:"list-row"},items:[{type:"circular-progress"}]}},"list-row-horizontal-icon-arrow":{design:{title:"default",structure:{type:"list-row",gap:0,zigzag:!0},items:[{type:"horizontal-icon-arrow"}]}},"relation-circle-circular-progress":{design:{title:"default",structure:{type:"relation-circle"},items:[{type:"circular-progress"}]}},"relation-circle-icon-badge":{design:{title:"default",structure:{type:"relation-circle"},items:[{type:"icon-badge"}]}},"sequence-steps-badge-card":{design:{title:"default",structure:{type:"sequence-steps"},items:[{type:"badge-card"}]}},"sequence-steps-simple":{design:{title:"default",structure:{type:"sequence-steps",gap:10},items:[{type:"simple"}]}},"sequence-timeline-done-list":{design:{title:"default",structure:{type:"sequence-timeline"},items:[{type:"done-list"}]}},"sequence-timeline-plain-text":{design:{title:"default",structure:{type:"sequence-timeline"},items:[{type:"plain-text"}]}},"sequence-timeline-rounded-rect-node":{design:{title:"default",structure:{type:"sequence-timeline"},items:[{type:"rounded-rect-node"}]}},"sequence-ascending-steps":{design:{title:"default",structure:{type:"sequence-ascending-steps",vGap:-46,hGap:-20},items:[{type:"l-corner-card"}]}},"sequence-timeline-simple":{design:{title:"default",structure:{type:"sequence-timeline",gap:20},items:[{type:"simple",positionV:"middle"}]}},"sequence-cylinders-3d-simple":{design:{title:"default",structure:{type:"sequence-cylinders-3d",gapY:20},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"list-column-simple-vertical-arrow":{design:{title:"default",structure:{type:"list-column",gap:0,zigzag:!0},items:[{type:"simple-vertical-arrow"}]}},"list-row-simple-horizontal-arrow":{design:{title:"default",structure:{type:"list-row",gap:0,zigzag:!0},items:[{type:"simple-horizontal-arrow"}]}},"compare-swot":{design:{title:"default",structure:{type:"compare-hierarchy-row",itemGap:32,itemPadding:40,showColumnBackground:!0,columnBackgroundAlpha:.08},items:[{type:"letter-card",showBottomShade:!1},{type:"plain-text",formatter:t=>`● ${t}`,usePaletteColor:!0}]}},"compare-hierarchy-row-letter-card-compact-card":{design:{title:"default",structure:{type:"compare-hierarchy-row"},items:[{type:"letter-card"},{type:"compact-card"}]}},"compare-hierarchy-row-letter-card-rounded-rect-node":{design:{title:"default",structure:{type:"compare-hierarchy-row"},items:[{type:"letter-card"},{type:"rounded-rect-node"}]}},"sequence-snake-steps-compact-card":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"compact-card"}]}},"sequence-snake-steps-pill-badge":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"pill-badge"}]}},"sequence-snake-steps-simple":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"simple"}]}},"sequence-color-snake-steps-horizontal-icon-line":{design:{title:"default",structure:{type:"sequence-color-snake-steps"},items:[{type:"horizontal-icon-line"}]}},"sequence-pyramid-simple":{design:{title:"default",structure:{type:"sequence-pyramid"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]},themeConfig:{colorPrimary:"#1677ff"}},"sequence-funnel-simple":{design:{title:"default",structure:{type:"sequence-funnel"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]},themeConfig:{palette:"#1677ff"}},"list-row-horizontal-icon-line":{design:{title:"default",structure:{type:"list-row",gap:0,zigzag:!0},items:[{type:"horizontal-icon-line"}]}},"list-sector-simple":{design:{title:"default",structure:{type:"list-sector"},items:[{type:"simple"}]}},"list-sector-plain-text":{design:{title:"default",structure:{type:"list-sector"},items:[{type:"plain-text"}]}},"list-sector-half-plain-text":{design:{title:"default",structure:{type:"list-sector",startAngle:-180,endAngle:0},items:[{type:"plain-text"}]}},"quadrant-quarter-simple-card":{design:{title:"default",structure:{type:"quadrant"},items:[{type:"quarter-simple-card"}]}},"quadrant-quarter-circular":{design:{title:"default",structure:{type:"quadrant"},items:[{type:"quarter-circular"}]}},"sequence-roadmap-vertical-plain-text":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"plain-text"}]}},"sequence-roadmap-vertical-simple":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"simple",showIcon:!1}]}},"sequence-roadmap-vertical-badge-card":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"badge-card"}]}},"sequence-roadmap-vertical-pill-badge":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"pill-badge"}]}},"sequence-roadmap-vertical-quarter-circular":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"quarter-circular"}]}},"sequence-roadmap-vertical-quarter-simple-card":{design:{title:"default",structure:{type:"sequence-roadmap-vertical",flipped:!0},items:[{type:"quarter-simple-card"}]}},"sequence-horizontal-zigzag-simple-illus":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"simple-illus"}]}},"sequence-horizontal-zigzag-horizontal-icon-line":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"horizontal-icon-line"}]}},"sequence-horizontal-zigzag-plain-text":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"plain-text"}]}},"sequence-horizontal-zigzag-simple-horizontal-arrow":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"simple-horizontal-arrow"}]}},"sequence-horizontal-zigzag-simple":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"simple"}]}},"list-row-simple-illus":{design:{title:"default",structure:{type:"list-row"},items:[{type:"simple-illus"}]}},"quadrant-simple-illus":{design:{title:"default",structure:{type:"quadrant"},items:[{type:"simple-illus"}]}},"sequence-color-snake-steps-simple-illus":{design:{title:"default",structure:{type:"sequence-color-snake-steps"},items:[{type:"simple-illus"}]}},"sequence-snake-steps-simple-illus":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"simple-illus"}]}},"sequence-steps-simple-illus":{design:{title:"default",structure:{type:"sequence-steps"},items:[{type:"simple-illus"}]}},"sequence-timeline-simple-illus":{design:{title:"default",structure:{type:"sequence-timeline"},items:[{type:"simple-illus",usePaletteColor:!0}]}},"sequence-zigzag-steps-underline-text":{design:{title:"default",structure:{type:"sequence-zigzag-steps"},items:[{type:"underline-text"}]}},"sequence-horizontal-zigzag-underline-text":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"underline-text"}]}},"sequence-roadmap-vertical-underline-text":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"underline-text"}]}},"sequence-snake-steps-underline-text":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"underline-text"}]}},"sequence-circle-arrows-indexed-card":{design:{title:"default",structure:{type:"sequence-circle-arrows"},items:[{type:"indexed-card"}]}},"sequence-zigzag-pucks-3d-simple":{design:{title:"default",structure:{type:"sequence-zigzag-pucks-3d"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"sequence-zigzag-pucks-3d-underline-text":{design:{title:"default",structure:{type:"sequence-zigzag-pucks-3d"},items:[{type:"underline-text"}]}},"sequence-zigzag-pucks-3d-indexed-card":{design:{title:"default",structure:{type:"sequence-zigzag-pucks-3d"},items:[{type:"indexed-card"}]}},"sequence-ascending-stairs-3d-simple":{design:{title:"default",structure:{type:"sequence-ascending-stairs-3d"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"sequence-ascending-stairs-3d-underline-text":{design:{title:"default",structure:{type:"sequence-ascending-stairs-3d"},items:[{type:"underline-text"}]}},"sequence-circular-underline-text":{design:{title:"default",structure:{type:"sequence-circular"},items:[{type:"underline-text"}]}},"sequence-circular-simple":{design:{title:"default",structure:{type:"sequence-circular"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"sequence-filter-mesh-underline-text":{design:{title:"default",structure:{type:"sequence-filter-mesh"},items:[{type:"underline-text"}]}},"sequence-filter-mesh-simple":{design:{title:"default",structure:{type:"sequence-filter-mesh"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"sequence-mountain-underline-text":{design:{title:"default",structure:{type:"sequence-mountain"},items:[{type:"underline-text"}]}},"compare-binary-horizontal-simple-fold":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-fold"},items:[{type:"simple",iconType:"circle",iconSize:40}]}},"compare-binary-horizontal-underline-text-fold":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-fold"},items:[{type:"underline-text"}]}},"compare-binary-horizontal-badge-card-fold":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-fold"},items:[{type:"badge-card"}]}},"compare-binary-horizontal-compact-card-fold":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-fold"},items:[{type:"compact-card"}]}},"compare-binary-horizontal-simple-arrow":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-arrow"},items:[{type:"simple",iconType:"circle",iconSize:40}]}},"compare-binary-horizontal-underline-text-arrow":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-arrow"},items:[{type:"underline-text"}]}},"compare-binary-horizontal-badge-card-arrow":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-arrow"},items:[{type:"badge-card"}]}},"compare-binary-horizontal-compact-card-arrow":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-arrow"},items:[{type:"compact-card"}]}},"compare-binary-horizontal-simple-vs":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"vs"},items:[{type:"simple",iconType:"circle",iconSize:40}]}},"compare-binary-horizontal-underline-text-vs":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"vs"},items:[{type:"underline-text"}]}},"compare-binary-horizontal-badge-card-vs":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"vs"},items:[{type:"badge-card"}]}},"compare-binary-horizontal-compact-card-vs":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"vs"},items:[{type:"compact-card"}]}},"chart-bar-plain-text":{design:{title:"default",structure:{type:"chart-bar"},items:[{type:"plain-text",positionH:"flipped"}]}},"chart-line-plain-text":{design:{title:"default",structure:{type:"chart-line"},items:[{type:"plain-text",lineNumber:2}]}},"chart-pie-plain-text":{design:{title:"default",structure:{type:"chart-pie"},items:[{type:"plain-text"}]}},"chart-pie-compact-card":{design:{title:"default",structure:{type:"chart-pie"},items:[{type:"compact-card"}]}},"chart-pie-pill-badge":{design:{title:"default",structure:{type:"chart-pie"},items:[{type:"pill-badge"}]}},"chart-pie-donut-plain-text":{design:{title:"default",structure:{type:"chart-pie",innerRadius:90},items:[{type:"plain-text"}]}},"chart-pie-donut-compact-card":{design:{title:"default",structure:{type:"chart-pie",innerRadius:90},items:[{type:"compact-card"}]}},"chart-pie-donut-pill-badge":{design:{title:"default",structure:{type:"chart-pie",innerRadius:90},items:[{type:"pill-badge"}]}}},hd),ux),_x),$x),wx),fx);Object.entries(Mx).forEach(([t,e])=>{Kh(t,e)});const Bt=Symbol.for("@antv/infographic/Fragment");function d(t,e={}){return{type:t,props:e}}const I=d,Sa="infographic-component";var zt=(t=>(t.Background="background",t.Title="title",t.Desc="desc",t.ItemsGroup="items-group",t.ItemIconGroup="item-icon-group",t.ItemIcon="item-icon",t.ItemLabel="item-label",t.ItemDesc="item-desc",t.ItemValue="item-value",t.ItemIllus="item-illus",t.BtnAdd="btn-add",t.BtnRemove="btn-remove",t.IllusGroup="illus-group",t.IllusVolume="illus-volume",t.Illus="illus",t.BtnsGroup="btns-group",t.Unknown="unknown",t))(zt||{});const Sx="https://www.weavefox.cn/api/open/v1/icon",Ea=Symbol.for("@antv/infographic/Defs");function jt(t){return{type:Ea,props:t}}function Wt(t){var e,n,r,i;const{x:o=0,y:s=0,width:a=0,height:l=0}=t;return(e=t.cx)!=null||(t.cx=o+a/2),(n=t.cy)!=null||(t.cy=s+l/2),(r=t.rx)!=null||(t.rx=a/2),(i=t.ry)!=null||(t.ry=l/2),{type:"ellipse",props:t}}function Y(t){const{x:e=0,y:n=0}=t;return(e||n)&&(t.transform||(t.transform=`translate(${e}, ${n})`)),{type:"g",props:t}}var Ex=Object.defineProperty,pd=Object.getOwnPropertySymbols,Ix=Object.prototype.hasOwnProperty,Ax=Object.prototype.propertyIsEnumerable,gd=(t,e,n)=>e in t?Ex(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Tx=(t,e)=>{for(var n in e||(e={}))Ix.call(e,n)&&gd(t,n,e[n]);if(pd)for(var n of pd(e))Ax.call(e,n)&&gd(t,n,e[n]);return t};function yt(t){const{x:e,y:n}=t,r=Tx({},t);return(e!==void 0||n!==void 0)&&(r.transform=`translate(${e!=null?e:0}, ${n!=null?n:0})`),{type:"path",props:r}}var kx=Object.defineProperty,Lx=Object.defineProperties,zx=Object.getOwnPropertyDescriptors,ro=Object.getOwnPropertySymbols,md=Object.prototype.hasOwnProperty,yd=Object.prototype.propertyIsEnumerable,vd=(t,e,n)=>e in t?kx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Hx=(t,e)=>{for(var n in e||(e={}))md.call(e,n)&&vd(t,n,e[n]);if(ro)for(var n of ro(e))yd.call(e,n)&&vd(t,n,e[n]);return t},Rx=(t,e)=>Lx(t,zx(e)),Dx=(t,e)=>{var n={};for(var r in t)md.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ro)for(var r of ro(t))e.indexOf(r)<0&&yd.call(t,r)&&(n[r]=t[r]);return n};function Re(t){var e=t,{points:n=[]}=e,r=Dx(e,["points"]);const{x:i,y:o}=r,s=n.map(({x:c,y:h})=>`${c},${h}`).join(" "),a=Rx(Hx({},r),{points:s});return(i!==void 0||o!==void 0)&&(a.transform=`translate(${i!=null?i:0}, ${o!=null?o:0})`+(a.transform||"")),{type:"polygon",props:a}}function Ct(t){return{type:"rect",props:t}}function xd(t){return Object.keys(t[0]).reduce((e,n)=>{const r=n;return t.every(i=>i[r]===t[0][r])&&(e[r]=t[0][r]),e},{})}const bd=(t,e)=>{if(typeof t=="number"){if(e===3)return{mode:"rgb",r:(t>>8&15|t>>4&240)/255,g:(t>>4&15|t&240)/255,b:(t&15|t<<4&240)/255};if(e===4)return{mode:"rgb",r:(t>>12&15|t>>8&240)/255,g:(t>>8&15|t>>4&240)/255,b:(t>>4&15|t&240)/255,alpha:(t&15|t<<4&240)/255};if(e===6)return{mode:"rgb",r:(t>>16&255)/255,g:(t>>8&255)/255,b:(t&255)/255};if(e===8)return{mode:"rgb",r:(t>>24&255)/255,g:(t>>16&255)/255,b:(t>>8&255)/255,alpha:(t&255)/255}}},Nx={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},jx=t=>bd(Nx[t.toLowerCase()],6),Wx=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,Fx=t=>{let e;return(e=t.match(Wx))?bd(parseInt(e[1],16),e[1].length):void 0},Sn="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",ri=`${Sn}%`,Ia=`(?:${Sn}%|${Sn})`,Bx=`(?:${Sn}(deg|grad|rad|turn)|${Sn})`,$r="\\s*,\\s*",Yx=new RegExp(`^rgba?\\(\\s*${Sn}${$r}${Sn}${$r}${Sn}\\s*(?:,\\s*${Ia}\\s*)?\\)$`),Vx=new RegExp(`^rgba?\\(\\s*${ri}${$r}${ri}${$r}${ri}\\s*(?:,\\s*${Ia}\\s*)?\\)$`),Xx=t=>{let e={mode:"rgb"},n;if(n=t.match(Yx))n[1]!==void 0&&(e.r=n[1]/255),n[2]!==void 0&&(e.g=n[2]/255),n[3]!==void 0&&(e.b=n[3]/255);else if(n=t.match(Vx))n[1]!==void 0&&(e.r=n[1]/100),n[2]!==void 0&&(e.g=n[2]/100),n[3]!==void 0&&(e.b=n[3]/100);else return;return n[4]!==void 0?e.alpha=Math.max(0,Math.min(1,n[4]/100)):n[5]!==void 0&&(e.alpha=Math.max(0,Math.min(1,+n[5]))),e},Gx=(t,e)=>t===void 0?void 0:typeof t!="object"?on(t):t.mode!==void 0?t:e?He(Ce({},t),{mode:e}):void 0,Aa=(t="rgb")=>e=>(e=Gx(e,t))!==void 0?e.mode===t?e:rn[e.mode][t]?rn[e.mode][t](e):t==="rgb"?rn[e.mode].rgb(e):rn.rgb[t](rn[e.mode].rgb(e)):void 0,rn={},wd={},io=[],_d={},qx=t=>t,Xt=t=>(rn[t.mode]=Ce(Ce({},rn[t.mode]),t.toMode),Object.keys(t.fromMode||{}).forEach(e=>{rn[e]||(rn[e]={}),rn[e][t.mode]=t.fromMode[e]}),t.ranges||(t.ranges={}),t.difference||(t.difference={}),t.channels.forEach(e=>{if(t.ranges[e]===void 0&&(t.ranges[e]=[0,1]),!t.interpolate[e])throw new Error(`Missing interpolator for: ${e}`);typeof t.interpolate[e]=="function"&&(t.interpolate[e]={use:t.interpolate[e]}),t.interpolate[e].fixup||(t.interpolate[e].fixup=qx)}),wd[t.mode]=t,(t.parse||[]).forEach(e=>{Zx(e,t.mode)}),Aa(t.mode)),Ux=t=>wd[t],Zx=(t,e)=>{if(typeof t=="string"){if(!e)throw new Error("'mode' required when 'parser' is a string");_d[t]=e}else typeof t=="function"&&io.indexOf(t)<0&&io.push(t)},Ta=/[^\x00-\x7F]|[a-zA-Z_]/,Kx=/[^\x00-\x7F]|[-\w]/,rt={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let $t=0;function oo(t){let e=t[$t],n=t[$t+1];return e==="-"||e==="+"?/\d/.test(n)||n==="."&&/\d/.test(t[$t+2]):e==="."?/\d/.test(n):/\d/.test(e)}function ka(t){if($t>=t.length)return!1;let e=t[$t];if(Ta.test(e))return!0;if(e==="-"){if(t.length-$t<2)return!1;let n=t[$t+1];return!!(n==="-"||Ta.test(n))}return!1}const Qx={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function ii(t){let e="";if((t[$t]==="-"||t[$t]==="+")&&(e+=t[$t++]),e+=so(t),t[$t]==="."&&/\d/.test(t[$t+1])&&(e+=t[$t++]+so(t)),(t[$t]==="e"||t[$t]==="E")&&((t[$t+1]==="-"||t[$t+1]==="+")&&/\d/.test(t[$t+2])?e+=t[$t++]+t[$t++]+so(t):/\d/.test(t[$t+1])&&(e+=t[$t++]+so(t))),ka(t)){let n=ao(t);return n==="deg"||n==="rad"||n==="turn"||n==="grad"?{type:rt.Hue,value:e*Qx[n]}:void 0}return t[$t]==="%"?($t++,{type:rt.Percentage,value:+e}):{type:rt.Number,value:+e}}function so(t){let e="";for(;/\d/.test(t[$t]);)e+=t[$t++];return e}function ao(t){let e="";for(;$t<t.length&&Kx.test(t[$t]);)e+=t[$t++];return e}function Jx(t){let e=ao(t);return t[$t]==="("?($t++,{type:rt.Function,value:e}):e==="none"?{type:rt.None,value:void 0}:{type:rt.Ident,value:e}}function tb(t=""){let e=t.trim(),n=[],r;for($t=0;$t<e.length;){if(r=e[$t++],r===`
2
- `||r===" "||r===" "){for(;$t<e.length&&(e[$t]===`
3
- `||e[$t]===" "||e[$t]===" ");)$t++;continue}if(r===",")return;if(r===")"){n.push({type:rt.ParenClose});continue}if(r==="+"){if($t--,oo(e)){n.push(ii(e));continue}return}if(r==="-"){if($t--,oo(e)){n.push(ii(e));continue}if(ka(e)){n.push({type:rt.Ident,value:ao(e)});continue}return}if(r==="."){if($t--,oo(e)){n.push(ii(e));continue}return}if(r==="/"){for(;$t<e.length&&(e[$t]===`
4
- `||e[$t]===" "||e[$t]===" ");)$t++;let i;if(oo(e)&&(i=ii(e),i.type!==rt.Hue)){n.push({type:rt.Alpha,value:i});continue}if(ka(e)&&ao(e)==="none"){n.push({type:rt.Alpha,value:{type:rt.None,value:void 0}});continue}return}if(/\d/.test(r)){$t--,n.push(ii(e));continue}if(Ta.test(r)){$t--,n.push(Jx(e));continue}return}return n}function eb(t){t._i=0;let e=t[t._i++];if(!e||e.type!==rt.Function||e.value!=="color"||(e=t[t._i++],e.type!==rt.Ident))return;const n=_d[e.value];if(!n)return;const r={mode:n},i=$d(t,!1);if(!i)return;const o=Ux(n).channels;for(let s=0,a,l;s<o.length;s++)a=i[s],l=o[s],a.type!==rt.None&&(r[l]=a.type===rt.Number?a.value:a.value/100,l==="alpha"&&(r[l]=Math.max(0,Math.min(1,r[l]))));return r}function $d(t,e){const n=[];let r;for(;t._i<t.length;){if(r=t[t._i++],r.type===rt.None||r.type===rt.Number||r.type===rt.Alpha||r.type===rt.Percentage||e&&r.type===rt.Hue){n.push(r);continue}if(r.type===rt.ParenClose){if(t._i<t.length)return;continue}return}if(!(n.length<3||n.length>4)){if(n.length===4){if(n[3].type!==rt.Alpha)return;n[3]=n[3].value}return n.length===3&&n.push({type:rt.None,value:void 0}),n.every(i=>i.type!==rt.Alpha)?n:void 0}}function nb(t,e){t._i=0;let n=t[t._i++];if(!n||n.type!==rt.Function)return;let r=$d(t,e);if(r)return r.unshift(n.value),r}const on=t=>{if(typeof t!="string")return;const e=tb(t),n=e?nb(e,!0):void 0;let r,i=0,o=io.length;for(;i<o;)if((r=io[i++](t,n))!==void 0)return r;return e?eb(e):void 0};function rb(t,e){if(!e||e[0]!=="rgb"&&e[0]!=="rgba")return;const n={mode:"rgb"},[,r,i,o,s]=e;if(!(r.type===rt.Hue||i.type===rt.Hue||o.type===rt.Hue))return r.type!==rt.None&&(n.r=r.type===rt.Number?r.value/255:r.value/100),i.type!==rt.None&&(n.g=i.type===rt.Number?i.value/255:i.value/100),o.type!==rt.None&&(n.b=o.type===rt.Number?o.value/255:o.value/100),s.type!==rt.None&&(n.alpha=Math.min(1,Math.max(0,s.type===rt.Number?s.value:s.value/100))),n}const ib=t=>t==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,ob=(t,e,n)=>t+n*(e-t),sb=t=>{let e=[];for(let n=0;n<t.length-1;n++){let r=t[n],i=t[n+1];r===void 0&&i===void 0?e.push(void 0):r!==void 0&&i!==void 0?e.push([r,i]):e.push(r!==void 0?[r,r]:[i,i])}return e},dt=(t=>e=>{let n=sb(e);return r=>{let i=r*n.length,o=r>=1?n.length-1:Math.max(Math.floor(i),0),s=n[o];return s===void 0?void 0:t(s[0],s[1],i-o)}})(ob),pe=t=>{let e=!1,n=t.map(r=>r!==void 0?(e=!0,r):1);return e?n:t},Pr={mode:"rgb",channels:["r","g","b","alpha"],parse:[rb,Fx,Xx,jx,ib,"srgb"],serialize:"srgb",interpolate:{r:dt,g:dt,b:dt,alpha:{use:dt,fixup:pe}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},La=(t=0)=>Math.pow(Math.abs(t),563/256)*Math.sign(t),Pd=t=>{let e=La(t.r),n=La(t.g),r=La(t.b),i={mode:"xyz65",x:.5766690429101305*e+.1855582379065463*n+.1882286462349947*r,y:.297344975250536*e+.6273635662554661*n+.0752914584939979*r,z:.0270313613864123*e+.0706888525358272*n+.9913375368376386*r};return t.alpha!==void 0&&(i.alpha=t.alpha),i},za=t=>Math.pow(Math.abs(t),256/563)*Math.sign(t),Cd=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i={mode:"a98",r:za(t*2.0415879038107465-e*.5650069742788597-.3447313507783297*n),g:za(t*-.9692436362808798+e*1.8759675015077206+.0415550574071756*n),b:za(t*.0134442806320312-e*.1183623922310184+1.0151749943912058*n)};return r!==void 0&&(i.alpha=r),i},Ha=(t=0)=>{const e=Math.abs(t);return e<=.04045?t/12.92:(Math.sign(t)||1)*Math.pow((e+.055)/1.055,2.4)},Cr=({r:t,g:e,b:n,alpha:r})=>{let i={mode:"lrgb",r:Ha(t),g:Ha(e),b:Ha(n)};return r!==void 0&&(i.alpha=r),i},Bn=t=>{let{r:e,g:n,b:r,alpha:i}=Cr(t),o={mode:"xyz65",x:.4123907992659593*e+.357584339383878*n+.1804807884018343*r,y:.2126390058715102*e+.715168678767756*n+.0721923153607337*r,z:.0193308187155918*e+.119194779794626*n+.9505321522496607*r};return i!==void 0&&(o.alpha=i),o},Ra=(t=0)=>{const e=Math.abs(t);return e>.0031308?(Math.sign(t)||1)*(1.055*Math.pow(e,1/2.4)-.055):t*12.92},Or=({r:t,g:e,b:n,alpha:r},i="rgb")=>{let o={mode:i,r:Ra(t),g:Ra(e),b:Ra(n)};return r!==void 0&&(o.alpha=r),o},Yn=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Or({r:t*3.2409699419045226-e*1.537383177570094-.4986107602930034*n,g:t*-.9692436362808796+e*1.8759675015077204+.0415550574071756*n,b:t*.0556300796969936-e*.2039769588889765+1.0569715142428784*n});return r!==void 0&&(i.alpha=r),i},ab=He(Ce({},Pr),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:t=>Cd(Bn(t)),xyz65:Cd},toMode:{rgb:t=>Yn(Pd(t)),xyz65:Pd}}),$e=t=>(t=t%360)<0?t+360:t,lb=(t,e)=>t.map((n,r,i)=>{if(n===void 0)return n;let o=$e(n);return r===0||t[r-1]===void 0?o:e(o-$e(i[r-1]))}).reduce((n,r)=>!n.length||r===void 0||n[n.length-1]===void 0?(n.push(r),n):(n.push(r+n[n.length-1]),n),[]),mn=t=>lb(t,e=>Math.abs(e)<=180?e:e-360*Math.sign(e)),xe=[-.14861,1.78277,-.29227,-.90649,1.97294,0],cb=Math.PI/180,hb=180/Math.PI;let Od=xe[3]*xe[4],Md=xe[1]*xe[4],Sd=xe[1]*xe[2]-xe[0]*xe[3];const db=({r:t,g:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=(Sd*n+t*Od-e*Md)/(Sd+Od-Md),o=n-i,s=(xe[4]*(e-i)-xe[2]*o)/xe[3],a={mode:"cubehelix",l:i,s:i===0||i===1?void 0:Math.sqrt(o*o+s*s)/(xe[4]*i*(1-i))};return a.s&&(a.h=Math.atan2(s,o)*hb-120),r!==void 0&&(a.alpha=r),a},ub=({h:t,s:e,l:n,alpha:r})=>{let i={mode:"rgb"};t=(t===void 0?0:t+120)*cb,n===void 0&&(n=0);let o=e===void 0?0:e*n*(1-n),s=Math.cos(t),a=Math.sin(t);return i.r=n+o*(xe[0]*s+xe[1]*a),i.g=n+o*(xe[2]*s+xe[3]*a),i.b=n+o*(xe[4]*s+xe[5]*a),r!==void 0&&(i.alpha=r),i},lo=(t,e)=>{if(t.h===void 0||e.h===void 0||!t.s||!e.s)return 0;let n=$e(t.h),r=$e(e.h),i=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(t.s*e.s)*i},fb=(t,e)=>{if(t.h===void 0||e.h===void 0)return 0;let n=$e(t.h),r=$e(e.h);return Math.abs(r-n)>180?n-(r-360*Math.sign(r-n)):r-n},co=(t,e)=>{if(t.h===void 0||e.h===void 0||!t.c||!e.c)return 0;let n=$e(t.h),r=$e(e.h),i=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(t.c*e.c)*i},yn=t=>{let e=t.reduce((r,i)=>{if(i!==void 0){let o=i*Math.PI/180;r.sin+=Math.sin(o),r.cos+=Math.cos(o)}return r},{sin:0,cos:0}),n=Math.atan2(e.sin,e.cos)*180/Math.PI;return n<0?360+n:n},pb={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:db},toMode:{rgb:ub},interpolate:{h:{use:dt,fixup:mn},s:dt,l:dt,alpha:{use:dt,fixup:pe}},difference:{h:lo},average:{h:yn}},En=({l:t,a:e,b:n,alpha:r},i="lch")=>{e===void 0&&(e=0),n===void 0&&(n=0);let o=Math.sqrt(e*e+n*n),s={mode:i,l:t,c:o};return o&&(s.h=$e(Math.atan2(n,e)*180/Math.PI)),r!==void 0&&(s.alpha=r),s},In=({l:t,c:e,h:n,alpha:r},i="lab")=>{n===void 0&&(n=0);let o={mode:i,l:t,a:e?e*Math.cos(n/180*Math.PI):0,b:e?e*Math.sin(n/180*Math.PI):0};return r!==void 0&&(o.alpha=r),o},Ed=Math.pow(29,3)/Math.pow(3,3),Id=Math.pow(6,3)/Math.pow(29,3),fe={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},Mr={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329};let Da=t=>Math.pow(t,3)>Id?Math.pow(t,3):(116*t-16)/Ed;const Ad=({l:t,a:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=(t+16)/116,o=e/500+i,s=i-n/200,a={mode:"xyz65",x:Da(o)*Mr.X,y:Da(i)*Mr.Y,z:Da(s)*Mr.Z};return r!==void 0&&(a.alpha=r),a},ho=t=>Yn(Ad(t)),Na=t=>t>Id?Math.cbrt(t):(Ed*t+16)/116,Td=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Na(t/Mr.X),o=Na(e/Mr.Y),s=Na(n/Mr.Z),a={mode:"lab65",l:116*o-16,a:500*(i-o),b:200*(o-s)};return r!==void 0&&(a.alpha=r),a},uo=t=>{let e=Td(Bn(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e},fo=1,kd=1,oi=26/180*Math.PI,po=Math.cos(oi),go=Math.sin(oi),Ld=100/Math.log(139/100),ja=({l:t,c:e,h:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i={mode:"lab65",l:(Math.exp(t*fo/Ld)-1)/.0039},o=(Math.exp(.0435*e*kd*fo)-1)/.075,s=o*Math.cos(n/180*Math.PI-oi),a=o*Math.sin(n/180*Math.PI-oi);return i.a=s*po-a/.83*go,i.b=s*go+a/.83*po,r!==void 0&&(i.alpha=r),i},Wa=({l:t,a:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=e*po+n*go,o=.83*(n*po-e*go),s=Math.sqrt(i*i+o*o),a={mode:"dlch",l:Ld/fo*Math.log(1+.0039*t),c:Math.log(1+.075*s)/(.0435*kd*fo)};return a.c&&(a.h=$e((Math.atan2(o,i)+oi)/Math.PI*180)),r!==void 0&&(a.alpha=r),a},zd=t=>ja(En(t,"dlch")),Hd=t=>In(Wa(t),"dlab"),gb={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:zd,rgb:t=>ho(zd(t))},fromMode:{lab65:Hd,rgb:t=>Hd(uo(t))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:dt,a:dt,b:dt,alpha:{use:dt,fixup:pe}}},mb={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:ja,dlab:t=>In(t,"dlab"),rgb:t=>ho(ja(t))},fromMode:{lab65:Wa,dlab:t=>En(t,"dlch"),rgb:t=>Wa(uo(t))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:dt,c:dt,h:{use:dt,fixup:mn},alpha:{use:dt,fixup:pe}},difference:{h:co},average:{h:yn}};function yb({h:t,s:e,i:n,alpha:r}){t=$e(t!==void 0?t:0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.abs(t/60%2-1),o;switch(Math.floor(t/60)){case 0:o={r:n*(1+e*(3/(2-i)-1)),g:n*(1+e*(3*(1-i)/(2-i)-1)),b:n*(1-e)};break;case 1:o={r:n*(1+e*(3*(1-i)/(2-i)-1)),g:n*(1+e*(3/(2-i)-1)),b:n*(1-e)};break;case 2:o={r:n*(1-e),g:n*(1+e*(3/(2-i)-1)),b:n*(1+e*(3*(1-i)/(2-i)-1))};break;case 3:o={r:n*(1-e),g:n*(1+e*(3*(1-i)/(2-i)-1)),b:n*(1+e*(3/(2-i)-1))};break;case 4:o={r:n*(1+e*(3*(1-i)/(2-i)-1)),g:n*(1-e),b:n*(1+e*(3/(2-i)-1))};break;case 5:o={r:n*(1+e*(3/(2-i)-1)),g:n*(1-e),b:n*(1+e*(3*(1-i)/(2-i)-1))};break;default:o={r:n*(1-e),g:n*(1-e),b:n*(1-e)}}return o.mode="rgb",r!==void 0&&(o.alpha=r),o}function vb({r:t,g:e,b:n,alpha:r}){t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.max(t,e,n),o=Math.min(t,e,n),s={mode:"hsi",s:t+e+n===0?0:1-3*o/(t+e+n),i:(t+e+n)/3};return i-o!==0&&(s.h=(i===t?(e-n)/(i-o)+(e<n)*6:i===e?(n-t)/(i-o)+2:(t-e)/(i-o)+4)*60),r!==void 0&&(s.alpha=r),s}const xb={mode:"hsi",toMode:{rgb:yb},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:vb},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:dt,fixup:mn},s:dt,i:dt,alpha:{use:dt,fixup:pe}},difference:{h:lo},average:{h:yn}};function bb({h:t,s:e,l:n,alpha:r}){t=$e(t!==void 0?t:0),e===void 0&&(e=0),n===void 0&&(n=0);let i=n+e*(n<.5?n:1-n),o=i-(i-n)*2*Math.abs(t/60%2-1),s;switch(Math.floor(t/60)){case 0:s={r:i,g:o,b:2*n-i};break;case 1:s={r:o,g:i,b:2*n-i};break;case 2:s={r:2*n-i,g:i,b:o};break;case 3:s={r:2*n-i,g:o,b:i};break;case 4:s={r:o,g:2*n-i,b:i};break;case 5:s={r:i,g:2*n-i,b:o};break;default:s={r:2*n-i,g:2*n-i,b:2*n-i}}return s.mode="rgb",r!==void 0&&(s.alpha=r),s}function wb({r:t,g:e,b:n,alpha:r}){t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.max(t,e,n),o=Math.min(t,e,n),s={mode:"hsl",s:i===o?0:(i-o)/(1-Math.abs(i+o-1)),l:.5*(i+o)};return i-o!==0&&(s.h=(i===t?(e-n)/(i-o)+(e<n)*6:i===e?(n-t)/(i-o)+2:(t-e)/(i-o)+4)*60),r!==void 0&&(s.alpha=r),s}const _b=(t,e)=>{switch(e){case"deg":return+t;case"rad":return t/Math.PI*180;case"grad":return t/10*9;case"turn":return t*360}},$b=new RegExp(`^hsla?\\(\\s*${Bx}${$r}${ri}${$r}${ri}\\s*(?:,\\s*${Ia}\\s*)?\\)$`),Pb=t=>{let e=t.match($b);if(!e)return;let n={mode:"hsl"};return e[3]!==void 0?n.h=+e[3]:e[1]!==void 0&&e[2]!==void 0&&(n.h=_b(e[1],e[2])),e[4]!==void 0&&(n.s=Math.min(Math.max(0,e[4]/100),1)),e[5]!==void 0&&(n.l=Math.min(Math.max(0,e[5]/100),1)),e[6]!==void 0?n.alpha=Math.max(0,Math.min(1,e[6]/100)):e[7]!==void 0&&(n.alpha=Math.max(0,Math.min(1,+e[7]))),n};function Cb(t,e){if(!e||e[0]!=="hsl"&&e[0]!=="hsla")return;const n={mode:"hsl"},[,r,i,o,s]=e;if(r.type!==rt.None){if(r.type===rt.Percentage)return;n.h=r.value}if(i.type!==rt.None){if(i.type===rt.Hue)return;n.s=i.value/100}if(o.type!==rt.None){if(o.type===rt.Hue)return;n.l=o.value/100}return s.type!==rt.None&&(n.alpha=Math.min(1,Math.max(0,s.type===rt.Number?s.value:s.value/100))),n}const Rd={mode:"hsl",toMode:{rgb:bb},fromMode:{rgb:wb},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Cb,Pb],serialize:t=>`hsl(${t.h!==void 0?t.h:"none"} ${t.s!==void 0?t.s*100+"%":"none"} ${t.l!==void 0?t.l*100+"%":"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{h:{use:dt,fixup:mn},s:dt,l:dt,alpha:{use:dt,fixup:pe}},difference:{h:lo},average:{h:yn}};function Dd({h:t,s:e,v:n,alpha:r}){t=$e(t!==void 0?t:0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.abs(t/60%2-1),o;switch(Math.floor(t/60)){case 0:o={r:n,g:n*(1-e*i),b:n*(1-e)};break;case 1:o={r:n*(1-e*i),g:n,b:n*(1-e)};break;case 2:o={r:n*(1-e),g:n,b:n*(1-e*i)};break;case 3:o={r:n*(1-e),g:n*(1-e*i),b:n};break;case 4:o={r:n*(1-e*i),g:n*(1-e),b:n};break;case 5:o={r:n,g:n*(1-e),b:n*(1-e*i)};break;default:o={r:n*(1-e),g:n*(1-e),b:n*(1-e)}}return o.mode="rgb",r!==void 0&&(o.alpha=r),o}function Nd({r:t,g:e,b:n,alpha:r}){t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.max(t,e,n),o=Math.min(t,e,n),s={mode:"hsv",s:i===0?0:1-o/i,v:i};return i-o!==0&&(s.h=(i===t?(e-n)/(i-o)+(e<n)*6:i===e?(n-t)/(i-o)+2:(t-e)/(i-o)+4)*60),r!==void 0&&(s.alpha=r),s}const jd={mode:"hsv",toMode:{rgb:Dd},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:Nd},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:dt,fixup:mn},s:dt,v:dt,alpha:{use:dt,fixup:pe}},difference:{h:lo},average:{h:yn}};function Ob({h:t,w:e,b:n,alpha:r}){if(e===void 0&&(e=0),n===void 0&&(n=0),e+n>1){let i=e+n;e/=i,n/=i}return Dd({h:t,s:n===1?1:1-e/(1-n),v:1-n,alpha:r})}function Mb(t){let e=Nd(t);if(e===void 0)return;let n=e.s!==void 0?e.s:0,r=e.v!==void 0?e.v:0,i={mode:"hwb",w:(1-n)*r,b:1-r};return e.h!==void 0&&(i.h=e.h),e.alpha!==void 0&&(i.alpha=e.alpha),i}function Sb(t,e){if(!e||e[0]!=="hwb")return;const n={mode:"hwb"},[,r,i,o,s]=e;if(r.type!==rt.None){if(r.type===rt.Percentage)return;n.h=r.value}if(i.type!==rt.None){if(i.type===rt.Hue)return;n.w=i.value/100}if(o.type!==rt.None){if(o.type===rt.Hue)return;n.b=o.value/100}return s.type!==rt.None&&(n.alpha=Math.min(1,Math.max(0,s.type===rt.Number?s.value:s.value/100))),n}const Eb={mode:"hwb",toMode:{rgb:Ob},fromMode:{rgb:Mb},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Sb],serialize:t=>`hwb(${t.h!==void 0?t.h:"none"} ${t.w!==void 0?t.w*100+"%":"none"} ${t.b!==void 0?t.b*100+"%":"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{h:{use:dt,fixup:mn},w:dt,b:dt,alpha:{use:dt,fixup:pe}},difference:{h:fb},average:{h:yn}},Wd=203,mo=.1593017578125,Fd=78.84375,yo=.8359375,vo=18.8515625,xo=18.6875;function Fa(t){if(t<0)return 0;const e=Math.pow(t,1/Fd);return 1e4*Math.pow(Math.max(0,e-yo)/(vo-xo*e),1/mo)}function Ba(t){if(t<0)return 0;const e=Math.pow(t/1e4,mo);return Math.pow((yo+vo*e)/(1+xo*e),Fd)}const Ya=t=>Math.max(t/Wd,0),Bd=({i:t,t:e,p:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);const i=Fa(t+.008609037037932761*e+.11102962500302593*n),o=Fa(t-.00860903703793275*e-.11102962500302599*n),s=Fa(t+.5600313357106791*e-.32062717498731885*n),a={mode:"xyz65",x:Ya(2.070152218389422*i-1.3263473389671556*o+.2066510476294051*s),y:Ya(.3647385209748074*i+.680566024947227*o-.0453045459220346*s),z:Ya(-.049747207535812*i-.0492609666966138*o+1.1880659249923042*s)};return r!==void 0&&(a.alpha=r),a},Va=(t=0)=>Math.max(t*Wd,0),Yd=({x:t,y:e,z:n,alpha:r})=>{const i=Va(t),o=Va(e),s=Va(n),a=Ba(.3592832590121217*i+.6976051147779502*o-.0358915932320289*s),l=Ba(-.1920808463704995*i+1.1004767970374323*o+.0753748658519118*s),c=Ba(.0070797844607477*i+.0748396662186366*o+.8433265453898765*s),h=.5*a+.5*l,u=1.61376953125*a-3.323486328125*l+1.709716796875*c,f=4.378173828125*a-4.24560546875*l-.132568359375*c,p={mode:"itp",i:h,t:u,p:f};return r!==void 0&&(p.alpha=r),p},Ib={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Bd,rgb:t=>Yn(Bd(t))},fromMode:{xyz65:Yd,rgb:t=>Yd(Bn(t))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:dt,t:dt,p:dt,alpha:{use:dt,fixup:pe}}},Ab=134.03437499999998,Tb=16295499532821565e-27,Xa=t=>{if(t<0)return 0;let e=Math.pow(t/1e4,mo);return Math.pow((yo+vo*e)/(1+xo*e),Ab)},Ga=(t=0)=>Math.max(t*203,0),Vd=({x:t,y:e,z:n,alpha:r})=>{t=Ga(t),e=Ga(e),n=Ga(n);let i=1.15*t-.15*n,o=.66*e+.34*t,s=Xa(.41478972*i+.579999*o+.014648*n),a=Xa(-.20151*i+1.120649*o+.0531008*n),l=Xa(-.0166008*i+.2648*o+.6684799*n),c=(s+a)/2,h={mode:"jab",j:.44*c/(1-.56*c)-Tb,a:3.524*s-4.066708*a+.542708*l,b:.199076*s+1.096799*a-1.295875*l};return r!==void 0&&(h.alpha=r),h},kb=134.03437499999998,Xd=16295499532821565e-27,qa=t=>{if(t<0)return 0;let e=Math.pow(t,1/kb);return 1e4*Math.pow((yo-e)/(xo*e-vo),1/mo)},Ua=t=>t/203,Gd=({j:t,a:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=(t+Xd)/(.44+.56*(t+Xd)),o=qa(i+.13860504*e+.058047316*n),s=qa(i-.13860504*e-.058047316*n),a=qa(i-.096019242*e-.8118919*n),l={mode:"xyz65",x:Ua(1.661373024652174*o-.914523081304348*s+.23136208173913045*a),y:Ua(-.3250758611844533*o+1.571847026732543*s-.21825383453227928*a),z:Ua(-.090982811*o-.31272829*s+1.5227666*a)};return r!==void 0&&(l.alpha=r),l},qd=t=>{let e=Vd(Bn(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e},Ud=t=>Yn(Gd(t)),Lb={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:qd,xyz65:Vd},toMode:{rgb:Ud,xyz65:Gd},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:dt,a:dt,b:dt,alpha:{use:dt,fixup:pe}}},Zd=({j:t,a:e,b:n,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.sqrt(e*e+n*n),o={mode:"jch",j:t,c:i};return i&&(o.h=$e(Math.atan2(n,e)*180/Math.PI)),r!==void 0&&(o.alpha=r),o},Kd=({j:t,c:e,h:n,alpha:r})=>{n===void 0&&(n=0);let i={mode:"jab",j:t,a:e?e*Math.cos(n/180*Math.PI):0,b:e?e*Math.sin(n/180*Math.PI):0};return r!==void 0&&(i.alpha=r),i},zb={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Kd,rgb:t=>Ud(Kd(t))},fromMode:{rgb:t=>Zd(qd(t)),jab:Zd},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:dt,fixup:mn},c:dt,j:dt,alpha:{use:dt,fixup:pe}},difference:{h:co},average:{h:yn}},bo=Math.pow(29,3)/Math.pow(3,3),Za=Math.pow(6,3)/Math.pow(29,3);let Ka=t=>Math.pow(t,3)>Za?Math.pow(t,3):(116*t-16)/bo;const Qa=({l:t,a:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=(t+16)/116,o=e/500+i,s=i-n/200,a={mode:"xyz50",x:Ka(o)*fe.X,y:Ka(i)*fe.Y,z:Ka(s)*fe.Z};return r!==void 0&&(a.alpha=r),a},si=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Or({r:t*3.1341359569958707-e*1.6173863321612538-.4906619460083532*n,g:t*-.978795502912089+e*1.916254567259524+.03344273116131949*n,b:t*.07195537988411677-e*.2289768264158322+1.405386058324125*n});return r!==void 0&&(i.alpha=r),i},Qd=t=>si(Qa(t)),ai=t=>{let{r:e,g:n,b:r,alpha:i}=Cr(t),o={mode:"xyz50",x:.436065742824811*e+.3851514688337912*n+.14307845442264197*r,y:.22249319175623702*e+.7168870538238823*n+.06061979053616537*r,z:.013923904500943465*e+.09708128566574634*n+.7140993584005155*r};return i!==void 0&&(o.alpha=i),o},Ja=t=>t>Za?Math.cbrt(t):(bo*t+16)/116,tl=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Ja(t/fe.X),o=Ja(e/fe.Y),s=Ja(n/fe.Z),a={mode:"lab",l:116*o-16,a:500*(i-o),b:200*(o-s)};return r!==void 0&&(a.alpha=r),a},Jd=t=>{let e=tl(ai(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e};function Hb(t,e){if(!e||e[0]!=="lab")return;const n={mode:"lab"},[,r,i,o,s]=e;if(!(r.type===rt.Hue||i.type===rt.Hue||o.type===rt.Hue))return r.type!==rt.None&&(n.l=Math.min(Math.max(0,r.value),100)),i.type!==rt.None&&(n.a=i.type===rt.Number?i.value:i.value*125/100),o.type!==rt.None&&(n.b=o.type===rt.Number?o.value:o.value*125/100),s.type!==rt.None&&(n.alpha=Math.min(1,Math.max(0,s.type===rt.Number?s.value:s.value/100))),n}const el={mode:"lab",toMode:{xyz50:Qa,rgb:Qd},fromMode:{xyz50:tl,rgb:Jd},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[Hb],serialize:t=>`lab(${t.l!==void 0?t.l:"none"} ${t.a!==void 0?t.a:"none"} ${t.b!==void 0?t.b:"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{l:dt,a:dt,b:dt,alpha:{use:dt,fixup:pe}}},Rb=He(Ce({},el),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Ad,rgb:ho},fromMode:{xyz65:Td,rgb:uo},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}});function Db(t,e){if(!e||e[0]!=="lch")return;const n={mode:"lch"},[,r,i,o,s]=e;if(r.type!==rt.None){if(r.type===rt.Hue)return;n.l=Math.min(Math.max(0,r.value),100)}if(i.type!==rt.None&&(n.c=Math.max(0,i.type===rt.Number?i.value:i.value*150/100)),o.type!==rt.None){if(o.type===rt.Percentage)return;n.h=o.value}return s.type!==rt.None&&(n.alpha=Math.min(1,Math.max(0,s.type===rt.Number?s.value:s.value/100))),n}const nl={mode:"lch",toMode:{lab:In,rgb:t=>Qd(In(t))},fromMode:{rgb:t=>En(Jd(t)),lab:En},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[Db],serialize:t=>`lch(${t.l!==void 0?t.l:"none"} ${t.c!==void 0?t.c:"none"} ${t.h!==void 0?t.h:"none"}${t.alpha<1?` / ${t.alpha}`:""})`,interpolate:{h:{use:dt,fixup:mn},c:dt,l:dt,alpha:{use:dt,fixup:pe}},difference:{h:co},average:{h:yn}},Nb=He(Ce({},nl),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:t=>In(t,"lab65"),rgb:t=>ho(In(t,"lab65"))},fromMode:{rgb:t=>En(uo(t),"lch65"),lab65:t=>En(t,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}}),tu=({l:t,u:e,v:n,alpha:r})=>{e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.sqrt(e*e+n*n),o={mode:"lchuv",l:t,c:i};return i&&(o.h=$e(Math.atan2(n,e)*180/Math.PI)),r!==void 0&&(o.alpha=r),o},eu=({l:t,c:e,h:n,alpha:r})=>{n===void 0&&(n=0);let i={mode:"luv",l:t,u:e?e*Math.cos(n/180*Math.PI):0,v:e?e*Math.sin(n/180*Math.PI):0};return r!==void 0&&(i.alpha=r),i},nu=(t,e,n)=>4*t/(t+15*e+3*n),ru=(t,e,n)=>9*e/(t+15*e+3*n),jb=nu(fe.X,fe.Y,fe.Z),Wb=ru(fe.X,fe.Y,fe.Z),Fb=t=>t<=Za?bo*t:116*Math.cbrt(t)-16,rl=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Fb(e/fe.Y),o=nu(t,e,n),s=ru(t,e,n);!isFinite(o)||!isFinite(s)?i=o=s=0:(o=13*i*(o-jb),s=13*i*(s-Wb));let a={mode:"luv",l:i,u:o,v:s};return r!==void 0&&(a.alpha=r),a},Bb=(t,e,n)=>4*t/(t+15*e+3*n),Yb=(t,e,n)=>9*e/(t+15*e+3*n),Vb=Bb(fe.X,fe.Y,fe.Z),Xb=Yb(fe.X,fe.Y,fe.Z),il=({l:t,u:e,v:n,alpha:r})=>{if(t===void 0&&(t=0),t===0)return{mode:"xyz50",x:0,y:0,z:0};e===void 0&&(e=0),n===void 0&&(n=0);let i=e/(13*t)+Vb,o=n/(13*t)+Xb,s=fe.Y*(t<=8?t/bo:Math.pow((t+16)/116,3)),a=s*(9*i)/(4*o),l=s*(12-3*i-20*o)/(4*o),c={mode:"xyz50",x:a,y:s,z:l};return r!==void 0&&(c.alpha=r),c},Gb={mode:"lchuv",toMode:{luv:eu,rgb:t=>si(il(eu(t)))},fromMode:{rgb:t=>tu(rl(ai(t))),luv:tu},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:dt,fixup:mn},c:dt,l:dt,alpha:{use:dt,fixup:pe}},difference:{h:co},average:{h:yn}},qb=He(Ce({},Pr),{mode:"lrgb",toMode:{rgb:Or},fromMode:{rgb:Cr},parse:["srgb-linear"],serialize:"srgb-linear"}),Ub={mode:"luv",toMode:{xyz50:il,rgb:t=>si(il(t))},fromMode:{xyz50:rl,rgb:t=>rl(ai(t))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:dt,u:dt,v:dt,alpha:{use:dt,fixup:pe}}},iu=({r:t,g:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.cbrt(.412221469470763*t+.5363325372617348*e+.0514459932675022*n),o=Math.cbrt(.2119034958178252*t+.6806995506452344*e+.1073969535369406*n),s=Math.cbrt(.0883024591900564*t+.2817188391361215*e+.6299787016738222*n),a={mode:"oklab",l:.210454268309314*i+.7936177747023054*o-.0040720430116193*s,a:1.9779985324311684*i-2.42859224204858*o+.450593709617411*s,b:.0259040424655478*i+.7827717124575296*o-.8086757549230774*s};return r!==void 0&&(a.alpha=r),a},wo=t=>{let e=iu(Cr(t));return t.r===t.b&&t.b===t.g&&(e.a=e.b=0),e},li=({l:t,a:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Math.pow(t+.3963377773761749*e+.2158037573099136*n,3),o=Math.pow(t-.1055613458156586*e-.0638541728258133*n,3),s=Math.pow(t-.0894841775298119*e-1.2914855480194092*n,3),a={mode:"lrgb",r:4.076741636075957*i-3.3077115392580616*o+.2309699031821044*s,g:-1.2684379732850317*i+2.6097573492876887*o-.3413193760026573*s,b:-.0041960761386756*i-.7034186179359362*o+1.7076146940746117*s};return r!==void 0&&(a.alpha=r),a},_o=t=>Or(li(t));function ol(t){const r=1.170873786407767;return .5*(r*t-.206+Math.sqrt((r*t-.206)*(r*t-.206)+4*.03*r*t))}function $o(t){return(t*t+.206*t)/(1.170873786407767*(t+.03))}function Zb(t,e){let n,r,i,o,s,a,l,c;-1.88170328*t-.80936493*e>1?(n=1.19086277,r=1.76576728,i=.59662641,o=.75515197,s=.56771245,a=4.0767416621,l=-3.3077115913,c=.2309699292):1.81444104*t-1.19445276*e>1?(n=.73956515,r=-.45954404,i=.08285427,o=.1254107,s=.14503204,a=-1.2684380046,l=2.6097574011,c=-.3413193965):(n=1.35733652,r=-.00915799,i=-1.1513021,o=-.50559606,s=.00692167,a=-.0041960863,l=-.7034186147,c=1.707614701);let h=n+r*t+i*e+o*t*t+s*t*e,u=.3963377774*t+.2158037573*e,f=-.1055613458*t-.0638541728*e,p=-.0894841775*t-1.291485548*e;{let g=1+h*u,y=1+h*f,m=1+h*p,x=g*g*g,v=y*y*y,b=m*m*m,w=3*u*g*g,_=3*f*y*y,$=3*p*m*m,P=6*u*u*g,C=6*f*f*y,T=6*p*p*m,E=a*x+l*v+c*b,S=a*w+l*_+c*$,R=a*P+l*C+c*T;h=h-E*S/(S*S-.5*E*R)}return h}function sl(t,e){let n=Zb(t,e),r=li({l:1,a:n*t,b:n*e}),i=Math.cbrt(1/Math.max(r.r,r.g,r.b)),o=i*n;return[i,o]}function Kb(t,e,n,r,i,o=null){o||(o=sl(t,e));let s;if((n-i)*o[1]-(o[0]-i)*r<=0)s=o[1]*i/(r*o[0]+o[1]*(i-n));else{s=o[1]*(i-1)/(r*(o[0]-1)+o[1]*(i-n));{let a=n-i,l=r,c=.3963377774*t+.2158037573*e,h=-.1055613458*t-.0638541728*e,u=-.0894841775*t-1.291485548*e,f=a+l*c,p=a+l*h,g=a+l*u;{let y=i*(1-s)+s*n,m=s*r,x=y+m*c,v=y+m*h,b=y+m*u,w=x*x*x,_=v*v*v,$=b*b*b,P=3*f*x*x,C=3*p*v*v,T=3*g*b*b,E=6*f*f*x,S=6*p*p*v,R=6*g*g*b,O=4.0767416621*w-3.3077115913*_+.2309699292*$-1,A=4.0767416621*P-3.3077115913*C+.2309699292*T,F=4.0767416621*E-3.3077115913*S+.2309699292*R,L=A/(A*A-.5*O*F),D=-O*L,k=-1.2684380046*w+2.6097574011*_-.3413193965*$-1,N=-1.2684380046*P+2.6097574011*C-.3413193965*T,j=-1.2684380046*E+2.6097574011*S-.3413193965*R,X=N/(N*N-.5*k*j),z=-k*X,M=-.0041960863*w-.7034186147*_+1.707614701*$-1,H=-.0041960863*P-.7034186147*C+1.707614701*T,B=-.0041960863*E-.7034186147*S+1.707614701*R,q=H/(H*H-.5*M*B),V=-M*q;D=L>=0?D:1e6,z=X>=0?z:1e6,V=q>=0?V:1e6,s+=Math.min(D,Math.min(z,V))}}}return s}function al(t,e,n=null){n||(n=sl(t,e));let r=n[0],i=n[1];return[i/r,i/(1-r)]}function ou(t,e,n){let r=sl(e,n),i=Kb(e,n,t,1,t,r),o=al(e,n,r),s=.11516993+1/(7.4477897+4.1590124*n+e*(-2.19557347+1.75198401*n+e*(-2.13704948-10.02301043*n+e*(-4.24894561+5.38770819*n+4.69891013*e)))),a=.11239642+1/(1.6132032-.68124379*n+e*(.40370612+.90148123*n+e*(-.27087943+.6122399*n+e*(.00299215-.45399568*n-.14661872*e)))),l=i/Math.min(t*o[0],(1-t)*o[1]),c=t*s,h=(1-t)*a,u=.9*l*Math.sqrt(Math.sqrt(1/(1/(c*c*c*c)+1/(h*h*h*h))));return c=t*.4,h=(1-t)*.8,[Math.sqrt(1/(1/(c*c)+1/(h*h))),u,i]}function su(t){const e=t.l!==void 0?t.l:0,n=t.a!==void 0?t.a:0,r=t.b!==void 0?t.b:0,i={mode:"okhsl",l:ol(e)};t.alpha!==void 0&&(i.alpha=t.alpha);let o=Math.sqrt(n*n+r*r);if(!o)return i.s=0,i;let[s,a,l]=ou(e,n/o,r/o),c;if(o<a){let h=0,u=.8*s,f=1-u/a;c=(o-h)/(u+f*(o-h))*.8}else{let h=a,u=.2*a*a*1.25*1.25/s,f=1-u/(l-a);c=.8+.2*((o-h)/(u+f*(o-h)))}return c&&(i.s=c,i.h=$e(Math.atan2(r,n)*180/Math.PI)),i}function au(t){let e=t.h!==void 0?t.h:0,n=t.s!==void 0?t.s:0,r=t.l!==void 0?t.l:0;const i={mode:"oklab",l:$o(r)};if(t.alpha!==void 0&&(i.alpha=t.alpha),!n||r===1)return i.a=i.b=0,i;let o=Math.cos(e/180*Math.PI),s=Math.sin(e/180*Math.PI),[a,l,c]=ou(i.l,o,s),h,u,f,p;n<.8?(h=1.25*n,u=0,f=.8*a,p=1-f/l):(h=5*(n-.8),u=l,f=.2*l*l*1.25*1.25/a,p=1-f/(c-l));let g=u+h*f/(1-p*h);return i.a=g*o,i.b=g*s,i}const Qb=He(Ce({},Rd),{mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:su,rgb:t=>su(wo(t))},toMode:{oklab:au,rgb:t=>_o(au(t))}});function lu(t){let e=t.l!==void 0?t.l:0,n=t.a!==void 0?t.a:0,r=t.b!==void 0?t.b:0,i=Math.sqrt(n*n+r*r),o=i?n/i:1,s=i?r/i:1,[a,l]=al(o,s),c=.5,h=1-c/a,u=l/(i+e*l),f=u*e,p=u*i,g=$o(f),y=p*g/f,m=li({l:g,a:o*y,b:s*y}),x=Math.cbrt(1/Math.max(m.r,m.g,m.b,0));e=e/x,i=i/x*ol(e)/e,e=ol(e);const v={mode:"okhsv",s:i?(c+l)*p/(l*c+l*h*p):0,v:e?e/f:0};return v.s&&(v.h=$e(Math.atan2(r,n)*180/Math.PI)),t.alpha!==void 0&&(v.alpha=t.alpha),v}function cu(t){const e={mode:"oklab"};t.alpha!==void 0&&(e.alpha=t.alpha);const n=t.h!==void 0?t.h:0,r=t.s!==void 0?t.s:0,i=t.v!==void 0?t.v:0,o=Math.cos(n/180*Math.PI),s=Math.sin(n/180*Math.PI),[a,l]=al(o,s),c=.5,h=1-c/a,u=1-r*c/(c+l-l*h*r),f=r*l*c/(c+l-l*h*r),p=$o(u),g=f*p/u,y=li({l:p,a:o*g,b:s*g}),m=Math.cbrt(1/Math.max(y.r,y.g,y.b,0)),x=$o(i*u),v=f*x/u;return e.l=x*m,e.a=v*o*m,e.b=v*s*m,e}const Jb=He(Ce({},jd),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:lu,rgb:t=>lu(wo(t))},toMode:{oklab:cu,rgb:t=>_o(cu(t))}});function t4(t,e){if(!e||e[0]!=="oklab")return;const n={mode:"oklab"},[,r,i,o,s]=e;if(!(r.type===rt.Hue||i.type===rt.Hue||o.type===rt.Hue))return r.type!==rt.None&&(n.l=Math.min(Math.max(0,r.type===rt.Number?r.value:r.value/100),1)),i.type!==rt.None&&(n.a=i.type===rt.Number?i.value:i.value*.4/100),o.type!==rt.None&&(n.b=o.type===rt.Number?o.value:o.value*.4/100),s.type!==rt.None&&(n.alpha=Math.min(1,Math.max(0,s.type===rt.Number?s.value:s.value/100))),n}const e4=He(Ce({},el),{mode:"oklab",toMode:{lrgb:li,rgb:_o},fromMode:{lrgb:iu,rgb:wo},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[t4],serialize:t=>`oklab(${t.l!==void 0?t.l:"none"} ${t.a!==void 0?t.a:"none"} ${t.b!==void 0?t.b:"none"}${t.alpha<1?` / ${t.alpha}`:""})`});function n4(t,e){if(!e||e[0]!=="oklch")return;const n={mode:"oklch"},[,r,i,o,s]=e;if(r.type!==rt.None){if(r.type===rt.Hue)return;n.l=Math.min(Math.max(0,r.type===rt.Number?r.value:r.value/100),1)}if(i.type!==rt.None&&(n.c=Math.max(0,i.type===rt.Number?i.value:i.value*.4/100)),o.type!==rt.None){if(o.type===rt.Percentage)return;n.h=o.value}return s.type!==rt.None&&(n.alpha=Math.min(1,Math.max(0,s.type===rt.Number?s.value:s.value/100))),n}const hu=He(Ce({},nl),{mode:"oklch",toMode:{oklab:t=>In(t,"oklab"),rgb:t=>_o(In(t,"oklab"))},fromMode:{rgb:t=>En(wo(t),"oklch"),oklab:t=>En(t,"oklch")},parse:[n4],serialize:t=>`oklch(${t.l!==void 0?t.l:"none"} ${t.c!==void 0?t.c:"none"} ${t.h!==void 0?t.h:"none"}${t.alpha<1?` / ${t.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}}),du=t=>{let{r:e,g:n,b:r,alpha:i}=Cr(t),o={mode:"xyz65",x:.486570948648216*e+.265667693169093*n+.1982172852343625*r,y:.2289745640697487*e+.6917385218365062*n+.079286914093745*r,z:0*e+.0451133818589026*n+1.043944368900976*r};return i!==void 0&&(o.alpha=i),o},uu=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i=Or({r:t*2.4934969119414263-e*.9313836179191242-.402710784450717*n,g:t*-.8294889695615749+e*1.7626640603183465+.0236246858419436*n,b:t*.0358458302437845-e*.0761723892680418+.9568845240076871*n},"p3");return r!==void 0&&(i.alpha=r),i},r4=He(Ce({},Pr),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:t=>uu(Bn(t)),xyz65:uu},toMode:{rgb:t=>Yn(du(t)),xyz65:du}}),ll=t=>{let e=Math.abs(t);return e>=1/512?Math.sign(t)*Math.pow(e,1/1.8):16*t},fu=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i={mode:"prophoto",r:ll(t*1.3457868816471585-e*.2555720873797946-.0511018649755453*n),g:ll(t*-.5446307051249019+e*1.5082477428451466+.0205274474364214*n),b:ll(t*0+e*0+1.2119675456389452*n)};return r!==void 0&&(i.alpha=r),i},cl=(t=0)=>{let e=Math.abs(t);return e>=16/512?Math.sign(t)*Math.pow(e,1.8):t/16},pu=t=>{let e=cl(t.r),n=cl(t.g),r=cl(t.b),i={mode:"xyz50",x:.7977666449006423*e+.1351812974005331*n+.0313477341283922*r,y:.2880748288194013*e+.7118352342418731*n+899369387256e-16*r,z:0*e+0*n+.8251046025104602*r};return t.alpha!==void 0&&(i.alpha=t.alpha),i},i4=He(Ce({},Pr),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:fu,rgb:t=>fu(ai(t))},toMode:{xyz50:pu,rgb:t=>si(pu(t))}}),gu=1.09929682680944,o4=.018053968510807,hl=t=>{const e=Math.abs(t);return e>o4?(Math.sign(t)||1)*(gu*Math.pow(e,.45)-(gu-1)):4.5*t},mu=({x:t,y:e,z:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);let i={mode:"rec2020",r:hl(t*1.7166511879712683-e*.3556707837763925-.2533662813736599*n),g:hl(t*-.6666843518324893+e*1.6164812366349395+.0157685458139111*n),b:hl(t*.0176398574453108-e*.0427706132578085+.9421031212354739*n)};return r!==void 0&&(i.alpha=r),i},yu=1.09929682680944,s4=.018053968510807,dl=(t=0)=>{let e=Math.abs(t);return e<s4*4.5?t/4.5:(Math.sign(t)||1)*Math.pow((e+yu-1)/yu,1/.45)},vu=t=>{let e=dl(t.r),n=dl(t.g),r=dl(t.b),i={mode:"xyz65",x:.6369580483012911*e+.1446169035862083*n+.1688809751641721*r,y:.262700212011267*e+.6779980715188708*n+.059301716469862*r,z:0*e+.0280726930490874*n+1.0609850577107909*r};return t.alpha!==void 0&&(i.alpha=t.alpha),i},a4=He(Ce({},Pr),{mode:"rec2020",fromMode:{xyz65:mu,rgb:t=>mu(Bn(t))},toMode:{xyz65:vu,rgb:t=>Yn(vu(t))},parse:["rec2020"],serialize:"rec2020"}),Vn=.0037930732552754493,xu=Math.cbrt(Vn),ul=t=>Math.cbrt(t)-xu,l4=t=>{const{r:e,g:n,b:r,alpha:i}=Cr(t),o=ul(.3*e+.622*n+.078*r+Vn),s=ul(.23*e+.692*n+.078*r+Vn),a=ul(.2434226892454782*e+.2047674442449682*n+.5518098665095535*r+Vn),l={mode:"xyb",x:(o-s)/2,y:(o+s)/2,b:a-(o+s)/2};return i!==void 0&&(l.alpha=i),l},fl=t=>Math.pow(t+xu,3),c4={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:({x:t,y:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);const i=fl(t+e)-Vn,o=fl(e-t)-Vn,s=fl(n+e)-Vn,a=Or({r:11.031566904639861*i-9.866943908131562*o-.16462299650829934*s,g:-3.2541473810744237*i+4.418770377582723*o-.16462299650829934*s,b:-3.6588512867136815*i+2.7129230459360922*o+1.9459282407775895*s});return r!==void 0&&(a.alpha=r),a}},fromMode:{rgb:l4},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:dt,y:dt,b:dt,alpha:{use:dt,fixup:pe}}},h4={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:si,lab:tl},fromMode:{rgb:ai,lab:Qa},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:dt,y:dt,z:dt,alpha:{use:dt,fixup:pe}}},d4={mode:"xyz65",toMode:{rgb:Yn,xyz50:t=>{let{x:e,y:n,z:r,alpha:i}=t;e===void 0&&(e=0),n===void 0&&(n=0),r===void 0&&(r=0);let o={mode:"xyz50",x:1.0479298208405488*e+.0229467933410191*n-.0501922295431356*r,y:.0296278156881593*e+.990434484573249*n-.0170738250293851*r,z:-.0092430581525912*e+.0150551448965779*n+.7518742899580008*r};return i!==void 0&&(o.alpha=i),o}},fromMode:{rgb:Bn,xyz50:t=>{let{x:e,y:n,z:r,alpha:i}=t;e===void 0&&(e=0),n===void 0&&(n=0),r===void 0&&(r=0);let o={mode:"xyz65",x:.9554734527042182*e-.0230985368742614*n+.0632593086610217*r,y:-.0283697069632081*e+1.0099954580058226*n+.021041398966943*r,z:.0123140016883199*e-.0205076964334779*n+1.3303659366080753*r};return i!==void 0&&(o.alpha=i),o}},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:dt,y:dt,z:dt,alpha:{use:dt,fixup:pe}}},u4={mode:"yiq",toMode:{rgb:({y:t,i:e,q:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);const i={mode:"rgb",r:t+.95608445*e+.6208885*n,g:t-.27137664*e-.6486059*n,b:t-1.10561724*e+1.70250126*n};return r!==void 0&&(i.alpha=r),i}},fromMode:{rgb:({r:t,g:e,b:n,alpha:r})=>{t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0);const i={mode:"yiq",y:.29889531*t+.58662247*e+.11448223*n,i:.59597799*t-.2741761*e-.32180189*n,q:.21147017*t-.52261711*e+.31114694*n};return r!==void 0&&(i.alpha=r),i}},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:dt,i:dt,q:dt,alpha:{use:dt,fixup:pe}}},f4=t=>Math.max(0,Math.min(1,t||0)),Po=t=>Math.round(f4(t)*255),bu=Aa("rgb"),wu=t=>{if(t===void 0)return;let e=Po(t.r),n=Po(t.g),r=Po(t.b);return"#"+(1<<24|e<<16|n<<8|r).toString(16).slice(1)},p4=t=>{if(t===void 0)return;let e=Po(t.alpha!==void 0?t.alpha:1);return wu(t)+(256|e).toString(16).slice(1)},ci=t=>wu(bu(t)),g4=t=>p4(bu(t));function pl(t){let e=Aa("lrgb")(t);return .2126*e.r+.7152*e.g+.0722*e.b}function gl(t,e){let n=pl(t),r=pl(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}Xt(ab),Xt(pb),Xt(gb),Xt(mb),Xt(xb),Xt(Rd),Xt(jd),Xt(Eb),Xt(Ib),Xt(Lb),Xt(zb),Xt(el),Xt(Rb),Xt(nl),Xt(Nb),Xt(Gb),Xt(qb),Xt(Ub),Xt(Qb),Xt(Jb),Xt(e4);const _u=Xt(hu);Xt(r4),Xt(i4),Xt(a4),Xt(Pr),Xt(c4),Xt(h4),Xt(d4),Xt(u4);function Xn(t){if(!t)return!1;const e=t.trim().toLowerCase();return!(e==="none"||e==="transparent"||e==="")}function $u(t){const e=on(t);return e?pl(e)<.5:!1}var An=Array.isArray,Pu=typeof global=="object"&&global&&global.Object===Object&&global,m4=typeof self=="object"&&self&&self.Object===Object&&self,sn=Pu||m4||Function("return this")(),Tn=sn.Symbol,Cu=Object.prototype,y4=Cu.hasOwnProperty,v4=Cu.toString,hi=Tn?Tn.toStringTag:void 0;function x4(t){var e=y4.call(t,hi),n=t[hi];try{t[hi]=void 0;var r=!0}catch(o){}var i=v4.call(t);return r&&(e?t[hi]=n:delete t[hi]),i}var b4=Object.prototype,w4=b4.toString;function _4(t){return w4.call(t)}var $4="[object Null]",P4="[object Undefined]",Ou=Tn?Tn.toStringTag:void 0;function Gn(t){return t==null?t===void 0?P4:$4:Ou&&Ou in Object(t)?x4(t):_4(t)}function kn(t){return t!=null&&typeof t=="object"}var C4="[object Symbol]";function Co(t){return typeof t=="symbol"||kn(t)&&Gn(t)==C4}var O4=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,M4=/^\w*$/;function S4(t,e){if(An(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Co(t)?!0:M4.test(t)||!O4.test(t)||e!=null&&t in Object(e)}function an(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var E4="[object AsyncFunction]",I4="[object Function]",A4="[object GeneratorFunction]",T4="[object Proxy]";function ml(t){if(!an(t))return!1;var e=Gn(t);return e==I4||e==A4||e==E4||e==T4}var yl=sn["__core-js_shared__"],Mu=(function(){var t=/[^.]+$/.exec(yl&&yl.keys&&yl.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function k4(t){return!!Mu&&Mu in t}var L4=Function.prototype,z4=L4.toString;function qn(t){if(t!=null){try{return z4.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var H4=/[\\^$.*+?()[\]{}|]/g,R4=/^\[object .+?Constructor\]$/,D4=Function.prototype,N4=Object.prototype,j4=D4.toString,W4=N4.hasOwnProperty,F4=RegExp("^"+j4.call(W4).replace(H4,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function B4(t){if(!an(t)||k4(t))return!1;var e=ml(t)?F4:R4;return e.test(qn(t))}function Y4(t,e){return t==null?void 0:t[e]}function Un(t,e){var n=Y4(t,e);return B4(n)?n:void 0}var di=Un(Object,"create");function V4(){this.__data__=di?di(null):{},this.size=0}function X4(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var G4="__lodash_hash_undefined__",q4=Object.prototype,U4=q4.hasOwnProperty;function Z4(t){var e=this.__data__;if(di){var n=e[t];return n===G4?void 0:n}return U4.call(e,t)?e[t]:void 0}var K4=Object.prototype,Q4=K4.hasOwnProperty;function J4(t){var e=this.__data__;return di?e[t]!==void 0:Q4.call(e,t)}var t5="__lodash_hash_undefined__";function e5(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=di&&e===void 0?t5:e,this}function Zn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Zn.prototype.clear=V4,Zn.prototype.delete=X4,Zn.prototype.get=Z4,Zn.prototype.has=J4,Zn.prototype.set=e5;function n5(){this.__data__=[],this.size=0}function Oo(t,e){return t===e||t!==t&&e!==e}function Mo(t,e){for(var n=t.length;n--;)if(Oo(t[n][0],e))return n;return-1}var r5=Array.prototype,i5=r5.splice;function o5(t){var e=this.__data__,n=Mo(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():i5.call(e,n,1),--this.size,!0}function s5(t){var e=this.__data__,n=Mo(e,t);return n<0?void 0:e[n][1]}function a5(t){return Mo(this.__data__,t)>-1}function l5(t,e){var n=this.__data__,r=Mo(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function vn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}vn.prototype.clear=n5,vn.prototype.delete=o5,vn.prototype.get=s5,vn.prototype.has=a5,vn.prototype.set=l5;var ui=Un(sn,"Map");function c5(){this.size=0,this.__data__={hash:new Zn,map:new(ui||vn),string:new Zn}}function h5(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function So(t,e){var n=t.__data__;return h5(e)?n[typeof e=="string"?"string":"hash"]:n.map}function d5(t){var e=So(this,t).delete(t);return this.size-=e?1:0,e}function u5(t){return So(this,t).get(t)}function f5(t){return So(this,t).has(t)}function p5(t,e){var n=So(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function Ln(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Ln.prototype.clear=c5,Ln.prototype.delete=d5,Ln.prototype.get=u5,Ln.prototype.has=f5,Ln.prototype.set=p5;var g5="Expected a function";function vl(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(g5);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(vl.Cache||Ln),n}vl.Cache=Ln;var m5=500;function y5(t){var e=vl(t,function(r){return n.size===m5&&n.clear(),r}),n=e.cache;return e}var v5=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,x5=/\\(\\)?/g,b5=y5(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(v5,function(n,r,i,o){e.push(i?o.replace(x5,"$1"):r||n)}),e});function w5(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var Su=Tn?Tn.prototype:void 0,Eu=Su?Su.toString:void 0;function Iu(t){if(typeof t=="string")return t;if(An(t))return w5(t,Iu)+"";if(Co(t))return Eu?Eu.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function fi(t){return t==null?"":Iu(t)}function _5(t,e){return An(t)?t:S4(t,e)?[t]:b5(fi(t))}function $5(t){if(typeof t=="string"||Co(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function P5(t,e){e=_5(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[$5(e[n++])];return n&&n==r?t:void 0}function Au(t,e,n){var r=t==null?void 0:P5(t,e);return r===void 0?n:r}function pi(t,e){if(e.length===0)return{};const n=Array.isArray(t)?t[e[0]]:t.items[e[0]];if(e.length===1)return n;const r=e.slice(1).map(i=>`children[${i}]`).join(".");return Au(n,r)}function Tu(t){const{structure:e,item:n,items:r}=t;return!(!e||!n||r.some(i=>!i))}function C5(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}function O5(t,e,n){var r=t.length;return n=n===void 0?r:n,!e&&n>=r?t:C5(t,e,n)}var M5="\\ud800-\\udfff",S5="\\u0300-\\u036f",E5="\\ufe20-\\ufe2f",I5="\\u20d0-\\u20ff",A5=S5+E5+I5,T5="\\ufe0e\\ufe0f",k5="\\u200d",L5=RegExp("["+k5+M5+A5+T5+"]");function ku(t){return L5.test(t)}function z5(t){return t.split("")}var Lu="\\ud800-\\udfff",H5="\\u0300-\\u036f",R5="\\ufe20-\\ufe2f",D5="\\u20d0-\\u20ff",N5=H5+R5+D5,j5="\\ufe0e\\ufe0f",W5="["+Lu+"]",xl="["+N5+"]",bl="\\ud83c[\\udffb-\\udfff]",F5="(?:"+xl+"|"+bl+")",zu="[^"+Lu+"]",Hu="(?:\\ud83c[\\udde6-\\uddff]){2}",Ru="[\\ud800-\\udbff][\\udc00-\\udfff]",B5="\\u200d",Du=F5+"?",Nu="["+j5+"]?",Y5="(?:"+B5+"(?:"+[zu,Hu,Ru].join("|")+")"+Nu+Du+")*",V5=Nu+Du+Y5,X5="(?:"+[zu+xl+"?",xl,Hu,Ru,W5].join("|")+")",G5=RegExp(bl+"(?="+bl+")|"+X5+V5,"g");function q5(t){return t.match(G5)||[]}function U5(t){return ku(t)?q5(t):z5(t)}function Z5(t){return function(e){e=fi(e);var n=ku(e)?U5(e):void 0,r=n?n[0]:e.charAt(0),i=n?O5(n,1).join(""):e.slice(1);return r[t]()+i}}var K5=Z5("toUpperCase");function Q5(t){return K5(fi(t).toLowerCase())}function J5(t,e,n,r){for(var i=-1,o=t==null?0:t.length;++i<o;)n=e(n,t[i],i,t);return n}function tw(t){return function(e){return t==null?void 0:t[e]}}var ew={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},nw=tw(ew),rw=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,iw="\\u0300-\\u036f",ow="\\ufe20-\\ufe2f",sw="\\u20d0-\\u20ff",aw=iw+ow+sw,lw="["+aw+"]",cw=RegExp(lw,"g");function hw(t){return t=fi(t),t&&t.replace(rw,nw).replace(cw,"")}var dw=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function uw(t){return t.match(dw)||[]}var fw=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function pw(t){return fw.test(t)}var ju="\\ud800-\\udfff",gw="\\u0300-\\u036f",mw="\\ufe20-\\ufe2f",yw="\\u20d0-\\u20ff",vw=gw+mw+yw,Wu="\\u2700-\\u27bf",Fu="a-z\\xdf-\\xf6\\xf8-\\xff",xw="\\xac\\xb1\\xd7\\xf7",bw="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ww="\\u2000-\\u206f",_w=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Bu="A-Z\\xc0-\\xd6\\xd8-\\xde",$w="\\ufe0e\\ufe0f",Yu=xw+bw+ww+_w,Vu="['’]",Xu="["+Yu+"]",Pw="["+vw+"]",Gu="\\d+",Cw="["+Wu+"]",qu="["+Fu+"]",Uu="[^"+ju+Yu+Gu+Wu+Fu+Bu+"]",Ow="\\ud83c[\\udffb-\\udfff]",Mw="(?:"+Pw+"|"+Ow+")",Sw="[^"+ju+"]",Zu="(?:\\ud83c[\\udde6-\\uddff]){2}",Ku="[\\ud800-\\udbff][\\udc00-\\udfff]",Sr="["+Bu+"]",Ew="\\u200d",Qu="(?:"+qu+"|"+Uu+")",Iw="(?:"+Sr+"|"+Uu+")",Ju="(?:"+Vu+"(?:d|ll|m|re|s|t|ve))?",tf="(?:"+Vu+"(?:D|LL|M|RE|S|T|VE))?",ef=Mw+"?",nf="["+$w+"]?",Aw="(?:"+Ew+"(?:"+[Sw,Zu,Ku].join("|")+")"+nf+ef+")*",Tw="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",kw="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Lw=nf+ef+Aw,zw="(?:"+[Cw,Zu,Ku].join("|")+")"+Lw,Hw=RegExp([Sr+"?"+qu+"+"+Ju+"(?="+[Xu,Sr,"$"].join("|")+")",Iw+"+"+tf+"(?="+[Xu,Sr+Qu,"$"].join("|")+")",Sr+"?"+Qu+"+"+Ju,Sr+"+"+tf,kw,Tw,Gu,zw].join("|"),"g");function Rw(t){return t.match(Hw)||[]}function Dw(t,e,n){return t=fi(t),e=e,e===void 0?pw(t)?Rw(t):uw(t):t.match(e)||[]}var Nw="['’]",jw=RegExp(Nw,"g");function rf(t){return function(e){return J5(Dw(hw(e).replace(jw,"")),t,"")}}var Ww=rf(function(t,e,n){return e=e.toLowerCase(),t+(n?Q5(e):e)});const Fw=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","-apple-system","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]);function Kn(t){const e=[];let n="",r=null;const i=()=>{const o=n.trim();o&&e.push(o),n=""};for(let o=0;o<t.length;o+=1){const s=t[o];if(r){n+=s,s===r&&(r=null);continue}if(s==='"'||s==="'"){r=s,n+=s;continue}if(s===","){i();continue}n+=s}return i(),e}function of(t){const e=t.trim();return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?e.slice(1,-1):e}function Bw(t){const e=t.trim();return e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")}function Yw(t){return/^\d/.test(t)||/\s/.test(t)}function Vw(t){const e=t.trim();if(!e||Bw(e)||Fw.has(e.toLowerCase())||!Yw(e))return e;const n=e.includes('"')&&!e.includes("'")?"'":'"';return`${n}${e}${n}`}function Er(t){const e=Kn(t);return e.length?e.length===1?of(e[0]):e.map(n=>of(n)).join(", "):""}function Qn(t){const e=Kn(t);return e.length?e.map(n=>Vw(n)).join(", "):t.trim()}const Xw={100:"thin",hairline:"thin",thin:"thin",200:"extralight",ultralight:"extralight",extralight:"extralight",300:"light",light:"light",400:"regular",normal:"regular",regular:"regular",500:"medium",medium:"medium",600:"semibold",demibold:"semibold",semibold:"semibold",700:"bold",bold:"bold",800:"extrabold",ultrabold:"extrabold",extrabold:"extrabold",900:"black",heavy:"black",black:"black",950:"extrablack",ultrablack:"extrablack",extrablack:"extrablack"};function sf(t){const e=String(t).toLowerCase();return Xw[e]||"regular"}function bt(t,e={}){const n=document.createElementNS("http://www.w3.org/2000/svg",t);return Qt(n,e),n}function Ir(t){const n=new DOMParser().parseFromString(t,"image/svg+xml");if(n.querySelector("parsererror"))throw new Error("Invalid SVG string");return n.documentElement}function Qt(t,e){Object.entries(e).forEach(([n,r])=>{r==null?t.removeAttribute(n):t.setAttribute(n,r)})}function De(t,e,n=!0){return e.reduce((r,i)=>{const o=t.getAttribute(i);return(!n||o!==null&&o!==""&&o!==void 0)&&(r[i]=o),r},{})}function Gw(t,e){e.forEach(n=>{t.removeAttribute(n)})}function Ar(t,e){if(e(t)===!1)return;Array.from(t.children).forEach(r=>{Ar(r,e)})}function Eo(t,e="infographic-defs"){const n=e?`defs#${e}`:"defs",r=t.querySelector(n);if(r)return r;const i=bt("defs");return e&&(i.id=e),t.prepend(i),i}var af=Object.getOwnPropertySymbols,qw=Object.prototype.hasOwnProperty,Uw=Object.prototype.propertyIsEnumerable,Zw=(t,e)=>{var n={};for(var r in t)qw.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&af)for(var r of af(t))e.indexOf(r)<0&&Uw.call(t,r)&&(n[r]=t[r]);return n};function Jn(t){return hf(t)?t.querySelector("span"):null}function Kw(t,e){const n=document.createElement("span"),r=bt("foreignObject",{overflow:"visible"});return r.appendChild(n),lf(r,{textContent:t,attributes:e}),r}function lf(t,e){const{textContent:n,attributes:r}=e;if(n!==void 0&&_l(t,n),!r)return;const i=Jn(t);let{width:o,height:s}=r;const a={};if(i){if(Object.assign(i.style,Jw(r)),!o||!s){const p=t6(i);!o&&!t.hasAttribute("width")&&(o=String(p.width)),!s&&!t.hasAttribute("height")&&(s=String(p.height))}const{"data-horizontal-align":u,"data-vertical-align":f}=r;Object.assign(i.style,Qw(u,f))}const{id:l,x:c,y:h}=r;l&&(a.id=l),c!==void 0&&(a.x=String(c)),h!==void 0&&(a.y=String(h)),o!==void 0&&(a.width=String(o)),s!==void 0&&(a.height=String(s)),Qt(t,a)}function Qw(t,e){const n={width:"100%",height:"100%",display:"flex",flexWrap:"wrap",wordBreak:"break-word",whiteSpace:"pre-wrap"};switch(t){case"LEFT":n.textAlign="left",n.justifyContent="flex-start";break;case"CENTER":n.textAlign="center",n.justifyContent="center";break;case"RIGHT":n.textAlign="right",n.justifyContent="flex-end";break}switch(e){case"TOP":n.alignContent="flex-start",n.alignItems="flex-start";break;case"MIDDLE":n.alignContent="center",n.alignItems="center";break;case"BOTTOM":n.alignContent="flex-end",n.alignItems="flex-end";break}return n}function Jw(t){const e=t,{x:n,y:r,width:i,height:o,["data-horizontal-align"]:s,["data-vertical-align"]:a,["font-size"]:l,["letter-spacing"]:c,["line-height"]:h,fill:u,["stroke-width"]:f,["text-anchor"]:p,["dominant-baseline"]:g,["font-family"]:y}=e,m=Zw(e,["x","y","width","height","data-horizontal-align","data-vertical-align","font-size","letter-spacing","line-height","fill","stroke-width","text-anchor","dominant-baseline","font-family"]),x={overflow:"visible"};return u&&(x.color=u),Object.entries(m).forEach(([v,b])=>{x[Ww(v)]=b}),l&&(x.fontSize=`${l}px`),h&&(x.lineHeight=typeof h=="string"&&h.endsWith("px")?h:+h),c&&(x.letterSpacing=`${c}px`),f&&(x.strokeWidth=`${f}px`),x.fontFamily=y?Qn(y):y||"",x}function t6(t){const e=t.parentNode;t.style.visibility="hidden",document.body.appendChild(t);const n=t.getBoundingClientRect();return e?e.appendChild(t):document.body.removeChild(t),t.style.visibility="visible",n}function wl(t){var e;return((e=Jn(t))==null?void 0:e.innerText)||""}function _l(t,e){const n=Jn(t);n&&(n.innerText=e)}function $l(t){const e=Jn(t);if(!e)return{};const{color:n,fontSize:r,fontFamily:i,justifyContent:o,alignContent:s,fontWeight:a}=e.style,[l,c]=e6(o,s),h={"data-horizontal-align":l,"data-vertical-align":c};return i&&(h["font-family"]=Er(i)),a&&(h["font-weight"]=a),r&&(h["font-size"]=String(parseInt(r))),n&&(h.fill=n),{attributes:h,textContent:wl(t)}}function e6(t,e){let n="LEFT",r="TOP";switch(t){case"flex-start":n="LEFT";break;case"center":n="CENTER";break;case"flex-end":n="RIGHT";break}switch(e){case"flex-start":r="TOP";break;case"center":r="MIDDLE";break;case"flex-end":r="BOTTOM";break}return[n,r]}const Me=(t,e)=>{var n;return((n=t==null?void 0:t.dataset)==null?void 0:n.elementType)===e},n6=t=>Me(t,"title"),r6=t=>Me(t,"desc"),i6=t=>Me(t,"shape"),o6=t=>Me(t,"shapes-group"),s6=t=>Me(t,"illus"),a6=t=>t instanceof SVGElement&&t.tagName==="text",l6=t=>t instanceof SVGElement&&t.tagName==="g",Pl=t=>Me(t,"item-icon"),cf=t=>Me(t,"item-icon-group"),c6=t=>Me(t,"item-label"),h6=t=>Me(t,"item-desc"),d6=t=>Me(t,"item-value"),u6=t=>Me(t,"item-illus"),f6=t=>Me(t,"edit-area"),p6=t=>Me(t,"btns-group"),g6=t=>Me(t,"rough-element"),m6=t=>Me(t,"rough-volume");function hf(t){return t.tagName==="foreignObject"}function y6(t){return t.tagName==="SPAN"}function xn(t){const e=Cl(t);return[zt.Title,zt.Desc,zt.ItemLabel,zt.ItemDesc].includes(e)}function df(t){if(!t||!xn(t))return!1;const e=Jn(t);return e?e.hasAttribute("contenteditable"):!1}function v6(t){const e=t.tagName.toLowerCase();return["rect","circle","ellipse","line","polygon","polyline","path"].includes(e)}function zn(t){return Pl(t)||cf(t)}function x6(t){let e=t;for(;e;){if(Tr(e,Sa))return!0;e=e.parentElement}return!1}function gi(t,e){t.setAttribute("data-element-type",e)}function Tr(t,e){return t.querySelector(`[data-element-type="${e}"]`)}function Cl(t){return zn(t)?zt.ItemIcon:t.getAttribute("data-element-type")||zt.Unknown}function b6(t){var e,n,r,i=t;function o(a,l){++e>i&&(r=n,s(1),++e),n[a]=l}function s(a){e=0,n=Object.create(null),a||(r=Object.create(null))}return s(),{clear:s,has:function(a){return n[a]!==void 0||r[a]!==void 0},get:function(a){var l=n[a];if(l!==void 0)return l;if((l=r[a])!==void 0)return o(a,l),l},set:function(a,l){n[a]!==void 0?n[a]=l:o(a,l)}}}var uf=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});const ff=globalThis.fetch,Ol=b6(1024),Ml=new Map;function w6(t){const e=Array.from(t.headers.entries());return e.length===0?"":(e.sort(([n],[r])=>n.toLowerCase().localeCompare(r.toLowerCase())),e.map(([n,r])=>`${n.toLowerCase()}:${r}`).join("|"))}function _6(t){const e=w6(t);return e?`${t.method}:${t.url}:${e}`:`${t.method}:${t.url}`}function pf(t){return new Response(t.body.slice(0),t.init)}function $6(t,e){return uf(this,null,function*(){try{const n=yield ff(t),i={body:yield n.arrayBuffer(),init:{status:n.status,statusText:n.statusText,headers:Array.from(n.headers.entries())}};return n.ok&&Ol.set(e,i),i}finally{Ml.delete(e)}})}function Io(t,e){return uf(this,null,function*(){const n=new Request(t,e);if(n.method!=="GET")return ff(n);const r=_6(n);if(Ol.has(r))return pf(Ol.get(r));let i=Ml.get(r);i||(i=$6(n,r),Ml.set(r,i));const o=yield i;return pf(o)})}function P6(t,e={title:"信息图标题",desc:"信息图描述",items:"信息图的内容项",label:"项目标签文本",value:"项目数值内容",icon:"项目图标",illus:"项目插图",children:"子级项目(多层结构)"}){const{structure:n,items:r}=t,i=[],o=l=>" ".repeat(l);function s(l,c,h){const u=e[l];return u?`${o(h)}/** ${u} */
5
- ${o(h)}${l}: ${c};`:`${o(h)}${l}: ${c};`}function a(l,c){const h=r[l],u=[];for(const f of h){const p=f==="value"?"number":"string";u.push(s(f,p,c+1))}return r[l+1]&&u.push(s("children",`Array<${a(l+1,c+1)}>`,c+1)),`{
6
- ${u.join(`
7
- `)}
8
- ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push(s("title","string",1)),i.push(s("desc","string",1))),n.includes("item")&&r.length>0&&i.push(s("items",`Array<${a(0,1)}>`,1)),i.push("}"),i.join(`
9
- `)}function gf(t){let e=0;if(t.length===0)return e.toString();for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return Math.abs(e).toString()}var C6=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});const kr=new WeakMap;function O6(t){const e=kr.get(t);return e?Array.from(e.values()):[]}function mf(t,e){var n;return(n=kr.get(t))==null?void 0:n.get(e)}function yf(t,e,n){let r=kr.get(t);return r||(r=new Map,kr.set(t,r)),r.set(e,n),n.finally(()=>{const i=kr.get(t);i&&(i.get(e)===n&&i.delete(e),i.size===0&&kr.delete(t))}),n}function M6(t){return C6(this,null,function*(){for(yield Promise.resolve();;){const e=O6(t);if(!e.length)break;yield Promise.allSettled(e),yield Promise.resolve()}})}var S6=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function E6(t){return t.startsWith("data:")}function mi(t){return S6(this,null,function*(){var e;if(!t||!E6(t))return null;const n=(e=t.match(/^data:([^;]+)/))==null?void 0:e[1];if(!n)return null;const r=()=>new Promise((c,h)=>{const u=new Image;u.onload=()=>{const f=u.naturalWidth,p=u.naturalHeight,g=document.createElement("canvas"),y=g.getContext("2d");if(!y)return c({width:f,height:p,hasAlpha:!1});if(["image/jpeg","image/jpg","image/webp","image/gif"].includes(n))return c({width:f,height:p,hasAlpha:!1});g.width=f,g.height=p,y.drawImage(u,0,0);let m=!1;const x=10;for(let v=0;v<f&&!m;v+=x)for(let b=0;b<p;b+=x)if(y.getImageData(v,b,1,1).data[3]<255){m=!0;break}c({width:f,height:p,hasAlpha:m})},u.onerror=()=>h(new Error("Failed to analysis image")),u.src=t}),{width:i,height:o,hasAlpha:s}=yield r(),l=(()=>{if(s||n!=null&&n.includes("image/gif")||n!=null&&n.includes("image/svg")||Math.min(i,o)<=200)return"xMidYMid meet";const h=i/o;return h>=.6&&h<=1.67||h<.3||h>3.33?"xMidYMid meet":"xMidYMid slice"})();return Ir(`
10
- <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${i} ${o}" preserveAspectRatio="${l}">
11
- <image href="${t}" width="${i}" height="${o}" />
12
- </symbol>`)})}function I6(t){const e=t.trim();return/^(?:<\?xml[^>]*>\s*)?<svg[\s>]/i.test(e)||e.startsWith("<symbol")}function Lr(t){if(!t||!I6(t))return null;const e=t.replace(/<svg(?=[\s/>])/i,"<symbol").replace(/<\/svg>/i,"</symbol>");return Ir(e)}var A6=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function T6(t){try{return!!new URL(t)}catch(e){return!1}}function k6(t,e){return!!(t.toLowerCase().includes("image/svg")||!t&&e==="svg")}function vf(t,e){return A6(this,null,function*(){if(!t||!T6(t))return null;const n=yield Io(t);if(!n.ok)throw new Error("Failed to load resource");const r=n.headers.get("Content-Type")||"";if(k6(r,e)){const s=yield n.text();return Lr(s)}const i=yield n.blob(),o=yield L6(i);return mi(o)})}function L6(t){return new Promise((e,n)=>{const r=new FileReader;r.onloadend=()=>{e(r.result)},r.onerror=n,r.readAsDataURL(t)})}var xf=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});const z6=t=>xf(null,null,function*(){var e;try{const n=new URLSearchParams({text:t,topK:"1"}),r=`${Sx}?${n.toString()}`,i=yield Io(r);if(!i.ok)return null;const o=yield i.json();return!(o!=null&&o.status)||!Array.isArray((e=o.data)==null?void 0:e.data)?null:o.data.data[0]||null}catch(n){return console.error(`Failed to query icon for "${t}":`,n),null}});function H6(t){return t.startsWith("data:")}function R6(t){const e=t.trim();return e.startsWith("<svg")||e.startsWith("<symbol")}function bf(t,e){return xf(this,null,function*(){var n;if(!t)return null;const r=yield z6(t);if(!r)return null;if(R6(r))return Lr(r);if(H6(r)){const i=((n=r.match(/^data:([^;]+)/))==null?void 0:n[1])||"",o=r.includes(";base64,");if(i==="image/svg+xml"&&!o){const s=r.indexOf(","),a=s>=0?r.slice(s+1):r;return Lr(a)}return mi(r)}return vf(r,e)})}let wf=null;function D6(t){wf=t}function N6(){return wf}function j6(t){if(!t.startsWith("data:"))return null;const e=t.indexOf(",");if(e===-1)return null;const n=t.slice(5,e),r=t.slice(e+1),i=n.split(";"),o=i[0],s=i.includes("base64");return o==="image/svg+xml"&&!s?{source:"inline",format:"svg",encoding:"raw",data:r.startsWith("%3C")?decodeURIComponent(r):r}:o.startsWith("image/")?{source:"inline",format:o==="image/svg+xml"?"svg":"image",encoding:s?"base64":"data-uri",data:t}:null}const W6=new Set(["svg","png","jpg","jpeg","webp","gif"]);function F6(t){const e=t.trim();return e.startsWith("<svg")||e.startsWith("<symbol")}function B6(t){const e=t.toLowerCase();if(e.endsWith(".svg")||e.includes(".svg?"))return"svg";if(e.endsWith(".png")||e.endsWith(".jpg")||e.endsWith(".jpeg")||e.endsWith(".webp")||e.endsWith(".gif"))return"image"}function Y6(t){var e;if(!t.startsWith("ref:"))return null;const n=t.slice(4),[r,...i]=n.split(":");if(!r||i.length===0)return null;let o;i.length>1&&W6.has(i[0].toLowerCase())&&(o=(e=i.shift())==null?void 0:e.toLowerCase());const s=i.join(":");if(!s)return null;const a=r==="url"?"remote":r;return a==="remote"?{source:"remote",format:o||B6(s)||void 0,data:s}:a==="search"?{source:"search",format:o||"svg",data:s}:a==="svg"?{source:"inline",format:"svg",data:s,encoding:"raw"}:{source:"custom",data:t,format:o}}function Ao(t){if(!t)return null;if(typeof t!="string"){if(t.source)return t;const r=t;return r.type==="image"?{source:"inline",format:"image",data:r.data}:r.type==="svg"?{source:"inline",format:"svg",encoding:"raw",data:r.data}:r.type==="remote"?{source:"remote",format:r.format,data:r.data}:r.type==="search"?{source:"search",format:r.format||"svg",data:r.data}:r.type==="custom"?{source:"custom",data:r.data}:null}const e=j6(t);if(e)return e;const n=Y6(t);return n||(F6(t)?{source:"inline",format:"svg",encoding:"raw",data:t}:{source:"custom",data:t})}function Sl(t){const e=typeof t=="string"?Ao(t):t;return e?"rsc-"+gf(JSON.stringify(e)):null}function _f(t){const e=Sl(t);return e?`#${e}`:null}var El=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function V6(t,e,n){return El(this,null,function*(){const r=Ao(e);if(!r)return null;r.scene||(r.scene=t);const{source:i,data:o,format:s,encoding:a}=r;let l=null;try{if(i==="inline"){const c=o.startsWith("data:");s==="svg"&&a==="raw"?l=Lr(o):s==="svg"&&c?l=yield mi(o):c||s==="image"?l=yield mi(o):l=Lr(o)}else if(i==="remote")l=yield vf(o,s);else if(i==="search")l=yield bf(o,s);else{const c=N6();c&&(l=yield c(r))}}catch(c){l=null}return l||(yield bf(X6(r,t,n),s))})}const $f=new Map,To=new WeakMap;function Pf(t,e,n,r){return El(this,null,function*(){if(!t)return null;const i=Ao(n);if(!i)return null;const o=Sl(i),s=`resource:${o}`,a=To.get(t);if(a!=null&&a.has(o))return o;const l=mf(t,s);if(l)return yield l;const c=El(null,null,function*(){const h=$f.has(o)?$f.get(o)||null:yield V6(e,i,r);if(!h)return null;To.has(t)||To.set(t,new Map);const u=To.get(t);if(u.has(o))return o;const f=Eo(t);return h.id=o,f.appendChild(h),u.set(o,h),o});return yf(t,s,c),yield c})}function X6(t,e,n){const r=e==="illus"?"illustration":"icon",i=Il(n==null?void 0:n.label)||Il(n==null?void 0:n.desc);if(i)return i;const o=Il(t.data);return!o||t.source==="inline"||o.startsWith("data:")||o.startsWith("<svg")||o.startsWith("<symbol")?r:o}function Il(t){if(typeof t!="string")return null;const e=t.trim();return e||null}var G6=Object.defineProperty,q6=Object.defineProperties,U6=Object.getOwnPropertyDescriptors,Cf=Object.getOwnPropertySymbols,Z6=Object.prototype.hasOwnProperty,K6=Object.prototype.propertyIsEnumerable,Of=(t,e,n)=>e in t?G6(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Q6=(t,e)=>{for(var n in e||(e={}))Z6.call(e,n)&&Of(t,n,e[n]);if(Cf)for(var n of Cf(e))K6.call(e,n)&&Of(t,n,e[n]);return t},J6=(t,e)=>q6(t,U6(e));const t_=new WeakMap;function e_(t,e={}){const n=bt("use",J6(Q6({},e),{href:_f(t)}));return Mf(n),t_.set(n,t),n}function Mf(t){const{stroke:e,fill:n}=De(t,["fill","stroke"]);t.style.color=n||e||"currentColor"}function ko(t){return t.tagName==="use"?t:t.querySelector("use")}function Al(t){const e=ko(t);return e?De(e,["width","height","x","y","width","height","fill","fill-opacity","stroke","opacity"]):{}}function n_(t,e,n){const r=ko(t);r&&(n&&Qt(r,n),Mf(r))}const r_=",",i_=(t,e=r_)=>t.split(e).map(n=>parseInt(n,10)),Sf=t=>i_(t);function Tl(...t){return t.map(e=>e.replace(/^\/+|\/+$/g,"")).filter(e=>e.trim().length>0).join("/")}const Lo=new Map;let o_="sans-serif";const s_={fontFamily:"sans-serif",fontWeight:400,fontStyle:"normal",unitsPerEm:2048,metrics:{ascender:2189,descender:-555,lineGap:0},glyphs:{'"':727,"%":1821,"'":391,"(":682,")":682,"*":797,"+":1196,"-":682,"<":1196,"=":1196,">":1196,"@":2079,C:1479,D:1479,F:1251,G:1593,H:1479,J:1024,M:1706,N:1479,O:1593,Q:1593,R:1479,T:1251,U:1479,W:1933,Z:1251,"^":961,_:1024,"`":682,c:1024,i:455,j:455,k:1024,l:455,m:1706,r:682,s:1024,v:1024,w:1479,x:1024,y:1024,z:1024,"{":684,"|":532,"}":684,"~":1196},glyphsByWidth:{569:" !,./:;I[\\]ft",1139:"#$0123456789?Labdeghnopqu",1366:"&ABEKPSVXY"},defaultWidth:1139};function Ef(t){if(t===void 0||t==="normal")return"400";if(t==="bold")return"700";const e={thin:"100",hairline:"100","extra-light":"200","ultra-light":"200",light:"300",regular:"400",normal:"400",medium:"500","semi-bold":"600",semibold:"600","demi-bold":"600",demibold:"600","extra-bold":"800",extrabold:"800","ultra-bold":"800",ultrabold:"800",black:"900",heavy:"900","extra-black":"950",extrablack:"950","ultra-black":"950",ultrablack:"950",bolder:"900",lighter:"300"};if(typeof t=="string"){const n=t.toLowerCase();return e[n]||t}return String(t)}function If(t){return t||"normal"}function a_(t){const e=t.fontFamily,n=Ef(t.fontWeight),r=If(t.fontStyle);if(t.glyphsByWidth){const s=Ce({},t.glyphs||{});for(const[a,l]of Object.entries(t.glyphsByWidth))if(typeof l=="string"){const c=Number(a);for(const h of l)s[h]=c}else s[a]=l;t=He(Ce({},t),{glyphs:s,glyphsByWidth:void 0})}Lo.has(e)||Lo.set(e,new Map);const i=Lo.get(e);i.has(n)||i.set(n,new Map),i.get(n).set(r,t)}function l_(t,e,n){const r=t||o_,i=Ef(e),o=If(n),s=Lo.get(r);if(!s)return console.warn(`Font family "${r}" not registered, using fallback font data`),s_;let a=s.get(i);if(a){let c=a.get(o);if(c||o!=="normal"&&(c=a.get("normal"),c))return c;const h=a.values().next().value;if(h)return h}if(a=s.get("400"),a){let c=a.get(o);if(c||o!=="normal"&&(c=a.get("normal"),c))return c;const h=a.values().next().value;if(h)return h}const l=s.values().next().value;if(l){const c=l.values().next().value;if(c)return c}throw new Error(`No font data found for family "${r}" with weight "${i}" and style "${o}"`)}function c_(t,e){if(!e||e==="none")return t;switch(e){case"uppercase":return t.toUpperCase();case"lowercase":return t.toLowerCase();case"capitalize":return t.split(" ").map(n=>n.length===0?n:n[0].toUpperCase()+n.slice(1).toLowerCase()).join(" ");default:return t}}function Af(t){if(t===void 0)return 14;if(typeof t=="number")return t;const e=parseFloat(t);return isNaN(e)?16:e}function h_(t,e){const n=Af(t.fontSize),r=t.lineHeight;if(r===void 0){const{ascender:i,descender:o,lineGap:s=0}=e.metrics;return(i-o+s)/e.unitsPerEm*n}return typeof r=="number"?r*n:r.type==="pixel"?r.value:r.type==="percent"?r.value/100*n:n}function d_(t,e={}){var f;const n=c_(t,e.textTransform),r=l_(e.fontFamily,e.fontWeight,e.fontStyle),i=Af(e.fontSize),o=e.letterSpacing||0,s=e.wordSpacing||0;let a=0;const l=Array.from(n);for(let p=0;p<l.length;p++){const g=l[p],y=p<l.length-1?l[p+1]:void 0;let m=(f=r.glyphs)==null?void 0:f[g];m===void 0&&(m=r.defaultWidth||r.unitsPerEm/2);const x=m/r.unitsPerEm*i;if(a+=x,y&&r.kerning){const v=g+y,b=r.kerning[v];b!==void 0&&(a+=b/r.unitsPerEm*i)}p<l.length-1&&(a+=o),g===" "&&(a+=s)}const c=h_(e,r),{ascender:h}=r.metrics,u=h/r.unitsPerEm*i;return{width:a,height:c,baseline:u}}const u_={fontFamily:"Alibaba PuHuiTi",fontWeight:400,fontStyle:"normal",unitsPerEm:1e3,metrics:{ascender:1060,descender:-340,lineGap:0},glyphs:{" ":257,"!":361,'"':405,"#":600,"%":821,"&":640,"'":253,"(":359,")":359,"*":430,",":302,"-":440,".":302,"/":500,":":378,";":378,"?":431,"@":860,B:620,C:599,D:699,F:527,G:685,H:708,J:271,K:614,L:507,M:830,N:737,P:597,R:614,S:566,T:528,V:617,W:898,X:624,Y:594,Z:626,"[":294,"\\":510,"]":294,_:500,"`":346,b:635,c:497,d:635,f:349,g:636,k:518,l:286,m:921,p:635,q:636,r:379,s:479,t:337,v:526,w:828,x:516,y:527,z:506,"{":299,"|":183,"}":299," ":257,"¡":357,"¦":183,"§":479,"¨":346,"©":806,ª:483,"«":511,"­":440,"®":404,"¯":346,"°":363,"´":346,"¶":593,"·":357,"¸":346,º:445,"»":511,"¼":902,"½":914,"¾":902,"¿":431,Æ:889,Ç:599,Ð:719,Ñ:737,Ý:594,Þ:597,ß:610,æ:926,ç:497,ý:527,þ:635,ÿ:527,Ć:599,ć:497,Ĉ:599,ĉ:497,Ċ:599,ċ:497,Č:599,č:497,Ď:699,ď:640,Đ:719,đ:635,Ĝ:685,ĝ:636,Ğ:685,ğ:636,Ġ:685,ġ:636,Ģ:685,ģ:636,Ĥ:708,Ħ:708,IJ:545,ij:536,Ĵ:271,Ķ:614,ķ:518,ĸ:518,Ĺ:507,ĺ:286,Ļ:507,ļ:286,Ľ:507,ľ:290,Ŀ:507,ŀ:291,Ł:507,ł:286,Ń:737,Ņ:737,Ň:737,ʼn:669,Ŋ:737,Œ:987,œ:917,Ŕ:614,ŕ:379,Ŗ:614,ŗ:379,Ř:614,ř:379,Ś:566,ś:479,Ŝ:566,ŝ:479,Ş:566,ş:479,Š:566,š:479,Ţ:528,ţ:337,Ť:528,ť:340,Ŧ:528,ŧ:337,Ŵ:898,ŵ:828,Ŷ:594,ŷ:527,Ÿ:594,Ź:626,ź:506,Ż:626,ż:506,Ž:626,ž:506,ſ:310,Ə:719,ǎ:608,ǐ:265,ǒ:614,ǔ:609,ǖ:609,ǘ:609,ǚ:609,ǜ:609,Ǽ:889,ǽ:926,Ș:566,ș:479,Ț:528,ț:337,"ʹ":255,"͵":255,";":378,"΄":346,"΅":346,Ά:670,"·":357,Έ:628,Ή:779,Ί:346,Ό:765,Ύ:726,Ώ:765,ΐ:312,Β:620,Γ:507,Ζ:626,Η:708,Κ:614,Λ:617,Μ:830,Ν:737,Π:708,Ρ:597,Σ:596,Τ:528,Υ:594,Φ:831,Χ:624,Ψ:804,Ϋ:594,έ:509,ή:643,ί:312,ΰ:593,β:610,γ:526,ε:509,ζ:465,η:643,θ:638,ι:312,κ:518,λ:514,ν:526,ξ:465,π:616,ρ:619,ς:497,σ:639,τ:437,υ:593,φ:774,χ:509,ψ:745,ω:782,ϊ:312,ϋ:593,ύ:593,ώ:782,"‐":440,"‑":440,"–":495,"—":684,"―":684,"‗":500,"‘":270,"’":270,"‚":270,"‛":270,"“":784,"”":784,"„":468,"†":500,"‡":500,"•":308,"…":1085,"‰":1174,"′":256,"″":472,"‴":689,"‵":256,"‶":472,"‷":689,"‹":312,"›":312,"‼":589,"‽":433,"‾":500,"⁄":120,"⁺":407,"⁻":407,"⁼":407,"⁽":225,"⁾":225,ⁿ:486,"₊":407,"₋":407,"₌":407,"₍":225,"₎":225,"ₙ":486,"₡":599,"₣":527,"₤":600,"₥":921,"₦":625,"₨":1093,"₩":769,"₪":754,"₫":635,"₭":614,"₮":528,"₯":1288,"₰":950,"₲":685,"₴":576,"₵":599,"₶":576,"₷":700,"₸":528,"₻":750,"₼":683,"₾":577,"₿":620,"℃":915,"℅":825,"℉":868,ℓ:385,"№":1176,"℗":806,"℡":1022,"™":903,"℮":903,"⅛":930,"⅜":931,"⅝":931,"⅞":871,"Ⅶ":1166,"∂":587,"∈":663,"∏":708,"∑":596,"√":604,"∞":679,"∧":617,"∫":531,"∮":654,"≈":600,"≒":662,"◊":600," ":0,"〞":472},glyphsByWidth:{268:"ijìíîïĩīĭįıĵȷ",274:"IÌÍÎÏĨĪĬĮİΙΪ",406:"²³¹⁰⁴⁵⁶⁷⁸⁹₀₁₂₃₄₅₆₇₈₉",552:"+<=>^~¬±×÷−∕∙≠≤≥≦≧≮≯",556:"EÈÉÊËĒĔĖĘĚΕΞ",575:"$0123456789¢£¤¥ƒ₢₧€₱₹₺₽",578:"eèéêëēĕėęě",612:"aàáâãäåāăąǻ",613:"uµùúûüũūŭůűųάαμ∨",618:"hnoðñòóôõöøĥħńņňŋōŏőǿδοό",667:"AÀÁÂÃÄÅĀĂĄǺΑΔ₳∆",701:"UÙÚÛÜŨŪŬŮŰŲ",743:"OQÒÓÔÕÖØŌŎŐǾΘΟΩΩ",1e3:"─━│┃┄┅┆┇┈┉┊┋┌┍┎┏┐┑┒┓└┕┖┗┘┙┚┛├┝┞┟┠┡┢┣┤┥┦┧┨┩┪┫┬┭┮┯┰┱┲┳┴┵┶┷┸┹┺┻┼┽┾┿╀╁╂╃╄╅╆╇╈╉╊╋═║╒╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡╢╣╤╥╦╧╨╩╪╫╬╭╮╯╰╱╲╳▁▂▃▄▅▆▇█▉▊▋▌▍▎▏▓▔▕■□▲△▼▽◆◇○◎●◢◣◤◥★☆☉♀♂〾"},defaultWidth:984,kerning:{'""':-56,"\"'":-57,'",':-179,'".':-179,"'\"":-56,"''":-57,"',":-179,"'.":-179,"(j":60,',"':-160,",'":-160,",1":-140,",7":-41,",9":-39,'."':-160,".'":-160,".1":-140,".7":-41,".9":-39,"//":-120,"1,":-99,"1.":-99,"1:":-99,"1;":-99,"7,":-160,"7.":-160,"7:":-99,"7;":-99,":1":-79,":7":-59,";1":-79,";7":-59,'A"':-100,"A'":-100,AC:-20,AG:-20,AO:-20,AQ:-20,AT:-80,AU:-10,AV:-70,AW:-39,AY:-81,Af:-20,Al:-10,At:-20,Av:-20,Ay:-20,BC:-10,BG:-10,BO:-10,BQ:-10,BT:-40,BV:-20,BX:-20,BY:-21,"D,":-59,"D.":-59,DA:-20,DT:-36,DV:-30,DW:-19,DX:-20,DY:-40,DZ:-20,Da:-39,Ej:19,"F,":-159,"F.":-159,FA:-40,Fa:-59,Fh:1,Fk:1,GV:-11,GY:-21,JJ:7,KA:-19,KC:-20,KG:-20,KO:-20,KQ:-20,KT:-19,KU:-39,KV:-39,KW:-39,KY:-40,Kc:-39,Kd:-39,Ke:-39,Kg:-39,Kl:-39,Ko:-39,Kq:-39,Ks:-19,Kt:-10,Ku:-40,Kv:-60,Kw:-40,Ky:-60,'L"':-99,"L'":-99,LA:20,LC:-59,LG:-59,LO:-59,LQ:-59,LT:-79,LU:-19,LV:-79,LW:-39,LY:-100,Lv:-41,Lw:-21,Ly:-41,"O,":-59,"O.":-59,OA:-20,OT:-36,OV:-30,OW:-19,OX:-20,OY:-40,OZ:-20,Oa:-39,"P,":-199,"P.":-199,PA:-60,PT:-29,PV:-10,PW:-10,PX:-50,PY:-20,PZ:-39,Pa:-60,"Q,":-59,"Q.":-59,QA:-20,QJ:7,QT:-36,QV:-30,QW:-19,QX:-20,QY:-40,QZ:-20,Qa:-39,RC:-15,RG:-15,RO:-15,RQ:-15,RT:-40,RU:-10,RV:-21,RW:-10,RX:-29,RY:-41,Rc:-20,Rd:-20,Re:-20,Rg:-20,Ro:-20,Rq:-20,Rt:-20,Ru:-10,Rv:-10,Rx:20,Ry:-10,"S,":-20,"S.":-20,SS:-1,ST:-1,SV:-21,SW:-10,SY:-21,St:-1,Sv:-20,Sw:-10,Sx:-1,Sy:-20,'T"':2,"T'":2,"T,":-154,"T.":-154,TA:-80,TC:-20,TG:-20,TO:-20,TQ:-20,TS:-1,Ta:-80,Tc:-59,Td:-59,Te:-59,Tg:-59,Ti:-20,Tj:-19,Tm:-59,Tn:-59,To:-59,Tp:-58,Tq:-59,Tr:-59,Ts:-60,Tt:20,Tu:-79,Tv:-39,Tw:-19,Tx:-39,Ty:-39,Tz:-59,UA:-10,UX:-19,Ux:-1,"V,":-140,"V.":-140,"V:":-41,"V;":-41,VA:-70,VC:-30,VG:-30,VO:-30,VQ:-30,VS:-10,Va:-41,Vc:-21,Vd:-21,Ve:-21,Vg:-21,Vh:1,Vk:1,Vo:-21,Vq:-21,Vs:-21,Vv:-1,Vy:-1,"W,":-79,"W.":-79,"W:":-39,"W;":-39,WA:-40,WC:-19,WG:-19,WO:-19,WQ:-19,Wa:-40,Wc:-20,Wd:-20,We:-20,Wg:-20,Wo:-20,Wq:-20,Ws:-20,XA:-19,XC:-20,XG:-20,XO:-20,XQ:-20,XT:-19,XU:-39,XV:-39,XW:-39,XY:-40,Xc:-39,Xd:-39,Xe:-39,Xg:-39,Xl:-39,Xo:-39,Xq:-39,Xs:-19,Xt:-10,Xu:-40,Xv:-60,Xw:-40,Xy:-60,'Y"':1,"Y'":1,"Y,":-141,"Y.":-141,"Y:":-60,"Y;":-60,YA:-81,YC:-40,YG:-40,YO:-40,YQ:-40,YS:-1,Ya:-101,Yc:-60,Yd:-60,Ye:-60,Yf:-1,Yg:-60,Yh:1,Yi:-19,Yk:1,Ym:-41,Yn:-41,Yo:-60,Yp:-40,Yq:-60,Yr:-41,Ys:-61,Yt:-1,Yu:-40,Yv:-40,Yx:-41,Yy:-40,Yz:-41,ZC:-20,ZG:-20,ZO:-20,ZQ:-20,"[j":80,aT:-60,aV:-21,aY:-61,av:-10,aw:-10,ay:-10,"b,":-40,"b.":-40,bT:-59,bV:-21,bW:-20,bX:-39,bY:-60,bv:-10,bx:-20,by:-10,"e,":-20,"e.":-20,eT:-59,eY:-40,ej:20,'f"':3,"f'":3,"f)":1,"f*":61,"f,":-1,"f.":-1,"f?":40,fT:40,fV:21,fW:21,fX:21,fY:1,"f]":21,fa:-29,fc:-19,fd:-19,fe:-19,ff:1,fg:-39,fh:-19,fi:-19,fj:-19,fk:-19,fl:-19,fo:-19,fq:-19,fs:-19,ft:1,"f}":3,hT:-58,hY:-39,hv:-10,hy:-10,'i"':2,"i'":2,"i)":2,"i?":3,iT:-20,"i]":41,"i}":22,jT:-20,kT:-39,kU:-1,kW:-20,ka:-20,kc:-20,kd:-20,ke:-20,kg:-20,kl:-20,ko:-20,kq:-20,ku:-10,lf:-20,lv:-19,lw:-10,ly:-19,mT:-58,mY:-39,mv:-10,my:-10,nT:-58,nY:-39,nv:-10,ny:-10,"o,":-40,"o.":-40,oT:-59,oV:-21,oW:-20,oX:-39,oY:-60,ov:-10,ox:-20,oy:-10,"p,":-40,"p.":-40,pT:-59,pV:-21,pW:-20,pX:-39,pY:-60,pv:-10,px:-20,py:-10,qT:-19,qY:-19,qj:20,'r"':2,"r'":2,"r,":-90,"r.":-90,ra:-49,rc:-19,rd:-19,re:-19,rf:1,ro:-19,rq:-19,rt:20,sT:-59,sV:-21,sW:-20,sX:-19,sY:-60,sv:-19,sx:-10,sy:-19,tf:1,uT:-40,uY:-19,"v,":-90,"v.":-90,vT:-39,vX:-39,va:-35,vc:-10,vd:-10,ve:-10,vo:-10,vq:-10,"w,":-50,"w.":-50,wT:-19,wX:-39,wa:-30,xT:-39,xU:-1,xW:-20,xa:-20,xc:-20,xd:-20,xe:-20,xg:-20,xl:-20,xo:-20,xq:-20,xu:-10,"y,":-90,"y.":-90,yT:-39,yX:-39,ya:-35,yc:-10,yd:-10,ye:-10,yo:-10,yq:-10,zT:-59,"{h":2,"{j":79,"{k":2}};var f_=Object.defineProperty,Tf=Object.getOwnPropertySymbols,p_=Object.prototype.hasOwnProperty,g_=Object.prototype.propertyIsEnumerable,kf=(t,e,n)=>e in t?f_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,m_=(t,e)=>{for(var n in e||(e={}))p_.call(e,n)&&kf(t,n,e[n]);if(Tf)for(var n of Tf(e))g_.call(e,n)&&kf(t,n,e[n]);return t};const kl=new Map;let Ll="Alibaba PuHuiTi";function zl(t){const e=Kn(t);for(const n of e){const r=kl.get(Er(n));if(r)return r}return null}function Hl(){return Array.from(kl.values())}function y_(t){Ll=Qn(t)}function Lf(t){const e=m_({},t);return kl.set(e.fontFamily,e),e.fontFamily=Qn(e.fontFamily),e}function zf(t){const e=Kn(t).flatMap(n=>{const r=zl(n);if(!r)return[];const{baseUrl:i,fontWeight:o}=r;return Object.values(o).filter(s=>!!s).map(s=>Tl(i,s))});return Array.from(new Set(e))}function v_(t,e){const n=Kn(t);let r=null;for(const s of n)if(r=zl(s),r)break;if(!r)return null;const i=sf(e),o=r.fontWeight[i];return o?Tl(r.baseUrl,o.replace(/\/result.css$/,"")):null}const Rl=new WeakMap,yi=new WeakMap;function Hf(t,e,n){let r=yi.get(t);return r||(r=new Map,yi.set(t,r)),r.set(e,n),n.finally(()=>{const i=yi.get(t);i&&(i.get(e)===n&&i.delete(e),i.size===0&&yi.delete(t))}),n}function x_(t){if(t.getAttribute("data-infographic-font-loaded")==="true")return!0;try{return!!t.sheet}catch(e){return!1}}function b_(t,e,n){var r;const i=(r=yi.get(t))==null?void 0:r.get(e);if(i)return i;if(!n||x_(n))return Hf(t,e,Promise.resolve());const o=new Promise(s=>{const a=()=>{n.setAttribute("data-infographic-font-loaded","true"),s()};n.addEventListener("load",a,{once:!0}),n.addEventListener("error",a,{once:!0})});return Hf(t,e,o)}function w_(t,e){const n=t.ownerDocument,r=(n==null?void 0:n.head)||document.head;if(!r)return;Rl.has(r)||Rl.set(r,new Map);const i=Rl.get(r),o=zf(e);if(!o.length)return;const s=[];o.forEach(a=>{const l=`${e}-${a}`,c=`font:${l}`;if(mf(t,c))return;let h=i.get(l);h||(h=n.createElement("link"),h.id=l,h.rel="stylesheet",h.href=a,s.push(h),i.set(l,h));const u=b_(r,l,h);yf(t,c,u)}),s.length&&r.tagName==="HEAD"&&s.forEach(a=>r.appendChild(a))}function __(t){Hl().forEach(n=>w_(t,n.fontFamily))}const vi="https://assets.antv.antgroup.com",zr=t=>`${t}/result.css`;[{fontFamily:"Alibaba PuHuiTi",name:"阿里巴巴普惠体",baseUrl:vi,fontWeight:{regular:zr("AlibabaPuHuiTi-Regular"),bold:zr("AlibabaPuHuiTi-Bold")}},{fontFamily:"Source Han Sans",name:"黑体",baseUrl:vi,fontWeight:{regular:zr("SourceHanSansCN-Regular")}},{fontFamily:"Source Han Serif",name:"宋体",baseUrl:vi,fontWeight:{regular:zr("SourceHanSerifCN-Regular")}},{fontFamily:"LXGW WenKai",name:"楷体",baseUrl:vi,fontWeight:{regular:zr("LXGWWenKai-Regular")}},{fontFamily:"851tegakizatsu",name:"手写体",baseUrl:vi,fontWeight:{regular:zr("851tegakizatsu-Regular")}}].forEach(Lf);const Dl=new Map;function Nl(t,e){Dl.set(t,e)}function Rf(t){return Dl.get(t)}function $_(){return Object.fromEntries(Dl)}Nl("antv",["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F","#70CAF8"]),Nl("spectral",(t,e,n)=>{const r=[["#fc8d59","#ffffbf","#99d594"],["#d7191c","#fdae61","#abdda4","#2b83ba"],["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]],i=Math.min(Math.max(n,3),11);return r[i-3][e%i]});const zo=(t=[],e,n)=>{var r;const i=typeof t=="string"?Rf(t)||[]:t,o=(r=e[0])!=null?r:0;if(typeof i=="function"){const s=n?o/n:0;return i(s,o,n!=null?n:0)}if(Array.isArray(i))return i.length===0?void 0:i[o%i.length]};function P_(t,e){var n,r;if(((n=e.svg)==null?void 0:n.background)===!1)return;const{themeConfig:{colorBg:i}}=e;if(!i)return;const o=t.parentElement;o&&(o.style.backgroundColor=i||"none");const s=Tr(t,zt.Background);if(t.style.backgroundColor=i,s)s.setAttribute("fill",i);else if((r=t.viewBox)!=null&&r.baseVal){const{x:a,y:l,width:c,height:h}=t.viewBox.baseVal,u=bt("rect",{x:a,y:l,width:c,height:h,fill:i,"data-element-type":zt.Background});t.prepend(u)}}function xi(t,e){return Object.entries(e).reduce((r,[i,o])=>{if(typeof o=="function"){const s=o(t.getAttribute(i),t);s!=null&&(r[i]=s)}else Object.assign(r,{[i]:o});return r},{})}function Df(t){return t.replace(/#|%|\.| |\/|\(|\)/g,"").replace(/,/g,"-")}function C_(t,e){e&&Object.keys(e).length>0&&Ar(t,n=>{const r=xi(n,e);Qt(n,r)})}const Nf="btn-add-icon",jf="btn-remove-icon";function O_(t,e){Qt(e,{display:"none"});const n=e.querySelectorAll('[id^="btn-add-"]'),r=e.querySelectorAll('[id^="btn-remove-"]');S_(t),n.forEach(E_),r.forEach(I_)}const M_="btn-icon-defs";function S_(t){const e=bt("defs");gi(e,M_);const n=Ir(`<symbol class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200">
1
+ (function(V,dt){typeof exports=="object"&&typeof module!="undefined"?dt(exports):typeof define=="function"&&define.amd?define(["exports"],dt):(V=typeof globalThis!="undefined"?globalThis:V||self,dt(V.AntVInfographic={}))})(this,(function(V){"use strict";var pae=Object.defineProperty,gae=Object.defineProperties;var mae=Object.getOwnPropertyDescriptors;var wS=Object.getOwnPropertySymbols;var yae=Object.prototype.hasOwnProperty,vae=Object.prototype.propertyIsEnumerable;var Qo=Math.pow,PS=(V,dt,un)=>dt in V?pae(V,dt,{enumerable:!0,configurable:!0,writable:!0,value:un}):V[dt]=un,Tt=(V,dt)=>{for(var un in dt||(dt={}))yae.call(dt,un)&&PS(V,un,dt[un]);if(wS)for(var un of wS(dt))vae.call(dt,un)&&PS(V,un,dt[un]);return V},Kt=(V,dt)=>gae(V,mae(dt));var dt=typeof document!="undefined"?document.currentScript:null;const CS={version:"0.2.8"},il=new Map;function pm(e,t){il.set(e,t)}function gm(e){return il.get(e)}function OS(){return Array.from(il.keys())}var SS=Object.defineProperty,mm=Object.getOwnPropertySymbols,MS=Object.prototype.hasOwnProperty,ES=Object.prototype.propertyIsEnumerable,ym=(e,t,n)=>t in e?SS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vm=(e,t)=>{for(var n in t||(t={}))MS.call(t,n)&&ym(e,n,t[n]);if(mm)for(var n of mm(t))ES.call(t,n)&&ym(e,n,t[n]);return e};const qi={edgeType:"curved",edgeColorMode:"gradient",edgeWidth:2,colorMode:"branch",levelGap:80,nodeGap:18},ji={edgeType:"curved",edgeWidth:2,edgeColorMode:"gradient",colorMode:"level",levelGap:80,nodeGap:18},bm={type:"lined-text",usePaletteColor:!0,showUnderline:!0,underlineThickness:2},_m={type:"capsule-item"},xm={type:"circular-progress"},wm={type:"rounded-rect-node",positionH:"center"},Pm={type:"compact-card"},IS=(e,t)=>vm(vm({type:"hierarchy-mindmap"},t!==void 0?{edgeAlign:t}:{}),e),wn=(e,t,n,r)=>[e,{design:{structure:IS(t,r),item:n}}],AS=Object.fromEntries([wn("hierarchy-mindmap-branch-gradient-lined-palette",qi,bm,"bottom"),wn("hierarchy-mindmap-level-gradient-lined-palette",ji,bm,"bottom"),wn("hierarchy-mindmap-branch-gradient-capsule-item",qi,_m),wn("hierarchy-mindmap-level-gradient-capsule-item",ji,_m),wn("hierarchy-mindmap-branch-gradient-circle-progress",qi,xm,.4),wn("hierarchy-mindmap-level-gradient-circle-progress",ji,xm,.4),wn("hierarchy-mindmap-branch-gradient-rounded-rect",qi,wm),wn("hierarchy-mindmap-level-gradient-rounded-rect",ji,wm),wn("hierarchy-mindmap-branch-gradient-compact-card",qi,Pm),wn("hierarchy-mindmap-level-gradient-compact-card",ji,Pm)]),TS={"hierarchy-structure":{design:{title:"default",structure:{type:"hierarchy-structure"},item:"simple"}},"hierarchy-structure-mirror":{design:{title:"default",structure:{type:"hierarchy-structure",layerLabelPosition:"right"},item:"simple"}}};var kS=Object.defineProperty,$m=Object.getOwnPropertySymbols,RS=Object.prototype.hasOwnProperty,LS=Object.prototype.propertyIsEnumerable,Cm=(e,t,n)=>t in e?kS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Om=(e,t)=>{for(var n in t||(t={}))RS.call(t,n)&&Cm(e,n,t[n]);if($m)for(var n of $m(t))LS.call(t,n)&&Cm(e,n,t[n]);return e};const zS={"tech-style":{edgeType:"straight",edgeStyle:"solid",edgeColorMode:"gradient",edgeMarker:"arrow",markerSize:12,edgeCornerRadius:5},"dashed-line":{edgeStyle:"dashed",edgeCornerRadius:10,edgeDashPattern:"10,5",edgeColorMode:"gradient",edgeMarker:"dot",markerSize:6,edgeOffset:6},"distributed-origin":{edgeOrigin:"distributed",edgeOriginPadding:30,edgeMarker:"arrow",edgeCornerRadius:10,markerSize:12,edgeColorMode:"gradient"},"curved-line":{edgeType:"curved",edgeColorMode:"gradient",edgeMarker:"none"},"dashed-arrow":{edgeType:"straight",edgeStyle:"dashed",edgeDashPattern:"8,4",edgeMarker:"arrow",markerSize:10,edgeCornerRadius:0}},NS=["capsule-item","rounded-rect-node","compact-card","badge-card","ribbon-card"],Sm={},Mm="hierarchy-tree",HS=[{key:""},{key:"bt",orientation:"bottom-top"},{key:"lr",orientation:"left-right"},{key:"rl",orientation:"right-left"}],DS=(e,t,n)=>e?`${Mm}-${e}-${t}-${n}`:`${Mm}-${t}-${n}`;for(const e of NS)for(const[t,n]of Object.entries(zS))for(const{key:r,orientation:i}of HS){const o=DS(r,t,e);Sm[o]={design:{structure:Om(Om({type:"hierarchy-tree"},i?{orientation:i}:{}),n),item:{type:e}}}}const qS={"list-zigzag-up-compact-card":{design:{title:"default",structure:{type:"list-zigzag-up"},items:[{type:"compact-card"}]},themeConfig:{colorPrimary:"#17CA2C"}},"list-zigzag-up-simple":{design:{title:"default",structure:{type:"list-zigzag-up"},items:[{type:"simple",usePaletteColor:!0}]},themeConfig:{colorPrimary:"#17CA2C"}},"list-zigzag-down-compact-card":{design:{title:"default",structure:{type:"list-zigzag-down"},items:[{type:"compact-card"}]},themeConfig:{colorPrimary:"#17CA2C"}},"list-zigzag-down-simple":{design:{title:"default",structure:{type:"list-zigzag-down"},items:[{type:"simple",usePaletteColor:!0}]},themeConfig:{colorPrimary:"#17CA2C"}}};var jS=Object.defineProperty,FS=Object.defineProperties,BS=Object.getOwnPropertyDescriptors,Em=Object.getOwnPropertySymbols,WS=Object.prototype.hasOwnProperty,GS=Object.prototype.propertyIsEnumerable,Im=(e,t,n)=>t in e?jS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Jo=(e,t)=>{for(var n in t||(t={}))WS.call(t,n)&&Im(e,n,t[n]);if(Em)for(var n of Em(t))GS.call(t,n)&&Im(e,n,t[n]);return e},ea=(e,t)=>FS(e,BS(t));const VS={"simple-circle-node":{type:"simple-circle-node"},"badge-card":{type:"badge-card"},capsule:{type:"capsule-item"},"compact-card":{type:"compact-card"}},ta={type:"relation-dagre-flow",edgeColorMode:"gradient",showArrow:!0,arrowType:"triangle",colorMode:"node"},YS={tb:ea(Jo({},ta),{rankdir:"TB",edgeRouting:"orth"}),lr:ea(Jo({},ta),{rankdir:"LR",edgeRouting:"orth"}),"tb-animated":ea(Jo({},ta),{rankdir:"TB",edgeCornerRadius:12,edgeRouting:"orth",edgeAnimation:"ant-line",edgeDashPattern:"8,4",edgeAnimationSpeed:1}),"lr-animated":ea(Jo({},ta),{rankdir:"LR",edgeCornerRadius:12,edgeRouting:"orth",edgeAnimation:"ant-line",edgeDashPattern:"8,4",edgeAnimationSpeed:1})},Am={},XS=["lr-capsule","tb-capsule"];Object.entries(YS).forEach(([e,t])=>{Object.entries(VS).forEach(([n,r])=>{const i=`${e}-${n}`;if(XS.includes(i))return;const o=`relation-dagre-flow-${i}`;Am[o]={design:{title:"default",structure:t,item:r}}})});const US={"sequence-stairs-front-pill-badge":{design:{title:"default",structure:{type:"sequence-stairs-front"},items:[{type:"pill-badge"}]}},"sequence-stairs-front-compact-card":{design:{title:"default",structure:{type:"sequence-stairs-front"},items:[{type:"compact-card"}]}},"sequence-stairs-front-simple":{design:{title:"default",structure:{type:"sequence-stairs-front"},items:[{type:"simple",usePaletteColor:!0}]}}},KS={"chart-wordcloud-rotate":{design:{structure:{type:"chart-wordcloud"},item:"simple"}},"chart-wordcloud":{design:{structure:{type:"chart-wordcloud",enableRotate:!1},item:"simple"}}};var ZS=Object.defineProperty,Tm=Object.getOwnPropertySymbols,QS=Object.prototype.hasOwnProperty,JS=Object.prototype.propertyIsEnumerable,km=(e,t,n)=>t in e?ZS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pr=(e,t)=>{for(var n in t||(t={}))QS.call(t,n)&&km(e,n,t[n]);if(Tm)for(var n of Tm(t))JS.call(t,n)&&km(e,n,t[n]);return e};const eM=pr(pr(pr(pr(pr(pr(pr({"compare-hierarchy-left-right-circle-node-pill-badge":{design:{structure:{type:"compare-hierarchy-left-right",decoration:"split-line",surround:!1,groupGap:-20},title:"default",items:[{type:"circle-node",width:240},"pill-badge"]},themeConfig:{}},"compare-hierarchy-left-right-circle-node-plain-text":{design:{title:"default",structure:{type:"compare-hierarchy-left-right",decoration:"dot-line",flipLeaf:!0,groupGap:-10},items:[{type:"circle-node",width:180},{type:"plain-text"}]}},"list-pyramid-rounded-rect-node":{design:{title:"default",structure:{type:"list-pyramid"},items:[{type:"rounded-rect-node"}]}},"list-pyramid-badge-card":{design:{title:"default",structure:{type:"list-pyramid"},items:[{type:"badge-card"}]}},"list-pyramid-compact-card":{design:{title:"default",structure:{type:"list-pyramid"},items:[{type:"compact-card"}]}},"list-column-done-list":{design:{title:"default",structure:{type:"list-column"},items:[{type:"done-list"}]}},"list-column-vertical-icon-arrow":{design:{title:"default",structure:{type:"list-column",gap:-5,zigzag:!0},items:[{type:"vertical-icon-arrow"}]}},"list-grid-badge-card":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"badge-card"}]}},"list-grid-candy-card-lite":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"candy-card-lite"}]}},"chart-column-simple":{design:{title:"default",structure:{type:"chart-column"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"list-grid-circular-progress":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"circular-progress"}]}},"list-grid-compact-card":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"compact-card"}]}},"list-grid-done-list":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"done-list"}]}},"list-grid-horizontal-icon-arrow":{design:{title:"default",structure:{type:"list-grid",gap:0,zigzag:!0},items:[{type:"horizontal-icon-arrow"}]}},"list-grid-progress-card":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"progress-card"}]}},"list-grid-ribbon-card":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"ribbon-card"}]}},"list-grid-simple":{design:{title:"default",structure:{type:"list-grid"},items:[{type:"simple"}]}},"list-row-circular-progress":{design:{title:"default",structure:{type:"list-row"},items:[{type:"circular-progress"}]}},"list-row-horizontal-icon-arrow":{design:{title:"default",structure:{type:"list-row",gap:0,zigzag:!0},items:[{type:"horizontal-icon-arrow"}]}},"relation-circle-circular-progress":{design:{title:"default",structure:{type:"relation-circle"},items:[{type:"circular-progress"}]}},"relation-circle-icon-badge":{design:{title:"default",structure:{type:"relation-circle"},items:[{type:"icon-badge"}]}},"sequence-steps-badge-card":{design:{title:"default",structure:{type:"sequence-steps"},items:[{type:"badge-card"}]}},"sequence-steps-simple":{design:{title:"default",structure:{type:"sequence-steps",gap:10},items:[{type:"simple"}]}},"sequence-timeline-done-list":{design:{title:"default",structure:{type:"sequence-timeline"},items:[{type:"done-list"}]}},"sequence-timeline-plain-text":{design:{title:"default",structure:{type:"sequence-timeline"},items:[{type:"plain-text"}]}},"sequence-timeline-rounded-rect-node":{design:{title:"default",structure:{type:"sequence-timeline"},items:[{type:"rounded-rect-node"}]}},"sequence-ascending-steps":{design:{title:"default",structure:{type:"sequence-ascending-steps",vGap:-46,hGap:-20},items:[{type:"l-corner-card"}]}},"sequence-timeline-simple":{design:{title:"default",structure:{type:"sequence-timeline",gap:20},items:[{type:"simple",positionV:"middle"}]}},"sequence-cylinders-3d-simple":{design:{title:"default",structure:{type:"sequence-cylinders-3d",gapY:20},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"list-column-simple-vertical-arrow":{design:{title:"default",structure:{type:"list-column",gap:0,zigzag:!0},items:[{type:"simple-vertical-arrow"}]}},"list-row-simple-horizontal-arrow":{design:{title:"default",structure:{type:"list-row",gap:0,zigzag:!0},items:[{type:"simple-horizontal-arrow"}]}},"compare-swot":{design:{title:"default",structure:{type:"compare-hierarchy-row",itemGap:32,itemPadding:40,showColumnBackground:!0,columnBackgroundAlpha:.08},items:[{type:"letter-card",showBottomShade:!1},{type:"plain-text",formatter:e=>`● ${e}`,usePaletteColor:!0}]}},"compare-hierarchy-row-letter-card-compact-card":{design:{title:"default",structure:{type:"compare-hierarchy-row"},items:[{type:"letter-card"},{type:"compact-card"}]}},"compare-hierarchy-row-letter-card-rounded-rect-node":{design:{title:"default",structure:{type:"compare-hierarchy-row"},items:[{type:"letter-card"},{type:"rounded-rect-node"}]}},"sequence-snake-steps-compact-card":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"compact-card"}]}},"sequence-snake-steps-pill-badge":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"pill-badge"}]}},"sequence-snake-steps-simple":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"simple"}]}},"sequence-color-snake-steps-horizontal-icon-line":{design:{title:"default",structure:{type:"sequence-color-snake-steps"},items:[{type:"horizontal-icon-line"}]}},"sequence-pyramid-simple":{design:{title:"default",structure:{type:"sequence-pyramid"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]},themeConfig:{colorPrimary:"#1677ff"}},"sequence-funnel-simple":{design:{title:"default",structure:{type:"sequence-funnel"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]},themeConfig:{palette:"#1677ff"}},"list-row-horizontal-icon-line":{design:{title:"default",structure:{type:"list-row",gap:0,zigzag:!0},items:[{type:"horizontal-icon-line"}]}},"list-sector-simple":{design:{title:"default",structure:{type:"list-sector"},items:[{type:"simple"}]}},"list-sector-plain-text":{design:{title:"default",structure:{type:"list-sector"},items:[{type:"plain-text"}]}},"list-sector-half-plain-text":{design:{title:"default",structure:{type:"list-sector",startAngle:-180,endAngle:0},items:[{type:"plain-text"}]}},"quadrant-quarter-simple-card":{design:{title:"default",structure:{type:"quadrant"},items:[{type:"quarter-simple-card"}]}},"quadrant-quarter-circular":{design:{title:"default",structure:{type:"quadrant"},items:[{type:"quarter-circular"}]}},"sequence-roadmap-vertical-plain-text":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"plain-text"}]}},"sequence-roadmap-vertical-simple":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"simple",showIcon:!1}]}},"sequence-roadmap-vertical-badge-card":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"badge-card"}]}},"sequence-roadmap-vertical-pill-badge":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"pill-badge"}]}},"sequence-roadmap-vertical-quarter-circular":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"quarter-circular"}]}},"sequence-roadmap-vertical-quarter-simple-card":{design:{title:"default",structure:{type:"sequence-roadmap-vertical",flipped:!0},items:[{type:"quarter-simple-card"}]}},"sequence-horizontal-zigzag-simple-illus":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"simple-illus"}]}},"sequence-horizontal-zigzag-horizontal-icon-line":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"horizontal-icon-line"}]}},"sequence-horizontal-zigzag-plain-text":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"plain-text"}]}},"sequence-horizontal-zigzag-simple-horizontal-arrow":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"simple-horizontal-arrow"}]}},"sequence-horizontal-zigzag-simple":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"simple"}]}},"list-row-simple-illus":{design:{title:"default",structure:{type:"list-row"},items:[{type:"simple-illus"}]}},"quadrant-simple-illus":{design:{title:"default",structure:{type:"quadrant"},items:[{type:"simple-illus"}]}},"sequence-color-snake-steps-simple-illus":{design:{title:"default",structure:{type:"sequence-color-snake-steps"},items:[{type:"simple-illus"}]}},"sequence-snake-steps-simple-illus":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"simple-illus"}]}},"sequence-steps-simple-illus":{design:{title:"default",structure:{type:"sequence-steps"},items:[{type:"simple-illus"}]}},"sequence-timeline-simple-illus":{design:{title:"default",structure:{type:"sequence-timeline"},items:[{type:"simple-illus",usePaletteColor:!0}]}},"sequence-zigzag-steps-underline-text":{design:{title:"default",structure:{type:"sequence-zigzag-steps"},items:[{type:"underline-text"}]}},"sequence-horizontal-zigzag-underline-text":{design:{title:"default",structure:{type:"sequence-horizontal-zigzag"},items:[{type:"underline-text"}]}},"sequence-roadmap-vertical-underline-text":{design:{title:"default",structure:{type:"sequence-roadmap-vertical"},items:[{type:"underline-text"}]}},"sequence-snake-steps-underline-text":{design:{title:"default",structure:{type:"sequence-snake-steps"},items:[{type:"underline-text"}]}},"sequence-circle-arrows-indexed-card":{design:{title:"default",structure:{type:"sequence-circle-arrows"},items:[{type:"indexed-card"}]}},"sequence-zigzag-pucks-3d-simple":{design:{title:"default",structure:{type:"sequence-zigzag-pucks-3d"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"sequence-zigzag-pucks-3d-underline-text":{design:{title:"default",structure:{type:"sequence-zigzag-pucks-3d"},items:[{type:"underline-text"}]}},"sequence-zigzag-pucks-3d-indexed-card":{design:{title:"default",structure:{type:"sequence-zigzag-pucks-3d"},items:[{type:"indexed-card"}]}},"sequence-ascending-stairs-3d-simple":{design:{title:"default",structure:{type:"sequence-ascending-stairs-3d"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"sequence-ascending-stairs-3d-underline-text":{design:{title:"default",structure:{type:"sequence-ascending-stairs-3d"},items:[{type:"underline-text"}]}},"sequence-circular-underline-text":{design:{title:"default",structure:{type:"sequence-circular"},items:[{type:"underline-text"}]}},"sequence-circular-simple":{design:{title:"default",structure:{type:"sequence-circular"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"sequence-filter-mesh-underline-text":{design:{title:"default",structure:{type:"sequence-filter-mesh"},items:[{type:"underline-text"}]}},"sequence-filter-mesh-simple":{design:{title:"default",structure:{type:"sequence-filter-mesh"},items:[{type:"simple",showIcon:!1,usePaletteColor:!0}]}},"sequence-mountain-underline-text":{design:{title:"default",structure:{type:"sequence-mountain"},items:[{type:"underline-text"}]}},"compare-binary-horizontal-simple-fold":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-fold"},items:[{type:"simple",iconType:"circle",iconSize:40}]}},"compare-binary-horizontal-underline-text-fold":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-fold"},items:[{type:"underline-text"}]}},"compare-binary-horizontal-badge-card-fold":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-fold"},items:[{type:"badge-card"}]}},"compare-binary-horizontal-compact-card-fold":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-fold"},items:[{type:"compact-card"}]}},"compare-binary-horizontal-simple-arrow":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-arrow"},items:[{type:"simple",iconType:"circle",iconSize:40}]}},"compare-binary-horizontal-underline-text-arrow":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-arrow"},items:[{type:"underline-text"}]}},"compare-binary-horizontal-badge-card-arrow":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-arrow"},items:[{type:"badge-card"}]}},"compare-binary-horizontal-compact-card-arrow":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"pros-cons-arrow"},items:[{type:"compact-card"}]}},"compare-binary-horizontal-simple-vs":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"vs"},items:[{type:"simple",iconType:"circle",iconSize:40}]}},"compare-binary-horizontal-underline-text-vs":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"vs"},items:[{type:"underline-text"}]}},"compare-binary-horizontal-badge-card-vs":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"vs"},items:[{type:"badge-card"}]}},"compare-binary-horizontal-compact-card-vs":{design:{title:"default",structure:{type:"compare-binary-horizontal",dividerType:"vs"},items:[{type:"compact-card"}]}},"chart-bar-plain-text":{design:{title:"default",structure:{type:"chart-bar"},items:[{type:"plain-text",positionH:"flipped"}]}},"chart-line-plain-text":{design:{title:"default",structure:{type:"chart-line"},items:[{type:"plain-text",lineNumber:2}]}},"chart-pie-plain-text":{design:{title:"default",structure:{type:"chart-pie"},items:[{type:"plain-text"}]}},"chart-pie-compact-card":{design:{title:"default",structure:{type:"chart-pie"},items:[{type:"compact-card"}]}},"chart-pie-pill-badge":{design:{title:"default",structure:{type:"chart-pie"},items:[{type:"pill-badge"}]}},"chart-pie-donut-plain-text":{design:{title:"default",structure:{type:"chart-pie",innerRadius:90},items:[{type:"plain-text"}]}},"chart-pie-donut-compact-card":{design:{title:"default",structure:{type:"chart-pie",innerRadius:90},items:[{type:"compact-card"}]}},"chart-pie-donut-pill-badge":{design:{title:"default",structure:{type:"chart-pie",innerRadius:90},items:[{type:"pill-badge"}]}}},Sm),AS),US),KS),qS),Am),TS);Object.entries(eM).forEach(([e,t])=>{pm(e,t)});const tt=Symbol.for("@antv/infographic/Fragment");function p(e,t={}){return{type:e,props:t}}const R=p,ol="infographic-component";var Ue=(e=>(e.Background="background",e.Title="title",e.Desc="desc",e.ItemsGroup="items-group",e.ItemIconGroup="item-icon-group",e.ItemIcon="item-icon",e.ItemLabel="item-label",e.ItemDesc="item-desc",e.ItemValue="item-value",e.ItemIllus="item-illus",e.BtnAdd="btn-add",e.BtnRemove="btn-remove",e.IllusGroup="illus-group",e.IllusVolume="illus-volume",e.Illus="illus",e.BtnsGroup="btns-group",e.Unknown="unknown",e))(Ue||{});const tM="https://www.weavefox.cn/api/open/v1/icon",al=Symbol.for("@antv/infographic/Defs");function Ke(e){return{type:al,props:e}}function Je(e){var t,n,r,i;const{x:o=0,y:a=0,width:s=0,height:c=0}=e;return(t=e.cx)!=null||(e.cx=o+s/2),(n=e.cy)!=null||(e.cy=a+c/2),(r=e.rx)!=null||(e.rx=s/2),(i=e.ry)!=null||(e.ry=c/2),{type:"ellipse",props:e}}function Y(e){const{x:t=0,y:n=0}=e;return(t||n)&&(e.transform||(e.transform=`translate(${t}, ${n})`)),{type:"g",props:e}}var nM=Object.defineProperty,Rm=Object.getOwnPropertySymbols,rM=Object.prototype.hasOwnProperty,iM=Object.prototype.propertyIsEnumerable,Lm=(e,t,n)=>t in e?nM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oM=(e,t)=>{for(var n in t||(t={}))rM.call(t,n)&&Lm(e,n,t[n]);if(Rm)for(var n of Rm(t))iM.call(t,n)&&Lm(e,n,t[n]);return e};function Pe(e){const{x:t,y:n}=e,r=oM({},e);return(t!==void 0||n!==void 0)&&(r.transform=`translate(${t!=null?t:0}, ${n!=null?n:0})`),{type:"path",props:r}}var aM=Object.defineProperty,sM=Object.defineProperties,cM=Object.getOwnPropertyDescriptors,na=Object.getOwnPropertySymbols,zm=Object.prototype.hasOwnProperty,Nm=Object.prototype.propertyIsEnumerable,Hm=(e,t,n)=>t in e?aM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lM=(e,t)=>{for(var n in t||(t={}))zm.call(t,n)&&Hm(e,n,t[n]);if(na)for(var n of na(t))Nm.call(t,n)&&Hm(e,n,t[n]);return e},uM=(e,t)=>sM(e,cM(t)),hM=(e,t)=>{var n={};for(var r in e)zm.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&na)for(var r of na(e))t.indexOf(r)<0&&Nm.call(e,r)&&(n[r]=e[r]);return n};function Wt(e){var t=e,{points:n=[]}=t,r=hM(t,["points"]);const{x:i,y:o}=r,a=n.map(({x:l,y:u})=>`${l},${u}`).join(" "),s=uM(lM({},r),{points:a});return(i!==void 0||o!==void 0)&&(s.transform=`translate(${i!=null?i:0}, ${o!=null?o:0})`+(s.transform||"")),{type:"polygon",props:s}}function ze(e){return{type:"rect",props:e}}function Dm(e){return Object.keys(e[0]).reduce((t,n)=>{const r=n;return e.every(i=>i[r]===e[0][r])&&(t[r]=e[0][r]),t},{})}const qm=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},dM={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},fM=e=>qm(dM[e.toLowerCase()],6),pM=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,gM=e=>{let t;return(t=e.match(pM))?qm(parseInt(t[1],16),t[1].length):void 0},Kn="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",Fi=`${Kn}%`,sl=`(?:${Kn}%|${Kn})`,mM=`(?:${Kn}(deg|grad|rad|turn)|${Kn})`,ti="\\s*,\\s*",yM=new RegExp(`^rgba?\\(\\s*${Kn}${ti}${Kn}${ti}${Kn}\\s*(?:,\\s*${sl}\\s*)?\\)$`),vM=new RegExp(`^rgba?\\(\\s*${Fi}${ti}${Fi}${ti}${Fi}\\s*(?:,\\s*${sl}\\s*)?\\)$`),bM=e=>{let t={mode:"rgb"},n;if(n=e.match(yM))n[1]!==void 0&&(t.r=n[1]/255),n[2]!==void 0&&(t.g=n[2]/255),n[3]!==void 0&&(t.b=n[3]/255);else if(n=e.match(vM))n[1]!==void 0&&(t.r=n[1]/100),n[2]!==void 0&&(t.g=n[2]/100),n[3]!==void 0&&(t.b=n[3]/100);else return;return n[4]!==void 0?t.alpha=Math.max(0,Math.min(1,n[4]/100)):n[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+n[5]))),t},_M=(e,t)=>e===void 0?void 0:typeof e!="object"?$n(e):e.mode!==void 0?e:t?Kt(Tt({},e),{mode:t}):void 0,cl=(e="rgb")=>t=>(t=_M(t,e))!==void 0?t.mode===e?t:Pn[t.mode][e]?Pn[t.mode][e](t):e==="rgb"?Pn[t.mode].rgb(t):Pn.rgb[e](Pn[t.mode].rgb(t)):void 0,Pn={},jm={},ra=[],Fm={},xM=e=>e,it=e=>(Pn[e.mode]=Tt(Tt({},Pn[e.mode]),e.toMode),Object.keys(e.fromMode||{}).forEach(t=>{Pn[t]||(Pn[t]={}),Pn[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=xM)}),jm[e.mode]=e,(e.parse||[]).forEach(t=>{PM(t,e.mode)}),cl(e.mode)),wM=e=>jm[e],PM=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");Fm[e]=t}else typeof e=="function"&&ra.indexOf(e)<0&&ra.push(e)},ll=/[^\x00-\x7F]|[a-zA-Z_]/,$M=/[^\x00-\x7F]|[-\w]/,ge={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"};let Ie=0;function ia(e){let t=e[Ie],n=e[Ie+1];return t==="-"||t==="+"?/\d/.test(n)||n==="."&&/\d/.test(e[Ie+2]):t==="."?/\d/.test(n):/\d/.test(t)}function ul(e){if(Ie>=e.length)return!1;let t=e[Ie];if(ll.test(t))return!0;if(t==="-"){if(e.length-Ie<2)return!1;let n=e[Ie+1];return!!(n==="-"||ll.test(n))}return!1}const CM={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function Bi(e){let t="";if((e[Ie]==="-"||e[Ie]==="+")&&(t+=e[Ie++]),t+=oa(e),e[Ie]==="."&&/\d/.test(e[Ie+1])&&(t+=e[Ie++]+oa(e)),(e[Ie]==="e"||e[Ie]==="E")&&((e[Ie+1]==="-"||e[Ie+1]==="+")&&/\d/.test(e[Ie+2])?t+=e[Ie++]+e[Ie++]+oa(e):/\d/.test(e[Ie+1])&&(t+=e[Ie++]+oa(e))),ul(e)){let n=aa(e);return n==="deg"||n==="rad"||n==="turn"||n==="grad"?{type:ge.Hue,value:t*CM[n]}:void 0}return e[Ie]==="%"?(Ie++,{type:ge.Percentage,value:+t}):{type:ge.Number,value:+t}}function oa(e){let t="";for(;/\d/.test(e[Ie]);)t+=e[Ie++];return t}function aa(e){let t="";for(;Ie<e.length&&$M.test(e[Ie]);)t+=e[Ie++];return t}function OM(e){let t=aa(e);return e[Ie]==="("?(Ie++,{type:ge.Function,value:t}):t==="none"?{type:ge.None,value:void 0}:{type:ge.Ident,value:t}}function SM(e=""){let t=e.trim(),n=[],r;for(Ie=0;Ie<t.length;){if(r=t[Ie++],r===`
2
+ `||r===" "||r===" "){for(;Ie<t.length&&(t[Ie]===`
3
+ `||t[Ie]===" "||t[Ie]===" ");)Ie++;continue}if(r===",")return;if(r===")"){n.push({type:ge.ParenClose});continue}if(r==="+"){if(Ie--,ia(t)){n.push(Bi(t));continue}return}if(r==="-"){if(Ie--,ia(t)){n.push(Bi(t));continue}if(ul(t)){n.push({type:ge.Ident,value:aa(t)});continue}return}if(r==="."){if(Ie--,ia(t)){n.push(Bi(t));continue}return}if(r==="/"){for(;Ie<t.length&&(t[Ie]===`
4
+ `||t[Ie]===" "||t[Ie]===" ");)Ie++;let i;if(ia(t)&&(i=Bi(t),i.type!==ge.Hue)){n.push({type:ge.Alpha,value:i});continue}if(ul(t)&&aa(t)==="none"){n.push({type:ge.Alpha,value:{type:ge.None,value:void 0}});continue}return}if(/\d/.test(r)){Ie--,n.push(Bi(t));continue}if(ll.test(r)){Ie--,n.push(OM(t));continue}return}return n}function MM(e){e._i=0;let t=e[e._i++];if(!t||t.type!==ge.Function||t.value!=="color"||(t=e[e._i++],t.type!==ge.Ident))return;const n=Fm[t.value];if(!n)return;const r={mode:n},i=Bm(e,!1);if(!i)return;const o=wM(n).channels;for(let a=0,s,c;a<o.length;a++)s=i[a],c=o[a],s.type!==ge.None&&(r[c]=s.type===ge.Number?s.value:s.value/100,c==="alpha"&&(r[c]=Math.max(0,Math.min(1,r[c]))));return r}function Bm(e,t){const n=[];let r;for(;e._i<e.length;){if(r=e[e._i++],r.type===ge.None||r.type===ge.Number||r.type===ge.Alpha||r.type===ge.Percentage||t&&r.type===ge.Hue){n.push(r);continue}if(r.type===ge.ParenClose){if(e._i<e.length)return;continue}return}if(!(n.length<3||n.length>4)){if(n.length===4){if(n[3].type!==ge.Alpha)return;n[3]=n[3].value}return n.length===3&&n.push({type:ge.None,value:void 0}),n.every(i=>i.type!==ge.Alpha)?n:void 0}}function EM(e,t){e._i=0;let n=e[e._i++];if(!n||n.type!==ge.Function)return;let r=Bm(e,t);if(r)return r.unshift(n.value),r}const $n=e=>{if(typeof e!="string")return;const t=SM(e),n=t?EM(t,!0):void 0;let r,i=0,o=ra.length;for(;i<o;)if((r=ra[i++](e,n))!==void 0)return r;return t?MM(t):void 0};function IM(e,t){if(!t||t[0]!=="rgb"&&t[0]!=="rgba")return;const n={mode:"rgb"},[,r,i,o,a]=t;if(!(r.type===ge.Hue||i.type===ge.Hue||o.type===ge.Hue))return r.type!==ge.None&&(n.r=r.type===ge.Number?r.value/255:r.value/100),i.type!==ge.None&&(n.g=i.type===ge.Number?i.value/255:i.value/100),o.type!==ge.None&&(n.b=o.type===ge.Number?o.value/255:o.value/100),a.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,a.type===ge.Number?a.value:a.value/100))),n}const AM=e=>e==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,TM=(e,t,n)=>e+n*(t-e),kM=e=>{let t=[];for(let n=0;n<e.length-1;n++){let r=e[n],i=e[n+1];r===void 0&&i===void 0?t.push(void 0):r!==void 0&&i!==void 0?t.push([r,i]):t.push(r!==void 0?[r,r]:[i,i])}return t},xe=(e=>t=>{let n=kM(t);return r=>{let i=r*n.length,o=r>=1?n.length-1:Math.max(Math.floor(i),0),a=n[o];return a===void 0?void 0:e(a[0],a[1],i-o)}})(TM),kt=e=>{let t=!1,n=e.map(r=>r!==void 0?(t=!0,r):1);return t?n:e},ni={mode:"rgb",channels:["r","g","b","alpha"],parse:[IM,gM,bM,fM,AM,"srgb"],serialize:"srgb",interpolate:{r:xe,g:xe,b:xe,alpha:{use:xe,fixup:kt}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},hl=(e=0)=>Math.pow(Math.abs(e),563/256)*Math.sign(e),Wm=e=>{let t=hl(e.r),n=hl(e.g),r=hl(e.b),i={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*n+.1882286462349947*r,y:.297344975250536*t+.6273635662554661*n+.0752914584939979*r,z:.0270313613864123*t+.0706888525358272*n+.9913375368376386*r};return e.alpha!==void 0&&(i.alpha=e.alpha),i},dl=e=>Math.pow(Math.abs(e),256/563)*Math.sign(e),Gm=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:"a98",r:dl(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*n),g:dl(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*n),b:dl(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*n)};return r!==void 0&&(i.alpha=r),i},fl=(e=0)=>{const t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},ri=({r:e,g:t,b:n,alpha:r})=>{let i={mode:"lrgb",r:fl(e),g:fl(t),b:fl(n)};return r!==void 0&&(i.alpha=r),i},gr=e=>{let{r:t,g:n,b:r,alpha:i}=ri(e),o={mode:"xyz65",x:.4123907992659593*t+.357584339383878*n+.1804807884018343*r,y:.2126390058715102*t+.715168678767756*n+.0721923153607337*r,z:.0193308187155918*t+.119194779794626*n+.9505321522496607*r};return i!==void 0&&(o.alpha=i),o},pl=(e=0)=>{const t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,1/2.4)-.055):e*12.92},ii=({r:e,g:t,b:n,alpha:r},i="rgb")=>{let o={mode:i,r:pl(e),g:pl(t),b:pl(n)};return r!==void 0&&(o.alpha=r),o},mr=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=ii({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*n,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*n,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*n});return r!==void 0&&(i.alpha=r),i},RM=Kt(Tt({},ni),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>Gm(gr(e)),xyz65:Gm},toMode:{rgb:e=>mr(Wm(e)),xyz65:Wm}}),Ht=e=>(e=e%360)<0?e+360:e,LM=(e,t)=>e.map((n,r,i)=>{if(n===void 0)return n;let o=Ht(n);return r===0||e[r-1]===void 0?o:t(o-Ht(i[r-1]))}).reduce((n,r)=>!n.length||r===void 0||n[n.length-1]===void 0?(n.push(r),n):(n.push(r+n[n.length-1]),n),[]),zn=e=>LM(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t)),Lt=[-.14861,1.78277,-.29227,-.90649,1.97294,0],zM=Math.PI/180,NM=180/Math.PI;let Vm=Lt[3]*Lt[4],Ym=Lt[1]*Lt[4],Xm=Lt[1]*Lt[2]-Lt[0]*Lt[3];const HM=({r:e,g:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=(Xm*n+e*Vm-t*Ym)/(Xm+Vm-Ym),o=n-i,a=(Lt[4]*(t-i)-Lt[2]*o)/Lt[3],s={mode:"cubehelix",l:i,s:i===0||i===1?void 0:Math.sqrt(o*o+a*a)/(Lt[4]*i*(1-i))};return s.s&&(s.h=Math.atan2(a,o)*NM-120),r!==void 0&&(s.alpha=r),s},DM=({h:e,s:t,l:n,alpha:r})=>{let i={mode:"rgb"};e=(e===void 0?0:e+120)*zM,n===void 0&&(n=0);let o=t===void 0?0:t*n*(1-n),a=Math.cos(e),s=Math.sin(e);return i.r=n+o*(Lt[0]*a+Lt[1]*s),i.g=n+o*(Lt[2]*a+Lt[3]*s),i.b=n+o*(Lt[4]*a+Lt[5]*s),r!==void 0&&(i.alpha=r),i},sa=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let n=Ht(e.h),r=Ht(t.h),i=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*i},qM=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let n=Ht(e.h),r=Ht(t.h);return Math.abs(r-n)>180?n-(r-360*Math.sign(r-n)):r-n},ca=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let n=Ht(e.h),r=Ht(t.h),i=Math.sin((r-n+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*i},Nn=e=>{let t=e.reduce((r,i)=>{if(i!==void 0){let o=i*Math.PI/180;r.sin+=Math.sin(o),r.cos+=Math.cos(o)}return r},{sin:0,cos:0}),n=Math.atan2(t.sin,t.cos)*180/Math.PI;return n<0?360+n:n},jM={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:HM},toMode:{rgb:DM},interpolate:{h:{use:xe,fixup:zn},s:xe,l:xe,alpha:{use:xe,fixup:kt}},difference:{h:sa},average:{h:Nn}},Zn=({l:e,a:t,b:n,alpha:r},i="lch")=>{t===void 0&&(t=0),n===void 0&&(n=0);let o=Math.sqrt(t*t+n*n),a={mode:i,l:e,c:o};return o&&(a.h=Ht(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(a.alpha=r),a},Qn=({l:e,c:t,h:n,alpha:r},i="lab")=>{n===void 0&&(n=0);let o={mode:i,l:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(o.alpha=r),o},Um=Math.pow(29,3)/Math.pow(3,3),Km=Math.pow(6,3)/Math.pow(29,3),Et={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},oi={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329};let gl=e=>Math.pow(e,3)>Km?Math.pow(e,3):(116*e-16)/Um;const Zm=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=(e+16)/116,o=t/500+i,a=i-n/200,s={mode:"xyz65",x:gl(o)*oi.X,y:gl(i)*oi.Y,z:gl(a)*oi.Z};return r!==void 0&&(s.alpha=r),s},la=e=>mr(Zm(e)),ml=e=>e>Km?Math.cbrt(e):(Um*e+16)/116,Qm=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=ml(e/oi.X),o=ml(t/oi.Y),a=ml(n/oi.Z),s={mode:"lab65",l:116*o-16,a:500*(i-o),b:200*(o-a)};return r!==void 0&&(s.alpha=r),s},ua=e=>{let t=Qm(gr(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},ha=1,Jm=1,Wi=26/180*Math.PI,da=Math.cos(Wi),fa=Math.sin(Wi),ey=100/Math.log(139/100),yl=({l:e,c:t,h:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:"lab65",l:(Math.exp(e*ha/ey)-1)/.0039},o=(Math.exp(.0435*t*Jm*ha)-1)/.075,a=o*Math.cos(n/180*Math.PI-Wi),s=o*Math.sin(n/180*Math.PI-Wi);return i.a=a*da-s/.83*fa,i.b=a*fa+s/.83*da,r!==void 0&&(i.alpha=r),i},vl=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=t*da+n*fa,o=.83*(n*da-t*fa),a=Math.sqrt(i*i+o*o),s={mode:"dlch",l:ey/ha*Math.log(1+.0039*e),c:Math.log(1+.075*a)/(.0435*Jm*ha)};return s.c&&(s.h=Ht((Math.atan2(o,i)+Wi)/Math.PI*180)),r!==void 0&&(s.alpha=r),s},ty=e=>yl(Zn(e,"dlch")),ny=e=>Qn(vl(e),"dlab"),FM={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:ty,rgb:e=>la(ty(e))},fromMode:{lab65:ny,rgb:e=>ny(ua(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:xe,a:xe,b:xe,alpha:{use:xe,fixup:kt}}},BM={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:yl,dlab:e=>Qn(e,"dlab"),rgb:e=>la(yl(e))},fromMode:{lab65:vl,dlab:e=>Zn(e,"dlch"),rgb:e=>vl(ua(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:xe,c:xe,h:{use:xe,fixup:zn},alpha:{use:xe,fixup:kt}},difference:{h:ca},average:{h:Nn}};function WM({h:e,s:t,i:n,alpha:r}){e=Ht(e!==void 0?e:0),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.abs(e/60%2-1),o;switch(Math.floor(e/60)){case 0:o={r:n*(1+t*(3/(2-i)-1)),g:n*(1+t*(3*(1-i)/(2-i)-1)),b:n*(1-t)};break;case 1:o={r:n*(1+t*(3*(1-i)/(2-i)-1)),g:n*(1+t*(3/(2-i)-1)),b:n*(1-t)};break;case 2:o={r:n*(1-t),g:n*(1+t*(3/(2-i)-1)),b:n*(1+t*(3*(1-i)/(2-i)-1))};break;case 3:o={r:n*(1-t),g:n*(1+t*(3*(1-i)/(2-i)-1)),b:n*(1+t*(3/(2-i)-1))};break;case 4:o={r:n*(1+t*(3*(1-i)/(2-i)-1)),g:n*(1-t),b:n*(1+t*(3/(2-i)-1))};break;case 5:o={r:n*(1+t*(3/(2-i)-1)),g:n*(1-t),b:n*(1+t*(3*(1-i)/(2-i)-1))};break;default:o={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return o.mode="rgb",r!==void 0&&(o.alpha=r),o}function GM({r:e,g:t,b:n,alpha:r}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.max(e,t,n),o=Math.min(e,t,n),a={mode:"hsi",s:e+t+n===0?0:1-3*o/(e+t+n),i:(e+t+n)/3};return i-o!==0&&(a.h=(i===e?(t-n)/(i-o)+(t<n)*6:i===t?(n-e)/(i-o)+2:(e-t)/(i-o)+4)*60),r!==void 0&&(a.alpha=r),a}const VM={mode:"hsi",toMode:{rgb:WM},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:GM},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:xe,fixup:zn},s:xe,i:xe,alpha:{use:xe,fixup:kt}},difference:{h:sa},average:{h:Nn}};function YM({h:e,s:t,l:n,alpha:r}){e=Ht(e!==void 0?e:0),t===void 0&&(t=0),n===void 0&&(n=0);let i=n+t*(n<.5?n:1-n),o=i-(i-n)*2*Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:i,g:o,b:2*n-i};break;case 1:a={r:o,g:i,b:2*n-i};break;case 2:a={r:2*n-i,g:i,b:o};break;case 3:a={r:2*n-i,g:o,b:i};break;case 4:a={r:o,g:2*n-i,b:i};break;case 5:a={r:i,g:2*n-i,b:o};break;default:a={r:2*n-i,g:2*n-i,b:2*n-i}}return a.mode="rgb",r!==void 0&&(a.alpha=r),a}function XM({r:e,g:t,b:n,alpha:r}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.max(e,t,n),o=Math.min(e,t,n),a={mode:"hsl",s:i===o?0:(i-o)/(1-Math.abs(i+o-1)),l:.5*(i+o)};return i-o!==0&&(a.h=(i===e?(t-n)/(i-o)+(t<n)*6:i===t?(n-e)/(i-o)+2:(e-t)/(i-o)+4)*60),r!==void 0&&(a.alpha=r),a}const UM=(e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},KM=new RegExp(`^hsla?\\(\\s*${mM}${ti}${Fi}${ti}${Fi}\\s*(?:,\\s*${sl}\\s*)?\\)$`),ZM=e=>{let t=e.match(KM);if(!t)return;let n={mode:"hsl"};return t[3]!==void 0?n.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(n.h=UM(t[1],t[2])),t[4]!==void 0&&(n.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(n.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?n.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(n.alpha=Math.max(0,Math.min(1,+t[7]))),n};function QM(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;const n={mode:"hsl"},[,r,i,o,a]=t;if(r.type!==ge.None){if(r.type===ge.Percentage)return;n.h=r.value}if(i.type!==ge.None){if(i.type===ge.Hue)return;n.s=i.value/100}if(o.type!==ge.None){if(o.type===ge.Hue)return;n.l=o.value/100}return a.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,a.type===ge.Number?a.value:a.value/100))),n}const ry={mode:"hsl",toMode:{rgb:YM},fromMode:{rgb:XM},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[QM,ZM],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:xe,fixup:zn},s:xe,l:xe,alpha:{use:xe,fixup:kt}},difference:{h:sa},average:{h:Nn}};function iy({h:e,s:t,v:n,alpha:r}){e=Ht(e!==void 0?e:0),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.abs(e/60%2-1),o;switch(Math.floor(e/60)){case 0:o={r:n,g:n*(1-t*i),b:n*(1-t)};break;case 1:o={r:n*(1-t*i),g:n,b:n*(1-t)};break;case 2:o={r:n*(1-t),g:n,b:n*(1-t*i)};break;case 3:o={r:n*(1-t),g:n*(1-t*i),b:n};break;case 4:o={r:n*(1-t*i),g:n*(1-t),b:n};break;case 5:o={r:n,g:n*(1-t),b:n*(1-t*i)};break;default:o={r:n*(1-t),g:n*(1-t),b:n*(1-t)}}return o.mode="rgb",r!==void 0&&(o.alpha=r),o}function oy({r:e,g:t,b:n,alpha:r}){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.max(e,t,n),o=Math.min(e,t,n),a={mode:"hsv",s:i===0?0:1-o/i,v:i};return i-o!==0&&(a.h=(i===e?(t-n)/(i-o)+(t<n)*6:i===t?(n-e)/(i-o)+2:(e-t)/(i-o)+4)*60),r!==void 0&&(a.alpha=r),a}const ay={mode:"hsv",toMode:{rgb:iy},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:oy},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:xe,fixup:zn},s:xe,v:xe,alpha:{use:xe,fixup:kt}},difference:{h:sa},average:{h:Nn}};function JM({h:e,w:t,b:n,alpha:r}){if(t===void 0&&(t=0),n===void 0&&(n=0),t+n>1){let i=t+n;t/=i,n/=i}return iy({h:e,s:n===1?1:1-t/(1-n),v:1-n,alpha:r})}function eE(e){let t=oy(e);if(t===void 0)return;let n=t.s!==void 0?t.s:0,r=t.v!==void 0?t.v:0,i={mode:"hwb",w:(1-n)*r,b:1-r};return t.h!==void 0&&(i.h=t.h),t.alpha!==void 0&&(i.alpha=t.alpha),i}function tE(e,t){if(!t||t[0]!=="hwb")return;const n={mode:"hwb"},[,r,i,o,a]=t;if(r.type!==ge.None){if(r.type===ge.Percentage)return;n.h=r.value}if(i.type!==ge.None){if(i.type===ge.Hue)return;n.w=i.value/100}if(o.type!==ge.None){if(o.type===ge.Hue)return;n.b=o.value/100}return a.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,a.type===ge.Number?a.value:a.value/100))),n}const nE={mode:"hwb",toMode:{rgb:JM},fromMode:{rgb:eE},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[tE],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:xe,fixup:zn},w:xe,b:xe,alpha:{use:xe,fixup:kt}},difference:{h:qM},average:{h:Nn}},sy=203,pa=.1593017578125,cy=78.84375,ga=.8359375,ma=18.8515625,ya=18.6875;function bl(e){if(e<0)return 0;const t=Math.pow(e,1/cy);return 1e4*Math.pow(Math.max(0,t-ga)/(ma-ya*t),1/pa)}function _l(e){if(e<0)return 0;const t=Math.pow(e/1e4,pa);return Math.pow((ga+ma*t)/(1+ya*t),cy)}const xl=e=>Math.max(e/sy,0),ly=({i:e,t,p:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);const i=bl(e+.008609037037932761*t+.11102962500302593*n),o=bl(e-.00860903703793275*t-.11102962500302599*n),a=bl(e+.5600313357106791*t-.32062717498731885*n),s={mode:"xyz65",x:xl(2.070152218389422*i-1.3263473389671556*o+.2066510476294051*a),y:xl(.3647385209748074*i+.680566024947227*o-.0453045459220346*a),z:xl(-.049747207535812*i-.0492609666966138*o+1.1880659249923042*a)};return r!==void 0&&(s.alpha=r),s},wl=(e=0)=>Math.max(e*sy,0),uy=({x:e,y:t,z:n,alpha:r})=>{const i=wl(e),o=wl(t),a=wl(n),s=_l(.3592832590121217*i+.6976051147779502*o-.0358915932320289*a),c=_l(-.1920808463704995*i+1.1004767970374323*o+.0753748658519118*a),l=_l(.0070797844607477*i+.0748396662186366*o+.8433265453898765*a),u=.5*s+.5*c,h=1.61376953125*s-3.323486328125*c+1.709716796875*l,d=4.378173828125*s-4.24560546875*c-.132568359375*l,f={mode:"itp",i:u,t:h,p:d};return r!==void 0&&(f.alpha=r),f},rE={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:ly,rgb:e=>mr(ly(e))},fromMode:{xyz65:uy,rgb:e=>uy(gr(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:xe,t:xe,p:xe,alpha:{use:xe,fixup:kt}}},iE=134.03437499999998,oE=16295499532821565e-27,Pl=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,pa);return Math.pow((ga+ma*t)/(1+ya*t),iE)},$l=(e=0)=>Math.max(e*203,0),hy=({x:e,y:t,z:n,alpha:r})=>{e=$l(e),t=$l(t),n=$l(n);let i=1.15*e-.15*n,o=.66*t+.34*e,a=Pl(.41478972*i+.579999*o+.014648*n),s=Pl(-.20151*i+1.120649*o+.0531008*n),c=Pl(-.0166008*i+.2648*o+.6684799*n),l=(a+s)/2,u={mode:"jab",j:.44*l/(1-.56*l)-oE,a:3.524*a-4.066708*s+.542708*c,b:.199076*a+1.096799*s-1.295875*c};return r!==void 0&&(u.alpha=r),u},aE=134.03437499999998,dy=16295499532821565e-27,Cl=e=>{if(e<0)return 0;let t=Math.pow(e,1/aE);return 1e4*Math.pow((ga-t)/(ya*t-ma),1/pa)},Ol=e=>e/203,fy=({j:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=(e+dy)/(.44+.56*(e+dy)),o=Cl(i+.13860504*t+.058047316*n),a=Cl(i-.13860504*t-.058047316*n),s=Cl(i-.096019242*t-.8118919*n),c={mode:"xyz65",x:Ol(1.661373024652174*o-.914523081304348*a+.23136208173913045*s),y:Ol(-.3250758611844533*o+1.571847026732543*a-.21825383453227928*s),z:Ol(-.090982811*o-.31272829*a+1.5227666*s)};return r!==void 0&&(c.alpha=r),c},py=e=>{let t=hy(gr(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},gy=e=>mr(fy(e)),sE={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:py,xyz65:hy},toMode:{rgb:gy,xyz65:fy},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:xe,a:xe,b:xe,alpha:{use:xe,fixup:kt}}},my=({j:e,a:t,b:n,alpha:r})=>{t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.sqrt(t*t+n*n),o={mode:"jch",j:e,c:i};return i&&(o.h=Ht(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(o.alpha=r),o},yy=({j:e,c:t,h:n,alpha:r})=>{n===void 0&&(n=0);let i={mode:"jab",j:e,a:t?t*Math.cos(n/180*Math.PI):0,b:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(i.alpha=r),i},cE={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:yy,rgb:e=>gy(yy(e))},fromMode:{rgb:e=>my(py(e)),jab:my},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:xe,fixup:zn},c:xe,j:xe,alpha:{use:xe,fixup:kt}},difference:{h:ca},average:{h:Nn}},va=Math.pow(29,3)/Math.pow(3,3),Sl=Math.pow(6,3)/Math.pow(29,3);let Ml=e=>Math.pow(e,3)>Sl?Math.pow(e,3):(116*e-16)/va;const El=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=(e+16)/116,o=t/500+i,a=i-n/200,s={mode:"xyz50",x:Ml(o)*Et.X,y:Ml(i)*Et.Y,z:Ml(a)*Et.Z};return r!==void 0&&(s.alpha=r),s},Gi=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=ii({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*n,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*n,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*n});return r!==void 0&&(i.alpha=r),i},vy=e=>Gi(El(e)),Vi=e=>{let{r:t,g:n,b:r,alpha:i}=ri(e),o={mode:"xyz50",x:.436065742824811*t+.3851514688337912*n+.14307845442264197*r,y:.22249319175623702*t+.7168870538238823*n+.06061979053616537*r,z:.013923904500943465*t+.09708128566574634*n+.7140993584005155*r};return i!==void 0&&(o.alpha=i),o},Il=e=>e>Sl?Math.cbrt(e):(va*e+16)/116,Al=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=Il(e/Et.X),o=Il(t/Et.Y),a=Il(n/Et.Z),s={mode:"lab",l:116*o-16,a:500*(i-o),b:200*(o-a)};return r!==void 0&&(s.alpha=r),s},by=e=>{let t=Al(Vi(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t};function lE(e,t){if(!t||t[0]!=="lab")return;const n={mode:"lab"},[,r,i,o,a]=t;if(!(r.type===ge.Hue||i.type===ge.Hue||o.type===ge.Hue))return r.type!==ge.None&&(n.l=Math.min(Math.max(0,r.value),100)),i.type!==ge.None&&(n.a=i.type===ge.Number?i.value:i.value*125/100),o.type!==ge.None&&(n.b=o.type===ge.Number?o.value:o.value*125/100),a.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,a.type===ge.Number?a.value:a.value/100))),n}const Tl={mode:"lab",toMode:{xyz50:El,rgb:vy},fromMode:{xyz50:Al,rgb:by},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[lE],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:xe,a:xe,b:xe,alpha:{use:xe,fixup:kt}}},uE=Kt(Tt({},Tl),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Zm,rgb:la},fromMode:{xyz65:Qm,rgb:ua},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}});function hE(e,t){if(!t||t[0]!=="lch")return;const n={mode:"lch"},[,r,i,o,a]=t;if(r.type!==ge.None){if(r.type===ge.Hue)return;n.l=Math.min(Math.max(0,r.value),100)}if(i.type!==ge.None&&(n.c=Math.max(0,i.type===ge.Number?i.value:i.value*150/100)),o.type!==ge.None){if(o.type===ge.Percentage)return;n.h=o.value}return a.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,a.type===ge.Number?a.value:a.value/100))),n}const kl={mode:"lch",toMode:{lab:Qn,rgb:e=>vy(Qn(e))},fromMode:{rgb:e=>Zn(by(e)),lab:Zn},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[hE],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:xe,fixup:zn},c:xe,l:xe,alpha:{use:xe,fixup:kt}},difference:{h:ca},average:{h:Nn}},dE=Kt(Tt({},kl),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>Qn(e,"lab65"),rgb:e=>la(Qn(e,"lab65"))},fromMode:{rgb:e=>Zn(ua(e),"lch65"),lab65:e=>Zn(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}}),_y=({l:e,u:t,v:n,alpha:r})=>{t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.sqrt(t*t+n*n),o={mode:"lchuv",l:e,c:i};return i&&(o.h=Ht(Math.atan2(n,t)*180/Math.PI)),r!==void 0&&(o.alpha=r),o},xy=({l:e,c:t,h:n,alpha:r})=>{n===void 0&&(n=0);let i={mode:"luv",l:e,u:t?t*Math.cos(n/180*Math.PI):0,v:t?t*Math.sin(n/180*Math.PI):0};return r!==void 0&&(i.alpha=r),i},wy=(e,t,n)=>4*e/(e+15*t+3*n),Py=(e,t,n)=>9*t/(e+15*t+3*n),fE=wy(Et.X,Et.Y,Et.Z),pE=Py(Et.X,Et.Y,Et.Z),gE=e=>e<=Sl?va*e:116*Math.cbrt(e)-16,Rl=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=gE(t/Et.Y),o=wy(e,t,n),a=Py(e,t,n);!isFinite(o)||!isFinite(a)?i=o=a=0:(o=13*i*(o-fE),a=13*i*(a-pE));let s={mode:"luv",l:i,u:o,v:a};return r!==void 0&&(s.alpha=r),s},mE=(e,t,n)=>4*e/(e+15*t+3*n),yE=(e,t,n)=>9*t/(e+15*t+3*n),vE=mE(Et.X,Et.Y,Et.Z),bE=yE(Et.X,Et.Y,Et.Z),Ll=({l:e,u:t,v:n,alpha:r})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),n===void 0&&(n=0);let i=t/(13*e)+vE,o=n/(13*e)+bE,a=Et.Y*(e<=8?e/va:Math.pow((e+16)/116,3)),s=a*(9*i)/(4*o),c=a*(12-3*i-20*o)/(4*o),l={mode:"xyz50",x:s,y:a,z:c};return r!==void 0&&(l.alpha=r),l},_E={mode:"lchuv",toMode:{luv:xy,rgb:e=>Gi(Ll(xy(e)))},fromMode:{rgb:e=>_y(Rl(Vi(e))),luv:_y},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:xe,fixup:zn},c:xe,l:xe,alpha:{use:xe,fixup:kt}},difference:{h:ca},average:{h:Nn}},xE=Kt(Tt({},ni),{mode:"lrgb",toMode:{rgb:ii},fromMode:{rgb:ri},parse:["srgb-linear"],serialize:"srgb-linear"}),wE={mode:"luv",toMode:{xyz50:Ll,rgb:e=>Gi(Ll(e))},fromMode:{xyz50:Rl,rgb:e=>Rl(Vi(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:xe,u:xe,v:xe,alpha:{use:xe,fixup:kt}}},$y=({r:e,g:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*n),o=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*n),a=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*n),s={mode:"oklab",l:.210454268309314*i+.7936177747023054*o-.0040720430116193*a,a:1.9779985324311684*i-2.42859224204858*o+.450593709617411*a,b:.0259040424655478*i+.7827717124575296*o-.8086757549230774*a};return r!==void 0&&(s.alpha=r),s},ba=e=>{let t=$y(ri(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Yi=({l:e,a:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=Math.pow(e+.3963377773761749*t+.2158037573099136*n,3),o=Math.pow(e-.1055613458156586*t-.0638541728258133*n,3),a=Math.pow(e-.0894841775298119*t-1.2914855480194092*n,3),s={mode:"lrgb",r:4.076741636075957*i-3.3077115392580616*o+.2309699031821044*a,g:-1.2684379732850317*i+2.6097573492876887*o-.3413193760026573*a,b:-.0041960761386756*i-.7034186179359362*o+1.7076146940746117*a};return r!==void 0&&(s.alpha=r),s},_a=e=>ii(Yi(e));function zl(e){const r=1.170873786407767;return .5*(r*e-.206+Math.sqrt((r*e-.206)*(r*e-.206)+4*.03*r*e))}function xa(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function PE(e,t){let n,r,i,o,a,s,c,l;-1.88170328*e-.80936493*t>1?(n=1.19086277,r=1.76576728,i=.59662641,o=.75515197,a=.56771245,s=4.0767416621,c=-3.3077115913,l=.2309699292):1.81444104*e-1.19445276*t>1?(n=.73956515,r=-.45954404,i=.08285427,o=.1254107,a=.14503204,s=-1.2684380046,c=2.6097574011,l=-.3413193965):(n=1.35733652,r=-.00915799,i=-1.1513021,o=-.50559606,a=.00692167,s=-.0041960863,c=-.7034186147,l=1.707614701);let u=n+r*e+i*t+o*e*e+a*e*t,h=.3963377774*e+.2158037573*t,d=-.1055613458*e-.0638541728*t,f=-.0894841775*e-1.291485548*t;{let g=1+u*h,y=1+u*d,m=1+u*f,v=g*g*g,b=y*y*y,_=m*m*m,x=3*h*g*g,w=3*d*y*y,P=3*f*m*m,$=6*h*h*g,C=6*d*d*y,M=6*f*f*m,S=s*v+c*b+l*_,E=s*x+c*w+l*P,I=s*$+c*C+l*M;u=u-S*E/(E*E-.5*S*I)}return u}function Nl(e,t){let n=PE(e,t),r=Yi({l:1,a:n*e,b:n*t}),i=Math.cbrt(1/Math.max(r.r,r.g,r.b)),o=i*n;return[i,o]}function $E(e,t,n,r,i,o=null){o||(o=Nl(e,t));let a;if((n-i)*o[1]-(o[0]-i)*r<=0)a=o[1]*i/(r*o[0]+o[1]*(i-n));else{a=o[1]*(i-1)/(r*(o[0]-1)+o[1]*(i-n));{let s=n-i,c=r,l=.3963377774*e+.2158037573*t,u=-.1055613458*e-.0638541728*t,h=-.0894841775*e-1.291485548*t,d=s+c*l,f=s+c*u,g=s+c*h;{let y=i*(1-a)+a*n,m=a*r,v=y+m*l,b=y+m*u,_=y+m*h,x=v*v*v,w=b*b*b,P=_*_*_,$=3*d*v*v,C=3*f*b*b,M=3*g*_*_,S=6*d*d*v,E=6*f*f*b,I=6*g*g*_,O=4.0767416621*x-3.3077115913*w+.2309699292*P-1,T=4.0767416621*$-3.3077115913*C+.2309699292*M,F=4.0767416621*S-3.3077115913*E+.2309699292*I,z=T/(T*T-.5*O*F),j=-O*z,H=-1.2684380046*x+2.6097574011*w-.3413193965*P-1,W=-1.2684380046*$+2.6097574011*C-.3413193965*M,B=-1.2684380046*S+2.6097574011*E-.3413193965*I,X=W/(W*W-.5*H*B),D=-H*X,k=-.0041960863*x-.7034186147*w+1.707614701*P-1,A=-.0041960863*$-.7034186147*C+1.707614701*M,L=-.0041960863*S-.7034186147*E+1.707614701*I,N=A/(A*A-.5*k*L),q=-k*N;j=z>=0?j:1e6,D=X>=0?D:1e6,q=N>=0?q:1e6,a+=Math.min(j,Math.min(D,q))}}}return a}function Hl(e,t,n=null){n||(n=Nl(e,t));let r=n[0],i=n[1];return[i/r,i/(1-r)]}function Cy(e,t,n){let r=Nl(t,n),i=$E(t,n,e,1,e,r),o=Hl(t,n,r),a=.11516993+1/(7.4477897+4.1590124*n+t*(-2.19557347+1.75198401*n+t*(-2.13704948-10.02301043*n+t*(-4.24894561+5.38770819*n+4.69891013*t)))),s=.11239642+1/(1.6132032-.68124379*n+t*(.40370612+.90148123*n+t*(-.27087943+.6122399*n+t*(.00299215-.45399568*n-.14661872*t)))),c=i/Math.min(e*o[0],(1-e)*o[1]),l=e*a,u=(1-e)*s,h=.9*c*Math.sqrt(Math.sqrt(1/(1/(l*l*l*l)+1/(u*u*u*u))));return l=e*.4,u=(1-e)*.8,[Math.sqrt(1/(1/(l*l)+1/(u*u))),h,i]}function Oy(e){const t=e.l!==void 0?e.l:0,n=e.a!==void 0?e.a:0,r=e.b!==void 0?e.b:0,i={mode:"okhsl",l:zl(t)};e.alpha!==void 0&&(i.alpha=e.alpha);let o=Math.sqrt(n*n+r*r);if(!o)return i.s=0,i;let[a,s,c]=Cy(t,n/o,r/o),l;if(o<s){let u=0,h=.8*a,d=1-h/s;l=(o-u)/(h+d*(o-u))*.8}else{let u=s,h=.2*s*s*1.25*1.25/a,d=1-h/(c-s);l=.8+.2*((o-u)/(h+d*(o-u)))}return l&&(i.s=l,i.h=Ht(Math.atan2(r,n)*180/Math.PI)),i}function Sy(e){let t=e.h!==void 0?e.h:0,n=e.s!==void 0?e.s:0,r=e.l!==void 0?e.l:0;const i={mode:"oklab",l:xa(r)};if(e.alpha!==void 0&&(i.alpha=e.alpha),!n||r===1)return i.a=i.b=0,i;let o=Math.cos(t/180*Math.PI),a=Math.sin(t/180*Math.PI),[s,c,l]=Cy(i.l,o,a),u,h,d,f;n<.8?(u=1.25*n,h=0,d=.8*s,f=1-d/c):(u=5*(n-.8),h=c,d=.2*c*c*1.25*1.25/s,f=1-d/(l-c));let g=h+u*d/(1-f*u);return i.a=g*o,i.b=g*a,i}const CE=Kt(Tt({},ry),{mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:Oy,rgb:e=>Oy(ba(e))},toMode:{oklab:Sy,rgb:e=>_a(Sy(e))}});function My(e){let t=e.l!==void 0?e.l:0,n=e.a!==void 0?e.a:0,r=e.b!==void 0?e.b:0,i=Math.sqrt(n*n+r*r),o=i?n/i:1,a=i?r/i:1,[s,c]=Hl(o,a),l=.5,u=1-l/s,h=c/(i+t*c),d=h*t,f=h*i,g=xa(d),y=f*g/d,m=Yi({l:g,a:o*y,b:a*y}),v=Math.cbrt(1/Math.max(m.r,m.g,m.b,0));t=t/v,i=i/v*zl(t)/t,t=zl(t);const b={mode:"okhsv",s:i?(l+c)*f/(c*l+c*u*f):0,v:t?t/d:0};return b.s&&(b.h=Ht(Math.atan2(r,n)*180/Math.PI)),e.alpha!==void 0&&(b.alpha=e.alpha),b}function Ey(e){const t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);const n=e.h!==void 0?e.h:0,r=e.s!==void 0?e.s:0,i=e.v!==void 0?e.v:0,o=Math.cos(n/180*Math.PI),a=Math.sin(n/180*Math.PI),[s,c]=Hl(o,a),l=.5,u=1-l/s,h=1-r*l/(l+c-c*u*r),d=r*c*l/(l+c-c*u*r),f=xa(h),g=d*f/h,y=Yi({l:f,a:o*g,b:a*g}),m=Math.cbrt(1/Math.max(y.r,y.g,y.b,0)),v=xa(i*h),b=d*v/h;return t.l=v*m,t.a=b*o*m,t.b=b*a*m,t}const OE=Kt(Tt({},ay),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:My,rgb:e=>My(ba(e))},toMode:{oklab:Ey,rgb:e=>_a(Ey(e))}});function SE(e,t){if(!t||t[0]!=="oklab")return;const n={mode:"oklab"},[,r,i,o,a]=t;if(!(r.type===ge.Hue||i.type===ge.Hue||o.type===ge.Hue))return r.type!==ge.None&&(n.l=Math.min(Math.max(0,r.type===ge.Number?r.value:r.value/100),1)),i.type!==ge.None&&(n.a=i.type===ge.Number?i.value:i.value*.4/100),o.type!==ge.None&&(n.b=o.type===ge.Number?o.value:o.value*.4/100),a.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,a.type===ge.Number?a.value:a.value/100))),n}const ME=Kt(Tt({},Tl),{mode:"oklab",toMode:{lrgb:Yi,rgb:_a},fromMode:{lrgb:$y,rgb:ba},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[SE],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`});function EE(e,t){if(!t||t[0]!=="oklch")return;const n={mode:"oklch"},[,r,i,o,a]=t;if(r.type!==ge.None){if(r.type===ge.Hue)return;n.l=Math.min(Math.max(0,r.type===ge.Number?r.value:r.value/100),1)}if(i.type!==ge.None&&(n.c=Math.max(0,i.type===ge.Number?i.value:i.value*.4/100)),o.type!==ge.None){if(o.type===ge.Percentage)return;n.h=o.value}return a.type!==ge.None&&(n.alpha=Math.min(1,Math.max(0,a.type===ge.Number?a.value:a.value/100))),n}const Iy=Kt(Tt({},kl),{mode:"oklch",toMode:{oklab:e=>Qn(e,"oklab"),rgb:e=>_a(Qn(e,"oklab"))},fromMode:{rgb:e=>Zn(ba(e),"oklch"),oklab:e=>Zn(e,"oklch")},parse:[EE],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}}),Ay=e=>{let{r:t,g:n,b:r,alpha:i}=ri(e),o={mode:"xyz65",x:.486570948648216*t+.265667693169093*n+.1982172852343625*r,y:.2289745640697487*t+.6917385218365062*n+.079286914093745*r,z:0*t+.0451133818589026*n+1.043944368900976*r};return i!==void 0&&(o.alpha=i),o},Ty=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i=ii({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*n,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*n,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*n},"p3");return r!==void 0&&(i.alpha=r),i},IE=Kt(Tt({},ni),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>Ty(gr(e)),xyz65:Ty},toMode:{rgb:e=>mr(Ay(e)),xyz65:Ay}}),Dl=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*Math.pow(t,1/1.8):16*e},ky=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:"prophoto",r:Dl(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*n),g:Dl(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*n),b:Dl(e*0+t*0+1.2119675456389452*n)};return r!==void 0&&(i.alpha=r),i},ql=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*Math.pow(t,1.8):e/16},Ry=e=>{let t=ql(e.r),n=ql(e.g),r=ql(e.b),i={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*n+.0313477341283922*r,y:.2880748288194013*t+.7118352342418731*n+899369387256e-16*r,z:0*t+0*n+.8251046025104602*r};return e.alpha!==void 0&&(i.alpha=e.alpha),i},AE=Kt(Tt({},ni),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:ky,rgb:e=>ky(Vi(e))},toMode:{xyz50:Ry,rgb:e=>Gi(Ry(e))}}),Ly=1.09929682680944,TE=.018053968510807,jl=e=>{const t=Math.abs(e);return t>TE?(Math.sign(e)||1)*(Ly*Math.pow(t,.45)-(Ly-1)):4.5*e},zy=({x:e,y:t,z:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);let i={mode:"rec2020",r:jl(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*n),g:jl(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*n),b:jl(e*.0176398574453108-t*.0427706132578085+.9421031212354739*n)};return r!==void 0&&(i.alpha=r),i},Ny=1.09929682680944,kE=.018053968510807,Fl=(e=0)=>{let t=Math.abs(e);return t<kE*4.5?e/4.5:(Math.sign(e)||1)*Math.pow((t+Ny-1)/Ny,1/.45)},Hy=e=>{let t=Fl(e.r),n=Fl(e.g),r=Fl(e.b),i={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*n+.1688809751641721*r,y:.262700212011267*t+.6779980715188708*n+.059301716469862*r,z:0*t+.0280726930490874*n+1.0609850577107909*r};return e.alpha!==void 0&&(i.alpha=e.alpha),i},RE=Kt(Tt({},ni),{mode:"rec2020",fromMode:{xyz65:zy,rgb:e=>zy(gr(e))},toMode:{xyz65:Hy,rgb:e=>mr(Hy(e))},parse:["rec2020"],serialize:"rec2020"}),yr=.0037930732552754493,Dy=Math.cbrt(yr),Bl=e=>Math.cbrt(e)-Dy,LE=e=>{const{r:t,g:n,b:r,alpha:i}=ri(e),o=Bl(.3*t+.622*n+.078*r+yr),a=Bl(.23*t+.692*n+.078*r+yr),s=Bl(.2434226892454782*t+.2047674442449682*n+.5518098665095535*r+yr),c={mode:"xyb",x:(o-a)/2,y:(o+a)/2,b:s-(o+a)/2};return i!==void 0&&(c.alpha=i),c},Wl=e=>Math.pow(e+Dy,3),zE={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:({x:e,y:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);const i=Wl(e+t)-yr,o=Wl(t-e)-yr,a=Wl(n+t)-yr,s=ii({r:11.031566904639861*i-9.866943908131562*o-.16462299650829934*a,g:-3.2541473810744237*i+4.418770377582723*o-.16462299650829934*a,b:-3.6588512867136815*i+2.7129230459360922*o+1.9459282407775895*a});return r!==void 0&&(s.alpha=r),s}},fromMode:{rgb:LE},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:xe,y:xe,b:xe,alpha:{use:xe,fixup:kt}}},NE={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Gi,lab:Al},fromMode:{rgb:Vi,lab:El},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:xe,y:xe,z:xe,alpha:{use:xe,fixup:kt}}},HE={mode:"xyz65",toMode:{rgb:mr,xyz50:e=>{let{x:t,y:n,z:r,alpha:i}=e;t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0);let o={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*n-.0501922295431356*r,y:.0296278156881593*t+.990434484573249*n-.0170738250293851*r,z:-.0092430581525912*t+.0150551448965779*n+.7518742899580008*r};return i!==void 0&&(o.alpha=i),o}},fromMode:{rgb:gr,xyz50:e=>{let{x:t,y:n,z:r,alpha:i}=e;t===void 0&&(t=0),n===void 0&&(n=0),r===void 0&&(r=0);let o={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*n+.0632593086610217*r,y:-.0283697069632081*t+1.0099954580058226*n+.021041398966943*r,z:.0123140016883199*t-.0205076964334779*n+1.3303659366080753*r};return i!==void 0&&(o.alpha=i),o}},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:xe,y:xe,z:xe,alpha:{use:xe,fixup:kt}}},DE={mode:"yiq",toMode:{rgb:({y:e,i:t,q:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);const i={mode:"rgb",r:e+.95608445*t+.6208885*n,g:e-.27137664*t-.6486059*n,b:e-1.10561724*t+1.70250126*n};return r!==void 0&&(i.alpha=r),i}},fromMode:{rgb:({r:e,g:t,b:n,alpha:r})=>{e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0);const i={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*n,i:.59597799*e-.2741761*t-.32180189*n,q:.21147017*e-.52261711*t+.31114694*n};return r!==void 0&&(i.alpha=r),i}},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:xe,i:xe,q:xe,alpha:{use:xe,fixup:kt}}},qE=e=>Math.max(0,Math.min(1,e||0)),wa=e=>Math.round(qE(e)*255),qy=cl("rgb"),jy=e=>{if(e===void 0)return;let t=wa(e.r),n=wa(e.g),r=wa(e.b);return"#"+(1<<24|t<<16|n<<8|r).toString(16).slice(1)},jE=e=>{if(e===void 0)return;let t=wa(e.alpha!==void 0?e.alpha:1);return jy(e)+(256|t).toString(16).slice(1)},Xi=e=>jy(qy(e)),FE=e=>jE(qy(e));function Gl(e){let t=cl("lrgb")(e);return .2126*t.r+.7152*t.g+.0722*t.b}function Vl(e,t){let n=Gl(e),r=Gl(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}it(RM),it(jM),it(FM),it(BM),it(VM),it(ry),it(ay),it(nE),it(rE),it(sE),it(cE),it(Tl),it(uE),it(kl),it(dE),it(_E),it(xE),it(wE),it(CE),it(OE),it(ME);const Fy=it(Iy);it(IE),it(AE),it(RE),it(ni),it(zE),it(NE),it(HE),it(DE);function vr(e){if(!e)return!1;const t=e.trim().toLowerCase();return!(t==="none"||t==="transparent"||t==="")}function By(e){const t=$n(e);return t?Gl(t)<.5:!1}var Wy=typeof global=="object"&&global&&global.Object===Object&&global,BE=typeof self=="object"&&self&&self.Object===Object&&self,Cn=Wy||BE||Function("return this")(),Jn=Cn.Symbol,Gy=Object.prototype,WE=Gy.hasOwnProperty,GE=Gy.toString,Ui=Jn?Jn.toStringTag:void 0;function VE(e){var t=WE.call(e,Ui),n=e[Ui];try{e[Ui]=void 0;var r=!0}catch(o){}var i=GE.call(e);return r&&(t?e[Ui]=n:delete e[Ui]),i}var YE=Object.prototype,XE=YE.toString;function UE(e){return XE.call(e)}var KE="[object Null]",ZE="[object Undefined]",Vy=Jn?Jn.toStringTag:void 0;function br(e){return e==null?e===void 0?ZE:KE:Vy&&Vy in Object(e)?VE(e):UE(e)}function er(e){return e!=null&&typeof e=="object"}var QE="[object Symbol]";function Pa(e){return typeof e=="symbol"||er(e)&&br(e)==QE}function JE(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var tr=Array.isArray,Yy=Jn?Jn.prototype:void 0,Xy=Yy?Yy.toString:void 0;function Uy(e){if(typeof e=="string")return e;if(tr(e))return JE(e,Uy)+"";if(Pa(e))return Xy?Xy.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var eI=/\s/;function tI(e){for(var t=e.length;t--&&eI.test(e.charAt(t)););return t}var nI=/^\s+/;function rI(e){return e&&e.slice(0,tI(e)+1).replace(nI,"")}function On(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ky=NaN,iI=/^[-+]0x[0-9a-f]+$/i,oI=/^0b[01]+$/i,aI=/^0o[0-7]+$/i,sI=parseInt;function Yl(e){if(typeof e=="number")return e;if(Pa(e))return Ky;if(On(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=On(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=rI(e);var n=oI.test(e);return n||aI.test(e)?sI(e.slice(2),n?2:8):iI.test(e)?Ky:+e}function Zy(e){return e}var cI="[object AsyncFunction]",lI="[object Function]",uI="[object GeneratorFunction]",hI="[object Proxy]";function Xl(e){if(!On(e))return!1;var t=br(e);return t==lI||t==uI||t==cI||t==hI}var Ul=Cn["__core-js_shared__"],Qy=(function(){var e=/[^.]+$/.exec(Ul&&Ul.keys&&Ul.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function dI(e){return!!Qy&&Qy in e}var fI=Function.prototype,pI=fI.toString;function _r(e){if(e!=null){try{return pI.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var gI=/[\\^$.*+?()[\]{}|]/g,mI=/^\[object .+?Constructor\]$/,yI=Function.prototype,vI=Object.prototype,bI=yI.toString,_I=vI.hasOwnProperty,xI=RegExp("^"+bI.call(_I).replace(gI,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function wI(e){if(!On(e)||dI(e))return!1;var t=Xl(e)?xI:mI;return t.test(_r(e))}function PI(e,t){return e==null?void 0:e[t]}function xr(e,t){var n=PI(e,t);return wI(n)?n:void 0}var Kl=xr(Cn,"WeakMap"),Jy=Object.create,$I=(function(){function e(){}return function(t){if(!On(t))return{};if(Jy)return Jy(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}})();function CI(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function OI(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var SI=800,MI=16,EI=Date.now;function II(e){var t=0,n=0;return function(){var r=EI(),i=MI-(r-n);if(n=r,i>0){if(++t>=SI)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function AI(e){return function(){return e}}var $a=(function(){try{var e=xr(Object,"defineProperty");return e({},"",{}),e}catch(t){}})(),TI=$a?function(e,t){return $a(e,"toString",{configurable:!0,enumerable:!1,value:AI(t),writable:!0})}:Zy,kI=II(TI);function RI(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var LI=9007199254740991,zI=/^(?:0|[1-9]\d*)$/;function e2(e,t){var n=typeof e;return t=t==null?LI:t,!!t&&(n=="number"||n!="symbol"&&zI.test(e))&&e>-1&&e%1==0&&e<t}function Zl(e,t,n){t=="__proto__"&&$a?$a(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Ca(e,t){return e===t||e!==e&&t!==t}var NI=Object.prototype,HI=NI.hasOwnProperty;function t2(e,t,n){var r=e[t];(!(HI.call(e,t)&&Ca(r,n))||n===void 0&&!(t in e))&&Zl(e,t,n)}function DI(e,t,n,r){var i=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var s=t[o],c=void 0;c===void 0&&(c=e[s]),i?Zl(n,s,c):t2(n,s,c)}return n}var n2=Math.max;function qI(e,t,n){return t=n2(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=n2(r.length-t,0),a=Array(o);++i<o;)a[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(a),CI(e,this,s)}}function jI(e,t){return kI(qI(e,t,Zy),e+"")}var FI=9007199254740991;function r2(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=FI}function Oa(e){return e!=null&&r2(e.length)&&!Xl(e)}function BI(e,t,n){if(!On(n))return!1;var r=typeof t;return(r=="number"?Oa(n)&&e2(t,n.length):r=="string"&&t in n)?Ca(n[t],e):!1}function WI(e){return jI(function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&BI(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,o)}return t})}var GI=Object.prototype;function Ql(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||GI;return e===n}function VI(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var YI="[object Arguments]";function i2(e){return er(e)&&br(e)==YI}var o2=Object.prototype,XI=o2.hasOwnProperty,UI=o2.propertyIsEnumerable,Jl=i2((function(){return arguments})())?i2:function(e){return er(e)&&XI.call(e,"callee")&&!UI.call(e,"callee")};function KI(){return!1}var a2=typeof V=="object"&&V&&!V.nodeType&&V,s2=a2&&typeof module=="object"&&module&&!module.nodeType&&module,ZI=s2&&s2.exports===a2,c2=ZI?Cn.Buffer:void 0,QI=c2?c2.isBuffer:void 0,eu=QI||KI,JI="[object Arguments]",eA="[object Array]",tA="[object Boolean]",nA="[object Date]",rA="[object Error]",iA="[object Function]",oA="[object Map]",aA="[object Number]",sA="[object Object]",cA="[object RegExp]",lA="[object Set]",uA="[object String]",hA="[object WeakMap]",dA="[object ArrayBuffer]",fA="[object DataView]",pA="[object Float32Array]",gA="[object Float64Array]",mA="[object Int8Array]",yA="[object Int16Array]",vA="[object Int32Array]",bA="[object Uint8Array]",_A="[object Uint8ClampedArray]",xA="[object Uint16Array]",wA="[object Uint32Array]",gt={};gt[pA]=gt[gA]=gt[mA]=gt[yA]=gt[vA]=gt[bA]=gt[_A]=gt[xA]=gt[wA]=!0,gt[JI]=gt[eA]=gt[dA]=gt[tA]=gt[fA]=gt[nA]=gt[rA]=gt[iA]=gt[oA]=gt[aA]=gt[sA]=gt[cA]=gt[lA]=gt[uA]=gt[hA]=!1;function PA(e){return er(e)&&r2(e.length)&&!!gt[br(e)]}function tu(e){return function(t){return e(t)}}var l2=typeof V=="object"&&V&&!V.nodeType&&V,Ki=l2&&typeof module=="object"&&module&&!module.nodeType&&module,$A=Ki&&Ki.exports===l2,nu=$A&&Wy.process,ai=(function(){try{var e=Ki&&Ki.require&&Ki.require("util").types;return e||nu&&nu.binding&&nu.binding("util")}catch(t){}})(),u2=ai&&ai.isTypedArray,h2=u2?tu(u2):PA,CA=Object.prototype,OA=CA.hasOwnProperty;function d2(e,t){var n=tr(e),r=!n&&Jl(e),i=!n&&!r&&eu(e),o=!n&&!r&&!i&&h2(e),a=n||r||i||o,s=a?VI(e.length,String):[],c=s.length;for(var l in e)(t||OA.call(e,l))&&!(a&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||e2(l,c)))&&s.push(l);return s}function f2(e,t){return function(n){return e(t(n))}}var SA=f2(Object.keys,Object),MA=Object.prototype,EA=MA.hasOwnProperty;function IA(e){if(!Ql(e))return SA(e);var t=[];for(var n in Object(e))EA.call(e,n)&&n!="constructor"&&t.push(n);return t}function AA(e){return Oa(e)?d2(e):IA(e)}function TA(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var kA=Object.prototype,RA=kA.hasOwnProperty;function LA(e){if(!On(e))return TA(e);var t=Ql(e),n=[];for(var r in e)r=="constructor"&&(t||!RA.call(e,r))||n.push(r);return n}function p2(e){return Oa(e)?d2(e,!0):LA(e)}var zA=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,NA=/^\w*$/;function HA(e,t){if(tr(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Pa(e)?!0:NA.test(e)||!zA.test(e)||t!=null&&e in Object(t)}var Zi=xr(Object,"create");function DA(){this.__data__=Zi?Zi(null):{},this.size=0}function qA(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var jA="__lodash_hash_undefined__",FA=Object.prototype,BA=FA.hasOwnProperty;function WA(e){var t=this.__data__;if(Zi){var n=t[e];return n===jA?void 0:n}return BA.call(t,e)?t[e]:void 0}var GA=Object.prototype,VA=GA.hasOwnProperty;function YA(e){var t=this.__data__;return Zi?t[e]!==void 0:VA.call(t,e)}var XA="__lodash_hash_undefined__";function UA(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Zi&&t===void 0?XA:t,this}function wr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}wr.prototype.clear=DA,wr.prototype.delete=qA,wr.prototype.get=WA,wr.prototype.has=YA,wr.prototype.set=UA;function KA(){this.__data__=[],this.size=0}function Sa(e,t){for(var n=e.length;n--;)if(Ca(e[n][0],t))return n;return-1}var ZA=Array.prototype,QA=ZA.splice;function JA(e){var t=this.__data__,n=Sa(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():QA.call(t,n,1),--this.size,!0}function eT(e){var t=this.__data__,n=Sa(t,e);return n<0?void 0:t[n][1]}function tT(e){return Sa(this.__data__,e)>-1}function nT(e,t){var n=this.__data__,r=Sa(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Hn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Hn.prototype.clear=KA,Hn.prototype.delete=JA,Hn.prototype.get=eT,Hn.prototype.has=tT,Hn.prototype.set=nT;var Qi=xr(Cn,"Map");function rT(){this.size=0,this.__data__={hash:new wr,map:new(Qi||Hn),string:new wr}}function iT(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ma(e,t){var n=e.__data__;return iT(t)?n[typeof t=="string"?"string":"hash"]:n.map}function oT(e){var t=Ma(this,e).delete(e);return this.size-=t?1:0,t}function aT(e){return Ma(this,e).get(e)}function sT(e){return Ma(this,e).has(e)}function cT(e,t){var n=Ma(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function nr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}nr.prototype.clear=rT,nr.prototype.delete=oT,nr.prototype.get=aT,nr.prototype.has=sT,nr.prototype.set=cT;var lT="Expected a function";function ru(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(lT);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ru.Cache||nr),n}ru.Cache=nr;var uT=500;function hT(e){var t=ru(e,function(r){return n.size===uT&&n.clear(),r}),n=t.cache;return t}var dT=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fT=/\\(\\)?/g,pT=hT(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(dT,function(n,r,i,o){t.push(i?o.replace(fT,"$1"):r||n)}),t});function Ji(e){return e==null?"":Uy(e)}function gT(e,t){return tr(e)?e:HA(e,t)?[e]:pT(Ji(e))}function mT(e){if(typeof e=="string"||Pa(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function yT(e,t){t=gT(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[mT(t[n++])];return n&&n==r?e:void 0}function g2(e,t,n){var r=e==null?void 0:yT(e,t);return r===void 0?n:r}function vT(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var m2=f2(Object.getPrototypeOf,Object),bT="[object Object]",_T=Function.prototype,xT=Object.prototype,y2=_T.toString,wT=xT.hasOwnProperty,PT=y2.call(Object);function $T(e){if(!er(e)||br(e)!=bT)return!1;var t=m2(e);if(t===null)return!0;var n=wT.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&y2.call(n)==PT}function CT(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}function OT(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:CT(e,t,n)}var ST="\\ud800-\\udfff",MT="\\u0300-\\u036f",ET="\\ufe20-\\ufe2f",IT="\\u20d0-\\u20ff",AT=MT+ET+IT,TT="\\ufe0e\\ufe0f",kT="\\u200d",RT=RegExp("["+kT+ST+AT+TT+"]");function v2(e){return RT.test(e)}function LT(e){return e.split("")}var b2="\\ud800-\\udfff",zT="\\u0300-\\u036f",NT="\\ufe20-\\ufe2f",HT="\\u20d0-\\u20ff",DT=zT+NT+HT,qT="\\ufe0e\\ufe0f",jT="["+b2+"]",iu="["+DT+"]",ou="\\ud83c[\\udffb-\\udfff]",FT="(?:"+iu+"|"+ou+")",_2="[^"+b2+"]",x2="(?:\\ud83c[\\udde6-\\uddff]){2}",w2="[\\ud800-\\udbff][\\udc00-\\udfff]",BT="\\u200d",P2=FT+"?",$2="["+qT+"]?",WT="(?:"+BT+"(?:"+[_2,x2,w2].join("|")+")"+$2+P2+")*",GT=$2+P2+WT,VT="(?:"+[_2+iu+"?",iu,x2,w2,jT].join("|")+")",YT=RegExp(ou+"(?="+ou+")|"+VT+GT,"g");function XT(e){return e.match(YT)||[]}function UT(e){return v2(e)?XT(e):LT(e)}function KT(e){return function(t){t=Ji(t);var n=v2(t)?UT(t):void 0,r=n?n[0]:t.charAt(0),i=n?OT(n,1).join(""):t.slice(1);return r[e]()+i}}var ZT=KT("toUpperCase");function QT(e){return ZT(Ji(e).toLowerCase())}function JT(e,t,n,r){for(var i=-1,o=e==null?0:e.length;++i<o;)n=t(n,e[i],i,e);return n}function ek(e){return function(t){return e==null?void 0:e[t]}}var tk={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},nk=ek(tk),rk=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ik="\\u0300-\\u036f",ok="\\ufe20-\\ufe2f",ak="\\u20d0-\\u20ff",sk=ik+ok+ak,ck="["+sk+"]",lk=RegExp(ck,"g");function uk(e){return e=Ji(e),e&&e.replace(rk,nk).replace(lk,"")}var hk=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function dk(e){return e.match(hk)||[]}var fk=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function pk(e){return fk.test(e)}var C2="\\ud800-\\udfff",gk="\\u0300-\\u036f",mk="\\ufe20-\\ufe2f",yk="\\u20d0-\\u20ff",vk=gk+mk+yk,O2="\\u2700-\\u27bf",S2="a-z\\xdf-\\xf6\\xf8-\\xff",bk="\\xac\\xb1\\xd7\\xf7",_k="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",xk="\\u2000-\\u206f",wk=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",M2="A-Z\\xc0-\\xd6\\xd8-\\xde",Pk="\\ufe0e\\ufe0f",E2=bk+_k+xk+wk,I2="['’]",A2="["+E2+"]",$k="["+vk+"]",T2="\\d+",Ck="["+O2+"]",k2="["+S2+"]",R2="[^"+C2+E2+T2+O2+S2+M2+"]",Ok="\\ud83c[\\udffb-\\udfff]",Sk="(?:"+$k+"|"+Ok+")",Mk="[^"+C2+"]",L2="(?:\\ud83c[\\udde6-\\uddff]){2}",z2="[\\ud800-\\udbff][\\udc00-\\udfff]",si="["+M2+"]",Ek="\\u200d",N2="(?:"+k2+"|"+R2+")",Ik="(?:"+si+"|"+R2+")",H2="(?:"+I2+"(?:d|ll|m|re|s|t|ve))?",D2="(?:"+I2+"(?:D|LL|M|RE|S|T|VE))?",q2=Sk+"?",j2="["+Pk+"]?",Ak="(?:"+Ek+"(?:"+[Mk,L2,z2].join("|")+")"+j2+q2+")*",Tk="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",kk="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Rk=j2+q2+Ak,Lk="(?:"+[Ck,L2,z2].join("|")+")"+Rk,zk=RegExp([si+"?"+k2+"+"+H2+"(?="+[A2,si,"$"].join("|")+")",Ik+"+"+D2+"(?="+[A2,si+N2,"$"].join("|")+")",si+"?"+N2+"+"+H2,si+"+"+D2,kk,Tk,T2,Lk].join("|"),"g");function Nk(e){return e.match(zk)||[]}function Hk(e,t,n){return e=Ji(e),t=t,t===void 0?pk(e)?Nk(e):dk(e):e.match(t)||[]}var Dk="['’]",qk=RegExp(Dk,"g");function F2(e){return function(t){return JT(Hk(uk(t).replace(qk,"")),e,"")}}var jk=F2(function(e,t,n){return t=t.toLowerCase(),e+(n?QT(t):t)});function Fk(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function Bk(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=Yl(n),n=n===n?n:0),t!==void 0&&(t=Yl(t),t=t===t?t:0),Fk(Yl(e),t,n)}function Wk(){this.__data__=new Hn,this.size=0}function Gk(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Vk(e){return this.__data__.get(e)}function Yk(e){return this.__data__.has(e)}var Xk=200;function Uk(e,t){var n=this.__data__;if(n instanceof Hn){var r=n.__data__;if(!Qi||r.length<Xk-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new nr(r)}return n.set(e,t),this.size=n.size,this}function Pr(e){var t=this.__data__=new Hn(e);this.size=t.size}Pr.prototype.clear=Wk,Pr.prototype.delete=Gk,Pr.prototype.get=Vk,Pr.prototype.has=Yk,Pr.prototype.set=Uk;var B2=typeof V=="object"&&V&&!V.nodeType&&V,W2=B2&&typeof module=="object"&&module&&!module.nodeType&&module,Kk=W2&&W2.exports===B2,G2=Kk?Cn.Buffer:void 0,V2=G2?G2.allocUnsafe:void 0;function Y2(e,t){if(t)return e.slice();var n=e.length,r=V2?V2(n):new e.constructor(n);return e.copy(r),r}function Zk(e,t){for(var n=-1,r=e==null?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Qk(){return[]}var Jk=Object.prototype,eR=Jk.propertyIsEnumerable,X2=Object.getOwnPropertySymbols,tR=X2?function(e){return e==null?[]:(e=Object(e),Zk(X2(e),function(t){return eR.call(e,t)}))}:Qk;function nR(e,t,n){var r=t(e);return tr(e)?r:vT(r,n(e))}function rR(e){return nR(e,AA,tR)}var au=xr(Cn,"DataView"),su=xr(Cn,"Promise"),cu=xr(Cn,"Set"),U2="[object Map]",iR="[object Object]",K2="[object Promise]",Z2="[object Set]",Q2="[object WeakMap]",J2="[object DataView]",oR=_r(au),aR=_r(Qi),sR=_r(su),cR=_r(cu),lR=_r(Kl),Dn=br;(au&&Dn(new au(new ArrayBuffer(1)))!=J2||Qi&&Dn(new Qi)!=U2||su&&Dn(su.resolve())!=K2||cu&&Dn(new cu)!=Z2||Kl&&Dn(new Kl)!=Q2)&&(Dn=function(e){var t=br(e),n=t==iR?e.constructor:void 0,r=n?_r(n):"";if(r)switch(r){case oR:return J2;case aR:return U2;case sR:return K2;case cR:return Z2;case lR:return Q2}return t});var uR=Object.prototype,hR=uR.hasOwnProperty;function dR(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&hR.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var ev=Cn.Uint8Array;function lu(e){var t=new e.constructor(e.byteLength);return new ev(t).set(new ev(e)),t}function fR(e,t){var n=lu(e.buffer);return new e.constructor(n,e.byteOffset,e.byteLength)}var pR=/\w*$/;function gR(e){var t=new e.constructor(e.source,pR.exec(e));return t.lastIndex=e.lastIndex,t}var tv=Jn?Jn.prototype:void 0,nv=tv?tv.valueOf:void 0;function mR(e){return nv?Object(nv.call(e)):{}}function rv(e,t){var n=t?lu(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var yR="[object Boolean]",vR="[object Date]",bR="[object Map]",_R="[object Number]",xR="[object RegExp]",wR="[object Set]",PR="[object String]",$R="[object Symbol]",CR="[object ArrayBuffer]",OR="[object DataView]",SR="[object Float32Array]",MR="[object Float64Array]",ER="[object Int8Array]",IR="[object Int16Array]",AR="[object Int32Array]",TR="[object Uint8Array]",kR="[object Uint8ClampedArray]",RR="[object Uint16Array]",LR="[object Uint32Array]";function zR(e,t,n){var r=e.constructor;switch(t){case CR:return lu(e);case yR:case vR:return new r(+e);case OR:return fR(e);case SR:case MR:case ER:case IR:case AR:case TR:case kR:case RR:case LR:return rv(e,n);case bR:return new r;case _R:case PR:return new r(e);case xR:return gR(e);case wR:return new r;case $R:return mR(e)}}function iv(e){return typeof e.constructor=="function"&&!Ql(e)?$I(m2(e)):{}}var NR="[object Map]";function HR(e){return er(e)&&Dn(e)==NR}var ov=ai&&ai.isMap,DR=ov?tu(ov):HR,qR="[object Set]";function jR(e){return er(e)&&Dn(e)==qR}var av=ai&&ai.isSet,FR=av?tu(av):jR,BR=1,sv="[object Arguments]",WR="[object Array]",GR="[object Boolean]",VR="[object Date]",YR="[object Error]",cv="[object Function]",XR="[object GeneratorFunction]",UR="[object Map]",KR="[object Number]",lv="[object Object]",ZR="[object RegExp]",QR="[object Set]",JR="[object String]",eL="[object Symbol]",tL="[object WeakMap]",nL="[object ArrayBuffer]",rL="[object DataView]",iL="[object Float32Array]",oL="[object Float64Array]",aL="[object Int8Array]",sL="[object Int16Array]",cL="[object Int32Array]",lL="[object Uint8Array]",uL="[object Uint8ClampedArray]",hL="[object Uint16Array]",dL="[object Uint32Array]",ft={};ft[sv]=ft[WR]=ft[nL]=ft[rL]=ft[GR]=ft[VR]=ft[iL]=ft[oL]=ft[aL]=ft[sL]=ft[cL]=ft[UR]=ft[KR]=ft[lv]=ft[ZR]=ft[QR]=ft[JR]=ft[eL]=ft[lL]=ft[uL]=ft[hL]=ft[dL]=!0,ft[YR]=ft[cv]=ft[tL]=!1;function Ea(e,t,n,r,i,o){var a,s=t&BR;if(a!==void 0)return a;if(!On(e))return e;var c=tr(e);if(c)a=dR(e);else{var l=Dn(e),u=l==cv||l==XR;if(eu(e))return Y2(e,s);if(l==lv||l==sv||u&&!i)a=u?{}:iv(e);else{if(!ft[l])return i?e:{};a=zR(e,l,s)}}o||(o=new Pr);var h=o.get(e);if(h)return h;o.set(e,a),FR(e)?e.forEach(function(g){a.add(Ea(g,t,n,g,e,o))}):DR(e)&&e.forEach(function(g,y){a.set(y,Ea(g,t,n,y,e,o))});var d=rR,f=c?void 0:d(e);return RI(f||e,function(g,y){f&&(y=g,g=e[y]),t2(a,y,Ea(g,t,n,y,e,o))}),a}var fL=1,pL=4;function uv(e){return Ea(e,fL|pL)}function gL(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var c=a[++i];if(n(o[c],c,o)===!1)break}return t}}var mL=gL();function uu(e,t,n){(n!==void 0&&!Ca(e[t],n)||n===void 0&&!(t in e))&&Zl(e,t,n)}function yL(e){return er(e)&&Oa(e)}function hu(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function vL(e){return DI(e,p2(e))}function bL(e,t,n,r,i,o,a){var s=hu(e,n),c=hu(t,n),l=a.get(c);if(l){uu(e,n,l);return}var u=o?o(s,c,n+"",e,t,a):void 0,h=u===void 0;if(h){var d=tr(c),f=!d&&eu(c),g=!d&&!f&&h2(c);u=c,d||f||g?tr(s)?u=s:yL(s)?u=OI(s):f?(h=!1,u=Y2(c,!0)):g?(h=!1,u=rv(c,!0)):u=[]:$T(c)||Jl(c)?(u=s,Jl(s)?u=vL(s):(!On(s)||Xl(s))&&(u=iv(c))):h=!1}h&&(a.set(c,u),i(u,c,r,o,a),a.delete(c)),uu(e,n,u)}function hv(e,t,n,r,i){e!==t&&mL(t,function(o,a){if(i||(i=new Pr),On(o))bL(e,t,a,n,hv,r,i);else{var s=r?r(hu(e,a),o,a+"",e,t,i):void 0;s===void 0&&(s=o),uu(e,a,s)}},p2)}var _L=F2(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),dv=WI(function(e,t,n){hv(e,t,n)});function eo(e,t){if(t.length===0)return{};const n=Array.isArray(e)?e[t[0]]:e.items[t[0]];if(t.length===1)return n;const r=t.slice(1).map(i=>`children[${i}]`).join(".");return g2(n,r)}function fv(e){const{structure:t,item:n,items:r}=e;return!(!t||!n||r.some(i=>!i))}const xL=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","-apple-system","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]);function $r(e){const t=[];let n="",r=null;const i=()=>{const o=n.trim();o&&t.push(o),n=""};for(let o=0;o<e.length;o+=1){const a=e[o];if(r){n+=a,a===r&&(r=null);continue}if(a==='"'||a==="'"){r=a,n+=a;continue}if(a===","){i();continue}n+=a}return i(),t}function pv(e){const t=e.trim();return t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")?t.slice(1,-1):t}function wL(e){const t=e.trim();return t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'")}function PL(e){return/^\d/.test(e)||/\s/.test(e)}function $L(e){const t=e.trim();if(!t||wL(t)||xL.has(t.toLowerCase())||!PL(t))return t;const n=t.includes('"')&&!t.includes("'")?"'":'"';return`${n}${t}${n}`}function ci(e){const t=$r(e);return t.length?t.length===1?pv(t[0]):t.map(n=>pv(n)).join(", "):""}function Cr(e){const t=$r(e);return t.length?t.map(n=>$L(n)).join(", "):e.trim()}const CL={100:"thin",hairline:"thin",thin:"thin",200:"extralight",ultralight:"extralight",extralight:"extralight",300:"light",light:"light",400:"regular",normal:"regular",regular:"regular",500:"medium",medium:"medium",600:"semibold",demibold:"semibold",semibold:"semibold",700:"bold",bold:"bold",800:"extrabold",ultrabold:"extrabold",extrabold:"extrabold",900:"black",heavy:"black",black:"black",950:"extrablack",ultrablack:"extrablack",extrablack:"extrablack"};function gv(e){const t=String(e).toLowerCase();return CL[t]||"regular"}const Ia=new Map;let OL="sans-serif";const SL={fontFamily:"sans-serif",fontWeight:400,fontStyle:"normal",unitsPerEm:2048,metrics:{ascender:2189,descender:-555,lineGap:0},glyphs:{'"':727,"%":1821,"'":391,"(":682,")":682,"*":797,"+":1196,"-":682,"<":1196,"=":1196,">":1196,"@":2079,C:1479,D:1479,F:1251,G:1593,H:1479,J:1024,M:1706,N:1479,O:1593,Q:1593,R:1479,T:1251,U:1479,W:1933,Z:1251,"^":961,_:1024,"`":682,c:1024,i:455,j:455,k:1024,l:455,m:1706,r:682,s:1024,v:1024,w:1479,x:1024,y:1024,z:1024,"{":684,"|":532,"}":684,"~":1196},glyphsByWidth:{569:" !,./:;I[\\]ft",1139:"#$0123456789?Labdeghnopqu",1366:"&ABEKPSVXY"},defaultWidth:1139};function mv(e){if(e===void 0||e==="normal")return"400";if(e==="bold")return"700";const t={thin:"100",hairline:"100","extra-light":"200","ultra-light":"200",light:"300",regular:"400",normal:"400",medium:"500","semi-bold":"600",semibold:"600","demi-bold":"600",demibold:"600","extra-bold":"800",extrabold:"800","ultra-bold":"800",ultrabold:"800",black:"900",heavy:"900","extra-black":"950",extrablack:"950","ultra-black":"950",ultrablack:"950",bolder:"900",lighter:"300"};if(typeof e=="string"){const n=e.toLowerCase();return t[n]||e}return String(e)}function yv(e){return e||"normal"}function ML(e){const t=e.fontFamily,n=mv(e.fontWeight),r=yv(e.fontStyle);if(e.glyphsByWidth){const a=Tt({},e.glyphs||{});for(const[s,c]of Object.entries(e.glyphsByWidth))if(typeof c=="string"){const l=Number(s);for(const u of c)a[u]=l}else a[s]=c;e=Kt(Tt({},e),{glyphs:a,glyphsByWidth:void 0})}Ia.has(t)||Ia.set(t,new Map);const i=Ia.get(t);i.has(n)||i.set(n,new Map),i.get(n).set(r,e)}function EL(e,t,n){const r=e||OL,i=mv(t),o=yv(n),a=Ia.get(r);if(!a)return console.warn(`Font family "${r}" not registered, using fallback font data`),SL;let s=a.get(i);if(s){let l=s.get(o);if(l||o!=="normal"&&(l=s.get("normal"),l))return l;const u=s.values().next().value;if(u)return u}if(s=a.get("400"),s){let l=s.get(o);if(l||o!=="normal"&&(l=s.get("normal"),l))return l;const u=s.values().next().value;if(u)return u}const c=a.values().next().value;if(c){const l=c.values().next().value;if(l)return l}throw new Error(`No font data found for family "${r}" with weight "${i}" and style "${o}"`)}function IL(e,t){if(!t||t==="none")return e;switch(t){case"uppercase":return e.toUpperCase();case"lowercase":return e.toLowerCase();case"capitalize":return e.split(" ").map(n=>n.length===0?n:n[0].toUpperCase()+n.slice(1).toLowerCase()).join(" ");default:return e}}function vv(e){if(e===void 0)return 14;if(typeof e=="number")return e;const t=parseFloat(e);return isNaN(t)?16:t}function AL(e,t){const n=vv(e.fontSize),r=e.lineHeight;if(r===void 0){const{ascender:i,descender:o,lineGap:a=0}=t.metrics;return(i-o+a)/t.unitsPerEm*n}return typeof r=="number"?r*n:r.type==="pixel"?r.value:r.type==="percent"?r.value/100*n:n}function TL(e,t={}){var d;const n=IL(e,t.textTransform),r=EL(t.fontFamily,t.fontWeight,t.fontStyle),i=vv(t.fontSize),o=t.letterSpacing||0,a=t.wordSpacing||0;let s=0;const c=Array.from(n);for(let f=0;f<c.length;f++){const g=c[f],y=f<c.length-1?c[f+1]:void 0;let m=(d=r.glyphs)==null?void 0:d[g];m===void 0&&(m=r.defaultWidth||r.unitsPerEm/2);const v=m/r.unitsPerEm*i;if(s+=v,y&&r.kerning){const b=g+y,_=r.kerning[b];_!==void 0&&(s+=_/r.unitsPerEm*i)}f<c.length-1&&(s+=o),g===" "&&(s+=a)}const l=AL(t,r),{ascender:u}=r.metrics,h=u/r.unitsPerEm*i;return{width:s,height:l,baseline:h}}const kL={fontFamily:"Alibaba PuHuiTi",fontWeight:400,fontStyle:"normal",unitsPerEm:1e3,metrics:{ascender:1060,descender:-340,lineGap:0},glyphs:{" ":257,"!":361,'"':405,"#":600,"%":821,"&":640,"'":253,"(":359,")":359,"*":430,",":302,"-":440,".":302,"/":500,":":378,";":378,"?":431,"@":860,B:620,C:599,D:699,F:527,G:685,H:708,J:271,K:614,L:507,M:830,N:737,P:597,R:614,S:566,T:528,V:617,W:898,X:624,Y:594,Z:626,"[":294,"\\":510,"]":294,_:500,"`":346,b:635,c:497,d:635,f:349,g:636,k:518,l:286,m:921,p:635,q:636,r:379,s:479,t:337,v:526,w:828,x:516,y:527,z:506,"{":299,"|":183,"}":299," ":257,"¡":357,"¦":183,"§":479,"¨":346,"©":806,ª:483,"«":511,"­":440,"®":404,"¯":346,"°":363,"´":346,"¶":593,"·":357,"¸":346,º:445,"»":511,"¼":902,"½":914,"¾":902,"¿":431,Æ:889,Ç:599,Ð:719,Ñ:737,Ý:594,Þ:597,ß:610,æ:926,ç:497,ý:527,þ:635,ÿ:527,Ć:599,ć:497,Ĉ:599,ĉ:497,Ċ:599,ċ:497,Č:599,č:497,Ď:699,ď:640,Đ:719,đ:635,Ĝ:685,ĝ:636,Ğ:685,ğ:636,Ġ:685,ġ:636,Ģ:685,ģ:636,Ĥ:708,Ħ:708,IJ:545,ij:536,Ĵ:271,Ķ:614,ķ:518,ĸ:518,Ĺ:507,ĺ:286,Ļ:507,ļ:286,Ľ:507,ľ:290,Ŀ:507,ŀ:291,Ł:507,ł:286,Ń:737,Ņ:737,Ň:737,ʼn:669,Ŋ:737,Œ:987,œ:917,Ŕ:614,ŕ:379,Ŗ:614,ŗ:379,Ř:614,ř:379,Ś:566,ś:479,Ŝ:566,ŝ:479,Ş:566,ş:479,Š:566,š:479,Ţ:528,ţ:337,Ť:528,ť:340,Ŧ:528,ŧ:337,Ŵ:898,ŵ:828,Ŷ:594,ŷ:527,Ÿ:594,Ź:626,ź:506,Ż:626,ż:506,Ž:626,ž:506,ſ:310,Ə:719,ǎ:608,ǐ:265,ǒ:614,ǔ:609,ǖ:609,ǘ:609,ǚ:609,ǜ:609,Ǽ:889,ǽ:926,Ș:566,ș:479,Ț:528,ț:337,"ʹ":255,"͵":255,";":378,"΄":346,"΅":346,Ά:670,"·":357,Έ:628,Ή:779,Ί:346,Ό:765,Ύ:726,Ώ:765,ΐ:312,Β:620,Γ:507,Ζ:626,Η:708,Κ:614,Λ:617,Μ:830,Ν:737,Π:708,Ρ:597,Σ:596,Τ:528,Υ:594,Φ:831,Χ:624,Ψ:804,Ϋ:594,έ:509,ή:643,ί:312,ΰ:593,β:610,γ:526,ε:509,ζ:465,η:643,θ:638,ι:312,κ:518,λ:514,ν:526,ξ:465,π:616,ρ:619,ς:497,σ:639,τ:437,υ:593,φ:774,χ:509,ψ:745,ω:782,ϊ:312,ϋ:593,ύ:593,ώ:782,"‐":440,"‑":440,"–":495,"—":684,"―":684,"‗":500,"‘":270,"’":270,"‚":270,"‛":270,"“":784,"”":784,"„":468,"†":500,"‡":500,"•":308,"…":1085,"‰":1174,"′":256,"″":472,"‴":689,"‵":256,"‶":472,"‷":689,"‹":312,"›":312,"‼":589,"‽":433,"‾":500,"⁄":120,"⁺":407,"⁻":407,"⁼":407,"⁽":225,"⁾":225,ⁿ:486,"₊":407,"₋":407,"₌":407,"₍":225,"₎":225,"ₙ":486,"₡":599,"₣":527,"₤":600,"₥":921,"₦":625,"₨":1093,"₩":769,"₪":754,"₫":635,"₭":614,"₮":528,"₯":1288,"₰":950,"₲":685,"₴":576,"₵":599,"₶":576,"₷":700,"₸":528,"₻":750,"₼":683,"₾":577,"₿":620,"℃":915,"℅":825,"℉":868,ℓ:385,"№":1176,"℗":806,"℡":1022,"™":903,"℮":903,"⅛":930,"⅜":931,"⅝":931,"⅞":871,"Ⅶ":1166,"∂":587,"∈":663,"∏":708,"∑":596,"√":604,"∞":679,"∧":617,"∫":531,"∮":654,"≈":600,"≒":662,"◊":600," ":0,"〞":472},glyphsByWidth:{268:"ijìíîïĩīĭįıĵȷ",274:"IÌÍÎÏĨĪĬĮİΙΪ",406:"²³¹⁰⁴⁵⁶⁷⁸⁹₀₁₂₃₄₅₆₇₈₉",552:"+<=>^~¬±×÷−∕∙≠≤≥≦≧≮≯",556:"EÈÉÊËĒĔĖĘĚΕΞ",575:"$0123456789¢£¤¥ƒ₢₧€₱₹₺₽",578:"eèéêëēĕėęě",612:"aàáâãäåāăąǻ",613:"uµùúûüũūŭůűųάαμ∨",618:"hnoðñòóôõöøĥħńņňŋōŏőǿδοό",667:"AÀÁÂÃÄÅĀĂĄǺΑΔ₳∆",701:"UÙÚÛÜŨŪŬŮŰŲ",743:"OQÒÓÔÕÖØŌŎŐǾΘΟΩΩ",1e3:"─━│┃┄┅┆┇┈┉┊┋┌┍┎┏┐┑┒┓└┕┖┗┘┙┚┛├┝┞┟┠┡┢┣┤┥┦┧┨┩┪┫┬┭┮┯┰┱┲┳┴┵┶┷┸┹┺┻┼┽┾┿╀╁╂╃╄╅╆╇╈╉╊╋═║╒╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡╢╣╤╥╦╧╨╩╪╫╬╭╮╯╰╱╲╳▁▂▃▄▅▆▇█▉▊▋▌▍▎▏▓▔▕■□▲△▼▽◆◇○◎●◢◣◤◥★☆☉♀♂〾"},defaultWidth:984,kerning:{'""':-56,"\"'":-57,'",':-179,'".':-179,"'\"":-56,"''":-57,"',":-179,"'.":-179,"(j":60,',"':-160,",'":-160,",1":-140,",7":-41,",9":-39,'."':-160,".'":-160,".1":-140,".7":-41,".9":-39,"//":-120,"1,":-99,"1.":-99,"1:":-99,"1;":-99,"7,":-160,"7.":-160,"7:":-99,"7;":-99,":1":-79,":7":-59,";1":-79,";7":-59,'A"':-100,"A'":-100,AC:-20,AG:-20,AO:-20,AQ:-20,AT:-80,AU:-10,AV:-70,AW:-39,AY:-81,Af:-20,Al:-10,At:-20,Av:-20,Ay:-20,BC:-10,BG:-10,BO:-10,BQ:-10,BT:-40,BV:-20,BX:-20,BY:-21,"D,":-59,"D.":-59,DA:-20,DT:-36,DV:-30,DW:-19,DX:-20,DY:-40,DZ:-20,Da:-39,Ej:19,"F,":-159,"F.":-159,FA:-40,Fa:-59,Fh:1,Fk:1,GV:-11,GY:-21,JJ:7,KA:-19,KC:-20,KG:-20,KO:-20,KQ:-20,KT:-19,KU:-39,KV:-39,KW:-39,KY:-40,Kc:-39,Kd:-39,Ke:-39,Kg:-39,Kl:-39,Ko:-39,Kq:-39,Ks:-19,Kt:-10,Ku:-40,Kv:-60,Kw:-40,Ky:-60,'L"':-99,"L'":-99,LA:20,LC:-59,LG:-59,LO:-59,LQ:-59,LT:-79,LU:-19,LV:-79,LW:-39,LY:-100,Lv:-41,Lw:-21,Ly:-41,"O,":-59,"O.":-59,OA:-20,OT:-36,OV:-30,OW:-19,OX:-20,OY:-40,OZ:-20,Oa:-39,"P,":-199,"P.":-199,PA:-60,PT:-29,PV:-10,PW:-10,PX:-50,PY:-20,PZ:-39,Pa:-60,"Q,":-59,"Q.":-59,QA:-20,QJ:7,QT:-36,QV:-30,QW:-19,QX:-20,QY:-40,QZ:-20,Qa:-39,RC:-15,RG:-15,RO:-15,RQ:-15,RT:-40,RU:-10,RV:-21,RW:-10,RX:-29,RY:-41,Rc:-20,Rd:-20,Re:-20,Rg:-20,Ro:-20,Rq:-20,Rt:-20,Ru:-10,Rv:-10,Rx:20,Ry:-10,"S,":-20,"S.":-20,SS:-1,ST:-1,SV:-21,SW:-10,SY:-21,St:-1,Sv:-20,Sw:-10,Sx:-1,Sy:-20,'T"':2,"T'":2,"T,":-154,"T.":-154,TA:-80,TC:-20,TG:-20,TO:-20,TQ:-20,TS:-1,Ta:-80,Tc:-59,Td:-59,Te:-59,Tg:-59,Ti:-20,Tj:-19,Tm:-59,Tn:-59,To:-59,Tp:-58,Tq:-59,Tr:-59,Ts:-60,Tt:20,Tu:-79,Tv:-39,Tw:-19,Tx:-39,Ty:-39,Tz:-59,UA:-10,UX:-19,Ux:-1,"V,":-140,"V.":-140,"V:":-41,"V;":-41,VA:-70,VC:-30,VG:-30,VO:-30,VQ:-30,VS:-10,Va:-41,Vc:-21,Vd:-21,Ve:-21,Vg:-21,Vh:1,Vk:1,Vo:-21,Vq:-21,Vs:-21,Vv:-1,Vy:-1,"W,":-79,"W.":-79,"W:":-39,"W;":-39,WA:-40,WC:-19,WG:-19,WO:-19,WQ:-19,Wa:-40,Wc:-20,Wd:-20,We:-20,Wg:-20,Wo:-20,Wq:-20,Ws:-20,XA:-19,XC:-20,XG:-20,XO:-20,XQ:-20,XT:-19,XU:-39,XV:-39,XW:-39,XY:-40,Xc:-39,Xd:-39,Xe:-39,Xg:-39,Xl:-39,Xo:-39,Xq:-39,Xs:-19,Xt:-10,Xu:-40,Xv:-60,Xw:-40,Xy:-60,'Y"':1,"Y'":1,"Y,":-141,"Y.":-141,"Y:":-60,"Y;":-60,YA:-81,YC:-40,YG:-40,YO:-40,YQ:-40,YS:-1,Ya:-101,Yc:-60,Yd:-60,Ye:-60,Yf:-1,Yg:-60,Yh:1,Yi:-19,Yk:1,Ym:-41,Yn:-41,Yo:-60,Yp:-40,Yq:-60,Yr:-41,Ys:-61,Yt:-1,Yu:-40,Yv:-40,Yx:-41,Yy:-40,Yz:-41,ZC:-20,ZG:-20,ZO:-20,ZQ:-20,"[j":80,aT:-60,aV:-21,aY:-61,av:-10,aw:-10,ay:-10,"b,":-40,"b.":-40,bT:-59,bV:-21,bW:-20,bX:-39,bY:-60,bv:-10,bx:-20,by:-10,"e,":-20,"e.":-20,eT:-59,eY:-40,ej:20,'f"':3,"f'":3,"f)":1,"f*":61,"f,":-1,"f.":-1,"f?":40,fT:40,fV:21,fW:21,fX:21,fY:1,"f]":21,fa:-29,fc:-19,fd:-19,fe:-19,ff:1,fg:-39,fh:-19,fi:-19,fj:-19,fk:-19,fl:-19,fo:-19,fq:-19,fs:-19,ft:1,"f}":3,hT:-58,hY:-39,hv:-10,hy:-10,'i"':2,"i'":2,"i)":2,"i?":3,iT:-20,"i]":41,"i}":22,jT:-20,kT:-39,kU:-1,kW:-20,ka:-20,kc:-20,kd:-20,ke:-20,kg:-20,kl:-20,ko:-20,kq:-20,ku:-10,lf:-20,lv:-19,lw:-10,ly:-19,mT:-58,mY:-39,mv:-10,my:-10,nT:-58,nY:-39,nv:-10,ny:-10,"o,":-40,"o.":-40,oT:-59,oV:-21,oW:-20,oX:-39,oY:-60,ov:-10,ox:-20,oy:-10,"p,":-40,"p.":-40,pT:-59,pV:-21,pW:-20,pX:-39,pY:-60,pv:-10,px:-20,py:-10,qT:-19,qY:-19,qj:20,'r"':2,"r'":2,"r,":-90,"r.":-90,ra:-49,rc:-19,rd:-19,re:-19,rf:1,ro:-19,rq:-19,rt:20,sT:-59,sV:-21,sW:-20,sX:-19,sY:-60,sv:-19,sx:-10,sy:-19,tf:1,uT:-40,uY:-19,"v,":-90,"v.":-90,vT:-39,vX:-39,va:-35,vc:-10,vd:-10,ve:-10,vo:-10,vq:-10,"w,":-50,"w.":-50,wT:-19,wX:-39,wa:-30,xT:-39,xU:-1,xW:-20,xa:-20,xc:-20,xd:-20,xe:-20,xg:-20,xl:-20,xo:-20,xq:-20,xu:-10,"y,":-90,"y.":-90,yT:-39,yX:-39,ya:-35,yc:-10,yd:-10,ye:-10,yo:-10,yq:-10,zT:-59,"{h":2,"{j":79,"{k":2}};var RL=(e,t,n)=>new Promise((r,i)=>{var o=c=>{try{s(n.next(c))}catch(l){i(l)}},a=c=>{try{s(n.throw(c))}catch(l){i(l)}},s=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);s((n=n.apply(e,t)).next())});const li=new WeakMap;function LL(e){const t=li.get(e);return t?Array.from(t.values()):[]}function bv(e,t){var n;return(n=li.get(e))==null?void 0:n.get(t)}function _v(e,t,n){let r=li.get(e);return r||(r=new Map,li.set(e,r)),r.set(t,n),n.finally(()=>{const i=li.get(e);i&&(i.get(t)===n&&i.delete(t),i.size===0&&li.delete(e))}),n}function zL(e){return RL(this,null,function*(){for(yield Promise.resolve();;){const t=LL(e);if(!t.length)break;yield Promise.allSettled(t),yield Promise.resolve()}})}var NL=Object.defineProperty,xv=Object.getOwnPropertySymbols,HL=Object.prototype.hasOwnProperty,DL=Object.prototype.propertyIsEnumerable,wv=(e,t,n)=>t in e?NL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qL=(e,t)=>{for(var n in t||(t={}))HL.call(t,n)&&wv(e,n,t[n]);if(xv)for(var n of xv(t))DL.call(t,n)&&wv(e,n,t[n]);return e};const du=new Map;let fu="Alibaba PuHuiTi";function pu(e){const t=$r(e);for(const n of t){const r=du.get(ci(n));if(r)return r}return null}function gu(){return Array.from(du.values())}function jL(e){fu=Cr(e)}function Pv(e){const t=qL({},e);return du.set(t.fontFamily,t),t.fontFamily=Cr(t.fontFamily),t}function $v(e){const t=$r(e).flatMap(n=>{const r=pu(n);if(!r)return[];const{baseUrl:i,fontWeight:o}=r;return Object.values(o).filter(a=>!!a).map(a=>Wu(i,a))});return Array.from(new Set(t))}function FL(e,t){const n=$r(e);let r=null;for(const a of n)if(r=pu(a),r)break;if(!r)return null;const i=gv(t),o=r.fontWeight[i];return o?Wu(r.baseUrl,o.replace(/\/result.css$/,"")):null}const mu=new WeakMap,to=new WeakMap;function Cv(e,t,n){let r=to.get(e);return r||(r=new Map,to.set(e,r)),r.set(t,n),n.finally(()=>{const i=to.get(e);i&&(i.get(t)===n&&i.delete(t),i.size===0&&to.delete(e))}),n}function BL(e){if(e.getAttribute("data-infographic-font-loaded")==="true")return!0;try{return!!e.sheet}catch(t){return!1}}function WL(e,t,n){var r;const i=(r=to.get(e))==null?void 0:r.get(t);if(i)return i;if(!n||BL(n))return Cv(e,t,Promise.resolve());const o=new Promise(a=>{const s=()=>{n.setAttribute("data-infographic-font-loaded","true"),a()};n.addEventListener("load",s,{once:!0}),n.addEventListener("error",s,{once:!0})});return Cv(e,t,o)}function GL(e,t){const n=e.ownerDocument,r=(n==null?void 0:n.head)||document.head;if(!r)return;mu.has(r)||mu.set(r,new Map);const i=mu.get(r),o=$v(t);if(!o.length)return;const a=[];o.forEach(s=>{const c=`${t}-${s}`,l=`font:${c}`;if(bv(e,l))return;let u=i.get(c);u||(u=n.createElement("link"),u.id=c,u.rel="stylesheet",u.href=s,a.push(u),i.set(c,u));const h=WL(r,c,u);_v(e,l,h)}),a.length&&r.tagName==="HEAD"&&a.forEach(s=>r.appendChild(s))}function VL(e){if(Bu)return;gu().forEach(n=>GL(e,n.fontFamily))}const no="https://assets.antv.antgroup.com",ui=e=>`${e}/result.css`;[{fontFamily:"Alibaba PuHuiTi",name:"阿里巴巴普惠体",baseUrl:no,fontWeight:{regular:ui("AlibabaPuHuiTi-Regular"),bold:ui("AlibabaPuHuiTi-Bold")}},{fontFamily:"Source Han Sans",name:"黑体",baseUrl:no,fontWeight:{regular:ui("SourceHanSansCN-Regular")}},{fontFamily:"Source Han Serif",name:"宋体",baseUrl:no,fontWeight:{regular:ui("SourceHanSerifCN-Regular")}},{fontFamily:"LXGW WenKai",name:"楷体",baseUrl:no,fontWeight:{regular:ui("LXGWWenKai-Regular")}},{fontFamily:"851tegakizatsu",name:"手写体",baseUrl:no,fontWeight:{regular:ui("851tegakizatsu-Regular")}}].forEach(Pv);const yu=new Map;function vu(e,t){yu.set(e,t)}function Ov(e){return yu.get(e)}function YL(){return Object.fromEntries(yu)}vu("antv",["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F","#70CAF8"]),vu("spectral",(e,t,n)=>{const r=[["#fc8d59","#ffffbf","#99d594"],["#d7191c","#fdae61","#abdda4","#2b83ba"],["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]],i=Math.min(Math.max(n,3),11);return r[i-3][t%i]});const Aa=(e=[],t,n)=>{var r;const i=typeof e=="string"?Ov(e)||[]:e,o=(r=t[0])!=null?r:0;if(typeof i=="function"){const a=n?o/n:0;return i(a,o,n!=null?n:0)}if(Array.isArray(i))return i.length===0?void 0:i[o%i.length]};function XL(e,t){var n,r;if(((n=t.svg)==null?void 0:n.background)===!1)return;const{themeConfig:{colorBg:i}}=t;if(!i)return;const o=e.parentElement;o&&(o.style.backgroundColor=i||"none");const a=gi(e,Ue.Background);if(e.style.backgroundColor=i,a)a.setAttribute("fill",i);else if((r=e.viewBox)!=null&&r.baseVal){const{x:s,y:c,width:l,height:u}=e.viewBox.baseVal,h=Se("rect",{x:s,y:c,width:l,height:u,fill:i,"data-element-type":Ue.Background});e.prepend(h)}}function ro(e,t){return Object.entries(t).reduce((r,[i,o])=>{if(typeof o=="function"){const a=o(e.getAttribute(i),e);a!=null&&(r[i]=a)}else Object.assign(r,{[i]:o});return r},{})}function Sv(e){return e.replace(/#|%|\.| |\/|\(|\)/g,"").replace(/,/g,"-")}function UL(e,t){t&&Object.keys(t).length>0&&pi(e,n=>{const r=ro(n,t);ut(n,r)})}const Mv="btn-add-icon",Ev="btn-remove-icon";function KL(e,t){ut(t,{display:"none"});const n=t.querySelectorAll('[id^="btn-add-"]'),r=t.querySelectorAll('[id^="btn-remove-"]');QL(e),n.forEach(JL),r.forEach(ez)}const ZL="btn-icon-defs";function QL(e){const t=Se("defs");uo(t,ZL);const n=fi(`<symbol class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200">
13
5
  <path
14
6
  d="M512 1024C229.216 1024 0 794.784 0 512S229.216 0 512 0s512 229.216 512 512-229.216 512-512 512z m0-960C264.576 64 64 264.576 64 512s200.576 448 448 448 448-200.576 448-448S759.424 64 512 64z m192 480h-160v160a32 32 0 0 1-64 0v-160h-160a32 32 0 0 1 0-64h160v-160a32 32 0 0 1 64 0v160h160a32 32 0 0 1 0 64z"
15
7
  fill="#339900"></path>
16
- </symbol>`);n&&(n.setAttribute("id",Nf),e.appendChild(n));const r=Ir(`<symbol viewBox="0 0 1025 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200">
8
+ </symbol>`);n&&(n.setAttribute("id",Mv),t.appendChild(n));const r=fi(`<symbol viewBox="0 0 1025 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200">
17
9
  <path d="M874.971429 149.942857C776.228571 54.857143 648.228571 0 512.914286 0S245.942857 54.857143 150.857143 149.942857c-201.142857 201.142857-201.142857 522.971429 0 724.114286C245.942857 969.142857 377.6 1024 512.914286 1024s266.971429-54.857143 362.057143-149.942857c201.142857-201.142857 201.142857-522.971429 0-724.114286m-51.2 672.914286C739.657143 906.971429 629.942857 950.857143 512.914286 950.857143s-226.742857-43.885714-310.857143-128c-171.885714-171.885714-171.885714-449.828571 0-621.714286C286.171429 117.028571 395.885714 73.142857 512.914286 73.142857s226.742857 43.885714 310.857143 128c171.885714 171.885714 171.885714 449.828571 0 621.714286" fill="#E63C33"></path>
18
10
  <path d="M772.571429 475.428571H253.257143c-21.942857 0-36.571429 14.628571-36.571429 36.571429 0 10.971429 3.657143 18.285714 10.971429 25.6s14.628571 10.971429 25.6 10.971429H768.914286c21.942857 0 36.571429-14.628571 36.571428-36.571429s-14.628571-36.571429-32.914285-36.571429" fill="#E63C33"></path>
19
- </symbol>`);r&&(r.setAttribute("id",jf),e.appendChild(r)),t.prepend(e)}function Wf(t,e){const{id:n,x:r=0,y:i=0,width:o=0,height:s=0}=De(t,["id","x","y","width","height"]),a=bt("g",{id:n,class:"btn-group",transform:`translate(${r}, ${i})`}),l=t.getAttribute("data-items");l&&a.setAttribute("data-items",l);const c=Math.max(+o,+s)/2,h=bt("circle",{cx:c,cy:c,r:c,fill:"#fff",stroke:"transparent"});a.appendChild(h);const u=bt("use",{href:`#${e}`,width:o,height:s});a.appendChild(u),a.style.cursor="pointer",t.replaceWith(a)}function E_(t){Wf(t,Nf)}function I_(t){Wf(t,jf)}var A_=Object.defineProperty,Ff=Object.getOwnPropertySymbols,T_=Object.prototype.hasOwnProperty,k_=Object.prototype.propertyIsEnumerable,Bf=(t,e,n)=>e in t?A_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,jl=(t,e)=>{for(var n in e||(e={}))T_.call(e,n)&&Bf(t,n,e[n]);if(Ff)for(var n of Ff(e))k_.call(e,n)&&Bf(t,n,e[n]);return t};function L_(t,e,n,r){var i;const o=n.icon;if(!o)return null;const{themeConfig:s}=r,a=jl({},(i=s.item)==null?void 0:i.icon),l=xi(e,a);return z_(t,e,o,l,n)}function z_(t,e,n,r,i){return Pf(t,"icon",n,i),e_(n,jl(jl({},De(e,["id","x","y","width","height","fill","stroke","data-element-type","data-indexes"])),r))}var H_=Object.defineProperty,R_=Object.defineProperties,D_=Object.getOwnPropertyDescriptors,Ho=Object.getOwnPropertySymbols,Yf=Object.prototype.hasOwnProperty,Vf=Object.prototype.propertyIsEnumerable,Xf=(t,e,n)=>e in t?H_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ro=(t,e)=>{for(var n in e||(e={}))Yf.call(e,n)&&Xf(t,n,e[n]);if(Ho)for(var n of Ho(e))Vf.call(e,n)&&Xf(t,n,e[n]);return t},Gf=(t,e)=>R_(t,D_(e)),N_=(t,e)=>{var n={};for(var r in t)Yf.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ho)for(var r of Ho(t))e.indexOf(r)<0&&Vf.call(t,r)&&(n[r]=t[r]);return n};function qf(t,e,n,r){if(!n)return null;const i=Ao(n);if(!i)return null;const o=Sl(i),s=W_(t,e,o);Pf(t,"illus",i,r);const{data:a,color:l}=i;return F_(o,Ro(Gf(Ro({},B_(e)),{"clip-path":`url(#${s})`}),l?{color:l}:{}),a)}function j_(t,e,n){const r=n.illus;return qf(t,e,r,n)}function W_(t,e,n){const r=`clip-${n}-${PP()}`;if(t.querySelector(`#${r}`))return r;const i=Eo(t),o=bt("clipPath",{id:r}),s=e.cloneNode();return Gw(s,["id","data-illus-bounds","data-element-type"]),o.appendChild(s),i.appendChild(o),r}function F_(t,e,n){const r=e,{"clip-path":i}=r,o=N_(r,["clip-path"]),{x:s="0",y:a="0",width:l="0",height:c="0"}=o,h=bt("rect",{id:`${t}-volume`,"data-element-type":zt.IllusVolume,x:s,y:a,width:l,height:c,fill:"transparent"}),u=bt("g",{"data-element-type":zt.IllusGroup,"clip-path":i,id:`${t}-group`});u.appendChild(h);const f=bt("use",Gf(Ro({id:t,fill:"lightgray"},o),{href:_f(n),"data-element-type":zt.Illus}));return u.appendChild(f),u}function B_(t){const e=t.getAttribute("data-illus-bounds");if(!e)return Ro({x:"0",y:"0",width:"0",height:"0"},De(t,["x","y","width","height"]));const[n,r,i,o]=e.split(" ");return{x:n,y:r,width:i,height:o}}function Do(t){"@babel/helpers - typeof";return Do=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Do(t)}var Y_=/^\s+/,V_=/\s+$/;function lt(t,e){if(t=t||"",e=e||{},t instanceof lt)return t;if(!(this instanceof lt))return new lt(t,e);var n=X_(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||n.format,this._gradientType=e.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}lt.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),n,r,i,o,s,a;return n=e.r/255,r=e.g/255,i=e.b/255,n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),i<=.03928?a=i/12.92:a=Math.pow((i+.055)/1.055,2.4),.2126*o+.7152*s+.0722*a},setAlpha:function(e){return this._a=t0(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Zf(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Zf(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+i+"%)":"hsva("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var e=Uf(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Uf(this._r,this._g,this._b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+i+"%)":"hsla("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(e){return Kf(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return Z_(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(se(this._r,255)*100)+"%",g:Math.round(se(this._g,255)*100)+"%",b:Math.round(se(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(se(this._r,255)*100)+"%, "+Math.round(se(this._g,255)*100)+"%, "+Math.round(se(this._b,255)*100)+"%)":"rgba("+Math.round(se(this._r,255)*100)+"%, "+Math.round(se(this._g,255)*100)+"%, "+Math.round(se(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:l7[Kf(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var n="#"+Qf(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?"GradientType = 1, ":"";if(e){var o=lt(e);r="#"+Qf(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+n+",endColorstr="+r+")"},toString:function(e){var n=!!e;e=e||this._format;var r=!1,i=this._a<1&&this._a>=0,o=!n&&i&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return o?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return lt(this.toString())},_applyModification:function(e,n){var r=e.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(t7,arguments)},brighten:function(){return this._applyModification(e7,arguments)},darken:function(){return this._applyModification(n7,arguments)},desaturate:function(){return this._applyModification(K_,arguments)},saturate:function(){return this._applyModification(Q_,arguments)},greyscale:function(){return this._applyModification(J_,arguments)},spin:function(){return this._applyModification(r7,arguments)},_applyCombination:function(e,n){return e.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(s7,arguments)},complement:function(){return this._applyCombination(i7,arguments)},monochromatic:function(){return this._applyCombination(a7,arguments)},splitcomplement:function(){return this._applyCombination(o7,arguments)},triad:function(){return this._applyCombination(Jf,[3])},tetrad:function(){return this._applyCombination(Jf,[4])}},lt.fromRatio=function(t,e){if(Do(t)=="object"){var n={};for(var r in t)t.hasOwnProperty(r)&&(r==="a"?n[r]=t[r]:n[r]=bi(t[r]));t=n}return lt(t,e)};function X_(t){var e={r:0,g:0,b:0},n=1,r=null,i=null,o=null,s=!1,a=!1;return typeof t=="string"&&(t=u7(t)),Do(t)=="object"&&(bn(t.r)&&bn(t.g)&&bn(t.b)?(e=G_(t.r,t.g,t.b),s=!0,a=String(t.r).substr(-1)==="%"?"prgb":"rgb"):bn(t.h)&&bn(t.s)&&bn(t.v)?(r=bi(t.s),i=bi(t.v),e=U_(t.h,r,i),s=!0,a="hsv"):bn(t.h)&&bn(t.s)&&bn(t.l)&&(r=bi(t.s),o=bi(t.l),e=q_(t.h,r,o),s=!0,a="hsl"),t.hasOwnProperty("a")&&(n=t.a)),n=t0(n),{ok:s,format:t.format||a,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}function G_(t,e,n){return{r:se(t,255)*255,g:se(e,255)*255,b:se(n,255)*255}}function Uf(t,e,n){t=se(t,255),e=se(e,255),n=se(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o,s,a=(r+i)/2;if(r==i)o=s=0;else{var l=r-i;switch(s=a>.5?l/(2-r-i):l/(r+i),r){case t:o=(e-n)/l+(e<n?6:0);break;case e:o=(n-t)/l+2;break;case n:o=(t-e)/l+4;break}o/=6}return{h:o,s,l:a}}function q_(t,e,n){var r,i,o;t=se(t,360),e=se(e,100),n=se(n,100);function s(c,h,u){return u<0&&(u+=1),u>1&&(u-=1),u<1/6?c+(h-c)*6*u:u<1/2?h:u<2/3?c+(h-c)*(2/3-u)*6:c}if(e===0)r=i=o=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;r=s(l,a,t+1/3),i=s(l,a,t),o=s(l,a,t-1/3)}return{r:r*255,g:i*255,b:o*255}}function Zf(t,e,n){t=se(t,255),e=se(e,255),n=se(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o,s,a=r,l=r-i;if(s=r===0?0:l/r,r==i)o=0;else{switch(r){case t:o=(e-n)/l+(e<n?6:0);break;case e:o=(n-t)/l+2;break;case n:o=(t-e)/l+4;break}o/=6}return{h:o,s,v:a}}function U_(t,e,n){t=se(t,360)*6,e=se(e,100),n=se(n,100);var r=Math.floor(t),i=t-r,o=n*(1-e),s=n*(1-i*e),a=n*(1-(1-i)*e),l=r%6,c=[n,s,o,o,a,n][l],h=[a,n,n,s,o,o][l],u=[o,o,a,n,n,s][l];return{r:c*255,g:h*255,b:u*255}}function Kf(t,e,n,r){var i=[Xe(Math.round(t).toString(16)),Xe(Math.round(e).toString(16)),Xe(Math.round(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function Z_(t,e,n,r,i){var o=[Xe(Math.round(t).toString(16)),Xe(Math.round(e).toString(16)),Xe(Math.round(n).toString(16)),Xe(e0(r))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function Qf(t,e,n,r){var i=[Xe(e0(r)),Xe(Math.round(t).toString(16)),Xe(Math.round(e).toString(16)),Xe(Math.round(n).toString(16))];return i.join("")}lt.equals=function(t,e){return!t||!e?!1:lt(t).toRgbString()==lt(e).toRgbString()},lt.random=function(){return lt.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function K_(t,e){e=e===0?0:e||10;var n=lt(t).toHsl();return n.s-=e/100,n.s=No(n.s),lt(n)}function Q_(t,e){e=e===0?0:e||10;var n=lt(t).toHsl();return n.s+=e/100,n.s=No(n.s),lt(n)}function J_(t){return lt(t).desaturate(100)}function t7(t,e){e=e===0?0:e||10;var n=lt(t).toHsl();return n.l+=e/100,n.l=No(n.l),lt(n)}function e7(t,e){e=e===0?0:e||10;var n=lt(t).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(e/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(e/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(e/100)))),lt(n)}function n7(t,e){e=e===0?0:e||10;var n=lt(t).toHsl();return n.l-=e/100,n.l=No(n.l),lt(n)}function r7(t,e){var n=lt(t).toHsl(),r=(n.h+e)%360;return n.h=r<0?360+r:r,lt(n)}function i7(t){var e=lt(t).toHsl();return e.h=(e.h+180)%360,lt(e)}function Jf(t,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var n=lt(t).toHsl(),r=[lt(t)],i=360/e,o=1;o<e;o++)r.push(lt({h:(n.h+o*i)%360,s:n.s,l:n.l}));return r}function o7(t){var e=lt(t).toHsl(),n=e.h;return[lt(t),lt({h:(n+72)%360,s:e.s,l:e.l}),lt({h:(n+216)%360,s:e.s,l:e.l})]}function s7(t,e,n){e=e||6,n=n||30;var r=lt(t).toHsl(),i=360/n,o=[lt(t)];for(r.h=(r.h-(i*e>>1)+720)%360;--e;)r.h=(r.h+i)%360,o.push(lt(r));return o}function a7(t,e){e=e||6;for(var n=lt(t).toHsv(),r=n.h,i=n.s,o=n.v,s=[],a=1/e;e--;)s.push(lt({h:r,s:i,v:o})),o=(o+a)%1;return s}lt.mix=function(t,e,n){n=n===0?0:n||50;var r=lt(t).toRgb(),i=lt(e).toRgb(),o=n/100,s={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return lt(s)},lt.readability=function(t,e){var n=lt(t),r=lt(e);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},lt.isReadable=function(t,e,n){var r=lt.readability(t,e),i,o;switch(o=!1,i=f7(n),i.level+i.size){case"AAsmall":case"AAAlarge":o=r>=4.5;break;case"AAlarge":o=r>=3;break;case"AAAsmall":o=r>=7;break}return o},lt.mostReadable=function(t,e,n){var r=null,i=0,o,s,a,l;n=n||{},s=n.includeFallbackColors,a=n.level,l=n.size;for(var c=0;c<e.length;c++)o=lt.readability(t,e[c]),o>i&&(i=o,r=lt(e[c]));return lt.isReadable(t,r,{level:a,size:l})||!s?r:(n.includeFallbackColors=!1,lt.mostReadable(t,["#fff","#000"],n))};var Wl=lt.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},l7=lt.hexNames=c7(Wl);function c7(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function t0(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function se(t,e){h7(t)&&(t="100%");var n=d7(t);return t=Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),Math.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function No(t){return Math.min(1,Math.max(0,t))}function Ne(t){return parseInt(t,16)}function h7(t){return typeof t=="string"&&t.indexOf(".")!=-1&&parseFloat(t)===1}function d7(t){return typeof t=="string"&&t.indexOf("%")!=-1}function Xe(t){return t.length==1?"0"+t:""+t}function bi(t){return t<=1&&(t=t*100+"%"),t}function e0(t){return Math.round(parseFloat(t)*255).toString(16)}function n0(t){return Ne(t)/255}var Ge=(function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",n="(?:"+e+")|(?:"+t+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function bn(t){return!!Ge.CSS_UNIT.exec(t)}function u7(t){t=t.replace(Y_,"").replace(V_,"").toLowerCase();var e=!1;if(Wl[t])t=Wl[t],e=!0;else if(t=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Ge.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=Ge.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Ge.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=Ge.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Ge.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=Ge.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Ge.hex8.exec(t))?{r:Ne(n[1]),g:Ne(n[2]),b:Ne(n[3]),a:n0(n[4]),format:e?"name":"hex8"}:(n=Ge.hex6.exec(t))?{r:Ne(n[1]),g:Ne(n[2]),b:Ne(n[3]),format:e?"name":"hex"}:(n=Ge.hex4.exec(t))?{r:Ne(n[1]+""+n[1]),g:Ne(n[2]+""+n[2]),b:Ne(n[3]+""+n[3]),a:n0(n[4]+""+n[4]),format:e?"name":"hex8"}:(n=Ge.hex3.exec(t))?{r:Ne(n[1]+""+n[1]),g:Ne(n[2]+""+n[2]),b:Ne(n[3]+""+n[3]),format:e?"name":"hex"}:!1}function f7(t){var e,n;return t=t||{level:"AA",size:"small"},e=(t.level||"AA").toUpperCase(),n=(t.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:e,size:n}}var p7=Object.defineProperty,r0=Object.getOwnPropertySymbols,g7=Object.prototype.hasOwnProperty,m7=Object.prototype.propertyIsEnumerable,i0=(t,e,n)=>e in t?p7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,y7=(t,e)=>{for(var n in e||(e={}))g7.call(e,n)&&i0(t,n,e[n]);if(r0)for(var n of r0(e))m7.call(e,n)&&i0(t,n,e[n]);return t};function o0(t,e,n,r){const i=t.getAttribute(r),o=v7(i,n),{type:s,colors:a=[]}=o,l=a.length-1,c=a.map((p,g)=>typeof p=="string"?bt("stop",{offset:`${g/l}`,"stop-color":p}):bt("stop",{offset:`${p.offset}`,"stop-color":p.color})),h=x7(o);if(s==="linear-gradient"){const{angle:p=0}=o,[[g,y],[m,x]]=b7(p),v=bt("linearGradient",{id:h,x1:g,y1:y,x2:m,y2:x});c.forEach(b=>v.appendChild(b)),s0(e,h,v)}else if(s==="radial-gradient"){const p=bt("radialGradient",{id:h});c.forEach(g=>p.appendChild(g)),s0(e,h,p)}const u=t.getAttribute("fill"),f=t.getAttribute("stroke");Xn(u)&&t.setAttribute("fill",`url(#${h})`),Xn(f)&&t.setAttribute("stroke",`url(#${h})`)}function s0(t,e,n){const r=Eo(t);n.setAttribute("id",e);const i=r.querySelector(`#${e}`);i?i.replaceWith(n):r.appendChild(n)}function v7(t,e){var n;if((n=e.colors)!=null&&n.length||!t)return e;const r=lt(t),i=y7({},e);return i.colors=r.isDark()?[t,r.lighten(20).toHexString()]:[r.darken(20).toHexString(),t],!("angle"in e)&&i.type==="linear-gradient"&&(i.angle=225),i}function x7(t){const{type:e,colors:n=[]}=t,r=Df(n.map(i=>typeof i=="string"?i:`${i.color}_${i.offset}`).join("-"));if(e==="linear-gradient"){const{angle:i=0}=t;return`${e}-${r}-${i}`}return`${e}-${r}`}function b7(t){const e=Math.PI/180*t,n=Math.cos(e),r=Math.sin(e);return[[.5-n/2,.5-r/2],[.5+n/2,.5+r/2]]}const w7=Object.freeze(Object.defineProperty({__proto__:null,diamond:({scale:t=.5,backgroundColor:e,foregroundColor:n})=>{const r=bt("pattern",{id:"pattern-diamond",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),i=bt("rect",{width:"100%",height:"100%",fill:e}),o=bt("path",{d:"M0,0 L20,20 M20,0 L0,20",stroke:n,"stroke-width":"1"});return r.appendChild(i),r.appendChild(o),r},dot:({scale:t=1,backgroundColor:e,foregroundColor:n})=>{const r=bt("pattern",{id:"pattern-dot",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),i=bt("rect",{width:"100%",height:"100%",fill:e}),o=bt("circle",{cx:"5",cy:"5",r:"3",fill:n}),s=bt("circle",{cx:"15",cy:"15",r:"3",fill:n});return r.appendChild(i),r.appendChild(o),r.appendChild(s),r},hex:({scale:t=.3,backgroundColor:e,foregroundColor:n})=>{const r=bt("pattern",{id:"pattern-hex",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),i=bt("rect",{width:"100%",height:"100%",fill:e}),o=bt("path",{d:"M10,0 L20,5 L20,15 L10,20 L0,15 L0,5 Z",fill:n});return r.appendChild(i),r.appendChild(o),r},line:({scale:t=1,backgroundColor:e,foregroundColor:n})=>{const o=bt("pattern",{id:"pattern-line",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),s=bt("rect",{width:"100%",height:"100%",fill:e}),a=bt("line",{x1:"7",y1:"-3",x2:"23",y2:"13",stroke:n,"stroke-width":6,"stroke-opacity":"0.5"}),l=bt("line",{x1:"-3",y1:"7",x2:"13",y2:"23",stroke:n,"stroke-width":6,"stroke-opacity":"0.5"});return o.appendChild(s),o.appendChild(a),o.appendChild(l),o},mosaic:({scale:t=1,backgroundColor:e="#ffffff",foregroundColor:n="#000000"})=>{const a=bt("pattern",{id:"pattern-mosaic",width:20,height:20,patternUnits:"userSpaceOnUse",patternTransform:`scale(${t})`}),l=bt("rect",{width:"100%",height:"100%",fill:e});a.appendChild(l);for(let c=0;c<4;c++)for(let h=0;h<4;h++)if((h+c)%2===0){const u=bt("rect",{x:h*5,y:c*5,width:5,height:5,fill:n});a.appendChild(u)}return a},square:({scale:t=.3,backgroundColor:e,foregroundColor:n})=>{const r=bt("pattern",{id:"pattern-square",width:"20",height:"20",patternTransform:`scale(${t})`,patternUnits:"userSpaceOnUse"}),i=bt("rect",{width:"100%",height:"100%",fill:e}),o=bt("path",{d:"M0,0 L20,0 L20,20 L0,20 Z",fill:n});return r.appendChild(i),r.appendChild(o),r}},Symbol.toStringTag,{value:"Module"}));var _7=Object.defineProperty,jo=Object.getOwnPropertySymbols,a0=Object.prototype.hasOwnProperty,l0=Object.prototype.propertyIsEnumerable,c0=(t,e,n)=>e in t?_7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Fl=(t,e)=>{for(var n in e||(e={}))a0.call(e,n)&&c0(t,n,e[n]);if(jo)for(var n of jo(e))l0.call(e,n)&&c0(t,n,e[n]);return t},$7=(t,e)=>{var n={};for(var r in t)a0.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&jo)for(var r of jo(t))e.indexOf(r)<0&&l0.call(t,r)&&(n[r]=t[r]);return n};const Bl=new Map;function h0(t,e){Bl.has(t)&&console.warn(`Pattern ${t} will be overwritten`),Bl.set(t,e)}for(const[t,e]of Object.entries(w7))h0(t,e);function P7(t,e,n){const r=n.themeConfig.stylize;if(!r||r.type!=="pattern")return;const i=r,{pattern:o}=i,s=$7(i,["pattern"]),a=Bl.get(o);if(!a)return console.warn(`Pattern ${o} not found`);const{fill:l}=De(t,["fill","stroke"]),c=l,h=Fl({backgroundColor:c&&lt(c).setAlpha(.5).toRgbString(),foregroundColor:c},s),u=O7(Fl(Fl({},r),h));C7(e,u,a(h)),Xn(l)&&(t.setAttribute("fill",`url(#${u})`),!t.getAttribute("stroke")&&l&&t.setAttribute("stroke",l))}function C7(t,e,n){const r=Eo(t);n.setAttribute("id",e);const i=r.querySelector(`pattern#${e}`);i?i.replaceWith(n):r.appendChild(n)}function O7(t){const{pattern:e,foregroundColor:n="unset",backgroundColor:r="unset",scale:i="unset"}=t;return Df(`pattern-${e}-${n}-${r}-${i}`)}function Yl(t,e,n){if(t&&t.length){const[r,i]=e,o=Math.PI/180*n,s=Math.cos(o),a=Math.sin(o);for(const l of t){const[c,h]=l;l[0]=(c-r)*s-(h-i)*a+r,l[1]=(c-r)*a+(h-i)*s+i}}}function M7(t,e){return t[0]===e[0]&&t[1]===e[1]}function S7(t,e,n,r=1){const i=n,o=Math.max(e,.1),s=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,a=[0,0];if(i)for(const c of s)Yl(c,a,i);const l=(function(c,h,u){const f=[];for(const v of c){const b=[...v];M7(b[0],b[b.length-1])||b.push([b[0][0],b[0][1]]),b.length>2&&f.push(b)}const p=[];h=Math.max(h,.1);const g=[];for(const v of f)for(let b=0;b<v.length-1;b++){const w=v[b],_=v[b+1];if(w[1]!==_[1]){const $=Math.min(w[1],_[1]);g.push({ymin:$,ymax:Math.max(w[1],_[1]),x:$===w[1]?w[0]:_[0],islope:(_[0]-w[0])/(_[1]-w[1])})}}if(g.sort(((v,b)=>v.ymin<b.ymin?-1:v.ymin>b.ymin?1:v.x<b.x?-1:v.x>b.x?1:v.ymax===b.ymax?0:(v.ymax-b.ymax)/Math.abs(v.ymax-b.ymax))),!g.length)return p;let y=[],m=g[0].ymin,x=0;for(;y.length||g.length;){if(g.length){let v=-1;for(let b=0;b<g.length&&!(g[b].ymin>m);b++)v=b;g.splice(0,v+1).forEach((b=>{y.push({s:m,edge:b})}))}if(y=y.filter((v=>!(v.edge.ymax<=m))),y.sort(((v,b)=>v.edge.x===b.edge.x?0:(v.edge.x-b.edge.x)/Math.abs(v.edge.x-b.edge.x))),(u!==1||x%h==0)&&y.length>1)for(let v=0;v<y.length;v+=2){const b=v+1;if(b>=y.length)break;const w=y[v].edge,_=y[b].edge;p.push([[Math.round(w.x),m],[Math.round(_.x),m]])}m+=u,y.forEach((v=>{v.edge.x=v.edge.x+u*v.edge.islope})),x++}return p})(s,o,r);if(i){for(const c of s)Yl(c,a,-i);(function(c,h,u){const f=[];c.forEach((p=>f.push(...p))),Yl(f,h,u)})(l,a,-i)}return l}function wi(t,e){var n;const r=e.hachureAngle+90;let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1));let o=1;return e.roughness>=1&&(((n=e.randomizer)===null||n===void 0?void 0:n.next())||Math.random())>.7&&(o=i),S7(t,i,r,o||1)}class Vl{constructor(e){this.helper=e}fillPolygons(e,n){return this._fillPolygons(e,n)}_fillPolygons(e,n){const r=wi(e,n);return{type:"fillSketch",ops:this.renderLines(r,n)}}renderLines(e,n){const r=[];for(const i of e)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],n));return r}}function Wo(t){const e=t[0],n=t[1];return Math.sqrt(Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2))}let E7=class extends Vl{fillPolygons(e,n){let r=n.hachureGap;r<0&&(r=4*n.strokeWidth),r=Math.max(r,.1);const i=wi(e,Object.assign({},n,{hachureGap:r})),o=Math.PI/180*n.hachureAngle,s=[],a=.5*r*Math.cos(o),l=.5*r*Math.sin(o);for(const[c,h]of i)Wo([c,h])&&s.push([[c[0]-a,c[1]+l],[...h]],[[c[0]+a,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(s,n)}}},I7=class extends Vl{fillPolygons(e,n){const r=this._fillPolygons(e,n),i=Object.assign({},n,{hachureAngle:n.hachureAngle+90}),o=this._fillPolygons(e,i);return r.ops=r.ops.concat(o.ops),r}},A7=class{constructor(e){this.helper=e}fillPolygons(e,n){const r=wi(e,n=Object.assign({},n,{hachureAngle:0}));return this.dotsOnLines(r,n)}dotsOnLines(e,n){const r=[];let i=n.hachureGap;i<0&&(i=4*n.strokeWidth),i=Math.max(i,.1);let o=n.fillWeight;o<0&&(o=n.strokeWidth/2);const s=i/4;for(const a of e){const l=Wo(a),c=l/i,h=Math.ceil(c)-1,u=l-h*i,f=(a[0][0]+a[1][0])/2-i/4,p=Math.min(a[0][1],a[1][1]);for(let g=0;g<h;g++){const y=p+u+g*i,m=f-s+2*Math.random()*s,x=y-s+2*Math.random()*s,v=this.helper.ellipse(m,x,o,o,n);r.push(...v.ops)}}return{type:"fillSketch",ops:r}}},T7=class{constructor(e){this.helper=e}fillPolygons(e,n){const r=wi(e,n);return{type:"fillSketch",ops:this.dashedLine(r,n)}}dashedLine(e,n){const r=n.dashOffset<0?n.hachureGap<0?4*n.strokeWidth:n.hachureGap:n.dashOffset,i=n.dashGap<0?n.hachureGap<0?4*n.strokeWidth:n.hachureGap:n.dashGap,o=[];return e.forEach((s=>{const a=Wo(s),l=Math.floor(a/(r+i)),c=(a+i-l*(r+i))/2;let h=s[0],u=s[1];h[0]>u[0]&&(h=s[1],u=s[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let p=0;p<l;p++){const g=p*(r+i),y=g+r,m=[h[0]+g*Math.cos(f)+c*Math.cos(f),h[1]+g*Math.sin(f)+c*Math.sin(f)],x=[h[0]+y*Math.cos(f)+c*Math.cos(f),h[1]+y*Math.sin(f)+c*Math.sin(f)];o.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],n))}})),o}};class k7{constructor(e){this.helper=e}fillPolygons(e,n){const r=n.hachureGap<0?4*n.strokeWidth:n.hachureGap,i=n.zigzagOffset<0?r:n.zigzagOffset,o=wi(e,n=Object.assign({},n,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(o,i,n)}}zigzagLines(e,n,r){const i=[];return e.forEach((o=>{const s=Wo(o),a=Math.round(s/(2*n));let l=o[0],c=o[1];l[0]>c[0]&&(l=o[1],c=o[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<a;u++){const f=2*u*n,p=2*(u+1)*n,g=Math.sqrt(2*Math.pow(n,2)),y=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],m=[l[0]+p*Math.cos(h),l[1]+p*Math.sin(h)],x=[y[0]+g*Math.cos(h+Math.PI/4),y[1]+g*Math.sin(h+Math.PI/4)];i.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r),...this.helper.doubleLineOps(x[0],x[1],m[0],m[1],r))}})),i}}const Te={};let L7=class{constructor(e){this.seed=e}next(){return this.seed?(no(2,31)-1&(this.seed=Math.imul(48271,this.seed)))/no(2,31):Math.random()}};const z7=0,Xl=1,d0=2,Fo={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 Gl(t,e){return t.type===e}function ql(t){const e=[],n=(function(s){const a=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))a[a.length]={type:z7,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];a[a.length]={type:Xl,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return a[a.length]={type:d0,text:""},a})(t);let r="BOD",i=0,o=n[i];for(;!Gl(o,d0);){let s=0;const a=[];if(r==="BOD"){if(o.text!=="M"&&o.text!=="m")return ql("M0,0"+t);i++,s=Fo[o.text],r=o.text}else Gl(o,Xl)?s=Fo[r]:(i++,s=Fo[o.text],r=o.text);if(!(i+s<n.length))throw new Error("Path data ended short");for(let l=i;l<i+s;l++){const c=n[l];if(!Gl(c,Xl))throw new Error("Param not a number: "+r+","+c.text);a[a.length]=+c.text}if(typeof Fo[r]!="number")throw new Error("Bad segment: "+r);{const l={key:r,data:a};e.push(l),i+=s,o=n[i],r==="M"&&(r="L"),r==="m"&&(r="l")}}return e}function u0(t){let e=0,n=0,r=0,i=0;const o=[];for(const{key:s,data:a}of t)switch(s){case"M":o.push({key:"M",data:[...a]}),[e,n]=a,[r,i]=a;break;case"m":e+=a[0],n+=a[1],o.push({key:"M",data:[e,n]}),r=e,i=n;break;case"L":o.push({key:"L",data:[...a]}),[e,n]=a;break;case"l":e+=a[0],n+=a[1],o.push({key:"L",data:[e,n]});break;case"C":o.push({key:"C",data:[...a]}),e=a[4],n=a[5];break;case"c":{const l=a.map(((c,h)=>h%2?c+n:c+e));o.push({key:"C",data:l}),e=l[4],n=l[5];break}case"Q":o.push({key:"Q",data:[...a]}),e=a[2],n=a[3];break;case"q":{const l=a.map(((c,h)=>h%2?c+n:c+e));o.push({key:"Q",data:l}),e=l[2],n=l[3];break}case"A":o.push({key:"A",data:[...a]}),e=a[5],n=a[6];break;case"a":e+=a[5],n+=a[6],o.push({key:"A",data:[a[0],a[1],a[2],a[3],a[4],e,n]});break;case"H":o.push({key:"H",data:[...a]}),e=a[0];break;case"h":e+=a[0],o.push({key:"H",data:[e]});break;case"V":o.push({key:"V",data:[...a]}),n=a[0];break;case"v":n+=a[0],o.push({key:"V",data:[n]});break;case"S":o.push({key:"S",data:[...a]}),e=a[2],n=a[3];break;case"s":{const l=a.map(((c,h)=>h%2?c+n:c+e));o.push({key:"S",data:l}),e=l[2],n=l[3];break}case"T":o.push({key:"T",data:[...a]}),e=a[0],n=a[1];break;case"t":e+=a[0],n+=a[1],o.push({key:"T",data:[e,n]});break;case"Z":case"z":o.push({key:"Z",data:[]}),e=r,n=i}return o}function f0(t){const e=[];let n="",r=0,i=0,o=0,s=0,a=0,l=0;for(const{key:c,data:h}of t){switch(c){case"M":e.push({key:"M",data:[...h]}),[r,i]=h,[o,s]=h;break;case"C":e.push({key:"C",data:[...h]}),r=h[4],i=h[5],a=h[2],l=h[3];break;case"L":e.push({key:"L",data:[...h]}),[r,i]=h;break;case"H":r=h[0],e.push({key:"L",data:[r,i]});break;case"V":i=h[0],e.push({key:"L",data:[r,i]});break;case"S":{let u=0,f=0;n==="C"||n==="S"?(u=r+(r-a),f=i+(i-l)):(u=r,f=i),e.push({key:"C",data:[u,f,...h]}),a=h[0],l=h[1],r=h[2],i=h[3];break}case"T":{const[u,f]=h;let p=0,g=0;n==="Q"||n==="T"?(p=r+(r-a),g=i+(i-l)):(p=r,g=i);const y=r+2*(p-r)/3,m=i+2*(g-i)/3,x=u+2*(p-u)/3,v=f+2*(g-f)/3;e.push({key:"C",data:[y,m,x,v,u,f]}),a=p,l=g,r=u,i=f;break}case"Q":{const[u,f,p,g]=h,y=r+2*(u-r)/3,m=i+2*(f-i)/3,x=p+2*(u-p)/3,v=g+2*(f-g)/3;e.push({key:"C",data:[y,m,x,v,p,g]}),a=u,l=f,r=p,i=g;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),p=h[2],g=h[3],y=h[4],m=h[5],x=h[6];u===0||f===0?(e.push({key:"C",data:[r,i,m,x,m,x]}),r=m,i=x):(r!==m||i!==x)&&(p0(r,i,m,x,u,f,p,g,y).forEach((function(v){e.push({key:"C",data:v})})),r=m,i=x);break}case"Z":e.push({key:"Z",data:[]}),r=o,i=s}n=c}return e}function _i(t,e,n){return[t*Math.cos(n)-e*Math.sin(n),t*Math.sin(n)+e*Math.cos(n)]}function p0(t,e,n,r,i,o,s,a,l,c){const h=(u=s,Math.PI*u/180);var u;let f=[],p=0,g=0,y=0,m=0;if(c)[p,g,y,m]=c;else{[t,e]=_i(t,e,-h),[n,r]=_i(n,r,-h);const O=(t-n)/2,A=(e-r)/2;let F=O*O/(i*i)+A*A/(o*o);F>1&&(F=Math.sqrt(F),i*=F,o*=F);const L=i*i,D=o*o,k=L*D-L*A*A-D*O*O,N=L*A*A+D*O*O,j=(a===l?-1:1)*Math.sqrt(Math.abs(k/N));y=j*i*A/o+(t+n)/2,m=j*-o*O/i+(e+r)/2,p=Math.asin(parseFloat(((e-m)/o).toFixed(9))),g=Math.asin(parseFloat(((r-m)/o).toFixed(9))),t<y&&(p=Math.PI-p),n<y&&(g=Math.PI-g),p<0&&(p=2*Math.PI+p),g<0&&(g=2*Math.PI+g),l&&p>g&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let x=g-p;if(Math.abs(x)>120*Math.PI/180){const O=g,A=n,F=r;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,f=p0(n=y+i*Math.cos(g),r=m+o*Math.sin(g),A,F,i,o,s,0,l,[g,O,y,m])}x=g-p;const v=Math.cos(p),b=Math.sin(p),w=Math.cos(g),_=Math.sin(g),$=Math.tan(x/4),P=4/3*i*$,C=4/3*o*$,T=[t,e],E=[t+P*b,e-C*v],S=[n+P*_,r-C*w],R=[n,r];if(E[0]=2*T[0]-E[0],E[1]=2*T[1]-E[1],c)return[E,S,R].concat(f);{f=[E,S,R].concat(f);const O=[];for(let A=0;A<f.length;A+=3){const F=_i(f[A][0],f[A][1],h),L=_i(f[A+1][0],f[A+1][1],h),D=_i(f[A+2][0],f[A+2][1],h);O.push([F[0],F[1],L[0],L[1],D[0],D[1]])}return O}}const H7={randOffset:function(t,e){return Pt(t,e)},randOffsetWithRange:function(t,e,n){return Yo(t,e,n)},ellipse:function(t,e,n,r,i){const o=y0(n,r,i);return Ul(t,e,i,o).opset},doubleLineOps:function(t,e,n,r,i){return Hn(t,e,n,r,i,!0)}};function g0(t,e,n,r,i){return{type:"path",ops:Hn(t,e,n,r,i)}}function Bo(t,e,n){const r=(t||[]).length;if(r>2){const i=[];for(let o=0;o<r-1;o++)i.push(...Hn(t[o][0],t[o][1],t[o+1][0],t[o+1][1],n));return e&&i.push(...Hn(t[r-1][0],t[r-1][1],t[0][0],t[0][1],n)),{type:"path",ops:i}}return r===2?g0(t[0][0],t[0][1],t[1][0],t[1][1],n):{type:"path",ops:[]}}function R7(t,e,n,r,i){return(function(o,s){return Bo(o,!0,s)})([[t,e],[t+n,e],[t+n,e+r],[t,e+r]],i)}function m0(t,e){if(t.length){const n=typeof t[0][0]=="number"?[t]:t,r=Vo(n[0],1*(1+.2*e.roughness),e),i=e.disableMultiStroke?[]:Vo(n[0],1.5*(1+.22*e.roughness),b0(e));for(let o=1;o<n.length;o++){const s=n[o];if(s.length){const a=Vo(s,1*(1+.2*e.roughness),e),l=e.disableMultiStroke?[]:Vo(s,1.5*(1+.22*e.roughness),b0(e));for(const c of a)c.op!=="move"&&r.push(c);for(const c of l)c.op!=="move"&&i.push(c)}}return{type:"path",ops:r.concat(i)}}return{type:"path",ops:[]}}function y0(t,e,n){const r=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),i=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),o=2*Math.PI/i;let s=Math.abs(t/2),a=Math.abs(e/2);const l=1-n.curveFitting;return s+=Pt(s*l,n),a+=Pt(a*l,n),{increment:o,rx:s,ry:a}}function Ul(t,e,n,r){const[i,o]=_0(r.increment,t,e,r.rx,r.ry,1,r.increment*Yo(.1,Yo(.4,1,n),n),n);let s=Xo(i,null,n);if(!n.disableMultiStroke&&n.roughness!==0){const[a]=_0(r.increment,t,e,r.rx,r.ry,1.5,0,n),l=Xo(a,null,n);s=s.concat(l)}return{estimatedPoints:o,opset:{type:"path",ops:s}}}function v0(t,e,n,r,i,o,s,a,l){const c=t,h=e;let u=Math.abs(n/2),f=Math.abs(r/2);u+=Pt(.01*u,l),f+=Pt(.01*f,l);let p=i,g=o;for(;p<0;)p+=2*Math.PI,g+=2*Math.PI;g-p>2*Math.PI&&(p=0,g=2*Math.PI);const y=2*Math.PI/l.curveStepCount,m=Math.min(y/2,(g-p)/2),x=$0(m,c,h,u,f,p,g,1,l);if(!l.disableMultiStroke){const v=$0(m,c,h,u,f,p,g,1.5,l);x.push(...v)}return s&&(a?x.push(...Hn(c,h,c+u*Math.cos(p),h+f*Math.sin(p),l),...Hn(c,h,c+u*Math.cos(g),h+f*Math.sin(g),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(p),h+f*Math.sin(p)]})),{type:"path",ops:x}}function x0(t,e){const n=f0(u0(ql(t))),r=[];let i=[0,0],o=[0,0];for(const{key:s,data:a}of n)switch(s){case"M":o=[a[0],a[1]],i=[a[0],a[1]];break;case"L":r.push(...Hn(o[0],o[1],a[0],a[1],e)),o=[a[0],a[1]];break;case"C":{const[l,c,h,u,f,p]=a;r.push(...D7(l,c,h,u,f,p,o,e)),o=[f,p];break}case"Z":r.push(...Hn(o[0],o[1],i[0],i[1],e)),o=[i[0],i[1]]}return{type:"path",ops:r}}function Zl(t,e){const n=[];for(const r of t)if(r.length){const i=e.maxRandomnessOffset||0,o=r.length;if(o>2){n.push({op:"move",data:[r[0][0]+Pt(i,e),r[0][1]+Pt(i,e)]});for(let s=1;s<o;s++)n.push({op:"lineTo",data:[r[s][0]+Pt(i,e),r[s][1]+Pt(i,e)]})}}return{type:"fillPath",ops:n}}function Hr(t,e){return(function(n,r){let i=n.fillStyle||"hachure";if(!Te[i])switch(i){case"zigzag":Te[i]||(Te[i]=new E7(r));break;case"cross-hatch":Te[i]||(Te[i]=new I7(r));break;case"dots":Te[i]||(Te[i]=new A7(r));break;case"dashed":Te[i]||(Te[i]=new T7(r));break;case"zigzag-line":Te[i]||(Te[i]=new k7(r));break;default:i="hachure",Te[i]||(Te[i]=new Vl(r))}return Te[i]})(e,H7).fillPolygons(t,e)}function b0(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function w0(t){return t.randomizer||(t.randomizer=new L7(t.seed||0)),t.randomizer.next()}function Yo(t,e,n,r=1){return n.roughness*r*(w0(n)*(e-t)+t)}function Pt(t,e,n=1){return Yo(-t,t,e,n)}function Hn(t,e,n,r,i,o=!1){const s=o?i.disableMultiStrokeFill:i.disableMultiStroke,a=Kl(t,e,n,r,i,!0,!1);if(s)return a;const l=Kl(t,e,n,r,i,!0,!0);return a.concat(l)}function Kl(t,e,n,r,i,o,s){const a=Math.pow(t-n,2)+Math.pow(e-r,2),l=Math.sqrt(a);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=i.maxRandomnessOffset||0;h*h*100>a&&(h=l/10);const u=h/2,f=.2+.2*w0(i);let p=i.bowing*i.maxRandomnessOffset*(r-e)/200,g=i.bowing*i.maxRandomnessOffset*(t-n)/200;p=Pt(p,i,c),g=Pt(g,i,c);const y=[],m=()=>Pt(u,i,c),x=()=>Pt(h,i,c),v=i.preserveVertices;return s?y.push({op:"move",data:[t+(v?0:m()),e+(v?0:m())]}):y.push({op:"move",data:[t+(v?0:Pt(h,i,c)),e+(v?0:Pt(h,i,c))]}),s?y.push({op:"bcurveTo",data:[p+t+(n-t)*f+m(),g+e+(r-e)*f+m(),p+t+2*(n-t)*f+m(),g+e+2*(r-e)*f+m(),n+(v?0:m()),r+(v?0:m())]}):y.push({op:"bcurveTo",data:[p+t+(n-t)*f+x(),g+e+(r-e)*f+x(),p+t+2*(n-t)*f+x(),g+e+2*(r-e)*f+x(),n+(v?0:x()),r+(v?0:x())]}),y}function Vo(t,e,n){if(!t.length)return[];const r=[];r.push([t[0][0]+Pt(e,n),t[0][1]+Pt(e,n)]),r.push([t[0][0]+Pt(e,n),t[0][1]+Pt(e,n)]);for(let i=1;i<t.length;i++)r.push([t[i][0]+Pt(e,n),t[i][1]+Pt(e,n)]),i===t.length-1&&r.push([t[i][0]+Pt(e,n),t[i][1]+Pt(e,n)]);return Xo(r,null,n)}function Xo(t,e,n){const r=t.length,i=[];if(r>3){const o=[],s=1-n.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let a=1;a+2<r;a++){const l=t[a];o[0]=[l[0],l[1]],o[1]=[l[0]+(s*t[a+1][0]-s*t[a-1][0])/6,l[1]+(s*t[a+1][1]-s*t[a-1][1])/6],o[2]=[t[a+1][0]+(s*t[a][0]-s*t[a+2][0])/6,t[a+1][1]+(s*t[a][1]-s*t[a+2][1])/6],o[3]=[t[a+1][0],t[a+1][1]],i.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}}else r===3?(i.push({op:"move",data:[t[1][0],t[1][1]]}),i.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):r===2&&i.push(...Kl(t[0][0],t[0][1],t[1][0],t[1][1],n,!0,!0));return i}function _0(t,e,n,r,i,o,s,a){const l=[],c=[];if(a.roughness===0){t/=4,c.push([e+r*Math.cos(-t),n+i*Math.sin(-t)]);for(let h=0;h<=2*Math.PI;h+=t){const u=[e+r*Math.cos(h),n+i*Math.sin(h)];l.push(u),c.push(u)}c.push([e+r*Math.cos(0),n+i*Math.sin(0)]),c.push([e+r*Math.cos(t),n+i*Math.sin(t)])}else{const h=Pt(.5,a)-Math.PI/2;c.push([Pt(o,a)+e+.9*r*Math.cos(h-t),Pt(o,a)+n+.9*i*Math.sin(h-t)]);const u=2*Math.PI+h-.01;for(let f=h;f<u;f+=t){const p=[Pt(o,a)+e+r*Math.cos(f),Pt(o,a)+n+i*Math.sin(f)];l.push(p),c.push(p)}c.push([Pt(o,a)+e+r*Math.cos(h+2*Math.PI+.5*s),Pt(o,a)+n+i*Math.sin(h+2*Math.PI+.5*s)]),c.push([Pt(o,a)+e+.98*r*Math.cos(h+s),Pt(o,a)+n+.98*i*Math.sin(h+s)]),c.push([Pt(o,a)+e+.9*r*Math.cos(h+.5*s),Pt(o,a)+n+.9*i*Math.sin(h+.5*s)])}return[c,l]}function $0(t,e,n,r,i,o,s,a,l){const c=o+Pt(.1,l),h=[];h.push([Pt(a,l)+e+.9*r*Math.cos(c-t),Pt(a,l)+n+.9*i*Math.sin(c-t)]);for(let u=c;u<=s;u+=t)h.push([Pt(a,l)+e+r*Math.cos(u),Pt(a,l)+n+i*Math.sin(u)]);return h.push([e+r*Math.cos(s),n+i*Math.sin(s)]),h.push([e+r*Math.cos(s),n+i*Math.sin(s)]),Xo(h,null,l)}function D7(t,e,n,r,i,o,s,a){const l=[],c=[a.maxRandomnessOffset||1,(a.maxRandomnessOffset||1)+.3];let h=[0,0];const u=a.disableMultiStroke?1:2,f=a.preserveVertices;for(let p=0;p<u;p++)p===0?l.push({op:"move",data:[s[0],s[1]]}):l.push({op:"move",data:[s[0]+(f?0:Pt(c[0],a)),s[1]+(f?0:Pt(c[0],a))]}),h=f?[i,o]:[i+Pt(c[p],a),o+Pt(c[p],a)],l.push({op:"bcurveTo",data:[t+Pt(c[p],a),e+Pt(c[p],a),n+Pt(c[p],a),r+Pt(c[p],a),h[0],h[1]]});return l}function $i(t){return[...t]}function P0(t,e=0){const n=t.length;if(n<3)throw new Error("A curve must have at least three points.");const r=[];if(n===3)r.push($i(t[0]),$i(t[1]),$i(t[2]),$i(t[2]));else{const i=[];i.push(t[0],t[0]);for(let a=1;a<t.length;a++)i.push(t[a]),a===t.length-1&&i.push(t[a]);const o=[],s=1-e;r.push($i(i[0]));for(let a=1;a+2<i.length;a++){const l=i[a];o[0]=[l[0],l[1]],o[1]=[l[0]+(s*i[a+1][0]-s*i[a-1][0])/6,l[1]+(s*i[a+1][1]-s*i[a-1][1])/6],o[2]=[i[a+1][0]+(s*i[a][0]-s*i[a+2][0])/6,i[a+1][1]+(s*i[a][1]-s*i[a+2][1])/6],o[3]=[i[a+1][0],i[a+1][1]],r.push(o[1],o[2],o[3])}}return r}function Go(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function N7(t,e,n){const r=Go(e,n);if(r===0)return Go(t,e);let i=((t[0]-e[0])*(n[0]-e[0])+(t[1]-e[1])*(n[1]-e[1]))/r;return i=Math.max(0,Math.min(1,i)),Go(t,tr(e,n,i))}function tr(t,e,n){return[t[0]+(e[0]-t[0])*n,t[1]+(e[1]-t[1])*n]}function Ql(t,e,n,r){const i=r||[];if((function(a,l){const c=a[l+0],h=a[l+1],u=a[l+2],f=a[l+3];let p=3*h[0]-2*c[0]-f[0];p*=p;let g=3*h[1]-2*c[1]-f[1];g*=g;let y=3*u[0]-2*f[0]-c[0];y*=y;let m=3*u[1]-2*f[1]-c[1];return m*=m,p<y&&(p=y),g<m&&(g=m),p+g})(t,e)<n){const a=t[e+0];i.length?(o=i[i.length-1],s=a,Math.sqrt(Go(o,s))>1&&i.push(a)):i.push(a),i.push(t[e+3])}else{const l=t[e+0],c=t[e+1],h=t[e+2],u=t[e+3],f=tr(l,c,.5),p=tr(c,h,.5),g=tr(h,u,.5),y=tr(f,p,.5),m=tr(p,g,.5),x=tr(y,m,.5);Ql([l,f,y,x],0,n,i),Ql([x,m,g,u],0,n,i)}var o,s;return i}function j7(t,e){return qo(t,0,t.length,e)}function qo(t,e,n,r,i){const o=i||[],s=t[e],a=t[n-1];let l=0,c=1;for(let h=e+1;h<n-1;++h){const u=N7(t[h],s,a);u>l&&(l=u,c=h)}return Math.sqrt(l)>r?(qo(t,e,c+1,r,o),qo(t,c,n,r,o)):(o.length||o.push(s),o.push(a)),o}function Jl(t,e=.15,n){const r=[],i=(t.length-1)/3;for(let o=0;o<i;o++)Ql(t,3*o,e,r);return n&&n>0?qo(r,0,r.length,n):r}const je="none";class Uo{constructor(e){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=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*no(2,31))}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,n,r){return{shape:e,sets:n||[],options:r||this.defaultOptions}}line(e,n,r,i,o){const s=this._o(o);return this._d("line",[g0(e,n,r,i,s)],s)}rectangle(e,n,r,i,o){const s=this._o(o),a=[],l=R7(e,n,r,i,s);if(s.fill){const c=[[e,n],[e+r,n],[e+r,n+i],[e,n+i]];s.fillStyle==="solid"?a.push(Zl([c],s)):a.push(Hr([c],s))}return s.stroke!==je&&a.push(l),this._d("rectangle",a,s)}ellipse(e,n,r,i,o){const s=this._o(o),a=[],l=y0(r,i,s),c=Ul(e,n,s,l);if(s.fill)if(s.fillStyle==="solid"){const h=Ul(e,n,s,l).opset;h.type="fillPath",a.push(h)}else a.push(Hr([c.estimatedPoints],s));return s.stroke!==je&&a.push(c.opset),this._d("ellipse",a,s)}circle(e,n,r,i){const o=this.ellipse(e,n,r,r,i);return o.shape="circle",o}linearPath(e,n){const r=this._o(n);return this._d("linearPath",[Bo(e,!1,r)],r)}arc(e,n,r,i,o,s,a=!1,l){const c=this._o(l),h=[],u=v0(e,n,r,i,o,s,a,!0,c);if(a&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const p=v0(e,n,r,i,o,s,!0,!1,f);p.type="fillPath",h.push(p)}else h.push((function(f,p,g,y,m,x,v){const b=f,w=p;let _=Math.abs(g/2),$=Math.abs(y/2);_+=Pt(.01*_,v),$+=Pt(.01*$,v);let P=m,C=x;for(;P<0;)P+=2*Math.PI,C+=2*Math.PI;C-P>2*Math.PI&&(P=0,C=2*Math.PI);const T=(C-P)/v.curveStepCount,E=[];for(let S=P;S<=C;S+=T)E.push([b+_*Math.cos(S),w+$*Math.sin(S)]);return E.push([b+_*Math.cos(C),w+$*Math.sin(C)]),E.push([b,w]),Hr([E],v)})(e,n,r,i,o,s,c));return c.stroke!==je&&h.push(u),this._d("arc",h,c)}curve(e,n){const r=this._o(n),i=[],o=m0(e,r);if(r.fill&&r.fill!==je)if(r.fillStyle==="solid"){const s=m0(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{const s=[],a=e;if(a.length){const l=typeof a[0][0]=="number"?[a]:a;for(const c of l)c.length<3?s.push(...c):c.length===3?s.push(...Jl(P0([c[0],c[0],c[1],c[2]]),10,(1+r.roughness)/2)):s.push(...Jl(P0(c),10,(1+r.roughness)/2))}s.length&&i.push(Hr([s],r))}return r.stroke!==je&&i.push(o),this._d("curve",i,r)}polygon(e,n){const r=this._o(n),i=[],o=Bo(e,!0,r);return r.fill&&(r.fillStyle==="solid"?i.push(Zl([e],r)):i.push(Hr([e],r))),r.stroke!==je&&i.push(o),this._d("polygon",i,r)}path(e,n){const r=this._o(n),i=[];if(!e)return this._d("path",i,r);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=r.fill&&r.fill!=="transparent"&&r.fill!==je,s=r.stroke!==je,a=!!(r.simplification&&r.simplification<1),l=(function(h,u,f){const p=f0(u0(ql(h))),g=[];let y=[],m=[0,0],x=[];const v=()=>{x.length>=4&&y.push(...Jl(x,u)),x=[]},b=()=>{v(),y.length&&(g.push(y),y=[])};for(const{key:_,data:$}of p)switch(_){case"M":b(),m=[$[0],$[1]],y.push(m);break;case"L":v(),y.push([$[0],$[1]]);break;case"C":if(!x.length){const P=y.length?y[y.length-1]:m;x.push([P[0],P[1]])}x.push([$[0],$[1]]),x.push([$[2],$[3]]),x.push([$[4],$[5]]);break;case"Z":v(),y.push([m[0],m[1]])}if(b(),!f)return g;const w=[];for(const _ of g){const $=j7(_,f);$.length&&w.push($)}return w})(e,1,a?4-4*(r.simplification||1):(1+r.roughness)/2),c=x0(e,r);if(o)if(r.fillStyle==="solid")if(l.length===1){const h=x0(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else i.push(Zl(l,r));else i.push(Hr(l,r));return s&&(a?l.forEach((h=>{i.push(Bo(h,!1,r))})):i.push(c)),this._d("path",i,r)}opsToPath(e,n){let r="";for(const i of e.ops){const o=typeof n=="number"&&n>=0?i.data.map((s=>+s.toFixed(n))):i.data;switch(i.op){case"move":r+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":r+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":r+=`L${o[0]} ${o[1]} `}}return r.trim()}toPaths(e){const n=e.sets||[],r=e.options||this.defaultOptions,i=[];for(const o of n){let s=null;switch(o.type){case"path":s={d:this.opsToPath(o),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:je};break;case"fillPath":s={d:this.opsToPath(o),stroke:je,strokeWidth:0,fill:r.fill||je};break;case"fillSketch":s=this.fillSketch(o,r)}s&&i.push(s)}return i}fillSketch(e,n){let r=n.fillWeight;return r<0&&(r=n.strokeWidth/2),{d:this.opsToPath(e),stroke:n.fill||je,strokeWidth:r,fill:je}}_mergedShape(e){return e.filter(((n,r)=>r===0||n.op!=="move"))}}class W7{constructor(e,n){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new Uo(n)}draw(e){const n=e.sets||[],r=e.options||this.getDefaultOptions(),i=this.ctx,o=e.options.fixedDecimalPlaceDigits;for(const s of n)switch(s.type){case"path":i.save(),i.strokeStyle=r.stroke==="none"?"transparent":r.stroke,i.lineWidth=r.strokeWidth,r.strokeLineDash&&i.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(i.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(i,s,o),i.restore();break;case"fillPath":{i.save(),i.fillStyle=r.fill||"";const a=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,s,o,a),i.restore();break}case"fillSketch":this.fillSketch(i,s,r)}}fillSketch(e,n,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),e.save(),r.fillLineDash&&e.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(e.lineDashOffset=r.fillLineDashOffset),e.strokeStyle=r.fill||"",e.lineWidth=i,this._drawToContext(e,n,r.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,n,r,i="nonzero"){e.beginPath();for(const o of n.ops){const s=typeof r=="number"&&r>=0?o.data.map((a=>+a.toFixed(r))):o.data;switch(o.op){case"move":e.moveTo(s[0],s[1]);break;case"bcurveTo":e.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":e.lineTo(s[0],s[1])}}n.type==="fillPath"?e.fill(i):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,n,r,i,o){const s=this.gen.line(e,n,r,i,o);return this.draw(s),s}rectangle(e,n,r,i,o){const s=this.gen.rectangle(e,n,r,i,o);return this.draw(s),s}ellipse(e,n,r,i,o){const s=this.gen.ellipse(e,n,r,i,o);return this.draw(s),s}circle(e,n,r,i){const o=this.gen.circle(e,n,r,i);return this.draw(o),o}linearPath(e,n){const r=this.gen.linearPath(e,n);return this.draw(r),r}polygon(e,n){const r=this.gen.polygon(e,n);return this.draw(r),r}arc(e,n,r,i,o,s,a=!1,l){const c=this.gen.arc(e,n,r,i,o,s,a,l);return this.draw(c),c}curve(e,n){const r=this.gen.curve(e,n);return this.draw(r),r}path(e,n){const r=this.gen.path(e,n);return this.draw(r),r}}const Zo="http://www.w3.org/2000/svg";class F7{constructor(e,n){this.svg=e,this.gen=new Uo(n)}draw(e){const n=e.sets||[],r=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,o=i.createElementNS(Zo,"g"),s=e.options.fixedDecimalPlaceDigits;for(const a of n){let l=null;switch(a.type){case"path":l=i.createElementNS(Zo,"path"),l.setAttribute("d",this.opsToPath(a,s)),l.setAttribute("stroke",r.stroke),l.setAttribute("stroke-width",r.strokeWidth+""),l.setAttribute("fill","none"),r.strokeLineDash&&l.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":l=i.createElementNS(Zo,"path"),l.setAttribute("d",this.opsToPath(a,s)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",r.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(i,a,r)}l&&o.appendChild(l)}return o}fillSketch(e,n,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const o=e.createElementNS(Zo,"path");return o.setAttribute("d",this.opsToPath(n,r.fixedDecimalPlaceDigits)),o.setAttribute("stroke",r.fill||""),o.setAttribute("stroke-width",i+""),o.setAttribute("fill","none"),r.fillLineDash&&o.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,n){return this.gen.opsToPath(e,n)}line(e,n,r,i,o){const s=this.gen.line(e,n,r,i,o);return this.draw(s)}rectangle(e,n,r,i,o){const s=this.gen.rectangle(e,n,r,i,o);return this.draw(s)}ellipse(e,n,r,i,o){const s=this.gen.ellipse(e,n,r,i,o);return this.draw(s)}circle(e,n,r,i){const o=this.gen.circle(e,n,r,i);return this.draw(o)}linearPath(e,n){const r=this.gen.linearPath(e,n);return this.draw(r)}polygon(e,n){const r=this.gen.polygon(e,n);return this.draw(r)}arc(e,n,r,i,o,s,a=!1,l){const c=this.gen.arc(e,n,r,i,o,s,a,l);return this.draw(c)}curve(e,n){const r=this.gen.curve(e,n);return this.draw(r)}path(e,n){const r=this.gen.path(e,n);return this.draw(r)}}var B7={canvas:(t,e)=>new W7(t,e),svg:(t,e)=>new F7(t,e),generator:t=>new Uo(t),newSeed:()=>Uo.newSeed()},Y7=Object.defineProperty,C0=Object.getOwnPropertySymbols,V7=Object.prototype.hasOwnProperty,X7=Object.prototype.propertyIsEnumerable,O0=(t,e,n)=>e in t?Y7(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,G7=(t,e)=>{for(var n in e||(e={}))V7.call(e,n)&&O0(t,n,e[n]);if(C0)for(var n of C0(e))X7.call(e,n)&&O0(t,n,e[n]);return t};function q7(t,e,n){if(!t||!e){console.warn("Invalid node or svg element");return}const r=B7.svg(e,{options:{seed:1e3}}),i=bt("g");t.hasAttribute("transform")&&i.setAttribute("transform",t.getAttribute("transform")||"");const o=t.cloneNode();Qt(o,{opacity:.5}),o.hasAttribute("transform")&&o.removeAttribute("transform"),o.dataset.elementType="rough-volume",i.appendChild(o);const s=Z7(r,t,n);if(s){const{element:l,svgAttributes:c}=s;l.dataset.elementType="rough-element",l.style.pointerEvents="none",U7(l,c),i.appendChild(l)}t.id&&(i.id=t.id),Array.from(t.classList).forEach(l=>{i.classList.contains(l)||i.classList.add(l)}),Array.from(t.attributes).forEach(l=>{l.name.startsWith("data-")&&i.setAttribute(l.name,l.value)}),i.childElementCount>0?t.replaceWith(i):t.remove()}function U7(t,e){e.opacity!==void 0&&t.setAttribute("opacity",String(e.opacity)),e.fillOpacity!==void 0&&t.setAttribute("fill-opacity",String(e.fillOpacity)),e.strokeOpacity!==void 0&&t.setAttribute("stroke-opacity",String(e.strokeOpacity)),e.strokeLinecap&&t.setAttribute("stroke-linecap",e.strokeLinecap),e.strokeLinejoin&&t.setAttribute("stroke-linejoin",e.strokeLinejoin),e.strokeDasharray&&t.setAttribute("stroke-dasharray",e.strokeDasharray),e.filter&&t.setAttribute("filter",e.filter),e.clipPath&&t.setAttribute("clip-path",e.clipPath),e.mask&&t.setAttribute("mask",e.mask)}function Z7(t,e,n){const r=e.nodeName.toLowerCase(),i=(o,s)=>{const a=De(o,[...s,"fill","fill-opacity","stroke","stroke-opacity","stroke-width","stroke-dasharray","stroke-linecap","stroke-linejoin","opacity","filter","clip-path","mask"],!0),l={},c=G7({},n),h={};s.forEach(P=>{a[P]!==void 0&&(l[P]=a[P])});const{fill:u,"fill-opacity":f,stroke:p,"stroke-opacity":g,"stroke-width":y,"stroke-dasharray":m,"stroke-linecap":x,"stroke-linejoin":v,opacity:b,filter:w,"clip-path":_,mask:$}=a;if(c.fill=u||"none",c.stroke=p||(u&&u!=="none"?u:"currentColor"),y&&(c.strokeWidth=parseFloat(y)),m&&m!=="none"){const P=m.split(/[\s,]+/).map(C=>parseFloat(C)).filter(C=>!isNaN(C));P.length>0&&(c.strokeLineDash=P)}return f&&(h.fillOpacity=parseFloat(f)),g&&(h.strokeOpacity=parseFloat(g)),b&&(h.opacity=parseFloat(b)),x&&(h.strokeLinecap=x),v&&(h.strokeLinejoin=v),m&&m!=="none"&&(h.strokeDasharray=m),w&&(h.filter=w),_&&(h.clipPath=_),$&&(h.mask=$),[l,c,h]};try{let o=null,s={};switch(r){case"circle":{const[a,l,c]=i(e,["cx","cy","r"]),h=parseFloat(a.cx)||0,u=parseFloat(a.cy)||0,f=parseFloat(a.r)||0;o=t.circle(h,u,f*2,l),s=c;break}case"ellipse":{const[a,l,c]=i(e,["cx","cy","rx","ry"]),h=parseFloat(a.cx)||0,u=parseFloat(a.cy)||0,f=parseFloat(a.rx)||0,p=parseFloat(a.ry)||0;o=t.ellipse(h,u,f*2,p*2,l),s=c;break}case"line":{const[a,l,c]=i(e,["x1","y1","x2","y2"]),h=parseFloat(a.x1)||0,u=parseFloat(a.y1)||0,f=parseFloat(a.x2)||0,p=parseFloat(a.y2)||0;o=t.line(h,u,f,p,l),s=c;break}case"rect":{const[a,l,c]=i(e,["x","y","width","height","rx","ry"]),h=parseFloat(a.x)||0,u=parseFloat(a.y)||0,f=parseFloat(a.width)||0,p=parseFloat(a.height)||0,g=parseFloat(a.rx)||0,y=parseFloat(a.ry)||0;if(g>0||y>0){const v=K7(h,u,f,p,g||y,y||g);o=t.path(v,l)}else o=t.rectangle(h,u,f,p,l);s=c;break}case"path":{const[a,l,c]=i(e,["d"]),h=a.d||"";if(!h)return console.warn("Path element has no d attribute"),null;o=t.path(h,l),s=c;break}case"polygon":{const[a,l,c]=i(e,["points"]),h=M0(a.points||"");if(h.length<3)return console.warn("Polygon needs at least 3 points"),null;o=t.polygon(h,l),s=c;break}case"polyline":{const[a,l,c]=i(e,["points"]),h=M0(a.points||"");if(h.length<2)return console.warn("Polyline needs at least 2 points"),null;o=t.linearPath(h,l),s=c;break}default:return console.warn(`Unsupported shape type: ${r}`),null}return o?{element:o,svgAttributes:s}:null}catch(o){return console.error(`Error creating rough shape for ${r}:`,o),null}}function K7(t,e,n,r,i,o){return i=Math.min(i,n/2),o=Math.min(o,r/2),`
20
- M ${t+i} ${e}
21
- L ${t+n-i} ${e}
22
- A ${i} ${o} 0 0 1 ${t+n} ${e+o}
23
- L ${t+n} ${e+r-o}
24
- A ${i} ${o} 0 0 1 ${t+n-i} ${e+r}
25
- L ${t+i} ${e+r}
26
- A ${i} ${o} 0 0 1 ${t} ${e+r-o}
27
- L ${t} ${e+o}
28
- A ${i} ${o} 0 0 1 ${t+i} ${e}
11
+ </symbol>`);r&&(r.setAttribute("id",Ev),t.appendChild(r)),e.prepend(t)}function Iv(e,t){const{id:n,x:r=0,y:i=0,width:o=0,height:a=0}=an(e,["id","x","y","width","height"]),s=Se("g",{id:n,class:"btn-group",transform:`translate(${r}, ${i})`}),c=e.getAttribute("data-items");c&&s.setAttribute("data-items",c);const l=Math.max(+o,+a)/2,u=Se("circle",{cx:l,cy:l,r:l,fill:"#fff",stroke:"transparent"});s.appendChild(u);const h=Se("use",{href:`#${t}`,width:o,height:a});s.appendChild(h),s.style.cursor="pointer",e.replaceWith(s)}function JL(e){Iv(e,Mv)}function ez(e){Iv(e,Ev)}var tz=(e,t,n)=>new Promise((r,i)=>{var o=c=>{try{s(n.next(c))}catch(l){i(l)}},a=c=>{try{s(n.throw(c))}catch(l){i(l)}},s=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);s((n=n.apply(e,t)).next())});function nz(e){return e.startsWith("data:")}function io(e){return tz(this,null,function*(){var t;if(!e||!nz(e))return null;const n=(t=e.match(/^data:([^;]+)/))==null?void 0:t[1];if(!n)return null;const r=()=>new Promise((l,u)=>{const h=new Image;h.onload=()=>{const d=h.naturalWidth,f=h.naturalHeight,g=document.createElement("canvas"),y=g.getContext("2d");if(!y)return l({width:d,height:f,hasAlpha:!1});if(["image/jpeg","image/jpg","image/webp","image/gif"].includes(n))return l({width:d,height:f,hasAlpha:!1});g.width=d,g.height=f,y.drawImage(h,0,0);let m=!1;const v=10;for(let b=0;b<d&&!m;b+=v)for(let _=0;_<f;_+=v)if(y.getImageData(b,_,1,1).data[3]<255){m=!0;break}l({width:d,height:f,hasAlpha:m})},h.onerror=()=>u(new Error("Failed to analysis image")),h.src=e}),{width:i,height:o,hasAlpha:a}=yield r(),c=(()=>{if(a||n!=null&&n.includes("image/gif")||n!=null&&n.includes("image/svg")||Math.min(i,o)<=200)return"xMidYMid meet";const u=i/o;return u>=.6&&u<=1.67||u<.3||u>3.33?"xMidYMid meet":"xMidYMid slice"})();return fi(`
12
+ <symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${i} ${o}" preserveAspectRatio="${c}">
13
+ <image href="${e}" width="${i}" height="${o}" />
14
+ </symbol>`)})}function rz(e){const t=e.trim();return/^(?:<\?xml[^>]*>\s*)?<svg[\s>]/i.test(t)||t.startsWith("<symbol")}function hi(e){if(!e||!rz(e))return null;const t=e.replace(/<svg(?=[\s/>])/i,"<symbol").replace(/<\/svg>/i,"</symbol>");return fi(t)}var iz=(e,t,n)=>new Promise((r,i)=>{var o=c=>{try{s(n.next(c))}catch(l){i(l)}},a=c=>{try{s(n.throw(c))}catch(l){i(l)}},s=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);s((n=n.apply(e,t)).next())});function oz(e){try{return!!new URL(e)}catch(t){return!1}}function az(e,t){return!!(e.toLowerCase().includes("image/svg")||!e&&t==="svg")}function Av(e,t){return iz(this,null,function*(){if(!e||!oz(e))return null;const n=yield ts(e);if(!n.ok)throw new Error("Failed to load resource");const r=n.headers.get("Content-Type")||"";if(az(r,t)){const a=yield n.text();return hi(a)}const i=yield n.blob(),o=yield sz(i);return io(o)})}function sz(e){return new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>{t(r.result)},r.onerror=n,r.readAsDataURL(e)})}var Tv=(e,t,n)=>new Promise((r,i)=>{var o=c=>{try{s(n.next(c))}catch(l){i(l)}},a=c=>{try{s(n.throw(c))}catch(l){i(l)}},s=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);s((n=n.apply(e,t)).next())});const cz=e=>Tv(null,null,function*(){var t;try{const n=new URLSearchParams({text:e,topK:"1"}),r=`${tM}?${n.toString()}`,i=yield ts(r);if(!i.ok)return null;const o=yield i.json();return!(o!=null&&o.status)||!Array.isArray((t=o.data)==null?void 0:t.data)?null:o.data.data[0]||null}catch(n){return console.error(`Failed to query icon for "${e}":`,n),null}});function lz(e){return e.startsWith("data:")}function uz(e){const t=e.trim();return t.startsWith("<svg")||t.startsWith("<symbol")}function kv(e,t){return Tv(this,null,function*(){var n;if(!e)return null;const r=yield cz(e);if(!r)return null;if(uz(r))return hi(r);if(lz(r)){const i=((n=r.match(/^data:([^;]+)/))==null?void 0:n[1])||"",o=r.includes(";base64,");if(i==="image/svg+xml"&&!o){const a=r.indexOf(","),s=a>=0?r.slice(a+1):r;return hi(s)}return io(r)}return Av(r,t)})}let Rv=null;function hz(e){Rv=e}function dz(){return Rv}function fz(e){if(!e.startsWith("data:"))return null;const t=e.indexOf(",");if(t===-1)return null;const n=e.slice(5,t),r=e.slice(t+1),i=n.split(";"),o=i[0],a=i.includes("base64");return o==="image/svg+xml"&&!a?{source:"inline",format:"svg",encoding:"raw",data:r.startsWith("%3C")?decodeURIComponent(r):r}:o.startsWith("image/")?{source:"inline",format:o==="image/svg+xml"?"svg":"image",encoding:a?"base64":"data-uri",data:e}:null}const pz=new Set(["svg","png","jpg","jpeg","webp","gif"]);function gz(e){const t=e.trim();return t.startsWith("<svg")||t.startsWith("<symbol")}function mz(e){const t=e.toLowerCase();if(t.endsWith(".svg")||t.includes(".svg?"))return"svg";if(t.endsWith(".png")||t.endsWith(".jpg")||t.endsWith(".jpeg")||t.endsWith(".webp")||t.endsWith(".gif"))return"image"}function yz(e){var t;if(!e.startsWith("ref:"))return null;const n=e.slice(4),[r,...i]=n.split(":");if(!r||i.length===0)return null;let o;i.length>1&&pz.has(i[0].toLowerCase())&&(o=(t=i.shift())==null?void 0:t.toLowerCase());const a=i.join(":");if(!a)return null;const s=r==="url"?"remote":r;return s==="remote"?{source:"remote",format:o||mz(a)||void 0,data:a}:s==="search"?{source:"search",format:o||"svg",data:a}:s==="svg"?{source:"inline",format:"svg",data:a,encoding:"raw"}:{source:"custom",data:e,format:o}}function Ta(e){if(!e)return null;if(typeof e!="string"){if(e.source)return e;const r=e;return r.type==="image"?{source:"inline",format:"image",data:r.data}:r.type==="svg"?{source:"inline",format:"svg",encoding:"raw",data:r.data}:r.type==="remote"?{source:"remote",format:r.format,data:r.data}:r.type==="search"?{source:"search",format:r.format||"svg",data:r.data}:r.type==="custom"?{source:"custom",data:r.data}:null}const t=fz(e);if(t)return t;const n=yz(e);return n||(gz(e)?{source:"inline",format:"svg",encoding:"raw",data:e}:{source:"custom",data:e})}function bu(e){const t=typeof e=="string"?Ta(e):e;return t?"rsc-"+Lb(JSON.stringify(t)):null}function Lv(e){const t=bu(e);return t?`#${t}`:null}var _u=(e,t,n)=>new Promise((r,i)=>{var o=c=>{try{s(n.next(c))}catch(l){i(l)}},a=c=>{try{s(n.throw(c))}catch(l){i(l)}},s=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);s((n=n.apply(e,t)).next())});function vz(e,t,n){return _u(this,null,function*(){const r=Ta(t);if(!r)return null;r.scene||(r.scene=e);const{source:i,data:o,format:a,encoding:s}=r;let c=null;try{if(i==="inline"){const l=o.startsWith("data:");a==="svg"&&s==="raw"?c=hi(o):a==="svg"&&l?c=yield io(o):l||a==="image"?c=yield io(o):c=hi(o)}else if(i==="remote")c=yield Av(o,a);else if(i==="search")c=yield kv(o,a);else{const l=dz();l&&(c=yield l(r))}}catch(l){c=null}return c||(yield kv(bz(r,e,n),a))})}const zv=new Map,ka=new WeakMap;function Nv(e,t,n,r){return _u(this,null,function*(){if(!e)return null;const i=Ta(n);if(!i)return null;const o=bu(i),a=`resource:${o}`,s=ka.get(e);if(s!=null&&s.has(o))return o;const c=bv(e,a);if(c)return yield c;const l=_u(null,null,function*(){const u=zv.has(o)?zv.get(o)||null:yield vz(t,i,r);if(!u)return null;ka.has(e)||ka.set(e,new Map);const h=ka.get(e);if(h.has(o))return o;const d=Qa(e);return u.id=o,d.appendChild(u),h.set(o,u),o});return _v(e,a,l),yield l})}function bz(e,t,n){const r=t==="illus"?"illustration":"icon",i=Ra(e.data)||Ra(n==null?void 0:n.label)||Ra(n==null?void 0:n.desc);if(i)return i;const o=Ra(e.data);return!o||e.source==="inline"||o.startsWith("data:")||o.startsWith("<svg")||o.startsWith("<symbol")?r:o}function Ra(e){if(typeof e!="string")return null;const t=e.trim();return t||null}var _z=Object.defineProperty,Hv=Object.getOwnPropertySymbols,xz=Object.prototype.hasOwnProperty,wz=Object.prototype.propertyIsEnumerable,Dv=(e,t,n)=>t in e?_z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,La=(e,t)=>{for(var n in t||(t={}))xz.call(t,n)&&Dv(e,n,t[n]);if(Hv)for(var n of Hv(t))wz.call(t,n)&&Dv(e,n,t[n]);return e};function Pz(e,t,n,r){var i,o;const a=n.icon;if(!a)return null;const{themeConfig:s}=r,c=(i=n.attributes)==null?void 0:i.icon,l=La(La({},(o=s.item)==null?void 0:o.icon),c),u=ro(t,l);return $z(e,t,a,u,n)}function $z(e,t,n,r,i){return Nv(e,"icon",n,i),WH(n,La(La({},an(t,["id","x","y","width","height","fill","stroke","data-element-type","data-indexes"])),r))}var Cz=Object.defineProperty,Oz=Object.defineProperties,Sz=Object.getOwnPropertyDescriptors,za=Object.getOwnPropertySymbols,qv=Object.prototype.hasOwnProperty,jv=Object.prototype.propertyIsEnumerable,Fv=(e,t,n)=>t in e?Cz(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oo=(e,t)=>{for(var n in t||(t={}))qv.call(t,n)&&Fv(e,n,t[n]);if(za)for(var n of za(t))jv.call(t,n)&&Fv(e,n,t[n]);return e},Bv=(e,t)=>Oz(e,Sz(t)),Mz=(e,t)=>{var n={};for(var r in e)qv.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&za)for(var r of za(e))t.indexOf(r)<0&&jv.call(e,r)&&(n[r]=e[r]);return n};function Wv(e,t,n,r,i={}){if(!n)return null;const o=Ta(n);if(!o)return null;const a=bu(o);i&&Object.keys(i).length>0&&ut(t,i);const s=Iz(e,t,a);Nv(e,"illus",o,r);const{data:c,color:l}=o;return Az(a,Bv(oo(oo(oo({},Tz(t)),l?{color:l}:{}),i),{"clip-path":`url(#${s})`}),c)}function Ez(e,t,n){var r;const i=n.illus,o=(r=n.attributes)==null?void 0:r.illus;return Wv(e,t,i,n,o)}function Iz(e,t,n){const r=`clip-${n}-${UH()}`;if(e.querySelector(`#${r}`))return r;const i=Qa(e),o=Se("clipPath",{id:r}),a=t.cloneNode();return oH(a,["id","data-illus-bounds","data-element-type"]),o.appendChild(a),i.appendChild(o),r}function Az(e,t,n){const r=t,{"clip-path":i}=r,o=Mz(r,["clip-path"]),{x:a="0",y:s="0",width:c="0",height:l="0"}=o,u=Se("rect",{id:`${e}-volume`,"data-element-type":Ue.IllusVolume,x:a,y:s,width:c,height:l,fill:"transparent"}),h=Se("g",{"data-element-type":Ue.IllusGroup,"clip-path":i,id:`${e}-group`});h.appendChild(u);const d=Se("use",Bv(oo({id:e,fill:"lightgray"},o),{href:Lv(n),"data-element-type":Ue.Illus}));return h.appendChild(d),h}function Tz(e){const t=e.getAttribute("data-illus-bounds");if(!t)return oo({x:"0",y:"0",width:"0",height:"0"},an(e,["x","y","width","height"]));const[n,r,i,o]=t.split(" ");return{x:n,y:r,width:i,height:o}}function Na(e){"@babel/helpers - typeof";return Na=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Na(e)}var kz=/^\s+/,Rz=/\s+$/;function ve(e,t){if(e=e||"",t=t||{},e instanceof ve)return e;if(!(this instanceof ve))return new ve(e,t);var n=Lz(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}ve.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,r,i,o,a,s;return n=t.r/255,r=t.g/255,i=t.b/255,n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),i<=.03928?s=i/12.92:s=Math.pow((i+.055)/1.055,2.4),.2126*o+.7152*a+.0722*s},setAlpha:function(t){return this._a=Kv(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=Vv(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=Vv(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+i+"%)":"hsva("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=Gv(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=Gv(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+i+"%)":"hsla("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return Yv(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return Dz(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(vt(this._r,255)*100)+"%",g:Math.round(vt(this._g,255)*100)+"%",b:Math.round(vt(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(vt(this._r,255)*100)+"%, "+Math.round(vt(this._g,255)*100)+"%, "+Math.round(vt(this._b,255)*100)+"%)":"rgba("+Math.round(vt(this._r,255)*100)+"%, "+Math.round(vt(this._g,255)*100)+"%, "+Math.round(vt(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Zz[Yv(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+Xv(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?"GradientType = 1, ":"";if(t){var o=ve(t);r="#"+Xv(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var n=!!t;t=t||this._format;var r=!1,i=this._a<1&&this._a>=0,o=!n&&i&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return o?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return ve(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(Bz,arguments)},brighten:function(){return this._applyModification(Wz,arguments)},darken:function(){return this._applyModification(Gz,arguments)},desaturate:function(){return this._applyModification(qz,arguments)},saturate:function(){return this._applyModification(jz,arguments)},greyscale:function(){return this._applyModification(Fz,arguments)},spin:function(){return this._applyModification(Vz,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(Uz,arguments)},complement:function(){return this._applyCombination(Yz,arguments)},monochromatic:function(){return this._applyCombination(Kz,arguments)},splitcomplement:function(){return this._applyCombination(Xz,arguments)},triad:function(){return this._applyCombination(Uv,[3])},tetrad:function(){return this._applyCombination(Uv,[4])}},ve.fromRatio=function(e,t){if(Na(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=ao(e[r]));e=n}return ve(e,t)};function Lz(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=tN(e)),Na(e)=="object"&&(qn(e.r)&&qn(e.g)&&qn(e.b)?(t=zz(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):qn(e.h)&&qn(e.s)&&qn(e.v)?(r=ao(e.s),i=ao(e.v),t=Hz(e.h,r,i),a=!0,s="hsv"):qn(e.h)&&qn(e.s)&&qn(e.l)&&(r=ao(e.s),o=ao(e.l),t=Nz(e.h,r,o),a=!0,s="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=Kv(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function zz(e,t,n){return{r:vt(e,255)*255,g:vt(t,255)*255,b:vt(n,255)*255}}function Gv(e,t,n){e=vt(e,255),t=vt(t,255),n=vt(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o,a,s=(r+i)/2;if(r==i)o=a=0;else{var c=r-i;switch(a=s>.5?c/(2-r-i):c/(r+i),r){case e:o=(t-n)/c+(t<n?6:0);break;case t:o=(n-e)/c+2;break;case n:o=(e-t)/c+4;break}o/=6}return{h:o,s:a,l:s}}function Nz(e,t,n){var r,i,o;e=vt(e,360),t=vt(t,100),n=vt(n,100);function a(l,u,h){return h<0&&(h+=1),h>1&&(h-=1),h<1/6?l+(u-l)*6*h:h<1/2?u:h<2/3?l+(u-l)*(2/3-h)*6:l}if(t===0)r=i=o=n;else{var s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;r=a(c,s,e+1/3),i=a(c,s,e),o=a(c,s,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function Vv(e,t,n){e=vt(e,255),t=vt(t,255),n=vt(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o,a,s=r,c=r-i;if(a=r===0?0:c/r,r==i)o=0;else{switch(r){case e:o=(t-n)/c+(t<n?6:0);break;case t:o=(n-e)/c+2;break;case n:o=(e-t)/c+4;break}o/=6}return{h:o,s:a,v:s}}function Hz(e,t,n){e=vt(e,360)*6,t=vt(t,100),n=vt(n,100);var r=Math.floor(e),i=e-r,o=n*(1-t),a=n*(1-i*t),s=n*(1-(1-i)*t),c=r%6,l=[n,a,o,o,s,n][c],u=[s,n,n,a,o,o][c],h=[o,o,s,n,n,a][c];return{r:l*255,g:u*255,b:h*255}}function Yv(e,t,n,r){var i=[hn(Math.round(e).toString(16)),hn(Math.round(t).toString(16)),hn(Math.round(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function Dz(e,t,n,r,i){var o=[hn(Math.round(e).toString(16)),hn(Math.round(t).toString(16)),hn(Math.round(n).toString(16)),hn(Zv(r))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function Xv(e,t,n,r){var i=[hn(Zv(r)),hn(Math.round(e).toString(16)),hn(Math.round(t).toString(16)),hn(Math.round(n).toString(16))];return i.join("")}ve.equals=function(e,t){return!e||!t?!1:ve(e).toRgbString()==ve(t).toRgbString()},ve.random=function(){return ve.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function qz(e,t){t=t===0?0:t||10;var n=ve(e).toHsl();return n.s-=t/100,n.s=Ha(n.s),ve(n)}function jz(e,t){t=t===0?0:t||10;var n=ve(e).toHsl();return n.s+=t/100,n.s=Ha(n.s),ve(n)}function Fz(e){return ve(e).desaturate(100)}function Bz(e,t){t=t===0?0:t||10;var n=ve(e).toHsl();return n.l+=t/100,n.l=Ha(n.l),ve(n)}function Wz(e,t){t=t===0?0:t||10;var n=ve(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),ve(n)}function Gz(e,t){t=t===0?0:t||10;var n=ve(e).toHsl();return n.l-=t/100,n.l=Ha(n.l),ve(n)}function Vz(e,t){var n=ve(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,ve(n)}function Yz(e){var t=ve(e).toHsl();return t.h=(t.h+180)%360,ve(t)}function Uv(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=ve(e).toHsl(),r=[ve(e)],i=360/t,o=1;o<t;o++)r.push(ve({h:(n.h+o*i)%360,s:n.s,l:n.l}));return r}function Xz(e){var t=ve(e).toHsl(),n=t.h;return[ve(e),ve({h:(n+72)%360,s:t.s,l:t.l}),ve({h:(n+216)%360,s:t.s,l:t.l})]}function Uz(e,t,n){t=t||6,n=n||30;var r=ve(e).toHsl(),i=360/n,o=[ve(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(ve(r));return o}function Kz(e,t){t=t||6;for(var n=ve(e).toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(ve({h:r,s:i,v:o})),o=(o+s)%1;return a}ve.mix=function(e,t,n){n=n===0?0:n||50;var r=ve(e).toRgb(),i=ve(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return ve(a)},ve.readability=function(e,t){var n=ve(e),r=ve(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},ve.isReadable=function(e,t,n){var r=ve.readability(e,t),i,o;switch(o=!1,i=nN(n),i.level+i.size){case"AAsmall":case"AAAlarge":o=r>=4.5;break;case"AAlarge":o=r>=3;break;case"AAAsmall":o=r>=7;break}return o},ve.mostReadable=function(e,t,n){var r=null,i=0,o,a,s,c;n=n||{},a=n.includeFallbackColors,s=n.level,c=n.size;for(var l=0;l<t.length;l++)o=ve.readability(e,t[l]),o>i&&(i=o,r=ve(t[l]));return ve.isReadable(e,r,{level:s,size:c})||!a?r:(n.includeFallbackColors=!1,ve.mostReadable(e,["#fff","#000"],n))};var xu=ve.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Zz=ve.hexNames=Qz(xu);function Qz(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function Kv(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function vt(e,t){Jz(e)&&(e="100%");var n=eN(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Ha(e){return Math.min(1,Math.max(0,e))}function rn(e){return parseInt(e,16)}function Jz(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function eN(e){return typeof e=="string"&&e.indexOf("%")!=-1}function hn(e){return e.length==1?"0"+e:""+e}function ao(e){return e<=1&&(e=e*100+"%"),e}function Zv(e){return Math.round(parseFloat(e)*255).toString(16)}function Qv(e){return rn(e)/255}var dn=(function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function qn(e){return!!dn.CSS_UNIT.exec(e)}function tN(e){e=e.replace(kz,"").replace(Rz,"").toLowerCase();var t=!1;if(xu[e])e=xu[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=dn.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=dn.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=dn.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=dn.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=dn.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=dn.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=dn.hex8.exec(e))?{r:rn(n[1]),g:rn(n[2]),b:rn(n[3]),a:Qv(n[4]),format:t?"name":"hex8"}:(n=dn.hex6.exec(e))?{r:rn(n[1]),g:rn(n[2]),b:rn(n[3]),format:t?"name":"hex"}:(n=dn.hex4.exec(e))?{r:rn(n[1]+""+n[1]),g:rn(n[2]+""+n[2]),b:rn(n[3]+""+n[3]),a:Qv(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=dn.hex3.exec(e))?{r:rn(n[1]+""+n[1]),g:rn(n[2]+""+n[2]),b:rn(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function nN(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}var rN=Object.defineProperty,Jv=Object.getOwnPropertySymbols,iN=Object.prototype.hasOwnProperty,oN=Object.prototype.propertyIsEnumerable,eb=(e,t,n)=>t in e?rN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aN=(e,t)=>{for(var n in t||(t={}))iN.call(t,n)&&eb(e,n,t[n]);if(Jv)for(var n of Jv(t))oN.call(t,n)&&eb(e,n,t[n]);return e};function tb(e,t,n,r){const i=e.getAttribute(r),o=sN(i,n),{type:a,colors:s=[]}=o,c=s.length-1,l=s.map((f,g)=>typeof f=="string"?Se("stop",{offset:`${g/c}`,"stop-color":f}):Se("stop",{offset:`${f.offset}`,"stop-color":f.color})),u=cN(o);if(a==="linear-gradient"){const{angle:f=0}=o,[[g,y],[m,v]]=lN(f),b=Se("linearGradient",{id:u,x1:g,y1:y,x2:m,y2:v});l.forEach(_=>b.appendChild(_)),nb(t,u,b)}else if(a==="radial-gradient"){const f=Se("radialGradient",{id:u});l.forEach(g=>f.appendChild(g)),nb(t,u,f)}const h=e.getAttribute("fill"),d=e.getAttribute("stroke");vr(h)&&e.setAttribute("fill",`url(#${u})`),vr(d)&&e.setAttribute("stroke",`url(#${u})`)}function nb(e,t,n){const r=Qa(e);n.setAttribute("id",t);const i=r.querySelector(`#${t}`);i?i.replaceWith(n):r.appendChild(n)}function sN(e,t){var n;if((n=t.colors)!=null&&n.length||!e)return t;const r=ve(e),i=aN({},t);return i.colors=r.isDark()?[e,r.lighten(20).toHexString()]:[r.darken(20).toHexString(),e],!("angle"in t)&&i.type==="linear-gradient"&&(i.angle=225),i}function cN(e){const{type:t,colors:n=[]}=e,r=Sv(n.map(i=>typeof i=="string"?i:`${i.color}_${i.offset}`).join("-"));if(t==="linear-gradient"){const{angle:i=0}=e;return`${t}-${r}-${i}`}return`${t}-${r}`}function lN(e){const t=Math.PI/180*e,n=Math.cos(t),r=Math.sin(t);return[[.5-n/2,.5-r/2],[.5+n/2,.5+r/2]]}const uN=Object.freeze(Object.defineProperty({__proto__:null,diamond:({scale:e=.5,backgroundColor:t,foregroundColor:n})=>{const r=Se("pattern",{id:"pattern-diamond",width:"20",height:"20",patternTransform:`scale(${e})`,patternUnits:"userSpaceOnUse"}),i=Se("rect",{width:"100%",height:"100%",fill:t}),o=Se("path",{d:"M0,0 L20,20 M20,0 L0,20",stroke:n,"stroke-width":"1"});return r.appendChild(i),r.appendChild(o),r},dot:({scale:e=1,backgroundColor:t,foregroundColor:n})=>{const r=Se("pattern",{id:"pattern-dot",width:"20",height:"20",patternTransform:`scale(${e})`,patternUnits:"userSpaceOnUse"}),i=Se("rect",{width:"100%",height:"100%",fill:t}),o=Se("circle",{cx:"5",cy:"5",r:"3",fill:n}),a=Se("circle",{cx:"15",cy:"15",r:"3",fill:n});return r.appendChild(i),r.appendChild(o),r.appendChild(a),r},hex:({scale:e=.3,backgroundColor:t,foregroundColor:n})=>{const r=Se("pattern",{id:"pattern-hex",width:"20",height:"20",patternTransform:`scale(${e})`,patternUnits:"userSpaceOnUse"}),i=Se("rect",{width:"100%",height:"100%",fill:t}),o=Se("path",{d:"M10,0 L20,5 L20,15 L10,20 L0,15 L0,5 Z",fill:n});return r.appendChild(i),r.appendChild(o),r},line:({scale:e=1,backgroundColor:t,foregroundColor:n})=>{const o=Se("pattern",{id:"pattern-line",width:"20",height:"20",patternTransform:`scale(${e})`,patternUnits:"userSpaceOnUse"}),a=Se("rect",{width:"100%",height:"100%",fill:t}),s=Se("line",{x1:"7",y1:"-3",x2:"23",y2:"13",stroke:n,"stroke-width":6,"stroke-opacity":"0.5"}),c=Se("line",{x1:"-3",y1:"7",x2:"13",y2:"23",stroke:n,"stroke-width":6,"stroke-opacity":"0.5"});return o.appendChild(a),o.appendChild(s),o.appendChild(c),o},mosaic:({scale:e=1,backgroundColor:t="#ffffff",foregroundColor:n="#000000"})=>{const s=Se("pattern",{id:"pattern-mosaic",width:20,height:20,patternUnits:"userSpaceOnUse",patternTransform:`scale(${e})`}),c=Se("rect",{width:"100%",height:"100%",fill:t});s.appendChild(c);for(let l=0;l<4;l++)for(let u=0;u<4;u++)if((u+l)%2===0){const h=Se("rect",{x:u*5,y:l*5,width:5,height:5,fill:n});s.appendChild(h)}return s},square:({scale:e=.3,backgroundColor:t,foregroundColor:n})=>{const r=Se("pattern",{id:"pattern-square",width:"20",height:"20",patternTransform:`scale(${e})`,patternUnits:"userSpaceOnUse"}),i=Se("rect",{width:"100%",height:"100%",fill:t}),o=Se("path",{d:"M0,0 L20,0 L20,20 L0,20 Z",fill:n});return r.appendChild(i),r.appendChild(o),r}},Symbol.toStringTag,{value:"Module"}));var hN=Object.defineProperty,Da=Object.getOwnPropertySymbols,rb=Object.prototype.hasOwnProperty,ib=Object.prototype.propertyIsEnumerable,ob=(e,t,n)=>t in e?hN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wu=(e,t)=>{for(var n in t||(t={}))rb.call(t,n)&&ob(e,n,t[n]);if(Da)for(var n of Da(t))ib.call(t,n)&&ob(e,n,t[n]);return e},dN=(e,t)=>{var n={};for(var r in e)rb.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Da)for(var r of Da(e))t.indexOf(r)<0&&ib.call(e,r)&&(n[r]=e[r]);return n};const Pu=new Map;function ab(e,t){Pu.has(e)&&console.warn(`Pattern ${e} will be overwritten`),Pu.set(e,t)}for(const[e,t]of Object.entries(uN))ab(e,t);function fN(e,t,n){const r=n.themeConfig.stylize;if(!r||r.type!=="pattern")return;const i=r,{pattern:o}=i,a=dN(i,["pattern"]),s=Pu.get(o);if(!s)return console.warn(`Pattern ${o} not found`);const{fill:c}=an(e,["fill","stroke"]),l=c,u=wu({backgroundColor:l&&ve(l).setAlpha(.5).toRgbString(),foregroundColor:l},a),h=gN(wu(wu({},r),u));pN(t,h,s(u)),vr(c)&&(e.setAttribute("fill",`url(#${h})`),!e.getAttribute("stroke")&&c&&e.setAttribute("stroke",c))}function pN(e,t,n){const r=Qa(e);n.setAttribute("id",t);const i=r.querySelector(`pattern#${t}`);i?i.replaceWith(n):r.appendChild(n)}function gN(e){const{pattern:t,foregroundColor:n="unset",backgroundColor:r="unset",scale:i="unset"}=e;return Sv(`pattern-${t}-${n}-${r}-${i}`)}function $u(e,t,n){if(e&&e.length){const[r,i]=t,o=Math.PI/180*n,a=Math.cos(o),s=Math.sin(o);for(const c of e){const[l,u]=c;c[0]=(l-r)*a-(u-i)*s+r,c[1]=(l-r)*s+(u-i)*a+i}}}function mN(e,t){return e[0]===t[0]&&e[1]===t[1]}function yN(e,t,n,r=1){const i=n,o=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,s=[0,0];if(i)for(const l of a)$u(l,s,i);const c=(function(l,u,h){const d=[];for(const b of l){const _=[...b];mN(_[0],_[_.length-1])||_.push([_[0][0],_[0][1]]),_.length>2&&d.push(_)}const f=[];u=Math.max(u,.1);const g=[];for(const b of d)for(let _=0;_<b.length-1;_++){const x=b[_],w=b[_+1];if(x[1]!==w[1]){const P=Math.min(x[1],w[1]);g.push({ymin:P,ymax:Math.max(x[1],w[1]),x:P===x[1]?x[0]:w[0],islope:(w[0]-x[0])/(w[1]-x[1])})}}if(g.sort(((b,_)=>b.ymin<_.ymin?-1:b.ymin>_.ymin?1:b.x<_.x?-1:b.x>_.x?1:b.ymax===_.ymax?0:(b.ymax-_.ymax)/Math.abs(b.ymax-_.ymax))),!g.length)return f;let y=[],m=g[0].ymin,v=0;for(;y.length||g.length;){if(g.length){let b=-1;for(let _=0;_<g.length&&!(g[_].ymin>m);_++)b=_;g.splice(0,b+1).forEach((_=>{y.push({s:m,edge:_})}))}if(y=y.filter((b=>!(b.edge.ymax<=m))),y.sort(((b,_)=>b.edge.x===_.edge.x?0:(b.edge.x-_.edge.x)/Math.abs(b.edge.x-_.edge.x))),(h!==1||v%u==0)&&y.length>1)for(let b=0;b<y.length;b+=2){const _=b+1;if(_>=y.length)break;const x=y[b].edge,w=y[_].edge;f.push([[Math.round(x.x),m],[Math.round(w.x),m]])}m+=h,y.forEach((b=>{b.edge.x=b.edge.x+h*b.edge.islope})),v++}return f})(a,o,r);if(i){for(const l of a)$u(l,s,-i);(function(l,u,h){const d=[];l.forEach((f=>d.push(...f))),$u(d,u,h)})(c,s,-i)}return c}function so(e,t){var n;const r=t.hachureAngle+90;let i=t.hachureGap;i<0&&(i=4*t.strokeWidth),i=Math.round(Math.max(i,.1));let o=1;return t.roughness>=1&&(((n=t.randomizer)===null||n===void 0?void 0:n.next())||Math.random())>.7&&(o=i),yN(e,i,r,o||1)}let Cu=class{constructor(t){this.helper=t}fillPolygons(t,n){return this._fillPolygons(t,n)}_fillPolygons(t,n){const r=so(t,n);return{type:"fillSketch",ops:this.renderLines(r,n)}}renderLines(t,n){const r=[];for(const i of t)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],n));return r}};function qa(e){const t=e[0],n=e[1];return Math.sqrt(Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2))}let vN=class extends Cu{fillPolygons(t,n){let r=n.hachureGap;r<0&&(r=4*n.strokeWidth),r=Math.max(r,.1);const i=so(t,Object.assign({},n,{hachureGap:r})),o=Math.PI/180*n.hachureAngle,a=[],s=.5*r*Math.cos(o),c=.5*r*Math.sin(o);for(const[l,u]of i)qa([l,u])&&a.push([[l[0]-s,l[1]+c],[...u]],[[l[0]+s,l[1]-c],[...u]]);return{type:"fillSketch",ops:this.renderLines(a,n)}}},bN=class extends Cu{fillPolygons(t,n){const r=this._fillPolygons(t,n),i=Object.assign({},n,{hachureAngle:n.hachureAngle+90}),o=this._fillPolygons(t,i);return r.ops=r.ops.concat(o.ops),r}},_N=class{constructor(t){this.helper=t}fillPolygons(t,n){const r=so(t,n=Object.assign({},n,{hachureAngle:0}));return this.dotsOnLines(r,n)}dotsOnLines(t,n){const r=[];let i=n.hachureGap;i<0&&(i=4*n.strokeWidth),i=Math.max(i,.1);let o=n.fillWeight;o<0&&(o=n.strokeWidth/2);const a=i/4;for(const s of t){const c=qa(s),l=c/i,u=Math.ceil(l)-1,h=c-u*i,d=(s[0][0]+s[1][0])/2-i/4,f=Math.min(s[0][1],s[1][1]);for(let g=0;g<u;g++){const y=f+h+g*i,m=d-a+2*Math.random()*a,v=y-a+2*Math.random()*a,b=this.helper.ellipse(m,v,o,o,n);r.push(...b.ops)}}return{type:"fillSketch",ops:r}}},xN=class{constructor(t){this.helper=t}fillPolygons(t,n){const r=so(t,n);return{type:"fillSketch",ops:this.dashedLine(r,n)}}dashedLine(t,n){const r=n.dashOffset<0?n.hachureGap<0?4*n.strokeWidth:n.hachureGap:n.dashOffset,i=n.dashGap<0?n.hachureGap<0?4*n.strokeWidth:n.hachureGap:n.dashGap,o=[];return t.forEach((a=>{const s=qa(a),c=Math.floor(s/(r+i)),l=(s+i-c*(r+i))/2;let u=a[0],h=a[1];u[0]>h[0]&&(u=a[1],h=a[0]);const d=Math.atan((h[1]-u[1])/(h[0]-u[0]));for(let f=0;f<c;f++){const g=f*(r+i),y=g+r,m=[u[0]+g*Math.cos(d)+l*Math.cos(d),u[1]+g*Math.sin(d)+l*Math.sin(d)],v=[u[0]+y*Math.cos(d)+l*Math.cos(d),u[1]+y*Math.sin(d)+l*Math.sin(d)];o.push(...this.helper.doubleLineOps(m[0],m[1],v[0],v[1],n))}})),o}},wN=class{constructor(t){this.helper=t}fillPolygons(t,n){const r=n.hachureGap<0?4*n.strokeWidth:n.hachureGap,i=n.zigzagOffset<0?r:n.zigzagOffset,o=so(t,n=Object.assign({},n,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(o,i,n)}}zigzagLines(t,n,r){const i=[];return t.forEach((o=>{const a=qa(o),s=Math.round(a/(2*n));let c=o[0],l=o[1];c[0]>l[0]&&(c=o[1],l=o[0]);const u=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let h=0;h<s;h++){const d=2*h*n,f=2*(h+1)*n,g=Math.sqrt(2*Math.pow(n,2)),y=[c[0]+d*Math.cos(u),c[1]+d*Math.sin(u)],m=[c[0]+f*Math.cos(u),c[1]+f*Math.sin(u)],v=[y[0]+g*Math.cos(u+Math.PI/4),y[1]+g*Math.sin(u+Math.PI/4)];i.push(...this.helper.doubleLineOps(y[0],y[1],v[0],v[1],r),...this.helper.doubleLineOps(v[0],v[1],m[0],m[1],r))}})),i}};const Zt={};let PN=class{constructor(t){this.seed=t}next(){return this.seed?(Qo(2,31)-1&(this.seed=Math.imul(48271,this.seed)))/Qo(2,31):Math.random()}};const $N=0,Ou=1,sb=2,ja={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 Su(e,t){return e.type===t}function Mu(e){const t=[],n=(function(a){const s=new Array;for(;a!=="";)if(a.match(/^([ \t\r\n,]+)/))a=a.substr(RegExp.$1.length);else if(a.match(/^([aAcChHlLmMqQsStTvVzZ])/))s[s.length]={type:$N,text:RegExp.$1},a=a.substr(RegExp.$1.length);else{if(!a.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];s[s.length]={type:Ou,text:`${parseFloat(RegExp.$1)}`},a=a.substr(RegExp.$1.length)}return s[s.length]={type:sb,text:""},s})(e);let r="BOD",i=0,o=n[i];for(;!Su(o,sb);){let a=0;const s=[];if(r==="BOD"){if(o.text!=="M"&&o.text!=="m")return Mu("M0,0"+e);i++,a=ja[o.text],r=o.text}else Su(o,Ou)?a=ja[r]:(i++,a=ja[o.text],r=o.text);if(!(i+a<n.length))throw new Error("Path data ended short");for(let c=i;c<i+a;c++){const l=n[c];if(!Su(l,Ou))throw new Error("Param not a number: "+r+","+l.text);s[s.length]=+l.text}if(typeof ja[r]!="number")throw new Error("Bad segment: "+r);{const c={key:r,data:s};t.push(c),i+=a,o=n[i],r==="M"&&(r="L"),r==="m"&&(r="l")}}return t}function cb(e){let t=0,n=0,r=0,i=0;const o=[];for(const{key:a,data:s}of e)switch(a){case"M":o.push({key:"M",data:[...s]}),[t,n]=s,[r,i]=s;break;case"m":t+=s[0],n+=s[1],o.push({key:"M",data:[t,n]}),r=t,i=n;break;case"L":o.push({key:"L",data:[...s]}),[t,n]=s;break;case"l":t+=s[0],n+=s[1],o.push({key:"L",data:[t,n]});break;case"C":o.push({key:"C",data:[...s]}),t=s[4],n=s[5];break;case"c":{const c=s.map(((l,u)=>u%2?l+n:l+t));o.push({key:"C",data:c}),t=c[4],n=c[5];break}case"Q":o.push({key:"Q",data:[...s]}),t=s[2],n=s[3];break;case"q":{const c=s.map(((l,u)=>u%2?l+n:l+t));o.push({key:"Q",data:c}),t=c[2],n=c[3];break}case"A":o.push({key:"A",data:[...s]}),t=s[5],n=s[6];break;case"a":t+=s[5],n+=s[6],o.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],t,n]});break;case"H":o.push({key:"H",data:[...s]}),t=s[0];break;case"h":t+=s[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...s]}),n=s[0];break;case"v":n+=s[0],o.push({key:"V",data:[n]});break;case"S":o.push({key:"S",data:[...s]}),t=s[2],n=s[3];break;case"s":{const c=s.map(((l,u)=>u%2?l+n:l+t));o.push({key:"S",data:c}),t=c[2],n=c[3];break}case"T":o.push({key:"T",data:[...s]}),t=s[0],n=s[1];break;case"t":t+=s[0],n+=s[1],o.push({key:"T",data:[t,n]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=r,n=i}return o}function lb(e){const t=[];let n="",r=0,i=0,o=0,a=0,s=0,c=0;for(const{key:l,data:u}of e){switch(l){case"M":t.push({key:"M",data:[...u]}),[r,i]=u,[o,a]=u;break;case"C":t.push({key:"C",data:[...u]}),r=u[4],i=u[5],s=u[2],c=u[3];break;case"L":t.push({key:"L",data:[...u]}),[r,i]=u;break;case"H":r=u[0],t.push({key:"L",data:[r,i]});break;case"V":i=u[0],t.push({key:"L",data:[r,i]});break;case"S":{let h=0,d=0;n==="C"||n==="S"?(h=r+(r-s),d=i+(i-c)):(h=r,d=i),t.push({key:"C",data:[h,d,...u]}),s=u[0],c=u[1],r=u[2],i=u[3];break}case"T":{const[h,d]=u;let f=0,g=0;n==="Q"||n==="T"?(f=r+(r-s),g=i+(i-c)):(f=r,g=i);const y=r+2*(f-r)/3,m=i+2*(g-i)/3,v=h+2*(f-h)/3,b=d+2*(g-d)/3;t.push({key:"C",data:[y,m,v,b,h,d]}),s=f,c=g,r=h,i=d;break}case"Q":{const[h,d,f,g]=u,y=r+2*(h-r)/3,m=i+2*(d-i)/3,v=f+2*(h-f)/3,b=g+2*(d-g)/3;t.push({key:"C",data:[y,m,v,b,f,g]}),s=h,c=d,r=f,i=g;break}case"A":{const h=Math.abs(u[0]),d=Math.abs(u[1]),f=u[2],g=u[3],y=u[4],m=u[5],v=u[6];h===0||d===0?(t.push({key:"C",data:[r,i,m,v,m,v]}),r=m,i=v):(r!==m||i!==v)&&(ub(r,i,m,v,h,d,f,g,y).forEach((function(b){t.push({key:"C",data:b})})),r=m,i=v);break}case"Z":t.push({key:"Z",data:[]}),r=o,i=a}n=l}return t}function co(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function ub(e,t,n,r,i,o,a,s,c,l){const u=(h=a,Math.PI*h/180);var h;let d=[],f=0,g=0,y=0,m=0;if(l)[f,g,y,m]=l;else{[e,t]=co(e,t,-u),[n,r]=co(n,r,-u);const O=(e-n)/2,T=(t-r)/2;let F=O*O/(i*i)+T*T/(o*o);F>1&&(F=Math.sqrt(F),i*=F,o*=F);const z=i*i,j=o*o,H=z*j-z*T*T-j*O*O,W=z*T*T+j*O*O,B=(s===c?-1:1)*Math.sqrt(Math.abs(H/W));y=B*i*T/o+(e+n)/2,m=B*-o*O/i+(t+r)/2,f=Math.asin(parseFloat(((t-m)/o).toFixed(9))),g=Math.asin(parseFloat(((r-m)/o).toFixed(9))),e<y&&(f=Math.PI-f),n<y&&(g=Math.PI-g),f<0&&(f=2*Math.PI+f),g<0&&(g=2*Math.PI+g),c&&f>g&&(f-=2*Math.PI),!c&&g>f&&(g-=2*Math.PI)}let v=g-f;if(Math.abs(v)>120*Math.PI/180){const O=g,T=n,F=r;g=c&&g>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,d=ub(n=y+i*Math.cos(g),r=m+o*Math.sin(g),T,F,i,o,a,0,c,[g,O,y,m])}v=g-f;const b=Math.cos(f),_=Math.sin(f),x=Math.cos(g),w=Math.sin(g),P=Math.tan(v/4),$=4/3*i*P,C=4/3*o*P,M=[e,t],S=[e+$*_,t-C*b],E=[n+$*w,r-C*x],I=[n,r];if(S[0]=2*M[0]-S[0],S[1]=2*M[1]-S[1],l)return[S,E,I].concat(d);{d=[S,E,I].concat(d);const O=[];for(let T=0;T<d.length;T+=3){const F=co(d[T][0],d[T][1],u),z=co(d[T+1][0],d[T+1][1],u),j=co(d[T+2][0],d[T+2][1],u);O.push([F[0],F[1],z[0],z[1],j[0],j[1]])}return O}}const CN={randOffset:function(e,t){return Ae(e,t)},randOffsetWithRange:function(e,t,n){return Ba(e,t,n)},ellipse:function(e,t,n,r,i){const o=fb(n,r,i);return Eu(e,t,i,o).opset},doubleLineOps:function(e,t,n,r,i){return rr(e,t,n,r,i,!0)}};function hb(e,t,n,r,i){return{type:"path",ops:rr(e,t,n,r,i)}}function Fa(e,t,n){const r=(e||[]).length;if(r>2){const i=[];for(let o=0;o<r-1;o++)i.push(...rr(e[o][0],e[o][1],e[o+1][0],e[o+1][1],n));return t&&i.push(...rr(e[r-1][0],e[r-1][1],e[0][0],e[0][1],n)),{type:"path",ops:i}}return r===2?hb(e[0][0],e[0][1],e[1][0],e[1][1],n):{type:"path",ops:[]}}function ON(e,t,n,r,i){return(function(o,a){return Fa(o,!0,a)})([[e,t],[e+n,t],[e+n,t+r],[e,t+r]],i)}function db(e,t){if(e.length){const n=typeof e[0][0]=="number"?[e]:e,r=Wa(n[0],1*(1+.2*t.roughness),t),i=t.disableMultiStroke?[]:Wa(n[0],1.5*(1+.22*t.roughness),mb(t));for(let o=1;o<n.length;o++){const a=n[o];if(a.length){const s=Wa(a,1*(1+.2*t.roughness),t),c=t.disableMultiStroke?[]:Wa(a,1.5*(1+.22*t.roughness),mb(t));for(const l of s)l.op!=="move"&&r.push(l);for(const l of c)l.op!=="move"&&i.push(l)}}return{type:"path",ops:r.concat(i)}}return{type:"path",ops:[]}}function fb(e,t,n){const r=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),i=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),o=2*Math.PI/i;let a=Math.abs(e/2),s=Math.abs(t/2);const c=1-n.curveFitting;return a+=Ae(a*c,n),s+=Ae(s*c,n),{increment:o,rx:a,ry:s}}function Eu(e,t,n,r){const[i,o]=vb(r.increment,e,t,r.rx,r.ry,1,r.increment*Ba(.1,Ba(.4,1,n),n),n);let a=Ga(i,null,n);if(!n.disableMultiStroke&&n.roughness!==0){const[s]=vb(r.increment,e,t,r.rx,r.ry,1.5,0,n),c=Ga(s,null,n);a=a.concat(c)}return{estimatedPoints:o,opset:{type:"path",ops:a}}}function pb(e,t,n,r,i,o,a,s,c){const l=e,u=t;let h=Math.abs(n/2),d=Math.abs(r/2);h+=Ae(.01*h,c),d+=Ae(.01*d,c);let f=i,g=o;for(;f<0;)f+=2*Math.PI,g+=2*Math.PI;g-f>2*Math.PI&&(f=0,g=2*Math.PI);const y=2*Math.PI/c.curveStepCount,m=Math.min(y/2,(g-f)/2),v=bb(m,l,u,h,d,f,g,1,c);if(!c.disableMultiStroke){const b=bb(m,l,u,h,d,f,g,1.5,c);v.push(...b)}return a&&(s?v.push(...rr(l,u,l+h*Math.cos(f),u+d*Math.sin(f),c),...rr(l,u,l+h*Math.cos(g),u+d*Math.sin(g),c)):v.push({op:"lineTo",data:[l,u]},{op:"lineTo",data:[l+h*Math.cos(f),u+d*Math.sin(f)]})),{type:"path",ops:v}}function gb(e,t){const n=lb(cb(Mu(e))),r=[];let i=[0,0],o=[0,0];for(const{key:a,data:s}of n)switch(a){case"M":o=[s[0],s[1]],i=[s[0],s[1]];break;case"L":r.push(...rr(o[0],o[1],s[0],s[1],t)),o=[s[0],s[1]];break;case"C":{const[c,l,u,h,d,f]=s;r.push(...SN(c,l,u,h,d,f,o,t)),o=[d,f];break}case"Z":r.push(...rr(o[0],o[1],i[0],i[1],t)),o=[i[0],i[1]]}return{type:"path",ops:r}}function Iu(e,t){const n=[];for(const r of e)if(r.length){const i=t.maxRandomnessOffset||0,o=r.length;if(o>2){n.push({op:"move",data:[r[0][0]+Ae(i,t),r[0][1]+Ae(i,t)]});for(let a=1;a<o;a++)n.push({op:"lineTo",data:[r[a][0]+Ae(i,t),r[a][1]+Ae(i,t)]})}}return{type:"fillPath",ops:n}}function di(e,t){return(function(n,r){let i=n.fillStyle||"hachure";if(!Zt[i])switch(i){case"zigzag":Zt[i]||(Zt[i]=new vN(r));break;case"cross-hatch":Zt[i]||(Zt[i]=new bN(r));break;case"dots":Zt[i]||(Zt[i]=new _N(r));break;case"dashed":Zt[i]||(Zt[i]=new xN(r));break;case"zigzag-line":Zt[i]||(Zt[i]=new wN(r));break;default:i="hachure",Zt[i]||(Zt[i]=new Cu(r))}return Zt[i]})(t,CN).fillPolygons(e,t)}function mb(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function yb(e){return e.randomizer||(e.randomizer=new PN(e.seed||0)),e.randomizer.next()}function Ba(e,t,n,r=1){return n.roughness*r*(yb(n)*(t-e)+e)}function Ae(e,t,n=1){return Ba(-e,e,t,n)}function rr(e,t,n,r,i,o=!1){const a=o?i.disableMultiStrokeFill:i.disableMultiStroke,s=Au(e,t,n,r,i,!0,!1);if(a)return s;const c=Au(e,t,n,r,i,!0,!0);return s.concat(c)}function Au(e,t,n,r,i,o,a){const s=Math.pow(e-n,2)+Math.pow(t-r,2),c=Math.sqrt(s);let l=1;l=c<200?1:c>500?.4:-.0016668*c+1.233334;let u=i.maxRandomnessOffset||0;u*u*100>s&&(u=c/10);const h=u/2,d=.2+.2*yb(i);let f=i.bowing*i.maxRandomnessOffset*(r-t)/200,g=i.bowing*i.maxRandomnessOffset*(e-n)/200;f=Ae(f,i,l),g=Ae(g,i,l);const y=[],m=()=>Ae(h,i,l),v=()=>Ae(u,i,l),b=i.preserveVertices;return a?y.push({op:"move",data:[e+(b?0:m()),t+(b?0:m())]}):y.push({op:"move",data:[e+(b?0:Ae(u,i,l)),t+(b?0:Ae(u,i,l))]}),a?y.push({op:"bcurveTo",data:[f+e+(n-e)*d+m(),g+t+(r-t)*d+m(),f+e+2*(n-e)*d+m(),g+t+2*(r-t)*d+m(),n+(b?0:m()),r+(b?0:m())]}):y.push({op:"bcurveTo",data:[f+e+(n-e)*d+v(),g+t+(r-t)*d+v(),f+e+2*(n-e)*d+v(),g+t+2*(r-t)*d+v(),n+(b?0:v()),r+(b?0:v())]}),y}function Wa(e,t,n){if(!e.length)return[];const r=[];r.push([e[0][0]+Ae(t,n),e[0][1]+Ae(t,n)]),r.push([e[0][0]+Ae(t,n),e[0][1]+Ae(t,n)]);for(let i=1;i<e.length;i++)r.push([e[i][0]+Ae(t,n),e[i][1]+Ae(t,n)]),i===e.length-1&&r.push([e[i][0]+Ae(t,n),e[i][1]+Ae(t,n)]);return Ga(r,null,n)}function Ga(e,t,n){const r=e.length,i=[];if(r>3){const o=[],a=1-n.curveTightness;i.push({op:"move",data:[e[1][0],e[1][1]]});for(let s=1;s+2<r;s++){const c=e[s];o[0]=[c[0],c[1]],o[1]=[c[0]+(a*e[s+1][0]-a*e[s-1][0])/6,c[1]+(a*e[s+1][1]-a*e[s-1][1])/6],o[2]=[e[s+1][0]+(a*e[s][0]-a*e[s+2][0])/6,e[s+1][1]+(a*e[s][1]-a*e[s+2][1])/6],o[3]=[e[s+1][0],e[s+1][1]],i.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}}else r===3?(i.push({op:"move",data:[e[1][0],e[1][1]]}),i.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):r===2&&i.push(...Au(e[0][0],e[0][1],e[1][0],e[1][1],n,!0,!0));return i}function vb(e,t,n,r,i,o,a,s){const c=[],l=[];if(s.roughness===0){e/=4,l.push([t+r*Math.cos(-e),n+i*Math.sin(-e)]);for(let u=0;u<=2*Math.PI;u+=e){const h=[t+r*Math.cos(u),n+i*Math.sin(u)];c.push(h),l.push(h)}l.push([t+r*Math.cos(0),n+i*Math.sin(0)]),l.push([t+r*Math.cos(e),n+i*Math.sin(e)])}else{const u=Ae(.5,s)-Math.PI/2;l.push([Ae(o,s)+t+.9*r*Math.cos(u-e),Ae(o,s)+n+.9*i*Math.sin(u-e)]);const h=2*Math.PI+u-.01;for(let d=u;d<h;d+=e){const f=[Ae(o,s)+t+r*Math.cos(d),Ae(o,s)+n+i*Math.sin(d)];c.push(f),l.push(f)}l.push([Ae(o,s)+t+r*Math.cos(u+2*Math.PI+.5*a),Ae(o,s)+n+i*Math.sin(u+2*Math.PI+.5*a)]),l.push([Ae(o,s)+t+.98*r*Math.cos(u+a),Ae(o,s)+n+.98*i*Math.sin(u+a)]),l.push([Ae(o,s)+t+.9*r*Math.cos(u+.5*a),Ae(o,s)+n+.9*i*Math.sin(u+.5*a)])}return[l,c]}function bb(e,t,n,r,i,o,a,s,c){const l=o+Ae(.1,c),u=[];u.push([Ae(s,c)+t+.9*r*Math.cos(l-e),Ae(s,c)+n+.9*i*Math.sin(l-e)]);for(let h=l;h<=a;h+=e)u.push([Ae(s,c)+t+r*Math.cos(h),Ae(s,c)+n+i*Math.sin(h)]);return u.push([t+r*Math.cos(a),n+i*Math.sin(a)]),u.push([t+r*Math.cos(a),n+i*Math.sin(a)]),Ga(u,null,c)}function SN(e,t,n,r,i,o,a,s){const c=[],l=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let u=[0,0];const h=s.disableMultiStroke?1:2,d=s.preserveVertices;for(let f=0;f<h;f++)f===0?c.push({op:"move",data:[a[0],a[1]]}):c.push({op:"move",data:[a[0]+(d?0:Ae(l[0],s)),a[1]+(d?0:Ae(l[0],s))]}),u=d?[i,o]:[i+Ae(l[f],s),o+Ae(l[f],s)],c.push({op:"bcurveTo",data:[e+Ae(l[f],s),t+Ae(l[f],s),n+Ae(l[f],s),r+Ae(l[f],s),u[0],u[1]]});return c}function lo(e){return[...e]}function _b(e,t=0){const n=e.length;if(n<3)throw new Error("A curve must have at least three points.");const r=[];if(n===3)r.push(lo(e[0]),lo(e[1]),lo(e[2]),lo(e[2]));else{const i=[];i.push(e[0],e[0]);for(let s=1;s<e.length;s++)i.push(e[s]),s===e.length-1&&i.push(e[s]);const o=[],a=1-t;r.push(lo(i[0]));for(let s=1;s+2<i.length;s++){const c=i[s];o[0]=[c[0],c[1]],o[1]=[c[0]+(a*i[s+1][0]-a*i[s-1][0])/6,c[1]+(a*i[s+1][1]-a*i[s-1][1])/6],o[2]=[i[s+1][0]+(a*i[s][0]-a*i[s+2][0])/6,i[s+1][1]+(a*i[s][1]-a*i[s+2][1])/6],o[3]=[i[s+1][0],i[s+1][1]],r.push(o[1],o[2],o[3])}}return r}function Va(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function MN(e,t,n){const r=Va(t,n);if(r===0)return Va(e,t);let i=((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/r;return i=Math.max(0,Math.min(1,i)),Va(e,Or(t,n,i))}function Or(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function Tu(e,t,n,r){const i=r||[];if((function(s,c){const l=s[c+0],u=s[c+1],h=s[c+2],d=s[c+3];let f=3*u[0]-2*l[0]-d[0];f*=f;let g=3*u[1]-2*l[1]-d[1];g*=g;let y=3*h[0]-2*d[0]-l[0];y*=y;let m=3*h[1]-2*d[1]-l[1];return m*=m,f<y&&(f=y),g<m&&(g=m),f+g})(e,t)<n){const s=e[t+0];i.length?(o=i[i.length-1],a=s,Math.sqrt(Va(o,a))>1&&i.push(s)):i.push(s),i.push(e[t+3])}else{const c=e[t+0],l=e[t+1],u=e[t+2],h=e[t+3],d=Or(c,l,.5),f=Or(l,u,.5),g=Or(u,h,.5),y=Or(d,f,.5),m=Or(f,g,.5),v=Or(y,m,.5);Tu([c,d,y,v],0,n,i),Tu([v,m,g,h],0,n,i)}var o,a;return i}function EN(e,t){return Ya(e,0,e.length,t)}function Ya(e,t,n,r,i){const o=i||[],a=e[t],s=e[n-1];let c=0,l=1;for(let u=t+1;u<n-1;++u){const h=MN(e[u],a,s);h>c&&(c=h,l=u)}return Math.sqrt(c)>r?(Ya(e,t,l+1,r,o),Ya(e,l,n,r,o)):(o.length||o.push(a),o.push(s)),o}function ku(e,t=.15,n){const r=[],i=(e.length-1)/3;for(let o=0;o<i;o++)Tu(e,3*o,t,r);return n&&n>0?Ya(r,0,r.length,n):r}const on="none";class Xa{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(Math.random()*Qo(2,31))}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,n,r){return{shape:t,sets:n||[],options:r||this.defaultOptions}}line(t,n,r,i,o){const a=this._o(o);return this._d("line",[hb(t,n,r,i,a)],a)}rectangle(t,n,r,i,o){const a=this._o(o),s=[],c=ON(t,n,r,i,a);if(a.fill){const l=[[t,n],[t+r,n],[t+r,n+i],[t,n+i]];a.fillStyle==="solid"?s.push(Iu([l],a)):s.push(di([l],a))}return a.stroke!==on&&s.push(c),this._d("rectangle",s,a)}ellipse(t,n,r,i,o){const a=this._o(o),s=[],c=fb(r,i,a),l=Eu(t,n,a,c);if(a.fill)if(a.fillStyle==="solid"){const u=Eu(t,n,a,c).opset;u.type="fillPath",s.push(u)}else s.push(di([l.estimatedPoints],a));return a.stroke!==on&&s.push(l.opset),this._d("ellipse",s,a)}circle(t,n,r,i){const o=this.ellipse(t,n,r,r,i);return o.shape="circle",o}linearPath(t,n){const r=this._o(n);return this._d("linearPath",[Fa(t,!1,r)],r)}arc(t,n,r,i,o,a,s=!1,c){const l=this._o(c),u=[],h=pb(t,n,r,i,o,a,s,!0,l);if(s&&l.fill)if(l.fillStyle==="solid"){const d=Object.assign({},l);d.disableMultiStroke=!0;const f=pb(t,n,r,i,o,a,!0,!1,d);f.type="fillPath",u.push(f)}else u.push((function(d,f,g,y,m,v,b){const _=d,x=f;let w=Math.abs(g/2),P=Math.abs(y/2);w+=Ae(.01*w,b),P+=Ae(.01*P,b);let $=m,C=v;for(;$<0;)$+=2*Math.PI,C+=2*Math.PI;C-$>2*Math.PI&&($=0,C=2*Math.PI);const M=(C-$)/b.curveStepCount,S=[];for(let E=$;E<=C;E+=M)S.push([_+w*Math.cos(E),x+P*Math.sin(E)]);return S.push([_+w*Math.cos(C),x+P*Math.sin(C)]),S.push([_,x]),di([S],b)})(t,n,r,i,o,a,l));return l.stroke!==on&&u.push(h),this._d("arc",u,l)}curve(t,n){const r=this._o(n),i=[],o=db(t,r);if(r.fill&&r.fill!==on)if(r.fillStyle==="solid"){const a=db(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{const a=[],s=t;if(s.length){const c=typeof s[0][0]=="number"?[s]:s;for(const l of c)l.length<3?a.push(...l):l.length===3?a.push(...ku(_b([l[0],l[0],l[1],l[2]]),10,(1+r.roughness)/2)):a.push(...ku(_b(l),10,(1+r.roughness)/2))}a.length&&i.push(di([a],r))}return r.stroke!==on&&i.push(o),this._d("curve",i,r)}polygon(t,n){const r=this._o(n),i=[],o=Fa(t,!0,r);return r.fill&&(r.fillStyle==="solid"?i.push(Iu([t],r)):i.push(di([t],r))),r.stroke!==on&&i.push(o),this._d("polygon",i,r)}path(t,n){const r=this._o(n),i=[];if(!t)return this._d("path",i,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=r.fill&&r.fill!=="transparent"&&r.fill!==on,a=r.stroke!==on,s=!!(r.simplification&&r.simplification<1),c=(function(u,h,d){const f=lb(cb(Mu(u))),g=[];let y=[],m=[0,0],v=[];const b=()=>{v.length>=4&&y.push(...ku(v,h)),v=[]},_=()=>{b(),y.length&&(g.push(y),y=[])};for(const{key:w,data:P}of f)switch(w){case"M":_(),m=[P[0],P[1]],y.push(m);break;case"L":b(),y.push([P[0],P[1]]);break;case"C":if(!v.length){const $=y.length?y[y.length-1]:m;v.push([$[0],$[1]])}v.push([P[0],P[1]]),v.push([P[2],P[3]]),v.push([P[4],P[5]]);break;case"Z":b(),y.push([m[0],m[1]])}if(_(),!d)return g;const x=[];for(const w of g){const P=EN(w,d);P.length&&x.push(P)}return x})(t,1,s?4-4*(r.simplification||1):(1+r.roughness)/2),l=gb(t,r);if(o)if(r.fillStyle==="solid")if(c.length===1){const u=gb(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(u.ops)})}else i.push(Iu(c,r));else i.push(di(c,r));return a&&(s?c.forEach((u=>{i.push(Fa(u,!1,r))})):i.push(l)),this._d("path",i,r)}opsToPath(t,n){let r="";for(const i of t.ops){const o=typeof n=="number"&&n>=0?i.data.map((a=>+a.toFixed(n))):i.data;switch(i.op){case"move":r+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":r+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":r+=`L${o[0]} ${o[1]} `}}return r.trim()}toPaths(t){const n=t.sets||[],r=t.options||this.defaultOptions,i=[];for(const o of n){let a=null;switch(o.type){case"path":a={d:this.opsToPath(o),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:on};break;case"fillPath":a={d:this.opsToPath(o),stroke:on,strokeWidth:0,fill:r.fill||on};break;case"fillSketch":a=this.fillSketch(o,r)}a&&i.push(a)}return i}fillSketch(t,n){let r=n.fillWeight;return r<0&&(r=n.strokeWidth/2),{d:this.opsToPath(t),stroke:n.fill||on,strokeWidth:r,fill:on}}_mergedShape(t){return t.filter(((n,r)=>r===0||n.op!=="move"))}}class IN{constructor(t,n){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Xa(n)}draw(t){const n=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of n)switch(a.type){case"path":i.save(),i.strokeStyle=r.stroke==="none"?"transparent":r.stroke,i.lineWidth=r.strokeWidth,r.strokeLineDash&&i.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(i.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(i,a,o),i.restore();break;case"fillPath":{i.save(),i.fillStyle=r.fill||"";const s=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,a,o,s),i.restore();break}case"fillSketch":this.fillSketch(i,a,r)}}fillSketch(t,n,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=i,this._drawToContext(t,n,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,n,r,i="nonzero"){t.beginPath();for(const o of n.ops){const a=typeof r=="number"&&r>=0?o.data.map((s=>+s.toFixed(r))):o.data;switch(o.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}n.type==="fillPath"?t.fill(i):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,n,r,i,o){const a=this.gen.line(t,n,r,i,o);return this.draw(a),a}rectangle(t,n,r,i,o){const a=this.gen.rectangle(t,n,r,i,o);return this.draw(a),a}ellipse(t,n,r,i,o){const a=this.gen.ellipse(t,n,r,i,o);return this.draw(a),a}circle(t,n,r,i){const o=this.gen.circle(t,n,r,i);return this.draw(o),o}linearPath(t,n){const r=this.gen.linearPath(t,n);return this.draw(r),r}polygon(t,n){const r=this.gen.polygon(t,n);return this.draw(r),r}arc(t,n,r,i,o,a,s=!1,c){const l=this.gen.arc(t,n,r,i,o,a,s,c);return this.draw(l),l}curve(t,n){const r=this.gen.curve(t,n);return this.draw(r),r}path(t,n){const r=this.gen.path(t,n);return this.draw(r),r}}const Ua="http://www.w3.org/2000/svg";class AN{constructor(t,n){this.svg=t,this.gen=new Xa(n)}draw(t){const n=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,o=i.createElementNS(Ua,"g"),a=t.options.fixedDecimalPlaceDigits;for(const s of n){let c=null;switch(s.type){case"path":c=i.createElementNS(Ua,"path"),c.setAttribute("d",this.opsToPath(s,a)),c.setAttribute("stroke",r.stroke),c.setAttribute("stroke-width",r.strokeWidth+""),c.setAttribute("fill","none"),r.strokeLineDash&&c.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&c.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":c=i.createElementNS(Ua,"path"),c.setAttribute("d",this.opsToPath(s,a)),c.setAttribute("stroke","none"),c.setAttribute("stroke-width","0"),c.setAttribute("fill",r.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||c.setAttribute("fill-rule","evenodd");break;case"fillSketch":c=this.fillSketch(i,s,r)}c&&o.appendChild(c)}return o}fillSketch(t,n,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const o=t.createElementNS(Ua,"path");return o.setAttribute("d",this.opsToPath(n,r.fixedDecimalPlaceDigits)),o.setAttribute("stroke",r.fill||""),o.setAttribute("stroke-width",i+""),o.setAttribute("fill","none"),r.fillLineDash&&o.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,n){return this.gen.opsToPath(t,n)}line(t,n,r,i,o){const a=this.gen.line(t,n,r,i,o);return this.draw(a)}rectangle(t,n,r,i,o){const a=this.gen.rectangle(t,n,r,i,o);return this.draw(a)}ellipse(t,n,r,i,o){const a=this.gen.ellipse(t,n,r,i,o);return this.draw(a)}circle(t,n,r,i){const o=this.gen.circle(t,n,r,i);return this.draw(o)}linearPath(t,n){const r=this.gen.linearPath(t,n);return this.draw(r)}polygon(t,n){const r=this.gen.polygon(t,n);return this.draw(r)}arc(t,n,r,i,o,a,s=!1,c){const l=this.gen.arc(t,n,r,i,o,a,s,c);return this.draw(l)}curve(t,n){const r=this.gen.curve(t,n);return this.draw(r)}path(t,n){const r=this.gen.path(t,n);return this.draw(r)}}var TN={canvas:(e,t)=>new IN(e,t),svg:(e,t)=>new AN(e,t),generator:e=>new Xa(e),newSeed:()=>Xa.newSeed()},kN=Object.defineProperty,xb=Object.getOwnPropertySymbols,RN=Object.prototype.hasOwnProperty,LN=Object.prototype.propertyIsEnumerable,wb=(e,t,n)=>t in e?kN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zN=(e,t)=>{for(var n in t||(t={}))RN.call(t,n)&&wb(e,n,t[n]);if(xb)for(var n of xb(t))LN.call(t,n)&&wb(e,n,t[n]);return e};function NN(e,t,n){if(!e||!t){console.warn("Invalid node or svg element");return}const r=TN.svg(t,{options:{seed:1e3}}),i=Se("g");e.hasAttribute("transform")&&i.setAttribute("transform",e.getAttribute("transform")||"");const o=e.cloneNode();ut(o,{opacity:.5}),o.hasAttribute("transform")&&o.removeAttribute("transform"),o.dataset.elementType="rough-volume",i.appendChild(o);const a=DN(r,e,n);if(a){const{element:c,svgAttributes:l}=a;c.dataset.elementType="rough-element",c.style.pointerEvents="none",HN(c,l),i.appendChild(c)}e.id&&(i.id=e.id),Array.from(e.classList).forEach(c=>{i.classList.contains(c)||i.classList.add(c)}),Array.from(e.attributes).forEach(c=>{c.name.startsWith("data-")&&i.setAttribute(c.name,c.value)}),i.childElementCount>0?e.replaceWith(i):e.remove()}function HN(e,t){t.opacity!==void 0&&e.setAttribute("opacity",String(t.opacity)),t.fillOpacity!==void 0&&e.setAttribute("fill-opacity",String(t.fillOpacity)),t.strokeOpacity!==void 0&&e.setAttribute("stroke-opacity",String(t.strokeOpacity)),t.strokeLinecap&&e.setAttribute("stroke-linecap",t.strokeLinecap),t.strokeLinejoin&&e.setAttribute("stroke-linejoin",t.strokeLinejoin),t.strokeDasharray&&e.setAttribute("stroke-dasharray",t.strokeDasharray),t.filter&&e.setAttribute("filter",t.filter),t.clipPath&&e.setAttribute("clip-path",t.clipPath),t.mask&&e.setAttribute("mask",t.mask)}function DN(e,t,n){const r=t.nodeName.toLowerCase(),i=(o,a)=>{const s=an(o,[...a,"fill","fill-opacity","stroke","stroke-opacity","stroke-width","stroke-dasharray","stroke-linecap","stroke-linejoin","opacity","filter","clip-path","mask"],!0),c={},l=zN({},n),u={};a.forEach($=>{s[$]!==void 0&&(c[$]=s[$])});const{fill:h,"fill-opacity":d,stroke:f,"stroke-opacity":g,"stroke-width":y,"stroke-dasharray":m,"stroke-linecap":v,"stroke-linejoin":b,opacity:_,filter:x,"clip-path":w,mask:P}=s;if(l.fill=h||"none",l.stroke=f||(h&&h!=="none"?h:"currentColor"),y&&(l.strokeWidth=parseFloat(y)),m&&m!=="none"){const $=m.split(/[\s,]+/).map(C=>parseFloat(C)).filter(C=>!isNaN(C));$.length>0&&(l.strokeLineDash=$)}return d&&(u.fillOpacity=parseFloat(d)),g&&(u.strokeOpacity=parseFloat(g)),_&&(u.opacity=parseFloat(_)),v&&(u.strokeLinecap=v),b&&(u.strokeLinejoin=b),m&&m!=="none"&&(u.strokeDasharray=m),x&&(u.filter=x),w&&(u.clipPath=w),P&&(u.mask=P),[c,l,u]};try{let o=null,a={};switch(r){case"circle":{const[s,c,l]=i(t,["cx","cy","r"]),u=parseFloat(s.cx)||0,h=parseFloat(s.cy)||0,d=parseFloat(s.r)||0;o=e.circle(u,h,d*2,c),a=l;break}case"ellipse":{const[s,c,l]=i(t,["cx","cy","rx","ry"]),u=parseFloat(s.cx)||0,h=parseFloat(s.cy)||0,d=parseFloat(s.rx)||0,f=parseFloat(s.ry)||0;o=e.ellipse(u,h,d*2,f*2,c),a=l;break}case"line":{const[s,c,l]=i(t,["x1","y1","x2","y2"]),u=parseFloat(s.x1)||0,h=parseFloat(s.y1)||0,d=parseFloat(s.x2)||0,f=parseFloat(s.y2)||0;o=e.line(u,h,d,f,c),a=l;break}case"rect":{const[s,c,l]=i(t,["x","y","width","height","rx","ry"]),u=parseFloat(s.x)||0,h=parseFloat(s.y)||0,d=parseFloat(s.width)||0,f=parseFloat(s.height)||0,g=parseFloat(s.rx)||0,y=parseFloat(s.ry)||0;if(g>0||y>0){const b=qN(u,h,d,f,g||y,y||g);o=e.path(b,c)}else o=e.rectangle(u,h,d,f,c);a=l;break}case"path":{const[s,c,l]=i(t,["d"]),u=s.d||"";if(!u)return console.warn("Path element has no d attribute"),null;o=e.path(u,c),a=l;break}case"polygon":{const[s,c,l]=i(t,["points"]),u=Pb(s.points||"");if(u.length<3)return console.warn("Polygon needs at least 3 points"),null;o=e.polygon(u,c),a=l;break}case"polyline":{const[s,c,l]=i(t,["points"]),u=Pb(s.points||"");if(u.length<2)return console.warn("Polyline needs at least 2 points"),null;o=e.linearPath(u,c),a=l;break}default:return console.warn(`Unsupported shape type: ${r}`),null}return o?{element:o,svgAttributes:a}:null}catch(o){return console.error(`Error creating rough shape for ${r}:`,o),null}}function qN(e,t,n,r,i,o){return i=Math.min(i,n/2),o=Math.min(o,r/2),`
15
+ M ${e+i} ${t}
16
+ L ${e+n-i} ${t}
17
+ A ${i} ${o} 0 0 1 ${e+n} ${t+o}
18
+ L ${e+n} ${t+r-o}
19
+ A ${i} ${o} 0 0 1 ${e+n-i} ${t+r}
20
+ L ${e+i} ${t+r}
21
+ A ${i} ${o} 0 0 1 ${e} ${t+r-o}
22
+ L ${e} ${t+o}
23
+ A ${i} ${o} 0 0 1 ${e+i} ${t}
29
24
  Z
30
- `.replace(/\s+/g," ").trim()}function M0(t){if(!t||typeof t!="string")return[];try{const n=t.trim().replace(/,/g," ").replace(/\s+/g," ").split(" ").filter(Boolean),r=[];for(let i=0;i<n.length-1;i+=2){const o=parseFloat(n[i]),s=parseFloat(n[i+1]);if(isNaN(o)||isNaN(s)){console.warn(`Invalid coordinate pair at index ${i}: "${n[i]}", "${n[i+1]}"`);continue}r.push([o,s])}return n.length%2!==0&&console.warn(`Odd number of coordinates in points attribute, last value ignored: "${n[n.length-1]}"`),r}catch(e){return console.error("Failed to parse polygon points:",t,e),[]}}function S0(t,e,n){var r;const{themeConfig:i}=n,o=Object.assign({},(r=i.base)==null?void 0:r.shape,i.shape),s=xi(e,o);return Qt(e,s),J7(e,t,n),e}function Q7(t,e){var n;Qt(t,((n=e.themeConfig.base)==null?void 0:n.shape)||{})}function J7(t,e,n){const r=n.themeConfig.stylize;if(!r)return t;const{type:i}=r;if(!i)return t;if(i==="rough")return q7(t,e,r);if(i==="pattern")return P7(t,e,n);if(i==="linear-gradient"||i==="radial-gradient"){const{fill:o,stroke:s}=De(t,["fill","stroke"]);Xn(o)&&o0(t,e,r,"fill"),Xn(s)&&o0(t,e,r,"stroke");return}}function t9(t,e){var n;const{themeConfig:r}=e,{"font-family":i=Ll}=((n=r.base)==null?void 0:n.text)||{};t.setAttribute("font-family",i)}var e9=/\s/;function n9(t){for(var e=t.length;e--&&e9.test(t.charAt(e)););return e}var r9=/^\s+/;function i9(t){return t&&t.slice(0,n9(t)+1).replace(r9,"")}var E0=NaN,o9=/^[-+]0x[0-9a-f]+$/i,s9=/^0b[01]+$/i,a9=/^0o[0-7]+$/i,l9=parseInt;function tc(t){if(typeof t=="number")return t;if(Co(t))return E0;if(an(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=an(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=i9(t);var n=s9.test(t);return n||a9.test(t)?l9(t.slice(2),n?2:8):o9.test(t)?E0:+t}function I0(t){return t}var ec=Un(sn,"WeakMap"),A0=Object.create,c9=(function(){function t(){}return function(e){if(!an(e))return{};if(A0)return A0(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}})();function h9(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function d9(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var u9=800,f9=16,p9=Date.now;function g9(t){var e=0,n=0;return function(){var r=p9(),i=f9-(r-n);if(n=r,i>0){if(++e>=u9)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function m9(t){return function(){return t}}var Ko=(function(){try{var t=Un(Object,"defineProperty");return t({},"",{}),t}catch(e){}})(),y9=Ko?function(t,e){return Ko(t,"toString",{configurable:!0,enumerable:!1,value:m9(e),writable:!0})}:I0,v9=g9(y9);function x9(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}var b9=9007199254740991,w9=/^(?:0|[1-9]\d*)$/;function T0(t,e){var n=typeof t;return e=e==null?b9:e,!!e&&(n=="number"||n!="symbol"&&w9.test(t))&&t>-1&&t%1==0&&t<e}function nc(t,e,n){e=="__proto__"&&Ko?Ko(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var _9=Object.prototype,$9=_9.hasOwnProperty;function k0(t,e,n){var r=t[e];(!($9.call(t,e)&&Oo(r,n))||n===void 0&&!(e in t))&&nc(t,e,n)}function P9(t,e,n,r){var i=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],l=void 0;l===void 0&&(l=t[a]),i?nc(n,a,l):k0(n,a,l)}return n}var L0=Math.max;function C9(t,e,n){return e=L0(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=L0(r.length-e,0),s=Array(o);++i<o;)s[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=n(s),h9(t,this,a)}}function O9(t,e){return v9(C9(t,e,I0),t+"")}var M9=9007199254740991;function z0(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=M9}function Qo(t){return t!=null&&z0(t.length)&&!ml(t)}function S9(t,e,n){if(!an(n))return!1;var r=typeof e;return(r=="number"?Qo(n)&&T0(e,n.length):r=="string"&&e in n)?Oo(n[e],t):!1}function E9(t){return O9(function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=t.length>3&&typeof o=="function"?(i--,o):void 0,s&&S9(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),e=Object(e);++r<i;){var a=n[r];a&&t(e,a,r,o)}return e})}var I9=Object.prototype;function rc(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||I9;return t===n}function A9(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var T9="[object Arguments]";function H0(t){return kn(t)&&Gn(t)==T9}var R0=Object.prototype,k9=R0.hasOwnProperty,L9=R0.propertyIsEnumerable,ic=H0((function(){return arguments})())?H0:function(t){return kn(t)&&k9.call(t,"callee")&&!L9.call(t,"callee")};function z9(){return!1}var D0=typeof W=="object"&&W&&!W.nodeType&&W,N0=D0&&typeof module=="object"&&module&&!module.nodeType&&module,H9=N0&&N0.exports===D0,j0=H9?sn.Buffer:void 0,R9=j0?j0.isBuffer:void 0,oc=R9||z9,D9="[object Arguments]",N9="[object Array]",j9="[object Boolean]",W9="[object Date]",F9="[object Error]",B9="[object Function]",Y9="[object Map]",V9="[object Number]",X9="[object Object]",G9="[object RegExp]",q9="[object Set]",U9="[object String]",Z9="[object WeakMap]",K9="[object ArrayBuffer]",Q9="[object DataView]",J9="[object Float32Array]",t8="[object Float64Array]",e8="[object Int8Array]",n8="[object Int16Array]",r8="[object Int32Array]",i8="[object Uint8Array]",o8="[object Uint8ClampedArray]",s8="[object Uint16Array]",a8="[object Uint32Array]",re={};re[J9]=re[t8]=re[e8]=re[n8]=re[r8]=re[i8]=re[o8]=re[s8]=re[a8]=!0,re[D9]=re[N9]=re[K9]=re[j9]=re[Q9]=re[W9]=re[F9]=re[B9]=re[Y9]=re[V9]=re[X9]=re[G9]=re[q9]=re[U9]=re[Z9]=!1;function l8(t){return kn(t)&&z0(t.length)&&!!re[Gn(t)]}function sc(t){return function(e){return t(e)}}var W0=typeof W=="object"&&W&&!W.nodeType&&W,Pi=W0&&typeof module=="object"&&module&&!module.nodeType&&module,c8=Pi&&Pi.exports===W0,ac=c8&&Pu.process,Rr=(function(){try{var t=Pi&&Pi.require&&Pi.require("util").types;return t||ac&&ac.binding&&ac.binding("util")}catch(e){}})(),F0=Rr&&Rr.isTypedArray,B0=F0?sc(F0):l8,h8=Object.prototype,d8=h8.hasOwnProperty;function Y0(t,e){var n=An(t),r=!n&&ic(t),i=!n&&!r&&oc(t),o=!n&&!r&&!i&&B0(t),s=n||r||i||o,a=s?A9(t.length,String):[],l=a.length;for(var c in t)(e||d8.call(t,c))&&!(s&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||T0(c,l)))&&a.push(c);return a}function V0(t,e){return function(n){return t(e(n))}}var u8=V0(Object.keys,Object),f8=Object.prototype,p8=f8.hasOwnProperty;function g8(t){if(!rc(t))return u8(t);var e=[];for(var n in Object(t))p8.call(t,n)&&n!="constructor"&&e.push(n);return e}function m8(t){return Qo(t)?Y0(t):g8(t)}function y8(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var v8=Object.prototype,x8=v8.hasOwnProperty;function b8(t){if(!an(t))return y8(t);var e=rc(t),n=[];for(var r in t)r=="constructor"&&(e||!x8.call(t,r))||n.push(r);return n}function X0(t){return Qo(t)?Y0(t,!0):b8(t)}function w8(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var G0=V0(Object.getPrototypeOf,Object),_8="[object Object]",$8=Function.prototype,P8=Object.prototype,q0=$8.toString,C8=P8.hasOwnProperty,O8=q0.call(Object);function M8(t){if(!kn(t)||Gn(t)!=_8)return!1;var e=G0(t);if(e===null)return!0;var n=C8.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&q0.call(n)==O8}function S8(t,e,n){return t===t&&(n!==void 0&&(t=t<=n?t:n),e!==void 0&&(t=t>=e?t:e)),t}function E8(t,e,n){return n===void 0&&(n=e,e=void 0),n!==void 0&&(n=tc(n),n=n===n?n:0),e!==void 0&&(e=tc(e),e=e===e?e:0),S8(tc(t),e,n)}function I8(){this.__data__=new vn,this.size=0}function A8(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function T8(t){return this.__data__.get(t)}function k8(t){return this.__data__.has(t)}var L8=200;function z8(t,e){var n=this.__data__;if(n instanceof vn){var r=n.__data__;if(!ui||r.length<L8-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Ln(r)}return n.set(t,e),this.size=n.size,this}function er(t){var e=this.__data__=new vn(t);this.size=e.size}er.prototype.clear=I8,er.prototype.delete=A8,er.prototype.get=T8,er.prototype.has=k8,er.prototype.set=z8;var U0=typeof W=="object"&&W&&!W.nodeType&&W,Z0=U0&&typeof module=="object"&&module&&!module.nodeType&&module,H8=Z0&&Z0.exports===U0,K0=H8?sn.Buffer:void 0,Q0=K0?K0.allocUnsafe:void 0;function J0(t,e){if(e)return t.slice();var n=t.length,r=Q0?Q0(n):new t.constructor(n);return t.copy(r),r}function R8(t,e){for(var n=-1,r=t==null?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}function D8(){return[]}var N8=Object.prototype,j8=N8.propertyIsEnumerable,tp=Object.getOwnPropertySymbols,W8=tp?function(t){return t==null?[]:(t=Object(t),R8(tp(t),function(e){return j8.call(t,e)}))}:D8;function F8(t,e,n){var r=e(t);return An(t)?r:w8(r,n(t))}function B8(t){return F8(t,m8,W8)}var lc=Un(sn,"DataView"),cc=Un(sn,"Promise"),hc=Un(sn,"Set"),ep="[object Map]",Y8="[object Object]",np="[object Promise]",rp="[object Set]",ip="[object WeakMap]",op="[object DataView]",V8=qn(lc),X8=qn(ui),G8=qn(cc),q8=qn(hc),U8=qn(ec),wn=Gn;(lc&&wn(new lc(new ArrayBuffer(1)))!=op||ui&&wn(new ui)!=ep||cc&&wn(cc.resolve())!=np||hc&&wn(new hc)!=rp||ec&&wn(new ec)!=ip)&&(wn=function(t){var e=Gn(t),n=e==Y8?t.constructor:void 0,r=n?qn(n):"";if(r)switch(r){case V8:return op;case X8:return ep;case G8:return np;case q8:return rp;case U8:return ip}return e});var Z8=Object.prototype,K8=Z8.hasOwnProperty;function Q8(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&K8.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var sp=sn.Uint8Array;function dc(t){var e=new t.constructor(t.byteLength);return new sp(e).set(new sp(t)),e}function J8(t,e){var n=dc(t.buffer);return new t.constructor(n,t.byteOffset,t.byteLength)}var t$=/\w*$/;function e$(t){var e=new t.constructor(t.source,t$.exec(t));return e.lastIndex=t.lastIndex,e}var ap=Tn?Tn.prototype:void 0,lp=ap?ap.valueOf:void 0;function n$(t){return lp?Object(lp.call(t)):{}}function cp(t,e){var n=e?dc(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var r$="[object Boolean]",i$="[object Date]",o$="[object Map]",s$="[object Number]",a$="[object RegExp]",l$="[object Set]",c$="[object String]",h$="[object Symbol]",d$="[object ArrayBuffer]",u$="[object DataView]",f$="[object Float32Array]",p$="[object Float64Array]",g$="[object Int8Array]",m$="[object Int16Array]",y$="[object Int32Array]",v$="[object Uint8Array]",x$="[object Uint8ClampedArray]",b$="[object Uint16Array]",w$="[object Uint32Array]";function _$(t,e,n){var r=t.constructor;switch(e){case d$:return dc(t);case r$:case i$:return new r(+t);case u$:return J8(t);case f$:case p$:case g$:case m$:case y$:case v$:case x$:case b$:case w$:return cp(t,n);case o$:return new r;case s$:case c$:return new r(t);case a$:return e$(t);case l$:return new r;case h$:return n$(t)}}function hp(t){return typeof t.constructor=="function"&&!rc(t)?c9(G0(t)):{}}var $$="[object Map]";function P$(t){return kn(t)&&wn(t)==$$}var dp=Rr&&Rr.isMap,C$=dp?sc(dp):P$,O$="[object Set]";function M$(t){return kn(t)&&wn(t)==O$}var up=Rr&&Rr.isSet,S$=up?sc(up):M$,E$=1,fp="[object Arguments]",I$="[object Array]",A$="[object Boolean]",T$="[object Date]",k$="[object Error]",pp="[object Function]",L$="[object GeneratorFunction]",z$="[object Map]",H$="[object Number]",gp="[object Object]",R$="[object RegExp]",D$="[object Set]",N$="[object String]",j$="[object Symbol]",W$="[object WeakMap]",F$="[object ArrayBuffer]",B$="[object DataView]",Y$="[object Float32Array]",V$="[object Float64Array]",X$="[object Int8Array]",G$="[object Int16Array]",q$="[object Int32Array]",U$="[object Uint8Array]",Z$="[object Uint8ClampedArray]",K$="[object Uint16Array]",Q$="[object Uint32Array]",te={};te[fp]=te[I$]=te[F$]=te[B$]=te[A$]=te[T$]=te[Y$]=te[V$]=te[X$]=te[G$]=te[q$]=te[z$]=te[H$]=te[gp]=te[R$]=te[D$]=te[N$]=te[j$]=te[U$]=te[Z$]=te[K$]=te[Q$]=!0,te[k$]=te[pp]=te[W$]=!1;function Jo(t,e,n,r,i,o){var s,a=e&E$;if(s!==void 0)return s;if(!an(t))return t;var l=An(t);if(l)s=Q8(t);else{var c=wn(t),h=c==pp||c==L$;if(oc(t))return J0(t,a);if(c==gp||c==fp||h&&!i)s=h?{}:hp(t);else{if(!te[c])return i?t:{};s=_$(t,c,a)}}o||(o=new er);var u=o.get(t);if(u)return u;o.set(t,s),S$(t)?t.forEach(function(g){s.add(Jo(g,e,n,g,t,o))}):C$(t)&&t.forEach(function(g,y){s.set(y,Jo(g,e,n,y,t,o))});var f=B8,p=l?void 0:f(t);return x9(p||t,function(g,y){p&&(y=g,g=t[y]),k0(s,y,Jo(g,e,n,y,t,o))}),s}var J$=1,tP=4;function mp(t){return Jo(t,J$|tP)}function eP(t){return function(e,n,r){for(var i=-1,o=Object(e),s=r(e),a=s.length;a--;){var l=s[++i];if(n(o[l],l,o)===!1)break}return e}}var nP=eP();function uc(t,e,n){(n!==void 0&&!Oo(t[e],n)||n===void 0&&!(e in t))&&nc(t,e,n)}function rP(t){return kn(t)&&Qo(t)}function fc(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function iP(t){return P9(t,X0(t))}function oP(t,e,n,r,i,o,s){var a=fc(t,n),l=fc(e,n),c=s.get(l);if(c){uc(t,n,c);return}var h=o?o(a,l,n+"",t,e,s):void 0,u=h===void 0;if(u){var f=An(l),p=!f&&oc(l),g=!f&&!p&&B0(l);h=l,f||p||g?An(a)?h=a:rP(a)?h=d9(a):p?(u=!1,h=J0(l,!0)):g?(u=!1,h=cp(l,!0)):h=[]:M8(l)||ic(l)?(h=a,ic(a)?h=iP(a):(!an(a)||ml(a))&&(h=hp(l))):u=!1}u&&(s.set(l,h),i(h,l,r,o,s),s.delete(l)),uc(t,n,h)}function yp(t,e,n,r,i){t!==e&&nP(e,function(o,s){if(i||(i=new er),an(o))oP(t,e,s,n,yp,r,i);else{var a=r?r(fc(t,s),o,s+"",t,e,i):void 0;a===void 0&&(a=o),uc(t,s,a)}},X0)}var sP=rf(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),vp=E9(function(t,e,n){yp(t,e,n)});function pc(t,e,n={}){if(!e)return null;const r=t,i=xi(r,n);Qt(r,i);const o=cP(e,r);for(const s in r.dataset)o.setAttribute(`data-${sP(s)}`,r.dataset[s]);return o}function aP(t,e,n){var r,i;const o=e.nodeName==="text"?e:null;if(!o)return null;const{data:s,themeConfig:a}=n,l=Sf(e.dataset.indexes||"0"),c=String(Au(pi(s,l),t,"")),h=Object.assign({},(r=a.base)==null?void 0:r.text,(i=a.item)==null?void 0:i[t]),u=xi(o,h);return pc(e,e.textContent||c,u)}function lP(t,e){var n;const r=((n=e.themeConfig.base)==null?void 0:n.text)||{};Qt(t,r),r["font-family"]&&t.setAttribute("font-family",Qn(r["font-family"])),t.style.userSelect="none",t.style.pointerEvents="none"}const ts=(t,e)=>t?parseFloat(t):e;function cP(t,e){const n=ts(e.dataset.x,0),r=ts(e.dataset.y,0),i=ts(e.getAttribute("width")),o=ts(e.getAttribute("height")),s=hP(e);return Object.assign(s,{x:n,y:r,width:i,height:o,"data-horizontal-align":e.dataset.horizontalAlign||"LEFT","data-vertical-align":e.dataset.verticalAlign||"TOP"}),Kw(t,s)}function hP(t){return De(t,["font-family","font-size","font-weight","font-style","font-variant","letter-spacing","line-height","fill","stroke","stroke-width"])}const nr=(t,e)=>{t!==e&&(e?t.replaceWith(e):t.remove())};class dP{constructor(e,n){this.options=e,this.template=n,this.rendered=!1}getOptions(){return this.options}getSVG(){return this.template}render(){const e=this.getSVG();if(this.rendered)return e;uP(e,this.options),e.style.visibility="hidden";const n=()=>{gP(this.template,this.options),__(this.template),e.style.visibility=""},r=new MutationObserver(i=>{i.forEach(o=>{o.addedNodes.forEach(s=>{(s===e||s.contains(e))&&(n(),r.disconnect())})})});try{r.observe(document,{childList:!0,subtree:!0})}catch(i){n(),console.error(i)}return this.rendered=!0,e}}function uP(t,e){fP(t,e),pP(t,e),P_(t,e)}function fP(t,e){var n;const{themeConfig:r,data:i}=e;C_(t,(n=r.base)==null?void 0:n.global),t.querySelectorAll("[data-element-type]").forEach(s=>{var a,l,c,h;const u=s.id||"";if(n6(s)){const f=pc(s,i.title||"",Object.assign({},(a=r.base)==null?void 0:a.text,r.title));return nr(s,f)}if(r6(s)){const f=pc(s,i.desc||"",Object.assign({},(l=r.base)==null?void 0:l.text,r.desc));return nr(s,f)}if(s6(s)){const f=qf(t,s,(c=i.illus)==null?void 0:c[u]);return nr(s,f)}if(o6(s))return Array.from(s.children).forEach(f=>{S0(t,f,e)});if(i6(s)){const f=S0(t,s,e);return nr(s,f)}if(p6(s))return O_(t,s);if((h=s.dataset.elementType)!=null&&h.startsWith("item-")){const f=Sf(s.dataset.indexes||"0"),p=s.dataset.elementType.replace("item-",""),g=pi(i,f);if(c6(s)||h6(s)||d6(s)){const y=aP(p,s,e);return nr(s,y)}if(!g)return;if(u6(s)){const y=j_(t,s,g);return nr(s,y)}if(Pl(s)){const y=L_(t,s,g,e);return nr(s,y)}}if(a6(s))return lP(s,e);if(!l6(s))return Q7(s,e)}),t9(t,e)}function pP(t,e){const{width:n,height:r}=e,{style:i={},attributes:o={},id:s,className:a}=e.svg||{};s&&(t.id=s),a&&t.classList.add(a),n!==void 0&&t.setAttribute("width",typeof n=="number"?`${n}px`:n),r!==void 0&&t.setAttribute("height",typeof r=="number"?`${r}px`:r),Object.assign(t.style,i),Qt(t,o)}function gP(t,e){const{padding:n=0,viewBox:r}=e;r?t.setAttribute("viewBox",r):n!==void 0&&bp(t,ir(n))}let rr;function mP(){if(rr!==void 0)return rr;if(typeof window=="undefined"||typeof document=="undefined")return rr=!1,!1;const t=document.body;if(!t)return rr=!1,!1;let e=!1;try{const r=document.createElement("div");r.style.cssText=`
25
+ `.replace(/\s+/g," ").trim()}function Pb(e){if(!e||typeof e!="string")return[];try{const n=e.trim().replace(/,/g," ").replace(/\s+/g," ").split(" ").filter(Boolean),r=[];for(let i=0;i<n.length-1;i+=2){const o=parseFloat(n[i]),a=parseFloat(n[i+1]);if(isNaN(o)||isNaN(a)){console.warn(`Invalid coordinate pair at index ${i}: "${n[i]}", "${n[i+1]}"`);continue}r.push([o,a])}return n.length%2!==0&&console.warn(`Odd number of coordinates in points attribute, last value ignored: "${n[n.length-1]}"`),r}catch(t){return console.error("Failed to parse polygon points:",e,t),[]}}function $b(e,t,n){var r;const{themeConfig:i}=n,o=Object.assign({},(r=i.base)==null?void 0:r.shape,i.shape),a=ro(t,o);return ut(t,a),FN(t,e,n),t}function jN(e,t){var n;ut(e,((n=t.themeConfig.base)==null?void 0:n.shape)||{})}function FN(e,t,n){const r=n.themeConfig.stylize;if(!r)return e;const{type:i}=r;if(!i)return e;if(i==="rough")return NN(e,t,r);if(i==="pattern")return fN(e,t,n);if(i==="linear-gradient"||i==="radial-gradient"){const{fill:o,stroke:a}=an(e,["fill","stroke"]);vr(o)&&tb(e,t,r,"fill"),vr(a)&&tb(e,t,r,"stroke");return}}function BN(e,t){var n;const{themeConfig:r}=t,{"font-family":i=fu}=((n=r.base)==null?void 0:n.text)||{};e.setAttribute("font-family",i)}function Ru(e,t,n={}){if(!t)return null;const r=e,i=ro(r,n);ut(r,i);const o=VN(t,r);for(const a in r.dataset)o.setAttribute(`data-${_L(a)}`,r.dataset[a]);return o}function WN(e,t,n){var r,i,o;const a=t.nodeName==="text"?t:null;if(!a)return null;const{data:s,themeConfig:c}=n,l=Db(t.dataset.indexes||"0"),u=eo(s,l),h=String(g2(u,e,"")),d=(r=u==null?void 0:u.attributes)==null?void 0:r[e],f=Object.assign({},(i=c.base)==null?void 0:i.text,(o=c.item)==null?void 0:o[e],d),g=ro(a,f);return Ru(t,t.textContent||h,g)}function GN(e,t){var n;const r=((n=t.themeConfig.base)==null?void 0:n.text)||{};ut(e,r),r["font-family"]&&e.setAttribute("font-family",Cr(r["font-family"])),e.style.userSelect="none",e.style.pointerEvents="none"}const Ka=(e,t)=>e?parseFloat(e):t;function VN(e,t){const n=Ka(t.dataset.x,0),r=Ka(t.dataset.y,0),i=Ka(t.getAttribute("width")),o=Ka(t.getAttribute("height")),a=YN(t);return Object.assign(a,{x:n,y:r,width:i,height:o,"data-horizontal-align":t.dataset.horizontalAlign||"LEFT","data-vertical-align":t.dataset.verticalAlign||"TOP"}),lH(e,a)}function YN(e){return an(e,["font-family","font-size","font-weight","font-style","font-variant","letter-spacing","line-height","fill","stroke","stroke-width"])}const Sr=(e,t)=>{e!==t&&(t?e.replaceWith(t):e.remove())};class XN{constructor(t,n){this.options=t,this.template=n,this.rendered=!1}getOptions(){return this.options}getSVG(){return this.template}render(){const t=this.getSVG();if(this.rendered)return t;UN(t,this.options),t.style.visibility="hidden";const n=()=>{QN(this.template,this.options),VL(this.template),t.style.removeProperty("visibility")};if(Bu)n();else{const r=new MutationObserver(i=>{i.forEach(o=>{o.addedNodes.forEach(a=>{(a===t||a.contains(t))&&(n(),r.disconnect())})})});try{r.observe(document,{childList:!0,subtree:!0})}catch(i){n(),console.error(i)}}return this.rendered=!0,t}}function UN(e,t){KN(e,t),ZN(e,t),XL(e,t)}function KN(e,t){var n;const{themeConfig:r,data:i}=t;UL(e,(n=r.base)==null?void 0:n.global),e.querySelectorAll("[data-element-type]").forEach(a=>{var s,c,l,u,h,d,f;const g=a.id||"";if(fH(a)){const y=Ru(a,i.title||"",Object.assign({},(s=r.base)==null?void 0:s.text,r.title,(c=i.attributes)==null?void 0:c.title));return Sr(a,y)}if(pH(a)){const y=Ru(a,i.desc||"",Object.assign({},(l=r.base)==null?void 0:l.text,r.desc,(u=i.attributes)==null?void 0:u.desc));return Sr(a,y)}if(yH(a)){const y=Wv(e,a,(h=i.illus)==null?void 0:h[g],void 0,(d=i.attributes)==null?void 0:d.illus);return Sr(a,y)}if(mH(a))return Array.from(a.children).forEach(y=>{$b(e,y,t)});if(gH(a)){const y=$b(e,a,t);return Sr(a,y)}if(CH(a))return KL(e,a);if((f=a.dataset.elementType)!=null&&f.startsWith("item-")){const y=Db(a.dataset.indexes||"0"),m=a.dataset.elementType.replace("item-",""),v=eo(i,y);if(_H(a)||xH(a)||wH(a)){const b=WN(m,a,t);return Sr(a,b)}if(!v)return;if(PH(a)){const b=Ez(e,a,v);return Sr(a,b)}if(Hu(a)){const b=Pz(e,a,v,t);return Sr(a,b)}}if(vH(a))return GN(a,t);if(!bH(a))return jN(a,t)}),BN(e,t)}function ZN(e,t){const{width:n,height:r}=t,{style:i={},attributes:o={},id:a,className:s}=t.svg||{};a&&(e.id=a),s&&e.classList.add(s),n!==void 0&&e.setAttribute("width",typeof n=="number"?`${n}px`:n),r!==void 0&&e.setAttribute("height",typeof r=="number"?`${r}px`:r),Object.assign(e.style,i),ut(e,o)}function QN(e,t){const{padding:n=0,viewBox:r}=t;r?e.setAttribute("viewBox",r):n!==void 0&&qb(e,Er(n))}let Cb;function JN(){if(Cb)return!0;if(typeof window=="undefined"||typeof document=="undefined")return!1;const e=document.body;if(!e)return!1;let t=!1;try{const r=document.createElement("div");r.style.cssText=`
31
26
  position: absolute;
32
27
  left: 11px;
33
28
  top: 13px;
@@ -37,115 +32,120 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
37
32
  margin: 0;
38
33
  border: 0;
39
34
  visibility: hidden;
40
- `,t.appendChild(r),r.offsetHeight;const i=r.getBoundingClientRect();t.removeChild(r),e=i.width===37&&i.height===19&&i.left!==0&&i.top!==0}catch(r){e=!1}if(!e)return rr=!1,!1;let n=!1;try{const r=document.createElement("canvas");r.width=100,r.height=50;const i=r.getContext("2d");if(!i)return rr=!1,!1;i.font="20px sans-serif";const o=i.measureText("Hello");n=typeof o.width=="number"&&o.width>0&&o.width<1e3}catch(r){n=!1}return rr=n,n}const xp=!!(typeof process!="undefined"&&process.versions&&process.versions.node);let gc=1.01;const yP=t=>{gc=t};xp&&a_(u_);let es=null,ke=null;function vP(){return es||(es=document.createElement("canvas").getContext("2d"),es)}function xP(){return document.body?ke||(ke=document.createElement("span"),ke.style.position="absolute",ke.style.top="-10000px",ke.style.left="-10000px",ke.style.visibility="hidden",ke.style.pointerEvents="none",ke.style.whiteSpace="pre",ke.style.display="inline-block",ke.style.padding="0",ke.style.margin="0",document.body.appendChild(ke),ke):null}function bP(t,e){if(e==null)return t*1.4;if(typeof e=="string"){const n=e.trim();if(n.endsWith("px")){const r=Number.parseFloat(n);return Number.isFinite(r)?r:t*1.4}e=Number(n)}return typeof e!="number"||!Number.isFinite(e)?t*1.4:e>4?e:e*t}function wP(t,{fontFamily:e,fontSize:n,fontWeight:r,lineHeight:i}){const o=t.split(/\r?\n/),s=Qn(e),a=r||"normal",l=bP(n,i),c=vP();if(c)return c.font=`${a} ${n}px ${s}`,{width:o.reduce((p,g)=>{const y=c.measureText(g);return Math.max(p,y.width)},0),height:l*Math.max(o.length,1)};const h=xP();if(!h)return null;h.style.fontFamily=s,h.style.fontSize=`${n}px`,h.style.fontWeight=String(a),h.style.lineHeight=`${l}px`,h.textContent=t;const u=h.getBoundingClientRect();return{width:u.width,height:u.height}}function _P(t="",e){var n;if(e.width&&e.height)return{width:e.width,height:e.height};const{fontFamily:r=Ll,fontSize:i=14,fontWeight:o="normal",lineHeight:s=1.4}=e,a=t.toString(),l={fontFamily:r,fontSize:parseFloat(i.toString()),fontWeight:o,lineHeight:s},c=()=>d_(a,l),h=mP()&&(n=wP(a,l))!=null?n:c();return{width:Math.ceil(h.width*gc),height:Math.ceil(h.height*gc)}}function mc(t){const e=t.getAttribute("viewBox");if(e){const[s,a,l,c]=e.split(" ").map(Number);return{x:s,y:a,width:l,height:c}}const n=t.getAttribute("width"),r=t.getAttribute("height"),i=Number(n)||0,o=Number(r)||0;return{x:0,y:0,width:i,height:o}}function ir(t){return t?typeof t=="number"?[t,t,t,t]:t.length===1?[t[0],t[0],t[0],t[0]]:t.length===2?[t[0],t[1],t[0],t[1]]:t.length===3?[t[0],t[1],t[2],t[1]]:t.length===4?[t[0],t[1],t[2],t[3]]:[0,0,0,0]:[0,0,0,0]}function bp(t,e){if(xp)wp(t,e);else if(document.contains(t))_p(t,e);else try{const n=new MutationObserver(r=>{r.forEach(i=>{i.addedNodes.forEach(o=>{(o===t||o.contains(t))&&($P(t,()=>{_p(t,e)}),n.disconnect())})})});n.observe(document,{childList:!0,subtree:!0})}catch(n){wp(t,e)}}function wp(t,e){const n=mc(t),[r,i,o,s]=e;Qt(t,{viewBox:`${n.x-s} ${n.y-r} ${n.width+s+i} ${n.height+r+o}`})}function _p(t,e){const n=t.getBBox(),r=t.getBoundingClientRect(),i=r.width>0?n.width/r.width:1,o=r.height>0?n.height/r.height:1,[s,a,l,c]=e,h=s*o,u=a*i,f=l*o,p=c*i,g=n.x-p,y=n.y-h,m=n.width+p+u,x=n.height+h+f;Qt(t,{viewBox:`${g} ${y} ${m} ${x}`})}function $P(t,e){requestAnimationFrame(()=>{const n=()=>{const r=t.getBoundingClientRect();r.width>0&&r.height>0?e():requestAnimationFrame(n)};n()})}function ln(t,e){if(document.getElementById(t))return;const n=document.createElement("style");n.id=t,n.textContent=e,document.head.appendChild(n)}function PP(){return crypto&&crypto.randomUUID?crypto.randomUUID():"xxxx-xxxx-4xxx-yxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}var CP=Object.defineProperty,OP=Object.defineProperties,MP=Object.getOwnPropertyDescriptors,ns=Object.getOwnPropertySymbols,$p=Object.prototype.hasOwnProperty,Pp=Object.prototype.propertyIsEnumerable,Cp=(t,e,n)=>e in t?CP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Se=(t,e)=>{for(var n in e||(e={}))$p.call(e,n)&&Cp(t,n,e[n]);if(ns)for(var n of ns(e))Pp.call(e,n)&&Cp(t,n,e[n]);return t},yc=(t,e)=>OP(t,MP(e)),SP=(t,e)=>{var n={};for(var r in t)$p.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ns)for(var r of ns(t))e.indexOf(r)<0&&Pp.call(t,r)&&(n[r]=t[r]);return n};function St(t){const e=t,{id:n,x:r=0,y:i=0,width:o,height:s,alignHorizontal:a="left",alignVertical:l="top",children:c,fontSize:h=14,fontFamily:u,fontStyle:f,fontWeight:p,textDecoration:g,letterSpacing:y,wordSpacing:m,opacity:x,fill:v="black",lineHeight:b,wordWrap:w,backgroundColor:_="none",backgroundOpacity:$=1,backgroundRadius:P=0}=e,C=SP(e,["id","x","y","width","height","alignHorizontal","alignVertical","children","fontSize","fontFamily","fontStyle","fontWeight","textDecoration","letterSpacing","wordSpacing","opacity","fill","lineHeight","wordWrap","backgroundColor","backgroundOpacity","backgroundRadius"]);let T=o,E=s,S=0,R=0;if(!T||!E){const j=_P(c,t);T||(T=j.width),E||(E=j.height)}o&&(S=a==="center"?T/2:a==="right"?T:0),s&&(R=l==="middle"?E/2:l==="bottom"?E:0);const O=Object.entries(Se(Se({width:T,height:E},b!==void 0&&{"line-height":b}),w!==void 0&&{"data-word-wrap":w})).reduce((j,[X,z])=>yc(Se({},j),{[X]:z}),{}),L=Se(Se(Se(Se(Se(Se(Se(Se(Se({"data-element-type":"text",width:T,height:E,x:S,y:R,"data-x":0,"data-y":0,fill:v,fontSize:h,textAnchor:a==="center"?"middle":a==="right"?"end":"start",dominantBaseline:l==="middle"?"central":l==="bottom"?"baseline":"hanging","data-horizontal-align":a.toUpperCase(),"data-vertical-align":l.toUpperCase(),children:c},O),C),u&&{fontFamily:u}),f&&{fontStyle:f}),p&&{fontWeight:p}),g&&g!=="none"&&{textDecoration:g}),y&&{letterSpacing:y}),m&&{wordSpacing:m}),x!==void 0&&x!==1&&{opacity:x}),D=Se(yc(Se({},r!==0||i!==0?{x:r,y:i,transform:`translate(${r}, ${i})`}:{}),{width:T,height:E}),n&&{id:n}),N=_&&_!=="none"?{"data-element-type":"shape",x:0,y:0,width:T,height:E,fill:_,fillOpacity:$,rx:P,ry:P}:void 0;return{type:"g",props:yc(Se({},D),{children:[...N?[{type:"rect",props:N}]:[],{type:"text",props:L}]})}}const Ci=Symbol.for("@antv/infographic/Fragment");function rs(t,e={}){return{type:t,props:e}}function EP(t={}){return rs(Ci,t)}const IP=rs,AP=rs;function TP(t){return!t||typeof t!="object"||Array.isArray(t)?!1:t.type===Ci}function Op(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&"type"in t}function Oi(t){return Mi(t).filter(Op)}function Mi(t,e=[]){var n;if(!t||typeof t=="boolean")return e;if(Array.isArray(t))t.forEach(r=>Mi(r,e));else if(TP(t)){const r=(n=t.props)==null?void 0:n.children;(Array.isArray(r)?r:[r]).filter(Boolean).forEach(i=>{Mi(i,e)})}else e.push(t);return e}function qt(t){return typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t)}const is=()=>({x:0,y:0,width:0,height:0});function Dr(t){if(!t||t.length===0)return is();let e=1/0,n=1/0,r=-1/0,i=-1/0;for(const o of t){const{x:s,y:a,width:l,height:c}=o,h=s+l,u=a+c;s<e&&(e=s),a<n&&(n=a),h>r&&(r=h),u>i&&(i=u)}return e===1/0||n===1/0||r===-1/0||i===-1/0?{x:0,y:0,width:0,height:0}:{x:e,y:n,width:Math.max(0,r-e),height:Math.max(0,i-n)}}function et(t){var e,n,r,i;if(!t)return is();if(Array.isArray(t)){const p=Oi(t);return or(p)}if(typeof t!="object")return is();const{type:o,props:s={}}=t;if($c(t)){const p=kp(t);return et(p)}if(typeof o=="function"){const p=(e=s.x)!=null?e:0,g=(n=s.y)!=null?n:0,y=s.width,m=s.height;if(qt(y)&&qt(m))return{x:p,y:g,width:y,height:m};const x=o(s);if(!x)return{x:p,y:g,width:y!=null?y:0,height:m!=null?m:0};if(Array.isArray(x)){const v=Oi(x),b=or(v);if(qt(y)&&qt(m))return{x:p,y:g,width:y,height:m};const w=b.width!==0?b.width:y!=null?y:0,_=b.height!==0?b.height:m!=null?m:0;return{x:p+b.x,y:g+b.y,width:w,height:_}}if(Op(x)){const v=x,b=et(v);if(kP(v,s))return b;const w=v.props&&qt(v.props.width)&&qt(v.props.height),P=Mp(v).flatMap(S=>Oi(S)).length>0,C=v.props&&v.props.x===s.x&&v.props.y===s.y;if(w)return{x:C?b.x:p+b.x,y:C?b.y:g+b.y,width:b.width,height:b.height};if(qt(y)&&qt(m))return P?{x:C?b.x:p,y:C?b.y:g,width:y,height:m}:{x:C?b.x:p+b.x,y:C?b.y:g+b.y,width:y,height:m};const T=b.width!==0?b.width:y!=null?y:0,E=b.height!==0?b.height:m!=null?m:0;return{x:C?b.x:p+b.x,y:C?b.y:g+b.y,width:T,height:E}}return{x:p,y:g,width:y!=null?y:0,height:m!=null?m:0}}const a=(r=s.x)!=null?r:0,l=(i=s.y)!=null?i:0,c=qt(s.width)?s.width:void 0,h=qt(s.height)?s.height:void 0;if(qt(c)&&qt(h))return{x:a,y:l,width:c,height:h};const f=Mp(t).flatMap(p=>Oi(p));if(f.length>0){const p=or(f);return{x:a+p.x,y:l+p.y,width:qt(c)?c:p.width,height:qt(h)?h:p.height}}return{x:a,y:l,width:c!=null?c:0,height:h!=null?h:0}}function or(t){if(!t||!Array.isArray(t)||t.length===0)return is();const e=[];for(const n of t){const r=Oi(n);for(const i of r){const o=et(i);o&&e.push(o)}}return Dr(e)}function kP(t,e){if(!(t!=null&&t.props)||!e)return!1;const n=t.props;if(qt(n.x)&&qt(n.y)&&qt(e.x)&&qt(e.y)&&n.x===e.x&&n.y===e.y){const r=qt(n.width)&&qt(n.height),i=qt(e.width)&&qt(e.height);if(!r&&!i)return!0}return qt(n.x)&&qt(n.y)&&qt(n.width)&&qt(n.height)&&qt(e.x)&&qt(e.y)&&qt(e.width)&&qt(e.height)?n.x===e.x&&n.y===e.y&&n.width===e.width&&n.height===e.height:!1}function Mp(t){var e;const n=(e=t.props)==null?void 0:e.children;return n?Array.isArray(n)?n:[n]:[]}function vc(t){var e;return t==null||typeof t=="boolean"?[]:Array.isArray(t)?Mi(t):typeof t=="object"?Mi((e=t.props)==null?void 0:e.children):[t]}var LP=Object.defineProperty,os=Object.getOwnPropertySymbols,Sp=Object.prototype.hasOwnProperty,Ep=Object.prototype.propertyIsEnumerable,Ip=(t,e,n)=>e in t?LP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xc=(t,e)=>{for(var n in e||(e={}))Sp.call(e,n)&&Ip(t,n,e[n]);if(os)for(var n of os(e))Ep.call(e,n)&&Ip(t,n,e[n]);return t},zP=(t,e)=>{var n={};for(var r in t)Sp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&os)for(var r of os(t))e.indexOf(r)<0&&Ep.call(t,r)&&(n[r]=t[r]);return n};const Rn=(t,e)=>{const n=t,{type:r,props:i}=n,o=zP(n,["type","props"]);return xc({type:r,props:xc(xc({},i),e)},o)},Ap=()=>({defs:new Map});function bc(t){const e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};return String(t).replace(/[&<>"']/g,n=>e[n])}const Tp={className:"class",viewBox:"viewBox",preserveAspectRatio:"preserveAspectRatio",gradientUnits:"gradientUnits",gradientTransform:"gradientTransform",patternUnits:"patternUnits",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",maskUnits:"maskUnits",maskContentUnits:"maskContentUnits",clipPathUnits:"clipPathUnits",primitiveUnits:"primitiveUnits",filterUnits:"filterUnits",markerUnits:"markerUnits",markerWidth:"markerWidth",markerHeight:"markerHeight",refX:"refX",refY:"refY",xmlLang:"xml:lang",xmlSpace:"xml:space",xmlnsXlink:"xmlns:xlink",xlinkHref:"href",xlinkTitle:"xlink:title",xlinkShow:"xlink:show",xlinkActuate:"xlink:actuate",textLength:"textLength",lengthAdjust:"lengthAdjust",repeatCount:"repeatCount",repeatDur:"repeatDur",calcMode:"calcMode",keyTimes:"keyTimes",keySplines:"keySplines",keyPoints:"keyPoints",stdDeviation:"stdDeviation",baseFrequency:"baseFrequency",numOctaves:"numOctaves",pathLength:"pathLength",systemLanguage:"systemLanguage",requiredFeatures:"requiredFeatures",requiredExtensions:"requiredExtensions"};function HP(t){return Tp[t]?Tp[t]:t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}const wc=new Map;function _c(t){const e=Symbol("layout");return wc.set(e,t),r=>({type:e,props:r})}function $c(t){return t!=null&&typeof t=="object"&&!Array.isArray(t)&&typeof t.type=="symbol"&&wc.has(t.type)}function kp(t,e=Ap()){const n=wc.get(t.type);if(!n)return console.warn("Layout function not found for symbol:",t.type),t;const r=vc(t).filter(i=>typeof i=="object");return n(r,t.props,e)}var RP=Object.defineProperty,DP=Object.defineProperties,NP=Object.getOwnPropertyDescriptors,ss=Object.getOwnPropertySymbols,Lp=Object.prototype.hasOwnProperty,zp=Object.prototype.propertyIsEnumerable,Hp=(t,e,n)=>e in t?RP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,jP=(t,e)=>{for(var n in e||(e={}))Lp.call(e,n)&&Hp(t,n,e[n]);if(ss)for(var n of ss(e))zp.call(e,n)&&Hp(t,n,e[n]);return t},WP=(t,e)=>DP(t,NP(e)),Rp=(t,e)=>{var n={};for(var r in t)Lp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ss)for(var r of ss(t))e.indexOf(r)<0&&zp.call(t,r)&&(n[r]=t[r]);return n};function Si(t,e){if(t==null||typeof t=="boolean")return null;if(typeof t=="string"||typeof t=="number")return t;if(Array.isArray(t))return t.map(r=>Si(r,e)).filter(Boolean);if($c(t)){const r=kp(t,e);return Si(r,e)}if(typeof t.type=="function"){const r=t.type(t.props);return Si(r,e)}const n=vc(t).map(r=>Si(r,e)).filter(Boolean);return t.type===Ci?n:t.type===Ea?(n.forEach(r=>{typeof r=="object"&&r.props.id&&e.defs.set(r.props.id,r)}),null):n.length?Rn(t,{children:n}):t}function Ei(t,e){if(t==null)return"";if(typeof t=="string")return bc(t);if(typeof t=="number")return String(t);const{type:n,props:r}=t;if(!n)return"";const i=vc(t);if(n===Ci)return i.map(l=>Ei(l)).filter(Boolean).join("");if(n===Ea)return"";if(typeof n=="function"||$c(t))return console.warn("Unexpected unprocessed component in render:",t),"";const o=Np(r),s=i.map(l=>Ei(l)).filter(Boolean).join(""),a=String(n);return s?`<${a}${o}>${s}</${a}>`:`<${a}${o} />`}function Dp(t,e={}){const n=Ap(),r=Si(t,n);if(!r)return"";const i=Array.isArray(r)?r.map(m=>Ei(m)).join(""):Ei(r),o=e,{x:s,y:a,width:l,height:c,style:h}=o,u=Rp(o,["x","y","width","height","style"]),f=WP(jP({},u),{xmlns:"http://www.w3.org/2000/svg"});if(!f.viewBox)if(l&&c)f.viewBox=`${s!=null?s:0} ${a!=null?a:0} ${l!=null?l:0} ${c!=null?c:0}`;else{const m=et(r);if(m){const{x,y:v,width:b,height:w}=m;f.viewBox=`${x} ${v} ${b} ${w}`}}const p=Np(f),g=FP(h),y=n.defs.size?`<defs>${Array.from(n.defs.values()).map(m=>Ei(m)).join("")}</defs>`:"";return`<svg${p}${g}>${y}${i}</svg>`}function Np(t){if(!t)return"";const e=t,{children:n}=e,r=Rp(e,["children"]);return Object.entries(r).filter(([,i])=>i!=null).map(([i,o])=>{const s=HP(i),a=typeof o=="string"?bc(String(o)):String(o);return` ${s}="${a}"`}).join("")}function FP(t){if(!t||Object.keys(t).length===0)return"";const e=Object.entries(t).map(([n,r])=>`${n.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`)}: ${r};`).join("");return` style="${bc(e)}"`}var BP=Object.defineProperty,as=Object.getOwnPropertySymbols,jp=Object.prototype.hasOwnProperty,Wp=Object.prototype.propertyIsEnumerable,Fp=(t,e,n)=>e in t?BP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ls=(t,e)=>{for(var n in e||(e={}))jp.call(e,n)&&Fp(t,n,e[n]);if(as)for(var n of as(e))Wp.call(e,n)&&Fp(t,n,e[n]);return t},Bp=(t,e)=>{var n={};for(var r in t)jp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&as)for(var r of as(t))e.indexOf(r)<0&&Wp.call(t,r)&&(n[r]=t[r]);return n};const U=t=>{const e=t,{indexes:n}=e,r=Bp(e,["indexes"]),i={fill:"#B9EBCA",fillOpacity:.3,width:20,height:20,"data-indexes":n,"data-element-type":zt.BtnAdd};return d(Ct,ls(ls({},i),r))},Yt=t=>{const e=t,{indexes:n}=e,r=Bp(e,["indexes"]),i={fill:"#F9C0C0",fillOpacity:.3,width:20,height:20,"data-indexes":n,"data-element-type":zt.BtnRemove};return d(Ct,ls(ls({},i),r))};var YP=Object.defineProperty,VP=Object.defineProperties,XP=Object.getOwnPropertyDescriptors,Yp=Object.getOwnPropertySymbols,GP=Object.prototype.hasOwnProperty,qP=Object.prototype.propertyIsEnumerable,Vp=(t,e,n)=>e in t?YP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,UP=(t,e)=>{for(var n in e||(e={}))GP.call(e,n)&&Vp(t,n,e[n]);if(Yp)for(var n of Yp(e))qP.call(e,n)&&Vp(t,n,e[n]);return t},ZP=(t,e)=>VP(t,XP(e));const Et=t=>d(Y,ZP(UP({"data-element-type":zt.BtnsGroup,width:0,height:0},t),{display:"none"})),ie=()=>d(Bt,{});var KP=Object.defineProperty,cs=Object.getOwnPropertySymbols,Xp=Object.prototype.hasOwnProperty,Gp=Object.prototype.propertyIsEnumerable,qp=(t,e,n)=>e in t?KP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Pc=(t,e)=>{for(var n in e||(e={}))Xp.call(e,n)&&qp(t,n,e[n]);if(cs)for(var n of cs(e))Gp.call(e,n)&&qp(t,n,e[n]);return t},QP=(t,e)=>{var n={};for(var r in t)Xp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&cs)for(var r of cs(t))e.indexOf(r)<0&&Gp.call(t,r)&&(n[r]=t[r]);return n};const Up=t=>{var e=t,{indexes:n}=e,r=QP(e,["indexes"]);const o=Pc(Pc({},{fill:"lightgray"}),r);return n?(o["data-indexes"]=n,o["data-element-type"]=zt.ItemIllus):o["data-element-type"]=zt.Illus,d(Ct,Pc({},o))};var JP=Object.defineProperty,tC=Object.defineProperties,eC=Object.getOwnPropertyDescriptors,hs=Object.getOwnPropertySymbols,Zp=Object.prototype.hasOwnProperty,Kp=Object.prototype.propertyIsEnumerable,Qp=(t,e,n)=>e in t?JP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Jp=(t,e)=>{for(var n in e||(e={}))Zp.call(e,n)&&Qp(t,n,e[n]);if(hs)for(var n of hs(e))Kp.call(e,n)&&Qp(t,n,e[n]);return t},nC=(t,e)=>tC(t,eC(e)),rC=(t,e)=>{var n={};for(var r in t)Zp.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&hs)for(var r of hs(t))e.indexOf(r)<0&&Kp.call(t,r)&&(n[r]=t[r]);return n};const Jt=t=>{var e=t,{indexes:n,lineNumber:r=2,children:i}=e,o=rC(e,["indexes","lineNumber","children"]),s;if(!i)return null;const a=Jp({fontSize:14,fill:"#666",wordWrap:!0,lineHeight:1.4,children:i},o);return(s=a.height)!=null||(a.height=Math.ceil(r*+a.lineHeight*+a.fontSize)),d(St,nC(Jp({},a),{"data-indexes":n,"data-element-type":zt.ItemDesc}))};var iC=Object.defineProperty,oC=Object.defineProperties,sC=Object.getOwnPropertyDescriptors,ds=Object.getOwnPropertySymbols,tg=Object.prototype.hasOwnProperty,eg=Object.prototype.propertyIsEnumerable,ng=(t,e,n)=>e in t?iC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ii=(t,e)=>{for(var n in e||(e={}))tg.call(e,n)&&ng(t,n,e[n]);if(ds)for(var n of ds(e))eg.call(e,n)&&ng(t,n,e[n]);return t},us=(t,e)=>oC(t,sC(e)),rg=(t,e)=>{var n={};for(var r in t)tg.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ds)for(var r of ds(t))e.indexOf(r)<0&&eg.call(t,r)&&(n[r]=t[r]);return n};const Pe=t=>{const e=t,{indexes:n,size:r=32}=e,i=rg(e,["indexes","size"]),o=Ii({fill:"lightgray",width:r,height:r},i);return d(Ct,us(Ii({},o),{"data-indexes":n,"data-element-type":"item-icon"}))},sr=t=>{const e=t,{indexes:n,size:r=50,fill:i,colorBg:o="white"}=e,s=rg(e,["indexes","size","fill","colorBg"]),a=r/Math.SQRT2*.9,l=(r-a)/2,c=us(Ii({fill:o},s),{x:l,y:l,width:a,height:a});return I(Y,us(Ii({},s),{width:r,height:r,"data-element-type":zt.ItemIconGroup,children:[d(Wt,{width:r,height:r,fill:i,"data-element-type":"shape"}),d(Ct,us(Ii({},c),{"data-indexes":n,"data-element-type":zt.ItemIcon}))]}))};var aC=Object.defineProperty,lC=Object.defineProperties,cC=Object.getOwnPropertyDescriptors,fs=Object.getOwnPropertySymbols,ig=Object.prototype.hasOwnProperty,og=Object.prototype.propertyIsEnumerable,sg=(t,e,n)=>e in t?aC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ag=(t,e)=>{for(var n in e||(e={}))ig.call(e,n)&&sg(t,n,e[n]);if(fs)for(var n of fs(e))og.call(e,n)&&sg(t,n,e[n]);return t},hC=(t,e)=>lC(t,cC(e)),dC=(t,e)=>{var n={};for(var r in t)ig.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&fs)for(var r of fs(t))e.indexOf(r)<0&&og.call(t,r)&&(n[r]=t[r]);return n};const At=t=>{var e=t,{indexes:n,children:r}=e,i=dC(e,["indexes","children"]),o;const s=ag({fontSize:18,fontWeight:"bold",fill:"#252525",lineHeight:1.4,children:r},i);return(o=s.height)!=null||(s.height=Math.ceil(+s.lineHeight*+s.fontSize)),d(St,hC(ag({},s),{"data-indexes":n,"data-element-type":zt.ItemLabel}))};var uC=Object.defineProperty,lg=Object.getOwnPropertySymbols,fC=Object.prototype.hasOwnProperty,pC=Object.prototype.propertyIsEnumerable,cg=(t,e,n)=>e in t?uC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gC=(t,e)=>{for(var n in e||(e={}))fC.call(e,n)&&cg(t,n,e[n]);if(lg)for(var n of lg(e))pC.call(e,n)&&cg(t,n,e[n]);return t};const Ot=t=>d(Y,gC({"data-element-type":zt.ItemsGroup},t));var mC=Object.defineProperty,yC=Object.defineProperties,vC=Object.getOwnPropertyDescriptors,ps=Object.getOwnPropertySymbols,hg=Object.prototype.hasOwnProperty,dg=Object.prototype.propertyIsEnumerable,ug=(t,e,n)=>e in t?mC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,fg=(t,e)=>{for(var n in e||(e={}))hg.call(e,n)&&ug(t,n,e[n]);if(ps)for(var n of ps(e))dg.call(e,n)&&ug(t,n,e[n]);return t},xC=(t,e)=>yC(t,vC(e)),bC=(t,e)=>{var n={};for(var r in t)hg.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ps)for(var r of ps(t))e.indexOf(r)<0&&dg.call(t,r)&&(n[r]=t[r]);return n};const Ai=t=>{var e=t,{indexes:n,value:r,formatter:i=l=>String(l)}=e,o=bC(e,["indexes","value","formatter"]),s;const a=fg({fontSize:14,fill:"#666",wordWrap:!0,lineHeight:1.4,children:i(r),"data-value":r},o);return(s=a.height)!=null||(a.height=Math.ceil(+a.lineHeight*+a.fontSize)),d(St,xC(fg({},a),{"data-indexes":n,"data-element-type":zt.ItemValue}))};var wC=Object.defineProperty,pg=Object.getOwnPropertySymbols,_C=Object.prototype.hasOwnProperty,$C=Object.prototype.propertyIsEnumerable,gg=(t,e,n)=>e in t?wC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,PC=(t,e)=>{for(var n in e||(e={}))_C.call(e,n)&&gg(t,n,e[n]);if(pg)for(var n of pg(e))$C.call(e,n)&&gg(t,n,e[n]);return t};const le=t=>d(Y,PC({"data-element-type":"shapes-group"},t));var CC=Object.defineProperty,OC=Object.defineProperties,MC=Object.getOwnPropertyDescriptors,gs=Object.getOwnPropertySymbols,mg=Object.prototype.hasOwnProperty,yg=Object.prototype.propertyIsEnumerable,vg=(t,e,n)=>e in t?CC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ms=(t,e)=>{for(var n in e||(e={}))mg.call(e,n)&&vg(t,n,e[n]);if(gs)for(var n of gs(e))yg.call(e,n)&&vg(t,n,e[n]);return t},xg=(t,e)=>OC(t,MC(e)),SC=(t,e)=>{var n={};for(var r in t)mg.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&gs)for(var r of gs(t))e.indexOf(r)<0&&yg.call(t,r)&&(n[r]=t[r]);return n};const Nr=_c((t,e)=>{var n=e,{horizontal:r,vertical:i}=n,o=SC(n,["horizontal","vertical"]),s,a,l,c;if(!t||t.length===0)return d(Y,ms({},o));const h=t.map(v=>et(v)),u=or(t),f=(s=o.x)!=null?s:u.x,p=(a=o.y)!=null?a:u.y,g=(l=o.width)!=null?l:u.width,y=(c=o.height)!=null?c:u.height,m=t.map((v,b)=>{const w=h[b],_=ms({},v.props);if(r!==void 0)switch(r){case"left":_.x=-w.x;break;case"center":_.x=(g-w.width)/2-w.x;break;case"right":_.x=g-w.width-w.x;break}else _.x===void 0&&(_.x=w.x-f);if(i!==void 0)switch(i){case"top":_.y=-w.y;break;case"middle":_.y=(y-w.height)/2-w.y;break;case"bottom":_.y=y-w.height-w.y;break}else _.y===void 0&&(_.y=w.y-p);return Rn(v,_)}),x=xg(ms({},o),{x:f,y:p,width:g,height:y});return d(Y,xg(ms({},x),{children:m}))});var EC=Object.defineProperty,IC=Object.defineProperties,AC=Object.getOwnPropertyDescriptors,ys=Object.getOwnPropertySymbols,bg=Object.prototype.hasOwnProperty,wg=Object.prototype.propertyIsEnumerable,_g=(t,e,n)=>e in t?EC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ar=(t,e)=>{for(var n in e||(e={}))bg.call(e,n)&&_g(t,n,e[n]);if(ys)for(var n of ys(e))wg.call(e,n)&&_g(t,n,e[n]);return t},$g=(t,e)=>IC(t,AC(e)),TC=(t,e)=>{var n={};for(var r in t)bg.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ys)for(var r of ys(t))e.indexOf(r)<0&&wg.call(t,r)&&(n[r]=t[r]);return n};const ct=_c((t,e)=>{var n=e,{flexDirection:r="row",justifyContent:i="flex-start",alignItems:o="flex-start",alignContent:s="flex-start",flexWrap:a="nowrap",gap:l=0}=n,c=TC(n,["flexDirection","justifyContent","alignItems","alignContent","flexWrap","gap"]),h,u,f,p,g,y;if(!t||t.length===0)return d(Y,ar({},c));const m=r==="row"||r==="row-reverse",x=r==="row-reverse"||r==="column-reverse",v=t.map(O=>et(O)),b=or(t),w=(h=c.width)!=null?h:b.width,_=(u=c.height)!=null?u:b.height,$=c.width!==void 0&&c.height!==void 0,P=[];if(a==="wrap"&&$){let O=[],A=[],F=0;for(let L=0;L<t.length;L++){const D=t[L],k=v[L],N=m?k.width:k.height,j=m?w:_;O.length===0||F+l+N<=j?(O.push(D),A.push(k),F+=(O.length>1?l:0)+N):(P.push({children:O,bounds:A}),O=[D],A=[k],F=N)}O.length>0&&P.push({children:O,bounds:A})}else P.push({children:t,bounds:v});const C=[];let T=0;const E=[];if(P.forEach(O=>{const{children:A,bounds:F}=O,L=F.reduce((z,M,H)=>{const B=m?M.width:M.height;return z+B+(H>0?l:0)},0),D=Math.max(...F.map(z=>m?z.height:z.width));E.push(D);let k=0;const N=(m?w:_)-L;if($)switch(i){case"flex-end":k=N;break;case"center":k=N/2;break;case"space-between":k=0;break;default:k=0;break}let j=l;$&&i==="space-between"&&A.length>1&&(j=N/(A.length-1)+l);let X=k;A.forEach((z,M)=>{const H=F[M],B=m?H.width:H.height,q=m?H.height:H.width,V=m?H.x:H.y,G=m?H.y:H.x;let Z=T;if($)switch(o){case"flex-end":Z=T+D-q;break;case"center":Z=T+(D-q)/2;break;default:Z=T;break}let K,it;m?(K=x?w-X-B-V:X-V,it=Z-G):(K=Z-G,it=x?_-X-B-V:X-V);const Q=Rn(z,{x:K,y:it});C.push(Q),X+=B+j}),T+=D+l}),P.length>1&&$){const O=E.reduce((L,D)=>L+D,0)+(P.length-1)*l,A=(m?_:w)-O;let F=0;switch(s){case"flex-end":F=A;break;case"center":F=A/2;break;case"space-between":if(P.length>1){const L=A/(P.length-1);let D=0;P.forEach((k,N)=>{const j=P.slice(0,N).reduce((z,M)=>z+M.children.length,0),X=j+k.children.length;for(let z=j;z<X;z++){const M=C[z],H=ar({},M.props);m?H.y=(H.y||0)+D:H.x=(H.x||0)+D,C[z]=Rn(M,H)}D+=E[N]+l+(N<P.length-1?L:0)});break}break;default:F=0;break}F!==0&&s!=="space-between"&&C.forEach((L,D)=>{const k=ar({},L.props);m?k.y=(k.y||0)+F:k.x=(k.x||0)+F,C[D]=Rn(L,k)})}if(!$&&o==="center")if(m){const O=Math.max(...v.map(A=>A.height));C.forEach((A,F)=>{const L=v[F],D=(O-L.height)/2,k=ar({},A.props);k.y=(k.y||0)+D,C[F]=Rn(A,k)})}else{const O=Math.max(...v.map(A=>A.width));C.forEach((A,F)=>{const L=v[F],D=(O-L.width)/2,k=ar({},A.props);k.x=(k.x||0)+D,C[F]=Rn(A,k)})}const S=or(C),R=$g(ar({},c),{x:(f=c.x)!=null?f:b.x,y:(p=c.y)!=null?p:b.y,width:(g=c.width)!=null?g:S.width,height:(y=c.height)!=null?y:S.height});return d(Y,$g(ar({},R),{children:C}))});var kC=Object.defineProperty,LC=Object.defineProperties,zC=Object.getOwnPropertyDescriptors,Pg=Object.getOwnPropertySymbols,HC=Object.prototype.hasOwnProperty,RC=Object.prototype.propertyIsEnumerable,Cg=(t,e,n)=>e in t?kC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vs=(t,e)=>{for(var n in e||(e={}))HC.call(e,n)&&Cg(t,n,e[n]);if(Pg)for(var n of Pg(e))RC.call(e,n)&&Cg(t,n,e[n]);return t},Og=(t,e)=>LC(t,zC(e));const Mg=t=>{const{x:e=0,y:n=0,alignHorizontal:r="center",title:i,desc:o,descLineNumber:s=2,themeColors:a}=t,l=h=>{const u={fontSize:24,fill:a.colorPrimaryText,lineHeight:1.4,alignHorizontal:r};return d(St,Og(vs(vs({},u),h),{"data-element-type":"title",children:i}))},c=h=>{const u={fontSize:16,fill:a.colorTextSecondary,alignHorizontal:r,lineHeight:1.4,height:s*24};return d(St,Og(vs(vs({},u),h),{"data-element-type":"desc",children:o}))};return!i&&!o?null:I(ct,{flexDirection:"column",justifyContent:"center",alignItems:"center",x:e,y:n,gap:8,children:[i&&d(l,{}),o&&d(c,{})]})},Cc=new Map;function Oc(t,e){Cc.set(t,e)}function Sg(t){return Cc.get(t)}function DC(){return Array.from(Cc.keys())}Oc("dark",{colorBg:"#1F1F1F",base:{text:{fill:"#fff"}}}),Oc("hand-drawn",{base:{text:{"font-family":"851tegakizatsu"}},stylize:{type:"rough"}});var NC=Object.defineProperty,jC=Object.defineProperties,WC=Object.getOwnPropertyDescriptors,Eg=Object.getOwnPropertySymbols,FC=Object.prototype.hasOwnProperty,BC=Object.prototype.propertyIsEnumerable,Ig=(t,e,n)=>e in t?NC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ti=(t,e)=>{for(var n in e||(e={}))FC.call(e,n)&&Ig(t,n,e[n]);if(Eg)for(var n of Eg(e))BC.call(e,n)&&Ig(t,n,e[n]);return t},ki=(t,e)=>jC(t,WC(e));Xt(hu);const Ag=({colorPrimary:t,colorBg:e="#ffffff",isDarkMode:n=!1})=>{const r=on(t),i=on(e),o=UC({primaryColor:r,bgColor:i});return ZC(o,{primaryColor:r,bgColor:i,isDarkMode:n})},YC=(t,e)=>g4(ki(Ti({},t),{alpha:e?.2:.1}))||"#ffffff",VC=(t,e)=>{if(e)return"#ffffff";const n=on("#262626");return gl(n,t)>=7?ci(n):"#000000"},XC=t=>{const e=_u(on(t)),n=ki(Ti({},e),{l:Math.min(1,e.l+.2)});return ci(n)},GC=(t,e)=>{const n=on(t),r=on("#262626"),i=on("#ffffff"),o=gl(r,n);return gl(i,n)>=3?ci(i):o>=4.5?ci(r):"#ffffff"},qC=(t,e)=>{const n=_u(t);if(e){const r=ki(Ti({},n),{l:Math.min(1,n.l+.1)});return xs(r,"#1f1f1f")}else{if(n.l>.95)return"#ffffff";{const r=ki(Ti({},n),{l:Math.min(1,n.l+.05)});return xs(r,"#ffffff")}}},UC=({primaryColor:t,bgColor:e})=>({colorPrimary:xs(t,"#FF356A"),colorBg:xs(e,"#ffffff"),colorWhite:"#ffffff"}),ZC=(t,{primaryColor:e,bgColor:n,isDarkMode:r})=>{const i=VC(n,r),o=YC(e,r);return ki(Ti({},t),{isDarkMode:r,colorPrimaryBg:o,colorText:i,colorTextSecondary:XC(i),colorPrimaryText:GC(o,r),colorBgElevated:qC(n,r)})};function xs(t,e="#000000"){var n;return(n=ci(t))!=null?n:e}const Mc="#FF356A";function ce(t){var e;return((e=t==null?void 0:t.themeConfig)==null?void 0:e.colorPrimary)||Mc}function Tg(t){var e;const{themeConfig:n={},data:r}=t,{colorPrimary:i,palette:o}=n;return!o||o.length===0?Array(((e=r==null?void 0:r.items)==null?void 0:e.length)||1).fill(i||Mc):r.items.map((s,a)=>zo(o,[a],r.items.length)||Mc)}function It(t,e){var n,r,i;return zo((n=t==null?void 0:t.themeConfig)==null?void 0:n.palette,e,(i=(r=t.data)==null?void 0:r.items)==null?void 0:i.length)}function ge(t,e){var n;const{colorBg:r=((n=e==null?void 0:e.themeConfig)==null?void 0:n.colorBg)||"white",colorPrimary:i=e?ce(e):"black"}=t;return Ag({colorPrimary:i,isDarkMode:$u(r),colorBg:r})}function Li(t,e){const{depth:n,originalIndexes:r,flatIndex:i}=t;switch(e){case"level":return[n];case"branch":return n===0?[0]:n===1?[r[1]+1]:[r[1]+1];case"node":return r;case"node-flat":return i!==void 0?[i]:(console.warn("node-flat mode requires flatIndex in HierarchyNode, falling back to originalIndexes"),r);default:return[0]}}var KC=Object.defineProperty,kg=Object.getOwnPropertySymbols,QC=Object.prototype.hasOwnProperty,JC=Object.prototype.propertyIsEnumerable,Lg=(t,e,n)=>e in t?KC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,tO=(t,e)=>{for(var n in e||(e={}))QC.call(e,n)&&Lg(t,n,e[n]);if(kg)for(var n of kg(e))JC.call(e,n)&&Lg(t,n,e[n]);return t};function Zt(t,e=[]){const n=tO({},t),r={};return["indexes","data","datum","positionH","positionV","themeColors","valueFormatter",...e].forEach(o=>{o in n&&(r[o]=n[o],delete n[o])}),["x","y","width","height"].forEach(o=>{o in t&&(n[o]=t[o])}),[r,n]}function bs(t,e){var n;return t.length===0?()=>null:e===void 0?t[0]:(n=t[e])!=null?n:t[0]}const Sc=new Map;function Kt(t,e){Sc.set(t,e)}function zg(t){return Sc.get(t)}function eO(){return Array.from(Sc.keys())}var nO=Object.defineProperty,rO=Object.defineProperties,iO=Object.getOwnPropertyDescriptors,Hg=Object.getOwnPropertySymbols,oO=Object.prototype.hasOwnProperty,sO=Object.prototype.propertyIsEnumerable,Rg=(t,e,n)=>e in t?nO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,aO=(t,e)=>{for(var n in e||(e={}))oO.call(e,n)&&Rg(t,n,e[n]);if(Hg)for(var n of Hg(e))sO.call(e,n)&&Rg(t,n,e[n]);return t},lO=(t,e)=>rO(t,iO(e));const Dg=t=>{const[{datum:e,indexes:n,width:r=200,height:i=80,iconSize:o=24,badgeSize:s=32,gap:a=8,positionH:l="normal",themeColors:c,valueFormatter:h},u]=Zt(t,["width","height","iconSize","badgeSize","gap"]),f=e.value,p=f!==void 0,g=!!e.desc,y=!!e.icon,m=`${c.colorPrimary}-badge`,x=l==="flipped"?r-a-s:a,v=y?l==="flipped"?a:s+2*a:a,b=r-a*2,w=y?r-s-3*a:b,_=a+14+18+8,$=_-a,P=g?a:(i-s)/2,C=!p&&!g?(i-14)/2:a;return I(Y,lO(aO({},u),{width:r,height:i,children:[d(jt,{children:I("radialGradient",{id:m,cx:"50%",cy:"50%",r:"50%",children:[d("stop",{offset:"0%",stopColor:c.colorPrimary}),d("stop",{offset:"100%",stopColor:lt(c.colorPrimary).darken(20).toHexString()})]})}),d(Ct,{"data-element-type":"shape",x:0,y:0,width:r,height:i,fill:c.colorPrimaryBg,rx:8,ry:8}),y&&I(Bt,{children:[d(Wt,{x,y:P,width:s,height:s,fill:`url(#${m})`}),d(Pe,{indexes:n,x:x+(s-o)/2,y:P+(s-o)/2,size:o,fill:c.colorWhite})]}),I(ct,{flexDirection:"column",x:v,y:C,width:w,height:!p&&!g?void 0:$,alignItems:"center",justifyContent:"center",children:[d(At,{indexes:n,width:w,alignHorizontal:l==="flipped"?"right":"left",alignVertical:"middle",fontSize:14,fill:c.colorText,children:e.label}),p&&d(Ai,{indexes:n,width:w,alignHorizontal:l==="flipped"?"right":"left",alignVertical:"middle",fontSize:18,lineHeight:1,fontWeight:"bold",fill:c.colorPrimary,value:f,formatter:h})]}),g&&d(Jt,{indexes:n,x:a,y:_,width:b,alignHorizontal:l==="flipped"?"right":"left",fontSize:11,fill:c.colorTextSecondary,lineNumber:2,lineHeight:1.2,wordWrap:!0,children:e.desc})]}))};Kt("badge-card",{component:Dg,composites:["icon","label","value","desc"]});var cO=Object.defineProperty,hO=Object.defineProperties,dO=Object.getOwnPropertyDescriptors,Ng=Object.getOwnPropertySymbols,uO=Object.prototype.hasOwnProperty,fO=Object.prototype.propertyIsEnumerable,jg=(t,e,n)=>e in t?cO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,pO=(t,e)=>{for(var n in e||(e={}))uO.call(e,n)&&jg(t,n,e[n]);if(Ng)for(var n of Ng(e))fO.call(e,n)&&jg(t,n,e[n]);return t},gO=(t,e)=>hO(t,dO(e));const Wg=t=>{const[{indexes:e,datum:n,width:r=280,height:i=140,themeColors:o},s]=Zt(t,["width","height"]);return I(Y,gO(pO({},s),{children:[d("rect",{x:0,y:0,width:r,height:i,rx:22,ry:22,fill:o.colorPrimaryBg,stroke:o.colorPrimary,"data-element-type":"shape"}),d(yt,{x:r-85,y:.5,width:85,height:65,d:"M0 0H62.4495C74.9557 0 85.4549 10.8574 84.4557 23.1875V60.1875L77.8772 62.5839C64.3776 67.6876 48.51 64.6893 37.8662 53.7441L10.2361 25.3312C4.91402 19.8571 1.65356 13.1736 0.435652 6.21819L0 0Z",fill:o.colorBg,"data-element-type":"shape"}),d(At,{indexes:e,x:20,y:24,width:200,alignHorizontal:"left",alignVertical:"middle",fill:o.colorText,children:n.label}),d(Jt,{indexes:e,x:20,y:58,width:220,height:70,fill:o.colorTextSecondary,alignHorizontal:"left",alignVertical:"top",children:n.desc}),d(Pe,{indexes:e,x:r-48,y:12,width:32,height:32,fill:o.colorPrimary})]}))};Kt("candy-card-lite",{component:Wg,composites:["icon","label","desc"]});var mO=Object.defineProperty,yO=Object.defineProperties,vO=Object.getOwnPropertyDescriptors,ws=Object.getOwnPropertySymbols,Fg=Object.prototype.hasOwnProperty,Bg=Object.prototype.propertyIsEnumerable,Yg=(t,e,n)=>e in t?mO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xO=(t,e)=>{for(var n in e||(e={}))Fg.call(e,n)&&Yg(t,n,e[n]);if(ws)for(var n of ws(e))Bg.call(e,n)&&Yg(t,n,e[n]);return t},bO=(t,e)=>yO(t,vO(e)),wO=(t,e)=>{var n={};for(var r in t)Fg.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ws)for(var r of ws(t))e.indexOf(r)<0&&Bg.call(t,r)&&(n[r]=t[r]);return n};const Ec=t=>{const e=t,{color:n="black",opacity:r=.8}=e,i=wO(e,["color","opacity"]);return d("filter",bO(xO({id:"drop-shadow",x:"-25%",y:"-25%",width:"200%",height:"200%"},i),{children:d("feDropShadow",{dx:"4",dy:"4",stdDeviation:"4","flood-color":n,"flood-opacity":r})}))};var _O=Object.defineProperty,$O=Object.defineProperties,PO=Object.getOwnPropertyDescriptors,Vg=Object.getOwnPropertySymbols,CO=Object.prototype.hasOwnProperty,OO=Object.prototype.propertyIsEnumerable,Xg=(t,e,n)=>e in t?_O(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,MO=(t,e)=>{for(var n in e||(e={}))CO.call(e,n)&&Xg(t,n,e[n]);if(Vg)for(var n of Vg(e))OO.call(e,n)&&Xg(t,n,e[n]);return t},SO=(t,e)=>$O(t,PO(e));const Ic=t=>{const{id:e="linear-gradient",startColor:n="black",stopColor:r="white",direction:i="left-right"}=t;return I("linearGradient",SO(MO({id:e},{"left-right":{x1:"0%",y1:"0%",x2:"100%",y2:"0%"},"right-left":{x1:"100%",y1:"0%",x2:"0%",y2:"0%"},"top-bottom":{x1:"0%",y1:"0%",x2:"0%",y2:"100%"},"bottom-top":{x1:"0%",y1:"100%",x2:"0%",y2:"0%"}}[i]),{children:[d("stop",{offset:"0%",stopColor:n}),d("stop",{offset:"100%",stopColor:r})]}))};var EO=Object.defineProperty,IO=Object.defineProperties,AO=Object.getOwnPropertyDescriptors,Gg=Object.getOwnPropertySymbols,TO=Object.prototype.hasOwnProperty,kO=Object.prototype.propertyIsEnumerable,qg=(t,e,n)=>e in t?EO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,zi=(t,e)=>{for(var n in e||(e={}))TO.call(e,n)&&qg(t,n,e[n]);if(Gg)for(var n of Gg(e))kO.call(e,n)&&qg(t,n,e[n]);return t},Hi=(t,e)=>IO(t,AO(e));const Ug=t=>{const[{datum:e,indexes:n,width:r=300,height:i=80,gap:o=12,positionH:s="normal",iconPadding:a=i/10,themeColors:l},c]=Zt(t,["width","height","gap","iconPadding"]),h=i/2,u=i-a*2,f=s==="flipped",p=!!e.icon,g=p?r-i-o:r-o*2,y=p?f?o:i:o,m=p?f?"right":"left":"center",x={indexes:n,width:g,alignHorizontal:m,alignVertical:"middle",fontSize:16,fontWeight:"600",fill:l.colorWhite},v=et(d(At,Hi(zi({},x),{children:e.label}))),b={indexes:n,width:g,alignHorizontal:m,alignVertical:"top",fontSize:12,lineNumber:1,fill:l.colorWhite},w=et(e.desc?d(Jt,Hi(zi({},b),{children:e.desc})):null),_=4,$=v.height+_+w.height,C=(i-$)/2,T=C+v.height+_,E=f?r-i+a:a,S=a;return I(Y,Hi(zi({},c),{children:[d(jt,{children:d(Ec,{})}),d(Ct,{x:0,y:0,width:r,height:i,fill:l.colorPrimary,rx:h,ry:h,"data-element-type":"shape"}),e.icon&&I(Bt,{children:[d(Wt,{x:E,y:S,width:u,height:u,fillOpacity:.5,fill:l.colorBg,filter:"url(#drop-shadow)"}),d(sr,{indexes:n,x:E,y:S,size:u,fill:l.colorBg,colorBg:l.colorPrimary})]}),e.label&&d(At,Hi(zi({x:y,y:C},x),{children:e.label})),e.desc&&d(Jt,Hi(zi({x:y,y:T},b),{children:e.desc}))]}))};Kt("capsule-item",{component:Ug,composites:["icon","label","desc"]});var LO=Object.defineProperty,zO=Object.defineProperties,HO=Object.getOwnPropertyDescriptors,Zg=Object.getOwnPropertySymbols,RO=Object.prototype.hasOwnProperty,DO=Object.prototype.propertyIsEnumerable,Kg=(t,e,n)=>e in t?LO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ac=(t,e)=>{for(var n in e||(e={}))RO.call(e,n)&&Kg(t,n,e[n]);if(Zg)for(var n of Zg(e))DO.call(e,n)&&Kg(t,n,e[n]);return t},Tc=(t,e)=>zO(t,HO(e));const Qg=t=>{const[{indexes:e,datum:n,themeColors:r,positionH:i="normal",width:o=240,height:s=o},a]=Zt(t,["width","height"]),l=Math.min(o,s),c=l*.7,h=(l-c)/2,u=c*Math.sqrt(2)/2,f=(l-u)/2,p=lt(r.colorPrimary),g=_s(p,80,.2),y=_s(p,20,.8),m=_s(p,75,.32),x=_s(p,45,.4),v=p.clone().darken(5).toRgbString(),b=`${r.colorPrimary}-${i}-outer`,w=`${r.colorPrimary}-${i}-inner`,_=i==="flipped"?{x1:"0%",y1:"0%",x2:"100%",y2:"0%"}:{x1:"100%",y1:"0%",x2:"0%",y2:"0%"};return I(Y,Tc(Ac({},a),{children:[I(jt,{children:[I("linearGradient",Tc(Ac({id:b},_),{children:[d("stop",{offset:"0%",stopColor:g}),d("stop",{offset:"100%",stopColor:y})]})),I("linearGradient",Tc(Ac({id:w},_),{children:[d("stop",{offset:"0%",stopColor:m}),d("stop",{offset:"100%",stopColor:x})]}))]}),d(Wt,{width:l,height:l,fill:`url(#${b})`,"data-element-type":"shape"}),d(Wt,{x:h,y:h,width:c,height:c,fill:`url(#${w})`,stroke:"#FFFFFF",strokeWidth:1,"data-element-type":"shape"}),d(At,{indexes:e,x:f,y:f,width:u,height:u,lineHeight:1.1,alignHorizontal:"center",alignVertical:"middle",fill:v,fontWeight:"500",children:n.label})]}))};Kt("circle-node",{component:Qg,composites:["label"]});function _s(t,e,n){return lt.mix(t,"#ffffff",e).setAlpha(n).toRgbString()}var NO=Object.defineProperty,jO=Object.defineProperties,WO=Object.getOwnPropertyDescriptors,Jg=Object.getOwnPropertySymbols,FO=Object.prototype.hasOwnProperty,BO=Object.prototype.propertyIsEnumerable,t1=(t,e,n)=>e in t?NO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,kc=(t,e)=>{for(var n in e||(e={}))FO.call(e,n)&&t1(t,n,e[n]);if(Jg)for(var n of Jg(e))BO.call(e,n)&&t1(t,n,e[n]);return t},Lc=(t,e)=>jO(t,WO(e));const e1=t=>{var e;const[{datum:n,indexes:r,size:i=120,strokeWidth:o=12,gap:s=8,themeColors:a,valueFormatter:l=_=>`${Math.round(_)}%`},c]=Zt(t,["size","strokeWidth","gap"]),h=(e=n.value)!=null?e:0,f=Math.min(Math.max(h/100,0),1),p=(i-o)/2,g=i/2,y=o/2,m=i-o,x=f>=1,v=f*360,b=YO(g,g,p,0,v),w={x:y,y,width:m,height:m};return I(Y,Lc(kc({},c),{width:i,height:i+s+20,children:[d(Ct,{width:i,height:i,fill:"none"}),d(Wt,Lc(kc({},w),{fill:"none",stroke:"#f0f0f0",strokeWidth:o,"data-element-type":"shape"})),x?d(Wt,Lc(kc({},w),{fill:"none",stroke:a.colorPrimary,strokeWidth:o,"data-element-type":"shape"})):d(yt,{d:b,fill:"none",stroke:a.colorPrimary,strokeWidth:o,strokeLinecap:"round","data-element-type":"shape"}),d(Ai,{indexes:r,x:o,y:o,width:m-o,height:m-o,fontSize:24,fontWeight:"bold",fill:a.colorPrimary,alignHorizontal:"center",alignVertical:"middle",value:h,formatter:l}),d(At,{indexes:r,x:0,y:i+s,width:i,alignHorizontal:"center",fontSize:12,fill:a.colorTextSecondary,children:n.label})]}))};function YO(t,e,n,r,i){const o=n1(t,e,n,i),s=n1(t,e,n,r),a=i-r<=180?"0":"1";return`M ${o.x} ${o.y} A ${n} ${n} 0 ${a} 0 ${s.x} ${s.y}`}function n1(t,e,n,r){const i=(r-90)*Math.PI/180;return{x:t+n*Math.cos(i),y:e+n*Math.sin(i)}}Kt("circular-progress",{component:e1,composites:["label","value"]});var VO=Object.defineProperty,XO=Object.defineProperties,GO=Object.getOwnPropertyDescriptors,r1=Object.getOwnPropertySymbols,qO=Object.prototype.hasOwnProperty,UO=Object.prototype.propertyIsEnumerable,i1=(t,e,n)=>e in t?VO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ZO=(t,e)=>{for(var n in e||(e={}))qO.call(e,n)&&i1(t,n,e[n]);if(r1)for(var n of r1(e))UO.call(e,n)&&i1(t,n,e[n]);return t},KO=(t,e)=>XO(t,GO(e));const o1=t=>{const[{datum:e,indexes:n,width:r=200,height:i=60,iconSize:o=20,gap:s=8,positionH:a="normal",themeColors:l,valueFormatter:c},h]=Zt(t,["width","height","iconSize","gap"]),u=e.value,f=u!=null,p="compact-shadow",g=a==="flipped"?r-s-o:s,y=a==="flipped"?s:o+2*s,m=r-o-3*s,x=f?m*.8:m,v=f?m*.2:0;return I(Y,KO(ZO({},h),{children:[d(jt,{children:d("filter",{id:p,children:d("feDropShadow",{dx:"0",dy:"2",stdDeviation:"2",floodOpacity:"0.15"})})}),d(Ct,{x:0,y:0,width:r,height:i,fill:l.colorBgElevated,stroke:l.colorBgElevated,strokeWidth:1,rx:6,ry:6,filter:`url(#${p})`,"data-element-type":"shape"}),d(Ct,{x:a==="flipped"?r-3:0,y:0,width:3,height:i,fill:l.colorPrimary,rx:1.5,ry:1.5,"data-element-type":"shape"}),d(Pe,{indexes:n,x:g,y:(i-o)/2,size:o,fill:l.colorPrimary}),I(ct,{x:y,y:s,width:m,height:i-s*2,flexDirection:"column",justifyContent:"center",alignItems:"flex-start",children:[I(ct,{width:m,flexDirection:"row",justifyContent:"space-between",alignItems:"center",children:[d(At,{indexes:n,width:x,alignHorizontal:"left",fontSize:12,fill:l.colorText,children:e.label}),f&&d(Ai,{indexes:n,width:v,alignHorizontal:"right",fontSize:12,fontWeight:"bold",fill:l.colorPrimary,value:u,formatter:c})]}),d(Jt,{indexes:n,width:m,alignHorizontal:"left",alignVertical:"middle",fontSize:10,fill:l.colorTextSecondary,lineNumber:2,wordWrap:!0,children:e.desc})]})]}))};Kt("compact-card",{component:o1,composites:["icon","label","value","desc"]});var QO=Object.defineProperty,JO=Object.defineProperties,tM=Object.getOwnPropertyDescriptors,s1=Object.getOwnPropertySymbols,eM=Object.prototype.hasOwnProperty,nM=Object.prototype.propertyIsEnumerable,a1=(t,e,n)=>e in t?QO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rM=(t,e)=>{for(var n in e||(e={}))eM.call(e,n)&&a1(t,n,e[n]);if(s1)for(var n of s1(e))nM.call(e,n)&&a1(t,n,e[n]);return t},iM=(t,e)=>JO(t,tM(e));const l1=t=>{const[{datum:e,indexes:n,width:r=300,height:i=30,iconSize:o=30,gap:s=5,positionH:a="normal",positionV:l="middle",themeColors:c},h]=Zt(t,["width","height","iconSize","gap"]),u=r-o-s,f=l==="middle"?(i-o)/2:l==="flipped"?i-o:0;return I(Y,iM(rM({},h),{children:[d(yt,{"data-element-type":"shape",x:a==="flipped"?u+s:0,y:f,fill:c.colorPrimary,width:o,height:o,d:"M14.7273 30C6.54538 30 0 22.9077 0 14.7269C0 6.54617 6.54538 0 14.7273 0C22.9092 0 30 6.54617 30 14.7269C30 22.9077 22.9092 30 14.7273 30ZM24.5454 10.9077C22.9092 9.27307 22.9092 9.27307 22.9092 9.27307C22.3638 8.72692 22.3638 8.7269 21.8181 8.7269C21.2727 8.7269 21.2727 8.72692 20.7273 9.27307C13.0908 16.9077 13.0908 16.9077 13.0908 16.9077C8.72731 12.5461 8.72731 12.5462 8.72731 12.5462C8.18193 12.5462 8.18193 12 7.63654 12L7.09077 12.5462C4.90923 14.1808 4.90923 14.1808 4.90923 14.1808C4.90923 14.7269 4.90923 14.7269 4.90923 15.2731C4.90923 15.8192 4.90923 15.8192 4.90923 16.3654C12 23.4539 12 23.4538 12 23.4538C12.5454 23.4538 12.5454 23.4538 13.0908 23.4538C13.6365 23.4538 13.6365 23.4538 14.1819 23.4538C24.5454 12.5461 24.5454 12.5462 24.5454 12.5462L25.0908 12C25.0908 11.4538 24.5454 10.9077 24.5454 10.9077Z"}),d(At,{indexes:n,x:a==="flipped"?0:o+s,width:u,height:i,fontWeight:"normal",alignVertical:"middle",wordWrap:!1,fill:"#666",children:e.label||e.desc})]}))};Kt("done-list",{component:l1,composites:["label"]});var oM=Object.defineProperty,sM=Object.defineProperties,aM=Object.getOwnPropertyDescriptors,c1=Object.getOwnPropertySymbols,lM=Object.prototype.hasOwnProperty,cM=Object.prototype.propertyIsEnumerable,h1=(t,e,n)=>e in t?oM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,hM=(t,e)=>{for(var n in e||(e={}))lM.call(e,n)&&h1(t,n,e[n]);if(c1)for(var n of c1(e))cM.call(e,n)&&h1(t,n,e[n]);return t},dM=(t,e)=>sM(t,aM(e));const d1=t=>{const[{indexes:e,datum:n,width:r=140,themeColors:i,positionV:o="normal"},s]=Zt(t,["width"]),a=o!=="flipped",l=o==="normal"?"bottom":"top",c=d(At,{indexes:e,width:r,fill:i.colorText,alignHorizontal:"center",alignVertical:l,fontSize:14,children:n.label}),h=d(Jt,{indexes:e,width:r,fill:i.colorTextSecondary,alignHorizontal:"center",alignVertical:l,children:n.desc}),u=d(sr,{indexes:e,fill:i.colorPrimary,colorBg:i.colorWhite}),f=d(fM,{width:8,height:30,fill:i.colorPrimary,positionV:o}),p=5,g=25,y=30,m=et(c),x=et(h),v=et(u),b=et(f),w=m.height+x.height+p+b.height-v.height-g,_=v.height+g+y+b.height+p+m.height+x.height;return d(Y,dM(hM({width:r,height:_},s),{children:I(ct,{flexDirection:"column",alignItems:"center",children:[a?I(Bt,{children:[h,c,d(ie,{height:p}),f]}):I(Bt,{children:[d(ie,{height:w}),u,d(ie,{height:g})]}),I(Nr,{horizontal:"center",vertical:"middle",width:r,height:y,children:[d(uM,{width:r,height:y,fill:i.colorPrimary}),d(St,{width:r,height:y,alignHorizontal:"center",alignVertical:"middle",fill:i.colorWhite,fontWeight:"bold",fontSize:16,children:n.time?n.time:String(e[0]+1).padStart(2,"0").slice(-2)})]}),a?I(Bt,{children:[d(ie,{height:g}),u]}):I(Bt,{children:[f,d(ie,{height:p}),c,h]})]})}))},uM=t=>{const{x:e=0,y:n=0,width:r=100,height:i=40,fill:o="#FF356A",size:s=10}=t;return d(Re,{width:r,height:i,points:[{x:e,y:n},{x:e+r-s,y:n},{x:e+r,y:n+i/2},{x:e+r-s,y:n+i},{x:e,y:n+i},{x:e+s,y:n+i/2}],fill:o,"data-element-type":"shape"})},fM=t=>{const{x:e=0,y:n=0,width:r=10,height:i=50,fill:o,positionV:s="top"}=t,a=r/2,l=i-a,c=2,h=a;return I(le,{x:e,y:n,width:r,height:i,children:[d(Wt,{width:r,height:r,fill:o,y:s==="top"?0:l-a}),d(yt,{d:s==="top"?`M${h},${a} L${h},${a+l}`:`M${h},0 L${h},${l-a}`,strokeWidth:c,stroke:o})]})};Kt("horizontal-icon-arrow",{component:d1,composites:["icon","label","desc","time"]});var pM=Object.defineProperty,gM=Object.defineProperties,mM=Object.getOwnPropertyDescriptors,u1=Object.getOwnPropertySymbols,yM=Object.prototype.hasOwnProperty,vM=Object.prototype.propertyIsEnumerable,f1=(t,e,n)=>e in t?pM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,p1=(t,e)=>{for(var n in e||(e={}))yM.call(e,n)&&f1(t,n,e[n]);if(u1)for(var n of u1(e))vM.call(e,n)&&f1(t,n,e[n]);return t},g1=(t,e)=>gM(t,mM(e));const m1=t=>{const[{indexes:e,datum:n,width:r=160,themeColors:i,positionH:o="center",positionV:s="normal"},a]=Zt(t,["width"]),l=o==="normal"?"left":o==="flipped"?"right":"center",c=d(At,{indexes:e,width:r,alignHorizontal:l,fill:i.colorPrimary,children:n.label}),h=et(c),u=n.desc?d(Jt,{indexes:e,width:r,fill:i.colorTextSecondary,alignHorizontal:l,alignVertical:s==="flipped"?"top":"bottom",children:n.desc}):null,f=et(u),g=n.icon?d(sr,{size:45,indexes:e,colorBg:i.colorBg,fill:i.colorPrimary}):null,y=et(g),m=n.time?d(St,{width:r,height:30,alignHorizontal:"center",alignVertical:"middle",fill:i.colorPrimary,fontSize:18,fontWeight:"bold",children:n.time}):null,x=et(m),v=18,b=I(Nr,{horizontal:"center",vertical:"middle",width:r,height:v,children:[d(Ct,{width:r,height:v,fill:i.colorPrimary,"data-element-type":"shape"}),d(Wt,{width:v+6,height:v+6,fill:i.colorBg,fillOpacity:.5,"data-element-type":"shape"}),d(Wt,{width:12,height:12,fill:"white","data-element-type":"shape"})]}),w=h.height+f.height,_=y.height+x.height+5,$=Math.abs(_-w),P=_>w?$:0,C=w>_?$:0;return s==="flipped"?I(ct,g1(p1({},a),{flexDirection:"column",alignItems:"center",children:[d(ie,{height:C}),m,g,d(ie,{height:5}),b,c,u,d(ie,{height:P})]})):I(ct,g1(p1({},a),{flexDirection:"column",alignItems:"center",children:[d(ie,{height:P}),c,u,b,d(ie,{height:5}),g,m,d(ie,{height:C})]}))};Kt("horizontal-icon-line",{component:m1,composites:["icon","label","desc"]});var xM=Object.defineProperty,bM=Object.defineProperties,wM=Object.getOwnPropertyDescriptors,y1=Object.getOwnPropertySymbols,_M=Object.prototype.hasOwnProperty,$M=Object.prototype.propertyIsEnumerable,v1=(t,e,n)=>e in t?xM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,PM=(t,e)=>{for(var n in e||(e={}))_M.call(e,n)&&v1(t,n,e[n]);if(y1)for(var n of y1(e))$M.call(e,n)&&v1(t,n,e[n]);return t},CM=(t,e)=>bM(t,wM(e));const x1=t=>{var e;const[{datum:n,indexes:r,size:i=80,iconSize:o=28,badgeSize:s=24,gap:a=8,themeColors:l,width:c=84,height:h=105},u]=Zt(t,["size","iconSize","badgeSize","gap"]),f=(e=n.value)!=null?e:0,p=`${l.colorPrimary}-icon`,g="#ff6b6b-badge";return I(Y,CM(PM({},u),{width:c,height:h,children:[I(jt,{children:[I("radialGradient",{id:p,cx:"50%",cy:"30%",r:"70%",children:[d("stop",{offset:"0%",stopColor:lt(l.colorPrimary).lighten(30).toHexString()}),d("stop",{offset:"100%",stopColor:l.colorPrimary})]}),I("linearGradient",{id:g,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:"#ff6b6b"}),d("stop",{offset:"100%",stopColor:"#ee5a52"})]})]}),d(Wt,{x:0,y:0,width:i,height:i,fill:`url(#${p})`,"data-element-type":"shape"}),d(Pe,{indexes:r,x:(i-o)/2,y:(i-o)/2,size:o,fill:l.colorPrimaryText}),d(Wt,{x:i-s+4,width:s,height:s,fill:`url(#${g})`}),d(St,{x:i-s+4,width:s,height:s,fontSize:10,fontWeight:"bold",fill:l.colorWhite,alignHorizontal:"center",alignVertical:"middle",children:f>99?"99+":Math.round(f)}),d(At,{indexes:r,x:0,y:i+a,width:i,alignHorizontal:"center",fontSize:12,fill:l.colorText,children:n.label})]}))};Kt("icon-badge",{component:x1,composites:["icon","label"]});var OM=Object.defineProperty,MM=Object.defineProperties,SM=Object.getOwnPropertyDescriptors,b1=Object.getOwnPropertySymbols,EM=Object.prototype.hasOwnProperty,IM=Object.prototype.propertyIsEnumerable,w1=(t,e,n)=>e in t?OM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,AM=(t,e)=>{for(var n in e||(e={}))EM.call(e,n)&&w1(t,n,e[n]);if(b1)for(var n of b1(e))IM.call(e,n)&&w1(t,n,e[n]);return t},TM=(t,e)=>MM(t,SM(e));const _1=t=>{const[{datum:e,indexes:n,width:r=200,borderRadius:i=12,padding:o=16,separatorHeight:s=2,indexFontSize:a=20,labelFontSize:l=16,gap:c=8,themeColors:h},u]=Zt(t,["width","height","borderRadius","padding","separatorHeight","indexFontSize","labelFontSize","gap"]),f=n[0]+1,p=String(f).padStart(2,"0"),g=e.label!==void 0,y=e.desc!==void 0,m=lt.mix(h.colorPrimary,h.colorWhite,40).toHexString(),x=h.colorBgElevated||h.colorWhite,v=r-2*o,b=et(d(St,{fontSize:a,fontWeight:"bold",children:p})),w=v-b.width-c,_=g?et(d(At,{indexes:n,width:w,fontSize:l,fontWeight:"bold",x:a,children:e.label})):{height:0},$=y?et(d(Jt,{indexes:n,width:v,fontSize:14,lineHeight:1.5,wordWrap:!0,children:e.desc})):{height:0},P=Math.max(b.height,_.height),C=o*2+P+(g||y?c:0)+s+(y?c:0)+$.height;return I(Y,TM(AM({},u),{width:r,height:C,children:[d(Ct,{x:0,y:0,width:r,height:C,rx:i,ry:i,fill:x,stroke:lt(x).darken(5).toHexString(),strokeWidth:.5,"data-element-type":"shape"}),I(Y,{x:o,y:o,children:[I(Y,{x:0,y:0,children:[d(St,{x:0,y:0,fontSize:a,fontWeight:"bold",fill:h.colorPrimary,alignVertical:"top",children:p}),g&&d(At,{indexes:n,x:a+c,y:0,width:w,fontSize:l,fontWeight:"bold",fill:h.colorTextSecondary,alignVertical:"top",children:e.label})]}),d(Ct,{x:0,y:P+c,width:v,height:s,fill:m,"data-element-type":"shape"}),y&&d(Jt,{indexes:n,x:0,y:P+c+s+c,width:v,fontSize:14,lineHeight:1.5,wordWrap:!0,fill:h.colorTextSecondary,children:e.desc})]})]}))};Kt("indexed-card",{component:_1,composites:["label","desc"]});var kM=Object.defineProperty,LM=Object.defineProperties,zM=Object.getOwnPropertyDescriptors,$1=Object.getOwnPropertySymbols,HM=Object.prototype.hasOwnProperty,RM=Object.prototype.propertyIsEnumerable,P1=(t,e,n)=>e in t?kM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,DM=(t,e)=>{for(var n in e||(e={}))HM.call(e,n)&&P1(t,n,e[n]);if($1)for(var n of $1(e))RM.call(e,n)&&P1(t,n,e[n]);return t},NM=(t,e)=>LM(t,zM(e));const C1=t=>{const[{indexes:e,datum:n,width:r=140,iconSize:i=24,themeColors:o},s]=Zt(t,["width","iconSize"]),{label:a,desc:l}=n,c=8,h=16,u=12,f=h+u,p=r-f,g=60,y=i+44,m=h,x=g+u,v=g+h+u,b=[{x:0,y:v},{x:m,y:x},{x:m,y:v}],w=r-m-u,_=m+u,$=_+w,P=x+c/2,C=P+y,T=`M ${_} ${C} L ${_} ${P} L ${$} ${P}`,E=c/2,S=_+E,R=P+E,O=8;return I(Y,NM(DM({},s),{children:[d(Jt,{indexes:e,x:f,width:p,height:g,fontSize:12,alignHorizontal:"left",alignVertical:"bottom",fill:o.colorTextSecondary,children:l}),d(Re,{points:b,fill:o.colorPrimary,opacity:.9,width:h,height:h,"data-element-type":"shape"}),d(yt,{d:T,stroke:o.colorPrimary,strokeWidth:c,fill:"none","data-element-type":"shape"}),d(Pe,{indexes:e,x:S+w/2-i/2,y:R+O,size:i,fill:o.colorPrimary}),d(At,{indexes:e,x:S,y:R+i+O*2,width:w,fontSize:14,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:o.colorText,children:a})]}))};Kt("l-corner-card",{component:C1,composites:["icon","label","desc"]});var jM=Object.defineProperty,WM=Object.defineProperties,FM=Object.getOwnPropertyDescriptors,O1=Object.getOwnPropertySymbols,BM=Object.prototype.hasOwnProperty,YM=Object.prototype.propertyIsEnumerable,M1=(t,e,n)=>e in t?jM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,VM=(t,e)=>{for(var n in e||(e={}))BM.call(e,n)&&M1(t,n,e[n]);if(O1)for(var n of O1(e))YM.call(e,n)&&M1(t,n,e[n]);return t},XM=(t,e)=>WM(t,FM(e));const S1=t=>{var e,n;const[{datum:r,indexes:i,width:o=280,height:s=160,showStripe:a=!0,showGradient:l=!0,showBottomShade:c=!0,themeColors:h},u]=Zt(t,["width","height","showStripe","showGradient","showBottomShade"]),f=(e=r.label)==null?void 0:e[0].toUpperCase(),p=(n=r.label)==null?void 0:n.toUpperCase(),g=h.colorPrimary,y=lt(g),m=4,x=6,v=45,b=40,w=12,$=y.clone().darken(4).toHexString(),P=y.clone().lighten(w).toHexString(),C="rgba(255, 255, 255, 0)",T="rgba(0, 0, 0, 0.03)",E=`letter-card-${i.join("-")}`,S=`${E}-gradient`,R=`${E}-pattern`,O=`${E}-shade`,A=m+x,F=1,L=96,D=L*F,k=16,N=k*F,j=s/16,X=D+j+N,z=(s-X)/2,M=z+D+j;return I(Y,XM(VM({},u),{width:o,height:s,children:[I(jt,{children:[l&&I("linearGradient",{id:S,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:$}),d("stop",{offset:"100%",stopColor:P})]}),a&&I("pattern",{id:R,patternUnits:"userSpaceOnUse",width:A,height:A,patternTransform:`rotate(${v})`,children:[d("rect",{x:"0",y:"0",width:A,height:A,fill:C}),d("rect",{x:"0",y:"0",width:m,height:A,fill:T})]}),c&&I("linearGradient",{id:O,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:"rgba(0,0,0,0)"}),d("stop",{offset:"100%",stopColor:"rgba(0,0,0,0.16)"})]})]}),d(Ct,{x:0,y:0,width:o,height:s,fill:l?`url(#${S})`:g,rx:0,ry:0,"data-element-type":"shape"}),a&&d(Ct,{x:0,y:0,width:o,height:s,fill:`url(#${R})`,rx:0,ry:0}),c&&d(Ct,{x:0,y:s-b,width:o,height:b,fill:`url(#${O})`,rx:0,ry:0}),f&&d(At,{indexes:i,x:0,y:z,width:o,fontSize:L,fontWeight:"bold",fill:"#FFFFFF",alignHorizontal:"center",alignVertical:"top",lineHeight:1,children:f}),d(At,{indexes:i,x:0,y:M,width:o,fontSize:k,fontWeight:"bold",fill:"#FFFFFF",alignHorizontal:"center",alignVertical:"middle",lineHeight:1,children:p})]}))};Kt("letter-card",{component:S1,composites:["label"]});var GM=Object.defineProperty,qM=Object.defineProperties,UM=Object.getOwnPropertyDescriptors,E1=Object.getOwnPropertySymbols,ZM=Object.prototype.hasOwnProperty,KM=Object.prototype.propertyIsEnumerable,I1=(t,e,n)=>e in t?GM(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,QM=(t,e)=>{for(var n in e||(e={}))ZM.call(e,n)&&I1(t,n,e[n]);if(E1)for(var n of E1(e))KM.call(e,n)&&I1(t,n,e[n]);return t},JM=(t,e)=>qM(t,UM(e));const A1=t=>{var e,n,r;const[{datum:i,indexes:o,width:s,themeColors:a,positionH:l="normal",positionV:c="center",formatter:h=F=>F||"",usePaletteColor:u=!1,showUnderline:f=!1,underlineGap:p=6,underlineExtend:g=8,underlineThickness:y=2},m]=Zt(t,["width","formatter","usePaletteColor","showUnderline","underlineGap","underlineExtend","underlineThickness"]),x=h((n=(e=i.label)!=null?e:i.desc)!=null?n:""),v=l==="flipped"?"right":l==="center"?"center":"left",b=et(d(At,{indexes:o,width:s,children:x})),w=s!=null?s:b.width,_=b.height,$=f?w+g*2:0,P=_+(f?p+y:0),C=f?Math.max(w,$):w,T=(r=m.height)!=null?r:P,E=c==="middle"?(T-P)/2:c==="flipped"?T-P:0,S=v==="right"?C-w:v==="center"?(C-w)/2:0,R=E,O=v==="right"?C-$:v==="center"?(C-$)/2:0,A=T;return I(Y,JM(QM({},m),{width:C,height:T,children:[d(At,{indexes:o,x:S,y:R,width:w,height:_,alignHorizontal:v,alignVertical:c==="flipped"?"bottom":c==="center"?"middle":"top",fill:u?a.colorPrimary:a.colorText,children:x}),f&&d(yt,{d:`M 0 ${y/2} L ${$} ${y/2}`,x:O,y:A-y/2,width:$,height:y,stroke:a.colorPrimary,strokeWidth:y,fill:"none",strokeLinecap:"round","data-element-type":"shape"})]}))};Kt("lined-text",{component:A1,composites:["label"]});var tS=Object.defineProperty,eS=Object.defineProperties,nS=Object.getOwnPropertyDescriptors,T1=Object.getOwnPropertySymbols,rS=Object.prototype.hasOwnProperty,iS=Object.prototype.propertyIsEnumerable,k1=(t,e,n)=>e in t?tS(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,oS=(t,e)=>{for(var n in e||(e={}))rS.call(e,n)&&k1(t,n,e[n]);if(T1)for(var n of T1(e))iS.call(e,n)&&k1(t,n,e[n]);return t},sS=(t,e)=>eS(t,nS(e));const L1=t=>{const[{datum:e,indexes:n,width:r=300,pillWidth:i=120,pillHeight:o=36,gap:s=16,positionH:a="normal",themeColors:l},c]=Zt(t,["width","pillWidth","pillHeight","gap"]),h=!!e.desc,u=h?r:i,f=h?a==="center"?(u-i)/2:a==="flipped"?u-i:0:0,p=0,g=0,y=o+s,m=u,x=`drop-shadow-${l.colorPrimary}`,v="linear-gradient-white-top-bottom";return I(Y,sS(oS({},c),{children:[I(jt,{children:[d(Ec,{id:x,color:l.colorPrimary}),d(Ic,{id:v,startColor:"#fff",stopColor:"#ffffff33",direction:"top-bottom"})]}),d(Ct,{x:f,y:p,width:i,height:o,fill:l.colorPrimaryBg,stroke:l.colorPrimary,rx:o/2,ry:o/2,filter:`url(#${x})`,"data-element-type":"shape"}),d(Ct,{x:f,y:p,width:i,height:o,fill:`url(#${v})`,opacity:l.isDarkMode?.4:.7,rx:o/2,ry:o/2}),d(At,{indexes:n,x:f,y:p,width:i,height:o,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"500",fill:l.colorText,children:e.label}),e.desc&&d(Jt,{indexes:n,x:g,y,width:m,alignHorizontal:a==="center"?"center":a==="flipped"?"right":"left",fontSize:12,fill:l.colorTextSecondary,lineNumber:2,wordWrap:!0,children:e.desc})]}))};Kt("pill-badge",{component:L1,composites:["label","desc"]});var aS=Object.defineProperty,lS=Object.defineProperties,cS=Object.getOwnPropertyDescriptors,z1=Object.getOwnPropertySymbols,hS=Object.prototype.hasOwnProperty,dS=Object.prototype.propertyIsEnumerable,H1=(t,e,n)=>e in t?aS(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,uS=(t,e)=>{for(var n in e||(e={}))hS.call(e,n)&&H1(t,n,e[n]);if(z1)for(var n of z1(e))dS.call(e,n)&&H1(t,n,e[n]);return t},fS=(t,e)=>lS(t,cS(e));const R1=t=>{var e;const[{indexes:n,datum:r,width:i=120,themeColors:o,positionH:s="normal",positionV:a="center",formatter:l=y=>y||"",usePaletteColor:c=!1,lineNumber:h=1},u]=Zt(t,["width","formatter","usePaletteColor","lineNumber"]),f=14,p=1.4,g=(e=u.height)!=null?e:Math.ceil(h*p*f);return d(At,fS(uS({},u),{indexes:n,width:i,height:g,lineHeight:p,fill:c?o.colorPrimary:o.colorText,fontSize:f,fontWeight:"regular",alignHorizontal:s==="flipped"?"right":s==="center"?"center":"left",alignVertical:a==="flipped"?"bottom":a==="center"?"middle":"top",children:l(r.label||r.desc)}))};Kt("plain-text",{component:R1,composites:["label"]});function $s(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function pS(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function D1(t){let e,n,r;t.length!==2?(e=$s,n=(a,l)=>$s(t(a),l),r=(a,l)=>t(a)-l):(e=t===$s||t===pS?t:gS,n=t,r=t);function i(a,l,c=0,h=a.length){if(c<h){if(e(l,l)!==0)return h;do{const u=c+h>>>1;n(a[u],l)<0?c=u+1:h=u}while(c<h)}return c}function o(a,l,c=0,h=a.length){if(c<h){if(e(l,l)!==0)return h;do{const u=c+h>>>1;n(a[u],l)<=0?c=u+1:h=u}while(c<h)}return c}function s(a,l,c=0,h=a.length){const u=i(a,l,c,h-1);return u>c&&r(a[u-1],l)>-r(a[u],l)?u-1:u}return{left:i,center:s,right:o}}function gS(){return 0}function mS(t){return t===null?NaN:+t}const yS=D1($s).right;D1(mS).center;const vS=Math.sqrt(50),xS=Math.sqrt(10),bS=Math.sqrt(2);function Ps(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),s=o>=vS?10:o>=xS?5:o>=bS?2:1;let a,l,c;return i<0?(c=Math.pow(10,-i)/s,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,i)*s,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?Ps(t,e,n*2):[a,l,c]}function wS(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,s]=r?Ps(e,t,n):Ps(t,e,n);if(!(o>=i))return[];const a=o-i+1,l=new Array(a);if(r)if(s<0)for(let c=0;c<a;++c)l[c]=(o-c)/-s;else for(let c=0;c<a;++c)l[c]=(o-c)*s;else if(s<0)for(let c=0;c<a;++c)l[c]=(i+c)/-s;else for(let c=0;c<a;++c)l[c]=(i+c)*s;return l}function zc(t,e,n){return e=+e,t=+t,n=+n,Ps(t,e,n)[2]}function _S(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?zc(e,t,n):zc(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}var $S={value:()=>{}};function Hc(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Cs(n)}function Cs(t){this._=t}function PS(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Cs.prototype=Hc.prototype={constructor:Cs,on:function(t,e){var n=this._,r=PS(t+"",n),i,o=-1,s=r.length;if(arguments.length<2){for(;++o<s;)if((i=(t=r[o]).type)&&(i=CS(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<s;)if(i=(t=r[o]).type)n[i]=N1(n[i],t.name,e);else if(e==null)for(i in n)n[i]=N1(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Cs(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function CS(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function N1(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=$S,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Rc="http://www.w3.org/1999/xhtml";const j1={svg:"http://www.w3.org/2000/svg",xhtml:Rc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Os(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),j1.hasOwnProperty(e)?{space:j1[e],local:t}:t}function OS(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Rc&&e.documentElement.namespaceURI===Rc?e.createElement(t):e.createElementNS(n,t)}}function MS(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function W1(t){var e=Os(t);return(e.local?MS:OS)(e)}function SS(){}function Dc(t){return t==null?SS:function(){return this.querySelector(t)}}function ES(t){typeof t!="function"&&(t=Dc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,a=r[i]=new Array(s),l,c,h=0;h<s;++h)(l=o[h])&&(c=t.call(l,l.__data__,h,o))&&("__data__"in l&&(c.__data__=l.__data__),a[h]=c);return new qe(r,this._parents)}function IS(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function AS(){return[]}function F1(t){return t==null?AS:function(){return this.querySelectorAll(t)}}function TS(t){return function(){return IS(t.apply(this,arguments))}}function kS(t){typeof t=="function"?t=TS(t):t=F1(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var s=e[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&(r.push(t.call(l,l.__data__,c,s)),i.push(l));return new qe(r,i)}function B1(t){return function(){return this.matches(t)}}function Y1(t){return function(e){return e.matches(t)}}var LS=Array.prototype.find;function zS(t){return function(){return LS.call(this.children,t)}}function HS(){return this.firstElementChild}function RS(t){return this.select(t==null?HS:zS(typeof t=="function"?t:Y1(t)))}var DS=Array.prototype.filter;function NS(){return Array.from(this.children)}function jS(t){return function(){return DS.call(this.children,t)}}function WS(t){return this.selectAll(t==null?NS:jS(typeof t=="function"?t:Y1(t)))}function FS(t){typeof t!="function"&&(t=B1(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,a=r[i]=[],l,c=0;c<s;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&a.push(l);return new qe(r,this._parents)}function V1(t){return new Array(t.length)}function BS(){return new qe(this._enter||this._groups.map(V1),this._parents)}function Ms(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Ms.prototype={constructor:Ms,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function YS(t){return function(){return t}}function VS(t,e,n,r,i,o){for(var s=0,a,l=e.length,c=o.length;s<c;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new Ms(t,o[s]);for(;s<l;++s)(a=e[s])&&(i[s]=a)}function XS(t,e,n,r,i,o,s){var a,l,c=new Map,h=e.length,u=o.length,f=new Array(h),p;for(a=0;a<h;++a)(l=e[a])&&(f[a]=p=s.call(l,l.__data__,a,e)+"",c.has(p)?i[a]=l:c.set(p,l));for(a=0;a<u;++a)p=s.call(t,o[a],a,o)+"",(l=c.get(p))?(r[a]=l,l.__data__=o[a],c.delete(p)):n[a]=new Ms(t,o[a]);for(a=0;a<h;++a)(l=e[a])&&c.get(f[a])===l&&(i[a]=l)}function GS(t){return t.__data__}function qS(t,e){if(!arguments.length)return Array.from(this,GS);var n=e?XS:VS,r=this._parents,i=this._groups;typeof t!="function"&&(t=YS(t));for(var o=i.length,s=new Array(o),a=new Array(o),l=new Array(o),c=0;c<o;++c){var h=r[c],u=i[c],f=u.length,p=US(t.call(h,h&&h.__data__,c,r)),g=p.length,y=a[c]=new Array(g),m=s[c]=new Array(g),x=l[c]=new Array(f);n(h,u,y,m,x,p,e);for(var v=0,b=0,w,_;v<g;++v)if(w=y[v]){for(v>=b&&(b=v+1);!(_=m[b])&&++b<g;);w._next=_||null}}return s=new qe(s,r),s._enter=a,s._exit=l,s}function US(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function ZS(){return new qe(this._exit||this._groups.map(V1),this._parents)}function KS(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function QS(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,s=Math.min(i,o),a=new Array(i),l=0;l<s;++l)for(var c=n[l],h=r[l],u=c.length,f=a[l]=new Array(u),p,g=0;g<u;++g)(p=c[g]||h[g])&&(f[g]=p);for(;l<i;++l)a[l]=n[l];return new qe(a,this._parents)}function JS(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],s;--i>=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function tE(t){t||(t=eE);function e(u,f){return u&&f?t(u.__data__,f.__data__):!u-!f}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var s=n[o],a=s.length,l=i[o]=new Array(a),c,h=0;h<a;++h)(c=s[h])&&(l[h]=c);l.sort(e)}return new qe(i,this._parents).order()}function eE(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function nE(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function rE(){return Array.from(this)}function iE(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var s=r[i];if(s)return s}return null}function oE(){let t=0;for(const e of this)++t;return t}function sE(){return!this.node()}function aE(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,s=i.length,a;o<s;++o)(a=i[o])&&t.call(a,a.__data__,o,i);return this}function lE(t){return function(){this.removeAttribute(t)}}function cE(t){return function(){this.removeAttributeNS(t.space,t.local)}}function hE(t,e){return function(){this.setAttribute(t,e)}}function dE(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function uE(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function fE(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function pE(t,e){var n=Os(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?cE:lE:typeof e=="function"?n.local?fE:uE:n.local?dE:hE)(n,e))}function X1(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function gE(t){return function(){this.style.removeProperty(t)}}function mE(t,e,n){return function(){this.style.setProperty(t,e,n)}}function yE(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function vE(t,e,n){return arguments.length>1?this.each((e==null?gE:typeof e=="function"?yE:mE)(t,e,n==null?"":n)):jr(this.node(),t)}function jr(t,e){return t.style.getPropertyValue(e)||X1(t).getComputedStyle(t,null).getPropertyValue(e)}function xE(t){return function(){delete this[t]}}function bE(t,e){return function(){this[t]=e}}function wE(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function _E(t,e){return arguments.length>1?this.each((e==null?xE:typeof e=="function"?wE:bE)(t,e)):this.node()[t]}function G1(t){return t.trim().split(/^|\s+/)}function Nc(t){return t.classList||new q1(t)}function q1(t){this._node=t,this._names=G1(t.getAttribute("class")||"")}q1.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function U1(t,e){for(var n=Nc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Z1(t,e){for(var n=Nc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function $E(t){return function(){U1(this,t)}}function PE(t){return function(){Z1(this,t)}}function CE(t,e){return function(){(e.apply(this,arguments)?U1:Z1)(this,t)}}function OE(t,e){var n=G1(t+"");if(arguments.length<2){for(var r=Nc(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?CE:e?$E:PE)(n,e))}function ME(){this.textContent=""}function SE(t){return function(){this.textContent=t}}function EE(t){return function(){var e=t.apply(this,arguments);this.textContent=e==null?"":e}}function IE(t){return arguments.length?this.each(t==null?ME:(typeof t=="function"?EE:SE)(t)):this.node().textContent}function AE(){this.innerHTML=""}function TE(t){return function(){this.innerHTML=t}}function kE(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e==null?"":e}}function LE(t){return arguments.length?this.each(t==null?AE:(typeof t=="function"?kE:TE)(t)):this.node().innerHTML}function zE(){this.nextSibling&&this.parentNode.appendChild(this)}function HE(){return this.each(zE)}function RE(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function DE(){return this.each(RE)}function NE(t){var e=typeof t=="function"?t:W1(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function jE(){return null}function WE(t,e){var n=typeof t=="function"?t:W1(t),r=e==null?jE:typeof e=="function"?e:Dc(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function FE(){var t=this.parentNode;t&&t.removeChild(this)}function BE(){return this.each(FE)}function YE(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function VE(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function XE(t){return this.select(t?VE:YE)}function GE(t){return arguments.length?this.property("__data__",t):this.node().__data__}function qE(t){return function(e){t.call(this,e,this.__data__)}}function UE(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function ZE(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function KE(t,e,n){return function(){var r=this.__on,i,o=qE(e);if(r){for(var s=0,a=r.length;s<a;++s)if((i=r[s]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function QE(t,e,n){var r=UE(t+""),i,o=r.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,c=a.length,h;l<c;++l)for(i=0,h=a[l];i<o;++i)if((s=r[i]).type===h.type&&s.name===h.name)return h.value}return}for(a=e?KE:ZE,i=0;i<o;++i)this.each(a(r[i],e,n));return this}function K1(t,e,n){var r=X1(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function JE(t,e){return function(){return K1(this,t,e)}}function tI(t,e){return function(){return K1(this,t,e.apply(this,arguments))}}function eI(t,e){return this.each((typeof e=="function"?tI:JE)(t,e))}function*nI(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,s;i<o;++i)(s=r[i])&&(yield s)}var rI=[null];function qe(t,e){this._groups=t,this._parents=e}function Ri(){return new qe([[document.documentElement]],rI)}function iI(){return this}qe.prototype=Ri.prototype={constructor:qe,select:ES,selectAll:kS,selectChild:RS,selectChildren:WS,filter:FS,data:qS,enter:BS,exit:ZS,join:KS,merge:QS,selection:iI,order:JS,sort:tE,call:nE,nodes:rE,node:iE,size:oE,empty:sE,each:aE,attr:pE,style:vE,property:_E,classed:OE,text:IE,html:LE,raise:HE,lower:DE,append:NE,insert:WE,remove:BE,clone:XE,datum:GE,on:QE,dispatch:eI,[Symbol.iterator]:nI};function jc(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Q1(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Di(){}var Ni=.7,Ss=1/Ni,Wr="\\s*([+-]?\\d+)\\s*",ji="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",cn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",oI=/^#([0-9a-f]{3,8})$/,sI=new RegExp(`^rgb\\(${Wr},${Wr},${Wr}\\)$`),aI=new RegExp(`^rgb\\(${cn},${cn},${cn}\\)$`),lI=new RegExp(`^rgba\\(${Wr},${Wr},${Wr},${ji}\\)$`),cI=new RegExp(`^rgba\\(${cn},${cn},${cn},${ji}\\)$`),hI=new RegExp(`^hsl\\(${ji},${cn},${cn}\\)$`),dI=new RegExp(`^hsla\\(${ji},${cn},${cn},${ji}\\)$`),J1={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};jc(Di,lr,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:tm,formatHex:tm,formatHex8:uI,formatHsl:fI,formatRgb:em,toString:em});function tm(){return this.rgb().formatHex()}function uI(){return this.rgb().formatHex8()}function fI(){return sm(this).formatHsl()}function em(){return this.rgb().formatRgb()}function lr(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=oI.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?nm(e):n===3?new Le(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Es(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Es(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=sI.exec(t))?new Le(e[1],e[2],e[3],1):(e=aI.exec(t))?new Le(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=lI.exec(t))?Es(e[1],e[2],e[3],e[4]):(e=cI.exec(t))?Es(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=hI.exec(t))?om(e[1],e[2]/100,e[3]/100,1):(e=dI.exec(t))?om(e[1],e[2]/100,e[3]/100,e[4]):J1.hasOwnProperty(t)?nm(J1[t]):t==="transparent"?new Le(NaN,NaN,NaN,0):null}function nm(t){return new Le(t>>16&255,t>>8&255,t&255,1)}function Es(t,e,n,r){return r<=0&&(t=e=n=NaN),new Le(t,e,n,r)}function pI(t){return t instanceof Di||(t=lr(t)),t?(t=t.rgb(),new Le(t.r,t.g,t.b,t.opacity)):new Le}function Wc(t,e,n,r){return arguments.length===1?pI(t):new Le(t,e,n,r==null?1:r)}function Le(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}jc(Le,Wc,Q1(Di,{brighter(t){return t=t==null?Ss:Math.pow(Ss,t),new Le(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Ni:Math.pow(Ni,t),new Le(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Le(cr(this.r),cr(this.g),cr(this.b),Is(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:rm,formatHex:rm,formatHex8:gI,formatRgb:im,toString:im}));function rm(){return`#${hr(this.r)}${hr(this.g)}${hr(this.b)}`}function gI(){return`#${hr(this.r)}${hr(this.g)}${hr(this.b)}${hr((isNaN(this.opacity)?1:this.opacity)*255)}`}function im(){const t=Is(this.opacity);return`${t===1?"rgb(":"rgba("}${cr(this.r)}, ${cr(this.g)}, ${cr(this.b)}${t===1?")":`, ${t})`}`}function Is(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function cr(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function hr(t){return t=cr(t),(t<16?"0":"")+t.toString(16)}function om(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ue(t,e,n,r)}function sm(t){if(t instanceof Ue)return new Ue(t.h,t.s,t.l,t.opacity);if(t instanceof Di||(t=lr(t)),!t)return new Ue;if(t instanceof Ue)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),s=NaN,a=o-i,l=(o+i)/2;return a?(e===o?s=(n-r)/a+(n<r)*6:n===o?s=(r-e)/a+2:s=(e-n)/a+4,a/=l<.5?o+i:2-o-i,s*=60):a=l>0&&l<1?0:s,new Ue(s,a,l,t.opacity)}function mI(t,e,n,r){return arguments.length===1?sm(t):new Ue(t,e,n,r==null?1:r)}function Ue(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}jc(Ue,mI,Q1(Di,{brighter(t){return t=t==null?Ss:Math.pow(Ss,t),new Ue(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Ni:Math.pow(Ni,t),new Ue(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Le(Fc(t>=240?t-240:t+120,i,r),Fc(t,i,r),Fc(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ue(am(this.h),As(this.s),As(this.l),Is(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Is(this.opacity);return`${t===1?"hsl(":"hsla("}${am(this.h)}, ${As(this.s)*100}%, ${As(this.l)*100}%${t===1?")":`, ${t})`}`}}));function am(t){return t=(t||0)%360,t<0?t+360:t}function As(t){return Math.max(0,Math.min(1,t||0))}function Fc(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Bc=t=>()=>t;function yI(t,e){return function(n){return t+n*e}}function vI(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function xI(t){return(t=+t)==1?lm:function(e,n){return n-e?vI(e,n,t):Bc(isNaN(e)?n:e)}}function lm(t,e){var n=e-t;return n?yI(t,n):Bc(isNaN(t)?e:t)}const Ts=(function t(e){var n=xI(e);function r(i,o){var s=n((i=Wc(i)).r,(o=Wc(o)).r),a=n(i.g,o.g),l=n(i.b,o.b),c=lm(i.opacity,o.opacity);return function(h){return i.r=s(h),i.g=a(h),i.b=l(h),i.opacity=c(h),i+""}}return r.gamma=t,r})(1);function bI(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function wI(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function _I(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),s;for(s=0;s<r;++s)i[s]=Xc(t[s],e[s]);for(;s<n;++s)o[s]=e[s];return function(a){for(s=0;s<r;++s)o[s]=i[s](a);return o}}function $I(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Ze(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function PI(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=Xc(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Yc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Vc=new RegExp(Yc.source,"g");function CI(t){return function(){return t}}function OI(t){return function(e){return t(e)+""}}function cm(t,e){var n=Yc.lastIndex=Vc.lastIndex=0,r,i,o,s=-1,a=[],l=[];for(t=t+"",e=e+"";(r=Yc.exec(t))&&(i=Vc.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,l.push({i:s,x:Ze(r,i)})),n=Vc.lastIndex;return n<e.length&&(o=e.slice(n),a[s]?a[s]+=o:a[++s]=o),a.length<2?l[0]?OI(l[0].x):CI(e):(e=l.length,function(c){for(var h=0,u;h<e;++h)a[(u=l[h]).i]=u.x(c);return a.join("")})}function Xc(t,e){var n=typeof e,r;return e==null||n==="boolean"?Bc(e):(n==="number"?Ze:n==="string"?(r=lr(e))?(e=r,Ts):cm:e instanceof lr?Ts:e instanceof Date?$I:wI(e)?bI:Array.isArray(e)?_I:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?PI:Ze)(t,e)}function MI(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var hm=180/Math.PI,Gc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function dm(t,e,n,r,i,o){var s,a,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*n+e*r)&&(n-=t*l,r-=e*l),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,l/=a),t*r<e*n&&(t=-t,e=-e,l=-l,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*hm,skewX:Math.atan(l)*hm,scaleX:s,scaleY:a}}var ks;function SI(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Gc:dm(e.a,e.b,e.c,e.d,e.e,e.f)}function EI(t){return t==null||(ks||(ks=document.createElementNS("http://www.w3.org/2000/svg","g")),ks.setAttribute("transform",t),!(t=ks.transform.baseVal.consolidate()))?Gc:(t=t.matrix,dm(t.a,t.b,t.c,t.d,t.e,t.f))}function um(t,e,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,h,u,f,p,g){if(c!==u||h!==f){var y=p.push("translate(",null,e,null,n);g.push({i:y-4,x:Ze(c,u)},{i:y-2,x:Ze(h,f)})}else(u||f)&&p.push("translate("+u+e+f+n)}function s(c,h,u,f){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),f.push({i:u.push(i(u)+"rotate(",null,r)-2,x:Ze(c,h)})):h&&u.push(i(u)+"rotate("+h+r)}function a(c,h,u,f){c!==h?f.push({i:u.push(i(u)+"skewX(",null,r)-2,x:Ze(c,h)}):h&&u.push(i(u)+"skewX("+h+r)}function l(c,h,u,f,p,g){if(c!==u||h!==f){var y=p.push(i(p)+"scale(",null,",",null,")");g.push({i:y-4,x:Ze(c,u)},{i:y-2,x:Ze(h,f)})}else(u!==1||f!==1)&&p.push(i(p)+"scale("+u+","+f+")")}return function(c,h){var u=[],f=[];return c=t(c),h=t(h),o(c.translateX,c.translateY,h.translateX,h.translateY,u,f),s(c.rotate,h.rotate,u,f),a(c.skewX,h.skewX,u,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,f),c=h=null,function(p){for(var g=-1,y=f.length,m;++g<y;)u[(m=f[g]).i]=m.x(p);return u.join("")}}}var II=um(SI,"px, ","px)","deg)"),AI=um(EI,", ",")",")"),Fr=0,Wi=0,Fi=0,fm=1e3,Ls,Bi,zs=0,dr=0,Hs=0,Yi=typeof performance=="object"&&performance.now?performance:Date,pm=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function qc(){return dr||(pm(TI),dr=Yi.now()+Hs)}function TI(){dr=0}function Rs(){this._call=this._time=this._next=null}Rs.prototype=Uc.prototype={constructor:Rs,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?qc():+n)+(e==null?0:+e),!this._next&&Bi!==this&&(Bi?Bi._next=this:Ls=this,Bi=this),this._call=t,this._time=n,Zc()},stop:function(){this._call&&(this._call=null,this._time=1/0,Zc())}};function Uc(t,e,n){var r=new Rs;return r.restart(t,e,n),r}function kI(){qc(),++Fr;for(var t=Ls,e;t;)(e=dr-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Fr}function gm(){dr=(zs=Yi.now())+Hs,Fr=Wi=0;try{kI()}finally{Fr=0,zI(),dr=0}}function LI(){var t=Yi.now(),e=t-zs;e>fm&&(Hs-=e,zs=t)}function zI(){for(var t,e=Ls,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Ls=n);Bi=t,Zc(r)}function Zc(t){if(!Fr){Wi&&(Wi=clearTimeout(Wi));var e=t-dr;e>24?(t<1/0&&(Wi=setTimeout(gm,t-Yi.now()-Hs)),Fi&&(Fi=clearInterval(Fi))):(Fi||(zs=Yi.now(),Fi=setInterval(LI,fm)),Fr=1,pm(gm))}}function mm(t,e,n){var r=new Rs;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var HI=Hc("start","end","cancel","interrupt"),RI=[],ym=0,vm=1,Kc=2,Ds=3,xm=4,Qc=5,Ns=6;function js(t,e,n,r,i,o){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;DI(t,n,{name:e,index:r,group:i,on:HI,tween:RI,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:ym})}function Jc(t,e){var n=Ke(t,e);if(n.state>ym)throw new Error("too late; already scheduled");return n}function hn(t,e){var n=Ke(t,e);if(n.state>Ds)throw new Error("too late; already running");return n}function Ke(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function DI(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Uc(o,0,n.time);function o(c){n.state=vm,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)}function s(c){var h,u,f,p;if(n.state!==vm)return l();for(h in r)if(p=r[h],p.name===n.name){if(p.state===Ds)return mm(s);p.state===xm?(p.state=Ns,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[h]):+h<e&&(p.state=Ns,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[h])}if(mm(function(){n.state===Ds&&(n.state=xm,n.timer.restart(a,n.delay,n.time),a(c))}),n.state=Kc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Kc){for(n.state=Ds,i=new Array(f=n.tween.length),h=0,u=-1;h<f;++h)(p=n.tween[h].value.call(t,t.__data__,n.index,n.group))&&(i[++u]=p);i.length=u+1}}function a(c){for(var h=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=Qc,1),u=-1,f=i.length;++u<f;)i[u].call(t,h);n.state===Qc&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){n.state=Ns,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function NI(t,e){var n=t.__transition,r,i,o=!0,s;if(n){e=e==null?null:e+"";for(s in n){if((r=n[s]).name!==e){o=!1;continue}i=r.state>Kc&&r.state<Qc,r.state=Ns,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[s]}o&&delete t.__transition}}function jI(t){return this.each(function(){NI(this,t)})}function WI(t,e){var n,r;return function(){var i=hn(this,t),o=i.tween;if(o!==n){r=n=o;for(var s=0,a=r.length;s<a;++s)if(r[s].name===e){r=r.slice(),r.splice(s,1);break}}i.tween=r}}function FI(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=hn(this,t),s=o.tween;if(s!==r){i=(r=s).slice();for(var a={name:e,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===e){i[l]=a;break}l===c&&i.push(a)}o.tween=i}}function BI(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Ke(this.node(),n).tween,i=0,o=r.length,s;i<o;++i)if((s=r[i]).name===t)return s.value;return null}return this.each((e==null?WI:FI)(n,t,e))}function th(t,e,n){var r=t._id;return t.each(function(){var i=hn(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Ke(i,r).value[e]}}function bm(t,e){var n;return(typeof e=="number"?Ze:e instanceof lr?Ts:(n=lr(e))?(e=n,Ts):cm)(t,e)}function YI(t){return function(){this.removeAttribute(t)}}function VI(t){return function(){this.removeAttributeNS(t.space,t.local)}}function XI(t,e,n){var r,i=n+"",o;return function(){var s=this.getAttribute(t);return s===i?null:s===r?o:o=e(r=s,n)}}function GI(t,e,n){var r,i=n+"",o;return function(){var s=this.getAttributeNS(t.space,t.local);return s===i?null:s===r?o:o=e(r=s,n)}}function qI(t,e,n){var r,i,o;return function(){var s,a=n(this),l;return a==null?void this.removeAttribute(t):(s=this.getAttribute(t),l=a+"",s===l?null:s===r&&l===i?o:(i=l,o=e(r=s,a)))}}function UI(t,e,n){var r,i,o;return function(){var s,a=n(this),l;return a==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),l=a+"",s===l?null:s===r&&l===i?o:(i=l,o=e(r=s,a)))}}function ZI(t,e){var n=Os(t),r=n==="transform"?AI:bm;return this.attrTween(t,typeof e=="function"?(n.local?UI:qI)(n,r,th(this,"attr."+t,e)):e==null?(n.local?VI:YI)(n):(n.local?GI:XI)(n,r,e))}function KI(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function QI(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function JI(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&QI(t,o)),n}return i._value=e,i}function tA(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&KI(t,o)),n}return i._value=e,i}function eA(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=Os(t);return this.tween(n,(r.local?JI:tA)(r,e))}function nA(t,e){return function(){Jc(this,t).delay=+e.apply(this,arguments)}}function rA(t,e){return e=+e,function(){Jc(this,t).delay=e}}function iA(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?nA:rA)(e,t)):Ke(this.node(),e).delay}function oA(t,e){return function(){hn(this,t).duration=+e.apply(this,arguments)}}function sA(t,e){return e=+e,function(){hn(this,t).duration=e}}function aA(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?oA:sA)(e,t)):Ke(this.node(),e).duration}function lA(t,e){if(typeof e!="function")throw new Error;return function(){hn(this,t).ease=e}}function cA(t){var e=this._id;return arguments.length?this.each(lA(e,t)):Ke(this.node(),e).ease}function hA(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;hn(this,t).ease=n}}function dA(t){if(typeof t!="function")throw new Error;return this.each(hA(this._id,t))}function uA(t){typeof t!="function"&&(t=B1(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,a=r[i]=[],l,c=0;c<s;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&a.push(l);return new _n(r,this._parents,this._name,this._id)}function fA(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),s=new Array(r),a=0;a<o;++a)for(var l=e[a],c=n[a],h=l.length,u=s[a]=new Array(h),f,p=0;p<h;++p)(f=l[p]||c[p])&&(u[p]=f);for(;a<r;++a)s[a]=e[a];return new _n(s,this._parents,this._name,this._id)}function pA(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function gA(t,e,n){var r,i,o=pA(e)?Jc:hn;return function(){var s=o(this,t),a=s.on;a!==r&&(i=(r=a).copy()).on(e,n),s.on=i}}function mA(t,e){var n=this._id;return arguments.length<2?Ke(this.node(),n).on.on(t):this.each(gA(n,t,e))}function yA(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function vA(){return this.on("end.remove",yA(this._id))}function xA(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Dc(t));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s)for(var a=r[s],l=a.length,c=o[s]=new Array(l),h,u,f=0;f<l;++f)(h=a[f])&&(u=t.call(h,h.__data__,f,a))&&("__data__"in h&&(u.__data__=h.__data__),c[f]=u,js(c[f],e,n,f,c,Ke(h,n)));return new _n(o,this._parents,e,n)}function bA(t){var e=this._name,n=this._id;typeof t!="function"&&(t=F1(t));for(var r=this._groups,i=r.length,o=[],s=[],a=0;a<i;++a)for(var l=r[a],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var f=t.call(h,h.__data__,u,l),p,g=Ke(h,n),y=0,m=f.length;y<m;++y)(p=f[y])&&js(p,e,n,y,f,g);o.push(f),s.push(h)}return new _n(o,s,e,n)}var wA=Ri.prototype.constructor;function _A(){return new wA(this._groups,this._parents)}function $A(t,e){var n,r,i;return function(){var o=jr(this,t),s=(this.style.removeProperty(t),jr(this,t));return o===s?null:o===n&&s===r?i:i=e(n=o,r=s)}}function wm(t){return function(){this.style.removeProperty(t)}}function PA(t,e,n){var r,i=n+"",o;return function(){var s=jr(this,t);return s===i?null:s===r?o:o=e(r=s,n)}}function CA(t,e,n){var r,i,o;return function(){var s=jr(this,t),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(t),jr(this,t))),s===l?null:s===r&&l===i?o:(i=l,o=e(r=s,a))}}function OA(t,e){var n,r,i,o="style."+e,s="end."+o,a;return function(){var l=hn(this,t),c=l.on,h=l.value[o]==null?a||(a=wm(e)):void 0;(c!==n||i!==h)&&(r=(n=c).copy()).on(s,i=h),l.on=r}}function MA(t,e,n){var r=(t+="")=="transform"?II:bm;return e==null?this.styleTween(t,$A(t,r)).on("end.style."+t,wm(t)):typeof e=="function"?this.styleTween(t,CA(t,r,th(this,"style."+t,e))).each(OA(this._id,t)):this.styleTween(t,PA(t,r,e),n).on("end.style."+t,null)}function SA(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function EA(t,e,n){var r,i;function o(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&SA(t,s,n)),r}return o._value=e,o}function IA(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,EA(t,e,n==null?"":n))}function AA(t){return function(){this.textContent=t}}function TA(t){return function(){var e=t(this);this.textContent=e==null?"":e}}function kA(t){return this.tween("text",typeof t=="function"?TA(th(this,"text",t)):AA(t==null?"":t+""))}function LA(t){return function(e){this.textContent=t.call(this,e)}}function zA(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&LA(i)),e}return r._value=t,r}function HA(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,zA(t))}function RA(){for(var t=this._name,e=this._id,n=_m(),r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],a=s.length,l,c=0;c<a;++c)if(l=s[c]){var h=Ke(l,e);js(l,t,n,c,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new _n(r,this._parents,t,n)}function DA(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,s){var a={value:s},l={value:function(){--i===0&&o()}};n.each(function(){var c=hn(this,r),h=c.on;h!==t&&(e=(t=h).copy(),e._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),c.on=e}),i===0&&o()})}var NA=0;function _n(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function _m(){return++NA}var $n=Ri.prototype;_n.prototype={constructor:_n,select:xA,selectAll:bA,selectChild:$n.selectChild,selectChildren:$n.selectChildren,filter:uA,merge:fA,selection:_A,transition:RA,call:$n.call,nodes:$n.nodes,node:$n.node,size:$n.size,empty:$n.empty,each:$n.each,on:mA,attr:ZI,attrTween:eA,style:MA,styleTween:IA,text:kA,textTween:HA,remove:vA,tween:BI,delay:iA,duration:aA,ease:cA,easeVarying:dA,end:DA,[Symbol.iterator]:$n[Symbol.iterator]};function jA(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var WA={time:null,delay:0,duration:250,ease:jA};function FA(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function BA(t){var e,n;t instanceof _n?(e=t._id,t=t._name):(e=_m(),(n=WA).time=qc(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&js(l,t,e,c,s,n||FA(l,e));return new _n(r,this._parents,t,e)}Ri.prototype.interrupt=jI,Ri.prototype.transition=BA;const eh=Math.PI,nh=2*eh,ur=1e-6,YA=nh-ur;function $m(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function VA(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return $m;const n=no(10,e);return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class XA{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?$m:VA(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,o,s){this._append`C${+e},${+n},${+r},${+i},${this._x1=+o},${this._y1=+s}`}arcTo(e,n,r,i,o){if(e=+e,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,a=this._y1,l=r-e,c=i-n,h=s-e,u=a-n,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(f>ur)if(!(Math.abs(u*l-c*h)>ur)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-s,g=i-a,y=l*l+c*c,m=p*p+g*g,x=Math.sqrt(y),v=Math.sqrt(f),b=o*Math.tan((eh-Math.acos((y+f-m)/(2*x*v)))/2),w=b/v,_=b/x;Math.abs(w-1)>ur&&this._append`L${e+w*h},${n+w*u}`,this._append`A${o},${o},0,0,${+(u*p>h*g)},${this._x1=e+_*l},${this._y1=n+_*c}`}}arc(e,n,r,i,o,s){if(e=+e,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let a=r*Math.cos(i),l=r*Math.sin(i),c=e+a,h=n+l,u=1^s,f=s?i-o:o-i;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>ur||Math.abs(this._y1-h)>ur)&&this._append`L${c},${h}`,r&&(f<0&&(f=f%nh+nh),f>YA?this._append`A${r},${r},0,1,${u},${e-a},${n-l}A${r},${r},0,1,${u},${this._x1=c},${this._y1=h}`:f>ur&&this._append`A${r},${r},0,${+(f>=eh)},${u},${this._x1=e+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function GA(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var o,s=n.length,a,l=0,c=0;for(o=0;o<s;++o)a=n[o],l+=a.x,c+=a.y;for(l=(l/s-t)*r,c=(c/s-e)*r,o=0;o<s;++o)a=n[o],a.x-=l,a.y-=c}return i.initialize=function(o){n=o},i.x=function(o){return arguments.length?(t=+o,i):t},i.y=function(o){return arguments.length?(e=+o,i):e},i.strength=function(o){return arguments.length?(r=+o,i):r},i}function qA(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return Pm(this.cover(e,n),e,n,t)}function Pm(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o=t._root,s={data:r},a=t._x0,l=t._y0,c=t._x1,h=t._y1,u,f,p,g,y,m,x,v;if(!o)return t._root=s,t;for(;o.length;)if((y=e>=(u=(a+c)/2))?a=u:c=u,(m=n>=(f=(l+h)/2))?l=f:h=f,i=o,!(o=o[x=m<<1|y]))return i[x]=s,t;if(p=+t._x.call(null,o.data),g=+t._y.call(null,o.data),e===p&&n===g)return s.next=o,i?i[x]=s:t._root=s,t;do i=i?i[x]=new Array(4):t._root=new Array(4),(y=e>=(u=(a+c)/2))?a=u:c=u,(m=n>=(f=(l+h)/2))?l=f:h=f;while((x=m<<1|y)===(v=(g>=f)<<1|p>=u));return i[v]=o,i[x]=s,t}function UA(t){var e,n,r=t.length,i,o,s=new Array(r),a=new Array(r),l=1/0,c=1/0,h=-1/0,u=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(s[n]=i,a[n]=o,i<l&&(l=i),i>h&&(h=i),o<c&&(c=o),o>u&&(u=o));if(l>h||c>u)return this;for(this.cover(l,c).cover(h,u),n=0;n<r;++n)Pm(this,s[n],a[n],t[n]);return this}function ZA(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var s=i-n||1,a=this._root,l,c;n>t||t>=i||r>e||e>=o;)switch(c=(e<r)<<1|t<n,l=new Array(4),l[c]=a,a=l,s*=2,c){case 0:i=n+s,o=r+s;break;case 1:n=i-s,o=r+s;break;case 2:i=n+s,r=o-s;break;case 3:n=i-s,r=o-s;break}this._root&&this._root.length&&(this._root=a)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function KA(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function QA(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Ee(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function JA(t,e,n){var r,i=this._x0,o=this._y0,s,a,l,c,h=this._x1,u=this._y1,f=[],p=this._root,g,y;for(p&&f.push(new Ee(p,i,o,h,u)),n==null?n=1/0:(i=t-n,o=e-n,h=t+n,u=e+n,n*=n);g=f.pop();)if(!(!(p=g.node)||(s=g.x0)>h||(a=g.y0)>u||(l=g.x1)<i||(c=g.y1)<o))if(p.length){var m=(s+l)/2,x=(a+c)/2;f.push(new Ee(p[3],m,x,l,c),new Ee(p[2],s,x,m,c),new Ee(p[1],m,a,l,x),new Ee(p[0],s,a,m,x)),(y=(e>=x)<<1|t>=m)&&(g=f[f.length-1],f[f.length-1]=f[f.length-1-y],f[f.length-1-y]=g)}else{var v=t-+this._x.call(null,p.data),b=e-+this._y.call(null,p.data),w=v*v+b*b;if(w<n){var _=Math.sqrt(n=w);i=t-_,o=e-_,h=t+_,u=e+_,r=p.data}}return r}function tT(t){if(isNaN(h=+this._x.call(null,t))||isNaN(u=+this._y.call(null,t)))return this;var e,n=this._root,r,i,o,s=this._x0,a=this._y0,l=this._x1,c=this._y1,h,u,f,p,g,y,m,x;if(!n)return this;if(n.length)for(;;){if((g=h>=(f=(s+l)/2))?s=f:l=f,(y=u>=(p=(a+c)/2))?a=p:c=p,e=n,!(n=n[m=y<<1|g]))return this;if(!n.length)break;(e[m+1&3]||e[m+2&3]||e[m+3&3])&&(r=e,x=m)}for(;n.data!==t;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):e?(o?e[m]=o:delete e[m],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(r?r[x]=n:this._root=n),this):(this._root=o,this)}function eT(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function nT(){return this._root}function rT(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function iT(t){var e=[],n,r=this._root,i,o,s,a,l;for(r&&e.push(new Ee(r,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(r=n.node,o=n.x0,s=n.y0,a=n.x1,l=n.y1)&&r.length){var c=(o+a)/2,h=(s+l)/2;(i=r[3])&&e.push(new Ee(i,c,h,a,l)),(i=r[2])&&e.push(new Ee(i,o,h,c,l)),(i=r[1])&&e.push(new Ee(i,c,s,a,h)),(i=r[0])&&e.push(new Ee(i,o,s,c,h))}return this}function oT(t){var e=[],n=[],r;for(this._root&&e.push(new Ee(this._root,this._x0,this._y0,this._x1,this._y1));r=e.pop();){var i=r.node;if(i.length){var o,s=r.x0,a=r.y0,l=r.x1,c=r.y1,h=(s+l)/2,u=(a+c)/2;(o=i[0])&&e.push(new Ee(o,s,a,h,u)),(o=i[1])&&e.push(new Ee(o,h,a,l,u)),(o=i[2])&&e.push(new Ee(o,s,u,h,c)),(o=i[3])&&e.push(new Ee(o,h,u,l,c))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function sT(t){return t[0]}function aT(t){return arguments.length?(this._x=t,this):this._x}function lT(t){return t[1]}function cT(t){return arguments.length?(this._y=t,this):this._y}function rh(t,e,n){var r=new ih(e==null?sT:e,n==null?lT:n,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function ih(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Cm(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Ie=rh.prototype=ih.prototype;Ie.copy=function(){var t=new ih(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,r;if(!e)return t;if(!e.length)return t._root=Cm(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var i=0;i<4;++i)(r=e.source[i])&&(r.length?n.push({source:r,target:e.target[i]=new Array(4)}):e.target[i]=Cm(r));return t},Ie.add=qA,Ie.addAll=UA,Ie.cover=ZA,Ie.data=KA,Ie.extent=QA,Ie.find=JA,Ie.remove=tT,Ie.removeAll=eT,Ie.root=nT,Ie.size=rT,Ie.visit=iT,Ie.visitAfter=oT,Ie.x=aT,Ie.y=cT;function fr(t){return function(){return t}}function Dn(t){return(t()-.5)*1e-6}function hT(t){return t.x+t.vx}function dT(t){return t.y+t.vy}function uT(t){var e,n,r,i=1,o=1;typeof t!="function"&&(t=fr(t==null?1:+t));function s(){for(var c,h=e.length,u,f,p,g,y,m,x=0;x<o;++x)for(u=rh(e,hT,dT).visitAfter(a),c=0;c<h;++c)f=e[c],y=n[f.index],m=y*y,p=f.x+f.vx,g=f.y+f.vy,u.visit(v);function v(b,w,_,$,P){var C=b.data,T=b.r,E=y+T;if(C){if(C.index>f.index){var S=p-C.x-C.vx,R=g-C.y-C.vy,O=S*S+R*R;O<E*E&&(S===0&&(S=Dn(r),O+=S*S),R===0&&(R=Dn(r),O+=R*R),O=(E-(O=Math.sqrt(O)))/O*i,f.vx+=(S*=O)*(E=(T*=T)/(m+T)),f.vy+=(R*=O)*E,C.vx-=S*(E=1-E),C.vy-=R*E)}return}return w>p+E||$<p-E||_>g+E||P<g-E}}function a(c){if(c.data)return c.r=n[c.data.index];for(var h=c.r=0;h<4;++h)c[h]&&c[h].r>c.r&&(c.r=c[h].r)}function l(){if(e){var c,h=e.length,u;for(n=new Array(h),c=0;c<h;++c)u=e[c],n[u.index]=+t(u,c,e)}}return s.initialize=function(c,h){e=c,r=h,l()},s.iterations=function(c){return arguments.length?(o=+c,s):o},s.strength=function(c){return arguments.length?(i=+c,s):i},s.radius=function(c){return arguments.length?(t=typeof c=="function"?c:fr(+c),l(),s):t},s}function fT(t){return t.index}function Om(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function pT(t){var e=fT,n=u,r,i=fr(30),o,s,a,l,c,h=1;t==null&&(t=[]);function u(m){return 1/Math.min(a[m.source.index],a[m.target.index])}function f(m){for(var x=0,v=t.length;x<h;++x)for(var b=0,w,_,$,P,C,T,E;b<v;++b)w=t[b],_=w.source,$=w.target,P=$.x+$.vx-_.x-_.vx||Dn(c),C=$.y+$.vy-_.y-_.vy||Dn(c),T=Math.sqrt(P*P+C*C),T=(T-o[b])/T*m*r[b],P*=T,C*=T,$.vx-=P*(E=l[b]),$.vy-=C*E,_.vx+=P*(E=1-E),_.vy+=C*E}function p(){if(s){var m,x=s.length,v=t.length,b=new Map(s.map((_,$)=>[e(_,$,s),_])),w;for(m=0,a=new Array(x);m<v;++m)w=t[m],w.index=m,typeof w.source!="object"&&(w.source=Om(b,w.source)),typeof w.target!="object"&&(w.target=Om(b,w.target)),a[w.source.index]=(a[w.source.index]||0)+1,a[w.target.index]=(a[w.target.index]||0)+1;for(m=0,l=new Array(v);m<v;++m)w=t[m],l[m]=a[w.source.index]/(a[w.source.index]+a[w.target.index]);r=new Array(v),g(),o=new Array(v),y()}}function g(){if(s)for(var m=0,x=t.length;m<x;++m)r[m]=+n(t[m],m,t)}function y(){if(s)for(var m=0,x=t.length;m<x;++m)o[m]=+i(t[m],m,t)}return f.initialize=function(m,x){s=m,c=x,p()},f.links=function(m){return arguments.length?(t=m,p(),f):t},f.id=function(m){return arguments.length?(e=m,f):e},f.iterations=function(m){return arguments.length?(h=+m,f):h},f.strength=function(m){return arguments.length?(n=typeof m=="function"?m:fr(+m),g(),f):n},f.distance=function(m){return arguments.length?(i=typeof m=="function"?m:fr(+m),y(),f):i},f}const gT=1664525,mT=1013904223,Mm=4294967296;function yT(){let t=1;return()=>(t=(gT*t+mT)%Mm)/Mm}function vT(t){return t.x}function xT(t){return t.y}var bT=10,wT=Math.PI*(3-Math.sqrt(5));function _T(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,s=.6,a=new Map,l=Uc(u),c=Hc("tick","end"),h=yT();t==null&&(t=[]);function u(){f(),c.call("tick",e),n<r&&(l.stop(),c.call("end",e))}function f(y){var m,x=t.length,v;y===void 0&&(y=1);for(var b=0;b<y;++b)for(n+=(o-n)*i,a.forEach(function(w){w(n)}),m=0;m<x;++m)v=t[m],v.fx==null?v.x+=v.vx*=s:(v.x=v.fx,v.vx=0),v.fy==null?v.y+=v.vy*=s:(v.y=v.fy,v.vy=0);return e}function p(){for(var y=0,m=t.length,x;y<m;++y){if(x=t[y],x.index=y,x.fx!=null&&(x.x=x.fx),x.fy!=null&&(x.y=x.fy),isNaN(x.x)||isNaN(x.y)){var v=bT*Math.sqrt(.5+y),b=y*wT;x.x=v*Math.cos(b),x.y=v*Math.sin(b)}(isNaN(x.vx)||isNaN(x.vy))&&(x.vx=x.vy=0)}}function g(y){return y.initialize&&y.initialize(t,h),y}return p(),e={tick:f,restart:function(){return l.restart(u),e},stop:function(){return l.stop(),e},nodes:function(y){return arguments.length?(t=y,p(),a.forEach(g),e):t},alpha:function(y){return arguments.length?(n=+y,e):n},alphaMin:function(y){return arguments.length?(r=+y,e):r},alphaDecay:function(y){return arguments.length?(i=+y,e):+i},alphaTarget:function(y){return arguments.length?(o=+y,e):o},velocityDecay:function(y){return arguments.length?(s=1-y,e):1-s},randomSource:function(y){return arguments.length?(h=y,a.forEach(g),e):h},force:function(y,m){return arguments.length>1?(m==null?a.delete(y):a.set(y,g(m)),e):a.get(y)},find:function(y,m,x){var v=0,b=t.length,w,_,$,P,C;for(x==null?x=1/0:x*=x,v=0;v<b;++v)P=t[v],w=y-P.x,_=m-P.y,$=w*w+_*_,$<x&&(C=P,x=$);return C},on:function(y,m){return arguments.length>1?(c.on(y,m),e):c.on(y)}}}function $T(){var t,e,n,r,i=fr(-30),o,s=1,a=1/0,l=.81;function c(p){var g,y=t.length,m=rh(t,vT,xT).visitAfter(u);for(r=p,g=0;g<y;++g)e=t[g],m.visit(f)}function h(){if(t){var p,g=t.length,y;for(o=new Array(g),p=0;p<g;++p)y=t[p],o[y.index]=+i(y,p,t)}}function u(p){var g=0,y,m,x=0,v,b,w;if(p.length){for(v=b=w=0;w<4;++w)(y=p[w])&&(m=Math.abs(y.value))&&(g+=y.value,x+=m,v+=m*y.x,b+=m*y.y);p.x=v/x,p.y=b/x}else{y=p,y.x=y.data.x,y.y=y.data.y;do g+=o[y.data.index];while(y=y.next)}p.value=g}function f(p,g,y,m){if(!p.value)return!0;var x=p.x-e.x,v=p.y-e.y,b=m-g,w=x*x+v*v;if(b*b/l<w)return w<a&&(x===0&&(x=Dn(n),w+=x*x),v===0&&(v=Dn(n),w+=v*v),w<s&&(w=Math.sqrt(s*w)),e.vx+=x*p.value*r/w,e.vy+=v*p.value*r/w),!0;if(p.length||w>=a)return;(p.data!==e||p.next)&&(x===0&&(x=Dn(n),w+=x*x),v===0&&(v=Dn(n),w+=v*v),w<s&&(w=Math.sqrt(s*w)));do p.data!==e&&(b=o[p.data.index]*r/w,e.vx+=x*b,e.vy+=v*b);while(p=p.next)}return c.initialize=function(p,g){t=p,n=g,h()},c.strength=function(p){return arguments.length?(i=typeof p=="function"?p:fr(+p),h(),c):i},c.distanceMin=function(p){return arguments.length?(s=p*p,c):Math.sqrt(s)},c.distanceMax=function(p){return arguments.length?(a=p*p,c):Math.sqrt(a)},c.theta=function(p){return arguments.length?(l=p*p,c):Math.sqrt(l)},c}function PT(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Ws(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Br(t){return t=Ws(Math.abs(t)),t?t[1]:NaN}function CT(t,e){return function(n,r){for(var i=n.length,o=[],s=0,a=t[0],l=0;i>0&&a>0&&(l+a+1>r&&(a=Math.max(1,r-l)),o.push(n.substring(i-=a,i+a)),!((l+=a+1)>r));)a=t[s=(s+1)%t.length];return o.reverse().join(e)}}function OT(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var MT=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Fs(t){if(!(e=MT.exec(t)))throw new Error("invalid format: "+t);var e;return new oh({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Fs.prototype=oh.prototype;function oh(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}oh.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function ST(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var Sm;function ET(t,e){var n=Ws(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Sm=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Ws(t,Math.max(0,e+o-1))[0]}function Em(t,e){var n=Ws(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const Im={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:PT,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Em(t*100,e),r:Em,s:ET,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Am(t){return t}var Tm=Array.prototype.map,km=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function IT(t){var e=t.grouping===void 0||t.thousands===void 0?Am:CT(Tm.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?Am:OT(Tm.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",a=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function c(u){u=Fs(u);var f=u.fill,p=u.align,g=u.sign,y=u.symbol,m=u.zero,x=u.width,v=u.comma,b=u.precision,w=u.trim,_=u.type;_==="n"?(v=!0,_="g"):Im[_]||(b===void 0&&(b=12),w=!0,_="g"),(m||f==="0"&&p==="=")&&(m=!0,f="0",p="=");var $=y==="$"?n:y==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",P=y==="$"?r:/[%p]/.test(_)?s:"",C=Im[_],T=/[defgprs%]/.test(_);b=b===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function E(S){var R=$,O=P,A,F,L;if(_==="c")O=C(S)+O,S="";else{S=+S;var D=S<0||1/S<0;if(S=isNaN(S)?l:C(Math.abs(S),b),w&&(S=ST(S)),D&&+S==0&&g!=="+"&&(D=!1),R=(D?g==="("?g:a:g==="-"||g==="("?"":g)+R,O=(_==="s"?km[8+Sm/3]:"")+O+(D&&g==="("?")":""),T){for(A=-1,F=S.length;++A<F;)if(L=S.charCodeAt(A),48>L||L>57){O=(L===46?i+S.slice(A+1):S.slice(A))+O,S=S.slice(0,A);break}}}v&&!m&&(S=e(S,1/0));var k=R.length+S.length+O.length,N=k<x?new Array(x-k+1).join(f):"";switch(v&&m&&(S=e(N+S,N.length?x-O.length:1/0),N=""),p){case"<":S=R+S+O+N;break;case"=":S=R+N+S+O;break;case"^":S=N.slice(0,k=N.length>>1)+R+S+O+N.slice(k);break;default:S=N+R+S+O;break}return o(S)}return E.toString=function(){return u+""},E}function h(u,f){var p=c((u=Fs(u),u.type="f",u)),g=Math.max(-8,Math.min(8,Math.floor(Br(f)/3)))*3,y=Math.pow(10,-g),m=km[8+g/3];return function(x){return p(y*x)+m}}return{format:c,formatPrefix:h}}var Bs,Lm,zm;AT({thousands:",",grouping:[3],currency:["$",""]});function AT(t){return Bs=IT(t),Lm=Bs.format,zm=Bs.formatPrefix,Bs}function TT(t){return Math.max(0,-Br(Math.abs(t)))}function kT(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Br(e)/3)))*3-Br(Math.abs(t)))}function LT(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Br(e)-Br(t))+1}function zT(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function HT(){return this.eachAfter(zT)}function RT(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function DT(t,e){for(var n=this,r=[n],i,o,s=-1;n=r.pop();)if(t.call(e,n,++s,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function NT(t,e){for(var n=this,r=[n],i=[],o,s,a,l=-1;n=r.pop();)if(i.push(n),o=n.children)for(s=0,a=o.length;s<a;++s)r.push(o[s]);for(;n=i.pop();)t.call(e,n,++l,this);return this}function jT(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function WT(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})}function FT(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function BT(t){for(var e=this,n=YT(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r}function YT(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}function VT(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function XT(){return Array.from(this)}function GT(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function qT(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*UT(){var t=this,e,n=[t],r,i,o;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function sh(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=QT)):e===void 0&&(e=KT);for(var n=new Vi(t),r,i=[n],o,s,a,l;r=i.pop();)if((s=e(r.data))&&(l=(s=Array.from(s)).length))for(r.children=s,a=l-1;a>=0;--a)i.push(o=s[a]=new Vi(s[a])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(tk)}function ZT(){return sh(this).eachBefore(JT)}function KT(t){return t.children}function QT(t){return Array.isArray(t)?t[1]:null}function JT(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function tk(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function Vi(t){this.data=t,this.depth=this.height=0,this.parent=null}Vi.prototype=sh.prototype={constructor:Vi,count:HT,each:RT,eachAfter:NT,eachBefore:DT,find:jT,sum:WT,sort:FT,path:BT,ancestors:VT,descendants:XT,leaves:GT,links:qT,copy:ZT,[Symbol.iterator]:UT};function ek(t,e){return t.parent===e.parent?1:2}function ah(t){var e=t.children;return e?e[0]:t.t}function lh(t){var e=t.children;return e?e[e.length-1]:t.t}function nk(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function rk(t){for(var e=0,n=0,r=t.children,i=r.length,o;--i>=0;)o=r[i],o.z+=e,o.m+=e,e+=o.s+(n+=o.c)}function ik(t,e,n){return t.a.parent===e.parent?t.a:n}function Ys(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}Ys.prototype=Object.create(Vi.prototype);function ok(t){for(var e=new Ys(t,0),n,r=[e],i,o,s,a;n=r.pop();)if(o=n._.children)for(n.children=new Array(a=o.length),s=a-1;s>=0;--s)r.push(i=n.children[s]=new Ys(o[s],s)),i.parent=n;return(e.parent=new Ys(null,0)).children=[e],e}function sk(){var t=ek,e=1,n=1,r=null;function i(c){var h=ok(c);if(h.eachAfter(o),h.parent.m=-h.z,h.eachBefore(s),r)c.eachBefore(l);else{var u=c,f=c,p=c;c.eachBefore(function(v){v.x<u.x&&(u=v),v.x>f.x&&(f=v),v.depth>p.depth&&(p=v)});var g=u===f?1:t(u,f)/2,y=g-u.x,m=e/(f.x+g+y),x=n/(p.depth||1);c.eachBefore(function(v){v.x=(v.x+y)*m,v.y=v.depth*x})}return c}function o(c){var h=c.children,u=c.parent.children,f=c.i?u[c.i-1]:null;if(h){rk(c);var p=(h[0].z+h[h.length-1].z)/2;f?(c.z=f.z+t(c._,f._),c.m=c.z-p):c.z=p}else f&&(c.z=f.z+t(c._,f._));c.parent.A=a(c,f,c.parent.A||u[0])}function s(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function a(c,h,u){if(h){for(var f=c,p=c,g=h,y=f.parent.children[0],m=f.m,x=p.m,v=g.m,b=y.m,w;g=lh(g),f=ah(f),g&&f;)y=ah(y),p=lh(p),p.a=c,w=g.z+v-f.z-m+t(g._,f._),w>0&&(nk(ik(g,c,u),c,w),m+=w,x+=w),v+=g.m,m+=f.m,b+=y.m,x+=p.m;g&&!lh(p)&&(p.t=g,p.m+=v-x),f&&!ah(y)&&(y.t=f,y.m+=m-b,u=c)}return u}function l(c){c.x*=e,c.y=c.depth*n}return i.separation=function(c){return arguments.length?(t=c,i):t},i.size=function(c){return arguments.length?(r=!1,e=+c[0],n=+c[1],i):r?null:[e,n]},i.nodeSize=function(c){return arguments.length?(r=!0,e=+c[0],n=+c[1],i):r?[e,n]:null},i}function ak(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function lk(t){return function(){return t}}function ck(t){return+t}var Hm=[0,1];function Yr(t){return t}function ch(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:lk(isNaN(e)?NaN:.5)}function hk(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function dk(t,e,n){var r=t[0],i=t[1],o=e[0],s=e[1];return i<r?(r=ch(i,r),o=n(s,o)):(r=ch(r,i),o=n(o,s)),function(a){return o(r(a))}}function uk(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),s=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<r;)i[s]=ch(t[s],t[s+1]),o[s]=n(e[s],e[s+1]);return function(a){var l=yS(t,a,1,r)-1;return o[l](i[l](a))}}function fk(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function pk(){var t=Hm,e=Hm,n=Xc,r,i,o,s=Yr,a,l,c;function h(){var f=Math.min(t.length,e.length);return s!==Yr&&(s=hk(t[0],t[f-1])),a=f>2?uk:dk,l=c=null,u}function u(f){return f==null||isNaN(f=+f)?o:(l||(l=a(t.map(r),e,n)))(r(s(f)))}return u.invert=function(f){return s(i((c||(c=a(e,t.map(r),Ze)))(f)))},u.domain=function(f){return arguments.length?(t=Array.from(f,ck),h()):t.slice()},u.range=function(f){return arguments.length?(e=Array.from(f),h()):e.slice()},u.rangeRound=function(f){return e=Array.from(f),n=MI,h()},u.clamp=function(f){return arguments.length?(s=f?!0:Yr,h()):s!==Yr},u.interpolate=function(f){return arguments.length?(n=f,h()):n},u.unknown=function(f){return arguments.length?(o=f,u):o},function(f,p){return r=f,i=p,h()}}function gk(){return pk()(Yr,Yr)}function mk(t,e,n,r){var i=_S(t,e,n),o;switch(r=Fs(r==null?",f":r),r.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=kT(i,s))&&(r.precision=o),zm(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=LT(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=TT(i))&&(r.precision=o-(r.type==="%")*2);break}}return Lm(r)}function yk(t){var e=t.domain;return t.ticks=function(n){var r=e();return wS(r[0],r[r.length-1],n==null?10:n)},t.tickFormat=function(n,r){var i=e();return mk(i[0],i[i.length-1],n==null?10:n,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,s=r[i],a=r[o],l,c,h=10;for(a<s&&(c=s,s=a,a=c,c=i,i=o,o=c);h-- >0;){if(c=zc(s,a,n),c===l)return r[i]=s,r[o]=a,e(r);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else if(c<0)s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c;else break;l=c}return t},t}function Xi(){var t=gk();return t.copy=function(){return fk(t,Xi())},ak.apply(t,arguments),yk(t)}function de(t){return function(){return t}}const Rm=Math.abs,Oe=Math.atan2,pr=Math.cos,vk=Math.max,hh=Math.min,dn=Math.sin,Vr=Math.sqrt,ze=1e-12,Gi=Math.PI,Vs=Gi/2,Xs=2*Gi;function xk(t){return t>1?0:t<-1?Gi:Math.acos(t)}function Dm(t){return t>=1?Vs:t<=-1?-Vs:Math.asin(t)}function Nm(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new XA(e)}function bk(t){return t.innerRadius}function wk(t){return t.outerRadius}function _k(t){return t.startAngle}function $k(t){return t.endAngle}function Pk(t){return t&&t.padAngle}function Ck(t,e,n,r,i,o,s,a){var l=n-t,c=r-e,h=s-i,u=a-o,f=u*l-h*c;if(!(f*f<ze))return f=(h*(e-o)-u*(t-i))/f,[t+f*l,e+f*c]}function Gs(t,e,n,r,i,o,s){var a=t-n,l=e-r,c=(s?o:-o)/Vr(a*a+l*l),h=c*l,u=-c*a,f=t+h,p=e+u,g=n+h,y=r+u,m=(f+g)/2,x=(p+y)/2,v=g-f,b=y-p,w=v*v+b*b,_=i-o,$=f*y-g*p,P=(b<0?-1:1)*Vr(vk(0,_*_*w-$*$)),C=($*b-v*P)/w,T=(-$*v-b*P)/w,E=($*b+v*P)/w,S=(-$*v+b*P)/w,R=C-m,O=T-x,A=E-m,F=S-x;return R*R+O*O>A*A+F*F&&(C=E,T=S),{cx:C,cy:T,x01:-h,y01:-u,x11:C*(i/_-1),y11:T*(i/_-1)}}function qi(){var t=bk,e=wk,n=de(0),r=null,i=_k,o=$k,s=Pk,a=null,l=Nm(c);function c(){var h,u,f=+t.apply(this,arguments),p=+e.apply(this,arguments),g=i.apply(this,arguments)-Vs,y=o.apply(this,arguments)-Vs,m=Rm(y-g),x=y>g;if(a||(a=h=l()),p<f&&(u=p,p=f,f=u),!(p>ze))a.moveTo(0,0);else if(m>Xs-ze)a.moveTo(p*pr(g),p*dn(g)),a.arc(0,0,p,g,y,!x),f>ze&&(a.moveTo(f*pr(y),f*dn(y)),a.arc(0,0,f,y,g,x));else{var v=g,b=y,w=g,_=y,$=m,P=m,C=s.apply(this,arguments)/2,T=C>ze&&(r?+r.apply(this,arguments):Vr(f*f+p*p)),E=hh(Rm(p-f)/2,+n.apply(this,arguments)),S=E,R=E,O,A;if(T>ze){var F=Dm(T/f*dn(C)),L=Dm(T/p*dn(C));($-=F*2)>ze?(F*=x?1:-1,w+=F,_-=F):($=0,w=_=(g+y)/2),(P-=L*2)>ze?(L*=x?1:-1,v+=L,b-=L):(P=0,v=b=(g+y)/2)}var D=p*pr(v),k=p*dn(v),N=f*pr(_),j=f*dn(_);if(E>ze){var X=p*pr(b),z=p*dn(b),M=f*pr(w),H=f*dn(w),B;if(m<Gi)if(B=Ck(D,k,M,H,X,z,N,j)){var q=D-B[0],V=k-B[1],G=X-B[0],Z=z-B[1],K=1/dn(xk((q*G+V*Z)/(Vr(q*q+V*V)*Vr(G*G+Z*Z)))/2),it=Vr(B[0]*B[0]+B[1]*B[1]);S=hh(E,(f-it)/(K-1)),R=hh(E,(p-it)/(K+1))}else S=R=0}P>ze?R>ze?(O=Gs(M,H,D,k,p,R,x),A=Gs(X,z,N,j,p,R,x),a.moveTo(O.cx+O.x01,O.cy+O.y01),R<E?a.arc(O.cx,O.cy,R,Oe(O.y01,O.x01),Oe(A.y01,A.x01),!x):(a.arc(O.cx,O.cy,R,Oe(O.y01,O.x01),Oe(O.y11,O.x11),!x),a.arc(0,0,p,Oe(O.cy+O.y11,O.cx+O.x11),Oe(A.cy+A.y11,A.cx+A.x11),!x),a.arc(A.cx,A.cy,R,Oe(A.y11,A.x11),Oe(A.y01,A.x01),!x))):(a.moveTo(D,k),a.arc(0,0,p,v,b,!x)):a.moveTo(D,k),!(f>ze)||!($>ze)?a.lineTo(N,j):S>ze?(O=Gs(N,j,X,z,f,-S,x),A=Gs(D,k,M,H,f,-S,x),a.lineTo(O.cx+O.x01,O.cy+O.y01),S<E?a.arc(O.cx,O.cy,S,Oe(O.y01,O.x01),Oe(A.y01,A.x01),!x):(a.arc(O.cx,O.cy,S,Oe(O.y01,O.x01),Oe(O.y11,O.x11),!x),a.arc(0,0,f,Oe(O.cy+O.y11,O.cx+O.x11),Oe(A.cy+A.y11,A.cx+A.x11),x),a.arc(A.cx,A.cy,S,Oe(A.y11,A.x11),Oe(A.y01,A.x01),!x))):a.arc(0,0,f,_,w,x)}if(a.closePath(),h)return a=null,h+""||null}return c.centroid=function(){var h=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,u=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Gi/2;return[pr(u)*h,dn(u)*h]},c.innerRadius=function(h){return arguments.length?(t=typeof h=="function"?h:de(+h),c):t},c.outerRadius=function(h){return arguments.length?(e=typeof h=="function"?h:de(+h),c):e},c.cornerRadius=function(h){return arguments.length?(n=typeof h=="function"?h:de(+h),c):n},c.padRadius=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:de(+h),c):r},c.startAngle=function(h){return arguments.length?(i=typeof h=="function"?h:de(+h),c):i},c.endAngle=function(h){return arguments.length?(o=typeof h=="function"?h:de(+h),c):o},c.padAngle=function(h){return arguments.length?(s=typeof h=="function"?h:de(+h),c):s},c.context=function(h){return arguments.length?(a=h==null?null:h,c):a},c}function jm(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Wm(t){this._context=t}Wm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Fm(t){return new Wm(t)}function Ok(t){return t[0]}function Mk(t){return t[1]}function Sk(t,e){var n=de(!0),r=null,i=Fm,o=null,s=Nm(a);t=typeof t=="function"?t:t===void 0?Ok:de(t),e=typeof e=="function"?e:e===void 0?Mk:de(e);function a(l){var c,h=(l=jm(l)).length,u,f=!1,p;for(r==null&&(o=i(p=s())),c=0;c<=h;++c)!(c<h&&n(u=l[c],c,l))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(u,c,l),+e(u,c,l));if(p)return o=null,p+""||null}return a.x=function(l){return arguments.length?(t=typeof l=="function"?l:de(+l),a):t},a.y=function(l){return arguments.length?(e=typeof l=="function"?l:de(+l),a):e},a.defined=function(l){return arguments.length?(n=typeof l=="function"?l:de(!!l),a):n},a.curve=function(l){return arguments.length?(i=l,r!=null&&(o=i(r)),a):i},a.context=function(l){return arguments.length?(l==null?r=o=null:o=i(r=l),a):r},a}function Ek(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Ik(t){return t}function Ak(){var t=Ik,e=Ek,n=null,r=de(0),i=de(Xs),o=de(0);function s(a){var l,c=(a=jm(a)).length,h,u,f=0,p=new Array(c),g=new Array(c),y=+r.apply(this,arguments),m=Math.min(Xs,Math.max(-Xs,i.apply(this,arguments)-y)),x,v=Math.min(Math.abs(m)/c,o.apply(this,arguments)),b=v*(m<0?-1:1),w;for(l=0;l<c;++l)(w=g[p[l]=l]=+t(a[l],l,a))>0&&(f+=w);for(e!=null?p.sort(function(_,$){return e(g[_],g[$])}):n!=null&&p.sort(function(_,$){return n(a[_],a[$])}),l=0,u=f?(m-c*b)/f:0;l<c;++l,y=x)h=p[l],w=g[h],x=y+(w>0?w*u:0)+b,g[h]={data:a[h],index:l,value:w,startAngle:y,endAngle:x,padAngle:v};return g}return s.value=function(a){return arguments.length?(t=typeof a=="function"?a:de(+a),s):t},s.sortValues=function(a){return arguments.length?(e=a,n=null,s):e},s.sort=function(a){return arguments.length?(n=a,e=null,s):n},s.startAngle=function(a){return arguments.length?(r=typeof a=="function"?a:de(+a),s):r},s.endAngle=function(a){return arguments.length?(i=typeof a=="function"?a:de(+a),s):i},s.padAngle=function(a){return arguments.length?(o=typeof a=="function"?a:de(+a),s):o},s}function Ui(t,e,n){this.k=t,this.x=e,this.y=n}Ui.prototype={constructor:Ui,scale:function(t){return t===1?this:new Ui(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Ui(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Ui.prototype;var Tk=Object.defineProperty,kk=Object.defineProperties,Lk=Object.getOwnPropertyDescriptors,Bm=Object.getOwnPropertySymbols,zk=Object.prototype.hasOwnProperty,Hk=Object.prototype.propertyIsEnumerable,Ym=(t,e,n)=>e in t?Tk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Rk=(t,e)=>{for(var n in e||(e={}))zk.call(e,n)&&Ym(t,n,e[n]);if(Bm)for(var n of Bm(e))Hk.call(e,n)&&Ym(t,n,e[n]);return t},Dk=(t,e)=>kk(t,Lk(e));const Vm=t=>{const[{datum:e,data:n,indexes:r,width:i=280,height:o=120,iconSize:s=32,gap:a=12,progressHeight:l=8,borderRadius:c=12,positionH:h="normal",themeColors:u,valueFormatter:f=F=>`${F}%`},p]=Zt(t,["width","height","iconSize","gap","progressHeight","borderRadius"]),g=e.value,y=g!=null?g:0,m=Math.max(...n.items.map(F=>{var L;return(L=F.value)!=null?L:0}),100),x=i-2*a,b=Xi().domain([0,m]).range([0,x])(y),w=`${u.colorPrimary}-progress`,_=`${u.colorPrimaryBg}-progress-bg`,$=et(d(At,{indexes:r})),P=a,C=h==="flipped"?i-a-s:a,T=P,E=h==="flipped"?a:s+2*a,S=i-s-3*a,R=T,O=o-a-l,A=g!==void 0;return I(Y,Dk(Rk({},p),{children:[I(jt,{children:[I("linearGradient",{id:w,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[d("stop",{offset:"0%",stopColor:u.colorPrimary}),d("stop",{offset:"100%",stopColor:lt.mix(u.colorPrimary,"#fff",20).toHexString()})]}),I("linearGradient",{id:_,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[d("stop",{offset:"0%",stopColor:u.colorPrimaryBg}),d("stop",{offset:"100%",stopColor:u.colorBg})]})]}),d(Ct,{x:0,y:0,width:i,height:o,fill:u.colorBgElevated,stroke:u.colorPrimaryBg,strokeWidth:1,rx:c,ry:c,"data-element-type":"shape"}),d(Pe,{indexes:r,x:C,y:T,size:s,fill:u.colorPrimary}),d(At,{indexes:r,x:E,y:R,width:S,alignHorizontal:h==="flipped"?"right":"left",alignVertical:"top",fontSize:16,fontWeight:"medium",fill:u.colorText,children:e.label}),A&&d(Ai,{indexes:r,x:E,y:R+$.height,width:S,alignHorizontal:h==="flipped"?"right":"left",alignVertical:"top",lineHeight:1,fontSize:24,fontWeight:"bold",fill:u.colorPrimary,value:y,formatter:f}),d(Jt,{indexes:r,x:E,y:R+$.height+(A?27:4),width:S,alignHorizontal:h==="flipped"?"right":"left",alignVertical:"top",fontSize:11,fill:u.colorTextSecondary,lineNumber:A?2:3,wordWrap:!0,children:e.desc}),d(Ct,{x:a,y:O,width:x,height:l,fill:`url(#${_})`,rx:l/2,ry:l/2,"data-element-type":"shape"}),d(Ct,{x:a,y:O,width:b,height:l,fill:`url(#${w})`,rx:l/2,ry:l/2,"data-element-type":"shape"})]}))};Kt("progress-card",{component:Vm,composites:["icon","label","value","desc"]});var Nk=Object.defineProperty,jk=Object.defineProperties,Wk=Object.getOwnPropertyDescriptors,Xm=Object.getOwnPropertySymbols,Fk=Object.prototype.hasOwnProperty,Bk=Object.prototype.propertyIsEnumerable,Gm=(t,e,n)=>e in t?Nk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Yk=(t,e)=>{for(var n in e||(e={}))Fk.call(e,n)&&Gm(t,n,e[n]);if(Xm)for(var n of Xm(e))Bk.call(e,n)&&Gm(t,n,e[n]);return t},Vk=(t,e)=>jk(t,Wk(e));const qm=t=>{const[{datum:e,indexes:n,width:r=280,height:i=120,iconSize:o=30,circleRadius:s=80,positionH:a="normal",positionV:l="normal",themeColors:c},h]=Zt(t,["width","height","iconSize","circleRadius"]),u=4*s/(3*Math.PI),f=2,p=4,g=28,y=20,m=y+20,x=y,v=8,b=35,w=40,_=30,$=String(n[0]+1).padStart(2,"0"),P=a==="flipped",C=l==="flipped",T=()=>P?{diagonalStartX:r-p,diagonalStartY:C?i-b:b,diagonalEndX:r-w,diagonalEndY:C?i-p:p,topLineStartX:r-w,topLineEndX:u,topLineY:C?i-p:p}:{diagonalStartX:p,diagonalStartY:C?i-b:b,diagonalEndX:w,diagonalEndY:C?i-p:p,topLineStartX:w,topLineEndX:r-u,topLineY:C?i-p:p},E=()=>{if(P){const D=s+10,k=r-D-w;return{valueX:r-_,contentX:D,contentWidth:k,circleX:0,circleY:C?0:i,iconX:u-o/2}}else return{valueX:0,contentX:w,contentWidth:r-w-s-10,circleX:r,circleY:C?0:i,iconX:r-u-o/2}},S=T(),R=E(),O=C?u-o/2:i-u-o/2,A=et(d(At,{indexes:n,width:R.contentWidth,children:e.label})),F=x+A.height+v,L=()=>{const{circleX:D,circleY:k}=R;return P?C?`M ${D} ${k} L ${D} ${k+s} A ${s} ${s} 0 0 0 ${D+s} ${k} Z`:`M ${D} ${k} L ${D} ${k-s} A ${s} ${s} 0 0 1 ${D+s} ${k} Z`:C?`M ${D} ${k} L ${D} ${k+s} A ${s} ${s} 0 0 1 ${D-s} ${k} Z`:`M ${D} ${k} L ${D} ${k-s} A ${s} ${s} 0 0 0 ${D-s} ${k} Z`};return I(Y,Vk(Yk({},h),{width:r,height:i,children:[I(le,{children:[d(yt,{d:`M ${S.diagonalStartX} ${S.diagonalStartY} L ${S.diagonalEndX} ${S.diagonalEndY}`,stroke:c.colorPrimary,strokeWidth:f,fill:"none"}),d(yt,{d:`M ${S.topLineStartX} ${S.topLineY} L ${S.topLineEndX} ${S.topLineY}`,stroke:c.colorPrimary,strokeWidth:f,fill:"none"}),d(Wt,{x:S.diagonalStartX-p,y:S.diagonalStartY-p,width:p*2,height:p*2,fill:c.colorPrimary}),d(Wt,{x:S.topLineEndX-p,y:S.topLineY-p,width:p*2,height:p*2,fill:c.colorPrimary})]}),I(Y,{children:[d(St,{x:R.valueX,y:m,fontSize:g,fontWeight:"bold",fill:c.colorPrimary,children:$}),d(yt,{d:L(),fill:c.colorPrimary,"data-element-type":"shape"}),e.icon&&d(Pe,{indexes:n,x:R.iconX,y:O,size:o,fill:c.colorWhite}),e.label&&d(At,{indexes:n,x:R.contentX,y:x,width:R.contentWidth,fontWeight:"bold",fill:c.colorText,alignHorizontal:P?"right":"left",children:e.label}),e.desc&&d(Jt,{indexes:n,x:R.contentX,y:F,width:R.contentWidth,fill:c.colorTextSecondary,alignHorizontal:P?"right":"left",children:e.desc})]})]}))};Kt("quarter-circular",{component:qm,composites:["icon","label","desc"]});var Xk=Object.defineProperty,Gk=Object.defineProperties,qk=Object.getOwnPropertyDescriptors,Um=Object.getOwnPropertySymbols,Uk=Object.prototype.hasOwnProperty,Zk=Object.prototype.propertyIsEnumerable,Zm=(t,e,n)=>e in t?Xk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Kk=(t,e)=>{for(var n in e||(e={}))Uk.call(e,n)&&Zm(t,n,e[n]);if(Um)for(var n of Um(e))Zk.call(e,n)&&Zm(t,n,e[n]);return t},Qk=(t,e)=>Gk(t,qk(e));const Km=t=>{const[{datum:e,indexes:n,width:r=150,height:i=150,iconSize:o=30,padding:s=20,borderRadius:a=16,positionH:l="center",positionV:c="middle",themeColors:h},u]=Zt(t,["width","height","iconSize","padding","borderRadius"]),f=r-s*2,p=s,g=s,y=l==="flipped"?r-s-o:l==="center"?(r-o)/2:p,m=g,x=m+o+8,v=et(d(At,{indexes:n,width:f,children:e.label})),b=l==="flipped"?r-s-f:l==="center"?s:p,w=x+v.height+4,_=b,$=a;let P="";return l==="center"&&c==="middle"?P=`
41
- M ${$} 0
42
- L ${r-$} 0
43
- Q ${r} 0 ${r} ${$}
44
- L ${r} ${i-$}
45
- Q ${r} ${i} ${r-$} ${i}
46
- L ${$} ${i}
47
- Q 0 ${i} 0 ${i-$}
48
- L 0 ${$}
49
- Q 0 0 ${$} 0
35
+ `,e.appendChild(r),r.offsetHeight;const i=r.getBoundingClientRect();e.removeChild(r),t=i.width===37&&i.height===19&&i.left!==0&&i.top!==0}catch(r){t=!1}if(!t)return!1;let n=!1;try{const r=document.createElement("canvas");r.width=100,r.height=50;const i=r.getContext("2d");if(!i)return!1;i.font="20px sans-serif";const o=i.measureText("Hello");n=typeof o.width=="number"&&o.width>0&&o.width<1e3}catch(r){n=!1}return n&&(Cb=n),n}let Lu=1.01;const eH=e=>{Lu=e};ML(kL);let Za=null,Qt=null;function tH(){return Za||(Za=document.createElement("canvas").getContext("2d"),Za)}function nH(){return document.body?Qt||(Qt=document.createElement("span"),Qt.style.position="absolute",Qt.style.top="-10000px",Qt.style.left="-10000px",Qt.style.visibility="hidden",Qt.style.pointerEvents="none",Qt.style.whiteSpace="pre",Qt.style.display="inline-block",Qt.style.padding="0",Qt.style.margin="0",document.body.appendChild(Qt),Qt):null}function rH(e,t){if(t==null)return e*1.4;if(typeof t=="string"){const n=t.trim();if(n.endsWith("px")){const r=Number.parseFloat(n);return Number.isFinite(r)?r:e*1.4}t=Number(n)}return typeof t!="number"||!Number.isFinite(t)?e*1.4:t>4?t:t*e}function iH(e,{fontFamily:t,fontSize:n,fontWeight:r,lineHeight:i}){const o=e.split(/\r?\n/),a=Cr(t),s=r||"normal",c=rH(n,i),l=tH();if(l)return l.font=`${s} ${n}px ${a}`,{width:o.reduce((f,g)=>{const y=l.measureText(g);return Math.max(f,y.width)},0),height:c*Math.max(o.length,1)};const u=nH();if(!u)return null;u.style.fontFamily=a,u.style.fontSize=`${n}px`,u.style.fontWeight=String(s),u.style.lineHeight=`${c}px`,u.textContent=e;const h=u.getBoundingClientRect();return{width:h.width,height:h.height}}function Ob(e="",t){var n;if(t.width&&t.height)return{width:t.width,height:t.height};if(typeof e!="string"&&typeof e!="number")return{width:0,height:0};const{fontFamily:r=fu,fontSize:i=14,fontWeight:o="normal",lineHeight:a=1.4}=t,s=e.toString(),c={fontFamily:r,fontSize:parseFloat(i.toString()),fontWeight:o,lineHeight:a},l=()=>TL(s,c),u=JN()&&(n=iH(s,c))!=null?n:l();return{width:Math.ceil(u.width*Lu),height:Math.ceil(u.height*Lu)}}function Se(e,t={}){const n=document.createElementNS("http://www.w3.org/2000/svg",e);return ut(n,t),n}function fi(e){const n=new DOMParser().parseFromString(e,"image/svg+xml");if(n.querySelector("parsererror"))throw new Error("Invalid SVG string");return n.documentElement}function ut(e,t){Object.entries(t).forEach(([n,r])=>{r==null?e.removeAttribute(n):e.setAttribute(n,r)})}function an(e,t,n=!0){return t.reduce((r,i)=>{const o=e.getAttribute(i);return(!n||o!==null&&o!==""&&o!==void 0)&&(r[i]=o),r},{})}function oH(e,t){t.forEach(n=>{e.removeAttribute(n)})}function pi(e,t){if(t(e)===!1)return;Array.from(e.children).forEach(r=>{pi(r,t)})}function Qa(e,t="infographic-defs"){const n=t?`defs#${t}`:"defs",r=e.querySelector(n);if(r)return r;const i=Se("defs");return t&&(i.id=t),e.prepend(i),i}var Sb=Object.getOwnPropertySymbols,aH=Object.prototype.hasOwnProperty,sH=Object.prototype.propertyIsEnumerable,cH=(e,t)=>{var n={};for(var r in e)aH.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Sb)for(var r of Sb(e))t.indexOf(r)<0&&sH.call(e,r)&&(n[r]=e[r]);return n};function Mr(e){return Ib(e)?e.querySelector("span"):null}function lH(e,t){const n=document.createElement("span");n.setAttribute("xmlns","http://www.w3.org/1999/xhtml");const r=Se("foreignObject",{overflow:"visible"});return r.appendChild(n),Mb(r,{textContent:e,attributes:t}),r}function Mb(e,t){const{textContent:n,attributes:r}=t;if(n!==void 0&&zu(e,n),!r)return;const i=Mr(e);let{width:o,height:a}=r;const s={};if(i){if(Object.assign(i.style,hH(r)),!o||!a){const f=n!=null?n:Ja(e),{fontFamily:g,fontSize:y,fontWeight:m,lineHeight:v}=i.style,b=y?parseFloat(String(y)):12,_=Ob(f,{fontFamily:g,fontSize:b,fontWeight:m,lineHeight:v.endsWith("px")?parseFloat(v):(parseFloat(v)||1.4)*b});!o&&!e.hasAttribute("width")&&(o=String(_.width)),!a&&!e.hasAttribute("height")&&(a=String(_.height))}const{"data-horizontal-align":h,"data-vertical-align":d}=r;Object.assign(i.style,uH(h,d))}const{id:c,x:l,y:u}=r;c&&(s.id=c),l!==void 0&&(s.x=String(l)),u!==void 0&&(s.y=String(u)),o!==void 0&&(s.width=String(o)),a!==void 0&&(s.height=String(a)),ut(e,s)}function uH(e,t){const n={width:"100%",height:"100%",display:"flex",flexWrap:"wrap",wordBreak:"break-word",whiteSpace:"pre-wrap"};switch(e){case"LEFT":n.textAlign="left",n.justifyContent="flex-start";break;case"CENTER":n.textAlign="center",n.justifyContent="center";break;case"RIGHT":n.textAlign="right",n.justifyContent="flex-end";break}switch(t){case"TOP":n.alignContent="flex-start",n.alignItems="flex-start";break;case"MIDDLE":n.alignContent="center",n.alignItems="center";break;case"BOTTOM":n.alignContent="flex-end",n.alignItems="flex-end";break}return n}function hH(e){const t=e,{x:n,y:r,width:i,height:o,["data-horizontal-align"]:a,["data-vertical-align"]:s,["font-size"]:c,["letter-spacing"]:l,["line-height"]:u,fill:h,["stroke-width"]:d,["text-anchor"]:f,["dominant-baseline"]:g,["font-family"]:y}=t,m=cH(t,["x","y","width","height","data-horizontal-align","data-vertical-align","font-size","letter-spacing","line-height","fill","stroke-width","text-anchor","dominant-baseline","font-family"]),v={overflow:"visible"};return h&&(v.color=h),Object.entries(m).forEach(([b,_])=>{v[jk(b)]=_}),c&&(v.fontSize=`${c}px`),u&&(v.lineHeight=typeof u=="string"&&u.endsWith("px")?u:+u),l&&(v.letterSpacing=`${l}px`),d&&(v.strokeWidth=`${d}px`),y&&(v.fontFamily=Cr(y)),v}function Ja(e){const t=Mr(e);return t&&(t.innerText||t.textContent)||""}function zu(e,t){const n=Mr(e);if(n)try{n.innerText=t}catch(r){n.textContent=t}}function Nu(e){const t=Mr(e);if(!t)return{};const{color:n,fontSize:r,fontFamily:i,justifyContent:o,alignContent:a,fontWeight:s}=t.style,[c,l]=dH(o,a),u={"data-horizontal-align":c,"data-vertical-align":l};return i&&(u["font-family"]=ci(i)),s&&(u["font-weight"]=s),r&&(u["font-size"]=String(parseInt(r))),n&&(u.fill=n),{attributes:u,textContent:Ja(e)}}function dH(e,t){let n="LEFT",r="TOP";switch(e){case"flex-start":n="LEFT";break;case"center":n="CENTER";break;case"flex-end":n="RIGHT";break}switch(t){case"flex-start":r="TOP";break;case"center":r="MIDDLE";break;case"flex-end":r="BOTTOM";break}return[n,r]}const Gt=(e,t)=>{var n;return((n=e==null?void 0:e.dataset)==null?void 0:n.elementType)===t},es=(e,t)=>e.tagName.toLowerCase()===t.toLowerCase(),fH=e=>Gt(e,"title"),pH=e=>Gt(e,"desc"),gH=e=>Gt(e,"shape"),mH=e=>Gt(e,"shapes-group"),yH=e=>Gt(e,"illus"),vH=e=>e instanceof SVGElement&&es(e,"text"),bH=e=>e instanceof SVGElement&&es(e,"g"),Hu=e=>Gt(e,"item-icon"),Eb=e=>Gt(e,"item-icon-group"),_H=e=>Gt(e,"item-label"),xH=e=>Gt(e,"item-desc"),wH=e=>Gt(e,"item-value"),PH=e=>Gt(e,"item-illus"),$H=e=>Gt(e,"edit-area"),CH=e=>Gt(e,"btns-group"),OH=e=>Gt(e,"rough-element"),SH=e=>Gt(e,"rough-volume");function Ib(e){return es(e,"foreignObject")}function MH(e){return es(e,"SPAN")}function jn(e){const t=Du(e);return[Ue.Title,Ue.Desc,Ue.ItemLabel,Ue.ItemDesc].includes(t)}function Ab(e){if(!e||!jn(e))return!1;const t=Mr(e);return t?t.hasAttribute("contenteditable"):!1}function EH(e){const t=e.tagName.toLowerCase();return["rect","circle","ellipse","line","polygon","polyline","path"].includes(t)}function ir(e){return Hu(e)||Eb(e)}function IH(e){let t=e;for(;t;){if(gi(t,ol))return!0;t=t.parentElement}return!1}function uo(e,t){e.setAttribute("data-element-type",t)}function gi(e,t){return e.querySelector(`[data-element-type="${t}"]`)}function Du(e){return ir(e)?Ue.ItemIcon:e.getAttribute("data-element-type")||Ue.Unknown}function AH(e){var t,n,r,i=e;function o(s,c){++t>i&&(r=n,a(1),++t),n[s]=c}function a(s){t=0,n=Object.create(null),s||(r=Object.create(null))}return a(),{clear:a,has:function(s){return n[s]!==void 0||r[s]!==void 0},get:function(s){var c=n[s];if(c!==void 0)return c;if((c=r[s])!==void 0)return o(s,c),c},set:function(s,c){n[s]!==void 0?n[s]=c:o(s,c)}}}var Tb=(e,t,n)=>new Promise((r,i)=>{var o=c=>{try{s(n.next(c))}catch(l){i(l)}},a=c=>{try{s(n.throw(c))}catch(l){i(l)}},s=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);s((n=n.apply(e,t)).next())});const kb=globalThis.fetch,qu=AH(1024),ju=new Map;function TH(e){const t=Array.from(e.headers.entries());return t.length===0?"":(t.sort(([n],[r])=>n.toLowerCase().localeCompare(r.toLowerCase())),t.map(([n,r])=>`${n.toLowerCase()}:${r}`).join("|"))}function kH(e){const t=TH(e);return t?`${e.method}:${e.url}:${t}`:`${e.method}:${e.url}`}function Rb(e){return new Response(e.body.slice(0),e.init)}function RH(e,t){return Tb(this,null,function*(){try{const n=yield kb(e),i={body:yield n.arrayBuffer(),init:{status:n.status,statusText:n.statusText,headers:Array.from(n.headers.entries())}};return n.ok&&qu.set(t,i),i}finally{ju.delete(t)}})}function ts(e,t){return Tb(this,null,function*(){const n=new Request(e,t);if(n.method!=="GET")return kb(n);const r=kH(n);if(qu.has(r))return Rb(qu.get(r));let i=ju.get(r);i||(i=RH(n,r),ju.set(r,i));const o=yield i;return Rb(o)})}function LH(e,t={title:"信息图标题",desc:"信息图描述",items:"信息图的内容项",label:"项目标签文本",value:"项目数值内容",icon:"项目图标",illus:"项目插图",children:"子级项目(多层结构)"}){const{structure:n,items:r}=e,i=[],o=c=>" ".repeat(c);function a(c,l,u){const h=t[c];return h?`${o(u)}/** ${h} */
36
+ ${o(u)}${c}: ${l};`:`${o(u)}${c}: ${l};`}function s(c,l){const u=r[c],h=[];for(const d of u){const f=d==="value"?"number":"string";h.push(a(d,f,l+1))}return r[c+1]&&h.push(a("children",`Array<${s(c+1,l+1)}>`,l+1)),`{
37
+ ${h.join(`
38
+ `)}
39
+ ${o(l)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push(a("title","string",1)),i.push(a("desc","string",1))),n.includes("item")&&r.length>0&&i.push(a("items",`Array<${s(0,1)}>`,1)),i.push("}"),i.join(`
40
+ `)}function Lb(e){let t=0;if(e.length===0)return t.toString();for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=(t<<5)-t+r,t=t&t}return Math.abs(t).toString()}var zH=Object.defineProperty,NH=Object.defineProperties,HH=Object.getOwnPropertyDescriptors,zb=Object.getOwnPropertySymbols,DH=Object.prototype.hasOwnProperty,qH=Object.prototype.propertyIsEnumerable,Nb=(e,t,n)=>t in e?zH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jH=(e,t)=>{for(var n in t||(t={}))DH.call(t,n)&&Nb(e,n,t[n]);if(zb)for(var n of zb(t))qH.call(t,n)&&Nb(e,n,t[n]);return e},FH=(e,t)=>NH(e,HH(t));const BH=new WeakMap;function WH(e,t={}){const n=Se("use",FH(jH({},t),{href:Lv(e)}));return Hb(n),BH.set(n,e),n}function Hb(e){const{stroke:t,fill:n}=an(e,["fill","stroke"]);e.style.color=n||t||"currentColor"}function ns(e){return e.tagName==="use"?e:e.querySelector("use")}function Fu(e){const t=ns(e);return t?an(t,["width","height","x","y","width","height","fill","fill-opacity","stroke","opacity"]):{}}function GH(e,t,n){const r=ns(e);r&&(n&&ut(r,n),Hb(r))}const Bu=!!(typeof process!="undefined"&&process.versions&&process.versions.node),VH=",",YH=(e,t=VH)=>e.split(t).map(n=>parseInt(n,10)),Db=e=>YH(e);function Wu(...e){return e.map(t=>t.replace(/^\/+|\/+$/g,"")).filter(t=>t.trim().length>0).join("/")}function Gu(e){const t=e.getAttribute("viewBox");if(t){const[a,s,c,l]=t.split(" ").map(Number);return{x:a,y:s,width:c,height:l}}const n=e.getAttribute("width"),r=e.getAttribute("height"),i=Number(n)||0,o=Number(r)||0;return{x:0,y:0,width:i,height:o}}function Er(e){return e?typeof e=="number"?[e,e,e,e]:e.length===1?[e[0],e[0],e[0],e[0]]:e.length===2?[e[0],e[1],e[0],e[1]]:e.length===3?[e[0],e[1],e[2],e[1]]:e.length===4?[e[0],e[1],e[2],e[3]]:[0,0,0,0]:[0,0,0,0]}function qb(e,t){if(Bu)jb(e,t);else if(document.contains(e))Fb(e,t);else try{const n=new MutationObserver(r=>{r.forEach(i=>{i.addedNodes.forEach(o=>{(o===e||o.contains(e))&&(XH(e,()=>{Fb(e,t)}),n.disconnect())})})});n.observe(document,{childList:!0,subtree:!0})}catch(n){jb(e,t)}}function jb(e,t){const n=Gu(e),[r,i,o,a]=t;ut(e,{viewBox:`${n.x-a} ${n.y-r} ${n.width+a+i} ${n.height+r+o}`})}function Fb(e,t){const n=e.getBBox(),r=e.getBoundingClientRect(),i=r.width>0?n.width/r.width:1,o=r.height>0?n.height/r.height:1,[a,s,c,l]=t,u=a*o,h=s*i,d=c*o,f=l*i,g=n.x-f,y=n.y-u,m=n.width+f+h,v=n.height+u+d;ut(e,{viewBox:`${g} ${y} ${m} ${v}`})}function XH(e,t){requestAnimationFrame(()=>{const n=()=>{const r=e.getBoundingClientRect();r.width>0&&r.height>0?t():requestAnimationFrame(n)};n()})}function Sn(e,t){if(document.getElementById(e))return;const n=document.createElement("style");n.id=e,n.textContent=t,document.head.appendChild(n)}function UH(){return crypto&&crypto.randomUUID?crypto.randomUUID():"xxxx-xxxx-4xxx-yxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}var KH=Object.defineProperty,ZH=Object.defineProperties,QH=Object.getOwnPropertyDescriptors,rs=Object.getOwnPropertySymbols,Bb=Object.prototype.hasOwnProperty,Wb=Object.prototype.propertyIsEnumerable,Gb=(e,t,n)=>t in e?KH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vt=(e,t)=>{for(var n in t||(t={}))Bb.call(t,n)&&Gb(e,n,t[n]);if(rs)for(var n of rs(t))Wb.call(t,n)&&Gb(e,n,t[n]);return e},Vu=(e,t)=>ZH(e,QH(t)),JH=(e,t)=>{var n={};for(var r in e)Bb.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&rs)for(var r of rs(e))t.indexOf(r)<0&&Wb.call(e,r)&&(n[r]=e[r]);return n};function Ne(e){const t=e,{id:n,x:r=0,y:i=0,width:o,height:a,alignHorizontal:s="left",alignVertical:c="top",children:l,fontSize:u=14,fontFamily:h,fontStyle:d,fontWeight:f,textDecoration:g,letterSpacing:y,wordSpacing:m,opacity:v,fill:b="black",lineHeight:_,wordWrap:x,backgroundColor:w="none",backgroundOpacity:P=1,backgroundRadius:$=0}=t,C=JH(t,["id","x","y","width","height","alignHorizontal","alignVertical","children","fontSize","fontFamily","fontStyle","fontWeight","textDecoration","letterSpacing","wordSpacing","opacity","fill","lineHeight","wordWrap","backgroundColor","backgroundOpacity","backgroundRadius"]);let M=o,S=a,E=0,I=0;if(!M||!S){const B=Ob(l,e);M||(M=B.width),S||(S=B.height)}o&&(E=s==="center"?M/2:s==="right"?M:0),a&&(I=c==="middle"?S/2:c==="bottom"?S:0);const O=Object.entries(Vt(Vt({width:M,height:S},_!==void 0&&{"line-height":_}),x!==void 0&&{"data-word-wrap":x})).reduce((B,[X,D])=>Vu(Vt({},B),{[X]:D}),{}),z=Vt(Vt(Vt(Vt(Vt(Vt(Vt(Vt(Vt({"data-element-type":"text",width:M,height:S,x:E,y:I,"data-x":0,"data-y":0,fill:b,fontSize:u,textAnchor:s==="center"?"middle":s==="right"?"end":"start",dominantBaseline:c==="middle"?"central":c==="bottom"?"baseline":"hanging","data-horizontal-align":s.toUpperCase(),"data-vertical-align":c.toUpperCase(),children:l},O),C),h&&{fontFamily:h}),d&&{fontStyle:d}),f&&{fontWeight:f}),g&&g!=="none"&&{textDecoration:g}),y&&{letterSpacing:y}),m&&{wordSpacing:m}),v!==void 0&&v!==1&&{opacity:v}),j=Vt(Vu(Vt({},r!==0||i!==0?{x:r,y:i,transform:`translate(${r}, ${i})`}:{}),{width:M,height:S}),n&&{id:n}),W=w&&w!=="none"?{"data-element-type":"shape",x:0,y:0,width:M,height:S,fill:w,fillOpacity:P,rx:$,ry:$}:void 0;return{type:"g",props:Vu(Vt({},j),{children:[...W?[{type:"rect",props:W}]:[],{type:"text",props:z}]})}}const ho=Symbol.for("@antv/infographic/Fragment");function is(e,t={}){return{type:e,props:t}}function eD(e={}){return is(ho,e)}const tD=is,nD=is;function rD(e){return!e||typeof e!="object"||Array.isArray(e)?!1:e.type===ho}function Vb(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)&&"type"in e}function fo(e){return po(e).filter(Vb)}function po(e,t=[]){var n;if(!e||typeof e=="boolean")return t;if(Array.isArray(e))e.forEach(r=>po(r,t));else if(rD(e)){const r=(n=e.props)==null?void 0:n.children;(Array.isArray(r)?r:[r]).filter(Boolean).forEach(i=>{po(i,t)})}else t.push(e);return t}function at(e){return typeof e=="number"&&!Number.isNaN(e)&&Number.isFinite(e)}const os=()=>({x:0,y:0,width:0,height:0});function mi(e){if(!e||e.length===0)return os();let t=1/0,n=1/0,r=-1/0,i=-1/0;for(const o of e){const{x:a,y:s,width:c,height:l}=o,u=a+c,h=s+l;a<t&&(t=a),s<n&&(n=s),u>r&&(r=u),h>i&&(i=h)}return t===1/0||n===1/0||r===-1/0||i===-1/0?{x:0,y:0,width:0,height:0}:{x:t,y:n,width:Math.max(0,r-t),height:Math.max(0,i-n)}}function ae(e){var t,n,r,i;if(!e)return os();if(Array.isArray(e)){const f=fo(e);return Ir(f)}if(typeof e!="object")return os();const{type:o,props:a={}}=e;if(Qu(e)){const f=Jb(e);return ae(f)}if(typeof o=="function"){const f=(t=a.x)!=null?t:0,g=(n=a.y)!=null?n:0,y=a.width,m=a.height;if(at(y)&&at(m))return{x:f,y:g,width:y,height:m};const v=o(a);if(!v)return{x:f,y:g,width:y!=null?y:0,height:m!=null?m:0};if(Array.isArray(v)){const b=fo(v),_=Ir(b);if(at(y)&&at(m))return{x:f,y:g,width:y,height:m};const x=_.width!==0?_.width:y!=null?y:0,w=_.height!==0?_.height:m!=null?m:0;return{x:f+_.x,y:g+_.y,width:x,height:w}}if(Vb(v)){const b=v,_=ae(b);if(iD(b,a))return _;const x=b.props&&at(b.props.width)&&at(b.props.height),$=Yb(b).flatMap(E=>fo(E)).length>0,C=b.props&&b.props.x===a.x&&b.props.y===a.y;if(x)return{x:C?_.x:f+_.x,y:C?_.y:g+_.y,width:_.width,height:_.height};if(at(y)&&at(m))return $?{x:C?_.x:f,y:C?_.y:g,width:y,height:m}:{x:C?_.x:f+_.x,y:C?_.y:g+_.y,width:y,height:m};const M=_.width!==0?_.width:y!=null?y:0,S=_.height!==0?_.height:m!=null?m:0;return{x:C?_.x:f+_.x,y:C?_.y:g+_.y,width:M,height:S}}return{x:f,y:g,width:y!=null?y:0,height:m!=null?m:0}}const s=(r=a.x)!=null?r:0,c=(i=a.y)!=null?i:0,l=at(a.width)?a.width:void 0,u=at(a.height)?a.height:void 0;if(at(l)&&at(u))return{x:s,y:c,width:l,height:u};const d=Yb(e).flatMap(f=>fo(f));if(d.length>0){const f=Ir(d);return{x:s+f.x,y:c+f.y,width:at(l)?l:f.width,height:at(u)?u:f.height}}return{x:s,y:c,width:l!=null?l:0,height:u!=null?u:0}}function Ir(e){if(!e||!Array.isArray(e)||e.length===0)return os();const t=[];for(const n of e){const r=fo(n);for(const i of r){const o=ae(i);o&&t.push(o)}}return mi(t)}function iD(e,t){if(!(e!=null&&e.props)||!t)return!1;const n=e.props;if(at(n.x)&&at(n.y)&&at(t.x)&&at(t.y)&&n.x===t.x&&n.y===t.y){const r=at(n.width)&&at(n.height),i=at(t.width)&&at(t.height);if(!r&&!i)return!0}return at(n.x)&&at(n.y)&&at(n.width)&&at(n.height)&&at(t.x)&&at(t.y)&&at(t.width)&&at(t.height)?n.x===t.x&&n.y===t.y&&n.width===t.width&&n.height===t.height:!1}function Yb(e){var t;const n=(t=e.props)==null?void 0:t.children;return n?Array.isArray(n)?n:[n]:[]}function Yu(e){var t;return e==null||typeof e=="boolean"?[]:Array.isArray(e)?po(e):typeof e=="object"?po((t=e.props)==null?void 0:t.children):[e]}var oD=Object.defineProperty,as=Object.getOwnPropertySymbols,Xb=Object.prototype.hasOwnProperty,Ub=Object.prototype.propertyIsEnumerable,Kb=(e,t,n)=>t in e?oD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xu=(e,t)=>{for(var n in t||(t={}))Xb.call(t,n)&&Kb(e,n,t[n]);if(as)for(var n of as(t))Ub.call(t,n)&&Kb(e,n,t[n]);return e},aD=(e,t)=>{var n={};for(var r in e)Xb.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&as)for(var r of as(e))t.indexOf(r)<0&&Ub.call(e,r)&&(n[r]=e[r]);return n};const or=(e,t)=>{const n=e,{type:r,props:i}=n,o=aD(n,["type","props"]);return Xu({type:r,props:Xu(Xu({},i),t)},o)},Zb=()=>({defs:new Map});function Uu(e){const t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};return String(e).replace(/[&<>"']/g,n=>t[n])}const Qb={className:"class",viewBox:"viewBox",preserveAspectRatio:"preserveAspectRatio",gradientUnits:"gradientUnits",gradientTransform:"gradientTransform",patternUnits:"patternUnits",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",maskUnits:"maskUnits",maskContentUnits:"maskContentUnits",clipPathUnits:"clipPathUnits",primitiveUnits:"primitiveUnits",filterUnits:"filterUnits",markerUnits:"markerUnits",markerWidth:"markerWidth",markerHeight:"markerHeight",refX:"refX",refY:"refY",xmlLang:"xml:lang",xmlSpace:"xml:space",xmlnsXlink:"xmlns:xlink",xlinkHref:"href",xlinkTitle:"xlink:title",xlinkShow:"xlink:show",xlinkActuate:"xlink:actuate",textLength:"textLength",lengthAdjust:"lengthAdjust",attributeName:"attributeName",attributeType:"attributeType",repeatCount:"repeatCount",repeatDur:"repeatDur",calcMode:"calcMode",keyTimes:"keyTimes",keySplines:"keySplines",keyPoints:"keyPoints",stdDeviation:"stdDeviation",baseFrequency:"baseFrequency",numOctaves:"numOctaves",pathLength:"pathLength",systemLanguage:"systemLanguage",requiredFeatures:"requiredFeatures",requiredExtensions:"requiredExtensions"};function sD(e){return Qb[e]?Qb[e]:e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}const Ku=new Map;function Zu(e){const t=Symbol("layout");return Ku.set(t,e),r=>({type:t,props:r})}function Qu(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)&&typeof e.type=="symbol"&&Ku.has(e.type)}function Jb(e,t=Zb()){const n=Ku.get(e.type);if(!n)return console.warn("Layout function not found for symbol:",e.type),e;const r=Yu(e).filter(i=>typeof i=="object");return n(r,e.props,t)}var cD=Object.defineProperty,lD=Object.defineProperties,uD=Object.getOwnPropertyDescriptors,ss=Object.getOwnPropertySymbols,e_=Object.prototype.hasOwnProperty,t_=Object.prototype.propertyIsEnumerable,n_=(e,t,n)=>t in e?cD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hD=(e,t)=>{for(var n in t||(t={}))e_.call(t,n)&&n_(e,n,t[n]);if(ss)for(var n of ss(t))t_.call(t,n)&&n_(e,n,t[n]);return e},dD=(e,t)=>lD(e,uD(t)),r_=(e,t)=>{var n={};for(var r in e)e_.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ss)for(var r of ss(e))t.indexOf(r)<0&&t_.call(e,r)&&(n[r]=e[r]);return n};function go(e,t){if(e==null||typeof e=="boolean")return null;if(typeof e=="string"||typeof e=="number")return e;if(Array.isArray(e))return e.map(r=>go(r,t)).filter(Boolean);if(Qu(e)){const r=Jb(e,t);return go(r,t)}if(typeof e.type=="function"){const r=e.type(e.props);return go(r,t)}const n=Yu(e).map(r=>go(r,t)).filter(Boolean);return e.type===ho?n:e.type===al?(n.forEach(r=>{typeof r=="object"&&r.props.id&&t.defs.set(r.props.id,r)}),null):n.length?or(e,{children:n}):e}function mo(e,t){if(e==null)return"";if(typeof e=="string")return Uu(e);if(typeof e=="number")return String(e);const{type:n,props:r}=e;if(!n)return"";const i=Yu(e);if(n===ho)return i.map(c=>mo(c)).filter(Boolean).join("");if(n===al)return"";if(typeof n=="function"||Qu(e))return console.warn("Unexpected unprocessed component in render:",e),"";const o=o_(r),a=i.map(c=>mo(c)).filter(Boolean).join(""),s=String(n);return a?`<${s}${o}>${a}</${s}>`:`<${s}${o} />`}function i_(e,t={}){const n=Zb(),r=go(e,n);if(!r)return"";const i=Array.isArray(r)?r.map(m=>mo(m)).join(""):mo(r),o=t,{x:a,y:s,width:c,height:l,style:u}=o,h=r_(o,["x","y","width","height","style"]),d=dD(hD({},h),{xmlns:"http://www.w3.org/2000/svg"});if(!d.viewBox)if(c&&l)d.viewBox=`${a!=null?a:0} ${s!=null?s:0} ${c!=null?c:0} ${l!=null?l:0}`;else{const m=ae(r);if(m){const{x:v,y:b,width:_,height:x}=m;d.viewBox=`${v} ${b} ${_} ${x}`}}const f=o_(d),g=fD(u),y=n.defs.size?`<defs>${Array.from(n.defs.values()).map(m=>mo(m)).join("")}</defs>`:"";return`<svg${f}${g}>${y}${i}</svg>`}function o_(e){if(!e)return"";const t=e,{children:n}=t,r=r_(t,["children"]);return Object.entries(r).filter(([,i])=>i!=null).map(([i,o])=>{const a=sD(i),s=typeof o=="string"?Uu(String(o)):String(o);return` ${a}="${s}"`}).join("")}function fD(e){if(!e||Object.keys(e).length===0)return"";const t=Object.entries(e).map(([n,r])=>`${n.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`)}: ${r};`).join("");return` style="${Uu(t)}"`}var pD=Object.defineProperty,cs=Object.getOwnPropertySymbols,a_=Object.prototype.hasOwnProperty,s_=Object.prototype.propertyIsEnumerable,c_=(e,t,n)=>t in e?pD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ls=(e,t)=>{for(var n in t||(t={}))a_.call(t,n)&&c_(e,n,t[n]);if(cs)for(var n of cs(t))s_.call(t,n)&&c_(e,n,t[n]);return e},l_=(e,t)=>{var n={};for(var r in e)a_.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&cs)for(var r of cs(e))t.indexOf(r)<0&&s_.call(e,r)&&(n[r]=e[r]);return n};const J=e=>{const t=e,{indexes:n}=t,r=l_(t,["indexes"]),i={fill:"#B9EBCA",fillOpacity:.3,width:20,height:20,"data-indexes":n,"data-element-type":Ue.BtnAdd};return p(ze,ls(ls({},i),r))},nt=e=>{const t=e,{indexes:n}=t,r=l_(t,["indexes"]),i={fill:"#F9C0C0",fillOpacity:.3,width:20,height:20,"data-indexes":n,"data-element-type":Ue.BtnRemove};return p(ze,ls(ls({},i),r))};var gD=Object.defineProperty,mD=Object.defineProperties,yD=Object.getOwnPropertyDescriptors,u_=Object.getOwnPropertySymbols,vD=Object.prototype.hasOwnProperty,bD=Object.prototype.propertyIsEnumerable,h_=(e,t,n)=>t in e?gD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_D=(e,t)=>{for(var n in t||(t={}))vD.call(t,n)&&h_(e,n,t[n]);if(u_)for(var n of u_(t))bD.call(t,n)&&h_(e,n,t[n]);return e},xD=(e,t)=>mD(e,yD(t));const qe=e=>p(Y,xD(_D({"data-element-type":Ue.BtnsGroup,width:0,height:0},e),{display:"none"})),mt=()=>p(tt,{});var wD=Object.defineProperty,us=Object.getOwnPropertySymbols,d_=Object.prototype.hasOwnProperty,f_=Object.prototype.propertyIsEnumerable,p_=(e,t,n)=>t in e?wD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ju=(e,t)=>{for(var n in t||(t={}))d_.call(t,n)&&p_(e,n,t[n]);if(us)for(var n of us(t))f_.call(t,n)&&p_(e,n,t[n]);return e},PD=(e,t)=>{var n={};for(var r in e)d_.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&us)for(var r of us(e))t.indexOf(r)<0&&f_.call(e,r)&&(n[r]=e[r]);return n};const g_=e=>{var t=e,{indexes:n}=t,r=PD(t,["indexes"]);const o=Ju(Ju({},{fill:"lightgray"}),r);return n?(o["data-indexes"]=n,o["data-element-type"]=Ue.ItemIllus):o["data-element-type"]=Ue.Illus,p(ze,Ju({},o))};var $D=Object.defineProperty,CD=Object.defineProperties,OD=Object.getOwnPropertyDescriptors,hs=Object.getOwnPropertySymbols,m_=Object.prototype.hasOwnProperty,y_=Object.prototype.propertyIsEnumerable,v_=(e,t,n)=>t in e?$D(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,b_=(e,t)=>{for(var n in t||(t={}))m_.call(t,n)&&v_(e,n,t[n]);if(hs)for(var n of hs(t))y_.call(t,n)&&v_(e,n,t[n]);return e},SD=(e,t)=>CD(e,OD(t)),MD=(e,t)=>{var n={};for(var r in e)m_.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hs)for(var r of hs(e))t.indexOf(r)<0&&y_.call(e,r)&&(n[r]=e[r]);return n};const ht=e=>{var t=e,{indexes:n,lineNumber:r=2,children:i}=t,o=MD(t,["indexes","lineNumber","children"]),a;if(!i)return null;const s=b_({fontSize:14,fill:"#666",wordWrap:!0,lineHeight:1.4,children:i},o);return(a=s.height)!=null||(s.height=Math.ceil(r*+s.lineHeight*+s.fontSize)),p(Ne,SD(b_({},s),{"data-indexes":n,"data-element-type":Ue.ItemDesc}))};var ED=Object.defineProperty,ID=Object.defineProperties,AD=Object.getOwnPropertyDescriptors,ds=Object.getOwnPropertySymbols,__=Object.prototype.hasOwnProperty,x_=Object.prototype.propertyIsEnumerable,w_=(e,t,n)=>t in e?ED(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yo=(e,t)=>{for(var n in t||(t={}))__.call(t,n)&&w_(e,n,t[n]);if(ds)for(var n of ds(t))x_.call(t,n)&&w_(e,n,t[n]);return e},fs=(e,t)=>ID(e,AD(t)),P_=(e,t)=>{var n={};for(var r in e)__.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ds)for(var r of ds(e))t.indexOf(r)<0&&x_.call(e,r)&&(n[r]=e[r]);return n};const Dt=e=>{const t=e,{indexes:n,size:r=32}=t,i=P_(t,["indexes","size"]),o=yo({fill:"lightgray",width:r,height:r},i);return p(ze,fs(yo({},o),{"data-indexes":n,"data-element-type":"item-icon"}))},Ar=e=>{const t=e,{indexes:n,size:r=50,fill:i,colorBg:o="white"}=t,a=P_(t,["indexes","size","fill","colorBg"]),s=r/Math.SQRT2*.9,c=(r-s)/2,l=fs(yo({fill:o},a),{x:c,y:c,width:s,height:s});return R(Y,fs(yo({},a),{width:r,height:r,"data-element-type":Ue.ItemIconGroup,children:[p(Je,{width:r,height:r,fill:i,"data-element-type":"shape"}),p(ze,fs(yo({},l),{"data-indexes":n,"data-element-type":Ue.ItemIcon}))]}))};var TD=Object.defineProperty,kD=Object.defineProperties,RD=Object.getOwnPropertyDescriptors,ps=Object.getOwnPropertySymbols,$_=Object.prototype.hasOwnProperty,C_=Object.prototype.propertyIsEnumerable,O_=(e,t,n)=>t in e?TD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S_=(e,t)=>{for(var n in t||(t={}))$_.call(t,n)&&O_(e,n,t[n]);if(ps)for(var n of ps(t))C_.call(t,n)&&O_(e,n,t[n]);return e},LD=(e,t)=>kD(e,RD(t)),zD=(e,t)=>{var n={};for(var r in e)$_.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ps)for(var r of ps(e))t.indexOf(r)<0&&C_.call(e,r)&&(n[r]=e[r]);return n};const Ve=e=>{var t=e,{indexes:n,children:r}=t,i=zD(t,["indexes","children"]),o;const a=S_({fontSize:18,fontWeight:"bold",fill:"#252525",lineHeight:1.4,children:r},i);return(o=a.height)!=null||(a.height=Math.ceil(+a.lineHeight*+a.fontSize)),p(Ne,LD(S_({},a),{"data-indexes":n,"data-element-type":Ue.ItemLabel}))};var ND=Object.defineProperty,M_=Object.getOwnPropertySymbols,HD=Object.prototype.hasOwnProperty,DD=Object.prototype.propertyIsEnumerable,E_=(e,t,n)=>t in e?ND(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qD=(e,t)=>{for(var n in t||(t={}))HD.call(t,n)&&E_(e,n,t[n]);if(M_)for(var n of M_(t))DD.call(t,n)&&E_(e,n,t[n]);return e};const He=e=>p(Y,qD({"data-element-type":Ue.ItemsGroup},e));var jD=Object.defineProperty,FD=Object.defineProperties,BD=Object.getOwnPropertyDescriptors,gs=Object.getOwnPropertySymbols,I_=Object.prototype.hasOwnProperty,A_=Object.prototype.propertyIsEnumerable,T_=(e,t,n)=>t in e?jD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,k_=(e,t)=>{for(var n in t||(t={}))I_.call(t,n)&&T_(e,n,t[n]);if(gs)for(var n of gs(t))A_.call(t,n)&&T_(e,n,t[n]);return e},WD=(e,t)=>FD(e,BD(t)),GD=(e,t)=>{var n={};for(var r in e)I_.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&gs)for(var r of gs(e))t.indexOf(r)<0&&A_.call(e,r)&&(n[r]=e[r]);return n};const vo=e=>{var t=e,{indexes:n,value:r,formatter:i=c=>String(c)}=t,o=GD(t,["indexes","value","formatter"]),a;const s=k_({fontSize:14,fill:"#666",wordWrap:!0,lineHeight:1.4,children:i(r),"data-value":r},o);return(a=s.height)!=null||(s.height=Math.ceil(+s.lineHeight*+s.fontSize)),p(Ne,WD(k_({},s),{"data-indexes":n,"data-element-type":Ue.ItemValue}))};var VD=Object.defineProperty,R_=Object.getOwnPropertySymbols,YD=Object.prototype.hasOwnProperty,XD=Object.prototype.propertyIsEnumerable,L_=(e,t,n)=>t in e?VD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,UD=(e,t)=>{for(var n in t||(t={}))YD.call(t,n)&&L_(e,n,t[n]);if(R_)for(var n of R_(t))XD.call(t,n)&&L_(e,n,t[n]);return e};const xt=e=>p(Y,UD({"data-element-type":"shapes-group"},e));var KD=Object.defineProperty,ZD=Object.defineProperties,QD=Object.getOwnPropertyDescriptors,ms=Object.getOwnPropertySymbols,z_=Object.prototype.hasOwnProperty,N_=Object.prototype.propertyIsEnumerable,H_=(e,t,n)=>t in e?KD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ys=(e,t)=>{for(var n in t||(t={}))z_.call(t,n)&&H_(e,n,t[n]);if(ms)for(var n of ms(t))N_.call(t,n)&&H_(e,n,t[n]);return e},D_=(e,t)=>ZD(e,QD(t)),JD=(e,t)=>{var n={};for(var r in e)z_.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ms)for(var r of ms(e))t.indexOf(r)<0&&N_.call(e,r)&&(n[r]=e[r]);return n};const yi=Zu((e,t)=>{var n=t,{horizontal:r,vertical:i}=n,o=JD(n,["horizontal","vertical"]),a,s,c,l;if(!e||e.length===0)return p(Y,ys({},o));const u=e.map(b=>ae(b)),h=Ir(e),d=(a=o.x)!=null?a:h.x,f=(s=o.y)!=null?s:h.y,g=(c=o.width)!=null?c:h.width,y=(l=o.height)!=null?l:h.height,m=e.map((b,_)=>{const x=u[_],w=ys({},b.props);if(r!==void 0)switch(r){case"left":w.x=-x.x;break;case"center":w.x=(g-x.width)/2-x.x;break;case"right":w.x=g-x.width-x.x;break}else w.x===void 0&&(w.x=x.x-d);if(i!==void 0)switch(i){case"top":w.y=-x.y;break;case"middle":w.y=(y-x.height)/2-x.y;break;case"bottom":w.y=y-x.height-x.y;break}else w.y===void 0&&(w.y=x.y-f);return or(b,w)}),v=D_(ys({},o),{x:d,y:f,width:g,height:y});return p(Y,D_(ys({},v),{children:m}))});var eq=Object.defineProperty,tq=Object.defineProperties,nq=Object.getOwnPropertyDescriptors,vs=Object.getOwnPropertySymbols,q_=Object.prototype.hasOwnProperty,j_=Object.prototype.propertyIsEnumerable,F_=(e,t,n)=>t in e?eq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Tr=(e,t)=>{for(var n in t||(t={}))q_.call(t,n)&&F_(e,n,t[n]);if(vs)for(var n of vs(t))j_.call(t,n)&&F_(e,n,t[n]);return e},B_=(e,t)=>tq(e,nq(t)),rq=(e,t)=>{var n={};for(var r in e)q_.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&vs)for(var r of vs(e))t.indexOf(r)<0&&j_.call(e,r)&&(n[r]=e[r]);return n};const ye=Zu((e,t)=>{var n=t,{flexDirection:r="row",justifyContent:i="flex-start",alignItems:o="flex-start",alignContent:a="flex-start",flexWrap:s="nowrap",gap:c=0}=n,l=rq(n,["flexDirection","justifyContent","alignItems","alignContent","flexWrap","gap"]),u,h,d,f,g,y;if(!e||e.length===0)return p(Y,Tr({},l));const m=r==="row"||r==="row-reverse",v=r==="row-reverse"||r==="column-reverse",b=e.map(O=>ae(O)),_=Ir(e),x=(u=l.width)!=null?u:_.width,w=(h=l.height)!=null?h:_.height,P=l.width!==void 0&&l.height!==void 0,$=[];if(s==="wrap"&&P){let O=[],T=[],F=0;for(let z=0;z<e.length;z++){const j=e[z],H=b[z],W=m?H.width:H.height,B=m?x:w;O.length===0||F+c+W<=B?(O.push(j),T.push(H),F+=(O.length>1?c:0)+W):($.push({children:O,bounds:T}),O=[j],T=[H],F=W)}O.length>0&&$.push({children:O,bounds:T})}else $.push({children:e,bounds:b});const C=[];let M=0;const S=[];if($.forEach(O=>{const{children:T,bounds:F}=O,z=F.reduce((D,k,A)=>{const L=m?k.width:k.height;return D+L+(A>0?c:0)},0),j=Math.max(...F.map(D=>m?D.height:D.width));S.push(j);let H=0;const W=(m?x:w)-z;if(P)switch(i){case"flex-end":H=W;break;case"center":H=W/2;break;case"space-between":H=0;break;default:H=0;break}let B=c;P&&i==="space-between"&&T.length>1&&(B=W/(T.length-1)+c);let X=H;T.forEach((D,k)=>{const A=F[k],L=m?A.width:A.height,N=m?A.height:A.width,q=m?A.x:A.y,G=m?A.y:A.x;let U=M;if(P)switch(o){case"flex-end":U=M+j-N;break;case"center":U=M+(j-N)/2;break;default:U=M;break}let K,ne;m?(K=v?x-X-L-q:X-q,ne=U-G):(K=U-G,ne=v?w-X-L-q:X-q);const ee=or(D,{x:K,y:ne});C.push(ee),X+=L+B}),M+=j+c}),$.length>1&&P){const O=S.reduce((z,j)=>z+j,0)+($.length-1)*c,T=(m?w:x)-O;let F=0;switch(a){case"flex-end":F=T;break;case"center":F=T/2;break;case"space-between":if($.length>1){const z=T/($.length-1);let j=0;$.forEach((H,W)=>{const B=$.slice(0,W).reduce((D,k)=>D+k.children.length,0),X=B+H.children.length;for(let D=B;D<X;D++){const k=C[D],A=Tr({},k.props);m?A.y=(A.y||0)+j:A.x=(A.x||0)+j,C[D]=or(k,A)}j+=S[W]+c+(W<$.length-1?z:0)});break}break;default:F=0;break}F!==0&&a!=="space-between"&&C.forEach((z,j)=>{const H=Tr({},z.props);m?H.y=(H.y||0)+F:H.x=(H.x||0)+F,C[j]=or(z,H)})}if(!P&&o==="center")if(m){const O=Math.max(...b.map(T=>T.height));C.forEach((T,F)=>{const z=b[F],j=(O-z.height)/2,H=Tr({},T.props);H.y=(H.y||0)+j,C[F]=or(T,H)})}else{const O=Math.max(...b.map(T=>T.width));C.forEach((T,F)=>{const z=b[F],j=(O-z.width)/2,H=Tr({},T.props);H.x=(H.x||0)+j,C[F]=or(T,H)})}const E=Ir(C),I=B_(Tr({},l),{x:(d=l.x)!=null?d:_.x,y:(f=l.y)!=null?f:_.y,width:(g=l.width)!=null?g:E.width,height:(y=l.height)!=null?y:E.height});return p(Y,B_(Tr({},I),{children:C}))});var iq=Object.defineProperty,oq=Object.defineProperties,aq=Object.getOwnPropertyDescriptors,W_=Object.getOwnPropertySymbols,sq=Object.prototype.hasOwnProperty,cq=Object.prototype.propertyIsEnumerable,G_=(e,t,n)=>t in e?iq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bs=(e,t)=>{for(var n in t||(t={}))sq.call(t,n)&&G_(e,n,t[n]);if(W_)for(var n of W_(t))cq.call(t,n)&&G_(e,n,t[n]);return e},V_=(e,t)=>oq(e,aq(t));const Y_=e=>{const{x:t=0,y:n=0,alignHorizontal:r="center",title:i,desc:o,descLineNumber:a=2,themeColors:s}=e,c=u=>{const h={fontSize:24,fill:s.colorPrimaryText,lineHeight:1.4,alignHorizontal:r};return p(Ne,V_(bs(bs({},h),u),{"data-element-type":"title",children:i}))},l=u=>{const h={fontSize:16,fill:s.colorTextSecondary,alignHorizontal:r,lineHeight:1.4,height:a*24};return p(Ne,V_(bs(bs({},h),u),{"data-element-type":"desc",children:o}))};return!i&&!o?null:R(ye,{flexDirection:"column",justifyContent:"center",alignItems:"center",x:t,y:n,gap:8,children:[i&&p(c,{}),o&&p(l,{})]})},eh=new Map;function th(e,t){eh.set(e,t)}function X_(e){return eh.get(e)}function lq(){return Array.from(eh.keys())}th("dark",{colorBg:"#1F1F1F",base:{text:{fill:"#fff"}}}),th("hand-drawn",{base:{text:{"font-family":"851tegakizatsu"}},stylize:{type:"rough"}});var uq=Object.defineProperty,hq=Object.defineProperties,dq=Object.getOwnPropertyDescriptors,U_=Object.getOwnPropertySymbols,fq=Object.prototype.hasOwnProperty,pq=Object.prototype.propertyIsEnumerable,K_=(e,t,n)=>t in e?uq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bo=(e,t)=>{for(var n in t||(t={}))fq.call(t,n)&&K_(e,n,t[n]);if(U_)for(var n of U_(t))pq.call(t,n)&&K_(e,n,t[n]);return e},_o=(e,t)=>hq(e,dq(t));it(Iy);const Z_=({colorPrimary:e,colorBg:t="#ffffff",isDarkMode:n=!1})=>{const r=$n(e),i=$n(t),o=_q({primaryColor:r,bgColor:i});return xq(o,{primaryColor:r,bgColor:i,isDarkMode:n})},gq=(e,t)=>FE(_o(bo({},e),{alpha:t?.2:.1}))||"#ffffff",mq=(e,t)=>{if(t)return"#ffffff";const n=$n("#262626");return Vl(n,e)>=7?Xi(n):"#000000"},yq=e=>{const t=Fy($n(e)),n=_o(bo({},t),{l:Math.min(1,t.l+.2)});return Xi(n)},vq=(e,t)=>{const n=$n(e),r=$n("#262626"),i=$n("#ffffff"),o=Vl(r,n);return Vl(i,n)>=3?Xi(i):o>=4.5?Xi(r):"#ffffff"},bq=(e,t)=>{const n=Fy(e);if(t){const r=_o(bo({},n),{l:Math.min(1,n.l+.1)});return _s(r,"#1f1f1f")}else{if(n.l>.95)return"#ffffff";{const r=_o(bo({},n),{l:Math.min(1,n.l+.05)});return _s(r,"#ffffff")}}},_q=({primaryColor:e,bgColor:t})=>({colorPrimary:_s(e,"#FF356A"),colorBg:_s(t,"#ffffff"),colorWhite:"#ffffff"}),xq=(e,{primaryColor:t,bgColor:n,isDarkMode:r})=>{const i=mq(n,r),o=gq(t,r);return _o(bo({},e),{isDarkMode:r,colorPrimaryBg:o,colorText:i,colorTextSecondary:yq(i),colorPrimaryText:vq(o,r),colorBgElevated:bq(n,r)})};function _s(e,t="#000000"){var n;return(n=Xi(e))!=null?n:t}const nh="#FF356A";function wt(e){var t;return((t=e==null?void 0:e.themeConfig)==null?void 0:t.colorPrimary)||nh}function Q_(e){var t;const{themeConfig:n={},data:r}=e,{colorPrimary:i,palette:o}=n;return!o||o.length===0?Array(((t=r==null?void 0:r.items)==null?void 0:t.length)||1).fill(i||nh):r.items.map((a,s)=>Aa(o,[s],r.items.length)||nh)}function je(e,t){var n,r,i;return Aa((n=e==null?void 0:e.themeConfig)==null?void 0:n.palette,t,(i=(r=e.data)==null?void 0:r.items)==null?void 0:i.length)}function Ct(e,t){var n;const{colorBg:r=((n=t==null?void 0:t.themeConfig)==null?void 0:n.colorBg)||"white",colorPrimary:i=t?wt(t):"black"}=e;return Z_({colorPrimary:i,isDarkMode:By(r),colorBg:r})}function J_(e,t){const{depth:n,originalIndexes:r,flatIndex:i}=e;switch(t){case"level":return[n];case"branch":return n===0?[0]:n===1?[r[1]+1]:[r[1]+1];case"node":return r;case"node-flat":return i!==void 0?[i]:(console.warn("node-flat mode requires flatIndex in HierarchyNode, falling back to originalIndexes"),r);default:return[0]}}var wq=Object.defineProperty,e3=Object.getOwnPropertySymbols,Pq=Object.prototype.hasOwnProperty,$q=Object.prototype.propertyIsEnumerable,t3=(e,t,n)=>t in e?wq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Cq=(e,t)=>{for(var n in t||(t={}))Pq.call(t,n)&&t3(e,n,t[n]);if(e3)for(var n of e3(t))$q.call(t,n)&&t3(e,n,t[n]);return e};function st(e,t=[]){const n=Cq({},e),r={};return["indexes","data","datum","positionH","positionV","themeColors","valueFormatter",...t].forEach(o=>{o in n&&(r[o]=n[o],delete n[o])}),["x","y","width","height"].forEach(o=>{o in e&&(n[o]=e[o])}),[r,n]}function xs(e,t){var n;return e.length===0?()=>null:t===void 0?e[0]:(n=e[t])!=null?n:e[0]}const rh=new Map;function ct(e,t){rh.set(e,t)}function n3(e){return rh.get(e)}function Oq(){return Array.from(rh.keys())}var Sq=Object.defineProperty,Mq=Object.defineProperties,Eq=Object.getOwnPropertyDescriptors,r3=Object.getOwnPropertySymbols,Iq=Object.prototype.hasOwnProperty,Aq=Object.prototype.propertyIsEnumerable,i3=(e,t,n)=>t in e?Sq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Tq=(e,t)=>{for(var n in t||(t={}))Iq.call(t,n)&&i3(e,n,t[n]);if(r3)for(var n of r3(t))Aq.call(t,n)&&i3(e,n,t[n]);return e},kq=(e,t)=>Mq(e,Eq(t));const o3=e=>{const[{datum:t,indexes:n,width:r=200,height:i=80,iconSize:o=24,badgeSize:a=32,gap:s=8,positionH:c="normal",themeColors:l,valueFormatter:u},h]=st(e,["width","height","iconSize","badgeSize","gap"]),d=t.value,f=d!==void 0,g=!!t.desc,y=!!t.icon,m=`${l.colorPrimary}-badge`,v=c==="flipped"?r-s-a:s,b=y?c==="flipped"?s:a+2*s:s,_=r-s*2,x=y?r-a-3*s:_,w=s+14+18+8,P=w-s,$=g?s:(i-a)/2,C=!f&&!g?(i-14)/2:s,M=!y&&c==="center"?"center":c==="flipped"?"right":"left";return R(Y,kq(Tq({},h),{width:r,height:i,children:[p(Ke,{children:R("radialGradient",{id:m,cx:"50%",cy:"50%",r:"50%",children:[p("stop",{offset:"0%",stopColor:l.colorPrimary}),p("stop",{offset:"100%",stopColor:ve(l.colorPrimary).darken(20).toHexString()})]})}),p(ze,{"data-element-type":"shape",x:0,y:0,width:r,height:i,fill:l.colorPrimaryBg,rx:8,ry:8}),y&&R(tt,{children:[p(Je,{x:v,y:$,width:a,height:a,fill:`url(#${m})`}),p(Dt,{indexes:n,x:v+(a-o)/2,y:$+(a-o)/2,size:o,fill:l.colorWhite})]}),R(ye,{flexDirection:"column",x:b,y:C,width:x,height:!f&&!g?void 0:P,alignItems:"center",justifyContent:"center",children:[p(Ve,{indexes:n,width:x,alignHorizontal:M,alignVertical:"middle",fontSize:14,fill:l.colorText,children:t.label}),f&&p(vo,{indexes:n,width:x,alignHorizontal:c==="flipped"?"right":"left",alignVertical:"middle",fontSize:18,lineHeight:1,fontWeight:"bold",fill:l.colorPrimary,value:d,formatter:u})]}),g&&p(ht,{indexes:n,x:s,y:w,width:_,alignHorizontal:M,fontSize:11,fill:l.colorTextSecondary,lineNumber:2,lineHeight:1.2,wordWrap:!0,children:t.desc})]}))};ct("badge-card",{component:o3,composites:["icon","label","value","desc"]});var Rq=Object.defineProperty,Lq=Object.defineProperties,zq=Object.getOwnPropertyDescriptors,a3=Object.getOwnPropertySymbols,Nq=Object.prototype.hasOwnProperty,Hq=Object.prototype.propertyIsEnumerable,s3=(e,t,n)=>t in e?Rq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Dq=(e,t)=>{for(var n in t||(t={}))Nq.call(t,n)&&s3(e,n,t[n]);if(a3)for(var n of a3(t))Hq.call(t,n)&&s3(e,n,t[n]);return e},qq=(e,t)=>Lq(e,zq(t));const c3=e=>{const[{indexes:t,datum:n,width:r=280,height:i=140,themeColors:o},a]=st(e,["width","height"]);return R(Y,qq(Dq({},a),{children:[p("rect",{x:0,y:0,width:r,height:i,rx:22,ry:22,fill:o.colorPrimaryBg,stroke:o.colorPrimary,"data-element-type":"shape"}),p(Pe,{x:r-85,y:.5,width:85,height:65,d:"M0 0H62.4495C74.9557 0 85.4549 10.8574 84.4557 23.1875V60.1875L77.8772 62.5839C64.3776 67.6876 48.51 64.6893 37.8662 53.7441L10.2361 25.3312C4.91402 19.8571 1.65356 13.1736 0.435652 6.21819L0 0Z",fill:o.colorBg,"data-element-type":"shape"}),p(Ve,{indexes:t,x:20,y:24,width:200,alignHorizontal:"left",alignVertical:"middle",fill:o.colorText,children:n.label}),p(ht,{indexes:t,x:20,y:58,width:220,height:70,fill:o.colorTextSecondary,alignHorizontal:"left",alignVertical:"top",children:n.desc}),p(Dt,{indexes:t,x:r-48,y:12,width:32,height:32,fill:o.colorPrimary})]}))};ct("candy-card-lite",{component:c3,composites:["icon","label","desc"]});var jq=Object.defineProperty,Fq=Object.defineProperties,Bq=Object.getOwnPropertyDescriptors,ws=Object.getOwnPropertySymbols,l3=Object.prototype.hasOwnProperty,u3=Object.prototype.propertyIsEnumerable,h3=(e,t,n)=>t in e?jq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Wq=(e,t)=>{for(var n in t||(t={}))l3.call(t,n)&&h3(e,n,t[n]);if(ws)for(var n of ws(t))u3.call(t,n)&&h3(e,n,t[n]);return e},Gq=(e,t)=>Fq(e,Bq(t)),Vq=(e,t)=>{var n={};for(var r in e)l3.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&ws)for(var r of ws(e))t.indexOf(r)<0&&u3.call(e,r)&&(n[r]=e[r]);return n};const ih=e=>{const t=e,{color:n="black",opacity:r=.8}=t,i=Vq(t,["color","opacity"]);return p("filter",Gq(Wq({id:"drop-shadow",x:"-25%",y:"-25%",width:"200%",height:"200%"},i),{children:p("feDropShadow",{dx:"4",dy:"4",stdDeviation:"4","flood-color":n,"flood-opacity":r})}))};var Yq=Object.defineProperty,Xq=Object.defineProperties,Uq=Object.getOwnPropertyDescriptors,d3=Object.getOwnPropertySymbols,Kq=Object.prototype.hasOwnProperty,Zq=Object.prototype.propertyIsEnumerable,f3=(e,t,n)=>t in e?Yq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qq=(e,t)=>{for(var n in t||(t={}))Kq.call(t,n)&&f3(e,n,t[n]);if(d3)for(var n of d3(t))Zq.call(t,n)&&f3(e,n,t[n]);return e},Jq=(e,t)=>Xq(e,Uq(t));const oh=e=>{const{id:t="linear-gradient",startColor:n="black",stopColor:r="white",direction:i="left-right"}=e;return R("linearGradient",Jq(Qq({id:t},{"left-right":{x1:"0%",y1:"0%",x2:"100%",y2:"0%"},"right-left":{x1:"100%",y1:"0%",x2:"0%",y2:"0%"},"top-bottom":{x1:"0%",y1:"0%",x2:"0%",y2:"100%"},"bottom-top":{x1:"0%",y1:"100%",x2:"0%",y2:"0%"}}[i]),{children:[p("stop",{offset:"0%",stopColor:n}),p("stop",{offset:"100%",stopColor:r})]}))};var ej=Object.defineProperty,tj=Object.defineProperties,nj=Object.getOwnPropertyDescriptors,p3=Object.getOwnPropertySymbols,rj=Object.prototype.hasOwnProperty,ij=Object.prototype.propertyIsEnumerable,g3=(e,t,n)=>t in e?ej(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xo=(e,t)=>{for(var n in t||(t={}))rj.call(t,n)&&g3(e,n,t[n]);if(p3)for(var n of p3(t))ij.call(t,n)&&g3(e,n,t[n]);return e},wo=(e,t)=>tj(e,nj(t));const m3=e=>{const[{datum:t,indexes:n,width:r=300,height:i=80,gap:o=12,positionH:a="normal",iconPadding:s=i/10,themeColors:c},l]=st(e,["width","height","gap","iconPadding"]),u=i/2,h=i-s*2,d=a==="flipped",f=!!t.icon,g=f?r-i-o:r-o*2,y=f?d?o:i:o,m=f?d?"right":"left":"center",v={indexes:n,width:g,alignHorizontal:m,alignVertical:"middle",fontSize:16,fontWeight:"600",fill:c.colorWhite},b=ae(p(Ve,wo(xo({},v),{children:t.label}))),_={indexes:n,width:g,alignHorizontal:m,alignVertical:"top",fontSize:12,lineNumber:1,fill:c.colorWhite},x=ae(t.desc?p(ht,wo(xo({},_),{children:t.desc})):null),w=4,P=b.height+w+x.height,C=(i-P)/2,M=C+b.height+w,S=d?r-i+s:s,E=s;return R(Y,wo(xo({},l),{children:[p(Ke,{children:p(ih,{})}),p(ze,{x:0,y:0,width:r,height:i,fill:c.colorPrimary,rx:u,ry:u,"data-element-type":"shape"}),t.icon&&R(tt,{children:[p(Je,{x:S,y:E,width:h,height:h,fillOpacity:.5,fill:c.colorBg,filter:"url(#drop-shadow)"}),p(Ar,{indexes:n,x:S,y:E,size:h,fill:c.colorBg,colorBg:c.colorPrimary})]}),t.label&&p(Ve,wo(xo({x:y,y:C},v),{children:t.label})),t.desc&&p(ht,wo(xo({x:y,y:M},_),{children:t.desc}))]}))};ct("capsule-item",{component:m3,composites:["icon","label","desc"]});var oj=Object.defineProperty,aj=Object.defineProperties,sj=Object.getOwnPropertyDescriptors,y3=Object.getOwnPropertySymbols,cj=Object.prototype.hasOwnProperty,lj=Object.prototype.propertyIsEnumerable,v3=(e,t,n)=>t in e?oj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ah=(e,t)=>{for(var n in t||(t={}))cj.call(t,n)&&v3(e,n,t[n]);if(y3)for(var n of y3(t))lj.call(t,n)&&v3(e,n,t[n]);return e},sh=(e,t)=>aj(e,sj(t));const b3=e=>{const[{indexes:t,datum:n,themeColors:r,positionH:i="normal",width:o=240,height:a=o},s]=st(e,["width","height"]),c=Math.min(o,a),l=c*.7,u=(c-l)/2,h=l*Math.sqrt(2)/2,d=(c-h)/2,f=ve(r.colorPrimary),g=Ps(f,80,.2),y=Ps(f,20,.8),m=Ps(f,75,.32),v=Ps(f,45,.4),b=f.clone().darken(5).toRgbString(),_=`${r.colorPrimary}-${i}-outer`,x=`${r.colorPrimary}-${i}-inner`,w=i==="flipped"?{x1:"0%",y1:"0%",x2:"100%",y2:"0%"}:{x1:"100%",y1:"0%",x2:"0%",y2:"0%"};return R(Y,sh(ah({},s),{children:[R(Ke,{children:[R("linearGradient",sh(ah({id:_},w),{children:[p("stop",{offset:"0%",stopColor:g}),p("stop",{offset:"100%",stopColor:y})]})),R("linearGradient",sh(ah({id:x},w),{children:[p("stop",{offset:"0%",stopColor:m}),p("stop",{offset:"100%",stopColor:v})]}))]}),p(Je,{width:c,height:c,fill:`url(#${_})`,"data-element-type":"shape"}),p(Je,{x:u,y:u,width:l,height:l,fill:`url(#${x})`,stroke:"#FFFFFF",strokeWidth:1,"data-element-type":"shape"}),p(Ve,{indexes:t,x:d,y:d,width:h,height:h,lineHeight:1.1,alignHorizontal:"center",alignVertical:"middle",fill:b,fontWeight:"500",children:n.label})]}))};ct("circle-node",{component:b3,composites:["label"]});function Ps(e,t,n){return ve.mix(e,"#ffffff",t).setAlpha(n).toRgbString()}var uj=Object.defineProperty,hj=Object.defineProperties,dj=Object.getOwnPropertyDescriptors,_3=Object.getOwnPropertySymbols,fj=Object.prototype.hasOwnProperty,pj=Object.prototype.propertyIsEnumerable,x3=(e,t,n)=>t in e?uj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ch=(e,t)=>{for(var n in t||(t={}))fj.call(t,n)&&x3(e,n,t[n]);if(_3)for(var n of _3(t))pj.call(t,n)&&x3(e,n,t[n]);return e},lh=(e,t)=>hj(e,dj(t));const w3=e=>{var t;const[{datum:n,indexes:r,size:i=120,strokeWidth:o=12,gap:a=8,themeColors:s,valueFormatter:c=w=>`${Math.round(w)}%`},l]=st(e,["size","strokeWidth","gap"]),u=(t=n.value)!=null?t:0,d=Math.min(Math.max(u/100,0),1),f=(i-o)/2,g=i/2,y=o/2,m=i-o,v=d>=1,b=d*360,_=gj(g,g,f,0,b),x={x:y,y,width:m,height:m};return R(Y,lh(ch({},l),{width:i,height:i+a+20,children:[p(ze,{width:i,height:i,fill:"none"}),p(Je,lh(ch({},x),{fill:"none",stroke:"#f0f0f0",strokeWidth:o,"data-element-type":"shape"})),v?p(Je,lh(ch({},x),{fill:"none",stroke:s.colorPrimary,strokeWidth:o,"data-element-type":"shape"})):p(Pe,{d:_,fill:"none",stroke:s.colorPrimary,strokeWidth:o,strokeLinecap:"round","data-element-type":"shape"}),p(vo,{indexes:r,x:o,y:o,width:m-o,height:m-o,fontSize:24,fontWeight:"bold",fill:s.colorPrimary,alignHorizontal:"center",alignVertical:"middle",value:u,formatter:c}),p(Ve,{indexes:r,x:0,y:i+a,width:i,alignHorizontal:"center",fontSize:12,fill:s.colorTextSecondary,children:n.label})]}))};function gj(e,t,n,r,i){const o=P3(e,t,n,i),a=P3(e,t,n,r),s=i-r<=180?"0":"1";return`M ${o.x} ${o.y} A ${n} ${n} 0 ${s} 0 ${a.x} ${a.y}`}function P3(e,t,n,r){const i=(r-90)*Math.PI/180;return{x:e+n*Math.cos(i),y:t+n*Math.sin(i)}}ct("circular-progress",{component:w3,composites:["label","value"]});var mj=Object.defineProperty,yj=Object.defineProperties,vj=Object.getOwnPropertyDescriptors,$3=Object.getOwnPropertySymbols,bj=Object.prototype.hasOwnProperty,_j=Object.prototype.propertyIsEnumerable,C3=(e,t,n)=>t in e?mj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xj=(e,t)=>{for(var n in t||(t={}))bj.call(t,n)&&C3(e,n,t[n]);if($3)for(var n of $3(t))_j.call(t,n)&&C3(e,n,t[n]);return e},wj=(e,t)=>yj(e,vj(t));const O3=e=>{const[{datum:t,indexes:n,width:r=200,height:i=60,iconSize:o=20,gap:a=8,positionH:s="normal",themeColors:c,valueFormatter:l},u]=st(e,["width","height","iconSize","gap"]),h=t.value,d=h!=null,f="compact-shadow",g=s==="flipped"?r-a-o:a,y=s==="flipped"?a:o+2*a,m=r-o-3*a,v=d?m*.8:m,b=d?m*.2:0;return R(Y,wj(xj({},u),{children:[p(Ke,{children:p("filter",{id:f,children:p("feDropShadow",{dx:"0",dy:"2",stdDeviation:"2",floodOpacity:"0.15"})})}),p(ze,{x:0,y:0,width:r,height:i,fill:c.colorBgElevated,stroke:c.colorBgElevated,strokeWidth:1,rx:6,ry:6,filter:`url(#${f})`,"data-element-type":"shape"}),p(ze,{x:s==="flipped"?r-3:0,y:0,width:3,height:i,fill:c.colorPrimary,rx:1.5,ry:1.5,"data-element-type":"shape"}),p(Dt,{indexes:n,x:g,y:(i-o)/2,size:o,fill:c.colorPrimary}),R(ye,{x:y,y:a,width:m,height:i-a*2,flexDirection:"column",justifyContent:"center",alignItems:"flex-start",children:[R(ye,{width:m,flexDirection:"row",justifyContent:"space-between",alignItems:"center",children:[p(Ve,{indexes:n,width:v,alignHorizontal:"left",fontSize:12,fill:c.colorText,children:t.label}),d&&p(vo,{indexes:n,width:b,alignHorizontal:"right",fontSize:12,fontWeight:"bold",fill:c.colorPrimary,value:h,formatter:l})]}),p(ht,{indexes:n,width:m,alignHorizontal:"left",alignVertical:"middle",fontSize:10,fill:c.colorTextSecondary,lineNumber:2,wordWrap:!0,children:t.desc})]})]}))};ct("compact-card",{component:O3,composites:["icon","label","value","desc"]});var Pj=Object.defineProperty,$j=Object.defineProperties,Cj=Object.getOwnPropertyDescriptors,S3=Object.getOwnPropertySymbols,Oj=Object.prototype.hasOwnProperty,Sj=Object.prototype.propertyIsEnumerable,M3=(e,t,n)=>t in e?Pj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mj=(e,t)=>{for(var n in t||(t={}))Oj.call(t,n)&&M3(e,n,t[n]);if(S3)for(var n of S3(t))Sj.call(t,n)&&M3(e,n,t[n]);return e},Ej=(e,t)=>$j(e,Cj(t));const E3=e=>{const[{datum:t,indexes:n,width:r=300,height:i=30,iconSize:o=30,gap:a=5,positionH:s="normal",positionV:c="middle",themeColors:l},u]=st(e,["width","height","iconSize","gap"]),h=r-o-a,d=c==="middle"?(i-o)/2:c==="flipped"?i-o:0;return R(Y,Ej(Mj({},u),{children:[p(Pe,{"data-element-type":"shape",x:s==="flipped"?h+a:0,y:d,fill:l.colorPrimary,width:o,height:o,d:"M14.7273 30C6.54538 30 0 22.9077 0 14.7269C0 6.54617 6.54538 0 14.7273 0C22.9092 0 30 6.54617 30 14.7269C30 22.9077 22.9092 30 14.7273 30ZM24.5454 10.9077C22.9092 9.27307 22.9092 9.27307 22.9092 9.27307C22.3638 8.72692 22.3638 8.7269 21.8181 8.7269C21.2727 8.7269 21.2727 8.72692 20.7273 9.27307C13.0908 16.9077 13.0908 16.9077 13.0908 16.9077C8.72731 12.5461 8.72731 12.5462 8.72731 12.5462C8.18193 12.5462 8.18193 12 7.63654 12L7.09077 12.5462C4.90923 14.1808 4.90923 14.1808 4.90923 14.1808C4.90923 14.7269 4.90923 14.7269 4.90923 15.2731C4.90923 15.8192 4.90923 15.8192 4.90923 16.3654C12 23.4539 12 23.4538 12 23.4538C12.5454 23.4538 12.5454 23.4538 13.0908 23.4538C13.6365 23.4538 13.6365 23.4538 14.1819 23.4538C24.5454 12.5461 24.5454 12.5462 24.5454 12.5462L25.0908 12C25.0908 11.4538 24.5454 10.9077 24.5454 10.9077Z"}),p(Ve,{indexes:n,x:s==="flipped"?0:o+a,width:h,height:i,fontWeight:"normal",alignVertical:"middle",wordWrap:!1,fill:"#666",children:t.label||t.desc})]}))};ct("done-list",{component:E3,composites:["label"]});var Ij=Object.defineProperty,Aj=Object.defineProperties,Tj=Object.getOwnPropertyDescriptors,I3=Object.getOwnPropertySymbols,kj=Object.prototype.hasOwnProperty,Rj=Object.prototype.propertyIsEnumerable,A3=(e,t,n)=>t in e?Ij(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lj=(e,t)=>{for(var n in t||(t={}))kj.call(t,n)&&A3(e,n,t[n]);if(I3)for(var n of I3(t))Rj.call(t,n)&&A3(e,n,t[n]);return e},zj=(e,t)=>Aj(e,Tj(t));const T3=e=>{const[{indexes:t,datum:n,width:r=140,themeColors:i,positionV:o="normal"},a]=st(e,["width"]),s=o!=="flipped",c=o==="normal"?"bottom":"top",l=p(Ve,{indexes:t,width:r,fill:i.colorText,alignHorizontal:"center",alignVertical:c,fontSize:14,children:n.label}),u=p(ht,{indexes:t,width:r,fill:i.colorTextSecondary,alignHorizontal:"center",alignVertical:c,children:n.desc}),h=p(Ar,{indexes:t,fill:i.colorPrimary,colorBg:i.colorWhite}),d=p(Hj,{width:8,height:30,fill:i.colorPrimary,positionV:o}),f=5,g=25,y=30,m=ae(l),v=ae(u),b=ae(h),_=ae(d),x=m.height+v.height+f+_.height-b.height-g,w=b.height+g+y+_.height+f+m.height+v.height;return p(Y,zj(Lj({width:r,height:w},a),{children:R(ye,{flexDirection:"column",alignItems:"center",children:[s?R(tt,{children:[u,l,p(mt,{height:f}),d]}):R(tt,{children:[p(mt,{height:x}),h,p(mt,{height:g})]}),R(yi,{horizontal:"center",vertical:"middle",width:r,height:y,children:[p(Nj,{width:r,height:y,fill:i.colorPrimary}),p(Ne,{width:r,height:y,alignHorizontal:"center",alignVertical:"middle",fill:i.colorWhite,fontWeight:"bold",fontSize:16,children:n.time?n.time:String(t[0]+1).padStart(2,"0").slice(-2)})]}),s?R(tt,{children:[p(mt,{height:g}),h]}):R(tt,{children:[d,p(mt,{height:f}),l,u]})]})}))},Nj=e=>{const{x:t=0,y:n=0,width:r=100,height:i=40,fill:o="#FF356A",size:a=10}=e;return p(Wt,{width:r,height:i,points:[{x:t,y:n},{x:t+r-a,y:n},{x:t+r,y:n+i/2},{x:t+r-a,y:n+i},{x:t,y:n+i},{x:t+a,y:n+i/2}],fill:o,"data-element-type":"shape"})},Hj=e=>{const{x:t=0,y:n=0,width:r=10,height:i=50,fill:o,positionV:a="top"}=e,s=r/2,c=i-s,l=2,u=s;return R(xt,{x:t,y:n,width:r,height:i,children:[p(Je,{width:r,height:r,fill:o,y:a==="top"?0:c-s}),p(Pe,{d:a==="top"?`M${u},${s} L${u},${s+c}`:`M${u},0 L${u},${c-s}`,strokeWidth:l,stroke:o})]})};ct("horizontal-icon-arrow",{component:T3,composites:["icon","label","desc","time"]});var Dj=Object.defineProperty,qj=Object.defineProperties,jj=Object.getOwnPropertyDescriptors,k3=Object.getOwnPropertySymbols,Fj=Object.prototype.hasOwnProperty,Bj=Object.prototype.propertyIsEnumerable,R3=(e,t,n)=>t in e?Dj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,L3=(e,t)=>{for(var n in t||(t={}))Fj.call(t,n)&&R3(e,n,t[n]);if(k3)for(var n of k3(t))Bj.call(t,n)&&R3(e,n,t[n]);return e},z3=(e,t)=>qj(e,jj(t));const N3=e=>{const[{indexes:t,datum:n,width:r=160,themeColors:i,positionH:o="center",positionV:a="normal"},s]=st(e,["width"]),c=o==="normal"?"left":o==="flipped"?"right":"center",l=p(Ve,{indexes:t,width:r,alignHorizontal:c,fill:i.colorPrimary,children:n.label}),u=ae(l),h=n.desc?p(ht,{indexes:t,width:r,fill:i.colorTextSecondary,alignHorizontal:c,alignVertical:a==="flipped"?"top":"bottom",children:n.desc}):null,d=ae(h),g=n.icon?p(Ar,{size:45,indexes:t,colorBg:i.colorBg,fill:i.colorPrimary}):null,y=ae(g),m=n.time?p(Ne,{width:r,height:30,alignHorizontal:"center",alignVertical:"middle",fill:i.colorPrimary,fontSize:18,fontWeight:"bold",children:n.time}):null,v=ae(m),b=18,_=R(yi,{horizontal:"center",vertical:"middle",width:r,height:b,children:[p(ze,{width:r,height:b,fill:i.colorPrimary,"data-element-type":"shape"}),p(Je,{width:b+6,height:b+6,fill:i.colorBg,fillOpacity:.5,"data-element-type":"shape"}),p(Je,{width:12,height:12,fill:"white","data-element-type":"shape"})]}),x=u.height+d.height,w=y.height+v.height+5,P=Math.abs(w-x),$=w>x?P:0,C=x>w?P:0;return a==="flipped"?R(ye,z3(L3({},s),{flexDirection:"column",alignItems:"center",children:[p(mt,{height:C}),m,g,p(mt,{height:5}),_,l,h,p(mt,{height:$})]})):R(ye,z3(L3({},s),{flexDirection:"column",alignItems:"center",children:[p(mt,{height:$}),l,h,_,p(mt,{height:5}),g,m,p(mt,{height:C})]}))};ct("horizontal-icon-line",{component:N3,composites:["icon","label","desc"]});var Wj=Object.defineProperty,Gj=Object.defineProperties,Vj=Object.getOwnPropertyDescriptors,H3=Object.getOwnPropertySymbols,Yj=Object.prototype.hasOwnProperty,Xj=Object.prototype.propertyIsEnumerable,D3=(e,t,n)=>t in e?Wj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Uj=(e,t)=>{for(var n in t||(t={}))Yj.call(t,n)&&D3(e,n,t[n]);if(H3)for(var n of H3(t))Xj.call(t,n)&&D3(e,n,t[n]);return e},Kj=(e,t)=>Gj(e,Vj(t));const q3=e=>{var t;const[{datum:n,indexes:r,size:i=80,iconSize:o=28,badgeSize:a=24,gap:s=8,themeColors:c,width:l=84,height:u=105},h]=st(e,["size","iconSize","badgeSize","gap"]),d=(t=n.value)!=null?t:0,f=`${c.colorPrimary}-icon`,g="#ff6b6b-badge";return R(Y,Kj(Uj({},h),{width:l,height:u,children:[R(Ke,{children:[R("radialGradient",{id:f,cx:"50%",cy:"30%",r:"70%",children:[p("stop",{offset:"0%",stopColor:ve(c.colorPrimary).lighten(30).toHexString()}),p("stop",{offset:"100%",stopColor:c.colorPrimary})]}),R("linearGradient",{id:g,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[p("stop",{offset:"0%",stopColor:"#ff6b6b"}),p("stop",{offset:"100%",stopColor:"#ee5a52"})]})]}),p(Je,{x:0,y:0,width:i,height:i,fill:`url(#${f})`,"data-element-type":"shape"}),p(Dt,{indexes:r,x:(i-o)/2,y:(i-o)/2,size:o,fill:c.colorPrimaryText}),p(Je,{x:i-a+4,width:a,height:a,fill:`url(#${g})`}),p(Ne,{x:i-a+4,width:a,height:a,fontSize:10,fontWeight:"bold",fill:c.colorWhite,alignHorizontal:"center",alignVertical:"middle",children:d>99?"99+":Math.round(d)}),p(Ve,{indexes:r,x:0,y:i+s,width:i,alignHorizontal:"center",fontSize:12,fill:c.colorText,children:n.label})]}))};ct("icon-badge",{component:q3,composites:["icon","label"]});var Zj=Object.defineProperty,Qj=Object.defineProperties,Jj=Object.getOwnPropertyDescriptors,j3=Object.getOwnPropertySymbols,eF=Object.prototype.hasOwnProperty,tF=Object.prototype.propertyIsEnumerable,F3=(e,t,n)=>t in e?Zj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nF=(e,t)=>{for(var n in t||(t={}))eF.call(t,n)&&F3(e,n,t[n]);if(j3)for(var n of j3(t))tF.call(t,n)&&F3(e,n,t[n]);return e},rF=(e,t)=>Qj(e,Jj(t));const B3=e=>{const[{datum:t,indexes:n,width:r=200,borderRadius:i=12,padding:o=16,separatorHeight:a=2,indexFontSize:s=20,labelFontSize:c=16,gap:l=8,themeColors:u},h]=st(e,["width","height","borderRadius","padding","separatorHeight","indexFontSize","labelFontSize","gap"]),d=n[0]+1,f=String(d).padStart(2,"0"),g=t.label!==void 0,y=t.desc!==void 0,m=ve.mix(u.colorPrimary,u.colorWhite,40).toHexString(),v=u.colorBgElevated||u.colorWhite,b=r-2*o,_=ae(p(Ne,{fontSize:s,fontWeight:"bold",children:f})),x=b-_.width-l,w=g?ae(p(Ve,{indexes:n,width:x,fontSize:c,fontWeight:"bold",x:s,children:t.label})):{height:0},P=y?ae(p(ht,{indexes:n,width:b,fontSize:14,lineHeight:1.5,wordWrap:!0,children:t.desc})):{height:0},$=Math.max(_.height,w.height),C=o*2+$+(g||y?l:0)+a+(y?l:0)+P.height;return R(Y,rF(nF({},h),{width:r,height:C,children:[p(ze,{x:0,y:0,width:r,height:C,rx:i,ry:i,fill:v,stroke:ve(v).darken(5).toHexString(),strokeWidth:.5,"data-element-type":"shape"}),R(Y,{x:o,y:o,children:[R(Y,{x:0,y:0,children:[p(Ne,{x:0,y:0,fontSize:s,fontWeight:"bold",fill:u.colorPrimary,alignVertical:"top",children:f}),g&&p(Ve,{indexes:n,x:s+l,y:0,width:x,fontSize:c,fontWeight:"bold",fill:u.colorTextSecondary,alignVertical:"top",children:t.label})]}),p(ze,{x:0,y:$+l,width:b,height:a,fill:m,"data-element-type":"shape"}),y&&p(ht,{indexes:n,x:0,y:$+l+a+l,width:b,fontSize:14,lineHeight:1.5,wordWrap:!0,fill:u.colorTextSecondary,children:t.desc})]})]}))};ct("indexed-card",{component:B3,composites:["label","desc"]});var iF=Object.defineProperty,oF=Object.defineProperties,aF=Object.getOwnPropertyDescriptors,W3=Object.getOwnPropertySymbols,sF=Object.prototype.hasOwnProperty,cF=Object.prototype.propertyIsEnumerable,G3=(e,t,n)=>t in e?iF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lF=(e,t)=>{for(var n in t||(t={}))sF.call(t,n)&&G3(e,n,t[n]);if(W3)for(var n of W3(t))cF.call(t,n)&&G3(e,n,t[n]);return e},uF=(e,t)=>oF(e,aF(t));const V3=e=>{const[{indexes:t,datum:n,width:r=140,iconSize:i=24,themeColors:o},a]=st(e,["width","iconSize"]),{label:s,desc:c}=n,l=8,u=16,h=12,d=u+h,f=r-d,g=60,y=i+44,m=u,v=g+h,b=g+u+h,_=[{x:0,y:b},{x:m,y:v},{x:m,y:b}],x=r-m-h,w=m+h,P=w+x,$=v+l/2,C=$+y,M=`M ${w} ${C} L ${w} ${$} L ${P} ${$}`,S=l/2,E=w+S,I=$+S,O=8;return R(Y,uF(lF({},a),{children:[p(ht,{indexes:t,x:d,width:f,height:g,fontSize:12,alignHorizontal:"left",alignVertical:"bottom",fill:o.colorTextSecondary,children:c}),p(Wt,{points:_,fill:o.colorPrimary,opacity:.9,width:u,height:u,"data-element-type":"shape"}),p(Pe,{d:M,stroke:o.colorPrimary,strokeWidth:l,fill:"none","data-element-type":"shape"}),p(Dt,{indexes:t,x:E+x/2-i/2,y:I+O,size:i,fill:o.colorPrimary}),p(Ve,{indexes:t,x:E,y:I+i+O*2,width:x,fontSize:14,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:o.colorText,children:s})]}))};ct("l-corner-card",{component:V3,composites:["icon","label","desc"]});var hF=Object.defineProperty,dF=Object.defineProperties,fF=Object.getOwnPropertyDescriptors,Y3=Object.getOwnPropertySymbols,pF=Object.prototype.hasOwnProperty,gF=Object.prototype.propertyIsEnumerable,X3=(e,t,n)=>t in e?hF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mF=(e,t)=>{for(var n in t||(t={}))pF.call(t,n)&&X3(e,n,t[n]);if(Y3)for(var n of Y3(t))gF.call(t,n)&&X3(e,n,t[n]);return e},yF=(e,t)=>dF(e,fF(t));const U3=e=>{var t,n;const[{datum:r,indexes:i,width:o=280,height:a=160,showStripe:s=!0,showGradient:c=!0,showBottomShade:l=!0,themeColors:u},h]=st(e,["width","height","showStripe","showGradient","showBottomShade"]),d=(t=r.label)==null?void 0:t[0].toUpperCase(),f=(n=r.label)==null?void 0:n.toUpperCase(),g=u.colorPrimary,y=ve(g),m=4,v=6,b=45,_=40,x=12,P=y.clone().darken(4).toHexString(),$=y.clone().lighten(x).toHexString(),C="rgba(255, 255, 255, 0)",M="rgba(0, 0, 0, 0.03)",S=`letter-card-${i.join("-")}`,E=`${S}-gradient`,I=`${S}-pattern`,O=`${S}-shade`,T=m+v,F=1,z=96,j=z*F,H=16,W=H*F,B=a/16,X=j+B+W,D=(a-X)/2,k=D+j+B;return R(Y,yF(mF({},h),{width:o,height:a,children:[R(Ke,{children:[c&&R("linearGradient",{id:E,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[p("stop",{offset:"0%",stopColor:P}),p("stop",{offset:"100%",stopColor:$})]}),s&&R("pattern",{id:I,patternUnits:"userSpaceOnUse",width:T,height:T,patternTransform:`rotate(${b})`,children:[p("rect",{x:"0",y:"0",width:T,height:T,fill:C}),p("rect",{x:"0",y:"0",width:m,height:T,fill:M})]}),l&&R("linearGradient",{id:O,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[p("stop",{offset:"0%",stopColor:"rgba(0,0,0,0)"}),p("stop",{offset:"100%",stopColor:"rgba(0,0,0,0.16)"})]})]}),p(ze,{x:0,y:0,width:o,height:a,fill:c?`url(#${E})`:g,rx:0,ry:0,"data-element-type":"shape"}),s&&p(ze,{x:0,y:0,width:o,height:a,fill:`url(#${I})`,rx:0,ry:0}),l&&p(ze,{x:0,y:a-_,width:o,height:_,fill:`url(#${O})`,rx:0,ry:0}),d&&p(Ve,{indexes:i,x:0,y:D,width:o,fontSize:z,fontWeight:"bold",fill:"#FFFFFF",alignHorizontal:"center",alignVertical:"top",lineHeight:1,children:d}),p(Ve,{indexes:i,x:0,y:k,width:o,fontSize:H,fontWeight:"bold",fill:"#FFFFFF",alignHorizontal:"center",alignVertical:"middle",lineHeight:1,children:f})]}))};ct("letter-card",{component:U3,composites:["label"]});var vF=Object.defineProperty,bF=Object.defineProperties,_F=Object.getOwnPropertyDescriptors,K3=Object.getOwnPropertySymbols,xF=Object.prototype.hasOwnProperty,wF=Object.prototype.propertyIsEnumerable,Z3=(e,t,n)=>t in e?vF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,PF=(e,t)=>{for(var n in t||(t={}))xF.call(t,n)&&Z3(e,n,t[n]);if(K3)for(var n of K3(t))wF.call(t,n)&&Z3(e,n,t[n]);return e},$F=(e,t)=>bF(e,_F(t));const Q3=e=>{var t,n,r;const[{datum:i,indexes:o,width:a,themeColors:s,positionH:c="normal",positionV:l="center",formatter:u=F=>F||"",usePaletteColor:h=!1,showUnderline:d=!1,underlineGap:f=6,underlineExtend:g=8,underlineThickness:y=2},m]=st(e,["width","formatter","usePaletteColor","showUnderline","underlineGap","underlineExtend","underlineThickness"]),v=u((n=(t=i.label)!=null?t:i.desc)!=null?n:""),b=c==="flipped"?"right":c==="center"?"center":"left",_=ae(p(Ve,{indexes:o,width:a,children:v})),x=a!=null?a:_.width,w=_.height,P=d?x+g*2:0,$=w+(d?f+y:0),C=d?Math.max(x,P):x,M=(r=m.height)!=null?r:$,S=l==="middle"?(M-$)/2:l==="flipped"?M-$:0,E=b==="right"?C-x:b==="center"?(C-x)/2:0,I=S,O=b==="right"?C-P:b==="center"?(C-P)/2:0,T=M;return R(Y,$F(PF({},m),{width:C,height:M,children:[p(Ve,{indexes:o,x:E,y:I,width:x,height:w,alignHorizontal:b,alignVertical:l==="flipped"?"bottom":l==="center"?"middle":"top",fill:h?s.colorPrimary:s.colorText,children:v}),d&&p(Pe,{d:`M 0 ${y/2} L ${P} ${y/2}`,x:O,y:T-y/2,width:P,height:y,stroke:s.colorPrimary,strokeWidth:y,fill:"none",strokeLinecap:"round","data-element-type":"shape"})]}))};ct("lined-text",{component:Q3,composites:["label"]});var CF=Object.defineProperty,OF=Object.defineProperties,SF=Object.getOwnPropertyDescriptors,J3=Object.getOwnPropertySymbols,MF=Object.prototype.hasOwnProperty,EF=Object.prototype.propertyIsEnumerable,ex=(e,t,n)=>t in e?CF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,IF=(e,t)=>{for(var n in t||(t={}))MF.call(t,n)&&ex(e,n,t[n]);if(J3)for(var n of J3(t))EF.call(t,n)&&ex(e,n,t[n]);return e},AF=(e,t)=>OF(e,SF(t));const tx=e=>{const[{datum:t,indexes:n,width:r=300,pillWidth:i=120,pillHeight:o=36,gap:a=16,positionH:s="normal",themeColors:c},l]=st(e,["width","pillWidth","pillHeight","gap"]),u=!!t.desc,h=u?r:i,d=u?s==="center"?(h-i)/2:s==="flipped"?h-i:0:0,f=0,g=0,y=o+a,m=h,v=`drop-shadow-${c.colorPrimary}`,b="linear-gradient-white-top-bottom";return R(Y,AF(IF({},l),{children:[R(Ke,{children:[p(ih,{id:v,color:c.colorPrimary}),p(oh,{id:b,startColor:"#fff",stopColor:"#ffffff33",direction:"top-bottom"})]}),p(ze,{x:d,y:f,width:i,height:o,fill:c.colorPrimaryBg,stroke:c.colorPrimary,rx:o/2,ry:o/2,filter:`url(#${v})`,"data-element-type":"shape"}),p(ze,{x:d,y:f,width:i,height:o,fill:`url(#${b})`,opacity:c.isDarkMode?.4:.7,rx:o/2,ry:o/2}),p(Ve,{indexes:n,x:d,y:f,width:i,height:o,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"500",fill:c.colorText,children:t.label}),t.desc&&p(ht,{indexes:n,x:g,y,width:m,alignHorizontal:s==="center"?"center":s==="flipped"?"right":"left",fontSize:12,fill:c.colorTextSecondary,lineNumber:2,wordWrap:!0,children:t.desc})]}))};ct("pill-badge",{component:tx,composites:["label","desc"]});var TF=Object.defineProperty,kF=Object.defineProperties,RF=Object.getOwnPropertyDescriptors,nx=Object.getOwnPropertySymbols,LF=Object.prototype.hasOwnProperty,zF=Object.prototype.propertyIsEnumerable,rx=(e,t,n)=>t in e?TF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,NF=(e,t)=>{for(var n in t||(t={}))LF.call(t,n)&&rx(e,n,t[n]);if(nx)for(var n of nx(t))zF.call(t,n)&&rx(e,n,t[n]);return e},HF=(e,t)=>kF(e,RF(t));const ix=e=>{var t;const[{indexes:n,datum:r,width:i=120,themeColors:o,positionH:a="normal",positionV:s="center",formatter:c=y=>y||"",usePaletteColor:l=!1,lineNumber:u=1},h]=st(e,["width","formatter","usePaletteColor","lineNumber"]),d=14,f=1.4,g=(t=h.height)!=null?t:Math.ceil(u*f*d);return p(Ve,HF(NF({},h),{indexes:n,width:i,height:g,lineHeight:f,fill:l?o.colorPrimary:o.colorText,fontSize:d,fontWeight:"regular",alignHorizontal:a==="flipped"?"right":a==="center"?"center":"left",alignVertical:s==="flipped"?"bottom":s==="center"?"middle":"top",children:c(r.label||r.desc)}))};ct("plain-text",{component:ix,composites:["label"]});function $s(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function DF(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ox(e){let t,n,r;e.length!==2?(t=$s,n=(s,c)=>$s(e(s),c),r=(s,c)=>e(s)-c):(t=e===$s||e===DF?e:qF,n=e,r=e);function i(s,c,l=0,u=s.length){if(l<u){if(t(c,c)!==0)return u;do{const h=l+u>>>1;n(s[h],c)<0?l=h+1:u=h}while(l<u)}return l}function o(s,c,l=0,u=s.length){if(l<u){if(t(c,c)!==0)return u;do{const h=l+u>>>1;n(s[h],c)<=0?l=h+1:u=h}while(l<u)}return l}function a(s,c,l=0,u=s.length){const h=i(s,c,l,u-1);return h>l&&r(s[h-1],c)>-r(s[h],c)?h-1:h}return{left:i,center:a,right:o}}function qF(){return 0}function jF(e){return e===null?NaN:+e}const FF=ox($s).right;ox(jF).center;const BF=Math.sqrt(50),WF=Math.sqrt(10),GF=Math.sqrt(2);function Cs(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=BF?10:o>=WF?5:o>=GF?2:1;let s,c,l;return i<0?(l=Math.pow(10,-i)/a,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=Math.pow(10,i)*a,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?Cs(e,t,n*2):[s,c,l]}function VF(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,a]=r?Cs(t,e,n):Cs(e,t,n);if(!(o>=i))return[];const s=o-i+1,c=new Array(s);if(r)if(a<0)for(let l=0;l<s;++l)c[l]=(o-l)/-a;else for(let l=0;l<s;++l)c[l]=(o-l)*a;else if(a<0)for(let l=0;l<s;++l)c[l]=(i+l)/-a;else for(let l=0;l<s;++l)c[l]=(i+l)*a;return c}function uh(e,t,n){return t=+t,e=+e,n=+n,Cs(e,t,n)[2]}function YF(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?uh(t,e,n):uh(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}var XF={value:()=>{}};function hh(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Os(n)}function Os(e){this._=e}function UF(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Os.prototype=hh.prototype={constructor:Os,on:function(e,t){var n=this._,r=UF(e+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(e=r[o]).type)&&(i=KF(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=r[o]).type)n[i]=ax(n[i],e.name,t);else if(t==null)for(i in n)n[i]=ax(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Os(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};function KF(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function ax(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=XF,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var dh="http://www.w3.org/1999/xhtml";const sx={svg:"http://www.w3.org/2000/svg",xhtml:dh,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ss(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),sx.hasOwnProperty(t)?{space:sx[t],local:e}:e}function ZF(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===dh&&t.documentElement.namespaceURI===dh?t.createElement(e):t.createElementNS(n,e)}}function QF(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function cx(e){var t=Ss(e);return(t.local?QF:ZF)(t)}function JF(){}function fh(e){return e==null?JF:function(){return this.querySelector(e)}}function eB(e){typeof e!="function"&&(e=fh(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=new Array(a),c,l,u=0;u<a;++u)(c=o[u])&&(l=e.call(c,c.__data__,u,o))&&("__data__"in c&&(l.__data__=c.__data__),s[u]=l);return new fn(r,this._parents)}function tB(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function nB(){return[]}function lx(e){return e==null?nB:function(){return this.querySelectorAll(e)}}function rB(e){return function(){return tB(e.apply(this,arguments))}}function iB(e){typeof e=="function"?e=rB(e):e=lx(e);for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var a=t[o],s=a.length,c,l=0;l<s;++l)(c=a[l])&&(r.push(e.call(c,c.__data__,l,a)),i.push(c));return new fn(r,i)}function ux(e){return function(){return this.matches(e)}}function hx(e){return function(t){return t.matches(e)}}var oB=Array.prototype.find;function aB(e){return function(){return oB.call(this.children,e)}}function sB(){return this.firstElementChild}function cB(e){return this.select(e==null?sB:aB(typeof e=="function"?e:hx(e)))}var lB=Array.prototype.filter;function uB(){return Array.from(this.children)}function hB(e){return function(){return lB.call(this.children,e)}}function dB(e){return this.selectAll(e==null?uB:hB(typeof e=="function"?e:hx(e)))}function fB(e){typeof e!="function"&&(e=ux(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=[],c,l=0;l<a;++l)(c=o[l])&&e.call(c,c.__data__,l,o)&&s.push(c);return new fn(r,this._parents)}function dx(e){return new Array(e.length)}function pB(){return new fn(this._enter||this._groups.map(dx),this._parents)}function Ms(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Ms.prototype={constructor:Ms,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function gB(e){return function(){return e}}function mB(e,t,n,r,i,o){for(var a=0,s,c=t.length,l=o.length;a<l;++a)(s=t[a])?(s.__data__=o[a],r[a]=s):n[a]=new Ms(e,o[a]);for(;a<c;++a)(s=t[a])&&(i[a]=s)}function yB(e,t,n,r,i,o,a){var s,c,l=new Map,u=t.length,h=o.length,d=new Array(u),f;for(s=0;s<u;++s)(c=t[s])&&(d[s]=f=a.call(c,c.__data__,s,t)+"",l.has(f)?i[s]=c:l.set(f,c));for(s=0;s<h;++s)f=a.call(e,o[s],s,o)+"",(c=l.get(f))?(r[s]=c,c.__data__=o[s],l.delete(f)):n[s]=new Ms(e,o[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(d[s])===c&&(i[s]=c)}function vB(e){return e.__data__}function bB(e,t){if(!arguments.length)return Array.from(this,vB);var n=t?yB:mB,r=this._parents,i=this._groups;typeof e!="function"&&(e=gB(e));for(var o=i.length,a=new Array(o),s=new Array(o),c=new Array(o),l=0;l<o;++l){var u=r[l],h=i[l],d=h.length,f=_B(e.call(u,u&&u.__data__,l,r)),g=f.length,y=s[l]=new Array(g),m=a[l]=new Array(g),v=c[l]=new Array(d);n(u,h,y,m,v,f,t);for(var b=0,_=0,x,w;b<g;++b)if(x=y[b]){for(b>=_&&(_=b+1);!(w=m[_])&&++_<g;);x._next=w||null}}return a=new fn(a,r),a._enter=s,a._exit=c,a}function _B(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function xB(){return new fn(this._exit||this._groups.map(dx),this._parents)}function wB(e,t,n){var r=this.enter(),i=this,o=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function PB(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),c=0;c<a;++c)for(var l=n[c],u=r[c],h=l.length,d=s[c]=new Array(h),f,g=0;g<h;++g)(f=l[g]||u[g])&&(d[g]=f);for(;c<i;++c)s[c]=n[c];return new fn(s,this._parents)}function $B(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function CB(e){e||(e=OB);function t(h,d){return h&&d?e(h.__data__,d.__data__):!h-!d}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,c=i[o]=new Array(s),l,u=0;u<s;++u)(l=a[u])&&(c[u]=l);c.sort(t)}return new fn(i,this._parents).order()}function OB(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function SB(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function MB(){return Array.from(this)}function EB(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function IB(){let e=0;for(const t of this)++e;return e}function AB(){return!this.node()}function TB(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&e.call(s,s.__data__,o,i);return this}function kB(e){return function(){this.removeAttribute(e)}}function RB(e){return function(){this.removeAttributeNS(e.space,e.local)}}function LB(e,t){return function(){this.setAttribute(e,t)}}function zB(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function NB(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function HB(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function DB(e,t){var n=Ss(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?RB:kB:typeof t=="function"?n.local?HB:NB:n.local?zB:LB)(n,t))}function fx(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function qB(e){return function(){this.style.removeProperty(e)}}function jB(e,t,n){return function(){this.style.setProperty(e,t,n)}}function FB(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function BB(e,t,n){return arguments.length>1?this.each((t==null?qB:typeof t=="function"?FB:jB)(e,t,n==null?"":n)):vi(this.node(),e)}function vi(e,t){return e.style.getPropertyValue(t)||fx(e).getComputedStyle(e,null).getPropertyValue(t)}function WB(e){return function(){delete this[e]}}function GB(e,t){return function(){this[e]=t}}function VB(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function YB(e,t){return arguments.length>1?this.each((t==null?WB:typeof t=="function"?VB:GB)(e,t)):this.node()[e]}function px(e){return e.trim().split(/^|\s+/)}function ph(e){return e.classList||new gx(e)}function gx(e){this._node=e,this._names=px(e.getAttribute("class")||"")}gx.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function mx(e,t){for(var n=ph(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function yx(e,t){for(var n=ph(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function XB(e){return function(){mx(this,e)}}function UB(e){return function(){yx(this,e)}}function KB(e,t){return function(){(t.apply(this,arguments)?mx:yx)(this,e)}}function ZB(e,t){var n=px(e+"");if(arguments.length<2){for(var r=ph(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?KB:t?XB:UB)(n,t))}function QB(){this.textContent=""}function JB(e){return function(){this.textContent=e}}function eW(e){return function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}}function tW(e){return arguments.length?this.each(e==null?QB:(typeof e=="function"?eW:JB)(e)):this.node().textContent}function nW(){this.innerHTML=""}function rW(e){return function(){this.innerHTML=e}}function iW(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}}function oW(e){return arguments.length?this.each(e==null?nW:(typeof e=="function"?iW:rW)(e)):this.node().innerHTML}function aW(){this.nextSibling&&this.parentNode.appendChild(this)}function sW(){return this.each(aW)}function cW(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function lW(){return this.each(cW)}function uW(e){var t=typeof e=="function"?e:cx(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function hW(){return null}function dW(e,t){var n=typeof e=="function"?e:cx(e),r=t==null?hW:typeof t=="function"?t:fh(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function fW(){var e=this.parentNode;e&&e.removeChild(this)}function pW(){return this.each(fW)}function gW(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function mW(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function yW(e){return this.select(e?mW:gW)}function vW(e){return arguments.length?this.property("__data__",e):this.node().__data__}function bW(e){return function(t){e.call(this,t,this.__data__)}}function _W(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function xW(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n<i;++n)o=t[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++r]=o;++r?t.length=r:delete this.__on}}}function wW(e,t,n){return function(){var r=this.__on,i,o=bW(t);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=t;return}}this.addEventListener(e.type,o,n),i={type:e.type,name:e.name,value:t,listener:o,options:n},r?r.push(i):this.__on=[i]}}function PW(e,t,n){var r=_W(e+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<o;++i)if((a=r[i]).type===u.type&&a.name===u.name)return u.value}return}for(s=t?wW:xW,i=0;i<o;++i)this.each(s(r[i],t,n));return this}function vx(e,t,n){var r=fx(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function $W(e,t){return function(){return vx(this,e,t)}}function CW(e,t){return function(){return vx(this,e,t.apply(this,arguments))}}function OW(e,t){return this.each((typeof t=="function"?CW:$W)(e,t))}function*SW(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var MW=[null];function fn(e,t){this._groups=e,this._parents=t}function Po(){return new fn([[document.documentElement]],MW)}function EW(){return this}fn.prototype=Po.prototype={constructor:fn,select:eB,selectAll:iB,selectChild:cB,selectChildren:dB,filter:fB,data:bB,enter:pB,exit:xB,join:wB,merge:PB,selection:EW,order:$B,sort:CB,call:SB,nodes:MB,node:EB,size:IB,empty:AB,each:TB,attr:DB,style:BB,property:YB,classed:ZB,text:tW,html:oW,raise:sW,lower:lW,append:uW,insert:dW,remove:pW,clone:yW,datum:vW,on:PW,dispatch:OW,[Symbol.iterator]:SW};function gh(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function bx(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function $o(){}var Co=.7,Es=1/Co,bi="\\s*([+-]?\\d+)\\s*",Oo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Mn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",IW=/^#([0-9a-f]{3,8})$/,AW=new RegExp(`^rgb\\(${bi},${bi},${bi}\\)$`),TW=new RegExp(`^rgb\\(${Mn},${Mn},${Mn}\\)$`),kW=new RegExp(`^rgba\\(${bi},${bi},${bi},${Oo}\\)$`),RW=new RegExp(`^rgba\\(${Mn},${Mn},${Mn},${Oo}\\)$`),LW=new RegExp(`^hsl\\(${Oo},${Mn},${Mn}\\)$`),zW=new RegExp(`^hsla\\(${Oo},${Mn},${Mn},${Oo}\\)$`),_x={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};gh($o,kr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:xx,formatHex:xx,formatHex8:NW,formatHsl:HW,formatRgb:wx,toString:wx});function xx(){return this.rgb().formatHex()}function NW(){return this.rgb().formatHex8()}function HW(){return Sx(this).formatHsl()}function wx(){return this.rgb().formatRgb()}function kr(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=IW.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Px(t):n===3?new Jt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Is(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Is(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=AW.exec(e))?new Jt(t[1],t[2],t[3],1):(t=TW.exec(e))?new Jt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=kW.exec(e))?Is(t[1],t[2],t[3],t[4]):(t=RW.exec(e))?Is(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=LW.exec(e))?Ox(t[1],t[2]/100,t[3]/100,1):(t=zW.exec(e))?Ox(t[1],t[2]/100,t[3]/100,t[4]):_x.hasOwnProperty(e)?Px(_x[e]):e==="transparent"?new Jt(NaN,NaN,NaN,0):null}function Px(e){return new Jt(e>>16&255,e>>8&255,e&255,1)}function Is(e,t,n,r){return r<=0&&(e=t=n=NaN),new Jt(e,t,n,r)}function DW(e){return e instanceof $o||(e=kr(e)),e?(e=e.rgb(),new Jt(e.r,e.g,e.b,e.opacity)):new Jt}function mh(e,t,n,r){return arguments.length===1?DW(e):new Jt(e,t,n,r==null?1:r)}function Jt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}gh(Jt,mh,bx($o,{brighter(e){return e=e==null?Es:Math.pow(Es,e),new Jt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Co:Math.pow(Co,e),new Jt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Jt(Rr(this.r),Rr(this.g),Rr(this.b),As(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:$x,formatHex:$x,formatHex8:qW,formatRgb:Cx,toString:Cx}));function $x(){return`#${Lr(this.r)}${Lr(this.g)}${Lr(this.b)}`}function qW(){return`#${Lr(this.r)}${Lr(this.g)}${Lr(this.b)}${Lr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Cx(){const e=As(this.opacity);return`${e===1?"rgb(":"rgba("}${Rr(this.r)}, ${Rr(this.g)}, ${Rr(this.b)}${e===1?")":`, ${e})`}`}function As(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Rr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Lr(e){return e=Rr(e),(e<16?"0":"")+e.toString(16)}function Ox(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new pn(e,t,n,r)}function Sx(e){if(e instanceof pn)return new pn(e.h,e.s,e.l,e.opacity);if(e instanceof $o||(e=kr(e)),!e)return new pn;if(e instanceof pn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,c=(o+i)/2;return s?(t===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-t)/s+2:a=(t-n)/s+4,s/=c<.5?o+i:2-o-i,a*=60):s=c>0&&c<1?0:a,new pn(a,s,c,e.opacity)}function jW(e,t,n,r){return arguments.length===1?Sx(e):new pn(e,t,n,r==null?1:r)}function pn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}gh(pn,jW,bx($o,{brighter(e){return e=e==null?Es:Math.pow(Es,e),new pn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Co:Math.pow(Co,e),new pn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Jt(yh(e>=240?e-240:e+120,i,r),yh(e,i,r),yh(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new pn(Mx(this.h),Ts(this.s),Ts(this.l),As(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=As(this.opacity);return`${e===1?"hsl(":"hsla("}${Mx(this.h)}, ${Ts(this.s)*100}%, ${Ts(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Mx(e){return e=(e||0)%360,e<0?e+360:e}function Ts(e){return Math.max(0,Math.min(1,e||0))}function yh(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const vh=e=>()=>e;function FW(e,t){return function(n){return e+n*t}}function BW(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function WW(e){return(e=+e)==1?Ex:function(t,n){return n-t?BW(t,n,e):vh(isNaN(t)?n:t)}}function Ex(e,t){var n=t-e;return n?FW(e,n):vh(isNaN(e)?t:e)}const ks=(function e(t){var n=WW(t);function r(i,o){var a=n((i=mh(i)).r,(o=mh(o)).r),s=n(i.g,o.g),c=n(i.b,o.b),l=Ex(i.opacity,o.opacity);return function(u){return i.r=a(u),i.g=s(u),i.b=c(u),i.opacity=l(u),i+""}}return r.gamma=e,r})(1);function GW(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function VW(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function YW(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=xh(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function XW(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function gn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function UW(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=xh(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var bh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,_h=new RegExp(bh.source,"g");function KW(e){return function(){return e}}function ZW(e){return function(t){return e(t)+""}}function Ix(e,t){var n=bh.lastIndex=_h.lastIndex=0,r,i,o,a=-1,s=[],c=[];for(e=e+"",t=t+"";(r=bh.exec(e))&&(i=_h.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,c.push({i:a,x:gn(r,i)})),n=_h.lastIndex;return n<t.length&&(o=t.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?c[0]?ZW(c[0].x):KW(t):(t=c.length,function(l){for(var u=0,h;u<t;++u)s[(h=c[u]).i]=h.x(l);return s.join("")})}function xh(e,t){var n=typeof t,r;return t==null||n==="boolean"?vh(t):(n==="number"?gn:n==="string"?(r=kr(t))?(t=r,ks):Ix:t instanceof kr?ks:t instanceof Date?XW:VW(t)?GW:Array.isArray(t)?YW:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?UW:gn)(e,t)}function QW(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Ax=180/Math.PI,wh={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Tx(e,t,n,r,i,o){var a,s,c;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*Ax,skewX:Math.atan(c)*Ax,scaleX:a,scaleY:s}}var Rs;function JW(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?wh:Tx(t.a,t.b,t.c,t.d,t.e,t.f)}function eG(e){return e==null||(Rs||(Rs=document.createElementNS("http://www.w3.org/2000/svg","g")),Rs.setAttribute("transform",e),!(e=Rs.transform.baseVal.consolidate()))?wh:(e=e.matrix,Tx(e.a,e.b,e.c,e.d,e.e,e.f))}function kx(e,t,n,r){function i(l){return l.length?l.pop()+" ":""}function o(l,u,h,d,f,g){if(l!==h||u!==d){var y=f.push("translate(",null,t,null,n);g.push({i:y-4,x:gn(l,h)},{i:y-2,x:gn(u,d)})}else(h||d)&&f.push("translate("+h+t+d+n)}function a(l,u,h,d){l!==u?(l-u>180?u+=360:u-l>180&&(l+=360),d.push({i:h.push(i(h)+"rotate(",null,r)-2,x:gn(l,u)})):u&&h.push(i(h)+"rotate("+u+r)}function s(l,u,h,d){l!==u?d.push({i:h.push(i(h)+"skewX(",null,r)-2,x:gn(l,u)}):u&&h.push(i(h)+"skewX("+u+r)}function c(l,u,h,d,f,g){if(l!==h||u!==d){var y=f.push(i(f)+"scale(",null,",",null,")");g.push({i:y-4,x:gn(l,h)},{i:y-2,x:gn(u,d)})}else(h!==1||d!==1)&&f.push(i(f)+"scale("+h+","+d+")")}return function(l,u){var h=[],d=[];return l=e(l),u=e(u),o(l.translateX,l.translateY,u.translateX,u.translateY,h,d),a(l.rotate,u.rotate,h,d),s(l.skewX,u.skewX,h,d),c(l.scaleX,l.scaleY,u.scaleX,u.scaleY,h,d),l=u=null,function(f){for(var g=-1,y=d.length,m;++g<y;)h[(m=d[g]).i]=m.x(f);return h.join("")}}}var tG=kx(JW,"px, ","px)","deg)"),nG=kx(eG,", ",")",")"),_i=0,So=0,Mo=0,Rx=1e3,Ls,Eo,zs=0,zr=0,Ns=0,Io=typeof performance=="object"&&performance.now?performance:Date,Lx=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ph(){return zr||(Lx(rG),zr=Io.now()+Ns)}function rG(){zr=0}function Hs(){this._call=this._time=this._next=null}Hs.prototype=$h.prototype={constructor:Hs,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Ph():+n)+(t==null?0:+t),!this._next&&Eo!==this&&(Eo?Eo._next=this:Ls=this,Eo=this),this._call=e,this._time=n,Ch()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ch())}};function $h(e,t,n){var r=new Hs;return r.restart(e,t,n),r}function iG(){Ph(),++_i;for(var e=Ls,t;e;)(t=zr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--_i}function zx(){zr=(zs=Io.now())+Ns,_i=So=0;try{iG()}finally{_i=0,aG(),zr=0}}function oG(){var e=Io.now(),t=e-zs;t>Rx&&(Ns-=t,zs=e)}function aG(){for(var e,t=Ls,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Ls=n);Eo=e,Ch(r)}function Ch(e){if(!_i){So&&(So=clearTimeout(So));var t=e-zr;t>24?(e<1/0&&(So=setTimeout(zx,e-Io.now()-Ns)),Mo&&(Mo=clearInterval(Mo))):(Mo||(zs=Io.now(),Mo=setInterval(oG,Rx)),_i=1,Lx(zx))}}function Nx(e,t,n){var r=new Hs;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var sG=hh("start","end","cancel","interrupt"),cG=[],Hx=0,Dx=1,Oh=2,Ds=3,qx=4,Sh=5,qs=6;function js(e,t,n,r,i,o){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;lG(e,n,{name:t,index:r,group:i,on:sG,tween:cG,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Hx})}function Mh(e,t){var n=mn(e,t);if(n.state>Hx)throw new Error("too late; already scheduled");return n}function En(e,t){var n=mn(e,t);if(n.state>Ds)throw new Error("too late; already running");return n}function mn(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function lG(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=$h(o,0,n.time);function o(l){n.state=Dx,n.timer.restart(a,n.delay,n.time),n.delay<=l&&a(l-n.delay)}function a(l){var u,h,d,f;if(n.state!==Dx)return c();for(u in r)if(f=r[u],f.name===n.name){if(f.state===Ds)return Nx(a);f.state===qx?(f.state=qs,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete r[u]):+u<t&&(f.state=qs,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete r[u])}if(Nx(function(){n.state===Ds&&(n.state=qx,n.timer.restart(s,n.delay,n.time),s(l))}),n.state=Oh,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Oh){for(n.state=Ds,i=new Array(d=n.tween.length),u=0,h=-1;u<d;++u)(f=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(i[++h]=f);i.length=h+1}}function s(l){for(var u=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(c),n.state=Sh,1),h=-1,d=i.length;++h<d;)i[h].call(e,u);n.state===Sh&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=qs,n.timer.stop(),delete r[t];for(var l in r)return;delete e.__transition}}function uG(e,t){var n=e.__transition,r,i,o=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((r=n[a]).name!==t){o=!1;continue}i=r.state>Oh&&r.state<Sh,r.state=qs,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[a]}o&&delete e.__transition}}function hG(e){return this.each(function(){uG(this,e)})}function dG(e,t){var n,r;return function(){var i=En(this,e),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===t){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function fG(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=En(this,e),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}o.tween=i}}function pG(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=mn(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===e)return a.value;return null}return this.each((t==null?dG:fG)(n,e,t))}function Eh(e,t,n){var r=e._id;return e.each(function(){var i=En(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return mn(i,r).value[t]}}function jx(e,t){var n;return(typeof t=="number"?gn:t instanceof kr?ks:(n=kr(t))?(t=n,ks):Ix)(e,t)}function gG(e){return function(){this.removeAttribute(e)}}function mG(e){return function(){this.removeAttributeNS(e.space,e.local)}}function yG(e,t,n){var r,i=n+"",o;return function(){var a=this.getAttribute(e);return a===i?null:a===r?o:o=t(r=a,n)}}function vG(e,t,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===r?o:o=t(r=a,n)}}function bG(e,t,n){var r,i,o;return function(){var a,s=n(this),c;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),c=s+"",a===c?null:a===r&&c===i?o:(i=c,o=t(r=a,s)))}}function _G(e,t,n){var r,i,o;return function(){var a,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),c=s+"",a===c?null:a===r&&c===i?o:(i=c,o=t(r=a,s)))}}function xG(e,t){var n=Ss(e),r=n==="transform"?nG:jx;return this.attrTween(e,typeof t=="function"?(n.local?_G:bG)(n,r,Eh(this,"attr."+e,t)):t==null?(n.local?mG:gG)(n):(n.local?vG:yG)(n,r,t))}function wG(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function PG(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function $G(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&PG(e,o)),n}return i._value=t,i}function CG(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&wG(e,o)),n}return i._value=t,i}function OG(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=Ss(e);return this.tween(n,(r.local?$G:CG)(r,t))}function SG(e,t){return function(){Mh(this,e).delay=+t.apply(this,arguments)}}function MG(e,t){return t=+t,function(){Mh(this,e).delay=t}}function EG(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?SG:MG)(t,e)):mn(this.node(),t).delay}function IG(e,t){return function(){En(this,e).duration=+t.apply(this,arguments)}}function AG(e,t){return t=+t,function(){En(this,e).duration=t}}function TG(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?IG:AG)(t,e)):mn(this.node(),t).duration}function kG(e,t){if(typeof t!="function")throw new Error;return function(){En(this,e).ease=t}}function RG(e){var t=this._id;return arguments.length?this.each(kG(t,e)):mn(this.node(),t).ease}function LG(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;En(this,e).ease=n}}function zG(e){if(typeof e!="function")throw new Error;return this.each(LG(this._id,e))}function NG(e){typeof e!="function"&&(e=ux(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=[],c,l=0;l<a;++l)(c=o[l])&&e.call(c,c.__data__,l,o)&&s.push(c);return new Fn(r,this._parents,this._name,this._id)}function HG(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var c=t[s],l=n[s],u=c.length,h=a[s]=new Array(u),d,f=0;f<u;++f)(d=c[f]||l[f])&&(h[f]=d);for(;s<r;++s)a[s]=t[s];return new Fn(a,this._parents,this._name,this._id)}function DG(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function qG(e,t,n){var r,i,o=DG(t)?Mh:En;return function(){var a=o(this,e),s=a.on;s!==r&&(i=(r=s).copy()).on(t,n),a.on=i}}function jG(e,t){var n=this._id;return arguments.length<2?mn(this.node(),n).on.on(e):this.each(qG(n,e,t))}function FG(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function BG(){return this.on("end.remove",FG(this._id))}function WG(e){var t=this._name,n=this._id;typeof e!="function"&&(e=fh(e));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],c=s.length,l=o[a]=new Array(c),u,h,d=0;d<c;++d)(u=s[d])&&(h=e.call(u,u.__data__,d,s))&&("__data__"in u&&(h.__data__=u.__data__),l[d]=h,js(l[d],t,n,d,l,mn(u,n)));return new Fn(o,this._parents,t,n)}function GG(e){var t=this._name,n=this._id;typeof e!="function"&&(e=lx(e));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,h=0;h<l;++h)if(u=c[h]){for(var d=e.call(u,u.__data__,h,c),f,g=mn(u,n),y=0,m=d.length;y<m;++y)(f=d[y])&&js(f,t,n,y,d,g);o.push(d),a.push(u)}return new Fn(o,a,t,n)}var VG=Po.prototype.constructor;function YG(){return new VG(this._groups,this._parents)}function XG(e,t){var n,r,i;return function(){var o=vi(this,e),a=(this.style.removeProperty(e),vi(this,e));return o===a?null:o===n&&a===r?i:i=t(n=o,r=a)}}function Fx(e){return function(){this.style.removeProperty(e)}}function UG(e,t,n){var r,i=n+"",o;return function(){var a=vi(this,e);return a===i?null:a===r?o:o=t(r=a,n)}}function KG(e,t,n){var r,i,o;return function(){var a=vi(this,e),s=n(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(e),vi(this,e))),a===c?null:a===r&&c===i?o:(i=c,o=t(r=a,s))}}function ZG(e,t){var n,r,i,o="style."+t,a="end."+o,s;return function(){var c=En(this,e),l=c.on,u=c.value[o]==null?s||(s=Fx(t)):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(a,i=u),c.on=r}}function QG(e,t,n){var r=(e+="")=="transform"?tG:jx;return t==null?this.styleTween(e,XG(e,r)).on("end.style."+e,Fx(e)):typeof t=="function"?this.styleTween(e,KG(e,r,Eh(this,"style."+e,t))).each(ZG(this._id,e)):this.styleTween(e,UG(e,r,t),n).on("end.style."+e,null)}function JG(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function eV(e,t,n){var r,i;function o(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&JG(e,a,n)),r}return o._value=t,o}function tV(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,eV(e,t,n==null?"":n))}function nV(e){return function(){this.textContent=e}}function rV(e){return function(){var t=e(this);this.textContent=t==null?"":t}}function iV(e){return this.tween("text",typeof e=="function"?rV(Eh(this,"text",e)):nV(e==null?"":e+""))}function oV(e){return function(t){this.textContent=e.call(this,t)}}function aV(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&oV(i)),t}return r._value=e,r}function sV(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,aV(e))}function cV(){for(var e=this._name,t=this._id,n=Bx(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,c,l=0;l<s;++l)if(c=a[l]){var u=mn(c,t);js(c,e,n,l,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Fn(r,this._parents,e,n)}function lV(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},c={value:function(){--i===0&&o()}};n.each(function(){var l=En(this,r),u=l.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),l.on=t}),i===0&&o()})}var uV=0;function Fn(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Bx(){return++uV}var Bn=Po.prototype;Fn.prototype={constructor:Fn,select:WG,selectAll:GG,selectChild:Bn.selectChild,selectChildren:Bn.selectChildren,filter:NG,merge:HG,selection:YG,transition:cV,call:Bn.call,nodes:Bn.nodes,node:Bn.node,size:Bn.size,empty:Bn.empty,each:Bn.each,on:jG,attr:xG,attrTween:OG,style:QG,styleTween:tV,text:iV,textTween:sV,remove:BG,tween:pG,delay:EG,duration:TG,ease:RG,easeVarying:zG,end:lV,[Symbol.iterator]:Bn[Symbol.iterator]};function hV(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var dV={time:null,delay:0,duration:250,ease:hV};function fV(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function pV(e){var t,n;e instanceof Fn?(t=e._id,e=e._name):(t=Bx(),(n=dV).time=Ph(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,c,l=0;l<s;++l)(c=a[l])&&js(c,e,t,l,a,n||fV(c,t));return new Fn(r,this._parents,e,t)}Po.prototype.interrupt=hG,Po.prototype.transition=pV;const Ih=Math.PI,Ah=2*Ih,Nr=1e-6,gV=Ah-Nr;function Wx(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function mV(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Wx;const n=Qo(10,t);return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class yV{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Wx:mV(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,o,a){this._append`C${+t},${+n},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(t,n,r,i,o){if(t=+t,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,c=r-t,l=i-n,u=a-t,h=s-n,d=u*u+h*h;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(d>Nr)if(!(Math.abs(h*c-l*u)>Nr)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let f=r-a,g=i-s,y=c*c+l*l,m=f*f+g*g,v=Math.sqrt(y),b=Math.sqrt(d),_=o*Math.tan((Ih-Math.acos((y+d-m)/(2*v*b)))/2),x=_/b,w=_/v;Math.abs(x-1)>Nr&&this._append`L${t+x*u},${n+x*h}`,this._append`A${o},${o},0,0,${+(h*f>u*g)},${this._x1=t+w*c},${this._y1=n+w*l}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),c=r*Math.sin(i),l=t+s,u=n+c,h=1^a,d=a?i-o:o-i;this._x1===null?this._append`M${l},${u}`:(Math.abs(this._x1-l)>Nr||Math.abs(this._y1-u)>Nr)&&this._append`L${l},${u}`,r&&(d<0&&(d=d%Ah+Ah),d>gV?this._append`A${r},${r},0,1,${h},${t-s},${n-c}A${r},${r},0,1,${h},${this._x1=l},${this._y1=u}`:d>Nr&&this._append`A${r},${r},0,${+(d>=Ih)},${h},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function vV(e,t){var n,r=1;e==null&&(e=0),t==null&&(t=0);function i(){var o,a=n.length,s,c=0,l=0;for(o=0;o<a;++o)s=n[o],c+=s.x,l+=s.y;for(c=(c/a-e)*r,l=(l/a-t)*r,o=0;o<a;++o)s=n[o],s.x-=c,s.y-=l}return i.initialize=function(o){n=o},i.x=function(o){return arguments.length?(e=+o,i):e},i.y=function(o){return arguments.length?(t=+o,i):t},i.strength=function(o){return arguments.length?(r=+o,i):r},i}function bV(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return Gx(this.cover(t,n),t,n,e)}function Gx(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,o=e._root,a={data:r},s=e._x0,c=e._y0,l=e._x1,u=e._y1,h,d,f,g,y,m,v,b;if(!o)return e._root=a,e;for(;o.length;)if((y=t>=(h=(s+l)/2))?s=h:l=h,(m=n>=(d=(c+u)/2))?c=d:u=d,i=o,!(o=o[v=m<<1|y]))return i[v]=a,e;if(f=+e._x.call(null,o.data),g=+e._y.call(null,o.data),t===f&&n===g)return a.next=o,i?i[v]=a:e._root=a,e;do i=i?i[v]=new Array(4):e._root=new Array(4),(y=t>=(h=(s+l)/2))?s=h:l=h,(m=n>=(d=(c+u)/2))?c=d:u=d;while((v=m<<1|y)===(b=(g>=d)<<1|f>=h));return i[b]=o,i[v]=a,e}function _V(e){var t,n,r=e.length,i,o,a=new Array(r),s=new Array(r),c=1/0,l=1/0,u=-1/0,h=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(o=+this._y.call(null,t))||(a[n]=i,s[n]=o,i<c&&(c=i),i>u&&(u=i),o<l&&(l=o),o>h&&(h=o));if(c>u||l>h)return this;for(this.cover(c,l).cover(u,h),n=0;n<r;++n)Gx(this,a[n],s[n],e[n]);return this}function xV(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(r=Math.floor(t))+1;else{for(var a=i-n||1,s=this._root,c,l;n>e||e>=i||r>t||t>=o;)switch(l=(t<r)<<1|e<n,c=new Array(4),c[l]=s,s=c,a*=2,l){case 0:i=n+a,o=r+a;break;case 1:n=i-a,o=r+a;break;case 2:i=n+a,r=o-a;break;case 3:n=i-a,r=o-a;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function wV(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function PV(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Yt(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function $V(e,t,n){var r,i=this._x0,o=this._y0,a,s,c,l,u=this._x1,h=this._y1,d=[],f=this._root,g,y;for(f&&d.push(new Yt(f,i,o,u,h)),n==null?n=1/0:(i=e-n,o=t-n,u=e+n,h=t+n,n*=n);g=d.pop();)if(!(!(f=g.node)||(a=g.x0)>u||(s=g.y0)>h||(c=g.x1)<i||(l=g.y1)<o))if(f.length){var m=(a+c)/2,v=(s+l)/2;d.push(new Yt(f[3],m,v,c,l),new Yt(f[2],a,v,m,l),new Yt(f[1],m,s,c,v),new Yt(f[0],a,s,m,v)),(y=(t>=v)<<1|e>=m)&&(g=d[d.length-1],d[d.length-1]=d[d.length-1-y],d[d.length-1-y]=g)}else{var b=e-+this._x.call(null,f.data),_=t-+this._y.call(null,f.data),x=b*b+_*_;if(x<n){var w=Math.sqrt(n=x);i=e-w,o=t-w,u=e+w,h=t+w,r=f.data}}return r}function CV(e){if(isNaN(u=+this._x.call(null,e))||isNaN(h=+this._y.call(null,e)))return this;var t,n=this._root,r,i,o,a=this._x0,s=this._y0,c=this._x1,l=this._y1,u,h,d,f,g,y,m,v;if(!n)return this;if(n.length)for(;;){if((g=u>=(d=(a+c)/2))?a=d:c=d,(y=h>=(f=(s+l)/2))?s=f:l=f,t=n,!(n=n[m=y<<1|g]))return this;if(!n.length)break;(t[m+1&3]||t[m+2&3]||t[m+3&3])&&(r=t,v=m)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):t?(o?t[m]=o:delete t[m],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[v]=n:this._root=n),this):(this._root=o,this)}function OV(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function SV(){return this._root}function MV(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function EV(e){var t=[],n,r=this._root,i,o,a,s,c;for(r&&t.push(new Yt(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,o=n.x0,a=n.y0,s=n.x1,c=n.y1)&&r.length){var l=(o+s)/2,u=(a+c)/2;(i=r[3])&&t.push(new Yt(i,l,u,s,c)),(i=r[2])&&t.push(new Yt(i,o,u,l,c)),(i=r[1])&&t.push(new Yt(i,l,a,s,u)),(i=r[0])&&t.push(new Yt(i,o,a,l,u))}return this}function IV(e){var t=[],n=[],r;for(this._root&&t.push(new Yt(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var i=r.node;if(i.length){var o,a=r.x0,s=r.y0,c=r.x1,l=r.y1,u=(a+c)/2,h=(s+l)/2;(o=i[0])&&t.push(new Yt(o,a,s,u,h)),(o=i[1])&&t.push(new Yt(o,u,s,c,h)),(o=i[2])&&t.push(new Yt(o,a,h,u,l)),(o=i[3])&&t.push(new Yt(o,u,h,c,l))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function AV(e){return e[0]}function TV(e){return arguments.length?(this._x=e,this):this._x}function kV(e){return e[1]}function RV(e){return arguments.length?(this._y=e,this):this._y}function Th(e,t,n){var r=new kh(t==null?AV:t,n==null?kV:n,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function kh(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Vx(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var Xt=Th.prototype=kh.prototype;Xt.copy=function(){var e=new kh(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=Vx(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var i=0;i<4;++i)(r=t.source[i])&&(r.length?n.push({source:r,target:t.target[i]=new Array(4)}):t.target[i]=Vx(r));return e},Xt.add=bV,Xt.addAll=_V,Xt.cover=xV,Xt.data=wV,Xt.extent=PV,Xt.find=$V,Xt.remove=CV,Xt.removeAll=OV,Xt.root=SV,Xt.size=MV,Xt.visit=EV,Xt.visitAfter=IV,Xt.x=TV,Xt.y=RV;function Hr(e){return function(){return e}}function ar(e){return(e()-.5)*1e-6}function LV(e){return e.x+e.vx}function zV(e){return e.y+e.vy}function NV(e){var t,n,r,i=1,o=1;typeof e!="function"&&(e=Hr(e==null?1:+e));function a(){for(var l,u=t.length,h,d,f,g,y,m,v=0;v<o;++v)for(h=Th(t,LV,zV).visitAfter(s),l=0;l<u;++l)d=t[l],y=n[d.index],m=y*y,f=d.x+d.vx,g=d.y+d.vy,h.visit(b);function b(_,x,w,P,$){var C=_.data,M=_.r,S=y+M;if(C){if(C.index>d.index){var E=f-C.x-C.vx,I=g-C.y-C.vy,O=E*E+I*I;O<S*S&&(E===0&&(E=ar(r),O+=E*E),I===0&&(I=ar(r),O+=I*I),O=(S-(O=Math.sqrt(O)))/O*i,d.vx+=(E*=O)*(S=(M*=M)/(m+M)),d.vy+=(I*=O)*S,C.vx-=E*(S=1-S),C.vy-=I*S)}return}return x>f+S||P<f-S||w>g+S||$<g-S}}function s(l){if(l.data)return l.r=n[l.data.index];for(var u=l.r=0;u<4;++u)l[u]&&l[u].r>l.r&&(l.r=l[u].r)}function c(){if(t){var l,u=t.length,h;for(n=new Array(u),l=0;l<u;++l)h=t[l],n[h.index]=+e(h,l,t)}}return a.initialize=function(l,u){t=l,r=u,c()},a.iterations=function(l){return arguments.length?(o=+l,a):o},a.strength=function(l){return arguments.length?(i=+l,a):i},a.radius=function(l){return arguments.length?(e=typeof l=="function"?l:Hr(+l),c(),a):e},a}function HV(e){return e.index}function Yx(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function DV(e){var t=HV,n=h,r,i=Hr(30),o,a,s,c,l,u=1;e==null&&(e=[]);function h(m){return 1/Math.min(s[m.source.index],s[m.target.index])}function d(m){for(var v=0,b=e.length;v<u;++v)for(var _=0,x,w,P,$,C,M,S;_<b;++_)x=e[_],w=x.source,P=x.target,$=P.x+P.vx-w.x-w.vx||ar(l),C=P.y+P.vy-w.y-w.vy||ar(l),M=Math.sqrt($*$+C*C),M=(M-o[_])/M*m*r[_],$*=M,C*=M,P.vx-=$*(S=c[_]),P.vy-=C*S,w.vx+=$*(S=1-S),w.vy+=C*S}function f(){if(a){var m,v=a.length,b=e.length,_=new Map(a.map((w,P)=>[t(w,P,a),w])),x;for(m=0,s=new Array(v);m<b;++m)x=e[m],x.index=m,typeof x.source!="object"&&(x.source=Yx(_,x.source)),typeof x.target!="object"&&(x.target=Yx(_,x.target)),s[x.source.index]=(s[x.source.index]||0)+1,s[x.target.index]=(s[x.target.index]||0)+1;for(m=0,c=new Array(b);m<b;++m)x=e[m],c[m]=s[x.source.index]/(s[x.source.index]+s[x.target.index]);r=new Array(b),g(),o=new Array(b),y()}}function g(){if(a)for(var m=0,v=e.length;m<v;++m)r[m]=+n(e[m],m,e)}function y(){if(a)for(var m=0,v=e.length;m<v;++m)o[m]=+i(e[m],m,e)}return d.initialize=function(m,v){a=m,l=v,f()},d.links=function(m){return arguments.length?(e=m,f(),d):e},d.id=function(m){return arguments.length?(t=m,d):t},d.iterations=function(m){return arguments.length?(u=+m,d):u},d.strength=function(m){return arguments.length?(n=typeof m=="function"?m:Hr(+m),g(),d):n},d.distance=function(m){return arguments.length?(i=typeof m=="function"?m:Hr(+m),y(),d):i},d}const qV=1664525,jV=1013904223,Xx=4294967296;function FV(){let e=1;return()=>(e=(qV*e+jV)%Xx)/Xx}function BV(e){return e.x}function WV(e){return e.y}var GV=10,VV=Math.PI*(3-Math.sqrt(5));function YV(e){var t,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,c=$h(h),l=hh("tick","end"),u=FV();e==null&&(e=[]);function h(){d(),l.call("tick",t),n<r&&(c.stop(),l.call("end",t))}function d(y){var m,v=e.length,b;y===void 0&&(y=1);for(var _=0;_<y;++_)for(n+=(o-n)*i,s.forEach(function(x){x(n)}),m=0;m<v;++m)b=e[m],b.fx==null?b.x+=b.vx*=a:(b.x=b.fx,b.vx=0),b.fy==null?b.y+=b.vy*=a:(b.y=b.fy,b.vy=0);return t}function f(){for(var y=0,m=e.length,v;y<m;++y){if(v=e[y],v.index=y,v.fx!=null&&(v.x=v.fx),v.fy!=null&&(v.y=v.fy),isNaN(v.x)||isNaN(v.y)){var b=GV*Math.sqrt(.5+y),_=y*VV;v.x=b*Math.cos(_),v.y=b*Math.sin(_)}(isNaN(v.vx)||isNaN(v.vy))&&(v.vx=v.vy=0)}}function g(y){return y.initialize&&y.initialize(e,u),y}return f(),t={tick:d,restart:function(){return c.restart(h),t},stop:function(){return c.stop(),t},nodes:function(y){return arguments.length?(e=y,f(),s.forEach(g),t):e},alpha:function(y){return arguments.length?(n=+y,t):n},alphaMin:function(y){return arguments.length?(r=+y,t):r},alphaDecay:function(y){return arguments.length?(i=+y,t):+i},alphaTarget:function(y){return arguments.length?(o=+y,t):o},velocityDecay:function(y){return arguments.length?(a=1-y,t):1-a},randomSource:function(y){return arguments.length?(u=y,s.forEach(g),t):u},force:function(y,m){return arguments.length>1?(m==null?s.delete(y):s.set(y,g(m)),t):s.get(y)},find:function(y,m,v){var b=0,_=e.length,x,w,P,$,C;for(v==null?v=1/0:v*=v,b=0;b<_;++b)$=e[b],x=y-$.x,w=m-$.y,P=x*x+w*w,P<v&&(C=$,v=P);return C},on:function(y,m){return arguments.length>1?(l.on(y,m),t):l.on(y)}}}function XV(){var e,t,n,r,i=Hr(-30),o,a=1,s=1/0,c=.81;function l(f){var g,y=e.length,m=Th(e,BV,WV).visitAfter(h);for(r=f,g=0;g<y;++g)t=e[g],m.visit(d)}function u(){if(e){var f,g=e.length,y;for(o=new Array(g),f=0;f<g;++f)y=e[f],o[y.index]=+i(y,f,e)}}function h(f){var g=0,y,m,v=0,b,_,x;if(f.length){for(b=_=x=0;x<4;++x)(y=f[x])&&(m=Math.abs(y.value))&&(g+=y.value,v+=m,b+=m*y.x,_+=m*y.y);f.x=b/v,f.y=_/v}else{y=f,y.x=y.data.x,y.y=y.data.y;do g+=o[y.data.index];while(y=y.next)}f.value=g}function d(f,g,y,m){if(!f.value)return!0;var v=f.x-t.x,b=f.y-t.y,_=m-g,x=v*v+b*b;if(_*_/c<x)return x<s&&(v===0&&(v=ar(n),x+=v*v),b===0&&(b=ar(n),x+=b*b),x<a&&(x=Math.sqrt(a*x)),t.vx+=v*f.value*r/x,t.vy+=b*f.value*r/x),!0;if(f.length||x>=s)return;(f.data!==t||f.next)&&(v===0&&(v=ar(n),x+=v*v),b===0&&(b=ar(n),x+=b*b),x<a&&(x=Math.sqrt(a*x)));do f.data!==t&&(_=o[f.data.index]*r/x,t.vx+=v*_,t.vy+=b*_);while(f=f.next)}return l.initialize=function(f,g){e=f,n=g,u()},l.strength=function(f){return arguments.length?(i=typeof f=="function"?f:Hr(+f),u(),l):i},l.distanceMin=function(f){return arguments.length?(a=f*f,l):Math.sqrt(a)},l.distanceMax=function(f){return arguments.length?(s=f*f,l):Math.sqrt(s)},l.theta=function(f){return arguments.length?(c=f*f,l):Math.sqrt(c)},l}function UV(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Fs(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function xi(e){return e=Fs(Math.abs(e)),e?e[1]:NaN}function KV(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),o.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function ZV(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var QV=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Bs(e){if(!(t=QV.exec(e)))throw new Error("invalid format: "+e);var t;return new Rh({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Bs.prototype=Rh.prototype;function Rh(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Rh.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function JV(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Ws;function eY(e,t){var n=Fs(e,t);if(!n)return Ws=void 0,e.toPrecision(t);var r=n[0],i=n[1],o=i-(Ws=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Fs(e,Math.max(0,t+o-1))[0]}function Ux(e,t){var n=Fs(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const Kx={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:UV,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Ux(e*100,t),r:Ux,s:eY,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Zx(e){return e}var Qx=Array.prototype.map,Jx=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function tY(e){var t=e.grouping===void 0||e.thousands===void 0?Zx:KV(Qx.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?Zx:ZV(Qx.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function l(h,d){h=Bs(h);var f=h.fill,g=h.align,y=h.sign,m=h.symbol,v=h.zero,b=h.width,_=h.comma,x=h.precision,w=h.trim,P=h.type;P==="n"?(_=!0,P="g"):Kx[P]||(x===void 0&&(x=12),w=!0,P="g"),(v||f==="0"&&g==="=")&&(v=!0,f="0",g="=");var $=((d==null?void 0:d.prefix)!==void 0?d.prefix:"")+(m==="$"?n:m==="#"&&/[boxX]/.test(P)?"0"+P.toLowerCase():""),C=(m==="$"?r:/[%p]/.test(P)?a:"")+((d==null?void 0:d.suffix)!==void 0?d.suffix:""),M=Kx[P],S=/[defgprs%]/.test(P);x=x===void 0?6:/[gprs]/.test(P)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function E(I){var O=$,T=C,F,z,j;if(P==="c")T=M(I)+T,I="";else{I=+I;var H=I<0||1/I<0;if(I=isNaN(I)?c:M(Math.abs(I),x),w&&(I=JV(I)),H&&+I==0&&y!=="+"&&(H=!1),O=(H?y==="("?y:s:y==="-"||y==="("?"":y)+O,T=(P==="s"&&!isNaN(I)&&Ws!==void 0?Jx[8+Ws/3]:"")+T+(H&&y==="("?")":""),S){for(F=-1,z=I.length;++F<z;)if(j=I.charCodeAt(F),48>j||j>57){T=(j===46?i+I.slice(F+1):I.slice(F))+T,I=I.slice(0,F);break}}}_&&!v&&(I=t(I,1/0));var W=O.length+I.length+T.length,B=W<b?new Array(b-W+1).join(f):"";switch(_&&v&&(I=t(B+I,B.length?b-T.length:1/0),B=""),g){case"<":I=O+I+T+B;break;case"=":I=O+B+I+T;break;case"^":I=B.slice(0,W=B.length>>1)+O+I+T+B.slice(W);break;default:I=B+O+I+T;break}return o(I)}return E.toString=function(){return h+""},E}function u(h,d){var f=Math.max(-8,Math.min(8,Math.floor(xi(d)/3)))*3,g=Math.pow(10,-f),y=l((h=Bs(h),h.type="f",h),{suffix:Jx[8+f/3]});return function(m){return y(g*m)}}return{format:l,formatPrefix:u}}var Gs,ew,tw;nY({thousands:",",grouping:[3],currency:["$",""]});function nY(e){return Gs=tY(e),ew=Gs.format,tw=Gs.formatPrefix,Gs}function rY(e){return Math.max(0,-xi(Math.abs(e)))}function iY(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(xi(t)/3)))*3-xi(Math.abs(e)))}function oY(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,xi(t)-xi(e))+1}function aY(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function sY(){return this.eachAfter(aY)}function cY(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this}function lY(e,t){for(var n=this,r=[n],i,o,a=-1;n=r.pop();)if(e.call(t,n,++a,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function uY(e,t){for(var n=this,r=[n],i=[],o,a,s,c=-1;n=r.pop();)if(i.push(n),o=n.children)for(a=0,s=o.length;a<s;++a)r.push(o[a]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function hY(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r}function dY(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function fY(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function pY(e){for(var t=this,n=gY(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function gY(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function mY(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function yY(){return Array.from(this)}function vY(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function bY(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*_Y(){var e=this,t,n=[e],r,i,o;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function Lh(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=PY)):t===void 0&&(t=wY);for(var n=new Ao(e),r,i=[n],o,a,s,c;r=i.pop();)if((a=t(r.data))&&(c=(a=Array.from(a)).length))for(r.children=a,s=c-1;s>=0;--s)i.push(o=a[s]=new Ao(a[s])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(CY)}function xY(){return Lh(this).eachBefore($Y)}function wY(e){return e.children}function PY(e){return Array.isArray(e)?e[1]:null}function $Y(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function CY(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Ao(e){this.data=e,this.depth=this.height=0,this.parent=null}Ao.prototype=Lh.prototype={constructor:Ao,count:sY,each:cY,eachAfter:uY,eachBefore:lY,find:hY,sum:dY,sort:fY,path:pY,ancestors:mY,descendants:yY,leaves:vY,links:bY,copy:xY,[Symbol.iterator]:_Y};function OY(e,t){return e.parent===t.parent?1:2}function zh(e){var t=e.children;return t?t[0]:e.t}function Nh(e){var t=e.children;return t?t[t.length-1]:e.t}function SY(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function MY(e){for(var t=0,n=0,r=e.children,i=r.length,o;--i>=0;)o=r[i],o.z+=t,o.m+=t,t+=o.s+(n+=o.c)}function EY(e,t,n){return e.a.parent===t.parent?e.a:n}function Vs(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}Vs.prototype=Object.create(Ao.prototype);function IY(e){for(var t=new Vs(e,0),n,r=[t],i,o,a,s;n=r.pop();)if(o=n._.children)for(n.children=new Array(s=o.length),a=s-1;a>=0;--a)r.push(i=n.children[a]=new Vs(o[a],a)),i.parent=n;return(t.parent=new Vs(null,0)).children=[t],t}function AY(){var e=OY,t=1,n=1,r=null;function i(l){var u=IY(l);if(u.eachAfter(o),u.parent.m=-u.z,u.eachBefore(a),r)l.eachBefore(c);else{var h=l,d=l,f=l;l.eachBefore(function(b){b.x<h.x&&(h=b),b.x>d.x&&(d=b),b.depth>f.depth&&(f=b)});var g=h===d?1:e(h,d)/2,y=g-h.x,m=t/(d.x+g+y),v=n/(f.depth||1);l.eachBefore(function(b){b.x=(b.x+y)*m,b.y=b.depth*v})}return l}function o(l){var u=l.children,h=l.parent.children,d=l.i?h[l.i-1]:null;if(u){MY(l);var f=(u[0].z+u[u.length-1].z)/2;d?(l.z=d.z+e(l._,d._),l.m=l.z-f):l.z=f}else d&&(l.z=d.z+e(l._,d._));l.parent.A=s(l,d,l.parent.A||h[0])}function a(l){l._.x=l.z+l.parent.m,l.m+=l.parent.m}function s(l,u,h){if(u){for(var d=l,f=l,g=u,y=d.parent.children[0],m=d.m,v=f.m,b=g.m,_=y.m,x;g=Nh(g),d=zh(d),g&&d;)y=zh(y),f=Nh(f),f.a=l,x=g.z+b-d.z-m+e(g._,d._),x>0&&(SY(EY(g,l,h),l,x),m+=x,v+=x),b+=g.m,m+=d.m,_+=y.m,v+=f.m;g&&!Nh(f)&&(f.t=g,f.m+=b-v),d&&!zh(y)&&(y.t=d,y.m+=m-_,h=l)}return h}function c(l){l.x*=t,l.y=l.depth*n}return i.separation=function(l){return arguments.length?(e=l,i):e},i.size=function(l){return arguments.length?(r=!1,t=+l[0],n=+l[1],i):r?null:[t,n]},i.nodeSize=function(l){return arguments.length?(r=!0,t=+l[0],n=+l[1],i):r?[t,n]:null},i}function TY(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function kY(e){return function(){return e}}function RY(e){return+e}var nw=[0,1];function wi(e){return e}function Hh(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:kY(isNaN(t)?NaN:.5)}function LY(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function zY(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=Hh(i,r),o=n(a,o)):(r=Hh(r,i),o=n(o,a)),function(s){return o(r(s))}}function NY(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Hh(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(s){var c=FF(e,s,1,r)-1;return o[c](i[c](s))}}function HY(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function DY(){var e=nw,t=nw,n=xh,r,i,o,a=wi,s,c,l;function u(){var d=Math.min(e.length,t.length);return a!==wi&&(a=LY(e[0],e[d-1])),s=d>2?NY:zY,c=l=null,h}function h(d){return d==null||isNaN(d=+d)?o:(c||(c=s(e.map(r),t,n)))(r(a(d)))}return h.invert=function(d){return a(i((l||(l=s(t,e.map(r),gn)))(d)))},h.domain=function(d){return arguments.length?(e=Array.from(d,RY),u()):e.slice()},h.range=function(d){return arguments.length?(t=Array.from(d),u()):t.slice()},h.rangeRound=function(d){return t=Array.from(d),n=QW,u()},h.clamp=function(d){return arguments.length?(a=d?!0:wi,u()):a!==wi},h.interpolate=function(d){return arguments.length?(n=d,u()):n},h.unknown=function(d){return arguments.length?(o=d,h):o},function(d,f){return r=d,i=f,u()}}function qY(){return DY()(wi,wi)}function jY(e,t,n,r){var i=YF(e,t,n),o;switch(r=Bs(r==null?",f":r),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=iY(i,a))&&(r.precision=o),tw(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=oY(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=rY(i))&&(r.precision=o-(r.type==="%")*2);break}}return ew(r)}function FY(e){var t=e.domain;return e.ticks=function(n){var r=t();return VF(r[0],r[r.length-1],n==null?10:n)},e.tickFormat=function(n,r){var i=t();return jY(i[0],i[i.length-1],n==null?10:n,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],c,l,u=10;for(s<a&&(l=a,a=s,s=l,l=i,i=o,o=l);u-- >0;){if(l=uh(a,s,n),l===c)return r[i]=a,r[o]=s,t(r);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function To(){var e=qY();return e.copy=function(){return HY(e,To())},TY.apply(e,arguments),FY(e)}function Ot(e){return function(){return e}}const rw=Math.abs,jt=Math.atan2,Dr=Math.cos,BY=Math.max,Dh=Math.min,In=Math.sin,Pi=Math.sqrt,en=1e-12,ko=Math.PI,Ys=ko/2,Xs=2*ko;function WY(e){return e>1?0:e<-1?ko:Math.acos(e)}function iw(e){return e>=1?Ys:e<=-1?-Ys:Math.asin(e)}function ow(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new yV(t)}function GY(e){return e.innerRadius}function VY(e){return e.outerRadius}function YY(e){return e.startAngle}function XY(e){return e.endAngle}function UY(e){return e&&e.padAngle}function KY(e,t,n,r,i,o,a,s){var c=n-e,l=r-t,u=a-i,h=s-o,d=h*c-u*l;if(!(d*d<en))return d=(u*(t-o)-h*(e-i))/d,[e+d*c,t+d*l]}function Us(e,t,n,r,i,o,a){var s=e-n,c=t-r,l=(a?o:-o)/Pi(s*s+c*c),u=l*c,h=-l*s,d=e+u,f=t+h,g=n+u,y=r+h,m=(d+g)/2,v=(f+y)/2,b=g-d,_=y-f,x=b*b+_*_,w=i-o,P=d*y-g*f,$=(_<0?-1:1)*Pi(BY(0,w*w*x-P*P)),C=(P*_-b*$)/x,M=(-P*b-_*$)/x,S=(P*_+b*$)/x,E=(-P*b+_*$)/x,I=C-m,O=M-v,T=S-m,F=E-v;return I*I+O*O>T*T+F*F&&(C=S,M=E),{cx:C,cy:M,x01:-u,y01:-h,x11:C*(i/w-1),y11:M*(i/w-1)}}function Ro(){var e=GY,t=VY,n=Ot(0),r=null,i=YY,o=XY,a=UY,s=null,c=ow(l);function l(){var u,h,d=+e.apply(this,arguments),f=+t.apply(this,arguments),g=i.apply(this,arguments)-Ys,y=o.apply(this,arguments)-Ys,m=rw(y-g),v=y>g;if(s||(s=u=c()),f<d&&(h=f,f=d,d=h),!(f>en))s.moveTo(0,0);else if(m>Xs-en)s.moveTo(f*Dr(g),f*In(g)),s.arc(0,0,f,g,y,!v),d>en&&(s.moveTo(d*Dr(y),d*In(y)),s.arc(0,0,d,y,g,v));else{var b=g,_=y,x=g,w=y,P=m,$=m,C=a.apply(this,arguments)/2,M=C>en&&(r?+r.apply(this,arguments):Pi(d*d+f*f)),S=Dh(rw(f-d)/2,+n.apply(this,arguments)),E=S,I=S,O,T;if(M>en){var F=iw(M/d*In(C)),z=iw(M/f*In(C));(P-=F*2)>en?(F*=v?1:-1,x+=F,w-=F):(P=0,x=w=(g+y)/2),($-=z*2)>en?(z*=v?1:-1,b+=z,_-=z):($=0,b=_=(g+y)/2)}var j=f*Dr(b),H=f*In(b),W=d*Dr(w),B=d*In(w);if(S>en){var X=f*Dr(_),D=f*In(_),k=d*Dr(x),A=d*In(x),L;if(m<ko)if(L=KY(j,H,k,A,X,D,W,B)){var N=j-L[0],q=H-L[1],G=X-L[0],U=D-L[1],K=1/In(WY((N*G+q*U)/(Pi(N*N+q*q)*Pi(G*G+U*U)))/2),ne=Pi(L[0]*L[0]+L[1]*L[1]);E=Dh(S,(d-ne)/(K-1)),I=Dh(S,(f-ne)/(K+1))}else E=I=0}$>en?I>en?(O=Us(k,A,j,H,f,I,v),T=Us(X,D,W,B,f,I,v),s.moveTo(O.cx+O.x01,O.cy+O.y01),I<S?s.arc(O.cx,O.cy,I,jt(O.y01,O.x01),jt(T.y01,T.x01),!v):(s.arc(O.cx,O.cy,I,jt(O.y01,O.x01),jt(O.y11,O.x11),!v),s.arc(0,0,f,jt(O.cy+O.y11,O.cx+O.x11),jt(T.cy+T.y11,T.cx+T.x11),!v),s.arc(T.cx,T.cy,I,jt(T.y11,T.x11),jt(T.y01,T.x01),!v))):(s.moveTo(j,H),s.arc(0,0,f,b,_,!v)):s.moveTo(j,H),!(d>en)||!(P>en)?s.lineTo(W,B):E>en?(O=Us(W,B,X,D,d,-E,v),T=Us(j,H,k,A,d,-E,v),s.lineTo(O.cx+O.x01,O.cy+O.y01),E<S?s.arc(O.cx,O.cy,E,jt(O.y01,O.x01),jt(T.y01,T.x01),!v):(s.arc(O.cx,O.cy,E,jt(O.y01,O.x01),jt(O.y11,O.x11),!v),s.arc(0,0,d,jt(O.cy+O.y11,O.cx+O.x11),jt(T.cy+T.y11,T.cx+T.x11),v),s.arc(T.cx,T.cy,E,jt(T.y11,T.x11),jt(T.y01,T.x01),!v))):s.arc(0,0,d,w,x,v)}if(s.closePath(),u)return s=null,u+""||null}return l.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,h=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-ko/2;return[Dr(h)*u,In(h)*u]},l.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:Ot(+u),l):e},l.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:Ot(+u),l):t},l.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:Ot(+u),l):n},l.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:Ot(+u),l):r},l.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:Ot(+u),l):i},l.endAngle=function(u){return arguments.length?(o=typeof u=="function"?u:Ot(+u),l):o},l.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:Ot(+u),l):a},l.context=function(u){return arguments.length?(s=u==null?null:u,l):s},l}function aw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function sw(e){this._context=e}sw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function cw(e){return new sw(e)}function ZY(e){return e[0]}function QY(e){return e[1]}function JY(e,t){var n=Ot(!0),r=null,i=cw,o=null,a=ow(s);e=typeof e=="function"?e:e===void 0?ZY:Ot(e),t=typeof t=="function"?t:t===void 0?QY:Ot(t);function s(c){var l,u=(c=aw(c)).length,h,d=!1,f;for(r==null&&(o=i(f=a())),l=0;l<=u;++l)!(l<u&&n(h=c[l],l,c))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+e(h,l,c),+t(h,l,c));if(f)return o=null,f+""||null}return s.x=function(c){return arguments.length?(e=typeof c=="function"?c:Ot(+c),s):e},s.y=function(c){return arguments.length?(t=typeof c=="function"?c:Ot(+c),s):t},s.defined=function(c){return arguments.length?(n=typeof c=="function"?c:Ot(!!c),s):n},s.curve=function(c){return arguments.length?(i=c,r!=null&&(o=i(r)),s):i},s.context=function(c){return arguments.length?(c==null?r=o=null:o=i(r=c),s):r},s}function eX(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function tX(e){return e}function nX(){var e=tX,t=eX,n=null,r=Ot(0),i=Ot(Xs),o=Ot(0);function a(s){var c,l=(s=aw(s)).length,u,h,d=0,f=new Array(l),g=new Array(l),y=+r.apply(this,arguments),m=Math.min(Xs,Math.max(-Xs,i.apply(this,arguments)-y)),v,b=Math.min(Math.abs(m)/l,o.apply(this,arguments)),_=b*(m<0?-1:1),x;for(c=0;c<l;++c)(x=g[f[c]=c]=+e(s[c],c,s))>0&&(d+=x);for(t!=null?f.sort(function(w,P){return t(g[w],g[P])}):n!=null&&f.sort(function(w,P){return n(s[w],s[P])}),c=0,h=d?(m-l*_)/d:0;c<l;++c,y=v)u=f[c],x=g[u],v=y+(x>0?x*h:0)+_,g[u]={data:s[u],index:c,value:x,startAngle:y,endAngle:v,padAngle:b};return g}return a.value=function(s){return arguments.length?(e=typeof s=="function"?s:Ot(+s),a):e},a.sortValues=function(s){return arguments.length?(t=s,n=null,a):t},a.sort=function(s){return arguments.length?(n=s,t=null,a):n},a.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:Ot(+s),a):r},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:Ot(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:Ot(+s),a):o},a}function Lo(e,t,n){this.k=e,this.x=t,this.y=n}Lo.prototype={constructor:Lo,scale:function(e){return e===1?this:new Lo(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Lo(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Lo.prototype;var rX=Object.defineProperty,iX=Object.defineProperties,oX=Object.getOwnPropertyDescriptors,lw=Object.getOwnPropertySymbols,aX=Object.prototype.hasOwnProperty,sX=Object.prototype.propertyIsEnumerable,uw=(e,t,n)=>t in e?rX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cX=(e,t)=>{for(var n in t||(t={}))aX.call(t,n)&&uw(e,n,t[n]);if(lw)for(var n of lw(t))sX.call(t,n)&&uw(e,n,t[n]);return e},lX=(e,t)=>iX(e,oX(t));const hw=e=>{const[{datum:t,data:n,indexes:r,width:i=280,height:o=120,iconSize:a=32,gap:s=12,progressHeight:c=8,borderRadius:l=12,positionH:u="normal",themeColors:h,valueFormatter:d=F=>`${F}%`},f]=st(e,["width","height","iconSize","gap","progressHeight","borderRadius"]),g=t.value,y=g!=null?g:0,m=Math.max(...n.items.map(F=>{var z;return(z=F.value)!=null?z:0}),100),v=i-2*s,_=To().domain([0,m]).range([0,v])(y),x=`${h.colorPrimary}-progress`,w=`${h.colorPrimaryBg}-progress-bg`,P=ae(p(Ve,{indexes:r})),$=s,C=u==="flipped"?i-s-a:s,M=$,S=u==="flipped"?s:a+2*s,E=i-a-3*s,I=M,O=o-s-c,T=g!==void 0;return R(Y,lX(cX({},f),{children:[R(Ke,{children:[R("linearGradient",{id:x,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[p("stop",{offset:"0%",stopColor:h.colorPrimary}),p("stop",{offset:"100%",stopColor:ve.mix(h.colorPrimary,"#fff",20).toHexString()})]}),R("linearGradient",{id:w,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[p("stop",{offset:"0%",stopColor:h.colorPrimaryBg}),p("stop",{offset:"100%",stopColor:h.colorBg})]})]}),p(ze,{x:0,y:0,width:i,height:o,fill:h.colorBgElevated,stroke:h.colorPrimaryBg,strokeWidth:1,rx:l,ry:l,"data-element-type":"shape"}),p(Dt,{indexes:r,x:C,y:M,size:a,fill:h.colorPrimary}),p(Ve,{indexes:r,x:S,y:I,width:E,alignHorizontal:u==="flipped"?"right":"left",alignVertical:"top",fontSize:16,fontWeight:"medium",fill:h.colorText,children:t.label}),T&&p(vo,{indexes:r,x:S,y:I+P.height,width:E,alignHorizontal:u==="flipped"?"right":"left",alignVertical:"top",lineHeight:1,fontSize:24,fontWeight:"bold",fill:h.colorPrimary,value:y,formatter:d}),p(ht,{indexes:r,x:S,y:I+P.height+(T?27:4),width:E,alignHorizontal:u==="flipped"?"right":"left",alignVertical:"top",fontSize:11,fill:h.colorTextSecondary,lineNumber:T?2:3,wordWrap:!0,children:t.desc}),p(ze,{x:s,y:O,width:v,height:c,fill:`url(#${w})`,rx:c/2,ry:c/2,"data-element-type":"shape"}),p(ze,{x:s,y:O,width:_,height:c,fill:`url(#${x})`,rx:c/2,ry:c/2,"data-element-type":"shape"})]}))};ct("progress-card",{component:hw,composites:["icon","label","value","desc"]});var uX=Object.defineProperty,hX=Object.defineProperties,dX=Object.getOwnPropertyDescriptors,dw=Object.getOwnPropertySymbols,fX=Object.prototype.hasOwnProperty,pX=Object.prototype.propertyIsEnumerable,fw=(e,t,n)=>t in e?uX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gX=(e,t)=>{for(var n in t||(t={}))fX.call(t,n)&&fw(e,n,t[n]);if(dw)for(var n of dw(t))pX.call(t,n)&&fw(e,n,t[n]);return e},mX=(e,t)=>hX(e,dX(t));const pw=e=>{const[{datum:t,indexes:n,width:r=280,height:i=120,iconSize:o=30,circleRadius:a=80,positionH:s="normal",positionV:c="normal",themeColors:l},u]=st(e,["width","height","iconSize","circleRadius"]),h=4*a/(3*Math.PI),d=2,f=4,g=28,y=20,m=y+20,v=y,b=8,_=35,x=40,w=30,P=String(n[0]+1).padStart(2,"0"),$=s==="flipped",C=c==="flipped",M=()=>$?{diagonalStartX:r-f,diagonalStartY:C?i-_:_,diagonalEndX:r-x,diagonalEndY:C?i-f:f,topLineStartX:r-x,topLineEndX:h,topLineY:C?i-f:f}:{diagonalStartX:f,diagonalStartY:C?i-_:_,diagonalEndX:x,diagonalEndY:C?i-f:f,topLineStartX:x,topLineEndX:r-h,topLineY:C?i-f:f},S=()=>{if($){const j=a+10,H=r-j-x;return{valueX:r-w,contentX:j,contentWidth:H,circleX:0,circleY:C?0:i,iconX:h-o/2}}else return{valueX:0,contentX:x,contentWidth:r-x-a-10,circleX:r,circleY:C?0:i,iconX:r-h-o/2}},E=M(),I=S(),O=C?h-o/2:i-h-o/2,T=ae(p(Ve,{indexes:n,width:I.contentWidth,children:t.label})),F=v+T.height+b,z=()=>{const{circleX:j,circleY:H}=I;return $?C?`M ${j} ${H} L ${j} ${H+a} A ${a} ${a} 0 0 0 ${j+a} ${H} Z`:`M ${j} ${H} L ${j} ${H-a} A ${a} ${a} 0 0 1 ${j+a} ${H} Z`:C?`M ${j} ${H} L ${j} ${H+a} A ${a} ${a} 0 0 1 ${j-a} ${H} Z`:`M ${j} ${H} L ${j} ${H-a} A ${a} ${a} 0 0 0 ${j-a} ${H} Z`};return R(Y,mX(gX({},u),{width:r,height:i,children:[R(xt,{children:[p(Pe,{d:`M ${E.diagonalStartX} ${E.diagonalStartY} L ${E.diagonalEndX} ${E.diagonalEndY}`,stroke:l.colorPrimary,strokeWidth:d,fill:"none"}),p(Pe,{d:`M ${E.topLineStartX} ${E.topLineY} L ${E.topLineEndX} ${E.topLineY}`,stroke:l.colorPrimary,strokeWidth:d,fill:"none"}),p(Je,{x:E.diagonalStartX-f,y:E.diagonalStartY-f,width:f*2,height:f*2,fill:l.colorPrimary}),p(Je,{x:E.topLineEndX-f,y:E.topLineY-f,width:f*2,height:f*2,fill:l.colorPrimary})]}),R(Y,{children:[p(Ne,{x:I.valueX,y:m,fontSize:g,fontWeight:"bold",fill:l.colorPrimary,children:P}),p(Pe,{d:z(),fill:l.colorPrimary,"data-element-type":"shape"}),t.icon&&p(Dt,{indexes:n,x:I.iconX,y:O,size:o,fill:l.colorWhite}),t.label&&p(Ve,{indexes:n,x:I.contentX,y:v,width:I.contentWidth,fontWeight:"bold",fill:l.colorText,alignHorizontal:$?"right":"left",children:t.label}),t.desc&&p(ht,{indexes:n,x:I.contentX,y:F,width:I.contentWidth,fill:l.colorTextSecondary,alignHorizontal:$?"right":"left",children:t.desc})]})]}))};ct("quarter-circular",{component:pw,composites:["icon","label","desc"]});var yX=Object.defineProperty,vX=Object.defineProperties,bX=Object.getOwnPropertyDescriptors,gw=Object.getOwnPropertySymbols,_X=Object.prototype.hasOwnProperty,xX=Object.prototype.propertyIsEnumerable,mw=(e,t,n)=>t in e?yX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wX=(e,t)=>{for(var n in t||(t={}))_X.call(t,n)&&mw(e,n,t[n]);if(gw)for(var n of gw(t))xX.call(t,n)&&mw(e,n,t[n]);return e},PX=(e,t)=>vX(e,bX(t));const yw=e=>{const[{datum:t,indexes:n,width:r=150,height:i=150,iconSize:o=30,padding:a=20,borderRadius:s=16,positionH:c="center",positionV:l="middle",themeColors:u},h]=st(e,["width","height","iconSize","padding","borderRadius"]),d=r-a*2,f=a,g=a,y=c==="flipped"?r-a-o:c==="center"?(r-o)/2:f,m=g,v=m+o+8,b=ae(p(Ve,{indexes:n,width:d,children:t.label})),_=c==="flipped"?r-a-d:c==="center"?a:f,x=v+b.height+4,w=_,P=s;let $="";return c==="center"&&l==="middle"?$=`
41
+ M ${P} 0
42
+ L ${r-P} 0
43
+ Q ${r} 0 ${r} ${P}
44
+ L ${r} ${i-P}
45
+ Q ${r} ${i} ${r-P} ${i}
46
+ L ${P} ${i}
47
+ Q 0 ${i} 0 ${i-P}
48
+ L 0 ${P}
49
+ Q 0 0 ${P} 0
50
50
  Z
51
- `:l==="flipped"&&c==="flipped"?P=`
52
- M ${$} 0
53
- L ${r-$} 0
54
- Q ${r} 0 ${r} ${$}
55
- L ${r} ${i-$}
56
- Q ${r} ${i} ${r-$} ${i}
57
- L ${$} ${i}
58
- Q 0 ${i} 0 ${i-$}
51
+ `:c==="flipped"&&l==="flipped"?$=`
52
+ M ${P} 0
53
+ L ${r-P} 0
54
+ Q ${r} 0 ${r} ${P}
55
+ L ${r} ${i-P}
56
+ Q ${r} ${i} ${r-P} ${i}
57
+ L ${P} ${i}
58
+ Q 0 ${i} 0 ${i-P}
59
59
  L 0 0
60
- L ${$} 0
60
+ L ${P} 0
61
61
  Z
62
- `:l==="normal"&&c==="flipped"?P=`
62
+ `:c==="normal"&&l==="flipped"?$=`
63
63
  M 0 0
64
64
  L ${r} 0
65
- L ${r} ${i-$}
66
- Q ${r} ${i} ${r-$} ${i}
67
- L ${$} ${i}
68
- Q 0 ${i} 0 ${i-$}
69
- L 0 ${$}
70
- Q 0 0 ${$} 0
65
+ L ${r} ${i-P}
66
+ Q ${r} ${i} ${r-P} ${i}
67
+ L ${P} ${i}
68
+ Q 0 ${i} 0 ${i-P}
69
+ L 0 ${P}
70
+ Q 0 0 ${P} 0
71
71
  Z
72
- `:l==="flipped"?P=`
73
- M ${$} 0
74
- L ${r-$} 0
75
- Q ${r} 0 ${r} ${$}
76
- L ${r} ${i-$}
77
- Q ${r} ${i} ${r-$} ${i}
72
+ `:c==="flipped"?$=`
73
+ M ${P} 0
74
+ L ${r-P} 0
75
+ Q ${r} 0 ${r} ${P}
76
+ L ${r} ${i-P}
77
+ Q ${r} ${i} ${r-P} ${i}
78
78
  L 0 ${i}
79
- L 0 ${$}
80
- Q 0 0 ${$} 0
79
+ L 0 ${P}
80
+ Q 0 0 ${P} 0
81
81
  Z
82
- `:P=`
83
- M ${$} 0
84
- L ${r-$} 0
85
- Q ${r} 0 ${r} ${$}
82
+ `:$=`
83
+ M ${P} 0
84
+ L ${r-P} 0
85
+ Q ${r} 0 ${r} ${P}
86
86
  L ${r} ${i}
87
- L ${$} ${i}
88
- Q 0 ${i} 0 ${i-$}
89
- L 0 ${$}
90
- Q 0 0 ${$} 0
87
+ L ${P} ${i}
88
+ Q 0 ${i} 0 ${i-P}
89
+ L 0 ${P}
90
+ Q 0 0 ${P} 0
91
91
  Z
92
- `,I(Y,Qk(Kk({},u),{children:[d(yt,{d:P,x:0,y:0,width:r,height:i,fill:h.colorPrimary,"data-element-type":"shape"}),d(Pe,{indexes:n,x:y,y:m,size:o,fill:h.colorBg}),d(At,{indexes:n,x:b,y:x,width:f,fontSize:14,fontWeight:"bold",fill:h.colorBg,alignHorizontal:l==="flipped"?"right":"left",children:e.label}),e.desc&&d(Jt,{indexes:n,x:_,y:w,width:f,fontSize:11,wordWrap:!0,fill:h.colorBg,alignHorizontal:l==="flipped"?"right":"left",children:e.desc})]}))};Kt("quarter-simple-card",{component:Km,composites:["icon","label","desc"]});var Jk=Object.defineProperty,tL=Object.defineProperties,eL=Object.getOwnPropertyDescriptors,Qm=Object.getOwnPropertySymbols,nL=Object.prototype.hasOwnProperty,rL=Object.prototype.propertyIsEnumerable,Jm=(t,e,n)=>e in t?Jk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,iL=(t,e)=>{for(var n in e||(e={}))nL.call(e,n)&&Jm(t,n,e[n]);if(Qm)for(var n of Qm(e))rL.call(e,n)&&Jm(t,n,e[n]);return t},oL=(t,e)=>tL(t,eL(e));const t2=t=>{const[{datum:e,indexes:n,width:r=240,height:i=140,iconSize:o=28,gap:s=12,ribbonHeight:a=32,themeColors:l},c]=Zt(t,["width","height","iconSize","gap","ribbonHeight"]),h=`${l.colorPrimary}-ribbon`;return I(Y,oL(iL({},c),{children:[d(jt,{children:I("linearGradient",{id:h,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[d("stop",{offset:"0%",stopColor:l.colorPrimary}),d("stop",{offset:"100%",stopColor:lt(l.colorPrimary).darken(15).toHexString()})]})}),I(le,{children:[d(Ct,{x:0,y:0,width:r,height:i,fill:l.colorBgElevated,stroke:l.colorPrimaryBg,strokeWidth:1,rx:8,ry:8}),d(Ct,{x:0,y:0,width:r,height:a,fill:`url(#${h})`,rx:8,ry:8}),d(Ct,{x:0,y:8,width:r,height:a-8,fill:`url(#${h})`}),d(yt,{x:r-20,y:a,width:20,height:8,fill:lt(l.colorPrimary).darken(25).toHexString(),d:"M0,0 L20,0 L15,8 L5,8 Z"})]}),d(Pe,{indexes:n,x:s,y:a+s,size:o,fill:l.colorPrimary}),d(At,{indexes:n,x:o+2*s,y:a+s,width:r-o-3*s,height:o,alignHorizontal:"left",alignVertical:"middle",lineHeight:1,fontWeight:"bold",fill:l.colorText,children:e.label}),d(Jt,{indexes:n,x:s,y:a+o+s+5,width:r-2*s,alignHorizontal:"left",fill:l.colorTextSecondary,lineNumber:3,wordWrap:!0,children:e.desc}),d(Pe,{indexes:n,x:r-s-8,y:s/2,size:16,fill:l.colorWhite})]}))};Kt("ribbon-card",{component:t2,composites:["icon","label","desc"]});var sL=Object.defineProperty,aL=Object.defineProperties,lL=Object.getOwnPropertyDescriptors,e2=Object.getOwnPropertySymbols,cL=Object.prototype.hasOwnProperty,hL=Object.prototype.propertyIsEnumerable,n2=(t,e,n)=>e in t?sL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,dL=(t,e)=>{for(var n in e||(e={}))cL.call(e,n)&&n2(t,n,e[n]);if(e2)for(var n of e2(e))hL.call(e,n)&&n2(t,n,e[n]);return t},uL=(t,e)=>aL(t,lL(e));const r2=t=>{const[{indexes:e,datum:n,themeColors:r,width:i=300,height:o=40,padding:s=4,positionH:a="normal"},l]=Zt(t,["width","height","borderRadius","padding"]),c=o/2,h=c,u=s,f=i-c*2,p=o-s*2;return I(Y,uL(dL({},l),{children:[d(Ct,{"data-element-type":"shape",width:i,height:o,rx:c,ry:c,fill:r.colorPrimaryBg,stroke:r.colorPrimary,strokeWidth:1,opacity:.8}),d(At,{indexes:e,x:h,y:u,width:f,height:p,alignHorizontal:a==="flipped"?"right":a==="center"?"center":"left",alignVertical:"middle",fontSize:14,fontWeight:"500",fill:r.colorText,children:n.label})]}))};Kt("rounded-rect-node",{component:r2,composites:["label"]});var fL=Object.defineProperty,pL=Object.defineProperties,gL=Object.getOwnPropertyDescriptors,i2=Object.getOwnPropertySymbols,mL=Object.prototype.hasOwnProperty,yL=Object.prototype.propertyIsEnumerable,o2=(t,e,n)=>e in t?fL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vL=(t,e)=>{for(var n in e||(e={}))mL.call(e,n)&&o2(t,n,e[n]);if(i2)for(var n of i2(e))yL.call(e,n)&&o2(t,n,e[n]);return t},xL=(t,e)=>pL(t,gL(e));const s2=t=>{const[{indexes:e,datum:n,width:r=140,themeColors:i,positionV:o="normal"},s]=Zt(t,["width"]),a=o!=="flipped",l=a?"bottom":"top",c=d(At,{indexes:e,width:r,fill:i.colorText,alignHorizontal:"center",alignVertical:l,fontSize:14,children:n.label}),h=d(Jt,{indexes:e,width:r,fill:i.colorTextSecondary,alignHorizontal:"center",alignVertical:l,children:n.desc}),u=30,f=10,p=et(c),g=et(h),y=p.height+g.height,m=y+f+u+f+y;return d(Y,xL(vL({width:r,height:m},s),{children:I(ct,{flexDirection:"column",alignItems:"center",children:[a?I(Bt,{children:[h,c,d(ie,{height:f})]}):d(Bt,{children:d(ie,{height:y+f})}),I(Nr,{horizontal:"center",vertical:"middle",children:[d(bL,{width:r,height:u,fill:i.colorPrimary}),d(St,{width:r,height:u,alignHorizontal:"center",alignVertical:"middle",fill:i.colorWhite,fontWeight:"bold",fontSize:16,children:n.time?n.time:String(e[0]+1).padStart(2,"0").slice(-2)})]}),a?d(Bt,{children:d(ie,{height:y+f})}):I(Bt,{children:[d(ie,{height:f}),c,h]})]})}))},bL=t=>{const{x:e=0,y:n=0,width:r=100,height:i=40,fill:o="#FF356A",size:s=10}=t;return d(Re,{width:r,height:i,points:[{x:e,y:n},{x:e+r-s,y:n},{x:e+r,y:n+i/2},{x:e+r-s,y:n+i},{x:e,y:n+i},{x:e+s,y:n+i/2}],fill:o,"data-element-type":"shape"})};Kt("simple-horizontal-arrow",{component:s2,composites:["label","desc","time"]});var wL=Object.defineProperty,_L=Object.defineProperties,$L=Object.getOwnPropertyDescriptors,a2=Object.getOwnPropertySymbols,PL=Object.prototype.hasOwnProperty,CL=Object.prototype.propertyIsEnumerable,l2=(t,e,n)=>e in t?wL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,OL=(t,e)=>{for(var n in e||(e={}))PL.call(e,n)&&l2(t,n,e[n]);if(a2)for(var n of a2(e))CL.call(e,n)&&l2(t,n,e[n]);return t},ML=(t,e)=>_L(t,$L(e));const c2=t=>{const[{indexes:e,datum:n,width:r=180,illusSize:i=r,gap:o=8,themeColors:s,usePaletteColor:a=!1},l]=Zt(t,["width","illusSize","gap","usePaletteColor"]),{label:c,desc:h}=n,u=a?s.colorPrimary:s.colorText,f=d(At,{indexes:e,width:r,alignHorizontal:"center",alignVertical:"middle",fill:u,children:c}),p=et(f);return I(ct,ML(OL({},l),{width:r,height:i+o+p.height+o+48,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:o,children:[d(Up,{indexes:e,width:i,height:i}),f,d(Jt,{indexes:e,width:r,alignHorizontal:"center",alignVertical:"top",fill:s.colorTextSecondary,lineNumber:3,children:h})]}))};Kt("simple-illus",{component:c2,composites:["illus","label","desc"]});var SL=Object.defineProperty,EL=Object.defineProperties,IL=Object.getOwnPropertyDescriptors,h2=Object.getOwnPropertySymbols,AL=Object.prototype.hasOwnProperty,TL=Object.prototype.propertyIsEnumerable,d2=(t,e,n)=>e in t?SL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,dh=(t,e)=>{for(var n in e||(e={}))AL.call(e,n)&&d2(t,n,e[n]);if(h2)for(var n of h2(e))TL.call(e,n)&&d2(t,n,e[n]);return t},uh=(t,e)=>EL(t,IL(e));const u2=t=>{const[{indexes:e,datum:n,width:r=200,height:i,gap:o=4,showIcon:s=!0,iconSize:a=30,iconType:l="default",positionH:c="normal",positionV:h="normal",usePaletteColor:u=!1,themeColors:f},p]=Zt(t,["width","height","gap","showIcon","iconSize","iconType","usePaletteColor"]),{label:g,desc:y,icon:m}=n,v=(L=>L==="normal"?"left":L==="flipped"?"right":"center")(c),b=u?f.colorPrimary:f.colorText,w=14,_=1.4,P=et(d(At,{indexes:e,width:r,alignHorizontal:"center",alignVertical:"middle",fill:b,children:g})),C=s?l==="circle"?d(sr,{indexes:e,size:a,fill:f.colorPrimary,colorBg:f.colorBg}):d(Pe,{indexes:e,size:a,fill:f.colorTextSecondary}):null;if(!s||!m){const L=i?Math.max(0,i-P.height-o):void 0,D=L?L<=60?1:Math.floor(L/(_*w)):2,k=i?h==="middle"?(i-P.height-(L||0)-o)/2:h==="flipped"?i-P.height-(L||0)-o:0:0;return I(Y,uh(dh({},p),{children:[d(At,{indexes:e,width:r,y:k,alignHorizontal:v,alignVertical:"middle",fill:b,children:g}),d(Jt,{indexes:e,width:r,height:L,y:k+P.height+o,alignHorizontal:v,alignVertical:A(),lineNumber:D,fill:f.colorTextSecondary,children:y})]}))}if(c==="center"){const L=s&&m?a:0,D=i?Math.max(0,i-P.height-L-o*2):void 0,k=D?D<=60?1:Math.floor(D/(_*w)):2,N=P.height+(D||0)+o,j=i?h==="middle"?(i-N-L-o)/2:h==="flipped"?i-N-L-o:0:0;return d(ct,uh(dh({},p),{flexDirection:"column",gap:o,alignItems:"center",children:h==="flipped"?I(Bt,{children:[I(Y,{children:[d(At,{indexes:e,width:r,y:j,alignHorizontal:"center",alignVertical:"middle",fill:b,children:g}),d(Jt,{indexes:e,width:r,height:D,y:j+P.height+o,alignHorizontal:"center",alignVertical:"bottom",lineNumber:k,fill:f.colorTextSecondary,children:y})]}),C]}):I(Bt,{children:[C,I(Y,{children:[d(At,{indexes:e,width:r,y:j,alignHorizontal:"center",alignVertical:"middle",fill:b,children:g}),d(Jt,{indexes:e,width:r,height:D,y:j+P.height+o,alignHorizontal:"center",alignVertical:"top",lineNumber:k,fill:f.colorTextSecondary,children:y})]})]})}))}const T=et(C),E=Math.max(r-T.width-o,0),S=i?Math.max(0,i-P.height-o):void 0,R=S?S<=60?1:Math.floor(S/(_*w)):2,O=i?h==="middle"?(i-P.height-(S||0)-o)/2:h==="flipped"?i-P.height-(S||0)-o:0:0;return d(ct,uh(dh({},p),{flexDirection:"row",gap:o,alignItems:F(h),children:c==="flipped"?I(Bt,{children:[I(Y,{children:[d(At,{indexes:e,width:E,y:O,alignHorizontal:"right",alignVertical:"middle",fill:b,children:g}),d(Jt,{indexes:e,width:E,height:S,y:O+P.height+o,alignHorizontal:"right",alignVertical:A(),lineNumber:R,fill:f.colorTextSecondary,children:y})]}),C]}):I(Bt,{children:[C,I(Y,{children:[d(At,{indexes:e,width:E,y:O,alignHorizontal:"left",alignVertical:"middle",fill:b,children:g}),d(Jt,{indexes:e,width:E,height:S,y:O+P.height+o,alignHorizontal:"left",alignVertical:A(),lineNumber:R,fill:f.colorTextSecondary,children:y})]})]})}));function A(L,D){return"top"}function F(L){return L==="normal"?"flex-start":L==="flipped"?"flex-end":"center"}};Kt("simple",{component:u2,composites:["icon","label","desc"]});var kL=Object.defineProperty,LL=Object.defineProperties,zL=Object.getOwnPropertyDescriptors,f2=Object.getOwnPropertySymbols,HL=Object.prototype.hasOwnProperty,RL=Object.prototype.propertyIsEnumerable,p2=(t,e,n)=>e in t?kL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,DL=(t,e)=>{for(var n in e||(e={}))HL.call(e,n)&&p2(t,n,e[n]);if(f2)for(var n of f2(e))RL.call(e,n)&&p2(t,n,e[n]);return t},NL=(t,e)=>LL(t,zL(e));const g2=t=>{const[{indexes:e,datum:n,height:r=140,themeColors:i,positionH:o="normal"},s]=Zt(t,["height"]),a=o==="normal"?"right":"left",l=d(At,{indexes:e,width:120,fill:i.colorText,alignHorizontal:a,alignVertical:"middle",fontSize:14,children:n.label}),c=d(Jt,{indexes:e,width:120,fill:i.colorTextSecondary,alignHorizontal:a,alignVertical:"top",children:n.desc}),h=o!=="flipped",u=15,f=30,p=120,g=p+u+f+u+p;return d(Y,NL(DL({width:g,height:r},s),{children:I(ct,{flexDirection:"row",alignItems:"center",children:[h?I(Bt,{children:[I(ct,{flexDirection:"column",alignItems:"flex-end",children:[l,c]}),d(ie,{width:u})]}):d(Bt,{children:d(ie,{width:p+u})}),I(Nr,{horizontal:"center",vertical:"middle",children:[d(jL,{width:f,height:r,fill:i.colorPrimary}),d(St,{width:f,height:r,alignHorizontal:"center",alignVertical:"middle",fill:i.colorWhite,fontWeight:"bold",fontSize:16,children:String(e[0]+1).padStart(2,"0").slice(-2)})]}),h?d(Bt,{children:d(ie,{width:p+u})}):I(Bt,{children:[d(ie,{width:u}),I(ct,{flexDirection:"column",alignItems:"flex-start",children:[l,c]})]})]})}))},jL=t=>{const{x:e=0,y:n=0,width:r=30,height:i=100,fill:o="#FF356A",size:s=10}=t;return d(Re,{width:r,height:i,points:[{x:e,y:n},{x:e+r/2,y:n+s},{x:e+r,y:n},{x:e+r,y:n+i-s},{x:e+r/2,y:n+i},{x:e,y:n+i-s}],fill:o,"data-element-type":"shape"})};Kt("simple-vertical-arrow",{component:g2,composites:["label","desc"]});var WL=Object.defineProperty,FL=Object.defineProperties,BL=Object.getOwnPropertyDescriptors,m2=Object.getOwnPropertySymbols,YL=Object.prototype.hasOwnProperty,VL=Object.prototype.propertyIsEnumerable,y2=(t,e,n)=>e in t?WL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,XL=(t,e)=>{for(var n in e||(e={}))YL.call(e,n)&&y2(t,n,e[n]);if(m2)for(var n of m2(e))VL.call(e,n)&&y2(t,n,e[n]);return t},GL=(t,e)=>FL(t,BL(e));const fh=80,ph=3,v2=t=>{const[{datum:e,indexes:n,width:r=200,gap:i=4,positionH:o="center",themeColors:s},a]=Zt(t,["width","height","gap"]),l=et(d(At,{indexes:n,fontSize:18,fontWeight:"bold",width:r,children:e.label})),c=e.desc?et(d(Jt,{indexes:n,width:r,wordWrap:!0,children:e.desc})):{height:0},h=l.height+i+ph+(e.desc?i*2+c.height:0),u=0,f=0,p=o==="center"?"center":o==="flipped"?"right":"left",g=o==="center"?(r-fh)/2:o==="flipped"?r-fh:0,y=f+l.height+i,m=0,x=y+ph+i*2;return I(Y,GL(XL({width:r,height:h},a),{children:[e.label&&d(At,{indexes:n,x:u,y:f,width:r,alignHorizontal:p,fill:s.colorPrimary,fontSize:18,fontWeight:"bold",children:e.label}),e.label&&d(Ct,{x:g,y,width:fh,height:ph,fill:s.colorPrimary,"data-element-type":"shape"}),e.desc&&d(Jt,{indexes:n,width:r,x:m,y:x,alignHorizontal:p,wordWrap:!0,fill:s.colorText,children:e.desc})]}))};Kt("underline-text",{component:v2,composites:["label","desc"]});var qL=Object.defineProperty,UL=Object.defineProperties,ZL=Object.getOwnPropertyDescriptors,x2=Object.getOwnPropertySymbols,KL=Object.prototype.hasOwnProperty,QL=Object.prototype.propertyIsEnumerable,b2=(t,e,n)=>e in t?qL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,JL=(t,e)=>{for(var n in e||(e={}))KL.call(e,n)&&b2(t,n,e[n]);if(x2)for(var n of x2(e))QL.call(e,n)&&b2(t,n,e[n]);return t},tz=(t,e)=>UL(t,ZL(e));const w2=t=>{const[{indexes:e,datum:n,height:r=140,themeColors:i,positionH:o="normal"},s]=Zt(t,["height"]),l=o!=="flipped"?"right":"left",c=d(At,{indexes:e,width:120,fill:i.colorText,alignHorizontal:l,alignVertical:"middle",fontSize:14,children:n.label}),h=d(Jt,{indexes:e,width:120,fill:i.colorTextSecondary,alignHorizontal:l,alignVertical:"top",children:n.desc}),u=d(sr,{indexes:e,fill:i.colorPrimary,colorBg:i.colorWhite}),f=d(nz,{width:30,height:8,fill:i.colorPrimary,positionH:o}),p=o!=="flipped",g=5,y=25,m=30,x=et(c),v=et(u),b=et(f),w=x.width+g+b.width-v.width-y,_=Math.max(x.width+g+b.width,y+v.width)*2+m;return d(Y,tz(JL({width:_,height:r},s),{children:I(ct,{flexDirection:"row",alignItems:"center",children:[p?I(Bt,{children:[I(ct,{flexDirection:"column",alignItems:"flex-end",children:[c,h]}),d(ie,{width:g}),f]}):I(Bt,{children:[d(ie,{width:w}),u,d(ie,{width:y})]}),I(Nr,{horizontal:"center",vertical:"middle",children:[d(ez,{width:m,height:r,fill:i.colorPrimary}),d(St,{width:m,height:r,alignHorizontal:"center",alignVertical:"middle",fill:i.colorWhite,fontWeight:"bold",fontSize:16,children:String(e[0]+1).padStart(2,"0").slice(-2)})]}),p?I(Bt,{children:[d(ie,{width:y}),u]}):I(Bt,{children:[f,d(ie,{width:g}),I(ct,{flexDirection:"column",alignItems:"flex-start",children:[c,h]})]})]})}))},ez=t=>{const{x:e=0,y:n=0,width:r=30,height:i=100,fill:o="#FF356A",size:s=10}=t;return d(Re,{width:r,height:i,points:[{x:e,y:n},{x:e+r/2,y:n+s},{x:e+r,y:n},{x:e+r,y:n+i-s},{x:e+r/2,y:n+i},{x:e,y:n+i-s}],fill:o,"data-element-type":"shape"})},nz=t=>{const{x:e=0,y:n=0,width:r=50,height:i=10,fill:o,positionH:s="normal"}=t,a=i/2,l=r-a,c=2,h=a;return I(Y,{x:e,y:n,width:r,height:i,children:[d(Wt,{width:i,height:i,fill:o,x:s==="normal"?0:l-a,"data-element-type":"shape"}),d(yt,{d:s==="normal"?`M${a},${h} L${a+l},${h}`:`M0,${h} L${l-a},${h}`,strokeWidth:c,stroke:o,"data-element-type":"shape"})]})};Kt("vertical-icon-arrow",{component:w2,composites:["icon","label","desc"]});const gh=new Map;function Tt(t,e){gh.set(t,e)}function _2(t){return gh.get(t)}function rz(){return Array.from(gh.keys())}const $2=t=>{var e,n,r;const{Title:i,Item:o,data:s,width:a,gap:l,barGap:c,barHeight:h=28,barAreaWidth:u,labelGap:f=16,padding:p=24,showValue:g=!0,options:y,valueFormatter:m=Dt=>Dt.toString()}=t,x=(e=u!=null?u:a)!=null?e:480,{title:v,desc:b,items:w=[],xTitle:_,yTitle:$}=s,P=i?d(i,{title:v,desc:b}):null;if(w.length===0)return d(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:P});const[C,T,E,S]=ir(p),R=(n=w[0])!=null?n:{label:"",value:0},O=et(d(o,{indexes:[0],datum:R,data:s})),A=O.width||140,F=O.height||h,L=Math.max(h,F),D=Math.max(12,L*.35),k=(r=c!=null?c:l)!=null?r:D,N=w.map(Dt=>{var Ht;return(Ht=Dt.value)!=null?Ht:0}),j=Math.max(...N,0),X=Math.min(...N,0),z=X<0?X*1.1:0;let M=j>0?j*1.1:0;M===z&&(M=z+1);const H=Xi().domain([z,M]).range([0,x]),B=Math.min(Math.max(H(0),0),x),q=Math.max(2,x*.02),V=w.length*(L+k)-k,G=$?24:0,Z=20,K=_?24:0,it=C+G,Q=S+A+f,at=g?80:0,ht=Math.max(8,L*.2),nt=Q+x+at+T,J=it+V+ht+Z+K+E,tt=ge(y.themeConfig),st=tt.colorText||"#666",vt=ce(y),gt=[],ut=[],ot=[],ft=[],mt=[],wt=[],pt=[],_t=it+V+ht,Rt=Dt=>Number.isInteger(Dt)?Dt.toString():Dt.toFixed(1);w.forEach((Dt,Ht)=>{var he;const kt=[Ht],Lt=(he=Dt.value)!=null?he:0,me=it+Ht*(L+k),xt=me+(L-h)/2,Ft=Lt>=0?Q+B:Q+H(Lt),Mt=Lt>=0?H(Lt)-B:B-H(Lt),Nt=Mt===0?q:Mt,ae=It(y,[Ht])||tt.colorPrimary;if(gt.push(d(Ct,{x:Ft,y:xt,width:Nt,height:h,fill:ae,rx:6,ry:6,"data-element-type":"shape"})),g){const ne=Lt>=0?Ft+Nt+8:Ft-8;ut.push(d(St,{x:ne,y:xt+h/2,alignHorizontal:Lt>=0?"left":"right",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:ae,children:m(Lt,Dt)}))}ot.push(d(o,{indexes:kt,datum:Dt,data:s,x:S,y:me+(L-F)/2,width:A,height:F,positionV:"middle"}))});const Vt=Math.max(3,Math.min(7,Math.floor(x/80)));return H.ticks(Vt).forEach(Dt=>{const Ht=Q+H(Dt);wt.push(d(yt,{d:`M${Ht} ${it} L${Ht} ${it+V}`,stroke:st,strokeOpacity:.08,"data-element-type":"shape"})),mt.push(d(yt,{d:`M${Ht-.5} ${_t} L${Ht-.5} ${_t+6}`,stroke:st,"data-element-type":"shape"})),mt.push(d(St,{x:Ht,y:_t+14,alignHorizontal:"center",alignVertical:"middle",fontSize:12,fill:st,children:Rt(Dt)}))}),ft.push(d(yt,{d:`M${Q} ${_t} L${Q+x} ${_t}`,stroke:st,"data-element-type":"shape"})),z<0&&ft.push(d(Ct,{x:Q+B-.5,y:it,width:1,height:V,fill:vt,"data-element-type":"shape"})),$&&pt.push(d(St,{x:S+A/2,y:C+G/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:st,children:$})),_&&pt.push(d(St,{x:Q+x/2,y:_t+Z+K/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:st,children:_})),I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[P,I(Y,{width:nt,height:J,children:[d(Y,{children:wt}),d(Y,{children:gt}),d(Y,{children:ut}),d(Y,{children:pt}),d(Y,{children:[...ft,...mt]}),d(Ot,{children:ot})]})]})};Tt("chart-bar",{component:$2,composites:["title","item","xTitle","yTitle"]});const P2=t=>{const{Title:e,Item:n,data:r,columnGap:i=60,columnWidth:o=50,padding:s=20,showValue:a=!0,options:l,valueFormatter:c=N=>N.toString()}=t,{title:h,desc:u,items:f=[]}=r,p=e?d(e,{title:h,desc:u}):null;if(f.length===0)return d(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:p});const g=ge(l.themeConfig),m=[...f.map(N=>{var j;return(j=N.value)!=null?j:0}),0].sort((N,j)=>N-j),x=m[0]<0,v=f.length*o+(f.length-1)*i,b=300,[w,_,$,P]=ir(s),C=a?24:0,T=10,E=x&&a?C+T:T,S=v+P+_,R=b+w+$+E,O=Xi().domain([m[0],m[m.length-1]]).range([b,0]),A=O(0),F=[],L=[],D=[],k=[];return f.forEach((N,j)=>{var X;const z=[j],M=(X=N.value)!=null?X:0,H=P+j*(o+i),B=M>=0?O(M):A,q=Math.abs(O(M)-A),V=It(l,[j])||g.colorPrimary,G=`${V}-column-positive-${j}`,Z=`${V}-column-negative-${j}`;k.push(I("linearGradient",{id:M>=0?G:Z,x1:"0%",y1:M>=0?"0%":"100%",x2:"0%",y2:M>=0?"100%":"0%",children:[d("stop",{offset:"0%",stopColor:V}),d("stop",{offset:"100%",stopColor:lt.mix(V,"#fff",40).toHexString()})]})),F.push(d(Ct,{x:H,y:w+B,width:o,height:q,fill:`url(#${M>=0?G:Z})`,rx:8,ry:8,"data-element-type":"shape"})),a&&L.push(d(St,{x:H+o/2,y:M>=0?w+B-10:w+B+q+20,fontSize:16,fontWeight:"bold",alignHorizontal:"center",alignVertical:M>=0?"bottom":"top",fill:V,children:c(M,N)}));const K=o+i,it=w+b+E;D.push(d(n,{indexes:z,datum:N,data:r,x:H+o/2-K/2,y:it,width:K,positionH:"center"}))}),I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,I(Y,{width:S,height:R,children:[d(jt,{children:k}),d(Y,{children:F}),d(Y,{children:L}),d(Ot,{children:D})]})]})};Tt("chart-column",{component:P2,composites:["title","item"]});var iz=Object.defineProperty,oz=Object.defineProperties,sz=Object.getOwnPropertyDescriptors,C2=Object.getOwnPropertySymbols,az=Object.prototype.hasOwnProperty,lz=Object.prototype.propertyIsEnumerable,O2=(t,e,n)=>e in t?iz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,M2=(t,e)=>{for(var n in e||(e={}))az.call(e,n)&&O2(t,n,e[n]);if(C2)for(var n of C2(e))lz.call(e,n)&&O2(t,n,e[n]);return t},cz=(t,e)=>oz(t,sz(e));const S2=t=>{const{Title:e,Item:n,data:r,width:i,height:o=260,gap:s=10,padding:a=24,showValue:l=!0,options:c,valueFormatter:h=xt=>xt.toString()}=t,{title:u,desc:f,items:p=[],xTitle:g,yTitle:y}=r,m=e?d(e,{title:u,desc:f}):null;if(p.length===0)return d(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:m});const[x,v,b,w]=ir(a),_={indexes:[0],datum:p[0],data:r,positionH:"center",positionV:"normal"},$=et(d(n,M2({},_))),P=$.width,C=$.height,T=Math.max(28,C+14),E=44,S=y?26:0,R=g?22:0,O=P+s,A=p.length>0?(p.length-1)*O+P:0,F=i!==void 0?i:Math.max(200,A||320),L=p.length>1?Math.max(O,(F-P)/(p.length-1)):0,D=p.length>0?Math.max(P,(p.length-1)*L+P):0,k=w+E+S,N=x+S,j=k+D+v,X=N+o+T+R+b,z=p.map(xt=>{var Ft;return(Ft=xt.value)!=null?Ft:0}),M=Math.max(...z,0),H=Math.min(...z,0),B=Math.max(Math.abs(M),Math.abs(H))*.1,q=H<0?H-B:0;let V=M>0?M+B:1;V===q&&(V=q+1);const G=Xi().domain([q,V]).nice().range([o,0]),Z=Math.max(0,Math.min(o,G(0))),K=V<=0?0:q>=0?o:Z,it=ce(c),Q=ge(c.themeConfig),at=Q.colorText||"#666",ht=[],nt=[],J=[],tt=[],st=[],vt=[],gt=[];G.ticks(6).forEach(xt=>{const Ft=N+G(xt);ht.push(d(yt,{d:`M ${k} ${Ft} L ${k+D} ${Ft}`,width:D,height:1,stroke:at,strokeWidth:1,"data-element-type":"shape",opacity:.08})),gt.push(d(St,{x:k-8,y:Ft,alignHorizontal:"right",alignVertical:"middle",fontSize:12,fill:at,children:Number.isInteger(xt)?xt.toString():xt.toFixed(1)}))});const ot=[],ft=[],mt=[],wt=xt=>{if(xt.length===0)return"";if(xt.length===1){const Mt=xt[0];return`M ${Mt.x} ${Mt.y}`}const Ft=[];Ft.push(`M ${xt[0].x} ${xt[0].y}`);for(let Mt=0;Mt<xt.length-1;Mt++){const Nt=xt[Mt-1]||xt[Mt],ae=xt[Mt],ne=xt[Mt+1],ye=xt[Mt+2]||ne,ve=ae.x+(ne.x-Nt.x)/6,Fe=ae.y+(ne.y-Nt.y)/6,Ve=ne.x-(ye.x-ae.x)/6,eo=ne.y-(ye.y-ae.y)/6;Ft.push(`C ${ve} ${Fe} ${Ve} ${eo} ${ne.x} ${ne.y}`)}return Ft.join(" ")};p.forEach((xt,Ft)=>{var Mt;const Nt=k+Ft*L+P/2,ae=N+G((Mt=xt.value)!=null?Mt:0);ft.push({x:Nt,y:ae,datum:xt}),ot.push(d(n,cz(M2({},_),{indexes:[Ft],datum:xt,x:Nt-P/2,y:N+o+4})));const ne=It(c,[Ft])||Q.colorPrimary;mt.push({x:Nt,color:ne})});const pt=mt.length>0?Math.min(...mt.map(xt=>xt.x)):k,_t=mt.length>0?Math.max(...mt.map(xt=>xt.x)):k+D,Rt=Math.max(1,_t-pt),Vt=mt.map(xt=>d("stop",{offset:`${(xt.x-pt)/Rt*100}%`,stopColor:xt.color})),ee=mt.map(xt=>d("stop",{offset:`${(xt.x-pt)/Rt*100}%`,stopColor:xt.color,stopOpacity:"0.18"}));if(mt.length>0){const xt=mt[mt.length-1].color;Vt.push(d("stop",{offset:"100%",stopColor:xt})),ee.push(d("stop",{offset:"100%",stopColor:xt,stopOpacity:"0.04"}))}const Dt=`chart-line-${gf([D,o,at,it,mt.map(xt=>`${xt.x.toFixed(2)}-${xt.color}`).join()].join(":"))}`,Ht=`${Dt}-stroke`,he=`${Dt}-area`,kt=wt(ft);J.push(d(yt,{d:kt,width:D,height:o,stroke:`url(#${Ht})`,strokeWidth:3,fill:"none","data-element-type":"shape"}));const Lt=kt.includes("C")?kt.slice(kt.indexOf("C")):"",me=[`M ${ft[0].x} ${N+K}`,`L ${ft[0].x} ${ft[0].y}`,Lt,`L ${ft[ft.length-1].x} ${N+K}`,"Z"].join(" ");return J.push(d(yt,{d:me,width:D,height:o,fill:`url(#${he})`,stroke:"none","data-element-type":"shape"})),ft.forEach((xt,Ft)=>{var Mt;const Nt=It(c,[Ft])||Q.colorPrimary;tt.push(d(Wt,{x:xt.x-6,y:xt.y-6,width:12,height:12,fill:Nt,"data-element-type":"shape"})),l&&st.push(d(St,{x:xt.x,y:xt.y-12,alignHorizontal:"center",alignVertical:"bottom",fontSize:12,fontWeight:"bold",fill:Nt,children:h((Mt=xt.datum.value)!=null?Mt:0,xt.datum)}))}),nt.push(d(yt,{d:`M ${k} ${N+K} L ${k+D} ${N+K}`,width:D,height:1,stroke:at,strokeWidth:1,"data-element-type":"shape"})),nt.push(d(yt,{d:`M ${k} ${N} L ${k} ${N+o}`,width:1,height:o,stroke:at,strokeWidth:1,"data-element-type":"shape"})),g&&vt.push(d(St,{x:k+D/2,y:N+o+T+R/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:at,children:g})),y&&vt.push(d(St,{x:w+S/2,y:N+o/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:at,children:y})),I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[m,I(Y,{width:j,height:X,children:[I(jt,{children:[d("linearGradient",{id:Ht,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:Vt}),I("linearGradient",{id:he,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[ee,d("stop",{offset:"100%",stopColor:it,stopOpacity:"0.04"})]})]}),d(Y,{children:ht}),d(Y,{children:[...nt,...gt]}),d(Y,{children:J}),d(Y,{children:tt}),d(Y,{children:st}),d(Y,{children:vt}),d(Ot,{children:ot})]})]})};Tt("chart-line",{component:S2,composites:["title","item","xTitle","yTitle"]});const E2=t=>{var e;const{Title:n,Item:r,data:i,radius:o=140,innerRadius:s=0,padding:a=30,showPercentage:l=!0,options:c}=t,{title:h,desc:u,items:f=[]}=i,p=n?d(n,{title:h,desc:u}):null,g=et(d(U,{indexes:[0]})),y=(e=f[0])!=null?e:{label:"",value:0},m=et(d(r,{indexes:[0],datum:y,data:i,positionH:"center",positionV:"middle"})),x=m.width||140,v=m.height||32,b=Math.max(o,60),w=1.35,_=8,$=b*w+_+x,P=b,C=a+$,T=a+P,E=C*2,S=T*2;if(f.length===0)return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,d(Y,{width:E,height:S,children:d(Et,{children:d(U,{indexes:[0],x:C-g.width/2,y:T-g.height/2})})})]});const R=f.reduce((G,Z)=>{var K;return G+Math.max((K=Z.value)!=null?K:0,0)},0),O=ce(c),A=ge(c.themeConfig),L=Ak().value(G=>{var Z;return Math.max((Z=G.value)!=null?Z:0,0)}).sort(null).startAngle(0).endAngle(Math.PI*2)(f),D=qi().innerRadius(s).outerRadius(b).cornerRadius(2),k=qi().innerRadius(b).outerRadius(b),N=qi().innerRadius(b*1.15).outerRadius(b*1.15),j=s+(b-s)*.5,X=qi().innerRadius(j).outerRadius(j),z=qi().innerRadius(b*.85).outerRadius(b*.85),M=[],H=[],B=[],q=[],V=[];return L.forEach(G=>{const Z=G.data,K=G.index,it=It(c,[K])||A.colorPrimary||O,Q=D(G)||"";M.push(d(yt,{d:Q,fill:it,stroke:A.colorBg,strokeWidth:1,"data-element-type":"shape",width:b*2,height:b*2}));const ht=G.startAngle+(G.endAngle-G.startAngle)/2<Math.PI,nt=k.centroid(G),J=N.centroid(G),st=[b*w*(ht?1:-1),J[1]];B.push(d(yt,{d:`M${C+nt[0]} ${T+nt[1]} L${C+J[0]} ${T+J[1]} L${C+st[0]} ${T+st[1]}`,stroke:O,strokeOpacity:.45,strokeWidth:2,fill:"none","data-element-type":"shape"}));const vt=C+st[0]+(ht?_:-_-x),gt=T+st[1]-v/2;if(q.push(d(r,{indexes:[K],datum:Z,data:i,x:vt,y:gt,width:x,height:v,positionH:ht?"normal":"flipped",positionV:"middle",themeColors:ge({colorPrimary:it},c)})),l&&R>0){const ot=X.centroid(G),ft=Math.max(G.value,0),mt=(ft*100/R).toFixed(1),wt=50,pt=20;H.push(d(St,{x:C+ot[0]-wt/2,y:T+ot[1]-pt/2,width:wt,height:pt,alignHorizontal:"center",alignVertical:"middle",fontSize:12,fontWeight:"bold",fill:"#ffffff","data-value":ft,"data-indexes":[K],"data-element-type":zt.ItemValue,children:`${mt}%`}))}const ut=z.centroid(G);V.push(d(Yt,{indexes:[K],x:C+ut[0]-g.width/2,y:T+ut[1]-g.height/2}))}),L.forEach((G,Z)=>{const K=(Z+1)%L.length,it=G.endAngle,Q=L[K].startAngle+(K===0?Math.PI*2:0),at=(it+Q)/2,ht=b*1,nt=Math.sin(at)*ht,J=-Math.cos(at)*ht;V.push(d(U,{indexes:[Z+1],x:C+nt-g.width/2,y:T+J-g.height/2}))}),I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[p,I(Y,{width:E,height:S,children:[d(Y,{x:C,y:T,children:M}),d(Y,{children:B}),d(Y,{children:H}),d(Ot,{children:q}),d(Et,{children:V})]})]})};Tt("chart-pie",{component:E2,composites:["title","item"]});var hz=Object.defineProperty,dz=Object.defineProperties,uz=Object.getOwnPropertyDescriptors,I2=Object.getOwnPropertySymbols,fz=Object.prototype.hasOwnProperty,pz=Object.prototype.propertyIsEnumerable,A2=(t,e,n)=>e in t?hz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,T2=(t,e)=>{for(var n in e||(e={}))fz.call(e,n)&&A2(t,n,e[n]);if(I2)for(var n of I2(e))pz.call(e,n)&&A2(t,n,e[n]);return t},k2=(t,e)=>dz(t,uz(e));const gz=[0,30,-30,60,-60],mz=Math.PI*(3-Math.sqrt(5));function L2(t,e,n){const r=Math.PI/180*n,i=Math.cos(r),o=Math.sin(r);return{width:Math.abs(t*i)+Math.abs(e*o),height:Math.abs(t*o)+Math.abs(e*i)}}function yz(t,e,n,r,i,o){const s=t-o,a=t+n+o,l=e-o,c=e+r+o;return i.some(h=>{const u=h.box.x-o,f=h.box.x+h.box.width+o,p=h.box.y-o,g=h.box.y+h.box.height+o;return!(a<=u||s>=f||c<=p||l>=g)})}function vz(t,e,n,r,i){const o=[],s=e?gz:[0],a=Math.max(1600,t.length*28);return t.forEach((l,c)=>{const h=Math.max(l.width,l.height),u=c*mz;let f=0,p=null;for(let g=0;g<a&&!p;g++){g===Math.floor(a*.6)&&(f=h);const y=u+g*r,m=i*Math.sqrt(g+1)+f+h*.25,x=m*Math.cos(y),v=m*Math.sin(y);for(const b of s){const w=L2(l.width,l.height,b),_=x-w.width/2,$=v-w.height/2;if(!yz(_,$,w.width,w.height,o,n)){p=k2(T2({},l),{angle:b,centerX:x,centerY:v,box:{x:_,y:$,width:w.width,height:w.height}});break}}}if(!p){const g=s[c%s.length],y=i*Math.sqrt(a+1)+h,m=u,x=y*Math.cos(m),v=y*Math.sin(m),b=L2(l.width,l.height,g);p=k2(T2({},l),{angle:g,centerX:x,centerY:v,box:{x:x-b.width/2,y:v-b.height/2,width:b.width,height:b.height}})}o.push(p)}),o}const z2=t=>{const{data:e,options:n,minFontSize:r=16,maxFontSize:i=48,enableRotate:o=!0,padding:s=6,spiralStep:a=.45,radiusStep:l=10}=t,{items:c=[]}=e,h=c.map((O,A)=>({datum:O,index:A})).filter(({datum:O})=>O.label);if(h.length===0)return d(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:d(Y,{children:d(Ot,{})})});const u=h.map(({datum:O})=>O.value).filter(O=>typeof O=="number"),f=u.length>0,p=f?Math.min(...u):0,g=f?Math.max(...u):0,y=f&&p===g,m=(r+i)/2,x=O=>{if(!f||y)return m;if(O==null)return r;const A=(O-p)/(g-p||1);return r+A*(i-r)},v=h.map(({datum:O,index:A})=>{const F=x(O.value),L=et(d(St,{fontSize:F,fontWeight:"bold",children:O.label})),D=It(n,[A])||ce(n);return{label:O.label,value:O.value,color:D,fontSize:F,width:L.width*1.05,height:L.height}}).sort((O,A)=>A.fontSize-O.fontSize),b=vz(v,o,s,a,l),w=Math.min(...b.map(O=>O.box.x)),_=Math.min(...b.map(O=>O.box.y)),$=Math.max(...b.map(O=>O.box.x+O.box.width)),P=Math.max(...b.map(O=>O.box.y+O.box.height)),C=-w+s,T=-_+s,E=$-w+s*2,S=P-_+s*2,R=b.map((O,A)=>{const F=O.centerX-O.width/2+C,L=O.centerY-O.height/2+T,D=O.width/2,k=O.height/2,N=`translate(${F}, ${L}) rotate(${O.angle}, ${D}, ${k})`;return d(Y,{transform:N,children:d(St,{width:O.width,height:O.height,fontSize:O.fontSize,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:O.color,"data-indexes":A,"data-element-type":zt.ItemLabel,children:O.label})})});return d(Ot,{id:"infographic-container",width:E,height:S,children:R})};Tt("chart-wordcloud",{component:z2,composites:[]});const H2=new Map,mh=(t,e)=>{H2.set(t,e)},xz=t=>{var e;return t&&(e=H2.get(t))!=null?e:null};var bz=Object.defineProperty,wz=Object.defineProperties,_z=Object.getOwnPropertyDescriptors,R2=Object.getOwnPropertySymbols,$z=Object.prototype.hasOwnProperty,Pz=Object.prototype.propertyIsEnumerable,D2=(t,e,n)=>e in t?bz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,N2=(t,e)=>{for(var n in e||(e={}))$z.call(e,n)&&D2(t,n,e[n]);if(R2)for(var n of R2(e))Pz.call(e,n)&&D2(t,n,e[n]);return t},j2=(t,e)=>wz(t,_z(e));mh("pros-cons-arrow",t=>{const{x:e,y:n,colorPositive:r,colorNegative:i,colorBg:o}=t,s=200,a=141,l={width:90,height:40,fontSize:22,alignHorizontal:"center",alignVertical:"middle",fontWeight:"bold",fill:o};return I(Y,{x:e,y:n,width:s,height:a,children:[I(le,{children:[d("path",{d:"M137 54C137 54.2903 137 54.5806 136.706 54.7742L108.614 86.0323H64.7619C64.4071 86.0204 64.0557 86.1043 63.7453 86.2747C63.4349 86.4452 63.1773 86.6959 63 87C63.0037 86.7447 63.1092 86.5012 63.2936 86.3226L91.3862 55.0645H135.238C135.593 55.0763 135.944 54.9925 136.255 54.822C136.565 54.6516 136.823 54.4009 137 54.0968V54Z",fill:"#D9D9D9"}),d("path",{d:"M39.3272 0.484649C39.6146 0.234929 39.9662 0.0736935 40.3407 0.0198929C40.7152 -0.0339076 41.0971 0.0219605 41.4414 0.180925C41.7857 0.33989 42.0783 0.595358 42.2846 0.917314C42.491 1.23927 42.6026 1.61434 42.6063 1.99848V14.8156H136.013C136.54 14.8156 137.045 15.0282 137.418 15.4068C137.791 15.7853 138 16.2987 138 16.834V53.166C138 53.7013 137.791 54.2147 137.418 54.5932C137.045 54.9718 136.54 55.1844 136.013 55.1844H42.6063V68.0015C42.6026 68.3857 42.491 68.7607 42.2846 69.0827C42.0783 69.4046 41.7857 69.6601 41.4414 69.8191C41.0971 69.9781 40.7152 70.0339 40.3407 69.9801C39.9662 69.9263 39.6146 69.7651 39.3272 69.5154L0.672847 36.5138C0.461378 36.3244 0.292014 36.0915 0.176005 35.8305C0.0599968 35.5695 0 35.2864 0 35C0 34.7136 0.0599968 34.4306 0.176005 34.1696C0.292014 33.9085 0.461378 33.6756 0.672847 33.4862L39.4265 0.484649H39.3272Z",fill:r}),d("path",{d:"M157.394 73.0007C157.397 72.6162 157.509 72.2407 157.715 71.9183C157.922 71.596 158.214 71.3403 158.559 71.1811C158.903 71.022 159.285 70.9661 159.659 71.0199C160.034 71.0738 160.385 71.2352 160.673 71.4852L199.327 104.524C199.539 104.714 199.708 104.947 199.824 105.208C199.94 105.47 200 105.753 200 106.04C200 106.326 199.94 106.61 199.824 106.871C199.708 107.132 199.539 107.366 199.327 107.555L160.573 140.594C160.285 140.815 159.943 140.951 159.584 140.989C159.225 141.027 158.862 140.965 158.535 140.809C158.208 140.653 157.929 140.41 157.728 140.105C157.527 139.8 157.411 139.445 157.394 139.078V126.247H63.9874C63.4603 126.247 62.9548 126.034 62.5821 125.655C62.2094 125.276 62 124.762 62 124.226V87.8531C62 87.3172 62.2094 86.8032 62.5821 86.4242C62.9548 86.0453 63.4603 85.8324 63.9874 85.8324H157.394V73.0007Z",fill:i})]}),d(St,j2(N2({x:40,y:15},l),{children:"Pros"})),d(St,j2(N2({x:70,y:85},l),{children:"Cons"}))]})});var Cz=Object.defineProperty,Oz=Object.defineProperties,Mz=Object.getOwnPropertyDescriptors,W2=Object.getOwnPropertySymbols,Sz=Object.prototype.hasOwnProperty,Ez=Object.prototype.propertyIsEnumerable,F2=(t,e,n)=>e in t?Cz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,B2=(t,e)=>{for(var n in e||(e={}))Sz.call(e,n)&&F2(t,n,e[n]);if(W2)for(var n of W2(e))Ez.call(e,n)&&F2(t,n,e[n]);return t},Y2=(t,e)=>Oz(t,Mz(e));mh("pros-cons-fold",t=>{const{x:e,y:n,colorPositive:r,colorNegative:i,colorBg:o}=t,s=240,a=300,l={width:85,height:30,fontSize:20,alignHorizontal:"center",alignVertical:"middle",fontWeight:"bold",fill:o};return I(Y,{x:e,y:n,width:s,height:a,children:[I(le,{children:[d("path",{d:"M136.914 38.7755C137.303 38.7733 137.683 38.6617 138.011 38.4534C138.339 38.2451 138.602 37.9485 138.77 37.5977C138.937 37.247 139.002 36.8561 138.957 36.4701C138.913 36.084 138.76 35.7183 138.517 35.415L110.741 0.982313C110.548 0.735138 110.301 0.535238 110.018 0.397762C109.736 0.260286 109.426 0.188841 109.112 0.188841C108.798 0.188841 108.488 0.260286 108.206 0.397762C107.924 0.535238 107.676 0.735138 107.483 0.982313L79.7069 35.415C79.4639 35.7183 79.3113 36.084 79.2667 36.4701C79.222 36.8561 79.2871 37.247 79.4545 37.5977C79.6219 37.9485 79.8847 38.2451 80.213 38.4534C80.5412 38.6617 80.9216 38.7733 81.3104 38.7755H92.8965C93.0517 57.1293 97.5517 64.9878 105.259 73.7252C107.017 75.7932 108.983 77.8612 111.103 80.1361C113.276 82.4626 122.121 88.9252 131.069 95.181C129.362 88.7701 128.172 81.2218 127.293 73.7252C125.224 55.9918 125.017 38.7755 125.017 38.7755H136.914Z",fill:r,fillOpacity:.4}),d("path",{d:"M237.931 109.967C238.48 109.967 239.006 109.749 239.394 109.362C239.782 108.974 240 108.448 240 107.899V75.7932C240 75.2447 239.782 74.7187 239.394 74.3309C239.006 73.9431 238.48 73.7252 237.931 73.7252H127.241C128.172 81.2218 129.362 88.7701 131.069 95.181C138.182 100.171 145.337 105.1 152.534 109.967H237.931Z",fill:r}),d("path",{d:"M152.586 109.967C152.586 109.967 141.724 102.678 131.069 95.181C124.122 90.5838 117.455 85.5772 111.103 80.1878C109.034 77.8612 107.017 75.7415 105.259 73.7252H48.6207V56.6639C48.6091 56.2797 48.4905 55.9063 48.2784 55.5857C48.0662 55.2651 47.7689 55.0099 47.4197 54.8488C47.0705 54.6878 46.6833 54.6271 46.3016 54.6738C45.9199 54.7204 45.5587 54.8725 45.2586 55.1129L1.50002 90.2694C1.26208 90.4633 1.07029 90.7078 0.938585 90.985C0.80688 91.2622 0.738558 91.5652 0.738558 91.8721C0.738558 92.179 0.80688 92.482 0.938585 92.7592C1.07029 93.0365 1.26208 93.2809 1.50002 93.4748L45.2586 128.631C45.5621 128.874 45.928 129.027 46.3142 129.071C46.7005 129.116 47.0914 129.051 47.4424 128.884C47.7933 128.716 48.09 128.454 48.2984 128.125C48.5068 127.797 48.6185 127.417 48.6207 127.029V109.967H152.586Z",fill:"#BFBFBF"}),d("path",{d:"M36.1034 88.9252H28.9655V93.785H36.1034V101.85H41.4828V93.785H48.6207V88.8735H41.4828V81.1701H36.1034V88.9252Z",fill:"#404040"}),d("path",{d:"M103.086 261.224C102.697 261.227 102.317 261.338 101.989 261.547C101.661 261.755 101.398 262.051 101.23 262.402C101.063 262.753 100.998 263.144 101.043 263.53C101.087 263.916 101.24 264.282 101.483 264.585L129.259 299.018C129.452 299.265 129.699 299.465 129.982 299.602C130.264 299.74 130.574 299.811 130.888 299.811C131.202 299.811 131.512 299.74 131.794 299.602C132.076 299.465 132.324 299.265 132.517 299.018L160.293 264.585C160.536 264.282 160.689 263.916 160.733 263.53C160.778 263.144 160.713 262.753 160.546 262.402C160.378 262.051 160.115 261.755 159.787 261.547C159.459 261.338 159.078 261.227 158.69 261.224H147.103C146.948 242.871 142.448 235.012 134.741 226.275C132.983 224.207 131.017 222.139 128.897 219.864C126.724 217.537 117.879 211.075 108.931 204.819C110.677 211.877 111.938 219.045 112.707 226.275C114.776 244.008 114.983 261.224 114.983 261.224H103.086Z",fill:i,fillOpacity:.4}),d("path",{d:"M2.06897 190.033C1.52025 190.033 0.993996 190.251 0.605989 190.638C0.217983 191.026 5.00679e-06 191.552 5.00679e-06 192.101V224.207C5.00679e-06 224.755 0.217983 225.281 0.605989 225.669C0.993996 226.057 1.52025 226.275 2.06897 226.275H112.759C111.828 218.778 110.638 211.23 108.931 204.819C99.9827 198.512 90.931 192.411 88.2414 190.55C87.7206 190.204 87.1077 190.024 86.4828 190.033H2.06897Z",fill:i}),d("path",{d:"M87.4138 190.033C87.4138 190.033 98.2759 197.322 108.931 204.819C115.878 209.416 122.545 214.423 128.897 219.812C130.966 222.139 132.983 224.258 134.741 226.275H191.379V243.336C191.391 243.72 191.51 244.094 191.722 244.414C191.934 244.735 192.231 244.99 192.58 245.151C192.929 245.312 193.317 245.373 193.698 245.326C194.08 245.28 194.441 245.128 194.741 244.887L238.5 209.731C238.738 209.537 238.93 209.292 239.061 209.015C239.193 208.738 239.261 208.435 239.261 208.128C239.261 207.821 239.193 207.518 239.061 207.241C238.93 206.964 238.738 206.719 238.5 206.525L194.741 171.369C194.438 171.126 194.072 170.973 193.686 170.929C193.3 170.884 192.909 170.949 192.558 171.116C192.207 171.284 191.91 171.546 191.702 171.875C191.493 172.203 191.382 172.583 191.379 172.971V190.033H87.4138Z",fill:"#BFBFBF"}),d("path",{d:"M192.414 205.905V210.816H212.069V205.905H192.414Z",fill:"#404040"})]}),d(St,Y2(B2({x:153,y:77},l),{children:"PROS"})),d(St,Y2(B2({x:2,y:193},l),{children:"CONS"}))]})}),mh("vs",t=>{const{x:e,y:n,colorPrimary:r,colorBg:i}=t,o=100,s=100,a=lt(r).lighten(20).toString();return I(Y,{x:e,y:n,width:o,height:s,children:[I(jt,{children:[d("filter",{id:"vs-divider-glow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",children:d("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"8",result:"blur"})}),d(Ec,{})]}),d(Wt,{x:0,y:0,width:o,height:s,fill:a,filter:"url(#vs-divider-glow-filter)",opacity:.6}),d(Wt,{x:0,y:0,width:o,height:s,fill:r,"data-element-type":"shape"}),d("text",{x:o/2,y:s/2,fontSize:Math.min(o,s)/1.5,fontWeight:"bold",fill:i,textAnchor:"middle",dominantBaseline:"central",filter:"url(#drop-shadow)",children:"VS"})]})});const V2=t=>{const{Title:e,Item:n,data:r,gap:i=20,groupGap:o=20,opposite:s=!0,flipped:a=!0,dividerType:l="vs",options:c}=t,{title:h,desc:u,items:f=[]}=r,p=e?d(e,{title:h,desc:u}):null;if(f.length===0)return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,d(Y,{children:d(Et,{children:d(U,{indexes:[0],x:0,y:0})})})]});const g=f[0]||{children:[]},y=f[1]||{children:[]},m=g.children||[],x=y.children||[],v=ge(c.themeConfig),b=et(d(n,{indexes:[0,0],data:r,datum:m[0]||{}})),w=et(d(U,{indexes:[0]})),_=xz(l),$=_?et(d(_,{x:0,y:0,colorPrimary:v.colorPrimary,colorBg:v.colorBg,colorPositive:v.colorPrimary,colorNegative:v.colorPrimary})):{width:0,height:0},P=[],C=[],T=[],E=Math.max(m.length,x.length),S=E>0?E*(b.height+i)-i:0,R=5,O=E>0?i/2+w.height/2:w.height/2,A=w.width+R,F=A+b.width+o,L=F+$.width+o,D=a?"flipped":"normal",k=a?"normal":s?"flipped":"normal";if(m.forEach((N,j)=>{const X=O+j*(b.height+i),z=[0,j];P.push(d(n,{indexes:z,datum:N,data:r,x:A,y:X,positionH:D,positionV:"middle"})),C.push(d(Yt,{indexes:z,x:A-w.width-R,y:X+(b.height-w.height)/2})),j<m.length-1&&C.push(d(U,{indexes:[0,j+1],x:A+(b.width-w.width)/2,y:X+b.height+i/2-w.height/2}))}),m.length>0){C.push(d(U,{indexes:[0,0],x:A+(b.width-w.width)/2,y:O-i/2-w.height/2}));const N=O+(m.length-1)*(b.height+i);C.push(d(U,{indexes:[0,m.length],x:A+(b.width-w.width)/2,y:N+b.height+i/2-w.height/2}))}else f.length>=1&&C.push(d(U,{indexes:[0,0],x:A+(b.width-w.width)/2,y:O-w.height/2}));if(x.forEach((N,j)=>{const X=O+j*(b.height+i),z=[1,j];P.push(d(n,{indexes:z,datum:N,data:r,x:L,y:X,positionH:k,positionV:"middle"})),C.push(d(Yt,{indexes:z,x:L+b.width+R,y:X+(b.height-w.height)/2})),j<x.length-1&&C.push(d(U,{indexes:[1,j+1],x:L+(b.width-w.width)/2,y:X+b.height+i/2-w.height/2}))}),x.length>0){C.push(d(U,{indexes:[1,0],x:L+(b.width-w.width)/2,y:O-i/2-w.height/2}));const N=O+(x.length-1)*(b.height+i);C.push(d(U,{indexes:[1,x.length],x:L+(b.width-w.width)/2,y:N+b.height+i/2-w.height/2}))}else f.length>=2&&C.push(d(U,{indexes:[1,0],x:L+(b.width-w.width)/2,y:O-w.height/2}));return f.length<2&&C.push(d(U,{indexes:[1],x:L+(b.width-w.width)/2,y:O+(S-w.height)/2})),_&&T.push(d(_,{x:F,y:O+(S-$.height)/2,colorPrimary:v.colorPrimary,colorBg:v.colorBg,colorPositive:It(c,[0])||v.colorPrimary,colorNegative:It(c,[1])||v.colorPrimary})),I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,I(Y,{children:[d(Y,{children:T}),d(Ot,{children:P}),d(Et,{children:C})]})]})};Tt("compare-binary-horizontal",{component:V2,composites:["title","item"]});var Iz=Object.defineProperty,X2=Object.getOwnPropertySymbols,Az=Object.prototype.hasOwnProperty,Tz=Object.prototype.propertyIsEnumerable,G2=(t,e,n)=>e in t?Iz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,q2=(t,e)=>{for(var n in e||(e={}))Az.call(e,n)&&G2(t,n,e[n]);if(X2)for(var n of X2(e))Tz.call(e,n)&&G2(t,n,e[n]);return t};const kz={none:5,"dot-line":100,"arc-dot":20,"split-line":5},U2=t=>{var e,n;const{Title:r,Items:i,data:o,gap:s=20,groupGap:a=0,decoration:l="none",surround:c=!0,flipRoot:h=!1,flipLeaf:u=!1,options:f}=t,[p,g]=i,{title:y,desc:m,items:x=[]}=o,v=r?d(r,{title:y,desc:m}):null,b=d(p,{indexes:[0],data:o,datum:o.items[0],themeColors:{}}),w=d(g,{indexes:[0,0],data:o,datum:((n=(e=x[0])==null?void 0:e.children)==null?void 0:n[0])||x[2]}),_=et(b),$=et(w),P=[],C=[],[T,E]=x,S=(T==null?void 0:T.children)||[],R=(E==null?void 0:E.children)||[],O=Math.max(_.height,S.length*($.height+s)-s,R.length*($.height+s)-s),A=kz[l]||0,F=$.width+A,L=F+_.width+a,D=(O-_.height)/2;T&&P.push(d(p,{indexes:[0],x:F,y:D,data:o,datum:T,positionH:h?"normal":"flipped"})),E&&P.push(d(p,{indexes:[1],x:L,y:D,data:o,datum:E,positionH:h?"flipped":"normal"}));const k=(N,j,X)=>{if(l==="none")return;const[z,M]=j,H=It(f,X),B={x:z,y:M,width:$.width,height:$.height,side:N,color:H||"#ccc",colorBg:f.themeConfig.colorBg||"#fff"};l==="split-line"?C.push(d(Lz,q2({},B))):l==="dot-line"&&C.push(d(zz,q2({},B)))};if(c){const j=(2*_.width+a+$.width)/2+A,X=F+_.width+a/2,z=D+_.height/2;S.forEach((M,H)=>{const B=S.length*($.height+s)-s,V=(O-B)/2+H*($.height+s),Z=V+$.height/2-z,K=Math.max(0,j*j-Z*Z),Q=X-Math.sqrt(K)-$.width/2;P.push(d(g,{indexes:[0,H],datum:M,data:o,x:Q,y:V,positionH:u?"flipped":"normal"})),k("left",[Q,V],[0,H])}),R.forEach((M,H)=>{const B=R.length*($.height+s)-s,V=(O-B)/2+H*($.height+s),Z=V+$.height/2-z,K=Math.max(0,j*j-Z*Z),Q=X+Math.sqrt(K)-$.width/2;P.push(d(g,{indexes:[1,H],datum:M,data:o,x:Q,y:V,positionH:u?"normal":"flipped"})),k("right",[Q,V],[1,H])})}else S.forEach((N,j)=>{const X=S.length*($.height+s)-s,M=(O-X)/2+j*($.height+s),H=[0,j],B=0;P.push(d(g,{indexes:H,datum:N,data:o,x:B,y:M,positionH:u?"flipped":"normal"})),k("left",[B,M],H)}),R.forEach((N,j)=>{const X=R.length*($.height+s)-s,M=(O-X)/2+j*($.height+s),H=[1,j],B=L+_.width+A;P.push(d(g,{indexes:H,datum:N,data:o,x:B,y:M,positionH:u?"normal":"flipped"})),k("right",[B,M],H)});return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[v,I(Y,{children:[d(Ot,{children:P}),d(Y,{width:0,height:0,children:C})]})]})},Lz=t=>{const{x:e,y:n,width:r,height:i,color:o,colorBg:s,side:a}=t,l=n+i,c=`split-line-linear-gradient-${a}`;return I(Bt,{children:[d(jt,{children:d(Ic,{id:c,startColor:o,stopColor:s,direction:a==="left"?"left-right":"right-left"})}),d(Ct,{x:e,y:l,width:r,height:1,fill:`url(#${c})`})]})},zz=t=>{const{x:e,y:n,side:r,width:i,height:o,color:s,colorBg:a}=t,l=6,c=l/3,h=l*2,u=c*2,f=5,p=r==="left"?e+i+l+f:e-l-f,g=n+o/2,y=p-c,m=g-c,x=80,v=r==="left"?x:-x,b=`dot-line-linear-gradient-${r}`;return I(Y,{children:[d(jt,{children:d(Ic,{id:b,startColor:s,stopColor:a,direction:r==="left"?"left-right":"right-left"})}),I(le,{children:[d(Wt,{x:p-l,y:g-l,width:h,height:h,fill:"none",strokeWidth:1,stroke:s}),d(Wt,{x:y,y:m,width:u,height:u,fill:s})]}),d(Ct,{x:r==="left"?p:p+v,y:g-.5,width:x,height:1,fill:`url(#${b})`})]})};Tt("compare-hierarchy-left-right",{component:U2,composites:["title","item"]});const Z2=t=>{var e,n;const{Title:r,Items:i,data:o,gap:s=0,itemGap:a=20,columnWidth:l=280,itemPadding:c=5,showColumnBackground:h=!0,columnBackgroundAlpha:u=.08,options:f}=t,[p,g]=i,{title:y,desc:m,items:x=[]}=o,v=r?d(r,{title:y,desc:m}):null,b=Tg(f),w=[],_=[],$=l-c*2,P=et(d(p,{indexes:[0],data:o,datum:x[0],width:l})),C=et(d(g,{indexes:[0,0],data:o,datum:((n=(e=x[0])==null?void 0:e.children)==null?void 0:n[0])||{},width:$})),T=et(d(U,{indexes:[0]})),E=Math.max(...x.map(R=>{var O;return((O=R.children)==null?void 0:O.length)||0}),0),S=P.height+a+E*(C.height+a);if(x.forEach((R,O)=>{const{children:A=[]}=R,F=O*(l+s),L=F,D=0;if(h){const X=`${b[O%b.length]}${Math.round(u*255).toString(16).padStart(2,"0")}`;w.push(d(Ct,{x:F,y:D,width:l,height:S,fill:X,rx:0,ry:0,"data-element-type":"shape"}))}w.push(d(p,{indexes:[O],datum:R,data:o,x:L,y:D,width:l})),_.push(d(Yt,{indexes:[O],x:L+P.width-T.width-10,y:D+10})),O===0&&_.push(d(U,{indexes:[O],x:L+P.width/2-T.width/2,y:D-T.height-5}));const k=D+P.height+a;A.forEach((j,X)=>{const z=k+X*(C.height+a),M=L+c,H=[O,X];w.push(d(g,{indexes:H,datum:j,data:o,x:M,y:z,width:$})),_.push(d(Yt,{indexes:H,x:M+C.width-T.width-10,y:z+(C.height-T.height)/2})),X<A.length-1&&_.push(d(U,{indexes:[O,X+1],x:M+C.width/2-T.width/2,y:z+C.height-T.height/2}))});const N=L+c;if(A.length>0){const j=k+A.length*(C.height+a);_.push(d(U,{indexes:[O,A.length],x:N+C.width/2-T.width/2,y:j-C.height/2-T.height/2}))}else _.push(d(U,{indexes:[O,0],x:N+C.width/2-T.width/2,y:k-a/2-T.height/2}))}),x.length>0){const R=x.length*(l+s);_.push(d(U,{indexes:[x.length],x:R-s/2-T.width/2,y:-T.height-5}))}return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[v,I(Y,{children:[d(Ot,{children:w}),d(Et,{children:_})]})]})};Tt("compare-hierarchy-row",{component:Z2,composites:["title","item"]});const yh=Object.assign,Hz={getId:t=>t.id||t.name,getPreH:t=>t.preH||0,getPreV:t=>t.preV||0,getHGap:t=>t.hgap||18,getVGap:t=>t.vgap||18,getChildren:t=>t.children,getHeight:t=>t.height||36,getWidth(t){const e=t.label||" ";return t.width||18*e.split("").length}};class qs{constructor(e,n){if(this.x=0,this.y=0,this.depth=0,this.children=[],this.hgap=0,this.vgap=0,e instanceof qs||"x"in e&&"y"in e&&"children"in e){const o=e;return this.data=o.data,this.id=o.id,this.x=o.x,this.y=o.y,this.width=o.width,this.height=o.height,this.depth=o.depth,this.children=o.children,this.parent=o.parent,this.hgap=o.hgap,this.vgap=o.vgap,this.preH=o.preH,void(this.preV=o.preV)}this.data=e;const r=n.getHGap(e),i=n.getVGap(e);this.preH=n.getPreH(e),this.preV=n.getPreV(e),this.width=n.getWidth(e),this.height=n.getHeight(e),this.width+=this.preH,this.height+=this.preV,this.id=n.getId(e),this.addGap(r,i)}isRoot(){return this.depth===0}isLeaf(){return this.children.length===0}addGap(e,n){this.hgap+=e,this.vgap+=n,this.width+=2*e,this.height+=2*n}eachNode(e){let n,r=[this];for(;n=r.shift();)e(n),r=n.children.concat(r)}DFTraverse(e){this.eachNode(e)}BFTraverse(e){let n,r=[this];for(;n=r.shift();)e(n),r=r.concat(n.children)}getBoundingBox(){const e={left:Number.MAX_VALUE,top:Number.MAX_VALUE,width:0,height:0};return this.eachNode(n=>{e.left=Math.min(e.left,n.x),e.top=Math.min(e.top,n.y),e.width=Math.max(e.width,n.x+n.width),e.height=Math.max(e.height,n.y+n.height)}),e}translate(e=0,n=0){this.eachNode(r=>{r.x+=e,r.y+=n,r.x+=r.preH,r.y+=r.preV})}right2left(){const e=this.getBoundingBox();this.eachNode(n=>{n.x=n.x-2*(n.x-e.left)-n.width}),this.translate(e.width,0)}bottom2top(){const e=this.getBoundingBox();this.eachNode(n=>{n.y=n.y-2*(n.y-e.top)-n.height}),this.translate(0,e.height)}}function vh(t,e={},n){e=yh({},Hz,e);const r=new qs(t,e),i=[r];let o;if(!n&&!t.collapsed){for(;o=i.shift();)if(!o.data.collapsed){const s=e.getChildren(o.data),a=s?s.length:0;if(o.children=new Array(a),s&&a)for(let l=0;l<a;l++){const c=new qs(s[l],e);o.children[l]=c,i.push(c),c.parent=o,c.depth=o.depth+1}}}return r}class Rz{constructor(e,n={}){this.options=n,this.rootNode=vh(e,n)}execute(){throw new Error("please override this method")}}function Dz(t,e){const n=vh(t.data,e,!0),r=vh(t.data,e,!0),i=t.children.length,o=Math.round(i/2),s=e.getSide||function(a,l){return l<o?"right":"left"};for(let a=0;a<i;a++){const l=t.children[a];s(l,a)==="right"?r.children.push(l):n.children.push(l)}return n.eachNode(a=>{a.isRoot()||(a.side="left")}),r.eachNode(a=>{a.isRoot()||(a.side="right")}),{left:n,right:r}}const Nn=["LR","RL","TB","BT","H","V"],Nz=["LR","RL","H"],jz=Nn[0];function Wz(t,e,n){const r=e.direction||jz;if(e.isHorizontal=(o=>Nz.indexOf(o)>-1)(r),Nn.indexOf(r)===-1)throw new TypeError(`Invalid direction: ${r}`);if(r===Nn[0])n(t,e);else if(r===Nn[1])n(t,e),t.right2left();else if(r===Nn[2])n(t,e);else if(r===Nn[3])n(t,e),t.bottom2top();else if(r===Nn[4]||r===Nn[5]){const{left:o,right:s}=Dz(t,e);n(o,e),n(s,e),e.isHorizontal?o.right2left():o.bottom2top(),s.translate(o.x-s.x,o.y-s.y),t.x=o.x,t.y=s.y;const a=t.getBoundingBox();e.isHorizontal?a.top<0&&t.translate(0,-a.top):a.left<0&&t.translate(-a.left,0)}let i=e.fixedRoot;return i===void 0&&(i=!0),i&&t.translate(-(t.x+t.width/2+t.hgap),-(t.y+t.height/2+t.vgap)),(function(o,s){if(s.radial){const[a,l]=s.isHorizontal?["x","y"]:["y","x"],c={x:1/0,y:1/0},h={x:-1/0,y:-1/0};let u=0;o.DFTraverse(g=>{u++;const{x:y,y:m}=g;c.x=Math.min(c.x,y),c.y=Math.min(c.y,m),h.x=Math.max(h.x,y),h.y=Math.max(h.y,m)});const f=h[l]-c[l];if(f===0)return;const p=2*Math.PI/u;o.DFTraverse(g=>{const y=g[l],m=c[l],x=g[a],v=o[a],b=(y-m)/f*(2*Math.PI-p)+p,w=x-v;g.x=Math.cos(b)*w,g.y=Math.sin(b)*w})}})(t,e),t}function K2(t,e){let n=0;return t.children.length?t.children.forEach(r=>{n+=K2(r,e)}):n=t.height,t._subTreeSep=e.getSubTreeSep(t.data),t.totalHeight=Math.max(t.height,n)+2*t._subTreeSep,t.totalHeight}function Q2(t){const e=t.children,n=e.length;if(n){e.forEach(a=>{Q2(a)});const r=e[0],i=e[n-1],o=i.y-r.y+i.height;let s=0;if(e.forEach(a=>{s+=a.totalHeight}),o>t.height)t.y=r.y+o/2-t.height/2;else if(e.length!==1||t.height>s){const a=t.y+(t.height-o)/2-r.y;e.forEach(l=>{l.translate(0,a)})}else t.y=(r.y+r.height/2+i.y+i.height/2)/2-t.height/2}}const Fz={getSubTreeSep:()=>0};function Bz(t,e={}){return e=yh({},Fz,e),t.parent={x:0,width:0,height:0,y:0},t.BFTraverse(n=>{n.x=n.parent.x+n.parent.width}),t.parent=void 0,K2(t,e),t.startY=0,t.y=t.totalHeight/2-t.height/2,t.eachNode(n=>{const r=n.children,i=r.length;if(i){const o=r[0];if(o.startY=n.startY+n._subTreeSep,i===1)o.y=n.y+n.height/2-o.height/2;else{o.y=o.startY+o.totalHeight/2-o.height/2;for(let s=1;s<i;s++){const a=r[s];a.startY=r[s-1].startY+r[s-1].totalHeight,a.y=a.startY+a.totalHeight/2-a.height/2}}}}),Q2(t),t}class Yz extends Rz{execute(){return Wz(this.rootNode,this.options,Bz)}}const Vz={};function Xz(t,e){const n=yh({},Vz,e);return new Yz(t,n).execute()}var Gz=Object.defineProperty,qz=Object.defineProperties,Uz=Object.getOwnPropertyDescriptors,J2=Object.getOwnPropertySymbols,Zz=Object.prototype.hasOwnProperty,Kz=Object.prototype.propertyIsEnumerable,ty=(t,e,n)=>e in t?Gz(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qz=(t,e)=>{for(var n in e||(e={}))Zz.call(e,n)&&ty(t,n,e[n]);if(J2)for(var n of J2(e))Kz.call(e,n)&&ty(t,n,e[n]);return t},Jz=(t,e)=>qz(t,Uz(e));const tH=60,eH=14,ey=30,ny="center",nH="curved",rH=2,iH="node",oH="solid",ry=(t,e=[],n=0)=>{var r,i;const o=[...e,n];return Jz(Qz({},t),{_indexes:o,children:(i=(r=t.children)==null?void 0:r.map((s,a)=>ry(s,o,a)))!=null?i:[]})},iy=(t,e,n,r)=>{var i,o;e.push(t),(o=(i=t.data)._flatIndex)!=null||(i._flatIndex=e.length-1),r&&n.push({parent:r,child:t});const s=t.children;s==null||s.forEach(a=>iy(a,e,n,t))},sH=(t,e,n,r)=>{const i=Math.abs(n-t)/2,o=n>t?t+i:t-i,s=n>t?n-i:n+i;return`M ${t} ${e} C ${o} ${e} ${s} ${r} ${n} ${r}`},aH=(t,e,n,r)=>`M ${t} ${e} L ${n} ${r}`,lH=(t,e,n,r=ny)=>{const i=c=>Math.max(0,Math.min(1,c)),s=(c=>c==="top"?0:c==="bottom"?1:c==="center"?.5:i(c))(r),a=t.y+t.height*s,l=e.y+e.height*s;return n==="left"?{sx:t.x,sy:a,tx:e.x+e.width,ty:l}:{sx:t.x+t.width,sy:a,tx:e.x,ty:l}},oy=t=>{var e,n;const{Title:r,Items:i,data:o,levelGap:s=tH,nodeGap:a=eH,edgeAlign:l=ny,colorMode:c=iH,edgeColorMode:h=oH,edgeType:u=nH,edgeWidth:f=rH,options:p}=t,{title:g,desc:y,items:m=[]}=o,x=r?d(r,{title:g,desc:y}):null,v=ce(p),b=et(d(U,{indexes:[0]}));if(!m.length||!(i!=null&&i.length))return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[x,d(Y,{children:d(U,{indexes:[0],x:0,y:0})})]});const w=ry(m[0]),_=new WeakMap,$=new WeakMap,P=new WeakMap,C=(H,B)=>Li({depth:B,originalIndexes:H._indexes,flatIndex:H._flatIndex},c),T=(H,B)=>{const q=P.get(H);if(q)return q;const V=C(H,B),G=It(p,V),Z=ge({colorPrimary:G},p);return P.set(H,Z),$.set(H,G),Z},E=H=>{const B=_.get(H);if(B)return B;const q=Math.max(H._indexes.length-1,0),V=bs(i,q),G=et(d(V,{indexes:H._indexes,data:o,datum:H,positionH:"center",positionV:"middle",themeColors:T(H,q)}));return _.set(H,G),G},S=Xz(w,{direction:"H",getSide:(H,B)=>{if(!H.parent)return"right";const q=(H.parent.children||[]).indexOf(H);return(q>=0?q:B)%2===0?"left":"right"},getWidth:H=>E(H).width,getHeight:H=>E(H).height,getHGap:()=>s,getVGap:()=>a}),R=[],O=[];iy(S,R,O);const A=R.length>0?Math.min(...R.map(H=>H.x)):0,F=R.length>0?Math.min(...R.map(H=>H.y)):0,L=ey-A,D=ey-F,k=[],N=[],j=[],X=[],z=new WeakMap;R.forEach(H=>{var B,q;const V=H.data,G=E(V),Z=H.x+L+((B=H.hgap)!=null?B:0),K=H.y+D+((q=H.vgap)!=null?q:0),it=bs(i,H.depth),Q=H.depth===0?"center":H.side==="left"?"flipped":"normal",at=T(V,H.depth);j.push(d(it,{indexes:V._indexes,data:o,datum:V,x:Z,y:K,positionH:Q,positionV:"middle",themeColors:at})),z.set(H,{x:Z,y:K,width:G.width,height:G.height,centerX:Z+G.width/2,centerY:K+G.height/2})}),O.forEach(H=>{var B,q,V,G;const{parent:Z,child:K}=H,it=z.get(K),Q=z.get(Z);if(!it||!Q)return;const at=K.data,{sx:ht,sy:nt,tx:J,ty:tt}=lH(Q,it,K.side,l),st=(B=$.get(at))!=null?B:It(p,C(at,K.depth)),vt=(q=$.get(Z.data))!=null?q:It(p,C(Z.data,Z.depth)),gt=u==="straight"?aH(ht,nt,J,tt):sH(ht,nt,J,tt),ut=`edge-gradient-${at._indexes.join("-")}`;N.push(d(yt,{d:gt,stroke:h==="gradient"?`url(#${ut})`:st!=null?st:v,strokeWidth:f,fill:"none"})),h==="gradient"&&k.push(I("linearGradient",{id:ut,gradientUnits:"userSpaceOnUse",x1:ht,y1:nt,x2:J,y2:tt,children:[d("stop",{offset:"0%",stopColor:vt!=null?vt:v}),d("stop",{offset:"100%",stopColor:st!=null?st:v})]}));const ot=(G=(V=at.children)==null?void 0:V.length)!=null?G:0,ft=[...at._indexes,ot],mt=it.x+(it.width-b.width)/2,wt=it.y+it.height+8,pt=wt+b.height+6;K.depth>0&&X.push(d(Yt,{indexes:at._indexes,x:mt,y:wt})),X.push(d(U,{indexes:ft,x:mt,y:pt}))});const M=z.get(S);if(M){const H=S.data,B=(n=(e=H.children)==null?void 0:e.length)!=null?n:0,q=[...H._indexes,B],V=M.x+(M.width-b.width)/2,G=M.y+M.height+8+b.height+6;X.push(d(U,{indexes:q,x:V,y:G}))}return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[x,I(Y,{children:[k.length>0?d(jt,{children:k}):null,d(Y,{children:N}),d(Ot,{children:j}),d(Et,{children:X})]})]})};Tt("hierarchy-mindmap",{component:oy,composites:["title","item"]});const Xr=(t,e)=>{if(t[0]!=="#"||t.length!==7)return t;const n=Math.max(0,Math.min(1,e)),r=Math.round(n*255).toString(16).padStart(2,"0");return`${t}${r}`},Gr=t=>t==null?"":String(t),Us=(t,e,n)=>et(d(St,{fontSize:e,fontWeight:n,children:t})),cH=(t,e,n,r=" ")=>{const i=Us(r,e,n);let o=i.width,s=i.height;return t.forEach(a=>{const l=Us(a||" ",e,n);o=Math.max(o,l.width),s=Math.max(s,l.height)}),{width:o,height:s}},sy=(t,e,n,r)=>{const i=cH(t,e,"normal","Item");return{pillWidth:i.width+n*2,pillHeight:i.height+r*2}},ay=t=>{const{Title:e,data:n,options:r,rowGap:i=20,labelGap:o=20,groupGap:s=20,pillGap:a=14,pillColumns:l=2,ungroupedColumns:c=6,layerLabelPosition:h="left",rowPadding:u=20,groupPadding:f=16,labelPaddingX:p=28,labelPaddingY:g=16,pillPaddingX:y=18,pillPaddingY:m=10,labelFontSize:x=20,groupTitleFontSize:v=18,pillFontSize:b=16,groupTitleGap:w=10,rowRadius:_=12,groupRadius:$=10,pillRadius:P=12}=t,{title:C,desc:T,items:E=[]}=n,S=e?d(e,{title:C,desc:T}):null;if(E.length===0)return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[S,d(Y,{children:d(Ot,{})})]});const R=ge(r.themeConfig),O=[],A=[],F=h==="right",L=.12,D=.55,k=.08,N=.4,j=.06,X=.35,z=E.map(Q=>{const at=Gr(Q.label),ht=Us(at||" ",x,"bold"),nt=ht.width+p*2,J=ht.height+g*2,tt=Q.children||[];if(tt.some(pt=>{var _t;return(((_t=pt.children)==null?void 0:_t.length)||0)>0})){const pt=[];tt.forEach(Ht=>{(Ht.children||[]).forEach(he=>{pt.push(Gr(he.label))})});const{pillWidth:_t,pillHeight:Rt}=sy(pt,b,y,m),Vt=tt.map(Ht=>{const he=Gr(Ht.label),kt=Us(he||" ",v,"bold"),Lt=Ht.children||[],me=Lt.length>0?Math.min(l,Lt.length):0,xt=me>0?Math.ceil(Lt.length/me):0,Ft=me>0?me*_t+(me-1)*a:0,Mt=xt>0?xt*Rt+(xt-1)*a:0,ae=Math.max(kt.width,Ft)+f*2,ne=f*2+kt.height+(xt>0?w+Mt:0);return{label:he,children:Lt,width:ae,height:ne,titleHeight:kt.height,columns:me,contentWidth:Ft,pillWidth:_t,pillHeight:Rt}}),ee=Vt.reduce((Ht,he)=>Ht+he.width,0)+(Vt.length>1?(Vt.length-1)*s:0),Dt=Vt.reduce((Ht,he)=>Math.max(Ht,he.height),0);return{label:at,labelWidth:nt,labelHeight:J,hasGroups:!0,children:tt,groupMetrics:Vt,contentInnerWidth:ee,contentInnerHeight:Dt}}const vt=tt.map(pt=>Gr(pt.label)),{pillWidth:gt,pillHeight:ut}=sy(vt,b,y,m),ot=tt.length>0?Math.min(c,tt.length):0,ft=ot>0?Math.ceil(tt.length/ot):0,mt=ot>0?ot*gt+(ot-1)*a:0,wt=ft>0?ft*ut+(ft-1)*a:0;return{label:at,labelWidth:nt,labelHeight:J,hasGroups:!1,children:tt,pillWidth:gt,pillHeight:ut,columns:ot,contentInnerWidth:mt,contentInnerHeight:wt}}),M=z.reduce((Q,at)=>Math.max(Q,at.labelWidth),0),H=z.reduce((Q,at)=>Math.max(Q,at.contentInnerWidth),0),B=Q=>{const at=It(r,[Q])||R.colorPrimary||"#6c7dff";return{rowFill:Xr(at,L),rowStroke:Xr(at,D),groupFill:Xr(at,k),groupStroke:Xr(at,N),pillFill:Xr(at,j),pillStroke:Xr(at,X)}},q=(Q,at,ht,nt,J,tt,st,vt,gt,ut,ot,ft,mt,wt)=>{O.push(d(Ct,{x:ht,y:st,width:J,height:vt,fill:mt,stroke:wt,rx:_,ry:_,"data-element-type":"shape"})),O.push(d(Ct,{x:gt,y:ut,width:ot,height:ft,fill:mt,stroke:wt,rx:_,ry:_,"data-element-type":"shape"})),A.push(d(St,{x:ht,y:nt,width:J,height:tt,fontSize:x,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:R.colorText,"data-element-type":zt.ItemLabel,"data-indexes":at,children:Q}))},V=(Q,at,ht,nt)=>{const J=Q.groupMetrics||[],tt=Q.label,st=[at],vt=M,gt=Q.labelHeight,ut=Q.contentInnerHeight,ot=Math.max(0,H-Q.contentInnerWidth),ft=J.length>0?ot/J.length:0,wt=Q.contentInnerWidth+(J.length>0?ot:0)+u*2,pt=ut+u*2,_t=Math.max(gt,pt),Rt=F?0:vt+o,Vt=F?Rt+wt+o:0,ee=ht+(_t-gt)/2,Dt=ht+(_t-pt)/2;q(tt,st,Vt,ee,vt,gt,ht,_t,Rt,Dt,wt,pt,nt.rowFill,nt.rowStroke);let Ht=Rt+u;return J.forEach((kt,Lt)=>{const me=[...st,Lt],xt=kt.width+ft,Ft=Dt+u+(ut-kt.height)/2;O.push(d(Ct,{x:Ht,y:Ft,width:xt,height:kt.height,fill:nt.groupFill,stroke:nt.groupStroke,rx:$,ry:$,"data-element-type":"shape"}));const Mt=kt.children.length>0,Nt=Mt?Ft+f:Ft,ae=Mt?kt.titleHeight:kt.height,ne=Mt?"top":"middle";if(A.push(d(St,{x:Ht+f,y:Nt,width:xt-f*2,height:ae,fontSize:v,fontWeight:"bold",alignHorizontal:"center",alignVertical:ne,fill:R.colorText,"data-element-type":zt.ItemLabel,"data-indexes":me,children:kt.label})),kt.columns>0){const ye=xt-f*2,ve=ye-kt.contentWidth,Fe=ve>0?ve/kt.columns:0,Ve=kt.pillWidth+Fe,eo=kt.columns*Ve+(kt.columns-1)*a,Ut=(ye-eo)/2,Be=Ht+f+Math.max(0,Ut),wr=Ft+f+kt.titleHeight+w;kt.children.forEach((Mn,ti)=>{const cW=[...me,ti],hW=Math.floor(ti/kt.columns),dW=ti%kt.columns,nx=Be+dW*(Ve+a),rx=wr+hW*(kt.pillHeight+a),ix=Math.min(P,kt.pillHeight/2);O.push(d(Ct,{x:nx,y:rx,width:Ve,height:kt.pillHeight,fill:nt.pillFill,stroke:nt.pillStroke,rx:ix,ry:ix,"data-element-type":"shape"})),A.push(d(St,{x:nx,y:rx,width:Ve,height:kt.pillHeight,fontSize:b,fontWeight:"normal",alignHorizontal:"center",alignVertical:"middle",fill:R.colorText,"data-element-type":zt.ItemLabel,"data-indexes":cW,children:Gr(Mn.label)}))})}Ht+=xt+s}),{rowWidth:F?Vt+vt:Rt+wt,rowHeight:_t}},G=(Q,at,ht,nt)=>{const J=Q.label,tt=[at],st=M,vt=Q.labelHeight,gt=Q.contentInnerHeight,ut=Math.max(0,H-Q.contentInnerWidth),ot=Q.columns||0,ft=Q.pillWidth||0,mt=Q.pillHeight||0,wt=ot>0?ut/ot:0,pt=ft+wt,Rt=(ot>0?ot*pt+(ot-1)*a:0)+u*2,Vt=gt+u*2,ee=Math.max(vt,Vt),Dt=F?0:st+o,Ht=F?Dt+Rt+o:0,he=ht+(ee-vt)/2,kt=ht+(ee-Vt)/2;if(q(J,tt,Ht,he,st,vt,ht,ee,Dt,kt,Rt,Vt,nt.rowFill,nt.rowStroke),ot>0){const me=Dt+u,xt=kt+u;(Q.children||[]).forEach((Mt,Nt)=>{const ae=[...tt,Nt],ne=Math.floor(Nt/ot),ye=Nt%ot,ve=me+ye*(pt+a),Fe=xt+ne*(mt+a),Ve=Math.min(P,mt/2);O.push(d(Ct,{x:ve,y:Fe,width:pt,height:mt,fill:nt.pillFill,stroke:nt.pillStroke,rx:Ve,ry:Ve,"data-element-type":"shape"})),A.push(d(St,{x:ve,y:Fe,width:pt,height:mt,fontSize:b,fontWeight:"normal",alignHorizontal:"center",alignVertical:"middle",fill:R.colorText,"data-element-type":zt.ItemLabel,"data-indexes":ae,children:Gr(Mt.label)}))})}return{rowWidth:F?Ht+st:Dt+Rt,rowHeight:ee}};let Z=0,K=0;z.forEach((Q,at)=>{const ht=B(at),{rowWidth:nt,rowHeight:J}=Q.hasGroups?V(Q,at,Z,ht):G(Q,at,Z,ht);K=Math.max(K,nt),Z+=J+i});const it=Math.max(Z-i,0);return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[S,I(Y,{width:K,height:it,children:[d(Y,{children:O}),d(Ot,{children:A})]})]})};Tt("hierarchy-structure",{component:ay,composites:["title"]});var hH=Object.defineProperty,dH=Object.defineProperties,uH=Object.getOwnPropertyDescriptors,ly=Object.getOwnPropertySymbols,fH=Object.prototype.hasOwnProperty,pH=Object.prototype.propertyIsEnumerable,cy=(t,e,n)=>e in t?hH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Zs=(t,e)=>{for(var n in e||(e={}))fH.call(e,n)&&cy(t,n,e[n]);if(ly)for(var n of ly(e))pH.call(e,n)&&cy(t,n,e[n]);return t},Ks=(t,e)=>dH(t,uH(e));const hy=(t,e)=>{const n=Math.max(0,e/2-1);return Math.min(t,n)},dy=t=>{const{Title:e,Items:n,data:r,levelGap:i=80,nodeGap:o=60,edgeType:s="straight",edgeColorMode:a="gradient",edgeWidth:l=3,edgeStyle:c="solid",edgeDashPattern:h="5,5",edgeCornerRadius:u=0,edgeOffset:f=0,edgeOrigin:p="center",edgeOriginPadding:g=20,edgeMarker:y="none",markerSize:m=12,colorMode:x="branch",orientation:v="top-bottom",options:b}=t,w=v==="left-right"||v==="right-left",_=v==="bottom-top"||v==="right-left"?-1:1,{title:$,desc:P}=r,C=ce(b),T=nt=>{var J;const tt=[...nt];return(J=tt[0])!=null&&J.children||(tt[0]=Ks(Zs({},tt[0]),{children:tt.slice(1)}),tt.splice(1)),tt},E=(nt,J,tt,st,vt,gt="vertical")=>{const ut=gt==="vertical",ot=ut?st-J:tt-nt,ft=ut?tt-nt:st-J,mt=ot===0?1:Math.sign(ot),wt=ft===0?1:Math.sign(ft),pt=ut?J+ot/2:nt+ot/2,_t=Math.min(vt,Math.abs(ot)/2,Math.abs(ft)/2);return _t===0?ut?`M ${nt} ${J} L ${nt} ${pt} L ${tt} ${pt} L ${tt} ${st}`:`M ${nt} ${J} L ${pt} ${J} L ${pt} ${st} L ${tt} ${st}`:ut?`M ${nt} ${J}
93
- L ${nt} ${pt-mt*_t}
94
- Q ${nt} ${pt} ${nt+wt*_t} ${pt}
95
- L ${tt-wt*_t} ${pt}
96
- Q ${tt} ${pt} ${tt} ${pt+mt*_t}
97
- L ${tt} ${st}`:`M ${nt} ${J}
98
- L ${pt-mt*_t} ${J}
99
- Q ${pt} ${J} ${pt} ${J+wt*_t}
100
- L ${pt} ${st-wt*_t}
101
- Q ${pt} ${st} ${pt+mt*_t} ${st}
102
- L ${tt} ${st}`},S=nt=>{const{x:J,y:tt}=nt;return w?{x:tt*_,y:J}:{x:J,y:tt*_}},R=(nt,J,tt)=>{const{x:st,y:vt}=S(nt),gt=st+tt.x,ut=vt+tt.y,ot=ut+J.height/2;return{centerX:gt,centerY:ot,left:gt-J.width/2,right:gt+J.width/2,top:ut,bottom:ut+J.height}},O=nt=>{var J;if(!nt.length)return null;const tt=nt[0],st=(vt,gt=[],ut=0)=>{var ot,ft;const mt=[...gt,ut];return Ks(Zs({},vt),{_originalIndex:mt,_depth:mt.length-1,children:(ft=(ot=vt.children)==null?void 0:ot.map((wt,pt)=>st(wt,mt,pt)))!=null?ft:[]})};return(J=tt.children)!=null&&J.length?st(tt):Ks(Zs({},tt),{_originalIndex:[0],_depth:0,children:nt.slice(1).map((vt,gt)=>Ks(Zs({},vt),{_originalIndex:[gt+1],_depth:1}))})},A=nt=>{var J,tt;let st=0,vt=0;const gt=new Map,ut=new Map;nt.each(ot=>{ut.has(ot.depth)||ut.set(ot.depth,ot.data)});for(let ot=0;ot<nt.height+1;ot++){const ft=bs(n,ot),mt=(J=ut.get(ot))!=null?J:{},wt=(tt=mt._originalIndex)!=null?tt:Array(ot+1).fill(0),pt=et(d(ft,{indexes:wt,data:r,datum:mt,positionH:"center"}));gt.set(ot,pt),st=Math.max(st,pt.width),vt=Math.max(vt,pt.height)}return{levelBounds:gt,maxWidth:st,maxHeight:vt}},F=(nt,J,tt,st,vt,gt)=>{const{depth:ut,data:ot,parent:ft}=nt,mt=ot._originalIndex,wt=bs(n,ut),pt=J.get(ut),_t=R(nt,pt,st),Rt=_t.left,Vt=_t.top,ee={items:[],btns:[],deco:[]},Dt=Li({depth:ut,originalIndexes:mt,flatIndex:ot._flatIndex},x),Ht=It(b,Dt),he=ge({colorPrimary:Ht},b);if(ee.items.push(d(wt,{indexes:mt,datum:ot,data:r,x:Rt,y:Vt,positionH:"center",themeColors:he})),ee.btns.push(d(Yt,{indexes:mt,x:Rt+(pt.width-tt.width)/2,y:Vt+pt.height+5}),d(U,{indexes:[...mt,0],x:Rt+(pt.width-tt.width)/2,y:Vt+pt.height+tt.height+10})),ft){const kt=J.get(ft.depth),Lt=R(ft,kt,st),me=gt.filter(Ut=>Ut.parent===ft),xt=me.findIndex(Ut=>Ut===nt),Ft=me.length;let Mt,Nt;if(p==="distributed"&&Ft>1)if(w){const Ut=hy(g,kt.height),Be=Lt.top+Ut,Mn=(Lt.bottom-Ut-Be)/Ft;Nt=Be+Mn*xt+Mn/2,Mt=(_>0?Lt.right:Lt.left)+f*_}else{const Ut=hy(g,kt.width),Be=Lt.left+Ut,Mn=(Lt.right-Ut-Be)/Ft;Mt=Be+Mn*xt+Mn/2,Nt=(_>0?Lt.bottom:Lt.top)+f*_}else Mt=w?(_>0?Lt.right:Lt.left)+f*_:Lt.centerX,Nt=w?Lt.centerY:(_>0?Lt.bottom:Lt.top)+f*_;const ae=w?(_>0?_t.left:_t.right)-f*_:_t.centerX,ne=w?_t.centerY:(_>0?_t.top:_t.bottom)-f*_;let ye=ae,ve=ne;y==="arrow"&&(w?ye-=m*_:ve-=m*_);let Fe;if(s==="curved")if(w){const Ut=Mt+(ye-Mt)/2;Fe=`M ${Mt} ${Nt} C ${Ut} ${Nt}, ${Ut} ${ve}, ${ye} ${ve}`}else{const Ut=Nt+(ve-Nt)/2;Fe=`M ${Mt} ${Nt} C ${Mt} ${Ut}, ${ye} ${Ut}, ${ye} ${ve}`}else if(u>0)Fe=E(Mt,Nt,ye,ve,u,w?"horizontal":"vertical");else if(w){const Ut=Mt+(ye-Mt)/2;Fe=`M ${Mt} ${Nt} L ${Ut} ${Nt} L ${Ut} ${ve} L ${ye} ${ve}`}else{const Ut=Nt+(ve-Nt)/2;Fe=`M ${Mt} ${Nt} L ${Mt} ${Ut} L ${ye} ${Ut} L ${ye} ${ve}`}let Ve=C;if(a==="gradient"){const Ut=Li({depth:ft.depth,originalIndexes:ft.data._originalIndex,flatIndex:ft.data._flatIndex},x),Be=Li({depth:ut,originalIndexes:mt,flatIndex:ot._flatIndex},x),wr=It(b,Ut),Mn=It(b,Be),ti=`gradient-${ft.data._originalIndex.join("-")}-${mt.join("-")}`;vt.push(I("linearGradient",{id:ti,x1:Mt,y1:Nt,x2:ye,y2:ve,gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0%",stopColor:wr}),d("stop",{offset:"100%",stopColor:Mn})]})),Ve=`url(#${ti})`}const eo=c==="dashed"?h:"";if(ee.deco.push(d(yt,{d:Fe,stroke:Ve,strokeWidth:l,strokeDasharray:eo,fill:"none"})),y==="arrow"){const Ut=a==="gradient"?It(b,Dt):ce(b),Be=w?[{x:ae,y:ne},{x:ae-m*_,y:ne-m/2},{x:ae-m*_,y:ne+m/2}]:[{x:ae,y:ne},{x:ae-m/2,y:ne-m*_},{x:ae+m/2,y:ne-m*_}];ee.deco.push(d(Re,{points:Be,fill:Ut,width:m,height:m}))}if(y==="dot"){const Ut=Li({depth:ft.depth,originalIndexes:ft.data._originalIndex,flatIndex:ft.data._flatIndex},x),Be=a==="gradient"?It(b,Ut):ce(b);ee.deco.push(d(Wt,{x:(w?_>0?Lt.right+f:Lt.left-f:Mt)-m,y:(w?Nt:_>0?Lt.bottom+f:Lt.top-f)-m,width:m*2,height:m*2,fill:Be}));const wr=a==="gradient"?It(b,Dt):ce(b);ee.deco.push(d(Wt,{x:ae-m,y:ne-m,width:m*2,height:m*2,fill:wr}))}}return ee},L=(nt,J,tt)=>{const st=new Map;nt.forEach(gt=>{var ut;const ot=gt.parent?gt.parent.data._originalIndex.join("-"):"root";((ut=st.get(ot))!=null?ut:st.set(ot,[]).get(ot)).push(gt)});const vt=[];return st.forEach(gt=>{if(gt.length<=1)return;const ut=gt.slice().sort((ot,ft)=>w?S(ot).y-S(ft).y:S(ot).x-S(ft).x);if(ut.length!==0)for(let ot=0;ot<ut.length-1;ot++){const ft=S(ut[ot]),mt=S(ut[ot+1]),wt=ut[ot].data._originalIndex.slice(0,-1),pt=ut[ot].data._originalIndex.at(-1)+1;if(w){const _t=ft.x+tt.x+(_>0?-J.width-5:J.width+5),Rt=(ft.y+mt.y)/2+tt.y-J.height/2;vt.push(d(U,{indexes:[...wt,pt],x:_t,y:Rt}))}else{const _t=ft.y+tt.y-J.height-5,Rt=(ft.x+mt.x)/2+tt.x-J.width/2;vt.push(d(U,{indexes:[...wt,pt],x:Rt,y:_t}))}}}),vt},D=T(r.items),k=e?d(e,{title:$,desc:P}):null,N=et(d(U,{indexes:[0]}));if(!D.length)return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[k,d(Y,{children:d(Et,{children:d(U,{indexes:[0],x:-N.width/2,y:-N.height/2})})})]});const j=O(D),X=sh(j),{levelBounds:z,maxWidth:M,maxHeight:H}=A(X),q=sk().nodeSize(w?[H+o,M+i]:[M+o,H+i]).separation(()=>1)(X).descendants(),V=q.map(nt=>S(nt)),G=Math.min(...V.map(nt=>nt.x)),Z=Math.min(...V.map(nt=>nt.y)),K={x:Math.max(0,-G+M/2),y:Math.max(0,-Z+N.height+10)},it=[],Q=[],at=[],ht=[];return q.forEach((nt,J)=>{nt.data._flatIndex=J;const{x:tt,y:st}=S(nt);nt.__layout={x:tt,y:st}}),q.forEach(nt=>{const{items:J,btns:tt,deco:st}=F(nt,z,N,K,ht,q);it.push(...J),Q.push(...tt),at.push(...st)}),Q.push(...L(q,N,K)),I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[k,I(Y,{children:[ht.length>0&&d(jt,{children:ht}),d(le,{children:at}),d(Ot,{children:it}),d(Et,{children:Q})]})]})};Tt("hierarchy-tree",{component:dy,composites:["title","item"]});const uy=t=>{const{Title:e,Item:n,data:r,gap:i=20,width:o,zigzag:s}=t,{title:a,desc:l,items:c=[]}=r,h=et(d(U,{indexes:[0]})),u=et(d(n,{indexes:[0],data:r,datum:c[0]})),f=o||u.width,p=e?d(e,{title:a,desc:l}):null,g=[],y=[],m=(f-h.width)/2;if(c.forEach((x,v)=>{const b=(u.height+i)*v,w=[v];y.push(d(n,{indexes:w,datum:x,data:r,y:b,width:f,positionV:"middle",positionH:s?v%2===0?"normal":"flipped":"normal"})),g.push(d(Yt,{indexes:w,x:-h.width-10,y:b+(u.height-h.height)/2}));const _=v===0?-h.height:b-i/2-h.height/2;g.push(d(U,{indexes:w,x:m,y:_}))}),c.length>0){const v=(u.height+i)*(c.length-1)+u.height;g.push(d(U,{indexes:[c.length],x:m,y:v}))}return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,I(Y,{children:[d(Ot,{children:y}),d(Et,{children:g})]})]})};Tt("list-column",{component:uy,composites:["title","item"]});const fy=t=>{const{Title:e,Item:n,data:r,columns:i=3,gap:o=24,zigzag:s}=t,{title:a,desc:l,items:c=[]}=r,h=e?d(e,{title:a,desc:l}):null,u=et(d(U,{indexes:[0]})),f=et(d(n,{indexes:[0],data:r,datum:c[0],positionH:"center"})),p=[],g=[],y=f.height+o,m=f.width+o,x=new Set;return c.forEach((v,b)=>{const w=Math.floor(b/i),_=b%i,$=_*m,P=w*y,C=[b];g.push(d(n,{indexes:C,datum:v,data:r,x:$,y:P,positionH:"center",positionV:s&&b%2===0?"normal":"flipped"})),p.push(d(Yt,{indexes:C,x:$+(f.width-u.width)/2,y:P+f.height})),_<i-1&&p.push(d(U,{indexes:[b+1],x:$+f.width+(o-u.width)/2,y:P+(f.height-u.height)/2})),_===0&&!x.has(w)&&(p.push(d(U,{indexes:[b],x:$-o/2-u.width/2,y:P+(f.height-u.height)/2})),x.add(w)),(_===i-1||b===c.length-1)&&p.push(d(U,{indexes:[b+1],x:$+f.width+o/2-u.width/2,y:P+(f.height-u.height)/2}))}),I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,I(Y,{children:[d(Ot,{children:g}),d(Et,{children:p})]})]})};Tt("list-grid",{component:fy,composites:["title","item"]});const py=t=>{const{Title:e,Item:n,data:r,gap:i=20,levelGap:o=20}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=et(d(U,{indexes:[0]})),u=et(d(n,{indexes:[0],data:r,datum:l[0],positionH:"center"})),f=[],p=[],g=Math.ceil(Math.sqrt(l.length)),y=[];let m=l.length;for(let _=0;_<g;_++){const $=Math.min(_+1,m);if(y.push($),m-=$,m<=0)break}let x=0;const v=Math.max(...y),w=(v*u.width+(v-1)*i)/2;return y.forEach((_,$)=>{const P=$*(u.height+o),C=_*u.width+(_-1)*i,T=w-C/2;for(let E=0;E<_&&x<l.length;E++){const S=T+E*(u.width+i),R=l[x],O=[x];p.push(d(n,{indexes:O,datum:R,data:r,x:S,y:P,positionH:"center"})),f.push(d(Yt,{indexes:O,x:S+(u.width-h.width)/2,y:P+u.height})),E<_-1&&f.push(d(U,{indexes:[x+1],x:S+u.width+(i-h.width)/2,y:P+(u.height-h.height)/2})),E===0&&f.push(d(U,{indexes:[x],x:S-i/2-h.width/2,y:P+(u.height-h.height)/2})),E===_-1&&f.push(d(U,{indexes:[x+1],x:S+u.width+i/2-h.width/2,y:P+(u.height-h.height)/2})),x++}}),I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,I(Y,{children:[d(Ot,{children:p}),d(Et,{children:f})]})]})};Tt("list-pyramid",{component:py,composites:["title","item"]});const gy=t=>{const{Title:e,Item:n,data:r,gap:i=20,zigzag:o}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=et(d(U,{indexes:[0]})),u=et(d(n,{indexes:[0],data:r,datum:l[0],positionH:"center"})),f=[],p=[],g=(u.height-h.height)/2,y=u.height;if(l.forEach((m,x)=>{const v=(u.width+i)*x,b=[x];p.push(d(n,{indexes:b,datum:m,data:r,x:v,positionH:"center",positionV:o&&x%2===0?"normal":"flipped"})),f.push(d(Yt,{indexes:b,x:v+(u.width-h.width)/2,y}));const w=x===0?-(i+h.width)/2:v-(i+h.width)/2;f.push(d(U,{indexes:b,x:w,y:g}))}),l.length>0){const x=(u.width+i)*(l.length-1)+u.width+(i-h.width)/2;f.push(d(U,{indexes:[l.length],x,y:g}))}return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,I(Y,{children:[d(Ot,{children:p}),d(Et,{children:f})]})]})};Tt("list-row",{component:gy,composites:["title","item"]});var gH=Object.defineProperty,my=Object.getOwnPropertySymbols,mH=Object.prototype.hasOwnProperty,yH=Object.prototype.propertyIsEnumerable,yy=(t,e,n)=>e in t?gH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,vH=(t,e)=>{for(var n in e||(e={}))mH.call(e,n)&&yy(t,n,e[n]);if(my)for(var n of my(e))yH.call(e,n)&&yy(t,n,e[n]);return t};const vy=t=>{const{Item:e,data:n,outerRadius:r=250,innerRadius:i=120,startAngle:o=-90,endAngle:s=270,gapAngle:a=1,options:l}=t,{title:c,items:h=[]}=n,u=ge(l.themeConfig),f=et(d(U,{indexes:[0]})),p=[],g=[],y=[],m=r+100,x=r+100,v=s-o,b=Math.abs(v-360)<.01,w=h.length>0?a*(b?h.length:h.length-1):0,_=v-w,$=h.length>0?_/h.length:0;if(h.forEach((O,A)=>{var F;const L=[A],D=o+($+a)*A,k=D+$,j=a*Math.PI*r/180/i*(180/Math.PI),X=a,z=(D+X/2)*Math.PI/180,M=(k-X/2)*Math.PI/180,H=(D+j/2)*Math.PI/180,B=(k-j/2)*Math.PI/180,q=m+r*Math.cos(z),V=x+r*Math.sin(z),G=m+r*Math.cos(M),Z=x+r*Math.sin(M),K=m+i*Math.cos(H),it=x+i*Math.sin(H),Q=m+i*Math.cos(B),at=x+i*Math.sin(B),ht=$>180?1:0,nt=`
103
- M ${q} ${V}
104
- A ${r} ${r} 0 ${ht} 1 ${G} ${Z}
105
- L ${Q} ${at}
106
- A ${i} ${i} 0 ${ht} 0 ${K} ${it}
92
+ `,R(Y,PX(wX({},h),{children:[p(Pe,{d:$,x:0,y:0,width:r,height:i,fill:u.colorPrimary,"data-element-type":"shape"}),p(Dt,{indexes:n,x:y,y:m,size:o,fill:u.colorBg}),p(Ve,{indexes:n,x:_,y:v,width:d,fontSize:14,fontWeight:"bold",fill:u.colorBg,alignHorizontal:c==="flipped"?"right":"left",children:t.label}),t.desc&&p(ht,{indexes:n,x:w,y:x,width:d,fontSize:11,wordWrap:!0,fill:u.colorBg,alignHorizontal:c==="flipped"?"right":"left",children:t.desc})]}))};ct("quarter-simple-card",{component:yw,composites:["icon","label","desc"]});var $X=Object.defineProperty,CX=Object.defineProperties,OX=Object.getOwnPropertyDescriptors,vw=Object.getOwnPropertySymbols,SX=Object.prototype.hasOwnProperty,MX=Object.prototype.propertyIsEnumerable,bw=(e,t,n)=>t in e?$X(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,EX=(e,t)=>{for(var n in t||(t={}))SX.call(t,n)&&bw(e,n,t[n]);if(vw)for(var n of vw(t))MX.call(t,n)&&bw(e,n,t[n]);return e},IX=(e,t)=>CX(e,OX(t));const _w=e=>{const[{datum:t,indexes:n,width:r=240,height:i=140,iconSize:o=28,gap:a=12,ribbonHeight:s=32,themeColors:c},l]=st(e,["width","height","iconSize","gap","ribbonHeight"]),u=`${c.colorPrimary}-ribbon`;return R(Y,IX(EX({},l),{children:[p(Ke,{children:R("linearGradient",{id:u,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[p("stop",{offset:"0%",stopColor:c.colorPrimary}),p("stop",{offset:"100%",stopColor:ve(c.colorPrimary).darken(15).toHexString()})]})}),R(xt,{children:[p(ze,{x:0,y:0,width:r,height:i,fill:c.colorBgElevated,stroke:c.colorPrimaryBg,strokeWidth:1,rx:8,ry:8}),p(ze,{x:0,y:0,width:r,height:s,fill:`url(#${u})`,rx:8,ry:8}),p(ze,{x:0,y:8,width:r,height:s-8,fill:`url(#${u})`}),p(Pe,{x:r-20,y:s,width:20,height:8,fill:ve(c.colorPrimary).darken(25).toHexString(),d:"M0,0 L20,0 L15,8 L5,8 Z"})]}),p(Dt,{indexes:n,x:a,y:s+a,size:o,fill:c.colorPrimary}),p(Ve,{indexes:n,x:o+2*a,y:s+a,width:r-o-3*a,height:o,alignHorizontal:"left",alignVertical:"middle",lineHeight:1,fontWeight:"bold",fill:c.colorText,children:t.label}),p(ht,{indexes:n,x:a,y:s+o+a+5,width:r-2*a,alignHorizontal:"left",fill:c.colorTextSecondary,lineNumber:3,wordWrap:!0,children:t.desc}),p(Dt,{indexes:n,x:r-a-8,y:a/2,size:16,fill:c.colorWhite})]}))};ct("ribbon-card",{component:_w,composites:["icon","label","desc"]});var AX=Object.defineProperty,TX=Object.defineProperties,kX=Object.getOwnPropertyDescriptors,xw=Object.getOwnPropertySymbols,RX=Object.prototype.hasOwnProperty,LX=Object.prototype.propertyIsEnumerable,ww=(e,t,n)=>t in e?AX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zX=(e,t)=>{for(var n in t||(t={}))RX.call(t,n)&&ww(e,n,t[n]);if(xw)for(var n of xw(t))LX.call(t,n)&&ww(e,n,t[n]);return e},NX=(e,t)=>TX(e,kX(t));const Pw=e=>{const[{indexes:t,datum:n,themeColors:r,width:i=300,height:o=40,padding:a=4,positionH:s="normal"},c]=st(e,["width","height","borderRadius","padding"]),l=o/2,u=l,h=a,d=i-l*2,f=o-a*2;return R(Y,NX(zX({},c),{children:[p(ze,{"data-element-type":"shape",width:i,height:o,rx:l,ry:l,fill:r.colorPrimaryBg,stroke:r.colorPrimary,strokeWidth:1,opacity:.8}),p(Ve,{indexes:t,x:u,y:h,width:d,height:f,alignHorizontal:s==="flipped"?"right":s==="center"?"center":"left",alignVertical:"middle",fontSize:14,fontWeight:"500",fill:r.colorText,children:n.label})]}))};ct("rounded-rect-node",{component:Pw,composites:["label"]});var HX=Object.defineProperty,DX=Object.defineProperties,qX=Object.getOwnPropertyDescriptors,$w=Object.getOwnPropertySymbols,jX=Object.prototype.hasOwnProperty,FX=Object.prototype.propertyIsEnumerable,Cw=(e,t,n)=>t in e?HX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,BX=(e,t)=>{for(var n in t||(t={}))jX.call(t,n)&&Cw(e,n,t[n]);if($w)for(var n of $w(t))FX.call(t,n)&&Cw(e,n,t[n]);return e},WX=(e,t)=>DX(e,qX(t));const Ow=e=>{const[{width:t=24,height:n=t,strokeWidth:r=2,themeColors:i,datum:o},a]=st(e,["width","height"]),s=Math.min(t,n)-r,c=r/2;return R(Y,WX(BX({},a),{width:t,height:n,children:[p(ze,{width:t,height:n,fill:"none",visibility:"hidden"}),p(Je,{x:c,y:c,width:s,height:s,fill:i.colorPrimary,stroke:i.isDarkMode?"#FFF":"#000",strokeWidth:r,"data-element-type":"shape",children:p("title",{children:o.label||o.desc})})]}))};ct("simple-circle-node",{component:Ow,composites:[]});var GX=Object.defineProperty,VX=Object.defineProperties,YX=Object.getOwnPropertyDescriptors,Sw=Object.getOwnPropertySymbols,XX=Object.prototype.hasOwnProperty,UX=Object.prototype.propertyIsEnumerable,Mw=(e,t,n)=>t in e?GX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,KX=(e,t)=>{for(var n in t||(t={}))XX.call(t,n)&&Mw(e,n,t[n]);if(Sw)for(var n of Sw(t))UX.call(t,n)&&Mw(e,n,t[n]);return e},ZX=(e,t)=>VX(e,YX(t));const Ew=e=>{const[{indexes:t,datum:n,width:r=140,themeColors:i,positionV:o="normal"},a]=st(e,["width"]),s=o!=="flipped",c=s?"bottom":"top",l=p(Ve,{indexes:t,width:r,fill:i.colorText,alignHorizontal:"center",alignVertical:c,fontSize:14,children:n.label}),u=p(ht,{indexes:t,width:r,fill:i.colorTextSecondary,alignHorizontal:"center",alignVertical:c,children:n.desc}),h=30,d=10,f=ae(l),g=ae(u),y=f.height+g.height,m=y+d+h+d+y;return p(Y,ZX(KX({width:r,height:m},a),{children:R(ye,{flexDirection:"column",alignItems:"center",children:[s?R(tt,{children:[u,l,p(mt,{height:d})]}):p(tt,{children:p(mt,{height:y+d})}),R(yi,{horizontal:"center",vertical:"middle",children:[p(QX,{width:r,height:h,fill:i.colorPrimary}),p(Ne,{width:r,height:h,alignHorizontal:"center",alignVertical:"middle",fill:i.colorWhite,fontWeight:"bold",fontSize:16,children:n.time?n.time:String(t[0]+1).padStart(2,"0").slice(-2)})]}),s?p(tt,{children:p(mt,{height:y+d})}):R(tt,{children:[p(mt,{height:d}),l,u]})]})}))},QX=e=>{const{x:t=0,y:n=0,width:r=100,height:i=40,fill:o="#FF356A",size:a=10}=e;return p(Wt,{width:r,height:i,points:[{x:t,y:n},{x:t+r-a,y:n},{x:t+r,y:n+i/2},{x:t+r-a,y:n+i},{x:t,y:n+i},{x:t+a,y:n+i/2}],fill:o,"data-element-type":"shape"})};ct("simple-horizontal-arrow",{component:Ew,composites:["label","desc","time"]});var JX=Object.defineProperty,eU=Object.defineProperties,tU=Object.getOwnPropertyDescriptors,Iw=Object.getOwnPropertySymbols,nU=Object.prototype.hasOwnProperty,rU=Object.prototype.propertyIsEnumerable,Aw=(e,t,n)=>t in e?JX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,iU=(e,t)=>{for(var n in t||(t={}))nU.call(t,n)&&Aw(e,n,t[n]);if(Iw)for(var n of Iw(t))rU.call(t,n)&&Aw(e,n,t[n]);return e},oU=(e,t)=>eU(e,tU(t));const Tw=e=>{const[{indexes:t,datum:n,width:r=180,illusSize:i=r,gap:o=8,themeColors:a,usePaletteColor:s=!1},c]=st(e,["width","illusSize","gap","usePaletteColor"]),{label:l,desc:u}=n,h=s?a.colorPrimary:a.colorText,d=p(Ve,{indexes:t,width:r,alignHorizontal:"center",alignVertical:"middle",fill:h,children:l}),f=ae(d);return R(ye,oU(iU({},c),{width:r,height:i+o+f.height+o+48,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:o,children:[p(g_,{indexes:t,width:i,height:i}),d,p(ht,{indexes:t,width:r,alignHorizontal:"center",alignVertical:"top",fill:a.colorTextSecondary,lineNumber:3,children:u})]}))};ct("simple-illus",{component:Tw,composites:["illus","label","desc"]});var aU=Object.defineProperty,sU=Object.defineProperties,cU=Object.getOwnPropertyDescriptors,kw=Object.getOwnPropertySymbols,lU=Object.prototype.hasOwnProperty,uU=Object.prototype.propertyIsEnumerable,Rw=(e,t,n)=>t in e?aU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qh=(e,t)=>{for(var n in t||(t={}))lU.call(t,n)&&Rw(e,n,t[n]);if(kw)for(var n of kw(t))uU.call(t,n)&&Rw(e,n,t[n]);return e},jh=(e,t)=>sU(e,cU(t));const Lw=e=>{const[{indexes:t,datum:n,width:r=200,height:i,gap:o=4,showIcon:a=!0,iconSize:s=30,iconType:c="default",positionH:l="normal",positionV:u="normal",usePaletteColor:h=!1,themeColors:d},f]=st(e,["width","height","gap","showIcon","iconSize","iconType","usePaletteColor"]),{label:g,desc:y,icon:m}=n,b=(z=>z==="normal"?"left":z==="flipped"?"right":"center")(l),_=h?d.colorPrimary:d.colorText,x=14,w=1.4,$=ae(p(Ve,{indexes:t,width:r,alignHorizontal:"center",alignVertical:"middle",fill:_,children:g})),C=a?c==="circle"?p(Ar,{indexes:t,size:s,fill:d.colorPrimary,colorBg:d.colorBg}):p(Dt,{indexes:t,size:s,fill:d.colorTextSecondary}):null;if(!a||!m){const z=i?Math.max(0,i-$.height-o):void 0,j=z?z<=60?1:Math.floor(z/(w*x)):2,H=i?u==="middle"?(i-$.height-(z||0)-o)/2:u==="flipped"?i-$.height-(z||0)-o:0:0;return R(Y,jh(qh({},f),{children:[p(Ve,{indexes:t,width:r,y:H,alignHorizontal:b,alignVertical:"middle",fill:_,children:g}),p(ht,{indexes:t,width:r,height:z,y:H+$.height+o,alignHorizontal:b,alignVertical:T(),lineNumber:j,fill:d.colorTextSecondary,children:y})]}))}if(l==="center"){const z=a&&m?s:0,j=i?Math.max(0,i-$.height-z-o*2):void 0,H=j?j<=60?1:Math.floor(j/(w*x)):2,W=$.height+(j||0)+o,B=i?u==="middle"?(i-W-z-o)/2:u==="flipped"?i-W-z-o:0:0;return p(ye,jh(qh({},f),{flexDirection:"column",gap:o,alignItems:"center",children:u==="flipped"?R(tt,{children:[R(Y,{children:[p(Ve,{indexes:t,width:r,y:B,alignHorizontal:"center",alignVertical:"middle",fill:_,children:g}),p(ht,{indexes:t,width:r,height:j,y:B+$.height+o,alignHorizontal:"center",alignVertical:"bottom",lineNumber:H,fill:d.colorTextSecondary,children:y})]}),C]}):R(tt,{children:[C,R(Y,{children:[p(Ve,{indexes:t,width:r,y:B,alignHorizontal:"center",alignVertical:"middle",fill:_,children:g}),p(ht,{indexes:t,width:r,height:j,y:B+$.height+o,alignHorizontal:"center",alignVertical:"top",lineNumber:H,fill:d.colorTextSecondary,children:y})]})]})}))}const M=ae(C),S=Math.max(r-M.width-o,0),E=i?Math.max(0,i-$.height-o):void 0,I=E?E<=60?1:Math.floor(E/(w*x)):2,O=i?u==="middle"?(i-$.height-(E||0)-o)/2:u==="flipped"?i-$.height-(E||0)-o:0:0;return p(ye,jh(qh({},f),{flexDirection:"row",gap:o,alignItems:F(u),children:l==="flipped"?R(tt,{children:[R(Y,{children:[p(Ve,{indexes:t,width:S,y:O,alignHorizontal:"right",alignVertical:"middle",fill:_,children:g}),p(ht,{indexes:t,width:S,height:E,y:O+$.height+o,alignHorizontal:"right",alignVertical:T(),lineNumber:I,fill:d.colorTextSecondary,children:y})]}),C]}):R(tt,{children:[C,R(Y,{children:[p(Ve,{indexes:t,width:S,y:O,alignHorizontal:"left",alignVertical:"middle",fill:_,children:g}),p(ht,{indexes:t,width:S,height:E,y:O+$.height+o,alignHorizontal:"left",alignVertical:T(),lineNumber:I,fill:d.colorTextSecondary,children:y})]})]})}));function T(z,j){return"top"}function F(z){return z==="normal"?"flex-start":z==="flipped"?"flex-end":"center"}};ct("simple",{component:Lw,composites:["icon","label","desc"]});var hU=Object.defineProperty,dU=Object.defineProperties,fU=Object.getOwnPropertyDescriptors,zw=Object.getOwnPropertySymbols,pU=Object.prototype.hasOwnProperty,gU=Object.prototype.propertyIsEnumerable,Nw=(e,t,n)=>t in e?hU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mU=(e,t)=>{for(var n in t||(t={}))pU.call(t,n)&&Nw(e,n,t[n]);if(zw)for(var n of zw(t))gU.call(t,n)&&Nw(e,n,t[n]);return e},yU=(e,t)=>dU(e,fU(t));const Hw=e=>{const[{indexes:t,datum:n,height:r=140,themeColors:i,positionH:o="normal"},a]=st(e,["height"]),s=o==="normal"?"right":"left",c=p(Ve,{indexes:t,width:120,fill:i.colorText,alignHorizontal:s,alignVertical:"middle",fontSize:14,children:n.label}),l=p(ht,{indexes:t,width:120,fill:i.colorTextSecondary,alignHorizontal:s,alignVertical:"top",children:n.desc}),u=o!=="flipped",h=15,d=30,f=120,g=f+h+d+h+f;return p(Y,yU(mU({width:g,height:r},a),{children:R(ye,{flexDirection:"row",alignItems:"center",children:[u?R(tt,{children:[R(ye,{flexDirection:"column",alignItems:"flex-end",children:[c,l]}),p(mt,{width:h})]}):p(tt,{children:p(mt,{width:f+h})}),R(yi,{horizontal:"center",vertical:"middle",children:[p(vU,{width:d,height:r,fill:i.colorPrimary}),p(Ne,{width:d,height:r,alignHorizontal:"center",alignVertical:"middle",fill:i.colorWhite,fontWeight:"bold",fontSize:16,children:String(t[0]+1).padStart(2,"0").slice(-2)})]}),u?p(tt,{children:p(mt,{width:f+h})}):R(tt,{children:[p(mt,{width:h}),R(ye,{flexDirection:"column",alignItems:"flex-start",children:[c,l]})]})]})}))},vU=e=>{const{x:t=0,y:n=0,width:r=30,height:i=100,fill:o="#FF356A",size:a=10}=e;return p(Wt,{width:r,height:i,points:[{x:t,y:n},{x:t+r/2,y:n+a},{x:t+r,y:n},{x:t+r,y:n+i-a},{x:t+r/2,y:n+i},{x:t,y:n+i-a}],fill:o,"data-element-type":"shape"})};ct("simple-vertical-arrow",{component:Hw,composites:["label","desc"]});var bU=Object.defineProperty,_U=Object.defineProperties,xU=Object.getOwnPropertyDescriptors,Dw=Object.getOwnPropertySymbols,wU=Object.prototype.hasOwnProperty,PU=Object.prototype.propertyIsEnumerable,qw=(e,t,n)=>t in e?bU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$U=(e,t)=>{for(var n in t||(t={}))wU.call(t,n)&&qw(e,n,t[n]);if(Dw)for(var n of Dw(t))PU.call(t,n)&&qw(e,n,t[n]);return e},CU=(e,t)=>_U(e,xU(t));const Fh=80,Bh=3,jw=e=>{const[{datum:t,indexes:n,width:r=200,gap:i=4,positionH:o="center",themeColors:a},s]=st(e,["width","height","gap"]),c=ae(p(Ve,{indexes:n,fontSize:18,fontWeight:"bold",width:r,children:t.label})),l=t.desc?ae(p(ht,{indexes:n,width:r,wordWrap:!0,children:t.desc})):{height:0},u=c.height+i+Bh+(t.desc?i*2+l.height:0),h=0,d=0,f=o==="center"?"center":o==="flipped"?"right":"left",g=o==="center"?(r-Fh)/2:o==="flipped"?r-Fh:0,y=d+c.height+i,m=0,v=y+Bh+i*2;return R(Y,CU($U({width:r,height:u},s),{children:[t.label&&p(Ve,{indexes:n,x:h,y:d,width:r,alignHorizontal:f,fill:a.colorPrimary,fontSize:18,fontWeight:"bold",children:t.label}),t.label&&p(ze,{x:g,y,width:Fh,height:Bh,fill:a.colorPrimary,"data-element-type":"shape"}),t.desc&&p(ht,{indexes:n,width:r,x:m,y:v,alignHorizontal:f,wordWrap:!0,fill:a.colorText,children:t.desc})]}))};ct("underline-text",{component:jw,composites:["label","desc"]});var OU=Object.defineProperty,SU=Object.defineProperties,MU=Object.getOwnPropertyDescriptors,Fw=Object.getOwnPropertySymbols,EU=Object.prototype.hasOwnProperty,IU=Object.prototype.propertyIsEnumerable,Bw=(e,t,n)=>t in e?OU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,AU=(e,t)=>{for(var n in t||(t={}))EU.call(t,n)&&Bw(e,n,t[n]);if(Fw)for(var n of Fw(t))IU.call(t,n)&&Bw(e,n,t[n]);return e},TU=(e,t)=>SU(e,MU(t));const Ww=e=>{const[{indexes:t,datum:n,height:r=140,themeColors:i,positionH:o="normal"},a]=st(e,["height"]),c=o!=="flipped"?"right":"left",l=p(Ve,{indexes:t,width:120,fill:i.colorText,alignHorizontal:c,alignVertical:"middle",fontSize:14,children:n.label}),u=p(ht,{indexes:t,width:120,fill:i.colorTextSecondary,alignHorizontal:c,alignVertical:"top",children:n.desc}),h=p(Ar,{indexes:t,fill:i.colorPrimary,colorBg:i.colorWhite}),d=p(RU,{width:30,height:8,fill:i.colorPrimary,positionH:o}),f=o!=="flipped",g=5,y=25,m=30,v=ae(l),b=ae(h),_=ae(d),x=v.width+g+_.width-b.width-y,w=Math.max(v.width+g+_.width,y+b.width)*2+m;return p(Y,TU(AU({width:w,height:r},a),{children:R(ye,{flexDirection:"row",alignItems:"center",children:[f?R(tt,{children:[R(ye,{flexDirection:"column",alignItems:"flex-end",children:[l,u]}),p(mt,{width:g}),d]}):R(tt,{children:[p(mt,{width:x}),h,p(mt,{width:y})]}),R(yi,{horizontal:"center",vertical:"middle",children:[p(kU,{width:m,height:r,fill:i.colorPrimary}),p(Ne,{width:m,height:r,alignHorizontal:"center",alignVertical:"middle",fill:i.colorWhite,fontWeight:"bold",fontSize:16,children:String(t[0]+1).padStart(2,"0").slice(-2)})]}),f?R(tt,{children:[p(mt,{width:y}),h]}):R(tt,{children:[d,p(mt,{width:g}),R(ye,{flexDirection:"column",alignItems:"flex-start",children:[l,u]})]})]})}))},kU=e=>{const{x:t=0,y:n=0,width:r=30,height:i=100,fill:o="#FF356A",size:a=10}=e;return p(Wt,{width:r,height:i,points:[{x:t,y:n},{x:t+r/2,y:n+a},{x:t+r,y:n},{x:t+r,y:n+i-a},{x:t+r/2,y:n+i},{x:t,y:n+i-a}],fill:o,"data-element-type":"shape"})},RU=e=>{const{x:t=0,y:n=0,width:r=50,height:i=10,fill:o,positionH:a="normal"}=e,s=i/2,c=r-s,l=2,u=s;return R(Y,{x:t,y:n,width:r,height:i,children:[p(Je,{width:i,height:i,fill:o,x:a==="normal"?0:c-s,"data-element-type":"shape"}),p(Pe,{d:a==="normal"?`M${s},${u} L${s+c},${u}`:`M0,${u} L${c-s},${u}`,strokeWidth:l,stroke:o,"data-element-type":"shape"})]})};ct("vertical-icon-arrow",{component:Ww,composites:["icon","label","desc"]});const Wh=new Map;function We(e,t){Wh.set(e,t)}function Gw(e){return Wh.get(e)}function LU(){return Array.from(Wh.keys())}const Vw=e=>{var t,n,r;const{Title:i,Item:o,data:a,width:s,gap:c,barGap:l,barHeight:u=28,barAreaWidth:h,labelGap:d=16,padding:f=24,showValue:g=!0,options:y,valueFormatter:m=Fe=>Fe.toString()}=e,v=(t=h!=null?h:s)!=null?t:480,{title:b,desc:_,items:x=[],xTitle:w,yTitle:P}=a,$=i?p(i,{title:b,desc:_}):null;if(x.length===0)return p(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:$});const[C,M,S,E]=Er(f),I=(n=x[0])!=null?n:{label:"",value:0},O=ae(p(o,{indexes:[0],datum:I,data:a})),T=O.width||140,F=O.height||u,z=Math.max(u,F),j=Math.max(12,z*.35),H=(r=l!=null?l:c)!=null?r:j,W=x.map(Fe=>{var Be;return(Be=Fe.value)!=null?Be:0}),B=Math.max(...W,0),X=Math.min(...W,0),D=X<0?X*1.1:0;let k=B>0?B*1.1:0;k===D&&(k=D+1);const A=To().domain([D,k]).range([0,v]),L=Math.min(Math.max(A(0),0),v),N=Math.max(2,v*.02),q=x.length*(z+H)-H,G=P?24:0,U=20,K=w?24:0,ne=C+G,ee=E+T+d,se=g?80:0,ce=Math.max(8,z*.2),Z=ee+v+se+M,le=ne+q+ce+U+K+S,te=Ct(y.themeConfig),Q=te.colorText||"#666",re=wt(y),ie=[],ue=[],he=[],fe=[],me=[],pe=[],_e=[],Ce=ne+q+ce,Me=Fe=>Number.isInteger(Fe)?Fe.toString():Fe.toFixed(1);x.forEach((Fe,Be)=>{var Ye;const de=[Be],Te=(Ye=Fe.value)!=null?Ye:0,ke=ne+Be*(z+H),oe=ke+(z-u)/2,be=Te>=0?ee+L:ee+A(Te),we=Te>=0?A(Te)-L:L-A(Te),Oe=we===0?N:we,Ze=je(y,[Be])||te.colorPrimary;if(ie.push(p(ze,{x:be,y:oe,width:Oe,height:u,fill:Ze,rx:6,ry:6,"data-element-type":"shape"})),g){const Le=Te>=0?be+Oe+8:be-8;ue.push(p(Ne,{x:Le,y:oe+u/2,alignHorizontal:Te>=0?"left":"right",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:Ze,children:m(Te,Fe)}))}he.push(p(o,{indexes:de,datum:Fe,data:a,x:E,y:ke+(z-F)/2,width:T,height:F,positionV:"middle"}))});const $e=Math.max(3,Math.min(7,Math.floor(v/80)));return A.ticks($e).forEach(Fe=>{const Be=ee+A(Fe);pe.push(p(Pe,{d:`M${Be} ${ne} L${Be} ${ne+q}`,stroke:Q,strokeOpacity:.08,"data-element-type":"shape"})),me.push(p(Pe,{d:`M${Be-.5} ${Ce} L${Be-.5} ${Ce+6}`,stroke:Q,"data-element-type":"shape"})),me.push(p(Ne,{x:Be,y:Ce+14,alignHorizontal:"center",alignVertical:"middle",fontSize:12,fill:Q,children:Me(Fe)}))}),fe.push(p(Pe,{d:`M${ee} ${Ce} L${ee+v} ${Ce}`,stroke:Q,"data-element-type":"shape"})),D<0&&fe.push(p(ze,{x:ee+L-.5,y:ne,width:1,height:q,fill:re,"data-element-type":"shape"})),P&&_e.push(p(Ne,{x:E+T/2,y:C+G/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:Q,children:P})),w&&_e.push(p(Ne,{x:ee+v/2,y:Ce+U+K/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:Q,children:w})),R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[$,R(Y,{width:Z,height:le,children:[p(Y,{children:pe}),p(Y,{children:ie}),p(Y,{children:ue}),p(Y,{children:_e}),p(Y,{children:[...fe,...me]}),p(He,{children:he})]})]})};We("chart-bar",{component:Vw,composites:["title","item","xTitle","yTitle"]});const Yw=e=>{const{Title:t,Item:n,data:r,columnGap:i=60,columnWidth:o=50,padding:a=20,showValue:s=!0,options:c,valueFormatter:l=W=>W.toString()}=e,{title:u,desc:h,items:d=[]}=r,f=t?p(t,{title:u,desc:h}):null;if(d.length===0)return p(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:f});const g=Ct(c.themeConfig),m=[...d.map(W=>{var B;return(B=W.value)!=null?B:0}),0].sort((W,B)=>W-B),v=m[0]<0,b=d.length*o+(d.length-1)*i,_=300,[x,w,P,$]=Er(a),C=s?24:0,M=10,S=v&&s?C+M:M,E=b+$+w,I=_+x+P+S,O=To().domain([m[0],m[m.length-1]]).range([_,0]),T=O(0),F=[],z=[],j=[],H=[];return d.forEach((W,B)=>{var X;const D=[B],k=(X=W.value)!=null?X:0,A=$+B*(o+i),L=k>=0?O(k):T,N=Math.abs(O(k)-T),q=je(c,[B])||g.colorPrimary,G=`${q}-column-positive-${B}`,U=`${q}-column-negative-${B}`;H.push(R("linearGradient",{id:k>=0?G:U,x1:"0%",y1:k>=0?"0%":"100%",x2:"0%",y2:k>=0?"100%":"0%",children:[p("stop",{offset:"0%",stopColor:q}),p("stop",{offset:"100%",stopColor:ve.mix(q,"#fff",40).toHexString()})]})),F.push(p(ze,{x:A,y:x+L,width:o,height:N,fill:`url(#${k>=0?G:U})`,rx:8,ry:8,"data-element-type":"shape"})),s&&z.push(p(Ne,{x:A+o/2,y:k>=0?x+L-10:x+L+N+20,fontSize:16,fontWeight:"bold",alignHorizontal:"center",alignVertical:k>=0?"bottom":"top",fill:q,children:l(k,W)}));const K=o+i,ne=x+_+S;j.push(p(n,{indexes:D,datum:W,data:r,x:A+o/2-K/2,y:ne,width:K,positionH:"center"}))}),R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,R(Y,{width:E,height:I,children:[p(Ke,{children:H}),p(Y,{children:F}),p(Y,{children:z}),p(He,{children:j})]})]})};We("chart-column",{component:Yw,composites:["title","item"]});var zU=Object.defineProperty,NU=Object.defineProperties,HU=Object.getOwnPropertyDescriptors,Xw=Object.getOwnPropertySymbols,DU=Object.prototype.hasOwnProperty,qU=Object.prototype.propertyIsEnumerable,Uw=(e,t,n)=>t in e?zU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kw=(e,t)=>{for(var n in t||(t={}))DU.call(t,n)&&Uw(e,n,t[n]);if(Xw)for(var n of Xw(t))qU.call(t,n)&&Uw(e,n,t[n]);return e},jU=(e,t)=>NU(e,HU(t));const Zw=e=>{const{Title:t,Item:n,data:r,width:i,height:o=260,gap:a=10,padding:s=24,showValue:c=!0,options:l,valueFormatter:u=oe=>oe.toString()}=e,{title:h,desc:d,items:f=[],xTitle:g,yTitle:y}=r,m=t?p(t,{title:h,desc:d}):null;if(f.length===0)return p(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:m});const[v,b,_,x]=Er(s),w={indexes:[0],datum:f[0],data:r,positionH:"center",positionV:"normal"},P=ae(p(n,Kw({},w))),$=P.width,C=P.height,M=Math.max(28,C+14),S=44,E=y?26:0,I=g?22:0,O=$+a,T=f.length>0?(f.length-1)*O+$:0,F=i!==void 0?i:Math.max(200,T||320),z=f.length>1?Math.max(O,(F-$)/(f.length-1)):0,j=f.length>0?Math.max($,(f.length-1)*z+$):0,H=x+S+E,W=v+E,B=H+j+b,X=W+o+M+I+_,D=f.map(oe=>{var be;return(be=oe.value)!=null?be:0}),k=Math.max(...D,0),A=Math.min(...D,0),L=Math.max(Math.abs(k),Math.abs(A))*.1,N=A<0?A-L:0;let q=k>0?k+L:1;q===N&&(q=N+1);const G=To().domain([N,q]).nice().range([o,0]),U=Math.max(0,Math.min(o,G(0))),K=q<=0?0:N>=0?o:U,ne=wt(l),ee=Ct(l.themeConfig),se=ee.colorText||"#666",ce=[],Z=[],le=[],te=[],Q=[],re=[],ie=[];G.ticks(6).forEach(oe=>{const be=W+G(oe);ce.push(p(Pe,{d:`M ${H} ${be} L ${H+j} ${be}`,width:j,height:1,stroke:se,strokeWidth:1,"data-element-type":"shape",opacity:.08})),ie.push(p(Ne,{x:H-8,y:be,alignHorizontal:"right",alignVertical:"middle",fontSize:12,fill:se,children:Number.isInteger(oe)?oe.toString():oe.toFixed(1)}))});const he=[],fe=[],me=[],pe=oe=>{if(oe.length===0)return"";if(oe.length===1){const we=oe[0];return`M ${we.x} ${we.y}`}const be=[];be.push(`M ${oe[0].x} ${oe[0].y}`);for(let we=0;we<oe.length-1;we++){const Oe=oe[we-1]||oe[we],Ze=oe[we],Le=oe[we+1],Ee=oe[we+2]||Le,Qe=Ze.x+(Le.x-Oe.x)/6,et=Ze.y+(Le.y-Oe.y)/6,Xe=Le.x-(Ee.x-Ze.x)/6,rt=Le.y-(Ee.y-Ze.y)/6;be.push(`C ${Qe} ${et} ${Xe} ${rt} ${Le.x} ${Le.y}`)}return be.join(" ")};f.forEach((oe,be)=>{var we;const Oe=H+be*z+$/2,Ze=W+G((we=oe.value)!=null?we:0);fe.push({x:Oe,y:Ze,datum:oe}),he.push(p(n,jU(Kw({},w),{indexes:[be],datum:oe,x:Oe-$/2,y:W+o+4})));const Le=je(l,[be])||ee.colorPrimary;me.push({x:Oe,color:Le})});const _e=me.length>0?Math.min(...me.map(oe=>oe.x)):H,Ce=me.length>0?Math.max(...me.map(oe=>oe.x)):H+j,Me=Math.max(1,Ce-_e),$e=me.map(oe=>p("stop",{offset:`${(oe.x-_e)/Me*100}%`,stopColor:oe.color})),Re=me.map(oe=>p("stop",{offset:`${(oe.x-_e)/Me*100}%`,stopColor:oe.color,stopOpacity:"0.18"}));if(me.length>0){const oe=me[me.length-1].color;$e.push(p("stop",{offset:"100%",stopColor:oe})),Re.push(p("stop",{offset:"100%",stopColor:oe,stopOpacity:"0.04"}))}const Fe=`chart-line-${Lb([j,o,se,ne,me.map(oe=>`${oe.x.toFixed(2)}-${oe.color}`).join()].join(":"))}`,Be=`${Fe}-stroke`,Ye=`${Fe}-area`,de=pe(fe);le.push(p(Pe,{d:de,width:j,height:o,stroke:`url(#${Be})`,strokeWidth:3,fill:"none","data-element-type":"shape"}));const Te=de.includes("C")?de.slice(de.indexOf("C")):"",ke=[`M ${fe[0].x} ${W+K}`,`L ${fe[0].x} ${fe[0].y}`,Te,`L ${fe[fe.length-1].x} ${W+K}`,"Z"].join(" ");return le.push(p(Pe,{d:ke,width:j,height:o,fill:`url(#${Ye})`,stroke:"none","data-element-type":"shape"})),fe.forEach((oe,be)=>{var we;const Oe=je(l,[be])||ee.colorPrimary;te.push(p(Je,{x:oe.x-6,y:oe.y-6,width:12,height:12,fill:Oe,"data-element-type":"shape"})),c&&Q.push(p(Ne,{x:oe.x,y:oe.y-12,alignHorizontal:"center",alignVertical:"bottom",fontSize:12,fontWeight:"bold",fill:Oe,children:u((we=oe.datum.value)!=null?we:0,oe.datum)}))}),Z.push(p(Pe,{d:`M ${H} ${W+K} L ${H+j} ${W+K}`,width:j,height:1,stroke:se,strokeWidth:1,"data-element-type":"shape"})),Z.push(p(Pe,{d:`M ${H} ${W} L ${H} ${W+o}`,width:1,height:o,stroke:se,strokeWidth:1,"data-element-type":"shape"})),g&&re.push(p(Ne,{x:H+j/2,y:W+o+M+I/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:se,children:g})),y&&re.push(p(Ne,{x:x+E/2,y:W+o/2,alignHorizontal:"center",alignVertical:"middle",fontSize:14,fontWeight:"bold",fill:se,children:y})),R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[m,R(Y,{width:B,height:X,children:[R(Ke,{children:[p("linearGradient",{id:Be,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:$e}),R("linearGradient",{id:Ye,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[Re,p("stop",{offset:"100%",stopColor:ne,stopOpacity:"0.04"})]})]}),p(Y,{children:ce}),p(Y,{children:[...Z,...ie]}),p(Y,{children:le}),p(Y,{children:te}),p(Y,{children:Q}),p(Y,{children:re}),p(He,{children:he})]})]})};We("chart-line",{component:Zw,composites:["title","item","xTitle","yTitle"]});const Qw=e=>{var t;const{Title:n,Item:r,data:i,radius:o=140,innerRadius:a=0,padding:s=30,showPercentage:c=!0,options:l}=e,{title:u,desc:h,items:d=[]}=i,f=n?p(n,{title:u,desc:h}):null,g=ae(p(J,{indexes:[0]})),y=(t=d[0])!=null?t:{label:"",value:0},m=ae(p(r,{indexes:[0],datum:y,data:i,positionH:"center",positionV:"middle"})),v=m.width||140,b=m.height||32,_=Math.max(o,60),x=1.35,w=8,P=_*x+w+v,$=_,C=s+P,M=s+$,S=C*2,E=M*2;if(d.length===0)return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,p(Y,{width:S,height:E,children:p(qe,{children:p(J,{indexes:[0],x:C-g.width/2,y:M-g.height/2})})})]});const I=d.reduce((G,U)=>{var K;return G+Math.max((K=U.value)!=null?K:0,0)},0),O=wt(l),T=Ct(l.themeConfig),z=nX().value(G=>{var U;return Math.max((U=G.value)!=null?U:0,0)}).sort(null).startAngle(0).endAngle(Math.PI*2)(d),j=Ro().innerRadius(a).outerRadius(_).cornerRadius(2),H=Ro().innerRadius(_).outerRadius(_),W=Ro().innerRadius(_*1.15).outerRadius(_*1.15),B=a+(_-a)*.5,X=Ro().innerRadius(B).outerRadius(B),D=Ro().innerRadius(_*.85).outerRadius(_*.85),k=[],A=[],L=[],N=[],q=[];return z.forEach(G=>{const U=G.data,K=G.index,ne=je(l,[K])||T.colorPrimary||O,ee=j(G)||"";k.push(p(Pe,{d:ee,fill:ne,stroke:T.colorBg,strokeWidth:1,"data-element-type":"shape",width:_*2,height:_*2}));const ce=G.startAngle+(G.endAngle-G.startAngle)/2<Math.PI,Z=H.centroid(G),le=W.centroid(G),Q=[_*x*(ce?1:-1),le[1]];L.push(p(Pe,{d:`M${C+Z[0]} ${M+Z[1]} L${C+le[0]} ${M+le[1]} L${C+Q[0]} ${M+Q[1]}`,stroke:O,strokeOpacity:.45,strokeWidth:2,fill:"none","data-element-type":"shape"}));const re=C+Q[0]+(ce?w:-w-v),ie=M+Q[1]-b/2;if(N.push(p(r,{indexes:[K],datum:U,data:i,x:re,y:ie,width:v,height:b,positionH:ce?"normal":"flipped",positionV:"middle",themeColors:Ct({colorPrimary:ne},l)})),c&&I>0){const he=X.centroid(G),fe=Math.max(G.value,0),me=(fe*100/I).toFixed(1),pe=50,_e=20;A.push(p(Ne,{x:C+he[0]-pe/2,y:M+he[1]-_e/2,width:pe,height:_e,alignHorizontal:"center",alignVertical:"middle",fontSize:12,fontWeight:"bold",fill:"#ffffff","data-value":fe,"data-indexes":[K],"data-element-type":Ue.ItemValue,children:`${me}%`}))}const ue=D.centroid(G);q.push(p(nt,{indexes:[K],x:C+ue[0]-g.width/2,y:M+ue[1]-g.height/2}))}),z.forEach((G,U)=>{const K=(U+1)%z.length,ne=G.endAngle,ee=z[K].startAngle+(K===0?Math.PI*2:0),se=(ne+ee)/2,ce=_*1,Z=Math.sin(se)*ce,le=-Math.cos(se)*ce;q.push(p(J,{indexes:[U+1],x:C+Z-g.width/2,y:M+le-g.height/2}))}),R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[f,R(Y,{width:S,height:E,children:[p(Y,{x:C,y:M,children:k}),p(Y,{children:L}),p(Y,{children:A}),p(He,{children:N}),p(qe,{children:q})]})]})};We("chart-pie",{component:Qw,composites:["title","item"]});var FU=Object.defineProperty,BU=Object.defineProperties,WU=Object.getOwnPropertyDescriptors,Jw=Object.getOwnPropertySymbols,GU=Object.prototype.hasOwnProperty,VU=Object.prototype.propertyIsEnumerable,e4=(e,t,n)=>t in e?FU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,t4=(e,t)=>{for(var n in t||(t={}))GU.call(t,n)&&e4(e,n,t[n]);if(Jw)for(var n of Jw(t))VU.call(t,n)&&e4(e,n,t[n]);return e},n4=(e,t)=>BU(e,WU(t));const YU=[0,30,-30,60,-60],XU=Math.PI*(3-Math.sqrt(5));function r4(e,t,n){const r=Math.PI/180*n,i=Math.cos(r),o=Math.sin(r);return{width:Math.abs(e*i)+Math.abs(t*o),height:Math.abs(e*o)+Math.abs(t*i)}}function UU(e,t,n,r,i,o){const a=e-o,s=e+n+o,c=t-o,l=t+r+o;return i.some(u=>{const h=u.box.x-o,d=u.box.x+u.box.width+o,f=u.box.y-o,g=u.box.y+u.box.height+o;return!(s<=h||a>=d||l<=f||c>=g)})}function KU(e,t,n,r,i){const o=[],a=t?YU:[0],s=Math.max(1600,e.length*28);return e.forEach((c,l)=>{const u=Math.max(c.width,c.height),h=l*XU;let d=0,f=null;for(let g=0;g<s&&!f;g++){g===Math.floor(s*.6)&&(d=u);const y=h+g*r,m=i*Math.sqrt(g+1)+d+u*.25,v=m*Math.cos(y),b=m*Math.sin(y);for(const _ of a){const x=r4(c.width,c.height,_),w=v-x.width/2,P=b-x.height/2;if(!UU(w,P,x.width,x.height,o,n)){f=n4(t4({},c),{angle:_,centerX:v,centerY:b,box:{x:w,y:P,width:x.width,height:x.height}});break}}}if(!f){const g=a[l%a.length],y=i*Math.sqrt(s+1)+u,m=h,v=y*Math.cos(m),b=y*Math.sin(m),_=r4(c.width,c.height,g);f=n4(t4({},c),{angle:g,centerX:v,centerY:b,box:{x:v-_.width/2,y:b-_.height/2,width:_.width,height:_.height}})}o.push(f)}),o}const i4=e=>{const{data:t,options:n,minFontSize:r=16,maxFontSize:i=48,enableRotate:o=!0,padding:a=6,spiralStep:s=.45,radiusStep:c=10}=e,{items:l=[]}=t,u=l.map((O,T)=>({datum:O,index:T})).filter(({datum:O})=>O.label);if(u.length===0)return p(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:p(Y,{children:p(He,{})})});const h=u.map(({datum:O})=>O.value).filter(O=>typeof O=="number"),d=h.length>0,f=d?Math.min(...h):0,g=d?Math.max(...h):0,y=d&&f===g,m=(r+i)/2,v=O=>{if(!d||y)return m;if(O==null)return r;const T=(O-f)/(g-f||1);return r+T*(i-r)},b=u.map(({datum:O,index:T})=>{const F=v(O.value),z=ae(p(Ne,{fontSize:F,fontWeight:"bold",children:O.label})),j=je(n,[T])||wt(n);return{label:O.label,value:O.value,color:j,fontSize:F,width:z.width*1.05,height:z.height}}).sort((O,T)=>T.fontSize-O.fontSize),_=KU(b,o,a,s,c),x=Math.min(..._.map(O=>O.box.x)),w=Math.min(..._.map(O=>O.box.y)),P=Math.max(..._.map(O=>O.box.x+O.box.width)),$=Math.max(..._.map(O=>O.box.y+O.box.height)),C=-x+a,M=-w+a,S=P-x+a*2,E=$-w+a*2,I=_.map((O,T)=>{const F=O.centerX-O.width/2+C,z=O.centerY-O.height/2+M,j=O.width/2,H=O.height/2,W=`translate(${F}, ${z}) rotate(${O.angle}, ${j}, ${H})`;return p(Y,{transform:W,children:p(Ne,{width:O.width,height:O.height,fontSize:O.fontSize,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:O.color,"data-indexes":T,"data-element-type":Ue.ItemLabel,children:O.label})})});return p(He,{id:"infographic-container",width:S,height:E,children:I})};We("chart-wordcloud",{component:i4,composites:[]});const o4=new Map,Gh=(e,t)=>{o4.set(e,t)},ZU=e=>{var t;return e&&(t=o4.get(e))!=null?t:null};var QU=Object.defineProperty,JU=Object.defineProperties,eK=Object.getOwnPropertyDescriptors,a4=Object.getOwnPropertySymbols,tK=Object.prototype.hasOwnProperty,nK=Object.prototype.propertyIsEnumerable,s4=(e,t,n)=>t in e?QU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,c4=(e,t)=>{for(var n in t||(t={}))tK.call(t,n)&&s4(e,n,t[n]);if(a4)for(var n of a4(t))nK.call(t,n)&&s4(e,n,t[n]);return e},l4=(e,t)=>JU(e,eK(t));Gh("pros-cons-arrow",e=>{const{x:t,y:n,colorPositive:r,colorNegative:i,colorBg:o}=e,a=200,s=141,c={width:90,height:40,fontSize:22,alignHorizontal:"center",alignVertical:"middle",fontWeight:"bold",fill:o};return R(Y,{x:t,y:n,width:a,height:s,children:[R(xt,{children:[p("path",{d:"M137 54C137 54.2903 137 54.5806 136.706 54.7742L108.614 86.0323H64.7619C64.4071 86.0204 64.0557 86.1043 63.7453 86.2747C63.4349 86.4452 63.1773 86.6959 63 87C63.0037 86.7447 63.1092 86.5012 63.2936 86.3226L91.3862 55.0645H135.238C135.593 55.0763 135.944 54.9925 136.255 54.822C136.565 54.6516 136.823 54.4009 137 54.0968V54Z",fill:"#D9D9D9"}),p("path",{d:"M39.3272 0.484649C39.6146 0.234929 39.9662 0.0736935 40.3407 0.0198929C40.7152 -0.0339076 41.0971 0.0219605 41.4414 0.180925C41.7857 0.33989 42.0783 0.595358 42.2846 0.917314C42.491 1.23927 42.6026 1.61434 42.6063 1.99848V14.8156H136.013C136.54 14.8156 137.045 15.0282 137.418 15.4068C137.791 15.7853 138 16.2987 138 16.834V53.166C138 53.7013 137.791 54.2147 137.418 54.5932C137.045 54.9718 136.54 55.1844 136.013 55.1844H42.6063V68.0015C42.6026 68.3857 42.491 68.7607 42.2846 69.0827C42.0783 69.4046 41.7857 69.6601 41.4414 69.8191C41.0971 69.9781 40.7152 70.0339 40.3407 69.9801C39.9662 69.9263 39.6146 69.7651 39.3272 69.5154L0.672847 36.5138C0.461378 36.3244 0.292014 36.0915 0.176005 35.8305C0.0599968 35.5695 0 35.2864 0 35C0 34.7136 0.0599968 34.4306 0.176005 34.1696C0.292014 33.9085 0.461378 33.6756 0.672847 33.4862L39.4265 0.484649H39.3272Z",fill:r}),p("path",{d:"M157.394 73.0007C157.397 72.6162 157.509 72.2407 157.715 71.9183C157.922 71.596 158.214 71.3403 158.559 71.1811C158.903 71.022 159.285 70.9661 159.659 71.0199C160.034 71.0738 160.385 71.2352 160.673 71.4852L199.327 104.524C199.539 104.714 199.708 104.947 199.824 105.208C199.94 105.47 200 105.753 200 106.04C200 106.326 199.94 106.61 199.824 106.871C199.708 107.132 199.539 107.366 199.327 107.555L160.573 140.594C160.285 140.815 159.943 140.951 159.584 140.989C159.225 141.027 158.862 140.965 158.535 140.809C158.208 140.653 157.929 140.41 157.728 140.105C157.527 139.8 157.411 139.445 157.394 139.078V126.247H63.9874C63.4603 126.247 62.9548 126.034 62.5821 125.655C62.2094 125.276 62 124.762 62 124.226V87.8531C62 87.3172 62.2094 86.8032 62.5821 86.4242C62.9548 86.0453 63.4603 85.8324 63.9874 85.8324H157.394V73.0007Z",fill:i})]}),p(Ne,l4(c4({x:40,y:15},c),{children:"Pros"})),p(Ne,l4(c4({x:70,y:85},c),{children:"Cons"}))]})});var rK=Object.defineProperty,iK=Object.defineProperties,oK=Object.getOwnPropertyDescriptors,u4=Object.getOwnPropertySymbols,aK=Object.prototype.hasOwnProperty,sK=Object.prototype.propertyIsEnumerable,h4=(e,t,n)=>t in e?rK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,d4=(e,t)=>{for(var n in t||(t={}))aK.call(t,n)&&h4(e,n,t[n]);if(u4)for(var n of u4(t))sK.call(t,n)&&h4(e,n,t[n]);return e},f4=(e,t)=>iK(e,oK(t));Gh("pros-cons-fold",e=>{const{x:t,y:n,colorPositive:r,colorNegative:i,colorBg:o}=e,a=240,s=300,c={width:85,height:30,fontSize:20,alignHorizontal:"center",alignVertical:"middle",fontWeight:"bold",fill:o};return R(Y,{x:t,y:n,width:a,height:s,children:[R(xt,{children:[p("path",{d:"M136.914 38.7755C137.303 38.7733 137.683 38.6617 138.011 38.4534C138.339 38.2451 138.602 37.9485 138.77 37.5977C138.937 37.247 139.002 36.8561 138.957 36.4701C138.913 36.084 138.76 35.7183 138.517 35.415L110.741 0.982313C110.548 0.735138 110.301 0.535238 110.018 0.397762C109.736 0.260286 109.426 0.188841 109.112 0.188841C108.798 0.188841 108.488 0.260286 108.206 0.397762C107.924 0.535238 107.676 0.735138 107.483 0.982313L79.7069 35.415C79.4639 35.7183 79.3113 36.084 79.2667 36.4701C79.222 36.8561 79.2871 37.247 79.4545 37.5977C79.6219 37.9485 79.8847 38.2451 80.213 38.4534C80.5412 38.6617 80.9216 38.7733 81.3104 38.7755H92.8965C93.0517 57.1293 97.5517 64.9878 105.259 73.7252C107.017 75.7932 108.983 77.8612 111.103 80.1361C113.276 82.4626 122.121 88.9252 131.069 95.181C129.362 88.7701 128.172 81.2218 127.293 73.7252C125.224 55.9918 125.017 38.7755 125.017 38.7755H136.914Z",fill:r,fillOpacity:.4}),p("path",{d:"M237.931 109.967C238.48 109.967 239.006 109.749 239.394 109.362C239.782 108.974 240 108.448 240 107.899V75.7932C240 75.2447 239.782 74.7187 239.394 74.3309C239.006 73.9431 238.48 73.7252 237.931 73.7252H127.241C128.172 81.2218 129.362 88.7701 131.069 95.181C138.182 100.171 145.337 105.1 152.534 109.967H237.931Z",fill:r}),p("path",{d:"M152.586 109.967C152.586 109.967 141.724 102.678 131.069 95.181C124.122 90.5838 117.455 85.5772 111.103 80.1878C109.034 77.8612 107.017 75.7415 105.259 73.7252H48.6207V56.6639C48.6091 56.2797 48.4905 55.9063 48.2784 55.5857C48.0662 55.2651 47.7689 55.0099 47.4197 54.8488C47.0705 54.6878 46.6833 54.6271 46.3016 54.6738C45.9199 54.7204 45.5587 54.8725 45.2586 55.1129L1.50002 90.2694C1.26208 90.4633 1.07029 90.7078 0.938585 90.985C0.80688 91.2622 0.738558 91.5652 0.738558 91.8721C0.738558 92.179 0.80688 92.482 0.938585 92.7592C1.07029 93.0365 1.26208 93.2809 1.50002 93.4748L45.2586 128.631C45.5621 128.874 45.928 129.027 46.3142 129.071C46.7005 129.116 47.0914 129.051 47.4424 128.884C47.7933 128.716 48.09 128.454 48.2984 128.125C48.5068 127.797 48.6185 127.417 48.6207 127.029V109.967H152.586Z",fill:"#BFBFBF"}),p("path",{d:"M36.1034 88.9252H28.9655V93.785H36.1034V101.85H41.4828V93.785H48.6207V88.8735H41.4828V81.1701H36.1034V88.9252Z",fill:"#404040"}),p("path",{d:"M103.086 261.224C102.697 261.227 102.317 261.338 101.989 261.547C101.661 261.755 101.398 262.051 101.23 262.402C101.063 262.753 100.998 263.144 101.043 263.53C101.087 263.916 101.24 264.282 101.483 264.585L129.259 299.018C129.452 299.265 129.699 299.465 129.982 299.602C130.264 299.74 130.574 299.811 130.888 299.811C131.202 299.811 131.512 299.74 131.794 299.602C132.076 299.465 132.324 299.265 132.517 299.018L160.293 264.585C160.536 264.282 160.689 263.916 160.733 263.53C160.778 263.144 160.713 262.753 160.546 262.402C160.378 262.051 160.115 261.755 159.787 261.547C159.459 261.338 159.078 261.227 158.69 261.224H147.103C146.948 242.871 142.448 235.012 134.741 226.275C132.983 224.207 131.017 222.139 128.897 219.864C126.724 217.537 117.879 211.075 108.931 204.819C110.677 211.877 111.938 219.045 112.707 226.275C114.776 244.008 114.983 261.224 114.983 261.224H103.086Z",fill:i,fillOpacity:.4}),p("path",{d:"M2.06897 190.033C1.52025 190.033 0.993996 190.251 0.605989 190.638C0.217983 191.026 5.00679e-06 191.552 5.00679e-06 192.101V224.207C5.00679e-06 224.755 0.217983 225.281 0.605989 225.669C0.993996 226.057 1.52025 226.275 2.06897 226.275H112.759C111.828 218.778 110.638 211.23 108.931 204.819C99.9827 198.512 90.931 192.411 88.2414 190.55C87.7206 190.204 87.1077 190.024 86.4828 190.033H2.06897Z",fill:i}),p("path",{d:"M87.4138 190.033C87.4138 190.033 98.2759 197.322 108.931 204.819C115.878 209.416 122.545 214.423 128.897 219.812C130.966 222.139 132.983 224.258 134.741 226.275H191.379V243.336C191.391 243.72 191.51 244.094 191.722 244.414C191.934 244.735 192.231 244.99 192.58 245.151C192.929 245.312 193.317 245.373 193.698 245.326C194.08 245.28 194.441 245.128 194.741 244.887L238.5 209.731C238.738 209.537 238.93 209.292 239.061 209.015C239.193 208.738 239.261 208.435 239.261 208.128C239.261 207.821 239.193 207.518 239.061 207.241C238.93 206.964 238.738 206.719 238.5 206.525L194.741 171.369C194.438 171.126 194.072 170.973 193.686 170.929C193.3 170.884 192.909 170.949 192.558 171.116C192.207 171.284 191.91 171.546 191.702 171.875C191.493 172.203 191.382 172.583 191.379 172.971V190.033H87.4138Z",fill:"#BFBFBF"}),p("path",{d:"M192.414 205.905V210.816H212.069V205.905H192.414Z",fill:"#404040"})]}),p(Ne,f4(d4({x:153,y:77},c),{children:"PROS"})),p(Ne,f4(d4({x:2,y:193},c),{children:"CONS"}))]})}),Gh("vs",e=>{const{x:t,y:n,colorPrimary:r,colorBg:i}=e,o=100,a=100,s=ve(r).lighten(20).toString();return R(Y,{x:t,y:n,width:o,height:a,children:[R(Ke,{children:[p("filter",{id:"vs-divider-glow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",children:p("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"8",result:"blur"})}),p(ih,{})]}),p(Je,{x:0,y:0,width:o,height:a,fill:s,filter:"url(#vs-divider-glow-filter)",opacity:.6}),p(Je,{x:0,y:0,width:o,height:a,fill:r,"data-element-type":"shape"}),p("text",{x:o/2,y:a/2,fontSize:Math.min(o,a)/1.5,fontWeight:"bold",fill:i,textAnchor:"middle",dominantBaseline:"central",filter:"url(#drop-shadow)",children:"VS"})]})});const p4=e=>{const{Title:t,Item:n,data:r,gap:i=20,groupGap:o=20,opposite:a=!0,flipped:s=!0,dividerType:c="vs",options:l}=e,{title:u,desc:h,items:d=[]}=r,f=t?p(t,{title:u,desc:h}):null;if(d.length===0)return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,p(Y,{children:p(qe,{children:p(J,{indexes:[0],x:0,y:0})})})]});const g=d[0]||{children:[]},y=d[1]||{children:[]},m=g.children||[],v=y.children||[],b=Ct(l.themeConfig),_=ae(p(n,{indexes:[0,0],data:r,datum:m[0]||{}})),x=ae(p(J,{indexes:[0]})),w=ZU(c),P=w?ae(p(w,{x:0,y:0,colorPrimary:b.colorPrimary,colorBg:b.colorBg,colorPositive:b.colorPrimary,colorNegative:b.colorPrimary})):{width:0,height:0},$=[],C=[],M=[],S=Math.max(m.length,v.length),E=S>0?S*(_.height+i)-i:0,I=5,O=S>0?i/2+x.height/2:x.height/2,T=x.width+I,F=T+_.width+o,z=F+P.width+o,j=s?"flipped":"normal",H=s?"normal":a?"flipped":"normal";if(m.forEach((W,B)=>{const X=O+B*(_.height+i),D=[0,B];$.push(p(n,{indexes:D,datum:W,data:r,x:T,y:X,positionH:j,positionV:"middle"})),C.push(p(nt,{indexes:D,x:T-x.width-I,y:X+(_.height-x.height)/2})),B<m.length-1&&C.push(p(J,{indexes:[0,B+1],x:T+(_.width-x.width)/2,y:X+_.height+i/2-x.height/2}))}),m.length>0){C.push(p(J,{indexes:[0,0],x:T+(_.width-x.width)/2,y:O-i/2-x.height/2}));const W=O+(m.length-1)*(_.height+i);C.push(p(J,{indexes:[0,m.length],x:T+(_.width-x.width)/2,y:W+_.height+i/2-x.height/2}))}else d.length>=1&&C.push(p(J,{indexes:[0,0],x:T+(_.width-x.width)/2,y:O-x.height/2}));if(v.forEach((W,B)=>{const X=O+B*(_.height+i),D=[1,B];$.push(p(n,{indexes:D,datum:W,data:r,x:z,y:X,positionH:H,positionV:"middle"})),C.push(p(nt,{indexes:D,x:z+_.width+I,y:X+(_.height-x.height)/2})),B<v.length-1&&C.push(p(J,{indexes:[1,B+1],x:z+(_.width-x.width)/2,y:X+_.height+i/2-x.height/2}))}),v.length>0){C.push(p(J,{indexes:[1,0],x:z+(_.width-x.width)/2,y:O-i/2-x.height/2}));const W=O+(v.length-1)*(_.height+i);C.push(p(J,{indexes:[1,v.length],x:z+(_.width-x.width)/2,y:W+_.height+i/2-x.height/2}))}else d.length>=2&&C.push(p(J,{indexes:[1,0],x:z+(_.width-x.width)/2,y:O-x.height/2}));return d.length<2&&C.push(p(J,{indexes:[1],x:z+(_.width-x.width)/2,y:O+(E-x.height)/2})),w&&M.push(p(w,{x:F,y:O+(E-P.height)/2,colorPrimary:b.colorPrimary,colorBg:b.colorBg,colorPositive:je(l,[0])||b.colorPrimary,colorNegative:je(l,[1])||b.colorPrimary})),R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,R(Y,{children:[p(Y,{children:M}),p(He,{children:$}),p(qe,{children:C})]})]})};We("compare-binary-horizontal",{component:p4,composites:["title","item"]});var cK=Object.defineProperty,g4=Object.getOwnPropertySymbols,lK=Object.prototype.hasOwnProperty,uK=Object.prototype.propertyIsEnumerable,m4=(e,t,n)=>t in e?cK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,y4=(e,t)=>{for(var n in t||(t={}))lK.call(t,n)&&m4(e,n,t[n]);if(g4)for(var n of g4(t))uK.call(t,n)&&m4(e,n,t[n]);return e};const hK={none:5,"dot-line":100,"arc-dot":20,"split-line":5},v4=e=>{var t,n;const{Title:r,Items:i,data:o,gap:a=20,groupGap:s=0,decoration:c="none",surround:l=!0,flipRoot:u=!1,flipLeaf:h=!1,options:d}=e,[f,g]=i,{title:y,desc:m,items:v=[]}=o,b=r?p(r,{title:y,desc:m}):null,_=p(f,{indexes:[0],data:o,datum:o.items[0],themeColors:{}}),x=p(g,{indexes:[0,0],data:o,datum:((n=(t=v[0])==null?void 0:t.children)==null?void 0:n[0])||v[2]}),w=ae(_),P=ae(x),$=[],C=[],[M,S]=v,E=(M==null?void 0:M.children)||[],I=(S==null?void 0:S.children)||[],O=Math.max(w.height,E.length*(P.height+a)-a,I.length*(P.height+a)-a),T=hK[c]||0,F=P.width+T,z=F+w.width+s,j=(O-w.height)/2;M&&$.push(p(f,{indexes:[0],x:F,y:j,data:o,datum:M,positionH:u?"normal":"flipped"})),S&&$.push(p(f,{indexes:[1],x:z,y:j,data:o,datum:S,positionH:u?"flipped":"normal"}));const H=(W,B,X)=>{if(c==="none")return;const[D,k]=B,A=je(d,X),L={x:D,y:k,width:P.width,height:P.height,side:W,color:A||"#ccc",colorBg:d.themeConfig.colorBg||"#fff"};c==="split-line"?C.push(p(dK,y4({},L))):c==="dot-line"&&C.push(p(fK,y4({},L)))};if(l){const B=(2*w.width+s+P.width)/2+T,X=F+w.width+s/2,D=j+w.height/2;E.forEach((k,A)=>{const L=E.length*(P.height+a)-a,q=(O-L)/2+A*(P.height+a),U=q+P.height/2-D,K=Math.max(0,B*B-U*U),ee=X-Math.sqrt(K)-P.width/2;$.push(p(g,{indexes:[0,A],datum:k,data:o,x:ee,y:q,positionH:h?"flipped":"normal"})),H("left",[ee,q],[0,A])}),I.forEach((k,A)=>{const L=I.length*(P.height+a)-a,q=(O-L)/2+A*(P.height+a),U=q+P.height/2-D,K=Math.max(0,B*B-U*U),ee=X+Math.sqrt(K)-P.width/2;$.push(p(g,{indexes:[1,A],datum:k,data:o,x:ee,y:q,positionH:h?"normal":"flipped"})),H("right",[ee,q],[1,A])})}else E.forEach((W,B)=>{const X=E.length*(P.height+a)-a,k=(O-X)/2+B*(P.height+a),A=[0,B],L=0;$.push(p(g,{indexes:A,datum:W,data:o,x:L,y:k,positionH:h?"flipped":"normal"})),H("left",[L,k],A)}),I.forEach((W,B)=>{const X=I.length*(P.height+a)-a,k=(O-X)/2+B*(P.height+a),A=[1,B],L=z+w.width+T;$.push(p(g,{indexes:A,datum:W,data:o,x:L,y:k,positionH:h?"normal":"flipped"})),H("right",[L,k],A)});return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[b,R(Y,{children:[p(He,{children:$}),p(Y,{width:0,height:0,children:C})]})]})},dK=e=>{const{x:t,y:n,width:r,height:i,color:o,colorBg:a,side:s}=e,c=n+i,l=`split-line-linear-gradient-${s}`;return R(tt,{children:[p(Ke,{children:p(oh,{id:l,startColor:o,stopColor:a,direction:s==="left"?"left-right":"right-left"})}),p(ze,{x:t,y:c,width:r,height:1,fill:`url(#${l})`})]})},fK=e=>{const{x:t,y:n,side:r,width:i,height:o,color:a,colorBg:s}=e,c=6,l=c/3,u=c*2,h=l*2,d=5,f=r==="left"?t+i+c+d:t-c-d,g=n+o/2,y=f-l,m=g-l,v=80,b=r==="left"?v:-v,_=`dot-line-linear-gradient-${r}`;return R(Y,{children:[p(Ke,{children:p(oh,{id:_,startColor:a,stopColor:s,direction:r==="left"?"left-right":"right-left"})}),R(xt,{children:[p(Je,{x:f-c,y:g-c,width:u,height:u,fill:"none",strokeWidth:1,stroke:a}),p(Je,{x:y,y:m,width:h,height:h,fill:a})]}),p(ze,{x:r==="left"?f:f+b,y:g-.5,width:v,height:1,fill:`url(#${_})`})]})};We("compare-hierarchy-left-right",{component:v4,composites:["title","item"]});const b4=e=>{var t,n;const{Title:r,Items:i,data:o,gap:a=0,itemGap:s=20,columnWidth:c=280,itemPadding:l=5,showColumnBackground:u=!0,columnBackgroundAlpha:h=.08,options:d}=e,[f,g]=i,{title:y,desc:m,items:v=[]}=o,b=r?p(r,{title:y,desc:m}):null,_=Q_(d),x=[],w=[],P=c-l*2,$=ae(p(f,{indexes:[0],data:o,datum:v[0],width:c})),C=ae(p(g,{indexes:[0,0],data:o,datum:((n=(t=v[0])==null?void 0:t.children)==null?void 0:n[0])||{},width:P})),M=ae(p(J,{indexes:[0]})),S=Math.max(...v.map(I=>{var O;return((O=I.children)==null?void 0:O.length)||0}),0),E=$.height+s+S*(C.height+s);if(v.forEach((I,O)=>{const{children:T=[]}=I,F=O*(c+a),z=F,j=0;if(u){const X=`${_[O%_.length]}${Math.round(h*255).toString(16).padStart(2,"0")}`;x.push(p(ze,{x:F,y:j,width:c,height:E,fill:X,rx:0,ry:0,"data-element-type":"shape"}))}x.push(p(f,{indexes:[O],datum:I,data:o,x:z,y:j,width:c})),w.push(p(nt,{indexes:[O],x:z+$.width-M.width-10,y:j+10})),O===0&&w.push(p(J,{indexes:[O],x:z+$.width/2-M.width/2,y:j-M.height-5}));const H=j+$.height+s;T.forEach((B,X)=>{const D=H+X*(C.height+s),k=z+l,A=[O,X];x.push(p(g,{indexes:A,datum:B,data:o,x:k,y:D,width:P})),w.push(p(nt,{indexes:A,x:k+C.width-M.width-10,y:D+(C.height-M.height)/2})),X<T.length-1&&w.push(p(J,{indexes:[O,X+1],x:k+C.width/2-M.width/2,y:D+C.height-M.height/2}))});const W=z+l;if(T.length>0){const B=H+T.length*(C.height+s);w.push(p(J,{indexes:[O,T.length],x:W+C.width/2-M.width/2,y:B-C.height/2-M.height/2}))}else w.push(p(J,{indexes:[O,0],x:W+C.width/2-M.width/2,y:H-s/2-M.height/2}))}),v.length>0){const I=v.length*(c+a);w.push(p(J,{indexes:[v.length],x:I-a/2-M.width/2,y:-M.height-5}))}return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[b,R(Y,{children:[p(He,{children:x}),p(qe,{children:w})]})]})};We("compare-hierarchy-row",{component:b4,composites:["title","item"]});const Vh=Object.assign,pK={getId:e=>e.id||e.name,getPreH:e=>e.preH||0,getPreV:e=>e.preV||0,getHGap:e=>e.hgap||18,getVGap:e=>e.vgap||18,getChildren:e=>e.children,getHeight:e=>e.height||36,getWidth(e){const t=e.label||" ";return e.width||18*t.split("").length}};let _4=class $S{constructor(t,n){if(this.x=0,this.y=0,this.depth=0,this.children=[],this.hgap=0,this.vgap=0,t instanceof $S||"x"in t&&"y"in t&&"children"in t){const o=t;return this.data=o.data,this.id=o.id,this.x=o.x,this.y=o.y,this.width=o.width,this.height=o.height,this.depth=o.depth,this.children=o.children,this.parent=o.parent,this.hgap=o.hgap,this.vgap=o.vgap,this.preH=o.preH,void(this.preV=o.preV)}this.data=t;const r=n.getHGap(t),i=n.getVGap(t);this.preH=n.getPreH(t),this.preV=n.getPreV(t),this.width=n.getWidth(t),this.height=n.getHeight(t),this.width+=this.preH,this.height+=this.preV,this.id=n.getId(t),this.addGap(r,i)}isRoot(){return this.depth===0}isLeaf(){return this.children.length===0}addGap(t,n){this.hgap+=t,this.vgap+=n,this.width+=2*t,this.height+=2*n}eachNode(t){let n,r=[this];for(;n=r.shift();)t(n),r=n.children.concat(r)}DFTraverse(t){this.eachNode(t)}BFTraverse(t){let n,r=[this];for(;n=r.shift();)t(n),r=r.concat(n.children)}getBoundingBox(){const t={left:Number.MAX_VALUE,top:Number.MAX_VALUE,width:0,height:0};return this.eachNode(n=>{t.left=Math.min(t.left,n.x),t.top=Math.min(t.top,n.y),t.width=Math.max(t.width,n.x+n.width),t.height=Math.max(t.height,n.y+n.height)}),t}translate(t=0,n=0){this.eachNode(r=>{r.x+=t,r.y+=n,r.x+=r.preH,r.y+=r.preV})}right2left(){const t=this.getBoundingBox();this.eachNode(n=>{n.x=n.x-2*(n.x-t.left)-n.width}),this.translate(t.width,0)}bottom2top(){const t=this.getBoundingBox();this.eachNode(n=>{n.y=n.y-2*(n.y-t.top)-n.height}),this.translate(0,t.height)}};function Yh(e,t={},n){t=Vh({},pK,t);const r=new _4(e,t),i=[r];let o;if(!n&&!e.collapsed){for(;o=i.shift();)if(!o.data.collapsed){const a=t.getChildren(o.data),s=a?a.length:0;if(o.children=new Array(s),a&&s)for(let c=0;c<s;c++){const l=new _4(a[c],t);o.children[c]=l,i.push(l),l.parent=o,l.depth=o.depth+1}}}return r}let gK=class{constructor(t,n={}){this.options=n,this.rootNode=Yh(t,n)}execute(){throw new Error("please override this method")}};function mK(e,t){const n=Yh(e.data,t,!0),r=Yh(e.data,t,!0),i=e.children.length,o=Math.round(i/2),a=t.getSide||function(s,c){return c<o?"right":"left"};for(let s=0;s<i;s++){const c=e.children[s];a(c,s)==="right"?r.children.push(c):n.children.push(c)}return n.eachNode(s=>{s.isRoot()||(s.side="left")}),r.eachNode(s=>{s.isRoot()||(s.side="right")}),{left:n,right:r}}const sr=["LR","RL","TB","BT","H","V"],yK=["LR","RL","H"],vK=sr[0];function bK(e,t,n){const r=t.direction||vK;if(t.isHorizontal=(o=>yK.indexOf(o)>-1)(r),sr.indexOf(r)===-1)throw new TypeError(`Invalid direction: ${r}`);if(r===sr[0])n(e,t);else if(r===sr[1])n(e,t),e.right2left();else if(r===sr[2])n(e,t);else if(r===sr[3])n(e,t),e.bottom2top();else if(r===sr[4]||r===sr[5]){const{left:o,right:a}=mK(e,t);n(o,t),n(a,t),t.isHorizontal?o.right2left():o.bottom2top(),a.translate(o.x-a.x,o.y-a.y),e.x=o.x,e.y=a.y;const s=e.getBoundingBox();t.isHorizontal?s.top<0&&e.translate(0,-s.top):s.left<0&&e.translate(-s.left,0)}let i=t.fixedRoot;return i===void 0&&(i=!0),i&&e.translate(-(e.x+e.width/2+e.hgap),-(e.y+e.height/2+e.vgap)),(function(o,a){if(a.radial){const[s,c]=a.isHorizontal?["x","y"]:["y","x"],l={x:1/0,y:1/0},u={x:-1/0,y:-1/0};let h=0;o.DFTraverse(g=>{h++;const{x:y,y:m}=g;l.x=Math.min(l.x,y),l.y=Math.min(l.y,m),u.x=Math.max(u.x,y),u.y=Math.max(u.y,m)});const d=u[c]-l[c];if(d===0)return;const f=2*Math.PI/h;o.DFTraverse(g=>{const y=g[c],m=l[c],v=g[s],b=o[s],_=(y-m)/d*(2*Math.PI-f)+f,x=v-b;g.x=Math.cos(_)*x,g.y=Math.sin(_)*x})}})(e,t),e}function x4(e,t){let n=0;return e.children.length?e.children.forEach(r=>{n+=x4(r,t)}):n=e.height,e._subTreeSep=t.getSubTreeSep(e.data),e.totalHeight=Math.max(e.height,n)+2*e._subTreeSep,e.totalHeight}function w4(e){const t=e.children,n=t.length;if(n){t.forEach(s=>{w4(s)});const r=t[0],i=t[n-1],o=i.y-r.y+i.height;let a=0;if(t.forEach(s=>{a+=s.totalHeight}),o>e.height)e.y=r.y+o/2-e.height/2;else if(t.length!==1||e.height>a){const s=e.y+(e.height-o)/2-r.y;t.forEach(c=>{c.translate(0,s)})}else e.y=(r.y+r.height/2+i.y+i.height/2)/2-e.height/2}}const _K={getSubTreeSep:()=>0};function xK(e,t={}){return t=Vh({},_K,t),e.parent={x:0,width:0,height:0,y:0},e.BFTraverse(n=>{n.x=n.parent.x+n.parent.width}),e.parent=void 0,x4(e,t),e.startY=0,e.y=e.totalHeight/2-e.height/2,e.eachNode(n=>{const r=n.children,i=r.length;if(i){const o=r[0];if(o.startY=n.startY+n._subTreeSep,i===1)o.y=n.y+n.height/2-o.height/2;else{o.y=o.startY+o.totalHeight/2-o.height/2;for(let a=1;a<i;a++){const s=r[a];s.startY=r[a-1].startY+r[a-1].totalHeight,s.y=s.startY+s.totalHeight/2-s.height/2}}}}),w4(e),e}class wK extends gK{execute(){return bK(this.rootNode,this.options,xK)}}const PK={};function $K(e,t){const n=Vh({},PK,t);return new wK(e,n).execute()}var CK=Object.defineProperty,OK=Object.defineProperties,SK=Object.getOwnPropertyDescriptors,P4=Object.getOwnPropertySymbols,MK=Object.prototype.hasOwnProperty,EK=Object.prototype.propertyIsEnumerable,$4=(e,t,n)=>t in e?CK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,IK=(e,t)=>{for(var n in t||(t={}))MK.call(t,n)&&$4(e,n,t[n]);if(P4)for(var n of P4(t))EK.call(t,n)&&$4(e,n,t[n]);return e},AK=(e,t)=>OK(e,SK(t));const TK=60,kK=14,C4=30,O4="center",RK="curved",LK=2,zK="node",NK="solid",S4=(e,t=[],n=0)=>{var r,i;const o=[...t,n];return AK(IK({},e),{_indexes:o,children:(i=(r=e.children)==null?void 0:r.map((a,s)=>S4(a,o,s)))!=null?i:[]})},M4=(e,t,n,r)=>{var i,o;t.push(e),(o=(i=e.data)._flatIndex)!=null||(i._flatIndex=t.length-1),r&&n.push({parent:r,child:e});const a=e.children;a==null||a.forEach(s=>M4(s,t,n,e))},HK=(e,t,n,r)=>{const i=Math.abs(n-e)/2,o=n>e?e+i:e-i,a=n>e?n-i:n+i;return`M ${e} ${t} C ${o} ${t} ${a} ${r} ${n} ${r}`},DK=(e,t,n,r)=>`M ${e} ${t} L ${n} ${r}`,qK=(e,t,n,r=O4)=>{const i=l=>Math.max(0,Math.min(1,l)),a=(l=>l==="top"?0:l==="bottom"?1:l==="center"?.5:i(l))(r),s=e.y+e.height*a,c=t.y+t.height*a;return n==="left"?{sx:e.x,sy:s,tx:t.x+t.width,ty:c}:{sx:e.x+e.width,sy:s,tx:t.x,ty:c}},E4=e=>{var t,n;const{Title:r,Items:i,data:o,levelGap:a=TK,nodeGap:s=kK,edgeAlign:c=O4,colorMode:l=zK,edgeColorMode:u=NK,edgeType:h=RK,edgeWidth:d=LK,options:f}=e,{title:g,desc:y,items:m=[]}=o,v=r?p(r,{title:g,desc:y}):null,b=wt(f),_=ae(p(J,{indexes:[0]})),x=new Map;let w=0;if(!m.length||!(i!=null&&i.length))return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[v,p(Y,{children:p(J,{indexes:[0],x:0,y:0})})]});const P=S4(m[0]),$=new WeakMap,C=new WeakMap,M=new WeakMap,S=(N,q)=>{var G;if(l==="group"){const U=String((G=N.group)!=null?G:"");let K=x.get(U);return K==null&&(K=w,x.set(U,K),w+=1),[K]}return J_({depth:q,originalIndexes:N._indexes,flatIndex:N._flatIndex},l)},E=(N,q)=>{const G=M.get(N);if(G)return G;const U=S(N,q),K=je(f,U),ne=Ct({colorPrimary:K},f);return M.set(N,ne),C.set(N,K),ne},I=N=>{const q=$.get(N);if(q)return q;const G=Math.max(N._indexes.length-1,0),U=xs(i,G),K=ae(p(U,{indexes:N._indexes,data:o,datum:N,positionH:"center",positionV:"middle",themeColors:E(N,G)}));return $.set(N,K),K},O=$K(P,{direction:"H",getSide:(N,q)=>{if(!N.parent)return"right";const G=(N.parent.children||[]).indexOf(N);return(G>=0?G:q)%2===0?"left":"right"},getWidth:N=>I(N).width,getHeight:N=>I(N).height,getHGap:()=>a,getVGap:()=>s}),T=[],F=[];M4(O,T,F);const z=T.length>0?Math.min(...T.map(N=>N.x)):0,j=T.length>0?Math.min(...T.map(N=>N.y)):0,H=C4-z,W=C4-j,B=[],X=[],D=[],k=[],A=new WeakMap;T.forEach(N=>{var q,G;const U=N.data,K=I(U),ne=N.x+H+((q=N.hgap)!=null?q:0),ee=N.y+W+((G=N.vgap)!=null?G:0),se=xs(i,N.depth),ce=N.depth===0?"center":N.side==="left"?"flipped":"normal",Z=E(U,N.depth);D.push(p(se,{indexes:U._indexes,data:o,datum:U,x:ne,y:ee,positionH:ce,positionV:"middle",themeColors:Z})),A.set(N,{x:ne,y:ee,width:K.width,height:K.height,centerX:ne+K.width/2,centerY:ee+K.height/2})}),F.forEach(N=>{var q,G,U,K;const{parent:ne,child:ee}=N,se=A.get(ee),ce=A.get(ne);if(!se||!ce)return;const Z=ee.data,{sx:le,sy:te,tx:Q,ty:re}=qK(ce,se,ee.side,c),ie=(q=C.get(Z))!=null?q:je(f,S(Z,ee.depth)),ue=(G=C.get(ne.data))!=null?G:je(f,S(ne.data,ne.depth)),he=h==="straight"?DK(le,te,Q,re):HK(le,te,Q,re),fe=`edge-gradient-${Z._indexes.join("-")}`;X.push(p(Pe,{d:he,stroke:u==="gradient"?`url(#${fe})`:ie!=null?ie:b,strokeWidth:d,fill:"none"})),u==="gradient"&&B.push(R("linearGradient",{id:fe,gradientUnits:"userSpaceOnUse",x1:le,y1:te,x2:Q,y2:re,children:[p("stop",{offset:"0%",stopColor:ue!=null?ue:b}),p("stop",{offset:"100%",stopColor:ie!=null?ie:b})]}));const me=(K=(U=Z.children)==null?void 0:U.length)!=null?K:0,pe=[...Z._indexes,me],_e=se.x+(se.width-_.width)/2,Ce=se.y+se.height+8,Me=Ce+_.height+6;ee.depth>0&&k.push(p(nt,{indexes:Z._indexes,x:_e,y:Ce})),k.push(p(J,{indexes:pe,x:_e,y:Me}))});const L=A.get(O);if(L){const N=O.data,q=(n=(t=N.children)==null?void 0:t.length)!=null?n:0,G=[...N._indexes,q],U=L.x+(L.width-_.width)/2,K=L.y+L.height+8+_.height+6;k.push(p(J,{indexes:G,x:U,y:K}))}return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[v,R(Y,{children:[B.length>0?p(Ke,{children:B}):null,p(Y,{children:X}),p(He,{children:D}),p(qe,{children:k})]})]})};We("hierarchy-mindmap",{component:E4,composites:["title","item"]});const $i=(e,t)=>{if(e[0]!=="#"||e.length!==7)return e;const n=Math.max(0,Math.min(1,t)),r=Math.round(n*255).toString(16).padStart(2,"0");return`${e}${r}`},Ci=e=>e==null?"":String(e),Ks=(e,t,n)=>ae(p(Ne,{fontSize:t,fontWeight:n,children:e})),jK=(e,t,n,r=" ")=>{const i=Ks(r,t,n);let o=i.width,a=i.height;return e.forEach(s=>{const c=Ks(s||" ",t,n);o=Math.max(o,c.width),a=Math.max(a,c.height)}),{width:o,height:a}},I4=(e,t,n,r)=>{const i=jK(e,t,"normal","Item");return{pillWidth:i.width+n*2,pillHeight:i.height+r*2}},A4=e=>{const{Title:t,data:n,options:r,rowGap:i=20,labelGap:o=20,groupGap:a=20,pillGap:s=14,pillColumns:c=2,ungroupedColumns:l=6,layerLabelPosition:u="left",rowPadding:h=20,groupPadding:d=16,labelPaddingX:f=28,labelPaddingY:g=16,pillPaddingX:y=18,pillPaddingY:m=10,labelFontSize:v=20,groupTitleFontSize:b=18,pillFontSize:_=16,groupTitleGap:x=10,rowRadius:w=12,groupRadius:P=10,pillRadius:$=12}=e,{title:C,desc:M,items:S=[]}=n,E=t?p(t,{title:C,desc:M}):null;if(S.length===0)return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[E,p(Y,{children:p(He,{})})]});const I=Ct(r.themeConfig),O=[],T=[],F=u==="right",z=.12,j=.55,H=.08,W=.4,B=.06,X=.35,D=S.map(ee=>{const se=Ci(ee.label),ce=Ks(se||" ",v,"bold"),Z=ce.width+f*2,le=ce.height+g*2,te=ee.children||[];if(te.some(_e=>{var Ce;return(((Ce=_e.children)==null?void 0:Ce.length)||0)>0})){const _e=[];te.forEach(Be=>{(Be.children||[]).forEach(Ye=>{_e.push(Ci(Ye.label))})});const{pillWidth:Ce,pillHeight:Me}=I4(_e,_,y,m),$e=te.map(Be=>{const Ye=Ci(Be.label),de=Ks(Ye||" ",b,"bold"),Te=Be.children||[],ke=Te.length>0?Math.min(c,Te.length):0,oe=ke>0?Math.ceil(Te.length/ke):0,be=ke>0?ke*Ce+(ke-1)*s:0,we=oe>0?oe*Me+(oe-1)*s:0,Ze=Math.max(de.width,be)+d*2,Le=d*2+de.height+(oe>0?x+we:0);return{label:Ye,children:Te,width:Ze,height:Le,titleHeight:de.height,columns:ke,contentWidth:be,pillWidth:Ce,pillHeight:Me}}),Re=$e.reduce((Be,Ye)=>Be+Ye.width,0)+($e.length>1?($e.length-1)*a:0),Fe=$e.reduce((Be,Ye)=>Math.max(Be,Ye.height),0);return{label:se,labelWidth:Z,labelHeight:le,hasGroups:!0,children:te,groupMetrics:$e,contentInnerWidth:Re,contentInnerHeight:Fe}}const re=te.map(_e=>Ci(_e.label)),{pillWidth:ie,pillHeight:ue}=I4(re,_,y,m),he=te.length>0?Math.min(l,te.length):0,fe=he>0?Math.ceil(te.length/he):0,me=he>0?he*ie+(he-1)*s:0,pe=fe>0?fe*ue+(fe-1)*s:0;return{label:se,labelWidth:Z,labelHeight:le,hasGroups:!1,children:te,pillWidth:ie,pillHeight:ue,columns:he,contentInnerWidth:me,contentInnerHeight:pe}}),k=D.reduce((ee,se)=>Math.max(ee,se.labelWidth),0),A=D.reduce((ee,se)=>Math.max(ee,se.contentInnerWidth),0),L=ee=>{const se=je(r,[ee])||I.colorPrimary||"#6c7dff";return{rowFill:$i(se,z),rowStroke:$i(se,j),groupFill:$i(se,H),groupStroke:$i(se,W),pillFill:$i(se,B),pillStroke:$i(se,X)}},N=(ee,se,ce,Z,le,te,Q,re,ie,ue,he,fe,me,pe)=>{O.push(p(ze,{x:ce,y:Q,width:le,height:re,fill:me,stroke:pe,rx:w,ry:w,"data-element-type":"shape"})),O.push(p(ze,{x:ie,y:ue,width:he,height:fe,fill:me,stroke:pe,rx:w,ry:w,"data-element-type":"shape"})),T.push(p(Ne,{x:ce,y:Z,width:le,height:te,fontSize:v,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:I.colorText,"data-element-type":Ue.ItemLabel,"data-indexes":se,children:ee}))},q=(ee,se,ce,Z)=>{const le=ee.groupMetrics||[],te=ee.label,Q=[se],re=k,ie=ee.labelHeight,ue=ee.contentInnerHeight,he=Math.max(0,A-ee.contentInnerWidth),fe=le.length>0?he/le.length:0,pe=ee.contentInnerWidth+(le.length>0?he:0)+h*2,_e=ue+h*2,Ce=Math.max(ie,_e),Me=F?0:re+o,$e=F?Me+pe+o:0,Re=ce+(Ce-ie)/2,Fe=ce+(Ce-_e)/2;N(te,Q,$e,Re,re,ie,ce,Ce,Me,Fe,pe,_e,Z.rowFill,Z.rowStroke);let Be=Me+h;return le.forEach((de,Te)=>{const ke=[...Q,Te],oe=de.width+fe,be=Fe+h+(ue-de.height)/2;O.push(p(ze,{x:Be,y:be,width:oe,height:de.height,fill:Z.groupFill,stroke:Z.groupStroke,rx:P,ry:P,"data-element-type":"shape"}));const we=de.children.length>0,Oe=we?be+d:be,Ze=we?de.titleHeight:de.height,Le=we?"top":"middle";if(T.push(p(Ne,{x:Be+d,y:Oe,width:oe-d*2,height:Ze,fontSize:b,fontWeight:"bold",alignHorizontal:"center",alignVertical:Le,fill:I.colorText,"data-element-type":Ue.ItemLabel,"data-indexes":ke,children:de.label})),de.columns>0){const Ee=oe-d*2,Qe=Ee-de.contentWidth,et=Qe>0?Qe/de.columns:0,Xe=de.pillWidth+et,rt=de.columns*Xe+(de.columns-1)*s,Rt=(Ee-rt)/2,lt=Be+d+Math.max(0,Rt),Bt=be+d+de.titleHeight+x;de.children.forEach((Ge,$t)=>{const Ut=[...ke,$t],Mt=Math.floor($t/de.columns),Ln=$t%de.columns,dr=lt+Ln*(Xe+s),Zr=Bt+Mt*(de.pillHeight+s),Qr=Math.min($,de.pillHeight/2);O.push(p(ze,{x:dr,y:Zr,width:Xe,height:de.pillHeight,fill:Z.pillFill,stroke:Z.pillStroke,rx:Qr,ry:Qr,"data-element-type":"shape"})),T.push(p(Ne,{x:dr,y:Zr,width:Xe,height:de.pillHeight,fontSize:_,fontWeight:"normal",alignHorizontal:"center",alignVertical:"middle",fill:I.colorText,"data-element-type":Ue.ItemLabel,"data-indexes":Ut,children:Ci(Ge.label)}))})}Be+=oe+a}),{rowWidth:F?$e+re:Me+pe,rowHeight:Ce}},G=(ee,se,ce,Z)=>{const le=ee.label,te=[se],Q=k,re=ee.labelHeight,ie=ee.contentInnerHeight,ue=Math.max(0,A-ee.contentInnerWidth),he=ee.columns||0,fe=ee.pillWidth||0,me=ee.pillHeight||0,pe=he>0?ue/he:0,_e=fe+pe,Me=(he>0?he*_e+(he-1)*s:0)+h*2,$e=ie+h*2,Re=Math.max(re,$e),Fe=F?0:Q+o,Be=F?Fe+Me+o:0,Ye=ce+(Re-re)/2,de=ce+(Re-$e)/2;if(N(le,te,Be,Ye,Q,re,ce,Re,Fe,de,Me,$e,Z.rowFill,Z.rowStroke),he>0){const ke=Fe+h,oe=de+h;(ee.children||[]).forEach((we,Oe)=>{const Ze=[...te,Oe],Le=Math.floor(Oe/he),Ee=Oe%he,Qe=ke+Ee*(_e+s),et=oe+Le*(me+s),Xe=Math.min($,me/2);O.push(p(ze,{x:Qe,y:et,width:_e,height:me,fill:Z.pillFill,stroke:Z.pillStroke,rx:Xe,ry:Xe,"data-element-type":"shape"})),T.push(p(Ne,{x:Qe,y:et,width:_e,height:me,fontSize:_,fontWeight:"normal",alignHorizontal:"center",alignVertical:"middle",fill:I.colorText,"data-element-type":Ue.ItemLabel,"data-indexes":Ze,children:Ci(we.label)}))})}return{rowWidth:F?Be+Q:Fe+Me,rowHeight:Re}};let U=0,K=0;D.forEach((ee,se)=>{const ce=L(se),{rowWidth:Z,rowHeight:le}=ee.hasGroups?q(ee,se,U,ce):G(ee,se,U,ce);K=Math.max(K,Z),U+=le+i});const ne=Math.max(U-i,0);return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[E,R(Y,{width:K,height:ne,children:[p(Y,{children:O}),p(He,{children:T})]})]})};We("hierarchy-structure",{component:A4,composites:["title"]});var FK=Object.defineProperty,BK=Object.defineProperties,WK=Object.getOwnPropertyDescriptors,T4=Object.getOwnPropertySymbols,GK=Object.prototype.hasOwnProperty,VK=Object.prototype.propertyIsEnumerable,k4=(e,t,n)=>t in e?FK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zs=(e,t)=>{for(var n in t||(t={}))GK.call(t,n)&&k4(e,n,t[n]);if(T4)for(var n of T4(t))VK.call(t,n)&&k4(e,n,t[n]);return e},Qs=(e,t)=>BK(e,WK(t));const R4=(e,t)=>{const n=Math.max(0,t/2-1);return Math.min(e,n)},L4=e=>{const{Title:t,Items:n,data:r,levelGap:i=80,nodeGap:o=60,edgeType:a="straight",edgeColorMode:s="gradient",edgeWidth:c=3,edgeStyle:l="solid",edgeDashPattern:u="5,5",edgeCornerRadius:h=0,edgeOffset:d=0,edgeOrigin:f="center",edgeOriginPadding:g=20,edgeMarker:y="none",markerSize:m=12,colorMode:v="branch",orientation:b="top-bottom",options:_}=e,x=b==="left-right"||b==="right-left",w=b==="bottom-top"||b==="right-left"?-1:1,{title:P,desc:$}=r,C=wt(_),M=new Map;let S=0;const E=Q=>{var re;const ie=[...Q];return(re=ie[0])!=null&&re.children||(ie[0]=Qs(Zs({},ie[0]),{children:ie.slice(1)}),ie.splice(1)),ie},I=(Q,re,ie,ue,he,fe="vertical")=>{const me=fe==="vertical",pe=me?ue-re:ie-Q,_e=me?ie-Q:ue-re,Ce=pe===0?1:Math.sign(pe),Me=_e===0?1:Math.sign(_e),$e=me?re+pe/2:Q+pe/2,Re=Math.min(he,Math.abs(pe)/2,Math.abs(_e)/2);return Re===0?me?`M ${Q} ${re} L ${Q} ${$e} L ${ie} ${$e} L ${ie} ${ue}`:`M ${Q} ${re} L ${$e} ${re} L ${$e} ${ue} L ${ie} ${ue}`:me?`M ${Q} ${re}
93
+ L ${Q} ${$e-Ce*Re}
94
+ Q ${Q} ${$e} ${Q+Me*Re} ${$e}
95
+ L ${ie-Me*Re} ${$e}
96
+ Q ${ie} ${$e} ${ie} ${$e+Ce*Re}
97
+ L ${ie} ${ue}`:`M ${Q} ${re}
98
+ L ${$e-Ce*Re} ${re}
99
+ Q ${$e} ${re} ${$e} ${re+Me*Re}
100
+ L ${$e} ${ue-Me*Re}
101
+ Q ${$e} ${ue} ${$e+Ce*Re} ${ue}
102
+ L ${ie} ${ue}`},O=Q=>{const{x:re,y:ie}=Q;return x?{x:ie*w,y:re}:{x:re,y:ie*w}},T=(Q,re,ie)=>{const{x:ue,y:he}=O(Q),fe=ue+ie.x,me=he+ie.y,pe=me+re.height/2;return{centerX:fe,centerY:pe,left:fe-re.width/2,right:fe+re.width/2,top:me,bottom:me+re.height}},F=Q=>{var re;if(!Q.length)return null;const ie=Q[0],ue=(he,fe=[],me=0)=>{var pe,_e;const Ce=[...fe,me];return Qs(Zs({},he),{_originalIndex:Ce,_depth:Ce.length-1,children:(_e=(pe=he.children)==null?void 0:pe.map((Me,$e)=>ue(Me,Ce,$e)))!=null?_e:[]})};return(re=ie.children)!=null&&re.length?ue(ie):Qs(Zs({},ie),{_originalIndex:[0],_depth:0,children:Q.slice(1).map((he,fe)=>Qs(Zs({},he),{_originalIndex:[fe+1],_depth:1}))})},z=Q=>{var re,ie;let ue=0,he=0;const fe=new Map,me=new Map;Q.each(pe=>{me.has(pe.depth)||me.set(pe.depth,pe.data)});for(let pe=0;pe<Q.height+1;pe++){const _e=xs(n,pe),Ce=(re=me.get(pe))!=null?re:{},Me=(ie=Ce._originalIndex)!=null?ie:Array(pe+1).fill(0),$e=ae(p(_e,{indexes:Me,data:r,datum:Ce,positionH:"center"}));fe.set(pe,$e),ue=Math.max(ue,$e.width),he=Math.max(he,$e.height)}return{levelBounds:fe,maxWidth:ue,maxHeight:he}},j=(Q,re)=>{var ie;if(v==="group"){const ue=String((ie=Q==null?void 0:Q.group)!=null?ie:"");let he=M.get(ue);return he==null&&(he=S,M.set(ue,he),S+=1),[he]}return J_({depth:re,originalIndexes:Q._originalIndex,flatIndex:Q._flatIndex},v)},H=(Q,re,ie,ue,he,fe)=>{const{depth:me,data:pe,parent:_e}=Q,Ce=pe._originalIndex,Me=xs(n,me),$e=re.get(me),Re=T(Q,$e,ue),Fe=Re.left,Be=Re.top,Ye={items:[],btns:[],deco:[]},de=j(pe,me),Te=je(_,de),ke=Ct({colorPrimary:Te},_);if(Ye.items.push(p(Me,{indexes:Ce,datum:pe,data:r,x:Fe,y:Be,positionH:"center",themeColors:ke})),Ye.btns.push(p(nt,{indexes:Ce,x:Fe+($e.width-ie.width)/2,y:Be+$e.height+5}),p(J,{indexes:[...Ce,0],x:Fe+($e.width-ie.width)/2,y:Be+$e.height+ie.height+10})),_e){const oe=re.get(_e.depth),be=T(_e,oe,ue),we=fe.filter(Ge=>Ge.parent===_e),Oe=we.findIndex(Ge=>Ge===Q),Ze=we.length;let Le,Ee;if(f==="distributed"&&Ze>1)if(x){const Ge=R4(g,oe.height),$t=be.top+Ge,Mt=(be.bottom-Ge-$t)/Ze;Ee=$t+Mt*Oe+Mt/2,Le=(w>0?be.right:be.left)+d*w}else{const Ge=R4(g,oe.width),$t=be.left+Ge,Mt=(be.right-Ge-$t)/Ze;Le=$t+Mt*Oe+Mt/2,Ee=(w>0?be.bottom:be.top)+d*w}else Le=x?(w>0?be.right:be.left)+d*w:be.centerX,Ee=x?be.centerY:(w>0?be.bottom:be.top)+d*w;const Qe=x?(w>0?Re.left:Re.right)-d*w:Re.centerX,et=x?Re.centerY:(w>0?Re.top:Re.bottom)-d*w;let Xe=Qe,rt=et;y==="arrow"&&(x?Xe-=m*w:rt-=m*w);let Rt;if(a==="curved")if(x){const Ge=Le+(Xe-Le)/2;Rt=`M ${Le} ${Ee} C ${Ge} ${Ee}, ${Ge} ${rt}, ${Xe} ${rt}`}else{const Ge=Ee+(rt-Ee)/2;Rt=`M ${Le} ${Ee} C ${Le} ${Ge}, ${Xe} ${Ge}, ${Xe} ${rt}`}else if(h>0)Rt=I(Le,Ee,Xe,rt,h,x?"horizontal":"vertical");else if(x){const Ge=Le+(Xe-Le)/2;Rt=`M ${Le} ${Ee} L ${Ge} ${Ee} L ${Ge} ${rt} L ${Xe} ${rt}`}else{const Ge=Ee+(rt-Ee)/2;Rt=`M ${Le} ${Ee} L ${Le} ${Ge} L ${Xe} ${Ge} L ${Xe} ${rt}`}let lt=C;if(s==="gradient"){const Ge=j(_e.data,_e.depth),$t=j(pe,me),Ut=je(_,Ge),Mt=je(_,$t),Ln=`gradient-${_e.data._originalIndex.join("-")}-${Ce.join("-")}`;he.push(R("linearGradient",{id:Ln,x1:Le,y1:Ee,x2:Xe,y2:rt,gradientUnits:"userSpaceOnUse",children:[p("stop",{offset:"0%",stopColor:Ut}),p("stop",{offset:"100%",stopColor:Mt})]})),lt=`url(#${Ln})`}const Bt=l==="dashed"?u:"";if(Ye.deco.push(p(Pe,{d:Rt,stroke:lt,strokeWidth:c,strokeDasharray:Bt,fill:"none"})),y==="arrow"){const Ge=s==="gradient"?je(_,de):wt(_),$t=x?[{x:Qe,y:et},{x:Qe-m*w,y:et-m/2},{x:Qe-m*w,y:et+m/2}]:[{x:Qe,y:et},{x:Qe-m/2,y:et-m*w},{x:Qe+m/2,y:et-m*w}];Ye.deco.push(p(Wt,{points:$t,fill:Ge,width:m,height:m}))}if(y==="dot"){const Ge=j(_e.data,_e.depth),$t=s==="gradient"?je(_,Ge):wt(_);Ye.deco.push(p(Je,{x:(x?w>0?be.right+d:be.left-d:Le)-m,y:(x?Ee:w>0?be.bottom+d:be.top-d)-m,width:m*2,height:m*2,fill:$t}));const Ut=s==="gradient"?je(_,de):wt(_);Ye.deco.push(p(Je,{x:Qe-m,y:et-m,width:m*2,height:m*2,fill:Ut}))}}return Ye},W=(Q,re,ie)=>{const ue=new Map;Q.forEach(fe=>{var me;const pe=fe.parent?fe.parent.data._originalIndex.join("-"):"root";((me=ue.get(pe))!=null?me:ue.set(pe,[]).get(pe)).push(fe)});const he=[];return ue.forEach(fe=>{if(fe.length<=1)return;const me=fe.slice().sort((pe,_e)=>x?O(pe).y-O(_e).y:O(pe).x-O(_e).x);if(me.length!==0)for(let pe=0;pe<me.length-1;pe++){const _e=O(me[pe]),Ce=O(me[pe+1]),Me=me[pe].data._originalIndex.slice(0,-1),$e=me[pe].data._originalIndex.at(-1)+1;if(x){const Re=_e.x+ie.x+(w>0?-re.width-5:re.width+5),Fe=(_e.y+Ce.y)/2+ie.y-re.height/2;he.push(p(J,{indexes:[...Me,$e],x:Re,y:Fe}))}else{const Re=_e.y+ie.y-re.height-5,Fe=(_e.x+Ce.x)/2+ie.x-re.width/2;he.push(p(J,{indexes:[...Me,$e],x:Fe,y:Re}))}}}),he},B=E(r.items),X=t?p(t,{title:P,desc:$}):null,D=ae(p(J,{indexes:[0]}));if(!B.length)return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[X,p(Y,{children:p(qe,{children:p(J,{indexes:[0],x:-D.width/2,y:-D.height/2})})})]});const k=F(B),A=Lh(k),{levelBounds:L,maxWidth:N,maxHeight:q}=z(A),U=AY().nodeSize(x?[q+o,N+i]:[N+o,q+i]).separation(()=>1)(A).descendants(),K=U.map(Q=>O(Q)),ne=Math.min(...K.map(Q=>Q.x)),ee=Math.min(...K.map(Q=>Q.y)),se={x:Math.max(0,-ne+N/2),y:Math.max(0,-ee+D.height+10)},ce=[],Z=[],le=[],te=[];return U.forEach((Q,re)=>{Q.data._flatIndex=re;const{x:ie,y:ue}=O(Q);Q.__layout={x:ie,y:ue}}),U.forEach(Q=>{const{items:re,btns:ie,deco:ue}=H(Q,L,D,se,te,U);ce.push(...re),Z.push(...ie),le.push(...ue)}),Z.push(...W(U,D,se)),R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[X,R(Y,{children:[te.length>0&&p(Ke,{children:te}),p(xt,{children:le}),p(He,{children:ce}),p(qe,{children:Z})]})]})};We("hierarchy-tree",{component:L4,composites:["title","item"]});const z4=e=>{const{Title:t,Item:n,data:r,gap:i=20,width:o,zigzag:a}=e,{title:s,desc:c,items:l=[]}=r,u=ae(p(J,{indexes:[0]})),h=ae(p(n,{indexes:[0],data:r,datum:l[0]})),d=o||h.width,f=t?p(t,{title:s,desc:c}):null,g=[],y=[],m=(d-u.width)/2;if(l.forEach((v,b)=>{const _=(h.height+i)*b,x=[b];y.push(p(n,{indexes:x,datum:v,data:r,y:_,width:d,positionV:"middle",positionH:a?b%2===0?"normal":"flipped":"normal"})),g.push(p(nt,{indexes:x,x:-u.width-10,y:_+(h.height-u.height)/2}));const w=b===0?-u.height:_-i/2-u.height/2;g.push(p(J,{indexes:x,x:m,y:w}))}),l.length>0){const b=(h.height+i)*(l.length-1)+h.height;g.push(p(J,{indexes:[l.length],x:m,y:b}))}return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,R(Y,{children:[p(He,{children:y}),p(qe,{children:g})]})]})};We("list-column",{component:z4,composites:["title","item"]});const N4=e=>{const{Title:t,Item:n,data:r,columns:i=3,gap:o=24,zigzag:a}=e,{title:s,desc:c,items:l=[]}=r,u=t?p(t,{title:s,desc:c}):null,h=ae(p(J,{indexes:[0]})),d=ae(p(n,{indexes:[0],data:r,datum:l[0],positionH:"center"})),f=[],g=[],y=d.height+o,m=d.width+o,v=new Set;return l.forEach((b,_)=>{const x=Math.floor(_/i),w=_%i,P=w*m,$=x*y,C=[_];g.push(p(n,{indexes:C,datum:b,data:r,x:P,y:$,positionH:"center",positionV:a&&_%2===0?"normal":"flipped"})),f.push(p(nt,{indexes:C,x:P+(d.width-h.width)/2,y:$+d.height})),w<i-1&&f.push(p(J,{indexes:[_+1],x:P+d.width+(o-h.width)/2,y:$+(d.height-h.height)/2})),w===0&&!v.has(x)&&(f.push(p(J,{indexes:[_],x:P-o/2-h.width/2,y:$+(d.height-h.height)/2})),v.add(x)),(w===i-1||_===l.length-1)&&f.push(p(J,{indexes:[_+1],x:P+d.width+o/2-h.width/2,y:$+(d.height-h.height)/2}))}),R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[u,R(Y,{children:[p(He,{children:g}),p(qe,{children:f})]})]})};We("list-grid",{component:N4,composites:["title","item"]});const H4=e=>{const{Title:t,Item:n,data:r,gap:i=20,levelGap:o=20}=e,{title:a,desc:s,items:c=[]}=r,l=t?p(t,{title:a,desc:s}):null,u=ae(p(J,{indexes:[0]})),h=ae(p(n,{indexes:[0],data:r,datum:c[0],positionH:"center"})),d=[],f=[],g=Math.ceil(Math.sqrt(c.length)),y=[];let m=c.length;for(let w=0;w<g;w++){const P=Math.min(w+1,m);if(y.push(P),m-=P,m<=0)break}let v=0;const b=Math.max(...y),x=(b*h.width+(b-1)*i)/2;return y.forEach((w,P)=>{const $=P*(h.height+o),C=w*h.width+(w-1)*i,M=x-C/2;for(let S=0;S<w&&v<c.length;S++){const E=M+S*(h.width+i),I=c[v],O=[v];f.push(p(n,{indexes:O,datum:I,data:r,x:E,y:$,positionH:"center"})),d.push(p(nt,{indexes:O,x:E+(h.width-u.width)/2,y:$+h.height})),S<w-1&&d.push(p(J,{indexes:[v+1],x:E+h.width+(i-u.width)/2,y:$+(h.height-u.height)/2})),S===0&&d.push(p(J,{indexes:[v],x:E-i/2-u.width/2,y:$+(h.height-u.height)/2})),S===w-1&&d.push(p(J,{indexes:[v+1],x:E+h.width+i/2-u.width/2,y:$+(h.height-u.height)/2})),v++}}),R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[l,R(Y,{children:[p(He,{children:f}),p(qe,{children:d})]})]})};We("list-pyramid",{component:H4,composites:["title","item"]});const D4=e=>{const{Title:t,Item:n,data:r,gap:i=20,zigzag:o}=e,{title:a,desc:s,items:c=[]}=r,l=t?p(t,{title:a,desc:s}):null,u=ae(p(J,{indexes:[0]})),h=ae(p(n,{indexes:[0],data:r,datum:c[0],positionH:"center"})),d=[],f=[],g=(h.height-u.height)/2,y=h.height;if(c.forEach((m,v)=>{const b=(h.width+i)*v,_=[v];f.push(p(n,{indexes:_,datum:m,data:r,x:b,positionH:"center",positionV:o&&v%2===0?"normal":"flipped"})),d.push(p(nt,{indexes:_,x:b+(h.width-u.width)/2,y}));const x=v===0?-(i+u.width)/2:b-(i+u.width)/2;d.push(p(J,{indexes:_,x,y:g}))}),c.length>0){const v=(h.width+i)*(c.length-1)+h.width+(i-u.width)/2;d.push(p(J,{indexes:[c.length],x:v,y:g}))}return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[l,R(Y,{children:[p(He,{children:f}),p(qe,{children:d})]})]})};We("list-row",{component:D4,composites:["title","item"]});var YK=Object.defineProperty,q4=Object.getOwnPropertySymbols,XK=Object.prototype.hasOwnProperty,UK=Object.prototype.propertyIsEnumerable,j4=(e,t,n)=>t in e?YK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,KK=(e,t)=>{for(var n in t||(t={}))XK.call(t,n)&&j4(e,n,t[n]);if(q4)for(var n of q4(t))UK.call(t,n)&&j4(e,n,t[n]);return e};const F4=e=>{const{Item:t,data:n,outerRadius:r=250,innerRadius:i=120,startAngle:o=-90,endAngle:a=270,gapAngle:s=1,options:c}=e,{title:l,items:u=[]}=n,h=Ct(c.themeConfig),d=ae(p(J,{indexes:[0]})),f=[],g=[],y=[],m=r+100,v=r+100,b=a-o,_=Math.abs(b-360)<.01,x=u.length>0?s*(_?u.length:u.length-1):0,w=b-x,P=u.length>0?w/u.length:0;if(u.forEach((O,T)=>{var F;const z=[T],j=o+(P+s)*T,H=j+P,B=s*Math.PI*r/180/i*(180/Math.PI),X=s,D=(j+X/2)*Math.PI/180,k=(H-X/2)*Math.PI/180,A=(j+B/2)*Math.PI/180,L=(H-B/2)*Math.PI/180,N=m+r*Math.cos(D),q=v+r*Math.sin(D),G=m+r*Math.cos(k),U=v+r*Math.sin(k),K=m+i*Math.cos(A),ne=v+i*Math.sin(A),ee=m+i*Math.cos(L),se=v+i*Math.sin(L),ce=P>180?1:0,Z=`
103
+ M ${N} ${q}
104
+ A ${r} ${r} 0 ${ce} 1 ${G} ${U}
105
+ L ${ee} ${se}
106
+ A ${i} ${i} 0 ${ce} 0 ${K} ${ne}
107
107
  Z
108
- `.trim(),J=It(l,L);y.push(d(yt,{id:"shape-sector",d:nt,fill:J,width:r*2+200,height:r*2+200,"data-element-type":"shape"}));const st=(D+$/2)*Math.PI/180,vt=(r+i)/2,gt=r-i,ut=$*Math.PI/180,ot=vt*ut,ft=Math.min(ot*.8,gt*.9),mt=Math.min(gt*.9,ot*.8),wt=et(d(e,{indexes:[0],data:n,datum:h[0],positionH:"center",width:ft,height:mt})),pt=m+vt*Math.cos(st)-wt.width/2,_t=x+vt*Math.sin(st)-wt.height/2;g.push(d(e,{indexes:L,datum:O,data:n,x:pt,y:_t,positionH:"center",width:ft,height:mt,themeColors:vH({},ge({colorBg:It(l,L),colorPrimary:((F=l.themeConfig)==null?void 0:F.colorBg)||"white"}))}));const Rt=r+10,Vt=m+Rt*Math.cos(st)-f.width/2,ee=x+Rt*Math.sin(st)-f.height/2;if(p.push(d(Yt,{indexes:L,x:Vt,y:ee})),b||A<h.length-1){const Ht=(k+a/2)*Math.PI/180,he=vt,kt=m+he*Math.cos(Ht)-f.width/2,Lt=x+he*Math.sin(Ht)-f.height/2;p.push(d(U,{indexes:[A+1],x:kt,y:Lt}))}}),h.length>0){const A=(o-a/2)*Math.PI/180,F=(r+i)/2,L=m+F*Math.cos(A)-f.width/2,D=x+F*Math.sin(A)-f.height/2;p.push(d(U,{indexes:[0],x:L,y:D}))}const P=i*.9;let C=m,T=x,E=P*1.4,S=P*1.4;if(!b){const A=(o+s)/2*Math.PI/180,F=P*.5;C=m+F*Math.cos(A),T=x+F*Math.sin(A);const L=v*Math.PI*F/180;E=Math.min(L*.8,P*1.4),S=Math.min(F*1.5,P*1.4)}let R="";if(b)R="";else{const O=o*Math.PI/180,A=s*Math.PI/180,F=m+P*Math.cos(O),L=x+P*Math.sin(O),D=m+P*Math.cos(A),k=x+P*Math.sin(A),N=v>180?1:0;R=`
109
- M ${m} ${x}
110
- L ${F} ${L}
111
- A ${P} ${P} 0 ${N} 1 ${D} ${k}
108
+ `.trim(),le=je(c,z);y.push(p(Pe,{id:"shape-sector",d:Z,fill:le,width:r*2+200,height:r*2+200,"data-element-type":"shape"}));const Q=(j+P/2)*Math.PI/180,re=(r+i)/2,ie=r-i,ue=P*Math.PI/180,he=re*ue,fe=Math.min(he*.8,ie*.9),me=Math.min(ie*.9,he*.8),pe=ae(p(t,{indexes:[0],data:n,datum:u[0],positionH:"center",width:fe,height:me})),_e=m+re*Math.cos(Q)-pe.width/2,Ce=v+re*Math.sin(Q)-pe.height/2;g.push(p(t,{indexes:z,datum:O,data:n,x:_e,y:Ce,positionH:"center",width:fe,height:me,themeColors:KK({},Ct({colorBg:je(c,z),colorPrimary:((F=c.themeConfig)==null?void 0:F.colorBg)||"white"}))}));const Me=r+10,$e=m+Me*Math.cos(Q)-d.width/2,Re=v+Me*Math.sin(Q)-d.height/2;if(f.push(p(nt,{indexes:z,x:$e,y:Re})),_||T<u.length-1){const Be=(H+s/2)*Math.PI/180,Ye=re,de=m+Ye*Math.cos(Be)-d.width/2,Te=v+Ye*Math.sin(Be)-d.height/2;f.push(p(J,{indexes:[T+1],x:de,y:Te}))}}),u.length>0){const T=(o-s/2)*Math.PI/180,F=(r+i)/2,z=m+F*Math.cos(T)-d.width/2,j=v+F*Math.sin(T)-d.height/2;f.push(p(J,{indexes:[0],x:z,y:j}))}const $=i*.9;let C=m,M=v,S=$*1.4,E=$*1.4;if(!_){const T=(o+a)/2*Math.PI/180,F=$*.5;C=m+F*Math.cos(T),M=v+F*Math.sin(T);const z=b*Math.PI*F/180;S=Math.min(z*.8,$*1.4),E=Math.min(F*1.5,$*1.4)}let I="";if(_)I="";else{const O=o*Math.PI/180,T=a*Math.PI/180,F=m+$*Math.cos(O),z=v+$*Math.sin(O),j=m+$*Math.cos(T),H=v+$*Math.sin(T),W=b>180?1:0;I=`
109
+ M ${m} ${v}
110
+ L ${F} ${z}
111
+ A ${$} ${$} 0 ${W} 1 ${j} ${H}
112
112
  Z
113
- `.trim()}return I(Y,{id:"infographic-container",children:[d(Y,{children:y}),b?d(Wt,{id:"shape-center-circle",x:m-P,y:x-P,width:P*2,height:P*2,fill:u.colorPrimaryBg,fillOpacity:.5,"data-element-type":"shape"}):d(yt,{id:"shape-center-sector",d:R,fill:u.colorPrimaryBg,fillOpacity:.5,width:r*2+200,height:r*2+200,"data-element-type":"shape"}),d(St,{x:C-E/2,y:T-S/2,width:E,height:S,alignHorizontal:"center",alignVertical:"middle",fontSize:24,fontWeight:"bold",fill:u.colorText,"data-element-type":zt.Title,children:c}),d(Ot,{children:g}),d(Et,{children:p})]})};Tt("list-sector",{component:vy,composites:["title","item"]});const xy=t=>{const{Title:e,Item:n,data:r,columns:i=4,gap:o=20,stepOffset:s=40}=t,{title:a,desc:l,items:c=[]}=r,h=e?d(e,{title:a,desc:l}):null,u=et(d(U,{indexes:[0]})),f=et(d(n,{indexes:[0],data:r,datum:c[0],positionH:"center"})),p=[],g=[],y=f.width+o;return c.forEach((m,x)=>{const v=x%i,b=Math.floor(x/i),w=v*y,_=b*(f.height+o),$=v*s,P=_+$,C=[x];g.push(d(n,{indexes:C,datum:m,data:r,x:w,y:P,positionH:"center"})),p.push(d(Yt,{indexes:C,x:w+(f.width-u.width)/2,y:P+f.height+5}))}),c.forEach((m,x)=>{const v=x%i,b=Math.floor(x/i),w=v*y,_=b*(f.height+o),$=v*s,P=_+$;if(x===0&&p.push(d(U,{indexes:[0],x:w-o/2-u.width/2,y:P+(f.height-u.height)/2})),v<i-1&&x<c.length-1){const C=Math.floor((x+1)/i);b===C&&p.push(d(U,{indexes:[x+1],x:w+f.width+(o-u.width)/2,y:P+(f.height-u.height)/2}))}(v===i-1||x===c.length-1)&&p.push(d(U,{indexes:[x+1],x:w+f.width+(o-u.width)/2,y:P+(f.height-u.height)/2}))}),c.length===0&&p.push(d(U,{indexes:[0],x:(i-1)*y/2+(f.width-u.width)/2,y:0})),I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,I(Y,{children:[d(Ot,{children:g}),d(Et,{children:p})]})]})};Tt("list-waterfall",{component:xy,composites:["title","item"]});const xH=6,xh=700,by=330,wy=333,bH={1:[{x:.5,y:.6,anchor:"top-right"}],2:[{x:.42,y:.5,anchor:"top-right"},{x:.72,y:.4,anchor:"bottom"}],3:[{x:.3,y:.5,anchor:"top-right"},{x:.48,y:.3,anchor:"bottom-left"},{x:.8,y:.75,anchor:"top-right"}],4:[{x:.3,y:.5,anchor:"top-right"},{x:.35,y:.2,anchor:"bottom-left"},{x:.65,y:.73,anchor:"top-right"},{x:.8,y:.52,anchor:"bottom-left"}],5:[{x:.19,y:.4,anchor:"top-right"},{x:.38,y:.2,anchor:"bottom"},{x:.52,y:.62,anchor:"top-right"},{x:.7,y:.43,anchor:"bottom"},{x:.82,y:.8,anchor:"top-right"}],6:[{x:.16,y:.35,anchor:"top-right"},{x:.38,y:.2,anchor:"bottom"},{x:.48,y:.54,anchor:"top-right"},{x:.55,y:.43,anchor:"bottom-left"},{x:.8,y:.75,anchor:"top-right"},{x:.86,y:.65,anchor:"bottom-left"}]},wH={1:[{x:.5,y:.4,anchor:"bottom-right"}],2:[{x:.42,y:.5,anchor:"bottom-right"},{x:.72,y:.6,anchor:"top"}],3:[{x:.3,y:.5,anchor:"bottom-right"},{x:.48,y:.7,anchor:"top-left"},{x:.8,y:.25,anchor:"bottom-right"}],4:[{x:.3,y:.5,anchor:"bottom-right"},{x:.35,y:.8,anchor:"top-left"},{x:.65,y:.27,anchor:"bottom-right"},{x:.8,y:.48,anchor:"top-left"}],5:[{x:.19,y:.6,anchor:"bottom-right"},{x:.38,y:.8,anchor:"top"},{x:.52,y:.38,anchor:"bottom-right"},{x:.7,y:.57,anchor:"top"},{x:.82,y:.2,anchor:"bottom-right"}],6:[{x:.16,y:.65,anchor:"bottom-right"},{x:.38,y:.8,anchor:"top"},{x:.48,y:.46,anchor:"bottom-right"},{x:.55,y:.57,anchor:"top-left"},{x:.8,y:.25,anchor:"bottom-right"},{x:.86,y:.35,anchor:"top-left"}]},_y=(t,e,n)=>{const r=e[t];return r?r.map(i=>({x:i.x*xh,y:i.y*n,anchor:i.anchor})):null},_H=(t,e)=>{const n=t.anchor||"center";let r=t.x-e.width/2,i=t.y-e.height/2,o=t.y;switch(n){case"top":r=t.x-e.width/2,i=t.y,o=t.y+e.height/2;break;case"bottom":r=t.x-e.width/2,i=t.y-e.height,o=t.y-e.height/2;break;case"top-left":r=t.x,i=t.y,o=t.y+e.height/2;break;case"top-right":r=t.x-e.width,i=t.y,o=t.y+e.height/2;break;case"bottom-left":r=t.x,i=t.y-e.height,o=t.y-e.height/2;break;case"bottom-right":r=t.x-e.width,i=t.y-e.height,o=t.y-e.height/2;break}return{x:r,y:i,centerY:o}},bh=(t,e)=>{const n=e.x-t.x,r=e.y-t.y,i=Math.hypot(n,r)||1;return{x:n/i,y:r/i}},$y=t=>{const{presetRatios:e,arrowHeight:n,Arrow:r}=t;return o=>{var s;const{Title:a,Item:l,data:c,options:h,itemGap:u=24}=o,{title:f,desc:p,items:g=[]}=c,y=Math.min(g.length,xH),m=g.slice(0,y),x=a?d(a,{title:f,desc:p}):null,v=ce(h),w=ge({colorPrimary:v},h).colorTextSecondary||"#737373",_=et(d(U,{indexes:[0]}));if(g.length===0){const L=(s=_y(1,e,n))==null?void 0:s[0];if(!L)return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[x,d(Y,{children:d(r,{colorPrimary:v,colorShadow:w})})]});const D=L.x-_.width/2,k=L.y-_.height/2;return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[x,I(Y,{children:[d(r,{colorPrimary:v,colorShadow:w}),d(Ot,{}),d(Et,{children:d(U,{indexes:[0],x:D,y:k})})]})]})}const $=et(d(l,{indexes:[0],data:c,datum:g[0],positionH:"center"})),P=[],C=[],T=_y(y,e,n);if(!T)return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[x,I(Y,{children:[d(r,{colorPrimary:v,colorShadow:w}),d(Ot,{})]})]});const E=T,S=E.length>1?bh(E[0],E[E.length-1]):{x:1,y:0},R=E.length>1?bh(E[0],E[1]):S,O=E.length>1?bh(E[E.length-2],E[E.length-1]):S,A=Math.max($.width,$.height)*.45+u,F=L=>{const{x:D,y:k,centerY:N}=_H(L,$);return{x:D,y:k,centerY:N}};if(E.forEach((L,D)=>{const k=F(L),N=k.centerY<n/2,j=[D],X=m[D];if(!X)return;C.push(d(l,{indexes:j,datum:X,data:c,x:k.x,y:k.y,positionH:"center"}));const z=k.x+$.width-_.width/2,M=N?k.y-_.height/2:k.y+$.height-_.height/2;P.push(d(Yt,{indexes:j,x:z,y:M}))}),E.length>0){const L=E[0],D=L.x-R.x*A-_.width/2,k=L.y-R.y*A-_.height/2;P.push(d(U,{indexes:[0],x:D,y:k}));for(let z=0;z<E.length-1;z++){const M=E[z],H=E[z+1],B=(M.x+H.x)/2,q=(M.y+H.y)/2,V=B-_.width/2,G=q-_.height/2;P.push(d(U,{indexes:[z+1],x:V,y:G}))}const N=E[E.length-1],j=N.x+O.x*A-_.width/2,X=N.y+O.y*A-_.height/2;P.push(d(U,{indexes:[y],x:j,y:X}))}return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[x,I(Y,{children:[d(r,{colorPrimary:v,colorShadow:w}),d(Ot,{children:C}),d(Et,{children:P})]})]})}},$H=({colorPrimary:t="#17CA2C",colorShadow:e="#737373"})=>{const n=lt(t).darken(20).toHexString();return I(Y,{width:xh,height:by,children:[d("path",{d:"M228.864 159.446C230.266 159.446 231.623 158.768 232.689 157.535L274.263 110.162L265.717 102.923L227.311 148.082C225.977 149.623 224.281 150.47 222.529 150.47H175.404L182.03 158.367C182.795 159.445 182.795 159.446 183.734 159.446H228.864Z",fill:e}),d("path",{d:"M462.869 234.92C464.271 234.92 465.628 234.242 466.695 233.01L508.268 185.636L499.722 178.397L461.316 223.557C459.983 225.098 458.287 225.945 456.534 225.945H409.409L416.035 233.841C416.8 234.92 416.8 234.92 417.74 234.92H462.869Z",fill:e}),d("path",{d:"M697.005 330C698.783 330 700 328.82 700 327.001V256.638C700 254.857 697.848 253.965 696.591 255.225L693.409 258.411V320.402C693.409 322.058 692.069 323.401 690.414 323.401H630.718L627.536 326.587C626.278 327.847 627.169 330 628.947 330H697.005Z",fill:e}),d("path",{d:"M689.642 321.89C690.744 321.89 691.638 320.995 691.638 319.891V250.743C691.638 248.962 689.488 248.07 688.23 249.329L662.647 274.947L520.987 153.863C519.541 152.627 517.703 151.948 515.802 151.948H469.518C470.236 151.949 470.956 152.206 471.53 152.729L498.163 176.978L498.13 177.018L639.84 297.784L619.174 318.477C617.916 319.737 618.807 321.89 620.586 321.89H689.642Z",fill:t}),d("path",{d:"M429.279 198.995L467.208 153.03C468.3 151.716 470.268 151.579 471.531 152.729L498.163 176.978L460.69 221.107C459.173 222.894 456.946 223.924 454.6 223.924H408.473C409.366 223.924 410.252 223.527 410.845 222.764L429.279 198.995Z",fill:n}),d("path",{d:"M408.473 223.924H408.314L408.318 223.92C408.369 223.922 408.421 223.924 408.473 223.924Z",fill:n}),d("path",{d:"M406.524 223.203C407.826 224.318 409.796 224.116 410.845 222.761L429.279 198.932L287.411 77.8866C285.964 76.6523 284.125 75.9742 282.223 75.9742H234.606L234.625 75.9907C235.429 75.9118 236.263 76.1557 236.915 76.7378L263.662 100.621L263.546 100.758L406.524 223.203Z",fill:t}),d("path",{d:"M236.914 76.7386C235.651 75.6097 233.707 75.7513 232.621 77.0513L194.557 123.104L175.644 146.821C175.076 147.535 174.25 147.917 173.409 147.947L173.407 147.95H219.923C222.271 147.95 224.499 146.915 226.017 145.122L263.645 100.649L236.914 76.7386Z",fill:n}),d("path",{d:"M175.648 146.816C174.589 148.145 172.637 148.329 171.348 147.221L4.09334 3.51697C2.68586 2.30767 3.54106 0 5.39671 0H47.5805C49.4864 0 51.3297 0.680433 52.7785 1.91877L194.557 123.104L175.648 146.816Z",fill:t})]})},PH=({colorPrimary:t="#17CA2C",colorShadow:e="#737373"})=>{const n=lt(t).darken(20).toHexString();return I(Y,{width:xh,height:wy,children:[d("path",{d:"M19.0526 324L12.6762 329.482C11.2703 330.691 12.1234 333 13.976 333H56.1578C58.058 333 59.896 332.321 61.3413 331.085L201.854 210.901L194.249 201.693L54.0527 321.606C52.246 323.151 49.9486 324 47.5732 324H19.0526Z",fill:e}),d("path",{d:"M234.587 248L241.131 255.922C241.656 256.552 242.382 256.909 243.134 256.983L243.115 257H290.716C292.618 257 294.457 256.322 295.903 255.087L437.091 134.536L429.305 125.5L288.613 245.609C286.805 247.153 284.507 248 282.132 248H234.587Z",fill:e}),d("path",{d:"M461.123 162.429L475.642 179.918C476.237 180.635 477.092 181.001 477.951 181H524.22C526.121 181 527.959 180.321 529.404 179.085L670.786 58.1578L662.326 49.6809L522.115 169.606C520.309 171.151 518.011 172 515.636 172H469.369L461.123 162.429Z",fill:e}),d("path",{d:"M687.912 74.8875C690.374 75.9052 693.412 74.1668 693.412 71.1716V11H698.004C699.106 11 700 11.8954 700 13V82.1716C700 83.9534 697.85 84.8457 696.593 83.5858L687.912 74.8875Z",fill:e}),d("path",{d:"M689.419 0C690.522 0 691.415 0.895432 691.415 2V71.1716C691.415 72.9534 689.265 73.8457 688.008 72.5858L662.433 46.9598L520.819 168.085C519.374 169.321 517.536 170 515.636 170H469.367C470.084 169.999 470.804 169.742 471.379 169.219L498.003 144.961L497.969 144.922L639.634 24.115L618.975 3.41421C617.717 2.15428 618.608 0 620.386 0H689.419Z",fill:t}),d("path",{d:"M429.141 122.937L467.058 168.918C468.149 170.232 470.116 170.369 471.378 169.219L498.003 144.961L460.542 100.818C459.025 99.0305 456.798 98 454.453 98H408.341C409.234 98.0001 410.12 98.3968 410.712 99.1606L429.141 122.937Z",fill:n}),d("path",{d:"M408.341 98H408.183L408.186 98.004C408.237 98.0013 408.289 98 408.341 98Z",fill:n}),d("path",{d:"M406.393 98.721C407.695 97.606 409.664 97.8077 410.712 99.1633L429.141 123L287.318 244.087C285.872 245.322 284.033 246 282.132 246H234.53L234.55 245.983C235.353 246.062 236.187 245.818 236.839 245.236L263.577 221.345L263.461 221.208L406.393 98.721Z",fill:t}),d("path",{d:"M236.837 245.235C235.575 246.365 233.631 246.223 232.546 244.922L194.494 198.854L175.588 175.129C175.019 174.415 174.194 174.032 173.353 174.002L173.351 174H219.852C222.199 174 224.427 175.035 225.944 176.829L263.56 221.317L236.837 245.235Z",fill:n}),d("path",{d:"M175.593 175.135C174.533 173.805 172.581 173.622 171.291 174.73L4.09013 318.484C2.68329 319.693 3.53868 322 5.394 322H47.5627C49.4695 322 51.3136 321.319 52.7627 320.08L194.494 198.854L175.593 175.135Z",fill:t})]})},Py=$y({arrowHeight:by,presetRatios:bH,Arrow:$H}),Cy=$y({arrowHeight:wy,presetRatios:wH,Arrow:PH});Tt("list-zigzag-down",{component:Py,composites:["title","item"]}),Tt("list-zigzag-up",{component:Cy,composites:["title","item"]});const wh={axisColor:"#D9D9D9",axisArrowSize:5,strokeWidth:1,dashArray:"4,2",defaultExtraSpacing:20},Oy=t=>{const{Title:e,Item:n,data:r,quadrantWidth:i,quadrantHeight:o,showAxis:s=!0,dashedAxis:a=!0}=t,{title:l,desc:c,items:h=[]}=r,u=e?d(e,{title:l,desc:c}):null,f=Array.from({length:4},(b,w)=>h[w]),p=f[0]?et(d(n,{indexes:[0],data:r,datum:f[0]})):{width:0,height:0},g=i!=null?i:p.width+wh.defaultExtraSpacing,y=o!=null?o:p.height+wh.defaultExtraSpacing,m=OH(g,y,p),x=f.map((b,w)=>{if(!b)return null;const _=m[w];return d(n,{indexes:[w],datum:b,data:r,x:_.x,y:_.y,positionH:w%2?"flipped":"normal",positionV:w<2?"normal":"flipped"})}).filter(Boolean),v=CH(g,y,s,a);return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[u,I(Y,{width:g*2,height:y*2,children:[v,d(Ot,{children:x})]})]})};function CH(t,e,n,r){if(!n)return[];const{axisColor:i,axisArrowSize:o,strokeWidth:s,dashArray:a}=wh,l=t,c=e,h=t*2,u=e*2,f=r?a:void 0;return[d(yt,{d:`M 0 ${c} L ${h} ${c}`,stroke:i,strokeWidth:s,strokeDasharray:f,fill:"none","data-element-type":"shape"}),I(le,{transform:`translate(${h}, ${c})`,children:[d(yt,{d:`M 0 0 L ${-o} ${-o/2}`,stroke:i,strokeWidth:s,fill:"none"}),d(yt,{d:`M 0 0 L ${-o} ${o/2}`,stroke:i,strokeWidth:s,fill:"none"})]}),I(le,{transform:`translate(0, ${c})`,children:[d(yt,{d:`M 0 0 L ${o} ${-o/2}`,stroke:i,strokeWidth:s,fill:"none"}),d(yt,{d:`M 0 0 L ${o} ${o/2}`,stroke:i,strokeWidth:s,fill:"none"})]}),d(yt,{d:`M ${l} 0 L ${l} ${u}`,stroke:i,strokeWidth:s,strokeDasharray:f,fill:"none","data-element-type":"shape"}),I(le,{transform:`translate(${l}, 0)`,children:[d(yt,{d:`M 0 0 L ${-o/2} ${o}`,stroke:i,strokeWidth:s,fill:"none"}),d(yt,{d:`M 0 0 L ${o/2} ${o}`,stroke:i,strokeWidth:s,fill:"none"})]}),I(le,{transform:`translate(${l}, ${u})`,children:[d(yt,{d:`M 0 0 L ${-o/2} ${-o}`,stroke:i,strokeWidth:s,fill:"none"}),d(yt,{d:`M 0 0 L ${o/2} ${-o}`,stroke:i,strokeWidth:s,fill:"none"})]})]}function OH(t,e,n){const r=t/2,i=e/2;return[{x:r-n.width/2,y:i-n.height/2},{x:t+r-n.width/2,y:i-n.height/2},{x:r-n.width/2,y:e+i-n.height/2},{x:t+r-n.width/2,y:e+i-n.height/2}]}Tt("quadrant",{component:Oy,composites:["title","item"]});const My=t=>{const{Title:e,Item:n,data:r,radius:i=150,startMode:o="top"}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=et(d(U,{indexes:[0]})),u=et(d(n,{indexes:[0],data:r,datum:l[0],positionH:"center"})),f=[],p=[];if(l.length===0)return f.push(d(U,{indexes:[0],x:-h.width/2,y:-h.height/2})),I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,d(Y,{children:d(Et,{children:f})})]});const g=Math.max(u.width,u.height),y=Math.max(i,g),m=y+g/2,x=l.map(()=>{const $=u.width,P=u.height;return($+P)/2}),v=x.reduce(($,P)=>$+P,0);let b;o==="equal"?b=-Math.PI/2:b=-Math.PI/2+2*Math.PI/l.length/2;let w=b;l.forEach(($,P)=>{const C=x[P]/v*2*Math.PI,T=w+C/2;w+=C;const E=m+y*Math.cos(T)-u.width/2,S=m+y*Math.sin(T)-u.height/2;p.push(d(n,{indexes:[P],datum:$,data:r,x:E,y:S}));const R=y-Math.max(u.width,u.height)/2-20,O=m+R*Math.cos(T)-h.width/2,A=m+R*Math.sin(T)-h.height/2;f.push(d(Yt,{indexes:[P],x:O,y:A}))});const _=y-Math.max(u.width,u.height)/2-20;if(l.length>0)for(let $=0;$<l.length;$++){const P=$*2*Math.PI/l.length-Math.PI/2,C=($+1)%l.length*2*Math.PI/l.length-Math.PI/2;let T;if($===l.length-1){const R=C+2*Math.PI-P;T=P+R/2}else T=(P+C)/2;const E=m+_*Math.cos(T)-h.width/2,S=m+_*Math.sin(T)-h.height/2;f.push(d(U,{indexes:[$+1],x:E,y:S}))}return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,I(Y,{children:[d(Ot,{children:p}),d(Et,{children:f})]})]})};Tt("relation-circle",{component:My,composites:["title","item"]});const Sy=t=>{const{Title:e,Item:n,data:r,spacing:i=120,showConnections:o=!0,options:s}=t,{title:a,desc:l,items:c=[]}=r,h=e?d(e,{title:a,desc:l}):null;if(c.length===0)return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,d(Y,{children:d(Ot,{})})]});const u=et(d(n,{indexes:[0],data:r,datum:c[0],positionH:"center"}));function f(){const P=c.map((E,S)=>({id:S,data:E,isCenter:S===0,_originalIndex:[S]})),C=c.slice(1).map((E,S)=>({source:0,target:S+1})),T=_T(P).force("link",pT(C).id(E=>E.id).distance(i)).force("charge",$T().strength(-50)).force("center",GA(0,0)).force("collision",uT().radius(Math.max(u.width,u.height)/2+10));for(let E=0;E<300;++E)T.tick();return{nodes:P,links:C}}const{nodes:p,links:g}=f(),y=Math.min(...p.map(P=>{var C;return(C=P.x)!=null?C:0})),m=Math.min(...p.map(P=>{var C;return(C=P.y)!=null?C:0})),x=Math.max(0,-y+u.width/2),v=Math.max(0,-m+u.height/2),b=(P,C)=>({positionH:P<-50?"flipped":P>50?"normal":"center",positionV:C<-50?"flipped":C>50?"normal":"middle"}),w=p.map(P=>{if(P.x==null||P.y==null)return null;const C=P.x+x-u.width/2,T=P.y+v-u.height/2,{positionH:E,positionV:S}=b(P.x,P.y);return d(n,{indexes:P._originalIndex,datum:P.data,data:r,x:C,y:T,positionH:E,positionV:S},P.id)}).filter(Boolean),_=new Map(p.map(P=>[P.id,P])),$=o?g.map(P=>{const C=typeof P.source=="object"?P.source:_.get(P.source),T=typeof P.target=="object"?P.target:_.get(P.target);if(!C||!T||C.x==null||C.y==null||T.x==null||T.y==null)return null;const E=`M ${C.x+x} ${C.y+v} L ${T.x+x} ${T.y+v}`;return d(yt,{d:E,stroke:ce(s),strokeWidth:2,strokeOpacity:.6})}).filter(Boolean):[];return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,I(Y,{children:[d(Y,{children:$}),d(Ot,{children:w})]})]})};Tt("relation-network",{component:Sy,composites:["title","item"]});var MH=Object.defineProperty,SH=Object.defineProperties,EH=Object.getOwnPropertyDescriptors,Qs=Object.getOwnPropertySymbols,Ey=Object.prototype.hasOwnProperty,Iy=Object.prototype.propertyIsEnumerable,Ay=(t,e,n)=>e in t?MH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,IH=(t,e)=>{for(var n in e||(e={}))Ey.call(e,n)&&Ay(t,n,e[n]);if(Qs)for(var n of Qs(e))Iy.call(e,n)&&Ay(t,n,e[n]);return t},AH=(t,e)=>SH(t,EH(e)),TH=(t,e)=>{var n={};for(var r in t)Ey.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Qs)for(var r of Qs(t))e.indexOf(r)<0&&Iy.call(t,r)&&(n[r]=t[r]);return n};const _h=t=>{var e=t,{width:n=25,height:r=25,colorPrimary:i="#6699FF",rotation:o=0}=e,s=TH(e,["width","height","colorPrimary","rotation"]);const a=`gradient-arrow-stroke-${i.replace("#","")}`,l=`gradient-arrow-fill-${i.replace("#","")}`,c=Math.round(n*.515),h=Math.round(r*.275),u=Math.round(r*.875),f=[{x:0,y:h},{x:c,y:h},{x:c,y:r*.075},{x:n,y:r*.575},{x:c,y:r*1.075},{x:c,y:u},{x:0,y:u}],p=n/2,g=r/2,y=`rotate(${o} ${p} ${g})`;return I(Bt,{children:[d(Re,AH(IH({},s),{width:n,height:r,points:f,fill:`url(#${l})`,stroke:`url(#${a})`,transform:y,"data-element-type":"shape"})),I(jt,{children:[I("linearGradient",{id:l,x1:"100%",y1:"0%",x2:"0%",y2:"0%",children:[d("stop",{offset:"0%","stop-color":i,"stop-opacity":"0.36"}),d("stop",{offset:"100%","stop-color":i,"stop-opacity":"0"})]}),I("linearGradient",{id:a,x1:"100%",y1:"0%",x2:"0%",y2:"0%",children:[d("stop",{offset:"0%","stop-color":i}),d("stop",{offset:"58%","stop-color":i,"stop-opacity":"0"})]})]})]})},kH=({text:t,x:e=0,y:n=0,fontSize:r=56,fontWeight:i="bold",fill:o="#FFFFFF",textAnchor:s="middle",dominantBaseline:a="middle",shadowOffsetX:l=2,shadowOffsetY:c=4,midShadowOffsetX:h=1,midShadowOffsetY:u=2,deepShadowOpacity:f=.3,midShadowOpacity:p=.5})=>I(Y,{children:[d("text",{x:e,y:n,fontSize:r,fontWeight:i,fill:o,fillOpacity:f,textAnchor:s,dominantBaseline:a,transform:`translate(${l}, ${c})`,children:t}),d("text",{x:e,y:n,fontSize:r,fontWeight:i,fill:o,fillOpacity:p,textAnchor:s,dominantBaseline:a,transform:`translate(${h}, ${u})`,children:t}),d("text",{x:e,y:n,fontSize:r,fontWeight:i,fill:o,textAnchor:s,dominantBaseline:a,children:t})]});var LH=Object.defineProperty,zH=Object.defineProperties,HH=Object.getOwnPropertyDescriptors,Js=Object.getOwnPropertySymbols,Ty=Object.prototype.hasOwnProperty,ky=Object.prototype.propertyIsEnumerable,Ly=(t,e,n)=>e in t?LH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,RH=(t,e)=>{for(var n in e||(e={}))Ty.call(e,n)&&Ly(t,n,e[n]);if(Js)for(var n of Js(e))ky.call(e,n)&&Ly(t,n,e[n]);return t},DH=(t,e)=>zH(t,HH(e)),NH=(t,e)=>{var n={};for(var r in t)Ty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Js)for(var r of Js(t))e.indexOf(r)<0&&ky.call(t,r)&&(n[r]=t[r]);return n};const jH=t=>{var e=t,{width:n=25,height:r=25,colorPrimary:i="#6699FF",rotation:o=0,strokeWidth:s=4}=e,a=NH(e,["width","height","colorPrimary","rotation","strokeWidth"]);const l=[{x:n/2,y:0},{x:n,y:r},{x:0,y:r}],c=n/2,h=r/2,u=`rotate(${o} ${c} ${h})`;return d(Re,DH(RH({},a),{width:n,height:r,points:l,fill:i,stroke:i,strokeWidth:s,strokeLinecap:"round",strokeLinejoin:"round",transform:u}))},WH=-118,zy=118,Hy=240,FH=180,BH=40,YH="M238.9 69.7a6 6 0 0 1-.1 1v.2l-.2.3v.3l-.1.3a6.2 6.2 0 0 1-.3.6l-.1.3-.2.3-.2.4-.3.5-.1.1a10.9 10.9 0 0 1-.8 1v.1l-.5.5h-.1l-.4.4-.3.3-.3.2-.3.3-.4.2a13 13 0 0 1-.7.5l-.4.3-.5.3-97.5 56.7-.7.4h-.2l-.6.4h-.1l-.8.4h-.2l-.6.4h-.2l-.8.3h-.2l-.5.3-.5.1-.5.1-.5.2h-.5a33.7 33.7 0 0 1-3.2.7h-.2l-1 .2h-1.6l-.7.1h-4.7l-.8-.1h-.2a38.2 38.2 0 0 1-2-.4h-.4l-.7-.2h-.4l-.7-.2-.4-.1a27.3 27.3 0 0 1-2.2-.7h-.2a44.2 44.2 0 0 1-.9-.3l-.5-.3-.4-.1-.5-.2-.3-.2-.5-.2-.3-.2-.8-.4L6.5 78C2.2 75.6 0 72.4 0 69v41.7c0 3.2 2.1 6.5 6.4 9l98.1 56.6a23.2 23.2 0 0 0 1 .6l.6.3.3.1.5.2.4.2.3.1h.2l.2.2a21.4 21.4 0 0 0 1.9.6l.3.1h.2l.7.2a77.6 77.6 0 0 1 1.1.3h.3l.7.2h.4a42.5 42.5 0 0 0 1 .2l1 .2h1.1l.4.1h2.1l.7.1h1.5a22 22 0 0 0 1.8-.2h.4l1.1-.1h.2l1.2-.2h.1l.3-.1.6-.1a12.5 12.5 0 0 0 1-.3h.5l.5-.2a29 29 0 0 0 1-.3h.2l.3-.2h.2a27 27 0 0 0 1.6-.7h.2l.8-.4a19.4 19.4 0 0 0 1.6-.9l97.5-56.7.3-.1.2-.2.4-.2.4-.3.3-.2.3-.3.4-.2.3-.3.3-.3h.1l.3-.3.5-.6h.1l.3-.5h.1v-.1l.4-.4v-.1l.4-.5v-.1l.1-.2.1-.2.2-.3.1-.3.1-.3.1-.1a6.9 6.9 0 0 0 .2-.8l.1-.3v-.4l.1-.3v-1l.2-41.4v.4Z",VH="M232.5 60.4c8.5 4.9 8.5 12.8.1 17.7l-97.5 56.7c-8.4 4.9-22 4.9-30.5 0L6.5 78C-2 73-2 65.3 6.4 60.4l97.5-56.7c8.4-5 22-5 30.5 0l98.1 56.7Z",XH="M119.1 0A31 31 0 0 0 104 3.7L6.4 60.4C-2 65.3-2 73.2 6.4 78l98.2 56.7c4.2 2.4 9.8 3.7 15.3 3.7a31 31 0 0 0 15.2-3.7L232.6 78c8.4-5 8.4-12.8 0-17.7L134.3 3.7A31.2 31.2 0 0 0 119.1 0Zm0 2.5c5.4 0 10.3 1.2 14 3.3l98.2 56.7c3.3 2 5.1 4.3 5.1 6.8 0 2.4-1.8 4.7-5 6.6l-97.5 56.7a28.3 28.3 0 0 1-14 3.4c-5.3 0-10.3-1.2-14-3.4L7.7 76c-3.3-1.9-5-4.3-5-6.7 0-2.4 1.7-4.8 5-6.7L105 5.8a29 29 0 0 1 14-3.3Z",Ry=I("filter",{id:"sequence-ascending-stairs-3d-shadow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[d("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),d("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),d("feOffset",{dx:"0",dy:"4"}),d("feGaussianBlur",{stdDeviation:"6"}),d("feComposite",{in2:"hardAlpha",operator:"out"}),d("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),d("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),d("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})]}),Dy=t=>{const{Title:e,Item:n,data:r,options:i,cubeWidth:o=Hy}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null;if(l.length===0)return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[d(jt,{children:Ry}),c,d(Y,{children:d(Et,{children:d(U,{indexes:[0],x:0,y:0})})})]});const h=et(d(U,{indexes:[0]})),u=[],f=[],p=[],g=o/Hy,y=FH*g;return l.forEach((m,x)=>{const v=[x],b=It(i,v),w=x*(o+WH),_=(l.length-1-x)*zy,$=`cube-gradient-bottom-${x}`,P=`cube-gradient-top-${x}`,C=`cube-gradient-stroke-${x}`;p.push(I(Y,{x:w,y:_,id:`cube-${x}`,width:o,height:y,filter:"url(#sequence-ascending-stairs-3d-shadow-filter)",children:[I(jt,{children:[I("linearGradient",{id:$,x1:"0",y1:"124.5",x2:"238.9",y2:"124.5",gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0",stopColor:b,stopOpacity:"0.8"}),d("stop",{offset:"1",stopColor:b,stopOpacity:"0.4"})]}),I("linearGradient",{id:P,x1:"119.5",y1:"0",x2:"119.5",y2:"138.5",gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0",stopColor:b,stopOpacity:"0.9"}),d("stop",{offset:"1",stopColor:b,stopOpacity:"0.5"})]}),I("linearGradient",{id:C,x1:"119.5",y1:"0",x2:"119.5",y2:"138.5",gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0",stopColor:b}),d("stop",{offset:"1",stopColor:b,stopOpacity:"0.7"})]})]}),I(le,{transform:`scale(${g})`,children:[d(yt,{d:YH,fill:`url(#${$})`}),d(yt,{d:VH,fill:`url(#${P})`}),d(yt,{d:XH,fill:`url(#${C})`})]}),d(kH,{text:x+1,x:115,y:65,fontSize:56})]}));const T=w+o+BH,E=_+y/2;if(f.push(d(n,{indexes:v,datum:m,data:r,x:T,y:E,positionH:"normal"})),u.push(d(Yt,{indexes:v,x:w+o-h.width/2,y:_-h.height/2})),x===0&&u.push(d(U,{indexes:[0],x:w-30-h.width/2,y:_+y/2-h.height/2})),x<l.length-1){const S=(l.length-1-(x+1))*zy,R=w+o-h.width/2,O=(_+y/2+S+y/2)/2-h.height/2;u.push(d(U,{indexes:[x+1],x:R,y:O}))}else u.push(d(U,{indexes:[l.length],x:w+o+30-h.width/2,y:_+y/2-h.height/2}))}),I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[d(jt,{children:Ry}),c,I(Y,{x:0,y:0,children:[d(Y,{children:p}),d(Ot,{children:f}),d(Et,{children:u})]})]})};Tt("sequence-ascending-stairs-3d",{component:Dy,composites:["title","item"]});const Ny=t=>{const{Title:e,Item:n,data:r,hGap:i=0,vGap:o=0}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=et(d(n,{indexes:[0],data:r,datum:l[0]})),u=[],f=[],p=l.length,g=h.width+i,y=h.height/2+o,m=h.width/2,v=0+(p-1)*y;return l.forEach((b,w)=>{const _=m+w*g,$=v-w*y,P=[w];u.push(d(n,{indexes:P,datum:b,data:r,x:_,y:$})),f.push(d(Yt,{indexes:P,x:_+h.width-30,y:$+h.height/2+10})),f.push(d(U,{indexes:P,x:_+h.width+i/2,y:$-30}))}),I(ct,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,I(Y,{children:[d(Ot,{children:u}),d(Et,{children:f})]})]})};Tt("sequence-ascending-steps",{component:Ny,composites:["title","item"]});const GH=20,jy=5,Wy=t=>{const{Title:e,Item:n,data:r,options:i,radius:o=150,arrowSize:s=4,strokeWidth:a=10}=t,{title:l,desc:c,items:h=[]}=r,u=et(d(U,{indexes:[0]})),f=ce(i);if(!n)return I(ct,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[e?d(e,{title:l,desc:c}):null,d(Y,{children:d(Et,{children:d(U,{indexes:[0],x:0,y:0})})})]});const p=h.length;if(p===0)return I(ct,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[e?d(e,{title:l,desc:c}):null,d(Y,{children:d(Et,{children:d(U,{indexes:[0],x:0,y:0})})})]});const g=et(d(n,{indexes:[0],data:r,datum:h[0]})),y=0,m=0,x=2*Math.PI/p,v=[];let b=1/0,w=1/0,_=-1/0,$=-1/0;for(let L=0;L<p;L++){const D=L*x-Math.PI/2,k=y+o*Math.cos(D),N=m+o*Math.sin(D);v.push({x:k,y:N}),b=Math.min(b,k),w=Math.min(w,N),_=Math.max(_,k),$=Math.max($,N)}const P=[];for(let L=0;L<p;L++){const D=v[L],k=v[(L+1)%p],N=Math.sqrt(Math.pow(k.x-D.x,2)+Math.pow(k.y-D.y,2)),j=Math.min(N*.5,100),X=(D.x+k.x)/2,z=(D.y+k.y)/2;b=Math.min(b,X-j/2),w=Math.min(w,z-j/2),_=Math.max(_,X+j/2),$=Math.max($,z+j/2);const M=Math.atan2(z-m,X-y),H=M<0?M+2*Math.PI:M;let B,q;const V=H*180/Math.PI,G=j/2+GH,Z=X+Math.cos(M)*G,K=z+Math.sin(M)*G;V>=337.5||V<22.5?(B=Z,q=K-g.height/2):V>=22.5&&V<67.5?(B=Z,q=K):V>=67.5&&V<112.5?(B=Z-g.width/2,q=K):V>=112.5&&V<157.5?(B=Z-g.width,q=K):V>=157.5&&V<202.5?(B=Z-g.width,q=K-g.height/2):V>=202.5&&V<247.5?(B=Z-g.width,q=K-g.height):V>=247.5&&V<292.5?(B=Z-g.width/2,q=K-g.height):(B=Z,q=K-g.height),P.push({lineLength:N,circleBigW:j,midX:X,midY:z,itemX:B,itemY:q}),b=Math.min(b,B),w=Math.min(w,q),_=Math.max(_,B+g.width+u.width+5),$=Math.max($,q+g.height)}const C=Math.max(0,-b),T=Math.max(0,-w),E=e?d(e,{title:l,desc:c}):null,S=[],R=[],O=[],A=[],F=v.map(L=>({x:L.x+C,y:L.y+T}));for(let L=0;L<p;L++){const D=F[L],k=F[(L+1)%p],N=(L+1)%p,j=[L],{lineLength:X,circleBigW:z,midX:M,midY:H}=P[L],B=Math.max(z-20,20),q=Math.max(B*.4,16),V=It(i,j)||f,G=k.x-D.x,Z=k.y-D.y,K=X,it=G/K,Q=Z/K,at=jy*2+s,ht=Math.min(jy,(K-at)/2),nt=Math.max(0,D.x+it*ht),J=Math.max(0,D.y+Q*ht),tt=Math.max(0,k.x-it*ht),st=Math.max(0,k.y-Q*ht),gt=Sk().x(Vt=>Math.max(0,Vt.x)).y(Vt=>Math.max(0,Vt.y)).curve(Fm)([{x:nt,y:J},{x:tt,y:st}])||"",ot=`fork-arrow-${V.replace(/[^a-zA-Z0-9]/g,"")}-${L}`,ft=`
114
- M ${-s*.6} ${-s*.4}
113
+ `.trim()}return R(Y,{id:"infographic-container",children:[p(Y,{children:y}),_?p(Je,{id:"shape-center-circle",x:m-$,y:v-$,width:$*2,height:$*2,fill:h.colorPrimaryBg,fillOpacity:.5,"data-element-type":"shape"}):p(Pe,{id:"shape-center-sector",d:I,fill:h.colorPrimaryBg,fillOpacity:.5,width:r*2+200,height:r*2+200,"data-element-type":"shape"}),p(Ne,{x:C-S/2,y:M-E/2,width:S,height:E,alignHorizontal:"center",alignVertical:"middle",fontSize:24,fontWeight:"bold",fill:h.colorText,"data-element-type":Ue.Title,children:l}),p(He,{children:g}),p(qe,{children:f})]})};We("list-sector",{component:F4,composites:["title","item"]});const B4=e=>{const{Title:t,Item:n,data:r,columns:i=4,gap:o=20,stepOffset:a=40}=e,{title:s,desc:c,items:l=[]}=r,u=t?p(t,{title:s,desc:c}):null,h=ae(p(J,{indexes:[0]})),d=ae(p(n,{indexes:[0],data:r,datum:l[0],positionH:"center"})),f=[],g=[],y=d.width+o;return l.forEach((m,v)=>{const b=v%i,_=Math.floor(v/i),x=b*y,w=_*(d.height+o),P=b*a,$=w+P,C=[v];g.push(p(n,{indexes:C,datum:m,data:r,x,y:$,positionH:"center"})),f.push(p(nt,{indexes:C,x:x+(d.width-h.width)/2,y:$+d.height+5}))}),l.forEach((m,v)=>{const b=v%i,_=Math.floor(v/i),x=b*y,w=_*(d.height+o),P=b*a,$=w+P;if(v===0&&f.push(p(J,{indexes:[0],x:x-o/2-h.width/2,y:$+(d.height-h.height)/2})),b<i-1&&v<l.length-1){const C=Math.floor((v+1)/i);_===C&&f.push(p(J,{indexes:[v+1],x:x+d.width+(o-h.width)/2,y:$+(d.height-h.height)/2}))}(b===i-1||v===l.length-1)&&f.push(p(J,{indexes:[v+1],x:x+d.width+(o-h.width)/2,y:$+(d.height-h.height)/2}))}),l.length===0&&f.push(p(J,{indexes:[0],x:(i-1)*y/2+(d.width-h.width)/2,y:0})),R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[u,R(Y,{children:[p(He,{children:g}),p(qe,{children:f})]})]})};We("list-waterfall",{component:B4,composites:["title","item"]});const ZK=6,Xh=700,W4=330,G4=333,QK={1:[{x:.5,y:.6,anchor:"top-right"}],2:[{x:.42,y:.5,anchor:"top-right"},{x:.72,y:.4,anchor:"bottom"}],3:[{x:.3,y:.5,anchor:"top-right"},{x:.48,y:.3,anchor:"bottom-left"},{x:.8,y:.75,anchor:"top-right"}],4:[{x:.3,y:.5,anchor:"top-right"},{x:.35,y:.2,anchor:"bottom-left"},{x:.65,y:.73,anchor:"top-right"},{x:.8,y:.52,anchor:"bottom-left"}],5:[{x:.19,y:.4,anchor:"top-right"},{x:.38,y:.2,anchor:"bottom"},{x:.52,y:.62,anchor:"top-right"},{x:.7,y:.43,anchor:"bottom"},{x:.82,y:.8,anchor:"top-right"}],6:[{x:.16,y:.35,anchor:"top-right"},{x:.38,y:.2,anchor:"bottom"},{x:.48,y:.54,anchor:"top-right"},{x:.55,y:.43,anchor:"bottom-left"},{x:.8,y:.75,anchor:"top-right"},{x:.86,y:.65,anchor:"bottom-left"}]},JK={1:[{x:.5,y:.4,anchor:"bottom-right"}],2:[{x:.42,y:.5,anchor:"bottom-right"},{x:.72,y:.6,anchor:"top"}],3:[{x:.3,y:.5,anchor:"bottom-right"},{x:.48,y:.7,anchor:"top-left"},{x:.8,y:.25,anchor:"bottom-right"}],4:[{x:.3,y:.5,anchor:"bottom-right"},{x:.35,y:.8,anchor:"top-left"},{x:.65,y:.27,anchor:"bottom-right"},{x:.8,y:.48,anchor:"top-left"}],5:[{x:.19,y:.6,anchor:"bottom-right"},{x:.38,y:.8,anchor:"top"},{x:.52,y:.38,anchor:"bottom-right"},{x:.7,y:.57,anchor:"top"},{x:.82,y:.2,anchor:"bottom-right"}],6:[{x:.16,y:.65,anchor:"bottom-right"},{x:.38,y:.8,anchor:"top"},{x:.48,y:.46,anchor:"bottom-right"},{x:.55,y:.57,anchor:"top-left"},{x:.8,y:.25,anchor:"bottom-right"},{x:.86,y:.35,anchor:"top-left"}]},V4=(e,t,n)=>{const r=t[e];return r?r.map(i=>({x:i.x*Xh,y:i.y*n,anchor:i.anchor})):null},eZ=(e,t)=>{const n=e.anchor||"center";let r=e.x-t.width/2,i=e.y-t.height/2,o=e.y;switch(n){case"top":r=e.x-t.width/2,i=e.y,o=e.y+t.height/2;break;case"bottom":r=e.x-t.width/2,i=e.y-t.height,o=e.y-t.height/2;break;case"top-left":r=e.x,i=e.y,o=e.y+t.height/2;break;case"top-right":r=e.x-t.width,i=e.y,o=e.y+t.height/2;break;case"bottom-left":r=e.x,i=e.y-t.height,o=e.y-t.height/2;break;case"bottom-right":r=e.x-t.width,i=e.y-t.height,o=e.y-t.height/2;break}return{x:r,y:i,centerY:o}},Uh=(e,t)=>{const n=t.x-e.x,r=t.y-e.y,i=Math.hypot(n,r)||1;return{x:n/i,y:r/i}},Y4=e=>{const{presetRatios:t,arrowHeight:n,Arrow:r}=e;return o=>{var a;const{Title:s,Item:c,data:l,options:u,itemGap:h=24}=o,{title:d,desc:f,items:g=[]}=l,y=Math.min(g.length,ZK),m=g.slice(0,y),v=s?p(s,{title:d,desc:f}):null,b=wt(u),x=Ct({colorPrimary:b},u).colorTextSecondary||"#737373",w=ae(p(J,{indexes:[0]}));if(g.length===0){const z=(a=V4(1,t,n))==null?void 0:a[0];if(!z)return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[v,p(Y,{children:p(r,{colorPrimary:b,colorShadow:x})})]});const j=z.x-w.width/2,H=z.y-w.height/2;return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[v,R(Y,{children:[p(r,{colorPrimary:b,colorShadow:x}),p(He,{}),p(qe,{children:p(J,{indexes:[0],x:j,y:H})})]})]})}const P=ae(p(c,{indexes:[0],data:l,datum:g[0],positionH:"center"})),$=[],C=[],M=V4(y,t,n);if(!M)return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[v,R(Y,{children:[p(r,{colorPrimary:b,colorShadow:x}),p(He,{})]})]});const S=M,E=S.length>1?Uh(S[0],S[S.length-1]):{x:1,y:0},I=S.length>1?Uh(S[0],S[1]):E,O=S.length>1?Uh(S[S.length-2],S[S.length-1]):E,T=Math.max(P.width,P.height)*.45+h,F=z=>{const{x:j,y:H,centerY:W}=eZ(z,P);return{x:j,y:H,centerY:W}};if(S.forEach((z,j)=>{const H=F(z),W=H.centerY<n/2,B=[j],X=m[j];if(!X)return;C.push(p(c,{indexes:B,datum:X,data:l,x:H.x,y:H.y,positionH:"center"}));const D=H.x+P.width-w.width/2,k=W?H.y-w.height/2:H.y+P.height-w.height/2;$.push(p(nt,{indexes:B,x:D,y:k}))}),S.length>0){const z=S[0],j=z.x-I.x*T-w.width/2,H=z.y-I.y*T-w.height/2;$.push(p(J,{indexes:[0],x:j,y:H}));for(let D=0;D<S.length-1;D++){const k=S[D],A=S[D+1],L=(k.x+A.x)/2,N=(k.y+A.y)/2,q=L-w.width/2,G=N-w.height/2;$.push(p(J,{indexes:[D+1],x:q,y:G}))}const W=S[S.length-1],B=W.x+O.x*T-w.width/2,X=W.y+O.y*T-w.height/2;$.push(p(J,{indexes:[y],x:B,y:X}))}return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[v,R(Y,{children:[p(r,{colorPrimary:b,colorShadow:x}),p(He,{children:C}),p(qe,{children:$})]})]})}},tZ=({colorPrimary:e="#17CA2C",colorShadow:t="#737373"})=>{const n=ve(e).darken(20).toHexString();return R(Y,{width:Xh,height:W4,children:[p("path",{d:"M228.864 159.446C230.266 159.446 231.623 158.768 232.689 157.535L274.263 110.162L265.717 102.923L227.311 148.082C225.977 149.623 224.281 150.47 222.529 150.47H175.404L182.03 158.367C182.795 159.445 182.795 159.446 183.734 159.446H228.864Z",fill:t}),p("path",{d:"M462.869 234.92C464.271 234.92 465.628 234.242 466.695 233.01L508.268 185.636L499.722 178.397L461.316 223.557C459.983 225.098 458.287 225.945 456.534 225.945H409.409L416.035 233.841C416.8 234.92 416.8 234.92 417.74 234.92H462.869Z",fill:t}),p("path",{d:"M697.005 330C698.783 330 700 328.82 700 327.001V256.638C700 254.857 697.848 253.965 696.591 255.225L693.409 258.411V320.402C693.409 322.058 692.069 323.401 690.414 323.401H630.718L627.536 326.587C626.278 327.847 627.169 330 628.947 330H697.005Z",fill:t}),p("path",{d:"M689.642 321.89C690.744 321.89 691.638 320.995 691.638 319.891V250.743C691.638 248.962 689.488 248.07 688.23 249.329L662.647 274.947L520.987 153.863C519.541 152.627 517.703 151.948 515.802 151.948H469.518C470.236 151.949 470.956 152.206 471.53 152.729L498.163 176.978L498.13 177.018L639.84 297.784L619.174 318.477C617.916 319.737 618.807 321.89 620.586 321.89H689.642Z",fill:e}),p("path",{d:"M429.279 198.995L467.208 153.03C468.3 151.716 470.268 151.579 471.531 152.729L498.163 176.978L460.69 221.107C459.173 222.894 456.946 223.924 454.6 223.924H408.473C409.366 223.924 410.252 223.527 410.845 222.764L429.279 198.995Z",fill:n}),p("path",{d:"M408.473 223.924H408.314L408.318 223.92C408.369 223.922 408.421 223.924 408.473 223.924Z",fill:n}),p("path",{d:"M406.524 223.203C407.826 224.318 409.796 224.116 410.845 222.761L429.279 198.932L287.411 77.8866C285.964 76.6523 284.125 75.9742 282.223 75.9742H234.606L234.625 75.9907C235.429 75.9118 236.263 76.1557 236.915 76.7378L263.662 100.621L263.546 100.758L406.524 223.203Z",fill:e}),p("path",{d:"M236.914 76.7386C235.651 75.6097 233.707 75.7513 232.621 77.0513L194.557 123.104L175.644 146.821C175.076 147.535 174.25 147.917 173.409 147.947L173.407 147.95H219.923C222.271 147.95 224.499 146.915 226.017 145.122L263.645 100.649L236.914 76.7386Z",fill:n}),p("path",{d:"M175.648 146.816C174.589 148.145 172.637 148.329 171.348 147.221L4.09334 3.51697C2.68586 2.30767 3.54106 0 5.39671 0H47.5805C49.4864 0 51.3297 0.680433 52.7785 1.91877L194.557 123.104L175.648 146.816Z",fill:e})]})},nZ=({colorPrimary:e="#17CA2C",colorShadow:t="#737373"})=>{const n=ve(e).darken(20).toHexString();return R(Y,{width:Xh,height:G4,children:[p("path",{d:"M19.0526 324L12.6762 329.482C11.2703 330.691 12.1234 333 13.976 333H56.1578C58.058 333 59.896 332.321 61.3413 331.085L201.854 210.901L194.249 201.693L54.0527 321.606C52.246 323.151 49.9486 324 47.5732 324H19.0526Z",fill:t}),p("path",{d:"M234.587 248L241.131 255.922C241.656 256.552 242.382 256.909 243.134 256.983L243.115 257H290.716C292.618 257 294.457 256.322 295.903 255.087L437.091 134.536L429.305 125.5L288.613 245.609C286.805 247.153 284.507 248 282.132 248H234.587Z",fill:t}),p("path",{d:"M461.123 162.429L475.642 179.918C476.237 180.635 477.092 181.001 477.951 181H524.22C526.121 181 527.959 180.321 529.404 179.085L670.786 58.1578L662.326 49.6809L522.115 169.606C520.309 171.151 518.011 172 515.636 172H469.369L461.123 162.429Z",fill:t}),p("path",{d:"M687.912 74.8875C690.374 75.9052 693.412 74.1668 693.412 71.1716V11H698.004C699.106 11 700 11.8954 700 13V82.1716C700 83.9534 697.85 84.8457 696.593 83.5858L687.912 74.8875Z",fill:t}),p("path",{d:"M689.419 0C690.522 0 691.415 0.895432 691.415 2V71.1716C691.415 72.9534 689.265 73.8457 688.008 72.5858L662.433 46.9598L520.819 168.085C519.374 169.321 517.536 170 515.636 170H469.367C470.084 169.999 470.804 169.742 471.379 169.219L498.003 144.961L497.969 144.922L639.634 24.115L618.975 3.41421C617.717 2.15428 618.608 0 620.386 0H689.419Z",fill:e}),p("path",{d:"M429.141 122.937L467.058 168.918C468.149 170.232 470.116 170.369 471.378 169.219L498.003 144.961L460.542 100.818C459.025 99.0305 456.798 98 454.453 98H408.341C409.234 98.0001 410.12 98.3968 410.712 99.1606L429.141 122.937Z",fill:n}),p("path",{d:"M408.341 98H408.183L408.186 98.004C408.237 98.0013 408.289 98 408.341 98Z",fill:n}),p("path",{d:"M406.393 98.721C407.695 97.606 409.664 97.8077 410.712 99.1633L429.141 123L287.318 244.087C285.872 245.322 284.033 246 282.132 246H234.53L234.55 245.983C235.353 246.062 236.187 245.818 236.839 245.236L263.577 221.345L263.461 221.208L406.393 98.721Z",fill:e}),p("path",{d:"M236.837 245.235C235.575 246.365 233.631 246.223 232.546 244.922L194.494 198.854L175.588 175.129C175.019 174.415 174.194 174.032 173.353 174.002L173.351 174H219.852C222.199 174 224.427 175.035 225.944 176.829L263.56 221.317L236.837 245.235Z",fill:n}),p("path",{d:"M175.593 175.135C174.533 173.805 172.581 173.622 171.291 174.73L4.09013 318.484C2.68329 319.693 3.53868 322 5.394 322H47.5627C49.4695 322 51.3136 321.319 52.7627 320.08L194.494 198.854L175.593 175.135Z",fill:e})]})},X4=Y4({arrowHeight:W4,presetRatios:QK,Arrow:tZ}),U4=Y4({arrowHeight:G4,presetRatios:JK,Arrow:nZ});We("list-zigzag-down",{component:X4,composites:["title","item"]}),We("list-zigzag-up",{component:U4,composites:["title","item"]});const Kh={axisColor:"#D9D9D9",axisArrowSize:5,strokeWidth:1,dashArray:"4,2",defaultExtraSpacing:20},K4=e=>{const{Title:t,Item:n,data:r,quadrantWidth:i,quadrantHeight:o,showAxis:a=!0,dashedAxis:s=!0}=e,{title:c,desc:l,items:u=[]}=r,h=t?p(t,{title:c,desc:l}):null,d=Array.from({length:4},(_,x)=>u[x]),f=d[0]?ae(p(n,{indexes:[0],data:r,datum:d[0]})):{width:0,height:0},g=i!=null?i:f.width+Kh.defaultExtraSpacing,y=o!=null?o:f.height+Kh.defaultExtraSpacing,m=iZ(g,y,f),v=d.map((_,x)=>{if(!_)return null;const w=m[x];return p(n,{indexes:[x],datum:_,data:r,x:w.x,y:w.y,positionH:x%2?"flipped":"normal",positionV:x<2?"normal":"flipped"})}).filter(Boolean),b=rZ(g,y,a,s);return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,R(Y,{width:g*2,height:y*2,children:[b,p(He,{children:v})]})]})};function rZ(e,t,n,r){if(!n)return[];const{axisColor:i,axisArrowSize:o,strokeWidth:a,dashArray:s}=Kh,c=e,l=t,u=e*2,h=t*2,d=r?s:void 0;return[p(Pe,{d:`M 0 ${l} L ${u} ${l}`,stroke:i,strokeWidth:a,strokeDasharray:d,fill:"none","data-element-type":"shape"}),R(xt,{transform:`translate(${u}, ${l})`,children:[p(Pe,{d:`M 0 0 L ${-o} ${-o/2}`,stroke:i,strokeWidth:a,fill:"none"}),p(Pe,{d:`M 0 0 L ${-o} ${o/2}`,stroke:i,strokeWidth:a,fill:"none"})]}),R(xt,{transform:`translate(0, ${l})`,children:[p(Pe,{d:`M 0 0 L ${o} ${-o/2}`,stroke:i,strokeWidth:a,fill:"none"}),p(Pe,{d:`M 0 0 L ${o} ${o/2}`,stroke:i,strokeWidth:a,fill:"none"})]}),p(Pe,{d:`M ${c} 0 L ${c} ${h}`,stroke:i,strokeWidth:a,strokeDasharray:d,fill:"none","data-element-type":"shape"}),R(xt,{transform:`translate(${c}, 0)`,children:[p(Pe,{d:`M 0 0 L ${-o/2} ${o}`,stroke:i,strokeWidth:a,fill:"none"}),p(Pe,{d:`M 0 0 L ${o/2} ${o}`,stroke:i,strokeWidth:a,fill:"none"})]}),R(xt,{transform:`translate(${c}, ${h})`,children:[p(Pe,{d:`M 0 0 L ${-o/2} ${-o}`,stroke:i,strokeWidth:a,fill:"none"}),p(Pe,{d:`M 0 0 L ${o/2} ${-o}`,stroke:i,strokeWidth:a,fill:"none"})]})]}function iZ(e,t,n){const r=e/2,i=t/2;return[{x:r-n.width/2,y:i-n.height/2},{x:e+r-n.width/2,y:i-n.height/2},{x:r-n.width/2,y:t+i-n.height/2},{x:e+r-n.width/2,y:t+i-n.height/2}]}We("quadrant",{component:K4,composites:["title","item"]});const Z4=e=>{const{Title:t,Item:n,data:r,radius:i=150,startMode:o="top"}=e,{title:a,desc:s,items:c=[]}=r,l=t?p(t,{title:a,desc:s}):null,u=ae(p(J,{indexes:[0]})),h=ae(p(n,{indexes:[0],data:r,datum:c[0],positionH:"center"})),d=[],f=[];if(c.length===0)return d.push(p(J,{indexes:[0],x:-u.width/2,y:-u.height/2})),R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[l,p(Y,{children:p(qe,{children:d})})]});const g=Math.max(h.width,h.height),y=Math.max(i,g),m=y+g/2,v=c.map(()=>{const P=h.width,$=h.height;return(P+$)/2}),b=v.reduce((P,$)=>P+$,0);let _;o==="equal"?_=-Math.PI/2:_=-Math.PI/2+2*Math.PI/c.length/2;let x=_;c.forEach((P,$)=>{const C=v[$]/b*2*Math.PI,M=x+C/2;x+=C;const S=m+y*Math.cos(M)-h.width/2,E=m+y*Math.sin(M)-h.height/2;f.push(p(n,{indexes:[$],datum:P,data:r,x:S,y:E}));const I=y-Math.max(h.width,h.height)/2-20,O=m+I*Math.cos(M)-u.width/2,T=m+I*Math.sin(M)-u.height/2;d.push(p(nt,{indexes:[$],x:O,y:T}))});const w=y-Math.max(h.width,h.height)/2-20;if(c.length>0)for(let P=0;P<c.length;P++){const $=P*2*Math.PI/c.length-Math.PI/2,C=(P+1)%c.length*2*Math.PI/c.length-Math.PI/2;let M;if(P===c.length-1){const I=C+2*Math.PI-$;M=$+I/2}else M=($+C)/2;const S=m+w*Math.cos(M)-u.width/2,E=m+w*Math.sin(M)-u.height/2;d.push(p(J,{indexes:[P+1],x:S,y:E}))}return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[l,R(Y,{children:[p(He,{children:f}),p(qe,{children:d})]})]})};We("relation-circle",{component:Z4,composites:["title","item"]});function zo(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(u){try{l(r.next(u))}catch(h){a(h)}}function c(u){try{l(r.throw(u))}catch(h){a(h)}}function l(u){u.done?o(u.value):i(u.value).then(s,c)}l((r=r.apply(e,[])).next())})}typeof SuppressedError=="function"&&SuppressedError;const oZ={abs:Math.abs,ceil:Math.ceil,floor:Math.floor,max:Math.max,min:Math.min,round:Math.round,sqrt:Math.sqrt,pow:Math.pow};class It extends Error{constructor(t,n,r){super(t),this.position=n,this.token=r,this.name="ExpressionError"}}var De;(function(e){e[e.STRING=0]="STRING",e[e.NUMBER=1]="NUMBER",e[e.BOOLEAN=2]="BOOLEAN",e[e.NULL=3]="NULL",e[e.IDENTIFIER=4]="IDENTIFIER",e[e.OPERATOR=5]="OPERATOR",e[e.FUNCTION=6]="FUNCTION",e[e.DOT=7]="DOT",e[e.BRACKET_LEFT=8]="BRACKET_LEFT",e[e.BRACKET_RIGHT=9]="BRACKET_RIGHT",e[e.PAREN_LEFT=10]="PAREN_LEFT",e[e.PAREN_RIGHT=11]="PAREN_RIGHT",e[e.COMMA=12]="COMMA",e[e.QUESTION=13]="QUESTION",e[e.COLON=14]="COLON",e[e.DOLLAR=15]="DOLLAR"})(De||(De={}));const aZ=new Set([32,9,10,13]),sZ=new Set([43,45,42,47,37,33,38,124,61,60,62]),cZ=new Map([["true",De.BOOLEAN],["false",De.BOOLEAN],["null",De.NULL]]),Zh=new Map([["===",!0],["!==",!0],["<=",!0],[">=",!0],["&&",!0],["||",!0],["+",!0],["-",!0],["*",!0],["/",!0],["%",!0],["!",!0],["<",!0],[">",!0]]),lZ=new Map([[46,De.DOT],[91,De.BRACKET_LEFT],[93,De.BRACKET_RIGHT],[40,De.PAREN_LEFT],[41,De.PAREN_RIGHT],[44,De.COMMA],[63,De.QUESTION],[58,De.COLON],[36,De.DOLLAR]]),Q4=new Map;for(const[e,t]of lZ.entries())Q4.set(e,{type:t,value:String.fromCharCode(e)});function No(e){return e>=48&&e<=57}function Qh(e){return e>=97&&e<=122||e>=65&&e<=90||e===95}function J4(e){return Qh(e)||No(e)}function uZ(e){return sZ.has(e)}var Pt;(function(e){e[e.Program=0]="Program",e[e.Literal=1]="Literal",e[e.Identifier=2]="Identifier",e[e.MemberExpression=3]="MemberExpression",e[e.CallExpression=4]="CallExpression",e[e.BinaryExpression=5]="BinaryExpression",e[e.UnaryExpression=6]="UnaryExpression",e[e.ConditionalExpression=7]="ConditionalExpression"})(Pt||(Pt={}));const hZ=new Map([["||",2],["&&",3],["===",4],["!==",4],[">",5],[">=",5],["<",5],["<=",5],["+",6],["-",6],["*",7],["/",7],["%",7],["!",8]]),dZ={type:Pt.Literal,value:null},fZ={type:Pt.Literal,value:!0},pZ={type:Pt.Literal,value:!1},gZ=e=>{let t=0;const n=e.length,r=()=>t>=n?null:e[t],i=()=>e[t++],o=h=>{const d=r();return d!==null&&d.type===h},a=h=>h.type===De.OPERATOR?hZ.get(h.value)||-1:h.type===De.DOT||h.type===De.BRACKET_LEFT?9:h.type===De.QUESTION?1:-1,s=h=>{let d,f;if(i().type===De.DOT){if(!o(De.IDENTIFIER)){const y=r();throw new It("Expected property name",t,y?y.value:"<end of input>")}const g=i();d={type:Pt.Identifier,name:g.value},f=!1}else{if(d=l(0),!o(De.BRACKET_RIGHT)){const g=r();throw new It("Expected closing bracket",t,g?g.value:"<end of input>")}i(),f=!0}return{type:Pt.MemberExpression,object:h,property:d,computed:f}},c=()=>{const h=r();if(!h)throw new It("Unexpected end of input",t,"<end of input>");if(h.type===De.OPERATOR&&(h.value==="!"||h.value==="-")){i();const d=c();return{type:Pt.UnaryExpression,operator:h.value,argument:d,prefix:!0}}switch(h.type){case De.NUMBER:return i(),{type:Pt.Literal,value:Number(h.value)};case De.STRING:return i(),{type:Pt.Literal,value:h.value};case De.BOOLEAN:return i(),h.value==="true"?fZ:pZ;case De.NULL:return i(),dZ;case De.IDENTIFIER:return i(),{type:Pt.Identifier,name:h.value};case De.FUNCTION:return(()=>{const d=i(),f=[];if(!o(De.PAREN_LEFT)){const g=r();throw new It("Expected opening parenthesis after function name",t,g?g.value:"<end of input>")}for(i();;){if(o(De.PAREN_RIGHT)){i();break}if(!r()){const y=r();throw new It("Expected closing parenthesis",t,y?y.value:"<end of input>")}if(f.length>0){if(!o(De.COMMA)){const y=r();throw new It("Expected comma between function arguments",t,y?y.value:"<end of input>")}i()}const g=l(0);f.push(g)}return{type:Pt.CallExpression,callee:{type:Pt.Identifier,name:d.value},arguments:f}})();case De.PAREN_LEFT:{i();const d=l(0);if(!o(De.PAREN_RIGHT)){const f=r();throw new It("Expected closing parenthesis",t,f?f.value:"<end of input>")}return i(),d}default:throw new It(`Unexpected token: ${h.type}`,t,h.value)}},l=(h=0)=>{let d=c();for(;t<n;){const f=e[t],g=a(f);if(g<=h)break;if(f.type!==De.QUESTION)if(f.type!==De.OPERATOR){if(f.type!==De.DOT&&f.type!==De.BRACKET_LEFT)break;d=s(d)}else{i();const y=l(g);d={type:Pt.BinaryExpression,operator:f.value,left:d,right:y}}else{i();const y=l(0);if(!o(De.COLON)){const v=r();throw new It("Expected : in conditional expression",t,v?v.value:"<end of input>")}i();const m=l(0);d={type:Pt.ConditionalExpression,test:d,consequent:y,alternate:m}}}return d},u=l();return{type:Pt.Program,body:u}},mZ=(e,t,n)=>{let r=t;n&&(r=Kt(Tt({},t),{context:Tt(Tt({},t.context),n)}));const i=o=>{switch(o.type){case Pt.Literal:return(a=>a.value)(o);case Pt.Identifier:return(a=>{if(!(a.name in r.context))throw new It(`Undefined variable: ${a.name}`);return r.context[a.name]})(o);case Pt.MemberExpression:return(a=>{const s=i(a.object);if(s==null)throw new It("Cannot access property of null or undefined");return s[a.computed?i(a.property):a.property.name]})(o);case Pt.CallExpression:return(a=>{const s=r.functions[a.callee.name];if(!s)throw new It(`Undefined function: ${a.callee.name}`);return s(...a.arguments.map((c=>i(c))))})(o);case Pt.BinaryExpression:return(a=>{if(a.operator==="&&"){const l=i(a.left);return l&&i(a.right)}if(a.operator==="||")return i(a.left)||i(a.right);const s=i(a.left),c=i(a.right);switch(a.operator){case"+":return s+c;case"-":return s-c;case"*":return s*c;case"/":return s/c;case"%":return s%c;case"===":return s===c;case"!==":return s!==c;case">":return s>c;case">=":return s>=c;case"<":return s<c;case"<=":return s<=c;default:throw new It(`Unknown operator: ${a.operator}`)}})(o);case Pt.UnaryExpression:return(a=>{const s=i(a.argument);if(a.prefix)switch(a.operator){case"!":return!s;case"-":if(typeof s!="number")throw new It(`Cannot apply unary - to non-number: ${s}`);return-s;default:throw new It(`Unknown operator: ${a.operator}`)}throw new It(`Postfix operators are not supported: ${a.operator}`)})(o);case Pt.ConditionalExpression:return(a=>{const s=i(a.test);return i(s?a.consequent:a.alternate)})(o);default:throw new It(`Evaluation error: Unsupported node type: ${o.type}`)}};return i(e.body)};function e5(e){const t=(i=>{const o=i,a=o.length,s=new Array(Math.ceil(a/3));let c=0,l=0;function u(m){const v=l+1;l++;let b="",_=!1;for(;l<a;){const x=o.charCodeAt(l);if(x===m)return _||(b=o.substring(v,l)),l++,{type:De.STRING,value:b};x===92?(_||(b=o.substring(v,l),_=!0),l++,b+=o[l]):_&&(b+=o[l]),l++}throw new It(`Unterminated string starting with ${String.fromCharCode(m)}`,l,o.substring(Math.max(0,l-10),l))}function h(){const m=l;for(o.charCodeAt(l)===45&&l++;l<a&&No(o.charCodeAt(l));)l++;if(l<a&&o.charCodeAt(l)===46)for(l++;l<a&&No(o.charCodeAt(l));)l++;const v=o.slice(m,l);return{type:De.NUMBER,value:v}}function d(){l++;const m=l;if(l<a&&Qh(o.charCodeAt(l)))for(l++;l<a&&J4(o.charCodeAt(l));)l++;const v=o.slice(m,l);return{type:De.FUNCTION,value:v}}function f(){const m=l++;for(;l<a&&J4(o.charCodeAt(l));)l++;const v=o.slice(m,l),b=cZ.get(v);return b?{type:b,value:v}:{type:De.IDENTIFIER,value:v}}function g(){if(l+2<a){const v=o.substring(l,l+3);if(Zh.has(v))return l+=3,{type:De.OPERATOR,value:v}}if(l+1<a){const v=o.substring(l,l+2);if(Zh.has(v))return l+=2,{type:De.OPERATOR,value:v}}const m=o[l];if(Zh.has(m))return l++,{type:De.OPERATOR,value:m};throw new It(`Unknown operator at position ${l}: ${o.substring(l,l+1)}`,l,o.substring(Math.max(0,l-10),l))}for(;l<a;){const m=o.charCodeAt(l);if(y=m,aZ.has(y)){l++;continue}const v=Q4.get(m);if(v)s[c++]=v,l++;else if(m!==34&&m!==39)if(No(m)||m===45&&l+1<a&&No(o.charCodeAt(l+1)))s[c++]=h();else if(m!==64)if(Qh(m))s[c++]=f();else{if(!uZ(m))throw new It(`Unexpected character: ${o[l]}`,l,o.substring(Math.max(0,l-10),l));s[c++]=g()}else s[c++]=d();else s[c++]=u(m)}var y;return c===s.length?s:s.slice(0,c)})(e),n=gZ(t),r=((i={},o={})=>({context:i,functions:o}))({},oZ);return(i={})=>mZ(n,r,i)}function yZ(e,t={}){return e5(e)(t)}function vZ(e,t){if(typeof e!="string")return;const n=e.trim();if(n)try{return e5(n),yZ(n,t)}catch(r){return}}function Oi(e){return typeof e=="number"}function t5(e){if(!e)return[0,0,0];if(Oi(e))return[e,e,e];if(Array.isArray(e)&&e.length===0)return[0,0,0];const[t,n=t,r=t]=e;return[t,n,r]}function bZ(e){return Oi(e)?!0:Array.isArray(e)?e.every(t=>Oi(t)):!1}function sn(e){return e==null}function n5(e){return typeof e=="string"}function r5(e){return typeof e=="function"}function Jh(e,t){if(typeof e=="function")return e;if(typeof e=="string"){const n=e;return(...r)=>{const i={};for(let o=0;o<t.length;o++)i[t[o]]=r[o];return vZ(n,i)}}return()=>e}function ed(e,t,n="node"){if(sn(e))return()=>t;if(n5(e)){const r=Jh(e,[n]);return i=>{const o=r(i);return Oi(o)?o:t}}return r5(e)?e:Oi(e)?()=>e:()=>t}function i5(e,t=10,n="node"){if(sn(e))return()=>t;if(n5(e)){const r=Jh(e,[n]);return i=>{const o=r(i);return bZ(o)?o:t}}return r5(e)?e:Oi(e)?()=>e:Array.isArray(e)?()=>e:()=>t}function _Z(e){var t;return[e.x,e.y,(t=e.z)!==null&&t!==void 0?t:0]}class xZ{constructor(t,n={}){this.edgeIdCounter=new Map,this.nodeMap=$Z(t.nodes,n.node),this.edgeMap=CZ(t.edges||[],n.edge,this.getEdgeId.bind(this))}data(){return{nodes:this.nodeMap,edges:this.edgeMap}}replace(t){this.nodeMap=t.nodes,this.edgeMap=t.edges,this.clearCache()}nodes(){return Array.from(this.nodeMap.values())}node(t){return this.nodeMap.get(t)}nodeAt(t){this.indexNodeCache||this.buildNodeIndexCache();const n=this.indexNodeCache.get(t);return n?this.nodeMap.get(n):void 0}nodeIndexOf(t){var n;return this.nodeIndexCache||this.buildNodeIndexCache(),(n=this.nodeIndexCache.get(t))!==null&&n!==void 0?n:-1}firstNode(){return this.nodeMap.values().next().value}forEachNode(t){let n=0;this.nodeMap.forEach(r=>t(r,n++))}originalNode(t){const n=this.nodeMap.get(t);return n==null?void 0:n._original}nodeCount(){return this.nodeMap.size}edges(){return Array.from(this.edgeMap.values())}edge(t){return this.edgeMap.get(t)}firstEdge(){return this.edgeMap.values().next().value}forEachEdge(t){let n=0;this.edgeMap.forEach(r=>t(r,n++))}originalEdge(t){const n=this.edgeMap.get(t);return n==null?void 0:n._original}edgeCount(){return this.edgeMap.size}getEdgeId(t){if(t.id)return t.id;const n=`${t.source}-${t.target}`,r=this.edgeIdCounter.get(n)||0,i=r===0?n:`${n}-${r}`;return this.edgeIdCounter.set(n,r+1),i}degree(t,n="both"){this.degreeCache||this.buildDegreeCache();const r=this.degreeCache.get(t);return r?r[n]:0}neighbors(t,n="both"){if((!this.outAdjacencyCache||!this.inAdjacencyCache)&&this.buildAdjacencyCache(),n==="out")return Array.from(this.outAdjacencyCache.get(t)||[]);if(n==="in")return Array.from(this.inAdjacencyCache.get(t)||[]);if(this.bothAdjacencyCache)return Array.from(this.bothAdjacencyCache.get(t)||[]);const r=this.inAdjacencyCache.get(t),i=this.outAdjacencyCache.get(t);if(!r&&!i)return[];if(!r)return Array.from(i);if(!i)return Array.from(r);const o=new Set;return r.forEach(a=>o.add(a)),i.forEach(a=>o.add(a)),Array.from(o)}successors(t){return this.neighbors(t,"out")}predecessors(t){return this.neighbors(t,"in")}setNodeOrder(t){const n=new Map;for(const r of t)n.set(r.id,r);this.nodeMap=n,this.nodeIndexCache=void 0,this.indexNodeCache=void 0}clearCache(){this.degreeCache=void 0,this.inAdjacencyCache=void 0,this.outAdjacencyCache=void 0,this.bothAdjacencyCache=void 0,this.nodeIndexCache=void 0,this.indexNodeCache=void 0}buildDegreeCache(){this.degreeCache=new Map;for(const t of this.edges()){const{source:n,target:r}=t;if(t.source===t.target)continue;this.degreeCache.has(n)||this.degreeCache.set(n,{in:0,out:0,both:0});const i=this.degreeCache.get(t.source);i&&(i.out++,i.both++),this.degreeCache.has(r)||this.degreeCache.set(r,{in:0,out:0,both:0});const o=this.degreeCache.get(t.target);o&&(o.in++,o.both++)}}buildAdjacencyCache(){this.inAdjacencyCache=new Map,this.outAdjacencyCache=new Map;for(const t of this.edges())!this.nodeMap.has(t.source)||!this.nodeMap.has(t.target)||(this.outAdjacencyCache.has(t.source)||this.outAdjacencyCache.set(t.source,new Set),this.outAdjacencyCache.get(t.source).add(t.target),this.inAdjacencyCache.has(t.target)||this.inAdjacencyCache.set(t.target,new Set),this.inAdjacencyCache.get(t.target).add(t.source))}buildNodeIndexCache(){this.nodeIndexCache=new Map,this.indexNodeCache=new Map;let t=0;this.nodeMap.forEach((n,r)=>{this.nodeIndexCache.set(r,t),this.indexNodeCache.set(t,r),t++})}destroy(){this.clearCache(),this.nodeMap.clear(),this.edgeMap.clear(),this.edgeIdCounter.clear()}}const wZ=["id","x","y","z","vx","vy","vz","fx","fy","fz","parentId"],PZ=["id","source","target","points"];function $Z(e,t){if(!e)throw new Error("Data.nodes is required");const n=new Map;for(const r of e){const i={_original:r};for(const o of wZ){const a=r[o];sn(a)||(i[o]=a)}if(t){const o=t(r);for(const a in o){const s=o[a];sn(s)||(i[a]=s)}}if(sn(i.id))throw new Error("Node is missing id field");n.set(i.id,i)}return n}function CZ(e,t,n){const r=new Map;for(const i of e){const o={_original:i};for(const a of PZ){const s=i[a];sn(s)||(o[a]=s)}if(t){const a=t(i);for(const s in a){const c=a[s];sn(c)||(o[s]=c)}}if(sn(o.source)||sn(o.target))throw new Error("Edge is missing source or target field");sn(o.id)&&(o.id=n==null?void 0:n(i)),r.set(o.id,o)}return r}class OZ{constructor(t,n={}){this.graph=new xZ(t,n)}export(){return this.graph.data()}replace(t){this.graph.replace(t)}forEachNode(t){this.graph.forEachNode(t)}forEachEdge(t){this.graph.forEachEdge((n,r)=>{n.sourceNode=this.graph.node(n.source),n.targetNode=this.graph.node(n.target),t(n,r)})}destroy(){this.graph.destroy()}}const o5=Symbol("Comlink.proxy"),SZ=Symbol("Comlink.endpoint"),MZ=Symbol("Comlink.releaseProxy"),td=Symbol("Comlink.finalizer"),Js=Symbol("Comlink.thrown"),a5=e=>typeof e=="object"&&e!==null||typeof e=="function",EZ={canHandle:e=>a5(e)&&e[o5],serialize(e){const{port1:t,port2:n}=new MessageChannel;return c5(e,t),[n,[n]]},deserialize(e){return e.start(),u5(e)}},IZ={canHandle:e=>a5(e)&&Js in e,serialize({value:e}){let t;return e instanceof Error?t={isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:t={isError:!1,value:e},[t,[]]},deserialize(e){throw e.isError?Object.assign(new Error(e.value.message),e.value):e.value}},s5=new Map([["proxy",EZ],["throw",IZ]]);function AZ(e,t){for(const n of e)if(t===n||n==="*"||n instanceof RegExp&&n.test(t))return!0;return!1}function c5(e,t=globalThis,n=["*"]){t.addEventListener("message",function r(i){if(!i||!i.data)return;if(!AZ(n,i.origin)){console.warn(`Invalid origin '${i.origin}' for comlink proxy`);return}const{id:o,type:a,path:s}=Object.assign({path:[]},i.data),c=(i.data.argumentList||[]).map(qr);let l;try{const u=s.slice(0,-1).reduce((d,f)=>d[f],e),h=s.reduce((d,f)=>d[f],e);switch(a){case"GET":l=h;break;case"SET":u[s.slice(-1)[0]]=qr(i.data.value),l=!0;break;case"APPLY":l=h.apply(u,c);break;case"CONSTRUCT":{const d=new h(...c);l=NZ(d)}break;case"ENDPOINT":{const{port1:d,port2:f}=new MessageChannel;c5(e,f),l=zZ(d,[d])}break;case"RELEASE":l=void 0;break;default:return}}catch(u){l={value:u,[Js]:0}}Promise.resolve(l).catch(u=>({value:u,[Js]:0})).then(u=>{const[h,d]=rc(u);t.postMessage(Object.assign(Object.assign({},h),{id:o}),d),a==="RELEASE"&&(t.removeEventListener("message",r),l5(t),td in e&&typeof e[td]=="function"&&e[td]())}).catch(u=>{const[h,d]=rc({value:new TypeError("Unserializable return value"),[Js]:0});t.postMessage(Object.assign(Object.assign({},h),{id:o}),d)})}),t.start&&t.start()}function TZ(e){return e.constructor.name==="MessagePort"}function l5(e){TZ(e)&&e.close()}function u5(e,t){const n=new Map;return e.addEventListener("message",function(i){const{data:o}=i;if(!o||!o.id)return;const a=n.get(o.id);if(a)try{a(o)}finally{n.delete(o.id)}}),nd(e,n,[],t)}function ec(e){if(e)throw new Error("Proxy has been released and is not useable")}function h5(e){return Si(e,new Map,{type:"RELEASE"}).then(()=>{l5(e)})}const tc=new WeakMap,nc="FinalizationRegistry"in globalThis&&new FinalizationRegistry(e=>{const t=(tc.get(e)||0)-1;tc.set(e,t),t===0&&h5(e)});function kZ(e,t){const n=(tc.get(t)||0)+1;tc.set(t,n),nc&&nc.register(e,t,e)}function RZ(e){nc&&nc.unregister(e)}function nd(e,t,n=[],r=function(){}){let i=!1;const o=new Proxy(r,{get(a,s){if(ec(i),s===MZ)return()=>{RZ(o),h5(e),t.clear(),i=!0};if(s==="then"){if(n.length===0)return{then:()=>o};const c=Si(e,t,{type:"GET",path:n.map(l=>l.toString())}).then(qr);return c.then.bind(c)}return nd(e,t,[...n,s])},set(a,s,c){ec(i);const[l,u]=rc(c);return Si(e,t,{type:"SET",path:[...n,s].map(h=>h.toString()),value:l},u).then(qr)},apply(a,s,c){ec(i);const l=n[n.length-1];if(l===SZ)return Si(e,t,{type:"ENDPOINT"}).then(qr);if(l==="bind")return nd(e,t,n.slice(0,-1));const[u,h]=d5(c);return Si(e,t,{type:"APPLY",path:n.map(d=>d.toString()),argumentList:u},h).then(qr)},construct(a,s){ec(i);const[c,l]=d5(s);return Si(e,t,{type:"CONSTRUCT",path:n.map(u=>u.toString()),argumentList:c},l).then(qr)}});return kZ(o,e),o}function LZ(e){return Array.prototype.concat.apply([],e)}function d5(e){const t=e.map(rc);return[t.map(n=>n[0]),LZ(t.map(n=>n[1]))]}const f5=new WeakMap;function zZ(e,t){return f5.set(e,t),e}function NZ(e){return Object.assign(e,{[o5]:!0})}function rc(e){for(const[t,n]of s5)if(n.canHandle(e)){const[r,i]=n.serialize(e);return[{type:"HANDLER",name:t,value:r},i]}return[{type:"RAW",value:e},f5.get(e)||[]]}function qr(e){switch(e.type){case"HANDLER":return s5.get(e.name).deserialize(e.value);case"RAW":return e.value}}function Si(e,t,n,r){return new Promise(i=>{const o=HZ();t.set(o,i),e.start&&e.start(),e.postMessage(Object.assign({id:o},n),r)})}function HZ(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}class DZ{constructor(){this.worker=null,this.workerApi=null}execute(t,n,r){return zo(this,void 0,void 0,function*(){if(this.worker||(yield this.initWorker()),!this.workerApi)throw new Error("Worker API not initialized");return yield this.workerApi.execute(t,n,r)})}destroy(){this.workerApi&&this.workerApi.destroy(),this.worker&&(this.worker.terminate(),this.worker=null,this.workerApi=null)}initWorker(){return zo(this,void 0,void 0,function*(){const t=this.resolveWorkerPath(),r=t.includes("/lib/")||t.endsWith(".mjs")?"module":"classic";this.worker=new Worker(t,{type:r}),this.workerApi=u5(this.worker)})}resolveWorkerPath(){if(typeof{url:typeof document=="undefined"&&typeof location=="undefined"?require("url").pathToFileURL(__filename).href:typeof document=="undefined"?location.href:dt&&dt.tagName.toUpperCase()==="SCRIPT"&&dt.src||new URL("infographic.min.js",document.baseURI).href}!="undefined"&&(typeof document=="undefined"&&typeof location=="undefined"?require("url").pathToFileURL(__filename).href:typeof document=="undefined"?location.href:dt&&dt.tagName.toUpperCase()==="SCRIPT"&&dt.src||new URL("infographic.min.js",document.baseURI).href)){const t=new URL(typeof document=="undefined"&&typeof location=="undefined"?require("url").pathToFileURL(__filename).href:typeof document=="undefined"?location.href:dt&&dt.tagName.toUpperCase()==="SCRIPT"&&dt.src||new URL("infographic.min.js",document.baseURI).href),n=t.href.replace(/\/runtime\/[^/]+\.js$/,"/worker.js");return n!==t.href?n:t.href.replace(/\/[^/]+\.js$/,"/worker.js")}if(typeof document!="undefined"){const t=document.getElementsByTagName("script");for(let n=t.length-1;n>=0;n--){const r=t[n].src;if(r&&(r.includes("index.js")||r.includes("index.min.js")))return r.replace(/index(\.min)?\.js/,"worker.js")}}return"./worker.js"}}class qZ{constructor(t){this.supervisor=null,this.initialOptions=this.mergeOptions(this.getDefaultOptions(),t)}get options(){return this.runtimeOptions||this.initialOptions}mergeOptions(t,n){return Object.assign({},t,n||{})}execute(t,n){return zo(this,void 0,void 0,function*(){this.runtimeOptions=this.mergeOptions(this.initialOptions,n);const{node:r,edge:i,enableWorker:o}=this.runtimeOptions;this.context=new OZ(t,{node:r,edge:i}),this.model=this.context.graph,o&&typeof Worker!="undefined"?yield this.layoutInWorker(t,this.runtimeOptions):yield this.layout(this.runtimeOptions)})}layoutInWorker(t,n){var r;return zo(this,void 0,void 0,function*(){try{this.supervisor||(this.supervisor=new DZ);const i=yield this.supervisor.execute(this.id,t,n);(r=this.context)===null||r===void 0||r.replace(i)}catch(i){console.error("Layout in worker failed, fallback to main thread layout.",i),yield this.layout(n)}})}forEachNode(t){this.context.forEachNode(t)}forEachEdge(t){this.context.forEachEdge(t)}destroy(){var t;(t=this.context)===null||t===void 0||t.destroy(),this.model=null,this.context=null,this.supervisor&&(this.supervisor.destroy(),this.supervisor=null)}}function jZ(e){return Array.isArray(e)}var FZ=(function(e){var t=typeof e;return e!==null&&t==="object"||t==="function"}),BZ=function(e){return typeof e=="object"&&e!==null},WZ={}.toString,p5=function(e,t){return WZ.call(e)==="[object "+t+"]"},GZ=function(e){if(!BZ(e)||!p5(e,"Object"))return!1;if(Object.getPrototypeOf(e)===null)return!0;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t},ic=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function VZ(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function rd(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var id,g5;function YZ(){if(g5)return id;g5=1;function e(){this.__data__=[],this.size=0}return id=e,id}var od,m5;function Mi(){if(m5)return od;m5=1;function e(t,n){return t===n||t!==t&&n!==n}return od=e,od}var ad,y5;function oc(){if(y5)return ad;y5=1;var e=Mi();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return ad=t,ad}var sd,v5;function XZ(){if(v5)return sd;v5=1;var e=oc(),t=Array.prototype,n=t.splice;function r(i){var o=this.__data__,a=e(o,i);if(a<0)return!1;var s=o.length-1;return a==s?o.pop():n.call(o,a,1),--this.size,!0}return sd=r,sd}var cd,b5;function UZ(){if(b5)return cd;b5=1;var e=oc();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return cd=t,cd}var ld,_5;function KZ(){if(_5)return ld;_5=1;var e=oc();function t(n){return e(this.__data__,n)>-1}return ld=t,ld}var ud,x5;function ZZ(){if(x5)return ud;x5=1;var e=oc();function t(n,r){var i=this.__data__,o=e(i,n);return o<0?(++this.size,i.push([n,r])):i[o][1]=r,this}return ud=t,ud}var hd,w5;function ac(){if(w5)return hd;w5=1;var e=YZ(),t=XZ(),n=UZ(),r=KZ(),i=ZZ();function o(a){var s=-1,c=a==null?0:a.length;for(this.clear();++s<c;){var l=a[s];this.set(l[0],l[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,hd=o,hd}var dd,P5;function QZ(){if(P5)return dd;P5=1;var e=ac();function t(){this.__data__=new e,this.size=0}return dd=t,dd}var fd,$5;function JZ(){if($5)return fd;$5=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return fd=e,fd}var pd,C5;function eQ(){if(C5)return pd;C5=1;function e(t){return this.__data__.get(t)}return pd=e,pd}var gd,O5;function tQ(){if(O5)return gd;O5=1;function e(t){return this.__data__.has(t)}return gd=e,gd}var md,S5;function M5(){if(S5)return md;S5=1;var e=typeof ic=="object"&&ic&&ic.Object===Object&&ic;return md=e,md}var yd,E5;function yn(){if(E5)return yd;E5=1;var e=M5(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return yd=n,yd}var vd,I5;function Ei(){if(I5)return vd;I5=1;var e=yn(),t=e.Symbol;return vd=t,vd}var bd,A5;function nQ(){if(A5)return bd;A5=1;var e=Ei(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function o(a){var s=n.call(a,i),c=a[i];try{a[i]=void 0;var l=!0}catch(h){}var u=r.call(a);return l&&(s?a[i]=c:delete a[i]),u}return bd=o,bd}var _d,T5;function rQ(){if(T5)return _d;T5=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return _d=n,_d}var xd,k5;function jr(){if(k5)return xd;k5=1;var e=Ei(),t=nQ(),n=rQ(),r="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function a(s){return s==null?s===void 0?i:r:o&&o in Object(s)?t(s):n(s)}return xd=a,xd}var wd,R5;function cn(){if(R5)return wd;R5=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return wd=e,wd}var Pd,L5;function Ho(){if(L5)return Pd;L5=1;var e=jr(),t=cn(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",o="[object Proxy]";function a(s){if(!t(s))return!1;var c=e(s);return c==r||c==i||c==n||c==o}return Pd=a,Pd}var $d,z5;function iQ(){if(z5)return $d;z5=1;var e=yn(),t=e["__core-js_shared__"];return $d=t,$d}var Cd,N5;function oQ(){if(N5)return Cd;N5=1;var e=iQ(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return Cd=n,Cd}var Od,H5;function D5(){if(H5)return Od;H5=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch(i){}try{return r+""}catch(i){}}return""}return Od=n,Od}var Sd,q5;function aQ(){if(q5)return Sd;q5=1;var e=Ho(),t=oQ(),n=cn(),r=D5(),i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,a=Function.prototype,s=Object.prototype,c=a.toString,l=s.hasOwnProperty,u=RegExp("^"+c.call(l).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(d){if(!n(d)||t(d))return!1;var f=e(d)?u:o;return f.test(r(d))}return Sd=h,Sd}var Md,j5;function sQ(){if(j5)return Md;j5=1;function e(t,n){return t==null?void 0:t[n]}return Md=e,Md}var Ed,F5;function Fr(){if(F5)return Ed;F5=1;var e=aQ(),t=sQ();function n(r,i){var o=t(r,i);return e(o)?o:void 0}return Ed=n,Ed}var Id,B5;function Ad(){if(B5)return Id;B5=1;var e=Fr(),t=yn(),n=e(t,"Map");return Id=n,Id}var Td,W5;function sc(){if(W5)return Td;W5=1;var e=Fr(),t=e(Object,"create");return Td=t,Td}var kd,G5;function cQ(){if(G5)return kd;G5=1;var e=sc();function t(){this.__data__=e?e(null):{},this.size=0}return kd=t,kd}var Rd,V5;function lQ(){if(V5)return Rd;V5=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Rd=e,Rd}var Ld,Y5;function uQ(){if(Y5)return Ld;Y5=1;var e=sc(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(o){var a=this.__data__;if(e){var s=a[o];return s===t?void 0:s}return r.call(a,o)?a[o]:void 0}return Ld=i,Ld}var zd,X5;function hQ(){if(X5)return zd;X5=1;var e=sc(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var o=this.__data__;return e?o[i]!==void 0:n.call(o,i)}return zd=r,zd}var Nd,U5;function dQ(){if(U5)return Nd;U5=1;var e=sc(),t="__lodash_hash_undefined__";function n(r,i){var o=this.__data__;return this.size+=this.has(r)?0:1,o[r]=e&&i===void 0?t:i,this}return Nd=n,Nd}var Hd,K5;function fQ(){if(K5)return Hd;K5=1;var e=cQ(),t=lQ(),n=uQ(),r=hQ(),i=dQ();function o(a){var s=-1,c=a==null?0:a.length;for(this.clear();++s<c;){var l=a[s];this.set(l[0],l[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,Hd=o,Hd}var Dd,Z5;function pQ(){if(Z5)return Dd;Z5=1;var e=fQ(),t=ac(),n=Ad();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return Dd=r,Dd}var qd,Q5;function gQ(){if(Q5)return qd;Q5=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return qd=e,qd}var jd,J5;function cc(){if(J5)return jd;J5=1;var e=gQ();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return jd=t,jd}var Fd,e6;function mQ(){if(e6)return Fd;e6=1;var e=cc();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return Fd=t,Fd}var Bd,t6;function yQ(){if(t6)return Bd;t6=1;var e=cc();function t(n){return e(this,n).get(n)}return Bd=t,Bd}var Wd,n6;function vQ(){if(n6)return Wd;n6=1;var e=cc();function t(n){return e(this,n).has(n)}return Wd=t,Wd}var Gd,r6;function bQ(){if(r6)return Gd;r6=1;var e=cc();function t(n,r){var i=e(this,n),o=i.size;return i.set(n,r),this.size+=i.size==o?0:1,this}return Gd=t,Gd}var Vd,i6;function Yd(){if(i6)return Vd;i6=1;var e=pQ(),t=mQ(),n=yQ(),r=vQ(),i=bQ();function o(a){var s=-1,c=a==null?0:a.length;for(this.clear();++s<c;){var l=a[s];this.set(l[0],l[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,Vd=o,Vd}var Xd,o6;function _Q(){if(o6)return Xd;o6=1;var e=ac(),t=Ad(),n=Yd(),r=200;function i(o,a){var s=this.__data__;if(s instanceof e){var c=s.__data__;if(!t||c.length<r-1)return c.push([o,a]),this.size=++s.size,this;s=this.__data__=new n(c)}return s.set(o,a),this.size=s.size,this}return Xd=i,Xd}var Ud,a6;function lc(){if(a6)return Ud;a6=1;var e=ac(),t=QZ(),n=JZ(),r=eQ(),i=tQ(),o=_Q();function a(s){var c=this.__data__=new e(s);this.size=c.size}return a.prototype.clear=t,a.prototype.delete=n,a.prototype.get=r,a.prototype.has=i,a.prototype.set=o,Ud=a,Ud}var Kd,s6;function Zd(){if(s6)return Kd;s6=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i&&n(t[r],r,t)!==!1;);return t}return Kd=e,Kd}var Qd,c6;function l6(){if(c6)return Qd;c6=1;var e=Fr(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch(r){}})();return Qd=t,Qd}var Jd,u6;function uc(){if(u6)return Jd;u6=1;var e=l6();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return Jd=t,Jd}var ef,h6;function hc(){if(h6)return ef;h6=1;var e=uc(),t=Mi(),n=Object.prototype,r=n.hasOwnProperty;function i(o,a,s){var c=o[a];(!(r.call(o,a)&&t(c,s))||s===void 0&&!(a in o))&&e(o,a,s)}return ef=i,ef}var tf,d6;function Do(){if(d6)return tf;d6=1;var e=hc(),t=uc();function n(r,i,o,a){var s=!o;o||(o={});for(var c=-1,l=i.length;++c<l;){var u=i[c],h=a?a(o[u],r[u],u,o,r):void 0;h===void 0&&(h=r[u]),s?t(o,u,h):e(o,u,h)}return o}return tf=n,tf}var nf,f6;function xQ(){if(f6)return nf;f6=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return nf=e,nf}var rf,p6;function An(){if(p6)return rf;p6=1;function e(t){return t!=null&&typeof t=="object"}return rf=e,rf}var of,g6;function wQ(){if(g6)return of;g6=1;var e=jr(),t=An(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return of=r,of}var af,m6;function qo(){if(m6)return af;m6=1;var e=wQ(),t=An(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,o=e((function(){return arguments})())?e:function(a){return t(a)&&r.call(a,"callee")&&!i.call(a,"callee")};return af=o,af}var sf,y6;function At(){if(y6)return sf;y6=1;var e=Array.isArray;return sf=e,sf}var jo={exports:{}},cf,v6;function PQ(){if(v6)return cf;v6=1;function e(){return!1}return cf=e,cf}jo.exports;var b6;function Ii(){return b6||(b6=1,(function(e,t){var n=yn(),r=PQ(),i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===i,s=a?n.Buffer:void 0,c=s?s.isBuffer:void 0,l=c||r;e.exports=l})(jo,jo.exports)),jo.exports}var lf,_6;function dc(){if(_6)return lf;_6=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var o=typeof r;return i=i==null?e:i,!!i&&(o=="number"||o!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return lf=n,lf}var uf,x6;function hf(){if(x6)return uf;x6=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return uf=t,uf}var df,w6;function $Q(){if(w6)return df;w6=1;var e=jr(),t=hf(),n=An(),r="[object Arguments]",i="[object Array]",o="[object Boolean]",a="[object Date]",s="[object Error]",c="[object Function]",l="[object Map]",u="[object Number]",h="[object Object]",d="[object RegExp]",f="[object Set]",g="[object String]",y="[object WeakMap]",m="[object ArrayBuffer]",v="[object DataView]",b="[object Float32Array]",_="[object Float64Array]",x="[object Int8Array]",w="[object Int16Array]",P="[object Int32Array]",$="[object Uint8Array]",C="[object Uint8ClampedArray]",M="[object Uint16Array]",S="[object Uint32Array]",E={};E[b]=E[_]=E[x]=E[w]=E[P]=E[$]=E[C]=E[M]=E[S]=!0,E[r]=E[i]=E[m]=E[o]=E[v]=E[a]=E[s]=E[c]=E[l]=E[u]=E[h]=E[d]=E[f]=E[g]=E[y]=!1;function I(O){return n(O)&&t(O.length)&&!!E[e(O)]}return df=I,df}var ff,P6;function fc(){if(P6)return ff;P6=1;function e(t){return function(n){return t(n)}}return ff=e,ff}var Fo={exports:{}};Fo.exports;var $6;function pf(){return $6||($6=1,(function(e,t){var n=M5(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,s=(function(){try{var c=i&&i.require&&i.require("util").types;return c||a&&a.binding&&a.binding("util")}catch(l){}})();e.exports=s})(Fo,Fo.exports)),Fo.exports}var gf,C6;function Bo(){if(C6)return gf;C6=1;var e=$Q(),t=fc(),n=pf(),r=n&&n.isTypedArray,i=r?t(r):e;return gf=i,gf}var mf,O6;function S6(){if(O6)return mf;O6=1;var e=xQ(),t=qo(),n=At(),r=Ii(),i=dc(),o=Bo(),a=Object.prototype,s=a.hasOwnProperty;function c(l,u){var h=n(l),d=!h&&t(l),f=!h&&!d&&r(l),g=!h&&!d&&!f&&o(l),y=h||d||f||g,m=y?e(l.length,String):[],v=m.length;for(var b in l)(u||s.call(l,b))&&!(y&&(b=="length"||f&&(b=="offset"||b=="parent")||g&&(b=="buffer"||b=="byteLength"||b=="byteOffset")||i(b,v)))&&m.push(b);return m}return mf=c,mf}var yf,M6;function pc(){if(M6)return yf;M6=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return yf=t,yf}var vf,E6;function I6(){if(E6)return vf;E6=1;function e(t,n){return function(r){return t(n(r))}}return vf=e,vf}var bf,A6;function CQ(){if(A6)return bf;A6=1;var e=I6(),t=e(Object.keys,Object);return bf=t,bf}var _f,T6;function xf(){if(T6)return _f;T6=1;var e=pc(),t=CQ(),n=Object.prototype,r=n.hasOwnProperty;function i(o){if(!e(o))return t(o);var a=[];for(var s in Object(o))r.call(o,s)&&s!="constructor"&&a.push(s);return a}return _f=i,_f}var wf,k6;function Wn(){if(k6)return wf;k6=1;var e=Ho(),t=hf();function n(r){return r!=null&&t(r.length)&&!e(r)}return wf=n,wf}var Pf,R6;function cr(){if(R6)return Pf;R6=1;var e=S6(),t=xf(),n=Wn();function r(i){return n(i)?e(i):t(i)}return Pf=r,Pf}var $f,L6;function OQ(){if(L6)return $f;L6=1;var e=Do(),t=cr();function n(r,i){return r&&e(i,t(i),r)}return $f=n,$f}var Cf,z6;function SQ(){if(z6)return Cf;z6=1;function e(t){var n=[];if(t!=null)for(var r in Object(t))n.push(r);return n}return Cf=e,Cf}var Of,N6;function MQ(){if(N6)return Of;N6=1;var e=cn(),t=pc(),n=SQ(),r=Object.prototype,i=r.hasOwnProperty;function o(a){if(!e(a))return n(a);var s=t(a),c=[];for(var l in a)l=="constructor"&&(s||!i.call(a,l))||c.push(l);return c}return Of=o,Of}var Sf,H6;function Br(){if(H6)return Sf;H6=1;var e=S6(),t=MQ(),n=Wn();function r(i){return n(i)?e(i,!0):t(i)}return Sf=r,Sf}var Mf,D6;function EQ(){if(D6)return Mf;D6=1;var e=Do(),t=Br();function n(r,i){return r&&e(i,t(i),r)}return Mf=n,Mf}var Wo={exports:{}};Wo.exports;var q6;function j6(){return q6||(q6=1,(function(e,t){var n=yn(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o?n.Buffer:void 0,s=a?a.allocUnsafe:void 0;function c(l,u){if(u)return l.slice();var h=l.length,d=s?s(h):new l.constructor(h);return l.copy(d),d}e.exports=c})(Wo,Wo.exports)),Wo.exports}var Ef,F6;function B6(){if(F6)return Ef;F6=1;function e(t,n){var r=-1,i=t.length;for(n||(n=Array(i));++r<i;)n[r]=t[r];return n}return Ef=e,Ef}var If,W6;function G6(){if(W6)return If;W6=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,o=0,a=[];++r<i;){var s=t[r];n(s,r,t)&&(a[o++]=s)}return a}return If=e,If}var Af,V6;function Y6(){if(V6)return Af;V6=1;function e(){return[]}return Af=e,Af}var Tf,X6;function kf(){if(X6)return Tf;X6=1;var e=G6(),t=Y6(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,o=i?function(a){return a==null?[]:(a=Object(a),e(i(a),function(s){return r.call(a,s)}))}:t;return Tf=o,Tf}var Rf,U6;function IQ(){if(U6)return Rf;U6=1;var e=Do(),t=kf();function n(r,i){return e(r,t(r),i)}return Rf=n,Rf}var Lf,K6;function zf(){if(K6)return Lf;K6=1;function e(t,n){for(var r=-1,i=n.length,o=t.length;++r<i;)t[o+r]=n[r];return t}return Lf=e,Lf}var Nf,Z6;function gc(){if(Z6)return Nf;Z6=1;var e=I6(),t=e(Object.getPrototypeOf,Object);return Nf=t,Nf}var Hf,Q6;function J6(){if(Q6)return Hf;Q6=1;var e=zf(),t=gc(),n=kf(),r=Y6(),i=Object.getOwnPropertySymbols,o=i?function(a){for(var s=[];a;)e(s,n(a)),a=t(a);return s}:r;return Hf=o,Hf}var Df,e7;function AQ(){if(e7)return Df;e7=1;var e=Do(),t=J6();function n(r,i){return e(r,t(r),i)}return Df=n,Df}var qf,t7;function n7(){if(t7)return qf;t7=1;var e=zf(),t=At();function n(r,i,o){var a=i(r);return t(r)?a:e(a,o(r))}return qf=n,qf}var jf,r7;function i7(){if(r7)return jf;r7=1;var e=n7(),t=kf(),n=cr();function r(i){return e(i,n,t)}return jf=r,jf}var Ff,o7;function TQ(){if(o7)return Ff;o7=1;var e=n7(),t=J6(),n=Br();function r(i){return e(i,n,t)}return Ff=r,Ff}var Bf,a7;function kQ(){if(a7)return Bf;a7=1;var e=Fr(),t=yn(),n=e(t,"DataView");return Bf=n,Bf}var Wf,s7;function RQ(){if(s7)return Wf;s7=1;var e=Fr(),t=yn(),n=e(t,"Promise");return Wf=n,Wf}var Gf,c7;function l7(){if(c7)return Gf;c7=1;var e=Fr(),t=yn(),n=e(t,"Set");return Gf=n,Gf}var Vf,u7;function LQ(){if(u7)return Vf;u7=1;var e=Fr(),t=yn(),n=e(t,"WeakMap");return Vf=n,Vf}var Yf,h7;function Ai(){if(h7)return Yf;h7=1;var e=kQ(),t=Ad(),n=RQ(),r=l7(),i=LQ(),o=jr(),a=D5(),s="[object Map]",c="[object Object]",l="[object Promise]",u="[object Set]",h="[object WeakMap]",d="[object DataView]",f=a(e),g=a(t),y=a(n),m=a(r),v=a(i),b=o;return(e&&b(new e(new ArrayBuffer(1)))!=d||t&&b(new t)!=s||n&&b(n.resolve())!=l||r&&b(new r)!=u||i&&b(new i)!=h)&&(b=function(_){var x=o(_),w=x==c?_.constructor:void 0,P=w?a(w):"";if(P)switch(P){case f:return d;case g:return s;case y:return l;case m:return u;case v:return h}return x}),Yf=b,Yf}var Xf,d7;function zQ(){if(d7)return Xf;d7=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r){var i=r.length,o=new r.constructor(i);return i&&typeof r[0]=="string"&&t.call(r,"index")&&(o.index=r.index,o.input=r.input),o}return Xf=n,Xf}var Uf,f7;function p7(){if(f7)return Uf;f7=1;var e=yn(),t=e.Uint8Array;return Uf=t,Uf}var Kf,g7;function Zf(){if(g7)return Kf;g7=1;var e=p7();function t(n){var r=new n.constructor(n.byteLength);return new e(r).set(new e(n)),r}return Kf=t,Kf}var Qf,m7;function NQ(){if(m7)return Qf;m7=1;var e=Zf();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.byteLength)}return Qf=t,Qf}var Jf,y7;function HQ(){if(y7)return Jf;y7=1;var e=/\w*$/;function t(n){var r=new n.constructor(n.source,e.exec(n));return r.lastIndex=n.lastIndex,r}return Jf=t,Jf}var ep,v7;function DQ(){if(v7)return ep;v7=1;var e=Ei(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;function r(i){return n?Object(n.call(i)):{}}return ep=r,ep}var tp,b7;function _7(){if(b7)return tp;b7=1;var e=Zf();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.length)}return tp=t,tp}var np,x7;function qQ(){if(x7)return np;x7=1;var e=Zf(),t=NQ(),n=HQ(),r=DQ(),i=_7(),o="[object Boolean]",a="[object Date]",s="[object Map]",c="[object Number]",l="[object RegExp]",u="[object Set]",h="[object String]",d="[object Symbol]",f="[object ArrayBuffer]",g="[object DataView]",y="[object Float32Array]",m="[object Float64Array]",v="[object Int8Array]",b="[object Int16Array]",_="[object Int32Array]",x="[object Uint8Array]",w="[object Uint8ClampedArray]",P="[object Uint16Array]",$="[object Uint32Array]";function C(M,S,E){var I=M.constructor;switch(S){case f:return e(M);case o:case a:return new I(+M);case g:return t(M,E);case y:case m:case v:case b:case _:case x:case w:case P:case $:return i(M,E);case s:return new I;case c:case h:return new I(M);case l:return n(M);case u:return new I;case d:return r(M)}}return np=C,np}var rp,w7;function P7(){if(w7)return rp;w7=1;var e=cn(),t=Object.create,n=(function(){function r(){}return function(i){if(!e(i))return{};if(t)return t(i);r.prototype=i;var o=new r;return r.prototype=void 0,o}})();return rp=n,rp}var ip,$7;function C7(){if($7)return ip;$7=1;var e=P7(),t=gc(),n=pc();function r(i){return typeof i.constructor=="function"&&!n(i)?e(t(i)):{}}return ip=r,ip}var op,O7;function jQ(){if(O7)return op;O7=1;var e=Ai(),t=An(),n="[object Map]";function r(i){return t(i)&&e(i)==n}return op=r,op}var ap,S7;function FQ(){if(S7)return ap;S7=1;var e=jQ(),t=fc(),n=pf(),r=n&&n.isMap,i=r?t(r):e;return ap=i,ap}var sp,M7;function BQ(){if(M7)return sp;M7=1;var e=Ai(),t=An(),n="[object Set]";function r(i){return t(i)&&e(i)==n}return sp=r,sp}var cp,E7;function WQ(){if(E7)return cp;E7=1;var e=BQ(),t=fc(),n=pf(),r=n&&n.isSet,i=r?t(r):e;return cp=i,cp}var lp,I7;function A7(){if(I7)return lp;I7=1;var e=lc(),t=Zd(),n=hc(),r=OQ(),i=EQ(),o=j6(),a=B6(),s=IQ(),c=AQ(),l=i7(),u=TQ(),h=Ai(),d=zQ(),f=qQ(),g=C7(),y=At(),m=Ii(),v=FQ(),b=cn(),_=WQ(),x=cr(),w=Br(),P=1,$=2,C=4,M="[object Arguments]",S="[object Array]",E="[object Boolean]",I="[object Date]",O="[object Error]",T="[object Function]",F="[object GeneratorFunction]",z="[object Map]",j="[object Number]",H="[object Object]",W="[object RegExp]",B="[object Set]",X="[object String]",D="[object Symbol]",k="[object WeakMap]",A="[object ArrayBuffer]",L="[object DataView]",N="[object Float32Array]",q="[object Float64Array]",G="[object Int8Array]",U="[object Int16Array]",K="[object Int32Array]",ne="[object Uint8Array]",ee="[object Uint8ClampedArray]",se="[object Uint16Array]",ce="[object Uint32Array]",Z={};Z[M]=Z[S]=Z[A]=Z[L]=Z[E]=Z[I]=Z[N]=Z[q]=Z[G]=Z[U]=Z[K]=Z[z]=Z[j]=Z[H]=Z[W]=Z[B]=Z[X]=Z[D]=Z[ne]=Z[ee]=Z[se]=Z[ce]=!0,Z[O]=Z[T]=Z[k]=!1;function le(te,Q,re,ie,ue,he){var fe,me=Q&P,pe=Q&$,_e=Q&C;if(re&&(fe=ue?re(te,ie,ue,he):re(te)),fe!==void 0)return fe;if(!b(te))return te;var Ce=y(te);if(Ce){if(fe=d(te),!me)return a(te,fe)}else{var Me=h(te),$e=Me==T||Me==F;if(m(te))return o(te,me);if(Me==H||Me==M||$e&&!ue){if(fe=pe||$e?{}:g(te),!me)return pe?c(te,i(fe,te)):s(te,r(fe,te))}else{if(!Z[Me])return ue?te:{};fe=f(te,Me,me)}}he||(he=new e);var Re=he.get(te);if(Re)return Re;he.set(te,fe),_(te)?te.forEach(function(Ye){fe.add(le(Ye,Q,re,Ye,te,he))}):v(te)&&te.forEach(function(Ye,de){fe.set(de,le(Ye,Q,re,de,te,he))});var Fe=_e?pe?u:l:pe?w:x,Be=Ce?void 0:Fe(te);return t(Be||te,function(Ye,de){Be&&(de=Ye,Ye=te[de]),n(fe,de,le(Ye,Q,re,de,te,he))}),fe}return lp=le,lp}var up,T7;function GQ(){if(T7)return up;T7=1;var e=A7(),t=4;function n(r){return e(r,t)}return up=n,up}var hp,k7;function dp(){if(k7)return hp;k7=1;function e(t){return function(){return t}}return hp=e,hp}var fp,R7;function VQ(){if(R7)return fp;R7=1;function e(t){return function(n,r,i){for(var o=-1,a=Object(n),s=i(n),c=s.length;c--;){var l=s[t?c:++o];if(r(a[l],l,a)===!1)break}return n}}return fp=e,fp}var pp,L7;function gp(){if(L7)return pp;L7=1;var e=VQ(),t=e();return pp=t,pp}var mp,z7;function yp(){if(z7)return mp;z7=1;var e=gp(),t=cr();function n(r,i){return r&&e(r,i,t)}return mp=n,mp}var vp,N7;function YQ(){if(N7)return vp;N7=1;var e=Wn();function t(n,r){return function(i,o){if(i==null)return i;if(!e(i))return n(i,o);for(var a=i.length,s=r?a:-1,c=Object(i);(r?s--:++s<a)&&o(c[s],s,c)!==!1;);return i}}return vp=t,vp}var bp,H7;function mc(){if(H7)return bp;H7=1;var e=yp(),t=YQ(),n=t(e);return bp=n,bp}var _p,D7;function Wr(){if(D7)return _p;D7=1;function e(t){return t}return _p=e,_p}var xp,q7;function j7(){if(q7)return xp;q7=1;var e=Wr();function t(n){return typeof n=="function"?n:e}return xp=t,xp}var wp,F7;function B7(){if(F7)return wp;F7=1;var e=Zd(),t=mc(),n=j7(),r=At();function i(o,a){var s=r(o)?e:t;return s(o,n(a))}return wp=i,wp}var Pp,W7;function G7(){return W7||(W7=1,Pp=B7()),Pp}var $p,V7;function XQ(){if(V7)return $p;V7=1;var e=mc();function t(n,r){var i=[];return e(n,function(o,a,s){r(o,a,s)&&i.push(o)}),i}return $p=t,$p}var Cp,Y7;function UQ(){if(Y7)return Cp;Y7=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return Cp=t,Cp}var Op,X7;function KQ(){if(X7)return Op;X7=1;function e(t){return this.__data__.has(t)}return Op=e,Op}var Sp,U7;function K7(){if(U7)return Sp;U7=1;var e=Yd(),t=UQ(),n=KQ();function r(i){var o=-1,a=i==null?0:i.length;for(this.__data__=new e;++o<a;)this.add(i[o])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,Sp=r,Sp}var Mp,Z7;function ZQ(){if(Z7)return Mp;Z7=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return Mp=e,Mp}var Ep,Q7;function J7(){if(Q7)return Ep;Q7=1;function e(t,n){return t.has(n)}return Ep=e,Ep}var Ip,e9;function t9(){if(e9)return Ip;e9=1;var e=K7(),t=ZQ(),n=J7(),r=1,i=2;function o(a,s,c,l,u,h){var d=c&r,f=a.length,g=s.length;if(f!=g&&!(d&&g>f))return!1;var y=h.get(a),m=h.get(s);if(y&&m)return y==s&&m==a;var v=-1,b=!0,_=c&i?new e:void 0;for(h.set(a,s),h.set(s,a);++v<f;){var x=a[v],w=s[v];if(l)var P=d?l(w,x,v,s,a,h):l(x,w,v,a,s,h);if(P!==void 0){if(P)continue;b=!1;break}if(_){if(!t(s,function($,C){if(!n(_,C)&&(x===$||u(x,$,c,l,h)))return _.push(C)})){b=!1;break}}else if(!(x===w||u(x,w,c,l,h))){b=!1;break}}return h.delete(a),h.delete(s),b}return Ip=o,Ip}var Ap,n9;function QQ(){if(n9)return Ap;n9=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,o){r[++n]=[o,i]}),r}return Ap=e,Ap}var Tp,r9;function kp(){if(r9)return Tp;r9=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return Tp=e,Tp}var Rp,i9;function JQ(){if(i9)return Rp;i9=1;var e=Ei(),t=p7(),n=Mi(),r=t9(),i=QQ(),o=kp(),a=1,s=2,c="[object Boolean]",l="[object Date]",u="[object Error]",h="[object Map]",d="[object Number]",f="[object RegExp]",g="[object Set]",y="[object String]",m="[object Symbol]",v="[object ArrayBuffer]",b="[object DataView]",_=e?e.prototype:void 0,x=_?_.valueOf:void 0;function w(P,$,C,M,S,E,I){switch(C){case b:if(P.byteLength!=$.byteLength||P.byteOffset!=$.byteOffset)return!1;P=P.buffer,$=$.buffer;case v:return!(P.byteLength!=$.byteLength||!E(new t(P),new t($)));case c:case l:case d:return n(+P,+$);case u:return P.name==$.name&&P.message==$.message;case f:case y:return P==$+"";case h:var O=i;case g:var T=M&a;if(O||(O=o),P.size!=$.size&&!T)return!1;var F=I.get(P);if(F)return F==$;M|=s,I.set(P,$);var z=r(O(P),O($),M,S,E,I);return I.delete(P),z;case m:if(x)return x.call(P)==x.call($)}return!1}return Rp=w,Rp}var Lp,o9;function eJ(){if(o9)return Lp;o9=1;var e=i7(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(o,a,s,c,l,u){var h=s&t,d=e(o),f=d.length,g=e(a),y=g.length;if(f!=y&&!h)return!1;for(var m=f;m--;){var v=d[m];if(!(h?v in a:r.call(a,v)))return!1}var b=u.get(o),_=u.get(a);if(b&&_)return b==a&&_==o;var x=!0;u.set(o,a),u.set(a,o);for(var w=h;++m<f;){v=d[m];var P=o[v],$=a[v];if(c)var C=h?c($,P,v,a,o,u):c(P,$,v,o,a,u);if(!(C===void 0?P===$||l(P,$,s,c,u):C)){x=!1;break}w||(w=v=="constructor")}if(x&&!w){var M=o.constructor,S=a.constructor;M!=S&&"constructor"in o&&"constructor"in a&&!(typeof M=="function"&&M instanceof M&&typeof S=="function"&&S instanceof S)&&(x=!1)}return u.delete(o),u.delete(a),x}return Lp=i,Lp}var zp,a9;function tJ(){if(a9)return zp;a9=1;var e=lc(),t=t9(),n=JQ(),r=eJ(),i=Ai(),o=At(),a=Ii(),s=Bo(),c=1,l="[object Arguments]",u="[object Array]",h="[object Object]",d=Object.prototype,f=d.hasOwnProperty;function g(y,m,v,b,_,x){var w=o(y),P=o(m),$=w?u:i(y),C=P?u:i(m);$=$==l?h:$,C=C==l?h:C;var M=$==h,S=C==h,E=$==C;if(E&&a(y)){if(!a(m))return!1;w=!0,M=!1}if(E&&!M)return x||(x=new e),w||s(y)?t(y,m,v,b,_,x):n(y,m,$,v,b,_,x);if(!(v&c)){var I=M&&f.call(y,"__wrapped__"),O=S&&f.call(m,"__wrapped__");if(I||O){var T=I?y.value():y,F=O?m.value():m;return x||(x=new e),_(T,F,v,b,x)}}return E?(x||(x=new e),r(y,m,v,b,_,x)):!1}return zp=g,zp}var Np,s9;function c9(){if(s9)return Np;s9=1;var e=tJ(),t=An();function n(r,i,o,a,s){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,o,a,n,s)}return Np=n,Np}var Hp,l9;function nJ(){if(l9)return Hp;l9=1;var e=lc(),t=c9(),n=1,r=2;function i(o,a,s,c){var l=s.length,u=l,h=!c;if(o==null)return!u;for(o=Object(o);l--;){var d=s[l];if(h&&d[2]?d[1]!==o[d[0]]:!(d[0]in o))return!1}for(;++l<u;){d=s[l];var f=d[0],g=o[f],y=d[1];if(h&&d[2]){if(g===void 0&&!(f in o))return!1}else{var m=new e;if(c)var v=c(g,y,f,o,a,m);if(!(v===void 0?t(y,g,n|r,c,m):v))return!1}}return!0}return Hp=i,Hp}var Dp,u9;function h9(){if(u9)return Dp;u9=1;var e=cn();function t(n){return n===n&&!e(n)}return Dp=t,Dp}var qp,d9;function rJ(){if(d9)return qp;d9=1;var e=h9(),t=cr();function n(r){for(var i=t(r),o=i.length;o--;){var a=i[o],s=r[a];i[o]=[a,s,e(s)]}return i}return qp=n,qp}var jp,f9;function p9(){if(f9)return jp;f9=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return jp=e,jp}var Fp,g9;function iJ(){if(g9)return Fp;g9=1;var e=nJ(),t=rJ(),n=p9();function r(i){var o=t(i);return o.length==1&&o[0][2]?n(o[0][0],o[0][1]):function(a){return a===i||e(a,i,o)}}return Fp=r,Fp}var Bp,m9;function Ti(){if(m9)return Bp;m9=1;var e=jr(),t=An(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return Bp=r,Bp}var Wp,y9;function Gp(){if(y9)return Wp;y9=1;var e=At(),t=Ti(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(o,a){if(e(o))return!1;var s=typeof o;return s=="number"||s=="symbol"||s=="boolean"||o==null||t(o)?!0:r.test(o)||!n.test(o)||a!=null&&o in Object(a)}return Wp=i,Wp}var Vp,v9;function oJ(){if(v9)return Vp;v9=1;var e=Yd(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var o=function(){var a=arguments,s=i?i.apply(this,a):a[0],c=o.cache;if(c.has(s))return c.get(s);var l=r.apply(this,a);return o.cache=c.set(s,l)||c,l};return o.cache=new(n.Cache||e),o}return n.Cache=e,Vp=n,Vp}var Yp,b9;function aJ(){if(b9)return Yp;b9=1;var e=oJ(),t=500;function n(r){var i=e(r,function(a){return o.size===t&&o.clear(),a}),o=i.cache;return i}return Yp=n,Yp}var Xp,_9;function sJ(){if(_9)return Xp;_9=1;var e=aJ(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(t,function(a,s,c,l){o.push(c?l.replace(n,"$1"):s||a)}),o});return Xp=r,Xp}var Up,x9;function yc(){if(x9)return Up;x9=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,o=Array(i);++r<i;)o[r]=n(t[r],r,t);return o}return Up=e,Up}var Kp,w9;function cJ(){if(w9)return Kp;w9=1;var e=Ei(),t=yc(),n=At(),r=Ti(),i=e?e.prototype:void 0,o=i?i.toString:void 0;function a(s){if(typeof s=="string")return s;if(n(s))return t(s,a)+"";if(r(s))return o?o.call(s):"";var c=s+"";return c=="0"&&1/s==-1/0?"-0":c}return Kp=a,Kp}var Zp,P9;function $9(){if(P9)return Zp;P9=1;var e=cJ();function t(n){return n==null?"":e(n)}return Zp=t,Zp}var Qp,C9;function vc(){if(C9)return Qp;C9=1;var e=At(),t=Gp(),n=sJ(),r=$9();function i(o,a){return e(o)?o:t(o,a)?[o]:n(r(o))}return Qp=i,Qp}var Jp,O9;function Go(){if(O9)return Jp;O9=1;var e=Ti();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return Jp=t,Jp}var e0,S9;function bc(){if(S9)return e0;S9=1;var e=vc(),t=Go();function n(r,i){i=e(i,r);for(var o=0,a=i.length;r!=null&&o<a;)r=r[t(i[o++])];return o&&o==a?r:void 0}return e0=n,e0}var t0,M9;function lJ(){if(M9)return t0;M9=1;var e=bc();function t(n,r,i){var o=n==null?void 0:e(n,r);return o===void 0?i:o}return t0=t,t0}var n0,E9;function uJ(){if(E9)return n0;E9=1;function e(t,n){return t!=null&&n in Object(t)}return n0=e,n0}var r0,I9;function A9(){if(I9)return r0;I9=1;var e=vc(),t=qo(),n=At(),r=dc(),i=hf(),o=Go();function a(s,c,l){c=e(c,s);for(var u=-1,h=c.length,d=!1;++u<h;){var f=o(c[u]);if(!(d=s!=null&&l(s,f)))break;s=s[f]}return d||++u!=h?d:(h=s==null?0:s.length,!!h&&i(h)&&r(f,h)&&(n(s)||t(s)))}return r0=a,r0}var i0,T9;function k9(){if(T9)return i0;T9=1;var e=uJ(),t=A9();function n(r,i){return r!=null&&t(r,i,e)}return i0=n,i0}var o0,R9;function hJ(){if(R9)return o0;R9=1;var e=c9(),t=lJ(),n=k9(),r=Gp(),i=h9(),o=p9(),a=Go(),s=1,c=2;function l(u,h){return r(u)&&i(h)?o(a(u),h):function(d){var f=t(d,u);return f===void 0&&f===h?n(d,u):e(h,f,s|c)}}return o0=l,o0}var a0,L9;function z9(){if(L9)return a0;L9=1;function e(t){return function(n){return n==null?void 0:n[t]}}return a0=e,a0}var s0,N9;function dJ(){if(N9)return s0;N9=1;var e=bc();function t(n){return function(r){return e(r,n)}}return s0=t,s0}var c0,H9;function fJ(){if(H9)return c0;H9=1;var e=z9(),t=dJ(),n=Gp(),r=Go();function i(o){return n(o)?e(r(o)):t(o)}return c0=i,c0}var l0,D9;function Gn(){if(D9)return l0;D9=1;var e=iJ(),t=hJ(),n=Wr(),r=At(),i=fJ();function o(a){return typeof a=="function"?a:a==null?n:typeof a=="object"?r(a)?t(a[0],a[1]):e(a):i(a)}return l0=o,l0}var u0,q9;function j9(){if(q9)return u0;q9=1;var e=G6(),t=XQ(),n=Gn(),r=At();function i(o,a){var s=r(o)?e:t;return s(o,n(a,3))}return u0=i,u0}var h0,F9;function pJ(){if(F9)return h0;F9=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r,i){return r!=null&&t.call(r,i)}return h0=n,h0}var d0,B9;function W9(){if(B9)return d0;B9=1;var e=pJ(),t=A9();function n(r,i){return r!=null&&t(r,i,e)}return d0=n,d0}var f0,G9;function gJ(){if(G9)return f0;G9=1;var e=xf(),t=Ai(),n=qo(),r=At(),i=Wn(),o=Ii(),a=pc(),s=Bo(),c="[object Map]",l="[object Set]",u=Object.prototype,h=u.hasOwnProperty;function d(f){if(f==null)return!0;if(i(f)&&(r(f)||typeof f=="string"||typeof f.splice=="function"||o(f)||s(f)||n(f)))return!f.length;var g=t(f);if(g==c||g==l)return!f.size;if(a(f))return!e(f).length;for(var y in f)if(h.call(f,y))return!1;return!0}return f0=d,f0}var p0,V9;function Y9(){if(V9)return p0;V9=1;function e(t){return t===void 0}return p0=e,p0}var g0,X9;function U9(){if(X9)return g0;X9=1;var e=mc(),t=Wn();function n(r,i){var o=-1,a=t(r)?Array(r.length):[];return e(r,function(s,c,l){a[++o]=i(s,c,l)}),a}return g0=n,g0}var m0,K9;function Z9(){if(K9)return m0;K9=1;var e=yc(),t=Gn(),n=U9(),r=At();function i(o,a){var s=r(o)?e:n;return s(o,t(a,3))}return m0=i,m0}var y0,Q9;function mJ(){if(Q9)return y0;Q9=1;function e(t,n,r,i){var o=-1,a=t==null?0:t.length;for(i&&a&&(r=t[++o]);++o<a;)r=n(r,t[o],o,t);return r}return y0=e,y0}var v0,J9;function yJ(){if(J9)return v0;J9=1;function e(t,n,r,i,o){return o(t,function(a,s,c){r=i?(i=!1,a):n(r,a,s,c)}),r}return v0=e,v0}var b0,e8;function t8(){if(e8)return b0;e8=1;var e=mJ(),t=mc(),n=Gn(),r=yJ(),i=At();function o(a,s,c){var l=i(a)?e:r,u=arguments.length<3;return l(a,n(s,4),c,u,t)}return b0=o,b0}var _0,n8;function vJ(){if(n8)return _0;n8=1;var e=jr(),t=At(),n=An(),r="[object String]";function i(o){return typeof o=="string"||!t(o)&&n(o)&&e(o)==r}return _0=i,_0}var x0,r8;function bJ(){if(r8)return x0;r8=1;var e=z9(),t=e("length");return x0=t,x0}var w0,i8;function _J(){if(i8)return w0;i8=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,o="\\ufe0e\\ufe0f",a="\\u200d",s=RegExp("["+a+e+i+o+"]");function c(l){return s.test(l)}return w0=c,w0}var P0,o8;function xJ(){if(o8)return P0;o8=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,o="\\ufe0e\\ufe0f",a="["+e+"]",s="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",l="(?:"+s+"|"+c+")",u="[^"+e+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",d="[\\ud800-\\udbff][\\udc00-\\udfff]",f="\\u200d",g=l+"?",y="["+o+"]?",m="(?:"+f+"(?:"+[u,h,d].join("|")+")"+y+g+")*",v=y+g+m,b="(?:"+[u+s+"?",s,h,d,a].join("|")+")",_=RegExp(c+"(?="+c+")|"+b+v,"g");function x(w){for(var P=_.lastIndex=0;_.test(w);)++P;return P}return P0=x,P0}var $0,a8;function wJ(){if(a8)return $0;a8=1;var e=bJ(),t=_J(),n=xJ();function r(i){return t(i)?n(i):e(i)}return $0=r,$0}var C0,s8;function PJ(){if(s8)return C0;s8=1;var e=xf(),t=Ai(),n=Wn(),r=vJ(),i=wJ(),o="[object Map]",a="[object Set]";function s(c){if(c==null)return 0;if(n(c))return r(c)?i(c):c.length;var l=t(c);return l==o||l==a?c.size:e(c).length}return C0=s,C0}var O0,c8;function $J(){if(c8)return O0;c8=1;var e=Zd(),t=P7(),n=yp(),r=Gn(),i=gc(),o=At(),a=Ii(),s=Ho(),c=cn(),l=Bo();function u(h,d,f){var g=o(h),y=g||a(h)||l(h);if(d=r(d,4),f==null){var m=h&&h.constructor;y?f=g?new m:[]:c(h)?f=s(m)?t(i(h)):{}:f={}}return(y?e:n)(h,function(v,b,_){return d(f,v,b,_)}),f}return O0=u,O0}var S0,l8;function CJ(){if(l8)return S0;l8=1;var e=Ei(),t=qo(),n=At(),r=e?e.isConcatSpreadable:void 0;function i(o){return n(o)||t(o)||!!(r&&o&&o[r])}return S0=i,S0}var M0,u8;function E0(){if(u8)return M0;u8=1;var e=zf(),t=CJ();function n(r,i,o,a,s){var c=-1,l=r.length;for(o||(o=t),s||(s=[]);++c<l;){var u=r[c];i>0&&o(u)?i>1?n(u,i-1,o,a,s):e(s,u):a||(s[s.length]=u)}return s}return M0=n,M0}var I0,h8;function OJ(){if(h8)return I0;h8=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return I0=e,I0}var A0,d8;function f8(){if(d8)return A0;d8=1;var e=OJ(),t=Math.max;function n(r,i,o){return i=t(i===void 0?r.length-1:i,0),function(){for(var a=arguments,s=-1,c=t(a.length-i,0),l=Array(c);++s<c;)l[s]=a[i+s];s=-1;for(var u=Array(i+1);++s<i;)u[s]=a[s];return u[i]=o(l),e(r,this,u)}}return A0=n,A0}var T0,p8;function SJ(){if(p8)return T0;p8=1;var e=dp(),t=l6(),n=Wr(),r=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:n;return T0=r,T0}var k0,g8;function MJ(){if(g8)return k0;g8=1;var e=800,t=16,n=Date.now;function r(i){var o=0,a=0;return function(){var s=n(),c=t-(s-a);if(a=s,c>0){if(++o>=e)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}return k0=r,k0}var R0,m8;function y8(){if(m8)return R0;m8=1;var e=SJ(),t=MJ(),n=t(e);return R0=n,R0}var L0,v8;function _c(){if(v8)return L0;v8=1;var e=Wr(),t=f8(),n=y8();function r(i,o){return n(t(i,o,e),i+"")}return L0=r,L0}var z0,b8;function _8(){if(b8)return z0;b8=1;function e(t,n,r,i){for(var o=t.length,a=r+(i?1:-1);i?a--:++a<o;)if(n(t[a],a,t))return a;return-1}return z0=e,z0}var N0,x8;function EJ(){if(x8)return N0;x8=1;function e(t){return t!==t}return N0=e,N0}var H0,w8;function IJ(){if(w8)return H0;w8=1;function e(t,n,r){for(var i=r-1,o=t.length;++i<o;)if(t[i]===n)return i;return-1}return H0=e,H0}var D0,P8;function AJ(){if(P8)return D0;P8=1;var e=_8(),t=EJ(),n=IJ();function r(i,o,a){return o===o?n(i,o,a):e(i,t,a)}return D0=r,D0}var q0,$8;function TJ(){if($8)return q0;$8=1;var e=AJ();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return q0=t,q0}var j0,C8;function kJ(){if(C8)return j0;C8=1;function e(t,n,r){for(var i=-1,o=t==null?0:t.length;++i<o;)if(r(n,t[i]))return!0;return!1}return j0=e,j0}var F0,O8;function RJ(){if(O8)return F0;O8=1;function e(){}return F0=e,F0}var B0,S8;function LJ(){if(S8)return B0;S8=1;var e=l7(),t=RJ(),n=kp(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(o){return new e(o)}:t;return B0=i,B0}var W0,M8;function zJ(){if(M8)return W0;M8=1;var e=K7(),t=TJ(),n=kJ(),r=J7(),i=LJ(),o=kp(),a=200;function s(c,l,u){var h=-1,d=t,f=c.length,g=!0,y=[],m=y;if(u)g=!1,d=n;else if(f>=a){var v=l?null:i(c);if(v)return o(v);g=!1,d=r,m=new e}else m=l?[]:y;e:for(;++h<f;){var b=c[h],_=l?l(b):b;if(b=u||b!==0?b:0,g&&_===_){for(var x=m.length;x--;)if(m[x]===_)continue e;l&&m.push(_),y.push(b)}else d(m,_,u)||(m!==y&&m.push(_),y.push(b))}return y}return W0=s,W0}var G0,E8;function I8(){if(E8)return G0;E8=1;var e=Wn(),t=An();function n(r){return t(r)&&e(r)}return G0=n,G0}var V0,A8;function NJ(){if(A8)return V0;A8=1;var e=E0(),t=_c(),n=zJ(),r=I8(),i=t(function(o){return n(e(o,1,r,!0))});return V0=i,V0}var Y0,T8;function HJ(){if(T8)return Y0;T8=1;var e=yc();function t(n,r){return e(r,function(i){return n[i]})}return Y0=t,Y0}var X0,k8;function R8(){if(k8)return X0;k8=1;var e=HJ(),t=cr();function n(r){return r==null?[]:e(r,t(r))}return X0=n,X0}var U0,L8;function ln(){if(L8)return U0;L8=1;var e;if(typeof rd=="function")try{e={clone:GQ(),constant:dp(),each:G7(),filter:j9(),has:W9(),isArray:At(),isEmpty:gJ(),isFunction:Ho(),isUndefined:Y9(),keys:cr(),map:Z9(),reduce:t8(),size:PJ(),transform:$J(),union:NJ(),values:R8()}}catch(t){}return e||(e=window._),U0=e,U0}var K0,z8;function Z0(){if(z8)return K0;z8=1;var e=ln();K0=i;var t="\0",n="\0",r="";function i(u){this._isDirected=e.has(u,"directed")?u.directed:!0,this._isMultigraph=e.has(u,"multigraph")?u.multigraph:!1,this._isCompound=e.has(u,"compound")?u.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[n]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(u){return this._label=u,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(u){return e.isFunction(u)||(u=e.constant(u)),this._defaultNodeLabelFn=u,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return e.keys(this._nodes)},i.prototype.sources=function(){var u=this;return e.filter(this.nodes(),function(h){return e.isEmpty(u._in[h])})},i.prototype.sinks=function(){var u=this;return e.filter(this.nodes(),function(h){return e.isEmpty(u._out[h])})},i.prototype.setNodes=function(u,h){var d=arguments,f=this;return e.each(u,function(g){d.length>1?f.setNode(g,h):f.setNode(g)}),this},i.prototype.setNode=function(u,h){return e.has(this._nodes,u)?(arguments.length>1&&(this._nodes[u]=h),this):(this._nodes[u]=arguments.length>1?h:this._defaultNodeLabelFn(u),this._isCompound&&(this._parent[u]=n,this._children[u]={},this._children[n][u]=!0),this._in[u]={},this._preds[u]={},this._out[u]={},this._sucs[u]={},++this._nodeCount,this)},i.prototype.node=function(u){return this._nodes[u]},i.prototype.hasNode=function(u){return e.has(this._nodes,u)},i.prototype.removeNode=function(u){var h=this;if(e.has(this._nodes,u)){var d=function(f){h.removeEdge(h._edgeObjs[f])};delete this._nodes[u],this._isCompound&&(this._removeFromParentsChildList(u),delete this._parent[u],e.each(this.children(u),function(f){h.setParent(f)}),delete this._children[u]),e.each(e.keys(this._in[u]),d),delete this._in[u],delete this._preds[u],e.each(e.keys(this._out[u]),d),delete this._out[u],delete this._sucs[u],--this._nodeCount}return this},i.prototype.setParent=function(u,h){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(h))h=n;else{h+="";for(var d=h;!e.isUndefined(d);d=this.parent(d))if(d===u)throw new Error("Setting "+h+" as parent of "+u+" would create a cycle");this.setNode(h)}return this.setNode(u),this._removeFromParentsChildList(u),this._parent[u]=h,this._children[h][u]=!0,this},i.prototype._removeFromParentsChildList=function(u){delete this._children[this._parent[u]][u]},i.prototype.parent=function(u){if(this._isCompound){var h=this._parent[u];if(h!==n)return h}},i.prototype.children=function(u){if(e.isUndefined(u)&&(u=n),this._isCompound){var h=this._children[u];if(h)return e.keys(h)}else{if(u===n)return this.nodes();if(this.hasNode(u))return[]}},i.prototype.predecessors=function(u){var h=this._preds[u];if(h)return e.keys(h)},i.prototype.successors=function(u){var h=this._sucs[u];if(h)return e.keys(h)},i.prototype.neighbors=function(u){var h=this.predecessors(u);if(h)return e.union(h,this.successors(u))},i.prototype.isLeaf=function(u){var h;return this.isDirected()?h=this.successors(u):h=this.neighbors(u),h.length===0},i.prototype.filterNodes=function(u){var h=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});h.setGraph(this.graph());var d=this;e.each(this._nodes,function(y,m){u(m)&&h.setNode(m,y)}),e.each(this._edgeObjs,function(y){h.hasNode(y.v)&&h.hasNode(y.w)&&h.setEdge(y,d.edge(y))});var f={};function g(y){var m=d.parent(y);return m===void 0||h.hasNode(m)?(f[y]=m,m):m in f?f[m]:g(m)}return this._isCompound&&e.each(h.nodes(),function(y){h.setParent(y,g(y))}),h},i.prototype.setDefaultEdgeLabel=function(u){return e.isFunction(u)||(u=e.constant(u)),this._defaultEdgeLabelFn=u,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return e.values(this._edgeObjs)},i.prototype.setPath=function(u,h){var d=this,f=arguments;return e.reduce(u,function(g,y){return f.length>1?d.setEdge(g,y,h):d.setEdge(g,y),y}),this},i.prototype.setEdge=function(){var u,h,d,f,g=!1,y=arguments[0];typeof y=="object"&&y!==null&&"v"in y?(u=y.v,h=y.w,d=y.name,arguments.length===2&&(f=arguments[1],g=!0)):(u=y,h=arguments[1],d=arguments[3],arguments.length>2&&(f=arguments[2],g=!0)),u=""+u,h=""+h,e.isUndefined(d)||(d=""+d);var m=s(this._isDirected,u,h,d);if(e.has(this._edgeLabels,m))return g&&(this._edgeLabels[m]=f),this;if(!e.isUndefined(d)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(u),this.setNode(h),this._edgeLabels[m]=g?f:this._defaultEdgeLabelFn(u,h,d);var v=c(this._isDirected,u,h,d);return u=v.v,h=v.w,Object.freeze(v),this._edgeObjs[m]=v,o(this._preds[h],u),o(this._sucs[u],h),this._in[h][m]=v,this._out[u][m]=v,this._edgeCount++,this},i.prototype.edge=function(u,h,d){var f=arguments.length===1?l(this._isDirected,arguments[0]):s(this._isDirected,u,h,d);return this._edgeLabels[f]},i.prototype.hasEdge=function(u,h,d){var f=arguments.length===1?l(this._isDirected,arguments[0]):s(this._isDirected,u,h,d);return e.has(this._edgeLabels,f)},i.prototype.removeEdge=function(u,h,d){var f=arguments.length===1?l(this._isDirected,arguments[0]):s(this._isDirected,u,h,d),g=this._edgeObjs[f];return g&&(u=g.v,h=g.w,delete this._edgeLabels[f],delete this._edgeObjs[f],a(this._preds[h],u),a(this._sucs[u],h),delete this._in[h][f],delete this._out[u][f],this._edgeCount--),this},i.prototype.inEdges=function(u,h){var d=this._in[u];if(d){var f=e.values(d);return h?e.filter(f,function(g){return g.v===h}):f}},i.prototype.outEdges=function(u,h){var d=this._out[u];if(d){var f=e.values(d);return h?e.filter(f,function(g){return g.w===h}):f}},i.prototype.nodeEdges=function(u,h){var d=this.inEdges(u,h);if(d)return d.concat(this.outEdges(u,h))};function o(u,h){u[h]?u[h]++:u[h]=1}function a(u,h){--u[h]||delete u[h]}function s(u,h,d,f){var g=""+h,y=""+d;if(!u&&g>y){var m=g;g=y,y=m}return g+r+y+r+(e.isUndefined(f)?t:f)}function c(u,h,d,f){var g=""+h,y=""+d;if(!u&&g>y){var m=g;g=y,y=m}var v={v:g,w:y};return f&&(v.name=f),v}function l(u,h){return s(u,h.v,h.w,h.name)}return K0}var Q0,N8;function DJ(){return N8||(N8=1,Q0="2.1.8"),Q0}var J0,H8;function qJ(){return H8||(H8=1,J0={Graph:Z0(),version:DJ()}),J0}var eg,D8;function jJ(){if(D8)return eg;D8=1;var e=ln(),t=Z0();eg={write:n,read:o};function n(a){var s={options:{directed:a.isDirected(),multigraph:a.isMultigraph(),compound:a.isCompound()},nodes:r(a),edges:i(a)};return e.isUndefined(a.graph())||(s.value=e.clone(a.graph())),s}function r(a){return e.map(a.nodes(),function(s){var c=a.node(s),l=a.parent(s),u={v:s};return e.isUndefined(c)||(u.value=c),e.isUndefined(l)||(u.parent=l),u})}function i(a){return e.map(a.edges(),function(s){var c=a.edge(s),l={v:s.v,w:s.w};return e.isUndefined(s.name)||(l.name=s.name),e.isUndefined(c)||(l.value=c),l})}function o(a){var s=new t(a.options).setGraph(a.value);return e.each(a.nodes,function(c){s.setNode(c.v,c.value),c.parent&&s.setParent(c.v,c.parent)}),e.each(a.edges,function(c){s.setEdge({v:c.v,w:c.w,name:c.name},c.value)}),s}return eg}var tg,q8;function FJ(){if(q8)return tg;q8=1;var e=ln();tg=t;function t(n){var r={},i=[],o;function a(s){e.has(r,s)||(r[s]=!0,o.push(s),e.each(n.successors(s),a),e.each(n.predecessors(s),a))}return e.each(n.nodes(),function(s){o=[],a(s),o.length&&i.push(o)}),i}return tg}var ng,j8;function F8(){if(j8)return ng;j8=1;var e=ln();ng=t;function t(){this._arr=[],this._keyIndices={}}return t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(n){return n.key})},t.prototype.has=function(n){return e.has(this._keyIndices,n)},t.prototype.priority=function(n){var r=this._keyIndices[n];if(r!==void 0)return this._arr[r].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(n,r){var i=this._keyIndices;if(n=String(n),!e.has(i,n)){var o=this._arr,a=o.length;return i[n]=a,o.push({key:n,priority:r}),this._decrease(a),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key},t.prototype.decrease=function(n,r){var i=this._keyIndices[n];if(r>this._arr[i].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[i].priority+" New: "+r);this._arr[i].priority=r,this._decrease(i)},t.prototype._heapify=function(n){var r=this._arr,i=2*n,o=i+1,a=n;i<r.length&&(a=r[i].priority<r[a].priority?i:a,o<r.length&&(a=r[o].priority<r[a].priority?o:a),a!==n&&(this._swap(n,a),this._heapify(a)))},t.prototype._decrease=function(n){for(var r=this._arr,i=r[n].priority,o;n!==0&&(o=n>>1,!(r[o].priority<i));)this._swap(n,o),n=o},t.prototype._swap=function(n,r){var i=this._arr,o=this._keyIndices,a=i[n],s=i[r];i[n]=s,i[r]=a,o[s.key]=n,o[a.key]=r},ng}var rg,B8;function W8(){if(B8)return rg;B8=1;var e=ln(),t=F8();rg=r;var n=e.constant(1);function r(o,a,s,c){return i(o,String(a),s||n,c||function(l){return o.outEdges(l)})}function i(o,a,s,c){var l={},u=new t,h,d,f=function(g){var y=g.v!==h?g.v:g.w,m=l[y],v=s(g),b=d.distance+v;if(v<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+g+" Weight: "+v);b<m.distance&&(m.distance=b,m.predecessor=h,u.decrease(y,b))};for(o.nodes().forEach(function(g){var y=g===a?0:Number.POSITIVE_INFINITY;l[g]={distance:y},u.add(g,y)});u.size()>0&&(h=u.removeMin(),d=l[h],d.distance!==Number.POSITIVE_INFINITY);)c(h).forEach(f);return l}return rg}var ig,G8;function BJ(){if(G8)return ig;G8=1;var e=W8(),t=ln();ig=n;function n(r,i,o){return t.transform(r.nodes(),function(a,s){a[s]=e(r,s,i,o)},{})}return ig}var og,V8;function Y8(){if(V8)return og;V8=1;var e=ln();og=t;function t(n){var r=0,i=[],o={},a=[];function s(c){var l=o[c]={onStack:!0,lowlink:r,index:r++};if(i.push(c),n.successors(c).forEach(function(d){e.has(o,d)?o[d].onStack&&(l.lowlink=Math.min(l.lowlink,o[d].index)):(s(d),l.lowlink=Math.min(l.lowlink,o[d].lowlink))}),l.lowlink===l.index){var u=[],h;do h=i.pop(),o[h].onStack=!1,u.push(h);while(c!==h);a.push(u)}}return n.nodes().forEach(function(c){e.has(o,c)||s(c)}),a}return og}var ag,X8;function WJ(){if(X8)return ag;X8=1;var e=ln(),t=Y8();ag=n;function n(r){return e.filter(t(r),function(i){return i.length>1||i.length===1&&r.hasEdge(i[0],i[0])})}return ag}var sg,U8;function GJ(){if(U8)return sg;U8=1;var e=ln();sg=n;var t=e.constant(1);function n(i,o,a){return r(i,o||t,a||function(s){return i.outEdges(s)})}function r(i,o,a){var s={},c=i.nodes();return c.forEach(function(l){s[l]={},s[l][l]={distance:0},c.forEach(function(u){l!==u&&(s[l][u]={distance:Number.POSITIVE_INFINITY})}),a(l).forEach(function(u){var h=u.v===l?u.w:u.v,d=o(u);s[l][h]={distance:d,predecessor:l}})}),c.forEach(function(l){var u=s[l];c.forEach(function(h){var d=s[h];c.forEach(function(f){var g=d[l],y=u[f],m=d[f],v=g.distance+y.distance;v<m.distance&&(m.distance=v,m.predecessor=y.predecessor)})})}),s}return sg}var cg,K8;function Z8(){if(K8)return cg;K8=1;var e=ln();cg=t,t.CycleException=n;function t(r){var i={},o={},a=[];function s(c){if(e.has(o,c))throw new n;e.has(i,c)||(o[c]=!0,i[c]=!0,e.each(r.predecessors(c),s),delete o[c],a.push(c))}if(e.each(r.sinks(),s),e.size(i)!==r.nodeCount())throw new n;return a}function n(){}return n.prototype=new Error,cg}var lg,Q8;function VJ(){if(Q8)return lg;Q8=1;var e=Z8();lg=t;function t(n){try{e(n)}catch(r){if(r instanceof e.CycleException)return!1;throw r}return!0}return lg}var ug,J8;function eP(){if(J8)return ug;J8=1;var e=ln();ug=t;function t(r,i,o){e.isArray(i)||(i=[i]);var a=(r.isDirected()?r.successors:r.neighbors).bind(r),s=[],c={};return e.each(i,function(l){if(!r.hasNode(l))throw new Error("Graph does not have node: "+l);n(r,l,o==="post",c,a,s)}),s}function n(r,i,o,a,s,c){e.has(a,i)||(a[i]=!0,o||c.push(i),e.each(s(i),function(l){n(r,l,o,a,s,c)}),o&&c.push(i))}return ug}var hg,tP;function YJ(){if(tP)return hg;tP=1;var e=eP();hg=t;function t(n,r){return e(n,r,"post")}return hg}var dg,nP;function XJ(){if(nP)return dg;nP=1;var e=eP();dg=t;function t(n,r){return e(n,r,"pre")}return dg}var fg,rP;function UJ(){if(rP)return fg;rP=1;var e=ln(),t=Z0(),n=F8();fg=r;function r(i,o){var a=new t,s={},c=new n,l;function u(d){var f=d.v===l?d.w:d.v,g=c.priority(f);if(g!==void 0){var y=o(d);y<g&&(s[f]=l,c.decrease(f,y))}}if(i.nodeCount()===0)return a;e.each(i.nodes(),function(d){c.add(d,Number.POSITIVE_INFINITY),a.setNode(d)}),c.decrease(i.nodes()[0],0);for(var h=!1;c.size()>0;){if(l=c.removeMin(),e.has(s,l))a.setEdge(l,s[l]);else{if(h)throw new Error("Input graph is not connected: "+i);h=!0}i.nodeEdges(l).forEach(u)}return a}return fg}var pg,iP;function KJ(){return iP||(iP=1,pg={components:FJ(),dijkstra:W8(),dijkstraAll:BJ(),findCycles:WJ(),floydWarshall:GJ(),isAcyclic:VJ(),postorder:YJ(),preorder:XJ(),prim:UJ(),tarjan:Y8(),topsort:Z8()}),pg}var gg,oP;function ZJ(){if(oP)return gg;oP=1;var e=qJ();return gg={Graph:e.Graph,json:jJ(),alg:KJ(),version:e.version},gg}var mg,aP;function vn(){if(aP)return mg;aP=1;var e;if(typeof rd=="function")try{e=ZJ()}catch(t){}return e||(e=window.graphlib),mg=e,mg}var yg,sP;function QJ(){if(sP)return yg;sP=1;var e=A7(),t=1,n=4;function r(i){return e(i,t|n)}return yg=r,yg}var vg,cP;function xc(){if(cP)return vg;cP=1;var e=Mi(),t=Wn(),n=dc(),r=cn();function i(o,a,s){if(!r(s))return!1;var c=typeof a;return(c=="number"?t(s)&&n(a,s.length):c=="string"&&a in s)?e(s[a],o):!1}return vg=i,vg}var bg,lP;function JJ(){if(lP)return bg;lP=1;var e=_c(),t=Mi(),n=xc(),r=Br(),i=Object.prototype,o=i.hasOwnProperty,a=e(function(s,c){s=Object(s);var l=-1,u=c.length,h=u>2?c[2]:void 0;for(h&&n(c[0],c[1],h)&&(u=1);++l<u;)for(var d=c[l],f=r(d),g=-1,y=f.length;++g<y;){var m=f[g],v=s[m];(v===void 0||t(v,i[m])&&!o.call(s,m))&&(s[m]=d[m])}return s});return bg=a,bg}var _g,uP;function eee(){if(uP)return _g;uP=1;var e=Gn(),t=Wn(),n=cr();function r(i){return function(o,a,s){var c=Object(o);if(!t(o)){var l=e(a,3);o=n(o),a=function(h){return l(c[h],h,c)}}var u=i(o,a,s);return u>-1?c[l?o[u]:u]:void 0}}return _g=r,_g}var xg,hP;function tee(){if(hP)return xg;hP=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return xg=t,xg}var wg,dP;function nee(){if(dP)return wg;dP=1;var e=tee(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return wg=n,wg}var Pg,fP;function ree(){if(fP)return Pg;fP=1;var e=nee(),t=cn(),n=Ti(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt;function c(l){if(typeof l=="number")return l;if(n(l))return r;if(t(l)){var u=typeof l.valueOf=="function"?l.valueOf():l;l=t(u)?u+"":u}if(typeof l!="string")return l===0?l:+l;l=e(l);var h=o.test(l);return h||a.test(l)?s(l.slice(2),h?2:8):i.test(l)?r:+l}return Pg=c,Pg}var $g,pP;function gP(){if(pP)return $g;pP=1;var e=ree(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var o=i<0?-1:1;return o*n}return i===i?i:0}return $g=r,$g}var Cg,mP;function iee(){if(mP)return Cg;mP=1;var e=gP();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return Cg=t,Cg}var Og,yP;function oee(){if(yP)return Og;yP=1;var e=_8(),t=Gn(),n=iee(),r=Math.max;function i(o,a,s){var c=o==null?0:o.length;if(!c)return-1;var l=s==null?0:n(s);return l<0&&(l=r(c+l,0)),e(o,t(a,3),l)}return Og=i,Og}var Sg,vP;function aee(){if(vP)return Sg;vP=1;var e=eee(),t=oee(),n=e(t);return Sg=n,Sg}var Mg,bP;function _P(){if(bP)return Mg;bP=1;var e=E0();function t(n){var r=n==null?0:n.length;return r?e(n,1):[]}return Mg=t,Mg}var Eg,xP;function see(){if(xP)return Eg;xP=1;var e=gp(),t=j7(),n=Br();function r(i,o){return i==null?i:e(i,t(o),n)}return Eg=r,Eg}var Ig,wP;function cee(){if(wP)return Ig;wP=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return Ig=e,Ig}var Ag,PP;function lee(){if(PP)return Ag;PP=1;var e=uc(),t=yp(),n=Gn();function r(i,o){var a={};return o=n(o,3),t(i,function(s,c,l){e(a,c,o(s,c,l))}),a}return Ag=r,Ag}var Tg,$P;function kg(){if($P)return Tg;$P=1;var e=Ti();function t(n,r,i){for(var o=-1,a=n.length;++o<a;){var s=n[o],c=r(s);if(c!=null&&(l===void 0?c===c&&!e(c):i(c,l)))var l=c,u=s}return u}return Tg=t,Tg}var Rg,CP;function uee(){if(CP)return Rg;CP=1;function e(t,n){return t>n}return Rg=e,Rg}var Lg,OP;function hee(){if(OP)return Lg;OP=1;var e=kg(),t=uee(),n=Wr();function r(i){return i&&i.length?e(i,n,t):void 0}return Lg=r,Lg}var zg,SP;function MP(){if(SP)return zg;SP=1;var e=uc(),t=Mi();function n(r,i,o){(o!==void 0&&!t(r[i],o)||o===void 0&&!(i in r))&&e(r,i,o)}return zg=n,zg}var Ng,EP;function dee(){if(EP)return Ng;EP=1;var e=jr(),t=gc(),n=An(),r="[object Object]",i=Function.prototype,o=Object.prototype,a=i.toString,s=o.hasOwnProperty,c=a.call(Object);function l(u){if(!n(u)||e(u)!=r)return!1;var h=t(u);if(h===null)return!0;var d=s.call(h,"constructor")&&h.constructor;return typeof d=="function"&&d instanceof d&&a.call(d)==c}return Ng=l,Ng}var Hg,IP;function AP(){if(IP)return Hg;IP=1;function e(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}return Hg=e,Hg}var Dg,TP;function fee(){if(TP)return Dg;TP=1;var e=Do(),t=Br();function n(r){return e(r,t(r))}return Dg=n,Dg}var qg,kP;function pee(){if(kP)return qg;kP=1;var e=MP(),t=j6(),n=_7(),r=B6(),i=C7(),o=qo(),a=At(),s=I8(),c=Ii(),l=Ho(),u=cn(),h=dee(),d=Bo(),f=AP(),g=fee();function y(m,v,b,_,x,w,P){var $=f(m,b),C=f(v,b),M=P.get(C);if(M){e(m,b,M);return}var S=w?w($,C,b+"",m,v,P):void 0,E=S===void 0;if(E){var I=a(C),O=!I&&c(C),T=!I&&!O&&d(C);S=C,I||O||T?a($)?S=$:s($)?S=r($):O?(E=!1,S=t(C,!0)):T?(E=!1,S=n(C,!0)):S=[]:h(C)||o(C)?(S=$,o($)?S=g($):(!u($)||l($))&&(S=i(C))):E=!1}E&&(P.set(C,S),x(S,C,_,w,P),P.delete(C)),e(m,b,S)}return qg=y,qg}var jg,RP;function gee(){if(RP)return jg;RP=1;var e=lc(),t=MP(),n=gp(),r=pee(),i=cn(),o=Br(),a=AP();function s(c,l,u,h,d){c!==l&&n(l,function(f,g){if(d||(d=new e),i(f))r(c,l,g,u,s,h,d);else{var y=h?h(a(c,g),f,g+"",c,l,d):void 0;y===void 0&&(y=f),t(c,g,y)}},o)}return jg=s,jg}var Fg,LP;function mee(){if(LP)return Fg;LP=1;var e=_c(),t=xc();function n(r){return e(function(i,o){var a=-1,s=o.length,c=s>1?o[s-1]:void 0,l=s>2?o[2]:void 0;for(c=r.length>3&&typeof c=="function"?(s--,c):void 0,l&&t(o[0],o[1],l)&&(c=s<3?void 0:c,s=1),i=Object(i);++a<s;){var u=o[a];u&&r(i,u,a,c)}return i})}return Fg=n,Fg}var Bg,zP;function yee(){if(zP)return Bg;zP=1;var e=gee(),t=mee(),n=t(function(r,i,o){e(r,i,o)});return Bg=n,Bg}var Wg,NP;function HP(){if(NP)return Wg;NP=1;function e(t,n){return t<n}return Wg=e,Wg}var Gg,DP;function vee(){if(DP)return Gg;DP=1;var e=kg(),t=HP(),n=Wr();function r(i){return i&&i.length?e(i,n,t):void 0}return Gg=r,Gg}var Vg,qP;function bee(){if(qP)return Vg;qP=1;var e=kg(),t=Gn(),n=HP();function r(i,o){return i&&i.length?e(i,t(o,2),n):void 0}return Vg=r,Vg}var Yg,jP;function _ee(){if(jP)return Yg;jP=1;var e=yn(),t=function(){return e.Date.now()};return Yg=t,Yg}var Xg,FP;function xee(){if(FP)return Xg;FP=1;var e=hc(),t=vc(),n=dc(),r=cn(),i=Go();function o(a,s,c,l){if(!r(a))return a;s=t(s,a);for(var u=-1,h=s.length,d=h-1,f=a;f!=null&&++u<h;){var g=i(s[u]),y=c;if(g==="__proto__"||g==="constructor"||g==="prototype")return a;if(u!=d){var m=f[g];y=l?l(m,g,f):void 0,y===void 0&&(y=r(m)?m:n(s[u+1])?[]:{})}e(f,g,y),f=f[g]}return a}return Xg=o,Xg}var Ug,BP;function wee(){if(BP)return Ug;BP=1;var e=bc(),t=xee(),n=vc();function r(i,o,a){for(var s=-1,c=o.length,l={};++s<c;){var u=o[s],h=e(i,u);a(h,u)&&t(l,n(u,i),h)}return l}return Ug=r,Ug}var Kg,WP;function Pee(){if(WP)return Kg;WP=1;var e=wee(),t=k9();function n(r,i){return e(r,i,function(o,a){return t(r,a)})}return Kg=n,Kg}var Zg,GP;function $ee(){if(GP)return Zg;GP=1;var e=_P(),t=f8(),n=y8();function r(i){return n(t(i,void 0,e),i+"")}return Zg=r,Zg}var Qg,VP;function Cee(){if(VP)return Qg;VP=1;var e=Pee(),t=$ee(),n=t(function(r,i){return r==null?{}:e(r,i)});return Qg=n,Qg}var Jg,YP;function Oee(){if(YP)return Jg;YP=1;var e=Math.ceil,t=Math.max;function n(r,i,o,a){for(var s=-1,c=t(e((i-r)/(o||1)),0),l=Array(c);c--;)l[a?c:++s]=r,r+=o;return l}return Jg=n,Jg}var e1,XP;function See(){if(XP)return e1;XP=1;var e=Oee(),t=xc(),n=gP();function r(i){return function(o,a,s){return s&&typeof s!="number"&&t(o,a,s)&&(a=s=void 0),o=n(o),a===void 0?(a=o,o=0):a=n(a),s=s===void 0?o<a?1:-1:n(s),e(o,a,s,i)}}return e1=r,e1}var t1,UP;function Mee(){if(UP)return t1;UP=1;var e=See(),t=e();return t1=t,t1}var n1,KP;function Eee(){if(KP)return n1;KP=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return n1=e,n1}var r1,ZP;function Iee(){if(ZP)return r1;ZP=1;var e=Ti();function t(n,r){if(n!==r){var i=n!==void 0,o=n===null,a=n===n,s=e(n),c=r!==void 0,l=r===null,u=r===r,h=e(r);if(!l&&!h&&!s&&n>r||s&&c&&u&&!l&&!h||o&&c&&u||!i&&u||!a)return 1;if(!o&&!s&&!h&&n<r||h&&i&&a&&!o&&!s||l&&i&&a||!c&&a||!u)return-1}return 0}return r1=t,r1}var i1,QP;function Aee(){if(QP)return i1;QP=1;var e=Iee();function t(n,r,i){for(var o=-1,a=n.criteria,s=r.criteria,c=a.length,l=i.length;++o<c;){var u=e(a[o],s[o]);if(u){if(o>=l)return u;var h=i[o];return u*(h=="desc"?-1:1)}}return n.index-r.index}return i1=t,i1}var o1,JP;function Tee(){if(JP)return o1;JP=1;var e=yc(),t=bc(),n=Gn(),r=U9(),i=Eee(),o=fc(),a=Aee(),s=Wr(),c=At();function l(u,h,d){h.length?h=e(h,function(y){return c(y)?function(m){return t(m,y.length===1?y[0]:y)}:y}):h=[s];var f=-1;h=e(h,o(n));var g=r(u,function(y,m,v){var b=e(h,function(_){return _(y)});return{criteria:b,index:++f,value:y}});return i(g,function(y,m){return a(y,m,d)})}return o1=l,o1}var a1,e$;function kee(){if(e$)return a1;e$=1;var e=E0(),t=Tee(),n=_c(),r=xc(),i=n(function(o,a){if(o==null)return[];var s=a.length;return s>1&&r(o,a[0],a[1])?a=[]:s>2&&r(a[0],a[1],a[2])&&(a=[a[0]]),t(o,e(a,1),[])});return a1=i,a1}var s1,t$;function Ree(){if(t$)return s1;t$=1;var e=$9(),t=0;function n(r){var i=++t;return e(r)+i}return s1=n,s1}var c1,n$;function Lee(){if(n$)return c1;n$=1;function e(t,n,r){for(var i=-1,o=t.length,a=n.length,s={};++i<o;){var c=i<a?n[i]:void 0;r(s,t[i],c)}return s}return c1=e,c1}var l1,r$;function zee(){if(r$)return l1;r$=1;var e=hc(),t=Lee();function n(r,i){return t(r||[],i||[],e)}return l1=n,l1}var u1,i$;function bt(){if(i$)return u1;i$=1;var e;if(typeof rd=="function")try{e={cloneDeep:QJ(),constant:dp(),defaults:JJ(),each:G7(),filter:j9(),find:aee(),flatten:_P(),forEach:B7(),forIn:see(),has:W9(),isUndefined:Y9(),last:cee(),map:Z9(),mapValues:lee(),max:hee(),merge:yee(),min:vee(),minBy:bee(),now:_ee(),pick:Cee(),range:Mee(),reduce:t8(),sortBy:kee(),uniqueId:Ree(),values:R8(),zipObject:zee()}}catch(t){}return e||(e=window._),u1=e,u1}var h1,o$;function Nee(){if(o$)return h1;o$=1,h1=e;function e(){var r={};r._next=r._prev=r,this._sentinel=r}e.prototype.dequeue=function(){var r=this._sentinel,i=r._prev;if(i!==r)return t(i),i},e.prototype.enqueue=function(r){var i=this._sentinel;r._prev&&r._next&&t(r),r._next=i._next,i._next._prev=r,i._next=r,r._prev=i},e.prototype.toString=function(){for(var r=[],i=this._sentinel,o=i._prev;o!==i;)r.push(JSON.stringify(o,n)),o=o._prev;return"["+r.join(", ")+"]"};function t(r){r._prev._next=r._next,r._next._prev=r._prev,delete r._next,delete r._prev}function n(r,i){if(r!=="_next"&&r!=="_prev")return i}return h1}var d1,a$;function Hee(){if(a$)return d1;a$=1;var e=bt(),t=vn().Graph,n=Nee();d1=i;var r=e.constant(1);function i(l,u){if(l.nodeCount()<=1)return[];var h=s(l,u||r),d=o(h.graph,h.buckets,h.zeroIdx);return e.flatten(e.map(d,function(f){return l.outEdges(f.v,f.w)}),!0)}function o(l,u,h){for(var d=[],f=u[u.length-1],g=u[0],y;l.nodeCount();){for(;y=g.dequeue();)a(l,u,h,y);for(;y=f.dequeue();)a(l,u,h,y);if(l.nodeCount()){for(var m=u.length-2;m>0;--m)if(y=u[m].dequeue(),y){d=d.concat(a(l,u,h,y,!0));break}}}return d}function a(l,u,h,d,f){var g=f?[]:void 0;return e.forEach(l.inEdges(d.v),function(y){var m=l.edge(y),v=l.node(y.v);f&&g.push({v:y.v,w:y.w}),v.out-=m,c(u,h,v)}),e.forEach(l.outEdges(d.v),function(y){var m=l.edge(y),v=y.w,b=l.node(v);b.in-=m,c(u,h,b)}),l.removeNode(d.v),g}function s(l,u){var h=new t,d=0,f=0;e.forEach(l.nodes(),function(m){h.setNode(m,{v:m,in:0,out:0})}),e.forEach(l.edges(),function(m){var v=h.edge(m.v,m.w)||0,b=u(m),_=v+b;h.setEdge(m.v,m.w,_),f=Math.max(f,h.node(m.v).out+=b),d=Math.max(d,h.node(m.w).in+=b)});var g=e.range(f+d+3).map(function(){return new n}),y=d+1;return e.forEach(h.nodes(),function(m){c(g,y,h.node(m))}),{graph:h,buckets:g,zeroIdx:y}}function c(l,u,h){h.out?h.in?l[h.out-h.in+u].enqueue(h):l[l.length-1].enqueue(h):l[0].enqueue(h)}return d1}var f1,s$;function Dee(){if(s$)return f1;s$=1;var e=bt(),t=Hee();f1={run:n,undo:i};function n(o){var a=o.graph().acyclicer==="greedy"?t(o,s(o)):r(o);e.forEach(a,function(c){var l=o.edge(c);o.removeEdge(c),l.forwardName=c.name,l.reversed=!0,o.setEdge(c.w,c.v,l,e.uniqueId("rev"))});function s(c){return function(l){return c.edge(l).weight}}}function r(o){var a=[],s={},c={};function l(u){e.has(c,u)||(c[u]=!0,s[u]=!0,e.forEach(o.outEdges(u),function(h){e.has(s,h.w)?a.push(h):l(h.w)}),delete s[u])}return e.forEach(o.nodes(),l),a}function i(o){e.forEach(o.edges(),function(a){var s=o.edge(a);if(s.reversed){o.removeEdge(a);var c=s.forwardName;delete s.reversed,delete s.forwardName,o.setEdge(a.w,a.v,s,c)}})}return f1}var p1,c$;function tn(){if(c$)return p1;c$=1;var e=bt(),t=vn().Graph;p1={addDummyNode:n,simplify:r,asNonCompoundGraph:i,successorWeights:o,predecessorWeights:a,intersectRect:s,buildLayerMatrix:c,normalizeRanks:l,removeEmptyRanks:u,addBorderNode:h,maxRank:d,partition:f,time:g,notime:y};function n(m,v,b,_){var x;do x=e.uniqueId(_);while(m.hasNode(x));return b.dummy=v,m.setNode(x,b),x}function r(m){var v=new t().setGraph(m.graph());return e.forEach(m.nodes(),function(b){v.setNode(b,m.node(b))}),e.forEach(m.edges(),function(b){var _=v.edge(b.v,b.w)||{weight:0,minlen:1},x=m.edge(b);v.setEdge(b.v,b.w,{weight:_.weight+x.weight,minlen:Math.max(_.minlen,x.minlen)})}),v}function i(m){var v=new t({multigraph:m.isMultigraph()}).setGraph(m.graph());return e.forEach(m.nodes(),function(b){m.children(b).length||v.setNode(b,m.node(b))}),e.forEach(m.edges(),function(b){v.setEdge(b,m.edge(b))}),v}function o(m){var v=e.map(m.nodes(),function(b){var _={};return e.forEach(m.outEdges(b),function(x){_[x.w]=(_[x.w]||0)+m.edge(x).weight}),_});return e.zipObject(m.nodes(),v)}function a(m){var v=e.map(m.nodes(),function(b){var _={};return e.forEach(m.inEdges(b),function(x){_[x.v]=(_[x.v]||0)+m.edge(x).weight}),_});return e.zipObject(m.nodes(),v)}function s(m,v){var b=m.x,_=m.y,x=v.x-b,w=v.y-_,P=m.width/2,$=m.height/2;if(!x&&!w)throw new Error("Not possible to find intersection inside of the rectangle");var C,M;return Math.abs(w)*P>Math.abs(x)*$?(w<0&&($=-$),C=$*x/w,M=$):(x<0&&(P=-P),C=P,M=P*w/x),{x:b+C,y:_+M}}function c(m){var v=e.map(e.range(d(m)+1),function(){return[]});return e.forEach(m.nodes(),function(b){var _=m.node(b),x=_.rank;e.isUndefined(x)||(v[x][_.order]=b)}),v}function l(m){var v=e.min(e.map(m.nodes(),function(b){return m.node(b).rank}));e.forEach(m.nodes(),function(b){var _=m.node(b);e.has(_,"rank")&&(_.rank-=v)})}function u(m){var v=e.min(e.map(m.nodes(),function(w){return m.node(w).rank})),b=[];e.forEach(m.nodes(),function(w){var P=m.node(w).rank-v;b[P]||(b[P]=[]),b[P].push(w)});var _=0,x=m.graph().nodeRankFactor;e.forEach(b,function(w,P){e.isUndefined(w)&&P%x!==0?--_:_&&e.forEach(w,function($){m.node($).rank+=_})})}function h(m,v,b,_){var x={width:0,height:0};return arguments.length>=4&&(x.rank=b,x.order=_),n(m,"border",x,v)}function d(m){return e.max(e.map(m.nodes(),function(v){var b=m.node(v).rank;if(!e.isUndefined(b))return b}))}function f(m,v){var b={lhs:[],rhs:[]};return e.forEach(m,function(_){v(_)?b.lhs.push(_):b.rhs.push(_)}),b}function g(m,v){var b=e.now();try{return v()}finally{console.log(m+" time: "+(e.now()-b)+"ms")}}function y(m,v){return v()}return p1}var g1,l$;function qee(){if(l$)return g1;l$=1;var e=bt(),t=tn();g1={run:n,undo:i};function n(o){o.graph().dummyChains=[],e.forEach(o.edges(),function(a){r(o,a)})}function r(o,a){var s=a.v,c=o.node(s).rank,l=a.w,u=o.node(l).rank,h=a.name,d=o.edge(a),f=d.labelRank;if(u!==c+1){o.removeEdge(a);var g,y,m;for(m=0,++c;c<u;++m,++c)d.points=[],y={width:0,height:0,edgeLabel:d,edgeObj:a,rank:c},g=t.addDummyNode(o,"edge",y,"_d"),c===f&&(y.width=d.width,y.height=d.height,y.dummy="edge-label",y.labelpos=d.labelpos),o.setEdge(s,g,{weight:d.weight},h),m===0&&o.graph().dummyChains.push(g),s=g;o.setEdge(s,l,{weight:d.weight},h)}}function i(o){e.forEach(o.graph().dummyChains,function(a){var s=o.node(a),c=s.edgeLabel,l;for(o.setEdge(s.edgeObj,c);s.dummy;)l=o.successors(a)[0],o.removeNode(a),c.points.push({x:s.x,y:s.y}),s.dummy==="edge-label"&&(c.x=s.x,c.y=s.y,c.width=s.width,c.height=s.height),a=l,s=o.node(a)})}return g1}var m1,u$;function wc(){if(u$)return m1;u$=1;var e=bt();m1={longestPath:t,slack:n};function t(r){var i={};function o(a){var s=r.node(a);if(e.has(i,a))return s.rank;i[a]=!0;var c=e.min(e.map(r.outEdges(a),function(l){return o(l.w)-r.edge(l).minlen}));return(c===Number.POSITIVE_INFINITY||c===void 0||c===null)&&(c=0),s.rank=c}e.forEach(r.sources(),o)}function n(r,i){return r.node(i.w).rank-r.node(i.v).rank-r.edge(i).minlen}return m1}var y1,h$;function d$(){if(h$)return y1;h$=1;var e=bt(),t=vn().Graph,n=wc().slack;y1=r;function r(s){var c=new t({directed:!1}),l=s.nodes()[0],u=s.nodeCount();c.setNode(l,{});for(var h,d;i(c,s)<u;)h=o(c,s),d=c.hasNode(h.v)?n(s,h):-n(s,h),a(c,s,d);return c}function i(s,c){function l(u){e.forEach(c.nodeEdges(u),function(h){var d=h.v,f=u===d?h.w:d;!s.hasNode(f)&&!n(c,h)&&(s.setNode(f,{}),s.setEdge(u,f,{}),l(f))})}return e.forEach(s.nodes(),l),s.nodeCount()}function o(s,c){return e.minBy(c.edges(),function(l){if(s.hasNode(l.v)!==s.hasNode(l.w))return n(c,l)})}function a(s,c,l){e.forEach(s.nodes(),function(u){c.node(u).rank+=l})}return y1}var v1,f$;function jee(){if(f$)return v1;f$=1;var e=bt(),t=d$(),n=wc().slack,r=wc().longestPath,i=vn().alg.preorder,o=vn().alg.postorder,a=tn().simplify;v1=s,s.initLowLimValues=h,s.initCutValues=c,s.calcCutValue=u,s.leaveEdge=f,s.enterEdge=g,s.exchangeEdges=y;function s(_){_=a(_),r(_);var x=t(_);h(x),c(x,_);for(var w,P;w=f(x);)P=g(x,_,w),y(x,_,w,P)}function c(_,x){var w=o(_,_.nodes());w=w.slice(0,w.length-1),e.forEach(w,function(P){l(_,x,P)})}function l(_,x,w){var P=_.node(w),$=P.parent;_.edge(w,$).cutvalue=u(_,x,w)}function u(_,x,w){var P=_.node(w),$=P.parent,C=!0,M=x.edge(w,$),S=0;return M||(C=!1,M=x.edge($,w)),S=M.weight,e.forEach(x.nodeEdges(w),function(E){var I=E.v===w,O=I?E.w:E.v;if(O!==$){var T=I===C,F=x.edge(E).weight;if(S+=T?F:-F,v(_,w,O)){var z=_.edge(w,O).cutvalue;S+=T?-z:z}}}),S}function h(_,x){arguments.length<2&&(x=_.nodes()[0]),d(_,{},1,x)}function d(_,x,w,P,$){var C=w,M=_.node(P);return x[P]=!0,e.forEach(_.neighbors(P),function(S){e.has(x,S)||(w=d(_,x,w,S,P))}),M.low=C,M.lim=w++,$?M.parent=$:delete M.parent,w}function f(_){return e.find(_.edges(),function(x){return _.edge(x).cutvalue<0})}function g(_,x,w){var P=w.v,$=w.w;x.hasEdge(P,$)||(P=w.w,$=w.v);var C=_.node(P),M=_.node($),S=C,E=!1;C.lim>M.lim&&(S=M,E=!0);var I=e.filter(x.edges(),function(O){return E===b(_,_.node(O.v),S)&&E!==b(_,_.node(O.w),S)});return e.minBy(I,function(O){return n(x,O)})}function y(_,x,w,P){var $=w.v,C=w.w;_.removeEdge($,C),_.setEdge(P.v,P.w,{}),h(_),c(_,x),m(_,x)}function m(_,x){var w=e.find(_.nodes(),function($){return!x.node($).parent}),P=i(_,w);P=P.slice(1),e.forEach(P,function($){var C=_.node($).parent,M=x.edge($,C),S=!1;M||(M=x.edge(C,$),S=!0),x.node($).rank=x.node(C).rank+(S?M.minlen:-M.minlen)})}function v(_,x,w){return _.hasEdge(x,w)}function b(_,x,w){return w.low<=x.lim&&x.lim<=w.lim}return v1}var b1,p$;function Fee(){if(p$)return b1;p$=1;var e=wc(),t=e.longestPath,n=d$(),r=jee();b1=i;function i(c){switch(c.graph().ranker){case"network-simplex":s(c);break;case"tight-tree":a(c);break;case"longest-path":o(c);break;default:s(c)}}var o=t;function a(c){t(c),n(c)}function s(c){r(c)}return b1}var _1,g$;function Bee(){if(g$)return _1;g$=1;var e=bt();_1=t;function t(i){var o=r(i);e.forEach(i.graph().dummyChains,function(a){for(var s=i.node(a),c=s.edgeObj,l=n(i,o,c.v,c.w),u=l.path,h=l.lca,d=0,f=u[d],g=!0;a!==c.w;){if(s=i.node(a),g){for(;(f=u[d])!==h&&i.node(f).maxRank<s.rank;)d++;f===h&&(g=!1)}if(!g){for(;d<u.length-1&&i.node(f=u[d+1]).minRank<=s.rank;)d++;f=u[d]}i.setParent(a,f),a=i.successors(a)[0]}})}function n(i,o,a,s){var c=[],l=[],u=Math.min(o[a].low,o[s].low),h=Math.max(o[a].lim,o[s].lim),d,f;d=a;do d=i.parent(d),c.push(d);while(d&&(o[d].low>u||h>o[d].lim));for(f=d,d=s;(d=i.parent(d))!==f;)l.push(d);return{path:c.concat(l.reverse()),lca:f}}function r(i){var o={},a=0;function s(c){var l=a;e.forEach(i.children(c),s),o[c]={low:l,lim:a++}}return e.forEach(i.children(),s),o}return _1}var x1,m$;function Wee(){if(m$)return x1;m$=1;var e=bt(),t=tn();x1={run:n,cleanup:a};function n(s){var c=t.addDummyNode(s,"root",{},"_root"),l=i(s),u=e.max(e.values(l))-1,h=2*u+1;s.graph().nestingRoot=c,e.forEach(s.edges(),function(f){s.edge(f).minlen*=h});var d=o(s)+1;e.forEach(s.children(),function(f){r(s,c,h,d,u,l,f)}),s.graph().nodeRankFactor=h}function r(s,c,l,u,h,d,f){var g=s.children(f);if(!g.length){f!==c&&s.setEdge(c,f,{weight:0,minlen:l});return}var y=t.addBorderNode(s,"_bt"),m=t.addBorderNode(s,"_bb"),v=s.node(f);s.setParent(y,f),v.borderTop=y,s.setParent(m,f),v.borderBottom=m,e.forEach(g,function(b){r(s,c,l,u,h,d,b);var _=s.node(b),x=_.borderTop?_.borderTop:b,w=_.borderBottom?_.borderBottom:b,P=_.borderTop?u:2*u,$=x!==w?1:h-d[f]+1;s.setEdge(y,x,{weight:P,minlen:$,nestingEdge:!0}),s.setEdge(w,m,{weight:P,minlen:$,nestingEdge:!0})}),s.parent(f)||s.setEdge(c,y,{weight:0,minlen:h+d[f]})}function i(s){var c={};function l(u,h){var d=s.children(u);d&&d.length&&e.forEach(d,function(f){l(f,h+1)}),c[u]=h}return e.forEach(s.children(),function(u){l(u,1)}),c}function o(s){return e.reduce(s.edges(),function(c,l){return c+s.edge(l).weight},0)}function a(s){var c=s.graph();s.removeNode(c.nestingRoot),delete c.nestingRoot,e.forEach(s.edges(),function(l){var u=s.edge(l);u.nestingEdge&&s.removeEdge(l)})}return x1}var w1,y$;function Gee(){if(y$)return w1;y$=1;var e=bt(),t=tn();w1=n;function n(i){function o(a){var s=i.children(a),c=i.node(a);if(s.length&&e.forEach(s,o),e.has(c,"minRank")){c.borderLeft=[],c.borderRight=[];for(var l=c.minRank,u=c.maxRank+1;l<u;++l)r(i,"borderLeft","_bl",a,c,l),r(i,"borderRight","_br",a,c,l)}}e.forEach(i.children(),o)}function r(i,o,a,s,c,l){var u={width:0,height:0,rank:l,borderType:o},h=c[o][l-1],d=t.addDummyNode(i,"border",u,a);c[o][l]=d,i.setParent(d,s),h&&i.setEdge(h,d,{weight:1})}return w1}var P1,v$;function Vee(){if(v$)return P1;v$=1;var e=bt();P1={adjust:t,undo:n};function t(l){var u=l.graph().rankdir.toLowerCase();(u==="lr"||u==="rl")&&r(l)}function n(l){var u=l.graph().rankdir.toLowerCase();(u==="bt"||u==="rl")&&o(l),(u==="lr"||u==="rl")&&(s(l),r(l))}function r(l){e.forEach(l.nodes(),function(u){i(l.node(u))}),e.forEach(l.edges(),function(u){i(l.edge(u))})}function i(l){var u=l.width;l.width=l.height,l.height=u}function o(l){e.forEach(l.nodes(),function(u){a(l.node(u))}),e.forEach(l.edges(),function(u){var h=l.edge(u);e.forEach(h.points,a),e.has(h,"y")&&a(h)})}function a(l){l.y=-l.y}function s(l){e.forEach(l.nodes(),function(u){c(l.node(u))}),e.forEach(l.edges(),function(u){var h=l.edge(u);e.forEach(h.points,c),e.has(h,"x")&&c(h)})}function c(l){var u=l.x;l.x=l.y,l.y=u}return P1}var $1,b$;function Yee(){if(b$)return $1;b$=1;var e=bt();$1=t;function t(n){var r={},i=e.filter(n.nodes(),function(l){return!n.children(l).length}),o=e.max(e.map(i,function(l){return n.node(l).rank})),a=e.map(e.range(o+1),function(){return[]});function s(l){if(!e.has(r,l)){r[l]=!0;var u=n.node(l);a[u.rank].push(l),e.forEach(n.successors(l),s)}}var c=e.sortBy(i,function(l){return n.node(l).rank});return e.forEach(c,s),a}return $1}var C1,_$;function Xee(){if(_$)return C1;_$=1;var e=bt();C1=t;function t(r,i){for(var o=0,a=1;a<i.length;++a)o+=n(r,i[a-1],i[a]);return o}function n(r,i,o){for(var a=e.zipObject(o,e.map(o,function(d,f){return f})),s=e.flatten(e.map(i,function(d){return e.sortBy(e.map(r.outEdges(d),function(f){return{pos:a[f.w],weight:r.edge(f).weight}}),"pos")}),!0),c=1;c<o.length;)c<<=1;var l=2*c-1;c-=1;var u=e.map(new Array(l),function(){return 0}),h=0;return e.forEach(s.forEach(function(d){var f=d.pos+c;u[f]+=d.weight;for(var g=0;f>0;)f%2&&(g+=u[f+1]),f=f-1>>1,u[f]+=d.weight;h+=d.weight*g})),h}return C1}var O1,x$;function Uee(){if(x$)return O1;x$=1;var e=bt();O1=t;function t(n,r){return e.map(r,function(i){var o=n.inEdges(i);if(o.length){var a=e.reduce(o,function(s,c){var l=n.edge(c),u=n.node(c.v);return{sum:s.sum+l.weight*u.order,weight:s.weight+l.weight}},{sum:0,weight:0});return{v:i,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:i}})}return O1}var S1,w$;function Kee(){if(w$)return S1;w$=1;var e=bt();S1=t;function t(i,o){var a={};e.forEach(i,function(c,l){var u=a[c.v]={indegree:0,in:[],out:[],vs:[c.v],i:l};e.isUndefined(c.barycenter)||(u.barycenter=c.barycenter,u.weight=c.weight)}),e.forEach(o.edges(),function(c){var l=a[c.v],u=a[c.w];!e.isUndefined(l)&&!e.isUndefined(u)&&(u.indegree++,l.out.push(a[c.w]))});var s=e.filter(a,function(c){return!c.indegree});return n(s)}function n(i){var o=[];function a(l){return function(u){u.merged||(e.isUndefined(u.barycenter)||e.isUndefined(l.barycenter)||u.barycenter>=l.barycenter)&&r(l,u)}}function s(l){return function(u){u.in.push(l),--u.indegree===0&&i.push(u)}}for(;i.length;){var c=i.pop();o.push(c),e.forEach(c.in.reverse(),a(c)),e.forEach(c.out,s(c))}return e.map(e.filter(o,function(l){return!l.merged}),function(l){return e.pick(l,["vs","i","barycenter","weight"])})}function r(i,o){var a=0,s=0;i.weight&&(a+=i.barycenter*i.weight,s+=i.weight),o.weight&&(a+=o.barycenter*o.weight,s+=o.weight),i.vs=o.vs.concat(i.vs),i.barycenter=a/s,i.weight=s,i.i=Math.min(o.i,i.i),o.merged=!0}return S1}var M1,P$;function Zee(){if(P$)return M1;P$=1;var e=bt(),t=tn();M1=n;function n(o,a){var s=t.partition(o,function(y){return e.has(y,"barycenter")}),c=s.lhs,l=e.sortBy(s.rhs,function(y){return-y.i}),u=[],h=0,d=0,f=0;c.sort(i(!!a)),f=r(u,l,f),e.forEach(c,function(y){f+=y.vs.length,u.push(y.vs),h+=y.barycenter*y.weight,d+=y.weight,f=r(u,l,f)});var g={vs:e.flatten(u,!0)};return d&&(g.barycenter=h/d,g.weight=d),g}function r(o,a,s){for(var c;a.length&&(c=e.last(a)).i<=s;)a.pop(),o.push(c.vs),s++;return s}function i(o){return function(a,s){return a.barycenter<s.barycenter?-1:a.barycenter>s.barycenter?1:o?s.i-a.i:a.i-s.i}}return M1}var E1,$$;function Qee(){if($$)return E1;$$=1;var e=bt(),t=Uee(),n=Kee(),r=Zee();E1=i;function i(s,c,l,u){var h=s.children(c),d=s.node(c),f=d?d.borderLeft:void 0,g=d?d.borderRight:void 0,y={};f&&(h=e.filter(h,function(w){return w!==f&&w!==g}));var m=t(s,h);e.forEach(m,function(w){if(s.children(w.v).length){var P=i(s,w.v,l,u);y[w.v]=P,e.has(P,"barycenter")&&a(w,P)}});var v=n(m,l);o(v,y);var b=r(v,u);if(f&&(b.vs=e.flatten([f,b.vs,g],!0),s.predecessors(f).length)){var _=s.node(s.predecessors(f)[0]),x=s.node(s.predecessors(g)[0]);e.has(b,"barycenter")||(b.barycenter=0,b.weight=0),b.barycenter=(b.barycenter*b.weight+_.order+x.order)/(b.weight+2),b.weight+=2}return b}function o(s,c){e.forEach(s,function(l){l.vs=e.flatten(l.vs.map(function(u){return c[u]?c[u].vs:u}),!0)})}function a(s,c){e.isUndefined(s.barycenter)?(s.barycenter=c.barycenter,s.weight=c.weight):(s.barycenter=(s.barycenter*s.weight+c.barycenter*c.weight)/(s.weight+c.weight),s.weight+=c.weight)}return E1}var I1,C$;function Jee(){if(C$)return I1;C$=1;var e=bt(),t=vn().Graph;I1=n;function n(i,o,a){var s=r(i),c=new t({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(l){return i.node(l)});return e.forEach(i.nodes(),function(l){var u=i.node(l),h=i.parent(l);(u.rank===o||u.minRank<=o&&o<=u.maxRank)&&(c.setNode(l),c.setParent(l,h||s),e.forEach(i[a](l),function(d){var f=d.v===l?d.w:d.v,g=c.edge(f,l),y=e.isUndefined(g)?0:g.weight;c.setEdge(f,l,{weight:i.edge(d).weight+y})}),e.has(u,"minRank")&&c.setNode(l,{borderLeft:u.borderLeft[o],borderRight:u.borderRight[o]}))}),c}function r(i){for(var o;i.hasNode(o=e.uniqueId("_root")););return o}return I1}var A1,O$;function ete(){if(O$)return A1;O$=1;var e=bt();A1=t;function t(n,r,i){var o={},a;e.forEach(i,function(s){for(var c=n.parent(s),l,u;c;){if(l=n.parent(c),l?(u=o[l],o[l]=c):(u=a,a=c),u&&u!==c){r.setEdge(u,c);return}c=l}})}return A1}var T1,S$;function tte(){if(S$)return T1;S$=1;var e=bt(),t=Yee(),n=Xee(),r=Qee(),i=Jee(),o=ete(),a=vn().Graph,s=tn();T1=c;function c(d){var f=s.maxRank(d),g=l(d,e.range(1,f+1),"inEdges"),y=l(d,e.range(f-1,-1,-1),"outEdges"),m=t(d);h(d,m);for(var v=Number.POSITIVE_INFINITY,b,_=0,x=0;x<4;++_,++x){u(_%2?g:y,_%4>=2),m=s.buildLayerMatrix(d);var w=n(d,m);w<v&&(x=0,b=e.cloneDeep(m),v=w)}h(d,b)}function l(d,f,g){return e.map(f,function(y){return i(d,y,g)})}function u(d,f){var g=new a;e.forEach(d,function(y){var m=y.graph().root,v=r(y,m,g,f);e.forEach(v.vs,function(b,_){y.node(b).order=_}),o(y,g,v.vs)})}function h(d,f){e.forEach(f,function(g){e.forEach(g,function(y,m){d.node(y).order=m})})}return T1}var k1,M$;function nte(){if(M$)return k1;M$=1;var e=bt(),t=vn().Graph,n=tn();k1={positionX:g,findType1Conflicts:r,findType2Conflicts:i,addConflict:a,hasConflict:s,verticalAlignment:c,horizontalCompaction:l,alignCoordinates:d,findSmallestWidthAlignment:h,balance:f};function r(v,b){var _={};function x(w,P){var $=0,C=0,M=w.length,S=e.last(P);return e.forEach(P,function(E,I){var O=o(v,E),T=O?v.node(O).order:M;(O||E===S)&&(e.forEach(P.slice(C,I+1),function(F){e.forEach(v.predecessors(F),function(z){var j=v.node(z),H=j.order;(H<$||T<H)&&!(j.dummy&&v.node(F).dummy)&&a(_,z,F)})}),C=I+1,$=T)}),P}return e.reduce(b,x),_}function i(v,b){var _={};function x(P,$,C,M,S){var E;e.forEach(e.range($,C),function(I){E=P[I],v.node(E).dummy&&e.forEach(v.predecessors(E),function(O){var T=v.node(O);T.dummy&&(T.order<M||T.order>S)&&a(_,O,E)})})}function w(P,$){var C=-1,M,S=0;return e.forEach($,function(E,I){if(v.node(E).dummy==="border"){var O=v.predecessors(E);O.length&&(M=v.node(O[0]).order,x($,S,I,C,M),S=I,C=M)}x($,S,$.length,M,P.length)}),$}return e.reduce(b,w),_}function o(v,b){if(v.node(b).dummy)return e.find(v.predecessors(b),function(_){return v.node(_).dummy})}function a(v,b,_){if(b>_){var x=b;b=_,_=x}var w=v[b];w||(v[b]=w={}),w[_]=!0}function s(v,b,_){if(b>_){var x=b;b=_,_=x}return e.has(v[b],_)}function c(v,b,_,x){var w={},P={},$={};return e.forEach(b,function(C){e.forEach(C,function(M,S){w[M]=M,P[M]=M,$[M]=S})}),e.forEach(b,function(C){var M=-1;e.forEach(C,function(S){var E=x(S);if(E.length){E=e.sortBy(E,function(z){return $[z]});for(var I=(E.length-1)/2,O=Math.floor(I),T=Math.ceil(I);O<=T;++O){var F=E[O];P[S]===S&&M<$[F]&&!s(_,S,F)&&(P[F]=S,P[S]=w[S]=w[F],M=$[F])}}})}),{root:w,align:P}}function l(v,b,_,x,w){var P={},$=u(v,b,_,w),C=w?"borderLeft":"borderRight";function M(I,O){for(var T=$.nodes(),F=T.pop(),z={};F;)z[F]?I(F):(z[F]=!0,T.push(F),T=T.concat(O(F))),F=T.pop()}function S(I){P[I]=$.inEdges(I).reduce(function(O,T){return Math.max(O,P[T.v]+$.edge(T))},0)}function E(I){var O=$.outEdges(I).reduce(function(F,z){return Math.min(F,P[z.w]-$.edge(z))},Number.POSITIVE_INFINITY),T=v.node(I);O!==Number.POSITIVE_INFINITY&&T.borderType!==C&&(P[I]=Math.max(P[I],O))}return M(S,$.predecessors.bind($)),M(E,$.successors.bind($)),e.forEach(x,function(I){P[I]=P[_[I]]}),P}function u(v,b,_,x){var w=new t,P=v.graph(),$=y(P.nodesep,P.edgesep,x);return e.forEach(b,function(C){var M;e.forEach(C,function(S){var E=_[S];if(w.setNode(E),M){var I=_[M],O=w.edge(I,E);w.setEdge(I,E,Math.max($(v,S,M),O||0))}M=S})}),w}function h(v,b){return e.minBy(e.values(b),function(_){var x=Number.NEGATIVE_INFINITY,w=Number.POSITIVE_INFINITY;return e.forIn(_,function(P,$){var C=m(v,$)/2;x=Math.max(P+C,x),w=Math.min(P-C,w)}),x-w})}function d(v,b){var _=e.values(b),x=e.min(_),w=e.max(_);e.forEach(["u","d"],function(P){e.forEach(["l","r"],function($){var C=P+$,M=v[C],S;if(M!==b){var E=e.values(M);S=$==="l"?x-e.min(E):w-e.max(E),S&&(v[C]=e.mapValues(M,function(I){return I+S}))}})})}function f(v,b){return e.mapValues(v.ul,function(_,x){if(b)return v[b.toLowerCase()][x];var w=e.sortBy(e.map(v,x));return(w[1]+w[2])/2})}function g(v){var b=n.buildLayerMatrix(v),_=e.merge(r(v,b),i(v,b)),x={},w;e.forEach(["u","d"],function($){w=$==="u"?b:e.values(b).reverse(),e.forEach(["l","r"],function(C){C==="r"&&(w=e.map(w,function(I){return e.values(I).reverse()}));var M=($==="u"?v.predecessors:v.successors).bind(v),S=c(v,w,_,M),E=l(v,w,S.root,S.align,C==="r");C==="r"&&(E=e.mapValues(E,function(I){return-I})),x[$+C]=E})});var P=h(v,x);return d(x,P),f(x,v.graph().align)}function y(v,b,_){return function(x,w,P){var $=x.node(w),C=x.node(P),M=0,S;if(M+=$.width/2,e.has($,"labelpos"))switch($.labelpos.toLowerCase()){case"l":S=-$.width/2;break;case"r":S=$.width/2;break}if(S&&(M+=_?S:-S),S=0,M+=($.dummy?b:v)/2,M+=(C.dummy?b:v)/2,M+=C.width/2,e.has(C,"labelpos"))switch(C.labelpos.toLowerCase()){case"l":S=C.width/2;break;case"r":S=-C.width/2;break}return S&&(M+=_?S:-S),S=0,M}}function m(v,b){return v.node(b).width}return k1}var R1,E$;function rte(){if(E$)return R1;E$=1;var e=bt(),t=tn(),n=nte().positionX;R1=r;function r(o){o=t.asNonCompoundGraph(o),i(o),e.forEach(n(o),function(a,s){o.node(s).x=a})}function i(o){var a=t.buildLayerMatrix(o),s=o.graph().ranksep,c=0;e.forEach(a,function(l){var u=e.max(e.map(l,function(h){return o.node(h).height}));e.forEach(l,function(h){o.node(h).y=c+u/2}),c+=u+s})}return R1}var L1,I$;function ite(){if(I$)return L1;I$=1;var e=bt(),t=Dee(),n=qee(),r=Fee(),i=tn().normalizeRanks,o=Bee(),a=tn().removeEmptyRanks,s=Wee(),c=Gee(),l=Vee(),u=tte(),h=rte(),d=tn(),f=vn().Graph;L1=g;function g(A,L){var N=L&&L.debugTiming?d.time:d.notime;N("layout",function(){var q=N(" buildLayoutGraph",function(){return M(A)});N(" runLayout",function(){y(q,N)}),N(" updateInputGraph",function(){m(A,q)})})}function y(A,L){L(" makeSpaceForEdgeLabels",function(){S(A)}),L(" removeSelfEdges",function(){W(A)}),L(" acyclic",function(){t.run(A)}),L(" nestingGraph.run",function(){s.run(A)}),L(" rank",function(){r(d.asNonCompoundGraph(A))}),L(" injectEdgeLabelProxies",function(){E(A)}),L(" removeEmptyRanks",function(){a(A)}),L(" nestingGraph.cleanup",function(){s.cleanup(A)}),L(" normalizeRanks",function(){i(A)}),L(" assignRankMinMax",function(){I(A)}),L(" removeEdgeLabelProxies",function(){O(A)}),L(" normalize.run",function(){n.run(A)}),L(" parentDummyChains",function(){o(A)}),L(" addBorderSegments",function(){c(A)}),L(" order",function(){u(A)}),L(" insertSelfEdges",function(){B(A)}),L(" adjustCoordinateSystem",function(){l.adjust(A)}),L(" position",function(){h(A)}),L(" positionSelfEdges",function(){X(A)}),L(" removeBorderNodes",function(){H(A)}),L(" normalize.undo",function(){n.undo(A)}),L(" fixupEdgeLabelCoords",function(){z(A)}),L(" undoCoordinateSystem",function(){l.undo(A)}),L(" translateGraph",function(){T(A)}),L(" assignNodeIntersects",function(){F(A)}),L(" reversePoints",function(){j(A)}),L(" acyclic.undo",function(){t.undo(A)})}function m(A,L){e.forEach(A.nodes(),function(N){var q=A.node(N),G=L.node(N);q&&(q.x=G.x,q.y=G.y,L.children(N).length&&(q.width=G.width,q.height=G.height))}),e.forEach(A.edges(),function(N){var q=A.edge(N),G=L.edge(N);q.points=G.points,e.has(G,"x")&&(q.x=G.x,q.y=G.y)}),A.graph().width=L.graph().width,A.graph().height=L.graph().height}var v=["nodesep","edgesep","ranksep","marginx","marginy"],b={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_=["acyclicer","ranker","rankdir","align"],x=["width","height"],w={width:0,height:0},P=["minlen","weight","width","height","labeloffset"],$={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},C=["labelpos"];function M(A){var L=new f({multigraph:!0,compound:!0}),N=k(A.graph());return L.setGraph(e.merge({},b,D(N,v),e.pick(N,_))),e.forEach(A.nodes(),function(q){var G=k(A.node(q));L.setNode(q,e.defaults(D(G,x),w)),L.setParent(q,A.parent(q))}),e.forEach(A.edges(),function(q){var G=k(A.edge(q));L.setEdge(q,e.merge({},$,D(G,P),e.pick(G,C)))}),L}function S(A){var L=A.graph();L.ranksep/=2,e.forEach(A.edges(),function(N){var q=A.edge(N);q.minlen*=2,q.labelpos.toLowerCase()!=="c"&&(L.rankdir==="TB"||L.rankdir==="BT"?q.width+=q.labeloffset:q.height+=q.labeloffset)})}function E(A){e.forEach(A.edges(),function(L){var N=A.edge(L);if(N.width&&N.height){var q=A.node(L.v),G=A.node(L.w),U={rank:(G.rank-q.rank)/2+q.rank,e:L};d.addDummyNode(A,"edge-proxy",U,"_ep")}})}function I(A){var L=0;e.forEach(A.nodes(),function(N){var q=A.node(N);q.borderTop&&(q.minRank=A.node(q.borderTop).rank,q.maxRank=A.node(q.borderBottom).rank,L=e.max(L,q.maxRank))}),A.graph().maxRank=L}function O(A){e.forEach(A.nodes(),function(L){var N=A.node(L);N.dummy==="edge-proxy"&&(A.edge(N.e).labelRank=N.rank,A.removeNode(L))})}function T(A){var L=Number.POSITIVE_INFINITY,N=0,q=Number.POSITIVE_INFINITY,G=0,U=A.graph(),K=U.marginx||0,ne=U.marginy||0;function ee(se){var ce=se.x,Z=se.y,le=se.width,te=se.height;L=Math.min(L,ce-le/2),N=Math.max(N,ce+le/2),q=Math.min(q,Z-te/2),G=Math.max(G,Z+te/2)}e.forEach(A.nodes(),function(se){ee(A.node(se))}),e.forEach(A.edges(),function(se){var ce=A.edge(se);e.has(ce,"x")&&ee(ce)}),L-=K,q-=ne,e.forEach(A.nodes(),function(se){var ce=A.node(se);ce.x-=L,ce.y-=q}),e.forEach(A.edges(),function(se){var ce=A.edge(se);e.forEach(ce.points,function(Z){Z.x-=L,Z.y-=q}),e.has(ce,"x")&&(ce.x-=L),e.has(ce,"y")&&(ce.y-=q)}),U.width=N-L+K,U.height=G-q+ne}function F(A){e.forEach(A.edges(),function(L){var N=A.edge(L),q=A.node(L.v),G=A.node(L.w),U,K;N.points?(U=N.points[0],K=N.points[N.points.length-1]):(N.points=[],U=G,K=q),N.points.unshift(d.intersectRect(q,U)),N.points.push(d.intersectRect(G,K))})}function z(A){e.forEach(A.edges(),function(L){var N=A.edge(L);if(e.has(N,"x"))switch((N.labelpos==="l"||N.labelpos==="r")&&(N.width-=N.labeloffset),N.labelpos){case"l":N.x-=N.width/2+N.labeloffset;break;case"r":N.x+=N.width/2+N.labeloffset;break}})}function j(A){e.forEach(A.edges(),function(L){var N=A.edge(L);N.reversed&&N.points.reverse()})}function H(A){e.forEach(A.nodes(),function(L){if(A.children(L).length){var N=A.node(L),q=A.node(N.borderTop),G=A.node(N.borderBottom),U=A.node(e.last(N.borderLeft)),K=A.node(e.last(N.borderRight));N.width=Math.abs(K.x-U.x),N.height=Math.abs(G.y-q.y),N.x=U.x+N.width/2,N.y=q.y+N.height/2}}),e.forEach(A.nodes(),function(L){A.node(L).dummy==="border"&&A.removeNode(L)})}function W(A){e.forEach(A.edges(),function(L){if(L.v===L.w){var N=A.node(L.v);N.selfEdges||(N.selfEdges=[]),N.selfEdges.push({e:L,label:A.edge(L)}),A.removeEdge(L)}})}function B(A){var L=d.buildLayerMatrix(A);e.forEach(L,function(N){var q=0;e.forEach(N,function(G,U){var K=A.node(G);K.order=U+q,e.forEach(K.selfEdges,function(ne){d.addDummyNode(A,"selfedge",{width:ne.label.width,height:ne.label.height,rank:K.rank,order:U+ ++q,e:ne.e,label:ne.label},"_se")}),delete K.selfEdges})})}function X(A){e.forEach(A.nodes(),function(L){var N=A.node(L);if(N.dummy==="selfedge"){var q=A.node(N.e.v),G=q.x+q.width/2,U=q.y,K=N.x-G,ne=q.height/2;A.setEdge(N.e,N.label),A.removeNode(L),N.label.points=[{x:G+2*K/3,y:U-ne},{x:G+5*K/6,y:U-ne},{x:G+K,y:U},{x:G+5*K/6,y:U+ne},{x:G+2*K/3,y:U+ne}],N.label.x=N.x,N.label.y=N.y}})}function D(A,L){return e.mapValues(e.pick(A,L),Number)}function k(A){var L={};return e.forEach(A,function(N,q){L[q.toLowerCase()]=N}),L}return L1}var z1,A$;function ote(){if(A$)return z1;A$=1;var e=bt(),t=tn(),n=vn().Graph;z1={debugOrdering:r};function r(i){var o=t.buildLayerMatrix(i),a=new n({compound:!0,multigraph:!0}).setGraph({});return e.forEach(i.nodes(),function(s){a.setNode(s,{label:s}),a.setParent(s,"layer"+i.node(s).rank)}),e.forEach(i.edges(),function(s){a.setEdge(s.v,s.w,{},s.name)}),e.forEach(o,function(s,c){var l="layer"+c;a.setNode(l,{rank:"same"}),e.reduce(s,function(u,h){return a.setEdge(u,h,{style:"invis"}),h})}),a}return z1}var N1,T$;function ate(){return T$||(T$=1,N1="0.8.5"),N1}var H1,k$;function ste(){return k$||(k$=1,H1={graphlib:vn(),layout:ite(),debug:ote(),util:{time:tn().time,notime:tn().notime},version:ate()}),H1}var R$=ste(),cte=VZ(R$),lte=function(e){return p5(e,"Boolean")};function ute(e,t){if(e){var n;if(jZ(e))for(var r=0,i=e.length;r<i&&(n=t(e[r],r),n!==!1);r++);else if(FZ(e)){for(var o in e)if(e.hasOwnProperty(o)&&(n=t(e[o],o),n===!1))break}}}var hte=Object.prototype.hasOwnProperty,dte=(function(e,t){if(e===null||!GZ(e))return{};var n={};return ute(t,function(r){hte.call(e,r)&&(n[r]=e[r])}),n});class fte extends qZ{constructor(){super(...arguments),this.id="dagre",this.isCompoundGraph=null,this.config={graphAttributes:["rankdir","align","nodesep","edgesep","ranksep","marginx","marginy","acyclicer","ranker"],nodeAttributes:["width","height"],edgeAttributes:["minlen","weight","width","height","labelpos","labeloffset"]}}getDefaultOptions(){return{directed:!0,multigraph:!0,rankdir:"TB",align:void 0,nodesep:50,edgesep:10,ranksep:50,marginx:0,marginy:0,acyclicer:void 0,ranker:"network-simplex",nodeSize:[0,0],edgeMinLen:1,edgeWeight:1,edgeLabelSize:[0,0],edgeLabelPos:"r",edgeLabelOffset:10}}layout(){return zo(this,void 0,void 0,function*(){const t=new R$.graphlib.Graph({directed:!!this.options.directed,multigraph:!!this.options.multigraph,compound:this.isCompound()});t.setGraph(dte(this.options,this.config.graphAttributes)),t.setDefaultEdgeLabel(()=>({}));const n=i5(this.options.nodeSize,0);this.model.forEachNode(f=>{const g=f._original,[y,m]=t5(n(g)),v={width:y,height:m};if(t.setNode(String(f.id),v),this.isCompound()){if(sn(f.parentId))return;t.setParent(String(f.id),String(f.parentId))}});const{edgeLabelSize:r,edgeLabelOffset:i,edgeLabelPos:o,edgeMinLen:a,edgeWeight:s}=this.options,c=i5(r,0,"edge"),l=ed(i,10,"edge"),u=typeof o=="string"?()=>o:Jh(o,["edge"]),h=ed(a,1,"edge"),d=ed(s,1,"edge");this.model.forEachEdge(f=>{const g=f._original,[y,m]=t5(c(g)),v={width:y,height:m,labelpos:u(g),labeloffset:l(g),minlen:h(g),weight:d(g)};t.setEdge(String(f.source),String(f.target),v,String(f.id))}),cte.layout(t),this.model.forEachNode(f=>{const g=t.node(String(f.id));g&&(f.x=g.x,f.y=g.y,f.size=[g.width,g.height])}),this.model.forEachEdge(f=>{const g=t.edge(String(f.source),String(f.target),String(f.id));if(!g)return;const{width:y,height:m,weight:v,minlen:b,labelpos:_,labeloffset:x,points:w}=g;f.labelSize=[y,m],f.weight=v,f.minLen=b,f.labelPos=_,f.labelOffset=x,f.points=w.map(_Z)})})}isCompound(){return this.isCompoundGraph!==null?this.isCompoundGraph:lte(this.options.compound)?this.isCompoundGraph=this.options.compound:(this.isCompoundGraph=this.model.nodes().some(t=>!sn(t.parentId)),this.isCompoundGraph)}}var pte=Object.defineProperty,gte=Object.defineProperties,mte=Object.getOwnPropertyDescriptors,L$=Object.getOwnPropertySymbols,yte=Object.prototype.hasOwnProperty,vte=Object.prototype.propertyIsEnumerable,z$=(e,t,n)=>t in e?pte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,N$=(e,t)=>{for(var n in t||(t={}))yte.call(t,n)&&z$(e,n,t[n]);if(L$)for(var n of L$(t))vte.call(t,n)&&z$(e,n,t[n]);return e},H$=(e,t)=>gte(e,mte(t));const bte=50,_te=70,xte=10,wte=2,Pte=30,$te=(e,t)=>{var n,r;const i=new Map;e.forEach(s=>i.set(s,[]));for(const s of t){if(s.source===s.target)return!0;(n=i.get(s.source))==null||n.push({target:s.target,edgeId:s.id}),(r=i.get(s.target))==null||r.push({target:s.source,edgeId:s.id})}const o=new Set,a=(s,c)=>{o.add(s);const l=i.get(s)||[];for(const{target:u,edgeId:h}of l)if(h!==c&&(o.has(u)||a(u,h)))return!0;return!1};for(const s of e)if(!o.has(s)&&a(s,null))return!0;return!1},D$=e=>{var t,n,r;const{Title:i,Item:o,data:a,rankdir:s="TB",nodesep:c=bte,ranksep:l=_te,edgesep:u=xte,edgeWidth:h=wte,showConnections:d=!0,edgeColorMode:f="gradient",edgeStyle:g="solid",edgeDashPattern:y="5,5",edgeCornerRadius:m=12,edgeRouting:v="orth",showArrow:b=!0,arrowType:_="triangle",padding:x=Pte,edgeAnimation:w="none",edgeAnimationSpeed:P=1,options:$}=e,{title:C,desc:M,items:S=[]}=a,E=i?p(i,{title:C,desc:M}):null;if(!o||S.length===0)return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[E,p(Y,{children:p(J,{indexes:[0],x:0,y:0})})]});const I=new Map,O=new Map,T=new Map,F=new Map,z=new Set,j=new Map;let H=0;const W=S.map((Z,le)=>{var te,Q;const re=Z,ie=String((te=re.id)!=null?te:le),ue=[le];let he;const fe=String((Q=re.group)!=null?Q:"");if(fe){let _e=j.get(fe);_e==null&&(_e=H,j.set(fe,_e),H+=1),he=je($,[_e])}else he=je($,ue);const me=he?Ct({colorPrimary:he},$):void 0;he&&T.set(ie,he);const pe=ae(p(o,{indexes:ue,data:a,datum:re,positionH:"center",positionV:"middle",themeColors:me}));return O.set(ie,pe),I.set(ie,{id:ie,indexes:ue,datum:re,themeColors:me}),F.set(le,ie),z.add(ie),{id:ie,parentId:re.parentId}}),B=(t=a.relations)!=null?t:[],X=Z=>{if(Z==null)return null;const le=String(Z);if(z.has(le))return le;const te=Number(Z);if(!Number.isNaN(te)){const Q=F.get(te);if(Q)return Q}return null},D=B.map((Z,le)=>{const te=X(Z.from),Q=X(Z.to);return!te||!Q?null:{id:Z.id?String(Z.id):`edge-${le}`,source:te,target:Q,relation:Z}}).filter(Boolean),A=$te(Array.from(z),D)?"dagre":v,L=new fte({rankdir:s,nodesep:c,ranksep:l,edgesep:u,controlPoints:!0,nodeSize:Z=>{var le;const te=String((le=Z.id)!=null?le:""),Q=O.get(te);return Q?[Q.width,Q.height]:[0,0]}});L.execute({nodes:W,edges:D});const N=[];if(L.forEachNode(Z=>{var le,te,Q,re;const ie=String(Z.id),ue=I.get(ie);if(!ue)return;const he=O.get(ie),fe=(le=he==null?void 0:he.width)!=null?le:0,me=(te=he==null?void 0:he.height)!=null?te:0,pe=((Q=Z.x)!=null?Q:0)-fe/2,_e=((re=Z.y)!=null?re:0)-me/2;N.push(H$(N$({},ue),{x:pe,y:_e,width:fe,height:me,centerX:pe+fe/2,centerY:_e+me/2}))}),N.length===0)return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[E,p(Y,{children:p(J,{indexes:[0],x:0,y:0})})]});const q=Math.min(...N.map(Z=>Z.x)),G=Math.min(...N.map(Z=>Z.y)),U=x-q,K=x-G,ne=new Map,ee=[];N.forEach(Z=>{const le=Z.x+U,te=Z.y+K,Q=s==="LR"?"normal":s==="RL"?"flipped":"center",re=s==="TB"?"normal":s==="BT"?"flipped":"middle";ee.push(p(o,{indexes:Z.indexes,datum:Z.datum,data:a,x:le,y:te,positionH:Q,positionV:re,themeColors:Z.themeColors})),ne.set(Z.id,H$(N$({},Z),{x:le,y:te,centerX:le+Z.width/2,centerY:te+Z.height/2}))});const se=[],ce=[];if(d){const Z=wt($),le=Ct($.themeConfig,$),te=(n=le==null?void 0:le.colorBg)!=null?n:"#ffffff",Q=(r=le==null?void 0:le.colorText)!=null?r:Z,re=Math.max(10,h*4),ie=s==="TB"||s==="BT",ue=w==="ant-line",he=ue?y:"",me=ue?he:!ue&&g==="dashed"?y:"",pe=ue?he.split(",").reduce((de,Te)=>de+parseFloat(Te.trim()||"0"),0):0,_e=ue&&pe>0?`${pe/(P*10)}s`:"1s",Ce=m,Me=(de,Te,ke)=>de.map(([oe,be],we)=>`${we===0?"M":"L"} ${oe+Te} ${be+ke}`).join(" "),$e=(de,Te,ke,oe)=>{if(de.length<2)return"";const be=(Ee,Qe,et)=>Math.min(et,Math.max(Qe,Ee)),we=([Ee,Qe])=>({x:Ee+ke,y:Qe+oe}),Oe=[],Ze=we(de[0]);if(Oe.push(`M ${Ze.x} ${Ze.y}`),de.length===2){const Ee=we(de[1]);return Oe.push(`L ${Ee.x} ${Ee.y}`),Oe.join(" ")}for(let Ee=1;Ee<de.length-1;Ee+=1){const Qe=de[Ee-1],et=de[Ee],Xe=de[Ee+1],rt=et[0]-Qe[0],Rt=et[1]-Qe[1],lt=Xe[0]-et[0],Bt=Xe[1]-et[1],Ge=Math.hypot(rt,Rt),$t=Math.hypot(lt,Bt);if(Ge===0||$t===0){const ei=we(et);Oe.push(`L ${ei.x} ${ei.y}`);continue}const Ut=be(Te,0,Math.min(Ge,$t)/2);if(Ut===0){const ei=we(et);Oe.push(`L ${ei.x} ${ei.y}`);continue}const Mt=rt/Ge,Ln=Rt/Ge,dr=lt/$t,Zr=Bt/$t,Qr=we([et[0]-Mt*Ut,et[1]-Ln*Ut]),Jr=we([et[0]+dr*Ut,et[1]+Zr*Ut]);Oe.push(`L ${Qr.x} ${Qr.y}`);const rl=we(et);Oe.push(`Q ${rl.x} ${rl.y} ${Jr.x} ${Jr.y}`)}const Le=we(de[de.length-1]);return Oe.push(`L ${Le.x} ${Le.y}`),Oe.join(" ")},Re=(de,Te,ke,oe,be)=>{const we=Math.cos(ke),Oe=Math.sin(ke),Ze=-Oe,Le=we,Ee=re,Qe=re*.55;if(oe==="arrow"){const Xe=de-we*Ee+Ze*Qe,rt=Te-Oe*Ee+Le*Qe,Rt=de-we*Ee-Ze*Qe,lt=Te-Oe*Ee-Le*Qe;return[p(Pe,{d:`M ${Xe} ${rt} L ${de} ${Te} L ${Rt} ${lt}`,stroke:be,strokeWidth:Math.max(1.5,h),strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]}if(oe==="diamond"){const Xe=Ee*1.25,rt=Qe*.75,Rt=de-we*Xe*.5,lt=Te-Oe*Xe*.5,Bt=[{x:de,y:Te},{x:Rt+Ze*rt,y:lt+Le*rt},{x:de-we*Xe,y:Te-Oe*Xe},{x:Rt-Ze*rt,y:lt-Le*rt}];return[p(Wt,{points:Bt,fill:be,stroke:be,strokeWidth:Math.max(1,h*.8)})]}const et=[{x:de,y:Te},{x:de-we*Ee+Ze*Qe,y:Te-Oe*Ee+Le*Qe},{x:de-we*Ee-Ze*Qe,y:Te-Oe*Ee-Le*Qe}];return[p(Wt,{points:et,fill:be,stroke:be,strokeWidth:Math.max(1,h*.8)})]},Fe=de=>{if(de.length===0)return null;if(de.length===1)return de[0];let Te=0;const ke=[];for(let be=0;be<de.length-1;be+=1){const we=de[be],Oe=de[be+1],Ze=Math.hypot(Oe[0]-we[0],Oe[1]-we[1]);ke.push({length:Ze,start:we,end:Oe}),Te+=Ze}if(Te===0)return de[0];let oe=Te/2;for(let be=0;be<ke.length;be+=1){const we=ke[be];if(oe<=we.length||be===ke.length-1){const Oe=we.length===0?0:Math.max(0,Math.min(1,oe/we.length));return[we.start[0]+(we.end[0]-we.start[0])*Oe,we.start[1]+(we.end[1]-we.start[1])*Oe]}oe-=we.length}return de[Math.floor(de.length/2)]},Be=(de,Te)=>{const ke=ne.get(de),oe=ne.get(Te);return!ke||!oe?null:s==="TB"?{start:[ke.centerX,ke.y+ke.height],end:[oe.centerX,oe.y]}:s==="BT"?{start:[ke.centerX,ke.y],end:[oe.centerX,oe.y+oe.height]}:s==="LR"?{start:[ke.x+ke.width,ke.centerY],end:[oe.x,oe.centerY]}:{start:[ke.x,ke.centerY],end:[oe.x+oe.width,oe.centerY]}},Ye=(de,Te)=>{const ke=Be(de,Te);if(!ke)return null;const{start:oe,end:be}=ke;if(ie){const Oe=oe[1]+(be[1]-oe[1])/2;return{start:oe,end:be,points:[oe,[oe[0],Oe],[be[0],Oe],be]}}const we=oe[0]+(be[0]-oe[0])/2;return{start:oe,end:be,points:[oe,[we,oe[1]],[we,be[1]],be]}};L.forEachEdge(de=>{var Te,ke,oe,be,we,Oe,Ze,Le,Ee;const Qe=_t=>Array.isArray(_t)?_t.map(pt=>pt&&Array.isArray(pt)&&pt.length>=2?[Number(pt[0]),Number(pt[1])]:null).filter(pt=>!!pt&&Number.isFinite(pt[0])&&Number.isFinite(pt[1])):[],et=()=>{const _t=ne.get(String(de.source)),pt=ne.get(String(de.target));return!_t||!pt?[]:[[_t.centerX-U,_t.centerY-K],[pt.centerX-U,pt.centerY-K]]},Xe=A==="orth",rt=Xe?Ye(String(de.source),String(de.target)):null,Rt=Xe?[]:Qe(de.points),lt=Xe?(Te=rt==null?void 0:rt.points)!=null?Te:[]:Rt.length?Rt:et();if(!lt.length)return;const Bt=Xe?0:U,Ge=Xe?0:K,$t=Xe&&(ke=rt==null?void 0:rt.start)!=null?ke:lt[0],Ut=Xe&&(oe=rt==null?void 0:rt.end)!=null?oe:lt[lt.length-1],Mt=(be=de._original)==null?void 0:be.relation,Ln=(we=T.get(String(de.source)))!=null?we:Z,dr=(Oe=T.get(String(de.target)))!=null?Oe:Z,Zr=`edge-gradient-${String(Ln)}-${String(dr)}`.replace(/[^a-zA-Z0-9_-]/g,""),Qr=f==="gradient"?`url(#${Zr})`:Z;let Jr="";if(Ce>0?Jr=$e(lt,Ce,Bt,Ge):Jr=Me(lt,Bt,Ge),!Jr)return;const rl=p(Pe,{d:Jr,stroke:Qr,strokeWidth:h,strokeDasharray:me,fill:"none","data-element-type":"shape",children:ue&&p("animate",{attributeName:"stroke-dashoffset",from:String(pe),to:"0",dur:_e,repeatCount:"indefinite"})});if(ce.push(rl),f==="gradient"){const _t=$t,pt=Ut;se.push(R("linearGradient",{id:Zr,gradientUnits:"userSpaceOnUse",x1:_t[0]+Bt,y1:_t[1]+Ge,x2:pt[0]+Bt,y2:pt[1]+Ge,children:[p("stop",{offset:"0%",stopColor:Ln}),p("stop",{offset:"100%",stopColor:dr})]}))}if(Mt!=null&&Mt.label){let _t=null;const pt=Fe(lt);if(pt&&(_t=[pt[0]+Bt,pt[1]+Ge]),_t){const Di=String(Mt.label),fr=ae(p(Ne,{fontSize:14,fontWeight:"normal",children:Di})),Zo=_t[0]-fr.width/2,fae=_t[1]-fr.height/2;ce.push(p(Ne,{x:Zo,y:fae,width:fr.width,height:fr.height,fontSize:14,fontWeight:"normal",alignHorizontal:"center",alignVertical:"middle",fill:Q,backgroundColor:te,children:Di}))}}const ei=(Ze=Mt==null?void 0:Mt.showArrow)!=null?Ze:b,fm=(Le=Mt==null?void 0:Mt.direction)!=null?Le:"forward",_S=(Ee=Mt==null?void 0:Mt.arrowType)!=null?Ee:_,xS=lt.length-1;if(ei&&lt.length>1){if(fm==="forward"||fm==="both"){const _t=lt[xS],pt=lt[xS-1],Di=Math.atan2(_t[1]-pt[1],_t[0]-pt[0]),fr=f==="gradient"?dr:Z,Zo=Re(_t[0]+Bt,_t[1]+Ge,Di,_S,fr);ce.push(...Zo)}if(fm==="both"){const _t=lt[0],pt=lt[1],Di=Math.atan2(_t[1]-pt[1],_t[0]-pt[0]),fr=f==="gradient"?Ln:Z,Zo=Re(_t[0]+Bt,_t[1]+Ge,Di,_S,fr);ce.push(...Zo)}}})}return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[E,R(Y,{children:[p(Ke,{children:se}),p(Y,{width:0,height:0,children:ce}),p(He,{children:ee}),p(qe,{})]})]})};We("relation-dagre-flow",{component:D$,composites:["title","item"]});const q$=e=>{const{Title:t,Item:n,data:r,spacing:i=120,showConnections:o=!0,options:a}=e,{title:s,desc:c,items:l=[]}=r,u=t?p(t,{title:s,desc:c}):null;if(l.length===0)return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[u,p(Y,{children:p(He,{})})]});const h=ae(p(n,{indexes:[0],data:r,datum:l[0],positionH:"center"}));function d(){const $=l.map((S,E)=>({id:E,data:S,isCenter:E===0,_originalIndex:[E]})),C=l.slice(1).map((S,E)=>({source:0,target:E+1})),M=YV($).force("link",DV(C).id(S=>S.id).distance(i)).force("charge",XV().strength(-50)).force("center",vV(0,0)).force("collision",NV().radius(Math.max(h.width,h.height)/2+10));for(let S=0;S<300;++S)M.tick();return{nodes:$,links:C}}const{nodes:f,links:g}=d(),y=Math.min(...f.map($=>{var C;return(C=$.x)!=null?C:0})),m=Math.min(...f.map($=>{var C;return(C=$.y)!=null?C:0})),v=Math.max(0,-y+h.width/2),b=Math.max(0,-m+h.height/2),_=($,C)=>({positionH:$<-50?"flipped":$>50?"normal":"center",positionV:C<-50?"flipped":C>50?"normal":"middle"}),x=f.map($=>{if($.x==null||$.y==null)return null;const C=$.x+v-h.width/2,M=$.y+b-h.height/2,{positionH:S,positionV:E}=_($.x,$.y);return p(n,{indexes:$._originalIndex,datum:$.data,data:r,x:C,y:M,positionH:S,positionV:E},$.id)}).filter(Boolean),w=new Map(f.map($=>[$.id,$])),P=o?g.map($=>{const C=typeof $.source=="object"?$.source:w.get($.source),M=typeof $.target=="object"?$.target:w.get($.target);if(!C||!M||C.x==null||C.y==null||M.x==null||M.y==null)return null;const S=`M ${C.x+v} ${C.y+b} L ${M.x+v} ${M.y+b}`;return p(Pe,{d:S,stroke:wt(a),strokeWidth:2,strokeOpacity:.6})}).filter(Boolean):[];return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[u,R(Y,{children:[p(Y,{children:P}),p(He,{children:x})]})]})};We("relation-network",{component:q$,composites:["title","item"]});var Cte=Object.defineProperty,Ote=Object.defineProperties,Ste=Object.getOwnPropertyDescriptors,Pc=Object.getOwnPropertySymbols,j$=Object.prototype.hasOwnProperty,F$=Object.prototype.propertyIsEnumerable,B$=(e,t,n)=>t in e?Cte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mte=(e,t)=>{for(var n in t||(t={}))j$.call(t,n)&&B$(e,n,t[n]);if(Pc)for(var n of Pc(t))F$.call(t,n)&&B$(e,n,t[n]);return e},Ete=(e,t)=>Ote(e,Ste(t)),Ite=(e,t)=>{var n={};for(var r in e)j$.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Pc)for(var r of Pc(e))t.indexOf(r)<0&&F$.call(e,r)&&(n[r]=e[r]);return n};const D1=e=>{var t=e,{width:n=25,height:r=25,colorPrimary:i="#6699FF",rotation:o=0}=t,a=Ite(t,["width","height","colorPrimary","rotation"]);const s=`gradient-arrow-stroke-${i.replace("#","")}`,c=`gradient-arrow-fill-${i.replace("#","")}`,l=Math.round(n*.515),u=Math.round(r*.275),h=Math.round(r*.875),d=[{x:0,y:u},{x:l,y:u},{x:l,y:r*.075},{x:n,y:r*.575},{x:l,y:r*1.075},{x:l,y:h},{x:0,y:h}],f=n/2,g=r/2,y=`rotate(${o} ${f} ${g})`;return R(tt,{children:[p(Wt,Ete(Mte({},a),{width:n,height:r,points:d,fill:`url(#${c})`,stroke:`url(#${s})`,transform:y,"data-element-type":"shape"})),R(Ke,{children:[R("linearGradient",{id:c,x1:"100%",y1:"0%",x2:"0%",y2:"0%",children:[p("stop",{offset:"0%","stop-color":i,"stop-opacity":"0.36"}),p("stop",{offset:"100%","stop-color":i,"stop-opacity":"0"})]}),R("linearGradient",{id:s,x1:"100%",y1:"0%",x2:"0%",y2:"0%",children:[p("stop",{offset:"0%","stop-color":i}),p("stop",{offset:"58%","stop-color":i,"stop-opacity":"0"})]})]})]})},Ate=({text:e,x:t=0,y:n=0,fontSize:r=56,fontWeight:i="bold",fill:o="#FFFFFF",textAnchor:a="middle",dominantBaseline:s="middle",shadowOffsetX:c=2,shadowOffsetY:l=4,midShadowOffsetX:u=1,midShadowOffsetY:h=2,deepShadowOpacity:d=.3,midShadowOpacity:f=.5})=>R(Y,{children:[p("text",{x:t,y:n,fontSize:r,fontWeight:i,fill:o,fillOpacity:d,textAnchor:a,dominantBaseline:s,transform:`translate(${c}, ${l})`,children:e}),p("text",{x:t,y:n,fontSize:r,fontWeight:i,fill:o,fillOpacity:f,textAnchor:a,dominantBaseline:s,transform:`translate(${u}, ${h})`,children:e}),p("text",{x:t,y:n,fontSize:r,fontWeight:i,fill:o,textAnchor:a,dominantBaseline:s,children:e})]});var Tte=Object.defineProperty,kte=Object.defineProperties,Rte=Object.getOwnPropertyDescriptors,$c=Object.getOwnPropertySymbols,W$=Object.prototype.hasOwnProperty,G$=Object.prototype.propertyIsEnumerable,V$=(e,t,n)=>t in e?Tte(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lte=(e,t)=>{for(var n in t||(t={}))W$.call(t,n)&&V$(e,n,t[n]);if($c)for(var n of $c(t))G$.call(t,n)&&V$(e,n,t[n]);return e},zte=(e,t)=>kte(e,Rte(t)),Nte=(e,t)=>{var n={};for(var r in e)W$.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&$c)for(var r of $c(e))t.indexOf(r)<0&&G$.call(e,r)&&(n[r]=e[r]);return n};const Hte=e=>{var t=e,{width:n=25,height:r=25,colorPrimary:i="#6699FF",rotation:o=0,strokeWidth:a=4}=t,s=Nte(t,["width","height","colorPrimary","rotation","strokeWidth"]);const c=[{x:n/2,y:0},{x:n,y:r},{x:0,y:r}],l=n/2,u=r/2,h=`rotate(${o} ${l} ${u})`;return p(Wt,zte(Lte({},s),{width:n,height:r,points:c,fill:i,stroke:i,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",transform:h}))},Dte=-118,Y$=118,X$=240,qte=180,jte=40,Fte="M238.9 69.7a6 6 0 0 1-.1 1v.2l-.2.3v.3l-.1.3a6.2 6.2 0 0 1-.3.6l-.1.3-.2.3-.2.4-.3.5-.1.1a10.9 10.9 0 0 1-.8 1v.1l-.5.5h-.1l-.4.4-.3.3-.3.2-.3.3-.4.2a13 13 0 0 1-.7.5l-.4.3-.5.3-97.5 56.7-.7.4h-.2l-.6.4h-.1l-.8.4h-.2l-.6.4h-.2l-.8.3h-.2l-.5.3-.5.1-.5.1-.5.2h-.5a33.7 33.7 0 0 1-3.2.7h-.2l-1 .2h-1.6l-.7.1h-4.7l-.8-.1h-.2a38.2 38.2 0 0 1-2-.4h-.4l-.7-.2h-.4l-.7-.2-.4-.1a27.3 27.3 0 0 1-2.2-.7h-.2a44.2 44.2 0 0 1-.9-.3l-.5-.3-.4-.1-.5-.2-.3-.2-.5-.2-.3-.2-.8-.4L6.5 78C2.2 75.6 0 72.4 0 69v41.7c0 3.2 2.1 6.5 6.4 9l98.1 56.6a23.2 23.2 0 0 0 1 .6l.6.3.3.1.5.2.4.2.3.1h.2l.2.2a21.4 21.4 0 0 0 1.9.6l.3.1h.2l.7.2a77.6 77.6 0 0 1 1.1.3h.3l.7.2h.4a42.5 42.5 0 0 0 1 .2l1 .2h1.1l.4.1h2.1l.7.1h1.5a22 22 0 0 0 1.8-.2h.4l1.1-.1h.2l1.2-.2h.1l.3-.1.6-.1a12.5 12.5 0 0 0 1-.3h.5l.5-.2a29 29 0 0 0 1-.3h.2l.3-.2h.2a27 27 0 0 0 1.6-.7h.2l.8-.4a19.4 19.4 0 0 0 1.6-.9l97.5-56.7.3-.1.2-.2.4-.2.4-.3.3-.2.3-.3.4-.2.3-.3.3-.3h.1l.3-.3.5-.6h.1l.3-.5h.1v-.1l.4-.4v-.1l.4-.5v-.1l.1-.2.1-.2.2-.3.1-.3.1-.3.1-.1a6.9 6.9 0 0 0 .2-.8l.1-.3v-.4l.1-.3v-1l.2-41.4v.4Z",Bte="M232.5 60.4c8.5 4.9 8.5 12.8.1 17.7l-97.5 56.7c-8.4 4.9-22 4.9-30.5 0L6.5 78C-2 73-2 65.3 6.4 60.4l97.5-56.7c8.4-5 22-5 30.5 0l98.1 56.7Z",Wte="M119.1 0A31 31 0 0 0 104 3.7L6.4 60.4C-2 65.3-2 73.2 6.4 78l98.2 56.7c4.2 2.4 9.8 3.7 15.3 3.7a31 31 0 0 0 15.2-3.7L232.6 78c8.4-5 8.4-12.8 0-17.7L134.3 3.7A31.2 31.2 0 0 0 119.1 0Zm0 2.5c5.4 0 10.3 1.2 14 3.3l98.2 56.7c3.3 2 5.1 4.3 5.1 6.8 0 2.4-1.8 4.7-5 6.6l-97.5 56.7a28.3 28.3 0 0 1-14 3.4c-5.3 0-10.3-1.2-14-3.4L7.7 76c-3.3-1.9-5-4.3-5-6.7 0-2.4 1.7-4.8 5-6.7L105 5.8a29 29 0 0 1 14-3.3Z",U$=R("filter",{id:"sequence-ascending-stairs-3d-shadow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[p("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),p("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p("feOffset",{dx:"0",dy:"4"}),p("feGaussianBlur",{stdDeviation:"6"}),p("feComposite",{in2:"hardAlpha",operator:"out"}),p("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),p("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})]}),K$=e=>{const{Title:t,Item:n,data:r,options:i,cubeWidth:o=X$}=e,{title:a,desc:s,items:c=[]}=r,l=t?p(t,{title:a,desc:s}):null;if(c.length===0)return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p(Ke,{children:U$}),l,p(Y,{children:p(qe,{children:p(J,{indexes:[0],x:0,y:0})})})]});const u=ae(p(J,{indexes:[0]})),h=[],d=[],f=[],g=o/X$,y=qte*g;return c.forEach((m,v)=>{const b=[v],_=je(i,b),x=v*(o+Dte),w=(c.length-1-v)*Y$,P=`cube-gradient-bottom-${v}`,$=`cube-gradient-top-${v}`,C=`cube-gradient-stroke-${v}`;f.push(R(Y,{x,y:w,id:`cube-${v}`,width:o,height:y,filter:"url(#sequence-ascending-stairs-3d-shadow-filter)",children:[R(Ke,{children:[R("linearGradient",{id:P,x1:"0",y1:"124.5",x2:"238.9",y2:"124.5",gradientUnits:"userSpaceOnUse",children:[p("stop",{offset:"0",stopColor:_,stopOpacity:"0.8"}),p("stop",{offset:"1",stopColor:_,stopOpacity:"0.4"})]}),R("linearGradient",{id:$,x1:"119.5",y1:"0",x2:"119.5",y2:"138.5",gradientUnits:"userSpaceOnUse",children:[p("stop",{offset:"0",stopColor:_,stopOpacity:"0.9"}),p("stop",{offset:"1",stopColor:_,stopOpacity:"0.5"})]}),R("linearGradient",{id:C,x1:"119.5",y1:"0",x2:"119.5",y2:"138.5",gradientUnits:"userSpaceOnUse",children:[p("stop",{offset:"0",stopColor:_}),p("stop",{offset:"1",stopColor:_,stopOpacity:"0.7"})]})]}),R(xt,{transform:`scale(${g})`,children:[p(Pe,{d:Fte,fill:`url(#${P})`}),p(Pe,{d:Bte,fill:`url(#${$})`}),p(Pe,{d:Wte,fill:`url(#${C})`})]}),p(Ate,{text:v+1,x:115,y:65,fontSize:56})]}));const M=x+o+jte,S=w+y/2;if(d.push(p(n,{indexes:b,datum:m,data:r,x:M,y:S,positionH:"normal"})),h.push(p(nt,{indexes:b,x:x+o-u.width/2,y:w-u.height/2})),v===0&&h.push(p(J,{indexes:[0],x:x-30-u.width/2,y:w+y/2-u.height/2})),v<c.length-1){const E=(c.length-1-(v+1))*Y$,I=x+o-u.width/2,O=(w+y/2+E+y/2)/2-u.height/2;h.push(p(J,{indexes:[v+1],x:I,y:O}))}else h.push(p(J,{indexes:[c.length],x:x+o+30-u.width/2,y:w+y/2-u.height/2}))}),R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[p(Ke,{children:U$}),l,R(Y,{x:0,y:0,children:[p(Y,{children:f}),p(He,{children:d}),p(qe,{children:h})]})]})};We("sequence-ascending-stairs-3d",{component:K$,composites:["title","item"]});const Z$=e=>{const{Title:t,Item:n,data:r,hGap:i=0,vGap:o=0}=e,{title:a,desc:s,items:c=[]}=r,l=t?p(t,{title:a,desc:s}):null,u=ae(p(n,{indexes:[0],data:r,datum:c[0]})),h=[],d=[],f=c.length,g=u.width+i,y=u.height/2+o,m=u.width/2,b=0+(f-1)*y;return c.forEach((_,x)=>{const w=m+x*g,P=b-x*y,$=[x];h.push(p(n,{indexes:$,datum:_,data:r,x:w,y:P})),d.push(p(nt,{indexes:$,x:w+u.width-30,y:P+u.height/2+10})),d.push(p(J,{indexes:$,x:w+u.width+i/2,y:P-30}))}),R(ye,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[l,R(Y,{children:[p(He,{children:h}),p(qe,{children:d})]})]})};We("sequence-ascending-steps",{component:Z$,composites:["title","item"]});const Gte=20,Q$=5,J$=e=>{const{Title:t,Item:n,data:r,options:i,radius:o=150,arrowSize:a=4,strokeWidth:s=10}=e,{title:c,desc:l,items:u=[]}=r,h=ae(p(J,{indexes:[0]})),d=wt(i);if(!n)return R(ye,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[t?p(t,{title:c,desc:l}):null,p(Y,{children:p(qe,{children:p(J,{indexes:[0],x:0,y:0})})})]});const f=u.length;if(f===0)return R(ye,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[t?p(t,{title:c,desc:l}):null,p(Y,{children:p(qe,{children:p(J,{indexes:[0],x:0,y:0})})})]});const g=ae(p(n,{indexes:[0],data:r,datum:u[0]})),y=0,m=0,v=2*Math.PI/f,b=[];let _=1/0,x=1/0,w=-1/0,P=-1/0;for(let z=0;z<f;z++){const j=z*v-Math.PI/2,H=y+o*Math.cos(j),W=m+o*Math.sin(j);b.push({x:H,y:W}),_=Math.min(_,H),x=Math.min(x,W),w=Math.max(w,H),P=Math.max(P,W)}const $=[];for(let z=0;z<f;z++){const j=b[z],H=b[(z+1)%f],W=Math.sqrt(Math.pow(H.x-j.x,2)+Math.pow(H.y-j.y,2)),B=Math.min(W*.5,100),X=(j.x+H.x)/2,D=(j.y+H.y)/2;_=Math.min(_,X-B/2),x=Math.min(x,D-B/2),w=Math.max(w,X+B/2),P=Math.max(P,D+B/2);const k=Math.atan2(D-m,X-y),A=k<0?k+2*Math.PI:k;let L,N;const q=A*180/Math.PI,G=B/2+Gte,U=X+Math.cos(k)*G,K=D+Math.sin(k)*G;q>=337.5||q<22.5?(L=U,N=K-g.height/2):q>=22.5&&q<67.5?(L=U,N=K):q>=67.5&&q<112.5?(L=U-g.width/2,N=K):q>=112.5&&q<157.5?(L=U-g.width,N=K):q>=157.5&&q<202.5?(L=U-g.width,N=K-g.height/2):q>=202.5&&q<247.5?(L=U-g.width,N=K-g.height):q>=247.5&&q<292.5?(L=U-g.width/2,N=K-g.height):(L=U,N=K-g.height),$.push({lineLength:W,circleBigW:B,midX:X,midY:D,itemX:L,itemY:N}),_=Math.min(_,L),x=Math.min(x,N),w=Math.max(w,L+g.width+h.width+5),P=Math.max(P,N+g.height)}const C=Math.max(0,-_),M=Math.max(0,-x),S=t?p(t,{title:c,desc:l}):null,E=[],I=[],O=[],T=[],F=b.map(z=>({x:z.x+C,y:z.y+M}));for(let z=0;z<f;z++){const j=F[z],H=F[(z+1)%f],W=(z+1)%f,B=[z],{lineLength:X,circleBigW:D,midX:k,midY:A}=$[z],L=Math.max(D-20,20),N=Math.max(L*.4,16),q=je(i,B)||d,G=H.x-j.x,U=H.y-j.y,K=X,ne=G/K,ee=U/K,se=Q$*2+a,ce=Math.min(Q$,(K-se)/2),Z=Math.max(0,j.x+ne*ce),le=Math.max(0,j.y+ee*ce),te=Math.max(0,H.x-ne*ce),Q=Math.max(0,H.y-ee*ce),ie=JY().x($e=>Math.max(0,$e.x)).y($e=>Math.max(0,$e.y)).curve(cw)([{x:Z,y:le},{x:te,y:Q}])||"",he=`fork-arrow-${q.replace(/[^a-zA-Z0-9]/g,"")}-${z}`,fe=`
114
+ M ${-a*.6} ${-a*.4}
115
115
  L 0 0
116
- L ${-s*.6} ${s*.4}
117
- `;A.push(d("marker",{id:ot,viewBox:`${-s} ${-s*.6} ${s*1.2} ${s*1.2}`,refX:-s*.08,refY:0,markerWidth:s,markerHeight:s,orient:"auto",markerUnits:"strokeWidth",children:d("path",{d:ft,fill:"none",stroke:V,strokeLinecap:"round",strokeLinejoin:"round","data-element-type":"shape"})})),O.push(d(yt,{d:gt,stroke:V,strokeWidth:a,fill:"none",markerEnd:`url(#${ot})`,strokeLinecap:"round","data-element-type":"shape"}));const mt=M+C,wt=H+T,pt=ge({colorPrimary:V},i);O.push(d(Wt,{x:Math.max(0,mt-z/2),y:Math.max(0,wt-z/2),width:z,height:z,fill:pt.colorPrimaryBg,"data-element-type":"shape"})),O.push(d(Wt,{x:Math.max(0,mt-B/2),y:Math.max(0,wt-B/2),width:B,height:B,fill:"#ffffff"})),O.push(d(Pe,{x:Math.max(0,mt-q/2),y:Math.max(0,wt-q/2),size:q,indexes:j,fill:V}));const _t=Math.max(0,mt-u.width/2),Rt=Math.max(0,wt-u.height/2);S.push(d(U,{indexes:[N],x:_t,y:Rt}))}for(let L=0;L<p;L++){const D=[L],k=h[L],{itemX:N,itemY:j}=P[L],X=Math.max(0,N+C),z=Math.max(0,j+T);R.push(d(n,{indexes:D,datum:k,data:r,x:X,y:z}));const M=Math.max(0,X+g.width+5),H=Math.max(0,z+g.height/2-u.height/2);S.push(d(Yt,{indexes:D,x:M,y:H}))}return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[E,I(Y,{x:0,y:0,children:[d(jt,{children:A}),d(Y,{children:O}),d(Ot,{children:R}),d(Et,{children:S})]})]})};Tt("sequence-circle-arrows",{component:Wy,composites:["title","item"]});const qH=100,UH=50,ZH=6,KH="40",Fy=t=>{const{Title:e,Item:n,data:r,options:i,outerRadius:o=180,innerRadius:s=120,itemDistance:a=310,gapAngle:l=5,iconRadius:c=34,iconBgRadius:h=38,iconSize:u=36}=t,{title:f,desc:p,items:g=[]}=r,y=e?d(e,{title:f,desc:p}):null,m=Math.max(a+qH,o+UH),x=Math.min(a,o),v=et(d(U,{indexes:[0]}));if(g.length===0)return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[y,d(Y,{children:d(Et,{children:d(U,{indexes:[0],x:m-20,y:x-20})})})]});const b=[],w=[],_=[],$=[],P=et(d(n,{indexes:[0],data:r,datum:g[0]})),E=(360-g.length*l)/g.length,S=(j,X,z,M,H,B)=>{const q=H*Math.PI/180,V=B*Math.PI/180,G=j+z*Math.cos(q),Z=X+z*Math.sin(q),K=j+M*Math.cos(q),it=X+M*Math.sin(q),Q=j+M*Math.cos(V),at=X+M*Math.sin(V),ht=j+z*Math.cos(V),nt=X+z*Math.sin(V),J=B-H<=180?"0":"1";return[`M ${G} ${Z}`,`L ${K} ${it}`,`A ${M} ${M} 0 ${J} 1 ${Q} ${at}`,`L ${ht} ${nt}`,`A ${z} ${z} 0 ${J} 0 ${G} ${Z}`,"Z"].join(" ")},R=({centerX:j,outerRadius:X,angleRad:z,btnBounds:M})=>{const H=j+(X+20)*Math.cos(z)-M.width/2,B=x+(X+20)*Math.sin(z)-M.height/2;return{x:H,y:B}},O=ZH,A=(s+o)/2,F=O/A*(180/Math.PI);g.forEach((j,X)=>{const z=[X],M=X*(E+l)+270,H=M+E,B=(M+H)/2,q=B*Math.PI/180,V=It(i,z),G=V+KH,Z=S(m,x,s,o,M,H);_.push(d(yt,{d:Z,fill:G,width:o*2,height:o*2,"data-element-type":"shape"}));const K=S(m,x,s+O,o-O,M+F,H-F);_.push(d(yt,{d:K,fill:V,width:o*2,height:o*2,"data-element-type":"shape"}));const it=(s+o)/2,Q=m+it*Math.cos(q),at=x+it*Math.sin(q);$.push(d(Wt,{x:Q-h,y:at-h,width:h*2,height:h*2,fill:"#ffffff","data-element-type":"shape"})),$.push(d(Wt,{x:Q-c,y:at-c,width:c*2,height:c*2,fill:V,"data-element-type":"shape"})),j.icon&&$.push(d(Pe,{x:Q-u/2,y:at-u/2,indexes:z,size:u,fill:"#fff"}));const ht=(B%360+360)%360,nt=ht>=270||ht<=90,J=ht>=75&&ht<=105;let tt,st="normal",vt="normal";J?(tt=ht,vt="normal",st="center"):nt?(ht>=270?tt=-60+(ht-270)/90*60:tt=ht/90*60,st="normal"):(tt=120+(ht-90)/180*120,st="flipped");const gt=tt*Math.PI/180,ut=m+a*Math.cos(gt)-P.width/2;let ot=x+a*Math.sin(gt)-P.height/2;J&&(ot=x+o+P.height/2),w.push(d(n,{indexes:z,datum:j,data:r,x:ut,y:ot,positionH:st,positionV:vt}));const ft=a+40,mt=m+ft*Math.cos(gt)-v.width/2,wt=x+ft*Math.sin(gt)-v.height/2;b.push(d(Yt,{indexes:z,x:mt,y:wt}));const _t=(M+E+l/2)*Math.PI/180,{x:Rt,y:Vt}=R({centerX:m,outerRadius:o,angleRad:_t,btnBounds:v});b.push(d(U,{indexes:[X+1],x:Rt,y:Vt}))});const D=(270-l/2)*Math.PI/180,{x:k,y:N}=R({centerX:m,outerRadius:o,angleRad:D,btnBounds:v});return b.unshift(d(U,{indexes:[0],x:k,y:N})),I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:70,children:[y,I(Y,{children:[d(Y,{children:_}),d(Y,{children:$}),d(Ot,{children:w}),d(Et,{children:b})]})]})};Tt("sequence-circular",{component:Fy,composites:["title","item"]});const By=t=>{const{Title:e,Item:n,data:r,gap:i=0,rowGap:o=0,itemsPerRow:s=3,circleStrokeWidth:a=18,options:l}=t,{title:c,desc:h,items:u=[]}=r,f=e?d(e,{title:c,desc:h}):null,p=ce(l),g=et(d(U,{indexes:[0]})),y=et(d(n,{indexes:[0],data:r,datum:u[0],positionH:"center"})),m=[],x=[],v=[],b=(o+y.height)/2,w=b;if(u.forEach((_,$)=>{const P=Math.floor($/s),C=$%s,T=P%2===1,S=(T?s-1-C:C)*(y.width+i)+w,R=P*(y.height+o),O=[$];if(x.push(d(n,{indexes:O,datum:_,data:r,x:S,y:R,positionH:"center",positionV:$%2===1?"flipped":"normal"})),m.push(d(Yt,{indexes:O,x:S+(y.width-g.width)/2,y:R+y.height+10})),$===0&&m.push(d(U,{indexes:O,x:S+(y.width-g.width)/2,y:R-g.height-10})),$<u.length-1){const A=Math.floor(($+1)/s);if(P===A)m.push(d(U,{indexes:[$+1],x:S+(y.width-g.width)/2,y:R-g.height-10}));else{const L=R+y.height/2,D=R+y.height+o+y.height/2;let k,N,j;T?(k=S,j=0,N=`M ${k} ${L} A ${b} ${b} 0 0 ${j} ${k} ${D}`):(k=S+y.width,j=1,N=`M ${k} ${L} A ${b} ${b} 0 0 ${j} ${k} ${D}`);const X=D-L,z=It(l,O),M=It(l,[$+1]),H=`gradient-arc-${$}`;v.push(I(Bt,{children:[d(jt,{children:I("linearGradient",{id:H,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:z||p}),d("stop",{offset:"100%",stopColor:M||p})]})}),d(yt,{d:N,stroke:`url(#${H})`,strokeWidth:a,fill:"none",width:w,height:X,"data-element-type":"shape"})]}));const B=T?k-b-g.width/2:k+b-g.width/2,q=R+y.height+o/2-g.height/2;m.push(d(U,{indexes:[$+1],x:B,y:q}))}}}),u.length>0){const _=u.length-1,$=Math.floor(_/s),P=_%s,E=($%2===1?s-1-P:P)*(y.width+i),S=$*(y.height+o);m.push(d(U,{indexes:[u.length],x:E+(y.width-g.width)/2,y:S+y.height+g.height+20}))}if(u.length/s>2){const _=(o+y.height)/2,$=It(l,[0]);v.push(d(Ct,{x:0,y:y.height/2-a/2,width:_,height:a,fill:$||p,"data-element-type":"shape"}))}return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,I(Y,{width:s*y.width+(s-1)*i+b*2,height:Math.ceil(u.length/s)*(y.height+o),children:[d(Y,{children:v}),d(Ot,{children:x}),d(Et,{children:m})]})]})};Tt("sequence-color-snake-steps",{component:By,composites:["title","item"]});const ta=(t,e)=>t===0?0:t===1?e/2:e/2+(t-1)*(e/2*3),ea=(t,e,n)=>{if(t)return 0;const o=e===0?2:n;return n*2+o},QH=(t,e,n,r,i,o,s,a)=>{const l=Math.max(6,o*.15),c=r+(t-1)*i,h=t*l,u=100,p=c+h+u+50,g=p-u;let y=0,m=0,x=0,v=0;if(t>0){let w=1/0,_=-1/0;for(let A=0;A<t;A++){const F=A%2===0,L=Math.floor(A/2),D=ta(L,n),N=0+ea(F,L,n)+D;w=Math.min(w,N-n),_=Math.max(_,N+n)}const $=(w+_)/2,P=0;y=0,v=y+e.width+a+s+n,x=v-P+$;const S=y+e.width/2,R=x-S;m=x+R-e.width/2}return{canvasHeight:p,startY:g,leftItemAlignedX:y,rightItemAlignedX:m,cylinderAreaStartX:v}},JH=(t,e,n,r,i,o,s)=>{const a=t%2===0,l=Math.floor(t/2),c=ta(l,e),h=ea(a,l,e),u=s+h+c,f=o-t*i,p=n+t*r,g=f-p;return{x:u,y:g,height:p,bottomY:f,topY:g}},tR=(t,e,n,r,i,o,s,a,l)=>{const c=t%2===0,h=e.topY+e.height*.05;let u,f;c?(u=i,f=u+n.width+l):(u=o,f=u-l);let p;s==="top"?p=h:s==="bottom"?p=h-n.height:p=h-n.height/2,p+=a;const g=c?e.x-r:e.x+r,y=c?g-l:g+l;return{itemPos:{x:u,y:p},lineStartX:y,lineEndX:f,lineY:h}},eR=(t,e)=>{const n=lt(e),r=[];return r.push(I("linearGradient",{id:`cylinderGradient${t}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:n.toRgbString(),stopOpacity:.7}),d("stop",{offset:"40%",stopColor:n.clone().lighten(5).toRgbString(),stopOpacity:.65}),d("stop",{offset:"70%",stopColor:n.clone().lighten(15).toRgbString(),stopOpacity:.6}),d("stop",{offset:"100%",stopColor:n.clone().lighten(20).toRgbString(),stopOpacity:.55})]})),r.push(I("linearGradient",{id:`topGradient${t}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:n.clone().lighten(15).toRgbString(),stopOpacity:1}),d("stop",{offset:"100%",stopColor:"#fafafa",stopOpacity:1})]})),r.push(I("linearGradient",{id:`bottomGradient${t}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:n.clone().darken(8).toRgbString(),stopOpacity:.75}),d("stop",{offset:"50%",stopColor:n.clone().darken(5).toRgbString(),stopOpacity:.7}),d("stop",{offset:"100%",stopColor:n.clone().darken(12).toRgbString(),stopOpacity:.65})]})),r.push(I("linearGradient",{id:`numberGradient${t}`,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:n.clone().darken(0).toRgbString(),stopOpacity:.9}),d("stop",{offset:"50%",stopColor:n.clone().lighten(5).toRgbString(),stopOpacity:.85}),d("stop",{offset:"100%",stopColor:n.clone().lighten(10).toRgbString(),stopOpacity:.8})]})),r.push(I("linearGradient",{id:`glowGradient${t}`,x1:"0%",y1:"100%",x2:"0%",y2:"0%",children:[d("stop",{offset:"0%",stopColor:"#FFFFFF",stopOpacity:.2}),d("stop",{offset:"90%",stopColor:"#FFFFFF",stopOpacity:0})]})),r},nR=(t,e,n,r)=>{const{x:i,topY:o,bottomY:s}=e,a=[];a.push(d("ellipse",{id:`cylinder-bottom-${t}`,cx:i,cy:s,rx:n,ry:r,fill:`url(#bottomGradient${t})`,opacity:.7})),a.push(d(yt,{id:`cylinder-body-${t}`,d:`
116
+ L ${-a*.6} ${a*.4}
117
+ `;T.push(p("marker",{id:he,viewBox:`${-a} ${-a*.6} ${a*1.2} ${a*1.2}`,refX:-a*.08,refY:0,markerWidth:a,markerHeight:a,orient:"auto",markerUnits:"strokeWidth",children:p("path",{d:fe,fill:"none",stroke:q,strokeLinecap:"round",strokeLinejoin:"round","data-element-type":"shape"})})),O.push(p(Pe,{d:ie,stroke:q,strokeWidth:s,fill:"none",markerEnd:`url(#${he})`,strokeLinecap:"round","data-element-type":"shape"}));const me=k+C,pe=A+M,_e=Ct({colorPrimary:q},i);O.push(p(Je,{x:Math.max(0,me-D/2),y:Math.max(0,pe-D/2),width:D,height:D,fill:_e.colorPrimaryBg,"data-element-type":"shape"})),O.push(p(Je,{x:Math.max(0,me-L/2),y:Math.max(0,pe-L/2),width:L,height:L,fill:"#ffffff"})),O.push(p(Dt,{x:Math.max(0,me-N/2),y:Math.max(0,pe-N/2),size:N,indexes:B,fill:q}));const Ce=Math.max(0,me-h.width/2),Me=Math.max(0,pe-h.height/2);E.push(p(J,{indexes:[W],x:Ce,y:Me}))}for(let z=0;z<f;z++){const j=[z],H=u[z],{itemX:W,itemY:B}=$[z],X=Math.max(0,W+C),D=Math.max(0,B+M);I.push(p(n,{indexes:j,datum:H,data:r,x:X,y:D}));const k=Math.max(0,X+g.width+5),A=Math.max(0,D+g.height/2-h.height/2);E.push(p(nt,{indexes:j,x:k,y:A}))}return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[S,R(Y,{x:0,y:0,children:[p(Ke,{children:T}),p(Y,{children:O}),p(He,{children:I}),p(qe,{children:E})]})]})};We("sequence-circle-arrows",{component:J$,composites:["title","item"]});const Vte=100,Yte=50,Xte=6,Ute="40",eC=e=>{const{Title:t,Item:n,data:r,options:i,outerRadius:o=180,innerRadius:a=120,itemDistance:s=310,gapAngle:c=5,iconRadius:l=34,iconBgRadius:u=38,iconSize:h=36}=e,{title:d,desc:f,items:g=[]}=r,y=t?p(t,{title:d,desc:f}):null,m=Math.max(s+Vte,o+Yte),v=Math.min(s,o),b=ae(p(J,{indexes:[0]}));if(g.length===0)return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[y,p(Y,{children:p(qe,{children:p(J,{indexes:[0],x:m-20,y:v-20})})})]});const _=[],x=[],w=[],P=[],$=ae(p(n,{indexes:[0],data:r,datum:g[0]})),S=(360-g.length*c)/g.length,E=(B,X,D,k,A,L)=>{const N=A*Math.PI/180,q=L*Math.PI/180,G=B+D*Math.cos(N),U=X+D*Math.sin(N),K=B+k*Math.cos(N),ne=X+k*Math.sin(N),ee=B+k*Math.cos(q),se=X+k*Math.sin(q),ce=B+D*Math.cos(q),Z=X+D*Math.sin(q),le=L-A<=180?"0":"1";return[`M ${G} ${U}`,`L ${K} ${ne}`,`A ${k} ${k} 0 ${le} 1 ${ee} ${se}`,`L ${ce} ${Z}`,`A ${D} ${D} 0 ${le} 0 ${G} ${U}`,"Z"].join(" ")},I=({centerX:B,outerRadius:X,angleRad:D,btnBounds:k})=>{const A=B+(X+20)*Math.cos(D)-k.width/2,L=v+(X+20)*Math.sin(D)-k.height/2;return{x:A,y:L}},O=Xte,T=(a+o)/2,F=O/T*(180/Math.PI);g.forEach((B,X)=>{const D=[X],k=X*(S+c)+270,A=k+S,L=(k+A)/2,N=L*Math.PI/180,q=je(i,D),G=q+Ute,U=E(m,v,a,o,k,A);w.push(p(Pe,{d:U,fill:G,width:o*2,height:o*2,"data-element-type":"shape"}));const K=E(m,v,a+O,o-O,k+F,A-F);w.push(p(Pe,{d:K,fill:q,width:o*2,height:o*2,"data-element-type":"shape"}));const ne=(a+o)/2,ee=m+ne*Math.cos(N),se=v+ne*Math.sin(N);P.push(p(Je,{x:ee-u,y:se-u,width:u*2,height:u*2,fill:"#ffffff","data-element-type":"shape"})),P.push(p(Je,{x:ee-l,y:se-l,width:l*2,height:l*2,fill:q,"data-element-type":"shape"})),B.icon&&P.push(p(Dt,{x:ee-h/2,y:se-h/2,indexes:D,size:h,fill:"#fff"}));const ce=(L%360+360)%360,Z=ce>=270||ce<=90,le=ce>=75&&ce<=105;let te,Q="normal",re="normal";le?(te=ce,re="normal",Q="center"):Z?(ce>=270?te=-60+(ce-270)/90*60:te=ce/90*60,Q="normal"):(te=120+(ce-90)/180*120,Q="flipped");const ie=te*Math.PI/180,ue=m+s*Math.cos(ie)-$.width/2;let he=v+s*Math.sin(ie)-$.height/2;le&&(he=v+o+$.height/2),x.push(p(n,{indexes:D,datum:B,data:r,x:ue,y:he,positionH:Q,positionV:re}));const fe=s+40,me=m+fe*Math.cos(ie)-b.width/2,pe=v+fe*Math.sin(ie)-b.height/2;_.push(p(nt,{indexes:D,x:me,y:pe}));const Ce=(k+S+c/2)*Math.PI/180,{x:Me,y:$e}=I({centerX:m,outerRadius:o,angleRad:Ce,btnBounds:b});_.push(p(J,{indexes:[X+1],x:Me,y:$e}))});const j=(270-c/2)*Math.PI/180,{x:H,y:W}=I({centerX:m,outerRadius:o,angleRad:j,btnBounds:b});return _.unshift(p(J,{indexes:[0],x:H,y:W})),R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:70,children:[y,R(Y,{children:[p(Y,{children:w}),p(Y,{children:P}),p(He,{children:x}),p(qe,{children:_})]})]})};We("sequence-circular",{component:eC,composites:["title","item"]});const tC=e=>{const{Title:t,Item:n,data:r,gap:i=0,rowGap:o=0,itemsPerRow:a=3,circleStrokeWidth:s=18,options:c}=e,{title:l,desc:u,items:h=[]}=r,d=t?p(t,{title:l,desc:u}):null,f=wt(c),g=ae(p(J,{indexes:[0]})),y=ae(p(n,{indexes:[0],data:r,datum:h[0],positionH:"center"})),m=[],v=[],b=[],_=(o+y.height)/2,x=_;if(h.forEach((w,P)=>{const $=Math.floor(P/a),C=P%a,M=$%2===1,E=(M?a-1-C:C)*(y.width+i)+x,I=$*(y.height+o),O=[P];if(v.push(p(n,{indexes:O,datum:w,data:r,x:E,y:I,positionH:"center",positionV:P%2===1?"flipped":"normal"})),m.push(p(nt,{indexes:O,x:E+(y.width-g.width)/2,y:I+y.height+10})),P===0&&m.push(p(J,{indexes:O,x:E+(y.width-g.width)/2,y:I-g.height-10})),P<h.length-1){const T=Math.floor((P+1)/a);if($===T)m.push(p(J,{indexes:[P+1],x:E+(y.width-g.width)/2,y:I-g.height-10}));else{const z=I+y.height/2,j=I+y.height+o+y.height/2;let H,W,B;M?(H=E,B=0,W=`M ${H} ${z} A ${_} ${_} 0 0 ${B} ${H} ${j}`):(H=E+y.width,B=1,W=`M ${H} ${z} A ${_} ${_} 0 0 ${B} ${H} ${j}`);const X=j-z,D=je(c,O),k=je(c,[P+1]),A=`gradient-arc-${P}`;b.push(R(tt,{children:[p(Ke,{children:R("linearGradient",{id:A,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[p("stop",{offset:"0%",stopColor:D||f}),p("stop",{offset:"100%",stopColor:k||f})]})}),p(Pe,{d:W,stroke:`url(#${A})`,strokeWidth:s,fill:"none",width:x,height:X,"data-element-type":"shape"})]}));const L=M?H-_-g.width/2:H+_-g.width/2,N=I+y.height+o/2-g.height/2;m.push(p(J,{indexes:[P+1],x:L,y:N}))}}}),h.length>0){const w=h.length-1,P=Math.floor(w/a),$=w%a,S=(P%2===1?a-1-$:$)*(y.width+i),E=P*(y.height+o);m.push(p(J,{indexes:[h.length],x:S+(y.width-g.width)/2,y:E+y.height+g.height+20}))}if(h.length/a>2){const w=(o+y.height)/2,P=je(c,[0]);b.push(p(ze,{x:0,y:y.height/2-s/2,width:w,height:s,fill:P||f,"data-element-type":"shape"}))}return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[d,R(Y,{width:a*y.width+(a-1)*i+_*2,height:Math.ceil(h.length/a)*(y.height+o),children:[p(Y,{children:b}),p(He,{children:v}),p(qe,{children:m})]})]})};We("sequence-color-snake-steps",{component:tC,composites:["title","item"]});const Cc=(e,t)=>e===0?0:e===1?t/2:t/2+(e-1)*(t/2*3),Oc=(e,t,n)=>{if(e)return 0;const o=t===0?2:n;return n*2+o},Kte=(e,t,n,r,i,o,a,s)=>{const c=Math.max(6,o*.15),l=r+(e-1)*i,u=e*c,h=100,f=l+u+h+50,g=f-h;let y=0,m=0,v=0,b=0;if(e>0){let x=1/0,w=-1/0;for(let T=0;T<e;T++){const F=T%2===0,z=Math.floor(T/2),j=Cc(z,n),W=0+Oc(F,z,n)+j;x=Math.min(x,W-n),w=Math.max(w,W+n)}const P=(x+w)/2,$=0;y=0,b=y+t.width+s+a+n,v=b-$+P;const E=y+t.width/2,I=v-E;m=v+I-t.width/2}return{canvasHeight:f,startY:g,leftItemAlignedX:y,rightItemAlignedX:m,cylinderAreaStartX:b}},Zte=(e,t,n,r,i,o,a)=>{const s=e%2===0,c=Math.floor(e/2),l=Cc(c,t),u=Oc(s,c,t),h=a+u+l,d=o-e*i,f=n+e*r,g=d-f;return{x:h,y:g,height:f,bottomY:d,topY:g}},Qte=(e,t,n,r,i,o,a,s,c)=>{const l=e%2===0,u=t.topY+t.height*.05;let h,d;l?(h=i,d=h+n.width+c):(h=o,d=h-c);let f;a==="top"?f=u:a==="bottom"?f=u-n.height:f=u-n.height/2,f+=s;const g=l?t.x-r:t.x+r,y=l?g-c:g+c;return{itemPos:{x:h,y:f},lineStartX:y,lineEndX:d,lineY:u}},Jte=(e,t)=>{const n=ve(t),r=[];return r.push(R("linearGradient",{id:`cylinderGradient${e}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[p("stop",{offset:"0%",stopColor:n.toRgbString(),stopOpacity:.7}),p("stop",{offset:"40%",stopColor:n.clone().lighten(5).toRgbString(),stopOpacity:.65}),p("stop",{offset:"70%",stopColor:n.clone().lighten(15).toRgbString(),stopOpacity:.6}),p("stop",{offset:"100%",stopColor:n.clone().lighten(20).toRgbString(),stopOpacity:.55})]})),r.push(R("linearGradient",{id:`topGradient${e}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[p("stop",{offset:"0%",stopColor:n.clone().lighten(15).toRgbString(),stopOpacity:1}),p("stop",{offset:"100%",stopColor:"#fafafa",stopOpacity:1})]})),r.push(R("linearGradient",{id:`bottomGradient${e}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[p("stop",{offset:"0%",stopColor:n.clone().darken(8).toRgbString(),stopOpacity:.75}),p("stop",{offset:"50%",stopColor:n.clone().darken(5).toRgbString(),stopOpacity:.7}),p("stop",{offset:"100%",stopColor:n.clone().darken(12).toRgbString(),stopOpacity:.65})]})),r.push(R("linearGradient",{id:`numberGradient${e}`,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[p("stop",{offset:"0%",stopColor:n.clone().darken(0).toRgbString(),stopOpacity:.9}),p("stop",{offset:"50%",stopColor:n.clone().lighten(5).toRgbString(),stopOpacity:.85}),p("stop",{offset:"100%",stopColor:n.clone().lighten(10).toRgbString(),stopOpacity:.8})]})),r.push(R("linearGradient",{id:`glowGradient${e}`,x1:"0%",y1:"100%",x2:"0%",y2:"0%",children:[p("stop",{offset:"0%",stopColor:"#FFFFFF",stopOpacity:.2}),p("stop",{offset:"90%",stopColor:"#FFFFFF",stopOpacity:0})]})),r},ene=(e,t,n,r)=>{const{x:i,topY:o,bottomY:a}=t,s=[];s.push(p("ellipse",{id:`cylinder-bottom-${e}`,cx:i,cy:a,rx:n,ry:r,fill:`url(#bottomGradient${e})`,opacity:.7})),s.push(p(Pe,{id:`cylinder-body-${e}`,d:`
118
118
  M ${i-n} ${o}
119
119
  A ${n} ${r} 0 0 0 ${i} ${o+r}
120
120
  A ${n} ${r} 0 0 0 ${i+n} ${o}
121
- L ${i+n} ${s}
122
- A ${n} ${r} 0 0 1 ${i} ${s+r}
123
- A ${n} ${r} 0 0 1 ${i-n} ${s}
121
+ L ${i+n} ${a}
122
+ A ${n} ${r} 0 0 1 ${i} ${a+r}
123
+ A ${n} ${r} 0 0 1 ${i-n} ${a}
124
124
  Z
125
- `,fill:`url(#cylinderGradient${t})`,stroke:"none"})),a.push(d(Ct,{id:`cylinder-glow-${t}`,x:i-n,y:o-r*3,width:n*2,height:r*3,fill:`url(#glowGradient${t})`})),a.push(d("ellipse",{id:`cylinder-top-${t}`,cx:i,cy:o,rx:n,ry:r,fill:`url(#topGradient${t})`}));const l=i-10,c=o-15,f=`translate(${l}, ${c}) matrix(1, 0, ${-.6}, ${.6}, 0, 0)`;return a.push(d(St,{id:`cylinder-number-${t}`,width:50,height:50,fontFamily:"Arial Black, sans-serif",fontSize:32,fontWeight:900,fill:`url(#numberGradient${t})`,alignHorizontal:"center",alignVertical:"middle",transform:f,children:t+1})),a},rR=(t,e,n,r,i)=>{const s=[];return s.push(d("circle",{id:`decoration-dot-start-${t}`,cx:e,cy:r,r:2,fill:i})),s.push(d("line",{id:`decoration-line-${t}`,x1:e,y1:r,x2:n,y2:r,stroke:i,strokeWidth:1,opacity:.8})),s.push(d("circle",{id:`decoration-dot-end-${t}`,cx:n,cy:r,r:2,fill:i,opacity:.9})),s},iR=(t,e,n,r,i)=>{if(t===0)return null;const o=[];for(let w=0;w<t;w++){const _=w%2===0,$=Math.floor(w/2),P=ta($,e),C=ea(_,$,e),T=n+C+P,E=r-w*i;o.push({x:T,y:E})}const s=o[0],a=o[o.length-1],l=6,c=t>5?t*16:100,h=s.x-e-c,u=s.x+e+c,f=s.y+l+c/6,p=a.x-e-c,g=a.x+e+c,y=a.y+l-c/6,m=`
126
- M ${h} ${f}
127
- L ${u} ${f}
125
+ `,fill:`url(#cylinderGradient${e})`,stroke:"none"})),s.push(p(ze,{id:`cylinder-glow-${e}`,x:i-n,y:o-r*3,width:n*2,height:r*3,fill:`url(#glowGradient${e})`})),s.push(p("ellipse",{id:`cylinder-top-${e}`,cx:i,cy:o,rx:n,ry:r,fill:`url(#topGradient${e})`}));const c=i-10,l=o-15,d=`translate(${c}, ${l}) matrix(1, 0, ${-.6}, ${.6}, 0, 0)`;return s.push(p(Ne,{id:`cylinder-number-${e}`,width:50,height:50,fontFamily:"Arial Black, sans-serif",fontSize:32,fontWeight:900,fill:`url(#numberGradient${e})`,alignHorizontal:"center",alignVertical:"middle",transform:d,children:e+1})),s},tne=(e,t,n,r,i)=>{const a=[];return a.push(p("circle",{id:`decoration-dot-start-${e}`,cx:t,cy:r,r:2,fill:i})),a.push(p("line",{id:`decoration-line-${e}`,x1:t,y1:r,x2:n,y2:r,stroke:i,strokeWidth:1,opacity:.8})),a.push(p("circle",{id:`decoration-dot-end-${e}`,cx:n,cy:r,r:2,fill:i,opacity:.9})),a},nne=(e,t,n,r,i)=>{if(e===0)return null;const o=[];for(let x=0;x<e;x++){const w=x%2===0,P=Math.floor(x/2),$=Cc(P,t),C=Oc(w,P,t),M=n+C+$,S=r-x*i;o.push({x:M,y:S})}const a=o[0],s=o[o.length-1],c=6,l=e>5?e*16:100,u=a.x-t-l,h=a.x+t+l,d=a.y+c+l/6,f=s.x-t-l,g=s.x+t+l,y=s.y+c-l/6,m=`
126
+ M ${u} ${d}
127
+ L ${h} ${d}
128
128
  L ${g} ${y}
129
- L ${p} ${y}
129
+ L ${f} ${y}
130
130
  Z
131
- `,x=`
132
- M ${u} ${f}
133
- L ${u} ${f+l}
134
- L ${g} ${y+l}
131
+ `,v=`
132
+ M ${h} ${d}
133
+ L ${h} ${d+c}
134
+ L ${g} ${y+c}
135
135
  L ${g} ${y}
136
136
  Z
137
- `,v=`
138
- M ${h} ${f}
139
- L ${u} ${f}
140
- L ${u} ${f+l}
141
- L ${h} ${f+l}
137
+ `,b=`
138
+ M ${u} ${d}
139
+ L ${h} ${d}
140
+ L ${h} ${d+c}
141
+ L ${u} ${d+c}
142
142
  Z
143
- `;return I(Y,{children:[d(jt,{children:I(Bt,{children:[I("linearGradient",{id:"basePlateTopGradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:"#fafafa",stopOpacity:1}),d("stop",{offset:"50%",stopColor:"#ffffff",stopOpacity:.98}),d("stop",{offset:"100%",stopColor:"#ececec",stopOpacity:.95})]}),I("linearGradient",{id:"basePlateFrontGradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:"#e0e0e0",stopOpacity:.95}),d("stop",{offset:"50%",stopColor:"#d2d2d2",stopOpacity:.93}),d("stop",{offset:"100%",stopColor:"#c5c5c5",stopOpacity:.9})]}),I("linearGradient",{id:"basePlateSideGradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d("stop",{offset:"0%",stopColor:"#b8b8b8",stopOpacity:.92}),d("stop",{offset:"50%",stopColor:"#c0c0c0",stopOpacity:.88}),d("stop",{offset:"100%",stopColor:"#adadad",stopOpacity:.85})]})]})}),d(yt,{id:"base-plate-front",d:v,fill:"url(#basePlateFrontGradient)",stroke:"#c5c5c5",strokeWidth:.3,opacity:.92}),d(yt,{id:"base-plate-side",d:x,fill:"url(#basePlateSideGradient)",stroke:"#aaaaaa",strokeWidth:.3,opacity:.88}),d(yt,{id:"base-plate-top",d:m,fill:"url(#basePlateTopGradient)",stroke:"#e5e5e5",strokeWidth:.5,opacity:.93})]})},Yy=t=>{const{Title:e,Item:n,data:r,options:i,cylinderRx:o=28,cylinderRy:s=18,baseHeight:a=120,heightIncrement:l=40,depthSpacing:c=60,itemVerticalAlign:h="top",itemVerticalOffset:u=-12,firstDecorationWidth:f=90}=t,{title:p,desc:g,items:y=[]}=r,m=e?d(e,{title:p,desc:g}):null,x=et(d(n,{indexes:[0],data:r,datum:y[0],positionH:"center"})),v=et(d(U,{indexes:[0]})),b=ce(i),w=10,_=Math.max(6,c*.15),$=QH(y.length,x,o,a,l,c,f,w),{startY:P,leftItemAlignedX:C,rightItemAlignedX:T,cylinderAreaStartX:E}=$,S=[],R=[];y.forEach((z,M)=>{const H=It(i,[M])||b;S.push(...eR(M,H));const B=JH(M,o,a,l,_,P,E),q=nR(M,B,o,s),{itemPos:V,lineStartX:G,lineEndX:Z,lineY:K}=tR(M,B,x,o,C,T,h,u,w),it=rR(M,G,Z,K,H);q.push(...it);const Q=d(n,{indexes:[M],datum:z,data:r,x:V.x,y:V.y,positionH:M%2===0?"flipped":"normal"}),at=[d(Yt,{indexes:[M],x:V.x+x.width/2-v.width/2,y:V.y+x.height+10}),d(U,{indexes:[M],x:V.x+x.width/2-v.width/2,y:V.y-v.height-10})];R[M]={cylinderNodes:q,itemNode:Q,btnNodes:at,itemX:V.x,itemY:V.y}});let O=1/0,A=1/0,F=-1/0,L=-1/0;R.forEach(z=>{const{itemX:M,itemY:H}=z;O=Math.min(O,M),A=Math.min(A,H),F=Math.max(F,M+x.width),L=Math.max(L,H+x.height)});const D=F-O,k=L-A,N=[d(jt,{children:S})],j=[],X=iR(y.length,o,E,P,_);X&&N.push(X);for(let z=y.length-1;z>=0;z--){const M=R[z];M&&(N.push(I(Y,{children:[d(Y,{children:M.cylinderNodes}),M.itemNode]})),j.push(...M.btnNodes))}if(y.length>0){const z=y.length%2===0,M=Math.floor(y.length/2),H=ta(M,o),B=ea(z,M,o),q=E+B+H,V=P-y.length*_;j.push(d(U,{indexes:[y.length],x:q,y:V-100}))}return I(ct,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[m,I(Y,{width:D,height:k,children:[d(Ot,{children:N}),d(Et,{children:j})]})]})};Tt("sequence-cylinders-3d",{component:Yy,composites:["title","item"]});const Gt={WIDTH:160,HEIGHT:260,ARROW_HEIGHT:148,ARROW_WIDTH:100,LINE_X:100,RECT_X:0,RECT_Y:80,RECT_WIDTH:100,RECT_HEIGHT:130},un={SIZE:8,MAX_COUNT:40,MIN_COUNT:5,ARROW_RATIO:.6,MIN_ARROW_COUNT:3};function oR(t,e,n){return(t+e*7+n*13)%100}function sR(t){const e=Math.ceil(Math.sqrt(t*1.5)),n=Math.ceil(t/e);return{cols:e,rows:n}}function aR(t,e,n,r,i,o,s,a){const l=Math.max(i,Math.min(t+n,o)),c=Math.max(s,Math.min(e+r,a));return{x:l,y:c}}function Vy({count:t,rectX:e,rectY:n,rectWidth:r,rectHeight:i,seed:o}){const s=[],a=un.SIZE/2,{cols:l,rows:c}=sR(t),h=(r-a*2)/(l+1),u=(i-a*2)/(c+1);let f=0;for(let p=0;p<c&&f<t;p++)for(let g=0;g<l&&f<t;g++){const y=oR(o,p,g),m=y%16-8,x=y*3%12-6,v=p%2===1?h/2:0,b=e+a+(g+1)*h+v,w=n+a+(p+1)*u,{x:_,y:$}=aR(b,w,m,x,e+a,e+r-a,n+a,n+i-a);s.push({x:_,y:$,colorIndex:f}),f++}return s}function lR(t,e){if(e<=1)return un.MAX_COUNT;const n=t/(e-1),r=un.MAX_COUNT-un.MIN_COUNT;return Math.round(un.MAX_COUNT-r*n)}function cR(){const s={topLeft:{x:40,y:25},topRight:{x:160,y:75},bottomLeft:{x:40,y:205},bottomRight:{x:160,y:255}},a=[];for(let l=0;l<=12;l++){const c=l/12,h={x:s.topLeft.x+(s.bottomLeft.x-s.topLeft.x)*c,y:s.topLeft.y+(s.bottomLeft.y-s.topLeft.y)*c},u={x:s.topRight.x+(s.bottomRight.x-s.topRight.x)*c,y:s.topRight.y+(s.bottomRight.y-s.topRight.y)*c};a.push(`M${h.x} ${h.y}L${u.x} ${u.y}`);const f={x:s.topLeft.x+(s.topRight.x-s.topLeft.x)*c,y:s.topLeft.y+(s.topRight.y-s.topLeft.y)*c},p={x:s.bottomLeft.x+(s.bottomRight.x-s.bottomLeft.x)*c,y:s.bottomLeft.y+(s.bottomRight.y-s.bottomLeft.y)*c};a.push(`M${f.x} ${f.y}L${p.x} ${p.y}`)}return a.join("")}function Xy(t,e){return t.map(n=>{const r=It(e,[n.colorIndex]);return d(yt,{d:"M4 0L8 4L4 8L0 4Z",fill:r,x:n.x,y:n.y,width:un.SIZE,height:un.SIZE,"data-element-type":"shape"})})}function hR(t,e,n,r,i){return I(Y,{x:e,y:0,width:Gt.WIDTH,height:Gt.HEIGHT,children:[I(le,{children:[d(yt,{d:cR(),stroke:"#D9D9D9",strokeWidth:2}),d(yt,{d:`M${Gt.LINE_X} 25V260`,stroke:"#BFBFBF",strokeWidth:2,strokeLinecap:"round"}),d(Ct,{x:Gt.RECT_X,y:Gt.RECT_Y,width:Gt.RECT_WIDTH,height:Gt.RECT_HEIGHT,fill:"#FFCB0E",fillOpacity:.2})]}),d(Bt,{children:Xy(r,i)}),d(St,{x:Gt.LINE_X-25,y:0,width:50,height:20,fontSize:20,fontWeight:"bold",alignHorizontal:"center",alignVertical:"top",fill:n,children:String(t+1).padStart(2,"0")})]})}function dR(t,e){const n=Gt.RECT_Y+Gt.RECT_HEIGHT/2-Gt.ARROW_HEIGHT/2,r=Math.max(Math.round(un.MIN_COUNT*un.ARROW_RATIO),un.MIN_ARROW_COUNT),i=Vy({count:r,rectX:0,rectY:14,rectWidth:57,rectHeight:120,seed:999});return I(Y,{x:t+Gt.WIDTH,y:n,children:[d(yt,{d:"M0 13.9679H57.1429V0L100 74L57.1429 148V134.032H0V13.9679Z",width:Gt.ARROW_WIDTH,height:Gt.ARROW_HEIGHT,fill:"#FFCB0E",fillOpacity:.2,"data-element-type":"shape"}),d(Bt,{children:Xy(i,e)})]})}const Gy=t=>{const{Title:e,Item:n,data:r,gap:i=20,options:o}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=et(d(U,{indexes:[0]})),u=et(d(n,{indexes:[0],data:r,datum:l[0],width:Gt.WIDTH,positionH:"center"})),f=[],p=[],g=[],y=Gt.HEIGHT+i,m=y+u.height+10;if(l.forEach((x,v)=>{const b=v*Gt.WIDTH,w=[v],_=It(o,w),$=lR(v,l.length),P=Vy({count:$,rectX:Gt.RECT_X,rectY:Gt.RECT_Y,rectWidth:Gt.RECT_WIDTH,rectHeight:Gt.RECT_HEIGHT,seed:v*100});f.push(hR(v,b,_,P,o)),v===l.length-1&&f.push(dR(b,o)),p.push(d(n,{indexes:w,datum:x,data:r,width:Gt.WIDTH,x:b+Gt.LINE_X-Gt.WIDTH/2,y,positionH:"center"})),g.push(d(Yt,{indexes:w,x:b+Gt.LINE_X-h.width/2,y:m})),v<l.length-1&&g.push(d(U,{indexes:[v+1],x:b+Gt.WIDTH-h.width/2,y:m}))}),l.length>0){g.unshift(d(U,{indexes:[0],x:-h.width/2,y:m}));const x=(l.length-1)*Gt.WIDTH;g.push(d(U,{indexes:[l.length],x:x+Gt.WIDTH-h.width/2,y:m}))}return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,I(Y,{width:Gt.WIDTH*l.length+Gt.ARROW_WIDTH,height:Gt.HEIGHT+i+u.height,children:[d(Y,{children:f}),d(Ot,{children:p}),d(Et,{children:g})]})]})};Tt("sequence-filter-mesh",{component:Gy,composites:["title","item"]});const na=t=>Math.round(t*1e10)/1e10,$h=(t,e)=>na(Math.sqrt((e.x-t.x)*(e.x-t.x)+(e.y-t.y)*(e.y-t.y))),ra=Math.PI,uR=ra*2,fR=(t,e)=>{const n=e-t;return n>ra&&n<uR||n<0&&n>-ra?-1:1},pR=(t,e,n,r,i,o)=>{const s=Math.atan2(t.y-e.y,t.x-e.x),a=Math.atan2(n.y-e.y,n.x-e.x),l=Math.acos((r*r+o*o-i*i)/(2*r*o)),c=1/Math.tan(l/2),h=fR(s,a),u=s+h*l/2;return{prev:s,next:a,main:l,vel:c,dir:h,bis:u}},Ph=Math.PI,qy=(t,e,n)=>t.reduce((r,i)=>{const{x:o,y:s,angle:{prev:a,next:l},arc:{x:c,y:h,radius:u}}=i,f=i.angle.dir*-1,p=a+f*Ph/2,g=(f*Ph+l-a)%Ph,y=n-1,m=g/y,x=[];if(!m)return r.concat({x:o,y:s});for(let v=0;v<=y;v++)x.push({x:c+Math.cos(p+m*v)*u,y:h+Math.sin(p+m*v)*u});return r.concat(x)},[]),Uy=(t,e=0)=>{const n=t.length,r=[],i=[],o=[];t.forEach((l,c)=>{const h=t[(c-1+n)%n],u=t[(c+1)%n],f=$h(h,l),p=$h(h,u),g=$h(l,u),y=pR(h,l,u,f,p,g);y.main===0&&(y.main=Number.EPSILON,y.vel=Number.MAX_SAFE_INTEGER),y.main===ra&&(y.vel=0);const m={x:l.x,y:l.y,angle:y,offset:0,arc:{radius:e,hit:e,lim:Math.min(g/y.vel,f/y.vel,l.r||0)},in:{length:f,rest:f},out:{length:g,rest:g},locked:!1,id:c,get prev(){return r[(c-1+n)%n]},get next(){return r[(c+1)%n]}};isNaN(y.main)&&(y.main=0,y.bis=y.prev||y.next,o.push(m)),typeof l.r=="number"&&(l.r===0?o.push(m):i.push(m)),r.push(m)}),o.forEach(l=>{l.angle.vel=0,l.arc.radius=0,Ch(l)}),r.forEach(l=>{l.arc.hit=Math.min(l.out.rest/(l.angle.vel+l.next.angle.vel),l.in.rest/(l.angle.vel+l.prev.angle.vel))});let s=ia(i);for(;s;)gR(s),s=ia(i);for(s=ia(r);s;)mR(s,e),s=ia(r);const a=r.map(l=>{const c=l.arc.radius/Math.sin(l.angle.main/2);return{id:l.id,x:l.x,y:l.y,angle:{main:na(l.angle.main),prev:l.angle.prev,next:l.angle.next,bis:l.angle.bis,dir:l.angle.dir},offset:na(l.offset),arc:{radius:na(l.arc.radius),x:l.x+(Math.cos(l.angle.bis)*c||0),y:l.y+(Math.sin(l.angle.bis)*c||0)},in:{length:l.in.length,x:l.x+Math.cos(l.angle.prev)*l.offset,y:l.y+Math.sin(l.angle.prev)*l.offset},out:{length:l.out.length,x:l.x+Math.cos(l.angle.next)*l.offset,y:l.y+Math.sin(l.angle.next)*l.offset},get prev(){return a[(l.id-1+n)%n]},get next(){return a[(l.id+1)%n]}}});return a},gR=t=>{const{prev:e,next:n}=t;e.locked&&!n.locked?t.arc.radius=Math.min(Math.max((t.out.length-n.arc.lim*n.angle.vel)/t.angle.vel,t.out.length/(t.angle.vel+n.angle.vel)),t.in.rest/t.angle.vel,t.arc.lim):n.locked&&!e.locked?t.arc.radius=Math.min(Math.max((t.in.length-e.arc.lim*e.angle.vel)/t.angle.vel,t.in.length/(t.angle.vel+e.angle.vel)),t.out.rest/t.angle.vel,t.arc.lim):n.locked&&e.locked?t.arc.radius=Math.min(t.in.rest/t.angle.vel,t.out.rest/t.angle.vel,t.arc.lim):t.arc.radius=Math.min(Math.max((t.in.length-e.arc.lim*e.angle.vel)/t.angle.vel,t.in.length/(t.angle.vel+e.angle.vel)),Math.max((t.out.length-n.arc.lim*n.angle.vel)/t.angle.vel,t.out.length/(t.angle.vel+n.angle.vel)),t.arc.lim),Ch(t)},mR=(t,e)=>{if(e>t.arc.hit){const{prev:n,next:r}=t;n.locked&&!r.locked?t.arc.radius=Math.max(Math.min(t.in.rest/t.angle.vel,t.out.length/(t.angle.vel+r.angle.vel),t.arc.radius),0):r.locked&&!n.locked?t.arc.radius=Math.max(Math.min(t.out.rest/t.angle.vel,t.in.length/(t.angle.vel+n.angle.vel),t.arc.radius),0):r.locked&&n.locked?t.arc.radius=Math.max(Math.min(t.in.rest/t.angle.vel,t.out.rest/t.angle.vel,t.arc.radius),0):t.arc.radius=t.arc.hit}Ch(t)},Ch=t=>{const{prev:e,next:n}=t;t.offset=t.arc.radius*t.angle.vel,e.out.rest-=t.offset,t.in.rest-=t.offset,t.out.rest-=t.offset,n.in.rest-=t.offset,t.locked=!0,e.arc.hit=Math.min(e.in.length/(e.angle.vel+e.prev.angle.vel),e.in.rest/e.angle.vel,e.out.rest/e.angle.vel),n.arc.hit=Math.min(n.out.length/(n.angle.vel+n.next.angle.vel),n.out.rest/n.angle.vel,n.in.rest/n.angle.vel)},ia=t=>t.reduce((e,n)=>n.locked?e:e?n.arc.hit<e.arc.hit?n:e:n,null),yR=6,Oh=32,vR=1.25,Mh=25,Zy=15,Ky=t=>{const{Title:e,Item:n,data:r,gap:i=10,width:o=700,funnelWidth:s,itemHeight:a=60,minBottomRatio:l=.25,options:c}=t,{title:h,desc:u,items:f=[]}=r,p=e?d(e,{title:h,desc:u}):null;if(f.length===0)return d(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:p});const g=ge(c.themeConfig),y=s!=null?s:o*.55,m=o-y,x=a*vR,v=f.length*x+(f.length-1)*i,b=y*l,w=f.map(($,P)=>{const C=[P],T=It(c,[P])||g.colorPrimary,{points:E,topWidth:S}=xR(y,b,x,i,v,P),R=Uy(E,yR),O=qy(R,"AMOUNT",10),A=y/2,F=P*(x+i),L=A+S/2,D=L-Mh,k=m+Mh-10,N=(x-a)/2,j=F+N,X=L+Zy,z=k-Mh-Zy,M=j,H=A-Oh/2,B=F+x/2-Oh/2,q=`${T.replace("#","")}-funnel-${P}`;return{background:d(Ct,{x:D,y:j,width:k,height:a,ry:"8",fill:lt(T).setAlpha(.1).toRgbString(),"data-element-type":"shape"}),funnel:[d(jt,{children:I("linearGradient",{id:q,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[d("stop",{offset:"0%",stopColor:lt(T).lighten(10).toString()}),d("stop",{offset:"100%",stopColor:T})]})}),d(Re,{points:O,fill:`url(#${q})`,y:F,"data-element-type":"shape",style:{filter:"drop-shadow(0px 2px 3px rgba(0,0,0,0.15))"}})],icon:d(Pe,{indexes:C,x:H,y:B,size:Oh,fill:"#fff"}),item:d(n,{indexes:C,datum:$,data:r,x:X,y:M,width:z,height:a,positionV:"middle"}),btnRemove:d(Yt,{indexes:C,x:D+k,y:j})}}),_=d(U,{indexes:[f.length],x:o/2,y:v+10});return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,I(Y,{width:o,height:v+40,children:[d(Y,{children:w.map($=>$.background)}),d(Y,{children:w.flatMap($=>$.funnel)}),d(Y,{children:w.map($=>$.icon)}),d(Ot,{children:w.map($=>$.item)}),I(Et,{children:[w.map($=>$.btnRemove),_]})]})]})};function xR(t,e,n,r,i,o){const s=t/2,a=o*(n+r),l=a+n,c=t-e,h=t-c*(a/i),u=t-c*(l/i),f={x:s-h/2,y:0},p={x:s+h/2,y:0},g={x:s+u/2,y:n},y={x:s-u/2,y:n};return{points:[f,p,g,y],topWidth:h,bottomWidth:u}}Tt("sequence-funnel",{component:Ky,composites:["title","item"]});const Qy=t=>{const{Title:e,Item:n,data:r,gap:i=30,cardPadding:o=10,options:s}=t,{title:a,desc:l,items:c=[]}=r,h=e?d(e,{title:a,desc:l}):null,u=ce(s),f=ge({colorPrimary:u},s),p=et(d(U,{indexes:[0]})),g=et(d(n,{indexes:[0],data:r,datum:c[0],positionH:"center"})),y=[],m=[],x=[],v=g.width+o*2,b=g.height+o*2+30,w=8,_=6,$=Math.max(p.height+20,40),P=40;if(c.forEach((C,T)=>{const E=T%2===0,S=T*(v+i);let R;E?T%4===2?R=$:R=$+P:R=$+P+60;const O=[T],A=It(s,O)||u;if(E){const k=A===u?f.colorPrimaryBg||"#E8F3FF":`${A}20`,N=d(Ct,{x:S,y:R,width:v,height:b,fill:k,rx:20,ry:20});x.push(N)}m.push(d(n,{indexes:O,datum:C,data:r,x:S+o,y:R+o,positionH:"center",positionV:"normal"}));const F=c.length*w+(c.length-1)*_,L=S+(v-F)/2,D=R+g.height+20;for(let k=0;k<c.length;k++){const N=L+k*(w+_),j=k===T;x.push(d(Wt,{x:N,y:D,width:w,height:w,fill:j?A:"transparent",stroke:A,strokeWidth:2}))}y.push(d(Yt,{indexes:O,x:S+(v-p.width)/2,y:R+b+10})),T===0?y.push(d(U,{indexes:O,x:S+(v-p.width)/2,y:R-p.height-10})):y.push(d(U,{indexes:O,x:S-i/2-p.width/2,y:$-p.height-10}))}),c.length>0){const C=[],E=i/2,S=6,R=$+P,O=0-E,A=R+b/2;C.push(`M ${O} ${A-S}`),c.forEach((q,V)=>{const G=V%2===0,Z=V*(v+i);let K;G?V%4===2?K=$:K=$+P:K=$+P+60;const it=Z-E,Q=Z+v+E,at=K-E,ht=K+b+E,nt=K+b/2;G?(C.push(`L ${it} ${at+35}`),C.push(`Q ${it} ${at} ${it+35} ${at}`),C.push(`L ${Q-35} ${at}`),C.push(`Q ${Q} ${at} ${Q} ${at+35}`),C.push(`L ${Q} ${nt-S}`)):(C.push(`L ${it} ${nt}`),C.push(`L ${it} ${ht-35}`),C.push(`Q ${it} ${ht} ${it+35} ${ht}`),C.push(`L ${Q-35} ${ht}`),C.push(`Q ${Q} ${ht} ${Q} ${ht-35}`),C.push(`L ${Q} ${nt+S}`))});const F=c.length-1,L=F%2===0,D=F*(v+i);let k;L?F%4===2?k=$:k=$+P:k=$+P+60;const N=D+v+E,j=k+b/2,X=C.join(" "),z="gradient-zigzag-path",M=It(s,[0])||u,H=It(s,[c.length-1])||u,B=c.map((q,V)=>{const G=V/(c.length-1)*100,Z=It(s,[V])||u;return d("stop",{offset:`${G}%`,stopColor:Z})});x.unshift(I(Bt,{children:[d(jt,{children:d("linearGradient",{id:z,x1:O,y1:A,x2:N,y2:j,gradientUnits:"userSpaceOnUse",children:B})}),d(yt,{d:X,stroke:`url(#${z})`,strokeWidth:2,fill:"none",width:(c.length-1)*(v+i)+v+E*2,height:b+120})]})),x.unshift(d(Wt,{x:O-S,y:A-S,width:S*2,height:S*2,fill:"transparent",stroke:M,strokeWidth:2})),x.unshift(d(Wt,{x:N-S,y:j-S,width:S*2,height:S*2,fill:"transparent",stroke:H,strokeWidth:2}))}if(c.length>0){const T=(c.length-1)*(v+i);y.push(d(U,{indexes:[c.length],x:T+v+(i-p.width)/2,y:$-p.height-10}))}return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,I(Y,{children:[d(le,{children:x}),d(Ot,{children:m}),d(Et,{children:y})]})]})};Tt("sequence-horizontal-zigzag",{component:Qy,composites:["title","item"]});var bR=Object.defineProperty,wR=Object.defineProperties,_R=Object.getOwnPropertyDescriptors,Jy=Object.getOwnPropertySymbols,$R=Object.prototype.hasOwnProperty,PR=Object.prototype.propertyIsEnumerable,t3=(t,e,n)=>e in t?bR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,oa=(t,e)=>{for(var n in e||(e={}))$R.call(e,n)&&t3(t,n,e[n]);if(Jy)for(var n of Jy(e))PR.call(e,n)&&t3(t,n,e[n]);return t},sa=(t,e)=>wR(t,_R(e));function CR(t){const{width:e,height:n,colorPrimary:r}=t,i=r,o=lt.mix(r,"#000",20).toHexString(),s=lt.mix(r,"#fff",50).toHexString(),a=lt.mix(s,"#000",15).toHexString();function l(P,C){const E=[{position:.25,offset:.1},{position:.45,offset:-.02},{position:.6,offset:.04},{position:.75,offset:-.1}],S={x:0,y:C},R={x:P,y:C},O={x:P/2,y:0},A={x:P/2,y:C},F=C*.35,L=F/C,D={x:O.x*(1-L)+S.x*L,y:F},k={x:O.x,y:F},N={x:O.x*(1-L)+R.x*L,y:F},j=E.map(M=>{const H=D.x+(N.x-D.x)*M.position,B=F,q=C*M.offset;return{x:H,y:B+q,position:M.position,offset:M.offset}});j.sort((M,H)=>M.position-H.position);const X=j.filter(M=>M.x<=k.x),z=j.filter(M=>M.x>k.x);return{leftBottom:S,rightBottom:R,peak:O,centerBottom:A,snowLineY:F,leftEdge:D,centerSnow:k,rightEdge:N,leftRipples:X,rightRipples:z}}const{leftRipples:c,rightRipples:h,leftBottom:u,rightBottom:f,peak:p,centerBottom:g,leftEdge:y,centerSnow:m,rightEdge:x}=l(e,n),v=[p,y,...c,m],b=[p,m,...h,x],w=[y,...c,m,g,u],_=[m,...h,x,f,g],$=P=>P.map(C=>`${C.x},${C.y}`).join(" ");return I(le,sa(oa({},t),{children:[d("polygon",{points:$(v),fill:s}),d("polygon",{points:$(b),fill:a}),d("polygon",{points:$(w),fill:i}),d("polygon",{points:$(_),fill:o})]}))}function OR(t){const n={tiny:27,small:48,medium:54,large:72}[t]||54,r="#17C76F",i="#139B57",o="#737373",s=n*.7,a=n-s,l=s*.8,c=l,h=c/6,u=(c-h)/2,f=s;return I(le,{width:c,height:n,children:[d("ellipse",{cx:l/2,cy:s/2,rx:l/2,ry:s/2,fill:r,clipPath:"inset(0 50% 0 0)"}),d("ellipse",{cx:l/2,cy:s/2,rx:l/2,ry:s/2,fill:i,clipPath:"inset(0 0 0 50%)"}),d("rect",{x:u,y:f,width:h,height:a,fill:o})]})}function MR(t){const{width:e,height:n}=t,r=e/2,i=n/2,o=Math.min(e,n)*.28,s=Math.min(e,n)*.14,a=Math.min(e,n)*.07,l=0,c=i-a/2,h=a*.4,u=8,f=Array.from({length:u},(p,g)=>{const y=360/u*g;return d("rect",{x:l,y:c,width:s,height:a,rx:h,ry:h,fill:"#FFCB0E",transform:`rotate(${y}, ${r}, ${i})`})});return I(le,sa(oa({},t),{children:[d("circle",{cx:r,cy:i,r:o,fill:"#FFCB0E"}),...f]}))}function SR(t){return t.type==="single"?d(le,sa(oa({},t),{width:54,height:36,children:d("path",{d:"M10.2635 13.3806C11.0019 9.99045 12.7381 6.91002 15.2405 4.55004C17.743 2.19007 20.8929 0.662716 24.2701 0.171643C27.6473 -0.31943 31.0914 0.24912 34.143 1.80148C37.1946 3.35385 39.7087 5.81625 41.3501 8.86031C44.8835 9.0468 48.1994 10.6544 50.5684 13.3294C52.9373 16.0044 54.1653 19.5277 53.9821 23.1242C53.7989 26.7207 52.2195 30.0959 49.5914 32.5071C46.9634 34.9184 43.5019 36.1683 39.9684 35.9818H11.1517C4.93436 35.9818 0 30.9593 0 24.6309C0.0598447 21.8016 1.13799 19.093 3.02989 17.0192C4.9218 14.9454 7.49584 13.6506 10.2635 13.3806Z",fill:"#70CAF8"})})):I(le,sa(oa({},t),{width:73,height:40,children:[d("path",{d:"M61.6461 14.9716C60.8681 11.1875 58.9581 7.73823 56.1763 5.09315C53.3944 2.44806 49.8758 0.735682 46.0992 0.189041C42.3226 -0.357601 38.4714 0.288046 35.0699 2.03812C31.6683 3.7882 28.8815 6.5577 27.0889 9.96971C23.161 10.1687 19.4719 11.9405 16.8333 14.8953C14.1947 17.8502 12.8227 21.746 13.0191 25.7258C13.2155 29.7055 14.9642 33.4433 17.8806 36.1167C20.7969 38.7901 24.642 40.1802 28.5699 39.9812H60.6588C67.5702 39.9812 73.0006 34.4791 73.0006 27.4764C73.0006 20.9739 67.8664 15.4718 61.6461 14.9716Z",fill:"#70CAF8"}),d("path",{d:"M21.9691 6.47136e-09C25.9369 6.47136e-09 29.5264 1.62125 32.0003 4.21094C30.0604 5.7917 28.4423 7.75571 27.2581 10C23.3149 10.1989 19.6111 11.9702 16.9622 14.9238C14.3136 17.8774 12.936 21.772 13.1331 25.75C13.2057 27.2131 13.4902 28.6432 13.9652 30H10.7689C7.96116 29.8907 5.29664 28.7203 3.30402 26.7217C1.31144 24.7231 0.135825 22.0419 0.0110544 19.21C-0.113702 16.378 0.821178 13.6017 2.63019 11.4326C4.43921 9.26356 6.99065 7.8602 9.77766 7.5C11.9582 3.00012 16.6168 8.76701e-05 21.9691 6.47136e-09Z",fill:"#5BA2C6"})]}))}const e3=t=>{const{Title:e,Item:n,data:r,gap:i=20,minHeight:o=100,maxHeight:s=200,minWidth:a=260,maxWidth:l=300,options:c}=t,{title:h,desc:u,items:f=[]}=r,p=e?d(e,{title:h,desc:u}):null,g=[],y=[],m=[],x=[],v=f.length,b=ge(c.themeConfig),w=60,_={single:{width:54,height:36},double:{width:73,height:40}},$=[],P=[];let C=0,T=0;f.forEach((j,X)=>{const z=v>1?X/(v-1):0,H=(o+(s-o)*z)*1.6,B=Math.max(a,Math.min(l,H));$.push(B);const q=T;P.push(q),T+=B/2,X===v-1&&(C=q+B)});const E=P[0],S=P[v-1]+$[v-1],R=S-E,O=v>1?(R-i*(v-1))/v:R,A=et(d(n,{indexes:[0],data:r,datum:f[0],width:O})),F=32,L=s+i,D=L+F+10;f.forEach((j,X)=>{const z=[X],M=o+(s-o)*(v>1?X/(v-1):0),H=$[X],B=P[X],q=s-M,V=It(c,[X])||b.colorPrimary;m.push(d(CR,{colorPrimary:V,x:B,y:q,width:H,height:M}));const G=E+X*(O+i);x.push(d(St,{x:G,y:L,width:O,height:F,fontSize:16,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:V,backgroundColor:V,backgroundOpacity:.5,backgroundRadius:4,children:String(X+1).padStart(2,"0")})),g.push(d(n,{indexes:z,datum:j,data:r,x:G,y:D,width:O}))});const k=et(d(U,{indexes:[0]})),N=D+A.height+10;if(f.forEach((j,X)=>{const z=[X],M=E+X*(O+i);y.push(d(Yt,{indexes:z,x:M+O/2-k.width/2,y:N})),X<f.length-1&&y.push(d(U,{indexes:[X+1],x:M+O+i/2-k.width/2,y:N}))}),v>0){const j=E;y.unshift(d(U,{indexes:[0],x:j-i/2-k.width/2,y:N}));const X=E+(v-1)*(O+i);y.push(d(U,{indexes:[v],x:X+O+i/2-k.width/2,y:N})),m.push(d(MR,{x:C-w-20,y:-35,width:w,height:w}));const z=["tiny","small","medium","large"],M={tiny:27,small:48,medium:54,large:72},H={tiny:14.85,small:26.4,medium:29.7,large:39.6},B=[],q=(G,Z,K=5)=>B.some(it=>!(G+Z+K<it.x||G>it.x+it.width+K));f.forEach((G,Z)=>{const K=P[Z],it=$[Z],at=Z===v-1?3:Z===0?1:2;for(let ht=0;ht<at;ht++){const nt=Z*100+ht*37,J=nt*17%z.length,tt=z[J],st=M[tt],vt=H[tt];let gt=0,ut=0,ot=!1;for(;gt<20&&!ot;){const ft=(nt*13+gt*19)%100/100,mt=K+it*.15,wt=K+it*.85-vt;ut=mt+(wt-mt)*ft,q(ut,vt)||(ot=!0),gt++}if(ot){B.push({x:ut,width:vt});const ft=s-st;m.push(d(Y,{x:ut,y:ft,children:OR(tt)}))}}});const V=Math.max(1,Math.floor(v/1.5));for(let G=0;G<V;G++){const Z=G*11+v*5+1,K=Z%2===0?"single":"double",it=_[K],Q=S-E-it.width,at=E+Z*7%100/100*Q,ht=Z*13%40;m.push(d(SR,{type:K,x:at,y:ht,width:it.width,height:it.height}))}}return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p,I(Y,{children:[d(Y,{children:m}),d(Y,{children:x}),d(Ot,{children:g}),d(Et,{children:y})]})]})};Tt("sequence-mountain",{component:e3,composites:["title","item"]});const n3=t=>{const{Title:e,Item:n,data:r,gap:i=10,width:o=700,pyramidWidth:s,itemHeight:a=60,options:l}=t,{title:c,desc:h,items:u=[]}=r,f=e?d(e,{title:c,desc:h}):null;if(u.length===0)return d(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:f});const p=5,g=ge(l.themeConfig),y=30,m=[],x=[],v=[],b=[],w=s!=null?s:o*.6,_=o-w,$=a*1.2,P=u.length*$+(u.length-1)*i;return u.forEach((C,T)=>{const E=[T],S=T===0,R=It(l,[T])||g.colorPrimary,{points:O,topWidth:A,bottomWidth:F}=ER(w,$,i,u.length,T),L=Uy(O,p),D=qy(L,"AMOUNT",10),k=w/2,N=T*($+i),j=($-a)/2,X=N+j,z=k+A/2,M=k+F/2,B=z-p,q=_+p,V=a,G=B+q,Z=k-y/2,K=N+$/2-y/2+(S?8:0),it=M,Q=G-M,at=X;v.push(d(Ct,{x:B,y:X,width:q,height:V,ry:"10",fill:g.colorPrimaryBg,"data-element-type":"shape"}));const ht=`${R}-pyramid-${T}`;x.push(d(jt,{children:I("linearGradient",{id:ht,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[d("stop",{offset:"0","stop-color":R}),d("stop",{offset:"100%","stop-color":lt.mix(R,"#fff",40).toHexString()})]})}),d(Re,{points:D,fill:`url(#${ht})`,y:N,"data-element-type":"shape"})),b.push(d(Pe,{indexes:E,x:Z,y:K,size:y,fill:"#fff"})),m.push(d(n,{indexes:E,datum:C,data:r,x:it,y:at,width:Q,height:a,positionV:"middle"}))}),I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,I(Y,{width:o,height:P,children:[d(Y,{children:v}),d(Y,{children:x}),d(Y,{children:b}),d(Ot,{children:m}),d(Et,{})]})]})};function ER(t,e,n,r,i){const o=t/2,s=r*e+(r-1)*n,a=i*(e+n),l=a+e,c=a/s*t,h=l/s*t;let u;if(i===0){const f={x:o,y:0},p={x:o+h/2,y:e},g={x:o-h/2,y:e};u=[f,p,g]}else{const f={x:o+c/2,y:0},p={x:o+h/2,y:e},g={x:o-h/2,y:e},y={x:o-c/2,y:0};u=[f,p,g,y]}return{points:u,topWidth:c,bottomWidth:h}}Tt("sequence-pyramid",{component:n3,composites:["title","item"]});const Zi={iconSize:50,roadWidth:24,outerRadius:60,rowWidth:400,spacing:30,colorDefault:"#666666"},r3=(t,e)=>`M ${t} ${e}`,oe=(t,e)=>`L ${t} ${e}`,qr=(t,e,n,r)=>`A ${t} ${t} 0 0 ${e} ${n} ${r}`,IR=(t,{roadWidth:e,innerRadius:n,outerRadius:r})=>{const i=(e+n*2)*t;return{y1:i,y2:i+e,y3:i+e+n,y4:i+e+n*2,y5:i+r*2}};function AR({i:t,direction:e,x:n,y:r,color:i,data:o,itemBounds:s,item:a,Item:l,flipped:c}){const{iconSize:h}=Zi,u=e==="left",f=u?n.x4-h/2:n.x3-h/2,p=r.y3-h/2,g=u?n.x6+Zi.spacing:n.x1-Zi.spacing-s.width,y=r.y3-s.height/2,m=u?c?"flipped":"normal":c?"normal":"flipped";return{icon:d(sr,{indexes:[t],x:f,y:p,size:h,fill:i}),label:d(St,{width:40,x:u?f-50:f+h+10,y:p+h/2-15,fontSize:30,fill:i,alignHorizontal:u?"right":"left",children:String(t+1).padStart(2,"0")}),item:d(l,{indexes:[t],data:o,datum:a,x:g,y,positionH:m})}}function TR({direction:t,x:e,y:n,color:r,elements:i}){const o=t==="left";i.push(d(jH,{x:o?e.x6+10:e.x1-20,y:n.y3-5,width:10,height:8,rotation:o?90:-90,colorPrimary:r,"data-element-type":"shape"}))}const i3=t=>{const{Title:e,Item:n,data:r,spacing:i=Zi.spacing,options:o,flipped:s=!1}=t,{title:a,desc:l,items:c=[]}=r,h=e?d(e,{title:a,desc:l}):null,u=et(d(n,{indexes:[0],data:r,datum:c[0],positionH:"center"})),{roadWidth:f,outerRadius:p,rowWidth:g,colorDefault:y}=Zi,m=f/2,x=p-f,v=(u.width+i)*2+g,b=u.width+i,w=b+p,_=b+g-p,P=_+x+f,C=b+g/2,T=[],E=[],S=[],R=[],O=[],A=[],F=[];for(let k=0;k<c.length;k++){const N=It(o,[k])||y,j=k%2===0?"right":"left",X=k===0,z=k===c.length-1,M=IR(k,{roadWidth:f,innerRadius:x,outerRadius:p});if(j==="right"){const V=X?[P,M.y1]:[_,M.y1],G=[w,M.y1],Z=[w,M.y5],K=X?[P,M.y2]:[_,M.y2],it=[w,M.y2];if(T.push(X?r3(P,M.y1+m):oe(_,M.y1+m),oe(w,M.y1+m),qr(p-m,0,w,M.y4+m)),E.push(X?r3(...V):oe(...V),oe(...G),qr(p,0,...Z)),S.push(oe(...K),oe(...it),qr(x,1,...it)),z){const Q=f/2;E.push(oe(C,M.y5),oe(C,M.y5+Q),oe(C+f,M.y5-Q),oe(C,M.y4-Q),oe(C,M.y4),oe(w,M.y4)),T.push(oe(C,M.y4+m))}}else{const V=[w,M.y2],G=[_,M.y2],Z=[_,M.y4],K=[w,M.y1],it=[_,M.y1];if(T.push(oe(_,M.y1+m),qr(p-m,1,_,M.y4+m)),E.push(oe(...V),oe(...G),qr(x,1,...Z)),S.push(oe(...K),oe(...it),qr(p,0,...it)),z){const Q=f/2;E.push(oe(C,M.y4),oe(C,M.y4-Q),oe(C-f,M.y4+Q),oe(C,M.y5+Q),oe(C,M.y5),oe(_,M.y5)),T.push(oe(C,M.y4+m))}}TR({direction:j,x:{x1:b,x6:P},y:M,color:N,elements:F});const{icon:H,label:B,item:q}=AR({i:k,direction:j,x:{x1:b,x3:w,x4:_,x6:P},y:M,color:N,data:r,itemBounds:u,item:c[k],Item:n,flipped:s});R.push(H),O.push(B),A.push(q)}const L=[...E,...S.reverse(),"Z"],D=c.length*(f+x*2)+f*1.5;return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,I(Y,{width:v,height:u.height<=p*2?D:D+u.height-p*2,children:[d(yt,{width:g,height:D,d:L.join(" "),fill:y,stroke:y,strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round","data-element-type":"shape"}),d(yt,{d:T.join(" "),stroke:"white",fill:"none",strokeWidth:"3",strokeDasharray:"8 8",strokeLinecap:"round",strokeLinejoin:"round","data-element-type":"shape"}),I(Bt,{children:[R,O,A,F]})]})]})};Tt("sequence-roadmap-vertical",{component:i3,composites:["title","item"]});const o3=t=>{const{Title:e,Item:n,data:r,gap:i=40,itemsPerRow:o=3,rowGap:s=80,options:a}=t,{title:l,desc:c,items:h=[]}=r,u=e?d(e,{title:l,desc:c}):null,f=ce(a),p=et(d(U,{indexes:[0]})),g=et(d(n,{indexes:[0],data:r,datum:h[0],positionH:"center"})),y=[],m=[],x=[],v=25,b=25;if(h.forEach((w,_)=>{const $=Math.floor(_/o),P=_%o,C=$%2===1,E=(C?o-1-P:P)*(g.width+i),S=$*(g.height+s),R=[_];if(m.push(d(n,{indexes:R,datum:w,data:r,x:E,y:S,positionH:"center"})),y.push(d(Yt,{indexes:R,x:E+(g.width-p.width)/2,y:S+g.height+10})),_===0&&y.push(d(U,{indexes:R,x:E+(g.width-p.width)/2,y:S-p.height-10})),_<h.length-1){const O=Math.floor((_+1)/o),A=(_+1)%o,D=(O%2===1?o-1-A:A)*(g.width+i);if($===O){const N=C,j=N?D+g.width+(i-v)/2:E+g.width+(i-v)/2,X=S+g.height/2-b/2;x.push(d(_h,{x:j,y:X,width:v,height:b,colorPrimary:f,rotation:N?180:0})),y.push(d(U,{indexes:[_+1],x:j+(v-p.width)/2,y:S-p.height-10}))}else{const N=E+g.width/2-v/2,j=S+g.height+(s-b)/2;x.push(d(_h,{x:N,y:j,width:v,height:b,colorPrimary:f,rotation:90})),y.push(d(U,{indexes:[_+1],x:N+(v-p.width)/2,y:j+(b-p.height)/2}))}}}),h.length>0){const w=h.length-1,_=Math.floor(w/o),$=w%o,T=(_%2===1?o-1-$:$)*(g.width+i),E=_*(g.height+s);y.push(d(U,{indexes:[h.length],x:T+(g.width-p.width)/2,y:E+g.height+p.height+20}))}return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[u,I(Y,{children:[d(Y,{children:x}),d(Ot,{children:m}),d(Et,{children:y})]})]})};Tt("sequence-snake-steps",{component:o3,composites:["title","item"]});const s3=t=>{const{Title:e,Item:n,data:r,options:i,gap:o=16,perspectiveFactor:s=.2,width:a=720}=t,{title:l,desc:c,items:h=[]}=r,u=e,f=u?d(u,{title:l,desc:c}):null;if(h.length===0)return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,d(Y,{children:d(Et,{children:d(U,{indexes:[0],x:0,y:0})})})]});const p=ce(i),g=et(d(U,{indexes:[0]})),y=et(d(n,{indexes:[0],data:r,datum:h[0]||{},positionH:"center"})),m=12,x=Math.min(a*.1,100),v=Math.min(a*.45,Math.max(80,a-y.width-m-x)),b=Math.max(24,v*s*.35),w=56,_=w*.7,$=h.length>1?(w-_)/(h.length-1):0,P=Math.max(g.height+b+20,b+28),C=v/2,T=v+x+m,E=h.map((J,tt)=>w-$*tt),S=h.map((J,tt)=>Math.max(b*(1-tt*.05),b*.7)),R=[],O=[],A=h.length-1;R[A]=P,O[A]=0;for(let J=A-1;J>=0;J-=1)O[J]=O[J+1]+S[J]+o,R[J]=R[J+1]+S[J]+E[J+1]+o;const F=O[0]||S[0]||b,L=v*(.55+s*.1),D=v-L,k=h.map((J,tt)=>{const st=F===0?1:O[tt]/F;return L+D*st}),N=k.map(J=>{const tt=C+J/2;return Math.max(0,T-m-tt)}),j=[],X=[],z=[],M=[],H=[],B=0,q=(R[0]||P)+(E[0]||w),V=q-B,G=35,K=(k[A]||L)*.8,it=K*.65,Q=(k[0]||v)*.9;H.push(d(Re,{points:[{x:C,y:B},{x:C+K/2,y:B+G},{x:C+it/2,y:B+G},{x:C+Q/2,y:q},{x:C-Q/2,y:q},{x:C-it/2,y:B+G},{x:C-K/2,y:B+G}],fill:"rgba(0,0,0,0.12)",width:Q,height:V,"data-element-type":"shape"}));let at=R[A]+E[A]/2;h.forEach((J,tt)=>{const st=[tt],vt=k[tt],gt=S[tt],ut=C-vt/2,ot=E[tt],ft=R[tt],mt=ft-gt,wt=ft+ot/2,pt=It(i,st)||p;j.push(d(Ct,{x:ut,y:ft,width:vt,height:ot,fill:pt,"data-element-type":"shape"}),d(Re,{points:[{x:ut,y:ft},{x:ut+vt,y:ft},{x:ut+vt-gt/2,y:mt},{x:ut+gt/2,y:mt}],fill:pt,opacity:"0.3",width:vt,height:gt,"data-element-type":"shape"}),d(St,{x:ut,y:ft,width:vt,height:ot,fontSize:ot/2,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:"#ffffff",children:String(tt+1).padStart(2,"0")}));const _t=ut+vt,Rt=wt,Vt=N[tt],ee=_t+Vt;M.push(d(yt,{d:`M ${_t} ${Rt} L ${ee} ${Rt}`,stroke:pt,strokeWidth:2,fill:"none",width:Vt,height:2,"data-element-type":"shape"}),d(yt,{d:`M ${ee} ${Rt} L ${ee} ${Rt}`,stroke:pt,strokeWidth:6,strokeLinecap:"round",width:1,height:1,"data-element-type":"shape"}));const Dt=wt-y.height/2;X.push(d(n,{indexes:st,datum:J,data:r,x:T,y:Dt,positionV:"middle"})),z.push(d(Yt,{indexes:st,x:T+y.width+10,y:Dt+y.height/2-g.height/2})),tt===0?z.push(d(U,{indexes:[0],x:T+(y.width-g.width)/2,y:Dt-g.height-12})):z.push(d(U,{indexes:st,x:T+(y.width-g.width)/2,y:(at+wt)/2-g.height/2})),at=wt});const nt=at-y.height/2;return z.push(d(U,{indexes:[h.length],x:T+(y.width-g.width)/2,y:nt+y.height+12})),I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,I(Y,{children:[d(Y,{children:H}),d(Y,{children:j}),d(Y,{children:M}),d(Ot,{children:X}),d(Et,{children:z})]})]})};Tt("sequence-stairs-front",{component:s3,composites:["title","item"]});const a3=t=>{const{Title:e,Item:n,data:r,gap:i=40,options:o}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=ce(o),u=et(d(U,{indexes:[0]})),f=et(d(n,{indexes:[0],data:r,datum:l[0],positionH:"center"})),p=[],g=[],y=[],m=25,x=25,v=Math.max(u.height+20,30);if(l.forEach((b,w)=>{const _=w*(f.width+i),$=[w];if(g.push(d(n,{indexes:$,datum:b,data:r,x:_,y:v,positionH:"center"})),p.push(d(Yt,{indexes:$,x:_+(f.width-u.width)/2,y:v+f.height+10})),w===0?p.push(d(U,{indexes:$,x:_+(f.width-u.width)/2,y:v-u.height-10})):p.push(d(U,{indexes:$,x:_-i/2-u.width/2,y:v-u.height-10})),w<l.length-1){const P=_+f.width+(i-m)/2,C=v+f.height/2-x/2;y.push(d(_h,{x:P,y:C,width:m,height:x,colorPrimary:h}))}}),l.length>0){const b=(l.length-1)*(f.width+i);p.push(d(U,{indexes:[l.length],x:b+f.width+(i-u.width)/2,y:v-u.height-10}))}return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,I(Y,{children:[d(Y,{children:y}),d(Ot,{children:g}),d(Et,{children:p})]})]})};Tt("sequence-steps",{component:a3,composites:["title","item"]});const l3=t=>{const{Title:e,Item:n,data:r,gap:i=10,options:o}=t,{title:s,desc:a,items:l=[]}=r,c=e?d(e,{title:s,desc:a}):null,h=ce(o),u=Tg(o),f=et(d(U,{indexes:[0]})),p=et(d(n,{indexes:[0],data:r,datum:l[0],positionH:"normal"})),g=[],y=[],m=[],x=10,v=x+70+10,b=v+30,w=6;if(l.length>1){const _=p.height/2+w,$=(l.length-1)*(p.height+i)+p.height/2-w,P=`M ${v} ${_} L ${v} ${$}`,C="gradient-timeline-line",T=$-_,E=l.map((S,R)=>{const A=(R*(p.height+i)+p.height/2-_)/T*100,F=It(o,[R]);return d("stop",{offset:`${A}%`,stopColor:F||h})});m.push(I(Bt,{children:[d(jt,{children:d("linearGradient",{id:C,x1:v,y1:_,x2:v,y2:$,gradientUnits:"userSpaceOnUse",children:E})}),d(yt,{d:P,stroke:`url(#${C})`,strokeWidth:2,width:1,height:$-_})]}))}if(l.forEach((_,$)=>{const P=$*(p.height+i),C=P+p.height/2,T=[$];m.push(d(St,{x,y:C,width:70,fontSize:18,fontWeight:"bold",alignHorizontal:"left",alignVertical:"middle",fill:u[$%u.length],children:`STEP ${$+1}`})),y.push(d(n,{indexes:T,datum:_,data:r,x:b,y:P,positionH:"normal"})),m.push(d(Wt,{x:v-w,y:C-w,width:w*2,height:w*2,fill:u[$%u.length]})),g.push(d(Yt,{indexes:T,x:b-f.width-10,y:P+(p.height-f.height)/2})),$===0?g.push(d(U,{indexes:T,x:b+(p.width-f.width)/2,y:P-f.height-10})):g.push(d(U,{indexes:T,x:b+(p.width-f.width)/2,y:P-i/2-f.height/2}))}),l.length>0){const _=(l.length-1)*(p.height+i);g.push(d(U,{indexes:[l.length],x:b+(p.width-f.width)/2,y:_+p.height+10}))}return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[c,I(Y,{children:[d(le,{children:m}),d(Ot,{children:y}),d(Et,{children:g})]})]})};Tt("sequence-timeline",{component:l3,composites:["title","item"]});const Sh=120,Eh=108,aa=30,kR="M4.49144e-05 34.4898C4.49144e-05 37.8786 0.848973 41.152 2.43571 44.2444C4.23516 47.7642 6.98514 51.0472 10.517 54.0009C21.331 63.047 39.4615 68.9814 59.9991 68.9814C80.5385 68.9814 98.6672 63.047 109.483 54.0009C113.013 51.0472 115.765 47.7642 117.564 44.2444C119.149 41.152 120 37.8786 120 34.4898C120 15.4407 93.1364 0 59.9991 0C26.8635 0 4.49144e-05 15.4407 4.49144e-05 34.4898Z",LR="M4.49145e-05 34.4898V53.9991C4.49145e-05 57.3879 0.848973 60.6613 2.43571 63.7556C9.75425 78.0545 32.7562 88.4907 59.999 88.4907C87.2438 88.4907 110.246 78.0545 117.564 63.7556C119.149 60.6613 120 57.3879 120 53.9991V34.4898C120 37.8786 119.149 41.152 117.564 44.2444C115.765 47.7642 113.013 51.0472 109.483 54.0009C98.6672 63.047 80.5385 68.9814 59.999 68.9814C39.4615 68.9814 21.3309 63.047 10.5169 54.0009C6.98509 51.0472 4.23516 47.7642 2.43567 44.2444C0.848928 41.152 4.49145e-05 37.8786 4.49145e-05 34.4898Z",zR="M0 53.9991V73.5102C0 92.5593 26.8634 108 59.999 108C93.1363 108 120 92.5593 120 73.5102V53.9991C120 57.3879 119.149 60.6613 117.564 63.7556C110.246 78.0545 87.2438 88.4907 59.999 88.4907C32.7562 88.4907 9.75425 78.0545 2.43571 63.7556C0.848973 60.6613 0 57.3879 0 53.9991Z",c3=I("filter",{id:"sequence-zigzag-pucks-3d-shadow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[d("feOffset",{dx:"-7",dy:"7",in:"SourceAlpha",result:"offset"}),d("feGaussianBlur",{stdDeviation:"7.5",in:"offset",result:"blurred"}),d("feColorMatrix",{in:"blurred",type:"matrix",values:`0 0 0 0 0
143
+ `;return R(Y,{children:[p(Ke,{children:R(tt,{children:[R("linearGradient",{id:"basePlateTopGradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[p("stop",{offset:"0%",stopColor:"#fafafa",stopOpacity:1}),p("stop",{offset:"50%",stopColor:"#ffffff",stopOpacity:.98}),p("stop",{offset:"100%",stopColor:"#ececec",stopOpacity:.95})]}),R("linearGradient",{id:"basePlateFrontGradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[p("stop",{offset:"0%",stopColor:"#e0e0e0",stopOpacity:.95}),p("stop",{offset:"50%",stopColor:"#d2d2d2",stopOpacity:.93}),p("stop",{offset:"100%",stopColor:"#c5c5c5",stopOpacity:.9})]}),R("linearGradient",{id:"basePlateSideGradient",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[p("stop",{offset:"0%",stopColor:"#b8b8b8",stopOpacity:.92}),p("stop",{offset:"50%",stopColor:"#c0c0c0",stopOpacity:.88}),p("stop",{offset:"100%",stopColor:"#adadad",stopOpacity:.85})]})]})}),p(Pe,{id:"base-plate-front",d:b,fill:"url(#basePlateFrontGradient)",stroke:"#c5c5c5",strokeWidth:.3,opacity:.92}),p(Pe,{id:"base-plate-side",d:v,fill:"url(#basePlateSideGradient)",stroke:"#aaaaaa",strokeWidth:.3,opacity:.88}),p(Pe,{id:"base-plate-top",d:m,fill:"url(#basePlateTopGradient)",stroke:"#e5e5e5",strokeWidth:.5,opacity:.93})]})},nC=e=>{const{Title:t,Item:n,data:r,options:i,cylinderRx:o=28,cylinderRy:a=18,baseHeight:s=120,heightIncrement:c=40,depthSpacing:l=60,itemVerticalAlign:u="top",itemVerticalOffset:h=-12,firstDecorationWidth:d=90}=e,{title:f,desc:g,items:y=[]}=r,m=t?p(t,{title:f,desc:g}):null,v=ae(p(n,{indexes:[0],data:r,datum:y[0],positionH:"center"})),b=ae(p(J,{indexes:[0]})),_=wt(i),x=10,w=Math.max(6,l*.15),P=Kte(y.length,v,o,s,c,l,d,x),{startY:$,leftItemAlignedX:C,rightItemAlignedX:M,cylinderAreaStartX:S}=P,E=[],I=[];y.forEach((D,k)=>{const A=je(i,[k])||_;E.push(...Jte(k,A));const L=Zte(k,o,s,c,w,$,S),N=ene(k,L,o,a),{itemPos:q,lineStartX:G,lineEndX:U,lineY:K}=Qte(k,L,v,o,C,M,u,h,x),ne=tne(k,G,U,K,A);N.push(...ne);const ee=p(n,{indexes:[k],datum:D,data:r,x:q.x,y:q.y,positionH:k%2===0?"flipped":"normal"}),se=[p(nt,{indexes:[k],x:q.x+v.width/2-b.width/2,y:q.y+v.height+10}),p(J,{indexes:[k],x:q.x+v.width/2-b.width/2,y:q.y-b.height-10})];I[k]={cylinderNodes:N,itemNode:ee,btnNodes:se,itemX:q.x,itemY:q.y}});let O=1/0,T=1/0,F=-1/0,z=-1/0;I.forEach(D=>{const{itemX:k,itemY:A}=D;O=Math.min(O,k),T=Math.min(T,A),F=Math.max(F,k+v.width),z=Math.max(z,A+v.height)});const j=F-O,H=z-T,W=[p(Ke,{children:E})],B=[],X=nne(y.length,o,S,$,w);X&&W.push(X);for(let D=y.length-1;D>=0;D--){const k=I[D];k&&(W.push(R(Y,{children:[p(Y,{children:k.cylinderNodes}),k.itemNode]})),B.push(...k.btnNodes))}if(y.length>0){const D=y.length%2===0,k=Math.floor(y.length/2),A=Cc(k,o),L=Oc(D,k,o),N=S+L+A,q=$-y.length*w;B.push(p(J,{indexes:[y.length],x:N,y:q-100}))}return R(ye,{flexDirection:"column",justifyContent:"center",alignItems:"center",children:[m,R(Y,{width:j,height:H,children:[p(He,{children:W}),p(qe,{children:B})]})]})};We("sequence-cylinders-3d",{component:nC,composites:["title","item"]});const ot={WIDTH:160,HEIGHT:260,ARROW_HEIGHT:148,ARROW_WIDTH:100,LINE_X:100,RECT_X:0,RECT_Y:80,RECT_WIDTH:100,RECT_HEIGHT:130},Tn={SIZE:8,MAX_COUNT:40,MIN_COUNT:5,ARROW_RATIO:.6,MIN_ARROW_COUNT:3};function rne(e,t,n){return(e+t*7+n*13)%100}function ine(e){const t=Math.ceil(Math.sqrt(e*1.5)),n=Math.ceil(e/t);return{cols:t,rows:n}}function one(e,t,n,r,i,o,a,s){const c=Math.max(i,Math.min(e+n,o)),l=Math.max(a,Math.min(t+r,s));return{x:c,y:l}}function rC({count:e,rectX:t,rectY:n,rectWidth:r,rectHeight:i,seed:o}){const a=[],s=Tn.SIZE/2,{cols:c,rows:l}=ine(e),u=(r-s*2)/(c+1),h=(i-s*2)/(l+1);let d=0;for(let f=0;f<l&&d<e;f++)for(let g=0;g<c&&d<e;g++){const y=rne(o,f,g),m=y%16-8,v=y*3%12-6,b=f%2===1?u/2:0,_=t+s+(g+1)*u+b,x=n+s+(f+1)*h,{x:w,y:P}=one(_,x,m,v,t+s,t+r-s,n+s,n+i-s);a.push({x:w,y:P,colorIndex:d}),d++}return a}function ane(e,t){if(t<=1)return Tn.MAX_COUNT;const n=e/(t-1),r=Tn.MAX_COUNT-Tn.MIN_COUNT;return Math.round(Tn.MAX_COUNT-r*n)}function sne(){const a={topLeft:{x:40,y:25},topRight:{x:160,y:75},bottomLeft:{x:40,y:205},bottomRight:{x:160,y:255}},s=[];for(let c=0;c<=12;c++){const l=c/12,u={x:a.topLeft.x+(a.bottomLeft.x-a.topLeft.x)*l,y:a.topLeft.y+(a.bottomLeft.y-a.topLeft.y)*l},h={x:a.topRight.x+(a.bottomRight.x-a.topRight.x)*l,y:a.topRight.y+(a.bottomRight.y-a.topRight.y)*l};s.push(`M${u.x} ${u.y}L${h.x} ${h.y}`);const d={x:a.topLeft.x+(a.topRight.x-a.topLeft.x)*l,y:a.topLeft.y+(a.topRight.y-a.topLeft.y)*l},f={x:a.bottomLeft.x+(a.bottomRight.x-a.bottomLeft.x)*l,y:a.bottomLeft.y+(a.bottomRight.y-a.bottomLeft.y)*l};s.push(`M${d.x} ${d.y}L${f.x} ${f.y}`)}return s.join("")}function iC(e,t){return e.map(n=>{const r=je(t,[n.colorIndex]);return p(Pe,{d:"M4 0L8 4L4 8L0 4Z",fill:r,x:n.x,y:n.y,width:Tn.SIZE,height:Tn.SIZE,"data-element-type":"shape"})})}function cne(e,t,n,r,i){return R(Y,{x:t,y:0,width:ot.WIDTH,height:ot.HEIGHT,children:[R(xt,{children:[p(Pe,{d:sne(),stroke:"#D9D9D9",strokeWidth:2}),p(Pe,{d:`M${ot.LINE_X} 25V260`,stroke:"#BFBFBF",strokeWidth:2,strokeLinecap:"round"}),p(ze,{x:ot.RECT_X,y:ot.RECT_Y,width:ot.RECT_WIDTH,height:ot.RECT_HEIGHT,fill:"#FFCB0E",fillOpacity:.2})]}),p(tt,{children:iC(r,i)}),p(Ne,{x:ot.LINE_X-25,y:0,width:50,height:20,fontSize:20,fontWeight:"bold",alignHorizontal:"center",alignVertical:"top",fill:n,children:String(e+1).padStart(2,"0")})]})}function lne(e,t){const n=ot.RECT_Y+ot.RECT_HEIGHT/2-ot.ARROW_HEIGHT/2,r=Math.max(Math.round(Tn.MIN_COUNT*Tn.ARROW_RATIO),Tn.MIN_ARROW_COUNT),i=rC({count:r,rectX:0,rectY:14,rectWidth:57,rectHeight:120,seed:999});return R(Y,{x:e+ot.WIDTH,y:n,children:[p(Pe,{d:"M0 13.9679H57.1429V0L100 74L57.1429 148V134.032H0V13.9679Z",width:ot.ARROW_WIDTH,height:ot.ARROW_HEIGHT,fill:"#FFCB0E",fillOpacity:.2,"data-element-type":"shape"}),p(tt,{children:iC(i,t)})]})}const oC=e=>{const{Title:t,Item:n,data:r,gap:i=20,options:o}=e,{title:a,desc:s,items:c=[]}=r,l=t?p(t,{title:a,desc:s}):null,u=ae(p(J,{indexes:[0]})),h=ae(p(n,{indexes:[0],data:r,datum:c[0],width:ot.WIDTH,positionH:"center"})),d=[],f=[],g=[],y=ot.HEIGHT+i,m=y+h.height+10;if(c.forEach((v,b)=>{const _=b*ot.WIDTH,x=[b],w=je(o,x),P=ane(b,c.length),$=rC({count:P,rectX:ot.RECT_X,rectY:ot.RECT_Y,rectWidth:ot.RECT_WIDTH,rectHeight:ot.RECT_HEIGHT,seed:b*100});d.push(cne(b,_,w,$,o)),b===c.length-1&&d.push(lne(_,o)),f.push(p(n,{indexes:x,datum:v,data:r,width:ot.WIDTH,x:_+ot.LINE_X-ot.WIDTH/2,y,positionH:"center"})),g.push(p(nt,{indexes:x,x:_+ot.LINE_X-u.width/2,y:m})),b<c.length-1&&g.push(p(J,{indexes:[b+1],x:_+ot.WIDTH-u.width/2,y:m}))}),c.length>0){g.unshift(p(J,{indexes:[0],x:-u.width/2,y:m}));const v=(c.length-1)*ot.WIDTH;g.push(p(J,{indexes:[c.length],x:v+ot.WIDTH-u.width/2,y:m}))}return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[l,R(Y,{width:ot.WIDTH*c.length+ot.ARROW_WIDTH,height:ot.HEIGHT+i+h.height,children:[p(Y,{children:d}),p(He,{children:f}),p(qe,{children:g})]})]})};We("sequence-filter-mesh",{component:oC,composites:["title","item"]});const Sc=e=>Math.round(e*1e10)/1e10,q1=(e,t)=>Sc(Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))),Mc=Math.PI,une=Mc*2,hne=(e,t)=>{const n=t-e;return n>Mc&&n<une||n<0&&n>-Mc?-1:1},dne=(e,t,n,r,i,o)=>{const a=Math.atan2(e.y-t.y,e.x-t.x),s=Math.atan2(n.y-t.y,n.x-t.x),c=Math.acos((r*r+o*o-i*i)/(2*r*o)),l=1/Math.tan(c/2),u=hne(a,s),h=a+u*c/2;return{prev:a,next:s,main:c,vel:l,dir:u,bis:h}},j1=Math.PI,aC=(e,t,n)=>e.reduce((r,i)=>{const{x:o,y:a,angle:{prev:s,next:c},arc:{x:l,y:u,radius:h}}=i,d=i.angle.dir*-1,f=s+d*j1/2,g=(d*j1+c-s)%j1,y=n-1,m=g/y,v=[];if(!m)return r.concat({x:o,y:a});for(let b=0;b<=y;b++)v.push({x:l+Math.cos(f+m*b)*h,y:u+Math.sin(f+m*b)*h});return r.concat(v)},[]),sC=(e,t=0)=>{const n=e.length,r=[],i=[],o=[];e.forEach((c,l)=>{const u=e[(l-1+n)%n],h=e[(l+1)%n],d=q1(u,c),f=q1(u,h),g=q1(c,h),y=dne(u,c,h,d,f,g);y.main===0&&(y.main=Number.EPSILON,y.vel=Number.MAX_SAFE_INTEGER),y.main===Mc&&(y.vel=0);const m={x:c.x,y:c.y,angle:y,offset:0,arc:{radius:t,hit:t,lim:Math.min(g/y.vel,d/y.vel,c.r||0)},in:{length:d,rest:d},out:{length:g,rest:g},locked:!1,id:l,get prev(){return r[(l-1+n)%n]},get next(){return r[(l+1)%n]}};isNaN(y.main)&&(y.main=0,y.bis=y.prev||y.next,o.push(m)),typeof c.r=="number"&&(c.r===0?o.push(m):i.push(m)),r.push(m)}),o.forEach(c=>{c.angle.vel=0,c.arc.radius=0,F1(c)}),r.forEach(c=>{c.arc.hit=Math.min(c.out.rest/(c.angle.vel+c.next.angle.vel),c.in.rest/(c.angle.vel+c.prev.angle.vel))});let a=Ec(i);for(;a;)fne(a),a=Ec(i);for(a=Ec(r);a;)pne(a,t),a=Ec(r);const s=r.map(c=>{const l=c.arc.radius/Math.sin(c.angle.main/2);return{id:c.id,x:c.x,y:c.y,angle:{main:Sc(c.angle.main),prev:c.angle.prev,next:c.angle.next,bis:c.angle.bis,dir:c.angle.dir},offset:Sc(c.offset),arc:{radius:Sc(c.arc.radius),x:c.x+(Math.cos(c.angle.bis)*l||0),y:c.y+(Math.sin(c.angle.bis)*l||0)},in:{length:c.in.length,x:c.x+Math.cos(c.angle.prev)*c.offset,y:c.y+Math.sin(c.angle.prev)*c.offset},out:{length:c.out.length,x:c.x+Math.cos(c.angle.next)*c.offset,y:c.y+Math.sin(c.angle.next)*c.offset},get prev(){return s[(c.id-1+n)%n]},get next(){return s[(c.id+1)%n]}}});return s},fne=e=>{const{prev:t,next:n}=e;t.locked&&!n.locked?e.arc.radius=Math.min(Math.max((e.out.length-n.arc.lim*n.angle.vel)/e.angle.vel,e.out.length/(e.angle.vel+n.angle.vel)),e.in.rest/e.angle.vel,e.arc.lim):n.locked&&!t.locked?e.arc.radius=Math.min(Math.max((e.in.length-t.arc.lim*t.angle.vel)/e.angle.vel,e.in.length/(e.angle.vel+t.angle.vel)),e.out.rest/e.angle.vel,e.arc.lim):n.locked&&t.locked?e.arc.radius=Math.min(e.in.rest/e.angle.vel,e.out.rest/e.angle.vel,e.arc.lim):e.arc.radius=Math.min(Math.max((e.in.length-t.arc.lim*t.angle.vel)/e.angle.vel,e.in.length/(e.angle.vel+t.angle.vel)),Math.max((e.out.length-n.arc.lim*n.angle.vel)/e.angle.vel,e.out.length/(e.angle.vel+n.angle.vel)),e.arc.lim),F1(e)},pne=(e,t)=>{if(t>e.arc.hit){const{prev:n,next:r}=e;n.locked&&!r.locked?e.arc.radius=Math.max(Math.min(e.in.rest/e.angle.vel,e.out.length/(e.angle.vel+r.angle.vel),e.arc.radius),0):r.locked&&!n.locked?e.arc.radius=Math.max(Math.min(e.out.rest/e.angle.vel,e.in.length/(e.angle.vel+n.angle.vel),e.arc.radius),0):r.locked&&n.locked?e.arc.radius=Math.max(Math.min(e.in.rest/e.angle.vel,e.out.rest/e.angle.vel,e.arc.radius),0):e.arc.radius=e.arc.hit}F1(e)},F1=e=>{const{prev:t,next:n}=e;e.offset=e.arc.radius*e.angle.vel,t.out.rest-=e.offset,e.in.rest-=e.offset,e.out.rest-=e.offset,n.in.rest-=e.offset,e.locked=!0,t.arc.hit=Math.min(t.in.length/(t.angle.vel+t.prev.angle.vel),t.in.rest/t.angle.vel,t.out.rest/t.angle.vel),n.arc.hit=Math.min(n.out.length/(n.angle.vel+n.next.angle.vel),n.out.rest/n.angle.vel,n.in.rest/n.angle.vel)},Ec=e=>e.reduce((t,n)=>n.locked?t:t?n.arc.hit<t.arc.hit?n:t:n,null),gne=6,B1=32,mne=1.25,W1=25,cC=15,lC=e=>{const{Title:t,Item:n,data:r,gap:i=10,width:o=700,funnelWidth:a,itemHeight:s=60,minBottomRatio:c=.25,options:l}=e,{title:u,desc:h,items:d=[]}=r,f=t?p(t,{title:u,desc:h}):null;if(d.length===0)return p(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:f});const g=Ct(l.themeConfig),y=a!=null?a:o*.55,m=o-y,v=s*mne,b=d.length*v+(d.length-1)*i,_=y*c,x=d.map((P,$)=>{const C=[$],M=je(l,[$])||g.colorPrimary,{points:S,topWidth:E}=yne(y,_,v,i,b,$),I=sC(S,gne),O=aC(I,"AMOUNT",10),T=y/2,F=$*(v+i),z=T+E/2,j=z-W1,H=m+W1-10,W=(v-s)/2,B=F+W,X=z+cC,D=H-W1-cC,k=B,A=T-B1/2,L=F+v/2-B1/2,N=`${M.replace("#","")}-funnel-${$}`;return{background:p(ze,{x:j,y:B,width:H,height:s,ry:"8",fill:ve(M).setAlpha(.1).toRgbString(),"data-element-type":"shape"}),funnel:[p(Ke,{children:R("linearGradient",{id:N,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[p("stop",{offset:"0%",stopColor:ve(M).lighten(10).toString()}),p("stop",{offset:"100%",stopColor:M})]})}),p(Wt,{points:O,fill:`url(#${N})`,y:F,"data-element-type":"shape",style:{filter:"drop-shadow(0px 2px 3px rgba(0,0,0,0.15))"}})],icon:p(Dt,{indexes:C,x:A,y:L,size:B1,fill:"#fff"}),item:p(n,{indexes:C,datum:P,data:r,x:X,y:k,width:D,height:s,positionV:"middle"}),btnRemove:p(nt,{indexes:C,x:j+H,y:B})}}),w=p(J,{indexes:[d.length],x:o/2,y:b+10});return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,R(Y,{width:o,height:b+40,children:[p(Y,{children:x.map(P=>P.background)}),p(Y,{children:x.flatMap(P=>P.funnel)}),p(Y,{children:x.map(P=>P.icon)}),p(He,{children:x.map(P=>P.item)}),R(qe,{children:[x.map(P=>P.btnRemove),w]})]})]})};function yne(e,t,n,r,i,o){const a=e/2,s=o*(n+r),c=s+n,l=e-t,u=e-l*(s/i),h=e-l*(c/i),d={x:a-u/2,y:0},f={x:a+u/2,y:0},g={x:a+h/2,y:n},y={x:a-h/2,y:n};return{points:[d,f,g,y],topWidth:u,bottomWidth:h}}We("sequence-funnel",{component:lC,composites:["title","item"]});const uC=e=>{const{Title:t,Item:n,data:r,gap:i=30,cardPadding:o=10,options:a}=e,{title:s,desc:c,items:l=[]}=r,u=t?p(t,{title:s,desc:c}):null,h=wt(a),d=Ct({colorPrimary:h},a),f=ae(p(J,{indexes:[0]})),g=ae(p(n,{indexes:[0],data:r,datum:l[0],positionH:"center"})),y=[],m=[],v=[],b=g.width+o*2,_=g.height+o*2+30,x=8,w=6,P=Math.max(f.height+20,40),$=40;if(l.forEach((C,M)=>{const S=M%2===0,E=M*(b+i);let I;S?M%4===2?I=P:I=P+$:I=P+$+60;const O=[M],T=je(a,O)||h;if(S){const H=T===h?d.colorPrimaryBg||"#E8F3FF":`${T}20`,W=p(ze,{x:E,y:I,width:b,height:_,fill:H,rx:20,ry:20});v.push(W)}m.push(p(n,{indexes:O,datum:C,data:r,x:E+o,y:I+o,positionH:"center",positionV:"normal"}));const F=l.length*x+(l.length-1)*w,z=E+(b-F)/2,j=I+g.height+20;for(let H=0;H<l.length;H++){const W=z+H*(x+w),B=H===M;v.push(p(Je,{x:W,y:j,width:x,height:x,fill:B?T:"transparent",stroke:T,strokeWidth:2}))}y.push(p(nt,{indexes:O,x:E+(b-f.width)/2,y:I+_+10})),M===0?y.push(p(J,{indexes:O,x:E+(b-f.width)/2,y:I-f.height-10})):y.push(p(J,{indexes:O,x:E-i/2-f.width/2,y:P-f.height-10}))}),l.length>0){const C=[],S=i/2,E=6,I=P+$,O=0-S,T=I+_/2;C.push(`M ${O} ${T-E}`),l.forEach((N,q)=>{const G=q%2===0,U=q*(b+i);let K;G?q%4===2?K=P:K=P+$:K=P+$+60;const ne=U-S,ee=U+b+S,se=K-S,ce=K+_+S,Z=K+_/2;G?(C.push(`L ${ne} ${se+35}`),C.push(`Q ${ne} ${se} ${ne+35} ${se}`),C.push(`L ${ee-35} ${se}`),C.push(`Q ${ee} ${se} ${ee} ${se+35}`),C.push(`L ${ee} ${Z-E}`)):(C.push(`L ${ne} ${Z}`),C.push(`L ${ne} ${ce-35}`),C.push(`Q ${ne} ${ce} ${ne+35} ${ce}`),C.push(`L ${ee-35} ${ce}`),C.push(`Q ${ee} ${ce} ${ee} ${ce-35}`),C.push(`L ${ee} ${Z+E}`))});const F=l.length-1,z=F%2===0,j=F*(b+i);let H;z?F%4===2?H=P:H=P+$:H=P+$+60;const W=j+b+S,B=H+_/2,X=C.join(" "),D="gradient-zigzag-path",k=je(a,[0])||h,A=je(a,[l.length-1])||h,L=l.map((N,q)=>{const G=q/(l.length-1)*100,U=je(a,[q])||h;return p("stop",{offset:`${G}%`,stopColor:U})});v.unshift(R(tt,{children:[p(Ke,{children:p("linearGradient",{id:D,x1:O,y1:T,x2:W,y2:B,gradientUnits:"userSpaceOnUse",children:L})}),p(Pe,{d:X,stroke:`url(#${D})`,strokeWidth:2,fill:"none",width:(l.length-1)*(b+i)+b+S*2,height:_+120})]})),v.unshift(p(Je,{x:O-E,y:T-E,width:E*2,height:E*2,fill:"transparent",stroke:k,strokeWidth:2})),v.unshift(p(Je,{x:W-E,y:B-E,width:E*2,height:E*2,fill:"transparent",stroke:A,strokeWidth:2}))}if(l.length>0){const M=(l.length-1)*(b+i);y.push(p(J,{indexes:[l.length],x:M+b+(i-f.width)/2,y:P-f.height-10}))}return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[u,R(Y,{children:[p(xt,{children:v}),p(He,{children:m}),p(qe,{children:y})]})]})};We("sequence-horizontal-zigzag",{component:uC,composites:["title","item"]});var vne=Object.defineProperty,bne=Object.defineProperties,_ne=Object.getOwnPropertyDescriptors,hC=Object.getOwnPropertySymbols,xne=Object.prototype.hasOwnProperty,wne=Object.prototype.propertyIsEnumerable,dC=(e,t,n)=>t in e?vne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ic=(e,t)=>{for(var n in t||(t={}))xne.call(t,n)&&dC(e,n,t[n]);if(hC)for(var n of hC(t))wne.call(t,n)&&dC(e,n,t[n]);return e},Ac=(e,t)=>bne(e,_ne(t));function Pne(e){const{width:t,height:n,colorPrimary:r}=e,i=r,o=ve.mix(r,"#000",20).toHexString(),a=ve.mix(r,"#fff",50).toHexString(),s=ve.mix(a,"#000",15).toHexString();function c($,C){const S=[{position:.25,offset:.1},{position:.45,offset:-.02},{position:.6,offset:.04},{position:.75,offset:-.1}],E={x:0,y:C},I={x:$,y:C},O={x:$/2,y:0},T={x:$/2,y:C},F=C*.35,z=F/C,j={x:O.x*(1-z)+E.x*z,y:F},H={x:O.x,y:F},W={x:O.x*(1-z)+I.x*z,y:F},B=S.map(k=>{const A=j.x+(W.x-j.x)*k.position,L=F,N=C*k.offset;return{x:A,y:L+N,position:k.position,offset:k.offset}});B.sort((k,A)=>k.position-A.position);const X=B.filter(k=>k.x<=H.x),D=B.filter(k=>k.x>H.x);return{leftBottom:E,rightBottom:I,peak:O,centerBottom:T,snowLineY:F,leftEdge:j,centerSnow:H,rightEdge:W,leftRipples:X,rightRipples:D}}const{leftRipples:l,rightRipples:u,leftBottom:h,rightBottom:d,peak:f,centerBottom:g,leftEdge:y,centerSnow:m,rightEdge:v}=c(t,n),b=[f,y,...l,m],_=[f,m,...u,v],x=[y,...l,m,g,h],w=[m,...u,v,d,g],P=$=>$.map(C=>`${C.x},${C.y}`).join(" ");return R(xt,Ac(Ic({},e),{children:[p("polygon",{points:P(b),fill:a}),p("polygon",{points:P(_),fill:s}),p("polygon",{points:P(x),fill:i}),p("polygon",{points:P(w),fill:o})]}))}function $ne(e){const n={tiny:27,small:48,medium:54,large:72}[e]||54,r="#17C76F",i="#139B57",o="#737373",a=n*.7,s=n-a,c=a*.8,l=c,u=l/6,h=(l-u)/2,d=a;return R(xt,{width:l,height:n,children:[p("ellipse",{cx:c/2,cy:a/2,rx:c/2,ry:a/2,fill:r,clipPath:"inset(0 50% 0 0)"}),p("ellipse",{cx:c/2,cy:a/2,rx:c/2,ry:a/2,fill:i,clipPath:"inset(0 0 0 50%)"}),p("rect",{x:h,y:d,width:u,height:s,fill:o})]})}function Cne(e){const{width:t,height:n}=e,r=t/2,i=n/2,o=Math.min(t,n)*.28,a=Math.min(t,n)*.14,s=Math.min(t,n)*.07,c=0,l=i-s/2,u=s*.4,h=8,d=Array.from({length:h},(f,g)=>{const y=360/h*g;return p("rect",{x:c,y:l,width:a,height:s,rx:u,ry:u,fill:"#FFCB0E",transform:`rotate(${y}, ${r}, ${i})`})});return R(xt,Ac(Ic({},e),{children:[p("circle",{cx:r,cy:i,r:o,fill:"#FFCB0E"}),...d]}))}function One(e){return e.type==="single"?p(xt,Ac(Ic({},e),{width:54,height:36,children:p("path",{d:"M10.2635 13.3806C11.0019 9.99045 12.7381 6.91002 15.2405 4.55004C17.743 2.19007 20.8929 0.662716 24.2701 0.171643C27.6473 -0.31943 31.0914 0.24912 34.143 1.80148C37.1946 3.35385 39.7087 5.81625 41.3501 8.86031C44.8835 9.0468 48.1994 10.6544 50.5684 13.3294C52.9373 16.0044 54.1653 19.5277 53.9821 23.1242C53.7989 26.7207 52.2195 30.0959 49.5914 32.5071C46.9634 34.9184 43.5019 36.1683 39.9684 35.9818H11.1517C4.93436 35.9818 0 30.9593 0 24.6309C0.0598447 21.8016 1.13799 19.093 3.02989 17.0192C4.9218 14.9454 7.49584 13.6506 10.2635 13.3806Z",fill:"#70CAF8"})})):R(xt,Ac(Ic({},e),{width:73,height:40,children:[p("path",{d:"M61.6461 14.9716C60.8681 11.1875 58.9581 7.73823 56.1763 5.09315C53.3944 2.44806 49.8758 0.735682 46.0992 0.189041C42.3226 -0.357601 38.4714 0.288046 35.0699 2.03812C31.6683 3.7882 28.8815 6.5577 27.0889 9.96971C23.161 10.1687 19.4719 11.9405 16.8333 14.8953C14.1947 17.8502 12.8227 21.746 13.0191 25.7258C13.2155 29.7055 14.9642 33.4433 17.8806 36.1167C20.7969 38.7901 24.642 40.1802 28.5699 39.9812H60.6588C67.5702 39.9812 73.0006 34.4791 73.0006 27.4764C73.0006 20.9739 67.8664 15.4718 61.6461 14.9716Z",fill:"#70CAF8"}),p("path",{d:"M21.9691 6.47136e-09C25.9369 6.47136e-09 29.5264 1.62125 32.0003 4.21094C30.0604 5.7917 28.4423 7.75571 27.2581 10C23.3149 10.1989 19.6111 11.9702 16.9622 14.9238C14.3136 17.8774 12.936 21.772 13.1331 25.75C13.2057 27.2131 13.4902 28.6432 13.9652 30H10.7689C7.96116 29.8907 5.29664 28.7203 3.30402 26.7217C1.31144 24.7231 0.135825 22.0419 0.0110544 19.21C-0.113702 16.378 0.821178 13.6017 2.63019 11.4326C4.43921 9.26356 6.99065 7.8602 9.77766 7.5C11.9582 3.00012 16.6168 8.76701e-05 21.9691 6.47136e-09Z",fill:"#5BA2C6"})]}))}const fC=e=>{const{Title:t,Item:n,data:r,gap:i=20,minHeight:o=100,maxHeight:a=200,minWidth:s=260,maxWidth:c=300,options:l}=e,{title:u,desc:h,items:d=[]}=r,f=t?p(t,{title:u,desc:h}):null,g=[],y=[],m=[],v=[],b=d.length,_=Ct(l.themeConfig),x=60,w={single:{width:54,height:36},double:{width:73,height:40}},P=[],$=[];let C=0,M=0;d.forEach((B,X)=>{const D=b>1?X/(b-1):0,A=(o+(a-o)*D)*1.6,L=Math.max(s,Math.min(c,A));P.push(L);const N=M;$.push(N),M+=L/2,X===b-1&&(C=N+L)});const S=$[0],E=$[b-1]+P[b-1],I=E-S,O=b>1?(I-i*(b-1))/b:I,T=ae(p(n,{indexes:[0],data:r,datum:d[0],width:O})),F=32,z=a+i,j=z+F+10;d.forEach((B,X)=>{const D=[X],k=o+(a-o)*(b>1?X/(b-1):0),A=P[X],L=$[X],N=a-k,q=je(l,[X])||_.colorPrimary;m.push(p(Pne,{colorPrimary:q,x:L,y:N,width:A,height:k}));const G=S+X*(O+i);v.push(p(Ne,{x:G,y:z,width:O,height:F,fontSize:16,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:q,backgroundColor:q,backgroundOpacity:.5,backgroundRadius:4,children:String(X+1).padStart(2,"0")})),g.push(p(n,{indexes:D,datum:B,data:r,x:G,y:j,width:O}))});const H=ae(p(J,{indexes:[0]})),W=j+T.height+10;if(d.forEach((B,X)=>{const D=[X],k=S+X*(O+i);y.push(p(nt,{indexes:D,x:k+O/2-H.width/2,y:W})),X<d.length-1&&y.push(p(J,{indexes:[X+1],x:k+O+i/2-H.width/2,y:W}))}),b>0){const B=S;y.unshift(p(J,{indexes:[0],x:B-i/2-H.width/2,y:W}));const X=S+(b-1)*(O+i);y.push(p(J,{indexes:[b],x:X+O+i/2-H.width/2,y:W})),m.push(p(Cne,{x:C-x-20,y:-35,width:x,height:x}));const D=["tiny","small","medium","large"],k={tiny:27,small:48,medium:54,large:72},A={tiny:14.85,small:26.4,medium:29.7,large:39.6},L=[],N=(G,U,K=5)=>L.some(ne=>!(G+U+K<ne.x||G>ne.x+ne.width+K));d.forEach((G,U)=>{const K=$[U],ne=P[U],se=U===b-1?3:U===0?1:2;for(let ce=0;ce<se;ce++){const Z=U*100+ce*37,le=Z*17%D.length,te=D[le],Q=k[te],re=A[te];let ie=0,ue=0,he=!1;for(;ie<20&&!he;){const fe=(Z*13+ie*19)%100/100,me=K+ne*.15,pe=K+ne*.85-re;ue=me+(pe-me)*fe,N(ue,re)||(he=!0),ie++}if(he){L.push({x:ue,width:re});const fe=a-Q;m.push(p(Y,{x:ue,y:fe,children:$ne(te)}))}}});const q=Math.max(1,Math.floor(b/1.5));for(let G=0;G<q;G++){const U=G*11+b*5+1,K=U%2===0?"single":"double",ne=w[K],ee=E-S-ne.width,se=S+U*7%100/100*ee,ce=U*13%40;m.push(p(One,{type:K,x:se,y:ce,width:ne.width,height:ne.height}))}}return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[f,R(Y,{children:[p(Y,{children:m}),p(Y,{children:v}),p(He,{children:g}),p(qe,{children:y})]})]})};We("sequence-mountain",{component:fC,composites:["title","item"]});const pC=e=>{const{Title:t,Item:n,data:r,gap:i=10,width:o=700,pyramidWidth:a,itemHeight:s=60,options:c}=e,{title:l,desc:u,items:h=[]}=r,d=t?p(t,{title:l,desc:u}):null;if(h.length===0)return p(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:d});const f=5,g=Ct(c.themeConfig),y=30,m=[],v=[],b=[],_=[],x=a!=null?a:o*.6,w=o-x,P=s*1.2,$=h.length*P+(h.length-1)*i;return h.forEach((C,M)=>{const S=[M],E=M===0,I=je(c,[M])||g.colorPrimary,{points:O,topWidth:T,bottomWidth:F}=Sne(x,P,i,h.length,M),z=sC(O,f),j=aC(z,"AMOUNT",10),H=x/2,W=M*(P+i),B=(P-s)/2,X=W+B,D=H+T/2,k=H+F/2,L=D-f,N=w+f,q=s,G=L+N,U=H-y/2,K=W+P/2-y/2+(E?8:0),ne=k,ee=G-k,se=X;b.push(p(ze,{x:L,y:X,width:N,height:q,ry:"10",fill:g.colorPrimaryBg,"data-element-type":"shape"}));const ce=`${I}-pyramid-${M}`;v.push(p(Ke,{children:R("linearGradient",{id:ce,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[p("stop",{offset:"0","stop-color":I}),p("stop",{offset:"100%","stop-color":ve.mix(I,"#fff",40).toHexString()})]})}),p(Wt,{points:j,fill:`url(#${ce})`,y:W,"data-element-type":"shape"})),_.push(p(Dt,{indexes:S,x:U,y:K,size:y,fill:"#fff"})),m.push(p(n,{indexes:S,datum:C,data:r,x:ne,y:se,width:ee,height:s,positionV:"middle"}))}),R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[d,R(Y,{width:o,height:$,children:[p(Y,{children:b}),p(Y,{children:v}),p(Y,{children:_}),p(He,{children:m}),p(qe,{})]})]})};function Sne(e,t,n,r,i){const o=e/2,a=r*t+(r-1)*n,s=i*(t+n),c=s+t,l=s/a*e,u=c/a*e;let h;if(i===0){const d={x:o,y:0},f={x:o+u/2,y:t},g={x:o-u/2,y:t};h=[d,f,g]}else{const d={x:o+l/2,y:0},f={x:o+u/2,y:t},g={x:o-u/2,y:t},y={x:o-l/2,y:0};h=[d,f,g,y]}return{points:h,topWidth:l,bottomWidth:u}}We("sequence-pyramid",{component:pC,composites:["title","item"]});const Vo={iconSize:50,roadWidth:24,outerRadius:60,rowWidth:400,spacing:30,colorDefault:"#666666"},gC=(e,t)=>`M ${e} ${t}`,yt=(e,t)=>`L ${e} ${t}`,ki=(e,t,n,r)=>`A ${e} ${e} 0 0 ${t} ${n} ${r}`,Mne=(e,{roadWidth:t,innerRadius:n,outerRadius:r})=>{const i=(t+n*2)*e;return{y1:i,y2:i+t,y3:i+t+n,y4:i+t+n*2,y5:i+r*2}};function Ene({i:e,direction:t,x:n,y:r,color:i,data:o,itemBounds:a,item:s,Item:c,flipped:l}){const{iconSize:u}=Vo,h=t==="left",d=h?n.x4-u/2:n.x3-u/2,f=r.y3-u/2,g=h?n.x6+Vo.spacing:n.x1-Vo.spacing-a.width,y=r.y3-a.height/2,m=h?l?"flipped":"normal":l?"normal":"flipped";return{icon:p(Ar,{indexes:[e],x:d,y:f,size:u,fill:i}),label:p(Ne,{width:40,x:h?d-50:d+u+10,y:f+u/2-15,fontSize:30,fill:i,alignHorizontal:h?"right":"left",children:String(e+1).padStart(2,"0")}),item:p(c,{indexes:[e],data:o,datum:s,x:g,y,positionH:m})}}function Ine({direction:e,x:t,y:n,color:r,elements:i}){const o=e==="left";i.push(p(Hte,{x:o?t.x6+10:t.x1-20,y:n.y3-5,width:10,height:8,rotation:o?90:-90,colorPrimary:r,"data-element-type":"shape"}))}const mC=e=>{const{Title:t,Item:n,data:r,spacing:i=Vo.spacing,options:o,flipped:a=!1}=e,{title:s,desc:c,items:l=[]}=r,u=t?p(t,{title:s,desc:c}):null,h=ae(p(n,{indexes:[0],data:r,datum:l[0],positionH:"center"})),{roadWidth:d,outerRadius:f,rowWidth:g,colorDefault:y}=Vo,m=d/2,v=f-d,b=(h.width+i)*2+g,_=h.width+i,x=_+f,w=_+g-f,$=w+v+d,C=_+g/2,M=[],S=[],E=[],I=[],O=[],T=[],F=[];for(let H=0;H<l.length;H++){const W=je(o,[H])||y,B=H%2===0?"right":"left",X=H===0,D=H===l.length-1,k=Mne(H,{roadWidth:d,innerRadius:v,outerRadius:f});if(B==="right"){const q=X?[$,k.y1]:[w,k.y1],G=[x,k.y1],U=[x,k.y5],K=X?[$,k.y2]:[w,k.y2],ne=[x,k.y2];if(M.push(X?gC($,k.y1+m):yt(w,k.y1+m),yt(x,k.y1+m),ki(f-m,0,x,k.y4+m)),S.push(X?gC(...q):yt(...q),yt(...G),ki(f,0,...U)),E.push(yt(...K),yt(...ne),ki(v,1,...ne)),D){const ee=d/2;S.push(yt(C,k.y5),yt(C,k.y5+ee),yt(C+d,k.y5-ee),yt(C,k.y4-ee),yt(C,k.y4),yt(x,k.y4)),M.push(yt(C,k.y4+m))}}else{const q=[x,k.y2],G=[w,k.y2],U=[w,k.y4],K=[x,k.y1],ne=[w,k.y1];if(M.push(yt(w,k.y1+m),ki(f-m,1,w,k.y4+m)),S.push(yt(...q),yt(...G),ki(v,1,...U)),E.push(yt(...K),yt(...ne),ki(f,0,...ne)),D){const ee=d/2;S.push(yt(C,k.y4),yt(C,k.y4-ee),yt(C-d,k.y4+ee),yt(C,k.y5+ee),yt(C,k.y5),yt(w,k.y5)),M.push(yt(C,k.y4+m))}}Ine({direction:B,x:{x1:_,x6:$},y:k,color:W,elements:F});const{icon:A,label:L,item:N}=Ene({i:H,direction:B,x:{x1:_,x3:x,x4:w,x6:$},y:k,color:W,data:r,itemBounds:h,item:l[H],Item:n,flipped:a});I.push(A),O.push(L),T.push(N)}const z=[...S,...E.reverse(),"Z"],j=l.length*(d+v*2)+d*1.5;return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[u,R(Y,{width:b,height:h.height<=f*2?j:j+h.height-f*2,children:[p(Pe,{width:g,height:j,d:z.join(" "),fill:y,stroke:y,strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round","data-element-type":"shape"}),p(Pe,{d:M.join(" "),stroke:"white",fill:"none",strokeWidth:"3",strokeDasharray:"8 8",strokeLinecap:"round",strokeLinejoin:"round","data-element-type":"shape"}),R(tt,{children:[I,O,T,F]})]})]})};We("sequence-roadmap-vertical",{component:mC,composites:["title","item"]});const yC=e=>{const{Title:t,Item:n,data:r,gap:i=40,itemsPerRow:o=3,rowGap:a=80,options:s}=e,{title:c,desc:l,items:u=[]}=r,h=t?p(t,{title:c,desc:l}):null,d=wt(s),f=ae(p(J,{indexes:[0]})),g=ae(p(n,{indexes:[0],data:r,datum:u[0],positionH:"center"})),y=[],m=[],v=[],b=25,_=25;if(u.forEach((x,w)=>{const P=Math.floor(w/o),$=w%o,C=P%2===1,S=(C?o-1-$:$)*(g.width+i),E=P*(g.height+a),I=[w];if(m.push(p(n,{indexes:I,datum:x,data:r,x:S,y:E,positionH:"center"})),y.push(p(nt,{indexes:I,x:S+(g.width-f.width)/2,y:E+g.height+10})),w===0&&y.push(p(J,{indexes:I,x:S+(g.width-f.width)/2,y:E-f.height-10})),w<u.length-1){const O=Math.floor((w+1)/o),T=(w+1)%o,j=(O%2===1?o-1-T:T)*(g.width+i);if(P===O){const W=C,B=W?j+g.width+(i-b)/2:S+g.width+(i-b)/2,X=E+g.height/2-_/2;v.push(p(D1,{x:B,y:X,width:b,height:_,colorPrimary:d,rotation:W?180:0})),y.push(p(J,{indexes:[w+1],x:B+(b-f.width)/2,y:E-f.height-10}))}else{const W=S+g.width/2-b/2,B=E+g.height+(a-_)/2;v.push(p(D1,{x:W,y:B,width:b,height:_,colorPrimary:d,rotation:90})),y.push(p(J,{indexes:[w+1],x:W+(b-f.width)/2,y:B+(_-f.height)/2}))}}}),u.length>0){const x=u.length-1,w=Math.floor(x/o),P=x%o,M=(w%2===1?o-1-P:P)*(g.width+i),S=w*(g.height+a);y.push(p(J,{indexes:[u.length],x:M+(g.width-f.width)/2,y:S+g.height+f.height+20}))}return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[h,R(Y,{children:[p(Y,{children:v}),p(He,{children:m}),p(qe,{children:y})]})]})};We("sequence-snake-steps",{component:yC,composites:["title","item"]});const vC=e=>{const{Title:t,Item:n,data:r,options:i,gap:o=16,perspectiveFactor:a=.2,width:s=720}=e,{title:c,desc:l,items:u=[]}=r,h=t,d=h?p(h,{title:c,desc:l}):null;if(u.length===0)return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[d,p(Y,{children:p(qe,{children:p(J,{indexes:[0],x:0,y:0})})})]});const f=wt(i),g=ae(p(J,{indexes:[0]})),y=ae(p(n,{indexes:[0],data:r,datum:u[0]||{},positionH:"center"})),m=12,v=Math.min(s*.1,100),b=Math.min(s*.45,Math.max(80,s-y.width-m-v)),_=Math.max(24,b*a*.35),x=56,w=x*.7,P=u.length>1?(x-w)/(u.length-1):0,$=Math.max(g.height+_+20,_+28),C=b/2,M=b+v+m,S=u.map((le,te)=>x-P*te),E=u.map((le,te)=>Math.max(_*(1-te*.05),_*.7)),I=[],O=[],T=u.length-1;I[T]=$,O[T]=0;for(let le=T-1;le>=0;le-=1)O[le]=O[le+1]+E[le]+o,I[le]=I[le+1]+E[le]+S[le+1]+o;const F=O[0]||E[0]||_,z=b*(.55+a*.1),j=b-z,H=u.map((le,te)=>{const Q=F===0?1:O[te]/F;return z+j*Q}),W=H.map(le=>{const te=C+le/2;return Math.max(0,M-m-te)}),B=[],X=[],D=[],k=[],A=[],L=0,N=(I[0]||$)+(S[0]||x),q=N-L,G=35,K=(H[T]||z)*.8,ne=K*.65,ee=(H[0]||b)*.9;A.push(p(Wt,{points:[{x:C,y:L},{x:C+K/2,y:L+G},{x:C+ne/2,y:L+G},{x:C+ee/2,y:N},{x:C-ee/2,y:N},{x:C-ne/2,y:L+G},{x:C-K/2,y:L+G}],fill:"rgba(0,0,0,0.12)",width:ee,height:q,"data-element-type":"shape"}));let se=I[T]+S[T]/2;u.forEach((le,te)=>{const Q=[te],re=H[te],ie=E[te],ue=C-re/2,he=S[te],fe=I[te],me=fe-ie,pe=fe+he/2,_e=je(i,Q)||f;B.push(p(ze,{x:ue,y:fe,width:re,height:he,fill:_e,"data-element-type":"shape"}),p(Wt,{points:[{x:ue,y:fe},{x:ue+re,y:fe},{x:ue+re-ie/2,y:me},{x:ue+ie/2,y:me}],fill:_e,opacity:"0.3",width:re,height:ie,"data-element-type":"shape"}),p(Ne,{x:ue,y:fe,width:re,height:he,fontSize:he/2,fontWeight:"bold",alignHorizontal:"center",alignVertical:"middle",fill:"#ffffff",children:String(te+1).padStart(2,"0")}));const Ce=ue+re,Me=pe,$e=W[te],Re=Ce+$e;k.push(p(Pe,{d:`M ${Ce} ${Me} L ${Re} ${Me}`,stroke:_e,strokeWidth:2,fill:"none",width:$e,height:2,"data-element-type":"shape"}),p(Pe,{d:`M ${Re} ${Me} L ${Re} ${Me}`,stroke:_e,strokeWidth:6,strokeLinecap:"round",width:1,height:1,"data-element-type":"shape"}));const Fe=pe-y.height/2;X.push(p(n,{indexes:Q,datum:le,data:r,x:M,y:Fe,positionV:"middle"})),D.push(p(nt,{indexes:Q,x:M+y.width+10,y:Fe+y.height/2-g.height/2})),te===0?D.push(p(J,{indexes:[0],x:M+(y.width-g.width)/2,y:Fe-g.height-12})):D.push(p(J,{indexes:Q,x:M+(y.width-g.width)/2,y:(se+pe)/2-g.height/2})),se=pe});const Z=se-y.height/2;return D.push(p(J,{indexes:[u.length],x:M+(y.width-g.width)/2,y:Z+y.height+12})),R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[d,R(Y,{children:[p(Y,{children:A}),p(Y,{children:B}),p(Y,{children:k}),p(He,{children:X}),p(qe,{children:D})]})]})};We("sequence-stairs-front",{component:vC,composites:["title","item"]});const bC=e=>{const{Title:t,Item:n,data:r,gap:i=40,options:o}=e,{title:a,desc:s,items:c=[]}=r,l=t?p(t,{title:a,desc:s}):null,u=wt(o),h=ae(p(J,{indexes:[0]})),d=ae(p(n,{indexes:[0],data:r,datum:c[0],positionH:"center"})),f=[],g=[],y=[],m=25,v=25,b=Math.max(h.height+20,30);if(c.forEach((_,x)=>{const w=x*(d.width+i),P=[x];if(g.push(p(n,{indexes:P,datum:_,data:r,x:w,y:b,positionH:"center"})),f.push(p(nt,{indexes:P,x:w+(d.width-h.width)/2,y:b+d.height+10})),x===0?f.push(p(J,{indexes:P,x:w+(d.width-h.width)/2,y:b-h.height-10})):f.push(p(J,{indexes:P,x:w-i/2-h.width/2,y:b-h.height-10})),x<c.length-1){const $=w+d.width+(i-m)/2,C=b+d.height/2-v/2;y.push(p(D1,{x:$,y:C,width:m,height:v,colorPrimary:u}))}}),c.length>0){const _=(c.length-1)*(d.width+i);f.push(p(J,{indexes:[c.length],x:_+d.width+(i-h.width)/2,y:b-h.height-10}))}return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[l,R(Y,{children:[p(Y,{children:y}),p(He,{children:g}),p(qe,{children:f})]})]})};We("sequence-steps",{component:bC,composites:["title","item"]});const _C=e=>{const{Title:t,Item:n,data:r,gap:i=10,options:o}=e,{title:a,desc:s,items:c=[]}=r,l=t?p(t,{title:a,desc:s}):null,u=wt(o),h=Q_(o),d=ae(p(J,{indexes:[0]})),f=ae(p(n,{indexes:[0],data:r,datum:c[0],positionH:"normal"})),g=[],y=[],m=[],v=10,b=v+70+10,_=b+30,x=6;if(c.length>1){const w=f.height/2+x,P=(c.length-1)*(f.height+i)+f.height/2-x,$=`M ${b} ${w} L ${b} ${P}`,C="gradient-timeline-line",M=P-w,S=c.map((E,I)=>{const T=(I*(f.height+i)+f.height/2-w)/M*100,F=je(o,[I]);return p("stop",{offset:`${T}%`,stopColor:F||u})});m.push(R(tt,{children:[p(Ke,{children:p("linearGradient",{id:C,x1:b,y1:w,x2:b,y2:P,gradientUnits:"userSpaceOnUse",children:S})}),p(Pe,{d:$,stroke:`url(#${C})`,strokeWidth:2,width:1,height:P-w})]}))}if(c.forEach((w,P)=>{const $=P*(f.height+i),C=$+f.height/2,M=[P];m.push(p(Ne,{x:v,y:C,width:70,fontSize:18,fontWeight:"bold",alignHorizontal:"left",alignVertical:"middle",fill:h[P%h.length],children:`STEP ${P+1}`})),y.push(p(n,{indexes:M,datum:w,data:r,x:_,y:$,positionH:"normal"})),m.push(p(Je,{x:b-x,y:C-x,width:x*2,height:x*2,fill:h[P%h.length]})),g.push(p(nt,{indexes:M,x:_-d.width-10,y:$+(f.height-d.height)/2})),P===0?g.push(p(J,{indexes:M,x:_+(f.width-d.width)/2,y:$-d.height-10})):g.push(p(J,{indexes:M,x:_+(f.width-d.width)/2,y:$-i/2-d.height/2}))}),c.length>0){const w=(c.length-1)*(f.height+i);g.push(p(J,{indexes:[c.length],x:_+(f.width-d.width)/2,y:w+f.height+10}))}return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[l,R(Y,{children:[p(xt,{children:m}),p(He,{children:y}),p(qe,{children:g})]})]})};We("sequence-timeline",{component:_C,composites:["title","item"]});const G1=120,V1=108,Tc=30,Ane="M4.49144e-05 34.4898C4.49144e-05 37.8786 0.848973 41.152 2.43571 44.2444C4.23516 47.7642 6.98514 51.0472 10.517 54.0009C21.331 63.047 39.4615 68.9814 59.9991 68.9814C80.5385 68.9814 98.6672 63.047 109.483 54.0009C113.013 51.0472 115.765 47.7642 117.564 44.2444C119.149 41.152 120 37.8786 120 34.4898C120 15.4407 93.1364 0 59.9991 0C26.8635 0 4.49144e-05 15.4407 4.49144e-05 34.4898Z",Tne="M4.49145e-05 34.4898V53.9991C4.49145e-05 57.3879 0.848973 60.6613 2.43571 63.7556C9.75425 78.0545 32.7562 88.4907 59.999 88.4907C87.2438 88.4907 110.246 78.0545 117.564 63.7556C119.149 60.6613 120 57.3879 120 53.9991V34.4898C120 37.8786 119.149 41.152 117.564 44.2444C115.765 47.7642 113.013 51.0472 109.483 54.0009C98.6672 63.047 80.5385 68.9814 59.999 68.9814C39.4615 68.9814 21.3309 63.047 10.5169 54.0009C6.98509 51.0472 4.23516 47.7642 2.43567 44.2444C0.848928 41.152 4.49145e-05 37.8786 4.49145e-05 34.4898Z",kne="M0 53.9991V73.5102C0 92.5593 26.8634 108 59.999 108C93.1363 108 120 92.5593 120 73.5102V53.9991C120 57.3879 119.149 60.6613 117.564 63.7556C110.246 78.0545 87.2438 88.4907 59.999 88.4907C32.7562 88.4907 9.75425 78.0545 2.43571 63.7556C0.848973 60.6613 0 57.3879 0 53.9991Z",xC=R("filter",{id:"sequence-zigzag-pucks-3d-shadow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[p("feOffset",{dx:"-7",dy:"7",in:"SourceAlpha",result:"offset"}),p("feGaussianBlur",{stdDeviation:"7.5",in:"offset",result:"blurred"}),p("feColorMatrix",{in:"blurred",type:"matrix",values:`0 0 0 0 0
144
144
  0 0 0 0 0
145
145
  0 0 0 0 0
146
- 0 0 0 0.3 0`,result:"shadow"}),d("feBlend",{mode:"normal",in:"SourceGraphic",in2:"shadow"})]}),h3=t=>{const{Title:e,Item:n,data:r,options:i,gap:o=80}=t,s=Sh,a=Eh,{title:l,desc:c,items:h=[]}=r,u=e?d(e,{title:l,desc:c}):null,f=ce(i);if(h.length===0)return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[d(jt,{children:c3}),u,d(Y,{children:d(Et,{children:d(U,{indexes:[0],x:0,y:0})})})]});const p=et(d(n,{indexes:[0],data:r,datum:h[0],positionH:"center"})),g=et(d(U,{indexes:[0]})),y=[],m=[],x=[];let v=-1/0;const b=p.height+aa+a;return h.forEach((w,_)=>{const $=[_],P=It(i,$),C=_%2===0,T=_*(s+o),E=C?0:p.height+aa,S=`puck-gradient-middle-${_}`,R=`puck-gradient-bottom-${_}`;x.push(I(Y,{x:T,y:E,id:`puck-${_}`,width:s,height:a,filter:"url(#sequence-zigzag-pucks-3d-shadow-filter)",children:[I(jt,{children:[I("linearGradient",{id:S,x1:"115",y1:"55.9991",x2:"15.0002",y2:"55.9991",gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0",stopColor:P||f}),d("stop",{offset:"1",stopColor:P||f,stopOpacity:"0.6"})]}),I("linearGradient",{id:R,x1:"115",y1:"72.1803",x2:"15.0002",y2:"72.1803",gradientUnits:"userSpaceOnUse",children:[d("stop",{offset:"0",stopColor:"#F4F4FB"}),d("stop",{offset:"1",stopColor:"#8E8C90"})]})]}),I(le,{width:Sh,height:Eh,children:[d(yt,{d:kR,fill:P||f}),d(yt,{d:LR,fill:`url(#${S})`}),d(yt,{d:zR,fill:`url(#${R})`}),d("rect",{fill:"transparent",y:Eh,width:Sh,height:20})]}),d("text",{x:65,y:40,width:50,height:50,fontSize:40,fontWeight:"bold",fill:"#FFFFFF",textAnchor:"middle",dominantBaseline:"middle",transform:"rotate(-15 65 40) scale(1, 0.8)",children:_+1})]}));const O=T+(s-p.width)/2,A=C?E+a+aa:E-aa-p.height;if(v=Math.max(v,A+p.height),m.push(d(n,{indexes:$,datum:w,data:r,x:O,y:A,positionH:"center"})),y.push(d(Yt,{indexes:$,x:O+p.width-g.width/2,y:A+p.height-g.height/2})),_===0&&y.push(d(U,{indexes:[0],x:T+s/2-g.width/2-(o+s)/2,y:E+a/2-g.height/2})),_<h.length-1){const L=(_+1)%2===0?0:b,D=T+s+o/2-g.width/2,k=(E+a/2+L+a/2)/2-g.height/2;y.push(d(U,{indexes:[_+1],x:D,y:k}))}else y.push(d(U,{indexes:[h.length],x:T+s+o/2-g.width/2,y:E+a/2-g.height/2}))}),I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[d(jt,{children:c3}),u,I(Y,{x:0,y:0,children:[d(Y,{children:x}),d(Ot,{children:m}),d(Et,{children:y})]})]})};Tt("sequence-zigzag-pucks-3d",{component:h3,composites:["title","item"]});const HR=240,RR=130,DR=105,gr=12,NR=120,d3=50,jR=.6,WR="M132.821 50.6599L87.6795 76.8925C78.0629 82.4807 62.4238 82.4807 52.7445 76.8925L7.30824 50.6599C2.43719 47.8482 0.00459679 44.1562 0.0152907 40.472L3.17695e-05 45.6925C-0.0101404 49.378 2.42245 53.0686 7.29298 55.8803L52.7289 82.1129C62.4094 87.7011 78.0485 87.7011 87.6652 82.1129L132.806 55.8803C137.583 53.1038 139.975 49.4705 139.986 45.832L140 40.6116C139.989 44.2501 137.598 47.8834 132.821 50.6599Z",u3="M132.707 30.4224C142.386 36.0119 142.437 45.0704 132.821 50.6599L87.6795 76.8925C78.0629 82.4807 62.4238 82.4807 52.7445 76.8925L7.30825 50.6599C-2.37126 45.0717 -2.42225 36.0132 7.19414 30.4237L52.335 4.19115C61.9517 -1.39705 77.5908 -1.39705 87.2713 4.19115L132.707 30.4224Z",f3=70+gr/2,p3=40+gr/2,g3=d("filter",{id:"sequence-zigzag-glow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",children:d("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"15",result:"blur"})}),m3=t=>{var e;const{Title:n,Item:r,data:i,options:o,dx:s=HR,dy:a=RR,iconSize:l=30}=t,{title:c,desc:h,items:u=[]}=i,f=n?d(n,{title:c,desc:h}):null,p=ce(o);if(u.length===0)return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[d(jt,{children:g3}),f,d(Y,{children:d(Et,{children:d(U,{indexes:[0],x:0,y:0})})})]});const g=et(d(r,{indexes:[0],data:i,datum:u[0]})),y=et(d(U,{indexes:[0]})),m=[],x=[],v=[],b=[],w=[];let _=0,$=0,P="",C=1/0,T=-1/0,E=1/0,S=1/0;const R=[];u.forEach((F,L)=>{const D=_,k=$;R.push({x:D,y:k}),C=Math.min(C,k);const N=D-f3,j=k-p3;E=Math.min(E,N),S=Math.min(S,j);const X=L%2===0;L<u.length-1&&(_+=s,$=X?$+a:$-a)});const O=Math.max(0,-E),A=Math.max(0,-S);if(_=0,$=0,u.forEach((F,L)=>{const D=[L],k=R[L],N=k.x+O,j=k.y+A,X=It(o,D),z=Math.max(0,N-f3),M=Math.max(0,j-p3),H=10,B=d3+10,{colorPrimaryBg:q}=ge({colorPrimary:X});if(b.push(I(le,{x:z,y:M,width:140,height:110,children:[d(Wt,{x:H,y:B,width:NR,height:d3,fill:X||p,filter:"url(#sequence-zigzag-glow-filter)",opacity:jR}),d(yt,{d:WR,fill:X||p}),d(yt,{d:u3,fill:"#fff"}),d(yt,{d:u3,fill:q||q})]})),F.icon){const Z=Math.max(0,N-l/2-gr/2),K=Math.max(0,j-l/2-gr/2);w.push(d(Pe,{x:Z,y:K,size:l,indexes:D,fill:X}))}const V=N-g.width/2-gr/2,G=Math.max(0,j+DR-gr/2);if(T=Math.max(T,G+g.height),L===0?P=`M ${N} ${j}`:P+=` L ${N} ${j}`,x.push(d(r,{indexes:D,datum:F,data:i,x:V,y:G})),m.push(d(Yt,{indexes:D,x:Math.max(0,V+g.width-y.width/2),y:Math.max(0,G+g.height-y.height/2)})),L<u.length-1){const Z=R[L+1],K=Z.x+O,it=Z.y+A,Q=Math.max(0,N+(K-N)/2-y.width/2),at=Math.max(0,j+(it-j)/2-y.height/2);m.push(d(U,{indexes:[L+1],x:Q,y:at}))}else m.push(d(U,{indexes:[u.length],x:Math.max(0,V+g.width+s/4),y:Math.max(0,G+g.height/2-y.height/2)}))}),P){const F=(((e=R[R.length-1])==null?void 0:e.x)||0)+O;v.push(d(yt,{d:P,stroke:"#f3f2f1",strokeWidth:gr,fill:"none",width:F,height:T-Math.min(C+A,0)}))}return I(ct,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[d(jt,{children:g3}),f,I(Y,{x:0,y:0,children:[d(Y,{children:[...v,...b,...w]}),d(Ot,{children:x}),d(Et,{children:m})]})]})};Tt("sequence-zigzag-steps",{component:m3,composites:["title","item"]});class jn{init(e){Object.assign(this,e)}}class y3{constructor(e,n={}){this.clickTimer=null,this.singleClickCallback=null,this.doubleClickCallback=null,this.pointerId=null,this.startX=0,this.startY=0,this.skipClick=!1,this.dragged=!1,this.handlePointerDown=i=>{this.pointerId=i.pointerId,this.startX=i.clientX,this.startY=i.clientY,this.dragged=!1,this.skipClick=!1,window.addEventListener("pointermove",this.handlePointerMove,{passive:!0}),window.addEventListener("pointerup",this.handlePointerUp,{passive:!0}),window.addEventListener("pointercancel",this.handlePointerUp,{passive:!0})},this.handlePointerMove=i=>{if(this.pointerId===null||i.pointerId!==this.pointerId)return;const o=i.clientX-this.startX,s=i.clientY-this.startY;Math.hypot(o,s)>this.dragThreshold&&(this.skipClick=!0,this.dragged=!0)},this.handlePointerUp=i=>{this.pointerId!==null&&i.pointerId===this.pointerId&&(this.pointerId=null,window.removeEventListener("pointermove",this.handlePointerMove),window.removeEventListener("pointerup",this.handlePointerUp),window.removeEventListener("pointercancel",this.handlePointerUp),this.dragged||(this.skipClick=!1),this.dragged=!1)};var r;this.element=e,this.delay=n.delay||300,this.dragThreshold=(r=n.dragThreshold)!=null?r:4,this.init()}init(){this.element.addEventListener("click",this.handleClick.bind(this)),this.element.addEventListener("dblclick",this.handleDoubleClick.bind(this)),this.element.addEventListener("pointerdown",this.handlePointerDown)}handleClick(e){if(this.skipClick){this.skipClick=!1;return}this.clickTimer&&clearTimeout(this.clickTimer),this.clickTimer=window.setTimeout(()=>{var n;(n=this.singleClickCallback)==null||n.call(this,e)},this.delay)}handleDoubleClick(e){var n;if(this.skipClick){this.skipClick=!1;return}this.clickTimer&&clearTimeout(this.clickTimer),(n=this.doubleClickCallback)==null||n.call(this,e)}onClick(e){return this.singleClickCallback=e,this}onDoubleClick(e){return this.doubleClickCallback=e,this}destroy(){this.clickTimer&&clearTimeout(this.clickTimer),this.element.removeEventListener("click",this.handleClick),this.element.removeEventListener("dblclick",this.handleDoubleClick),this.element.removeEventListener("pointerdown",this.handlePointerDown),window.removeEventListener("pointermove",this.handlePointerMove),window.removeEventListener("pointerup",this.handlePointerUp),window.removeEventListener("pointercancel",this.handlePointerUp)}}function FR(t){return t.getScreenCTM()||new DOMMatrix}function BR(t){var e;return((e=t.getScreenCTM())==null?void 0:e.inverse())||new DOMMatrix}function mr(t,e,n){return new DOMPoint(e,n).matrixTransform(BR(t))}function fn(t,e){const n=e.getBoundingClientRect(),i=[{x:n.x,y:n.y},{x:n.x+n.width,y:n.y},{x:n.x,y:n.y+n.height},{x:n.x+n.width,y:n.y+n.height}].map(c=>mr(t,c.x,c.y)),o=Math.min(...i.map(c=>c.x)),s=Math.max(...i.map(c=>c.x)),a=Math.min(...i.map(c=>c.y)),l=Math.max(...i.map(c=>c.y));return new DOMRect(o,a,s-o,l-a)}function v3(t,e){if(e.length===0)return t.data;const n=pi(t,e);return n.children||(n.children=[]),n.children}function YR(t,e="data.items"){return t.reduce((n,r,i)=>i===0?`${n}[${r}]`:`${n}.children[${r}]`,e)}function x3(t){var e,n;return((n=(e=VR(t))==null?void 0:e.dataset.indexes)==null?void 0:n.split(",").map(Number))||[]}function VR(t){return zn(t)?ko(t):t}function la(t){if(!t)return null;const e=[XR];let n=t;for(const r of e){const i=r(n);if(i){n=i;break}}return b3(n)}function b3(t){if(!t)return null;const e=[GR,qR];for(const n of e){const r=n(t);if(r)return r}return f6(t)||xn(t)||zn(t)?t:null}const XR=t=>{var e;const n=r=>r?g6(r)||m6(r):!1;return n(t)?t.parentElement:n(t.parentElement)?(e=t.parentElement)==null?void 0:e.parentElement:null},GR=t=>y6(t)&&hf(t.parentElement)?t.parentElement:null,qR=t=>{const e=t.parentElement;return cf(e)?e:Pl(t)?t:null};class w3{constructor(){this.extensions=new Map}register(e,n,r){if(!(r!=null&&r.override)&&this.extensions.has(e))throw new Error(`Extension "${e}" already registered`);this.extensions.set(e,n)}get(e){return this.extensions.get(e)}has(e){return this.extensions.has(e)}getAll(){return this.extensions}forEach(e){this.extensions.forEach((n,r)=>{e(n,r)})}[Symbol.iterator](){return this.extensions.entries()}unregister(e){return this.extensions.delete(e)}destroy(){this.extensions.forEach(e=>{e&&typeof e.dispose=="function"&&e.dispose()}),this.extensions.clear()}}const UR=t=>{if(!t||!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const e=t.tagName.toLowerCase();return e==="input"||e==="textarea"||e==="select"},ZR=t=>{const e=t.toLowerCase().split("+").map(r=>r.trim()).filter(Boolean),n={key:""};if(e.forEach(r=>{r==="shift"?n.shift=!0:r==="alt"||r==="option"?n.alt=!0:r==="ctrl"||r==="control"?n.ctrl=!0:r==="meta"||r==="cmd"||r==="command"?n.meta=!0:r==="mod"?n.mod=!0:n.key=r}),!n.key)throw new Error(`Invalid hotkey combo: "${t}"`);return n},KR=(t,e)=>{var n;if(t.key.toLowerCase()!==e.key)return!1;const i=(n=e.mod)!=null?n:!1,o=t.metaKey,s=t.ctrlKey,a=o||s,l=(c,h)=>c===void 0?!h:c===h;return i&&!a?!1:i?!(!l(e.shift,t.shiftKey)||!l(e.alt,t.altKey)||e.meta!==void 0&&!l(e.meta,o)||e.ctrl!==void 0&&!l(e.ctrl,s)):!(!l(e.meta,o)||!l(e.ctrl,s)||!l(e.shift,t.shiftKey)||!l(e.alt,t.altKey))};class QR{constructor(e={}){this.bindings=[],this.handleKeydown=i=>{if(i instanceof KeyboardEvent&&!i.defaultPrevented&&!UR(i.target)&&!(this.filter&&!this.filter(i))){for(const o of this.bindings)if(o.combos.some(s=>KR(i,s))){o.handler(i);break}}};const{target:n=document,filter:r}=e;this.target=n,this.filter=r,this.target.addEventListener("keydown",this.handleKeydown)}bind(e,n){const i={combos:(Array.isArray(e)?e:[e]).map(o=>ZR(o)),handler:n};return this.bindings.push(i),()=>this.unbind(i)}destroy(){this.target.removeEventListener("keydown",this.handleKeydown),this.bindings=[]}unbind(e){this.bindings=this.bindings.filter(n=>n!==e)}}var JR=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class _3 extends jn{constructor(){super(...arguments),this.name="brush-select",this.shiftKey=!1,this.dragging=!1,this.dragThreshold=4,this.handleStart=e=>{this.interaction.isActive()&&e.button===0&&(this.isTextSelectionTarget(e.target)||this.hasElementAtStart(e.target)||this.interaction.executeExclusiveInteraction(this,()=>JR(this,null,function*(){return new Promise(n=>{this.completeInteraction=n;const r=this.editor.getDocument();this.startPoint=mr(r,e.clientX,e.clientY),this.pointerId=e.pointerId,this.shiftKey=e.shiftKey,this.dragging=!1,window.addEventListener("pointermove",this.handleMove),window.addEventListener("pointerup",this.handleEnd)})})))},this.handleMove=e=>{if(e.pointerId!==this.pointerId||!this.startPoint)return;const n=this.editor.getDocument(),r=mr(n,e.clientX,e.clientY),i=r.x-this.startPoint.x,o=r.y-this.startPoint.y;if(!this.dragging){if(Math.hypot(i,o)<this.dragThreshold)return;this.dragging=!0,this.ensureBrush(),this.updateBrush(this.startPoint,r)}e.preventDefault(),e.stopPropagation(),this.updateBrush(this.startPoint,r)},this.handleEnd=e=>{var n,r;if(e.pointerId!==this.pointerId||!this.startPoint)return;window.removeEventListener("pointermove",this.handleMove),window.removeEventListener("pointerup",this.handleEnd);let i=null;if(this.dragging){e.preventDefault(),e.stopPropagation();const l=this.editor.getDocument(),c=mr(l,e.clientX,e.clientY);i=this.updateBrush(this.startPoint,c),this.clearBrush()}this.pointerId=void 0,this.startPoint=void 0,this.dragging=!1;const o=this.shiftKey;if(this.shiftKey=!1,!i){(n=this.completeInteraction)==null||n.call(this),this.completeInteraction=void 0;return}const s=this.collectSelection(i);if((r=this.completeInteraction)==null||r.call(this),this.completeInteraction=void 0,s.length===0){o||this.interaction.clearSelection();return}const a=o?"add":"replace";this.interaction.select(s,a)}}init(e){super.init(e),this.editor.getDocument().addEventListener("pointerdown",this.handleStart)}destroy(){this.clearBrush(),this.editor.getDocument().removeEventListener("pointerdown",this.handleStart),window.removeEventListener("pointermove",this.handleMove),window.removeEventListener("pointerup",this.handleEnd)}ensureBrush(){return this.brush?this.brush:(this.brush=this.interaction.appendTransientElement(bt("rect",{fill:"rgba(51, 132, 245, 0.08)",stroke:"#3384F5","stroke-dasharray":"4 2","stroke-width":1,"pointer-events":"none"})),this.brush)}updateBrush(e,n){if(!this.brush)return null;const r=Math.min(e.x,n.x),i=Math.min(e.y,n.y),o=Math.abs(e.x-n.x),s=Math.abs(e.y-n.y);return Qt(this.brush,{x:r,y:i,width:o,height:s}),{x:r,y:i,width:o,height:s}}clearBrush(){var e;(e=this.brush)==null||e.remove(),this.brush=void 0}collectSelection(e){const n=this.editor.getDocument(),r=Array.from(n.querySelectorAll("[data-element-type]")),i=(s,a)=>{const l=s.x+s.width,c=s.y+s.height,h=a.x+a.width,u=a.y+a.height;return!(l<a.x||h<s.x||c<a.y||u<s.y)},o=new Set;return r.reduce((s,a)=>{const l=b3(a);if(!l||o.has(l))return s;const c=fn(n,l),h={x:c.x,y:c.y,width:c.width,height:c.height};return i(e,h)&&(s.push(l),o.add(l)),s},[])}hasElementAtStart(e){var n;return e instanceof Element?la(e)?!0:!!((n=e.closest)!=null&&n.call(e,"[data-element-type]")):!1}isTextSelectionTarget(e){if(!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;const n=e.tagName.toLowerCase();return n==="input"||n==="textarea"}}var tD=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class $3 extends jn{constructor(){super(...arguments),this.name="click-select",this.shiftKey=!1,this.onShiftKeyDown=e=>{e.key==="Shift"&&(this.shiftKey=!0)},this.onShiftKeyUp=e=>{e.key==="Shift"&&(this.shiftKey=!1)},this.onEscKeyDown=e=>{e.key==="Escape"&&this.interaction.clearSelection()}}init(e){super.init(e);const{editor:n,interaction:r}=this;this.clickHandler=new y3(n.getDocument(),{delay:0});const i=o=>{r.isActive()&&r.executeExclusiveInteraction(this,()=>tD(this,null,function*(){const s=la(o.target);df(s)||(this.shiftKey?s&&(r.isSelected(s)?r.select([s],"remove"):r.select([s],"add")):s?r.select([s],"replace"):r.clearSelection())}))};this.clickHandler.onClick(i),document.addEventListener("keydown",this.onShiftKeyDown),document.addEventListener("keyup",this.onShiftKeyUp),document.addEventListener("keydown",this.onEscKeyDown)}destroy(){var e;(e=this.clickHandler)==null||e.destroy(),document.removeEventListener("keydown",this.onShiftKeyDown),document.removeEventListener("keyup",this.onShiftKeyUp),document.removeEventListener("keydown",this.onEscKeyDown)}}var P3=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class eD{constructor(e){this.commands=e}apply(e){return P3(this,null,function*(){for(const n of this.commands)yield n.apply(e)})}undo(e){return P3(this,null,function*(){for(let n=this.commands.length-1;n>=0;n--)yield this.commands[n].undo(e)})}serialize(){return{type:"batch",commands:this.commands.map(e=>e.serialize())}}}var nD=Object.defineProperty,rD=Object.defineProperties,iD=Object.getOwnPropertyDescriptors,C3=Object.getOwnPropertySymbols,oD=Object.prototype.hasOwnProperty,sD=Object.prototype.propertyIsEnumerable,O3=(t,e,n)=>e in t?nD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ki=(t,e)=>{for(var n in e||(e={}))oD.call(e,n)&&O3(t,n,e[n]);if(C3)for(var n of C3(e))sD.call(e,n)&&O3(t,n,e[n]);return t},M3=(t,e)=>rD(t,iD(e)),S3=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class pn{constructor(e,n,r){this.element=e,this.modified=n;const i=aD(e,n);this.original=lD(i,r)}apply(e){return S3(this,null,function*(){E3(this.element,this.modified),e.updateElement(this.element,this.modified)})}undo(e){return S3(this,null,function*(){this.original&&(E3(this.element,this.original),e.updateElement(this.element,this.original))})}serialize(){return{type:"update-element",elementId:this.element.id,modified:this.modified,original:this.original}}}function E3(t,e){xn(t)?lf(t,e):zn(t)?n_(t,void 0,e.attributes):e.attributes&&Qt(t,e.attributes)}function aD(t,e){const n=Object.keys(e.attributes||{}),r=De(t,n,!1),i=s=>{s&&n.forEach(a=>{a in s&&(r[a]=s[a])})},o=M3(Ki({},e),{attributes:r});if(xn(t)){const{attributes:s}=$l(t);i(s)}else if(zn(t)){if(!ko(t))return;i(Al(t))}return o}function lD(t,e){if(!t)return e;if(!e)return t;const n=Ki(Ki({},t.attributes||{}),e.attributes||{});return M3(Ki(Ki({},t),e),{attributes:Object.keys(n).length?n:void 0})}var cD=Object.defineProperty,I3=Object.getOwnPropertySymbols,hD=Object.prototype.hasOwnProperty,dD=Object.prototype.propertyIsEnumerable,A3=(t,e,n)=>e in t?cD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,T3=(t,e)=>{for(var n in e||(e={}))hD.call(e,n)&&A3(t,n,e[n]);if(I3)for(var n of I3(e))dD.call(e,n)&&A3(t,n,e[n]);return t},k3=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class uD{constructor(e,n){this.options=e,this.original=n}apply(e){return k3(this,null,function*(){const n=e.getOptions();this.original||(this.original=n),e.updateOptions(T3(T3({},n),this.options))})}undo(e){return k3(this,null,function*(){this.original&&e.updateOptions(this.original)})}serialize(){return{type:"update-options",options:this.options,original:this.original}}}var L3=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class fD{constructor(e,n,r){this.element=e,this.originalText=r!=null?r:wl(e),this.modifiedText=n}apply(e){return L3(this,null,function*(){this.originalText!==this.modifiedText&&(_l(this.element,this.modifiedText),z3(e,this.element,this.modifiedText))})}undo(e){return L3(this,null,function*(){this.originalText!==this.modifiedText&&(_l(this.element,this.originalText),z3(e,this.element,this.originalText))})}serialize(){return{type:"update-text",elementId:this.element.id,original:this.originalText,modified:this.modifiedText}}}function z3(t,e,n){const r=Cl(e);if(r.startsWith("item-")){const i=r.replace("item-",""),o=x3(e);t.updateItemDatum(o,{[i]:n})}else t.updateData(r,n)}var pD=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class H3 extends jn{constructor(){super(...arguments),this.name="dblclick-edit-text"}init(e){super.init(e);const{editor:n,commander:r,interaction:i}=e;this.clickHandler=new y3(n.getDocument()).onDoubleClick(o=>{i.isActive()&&i.executeExclusiveInteraction(this,()=>pD(this,null,function*(){const s=la(o.target);if(s&&xn(s)){i.select([s],"replace");const a=wl(s),l=yield new Promise(c=>{const h=this.listenSelectionChange(s);mD(s,{cursorPosition:{clientX:o.clientX,clientY:o.clientY},onBlur:c,onCancel:c}),this.detachSelectionListener=h});r.execute(new fD(s,l,a))}}))})}destroy(){var e,n;(e=this.clickHandler)==null||e.destroy(),(n=this.detachSelectionListener)==null||n.call(this)}listenSelectionChange(e){const n=({next:r})=>{var i;if(!r.includes(e)){(i=this.detachSelectionListener)==null||i.call(this),this.detachSelectionListener=void 0;const o=Jn(e);o&&o.blur()}};return this.emitter.on("selection:change",n),()=>this.emitter.off("selection:change",n)}}const gD="infographic-inline-text-editor-style",ca="infographic-inline-text-editor";function mD(t,e){const n=Jn(t);n&&(vD(),new yD(n,e).start())}class yD{constructor(e,n){this.entity=e,this.options=n,this.handlePaste=r=>{r.clipboardData&&(r.preventDefault(),this.insertPlainText(r.clipboardData.getData("text/plain")))},this.handleKeydown=r=>{r.key==="Enter"&&!r.shiftKey&&(r.preventDefault(),this.insertPlainText(`
147
- `))},this.handleInput=()=>{var r,i;this.normalizeSpanContent(),(i=(r=this.options)==null?void 0:r.onInput)==null||i.call(r,this.getText())},this.handleBlur=()=>{var r,i;this.entity.removeAttribute("contenteditable"),this.entity.classList.remove(ca),this.normalizeSpanContent(),(i=(r=this.options)==null?void 0:r.onBlur)==null||i.call(r,this.getText()),this.detachListeners()}}start(){this.entity.setAttribute("contenteditable","true"),this.entity.classList.add(ca),this.entity.focus(),this.placeCaretAtClickPosition(),this.attachListeners()}attachListeners(){this.entity.addEventListener("paste",this.handlePaste),this.entity.addEventListener("keydown",this.handleKeydown),this.entity.addEventListener("input",this.handleInput),this.entity.addEventListener("blur",this.handleBlur,{once:!0})}detachListeners(){this.entity.removeEventListener("paste",this.handlePaste),this.entity.removeEventListener("keydown",this.handleKeydown),this.entity.removeEventListener("input",this.handleInput)}insertPlainText(e){var n,r;const i=window.getSelection();if(!i)return;i.rangeCount||this.placeCaretAtEnd();const o=i.rangeCount?i.getRangeAt(0):document.createRange();o.deleteContents();const s=document.createTextNode(e);o.insertNode(s),o.setStartAfter(s),o.setEndAfter(s),i.removeAllRanges(),i.addRange(o),this.normalizeSpanContent(),(r=(n=this.options)==null?void 0:n.onInput)==null||r.call(n,this.getText())}normalizeSpanContent(){var e;if(this.entity.childNodes.length===1&&((e=this.entity.firstChild)==null?void 0:e.nodeType)===Node.TEXT_NODE)return;const n=this.getText();this.entity.textContent=n}placeCaretAtClickPosition(){const e=window.getSelection();if(!e)return;const n=this.getRangeFromPoint();if(n){e.removeAllRanges(),e.addRange(n);return}this.placeCaretAtEnd()}getRangeFromPoint(){var e,n;const{cursorPosition:r}=this.options||{};if(!r)return null;const{clientX:i,clientY:o}=r,s=document,a=(n=(e=s.caretRangeFromPoint)==null?void 0:e.call(s,i,o))!=null?n:(()=>{var l;const c=(l=s.caretPositionFromPoint)==null?void 0:l.call(s,i,o);if(!c)return null;const h=document.createRange();return h.setStart(c.offsetNode,c.offset),h.collapse(!0),h})();return!a||!this.entity.contains(a.startContainer)?null:a}placeCaretAtEnd(){const e=window.getSelection();if(!e)return;const n=document.createRange();n.selectNodeContents(this.entity),n.collapse(!1),e.removeAllRanges(),e.addRange(n)}getText(){return this.entity.textContent||""}}function vD(){ln(gD,`
148
- .${ca} {
146
+ 0 0 0 0.3 0`,result:"shadow"}),p("feBlend",{mode:"normal",in:"SourceGraphic",in2:"shadow"})]}),wC=e=>{const{Title:t,Item:n,data:r,options:i,gap:o=80}=e,a=G1,s=V1,{title:c,desc:l,items:u=[]}=r,h=t?p(t,{title:c,desc:l}):null,d=wt(i);if(u.length===0)return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p(Ke,{children:xC}),h,p(Y,{children:p(qe,{children:p(J,{indexes:[0],x:0,y:0})})})]});const f=ae(p(n,{indexes:[0],data:r,datum:u[0],positionH:"center"})),g=ae(p(J,{indexes:[0]})),y=[],m=[],v=[];let b=-1/0;const _=f.height+Tc+s;return u.forEach((x,w)=>{const P=[w],$=je(i,P),C=w%2===0,M=w*(a+o),S=C?0:f.height+Tc,E=`puck-gradient-middle-${w}`,I=`puck-gradient-bottom-${w}`;v.push(R(Y,{x:M,y:S,id:`puck-${w}`,width:a,height:s,filter:"url(#sequence-zigzag-pucks-3d-shadow-filter)",children:[R(Ke,{children:[R("linearGradient",{id:E,x1:"115",y1:"55.9991",x2:"15.0002",y2:"55.9991",gradientUnits:"userSpaceOnUse",children:[p("stop",{offset:"0",stopColor:$||d}),p("stop",{offset:"1",stopColor:$||d,stopOpacity:"0.6"})]}),R("linearGradient",{id:I,x1:"115",y1:"72.1803",x2:"15.0002",y2:"72.1803",gradientUnits:"userSpaceOnUse",children:[p("stop",{offset:"0",stopColor:"#F4F4FB"}),p("stop",{offset:"1",stopColor:"#8E8C90"})]})]}),R(xt,{width:G1,height:V1,children:[p(Pe,{d:Ane,fill:$||d}),p(Pe,{d:Tne,fill:`url(#${E})`}),p(Pe,{d:kne,fill:`url(#${I})`}),p("rect",{fill:"transparent",y:V1,width:G1,height:20})]}),p("text",{x:65,y:40,width:50,height:50,fontSize:40,fontWeight:"bold",fill:"#FFFFFF",textAnchor:"middle",dominantBaseline:"middle",transform:"rotate(-15 65 40) scale(1, 0.8)",children:w+1})]}));const O=M+(a-f.width)/2,T=C?S+s+Tc:S-Tc-f.height;if(b=Math.max(b,T+f.height),m.push(p(n,{indexes:P,datum:x,data:r,x:O,y:T,positionH:"center"})),y.push(p(nt,{indexes:P,x:O+f.width-g.width/2,y:T+f.height-g.height/2})),w===0&&y.push(p(J,{indexes:[0],x:M+a/2-g.width/2-(o+a)/2,y:S+s/2-g.height/2})),w<u.length-1){const z=(w+1)%2===0?0:_,j=M+a+o/2-g.width/2,H=(S+s/2+z+s/2)/2-g.height/2;y.push(p(J,{indexes:[w+1],x:j,y:H}))}else y.push(p(J,{indexes:[u.length],x:M+a+o/2-g.width/2,y:S+s/2-g.height/2}))}),R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[p(Ke,{children:xC}),h,R(Y,{x:0,y:0,children:[p(Y,{children:v}),p(He,{children:m}),p(qe,{children:y})]})]})};We("sequence-zigzag-pucks-3d",{component:wC,composites:["title","item"]});const Rne=240,Lne=130,zne=105,Gr=12,Nne=120,PC=50,Hne=.6,Dne="M132.821 50.6599L87.6795 76.8925C78.0629 82.4807 62.4238 82.4807 52.7445 76.8925L7.30824 50.6599C2.43719 47.8482 0.00459679 44.1562 0.0152907 40.472L3.17695e-05 45.6925C-0.0101404 49.378 2.42245 53.0686 7.29298 55.8803L52.7289 82.1129C62.4094 87.7011 78.0485 87.7011 87.6652 82.1129L132.806 55.8803C137.583 53.1038 139.975 49.4705 139.986 45.832L140 40.6116C139.989 44.2501 137.598 47.8834 132.821 50.6599Z",$C="M132.707 30.4224C142.386 36.0119 142.437 45.0704 132.821 50.6599L87.6795 76.8925C78.0629 82.4807 62.4238 82.4807 52.7445 76.8925L7.30825 50.6599C-2.37126 45.0717 -2.42225 36.0132 7.19414 30.4237L52.335 4.19115C61.9517 -1.39705 77.5908 -1.39705 87.2713 4.19115L132.707 30.4224Z",CC=70+Gr/2,OC=40+Gr/2,SC=p("filter",{id:"sequence-zigzag-glow-filter",x:"-50%",y:"-50%",width:"200%",height:"200%",children:p("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"15",result:"blur"})}),MC=e=>{var t;const{Title:n,Item:r,data:i,options:o,dx:a=Rne,dy:s=Lne,iconSize:c=30}=e,{title:l,desc:u,items:h=[]}=i,d=n?p(n,{title:l,desc:u}):null,f=wt(o);if(h.length===0)return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",children:[p(Ke,{children:SC}),d,p(Y,{children:p(qe,{children:p(J,{indexes:[0],x:0,y:0})})})]});const g=ae(p(r,{indexes:[0],data:i,datum:h[0]})),y=ae(p(J,{indexes:[0]})),m=[],v=[],b=[],_=[],x=[];let w=0,P=0,$="",C=1/0,M=-1/0,S=1/0,E=1/0;const I=[];h.forEach((F,z)=>{const j=w,H=P;I.push({x:j,y:H}),C=Math.min(C,H);const W=j-CC,B=H-OC;S=Math.min(S,W),E=Math.min(E,B);const X=z%2===0;z<h.length-1&&(w+=a,P=X?P+s:P-s)});const O=Math.max(0,-S),T=Math.max(0,-E);if(w=0,P=0,h.forEach((F,z)=>{const j=[z],H=I[z],W=H.x+O,B=H.y+T,X=je(o,j),D=Math.max(0,W-CC),k=Math.max(0,B-OC),A=10,L=PC+10,{colorPrimaryBg:N}=Ct({colorPrimary:X});if(_.push(R(xt,{x:D,y:k,width:140,height:110,children:[p(Je,{x:A,y:L,width:Nne,height:PC,fill:X||f,filter:"url(#sequence-zigzag-glow-filter)",opacity:Hne}),p(Pe,{d:Dne,fill:X||f}),p(Pe,{d:$C,fill:"#fff"}),p(Pe,{d:$C,fill:N||N})]})),F.icon){const U=Math.max(0,W-c/2-Gr/2),K=Math.max(0,B-c/2-Gr/2);x.push(p(Dt,{x:U,y:K,size:c,indexes:j,fill:X}))}const q=W-g.width/2-Gr/2,G=Math.max(0,B+zne-Gr/2);if(M=Math.max(M,G+g.height),z===0?$=`M ${W} ${B}`:$+=` L ${W} ${B}`,v.push(p(r,{indexes:j,datum:F,data:i,x:q,y:G})),m.push(p(nt,{indexes:j,x:Math.max(0,q+g.width-y.width/2),y:Math.max(0,G+g.height-y.height/2)})),z<h.length-1){const U=I[z+1],K=U.x+O,ne=U.y+T,ee=Math.max(0,W+(K-W)/2-y.width/2),se=Math.max(0,B+(ne-B)/2-y.height/2);m.push(p(J,{indexes:[z+1],x:ee,y:se}))}else m.push(p(J,{indexes:[h.length],x:Math.max(0,q+g.width+a/4),y:Math.max(0,G+g.height/2-y.height/2)}))}),$){const F=(((t=I[I.length-1])==null?void 0:t.x)||0)+O;b.push(p(Pe,{d:$,stroke:"#f3f2f1",strokeWidth:Gr,fill:"none",width:F,height:M-Math.min(C+T,0)}))}return R(ye,{id:"infographic-container",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:30,children:[p(Ke,{children:SC}),d,R(Y,{x:0,y:0,children:[p(Y,{children:[...b,..._,...x]}),p(He,{children:v}),p(qe,{children:m})]})]})};We("sequence-zigzag-steps",{component:MC,composites:["title","item"]});class lr{init(t){Object.assign(this,t)}}class EC{constructor(t,n={}){this.clickTimer=null,this.singleClickCallback=null,this.doubleClickCallback=null,this.pointerId=null,this.startX=0,this.startY=0,this.skipClick=!1,this.dragged=!1,this.handlePointerDown=i=>{this.pointerId=i.pointerId,this.startX=i.clientX,this.startY=i.clientY,this.dragged=!1,this.skipClick=!1,window.addEventListener("pointermove",this.handlePointerMove,{passive:!0}),window.addEventListener("pointerup",this.handlePointerUp,{passive:!0}),window.addEventListener("pointercancel",this.handlePointerUp,{passive:!0})},this.handlePointerMove=i=>{if(this.pointerId===null||i.pointerId!==this.pointerId)return;const o=i.clientX-this.startX,a=i.clientY-this.startY;Math.hypot(o,a)>this.dragThreshold&&(this.skipClick=!0,this.dragged=!0)},this.handlePointerUp=i=>{this.pointerId!==null&&i.pointerId===this.pointerId&&(this.pointerId=null,window.removeEventListener("pointermove",this.handlePointerMove),window.removeEventListener("pointerup",this.handlePointerUp),window.removeEventListener("pointercancel",this.handlePointerUp),this.dragged||(this.skipClick=!1),this.dragged=!1)};var r;this.element=t,this.delay=n.delay||300,this.dragThreshold=(r=n.dragThreshold)!=null?r:4,this.init()}init(){this.element.addEventListener("click",this.handleClick.bind(this)),this.element.addEventListener("dblclick",this.handleDoubleClick.bind(this)),this.element.addEventListener("pointerdown",this.handlePointerDown)}handleClick(t){if(this.skipClick){this.skipClick=!1;return}this.clickTimer&&clearTimeout(this.clickTimer),this.clickTimer=window.setTimeout(()=>{var n;(n=this.singleClickCallback)==null||n.call(this,t)},this.delay)}handleDoubleClick(t){var n;if(this.skipClick){this.skipClick=!1;return}this.clickTimer&&clearTimeout(this.clickTimer),(n=this.doubleClickCallback)==null||n.call(this,t)}onClick(t){return this.singleClickCallback=t,this}onDoubleClick(t){return this.doubleClickCallback=t,this}destroy(){this.clickTimer&&clearTimeout(this.clickTimer),this.element.removeEventListener("click",this.handleClick),this.element.removeEventListener("dblclick",this.handleDoubleClick),this.element.removeEventListener("pointerdown",this.handlePointerDown),window.removeEventListener("pointermove",this.handlePointerMove),window.removeEventListener("pointerup",this.handlePointerUp),window.removeEventListener("pointercancel",this.handlePointerUp)}}function qne(e){var t;return((t=e.getScreenCTM())==null?void 0:t.inverse())||new DOMMatrix}function Vr(e,t,n){return new DOMPoint(t,n).matrixTransform(qne(e))}function Vn(e,t){const n=t.getBoundingClientRect(),i=[{x:n.x,y:n.y},{x:n.x+n.width,y:n.y},{x:n.x,y:n.y+n.height},{x:n.x+n.width,y:n.y+n.height}].map(l=>Vr(e,l.x,l.y)),o=Math.min(...i.map(l=>l.x)),a=Math.max(...i.map(l=>l.x)),s=Math.min(...i.map(l=>l.y)),c=Math.max(...i.map(l=>l.y));return new DOMRect(o,s,a-o,c-s)}function IC(e,t){if(t.length===0)return e.data;const n=eo(e,t);return n.children||(n.children=[]),n.children}function jne(e,t="data.items"){return e.reduce((n,r,i)=>i===0?`${n}[${r}]`:`${n}.children[${r}]`,t)}function AC(e){var t,n;return((n=(t=Fne(e))==null?void 0:t.dataset.indexes)==null?void 0:n.split(",").map(Number))||[]}function Fne(e){return ir(e)?ns(e):e}function kc(e){if(!e)return null;const t=[Bne];let n=e;for(const r of t){const i=r(n);if(i){n=i;break}}return TC(n)}function TC(e){if(!e)return null;const t=[Wne,Gne];for(const n of t){const r=n(e);if(r)return r}return $H(e)||jn(e)||ir(e)?e:null}const Bne=e=>{var t;const n=r=>r?OH(r)||SH(r):!1;return n(e)?e.parentElement:n(e.parentElement)?(t=e.parentElement)==null?void 0:t.parentElement:null},Wne=e=>MH(e)&&Ib(e.parentElement)?e.parentElement:null,Gne=e=>{const t=e.parentElement;return Eb(t)?t:Hu(e)?e:null};class kC{constructor(){this.extensions=new Map}register(t,n,r){if(!(r!=null&&r.override)&&this.extensions.has(t))throw new Error(`Extension "${t}" already registered`);this.extensions.set(t,n)}get(t){return this.extensions.get(t)}has(t){return this.extensions.has(t)}getAll(){return this.extensions}forEach(t){this.extensions.forEach((n,r)=>{t(n,r)})}[Symbol.iterator](){return this.extensions.entries()}unregister(t){return this.extensions.delete(t)}destroy(){this.extensions.forEach(t=>{t&&typeof t.dispose=="function"&&t.dispose()}),this.extensions.clear()}}const Vne=e=>{if(!e||!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;const t=e.tagName.toLowerCase();return t==="input"||t==="textarea"||t==="select"},Yne=e=>{const t=e.toLowerCase().split("+").map(r=>r.trim()).filter(Boolean),n={key:""};if(t.forEach(r=>{r==="shift"?n.shift=!0:r==="alt"||r==="option"?n.alt=!0:r==="ctrl"||r==="control"?n.ctrl=!0:r==="meta"||r==="cmd"||r==="command"?n.meta=!0:r==="mod"?n.mod=!0:n.key=r}),!n.key)throw new Error(`Invalid hotkey combo: "${e}"`);return n},Xne=(e,t)=>{var n;if(e.key.toLowerCase()!==t.key)return!1;const i=(n=t.mod)!=null?n:!1,o=e.metaKey,a=e.ctrlKey,s=o||a,c=(l,u)=>l===void 0?!u:l===u;return i&&!s?!1:i?!(!c(t.shift,e.shiftKey)||!c(t.alt,e.altKey)||t.meta!==void 0&&!c(t.meta,o)||t.ctrl!==void 0&&!c(t.ctrl,a)):!(!c(t.meta,o)||!c(t.ctrl,a)||!c(t.shift,e.shiftKey)||!c(t.alt,e.altKey))};class Une{constructor(t={}){this.bindings=[],this.handleKeydown=i=>{if(i instanceof KeyboardEvent&&!i.defaultPrevented&&!Vne(i.target)&&!(this.filter&&!this.filter(i))){for(const o of this.bindings)if(o.combos.some(a=>Xne(i,a))){o.handler(i);break}}};const{target:n=document,filter:r}=t;this.target=n,this.filter=r,this.target.addEventListener("keydown",this.handleKeydown)}bind(t,n){const i={combos:(Array.isArray(t)?t:[t]).map(o=>Yne(o)),handler:n};return this.bindings.push(i),()=>this.unbind(i)}destroy(){this.target.removeEventListener("keydown",this.handleKeydown),this.bindings=[]}unbind(t){this.bindings=this.bindings.filter(n=>n!==t)}}var Kne=(e,t,n)=>new Promise((r,i)=>{var o=c=>{try{s(n.next(c))}catch(l){i(l)}},a=c=>{try{s(n.throw(c))}catch(l){i(l)}},s=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);s((n=n.apply(e,t)).next())});class RC extends lr{constructor(){super(...arguments),this.name="brush-select",this.shiftKey=!1,this.dragging=!1,this.dragThreshold=4,this.handleStart=t=>{this.interaction.isActive()&&t.button===0&&(this.isTextSelectionTarget(t.target)||this.hasElementAtStart(t.target)||this.interaction.executeExclusiveInteraction(this,()=>Kne(this,null,function*(){return new Promise(n=>{this.completeInteraction=n;const r=this.editor.getDocument();this.startPoint=Vr(r,t.clientX,t.clientY),this.pointerId=t.pointerId,this.shiftKey=t.shiftKey,this.dragging=!1,window.addEventListener("pointermove",this.handleMove),window.addEventListener("pointerup",this.handleEnd)})})))},this.handleMove=t=>{if(t.pointerId!==this.pointerId||!this.startPoint)return;const n=this.editor.getDocument(),r=Vr(n,t.clientX,t.clientY),i=r.x-this.startPoint.x,o=r.y-this.startPoint.y;if(!this.dragging){if(Math.hypot(i,o)<this.dragThreshold)return;this.dragging=!0,this.ensureBrush(),this.updateBrush(this.startPoint,r)}t.preventDefault(),t.stopPropagation(),this.updateBrush(this.startPoint,r)},this.handleEnd=t=>{var n,r;if(t.pointerId!==this.pointerId||!this.startPoint)return;window.removeEventListener("pointermove",this.handleMove),window.removeEventListener("pointerup",this.handleEnd);let i=null;if(this.dragging){t.preventDefault(),t.stopPropagation();const c=this.editor.getDocument(),l=Vr(c,t.clientX,t.clientY);i=this.updateBrush(this.startPoint,l),this.clearBrush()}this.pointerId=void 0,this.startPoint=void 0,this.dragging=!1;const o=this.shiftKey;if(this.shiftKey=!1,!i){(n=this.completeInteraction)==null||n.call(this),this.completeInteraction=void 0;return}const a=this.collectSelection(i);if((r=this.completeInteraction)==null||r.call(this),this.completeInteraction=void 0,a.length===0){o||this.interaction.clearSelection();return}const s=o?"add":"replace";this.interaction.select(a,s)}}init(t){super.init(t),this.editor.getDocument().addEventListener("pointerdown",this.handleStart)}destroy(){this.clearBrush(),this.editor.getDocument().removeEventListener("pointerdown",this.handleStart),window.removeEventListener("pointermove",this.handleMove),window.removeEventListener("pointerup",this.handleEnd)}ensureBrush(){return this.brush?this.brush:(this.brush=this.interaction.appendTransientElement(Se("rect",{fill:"rgba(51, 132, 245, 0.08)",stroke:"#3384F5","stroke-dasharray":"4 2","stroke-width":1,"pointer-events":"none"})),this.brush)}updateBrush(t,n){if(!this.brush)return null;const r=Math.min(t.x,n.x),i=Math.min(t.y,n.y),o=Math.abs(t.x-n.x),a=Math.abs(t.y-n.y);return ut(this.brush,{x:r,y:i,width:o,height:a}),{x:r,y:i,width:o,height:a}}clearBrush(){var t;(t=this.brush)==null||t.remove(),this.brush=void 0}collectSelection(t){const n=this.editor.getDocument(),r=Array.from(n.querySelectorAll("[data-element-type]")),i=(a,s)=>{const c=a.x+a.width,l=a.y+a.height,u=s.x+s.width,h=s.y+s.height;return!(c<s.x||u<a.x||l<s.y||h<a.y)},o=new Set;return r.reduce((a,s)=>{const c=TC(s);if(!c||o.has(c))return a;const l=Vn(n,c),u={x:l.x,y:l.y,width:l.width,height:l.height};return i(t,u)&&(a.push(c),o.add(c)),a},[])}hasElementAtStart(t){var n;return t instanceof Element?kc(t)?!0:!!((n=t.closest)!=null&&n.call(t,"[data-element-type]")):!1}isTextSelectionTarget(t){if(!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const n=t.tagName.toLowerCase();return n==="input"||n==="textarea"}}var Zne=(e,t,n)=>new Promise((r,i)=>{var o=c=>{try{s(n.next(c))}catch(l){i(l)}},a=c=>{try{s(n.throw(c))}catch(l){i(l)}},s=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);s((n=n.apply(e,t)).next())});class LC extends lr{constructor(){super(...arguments),this.name="click-select",this.shiftKey=!1,this.onShiftKeyDown=t=>{t.key==="Shift"&&(this.shiftKey=!0)},this.onShiftKeyUp=t=>{t.key==="Shift"&&(this.shiftKey=!1)},this.onEscKeyDown=t=>{t.key==="Escape"&&this.interaction.clearSelection()}}init(t){super.init(t);const{editor:n,interaction:r}=this;this.clickHandler=new EC(n.getDocument(),{delay:0});const i=o=>{r.isActive()&&r.executeExclusiveInteraction(this,()=>Zne(this,null,function*(){const a=kc(o.target);Ab(a)||(this.shiftKey?a&&(r.isSelected(a)?r.select([a],"remove"):r.select([a],"add")):a?r.select([a],"replace"):r.clearSelection())}))};this.clickHandler.onClick(i),document.addEventListener("keydown",this.onShiftKeyDown),document.addEventListener("keyup",this.onShiftKeyUp),document.addEventListener("keydown",this.onEscKeyDown)}destroy(){var t;(t=this.clickHandler)==null||t.destroy(),document.removeEventListener("keydown",this.onShiftKeyDown),document.removeEventListener("keyup",this.onShiftKeyUp),document.removeEventListener("keydown",this.onEscKeyDown)}}var zC=(e,t,n)=>new Promise((r,i)=>{var o=c=>{try{s(n.next(c))}catch(l){i(l)}},a=c=>{try{s(n.throw(c))}catch(l){i(l)}},s=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);s((n=n.apply(e,t)).next())});class Qne{constructor(t){this.commands=t}apply(t){return zC(this,null,function*(){for(const n of this.commands)yield n.apply(t)})}undo(t){return zC(this,null,function*(){for(let n=this.commands.length-1;n>=0;n--)yield this.commands[n].undo(t)})}serialize(){return{type:"batch",commands:this.commands.map(t=>t.serialize())}}}var Jne=Object.defineProperty,ere=Object.defineProperties,tre=Object.getOwnPropertyDescriptors,NC=Object.getOwnPropertySymbols,nre=Object.prototype.hasOwnProperty,rre=Object.prototype.propertyIsEnumerable,HC=(e,t,n)=>t in e?Jne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yo=(e,t)=>{for(var n in t||(t={}))nre.call(t,n)&&HC(e,n,t[n]);if(NC)for(var n of NC(t))rre.call(t,n)&&HC(e,n,t[n]);return e},DC=(e,t)=>ere(e,tre(t)),qC=(e,t,n)=>new Promise((r,i)=>{var o=c=>{try{s(n.next(c))}catch(l){i(l)}},a=c=>{try{s(n.throw(c))}catch(l){i(l)}},s=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);s((n=n.apply(e,t)).next())});class kn{constructor(t,n,r){this.element=t,this.modified=n;const i=ire(t,n);this.original=ore(i,r)}apply(t){return qC(this,null,function*(){jC(this.element,this.modified),t.updateElement(this.element,this.modified)})}undo(t){return qC(this,null,function*(){this.original&&(jC(this.element,this.original),t.updateElement(this.element,this.original))})}serialize(){return{type:"update-element",elementId:this.element.id,modified:this.modified,original:this.original}}}function jC(e,t){jn(e)?Mb(e,t):ir(e)?GH(e,void 0,t.attributes):t.attributes&&ut(e,t.attributes)}function ire(e,t){const n=Object.keys(t.attributes||{}),r=an(e,n,!1),i=a=>{a&&n.forEach(s=>{s in a&&(r[s]=a[s])})},o=DC(Yo({},t),{attributes:r});if(jn(e)){const{attributes:a}=Nu(e);i(a)}else if(ir(e)){if(!ns(e))return;i(Fu(e))}return o}function ore(e,t){if(!e)return t;if(!t)return e;const n=Yo(Yo({},e.attributes||{}),t.attributes||{});return DC(Yo(Yo({},e),t),{attributes:Object.keys(n).length?n:void 0})}var are=Object.defineProperty,FC=Object.getOwnPropertySymbols,sre=Object.prototype.hasOwnProperty,cre=Object.prototype.propertyIsEnumerable,BC=(e,t,n)=>t in e?are(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,WC=(e,t)=>{for(var n in t||(t={}))sre.call(t,n)&&BC(e,n,t[n]);if(FC)for(var n of FC(t))cre.call(t,n)&&BC(e,n,t[n]);return e},GC=(e,t,n)=>new Promise((r,i)=>{var o=c=>{try{s(n.next(c))}catch(l){i(l)}},a=c=>{try{s(n.throw(c))}catch(l){i(l)}},s=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);s((n=n.apply(e,t)).next())});class lre{constructor(t,n){this.options=t,this.original=n}apply(t){return GC(this,null,function*(){const n=t.getOptions();this.original||(this.original=n),t.updateOptions(WC(WC({},n),this.options))})}undo(t){return GC(this,null,function*(){this.original&&t.updateOptions(this.original)})}serialize(){return{type:"update-options",options:this.options,original:this.original}}}var VC=(e,t,n)=>new Promise((r,i)=>{var o=c=>{try{s(n.next(c))}catch(l){i(l)}},a=c=>{try{s(n.throw(c))}catch(l){i(l)}},s=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);s((n=n.apply(e,t)).next())});class ure{constructor(t,n,r){this.element=t,this.originalText=r!=null?r:Ja(t),this.modifiedText=n}apply(t){return VC(this,null,function*(){this.originalText!==this.modifiedText&&(zu(this.element,this.modifiedText),YC(t,this.element,this.modifiedText))})}undo(t){return VC(this,null,function*(){this.originalText!==this.modifiedText&&(zu(this.element,this.originalText),YC(t,this.element,this.originalText))})}serialize(){return{type:"update-text",elementId:this.element.id,original:this.originalText,modified:this.modifiedText}}}function YC(e,t,n){const r=Du(t);if(r.startsWith("item-")){const i=r.replace("item-",""),o=AC(t);e.updateItemDatum(o,{[i]:n})}else e.updateData(r,n)}var hre=(e,t,n)=>new Promise((r,i)=>{var o=c=>{try{s(n.next(c))}catch(l){i(l)}},a=c=>{try{s(n.throw(c))}catch(l){i(l)}},s=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);s((n=n.apply(e,t)).next())});class XC extends lr{constructor(){super(...arguments),this.name="dblclick-edit-text"}init(t){super.init(t);const{editor:n,commander:r,interaction:i}=t;this.clickHandler=new EC(n.getDocument()).onDoubleClick(o=>{i.isActive()&&i.executeExclusiveInteraction(this,()=>hre(this,null,function*(){const a=kc(o.target);if(a&&jn(a)){i.select([a],"replace");const s=Ja(a),c=yield new Promise(l=>{const u=this.listenSelectionChange(a);fre(a,{cursorPosition:{clientX:o.clientX,clientY:o.clientY},onBlur:l,onCancel:l}),this.detachSelectionListener=u});r.execute(new ure(a,c,s))}}))})}destroy(){var t,n;(t=this.clickHandler)==null||t.destroy(),(n=this.detachSelectionListener)==null||n.call(this)}listenSelectionChange(t){const n=({next:r})=>{var i;if(!r.includes(t)){(i=this.detachSelectionListener)==null||i.call(this),this.detachSelectionListener=void 0;const o=Mr(t);o&&o.blur()}};return this.emitter.on("selection:change",n),()=>this.emitter.off("selection:change",n)}}const dre="infographic-inline-text-editor-style",Rc="infographic-inline-text-editor";function fre(e,t){const n=Mr(e);n&&(gre(),new pre(n,t).start())}class pre{constructor(t,n){this.entity=t,this.options=n,this.handlePaste=r=>{r.clipboardData&&(r.preventDefault(),this.insertPlainText(r.clipboardData.getData("text/plain")))},this.handleKeydown=r=>{r.key==="Enter"&&!r.shiftKey&&(r.preventDefault(),this.insertPlainText(`
147
+ `))},this.handleInput=()=>{var r,i;this.normalizeSpanContent(),(i=(r=this.options)==null?void 0:r.onInput)==null||i.call(r,this.getText())},this.handleBlur=()=>{var r,i;this.entity.removeAttribute("contenteditable"),this.entity.classList.remove(Rc),this.normalizeSpanContent(),(i=(r=this.options)==null?void 0:r.onBlur)==null||i.call(r,this.getText()),this.detachListeners()}}start(){this.entity.setAttribute("contenteditable","true"),this.entity.classList.add(Rc),this.entity.focus(),this.placeCaretAtClickPosition(),this.attachListeners()}attachListeners(){this.entity.addEventListener("paste",this.handlePaste),this.entity.addEventListener("keydown",this.handleKeydown),this.entity.addEventListener("input",this.handleInput),this.entity.addEventListener("blur",this.handleBlur,{once:!0})}detachListeners(){this.entity.removeEventListener("paste",this.handlePaste),this.entity.removeEventListener("keydown",this.handleKeydown),this.entity.removeEventListener("input",this.handleInput)}insertPlainText(t){var n,r;const i=window.getSelection();if(!i)return;i.rangeCount||this.placeCaretAtEnd();const o=i.rangeCount?i.getRangeAt(0):document.createRange();o.deleteContents();const a=document.createTextNode(t);o.insertNode(a),o.setStartAfter(a),o.setEndAfter(a),i.removeAllRanges(),i.addRange(o),this.normalizeSpanContent(),(r=(n=this.options)==null?void 0:n.onInput)==null||r.call(n,this.getText())}normalizeSpanContent(){var t;if(this.entity.childNodes.length===1&&((t=this.entity.firstChild)==null?void 0:t.nodeType)===Node.TEXT_NODE)return;const n=this.getText();this.entity.textContent=n}placeCaretAtClickPosition(){const t=window.getSelection();if(!t)return;const n=this.getRangeFromPoint();if(n){t.removeAllRanges(),t.addRange(n);return}this.placeCaretAtEnd()}getRangeFromPoint(){var t,n;const{cursorPosition:r}=this.options||{};if(!r)return null;const{clientX:i,clientY:o}=r,a=document,s=(n=(t=a.caretRangeFromPoint)==null?void 0:t.call(a,i,o))!=null?n:(()=>{var c;const l=(c=a.caretPositionFromPoint)==null?void 0:c.call(a,i,o);if(!l)return null;const u=document.createRange();return u.setStart(l.offsetNode,l.offset),u.collapse(!0),u})();return!s||!this.entity.contains(s.startContainer)?null:s}placeCaretAtEnd(){const t=window.getSelection();if(!t)return;const n=document.createRange();n.selectNodeContents(this.entity),n.collapse(!1),t.removeAllRanges(),t.addRange(n)}getText(){return this.entity.textContent||""}}function gre(){Sn(dre,`
148
+ .${Rc} {
149
149
  margin: 0;
150
150
  padding: 0;
151
151
  box-sizing: border-box;
@@ -153,11 +153,11 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
153
153
  outline: none;
154
154
  cursor: text;
155
155
  }
156
- .${ca}::selection {
156
+ .${Rc}::selection {
157
157
  background-color: #b3d4fc;
158
158
  }
159
- `)}var xD=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class R3 extends jn{constructor(){super(...arguments),this.name="drag-element",this.selectionForDrag=[],this.willReplaceSelection=!1,this.exclusiveStarted=!1,this.dragItems=[],this.dragging=!1,this.dragThreshold=4,this.handleStart=e=>{if(!this.interaction.isActive()||e.pointerType==="mouse"&&e.button!==0)return;const n=la(e.target);if(!n||df(n))return;const r=this.editor.getDocument();this.pointerId=e.pointerId,this.startPoint=mr(r,e.clientX,e.clientY),this.dragging=!1,this.startTarget=n;const i=this.interaction.isSelected(n);this.selectionForDrag=i?this.interaction.getSelection():[n],this.willReplaceSelection=!i,this.exclusiveStarted=!1,this.startBounds=this.getSelectionBounds(this.selectionForDrag),this.guideCandidates=this.collectGuideCandidates(this.selectionForDrag),window.addEventListener("pointermove",this.handleMove),window.addEventListener("pointerup",this.handleEnd),window.addEventListener("pointercancel",this.handleEnd)},this.handleMove=e=>{if(e.pointerId!==this.pointerId||!this.startPoint)return;const n=this.editor.getDocument(),r=mr(n,e.clientX,e.clientY),i=r.x-this.startPoint.x,o=r.y-this.startPoint.y;if(!this.dragging){if(Math.hypot(i,o)<this.dragThreshold)return;if(!this.startDrag()){this.reset();return}this.dragging=!0}const a=e.altKey?{dx:i,dy:o}:this.getSnappedDelta(i,o);e.preventDefault(),e.stopPropagation(),this.updateGuides(a),this.applyTranslation(a.dx,a.dy),this.emitGeometryChange()},this.handleEnd=e=>{if(e.pointerId!==this.pointerId||!this.startPoint)return;this.detachPointerListeners();const n=this.editor.getDocument(),r=mr(n,e.clientX,e.clientY),i=r.x-this.startPoint.x,o=r.y-this.startPoint.y;if((this.dragging||Math.hypot(i,o)>=this.dragThreshold)&&this.dragItems.length&&this.exclusiveStarted){e.preventDefault(),e.stopPropagation();const a=e.altKey?{dx:i,dy:o}:this.getSnappedDelta(i,o);this.updateGuides(a),this.applyTranslation(a.dx,a.dy),this.commitTranslation(a.dx,a.dy),this.emitGeometryChange()}this.reset()}}init(e){super.init(e),this.editor.getDocument().addEventListener("pointerdown",this.handleStart)}destroy(){this.detachPointerListeners(),this.editor.getDocument().removeEventListener("pointerdown",this.handleStart)}startDrag(){if(this.exclusiveStarted)return!0;if(!this.startTarget||(this.willReplaceSelection&&this.interaction.select([this.startTarget],"replace"),this.dragItems=this.selectionForDrag.filter(n=>xn(n)).map(n=>this.createDragItem(n)).filter(Boolean),this.dragItems.length===0))return!1;let e=!1;return this.interaction.executeExclusiveInteraction(this,()=>xD(this,null,function*(){return new Promise(n=>{this.completeInteraction=n,e=!0})})),this.exclusiveStarted=e,e}applyTranslation(e,n){this.dragItems.forEach(r=>{if(r.mode==="attr"){const i=r.startX+e,o=r.startY+n,s={x:i,y:o};r.hasDataX&&(s["data-x"]=i),r.hasDataY&&(s["data-y"]=o),Qt(r.element,s)}else{const i=this.composeTransform(r.startX+e,r.startY+n,r.restTransform);Qt(r.element,{transform:i})}})}commitTranslation(e,n){if(Math.abs(e)<1e-6&&Math.abs(n)<1e-6)return;const r=this.dragItems.map(i=>{if(i.mode==="attr"){const a=i.startX+e,l=i.startY+n,c={x:a,y:l},h={};return i.hasX?h.x=i.startX:h.x=null,i.hasY?h.y=i.startY:h.y=null,i.hasDataX&&(c["data-x"]=a,h["data-x"]=i.startX),i.hasDataY&&(c["data-y"]=l,h["data-y"]=i.startY),new pn(i.element,{attributes:c},{attributes:h})}const o=this.composeTransform(i.startX+e,i.startY+n,i.restTransform),s=i.originalTransform!==void 0?i.originalTransform:null;return new pn(i.element,{attributes:{transform:o}},{attributes:{transform:s}})});r.length&&this.commander.executeBatch(r)}createDragItem(e){const n=this.getTransformInfo(e);if(n)return{element:e,mode:"transform",startX:n.x,startY:n.y,hasX:!1,hasY:!1,hasDataX:!1,hasDataY:!1,restTransform:n.rest,originalTransform:n.original};const{x:r,y:i,hasX:o,hasY:s,hasDataX:a,hasDataY:l}=this.getAttrInfo(e);return{element:e,mode:"attr",startX:r,startY:i,hasX:o,hasY:s,hasDataX:a,hasDataY:l}}getAttrInfo(e){const n=this.editor.getDocument(),{x:r,y:i}=fn(n,e),o=De(e,["x","y","data-x","data-y"],!1),s=o.x!==null&&o.x!==void 0,a=o.y!==null&&o.y!==void 0,l=o["data-x"]!==null&&o["data-x"]!==void 0,c=o["data-y"]!==null&&o["data-y"]!==void 0,h=(x,v)=>{const b=x!=null?Number(x):NaN;return Number.isFinite(b)?b:v},u=h(o.x,NaN),f=h(o.y,NaN),p=h(o["data-x"],NaN),g=h(o["data-y"],NaN),y=Number.isFinite(u)?u:Number.isFinite(p)?p:r,m=Number.isFinite(f)?f:Number.isFinite(g)?g:i;return{x:y,y:m,hasX:s,hasY:a,hasDataX:l,hasDataY:c}}getTransformInfo(e){const n=e.getAttribute("transform");if(n===null)return null;const r=n.match(/translate\(\s*([-\d.]+)(?:[ ,]\s*([-\d.]+))?\s*\)/i);if(!r)return{x:0,y:0,rest:n,original:n};const i=Number(r[1])||0,o=r[2]!==void 0&&Number(r[2])||0,s=n.replace(r[0],"").trim();return{x:i,y:o,rest:s,original:n}}composeTransform(e,n,r){const i=`translate(${e}, ${n})`;return r&&r.length?`${i} ${r}`:i}emitGeometryChange(){var e;const n=(e=this.dragItems[0])==null?void 0:e.element;if(!n)return;const r=fn(this.editor.getDocument(),n);this.emitter.emit("selection:geometrychange",{type:"selection:geometrychange",target:n,rect:r})}detachPointerListeners(){window.removeEventListener("pointermove",this.handleMove),window.removeEventListener("pointerup",this.handleEnd),window.removeEventListener("pointercancel",this.handleEnd)}reset(){var e;this.detachPointerListeners(),this.clearGuides(),this.pointerId=void 0,this.startPoint=void 0,this.dragItems=[],this.startTarget=void 0,this.selectionForDrag=[],this.willReplaceSelection=!1,this.exclusiveStarted=!1,this.dragging=!1,this.startBounds=void 0,this.guideCandidates=void 0,(e=this.completeInteraction)==null||e.call(this),this.completeInteraction=void 0}getSelectionBounds(e){if(!e.length)return;const n=this.editor.getDocument(),r=e.map(i=>fn(n,i));return Dr(r)}collectGuideCandidates(e){const n=this.editor.getDocument(),r=new Set(e),i=Array.from(n.querySelectorAll("[data-element-type]")).filter(a=>!r.has(a)),o=[],s=[];return i.forEach(a=>{const{x:l,y:c,width:h,height:u}=fn(n,a);o.push(l,l+h/2,l+h),s.push(c,c+u/2,c+u)}),{vertical:o,horizontal:s}}getSnappedDelta(e,n){if(!this.startBounds||!this.guideCandidates)return{dx:e,dy:n};const r={x:this.startBounds.x+e,y:this.startBounds.y+n,width:this.startBounds.width,height:this.startBounds.height},i=this.getSnapOffset([r.x,r.x+r.width/2,r.x+r.width],this.guideCandidates.vertical),o=this.getSnapOffset([r.y,r.y+r.height/2,r.y+r.height],this.guideCandidates.horizontal);return{dx:e+((i==null?void 0:i.offset)||0),dy:n+((o==null?void 0:o.offset)||0),snapX:i,snapY:o}}getSnapOffset(e,n,r=5){let i=null;return e.forEach(o=>{n.forEach(s=>{const a=s-o;Math.abs(a)<=r&&(!i||Math.abs(a)<Math.abs(i.offset))&&(i={offset:a,at:s})})}),i||void 0}ensureGuideLine(e){const n=e==="vertical"?this.guideVertical:this.guideHorizontal;if(n)return n;const r=this.interaction.appendTransientElement(bt("line",{stroke:"#FF7A45","stroke-width":1,"stroke-dasharray":"4 4","pointer-events":"none",visibility:"hidden"}));return e==="vertical"?this.guideVertical=r:this.guideHorizontal=r,r}updateGuides(e){const n=this.editor.getDocument(),{width:r,height:i}=n.viewBox.baseVal;if(e.snapX){const o=this.ensureGuideLine("vertical");Qt(o,{x1:e.snapX.at,y1:0,x2:e.snapX.at,y2:i,visibility:"visible"})}else this.guideVertical&&this.guideVertical.setAttribute("visibility","hidden");if(e.snapY){const o=this.ensureGuideLine("horizontal");Qt(o,{x1:0,y1:e.snapY.at,x2:r,y2:e.snapY.at,visibility:"visible"})}else this.guideHorizontal&&this.guideHorizontal.setAttribute("visibility","hidden")}clearGuides(){var e,n;(e=this.guideVertical)==null||e.remove(),(n=this.guideHorizontal)==null||n.remove(),this.guideVertical=void 0,this.guideHorizontal=void 0}}var D3=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class N3 extends jn{constructor(){super(...arguments),this.name="hotkey-history",this.handleUndo=e=>D3(this,null,function*(){e.preventDefault(),yield this.commander.undo()}),this.handleRedo=e=>D3(this,null,function*(){e.preventDefault(),yield this.commander.redo()})}init(e){super.init(e),this.hotkey=new QR({filter:()=>this.interaction.isActive()}),this.hotkey.bind("mod+z",this.handleUndo),this.hotkey.bind(["mod+shift+z","mod+y"],this.handleRedo)}destroy(){var e;(e=this.hotkey)==null||e.destroy()}}var bD=Object.defineProperty,wD=Object.defineProperties,_D=Object.getOwnPropertyDescriptors,j3=Object.getOwnPropertySymbols,$D=Object.prototype.hasOwnProperty,PD=Object.prototype.propertyIsEnumerable,W3=(t,e,n)=>e in t?bD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,CD=(t,e)=>{for(var n in e||(e={}))$D.call(e,n)&&W3(t,n,e[n]);if(j3)for(var n of j3(e))PD.call(e,n)&&W3(t,n,e[n]);return t},OD=(t,e)=>wD(t,_D(e));class F3 extends jn{constructor(){super(...arguments),this.name="select-highlight",this.highlightMasks=[],this.handleSelectionChanged=({next:e})=>{this.highlightSelection(e)},this.handleGeometryChanged=({target:e})=>{this.interaction.isSelected(e)&&this.highlightSelection(this.interaction.getSelection())},this.handleHistoryChanged=()=>{this.highlightSelection(this.interaction.getSelection())}}init(e){super.init(e);const{emitter:n}=e;n.on("selection:change",this.handleSelectionChanged),n.on("selection:geometrychange",this.handleGeometryChanged),n.on("history:change",this.handleHistoryChanged),this.highlightSelection(this.interaction.getSelection())}destroy(){this.clearMasks();const{emitter:e}=this;e.off("selection:change",this.handleSelectionChanged),e.off("selection:geometrychange",this.handleGeometryChanged),e.off("history:change",this.handleHistoryChanged)}highlightSelection(e){if(e.length===1&&xn(e[0])){this.clearMasks();return}this.drawElementMasks(e),this.drawCombinedBoundsMask(e)}drawElementMasks(e){let n=0;for(;n<e.length;n++){const{x:r,y:i,width:o,height:s}=fn(this.editor.getDocument(),e[n]),a={x:r,y:i,width:o,height:s,fill:"none",stroke:"#3384F5","stroke-width":1,"pointer-events":"none"},l=this.highlightMasks[n];l?Qt(l,a):this.highlightMasks[n]=this.interaction.appendTransientElement(bt("rect",a))}for(;n<this.highlightMasks.length;n++)this.highlightMasks[n].remove();this.highlightMasks=this.highlightMasks.slice(0,e.length)}drawCombinedBoundsMask(e){var n;if(e.length<2){(n=this.combinedBoundsMask)==null||n.remove(),this.combinedBoundsMask=void 0;return}const r=Dr(e.map(o=>fn(this.editor.getDocument(),o))),i=OD(CD({},r),{fill:"none",stroke:"#3384F5","stroke-width":2,"pointer-events":"none"});this.combinedBoundsMask?Qt(this.combinedBoundsMask,i):this.combinedBoundsMask=this.interaction.appendTransientElement(bt("rect",i))}clearMasks(){var e;this.highlightMasks.forEach(n=>n.remove()),this.highlightMasks=[],(e=this.combinedBoundsMask)==null||e.remove(),this.combinedBoundsMask=void 0}}const B3=1,MD=-5e3,SD=5e3;class Y3 extends jn{constructor(){super(...arguments),this.name="zoom-wheel",this.wheelListener=e=>{var n;if(!this.interaction.isActive()||!e.ctrlKey&&!e.metaKey)return;e.preventDefault();const r=e.deltaY>0?1.1:.9,o=(n=this.state.getOptions().padding)!=null?n:0,s=ir(o),l=this.editor.getDocument().getBBox(),c=s.map(x=>E8((x===0?1:x)*r,MD,SD)),[h,u,f,p]=c,g=l.width+p+u,y=l.height+h+f;if(g<=B3||y<=B3)return;const m=new uD({padding:c});this.commander.execute(m)}}init(e){super.init(e),document.addEventListener("wheel",this.wheelListener,{passive:!1})}destroy(){document.removeEventListener("wheel",this.wheelListener)}}class Ih{init(e){Object.assign(this,e)}}const yr=({icon:t,onClick:e,activate:n=!1})=>{ID();const r=document.createElement("button");r.type="button",r.classList.add(Qi),n&&r.setAttribute("data-activate","true"),e&&r.addEventListener("click",e);const i=t();return r.appendChild(i),Object.assign(r,{setActivate:(s=>{s?r.setAttribute("data-activate","true"):r.removeAttribute("data-activate")}).bind(r),activate:n})},Qi="infographic-edit-bar-icon-btn",ED="infographic-edit-bar-icon-btn-style";function ID(){ln(ED,`
160
- .${Qi} {
159
+ `)}var mre=(e,t,n)=>new Promise((r,i)=>{var o=c=>{try{s(n.next(c))}catch(l){i(l)}},a=c=>{try{s(n.throw(c))}catch(l){i(l)}},s=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);s((n=n.apply(e,t)).next())});class UC extends lr{constructor(){super(...arguments),this.name="drag-element",this.selectionForDrag=[],this.willReplaceSelection=!1,this.exclusiveStarted=!1,this.dragItems=[],this.dragging=!1,this.dragThreshold=4,this.handleStart=t=>{if(!this.interaction.isActive()||t.pointerType==="mouse"&&t.button!==0)return;const n=kc(t.target);if(!n||Ab(n))return;const r=this.editor.getDocument();this.pointerId=t.pointerId,this.startPoint=Vr(r,t.clientX,t.clientY),this.dragging=!1,this.startTarget=n;const i=this.interaction.isSelected(n);this.selectionForDrag=i?this.interaction.getSelection():[n],this.willReplaceSelection=!i,this.exclusiveStarted=!1,this.startBounds=this.getSelectionBounds(this.selectionForDrag),this.guideCandidates=this.collectGuideCandidates(this.selectionForDrag),window.addEventListener("pointermove",this.handleMove),window.addEventListener("pointerup",this.handleEnd),window.addEventListener("pointercancel",this.handleEnd)},this.handleMove=t=>{if(t.pointerId!==this.pointerId||!this.startPoint)return;const n=this.editor.getDocument(),r=Vr(n,t.clientX,t.clientY),i=r.x-this.startPoint.x,o=r.y-this.startPoint.y;if(!this.dragging){if(Math.hypot(i,o)<this.dragThreshold)return;if(!this.startDrag()){this.reset();return}this.dragging=!0}const s=t.altKey?{dx:i,dy:o}:this.getSnappedDelta(i,o);t.preventDefault(),t.stopPropagation(),this.updateGuides(s),this.applyTranslation(s.dx,s.dy),this.emitGeometryChange()},this.handleEnd=t=>{if(t.pointerId!==this.pointerId||!this.startPoint)return;this.detachPointerListeners();const n=this.editor.getDocument(),r=Vr(n,t.clientX,t.clientY),i=r.x-this.startPoint.x,o=r.y-this.startPoint.y;if((this.dragging||Math.hypot(i,o)>=this.dragThreshold)&&this.dragItems.length&&this.exclusiveStarted){t.preventDefault(),t.stopPropagation();const s=t.altKey?{dx:i,dy:o}:this.getSnappedDelta(i,o);this.updateGuides(s),this.applyTranslation(s.dx,s.dy),this.commitTranslation(s.dx,s.dy),this.emitGeometryChange()}this.reset()}}init(t){super.init(t),this.editor.getDocument().addEventListener("pointerdown",this.handleStart)}destroy(){this.detachPointerListeners(),this.editor.getDocument().removeEventListener("pointerdown",this.handleStart)}startDrag(){if(this.exclusiveStarted)return!0;if(!this.startTarget||(this.willReplaceSelection&&this.interaction.select([this.startTarget],"replace"),this.dragItems=this.selectionForDrag.filter(n=>jn(n)).map(n=>this.createDragItem(n)).filter(Boolean),this.dragItems.length===0))return!1;let t=!1;return this.interaction.executeExclusiveInteraction(this,()=>mre(this,null,function*(){return new Promise(n=>{this.completeInteraction=n,t=!0})})),this.exclusiveStarted=t,t}applyTranslation(t,n){this.dragItems.forEach(r=>{if(r.mode==="attr"){const i=r.startX+t,o=r.startY+n,a={x:i,y:o};r.hasDataX&&(a["data-x"]=i),r.hasDataY&&(a["data-y"]=o),ut(r.element,a)}else{const i=this.composeTransform(r.startX+t,r.startY+n,r.restTransform);ut(r.element,{transform:i})}})}commitTranslation(t,n){if(Math.abs(t)<1e-6&&Math.abs(n)<1e-6)return;const r=this.dragItems.map(i=>{if(i.mode==="attr"){const s=i.startX+t,c=i.startY+n,l={x:s,y:c},u={};return i.hasX?u.x=i.startX:u.x=null,i.hasY?u.y=i.startY:u.y=null,i.hasDataX&&(l["data-x"]=s,u["data-x"]=i.startX),i.hasDataY&&(l["data-y"]=c,u["data-y"]=i.startY),new kn(i.element,{attributes:l},{attributes:u})}const o=this.composeTransform(i.startX+t,i.startY+n,i.restTransform),a=i.originalTransform!==void 0?i.originalTransform:null;return new kn(i.element,{attributes:{transform:o}},{attributes:{transform:a}})});r.length&&this.commander.executeBatch(r)}createDragItem(t){const n=this.getTransformInfo(t);if(n)return{element:t,mode:"transform",startX:n.x,startY:n.y,hasX:!1,hasY:!1,hasDataX:!1,hasDataY:!1,restTransform:n.rest,originalTransform:n.original};const{x:r,y:i,hasX:o,hasY:a,hasDataX:s,hasDataY:c}=this.getAttrInfo(t);return{element:t,mode:"attr",startX:r,startY:i,hasX:o,hasY:a,hasDataX:s,hasDataY:c}}getAttrInfo(t){const n=this.editor.getDocument(),{x:r,y:i}=Vn(n,t),o=an(t,["x","y","data-x","data-y"],!1),a=o.x!==null&&o.x!==void 0,s=o.y!==null&&o.y!==void 0,c=o["data-x"]!==null&&o["data-x"]!==void 0,l=o["data-y"]!==null&&o["data-y"]!==void 0,u=(v,b)=>{const _=v!=null?Number(v):NaN;return Number.isFinite(_)?_:b},h=u(o.x,NaN),d=u(o.y,NaN),f=u(o["data-x"],NaN),g=u(o["data-y"],NaN),y=Number.isFinite(h)?h:Number.isFinite(f)?f:r,m=Number.isFinite(d)?d:Number.isFinite(g)?g:i;return{x:y,y:m,hasX:a,hasY:s,hasDataX:c,hasDataY:l}}getTransformInfo(t){const n=t.getAttribute("transform");if(n===null)return null;const r=n.match(/translate\(\s*([-\d.]+)(?:[ ,]\s*([-\d.]+))?\s*\)/i);if(!r)return{x:0,y:0,rest:n,original:n};const i=Number(r[1])||0,o=r[2]!==void 0&&Number(r[2])||0,a=n.replace(r[0],"").trim();return{x:i,y:o,rest:a,original:n}}composeTransform(t,n,r){const i=`translate(${t}, ${n})`;return r&&r.length?`${i} ${r}`:i}emitGeometryChange(){var t;const n=(t=this.dragItems[0])==null?void 0:t.element;if(!n)return;const r=Vn(this.editor.getDocument(),n);this.emitter.emit("selection:geometrychange",{type:"selection:geometrychange",target:n,rect:r})}detachPointerListeners(){window.removeEventListener("pointermove",this.handleMove),window.removeEventListener("pointerup",this.handleEnd),window.removeEventListener("pointercancel",this.handleEnd)}reset(){var t;this.detachPointerListeners(),this.clearGuides(),this.pointerId=void 0,this.startPoint=void 0,this.dragItems=[],this.startTarget=void 0,this.selectionForDrag=[],this.willReplaceSelection=!1,this.exclusiveStarted=!1,this.dragging=!1,this.startBounds=void 0,this.guideCandidates=void 0,(t=this.completeInteraction)==null||t.call(this),this.completeInteraction=void 0}getSelectionBounds(t){if(!t.length)return;const n=this.editor.getDocument(),r=t.map(i=>Vn(n,i));return mi(r)}collectGuideCandidates(t){const n=this.editor.getDocument(),r=new Set(t),i=Array.from(n.querySelectorAll("[data-element-type]")).filter(s=>!r.has(s)),o=[],a=[];return i.forEach(s=>{const{x:c,y:l,width:u,height:h}=Vn(n,s);o.push(c,c+u/2,c+u),a.push(l,l+h/2,l+h)}),{vertical:o,horizontal:a}}getSnappedDelta(t,n){if(!this.startBounds||!this.guideCandidates)return{dx:t,dy:n};const r={x:this.startBounds.x+t,y:this.startBounds.y+n,width:this.startBounds.width,height:this.startBounds.height},i=this.getSnapOffset([r.x,r.x+r.width/2,r.x+r.width],this.guideCandidates.vertical),o=this.getSnapOffset([r.y,r.y+r.height/2,r.y+r.height],this.guideCandidates.horizontal);return{dx:t+((i==null?void 0:i.offset)||0),dy:n+((o==null?void 0:o.offset)||0),snapX:i,snapY:o}}getSnapOffset(t,n,r=5){let i=null;return t.forEach(o=>{n.forEach(a=>{const s=a-o;Math.abs(s)<=r&&(!i||Math.abs(s)<Math.abs(i.offset))&&(i={offset:s,at:a})})}),i||void 0}ensureGuideLine(t){const n=t==="vertical"?this.guideVertical:this.guideHorizontal;if(n)return n;const r=this.interaction.appendTransientElement(Se("line",{stroke:"#FF7A45","stroke-width":1,"stroke-dasharray":"4 4","pointer-events":"none",visibility:"hidden"}));return t==="vertical"?this.guideVertical=r:this.guideHorizontal=r,r}updateGuides(t){const n=this.editor.getDocument(),{width:r,height:i}=n.viewBox.baseVal;if(t.snapX){const o=this.ensureGuideLine("vertical");ut(o,{x1:t.snapX.at,y1:0,x2:t.snapX.at,y2:i,visibility:"visible"})}else this.guideVertical&&this.guideVertical.setAttribute("visibility","hidden");if(t.snapY){const o=this.ensureGuideLine("horizontal");ut(o,{x1:0,y1:t.snapY.at,x2:r,y2:t.snapY.at,visibility:"visible"})}else this.guideHorizontal&&this.guideHorizontal.setAttribute("visibility","hidden")}clearGuides(){var t,n;(t=this.guideVertical)==null||t.remove(),(n=this.guideHorizontal)==null||n.remove(),this.guideVertical=void 0,this.guideHorizontal=void 0}}var KC=(e,t,n)=>new Promise((r,i)=>{var o=c=>{try{s(n.next(c))}catch(l){i(l)}},a=c=>{try{s(n.throw(c))}catch(l){i(l)}},s=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);s((n=n.apply(e,t)).next())});class ZC extends lr{constructor(){super(...arguments),this.name="hotkey-history",this.handleUndo=t=>KC(this,null,function*(){t.preventDefault(),yield this.commander.undo()}),this.handleRedo=t=>KC(this,null,function*(){t.preventDefault(),yield this.commander.redo()})}init(t){super.init(t),this.hotkey=new Une({filter:()=>this.interaction.isActive()}),this.hotkey.bind("mod+z",this.handleUndo),this.hotkey.bind(["mod+shift+z","mod+y"],this.handleRedo)}destroy(){var t;(t=this.hotkey)==null||t.destroy()}}var yre=Object.defineProperty,vre=Object.defineProperties,bre=Object.getOwnPropertyDescriptors,QC=Object.getOwnPropertySymbols,_re=Object.prototype.hasOwnProperty,xre=Object.prototype.propertyIsEnumerable,JC=(e,t,n)=>t in e?yre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wre=(e,t)=>{for(var n in t||(t={}))_re.call(t,n)&&JC(e,n,t[n]);if(QC)for(var n of QC(t))xre.call(t,n)&&JC(e,n,t[n]);return e},Pre=(e,t)=>vre(e,bre(t));class eO extends lr{constructor(){super(...arguments),this.name="select-highlight",this.highlightMasks=[],this.handleSelectionChanged=({next:t})=>{this.highlightSelection(t)},this.handleGeometryChanged=({target:t})=>{this.interaction.isSelected(t)&&this.highlightSelection(this.interaction.getSelection())},this.handleHistoryChanged=()=>{this.highlightSelection(this.interaction.getSelection())}}init(t){super.init(t);const{emitter:n}=t;n.on("selection:change",this.handleSelectionChanged),n.on("selection:geometrychange",this.handleGeometryChanged),n.on("history:change",this.handleHistoryChanged),this.highlightSelection(this.interaction.getSelection())}destroy(){this.clearMasks();const{emitter:t}=this;t.off("selection:change",this.handleSelectionChanged),t.off("selection:geometrychange",this.handleGeometryChanged),t.off("history:change",this.handleHistoryChanged)}highlightSelection(t){if(t.length===1&&jn(t[0])){this.clearMasks();return}this.drawElementMasks(t),this.drawCombinedBoundsMask(t)}drawElementMasks(t){let n=0;for(;n<t.length;n++){const{x:r,y:i,width:o,height:a}=Vn(this.editor.getDocument(),t[n]),s={x:r,y:i,width:o,height:a,fill:"none",stroke:"#3384F5","stroke-width":1,"pointer-events":"none"},c=this.highlightMasks[n];c?ut(c,s):this.highlightMasks[n]=this.interaction.appendTransientElement(Se("rect",s))}for(;n<this.highlightMasks.length;n++)this.highlightMasks[n].remove();this.highlightMasks=this.highlightMasks.slice(0,t.length)}drawCombinedBoundsMask(t){var n;if(t.length<2){(n=this.combinedBoundsMask)==null||n.remove(),this.combinedBoundsMask=void 0;return}const r=mi(t.map(o=>Vn(this.editor.getDocument(),o))),i=Pre(wre({},r),{fill:"none",stroke:"#3384F5","stroke-width":2,"pointer-events":"none"});this.combinedBoundsMask?ut(this.combinedBoundsMask,i):this.combinedBoundsMask=this.interaction.appendTransientElement(Se("rect",i))}clearMasks(){var t;this.highlightMasks.forEach(n=>n.remove()),this.highlightMasks=[],(t=this.combinedBoundsMask)==null||t.remove(),this.combinedBoundsMask=void 0}}const tO=1,$re=-5e3,Cre=5e3;class nO extends lr{constructor(){super(...arguments),this.name="zoom-wheel",this.wheelListener=t=>{var n;if(!this.interaction.isActive()||!t.ctrlKey&&!t.metaKey)return;t.preventDefault();const r=t.deltaY>0?1.1:.9,o=(n=this.state.getOptions().padding)!=null?n:0,a=Er(o),c=this.editor.getDocument().getBBox(),l=a.map(v=>Bk((v===0?1:v)*r,$re,Cre)),[u,h,d,f]=l,g=c.width+f+h,y=c.height+u+d;if(g<=tO||y<=tO)return;const m=new lre({padding:l});this.commander.execute(m)}}init(t){super.init(t),document.addEventListener("wheel",this.wheelListener,{passive:!1})}destroy(){document.removeEventListener("wheel",this.wheelListener)}}class Y1{init(t){Object.assign(this,t)}}const Yr=({icon:e,onClick:t,activate:n=!1})=>{Sre();const r=document.createElement("button");r.type="button",r.classList.add(Xo),n&&r.setAttribute("data-activate","true"),t&&r.addEventListener("click",t);const i=e();return r.appendChild(i),Object.assign(r,{setActivate:(a=>{a?r.setAttribute("data-activate","true"):r.removeAttribute("data-activate")}).bind(r),activate:n})},Xo="infographic-edit-bar-icon-btn",Ore="infographic-edit-bar-icon-btn-style";function Sre(){Sn(Ore,`
160
+ .${Xo} {
161
161
  padding: 0;
162
162
  display: flex;
163
163
  align-items: center;
@@ -172,28 +172,28 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
172
172
  cursor: pointer;
173
173
  transition: color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
174
174
  }
175
- .${Qi}:hover {
175
+ .${Xo}:hover {
176
176
  background-color: #f5f5f5;
177
177
  }
178
- .${Qi}:active {
178
+ .${Xo}:active {
179
179
  background-color: #d9d9d9;
180
180
  }
181
- .${Qi}[data-activate="true"] {
181
+ .${Xo}[data-activate="true"] {
182
182
  background-color: #d9d9d9;
183
183
  }
184
- `)}const gn="infographic-color-picker",V3=`${gn}__swatches`,ha=`${gn}__swatch`,X3=`${gn}__controls`,da=`${gn}__input`,G3=`${gn}__format`,vr=`${gn}__format-switch`,Ah=`${gn}__format-switch-knob`,ua=`${gn}__format-switch-label`,AD="infographic-color-picker-style",TD="#1f1f1f",kD=["#000000","#1f1f1f","#434343","#595959","#8c8c8c","#bfbfbf","#d9d9d9","#f0f0f0","#ffffff","#1677ff","#2f54eb","#91caff","#13c2c2","#36cfc9","#52c41a","#73d13d","#fadb14","#ffd666","#fa8c16","#fa541c","#f5222d","#ff7875","#eb2f96","#ffadd2","#722ed1","#9254de","rgba(0, 0, 0, 0.65)","rgba(255, 255, 255, 0.85)"];function q3(t){var e,n,r;if(typeof document=="undefined")throw new Error("ColorPicker can only be used in the browser.");RD();const i=document.createElement("div");i.classList.add(gn);const o=document.createElement("div");o.classList.add(V3),i.appendChild(o);const s=document.createElement("div");s.classList.add(X3),i.appendChild(s);const a=document.createElement("input");a.type="text",a.spellcheck=!1,a.classList.add(da),s.appendChild(a);const l=document.createElement("div");l.classList.add(G3),s.appendChild(l);const c=document.createElement("button");c.type="button",c.classList.add(vr),c.appendChild(Q3("HEXA"));const h=document.createElement("span");h.classList.add(Ah),c.appendChild(h),c.appendChild(Q3("RGBA")),l.appendChild(c);let u="hexa",f=(n=(e=Ji(t.value))!=null?e:Ji(TD))!=null?n:{r:31,g:31,b:31,a:1};const p=[];return((r=t.swatches)!=null&&r.length?t.swatches:kD).forEach($=>{const P=Ji($);if(!P)return;const C=document.createElement("button");C.type="button",C.classList.add(ha),C.style.setProperty("--swatch-color",fa(P,"rgba")),C.dataset.colorKey=Z3(P),C.addEventListener("click",()=>{v(P)}),o.appendChild(C),p.push(C)}),c.addEventListener("click",()=>x(u==="hexa"?"rgba":"hexa")),a.addEventListener("change",m),a.addEventListener("keydown",$=>{$.key==="Enter"&&m()}),b(),Object.assign(i,{setValue:$=>{const P=Ji($);if(!P){a.setAttribute("data-invalid","true");return}a.removeAttribute("data-invalid"),v(P,!1)},destroy:()=>{i.remove()}});function m(){const $=Ji(a.value);if(!$){a.setAttribute("data-invalid","true");return}a.removeAttribute("data-invalid"),v($)}function x($,P){var C;u!==$&&(u=$,b(),(C=t.onChange)==null||C.call(t,fa(f,u)))}function v($,P=!0){var C;if(zD(f,$)){b();return}f=$,b(),P&&((C=t.onChange)==null||C.call(t,fa(f,u)))}function b(){a.value=fa(f,u),w(),_()}function w(){const $=Z3(f);p.forEach(P=>{P.dataset.colorKey===$?P.setAttribute("data-active","true"):P.removeAttribute("data-active")})}function _(){u==="rgba"?c.setAttribute("data-format","rgba"):c.setAttribute("data-format","hexa")}}function Ji(t){var e;if(!t)return;const n=on(t);if(!n||typeof n.r!="number")return;const r=n;return{r:Th(r.r),g:Th(r.g),b:Th(r.b),a:K3((e=r.alpha)!=null?e:1)}}function fa(t,e){return e==="rgba"?LD(t):U3(t)}function U3(t){const e=pa(t.r),n=pa(t.g),r=pa(t.b),i=t.a<1?pa(Math.round(t.a*255)):"";return`#${e}${n}${r}${i}`}function LD(t){const e=HD(t.a);return`rgba(${t.r}, ${t.g}, ${t.b}, ${e})`}function Z3(t){return U3(t).toLowerCase()}function zD(t,e){return t.r===e.r&&t.g===e.g&&t.b===e.b&&t.a===e.a}function K3(t){return Number.isNaN(t)?0:Math.min(1,Math.max(0,t))}function Th(t){if(Number.isNaN(t))return 0;const e=t<=1?t*255:t;return Math.round(Math.min(255,Math.max(0,e)))}function pa(t){return t.toString(16).padStart(2,"0")}function HD(t){const e=Math.round(K3(t)*100)/100;return e===1?"1":e===0?"0":e.toString()}function Q3(t){const e=document.createElement("span");return e.textContent=t,e.classList.add(ua),e}function RD(){ln(AD,`
185
- .${gn} {
184
+ `)}const Rn="infographic-color-picker",rO=`${Rn}__swatches`,Lc=`${Rn}__swatch`,iO=`${Rn}__controls`,zc=`${Rn}__input`,oO=`${Rn}__format`,Xr=`${Rn}__format-switch`,X1=`${Rn}__format-switch-knob`,Nc=`${Rn}__format-switch-label`,Mre="infographic-color-picker-style",Ere="#1f1f1f",Ire=["#000000","#1f1f1f","#434343","#595959","#8c8c8c","#bfbfbf","#d9d9d9","#f0f0f0","#ffffff","#1677ff","#2f54eb","#91caff","#13c2c2","#36cfc9","#52c41a","#73d13d","#fadb14","#ffd666","#fa8c16","#fa541c","#f5222d","#ff7875","#eb2f96","#ffadd2","#722ed1","#9254de","rgba(0, 0, 0, 0.65)","rgba(255, 255, 255, 0.85)"];function aO(e){var t,n,r;if(typeof document=="undefined")throw new Error("ColorPicker can only be used in the browser.");Rre();const i=document.createElement("div");i.classList.add(Rn);const o=document.createElement("div");o.classList.add(rO),i.appendChild(o);const a=document.createElement("div");a.classList.add(iO),i.appendChild(a);const s=document.createElement("input");s.type="text",s.spellcheck=!1,s.classList.add(zc),a.appendChild(s);const c=document.createElement("div");c.classList.add(oO),a.appendChild(c);const l=document.createElement("button");l.type="button",l.classList.add(Xr),l.appendChild(uO("HEXA"));const u=document.createElement("span");u.classList.add(X1),l.appendChild(u),l.appendChild(uO("RGBA")),c.appendChild(l);let h="hexa",d=(n=(t=Uo(e.value))!=null?t:Uo(Ere))!=null?n:{r:31,g:31,b:31,a:1};const f=[];return((r=e.swatches)!=null&&r.length?e.swatches:Ire).forEach(P=>{const $=Uo(P);if(!$)return;const C=document.createElement("button");C.type="button",C.classList.add(Lc),C.style.setProperty("--swatch-color",Hc($,"rgba")),C.dataset.colorKey=cO($),C.addEventListener("click",()=>{b($)}),o.appendChild(C),f.push(C)}),l.addEventListener("click",()=>v(h==="hexa"?"rgba":"hexa")),s.addEventListener("change",m),s.addEventListener("keydown",P=>{P.key==="Enter"&&m()}),_(),Object.assign(i,{setValue:P=>{const $=Uo(P);if(!$){s.setAttribute("data-invalid","true");return}s.removeAttribute("data-invalid"),b($,!1)},destroy:()=>{i.remove()}});function m(){const P=Uo(s.value);if(!P){s.setAttribute("data-invalid","true");return}s.removeAttribute("data-invalid"),b(P)}function v(P,$){var C;h!==P&&(h=P,_(),(C=e.onChange)==null||C.call(e,Hc(d,h)))}function b(P,$=!0){var C;if(Tre(d,P)){_();return}d=P,_(),$&&((C=e.onChange)==null||C.call(e,Hc(d,h)))}function _(){s.value=Hc(d,h),x(),w()}function x(){const P=cO(d);f.forEach($=>{$.dataset.colorKey===P?$.setAttribute("data-active","true"):$.removeAttribute("data-active")})}function w(){h==="rgba"?l.setAttribute("data-format","rgba"):l.setAttribute("data-format","hexa")}}function Uo(e){var t;if(!e)return;const n=$n(e);if(!n||typeof n.r!="number")return;const r=n;return{r:U1(r.r),g:U1(r.g),b:U1(r.b),a:lO((t=r.alpha)!=null?t:1)}}function Hc(e,t){return t==="rgba"?Are(e):sO(e)}function sO(e){const t=Dc(e.r),n=Dc(e.g),r=Dc(e.b),i=e.a<1?Dc(Math.round(e.a*255)):"";return`#${t}${n}${r}${i}`}function Are(e){const t=kre(e.a);return`rgba(${e.r}, ${e.g}, ${e.b}, ${t})`}function cO(e){return sO(e).toLowerCase()}function Tre(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}function lO(e){return Number.isNaN(e)?0:Math.min(1,Math.max(0,e))}function U1(e){if(Number.isNaN(e))return 0;const t=e<=1?e*255:e;return Math.round(Math.min(255,Math.max(0,t)))}function Dc(e){return e.toString(16).padStart(2,"0")}function kre(e){const t=Math.round(lO(e)*100)/100;return t===1?"1":t===0?"0":t.toString()}function uO(e){const t=document.createElement("span");return t.textContent=e,t.classList.add(Nc),t}function Rre(){Sn(Mre,`
185
+ .${Rn} {
186
186
  width: 240px;
187
187
  padding: 10px;
188
188
  box-sizing: border-box;
189
189
  }
190
- .${V3} {
190
+ .${rO} {
191
191
  display: grid;
192
192
  grid-template-columns: repeat(auto-fit, 26px);
193
193
  gap: 6px;
194
194
  margin-bottom: 10px;
195
195
  }
196
- .${ha} {
196
+ .${Lc} {
197
197
  width: 24px;
198
198
  height: 24px;
199
199
  border-radius: 50%;
@@ -204,19 +204,19 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
204
204
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
205
205
  transition: transform 0.15s ease, box-shadow 0.15s ease;
206
206
  }
207
- .${ha}[data-active="true"] {
207
+ .${Lc}[data-active="true"] {
208
208
  box-shadow: 0 0 0 2px #1677ff;
209
209
  transform: translateY(-1px);
210
210
  }
211
- .${ha}:hover {
211
+ .${Lc}:hover {
212
212
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
213
213
  }
214
- .${X3} {
214
+ .${iO} {
215
215
  display: flex;
216
216
  align-items: center;
217
217
  gap: 6px;
218
218
  }
219
- .${da} {
219
+ .${zc} {
220
220
  flex: 1;
221
221
  min-width: 0;
222
222
  height: 30px;
@@ -232,19 +232,19 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
232
232
  outline: none;
233
233
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
234
234
  }
235
- .${da}:focus {
235
+ .${zc}:focus {
236
236
  border-color: #1677ff;
237
237
  background: #ffffff;
238
238
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
239
239
  }
240
- .${da}[data-invalid="true"] {
240
+ .${zc}[data-invalid="true"] {
241
241
  border-color: #ff4d4f;
242
242
  box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.12);
243
243
  }
244
- .${G3} {
244
+ .${oO} {
245
245
  display: inline-flex;
246
246
  }
247
- .${vr} {
247
+ .${Xr} {
248
248
  position: relative;
249
249
  display: grid;
250
250
  grid-template-columns: 1fr 1fr;
@@ -259,15 +259,15 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
259
259
  overflow: hidden;
260
260
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
261
261
  }
262
- .${vr}:hover {
262
+ .${Xr}:hover {
263
263
  background: #ededed;
264
264
  }
265
- .${vr}:focus-visible {
265
+ .${Xr}:focus-visible {
266
266
  outline: none;
267
267
  border-color: #1677ff;
268
268
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
269
269
  }
270
- .${Ah} {
270
+ .${X1} {
271
271
  position: absolute;
272
272
  inset: 0;
273
273
  width: 50%;
@@ -276,10 +276,10 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
276
276
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
277
277
  transition: transform 0.2s ease;
278
278
  }
279
- .${vr}[data-format="rgba"] .${Ah} {
279
+ .${Xr}[data-format="rgba"] .${X1} {
280
280
  transform: translateX(100%);
281
281
  }
282
- .${ua} {
282
+ .${Nc} {
283
283
  position: relative;
284
284
  z-index: 1;
285
285
  text-align: center;
@@ -287,19 +287,19 @@ ${o(c)}}`}return i.push("type InfographicType = {"),n.includes("title")&&(i.push
287
287
  color: #434343;
288
288
  user-select: none;
289
289
  }
290
- .${vr}[data-format="hexa"] .${ua}:first-child,
291
- .${vr}[data-format="rgba"] .${ua}:last-child {
290
+ .${Xr}[data-format="hexa"] .${Nc}:first-child,
291
+ .${Xr}[data-format="rgba"] .${Nc}:last-child {
292
292
  color: #ffffff;
293
293
  }
294
- `)}const be=(t,{viewBox:e="0 0 1024 1024",size:n="1.5em"}={})=>({fill:r="currentColor"}={})=>{const i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="${e}" width="${n}" height="${n}" fill="${r}">
295
- ${t.trim()}
296
- </svg>`;return document.createRange().createContextualFragment(i).firstElementChild},Pn={fontFamily:be('<path d="M236.992 938.688H145.088L469.312 128h85.376l324.224 810.688h-91.904l-102.4-256H339.392l-102.4 256z m136.512-341.376h276.992L512 251.072l-138.496 346.24z"></path>',{size:"1.2em"}),fontSize:be('<path d="M479.829333 640H202.837333l-85.333333 213.333333H25.6L298.666667 170.666667h85.333333l273.066667 682.666666h-91.904l-85.333334-213.333333z m-34.133333-85.333333L341.333333 293.76 236.970667 554.666667h208.725333zM896 534.826667V512h85.333333v341.333333h-85.333333v-22.826666a170.666667 170.666667 0 1 1 0-295.68zM810.666667 768a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z"></path>',{size:"1.2em"}),align:be('<path d="M832 96c53.02 0 96 42.98 96 96v640c0 53.02-42.98 96-96 96H192c-53.02 0-96-42.98-96-96V192c0-53.02 42.98-96 96-96z m0 64H192c-17.673 0-32 14.327-32 32v640c0 17.673 14.327 32 32 32h640c17.673 0 32-14.327 32-32V192c0-17.673-14.327-32-32-32zM725.333 672c17.673 0 32 14.327 32 32 0 17.496-14.041 31.713-31.47 31.996l-0.53 0.004H298.667c-17.673 0-32-14.327-32-32 0-17.496 14.041-31.713 31.47-31.996l0.53-0.004h426.666z m0-192c17.673 0 32 14.327 32 32 0 17.496-14.041 31.713-31.47 31.996l-0.53 0.004H298.667c-17.673 0-32-14.327-32-32 0-17.496 14.041-31.713 31.47-31.996l0.53-0.004h426.666z m0-192c17.673 0 32 14.327 32 32 0 17.496-14.041 31.713-31.47 31.996l-0.53 0.004H298.667c-17.673 0-32-14.327-32-32 0-17.496 14.041-31.713 31.47-31.996l0.53-0.004h426.666z"></path>'),alignTop:be('<path d="M896 859.329c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.995l-0.53 0.005H128c-17.673 0-32-14.327-32-32 0-17.497 14.042-31.713 31.47-31.996l0.53-0.004h768z m0-121.533c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768zM512.45 91.003L512 91a32.632 32.632 0 0 1 1.653 0.042l0.134 0.008c3.447 0.189 6.75 0.924 9.82 2.12l0.198 0.078a16.118 16.118 0 0 1 0.485 0.197l0.11 0.046a31.82 31.82 0 0 1 8.546 5.315l0.12 0.105a31.066 31.066 0 0 1 1.189 1.095l0.08 0.078 0.235 0.23 0.062 0.063 128 128.055c12.494 12.5 12.49 32.761-0.01 45.255-12.374 12.37-32.356 12.489-44.877 0.362l-0.377-0.372L544 200.28v413.598c0 17.673-14.327 32-32 32-17.496 0-31.713-14.042-31.996-31.471l-0.004-0.53V200.278l-73.368 73.4c-12.369 12.375-32.35 12.503-44.877 0.381l-0.378-0.37c-12.374-12.37-12.502-32.352-0.38-44.878l0.37-0.378 128-128.055 0.181-0.178a31.875 31.875 0 0 1 9.5-6.47l0.105-0.046c0.116-0.051 0.233-0.101 0.35-0.15 0.054-0.024 0.11-0.047 0.165-0.07a28.198 28.198 0 0 1 0.536-0.219l0.157-0.061a31.816 31.816 0 0 1 9.356-2.103l0.113-0.007c0.147-0.01 0.294-0.02 0.442-0.027l0.028-0.001 0.39-0.019 0.144-0.005a23.911 23.911 0 0 1 0.712-0.018c0.3-0.004 0.602-0.004 0.904 0z"></path>'),alignRight:be('<path d="M896 800.339c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.995l-0.53 0.005H298.667c-17.673 0-32-14.327-32-32 0-17.497 14.041-31.713 31.47-31.996l0.53-0.004H896z m0-213.226c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.996l0.53-0.004h768z m0-213.226c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.996l-0.53 0.004H298.667c-17.673 0-32-14.327-32-32 0-17.496 14.041-31.713 31.47-31.996l0.53-0.004H896z m0-213.226c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768z"></path>'),alignBottom:be('<path d="M896 859.329c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.995l-0.53 0.005H128c-17.673 0-32-14.327-32-32 0-17.497 14.042-31.713 31.47-31.996l0.53-0.004h768z m0-121.533c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768zM490.505 637.584l-0.127-0.117a32.174 32.174 0 0 1-0.633-0.596l-0.098-0.096-0.217-0.213-0.062-0.063-128-128.055c-12.494-12.499-12.49-32.76 0.01-45.254 12.374-12.37 32.356-12.489 44.877-0.362l0.377 0.371L480 536.598V123c0-17.673 14.327-32 32-32 17.496 0 31.713 14.042 31.996 31.47l0.004 0.53v413.597l73.368-73.398c12.494-12.5 32.755-12.503 45.255-0.01 12.374 12.37 12.502 32.352 0.38 44.878l-0.37 0.377-128 128.055c-0.121 0.12-0.238 0.236-0.356 0.35l0.355-0.35a31.922 31.922 0 0 1-9.68 6.649l-0.09 0.039a29.917 29.917 0 0 1-1.241 0.514 31.816 31.816 0 0 1-9.338 2.095l-0.113 0.008c-0.147 0.01-0.294 0.019-0.442 0.027h-0.028c-0.13 0.008-0.26 0.014-0.39 0.02l-0.144 0.005a23.92 23.92 0 0 1-0.796 0.019 33.927 33.927 0 0 1-0.37 0.002h-0.13l-0.236-0.002 0.366 0.002a32.633 32.633 0 0 1-1.153-0.02l-0.129-0.006a31.108 31.108 0 0 1-0.876-0.046l-0.105-0.008a31.811 31.811 0 0 1-8.926-1.931l-0.089-0.034a21.022 21.022 0 0 1-0.362-0.138l-0.098-0.04a22.132 22.132 0 0 1-0.746-0.304l-0.219-0.093-0.209-0.092a31.812 31.812 0 0 1-8.034-5.094l-0.12-0.105-0.173-0.153-0.151-0.136-0.105-0.093z"></path>'),alignLeft:be('<path d="M725.333 800.339c17.673 0 32 14.327 32 32 0 17.496-14.041 31.713-31.47 31.995l-0.53 0.005H128c-17.673 0-32-14.327-32-32 0-17.497 14.042-31.713 31.47-31.996l0.53-0.004h597.333zM896 587.113c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.996l0.53-0.004h768zM725.333 373.887c17.673 0 32 14.327 32 32 0 17.496-14.041 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.996l0.53-0.004h597.333zM896 160.661c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768z"></path>'),alignCenter:be('<path d="M768 800.339c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.995l-0.53 0.005H256c-17.673 0-32-14.327-32-32 0-17.497 14.042-31.713 31.47-31.996l0.53-0.004h512z m128-213.226c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.996l0.53-0.004h768zM768 373.887c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.996l-0.53 0.004H256c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.996l0.53-0.004h512z m128-213.226c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768z"></path>'),alignMiddle:be('<path d="M534.246 617.448l0.377 0.371 128 127.952c12.5 12.494 12.503 32.755 0.009 45.255-12.37 12.374-32.352 12.501-44.878 0.38l-0.377-0.372-73.38-73.352V939c0 17.673-14.326 32-32 32-17.496 0-31.712-14.042-31.995-31.47l-0.004-0.53-0.001-221.314-73.374 73.348c-12.374 12.37-32.356 12.49-44.878 0.363l-0.377-0.371c-12.37-12.375-12.49-32.356-0.362-44.878l0.37-0.377 128-127.952c12.372-12.366 32.347-12.49 44.87-0.37zM896 480.508c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768zM511.998 54c17.496 0 31.713 14.042 31.996 31.47l0.004 0.53-0.001 221.314 73.38-73.349c12.499-12.494 32.76-12.49 45.255 0.009 12.37 12.374 12.49 32.356 0.362 44.878l-0.37 0.377-128 127.951c-12.372 12.366-32.347 12.49-44.87 0.371l-0.377-0.37-128-127.952c-12.5-12.495-12.503-32.756-0.009-45.255 12.37-12.374 32.352-12.502 44.878-0.38l0.377 0.371 73.374 73.346V86c0-17.673 14.328-32 32-32z"></path>')},Cn={align:be('<path d="M555.188 715.059c17.673 0 32 14.327 32 32V875c0 17.673-14.327 32-32 32H171c-17.673 0-32-14.327-32-32V747.059c0-17.673 14.327-32 32-32z m-32.001 63.999H203V843h320.187v-63.942zM854 416.529c17.673 0 32 14.327 32 32v127.942c0 17.673-14.327 32-32 32H171c-17.673 0-32-14.327-32-32V448.529c0-17.673 14.327-32 32-32z m-32 64H203v63.941h619v-63.941zM683.25 118c17.673 0 32 14.327 32 32v127.941c0 17.673-14.327 32-32 32H171c-17.673 0-32-14.327-32-32V150c0-17.673 14.327-32 32-32z m-32 64H203v63.941h448.25V182z"></path>'),alignTop:be(`
297
- <path d="M661.333 272.411c17.673 0 32 14.327 32 32V902c0 17.673-14.327 32-32 32H362.667c-17.673 0-32-14.327-32-32V304.411c0-17.673 14.327-32 32-32z m-32 63.999H394.666V870h234.667V336.41zM896 101.671c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768z" />`),alignRight:be('<path d="M891.329 96c17.496 0 31.713 14.042 31.995 31.47l0.005 0.53v768c0 17.673-14.327 32-32 32-17.497 0-31.713-14.042-31.996-31.47l-0.004-0.53V128c0-17.673 14.327-32 32-32z m-170.74 234.667c17.673 0 32 14.327 32 32v298.666c0 17.673-14.327 32-32 32H123c-17.673 0-32-14.327-32-32V362.667c0-17.673 14.327-32 32-32z m-32 63.999H155v234.667h533.589V394.666z" />'),alignBottom:be('<path d="M896 859.329c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.995l-0.53 0.005H128c-17.673 0-32-14.327-32-32 0-17.497 14.042-31.713 31.47-31.996l0.53-0.004h768zM661.333 91c17.673 0 32 14.327 32 32v597.589c0 17.673-14.327 32-32 32H362.667c-17.673 0-32-14.327-32-32V123c0-17.673 14.327-32 32-32z m-32 64H394.666v533.589h234.667V155z" />'),alignLeft:be('<path d="M133.671 96c17.497 0 31.713 14.042 31.996 31.47l0.004 0.53v768c0 17.673-14.327 32-32 32-17.496 0-31.713-14.042-31.995-31.47l-0.005-0.53V128c0-17.673 14.327-32 32-32zM902 330.667c17.673 0 32 14.327 32 32v298.666c0 17.673-14.327 32-32 32H304.411c-17.673 0-32-14.327-32-32V362.667c0-17.673 14.327-32 32-32z m-32.001 63.999H336.41v234.667h533.589V394.666z" />'),alignH:be('<path d="M512.5 96c17.496 0 31.713 14.042 31.996 31.47l0.004 0.53v202.666H875c17.496 0 31.713 14.042 31.996 31.471l0.004 0.53v298.666c0 17.673-14.327 32-32 32H544.5V896c0 17.673-14.327 32-32 32-17.496 0-31.713-14.042-31.996-31.47l-0.004-0.53V693.333H150c-17.496 0-31.713-14.041-31.996-31.47l-0.004-0.53V362.667c0-17.673 14.327-32 32-32l330.5-0.001V128c0-17.673 14.327-32 32-32z m-32 298.666H182v234.667h298.5V394.666z m362.5 0H544.5v234.667H843V394.666z" />'),alignV:be('<path d="M661.333 118c17.673 0 32 14.327 32 32v330.5H896c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.996l-0.53 0.004H693.333V875c0 17.496-14.041 31.713-31.47 31.996l-0.53 0.004H362.667c-17.673 0-32-14.327-32-32l-0.001-330.5H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.996l0.53-0.004h202.666V150c0-17.496 14.042-31.713 31.471-31.996l0.53-0.004z m-32.001 426.5H394.665l0.001 298.5h234.667l-0.001-298.5z m0.001-362.5H394.666l-0.001 298.5h234.667l0.001-298.5z" />'),distributeH:be('<path d="M853.333 96c17.497 0 31.713 14.042 31.996 31.47l0.004 0.53v768c0 17.673-14.327 32-32 32-17.496 0-31.713-14.042-31.995-31.47l-0.005-0.53V128c0-17.673 14.327-32 32-32z m-682.666 0c17.496 0 31.713 14.042 31.995 31.47l0.005 0.53v768c0 17.673-14.327 32-32 32-17.497 0-31.713-14.042-31.996-31.47l-0.004-0.53V128c0-17.673 14.327-32 32-32zM640 181.333c17.673 0 32 14.327 32 32v597.334c0 17.673-14.327 32-32 32H384c-17.673 0-32-14.327-32-32V213.333c0-17.673 14.327-32 32-32z m-32 64H416v533.333h192V245.333z" />'),distributeV:be('<path d="M896 821.333c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768zM810.667 352c17.673 0 32 14.327 32 32v256c0 17.673-14.327 32-32 32H213.333c-17.673 0-32-14.327-32-32V384c0-17.673 14.327-32 32-32z m-32 64H245.334v192h533.333V416zM896 138.667c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.995l-0.53 0.005H128c-17.673 0-32-14.327-32-32 0-17.497 14.042-31.713 31.47-31.996l0.53-0.004h768z" />')},ga="infographic-edit-popover",ue=`${ga}__content`,Qe=`${ga}__arrow`,DD="infographic-edit-popover-style";function Ur(t){var e,n,r,i,o,s,a,l;ND();const c=(e=t.placement)!=null?e:"top",h=(n=t.closeOnOutsideClick)!=null?n:!0,u=Array.isArray(t.trigger)?t.trigger:[t.trigger||"hover"],f=(r=t.mouseEnterDelay)!=null?r:50,p=(i=t.mouseLeaveDelay)!=null?i:150,g=(o=t.offset)!=null?o:8,y=8,m=7,x=typeof t.padding=="number"?`${t.padding}px`:(s=t.padding)!=null?s:"4px",v=document.createElement("div");v.classList.add(ga);const b=(a=t.target)!=null?a:document.createElement("div");v.appendChild(b);const w=()=>{const V=typeof t.getContainer=="function"?t.getContainer():t.getContainer;return V!=null?V:document.body},_=document.createElement("div");_.classList.add(ue),gi(_,Sa),_.dataset.placement=Array.isArray(c)?c[0]:c,_.setAttribute("data-open",String(!!t.open)),_.style.setProperty("--popover-gap",`${g}px`),_.style.setProperty("--popover-arrow-size",`${y}px`),_.style.setProperty("--popover-arrow-inner-size",`${m}px`);const $=w(),P=$!==v,C=document.createElement("div");C.classList.add(Qe),_.appendChild(C);const T=document.createElement("div");T.classList.add(`${ue}-body`),T.style.padding=x,_.appendChild(T),$.appendChild(_);let E=!!t.open,S=Array.isArray(c)?c:[c],R=(l=S[0])!=null?l:"top";const O=()=>{var V;const G=b.getBoundingClientRect(),Z=_.getBoundingClientRect(),K=window.scrollX||document.documentElement.scrollLeft,it=window.scrollY||document.documentElement.scrollTop,Q=document.documentElement.clientWidth,at=document.documentElement.clientHeight;let ht=0,nt=0;const J=gt=>{switch(gt){case"top":return{left:K+G.left+G.width/2-Z.width/2,top:it+G.top-Z.height-g};case"bottom":return{left:K+G.left+G.width/2-Z.width/2,top:it+G.bottom+g};case"left":return{left:K+G.left-Z.width-g,top:it+G.top+G.height/2-Z.height/2};default:return{left:K+G.right+g,top:it+G.top+G.height/2-Z.height/2}}},tt=(gt,ut)=>gt>=K&&ut>=it&&gt+Z.width<=K+Q&&ut+Z.height<=it+at;let st=(V=S[0])!=null?V:"top",vt=J(st);for(const gt of S){const ut=J(gt);if(vt=ut,tt(ut.left,ut.top)){st=gt;break}}R=st,_.dataset.placement=R,P&&({left:ht,top:nt}=vt,_.style.left=`${ht}px`,_.style.top=`${nt}px`,_.style.right="auto",_.style.bottom="auto",_.style.transform="translate(0, 0)")};P&&(_.style.position="absolute",window.addEventListener("resize",O),window.addEventListener("scroll",O,!0));const A=V=>{let G=V;typeof G=="function"&&(G=G()),T.innerHTML="",G instanceof HTMLElement?T.appendChild(G):T.textContent=G!=null?G:"",O()},F=V=>{var G;S=Array.isArray(V)?V:[V],R=(G=S[0])!=null?G:"top",O()},L=V=>{E=V,_.setAttribute("data-open",String(E)),E&&O(),E&&h?document.addEventListener("click",k,!0):document.removeEventListener("click",k,!0)},D=()=>L(!E),k=V=>{const G=V.target;!v.contains(G)&&(!P||!_.contains(G))&&L(!1)};let N,j;const X=u.includes("hover"),z=u.includes("click"),M=()=>{N!==void 0&&(clearTimeout(N),N=void 0),j!==void 0&&(clearTimeout(j),j=void 0)},H=()=>{X&&(M(),N=window.setTimeout(()=>L(!0),f))},B=()=>{X&&(M(),j=window.setTimeout(()=>L(!1),p))};return z&&b.addEventListener("click",D),X&&(v.addEventListener("mouseenter",H),v.addEventListener("mouseleave",B),_.addEventListener("mouseenter",H),_.addEventListener("mouseleave",B)),A(t.content),F(c),L(E),Object.assign(v,{setOpen:L,toggle:D,setContent:A,setPlacement:F,destroy:()=>{document.removeEventListener("click",k,!0),z&&b.removeEventListener("click",D),X&&(v.removeEventListener("mouseenter",H),v.removeEventListener("mouseleave",B),_.removeEventListener("mouseenter",H),_.removeEventListener("mouseleave",B),M()),P&&(window.removeEventListener("resize",O),window.removeEventListener("scroll",O,!0),_.remove()),v.remove()}})}function ND(){ln(DD,`
298
- .${ga} {
294
+ `)}const zt=(e,{viewBox:t="0 0 1024 1024",size:n="1.5em"}={})=>({fill:r="currentColor"}={})=>{const i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="${t}" width="${n}" height="${n}" fill="${r}">
295
+ ${e.trim()}
296
+ </svg>`;return document.createRange().createContextualFragment(i).firstElementChild},Yn={fontFamily:zt('<path d="M236.992 938.688H145.088L469.312 128h85.376l324.224 810.688h-91.904l-102.4-256H339.392l-102.4 256z m136.512-341.376h276.992L512 251.072l-138.496 346.24z"></path>',{size:"1.2em"}),fontSize:zt('<path d="M479.829333 640H202.837333l-85.333333 213.333333H25.6L298.666667 170.666667h85.333333l273.066667 682.666666h-91.904l-85.333334-213.333333z m-34.133333-85.333333L341.333333 293.76 236.970667 554.666667h208.725333zM896 534.826667V512h85.333333v341.333333h-85.333333v-22.826666a170.666667 170.666667 0 1 1 0-295.68zM810.666667 768a85.333333 85.333333 0 1 0 0-170.666667 85.333333 85.333333 0 0 0 0 170.666667z"></path>',{size:"1.2em"}),align:zt('<path d="M832 96c53.02 0 96 42.98 96 96v640c0 53.02-42.98 96-96 96H192c-53.02 0-96-42.98-96-96V192c0-53.02 42.98-96 96-96z m0 64H192c-17.673 0-32 14.327-32 32v640c0 17.673 14.327 32 32 32h640c17.673 0 32-14.327 32-32V192c0-17.673-14.327-32-32-32zM725.333 672c17.673 0 32 14.327 32 32 0 17.496-14.041 31.713-31.47 31.996l-0.53 0.004H298.667c-17.673 0-32-14.327-32-32 0-17.496 14.041-31.713 31.47-31.996l0.53-0.004h426.666z m0-192c17.673 0 32 14.327 32 32 0 17.496-14.041 31.713-31.47 31.996l-0.53 0.004H298.667c-17.673 0-32-14.327-32-32 0-17.496 14.041-31.713 31.47-31.996l0.53-0.004h426.666z m0-192c17.673 0 32 14.327 32 32 0 17.496-14.041 31.713-31.47 31.996l-0.53 0.004H298.667c-17.673 0-32-14.327-32-32 0-17.496 14.041-31.713 31.47-31.996l0.53-0.004h426.666z"></path>'),alignTop:zt('<path d="M896 859.329c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.995l-0.53 0.005H128c-17.673 0-32-14.327-32-32 0-17.497 14.042-31.713 31.47-31.996l0.53-0.004h768z m0-121.533c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768zM512.45 91.003L512 91a32.632 32.632 0 0 1 1.653 0.042l0.134 0.008c3.447 0.189 6.75 0.924 9.82 2.12l0.198 0.078a16.118 16.118 0 0 1 0.485 0.197l0.11 0.046a31.82 31.82 0 0 1 8.546 5.315l0.12 0.105a31.066 31.066 0 0 1 1.189 1.095l0.08 0.078 0.235 0.23 0.062 0.063 128 128.055c12.494 12.5 12.49 32.761-0.01 45.255-12.374 12.37-32.356 12.489-44.877 0.362l-0.377-0.372L544 200.28v413.598c0 17.673-14.327 32-32 32-17.496 0-31.713-14.042-31.996-31.471l-0.004-0.53V200.278l-73.368 73.4c-12.369 12.375-32.35 12.503-44.877 0.381l-0.378-0.37c-12.374-12.37-12.502-32.352-0.38-44.878l0.37-0.378 128-128.055 0.181-0.178a31.875 31.875 0 0 1 9.5-6.47l0.105-0.046c0.116-0.051 0.233-0.101 0.35-0.15 0.054-0.024 0.11-0.047 0.165-0.07a28.198 28.198 0 0 1 0.536-0.219l0.157-0.061a31.816 31.816 0 0 1 9.356-2.103l0.113-0.007c0.147-0.01 0.294-0.02 0.442-0.027l0.028-0.001 0.39-0.019 0.144-0.005a23.911 23.911 0 0 1 0.712-0.018c0.3-0.004 0.602-0.004 0.904 0z"></path>'),alignRight:zt('<path d="M896 800.339c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.995l-0.53 0.005H298.667c-17.673 0-32-14.327-32-32 0-17.497 14.041-31.713 31.47-31.996l0.53-0.004H896z m0-213.226c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.996l0.53-0.004h768z m0-213.226c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.996l-0.53 0.004H298.667c-17.673 0-32-14.327-32-32 0-17.496 14.041-31.713 31.47-31.996l0.53-0.004H896z m0-213.226c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768z"></path>'),alignBottom:zt('<path d="M896 859.329c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.995l-0.53 0.005H128c-17.673 0-32-14.327-32-32 0-17.497 14.042-31.713 31.47-31.996l0.53-0.004h768z m0-121.533c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768zM490.505 637.584l-0.127-0.117a32.174 32.174 0 0 1-0.633-0.596l-0.098-0.096-0.217-0.213-0.062-0.063-128-128.055c-12.494-12.499-12.49-32.76 0.01-45.254 12.374-12.37 32.356-12.489 44.877-0.362l0.377 0.371L480 536.598V123c0-17.673 14.327-32 32-32 17.496 0 31.713 14.042 31.996 31.47l0.004 0.53v413.597l73.368-73.398c12.494-12.5 32.755-12.503 45.255-0.01 12.374 12.37 12.502 32.352 0.38 44.878l-0.37 0.377-128 128.055c-0.121 0.12-0.238 0.236-0.356 0.35l0.355-0.35a31.922 31.922 0 0 1-9.68 6.649l-0.09 0.039a29.917 29.917 0 0 1-1.241 0.514 31.816 31.816 0 0 1-9.338 2.095l-0.113 0.008c-0.147 0.01-0.294 0.019-0.442 0.027h-0.028c-0.13 0.008-0.26 0.014-0.39 0.02l-0.144 0.005a23.92 23.92 0 0 1-0.796 0.019 33.927 33.927 0 0 1-0.37 0.002h-0.13l-0.236-0.002 0.366 0.002a32.633 32.633 0 0 1-1.153-0.02l-0.129-0.006a31.108 31.108 0 0 1-0.876-0.046l-0.105-0.008a31.811 31.811 0 0 1-8.926-1.931l-0.089-0.034a21.022 21.022 0 0 1-0.362-0.138l-0.098-0.04a22.132 22.132 0 0 1-0.746-0.304l-0.219-0.093-0.209-0.092a31.812 31.812 0 0 1-8.034-5.094l-0.12-0.105-0.173-0.153-0.151-0.136-0.105-0.093z"></path>'),alignLeft:zt('<path d="M725.333 800.339c17.673 0 32 14.327 32 32 0 17.496-14.041 31.713-31.47 31.995l-0.53 0.005H128c-17.673 0-32-14.327-32-32 0-17.497 14.042-31.713 31.47-31.996l0.53-0.004h597.333zM896 587.113c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.996l0.53-0.004h768zM725.333 373.887c17.673 0 32 14.327 32 32 0 17.496-14.041 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.996l0.53-0.004h597.333zM896 160.661c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768z"></path>'),alignCenter:zt('<path d="M768 800.339c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.995l-0.53 0.005H256c-17.673 0-32-14.327-32-32 0-17.497 14.042-31.713 31.47-31.996l0.53-0.004h512z m128-213.226c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.996l0.53-0.004h768zM768 373.887c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.996l-0.53 0.004H256c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.996l0.53-0.004h512z m128-213.226c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768z"></path>'),alignMiddle:zt('<path d="M534.246 617.448l0.377 0.371 128 127.952c12.5 12.494 12.503 32.755 0.009 45.255-12.37 12.374-32.352 12.501-44.878 0.38l-0.377-0.372-73.38-73.352V939c0 17.673-14.326 32-32 32-17.496 0-31.712-14.042-31.995-31.47l-0.004-0.53-0.001-221.314-73.374 73.348c-12.374 12.37-32.356 12.49-44.878 0.363l-0.377-0.371c-12.37-12.375-12.49-32.356-0.362-44.878l0.37-0.377 128-127.952c12.372-12.366 32.347-12.49 44.87-0.37zM896 480.508c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768zM511.998 54c17.496 0 31.713 14.042 31.996 31.47l0.004 0.53-0.001 221.314 73.38-73.349c12.499-12.494 32.76-12.49 45.255 0.009 12.37 12.374 12.49 32.356 0.362 44.878l-0.37 0.377-128 127.951c-12.372 12.366-32.347 12.49-44.87 0.371l-0.377-0.37-128-127.952c-12.5-12.495-12.503-32.756-0.009-45.255 12.37-12.374 32.352-12.502 44.878-0.38l0.377 0.371 73.374 73.346V86c0-17.673 14.328-32 32-32z"></path>')},Xn={align:zt('<path d="M555.188 715.059c17.673 0 32 14.327 32 32V875c0 17.673-14.327 32-32 32H171c-17.673 0-32-14.327-32-32V747.059c0-17.673 14.327-32 32-32z m-32.001 63.999H203V843h320.187v-63.942zM854 416.529c17.673 0 32 14.327 32 32v127.942c0 17.673-14.327 32-32 32H171c-17.673 0-32-14.327-32-32V448.529c0-17.673 14.327-32 32-32z m-32 64H203v63.941h619v-63.941zM683.25 118c17.673 0 32 14.327 32 32v127.941c0 17.673-14.327 32-32 32H171c-17.673 0-32-14.327-32-32V150c0-17.673 14.327-32 32-32z m-32 64H203v63.941h448.25V182z"></path>'),alignTop:zt(`
297
+ <path d="M661.333 272.411c17.673 0 32 14.327 32 32V902c0 17.673-14.327 32-32 32H362.667c-17.673 0-32-14.327-32-32V304.411c0-17.673 14.327-32 32-32z m-32 63.999H394.666V870h234.667V336.41zM896 101.671c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768z" />`),alignRight:zt('<path d="M891.329 96c17.496 0 31.713 14.042 31.995 31.47l0.005 0.53v768c0 17.673-14.327 32-32 32-17.497 0-31.713-14.042-31.996-31.47l-0.004-0.53V128c0-17.673 14.327-32 32-32z m-170.74 234.667c17.673 0 32 14.327 32 32v298.666c0 17.673-14.327 32-32 32H123c-17.673 0-32-14.327-32-32V362.667c0-17.673 14.327-32 32-32z m-32 63.999H155v234.667h533.589V394.666z" />'),alignBottom:zt('<path d="M896 859.329c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.995l-0.53 0.005H128c-17.673 0-32-14.327-32-32 0-17.497 14.042-31.713 31.47-31.996l0.53-0.004h768zM661.333 91c17.673 0 32 14.327 32 32v597.589c0 17.673-14.327 32-32 32H362.667c-17.673 0-32-14.327-32-32V123c0-17.673 14.327-32 32-32z m-32 64H394.666v533.589h234.667V155z" />'),alignLeft:zt('<path d="M133.671 96c17.497 0 31.713 14.042 31.996 31.47l0.004 0.53v768c0 17.673-14.327 32-32 32-17.496 0-31.713-14.042-31.995-31.47l-0.005-0.53V128c0-17.673 14.327-32 32-32zM902 330.667c17.673 0 32 14.327 32 32v298.666c0 17.673-14.327 32-32 32H304.411c-17.673 0-32-14.327-32-32V362.667c0-17.673 14.327-32 32-32z m-32.001 63.999H336.41v234.667h533.589V394.666z" />'),alignH:zt('<path d="M512.5 96c17.496 0 31.713 14.042 31.996 31.47l0.004 0.53v202.666H875c17.496 0 31.713 14.042 31.996 31.471l0.004 0.53v298.666c0 17.673-14.327 32-32 32H544.5V896c0 17.673-14.327 32-32 32-17.496 0-31.713-14.042-31.996-31.47l-0.004-0.53V693.333H150c-17.496 0-31.713-14.041-31.996-31.47l-0.004-0.53V362.667c0-17.673 14.327-32 32-32l330.5-0.001V128c0-17.673 14.327-32 32-32z m-32 298.666H182v234.667h298.5V394.666z m362.5 0H544.5v234.667H843V394.666z" />'),alignV:zt('<path d="M661.333 118c17.673 0 32 14.327 32 32v330.5H896c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.996l-0.53 0.004H693.333V875c0 17.496-14.041 31.713-31.47 31.996l-0.53 0.004H362.667c-17.673 0-32-14.327-32-32l-0.001-330.5H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.996l0.53-0.004h202.666V150c0-17.496 14.042-31.713 31.471-31.996l0.53-0.004z m-32.001 426.5H394.665l0.001 298.5h234.667l-0.001-298.5z m0.001-362.5H394.666l-0.001 298.5h234.667l0.001-298.5z" />'),distributeH:zt('<path d="M853.333 96c17.497 0 31.713 14.042 31.996 31.47l0.004 0.53v768c0 17.673-14.327 32-32 32-17.496 0-31.713-14.042-31.995-31.47l-0.005-0.53V128c0-17.673 14.327-32 32-32z m-682.666 0c17.496 0 31.713 14.042 31.995 31.47l0.005 0.53v768c0 17.673-14.327 32-32 32-17.497 0-31.713-14.042-31.996-31.47l-0.004-0.53V128c0-17.673 14.327-32 32-32zM640 181.333c17.673 0 32 14.327 32 32v597.334c0 17.673-14.327 32-32 32H384c-17.673 0-32-14.327-32-32V213.333c0-17.673 14.327-32 32-32z m-32 64H416v533.333h192V245.333z" />'),distributeV:zt('<path d="M896 821.333c17.673 0 32 14.327 32 32 0 17.497-14.042 31.713-31.47 31.996l-0.53 0.004H128c-17.673 0-32-14.327-32-32 0-17.496 14.042-31.713 31.47-31.995l0.53-0.005h768zM810.667 352c17.673 0 32 14.327 32 32v256c0 17.673-14.327 32-32 32H213.333c-17.673 0-32-14.327-32-32V384c0-17.673 14.327-32 32-32z m-32 64H245.334v192h533.333V416zM896 138.667c17.673 0 32 14.327 32 32 0 17.496-14.042 31.713-31.47 31.995l-0.53 0.005H128c-17.673 0-32-14.327-32-32 0-17.497 14.042-31.713 31.47-31.996l0.53-0.004h768z" />')},qc="infographic-edit-popover",St=`${qc}__content`,bn=`${qc}__arrow`,Lre="infographic-edit-popover-style";function Ri(e){var t,n,r,i,o,a,s,c;zre();const l=(t=e.placement)!=null?t:"top",u=(n=e.closeOnOutsideClick)!=null?n:!0,h=Array.isArray(e.trigger)?e.trigger:[e.trigger||"hover"],d=(r=e.mouseEnterDelay)!=null?r:50,f=(i=e.mouseLeaveDelay)!=null?i:150,g=(o=e.offset)!=null?o:8,y=8,m=7,v=typeof e.padding=="number"?`${e.padding}px`:(a=e.padding)!=null?a:"4px",b=document.createElement("div");b.classList.add(qc);const _=(s=e.target)!=null?s:document.createElement("div");b.appendChild(_);const x=()=>{const q=typeof e.getContainer=="function"?e.getContainer():e.getContainer;return q!=null?q:document.body},w=document.createElement("div");w.classList.add(St),uo(w,ol),w.dataset.placement=Array.isArray(l)?l[0]:l,w.setAttribute("data-open",String(!!e.open)),w.style.setProperty("--popover-gap",`${g}px`),w.style.setProperty("--popover-arrow-size",`${y}px`),w.style.setProperty("--popover-arrow-inner-size",`${m}px`);const P=x(),$=P!==b,C=document.createElement("div");C.classList.add(bn),w.appendChild(C);const M=document.createElement("div");M.classList.add(`${St}-body`),M.style.padding=v,w.appendChild(M),P.appendChild(w);let S=!!e.open,E=Array.isArray(l)?l:[l],I=(c=E[0])!=null?c:"top";const O=()=>{var q;const G=_.getBoundingClientRect(),U=w.getBoundingClientRect(),K=window.scrollX||document.documentElement.scrollLeft,ne=window.scrollY||document.documentElement.scrollTop,ee=document.documentElement.clientWidth,se=document.documentElement.clientHeight;let ce=0,Z=0;const le=ie=>{switch(ie){case"top":return{left:K+G.left+G.width/2-U.width/2,top:ne+G.top-U.height-g};case"bottom":return{left:K+G.left+G.width/2-U.width/2,top:ne+G.bottom+g};case"left":return{left:K+G.left-U.width-g,top:ne+G.top+G.height/2-U.height/2};default:return{left:K+G.right+g,top:ne+G.top+G.height/2-U.height/2}}},te=(ie,ue)=>ie>=K&&ue>=ne&&ie+U.width<=K+ee&&ue+U.height<=ne+se;let Q=(q=E[0])!=null?q:"top",re=le(Q);for(const ie of E){const ue=le(ie);if(re=ue,te(ue.left,ue.top)){Q=ie;break}}I=Q,w.dataset.placement=I,$&&({left:ce,top:Z}=re,w.style.left=`${ce}px`,w.style.top=`${Z}px`,w.style.right="auto",w.style.bottom="auto",w.style.transform="translate(0, 0)")};$&&(w.style.position="absolute",window.addEventListener("resize",O),window.addEventListener("scroll",O,!0));const T=q=>{let G=q;typeof G=="function"&&(G=G()),M.innerHTML="",G instanceof HTMLElement?M.appendChild(G):M.textContent=G!=null?G:"",O()},F=q=>{var G;E=Array.isArray(q)?q:[q],I=(G=E[0])!=null?G:"top",O()},z=q=>{S=q,w.setAttribute("data-open",String(S)),S&&O(),S&&u?document.addEventListener("click",H,!0):document.removeEventListener("click",H,!0)},j=()=>z(!S),H=q=>{const G=q.target;!b.contains(G)&&(!$||!w.contains(G))&&z(!1)};let W,B;const X=h.includes("hover"),D=h.includes("click"),k=()=>{W!==void 0&&(clearTimeout(W),W=void 0),B!==void 0&&(clearTimeout(B),B=void 0)},A=()=>{X&&(k(),W=window.setTimeout(()=>z(!0),d))},L=()=>{X&&(k(),B=window.setTimeout(()=>z(!1),f))};return D&&_.addEventListener("click",j),X&&(b.addEventListener("mouseenter",A),b.addEventListener("mouseleave",L),w.addEventListener("mouseenter",A),w.addEventListener("mouseleave",L)),T(e.content),F(l),z(S),Object.assign(b,{setOpen:z,toggle:j,setContent:T,setPlacement:F,destroy:()=>{document.removeEventListener("click",H,!0),D&&_.removeEventListener("click",j),X&&(b.removeEventListener("mouseenter",A),b.removeEventListener("mouseleave",L),w.removeEventListener("mouseenter",A),w.removeEventListener("mouseleave",L),k()),$&&(window.removeEventListener("resize",O),window.removeEventListener("scroll",O,!0),w.remove()),b.remove()}})}function zre(){Sn(Lre,`
298
+ .${qc} {
299
299
  position: relative;
300
300
  display: inline-flex;
301
301
  }
302
- .${ue} {
302
+ .${St} {
303
303
  position: absolute;
304
304
  z-index: 1200;
305
305
  padding: 0;
@@ -315,34 +315,34 @@ ${t.trim()}
315
315
  pointer-events: none;
316
316
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
317
317
  }
318
- .${ue}-body {
318
+ .${St}-body {
319
319
  padding: 4px;
320
320
  color: #000000d9;
321
321
  font-size: 12px;
322
322
  line-height: 1.5;
323
323
  }
324
- .${ue}[data-open="true"] {
324
+ .${St}[data-open="true"] {
325
325
  opacity: 1;
326
326
  visibility: visible;
327
327
  pointer-events: auto;
328
328
  }
329
- .${Qe} {
329
+ .${bn} {
330
330
  position: absolute;
331
331
  width: 0;
332
332
  height: 0;
333
333
  }
334
- .${Qe}::after {
334
+ .${bn}::after {
335
335
  content: '';
336
336
  position: absolute;
337
337
  width: 0;
338
338
  height: 0;
339
339
  }
340
- .${ue}[data-placement="top"] {
340
+ .${St}[data-placement="top"] {
341
341
  left: 50%;
342
342
  bottom: calc(100% + var(--popover-gap));
343
343
  transform: translate(-50%, calc(-1 * var(--popover-gap) / 2));
344
344
  }
345
- .${ue}[data-placement="top"] .${Qe} {
345
+ .${St}[data-placement="top"] .${bn} {
346
346
  left: 50%;
347
347
  bottom: calc(-1 * var(--popover-arrow-size));
348
348
  transform: translateX(-50%);
@@ -350,7 +350,7 @@ ${t.trim()}
350
350
  border-right: var(--popover-arrow-size) solid transparent;
351
351
  border-top: var(--popover-arrow-size) solid rgba(239, 240, 240, 0.9);
352
352
  }
353
- .${ue}[data-placement="top"] .${Qe}::after {
353
+ .${St}[data-placement="top"] .${bn}::after {
354
354
  left: 50%;
355
355
  bottom: 1px;
356
356
  transform: translateX(-50%);
@@ -358,15 +358,15 @@ ${t.trim()}
358
358
  border-right: var(--popover-arrow-inner-size) solid transparent;
359
359
  border-top: var(--popover-arrow-inner-size) solid #fff;
360
360
  }
361
- .${ue}[data-placement="top"][data-open="true"] {
361
+ .${St}[data-placement="top"][data-open="true"] {
362
362
  transform: translate(-50%, 0);
363
363
  }
364
- .${ue}[data-placement="bottom"] {
364
+ .${St}[data-placement="bottom"] {
365
365
  left: 50%;
366
366
  top: calc(100% + var(--popover-gap));
367
367
  transform: translate(-50%, calc(var(--popover-gap) / 2));
368
368
  }
369
- .${ue}[data-placement="bottom"] .${Qe} {
369
+ .${St}[data-placement="bottom"] .${bn} {
370
370
  left: 50%;
371
371
  top: calc(-1 * var(--popover-arrow-size) + 2px);
372
372
  transform: translateX(-50%);
@@ -374,7 +374,7 @@ ${t.trim()}
374
374
  border-right: var(--popover-arrow-size) solid transparent;
375
375
  border-bottom: var(--popover-arrow-size) solid rgba(239, 240, 240, 0.9);
376
376
  }
377
- .${ue}[data-placement="bottom"] .${Qe}::after {
377
+ .${St}[data-placement="bottom"] .${bn}::after {
378
378
  left: 50%;
379
379
  top: 1px;
380
380
  transform: translateX(-50%);
@@ -382,15 +382,15 @@ ${t.trim()}
382
382
  border-right: var(--popover-arrow-inner-size) solid transparent;
383
383
  border-bottom: var(--popover-arrow-inner-size) solid #fff;
384
384
  }
385
- .${ue}[data-placement="bottom"][data-open="true"] {
385
+ .${St}[data-placement="bottom"][data-open="true"] {
386
386
  transform: translate(-50%, 0);
387
387
  }
388
- .${ue}[data-placement="left"] {
388
+ .${St}[data-placement="left"] {
389
389
  right: calc(100% + var(--popover-gap));
390
390
  top: 50%;
391
391
  transform: translate(calc(-1 * var(--popover-gap) / 2), -50%);
392
392
  }
393
- .${ue}[data-placement="left"] .${Qe} {
393
+ .${St}[data-placement="left"] .${bn} {
394
394
  right: calc(-1 * var(--popover-arrow-size) + 1px);
395
395
  top: 50%;
396
396
  transform: translateY(-50%);
@@ -399,7 +399,7 @@ ${t.trim()}
399
399
  border-left: var(--popover-arrow-size) solid rgba(239, 240, 240, 0.9);
400
400
  border-right: 0;
401
401
  }
402
- .${ue}[data-placement="left"] .${Qe}::after {
402
+ .${St}[data-placement="left"] .${bn}::after {
403
403
  right: 1px;
404
404
  top: 50%;
405
405
  transform: translateY(-50%);
@@ -408,15 +408,15 @@ ${t.trim()}
408
408
  border-left: var(--popover-arrow-inner-size) solid #fff;
409
409
  border-right: 0;
410
410
  }
411
- .${ue}[data-placement="left"][data-open="true"] {
411
+ .${St}[data-placement="left"][data-open="true"] {
412
412
  transform: translate(0, -50%);
413
413
  }
414
- .${ue}[data-placement="right"] {
414
+ .${St}[data-placement="right"] {
415
415
  left: calc(100% + var(--popover-gap));
416
416
  top: 50%;
417
417
  transform: translate(calc(var(--popover-gap) / 2), -50%);
418
418
  }
419
- .${ue}[data-placement="right"] .${Qe} {
419
+ .${St}[data-placement="right"] .${bn} {
420
420
  left: calc(-1 * var(--popover-arrow-size) + 1px);
421
421
  top: 50%;
422
422
  transform: translateY(-50%);
@@ -425,7 +425,7 @@ ${t.trim()}
425
425
  border-right: var(--popover-arrow-size) solid rgba(239, 240, 240, 0.9);
426
426
  border-left: 0;
427
427
  }
428
- .${ue}[data-placement="right"] .${Qe}::after {
428
+ .${St}[data-placement="right"] .${bn}::after {
429
429
  left: 1px;
430
430
  top: 50%;
431
431
  transform: translateY(-50%);
@@ -433,28 +433,28 @@ ${t.trim()}
433
433
  border-bottom: var(--popover-arrow-inner-size) solid transparent;
434
434
  border-right: var(--popover-arrow-inner-size) solid #fff;
435
435
  }
436
- .${ue}[data-placement="right"][data-open="true"] {
436
+ .${St}[data-placement="right"][data-open="true"] {
437
437
  transform: translate(0, -50%);
438
438
  }
439
- `)}const kh="infographic-align-grid",J3=`${kh}--compact`,jD="infographic-align-grid-style",WD=`
440
- .${kh} {
439
+ `)}const K1="infographic-align-grid",hO=`${K1}--compact`,Nre="infographic-align-grid-style",Hre=`
440
+ .${K1} {
441
441
  display: grid;
442
442
  grid-template-columns: repeat(4, 32px);
443
443
  grid-auto-rows: 32px;
444
444
  gap: 2px;
445
445
  }
446
- .${J3} {
446
+ .${hO} {
447
447
  grid-template-columns: repeat(3, 32px);
448
448
  }
449
- `,tv=[{icon:Cn.alignLeft,action:"LEFT"},{icon:Cn.alignH,action:"H_CENTER"},{icon:Cn.alignRight,action:"RIGHT"},{icon:Cn.distributeH,action:"H_DISTRIBUTE"},{icon:Cn.alignTop,action:"TOP"},{icon:Cn.alignV,action:"V_CENTER"},{icon:Cn.alignBottom,action:"BOTTOM"},{icon:Cn.distributeV,action:"V_DISTRIBUTE"}],FD=(t,e,n,r)=>{var i;ln(jD,WD);const o=(i=r==null?void 0:r.enableDistribution)!=null?i:!0,s=BD(a=>YD(t,a,n),o);return Ur({target:yr({icon:Cn.align}),content:s,placement:"top",offset:12})};function BD(t,e){const n=document.createElement("div");return n.classList.add(kh),e||n.classList.add(J3),(e?tv:tv.filter(({action:i})=>i!=="H_DISTRIBUTE"&&i!=="V_DISTRIBUTE")).forEach(({icon:i,action:o})=>{const s=yr({icon:i,onClick:()=>t(o)});n.appendChild(s)}),n}function YD(t,e,n){if(!t.length)return;const r=t[0].ownerSVGElement;if(!r)return;const i=t.map(h=>GD(h,r)).filter(Boolean);if(!i.length)return;const o=i.filter(h=>h.movable);if(!o.length)return;const s=i.filter(h=>!h.movable),a=s.length?s:i,l=Dr(a.map(h=>h.bounds)),c=[];switch(e){case"LEFT":{const h=l.x;o.forEach(u=>{const f=h-u.bounds.x;Wn(c,u,f,0)});break}case"H_CENTER":{const h=l.x+l.width/2;o.forEach(u=>{const f=h-(u.bounds.x+u.bounds.width/2);Wn(c,u,f,0)});break}case"RIGHT":{const h=l.x+l.width;o.forEach(u=>{const f=h-(u.bounds.x+u.bounds.width);Wn(c,u,f,0)});break}case"TOP":{const h=l.y;o.forEach(u=>{const f=h-u.bounds.y;Wn(c,u,0,f)});break}case"V_CENTER":{const h=l.y+l.height/2;o.forEach(u=>{const f=h-(u.bounds.y+u.bounds.height/2);Wn(c,u,0,f)});break}case"BOTTOM":{const h=l.y+l.height;o.forEach(u=>{const f=h-(u.bounds.y+u.bounds.height);Wn(c,u,0,f)});break}case"H_DISTRIBUTE":{VD(i,c);break}case"V_DISTRIBUTE":{XD(i,c);break}}c.length&&n.executeBatch(c)}function VD(t,e){if(t.length<=2)return;const n=[...t].sort((i,o)=>i.bounds.x-o.bounds.x||i.bounds.y-o.bounds.y),r=ev(n);for(let i=0;i<r.length-1;i++){const o=r[i],s=r[i+1],a=n[o],l=n[s],c=n.slice(o+1,s);if(!c.length)continue;const h=l.bounds.x-(a.bounds.x+a.bounds.width),u=c.reduce((g,y)=>g+y.bounds.width,0),f=(h-u)/(c.length+1);let p=a.bounds.x+a.bounds.width+f;c.forEach(g=>{const y=p-g.bounds.x;Wn(e,g,y,0),p+=g.bounds.width+f})}}function XD(t,e){if(t.length<=2)return;const n=[...t].sort((i,o)=>i.bounds.y-o.bounds.y||i.bounds.x-o.bounds.x),r=ev(n);for(let i=0;i<r.length-1;i++){const o=r[i],s=r[i+1],a=n[o],l=n[s],c=n.slice(o+1,s);if(!c.length)continue;const h=l.bounds.y-(a.bounds.y+a.bounds.height),u=c.reduce((g,y)=>g+y.bounds.height,0),f=(h-u)/(c.length+1);let p=a.bounds.y+a.bounds.height+f;c.forEach(g=>{const y=p-g.bounds.y;Wn(e,g,0,y),p+=g.bounds.height+f})}}function ev(t){const e=new Set;return e.add(0),e.add(t.length-1),t.forEach((n,r)=>{n.movable||e.add(r)}),Array.from(e).sort((n,r)=>n-r)}function Wn(t,e,n,r){const i=qD(e,n,r);i&&t.push(i)}function GD(t,e){const n=fn(e,t),r=!zn(t),i=ZD(t);if(i)return{element:t,bounds:n,mode:"transform",startX:i.x,startY:i.y,hasX:!1,hasY:!1,hasDataX:!1,hasDataY:!1,restTransform:i.rest,originalTransform:i.original,movable:r};const{x:o,y:s,hasX:a,hasY:l,hasDataX:c,hasDataY:h}=UD(t,n);return{element:t,bounds:n,mode:"attr",startX:o,startY:s,hasX:a,hasY:l,hasDataX:c,hasDataY:h,movable:r}}function qD(t,e,n){if(!t.movable||Math.abs(e)<1e-6&&Math.abs(n)<1e-6)return null;if(t.mode==="attr"){const o=t.startX+e,s=t.startY+n,a={x:o,y:s},l={};return l.x=t.hasX?t.startX:null,l.y=t.hasY?t.startY:null,t.hasDataX&&(a["data-x"]=o,l["data-x"]=t.startX),t.hasDataY&&(a["data-y"]=s,l["data-y"]=t.startY),new pn(t.element,{attributes:a},{attributes:l})}const r=KD(t.startX+e,t.startY+n,t.restTransform),i=t.originalTransform!==void 0?t.originalTransform:null;return new pn(t.element,{attributes:{transform:r}},{attributes:{transform:i}})}function UD(t,e){const n=De(t,["x","y","data-x","data-y"],!1),r=n.x!==null&&n.x!==void 0,i=n.y!==null&&n.y!==void 0,o=n["data-x"]!==null&&n["data-x"]!==void 0,s=n["data-y"]!==null&&n["data-y"]!==void 0,a=(g,y)=>{const m=g!=null?Number(g):NaN;return Number.isFinite(m)?m:y},l=a(n.x,NaN),c=a(n.y,NaN),h=a(n["data-x"],NaN),u=a(n["data-y"],NaN),f=Number.isFinite(l)?l:Number.isFinite(h)?h:e.x,p=Number.isFinite(c)?c:Number.isFinite(u)?u:e.y;return{x:f,y:p,hasX:r,hasY:i,hasDataX:o,hasDataY:s}}function ZD(t){var e;const n=t.getAttribute("transform");if(n===null)return null;const r=n.match(/translate\(\s*([-\d.]+)(?:[ ,]\s*([-\d.]+))?\s*\)/i);if(!r)return{x:0,y:0,rest:{before:n.trim(),after:""},original:n};const i=Number(r[1])||0,o=r[2]!==void 0&&Number(r[2])||0,s=(e=r.index)!=null?e:0,a=n.slice(0,s).trim(),l=n.slice(s+r[0].length).trim();return{x:i,y:o,rest:{before:a,after:l},original:n}}function KD(t,e,n){const r=`translate(${t}, ${e})`;return[n==null?void 0:n.before,r,n==null?void 0:n.after].filter(o=>o&&o.length).join(" ")}var QD=Object.defineProperty,nv=Object.getOwnPropertySymbols,JD=Object.prototype.hasOwnProperty,tN=Object.prototype.propertyIsEnumerable,rv=(t,e,n)=>e in t?QD(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,eN=(t,e)=>{for(var n in e||(e={}))JD.call(e,n)&&rv(t,n,e[n]);if(nv)for(var n of nv(e))tN.call(e,n)&&rv(t,n,e[n]);return t};const iv="infographic-font-align-grid",nN="infographic-font-align-grid-style",rN=[{icon:Pn.alignLeft,align:"LEFT"},{icon:Pn.alignCenter,align:"CENTER"},{icon:Pn.alignRight,align:"RIGHT"}],iN=[{icon:Pn.alignTop,align:"TOP"},{icon:Pn.alignMiddle,align:"MIDDLE"},{icon:Pn.alignBottom,align:"BOTTOM"}],oN=`
450
- .${iv} {
449
+ `,dO=[{icon:Xn.alignLeft,action:"LEFT"},{icon:Xn.alignH,action:"H_CENTER"},{icon:Xn.alignRight,action:"RIGHT"},{icon:Xn.distributeH,action:"H_DISTRIBUTE"},{icon:Xn.alignTop,action:"TOP"},{icon:Xn.alignV,action:"V_CENTER"},{icon:Xn.alignBottom,action:"BOTTOM"},{icon:Xn.distributeV,action:"V_DISTRIBUTE"}],Dre=(e,t,n,r)=>{var i;Sn(Nre,Hre);const o=(i=r==null?void 0:r.enableDistribution)!=null?i:!0,a=qre(s=>jre(e,s,n),o);return Ri({target:Yr({icon:Xn.align}),content:a,placement:"top",offset:12})};function qre(e,t){const n=document.createElement("div");return n.classList.add(K1),t||n.classList.add(hO),(t?dO:dO.filter(({action:i})=>i!=="H_DISTRIBUTE"&&i!=="V_DISTRIBUTE")).forEach(({icon:i,action:o})=>{const a=Yr({icon:i,onClick:()=>e(o)});n.appendChild(a)}),n}function jre(e,t,n){if(!e.length)return;const r=e[0].ownerSVGElement;if(!r)return;const i=e.map(u=>Wre(u,r)).filter(Boolean);if(!i.length)return;const o=i.filter(u=>u.movable);if(!o.length)return;const a=i.filter(u=>!u.movable),s=a.length?a:i,c=mi(s.map(u=>u.bounds)),l=[];switch(t){case"LEFT":{const u=c.x;o.forEach(h=>{const d=u-h.bounds.x;ur(l,h,d,0)});break}case"H_CENTER":{const u=c.x+c.width/2;o.forEach(h=>{const d=u-(h.bounds.x+h.bounds.width/2);ur(l,h,d,0)});break}case"RIGHT":{const u=c.x+c.width;o.forEach(h=>{const d=u-(h.bounds.x+h.bounds.width);ur(l,h,d,0)});break}case"TOP":{const u=c.y;o.forEach(h=>{const d=u-h.bounds.y;ur(l,h,0,d)});break}case"V_CENTER":{const u=c.y+c.height/2;o.forEach(h=>{const d=u-(h.bounds.y+h.bounds.height/2);ur(l,h,0,d)});break}case"BOTTOM":{const u=c.y+c.height;o.forEach(h=>{const d=u-(h.bounds.y+h.bounds.height);ur(l,h,0,d)});break}case"H_DISTRIBUTE":{Fre(i,l);break}case"V_DISTRIBUTE":{Bre(i,l);break}}l.length&&n.executeBatch(l)}function Fre(e,t){if(e.length<=2)return;const n=[...e].sort((i,o)=>i.bounds.x-o.bounds.x||i.bounds.y-o.bounds.y),r=fO(n);for(let i=0;i<r.length-1;i++){const o=r[i],a=r[i+1],s=n[o],c=n[a],l=n.slice(o+1,a);if(!l.length)continue;const u=c.bounds.x-(s.bounds.x+s.bounds.width),h=l.reduce((g,y)=>g+y.bounds.width,0),d=(u-h)/(l.length+1);let f=s.bounds.x+s.bounds.width+d;l.forEach(g=>{const y=f-g.bounds.x;ur(t,g,y,0),f+=g.bounds.width+d})}}function Bre(e,t){if(e.length<=2)return;const n=[...e].sort((i,o)=>i.bounds.y-o.bounds.y||i.bounds.x-o.bounds.x),r=fO(n);for(let i=0;i<r.length-1;i++){const o=r[i],a=r[i+1],s=n[o],c=n[a],l=n.slice(o+1,a);if(!l.length)continue;const u=c.bounds.y-(s.bounds.y+s.bounds.height),h=l.reduce((g,y)=>g+y.bounds.height,0),d=(u-h)/(l.length+1);let f=s.bounds.y+s.bounds.height+d;l.forEach(g=>{const y=f-g.bounds.y;ur(t,g,0,y),f+=g.bounds.height+d})}}function fO(e){const t=new Set;return t.add(0),t.add(e.length-1),e.forEach((n,r)=>{n.movable||t.add(r)}),Array.from(t).sort((n,r)=>n-r)}function ur(e,t,n,r){const i=Gre(t,n,r);i&&e.push(i)}function Wre(e,t){const n=Vn(t,e),r=!ir(e),i=Yre(e);if(i)return{element:e,bounds:n,mode:"transform",startX:i.x,startY:i.y,hasX:!1,hasY:!1,hasDataX:!1,hasDataY:!1,restTransform:i.rest,originalTransform:i.original,movable:r};const{x:o,y:a,hasX:s,hasY:c,hasDataX:l,hasDataY:u}=Vre(e,n);return{element:e,bounds:n,mode:"attr",startX:o,startY:a,hasX:s,hasY:c,hasDataX:l,hasDataY:u,movable:r}}function Gre(e,t,n){if(!e.movable||Math.abs(t)<1e-6&&Math.abs(n)<1e-6)return null;if(e.mode==="attr"){const o=e.startX+t,a=e.startY+n,s={x:o,y:a},c={};return c.x=e.hasX?e.startX:null,c.y=e.hasY?e.startY:null,e.hasDataX&&(s["data-x"]=o,c["data-x"]=e.startX),e.hasDataY&&(s["data-y"]=a,c["data-y"]=e.startY),new kn(e.element,{attributes:s},{attributes:c})}const r=Xre(e.startX+t,e.startY+n,e.restTransform),i=e.originalTransform!==void 0?e.originalTransform:null;return new kn(e.element,{attributes:{transform:r}},{attributes:{transform:i}})}function Vre(e,t){const n=an(e,["x","y","data-x","data-y"],!1),r=n.x!==null&&n.x!==void 0,i=n.y!==null&&n.y!==void 0,o=n["data-x"]!==null&&n["data-x"]!==void 0,a=n["data-y"]!==null&&n["data-y"]!==void 0,s=(g,y)=>{const m=g!=null?Number(g):NaN;return Number.isFinite(m)?m:y},c=s(n.x,NaN),l=s(n.y,NaN),u=s(n["data-x"],NaN),h=s(n["data-y"],NaN),d=Number.isFinite(c)?c:Number.isFinite(u)?u:t.x,f=Number.isFinite(l)?l:Number.isFinite(h)?h:t.y;return{x:d,y:f,hasX:r,hasY:i,hasDataX:o,hasDataY:a}}function Yre(e){var t;const n=e.getAttribute("transform");if(n===null)return null;const r=n.match(/translate\(\s*([-\d.]+)(?:[ ,]\s*([-\d.]+))?\s*\)/i);if(!r)return{x:0,y:0,rest:{before:n.trim(),after:""},original:n};const i=Number(r[1])||0,o=r[2]!==void 0&&Number(r[2])||0,a=(t=r.index)!=null?t:0,s=n.slice(0,a).trim(),c=n.slice(a+r[0].length).trim();return{x:i,y:o,rest:{before:s,after:c},original:n}}function Xre(e,t,n){const r=`translate(${e}, ${t})`;return[n==null?void 0:n.before,r,n==null?void 0:n.after].filter(o=>o&&o.length).join(" ")}var Ure=Object.defineProperty,pO=Object.getOwnPropertySymbols,Kre=Object.prototype.hasOwnProperty,Zre=Object.prototype.propertyIsEnumerable,gO=(e,t,n)=>t in e?Ure(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qre=(e,t)=>{for(var n in t||(t={}))Kre.call(t,n)&&gO(e,n,t[n]);if(pO)for(var n of pO(t))Zre.call(t,n)&&gO(e,n,t[n]);return e};const mO="infographic-font-align-grid",Jre="infographic-font-align-grid-style",eie=[{icon:Yn.alignLeft,align:"LEFT"},{icon:Yn.alignCenter,align:"CENTER"},{icon:Yn.alignRight,align:"RIGHT"}],tie=[{icon:Yn.alignTop,align:"TOP"},{icon:Yn.alignMiddle,align:"MIDDLE"},{icon:Yn.alignBottom,align:"BOTTOM"}],nie=`
450
+ .${mO} {
451
451
  display: grid;
452
452
  grid-template-columns: repeat(3, 32px);
453
453
  grid-auto-rows: 32px;
454
454
  gap: 2px;
455
455
  }
456
- `,ov=(t,e,n)=>{ln(nN,oN);const r={horizontal:e["data-horizontal-align"],vertical:e["data-vertical-align"]},i=yr({icon:Pn.align}),o=sN(r,s=>{const a={};s.horizontal&&(a["data-horizontal-align"]=s.horizontal),s.vertical&&(a["data-vertical-align"]=s.vertical),Object.keys(a).length&&n.executeBatch(t.map(l=>new pn(l,{attributes:a})))});return Ur({target:i,content:o,placement:"top",offset:12})};function sN(t,e){const n=document.createElement("div");n.classList.add(iv);const r={},i=()=>{Object.entries(r).forEach(([s,a])=>{const l=s===t.horizontal||s===t.vertical;a.setActivate(l)})},o=(s,a)=>{s.forEach(({icon:l,align:c})=>{const h=yr({icon:l,onClick:()=>{t[a]!==c&&(Object.assign(t,{[a]:c}),i(),e(eN({},t)))},activate:c===t[a]});r[c]=h,n.appendChild(h)})};return o(rN,"horizontal"),o(iN,"vertical"),n}const ma="infographic-font-color-btn",aN="infographic-font-color-style",Lh="#1f1f1f",sv=(t,e,n)=>{cN();const r=lN(e.fill),i=e.fill===void 0&&t.length>1,o=document.createElement("button");o.type="button",o.classList.add(ma),av(o,r!=null?r:Lh,i);const s=q3({value:r!=null?r:Lh,onChange:a=>{av(o,a,!1),n.executeBatch(t.map(l=>new pn(l,{attributes:{fill:a}})))}});return Ur({target:o,content:s,placement:["top","bottom"],offset:12,trigger:"hover",closeOnOutsideClick:!0,open:!1,padding:0})};function lN(t){if(t)return Xn(t)?t:void 0}function av(t,e,n){t.style.setProperty("--infographic-font-color",e),n?t.setAttribute("data-mixed","true"):t.removeAttribute("data-mixed")}function cN(){ln(aN,`
457
- .${ma} {
456
+ `,yO=(e,t,n)=>{Sn(Jre,nie);const r={horizontal:t["data-horizontal-align"],vertical:t["data-vertical-align"]},i=Yr({icon:Yn.align}),o=rie(r,a=>{const s={};a.horizontal&&(s["data-horizontal-align"]=a.horizontal),a.vertical&&(s["data-vertical-align"]=a.vertical),Object.keys(s).length&&n.executeBatch(e.map(c=>new kn(c,{attributes:s})))});return Ri({target:i,content:o,placement:"top",offset:12})};function rie(e,t){const n=document.createElement("div");n.classList.add(mO);const r={},i=()=>{Object.entries(r).forEach(([a,s])=>{const c=a===e.horizontal||a===e.vertical;s.setActivate(c)})},o=(a,s)=>{a.forEach(({icon:c,align:l})=>{const u=Yr({icon:c,onClick:()=>{e[s]!==l&&(Object.assign(e,{[s]:l}),i(),t(Qre({},e)))},activate:l===e[s]});r[l]=u,n.appendChild(u)})};return o(eie,"horizontal"),o(tie,"vertical"),n}const jc="infographic-font-color-btn",iie="infographic-font-color-style",Z1="#1f1f1f",vO=(e,t,n)=>{aie();const r=oie(t.fill),i=t.fill===void 0&&e.length>1,o=document.createElement("button");o.type="button",o.classList.add(jc),bO(o,r!=null?r:Z1,i);const a=aO({value:r!=null?r:Z1,onChange:s=>{bO(o,s,!1),n.executeBatch(e.map(c=>new kn(c,{attributes:{fill:s}})))}});return Ri({target:o,content:a,placement:["top","bottom"],offset:12,trigger:"hover",closeOnOutsideClick:!0,open:!1,padding:0})};function oie(e){if(e)return vr(e)?e:void 0}function bO(e,t,n){e.style.setProperty("--infographic-font-color",t),n?e.setAttribute("data-mixed","true"):e.removeAttribute("data-mixed")}function aie(){Sn(iie,`
457
+ .${jc} {
458
458
  position: relative;
459
459
  width: 32px;
460
460
  height: 32px;
@@ -464,15 +464,15 @@ ${t.trim()}
464
464
  cursor: pointer;
465
465
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
466
466
  }
467
- .${ma}::after {
467
+ .${jc}::after {
468
468
  content: '';
469
469
  position: absolute;
470
470
  inset: 6px;
471
471
  border-radius: 50%;
472
- background: var(--infographic-font-color, ${Lh});
472
+ background: var(--infographic-font-color, ${Z1});
473
473
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
474
474
  }
475
- .${ma}[data-mixed="true"]::after {
475
+ .${jc}[data-mixed="true"]::after {
476
476
  background: repeating-linear-gradient(
477
477
  45deg,
478
478
  #d9d9d9 0,
@@ -481,8 +481,8 @@ ${t.trim()}
481
481
  #f5f5f5 12px
482
482
  );
483
483
  }
484
- `)}const zh="infographic-font-family-list",ya=`${zh}__option`,hN="infographic-font-family-list-style",dN="默认",lv=(t,e,n)=>{fN();const r=Hl(),i=cv(e["font-family"]),o=r.map(h=>({label:h.name||h.fontFamily,value:h.fontFamily}));o.some(h=>cv(h.value)===i)||o.unshift({label:dN,value:i});let s=i;const a=uN(o,s,h=>{s!==h&&(s=h,n.executeBatch(t.map(u=>new pn(u,{attributes:{"font-family":Er(h)}}))))}),l=yr({icon:Pn.fontFamily});return Ur({target:l,content:a,placement:["top","bottom"],offset:12,trigger:"hover",closeOnOutsideClick:!0,open:!1,padding:0})};function uN(t,e,n){const r=document.createElement("div");r.classList.add(zh);const i={},o=s=>{Object.entries(i).forEach(([a,l])=>{a===s?l.setAttribute("data-activate","true"):l.removeAttribute("data-activate")})};return t.forEach(({label:s,value:a})=>{const l=document.createElement("button");l.type="button",l.classList.add(ya),l.textContent=s,l.style.fontFamily=a,a===e&&l.setAttribute("data-activate","true"),l.addEventListener("click",()=>{e!==a&&(e=a,o(e),n(a))}),i[a]=l,r.appendChild(l)}),r}function cv(t){return t?Array.isArray(t)?Qn(t.join(", ")):Qn(String(t)):""}function fN(){ln(hN,`
485
- .${zh} {
484
+ `)}const Q1="infographic-font-family-list",Fc=`${Q1}__option`,sie="infographic-font-family-list-style",cie="默认",_O=(e,t,n)=>{uie();const r=gu(),i=xO(t["font-family"]),o=r.map(u=>({label:u.name||u.fontFamily,value:u.fontFamily}));o.some(u=>xO(u.value)===i)||o.unshift({label:cie,value:i});let a=i;const s=lie(o,a,u=>{a!==u&&(a=u,n.executeBatch(e.map(h=>new kn(h,{attributes:{"font-family":ci(u)}}))))}),c=Yr({icon:Yn.fontFamily});return Ri({target:c,content:s,placement:["top","bottom"],offset:12,trigger:"hover",closeOnOutsideClick:!0,open:!1,padding:0})};function lie(e,t,n){const r=document.createElement("div");r.classList.add(Q1);const i={},o=a=>{Object.entries(i).forEach(([s,c])=>{s===a?c.setAttribute("data-activate","true"):c.removeAttribute("data-activate")})};return e.forEach(({label:a,value:s})=>{const c=document.createElement("button");c.type="button",c.classList.add(Fc),c.textContent=a,c.style.fontFamily=s,s===t&&c.setAttribute("data-activate","true"),c.addEventListener("click",()=>{t!==s&&(t=s,o(t),n(s))}),i[s]=c,r.appendChild(c)}),r}function xO(e){return e?Array.isArray(e)?Cr(e.join(", ")):Cr(String(e)):""}function uie(){Sn(sie,`
485
+ .${Q1} {
486
486
  display: flex;
487
487
  flex-direction: column;
488
488
  gap: 2px;
@@ -491,7 +491,7 @@ ${t.trim()}
491
491
  max-height: 220px;
492
492
  overflow-y: auto;
493
493
  }
494
- .${ya} {
494
+ .${Fc} {
495
495
  width: 100%;
496
496
  text-align: left;
497
497
  padding: 6px 10px;
@@ -503,22 +503,22 @@ ${t.trim()}
503
503
  color: #000000d9;
504
504
  transition: background-color 0.2s ease, color 0.2s ease;
505
505
  }
506
- .${ya}:hover {
506
+ .${Fc}:hover {
507
507
  background: #f5f5f5;
508
508
  }
509
- .${ya}[data-activate="true"] {
509
+ .${Fc}[data-activate="true"] {
510
510
  background: #e6f4ff;
511
511
  color: #0958d9;
512
512
  }
513
- `)}const hv="infographic-font-size-grid",pN="infographic-font-size-grid-style",gN=[{label:"XS",value:12},{label:"S",value:14},{label:"M",value:16},{label:"L",value:20},{label:"XL",value:24}],mN=`
514
- .${hv} {
513
+ `)}const wO="infographic-font-size-grid",hie="infographic-font-size-grid-style",die=[{label:"XS",value:12},{label:"S",value:14},{label:"M",value:16},{label:"L",value:20},{label:"XL",value:24}],fie=`
514
+ .${wO} {
515
515
  display: grid;
516
516
  grid-template-columns: repeat(5, 32px);
517
517
  grid-auto-rows: 32px;
518
518
  gap: 2px;
519
519
  }
520
- `,dv=(t,e,n)=>{ln(pN,mN);const r=yr({icon:Pn.fontSize}),i=xN(e["font-size"]),o=yN(i,s=>{n.executeBatch(t.map(a=>new pn(a,{attributes:{"font-size":s}})))});return Ur({target:r,content:o,placement:"top",offset:12})};function yN(t,e){const n=document.createElement("div");n.classList.add(hv);let r=t;const i={},o=()=>{Object.entries(i).forEach(([s,a])=>{const l=Number(s)===r;a.setActivate(l)})};return gN.forEach(({label:s,value:a})=>{const l=yr({icon:vN(s),onClick:()=>{r!==a&&(r=a,o(),e(a))},activate:a===r});i[String(a)]=l,n.appendChild(l)}),n}function vN(t){return()=>{const e="1.2em",n=document.createElement("span");return n.textContent=t,n.style.display="inline-flex",n.style.alignItems="center",n.style.justifyContent="center",n.style.width=e,n.style.height=e,n.style.fontSize="12px",n}}function xN(t){if(typeof t=="number")return t;if(typeof t=="string"){const n=parseFloat(t);return Number.isFinite(n)?n:12}return 12}const va="infographic-icon-color-btn",bN="infographic-icon-color-style",Hh="#1f1f1f",uv=(t,e,n)=>{_N();const r=wN(e.fill),i=e.fill===void 0&&t.length>1,o=document.createElement("button");o.type="button",o.classList.add(va),fv(o,r!=null?r:Hh,i);const s=q3({value:r!=null?r:Hh,onChange:a=>{fv(o,a,!1),n.executeBatch(t.map(l=>new pn(l,{attributes:{fill:a}})))}});return Ur({target:o,content:s,placement:["top","bottom"],offset:12,trigger:"hover",closeOnOutsideClick:!0,open:!1,padding:0})};function wN(t){if(t)return Xn(t)?t:void 0}function fv(t,e,n){t.style.setProperty("--infographic-icon-color",e),n?t.setAttribute("data-mixed","true"):t.removeAttribute("data-mixed")}function _N(){ln(bN,`
521
- .${va} {
520
+ `,PO=(e,t,n)=>{Sn(hie,fie);const r=Yr({icon:Yn.fontSize}),i=mie(t["font-size"]),o=pie(i,a=>{n.executeBatch(e.map(s=>new kn(s,{attributes:{"font-size":a}})))});return Ri({target:r,content:o,placement:"top",offset:12})};function pie(e,t){const n=document.createElement("div");n.classList.add(wO);let r=e;const i={},o=()=>{Object.entries(i).forEach(([a,s])=>{const c=Number(a)===r;s.setActivate(c)})};return die.forEach(({label:a,value:s})=>{const c=Yr({icon:gie(a),onClick:()=>{r!==s&&(r=s,o(),t(s))},activate:s===r});i[String(s)]=c,n.appendChild(c)}),n}function gie(e){return()=>{const t="1.2em",n=document.createElement("span");return n.textContent=e,n.style.display="inline-flex",n.style.alignItems="center",n.style.justifyContent="center",n.style.width=t,n.style.height=t,n.style.fontSize="12px",n}}function mie(e){if(typeof e=="number")return e;if(typeof e=="string"){const n=parseFloat(e);return Number.isFinite(n)?n:12}return 12}const Bc="infographic-icon-color-btn",yie="infographic-icon-color-style",J1="#1f1f1f",$O=(e,t,n)=>{bie();const r=vie(t.fill),i=t.fill===void 0&&e.length>1,o=document.createElement("button");o.type="button",o.classList.add(Bc),CO(o,r!=null?r:J1,i);const a=aO({value:r!=null?r:J1,onChange:s=>{CO(o,s,!1),n.executeBatch(e.map(c=>new kn(c,{attributes:{fill:s}})))}});return Ri({target:o,content:a,placement:["top","bottom"],offset:12,trigger:"hover",closeOnOutsideClick:!0,open:!1,padding:0})};function vie(e){if(e)return vr(e)?e:void 0}function CO(e,t,n){e.style.setProperty("--infographic-icon-color",t),n?e.setAttribute("data-mixed","true"):e.removeAttribute("data-mixed")}function bie(){Sn(yie,`
521
+ .${Bc} {
522
522
  position: relative;
523
523
  width: 32px;
524
524
  height: 32px;
@@ -528,15 +528,15 @@ ${t.trim()}
528
528
  cursor: pointer;
529
529
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
530
530
  }
531
- .${va}::after {
531
+ .${Bc}::after {
532
532
  content: '';
533
533
  position: absolute;
534
534
  inset: 6px;
535
535
  border-radius: 50%;
536
- background: var(--infographic-icon-color, ${Hh});
536
+ background: var(--infographic-icon-color, ${J1});
537
537
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
538
538
  }
539
- .${va}[data-mixed="true"]::after {
539
+ .${Bc}[data-mixed="true"]::after {
540
540
  background: repeating-linear-gradient(
541
541
  45deg,
542
542
  #d9d9d9 0,
@@ -545,16 +545,16 @@ ${t.trim()}
545
545
  #f5f5f5 12px
546
546
  );
547
547
  }
548
- `)}var $N=Object.defineProperty,pv=Object.getOwnPropertySymbols,PN=Object.prototype.hasOwnProperty,CN=Object.prototype.propertyIsEnumerable,gv=(t,e,n)=>e in t?$N(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ON=(t,e)=>{for(var n in e||(e={}))PN.call(e,n)&&gv(t,n,e[n]);if(pv)for(var n of pv(e))CN.call(e,n)&&gv(t,n,e[n]);return t};class mv extends Ih{constructor(e){super(),this.options=e,this.name="edit-bar",this.selection=[],this.handleSelectionChanged=({next:n})=>{if(this.selection=n,n.length===0){this.container&&yv(this.container);return}const r=this.getOrCreateEditBar(),i=this.getEditItems(n);if(i.length===0){yv(r);return}MN(r,i),this.placeEditBar(r,n),Rh(r)},this.handleGeometryChanged=({target:n})=>{!this.selection.includes(n)||!this.container||(this.placeEditBar(this.container,this.selection),Rh(this.container))},this.handleHistoryChanged=()=>{!this.container||this.selection.length===0||(this.placeEditBar(this.container,this.selection),Rh(this.container))}}init(e){super.init(e);const{emitter:n}=e;n.on("selection:change",this.handleSelectionChanged),n.on("selection:geometrychange",this.handleGeometryChanged),n.on("history:change",this.handleHistoryChanged)}destroy(){var e;const{emitter:n}=this;n.off("selection:change",this.handleSelectionChanged),n.off("selection:geometrychange",this.handleGeometryChanged),n.off("history:change",this.handleHistoryChanged),(e=this.container)==null||e.remove()}getEditItems(e){let n=!1,r=!1,i=!1;for(const o of e)if(xn(o)?n=!0:zn(o)?r=!0:v6(o)&&(i=!0),n&&r&&i)break;return n&&!r&&!i?e.length===1?this.getTextEditItems(e[0]):this.getTextCollectionEditItems(e):!n&&r&&!i?e.length===1?this.getIconEditItems(e):this.getIconCollectionEditItems(e):!n&&!r&&i?e.length===1?this.getGeometryEditItems(e):this.getGeometryCollectionEditItems(e):this.getElementCollectionEditItems(e)}getOrCreateEditBar(){if(this.container)return this.container;const{style:e,className:n}=this.options||{},r=document.createElement("div");Object.assign(r.style,ON({visibility:"hidden",position:"absolute",left:"0",top:"0",display:"flex",flexFlow:"row",justifyContent:"center",alignItems:"center",height:"40px",minWidth:"40px",minHeight:"40px",borderRadius:"8px",padding:"0 4px",backgroundColor:"#fff",border:"1px solid rgba(239, 240, 240, 0.9)",zIndex:"9999",boxShadow:"rgba(0, 0, 0, 0.08) 0px 1px 2px -2px, rgba(0, 0, 0, 0.04) 0px 2px 6px, rgba(0, 0, 0, 0.02) 0px 4px 8px 1px"},e)),n&&r.classList.add(n),gi(r,Sa),this.container=r;const{getContainer:i}=this.options||{},o=typeof i=="function"?i():i,s=o!=null?o:document.body;return s==null||s.appendChild(r),r}getTextEditItems(e){const{attributes:n={}}=$l(e);return[sv,dv,ov,lv].map(r=>r([e],n,this.commander))}getTextCollectionEditItems(e){const n=xd(e.map(o=>$l(o).attributes||{})),r=[sv,dv,ov,lv].map(o=>o(e,n,this.commander)),i=this.getElementCollectionEditItems(e);return[...r,...i]}getIconEditItems(e){const n=Al(e[0]);return[uv].map(r=>r(e,n,this.commander))}getIconCollectionEditItems(e){const n=xd(e.map(r=>Al(r)));return[uv].map(r=>r(e,n,this.commander))}getGeometryEditItems(e){return[]}getGeometryCollectionEditItems(e){return[...this.getElementCollectionEditItems(e)]}getElementCollectionEditItems(e){return e.length<=1?[]:[FD(e,{},this.commander,{enableDistribution:e.length>2})]}placeEditBar(e,n){var r;if(n.length===0)return;const i=this.editor.getDocument(),o=Dr(n.map(w=>fn(i,w))),a=((r=e.offsetParent)!=null?r:document.documentElement).getBoundingClientRect(),l=document.documentElement.clientHeight,c=e.getBoundingClientRect(),h=8,u=FR(i),f=new DOMPoint(o.x+o.width/2,o.y).matrixTransform(u),p=new DOMPoint(o.x+o.width/2,o.y+o.height).matrixTransform(u),g=(w,_,$)=>Math.min(Math.max(w,_),$);let y=f.x-a.left-c.width/2;y=g(y,0,Math.max(a.width-c.width,0));const m=f.y-h,x=l-p.y-h;let b=m>=c.height||m>=x?f.y-a.top-c.height-h:p.y-a.top+h;b=g(b,0,Math.max(a.height-c.height,0)),e.style.left=`${y}px`,e.style.top=`${b}px`}}function Rh(t){t.style.visibility="visible"}function yv(t){t.style.visibility="hidden"}function MN(t,e){t.innerHTML="",e.forEach(n=>{t.appendChild(n)})}var SN=Object.defineProperty,vv=Object.getOwnPropertySymbols,EN=Object.prototype.hasOwnProperty,IN=Object.prototype.propertyIsEnumerable,xv=(t,e,n)=>e in t?SN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,AN=(t,e)=>{for(var n in e||(e={}))EN.call(e,n)&&xv(t,n,e[n]);if(vv)for(var n of vv(e))IN.call(e,n)&&xv(t,n,e[n]);return t};const to=class en extends Ih{constructor(){super(...arguments),this.name="resize-element",this.target=null,this.handles=[],this.activeHandle=null,this.activePointerId=null,this.handleSelectionChange=({next:e})=>{const n=e.length===1?e[0]:null;n&&xn(n)?(this.target=n,this.updateHandles()):(this.target=null,this.hideHandles(),this.cancelDrag())},this.handleDeactivate=()=>{this.target=null,this.hideHandles(),this.cancelDrag()},this.handleGeometryChange=({target:e})=>{if(!this.target||e!==this.target)return;const n=this.getViewportRect(this.target);this.lastViewportRect=n,this.updateHandles(n)},this.handleHistoryChange=()=>{if(!this.target)return;const e=this.getViewportRect(this.target);this.lastViewportRect=e,this.updateHandles(e)},this.handlePointerMove=e=>{if(!this.target||!this.startPointer||!this.startRect||!this.activeHandle||this.activePointerId!==null&&e.pointerId!==this.activePointerId)return;const n=this.clientToElement(this.target,e.clientX,e.clientY),r=n.x-this.startPointer.x,i=n.y-this.startPointer.y,o=this.clampRect(this.applyDelta(this.startRect,r,i,this.activeHandle),this.activeHandle);this.lastRect=o,this.applyRect(this.target,o),this.lastViewportRect=this.getViewportRect(this.target),this.updateHandles(this.lastViewportRect),this.emitSelectionGeometryChange()},this.handlePointerUp=e=>{if(this.activePointerId!==null&&e.pointerId!==this.activePointerId)return;const n=this.lastRect,r=this.startAttrs,i=n&&this.startRect&&this.hasRectChanged(this.startRect,n);if(this.cancelDrag(),i&&this.target&&n&&r)this.commander.execute(new pn(this.target,{attributes:n},{attributes:r})),this.lastViewportRect=this.getViewportRect(this.target),this.updateHandles(this.lastViewportRect),this.emitSelectionGeometryChange();else if(this.target){const o=this.lastViewportRect||this.getViewportRect(this.target);this.updateHandles(o)}}}init(e){super.init(e);const{emitter:n}=e;n.on("selection:change",this.handleSelectionChange),n.on("selection:geometrychange",this.handleGeometryChange),n.on("history:change",this.handleHistoryChange),n.on("deactivated",this.handleDeactivate)}destroy(){this.cancelDrag(),this.removeContainer();const{emitter:e}=this;e.off("selection:change",this.handleSelectionChange),e.off("selection:geometrychange",this.handleGeometryChange),e.off("history:change",this.handleHistoryChange),e.off("deactivated",this.handleDeactivate)}ensureContainer(){if(this.container)return this.container;const e=bt("g",{"pointer-events":"none"});this.overlay=bt("rect",{fill:"rgba(51, 132, 245, 0.06)",stroke:"none","pointer-events":"none"});const n=bt("rect",{fill:"none",stroke:"#3384F5","stroke-width":1,"stroke-dasharray":"4 2","pointer-events":"none"});e.appendChild(this.overlay),e.appendChild(n),this.outline=n;const r=en.HANDLE_POSITIONS,i={"top-left":"nwse-resize",top:"ns-resize","top-right":"nesw-resize",right:"ew-resize","bottom-right":"nwse-resize",bottom:"ns-resize","bottom-left":"nesw-resize",left:"ew-resize"};return r.forEach((o,s)=>{const l=o==="top"||o==="right"||o==="bottom"||o==="left"?bt("line",{stroke:"transparent","stroke-width":en.LINE_STROKE_WIDTH}):bt("circle",{r:en.HANDLE_SIZE/2,fill:"#3384F5",stroke:"#fff","stroke-width":1.5});l.style.cursor=i[o],l.style.pointerEvents="all",l.addEventListener("pointerdown",c=>this.handlePointerDown(c,o)),l.addEventListener("click",c=>{c.stopPropagation(),c.preventDefault()}),e.appendChild(l),this.handles[s]=l}),this.editor.getDocument().appendChild(e),this.container=e,e}updateHandles(e){if(!this.target){this.hideHandles();return}const n=e||this.getViewportRect(this.target)||this.lastViewportRect||null;if(!n){this.hideHandles();return}this.lastViewportRect=n;const r=this.ensureContainer();r.style.display="block",this.outline.style.display="block",Qt(this.outline,n),this.overlay&&(this.overlay.style.display="block",Qt(this.overlay,n));const i=this.getHandlePoints(n);this.handles.forEach((o,s)=>{const[a,l]=i[s];if(o.tagName==="circle")Qt(o,{cx:a,cy:l});else{const c=en.HANDLE_POSITIONS[s],h=this.getHandleLine(n,c);Qt(o,h)}o.style.display="block"})}hideHandles(){this.container&&(this.container.style.display="none"),this.outline&&(this.outline.style.display="none"),this.overlay&&(this.overlay.style.display="none"),this.handles.forEach(e=>e.style.display="none")}removeContainer(){var e;(e=this.container)==null||e.remove(),this.container=void 0,this.outline=void 0,this.overlay=void 0,this.handles=[]}handlePointerDown(e,n){if(!this.target||e.button!==0&&e.pointerType==="mouse")return;e.stopPropagation(),e.preventDefault();const r=this.clientToElement(this.target,e.clientX,e.clientY);this.activeHandle=n,this.activePointerId=e.pointerId,this.startPointer=r;const i=this.getCurrentAttributes(this.target);this.startRect=i,this.startAttrs=AN({},i),this.lastRect=i,this.lastViewportRect=this.getViewportRect(this.target),window.addEventListener("pointermove",this.handlePointerMove),window.addEventListener("pointerup",this.handlePointerUp),window.addEventListener("pointercancel",this.handlePointerUp)}cancelDrag(){this.activeHandle=null,this.activePointerId=null,this.startPointer=void 0,this.startRect=void 0,this.startAttrs=void 0,this.lastRect=void 0,this.lastViewportRect=void 0,window.removeEventListener("pointermove",this.handlePointerMove),window.removeEventListener("pointerup",this.handlePointerUp),window.removeEventListener("pointercancel",this.handlePointerUp)}applyRect(e,n){Qt(e,{x:n.x,y:n.y,width:n.width,height:n.height})}getViewportRect(e){const{x:n,y:r,width:i,height:o}=fn(this.editor.getDocument(),e);return{x:n,y:r,width:i,height:o}}clientToElement(e,n,r){var i,o;const s=((i=e.getScreenCTM())==null?void 0:i.inverse())||((o=this.editor.getDocument().getScreenCTM())==null?void 0:o.inverse())||new DOMMatrix;return new DOMPoint(n,r).matrixTransform(s)}getCurrentAttributes(e){const n=De(e,["x","y","width","height"],!1),r=this.getViewportRect(e),i=(o,s)=>{const a=o!==null?Number(o):NaN;return Number.isFinite(a)?a:s};return{x:i(n.x,r.x),y:i(n.y,r.y),width:i(n.width,r.width),height:i(n.height,r.height)}}getHandlePoints(e){const{x:n,y:r,width:i,height:o}=e,s=n+i/2,a=r+o/2;return[[n,r],[s,r],[n+i,r],[n+i,a],[n+i,r+o],[s,r+o],[n,r+o],[n,a]]}applyDelta(e,n,r,i){let{x:o,y:s,width:a,height:l}=e;switch(i){case"top-left":o+=n,s+=r,a-=n,l-=r;break;case"top":s+=r,l-=r;break;case"top-right":s+=r,a+=n,l-=r;break;case"right":a+=n;break;case"bottom-right":a+=n,l+=r;break;case"bottom":l+=r;break;case"bottom-left":o+=n,a-=n,l+=r;break;case"left":o+=n,a-=n;break}return{x:o,y:s,width:a,height:l}}clampRect(e,n){let{x:r,y:i,width:o,height:s}=e;if(o<en.MIN_SIZE){const a=en.MIN_SIZE-o;(n==="top-left"||n==="bottom-left"||n==="left")&&(r-=a),o=en.MIN_SIZE}if(s<en.MIN_SIZE){const a=en.MIN_SIZE-s;(n==="top-left"||n==="top-right"||n==="top")&&(i-=a),s=en.MIN_SIZE}return{x:r,y:i,width:o,height:s}}hasRectChanged(e,n){return Math.abs(e.x-n.x)>.5||Math.abs(e.y-n.y)>.5||Math.abs(e.width-n.width)>.5||Math.abs(e.height-n.height)>.5}emitSelectionGeometryChange(){this.target&&this.lastViewportRect&&this.emitter.emit("selection:geometrychange",{type:"selection:geometrychange",target:this.target,rect:this.lastViewportRect})}getHandleLine(e,n){const{x:r,y:i,width:o,height:s}=e;switch(n){case"top":return{x1:r,y1:i,x2:r+o,y2:i};case"right":return{x1:r+o,y1:i,x2:r+o,y2:i+s};case"bottom":return{x1:r,y1:i+s,x2:r+o,y2:i+s};default:return{x1:r,y1:i,x2:r,y2:i+s}}}};to.HANDLE_SIZE=10,to.LINE_STROKE_WIDTH=8,to.MIN_SIZE=1,to.HANDLE_POSITIONS=["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"];let bv=to;function wv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Dh,_v;function TN(){if(_v)return Dh;_v=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;Dh=function(r,i){i=i||{};var o=1,s=1;function a(z){var M=z.match(/\n/g);M&&(o+=M.length);var H=z.lastIndexOf(`
549
- `);s=~H?z.length-H:s+z.length}function l(){var z={line:o,column:s};return function(M){return M.position=new c(z),x(),M}}function c(z){this.start=z,this.end={line:o,column:s},this.source=i.source}c.prototype.content=r;var h=[];function u(z){var M=new Error(i.source+":"+o+":"+s+": "+z);if(M.reason=z,M.filename=i.source,M.line=o,M.column=s,M.source=r,i.silent)h.push(M);else throw M}function f(){var z=y();return{type:"stylesheet",stylesheet:{source:i.source,rules:z,parsingErrors:h}}}function p(){return m(/^{\s*/)}function g(){return m(/^}/)}function y(){var z,M=[];for(x(),v(M);r.length&&r.charAt(0)!="}"&&(z=j()||X());)z!==!1&&(M.push(z),v(M));return M}function m(z){var M=z.exec(r);if(M){var H=M[0];return a(H),r=r.slice(H.length),M}}function x(){m(/^\s*/)}function v(z){var M;for(z=z||[];M=b();)M!==!1&&z.push(M);return z}function b(){var z=l();if(!(r.charAt(0)!="/"||r.charAt(1)!="*")){for(var M=2;r.charAt(M)!=""&&(r.charAt(M)!="*"||r.charAt(M+1)!="/");)++M;if(M+=2,r.charAt(M-1)==="")return u("End of comment missing");var H=r.slice(2,M-2);return s+=2,a(H),r=r.slice(M),s+=2,z({type:"comment",comment:H})}}function w(){var z=m(/^([^{]+)/);if(z)return e(z[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(M){return M.replace(/,/g,"‌")}).split(/\s*(?![^(]*\)),\s*/).map(function(M){return M.replace(/\u200C/g,",")})}function _(){var z=l(),M=m(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(M){if(M=e(M[0]),!m(/^:\s*/))return u("property missing ':'");var H=m(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),B=z({type:"declaration",property:M.replace(t,""),value:H?e(H[0]).replace(t,""):""});return m(/^[;\s]*/),B}}function $(){var z=[];if(!p())return u("missing '{'");v(z);for(var M;M=_();)M!==!1&&(z.push(M),v(z));return g()?z:u("missing '}'")}function P(){for(var z,M=[],H=l();z=m(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)M.push(z[1]),m(/^,\s*/);if(M.length)return H({type:"keyframe",values:M,declarations:$()})}function C(){var z=l(),H=m(/^@([-\w]+)?keyframes\s*/);if(H){var M=H[1],H=m(/^([-\w]+)\s*/);if(!H)return u("@keyframes missing name");var B=H[1];if(!p())return u("@keyframes missing '{'");for(var q,V=v();q=P();)V.push(q),V=V.concat(v());return g()?z({type:"keyframes",name:B,vendor:M,keyframes:V}):u("@keyframes missing '}'")}}function T(){var z=l(),M=m(/^@supports *([^{]+)/);if(M){var H=e(M[1]);if(!p())return u("@supports missing '{'");var B=v().concat(y());return g()?z({type:"supports",supports:H,rules:B}):u("@supports missing '}'")}}function E(){var z=l(),M=m(/^@host\s*/);if(M){if(!p())return u("@host missing '{'");var H=v().concat(y());return g()?z({type:"host",rules:H}):u("@host missing '}'")}}function S(){var z=l(),M=m(/^@media *([^{]+)/);if(M){var H=e(M[1]);if(!p())return u("@media missing '{'");var B=v().concat(y());return g()?z({type:"media",media:H,rules:B}):u("@media missing '}'")}}function R(){var z=l(),M=m(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(M)return z({type:"custom-media",name:e(M[1]),media:e(M[2])})}function O(){var z=l(),M=m(/^@page */);if(M){var H=w()||[];if(!p())return u("@page missing '{'");for(var B=v(),q;q=_();)B.push(q),B=B.concat(v());return g()?z({type:"page",selectors:H,declarations:B}):u("@page missing '}'")}}function A(){var z=l(),M=m(/^@([-\w]+)?document *([^{]+)/);if(M){var H=e(M[1]),B=e(M[2]);if(!p())return u("@document missing '{'");var q=v().concat(y());return g()?z({type:"document",document:B,vendor:H,rules:q}):u("@document missing '}'")}}function F(){var z=l(),M=m(/^@font-face\s*/);if(M){if(!p())return u("@font-face missing '{'");for(var H=v(),B;B=_();)H.push(B),H=H.concat(v());return g()?z({type:"font-face",declarations:H}):u("@font-face missing '}'")}}var L=N("import"),D=N("charset"),k=N("namespace");function N(z){var M=new RegExp("^@"+z+"\\s*([^;]+);");return function(){var H=l(),B=m(M);if(B){var q={type:z};return q[z]=B[1].trim(),H(q)}}}function j(){if(r[0]=="@")return C()||S()||R()||T()||L()||D()||k()||A()||O()||E()||F()}function X(){var z=l(),M=w();return M?(v(),z({type:"rule",selectors:M,declarations:$()})):u("selector missing")}return n(f())};function e(r){return r?r.replace(/^\s+|\s+$/g,""):""}function n(r,i){var o=r&&typeof r.type=="string",s=o?r:i;for(var a in r){var l=r[a];Array.isArray(l)?l.forEach(function(c){n(c,s)}):l&&typeof l=="object"&&n(l,s)}return o&&Object.defineProperty(r,"parent",{configurable:!0,writable:!0,enumerable:!1,value:i||null}),r}return Dh}var kN=TN();const LN=wv(kN);var Zr=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function zN(t,e=!0){return Zr(this,null,function*(){const n=HN(t);if(n.size===0)return;const r=[];yield Promise.all(Array.from(n).map(i=>Zr(null,null,function*(){const o=DN(i);if(!o.length)return;const s=yield RN(i);if(!s.length)return;const a=yield Promise.all(s.map(l=>Zr(null,null,function*(){const c=jN(l),h=c["unicode-range"].replace(/\s/g,"");if(!o.find(y=>y.unicodeRange&&y.unicodeRange.replace(/\s/g,"")===h))return null;const f=v_(c["font-family"],sf(c["font-weight"]));if(!f)return null;const p=c.src.match(/url\(["']?(.*?\.woff2)[^"']*["']?\)/);if(!(p!=null&&p[1]))return null;const g=Tl(f,p[1]);if(e){const y=yield FN(g);c.src=`url(${y}) format('woff2')`}else c.src=`url(${g}) format('woff2')`;return c})));r.push(...a.filter(Boolean)||[])}))),r.length>0&&WN(t,r)})}function HN(t){const e=new Set,n=i=>{i&&Kn(i).forEach(o=>{const s=Er(o);s&&e.add(s)})};n(t.getAttribute("font-family"));const r=t.querySelectorAll("foreignObject span");for(const i of r)n(i.style.fontFamily);return e}function RN(t){return Zr(this,null,function*(){const e=zf(t),n=[];return yield Promise.allSettled(e.map(r=>Zr(null,null,function*(){var i;const o=yield Io(r).then(s=>s.text()).then(s=>LN(s)).catch(()=>(console.error(`Failed to fetch or parse font CSS: ${r}`),null));(i=o==null?void 0:o.stylesheet)==null||i.rules.forEach(s=>{if(s.type==="font-face"){const a=NN(s);n.push(a)}})}))),n})}function DN(t){const e=[],n=Kn(t).map(r=>Er(r));return document.fonts.forEach(r=>{n.includes(Er(r.family))&&r.status==="loaded"&&e.push(r)}),e}function NN(t){const e=t.declarations||[],n={};return e.forEach(r=>{const{property:i,value:o}=r;i&&o&&(n[i]=o)}),n}function jN(t){var e,n,r,i,o,s;return{"font-family":(e=t["font-family"])!=null?e:"",src:(n=t.src)!=null?n:"","font-style":(r=t["font-style"])!=null?r:"normal","font-display":(i=t["font-display"])!=null?i:"swap","font-weight":(o=t["font-weight"])!=null?o:"400","unicode-range":(s=t["unicode-range"])!=null?s:"U+0-FFFF"}}function WN(t,e){const n=[],r=new Set;for(const s of e){const a=[s["font-family"],s["font-weight"],s["font-style"],s["unicode-range"],s.src].join("|");r.has(a)||(r.add(a),n.push(s))}if(n.length===0)return;const i=bt("style",{type:"text/css"});i.innerHTML=n.map(s=>`
548
+ `)}var _ie=Object.defineProperty,OO=Object.getOwnPropertySymbols,xie=Object.prototype.hasOwnProperty,wie=Object.prototype.propertyIsEnumerable,SO=(e,t,n)=>t in e?_ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pie=(e,t)=>{for(var n in t||(t={}))xie.call(t,n)&&SO(e,n,t[n]);if(OO)for(var n of OO(t))wie.call(t,n)&&SO(e,n,t[n]);return e};class MO extends Y1{constructor(t){super(),this.options=t,this.name="edit-bar",this.selection=[],this.handleSelectionChanged=({next:n})=>{if(this.selection=n,n.length===0){this.container&&EO(this.container);return}const r=this.getOrCreateEditBar(),i=this.getEditItems(n);if(i.length===0){EO(r);return}$ie(r,i),this.placeEditBar(r,n),em(r)},this.handleGeometryChanged=({target:n})=>{!this.selection.includes(n)||!this.container||(this.placeEditBar(this.container,this.selection),em(this.container))},this.handleHistoryChanged=()=>{!this.container||this.selection.length===0||(this.placeEditBar(this.container,this.selection),em(this.container))}}init(t){super.init(t);const{emitter:n}=t;n.on("selection:change",this.handleSelectionChanged),n.on("selection:geometrychange",this.handleGeometryChanged),n.on("history:change",this.handleHistoryChanged)}destroy(){var t;const{emitter:n}=this;n.off("selection:change",this.handleSelectionChanged),n.off("selection:geometrychange",this.handleGeometryChanged),n.off("history:change",this.handleHistoryChanged),(t=this.container)==null||t.remove()}getEditItems(t){let n=!1,r=!1,i=!1;for(const o of t)if(jn(o)?n=!0:ir(o)?r=!0:EH(o)&&(i=!0),n&&r&&i)break;return n&&!r&&!i?t.length===1?this.getTextEditItems(t[0]):this.getTextCollectionEditItems(t):!n&&r&&!i?t.length===1?this.getIconEditItems(t):this.getIconCollectionEditItems(t):!n&&!r&&i?t.length===1?this.getGeometryEditItems(t):this.getGeometryCollectionEditItems(t):this.getElementCollectionEditItems(t)}getOrCreateEditBar(){if(this.container)return this.container;const{style:t,className:n}=this.options||{},r=document.createElement("div");Object.assign(r.style,Pie({visibility:"hidden",position:"absolute",left:"0",top:"0",display:"flex",flexFlow:"row",justifyContent:"center",alignItems:"center",height:"40px",minWidth:"40px",minHeight:"40px",borderRadius:"8px",padding:"0 4px",backgroundColor:"#fff",border:"1px solid rgba(239, 240, 240, 0.9)",zIndex:"9999",boxShadow:"rgba(0, 0, 0, 0.08) 0px 1px 2px -2px, rgba(0, 0, 0, 0.04) 0px 2px 6px, rgba(0, 0, 0, 0.02) 0px 4px 8px 1px"},t)),n&&r.classList.add(n),uo(r,ol),this.container=r;const{getContainer:i}=this.options||{},o=typeof i=="function"?i():i,a=o!=null?o:document.body;return a==null||a.appendChild(r),r}getTextEditItems(t){const{attributes:n={}}=Nu(t);return[vO,PO,yO,_O].map(r=>r([t],n,this.commander))}getTextCollectionEditItems(t){const n=Dm(t.map(o=>Nu(o).attributes||{})),r=[vO,PO,yO,_O].map(o=>o(t,n,this.commander)),i=this.getElementCollectionEditItems(t);return[...r,...i]}getIconEditItems(t){const n=Fu(t[0]);return[$O].map(r=>r(t,n,this.commander))}getIconCollectionEditItems(t){const n=Dm(t.map(r=>Fu(r)));return[$O].map(r=>r(t,n,this.commander))}getGeometryEditItems(t){return[]}getGeometryCollectionEditItems(t){return[...this.getElementCollectionEditItems(t)]}getElementCollectionEditItems(t){return t.length<=1?[]:[Dre(t,{},this.commander,{enableDistribution:t.length>2})]}placeEditBar(t,n){var r;if(n.length===0)return;const i=mi(n.map(_=>_.getBoundingClientRect())),o=(r=t.offsetParent)!=null?r:document.documentElement,a=document.documentElement.clientHeight,s=document.documentElement.clientWidth,c=t.getBoundingClientRect(),l=8,u={x:i.x+i.width/2,y:i.y},h={y:i.y+i.height},d=(_,x,w)=>Math.min(Math.max(_,x),w),f=u.y-l,g=a-h.y-l,y=f>=c.height||f>=g;if(o===document.body||o===document.documentElement){const _=window.scrollX||document.documentElement.scrollLeft,x=window.scrollY||document.documentElement.scrollTop;let w=_+u.x-c.width/2;w=d(w,_,_+Math.max(s-c.width,0));let P=y?x+u.y-c.height-l:x+h.y+l;P=d(P,x,x+Math.max(a-c.height,0)),t.style.left=`${w}px`,t.style.top=`${P}px`;return}const m=o.getBoundingClientRect();let v=u.x-m.left-c.width/2;v=d(v,0,Math.max(m.width-c.width,0));let b=y?u.y-m.top-c.height-l:h.y-m.top+l;b=d(b,0,Math.max(m.height-c.height,0)),t.style.left=`${v}px`,t.style.top=`${b}px`}}function em(e){e.style.visibility="visible"}function EO(e){e.style.visibility="hidden"}function $ie(e,t){e.innerHTML="",t.forEach(n=>{e.appendChild(n)})}var Cie=Object.defineProperty,IO=Object.getOwnPropertySymbols,Oie=Object.prototype.hasOwnProperty,Sie=Object.prototype.propertyIsEnumerable,AO=(e,t,n)=>t in e?Cie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mie=(e,t)=>{for(var n in t||(t={}))Oie.call(t,n)&&AO(e,n,t[n]);if(IO)for(var n of IO(t))Sie.call(t,n)&&AO(e,n,t[n]);return e};const Ko=class xn extends Y1{constructor(){super(...arguments),this.name="resize-element",this.target=null,this.handles=[],this.activeHandle=null,this.activePointerId=null,this.handleSelectionChange=({next:t})=>{const n=t.length===1?t[0]:null;n&&jn(n)?(this.target=n,this.updateHandles()):(this.target=null,this.hideHandles(),this.cancelDrag())},this.handleDeactivate=()=>{this.target=null,this.hideHandles(),this.cancelDrag()},this.handleGeometryChange=({target:t})=>{if(!this.target||t!==this.target)return;const n=this.getViewportRect(this.target);this.lastViewportRect=n,this.updateHandles(n)},this.handleHistoryChange=()=>{if(!this.target)return;const t=this.getViewportRect(this.target);this.lastViewportRect=t,this.updateHandles(t)},this.handlePointerMove=t=>{if(!this.target||!this.startPointer||!this.startRect||!this.activeHandle||this.activePointerId!==null&&t.pointerId!==this.activePointerId)return;const n=this.clientToElement(this.target,t.clientX,t.clientY),r=n.x-this.startPointer.x,i=n.y-this.startPointer.y,o=this.clampRect(this.applyDelta(this.startRect,r,i,this.activeHandle),this.activeHandle);this.lastRect=o,this.applyRect(this.target,o),this.lastViewportRect=this.getViewportRect(this.target),this.updateHandles(this.lastViewportRect),this.emitSelectionGeometryChange()},this.handlePointerUp=t=>{if(this.activePointerId!==null&&t.pointerId!==this.activePointerId)return;const n=this.lastRect,r=this.startAttrs,i=n&&this.startRect&&this.hasRectChanged(this.startRect,n);if(this.cancelDrag(),i&&this.target&&n&&r)this.commander.execute(new kn(this.target,{attributes:n},{attributes:r})),this.lastViewportRect=this.getViewportRect(this.target),this.updateHandles(this.lastViewportRect),this.emitSelectionGeometryChange();else if(this.target){const o=this.lastViewportRect||this.getViewportRect(this.target);this.updateHandles(o)}}}init(t){super.init(t);const{emitter:n}=t;n.on("selection:change",this.handleSelectionChange),n.on("selection:geometrychange",this.handleGeometryChange),n.on("history:change",this.handleHistoryChange),n.on("deactivated",this.handleDeactivate)}destroy(){this.cancelDrag(),this.removeContainer();const{emitter:t}=this;t.off("selection:change",this.handleSelectionChange),t.off("selection:geometrychange",this.handleGeometryChange),t.off("history:change",this.handleHistoryChange),t.off("deactivated",this.handleDeactivate)}ensureContainer(){if(this.container)return this.container;const t=Se("g",{"pointer-events":"none"});this.overlay=Se("rect",{fill:"rgba(51, 132, 245, 0.06)",stroke:"none","pointer-events":"none"});const n=Se("rect",{fill:"none",stroke:"#3384F5","stroke-width":1,"stroke-dasharray":"4 2","pointer-events":"none"});t.appendChild(this.overlay),t.appendChild(n),this.outline=n;const r=xn.HANDLE_POSITIONS,i={"top-left":"nwse-resize",top:"ns-resize","top-right":"nesw-resize",right:"ew-resize","bottom-right":"nwse-resize",bottom:"ns-resize","bottom-left":"nesw-resize",left:"ew-resize"};return r.forEach((o,a)=>{const c=o==="top"||o==="right"||o==="bottom"||o==="left"?Se("line",{stroke:"transparent","stroke-width":xn.LINE_STROKE_WIDTH}):Se("circle",{r:xn.HANDLE_SIZE/2,fill:"#3384F5",stroke:"#fff","stroke-width":1.5});c.style.cursor=i[o],c.style.pointerEvents="all",c.addEventListener("pointerdown",l=>this.handlePointerDown(l,o)),c.addEventListener("click",l=>{l.stopPropagation(),l.preventDefault()}),t.appendChild(c),this.handles[a]=c}),this.editor.getDocument().appendChild(t),this.container=t,t}updateHandles(t){if(!this.target){this.hideHandles();return}const n=t||this.getViewportRect(this.target)||this.lastViewportRect||null;if(!n){this.hideHandles();return}this.lastViewportRect=n;const r=this.ensureContainer();r.style.display="block",this.outline.style.display="block",ut(this.outline,n),this.overlay&&(this.overlay.style.display="block",ut(this.overlay,n));const i=this.getHandlePoints(n);this.handles.forEach((o,a)=>{const[s,c]=i[a];if(o.tagName==="circle")ut(o,{cx:s,cy:c});else{const l=xn.HANDLE_POSITIONS[a],u=this.getHandleLine(n,l);ut(o,u)}o.style.display="block"})}hideHandles(){this.container&&(this.container.style.display="none"),this.outline&&(this.outline.style.display="none"),this.overlay&&(this.overlay.style.display="none"),this.handles.forEach(t=>t.style.display="none")}removeContainer(){var t;(t=this.container)==null||t.remove(),this.container=void 0,this.outline=void 0,this.overlay=void 0,this.handles=[]}handlePointerDown(t,n){if(!this.target||t.button!==0&&t.pointerType==="mouse")return;t.stopPropagation(),t.preventDefault();const r=this.clientToElement(this.target,t.clientX,t.clientY);this.activeHandle=n,this.activePointerId=t.pointerId,this.startPointer=r;const i=this.getCurrentAttributes(this.target);this.startRect=i,this.startAttrs=Mie({},i),this.lastRect=i,this.lastViewportRect=this.getViewportRect(this.target),window.addEventListener("pointermove",this.handlePointerMove),window.addEventListener("pointerup",this.handlePointerUp),window.addEventListener("pointercancel",this.handlePointerUp)}cancelDrag(){this.activeHandle=null,this.activePointerId=null,this.startPointer=void 0,this.startRect=void 0,this.startAttrs=void 0,this.lastRect=void 0,this.lastViewportRect=void 0,window.removeEventListener("pointermove",this.handlePointerMove),window.removeEventListener("pointerup",this.handlePointerUp),window.removeEventListener("pointercancel",this.handlePointerUp)}applyRect(t,n){ut(t,{x:n.x,y:n.y,width:n.width,height:n.height})}getViewportRect(t){const{x:n,y:r,width:i,height:o}=Vn(this.editor.getDocument(),t);return{x:n,y:r,width:i,height:o}}clientToElement(t,n,r){var i,o;const a=((i=t.getScreenCTM())==null?void 0:i.inverse())||((o=this.editor.getDocument().getScreenCTM())==null?void 0:o.inverse())||new DOMMatrix;return new DOMPoint(n,r).matrixTransform(a)}getCurrentAttributes(t){const n=an(t,["x","y","width","height"],!1),r=this.getViewportRect(t),i=(o,a)=>{const s=o!==null?Number(o):NaN;return Number.isFinite(s)?s:a};return{x:i(n.x,r.x),y:i(n.y,r.y),width:i(n.width,r.width),height:i(n.height,r.height)}}getHandlePoints(t){const{x:n,y:r,width:i,height:o}=t,a=n+i/2,s=r+o/2;return[[n,r],[a,r],[n+i,r],[n+i,s],[n+i,r+o],[a,r+o],[n,r+o],[n,s]]}applyDelta(t,n,r,i){let{x:o,y:a,width:s,height:c}=t;switch(i){case"top-left":o+=n,a+=r,s-=n,c-=r;break;case"top":a+=r,c-=r;break;case"top-right":a+=r,s+=n,c-=r;break;case"right":s+=n;break;case"bottom-right":s+=n,c+=r;break;case"bottom":c+=r;break;case"bottom-left":o+=n,s-=n,c+=r;break;case"left":o+=n,s-=n;break}return{x:o,y:a,width:s,height:c}}clampRect(t,n){let{x:r,y:i,width:o,height:a}=t;if(o<xn.MIN_SIZE){const s=xn.MIN_SIZE-o;(n==="top-left"||n==="bottom-left"||n==="left")&&(r-=s),o=xn.MIN_SIZE}if(a<xn.MIN_SIZE){const s=xn.MIN_SIZE-a;(n==="top-left"||n==="top-right"||n==="top")&&(i-=s),a=xn.MIN_SIZE}return{x:r,y:i,width:o,height:a}}hasRectChanged(t,n){return Math.abs(t.x-n.x)>.5||Math.abs(t.y-n.y)>.5||Math.abs(t.width-n.width)>.5||Math.abs(t.height-n.height)>.5}emitSelectionGeometryChange(){this.target&&this.lastViewportRect&&this.emitter.emit("selection:geometrychange",{type:"selection:geometrychange",target:this.target,rect:this.lastViewportRect})}getHandleLine(t,n){const{x:r,y:i,width:o,height:a}=t;switch(n){case"top":return{x1:r,y1:i,x2:r+o,y2:i};case"right":return{x1:r+o,y1:i,x2:r+o,y2:i+a};case"bottom":return{x1:r,y1:i+a,x2:r+o,y2:i+a};default:return{x1:r,y1:i,x2:r,y2:i+a}}}};Ko.HANDLE_SIZE=10,Ko.LINE_STROKE_WIDTH=8,Ko.MIN_SIZE=1,Ko.HANDLE_POSITIONS=["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"];let TO=Ko;function kO(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tm,RO;function Eie(){if(RO)return tm;RO=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;tm=function(r,i){i=i||{};var o=1,a=1;function s(D){var k=D.match(/\n/g);k&&(o+=k.length);var A=D.lastIndexOf(`
549
+ `);a=~A?D.length-A:a+D.length}function c(){var D={line:o,column:a};return function(k){return k.position=new l(D),v(),k}}function l(D){this.start=D,this.end={line:o,column:a},this.source=i.source}l.prototype.content=r;var u=[];function h(D){var k=new Error(i.source+":"+o+":"+a+": "+D);if(k.reason=D,k.filename=i.source,k.line=o,k.column=a,k.source=r,i.silent)u.push(k);else throw k}function d(){var D=y();return{type:"stylesheet",stylesheet:{source:i.source,rules:D,parsingErrors:u}}}function f(){return m(/^{\s*/)}function g(){return m(/^}/)}function y(){var D,k=[];for(v(),b(k);r.length&&r.charAt(0)!="}"&&(D=B()||X());)D!==!1&&(k.push(D),b(k));return k}function m(D){var k=D.exec(r);if(k){var A=k[0];return s(A),r=r.slice(A.length),k}}function v(){m(/^\s*/)}function b(D){var k;for(D=D||[];k=_();)k!==!1&&D.push(k);return D}function _(){var D=c();if(!(r.charAt(0)!="/"||r.charAt(1)!="*")){for(var k=2;r.charAt(k)!=""&&(r.charAt(k)!="*"||r.charAt(k+1)!="/");)++k;if(k+=2,r.charAt(k-1)==="")return h("End of comment missing");var A=r.slice(2,k-2);return a+=2,s(A),r=r.slice(k),a+=2,D({type:"comment",comment:A})}}function x(){var D=m(/^([^{]+)/);if(D)return t(D[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(k){return k.replace(/,/g,"‌")}).split(/\s*(?![^(]*\)),\s*/).map(function(k){return k.replace(/\u200C/g,",")})}function w(){var D=c(),k=m(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(k){if(k=t(k[0]),!m(/^:\s*/))return h("property missing ':'");var A=m(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),L=D({type:"declaration",property:k.replace(e,""),value:A?t(A[0]).replace(e,""):""});return m(/^[;\s]*/),L}}function P(){var D=[];if(!f())return h("missing '{'");b(D);for(var k;k=w();)k!==!1&&(D.push(k),b(D));return g()?D:h("missing '}'")}function $(){for(var D,k=[],A=c();D=m(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)k.push(D[1]),m(/^,\s*/);if(k.length)return A({type:"keyframe",values:k,declarations:P()})}function C(){var D=c(),A=m(/^@([-\w]+)?keyframes\s*/);if(A){var k=A[1],A=m(/^([-\w]+)\s*/);if(!A)return h("@keyframes missing name");var L=A[1];if(!f())return h("@keyframes missing '{'");for(var N,q=b();N=$();)q.push(N),q=q.concat(b());return g()?D({type:"keyframes",name:L,vendor:k,keyframes:q}):h("@keyframes missing '}'")}}function M(){var D=c(),k=m(/^@supports *([^{]+)/);if(k){var A=t(k[1]);if(!f())return h("@supports missing '{'");var L=b().concat(y());return g()?D({type:"supports",supports:A,rules:L}):h("@supports missing '}'")}}function S(){var D=c(),k=m(/^@host\s*/);if(k){if(!f())return h("@host missing '{'");var A=b().concat(y());return g()?D({type:"host",rules:A}):h("@host missing '}'")}}function E(){var D=c(),k=m(/^@media *([^{]+)/);if(k){var A=t(k[1]);if(!f())return h("@media missing '{'");var L=b().concat(y());return g()?D({type:"media",media:A,rules:L}):h("@media missing '}'")}}function I(){var D=c(),k=m(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(k)return D({type:"custom-media",name:t(k[1]),media:t(k[2])})}function O(){var D=c(),k=m(/^@page */);if(k){var A=x()||[];if(!f())return h("@page missing '{'");for(var L=b(),N;N=w();)L.push(N),L=L.concat(b());return g()?D({type:"page",selectors:A,declarations:L}):h("@page missing '}'")}}function T(){var D=c(),k=m(/^@([-\w]+)?document *([^{]+)/);if(k){var A=t(k[1]),L=t(k[2]);if(!f())return h("@document missing '{'");var N=b().concat(y());return g()?D({type:"document",document:L,vendor:A,rules:N}):h("@document missing '}'")}}function F(){var D=c(),k=m(/^@font-face\s*/);if(k){if(!f())return h("@font-face missing '{'");for(var A=b(),L;L=w();)A.push(L),A=A.concat(b());return g()?D({type:"font-face",declarations:A}):h("@font-face missing '}'")}}var z=W("import"),j=W("charset"),H=W("namespace");function W(D){var k=new RegExp("^@"+D+"\\s*([^;]+);");return function(){var A=c(),L=m(k);if(L){var N={type:D};return N[D]=L[1].trim(),A(N)}}}function B(){if(r[0]=="@")return C()||E()||I()||M()||z()||j()||H()||T()||O()||S()||F()}function X(){var D=c(),k=x();return k?(b(),D({type:"rule",selectors:k,declarations:P()})):h("selector missing")}return n(d())};function t(r){return r?r.replace(/^\s+|\s+$/g,""):""}function n(r,i){var o=r&&typeof r.type=="string",a=o?r:i;for(var s in r){var c=r[s];Array.isArray(c)?c.forEach(function(l){n(l,a)}):c&&typeof c=="object"&&n(c,a)}return o&&Object.defineProperty(r,"parent",{configurable:!0,writable:!0,enumerable:!1,value:i||null}),r}return tm}var Iie=Eie();const Aie=kO(Iie);var Li=(e,t,n)=>new Promise((r,i)=>{var o=c=>{try{s(n.next(c))}catch(l){i(l)}},a=c=>{try{s(n.throw(c))}catch(l){i(l)}},s=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);s((n=n.apply(e,t)).next())});function Tie(e,t=!0){return Li(this,null,function*(){const n=kie(e);if(n.size===0)return;const r=[];yield Promise.all(Array.from(n).map(i=>Li(null,null,function*(){const o=Lie(i);if(!o.length)return;const a=yield Rie(i);if(!a.length)return;const s=yield Promise.all(a.map(c=>Li(null,null,function*(){const l=Nie(c),u=l["unicode-range"].replace(/\s/g,"");if(!o.find(y=>y.unicodeRange&&y.unicodeRange.replace(/\s/g,"")===u))return null;const d=FL(l["font-family"],gv(l["font-weight"]));if(!d)return null;const f=l.src.match(/url\(["']?(.*?\.woff2)[^"']*["']?\)/);if(!(f!=null&&f[1]))return null;const g=Wu(d,f[1]);if(t){const y=yield Die(g);l.src=`url(${y}) format('woff2')`}else l.src=`url(${g}) format('woff2')`;return l})));r.push(...s.filter(Boolean)||[])}))),r.length>0&&Hie(e,r)})}function kie(e){const t=new Set,n=i=>{i&&$r(i).forEach(o=>{const a=ci(o);a&&t.add(a)})};n(e.getAttribute("font-family"));const r=e.querySelectorAll("foreignObject span");for(const i of r)n(i.style.fontFamily);return t}function Rie(e){return Li(this,null,function*(){const t=$v(e),n=[];return yield Promise.allSettled(t.map(r=>Li(null,null,function*(){var i;const o=yield ts(r).then(a=>a.text()).then(a=>Aie(a)).catch(()=>(console.error(`Failed to fetch or parse font CSS: ${r}`),null));(i=o==null?void 0:o.stylesheet)==null||i.rules.forEach(a=>{if(a.type==="font-face"){const s=zie(a);n.push(s)}})}))),n})}function Lie(e){const t=[],n=$r(e).map(r=>ci(r));return document.fonts.forEach(r=>{n.includes(ci(r.family))&&r.status==="loaded"&&t.push(r)}),t}function zie(e){const t=e.declarations||[],n={};return t.forEach(r=>{const{property:i,value:o}=r;i&&o&&(n[i]=o)}),n}function Nie(e){var t,n,r,i,o,a;return{"font-family":(t=e["font-family"])!=null?t:"",src:(n=e.src)!=null?n:"","font-style":(r=e["font-style"])!=null?r:"normal","font-display":(i=e["font-display"])!=null?i:"swap","font-weight":(o=e["font-weight"])!=null?o:"400","unicode-range":(a=e["unicode-range"])!=null?a:"U+0-FFFF"}}function Hie(e,t){const n=[],r=new Set;for(const a of t){const s=[a["font-family"],a["font-weight"],a["font-style"],a["unicode-range"],a.src].join("|");r.has(s)||(r.add(s),n.push(a))}if(n.length===0)return;const i=Se("style",{type:"text/css"});i.innerHTML=n.map(a=>`
550
550
  @font-face {
551
- font-family: ${s["font-family"]};
552
- src: ${s.src};
553
- font-style: ${s["font-style"]};
554
- font-weight: ${s["font-weight"]};
555
- font-display: ${s["font-display"]};
556
- unicode-range: ${s["unicode-range"]};
551
+ font-family: ${a["font-family"]};
552
+ src: ${a.src};
553
+ font-style: ${a["font-style"]};
554
+ font-weight: ${a["font-weight"]};
555
+ font-display: ${a["font-display"]};
556
+ unicode-range: ${a["unicode-range"]};
557
557
  }
558
558
  `.trim()).join(`
559
- `);const o=t.querySelector("defs");o&&o.parentNode?o.parentNode.insertBefore(i,o.nextSibling):t.insertBefore(i,t.firstChild)}function FN(t){return Zr(this,null,function*(){const e=yield Io(t);if(!e.ok)throw new Error(`Failed to load font: ${t}`);const n=yield e.blob();return yield new Promise((i,o)=>{const s=new FileReader;s.onloadend=()=>{i(s.result)},s.onerror=o,s.readAsDataURL(n)})})}var Nh=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function BN(t){return Nh(this,arguments,function*(e,n={}){const r=yield jh(e,n),i=new XMLSerializer().serializeToString(r);return"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(i)})}function jh(t){return Nh(this,arguments,function*(e,n={}){const{embedResources:r=!0,removeIds:i=!1}=n,o=e.cloneNode(!0),{width:s,height:a}=mc(e);return Qt(o,{width:s,height:a}),i?(XN(o),nj(o)):yield YN(o),yield zN(o,r),aj(o),o})}function YN(t){return Nh(this,null,function*(){const e=t.querySelectorAll("use"),n=VN(t);e.forEach(r=>{const i=r.getAttribute("href");if(!i)return;if(!t.querySelector(i)){const s=document.querySelector(i);s&&n.appendChild(s.cloneNode(!0))}})})}const $v="icon-defs";function VN(t){const e=Tr(t,$v);if(e)return e;const n=bt("defs");return gi(n,$v),t.prepend(n),n}function XN(t){const e=Array.from(t.querySelectorAll("use"));e.length&&e.forEach(n=>{const r=GN(n);if(!r||!r.startsWith("#"))return;const i=qN(t,r);if(!i||i===n)return;const o=UN(n,i);o&&n.replaceWith(o)})}function GN(t){var e;return(e=t.getAttribute("href"))!=null?e:t.getAttribute("xlink:href")}function qN(t,e){const n=t.querySelector(e);return n||document.querySelector(e)}function UN(t,e){const n=e.tagName.toLowerCase();return n==="symbol"?ZN(t,e):n==="svg"?KN(t,e):QN(t,e)}function ZN(t,e){const n=e.cloneNode(!0),r=bt("svg");for(xa(r,n,new Set(["id"])),xa(r,t,new Set(["href","xlink:href"]));n.firstChild;)r.appendChild(n.firstChild);return r}function KN(t,e){const n=e.cloneNode(!0);return n.removeAttribute("id"),xa(n,t,new Set(["href","xlink:href"])),n}function QN(t,e){const n=e.cloneNode(!0);n.removeAttribute("id");const r=bt("g");xa(r,t,new Set(["href","xlink:href","x","y","width","height","transform"]));const i=JN(t);return i&&r.setAttribute("transform",i),r.appendChild(n),r}function JN(t){var e;const n=t.getAttribute("x"),r=t.getAttribute("y"),i=n||r?`translate(${n!=null?n:0} ${r!=null?r:0})`:"",o=(e=t.getAttribute("transform"))!=null?e:"";return i&&o?`${i} ${o}`:i||o||null}function xa(t,e,n=new Set){Array.from(e.attributes).forEach(r=>{if(!n.has(r.name)){if(r.name==="style"){tj(t,r.value);return}if(r.name==="class"){ej(t,r.value);return}t.setAttribute(r.name,r.value)}})}function tj(t,e){const n=t.getAttribute("style");if(!n){t.setAttribute("style",e);return}const r=n.trim().endsWith(";")?"":";";t.setAttribute("style",`${n}${r}${e}`)}function ej(t,e){const n=t.getAttribute("class");if(!n){t.setAttribute("class",e);return}t.setAttribute("class",`${n} ${e}`.trim())}const Pv=/url\(\s*['"]?#([^'")\s]+)['"]?\s*\)/g;function nj(t){const e=rj(t);if(e.size===0){Ov(t);return}const n=ij(t,e);n&&(Ar(t,r=>{if(r.tagName.toLowerCase()==="defs")return!1;Array.from(r.attributes).forEach(o=>{const s=o.value;if(!s.includes("url("))return;const a=s.replace(Pv,(l,c)=>{const h=encodeURIComponent(c);return`url("${n}#${h}")`});a!==s&&r.setAttribute(o.name,a)})}),Ov(t))}function rj(t){const e=new Set;return Ar(t,n=>{if(n.tagName.toLowerCase()==="defs")return!1;Cv(n,r=>e.add(r))}),e}function Cv(t,e){for(const n of Array.from(t.attributes)){const r=n.value;if(r.includes("url("))for(const i of r.matchAll(Pv))i[1]&&e(i[1]);(n.name==="href"||n.name==="xlink:href")&&r[0]==="#"&&e(r.slice(1))}}function ij(t,e){if(e.size===0)return null;const n=oj(t,e);if(n.size===0)return null;const r=bt("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),i=bt("defs");if(n.forEach(s=>{i.appendChild(s.cloneNode(!0))}),!i.children.length)return null;r.appendChild(i);const o=new XMLSerializer().serializeToString(r);return"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(o)}function oj(t,e){const n=new Map,r=Array.from(e),i=new Set(r),o=new Set,s=a=>{o.has(a)||i.has(a)||(r.push(a),i.add(a))};for(;r.length;){const a=r.shift();if(o.has(a))continue;o.add(a);const l=`#${sj(a)}`,c=t.querySelector(l);c&&(n.set(a,c),Ar(c,h=>{Cv(h,s)}))}return n}function sj(t){return globalThis.CSS&&typeof globalThis.CSS.escape=="function"?globalThis.CSS.escape(t):t.replace(/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g,"\\$1")}function Ov(t){Array.from(t.querySelectorAll("defs")).forEach(n=>n.remove())}function aj(t){lj(t),cj(t),hj(t),dj(t)}function lj(t){const e=Tr(t,zt.BtnsGroup);e==null||e.remove();const n=Tr(t,"btn-icon-defs");n==null||n.remove()}function cj(t){const e=t.querySelector("[data-element-type=transient-container]");e==null||e.remove()}function hj(t){t.querySelectorAll("g").forEach(n=>{n.removeAttribute("x"),n.removeAttribute("y"),n.removeAttribute("width"),n.removeAttribute("height")})}function dj(t){Ar(t,e=>{for(const n in e.dataset)delete e.dataset[n]})}var uj=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});function fj(t){return uj(this,arguments,function*(e,n={}){var r;const{dpr:i=(r=globalThis.devicePixelRatio)!=null?r:2}=n,o=yield jh(e),{width:s,height:a}=mc(o);return new Promise((l,c)=>{try{const h=document.createElement("canvas");h.width=s*i,h.height=a*i;const u=h.getContext("2d");if(!u){c(new Error("Failed to get canvas context"));return}u.scale(i,i),u.imageSmoothingEnabled=!0,u.imageSmoothingQuality="high",o.setAttribute("width",String(s)),o.setAttribute("height",String(a));const f=new XMLSerializer().serializeToString(o),p="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(f),g=new Image;g.onload=function(){u.clearRect(0,0,s,a),u.drawImage(g,0,0,s,a);const y=h.toDataURL("image/png");l(y)},g.onerror=function(y){c(new Error("Image load failed: "+y))},g.src=p}catch(h){c(h)}})})}var Wh={exports:{}},Mv;function pj(){return Mv||(Mv=1,(function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,c,h){this.fn=l,this.context=c,this.once=h||!1}function o(l,c,h,u,f){if(typeof h!="function")throw new TypeError("The listener must be a function");var p=new i(h,u||l,f),g=n?n+c:c;return l._events[g]?l._events[g].fn?l._events[g]=[l._events[g],p]:l._events[g].push(p):(l._events[g]=p,l._eventsCount++),l}function s(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],h,u;if(this._eventsCount===0)return c;for(u in h=this._events)e.call(h,u)&&c.push(n?u.slice(1):u);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(h)):c},a.prototype.listeners=function(c){var h=n?n+c:c,u=this._events[h];if(!u)return[];if(u.fn)return[u.fn];for(var f=0,p=u.length,g=new Array(p);f<p;f++)g[f]=u[f].fn;return g},a.prototype.listenerCount=function(c){var h=n?n+c:c,u=this._events[h];return u?u.fn?1:u.length:0},a.prototype.emit=function(c,h,u,f,p,g){var y=n?n+c:c;if(!this._events[y])return!1;var m=this._events[y],x=arguments.length,v,b;if(m.fn){switch(m.once&&this.removeListener(c,m.fn,void 0,!0),x){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,h),!0;case 3:return m.fn.call(m.context,h,u),!0;case 4:return m.fn.call(m.context,h,u,f),!0;case 5:return m.fn.call(m.context,h,u,f,p),!0;case 6:return m.fn.call(m.context,h,u,f,p,g),!0}for(b=1,v=new Array(x-1);b<x;b++)v[b-1]=arguments[b];m.fn.apply(m.context,v)}else{var w=m.length,_;for(b=0;b<w;b++)switch(m[b].once&&this.removeListener(c,m[b].fn,void 0,!0),x){case 1:m[b].fn.call(m[b].context);break;case 2:m[b].fn.call(m[b].context,h);break;case 3:m[b].fn.call(m[b].context,h,u);break;case 4:m[b].fn.call(m[b].context,h,u,f);break;default:if(!v)for(_=1,v=new Array(x-1);_<x;_++)v[_-1]=arguments[_];m[b].fn.apply(m[b].context,v)}}return!0},a.prototype.on=function(c,h,u){return o(this,c,h,u,!1)},a.prototype.once=function(c,h,u){return o(this,c,h,u,!0)},a.prototype.removeListener=function(c,h,u,f){var p=n?n+c:c;if(!this._events[p])return this;if(!h)return s(this,p),this;var g=this._events[p];if(g.fn)g.fn===h&&(!f||g.once)&&(!u||g.context===u)&&s(this,p);else{for(var y=0,m=[],x=g.length;y<x;y++)(g[y].fn!==h||f&&!g[y].once||u&&g[y].context!==u)&&m.push(g[y]);m.length?this._events[p]=m.length===1?m[0]:m:s(this,p)}return this},a.prototype.removeAllListeners=function(c){var h;return c?(h=n?n+c:c,this._events[h]&&s(this,h)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,t.exports=a})(Wh)),Wh.exports}var gj=pj();const mj=wv(gj);var ba=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class yj{constructor(){this.undoStack=[],this.redoStack=[]}init(e){Object.assign(this,e)}execute(e){return ba(this,null,function*(){yield e.apply(this.state),this.undoStack.push(e),this.redoStack=[],this.emitHistoryChange("execute")})}executeBatch(e){return ba(this,null,function*(){if(e.length===0)return;const n=new eD(e);yield this.execute(n)})}undo(){return ba(this,null,function*(){const e=this.undoStack.pop();e&&(yield e.undo(this.state),this.redoStack.push(e),this.emitHistoryChange("undo"))})}redo(){return ba(this,null,function*(){const e=this.redoStack.pop();e&&(yield e.apply(this.state),this.undoStack.push(e),this.emitHistoryChange("redo"))})}serialize(){return this.undoStack.map(e=>e.serialize())}clear(){this.undoStack=[],this.redoStack=[]}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}getHistorySize(){return this.undoStack.length}destroy(){this.clear()}emitHistoryChange(e){var n;(n=this.emitter)==null||n.emit("history:change",{type:"history:change",action:e})}}var Sv=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class vj{constructor(){this.extensions=new w3,this.interactions=[],this.active=!1,this.running=null,this.concurrentInteractions=new Set,this.selection=new Set,this.handleClick=e=>{const n=this.editor.getDocument(),r=e.target;if(!r){this.deactivate();return}n.contains(r)||x6(r)?this.activate():this.deactivate()}}init(e){Object.assign(this,e),document.addEventListener("click",this.handleClick),this.interactions.forEach(n=>{this.extensions.register(n.name,n),n.init({emitter:this.emitter,editor:this.editor,commander:this.commander,state:this.state,interaction:this}),this.emitter.emit("interaction:registered",n)})}isActive(){return this.active}select(e,n){const r=this.getSelection(),i=[],o=[];if(n==="replace"){const l=new Set(e);r.forEach(c=>{l.has(c)||o.push(c)}),e.forEach(c=>{this.selection.has(c)||i.push(c)}),this.selection=l}else n==="add"?e.forEach(l=>{this.selection.has(l)||(this.selection.add(l),i.push(l))}):n==="remove"?e.forEach(l=>{this.selection.delete(l)&&o.push(l)}):n==="toggle"&&e.forEach(l=>{this.selection.has(l)?(this.selection.delete(l),o.push(l)):(this.selection.add(l),i.push(l))});const s=this.getSelection(),a={type:"selection:change",previous:r,next:s,added:i,removed:o,mode:n};this.emitter.emit("selection:change",a)}getSelection(){return[...this.selection]}isSelected(e){return this.selection.has(e)}clearSelection(){const e=this.getSelection();this.selection.clear();const n={type:"selection:change",previous:e,next:[],added:[],removed:e,mode:"replace"};this.emitter.emit("selection:change",n)}activate(){this.active=!0,this.emitter.emit("activated")}deactivate(){this.active=!1,this.running=null,this.clearSelection(),this.emitter.emit("deactivated")}executeExclusiveInteraction(e,n){return Sv(this,null,function*(){if(!(!this.active||this.running)){this.running=e;try{this.emitter.emit("interaction:started",e),yield n(),this.emitter.emit("interaction:ended",e)}catch(r){console.error(`Error occurred during exclusive interaction "${e.name}":`,r),this.emitter.emit("interaction:error",e,r)}finally{this.running=null}}})}executeConcurrentInteraction(e,n){return Sv(this,null,function*(){if(this.active){this.concurrentInteractions.add(e);try{this.emitter.emit("interaction:started",e),yield n(),this.emitter.emit("interaction:ended",e)}catch(r){console.error(`Error occurred during concurrent interaction "${e.name}":`,r),this.emitter.emit("interaction:error",e,r)}finally{this.concurrentInteractions.delete(e)}}})}getOrCreateTransientContainer(){const e="transient-container",n=this.editor.getDocument(),r=Tr(n,e);if(r&&r.isConnected)return r;const i=bt("g");return gi(i,e),n.appendChild(i),i}appendTransientElement(e){return this.getOrCreateTransientContainer().appendChild(e),e}destroy(){this.extensions.forEach(e=>{e.destroy(),this.emitter.emit("interaction:destroyed",e)}),this.extensions.destroy(),this.active=!1,this.running=null,this.clearSelection(),document.removeEventListener("click",this.handleClick),this.getOrCreateTransientContainer().remove()}}class xj{constructor(){this.extensions=new w3}init(e,n=[]){Object.assign(this,e),n.forEach(r=>{this.registerPlugin(r)})}getPlugin(e){return this.extensions.get(e)}getPlugins(){return this.extensions.getAll()}registerPlugin(e){this.extensions.register(e.name,e);const n={emitter:this.emitter,editor:this.editor,commander:this.commander,plugin:this,state:this.state};e.init(n),this.emitter.emit("plugin:registered",e)}unregisterPlugin(e){const n=this.extensions.get(e);n&&(n.destroy(),this.extensions.unregister(e),this.emitter.emit("plugin:unregistered",n))}destroy(){this.extensions.getAll().forEach(e=>{this.unregisterPlugin(e.name),this.emitter.emit("plugin:destroyed",e)}),this.extensions.destroy()}}var bj=Object.defineProperty,Ev=Object.getOwnPropertySymbols,wj=Object.prototype.hasOwnProperty,_j=Object.prototype.propertyIsEnumerable,Iv=(t,e,n)=>e in t?bj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Av=(t,e)=>{for(var n in e||(e={}))wj.call(e,n)&&Iv(t,n,e[n]);if(Ev)for(var n of Ev(e))_j.call(e,n)&&Iv(t,n,e[n]);return t};class $j{init(e){Object.assign(this,e)}addItemDatum(e,n){const r=e.slice(0,-1),i=e[e.length-1],o=Array.isArray(n)?n:[n];v3(this.options.data,r).splice(i,0,...o),this.emitter.emit("options:data:item:add",{indexes:e,datum:n}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"add",path:"data.items",indexes:e,value:o}]})}updateItemDatum(e,n){const r=pi(this.options.data,e);Object.assign(r,n),this.emitter.emit("options:data:item:update",{indexes:e,datum:n}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",path:"data.items",indexes:e,value:n}]})}removeItemDatum(e,n=1){const r=e.slice(0,-1),i=e[e.length-1],s=v3(this.options.data,r).splice(i,n);this.emitter.emit("options:data:item:remove",{indexes:e,datum:s}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"remove",path:"data.items",indexes:e,value:s}]})}updateData(e,n){this.options.data[e]=n,this.emitter.emit("options:data:update",{key:e,value:n}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",path:`data.${e}`,value:n}]})}updateElement(e,n){this.updateBuiltInElement(e,n)}updateOptions(e){this.options=Av(Av({},this.options),e),this.options.padding!==void 0&&bp(this.editor.getDocument(),ir(this.options.padding)),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",path:"",value:e}]})}getOptions(){return this.options}updateBuiltInElement(e,n){var r,i;const{data:o}=this.options,{attributes:s={}}=n,a=Cl(e),l=zn(e)||zt.ItemLabel===a||zt.ItemDesc===a||zt.ItemValue===a||zt.ItemIllus===a,c=l?x3(e):void 0;if(l){const h=pi(o,c),u=a.replace("item-","");h.attributes||(h.attributes={}),(r=h.attributes)[u]||(r[u]={}),Object.assign(h.attributes[u],s)}else(zt.Title===a||zt.Desc===a||zt.Illus===a)&&(o.attributes||(o.attributes={}),(i=o.attributes)[a]||(i[a]={}),Object.assign(o.attributes[a],s));this.emitter.emit("options:element:update",{element:e,props:n}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",role:a,indexes:c,path:l?`${YR(c)}.attributes.${a.replace("item-","")}`:`data.attributes.${a}`,value:n}]})}destroy(){}}class Pj{constructor(e,n,r){if(this.emitter=e,this.document=n,this.options=r,!n.isConnected)throw new Error("The provided document is not connected to the DOM.");n.style.userSelect="none";const i=new yj,o=new $j,s=new xj,a=new vj;i.init({state:o,emitter:e}),o.init({emitter:e,editor:this,commander:i,options:r}),s.init({emitter:e,editor:this,commander:i,state:o},r.plugins),a.init({emitter:e,editor:this,commander:i,state:o,interactions:r.interactions}),this.commander=i,this.state=o,this.plugin=s,this.interaction=a}getDocument(){return this.document}destroy(){this.document.style.userSelect="",this.interaction.destroy(),this.plugin.destroy(),this.commander.destroy(),this.state.destroy()}}var Cj=Object.defineProperty,Oj=Object.defineProperties,Mj=Object.getOwnPropertyDescriptors,wa=Object.getOwnPropertySymbols,Tv=Object.prototype.hasOwnProperty,kv=Object.prototype.propertyIsEnumerable,Lv=(t,e,n)=>e in t?Cj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Je=(t,e)=>{for(var n in e||(e={}))Tv.call(e,n)&&Lv(t,n,e[n]);if(wa)for(var n of wa(e))kv.call(e,n)&&Lv(t,n,e[n]);return t},_a=(t,e)=>Oj(t,Mj(e)),Kr=(t,e)=>{var n={};for(var r in t)Tv.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&wa)for(var r of wa(t))e.indexOf(r)<0&&kv.call(t,r)&&(n[r]=t[r]);return n};function Sj(t){const e=t,{container:n="#container",padding:r=0,template:i,design:o,theme:s,themeConfig:a}=e,l=Kr(e,["container","padding","template","design","theme","themeConfig"]),c=typeof n=="string"?document.querySelector(n)||document.createElement("div"):n,h=i?Qh(i):void 0,u=vp({},h==null?void 0:h.themeConfig,a),f=s||a||h!=null&&h.themeConfig?Tj(s,u):void 0,p={container:c,padding:ir(r)};if(h){const g=h,{design:y}=g,m=Kr(g,["design"]);Object.assign(p,m)}if(Object.assign(p,l),i&&(p.template=i),h!=null&&h.design||o){const g=Ej(Je(Je({},h==null?void 0:h.design),o),f?_a(Je({},t),{themeConfig:f}):t);Tu(g)&&(p.design=g)}return s&&(p.theme=s),f&&(p.themeConfig=f),p}function Fh(t){if(typeof t=="string")return{type:t};if(!("type"in t))throw new Error("Type is required");return t}function Ej(t,e){const{structure:n,title:r,item:i,items:o}=t||{},s=zv(i||(o==null?void 0:o[0]),e);return{structure:Ij(n),title:Aj(r,e),item:s,items:o?o.map(a=>zv(a,e)):[s]}}function Ij(t){if(!t)return null;const e=Fh(t),{type:n}=e,r=Kr(e,["type"]),i=_2(n);if(!i)return null;const{component:o}=i;return _a(Je({},i),{component:s=>o(Je(Je({},s),r))})}function Aj(t,e){if(!t)return{component:null};const n=Fh(t),{type:r}=n,i=Kr(n,["type"]),{themeConfig:o}=e,s=(o==null?void 0:o.colorBg)||"#fff",a=Hv(s,s);return{component:l=>Mg(Je(_a(Je({},l),{themeColors:a}),i))}}function zv(t,e){if(!t)return null;const n=Fh(t),{type:r}=n,i=Kr(n,["type"]),o=zg(r);if(!o)return null;const{component:s,options:a}=o;return _a(Je({},o),{component:l=>{var c;const{indexes:h}=l,{data:u,themeConfig:f}=e,p=(f==null?void 0:f.colorBg)||"#fff",g=l,{themeColors:y=Hv(zo(f==null?void 0:f.palette,h,(c=u==null?void 0:u.items)==null?void 0:c.length)||(f==null?void 0:f.colorPrimary)||"#FF356A",p)}=g,m=Kr(g,["themeColors"]);return s(Je(Je({themeColors:y},m),i))},options:a})}function Tj(t,e={}){var n;const r=t?Sg(t)||{}:{},i=vp({},r,e);return i.palette=e.palette||r.palette,i.stylize=(n=e.stylize)!=null?n:r.stylize,i.colorPrimary||(i.colorPrimary="#FF356A"),i.palette||(i.palette=[i.colorPrimary]),i}function Hv(t,e="#fff"){return Ag({colorPrimary:t,isDarkMode:$u(e),colorBg:e})}function kj(t){return t===" "||t===" "}function Lj(t){let e=0,n=0;for(;n<t.length;){const r=t[n];if(r===" "){e+=1,n+=1;continue}if(r===" "){e+=2,n+=1;continue}break}return{indent:e,content:t.slice(n)}}function zj(t){return t.trimEnd()}function Rv(t){const e=t.trim();if(!e)return null;const n=e.match(/^([^:\s=]+)\s*[:=]\s*(.*)$/);if(n)return{key:n[1],value:n[2].trim()};const r=e.match(/^([^\s]+)\s+(.*)$/);return r?{key:r[1],value:r[2].trim()}:{key:e,value:void 0}}function Bh(t,e){return{kind:"object",line:t,value:e,entries:{}}}function Hj(t){return{kind:"array",line:t,items:[]}}function Rj(t){const e=[],n=Bh(0),r=[{indent:-1,node:n,parent:null,key:null}];return t.split(/\r?\n/).forEach((o,s)=>{const a=s+1;if(!o.trim())return;const{indent:l,content:c}=Lj(o),h=zj(c);if(!h.trim())return;for(;r.length>1&&l<=r[r.length-1].indent;)r.pop();const u=r[r.length-1];let f=u.node;const p=h.trim();if(p.startsWith("-")&&(p.length===1||kj(p[1]))){if(f.kind!=="array")if(f.kind==="object"&&Object.keys(f.entries).length===0&&f.value===void 0&&u.parent&&u.key){const v=Hj(f.line);if(u.parent.kind==="object")u.parent.entries[u.key]=v;else if(u.parent.kind==="array"){const b=u.parent.items.indexOf(f);b>=0&&(u.parent.items[b]=v)}u.node=v,f=v}else{e.push({path:"",line:a,code:"bad_list",message:"List item is not under an array container.",raw:p});return}const m=p.slice(1).trim(),x=Bh(a,m||void 0);f.items.push(x),r.push({indent:l,node:x,parent:f});return}const g=Rv(p);if(!g){e.push({path:"",line:a,code:"bad_syntax",message:"Invalid syntax line.",raw:p});return}if(f.kind!=="object"){e.push({path:"",line:a,code:"bad_syntax",message:"Key-value pair is not under an object container.",raw:p});return}const y=Bh(a,g.value);f.entries[g.key]=y,r.push({indent:l,node:y,parent:f,key:g.key})}),{ast:n,errors:e}}function Dv(t){return Rv(t)}function $a(t,e){return{kind:"value",line:e,value:t}}const Dj=/^(#[0-9a-f]{8}|#[0-9a-f]{6}|#[0-9a-f]{4}|#[0-9a-f]{3})/i,Nj=/^((?:rgb|rgba|hsl|hsla)\([^)]*\))/i;function xr(t){const e=t.trim();return e==="true"?!0:e==="false"?!1:/^-?\d+(\.\d+)?$/.test(e)?parseFloat(e):e}function br(t){if(t.kind==="value"||t.kind==="object")return t.value}function we(t,e,n,r,i,o){t.push({path:n,line:e.line,code:r,message:i,raw:o})}function Nv(t,e="any"){let n=t.trim();if(n.startsWith("[")&&n.endsWith("]")&&(n=n.slice(1,-1).trim()),!n)return[];let r;e==="comma"?r=n.split(","):e==="space"?r=n.split(/\s+/):r=n.split(/[,\s]+/);const i=[];for(const o of r){const s=o.trim();if(s){if(s==="#"||s==="//")break;i.push(s)}}return i}function jj(t){let e=t.trim();const n=e.search(/\s+#(?![0-9a-f])/i);n>=0&&(e=e.slice(0,n).trimEnd());const r=e.indexOf("//");return r>=0&&(e=e.slice(0,r).trimEnd()),e}function Yh(t){const e=jj(t);if(!e)return;const n=e.match(Dj);if(n&&n[0].length===e.length)return e;const r=e.match(Nj);if(r&&r[1].length===e.length||lt(e).isValid())return e}function jv(t,e,n,r={}){const i=br(t);if(i===void 0){we(n,t,e,"schema_mismatch","Expected color value.");return}const o=Yh(i);if(!o){r.soft||we(n,t,e,"invalid_value","Invalid color value.",i);return}return o}function Wj(t,e){return e.length>1||t.startsWith("[")&&t.endsWith("]")?!0:Yh(t)!==void 0}function Vh(t){if(t.kind==="array")return t.items.map(r=>Vh(r));if(t.kind==="value"||!(Object.keys(t.entries).length>0)&&t.value!==void 0)return xr(t.value);const n={};return t.value!==void 0&&(n.value=xr(t.value)),Object.entries(t.entries).forEach(([r,i])=>{n[r]=Vh(i)}),n}function Fj(t,e,n,r){let i,o=null;for(const s of e.variants){const a=[],l=We(t,s,n,a);(o===null||a.length<o.length)&&(o=a,i=l)}return o&&r.push(...o),i}function We(t,e,n,r){switch(e.kind){case"union":return Fj(t,e,n,r);case"string":{const i=br(t);if(i===void 0){we(r,t,n,"schema_mismatch","Expected string value.");return}return i}case"number":{const i=br(t);if(i===void 0){we(r,t,n,"schema_mismatch","Expected number value.");return}const s=i.trim().match(/^(-?\d+(\.\d+)?)(?:\s*(#|\/\/).*)?$/);if(!s){we(r,t,n,"invalid_value","Invalid number value.",i);return}return parseFloat(s[1])}case"boolean":{const i=br(t);if(i===void 0){we(r,t,n,"schema_mismatch","Expected boolean value.");return}if(i!=="true"&&i!=="false"){we(r,t,n,"invalid_value","Invalid boolean value.",i);return}return i==="true"}case"enum":{const i=br(t);if(i===void 0){we(r,t,n,"schema_mismatch","Expected enum value.");return}if(!e.values.includes(i)){we(r,t,n,"invalid_value","Invalid enum value.",i);return}return i}case"array":{if(t.kind==="array")return t.items.map((a,l)=>We(a,e.item,`${n}[${l}]`,r)).filter(a=>a!==void 0);if(t.kind==="object"&&Object.keys(t.entries).length>0){we(r,t,n,"schema_mismatch","Expected array value.");return}const i=br(t);if(i===void 0){we(r,t,n,"schema_mismatch","Expected array value.");return}const o=i.trim();return o.startsWith("[")&&!o.endsWith("]")?void 0:Nv(i,e.split).map((a,l)=>We($a(a,t.line),e.item,`${n}[${l}]`,r)).filter(a=>a!==void 0)}case"palette":{if(t.kind==="array"){const l=We(t,{kind:"array",item:{kind:"color"},split:"any"},n,r);return Array.isArray(l)&&l.length>0?l:void 0}if(t.kind==="object"&&Object.keys(t.entries).length>0){we(r,t,n,"schema_mismatch","Expected palette value.");return}const i=br(t);if(i===void 0){we(r,t,n,"schema_mismatch","Expected palette value.");return}const o=i.trim();if(o.startsWith("[")&&!o.endsWith("]"))return;const s=Yh(o);if(s)return[s];const a=Nv(i,"any");if(Wj(o,a)){const l=a.map((c,h)=>jv($a(c,t.line),`${n}[${h}]`,r)).filter(c=>c!==void 0);return l.length>0?l:void 0}return i}case"color":return jv(t,n,r,{soft:e.soft});case"object":{if(t.kind==="array"){we(r,t,n,"schema_mismatch","Expected object value.");return}const i={};if(t.kind==="value"){if(e.shorthandKey)return i[e.shorthandKey]=t.value,i;const o=Dv(t.value);if((o==null?void 0:o.value)!==void 0){if(e.fields[o.key]){const s=We($a(o.value,t.line),e.fields[o.key],`${n}.${o.key}`,r);return s!==void 0&&(i[o.key]=s),i}return e.allowUnknown?(i[o.key]=xr(o.value),i):(we(r,t,`${n}.${o.key}`,"unknown_key","Unknown key in object.",o.key),i)}if(e.allowUnknown)return i.value=xr(t.value),i;we(r,t,n,"invalid_value","Expected object value.");return}if(t.value!==void 0)if(e.shorthandKey&&i[e.shorthandKey]===void 0)i[e.shorthandKey]=t.value;else{const o=Dv(t.value);if((o==null?void 0:o.value)!==void 0)if(e.fields[o.key]){const s=We($a(o.value,t.line),e.fields[o.key],`${n}.${o.key}`,r);s!==void 0&&i[o.key]===void 0&&(i[o.key]=s)}else e.allowUnknown?i[o.key]=xr(o.value):we(r,t,`${n}.${o.key}`,"unknown_key","Unknown key in object.",o.key);else e.allowUnknown&&(i.value=xr(t.value))}return Object.entries(t.entries).forEach(([o,s])=>{const a=e.fields[o];if(!a){if(e.allowUnknown){i[o]=Vh(s);return}we(r,s,`${n}.${o}`,"unknown_key","Unknown key in object.",o);return}const l=We(s,a,`${n}.${o}`,r);l!==void 0&&(i[o]=l)}),i}default:return}}const tn=()=>({kind:"string"}),Fn=()=>({kind:"number"}),Bj=t=>({kind:"enum",values:t}),Qr=(t={})=>({kind:"color",soft:t.soft}),Xh=(t,e="any")=>({kind:"array",item:t,split:e}),Ae=(t,e={})=>({kind:"object",fields:t,allowUnknown:e.allowUnknown,shorthandKey:e.shorthandKey}),Gh=(...t)=>({kind:"union",variants:t}),Yj=()=>({kind:"palette"}),Wv={fill:Qr({soft:!0}),stroke:Qr({soft:!0})},Jr=Ae(Wv,{allowUnknown:!0}),qh=Ae(Wv,{allowUnknown:!0}),Uh=Ae({},{allowUnknown:!0});Uh.fields={label:tn(),value:Gh(Fn(),tn()),desc:tn(),icon:tn(),children:Xh(Uh)};const Fv=Ae({type:tn(),colorBg:Qr(),colorPrimary:Qr(),palette:Yj(),title:Jr,desc:Jr,shape:qh,base:Ae({global:Ae({},{allowUnknown:!0}),shape:qh,text:Jr}),item:Ae({icon:Ae({},{allowUnknown:!0}),label:Jr,desc:Jr,value:Jr,shape:qh}),stylize:Ae({type:Bj(["rough","pattern"]),roughness:Fn(),bowing:Fn(),fillWeight:Fn(),hachureGap:Fn(),pattern:tn(),backgroundColor:Qr(),foregroundColor:Qr(),scale:Fn()},{shorthandKey:"type"}),elements:Ae({},{allowUnknown:!0})},{shorthandKey:"type"}),Pa=Ae({},{allowUnknown:!0,shorthandKey:"type"}),Bv=Ae({structure:Pa,item:Pa,items:Xh(Pa),title:Pa}),Yv=Ae({title:tn(),desc:tn(),items:Xh(Uh)}),Vv=Ae({type:tn()},{shorthandKey:"type"}),Xv=Ae({template:Vv,design:Bv,data:Yv,theme:Fv,width:Gh(Fn(),tn()),height:Gh(Fn(),tn())});var Vj=Object.defineProperty,Ca=Object.getOwnPropertySymbols,Gv=Object.prototype.hasOwnProperty,qv=Object.prototype.propertyIsEnumerable,Uv=(t,e,n)=>e in t?Vj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Xj=(t,e)=>{for(var n in e||(e={}))Gv.call(e,n)&&Uv(t,n,e[n]);if(Ca)for(var n of Ca(e))qv.call(e,n)&&Uv(t,n,e[n]);return t},Gj=(t,e)=>{var n={};for(var r in t)Gv.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Ca)for(var r of Ca(t))e.indexOf(r)<0&&qv.call(t,r)&&(n[r]=t[r]);return n};function qj(t,e){if(!t)return;const n=We(t,Vv,"template",e);if(n){if(typeof n=="string")return n;if(typeof n=="object"&&typeof n.type=="string")return n.type}}function Zv(t){const{ast:e,errors:n}=Rj(t),r=[],i={},o=Xj({},e.entries),s=e.entries.infographic;let a;s&&s.kind==="object"&&(s.value&&(a=s.value),Object.entries(s.entries).forEach(([m,x])=>{m in o||(o[m]=x)}));const l=new Set(["infographic","template","design","data","theme","width","height"]);Object.keys(o).forEach(m=>{l.has(m)||n.push({path:m,line:o[m].line,code:"unknown_key",message:"Unknown top-level key.",raw:m})});const c=o.template,h=qj(c,n);h&&(i.template=h),!i.template&&a&&(i.template=a);const u=o.design;if(u){const m=We(u,Bv,"design",n);m&&(i.design=m)}const f=o.data;if(f){const m=We(f,Yv,"data",n);m&&(i.data=m)}const p=o.theme;if(p){const m=We(p,Fv,"theme",n);if(m&&typeof m=="object"){const x=m,{type:v}=x,b=Gj(x,["type"]);typeof v=="string"&&v&&(i.theme=v),Object.keys(b).length>0&&(i.themeConfig=b)}}const g=o.width;if(g){const m=We(g,Xv.fields.width,"width",n);m!==void 0&&(i.width=m)}const y=o.height;if(y){const m=We(y,Xv.fields.height,"height",n);m!==void 0&&(i.height=m)}return{options:i,errors:n,warnings:r,ast:e}}const Uj=()=>[new mv,new bv],Zj=()=>[new H3,new _3,new $3,new R3,new N3,new Y3,new F3],Kj={padding:20,theme:"light",themeConfig:{palette:"antv"},get plugins(){return Uj()},get interactions(){return Zj()}};var Qj=Object.defineProperty,Kv=Object.getOwnPropertySymbols,Jj=Object.prototype.hasOwnProperty,tW=Object.prototype.propertyIsEnumerable,Qv=(t,e,n)=>e in t?Qj(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,On=(t,e)=>{for(var n in e||(e={}))Jj.call(e,n)&&Qv(t,n,e[n]);if(Kv)for(var n of Kv(e))tW.call(e,n)&&Qv(t,n,e[n]);return t};function Zh(t,e){const n=On(On({},t),e);return(t.design||e.design)&&(n.design=On(On({},t.design),e.design)),(t.themeConfig||e.themeConfig)&&(n.themeConfig=On(On({},t.themeConfig),e.themeConfig)),(t.svg||e.svg)&&(n.svg=On(On({},t.svg),e.svg)),n}function Oa(t){const e=On({},t);return e.data&&(e.data=mp(e.data)),e.elements&&(e.elements=mp(e.elements)),e}function Jv(t){const{design:e,data:n}=t;return!(!e||!Tu(e)||!n||!Array.isArray(n.items)||n.items.length<1)}var eW=Object.defineProperty,tx=Object.getOwnPropertySymbols,nW=Object.prototype.hasOwnProperty,rW=Object.prototype.propertyIsEnumerable,ex=(t,e,n)=>e in t?eW(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,iW=(t,e)=>{for(var n in e||(e={}))nW.call(e,n)&&ex(t,n,e[n]);if(tx)for(var n of tx(e))rW.call(e,n)&&ex(t,n,e[n]);return t},oW=(t,e,n)=>new Promise((r,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},s=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(o,s);a((n=n.apply(t,e)).next())});class sW{constructor(e){this.rendered=!1,this.emitter=new mj,this.node=null,this.initialOptions={},this.setOptions(e,"replace",!0)}getOptions(){return this.options}setOptions(e,n="replace",r=!1){const{options:i,errors:o,warnings:s}=aW(e);r&&(this.initialOptions=Oa(i));const a=Zh(n==="replace"?Oa(this.initialOptions||{}):this.options||Oa(this.initialOptions||{}),i);this.options=a,this.parsedOptions=Sj(Zh(Kj,this.options)),s.length&&this.emitter.emit("warning",s),o.length&&this.emitter.emit("error",o)}render(e){e?this.setOptions(e,"replace"):!this.options&&this.initialOptions&&this.setOptions(this.initialOptions,"replace"),this.performRender()}update(e){this.setOptions(e,"merge"),this.performRender()}performRender(){var e;const n=this.parsedOptions;if(!Jv(n)){this.emitter.emit("error",new Error("Incomplete options"));return}const{container:r}=this.parsedOptions,i=this.compose(n),o=new dP(n,i);this.node=o.render(),r==null||r.replaceChildren(this.node),(e=this.editor)==null||e.destroy(),this.editor=void 0,this.options.editable&&(this.editor=new Pj(this.emitter,this.node,n)),this.rendered=!0,this.emitter.emit("rendered",{node:this.node,options:this.options});const s=this.node;return s&&M6(s).then(()=>{this.node===s&&this.emitter.emit("loaded",{node:s,options:this.options})}),!0}compose(e){const{design:n,data:r}=e,{title:i,item:o,items:s,structure:a}=n,{component:l,props:c}=a,h=i.component,u=o.component,f=s.map(y=>y.component),p=Dp(d(l,iW({data:r,Title:h,Item:u,Items:f,options:e},c))),g=Ir(p);if(!g)throw new Error("Failed to parse SVG template");return g}getTypes(){const e=this.parsedOptions;if(!Jv(e)){this.emitter.emit("error",new Error("Incomplete options"));return}const n=e.design,r=n.structure.composites||[],i=n.items.map(o=>o.composites||[]);return P6({structure:r,items:i})}toDataURL(e){return oW(this,null,function*(){if(!this.node)throw new Error("Infographic is not rendered yet.");return(e==null?void 0:e.type)==="svg"?yield BN(this.node,e):yield fj(this.node,e)})}on(e,n){this.emitter.on(e,n)}off(e,n){this.emitter.off(e,n)}destroy(){var e,n;(e=this.editor)==null||e.destroy(),(n=this.node)==null||n.remove(),this.node=null,this.rendered=!1,this.emitter.emit("destroyed"),this.emitter.removeAllListeners()}}function aW(t){if(typeof t=="string"){const{options:e,errors:n,warnings:r}=Zv(t);return{options:e,errors:n,warnings:r}}return{options:Oa(t),errors:[],warnings:[]}}const lW=Ye.version;W.AlignLayout=Nr,W.BadgeCard=Dg,W.BrushSelect=_3,W.BtnAdd=U,W.BtnRemove=Yt,W.BtnsGroup=Et,W.CandyCardLite=Wg,W.CapsuleItem=Ug,W.ChartBar=$2,W.ChartColumn=P2,W.ChartLine=S2,W.ChartPie=E2,W.ChartWordCloud=z2,W.CircleNode=Qg,W.CircularProgress=e1,W.ClickSelect=$3,W.CompactCard=o1,W.CompareBinaryHorizontal=V2,W.CompareHierarchyLeftRight=U2,W.CompareHierarchyRow=Z2,W.DblClickEditText=H3,W.Defs=jt,W.DoneList=l1,W.DragElement=R3,W.EditBar=mv,W.Ellipse=Wt,W.FlexLayout=ct,W.Fragment=Ci,W.Gap=ie,W.Group=Y,W.HierarchyMindmap=oy,W.HierarchyStructure=ay,W.HierarchyTree=dy,W.HorizontalIconArrow=d1,W.HorizontalIconLine=m1,W.HotkeyHistory=N3,W.IconBadge=x1,W.Illus=Up,W.IndexedCard=_1,W.Infographic=sW,W.Interaction=jn,W.ItemDesc=Jt,W.ItemIcon=Pe,W.ItemIconCircle=sr,W.ItemLabel=At,W.ItemValue=Ai,W.ItemsGroup=Ot,W.LCornerCard=C1,W.LabelText=R1,W.LetterCard=S1,W.LinedText=A1,W.ListColumn=uy,W.ListGrid=fy,W.ListPyramid=py,W.ListRow=gy,W.ListSector=vy,W.ListWaterfall=xy,W.ListZigzagDown=Py,W.ListZigzagUp=Cy,W.Path=yt,W.PillBadge=L1,W.Plugin=Ih,W.Polygon=Re,W.ProgressCard=Vm,W.Quadrant=Oy,W.QuarterCircular=qm,W.QuarterSimpleCard=Km,W.Rect=Ct,W.RelationCircle=My,W.RelationNetwork=Sy,W.ResizeElement=bv,W.RibbonCard=t2,W.RoundedRectNode=r2,W.SelectHighlight=F3,W.SequenceAscendingStairs3d=Dy,W.SequenceAscendingSteps=Ny,W.SequenceCircleArrows=Wy,W.SequenceCircular=Fy,W.SequenceColorSnakeSteps=By,W.SequenceFilterMesh=Gy,W.SequenceFunnel=Ky,W.SequenceHorizontalZigzag=Qy,W.SequenceMountain=e3,W.SequencePyramid=n3,W.SequenceRoadmapVertical=i3,W.SequenceSnakeSteps=o3,W.SequenceStairsFront=s3,W.SequenceSteps=a3,W.SequenceTimeline=l3,W.SequenceZigzagPucks3d=h3,W.SequenceZigzagSteps=m3,W.ShapesGroup=le,W.SimpleHorizontalArrow=s2,W.SimpleIllusItem=c2,W.SimpleItem=u2,W.SimpleVerticalArrow=g2,W.Text=St,W.Title=Mg,W.UnderlineText=v2,W.VERSION=lW,W.VerticalIconArrow=w2,W.ZoomWheel=Y3,W.cloneElement=Rn,W.createFragment=EP,W.createLayout=_c,W.exportToSVG=jh,W.getCombinedBounds=Dr,W.getElementBounds=et,W.getElementsBounds=or,W.getFont=zl,W.getFonts=Hl,W.getItem=zg,W.getItemProps=Zt,W.getItems=eO,W.getPalette=Rf,W.getPaletteColor=zo,W.getPalettes=$_,W.getStructure=_2,W.getStructures=rz,W.getTemplate=Qh,W.getTemplates=ax,W.getTheme=Sg,W.getThemeColors=ge,W.getThemes=DC,W.jsx=rs,W.jsxDEV=AP,W.jsxs=IP,W.loadSVGResource=Lr,W.parseSVG=Ir,W.parseSyntax=Zv,W.registerFont=Lf,W.registerItem=Kt,W.registerPalette=Nl,W.registerPattern=h0,W.registerResourceLoader=D6,W.registerStructure=Tt,W.registerTemplate=Kh,W.registerTheme=Oc,W.renderSVG=Dp,W.sequenceCylinders3d=Yy,W.setDefaultFont=y_,W.setFontExtendFactor=yP,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"})}));
559
+ `);const o=e.querySelector("defs");o&&o.parentNode?o.parentNode.insertBefore(i,o.nextSibling):e.insertBefore(i,e.firstChild)}function Die(e){return Li(this,null,function*(){const t=yield ts(e);if(!t.ok)throw new Error(`Failed to load font: ${e}`);const n=yield t.blob();return yield new Promise((i,o)=>{const a=new FileReader;a.onloadend=()=>{i(a.result)},a.onerror=o,a.readAsDataURL(n)})})}var nm=(e,t,n)=>new Promise((r,i)=>{var o=c=>{try{s(n.next(c))}catch(l){i(l)}},a=c=>{try{s(n.throw(c))}catch(l){i(l)}},s=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);s((n=n.apply(e,t)).next())});function qie(e){return nm(this,arguments,function*(t,n={}){const r=yield rm(t,n),i=new XMLSerializer().serializeToString(r);return"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(i)})}function rm(e){return nm(this,arguments,function*(t,n={}){const{embedResources:r=!0,removeIds:i=!1}=n,o=t.cloneNode(!0),{width:a,height:s}=Gu(t);return ut(o,{width:a,height:s}),i?(Bie(o),Jie(o)):yield jie(o),yield Tie(o,r),ioe(o),o})}function jie(e){return nm(this,null,function*(){const t=e.querySelectorAll("use"),n=Fie(e);t.forEach(r=>{const i=r.getAttribute("href");if(!i)return;if(!e.querySelector(i)){const a=document.querySelector(i);a&&n.appendChild(a.cloneNode(!0))}})})}const LO="icon-defs";function Fie(e){const t=gi(e,LO);if(t)return t;const n=Se("defs");return uo(n,LO),e.prepend(n),n}function Bie(e){const t=Array.from(e.querySelectorAll("use"));t.length&&t.forEach(n=>{const r=Wie(n);if(!r||!r.startsWith("#"))return;const i=Gie(e,r);if(!i||i===n)return;const o=Vie(n,i);o&&n.replaceWith(o)})}function Wie(e){var t;return(t=e.getAttribute("href"))!=null?t:e.getAttribute("xlink:href")}function Gie(e,t){const n=e.querySelector(t);return n||document.querySelector(t)}function Vie(e,t){const n=t.tagName.toLowerCase();return n==="symbol"?Yie(e,t):n==="svg"?Xie(e,t):Uie(e,t)}function Yie(e,t){const n=t.cloneNode(!0),r=Se("svg");for(Wc(r,n,new Set(["id"])),Wc(r,e,new Set(["href","xlink:href"]));n.firstChild;)r.appendChild(n.firstChild);return r}function Xie(e,t){const n=t.cloneNode(!0);return n.removeAttribute("id"),Wc(n,e,new Set(["href","xlink:href"])),n}function Uie(e,t){const n=t.cloneNode(!0);n.removeAttribute("id");const r=Se("g");Wc(r,e,new Set(["href","xlink:href","x","y","width","height","transform"]));const i=Kie(e);return i&&r.setAttribute("transform",i),r.appendChild(n),r}function Kie(e){var t;const n=e.getAttribute("x"),r=e.getAttribute("y"),i=n||r?`translate(${n!=null?n:0} ${r!=null?r:0})`:"",o=(t=e.getAttribute("transform"))!=null?t:"";return i&&o?`${i} ${o}`:i||o||null}function Wc(e,t,n=new Set){Array.from(t.attributes).forEach(r=>{if(!n.has(r.name)){if(r.name==="style"){Zie(e,r.value);return}if(r.name==="class"){Qie(e,r.value);return}e.setAttribute(r.name,r.value)}})}function Zie(e,t){const n=e.getAttribute("style");if(!n){e.setAttribute("style",t);return}const r=n.trim().endsWith(";")?"":";";e.setAttribute("style",`${n}${r}${t}`)}function Qie(e,t){const n=e.getAttribute("class");if(!n){e.setAttribute("class",t);return}e.setAttribute("class",`${n} ${t}`.trim())}const zO=/url\(\s*['"]?#([^'")\s]+)['"]?\s*\)/g;function Jie(e){const t=eoe(e);if(t.size===0){HO(e);return}const n=toe(e,t);n&&(pi(e,r=>{if(r.tagName.toLowerCase()==="defs")return!1;Array.from(r.attributes).forEach(o=>{const a=o.value;if(!a.includes("url("))return;const s=a.replace(zO,(c,l)=>{const u=encodeURIComponent(l);return`url("${n}#${u}")`});s!==a&&r.setAttribute(o.name,s)})}),HO(e))}function eoe(e){const t=new Set;return pi(e,n=>{if(n.tagName.toLowerCase()==="defs")return!1;NO(n,r=>t.add(r))}),t}function NO(e,t){for(const n of Array.from(e.attributes)){const r=n.value;if(r.includes("url("))for(const i of r.matchAll(zO))i[1]&&t(i[1]);(n.name==="href"||n.name==="xlink:href")&&r[0]==="#"&&t(r.slice(1))}}function toe(e,t){if(t.size===0)return null;const n=noe(e,t);if(n.size===0)return null;const r=Se("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),i=Se("defs");if(n.forEach(a=>{i.appendChild(a.cloneNode(!0))}),!i.children.length)return null;r.appendChild(i);const o=new XMLSerializer().serializeToString(r);return"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(o)}function noe(e,t){const n=new Map,r=Array.from(t),i=new Set(r),o=new Set,a=s=>{o.has(s)||i.has(s)||(r.push(s),i.add(s))};for(;r.length;){const s=r.shift();if(o.has(s))continue;o.add(s);const c=`#${roe(s)}`,l=e.querySelector(c);l&&(n.set(s,l),pi(l,u=>{NO(u,a)}))}return n}function roe(e){return globalThis.CSS&&typeof globalThis.CSS.escape=="function"?globalThis.CSS.escape(e):e.replace(/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g,"\\$1")}function HO(e){Array.from(e.querySelectorAll("defs")).forEach(n=>n.remove())}function ioe(e){ooe(e),aoe(e),soe(e),coe(e)}function ooe(e){const t=gi(e,Ue.BtnsGroup);t==null||t.remove();const n=gi(e,"btn-icon-defs");n==null||n.remove()}function aoe(e){const t=e.querySelector("[data-element-type=transient-container]");t==null||t.remove()}function soe(e){e.querySelectorAll("g").forEach(n=>{n.removeAttribute("x"),n.removeAttribute("y"),n.removeAttribute("width"),n.removeAttribute("height")})}function coe(e){pi(e,t=>{for(const n in t.dataset)delete t.dataset[n]})}var loe=(e,t,n)=>new Promise((r,i)=>{var o=c=>{try{s(n.next(c))}catch(l){i(l)}},a=c=>{try{s(n.throw(c))}catch(l){i(l)}},s=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);s((n=n.apply(e,t)).next())});function uoe(e){return loe(this,arguments,function*(t,n={}){var r;const{dpr:i=(r=globalThis.devicePixelRatio)!=null?r:2}=n,o=yield rm(t),{width:a,height:s}=Gu(o);return new Promise((c,l)=>{try{const u=document.createElement("canvas");u.width=a*i,u.height=s*i;const h=u.getContext("2d");if(!h){l(new Error("Failed to get canvas context"));return}h.scale(i,i),h.imageSmoothingEnabled=!0,h.imageSmoothingQuality="high",o.setAttribute("width",String(a)),o.setAttribute("height",String(s));const d=new XMLSerializer().serializeToString(o),f="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(d),g=new Image;g.onload=function(){h.clearRect(0,0,a,s),h.drawImage(g,0,0,a,s);const y=u.toDataURL("image/png");c(y)},g.onerror=function(y){l(new Error("Image load failed: "+y))},g.src=f}catch(u){l(u)}})})}var im={exports:{}},DO;function hoe(){return DO||(DO=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,l,u){this.fn=c,this.context=l,this.once=u||!1}function o(c,l,u,h,d){if(typeof u!="function")throw new TypeError("The listener must be a function");var f=new i(u,h||c,d),g=n?n+l:l;return c._events[g]?c._events[g].fn?c._events[g]=[c._events[g],f]:c._events[g].push(f):(c._events[g]=f,c._eventsCount++),c}function a(c,l){--c._eventsCount===0?c._events=new r:delete c._events[l]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var l=[],u,h;if(this._eventsCount===0)return l;for(h in u=this._events)t.call(u,h)&&l.push(n?h.slice(1):h);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(u)):l},s.prototype.listeners=function(l){var u=n?n+l:l,h=this._events[u];if(!h)return[];if(h.fn)return[h.fn];for(var d=0,f=h.length,g=new Array(f);d<f;d++)g[d]=h[d].fn;return g},s.prototype.listenerCount=function(l){var u=n?n+l:l,h=this._events[u];return h?h.fn?1:h.length:0},s.prototype.emit=function(l,u,h,d,f,g){var y=n?n+l:l;if(!this._events[y])return!1;var m=this._events[y],v=arguments.length,b,_;if(m.fn){switch(m.once&&this.removeListener(l,m.fn,void 0,!0),v){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,u),!0;case 3:return m.fn.call(m.context,u,h),!0;case 4:return m.fn.call(m.context,u,h,d),!0;case 5:return m.fn.call(m.context,u,h,d,f),!0;case 6:return m.fn.call(m.context,u,h,d,f,g),!0}for(_=1,b=new Array(v-1);_<v;_++)b[_-1]=arguments[_];m.fn.apply(m.context,b)}else{var x=m.length,w;for(_=0;_<x;_++)switch(m[_].once&&this.removeListener(l,m[_].fn,void 0,!0),v){case 1:m[_].fn.call(m[_].context);break;case 2:m[_].fn.call(m[_].context,u);break;case 3:m[_].fn.call(m[_].context,u,h);break;case 4:m[_].fn.call(m[_].context,u,h,d);break;default:if(!b)for(w=1,b=new Array(v-1);w<v;w++)b[w-1]=arguments[w];m[_].fn.apply(m[_].context,b)}}return!0},s.prototype.on=function(l,u,h){return o(this,l,u,h,!1)},s.prototype.once=function(l,u,h){return o(this,l,u,h,!0)},s.prototype.removeListener=function(l,u,h,d){var f=n?n+l:l;if(!this._events[f])return this;if(!u)return a(this,f),this;var g=this._events[f];if(g.fn)g.fn===u&&(!d||g.once)&&(!h||g.context===h)&&a(this,f);else{for(var y=0,m=[],v=g.length;y<v;y++)(g[y].fn!==u||d&&!g[y].once||h&&g[y].context!==h)&&m.push(g[y]);m.length?this._events[f]=m.length===1?m[0]:m:a(this,f)}return this},s.prototype.removeAllListeners=function(l){var u;return l?(u=n?n+l:l,this._events[u]&&a(this,u)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s})(im)),im.exports}var doe=hoe();const foe=kO(doe);var Gc=(e,t,n)=>new Promise((r,i)=>{var o=c=>{try{s(n.next(c))}catch(l){i(l)}},a=c=>{try{s(n.throw(c))}catch(l){i(l)}},s=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);s((n=n.apply(e,t)).next())});class poe{constructor(){this.undoStack=[],this.redoStack=[]}init(t){Object.assign(this,t)}execute(t){return Gc(this,null,function*(){yield t.apply(this.state),this.undoStack.push(t),this.redoStack=[],this.emitHistoryChange("execute")})}executeBatch(t){return Gc(this,null,function*(){if(t.length===0)return;const n=new Qne(t);yield this.execute(n)})}undo(){return Gc(this,null,function*(){const t=this.undoStack.pop();t&&(yield t.undo(this.state),this.redoStack.push(t),this.emitHistoryChange("undo"))})}redo(){return Gc(this,null,function*(){const t=this.redoStack.pop();t&&(yield t.apply(this.state),this.undoStack.push(t),this.emitHistoryChange("redo"))})}serialize(){return this.undoStack.map(t=>t.serialize())}clear(){this.undoStack=[],this.redoStack=[]}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}getHistorySize(){return this.undoStack.length}destroy(){this.clear()}emitHistoryChange(t){var n;(n=this.emitter)==null||n.emit("history:change",{type:"history:change",action:t})}}var qO=(e,t,n)=>new Promise((r,i)=>{var o=c=>{try{s(n.next(c))}catch(l){i(l)}},a=c=>{try{s(n.throw(c))}catch(l){i(l)}},s=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);s((n=n.apply(e,t)).next())});class goe{constructor(){this.extensions=new kC,this.interactions=[],this.active=!1,this.running=null,this.concurrentInteractions=new Set,this.selection=new Set,this.handleClick=t=>{const n=this.editor.getDocument(),r=t.target;if(!r){this.deactivate();return}n.contains(r)||IH(r)?this.activate():this.deactivate()}}init(t){Object.assign(this,t),document.addEventListener("click",this.handleClick),this.interactions.forEach(n=>{this.extensions.register(n.name,n),n.init({emitter:this.emitter,editor:this.editor,commander:this.commander,state:this.state,interaction:this}),this.emitter.emit("interaction:registered",n)})}isActive(){return this.active}select(t,n){const r=this.getSelection(),i=[],o=[];if(n==="replace"){const c=new Set(t);r.forEach(l=>{c.has(l)||o.push(l)}),t.forEach(l=>{this.selection.has(l)||i.push(l)}),this.selection=c}else n==="add"?t.forEach(c=>{this.selection.has(c)||(this.selection.add(c),i.push(c))}):n==="remove"?t.forEach(c=>{this.selection.delete(c)&&o.push(c)}):n==="toggle"&&t.forEach(c=>{this.selection.has(c)?(this.selection.delete(c),o.push(c)):(this.selection.add(c),i.push(c))});const a=this.getSelection(),s={type:"selection:change",previous:r,next:a,added:i,removed:o,mode:n};this.emitter.emit("selection:change",s)}getSelection(){return[...this.selection]}isSelected(t){return this.selection.has(t)}clearSelection(){const t=this.getSelection();this.selection.clear();const n={type:"selection:change",previous:t,next:[],added:[],removed:t,mode:"replace"};this.emitter.emit("selection:change",n)}activate(){this.active=!0,this.emitter.emit("activated")}deactivate(){this.active=!1,this.running=null,this.clearSelection(),this.emitter.emit("deactivated")}executeExclusiveInteraction(t,n){return qO(this,null,function*(){if(!(!this.active||this.running)){this.running=t;try{this.emitter.emit("interaction:started",t),yield n(),this.emitter.emit("interaction:ended",t)}catch(r){console.error(`Error occurred during exclusive interaction "${t.name}":`,r),this.emitter.emit("interaction:error",t,r)}finally{this.running=null}}})}executeConcurrentInteraction(t,n){return qO(this,null,function*(){if(this.active){this.concurrentInteractions.add(t);try{this.emitter.emit("interaction:started",t),yield n(),this.emitter.emit("interaction:ended",t)}catch(r){console.error(`Error occurred during concurrent interaction "${t.name}":`,r),this.emitter.emit("interaction:error",t,r)}finally{this.concurrentInteractions.delete(t)}}})}getOrCreateTransientContainer(){const t="transient-container",n=this.editor.getDocument(),r=gi(n,t);if(r&&r.isConnected)return r;const i=Se("g");return uo(i,t),n.appendChild(i),i}appendTransientElement(t){return this.getOrCreateTransientContainer().appendChild(t),t}destroy(){this.extensions.forEach(t=>{t.destroy(),this.emitter.emit("interaction:destroyed",t)}),this.extensions.destroy(),this.active=!1,this.running=null,this.clearSelection(),document.removeEventListener("click",this.handleClick),this.getOrCreateTransientContainer().remove()}}class moe{constructor(){this.extensions=new kC}init(t,n=[]){Object.assign(this,t),n.forEach(r=>{this.registerPlugin(r)})}getPlugin(t){return this.extensions.get(t)}getPlugins(){return this.extensions.getAll()}registerPlugin(t){this.extensions.register(t.name,t);const n={emitter:this.emitter,editor:this.editor,commander:this.commander,plugin:this,state:this.state};t.init(n),this.emitter.emit("plugin:registered",t)}unregisterPlugin(t){const n=this.extensions.get(t);n&&(n.destroy(),this.extensions.unregister(t),this.emitter.emit("plugin:unregistered",n))}destroy(){this.extensions.getAll().forEach(t=>{this.unregisterPlugin(t.name),this.emitter.emit("plugin:destroyed",t)}),this.extensions.destroy()}}var yoe=Object.defineProperty,jO=Object.getOwnPropertySymbols,voe=Object.prototype.hasOwnProperty,boe=Object.prototype.propertyIsEnumerable,FO=(e,t,n)=>t in e?yoe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,BO=(e,t)=>{for(var n in t||(t={}))voe.call(t,n)&&FO(e,n,t[n]);if(jO)for(var n of jO(t))boe.call(t,n)&&FO(e,n,t[n]);return e};class _oe{init(t){Object.assign(this,t)}addItemDatum(t,n){const r=t.slice(0,-1),i=t[t.length-1],o=Array.isArray(n)?n:[n];IC(this.options.data,r).splice(i,0,...o),this.emitter.emit("options:data:item:add",{indexes:t,datum:n}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"add",path:"data.items",indexes:t,value:o}]})}updateItemDatum(t,n){const r=eo(this.options.data,t);Object.assign(r,n),this.emitter.emit("options:data:item:update",{indexes:t,datum:n}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",path:"data.items",indexes:t,value:n}]})}removeItemDatum(t,n=1){const r=t.slice(0,-1),i=t[t.length-1],a=IC(this.options.data,r).splice(i,n);this.emitter.emit("options:data:item:remove",{indexes:t,datum:a}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"remove",path:"data.items",indexes:t,value:a}]})}updateData(t,n){this.options.data[t]=n,this.emitter.emit("options:data:update",{key:t,value:n}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",path:`data.${t}`,value:n}]})}updateElement(t,n){this.updateBuiltInElement(t,n)}updateOptions(t){this.options=BO(BO({},this.options),t),this.options.padding!==void 0&&qb(this.editor.getDocument(),Er(this.options.padding)),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",path:"",value:t}]})}getOptions(){return this.options}updateBuiltInElement(t,n){var r,i;const{data:o}=this.options,{attributes:a={}}=n,s=Du(t),c=ir(t)||Ue.ItemLabel===s||Ue.ItemDesc===s||Ue.ItemValue===s||Ue.ItemIllus===s,l=c?AC(t):void 0;if(c){const u=eo(o,l),h=s.replace("item-","");u.attributes||(u.attributes={}),(r=u.attributes)[h]||(r[h]={}),Object.assign(u.attributes[h],a)}else(Ue.Title===s||Ue.Desc===s||Ue.Illus===s)&&(o.attributes||(o.attributes={}),(i=o.attributes)[s]||(i[s]={}),Object.assign(o.attributes[s],a));this.emitter.emit("options:element:update",{element:t,props:n}),this.emitter.emit("options:change",{type:"options:change",changes:[{op:"update",role:s,indexes:l,path:c?`${jne(l)}.attributes.${s.replace("item-","")}`:`data.attributes.${s}`,value:n}]})}destroy(){}}class xoe{constructor(t,n,r){if(this.emitter=t,this.document=n,this.options=r,!n.isConnected)throw new Error("The provided document is not connected to the DOM.");n.style.userSelect="none";const i=new poe,o=new _oe,a=new moe,s=new goe;i.init({state:o,emitter:t}),o.init({emitter:t,editor:this,commander:i,options:r}),a.init({emitter:t,editor:this,commander:i,state:o},r.plugins),s.init({emitter:t,editor:this,commander:i,state:o,interactions:r.interactions}),this.commander=i,this.state=o,this.plugin=a,this.interaction=s}getDocument(){return this.document}destroy(){this.document.style.userSelect="",this.interaction.destroy(),this.plugin.destroy(),this.commander.destroy(),this.state.destroy()}}var woe=Object.defineProperty,Poe=Object.defineProperties,$oe=Object.getOwnPropertyDescriptors,Vc=Object.getOwnPropertySymbols,WO=Object.prototype.hasOwnProperty,GO=Object.prototype.propertyIsEnumerable,VO=(e,t,n)=>t in e?woe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_n=(e,t)=>{for(var n in t||(t={}))WO.call(t,n)&&VO(e,n,t[n]);if(Vc)for(var n of Vc(t))GO.call(t,n)&&VO(e,n,t[n]);return e},Yc=(e,t)=>Poe(e,$oe(t)),zi=(e,t)=>{var n={};for(var r in e)WO.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Vc)for(var r of Vc(e))t.indexOf(r)<0&&GO.call(e,r)&&(n[r]=e[r]);return n};function Coe(e){const t=e,{container:n="#container",padding:r=0,template:i,design:o,theme:a,themeConfig:s}=t,c=zi(t,["container","padding","template","design","theme","themeConfig"]),l=typeof n=="string"?document.querySelector(n)||document.createElement("div"):n,u=i?gm(i):void 0,h=dv({},u==null?void 0:u.themeConfig,s),d=a||s||u!=null&&u.themeConfig?Eoe(a,h):void 0,f={container:l,padding:Er(r)};if(u){const g=u,{design:y}=g,m=zi(g,["design"]);Object.assign(f,m)}if(Object.assign(f,c),i&&(f.template=i),u!=null&&u.design||o){const g=Ooe(_n(_n({},u==null?void 0:u.design),o),d?Yc(_n({},e),{themeConfig:d}):e);fv(g)&&(f.design=g)}return a&&(f.theme=a),d&&(f.themeConfig=d),f}function om(e){if(typeof e=="string")return{type:e};if(!("type"in e))throw new Error("Type is required");return e}function Ooe(e,t){const{structure:n,title:r,item:i,items:o}=e||{},a=YO(i||(o==null?void 0:o[0]),t);return{structure:Soe(n),title:Moe(r,t),item:a,items:o?o.map(s=>YO(s,t)):[a]}}function Soe(e){if(!e)return null;const t=om(e),{type:n}=t,r=zi(t,["type"]),i=Gw(n);if(!i)return null;const{component:o}=i;return Yc(_n({},i),{component:a=>o(_n(_n({},a),r))})}function Moe(e,t){if(!e)return{component:null};const n=om(e),{type:r}=n,i=zi(n,["type"]),{themeConfig:o}=t,a=(o==null?void 0:o.colorBg)||"#fff",s=XO(a,a);return{component:c=>Y_(_n(Yc(_n({},c),{themeColors:s}),i))}}function YO(e,t){if(!e)return null;const n=om(e),{type:r}=n,i=zi(n,["type"]),o=n3(r);if(!o)return null;const{component:a,options:s}=o;return Yc(_n({},o),{component:c=>{var l;const{indexes:u}=c,{data:h,themeConfig:d}=t,f=(d==null?void 0:d.colorBg)||"#fff",g=c,{themeColors:y=XO(Aa(d==null?void 0:d.palette,u,(l=h==null?void 0:h.items)==null?void 0:l.length)||(d==null?void 0:d.colorPrimary)||"#FF356A",f)}=g,m=zi(g,["themeColors"]);return a(_n(_n({themeColors:y},m),i))},options:s})}function Eoe(e,t={}){var n;const r=e?X_(e)||{}:{},i=dv({},r,t);return i.palette=t.palette||r.palette,i.stylize=(n=t.stylize)!=null?n:r.stylize,i.colorPrimary||(i.colorPrimary="#FF356A"),i.palette||(i.palette=[i.colorPrimary]),i}function XO(e,t="#fff"){return Z_({colorPrimary:e,isDarkMode:By(t),colorBg:t})}function Ioe(e){return e===" "||e===" "}function Aoe(e){let t=0,n=0;for(;n<e.length;){const r=e[n];if(r===" "){t+=1,n+=1;continue}if(r===" "){t+=2,n+=1;continue}break}return{indent:t,content:e.slice(n)}}function Toe(e){return e.trimEnd()}function koe(e){return/[<>=o.x-]{2,}/.test(e)}function UO(e){const t=e.trim();if(!t)return null;const n=t.match(/^([^:\s=]+)\s*[:=]\s*(.*)$/);if(n)return{key:n[1],value:n[2].trim()};const r=t.match(/^([^\s]+)\s+(.*)$/);return r?{key:r[1],value:r[2].trim()}:{key:t,value:void 0}}function Xc(e,t){return{kind:"object",line:e,value:t,entries:{}}}function KO(e){return{kind:"array",line:e,items:[]}}function Roe(e){const t=[],n=Xc(0),r=[{indent:-1,node:n,parent:null,key:null}];return e.split(/\r?\n/).forEach((o,a)=>{const s=a+1;if(!o.trim())return;const{indent:c,content:l}=Aoe(o),u=Toe(l);if(!u.trim())return;for(;r.length>1&&c<=r[r.length-1].indent;)r.pop();const h=r[r.length-1];let d=h.node;const f=u.trim();if(f.startsWith("-")&&(f.length===1||Ioe(f[1]))){if(d.kind!=="array")if(d.kind==="object"&&Object.keys(d.entries).length===0&&d.value===void 0&&h.parent&&h.key){const b=KO(d.line);if(h.parent.kind==="object")h.parent.entries[h.key]=b;else if(h.parent.kind==="array"){const _=h.parent.items.indexOf(d);_>=0&&(h.parent.items[_]=b)}h.node=b,d=b}else{t.push({path:"",line:s,code:"bad_list",message:"List item is not under an array container.",raw:f});return}const m=f.slice(1).trim(),v=Xc(s,m||void 0);d.items.push(v),r.push({indent:c,node:v,parent:d});return}if(h.key==="relations"&&!f.startsWith("-")&&koe(f)){if(d.kind!=="array")if(d.kind==="object"&&Object.keys(d.entries).length===0&&d.value===void 0&&h.parent&&h.key){const v=KO(d.line);if(h.parent.kind==="object")h.parent.entries[h.key]=v;else if(h.parent.kind==="array"){const b=h.parent.items.indexOf(d);b>=0&&(h.parent.items[b]=v)}h.node=v,d=v}else{t.push({path:"",line:s,code:"bad_list",message:"List item is not under an array container.",raw:f});return}const m=Xc(s,f);d.items.push(m),r.push({indent:c,node:m,parent:d});return}const g=UO(f);if(!g){t.push({path:"",line:s,code:"bad_syntax",message:"Invalid syntax line.",raw:f});return}if(d.kind!=="object"){t.push({path:"",line:s,code:"bad_syntax",message:"Key-value pair is not under an object container.",raw:f});return}const y=Xc(s,g.value);d.entries[g.key]=y,r.push({indent:c,node:y,parent:d,key:g.key})}),{ast:n,errors:t}}function ZO(e){return UO(e)}function Uc(e,t){return{kind:"value",line:t,value:e}}const Loe=/^(#[0-9a-f]{8}|#[0-9a-f]{6}|#[0-9a-f]{4}|#[0-9a-f]{3})/i,zoe=/^((?:rgb|rgba|hsl|hsla)\([^)]*\))/i;function Ur(e){const t=e.trim();return t==="true"?!0:t==="false"?!1:/^-?\d+(\.\d+)?$/.test(t)?parseFloat(t):t}function Kr(e){if(e.kind==="value"||e.kind==="object")return e.value}function Nt(e,t,n,r,i,o){e.push({path:n,line:t.line,code:r,message:i,raw:o})}function QO(e,t="any"){let n=e.trim();if(n.startsWith("[")&&n.endsWith("]")&&(n=n.slice(1,-1).trim()),!n)return[];let r;t==="comma"?r=n.split(","):t==="space"?r=n.split(/\s+/):r=n.split(/[,\s]+/);const i=[];for(const o of r){const a=o.trim();if(a){if(a==="#"||a==="//")break;i.push(a)}}return i}function Noe(e){let t=e.trim();const n=t.search(/\s+#(?![0-9a-f])/i);n>=0&&(t=t.slice(0,n).trimEnd());const r=t.indexOf("//");return r>=0&&(t=t.slice(0,r).trimEnd()),t}function am(e){const t=Noe(e);if(!t)return;const n=t.match(Loe);if(n&&n[0].length===t.length)return t;const r=t.match(zoe);if(r&&r[1].length===t.length||ve(t).isValid())return t}function JO(e,t,n,r={}){const i=Kr(e);if(i===void 0){Nt(n,e,t,"schema_mismatch","Expected color value.");return}const o=am(i);if(!o){r.soft||Nt(n,e,t,"invalid_value","Invalid color value.",i);return}return o}function Hoe(e,t){return t.length>1||e.startsWith("[")&&e.endsWith("]")?!0:am(e)!==void 0}function sm(e){if(e.kind==="array")return e.items.map(r=>sm(r));if(e.kind==="value"||!(Object.keys(e.entries).length>0)&&e.value!==void 0)return Ur(e.value);const n={};return e.value!==void 0&&(n.value=Ur(e.value)),Object.entries(e.entries).forEach(([r,i])=>{n[r]=sm(i)}),n}function Doe(e,t,n,r){let i,o=null;for(const a of t.variants){const s=[],c=nn(e,a,n,s);(o===null||s.length<o.length)&&(o=s,i=c)}return o&&r.push(...o),i}function nn(e,t,n,r){switch(t.kind){case"union":return Doe(e,t,n,r);case"string":{const i=Kr(e);if(i===void 0){Nt(r,e,n,"schema_mismatch","Expected string value.");return}return i}case"number":{const i=Kr(e);if(i===void 0){Nt(r,e,n,"schema_mismatch","Expected number value.");return}const a=i.trim().match(/^(-?\d+(\.\d+)?)(?:\s*(#|\/\/).*)?$/);if(!a){Nt(r,e,n,"invalid_value","Invalid number value.",i);return}return parseFloat(a[1])}case"boolean":{const i=Kr(e);if(i===void 0){Nt(r,e,n,"schema_mismatch","Expected boolean value.");return}if(i!=="true"&&i!=="false"){Nt(r,e,n,"invalid_value","Invalid boolean value.",i);return}return i==="true"}case"enum":{const i=Kr(e);if(i===void 0){Nt(r,e,n,"schema_mismatch","Expected enum value.");return}if(!t.values.includes(i)){Nt(r,e,n,"invalid_value","Invalid enum value.",i);return}return i}case"array":{if(e.kind==="array")return e.items.map((s,c)=>nn(s,t.item,`${n}[${c}]`,r)).filter(s=>s!==void 0);if(e.kind==="object"&&Object.keys(e.entries).length>0){Nt(r,e,n,"schema_mismatch","Expected array value.");return}const i=Kr(e);if(i===void 0){Nt(r,e,n,"schema_mismatch","Expected array value.");return}const o=i.trim();return o.startsWith("[")&&!o.endsWith("]")?void 0:QO(i,t.split).map((s,c)=>nn(Uc(s,e.line),t.item,`${n}[${c}]`,r)).filter(s=>s!==void 0)}case"palette":{if(e.kind==="array"){const c=nn(e,{kind:"array",item:{kind:"color"},split:"any"},n,r);return Array.isArray(c)&&c.length>0?c:void 0}if(e.kind==="object"&&Object.keys(e.entries).length>0){Nt(r,e,n,"schema_mismatch","Expected palette value.");return}const i=Kr(e);if(i===void 0){Nt(r,e,n,"schema_mismatch","Expected palette value.");return}const o=i.trim();if(o.startsWith("[")&&!o.endsWith("]"))return;const a=am(o);if(a)return[a];const s=QO(i,"any");if(Hoe(o,s)){const c=s.map((l,u)=>JO(Uc(l,e.line),`${n}[${u}]`,r)).filter(l=>l!==void 0);return c.length>0?c:void 0}return i}case"color":return JO(e,n,r,{soft:t.soft});case"object":{if(e.kind==="array"){Nt(r,e,n,"schema_mismatch","Expected object value.");return}const i={};if(e.kind==="value"){if(t.shorthandKey)return i[t.shorthandKey]=e.value,i;const o=ZO(e.value);if((o==null?void 0:o.value)!==void 0){if(t.fields[o.key]){const a=nn(Uc(o.value,e.line),t.fields[o.key],`${n}.${o.key}`,r);return a!==void 0&&(i[o.key]=a),i}return t.allowUnknown?(i[o.key]=Ur(o.value),i):(Nt(r,e,`${n}.${o.key}`,"unknown_key","Unknown key in object.",o.key),i)}if(t.allowUnknown)return i.value=Ur(e.value),i;Nt(r,e,n,"invalid_value","Expected object value.");return}if(e.value!==void 0)if(t.shorthandKey&&i[t.shorthandKey]===void 0)i[t.shorthandKey]=e.value;else{const o=ZO(e.value);if((o==null?void 0:o.value)!==void 0)if(t.fields[o.key]){const a=nn(Uc(o.value,e.line),t.fields[o.key],`${n}.${o.key}`,r);a!==void 0&&i[o.key]===void 0&&(i[o.key]=a)}else t.allowUnknown?i[o.key]=Ur(o.value):Nt(r,e,`${n}.${o.key}`,"unknown_key","Unknown key in object.",o.key);else t.allowUnknown&&(i.value=Ur(e.value))}return Object.entries(e.entries).forEach(([o,a])=>{const s=t.fields[o];if(!s){if(t.allowUnknown){i[o]=sm(a);return}Nt(r,a,`${n}.${o}`,"unknown_key","Unknown key in object.",o);return}const c=nn(a,s,`${n}.${o}`,r);c!==void 0&&(i[o]=c)}),i}default:return}}const qt=()=>({kind:"string"}),hr=()=>({kind:"number"}),Kc=e=>({kind:"enum",values:e}),Ni=(e={})=>({kind:"color",soft:e.soft}),Zc=(e,t="any")=>({kind:"array",item:e,split:t}),Ft=(e,t={})=>({kind:"object",fields:e,allowUnknown:t.allowUnknown,shorthandKey:t.shorthandKey}),cm=(...e)=>({kind:"union",variants:e}),qoe=()=>({kind:"palette"}),eS={fill:Ni({soft:!0}),stroke:Ni({soft:!0})},Hi=Ft(eS,{allowUnknown:!0}),lm=Ft(eS,{allowUnknown:!0}),um=Ft({},{allowUnknown:!0});um.fields={id:qt(),label:qt(),value:cm(hr(),qt()),desc:qt(),icon:qt(),group:qt(),children:Zc(um)};const tS=Ft({id:qt(),from:qt(),to:qt(),label:qt(),direction:Kc(["forward","both","none"]),showArrow:Kc(["true","false"]),arrowType:Kc(["arrow","triangle","diamond"])},{allowUnknown:!0}),nS=Ft({type:qt(),colorBg:Ni(),colorPrimary:Ni(),palette:qoe(),title:Hi,desc:Hi,shape:lm,base:Ft({global:Ft({},{allowUnknown:!0}),shape:lm,text:Hi}),item:Ft({icon:Ft({},{allowUnknown:!0}),label:Hi,desc:Hi,value:Hi,shape:lm}),stylize:Ft({type:Kc(["rough","pattern"]),roughness:hr(),bowing:hr(),fillWeight:hr(),hachureGap:hr(),pattern:qt(),backgroundColor:Ni(),foregroundColor:Ni(),scale:hr()},{shorthandKey:"type"}),elements:Ft({},{allowUnknown:!0})},{shorthandKey:"type"}),Qc=Ft({},{allowUnknown:!0,shorthandKey:"type"}),rS=Ft({structure:Qc,item:Qc,items:Zc(Qc),title:Qc}),iS=Ft({title:qt(),desc:qt(),items:Zc(um),relations:Zc(tS)}),oS=Ft({type:qt()},{shorthandKey:"type"}),aS=Ft({template:oS,design:rS,data:iS,theme:nS,width:cm(hr(),qt()),height:cm(hr(),qt())}),sS=/[<>=o.x-]{2,}/,Jc=/[<>=o.x-]{2,}/g;function el(e){let t=e.trim();if(!t)return"";const n=t[0],r=t[t.length-1];return(n==='"'&&r==='"'||n==="'"&&r==="'")&&(t=t.slice(1,-1)),t=t.replace(/\\(["'])/g,"$1").replace(/(&quot;|&#quot;|#quot;)/g,'"').replace(/(&apos;|&#39;|#apos;)/g,"'"),t.trim()}function joe(e){const t=e.trim().replace(/^[-=.ox]+/,"").trim();return el(t)}function tl(e,t){let n=t;for(;n<e.length&&/\s/.test(e[n]);)n+=1;return n}function cS(e,t){let n=tl(e,t);if(n>=e.length)return null;const r=n;for(;n<e.length;){const a=e[n];if(/\s/.test(a)||a==="["||a==="("||a==="@"||a==="|"||a==="<"||a===">"||a==="-"&&(e[n+1]==="-"||e[n+1]===">"||e[n+1]==="<"))break;n+=1}if(n===r)return null;const i=e.slice(r,n).trim();if(!i)return null;if(e.startsWith("@{",n)){const a=e.indexOf("}",n+2);a!==-1&&(n=a+1)}n=tl(e,n);let o;if(e[n]==="["){const a=e.indexOf("]",n+1);a!==-1&&(o=el(e.slice(n+1,a)),n=a+1)}else if(e[n]==="("){const a=e.indexOf(")",n+1);if(a!==-1){let s=e.slice(n+1,a).trim();s.startsWith("[")&&s.endsWith("]")&&(s=s.slice(1,-1).trim()),o=el(s),n=a+1}}return{node:{id:i,label:o},nextIndex:n}}function Foe(e,t){Jc.lastIndex=t;const n=Jc.exec(e);if(!n)return null;const r=n[0],i=n.index,o=i+r.length;let s=joe(e.slice(t,i))||void 0,c=r,l=o;if(l=tl(e,l),e[l]==="|"){const v=e.indexOf("|",l+1);if(v!==-1){s=el(e.slice(l+1,v))||s,l=v+1;const _=tl(e,l);Jc.lastIndex=_;const x=Jc.exec(e);x&&x.index===_?(c+=x[0],l=x.index+x[0].length):l=_}}const u=c.includes("<"),h=c.includes(">"),d=c.match(/[xo]/gi)||[],f=/^[xo]/i.test(c),g=/[xo]$/i.test(c);let y="none",m=!1;return u&&h||u&&g||h&&f||f&&g?y="both":(u||h||d.length>0)&&(y="forward",m=u&&!h),{label:s,direction:y,reverse:m,nextIndex:l}}function Boe(e){const t=[],n=[],r=new Map;let i=0;const o=cS(e,i);if(!o)return{relations:t,nodes:n};let a=o.node;for(r.has(a.id)||(r.set(a.id,a),n.push(a)),i=o.nextIndex;i<e.length;){const s=Foe(e,i);if(!s)break;i=s.nextIndex;const c=cS(e,i);if(!c)break;i=c.nextIndex;let l=a.id,u=c.node.id;const h=s.direction;s.reverse&&(l=c.node.id,u=a.id);const d={from:l,to:u};s.label&&(d.label=s.label),h==="both"&&(d.direction="both"),h==="none"&&(d.direction="none"),t.push(d),r.has(a.id)||(r.set(a.id,a),n.push(a)),r.has(c.node.id)||(r.set(c.node.id,c.node),n.push(c.node)),a=c.node}return{relations:t,nodes:n}}function Woe(e,t,n,r){if(!n)return;const i=e.get(n);if(i){!i.label&&r&&(i.label=r);return}const o={id:n,label:r||n};e.set(n,o),t.push(o)}function Goe(e,t,n){const r=nn(e,tS,t,n);return!r||typeof r!="object"||typeof r.from!="string"||typeof r.to!="string"?null:r}function Voe(e,t,n){const r=[],i=[],o=new Map,a=s=>{if(!sS.test(s))return;const c=Boe(s);c.nodes.forEach(l=>{Woe(o,i,l.id,l.label)}),r.push(...c.relations)};return e.kind==="array"?e.items.forEach((s,c)=>{if(s.kind==="object"&&s.value&&Object.keys(s.entries).length===0&&sS.test(s.value)){a(s.value);return}const l=Goe(s,`${n}[${c}]`,t);l&&r.push(l)}):e.kind==="object"&&e.value&&a(e.value),{relations:r,items:i}}var Yoe=Object.defineProperty,Xoe=Object.defineProperties,Uoe=Object.getOwnPropertyDescriptors,nl=Object.getOwnPropertySymbols,lS=Object.prototype.hasOwnProperty,uS=Object.prototype.propertyIsEnumerable,hS=(e,t,n)=>t in e?Yoe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dS=(e,t)=>{for(var n in t||(t={}))lS.call(t,n)&&hS(e,n,t[n]);if(nl)for(var n of nl(t))uS.call(t,n)&&hS(e,n,t[n]);return e},Koe=(e,t)=>Xoe(e,Uoe(t)),fS=(e,t)=>{var n={};for(var r in e)lS.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&nl)for(var r of nl(e))t.indexOf(r)<0&&uS.call(e,r)&&(n[r]=e[r]);return n};function Zoe(e){var t;const n=new Set,r=[];for(let i=e.length-1;i>=0;i-=1){const o=e[i],a=(t=o.id)!=null?t:o.label;if(!a){r.push(o);continue}n.has(a)||(n.add(a),o.id||(o.id=a),r.push(o))}return r.reverse()}function Qoe(e,t){if(!e)return;const n=nn(e,oS,"template",t);if(n){if(typeof n=="string")return n;if(typeof n=="object"&&typeof n.type=="string")return n.type}}function pS(e){var t;const{ast:n,errors:r}=Roe(e),i=[],o={},a=dS({},n.entries),s=n.entries.infographic;let c;s&&s.kind==="object"&&(s.value&&(c=s.value),Object.entries(s.entries).forEach(([v,b])=>{v in a||(a[v]=b)}));const l=new Set(["infographic","template","design","data","theme","width","height"]);Object.keys(a).forEach(v=>{l.has(v)||r.push({path:v,line:a[v].line,code:"unknown_key",message:"Unknown top-level key.",raw:v})});const u=a.template,h=Qoe(u,r);h&&(o.template=h),!o.template&&c&&(o.template=c);const d=a.design;if(d){const v=nn(d,rS,"design",r);v&&(o.design=v)}const f=a.data;if(f){let v,b=f;if(f.kind==="object"){const x=f.entries,{relations:w}=x,P=fS(x,["relations"]);v=w,b=Koe(dS({},f),{entries:P})}const _=nn(b,iS,"data",r);if(_&&(o.data=_),v){const x=Voe(v,r,"data.relations");if(x.relations.length>0||x.items.length>0){const w=(t=o.data)!=null?t:{},P=Array.isArray(w.items)?w.items:[],$=Zoe(P),C=new Map;$.forEach(M=>{M.id&&C.set(M.id,M)}),x.items.forEach(M=>{const S=C.get(M.id);S?!S.label&&M.label&&(S.label=M.label):($.push(M),C.set(M.id,M))}),w.items=$,w.relations=x.relations,o.data=w}}}const g=a.theme;if(g){const v=nn(g,nS,"theme",r);if(v&&typeof v=="object"){const b=v,{type:_}=b,x=fS(b,["type"]);typeof _=="string"&&_&&(o.theme=_),Object.keys(x).length>0&&(o.themeConfig=x)}}const y=a.width;if(y){const v=nn(y,aS.fields.width,"width",r);v!==void 0&&(o.width=v)}const m=a.height;if(m){const v=nn(m,aS.fields.height,"height",r);v!==void 0&&(o.height=v)}return{options:o,errors:r,warnings:i,ast:n}}const Joe=()=>[new MO,new TO],eae=()=>[new XC,new RC,new LC,new UC,new ZC,new nO,new eO],tae={padding:20,theme:"light",themeConfig:{palette:"antv"},get plugins(){return Joe()},get interactions(){return eae()}};var nae=Object.defineProperty,gS=Object.getOwnPropertySymbols,rae=Object.prototype.hasOwnProperty,iae=Object.prototype.propertyIsEnumerable,mS=(e,t,n)=>t in e?nae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Un=(e,t)=>{for(var n in t||(t={}))rae.call(t,n)&&mS(e,n,t[n]);if(gS)for(var n of gS(t))iae.call(t,n)&&mS(e,n,t[n]);return e};function hm(e,t){const n=Un(Un({},e),t);return(e.design||t.design)&&(n.design=Un(Un({},e.design),t.design)),(e.themeConfig||t.themeConfig)&&(n.themeConfig=Un(Un({},e.themeConfig),t.themeConfig)),(e.svg||t.svg)&&(n.svg=Un(Un({},e.svg),t.svg)),n}function dm(e){const t=Un({},e);return t.data&&(t.data=uv(t.data)),t.elements&&(t.elements=uv(t.elements)),t}function yS(e){const{design:t,data:n}=e;return!(!t||!fv(t)||!n||!Array.isArray(n.items)||n.items.length<1)}var oae=Object.defineProperty,vS=Object.getOwnPropertySymbols,aae=Object.prototype.hasOwnProperty,sae=Object.prototype.propertyIsEnumerable,bS=(e,t,n)=>t in e?oae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,cae=(e,t)=>{for(var n in t||(t={}))aae.call(t,n)&&bS(e,n,t[n]);if(vS)for(var n of vS(t))sae.call(t,n)&&bS(e,n,t[n]);return e},lae=(e,t,n)=>new Promise((r,i)=>{var o=c=>{try{s(n.next(c))}catch(l){i(l)}},a=c=>{try{s(n.throw(c))}catch(l){i(l)}},s=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);s((n=n.apply(e,t)).next())});class uae{constructor(t){this.rendered=!1,this.emitter=new foe,this.node=null,this.initialOptions={},this.setOptions(t,"replace",!0)}getOptions(){return this.options}setOptions(t,n="replace",r=!1){const{options:i,errors:o,warnings:a}=hae(t);r&&(this.initialOptions=i);const s=hm(n==="replace"?dm(this.initialOptions||{}):this.options||dm(this.initialOptions||{}),i);this.options=s,this.parsedOptions=Coe(hm(tae,this.options)),a.length&&this.emitter.emit("warning",a),o.length&&this.emitter.emit("error",o)}render(t){t?this.setOptions(t,"replace"):!this.options&&this.initialOptions&&this.setOptions(this.initialOptions,"replace"),this.performRender()}update(t){this.setOptions(t,"merge"),this.performRender()}performRender(){var t;const n=this.parsedOptions;if(!yS(n)){this.emitter.emit("error",new Error("Incomplete options"));return}const{container:r}=this.parsedOptions,i=this.compose(n),o=new XN(n,i);this.node=o.render(),r==null||r.replaceChildren(this.node),(t=this.editor)==null||t.destroy(),this.editor=void 0,this.options.editable&&(this.editor=new xoe(this.emitter,this.node,n)),this.rendered=!0,this.emitter.emit("rendered",{node:this.node,options:this.options});const a=this.node;return a&&zL(a).then(()=>{this.node===a&&this.emitter.emit("loaded",{node:a,options:this.options})}),!0}compose(t){const{design:n,data:r}=t,{title:i,item:o,items:a,structure:s}=n,{component:c,props:l}=s,u=i.component,h=o.component,d=a.map(y=>y.component),f=i_(p(c,cae({data:r,Title:u,Item:h,Items:d,options:t},l))),g=fi(f);if(!g)throw new Error("Failed to parse SVG template");return g}getTypes(){const t=this.parsedOptions;if(!yS(t)){this.emitter.emit("error",new Error("Incomplete options"));return}const n=t.design,r=n.structure.composites||[],i=n.items.map(o=>o.composites||[]);return LH({structure:r,items:i})}toDataURL(t){return lae(this,null,function*(){if(!this.node)throw new Error("Infographic is not rendered yet.");return(t==null?void 0:t.type)==="svg"?yield qie(this.node,t):yield uoe(this.node,t)})}on(t,n){this.emitter.on(t,n)}off(t,n){this.emitter.off(t,n)}destroy(){var t,n;(t=this.editor)==null||t.destroy(),(n=this.node)==null||n.remove(),this.node=null,this.rendered=!1,this.emitter.emit("destroyed"),this.emitter.removeAllListeners()}}function hae(e){if(typeof e=="string"){const{options:t,errors:n,warnings:r}=pS(e);return{options:t,errors:n,warnings:r}}return{options:dm(e),errors:[],warnings:[]}}const dae=CS.version;V.AlignLayout=yi,V.BadgeCard=o3,V.BrushSelect=RC,V.BtnAdd=J,V.BtnRemove=nt,V.BtnsGroup=qe,V.CandyCardLite=c3,V.CapsuleItem=m3,V.ChartBar=Vw,V.ChartColumn=Yw,V.ChartLine=Zw,V.ChartPie=Qw,V.ChartWordCloud=i4,V.CircleNode=b3,V.CircularProgress=w3,V.ClickSelect=LC,V.CompactCard=O3,V.CompareBinaryHorizontal=p4,V.CompareHierarchyLeftRight=v4,V.CompareHierarchyRow=b4,V.DblClickEditText=XC,V.Defs=Ke,V.DoneList=E3,V.DragElement=UC,V.EditBar=MO,V.Ellipse=Je,V.FlexLayout=ye,V.Fragment=ho,V.Gap=mt,V.Group=Y,V.HierarchyMindmap=E4,V.HierarchyStructure=A4,V.HierarchyTree=L4,V.HorizontalIconArrow=T3,V.HorizontalIconLine=N3,V.HotkeyHistory=ZC,V.IconBadge=q3,V.Illus=g_,V.IndexedCard=B3,V.Infographic=uae,V.Interaction=lr,V.ItemDesc=ht,V.ItemIcon=Dt,V.ItemIconCircle=Ar,V.ItemLabel=Ve,V.ItemValue=vo,V.ItemsGroup=He,V.LCornerCard=V3,V.LabelText=ix,V.LetterCard=U3,V.LinedText=Q3,V.ListColumn=z4,V.ListGrid=N4,V.ListPyramid=H4,V.ListRow=D4,V.ListSector=F4,V.ListWaterfall=B4,V.ListZigzagDown=X4,V.ListZigzagUp=U4,V.Path=Pe,V.PillBadge=tx,V.Plugin=Y1,V.Polygon=Wt,V.ProgressCard=hw,V.Quadrant=K4,V.QuarterCircular=pw,V.QuarterSimpleCard=yw,V.Rect=ze,V.RelationCircle=Z4,V.RelationDagreFlow=D$,V.RelationNetwork=q$,V.ResizeElement=TO,V.RibbonCard=_w,V.RoundedRectNode=Pw,V.SelectHighlight=eO,V.SequenceAscendingStairs3d=K$,V.SequenceAscendingSteps=Z$,V.SequenceCircleArrows=J$,V.SequenceCircular=eC,V.SequenceColorSnakeSteps=tC,V.SequenceFilterMesh=oC,V.SequenceFunnel=lC,V.SequenceHorizontalZigzag=uC,V.SequenceMountain=fC,V.SequencePyramid=pC,V.SequenceRoadmapVertical=mC,V.SequenceSnakeSteps=yC,V.SequenceStairsFront=vC,V.SequenceSteps=bC,V.SequenceTimeline=_C,V.SequenceZigzagPucks3d=wC,V.SequenceZigzagSteps=MC,V.ShapesGroup=xt,V.SimpleCircleNode=Ow,V.SimpleHorizontalArrow=Ew,V.SimpleIllusItem=Tw,V.SimpleItem=Lw,V.SimpleVerticalArrow=Hw,V.Text=Ne,V.Title=Y_,V.UnderlineText=jw,V.VERSION=dae,V.VerticalIconArrow=Ww,V.ZoomWheel=nO,V.cloneElement=or,V.createFragment=eD,V.createLayout=Zu,V.exportToSVG=rm,V.getCombinedBounds=mi,V.getElementBounds=ae,V.getElementsBounds=Ir,V.getFont=pu,V.getFonts=gu,V.getItem=n3,V.getItemProps=st,V.getItems=Oq,V.getPalette=Ov,V.getPaletteColor=Aa,V.getPalettes=YL,V.getStructure=Gw,V.getStructures=LU,V.getTemplate=gm,V.getTemplates=OS,V.getTheme=X_,V.getThemeColors=Ct,V.getThemes=lq,V.jsx=is,V.jsxDEV=nD,V.jsxs=tD,V.loadSVGResource=hi,V.parseSVG=fi,V.parseSyntax=pS,V.registerFont=Pv,V.registerItem=ct,V.registerPalette=vu,V.registerPattern=ab,V.registerResourceLoader=hz,V.registerStructure=We,V.registerTemplate=pm,V.registerTheme=th,V.renderSVG=i_,V.sequenceCylinders3d=nC,V.setDefaultFont=jL,V.setFontExtendFactor=eH,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})}));
560
560
  //# sourceMappingURL=infographic.min.js.map