semiotic 3.13.1 → 3.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/README.md +20 -21
  2. package/ai/artifact-surface-inventory.json +1 -1
  3. package/ai/reference.md +1 -1
  4. package/ai/schema.json +1 -1
  5. package/ai/surface-manifest.json +1 -1
  6. package/ai/task-packets/compare-category-totals.json +5 -5
  7. package/ai/task-packets/compare-category-totals.md +2 -2
  8. package/ai/task-packets/correct-published-chart.json +5 -5
  9. package/ai/task-packets/correct-published-chart.md +2 -2
  10. package/ai/task-packets/index.json +6 -6
  11. package/ai/task-packets/update-live-chart.json +5 -5
  12. package/ai/task-packets/update-live-chart.md +2 -2
  13. package/dist/c-27SDQN3J.min.js +1 -0
  14. package/dist/{c-N2TVSOYL.min.js → c-4EUQNA7N.min.js} +2 -2
  15. package/dist/c-5EPR4KFB.min.js +1 -0
  16. package/dist/c-5HTUQRJT.min.js +1 -0
  17. package/dist/{c-XORVM6C5.min.js → c-5KZ3NO6X.min.js} +1 -1
  18. package/dist/c-5NAU4JAY.min.js +1 -0
  19. package/dist/c-73ORHEHO.min.js +1 -0
  20. package/dist/{c-ZWJDTDEV.min.js → c-AMQAAW7G.min.js} +1 -1
  21. package/dist/c-BQWX6NBX.min.js +1 -0
  22. package/dist/c-BR2TOCUN.min.js +1 -0
  23. package/dist/c-BRBTXINY.min.js +1 -0
  24. package/dist/c-C3Z7ZRAA.min.js +1 -0
  25. package/dist/c-C4WRRUZ5.min.js +1 -0
  26. package/dist/c-CXDAWBOW.min.js +1 -0
  27. package/dist/c-DHNROAXY.min.js +1 -0
  28. package/dist/{c-OSLNYZ3Q.min.js → c-DJ6DT5BL.min.js} +16 -16
  29. package/dist/c-DNBFFE3P.min.js +1 -0
  30. package/dist/{c-4P2EM44G.min.js → c-H5THWQI4.min.js} +3 -3
  31. package/dist/{c-XZJWL7UL.min.js → c-HOMJ3C6B.min.js} +1 -1
  32. package/dist/c-HR5AH3MA.min.js +1 -0
  33. package/dist/c-HTL37JCD.min.js +1 -0
  34. package/dist/{c-VZNIIKL6.min.js → c-JDI7HKEM.min.js} +1 -1
  35. package/dist/{c-RAIBDXDV.min.js → c-JDU4Y4IW.min.js} +1 -1
  36. package/dist/{c-ENRZPF5E.min.js → c-JS2D7A2P.min.js} +1 -1
  37. package/dist/c-L6OT4OVA.min.js +1 -0
  38. package/dist/c-LDGV6TDQ.min.js +1 -0
  39. package/dist/c-LW3GP7RY.min.js +1 -0
  40. package/dist/{c-I54V24WG.min.js → c-MSZ3ZDAP.min.js} +1 -1
  41. package/dist/{c-W5ATXREF.min.js → c-NB2UEX5C.min.js} +1 -1
  42. package/dist/{c-XOGN3524.min.js → c-NBBYSAQY.min.js} +2 -2
  43. package/dist/c-OMTJIC3P.min.js +1 -0
  44. package/dist/{c-HGWITEJI.min.js → c-OOR2LN4A.min.js} +1 -1
  45. package/dist/c-OU7A3IUL.min.js +1 -0
  46. package/dist/{c-2M2OPWVA.min.js → c-PNLTF6YG.min.js} +33 -33
  47. package/dist/c-QVKOXC3S.min.js +1 -0
  48. package/dist/{c-OIJL2WZH.min.js → c-TBMFC5CR.min.js} +1 -1
  49. package/dist/c-TFESQSWE.min.js +1 -0
  50. package/dist/c-TX53234M.min.js +1 -0
  51. package/dist/c-TZBEQ5UY.min.js +1 -0
  52. package/dist/c-UALVQIIJ.min.js +1 -0
  53. package/dist/{c-62JIVHK5.min.js → c-WFSEQ2XG.min.js} +1 -1
  54. package/dist/{c-4YPPVFZH.min.js → c-XF5ILLBG.min.js} +1 -1
  55. package/dist/c-YCBCZFOC.min.js +1 -0
  56. package/dist/c-YQHGEETR.min.js +2 -0
  57. package/dist/c-ZBSL4Y32.min.js +1 -0
  58. package/dist/c-ZMB3VTD4.min.js +1 -0
  59. package/dist/components/charts/shared/types.d.ts +1 -1
  60. package/dist/components/recipes/atlas/resolution/appearance.d.ts +1 -1
  61. package/dist/components/recipes/atlas/resolution/scene.d.ts +1 -1
  62. package/dist/components/semiotic-network-zoom.d.ts +1 -1
  63. package/dist/components/store/ThemeStore.d.ts +4 -1
  64. package/dist/components/store/themeCore.d.ts +2 -0
  65. package/dist/components/stream/mediaQuery.d.ts +2 -0
  66. package/dist/components/stream/networkEdgeHitIndex.d.ts +6 -2
  67. package/dist/components/stream/networkZoom/ZoomableNetworkCustomChart.d.ts +6 -4
  68. package/dist/components/stream/networkZoom/gestures.d.ts +5 -0
  69. package/dist/components/stream/networkZoom/types.d.ts +10 -0
  70. package/dist/components/stream/pipelineTransitionTypes.d.ts +3 -5
  71. package/dist/components/stream/pipelineTransitionUtils.d.ts +4 -0
  72. package/dist/components/stream/pipelineTransitions.d.ts +1 -13
  73. package/dist/components/stream/renderers/networkArcRenderer.d.ts +1 -3
  74. package/dist/components/stream/renderers/networkCircleRenderer.d.ts +1 -3
  75. package/dist/components/stream/renderers/networkPrimitiveRenderer.d.ts +5 -0
  76. package/dist/components/stream/renderers/networkRectRenderer.d.ts +1 -3
  77. package/dist/components/stream/renderers/renderPulse.d.ts +8 -14
  78. package/dist/components/stream/sceneToSVGShared.d.ts +9 -0
  79. package/dist/components/stream/shallowEqual.d.ts +2 -0
  80. package/dist/components/stream/useMediaPreferences.d.ts +1 -4
  81. package/dist/geo.min.js +152 -152
  82. package/dist/geo.module.min.js +1 -1
  83. package/dist/network.module.min.js +1 -1
  84. package/dist/ordinal.module.min.js +1 -1
  85. package/dist/physics.module.min.js +1 -1
  86. package/dist/semiotic-ai.module.min.js +2 -2
  87. package/dist/semiotic-atlas-selection.module.min.js +1 -1
  88. package/dist/semiotic-client-cjs-shared.min.js +1018 -1025
  89. package/dist/semiotic-client-shared.module.min.js +1 -1
  90. package/dist/semiotic-experimental-auxiliary.module.min.js +2 -2
  91. package/dist/semiotic-experimental-network-resolution-react.module.min.js +1 -1
  92. package/dist/semiotic-experimental-node-auxiliary.module.min.js +3 -3
  93. package/dist/semiotic-line.module.min.js +1 -1
  94. package/dist/semiotic-network-zoom.d.ts +1 -1
  95. package/dist/semiotic-network-zoom.min.js +7 -7
  96. package/dist/semiotic-network-zoom.module.min.js +1 -1
  97. package/dist/semiotic-realtime-core.module.min.js +1 -1
  98. package/dist/semiotic-server-edge-node.module.min.js +2 -2
  99. package/dist/semiotic-server-edge.min.js +394 -397
  100. package/dist/semiotic-server-edge.module.min.js +3 -3
  101. package/dist/semiotic-server-node.min.js +394 -397
  102. package/dist/semiotic-themes-core.min.js +2 -2
  103. package/dist/semiotic-themes-core.module.min.js +1 -1
  104. package/dist/semiotic-themes.min.js +2 -2
  105. package/dist/semiotic-themes.module.min.js +1 -1
  106. package/dist/semiotic-utils-core.min.js +11 -11
  107. package/dist/semiotic-utils-core.module.min.js +3 -3
  108. package/dist/semiotic-value.module.min.js +1 -1
  109. package/dist/semiotic.module.min.js +1 -1
  110. package/dist/server.min.js +394 -397
  111. package/dist/server.module.min.js +3 -3
  112. package/dist/xy.module.min.js +1 -1
  113. package/package.json +1 -1
  114. package/dist/c-3UXQGCQT.min.js +0 -1
  115. package/dist/c-4RVDKSMQ.min.js +0 -1
  116. package/dist/c-6WJKNYIG.min.js +0 -1
  117. package/dist/c-AQUX6L2O.min.js +0 -1
  118. package/dist/c-BR5QDUCR.min.js +0 -1
  119. package/dist/c-C3YQVUB6.min.js +0 -1
  120. package/dist/c-COP4OISO.min.js +0 -1
  121. package/dist/c-FAOZZE77.min.js +0 -1
  122. package/dist/c-HBLICBM6.min.js +0 -1
  123. package/dist/c-I4BEWAKT.min.js +0 -1
  124. package/dist/c-IDCFMBA4.min.js +0 -2
  125. package/dist/c-KLJDKRD5.min.js +0 -1
  126. package/dist/c-LEICSI5V.min.js +0 -1
  127. package/dist/c-MOK4RWNO.min.js +0 -1
  128. package/dist/c-NHZ2E3CI.min.js +0 -1
  129. package/dist/c-OWRVBUSL.min.js +0 -1
  130. package/dist/c-QIVKWHDL.min.js +0 -1
  131. package/dist/c-QUAEYF34.min.js +0 -1
  132. package/dist/c-RDFFLRKC.min.js +0 -1
  133. package/dist/c-RTU5425Z.min.js +0 -1
  134. package/dist/c-SU6Z75M2.min.js +0 -1
  135. package/dist/c-SWVXFUDL.min.js +0 -1
  136. package/dist/c-TC47SNSI.min.js +0 -1
  137. package/dist/c-VLWWXOM5.min.js +0 -1
  138. package/dist/c-VNFIRKU5.min.js +0 -1
  139. package/dist/c-WFX456JK.min.js +0 -5
  140. package/dist/c-WSWMQDFZ.min.js +0 -1
  141. package/dist/c-YGTMWEEF.min.js +0 -1
  142. package/dist/c-ZDCTFRA6.min.js +0 -1
