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
+ function t(t,o){if(0!==o.length){t.save();try{let y=t.globalAlpha,i=[],r="",a=(l,o)=>{if(t.beginPath(),o)for(let e of o)t.moveTo(e.x+e.r,e.y),t.arc(e.x,e.y,e.r,0,2*Math.PI);else t.arc(l.x,l.y,l.r,0,2*Math.PI);let i=y*(l.style.opacity??1)*(l._decayOpacity??1);t.globalAlpha=i*(l.style.fillOpacity??1),t.fillStyle=s(t,l.style.fill,"#4e79a7"),t.fill();let r=l.style.strokeWidth??1;l.style.stroke&&"none"!==l.style.stroke&&r>0&&(t.strokeStyle=s(t,l.style.stroke,l.style.stroke),t.lineWidth=r,t.globalAlpha=i*(l.style.strokeOpacity??1),t.stroke()),e(t,l,y)},n=()=>{0!==i.length&&(a(i[0],i.length>1?i:void 0),i=[],r="")};for(let t of o){let e=y*(t.style.opacity??1)*(t._decayOpacity??1),s=t.style.fill;if(l(t)||null!=s&&"string"!=typeof s||e*(t.style.fillOpacity??1)<1||e*(t.style.strokeOpacity??1)<1){n(),a(t);continue}let o=t.style.strokeWidth??1,f=`${s??"#4e79a7"}\0${t.style.stroke&&"none"!==t.style.stroke&&o>0?String(t.style.stroke):""}\0${o}\0${t.r}\0${e}`;i.length>0&&f!==r&&n(),r=f,i.push(t),i.length>=2048&&n()}n()}finally{t.restore()}}}import{c as e,a as l}from"./c-TX53234M.min.js";import{q as s}from"./c-JDI7HKEM.min.js";var o=(e,l)=>t(e,l.filter(t=>"point"===t.type));export{o as a,t as b};
@@ -0,0 +1 @@
1
+ function l(l){return l._pulseIntensity>0}function t(t,e,n,i){if(!l(e))return;let s="w"in e;t.globalAlpha=n*e._pulseIntensity*(s?.3:.35),t.fillStyle=e._pulseColor||"rgba(255,255,255,0.6)",i?t.fill(i):s?t.fillRect(e.x,e.y,e.w,e.h):t.fill()}function e(t,e,n){if(!l(e))return;let i=e._pulseGlowRadius??4,s=e.r+i*e._pulseIntensity,r=e.cx??e.x??0,u=e.cy??e.y??0;t.beginPath(),t.arc(r,u,s,0,2*Math.PI),t.strokeStyle=e._pulseColor||"rgba(255,255,255,0.6)",t.lineWidth=2*e._pulseIntensity,t.globalAlpha=n*e._pulseIntensity*.6,t.stroke()}export{l as a,t as b,e as c};
@@ -0,0 +1 @@
1
+ import{f as a,g as s,h as i,i as t,j as n,k as o,l as e}from"./c-BQWX6NBX.min.js";export{o as advanceTransition,s as getNodeIdentity,a as joinPathByIdentity,i as resolveMarkOpacity,t as snapshotPositions,n as startTransition,e as xyTransitionEngine};
@@ -0,0 +1 @@
1
+ import{a as t}from"./c-OMTJIC3P.min.js";import{a as e,b as l}from"./c-TX53234M.min.js";import{o,q as a,c as h,t as i}from"./c-JDI7HKEM.min.js";import{area as r,line as s}from"d3-shape";function n(t,e){let l=o(e.curve);if(l&&e.topPath.length>=2&&e.bottomPath.length>=2){let o=r().x(t=>t[0]).y0((t,l)=>e.bottomPath[l][1]).y1(t=>t[1]).curve(l).context(t);t.beginPath(),o(e.topPath)}else{t.beginPath(),t.moveTo(e.topPath[0][0],e.topPath[0][1]);for(let l=1;l<e.topPath.length;l++)t.lineTo(e.topPath[l][0],e.topPath[l][1]);for(let l=e.bottomPath.length-1;l>=0;l--)t.lineTo(e.bottomPath[l][0],e.bottomPath[l][1]);t.closePath()}}function p(t,e){let l=o(e.curve);if(t.beginPath(),l)s().x(t=>t[0]).y(t=>t[1]).curve(l).context(t)(e.topPath);else{t.moveTo(e.topPath[0][0],e.topPath[0][1]);for(let l=1;l<e.topPath.length;l++)t.lineTo(e.topPath[l][0],e.topPath[l][1])}}var P=(o,r,s,P)=>{let f=r.filter(t=>"area"===t.type),c=o.globalAlpha;for(let r of f){if(r.topPath.length<2)continue;let s=!1;r.clipRect&&(o.save(),o.beginPath(),o.rect(r.clipRect.x,r.clipRect.y,r.clipRect.width,r.clipRect.height),o.clip(),s=!0);let f=r._introClipFraction;void 0!==f&&f<1&&(o.save(),o.beginPath(),o.rect(0,0,P.width*f,P.height),o.clip());let g=a(o,r.style.fill,"#4e79a7"),y=c*(r.style.opacity??1),b=y*(r.style.strokeOpacity??1),m=r._decayOpacities,d=!(!r.colorThresholds?.length||!r.rawValues||r.rawValues.length!==r.topPath.length),k=!!r.strokeColorBands?.length;if(m&&m.length===r.topPath.length&&!d&&!k){let t=y*(r.style.fillOpacity??.7);o.fillStyle=g;for(let e=0;e<r.topPath.length-1;e++){let l=.5*(m[e]+m[e+1])*t;o.globalAlpha=l,o.beginPath(),o.moveTo(r.topPath[e][0],r.topPath[e][1]),o.lineTo(r.topPath[e+1][0],r.topPath[e+1][1]),o.lineTo(r.bottomPath[e+1][0],r.bottomPath[e+1][1]),o.lineTo(r.bottomPath[e][0],r.bottomPath[e][1]),o.closePath(),o.fill()}let e=r.style.strokeWidth??2;if(r.style.stroke&&"none"!==r.style.stroke&&e>0){o.strokeStyle=h(o,r.style.stroke)||r.style.stroke,o.lineWidth=e,o.setLineDash([]);for(let t=0;t<r.topPath.length-1;t++){let e=.5*(m[t]+m[t+1]);o.globalAlpha=e*b,o.beginPath(),o.moveTo(r.topPath[t][0],r.topPath[t][1]),o.lineTo(r.topPath[t+1][0],r.topPath[t+1][1]),o.stroke()}}void 0!==f&&f<1&&o.restore(),s&&o.restore(),o.globalAlpha=c;continue}if(n(o,r),r.fillGradient&&r.fillGradient.stops.length>=2&&r.fillGradient){let t=1/0,e=-1/0;if(r.fillGradientSpan)[t,e]=r.fillGradientSpan;else{for(let e of r.topPath)e[1]<t&&(t=e[1]);for(let t of r.bottomPath)t[1]>e&&(e=t[1])}let l="string"==typeof g?g:"#4e79a7",a=i(o,r.fillGradient,l,0,t,0,e);o.fillStyle=a||g,o.globalAlpha=y}else{let t=r.style.fillOpacity??.7;o.globalAlpha=t*y,o.fillStyle=g}o.fill(),e(r)&&(n(o,r),l(o,r,c));let T=r.style.strokeWidth??2;if(r.style.stroke&&"none"!==r.style.stroke&&T>0){o.globalAlpha=b;let e=h(o,r.style.stroke)||r.style.stroke,l=!d&&!k&&r.strokeGradient&&r.topPath.length>=2?i(o,r.strokeGradient,e,r.topPath[0][0],0,r.topPath[r.topPath.length-1][0],0):null;if(o.lineWidth=T,o.setLineDash([]),k){let t=1/0,l=-1/0;for(let[e]of r.topPath)t=Math.min(t,e),l=Math.max(l,e);let a=o.lineWidth;for(let i of r.strokeColorBands){o.save(),o.beginPath(),o.rect(t-a,i.y,l-t+2*a,i.height),o.clip();let s=i.color??e;o.strokeStyle=h(o,s)||s,o.globalAlpha=b*(i.opacity??1),p(o,r),o.stroke(),o.restore()}}else if(d){let l=t(r.topPath,r.rawValues,r.colorThresholds,e);for(let t of l){o.beginPath(),o.strokeStyle=h(o,t.color)||t.color,o.moveTo(t.path[0][0],t.path[0][1]);for(let e=1;e<t.path.length;e++)o.lineTo(t.path[e][0],t.path[e][1]);o.stroke()}}else o.strokeStyle=l||e,p(o,r),o.stroke()}void 0!==f&&f<1&&o.restore(),s&&o.restore(),o.globalAlpha=c}};export{P as a};
@@ -1 +1 @@
1
- function e(e,r,u){let o=n(e),i=n(r),f=n(u);return e=>{let n="string"==typeof e.agg&&"number"==typeof e.count&&"number"==typeof e.xCenter&&"number"==typeof e.yCenter;return{value:n?t(e.value):f(e),x:n?t(e.xCenter):o(e),y:n?t(e.yCenter):i(e)}}}function t(e){return"number"==typeof e&&Number.isFinite(e)?e:void 0}import{bI as n}from"./c-SU6Z75M2.min.js";export{e as a};
1
+ function e(e,r,u){let o=n(e),i=n(r),f=n(u);return e=>{let n="string"==typeof e.agg&&"number"==typeof e.count&&"number"==typeof e.xCenter&&"number"==typeof e.yCenter;return{value:n?t(e.value):f(e),x:n?t(e.xCenter):o(e),y:n?t(e.yCenter):i(e)}}}function t(e){return"number"==typeof e&&Number.isFinite(e)?e:void 0}import{bJ as n}from"./c-L6OT4OVA.min.js";export{e as a};
@@ -1 +1 @@
1
- function t(t,e){let i=(e??t.currentTarget)?.getScreenCTM?.();if(!i)return null;let r=i.a*i.d-i.b*i.c;if(!Number.isFinite(r)||0===r)return null;let n=t.clientX-i.e,a=t.clientY-i.f;return{x:(i.d*n-i.c*a)/r,y:(i.a*a-i.b*n)/r}}function e({graphics:e,size:i,margin:r,scales:n,label:a="Chart controls"}){let s=m(null),l=p(e=>t({clientX:e.clientX,clientY:e.clientY,currentTarget:null},s.current),[]);if(null==e||!1===e)return null;let h="function"==typeof e?e({size:i,margin:r,scales:n,pointerToPlot:l}):e;return null==h||!1===h?null:v("svg",{className:"stream-frame-interactive-layer",role:"group","aria-label":a,width:i[0],height:i[1],overflow:"visible",style:{position:"absolute",top:0,left:0,pointerEvents:"none",overflow:"visible"},children:v("g",{ref:s,transform:`translate(${r.left},${r.top})`,children:h})})}function i(t){return t===1/0?1/0:Number.isFinite(t)?Math.max(0,Math.floor(t)):5e3}function r(t){return t===1/0?1/0:Number.isFinite(t)?Math.max(1,Math.floor(t)):5e3}function n(t,e,i,r){return"string"==typeof t?{key:t,fn:null}:"function"==typeof t?{key:i,fn:t}:"string"==typeof e?{key:e,fn:null}:"function"==typeof e?{key:r,fn:e}:{key:void 0,fn:null}}function a(t,e,i){return r=>{if(!r||!i||!t.fn&&!e.fn)return r;let n=!1,a=r.map(i=>{let r=t.fn&&t.key&&!(t.key in i),a=e.fn&&e.key&&!(e.key in i);if(!r&&!a)return i;n=!0;let s={...i};return r&&(s[t.key]=t.fn(i)),a&&(s[e.key]=e.fn(i)),s});return n?a:r}}function s(t,e){return t.__legendMarginReservedFor===e}function l(t,e){return{legendLayout:t.legendLayout,axisChrome:f({showAxes:t.showAxes,xLabel:t.xLabel,yLabel:t.yLabel,yLabelRight:t.yLabelRight,axes:t.axes}),legendMarginReserved:s(t,e)}}function h(t,e){return{legendLayout:t.legendLayout,axisChrome:_({showAxes:t.showAxes,projection:t.projection,hasCategoryLabel:!!(t.categoryLabel??t.oLabel),hasValueLabel:!!(t.valueLabel??t.rLabel)}),legendMarginReserved:s(t,e)}}function u(t){return new Set(Array.isArray(t)?t:[t])}function o(t){for(let e of t){if(void 0!==e._targetOpacity){let t=e._targetOpacity;e.style={...e.style||{},opacity:0===t?0:t},e._targetOpacity=void 0}if("point"===e.type)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("glyph"===e.type)void 0!==e._targetX&&(e.x=e._targetX,e.y=e._targetY,void 0!==e._targetR&&(e.size=e._targetR),e._targetX=void 0,e._targetY=void 0,e._targetR=void 0);else if("rect"===e.type||"heatcell"===e.type)void 0!==e._targetX&&(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 if("candlestick"===e.type)void 0!==e._targetX&&(e.x=e._targetX,void 0!==e._targetOpenY&&(e.openY=e._targetOpenY),void 0!==e._targetCloseY&&(e.closeY=e._targetCloseY),void 0!==e._targetHighY&&(e.highY=e._targetHighY),void 0!==e._targetLowY&&(e.lowY=e._targetLowY),e._targetX=void 0,e._targetOpenY=void 0,e._targetCloseY=void 0,e._targetHighY=void 0,e._targetLowY=void 0);else if("line"===e.type||"area"===e.type){if(e._introClipFraction=void 0,"line"===e.type&&e._targetPath){for(let t=0;t<e.path.length;t++)e.path[t]=e._targetPath[t];e._prevPath=void 0,e._targetPath=void 0}if("area"===e.type){if(e._targetTopPath)for(let t=0;t<e.topPath.length;t++)e.topPath[t]=e._targetTopPath[t];if(e._targetBottomPath)for(let t=0;t<e.bottomPath.length;t++)e.bottomPath[t]=e._targetBottomPath[t];e._prevTopPath=void 0,e._prevBottomPath=void 0,e._targetTopPath=void 0,e._targetBottomPath=void 0}}}}function c(t){for(let e of t){if(void 0!==e._targetOpacity){let t=e._targetOpacity;e.style={...e.style||{},opacity:0===t?0:t},e._targetOpacity=void 0}"point"===e.type?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):void 0!==e._targetR&&(e.r=e._targetR,e._targetR=void 0):"rect"===e.type?void 0!==e._targetX&&(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):"wedge"===e.type&&void 0!==e._targetStartAngle&&(e.startAngle=e._targetStartAngle,e.endAngle=e._targetEndAngle,e._targetStartAngle=void 0,e._targetEndAngle=void 0)}}function g(t,e,i){return"exact"===i?function(t,e){let i=t.domain(),r=i[0],n=i[i.length-1],a=r instanceof Date,s=r instanceof Date?r.getTime():r,l=n instanceof Date?n.getTime():n;if(e<2||s===l)return a?[new Date(s),new Date(l)]:[s,l];let h=(l-s)/(e-1),u=new Array(e);for(let t=0;t<e;t++){let i=t===e-1?l:s+t*h;u[t]=a?new Date(i):i}return u}(t,e):t.ticks(e)}import{b as d,u as f,w as _}from"./c-SU6Z75M2.min.js";import{useRef as m,useCallback as p}from"react";import{jsx as v}from"react/jsx-runtime";var y=class{constructor(){this._min=1/0,this._max=-1/0,this._dirty=!1}push(t){Number.isFinite(t)&&(t<this._min&&(this._min=t),t>this._max&&(this._max=t))}evict(t){(t===this._min||t===this._max)&&(this._dirty=!0)}recalculate(t,e){this._min=1/0,this._max=-1/0;for(let i of t){let t=e?e(i):i;Number.isFinite(t)&&(t<this._min&&(this._min=t),t>this._max&&(this._max=t))}this._dirty=!1}clear(){this._min=1/0,this._max=-1/0,this._dirty=!1}get extent(){return[this._min,this._max]}get min(){return this._min}get max(){return this._max}get dirty(){return this._dirty}},k=class{constructor(t,e){this.lastBoundedData=null,this.chunkTimer=null,this.pushBuffer=[],this.flushScheduled=!1,this.callback=t,this.chunkThreshold=i(e?.chunkThreshold),this.chunkSize=r(e?.chunkSize)}updateChunkOptions(t){this.chunkThreshold=i(t.chunkThreshold),this.chunkSize=r(t.chunkSize)}clearLastData(){this.lastBoundedData=null,this.pushBuffer=[],this.flushScheduled=!1,null!==this.chunkTimer&&(cancelAnimationFrame(this.chunkTimer),this.chunkTimer=null)}setBoundedData(t){if(t=d(t),this.lastBoundedData===t)return;if(this.lastBoundedData=t,null!==this.chunkTimer&&(cancelAnimationFrame(this.chunkTimer),this.chunkTimer=null),t.length<=this.chunkThreshold)return void this.callback({inserts:t,bounded:!0});this.callback({inserts:t.slice(0,this.chunkSize),bounded:!0,totalSize:t.length});let e=this.chunkSize,i=()=>{if(e>=t.length)return void(this.chunkTimer=null);if(t!==this.lastBoundedData)return void(this.chunkTimer=null);let r=Math.min(e+this.chunkSize,t.length);this.callback({inserts:t.slice(e,r),bounded:!1}),e=r,e<t.length?this.chunkTimer=requestAnimationFrame(i):this.chunkTimer=null};e<t.length?this.chunkTimer=requestAnimationFrame(i):this.chunkTimer=null}setReplacementData(t){if(t=d(t),this.lastBoundedData=t,null!==this.chunkTimer&&(cancelAnimationFrame(this.chunkTimer),this.chunkTimer=null),this.pushBuffer=[],this.flushScheduled=!1,t.length<=this.chunkThreshold)return void this.callback({inserts:t,bounded:!0,preserveCategoryOrder:!0});this.callback({inserts:t.slice(0,this.chunkSize),bounded:!0,preserveCategoryOrder:!0,totalSize:t.length});let e=this.chunkSize,i=()=>{if(e>=t.length)return void(this.chunkTimer=null);if(t!==this.lastBoundedData)return void(this.chunkTimer=null);let r=Math.min(e+this.chunkSize,t.length);this.callback({inserts:t.slice(e,r),bounded:!1}),e=r,e<t.length?this.chunkTimer=requestAnimationFrame(i):this.chunkTimer=null};e<t.length?this.chunkTimer=requestAnimationFrame(i):this.chunkTimer=null}flushPushBuffer(){if(this.flushScheduled=!1,0===this.pushBuffer.length)return;let t=this.pushBuffer;this.pushBuffer=[],this.callback({inserts:t,bounded:!1})}scheduleFlush(){this.flushScheduled||(this.flushScheduled=!0,queueMicrotask(()=>this.flushPushBuffer()))}push(t){null==t||"object"!=typeof t||(this.pushBuffer.push(t),this.scheduleFlush())}pushMany(t){if(0===t.length)return;let e=0;for(let i=0;i<t.length;i++){let r=t[i];null==r||"object"!=typeof r||(this.pushBuffer.push(r),e++)}0!==e&&this.scheduleFlush()}flush(){this.flushPushBuffer()}clear(){null!==this.chunkTimer&&(cancelAnimationFrame(this.chunkTimer),this.chunkTimer=null),this.lastBoundedData=null,this.pushBuffer=[],this.flushScheduled=!1}};export{t as a,e as b,k as c,y as d,u as e,o as f,c as g,g as h,n as i,a as j,l as k,h as l};
1
+ function t(t,e){let i=(e??t.currentTarget)?.getScreenCTM?.();if(!i)return null;let r=i.a*i.d-i.b*i.c;if(!Number.isFinite(r)||0===r)return null;let n=t.clientX-i.e,a=t.clientY-i.f;return{x:(i.d*n-i.c*a)/r,y:(i.a*a-i.b*n)/r}}function e({graphics:e,size:i,margin:r,scales:n,label:a="Chart controls"}){let s=m(null),l=p(e=>t({clientX:e.clientX,clientY:e.clientY,currentTarget:null},s.current),[]);if(null==e||!1===e)return null;let h="function"==typeof e?e({size:i,margin:r,scales:n,pointerToPlot:l}):e;return null==h||!1===h?null:v("svg",{className:"stream-frame-interactive-layer",role:"group","aria-label":a,width:i[0],height:i[1],overflow:"visible",style:{position:"absolute",top:0,left:0,pointerEvents:"none",overflow:"visible"},children:v("g",{ref:s,transform:`translate(${r.left},${r.top})`,children:h})})}function i(t){return t===1/0?1/0:Number.isFinite(t)?Math.max(0,Math.floor(t)):5e3}function r(t){return t===1/0?1/0:Number.isFinite(t)?Math.max(1,Math.floor(t)):5e3}function n(t,e,i,r){return"string"==typeof t?{key:t,fn:null}:"function"==typeof t?{key:i,fn:t}:"string"==typeof e?{key:e,fn:null}:"function"==typeof e?{key:r,fn:e}:{key:void 0,fn:null}}function a(t,e,i){return r=>{if(!r||!i||!t.fn&&!e.fn)return r;let n=!1,a=r.map(i=>{let r=t.fn&&t.key&&!(t.key in i),a=e.fn&&e.key&&!(e.key in i);if(!r&&!a)return i;n=!0;let s={...i};return r&&(s[t.key]=t.fn(i)),a&&(s[e.key]=e.fn(i)),s});return n?a:r}}function s(t,e){return t.__legendMarginReservedFor===e}function l(t,e){return{legendLayout:t.legendLayout,axisChrome:f({showAxes:t.showAxes,xLabel:t.xLabel,yLabel:t.yLabel,yLabelRight:t.yLabelRight,axes:t.axes}),legendMarginReserved:s(t,e)}}function h(t,e){return{legendLayout:t.legendLayout,axisChrome:_({showAxes:t.showAxes,projection:t.projection,hasCategoryLabel:!!(t.categoryLabel??t.oLabel),hasValueLabel:!!(t.valueLabel??t.rLabel)}),legendMarginReserved:s(t,e)}}function u(t){return new Set(Array.isArray(t)?t:[t])}function o(t){for(let e of t){if(void 0!==e._targetOpacity){let t=e._targetOpacity;e.style={...e.style||{},opacity:0===t?0:t},e._targetOpacity=void 0}if("point"===e.type)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("glyph"===e.type)void 0!==e._targetX&&(e.x=e._targetX,e.y=e._targetY,void 0!==e._targetR&&(e.size=e._targetR),e._targetX=void 0,e._targetY=void 0,e._targetR=void 0);else if("rect"===e.type||"heatcell"===e.type)void 0!==e._targetX&&(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 if("candlestick"===e.type)void 0!==e._targetX&&(e.x=e._targetX,void 0!==e._targetOpenY&&(e.openY=e._targetOpenY),void 0!==e._targetCloseY&&(e.closeY=e._targetCloseY),void 0!==e._targetHighY&&(e.highY=e._targetHighY),void 0!==e._targetLowY&&(e.lowY=e._targetLowY),e._targetX=void 0,e._targetOpenY=void 0,e._targetCloseY=void 0,e._targetHighY=void 0,e._targetLowY=void 0);else if("line"===e.type||"area"===e.type){if(e._introClipFraction=void 0,"line"===e.type&&e._targetPath){for(let t=0;t<e.path.length;t++)e.path[t]=e._targetPath[t];e._prevPath=void 0,e._targetPath=void 0}if("area"===e.type){if(e._targetTopPath)for(let t=0;t<e.topPath.length;t++)e.topPath[t]=e._targetTopPath[t];if(e._targetBottomPath)for(let t=0;t<e.bottomPath.length;t++)e.bottomPath[t]=e._targetBottomPath[t];e._prevTopPath=void 0,e._prevBottomPath=void 0,e._targetTopPath=void 0,e._targetBottomPath=void 0}}}}function c(t){for(let e of t){if(void 0!==e._targetOpacity){let t=e._targetOpacity;e.style={...e.style||{},opacity:0===t?0:t},e._targetOpacity=void 0}"point"===e.type?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):void 0!==e._targetR&&(e.r=e._targetR,e._targetR=void 0):"rect"===e.type?void 0!==e._targetX&&(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):"wedge"===e.type&&void 0!==e._targetStartAngle&&(e.startAngle=e._targetStartAngle,e.endAngle=e._targetEndAngle,e._targetStartAngle=void 0,e._targetEndAngle=void 0)}}function g(t,e,i){return"exact"===i?function(t,e){let i=t.domain(),r=i[0],n=i[i.length-1],a=r instanceof Date,s=r instanceof Date?r.getTime():r,l=n instanceof Date?n.getTime():n;if(e<2||s===l)return a?[new Date(s),new Date(l)]:[s,l];let h=(l-s)/(e-1),u=new Array(e);for(let t=0;t<e;t++){let i=t===e-1?l:s+t*h;u[t]=a?new Date(i):i}return u}(t,e):t.ticks(e)}import{b as d,u as f,w as _}from"./c-L6OT4OVA.min.js";import{useRef as m,useCallback as p}from"react";import{jsx as v}from"react/jsx-runtime";var y=class{constructor(){this._min=1/0,this._max=-1/0,this._dirty=!1}push(t){Number.isFinite(t)&&(t<this._min&&(this._min=t),t>this._max&&(this._max=t))}evict(t){(t===this._min||t===this._max)&&(this._dirty=!0)}recalculate(t,e){this._min=1/0,this._max=-1/0;for(let i of t){let t=e?e(i):i;Number.isFinite(t)&&(t<this._min&&(this._min=t),t>this._max&&(this._max=t))}this._dirty=!1}clear(){this._min=1/0,this._max=-1/0,this._dirty=!1}get extent(){return[this._min,this._max]}get min(){return this._min}get max(){return this._max}get dirty(){return this._dirty}},k=class{constructor(t,e){this.lastBoundedData=null,this.chunkTimer=null,this.pushBuffer=[],this.flushScheduled=!1,this.callback=t,this.chunkThreshold=i(e?.chunkThreshold),this.chunkSize=r(e?.chunkSize)}updateChunkOptions(t){this.chunkThreshold=i(t.chunkThreshold),this.chunkSize=r(t.chunkSize)}clearLastData(){this.lastBoundedData=null,this.pushBuffer=[],this.flushScheduled=!1,null!==this.chunkTimer&&(cancelAnimationFrame(this.chunkTimer),this.chunkTimer=null)}setBoundedData(t){if(t=d(t),this.lastBoundedData===t)return;if(this.lastBoundedData=t,null!==this.chunkTimer&&(cancelAnimationFrame(this.chunkTimer),this.chunkTimer=null),t.length<=this.chunkThreshold)return void this.callback({inserts:t,bounded:!0});this.callback({inserts:t.slice(0,this.chunkSize),bounded:!0,totalSize:t.length});let e=this.chunkSize,i=()=>{if(e>=t.length)return void(this.chunkTimer=null);if(t!==this.lastBoundedData)return void(this.chunkTimer=null);let r=Math.min(e+this.chunkSize,t.length);this.callback({inserts:t.slice(e,r),bounded:!1}),e=r,e<t.length?this.chunkTimer=requestAnimationFrame(i):this.chunkTimer=null};e<t.length?this.chunkTimer=requestAnimationFrame(i):this.chunkTimer=null}setReplacementData(t){if(t=d(t),this.lastBoundedData=t,null!==this.chunkTimer&&(cancelAnimationFrame(this.chunkTimer),this.chunkTimer=null),this.pushBuffer=[],this.flushScheduled=!1,t.length<=this.chunkThreshold)return void this.callback({inserts:t,bounded:!0,preserveCategoryOrder:!0});this.callback({inserts:t.slice(0,this.chunkSize),bounded:!0,preserveCategoryOrder:!0,totalSize:t.length});let e=this.chunkSize,i=()=>{if(e>=t.length)return void(this.chunkTimer=null);if(t!==this.lastBoundedData)return void(this.chunkTimer=null);let r=Math.min(e+this.chunkSize,t.length);this.callback({inserts:t.slice(e,r),bounded:!1}),e=r,e<t.length?this.chunkTimer=requestAnimationFrame(i):this.chunkTimer=null};e<t.length?this.chunkTimer=requestAnimationFrame(i):this.chunkTimer=null}flushPushBuffer(){if(this.flushScheduled=!1,0===this.pushBuffer.length)return;let t=this.pushBuffer;this.pushBuffer=[],this.callback({inserts:t,bounded:!1})}scheduleFlush(){this.flushScheduled||(this.flushScheduled=!0,queueMicrotask(()=>this.flushPushBuffer()))}push(t){null==t||"object"!=typeof t||(this.pushBuffer.push(t),this.scheduleFlush())}pushMany(t){if(0===t.length)return;let e=0;for(let i=0;i<t.length;i++){let r=t[i];null==r||"object"!=typeof r||(this.pushBuffer.push(r),e++)}0!==e&&this.scheduleFlush()}flush(){this.flushPushBuffer()}clear(){null!==this.chunkTimer&&(cancelAnimationFrame(this.chunkTimer),this.chunkTimer=null),this.lastBoundedData=null,this.pushBuffer=[],this.flushScheduled=!1}};export{t as a,e as b,k as c,y as d,u as e,o as f,c as g,g as h,n as i,a as j,l as k,h as l};
@@ -0,0 +1 @@
1
+ function t(t){return{opacity:t?.opacity??1,fillOpacity:t?.fillOpacity,strokeOpacity:t?.strokeOpacity}}function n(t,n){return"linear"===n?t:1-Math.pow(1-t,3)}function a(t,n){let a=t-n.startTime;return Math.min(a/n.duration,1)}function i(t,n,a){return t+(n-t)*a}function r(){return globalThis.performance?.now()??Date.now()}function e(t,n){return{transition:!1===t?void 0:t?!0===t?{duration:300}:{duration:t.duration??300,easing:"linear"===t.easing?"linear":"ease-out"}:n,introEnabled:!(!t||globalThis.window?.matchMedia?.("(prefers-reduced-motion: reduce)").matches||!0!==t&&!1===t.intro)}}export{t as a,n as b,a as c,i as d,r as e,e as f};
@@ -0,0 +1,2 @@
1
+ import{b as e}from"./c-MSZ3ZDAP.min.js";import{b as t}from"./c-BR2TOCUN.min.js";import{a as i}from"./c-ORLEBW72.min.js";import{c as r}from"./c-OMTJIC3P.min.js";import{a as n,h as a,i as o,b as s,d as l,e as c,k as u,n as h,j as p}from"./c-5KZ3NO6X.min.js";import{b as d}from"./c-TFESQSWE.min.js";import{a as f,b as g}from"./c-V4XMSLC3.min.js";import{b as m}from"./c-LDGV6TDQ.min.js";import{f as y,e as v,d as b,a as w,s as P,v as R,t as S,u as x,G as k,o as A,l as C,j as L,y as D,z as M,B as j,h as T,i as B,O as I,x as _,C as E,q as N,D as O,g as F,r as z,Q as W,P as H}from"./c-NB2UEX5C.min.js";import{b as G}from"./c-TX53234M.min.js";import{c as q}from"./c-363Q2L4Z.min.js";import{a as Z,b as $}from"./c-O7SPJAUO.min.js";import{k as X,l as U,b as Y,E as Q,Q as V,J as K,K as J,U as ee,A as te,ak as ie,Z as re,ac as ne,W as ae,X as oe,aF as se,aK as le,ai as ce,ae as ue,aY as he,aC as pe,al as de,am as fe,an as ge,m as me,aG as ye,ag as ve,aj as be,G as we,aU as Pe,aD as Re,af as Se,aE as xe,au as ke,aT as Ae,aw as Ce,ay as Le,o as De,ao as Me,aH as je,aA as Te,aS as Be,a_ as Ie}from"./c-L6OT4OVA.min.js";import{a as _e}from"./c-SIQVOV6A.min.js";import{p as Ee}from"./c-WPL6PGP3.min.js";import{i as Ne,k as Oe,p as Fe,s as ze,c as We}from"./c-JDI7HKEM.min.js";import{i as He}from"./c-ELGOCAEY.min.js";import{C as Ge,x as qe,h as Ze,w as $e,D as Xe}from"./c-HTL37JCD.min.js";import{e as Ue,c as Ye,b as Qe,d as Ve}from"./c-YCBCZFOC.min.js";import{c as Ke}from"./c-GRTKU3C7.min.js";import*as Je from"react";import{useEffect as et,useLayoutEffect as tt,useCallback as it,useImperativeHandle as rt,useRef as nt,useMemo as at,useId as ot,useSyncExternalStore as st,memo as lt,forwardRef as ct,useState as ut}from"react";import{geoPath as ht,geoEquirectangular as pt,geoNaturalEarth1 as dt,geoOrthographic as ft,geoAlbersUsa as gt,geoEqualEarth as mt,geoMercator as yt,geoGraticule as vt,geoDistance as bt,geoInterpolate as wt}from"d3-geo";import{quadtree as Pt}from"d3-quadtree";import{scaleLinear as Rt}from"d3-scale";import{select as St}from"d3-selection";import{zoomIdentity as xt,zoom as kt}from"d3-zoom";import{jsxs as At,Fragment as Ct,jsx as Lt}from"react/jsx-runtime";var Dt=X?et:tt,Mt=/*#__PURE__*/new WeakMap;function jt(e,t){Mt.set(e,t)}function Tt(e,t){let i,r=new Map;return e.map(e=>{let n=Mt.get(e);if(void 0!==n)return n;if(!i){let e=new Map;i=e,t.forEach((t,i)=>{let r=e.get(t);r?r.push(i):e.set(t,[i])})}let a=r.get(e.datum)??0;return r.set(e.datum,a+1),i.get(e.datum)?.[a]??-1})}function Bt(e){return{projection:e,geoPath:ht(e),projectedPoint:(t,i)=>e([t,i]),invertedPoint:(t,i)=>e.invert?.([t,i])??null}}var It={mercator:yt,equalEarth:mt,albersUsa:gt,orthographic:ft,naturalEarth:dt,equirectangular:pt};function _t(e,t){return e?"function"==typeof e?e:t=>t[e]:e=>e[t]}function Et(e){return e?"function"==typeof e?e:t=>t[e]:e=>e.coordinates||e.data||[]}function Nt(e,t,i){return e?"function"==typeof e?{...i,...e(t)}:{...i,...e}:{...i}}function Ot(e,t){if(e.length<2)return[e];let i=.4*t,r=[],n=[e[0]];for(let t=1;t<e.length;t++){let a=e[t-1],o=e[t];Math.abs(o[0]-a[0])>i?(n.length>=2&&r.push(n),n=[o]):n.push(o)}return n.length>=2&&r.push(n),r}function Ft(e,t,i=24){let r=t[0]-e[0],n=t[1]-e[1],a=Math.sqrt(r*r+n*n);if(0===a)return[e,t];let o=-n/a,s=r/a,l=Math.min(.3*a,80),c=(e[0]+t[0])/2+o*l,u=(e[1]+t[1])/2+s*l,h=[];for(let r=0;r<=i;r++){let n=r/i,a=1-n,o=a*a*e[0]+2*a*n*c+n*n*t[0],s=a*a*e[1]+2*a*n*u+n*n*t[1];h.push([o,s])}return h}function zt(e,t){if(e.length<2)return e;let i=t/2+1,r=[];for(let t=0;t<e.length;t++){let n,a,o=e[t];0===t?(n=e[1][0]-o[0],a=e[1][1]-o[1]):t===e.length-1?(n=o[0]-e[t-1][0],a=o[1]-e[t-1][1]):(n=e[t+1][0]-e[t-1][0],a=e[t+1][1]-e[t-1][1]);let s=Math.sqrt(n*n+a*a)||1,l=a/s,c=-n/s;r.push([o[0]+l*i,o[1]+c*i])}return r}function Wt(e,t,i,r,n){let a=t[0]-e[0],o=t[1]-e[1],s=Math.sqrt(a*a+o*o);if(0===s)return[e,t];let l=o/s,c=-a/s,u=n/2+1;return[[e[0]+l*u,e[1]+c*u],[t[0]+l*u,t[1]+c*u]]}var Ht=["data","domain","layout","scene-geometry","data-paint","overlay","accessibility","evidence"],Gt=["scene-style","data-paint","accessibility","evidence"],qt=(e,t)=>({retainedData:e,invalidations:t}),Zt=["domain","layout","scene-geometry","data-paint","overlay","accessibility","evidence"],$t=["domain","layout","scene-geometry","data-paint","overlay","accessibility","evidence"],Xt=["scene-geometry","data-paint","accessibility","evidence"],Ut=["scene-style","data-paint","accessibility","evidence"],Yt=["scene-geometry","scene-style","data-paint","accessibility","evidence"],Qt=["overlay","accessibility","evidence"],Vt=[],Kt={xAccessor:/*#__PURE__*/qt("rebuild",Zt),yAccessor:/*#__PURE__*/qt("rebuild",Zt),lineDataAccessor:/*#__PURE__*/qt("rebuild",Zt),pointIdAccessor:/*#__PURE__*/qt("rebuild",Xt),lineIdAccessor:/*#__PURE__*/qt("rebuild",Xt),windowSize:/*#__PURE__*/qt("rebuild",Zt),projection:/*#__PURE__*/qt("preserve",$t),projectionExtent:/*#__PURE__*/qt("preserve",$t),fitPadding:/*#__PURE__*/qt("preserve",$t),lineType:/*#__PURE__*/qt("preserve",$t),flowStyle:/*#__PURE__*/qt("preserve",$t),graticule:/*#__PURE__*/qt("preserve",$t),projectionTransform:/*#__PURE__*/qt("preserve",$t),customLayout:/*#__PURE__*/qt("preserve",$t),layoutConfig:/*#__PURE__*/qt("preserve",$t),layoutMargin:/*#__PURE__*/qt("preserve",$t),areaStyle:/*#__PURE__*/qt("preserve",Ut),pointStyle:/*#__PURE__*/qt("preserve",Yt),lineStyle:/*#__PURE__*/qt("preserve",Ut),colorScheme:/*#__PURE__*/qt("preserve",Ut),themeCategorical:/*#__PURE__*/qt("preserve",Ut),themeDiverging:/*#__PURE__*/qt("preserve",Ut),themeSemantic:/*#__PURE__*/qt("preserve",Ut),themeSequential:/*#__PURE__*/qt("preserve",Ut),decay:/*#__PURE__*/qt("preserve",Ut),pulse:/*#__PURE__*/qt("preserve",Ut),layoutSelection:/*#__PURE__*/qt("preserve",Ut),annotations:/*#__PURE__*/qt("preserve",Qt),autoPlaceAnnotations:/*#__PURE__*/qt("preserve",Qt),clock:/*#__PURE__*/qt("preserve",Vt),transition:/*#__PURE__*/qt("preserve",Vt),introAnimation:/*#__PURE__*/qt("preserve",Vt),onLayoutError:/*#__PURE__*/qt("preserve",Vt)},Jt=/*#__PURE__*/qt("preserve",$t),ei=class{constructor(){this.tracker=new U}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}},Ht)}recordNoop(e){return this.tracker.record({kind:e,..."restyle"===e?{}:{count:0}},[])}recordRestyle(e){return e?this.tracker.record({kind:"restyle"},Gt):this.recordNoop("restyle")}recordConfig(e,t={}){let i=function(e){let t="preserve",i=new Set;for(let r of e){let e=Object.prototype.hasOwnProperty.call(Kt,r)?Kt[r]:Jt;"rebuild"===e.retainedData&&(t="rebuild");for(let t of e.invalidations)i.add(t)}return{retainedData:t,invalidations:i}}(e),r=new Set(i.invalidations);return t.retainedDataChanged&&r.add("data"),this.tracker.record({kind:"config",keys:e},r)}};function ti(e){if(null==e)return 0;if("number"==typeof e&&Number.isFinite(e)&&e>=0&&e<.5)return e;throw new RangeError(`[semiotic] fitPadding must be a finite fraction in [0, 0.5); received ${String(e)}.`)}var ii=class extends y{constructor(e){super(),this.updateResults=new ei,this.scene=[],this.scales=null,this.version=0,this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this.lastCustomLayoutFailure=null,this._customLayoutDiagnosticsWarned=new Set,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,this._customLayoutFailedThisBuild=!1,this._quadtree=null,this._maxPointRadius=0,this.projection=null,this.geoPath=null,this.baseScale=0,this.baseTranslate=[0,0],this.baseRotation=[0,0,0],this.currentZoom=1,this.cartogramLayout=null,this.areas=[],this.pointData=[],this.lineData=[],this.pointBuffer=null,this.streaming=!1,this.lastIngestTime=0,this.timestampBuffer=null,this.activeTransition=null,this.prevPositions=null,this._hasRenderedOnce=!1,this.config=function(e){return{...e,fitPadding:ti(e.fitPadding)}}(e)}currentTime(){return this.config.clock?.()??Ue()}getConfiguredWindowSize(){let e=this.config.windowSize??500;if(!Number.isInteger(e)||e<1)throw new Error("GeoPipelineStore windowSize must be a positive integer");return e}retainNewestLines(e=this.getConfiguredWindowSize()){this.lineData.length>e&&(this.lineData=this.lineData.slice(-e))}resizeStreamingWindow(e){if(this.pointBuffer){let t=this.pointBuffer.toArray(),i=this.timestampBuffer?.toArray()??[],r=t.slice(-e),a=i.slice(-r.length),o=this.currentTime();this.pointBuffer=new n(e),this.timestampBuffer=new n(e),r.forEach((e,t)=>{this.pointBuffer.push(e),this.timestampBuffer.push(a[t]??o)})}this.retainNewestLines(e)}updateConfig(e){let t=function(e){return"fitPadding"in e?{...e,fitPadding:ti(e.fitPadding)}:e}(e),i=this.config,r=this.getConfiguredWindowSize(),n=Object.keys(t).filter(e=>t[e]!==i[e]);this.config={...this.config,...t};let a=this.getConfiguredWindowSize(),o=this.streaming&&a!==r;o&&(this.resizeStreamingWindow(a),this.version++),"customLayout"in t&&!t.customLayout&&(this.lastCustomLayoutFailure=null),this.updateResults.recordConfig(n,{retainedDataChanged:o})}updateConfigWithResult(e){return this.updateConfig(e),this.updateResults.last}setAreas(e){this.areas=e,this.updateResults.recordData("replace",e.length)}setAreasWithResult(e){return this.setAreas(e),this.updateResults.last}setPoints(e){this.pointData=e.slice(),this.pointBuffer=null,this.timestampBuffer=null,this.streaming=!1,this.updateResults.recordData("replace",e.length)}setPointsWithResult(e){return this.setPoints(e),this.updateResults.last}setLines(e){this.lineData=e.slice(),this.streaming&&this.retainNewestLines(),this.updateResults.recordData("replace",e.length)}setLinesWithResult(e){return this.setLines(e),this.updateResults.last}initStreaming(e){void 0!==e&&e!==this.config.windowSize&&(this.config={...this.config,windowSize:e});let t=this.getConfiguredWindowSize(),i=this.pointBuffer?this.pointBuffer.toArray():this.pointData,r=this.timestampBuffer?.toArray()??[],a=i.slice(-t),o=r.slice(-a.length),s=this.currentTime();this.pointBuffer=new n(t),this.timestampBuffer=new n(t),a.forEach((e,t)=>{this.pointBuffer.push(e),this.timestampBuffer.push(o[t]??s)}),this.pointData=[],this.retainNewestLines(t),this.streaming=!0}pushPoint(e){this.pointBuffer||this.initStreaming();let t=this.currentTime();a(this.pointBuffer,e,this.timestampBuffer,t),this.lastIngestTime=t,this.updateResults.recordData("ingest",1)}pushPointWithResult(e){return this.pushPoint(e),this.updateResults.last}pushMany(e){this.pointBuffer||this.initStreaming();let t=this.currentTime();for(let i of e)a(this.pointBuffer,i,this.timestampBuffer,t);this.lastIngestTime=t,this.updateResults.recordData("ingest",e.length)}pushManyWithResult(e){return this.pushMany(e),this.updateResults.last}pushLine(e){null!=e&&"object"==typeof e?(this.streaming||this.initStreaming(),this.lineData.push(e),this.retainNewestLines(),this.version++,this.updateResults.recordData("ingest",1)):this.updateResults.recordNoop("ingest")}pushManyLines(e){if(!Array.isArray(e)||0===e.length)return void this.updateResults.recordNoop("ingest");let t=e.filter(e=>null!=e&&"object"==typeof e);if(0!==t.length){this.streaming||this.initStreaming();for(let e of t)this.lineData.push(e);this.retainNewestLines(),this.version++,this.updateResults.recordData("ingest",t.length)}else this.updateResults.recordNoop("ingest")}removeLine(e){let{lineIdAccessor:t}=this.config;if(!t)throw new Error("removeLine() requires lineIdAccessor to be configured");let i="function"==typeof t?t:e=>e[t],r=new Set(Array.isArray(e)?e:[e]),n=[];return this.lineData=this.lineData.filter(e=>!r.has(String(i(e)))||(n.push(e),!1)),n.length>0?(this.version++,this.updateResults.recordData("remove",n.length)):this.updateResults.recordNoop("remove"),n}getLines(){return this.lineData.slice()}removePoint(e){let{pointIdAccessor:t}=this.config;if(!t)throw new Error("removePoint() requires pointIdAccessor to be configured");let i="function"==typeof t?t:e=>e[t],r=new Set(Array.isArray(e)?e:[e]);if(this.streaming&&this.pointBuffer){let e=e=>r.has(String(i(e)));o(this.pointBuffer,this.timestampBuffer,e);let t=this.pointBuffer.remove(e);return t.length>0?(this.version++,this.updateResults.recordData("remove",t.length)):this.updateResults.recordNoop("remove"),t}{let e=[];return this.pointData=this.pointData.filter(t=>!r.has(String(i(t)))||(e.push(t),!1)),e.length>0?(this.version++,this.updateResults.recordData("remove",e.length)):this.updateResults.recordNoop("remove"),e}}clear(){this.areas=[],this.pointData=[],this.lineData=[],this.pointBuffer=null,this.timestampBuffer=null,this.streaming=!1,this.scene=[],this.scales=null,this._hasRenderedOnce=!1,this.activeTransition=null,this.prevPositions=null,this._quadtree=null,this._maxPointRadius=0,this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this.lastCustomLayoutFailure=null,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,this._customLayoutFailedThisBuild=!1,this.version++,this.updateResults.recordData("clear")}restyleScene(e){let t=this._customRestyle;if(t){for(let i of this.scene){let r=this._baseStyles.get(i)??i.style,n=t(i,e);i.style=n?{...r,...n}:r}this.markStylePaintPending(),this.updateResults.recordRestyle(!0)}else this.updateResults.recordRestyle(!1)}rebuildProjectedScene(e,t){this._customLayoutFailedThisBuild=!1;let i=this.buildSceneNodes(e);return this._customLayoutFailedThisBuild?(this.lastCustomLayoutFailure?.preservedLastGoodScene?t():(this.scene=[],this.rebuildQuadtree()),!1):(this.scene=i,this.rebuildQuadtree(),!0)}computeScene(e){let{config:t}=this,i=this.projection,r=this.geoPath,n=this.scales,a=this.baseScale,o=[...this.baseTranslate],s=[...this.baseRotation],l=this.scene;this.projection=function(e){if(!e)return mt();if("string"==typeof e){let t=It[e];return t?t():("production"!==process.env.NODE_ENV&&console.warn(`GeoFrame: Unknown projection "${e}", falling back to equalEarth`),mt())}if("object"==typeof e&&"type"in e){let t=It[e.type],i=t?t():mt();return e.rotate&&"rotate"in i&&i.rotate(e.rotate),e.center&&"center"in i&&i.center(e.center),i}return e}(t.projection),this.geoPath=ht(this.projection),this.fitProjection(e),this.geoPath=ht(this.projection);let c=this.projection;if(this.scales=Bt(c),this.geoPath=this.scales.geoPath,this.rebuildProjectedScene(e,()=>{this.projection=i,this.geoPath=r,this.scales=n,this.baseScale=a,this.baseTranslate=o,this.baseRotation=s})){if(t.projectionTransform&&this.applyCartogramTransform(t.projectionTransform,e),t.decay&&this.streaming&&this.applyDecay(),t.pulse&&this.streaming&&this.applyPulse(),t.transition&&!this._hasRenderedOnce&&this.scene.length>0&&t.introAnimation){let t=e.width/2,i=e.height/2,r=this.scene.filter(e=>"point"===e.type).map(e=>({...e,x:t,y:i}));r.length>0&&this.startTransition(r)}this._hasRenderedOnce=!0,t.transition&&l.length>0&&this.startTransition(l),this.version++}}fitProjection(e){let t=this.projection,i=this.config,r=[...this.areas],n=_t(i.xAccessor,"lon"),a=_t(i.yAccessor,"lat"),o=this.getPoints();if(o.length>0){let e=o.map(e=>[n(e),a(e)]).filter(e=>e.every(Number.isFinite));r.push({type:"Feature",properties:{},geometry:{type:"MultiPoint",coordinates:e}})}let s=Et(i.lineDataAccessor);for(let e of this.lineData){let t=s(e);if(t&&t.length>0){let e=t.map(e=>[n(e),a(e)]);r.push({type:"Feature",properties:{},geometry:{type:"LineString",coordinates:e}})}}if(0!==r.length){if(i.projectionExtent){let[[r,n],[a,o]]=i.projectionExtent,s={type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[[r,n],[r,o],[a,o],[a,n],[r,n]]]}};t.fitExtent([[0,0],[e.width,e.height]],s)}else if(t.clipAngle&&(t.clipAngle()??0)>0){let r=i.fitPadding??0,n=Math.min(e.width,e.height),a=n/2-n*r;t.scale(a),t.translate([e.width/2,e.height/2])}else{let n={type:"FeatureCollection",features:r},a=i.fitPadding??0,o=e.width*a,s=e.height*a;t.fitExtent([[o,s],[e.width-o,e.height-s]],n),function(e,t,i){if(Number.isFinite(e.scale())&&e.translate().every(Number.isFinite))return;e.scale(Math.max(1,Math.min(i.width,i.height)/(2*Math.PI))),e.translate([i.width/2,i.height/2]);let r=ht(e).bounds(t);if(!r.flat().every(Number.isFinite))return;let n=e.translate();e.translate([n[0]+i.width/2-(r[0][0]+r[1][0])/2,n[1]+i.height/2-(r[0][1]+r[1][1])/2])}(t,n,e)}this.baseScale=t.scale(),this.baseTranslate=t.translate(),this.baseRotation=t.rotate?.()??[0,0,0]}}applyZoomTransform(e,t){let i=this.projection;if(!i)return;let r=this.geoPath,n=this.scales,a=i.scale(),o=[...i.translate()],s=this.currentZoom;i.scale(this.baseScale*e.k),i.translate([this.baseTranslate[0]*e.k+e.x,this.baseTranslate[1]*e.k+e.y]),this.currentZoom=e.k,this.geoPath=ht(i),this.scales=Bt(i),this.geoPath=this.scales.geoPath,this.rebuildProjectedScene(t,()=>{i.scale(a),i.translate(o),this.currentZoom=s,this.geoPath=r,this.scales=n})&&(this.config.projectionTransform&&this.applyCartogramTransform(this.config.projectionTransform,t),this.version++)}applyZoomScale(e,t){let i=this.projection;if(!i)return;let r=this.geoPath,n=this.scales,a=i.scale(),o=[...i.translate()],s=this.currentZoom;i.scale(this.baseScale*e),i.translate(this.baseTranslate),this.currentZoom=e,this.geoPath=ht(i),this.scales=Bt(i),this.geoPath=this.scales.geoPath,this.rebuildProjectedScene(t,()=>{i.scale(a),i.translate(o),this.currentZoom=s,this.geoPath=r,this.scales=n})&&(this.config.projectionTransform&&this.applyCartogramTransform(this.config.projectionTransform,t),this.version++)}applyRotation(e,t){let i=this.projection;if(!i||!i.rotate)return;let r=this.geoPath,n=this.scales,a=[...i.rotate()];i.rotate(e),this.geoPath=ht(i),this.scales=Bt(i),this.geoPath=this.scales.geoPath,this.rebuildProjectedScene(t,()=>{i.rotate(a),this.geoPath=r,this.scales=n})&&(this.config.projectionTransform&&this.applyCartogramTransform(this.config.projectionTransform,t),this.version++)}setRotation(e){let t=this.projection;!t||!t.rotate||t.rotate(e)}hasProjection(){return null!=this.projection}getRotation(){return this.projection?.rotate?.()??this.baseRotation}getBaseProjectionState(){return{scale:this.baseScale,translate:[...this.baseTranslate]}}getPoints(){return this.streaming&&this.pointBuffer?this.pointBuffer.toArray():this.pointData}rebuildQuadtree(){let e=0,t=0;for(let i of this.scene)"point"===i.type&&!1!==i.interactive&&(t++,i.r>e&&(e=i.r));if(this._maxPointRadius=e,t<=500)return void(this._quadtree=null);let i=new Array(t),r=0;for(let e of this.scene)"point"===e.type&&!1!==e.interactive&&(i[r++]=e);this._quadtree=Pt().x(e=>e.x).y(e=>e.y).addAll(i)}get quadtree(){return this._quadtree}get maxPointRadius(){return this._maxPointRadius}buildSceneNodes(e){this._customLayoutFailedThisBuild=!1;let{config:t}=this,i=this.projection,r=this.geoPath;if(t.customLayout&&this.scales){let i=t.layoutMargin??{top:0,right:0,bottom:0,left:0},r=Z(t.colorScheme,t.themeCategorical,Ee),n={areas:this.areas.slice(),points:this.getPoints().slice(),lines:this.lineData.slice(),scales:this.scales,dimensions:{width:e.width,height:e.height,margin:i,plot:{x:0,y:0,width:e.width,height:e.height}},theme:{semantic:t.themeSemantic??{},categorical:[...r]},resolveColor:$(r,t.colorScheme),config:t.layoutConfig??{},selection:t.layoutSelection??null},a=v({family:"geo",logLabel:"geo customLayout",revision:this.version,hasPreviousResult:null!==this.lastCustomLayoutResult,onLayoutError:t.onLayoutError,run:()=>t.customLayout(n)});if("failure"===a.kind)return this.lastCustomLayoutFailure=a.diagnostic,this._customLayoutFailedThisBuild=!0,a.preservedLastGoodScene?this.scene:(this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,[]);let o=a.result,s=o.nodes??[];if(this.customLayoutOverlays=o.overlays??null,this.lastCustomLayoutResult=o,this.lastCustomLayoutFailure=null,this._customRestyle=o.restyle,this.hasCustomRestyle=!!o.restyle,this._baseStyles=new WeakMap,this.hasCustomRestyle)for(let e of s){this._baseStyles.set(e,e.style);let i=o.restyle?.(e,t.layoutSelection??null);i&&(e.style={...e.style,...i})}return b({label:"geo customLayout",nodes:s,overlays:this.customLayoutOverlays,warned:this._customLayoutDiagnosticsWarned}),s}return this.customLayoutOverlays=null,this.lastCustomLayoutResult=null,this.lastCustomLayoutFailure=null,this._customRestyle=void 0,this.hasCustomRestyle=!1,this._baseStyles=new WeakMap,function({config:e,projection:t,path:i,areas:r,points:n,lines:a,layout:o}){let s=_t(e.xAccessor,"lon"),l=_t(e.yAccessor,"lat"),c=[],u=function(e){return{fill:e.themeSemantic?.surface||"#e0e0e0",stroke:e.themeSemantic?.border||"#999",strokeWidth:.5,fillOpacity:1}}(e),h=function(e){return{stroke:e.themeSemantic?.primary||"#4e79a7",strokeWidth:1.5,fill:"none"}}(e),p=function(e){return{fill:e.themeSemantic?.primary||"#4e79a7",r:4,fillOpacity:.8}}(e);if(e.graticule){let t=!0===e.graticule?{}:e.graticule,r=vt();t.step&&r.step(t.step);let n=i(r())||"";n&&c.push({type:"geoarea",pathData:n,centroid:[o.width/2,o.height/2],bounds:[[0,0],[o.width,o.height]],screenArea:0,style:{fill:"none",stroke:t.stroke||"#e0e0e0",strokeWidth:t.strokeWidth??.5,strokeDasharray:t.strokeDasharray||"2,2"},datum:null,interactive:!1})}for(let t of r){let r=i(t);if(!r)continue;let n=i.centroid(t),a=i.bounds(t),o=i.area(t);c.push({type:"geoarea",pathData:r,centroid:n,bounds:a,screenArea:o,style:Nt(e.areaStyle,t,u),datum:t,interactive:!0})}let d=Et(e.lineDataAccessor);for(let i of a){let r=d(i);if(!r||r.length<2)continue;let n=[];if("geo"===e.lineType){let e=new Array(r.length);for(let t=0;t<r.length;t++)e[t]=[s(r[t]),l(r[t])];for(let i=0;i<e.length-1;i++){let r=e[i],a=e[i+1],o=bt(r,a)||0,s=Math.max(2,Math.ceil(o/(Math.PI/180))),l=wt(r,a);for(let e=0;e<=s;e++){if(i>0&&0===e)continue;let r=t(l(e/s));null!=r&&n.push(r)}}}else for(let e=0;e<r.length;e++){let i=r[e],a=t([s(i),l(i)]);null!=a&&n.push(a)}if(n.length<2)continue;let a=Nt(e.lineStyle,i,h),u="number"==typeof a.strokeWidth?a.strokeWidth:1;2===r.length&&n.length>=2&&"arc"===e.flowStyle?n=Ft(n[0],n[n.length-1]):2===r.length&&n.length>=2&&"offset"===e.flowStyle&&(n="geo"===e.lineType?zt(n,u):Wt(n[0],n[n.length-1],0,0,u));let p=Ot(n,o.width);if(p.length<=1)c.push({type:"line",path:n.length>=2?n:p[0]||n,style:a,datum:i});else for(let e of p)e.length<2||c.push({type:"line",path:e,style:{...a,_edgeFade:!0},datum:i})}let f=e.pointIdAccessor?"function"==typeof e.pointIdAccessor?e.pointIdAccessor:t=>t[e.pointIdAccessor]:null,g=t.clipAngle?t.clipAngle()??0:0,m=g>0?g*Math.PI/180:null,y=t.rotate?t.rotate():[0,0,0],v="function"==typeof t.center?t.center():[0,0],b=[(v[0]??0)-y[0],(v[1]??0)-y[1]];for(let[i,r]of n.entries()){let n=s(r),a=l(r);if(!Number.isFinite(n)||!Number.isFinite(a)||null!=m&&bt([n,a],b)>m)continue;let o=t([n,a]);if(!o||!Number.isFinite(o[0])||!Number.isFinite(o[1]))continue;let u=e.pointStyle?e.pointStyle(r):{...p},h={type:"point",x:o[0],y:o[1],r:u.r||4,style:u,datum:r,pointId:f?String(f(r)):void 0};jt(h,i),c.push(h)}return c}({config:t,projection:i,path:r,areas:this.areas,points:this.getPoints(),lines:this.lineData,layout:e})}applyCartogramTransform(e,t){let i=function(e,t,i,r){let n=e.filter(e=>"point"===e.type);if(n.length<2)return null;let a=t.strength??1,o=Number.isFinite(a)?Math.max(0,Math.min(1,a)):1,s="strip"===t.layout?"strip":"radial";if("radial"===s&&0===o)return null;let l=t.centerAccessor?"function"==typeof t.centerAccessor?t.centerAccessor:e=>e[t.centerAccessor]:e=>e.id,c="function"==typeof t.costAccessor?t.costAccessor:e=>e[t.costAccessor],u=n.find(e=>e.datum&&String(l(e.datum))===String(t.center));if(!u)return"production"!==process.env.NODE_ENV&&console.warn(`GeoFrame: Distance cartogram center "${t.center}" not found in point data`),null;let h=n.map(e=>e.datum?Number(c(e.datum)):NaN).filter(e=>isFinite(e)&&e>=0),p=Ke(h,1);r>0&&"production"!==process.env.NODE_ENV&&console.warn("GeoFrame: Distance cartogram does not support area rendering. Areas will be ignored. Remove areas or set projectionTransform to null to render them.");for(let t=e.length-1;t>=0;t--){let i=e[t];"geoarea"===i.type&&i.interactive&&e.splice(t,1)}let d="strip"===s?function(e,t,i,r,n){let a=Math.max(3,Math.min(8,.35*n.height)),o=Math.max(1,n.width-2*a),s=n.height/2,l=Rt().domain([0,r]).range([0,o]);t.x=a,t.y=s;let c=[];for(let n of e){if(n===t)continue;if(!n.datum){n.x=a,n.y=s;continue}let e=Number(i(n.datum)),o=a+(isFinite(e)&&e>=0&&r>0?l(e):0);n.x=o,n.y=s,c.push({node:n,x:o})}c.sort((e,t)=>e.x-t.x);let u=Math.max(0,Math.min(n.height/2-1,6)),h=0;for(;h<c.length;){let e=h+1;for(;e<c.length&&Math.abs(c[e].x-c[h].x)<3;)e++;let t=e-h;if(t>1&&u>0)for(let e=0;e<t;e++){let i=e-(t-1)/2,r=Math.min(2.5,2*u/Math.max(1,t-1));c[h+e].node.y=s+i*r}h=e}return{cx:a,cy:s,maxCost:r,availableRadius:o,layout:"strip"}}(n,u,c,p,i):function(e,t,i,r,n,a){let o=t.x,s=t.y,l=a.width/2,c=a.height/2,u=Math.min(a.width,a.height)/2,h=Rt().domain([0,r]).range([0,u]);for(let a of e){if(a===t||!a.datum)continue;let e=a.x,u=a.y,p=Math.atan2(u-s,e-o),d=Math.hypot(e-o,u-s),f=Number(i(a.datum)),g=isFinite(f)&&f>=0?r>0?h(f):0:d,m=l+Math.cos(p)*g,y=c+Math.sin(p)*g;a.x=e+(m-e)*n,a.y=u+(y-u)*n}return t.x=o+(l-o)*n,t.y=s+(c-s)*n,{cx:t.x,cy:t.y,maxCost:r,availableRadius:u,layout:"radial"}}(n,u,c,p,o,i),f=e.filter(e=>"line"===e.type);if(f.length>0){let e=new Map;for(let t of n)null!=t.pointId&&e.set(String(t.pointId),[t.x,t.y]);for(let i of f){let r=i.datum?.source,n=i.datum?.target;if(null!=r&&null!=n){let a=e.get(String(r)),o=e.get(String(n));if(a&&o)if("fractional"===t.lineMode&&i.path.length>2){let e=i.path[0],t=i.path[i.path.length-1],r=[a[0]-e[0],a[1]-e[1]],n=[o[0]-t[0],o[1]-t[1]],s=[0];for(let e=1;e<i.path.length;e++)s.push(s[e-1]+Math.hypot(i.path[e][0]-i.path[e-1][0],i.path[e][1]-i.path[e-1][1]));let l=s[s.length-1];i.path=i.path.map((e,t)=>{let a=l>0?s[t]/l:t/(i.path.length-1);return[e[0]+r[0]*(1-a)+n[0]*a,e[1]+r[1]*(1-a)+n[1]*a]})}else i.path=[a,o]}}}return d}(this.scene,e,t,this.areas.length);i&&(this.cartogramLayout=i)}applyDecay(){let e=this.config.decay;if(!e||!this.pointBuffer)return;let t=this.pointBuffer.size;if(0===t)return;let i=this.scene.filter(e=>"point"===e.type),r=Tt(i,this.getPoints());for(let n=0;n<i.length;n++){if(r[n]<0)continue;let a=w(e,r[n],t);i[n]._decayOpacity=a}}applyPulse(e=this.currentTime()){let t=this.config.pulse;if(!t||!this.timestampBuffer)return!1;let i=this.scene.filter(e=>"point"===e.type),r=this.timestampBuffer.toArray(),n=Tt(i,this.getPoints()),a=t.color||"rgba(255,255,255,0.6)",o=t.glowRadius??4,c=!1;for(let u=0;u<i.length;u++){let h=r[n[u]];if(void 0===h)continue;let p=s(t,h,e);c=l(i[u],p,a,o)||c}return c}refreshPulse(e){return!0!==this.lastCustomLayoutFailure?.preservedLastGoodScene&&this.applyPulse(e)}hasActivePulsesAt(e){return!!this.config.pulse&&c(this.config.pulse,this.timestampBuffer,e)}get hasActivePulses(){return this.hasActivePulsesAt(this.currentTime())}startTransition(e){let t=this.config.transition?.duration??300;if(t<=0)return;let i=new Map;for(let t of e)"point"===t.type&&t.pointId&&i.set(t.pointId,[t.x,t.y]);let r=this.scene.filter(e=>"point"===e.type),n=!1;for(let e of r)if(e.pointId){let t=i.get(e.pointId);t&&(e._targetX=e.x,e._targetY=e.y,e.x=t[0],e.y=t[1],(Math.abs(t[0]-e._targetX)>.5||Math.abs(t[1]-e._targetY)>.5)&&(n=!0))}for(let e of r)e.pointId&&!i.has(e.pointId)&&(e._targetOpacity=e.style?.opacity??1,e.style={...e.style,opacity:0},n=!0);n&&(this.activeTransition={startTime:this.currentTime(),duration:t})}cancelIntroAnimation(){this.activeTransition=null;for(let e of this.scene)"point"===e.type&&(null!=e._targetOpacity&&(e.style={...e.style,opacity:e._targetOpacity},e._targetOpacity=void 0),null!=e._targetX&&(e.x=e._targetX,e.y=e._targetY,e._targetX=void 0,e._targetY=void 0))}advanceTransition(e){if(!this.activeTransition)return!1;let t=Ye(e,this.activeTransition),i=Qe(t,this.config.transition?.easing),r=this.scene.filter(e=>"point"===e.type);for(let e of r){if(null!=e._targetX&&null!=e._targetY){let t=e.x,r=e.y;e.x=Ve(t,e._targetX,i),e.y=Ve(r,e._targetY,i)}null!=e._targetOpacity&&(e.style={...e.style,opacity:e._targetOpacity*i})}if(t>=1){for(let e of r)null!=e._targetX&&(e.x=e._targetX,e.y=e._targetY,e._targetX=void 0,e._targetY=void 0),null!=e._targetOpacity&&(e.style={...e.style,opacity:e._targetOpacity},e._targetOpacity=void 0);return this.activeTransition=null,!1}return!0}};function ri(e){let{width:t,height:i,totalWidth:r,totalHeight:n,margin:a,showAxes:o,title:s,description:l,idPrefix:c,decorative:u=!1,legend:h,legendHoverBehavior:p,legendClickBehavior:d,legendHighlightedCategory:f,legendIsolatedCategories:g,legendPosition:m,legendLayout:y,foregroundGraphics:v,annotations:b,onAnnotationActivate:w,onObservation:k,chartId:A,chartType:C,autoPlaceAnnotations:L,svgAnnotationRules:D,pointNodes:M,geoProjection:j}=e,T=Q({onAnnotationActivate:w,onObservation:k,chartId:A,chartType:C}),B=nt([b?.length??0,new Map]),I=b?.length??0;B.current[0]!==I&&(B.current=[I,new Map]);let _=at(()=>{if(!b||0===b.length)return null;let e=P(b),r=j?e.map(e=>{if(!Array.isArray(e.coordinates)||e.coordinates.length<2)return e;let t=j(Number(e.coordinates[0]),Number(e.coordinates[1]));return t?{...e,x:t[0],y:t[1]}:e}):e,n={scales:{x:e=>Number(e),y:e=>Number(e)},timeAxis:"x",width:t,height:i,frameType:"xy",pointNodes:M,stickyPositionCache:B.current[1]},a=L?V({annotations:r,context:n,..."object"==typeof L?L:{}}):r;return K(a,J("xy",T),D,n)},[b,L,D,t,i,M,T,j]),E=o||s||l||h||v||_&&_.length>0,N=ot(),{titleId:O,descId:F,labelledBy:z}=R(c||A||N);return E?At("svg",{"data-semiotic-overlay":"",role:u?"presentation":"img","aria-labelledby":u?void 0:z,width:r,height:n,overflow:"visible",style:{position:"absolute",top:0,left:0,pointerEvents:"none",overflow:"visible"},children:[!u&&At(Ct,{children:[Lt("title",{id:O,children:S(s,"Geographic chart")}),Lt("desc",{id:F,children:x(s,l,{familyPhrase:"geographic data visualization",fallback:"geographic data visualization"})})]}),At("g",{transform:"translate("+a.left+","+a.top+")",children:[_,v]}),Lt(ee,{title:s,totalWidth:r,marginTop:a.top}),te({legend:h,totalWidth:r,totalHeight:n,margin:a,legendPosition:m,title:s,legendLayout:y,legendHoverBehavior:p,legendClickBehavior:d,legendHighlightedCategory:f,legendIsolatedCategories:g})]}):null}function ni([e,t,i]){let r=1<<i;return[e-Math.floor(e/r)*r,t,i]}function ai(e,t,i,r,n){return"function"==typeof e?e(t,i,r,n):e.replaceAll("{z}",String(t)).replaceAll("{x}",String(i)).replaceAll("{y}",String(r)).replaceAll("{r}",n>1?"@2x":"")}var oi=/*#__PURE__*/new WeakMap,si=1;function li(e){return Number.isFinite(e)?Math.max(1,Math.floor(e)):256}var ci=class{constructor(e=256){this.cache=new Map,this.limit=li(e)}setLimit(e){this.limit=li(e),this.cache.size>this.limit&&this.evict()}get(e){let t=this.cache.get(e);return t&&(t.lastUsed=performance.now()),t}set(e,t){this.cache.set(e,t),this.cache.size>this.limit&&this.evict()}evict(){for(;this.cache.size>this.limit;){let e,t=1/0;for(let[i,r]of this.cache)r.lastUsed<t&&(t=r.lastUsed,e=i);if(!e)break;{let t=this.cache.get(e);t&&(t.img.onload=null,t.img.onerror=null,t.img.src=""),this.cache.delete(e)}}}clear(){for(let e of this.cache.values())e.img.onload=null,e.img.onerror=null,e.img.src="";this.cache.clear()}},ui=class{constructor(e){this.capacity=e,this.particles=new Array(e);for(let t=0;t<e;t++)this.particles[t]={t:0,offset:0,lineIndex:0,active:!1,x:0,y:0}}spawn(e,t=Math.random){for(let i=0;i<this.capacity;i++){let r=this.particles[i];if(!r.active)return r.active=!0,r.t=0,r.offset=.6*(t()-.5),r.lineIndex=e,r.x=0,r.y=0,r}return null}step(e,t,i,r){for(let n=0;n<this.capacity;n++){let a=this.particles[n];if(!a.active)continue;let o=i[a.lineIndex];if(!o||o.length<2){a.active=!1;continue}if(a.t+=e*t,a.t>=1){a.active=!1;continue}let s=hi(o),l=pi(o,a.t*s),c=(r[a.lineIndex]||2)/2;a.x=l.x+l.nx*a.offset*c*2,a.y=l.y+l.ny*a.offset*c*2}}countForLine(e){let t=0;for(let i=0;i<this.capacity;i++)this.particles[i].active&&this.particles[i].lineIndex===e&&t++;return t}clear(){for(let e=0;e<this.capacity;e++)this.particles[e].active=!1}};function hi(e){let t=0;for(let i=1;i<e.length;i++){let r=e[i][0]-e[i-1][0],n=e[i][1]-e[i-1][1];t+=Math.sqrt(r*r+n*n)}return t}function pi(e,t){let i=0;for(let r=1;r<e.length;r++){let n=e[r][0]-e[r-1][0],a=e[r][1]-e[r-1][1],o=Math.sqrt(n*n+a*a);if(i+o>=t||r===e.length-1){let s=o>0?(t-i)/o:0,l=o>.001?o:1;return{x:e[r-1][0]+n*s,y:e[r-1][1]+a*s,nx:-a/l,ny:n/l}}i+=o}let r=e[e.length-1];return{x:r[0],y:r[1],nx:0,ny:0}}function di(e){if(!e)return;let t=[];for(let i of e)if("point"===i.type)t.push(i);else if("glyph"===i.type){let e=i,r=He(e.glyph,e.size);t.push({pointId:e.pointId,x:e.x+r.centerDx,y:e.y+r.centerDy,r:r.radius})}return t}var fi=/*#__PURE__*/Ge(function({data:e}){if(!e)return null;if(e.properties){let t=e.properties.name||e.properties.NAME||e.properties.id||"Feature";return Lt("div",{className:"semiotic-tooltip",style:qe,children:Lt("div",{style:{fontWeight:600},children:t})})}let t=null!=e.data?e.data:e;if(!t||"object"!=typeof t)return null;let i=le(t),r=null!=i.title?String(i.title):null;return null==r&&0===i.entries.length?null:At("div",{className:"semiotic-tooltip",style:qe,children:[null!=r&&Lt("div",{style:{fontWeight:600,marginBottom:i.entries.length?2:0},children:r}),i.entries.map(e=>At("div",{children:[At("span",{style:{opacity:.7},children:[e.key,": "]}),Lt("span",{style:{fontWeight:600},children:k(e.value)})]},e.key))]})}),gi={top:10,right:10,bottom:10,left:10},mi=null;function yi(){if(null!==mi)return mi;if(typeof window>"u")return!1;let e="function"==typeof window.matchMedia&&window.matchMedia("(pointer: coarse)").matches,t=typeof navigator<"u"&&"number"==typeof navigator.hardwareConcurrency&&navigator.hardwareConcurrency<=4,i=typeof navigator<"u"&&"number"==typeof navigator.deviceMemory&&navigator.deviceMemory<=4;return mi=e||t||i}function vi(){return yi()?12:30}var bi={width:28,height:28,border:"1px solid rgba(0,0,0,0.2)",borderRadius:4,background:"rgba(255,255,255,0.9)",color:"#333",fontSize:16,fontWeight:600,lineHeight:1,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",padding:0,boxShadow:"0 1px 3px rgba(0,0,0,0.1)"};function wi(e){return"string"==typeof e?e:"object"==typeof e&&e&&"type"in e?e.type:null}function Pi(e){let t=e.pointer.clientX-e.canvasRect.left-e.margin.left,i=e.pointer.clientY-e.canvasRect.top-e.margin.top;if(t<0||t>e.width||i<0||i>e.height)return{kind:"outside"};e.hitCanvasRef.current||(e.hitCanvasRef.current=typeof OffscreenCanvas<"u"?new OffscreenCanvas(1,1):document.createElement("canvas"));let r=(n=e.hitCanvasRef.current)?n.getContext("2d"):null;var n;if(!r)return{kind:"unavailable"};let a=function(e,t,i,r,n,a,o=0,s=r){if(a){let e=A(a,t,i,r,o);if(e&&!1!==e.node.interactive)return e}else{let n=null,a=1/0;for(let o of e){if("point"!==o.type||!1===o.interactive)continue;let e=o.x-t,s=o.y-i,l=Math.sqrt(e*e+s*s);l<=C(o.r,r)&&l<a&&(n=o,a=l)}if(n)return{node:n,distance:a}}let l=null,c=1/0;for(let n of e){if("glyph"!==n.type||null==n.datum)continue;let e=He(n.glyph,n.size),a=n.x+e.centerDx-t,o=n.y+e.centerDy-i,s=Math.sqrt(a*a+o*o);s<=C(e.radius,r)&&s<c&&(l=n,c=s)}if(l)return{node:l,distance:c};let u=null,h=1/0;for(let r of e){if("line"!==r.type)continue;let e=r,{path:n}=e,a=Math.max((e.style.strokeWidth??2)+4,5,s),o=t-a,l=t+a,c=i-a,p=i+a;for(let r=0;r<n.length-1;r++){let s=n[r],d=n[r+1],f=s[0],g=s[1],m=d[0],y=d[1];if(f<o&&m<o||f>l&&m>l||g<c&&y<c||g>p&&y>p)continue;let v=L(t,i,f,g,m,y);v<=a&&v<h&&(u=e,h=v)}}if(u)return{node:u,distance:h};for(let r=e.length-1;r>=0;r--){let a=e[r];if("geoarea"!==a.type)continue;let o=a;if(!1===o.interactive)continue;let[[s,l],[c,u]]=o.bounds;if(!(t<s||t>c||i<l||i>u)&&(o._cachedPath2D||(o._cachedPath2D=new Path2D(o.pathData)),n.isPointInPath(o._cachedPath2D,t,i)))return{node:o,distance:0}}return null}(e.scene,t,i,_e(30,e.pointer.pointerType),r,e.pointQuadtree,e.maxPointRadius,_e(6,e.pointer.pointerType));if(!a)return{kind:"miss"};let{node:o}=a,s=o.datum,l=Array.isArray(s)?null:s?.properties?s:s?.data||s,c="point"===o.type?o.x:"geoarea"===o.type?o.centroid[0]:t,u="point"===o.type?o.y:"geoarea"===o.type?o.centroid[1]:i;return{kind:"hit",node:o,hover:{...l,...l?.properties||{},data:l,properties:l?.properties,__semioticHoverData:!0,x:c,y:u}}}function Ri({graphics:e,size:t,margin:i,readScales:r,tracker:n}){return st(n.subscribe,n.getSnapshot,n.getSnapshot),Je.createElement(Je.Fragment,null,D(e,t,i,r()))}var Si=/*#__PURE__*/he(/*#__PURE__*/lt(
2
+ /*#__PURE__*/ct(function(e,t){let{projection:n,projectionExtent:a,fitPadding:o,projectionTransform:s,areas:l,points:c,lines:y,customLayout:v,layoutConfig:b,layoutSelection:w,onLayoutError:P,xAccessor:R,yAccessor:S,lineDataAccessor:x,pointIdAccessor:k,lineIdAccessor:A,lineType:C="geo",flowStyle:L="basic",graticule:D,zoomable:W,zoomExtent:H,onZoom:Z,dragRotate:$,showParticles:U,particleStyle:Q,tileURL:V,tileAttribution:K,tileCacheSize:J,size:ee,width:te,height:le,responsiveWidth:he,responsiveHeight:Be,margin:Ie,className:_e,background:Ee,maxDevicePixelRatio:He,runtimeMode:Ge,windowSize:qe=500,renderMode:Ue,areaStyle:Ye,pointStyle:Qe,lineStyle:Ve,colorScheme:Ke,enableHover:tt=!0,hoverAnnotation:ot,tooltipContent:st,allowTooltipOverflow:lt=!1,customClickBehavior:ct,customHoverBehavior:ht,onObservation:pt,annotationObservationCallback:dt,chartId:ft,annotations:gt,onAnnotationActivate:mt,autoPlaceAnnotations:yt,svgAnnotationRules:vt,decay:bt,pulse:wt,transition:Pt,animate:Rt,staleness:Ct,frameScheduler:Mt,clock:jt,random:Tt,seed:Bt,paused:It=!1,suspendWhenHidden:_t=!0,backgroundGraphics:Et,foregroundGraphics:Nt,title:Ot,legend:Ft,legendPosition:zt,legendLayout:Wt,legendHoverBehavior:Ht,legendClickBehavior:Gt,legendHighlightedCategory:qt,legendIsolatedCategories:Zt,legendCategoryAccessor:$t,onCategoriesChange:Xt,showAxes:Ut,accessibleTable:Yt=!0,description:Qt,summary:Vt}=e,{customHoverBehavior:Kt,customClickBehavior:Jt,hasClickBehavior:ei}=u({customHoverBehavior:ht,customClickBehavior:ct,onObservation:pt,chartId:ft,chartType:"StreamGeoFrame"}),ti=ee||[te||600,le||400],li=nt(!0),hi=pe({sizeProp:ti,responsiveWidth:he,responsiveHeight:Be,userMargin:Ie,marginDefault:gi,title:Ot,legend:Ft,legendPosition:zt,legendLayout:Wt,legendMarginReserved:e.__legendMarginReservedFor===Ft,animate:Rt,transitionProp:Pt,frameScheduler:Mt,clock:jt,random:Tt,seed:Bt,paused:It,suspendWhenHidden:_t,themeDirtyRef:li}),{reducedMotionRef:pi,responsiveRef:mi,size:Si,margin:xi,adjustedWidth:ki,adjustedHeight:Ai,transition:Ci,introEnabled:Li,tableId:Di,frameRuntime:Mi,rafRef:ji,renderFnRef:Ti,scheduleRender:Bi,currentTheme:Ii}=hi,_i=de(),Ei=fe(),Ni=at(()=>Array.isArray(l)?Y(l):l,[l]),Oi=at(()=>Y(c),[c]),Fi=at(()=>Y(y),[y]),zi=$??"orthographic"===wi(n),Wi=at(()=>({projection:n,projectionExtent:a,fitPadding:o,xAccessor:R,yAccessor:S,lineDataAccessor:x,lineType:C,flowStyle:L,areaStyle:Ye,pointStyle:Qe,lineStyle:Ve,colorScheme:Ke,themeSemantic:Ze(Ii),themeSequential:Ii?.colors?.sequential,themeDiverging:Ii?.colors?.diverging,themeCategorical:Ii?.colors?.categorical,graticule:D,projectionTransform:s,windowSize:qe,clock:Mi.now,decay:bt,pulse:wt,transition:Ci,introAnimation:Li,annotations:gt,pointIdAccessor:k,lineIdAccessor:A,customLayout:v,layoutConfig:b,onLayoutError:P,layoutMargin:xi}),[n,a,o,R,S,x,C,L,Ye,Qe,Ve,Ke,Ii,D,s,qe,Mi.now,bt,wt,Ci,Li,gt,k,A,v,b,P,xi]),Hi=ge(Wi),Gi=nt(null);Gi.current||(Gi.current=new ii(Hi));let qi=X||!_i&&Ei,Zi=at(()=>{if(!qi)return null;let e=new ii(Hi);return Ni&&e.setAreas(Ni),c&&e.setPoints(Oi),y&&e.setLines(Fi),e.computeScene({width:ki,height:Ai}),e.cancelIntroAnimation(),e},[qi,Hi,Ni,c,Oi,y,Fi,ki,Ai]);!function(e,t){Dt(()=>{t&&(e.current=t)},[e,t])}(Gi,Zi);let $i=Zi??Gi.current,Xi=nt(null),Ui=Xi.current??(Xi.current=function(e){let t=new Set,i=0,r=e;return{subscribe:e=>(t.add(e),()=>t.delete(e)),getSnapshot:()=>i,sync(e){if(e!==r){r=e,i+=1;for(let e of t)e()}}}}($i.scales)),{resolvedForeground:Yi,resolvedBackground:Qi,themeBackground:Vi,surfaceBackground:Ki}=function({tracker:e,readScales:t,...i}){let r=r=>"function"==typeof r?Je.createElement(Ri,{graphics:r,size:i.size,margin:i.margin,readScales:t,tracker:e}):r;return{...M({...i,resolveScaleAwareGraphics:!1}),resolvedForeground:r(i.foregroundGraphics),resolvedBackground:r(i.backgroundGraphics)}}({foregroundGraphics:Nt,backgroundGraphics:Et,size:Si,margin:xi,scales:$i.scales,background:Ee,themeBackgroundColor:Ii.colors.background,tracker:Ui,readScales:()=>$i.scales}),Ji=nt(null),er=nt(null),tr=nt(null);V&&!tr.current&&(tr.current=new ci(J??256)),tr.current?.setLimit(J??256);let ir=nt(gt),rr=nt(null),nr=nt(xt),ar=nt(!1),or=nt(null),sr=it(e=>{or.current=e,mi&&"object"==typeof mi&&(mi.current=e)},[mi]),lr=nt(null),cr=nt(null),ur=nt(null),hr=nt(0);if(U&&!ur.current){let e=Q?.maxPerLine??vi();ur.current=new ui(50*e)}let pr=nt(null),dr=nt(!1),fr=nt(null),gr=nt(!1),mr=nt(!1),yr=me("StreamGeoFrame"),vr=nt(void 0),[br,wr]=ut(null),[,Pr]=ut(0),Rr=nt(0),[Sr,xr]=ut(!1),kr=j(Gi,$t,Xt,e=>e.getPoints());T(Gi,Hi,li,Bi),B(Gi,w,li,Bi),et(()=>{let e=Gi.current;e&&(Ni&&e.setAreas(Ni),c&&e.setPoints(Oi),y&&e.setLines(Fi),li.current=!0,Bi())},[Ni,c,Oi,y,Fi,Bi]),function(e,{storeRef:t,dirtyRef:i,scheduleRender:r,zoomTransformRef:n,containerRef:a,zoomBehaviorRef:o}){let s=it(e=>{null==e||"object"!=typeof e||(t.current?.pushPoint(e),i.current=!0,r())},[t,i,r]),l=it(e=>{let n=Y(e);0!==n.length&&(t.current?.pushMany(n),i.current=!0,r())},[t,i,r]),c=it(e=>{null==e||"object"!=typeof e||(t.current?.pushLine(e),i.current=!0,r())},[t,i,r]),u=it(e=>{let n=Y(e);0!==n.length&&(t.current?.pushManyLines(n),i.current=!0,r())},[t,i,r]),h=it(()=>{t.current?.clear(),i.current=!0,r()},[t,i,r]);rt(e,()=>({push:s,pushMany:l,removePoint:e=>{let n=t.current?.removePoint(e)??[];return n.length>0&&(i.current=!0,r()),n},pushLine:c,pushManyLines:u,removeLine:e=>{let n=t.current?.removeLine(e)??[];return n.length>0&&(i.current=!0,r()),n},getLines:()=>t.current?.getLines()??[],clear:h,getProjection:()=>t.current?.scales?.projection??null,getGeoPath:()=>t.current?.scales?.geoPath??null,getCartogramLayout:()=>t.current?.cartogramLayout??null,getCustomLayout:()=>t.current?.lastCustomLayoutResult??null,getLayoutFailure:()=>t.current?.lastCustomLayoutFailure??null,getZoom:()=>n.current.k,resetZoom:()=>{let e=a.current;e&&o.current&&St(e).call(o.current.transform,xt)},getData:()=>t.current?.getPoints()??[]}),[s,l,c,u,h,r,t,i,n,a,o])}(t,{storeRef:Gi,dirtyRef:li,scheduleRender:Bi,zoomTransformRef:nr,containerRef:or,zoomBehaviorRef:rr});let{hoverHandlerRef:Ar,onPointerMove:Cr,onPointerLeave:Lr,flushPointerMove:Dr,pointerStateRef:Mr}=hi,{canvasRef:jr,interactionCanvasRef:Tr,resolutionDirtyRef:Br}=ye(hi,{hydrated:_i,wasHydratingFromSSR:Ei,storeRef:Gi,dirtyRef:li,cleanup:()=>tr.current?.clear(),maxDevicePixelRatio:He,canvasPaintDependencies:[ki,Ai,Ee,Et,Ue,V,J,Bi]});et(()=>{Ar.current=e=>{let t=jr.current;if(!t)return;let i=Gi.current;if(!i||!i.scene.length)return void ve(t);let r=Pi({pointer:e,canvasRect:t.getBoundingClientRect(),margin:xi,width:ki,height:Ai,scene:i.scene,pointQuadtree:i.quadtree,maxPointRadius:i.maxPointRadius,hitCanvasRef:er});ve(t,"hit"===r.kind?ue(r.node):void 0),tt&&!1!==ot&&("hit"===r.kind?(pr.current=r.hover,fr.current=r.node,wr(r.hover),Kt?.(r.hover),Bi()):("outside"===r.kind||"miss"===r.kind&&pr.current)&&(pr.current=null,fr.current=null,wr(null),Kt?.(null),Bi()))}},[tt,ot,ki,Ai,xi,Kt,Bi,Ar,jr]),hi.hoverLeaveRef.current=()=>{ve(jr.current),tt&&!1!==ot&&(pr.current=null,fr.current=null,wr(null),Kt?.(null),Bi())},be(jr);let Ir=it(e=>{if(we(e.target)||!Jt)return;Dr();let t=Gi.current;if(!t||!t.scene.length)return void Jt(null);let i=Pi({pointer:{clientX:e.clientX,clientY:e.clientY,pointerType:vr.current},canvasRect:e.currentTarget.getBoundingClientRect(),margin:xi,width:ki,height:Ai,scene:t.scene,pointQuadtree:t.quadtree,maxPointRadius:t.maxPointRadius,hitCanvasRef:er});Jt("hit"===i.kind?i.hover:null,{type:"activate",inputType:Pe(vr.current)})},[Ai,ki,Jt,xi,Dr]),{kbFocusIndexRef:_r,focusedNavPointRef:Er,onKeyDown:Nr,refreshKeyboardFocus:Or}=h({clearPointerHover:Lr,storeRef:Gi,hoverRef:pr,hoveredNodeRef:fr,setHoverPoint:wr,customHoverBehavior:Kt,customClickBehavior:Jt,scheduleRender:Bi}),Fr=it(e=>{I(Mr,e,tt&&!1!==ot,dr.current,jr.current)&&(vr.current=e.pointerType,_r.current=-1,Er.current=null,Cr(e))},[jr,tt,ot,Er,_r,Cr,Mr]),zr=it(e=>{vr.current=e.pointerType},[]);Ti.current=()=>{if(ji.current=null,Ui.sync(Gi.current?.scales??null),!Mi.isActive)return;let e=jr.current,t=Gi.current;if(!e||!t)return;let n=Mi.now(),a=!1,o=cr.current,s=!1;if(o){cr.current=null;let e={width:ki,height:Ai};t.applyRotation(o,e),s=!0}let l=null!=t.activeTransition,c=t.advanceTransition(pi.current?n+1e6:n),u=!pi.current&&c,h=yr.current.beforeCompute(t.getLastUpdateResult(),u),y=!1;if(li.current&&!c){let e={width:ki,height:Ai},i=t.hasProjection(),r=zi&&i?t.getRotation():null;t.computeScene(e);let n=nr.current,a=1!==n.k||0!==n.x||0!==n.y;zi&&r?a?(t.setRotation(r),t.applyZoomScale(n.k,e)):t.applyRotation(r,e):a&&t.applyZoomTransform(n,e),Or(),li.current=!1,y=!0,kr()}Ui.sync(t.scales),yr.current.afterCompute(h,y,!1);let v=se(He,Si),b=Tr.current;b&&Re(b,Si,v);let w=U&&!pi.current&&!!ur.current,P=t.consumeStylePaintPending();var R;(y||s||P)&&(dr.current=Se(t.scene),dr.current||ve(e)),dr.current&&(l||y||s||P)&&(R={canvas:e,pointer:Mr.current,store:t,margin:xi,width:ki,height:Ai,hitCanvasRef:er,geometryMoved:l||y||s},ce(R.canvas,R.pointer,e=>{let t=Pi({pointer:e,canvasRect:R.canvas.getBoundingClientRect(),margin:R.margin,width:R.width,height:R.height,scene:R.store.scene,pointQuadtree:R.geometryMoved?null:R.store.quadtree,maxPointRadius:R.store.maxPointRadius,hitCanvasRef:R.hitCanvasRef});return"hit"===t.kind?ue(t.node):void 0}));let S=p(t,n,y,mr),x=Br.current,k=f({dirtyOrRebuilt:y,transitioning:l,continuous:w,liveEncoding:S.changed,forced:s||P||x});if(Br.current=!1,V&&tr.current){let e=Ji.current;if(e&&t.scales?.projection){let i=xe(e,Si,xi,v);i&&(i.clearRect(-xi.left,-xi.top,Si[0],Si[1]),i.save(),i.beginPath(),i.rect(0,0,ki,Ai),i.clip(),function(e,t){let{tileURL:i,projection:r,width:n,height:a,tileCache:o,onTileLoad:s,maxDevicePixelRatio:l}=t,c=r.scale(),u=r([0,0])??r.translate(),h=function(e){let{size:t,scale:i,translate:r,clampX:n=!0,clampY:a=!0}=e,o=Math.max(Math.log(i)/Math.LN2-8,0),s=Math.round(o),l=1<<s,c=Math.pow(2,o-s+8),u=r[0]-i/2,h=r[1]-i/2,p=Math.max(n?0:-1/0,Math.floor((0-u)/c)),d=Math.min(n?l:1/0,Math.ceil((t[0]-u)/c)),f=Math.max(a?0:-1/0,Math.floor((0-h)/c)),g=Math.min(a?l:1/0,Math.ceil((t[1]-h)/c)),m=[];for(let e=f;e<g;++e)for(let t=p;t<d;++t)m.push([t,e,s]);return{tiles:m,translate:[u/c,h/c],scale:c}}({size:[n,a],scale:2*c*Math.PI,translate:u,clampX:!1}),p=se(l,[n,a]),d=function(e){if("string"==typeof e)return`template:${e}`;let t=e,i=oi.get(t);return null==i&&(i=si++,oi.set(t,i)),`provider:${i}`}(i),f=!0;for(let t of h.tiles){let[r,n,a]=ni(t),l=ai(i,a,r,n,p),c=`${d}|dpr:${p}|${a}/${r}/${n}|${l}`,u=o.get(c);if(!u||u.failed&&(u.attempts??1)<3&&Date.now()>=(u.retryAt??1/0)){let e=new Image;e.crossOrigin="anonymous";let t={img:e,loaded:!1,failed:!1,key:c,lastUsed:performance.now(),attempts:(u?.attempts??0)+1};o.set(c,t),e.onload=()=>{t.loaded=!0,s?.()},e.onerror=()=>{t.loaded=!0,t.failed=!0,t.retryAt=Date.now()+1e3,s?.()},e.src=l,u=t}if(!u.loaded){f=!1;continue}if(u.failed)continue;let g=h.scale,m=h.translate[0],y=h.translate[1],v=(t[0]+m)*g,b=(t[1]+y)*g;e.drawImage(u.img,v-.5,b-.5,g+1,g+1)}}(i,{tileURL:V,projection:t.scales.projection,width:ki,height:Ai,tileCache:tr.current,maxDevicePixelRatio:He,onTileLoad:()=>Bi()}),i.restore())}}if(k){let i=xe(e,Si,xi,v);if(!i)return;i.clearRect(-xi.left,-xi.top,Si[0],Si[1]),V||_(i,{background:Ee,themeBackground:Vi,hasBackgroundGraphics:!!Et,x:-xi.left,y:-xi.top,width:Si[0],height:Si[1]}),i.save(),i.beginPath(),i.rect(0,0,ki,Ai),i.clip();let o=t.scene,s=(t.scales,{width:ki,height:Ai});if(E({context:i,nodes:o,renderMode:Ue,pixelRatio:v,paintBuiltIn:e=>{(function(e,t){let i=t.filter(e=>"geoarea"===e.type),r=e.globalAlpha;for(let t of i){if(!t.pathData)continue;t._cachedPath2D||(t._cachedPath2D=new Path2D(t.pathData));let i=t._cachedPath2D,n=r*(t._decayOpacity??1)*(t.style.opacity??1),a=Fe(t.style.fill)?void 0:ze(e,t.style.fill)||"#e0e0e0";a&&!Fe(a)&&(e.fillStyle=a,e.globalAlpha=n*(t.style.fillOpacity??1),e.fill(i));let o=t.style.strokeWidth??.5;if(t.style.stroke&&"none"!==t.style.stroke&&o>0){if(e.strokeStyle=We(e,t.style.stroke)||t.style.stroke,e.lineWidth=o,e.globalAlpha=n*(t.style.strokeOpacity??1),t.style.strokeDasharray){let i=t.style.strokeDasharray.split(",").map(Number);e.setLineDash(i)}else e.setLineDash([]);e.stroke(i)}G(e,t,r,i),e.globalAlpha=r,e.setLineDash([])}})(i,e),r(i,e.filter(e=>"line"===e.type),s),d(i,e.filter(e=>"point"===e.type)),m(i,e.filter(e=>"glyph"===e.type))}}),w&&ur.current){let e=ur.current,t=o.filter(e=>"line"===e.type);if(t.length>0){let r=Q||{},o=.3*(r.speedMultiplier??1),s=r.maxPerLine??vi(),l=r.spawnRate??(yi()?.06:.15),c=r.radius??2,u=r.opacity??.7,h=n/1e3,p=hr.current>0?Math.min(h-hr.current,.1):.016;hr.current=h;let d=t.map(e=>e.path),f=t.map(e=>e.style.strokeWidth??2);for(let i=0;i<t.length;i++)Mi.random()<l&&e.countForLine(i)<s&&e.spawn(i,Mi.random);e.step(p,o,d,f),i.globalAlpha=u;for(let n=0;n<e.particles.length;n++){let a=e.particles[n];if(!a.active)continue;let o=t[a.lineIndex],s="function"==typeof r.color?r.color(o?.datum??{}):"source"!==r.color&&r.color?r.color:o?.style.stroke||"#fff";i.beginPath(),i.arc(a.x,a.y,c,0,2*Math.PI),i.fillStyle=s,i.fill()}i.globalAlpha=1,a=!0}}i.restore()}(y||l&&!c)&&e.setAttribute("aria-label",ke(t.scene,"Geographic chart"));let A=fr.current,C=!(!A||"geoarea"!==A.type&&"point"!==A.type),L=g(C,gr.current),D=Tr.current;if(D&&L){let e=xe(D,Si,xi,v);if(e){if(e.clearRect(-xi.left,-xi.top,Si[0],Si[1]),A&&"geoarea"===A.type){let t=new Path2D(A.pathData);e.fillStyle="rgba(255, 255, 255, 0.3)",e.fill(t),e.strokeStyle="rgba(0, 0, 0, 0.5)",e.lineWidth=2,e.stroke(t)}if(A&&"point"===A.type){let t=A,r=("object"==typeof ot?ot:void 0)?.pointColor||i(A);e.beginPath(),e.arc(t.x,t.y,t.r+3,0,2*Math.PI),r?(e.save(),e.globalAlpha=.4,e.fillStyle=r,e.fill(),e.restore()):(e.fillStyle="rgba(255, 255, 255, 0.4)",e.fill()),e.strokeStyle=r||"rgba(0, 0, 0, 0.5)",e.lineWidth=2,e.stroke()}}gr.current=C}let M=gt!==ir.current;M&&(ir.current=gt),(y||M||l&&gt&&gt.length>0)&&(y||M||l&&!c||n-Rr.current>=33)&&(Pr(e=>e+1),Rr.current=n),(u||null!=t.activeTransition||S.pending||a)&&Bi()},N(Ct,Gi,li,Bi,Mi.now,Sr,xr),et(()=>{if("production"!==process.env.NODE_ENV&&V){let e=wi(n);e&&"mercator"!==e&&console.warn(`[StreamGeoFrame] tileURL is set but projection is "${e}". Raster tiles use Web Mercator and will not align with other projections.`)}},[V,n]),et(()=>{let e=or.current;if(!W||!e)return rr.current&&e&&(St(e).on(".zoom",null),rr.current=null),void(e&&St(e).on("mousedown.rotate",null).on("touchstart.rotate",null));let[t,i]=H||[1,8],r={width:ki,height:Ai};if(zi){let n=nr.current.k,a=e=>{n=Math.max(t,Math.min(i,e)),nr.current=xt.scale(n);let a=Gi.current;a&&(a.applyZoomScale(n,r),li.current=!1,Bi(),a.scales?.projection&&Z?.({projection:a.scales.projection,zoom:a.currentZoom}))};rr.current={scaleBy:(e,t)=>a(n*t),transform:(e,t)=>a(t?.k??1)};let o=e=>{e.preventDefault();let t=e.deltaY<0?1.1:1/1.1;a(n*t)},s=e=>{let t=e.target;t&&(t.closest("button")||t.closest(".stream-geo-zoom-controls"))||(e.preventDefault(),a(1.5*n))};e.addEventListener("wheel",o,{passive:!1}),e.addEventListener("dblclick",s);let l=.4,c=t=>{if(0!==t.button)return;let i=t.target;if(i.closest("button")||i.closest(".stream-geo-zoom-controls"))return;let r=Gi.current;if(!r)return;let n=r.getRotation();lr.current={x:t.clientX,y:t.clientY,rotation:[...n]},e.setPointerCapture(t.pointerId),t.preventDefault()},u=e=>{let t=lr.current;if(!t)return;let i=e.clientX-t.x,r=e.clientY-t.y,n=[t.rotation[0]+i*l,Math.max(-90,Math.min(90,t.rotation[1]-r*l)),t.rotation[2]];cr.current=n,Bi()},h=t=>{if(!lr.current)return;lr.current=null,e.releasePointerCapture(t.pointerId);let i=cr.current;if(i){cr.current=null;let e=Gi.current;e&&(e.applyRotation(i,r),Bi())}let n=Gi.current;n?.scales?.projection&&Z?.({projection:n.scales.projection,zoom:n.currentZoom})};return e.addEventListener("pointerdown",c),e.addEventListener("pointermove",u),e.addEventListener("pointerup",h),e.addEventListener("pointercancel",h),()=>{e.removeEventListener("wheel",o),e.removeEventListener("dblclick",s),e.removeEventListener("pointerdown",c),e.removeEventListener("pointermove",u),e.removeEventListener("pointerup",h),e.removeEventListener("pointercancel",h),rr.current=null}}let n=kt().scaleExtent([t,i]).extent([[0,0],[Si[0],Si[1]]]).translateExtent([[-1/0,-1/0],[1/0,1/0]]).on("zoom",e=>{let t=e.transform;nr.current=t,ar.current=!0;let i=Gi.current;i&&(i.applyZoomTransform(t,r),li.current=!1,Bi())}).on("end",e=>{nr.current=e.transform,ar.current=!1;let t=Gi.current;t?.scales?.projection&&Z?.({projection:t.scales.projection,zoom:t.currentZoom})});return rr.current=n,St(e).call(n),()=>{St(e).on(".zoom",null)}},[W,H,zi,Si,ki,Ai,xi,Z,Bi]);let Wr=tt&&!1!==ot,Hr=Wr&&br?st?st(br):Lt(fi,{data:br}):null,Gr=$e(Hr)?Lt(Ae,{contentOwnsChrome:Xe(st),x:br.x,y:br.y,containerWidth:ki,containerHeight:Ai,margin:xi,className:"stream-frame-tooltip",zIndex:10,children:Hr}):null;if(qi){let e=$i.scene;return At("div",{ref:sr,className:"stream-geo-frame"+(_e?` ${_e}`:""),role:"group","aria-label":Qt||("string"==typeof Ot?Ot:"Geographic chart"),style:{position:"relative",fontFamily:"var(--semiotic-font-family, sans-serif)",width:he?"100%":Si[0],height:Be?"100%":Si[1]},children:[Lt(Ce,{accessibleTable:Yt,scene:e,chartType:"Geographic chart",tableId:Di,chartTitle:"string"==typeof Ot?Ot:void 0}),Lt(Le,{summary:Vt}),At("div",{role:"img","aria-label":Qt||("string"==typeof Ot?Ot:"Geographic chart"),children:[At("svg",{role:"presentation",xmlns:"http://www.w3.org/2000/svg",width:Si[0],height:Si[1],style:{position:"absolute",left:0,top:0},children:[Ki?Lt("rect",{className:"stream-frame-background__backdrop",x:0,y:0,width:Si[0],height:Si[1],fill:Ki}):null,Lt("g",{transform:`translate(${xi.left},${xi.top})`,children:Qi}),Lt("g",{transform:`translate(${xi.left},${xi.top})`,children:e.map((e,t)=>O({node:e,index:t,renderMode:Ue,fallback:()=>function(e,t){return ie(function(e,t){switch(e.type){case"geoarea":{let i=e;if(!i.pathData)return null;let r=Ne(i.style.fill)?Oe(i.style.fill,`geoarea-${t}-hatch`):void 0;return At(Je.Fragment,{children:[r&&Lt("defs",{children:r}),Lt("path",{d:i.pathData,fill:r?`url(#geoarea-${t}-hatch)`:oe(i.style.fill,"#e0e0e0"),...ae(i.style),stroke:i.style.stroke||"none",strokeWidth:i.style.strokeWidth??.5,strokeDasharray:i.style.strokeDasharray,opacity:(i.style.opacity??1)*(i._decayOpacity??1)})]},`geoarea-${t}`)}case"point":return ne(e,t,"","geopoint");case"line":{let i=e;if(i.path.length<2)return null;let r="M"+i.path.map(e=>`${e[0]},${e[1]}`).join("L");return Lt("path",{d:r,fill:"none",stroke:i.style.stroke||"#4e79a7",strokeOpacity:i.style.strokeOpacity,strokeWidth:i.style.strokeWidth??1.5,strokeDasharray:i.style.strokeDasharray,opacity:i.style.opacity??1},`line-${t}`)}case"glyph":{let i=e;return re(i,i.x,i.y,`geo-glyph-${i.pointId??t}`)}default:return null}}(e,t),e,`geo-cursor-${t}`)}(e,t)}))})]}),Lt(ri,{decorative:!0,width:ki,height:Ai,totalWidth:Si[0],totalHeight:Si[1],margin:xi,showAxes:!1,title:Ot,description:Qt,legend:Ft,legendPosition:zt,legendLayout:Wt,legendHoverBehavior:Ht,legendClickBehavior:Gt,legendHighlightedCategory:qt,legendIsolatedCategories:Zt,foregroundGraphics:F(Yi,q($i.customLayoutOverlays,w??null)),annotations:gt,onAnnotationActivate:mt,onObservation:dt??pt,chartId:ft,chartType:"StreamGeoFrame",autoPlaceAnnotations:yt,svgAnnotationRules:vt,pointNodes:di(e),geoProjection:$i.scales?.projectedPoint})]})]})}return At("div",{ref:sr,className:"stream-geo-frame"+(_e?` ${_e}`:""),role:"group","aria-label":Qt||("string"==typeof Ot?Ot:"Geographic chart"),tabIndex:0,style:{position:"relative",fontFamily:"var(--semiotic-font-family, sans-serif)",width:he?"100%":Si[0],height:Be?"100%":Si[1],overflow:lt?"visible":"hidden",...W?{touchAction:"none"}:{}},onKeyDown:Nr,children:["production"!==process.env.NODE_ENV&&Gi.current&&Lt(De,{store:Gi.current,diagnostics:yr.current}),Lt(Ce,{accessibleTable:Yt,sceneRevision:Gi.current?.getUpdateSnapshot().revisions.accessibility,scene:Gi.current?.scene??[],chartType:"Geographic chart",tableId:Di,chartTitle:"string"==typeof Ot?Ot:void 0}),Lt(Le,{summary:Vt}),Lt(Me,{active:_r.current>=0,hoverPoint:br}),At("div",{role:"img","aria-label":Qt||("string"==typeof Ot?Ot:"Geographic chart"),style:{position:"relative",width:"100%",height:"100%"},onPointerMove:Fr,onPointerLeave:Lr,onPointerDown:Wr||ei?zr:void 0,onClick:ei?Ir:void 0,children:[Lt(je,{size:Si,margin:xi,backdropFill:Ki??void 0,children:Qi}),V&&Lt("canvas",{ref:Ji,style:{position:"absolute",left:0,top:0,width:Si[0],height:Si[1],pointerEvents:"none"}}),Lt("canvas",{"aria-hidden":"true",ref:jr,"aria-label":ke(Gi.current?.scene??[],"Geographic chart"),style:{position:"absolute",left:0,top:0,width:Si[0],height:Si[1]}}),Lt("canvas",{ref:Tr,style:{position:"absolute",left:0,top:0,width:Si[0],height:Si[1],pointerEvents:"none"}}),Lt(ri,{decorative:!0,width:ki,height:Ai,totalWidth:Si[0],totalHeight:Si[1],margin:xi,showAxes:Ut,title:Ot,description:Qt,legend:Ft,legendPosition:zt,legendLayout:Wt,legendHoverBehavior:Ht,legendClickBehavior:Gt,legendHighlightedCategory:qt,legendIsolatedCategories:Zt,foregroundGraphics:F(Yi,q($i.customLayoutOverlays,w??null)),annotations:gt,onAnnotationActivate:mt,onObservation:dt??pt,chartId:ft,chartType:"StreamGeoFrame",autoPlaceAnnotations:yt,svgAnnotationRules:vt,pointNodes:di(Gi.current?.scene),geoProjection:$i.scales?.projectedPoint}),Ct?.showBadge&&Lt(z,{isStale:Sr,position:Ct.badgePosition,state:Ct.state,settling:Ct.settling}),Lt(Te,{active:_r.current>=0,hoverPoint:br,margin:xi,size:Si,shape:Er.current?.shape,width:Er.current?.w,height:Er.current?.h,pathData:Er.current?.pathData}),Gr]}),W&&At("div",{className:"stream-geo-zoom-controls",style:{position:"absolute",bottom:xi.bottom+8,left:xi.left+8,display:"flex",flexDirection:"column",gap:2,zIndex:2},children:[Lt("button",{type:"button","aria-label":"Zoom in",onClick:e=>{e.stopPropagation();let t=or.current,i=rr.current;t&&i?.scaleBy&&i.scaleBy(St(t),1.5)},style:bi,children:"+"}),Lt("button",{type:"button","aria-label":"Zoom out",onClick:e=>{e.stopPropagation();let t=or.current,i=rr.current;t&&i?.scaleBy&&i.scaleBy(St(t),1/1.5)},style:bi,children:"−"})]}),K&&Lt("div",{className:"stream-geo-tile-attribution",style:{position:"absolute",bottom:xi.bottom+2,right:xi.right+4,fontSize:10,color:"rgba(0,0,0,0.6)",background:"rgba(255,255,255,0.7)",padding:"1px 4px",borderRadius:2,pointerEvents:"none",zIndex:2},children:K})]})})),"StreamGeoFrame"),xi=Si,ki=/*#__PURE__*/he(/*#__PURE__*/ct(function(i,r){let{points:n,areas:a,lines:o,layout:s,layoutConfig:l,onLayoutError:c,projection:u="equirectangular",xAccessor:h="lon",yAccessor:p="lat",lineDataAccessor:d,colorBy:f,colorScheme:g,tooltip:m,annotations:y,margin:v,selection:b,linkedHover:w,onObservation:P,onClick:R,chartId:S,loading:x,loadingContent:k,emptyContent:A,className:C,frameProps:L={}}=i,{frameRef:D,resolved:M,normalizedMargin:j}=e({responsive:i,imperativeRef:r,imperativeVariant:"geo-points",margin:v,width:i.width,height:i.height,enableHover:i.enableHover,title:i.title,description:i.description,summary:i.summary,accessibleTable:i.accessibleTable,mode:i.mode,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,responsiveRules:i.responsiveRules}),T=at(()=>Y(n),[n]),B=at(()=>Y(a),[a]),I=at(()=>Y(o),[o]),_=at(()=>[...T,...I,...B],[T,I,B]),E=t({responsive:i,data:_,rawData:void 0!==n||void 0!==o||void 0!==a?_:void 0,colorBy:f,colorScheme:g,legendInteraction:void 0,selection:b,linkedHover:w,fallbackFields:"string"==typeof f?[f]:[],unwrapData:!1,onObservation:P,onClick:R,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"GeoCustomChart",chartId:S,showLegend:!1,userMargin:j,marginDefaults:M.marginDefaults,loading:x,loadingContent:k,emptyContent:A,width:M.width,height:M.height,hasTitle:!!M.title}),N=E.effectiveSelectionHook,O=at(()=>N?.isActive?{isActive:!0,predicate:N.predicate}:null,[N?.isActive,N?.predicate]);if(E.earlyReturn)return E.earlyReturn;let{width:F,height:z,enableHover:G,title:q,description:Z,summary:$,accessibleTable:X}=M,U=Be(m),Q={projection:u,...null!=n&&{points:T},...null!=a&&{areas:B},...null!=o&&{lines:I},xAccessor:h,yAccessor:p,...null!=d&&{lineDataAccessor:d},customLayout:s,layoutConfig:l,onLayoutError:c,layoutSelection:O,colorBy:f,colorScheme:g,size:[F,z],responsiveWidth:i.responsiveWidth,responsiveHeight:i.responsiveHeight,margin:E.margin,enableHover:G,...H({title:q,description:Z,summary:$,accessibleTable:X,className:C,animate:i.animate,maxDevicePixelRatio:i.maxDevicePixelRatio,autoPlaceAnnotations:i.autoPlaceAnnotations}),...!1===m?{tooltipContent:()=>null}:U?{tooltipContent:U}:{},...W({linkedHover:w,selection:b,onObservation:P,onClick:R,hoverHighlight:!1,mobileInteraction:E.mobileInteraction,customHoverBehavior:E.customHoverBehavior,customClickBehavior:E.customClickBehavior,linkedHoverInClickPredicate:!1}),...y&&y.length>0&&{annotations:y},...L};return Lt(Ie,{componentName:"GeoCustomChart",width:F,height:z,children:Lt(xi,{ref:D,...Q})})}),"GeoCustomChart");export{xi as a,ki as b};
@@ -0,0 +1 @@
1
+ export{e as customXYPlugin}from"./c-5NAU4JAY.min.js";
@@ -0,0 +1 @@
1
+ function e(e,a){("string"!=typeof e||function(e){for(let a=0;a<e.length;a++){let o=e.charCodeAt(a);if(o<32||127===o)return!0}return!1}(e)||e.includes("<"))&&a();let o="",r="";for(let t=0;t<e.length;t++){let i=e[t];o?"\\"===i?++t===e.length&&a():i===o&&(o=""):'"'===i||"'"===i?(o=i,r+=" "):r+=i}return o&&a(),r}function a(a,o){let r=e(a,()=>{throw new TypeError(`Unsafe theme CSS in ${o}`)});if(/[>{};\\]|\/\*|\*\/|(?:url|expression)\s*\(/i.test(r))throw new TypeError(`Unsafe theme CSS in ${o}`)}function o(a){let o=e(a,()=>{throw new TypeError("Unsafe theme CSS selector")});if(!a.trim()||/[{};\\]|\/\*|\*\//.test(o))throw new TypeError("Unsafe theme CSS selector")}function r(e){let o={"--semiotic-bg":e.colors.background,"--semiotic-text":e.colors.text,"--semiotic-text-secondary":e.colors.textSecondary,"--semiotic-grid":e.colors.grid,"--semiotic-border":e.colors.border,"--semiotic-cell-border":e.colors.cellBorder||e.colors.border,"--semiotic-primary":e.colors.primary,"--semiotic-font-family":e.typography.fontFamily,"--semiotic-secondary":e.colors.secondary||e.colors.primary,"--semiotic-surface":e.colors.surface||e.colors.background};e.colors.categorical.forEach((e,a)=>{o[`--semiotic-category-${a+1}`]=e});for(let[a,r]of[["focus",e.colors.focus],["selection-color",e.colors.selection],["selection-opacity",null==e.colors.selectionOpacity?void 0:String(e.colors.selectionOpacity)],["diverging",e.colors.diverging],["annotation-color",e.colors.annotation],["success",e.colors.success],["danger",e.colors.danger],["warning",e.colors.warning],["error",e.colors.error],["info",e.colors.info],["tooltip-bg",e.tooltip?.background],["tooltip-text",e.tooltip?.text],["tooltip-radius",e.tooltip?.borderRadius],["tooltip-font-size",e.tooltip?.fontSize],["tooltip-shadow",e.tooltip?.shadow],["border-radius",e.borderRadius]])r&&(o[`--semiotic-${a}`]=r);for(let[a,r,t=""]of[["legend-font-size",e.typography.legendSize??e.typography.labelSize,"px"],["legend-font-family",e.typography.legendFontFamily],["legend-font-weight",e.typography.legendFontWeight],["title-font-size",e.typography.titleFontSize??e.typography.titleSize,"px"],["title-font-family",e.typography.titleFontFamily],["title-font-weight",e.typography.titleFontWeight],["tick-font-family",e.typography.tickFontFamily],["tick-font-size",e.typography.tickSize,"px"],["axis-label-font-size",e.typography.labelSize,"px"]])null!=r&&(o[`--semiotic-${a}`]=`${r}${t}`);for(let[e,r]of Object.entries(o))a(r,e);return o}function t(e){return Object.prototype.hasOwnProperty.call(N,e)?g(N[e]):void 0}function i(e,a){var o;let r="dark"===a?b:p,t=y(r,e);(o=t.colors).categorical??(o.categorical=r.colors.categorical);let i=g(m({...t,mode:a}));return i.mode="auto",i}function c(e,a){let o=a=>Object.entries(r(i(e,a))).map(([e,a])=>`${e}:${a}`).join(";");return`${a}{${o("light")}}@media (prefers-color-scheme:dark){${a}{${o("dark")}}}`}function n(e,a){let o;if("string"==typeof e){let a=t(e);a?o=e:typeof console<"u"&&function(e){H.has(e)||(H.add(e),console.warn(`[Semiotic] Unknown theme preset "${e}". Falling back to light theme.`))}(e),e=a??p}return{name:o,theme:"auto"===e?.mode?i(e,"light"):void 0!==e?x(a??p,e):g(a??(h("(forced-colors: active)")?.matches?u:p))}}function s(e,a){return S(e,a,1/0)}function d(e){let a=F.useRef(e);return s(a.current,e)||(a.current=e),a.current}function f({children:e,themeName:a,resolved:o,query:t}){let{theme:n,setTheme:s}=k(e=>e),d=F.useId(),f=F.useContext(T),[l,b]=F.useState(!1),g=F.useRef(n);g.current=n,A(()=>{b(!0);let e=t?h(t):void 0,a=!f&&e?.matches?p:void 0,r=r=>{let t=r?.matches??e?.matches;f&&e?s(i(f,t?"dark":"light"),!0):t?(a??(a=g.current),s(u,!0)):(s(a??o,!0),a=void 0)};return r(),e&&z(e,r)},[o,f,t,s]);let y={position:"relative",colorScheme:"auto"===n.mode?"light dark":n.mode,...f&&!l?{}:r(n)};return q(w,{chrome:n.tooltip?.chrome,children:$("div",{style:y,"data-semiotic-theme":a,"data-semiotic-theme-mode":n.mode,"data-semiotic-auto":f?d:void 0,children:[f&&q("style",{children:c(f,`[data-semiotic-auto="${d}"]`)}),e]})})}function l({theme:e,children:a}){let o=v(),r=F.useContext(T),t=d(e),i="object"==typeof t&&"auto"===t.mode,c="string"!=typeof t&&!t?.mode,l=d(i?t:r&&c?y(r,t??{}):void 0),u=c&&void 0!==r?o:void 0,b=F.useMemo(()=>n(t,u),[t,u]),p=b.theme;return q(R,{initialState:{theme:p,equals:s},children:q(T.Provider,{value:l??null,children:q(f,{themeName:b.name,resolved:p,query:i?"(prefers-color-scheme: dark)":void 0===t&&void 0===r?"(forced-colors: active)":void 0,children:a})})})}import{g as u,f as b,e as p,c as g,i as y,a as m,j as x,s as h,r as S,n as k,t as z,z as w,H as v,m as R}from"./c-HTL37JCD.min.js";import*as F from"react";import{jsx as q,jsxs as $}from"react/jsx-runtime";var C=["#6929c4","#1192e8","#005d5d","#9f1853","#fa4d56","#570408","#198038","#002d9c","#ee538b","#b28600","#009d9a","#012749","#8a3800","#a56eff"],j={danger:"#da1e28",warning:"#f1c21b",success:"#24a148",info:"#0043ce"},N={light:p,dark:b,"high-contrast":u,pastels:{mode:"light",colors:{primary:"#c9a0dc",secondary:"#b8a8c8",categorical:["#f0a0c0","#88d4ab","#b0a0e8","#f0c888"],sequential:"purples",background:"#fdf6f0",surface:"#fff5ee",text:"#4a3728",textSecondary:"#7a644a",grid:"#e8d5c4",border:"#e8d5c4",focus:"#8a5fae",annotation:"#8a5fae",success:"#9ad4a3",danger:"#e8869a",warning:"#f0c888",error:"#c86070",info:"#9cb8e0"},typography:{fontFamily:"Inter, system-ui, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#fff5ee",text:"#4a3728",borderRadius:"8px",shadow:"0 2px 8px rgba(0, 0, 0, 0.12)"},borderRadius:"10px"},"pastels-dark":{mode:"dark",colors:{primary:"#c9a0dc",secondary:"#a899c0",categorical:["#f0a0c0","#88d4ab","#b0a0e8","#f0c888"],sequential:"purples",background:"#1a1525",surface:"#251e35",text:"#e8ddf0",textSecondary:"#a899c0",grid:"#3d3455",border:"#3d3455",focus:"#c9a0dc",annotation:"#c9a0dc",success:"#88d4ab",danger:"#f0a0c0",warning:"#f0c888",error:"#e87690",info:"#9cb8e0"},typography:{fontFamily:"Inter, system-ui, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#251e35",text:"#e8ddf0",borderRadius:"8px",shadow:"0 4px 12px rgba(0, 0, 0, 0.4)"},borderRadius:"10px"},"bi-tool":{mode:"light",colors:{primary:"#2563eb",secondary:"#6b7280",categorical:["#2563eb","#0d9488","#ea580c","#6b7280"],sequential:"blues",background:"#f5f6f8",surface:"#ffffff",text:"#2c3e50",textSecondary:"#64717f",grid:"#d8dce3",border:"#d8dce3",focus:"#2563eb",annotation:"#2563eb",success:"#10b981",danger:"#ef4444",warning:"#f59e0b",error:"#dc2626",info:"#2563eb"},typography:{fontFamily:"'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#ffffff",text:"#2c3e50",borderRadius:"6px",shadow:"0 2px 8px rgba(0, 0, 0, 0.12)"},borderRadius:"8px"},"bi-tool-dark":{mode:"dark",colors:{primary:"#3b82f6",secondary:"#9ca3af",categorical:["#3b82f6","#14b8a6","#f97316","#9ca3af"],sequential:"blues",background:"#111827",surface:"#1f2937",text:"#f3f4f6",textSecondary:"#9ca3af",grid:"#374151",border:"#374151",focus:"#3b82f6",annotation:"#3b82f6",success:"#34d399",danger:"#f87171",warning:"#fbbf24",error:"#ef4444",info:"#60a5fa"},typography:{fontFamily:"'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#1f2937",text:"#f3f4f6",borderRadius:"6px",shadow:"0 4px 12px rgba(0, 0, 0, 0.4)"},borderRadius:"8px"},italian:{mode:"light",colors:{primary:"#cc0000",secondary:"#666666",categorical:["#cc0000","#333333","#c8a415","#4682b4"],sequential:"reds",background:"#fafafa",surface:"#ffffff",text:"#1a1a1a",textSecondary:"#666666",grid:"#e0e0e0",border:"#e0e0e0",focus:"#cc0000",annotation:"#cc0000",success:"#556b2f",danger:"#cc0000",warning:"#c8a415",error:"#8b0000",info:"#4682b4"},typography:{fontFamily:"'Helvetica Neue', Helvetica, Arial, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#ffffff",text:"#1a1a1a",borderRadius:"2px",shadow:"0 2px 4px rgba(0, 0, 0, 0.15)"},borderRadius:"2px"},"italian-dark":{mode:"dark",colors:{primary:"#ff3333",secondary:"#aaaaaa",categorical:["#ff3333","#aaaaaa","#d4a843","#6aa4d4"],sequential:"reds",background:"#0a0a0a",surface:"#1a1a1a",text:"#f5f5f5",textSecondary:"#aaaaaa",grid:"#333333",border:"#333333",focus:"#ff3333",annotation:"#ff3333",success:"#7a8b5a",danger:"#ff3333",warning:"#d4a843",error:"#cc0000",info:"#6aa4d4"},typography:{fontFamily:"'Helvetica Neue', Helvetica, Arial, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#1a1a1a",text:"#f5f5f5",borderRadius:"2px",shadow:"0 2px 8px rgba(0, 0, 0, 0.5)"},borderRadius:"2px"},tufte:{mode:"light",colors:{primary:"#8b0000",secondary:"#555555",categorical:["#8b4513","#556b2f","#4a5568","#800020"],sequential:"oranges",background:"#fffff8",surface:"#fffff8",text:"#111111",textSecondary:"#555555",grid:"#e0ddd0",border:"#e0ddd0",focus:"#8b0000",annotation:"#8b0000",success:"#556b2f",danger:"#8b0000",warning:"#b88700",error:"#6b0000",info:"#4a5568"},typography:{fontFamily:"Georgia, 'Times New Roman', serif",titleSize:16,labelSize:12,tickSize:12,tickFontFamily:"'Courier New', Courier, monospace",legendSize:11},tooltip:{background:"#fffff8",text:"#111111",borderRadius:"2px",shadow:"0 1px 3px rgba(0, 0, 0, 0.1)"},borderRadius:"0px"},"tufte-dark":{mode:"dark",colors:{primary:"#c05050",secondary:"#a09880",categorical:["#c08050","#7a8b5a","#8090a0","#a05060"],sequential:"oranges",background:"#1c1b18",surface:"#262520",text:"#e8e4d8",textSecondary:"#a09880",grid:"#3d3c35",border:"#3d3c35",focus:"#c05050",annotation:"#d06a6a",success:"#7a8b5a",danger:"#c05050",warning:"#c8a060",error:"#a04040",info:"#8090a0"},typography:{fontFamily:"Georgia, 'Times New Roman', serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#262520",text:"#e8e4d8",borderRadius:"2px",shadow:"0 2px 6px rgba(0, 0, 0, 0.4)"},borderRadius:"0px"},journalist:{mode:"light",colors:{primary:"#e45050",secondary:"#666666",categorical:["#3a86c8","#e45050","#d4a843","#888888"],sequential:"blues",background:"#ffffff",surface:"#f8f8f8",text:"#222222",textSecondary:"#666666",grid:"#d4d4d4",border:"#d4d4d4",focus:"#e45050",annotation:"#c63b3b",success:"#2d7a3d",danger:"#c8303a",warning:"#d4a843",error:"#a02028",info:"#3a86c8"},typography:{fontFamily:"'Franklin Gothic Medium', 'Libre Franklin', Arial, sans-serif",titleSize:18,labelSize:12,tickSize:12,tickFontFamily:"'Courier New', Courier, monospace",legendSize:11},tooltip:{background:"#f8f8f8",text:"#222222",borderRadius:"4px",shadow:"0 2px 6px rgba(0, 0, 0, 0.12)"},borderRadius:"4px"},"journalist-dark":{mode:"dark",colors:{primary:"#ff6b6b",secondary:"#a0a0a0",categorical:["#5a9fd8","#ff6b6b","#e0c060","#aaaaaa"],sequential:"blues",background:"#141414",surface:"#1e1e1e",text:"#ededed",textSecondary:"#a0a0a0",grid:"#383838",border:"#383838",focus:"#ff6b6b",annotation:"#ff6b6b",success:"#6fba78",danger:"#ff6b6b",warning:"#e0c060",error:"#d04040",info:"#5a9fd8"},typography:{fontFamily:"'Franklin Gothic Medium', 'Libre Franklin', Arial, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#1e1e1e",text:"#ededed",borderRadius:"4px",shadow:"0 4px 12px rgba(0, 0, 0, 0.4)"},borderRadius:"4px"},playful:{mode:"light",colors:{primary:"#8b5cf6",secondary:"#7c5a9e",categorical:["#8b5cf6","#ec4899","#06b6d4","#84cc16"],sequential:"viridis",background:"#fdf8ff",surface:"#ffffff",text:"#2d1b4e",textSecondary:"#7c5a9e",grid:"#e8d0f8",border:"#e8d0f8",focus:"#8b5cf6",annotation:"#7a47e8",success:"#10d870",danger:"#ff4b6e",warning:"#ffaa33",error:"#e11d48",info:"#06b6d4"},typography:{fontFamily:"'Nunito', 'Poppins', system-ui, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#ffffff",text:"#2d1b4e",borderRadius:"12px",shadow:"0 4px 12px rgba(139, 92, 246, 0.15)"},borderRadius:"12px"},"playful-dark":{mode:"dark",colors:{primary:"#a78bfa",secondary:"#b8a0d8",categorical:["#a78bfa","#f472b6","#22d3ee","#a3e635"],sequential:"viridis",background:"#150a28",surface:"#1f1138",text:"#f0e8ff",textSecondary:"#b8a0d8",grid:"#3a2560",border:"#3a2560",focus:"#a78bfa",annotation:"#a78bfa",success:"#4ade80",danger:"#fb7185",warning:"#fbbf24",error:"#f43f5e",info:"#22d3ee"},typography:{fontFamily:"'Nunito', 'Poppins', system-ui, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#1f1138",text:"#f0e8ff",borderRadius:"12px",shadow:"0 4px 12px rgba(0, 0, 0, 0.4)"},borderRadius:"12px"},carbon:{mode:"light",colors:{primary:"#0f62fe",secondary:"#525252",categorical:["#6929c4","#1192e8","#005d5d","#9f1853"],sequential:"blues",diverging:"RdBu",background:"#ffffff",surface:"#ffffff",text:"#161616",textSecondary:"#525252",grid:"#e0e0e0",border:"#e0e0e0",focus:"#0f62fe",annotation:"#0f62fe",success:"#24a148",danger:"#da1e28",warning:"#f1c21b",error:"#a2191f",info:"#0043ce"},typography:{fontFamily:"'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#ffffff",text:"#161616",borderRadius:"2px",shadow:"0 2px 6px rgba(0, 0, 0, 0.2)"},borderRadius:"0px"},"carbon-dark":{mode:"dark",colors:{primary:"#4589ff",secondary:"#a8a8a8",categorical:["#a56eff","#33b1ff","#08bdba","#ff7eb6"],sequential:"blues",diverging:"RdBu",background:"#161616",surface:"#262626",text:"#f4f4f4",textSecondary:"#a8a8a8",grid:"#393939",border:"#393939",focus:"#4589ff",annotation:"#4589ff",success:"#42be65",danger:"#fa4d56",warning:"#f1c21b",error:"#da1e28",info:"#4589ff"},typography:{fontFamily:"'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif",titleSize:16,labelSize:12,tickSize:12},tooltip:{background:"#262626",text:"#f4f4f4",borderRadius:"2px",shadow:"0 4px 12px rgba(0, 0, 0, 0.5)"},borderRadius:"0px"}},H=/*#__PURE__*/new Set,T=/*#__PURE__*/F.createContext(void 0),A=typeof window>"u"?F.useEffect:F.useLayoutEffect;export{o as a,r as b,C as c,j as d,N as e,t as f,l as g};
@@ -13,7 +13,7 @@ import type { AccessibleTableProp } from "../../stream/accessibleTableTypes";
13
13
  export interface SelectionConfig {
14
14
  /** Name of the selection to consume */
15
15
  name: string;
16
- /** Opacity for unselected elements (default 0.2) */
16
+ /** Opacity multiplier for unselected elements. Defaults to the theme's selectionOpacity, then 0.5. */
17
17
  unselectedOpacity?: number;
18
18
  /** Style overrides for unselected elements */
19
19
  unselectedStyle?: Datum;
@@ -51,7 +51,7 @@ export declare function resolutionAppearance(theme: NetworkLayoutContext["theme"
51
51
  };
52
52
  generationColor: (generation: number) => string;
53
53
  style: (context: Omit<ResolutionStyleContext, "theme">, base: Style) => Style;
54
- labelStyle: Partial<Pick<NetworkLabel, "fill" | "stroke" | "fontSize" | "fontWeight" | "strokeWidth" | "paintOrder">> | undefined;
54
+ labelStyle: Partial<Pick<NetworkLabel, "fill" | "stroke" | "strokeWidth" | "fontSize" | "fontWeight" | "paintOrder">> | undefined;
55
55
  dimmedOpacity: number;
56
56
  };
57
57
  /** Match only the hovered component's original members, without expanding through later unions. */
@@ -46,7 +46,7 @@ export declare function sceneBuilder(theme: NetworkLayoutContext["theme"], appea
46
46
  };
47
47
  generationColor: (generation: number) => string;
48
48
  style: (context: Omit<import("./appearance").ResolutionStyleContext, "theme">, base: Style) => Style;
49
- labelStyle: Partial<Pick<NetworkLabel, "fill" | "stroke" | "fontSize" | "fontWeight" | "strokeWidth" | "paintOrder">> | undefined;
49
+ labelStyle: Partial<Pick<NetworkLabel, "fill" | "stroke" | "strokeWidth" | "fontSize" | "fontWeight" | "paintOrder">> | undefined;
50
50
  dimmedOpacity: number;
51
51
  };
52
52
  export declare function shortLabel(text: string, max?: number): string;
@@ -5,6 +5,6 @@ export { useNetworkZoom, useNetworkProjectedSize, useNetworkLOD, useNetworkLODLe
5
5
  export type { NetworkLODOptions } from "./stream/networkZoom/NetworkZoomContext";
6
6
  export { getNetworkContentBounds } from "./stream/networkZoom/geometry";
7
7
  export { fitZoom as fitNetworkZoom, centerZoom as centerNetworkZoom, usableViewport as usableNetworkViewport } from "./stream/networkZoom/geometry";
8
- export type { NetworkZoomOptions, NetworkZoomInsets, NetworkZoomFitOptions, NetworkZoomCenterOptions, NetworkZoomState, NetworkZoomSource, NetworkZoomChange, ZoomableNetworkCustomChartHandle } from "./stream/networkZoom/types";
8
+ export type { NetworkLayoutCommitCamera, NetworkZoomOptions, NetworkZoomInsets, NetworkZoomFitOptions, NetworkZoomCenterOptions, NetworkZoomState, NetworkZoomSource, NetworkZoomChange, ZoomableNetworkCustomChartHandle } from "./stream/networkZoom/types";
9
9
  export type { NetworkViewTransform, NetworkViewportRect } from "./stream/networkViewportTypes";
10
10
  export { projectNetworkPoint, invertNetworkRect } from "./stream/networkViewTransform";
@@ -2,6 +2,9 @@ import type { SemioticTheme, ThemeStoreUpdate } from "./themeCore";
2
2
  export * from "./themeCore";
3
3
  export interface ThemeStoreState {
4
4
  theme: SemioticTheme;
5
- setTheme: (theme: ThemeStoreUpdate) => void;
5
+ /** The public provider installs value equality for its prop/imperative updates. */
6
+ equals?: (a: SemioticTheme, b: SemioticTheme) => boolean;
7
+ /** Provider prop synchronization replaces a resolved theme; imperative updates merge. */
8
+ setTheme: (theme: ThemeStoreUpdate, replace?: boolean) => void;
6
9
  }
7
10
  export declare const ThemeProvider: import("react").FC<import("./createStore").StoreProviderProps<ThemeStoreState>>, useThemeSelector: <R>(selector: (state: ThemeStoreState) => R, equalityFn?: ((a: R, b: R) => boolean) | undefined) => R;
@@ -94,4 +94,6 @@ export declare const HIGH_CONTRAST_THEME: SemioticTheme;
94
94
  export declare function resolveThemeSemanticColors(theme: SemioticTheme | null | undefined): ThemeSemanticColors | undefined;
95
95
  /** Apply accessibility flags to a resolved theme. */
96
96
  export declare function applyThemeAccessibility(theme: SemioticTheme): SemioticTheme;
97
+ /** Merge theme records recursively; palettes replace arrays rather than append. */
98
+ export declare function mergeThemeOverrides<T extends object>(base: T, update: object): T;
97
99
  export declare function resolveThemeUpdate(current: SemioticTheme, theme: ThemeStoreUpdate): SemioticTheme;
@@ -1,2 +1,4 @@
1
+ /** Read a media query without requiring a browser or matchMedia polyfill. */
2
+ export declare function getMediaQuery(query: string): MediaQueryList | undefined;
1
3
  /** Subscribe with the legacy Safari fallback; tolerate unavailable media queries. */
2
4
  export declare function addMqlListener(mql: MediaQueryList | undefined, handler: (event: MediaQueryListEvent) => void): () => void;
@@ -6,5 +6,9 @@ export interface NetworkEdgeHitIndex {
6
6
  root: NetworkHitBranch;
7
7
  }
8
8
  export declare function buildNetworkEdgeHitIndex(edges: NetworkSceneEdge[]): NetworkEdgeHitIndex;
9
- /** Prune by bounds and paint order; Canvas remains the final authority. */
10
- export declare function queryNetworkEdgeHitIndex<T>(index: NetworkEdgeHitIndex, x: number, y: number, tolerance: number, hit: (edge: NetworkSceneEdge) => T | null): T | null;
9
+ /**
10
+ * Prune by bounds; Canvas remains the final authority. `hit` sees each candidate
11
+ * once with its paint order. Returning a hit prunes earlier paint orders;
12
+ * return null for candidates that still need to compete on distance.
13
+ */
14
+ export declare function queryNetworkEdgeHitIndex<T>(index: NetworkEdgeHitIndex, x: number, y: number, tolerance: number, hit: (edge: NetworkSceneEdge, order: number) => T | null): T | null;
@@ -3,7 +3,7 @@ import type { NetworkCustomChartProps } from "../../charts/custom/NetworkCustomC
3
3
  import type { Datum } from "../../charts/shared/datumTypes";
4
4
  import type { NetworkLayoutResult } from "../networkCustomLayout";
5
5
  import type { NetworkViewTransform } from "../networkViewportTypes";
6
- import type { NetworkZoomChange, NetworkZoomOptions, ZoomableNetworkCustomChartHandle } from "./types";
6
+ import type { NetworkLayoutCommitCamera, NetworkZoomChange, NetworkZoomOptions, ZoomableNetworkCustomChartHandle } from "./types";
7
7
  /** An opt-in camera around NetworkCustomChart. Layout remains in authored
8
8
  * coordinates; only presentation, hit testing and the visible window change. */
9
9
  export interface ZoomableNetworkCustomChartProps<TNode extends Datum = Datum, TEdge extends Datum = Datum, TConfig extends object = Record<string, unknown>> extends NetworkCustomChartProps<TNode, TEdge, TConfig> {
@@ -14,10 +14,12 @@ export interface ZoomableNetworkCustomChartProps<TNode extends Datum = Datum, TE
14
14
  onZoomChange?: (zoom: NetworkViewTransform, event: NetworkZoomChange) => void;
15
15
  /**
16
16
  * Called from the commit that renders each new custom layout run's HTML marks
17
- * and overlays, before that frame paints, with the run it replaces. A
18
- * zero-duration camera move made here paints with those marks.
17
+ * and overlays, before that frame paints, with the run it replaces and the
18
+ * commit's camera. A move made through that camera applies in this commit,
19
+ * so the run's marks paint under it, and its `getZoom` reads it back at
20
+ * once. A zero-duration move through the handle lands with those marks too.
19
21
  */
20
- onLayoutCommit?: (result: NetworkLayoutResult | null, previous: NetworkLayoutResult | null) => void;
22
+ onLayoutCommit?: (result: NetworkLayoutResult | null, previous: NetworkLayoutResult | null, camera: NetworkLayoutCommitCamera) => void;
21
23
  zoomOptions?: NetworkZoomOptions;
22
24
  /** Accessible zoom, fit and reset buttons. @default true */
23
25
  zoomControls?: boolean;
@@ -7,11 +7,16 @@ interface Host {
7
7
  /** Moving changes arrive from an animation frame or a microtask, never from
8
8
  * inside a caller's React commit. */
9
9
  change(zoom: NetworkViewTransform, event: NetworkZoomChange): void;
10
+ /** A move made from inside the host's own commit (`jumpTo`): the host
11
+ * applies it in place, with no flush of its own. */
12
+ commit(zoom: NetworkViewTransform, event: NetworkZoomChange): void;
10
13
  }
11
14
  /** A frame-scoped Pointer Events driver. No document gesture listeners or
12
15
  * global registrations; every timer, capture and listener belongs to this host. */
13
16
  export declare function bindNetworkZoom(element: HTMLElement, host: Host): {
14
17
  moveTo: (requested: NetworkViewTransform, nextSource: NetworkZoomSource, duration?: number) => void;
18
+ jumpTo: (requested: NetworkViewTransform, nextSource: NetworkZoomSource) => void;
19
+ rebound: () => void;
15
20
  zoomBy: (factor: number, nextSource?: NetworkZoomSource, point?: {
16
21
  x: number;
17
22
  y: number;
@@ -80,6 +80,16 @@ export interface NetworkZoomCenterOptions {
80
80
  duration?: number;
81
81
  insets?: NetworkZoomInsets;
82
82
  }
83
+ /**
84
+ * The camera during a layout commit (`onLayoutCommit`). A move made through it
85
+ * applies inside that commit, before the committed marks paint, within the
86
+ * bounds as any move is; with a controlled `zoom` it is proposed through
87
+ * `onZoomChange` as any move is. `getZoom` reads the camera as applied.
88
+ */
89
+ export interface NetworkLayoutCommitCamera {
90
+ getZoom(): NetworkViewTransform;
91
+ zoomTo(zoom: NetworkViewTransform): void;
92
+ }
83
93
  /** Change notification. An idle event also fires when a gesture settles. */
84
94
  export interface NetworkZoomChange {
85
95
  source: NetworkZoomSource;
@@ -7,26 +7,24 @@
7
7
  import type { GlyphDef } from "./glyphDef";
8
8
  import type { SceneNode } from "./types";
9
9
  import type { Datum } from "../charts/shared/datumTypes";
10
- import type { ActiveTransition } from "./pipelineTransitionUtils";
11
- export type PrevPosition = {
10
+ import type { ActiveTransition, TransitionOpacity } from "./pipelineTransitionUtils";
11
+ export type PrevPosition = TransitionOpacity & {
12
12
  x: number;
13
13
  y: number;
14
14
  w?: number;
15
15
  h?: number;
16
16
  r?: number;
17
- opacity?: number;
18
17
  openY?: number;
19
18
  closeY?: number;
20
19
  highY?: number;
21
20
  lowY?: number;
22
21
  glyph?: GlyphDef;
23
22
  };
24
- export type PrevPath = {
23
+ export type PrevPath = TransitionOpacity & {
25
24
  topPath?: [number, number][];
26
25
  bottomPath?: [number, number][];
27
26
  path?: [number, number][];
28
27
  pathIds?: string[];
29
- opacity?: number;
30
28
  };
31
29
  /** Context needed from PipelineStore for identity resolution */
32
30
  export interface TransitionContext {
@@ -4,6 +4,10 @@
4
4
  * Extracts common easing logic and types used by PipelineStore,
5
5
  * OrdinalPipelineStore, NetworkPipelineStore, and GeoPipelineStore.
6
6
  */
7
+ import type { Style } from "./types";
8
+ export type TransitionOpacity = Pick<Style, "opacity" | "fillOpacity" | "strokeOpacity">;
9
+ /** Copy channels independently of the animated multiplier, including for exits. */
10
+ export declare function snapshotOpacity(style?: TransitionOpacity | null): TransitionOpacity;
7
11
  /** Active transition state tracked by each PipelineStore */
8
12
  export interface ActiveTransition {
9
13
  startTime: number;
@@ -26,19 +26,7 @@ export { joinPathByIdentity };
26
26
  * `_transitionKey` keeps exits stable across overlapping transitions.
27
27
  */
28
28
  export declare function getNodeIdentity(ctx: TransitionContext, node: SceneNode, index: number): string | null;
29
- /**
30
- * Effective paint alpha for fill-based marks.
31
- *
32
- * Matches the canvas renderer convention (`style.opacity ?? style.fillOpacity ?? 1`)
33
- * used by points, glyphs, rects, heatcells, and candlesticks. Intro/update
34
- * transitions must target this same value — otherwise a mark authored with
35
- * only `fillOpacity: 0.7` animates toward 1, bakes `style.opacity = 1` on
36
- * completion, and then "fades" back to 0.7 on the next dirty rebuild
37
- * (e.g. tab-away → tab-back via FrameRuntime visibility resume).
38
- *
39
- * Line/area marks keep stroke alpha on `style.opacity` alone; their under-
40
- * path fill uses `fillOpacity` independently and is not covered here.
41
- */
29
+ /** Transition opacity is independent of the authored fill/stroke channels. */
42
30
  export declare function resolveMarkOpacity(style?: Style | null): number;
43
31
  /**
44
32
  * Snapshot current scene node positions before rebuild.
@@ -1,5 +1,3 @@
1
1
  import type { NetworkSceneNode } from "../networkTypes";
2
- /**
3
- * Canvas painter for NetworkArcNode (chord diagram arc segments).
4
- */
2
+ /** Canvas painter for NetworkArcNode. */
5
3
  export declare function networkArcRenderer(ctx: CanvasRenderingContext2D, nodes: NetworkSceneNode[]): void;
@@ -1,5 +1,3 @@
1
1
  import type { NetworkSceneNode } from "../networkTypes";
2
- /**
3
- * Canvas painter for NetworkCircleNode (force nodes, tree nodes, circlepack).
4
- */
2
+ /** Canvas painter for NetworkCircleNode. */
5
3
  export declare function networkCircleRenderer(ctx: CanvasRenderingContext2D, nodes: NetworkSceneNode[]): void;
@@ -0,0 +1,5 @@
1
+ import type { NetworkSceneNode, NetworkCircleNode, NetworkRectNode, NetworkArcNode } from "../networkTypes";
2
+ type Primitive = NetworkCircleNode | NetworkRectNode | NetworkArcNode;
3
+ /** Shared paint ordering and alpha ownership for flat and projected network marks. */
4
+ export declare function paintNetworkPrimitives(ctx: CanvasRenderingContext2D, nodes: NetworkSceneNode[], type: Primitive["type"]): void;
5
+ export {};
@@ -1,5 +1,3 @@
1
1
  import type { NetworkSceneNode } from "../networkTypes";
2
- /**
3
- * Canvas painter for NetworkRectNode (sankey nodes, treemap cells, partition blocks).
4
- */
2
+ /** Canvas painter for NetworkRectNode. */
5
3
  export declare function networkRectRenderer(ctx: CanvasRenderingContext2D, nodes: NetworkSceneNode[]): void;
@@ -5,6 +5,9 @@
5
5
  * their aggregated value changes. Each node carries `_pulseIntensity` (0–1),
6
6
  * `_pulseColor`, and optionally `_pulseGlowRadius`.
7
7
  *
8
+ * Pulses are independent of mark opacity, but inherit the frame alpha.
9
+ * Callers pass the original frame alpha and restore their own paint state.
10
+ *
8
11
  * Three visual variants:
9
12
  * - **Rect overlay**: semi-transparent fillRect on top of the bar/cell
10
13
  * - **Circle glow ring**: expanding stroke ring around a point
@@ -20,17 +23,15 @@ interface PulseFields {
20
23
  */
21
24
  export declare function hasPulse(node: PulseFields): boolean;
22
25
  /**
23
- * Render a rectangular pulse overlay (used by bar, heatmap, and network rect renderers).
24
- * Call this after drawing the main fill/stroke for the rectangle.
26
+ * Flash a rectangle, traced path, or supplied projected outline. The caller
27
+ * owns state restoration; rectangular overlays retain their lighter flash.
25
28
  */
26
- export declare function renderRectPulse(ctx: CanvasRenderingContext2D, node: PulseFields & {
29
+ export declare function renderFillPulse(ctx: CanvasRenderingContext2D, node: PulseFields | (PulseFields & {
27
30
  x: number;
28
31
  y: number;
29
32
  w: number;
30
33
  h: number;
31
- }, alphaMultiplier?: number,
32
- /** Projected outline to flash instead of the bounding rectangle. */
33
- path?: Path2D | null): void;
34
+ }), baseAlpha: number, path?: Path2D | null): void;
34
35
  /**
35
36
  * Render a circular glow ring pulse (used by point and network circle renderers).
36
37
  * Call this after drawing the main circle fill/stroke.
@@ -41,12 +42,5 @@ export declare function renderCirclePulse(ctx: CanvasRenderingContext2D, node: P
41
42
  cx?: number;
42
43
  cy?: number;
43
44
  r: number;
44
- }, alphaMultiplier?: number): void;
45
- /**
46
- * Render a path-based fill pulse (used by area, wedge, and geo renderers).
47
- * The caller must trace the path onto ctx BEFORE calling this function,
48
- * or pass a Path2D object as the third argument (for geo renderers).
49
- * This function sets alpha/fillStyle and calls ctx.fill().
50
- */
51
- export declare function renderPathPulse(ctx: CanvasRenderingContext2D, node: PulseFields, path?: Path2D, alphaMultiplier?: number): void;
45
+ }, baseAlpha: number): void;
52
46
  export {};
@@ -18,6 +18,14 @@ import type { GradientStop } from "../charts/shared/gradient";
18
18
  * the arc-emit sites in the network/ordinal serializers.
19
19
  */
20
20
  export declare const ARC_NOOP: DefaultArcObject;
21
+ /** Independent SVG paint channels; opacity applies once to both. */
22
+ export declare function svgPaintStyle(style: Style): {
23
+ opacity: number | undefined;
24
+ fillOpacity: number | undefined;
25
+ strokeOpacity: number | undefined;
26
+ stroke: string | undefined;
27
+ strokeWidth: number | undefined;
28
+ };
21
29
  export declare function svgFill(fill: string | HatchFill | CanvasPattern | undefined, fallback?: string): string;
22
30
  /**
23
31
  * Coerce a candidate SVG `id` value to the strict `[A-Za-z0-9_-]` charset.
@@ -76,4 +84,5 @@ export declare function perCornerSvgPath(n: RectSceneNode): string;
76
84
  * unfilled in SSR too).
77
85
  */
78
86
  export declare function symbolSceneNodeToSVG(n: SymbolSceneNode, i: number, idPrefix?: string): React.ReactNode;
87
+ export declare function pointSceneNodeToSVG(n: PointSceneNode, i: number, idPrefix?: string, hatchPrefix?: string): React.ReactNode;
79
88
  export declare function pointOrRectSceneNodeToSVG(n: PointSceneNode | RectSceneNode, i: number, idPrefix?: string): React.ReactNode;