semiotic 3.8.2 → 3.8.3

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 (113) hide show
  1. package/CLAUDE.md +1 -1
  2. package/README.md +34 -33
  3. package/ai/schema.json +1 -1
  4. package/ai/surface-manifest.json +1 -1
  5. package/ai/system-prompt.md +1 -1
  6. package/dist/{chunk-chunk-C6EJ4IOD.module.min.js → chunk-chunk-2CCFBTQC.module.min.js} +1 -1
  7. package/dist/chunk-chunk-2RXP3FS3.module.min.js +1 -0
  8. package/dist/chunk-chunk-4TMZXLCR.module.min.js +1 -0
  9. package/dist/{chunk-chunk-H4PPRW6N.module.min.js → chunk-chunk-5APBQXZA.module.min.js} +1 -1
  10. package/dist/{chunk-chunk-NO4MCQVD.module.min.js → chunk-chunk-5RKXZQ2P.module.min.js} +1 -1
  11. package/dist/chunk-chunk-6HSGDMTA.module.min.js +2 -0
  12. package/dist/{chunk-chunk-7LHMKRKE.module.min.js → chunk-chunk-7FW6EGLP.module.min.js} +1 -1
  13. package/dist/{chunk-chunk-RH5TSQPH.module.min.js → chunk-chunk-7OEOSCBP.module.min.js} +1 -1
  14. package/dist/{chunk-chunk-FAKO3RGQ.module.min.js → chunk-chunk-A63CTACR.module.min.js} +1 -1
  15. package/dist/chunk-chunk-ANYDWOZF.module.min.js +1 -0
  16. package/dist/{chunk-chunk-ZLKRTF5N.module.min.js → chunk-chunk-AZJUDQRM.module.min.js} +1 -1
  17. package/dist/{chunk-chunk-W3DB2MN4.module.min.js → chunk-chunk-B6V35LMY.module.min.js} +1 -1
  18. package/dist/chunk-chunk-BOSVL645.module.min.js +2 -0
  19. package/dist/chunk-chunk-EMO5NUGE.module.min.js +1 -0
  20. package/dist/chunk-chunk-F25UA5HT.module.min.js +1 -0
  21. package/dist/chunk-chunk-FRIO6MCV.module.min.js +1 -0
  22. package/dist/{chunk-chunk-T27ZEV6A.module.min.js → chunk-chunk-GWSWSPXN.module.min.js} +1 -1
  23. package/dist/chunk-chunk-I6C3KR5H.module.min.js +2 -0
  24. package/dist/chunk-chunk-IP2UE74X.module.min.js +1 -0
  25. package/dist/chunk-chunk-J5RL6GXU.module.min.js +2 -0
  26. package/dist/chunk-chunk-JNCHKRIR.module.min.js +2 -0
  27. package/dist/{chunk-chunk-Z5KXAVQD.module.min.js → chunk-chunk-L3H6DQCR.module.min.js} +1 -1
  28. package/dist/{chunk-chunk-5WEFWNUW.module.min.js → chunk-chunk-M7VYYHCE.module.min.js} +1 -1
  29. package/dist/chunk-chunk-MC35ILYP.module.min.js +2 -0
  30. package/dist/{chunk-chunk-2VUEY5TH.module.min.js → chunk-chunk-N72SWNBV.module.min.js} +1 -1
  31. package/dist/chunk-chunk-OBQRFTIL.module.min.js +2 -0
  32. package/dist/chunk-chunk-OQTLSTGI.module.min.js +2 -0
  33. package/dist/{chunk-chunk-2UN3ANRN.module.min.js → chunk-chunk-SA3D43RA.module.min.js} +1 -1
  34. package/dist/chunk-chunk-SANERMIZ.module.min.js +2 -0
  35. package/dist/{chunk-chunk-DNY43POY.module.min.js → chunk-chunk-UHSZEB74.module.min.js} +1 -1
  36. package/dist/{chunk-chunk-CYIML3AV.module.min.js → chunk-chunk-XQYVEKEJ.module.min.js} +1 -1
  37. package/dist/{chunk-chunk-27HVVXS6.module.min.js → chunk-chunk-Y6AXCRVO.module.min.js} +1 -1
  38. package/dist/components/charts/custom/XYCustomChart.d.ts +3 -0
  39. package/dist/components/charts/realtime/RealtimeHistogram.d.ts +5 -6
  40. package/dist/components/charts/realtime/temporalHistogramConfig.d.ts +11 -0
  41. package/dist/components/charts/shared/areaSeriesData.d.ts +15 -0
  42. package/dist/components/charts/shared/chartMode.d.ts +67 -0
  43. package/dist/components/charts/shared/colorUtils.d.ts +8 -0
  44. package/dist/components/charts/shared/geoStyleDefaults.d.ts +3 -0
  45. package/dist/components/charts/shared/hooks.d.ts +13 -80
  46. package/dist/components/charts/shared/useChartSetup.d.ts +3 -0
  47. package/dist/components/charts/shared/useCustomChartSetup.d.ts +3 -0
  48. package/dist/components/charts/shared/useXYLineStyle.d.ts +3 -2
  49. package/dist/components/charts/shared/xyLineStyle.d.ts +21 -0
  50. package/dist/components/charts/xy/LineChart.d.ts +3 -0
  51. package/dist/components/legendLayout.d.ts +31 -0
  52. package/dist/components/server/serverChartConfigShared.d.ts +29 -0
  53. package/dist/components/server/serverChartConfigs.d.ts +2 -13
  54. package/dist/components/server/serverChartConfigsXY.d.ts +3 -0
  55. package/dist/components/server/serverGaugeOverlay.d.ts +28 -0
  56. package/dist/components/server/staticLegend.d.ts +7 -1
  57. package/dist/components/server/staticSVGChrome.d.ts +57 -0
  58. package/dist/components/stream/GeoPipelineStore.d.ts +2 -0
  59. package/dist/components/stream/GeoSVGOverlay.d.ts +2 -0
  60. package/dist/components/stream/SceneToSVG.d.ts +8 -6
  61. package/dist/components/stream/SceneToSVGGeo.d.ts +10 -0
  62. package/dist/components/stream/SceneToSVGNetwork.d.ts +12 -0
  63. package/dist/components/stream/canvasBackground.d.ts +7 -0
  64. package/dist/components/stream/networkTypes.d.ts +2 -4
  65. package/dist/components/stream/renderBackend.d.ts +14 -0
  66. package/dist/components/stream/sceneToSVGShared.d.ts +51 -0
  67. package/dist/components/types/legendTypes.d.ts +16 -3
  68. package/dist/geo.min.js +1 -1
  69. package/dist/geo.module.min.js +1 -1
  70. package/dist/network.min.js +1 -1
  71. package/dist/network.module.min.js +1 -1
  72. package/dist/ordinal.min.js +1 -1
  73. package/dist/ordinal.module.min.js +1 -1
  74. package/dist/physics.min.js +1 -1
  75. package/dist/physics.module.min.js +1 -1
  76. package/dist/realtime.min.js +1 -1
  77. package/dist/realtime.module.min.js +1 -1
  78. package/dist/semiotic-ai-core.min.js +1 -1
  79. package/dist/semiotic-ai-core.module.min.js +1 -1
  80. package/dist/semiotic-ai.min.js +1 -1
  81. package/dist/semiotic-ai.module.min.js +1 -1
  82. package/dist/semiotic-experimental.min.js +1 -1
  83. package/dist/semiotic-experimental.module.min.js +1 -1
  84. package/dist/semiotic-realtime-core.min.js +1 -1
  85. package/dist/semiotic-realtime-core.module.min.js +1 -1
  86. package/dist/semiotic-recipes-core.module.min.js +1 -1
  87. package/dist/semiotic-recipes.module.min.js +1 -1
  88. package/dist/semiotic-server-edge.min.js +1 -1
  89. package/dist/semiotic-server-edge.module.min.js +1 -1
  90. package/dist/semiotic-server-node.min.js +1 -1
  91. package/dist/semiotic-server-node.module.min.js +1 -1
  92. package/dist/semiotic-utils-core.module.min.js +1 -1
  93. package/dist/semiotic-utils.module.min.js +1 -1
  94. package/dist/semiotic.min.js +1 -1
  95. package/dist/semiotic.module.min.js +1 -1
  96. package/dist/server.min.js +1 -1
  97. package/dist/server.module.min.js +1 -1
  98. package/dist/xy.min.js +1 -1
  99. package/dist/xy.module.min.js +1 -1
  100. package/package.json +1 -1
  101. package/dist/chunk-chunk-6F6GEAQU.module.min.js +0 -1
  102. package/dist/chunk-chunk-BHYTYMY2.module.min.js +0 -2
  103. package/dist/chunk-chunk-E7MIQX7D.module.min.js +0 -2
  104. package/dist/chunk-chunk-ES4DCG3L.module.min.js +0 -1
  105. package/dist/chunk-chunk-IFYPMWKY.module.min.js +0 -1
  106. package/dist/chunk-chunk-L6D3I3V7.module.min.js +0 -2
  107. package/dist/chunk-chunk-ODUZEEBH.module.min.js +0 -2
  108. package/dist/chunk-chunk-P6UBCMSQ.module.min.js +0 -2
  109. package/dist/chunk-chunk-STZFFTAN.module.min.js +0 -2
  110. package/dist/chunk-chunk-U3AGQ5EF.module.min.js +0 -2
  111. package/dist/chunk-chunk-WDIN4LRC.module.min.js +0 -1
  112. package/dist/chunk-chunk-XOYX77KF.module.min.js +0 -2
  113. package/dist/chunk-chunk-ZTNVDWAK.module.min.js +0 -2
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import{DEFAULT_HIT_RADIUS as e,geoAreaHitTarget as t,geoHitTarget as o,hitTargetPoint as i}from"./chunk-chunk-J3XWETBJ.module.min.js";import{GeoCustomChart as n,StreamGeoFrame_default as r}from"./chunk-chunk-P6UBCMSQ.module.min.js";import{mergeShapeStyle as a,normalizePartialMargin as l,useChartSetup as s,useFrameImperativeHandle as c,useResolvedSelection as m}from"./chunk-chunk-BHYTYMY2.module.min.js";import"./chunk-chunk-CYIML3AV.module.min.js";import"./chunk-chunk-5WEFWNUW.module.min.js";import"./chunk-chunk-XOYX77KF.module.min.js";import{buildCustomBehaviorProps as d}from"./chunk-chunk-FAKO3RGQ.module.min.js";import"./chunk-chunk-5UKL5W76.module.min.js";import{composeStyleRules as u,makeNodeRuleContext as h,makeRuleValueResolver as p,matchesThreshold as f,resolveStyleRules as g,ruleMatches as y}from"./chunk-chunk-EMO5NUGE.module.min.js";import"./chunk-chunk-STZFFTAN.module.min.js";import{DEFAULT_COLOR as b,EMPTY_ARRAY as k,filterSparseArray as v,getColor as w,getSequentialInterpolator as S,getSize as C,hatchFillId as A,hatchPatternDef as x,isHatchFill as j,normalizeLinkedHover as R,normalizeTooltip as I,resolveResponsiveRules as P,resolveSvgFill as M,responsiveRuleMatches as H,useChartMode as N,useChartSelection as L,useLinkedHover as z,useObservationSelector as W,useThemeSequential as B,wrapStyleWithSelection as F}from"./chunk-chunk-ODUZEEBH.module.min.js";import{getMinMax as T}from"./chunk-chunk-JJ2OOIET.module.min.js";import"./chunk-chunk-WCX6U47H.module.min.js";import{glyphExtent as O,glyphPlacement as E}from"./chunk-chunk-KTWEBFMX.module.min.js";import{ChartError as D,SafeRender as U,renderEmptyState as Z,renderLoadingState as G,warnMissingField as $}from"./chunk-chunk-ZCNBUZPL.module.min.js";import"./chunk-chunk-YHNZCPOZ.module.min.js";import{useMemo as _}from"react";import{scaleSequential as J}from"d3-scale";import{useState as K,useEffect as Y,useMemo as X}from"react";import{feature as q}from"topojson-client";var Q=new Map;function V(e){return"default"in e?e.default:e}async function ee(e){const t=Q.get(e);if(t)return t;const{topology:o,objectName:i}=await async function(e){try{switch(e){case"world-110m":return{topology:V(await import("world-atlas/countries-110m.json")),objectName:"countries"};case"world-50m":return{topology:V(await import("world-atlas/countries-50m.json")),objectName:"countries"};case"land-110m":return{topology:V(await import("world-atlas/land-110m.json")),objectName:"land"};case"land-50m":return{topology:V(await import("world-atlas/land-50m.json")),objectName:"land"};default:throw Error(`Unknown reference geography: "${e}". Supported: "world-110m", "world-50m", "land-110m", "land-50m".`)}}catch(t){if(/Cannot find module|Failed to resolve|world-atlas/i.test(t instanceof Error?t.message:t+""))throw Error(`resolveReferenceGeography("${e}"): Install the optional peer dependency \`world-atlas\` (\`npm install world-atlas\`) to use built-in reference geographies, or pass GeoJSON Feature[] to \`areas\`.`,{cause:t});throw t}}(e);if(!o||!o.objects)throw Error(`resolveReferenceGeography("${e}"): Failed to load topology. Got ${typeof o} with keys: ${o?Object.keys(o).join(", "):"none"}`);const n=q(o,o.objects[i]),r="features"in n?n.features:[n];return Q.set(e,r),r}function te(e){const t=X(()=>Array.isArray(e)?e:void 0,[e]),[o,i]=K(null);return Y(()=>{if(e&&!Array.isArray(e)){if("string"==typeof(t=e)&&["world-110m","world-50m","land-110m","land-50m"].includes(t)){let t=!1;return i(null),ee(e).then(e=>{t||i(e)}),()=>{t=!0}}var t;"production"!==process.env.NODE_ENV&&console.warn(`[semiotic] Unknown areas reference: "${e}". Supported: "world-110m", "world-50m", "land-110m", "land-50m".`),i(null)}else i(null)},[e]),void 0!==t?t:o}import{jsx as oe,jsxs as ie}from"react/jsx-runtime";function ne(e){const t=N(e.mode,{width:e.width,height:e.height,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),o=B(),{areas:i,valueAccessor:n,styleRules:s,colorScheme:c,projection:h="equalEarth",graticule:p,fitPadding:f,zoomable:g,zoomExtent:y,onZoom:b,dragRotate:k,tileURL:w,tileAttribution:C,tileCacheSize:A,tooltip:x,areaOpacity:j=1,annotations:R,margin:P,className:M,selection:H,linkedHover:z,onObservation:W,onClick:T,chartId:O,loading:E,loadingContent:$,emptyContent:K,frameProps:Y={},stroke:X,strokeWidth:q,opacity:Q}=e,V=g??!!w,ee=te(i),ne=_(()=>ee?v(ee):ee,[ee]),re=_(()=>"function"==typeof n?n:e=>e?.properties?.[n]??e?.[n],[n]),ae=c??o??"blues",le=_(()=>{if(!ne)return J(S(void 0)).domain([0,1]);let e=1/0,t=-1/0;for(const o of ne){const i=re(o);null!=i&&isFinite(i)&&(e>i&&(e=i),i>t&&(t=i))}const o=S(ae);return J(o).domain([Number.isFinite(e)?e:0,Number.isFinite(t)?t:1])},[ne,re,ae]),{activeSelectionHook:se,customHoverBehavior:ce,customClickBehavior:me}=L({selection:H,linkedHover:z,onObservation:W,onClick:T,chartType:"ChoroplethMap",chartId:O,mobileInteraction:t.mobileInteraction}),de=m(H),ue=_(()=>{const e=u(e=>{const t=re(e);return{fill:null!=t&&isFinite(t)?le(t):"#ccc",stroke:"#999",strokeWidth:.5,fillOpacity:j}},s,e=>({value:re(e)}),e=>e&&"object"==typeof e&&e.properties?{...e.properties,...e}:e),t=a(e,{stroke:X,strokeWidth:q,opacity:Q});return se?F(t,se,de):t},[re,le,se,de,j,X,q,Q,s]),he=_(()=>e=>{const t=e?.properties?.name||e?.properties?.NAME||e?.name||e?.NAME||"Feature",o=re(e);return ie("div",{style:{background:"rgba(0,0,0,0.85)",color:"white",padding:"6px 10px",borderRadius:4,fontSize:12},children:[oe("div",{style:{fontWeight:600},children:t}),null!=o&&oe("div",{style:{opacity:.7},children:(i=o,"number"==typeof i&&isFinite(i)?Number.isInteger(i)?i.toLocaleString():i.toLocaleString(void 0,{maximumFractionDigits:2}):(i??"")+"")})]});var i},[re]),pe=_(()=>({top:10,right:10,bottom:10,left:10,...l(P)}),[P]),fe=G(E,t.width,t.height,$)||(ne?null:G(!0,t.width,t.height,$)),ge=fe?null:Z(ne,t.width,t.height,K);if(Array.isArray(ne)&&ne.length>0){const e=ne[0];if(!e||"object"!=typeof e||!e.geometry)return oe(D,{componentName:"ChoroplethMap",message:"ChoroplethMap: areas must be an array of GeoJSON Features with a geometry property.",width:t.width,height:t.height})}const ye={projection:h,areas:ne,areaStyle:ue,size:[t.width,t.height],margin:pe,enableHover:!0,tooltipContent:!1===x?()=>null:!0===x?he:I(x)||he,...null!=p&&{graticule:p},...null!=f&&{fitPadding:f},...V&&{zoomable:!0},...y&&{zoomExtent:y},...b&&{onZoom:b},...null!=k&&{dragRotate:k},...w&&{tileURL:w},...C&&{tileAttribution:C},...A&&{tileCacheSize:A},...d({linkedHover:z,selection:H,onObservation:W,onClick:T,mobileInteraction:t.mobileInteraction,customHoverBehavior:ce,customClickBehavior:me,linkedHoverInClickPredicate:!1}),...R&&R.length>0&&{annotations:R},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},...t.title&&{title:t.title},...t.description&&{description:t.description},...t.summary&&{summary:t.summary},...void 0!==t.accessibleTable&&{accessibleTable:t.accessibleTable},...M&&{className:M},...null!=e.animate&&{animate:e.animate},...Y};return fe||ge||oe(U,{componentName:"ChoroplethMap",width:t.width,height:t.height,children:oe(r,{...ye})})}ne.displayName="ChoroplethMap";import{useMemo as re,useRef as ae,forwardRef as le}from"react";import{jsx as se,jsxs as ce}from"react/jsx-runtime";var me=le(function(e,t){const o=ae(null);c(t,{variant:"geo-points",frameRef:o});const i=N(e.mode,{width:e.width,height:e.height,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{points:n,xAccessor:l="lon",yAccessor:m="lat",sizeBy:p,sizeRange:f=[3,30],colorBy:g,styleRules:y,colorScheme:v,projection:S="equalEarth",graticule:A,fitPadding:x,zoomable:j,zoomExtent:R,onZoom:P,dragRotate:M,tileURL:H,tileAttribution:L,tileCacheSize:z,areas:W,areaStyle:B={fill:"#f0f0f0",stroke:"#ccc",strokeWidth:.5},tooltip:O,annotations:E,margin:D,className:Z,selection:G,linkedHover:_,onObservation:J,onClick:K,chartId:Y,loading:X,loadingContent:q,emptyContent:Q,legendInteraction:V,legendPosition:ee,frameProps:oe={},stroke:ie,strokeWidth:ne,opacity:le}=e,me=j??!!H,de=te(W),ue=s({data:n??k,rawData:n,colorBy:g,colorScheme:v,legendInteraction:V,legendPosition:ee,selection:G,linkedHover:_,fallbackFields:g?["string"==typeof g?g:""]:[],unwrapData:!1,onObservation:J,onClick:K,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"ProportionalSymbolMap",chartId:Y,showLegend:i.showLegend,userMargin:D,marginDefaults:{top:10,bottom:10,left:10,right:10},loading:X,loadingContent:q,emptyContent:Q,width:i.width,height:i.height}),he=ue.data,pe=re(()=>{if(!p)return;const e="function"==typeof p?p:e=>e?.[p],t=he.filter(Boolean).map(t=>e(t)).filter(e=>null!=e&&isFinite(e));return 0!==t.length?T(t):void 0},[he,p]),fe=re(()=>{const e=u(e=>({fill:g?w(e,g,ue.colorScale):b,fillOpacity:.7,stroke:"#fff",strokeWidth:.5,r:p?C(e,p,f,pe):6}),y,h(g,p)),t=a(e,{stroke:ie,strokeWidth:ne,opacity:le});return ue.effectiveSelectionHook?F(t,ue.effectiveSelectionHook,ue.resolvedSelection):t},[g,ue.colorScale,ue.effectiveSelectionHook,ue.resolvedSelection,p,f,pe,ie,ne,le,y]),ge=re(()=>e=>{const t=e?.name||e?.label||e?.NAME||e?.id,o="string"==typeof p?p:null,i=("function"==typeof p?p:e=>e[p])(e),n=e=>"number"==typeof e&&isFinite(e)?Number.isInteger(e)?e.toLocaleString():e.toLocaleString(void 0,{maximumFractionDigits:2}):(e??"")+"",r="string"==typeof g?g:null,a=r?e?.[r]:null;return ce("div",{style:{background:"rgba(0,0,0,0.85)",color:"white",padding:"6px 10px",borderRadius:4,fontSize:12},children:[t&&se("div",{style:{fontWeight:600,marginBottom:2},children:t}),o&&null!=i&&ce("div",{children:[ce("span",{style:{opacity:.7},children:[o,": "]}),n(i)]}),r&&null!=a&&ce("div",{children:[ce("span",{style:{opacity:.7},children:[r,": "]}),a+""]}),!t&&!o&&Object.entries(e).filter(([e])=>"data"!==e&&"x"!==e&&"y"!==e&&"time"!==e).slice(0,4).map(([e,t])=>ce("div",{children:[ce("span",{style:{opacity:.7},children:[e,": "]}),n(t)]},e))]})},[p,g]);if(ue.earlyReturn)return ue.earlyReturn;$("ProportionalSymbolMap",he,"xAccessor",l),$("ProportionalSymbolMap",he,"yAccessor",m);const ye={projection:S,...null!=n&&{points:he},xAccessor:l,yAccessor:m,pointStyle:fe,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},...de&&{areas:de,areaStyle:B},...null!=A&&{graticule:A},...null!=x&&{fitPadding:x},...me&&{zoomable:!0},...R&&{zoomExtent:R},...P&&{onZoom:P},...null!=M&&{dragRotate:M},...H&&{tileURL:H},...L&&{tileAttribution:L},...z&&{tileCacheSize:z},size:[i.width,i.height],margin:ue.margin,enableHover:!0,tooltipContent:!1===O?()=>null:I(O)||ge,...ue.legendBehaviorProps,...d({linkedHover:_,selection:G,onObservation:J,onClick:K,mobileInteraction:ue.mobileInteraction,customHoverBehavior:ue.customHoverBehavior,customClickBehavior:ue.customClickBehavior,linkedHoverInClickPredicate:!1}),...E&&E.length>0&&{annotations:E},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},...i.title&&{title:i.title},...i.description&&{description:i.description},...i.summary&&{summary:i.summary},...void 0!==i.accessibleTable&&{accessibleTable:i.accessibleTable},...Z&&{className:Z},...null!=e.animate&&{animate:e.animate},...oe};return se(U,{componentName:"ProportionalSymbolMap",width:i.width,height:i.height,children:se(r,{ref:o,...ye})})});me.displayName="ProportionalSymbolMap";import{useMemo as de,useCallback as ue,useRef as he,forwardRef as pe}from"react";import{scaleLinear as fe}from"d3-scale";import{jsx as ge,jsxs as ye}from"react/jsx-runtime";var be="__semiotic_x",ke="__semiotic_y",ve=pe(function(e,t){const o=N(e.mode,{width:e.width,height:e.height,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{flows:i,nodes:n,nodeIdAccessor:l="id",xAccessor:m="lon",yAccessor:u="lat",valueAccessor:h="value",projection:p="equalEarth",graticule:f,fitPadding:g,zoomable:y,zoomExtent:S,onZoom:C,dragRotate:A,tileURL:x,tileAttribution:j,tileCacheSize:P,lineType:M="geo",flowStyle:H="basic",areas:L,areaStyle:B={fill:"#f0f0f0",stroke:"#ccc",strokeWidth:.5},edgeColorBy:O,edgeOpacity:E=.6,edgeWidthRange:D=[1,8],edgeLinecap:Z="round",colorScheme:G,showParticles:$,particleStyle:_,tooltip:J,annotations:K,margin:Y,className:X,selection:q,linkedHover:Q,onObservation:V,onClick:ee,chartId:oe,loading:ie,loadingContent:ne,emptyContent:re,frameProps:ae={},legendInteraction:le,legendPosition:se,stroke:ce,strokeWidth:me,opacity:pe,lineIdAccessor:ve}=e,we=y??!!x,Se=te(L),Ce=de(()=>v(n),[n]),Ae=s({data:i??k,rawData:i,colorBy:O,colorScheme:G,legendInteraction:le,legendPosition:se,selection:q,linkedHover:Q,fallbackFields:O?["string"==typeof O?O:""]:[],unwrapData:!1,onObservation:V,onClick:ee,mobileInteraction:o.mobileInteraction,mobileSemantics:o.mobileSemantics,chartType:"FlowMap",chartId:oe,showLegend:o.showLegend,userMargin:Y,marginDefaults:{top:10,bottom:10,left:10,right:10},loading:ie,loadingContent:ne,emptyContent:re,width:o.width,height:o.height}),xe=Ae.data,je=R(Q),Re=z({name:je?.name||"hover",fields:je?.fields||[]}),Ie=W(e=>e.pushObservation),Pe=de(()=>{const e=new Map;for(const t of Ce)e.set(t[l]+"",t);return e},[Ce,l]),Me=he(null),He=he(Pe);He.current=Pe;const Ne=he(m);Ne.current=m;const Le=he(u);Le.current=u;const ze=ue(e=>{if(!e||"object"!=typeof e||null==e.source||null==e.target)return null;const t=He.current,o=t.get(e.source+""),i=t.get(e.target+"");if(!o||!i)return null;const n="function"==typeof Ne.current?Ne.current:e=>e[Ne.current],r="function"==typeof Le.current?Le.current:e=>e[Le.current];return{...e,coordinates:[{[be]:n(o),[ke]:r(o)},{[be]:n(i),[ke]:r(i)}]}},[]);c(t,{variant:"geo-lines",frameRef:Me,overrides:{push:e=>{const t=ze(e);t&&Me.current?.pushLine(t)},pushMany:e=>{const t=[];for(const o of e){const e=ze(o);e&&t.push(e)}t.length>0&&Me.current?.pushManyLines(t)}}});const We=de(()=>{const e=new Map;for(const t of xe)t&&"object"==typeof t&&(null==t.source||e.has(t.source)||e.set(t.source,t),null==t.target||e.has(t.target)||e.set(t.target,t));return e},[xe]),Be=ue(e=>{if(Q)if(e){let t=e.data||e.datum||e;if(Array.isArray(t)&&(t=t[0]),"point"===e.type){const e=We.get(t[l]+"");e&&Re.onHover(e)}else Re.onHover(t)}else Re.onHover(null);if(V||Ie){const t={timestamp:Date.now(),chartType:"FlowMap",chartId:oe};if(e){let o=e.data||e.datum||e;Array.isArray(o)&&(o=o[0]);const i={...t,type:"hover",datum:o||{},x:e.x??0,y:e.y??0};V&&V(i),Ie&&Ie(i)}else{const e={...t,type:"hover-end"};V&&V(e),Ie&&Ie(e)}}},[Q,Re,l,We,V,oe,Ie]),Fe=Ae.customClickBehavior,Te=de(()=>{const e="function"==typeof m?m:e=>e[m],t="function"==typeof u?u:e=>e[u];return xe.map(o=>{if(!o||"object"!=typeof o||null==o.source||null==o.target)return null;const i=Pe.get(o.source+""),n=Pe.get(o.target+"");return i&&n?{...o,coordinates:[{[be]:e(i),[ke]:t(i)},{[be]:e(n),[ke]:t(n)}]}:null}).filter(Boolean)},[xe,Pe,m,u]),Oe=de(()=>{const e="function"==typeof m?m:e=>e[m];return t=>null!=t&&"object"==typeof t&&be in t?t[be]:e(t)},[m]),Ee=de(()=>{const e="function"==typeof u?u:e=>e[u];return t=>null!=t&&"object"==typeof t&&ke in t?t[ke]:e(t)},[u]),De=de(()=>{const e=xe.filter(e=>e&&"object"==typeof e).map(e=>e[h]??0).filter(e=>isFinite(e));return 0===e.length?()=>D[0]:fe().domain(T(e)).range(D)},[xe,h,D]),Ue=de(()=>e=>({stroke:O?w(e,O,Ae.colorScale):b,strokeWidth:De(e[h]??0),strokeLinecap:Z,opacity:E}),[O,Ae.colorScale,De,h,E,Z]),Ze=de(()=>{const e=a(Ue,{stroke:ce,strokeWidth:me,opacity:pe});if(!Ae.effectiveSelectionHook)return e;const t={...Ae.resolvedSelection?.unselectedStyle||{},fillOpacity:0};return F(e,Ae.effectiveSelectionHook,{...Ae.resolvedSelection||{},unselectedStyle:t})},[Ue,Ae.effectiveSelectionHook,Ae.resolvedSelection,ce,me,pe]),Ge=de(()=>a(()=>({fill:"#333",r:5,fillOpacity:.8}),{stroke:ce,strokeWidth:me,opacity:pe}),[ce,me,pe]),$e=de(()=>e=>{if(e?.geometry||e?.properties||e?.data?.geometry){const t=e?.properties?.name||e?.properties?.NAME||e?.name||e?.NAME||e?.data?.properties?.name||e?.data?.properties?.NAME;if(t)return ge("div",{style:{background:"rgba(0,0,0,0.85)",color:"white",padding:"6px 10px",borderRadius:4,fontSize:12},children:ge("div",{style:{fontWeight:600},children:t})})}if(null!=e?.source&&null!=e?.target){const t=e[h];return ye("div",{style:{background:"rgba(0,0,0,0.85)",color:"white",padding:"6px 10px",borderRadius:4,fontSize:12},children:[ye("div",{style:{fontWeight:600},children:[e.source," → ",e.target]}),null!=t&&ge("div",{style:{opacity:.7},children:"number"==typeof t?t.toLocaleString():t})]})}const t=e?.name||e?.label||e?.[l];return null!=t?ge("div",{style:{background:"rgba(0,0,0,0.85)",color:"white",padding:"6px 10px",borderRadius:4,fontSize:12},children:ge("div",{style:{fontWeight:600},children:t})}):null},[h,l]);if(Ae.earlyReturn)return Ae.earlyReturn;const _e={projection:p,...null!=i&&{lines:Te},points:Ce,xAccessor:Oe,yAccessor:Ee,lineDataAccessor:"coordinates",...null!=ve&&{lineIdAccessor:ve},lineType:M,flowStyle:H,lineStyle:Ze,pointStyle:Ge,...Se&&{areas:Se,areaStyle:B},...null!=f&&{graticule:f},...null!=g&&{fitPadding:g},...we&&{zoomable:!0},...S&&{zoomExtent:S},...C&&{onZoom:C},...null!=A&&{dragRotate:A},...$&&{showParticles:$},..._&&{particleStyle:_},...x&&{tileURL:x},...j&&{tileAttribution:j},...P&&{tileCacheSize:P},size:[o.width,o.height],margin:Ae.margin,enableHover:!0,tooltipContent:!1===J?()=>null:I(J)||$e,...Ae.legendBehaviorProps,...d({linkedHover:Q,selection:q,onObservation:V,onClick:ee,mobileInteraction:Ae.mobileInteraction,customHoverBehavior:Be,customClickBehavior:Fe,linkedHoverInClickPredicate:!1}),...K&&K.length>0&&{annotations:K},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},...o.title&&{title:o.title},...o.description&&{description:o.description},...o.summary&&{summary:o.summary},...void 0!==o.accessibleTable&&{accessibleTable:o.accessibleTable},...X&&{className:X},...null!=e.animate&&{animate:e.animate},...ae};return ge(U,{componentName:"FlowMap",width:o.width,height:o.height,children:ge(r,{ref:Me,..._e})})});ve.displayName="FlowMap";import{useMemo as we,useRef as Se,useState as Ce,useEffect as Ae,useCallback as xe,forwardRef as je}from"react";import{jsx as Re,jsxs as Ie}from"react/jsx-runtime";var Pe=je(function(e,t){const o=N(e.mode,{width:e.width,height:e.height,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{points:i,lines:n,xAccessor:l="lon",yAccessor:m="lat",nodeIdAccessor:p="id",center:f,costAccessor:g,strength:y=1,lineMode:k="straight",projection:S="mercator",graticule:C,fitPadding:A,zoomable:x,zoomExtent:j,onZoom:R,dragRotate:P,tileURL:M,tileAttribution:H,tileCacheSize:L,transition:z,colorBy:W,styleRules:B,colorScheme:T,pointRadius:O=5,tooltip:E,showRings:D=!0,ringStyle:Z,showNorth:G=!0,costLabel:_,annotations:J,margin:K,className:Y,selection:X,linkedHover:q,onObservation:Q,onClick:V,chartId:ee,loading:te,loadingContent:oe,emptyContent:ie,legendPosition:ne,frameProps:re={},stroke:ae,strokeWidth:le,opacity:se}=e,ce=x??!!M,me=we(()=>v(i),[i]),de=s({data:me,rawData:i,colorBy:W,colorScheme:T,legendInteraction:void 0,legendPosition:ne,selection:X,linkedHover:q,fallbackFields:W?["string"==typeof W?W:""]:[],unwrapData:!1,onObservation:Q,onClick:V,mobileInteraction:o.mobileInteraction,mobileSemantics:o.mobileSemantics,chartType:"DistanceCartogram",chartId:ee,showLegend:o.showLegend,userMargin:K,marginDefaults:{top:10,bottom:10,left:10,right:10},loading:te,loadingContent:oe,emptyContent:ie,width:o.width,height:o.height}),ue=we(()=>{const e=u(e=>({fill:W?w(e,W,de.colorScale):b,fillOpacity:.8,stroke:"#fff",strokeWidth:1,r:O}),B,h(W)),t=a(e,{stroke:ae,strokeWidth:le,opacity:se});return de.effectiveSelectionHook?F(t,de.effectiveSelectionHook,de.resolvedSelection):t},[W,de.colorScale,de.effectiveSelectionHook,de.resolvedSelection,O,ae,le,se,B]),he=we(()=>({center:f,centerAccessor:p,costAccessor:g,strength:y,lineMode:k}),[f,p,g,y,k]),pe=we(()=>{if(!n)return;const e="function"==typeof l?l:e=>e[l],t="function"==typeof m?m:e=>e[m],o=new Map;for(const e of me)o.set(e[p]+"",e);return n.map(i=>{if(i.coordinates)return i;const n=o.get(i.source+""),r=o.get(i.target+"");return n&&r?{...i,coordinates:[{[l]:e(n),[m]:t(n)},{[l]:e(r),[m]:t(r)}]}:null}).filter(Boolean)},[n,me,l,m,p]),fe=we(()=>e=>{const t=("function"==typeof g?g:e=>e[g])(e);return Ie("div",{style:{background:"rgba(0,0,0,0.85)",color:"white",padding:"6px 10px",borderRadius:4,fontSize:12},children:[Re("div",{style:{fontWeight:600},children:e[p]||e.name||e.id||"Point"}),null!=t&&Ie("div",{style:{opacity:.7},children:["Cost: ","number"==typeof t?t.toFixed(1):t]})]})},[g,p]),ge=Se(null);c(t,{variant:"geo-points",frameRef:ge});const[ye,be]=Ce(null),ke=xe(()=>{const e=ge.current?.getCartogramLayout?.();e&&be(t=>t&&t.cx===e.cx&&t.cy===e.cy&&t.maxCost===e.maxCost&&t.availableRadius===e.availableRadius?t:e)},[]);Ae(()=>{const e=requestAnimationFrame(ke);return()=>cancelAnimationFrame(e)},[ke,y,f,o.width,o.height,me]);const ve=we(()=>{if(!D||!ye)return[];const{maxCost:e}=ye;if(0>=e)return[];if(Array.isArray(D))return D.filter(t=>t>0&&e>=t);const t="number"==typeof D?D:Math.min(5,Math.max(2,Math.ceil(e/5))),o=e/t,i=[];for(let e=1;t>=e;e++)i.push(Math.round(o*e*10)/10);return i},[D,ye]),je=we(()=>{if(!ye)return re.foregroundGraphics||null;const{cx:e,cy:t,maxCost:o,availableRadius:i}=ye,n={stroke:"#999",strokeWidth:.8,strokeDasharray:"4,3",labelColor:"#777",labelSize:10,...Z},r=de.margin.left??10,a=de.margin.top??10;return Ie("g",{children:[ve.map(l=>{const s=l/o*i;return Ie("g",{children:[Re("circle",{cx:e+r,cy:t+a,r:s,fill:"none",stroke:n.stroke,strokeWidth:n.strokeWidth,strokeDasharray:n.strokeDasharray,opacity:.5}),Ie("text",{x:e+r+s+3,y:t+a-2,fontSize:n.labelSize,fill:n.labelColor,fontFamily:"system-ui, sans-serif",children:[l,_?" "+_:""]})]},l)}),G&&Ie("g",{transform:`translate(${r+24}, ${a+24})`,children:[Re("circle",{r:16,fill:"white",fillOpacity:.85,stroke:"#bbb",strokeWidth:.8}),Re("path",{d:"M0,-11 L3,-3 L1,-4 L1,7 L-1,7 L-1,-4 L-3,-3 Z",fill:"#555",stroke:"none"}),Re("text",{y:-12,textAnchor:"middle",fontSize:7,fontWeight:700,fill:"#555",fontFamily:"system-ui, sans-serif",children:"N"}),Re("line",{x1:11,y1:0,x2:13,y2:0,stroke:"#bbb",strokeWidth:.8}),Re("line",{x1:-11,y1:0,x2:-13,y2:0,stroke:"#bbb",strokeWidth:.8}),Re("line",{x1:0,y1:11,x2:0,y2:13,stroke:"#bbb",strokeWidth:.8})]}),re.foregroundGraphics]})},[ye,ve,G,_,Z,de.margin,re.foregroundGraphics]);if(de.earlyReturn)return de.earlyReturn;$("DistanceCartogram",me,"xAccessor",l),$("DistanceCartogram",me,"yAccessor",m);const Pe={projection:S,...null!=i&&{points:me},...pe&&{lines:pe,lineDataAccessor:"coordinates"},xAccessor:l,yAccessor:m,pointIdAccessor:p,pointStyle:ue,projectionTransform:he,...z&&{transition:{duration:z}},...null!=C&&{graticule:C},...null!=A&&{fitPadding:A},...ce&&{zoomable:!0},...j&&{zoomExtent:j},...R&&{onZoom:R},...null!=P&&{dragRotate:P},...M&&{tileURL:M},...H&&{tileAttribution:H},...L&&{tileCacheSize:L},size:[o.width,o.height],margin:de.margin,enableHover:!0,tooltipContent:!1===E?()=>null:I(E)||fe,...de.legendBehaviorProps,...d({linkedHover:q,selection:X,onObservation:Q,onClick:V,mobileInteraction:de.mobileInteraction,customHoverBehavior:de.customHoverBehavior,customClickBehavior:de.customClickBehavior,linkedHoverInClickPredicate:!1}),...J&&J.length>0&&{annotations:J},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},...o.title&&{title:o.title},...o.description&&{description:o.description},...o.summary&&{summary:o.summary},...void 0!==o.accessibleTable&&{accessibleTable:o.accessibleTable},...Y&&{className:Y},...null!=e.animate&&{animate:e.animate},...re,foregroundGraphics:je};return Re(U,{componentName:"DistanceCartogram",width:o.width,height:o.height,children:Re(r,{ref:ge,...Pe})})});function Me(e,t,o){const{featureKey:i,dataKey:n}=o,r=new Map;for(const e of t)r.set(e[n]+"",e);return e.map(e=>{const t=(e=>{const t=i.split(".");let o=e;for(const e of t)o=null!==o&&"object"==typeof o?o[e]:void 0;return(o??"")+""})(e),o=r.get(t);return o?{...e,properties:{...e.properties,...o}}:e})}Pe.displayName="DistanceCartogram";export{ne as ChoroplethMap,e as DEFAULT_HIT_RADIUS,Pe as DistanceCartogram,ve as FlowMap,n as GeoCustomChart,me as ProportionalSymbolMap,r as StreamGeoFrame,u as composeStyleRules,t as geoAreaHitTarget,o as geoHitTarget,O as glyphExtent,E as glyphPlacement,A as hatchFillId,x as hatchPatternDef,i as hitTargetPoint,j as isHatchFill,h as makeNodeRuleContext,p as makeRuleValueResolver,f as matchesThreshold,Me as mergeData,ee as resolveReferenceGeography,P as resolveResponsiveRules,g as resolveStyleRules,M as resolveSvgFill,H as responsiveRuleMatches,y as ruleMatches};
2
+ import{DEFAULT_HIT_RADIUS as e,geoAreaHitTarget as t,geoHitTarget as o,hitTargetPoint as i}from"./chunk-chunk-J3XWETBJ.module.min.js";import{GeoCustomChart as n,StreamGeoFrame_default as r}from"./chunk-chunk-OBQRFTIL.module.min.js";import{mergeShapeStyle as a,normalizePartialMargin as l,useChartSetup as s,useFrameImperativeHandle as c,useResolvedSelection as m}from"./chunk-chunk-I6C3KR5H.module.min.js";import"./chunk-chunk-XQYVEKEJ.module.min.js";import"./chunk-chunk-M7VYYHCE.module.min.js";import"./chunk-chunk-OQTLSTGI.module.min.js";import{buildCustomBehaviorProps as d}from"./chunk-chunk-A63CTACR.module.min.js";import"./chunk-chunk-5UKL5W76.module.min.js";import{composeStyleRules as u,makeNodeRuleContext as h,makeRuleValueResolver as p,matchesThreshold as f,resolveStyleRules as g,ruleMatches as y}from"./chunk-chunk-EMO5NUGE.module.min.js";import"./chunk-chunk-SANERMIZ.module.min.js";import{DEFAULT_COLOR as b,EMPTY_ARRAY as v,filterSparseArray as k,getColor as w,getSequentialInterpolator as S,getSize as C,hatchFillId as A,hatchPatternDef as x,isHatchFill as j,normalizeLinkedHover as R,normalizeTooltip as I,resolveResponsiveRules as P,resolveSvgFill as M,responsiveRuleMatches as H,useChartMode as L,useChartSelection as N,useLinkedHover as z,useObservationSelector as T,useThemeSequential as B,wrapStyleWithSelection as E}from"./chunk-chunk-6HSGDMTA.module.min.js";import{getMinMax as W}from"./chunk-chunk-JJ2OOIET.module.min.js";import"./chunk-chunk-WCX6U47H.module.min.js";import{glyphExtent as O,glyphPlacement as F}from"./chunk-chunk-KTWEBFMX.module.min.js";import{ChartError as D,SafeRender as U,renderEmptyState as Z,renderLoadingState as G,warnMissingField as $}from"./chunk-chunk-ZCNBUZPL.module.min.js";import"./chunk-chunk-YHNZCPOZ.module.min.js";import{useMemo as J}from"react";import{scaleSequential as _}from"d3-scale";import{useState as K,useEffect as q,useMemo as X}from"react";import{feature as Y}from"topojson-client";var Q=new Map;function V(e){return"default"in e?e.default:e}async function ee(e){const t=Q.get(e);if(t)return t;const{topology:o,objectName:i}=await async function(e){try{switch(e){case"world-110m":return{topology:V(await import("world-atlas/countries-110m.json")),objectName:"countries"};case"world-50m":return{topology:V(await import("world-atlas/countries-50m.json")),objectName:"countries"};case"land-110m":return{topology:V(await import("world-atlas/land-110m.json")),objectName:"land"};case"land-50m":return{topology:V(await import("world-atlas/land-50m.json")),objectName:"land"};default:throw Error(`Unknown reference geography: "${e}". Supported: "world-110m", "world-50m", "land-110m", "land-50m".`)}}catch(t){if(/Cannot find module|Failed to resolve|world-atlas/i.test(t instanceof Error?t.message:t+""))throw Error(`resolveReferenceGeography("${e}"): Install the optional peer dependency \`world-atlas\` (\`npm install world-atlas\`) to use built-in reference geographies, or pass GeoJSON Feature[] to \`areas\`.`,{cause:t});throw t}}(e);if(!o||!o.objects)throw Error(`resolveReferenceGeography("${e}"): Failed to load topology. Got ${typeof o} with keys: ${o?Object.keys(o).join(", "):"none"}`);const n=Y(o,o.objects[i]),r="features"in n?n.features:[n];return Q.set(e,r),r}function te(e){const t=X(()=>Array.isArray(e)?e:void 0,[e]),[o,i]=K(null);return q(()=>{if(e&&!Array.isArray(e)){if("string"==typeof(t=e)&&["world-110m","world-50m","land-110m","land-50m"].includes(t)){let t=!1;return i(null),ee(e).then(e=>{t||i(e)}),()=>{t=!0}}var t;"production"!==process.env.NODE_ENV&&console.warn(`[semiotic] Unknown areas reference: "${e}". Supported: "world-110m", "world-50m", "land-110m", "land-50m".`),i(null)}else i(null)},[e]),void 0!==t?t:o}import{jsx as oe,jsxs as ie}from"react/jsx-runtime";function ne(e){const t=L(e.mode,{width:e.width,height:e.height,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),o=B(),{areas:i,valueAccessor:n,styleRules:s,colorScheme:c,projection:h="equalEarth",graticule:p,fitPadding:f,zoomable:g,zoomExtent:y,onZoom:b,dragRotate:v,tileURL:w,tileAttribution:C,tileCacheSize:A,tooltip:x,areaOpacity:j=1,annotations:R,margin:P,className:M,selection:H,linkedHover:z,onObservation:T,onClick:W,chartId:O,loading:F,loadingContent:$,emptyContent:K,frameProps:q={},stroke:X,strokeWidth:Y,opacity:Q}=e,V=g??!!w,ee=te(i),ne=J(()=>ee?k(ee):ee,[ee]),re=J(()=>"function"==typeof n?n:e=>e?.properties?.[n]??e?.[n],[n]),ae=c??o??"blues",le=J(()=>{if(!ne)return _(S(void 0)).domain([0,1]);let e=1/0,t=-1/0;for(const o of ne){const i=re(o);null!=i&&isFinite(i)&&(e>i&&(e=i),i>t&&(t=i))}const o=S(ae);return _(o).domain([Number.isFinite(e)?e:0,Number.isFinite(t)?t:1])},[ne,re,ae]),{activeSelectionHook:se,customHoverBehavior:ce,customClickBehavior:me}=N({selection:H,linkedHover:z,onObservation:T,onClick:W,chartType:"ChoroplethMap",chartId:O,mobileInteraction:t.mobileInteraction}),de=m(H),ue=J(()=>{const e=u(e=>{const t=re(e);return{fill:null!=t&&isFinite(t)?le(t):"#ccc",stroke:"#999",strokeWidth:.5,fillOpacity:j}},s,e=>({value:re(e)}),e=>e&&"object"==typeof e&&e.properties?{...e.properties,...e}:e),t=a(e,{stroke:X,strokeWidth:Y,opacity:Q});return se?E(t,se,de):t},[re,le,se,de,j,X,Y,Q,s]),he=J(()=>e=>{const t=e?.properties?.name||e?.properties?.NAME||e?.name||e?.NAME||"Feature",o=re(e);return ie("div",{style:{background:"rgba(0,0,0,0.85)",color:"white",padding:"6px 10px",borderRadius:4,fontSize:12},children:[oe("div",{style:{fontWeight:600},children:t}),null!=o&&oe("div",{style:{opacity:.7},children:(i=o,"number"==typeof i&&isFinite(i)?Number.isInteger(i)?i.toLocaleString():i.toLocaleString(void 0,{maximumFractionDigits:2}):(i??"")+"")})]});var i},[re]),pe=J(()=>({top:10,right:10,bottom:10,left:10,...l(P)}),[P]),fe=G(F,t.width,t.height,$)||(ne?null:G(!0,t.width,t.height,$)),ge=fe?null:Z(ne,t.width,t.height,K);if(Array.isArray(ne)&&ne.length>0){const e=ne[0];if(!e||"object"!=typeof e||!e.geometry)return oe(D,{componentName:"ChoroplethMap",message:"ChoroplethMap: areas must be an array of GeoJSON Features with a geometry property.",width:t.width,height:t.height})}const ye={projection:h,areas:ne,areaStyle:ue,size:[t.width,t.height],margin:pe,enableHover:!0,tooltipContent:!1===x?()=>null:!0===x?he:I(x)||he,...null!=p&&{graticule:p},...null!=f&&{fitPadding:f},...V&&{zoomable:!0},...y&&{zoomExtent:y},...b&&{onZoom:b},...null!=v&&{dragRotate:v},...w&&{tileURL:w},...C&&{tileAttribution:C},...A&&{tileCacheSize:A},...d({linkedHover:z,selection:H,onObservation:T,onClick:W,mobileInteraction:t.mobileInteraction,customHoverBehavior:ce,customClickBehavior:me,linkedHoverInClickPredicate:!1}),...R&&R.length>0&&{annotations:R},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},...t.title&&{title:t.title},...t.description&&{description:t.description},...t.summary&&{summary:t.summary},...void 0!==t.accessibleTable&&{accessibleTable:t.accessibleTable},...M&&{className:M},...null!=e.animate&&{animate:e.animate},...q};return fe||ge||oe(U,{componentName:"ChoroplethMap",width:t.width,height:t.height,children:oe(r,{...ye})})}ne.displayName="ChoroplethMap";import{useMemo as re,useRef as ae,forwardRef as le}from"react";var se={fill:"#f0f0f0",stroke:"#ccc",strokeWidth:.5};import{jsx as ce,jsxs as me}from"react/jsx-runtime";var de=le(function(e,t){const o=ae(null);c(t,{variant:"geo-points",frameRef:o});const i=L(e.mode,{width:e.width,height:e.height,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{points:n,xAccessor:l="lon",yAccessor:m="lat",sizeBy:p,sizeRange:f=[3,30],colorBy:g,styleRules:y,colorScheme:k,projection:S="equalEarth",graticule:A,fitPadding:x,zoomable:j,zoomExtent:R,onZoom:P,dragRotate:M,tileURL:H,tileAttribution:N,tileCacheSize:z,areas:T,areaStyle:B=se,tooltip:O,annotations:F,margin:D,className:Z,selection:G,linkedHover:J,onObservation:_,onClick:K,chartId:q,loading:X,loadingContent:Y,emptyContent:Q,legendInteraction:V,legendPosition:ee,frameProps:oe={},stroke:ie,strokeWidth:ne,opacity:le}=e,de=j??!!H,ue=te(T),he=s({data:n??v,rawData:n,colorBy:g,colorScheme:k,legendInteraction:V,legendPosition:ee,selection:G,linkedHover:J,fallbackFields:g?["string"==typeof g?g:""]:[],unwrapData:!1,onObservation:_,onClick:K,mobileInteraction:i.mobileInteraction,mobileSemantics:i.mobileSemantics,chartType:"ProportionalSymbolMap",chartId:q,showLegend:i.showLegend,userMargin:D,marginDefaults:{top:10,bottom:10,left:10,right:10},loading:X,loadingContent:Y,emptyContent:Q,width:i.width,height:i.height}),pe=he.data,fe=re(()=>{if(!p)return;const e="function"==typeof p?p:e=>e?.[p],t=pe.filter(Boolean).map(t=>e(t)).filter(e=>null!=e&&isFinite(e));return 0!==t.length?W(t):void 0},[pe,p]),ge=re(()=>{const e=u(e=>({fill:g?w(e,g,he.colorScale):b,fillOpacity:.7,stroke:"#fff",strokeWidth:.5,r:p?C(e,p,f,fe):6}),y,h(g,p)),t=a(e,{stroke:ie,strokeWidth:ne,opacity:le});return he.effectiveSelectionHook?E(t,he.effectiveSelectionHook,he.resolvedSelection):t},[g,he.colorScale,he.effectiveSelectionHook,he.resolvedSelection,p,f,fe,ie,ne,le,y]),ye=re(()=>e=>{const t=e?.name||e?.label||e?.NAME||e?.id,o="string"==typeof p?p:null,i=("function"==typeof p?p:e=>e[p])(e),n=e=>"number"==typeof e&&isFinite(e)?Number.isInteger(e)?e.toLocaleString():e.toLocaleString(void 0,{maximumFractionDigits:2}):(e??"")+"",r="string"==typeof g?g:null,a=r?e?.[r]:null;return me("div",{style:{background:"rgba(0,0,0,0.85)",color:"white",padding:"6px 10px",borderRadius:4,fontSize:12},children:[t&&ce("div",{style:{fontWeight:600,marginBottom:2},children:t}),o&&null!=i&&me("div",{children:[me("span",{style:{opacity:.7},children:[o,": "]}),n(i)]}),r&&null!=a&&me("div",{children:[me("span",{style:{opacity:.7},children:[r,": "]}),a+""]}),!t&&!o&&Object.entries(e).filter(([e])=>"data"!==e&&"x"!==e&&"y"!==e&&"time"!==e).slice(0,4).map(([e,t])=>me("div",{children:[me("span",{style:{opacity:.7},children:[e,": "]}),n(t)]},e))]})},[p,g]);if(he.earlyReturn)return he.earlyReturn;$("ProportionalSymbolMap",pe,"xAccessor",l),$("ProportionalSymbolMap",pe,"yAccessor",m);const be={projection:S,...null!=n&&{points:pe},xAccessor:l,yAccessor:m,pointStyle:ge,...e.pointIdAccessor&&{pointIdAccessor:e.pointIdAccessor},...ue&&{areas:ue,areaStyle:B},...null!=A&&{graticule:A},...null!=x&&{fitPadding:x},...de&&{zoomable:!0},...R&&{zoomExtent:R},...P&&{onZoom:P},...null!=M&&{dragRotate:M},...H&&{tileURL:H},...N&&{tileAttribution:N},...z&&{tileCacheSize:z},size:[i.width,i.height],margin:he.margin,enableHover:!0,tooltipContent:!1===O?()=>null:I(O)||ye,...he.legendBehaviorProps,...d({linkedHover:J,selection:G,onObservation:_,onClick:K,mobileInteraction:he.mobileInteraction,customHoverBehavior:he.customHoverBehavior,customClickBehavior:he.customClickBehavior,linkedHoverInClickPredicate:!1}),...F&&F.length>0&&{annotations:F},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},...i.title&&{title:i.title},...i.description&&{description:i.description},...i.summary&&{summary:i.summary},...void 0!==i.accessibleTable&&{accessibleTable:i.accessibleTable},...Z&&{className:Z},...null!=e.animate&&{animate:e.animate},...oe};return ce(U,{componentName:"ProportionalSymbolMap",width:i.width,height:i.height,children:ce(r,{ref:o,...be})})});de.displayName="ProportionalSymbolMap";import{useMemo as ue,useCallback as he,useRef as pe,forwardRef as fe}from"react";import{scaleLinear as ge}from"d3-scale";import{jsx as ye,jsxs as be}from"react/jsx-runtime";var ve="__semiotic_x",ke="__semiotic_y",we=fe(function(e,t){const o=L(e.mode,{width:e.width,height:e.height,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{flows:i,nodes:n,nodeIdAccessor:l="id",xAccessor:m="lon",yAccessor:u="lat",valueAccessor:h="value",projection:p="equalEarth",graticule:f,fitPadding:g,zoomable:y,zoomExtent:S,onZoom:C,dragRotate:A,tileURL:x,tileAttribution:j,tileCacheSize:P,lineType:M="geo",flowStyle:H="basic",areas:N,areaStyle:B=se,edgeColorBy:O,edgeOpacity:F=.6,edgeWidthRange:D=[1,8],edgeLinecap:Z="round",colorScheme:G,showParticles:$,particleStyle:J,tooltip:_,annotations:K,margin:q,className:X,selection:Y,linkedHover:Q,onObservation:V,onClick:ee,chartId:oe,loading:ie,loadingContent:ne,emptyContent:re,frameProps:ae={},legendInteraction:le,legendPosition:ce,stroke:me,strokeWidth:de,opacity:fe,lineIdAccessor:we}=e,Se=y??!!x,Ce=te(N),Ae=ue(()=>k(n),[n]),xe=s({data:i??v,rawData:i,colorBy:O,colorScheme:G,legendInteraction:le,legendPosition:ce,selection:Y,linkedHover:Q,fallbackFields:O?["string"==typeof O?O:""]:[],unwrapData:!1,onObservation:V,onClick:ee,mobileInteraction:o.mobileInteraction,mobileSemantics:o.mobileSemantics,chartType:"FlowMap",chartId:oe,showLegend:o.showLegend,userMargin:q,marginDefaults:{top:10,bottom:10,left:10,right:10},loading:ie,loadingContent:ne,emptyContent:re,width:o.width,height:o.height}),je=xe.data,Re=R(Q),Ie=z({name:Re?.name||"hover",fields:Re?.fields||[]}),Pe=T(e=>e.pushObservation),Me=ue(()=>{const e=new Map;for(const t of Ae)e.set(t[l]+"",t);return e},[Ae,l]),He=pe(null),Le=pe(Me);Le.current=Me;const Ne=pe(m);Ne.current=m;const ze=pe(u);ze.current=u;const Te=he(e=>{if(!e||"object"!=typeof e||null==e.source||null==e.target)return null;const t=Le.current,o=t.get(e.source+""),i=t.get(e.target+"");if(!o||!i)return null;const n="function"==typeof Ne.current?Ne.current:e=>e[Ne.current],r="function"==typeof ze.current?ze.current:e=>e[ze.current];return{...e,coordinates:[{[ve]:n(o),[ke]:r(o)},{[ve]:n(i),[ke]:r(i)}]}},[]);c(t,{variant:"geo-lines",frameRef:He,overrides:{push:e=>{const t=Te(e);t&&He.current?.pushLine(t)},pushMany:e=>{const t=[];for(const o of e){const e=Te(o);e&&t.push(e)}t.length>0&&He.current?.pushManyLines(t)}}});const Be=ue(()=>{const e=new Map;for(const t of je)t&&"object"==typeof t&&(null==t.source||e.has(t.source)||e.set(t.source,t),null==t.target||e.has(t.target)||e.set(t.target,t));return e},[je]),Ee=he(e=>{if(Q)if(e){let t=e.data||e.datum||e;if(Array.isArray(t)&&(t=t[0]),"point"===e.type){const e=Be.get(t[l]+"");e&&Ie.onHover(e)}else Ie.onHover(t)}else Ie.onHover(null);if(V||Pe){const t={timestamp:Date.now(),chartType:"FlowMap",chartId:oe};if(e){let o=e.data||e.datum||e;Array.isArray(o)&&(o=o[0]);const i={...t,type:"hover",datum:o||{},x:e.x??0,y:e.y??0};V&&V(i),Pe&&Pe(i)}else{const e={...t,type:"hover-end"};V&&V(e),Pe&&Pe(e)}}},[Q,Ie,l,Be,V,oe,Pe]),We=xe.customClickBehavior,Oe=ue(()=>{const e="function"==typeof m?m:e=>e[m],t="function"==typeof u?u:e=>e[u];return je.map(o=>{if(!o||"object"!=typeof o||null==o.source||null==o.target)return null;const i=Me.get(o.source+""),n=Me.get(o.target+"");return i&&n?{...o,coordinates:[{[ve]:e(i),[ke]:t(i)},{[ve]:e(n),[ke]:t(n)}]}:null}).filter(Boolean)},[je,Me,m,u]),Fe=ue(()=>{const e="function"==typeof m?m:e=>e[m];return t=>null!=t&&"object"==typeof t&&ve in t?t[ve]:e(t)},[m]),De=ue(()=>{const e="function"==typeof u?u:e=>e[u];return t=>null!=t&&"object"==typeof t&&ke in t?t[ke]:e(t)},[u]),Ue=ue(()=>{const e=je.filter(e=>e&&"object"==typeof e).map(e=>e[h]??0).filter(e=>isFinite(e));return 0===e.length?()=>D[0]:ge().domain(W(e)).range(D)},[je,h,D]),Ze=ue(()=>e=>({stroke:O?w(e,O,xe.colorScale):b,strokeWidth:Ue(e[h]??0),strokeLinecap:Z,opacity:F}),[O,xe.colorScale,Ue,h,F,Z]),Ge=ue(()=>{const e=a(Ze,{stroke:me,strokeWidth:de,opacity:fe});if(!xe.effectiveSelectionHook)return e;const t={...xe.resolvedSelection?.unselectedStyle||{},fillOpacity:0};return E(e,xe.effectiveSelectionHook,{...xe.resolvedSelection||{},unselectedStyle:t})},[Ze,xe.effectiveSelectionHook,xe.resolvedSelection,me,de,fe]),$e=ue(()=>a(()=>({fill:"#333",r:5,fillOpacity:.8}),{stroke:me,strokeWidth:de,opacity:fe}),[me,de,fe]),Je=ue(()=>e=>{if(e?.geometry||e?.properties||e?.data?.geometry){const t=e?.properties?.name||e?.properties?.NAME||e?.name||e?.NAME||e?.data?.properties?.name||e?.data?.properties?.NAME;if(t)return ye("div",{style:{background:"rgba(0,0,0,0.85)",color:"white",padding:"6px 10px",borderRadius:4,fontSize:12},children:ye("div",{style:{fontWeight:600},children:t})})}if(null!=e?.source&&null!=e?.target){const t=e[h];return be("div",{style:{background:"rgba(0,0,0,0.85)",color:"white",padding:"6px 10px",borderRadius:4,fontSize:12},children:[be("div",{style:{fontWeight:600},children:[e.source," → ",e.target]}),null!=t&&ye("div",{style:{opacity:.7},children:"number"==typeof t?t.toLocaleString():t})]})}const t=e?.name||e?.label||e?.[l];return null!=t?ye("div",{style:{background:"rgba(0,0,0,0.85)",color:"white",padding:"6px 10px",borderRadius:4,fontSize:12},children:ye("div",{style:{fontWeight:600},children:t})}):null},[h,l]);if(xe.earlyReturn)return xe.earlyReturn;const _e={projection:p,...null!=i&&{lines:Oe},points:Ae,xAccessor:Fe,yAccessor:De,lineDataAccessor:"coordinates",...null!=we&&{lineIdAccessor:we},lineType:M,flowStyle:H,lineStyle:Ge,pointStyle:$e,...Ce&&{areas:Ce,areaStyle:B},...null!=f&&{graticule:f},...null!=g&&{fitPadding:g},...Se&&{zoomable:!0},...S&&{zoomExtent:S},...C&&{onZoom:C},...null!=A&&{dragRotate:A},...$&&{showParticles:$},...J&&{particleStyle:J},...x&&{tileURL:x},...j&&{tileAttribution:j},...P&&{tileCacheSize:P},size:[o.width,o.height],margin:xe.margin,enableHover:!0,tooltipContent:!1===_?()=>null:I(_)||Je,...xe.legendBehaviorProps,...d({linkedHover:Q,selection:Y,onObservation:V,onClick:ee,mobileInteraction:xe.mobileInteraction,customHoverBehavior:Ee,customClickBehavior:We,linkedHoverInClickPredicate:!1}),...K&&K.length>0&&{annotations:K},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},...o.title&&{title:o.title},...o.description&&{description:o.description},...o.summary&&{summary:o.summary},...void 0!==o.accessibleTable&&{accessibleTable:o.accessibleTable},...X&&{className:X},...null!=e.animate&&{animate:e.animate},...ae};return ye(U,{componentName:"FlowMap",width:o.width,height:o.height,children:ye(r,{ref:He,..._e})})});we.displayName="FlowMap";import{useMemo as Se,useRef as Ce,useState as Ae,useEffect as xe,useCallback as je,forwardRef as Re}from"react";import{jsx as Ie,jsxs as Pe}from"react/jsx-runtime";var Me=Re(function(e,t){const o=L(e.mode,{width:e.width,height:e.height,showLegend:e.showLegend,title:e.title,description:e.description,accessibleTable:e.accessibleTable,summary:e.summary,mobileInteraction:e.mobileInteraction,mobileSemantics:e.mobileSemantics,responsiveRules:e.responsiveRules}),{points:i,lines:n,xAccessor:l="lon",yAccessor:m="lat",nodeIdAccessor:p="id",center:f,costAccessor:g,strength:y=1,lineMode:v="straight",projection:S="mercator",graticule:C,fitPadding:A,zoomable:x,zoomExtent:j,onZoom:R,dragRotate:P,tileURL:M,tileAttribution:H,tileCacheSize:N,transition:z,colorBy:T,styleRules:B,colorScheme:W,pointRadius:O=5,tooltip:F,showRings:D=!0,ringStyle:Z,showNorth:G=!0,costLabel:J,annotations:_,margin:K,className:q,selection:X,linkedHover:Y,onObservation:Q,onClick:V,chartId:ee,loading:te,loadingContent:oe,emptyContent:ie,legendPosition:ne,frameProps:re={},stroke:ae,strokeWidth:le,opacity:se}=e,ce=x??!!M,me=Se(()=>k(i),[i]),de=s({data:me,rawData:i,colorBy:T,colorScheme:W,legendInteraction:void 0,legendPosition:ne,selection:X,linkedHover:Y,fallbackFields:T?["string"==typeof T?T:""]:[],unwrapData:!1,onObservation:Q,onClick:V,mobileInteraction:o.mobileInteraction,mobileSemantics:o.mobileSemantics,chartType:"DistanceCartogram",chartId:ee,showLegend:o.showLegend,userMargin:K,marginDefaults:{top:10,bottom:10,left:10,right:10},loading:te,loadingContent:oe,emptyContent:ie,width:o.width,height:o.height}),ue=Se(()=>{const e=u(e=>({fill:T?w(e,T,de.colorScale):b,fillOpacity:.8,stroke:"#fff",strokeWidth:1,r:O}),B,h(T)),t=a(e,{stroke:ae,strokeWidth:le,opacity:se});return de.effectiveSelectionHook?E(t,de.effectiveSelectionHook,de.resolvedSelection):t},[T,de.colorScale,de.effectiveSelectionHook,de.resolvedSelection,O,ae,le,se,B]),he=Se(()=>({center:f,centerAccessor:p,costAccessor:g,strength:y,lineMode:v}),[f,p,g,y,v]),pe=Se(()=>{if(!n)return;const e="function"==typeof l?l:e=>e[l],t="function"==typeof m?m:e=>e[m],o=new Map;for(const e of me)o.set(e[p]+"",e);return n.map(i=>{if(i.coordinates)return i;const n=o.get(i.source+""),r=o.get(i.target+"");return n&&r?{...i,coordinates:[{[l]:e(n),[m]:t(n)},{[l]:e(r),[m]:t(r)}]}:null}).filter(Boolean)},[n,me,l,m,p]),fe=Se(()=>e=>{const t=("function"==typeof g?g:e=>e[g])(e);return Pe("div",{style:{background:"rgba(0,0,0,0.85)",color:"white",padding:"6px 10px",borderRadius:4,fontSize:12},children:[Ie("div",{style:{fontWeight:600},children:e[p]||e.name||e.id||"Point"}),null!=t&&Pe("div",{style:{opacity:.7},children:["Cost: ","number"==typeof t?t.toFixed(1):t]})]})},[g,p]),ge=Ce(null);c(t,{variant:"geo-points",frameRef:ge});const[ye,be]=Ae(null),ve=je(()=>{const e=ge.current?.getCartogramLayout?.();e&&be(t=>t&&t.cx===e.cx&&t.cy===e.cy&&t.maxCost===e.maxCost&&t.availableRadius===e.availableRadius?t:e)},[]);xe(()=>{const e=requestAnimationFrame(ve);return()=>cancelAnimationFrame(e)},[ve,y,f,o.width,o.height,me]);const ke=Se(()=>{if(!D||!ye)return[];const{maxCost:e}=ye;if(0>=e)return[];if(Array.isArray(D))return D.filter(t=>t>0&&e>=t);const t="number"==typeof D?D:Math.min(5,Math.max(2,Math.ceil(e/5))),o=e/t,i=[];for(let e=1;t>=e;e++)i.push(Math.round(o*e*10)/10);return i},[D,ye]),we=Se(()=>{if(!ye)return re.foregroundGraphics||null;const{cx:e,cy:t,maxCost:o,availableRadius:i}=ye,n={stroke:"#999",strokeWidth:.8,strokeDasharray:"4,3",labelColor:"#777",labelSize:10,...Z},r=de.margin.left??10,a=de.margin.top??10;return Pe("g",{children:[ke.map(l=>{const s=l/o*i;return Pe("g",{children:[Ie("circle",{cx:e+r,cy:t+a,r:s,fill:"none",stroke:n.stroke,strokeWidth:n.strokeWidth,strokeDasharray:n.strokeDasharray,opacity:.5}),Pe("text",{x:e+r+s+3,y:t+a-2,fontSize:n.labelSize,fill:n.labelColor,fontFamily:"system-ui, sans-serif",children:[l,J?" "+J:""]})]},l)}),G&&Pe("g",{transform:`translate(${r+24}, ${a+24})`,children:[Ie("circle",{r:16,fill:"white",fillOpacity:.85,stroke:"#bbb",strokeWidth:.8}),Ie("path",{d:"M0,-11 L3,-3 L1,-4 L1,7 L-1,7 L-1,-4 L-3,-3 Z",fill:"#555",stroke:"none"}),Ie("text",{y:-12,textAnchor:"middle",fontSize:7,fontWeight:700,fill:"#555",fontFamily:"system-ui, sans-serif",children:"N"}),Ie("line",{x1:11,y1:0,x2:13,y2:0,stroke:"#bbb",strokeWidth:.8}),Ie("line",{x1:-11,y1:0,x2:-13,y2:0,stroke:"#bbb",strokeWidth:.8}),Ie("line",{x1:0,y1:11,x2:0,y2:13,stroke:"#bbb",strokeWidth:.8})]}),re.foregroundGraphics]})},[ye,ke,G,J,Z,de.margin,re.foregroundGraphics]);if(de.earlyReturn)return de.earlyReturn;$("DistanceCartogram",me,"xAccessor",l),$("DistanceCartogram",me,"yAccessor",m);const Re={projection:S,...null!=i&&{points:me},...pe&&{lines:pe,lineDataAccessor:"coordinates"},xAccessor:l,yAccessor:m,pointIdAccessor:p,pointStyle:ue,projectionTransform:he,...z&&{transition:{duration:z}},...null!=C&&{graticule:C},...null!=A&&{fitPadding:A},...ce&&{zoomable:!0},...j&&{zoomExtent:j},...R&&{onZoom:R},...null!=P&&{dragRotate:P},...M&&{tileURL:M},...H&&{tileAttribution:H},...N&&{tileCacheSize:N},size:[o.width,o.height],margin:de.margin,enableHover:!0,tooltipContent:!1===F?()=>null:I(F)||fe,...de.legendBehaviorProps,...d({linkedHover:Y,selection:X,onObservation:Q,onClick:V,mobileInteraction:de.mobileInteraction,customHoverBehavior:de.customHoverBehavior,customClickBehavior:de.customClickBehavior,linkedHoverInClickPredicate:!1}),..._&&_.length>0&&{annotations:_},...void 0!==e.autoPlaceAnnotations&&{autoPlaceAnnotations:e.autoPlaceAnnotations},...o.title&&{title:o.title},...o.description&&{description:o.description},...o.summary&&{summary:o.summary},...void 0!==o.accessibleTable&&{accessibleTable:o.accessibleTable},...q&&{className:q},...null!=e.animate&&{animate:e.animate},...re,foregroundGraphics:we};return Ie(U,{componentName:"DistanceCartogram",width:o.width,height:o.height,children:Ie(r,{ref:ge,...Re})})});function He(e,t,o){const{featureKey:i,dataKey:n}=o,r=new Map;for(const e of t)r.set(e[n]+"",e);return e.map(e=>{const t=(e=>{const t=i.split(".");let o=e;for(const e of t)o=null!==o&&"object"==typeof o?o[e]:void 0;return(o??"")+""})(e),o=r.get(t);return o?{...e,properties:{...e.properties,...o}}:e})}Me.displayName="DistanceCartogram";export{ne as ChoroplethMap,e as DEFAULT_HIT_RADIUS,Me as DistanceCartogram,we as FlowMap,n as GeoCustomChart,de as ProportionalSymbolMap,r as StreamGeoFrame,u as composeStyleRules,t as geoAreaHitTarget,o as geoHitTarget,O as glyphExtent,F as glyphPlacement,A as hatchFillId,x as hatchPatternDef,i as hitTargetPoint,j as isHatchFill,h as makeNodeRuleContext,p as makeRuleValueResolver,f as matchesThreshold,He as mergeData,ee as resolveReferenceGeography,P as resolveResponsiveRules,g as resolveStyleRules,M as resolveSvgFill,H as responsiveRuleMatches,y as ruleMatches};