@@ -0,0 +1 @@
1
+ var e,t,o;import{a as pe}from"./c-GNTXRXRN.min.js";import{c as ye}from"./c-MSZ3ZDAP.min.js";import{e as fe}from"./c-YSMCBJOI.min.js";import{b as ve,c as be,a as xe}from"./c-BR2TOCUN.min.js";import{a as we}from"./c-C3Z7ZRAA.min.js";import{a as Ae}from"./c-5HTUQRJT.min.js";import{d as ke,g as Se,e as Re,h as Pe,l as Ce,c as _e,i as Le,j as Me,b as Ie}from"./c-XF5ILLBG.min.js";import{g as Te,i as He,j as Be}from"./c-ZYMXDR42.min.js";import{b as $e,d as Fe,g as Oe,a as De,f as Ee,h as We,e as Ne,i as je,k as ze,m as Ve,j as Ge}from"./c-5KZ3NO6X.min.js";import{a as qe}from"./c-TFESQSWE.min.js";import{a as Xe}from"./c-DHNROAXY.min.js";import{a as Ye}from"./c-LDGV6TDQ.min.js";import{a as Qe}from"./c-2N7IU2NY.min.js";import{d as Ze,b as Ke,a as Ue}from"./c-YLZIV3VS.min.js";import{f as Je,e as et,d as tt,a as ot,b as it,o as rt,k as at,l as nt,n as lt,s as st,v as ct,t as ht,u as ut,E as dt,y as gt,B as mt,h as pt,i as yt,O as ft,C as vt,q as bt,g as xt,r as wt,S as At,J as kt,Q as St,R as Rt,P as Pt}from"./c-NB2UEX5C.min.js";import{a as Ct,b as _t}from"./c-TX53234M.min.js";import{c as Lt}from"./c-363Q2L4Z.min.js";import{a as Mt,b as It}from"./c-O7SPJAUO.min.js";import{l as Tt,E as Ht,w as Bt,t as $t,q as Ft,K as Ot,Q as Dt,J as Et,U as Wt,A as Nt,ai as jt,ae as zt,ak as Vt,W as Gt,X as qt,Y as Xt,V as Yt,Z as Qt,ab as Zt,ac as Kt,_ as Ut,aa as Jt,aK as eo,aY as to,aC as oo,al as io,am as ro,b as ao,m as no,an as lo,aG as so,ag as co,aj as ho,G as uo,aU as go,ah as mo,au as po,aF as yo,aD as fo,aT as vo,k as bo,aw as xo,ay as wo,o as Ao,ao as ko,aH as So,aA as Ro,bO as Po,bj as Co,bI as _o,bc as Lo,bF as Mo,bB as Io,bJ as To,aZ as Ho,a_ as Bo,bD as $o,aS as Fo,B as Oo,bP as Do,bG as Eo,bb as Wo,ba as No}from"./c-L6OT4OVA.min.js";import{f as jo,d as zo}from"./c-OU7A3IUL.min.js";import{c as Vo}from"./c-SIQVOV6A.min.js";import{s as Go,p as qo,r as Xo,v as Yo,k as Qo,j as Zo,i as Ko,h as Uo,g as Jo,f as ei,e as ti,u as oi}from"./c-WPL6PGP3.min.js";import{c as ii,q as ri,s as ai,p as ni,h as li,i as si,f as ci,k as hi,x as ui,a as di}from"./c-JDI7HKEM.min.js";import{c as gi,b as mi,i as pi}from"./c-ELGOCAEY.min.js";import{x as yi,C as fi,h as vi,w as bi,D as xi}from"./c-HTL37JCD.min.js";import{e as wi,a as Ai,c as ki,b as Si,d as Ri}from"./c-YCBCZFOC.min.js";import{c as Pi,a as Ci}from"./c-GRTKU3C7.min.js";import*as _i from"react";import{useCallback as Li,useImperativeHandle as Mi,useMemo as Ii,useRef as Ti,useId as Hi,memo as Bi,forwardRef as $i,useEffect as Fi,useState as Oi}from"react";import{jsx as Di,jsxs as Ei,Fragment as Wi}from"react/jsx-runtime";import{scaleLinear as Ni,scaleBand as ji}from"d3-scale";import{quantileSorted as zi}from"d3-array";import{quadtree as Vi}from"d3-quadtree";import{arc as Gi}from"d3-shape";function qi(e){if(Array.isArray(e))return e.length>0&&e.every(qi);if(!_i.isValidElement(e))return!1;if(e.type===_i.Fragment){let t=_i.Children.toArray(e.props.children);return t.length>0&&t.every(qi)}return"string"==typeof e.type&&i.has(e.type)}function Xi(e,t,o,i){if(("string"==typeof e||"number"==typeof e)&&(e=Di("text",{fill:"currentColor",...i,children:e})),!qi(e))return null;if(!_i.isValidElement(e)||e.type===_i.Fragment)return Di("g",{className:"semiotic-radial-center-content",transform:`translate(${t},${o})`,pointerEvents:"none",children:e});let r=e,a="text"===r.type?_i.cloneElement(r,{x:r.props.x??0,y:r.props.y??0,textAnchor:r.props.textAnchor??"middle",dominantBaseline:r.props.dominantBaseline??"middle"}):r;return Di("g",{className:"semiotic-radial-center-content",transform:`translate(${t},${o})`,pointerEvents:"none",children:a})}function Yi({content:e,centerX:t,centerY:o,width:i,height:r}){let a=Xi(e,t,o);return a?Di("svg",{width:i,height:r,style:{position:"absolute",left:0,top:0,pointerEvents:"none",overflow:"visible"},children:a}):Di("div",{style:{position:"absolute",left:t,top:o,transform:"translate(-50%, -50%)",pointerEvents:"none",textAlign:"center"},children:e})}function Qi(e,t,o,i,r,a){let n=e.color??"rgba(255,255,255,0.6)",l=e.glowRadius??4,s=!1;for(let c of t){if("connector"===c.type||"violin"===c.type||"boxplot"===c.type)continue;if("wedge"===c.type){let t=c.category;if(!t)continue;let i=0;for(let n of r(t)??[]){let t=o.get(n);null!=t&&(i=Math.max(i,$e(e,t,a)))}s=Fe(c,i,n)||s;continue}if(null==c.datum)continue;let t=i.get(c.datum);if(null==t)continue;let h=o.get(t),u=null==h?0:$e(e,h,a);s=Fe(c,u,n,l)||s}return s}function Zi(e,t,o){let{scales:i,config:r,getConnector:a,getO:n}=e;if(!a||!i)return[];let l=[],{projection:s}=i,c=new Map;for(let e of t){if("point"!==e.type&&"rect"!==e.type)continue;let t=e.datum;if(!t)continue;let o,i,r=a(t);r&&("point"===e.type?(o=e.x,i=e.y):(o=e.x+e.w/2,i=e.y+("vertical"===s?0:e.h/2)),c.has(r)||c.set(r,[]),c.get(r).push({x:o,y:i,datum:t,category:n(t)}))}let h=new Map(i.o.domain().map((e,t)=>[e,t])),u=r.connectorStyle,d={stroke:e.config.themeSemantic?.border||e.config.themeSemantic?.secondary||"#999",strokeWidth:1,opacity:.5},g=e=>"function"==typeof u?u(e):u||d,m=(e,t,o)=>{l.push({type:"connector",x1:e.x,y1:e.y,x2:t.x,y2:t.y,style:g(e.datum),datum:e.datum,group:o})};for(let[e,t]of c)if(!(t.length<2)){t.sort((e,t)=>(h.get(e.category)??-1)-(h.get(t.category)??-1));for(let o=0;o<t.length-1;o++)m(t[o],t[o+1],e);"radial"===s&&t.length>=3&&m(t[t.length-1],t[0],e)}return l}function Ki(e,t,o,i=!1){let r=new Map;for(let i of e){let e=t(i);if(!Number.isFinite(e))continue;let a=o?o(i):"_default",n=r.get(a);n||(n={total:0,value:0,pieces:[]},r.set(a,n)),n.total+=e,n.pieces.push(i)}let a=0;for(let e of r.values())a+=Math.abs(e.total);for(let e of r.values())e.value=i&&a>0?e.total/a:e.total;return r}function Ui(e,t,o,i=!1){let r=new Set;return{steps:e.map(e=>{let a=Ki(e.pieceData,t,o,i),n=0;for(let[e,t]of a)r.add(e),n+=t.total;return{col:e,groups:a,stepTotal:n}}),keys:[...r]}}function Ji(e,t,o){let i="function"==typeof e?e(o?t.w:t.h):e;return"number"==typeof i&&Number.isFinite(i)?Math.max(0,i):0}function er(e){let t=e.getSymbol;return t?gi(t,e.config.symbolMap):null}function tr(e,t,o,i,r,a,n){t?e.push({type:"symbol",x:i,y:r,size:Math.PI*a*a,symbolType:t(o),style:n,datum:o}):e.push({type:"point",x:i,y:r,r:a,style:n,datum:o})}function or(e,t){let{scales:o,columns:i,config:r,resolvePieceStyle:a,getR:n}=e,l=[],s=Math.min(t.width,t.height)/2-4,c="donut"===r.chartType?r.innerRadius||60:0,h=-Math.PI/2+(r.startAngle||0)*Math.PI/180,u=null!=r.sweepAngle?r.sweepAngle*Math.PI/180:2*Math.PI,d=null!=r.sweepAngle&&r.sweepAngle<360,g=Object.values(i),m=g.some(e=>{let t=e.pieceData[0];return t&&("number"==typeof t._pct||"number"==typeof t._pctStart||null!=t._roundedEnds)}),p=g.length,y=d&&!m&&p>1&&(r.cornerRadius??0)>0;for(let e=0;e<g.length;e++){let t=g[e],o=t.pieceData[0],i="number"==typeof o?._pctStart?o._pctStart:t.pctStart,d="number"==typeof o?._pct?o._pct:t.pct,m=h+i*u,p=h+(i+d)*u,f=a(t.pieceData[0],t.name),v=0===e,b=e===g.length-1,x={type:"wedge",cx:0,cy:0,innerRadius:c,outerRadius:s,startAngle:m,endAngle:p,...r.cornerRadius&&{cornerRadius:r.cornerRadius},style:f,datum:o?._nonInteractive?null:t.pieceData,accessibleDatum:{...1===t.pieceData.length?t.pieceData[0]:{},category:t.name,value:t.pieceData.reduce((e,t)=>e+n(t),0),percent:100*d,count:t.pieceData.length,...t.pieceData[0]?.__gaugeAccessibleDatum},category:t.name};o?._roundedEnds?x.roundedEnds=o._roundedEnds:y&&(x.roundedEnds={start:v,end:b}),o?._gradientBand&&(x._gradientBand=o._gradientBand),l.push(x)}return l}function ir(e,t,o){return{...e[0],...o,category:t,data:e}}function rr(e){let t=e.length,o=e[0],i=e[t-1];return{n:t,min:o,q1:zi(e,.25)??o,median:zi(e,.5)??(o+i)/2,q3:zi(e,.75)??i,max:i,mean:e.reduce((e,t)=>e+t,0)/t}}function ar(e,t,o,i,r){let a=new Array(r).fill(0);for(let n of e)n<t||n>o||a[Math.min(Math.floor((n-t)/i),r-1)]++;return a}function nr(e){let{data:t,chartType:o,projection:i,normalize:r,rExtent:a,extentPadding:n=.05,baselinePadding:l,axisExtent:s,getO:c,getR:h,getStack:u,rawRExtent:d}=e,g=n;if("radial"===i&&("pie"===o||"donut"===o))return[0,1];let m=0,p=0;if("bar"===o||"bar-funnel"===o){let e=new Map;for(let o of t){let t=c(o);e.has(t)||e.set(t,[]),e.get(t).push(o)}for(let t of e.values()){let e=Ki(t,h,u,"bar"===o&&r),i=0,a=0;for(let{value:t}of e.values())"bar-funnel"===o?(i=Math.max(i,t),a=Math.min(a,t)):t>=0?i+=t:a+=t;p=Math.max(p,i),m=Math.min(m,a)}}else if("swimlane"===o){let e=new Map;for(let o of t){let t=c(o),i=Math.abs(h(o));e.set(t,(e.get(t)||0)+i)}for(let t of e.values())t>p&&(p=t)}else if("clusterbar"===o)for(let e of t){let t=h(e);Number.isFinite(t)&&(t>p&&(p=t),t<m&&(m=t))}else{let e=d[0],t=d[1];e!==1/0&&(m=e),t!==-1/0&&(p=t)}a&&(null!=a[0]&&(m=a[0]),null!=a[1]&&(p=a[1]));let y="bar"===o||"clusterbar"===o||"bar-funnel"===o||"swimlane"===o;if(y&&(null!=a?.[0]||null!=a?.[1]||(m>0&&(m=0),p<0&&(p=0))),"bar-funnel"!==o&&"exact"!==s){let e=p-m,t=e>0?e*g:1,i=y&&!l&&0===m,r=y&&!l&&0===p||"swimlane"===o;null==a?.[0]&&!i&&(m-=t),null==a?.[1]&&!r&&(p+=t)}return[m,p]}function lr(e){let{data:t,oExtent:o,oScale:i,projection:r,layout:a,dynamicColumnWidth:n,getO:l,getR:s}=e,c=Object.create(null),h=new Map;for(let e of t){let t=l(e);h.has(t)||h.set(t,[]),h.get(t).push(e)}let u=0;if("radial"===r)for(let e of t)u+=Math.abs(s(e));let d=null;if(n&&"radial"!==r){d=new Map;let e=0;for(let t of o){let o,i=h.get(t)||[];o="string"==typeof n?i.reduce((e,t)=>{let o=Number(t[n]);return e+(Number.isFinite(o)?o:0)},0):n(i);let r=Number.isFinite(o)?Math.max(0,o):0;d.set(t,r),e=Math.max(e,r)}let t="horizontal"===r?a.height:a.width,l=i.padding()*i.step()*Math.max(0,o.length-1),s=Math.max(0,t-l);if(e>0){let t=0;for(let o of d.values())t+=o/e;for(let[o,i]of d)d.set(o,i/e/t*s)}}let g=0,m=0;for(let e of o){let t,o,r=h.get(e)||[],a=r.reduce((e,t)=>e+Math.abs(s(t)),0),n=u>0?a/u:0;d?(t=m,o=d.get(e)??i.bandwidth(),m+=o+i.padding()*i.step()):(t=i(e)??0,o=i.bandwidth()),c[e]={name:e,x:t,y:0,width:o,middle:t+o/2,padding:i.padding()*i.step(),pieceData:r,pct:n,pctStart:g},g+=n}return c}function sr(e,t){let o="function"==typeof t,i=o?null:t||"category",r=new Map;for(let a=0;a<e.length;a++){let n=e[a],l=o?t(n):n[i],s=r.get(l);s?s.push(a):r.set(l,[a])}return r}function cr(e){let t="preserve",o=new Set;for(let i of e){let e=Object.prototype.hasOwnProperty.call(g,i)?g[i]:m;"rebuild"===e.retainedData&&(t="rebuild");for(let t of e.invalidations)o.add(t)}return{retainedData:t,invalidations:o}}function hr(e){let t=0,o=0;for(let i of e)"point"===i.type&&!1!==i.interactive&&(t++,i.r>o&&(o=i.r));if(t<=y)return{quadtree:null,maxRadius:o};let i=new Array(t),r=0;for(let t of e)"point"===t.type&&!1!==t.interactive&&(i[r++]=t);return{maxRadius:o,quadtree:Vi().x(e=>e.x).y(e=>e.y).addAll(i)}}function ur(e,{storeRef:t,adapterRef:o,dirtyRef:i,scheduleRender:r,hoverRef:a,setHoverPoint:n}){let l=Li(e=>{o.current?.push(e)},[o]),s=Li(e=>{o.current?.pushMany(e)},[o]),c=Li(()=>{o.current?.clear(),t.current?.clear(),i.current=!0,r()},[o,t,i,r]),h=Li(e=>{o.current?.clearLastData(),o.current?.setReplacementData(e)},[o]);Mi(e,()=>({push:l,pushMany:s,replace:h,remove:e=>{o.current?.flush();let l=t.current?.remove(e)??[];if(l.length>0){let e=a.current?.data;a.current&&(Array.isArray(e)?l.some(t=>e.includes(t)):l.some(t=>t===e))&&(a.current=null,n(null)),i.current=!0,r()}return l},update:(e,a)=>{o.current?.flush();let n=t.current?.update(e,a)??[];return n.length>0&&(i.current=!0,r()),n},clear:c,getData:()=>(o.current?.flush(),t.current?.getData()??[]),getScales:()=>t.current?.scales??null,getCustomLayout:()=>t.current?.lastCustomLayoutResult??null,getLayoutFailure:()=>t.current?.lastCustomLayoutFailure??null}),[l,s,h,c,r,o,t,i,a,n])}function dr(e,t,o,i=30,r,a=0){let n=null,l=null;if(r){let e=rt(r,t,o,i,a);e&&!1!==e.node.interactive&&(n={node:e.node,datum:e.node.datum,x:e.node.x,y:e.node.y,distance:e.distance})}for(let a of e){let e=null;switch(a.type){case"rect":if(null==a.datum)break;e=gr(a,t,o);break;case"point":if(!1===a.interactive||r)break;e=mr(a,t,o,i);break;case"symbol":e=pr(a,t,o,i);break;case"glyph":e=yr(a,t,o,i);break;case"wedge":if(null===a.datum)break;e=fr(a,t,o);break;case"boxplot":e=vr(a,t,o);break;case"violin":e=br(a,t,o);break;case"connector":e=xr(a,t,o,i);break;case"trapezoid":e=Ar(a,t,o)}e&&(e.node=a,"connector"===a.type?(!l||e.distance<l.distance)&&(l=e):(!n||e.distance<n.distance)&&(n=e))}return n??l??wr(e,t,o)}function gr(e,t,o){let i=at(t,o,e);return i.hit?{datum:e.datum,x:i.cx,y:e.y,distance:0,category:e.group}:null}function mr(e,t,o,i=30){let r=t-e.x,a=o-e.y,n=Math.sqrt(r*r+a*a);return n<=nt(e.r,i)?{datum:e.datum,x:e.x,y:e.y,distance:n}:null}function pr(e,t,o,i=30){let r=t-e.x,a=o-e.y,n=Math.sqrt(r*r+a*a);return n<=nt(mi(e.size),i)?{datum:e.datum,x:e.x,y:e.y,distance:n}:null}function yr(e,t,o,i=30){if(null==e.datum)return null;let r=pi(e.glyph,e.size),a=e.x+r.centerDx,n=e.y+r.centerDy,l=t-a,s=o-n,c=Math.sqrt(l*l+s*s);return c<=nt(r.radius,i)?{datum:e.datum,x:a,y:n,distance:c}:null}function fr(e,t,o){let i=t-e.cx,r=o-e.cy,a=Math.sqrt(i*i+r*r);if(a<e.innerRadius||a>e.outerRadius)return null;let n=lt(Math.atan2(r,i)),l=lt(e.startAngle),s=lt(e.endAngle);if(!(l<=s?n>=l&&n<=s:n>=l||n<=s))return null;let c=(e.startAngle+e.endAngle)/2,h=(e.innerRadius+e.outerRadius)/2;return{datum:e.datum,x:e.cx+Math.cos(c)*h,y:e.cy+Math.sin(c)*h,distance:0,category:e.category}}function vr(e,t,o){let i=e.columnWidth/2;if("vertical"===e.projection){let r=e.x-i,a=e.x+i,n=Math.min(e.minPos,e.maxPos),l=Math.max(e.minPos,e.maxPos);if(t>=r&&t<=a&&o>=n&&o<=l)return{datum:e.datum,x:e.x,y:e.medianPos,distance:0,category:e.category,stats:e.stats}}else{let r=e.y-i,a=e.y+i,n=Math.min(e.minPos,e.maxPos),l=Math.max(e.minPos,e.maxPos);if(t>=n&&t<=l&&o>=r&&o<=a)return{datum:e.datum,x:e.medianPos,y:e.y,distance:0,category:e.category,stats:e.stats}}return null}function br(e,t,o){if(!e.bounds)return null;let{x:i,y:r,width:a,height:n}=e.bounds;return t>=i&&t<=i+a&&o>=r&&o<=r+n?{datum:e.datum,x:i+a/2,y:r+n/2,distance:0,category:e.category,stats:e.stats}:null}function xr(e,t,o,i){let r=e.style.strokeWidth??1;if(r<=0||"none"===e.style.stroke)return null;let a=Sr(t,o,e.x1,e.y1,e.x2,e.y2);return!a||a.distance>Math.max(i,r/2)?null:{datum:e.datum,x:a.x,y:a.y,distance:a.distance,category:e.group}}function wr(e,t,o){let i=new Map;for(let t of e){if("connector"!==t.type)continue;let e=t.group||"_default",o=i.get(e);o?o.push(t):i.set(e,[t])}for(let e of i.values()){let i=e[0];if(e.length<2||!i.style.fill||"none"===i.style.fill)continue;let r=[[i.x1,i.y1],...e.map(e=>[e.x2,e.y2])];if(!Pr(r,t,o))continue;let a=kr(r);return{node:i,datum:i.datum,x:a.x,y:a.y,distance:0,category:i.group}}return null}function Ar(e,t,o){if(e.points.length<3)return null;let i=Rr(e.points,t,o),r=Pr(e.points,t,o),a=e.style.strokeWidth??1,n=!!(e.style.stroke&&"none"!==e.style.stroke&&a>0);if(!r&&(!n||i>a/2))return null;let l=kr(e.points);return{datum:e.datum,x:l.x,y:l.y,distance:r?0:i,category:e.category}}function kr(e){let t=e.reduce((e,t)=>({x:e.x+t[0],y:e.y+t[1]}),{x:0,y:0});return{x:t.x/e.length,y:t.y/e.length}}function Sr(e,t,o,i,r,a){let n=r-o,l=a-i,s=n*n+l*l;if(0===s)return null;let c=((e-o)*n+(t-i)*l)/s,h=Math.max(0,Math.min(1,c)),u=o+h*n,d=i+h*l;return{x:u,y:d,distance:Math.hypot(e-u,t-d)}}function Rr(e,t,o){let i=1/0;for(let r=0;r<e.length;r++){let a=e[r],n=e[(r+1)%e.length],l=Sr(t,o,a[0],a[1],n[0],n[1]);l&&l.distance<i&&(i=l.distance)}return i}function Pr(e,t,o){if(Rr(e,t,o)<=16*Number.EPSILON)return!0;let i=!1;for(let r=0,a=e.length-1;r<e.length;a=r++){let[n,l]=e[r],[s,c]=e[a];l>o!=c>o&&t<(s-n)*(o-l)/(c-l)+n&&(i=!i)}return i}function Cr(e){let t=e.pointer.clientX-e.canvasRect.left-e.margin.left,o=e.pointer.clientY-e.canvasRect.top-e.margin.top;if(t<0||t>e.width||o<0||o>e.height)return{kind:"outside"};if(0===e.scene.length)return{kind:"miss"};let i="radial"===e.projection,r=dr(e.scene,i?t-e.width/2:t,i?o-e.height/2:o,e.hoverRadius,e.pointQuadtree,e.maxPointRadius);return r?{kind:"hit",hit:r}:{kind:"miss"}}function _r(e,t){return Vo(e.datum||{},e.x,e.y,{...e.stats&&{stats:e.stats},...e.category&&{category:e.category},__oAccessor:"string"==typeof t.oAccessor?t.oAccessor:void 0,__rAccessor:"string"==typeof t.rAccessor?t.rAccessor:void 0,__chartType:t.chartType})}function Lr(e){let{width:t,height:o,totalWidth:i,totalHeight:r,margin:a,scales:n,showAxes:l,showGrid:s}=e,{rTickValues:c,axisExtent:h}=e,u="radial"===n?.projection,d="horizontal"===n?.projection,g=Ii(()=>n&&!u&&s?(c||Pe(n.r,5,h)).map(e=>({value:e,pixel:n.r(e)})):[],[n,u,c,h,s]),m=s&&n&&!u,p=l&&n&&!u;return m||p?Di("svg",{role:"presentation",width:i,height:r,overflow:"visible",style:{position:"absolute",top:0,left:0,pointerEvents:"none",overflow:"visible"},children:Ei("g",{transform:`translate(${a.left},${a.top})`,children:[m&&Di("g",{className:"ordinal-grid",children:g.map((e,i)=>Di("line",{x1:d?e.pixel:0,y1:d?0:e.pixel,x2:d?e.pixel:t,y2:d?o:e.pixel,stroke:"var(--semiotic-grid, #e0e0e0)",strokeWidth:1},`grid-${i}`))}),p&&Di(Wi,{children:Ei(Wi,d?{children:[Di("line",{x1:0,y1:0,x2:0,y2:o,stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),Di("line",{x1:0,y1:o,x2:t,y2:o,stroke:"var(--semiotic-border, #ccc)",strokeWidth:1})]}:{children:[Di("line",{x1:0,y1:o,x2:t,y2:o,stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),Di("line",{x1:0,y1:0,x2:0,y2:o,stroke:"var(--semiotic-border, #ccc)",strokeWidth:1})]})})]})}):null}function Mr(e){let{width:t,height:o,totalWidth:i,totalHeight:r,margin:a,scales:n,columns:l,showAxes:s,showCategoryTicks:c,oLabel:h,rLabel:u,oFormat:d,rFormat:g,showGrid:m,title:p,description:y,idPrefix:f,decorative:v=!1,legend:b,legendHoverBehavior:x,legendClickBehavior:w,legendHighlightedCategory:A,legendIsolatedCategories:k,legendPosition:S="right",legendLayout:R,foregroundGraphics:P,annotations:C,onAnnotationActivate:_,onObservation:L,chartId:M,chartType:I,autoPlaceAnnotations:T,svgAnnotationRules:H,annotationFrame:B,xAccessor:$,yAccessor:F,annotationData:O,underlayRendered:D,canvasObscuresUnderlay:E=!0,children:W}=e,N=Ht({onAnnotationActivate:_,onObservation:L,chartId:M,chartType:I}),j="radial"===n?.projection,z="horizontal"===n?.projection,V=!1!==c,G=!D||E,q=Bt({showAxes:s,projection:j?"radial":z?"horizontal":"vertical",hasCategoryLabel:!!h,hasValueLabel:!!u}),X=$t(R,q.leftAxis),Y=b&&"left"===S&&X>0?X:a.left,Q=Ii(()=>{if(!s||!V||!n||j)return[];let e=n.o.bandwidth(),t=n.o.domain().map((t,o)=>({value:t,pixel:l?.[t]?.middle??(n.o(t)??0)+e/2,label:d?d(t,o):t}));if(t.length<=2)return t;let o=z?0:6,i=-1/0,r=0;return t.filter(e=>{let t=(a=e.label,z?"string"==typeof a||"number"==typeof a?16:24:"string"==typeof a||"number"==typeof a?6.5*String(a).length:60);var a;return!(e.pixel-i<(r+t)/2+o||(i=e.pixel,r=t,0))})},[s,V,n,l,d,j,z]),Z=e.rTickValues,K=e.tickLabelEdgeAlign,U=e.axisExtent,J=Ii(()=>{if(!s&&!m||!n||j)return[];let e=Z||Pe(n.r,5,U),t=g||Ft(e);return e.map(e=>({value:e,pixel:n.r(e),label:t(e)}))},[s,m,n,g,j,Z,U]),ee=Ti(new Map),te=Ti(C?.length??0),oe=C?.length??0;te.current!==oe&&(te.current=oe,ee.current=new Map);let ie=Ii(()=>{if(!C||0===C.length)return null;let e=st(C),i=Ot("ordinal",N),r="horizontal"===n?.projection,a=n?.o?e=>(n.o(e)??0)+n.o.bandwidth()/2:null,l={scales:n?{x:r?n.r:a||n.r,y:r&&a||n.r,time:n.r,value:n.r,o:n.o}:null,timeAxis:"x",xAccessor:$,yAccessor:F,width:t,height:o,data:O,frameType:"ordinal",projection:r?"horizontal":"vertical",stickyPositionCache:ee.current},s=T?Dt({annotations:e,context:l,..."object"==typeof T?T:{}}):e;return Et(s,i,H,l)},[C,T,H,t,o,n,$,F,O,N]),re=s||p||y||b||P||ie&&ie.length>0||m||W,ae=Hi(),{titleId:ne,descId:le,labelledBy:se}=ct(f||M||ae);return re?Ei("svg",{role:v?"presentation":"img","data-semiotic-overlay":"","aria-labelledby":v?void 0:se,width:i,height:r,overflow:"visible",style:{position:"absolute",top:0,left:0,pointerEvents:"none",overflow:"visible"},children:[!v&&Ei(Wi,{children:[Di("title",{id:ne,children:ht(p,"Ordinal Chart")}),Di("desc",{id:le,children:ut(p,y,{familyPhrase:"ordinal data visualization",fallback:"Ordinal data visualization"})})]}),Ei("g",{transform:`translate(${a.left},${a.top})`,children:[m&&n&&!j&&G&&Di("g",{className:"ordinal-grid",children:J.map((e,i)=>Di("line",{x1:z?e.pixel:0,y1:z?0:e.pixel,x2:z?e.pixel:t,y2:z?o:e.pixel,stroke:"var(--semiotic-grid, #e0e0e0)",strokeWidth:1},`grid-${i}`))}),s&&n&&!j&&(()=>{let e={fontSize:"var(--semiotic-tick-font-size, 12px)"},i={fontSize:"var(--semiotic-axis-label-font-size, 12px)"};return Di("g",{className:"ordinal-axes",children:Ei(Wi,z?{children:[Ei("g",{className:"semiotic-axis semiotic-axis-left","data-orient":"left",children:[G&&Di("line",{x1:0,y1:0,x2:0,y2:o,stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),Q.map((t,o)=>Ei("g",{transform:`translate(0,${t.pixel})`,children:[Di("line",{x2:-5,stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),"string"==typeof t.label||"number"==typeof t.label?Di("text",{x:-8,textAnchor:"end",dominantBaseline:"middle",fill:"var(--semiotic-text-secondary, #666)",fontSize:12,className:"semiotic-axis-tick",style:{userSelect:"none",...e},children:t.label}):Di("foreignObject",{x:-68,y:-12,width:60,height:24,style:{overflow:"visible"},children:Di("div",{style:{textAlign:"right",userSelect:"none",...e},children:t.label})})]},`cat-${o}`)),h&&Di("text",{x:15-Y,y:o/2,textAnchor:"middle",fill:"var(--semiotic-text, #333)",transform:`rotate(-90, ${15-Y}, ${o/2})`,fontSize:12,className:"semiotic-axis-label",style:{userSelect:"none",...i},children:h})]}),Ei("g",{className:"semiotic-axis semiotic-axis-bottom","data-orient":"bottom",children:[G&&Di("line",{x1:0,y1:o,x2:t,y2:o,stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),G&&n?.r&&(()=>{let e=n.r(0);return e>1&&e<t-1?Di("line",{x1:e,y1:0,x2:e,y2:o,stroke:"var(--semiotic-border, #ccc)",strokeWidth:1,strokeDasharray:"4,4"}):null})(),J.map((t,i)=>{let r=K?0===i?"start":i===J.length-1?"end":"middle":"middle";return Ei("g",{transform:`translate(${t.pixel},${o})`,children:[Di("line",{y2:5,stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),Di("text",{y:18,textAnchor:r,fill:"var(--semiotic-text-secondary, #666)",fontSize:12,className:"semiotic-axis-tick",style:{userSelect:"none",...e},children:t.label})]},`val-${i}`)}),u&&Di("text",{x:t/2,y:o+40,textAnchor:"middle",fill:"var(--semiotic-text, #333)",fontSize:12,className:"semiotic-axis-label",style:{userSelect:"none",...i},children:u})]})]}:{children:[Ei("g",{className:"semiotic-axis semiotic-axis-bottom","data-orient":"bottom",children:[G&&(()=>{let e=n?.r?n.r(0):o,i=e>=0&&e<=o?e:o;return Di("line",{x1:0,y1:i,x2:t,y2:i,stroke:"var(--semiotic-border, #ccc)",strokeWidth:1})})(),Q.map((t,i)=>Ei("g",{transform:`translate(${t.pixel},${o})`,children:[Di("line",{y2:5,stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),"string"==typeof t.label||"number"==typeof t.label?Di("text",{y:18,textAnchor:"middle",fill:"var(--semiotic-text-secondary, #666)",fontSize:12,className:"semiotic-axis-tick",style:{userSelect:"none",...e},children:t.label}):Di("foreignObject",{x:-30,y:6,width:60,height:24,style:{overflow:"visible"},children:Di("div",{style:{textAlign:"center",userSelect:"none",...e},children:t.label})})]},`cat-${i}`)),h&&Di("text",{x:t/2,y:o+40,textAnchor:"middle",fill:"var(--semiotic-text, #333)",fontSize:12,className:"semiotic-axis-label",style:{userSelect:"none",...i},children:h})]}),Ei("g",{className:"semiotic-axis semiotic-axis-left","data-orient":"left",children:[G&&Di("line",{x1:0,y1:0,x2:0,y2:o,stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),J.map((t,o)=>Ei("g",{transform:`translate(0,${t.pixel})`,children:[Di("line",{x2:-5,stroke:"var(--semiotic-border, #ccc)",strokeWidth:1}),Di("text",{x:-8,textAnchor:"end",dominantBaseline:"middle",fill:"var(--semiotic-text-secondary, #666)",fontSize:12,className:"semiotic-axis-tick",style:{userSelect:"none",...e},children:t.label})]},`val-${o}`)),u&&Di("text",{x:15-Y,y:o/2,textAnchor:"middle",fill:"var(--semiotic-text, #333)",transform:`rotate(-90, ${15-Y}, ${o/2})`,fontSize:12,className:"semiotic-axis-label",style:{userSelect:"none",...i},children:u})]})]})})})(),ie,P,W]}),Di(Wt,{title:p,totalWidth:i,marginTop:a.top}),Nt({legend:b,totalWidth:i,totalHeight:r,margin:a,legendPosition:S,title:p,legendLayout:R,axisChrome:q,legendHoverBehavior:x,legendClickBehavior:w,legendHighlightedCategory:A,legendIsolatedCategories:k})]}):null}function Ir(e){let[t,o]=_i.useState(()=>v);return _i.useEffect(()=>{if(t)return;let e=!1;return(v?Promise.resolve(v):(b||(b=import("./c-TBVLI5DM.min.js").then(e=>v=e.OrdinalBrushOverlay).catch(e=>{throw b=null,e})),b)).then(t=>{e||o(()=>t)}),()=>{e=!0}},[t]),t?Di(t,{...e}):null}function Tr(e){let{innerRadius:t,outerRadius:o,startAngle:i,endAngle:r}=e,a=t<=0;if(!((e.cornerRadius??0)>0&&(e.roundStart||e.roundEnd))){if(a){let e=x(o,i),t=x(o,r),a=r-i>Math.PI?1:0;return`M0,0 L${e.x},${e.y} A${o},${o} 0 ${a} 1 ${t.x},${t.y} Z`}let e=x(o,i),n=x(o,r),l=x(t,r),s=x(t,i),c=r-i>Math.PI?1:0;return`M${e.x},${e.y} A${o},${o} 0 ${c} 1 ${n.x},${n.y} L${l.x},${l.y} A${t},${t} 0 ${c} 0 ${s.x},${s.y} Z`}let n=o-t,l=Math.max(0,Math.min(e.cornerRadius??0,n/2));if(0===l)return Tr({...e,cornerRadius:0,roundStart:!1,roundEnd:!1});let s=Math.asin(Math.min(1,l/Math.max(1e-9,o-l))),c=a?0:Math.asin(Math.min(1,l/Math.max(1e-9,t+l))),h=r-i,u=e.roundStart&&e.roundEnd?h/2:h,d=!!e.roundStart&&s<u,g=!!e.roundEnd&&s<u;if(!d&&!g)return Tr({...e,cornerRadius:0,roundStart:!1,roundEnd:!1});let m=i+(d?s:0),p=r-(g?s:0),y=i+(d?c:0),f=r-(g?c:0),v=x(o,m),b=x(o,p),w=(o-l)*Math.cos(s),A=x(w,i),k=x(w,r),S=a?null:x(t,f),R=a?null:x(t,y),P=a?0:(t+l)*Math.cos(c),C=a?null:x(P,i),_=a?null:x(P,r),L=p-m>Math.PI?1:0,M=a?0:f-y>Math.PI?1:0,I="";if(d)I+=`M${A.x},${A.y}`,I+=` A${l},${l} 0 0 1 ${v.x},${v.y}`;else{let e=x(o,i);I+=`M${e.x},${e.y}`}if(g)I+=` A${o},${o} 0 ${L} 1 ${b.x},${b.y}`,I+=` A${l},${l} 0 0 1 ${k.x},${k.y}`;else{let e=x(o,r);I+=` A${o},${o} 0 ${L} 1 ${e.x},${e.y}`}if(a)I+=" L0,0";else{if(g)I+=` L${_.x},${_.y}`,I+=` A${l},${l} 0 0 1 ${S.x},${S.y}`;else{let e=x(t,r);I+=` L${e.x},${e.y}`}if(d)I+=` A${t},${t} 0 ${M} 0 ${R.x},${R.y}`,I+=` A${l},${l} 0 0 1 ${C.x},${C.y}`;else{let e=x(t,i);I+=` A${t},${t} 0 ${M} 0 ${e.x},${e.y}`}}return I+=" Z",I}function Hr(e){let t=Tr({innerRadius:e.innerRadius,outerRadius:e.outerRadius,startAngle:e.startAngle,endAngle:e.endAngle,cornerRadius:e.cornerRadius,roundStart:e.roundStart,roundEnd:e.roundEnd}),o=[],i=e.colors;if(i.length>0){let t=(e.endAngle-e.startAngle)/i.length;for(let r=0;r<i.length;r++){let a=e.startAngle+r*t;o.push({d:Tr({innerRadius:e.innerRadius,outerRadius:e.outerRadius,startAngle:a,endAngle:e.endAngle}),color:i[r]})}}return{clipPath:t,slices:o}}function Br(e,t,o){let i=t._gradientBand.colors;if(0===i.length)return;let{clipPath:r,slices:a}=Hr({innerRadius:t.innerRadius,outerRadius:t.outerRadius,startAngle:t.startAngle,endAngle:t.endAngle,cornerRadius:t.cornerRadius,roundStart:t.roundedEnds?.start??!0,roundEnd:t.roundedEnds?.end??!0,colors:i}),n=new Path2D(r);e.save(),e.translate(t.cx,t.cy),e.clip(n);for(let t of a)e.fillStyle=ii(e,t.color)||t.color||"#007bff",e.fill(new Path2D(t.d));e.restore();let l=t.style.strokeWidth??1;t.style.stroke&&"none"!==t.style.stroke&&l>0&&(e.save(),e.translate(t.cx,t.cy),e.strokeStyle=ii(e,t.style.stroke)||t.style.stroke,e.lineWidth=l,e.globalAlpha=o,e.stroke(n),e.restore())}function $r(e,t){e.beginPath(),t.innerRadius>0?(e.arc(t.cx,t.cy,t.outerRadius,t.startAngle,t.endAngle),e.arc(t.cx,t.cy,t.innerRadius,t.endAngle,t.startAngle,!0)):(e.moveTo(t.cx,t.cy),e.arc(t.cx,t.cy,t.outerRadius,t.startAngle,t.endAngle)),e.closePath()}function Fr(e,t,o){let i={innerRadius:t.innerRadius,outerRadius:t.outerRadius,startAngle:t.startAngle+Math.PI/2,endAngle:t.endAngle+Math.PI/2},r=Gi().cornerRadius(t.cornerRadius)(i);if(!r)return;e.save(),e.translate(t.cx,t.cy);let a=new Path2D(r);e.fill(a);let n=t.style.strokeWidth??1;t.style.stroke&&"none"!==t.style.stroke&&n>0&&(e.lineWidth=n,e.globalAlpha=o,e.stroke(a)),e.restore()}function Or(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e4?`${(e/1e3).toFixed(0)}K`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}function Dr(e){return Math.abs(e-Math.round(e))<.05?`${Math.round(e)}%`:`${e.toFixed(1)}%`}function Er(e,t){let o=`${e}@${typeof window<"u"&&window.devicePixelRatio||1}`,i=L.get(o);if(void 0!==i)return i;let r=li({..._,background:e},t),a=si(r)?null:r;return L.set(o,a),a}function Wr(e,t,o,i,r,a){e.moveTo(t+a,o),e.lineTo(t+i-a,o),e.quadraticCurveTo(t+i,o,t+i,o+a),e.lineTo(t+i,o+r-a),e.quadraticCurveTo(t+i,o+r,t+i-a,o+r),e.lineTo(t+a,o+r),e.quadraticCurveTo(t,o+r,t,o+r-a),e.lineTo(t,o+a),e.quadraticCurveTo(t,o,t+a,o),e.closePath()}function Nr(e,t){let[o,i,r]=ci(e,t);return(.2126*o+.7152*i+.0722*r)/255>.6}function jr(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e4?`${(e/1e3).toFixed(0)}K`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(Math.round(e))}function zr(e){return Math.abs(e-Math.round(e))<.05?`${Math.round(e)}%`:`${e.toFixed(1)}%`}function Vr(e){return"rect"===e.type||"point"===e.type||"symbol"===e.type||"glyph"===e.type}function Gr(e){return(t,o,i,r)=>{e(t,o.filter(Vr),{x:i.r,y:i.r},r)}}function qr(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e4?`${(e/1e3).toFixed(0)}K`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e)}function Xr(e,t){let o=e.datum;if(!o)return null;let i=[],r=o.__funnelStepLabel,a=Number(o.__funnelStepLabelX),n=Number(o.__funnelStepLabelY),l=Number(o.__funnelRowWidth);"string"==typeof r&&Number.isFinite(a)&&Number.isFinite(n)&&(!Number.isFinite(l)||8.4*r.length+16<=l)&&i.push(Di("text",{x:a,y:n+3,textAnchor:"middle",dominantBaseline:"hanging",fontSize:14,fontWeight:"bold",fill:"#fff",fontFamily:"var(--semiotic-font-family, sans-serif)",stroke:"rgba(0,0,0,0.6)",strokeWidth:3,paintOrder:"stroke",children:r},`${t}-funnel-step`));let s=Number(o.__funnelValue),c=Number(o.__funnelValueLabelX),h=Number(o.__funnelValueLabelY),u=Number(o.__funnelBarW);if(Number.isFinite(s)&&0!==s&&Number.isFinite(c)&&Number.isFinite(h)&&u>=60){let e=Number(o.__funnelPercent),r=!0!==o.__funnelIsFirstStep&&Number.isFinite(e)?`${qr(s)} (${Math.abs(e-Math.round(e))<.05?Math.round(e):e.toFixed(1)}%)`:qr(s);7.8*r.length+16>u&&(r=qr(s)),7.8*r.length+16<=u&&i.push(Di("text",{x:c,y:h+22,textAnchor:"middle",dominantBaseline:"hanging",fontSize:13,fontWeight:"bold",fill:"#fff",fontFamily:"var(--semiotic-font-family, sans-serif)",stroke:"rgba(0,0,0,0.5)",strokeWidth:3,paintOrder:"stroke",children:r},`${t}-funnel-value`))}return i.length?Di("g",{children:i},`${t}-funnel-labels`):null}function Yr(e,t,o){return Vt(Qr(e,t,o),e,`ordinal-cursor-${t}`)}function Qr(e,t,o){let i=("category"in e?e.category:void 0)||("group"in e?e.group:void 0)||"",r=o=>`ord-${e.type}-${i}-${t}-${o}`,a=`ord-${e.type}-${i}-${t}`;switch(e.type){case"rect":{let t,o,i=e,r=`${Xt(a)}-grad`,n=Ut(i,r);if(n)o=`url(#${r})`;else if(si(i.style.fill)){let e=`${Xt(a)}-hatch`;t=hi(i.style.fill,e),o=`url(#${e})`}else o=qt(i.style.fill);let l=n||t?Ei("defs",{children:[n,t]}):null;if(i.cornerRadii&&ui(i.cornerRadii)){let e=Jt(i);return Ei(_i.Fragment,{children:[l,Di("path",{d:e,fill:o,...Gt(i.style)})]},a)}if(i.roundedTop&&i.roundedTop>0){let e,t=Math.min(i.roundedTop,i.w/2,i.h/2),{x:r,y:n,w:s,h:c}=i;switch(i.roundedEdge){case"right":e=`M${r},${n} L${r+s-t},${n} A${t},${t} 0 0 1 ${r+s},${n+t} L${r+s},${n+c-t} A${t},${t} 0 0 1 ${r+s-t},${n+c} L${r},${n+c} Z`;break;case"left":e=`M${r+s},${n} L${r+t},${n} A${t},${t} 0 0 0 ${r},${n+t} L${r},${n+c-t} A${t},${t} 0 0 0 ${r+t},${n+c} L${r+s},${n+c} Z`;break;case"bottom":e=`M${r},${n} L${r+s},${n} L${r+s},${n+c-t} A${t},${t} 0 0 1 ${r+s-t},${n+c} L${r+t},${n+c} A${t},${t} 0 0 1 ${r},${n+c-t} Z`;break;default:e=`M${r},${n+c} L${r},${n+t} A${t},${t} 0 0 1 ${r+t},${n} L${r+s-t},${n} A${t},${t} 0 0 1 ${r+s},${n+t} L${r+s},${n+c} Z`}return Ei(_i.Fragment,{children:[l,Di("path",{d:e,fill:o,...Gt(i.style)})]},a)}return Ei(_i.Fragment,{children:[l,Di("rect",{x:i.x,y:i.y,width:i.w,height:i.h,fill:o,...Gt(i.style)}),Xr(i,a)]},a)}case"point":return Kt(e,t,o);case"symbol":return Zt(e,t,o);case"glyph":{let i=e;return Qt(i,i.x,i.y,`${o??""}ord-glyph-${i.pointId??t}`)}case"wedge":{let i,r=e;if(r._gradientBand&&r._gradientBand.colors.length>0){let e=Xt(`${o?`${o}-`:""}gauge-grad-${r.category||a}-${t}`),{clipPath:i,slices:n}=Hr({innerRadius:r.innerRadius,outerRadius:r.outerRadius,startAngle:r.startAngle,endAngle:r.endAngle,cornerRadius:r.cornerRadius,roundStart:r.roundedEnds?.start??!0,roundEnd:r.roundedEnds?.end??!0,colors:r._gradientBand.colors});return Ei("g",{transform:`translate(${r.cx},${r.cy})`,opacity:r.style.opacity,fillOpacity:r.style.fillOpacity,strokeOpacity:r.style.strokeOpacity,children:[Di("defs",{children:Di("clipPath",{id:e,children:Di("path",{d:i})})}),Di("g",{clipPath:`url(#${e})`,children:n.map((e,t)=>Di("path",{d:e.d,fill:qt(e.color)},t))}),r.style.stroke&&"none"!==r.style.stroke&&Di("path",{d:i,fill:"none",stroke:r.style.stroke,strokeWidth:r.style.strokeWidth})]},a)}if(r.roundedEnds)i=Tr({innerRadius:r.innerRadius,outerRadius:r.outerRadius,startAngle:r.startAngle,endAngle:r.endAngle,cornerRadius:r.cornerRadius,roundStart:r.roundedEnds.start,roundEnd:r.roundedEnds.end});else{let e=Gi().innerRadius(r.innerRadius).outerRadius(r.outerRadius).startAngle(r.startAngle+Math.PI/2).endAngle(r.endAngle+Math.PI/2);r.cornerRadius&&e.cornerRadius(r.cornerRadius),i=e(Yt)||""}return Di("path",{d:i,transform:`translate(${r.cx},${r.cy})`,fill:qt(r.style.fill),...Gt(r.style)},a)}case"boxplot":{let t=e,o=t.columnWidth/2,i=t.style.strokeWidth??1;return"vertical"===t.projection?Ei("g",{opacity:t.style.opacity,strokeOpacity:t.style.strokeOpacity,children:[Di("line",{x1:t.x,y1:t.minPos,x2:t.x,y2:t.maxPos,stroke:t.style.stroke||"#333",strokeWidth:i}),Di("rect",{x:t.x-o,y:Math.min(t.q1Pos,t.q3Pos),width:t.columnWidth,height:Math.abs(t.q3Pos-t.q1Pos),fill:qt(t.style.fill),fillOpacity:t.style.fillOpacity??.6,stroke:t.style.stroke||"#333",strokeWidth:i}),Di("line",{x1:t.x-o,y1:t.medianPos,x2:t.x+o,y2:t.medianPos,stroke:t.style.stroke||"#333",strokeWidth:2*i}),Di("line",{x1:t.x-.5*o,y1:t.minPos,x2:t.x+.5*o,y2:t.minPos,stroke:t.style.stroke||"#333",strokeWidth:i}),Di("line",{x1:t.x-.5*o,y1:t.maxPos,x2:t.x+.5*o,y2:t.maxPos,stroke:t.style.stroke||"#333",strokeWidth:i})]},a):Ei("g",{opacity:t.style.opacity,strokeOpacity:t.style.strokeOpacity,children:[Di("line",{x1:t.minPos,y1:t.y,x2:t.maxPos,y2:t.y,stroke:t.style.stroke||"#333",strokeWidth:i}),Di("rect",{x:Math.min(t.q1Pos,t.q3Pos),y:t.y-o,width:Math.abs(t.q3Pos-t.q1Pos),height:t.columnWidth,fill:qt(t.style.fill),fillOpacity:t.style.fillOpacity??.6,stroke:t.style.stroke||"#333",strokeWidth:i}),Di("line",{x1:t.medianPos,y1:t.y-o,x2:t.medianPos,y2:t.y+o,stroke:t.style.stroke||"#333",strokeWidth:2*i}),Di("line",{x1:t.minPos,y1:t.y-.5*o,x2:t.minPos,y2:t.y+.5*o,stroke:t.style.stroke||"#333",strokeWidth:i}),Di("line",{x1:t.maxPos,y1:t.y-.5*o,x2:t.maxPos,y2:t.y+.5*o,stroke:t.style.stroke||"#333",strokeWidth:i})]},a)}case"violin":{let t=e,o=[Di("path",{d:t.pathString,transform:t.translateX||t.translateY?`translate(${t.translateX},${t.translateY})`:void 0,fill:qt(t.style.fill),fillOpacity:t.style.fillOpacity??.6,stroke:t.style.stroke||"#333",strokeWidth:t.style.strokeWidth??1},r("path"))];if(t.iqrLine&&t.bounds){let e=t.bounds,i=e.x+e.width/2,a=e.y+e.height/2;t.iqrLine.isVertical?o.push(Di("line",{opacity:.8,x1:i,y1:t.iqrLine.q1Pos,x2:i,y2:t.iqrLine.q3Pos,stroke:t.style.stroke||"#333",strokeWidth:2},r("iqr")),Di("circle",{opacity:.8,cx:i,cy:t.iqrLine.medianPos,r:3,fill:"white",stroke:t.style.stroke||"#333",strokeWidth:1},r("med"))):o.push(Di("line",{opacity:.8,x1:t.iqrLine.q1Pos,y1:a,x2:t.iqrLine.q3Pos,y2:a,stroke:t.style.stroke||"#333",strokeWidth:2},r("iqr")),Di("circle",{opacity:.8,cx:t.iqrLine.medianPos,cy:a,r:3,fill:"white",stroke:t.style.stroke||"#333",strokeWidth:1},r("med")))}return Di("g",{opacity:t.style.opacity,strokeOpacity:t.style.strokeOpacity,children:o},a)}case"connector":{let t=e,o=t.style.fill&&"none"!==t.style.fill?qt(t.style.fill,"var(--semiotic-border, #999)"):"var(--semiotic-border, #999)";return Di("line",{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,stroke:t.style.stroke||o,strokeWidth:t.style.strokeWidth??1,opacity:t.style.opacity??.5,strokeOpacity:t.style.strokeOpacity},a)}case"trapezoid":{let t=e,o=t.points.map(e=>`${e[0]},${e[1]}`).join(" ");return Di("polygon",{points:o,fill:qt(t.style.fill,"#999"),...Gt(t.style)},a)}default:return null}}function Zr(e){return"connector"===e.node.type}function Kr(e,t,o,i){if(e.length<2)return null;let r=e[0].node,a=r.style.fill;if(!a||"none"===a)return null;let n=Xt(`${t?`${t}-`:""}connector-${o}-${i}-hatch`),l=si(a)?hi(a,n):null,s=[`${r.x1},${r.y1}`,...e.map(({node:e})=>`${e.x2},${e.y2}`)].join(" "),c=Ei(_i.Fragment,{children:[l&&Di("defs",{children:l}),Di("polygon",{points:s,fill:l?`url(#${n})`:qt(a,"#999"),opacity:r.style.opacity,fillOpacity:r.style.fillOpacity??.3,"data-semiotic-connector-fill":r.group||"_default"})]});return Vt(c,r,`ordinal-connector-fill-${o}-${i}`)}function Ur(e,t,o){let i=new Map;for(let t of e){if(!Zr(t))continue;let e=t.node.group||"_default",o=i.get(e);o?o.push(t):i.set(e,[t])}if(0===i.size)return;let r=Array.from(i.values()).map((e,i)=>Ei("g",{children:[Kr(e,t,o,i),e.map(e=>e.element)]},`ordinal-connectors-${o}-${i}`)),a=e[0],n=Zr(a)?null:a.element;for(let e of i.values())for(let t of e)t.element=null;a.element=Ei(_i.Fragment,{children:[r,n]},`ordinal-connector-run-${o}`)}function Jr(e){let t=dt({nodes:e.nodes,renderMode:e.renderMode,fallback:(t,o)=>Yr(t,o,e.idPrefix)}),o=0;for(let i=0;i<t.length;){if(t[i].renderedByBackend){i++;continue}let r=i+1;for(;r<t.length&&!t[r].renderedByBackend;)r++;Ur(t.slice(i,r),e.idPrefix,o++),i=r}return t}function ea(e){return t=>{let o=t.category||t.data&&t.data[0]?.category||"",i=t.stats||(t.data||t).stats;if(i&&null!=i.median)return Ei("div",{className:"semiotic-tooltip",style:yi,children:[o&&Di("div",{style:{fontWeight:"bold"},children:String(o)}),null!=i.n&&Ei("div",{children:["n = ",i.n]}),null!=i.min&&Ei("div",{children:["Min: ",i.min.toLocaleString()]}),null!=i.q1&&Ei("div",{children:["Q1: ",i.q1.toLocaleString()]}),Ei("div",{children:["Median: ",i.median.toLocaleString()]}),null!=i.q3&&Ei("div",{children:["Q3: ",i.q3.toLocaleString()]}),null!=i.max&&Ei("div",{children:["Max: ",i.max.toLocaleString()]}),null!=i.mean&&Ei("div",{style:{opacity:.8},children:["Mean: ",i.mean.toLocaleString(void 0,{maximumFractionDigits:2})]})]});if(e?.valueAccessor){let i=Array.isArray(t.data)?t.data:[],r=e.valueAccessor,a=i.map(e=>Number("function"==typeof r?r(e):e[r])).filter(e=>Number.isFinite(e)).sort((e,t)=>e-t),n=a.length,l=n>0?n%2!=0?a[Math.floor(n/2)]:(a[n/2-1]+a[n/2])/2:null;return Ei("div",{className:"semiotic-tooltip",style:yi,children:[o&&Di("div",{style:{fontWeight:"bold"},children:String(o)}),n>0&&Ei("div",{children:["n = ",n]}),null!=l&&Ei("div",{children:["Median: ",l.toLocaleString()]})]})}return Di("div",{className:"semiotic-tooltip",style:yi,children:Di("div",{style:{fontWeight:"bold"},children:String(o)})})}}function ta(e){let t=eo(e,{skipPositional:!1});return null==t.title&&0===t.entries.length?null:Ei("div",{className:"semiotic-tooltip",style:yi,children:[null!=t.title&&Di("div",{style:{fontWeight:"bold"},children:String(t.title)}),t.entries.map(e=>Ei("div",{children:[Ei("span",{style:{opacity:.7},children:[e.key,":"]})," ","number"==typeof e.value?e.value.toLocaleString():String(e.value)]},e.key))]})}function oa({ref:e,frameRef:t,setup:o}){return Mi(e,()=>({push:e=>t.current?.push(e),pushMany:e=>t.current?.pushMany(e),remove:e=>t.current?.remove(e)??[],update:(e,o)=>t.current?.update(e,o)??[],replace:e=>t.current?.replace(e),clear:()=>t.current?.clear(),getData:()=>t.current?.getData()??[],getScales:()=>t.current?.getScales()??null}),[t]),{effectiveLegendProps:o.legendBehaviorProps,effectiveMargin:o.margin}}function ia(e){let{colorBy:t,colorScale:o,color:i,themeCategorical:r,colorScheme:a,categoryIndexMap:n,userPieceStyle:l,stroke:s,strokeWidth:c,opacity:h,effectiveSelectionHook:u,resolvedSelection:d,cycleByCategory:g=!1,baseStyleExtras:m,linkStrokeToFill:p=!1,styleRules:y,resolveRuleValue:f}=e,v=Ii(()=>(e,l)=>{let s="function"==typeof m?m(e,l):m,c=s?{...s}:{};if(void 0===c.fill)if(t){if(!o)return c;c.fill=Xo(e,t,o)}else c.fill=Yo(i,r,a,g?l:void 0,n);if(y&&y.length>0){let t=Po(e,y,{value:f?f(e,l):void 0,category:l});Object.assign(c,t)}return p&&void 0===c.stroke&&void 0!==c.fill&&(c.stroke=c.fill),c},[t,o,i,r,a,n,g,m,p,y,f]),b=Ii(()=>At(l?"function"==typeof l?(e,t)=>({...v(e,t),...l(e,t)||{}}):(e,t)=>({...v(e,t),...l}):v,{stroke:s,strokeWidth:c,opacity:h}),[v,l,s,c,h]);return Ii(()=>jo(b,u??null,d),[b,u,d])}function ra({brushProp:e,onBrushProp:t,linkedBrush:o,valueAccessor:i}){let r=Ii(()=>{let e="string"==typeof o?o:o?{name:o.name,xField:o.rField}:void 0;return zo(e)},[o]),a="string"==typeof i?i:"value",n=Co({name:r?.name||"__unused_ordinal_brush__",xField:r?.xField||a}),l=Ti(n.brushInteraction);l.current=n.brushInteraction;let s=Li(e=>{if(r){let t=l.current;e?t.end(e.r):t.end(null)}t?.(e)},[t,r]),c=!!(e||o||t);return{hasBrush:c,handleBrush:s,brushStreamProps:c?{brush:{dimension:"r"},onBrush:s}:{}}}function aa(e,t){if("function"==typeof e)return e;let o=e||t;return e=>e[o]}function na(e,t){if(e<=0)return[];if(t&&Object.prototype.hasOwnProperty.call(V,t)){let o=V[t];if(1===e)return[o(.5)];let i=[];for(let t=0;t<e;t++)i.push(o(t/(e-1)));return i}let o=["#da1e28","#ff8389","#ffb3b8"],i=["#a6c8ff","#4589ff","#0043ce"],r="#a8a8a8";if(1===e)return[r];let a=e%2!=0,n=Math.floor(e/2),l=[];for(let e=0;e<n;e++)l.push(o[Math.min(Math.floor(e*o.length/n),o.length-1)]);a&&l.push(r);for(let e=0;e<n;e++)l.push(i[Math.min(Math.floor(e*i.length/n),i.length-1)]);return l}function la(e,t,o,i,r,a,n={}){let l=new Map,s=new Set(t);for(let n of e){let e=o(n);l.has(e)||l.set(e,new Map);let c=l.get(e);if(i){let e=i(n);if(null==e||!Number.isFinite(e))continue;if(!Number.isInteger(e)){"production"!==process.env.NODE_ENV&&console.warn("[LikertChart] Ignoring non-integer Likert score:",e);continue}let o=e-1;if(o<0||o>=t.length)continue;let r=t[o];c.set(r,(c.get(r)||0)+1)}else if(r&&a){let e=r(n),t=a(n);if(!s.has(e))continue;c.set(e,(c.get(e)||0)+(Number.isFinite(t)?t:0))}}let c=[];for(let[e,o]of l){let i=0;for(let e of t)i+=o.get(e)||0;if(0!==i)for(let r=0;r<t.length;r++){let a=t[r],l=o.get(a)||0,s={};n.category&&(s[n.category]=e),n.level&&(s[n.level]=a),n.count&&(s[n.count]=l),n.score&&(s[n.score]=r+1),c.push({...s,__likertCategory:e,__likertLevel:a,__likertLevelLabel:a,__likertCount:l,__likertPct:l/i*100,__likertLevelIndex:r})}}return c}function sa(e,t){let o=t.length,i=o%2!=0,r=Math.floor(o/2),a=[];for(let t of e){let e=t.__likertLevelIndex;if(i&&e===r){let e=t.__likertPct/2;a.push({...t,__likertLevel:G,__likertPct:-e}),a.push({...t,__likertLevel:q,__likertPct:e})}else e<r?a.push({...t,__likertPct:-t.__likertPct}):a.push(t)}return a}function ca(e,t){let o=t.length,i=o%2!=0,r=Math.floor(o/2),a=new Map;for(let t of e){let e=a.get(t.__likertCategory)||[];e.push(t),a.set(t.__likertCategory,e)}let n=[];for(let[,e]of a){let t,a,l=new Map;for(let o of e)o.__likertLevel===G?t=o:o.__likertLevel===q?a=o:l.set(o.__likertLevelIndex,o);i&&t&&n.push(t);for(let e=r-1;e>=0;e--){let t=l.get(e);t&&n.push(t)}i&&a&&n.push(a);for(let e=i?r+1:r;e<o;e++){let t=l.get(e);t&&n.push(t)}}return n}function ha({data:e,levels:t,categoryAccessor:o,valueAccessor:i,levelAccessor:r,countAccessor:a,isDiverging:n,frameRef:l}){let s=!r,c=Ii(()=>aa(o,"question"),[o]),h=Ii(()=>s?aa(i,"score"):null,[s,i]),u=Ii(()=>s?null:aa(r,"level"),[s,r]),d=Ii(()=>s?null:aa(a,"count"),[s,a]),g=Ti([]),m=Ii(()=>({category:"string"==typeof o?o:void 0,level:"string"==typeof r?r:void 0,count:"string"==typeof a?a:void 0,score:r||"string"!=typeof i?void 0:i}),[o,a,r,i]);return{processedData:Ii(()=>{let o=e||[];if(0===o.length)return[];let i=la(o,t,c,h,u,d,m);return n&&(i=sa(i,t),i=ca(i,t)),i},[e,t,c,h,u,d,m,n]),reAggregate:Li(e=>{let o=la(e,t,c,h,u,d,m);n&&(o=sa(o,t),o=ca(o,t)),l.current?.replace(o)},[t,c,h,u,d,m,n,l]),accumulatorRef:g}}function ua(e){let t=e.__likertPct??e.data?.__likertPct;return"number"==typeof t&&Number.isFinite(t)?t:void 0}function da(e,t,o){let i=Math.max(16,.3*t);if(null==o||o<=0)return i;let r=Oo(e,i),a=2*o*se;return r<=a?i:i*a/r}function ga({value:e,min:t,max:o,radius:i,innerRadius:r,showScaleLabels:a,label:n}){let l=da(e,i,r),s=.7*l+11;return Ei("g",{textAnchor:"middle",children:[Di("text",{y:0,dominantBaseline:"central",fontSize:l,fontWeight:700,fill:"var(--semiotic-text, #333)",children:e}),a&&Ei("text",{y:s,fontSize:11,fill:"var(--semiotic-text-secondary, #666)",children:[t," – ",o]}),null!=n&&""!==n&&Di("text",{y:s+(a?14:0),fontSize:11,fill:"var(--semiotic-text-secondary, #666)",children:n})]})}function ma({centerContent:e,centerLabel:t,value:o,min:i,max:r,radius:a,innerRadius:n,showScaleLabels:l,valueFormat:s,compact:c}){if(null!=e){let l="function"==typeof e?e(o,i,r):e;return"string"==typeof l||"number"==typeof l?ga({value:String(l),min:i,max:r,radius:a,innerRadius:n,showScaleLabels:!1,label:t}):l}return c?null:ga({value:s?s(o):String(Math.round(o)),min:i,max:r,radius:a,innerRadius:n,showScaleLabels:l,label:t})}function pa(e=240){let t=e*Math.PI/180,o=360-e,i=180+o/2,r=i*Math.PI/180;return{sweepRad:t,gapDeg:o,startAngleDeg:i,startAngleRad:r,offsetRad:-Math.PI/2+r}}function ya(e=240){let{sweepRad:t,offsetRad:o}=pa(e),i=[[Math.cos(o),Math.sin(o)],[Math.cos(o+t),Math.sin(o+t)],[0,0]];for(let e=0;e<2*Math.PI;e+=Math.PI/2)((e-o)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)<=t+.001&&i.push([Math.cos(e),Math.sin(e)]);let r=i.map(e=>e[0]),a=i.map(e=>e[1]),[n,l]=Ci(r),[s,c]=Ci(a);return{minX:n,maxX:l,minY:s,maxY:c,width:l-n,height:c-s,cx:(n+l)/2,cy:(s+c)/2}}function fa(e){return Math.max(0,Math.min(1,e))}function va(e){let t=e.trim();if(t.startsWith("#")){let e=t.slice(1);if(3===e.length&&(e=e.split("").map(e=>e+e).join("")),6===e.length&&/^[0-9a-f]{6}$/i.test(e))return[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]}let o=e.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i);if(o){let e=[Number(o[1]),Number(o[2]),Number(o[3])];if(e.every(Number.isFinite))return e}return null}function ba(e,t,o){let i=e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,"0");return`#${i(e)}${i(t)}${i(o)}`}function xa(e,t,o){let i=e.filter(e=>Number.isFinite(e.offset)).map(e=>({offset:fa(e.offset),color:e.color??o,opacity:null==e.opacity?1:fa(e.opacity)})).sort((e,t)=>e.offset-t.offset);if(0===i.length)return"#999999";let r=e=>{if(1===e.opacity)return e.color;let t=va(e.color);return t?`rgba(${t[0]},${t[1]},${t[2]},${e.opacity})`:e.color};if(1===i.length)return r(i[0]);let a=fa(t);if(a<=i[0].offset)return r(i[0]);if(a>=i[i.length-1].offset)return r(i[i.length-1]);for(let e=0;e<i.length-1;e++){let t=i[e],o=i[e+1];if(a<t.offset||a>o.offset)continue;let n=o.offset-t.offset,l=n<=0?0:(a-t.offset)/n,s=va(t.color),c=va(o.color);if(!s||!c)return r(l<.5?t:o);let[h,u,d]=s,[g,m,p]=c,y=h+(g-h)*l,f=u+(m-u)*l,v=d+(p-d)*l,b=t.opacity+(o.opacity-t.opacity)*l;return 1===b?ba(y,f,v):`rgba(${Math.round(y)},${Math.round(f)},${Math.round(v)},${b})`}return r(i[i.length-1])}function wa(e,t,o){return null==o?`${e}-${t}`:`${e}-${t}-${o}`}function Aa(e){let{min:t,max:o,value:i,thresholds:r,fillColor:a,backgroundColor:n,fillZones:l,showScaleLabels:s,gradientFill:c,gradientSteps:h=240}=e,u=Math.max(t,Math.min(o,i)),d=o-t||1,g=(u-t)/d,m=r&&r.length>0?[...r].sort((e,t)=>e.value-t.value):[{value:o,color:a||"#007bff"}];m=m.map(e=>({...e,value:Math.max(t,Math.min(o,e.value))})),m[m.length-1].value<o&&m.push({value:o,color:m[m.length-1].color});let p=!!c&&c.stops.length>=2,y=[],f=new Map,v=[];if(p){let e=l?g:1,t=wa("bg",0);if(y.push({category:t,value:1,_zone:"Track",_isFill:!1,_pctStart:0,_pct:1,_roundedEnds:{start:!0,end:!0},_nonInteractive:!0}),f.set(t,{fill:n,opacity:.4}),e>0){let t=Math.max(1,Math.floor(h)),o=Math.max(1,Math.min(t,Math.round(e*t))),i=[];for(let t=0;t<o;t++){let r=e*(t+.5)/o;i.push(xa(c.stops,r,a||m[0]?.color||"#007bff"))}let r=wa("fill",0);y.push({category:r,value:e,_zone:"Gradient",_isFill:!0,_pctStart:0,_pct:e,_roundedEnds:{start:!0,end:!0},_nonInteractive:!0,_gradientBand:{colors:i}}),f.set(r,{fill:i[0]||n})}}else{let e=t;for(let r=0;r<m.length;r++){let a=m[r],s=(a.value-e)/d,c=(e-t)/d,h=(a.value-t)/d,p=l?Math.min(g,h):h,v=Math.max(0,p-c),b=l?Math.max(0,s-v):0;if(v>0){let n=wa("fill",r);y.push({category:n,value:v,_zone:a.label||`Zone ${r+1}`,_isFill:!0,__gaugeAccessibleDatum:{category:a.label||`Zone ${r+1}`,value:i,min:t,max:o,segmentStart:e,segmentEnd:t+p*d,filled:!0}}),f.set(n,{fill:a.color})}if(b>0){let l=wa("bg",r);y.push({category:l,value:b,_zone:a.label||`Zone ${r+1}`,_isFill:!1,__gaugeAccessibleDatum:{category:a.label||`Zone ${r+1}`,value:i,min:t,max:o,segmentStart:Math.max(e,u),segmentEnd:a.value,filled:!1}}),f.set(l,{fill:n,opacity:.4})}e=a.value}}if(s&&r&&r.length>0)for(let e of r)e.value>t&&e.value<o&&v.push({type:"gauge-label",value:e.value,label:e.label||String(e.value)});return{gaugeData:y,pieceStyle:(e,t)=>{let o=t||e.category;return f.get(o)||{fill:n}},gaugeAnnotations:v}}var i=/*#__PURE__*/new Set(["svg","g","text","tspan","path","circle","ellipse","rect","line","polyline","polygon","use","image","defs","symbol"]),r=class{constructor(){this.colorSchemeMap=new Map,this.colorSchemeIndex=0}resetColors(){this.colorSchemeMap.clear(),this.colorSchemeIndex=0}resolvePieceStyle(e,t,o){if(t&&"function"==typeof e.pieceStyle){let i=e.pieceStyle(t,o);return i&&!i.fill&&o?{...i,fill:this.getColorFromScheme(e,o)}:i}return e.pieceStyle&&"object"==typeof e.pieceStyle?e.pieceStyle:e.barColors&&o?{fill:Go(e.barColors,o)??"#007bff"}:{fill:o?this.getColorFromScheme(e,o):"#007bff"}}resolveSummaryStyle(e,t,o){return t&&"function"==typeof e.summaryStyle?e.summaryStyle(t,o):e.summaryStyle&&"object"==typeof e.summaryStyle?e.summaryStyle:{fill:"#007bff",fillOpacity:.6,stroke:"#007bff",strokeWidth:1}}getColorFromScheme(e,t){let o=this.colorSchemeMap.get(t);if(o)return o;let i=Array.isArray(e.colorScheme)?e.colorScheme:e.themeCategorical||qo,r=i[this.colorSchemeIndex%i.length];return this.colorSchemeIndex++,this.colorSchemeMap.set(t,r),r}},a={bar:function(e,t){let{scales:o,columns:i,config:r,getR:a,getStack:n,resolvePieceStyle:l}=e,{r:s,projection:c}=o,h=[],u="vertical"===c,d="horizontal"===c,g=r.normalize,{steps:m,keys:p}=Ui(Object.values(i),a,n,g);for(let{col:e,groups:t}of m){let o=0,i=0;for(let r of p){let a=t.get(r);if(!a)continue;let c=a.value,g=l(a.pieces[0],n?r:e.name),m={...a.pieces[0],__aggregateValue:a.total,__pieceCount:a.pieces.length,category:e.name};if(u){let t=s(c>=0?o+c:i),a=c>=0?s(o)-s(o+c):s(i+c)-s(i);h.push(Te(e.x,t,e.width,Math.abs(a),g,m,r)),c>=0?o+=c:i+=c}else if(d){let t=s(c>=0?o:i+c),a=c>=0?s(o+c)-s(o):s(i)-s(i+c);h.push(Te(t,e.x,Math.abs(a),e.width,g,m,r)),c>=0?o+=c:i+=c}}}let y="vertical"===c;for(let e of h){if("rect"!==e.type)continue;let t=e.datum?.__aggregateValue??0;e.roundedEdge=y?t>=0?"top":"bottom":t>=0?"right":"left",r.gradientFill&&(e.fillGradient=r.gradientFill)}if(void 0!==r.roundedTop){let e=new Map;for(let t of h){if("rect"!==t.type)continue;let o=t.datum?.category||"";e.has(o)||e.set(o,[]),e.get(o).push(t)}for(let t of e.values()){if(0===t.length)continue;let e=t.filter(e=>(e.datum?.__aggregateValue??0)>=0),o=t.filter(e=>(e.datum?.__aggregateValue??0)<0);if(e.length>0){let t=y?e.reduce((e,t)=>e.y<t.y?e:t):e.reduce((e,t)=>e.x+e.w>t.x+t.w?e:t),o=Ji(r.roundedTop,t,y);o>0&&(t.roundedTop=o)}if(o.length>0){let e=y?o.reduce((e,t)=>e.y+e.h>t.y+t.h?e:t):o.reduce((e,t)=>e.x<t.x?e:t),t=Ji(r.roundedTop,e,y);t>0&&(e.roundedTop=t)}}}return h},clusterbar:function(e,t){let{scales:o,columns:i,config:r,getR:a,getGroup:n,resolvePieceStyle:l}=e,{r:s,projection:c}=o,h=[],u="vertical"===c,{steps:d,keys:g}=Ui(Object.values(i),a,n),m=g.length||1;for(let{col:e,groups:t}of d){let o=e.width/m,i=.2*o,r=o-i;for(let n=0;n<g.length;n++){let c=t.get(g[n])?.pieces||[];for(let t of c){let c=a(t),d=l(t,g[n]);if(u){let a=e.x+n*o+i/2,l=s(0),u=s(c);h.push(Te(a,Math.min(l,u),r,Math.abs(l-u),d,t,g[n]))}else{let a=e.x+n*o+i/2,l=s(0),u=s(c);h.push(Te(Math.min(l,u),a,Math.abs(u-l),r,d,t,g[n]))}}}}for(let e of h){if("rect"!==e.type||null==e.datum)continue;let t=a(e.datum),o=Ji(r.roundedTop,e,u);o>0&&(e.roundedTop=o),e.roundedEdge=u?t>=0?"top":"bottom":t>=0?"right":"left",r.gradientFill&&(e.fillGradient=r.gradientFill)}return h},point:function(e,t){let{scales:o,columns:i,getR:r,multiScales:a,resolvePieceStyle:n}=e,{r:l,projection:s}=o,c=[],h="vertical"===s,u="radial"===s,d=a.length>0,g=er(e),m=2*Math.PI,p=-Math.PI/2;for(let e of Object.values(i))for(let t of e.pieceData){let o,i,s=t.__rIndex??0,y=t.__rValue??r(t),f=d&&a[s]||l,v=n(t,e.name),b=v.r||5;if(u){let t=p+(e.pctStart+e.pct/2)*m,r=f(y);o=Math.cos(t)*r,i=Math.sin(t)*r}else h?(o=e.middle,i=f(y)):(o=f(y),i=e.middle);tr(c,g,t,o,i,b,v)}return c},swarm:function(e,t){let{scales:o,columns:i,getR:r,resolvePieceStyle:a}=e,{r:n,projection:l}=o,s=[],c="vertical"===l,h=er(e);for(let e of Object.values(i)){let t=e.width/2;for(let o=0;o<e.pieceData.length;o++){let i=e.pieceData[o],l=r(i),u=a(i,e.name),d=u.r||4,g=(7919*o%100/100-.5)*t*.8;tr(s,h,i,c?e.middle+g:n(l),c?n(l):e.middle+g,d,u)}}return s},pie:or,donut:or,boxplot:function(e,t){let{scales:o,columns:i,config:r,getR:a,resolveSummaryStyle:n}=e,{r:l,projection:s}=o,c=[],h="vertical"===s,u=!1!==r.showOutliers;for(let t of Object.values(i)){let o=t.pieceData.map(e=>a(e)).filter(e=>null!=e&&!isNaN(e)).sort((e,t)=>e-t);if(0===o.length)continue;let i=rr(o),{min:r,max:s,q1:d,median:g,q3:m}=i,p=m-d,y=d-1.5*p,f=m+1.5*p,v=o.find(e=>e>=y)??r,b=s;for(let e=o.length-1;e>=0;e--)if(o[e]<=f){b=o[e];break}i.min=v,i.max=b;let x=n(ir(t.pieceData,t.name,i),t.name),w=[];if(u)for(let e of t.pieceData){let o=a(e);if(o<y||o>f){let i=h?t.middle:l(o),r=h?l(o):t.middle;w.push({px:i,py:r,value:o,datum:e})}}if(c.push({type:"boxplot",x:h?t.middle:0,y:h?0:t.middle,projection:h?"vertical":"horizontal",columnWidth:.6*t.width,minPos:l(v),q1Pos:l(d),medianPos:l(g),q3Pos:l(m),maxPos:l(b),stats:i,style:x,datum:t.pieceData,category:t.name,outliers:w}),u)for(let t of w)c.push({type:"point",x:t.px,y:t.py,r:3,style:{fill:x.fill||e.config.themeSemantic?.secondary||"#999",opacity:.6,cursor:x.cursor},datum:t.datum})}return c},violin:function(e,t){let{scales:o,columns:i,config:r,getR:a,resolveSummaryStyle:n}=e,{r:l,projection:s}=o,c=[],h="vertical"===s,u=r.bins||20,d=!1!==r.showIQR;for(let e of Object.values(i)){let t=e.pieceData.map(e=>a(e)).filter(e=>null!=e&&!isNaN(e)).sort((e,t)=>e-t);if(t.length<2)continue;let o,i=t[0],r=t[t.length-1],s=(r-i)/u||1,g=ar(t,i,r,s,u),m=Pi(g,1),p=e.width/2*.9;if(h){o=`M ${e.middle} ${l(i)}`;for(let t=0;t<u;t++){let r=l(i+(t+.5)*s),a=g[t]/m*p;o+=` L ${e.middle+a} ${r}`}o+=` L ${e.middle} ${l(r)}`;for(let t=u-1;t>=0;t--){let r=l(i+(t+.5)*s),a=g[t]/m*p;o+=` L ${e.middle-a} ${r}`}o+=" Z"}else{o=`M ${l(i)} ${e.middle}`;for(let t=0;t<u;t++){let r=l(i+(t+.5)*s),a=g[t]/m*p;o+=` L ${r} ${e.middle-a}`}o+=` L ${l(r)} ${e.middle}`;for(let t=u-1;t>=0;t--){let r=l(i+(t+.5)*s),a=g[t]/m*p;o+=` L ${r} ${e.middle+a}`}o+=" Z"}let y,f=rr(t),v=n(ir(e.pieceData,e.name,f),e.name);d&&t.length>=4&&(y={q1Pos:l(f.q1),medianPos:l(f.median),q3Pos:l(f.q3),centerPos:e.middle,isVertical:h});let b=h?{x:e.x,y:Math.min(l(r),l(i)),width:e.width,height:Math.abs(l(r)-l(i))}:{x:Math.min(l(i),l(r)),y:e.x,width:Math.abs(l(r)-l(i)),height:e.width};c.push({type:"violin",pathString:o,translateX:0,translateY:0,bounds:b,iqrLine:y,stats:f,style:v,datum:e.pieceData,category:e.name})}return c},histogram:function(e,t){let{scales:o,columns:i,config:r,getR:a,resolveSummaryStyle:n}=e,{r:l}=o,s=[],c=r.bins||25,h=r.normalize,u=l.domain?.(),d=u?+u[0]:void 0,g=u?+u[1]:void 0;for(let e of Object.values(i)){let t=e.pieceData.map(e=>a(e)).filter(e=>null!=e&&!isNaN(e));if(0===t.length)continue;let[o,i]=Ci(t),r=null!=d&&isFinite(d)?d:o,u=null!=g&&isFinite(g)?g:i,m=(u-r)/c||1,p=ar(t,r,u,m,c),y=t.length,f=Pi(p,1);for(let t=0;t<c;t++){if(0===p[t])continue;let o=(h?p[t]/y:p[t]/f)*e.width*.9,i=l(r+t*m),a=l(r+(t+1)*m),c=Math.min(i,a),u=Math.abs(a-i),d=e.x+e.width-o,g={...e.pieceData[0],bin:t,count:p[t],range:[r+t*m,r+(t+1)*m],category:e.name,data:e.pieceData},v=n(g,e.name);s.push(Te(c,d,u,o,v,g,e.name))}}return s},ridgeline:function(e,t){let{scales:o,columns:i,config:r,getR:a,resolveSummaryStyle:n}=e,{r:l,projection:s}=o,c=[],h=r.bins||20,u="horizontal"===s,d=r.amplitude||1.5;for(let e of Object.values(i)){let t=e.pieceData.map(e=>a(e)).filter(e=>null!=e&&!isNaN(e)).sort((e,t)=>e-t);if(t.length<2)continue;let o,i=t[0],r=t[t.length-1],s=(r-i)/h||1,g=ar(t,i,r,s,h),m=Pi(g,1),p=rr(t),y=n(ir(e.pieceData,e.name,p),e.name),f=e.width*d;if(u){let t=e.x+e.width;o=`M ${l(i)} ${t}`;for(let e=0;e<h;e++)o+=` L ${l(i+(e+.5)*s)} ${t-g[e]/m*f}`;o+=` L ${l(r)} ${t} Z`}else{let t=e.x;o=`M ${t} ${l(i)}`;for(let e=0;e<h;e++){let r=l(i+(e+.5)*s);o+=` L ${t+g[e]/m*f} ${r}`}o+=` L ${t} ${l(r)} Z`}let v=u?{x:Math.min(l(i),l(r)),y:e.x,width:Math.abs(l(r)-l(i)),height:e.width}:{x:e.x,y:Math.min(l(r),l(i)),width:e.width,height:Math.abs(l(r)-l(i))};c.push({type:"violin",pathString:o,translateX:0,translateY:0,bounds:v,stats:p,style:{...y,fillOpacity:y.fillOpacity??.5},datum:e.pieceData,category:e.name})}return c},timeline:function(e,t){let{scales:o,columns:i,getRawRange:r,resolvePieceStyle:a}=e,{r:n,projection:l}=o,s=[],c="horizontal"===l;for(let e of Object.values(i))for(let t of e.pieceData){let o=r(t);if(!o)continue;let[i,l]=o,h=a(t,e.name);if(c){let o=n(Math.min(i,l)),r=n(Math.max(i,l));s.push(Te(o,e.x,r-o,e.width,h,t,e.name))}else{let o=n(Math.max(i,l)),r=n(Math.min(i,l));s.push(Te(e.x,o,e.width,r-o,h,t,e.name))}}return s},funnel:function(e,t){let{columns:o,getR:i,getStack:r,resolvePieceStyle:a}=e,n=[],l=t.width/2,s=!1!==e.config.showLabels,c=e.scales.o.domain().map(e=>o[e]).filter(Boolean);if(0===c.length)return n;let{steps:h,keys:u}=Ui(c,i,r),d=u.length>1&&"_default"!==u[0],g=0;if(!d)for(let{stepTotal:e}of h)e>g&&(g=e);if(d)for(let e of h){let t=0,o=0;for(let i=0;i<u.length;i++){let r=e.groups.get(u[i]);r&&(i%2==0?t+=r.total:o+=r.total)}let i=Math.max(t,o);i>g&&(g=i)}if(0===g)return n;let m=h[0].stepTotal,p=d?.95*l:.9*t.width,y=Ni().domain([0,g]).range([0,p]),f=e.config.connectorOpacity??.3,v=new Map;for(let t=0;t<h.length;t++){let o=h[t],i=o.col,r=0===t,c=i.x,g=i.width,p=.55*g,b=c+(g-p)/2,x=new Map;if(d){let e=0;for(let t of u){let i=o.groups.get(t);i&&(e+=y(i.total))}let t=l,c=l;for(let d=0;d<u.length;d++){let g=u[d],m=o.groups.get(g);if(!m)continue;let f=y(m.total),v=d%2==0,w=v?t:c-f;v?t+=f:c-=f;let A=a(m.pieces[0],g),k=h[0].groups.get(g)?.total??0,S=k>0?m.total/k*100:0,R={...m.pieces[0],__funnelValue:m.total,__funnelPercent:S,__funnelStep:i.name,__funnelIsFirstStep:r,__aggregateValue:m.total,__pieceCount:m.pieces.length,category:g};s&&(0===d&&(R.__funnelStepLabel=i.name,R.__funnelStepLabelX=l,R.__funnelStepLabelY=b,R.__funnelRowWidth=e),R.__funnelValueLabelX=w+f/2,R.__funnelValueLabelY=b,R.__funnelBarW=f),n.push(Te(w,b,f,p,A,R,g)),x.set(g,{x:w,y:b,w:f,h:p})}}else{let e=o.stepTotal,t=y(e),c=l-t/2,h=u[0],d="_default"!==h,g=o.groups.get(h)?.pieces[0]??i.pieceData[0],f=d?h:i.name,v=a(g,f),w=m>0?e/m*100:0,A={...g,__funnelValue:e,__funnelPercent:w,__funnelStep:i.name,__funnelIsFirstStep:r,category:d?h:i.name};s&&(A.__funnelStepLabel=i.name,A.__funnelStepLabelX=l,A.__funnelStepLabelY=b,A.__funnelRowWidth=t,A.__funnelValueLabelX=l,A.__funnelValueLabelY=b,A.__funnelBarW=t),n.push(Te(c,b,t,p,v,A,f)),x.set(h,{x:c,y:b,w:t,h:p})}if(t>0&&v.size>0){let t=d?u:[u[0]];for(let r of t){let t=v.get(r),l=x.get(r);if(!t||!l)continue;let s=(()=>{let e=o.groups.get(r),t="_default"===r?i.name:r;return a(e?e.pieces[0]:i.pieceData[0],t)})(),c={type:"trapezoid",points:[[t.x,t.y+t.h],[t.x+t.w,t.y+t.h],[l.x+l.w,l.y],[l.x,l.y]],style:{fill:s.fill||e.config.themeSemantic?.secondary||"#999",opacity:f,cursor:s.cursor},datum:o.groups.get(r)?.pieces[0]??i.pieceData[0],category:"_default"===r?i.name:r};n.push(c)}}v=x}return n},"bar-funnel":function(e,t){let{columns:o,getR:i,getStack:r,resolvePieceStyle:a,scales:n}=e,l=[],s=n.o.domain().map(e=>o[e]).filter(Boolean);if(0===s.length)return l;let{steps:c,keys:h}=Ui(s,i,r),u=h.length>1&&"_default"!==h[0],d=n.r,g=u?h.length:1,m=u?.15:0;for(let e=0;e<c.length;e++){let t=c[e],o=t.col,i=0===e,r=e>0?c[e-1]:null,n=o.width/g,s=n*m,p=n-s;for(let e=0;e<h.length;e++){let g=h[e],m=t.groups.get(g);if(!m)continue;let y=m.total,f=c[0].groups.get(g)?.total??0,v=f>0?y/f*100:0,b=r?.groups.get(g)?.total??y,x=i?0:Math.max(0,b-y),w=o.x+e*n+s/2,A=d(y),k=d(0),S=k-A,R=a(m.pieces[0],u?g:o.name),P={...m.pieces[0],__barFunnelValue:y,__barFunnelPercent:v,__barFunnelIsFirstStep:i,__barFunnelIsDropoff:!1,__barFunnelStep:o.name,__barFunnelDropoffValue:x,__barFunnelCategory:"_default"===g?void 0:g,category:u?g:o.name,__barFunnelLabelX:w+p/2,__barFunnelLabelY:d(y+x)};if(l.push(Te(w,Math.min(A,k),p,Math.abs(S),R,P,u?g:o.name)),x>0){let e=d(y+x),t=A-e,i={...R},r={...m.pieces[0],__barFunnelValue:x,__barFunnelPercent:f>0?x/f*100:0,__barFunnelIsFirstStep:!1,__barFunnelIsDropoff:!0,__barFunnelStep:o.name,__barFunnelCategory:"_default"===g?void 0:g,category:u?g:o.name};l.push(Te(w,e,p,t,i,r,u?g:o.name))}}}return l},swimlane:function(e,t){let{scales:o,columns:i,getR:r,getStack:a,resolvePieceStyle:n}=e,{r:l,projection:s}=o,c=[],h="horizontal"===s,u=e.config.gradientFill,d=h?"left":"bottom",g=new Map,m=t=>{let o=g.get(t);if(void 0!==o)return o;let i="function"==typeof e.config.roundedTop?e.config.roundedTop(t.width):e.config.roundedTop,r="number"==typeof i&&Number.isFinite(i)?Math.max(0,i):0;return g.set(t,r),r},p=e.config.trackFill;if(p){let e="string"==typeof p?p:p.color,t="string"==typeof p?1:p.opacity??1,[o,r]=l.range(),a=Math.min(o,r),n=Math.abs(r-o);for(let o of Object.values(i)){let i={fill:e,opacity:t},r=h?Te(a,o.x,n,o.width,i,null,"__track__"):Te(o.x,a,o.width,n,i,null,"__track__"),l=m(o);l>0&&(r.cornerRadii={tl:l,tr:l,br:l,bl:l}),c.push(r)}}for(let e of Object.values(i)){let t=0,o=c.length,i=m(e);for(let o of e.pieceData){let i=Math.abs(r(o));if(0===i)continue;let s,g=a?a(o):e.name,m=n(o,g);if(h){let r=l(t),a=l(t+i);s=Te(r,e.x,a-r,e.width,m,o,g)}else{let r=l(t+i),a=l(t);s=Te(e.x,r,e.width,a-r,m,o,g)}u&&(s.fillGradient=u,s.roundedEdge=d),c.push(s),t+=i}if(i>0&&c.length>o){let e=c.slice(o),t=e[0],r=e[e.length-1];1===e.length?t.cornerRadii={tl:i,tr:i,br:i,bl:i}:h?(t.cornerRadii={tl:i,bl:i},r.cornerRadii={tr:i,br:i}):(t.cornerRadii={bl:i,br:i},r.cornerRadii={tl:i,tr:i})}}return c}},n=["data","domain","layout","scene-geometry","data-paint","overlay","accessibility","evidence"],l=["scene-style","data-paint","accessibility","evidence"],s=["domain","layout","scene-geometry","data-paint","overlay","accessibility","evidence"],c=["layout","scene-geometry","data-paint","overlay","accessibility","evidence"],h=["scene-geometry","data-paint","accessibility","evidence"],u=["scene-style","data-paint","accessibility","evidence"],d=[],g={chartType:/*#__PURE__*/(e=(e,t)=>({retainedData:e,invalidations:t}))("rebuild",t=["domain","layout","scene-geometry","data-paint","overlay","accessibility","evidence"]),runtimeMode:/*#__PURE__*/e("rebuild",t),categoryAccessor:/*#__PURE__*/e("rebuild",t),valueAccessor:/*#__PURE__*/e("rebuild",t),oAccessor:/*#__PURE__*/e("rebuild",t),rAccessor:/*#__PURE__*/e("rebuild",t),stackBy:/*#__PURE__*/e("rebuild",t),groupBy:/*#__PURE__*/e("rebuild",t),timeAccessor:/*#__PURE__*/e("rebuild",t),accessorRevision:/*#__PURE__*/e("rebuild",t),colorAccessor:/*#__PURE__*/e("rebuild",u),symbolAccessor:/*#__PURE__*/e("rebuild",h),connectorAccessor:/*#__PURE__*/e("rebuild",h),dataIdAccessor:/*#__PURE__*/e("rebuild",h),projection:/*#__PURE__*/e("preserve",s),extentPadding:/*#__PURE__*/e("preserve",s),axisExtent:/*#__PURE__*/e("preserve",s),rExtent:/*#__PURE__*/e("preserve",s),oExtent:/*#__PURE__*/e("preserve",s),multiAxis:/*#__PURE__*/e("preserve",s),normalize:/*#__PURE__*/e("preserve",s),bins:/*#__PURE__*/e("preserve",s),oSort:/*#__PURE__*/e("preserve",c),barPadding:/*#__PURE__*/e("preserve",c),roundedTop:/*#__PURE__*/e("preserve",c),baselinePadding:/*#__PURE__*/e("preserve",c),innerRadius:/*#__PURE__*/e("preserve",c),cornerRadius:/*#__PURE__*/e("preserve",c),startAngle:/*#__PURE__*/e("preserve",c),sweepAngle:/*#__PURE__*/e("preserve",c),trackFill:/*#__PURE__*/e("preserve",c),showOutliers:/*#__PURE__*/e("preserve",c),showIQR:/*#__PURE__*/e("preserve",c),amplitude:/*#__PURE__*/e("preserve",c),connectorOpacity:/*#__PURE__*/e("preserve",c),showLabels:/*#__PURE__*/e("preserve",c),dynamicColumnWidth:/*#__PURE__*/e("rebuild",c),customLayout:/*#__PURE__*/e("preserve",c),layoutConfig:/*#__PURE__*/e("preserve",c),layoutMargin:/*#__PURE__*/e("preserve",c),symbolMap:/*#__PURE__*/e("preserve",h),pieceStyle:/*#__PURE__*/e("preserve",u),summaryStyle:/*#__PURE__*/e("preserve",u),connectorStyle:/*#__PURE__*/e("preserve",u),gradientFill:/*#__PURE__*/e("preserve",u),colorScheme:/*#__PURE__*/e("preserve",u),themeCategorical:/*#__PURE__*/e("preserve",u),themeSemantic:/*#__PURE__*/e("preserve",u),themeSequential:/*#__PURE__*/e("preserve",u),themeDiverging:/*#__PURE__*/e("preserve",u),barColors:/*#__PURE__*/e("preserve",u),decay:/*#__PURE__*/e("preserve",u),pulse:/*#__PURE__*/e("preserve",u),staleness:/*#__PURE__*/e("preserve",u),layoutSelection:/*#__PURE__*/e("preserve",u),windowSize:/*#__PURE__*/e("preserve",d),windowMode:/*#__PURE__*/e("preserve",d),clock:/*#__PURE__*/e("preserve",d),transition:/*#__PURE__*/e("preserve",d),introAnimation:/*#__PURE__*/e("preserve",d),onLayoutError:/*#__PURE__*/e("preserve",d)},m=/*#__PURE__*/e("preserve",c),p=class{constructor(){this.tracker=new Tt}get last(){return this.tracker.last}subscribe(e){return this.tracker.subscribe(e)}recordData(e,t){return this.tracker.record({kind:e,...void 0===t?{}:{count:t}},n)}recordNoop(e){return this.tracker.record({kind:e,..."restyle"===e?{}:{count:0}},[])}recordRestyle(e){return e?this.tracker.record({kind:"restyle"},l):this.recordNoop("restyle")}recordConfig(e){let t=cr(e);return this.tracker.record({kind:"config",keys:e},t.invalidations)}},y=500,f=class extends Je{constructor(e){super(),this.rExtent=new ke,this.rExtents=[],this.windowSizeWarned=!1,this.updateResults=new p,this.rAccessors=[],this.categories=new Set,this._hasStreamingData=!1,this.styleResolver=new r,this.timestampBuffer=null,this.activeTransition=null,this.prevPositionMap=new Map,this.exitNodes=[],this.lastIngestTime=0,this.scales=null,this.multiScales=[],this.scene=[],this.columns={},this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this.lastCustomLayoutFailure=null,this._customLayoutFailedThisBuild=!1,this._customLayoutDiagnosticsWarned=new Set,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,this.version=0,this._dataVersion=0,this._bufferArrayCache=null,this._pointQuadtree=null,this._maxPointRadius=0,this._datumIndexCache=null,this._categoryIndexCache=null,this._hasRenderedOnce=!1,this.config=e,this.buffer=new De(e.windowSize),this.getO=Ze(e.categoryAccessor||e.oAccessor,"category");let t="streaming"===e.runtimeMode,o=e.valueAccessor||e.rAccessor;Array.isArray(o)?(this.rAccessors=o.map(e=>Ke(e,"value")),this.getR=this.rAccessors[0],this.rExtents=o.map(()=>new ke)):(t&&e.timeAccessor,this.getR=Ke(o,"value"),this.rAccessors=[this.getR],this.rExtents=[this.rExtent]),this.getStack=Ze(e.stackBy),this.getGroup=Ze(e.groupBy),this.getColor=Ze(e.colorAccessor),this.getSymbol=Ze(e.symbolAccessor),this.getConnector=Ze(e.connectorAccessor),this.getDataId=Ze(e.dataIdAccessor),e.pulse&&(this.timestampBuffer=new De(e.windowSize))}syncPulseTimestampBuffer(){var e,t,o,i;this.timestampBuffer=(e=!!this.config.pulse,t=this.buffer,o=this.timestampBuffer,i=this.currentTime(),e?null!=o&&o.capacity===t.capacity&&o.size===t.size?o:Oe(t,i):null)}currentTime(){return this.config.clock?.()??wi()}ingest(e){let t=this.currentTime();if(this.lastIngestTime=t,this._dataVersion++,e.bounded){this.buffer.clear(),this.rExtent.clear();for(let e of this.rExtents)e.clear();e.preserveCategoryOrder?this._hasStreamingData=!0:this.categories.clear(),this.timestampBuffer&&this.timestampBuffer.clear();let o=e.totalSize||e.inserts.length;Ee(this.buffer,o,this.timestampBuffer);for(let o of e.inserts)We(this.buffer,o,this.timestampBuffer,t),this.categories.add(this.getO(o)),this.pushValueExtent(o)}else{this._hasStreamingData=!0;for(let o of e.inserts){let e=We(this.buffer,o,this.timestampBuffer,t);this.categories.add(this.getO(o)),this.pushValueExtent(o),null!=e&&this.evictValueExtent(e)}}return this.updateResults.recordData(e.bounded?"replace":"ingest",e.inserts.length),!0}ingestWithResult(e){return this.ingest(e),this.updateResults.last}pushValueExtent(e){if("timeline"===this.config.chartType){let t=this.getRawRange(e);t&&(this.rExtent.push(t[0]),this.rExtent.push(t[1]))}else if(this.rAccessors.length>1){for(let t=0;t<this.rAccessors.length;t++)this.rExtents[t].push(this.rAccessors[t](e));this.rExtent.push(this.getR(e))}else this.rExtent.push(this.getR(e))}evictValueExtent(e){if("timeline"===this.config.chartType){let t=this.getRawRange(e);t&&(this.rExtent.evict(t[0]),this.rExtent.evict(t[1]))}else if(this.rAccessors.length>1){for(let t=0;t<this.rAccessors.length;t++)this.rExtents[t].evict(this.rAccessors[t](e));this.rExtent.evict(this.getR(e))}else this.rExtent.evict(this.getR(e))}getRawRange(e){let t=this.config.valueAccessor||this.config.rAccessor;if(!t)return null;let o="function"==typeof t?t(e):e[t];return Array.isArray(o)&&o.length>=2?[+o[0],+o[1]]:null}computeScene(e){let{config:t,buffer:o}=this,i=this.scales,r=this.multiScales,a=this.columns;if(0===o.size)return this.scales=null,this.multiScales=[],this.scene=[],this.columns={},this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this.lastCustomLayoutFailure=null,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,void this.version++;this.rExtent.dirty&&("timeline"===t.chartType?(this.rExtent.clear(),o.forEach(e=>this.pushValueExtent(e))):this.rExtent.recalculate(o,this.getR));let n,l,s=this.getBufferArray(),c=t.projection||"vertical",h=t.oExtent||this.resolveCategories(s),u=this.computeValueDomain(s,h),d="vertical"===c,g="horizontal"===c,m="radial"===c,p=null!=t.barPadding?t.barPadding/(d?e.width:e.height):.1,y=Math.min(.9,Math.max(0,p));if(m){n=ji().domain(h).range([0,1]).padding(0);let o=Math.min(e.width,e.height)/2,i=t.innerRadius||0;l=Ni().domain(u).range([i,o])}else g?(n=ji().domain(h).range([0,e.height]).padding(y),l=Ni().domain(u).range([0,e.width])):(n=ji().domain(h).range([0,e.width]).padding(y),l=Ni().domain(u).range([e.height,0]));this.scales={o:n,r:l,projection:c},this.rAccessors.length>1&&t.multiAxis?this.multiScales=this.rAccessors.map((i,r)=>{let a=this.rExtents[r];a.dirty&&a.recalculate(o,i);let[n,l]=a.extent;n===1/0&&(n=0,l=1);let s=t.extentPadding??.05,c=l-n,h=c>0?c*s:1;return n-=h,l+=h,n>0&&(n=0),g?Ni().domain([n,l]).range([0,e.width]):Ni().domain([n,l]).range([e.height,0])}):this.multiScales=[];let f=s;this.rAccessors.length>1&&(f=s.flatMap(e=>this.rAccessors.map((t,o)=>({...e,__rIndex:o,__rValue:t(e),__rName:this.resolveRAccessorName(o)})))),this.columns=this.buildColumns(f,h,n,c,e),this._customLayoutFailedThisBuild=!1;let v=this.buildSceneNodes(f,e);this._customLayoutFailedThisBuild?!0===this.lastCustomLayoutFailure?.preservedLastGoodScene?(this.scales=i,this.multiScales=r,this.columns=a):(this.scene=[],this.rebuildPointQuadtree()):(this.config.transition&&this.scene.length>0&&this.snapshotPositions(),this.scene=v,this.rebuildPointQuadtree(),this.config.decay&&this.applyDecay(this.scene,s),this.config.pulse&&this.applyPulse(this.scene,s),this.config.transition&&!this._hasRenderedOnce&&this.scene.length>0&&(this.config.introAnimation&&this.synthesizeIntroPositions(),this._hasRenderedOnce=!0),this.config.transition&&this.prevPositionMap.size>0&&this.startTransition(),this.version++)}resolveRAccessorName(e){let t=this.config.valueAccessor||this.config.rAccessor,o=Array.isArray(t)?t[e]:t;return"string"==typeof o?o:`value${e}`}resolveCategories(e){let t=this.config.oSort,o="streaming"===this.config.runtimeMode||this._hasStreamingData,i="auto"===t?void 0:t,r=null;if(o){r=new Set;for(let t of e)r.add(this.getO(t))}let a=r?Array.from(this.categories).filter(e=>r.has(e)):Array.from(this.categories);if(o&&void 0===i){let e=Math.max(50,3*r.size);if(this.categories.size>e){let t=this.categories.size-e;for(let e of this.categories){if(t<=0)break;r.has(e)||(this.categories.delete(e),t--)}}return a}if(!1===i)return a;if("function"==typeof i)return a.sort(i);let n=new Map;for(let t of e){let e=this.getO(t);n.set(e,(n.get(e)||0)+Math.abs(this.getR(t)))}return"asc"===i?a.sort((e,t)=>(n.get(e)||0)-(n.get(t)||0)):a.sort((e,t)=>(n.get(t)||0)-(n.get(e)||0))}computeValueDomain(e,t){return nr({data:e,chartType:this.config.chartType,projection:this.config.projection,normalize:this.config.normalize,rExtent:this.config.rExtent,extentPadding:this.config.extentPadding,baselinePadding:this.config.baselinePadding,axisExtent:this.config.axisExtent,getO:this.getO,getR:this.getR,getStack:this.getStack,rawRExtent:this.rExtent.extent})}buildColumns(e,t,o,i,r){return lr({data:e,oExtent:t,oScale:o,projection:i,layout:r,dynamicColumnWidth:this.config.dynamicColumnWidth,getO:this.getO,getR:this.getR})}getSceneContext(){return{scales:this.scales,columns:this.columns,config:this.config,getR:this.getR,getStack:this.getStack,getGroup:this.getGroup,getColor:this.getColor,getSymbol:this.getSymbol,getConnector:this.getConnector,getO:this.getO,multiScales:this.multiScales,rAccessors:this.rAccessors,resolvePieceStyle:(e,t)=>this.styleResolver.resolvePieceStyle(this.config,e,t),resolveSummaryStyle:(e,t)=>this.styleResolver.resolveSummaryStyle(this.config,e,t),getRawRange:e=>this.getRawRange(e)}}buildSceneNodes(e,t){if(!this.scales)return[];if(this.config.customLayout){let o=this.buildLayoutContext(e,t),i=et({family:"ordinal",logLabel:"ordinal customLayout",revision:this.version,hasPreviousResult:null!==this.lastCustomLayoutResult,onLayoutError:this.config.onLayoutError,run:()=>this.config.customLayout(o)});if("failure"===i.kind)return this.lastCustomLayoutFailure=i.diagnostic,this._customLayoutFailedThisBuild=!0,i.preservedLastGoodScene?this.scene:(this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,[]);let r=i.result;this.customLayoutOverlays=r.overlays??null,this.lastCustomLayoutResult=r,this.lastCustomLayoutFailure=null;let a=r.nodes??[];if(this._customRestyle=r.restyle,this.hasCustomRestyle=!!r.restyle,this.hasCustomRestyle){this._baseStyles=new WeakMap;for(let e of a)e.style&&this._baseStyles.set(e,e.style);this.applyCustomRestyle(a,this.config.layoutSelection??null)}return tt({label:"ordinal customLayout",nodes:a,overlays:this.customLayoutOverlays,warned:this._customLayoutDiagnosticsWarned}),a}this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this.lastCustomLayoutFailure=null,this._customRestyle=void 0,this.hasCustomRestyle=!1;let o=this.getSceneContext(),i=a[this.config.chartType],r=i?i(o,t):[];return this.getConnector&&this.scales&&(r=[...Zi(o,r),...r]),r}buildLayoutContext(e,t){let o=this.config,i=o.layoutMargin??{top:0,right:0,bottom:0,left:0},r=Mt(o.colorScheme,o.themeCategorical,qo),a=this.scales,n="radial"===a.projection?{x:-t.width/2,y:-t.height/2,width:t.width,height:t.height}:{x:0,y:0,width:t.width,height:t.height};return{data:e,scales:{o:a.o,r:a.r,projection:a.projection},dimensions:{width:t.width,height:t.height,margin:i,plot:n},theme:{semantic:o.themeSemantic??{},categorical:[...r]},resolveColor:It(r,o.colorScheme),config:o.layoutConfig??{},selection:o.layoutSelection??null}}computeDecayOpacity(e,t){let o=this.config.decay;return!o||t<=1?1:ot(o,e,t)}getDatumIndexMap(e){if(this._datumIndexCache&&this._datumIndexCache.version===this._dataVersion)return this._datumIndexCache.map;let t=it(e);return this._datumIndexCache={version:this._dataVersion,map:t},t}getCategoryIndexMap(e){if(this._categoryIndexCache&&this._categoryIndexCache.version===this._dataVersion)return this._categoryIndexCache.map;let t=sr(e,this.config.categoryAccessor||this.config.oAccessor);return this._categoryIndexCache={version:this._dataVersion,map:t},t}rebuildPointQuadtree(){let e=hr(this.scene);this._pointQuadtree=e.quadtree,this._maxPointRadius=e.maxRadius}get pointQuadtree(){return this._pointQuadtree}get maxPointRadius(){return this._maxPointRadius}applyDecay(e,t){if(!this.config.decay)return;let o=t.length;if(o<=1)return;let i=this.getDatumIndexMap(t);for(let t of e){if("connector"===t.type||"violin"===t.type||"boxplot"===t.type||"wedge"===t.type||!t.datum)continue;let e=i.get(t.datum);if(null==e)continue;let r=this.computeDecayOpacity(e,o),a=t.style?.opacity??1;t.style={...t.style,opacity:a*r}}}applyPulse(e,t,o=this.currentTime()){return!(!this.config.pulse||!this.timestampBuffer)&&Qi(this.config.pulse,e,this.timestampBuffer,this.getDatumIndexMap(t),e=>this.getCategoryIndexMap(t).get(e),o)}refreshPulse(e){return!0!==this.lastCustomLayoutFailure?.preservedLastGoodScene&&this.applyPulse(this.scene,this.getBufferArray(),e)}hasActivePulsesAt(e){return!!this.config.pulse&&Ne(this.config.pulse,this.timestampBuffer,e)}get hasActivePulses(){return this.hasActivePulsesAt(this.currentTime())}synthesizeIntroPositions(){this.prevPositionMap.clear();let e,t=new Map,o=this.scales?.r(0)??0,i="horizontal"!==this.scales?.projection;for(let r=0;r<this.scene.length;r++){let a=this.scene[r],n=this.getNodeKey(a,t);n&&("rect"===a.type?i?this.prevPositionMap.set(n,{x:a.x,y:o,w:a.w,h:0,opacity:a.style.opacity??1}):this.prevPositionMap.set(n,{x:o,y:a.y,w:0,h:a.h,opacity:a.style.opacity??1}):"point"===a.type?this.prevPositionMap.set(n,{x:a.x,y:a.y,r:0,opacity:0}):"wedge"===a.type&&(void 0===e&&(e=a.startAngle),this.prevPositionMap.set(n,{x:a.cx,y:a.cy,startAngle:e,endAngle:e,innerRadius:a.innerRadius,outerRadius:a.outerRadius,opacity:0})))}}getNodeKey(e,t){if("point"===e.type){let o=`p:${e.datum?this.getO(e.datum):""}:${e.datum?this.getR(e.datum):0}`,i=t.get(o)||0;return t.set(o,i+1),`${o}:${i}`}if("rect"===e.type){let o=e.datum?null!=e.datum.category&&""!==e.datum.category?String(e.datum.category):String(this.getO(e.datum)??""):"",i=`r:${e.group||""}:${o}`,r=t.get(i)||0;return t.set(i,r+1),0===r?i:`${i}:${r}`}return"wedge"===e.type?`w:${e.category??""}`:null}snapshotPositions(){this.prevPositionMap.clear();let e=new Map;for(let t=0;t<this.scene.length;t++){let o=this.scene[t],i=this.getNodeKey(o,e);i&&("point"===o.type?this.prevPositionMap.set(i,{x:o.x,y:o.y,r:o.r,...Ai(o.style)}):"rect"===o.type?this.prevPositionMap.set(i,{x:o.x,y:o.y,w:o.w,h:o.h,...Ai(o.style)}):"wedge"===o.type&&this.prevPositionMap.set(i,{x:o.cx,y:o.cy,startAngle:o.startAngle,endAngle:o.endAngle,innerRadius:o.innerRadius,outerRadius:o.outerRadius,...Ai(o.style)}))}}startTransition(){if(!this.config.transition||0===this.prevPositionMap.size)return;let e=this.config.transition.duration??300;if(this.exitNodes.length>0){let e=new Set(this.exitNodes);this.scene=this.scene.filter(t=>!e.has(t)),this.exitNodes=[]}let t=!1,o=new Set,i=new Map;for(let e=0;e<this.scene.length;e++){let r=this.scene[e],a=this.getNodeKey(r,i);if(!a)continue;r._transitionKey=a;let n=this.prevPositionMap.get(a);if("point"===r.type)n?(o.add(a),r._targetOpacity=r.style.opacity??1,(n.x!==r.x||n.y!==r.y||void 0!==n.r&&n.r!==r.r)&&(r._targetX=r.x,r._targetY=r.y,r._targetR=r.r,r.x=n.x,r.y=n.y,void 0!==n.r&&(r.r=n.r),t=!0)):(r._targetOpacity=r.style.opacity??1,r._targetR=r.r,r.r=0,r.style={...r.style,opacity:0},t=!0);else if("rect"===r.type)n?(o.add(a),r._targetOpacity=r.style.opacity??1,(n.x!==r.x||n.y!==r.y||n.w!==r.w||n.h!==r.h)&&(r._targetX=r.x,r._targetY=r.y,r._targetW=r.w,r._targetH=r.h,r.x=n.x,r.y=n.y,r.w=n.w??r.w,r.h=n.h??r.h,t=!0)):(r._targetOpacity=r.style.opacity??1,r.style={...r.style,opacity:0},t=!0);else if("wedge"===r.type)if(n)o.add(a),r._targetOpacity=r.style.opacity??1,(n.startAngle!==r.startAngle||n.endAngle!==r.endAngle)&&(r._targetStartAngle=r.startAngle,r._targetEndAngle=r.endAngle,r.startAngle=n.startAngle,r.endAngle=n.endAngle,t=!0);else{r._targetOpacity=r.style.opacity??1,r._targetStartAngle=r.startAngle,r._targetEndAngle=r.endAngle;let e=r.startAngle;r.startAngle=e,r.endAngle=e,r.style={...r.style,opacity:0},this.prevPositionMap.set(a,{x:r.cx,y:r.cy,startAngle:e,endAngle:e,innerRadius:r.innerRadius,outerRadius:r.outerRadius,opacity:0}),t=!0}}this.exitNodes=[];for(let[e,i]of this.prevPositionMap){if(o.has(e))continue;let r={style:Ai(i),datum:null,_targetOpacity:0,_transitionKey:e};if(e.startsWith("p:"))this.exitNodes.push({...r,type:"point",x:i.x,y:i.y,r:i.r??3});else if(e.startsWith("r:"))this.exitNodes.push({...r,type:"rect",x:i.x,y:i.y,w:i.w??0,h:i.h??0,style:{...r.style,fill:"#999"}});else if(e.startsWith("w:")){let t=((i.startAngle??0)+(i.endAngle??0))/2,o={...r,type:"wedge",cx:i.x,cy:i.y,innerRadius:i.innerRadius??0,outerRadius:i.outerRadius??100,startAngle:i.startAngle??0,endAngle:i.endAngle??0,category:e.slice(2),_targetStartAngle:t,_targetEndAngle:t};this.exitNodes.push(o)}t=!0}this.exitNodes.length>0&&(this.scene=[...this.scene,...this.exitNodes]),t&&(this.activeTransition={startTime:this.currentTime(),duration:e})}advanceTransition(e){if(!this.activeTransition)return!1;let t=ki(e,this.activeTransition),o="linear"===this.config.transition?.easing?"linear":"ease-out-cubic",i=Si(t,o);for(let e of this.scene){let t=e._transitionKey;if(t)if("point"===e.type){if(void 0!==e._targetOpacity){let o=this.prevPositionMap.get(t),r=o?o.opacity??1:0;e.style.opacity=Ri(r,e._targetOpacity,i)}let o=this.prevPositionMap.get(t);void 0!==e._targetX&&o&&(e.x=Ri(o.x,e._targetX,i),e.y=Ri(o.y,e._targetY,i)),void 0!==e._targetR&&void 0!==o?.r&&(e.r=Ri(o.r,e._targetR,i))}else if("rect"===e.type){if(void 0!==e._targetOpacity){let o=this.prevPositionMap.get(t),r=o?o.opacity??1:0;e.style.opacity=Ri(r,e._targetOpacity,i)}if(void 0===e._targetX)continue;let o=this.prevPositionMap.get(t);if(!o)continue;e.x=Ri(o.x,e._targetX,i),e.y=Ri(o.y,e._targetY,i),void 0!==o.w&&(e.w=Ri(o.w,e._targetW,i),e.h=Ri(o.h,e._targetH,i))}else if("wedge"===e.type){if(void 0!==e._targetOpacity){let o=this.prevPositionMap.get(t),r=o?o.opacity??1:0;e.style={...e.style,opacity:Ri(r,e._targetOpacity,i)}}if(void 0!==e._targetStartAngle&&void 0!==e._targetEndAngle){let o=this.prevPositionMap.get(t);o&&void 0!==o.startAngle&&(e.startAngle=Ri(o.startAngle,e._targetStartAngle,i),e.endAngle=Ri(o.endAngle,e._targetEndAngle,i))}}}if(t>=1){for(let e of this.scene)if(void 0!==e._targetOpacity&&(e.style={...e.style||{},opacity:0===e._targetOpacity?0:e._targetOpacity},e._targetOpacity=void 0),"point"===e.type){if(void 0===e._targetX&&void 0===e._targetR)continue;void 0!==e._targetX&&(e.x=e._targetX,e.y=e._targetY),void 0!==e._targetR&&(e.r=e._targetR),e._targetX=void 0,e._targetY=void 0,e._targetR=void 0}else if("rect"===e.type){if(void 0===e._targetX)continue;e.x=e._targetX,e.y=e._targetY,e.w=e._targetW,e.h=e._targetH,e._targetX=void 0,e._targetY=void 0,e._targetW=void 0,e._targetH=void 0}else"wedge"===e.type&&void 0!==e._targetStartAngle&&(e.startAngle=e._targetStartAngle,e.endAngle=e._targetEndAngle,e._targetStartAngle=void 0,e._targetEndAngle=void 0);if(this.exitNodes.length>0){let e=new Set(this.exitNodes);this.scene=this.scene.filter(t=>!e.has(t)),this.exitNodes=[]}return this.activeTransition=null,!1}return!0}cancelIntroAnimation(){this.prevPositionMap.clear(),this.activeTransition=null,Se(this.scene),this.exitNodes=[]}getBufferArray(){return this._bufferArrayCache?.version!==this._dataVersion&&(this._bufferArrayCache={version:this._dataVersion,data:this.buffer.toArray()}),this._bufferArrayCache.data}getData(){return this.buffer.toArray()}remove(e){if(!this.getDataId)throw new Error("remove() requires dataIdAccessor to be configured");this.config.transition&&this.scene.length>0&&this.snapshotPositions();let t=Re(e),o=this.getDataId,i=e=>t.has(o(e));je(this.buffer,this.timestampBuffer,i);let r=this.buffer.remove(i);if(0===r.length)return this.updateResults.recordNoop("remove"),r;for(let e of r)this.evictValueExtent(e);return this.categories.clear(),this.buffer.forEach(e=>this.categories.add(this.getO(e))),this._dataVersion++,this.version++,this.lastIngestTime=this.currentTime(),this.updateResults.recordData("remove",r.length),r}update(e,t){if(!this.getDataId)throw new Error("update() requires dataIdAccessor to be configured");let o=Re(e),i=this.getDataId,r=new Set;this.buffer.forEach((e,t)=>{o.has(i(e))&&r.add(t)});let a=this.buffer.update(e=>o.has(i(e)),t);if(0===a.length)return this.updateResults.recordNoop("update"),a;for(let e of a)this.evictValueExtent(e);return this.categories.clear(),this.buffer.forEach((e,t)=>{this.categories.add(this.getO(e)),r.has(t)&&this.pushValueExtent(e)}),this._dataVersion++,this.version++,this.lastIngestTime=this.currentTime(),this.updateResults.recordData("update",a.length),a}clear(){this.buffer.clear(),this.rExtent.clear(),this.categories.clear(),this._hasStreamingData=!1,this._hasRenderedOnce=!1,this.timestampBuffer&&this.timestampBuffer.clear(),this.prevPositionMap.clear(),this.exitNodes=[],this.activeTransition=null,this.lastIngestTime=0,this.scales=null,this.scene=[],this.columns={},this.multiScales=[],this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this.lastCustomLayoutFailure=null,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,this._pointQuadtree=null,this._maxPointRadius=0,this.styleResolver.resetColors(),this._dataVersion++,this.version++,this.updateResults.recordData("clear")}get size(){return this.buffer.size}getOAccessor(){return this.getO}getRAccessor(){return this.getR}applyCustomRestyle(e,t){let o=this._customRestyle;if(o)for(let i of e){let e=this._baseStyles.get(i)??i.style??{},r=o(i,t);i.style=r?{...e,...r}:e}}restyleScene(e){this._customRestyle?(this.applyCustomRestyle(this.scene,e),this.markStylePaintPending(),this.updateResults.recordRestyle(!0)):this.updateResults.recordRestyle(!1)}rebuildAccessorDerivedState(){this.categories.clear(),this.rExtent.clear();for(let e of this.rExtents)e.clear();this._categoryIndexCache=null,this.buffer.forEach(e=>{this.categories.add(this.getO(e)),this.pushValueExtent(e)})}updateConfig(e){let t={...this.config},o=Object.keys(e).filter(o=>e[o]!==t[o]);"production"!==process.env.NODE_ENV&&!this.windowSizeWarned&&"windowSize"in e&&e.windowSize!==t.windowSize&&(this.windowSizeWarned=!0,console.warn(`[Semiotic] windowSize changed after mount (${t.windowSize} → ${e.windowSize}) but it is a mount-only setting — the ring buffer keeps its original capacity. Remount the chart (e.g. via a React key) to apply a new windowSize.`)),("colorScheme"in e&&e.colorScheme!==t.colorScheme||"themeCategorical"in e&&e.themeCategorical!==t.themeCategorical||"colorAccessor"in e&&!Ue(e.colorAccessor,t.colorAccessor))&&this.styleResolver.resetColors(),("categoryAccessor"in e&&!Ue(e.categoryAccessor,t.categoryAccessor)||"oAccessor"in e&&!Ue(e.oAccessor,t.oAccessor))&&(this._categoryIndexCache=null),Object.assign(this.config,e),"pulse"in e&&this.syncPulseTimestampBuffer();let i=!1;if("categoryAccessor"in e||"oAccessor"in e){let e=this.config.categoryAccessor||this.config.oAccessor,o=t.categoryAccessor||t.oAccessor;Ue(e,o)||(this.getO=Ze(this.config.categoryAccessor||this.config.oAccessor,"category"),i=!0)}let r=!1;if("valueAccessor"in e||"rAccessor"in e){let e=this.config.valueAccessor||this.config.rAccessor,o=t.valueAccessor||t.rAccessor,i=Array.isArray(e)?e:[e],a=Array.isArray(o)?o:[o];if(r=i.length!==a.length||i.some((e,t)=>!Ue(e,a[t])),r){let e=this.config.valueAccessor||this.config.rAccessor;Array.isArray(e)?(this.rAccessors=e.map(e=>Ke(e,"value")),this.getR=this.rAccessors[0],this.rExtents=e.map(()=>new ke)):(this.getR=Ke(e,"value"),this.rAccessors=[this.getR],this.rExtents=[this.rExtent])}}"stackBy"in e&&!Ue(e.stackBy,t.stackBy)&&(this.getStack=null!=this.config.stackBy?Ze(this.config.stackBy):void 0),"groupBy"in e&&!Ue(e.groupBy,t.groupBy)&&(this.getGroup=null!=this.config.groupBy?Ze(this.config.groupBy):void 0),"colorAccessor"in e&&!Ue(e.colorAccessor,t.colorAccessor)&&(this.getColor=null!=this.config.colorAccessor?Ze(this.config.colorAccessor):void 0),"symbolAccessor"in e&&!Ue(e.symbolAccessor,t.symbolAccessor)&&(this.getSymbol=null!=this.config.symbolAccessor?Ze(this.config.symbolAccessor):void 0),"connectorAccessor"in e&&!Ue(e.connectorAccessor,t.connectorAccessor)&&(this.getConnector=null!=this.config.connectorAccessor?Ze(this.config.connectorAccessor):void 0);let a="accessorRevision"in e&&e.accessorRevision!==t.accessorRevision;(i||r||a)&&this.rebuildAccessorDerivedState(),this.updateResults.recordConfig(o)}updateConfigWithResult(e){return this.updateConfig(e),this.updateResults.last}},v=null,b=null,x=(e,t)=>({x:e*Math.cos(t),y:e*Math.sin(t)}),w=(e,t,o,i)=>{let r=t.filter(e=>"wedge"===e.type),a=e.globalAlpha;for(let t of r){let o=t.style.fillOpacity??1,i=t.style.opacity??1,r=t.style.strokeWidth??1,n=t.style.stroke,l=!!(n&&"none"!==n&&r>0),s=a*i*(t.style.strokeOpacity??1);if(e.globalAlpha=a*o*i,t._gradientBand&&t._gradientBand.colors.length>0)Br(e,t,s),Ct(t)&&($r(e,t),_t(e,t,a)),e.globalAlpha=a;else{if(e.fillStyle=ri(e,t.style.fill,"#007bff"),t.roundedEnds){l&&(e.strokeStyle=ii(e,n)||n,e.lineWidth=r);let o=Tr({innerRadius:t.innerRadius,outerRadius:t.outerRadius,startAngle:t.startAngle,endAngle:t.endAngle,cornerRadius:t.cornerRadius,roundStart:t.roundedEnds.start,roundEnd:t.roundedEnds.end});e.save(),e.translate(t.cx,t.cy);let i=new Path2D(o);e.fill(i),l&&(e.globalAlpha=s,e.stroke(i)),e.restore()}else t.cornerRadius?(l&&(e.strokeStyle=ii(e,n)||n,e.lineWidth=r),Fr(e,t,s)):($r(e,t),e.fill(),l&&(e.strokeStyle=ii(e,n)||n,e.lineWidth=r,e.globalAlpha=s,e.stroke()));Ct(t)&&($r(e,t),_t(e,t,a)),e.globalAlpha=a}}},A=(e,t,o,i)=>{let r=t.filter(e=>"boxplot"===e.type),a=e.globalAlpha;for(let t of r){let o=t.columnWidth/2,i="vertical"===t.projection,r=ii(e,"var(--semiotic-primary, #007bff)"),n=ii(e,"var(--semiotic-text, #333)"),l=ri(e,t.style.fill,r),s=t.style.stroke,c="string"==typeof s?ii(e,s)||s:n,h=t.style.strokeWidth??1,u=h>0&&!("string"==typeof s&&"none"===s.trim().toLowerCase()),d=a*(t.style.opacity??1),g=d*(t.style.fillOpacity??.6),m=d*(t.style.strokeOpacity??1);if(e.save(),e.globalAlpha=m,u&&(e.strokeStyle=c,e.lineWidth=h,e.beginPath(),i?(e.moveTo(t.x,t.minPos),e.lineTo(t.x,t.maxPos)):(e.moveTo(t.minPos,t.y),e.lineTo(t.maxPos,t.y)),e.stroke(),e.beginPath(),i?(e.moveTo(t.x-.4*o,t.minPos),e.lineTo(t.x+.4*o,t.minPos),e.moveTo(t.x-.4*o,t.maxPos),e.lineTo(t.x+.4*o,t.maxPos)):(e.moveTo(t.minPos,t.y-.4*o),e.lineTo(t.minPos,t.y+.4*o),e.moveTo(t.maxPos,t.y-.4*o),e.lineTo(t.maxPos,t.y+.4*o)),e.stroke()),e.globalAlpha=g,e.fillStyle=l,i){let i=Math.min(t.q1Pos,t.q3Pos),r=Math.abs(t.q3Pos-t.q1Pos);e.fillRect(t.x-o,i,t.columnWidth,r),e.globalAlpha=m,u&&e.strokeRect(t.x-o,i,t.columnWidth,r)}else{let i=Math.min(t.q1Pos,t.q3Pos),r=Math.abs(t.q3Pos-t.q1Pos);e.fillRect(i,t.y-o,r,t.columnWidth),e.globalAlpha=m,u&&e.strokeRect(i,t.y-o,r,t.columnWidth)}u&&(e.strokeStyle=c,e.lineWidth=2*h,e.beginPath(),i?(e.moveTo(t.x-o,t.medianPos),e.lineTo(t.x+o,t.medianPos)):(e.moveTo(t.medianPos,t.y-o),e.lineTo(t.medianPos,t.y+o)),e.stroke()),e.restore()}},k=/*#__PURE__*/new WeakMap,S=(e,t,o,i)=>{let r=e.globalAlpha;for(let o of t){if("violin"!==o.type)continue;let t=r*(o.style.opacity??1),i=t*(o.style.strokeOpacity??1);e.save(),(o.translateX||o.translateY)&&e.translate(o.translateX,o.translateY);let a=k.get(o);(!a||a.source!==o.pathString)&&(a={source:o.pathString,path:new Path2D(o.pathString)},k.set(o,a));let n=a.path;e.globalAlpha=t*(o.style.fillOpacity??.6),e.fillStyle=ri(e,o.style.fill,"#007bff"),e.fill(n),e.globalAlpha=i;let l=o.style.strokeWidth??1;if(o.style.stroke&&"none"!==o.style.stroke&&l>0&&(e.strokeStyle=ii(e,o.style.stroke)||o.style.stroke,e.lineWidth=l,e.stroke(n)),o.iqrLine){e.strokeStyle="#333",e.lineWidth=2,e.globalAlpha=.8*i;let r=o.iqrLine.centerPos,a=!1!==o.iqrLine.isVertical;e.beginPath(),a?(e.moveTo(r,o.iqrLine.q1Pos),e.lineTo(r,o.iqrLine.q3Pos)):(e.moveTo(o.iqrLine.q1Pos,r),e.lineTo(o.iqrLine.q3Pos,r)),e.stroke(),e.beginPath(),a?e.arc(r,o.iqrLine.medianPos,3,0,2*Math.PI):e.arc(o.iqrLine.medianPos,r,3,0,2*Math.PI),e.fillStyle="#fff",e.globalAlpha=.8*t,e.fill(),e.strokeStyle="#333",e.lineWidth=1,e.globalAlpha=.8*i,e.stroke(),e.globalAlpha=i}e.restore()}},R=(e,t,o,i)=>{let r=t.filter(e=>"connector"===e.type);if(0===r.length)return;let a=e.globalAlpha,n=new Map;for(let e of r){let t=e.group||"_default";n.has(t)||n.set(t,[]),n.get(t).push(e)}for(let[,t]of n){if(0===t.length)continue;let o=t[0].style;if(o.fill&&"none"!==o.fill){e.beginPath(),e.moveTo(t[0].x1,t[0].y1);for(let o of t)e.lineTo(o.x2,o.y2);e.closePath(),e.globalAlpha=a*(o.opacity??1)*(o.fillOpacity??.3),e.fillStyle=ai(e,o.fill)??"#999",e.fill(),e.globalAlpha=a}for(let o of t){let t=o.style.strokeWidth??1;t<=0||"none"===o.style.stroke||(e.beginPath(),e.moveTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.strokeStyle=ii(e,o.style.stroke)||ri(e,o.style.fill,"")||ii(e,"var(--semiotic-border, #999)"),e.lineWidth=t,e.globalAlpha=a*(o.style.opacity??.5)*(o.style.strokeOpacity??1),e.stroke(),e.globalAlpha=a)}}},P=(e,t,o,i)=>{let r=t.filter(e=>"trapezoid"===e.type),a=e.globalAlpha;for(let t of r){let o=t.points;if(o.length<4)continue;let i=a*(t.style.opacity??1);e.globalAlpha=i*(t.style.fillOpacity??1),e.beginPath(),e.moveTo(o[0][0],o[0][1]);for(let t=1;t<o.length;t++)e.lineTo(o[t][0],o[t][1]);e.closePath();let r=ni(t.style?.fill)?void 0:ai(e,t.style?.fill)||"#999";r&&!ni(r)&&(e.fillStyle=r,e.fill());let n=t.style?.strokeWidth??1;t.style?.stroke&&"none"!==t.style.stroke&&n>0&&(e.globalAlpha=i*(t.style.strokeOpacity??1),e.strokeStyle=ii(e,t.style.stroke)||t.style.stroke,e.lineWidth=n,e.stroke()),e.globalAlpha=a}},C=(e,t,o,i)=>{let r=t.filter(e=>"rect"===e.type&&null!=e.datum);if(0===r.length||!r.some(e=>null!=e.datum?.__funnelStepLabel||null!=e.datum?.__funnelValueLabelX))return;let a=ii(e,"var(--semiotic-font-family, sans-serif)")||"sans-serif";e.textBaseline="top",e.lineJoin="round",e.textAlign="center",e.font=`bold 14px ${a}`;for(let t of r){let o=t.datum;if(!o||!o.__funnelStepLabel)continue;let i=o.__funnelStepLabel;if(e.measureText(i).width+16>(o.__funnelRowWidth??o.__funnelBarW??0))continue;let r=o.__funnelStepLabelX,a=o.__funnelStepLabelY+3;e.strokeStyle="rgba(0,0,0,0.6)",e.lineWidth=3,e.strokeText(i,r,a),e.fillStyle="#fff",e.fillText(i,r,a)}e.font=`bold 13px ${a}`;for(let t of r){let o=t.datum;if(!o||null==o.__funnelValueLabelX)continue;let i=o.__funnelBarW??0;if(i<60)continue;let r=o.__funnelValue;if(null==r||0===r)continue;let a,n=o.__funnelPercent,l=!0===o.__funnelIsFirstStep;if(a=l?Or(r):null!=n?`${Or(r)} (${Dr(n)})`:Or(r),e.measureText(a).width+16>i){if(l||null==n)continue;if(a=Or(r),e.measureText(a).width+16>i)continue}let s=o.__funnelValueLabelX,c=(o.__funnelValueLabelY??t.y)+14+5;e.textAlign="center",e.strokeStyle="rgba(0,0,0,0.5)",e.lineWidth=3,e.strokeText(a,s,c),e.fillStyle="#fff",e.fillText(a,s,c)}e.lineWidth=1,e.lineJoin="miter"},_={stroke:"rgba(255,255,255,0.5)",lineWidth:1.5,spacing:6,angle:45,lineOpacity:1},L=/*#__PURE__*/new Map,M=(e,t,o,i)=>{let r=t.filter(e=>"rect"===e.type&&!0===e.datum?.__barFunnelIsDropoff),a=e.globalAlpha;for(let t of r){let o=("string"==typeof t.style.fill?t.style.fill:null)||ii(e,"var(--semiotic-border, #999)"),i=Er(o,e),r=a*(t.style.opacity??1)*(t.style.fillOpacity??1);e.globalAlpha=r,e.beginPath(),e.rect(t.x,t.y,t.w,t.h),i?e.fillStyle=i:(e.fillStyle=o,e.globalAlpha=.4*r),e.fill(),e.globalAlpha=a}},I=(e,t,o,i)=>{let r=t.filter(e=>"rect"===e.type&&!0!==e.datum?.__barFunnelIsDropoff&&null!=e.datum?.__barFunnelLabelX);if(0===r.length)return;let a=ii(e,"var(--semiotic-font-family, sans-serif)")||"sans-serif",n=Nr(e,ii(e,"var(--semiotic-text, #333)")),l=n?"#1f2937":"#ffffff",s=n?"rgba(255,255,255,0.18)":"rgba(0,0,0,0.12)",c=n?"#f3f4f6":"#1a1a1a",h=c;for(let t of r){let o=t.datum;if(!o)continue;let i=o.__barFunnelValue;if(null==i||t.w<25)continue;let r=o.__barFunnelPercent,n=!(!0===o.__barFunnelIsFirstStep)&&null!=r,u=n?zr(r):"",d=jr(i);e.font=`bold 13px ${a}`;let g=n?e.measureText(u).width:0;e.font=`11px ${a}`;let m=e.measureText(d).width,p=Math.max(g,m)+12,y=n?32:17,f=o.__barFunnelLabelX,v=f-p/2,b=o.__barFunnelLabelY-y-4;e.save(),e.shadowColor="rgba(0,0,0,0.15)",e.shadowBlur=4,e.shadowOffsetY=1,e.fillStyle=l,e.beginPath(),Wr(e,v,b,p,y,4),e.fill(),e.restore(),e.strokeStyle=s,e.lineWidth=.5,e.beginPath(),Wr(e,v,b,p,y,4),e.stroke(),e.textAlign="center",e.textBaseline="top",n?(e.font=`bold 13px ${a}`,e.fillStyle=c,e.fillText(u,f,b+3),e.font=`11px ${a}`,e.fillStyle=h,e.fillText(d,f,b+3+13+2)):(e.font=`bold 11px ${a}`,e.fillStyle=c,e.fillText(d,f,b+3))}e.lineWidth=1},T=/*#__PURE__*/Gr(Ae),H=/*#__PURE__*/Gr(qe),B=/*#__PURE__*/Gr(Xe),$=/*#__PURE__*/Gr(Ye),F={bar:/*#__PURE__*/(o=e=>[R,...e])([T]),clusterbar:/*#__PURE__*/o([T]),point:/*#__PURE__*/o([H,B]),swarm:/*#__PURE__*/o([H,B]),pie:[w],donut:[w],boxplot:/*#__PURE__*/o([A,H]),violin:/*#__PURE__*/o([S]),histogram:/*#__PURE__*/o([T]),ridgeline:/*#__PURE__*/o([S]),timeline:/*#__PURE__*/o([T]),funnel:[T,P,C],"bar-funnel":[T,M,I],swimlane:/*#__PURE__*/o([T]),custom:/*#__PURE__*/o([T,H,B,$,w,A,S,P])},O=/*#__PURE__*/ea(),D=/*#__PURE__*/fi(function({hover:e}){let t=e.data||{},o=e.stats,i=e.category;if(Array.isArray(t)){let e=i||t[0]?.category||"";if(o)return O({category:e,stats:o});let r=t.length;return Ei("div",{className:"semiotic-tooltip",style:yi,children:[e&&Di("div",{style:{fontWeight:"bold"},children:String(e)}),Ei("div",{children:[r," items"]})]})}if(null!=t.bin&&null!=t.count){let e=t.range||[];return Ei("div",{className:"semiotic-tooltip",style:yi,children:[t.category&&Di("div",{style:{fontWeight:"bold"},children:String(t.category)}),Ei("div",{children:["Count: ",t.count]}),2===e.length&&Ei("div",{style:{opacity:.8},children:[Number(e[0]).toFixed(1)," – ",Number(e[1]).toFixed(1)]})]})}let r=e.__oAccessor,a=e.__rAccessor,n=e.__chartType;if("swarm"===n||"point"===n)return ta(t);let l=(r&&null!=t[r]?t[r]:null)||t.category||t.name||t.group||t.__rName||"",s=t.__aggregateValue??(a&&null!=t[a]?t[a]:null)??t.value??t.__rValue??t.pct??"";return l||""!==s?Ei("div",{className:"semiotic-tooltip",style:yi,children:[l&&Di("div",{style:{fontWeight:"bold"},children:String(l)}),""!==s&&Di("div",{children:"number"==typeof s?s.toLocaleString():String(s)})]}):ta(t)}),E=Qe,W=/*#__PURE__*/to(/*#__PURE__*/Bi(/*#__PURE__*/$i(function(e,t){let{chartType:o,runtimeMode:i,data:r,oAccessor:a="category",rAccessor:n="value",colorAccessor:l,symbolAccessor:s,symbolMap:c,stackBy:h,groupBy:u,multiAxis:d,timeAccessor:g,valueAccessor:m,categoryAccessor:p,accessorRevision:y,projection:v="vertical",size:b=[600,400],responsiveWidth:x,responsiveHeight:w,margin:A,maxDevicePixelRatio:k,barPadding:S,roundedTop:R,gradientFill:P,trackFill:C,baselinePadding:_,innerRadius:L,cornerRadius:M,normalize:I,startAngle:T,sweepAngle:H,dynamicColumnWidth:B,bins:$,showOutliers:O,showIQR:W,amplitude:N,connectorOpacity:j,showLabels:z,connectorAccessor:V,connectorStyle:G,dataIdAccessor:q,rExtent:X,oExtent:Y,extentPadding:Q=.05,oSort:Z,windowMode:K="sliding",windowSize:U=200,pieceStyle:J,summaryStyle:ee,renderMode:te,colorScheme:oe,barColors:ie,showAxes:re=!0,showCategoryTicks:ae,categoryLabel:ne,valueLabel:le,categoryFormat:se,valueFormat:ce,oLabel:he,rLabel:ue,oFormat:de,rFormat:ge,rTickValues:me,tickLabelEdgeAlign:pe,axisExtent:ye,enableHover:fe=!0,hoverRadius:ve=30,hoverAnnotation:be,tooltipContent:xe,customHoverBehavior:we,customClickBehavior:Ae,onObservation:ke,annotationObservationCallback:Se,chartId:Re,annotations:Pe,onAnnotationActivate:Te,autoPlaceAnnotations:Be,svgAnnotationRules:$e,showGrid:Fe=!1,legend:Oe,legendHoverBehavior:De,legendClickBehavior:Ee,legendHighlightedCategory:We,legendIsolatedCategories:Ne,legendPosition:je,legendLayout:qe,legendCategoryAccessor:Xe,onCategoriesChange:Ye,backgroundGraphics:Qe,foregroundGraphics:Ze,interactiveGraphics:Ke,interactiveGraphicsLabel:Ue,title:Je,className:et,background:tt,centerContent:ot,decay:it,pulse:rt,transition:at,animate:nt,staleness:lt,frameScheduler:st,clock:ct,random:ht,seed:ut,paused:dt=!1,suspendWhenHidden:At=!0,brush:kt,onBrush:St,accessibleTable:Rt=!0,description:Pt,summary:Ct,customLayout:_t,onLayoutError:Mt,layoutConfig:It,layoutSelection:Tt}=e,{customHoverBehavior:Ht,customClickBehavior:Bt,hasClickBehavior:$t}=ze({customHoverBehavior:we,customClickBehavior:Ae,onObservation:ke,chartId:Re,chartType:"StreamOrdinalFrame"}),Ft=p??a,Ot=m??n,Dt=ne??he,Et=le??ue,Wt=se??de,Nt=ce??ge,Vt=Ti(!0),Gt=oo({sizeProp:b,responsiveWidth:x,responsiveHeight:w,userMargin:A,marginDefault:E,title:Je,legend:Oe,legendPosition:je,...Ce(e,Oe),animate:nt,transitionProp:at,frameScheduler:st,clock:ct,random:ht,seed:ut,paused:dt,suspendWhenHidden:At,themeDirtyRef:Vt}),{reducedMotionRef:qt,responsiveRef:Xt,size:Yt,margin:Qt,adjustedWidth:Zt,adjustedHeight:Kt,currentTheme:Ut,transition:Jt,introEnabled:eo,tableId:to,rafRef:Po,renderFnRef:Co,scheduleRender:_o,frameRuntime:Lo}=Gt;Fi(()=>di(()=>{Vt.current=!0,_o()}),[_o]);let Mo=io(),Io=ro(),To=Ii(()=>ao(r),[r]),Ho=Ti(null),Bo=Ti(!1),[$o,Fo]=Oi(null),[Oo,Do]=Oi(null),Eo=gt(Ze,Yt,Qt,Oo),Wo=gt(Qe,Yt,Qt,Oo),No=Qe||"transparent"===tt?null:Di("rect",{className:"semiotic-canvas-background","data-semiotic-layer":"canvas-background",x:-Qt.left,y:-Qt.top,width:Yt[0],height:Yt[1],fill:tt||`var(--semiotic-bg, ${Ut.colors.background})`}),jo=Qe&&tt&&"transparent"!==tt?Di("rect",{className:"semiotic-canvas-background semiotic-canvas-background--combined","data-semiotic-layer":"canvas-background",x:-Qt.left,y:-Qt.top,width:Yt[0],height:Yt[1],fill:tt}):null,[zo,Vo]=Oi(0),Go=Ti(0),[qo,Xo]=Oi(!1),Yo=Ti({w:-1,h:-1}),Qo=Ti(!1),Zo=no("StreamOrdinalFrame"),Ko=fe||be,Uo="streaming"===i,Jo=Ii(()=>({chartType:o,runtimeMode:Uo?"streaming":"bounded",windowSize:U,windowMode:K,extentPadding:Q,projection:v,oAccessor:Uo?void 0:Ft,rAccessor:Uo?void 0:Ot,accessorRevision:y,colorAccessor:l,symbolAccessor:s,symbolMap:c,stackBy:h,groupBy:u,multiAxis:d,timeAccessor:Uo?g:void 0,valueAccessor:Uo?m||("string"==typeof Ot||"function"==typeof Ot?Ot:void 0):void 0,categoryAccessor:Uo?Ft:void 0,rExtent:X,oExtent:Y,axisExtent:ye,barPadding:S,roundedTop:R,gradientFill:He(P),trackFill:C,baselinePadding:_,innerRadius:L,cornerRadius:M,normalize:I,startAngle:T,sweepAngle:H,dynamicColumnWidth:B,bins:$,showOutliers:O,showIQR:W,amplitude:N,connectorOpacity:j,showLabels:z,connectorAccessor:V,connectorStyle:G,dataIdAccessor:q,oSort:Z,pieceStyle:J,summaryStyle:ee,colorScheme:oe,themeCategorical:Ut?.colors?.categorical,themeSemantic:vi(Ut),themeSequential:Ut?.colors?.sequential,themeDiverging:Ut?.colors?.diverging,barColors:ie,decay:it,pulse:rt,transition:Jt,introAnimation:eo,staleness:lt,clock:Lo.now,customLayout:_t,onLayoutError:Mt,layoutConfig:It,layoutMargin:Qt}),[o,Uo,U,K,Q,v,Ft,Ot,y,l,s,c,h,u,d,g,m,X,Y,ye,S,R,P,C,_,L,M,I,T,H,B,$,O,W,N,j,z,V,G,q,Z,J,ee,oe,Ut,ie,it,rt,Jt,eo,lt,Lo.now,_t,Mt,It,Qt]),ei=lo(Jo),ti=Ti(null);ti.current||(ti.current=new f(ei));let oi=mt(ti,Xe,Ye,e=>e.getData());pt(ti,ei,Vt,_o),yt(ti,Tt,Vt,_o);let ii=Ti(null);ii.current||(ii.current=new _e(e=>{let t=ti.current;t&&t.ingest(e)&&(Vt.current=!0,_o())})),ur(t,{storeRef:ti,adapterRef:ii,dirtyRef:Vt,scheduleRender:_o,hoverRef:Ho,setHoverPoint:Fo}),Fi(()=>{r&&ii.current?.setBoundedData(To)},[r,To]);let{canvasRef:ri,resolutionDirtyRef:ai}=so(Gt,{storeRef:ti,dirtyRef:Vt,hydrated:Mo,wasHydratingFromSSR:Io,cleanup:()=>ii.current?.clear(),maxDevicePixelRatio:k,canvasPaintDependencies:[o,Zt,Kt,re,tt,Qe,te,_o]}),{hoverHandlerRef:ni,hoverLeaveRef:li,onPointerMove:si,onPointerLeave:ci,flushPointerMove:hi,pointerStateRef:ui}=Gt;ni.current=e=>{let t=ri.current;if(!t)return;let i=ti.current;if(!i)return void co(t);let r=Cr({pointer:e,canvasRect:t.getBoundingClientRect(),margin:{left:Qt.left,top:Qt.top},width:Zt,height:Kt,projection:v,hoverRadius:ve,scene:i.scene,pointQuadtree:i.pointQuadtree,maxPointRadius:i.maxPointRadius});if(co(t,"hit"===r.kind?zt(r.hit.node):void 0),!Ko)return;if("hit"!==r.kind)return void(Ho.current&&(Ho.current=null,Fo(null),Ht&&Ht(null),_o()));let a=_r(r.hit,{oAccessor:Ft,rAccessor:Ot,chartType:o});Ho.current=a,Fo(a),Ht?.(a),_o()},li.current=()=>{co(ri.current),Ho.current&&(Ho.current=null,Fo(null),Ht?.(null),_o())},ho(ri);let gi=Li(e=>{if(uo(e.target)||!Bt)return;hi();let t=ri.current;if(!t)return Bt(null),void _o();let i=ti.current;if(!i)return Bt(null),void _o();let r=Cr({pointer:e,canvasRect:t.getBoundingClientRect(),margin:{left:Qt.left,top:Qt.top},width:Zt,height:Kt,projection:v,hoverRadius:ve,scene:i.scene,pointQuadtree:i.pointQuadtree,maxPointRadius:i.maxPointRadius});if("hit"!==r.kind)return Bt(null),void _o();Bt(_r(r.hit,{oAccessor:Ft,rAccessor:Ot,chartType:o}),{type:"activate",inputType:go(e.nativeEvent.pointerType)}),_o()},[Bt,ri,Qt.left,Qt.top,Zt,Kt,v,ve,Ft,Ot,o,_o,hi]),{kbFocusIndexRef:mi,focusedNavPointRef:pi,onKeyDown:yi,refreshKeyboardFocus:fi}=Ve({clearPointerHover:ci,storeRef:ti,hoverRef:Ho,setHoverPoint:Fo,customHoverBehavior:Ht,customClickBehavior:Bt,scheduleRender:_o,chartType:o,oAccessor:Ft,rAccessor:Ot}),wi=Li(e=>{ft(ui,e,!!Ko,Bo.current,ri.current,"mouse")&&(mi.current=-1,pi.current=null,si(e))},[ri,Ko,pi,mi,si,ui]);Co.current=()=>{if(Po.current=null,!Lo.isActive)return;let e=ri.current;if(!e)return;let t=e.getContext("2d");if(!t)return;let i=ti.current;if(!i)return;let r=Lo.now(),a=null!=i.activeTransition,n=i.advanceTransition(qt.current?r+1e6:r),l=!qt.current&&n,s=Yo.current.w!==Zt||Yo.current.h!==Kt,c=Vt.current,h=i.consumeStylePaintPending(),u=!1,d=Zo.current.beforeCompute(i.getLastUpdateResult(),l);var g;(c||s)&&(!l||s)&&(i.computeScene({width:Zt,height:Kt}),fi(),Yo.current={w:Zt,h:Kt},u=!0,oi()),(u||h)&&(Bo.current=mo(e,i.scene)),Bo.current&&(a||u||h)&&(g={canvas:e,pointer:ui.current,store:i,margin:{left:Qt.left,top:Qt.top},width:Zt,height:Kt,projection:v,hoverRadius:ve,geometryMoved:a||u},jt(g.canvas,g.pointer,e=>{let t=Cr({pointer:e,canvasRect:g.canvas.getBoundingClientRect(),margin:g.margin,width:g.width,height:g.height,projection:g.projection,hoverRadius:g.hoverRadius,scene:g.store.scene,pointQuadtree:g.geometryMoved?null:g.store.pointQuadtree,maxPointRadius:g.store.maxPointRadius});return"hit"===t.kind?zt(t.hit.node):void 0})),Zo.current.afterCompute(d,u,s),Vt.current=c&&l&&!u,ai.current=!1;let m=Ge(i,r,u,Qo);(u||a)&&e.setAttribute("aria-label",po(i.scene,o+" chart"));let p=yo(k,Yt),{effectiveDprX:y,effectiveDprY:f}=fo(e,Yt,p);t.setTransform(y,0,0,f,0,0),t.clearRect(0,0,Yt[0],Yt[1]);let b=lt?.threshold??5e3,x=lt&&i.lastIngestTime>0&&r-i.lastIngestTime>b;x&&(t.globalAlpha=lt?.dimOpacity??.5);let w="radial"===v;t.save(),t.beginPath(),t.rect(Qt.left,Qt.top,Zt,Kt),t.clip(),w?(t.save(),t.translate(Qt.left+Zt/2,Qt.top+Kt/2)):t.translate(Qt.left,Qt.top);let A=_t?F.custom:F[o]||[],S={width:Zt,height:Kt},R=i.scales;R&&vt({context:t,nodes:i.scene,renderMode:te,pixelRatio:p,paintBuiltIn:e=>{for(let o of A)o(t,e,R,S)}}),w&&t.restore(),t.restore(),x&&(t.globalAlpha=1),i.scales&&(u||a&&(!n||r-Go.current>=33))&&(u&&Do(i.scales),Vo(e=>e+1),Go.current=r),lt?.showBadge&&Xo(!!x),(l||null!=i.activeTransition||m.pending)&&_o()},bt(lt,ti,Vt,_o,Lo.now,qo,Xo);let Ai=Ko&&$o?xe?xe($o):Di(D,{hover:$o}):null,ki="radial"===v,Si=$o?ki?$o.x+Zt/2:$o.x:0,Ri=$o?ki?$o.y+Kt/2:$o.y:0,Pi=bi(Ai)?Di(vo,{contentOwnsChrome:xi(xe),x:Si,y:Ri,containerWidth:Zt,containerHeight:Kt,margin:Qt,className:"stream-ordinal-tooltip",children:Ai}):null,Ci="horizontal"===v?Ft:Ot,_i=Le("horizontal"===v?Ot:Ft,void 0,"__semiotic_resolvedO",""),Mi=Le(Ci,void 0,"__semiotic_resolvedR",""),Hi=_i.key,Bi=Mi.key,$i=Pe&&Pe.length>0||!1,Wi=Me(_i,Mi,$i);if(bo||!Mo&&Io){let e=ti.current;e&&r&&(e.ingest({inserts:To,bounded:!0}),e.computeScene({width:Zt,height:Kt}),e.cancelIntroAnimation());let t=e?.scene??[],i=e?.scales??null,a=gt(Ze,Yt,Qt,i),n=gt(Qe,Yt,Qt,i),l="radial"===v,s=l?Qt.left+Zt/2:Qt.left,c=l?Qt.top+Kt/2:Qt.top;return Ei("div",{ref:Xt,className:"stream-ordinal-frame"+(et?` ${et}`:""),role:"group","aria-label":Pt||("string"==typeof Je?Je:"Ordinal chart"),style:{position:"relative",fontFamily:"var(--semiotic-font-family, sans-serif)",width:x?"100%":Yt[0],height:w?"100%":Yt[1]},children:[Di(xo,{accessibleTable:Rt,scene:t,chartType:o+" chart",tableId:to,chartTitle:"string"==typeof Je?Je:void 0}),Di(wo,{summary:Ct}),Ei("div",{role:"img","aria-label":Pt||("string"==typeof Je?Je:"Ordinal chart"),children:[Ei("svg",{role:"presentation",xmlns:"http://www.w3.org/2000/svg",width:Yt[0],height:Yt[1],style:{position:"absolute",left:0,top:0},children:[Di("defs",{children:Di("clipPath",{id:`${to}-plot-clip`,children:Di("rect",{x:Qt.left,y:Qt.top,width:Zt,height:Kt})})}),Ei("g",{transform:`translate(${Qt.left},${Qt.top})`,children:[No,jo,n]}),Di("g",{clipPath:`url(#${to}-plot-clip)`,children:Di("g",{transform:`translate(${s},${c})`,children:Jr({nodes:t,renderMode:te,idPrefix:to}).map(e=>e.element)})})]}),Di(Mr,{decorative:!0,width:Zt,height:Kt,totalWidth:Yt[0],totalHeight:Yt[1],margin:Qt,scales:i,columns:e?.columns,showAxes:re,showCategoryTicks:ae,oLabel:Dt,rLabel:Et,oFormat:Wt,rFormat:Nt,rTickValues:me,tickLabelEdgeAlign:pe,axisExtent:ye,showGrid:Fe,title:Je,description:Pt,legend:Oe,legendHoverBehavior:De,legendClickBehavior:Ee,legendHighlightedCategory:We,legendIsolatedCategories:Ne,legendPosition:je,legendLayout:qe,foregroundGraphics:xt(a,Lt(ti.current?.customLayoutOverlays,Tt??null)),annotations:Pe,onAnnotationActivate:Te,onObservation:Se??ke,chartId:Re,chartType:"StreamOrdinalFrame",autoPlaceAnnotations:Be,svgAnnotationRules:$e,annotationFrame:0,xAccessor:Hi,yAccessor:Bi,annotationData:Wi(e?.getData())}),null!=ot&&"radial"===v&&Di(Yi,{content:ot,centerX:Qt.left+Zt/2,centerY:Qt.top+Kt/2,width:Yt[0],height:Yt[1]})]})]})}return Ei("div",{ref:Xt,className:"stream-ordinal-frame"+(et?` ${et}`:""),role:"group","aria-label":Pt||("string"==typeof Je?Je:"Ordinal chart"),tabIndex:0,style:{position:"relative",fontFamily:"var(--semiotic-font-family, sans-serif)",width:x?"100%":Yt[0],height:w?"100%":Yt[1],overflow:"visible"},onKeyDown:yi,children:["production"!==process.env.NODE_ENV&&ti.current&&Di(Ao,{store:ti.current,diagnostics:Zo.current}),Di(xo,{accessibleTable:Rt,sceneRevision:ti.current?.getUpdateSnapshot().revisions.accessibility,scene:ti.current?.scene??[],chartType:o+" chart",tableId:to,chartTitle:"string"==typeof Je?Je:void 0}),Di(wo,{summary:Ct}),Di(ko,{active:mi.current>=0,hoverPoint:$o,scene:ti.current?.scene}),Ei("div",{role:"img","aria-label":Pt||("string"==typeof Je?Je:"Ordinal chart"),style:{position:"relative",width:"100%",height:"100%"},onMouseMove:wi,onMouseLeave:ci,onClick:$t?gi:void 0,children:[Ei(So,{size:Yt,margin:Qt,children:[jo,No,Wo]}),Di(Lr,{width:Zt,height:Kt,totalWidth:Yt[0],totalHeight:Yt[1],margin:Qt,scales:Oo,showAxes:re,showGrid:Fe,rFormat:Nt,rTickValues:me,axisExtent:ye}),Di("canvas",{"aria-hidden":"true",ref:ri,"aria-label":po(ti.current?.scene??[],o+" chart"),style:{position:"absolute",top:0,left:0,width:Yt[0],height:Yt[1]}}),Di(Mr,{decorative:!0,width:Zt,height:Kt,totalWidth:Yt[0],totalHeight:Yt[1],margin:Qt,scales:Oo,columns:ti.current?.columns,showAxes:re,showCategoryTicks:ae,oLabel:Dt,rLabel:Et,oFormat:Wt,rFormat:Nt,rTickValues:me,axisExtent:ye,showGrid:Fe,title:Je,description:Pt,legend:Oe,legendHoverBehavior:De,legendClickBehavior:Ee,legendHighlightedCategory:We,legendIsolatedCategories:Ne,legendPosition:je,legendLayout:qe,foregroundGraphics:xt(Eo,Lt(ti.current?.customLayoutOverlays,Tt??null)),annotations:Pe,onAnnotationActivate:Te,onObservation:Se??ke,chartId:Re,chartType:"StreamOrdinalFrame",autoPlaceAnnotations:Be,svgAnnotationRules:$e,annotationFrame:zo,xAccessor:Hi,yAccessor:Bi,annotationData:Wi(ti.current?.getData()),underlayRendered:!0,canvasObscuresUnderlay:!1}),(kt||St)&&"radial"!==v&&Di(Ir,{width:Zt,height:Kt,totalWidth:Yt[0],totalHeight:Yt[1],margin:Qt,scales:Oo,onBrush:St||(()=>{})}),null!=ot&&"radial"===v&&Di(Yi,{content:ot,centerX:Qt.left+Zt/2,centerY:Qt.top+Kt/2,width:Yt[0],height:Yt[1]}),lt?.showBadge&&Di(wt,{isStale:qo,position:lt.badgePosition,state:lt.state,settling:lt.settling}),Di(Ro,{active:mi.current>=0,hoverPoint:$o,margin:Qt,size:Yt,shape:pi.current?.shape,width:pi.current?.w,height:pi.current?.h,pathData:pi.current?.pathData}),Pi]}),Di(Ie,{graphics:Ke,size:Yt,margin:Qt,scales:Oo,label:Ue})]})})),"StreamOrdinalFrame"),N=W,j=/*#__PURE__*/to(/*#__PURE__*/$i(function(e,t){let o=_o(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,categoryLabel:e.categoryLabel,valueLabel:e.valueLabel,showCategoryTicks:e.showCategoryTicks,orientation:e.orientation,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),i=Ti(null),{data:r,margin:a,className:n,categoryAccessor:l="category",valueAccessor:s="value",orientation:c="vertical",valueFormat:h,colorBy:u,colorScheme:d,sort:g=!1,barPadding:m=40,roundedTop:p,gradientFill:y=!1,styleRules:f,baselinePadding:v=!1,tooltip:b,annotations:x,regression:w,valueExtent:A,frameProps:k={},selection:S,linkedHover:R,linkedBrush:P,brush:C,onBrush:_,onObservation:L,onClick:M,hoverHighlight:I,chartId:T,loading:H,loadingContent:B,emptyContent:$,legendInteraction:F,legendPosition:O,color:D,stroke:E,strokeWidth:W,opacity:j,showCategoryTicks:z,categoryFormat:V,dataIdAccessor:G}=e,{width:q,height:X,enableHover:Y,showGrid:Q,showLegend:Z,title:K,description:U,summary:J,accessibleTable:ee,categoryLabel:te,valueLabel:oe}=o,ie=Ii(()=>ao(r),[r]),re=ve({responsive:e,data:ie,rawData:r,colorBy:u,colorScheme:d,legendInteraction:F,legendPosition:O,frameLegend:k,selection:S,linkedHover:R,fallbackFields:u?["string"==typeof u?u:""]:[],unwrapData:!0,onObservation:L,onClick:M,hoverHighlight:I,mobileInteraction:o.mobileInteraction,mobileSemantics:o.mobileSemantics,chartType:"BarChart",chartId:T,showLegend:Z,userMargin:a,marginDefaults:o.marginDefaults,loading:H,loadingContent:B,emptyContent:$,width:q,height:X,hasTitle:!!K,axisChrome:Bt({showAxes:o.showAxes,projection:"horizontal"===c?"horizontal":"vertical",hasCategoryLabel:!!te,hasValueLabel:!!oe})}),{effectiveLegendProps:ae,effectiveMargin:ne}=oa({ref:t,frameRef:i,setup:re});Lo("BarChart",ie,"categoryAccessor",l),Lo("BarChart",ie,"valueAccessor",s);let le=Mo(ie,g,s),se=Io(),ce=Ii(()=>new Map,[]),he=Ii(()=>To(s),[s]),ue=ra({brushProp:C,onBrushProp:_,linkedBrush:P,valueAccessor:s}),de=ia({colorBy:u,colorScale:re.colorScale,color:D,themeCategorical:se,colorScheme:d,categoryIndexMap:ce,userPieceStyle:k?.pieceStyle,stroke:E,strokeWidth:W,opacity:j,styleRules:f,resolveRuleValue:he,effectiveSelectionHook:re.effectiveSelectionHook,resolvedSelection:re.resolvedSelection}),ge=Ii(()=>kt({categoryAccessor:l,valueAccessor:s,groupAccessor:u&&u!==l?u:void 0,groupLabel:"string"==typeof u?u:"group",valueFormat:h}),[l,s,u,h]),me=Ii(()=>He(y),[y]);if(re.earlyReturn)return re.earlyReturn;let ye=fe({componentName:"BarChart",data:r,accessors:{categoryAccessor:l,valueAccessor:s}});if(ye)return Di(Ho,{componentName:"BarChart",message:ye,width:q,height:X});let be=pe(w),xe=be?[be,...x||[]]:x,we={chartType:"bar",...null!=r&&{data:le},oAccessor:l,rAccessor:s,projection:"horizontal"===c?"horizontal":"vertical",pieceStyle:de,size:[q,X],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:ne,barPadding:m,...null!=p&&{roundedTop:p},...me&&{gradientFill:me},...G&&{dataIdAccessor:G},baselinePadding:v,enableHover:Y,showAxes:o.showAxes,oLabel:te,rLabel:oe,rFormat:h,...V&&{oFormat:V},showGrid:Q,showCategoryTicks:z,oSort:g,...ae,...Pt({title:K,description:U,summary:J,accessibleTable:ee,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Rt({tooltip:b,defaultTooltipContent:ge}),...St({linkedHover:R,selection:S,onObservation:L,onClick:M,hoverHighlight:I,mobileInteraction:re.mobileInteraction,customHoverBehavior:re.customHoverBehavior,customClickBehavior:re.customClickBehavior}),...xe&&xe.length>0&&{annotations:xe},...A&&{rExtent:A},...ue.brushStreamProps,...Object.fromEntries(Object.entries(k).filter(([e])=>"pieceStyle"!==e))};return Di(Bo,{componentName:"BarChart",width:q,height:X,children:Di(N,{ref:i,...we})})}),"BarChart"),z=/*#__PURE__*/to(/*#__PURE__*/$i(function(e,t){let o=_o(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,categoryLabel:e.categoryLabel,valueLabel:e.valueLabel,showCategoryTicks:e.showCategoryTicks,orientation:e.orientation,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),i=Ti(null),{data:r,margin:a,className:n,categoryAccessor:l="category",stackBy:s,valueAccessor:c="value",orientation:h="vertical",valueFormat:u,colorBy:d,colorScheme:g,normalize:m=!1,sort:p=!1,barPadding:y=40,roundedTop:f,gradientFill:v,styleRules:b,baselinePadding:x=!1,tooltip:w,annotations:A,valueExtent:k,frameProps:S={},selection:R,linkedHover:P,linkedBrush:C,brush:_,onBrush:L,onObservation:M,onClick:I,hoverHighlight:T,chartId:H,loading:B,loadingContent:$,emptyContent:F,legendInteraction:O,legendPosition:D,color:E,stroke:W,strokeWidth:j,opacity:z,categoryFormat:V}=e,{width:G,height:q,enableHover:X,showGrid:Y,showLegend:Q,title:Z,description:K,summary:U,accessibleTable:J,categoryLabel:ee,valueLabel:te}=o,oe=Ii(()=>ao(r),[r]),ie=d||s,re=ve({responsive:e,data:oe,rawData:r,colorBy:ie,colorScheme:g,legendInteraction:O,legendPosition:D,frameLegend:S,selection:R,linkedHover:P,fallbackFields:ie?["string"==typeof ie?ie:""]:[],unwrapData:!0,onObservation:M,onClick:I,hoverHighlight:T,mobileInteraction:o.mobileInteraction,mobileSemantics:o.mobileSemantics,chartType:"StackedBarChart",chartId:H,showLegend:Q,userMargin:a,marginDefaults:o.marginDefaults,loading:B,loadingContent:$,emptyContent:F,width:G,height:q,hasTitle:!!Z,axisChrome:Bt({showAxes:o.showAxes,projection:"horizontal"===h?"horizontal":"vertical",hasCategoryLabel:!!ee,hasValueLabel:!!te})}),ae=Io(),ne=Ii(()=>new Map,[]),le=Ii(()=>To(c),[c]),se=ra({brushProp:_,onBrushProp:L,linkedBrush:C,valueAccessor:c}),ce=ia({colorBy:ie,colorScale:re.colorScale,color:E,themeCategorical:ae,colorScheme:g,categoryIndexMap:ne,userPieceStyle:S?.pieceStyle,stroke:W,strokeWidth:j,opacity:z,styleRules:b,resolveRuleValue:le,effectiveSelectionHook:re.effectiveSelectionHook,resolvedSelection:re.resolvedSelection}),he=Ii(()=>kt({categoryAccessor:s,valueAccessor:c,groupAccessor:l,valueFormat:u}),[s,l,c,u]),ue=fe({componentName:"StackedBarChart",data:r,accessors:{categoryAccessor:l,valueAccessor:c},requiredProps:{stackBy:s}}),{effectiveLegendProps:de,effectiveMargin:ge}=oa({ref:t,frameRef:i,setup:re}),me=Ii(()=>He(v),[v]);if(re.earlyReturn)return re.earlyReturn;let pe={chartType:"bar",...null!=r&&{data:oe},oAccessor:l,rAccessor:c,stackBy:s,normalize:m,oSort:p,projection:"horizontal"===h?"horizontal":"vertical",pieceStyle:ce,size:[G,q],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:ge,barPadding:y,...null!=f&&{roundedTop:f},...me&&{gradientFill:me},baselinePadding:x,enableHover:X,...e.dataIdAccessor&&{dataIdAccessor:e.dataIdAccessor},showAxes:o.showAxes,oLabel:ee,rLabel:te,rFormat:u,...V&&{oFormat:V},showGrid:Y,...de,...Pt({title:Z,description:K,summary:U,accessibleTable:J,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Rt({tooltip:w,defaultTooltipContent:he}),...St({linkedHover:P,selection:R,onObservation:M,onClick:I,hoverHighlight:T,mobileInteraction:re.mobileInteraction,customHoverBehavior:re.customHoverBehavior,customClickBehavior:re.customClickBehavior}),...A&&A.length>0&&{annotations:A},...k&&{rExtent:k},...se.brushStreamProps,...Object.fromEntries(Object.entries(S).filter(([e])=>"pieceStyle"!==e))};return ue?Di(Ho,{componentName:"StackedBarChart",message:ue,width:G,height:q}):Di(Bo,{componentName:"StackedBarChart",width:G,height:q,children:Di(N,{ref:i,...pe})})}),"StackedBarChart"),V={RdBu:ti,PiYG:ei,PRGn:Jo,BrBG:Uo,RdYlBu:Ko,RdYlGn:Zo,Spectral:Qo},G="__likert_neutral_neg",q="__likert_neutral_pos",X=["Very Low","Low","Neutral","High","Very High"],Y=/*#__PURE__*/new Map,Q=/*#__PURE__*/to(/*#__PURE__*/$i(function(e,t){let o=_o(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,categoryLabel:e.categoryLabel,valueLabel:e.valueLabel,showCategoryTicks:e.showCategoryTicks,orientation:e.orientation,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),i=Ti(null),{data:r,margin:a,className:n,categoryAccessor:l="question",valueAccessor:s,levelAccessor:c,countAccessor:h="count",levels:u=X,orientation:d="horizontal",colorScheme:g,barPadding:m=20,styleRules:p,tooltip:y,annotations:f,valueExtent:v,frameProps:b={},selection:x,linkedHover:w,onObservation:A,onClick:k,hoverHighlight:S,chartId:R,valueFormat:P,loading:C,loadingContent:_,emptyContent:L,legendInteraction:M,legendPosition:I,categoryFormat:T,stroke:H,strokeWidth:B,opacity:$}=e,{width:F,height:O,enableHover:D,showGrid:E,showLegend:W,title:j,description:z,summary:V,accessibleTable:Q,categoryLabel:Z,valueLabel:K}=o,U="horizontal"===d,J=void 0===r,ee=!c,te=$o(),oe=Ii(()=>g&&Array.isArray(g)&&g.length>=u.length?g:na(u.length,te),[g,u.length,te]),ie=Ii(()=>{let e=new Map;for(let t=0;t<u.length;t++)e.set(u[t],oe[t]||"#888");return e},[u,oe]),re=Ii(()=>{if(!1!==W)return{legendGroups:[{styleFn:e=>({fill:ie.get(e.label)||"#888"}),items:u.map(e=>({label:e})),label:""}]}},[W,u,ie]),ae=Ii(()=>Object.hasOwn(b,"legend")?b:{...b,legend:re},[b,re]),{processedData:ne,reAggregate:le,accumulatorRef:se}=ha({data:r,levels:u,categoryAccessor:l,valueAccessor:s,levelAccessor:c,countAccessor:h,isDiverging:U,frameRef:i}),ce="__likertLevelLabel",he=we({isPushMode:J,colorBy:ce,colorScheme:oe,showLegend:W,legendPosition:I}),{wrapPush:ue,wrapPushMany:de}=he,ge=Li(e=>ue(e=>{se.current.push(e),le(se.current)})(e),[ue,le,se]),me=Li(e=>de(e=>{se.current.push(...e),le(se.current)})(e),[de,le,se]);Mi(t,()=>({push:ge,pushMany:me,remove:e=>i.current?.remove(e)??[],update:(e,t)=>i.current?.update(e,t)??[],replace:e=>i.current?.replace(e),clear:()=>{se.current=[],he.resetCategories(),i.current?.clear()},getData:()=>i.current?.getData()??[],getScales:()=>i.current?.getScales()??null}),[ge,me,se,he]);let pe=ve({responsive:e,data:ne,rawData:r,colorBy:ce,colorScheme:oe,legendInteraction:M,legendPosition:I,frameLegend:ae,selection:x,linkedHover:w,fallbackFields:["__likertLevelLabel"],unwrapData:!0,onObservation:A,onClick:k,hoverHighlight:S,mobileInteraction:o.mobileInteraction,mobileSemantics:o.mobileSemantics,chartType:"LikertChart",chartId:R,showLegend:W,userMargin:a,marginDefaults:o.marginDefaults,loading:C,loadingContent:_,emptyContent:L,width:F,height:O,hasTitle:!!j,axisChrome:{hasAxis:!1!==o.showAxes,hasAxisLabel:U?!!K:!!Z}}),ye=Ii(()=>{let e=u.length;return e%2!=0&&ie.get(u[Math.floor(e/2)])||"#888"},[u,ie]),be=ia({colorBy:void 0,colorScale:void 0,color:void 0,themeCategorical:void 0,colorScheme:void 0,categoryIndexMap:Y,userPieceStyle:b?.pieceStyle,stroke:H,strokeWidth:B,opacity:$,effectiveSelectionHook:pe.effectiveSelectionHook,resolvedSelection:pe.resolvedSelection,styleRules:p,resolveRuleValue:ua,baseStyleExtras:e=>{let t=e.__likertLevelLabel||e.data?.__likertLevelLabel,o=e.__likertLevel||e.data?.__likertLevel;if(o===G||o===q)return{fill:ye};let i=t||o;return i&&ie.has(i)?{fill:ie.get(i)}:{fill:"#888"}}}),xe=Ii(()=>{let e=u.length;return e%2!=0?u[Math.floor(e/2)]:""},[u]),Ae=Ii(()=>e=>{let t=e.data||e,o=t.__likertLevel||"Unknown",i=o===G||o===q?xe:o,r=t.__likertCategory||"",a=Math.abs(t.__likertPct||0),n=o===G||o===q?2*a:a,l=t.__likertCount||0;return _i.createElement("div",{className:"semiotic-tooltip",style:yi},_i.createElement("div",{style:{fontWeight:"bold"}},r),_i.createElement("div",{style:{marginTop:4}},`${i}: ${n.toFixed(1)}% (n=${l})`))},[xe]),ke=Ii(()=>{if(!u||u.length<2)return"LikertChart requires `levels` with at least 2 entries.";if(s&&c)return"LikertChart: provide either `valueAccessor` (raw responses) or `levelAccessor` + `countAccessor` (pre-aggregated), not both.";if(c&&!h)return"LikertChart: pre-aggregated mode requires both `levelAccessor` and `countAccessor`.";if(void 0!==r&&0===r.length)return null;let e={categoryAccessor:l};return ee?s&&(e.valueAccessor=s):(c&&(e.levelAccessor=c),h&&(e.countAccessor=h)),fe({componentName:"LikertChart",data:r,accessors:e,requiredProps:{levels:u}})},[r,l,s,c,h,u,ee]),Se=pe.legendBehaviorProps,Re=Ii(()=>{let e={...pe.margin};if(J&&pe.legend){let t=pe.legendPosition;"bottom"===t&&e.bottom<80?e.bottom=80:"top"===t&&e.top<50?e.top=50:"right"===t&&e.right<110?e.right=110:"left"===t&&e.left<110&&(e.left=110)}else if(he.streamingMarginAdjust)for(let[t,o]of Object.entries(he.streamingMarginAdjust)){let i=t;e[i]<o&&(e[i]=o)}return U&&e.left<100&&(e.left=100),e},[pe.margin,pe.legend,pe.legendPosition,he.streamingMarginAdjust,U,J]),Pe=Ii(()=>P||(U?e=>`${Math.abs(Number(e)).toFixed(0)}%`:e=>`${Number(e).toFixed(0)}%`),[U,P]);if(pe.earlyReturn)return pe.earlyReturn;let Ce={chartType:"bar",...null!=r&&{data:ne},oAccessor:"__likertCategory",rAccessor:"__likertPct",stackBy:"__likertLevel",normalize:!1,projection:U?"horizontal":"vertical",pieceStyle:be,size:[F,O],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,maxDevicePixelRatio:e.maxDevicePixelRatio,margin:Re,barPadding:m,enableHover:D,...e.dataIdAccessor&&{dataIdAccessor:e.dataIdAccessor},showAxes:o.showAxes,oLabel:Z,rLabel:K||(U?void 0:"Percentage"),rFormat:Pe,...T&&{oFormat:T},showGrid:E,...Se,...j&&{title:j},...z&&{description:z},...V&&{summary:V},...void 0!==Q&&{accessibleTable:Q},...n&&{className:n},...null!=e.animate&&{animate:e.animate},...void 0!==e.axisExtent&&{axisExtent:e.axisExtent},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},tooltipContent:!1===y?()=>null:!0===y?Ae:Fo(y)||Ae,...St({linkedHover:w,selection:x,onObservation:A,onClick:k,hoverHighlight:S,mobileInteraction:pe.mobileInteraction,customHoverBehavior:pe.customHoverBehavior,customClickBehavior:pe.customClickBehavior}),...f&&f.length>0&&{annotations:f},...v&&{rExtent:v},...Object.fromEntries(Object.entries(b).filter(([e])=>"pieceStyle"!==e))};return ke?Di(Ho,{componentName:"LikertChart",message:ke,width:F,height:O}):Di(Bo,{componentName:"LikertChart",width:F,height:O,children:Di(N,{ref:i,...Ce})})}),"LikertChart"),Z=/*#__PURE__*/to(/*#__PURE__*/$i(function(e,t){let o=_o(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,categoryLabel:e.categoryLabel,valueLabel:e.valueLabel,showCategoryTicks:e.showCategoryTicks,orientation:e.orientation,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),i=Ti(null);be(t,{variant:"xy",frameRef:i});let{data:r,margin:a,className:n,categoryAccessor:l="category",valueAccessor:s="value",orientation:c="vertical",valueFormat:h,colorBy:u,colorScheme:d,styleRules:g,sizeBy:m,sizeRange:p=[3,8],symbolBy:y,symbolMap:f,pointRadius:v=4,pointOpacity:b=.7,categoryPadding:x=20,tooltip:w,annotations:A,valueExtent:k,brush:S,onBrush:R,linkedBrush:P,frameProps:C={},selection:_,linkedHover:L,onObservation:M,onClick:I,hoverHighlight:T,chartId:H,loading:B,loadingContent:$,emptyContent:F,legendInteraction:O,legendPosition:D,color:E,stroke:W,strokeWidth:j,opacity:z,showCategoryTicks:V,categoryFormat:G}=e,{width:q,height:X,enableHover:Y,showGrid:Q,showLegend:Z,title:K,description:U,summary:J,accessibleTable:ee,categoryLabel:te,valueLabel:oe}=o,ie=Ii(()=>ao(r),[r]),re=ve({responsive:e,data:ie,rawData:r,colorBy:u,colorScheme:d,legendInteraction:O,legendPosition:D,frameLegend:C,selection:_,linkedHover:L,fallbackFields:u?["string"==typeof u?u:""]:["string"==typeof l?l:""],unwrapData:!0,onObservation:M,onClick:I,hoverHighlight:T,mobileInteraction:o.mobileInteraction,mobileSemantics:o.mobileSemantics,chartType:"SwarmPlot",chartId:H,showLegend:Z,userMargin:a,marginDefaults:o.marginDefaults,loading:B,loadingContent:$,emptyContent:F,width:q,height:X,hasTitle:!!K,axisChrome:Bt({showAxes:o.showAxes,projection:"horizontal"===c?"horizontal":"vertical",hasCategoryLabel:!!te,hasValueLabel:!!oe})}),ae=ra({brushProp:S,onBrushProp:R,linkedBrush:P,valueAccessor:s}),ne=Ii(()=>{if(!m)return;let e=ie.map(e=>"function"==typeof m?m(e):e[m]);return Ci(e)},[ie,m]),le=Io(),se=Ii(()=>new Map,[]),ce=Ii(()=>To(s),[s]),he=ia({colorBy:u,colorScale:re.colorScale,color:E,themeCategorical:le,colorScheme:d,categoryIndexMap:se,userPieceStyle:C?.pieceStyle,stroke:W,strokeWidth:j,opacity:z,effectiveSelectionHook:re.effectiveSelectionHook,resolvedSelection:re.resolvedSelection,baseStyleExtras:e=>({fillOpacity:b,r:m?oi(e,m,p,ne):v}),styleRules:g,resolveRuleValue:ce}),ue=Ii(()=>kt({categoryAccessor:l,valueAccessor:s,groupAccessor:u||void 0,valueFormat:h}),[l,s,u,h]);if(re.earlyReturn)return re.earlyReturn;let de=fe({componentName:"SwarmPlot",data:r,accessors:{categoryAccessor:l,valueAccessor:s}});if(de)return Di(Ho,{componentName:"SwarmPlot",message:de,width:q,height:X});let ge={chartType:"swarm",...null!=r&&{data:ie},oAccessor:l,rAccessor:s,...y&&{symbolAccessor:y},...f&&{symbolMap:f},projection:"horizontal"===c?"horizontal":"vertical",pieceStyle:he,size:[q,X],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:re.margin,barPadding:x,enableHover:Y,...e.dataIdAccessor&&{dataIdAccessor:e.dataIdAccessor},showAxes:o.showAxes,oLabel:te,rLabel:oe,rFormat:h,...G&&{oFormat:G},showGrid:Q,showCategoryTicks:V,...re.legendBehaviorProps,...Pt({title:K,description:U,summary:J,accessibleTable:ee,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Rt({tooltip:w,defaultTooltipContent:ue}),...St({linkedHover:L,selection:_,onObservation:M,onClick:I,hoverHighlight:T,mobileInteraction:re.mobileInteraction,customHoverBehavior:re.customHoverBehavior,customClickBehavior:re.customClickBehavior}),...A&&A.length>0&&{annotations:A},...k&&{rExtent:k},...ae.brushStreamProps,...Object.fromEntries(Object.entries(C).filter(([e])=>"pieceStyle"!==e))};return Di(Bo,{componentName:"SwarmPlot",width:q,height:X,children:Di(N,{ref:i,...ge})})}),"SwarmPlot"),K=/*#__PURE__*/to(/*#__PURE__*/$i(function(e,t){let o=_o(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,categoryLabel:e.categoryLabel,valueLabel:e.valueLabel,showCategoryTicks:e.showCategoryTicks,orientation:e.orientation,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),i=Ti(null);be(t,{variant:"xy",frameRef:i});let{data:r,margin:a,className:n,categoryAccessor:l="category",valueAccessor:s="value",orientation:c="vertical",valueFormat:h,colorBy:u,colorScheme:d,styleRules:g,showOutliers:m=!0,outlierRadius:p=3,categoryPadding:y=20,tooltip:f,annotations:v,valueExtent:b,frameProps:x={},selection:w,linkedHover:A,onObservation:k,onClick:S,hoverHighlight:R,chartId:P,loading:C,loadingContent:_,emptyContent:L,legendInteraction:M,legendPosition:I,color:T,stroke:H,strokeWidth:B,opacity:$,showCategoryTicks:F,categoryFormat:O}=e,{width:D,height:E,enableHover:W,showGrid:j,showLegend:z,title:V,description:G,summary:q,accessibleTable:X,categoryLabel:Y,valueLabel:Q}=o,Z=Ii(()=>ao(r),[r]),K=ve({responsive:e,data:Z,rawData:r,colorBy:u,colorScheme:d,legendInteraction:M,legendPosition:I,frameLegend:x,selection:w,linkedHover:A,fallbackFields:u?["string"==typeof u?u:""]:["string"==typeof l?l:""],unwrapData:!0,onObservation:k,onClick:S,hoverHighlight:R,mobileInteraction:o.mobileInteraction,mobileSemantics:o.mobileSemantics,chartType:"BoxPlot",chartId:P,showLegend:z,userMargin:a,marginDefaults:o.marginDefaults,loading:C,loadingContent:_,emptyContent:L,width:D,height:E,hasTitle:!!V,axisChrome:Bt({showAxes:o.showAxes,projection:"horizontal"===c?"horizontal":"vertical",hasCategoryLabel:!!Y,hasValueLabel:!!Q})}),U=Io(),J=Ii(()=>new Map,[]),ee=Ii(()=>{let e=To(s);return t=>"number"==typeof t.median?t.median:e(t)},[s]),te=ia({colorBy:u,colorScale:K.colorScale,color:T,themeCategorical:U,colorScheme:d,categoryIndexMap:J,userPieceStyle:void 0,stroke:H,strokeWidth:B,opacity:$,effectiveSelectionHook:K.effectiveSelectionHook,resolvedSelection:K.resolvedSelection,baseStyleExtras:{fillOpacity:.8},linkStrokeToFill:!0,styleRules:g,resolveRuleValue:ee}),oe=Ii(()=>ea(),[]);if(K.earlyReturn)return K.earlyReturn;let ie=fe({componentName:"BoxPlot",data:r,accessors:{categoryAccessor:l,valueAccessor:s}});if(ie)return Di(Ho,{componentName:"BoxPlot",message:ie,width:D,height:E});let re={chartType:"boxplot",...null!=r&&{data:Z},oAccessor:l,rAccessor:s,projection:"horizontal"===c?"horizontal":"vertical",summaryStyle:te,showOutliers:m,size:[D,E],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:K.margin,barPadding:y,enableHover:W,...e.dataIdAccessor&&{dataIdAccessor:e.dataIdAccessor},showAxes:o.showAxes,oLabel:Y,rLabel:Q,rFormat:h,...O&&{oFormat:O},showGrid:j,showCategoryTicks:F,...K.legendBehaviorProps,...Pt({title:V,description:G,summary:q,accessibleTable:X,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Rt({tooltip:f,defaultTooltipContent:oe}),...St({linkedHover:A,selection:w,onObservation:k,onClick:S,hoverHighlight:R,mobileInteraction:K.mobileInteraction,customHoverBehavior:K.customHoverBehavior,customClickBehavior:K.customClickBehavior}),...v&&v.length>0&&{annotations:v},...b&&{rExtent:b},...Object.fromEntries(Object.entries(x).filter(([e])=>"pieceStyle"!==e))};return Di(Bo,{componentName:"BoxPlot",width:D,height:E,children:Di(N,{ref:i,...re})})}),"BoxPlot"),U=e=>{let t=e?.category;return null==t?"All":String(t)},J=/*#__PURE__*/to(/*#__PURE__*/$i(function(e,t){let o=_o(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,categoryLabel:e.categoryLabel,valueLabel:e.valueLabel,showCategoryTicks:e.showCategoryTicks,orientation:"horizontal",mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),i=Ti(null);be(t,{variant:"xy",frameRef:i});let{data:r,margin:a,className:n,categoryAccessor:l=U,valueAccessor:s="value",bins:c=25,relative:h=!1,valueFormat:u,colorBy:d,colorScheme:g,styleRules:m,categoryPadding:p=("sparkline"===o.mode?0:20),tooltip:y,annotations:f,valueExtent:v,brush:b,onBrush:x,linkedBrush:w,frameProps:A={},selection:k,linkedHover:S,onObservation:R,onClick:P,hoverHighlight:C,chartId:_,loading:L,loadingContent:M,emptyContent:I,legendInteraction:T,legendPosition:H,color:B,stroke:$,strokeWidth:F,opacity:O,showCategoryTicks:D,categoryFormat:E}=e,{width:W,height:j,enableHover:z,showGrid:V,showLegend:G,title:q,description:X,summary:Y,accessibleTable:Q,categoryLabel:Z,valueLabel:K}=o,J=Ii(()=>ao(r),[r]),ee=ve({responsive:e,data:J,rawData:r,colorBy:d,colorScheme:g,legendInteraction:T,legendPosition:H,frameLegend:A,selection:k,linkedHover:S,fallbackFields:d?["string"==typeof d?d:""]:["string"==typeof l?l:""],unwrapData:!0,onObservation:R,onClick:P,hoverHighlight:C,mobileInteraction:o.mobileInteraction,mobileSemantics:o.mobileSemantics,chartType:"Histogram",chartId:_,showLegend:G,userMargin:a,marginDefaults:o.marginDefaults,loading:L,loadingContent:M,emptyContent:I,width:W,height:j,hasTitle:!!q,axisChrome:Bt({showAxes:o.showAxes,projection:"horizontal",hasCategoryLabel:!!Z,hasValueLabel:!!K})}),te=ra({brushProp:b,onBrushProp:x,linkedBrush:w,valueAccessor:s}),oe=Ii(()=>{if(0===J.length)return;let e="function"==typeof s?s:e=>e[s],t=1/0,o=-1/0;for(let i of J){let r=e(i);null!=r&&isFinite(r)&&(r<t&&(t=r),r>o&&(o=r))}return t<=o?[t,o]:void 0},[J,s]),ie=Io(),re=Ii(()=>new Map,[]),ae=Ii(()=>{let e=To(s);return t=>"number"==typeof t.count?t.count:e(t)},[s]),ne=ia({colorBy:d,colorScale:ee.colorScale,color:B,themeCategorical:ie,colorScheme:g,categoryIndexMap:re,userPieceStyle:void 0,stroke:$,strokeWidth:F,opacity:O,effectiveSelectionHook:ee.effectiveSelectionHook,resolvedSelection:ee.resolvedSelection,baseStyleExtras:{fillOpacity:.8},linkStrokeToFill:!0,styleRules:m,resolveRuleValue:ae}),le=Ii(()=>e=>{let t=e.data||e,o=t.category||e.category||"",i=t.count,r=t.range;return Ei("div",{className:"semiotic-tooltip",style:yi,children:[o&&Di("div",{style:{fontWeight:"bold"},children:String(o)}),null!=i&&Ei("div",{children:["Count: ",i]}),r&&2===r.length&&Ei("div",{style:{opacity:.8},children:[Number(r[0]).toFixed(1)," – ",Number(r[1]).toFixed(1)]})]})},[]);if(ee.earlyReturn)return ee.earlyReturn;let se=fe({componentName:"Histogram",data:r,accessors:{categoryAccessor:l,valueAccessor:s}});if(se)return Di(Ho,{componentName:"Histogram",message:se,width:W,height:j});let ce={chartType:"histogram",...null!=r&&{data:J},oAccessor:l,rAccessor:s,projection:"horizontal",summaryStyle:ne,bins:c,normalize:h,...v?{rExtent:v}:oe&&{rExtent:oe},size:[W,j],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:ee.margin,barPadding:p,enableHover:z,...e.dataIdAccessor&&{dataIdAccessor:e.dataIdAccessor},showAxes:o.showAxes,oLabel:Z,rLabel:K,rFormat:u,...E&&{oFormat:E},showGrid:V,showCategoryTicks:D,...ee.legendBehaviorProps,...Pt({title:q,description:X,summary:Y,accessibleTable:Q,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Rt({tooltip:y,defaultTooltipContent:le}),...St({linkedHover:S,selection:k,onObservation:R,onClick:P,hoverHighlight:C,mobileInteraction:ee.mobileInteraction,customHoverBehavior:ee.customHoverBehavior,customClickBehavior:ee.customClickBehavior}),...f&&f.length>0&&{annotations:f},...te.brushStreamProps,...Object.fromEntries(Object.entries(A).filter(([e])=>"pieceStyle"!==e))};return Di(Bo,{componentName:"Histogram",width:W,height:j,children:Di(N,{ref:i,...ce})})}),"Histogram"),ee=/*#__PURE__*/to(/*#__PURE__*/$i(function(e,t){let o=_o(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,categoryLabel:e.categoryLabel,valueLabel:e.valueLabel,showCategoryTicks:e.showCategoryTicks,orientation:e.orientation,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),i=Ti(null);be(t,{variant:"xy",frameRef:i});let{data:r,margin:a,className:n,categoryAccessor:l="category",valueAccessor:s="value",orientation:c="vertical",bins:h=25,curve:u="catmullRom",showIQR:d=!0,valueFormat:g,colorBy:m,colorScheme:p,styleRules:y,categoryPadding:f=20,tooltip:v,annotations:b,valueExtent:x,brush:w,onBrush:A,linkedBrush:k,frameProps:S={},selection:R,linkedHover:P,onObservation:C,onClick:_,hoverHighlight:L,chartId:M,loading:I,loadingContent:T,emptyContent:H,legendInteraction:B,legendPosition:$,color:F,stroke:O,strokeWidth:D,opacity:E,showCategoryTicks:W,categoryFormat:j}=e,{width:z,height:V,enableHover:G,showGrid:q,showLegend:X,title:Y,description:Q,summary:Z,accessibleTable:K,categoryLabel:U,valueLabel:J}=o,ee=Ii(()=>ao(r),[r]),te=ve({responsive:e,data:ee,rawData:r,colorBy:m,colorScheme:p,legendInteraction:B,legendPosition:$,frameLegend:S,selection:R,linkedHover:P,fallbackFields:m?["string"==typeof m?m:""]:["string"==typeof l?l:""],unwrapData:!0,onObservation:C,onClick:_,hoverHighlight:L,mobileInteraction:o.mobileInteraction,mobileSemantics:o.mobileSemantics,chartType:"ViolinPlot",chartId:M,showLegend:X,userMargin:a,marginDefaults:o.marginDefaults,loading:I,loadingContent:T,emptyContent:H,width:z,height:V,hasTitle:!!Y,axisChrome:Bt({showAxes:o.showAxes,projection:"horizontal"===c?"horizontal":"vertical",hasCategoryLabel:!!U,hasValueLabel:!!J})}),oe=ra({brushProp:w,onBrushProp:A,linkedBrush:k,valueAccessor:s}),ie=Io(),re=Ii(()=>new Map,[]),ae=Ii(()=>{let e=To(s);return t=>"number"==typeof t.median?t.median:e(t)},[s]),ne=ia({colorBy:m,colorScale:te.colorScale,color:F,themeCategorical:ie,colorScheme:p,categoryIndexMap:re,userPieceStyle:void 0,stroke:O,strokeWidth:D,opacity:E,effectiveSelectionHook:te.effectiveSelectionHook,resolvedSelection:te.resolvedSelection,baseStyleExtras:{fillOpacity:.6},linkStrokeToFill:!0,styleRules:y,resolveRuleValue:ae}),le=Ii(()=>ea({valueAccessor:s}),[s]);if(te.earlyReturn)return te.earlyReturn;let se=fe({componentName:"ViolinPlot",data:r,accessors:{categoryAccessor:l,valueAccessor:s}});if(se)return Di(Ho,{componentName:"ViolinPlot",message:se,width:z,height:V});let ce={chartType:"violin",...null!=r&&{data:ee},oAccessor:l,rAccessor:s,projection:"horizontal"===c?"horizontal":"vertical",summaryStyle:ne,bins:h,showIQR:d,size:[z,V],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:te.margin,barPadding:f,enableHover:G,...e.dataIdAccessor&&{dataIdAccessor:e.dataIdAccessor},showAxes:o.showAxes,oLabel:U,rLabel:J,rFormat:g,...j&&{oFormat:j},showGrid:q,showCategoryTicks:W,...te.legendBehaviorProps,...Pt({title:Y,description:Q,summary:Z,accessibleTable:K,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Rt({tooltip:v,defaultTooltipContent:le}),...St({linkedHover:P,selection:R,onObservation:C,onClick:_,hoverHighlight:L,mobileInteraction:te.mobileInteraction,customHoverBehavior:te.customHoverBehavior,customClickBehavior:te.customClickBehavior}),...b&&b.length>0&&{annotations:b},...x&&{rExtent:x},...oe.brushStreamProps,...Object.fromEntries(Object.entries(S).filter(([e])=>"pieceStyle"!==e))};return Di(Bo,{componentName:"ViolinPlot",width:z,height:V,children:Di(N,{ref:i,...ce})})}),"ViolinPlot"),te=/*#__PURE__*/to(/*#__PURE__*/$i(function(e,t){let o=_o(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,categoryLabel:e.categoryLabel,valueLabel:e.valueLabel,showCategoryTicks:e.showCategoryTicks,orientation:e.orientation,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),i=Ti(null);be(t,{variant:"xy",frameRef:i});let{data:r,margin:a,className:n,categoryAccessor:l="category",valueAccessor:s="value",orientation:c="horizontal",bins:h=20,amplitude:u=1.5,valueFormat:d,colorBy:g,colorScheme:m,styleRules:p,categoryPadding:y=5,tooltip:f,annotations:v,valueExtent:b,frameProps:x={},selection:w,linkedHover:A,onObservation:k,onClick:S,hoverHighlight:R,chartId:P,loading:C,loadingContent:_,emptyContent:L,legendInteraction:M,legendPosition:I,color:T,stroke:H,strokeWidth:B,opacity:$,showCategoryTicks:F,categoryFormat:O}=e,{width:D,height:E,enableHover:W,showGrid:j,showLegend:z,title:V,description:G,summary:q,accessibleTable:X,categoryLabel:Y,valueLabel:Q}=o,Z=Ii(()=>ao(r),[r]),K=ve({responsive:e,data:Z,rawData:r,colorBy:g,colorScheme:m,legendInteraction:M,legendPosition:I,frameLegend:x,selection:w,linkedHover:A,fallbackFields:g?["string"==typeof g?g:""]:["string"==typeof l?l:""],unwrapData:!0,onObservation:k,onClick:S,hoverHighlight:R,mobileInteraction:o.mobileInteraction,mobileSemantics:o.mobileSemantics,chartType:"RidgelinePlot",chartId:P,showLegend:z,userMargin:a,marginDefaults:o.marginDefaults,loading:C,loadingContent:_,emptyContent:L,width:D,height:E,hasTitle:!!V,axisChrome:Bt({showAxes:o.showAxes,projection:"horizontal"===c?"horizontal":"vertical",hasCategoryLabel:!!Y,hasValueLabel:!!Q})}),U=Io(),J=Ii(()=>new Map,[]),ee=Ii(()=>{let e=To(s);return t=>"number"==typeof t.median?t.median:e(t)},[s]),te=ia({colorBy:g,colorScale:K.colorScale,color:T,themeCategorical:U,colorScheme:m,categoryIndexMap:J,userPieceStyle:void 0,stroke:H,strokeWidth:B,opacity:$,effectiveSelectionHook:K.effectiveSelectionHook,resolvedSelection:K.resolvedSelection,baseStyleExtras:{fillOpacity:.5},linkStrokeToFill:!0,styleRules:p,resolveRuleValue:ee}),oe=Ii(()=>ea(),[]);if(K.earlyReturn)return K.earlyReturn;let ie=fe({componentName:"RidgelinePlot",data:r,accessors:{categoryAccessor:l,valueAccessor:s}});if(ie)return Di(Ho,{componentName:"RidgelinePlot",message:ie,width:D,height:E});let re={chartType:"ridgeline",...null!=r&&{data:Z},oAccessor:l,rAccessor:s,projection:"horizontal"===c?"horizontal":"vertical",summaryStyle:te,bins:h,size:[D,E],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:K.margin,barPadding:y,enableHover:W,...e.dataIdAccessor&&{dataIdAccessor:e.dataIdAccessor},showAxes:o.showAxes,oLabel:Y,rLabel:Q,rFormat:d,...O&&{oFormat:O},showGrid:j,showCategoryTicks:F,oSort:!1,amplitude:u,...K.legendBehaviorProps,...Pt({title:V,description:G,summary:q,accessibleTable:X,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Rt({tooltip:f,defaultTooltipContent:oe}),...St({linkedHover:A,selection:w,onObservation:k,onClick:S,hoverHighlight:R,mobileInteraction:K.mobileInteraction,customHoverBehavior:K.customHoverBehavior,customClickBehavior:K.customClickBehavior}),...v&&v.length>0&&{annotations:v},...b&&{rExtent:b},...Object.fromEntries(Object.entries(x).filter(([e])=>"pieceStyle"!==e))};return Di(Bo,{componentName:"RidgelinePlot",width:D,height:E,children:Di(N,{ref:i,...re})})}),"RidgelinePlot"),oe=/*#__PURE__*/to(/*#__PURE__*/$i(function(e,t){let o=_o(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid??!0,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,categoryLabel:e.categoryLabel,valueLabel:e.valueLabel,showCategoryTicks:e.showCategoryTicks,orientation:e.orientation,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),i=Ti(null);be(t,{variant:"xy",frameRef:i});let{data:r,margin:a,className:n,categoryAccessor:l="category",valueAccessor:s="value",orientation:c="horizontal",valueFormat:h,colorBy:u,colorScheme:d,styleRules:g,sort:m="auto",dotRadius:p=5,categoryPadding:y=10,tooltip:f,annotations:v,regression:b,valueExtent:x,frameProps:w={},selection:A,linkedHover:k,onObservation:S,onClick:R,hoverHighlight:P,chartId:C,loading:_,loadingContent:L,emptyContent:M,legendInteraction:I,legendPosition:T,color:H,stroke:B,strokeWidth:$,opacity:F,categoryFormat:O}=e,{width:D,height:E,enableHover:W,showGrid:j,showLegend:z,title:V,description:G,summary:q,accessibleTable:X,categoryLabel:Y,valueLabel:Q}=o,Z=Ii(()=>ao(r),[r]),K=ve({responsive:e,data:Z,rawData:r,colorBy:u,colorScheme:d,legendInteraction:I,legendPosition:T,frameLegend:w,selection:A,linkedHover:k,fallbackFields:u?["string"==typeof u?u:""]:["string"==typeof l?l:""],unwrapData:!0,onObservation:S,onClick:R,hoverHighlight:P,mobileInteraction:o.mobileInteraction,mobileSemantics:o.mobileSemantics,chartType:"DotPlot",chartId:C,showLegend:z,userMargin:a,marginDefaults:o.marginDefaults,loading:_,loadingContent:L,emptyContent:M,width:D,height:E,hasTitle:!!V,axisChrome:Bt({showAxes:o.showAxes,projection:"horizontal"===c?"horizontal":"vertical",hasCategoryLabel:!!Y,hasValueLabel:!!Q})}),U=Mo(Z,m,s),J=Io(),ee=Ii(()=>new Map,[]),te=Ii(()=>To(s),[s]),oe=ia({colorBy:u,colorScale:K.colorScale,color:H,themeCategorical:J,colorScheme:d,categoryIndexMap:ee,userPieceStyle:w?.pieceStyle,stroke:B,strokeWidth:$,opacity:F,effectiveSelectionHook:K.effectiveSelectionHook,resolvedSelection:K.resolvedSelection,baseStyleExtras:{r:p,fillOpacity:.8},styleRules:g,resolveRuleValue:te}),ie=Ii(()=>kt({categoryAccessor:l,valueAccessor:s,valueFormat:h}),[l,s,h]);if(K.earlyReturn)return K.earlyReturn;let re=fe({componentName:"DotPlot",data:r,accessors:{categoryAccessor:l,valueAccessor:s}});if(re)return Di(Ho,{componentName:"DotPlot",message:re,width:D,height:E});let ae=pe(b),ne=ae?[ae,...v||[]]:v,le={chartType:"point",...null!=r&&{data:U},oAccessor:l,rAccessor:s,projection:"horizontal"===c?"horizontal":"vertical",pieceStyle:oe,size:[D,E],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:K.margin,barPadding:y,enableHover:W,...e.dataIdAccessor&&{dataIdAccessor:e.dataIdAccessor},showAxes:o.showAxes,oLabel:Y,rLabel:Q,rFormat:h,...O&&{oFormat:O},showGrid:j,oSort:m,...K.legendBehaviorProps,...Pt({title:V,description:G,summary:q,accessibleTable:X,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Rt({tooltip:f,defaultTooltipContent:ie}),...St({linkedHover:k,selection:A,onObservation:S,onClick:R,hoverHighlight:P,mobileInteraction:K.mobileInteraction,customHoverBehavior:K.customHoverBehavior,customClickBehavior:K.customClickBehavior}),...ne&&ne.length>0&&{annotations:ne},...x&&{rExtent:x},...Object.fromEntries(Object.entries(w).filter(([e])=>"pieceStyle"!==e))};return Di(Bo,{componentName:"DotPlot",width:D,height:E,children:Di(N,{ref:i,...le})})}),"DotPlot"),ie={width:400,height:400},re={width:400,height:400},ae={width:300,height:250},ne=/*#__PURE__*/to(/*#__PURE__*/$i(function(e,t){let o=_o(e.mode,{width:e.width,height:e.height,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,showCategoryTicks:e.showCategoryTicks,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules},ie),i=Ti(null),{data:r,margin:a,className:n,categoryAccessor:l="category",valueAccessor:s="value",colorBy:c,colorScheme:h,styleRules:u,startAngle:d=0,cornerRadius:g,valueFormat:m,tooltip:p,annotations:y,frameProps:f={},selection:v,linkedHover:b,onObservation:x,onClick:w,hoverHighlight:A,chartId:k,loading:S,loadingContent:R,emptyContent:P,legendInteraction:C,legendPosition:_,color:L,stroke:M,strokeWidth:I,opacity:T}=e,{width:H,height:B,enableHover:$,showLegend:F,title:O,description:D,summary:E,accessibleTable:W}=o,j=Ii(()=>ao(r),[r]),z=c||l,V=ve({responsive:e,data:j,rawData:r,colorBy:z,colorScheme:h,legendInteraction:C,legendPosition:_,frameLegend:f,selection:v,linkedHover:b,fallbackFields:z?["string"==typeof z?z:""]:[],unwrapData:!0,onObservation:x,onClick:w,hoverHighlight:A,mobileInteraction:o.mobileInteraction,mobileSemantics:o.mobileSemantics,chartType:"PieChart",chartId:k,showLegend:F,userMargin:a,marginDefaults:o.marginDefaults,loading:S,loadingContent:R,emptyContent:P,width:H,height:B,hasTitle:!!O,axisChrome:{hasAxis:!1}}),G=Io(),q=Ii(()=>new Map,[]),X=Ii(()=>{let e=To(s);return t=>{let o=e(t);return null==o?void 0:Math.abs(o)}},[s]),Y=ia({colorBy:z,colorScale:V.colorScale,color:L,themeCategorical:G,colorScheme:h,categoryIndexMap:q,userPieceStyle:f?.pieceStyle,stroke:M,strokeWidth:I,opacity:T,effectiveSelectionHook:V.effectiveSelectionHook,resolvedSelection:V.resolvedSelection,cycleByCategory:!0,styleRules:u,resolveRuleValue:X}),Q=Ii(()=>kt({categoryAccessor:l,valueAccessor:s,groupAccessor:c&&c!==l?c:void 0,groupLabel:"string"==typeof c?c:"group",pieData:!0,valueFormat:m}),[l,s,c,m]),Z=fe({componentName:"PieChart",data:r,accessors:{categoryAccessor:l,valueAccessor:s}}),{effectiveLegendProps:K,effectiveMargin:U}=oa({ref:t,frameRef:i,setup:V});if(V.earlyReturn)return V.earlyReturn;let J={chartType:"pie",...null!=r&&{data:j},oAccessor:l,rAccessor:s,projection:"radial",pieceStyle:Y,startAngle:d,...null!=g&&{cornerRadius:g},size:[H,B],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:U,enableHover:$,...e.dataIdAccessor&&{dataIdAccessor:e.dataIdAccessor},showAxes:!1,...K,...Pt({title:O,description:D,summary:E,accessibleTable:W,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Rt({tooltip:p,defaultTooltipContent:Q}),...St({linkedHover:b,selection:v,onObservation:x,onClick:w,hoverHighlight:A,mobileInteraction:V.mobileInteraction,customHoverBehavior:V.customHoverBehavior,customClickBehavior:V.customClickBehavior}),...y&&y.length>0&&{annotations:y},...Object.fromEntries(Object.entries(f).filter(([e])=>"pieceStyle"!==e))};return Z?Di(Ho,{componentName:"PieChart",message:Z,width:H,height:B}):Di(Bo,{componentName:"PieChart",width:H,height:B,children:Di(N,{ref:i,...J})})}),"PieChart"),le=/*#__PURE__*/to(/*#__PURE__*/$i(function(e,t){let o=_o(e.mode,{width:e.width,height:e.height,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,linkedHover:e.linkedHover,showCategoryTicks:e.showCategoryTicks,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules},re),i=Ti(null),{data:r,margin:a,className:n,categoryAccessor:l="category",valueAccessor:s="value",innerRadius:c,centerContent:h,colorBy:u,colorScheme:d,styleRules:g,startAngle:m=0,cornerRadius:p,valueFormat:y,tooltip:f,annotations:v,frameProps:b={},selection:x,linkedHover:w,onObservation:A,onClick:k,hoverHighlight:S,chartId:R,loading:P,loadingContent:C,emptyContent:_,legendInteraction:L,legendPosition:M,color:I,stroke:T,strokeWidth:H,opacity:B}=e,{width:$,height:F,enableHover:O,showLegend:D,title:E,description:W,summary:j,accessibleTable:z}=o,V=Ii(()=>ao(r),[r]),G=u||l,q=ve({responsive:e,data:V,rawData:r,colorBy:G,colorScheme:d,legendInteraction:L,legendPosition:M,frameLegend:b,selection:x,linkedHover:w,fallbackFields:G?["string"==typeof G?G:""]:[],unwrapData:!0,onObservation:A,onClick:k,hoverHighlight:S,mobileInteraction:o.mobileInteraction,mobileSemantics:o.mobileSemantics,chartType:"DonutChart",chartId:R,showLegend:D,userMargin:a,marginDefaults:o.marginDefaults,loading:P,loadingContent:C,emptyContent:_,width:$,height:F,hasTitle:!!E,axisChrome:{hasAxis:!1}}),X=c??Math.max(2,.15*Math.min($,F)),Y=Io(),Q=Ii(()=>new Map,[]),Z=Ii(()=>{let e=To(s);return t=>{let o=e(t);return null==o?void 0:Math.abs(o)}},[s]),K=ia({colorBy:G,colorScale:q.colorScale,color:I,themeCategorical:Y,colorScheme:d,categoryIndexMap:Q,userPieceStyle:b?.pieceStyle,stroke:T,strokeWidth:H,opacity:B,effectiveSelectionHook:q.effectiveSelectionHook,resolvedSelection:q.resolvedSelection,cycleByCategory:!0,styleRules:g,resolveRuleValue:Z}),U=Ii(()=>kt({categoryAccessor:l,valueAccessor:s,groupAccessor:u&&u!==l?u:void 0,groupLabel:"string"==typeof u?u:"group",pieData:!0,valueFormat:y}),[l,s,u,y]),J=fe({componentName:"DonutChart",data:r,accessors:{categoryAccessor:l,valueAccessor:s}}),{effectiveLegendProps:ee,effectiveMargin:te}=oa({ref:t,frameRef:i,setup:q});if(q.earlyReturn)return q.earlyReturn;let oe={chartType:"donut",...null!=r&&{data:V},oAccessor:l,rAccessor:s,projection:"radial",pieceStyle:K,innerRadius:X,startAngle:m,...null!=p&&{cornerRadius:p},centerContent:h,size:[$,F],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:te,enableHover:O,...e.dataIdAccessor&&{dataIdAccessor:e.dataIdAccessor},showAxes:!1,...ee,...Pt({title:E,description:W,summary:j,accessibleTable:z,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Rt({tooltip:f,defaultTooltipContent:U}),...St({linkedHover:w,selection:x,onObservation:A,onClick:k,hoverHighlight:S,mobileInteraction:q.mobileInteraction,customHoverBehavior:q.customHoverBehavior,customClickBehavior:q.customClickBehavior}),...v&&v.length>0&&{annotations:v},...Object.fromEntries(Object.entries(b).filter(([e])=>"pieceStyle"!==e))};return J?Di(Ho,{componentName:"DonutChart",message:J,width:$,height:F}):Di(Bo,{componentName:"DonutChart",width:$,height:F,children:Di(N,{ref:i,...oe})})}),"DonutChart"),se=.8,ce=/*#__PURE__*/to(/*#__PURE__*/$i(function(e,t){let o=_o(e.mode,{width:e.width,height:e.height,enableHover:e.enableHover,showLegend:!1,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules},ae),i=Ti(null),r="context"===o.mode,{compactMode:a}=o,{value:n,min:l=0,max:s=100,thresholds:c,gradientFill:h,color:u,backgroundColor:d="var(--semiotic-grid, #e0e0e0)",arcWidth:g=.3,cornerRadius:m,showNeedle:p=!0,needleColor:y="var(--semiotic-text, #333)",centerContent:f,centerLabel:v,valueFormat:b,showScaleLabels:x=!a,sweep:w=240,fillZones:A=!0,tooltip:k,styleRules:S,annotations:R,frameProps:P={},className:C,stroke:_,strokeWidth:L,opacity:M}=e,{width:I,height:T,title:H,description:B,summary:$,accessibleTable:F}=o,O=Be(h),D=Math.max(l,Math.min(s,n)),E=s-l||1,W=(D-l)/E,{gaugeData:j,pieceStyle:z,gaugeAnnotations:V}=Ii(()=>Aa({min:l,max:s,value:n,thresholds:c,fillColor:u,backgroundColor:d,fillZones:A,showScaleLabels:x,gradientFill:O}),[n,l,s,c,u,d,x,A,O]),G=Ii(()=>Do(z,S,(e,t)=>({value:"number"==typeof e.value?e.value:void 0,category:t??(null==e.category?void 0:String(e.category))})),[z,S]),q=Ii(()=>At(G,{stroke:_,strokeWidth:L,opacity:M}),[G,_,L,M]),{activeSelectionHook:X,customHoverBehavior:Y,customClickBehavior:Q}=Eo({selection:e.selection,linkedHover:e.linkedHover,fallbackFields:["category"],onObservation:e.onObservation,chartType:"GaugeChart",chartId:e.chartId,onClick:e.onClick,hoverHighlight:e.hoverHighlight,colorByField:"category",mobileInteraction:o.mobileInteraction}),Z=xe(e.selection),K=Ii(()=>jo(q,X,Z),[q,X,Z]),{sweepRad:U,startAngleDeg:J}=pa(w),ee=ya(w),te=Math.min(10,Math.max(1,Math.min(I,T)/12)),oe=ee.width,ie=ee.height,re=ee.cx,ne=ee.cy,le=Math.max(4,Math.min((I-2*te)/oe,(T-2*te)/ie)-2),se=Math.max(0,Math.min(le-1.5,le*(1-g))),ce=I/2-re*le,he=T/2-ne*le,ue=2*(le+4),de=Ii(()=>ma({centerContent:f,centerLabel:v,value:D,min:l,max:s,radius:le,innerRadius:se,showScaleLabels:x,valueFormat:b,compact:a}),[f,v,D,l,s,b,x,le,se,a]),ge=Ii(()=>r&&null==f?{type:"gauge-value",text:b?b(D):String(Math.round(D))}:null,[r,f,D,b]),me=Ii(()=>{if(!p)return null;let e=-Math.PI/2+J*Math.PI/180+W*U,t=se>20?se-8:le-1;return{type:"gauge-needle",tipX:Math.cos(e)*t,tipY:Math.sin(e)*t,color:y}},[p,J,W,U,se,le,y]),pe=Ii(()=>(e,t,o)=>{if("gauge-needle"===e.type){let i=(o.width||I)/2,r=(o.height||T)/2,a=Math.max(1,le-se),n=Math.max(1,Math.min(2.5,.4*a)),l=Math.max(1,Math.min(5,.6*a));return Ei("g",{transform:`translate(${i},${r})`,children:[Di("line",{x1:0,y1:0,x2:e.tipX,y2:e.tipY,stroke:e.color,strokeWidth:n,strokeLinecap:"round"}),Di("circle",{cx:0,cy:0,r:l,fill:e.color})]},`gauge-needle-${t}`)}if("gauge-label"===e.type){let i,r,a=(e.value-l)/E,n=-Math.PI/2+J*Math.PI/180+a*U,s=(o.width||I)/2,c=(o.height||T)/2,h=se-1,u=le+1,d=Math.cos(n)*h,g=Math.sin(n)*h,m=Math.cos(n)*u,p=Math.sin(n)*u,y=le+10,f=Math.cos(n)*y,v=Math.sin(n)*y,b=((n+Math.PI/2)/(2*Math.PI)*12+12)%12;return b>=11||b<1?(i="middle",r="auto"):b>=1&&b<5?(i="start",r="middle"):b>=5&&b<7?(i="middle",r="hanging"):(i="end",r="middle"),Ei("g",{transform:`translate(${s},${c})`,children:[Di("line",{x1:d,y1:g,x2:m,y2:p,stroke:"var(--semiotic-border, #ccc)",strokeWidth:2,strokeLinecap:"round"}),Di("text",{x:f,y:v,textAnchor:i,dominantBaseline:r,fill:"var(--semiotic-text-secondary, #666)",fontSize:10,style:{userSelect:"none",fontSize:"var(--semiotic-gauge-label-font-size, 10px)"},children:e.label})]},`gauge-label-${t}`)}if("gauge-value"===e.type){let i=(o.width||I)/2,r=(o.height||T)/2-.2*se,a=Math.max(12,Math.min(22,.28*le));return Di("text",{x:i,y:r,textAnchor:"middle",dominantBaseline:"middle",fontSize:a,fontWeight:700,fill:"var(--semiotic-text, #333)",style:{userSelect:"none"},children:e.text},`gauge-value-${t}`)}return null},[I,T,l,E,J,U,se,le]),ye=Ii(()=>{let e=[...V,...R||[]];return me&&e.push(me),ge&&e.push(ge),e},[V,R,me,ge]),fe=Ii(()=>e=>{let t=e?.data?.[0]||e?.data||e,o=t?._zone||"",i=t?._isFill;return Ei("div",{className:"semiotic-tooltip",style:{padding:"6px 10px",background:"var(--semiotic-tooltip-bg, white)",borderRadius:"var(--semiotic-tooltip-radius, 6px)",boxShadow:"var(--semiotic-tooltip-shadow, 0 2px 8px rgba(0,0,0,0.15))"},children:[Di("div",{style:{fontWeight:600},children:o}),Ei("div",{style:{fontSize:"0.85em",color:"var(--semiotic-text-secondary, #666)"},children:["Current: ",b?b(D):Math.round(D)]}),!i&&Ei("div",{style:{fontSize:"0.85em",color:"var(--semiotic-text-secondary, #666)"},children:["Remaining: ",b?b(s-D):Math.round(s-D)]})]})},[D,s,b]),ve=Wo(e.loading,I,T,e.loadingContent,e),be=ve?null:No(Number.isFinite(n)?[{value:n}]:[],I,T,e.emptyContent,e);if(ve)return ve;if(be)return be;if(0===j.length)return Di(Ho,{componentName:"GaugeChart",message:"No data to display",width:I,height:T});let we={chartType:"donut",data:j,oAccessor:"category",rAccessor:"value",oSort:!1,projection:"radial",pieceStyle:K,innerRadius:se,startAngle:J,sweepAngle:w,...null!=m&&{cornerRadius:m},centerContent:de,size:[I,T],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,maxDevicePixelRatio:e.maxDevicePixelRatio,margin:{top:he-ue/2,bottom:T-he-ue/2,left:ce-ue/2,right:I-ce-ue/2},enableHover:o.enableHover,showAxes:!1,showCategoryTicks:!1,tooltipContent:!1===k?()=>null:Fo(k)||fe,...St({linkedHover:e.linkedHover,selection:e.selection,onObservation:e.onObservation,onClick:e.onClick,hoverRadius:e.hoverRadius,hoverHighlight:e.hoverHighlight,mobileInteraction:o.mobileInteraction,customHoverBehavior:Y,customClickBehavior:Q}),svgAnnotationRules:pe,...ye.length>0&&{annotations:ye},...H&&{title:H},...B&&{description:B},...$&&{summary:$},...void 0!==F&&{accessibleTable:F},...C&&{className:C},...null!=e.animate&&{animate:e.animate},...P};return Di(Bo,{componentName:"GaugeChart",width:I,height:T,children:Di(N,{ref:i,...we})})}),"GaugeChart"),he=/*#__PURE__*/to(/*#__PURE__*/$i(function(e,t){let o=_o(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,categoryLabel:e.categoryLabel,valueLabel:e.valueLabel,showCategoryTicks:e.showCategoryTicks,orientation:e.orientation,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),i=Ti(null),{data:r,margin:a,className:n,categoryAccessor:l="category",groupBy:s,valueAccessor:c="value",orientation:h="vertical",valueFormat:u,colorBy:d,colorScheme:g,sort:m=!1,barPadding:p=60,roundedTop:y,gradientFill:f,styleRules:v,baselinePadding:b=!1,tooltip:x,annotations:w,valueExtent:A,frameProps:k={},selection:S,linkedHover:R,linkedBrush:P,brush:C,onBrush:_,onObservation:L,onClick:M,hoverHighlight:I,chartId:T,loading:H,loadingContent:B,emptyContent:$,legendInteraction:F,legendPosition:O,color:D,stroke:E,strokeWidth:W,opacity:j,categoryFormat:z}=e,{width:V,height:G,enableHover:q,showGrid:X,showLegend:Y,title:Q,description:Z,summary:K,accessibleTable:U,categoryLabel:J,valueLabel:ee}=o,te=Ii(()=>ao(r),[r]),oe=d||s,ie=ve({responsive:e,data:te,rawData:r,colorBy:oe,colorScheme:g,legendInteraction:F,legendPosition:O,frameLegend:k,selection:S,linkedHover:R,fallbackFields:oe?["string"==typeof oe?oe:""]:[],unwrapData:!0,onObservation:L,onClick:M,hoverHighlight:I,mobileInteraction:o.mobileInteraction,mobileSemantics:o.mobileSemantics,chartType:"GroupedBarChart",chartId:T,showLegend:Y,userMargin:a,marginDefaults:o.marginDefaults,loading:H,loadingContent:B,emptyContent:$,width:V,height:G,hasTitle:!!Q,axisChrome:Bt({showAxes:o.showAxes,projection:"horizontal"===h?"horizontal":"vertical",hasCategoryLabel:!!J,hasValueLabel:!!ee})}),re=Io(),ae=Ii(()=>new Map,[]),ne=Ii(()=>To(c),[c]),le=ra({brushProp:C,onBrushProp:_,linkedBrush:P,valueAccessor:c}),se=ia({colorBy:oe,colorScale:ie.colorScale,color:D,themeCategorical:re,colorScheme:g,categoryIndexMap:ae,userPieceStyle:k.pieceStyle,stroke:E,strokeWidth:W,opacity:j,styleRules:v,resolveRuleValue:ne,effectiveSelectionHook:ie.effectiveSelectionHook,resolvedSelection:ie.resolvedSelection}),ce=Ii(()=>kt({categoryAccessor:s,valueAccessor:c,groupAccessor:l,valueFormat:u}),[s,l,c,u]),he=fe({componentName:"GroupedBarChart",data:r,accessors:{categoryAccessor:l,valueAccessor:c},requiredProps:{groupBy:s}}),{effectiveLegendProps:ue,effectiveMargin:de}=oa({ref:t,frameRef:i,setup:ie}),ge=Ii(()=>He(f),[f]);if(ie.earlyReturn)return ie.earlyReturn;let me={chartType:"clusterbar",...null!=r&&{data:te},oAccessor:l,rAccessor:c,groupBy:s,oSort:m,projection:"horizontal"===h?"horizontal":"vertical",pieceStyle:se,size:[V,G],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:de,barPadding:p,...null!=y&&{roundedTop:y},...ge&&{gradientFill:ge},baselinePadding:b,enableHover:q,...e.dataIdAccessor&&{dataIdAccessor:e.dataIdAccessor},showAxes:o.showAxes,oLabel:J,rLabel:ee,rFormat:u,...z&&{oFormat:z},showGrid:X,...ue,...Pt({title:Q,description:Z,summary:K,accessibleTable:U,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Rt({tooltip:x,defaultTooltipContent:ce}),...St({linkedHover:R,selection:S,onObservation:L,onClick:M,hoverHighlight:I,mobileInteraction:ie.mobileInteraction,customHoverBehavior:ie.customHoverBehavior,customClickBehavior:ie.customClickBehavior}),...w&&w.length>0&&{annotations:w},...A&&{rExtent:A},...le.brushStreamProps,...Object.fromEntries(Object.entries(k).filter(([e])=>"pieceStyle"!==e))};return he?Di(Ho,{componentName:"GroupedBarChart",message:he,width:V,height:G}):Di(Bo,{componentName:"GroupedBarChart",width:V,height:G,children:Di(N,{ref:i,...me})})}),"GroupedBarChart"),ue=/*#__PURE__*/to(/*#__PURE__*/$i(function(e,t){let o=_o(e.mode,{width:e.width,height:e.height,showAxes:e.showAxes,showGrid:!1,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,showCategoryTicks:!1,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),i=Ti(null);be(t,{variant:"xy",frameRef:i});let{data:r,margin:a,className:n,stepAccessor:l="step",valueAccessor:s="value",categoryAccessor:c,colorBy:h,colorScheme:u,styleRules:d,orientation:g="horizontal",connectorOpacity:m=.3,showLabels:p=!0,valueFormat:y,tooltip:f,annotations:v,frameProps:b={},selection:x,linkedHover:w,onObservation:A,onClick:k,hoverHighlight:S,chartId:R,loading:P,loadingContent:C,emptyContent:_,legendInteraction:L,legendPosition:M,color:I,stroke:T,strokeWidth:H,opacity:B,categoryFormat:$}=e,F="vertical"===g,{width:O,height:D,enableHover:E,showLegend:W,title:j,description:z,summary:V,accessibleTable:G}=o,q=F?{top:j?60:40,right:20,bottom:60,left:60}:{top:j?40:10,right:10,bottom:10,left:10},X=Ii(()=>ao(r),[r]),Y=h||c,Q=!Y,Z=ve({responsive:e,data:X,rawData:r,colorBy:Y,colorScheme:u,legendInteraction:L,legendPosition:M,frameLegend:b,selection:x,linkedHover:w,fallbackFields:Y?["string"==typeof Y?Y:""]:[],unwrapData:!0,onObservation:A,onClick:k,hoverHighlight:S,mobileInteraction:o.mobileInteraction,mobileSemantics:o.mobileSemantics,chartType:"FunnelChart",chartId:R,showLegend:W,userMargin:a,marginDefaults:q,loading:P,loadingContent:C,emptyContent:_,width:O,height:D,hasTitle:!!j,axisChrome:Bt({showAxes:F&&o.showAxes,projection:F?"vertical":"horizontal",hasCategoryLabel:!1,hasValueLabel:!1})});Lo("FunnelChart",X,"stepAccessor",l),Lo("FunnelChart",X,"valueAccessor",s);let K=Io(),U=Ii(()=>new Map,[]),J=Ii(()=>To(s),[s]),ee=Ii(()=>{if(Q)return I||(K?.[0]?K[0]:Array.isArray(u)&&u[0]?u[0]:"#4e79a7")},[Q,I,K,u]),te=ia({colorBy:ee?void 0:Y,colorScale:Z.colorScale,color:ee??I,themeCategorical:K,colorScheme:u,categoryIndexMap:U,userPieceStyle:b?.pieceStyle,stroke:T,strokeWidth:H,opacity:B,effectiveSelectionHook:Z.effectiveSelectionHook,resolvedSelection:Z.resolvedSelection,styleRules:d,resolveRuleValue:J}),oe=Ii(()=>e=>{let t=e?.data||e,o=t?.__funnelStep||t?.__barFunnelStep||t?.step||"",i=t?.__funnelValue??t?.__barFunnelValue??t?.value??"",r=t?.__funnelPercent??t?.__barFunnelPercent,a=t?.__funnelIsFirstStep??t?.__barFunnelIsFirstStep,n=t?.__barFunnelIsDropoff,l=t?.__barFunnelCategory??t?.category,s=null==r||a?"":` (${Math.abs(r-Math.round(r))<.05?`${Math.round(r)}%`:`${r.toFixed(1)}%`})`;return Ei("div",{className:"semiotic-tooltip",style:yi,children:[o&&Di("div",{style:{fontWeight:"bold"},children:String(o)}),l&&l!==o&&Di("div",{style:{marginTop:2,opacity:.8},children:String(l)}),n&&Di("div",{style:{marginTop:2,fontStyle:"italic",opacity:.7},children:"Dropoff"}),Ei("div",{style:{marginTop:4},children:[!y||"number"!=typeof i&&"string"!=typeof i?String(i):y(i),s]})]})},[y]);if(Z.earlyReturn)return Z.earlyReturn;let ie=fe({componentName:"FunnelChart",data:r,accessors:{stepAccessor:l,valueAccessor:s}});if(ie)return Di(Ho,{componentName:"FunnelChart",message:ie,width:O,height:D});let re={chartType:F?"bar-funnel":"funnel",...null!=r&&{data:X},oAccessor:l,rAccessor:s,...c&&{stackBy:c},projection:F?"vertical":"horizontal",barPadding:F?40:0,pieceStyle:te,size:[O,D],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,maxDevicePixelRatio:e.maxDevicePixelRatio,margin:Z.margin,enableHover:E,...e.dataIdAccessor&&{dataIdAccessor:e.dataIdAccessor},showAxes:F&&o.showAxes,showCategoryTicks:F&&o.showAxes,...$&&{oFormat:$},...y&&{rFormat:y},showGrid:F,...!F&&{connectorOpacity:m},showLabels:p,...Z.legendBehaviorProps,...j&&{title:j},...z&&{description:z},...V&&{summary:V},...void 0!==G&&{accessibleTable:G},...n&&{className:n},...null!=e.animate&&{animate:e.animate},tooltipContent:!1===f?()=>null:!0===f||null==f?oe:Fo(f)||oe,...St({linkedHover:w,selection:x,onObservation:A,onClick:k,hoverHighlight:S,mobileInteraction:Z.mobileInteraction,customHoverBehavior:Z.customHoverBehavior,customClickBehavior:Z.customClickBehavior}),...v&&v.length>0&&{annotations:v},...Object.fromEntries(Object.entries(b).filter(([e])=>"pieceStyle"!==e))};return Di(Bo,{componentName:"FunnelChart",width:O,height:D,children:Di(N,{ref:i,...re})})}),"FunnelChart"),de=/*#__PURE__*/to(/*#__PURE__*/$i(function(e,t){let o=Ti(null);be(t,{variant:"xy",frameRef:o});let i=_o(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{data:r,margin:a,className:n,categoryAccessor:l="attribute",valueAccessor:s="value",seriesAccessor:c,colorBy:h,categoryFormat:u,colorScheme:d,styleRules:g,pointRadius:m=4,valueExtent:p,valueFormat:y,tooltip:f,annotations:v,frameProps:b={},selection:x,linkedHover:w,onObservation:A,onClick:k,hoverHighlight:S,chartId:R,loading:P,loadingContent:C,emptyContent:_,legendInteraction:L,legendPosition:M,color:I,stroke:T,strokeWidth:H,opacity:B}=e,{width:$,height:F,enableHover:O,showGrid:D,showLegend:E,title:W,description:j,summary:z,accessibleTable:V}=i,G=Ii(()=>ao(r),[r]),q=c||("string"==typeof h?h:void 0)||("function"==typeof h?h:void 0),X=q??"__radar",Y=h||q,Q=ve({responsive:e,data:G,rawData:r,colorBy:Y,colorScheme:d,legendInteraction:L,legendPosition:M,frameLegend:b,selection:x,linkedHover:w,fallbackFields:["string"==typeof Y?Y:"","string"==typeof l?l:""].filter(Boolean),unwrapData:!0,onObservation:A,onClick:k,hoverHighlight:S,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"RadarChart",chartId:R,showLegend:E,userMargin:a,marginDefaults:i.marginDefaults,loading:P,loadingContent:C,emptyContent:_,width:$,height:F,hasTitle:!!W,axisChrome:Bt({showAxes:!0,projection:"radial",hasCategoryLabel:!1,hasValueLabel:!1})}),Z=Io(),K=Ii(()=>new Map,[]),U=Ii(()=>To(s),[s]),J=ia({colorBy:Y,colorScale:Q.colorScale,color:I,themeCategorical:Z,colorScheme:d,categoryIndexMap:K,userPieceStyle:b?.pieceStyle,stroke:T,strokeWidth:H,opacity:B,effectiveSelectionHook:Q.effectiveSelectionHook,resolvedSelection:Q.resolvedSelection,baseStyleExtras:{r:m,fillOpacity:.85},styleRules:g,resolveRuleValue:U}),ee=Ii(()=>kt({categoryAccessor:l,valueAccessor:s,groupAccessor:q,groupLabel:"string"==typeof q?q:"series",valueFormat:y}),[l,s,q,y]);if(Q.earlyReturn)return Q.earlyReturn;let te=fe({componentName:"RadarChart",data:r,accessors:{categoryAccessor:l,valueAccessor:s}});if(te)return Di(Ho,{componentName:"RadarChart",message:te,width:$,height:F});let oe={chartType:"point",projection:"radial",...null!=r&&{data:G},oAccessor:l,rAccessor:s,connectorAccessor:X,connectorStyle:e=>{let t="function"==typeof J?J(e):{},o="string"==typeof t.fill?t.fill:void 0;return{fill:o,fillOpacity:.15,stroke:o,strokeWidth:2,opacity:.7}},pieceStyle:J,...u&&{oFormat:u},rExtent:p??[0],rFormat:y,oLabel:"",size:[$,F],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:Q.margin,enableHover:O,showAxes:!0,showGrid:D,...Q.legendBehaviorProps,...Pt({title:W,description:j,summary:z,accessibleTable:V,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Rt({tooltip:f,defaultTooltipContent:ee}),...St({linkedHover:w,selection:x,onObservation:A,onClick:k,hoverHighlight:S,mobileInteraction:Q.mobileInteraction,customHoverBehavior:Q.customHoverBehavior,customClickBehavior:Q.customClickBehavior}),...v&&v.length>0&&{annotations:v},...Object.fromEntries(Object.entries(b).filter(([e])=>"pieceStyle"!==e&&"connectorStyle"!==e))};return Di(Bo,{componentName:"RadarChart",width:$,height:F,children:Di(N,{ref:o,...oe})})}),"RadarChart"),ge=/*#__PURE__*/to(/*#__PURE__*/$i(function(e,t){let o=_o(e.mode,{width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,categoryLabel:e.categoryLabel,valueLabel:e.valueLabel,showCategoryTicks:e.showCategoryTicks,orientation:e.orientation,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),i=Ti(null),{data:r,margin:a,className:n,categoryAccessor:l="category",subcategoryAccessor:s,valueAccessor:c="value",orientation:h="horizontal",valueFormat:u,colorBy:d,colorScheme:g,styleRules:m,barPadding:p,tooltip:y,annotations:f,brush:v,onBrush:b,linkedBrush:x,frameProps:w={},selection:A,linkedHover:k,onObservation:S,onClick:R,hoverHighlight:P,chartId:C,loading:_,loadingContent:L,emptyContent:M,legendInteraction:I,legendPosition:T,color:H,stroke:B,strokeWidth:$,opacity:F,categoryFormat:O,rTickValues:D,tickLabelEdgeAlign:E,showCategoryTicks:W,gradientFill:j,trackFill:z,roundedTop:V,valueExtent:G}=e,{width:q,height:X,enableHover:Y,showGrid:Q,showLegend:Z,title:K,description:U,summary:J,accessibleTable:ee,categoryLabel:te,valueLabel:oe}=o,ie=Ii(()=>ao(r),[r]),re=d||s,ae=Ii(()=>{if(null!=p)return p;if("sparkline"!==o.mode)return 40;let e=new Set(ie.map(e=>"function"==typeof l?l(e):e[l])),t=Math.max(1,e.size);if(t<=1)return 1;let i=(("horizontal"===h?X:q)-2*t)/(t-1);return Math.max(0,Math.min(1,i))},[p,o.mode,ie,l,h,q,X]),ne=ve({responsive:e,data:ie,rawData:r,colorBy:re,colorScheme:g,legendInteraction:I,legendPosition:T,frameLegend:w,selection:A,linkedHover:k,fallbackFields:re?["string"==typeof re?re:""]:[],unwrapData:!0,onObservation:S,onClick:R,hoverHighlight:P,mobileInteraction:o.mobileInteraction,mobileSemantics:o.mobileSemantics,chartType:"SwimlaneChart",chartId:C,showLegend:Z,userMargin:a,marginDefaults:o.marginDefaults,loading:_,loadingContent:L,emptyContent:M,width:q,height:X,hasTitle:!!K,axisChrome:Bt({showAxes:o.showAxes,projection:"horizontal"===h?"horizontal":"vertical",hasCategoryLabel:!1!==W&&!!te,hasValueLabel:!!oe})}),le=ra({brushProp:v,onBrushProp:b,linkedBrush:x,valueAccessor:c}),se=Io(),ce=Ii(()=>new Map,[]),he=Ii(()=>To(c),[c]),ue=ia({colorBy:re,colorScale:ne.colorScale,color:H,themeCategorical:se,colorScheme:g,categoryIndexMap:ce,userPieceStyle:w?.pieceStyle,stroke:B,strokeWidth:$,opacity:F,effectiveSelectionHook:ne.effectiveSelectionHook,resolvedSelection:ne.resolvedSelection,cycleByCategory:!0,styleRules:m,resolveRuleValue:he}),de=Ii(()=>kt({categoryAccessor:s,valueAccessor:c,groupAccessor:l,valueFormat:u}),[s,l,c,u]),ge=fe({componentName:"SwimlaneChart",data:r,accessors:{categoryAccessor:l,valueAccessor:c,subcategoryAccessor:s},requiredProps:{subcategoryAccessor:s}}),{effectiveLegendProps:me,effectiveMargin:pe}=oa({ref:t,frameRef:i,setup:ne}),ye=Ii(()=>He(j),[j]);if(ne.earlyReturn)return ne.earlyReturn;let be={chartType:"swimlane",...null!=r&&{data:ie},oAccessor:l,rAccessor:c,stackBy:s,projection:"horizontal"===h?"horizontal":"vertical",pieceStyle:ue,size:[q,X],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:pe,barPadding:ae,enableHover:Y,...e.dataIdAccessor&&{dataIdAccessor:e.dataIdAccessor},showAxes:o.showAxes,oLabel:!1===W?void 0:te,rLabel:oe,rFormat:u,...D&&{rTickValues:D},...null!=E&&{tickLabelEdgeAlign:E},...O&&{oFormat:O},...void 0!==W&&{showCategoryTicks:W},showGrid:Q,...me,...Pt({title:K,description:U,summary:J,accessibleTable:ee,className:n,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...Rt({tooltip:y,defaultTooltipContent:de}),...St({linkedHover:k,selection:A,onObservation:S,onClick:R,hoverHighlight:P,mobileInteraction:ne.mobileInteraction,customHoverBehavior:ne.customHoverBehavior,customClickBehavior:ne.customClickBehavior}),...f&&f.length>0&&{annotations:f},...ye&&{gradientFill:ye},...null!=z&&{trackFill:z},...null!=V&&{roundedTop:V},...G&&{rExtent:G},...le.brushStreamProps,...Object.fromEntries(Object.entries(w).filter(([e])=>"pieceStyle"!==e))};return ge?Di(Ho,{componentName:"SwimlaneChart",message:ge,width:q,height:X}):Di(Bo,{componentName:"SwimlaneChart",width:q,height:X,children:Di(N,{ref:i,...be})})}),"SwimlaneChart"),me=/*#__PURE__*/to(/*#__PURE__*/$i(function(e,t){let{data:o,layout:i,layoutConfig:r,onLayoutError:a,categoryAccessor:n="category",valueAccessor:l="value",oExtent:s,rExtent:c,projection:h="vertical",margin:u,className:d,colorBy:g,colorScheme:m,tooltip:p,showAxes:y=!1,annotations:f,onObservation:v,onClick:b,selection:x,linkedHover:w,chartId:A,loading:k,loadingContent:S,emptyContent:R,frameProps:P={}}=e,{frameRef:C,resolved:_,safeData:L,setup:M,earlyReturn:I}=ye({responsive:e,imperativeRef:t,imperativeVariant:"xy",chartTypeLabel:"OrdinalCustomChart",unwrapData:!0,data:o,colorBy:g,colorScheme:m,frameLegend:P,selection:x,linkedHover:w,onObservation:v,onClick:b,chartId:A,loading:k,loadingContent:S,emptyContent:R,margin:u,width:e.width,height:e.height,showGrid:e.showGrid,enableHover:e.enableHover,title:e.title,description:e.description,summary:e.summary,accessibleTable:e.accessibleTable,mode:e.mode,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),T=M.effectiveSelectionHook,H=Ii(()=>T?.isActive?{isActive:!0,predicate:T.predicate}:null,[T?.isActive,T?.predicate]),B=Ii(()=>Fo(p),[p]);if(I)return I;let{width:$,height:F,enableHover:O,showGrid:D,title:E,description:W,summary:j,accessibleTable:z}=_,V={chartType:"custom",...null!=o&&{data:L},customLayout:i,layoutConfig:r,onLayoutError:a,...H&&{layoutSelection:H},oAccessor:n,rAccessor:l,oExtent:s,rExtent:c,projection:h,colorAccessor:g,colorScheme:m,size:[$,F],responsiveWidth:e.responsiveWidth,responsiveHeight:e.responsiveHeight,margin:M.margin,enableHover:O,showAxes:y,showGrid:D,annotations:f,...Pt({title:E,description:W,summary:j,accessibleTable:z,className:d,animate:e.animate,maxDevicePixelRatio:e.maxDevicePixelRatio,axisExtent:e.axisExtent,autoPlaceAnnotations:e.autoPlaceAnnotations}),...!1===p?{tooltipContent:()=>null}:B?{tooltipContent:B}:{},...M.legendBehaviorProps,...St({linkedHover:w,selection:x,onObservation:v,onClick:b,hoverHighlight:!1,mobileInteraction:M.mobileInteraction,customHoverBehavior:M.customHoverBehavior,customClickBehavior:M.customClickBehavior}),...P};return Di(Bo,{componentName:"OrdinalCustomChart",width:$,height:F,children:Di(N,{ref:C,...V})})}),"OrdinalCustomChart");export{N as a,j as b,z as c,Q as d,Z as e,K as f,J as g,ee as h,te as i,oe as j,ne as k,le as l,ce as m,he as n,ue as o,de as p,ge as q,me as r};