prographs 0.12.0 → 0.13.0

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 (269) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/README.md +6 -4
  3. package/dist/AutoGraph-PDPEAIXL.cjs +145 -0
  4. package/dist/GraphType.js +19 -0
  5. package/dist/autograph/chartIndex.js +521 -0
  6. package/dist/autograph/chartModules.js +2 -1
  7. package/dist/autograph/index.cjs +98 -93
  8. package/dist/catalog-DI4XZ46L.cjs +142 -0
  9. package/dist/catalog.js +2 -1
  10. package/dist/charts/biologycharts/BiologySamples.js +59 -0
  11. package/dist/charts/biologycharts/PunnettSquare.js +342 -0
  12. package/dist/charts/biologycharts/biologyEnums.js +22 -1
  13. package/dist/charts/biologycharts/index.js +5 -3
  14. package/dist/charts/doecharts/DoeSamples.js +78 -0
  15. package/dist/charts/doecharts/SipocDiagram.js +453 -0
  16. package/dist/charts/doecharts/index.js +4 -2
  17. package/dist/charts/fieldcharts/SpeciesAccumulationCurve.js +350 -0
  18. package/dist/charts/fieldcharts/fieldEnums.js +8 -1
  19. package/dist/charts/fieldcharts/index.js +5 -3
  20. package/dist/charts/signals/AntennaPatternChart.js +492 -0
  21. package/dist/charts/signals/SignalSamples.js +17 -0
  22. package/dist/charts/signals/index.js +5 -3
  23. package/dist/charts/softwarediagrams/ComponentDiagram.js +504 -0
  24. package/dist/charts/softwarediagrams/DeploymentDiagram.js +419 -0
  25. package/dist/charts/softwarediagrams/SoftwareSamples.js +283 -1
  26. package/dist/charts/softwarediagrams/index.js +7 -3
  27. package/dist/charts/softwarediagrams/softwareEnums.js +45 -1
  28. package/dist/charts/sportscharts/PowerDurationCurve.js +301 -0
  29. package/dist/charts/sportscharts/SportsSamples.js +102 -0
  30. package/dist/charts/sportscharts/TrainingLoadChart.js +325 -0
  31. package/dist/charts/sportscharts/index.js +6 -2
  32. package/dist/charts/strategycharts/BassDiffusionChart.js +362 -0
  33. package/dist/charts/strategycharts/BassModel.js +96 -0
  34. package/dist/charts/strategycharts/BurnRunwayChart.js +284 -0
  35. package/dist/charts/strategycharts/CapTableChart.js +366 -0
  36. package/dist/charts/strategycharts/KanbanBoard.js +324 -0
  37. package/dist/charts/strategycharts/OkrTree.js +339 -0
  38. package/dist/charts/strategycharts/StrategyPane.js +27 -0
  39. package/dist/charts/strategycharts/StrategySamples.js +251 -0
  40. package/dist/charts/strategycharts/index.js +15 -3
  41. package/dist/charts/threefields/BsfcMap3DChart.js +231 -0
  42. package/dist/charts/threefields/CompressorMap3DChart.js +217 -0
  43. package/dist/charts/threefields/FieldGrid.js +50 -0
  44. package/dist/charts/threefields/LossLandscape3DChart.js +201 -0
  45. package/dist/charts/threefields/MapSheet.js +77 -0
  46. package/dist/charts/threefields/TerrainRoute3DChart.js +201 -0
  47. package/dist/charts/threefields/TerrainRouteMath.js +40 -0
  48. package/dist/charts/threefields/ThreeFieldBase.js +117 -0
  49. package/dist/charts/threefields/ThreeFieldsSamples.js +80 -0
  50. package/dist/charts/threefields/WaferMap3DChart.js +218 -0
  51. package/dist/charts/threefields/index.js +19 -0
  52. package/dist/charts/threesurfaces/index.js +2 -2
  53. package/dist/charts/tradingcharts/KeltnerChannelChart.js +171 -0
  54. package/dist/charts/tradingcharts/TradingMath.js +20 -0
  55. package/dist/charts/tradingcharts/index.js +4 -2
  56. package/dist/{chunk-ZL6XDXMK.cjs → chunk-26PSLEP4.cjs} +8 -8
  57. package/dist/{chunk-W3US6EFP.cjs → chunk-2BO5DZUP.cjs} +12 -12
  58. package/dist/{chunk-5DP7OUSE.cjs → chunk-2GG5YYSC.cjs} +6 -6
  59. package/dist/{chunk-7FG4JSVO.cjs → chunk-2GL2VNJU.cjs} +253 -33
  60. package/dist/{chunk-LCWMRCLF.cjs → chunk-2PYOI7OY.cjs} +21 -21
  61. package/dist/{chunk-JFWJAEBD.cjs → chunk-3U4MCSKI.cjs} +4 -4
  62. package/dist/{chunk-CUPLHZRR.cjs → chunk-3ZMM3FSK.cjs} +4 -4
  63. package/dist/{chunk-L2AV62DP.cjs → chunk-4767WQJ7.cjs} +6 -6
  64. package/dist/{chunk-DA2EYIIP.cjs → chunk-4E7FSSBF.cjs} +1210 -168
  65. package/dist/{chunk-VS5LQEZB.cjs → chunk-526STI2S.cjs} +5 -5
  66. package/dist/{chunk-RXIMEK6C.cjs → chunk-55767YPI.cjs} +20 -20
  67. package/dist/{chunk-JXLSKIUV.cjs → chunk-5FBQOMMT.cjs} +26 -26
  68. package/dist/{chunk-27PZV5BR.cjs → chunk-5N4Z7MTS.cjs} +4 -4
  69. package/dist/{chunk-KEWCUIQA.cjs → chunk-5WEV6YWA.cjs} +22 -22
  70. package/dist/chunk-5XOVVC5X.cjs +3281 -0
  71. package/dist/{chunk-HK5J7Q2W.cjs → chunk-6HLXVWXU.cjs} +9 -9
  72. package/dist/{chunk-7JG47RW4.cjs → chunk-6LQT4WJ5.cjs} +25 -25
  73. package/dist/{chunk-OCVTI6X4.cjs → chunk-6YTWOUFD.cjs} +329 -36
  74. package/dist/{chunk-W7IQCAVN.cjs → chunk-7F6W6HKL.cjs} +11 -11
  75. package/dist/{chunk-F2DCJXDM.cjs → chunk-7L6KYU5A.cjs} +21 -21
  76. package/dist/{chunk-GTGR6LPR.cjs → chunk-A4GIN4FE.cjs} +17 -17
  77. package/dist/{chunk-B2CETSR6.cjs → chunk-A4US7SA7.cjs} +5 -5
  78. package/dist/{chunk-3DIF2YYW.cjs → chunk-AOXPBLPW.cjs} +10 -10
  79. package/dist/{chunk-7TTR4UF5.cjs → chunk-ATI45Z4M.cjs} +2 -2
  80. package/dist/{chunk-5BFCIX2V.cjs → chunk-CPPMO4IQ.cjs} +434 -148
  81. package/dist/{chunk-AYZZQ6AC.cjs → chunk-CZ5KGF6Q.cjs} +9 -9
  82. package/dist/{chunk-7THJ3ZBK.cjs → chunk-D4I35MCE.cjs} +2 -2
  83. package/dist/{chunk-MCPPFRLN.cjs → chunk-DCGAAN3Z.cjs} +2 -2
  84. package/dist/{chunk-VABL6CVX.cjs → chunk-DEY36N37.cjs} +21 -21
  85. package/dist/{chunk-RNCKGJCC.cjs → chunk-DXHXD3DK.cjs} +3 -3
  86. package/dist/{chunk-A56ZGMVZ.cjs → chunk-E7B45DBZ.cjs} +11 -11
  87. package/dist/{chunk-DOR6L4MT.cjs → chunk-EJC6EAC5.cjs} +18 -18
  88. package/dist/{chunk-UPGNM7MA.cjs → chunk-EULJOOMA.cjs} +11 -11
  89. package/dist/{chunk-G4AZL4GO.cjs → chunk-EYM6LEIF.cjs} +474 -70
  90. package/dist/{chunk-NJ4X6XGV.cjs → chunk-EZTYX2GH.cjs} +5 -5
  91. package/dist/chunk-FDD4UP73.cjs +521 -0
  92. package/dist/{chunk-WJ3VH2Q4.cjs → chunk-GEAIGM3J.cjs} +110 -615
  93. package/dist/{chunk-P3SBHF43.cjs → chunk-GRUYVXTS.cjs} +2 -2
  94. package/dist/{chunk-NX4Z5LMS.cjs → chunk-H3SZXND5.cjs} +5 -5
  95. package/dist/{chunk-EE4S4TOE.cjs → chunk-HS45TOFJ.cjs} +21 -21
  96. package/dist/chunk-INGOG6OV.cjs +899 -0
  97. package/dist/{chunk-UDKA6DGT.cjs → chunk-J3CDXZHF.cjs} +4 -4
  98. package/dist/{chunk-YO6G7TKI.cjs → chunk-JAU5ADEU.cjs} +11 -11
  99. package/dist/{chunk-22LBK4GA.cjs → chunk-JQEBSHX3.cjs} +4 -4
  100. package/dist/{chunk-RXX3U7VQ.cjs → chunk-KLXGLMFU.cjs} +10 -10
  101. package/dist/chunk-KVOX36J3.cjs +327 -0
  102. package/dist/chunk-L6BGNHFL.cjs +139 -0
  103. package/dist/{chunk-GMER35L3.cjs → chunk-L7TB7PU5.cjs} +20 -20
  104. package/dist/{chunk-AFXYNBL2.cjs → chunk-LBTRYEM2.cjs} +4 -4
  105. package/dist/{chunk-WYYCKIOD.cjs → chunk-LLULNJSP.cjs} +11 -11
  106. package/dist/{chunk-J27XOSLP.cjs → chunk-LSO46AFV.cjs} +8 -8
  107. package/dist/{chunk-5XJO45ES.cjs → chunk-LZ2KJ7ZX.cjs} +11 -11
  108. package/dist/chunk-M4IQ5LIZ.cjs +422 -0
  109. package/dist/{chunk-Y2KIUKJF.cjs → chunk-MPDHDKYZ.cjs} +11 -11
  110. package/dist/{chunk-4EMPKRZU.cjs → chunk-MRQ42ZJE.cjs} +3 -3
  111. package/dist/{chunk-EU5D2MF4.cjs → chunk-MYV4KZWP.cjs} +9 -9
  112. package/dist/{chunk-XD7KN4UN.cjs → chunk-MZXVLC24.cjs} +6 -6
  113. package/dist/{chunk-PPSONARU.cjs → chunk-NLBVDFIR.cjs} +41 -2
  114. package/dist/{chunk-L3PEGMGM.cjs → chunk-NY3TBZY4.cjs} +33 -33
  115. package/dist/{chunk-6YNYXXB6.cjs → chunk-OGVVSFAR.cjs} +3 -3
  116. package/dist/{chunk-MLV7QLB6.cjs → chunk-OMTQIQMN.cjs} +6 -6
  117. package/dist/{chunk-BEEOSNK7.cjs → chunk-PEJJ6TXJ.cjs} +15 -144
  118. package/dist/{chunk-SOKOWUF5.cjs → chunk-PPGWHIU7.cjs} +2 -2
  119. package/dist/{chunk-IELWOM2J.cjs → chunk-PPO6SDAN.cjs} +6 -6
  120. package/dist/{chunk-6JTZZCSL.cjs → chunk-PUMKX5F2.cjs} +3 -3
  121. package/dist/{chunk-RFOXFY2U.cjs → chunk-PXBYWCNB.cjs} +190 -799
  122. package/dist/{chunk-3BYXOISI.cjs → chunk-Q3HB3IX6.cjs} +4 -4
  123. package/dist/{chunk-RXCOVONX.cjs → chunk-RBMUOIXE.cjs} +289 -34
  124. package/dist/{chunk-MSBNHCSE.cjs → chunk-RJHGCUUD.cjs} +6 -6
  125. package/dist/{chunk-I6VG7F6Z.cjs → chunk-RSONDMYW.cjs} +708 -141
  126. package/dist/{chunk-GZDNPHMT.cjs → chunk-SHMPFCUE.cjs} +19 -19
  127. package/dist/{chunk-ZIBVCOW6.cjs → chunk-SN4FCXFC.cjs} +19 -19
  128. package/dist/{chunk-7KM52NMN.cjs → chunk-SN5T7WYO.cjs} +2 -2
  129. package/dist/{chunk-7MSZR65Z.cjs → chunk-SQJZGVDR.cjs} +7 -7
  130. package/dist/chunk-SYABFMD7.cjs +633 -0
  131. package/dist/{chunk-2RRFEYFH.cjs → chunk-TICB3MAC.cjs} +16 -16
  132. package/dist/{chunk-AOOKHUV5.cjs → chunk-U7Z7XYR2.cjs} +5 -5
  133. package/dist/{chunk-JEWQAXVG.cjs → chunk-UA2THQFV.cjs} +6 -6
  134. package/dist/{chunk-LHZPAHU3.cjs → chunk-VIK4L2YF.cjs} +112 -521
  135. package/dist/{chunk-4YWMAQ4J.cjs → chunk-VM2Y6BDY.cjs} +4 -4
  136. package/dist/{chunk-IRRKE2ZE.cjs → chunk-VMS3KWYI.cjs} +21 -21
  137. package/dist/{chunk-4SLARW6F.cjs → chunk-VU5NUD46.cjs} +17 -17
  138. package/dist/{chunk-XHY6TVYG.cjs → chunk-VV5CVOF7.cjs} +13 -13
  139. package/dist/{chunk-CCIBPGPZ.cjs → chunk-VYSAWPSS.cjs} +57 -57
  140. package/dist/{chunk-TTNEMQ2A.cjs → chunk-W7YRWEWQ.cjs} +22 -22
  141. package/dist/{chunk-C7MUOGEW.cjs → chunk-X7R5SY62.cjs} +6 -6
  142. package/dist/{chunk-ILR5KBMB.cjs → chunk-XOK3KTSS.cjs} +6 -6
  143. package/dist/{chunk-2CZM2I3T.cjs → chunk-XUIX45VU.cjs} +19 -19
  144. package/dist/{chunk-TGRMPS3A.cjs → chunk-XWH46PVJ.cjs} +165 -43
  145. package/dist/{chunk-WQYXXECR.cjs → chunk-Y5XVMK3K.cjs} +6 -6
  146. package/dist/{chunk-AK4TX2WG.cjs → chunk-YCNKEDTG.cjs} +13 -13
  147. package/dist/{chunk-PJJB24DU.cjs → chunk-YEF7SE3X.cjs} +20 -20
  148. package/dist/{chunk-RVLV4XW6.cjs → chunk-YMTVPMU3.cjs} +22 -22
  149. package/dist/data/index.cjs +2 -2
  150. package/dist/entries/autograph-lazy.cjs +2 -2
  151. package/dist/entries/charts/acoustictransport.cjs +3 -3
  152. package/dist/entries/charts/analysischarts.cjs +3 -3
  153. package/dist/entries/charts/astrocharts.cjs +3 -3
  154. package/dist/entries/charts/bars.cjs +3 -3
  155. package/dist/entries/charts/bayesiancharts.cjs +3 -3
  156. package/dist/entries/charts/biocharts.cjs +3 -3
  157. package/dist/entries/charts/biologycharts.cjs +11 -3
  158. package/dist/entries/charts/biologycharts.d.ts +1 -1
  159. package/dist/entries/charts/biologycharts.js +3 -2
  160. package/dist/entries/charts/business.cjs +3 -3
  161. package/dist/entries/charts/carecharts.cjs +3 -3
  162. package/dist/entries/charts/chemistrycharts.cjs +3 -3
  163. package/dist/entries/charts/civicscharts.cjs +3 -3
  164. package/dist/entries/charts/clinicalcharts.cjs +3 -3
  165. package/dist/entries/charts/comparison.cjs +3 -3
  166. package/dist/entries/charts/demography.cjs +3 -3
  167. package/dist/entries/charts/density.cjs +3 -3
  168. package/dist/entries/charts/diagrams.cjs +3 -3
  169. package/dist/entries/charts/distribution.cjs +3 -3
  170. package/dist/entries/charts/doecharts.cjs +13 -3
  171. package/dist/entries/charts/doecharts.d.ts +1 -1
  172. package/dist/entries/charts/doecharts.js +2 -1
  173. package/dist/entries/charts/earthscience.cjs +3 -3
  174. package/dist/entries/charts/economicscharts.cjs +3 -3
  175. package/dist/entries/charts/energycharts.cjs +3 -3
  176. package/dist/entries/charts/engineering.cjs +3 -3
  177. package/dist/entries/charts/fieldcharts.cjs +7 -3
  178. package/dist/entries/charts/fieldcharts.d.ts +1 -1
  179. package/dist/entries/charts/fieldcharts.js +3 -2
  180. package/dist/entries/charts/financial.cjs +3 -3
  181. package/dist/entries/charts/flow.cjs +3 -3
  182. package/dist/entries/charts/frameworks.cjs +3 -3
  183. package/dist/entries/charts/genomics.cjs +3 -3
  184. package/dist/entries/charts/geoflows.cjs +3 -3
  185. package/dist/entries/charts/geomaps.cjs +3 -3
  186. package/dist/entries/charts/geosciencecharts.cjs +3 -3
  187. package/dist/entries/charts/hierarchy.cjs +3 -3
  188. package/dist/entries/charts/indicators.cjs +3 -3
  189. package/dist/entries/charts/inferencecharts.cjs +3 -3
  190. package/dist/entries/charts/layoutcharts.cjs +3 -3
  191. package/dist/entries/charts/lifescience.cjs +4 -4
  192. package/dist/entries/charts/linesareas.cjs +3 -3
  193. package/dist/entries/charts/logisticscharts.cjs +3 -3
  194. package/dist/entries/charts/machinecharts.cjs +7 -3
  195. package/dist/entries/charts/machinecharts.d.ts +1 -1
  196. package/dist/entries/charts/machinecharts.js +2 -1
  197. package/dist/entries/charts/massive.cjs +3 -3
  198. package/dist/entries/charts/mathematical.cjs +3 -3
  199. package/dist/entries/charts/matrix.cjs +3 -3
  200. package/dist/entries/charts/medicalcharts.cjs +4 -4
  201. package/dist/entries/charts/mlcharts.cjs +4 -4
  202. package/dist/entries/charts/modelcharts.cjs +6 -5
  203. package/dist/entries/charts/multivariate.cjs +3 -3
  204. package/dist/entries/charts/musiccharts.cjs +3 -3
  205. package/dist/entries/charts/network.cjs +3 -3
  206. package/dist/entries/charts/physicscharts.cjs +3 -3
  207. package/dist/entries/charts/pictorial.cjs +4 -4
  208. package/dist/entries/charts/portfoliocharts.cjs +3 -3
  209. package/dist/entries/charts/productcharts.cjs +3 -3
  210. package/dist/entries/charts/proportion.cjs +3 -3
  211. package/dist/entries/charts/qualitycharts.cjs +3 -3
  212. package/dist/entries/charts/radial.cjs +3 -3
  213. package/dist/entries/charts/reliabilitycharts.cjs +5 -3
  214. package/dist/entries/charts/scatter.cjs +3 -3
  215. package/dist/entries/charts/scientific.cjs +3 -3
  216. package/dist/entries/charts/seriescharts.cjs +3 -3
  217. package/dist/entries/charts/signals.cjs +7 -3
  218. package/dist/entries/charts/signals.d.ts +1 -1
  219. package/dist/entries/charts/signals.js +2 -1
  220. package/dist/entries/charts/softwarediagrams.cjs +21 -3
  221. package/dist/entries/charts/softwarediagrams.d.ts +1 -1
  222. package/dist/entries/charts/softwarediagrams.js +4 -2
  223. package/dist/entries/charts/sportscharts.cjs +13 -3
  224. package/dist/entries/charts/sportscharts.d.ts +1 -1
  225. package/dist/entries/charts/sportscharts.js +3 -1
  226. package/dist/entries/charts/statistics.cjs +6 -6
  227. package/dist/entries/charts/strategycharts.cjs +30 -3
  228. package/dist/entries/charts/strategycharts.d.ts +1 -1
  229. package/dist/entries/charts/strategycharts.js +6 -1
  230. package/dist/entries/charts/structure.cjs +3 -3
  231. package/dist/entries/charts/surveycharts.cjs +3 -3
  232. package/dist/entries/charts/systemscharts.cjs +3 -3
  233. package/dist/entries/charts/textcharts.cjs +5 -5
  234. package/dist/entries/charts/thematicmaps.cjs +4 -4
  235. package/dist/entries/charts/threebars.cjs +3 -3
  236. package/dist/entries/charts/threefields.cjs +53 -0
  237. package/dist/entries/charts/threefields.d.ts +1 -0
  238. package/dist/entries/charts/threefields.js +6 -0
  239. package/dist/entries/charts/threeglobe.cjs +3 -3
  240. package/dist/entries/charts/threenetwork.cjs +3 -3
  241. package/dist/entries/charts/threestrata.cjs +3 -3
  242. package/dist/entries/charts/threesurfaces.cjs +7 -3
  243. package/dist/entries/charts/threesurfaces.d.ts +1 -1
  244. package/dist/entries/charts/threesurfaces.js +2 -1
  245. package/dist/entries/charts/threevolume.cjs +4 -4
  246. package/dist/entries/charts/timeline.cjs +3 -3
  247. package/dist/entries/charts/tracecharts.cjs +3 -3
  248. package/dist/entries/charts/trackscharts.cjs +3 -3
  249. package/dist/entries/charts/tradingcharts.cjs +6 -4
  250. package/dist/entries/charts/tradingcharts.d.ts +1 -1
  251. package/dist/entries/charts/tradingcharts.js +2 -1
  252. package/dist/entries/three.cjs +60 -20
  253. package/dist/entries/three.d.ts +1 -1
  254. package/dist/entries/three.js +7 -1
  255. package/dist/index.cjs +258 -97
  256. package/dist/index.d.cts +1953 -10
  257. package/dist/index.d.ts +1953 -10
  258. package/dist/index.js +26 -5
  259. package/dist/page/index.cjs +2 -2
  260. package/dist/react/components.js +58 -1
  261. package/dist/react/index.cjs +135 -92
  262. package/dist/react/index.d.ts +1 -1
  263. package/dist/react/index.js +2 -2
  264. package/package.json +1 -1
  265. package/dist/AutoGraph-XLBJQDRB.cjs +0 -140
  266. package/dist/catalog-O7XGDD2H.cjs +0 -137
  267. package/dist/chunk-77K2HTRC.cjs +0 -3220
  268. package/dist/chunk-XEK47TVD.cjs +0 -323
  269. /package/dist/{chunk-UMEKIIHJ.cjs → chunk-LNWTC72Y.cjs} +0 -0
@@ -1,20 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7; var _class8; var _class9; var _class10; var _class11; var _class12; var _class13; var _class14; var _class15; var _class16; var _class17; var _class18; var _class19; var _class20; var _class21; var _class22;
2
-
3
- var _chunkCM7X3KFUcjs = require('./chunk-CM7X3KFU.cjs');
4
-
5
-
6
- var _chunk6KYVL5HYcjs = require('./chunk-6KYVL5HY.cjs');
7
-
8
-
9
- var _chunkPY4R3IFFcjs = require('./chunk-PY4R3IFF.cjs');
10
-
11
-
12
- var _chunkUMEKIIHJcjs = require('./chunk-UMEKIIHJ.cjs');
13
-
14
- // src/charts/threesurfaces/SurfaceBase.ts
15
- var _d3 = require('d3');
16
-
17
-
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7; var _class8; var _class9; var _class10; var _class11; var _class12; var _class13; var _class14; var _class15; var _class16; var _class17; var _class18; var _class19; var _class20;
18
2
 
19
3
 
20
4
 
@@ -24,621 +8,30 @@ var _d3 = require('d3');
24
8
 
25
9
 
26
10
 
11
+ var _chunkSYABFMD7cjs = require('./chunk-SYABFMD7.cjs');
27
12
 
28
13
 
14
+ var _chunkCM7X3KFUcjs = require('./chunk-CM7X3KFU.cjs');
29
15
 
30
- var _three = require('./vendor/three.js');
31
-
32
- // src/charts/threesurfaces/ColorRamp.ts
33
16
 
34
- var ColorRamp = class {
35
- constructor(fn, lo = 0, hi = 1, size = 128) {
36
- this.lo = lo;
37
- this.hi = hi;
38
- this.table = Array.from({ length: size }, (_, k) => new (0, _three.Color)(fn(lo + (hi - lo) * k / (size - 1))));
39
- }
40
-
41
-
42
-
43
- at(t) {
44
- const position = Number.isFinite(t) ? (t - this.lo) / (this.hi - this.lo) : 0;
45
- return this.table[Math.round(Math.max(0, Math.min(1, position)) * (this.table.length - 1))];
46
- }
47
- };
48
-
49
- // src/charts/threesurfaces/SurfaceGeometry.ts
50
-
51
- var _BufferGeometryUtilsjs = require('three/addons/utils/BufferGeometryUtils.js');
52
- var SurfaceGeometry = class _SurfaceGeometry {
53
- /** `nx × ny` vertex lattice. A vertex with a non-finite coordinate is a hole and its triangles are skipped. */
54
- static grid(nx, ny, place, paint, wrap = {}) {
55
- const positions = new Float32Array(nx * ny * 3), colors = new Float32Array(nx * ny * 3), solid = new Uint8Array(nx * ny);
56
- for (let j = 0; j < ny; j++) for (let i = 0; i < nx; i++) {
57
- const point = place(i, j), k = i + j * nx;
58
- if (!point.every(Number.isFinite)) continue;
59
- solid[k] = 1;
60
- positions.set(point, k * 3);
61
- const color = paint(i, j);
62
- colors.set([color.r, color.g, color.b], k * 3);
63
- }
64
- const indices = [];
65
- const cellsX = wrap.x ? nx : nx - 1, cellsY = wrap.y ? ny : ny - 1;
66
- for (let j = 0; j < cellsY; j++) for (let i = 0; i < cellsX; i++) {
67
- const a = i + j * nx, b = (i + 1) % nx + j * nx, c = i + (j + 1) % ny * nx, d = (i + 1) % nx + (j + 1) % ny * nx;
68
- if (solid[a] && solid[b] && solid[d]) indices.push(a, d, b);
69
- if (solid[a] && solid[d] && solid[c]) indices.push(a, c, d);
70
- }
71
- const geometry = new (0, _three.BufferGeometry)();
72
- geometry.setAttribute("position", new (0, _three.Float32BufferAttribute)(positions, 3));
73
- geometry.setAttribute("color", new (0, _three.Float32BufferAttribute)(colors, 3));
74
- geometry.setIndex(indices);
75
- geometry.computeVertexNormals();
76
- return geometry;
77
- }
78
- /** Split shared vertices so each triangle shades flat. `userData.source` keeps the way back to the grid for picking. */
79
- static faceted(geometry) {
80
- const source = Uint32Array.from(_nullishCoalesce(_optionalChain([geometry, 'access', _3 => _3.getIndex, 'call', _4 => _4(), 'optionalAccess', _5 => _5.array]), () => ( [])));
81
- const flat = geometry.toNonIndexed();
82
- flat.computeVertexNormals();
83
- flat.userData.source = source;
84
- return flat;
85
- }
86
- /** Vertical wall hanging from a polyline to `base`, with colours for its top and bottom edges. */
87
- static curtain(top, base, upper, lower) {
88
- const floor = typeof base === "number" ? () => base : base;
89
- const finite = top.map((point) => point.every(Number.isFinite));
90
- return _SurfaceGeometry.grid(
91
- top.length,
92
- 2,
93
- (k, row) => finite[k] ? row ? top[k] : [top[k][0], floor(k), top[k][2]] : [NaN, NaN, NaN],
94
- (k, row) => row ? upper(k) : lower(k)
95
- );
96
- }
97
- /** A curtain with thickness along `(dx, dz)`: front, back and lid. */
98
- static slab(top, [dx, dz], base, upper, lower) {
99
- const shift = (sign) => top.map(([x, y, z]) => [x + dx * sign / 2, y, z + dz * sign / 2]);
100
- const front = shift(1), back = shift(-1);
101
- const lid = _SurfaceGeometry.grid(top.length, 2, (k, row) => (row ? back : front)[k], upper);
102
- const ends = [0, top.length - 1].map((k) => {
103
- const floor = typeof base === "number" ? base : base(k);
104
- const wall = (point) => [[point[0], floor, point[2]], point];
105
- return _SurfaceGeometry.grid(2, 2, (i, row) => wall((i ? back : front)[k])[row], (_, row) => row ? upper(k) : lower(k));
106
- });
107
- return _SurfaceGeometry.merge([_SurfaceGeometry.curtain(front, base, upper, lower), _SurfaceGeometry.curtain(back, base, upper, lower), lid, ...ends]);
108
- }
109
- /** Drop vertices no triangle uses. `userData.source` maps the survivors back to their original index. */
110
- static compact(geometry) {
111
- const index = geometry.getIndex();
112
- const source = [...new Set(index.array)], renumber = new Map(source.map((vertex, k) => [vertex, k]));
113
- const out = new (0, _three.BufferGeometry)();
114
- for (const name of Object.keys(geometry.attributes)) {
115
- const attribute = geometry.getAttribute(name), size = attribute.itemSize;
116
- const values = new Float32Array(source.length * size);
117
- source.forEach((vertex, k) => {
118
- for (let c = 0; c < size; c++) values[k * size + c] = attribute.array[vertex * size + c];
119
- });
120
- out.setAttribute(name, new (0, _three.Float32BufferAttribute)(values, size));
121
- }
122
- out.setIndex(Array.from(index.array, (vertex) => renumber.get(vertex)));
123
- out.userData.source = Uint32Array.from(source);
124
- return out;
125
- }
126
- /** Give a three.js primitive the uniform vertex colour that lets it merge with painted geometry. */
127
- static tinted(geometry, color) {
128
- const count = geometry.getAttribute("position").count;
129
- const colors = new Float32Array(count * 3);
130
- for (let k = 0; k < count; k++) colors.set([color.r, color.g, color.b], k * 3);
131
- geometry.setAttribute("color", new (0, _three.Float32BufferAttribute)(colors, 3));
132
- geometry.deleteAttribute("uv");
133
- return geometry;
134
- }
135
- static merge(parts) {
136
- const unified = parts.filter((part) => part.getAttribute("position").count).map((part) => part.index ? part : indexed(part));
137
- return _nullishCoalesce((unified.length ? _BufferGeometryUtilsjs.mergeGeometries.call(void 0, unified) : null), () => ( new (0, _three.BufferGeometry)()));
138
- }
139
- };
140
- function indexed(geometry) {
141
- geometry.setIndex(Array.from({ length: geometry.getAttribute("position").count }, (_, k) => k));
142
- return geometry;
143
- }
144
-
145
- // src/charts/threesurfaces/SurfaceSpace.ts
146
-
147
- var FLOOR = -0.7;
148
- var CEIL = 0.75;
149
- var SurfaceSpace = class _SurfaceSpace {
150
- constructor(field, kind = "linear" /* Linear */, range = [FLOOR, CEIL], domain = field.zDomain) {
151
- this.field = field;
152
- this.range = range;
153
- this.level = _SurfaceSpace.height(kind, domain, range);
154
- }
155
-
156
-
157
-
158
- /** Height scale. Log becomes symlog so zero and negative heights stay on the chart. */
159
- static height(kind, [lo, hi], range) {
160
- const scale = kind === "log" /* Log */ || kind === "symlog" /* Symlog */ ? _d3.scaleSymlog.call(void 0, ).constant(Math.max(hi - lo, 1e-9) / 8) : _chunkPY4R3IFFcjs.Scales.continuous(kind);
161
- return scale.domain([lo, hi]).range(range);
162
- }
163
- /** Position of a fractional index along a possibly uneven axis, 0..1. */
164
- fraction(axis, index) {
165
- const i = Math.max(0, Math.min(axis.length - 2, Math.floor(index)));
166
- const span = axis.at(-1) - axis[0] || 1;
167
- return (axis[i] + (axis[i + 1] - axis[i]) * (index - i) - axis[0]) / span;
168
- }
169
- /** World x and z of a fractional grid index. */
170
- ground(fi, fj) {
171
- return [this.fraction(this.field.x, fi) * 2 - 1, 1 - this.fraction(this.field.y, fj) * 2];
172
- }
173
- at(fi, fj, lift = 0) {
174
- const [x, z] = this.ground(fi, fj);
175
- return [x, this.level(this.field.sample(fi, fj)) + lift, z];
176
- }
177
- floor(fi, fj, lift = 0) {
178
- const [x, z] = this.ground(fi, fj);
179
- return [x, this.range[0] + lift, z];
180
- }
181
- };
182
- var PolarSurfaceSpace = class extends SurfaceSpace {
183
- constructor(field, kind, sweep, inner, swap = false) {
184
- super(field, kind);
185
- this.sweep = sweep;
186
- this.inner = inner;
187
- this.swap = swap;
188
- }
189
-
190
-
191
-
192
- polar(angle, radius) {
193
- const a = ((angle - 0.5) * this.sweep - 90) * (Math.PI / 180);
194
- return [Math.cos(a) * radius, Math.sin(a) * radius];
195
- }
196
- ground(fi, fj) {
197
- const { x, y } = this.field;
198
- const angular = this.swap ? y : x, radial = this.swap ? x : y;
199
- const turn = this.fraction(angular, this.swap ? fj : fi) * (this.sweep === 360 ? (angular.length - 1) / angular.length : 1);
200
- return this.polar(turn, this.inner + (1 - this.inner) * this.fraction(radial, this.swap ? fi : fj));
201
- }
202
- };
203
-
204
- // src/charts/threesurfaces/TubeBatch.ts
205
-
206
- var WHITE = new (0, _three.Color)(1, 1, 1);
207
- var WEIGHT = 1.6;
208
- var TubeBatch = (_class = class {
209
- constructor(radius = 65e-4, sides = 5) {;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);_class.prototype.__init4.call(this);
210
- this.radius = radius;
211
- this.sides = sides;
212
- }
213
-
214
-
215
- __init() {this.positions = []}
216
- __init2() {this.normals = []}
217
- __init3() {this.colors = []}
218
- __init4() {this.indices = []}
219
- /** Add a polyline. A non-finite point breaks it into separate runs. */
220
- add(path, paint = WHITE, radius = this.radius) {
221
- radius *= WEIGHT;
222
- let run = [], first = 0;
223
- const flush = (start) => {
224
- if (run.length > 1) this.tube(run, start, paint, radius);
225
- run = [];
226
- };
227
- path.forEach((point, k) => {
228
- if (!point.every(Number.isFinite)) return flush(first);
229
- const next = new (0, _three.Vector3)(...point);
230
- if (run.length && run.at(-1).distanceToSquared(next) < 1e-10) return;
231
- if (!run.length) first = k;
232
- run.push(next);
233
- });
234
- flush(first);
235
- return this;
236
- }
237
- tube(run, start, paint, radius) {
238
- const { sides } = this;
239
- const base = this.positions.length / 3;
240
- const tangent = new (0, _three.Vector3)(), side = new (0, _three.Vector3)(), up = new (0, _three.Vector3)(), ring = new (0, _three.Vector3)();
241
- tangent.subVectors(run[1], run[0]).normalize();
242
- side.set(Math.abs(tangent.y) > 0.9 ? 1 : 0, Math.abs(tangent.y) > 0.9 ? 0 : 1, 0);
243
- run.forEach((point, k) => {
244
- tangent.subVectors(run[Math.min(k + 1, run.length - 1)], run[Math.max(k - 1, 0)]).normalize();
245
- side.addScaledVector(tangent, -side.dot(tangent)).normalize();
246
- up.crossVectors(tangent, side);
247
- const color = typeof paint === "function" ? paint(start + k) : paint;
248
- for (let s = 0; s < sides; s++) {
249
- const angle = s / sides * Math.PI * 2;
250
- ring.copy(side).multiplyScalar(Math.cos(angle)).addScaledVector(up, Math.sin(angle));
251
- this.positions.push(point.x + ring.x * radius, point.y + ring.y * radius, point.z + ring.z * radius);
252
- this.normals.push(ring.x, ring.y, ring.z);
253
- this.colors.push(color.r, color.g, color.b);
254
- }
255
- });
256
- for (let k = 0; k < run.length - 1; k++) for (let s = 0; s < sides; s++) {
257
- const a = base + k * sides + s, b = base + k * sides + (s + 1) % sides, c = a + sides, d = b + sides;
258
- this.indices.push(a, b, c, b, d, c);
259
- }
260
- }
261
- get empty() {
262
- return !this.indices.length;
263
- }
264
- geometry() {
265
- const geometry = new (0, _three.BufferGeometry)();
266
- geometry.setAttribute("position", new (0, _three.Float32BufferAttribute)(this.positions, 3));
267
- geometry.setAttribute("normal", new (0, _three.Float32BufferAttribute)(this.normals, 3));
268
- geometry.setAttribute("color", new (0, _three.Float32BufferAttribute)(this.colors, 3));
269
- geometry.setIndex(this.indices);
270
- return geometry;
271
- }
272
- }, _class);
273
-
274
- // src/charts/threesurfaces/SurfaceBase.ts
275
- var SurfaceOverlay = /* @__PURE__ */ ((SurfaceOverlay2) => {
276
- SurfaceOverlay2["None"] = "bare";
277
- SurfaceOverlay2["Mesh"] = "mesh-lines";
278
- SurfaceOverlay2["Contours"] = "contour-lines";
279
- return SurfaceOverlay2;
280
- })(SurfaceOverlay || {});
281
- var SurfaceProjection = /* @__PURE__ */ ((SurfaceProjection2) => {
282
- SurfaceProjection2["None"] = "unprojected";
283
- SurfaceProjection2["FloorContours"] = "floor-contours";
284
- SurfaceProjection2["FloorHeatmap"] = "floor-heatmap";
285
- SurfaceProjection2["Walls"] = "wall-profiles";
286
- return SurfaceProjection2;
287
- })(SurfaceProjection || {});
288
- var LINE = 65e-4;
289
- var SurfaceBase = class extends _chunk6KYVL5HYcjs.Chart3D {
290
- defaults() {
291
- return { azimuth: 38, elevation: 26, distance: 5.2 };
292
- }
293
- ticks(domain, map, count = 4) {
294
- const reach = Math.abs(domain[1] - domain[0]);
295
- return _d3.scaleLinear.call(void 0, domain, [0, 1]).ticks(count).map((value) => [map(value), _chunkPY4R3IFFcjs.Scales.format(value, reach)]);
296
- }
297
- /** Back walls and floor with gridlines at the ticks. The walls swap sides as the camera orbits, so they never block the data. */
298
- box(ctx, { x, y, z }, { walls = true, bottom = FLOOR, outline = true } = {}) {
299
- const stage = new (0, _three.Group)();
300
- const grid = new (0, _three.LineBasicMaterial)({ color: ctx.theme.grid }), edge = new (0, _three.LineBasicMaterial)({ color: ctx.theme.axis });
301
- const lines = (points, material) => {
302
- const geometry = new (0, _three.BufferGeometry)();
303
- geometry.setAttribute("position", new (0, _three.Float32BufferAttribute)(points, 3));
304
- return new (0, _three.LineSegments)(geometry, material);
305
- };
306
- const top = walls ? Math.max(CEIL, bottom) : bottom;
307
- stage.add(lines([...x.flatMap(([at]) => [at, bottom, -1, at, bottom, 1]), ...y.flatMap(([at]) => [-1, bottom, at, 1, bottom, at])], grid));
308
- if (outline) stage.add(lines([-1, bottom, -1, 1, bottom, -1, 1, bottom, -1, 1, bottom, 1, 1, bottom, 1, -1, bottom, 1, -1, bottom, 1, -1, bottom, -1], edge));
309
- const catcher = new (0, _three.Mesh)(new (0, _three.PlaneGeometry)(2, 2), new (0, _three.ShadowMaterial)({ opacity: 0.16 }));
310
- catcher.rotation.x = -Math.PI / 2;
311
- catcher.position.y = bottom - 2e-3;
312
- catcher.receiveShadow = true;
313
- stage.add(catcher);
314
- if (walls) {
315
- const across = lines([...x.flatMap(([at]) => [at, bottom, -1, at, top, -1]), ...z.flatMap(([at]) => [-1, at, -1, 1, at, -1])], grid);
316
- const along = lines([...y.flatMap(([at]) => [-1, bottom, at, -1, top, at]), ...z.flatMap(([at]) => [-1, at, -1, -1, at, 1])], grid);
317
- stage.add(across, along);
318
- catcher.onBeforeRender = (_renderer, _scene, camera) => {
319
- across.position.z = camera.position.z >= 0 ? 0 : 2;
320
- along.position.x = camera.position.x >= 0 ? 0 : 2;
321
- across.updateMatrixWorld();
322
- along.updateMatrixWorld();
323
- };
324
- }
325
- ctx.root.add(stage);
326
- const { xLabel, yLabel, zLabel } = this.options;
327
- for (const [at, text] of x) ctx.label(text, [at, bottom - 0.03, 1.12], "muted", 10);
328
- for (const [at, text] of y) ctx.label(text, [1.13, bottom - 0.03, at], "muted", 10);
329
- if (walls) for (const [at, text] of z) ctx.label(text, [-1.1, at, 1.02], "muted", 10);
330
- const longest = Math.max(0, ...y.map(([, text]) => text.length));
331
- if (xLabel && x.some(([, text]) => text)) ctx.label(xLabel, [0, bottom - 0.03, 1.5], "secondary", 11);
332
- if (yLabel && y.some(([, text]) => text)) ctx.label(yLabel, [1.4 + longest * 0.04, bottom - 0.03, 0], "secondary", 11);
333
- if (zLabel && walls) ctx.label(zLabel, [-1.1, CEIL + 0.12, 1.02], "secondary", 11);
334
- }
335
- /** Group that grows out of the floor on entry. */
336
- rise(ctx, floor = FLOOR) {
337
- const group4 = new (0, _three.Group)();
338
- ctx.reveal((progress) => {
339
- group4.scale.y = Math.max(1e-3, progress);
340
- group4.position.y = floor * (1 - group4.scale.y);
341
- }, 1.1);
342
- ctx.root.add(group4);
343
- return group4;
344
- }
345
- /** Group that scales and turns into place, for free-standing shapes. */
346
- bloom(ctx) {
347
- const group4 = new (0, _three.Group)();
348
- ctx.reveal((progress) => {
349
- group4.scale.setScalar(Math.max(1e-3, progress));
350
- group4.rotation.y = (progress - 1) * 1.2;
351
- }, 1.3);
352
- ctx.root.add(group4);
353
- return group4;
354
- }
355
- /** Height colour: polarity when the data crosses zero, magnitude otherwise. */
356
- painter(ctx, [lo, hi]) {
357
- const scale = _nullishCoalesce(this.options.color, () => ( (lo < 0 && hi > 0 ? "diverging" /* Diverging */ : "sequential" /* Sequential */)));
358
- if (scale === "diverging" /* Diverging */) {
359
- const ramp2 = new ColorRamp(ctx.palette.diverging, -1, 1), reach = Math.max(Math.abs(lo), Math.abs(hi)) || 1;
360
- return (value) => ramp2.at(value / reach);
361
- }
362
- const ramp = new ColorRamp(ctx.palette.sequential);
363
- return (value) => ramp.at(0.05 + 0.95 * (value - lo) / (hi - lo || 1));
364
- }
365
- material(overrides = {}) {
366
- return new (0, _three.MeshStandardMaterial)({ vertexColors: true, side: _three.DoubleSide, roughness: 0.62, metalness: 0, ...overrides });
367
- }
368
- /** Painted, shadow-casting surface. `pick` receives the nearest vertex. */
369
- solid(ctx, geometry, parent, pick, overrides) {
370
- const mesh = new (0, _chunkCM7X3KFUcjs.SurfaceMesh)(geometry, this.material(overrides));
371
- mesh.castShadow = true;
372
- parent.add(mesh);
373
- if (pick) ctx.pick(mesh, pick);
374
- return mesh;
375
- }
376
- /** Draw a tube batch. Pass `color` for a single tone; otherwise the batch's own colours are used. */
377
- tubes(batch, parent, color, opacity = 1) {
378
- if (batch.empty) return null;
379
- const mesh = new (0, _three.Mesh)(batch.geometry(), this.material({ vertexColors: !color, side: 0, roughness: 0.5, ...color ? { color } : {}, transparent: opacity < 1, opacity }));
380
- parent.add(mesh);
381
- return mesh;
382
- }
383
- /** Round markers on one instanced mesh; sizes in world units. */
384
- dots(ctx, points, radius, paint, parent, pick) {
385
- if (!points.length) return null;
386
- const mesh = new (0, _three.InstancedMesh)(new (0, _three.SphereGeometry)(1, 12, 10), new (0, _three.MeshStandardMaterial)({ roughness: 0.45 }), points.length);
387
- const dummy = new (0, _three.Object3D)();
388
- points.forEach((point, k) => {
389
- dummy.position.set(...point);
390
- dummy.scale.setScalar(typeof radius === "number" ? radius : radius(k));
391
- dummy.updateMatrix();
392
- mesh.setMatrixAt(k, dummy.matrix);
393
- mesh.setColorAt(k, paint(k));
394
- });
395
- mesh.castShadow = true;
396
- parent.add(mesh);
397
- if (pick) ctx.pick(mesh, pick);
398
- return mesh;
399
- }
400
- /** Thin surface-coloured lattice that reveals the shape of the mesh without adding a new hue. */
401
- meshLines(ctx, space, parent, cells = 12) {
402
- const { nx, ny } = space.field;
403
- const batch = new TubeBatch(LINE * 0.7), stepX = Math.max(1, Math.round((nx - 1) / cells)), stepY = Math.max(1, Math.round((ny - 1) / cells));
404
- const columns = Array.from({ length: Math.ceil(nx / stepX) }, (_, k) => k * stepX), rows = Array.from({ length: Math.ceil(ny / stepY) }, (_, k) => k * stepY);
405
- for (const i of columns) batch.add(Array.from({ length: ny }, (_, j) => space.at(i, j, 3e-3)));
406
- for (const j of rows) batch.add(Array.from({ length: nx }, (_, i) => space.at(i, j, 3e-3)));
407
- this.tubes(batch, parent, ctx.theme.surface, 0.8);
408
- }
409
- thresholds({ zMin, zMax, zDomain }, levels) {
410
- if (zMax === zMin) return [zDomain[0]];
411
- return Array.from({ length: levels }, (_, k) => zMin + (k + 1) * (zMax - zMin) / (levels + 1));
412
- }
413
- contourLines(ctx, space, parent, levels = 8) {
414
- const batch = new TubeBatch(LINE * 0.6);
415
- for (const { paths } of space.field.lines(this.thresholds(space.field, levels))) {
416
- for (const path of paths) batch.add(path.map(([i, j]) => space.at(i, j, 4e-3)));
417
- }
418
- this.tubes(batch, parent, ctx.theme.ink, 0.55);
419
- }
420
- floorContours(ctx, space, paint, levels = 8) {
421
- const batch = new TubeBatch(LINE * 0.7);
422
- for (const { value, paths } of space.field.lines(this.thresholds(space.field, levels))) {
423
- const color = paint(value);
424
- for (const path of paths) batch.add(path.map(([i, j]) => space.floor(i, j, 6e-3)), color);
425
- }
426
- this.tubes(batch, ctx.root);
427
- }
428
- floorHeatmap(ctx, space, paint) {
429
- const { field } = space;
430
- this.solid(ctx, SurfaceGeometry.grid(field.nx, field.ny, (i, j) => Number.isNaN(field.at(i, j)) ? [NaN, NaN, NaN] : space.floor(i, j, 4e-3), (i, j) => paint(field.at(i, j))), ctx.root).castShadow = false;
431
- }
432
- /** The surface's upper envelope along each axis, drawn as a silhouette on the back walls. */
433
- wallProfiles(ctx, space, paint) {
434
- const { field } = space;
435
- const envelope = (count, across, read) => Array.from({ length: count }, (_, k) => {
436
- let top = -Infinity;
437
- for (let c = 0; c < across; c++) {
438
- const value = read(k, c);
439
- if (value > top) top = value;
440
- }
441
- return top;
442
- });
443
- const low = paint(field.zDomain[0]);
444
- const wall = (peaks, place) => {
445
- const top = peaks.map((peak, k) => place(k, Number.isFinite(peak) ? space.level(peak) : NaN));
446
- const batch = new TubeBatch(LINE).add(top, (k) => paint(peaks[k]));
447
- this.solid(ctx, SurfaceGeometry.curtain(top, FLOOR, (k) => paint(peaks[k]), () => low), ctx.root, void 0, { transparent: true, opacity: 0.4, depthWrite: false }).castShadow = false;
448
- this.tubes(batch, ctx.root);
449
- };
450
- wall(envelope(field.nx, field.ny, (i, j) => field.at(i, j)), (i, h) => [space.ground(i, 0)[0], h, -0.995]);
451
- wall(envelope(field.ny, field.nx, (j, i) => field.at(i, j)), (j, h) => [-0.995, h, space.ground(0, j)[1]]);
452
- }
453
- /** Vertical wall from the surface's boundary to the floor, turning the sheet into a solid. */
454
- skirt(ctx, space, paint, parent, sides = [0, 1, 2, 3], closed = false) {
455
- const { nx, ny } = space.field;
456
- const edges = [
457
- Array.from({ length: nx }, (_, i) => [i, 0]),
458
- Array.from({ length: ny }, (_, j) => [nx - 1, j]),
459
- Array.from({ length: nx }, (_, i) => [i, ny - 1]),
460
- Array.from({ length: ny }, (_, j) => [0, j])
461
- ];
462
- const low = paint(space.field.zDomain[0]);
463
- const parts = sides.map((side) => closed ? [...edges[side], edges[side][0]] : edges[side]).map((edge) => SurfaceGeometry.curtain(edge.map(([i, j]) => space.at(i, j)), FLOOR, (k) => paint(space.field.at(...edge[k])), () => low));
464
- this.solid(ctx, SurfaceGeometry.merge(parts), parent);
465
- }
466
- };
17
+ var _chunkLNWTC72Ycjs = require('./chunk-LNWTC72Y.cjs');
467
18
 
468
19
  // src/charts/threesurfaces/ComplexSurface.ts
469
-
20
+ var _d3 = require('d3');
470
21
 
471
22
  // src/charts/threesurfaces/GridSurfaceBase.ts
472
23
 
473
-
474
- // src/charts/threesurfaces/SurfaceField.ts
475
-
476
- var numeric = (cell) => {
477
- if (cell === null || cell === void 0 || cell === "") return NaN;
478
- const value = +cell;
479
- return Number.isFinite(value) ? value : NaN;
480
- };
481
- var catmullRom = (a, b, c, d, t) => b + 0.5 * t * (c - a + t * (2 * a - 5 * b + 4 * c - d + t * (3 * (b - c) + d - a)));
482
- var SurfaceField = (_class2 = class _SurfaceField {
483
- constructor(x, y, z) {;_class2.prototype.__init5.call(this);
484
- this.x = x;
485
- this.y = y;
486
- this.z = z;
487
- this.nx = x.length;
488
- this.ny = y.length;
489
- const [lo, hi] = _d3.extent.call(void 0, z);
490
- this.zMin = _nullishCoalesce(lo, () => ( 0));
491
- this.zMax = _nullishCoalesce(hi, () => ( 1));
492
- }
493
-
494
-
495
-
496
-
497
-
498
-
499
-
500
- static empty() {
501
- return new _SurfaceField([0, 1], [0, 1], new Float64Array(4).fill(NaN));
502
- }
503
- static from(data, columns = {}) {
504
- if (Array.isArray(data)) return _SurfaceField.pivot(data, columns);
505
- if (!_optionalChain([data, 'optionalAccess', _6 => _6.x, 'optionalAccess', _7 => _7.length]) || !_optionalChain([data, 'access', _8 => _8.y, 'optionalAccess', _9 => _9.length]) || !_optionalChain([data, 'access', _10 => _10.z, 'optionalAccess', _11 => _11.length])) return _SurfaceField.empty();
506
- const z = new Float64Array(data.x.length * data.y.length);
507
- data.y.forEach((_, j) => data.x.forEach((_2, i) => {
508
- z[i + j * data.x.length] = numeric(_optionalChain([data, 'access', _12 => _12.z, 'access', _13 => _13[j], 'optionalAccess', _14 => _14[i]]));
509
- }));
510
- return _SurfaceField.widened(data.x.map(Number), data.y.map(Number), z);
511
- }
512
- /** Long rows to grid: duplicate cells average, missing cells become holes, text axes index by first appearance. */
513
- static pivot(rows, { x = "x", y = "y", z = "z" }) {
514
- if (!rows.length) return _SurfaceField.empty();
515
- const axis = (column) => {
516
- const seen = [...new Set(rows.map((row) => row[column]))].filter((cell) => cell !== null && cell !== void 0);
517
- if (seen.every((cell) => Number.isFinite(numeric(cell)))) return new Map([...new Set(seen.map(numeric))].sort((a, b) => a - b).map((value, i) => [value, i]));
518
- return new Map(seen.map((cell, i) => [cell, i]));
519
- };
520
- const lookup = (map, cell) => _nullishCoalesce(map.get(cell), () => ( map.get(numeric(cell))));
521
- const xs = axis(x), ys = axis(y);
522
- if (!xs.size || !ys.size) return _SurfaceField.empty();
523
- const totals = new Float64Array(xs.size * ys.size), counts = new Uint32Array(xs.size * ys.size);
524
- for (const row of rows) {
525
- const i = lookup(xs, row[x]), j = lookup(ys, row[y]), value = numeric(row[z]);
526
- if (i === void 0 || j === void 0 || Number.isNaN(value)) continue;
527
- totals[i + j * xs.size] += value;
528
- counts[i + j * xs.size]++;
529
- }
530
- const values = totals.map((total, k) => counts[k] ? total / counts[k] : NaN);
531
- const labels = (map) => [...map.keys()].map((key, i) => typeof key === "number" ? key : i);
532
- return _SurfaceField.widened(labels(xs), labels(ys), values);
533
- }
534
- /** A single row or column still needs width to make a surface. */
535
- static widened(x, y, z) {
536
- if (x.length > 1 && y.length > 1) return new _SurfaceField(x, y, z);
537
- const gx = x.length > 1 ? x : [x[0], x[0] + 1], gy = y.length > 1 ? y : [y[0], y[0] + 1];
538
- const out = new Float64Array(gx.length * gy.length);
539
- gy.forEach((_, j) => gx.forEach((_2, i) => {
540
- out[i + j * gx.length] = z[Math.min(i, x.length - 1) + Math.min(j, y.length - 1) * x.length];
541
- }));
542
- return new _SurfaceField(gx, gy, out);
543
- }
544
- static compute(x, y, fn) {
545
- const z = new Float64Array(x.length * y.length);
546
- y.forEach((v, j) => x.forEach((u, i) => {
547
- const value = fn(u, v);
548
- z[i + j * x.length] = Number.isFinite(value) ? value : NaN;
549
- }));
550
- return new _SurfaceField(x, y, z);
551
- }
552
- get xDomain() {
553
- return [this.x[0], this.x[this.nx - 1]];
554
- }
555
- get yDomain() {
556
- return [this.y[0], this.y[this.ny - 1]];
557
- }
558
- get zDomain() {
559
- return this.zMax > this.zMin ? [this.zMin, this.zMax] : [this.zMin - 1, this.zMin + 1];
560
- }
561
- get hasData() {
562
- return this.z.some((value) => !Number.isNaN(value));
563
- }
564
- at(i, j) {
565
- return this.z[Math.max(0, Math.min(this.nx - 1, i)) + Math.max(0, Math.min(this.ny - 1, j)) * this.nx];
566
- }
567
- /** Bilinear read at fractional indices. A hole with any weight makes the read a hole. */
568
- sample(fi, fj) {
569
- const i = Math.max(0, Math.min(this.nx - 2, Math.floor(fi))), j = Math.max(0, Math.min(this.ny - 2, Math.floor(fj)));
570
- const a = fi - i, b = fj - j;
571
- const part = (weight, value) => weight > 0 ? weight * value : 0;
572
- return part((1 - a) * (1 - b), this.at(i, j)) + part(a * (1 - b), this.at(i + 1, j)) + part((1 - a) * b, this.at(i, j + 1)) + part(a * b, this.at(i + 1, j + 1));
573
- }
574
- /** Catmull-Rom read at fractional indices. */
575
- cubic(fi, fj) {
576
- const i = Math.floor(fi), j = Math.floor(fj);
577
- const row = (r) => catmullRom(this.at(i - 1, r), this.at(i, r), this.at(i + 1, r), this.at(i + 2, r), fi - i);
578
- return catmullRom(row(j - 1), row(j), row(j + 1), row(j + 2), fj - j);
579
- }
580
- resample(nx, ny, smooth = false) {
581
- const lerp = (axis, t) => {
582
- const i = Math.min(axis.length - 2, Math.floor(t));
583
- return axis[i] + (axis[i + 1] - axis[i]) * (t - i);
584
- };
585
- const xs = Array.from({ length: nx }, (_, i) => i * (this.nx - 1) / (nx - 1)), ys = Array.from({ length: ny }, (_, j) => j * (this.ny - 1) / (ny - 1));
586
- const z = new Float64Array(nx * ny);
587
- ys.forEach((fj, j) => xs.forEach((fi, i) => {
588
- z[i + j * nx] = smooth ? this.cubic(fi, fj) : this.sample(fi, fj);
589
- }));
590
- return new _SurfaceField(xs.map((t) => lerp(this.x, t)), ys.map((t) => lerp(this.y, t)), z);
591
- }
592
- /** Keep vertex counts sane when a user hands in a huge grid. */
593
- capped(limit) {
594
- return this.nx <= limit && this.ny <= limit ? this : this.resample(Math.min(this.nx, limit), Math.min(this.ny, limit));
595
- }
596
- map(fn) {
597
- const z = this.z.map((value, k) => {
598
- const out = fn(value, k % this.nx, Math.floor(k / this.nx));
599
- return Number.isFinite(out) ? out : NaN;
600
- });
601
- return new _SurfaceField(this.x, this.y, z);
602
- }
603
- raw(thresholds) {
604
- const clean = this.z.map((value) => Number.isNaN(value) ? -Infinity : value);
605
- return _d3.contours.call(void 0, ).size([this.nx, this.ny]).thresholds(thresholds)(Array.from(clean));
606
- }
607
- __init5() {this.toGrid = ([x, y]) => [Math.max(0, Math.min(this.nx - 1, x - 0.5)), Math.max(0, Math.min(this.ny - 1, y - 0.5))]}
608
- /** Filled iso-bands: each polygon is an outer ring followed by its holes. */
609
- bands(thresholds) {
610
- return this.raw(thresholds).map(({ value, coordinates }) => ({ value, polygons: coordinates.map((polygon) => polygon.map((ring) => ring.map(this.toGrid))) }));
611
- }
612
- /** Iso-lines with the grid border removed, so a contour ends at the edge rather than running along it. */
613
- lines(thresholds) {
614
- const edge = ([x, y]) => x <= 0 || y <= 0 || x >= this.nx || y >= this.ny;
615
- return this.raw(thresholds).map(({ value, coordinates }) => ({
616
- value,
617
- paths: coordinates.flat().flatMap((ring) => {
618
- const paths = [[]];
619
- for (const point of ring) {
620
- if (edge(point)) {
621
- if (paths.at(-1).length) paths.push([]);
622
- } else paths.at(-1).push(this.toGrid(point));
623
- }
624
- return paths.filter((path) => path.length > 1);
625
- })
626
- }));
627
- }
628
- }, _class2);
629
-
630
- // src/charts/threesurfaces/GridSurfaceBase.ts
631
24
  var short = _d3.format.call(void 0, ".3~g");
632
- var GridSurfaceBase = class extends SurfaceBase {
25
+ var GridSurfaceBase = class extends _chunkSYABFMD7cjs.SurfaceBase {
633
26
  defaults() {
634
27
  return { ...super.defaults(), x: "x", y: "y", z: "z" };
635
28
  }
636
29
  field(limit = 90) {
637
30
  const { data, x, y, z } = this.options;
638
- return SurfaceField.from(data, { x, y, z }).capped(limit);
31
+ return _chunkSYABFMD7cjs.SurfaceField.from(data, { x, y, z }).capped(limit);
639
32
  }
640
33
  table() {
641
- const field = SurfaceField.from(this.options.data, this.options);
34
+ const field = _chunkSYABFMD7cjs.SurfaceField.from(this.options.data, this.options);
642
35
  const rows = Array.from({ length: field.ny }, (_, j) => Array.from({ length: field.nx }, (_2, i) => [field.x[i], field.y[j], field.at(i, j)])).flat();
643
36
  return { columns: ["x", "y", "z"], rows };
644
37
  }
@@ -701,11 +94,11 @@ var FUNCTIONS = {
701
94
  ["logarithm" /* Logarithm */]: ([a, b]) => [Math.log(Math.hypot(a, b) || 1e-12), Math.atan2(b, a)],
702
95
  ["tangent" /* Tangent */]: (z) => div(sine(z), cosine(z))
703
96
  };
704
- var poleZeroSample = (seed) => _chunkUMEKIIHJcjs.SampleData.points(seed, 5, 1).map((row, k) => {
97
+ var poleZeroSample = (seed) => _chunkLNWTC72Ycjs.SampleData.points(seed, 5, 1).map((row, k) => {
705
98
  const angle = k / 5 * Math.PI * 2 + (row.x - 20) / 40;
706
99
  return { re: +(Math.cos(angle) * 1.15).toFixed(3), im: +(Math.sin(angle) * 1.15).toFixed(3), kind: k % 2 ? "pole" : "zero" };
707
100
  });
708
- var ComplexSurface = (_class3 = class extends SurfaceBase {
101
+ var ComplexSurface = (_class = class extends _chunkSYABFMD7cjs.SurfaceBase {
709
102
  static __initStatic() {this.meta = {
710
103
  id: "complex-surface",
711
104
  name: "Complex surface",
@@ -746,7 +139,7 @@ var ComplexSurface = (_class3 = class extends SurfaceBase {
746
139
  if (plotted === "modulus" /* Modulus */) return size;
747
140
  return plotted === "real-part" /* Real */ ? value[0] : value[1];
748
141
  };
749
- const grid = SurfaceField.compute(axis, axis, () => 0);
142
+ const grid = _chunkSYABFMD7cjs.SurfaceField.compute(axis, axis, () => 0);
750
143
  const unclipped = grid.map((_, i, j) => raw(values[j][i]));
751
144
  const sorted = Float64Array.from(unclipped.z.filter((value) => !Number.isNaN(value))).sort();
752
145
  const top = _nullishCoalesce(_d3.quantile.call(void 0, sorted, 0.97), () => ( 1)), bottom = _nullishCoalesce(_d3.quantile.call(void 0, sorted, plotted === "log-modulus" /* LogModulus */ || plotted === "modulus" /* Modulus */ ? 0 : 0.03), () => ( 0));
@@ -756,8 +149,8 @@ var ComplexSurface = (_class3 = class extends SurfaceBase {
756
149
  return size <= knee ? z : middle + Math.sign(t) * half * (knee + (1 - knee) * Math.tanh((size - knee) / (1 - knee)));
757
150
  };
758
151
  const field = unclipped.map(saturate);
759
- const space = new SurfaceSpace(field);
760
- const phase = new ColorRamp(ctx.palette.diverging, -1, 1);
152
+ const space = new (0, _chunkSYABFMD7cjs.SurfaceSpace)(field);
153
+ const phase = new (0, _chunkSYABFMD7cjs.ColorRamp)(ctx.palette.diverging, -1, 1);
761
154
  const tone = (i, j) => {
762
155
  const [a, b] = values[j][i];
763
156
  return phase.at(a / (Math.hypot(a, b) || 1));
@@ -765,22 +158,22 @@ var ComplexSurface = (_class3 = class extends SurfaceBase {
765
158
  const ticks = this.ticks([-reach, reach], (v) => v / reach);
766
159
  this.box(ctx, { x: ticks, y: this.ticks([-reach, reach], (v) => -v / reach), z: this.ticks(field.zDomain, space.level, 3).filter(([at]) => at >= space.level(middle - half * knee) && at <= space.level(middle + half * knee)) });
767
160
  const lift = this.rise(ctx);
768
- this.solid(ctx, SurfaceGeometry.grid(n, n, (i, j) => space.at(i, j), tone), lift, (k) => {
161
+ this.solid(ctx, _chunkSYABFMD7cjs.SurfaceGeometry.grid(n, n, (i, j) => space.at(i, j), tone), lift, (k) => {
769
162
  const i = k % n, j = Math.floor(k / n), [a, b] = values[j][i];
770
163
  return { title: `z = ${short(axis[i])} ${axis[j] < 0 ? "\u2212" : "+"} ${short(Math.abs(axis[j]))}i`, rows: [["|f|", short(Math.hypot(a, b))], ["arg f", short(Math.atan2(b, a))]] };
771
164
  });
772
165
  if (phaseLines) {
773
166
  const angle = grid.map((_, i, j) => Math.cos(2 * Math.atan2(values[j][i][1], values[j][i][0])));
774
- const batch = new TubeBatch(45e-4);
167
+ const batch = new (0, _chunkSYABFMD7cjs.TubeBatch)(45e-4);
775
168
  for (const { paths } of angle.lines([-0.5, 0.5])) for (const path of paths) batch.add(path.map(([i, j]) => space.at(i, j, 4e-3)));
776
169
  this.tubes(batch, lift, ctx.theme.ink, 0.5);
777
170
  }
778
171
  }
779
- }, _class3.__initStatic(), _class3);
172
+ }, _class.__initStatic(), _class);
780
173
 
781
174
  // src/charts/threesurfaces/ContourSurface.ts
782
175
 
783
-
176
+ var _three = require('./vendor/three.js');
784
177
  var LEVEL_GAP = 0.17;
785
178
  var ContourMode = /* @__PURE__ */ ((ContourMode2) => {
786
179
  ContourMode2["Draped"] = "draped";
@@ -794,7 +187,7 @@ var ContourLevels = /* @__PURE__ */ ((ContourLevels2) => {
794
187
  ContourLevels2["Quantile"] = "quantile";
795
188
  return ContourLevels2;
796
189
  })(ContourLevels || {});
797
- var ContourSurface = (_class4 = class extends GridSurfaceBase {
190
+ var ContourSurface = (_class2 = class extends GridSurfaceBase {
798
191
  static __initStatic2() {this.meta = {
799
192
  id: "contour-surface",
800
193
  name: "Contour surface",
@@ -803,7 +196,7 @@ var ContourSurface = (_class4 = class extends GridSurfaceBase {
803
196
  shape: "grid" /* Grid */,
804
197
  description: "Cuts a height field at iso-levels and shows them draped on the surface, as stacked terraces, floating plates or a floor map.",
805
198
  tags: ["contour", "iso-lines", "topographic", "terraced"],
806
- sample: (seed) => _chunkUMEKIIHJcjs.SampleData.surface(seed, 56),
199
+ sample: (seed) => _chunkLNWTC72Ycjs.SampleData.surface(seed, 56),
807
200
  variants: {
808
201
  mode: ["terraced" /* Terraced */, "draped" /* Draped */, "floating" /* Floating */, "floor-map" /* Flat */],
809
202
  levels: [9, 6, 14],
@@ -839,13 +232,13 @@ var ContourSurface = (_class4 = class extends GridSurfaceBase {
839
232
  const plate = new (0, _three.ExtrudeGeometry)(shape, { depth: Math.max(4e-3, top - bottom), bevelEnabled: false, curveSegments: 1 });
840
233
  plate.rotateX(-Math.PI / 2);
841
234
  plate.translate(0, bottom, 0);
842
- return SurfaceGeometry.tinted(plate, color);
235
+ return _chunkSYABFMD7cjs.SurfaceGeometry.tinted(plate, color);
843
236
  }));
844
237
  }
845
238
  build(ctx) {
846
239
  const { mode, filled } = this.options;
847
240
  const field = this.field(72);
848
- const space = new SurfaceSpace(field);
241
+ const space = new (0, _chunkSYABFMD7cjs.SurfaceSpace)(field);
849
242
  const paint = this.painter(ctx, field.zDomain);
850
243
  const cuts = this.cuts(space);
851
244
  this.box(ctx, this.axes(space));
@@ -854,24 +247,24 @@ var ContourSurface = (_class4 = class extends GridSurfaceBase {
854
247
  const place = (value, path) => path.map(([i, j]) => {
855
248
  if (mode === "draped" /* Draped */) return space.at(i, j, 5e-3);
856
249
  const [x, z] = space.ground(i, j);
857
- return [x, mode === "floor-map" /* Flat */ ? FLOOR + 8e-3 : space.level(value), z];
250
+ return [x, mode === "floor-map" /* Flat */ ? _chunkSYABFMD7cjs.FLOOR + 8e-3 : space.level(value), z];
858
251
  });
859
252
  if (filled) {
860
253
  if (mode === "draped" /* Draped */) {
861
- this.solid(ctx, SurfaceGeometry.grid(field.nx, field.ny, (i, j) => space.at(i, j), (i, j) => paint(field.at(i, j))), lift, this.gridTip(space));
254
+ this.solid(ctx, _chunkSYABFMD7cjs.SurfaceGeometry.grid(field.nx, field.ny, (i, j) => space.at(i, j), (i, j) => paint(field.at(i, j))), lift, this.gridTip(space));
862
255
  } else {
863
256
  const stops = [field.zMin - 1, ...cuts];
864
- const span = (CEIL - FLOOR) / (cuts.length + 1);
257
+ const span = (_chunkSYABFMD7cjs.CEIL - _chunkSYABFMD7cjs.FLOOR) / (cuts.length + 1);
865
258
  const plates = stops.flatMap((value, k) => {
866
259
  const shade = paint(k ? value : field.zMin);
867
- if (mode === "terraced" /* Terraced */) return this.plates(space, value, k ? space.level(cuts[k - 1]) : FLOOR, space.level(_nullishCoalesce(stops[k + 1], () => ( field.zMax))), shade);
868
- if (mode === "floating" /* Floating */) return this.plates(space, value, (k ? space.level(value) : FLOOR) - span * 0.14, k ? space.level(value) : FLOOR, shade);
869
- return this.plates(space, value, FLOOR + k * 35e-4, FLOOR + (k + 1) * 35e-4, shade);
260
+ if (mode === "terraced" /* Terraced */) return this.plates(space, value, k ? space.level(cuts[k - 1]) : _chunkSYABFMD7cjs.FLOOR, space.level(_nullishCoalesce(stops[k + 1], () => ( field.zMax))), shade);
261
+ if (mode === "floating" /* Floating */) return this.plates(space, value, (k ? space.level(value) : _chunkSYABFMD7cjs.FLOOR) - span * 0.14, k ? space.level(value) : _chunkSYABFMD7cjs.FLOOR, shade);
262
+ return this.plates(space, value, _chunkSYABFMD7cjs.FLOOR + k * 35e-4, _chunkSYABFMD7cjs.FLOOR + (k + 1) * 35e-4, shade);
870
263
  });
871
- this.solid(ctx, SurfaceGeometry.merge(plates), lift, void 0);
264
+ this.solid(ctx, _chunkSYABFMD7cjs.SurfaceGeometry.merge(plates), lift, void 0);
872
265
  }
873
266
  }
874
- const rings = new TubeBatch(filled ? 35e-4 : 75e-4);
267
+ const rings = new (0, _chunkSYABFMD7cjs.TubeBatch)(filled ? 35e-4 : 75e-4);
875
268
  const showRings = !filled || mode === "draped" /* Draped */;
876
269
  if (showRings) for (const { value, paths } of field.lines(cuts)) {
877
270
  const color = paint(value);
@@ -888,7 +281,7 @@ var ContourSurface = (_class4 = class extends GridSurfaceBase {
888
281
  ctx.label(short(value), [1.08, at, -1.02], "muted", 9).center.x = 0;
889
282
  }
890
283
  }
891
- }, _class4.__initStatic2(), _class4);
284
+ }, _class2.__initStatic2(), _class2);
892
285
 
893
286
  // src/charts/threesurfaces/DensitySurface.ts
894
287
 
@@ -912,7 +305,7 @@ var KERNELS = {
912
305
  return d < 1 ? (1 - d) * 3 / (Math.PI * 2.4 * 2.4) : 0;
913
306
  }
914
307
  };
915
- var DensitySurface = (_class5 = class extends SurfaceBase {
308
+ var DensitySurface = (_class3 = class extends _chunkSYABFMD7cjs.SurfaceBase {
916
309
  static __initStatic3() {this.meta = {
917
310
  id: "density-surface",
918
311
  name: "Density surface",
@@ -921,7 +314,7 @@ var DensitySurface = (_class5 = class extends SurfaceBase {
921
314
  shape: "table" /* Table */,
922
315
  description: "Estimates a two-dimensional kernel density from scattered points and raises it into a surface, pooled or per group.",
923
316
  tags: ["kde", "bivariate", "density", "scatter", "joint distribution"],
924
- sample: (seed) => _chunkUMEKIIHJcjs.SampleData.points(seed, 300, 3),
317
+ sample: (seed) => _chunkLNWTC72Ycjs.SampleData.points(seed, 300, 3),
925
318
  variants: {
926
319
  kernel: Object.values(SurfaceDensityKernel),
927
320
  bandwidth: [1, 0.6, 1.6],
@@ -935,7 +328,7 @@ var DensitySurface = (_class5 = class extends SurfaceBase {
935
328
  }
936
329
  estimate(rows, axisX, axisY, hx, hy) {
937
330
  const kernel = KERNELS[this.options.kernel], share = rows.length * hx * hy || 1;
938
- return SurfaceField.compute(axisX, axisY, (x, y) => rows.reduce((sum, row) => sum + kernel(((x - row.x) / hx) ** 2 + ((y - row.y) / hy) ** 2), 0) / share);
331
+ return _chunkSYABFMD7cjs.SurfaceField.compute(axisX, axisY, (x, y) => rows.reduce((sum, row) => sum + kernel(((x - row.x) / hx) ** 2 + ((y - row.y) / hy) ** 2), 0) / share);
939
332
  }
940
333
  build(ctx) {
941
334
  const { data, x, y, group: key, bandwidth, mark, grouped, rug } = this.options;
@@ -956,28 +349,28 @@ var DensitySurface = (_class5 = class extends SurfaceBase {
956
349
  const lift = this.rise(ctx);
957
350
  const seq = this.painter(ctx, domain);
958
351
  for (const { name, field, list } of groups) {
959
- const space = new SurfaceSpace(field, "linear" /* Linear */, [FLOOR, CEIL], domain);
352
+ const space = new (0, _chunkSYABFMD7cjs.SurfaceSpace)(field, "linear" /* Linear */, [_chunkSYABFMD7cjs.FLOOR, _chunkSYABFMD7cjs.CEIL], domain);
960
353
  const flat = grouped ? ctx.color(ctx.palette.color(name)) : null;
961
- const faint = _optionalChain([flat, 'optionalAccess', _15 => _15.clone, 'call', _16 => _16(), 'access', _17 => _17.lerp, 'call', _18 => _18(ctx.color(ctx.theme.surface), 0.72)]);
354
+ const faint = _optionalChain([flat, 'optionalAccess', _3 => _3.clone, 'call', _4 => _4(), 'access', _5 => _5.lerp, 'call', _6 => _6(ctx.color(ctx.theme.surface), 0.72)]);
962
355
  const paint = (value) => flat ? faint.clone().lerp(flat, Math.min(1, value / peak * 3)) : seq(value);
963
356
  if (mark === "surface" /* Surface */) this.sheet(ctx, space, paint, lift, name);
964
357
  if (mark === "rings" /* Rings */) this.rings(space, paint, lift);
965
358
  if (mark === "rows" /* Rows */) this.rowsMark(space, paint, lift);
966
- if (rug) this.dots(ctx, list.map((row) => [(row.x - x0) / (x1 - x0) * 2 - 1, FLOOR + 0.01, 1 - (row.y - y0) / (y1 - y0) * 2]), 0.01, () => _nullishCoalesce(flat, () => ( ctx.color(ctx.theme.inkSecondary))), ctx.root);
359
+ if (rug) this.dots(ctx, list.map((row) => [(row.x - x0) / (x1 - x0) * 2 - 1, _chunkSYABFMD7cjs.FLOOR + 0.01, 1 - (row.y - y0) / (y1 - y0) * 2]), 0.01, () => _nullishCoalesce(flat, () => ( ctx.color(ctx.theme.inkSecondary))), ctx.root);
967
360
  }
968
361
  }
969
362
  sheet(ctx, space, paint, parent, name) {
970
363
  const { field } = space;
971
364
  const floorline = 1e-3 * field.zMax;
972
365
  const place = (i, j) => field.at(i, j) < floorline ? [NaN, NaN, NaN] : space.at(i, j);
973
- this.solid(ctx, SurfaceGeometry.grid(field.nx, field.ny, place, (i, j) => paint(field.at(i, j))), parent, (k) => ({
366
+ this.solid(ctx, _chunkSYABFMD7cjs.SurfaceGeometry.grid(field.nx, field.ny, place, (i, j) => paint(field.at(i, j))), parent, (k) => ({
974
367
  title: name || void 0,
975
368
  rows: [["density", short(field.at(k % field.nx, Math.floor(k / field.nx)))]]
976
369
  }));
977
370
  }
978
371
  rings(space, paint, parent) {
979
372
  const { field } = space;
980
- const batch = new TubeBatch(62e-4);
373
+ const batch = new (0, _chunkSYABFMD7cjs.TubeBatch)(62e-4);
981
374
  for (const { value, paths } of field.lines(Array.from({ length: 8 }, (_, k) => field.zMax * (k + 1) / 9))) {
982
375
  const color = paint(value);
983
376
  for (const path of paths) batch.add(path.map(([i, j]) => {
@@ -989,11 +382,11 @@ var DensitySurface = (_class5 = class extends SurfaceBase {
989
382
  }
990
383
  rowsMark(space, paint, parent) {
991
384
  const { field } = space;
992
- const batch = new TubeBatch(52e-4);
385
+ const batch = new (0, _chunkSYABFMD7cjs.TubeBatch)(52e-4);
993
386
  for (let j = 0; j < field.ny; j += 3) batch.add(Array.from({ length: field.nx }, (_, i) => space.at(i, j)), (k) => paint(field.at(k, j)));
994
387
  this.tubes(batch, parent);
995
388
  }
996
- }, _class5.__initStatic3(), _class5);
389
+ }, _class3.__initStatic3(), _class3);
997
390
 
998
391
  // src/charts/threesurfaces/HeightfieldBars.ts
999
392
 
@@ -1015,7 +408,7 @@ var HeightBarBaseline = /* @__PURE__ */ ((HeightBarBaseline2) => {
1015
408
  HeightBarBaseline2["Magnitude"] = "magnitude";
1016
409
  return HeightBarBaseline2;
1017
410
  })(HeightBarBaseline || {});
1018
- var HeightfieldBars = (_class6 = class extends GridSurfaceBase {
411
+ var HeightfieldBars = (_class4 = class extends GridSurfaceBase {
1019
412
  static __initStatic4() {this.meta = {
1020
413
  id: "heightfield-bars",
1021
414
  name: "Heightfield bars",
@@ -1024,7 +417,7 @@ var HeightfieldBars = (_class6 = class extends GridSurfaceBase {
1024
417
  shape: "grid" /* Grid */,
1025
418
  description: "Bins a height field into columns from a true zero baseline, so each cell reads as a countable value.",
1026
419
  tags: ["lego plot", "city", "columns", "3d histogram"],
1027
- sample: (seed) => _chunkUMEKIIHJcjs.SampleData.surface(seed, 40),
420
+ sample: (seed) => _chunkLNWTC72Ycjs.SampleData.surface(seed, 40),
1028
421
  variants: {
1029
422
  shape: ["box" /* Box */, "cylinder" /* Cylinder */, "hexagon" /* Hexagon */, "spike" /* Spike */],
1030
423
  layout: ["square" /* Square */, "staggered" /* Staggered */],
@@ -1072,9 +465,9 @@ var HeightfieldBars = (_class6 = class extends GridSurfaceBase {
1072
465
  const values = cells.map(({ value }) => signed ? value : Math.abs(value));
1073
466
  const top = Math.max(0, ...values), low = Math.min(0, ...values);
1074
467
  const domain = [low, top > low ? top : low + 1];
1075
- const height = (value) => FLOOR + (value - domain[0]) / (domain[1] - domain[0]) * (CEIL - FLOOR);
468
+ const height = (value) => _chunkSYABFMD7cjs.FLOOR + (value - domain[0]) / (domain[1] - domain[0]) * (_chunkSYABFMD7cjs.CEIL - _chunkSYABFMD7cjs.FLOOR);
1076
469
  const zero = height(0);
1077
- const space = new SurfaceSpace(source);
470
+ const space = new (0, _chunkSYABFMD7cjs.SurfaceSpace)(source);
1078
471
  const paint = this.painter(ctx, domain);
1079
472
  const ticks = this.axes(space);
1080
473
  this.box(ctx, { ...ticks, z: this.ticks(domain, height, 3) });
@@ -1097,7 +490,7 @@ var HeightfieldBars = (_class6 = class extends GridSurfaceBase {
1097
490
  ctx.root.add(bars);
1098
491
  ctx.pick(bars, (k) => ({ rows: [["column", cells[k].i], ["row", cells[k].j], ["value", short(values[k])]] }));
1099
492
  }
1100
- }, _class6.__initStatic4(), _class6);
493
+ }, _class4.__initStatic4(), _class4);
1101
494
 
1102
495
  // src/charts/threesurfaces/ImplicitSurface.ts
1103
496
 
@@ -1106,8 +499,8 @@ var HeightfieldBars = (_class6 = class extends GridSurfaceBase {
1106
499
  // src/charts/threesurfaces/IsoSurfaceMesher.ts
1107
500
 
1108
501
  var IsoSurfaceMesher = class {
1109
- static mesh(field, n, extent5 = 1) {
1110
- const at = (k) => -extent5 + 2 * extent5 * k / (n - 1);
502
+ static mesh(field, n, extent4 = 1) {
503
+ const at = (k) => -extent4 + 2 * extent4 * k / (n - 1);
1111
504
  const values = new Float32Array(n * n * n);
1112
505
  for (let z = 0, w = 0; z < n; z++) for (let y = 0; y < n; y++) for (let x = 0; x < n; x++, w++) values[w] = field(at(x), at(y), at(z));
1113
506
  const stride = [1, n, n * n];
@@ -1149,7 +542,7 @@ var IsoSurfaceMesher = class {
1149
542
  const geometry = new (0, _three.BufferGeometry)();
1150
543
  geometry.setAttribute("position", new (0, _three.Float32BufferAttribute)(positions, 3));
1151
544
  geometry.setIndex(indices);
1152
- const normals = new Float32Array(positions.length), e = 2 * extent5 / (n - 1) / 2;
545
+ const normals = new Float32Array(positions.length), e = 2 * extent4 / (n - 1) / 2;
1153
546
  for (let k = 0; k < positions.length; k += 3) {
1154
547
  const px = positions[k], py = positions[k + 1], pz = positions[k + 2];
1155
548
  const nx = field(px + e, py, pz) - field(px - e, py, pz), ny = field(px, py + e, pz) - field(px, py - e, pz), nz = field(px, py, pz + e) - field(px, py, pz - e);
@@ -1222,7 +615,7 @@ var FORMS = {
1222
615
  },
1223
616
  ["metaballs" /* Metaballs */]: (x, y, z) => 1 - [[-0.4, -0.2, 0.1, 0.11], [0.4, 0.1, -0.2, 0.09], [0.05, 0.42, 0.3, 0.07], [0.1, -0.5, -0.3, 0.06]].reduce((sum, [cx, cy, cz, power]) => sum + power / (pow2(x - cx) + pow2(y - cy) + pow2(z - cz) + 1e-6), 0)
1224
617
  };
1225
- var ImplicitSurface = (_class7 = class extends SurfaceBase {
618
+ var ImplicitSurface = (_class5 = class extends _chunkSYABFMD7cjs.SurfaceBase {
1226
619
  static __initStatic5() {this.meta = {
1227
620
  id: "implicit-surface",
1228
621
  name: "Implicit surface",
@@ -1231,7 +624,7 @@ var ImplicitSurface = (_class7 = class extends SurfaceBase {
1231
624
  shape: "function" /* Function */,
1232
625
  description: "Extracts the level set of a three-dimensional field, from a measured volume to gyroids and other classic implicit solids.",
1233
626
  tags: ["iso-surface", "level set", "gyroid", "minimal surface", "schwarz"],
1234
- sample: (seed) => _chunkUMEKIIHJcjs.SampleData.volume(seed, 24),
627
+ sample: (seed) => _chunkLNWTC72Ycjs.SampleData.volume(seed, 24),
1235
628
  variants: {
1236
629
  form: Object.values(ImplicitSurfaceForm),
1237
630
  clip: ["whole" /* None */, "half" /* Half */, "octant" /* Octant */],
@@ -1243,9 +636,9 @@ var ImplicitSurface = (_class7 = class extends SurfaceBase {
1243
636
  }
1244
637
  volume() {
1245
638
  const { data, iso } = this.options;
1246
- const [nx = 0, ny = 0, nz = 0] = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _19 => _19.size]), () => ( []));
1247
- const values = _optionalChain([data, 'optionalAccess', _20 => _20.values]);
1248
- if (!_optionalChain([values, 'optionalAccess', _21 => _21.length]) || nx < 2 || ny < 2 || nz < 2) return () => 1;
639
+ const [nx = 0, ny = 0, nz = 0] = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _7 => _7.size]), () => ( []));
640
+ const values = _optionalChain([data, 'optionalAccess', _8 => _8.values]);
641
+ if (!_optionalChain([values, 'optionalAccess', _9 => _9.length]) || nx < 2 || ny < 2 || nz < 2) return () => 1;
1249
642
  let peak = -Infinity;
1250
643
  for (let k = 0; k < values.length; k++) if (values[k] > peak) peak = values[k];
1251
644
  const level = peak * iso;
@@ -1284,7 +677,7 @@ var ImplicitSurface = (_class7 = class extends SurfaceBase {
1284
677
  build(ctx) {
1285
678
  const geometry = IsoSurfaceMesher.mesh(this.shaped(), this.options.shell ? 58 : 44, 1);
1286
679
  const heights = geometry.getAttribute("position");
1287
- const ramp = new ColorRamp(ctx.palette.sequential);
680
+ const ramp = new (0, _chunkSYABFMD7cjs.ColorRamp)(ctx.palette.sequential);
1288
681
  const colors = new Float32Array(heights.count * 3);
1289
682
  for (let k = 0; k < heights.count; k++) {
1290
683
  const color = ramp.at(0.2 + 0.7 * (heights.getY(k) + 0.9) / 1.8);
@@ -1296,7 +689,7 @@ var ImplicitSurface = (_class7 = class extends SurfaceBase {
1296
689
  const group4 = this.bloom(ctx);
1297
690
  this.solid(ctx, geometry, group4, () => ({ title: _nullishCoalesce(this.options.form, () => ( "field")), rows: [["vertices", short(heights.count)]] }));
1298
691
  }
1299
- }, _class7.__initStatic5(), _class7);
692
+ }, _class5.__initStatic5(), _class5);
1300
693
 
1301
694
  // src/charts/threesurfaces/LayeredSurfaces.ts
1302
695
  var LayerArrangement = /* @__PURE__ */ ((LayerArrangement2) => {
@@ -1312,7 +705,7 @@ var LayerMark = /* @__PURE__ */ ((LayerMark2) => {
1312
705
  LayerMark2["Rows"] = "rows";
1313
706
  return LayerMark2;
1314
707
  })(LayerMark || {});
1315
- var LayeredSurfaces = (_class8 = class extends SurfaceBase {
708
+ var LayeredSurfaces = (_class6 = class extends _chunkSYABFMD7cjs.SurfaceBase {
1316
709
  static __initStatic6() {this.meta = {
1317
710
  id: "layered-surfaces",
1318
711
  name: "Layered surfaces",
@@ -1321,7 +714,7 @@ var LayeredSurfaces = (_class8 = class extends SurfaceBase {
1321
714
  shape: "grid" /* Grid */,
1322
715
  description: "Places several height fields over the same floor, exploded, overlaid, stacked or as differences from the first.",
1323
716
  tags: ["multiple surfaces", "scenarios", "stacked surface", "difference"],
1324
- sample: (seed) => ["Alpha", "Bravo", "Charlie"].map((name, k) => ({ name, grid: _chunkUMEKIIHJcjs.SampleData.surface(seed + k * 1.9, 36) })),
717
+ sample: (seed) => ["Alpha", "Bravo", "Charlie"].map((name, k) => ({ name, grid: _chunkLNWTC72Ycjs.SampleData.surface(seed + k * 1.9, 36) })),
1325
718
  variants: {
1326
719
  arrangement: ["exploded" /* Exploded */, "overlaid" /* Overlaid */, "stacked" /* Stacked */, "difference-from-first" /* Difference */],
1327
720
  mark: ["solid" /* Solid */, "lattice" /* Lattice */, "rows" /* Rows */],
@@ -1334,12 +727,12 @@ var LayeredSurfaces = (_class8 = class extends SurfaceBase {
1334
727
  /** A bare grid is a stack of one. */
1335
728
  layers() {
1336
729
  const { data } = this.options;
1337
- if (Array.isArray(data)) return data.filter((layer) => _optionalChain([layer, 'optionalAccess', _22 => _22.grid]));
730
+ if (Array.isArray(data)) return data.filter((layer) => _optionalChain([layer, 'optionalAccess', _10 => _10.grid]));
1338
731
  return data ? [{ name: "Surface", grid: data }] : [];
1339
732
  }
1340
733
  table() {
1341
734
  const rows = this.layers().flatMap(({ name, grid }) => {
1342
- const field = SurfaceField.from(grid);
735
+ const field = _chunkSYABFMD7cjs.SurfaceField.from(grid);
1343
736
  return Array.from(field.z, (z, k) => [name, field.x[k % field.nx], field.y[Math.floor(k / field.nx)], z]);
1344
737
  });
1345
738
  return { columns: ["layer", "x", "y", "z"], rows };
@@ -1368,15 +761,15 @@ var LayeredSurfaces = (_class8 = class extends SurfaceBase {
1368
761
  }
1369
762
  build(ctx) {
1370
763
  const { arrangement, mark, links } = this.options;
1371
- const layers = this.layers().map(({ name, grid }) => ({ name, field: SurfaceField.from(grid).capped(64) }));
764
+ const layers = this.layers().map(({ name, grid }) => ({ name, field: _chunkSYABFMD7cjs.SurfaceField.from(grid).capped(64) }));
1372
765
  const difference = arrangement === "difference-from-first" /* Difference */ && layers.length > 1;
1373
766
  const names = difference ? layers.slice(1).map(({ name }) => name) : layers.map(({ name }) => name);
1374
767
  const { fields, domain } = layers.length ? this.arranged(layers.map(({ field }) => field)) : { fields: [], domain: [0, 1] };
1375
- const reference = _nullishCoalesce(fields[0], () => ( SurfaceField.empty()));
768
+ const reference = _nullishCoalesce(fields[0], () => ( _chunkSYABFMD7cjs.SurfaceField.empty()));
1376
769
  const exploded = arrangement === "exploded" /* Exploded */;
1377
- const span = (CEIL - FLOOR) / Math.max(1, fields.length);
1378
- const spaces = fields.map((field, k) => new SurfaceSpace(field, "linear" /* Linear */, exploded ? [FLOOR + k * span + 0.03, FLOOR + (k + 1) * span - 0.03] : [FLOOR, CEIL], domain));
1379
- const whole = new SurfaceSpace(reference, "linear" /* Linear */, [FLOOR, CEIL], domain);
770
+ const span = (_chunkSYABFMD7cjs.CEIL - _chunkSYABFMD7cjs.FLOOR) / Math.max(1, fields.length);
771
+ const spaces = fields.map((field, k) => new (0, _chunkSYABFMD7cjs.SurfaceSpace)(field, "linear" /* Linear */, exploded ? [_chunkSYABFMD7cjs.FLOOR + k * span + 0.03, _chunkSYABFMD7cjs.FLOOR + (k + 1) * span - 0.03] : [_chunkSYABFMD7cjs.FLOOR, _chunkSYABFMD7cjs.CEIL], domain));
772
+ const whole = new (0, _chunkSYABFMD7cjs.SurfaceSpace)(reference, "linear" /* Linear */, [_chunkSYABFMD7cjs.FLOOR, _chunkSYABFMD7cjs.CEIL], domain);
1380
773
  const [x0, x1] = reference.xDomain, [y0, y1] = reference.yDomain;
1381
774
  this.box(ctx, {
1382
775
  x: this.ticks(reference.xDomain, (v) => (v - x0) / (x1 - x0 || 1) * 2 - 1),
@@ -1388,16 +781,16 @@ var LayeredSurfaces = (_class8 = class extends SurfaceBase {
1388
781
  const name = _nullishCoalesce(names[k], () => ( "")), space = spaces[k], color = ctx.color(ctx.palette.color(name));
1389
782
  const tip = (v) => ({ title: name, color: ctx.palette.color(name), rows: [["z", short(field.at(v % field.nx, Math.floor(v / field.nx)))]] });
1390
783
  if (mark === "solid" /* Solid */) {
1391
- this.solid(ctx, SurfaceGeometry.grid(field.nx, field.ny, (i, j) => space.at(i, j), () => color), lift, tip);
784
+ this.solid(ctx, _chunkSYABFMD7cjs.SurfaceGeometry.grid(field.nx, field.ny, (i, j) => space.at(i, j), () => color), lift, tip);
1392
785
  return;
1393
786
  }
1394
- const batch = new TubeBatch(52e-4), stride = Math.max(1, Math.round((field.ny - 1) / (mark === "rows" /* Rows */ ? 18 : 12)));
787
+ const batch = new (0, _chunkSYABFMD7cjs.TubeBatch)(52e-4), stride = Math.max(1, Math.round((field.ny - 1) / (mark === "rows" /* Rows */ ? 18 : 12)));
1395
788
  for (let j = 0; j < field.ny; j += stride) batch.add(Array.from({ length: field.nx }, (_, i) => space.at(i, j)), color);
1396
789
  if (mark === "lattice" /* Lattice */) for (let i = 0; i < field.nx; i += stride) batch.add(Array.from({ length: field.ny }, (_, j) => space.at(i, j)), color);
1397
790
  this.tubes(batch, lift);
1398
791
  });
1399
792
  if (links && spaces.length > 1) {
1400
- const stems = new TubeBatch(32e-4, 4), lattice = Array.from({ length: 6 }, (_, k) => (k + 0.5) / 6);
793
+ const stems = new (0, _chunkSYABFMD7cjs.TubeBatch)(32e-4, 4), lattice = Array.from({ length: 6 }, (_, k) => (k + 0.5) / 6);
1401
794
  for (const v of lattice) for (const u of lattice) {
1402
795
  const path = spaces.map((space) => space.at(u * (space.field.nx - 1), v * (space.field.ny - 1)));
1403
796
  stems.add(path);
@@ -1405,7 +798,7 @@ var LayeredSurfaces = (_class8 = class extends SurfaceBase {
1405
798
  this.tubes(stems, lift, ctx.theme.inkMuted);
1406
799
  }
1407
800
  }
1408
- }, _class8.__initStatic6(), _class8);
801
+ }, _class6.__initStatic6(), _class6);
1409
802
 
1410
803
  // src/charts/threesurfaces/MeshSurface.ts
1411
804
 
@@ -1427,7 +820,7 @@ var MeshBody = /* @__PURE__ */ ((MeshBody2) => {
1427
820
  MeshBody2["Column"] = "column";
1428
821
  return MeshBody2;
1429
822
  })(MeshBody || {});
1430
- var MeshSurface = (_class9 = class extends GridSurfaceBase {
823
+ var MeshSurface = (_class7 = class extends GridSurfaceBase {
1431
824
  static __initStatic7() {this.meta = {
1432
825
  id: "mesh-surface",
1433
826
  name: "Mesh surface",
@@ -1436,7 +829,7 @@ var MeshSurface = (_class9 = class extends GridSurfaceBase {
1436
829
  shape: "grid" /* Grid */,
1437
830
  description: "Breaks a height field into separated tiles of quads, triangles, hexagons or diamonds, posed along the slope or level.",
1438
831
  tags: ["tessellation", "low poly", "tiles", "faceted"],
1439
- sample: (seed) => _chunkUMEKIIHJcjs.SampleData.surface(seed, 40),
832
+ sample: (seed) => _chunkLNWTC72Ycjs.SampleData.surface(seed, 40),
1440
833
  variants: {
1441
834
  tile: ["quad" /* Quad */, "triangle" /* Triangle */, "hexagon" /* Hexagon */, "diamond" /* Diamond */],
1442
835
  pose: ["tilted" /* Tilted */, "level" /* Level */],
@@ -1485,7 +878,7 @@ var MeshSurface = (_class9 = class extends GridSurfaceBase {
1485
878
  build(ctx) {
1486
879
  const { pose, body, cells } = this.options;
1487
880
  const field = this.field();
1488
- const space = new SurfaceSpace(field);
881
+ const space = new (0, _chunkSYABFMD7cjs.SurfaceSpace)(field);
1489
882
  const paint = this.painter(ctx, field.zDomain);
1490
883
  this.box(ctx, this.axes(space));
1491
884
  const lift = this.rise(ctx);
@@ -1506,7 +899,7 @@ var MeshSurface = (_class9 = class extends GridSurfaceBase {
1506
899
  const hub = pose === "level" /* Level */ ? spread(space.ground(fi(cx), fj(cy)), space.level(centre)) : space.at(fi(cx), fj(cy));
1507
900
  top.forEach((point, k) => push([hub, point, top[(k + 1) % top.length]], color, owner));
1508
901
  if (body === "skin" /* Skin */) return;
1509
- const low = (point) => [point[0], body === "column" /* Column */ ? FLOOR : point[1] - 0.05, point[2]];
902
+ const low = (point) => [point[0], body === "column" /* Column */ ? _chunkSYABFMD7cjs.FLOOR : point[1] - 0.05, point[2]];
1510
903
  top.forEach((point, k) => {
1511
904
  const next = top[(k + 1) % top.length];
1512
905
  push([point, low(point), next, next, low(point), low(next)], color, owner);
@@ -1528,7 +921,7 @@ var MeshSurface = (_class9 = class extends GridSurfaceBase {
1528
921
  return this.gridTip(space)(i + j * field.nx);
1529
922
  });
1530
923
  }
1531
- }, _class9.__initStatic7(), _class9);
924
+ }, _class7.__initStatic7(), _class7);
1532
925
  var spread = ([x, z], y) => [x, y, z];
1533
926
 
1534
927
  // src/charts/threesurfaces/ParametricForms.ts
@@ -1626,7 +1019,7 @@ var ParametricCut = /* @__PURE__ */ ((ParametricCut2) => {
1626
1019
  return ParametricCut2;
1627
1020
  })(ParametricCut || {});
1628
1021
  var STAGE = 1.02;
1629
- var ParametricSurface = (_class10 = class extends SurfaceBase {
1022
+ var ParametricSurface = (_class8 = class extends _chunkSYABFMD7cjs.SurfaceBase {
1630
1023
  static __initStatic8() {this.meta = {
1631
1024
  id: "parametric-surface",
1632
1025
  name: "Parametric surface",
@@ -1635,7 +1028,7 @@ var ParametricSurface = (_class10 = class extends SurfaceBase {
1635
1028
  shape: "function" /* Function */,
1636
1029
  description: "Maps a grid onto a parametric solid such as a torus, M\xF6bius strip, Klein bottle or sphere, colouring or displacing the skin by value.",
1637
1030
  tags: ["torus", "mobius", "klein", "sphere", "knot", "minimal surface", "periodic"],
1638
- sample: (seed) => _chunkUMEKIIHJcjs.SampleData.surface(seed, 36),
1031
+ sample: (seed) => _chunkLNWTC72Ycjs.SampleData.surface(seed, 36),
1639
1032
  variants: {
1640
1033
  form: Object.values(ParametricSurfaceForm),
1641
1034
  displace: [false, true],
@@ -1660,7 +1053,7 @@ var ParametricSurface = (_class10 = class extends SurfaceBase {
1660
1053
  const { form, definition, displace, cut, lines, data, x, y, z } = this.options;
1661
1054
  const shape = _nullishCoalesce(definition, () => ( PARAMETRIC_FORMS[form]));
1662
1055
  const fit = this.fit(shape);
1663
- const field = SurfaceField.from(data, { x, y, z }).capped(80);
1056
+ const field = _chunkSYABFMD7cjs.SurfaceField.from(data, { x, y, z }).capped(80);
1664
1057
  const paint = this.painter(ctx, field.zDomain);
1665
1058
  const nu = 180, nv = 72;
1666
1059
  const [u0, u1] = shape.u, [v0, v1] = shape.v;
@@ -1706,12 +1099,12 @@ var ParametricSurface = (_class10 = class extends SurfaceBase {
1706
1099
  const tick = [[-1, ""], [-0.5, ""], [0, ""], [0.5, ""], [1, ""]];
1707
1100
  this.box(ctx, { x: tick, y: tick, z: [] }, { walls: false, bottom: -1.05 });
1708
1101
  const group4 = this.bloom(ctx);
1709
- this.solid(ctx, SurfaceGeometry.compact(geometry), group4, (k) => {
1102
+ this.solid(ctx, _chunkSYABFMD7cjs.SurfaceGeometry.compact(geometry), group4, (k) => {
1710
1103
  const i = k % nu, j = Math.floor(k / nu);
1711
1104
  return { rows: [["u", short(uAt(i))], ["v", short(vAt(j))], ["value", short(read(i, j))]] };
1712
1105
  });
1713
1106
  if (lines) {
1714
- const batch = new TubeBatch(42e-4);
1107
+ const batch = new (0, _chunkSYABFMD7cjs.TubeBatch)(42e-4);
1715
1108
  for (let i = 0; i < nu; i += 15) if (keep(Math.min(i, nu - 2))) batch.add(Array.from({ length: nv }, (_, j) => vertex(i, j)));
1716
1109
  for (let j = 0; j < nv; j += 12) {
1717
1110
  const path = Array.from({ length: nu }, (_, i) => keep(Math.min(i, nu - 2)) ? vertex(i, j) : [NaN, NaN, NaN]);
@@ -1720,7 +1113,7 @@ var ParametricSurface = (_class10 = class extends SurfaceBase {
1720
1113
  this.tubes(batch, group4, ctx.theme.surface, 0.75);
1721
1114
  }
1722
1115
  }
1723
- }, _class10.__initStatic8(), _class10);
1116
+ }, _class8.__initStatic8(), _class8);
1724
1117
 
1725
1118
  // src/charts/threesurfaces/PhaseSurface.ts
1726
1119
 
@@ -1756,7 +1149,7 @@ var SYSTEMS = {
1756
1149
  },
1757
1150
  ["damped-oscillator" /* Damped */]: { x: [-2.4, 2.4], y: [-2.4, 2.4], flow: (q, p) => [p, -q - 0.28 * p], height: (q, p) => (p * p + q * q) / 2 }
1758
1151
  };
1759
- var PhaseSurface = (_class11 = class extends GridSurfaceBase {
1152
+ var PhaseSurface = (_class9 = class extends GridSurfaceBase {
1760
1153
  static __initStatic9() {this.meta = {
1761
1154
  id: "phase-surface",
1762
1155
  name: "Phase surface",
@@ -1765,7 +1158,7 @@ var PhaseSurface = (_class11 = class extends GridSurfaceBase {
1765
1158
  shape: "function" /* Function */,
1766
1159
  description: "Lifts a two-dimensional dynamical system onto its energy surface and traces trajectories across it, or runs downhill on your own potential.",
1767
1160
  tags: ["phase portrait", "dynamical system", "energy", "potential", "streamlines", "limit cycle"],
1768
- sample: (seed) => _chunkUMEKIIHJcjs.SampleData.surface(seed, 48),
1161
+ sample: (seed) => _chunkLNWTC72Ycjs.SampleData.surface(seed, 48),
1769
1162
  variants: {
1770
1163
  system: Object.values(PhaseSurfaceSystem),
1771
1164
  marks: ["trajectories" /* Trajectories */, "arrows" /* Arrows */, "trajectories-and-arrows" /* Both */],
@@ -1826,18 +1219,18 @@ var PhaseSurface = (_class11 = class extends GridSurfaceBase {
1826
1219
  const { x: [x0, x1], y: [y0, y1] } = system;
1827
1220
  const n = 72;
1828
1221
  const axisX = Array.from({ length: n }, (_, k) => x0 + (x1 - x0) * k / (n - 1)), axisY = Array.from({ length: n }, (_, k) => y0 + (y1 - y0) * k / (n - 1));
1829
- const field = SurfaceField.compute(axisX, axisY, system.height);
1830
- const space = new SurfaceSpace(field);
1222
+ const field = _chunkSYABFMD7cjs.SurfaceField.compute(axisX, axisY, system.height);
1223
+ const space = new (0, _chunkSYABFMD7cjs.SurfaceSpace)(field);
1831
1224
  const paint = this.painter(ctx, field.zDomain);
1832
1225
  this.box(ctx, this.axes(space));
1833
1226
  const lift = this.rise(ctx);
1834
- this.solid(ctx, SurfaceGeometry.grid(n, n, (i, j) => space.at(i, j), (i, j) => paint(field.at(i, j))), lift, this.gridTip(space));
1227
+ this.solid(ctx, _chunkSYABFMD7cjs.SurfaceGeometry.grid(n, n, (i, j) => space.at(i, j), (i, j) => paint(field.at(i, j))), lift, this.gridTip(space));
1835
1228
  if (!field.hasData) return;
1836
1229
  const toWorld = ([x, y], rise = 0.012) => space.at((x - x0) / (x1 - x0 || 1) * (n - 1), (y - y0) / (y1 - y0 || 1) * (n - 1), rise);
1837
1230
  const seeds = this.seeds(system);
1838
1231
  const paths = seeds.map((seed) => this.trace(system, seed).map((point) => toWorld(point)));
1839
1232
  if (marks !== "arrows" /* Arrows */) {
1840
- const batch = new TubeBatch(65e-4);
1233
+ const batch = new (0, _chunkSYABFMD7cjs.TubeBatch)(65e-4);
1841
1234
  for (const path of paths) batch.add(path);
1842
1235
  this.tubes(batch, lift, ctx.theme.ink, 0.85);
1843
1236
  this.runners(ctx, paths, lift);
@@ -1882,7 +1275,7 @@ var PhaseSurface = (_class11 = class extends GridSurfaceBase {
1882
1275
  return { rows: [["speed", short(Math.hypot(u, v))]] };
1883
1276
  });
1884
1277
  }
1885
- }, _class11.__initStatic9(), _class11);
1278
+ }, _class9.__initStatic9(), _class9);
1886
1279
 
1887
1280
  // src/charts/threesurfaces/PolarSurface.ts
1888
1281
  var FACING = 38 * Math.PI / 180;
@@ -1891,7 +1284,7 @@ var PolarAngleAxis = /* @__PURE__ */ ((PolarAngleAxis2) => {
1891
1284
  PolarAngleAxis2["Y"] = "angle-from-y";
1892
1285
  return PolarAngleAxis2;
1893
1286
  })(PolarAngleAxis || {});
1894
- var PolarSurface = (_class12 = class extends GridSurfaceBase {
1287
+ var PolarSurface = (_class10 = class extends GridSurfaceBase {
1895
1288
  static __initStatic10() {this.meta = {
1896
1289
  id: "polar-surface",
1897
1290
  name: "Polar surface",
@@ -1900,7 +1293,7 @@ var PolarSurface = (_class12 = class extends GridSurfaceBase {
1900
1293
  shape: "grid" /* Grid */,
1901
1294
  description: "Wraps a height field around a disc, annulus or sector, with one grid axis as angle and the other as radius.",
1902
1295
  tags: ["polar", "radial", "disc", "antenna pattern", "annulus"],
1903
- sample: (seed) => _chunkUMEKIIHJcjs.SampleData.surface(seed, 48),
1296
+ sample: (seed) => _chunkLNWTC72Ycjs.SampleData.surface(seed, 48),
1904
1297
  variants: {
1905
1298
  sweep: [360, 270, 180],
1906
1299
  hole: [0.18, 0, 0.45],
@@ -1914,32 +1307,32 @@ var PolarSurface = (_class12 = class extends GridSurfaceBase {
1914
1307
  }
1915
1308
  rings(ctx, space, parent) {
1916
1309
  const { hole, sweep } = this.options;
1917
- const batch = new TubeBatch(3e-3, 4);
1310
+ const batch = new (0, _chunkSYABFMD7cjs.TubeBatch)(3e-3, 4);
1918
1311
  for (const radius of [hole, ...[0.25, 0.5, 0.75, 1].filter((r) => r > hole)]) {
1919
1312
  if (!radius) continue;
1920
1313
  batch.add(Array.from({ length: 73 }, (_, k) => {
1921
1314
  const [x, z] = space.polar(k / 72, radius);
1922
- return [x, FLOOR + 2e-3, z];
1315
+ return [x, _chunkSYABFMD7cjs.FLOOR + 2e-3, z];
1923
1316
  }));
1924
1317
  }
1925
1318
  for (let k = 0; k <= 8; k++) {
1926
1319
  if (sweep === 360 && k === 8) continue;
1927
1320
  const [a, b] = space.polar(k / 8, Math.max(hole, 1e-3)), [c, d] = space.polar(k / 8, 1);
1928
- batch.add([[a, FLOOR + 2e-3, b], [c, FLOOR + 2e-3, d]]);
1321
+ batch.add([[a, _chunkSYABFMD7cjs.FLOOR + 2e-3, b], [c, _chunkSYABFMD7cjs.FLOOR + 2e-3, d]]);
1929
1322
  }
1930
1323
  this.tubes(batch, parent, ctx.theme.axis);
1931
1324
  }
1932
1325
  build(ctx) {
1933
1326
  const { sweep, hole, overlay, angle, solidBase } = this.options;
1934
1327
  const field = this.field();
1935
- const space = new PolarSurfaceSpace(field, "linear" /* Linear */, sweep, hole, angle === "angle-from-y" /* Y */);
1328
+ const space = new (0, _chunkSYABFMD7cjs.PolarSurfaceSpace)(field, "linear" /* Linear */, sweep, hole, angle === "angle-from-y" /* Y */);
1936
1329
  const paint = this.painter(ctx, field.zDomain);
1937
1330
  this.box(ctx, { x: [], y: [], z: this.ticks(field.zDomain, space.level, 3) }, { walls: false, outline: false });
1938
1331
  this.rings(ctx, space, ctx.root);
1939
1332
  const lift = this.rise(ctx);
1940
1333
  const closed = sweep === 360;
1941
1334
  const wrap = closed ? angle === "angle-from-x" /* X */ ? { x: true } : { y: true } : {};
1942
- this.solid(ctx, SurfaceGeometry.grid(field.nx, field.ny, (i, j) => space.at(i, j), (i, j) => paint(field.at(i, j)), wrap), lift, this.gridTip(space));
1335
+ this.solid(ctx, _chunkSYABFMD7cjs.SurfaceGeometry.grid(field.nx, field.ny, (i, j) => space.at(i, j), (i, j) => paint(field.at(i, j)), wrap), lift, this.gridTip(space));
1943
1336
  if (solidBase) this.skirt(ctx, space, paint, lift, closed ? angle === "angle-from-x" /* X */ ? [0, 2] : [1, 3] : [0, 1, 2, 3], closed);
1944
1337
  if (overlay === "mesh-lines" /* Mesh */) this.meshLines(ctx, space, lift);
1945
1338
  if (overlay === "contour-lines" /* Contours */) this.contourLines(ctx, space, lift);
@@ -1947,10 +1340,10 @@ var PolarSurface = (_class12 = class extends GridSurfaceBase {
1947
1340
  for (const [turn, text] of this.ticks(domain, (v) => (v - domain[0]) / (domain[1] - domain[0] || 1), 6)) {
1948
1341
  if (closed && turn >= 0.99) continue;
1949
1342
  const [x, z] = space.polar(turn, 1.1);
1950
- if (x * Math.sin(FACING) + z * Math.cos(FACING) > -0.2) ctx.label(text, [x, FLOOR, z], "muted", 10);
1343
+ if (x * Math.sin(FACING) + z * Math.cos(FACING) > -0.2) ctx.label(text, [x, _chunkSYABFMD7cjs.FLOOR, z], "muted", 10);
1951
1344
  }
1952
1345
  }
1953
- }, _class12.__initStatic10(), _class12);
1346
+ }, _class10.__initStatic10(), _class10);
1954
1347
 
1955
1348
  // src/charts/threesurfaces/RibbonSurface.ts
1956
1349
 
@@ -1974,7 +1367,7 @@ var RibbonLayout = /* @__PURE__ */ ((RibbonLayout2) => {
1974
1367
  return RibbonLayout2;
1975
1368
  })(RibbonLayout || {});
1976
1369
  var toNumber = (cell) => cell instanceof Date ? cell.getTime() : cell === null || cell === void 0 || cell === "" ? NaN : +cell;
1977
- var RibbonSurface = (_class13 = class extends SurfaceBase {
1370
+ var RibbonSurface = (_class11 = class extends _chunkSYABFMD7cjs.SurfaceBase {
1978
1371
  static __initStatic11() {this.meta = {
1979
1372
  id: "ribbon-surface",
1980
1373
  name: "Ribbon surface",
@@ -1983,7 +1376,7 @@ var RibbonSurface = (_class13 = class extends SurfaceBase {
1983
1376
  shape: "table" /* Table */,
1984
1377
  description: "Lays each series out as a ribbon in depth, as strips, curtains, tubes or slabs, so tangled lines separate.",
1985
1378
  tags: ["ribbon", "time series", "lanes", "bump"],
1986
- sample: (seed) => _chunkUMEKIIHJcjs.SampleData.timeSeries(seed, 72, 6),
1379
+ sample: (seed) => _chunkLNWTC72Ycjs.SampleData.timeSeries(seed, 72, 6),
1987
1380
  variants: {
1988
1381
  form: ["curtain" /* Curtain */, "strip" /* Strip */, "tube" /* Tube */, "slab" /* Slab */],
1989
1382
  smoothing: ["moving-average" /* Average */, "raw" /* None */, "spline" /* Spline */],
@@ -2036,9 +1429,9 @@ var RibbonSurface = (_class13 = class extends SurfaceBase {
2036
1429
  const highest = _nullishCoalesce(_d3.max.call(void 0, lanes, (lane2) => _d3.max.call(void 0, lane2.ys)), () => ( 1));
2037
1430
  const sx = _d3.scaleLinear.call(void 0, [x0, x1 > x0 ? x1 : x0 + 1], [-1, 1]);
2038
1431
  const sz = _d3.scalePoint.call(void 0, lanes.map((lane2) => lane2.name), [0.86, -0.86]).padding(0.1);
2039
- const sy = _d3.scaleLinear.call(void 0, [lowest, highest > lowest ? highest : lowest + 1], [FLOOR, CEIL]);
1432
+ const sy = _d3.scaleLinear.call(void 0, [lowest, highest > lowest ? highest : lowest + 1], [_chunkSYABFMD7cjs.FLOOR, _chunkSYABFMD7cjs.CEIL]);
2040
1433
  const lane = lanes.length > 1 ? sz.step() || 0.4 : 0.4;
2041
- const timed = _optionalChain([rows, 'access', _23 => _23[0], 'optionalAccess', _24 => _24[x]]) instanceof Date;
1434
+ const timed = _optionalChain([rows, 'access', _11 => _11[0], 'optionalAccess', _12 => _12[x]]) instanceof Date;
2042
1435
  const time = _d3.scaleUtc.call(void 0, [x0, x1], [-1, 1]);
2043
1436
  const xTicks = timed ? time.ticks(4).map((d) => [time(d), _d3.utcFormat.call(void 0, "%b %-d")(d)]) : this.ticks([x0, x1 > x0 ? x1 : x0 + 1], sx);
2044
1437
  const yTicks = lanes.map(({ name }) => [_nullishCoalesce(sz(name), () => ( 0)), name]);
@@ -2051,17 +1444,17 @@ var RibbonSurface = (_class13 = class extends SurfaceBase {
2051
1444
  const i = Math.min(raw.length - 1, k % raw.length);
2052
1445
  return { title: name, color: ctx.palette.color(name), rows: [[y, short(toNumber(raw[i][y]))]] };
2053
1446
  };
2054
- if (form === "tube" /* Tube */) return void this.tubes(new TubeBatch(0.017, 7).add(top, color), lift);
1447
+ if (form === "tube" /* Tube */) return void this.tubes(new (0, _chunkSYABFMD7cjs.TubeBatch)(0.017, 7).add(top, color), lift);
2055
1448
  if (form === "curtain" /* Curtain */) {
2056
- this.solid(ctx, SurfaceGeometry.curtain(top, FLOOR, () => color, () => deep), lift, tip);
2057
- return void this.tubes(new TubeBatch(75e-4).add(top, color), lift);
1449
+ this.solid(ctx, _chunkSYABFMD7cjs.SurfaceGeometry.curtain(top, _chunkSYABFMD7cjs.FLOOR, () => color, () => deep), lift, tip);
1450
+ return void this.tubes(new (0, _chunkSYABFMD7cjs.TubeBatch)(75e-4).add(top, color), lift);
2058
1451
  }
2059
1452
  const width = lane * 0.62;
2060
- if (form === "slab" /* Slab */) return void this.solid(ctx, SurfaceGeometry.slab(top, [0, width], FLOOR, () => color, () => deep), lift, tip);
2061
- this.solid(ctx, SurfaceGeometry.grid(top.length, 2, (k, side) => [top[k][0], top[k][1], z + (side - 0.5) * width], () => color), lift, tip);
1453
+ if (form === "slab" /* Slab */) return void this.solid(ctx, _chunkSYABFMD7cjs.SurfaceGeometry.slab(top, [0, width], _chunkSYABFMD7cjs.FLOOR, () => color, () => deep), lift, tip);
1454
+ this.solid(ctx, _chunkSYABFMD7cjs.SurfaceGeometry.grid(top.length, 2, (k, side) => [top[k][0], top[k][1], z + (side - 0.5) * width], () => color), lift, tip);
2062
1455
  });
2063
1456
  }
2064
- }, _class13.__initStatic11(), _class13);
1457
+ }, _class11.__initStatic11(), _class11);
2065
1458
 
2066
1459
  // src/charts/threesurfaces/Ridgeline3DChart.ts
2067
1460
 
@@ -2087,7 +1480,7 @@ var Ridge3DOrder = /* @__PURE__ */ ((Ridge3DOrder2) => {
2087
1480
  Ridge3DOrder2["Mean"] = "by-mean";
2088
1481
  return Ridge3DOrder2;
2089
1482
  })(Ridge3DOrder || {});
2090
- var Ridgeline3DChart = (_class14 = class extends SurfaceBase {
1483
+ var Ridgeline3DChart = (_class12 = class extends _chunkSYABFMD7cjs.SurfaceBase {
2091
1484
  static __initStatic12() {this.meta = {
2092
1485
  id: "ridgeline-3d",
2093
1486
  name: "3D ridgeline",
@@ -2096,7 +1489,7 @@ var Ridgeline3DChart = (_class14 = class extends SurfaceBase {
2096
1489
  shape: "table" /* Table */,
2097
1490
  description: "Places one density profile per group along the depth axis, so shifts in shape and spread read as a range of ridges.",
2098
1491
  tags: ["joyplot", "ridgeline", "density", "kde", "histogram"],
2099
- sample: (seed) => _chunkUMEKIIHJcjs.SampleData.distribution(seed, 180, 7),
1492
+ sample: (seed) => _chunkLNWTC72Ycjs.SampleData.distribution(seed, 180, 7),
2100
1493
  variants: {
2101
1494
  profile: ["kernel" /* Kernel */, "histogram" /* Histogram */],
2102
1495
  mark: ["slab" /* Slab */, "fin" /* Fin */, "tube" /* Tube */, "terrain" /* Terrain */],
@@ -2136,34 +1529,34 @@ var Ridgeline3DChart = (_class14 = class extends SurfaceBase {
2136
1529
  const sz = _d3.scalePoint.call(void 0, groups.map(({ name }) => name), [-0.85, 0.85]).padding(0.1);
2137
1530
  const curves = groups.map(({ name, values }) => ({ name, values, curve: this.density(values, domain) }));
2138
1531
  const overall = _nullishCoalesce(_d3.max.call(void 0, curves, ({ curve }) => _d3.max.call(void 0, curve, ([, y]) => y)), () => ( 1));
2139
- const height = (peak) => scaling === "peak" /* Peak */ ? (CEIL - FLOOR) * 0.85 / (peak || 1) : (CEIL - FLOOR) * 0.85 / (overall || 1);
1532
+ const height = (peak) => scaling === "peak" /* Peak */ ? (_chunkSYABFMD7cjs.CEIL - _chunkSYABFMD7cjs.FLOOR) * 0.85 / (peak || 1) : (_chunkSYABFMD7cjs.CEIL - _chunkSYABFMD7cjs.FLOOR) * 0.85 / (overall || 1);
2140
1533
  this.box(ctx, { x: this.ticks(domain, sx), y: curves.map(({ name }) => [_nullishCoalesce(sz(name), () => ( 0)), name]), z: [] });
2141
1534
  const lift = this.rise(ctx);
2142
1535
  const depth = (curves.length > 1 ? sz.step() : 0.3) * 0.46;
2143
1536
  if (mark === "terrain" /* Terrain */ && curves.length > 1) {
2144
1537
  const across = curves[0].curve.length, top = height(overall);
2145
- const place = (i, j) => [sx(curves[j].curve[i][0]), FLOOR + curves[j].curve[i][1] * height(_nullishCoalesce(_d3.max.call(void 0, curves[j].curve, ([, y]) => y), () => ( 1))), _nullishCoalesce(sz(curves[j].name), () => ( 0))];
2146
- const paint = (i, j) => ctx.color(ctx.palette.sequential(0.15 + 0.85 * Math.min(1, curves[j].curve[i][1] * top / (CEIL - FLOOR))));
2147
- this.solid(ctx, SurfaceGeometry.grid(across, curves.length, place, paint), lift, () => ({ title: this.meta.name, rows: [["Groups", curves.length]] }));
1538
+ const place = (i, j) => [sx(curves[j].curve[i][0]), _chunkSYABFMD7cjs.FLOOR + curves[j].curve[i][1] * height(_nullishCoalesce(_d3.max.call(void 0, curves[j].curve, ([, y]) => y), () => ( 1))), _nullishCoalesce(sz(curves[j].name), () => ( 0))];
1539
+ const paint = (i, j) => ctx.color(ctx.palette.sequential(0.15 + 0.85 * Math.min(1, curves[j].curve[i][1] * top / (_chunkSYABFMD7cjs.CEIL - _chunkSYABFMD7cjs.FLOOR))));
1540
+ this.solid(ctx, _chunkSYABFMD7cjs.SurfaceGeometry.grid(across, curves.length, place, paint), lift, () => ({ title: this.meta.name, rows: [["Groups", curves.length]] }));
2148
1541
  return;
2149
1542
  }
2150
1543
  curves.forEach(({ name, values, curve }) => {
2151
1544
  const peak = _nullishCoalesce(_d3.max.call(void 0, curve, ([, y]) => y), () => ( 1)), scale = height(peak), z = _nullishCoalesce(sz(name), () => ( 0));
2152
1545
  const color = ctx.color(ctx.palette.color(name)), pale = color.clone().lerp(ctx.color(ctx.theme.surface), 0.5);
2153
- const kept = curve.filter(([, y], k) => Math.max(y, _nullishCoalesce(_optionalChain([curve, 'access', _25 => _25[k - 1], 'optionalAccess', _26 => _26[1]]), () => ( 0)), _nullishCoalesce(_optionalChain([curve, 'access', _27 => _27[k + 1], 'optionalAccess', _28 => _28[1]]), () => ( 0))) * scale > 4e-3);
2154
- const top = (kept.length > 1 ? kept : curve).map(([x, y]) => [sx(x), FLOOR + y * scale, z]);
1546
+ const kept = curve.filter(([, y], k) => Math.max(y, _nullishCoalesce(_optionalChain([curve, 'access', _13 => _13[k - 1], 'optionalAccess', _14 => _14[1]]), () => ( 0)), _nullishCoalesce(_optionalChain([curve, 'access', _15 => _15[k + 1], 'optionalAccess', _16 => _16[1]]), () => ( 0))) * scale > 4e-3);
1547
+ const top = (kept.length > 1 ? kept : curve).map(([x, y]) => [sx(x), _chunkSYABFMD7cjs.FLOOR + y * scale, z]);
2155
1548
  const tip = () => ({ title: name, color: ctx.palette.color(name), rows: [["n", values.length], ["mean", short(_nullishCoalesce(_d3.mean.call(void 0, values), () => ( 0)))]] });
2156
- if (mark === "slab" /* Slab */ || mark === "terrain" /* Terrain */) this.solid(ctx, SurfaceGeometry.slab(top, [0, depth], FLOOR, () => color, () => pale), lift, tip);
2157
- if (mark === "fin" /* Fin */) this.solid(ctx, SurfaceGeometry.curtain(top, FLOOR, () => color, () => pale), lift, tip);
2158
- if (mark !== "slab" /* Slab */) this.tubes(new TubeBatch(mark === "tube" /* Tube */ ? 0.014 : 75e-4, 6).add(top, color), lift);
1549
+ if (mark === "slab" /* Slab */ || mark === "terrain" /* Terrain */) this.solid(ctx, _chunkSYABFMD7cjs.SurfaceGeometry.slab(top, [0, depth], _chunkSYABFMD7cjs.FLOOR, () => color, () => pale), lift, tip);
1550
+ if (mark === "fin" /* Fin */) this.solid(ctx, _chunkSYABFMD7cjs.SurfaceGeometry.curtain(top, _chunkSYABFMD7cjs.FLOOR, () => color, () => pale), lift, tip);
1551
+ if (mark !== "slab" /* Slab */) this.tubes(new (0, _chunkSYABFMD7cjs.TubeBatch)(mark === "tube" /* Tube */ ? 0.014 : 75e-4, 6).add(top, color), lift);
2159
1552
  if (rug) {
2160
- const ticks = new TubeBatch(35e-4, 4), front = z + (mark === "slab" /* Slab */ ? depth / 2 + 6e-3 : 6e-3);
2161
- for (const v of values.slice(0, 90)) ticks.add([[sx(v), FLOOR + 2e-3, front], [sx(v), FLOOR + 0.05, front]], color);
1553
+ const ticks = new (0, _chunkSYABFMD7cjs.TubeBatch)(35e-4, 4), front = z + (mark === "slab" /* Slab */ ? depth / 2 + 6e-3 : 6e-3);
1554
+ for (const v of values.slice(0, 90)) ticks.add([[sx(v), _chunkSYABFMD7cjs.FLOOR + 2e-3, front], [sx(v), _chunkSYABFMD7cjs.FLOOR + 0.05, front]], color);
2162
1555
  this.tubes(ticks, lift);
2163
1556
  }
2164
1557
  });
2165
1558
  }
2166
- }, _class14.__initStatic12(), _class14);
1559
+ }, _class12.__initStatic12(), _class12);
2167
1560
 
2168
1561
  // src/charts/threesurfaces/SaddleSurface.ts
2169
1562
 
@@ -2199,10 +1592,10 @@ function solve(a, b) {
2199
1592
  return m.map((row, i) => Math.abs(row[i]) < 1e-12 ? 0 : row[n] / row[i]);
2200
1593
  }
2201
1594
  var saddleSample = (seed) => {
2202
- const grid = _chunkUMEKIIHJcjs.SampleData.surface(seed, 13);
1595
+ const grid = _chunkLNWTC72Ycjs.SampleData.surface(seed, 13);
2203
1596
  return { ...grid, z: grid.z.map((row, j) => row.map((value, i) => 0.9 * (grid.x[i] ** 2 - grid.y[j] ** 2) + 0.28 * grid.x[i] * grid.y[j] + 0.16 * value)) };
2204
1597
  };
2205
- var SaddleSurface = (_class15 = class extends GridSurfaceBase {
1598
+ var SaddleSurface = (_class13 = class extends GridSurfaceBase {
2206
1599
  static __initStatic13() {this.meta = {
2207
1600
  id: "saddle-surface",
2208
1601
  name: "Saddle surface",
@@ -2250,15 +1643,15 @@ var SaddleSurface = (_class15 = class extends GridSurfaceBase {
2250
1643
  const footprintAt = (u, v) => disc ? [u * Math.sqrt(1 - v * v / 2), v * Math.sqrt(1 - u * u / 2)] : [u, v];
2251
1644
  const heights = grid.flatMap((v) => grid.map((u) => predict(...footprintAt(u, v))));
2252
1645
  const domain = observations ? [Math.min(...heights, data.zDomain[0]), Math.max(...heights, data.zDomain[1])] : data.zDomain;
2253
- const level = _d3.scaleLinear.call(void 0, domain, [FLOOR, CEIL]);
1646
+ const level = _d3.scaleLinear.call(void 0, domain, [_chunkSYABFMD7cjs.FLOOR, _chunkSYABFMD7cjs.CEIL]);
2254
1647
  const paint = this.painter(ctx, domain);
2255
1648
  const world = (x, y, z = predict(x, y)) => [x, level(z), -y];
2256
- this.box(ctx, { ...this.axes(new SurfaceSpace(data)), z: this.ticks(domain, level, 3) });
1649
+ this.box(ctx, { ...this.axes(new (0, _chunkSYABFMD7cjs.SurfaceSpace)(data)), z: this.ticks(domain, level, 3) });
2257
1650
  const lift = this.rise(ctx);
2258
- this.solid(ctx, SurfaceGeometry.grid(n, n, (i, j) => observations ? world(...footprintAt(grid[i], grid[j])) : [NaN, NaN, NaN], (i, j) => paint(heights[i + j * n])), lift, (k) => ({ rows: [["fitted", short(heights[k])]] }));
1651
+ this.solid(ctx, _chunkSYABFMD7cjs.SurfaceGeometry.grid(n, n, (i, j) => observations ? world(...footprintAt(grid[i], grid[j])) : [NaN, NaN, NaN], (i, j) => paint(heights[i + j * n])), lift, (k) => ({ rows: [["fitted", short(heights[k])]] }));
2259
1652
  if (!observations) return;
2260
1653
  if (residuals) {
2261
- const stems = new TubeBatch(28e-4), points = [], gaps = [];
1654
+ const stems = new (0, _chunkSYABFMD7cjs.TubeBatch)(28e-4), points = [], gaps = [];
2262
1655
  for (let j = 0; j < data.ny; j++) for (let i = 0; i < data.nx; i++) {
2263
1656
  const z = data.at(i, j), x = toX(data.x[i]), y = toY(data.y[j]);
2264
1657
  if (Number.isNaN(z) || disc && Math.hypot(x, y) > 1) continue;
@@ -2292,7 +1685,7 @@ var SaddleSurface = (_class15 = class extends GridSurfaceBase {
2292
1685
  const angle = 0.5 * Math.atan2(2 * xy, xx - yy), mean2 = (xx + yy) / 2, spread2 = Math.hypot((xx - yy) / 2, xy);
2293
1686
  const curvatures = [mean2 + spread2, mean2 - spread2];
2294
1687
  const limit = (px, py) => Math.abs(px) <= 1 && Math.abs(py) <= 1 && (!disc || Math.hypot(px, py) <= 1);
2295
- const batch = new TubeBatch(0.011, 6);
1688
+ const batch = new (0, _chunkSYABFMD7cjs.TubeBatch)(0.011, 6);
2296
1689
  curvatures.forEach((curvature, k) => {
2297
1690
  const dir = angle + k * Math.PI / 2, path = [];
2298
1691
  for (let t = -2.8; t <= 2.8; t += 0.04) {
@@ -2307,7 +1700,7 @@ var SaddleSurface = (_class15 = class extends GridSurfaceBase {
2307
1700
  this.dots(ctx, [centre], 0.03, () => ctx.color(ctx.theme.ink), lift, () => ({ title: kind, rows: [["value", short(f(x, y))]] }));
2308
1701
  ctx.label(kind, [centre[0], Math.min(centre[1] + 0.5, 1), centre[2]], "ink", 11);
2309
1702
  }
2310
- }, _class15.__initStatic13(), _class15);
1703
+ }, _class13.__initStatic13(), _class13);
2311
1704
 
2312
1705
  // src/charts/threesurfaces/SliceSurface.ts
2313
1706
  var SliceAxis = /* @__PURE__ */ ((SliceAxis2) => {
@@ -2322,7 +1715,7 @@ var SliceMark = /* @__PURE__ */ ((SliceMark2) => {
2322
1715
  SliceMark2["Outline"] = "outline";
2323
1716
  return SliceMark2;
2324
1717
  })(SliceMark || {});
2325
- var SliceSurface = (_class16 = class extends GridSurfaceBase {
1718
+ var SliceSurface = (_class14 = class extends GridSurfaceBase {
2326
1719
  static __initStatic14() {this.meta = {
2327
1720
  id: "slice-surface",
2328
1721
  name: "Slice surface",
@@ -2331,7 +1724,7 @@ var SliceSurface = (_class16 = class extends GridSurfaceBase {
2331
1724
  shape: "grid" /* Grid */,
2332
1725
  description: "Sections a height field into separated parallel or radial slices, so individual cross-sections can be read.",
2333
1726
  tags: ["cross section", "fence diagram", "sections", "joy division", "laser cut"],
2334
- sample: (seed) => _chunkUMEKIIHJcjs.SampleData.surface(seed, 64),
1727
+ sample: (seed) => _chunkLNWTC72Ycjs.SampleData.surface(seed, 64),
2335
1728
  variants: {
2336
1729
  axis: ["along-depth" /* Depth */, "along-width" /* Width */, "radial" /* Radial */],
2337
1730
  mark: ["plate" /* Plate */, "fin" /* Fin */, "outline" /* Outline */],
@@ -2344,14 +1737,14 @@ var SliceSurface = (_class16 = class extends GridSurfaceBase {
2344
1737
  build(ctx) {
2345
1738
  const { axis, mark, slices } = this.options;
2346
1739
  const field = this.field();
2347
- const space = new SurfaceSpace(field);
1740
+ const space = new (0, _chunkSYABFMD7cjs.SurfaceSpace)(field);
2348
1741
  const paint = this.painter(ctx, field.zDomain);
2349
1742
  this.box(ctx, this.axes(space));
2350
1743
  const lift = this.rise(ctx);
2351
1744
  if (!field.hasData) return;
2352
1745
  const count = slices, samples = 72;
2353
1746
  const low = paint(field.zDomain[0]);
2354
- const outline = new TubeBatch(mark === "outline" /* Outline */ ? 85e-4 : 42e-4);
1747
+ const outline = new (0, _chunkSYABFMD7cjs.TubeBatch)(mark === "outline" /* Outline */ ? 85e-4 : 42e-4);
2355
1748
  const profiles = Array.from({ length: count }, (_, s) => {
2356
1749
  const t = (s + 0.5) / count;
2357
1750
  const read = (k) => {
@@ -2372,13 +1765,13 @@ var SliceSurface = (_class16 = class extends GridSurfaceBase {
2372
1765
  const heat = (k) => paint(field.sample(...profile[k]));
2373
1766
  const angle = (s + 0.5) / count * Math.PI;
2374
1767
  const across = axis === "along-depth" /* Depth */ ? [0, thickness] : axis === "along-width" /* Width */ ? [thickness, 0] : [Math.sin(angle) * thickness, Math.cos(angle) * thickness];
2375
- if (mark === "plate" /* Plate */) this.solid(ctx, SurfaceGeometry.slab(top, across, FLOOR, heat, () => low), lift);
2376
- if (mark === "fin" /* Fin */) this.solid(ctx, SurfaceGeometry.curtain(top, FLOOR, heat, () => low), lift);
1768
+ if (mark === "plate" /* Plate */) this.solid(ctx, _chunkSYABFMD7cjs.SurfaceGeometry.slab(top, across, _chunkSYABFMD7cjs.FLOOR, heat, () => low), lift);
1769
+ if (mark === "fin" /* Fin */) this.solid(ctx, _chunkSYABFMD7cjs.SurfaceGeometry.curtain(top, _chunkSYABFMD7cjs.FLOOR, heat, () => low), lift);
2377
1770
  if (mark !== "plate" /* Plate */) outline.add(top, heat);
2378
1771
  });
2379
1772
  this.tubes(outline, lift);
2380
1773
  }
2381
- }, _class16.__initStatic14(), _class16);
1774
+ }, _class14.__initStatic14(), _class14);
2382
1775
 
2383
1776
  // src/charts/threesurfaces/ShortTimeTransform.ts
2384
1777
  var SpectrogramWindow = /* @__PURE__ */ ((SpectrogramWindow2) => {
@@ -2417,7 +1810,7 @@ var ShortTimeTransform = class {
2417
1810
  }
2418
1811
  /** The sample walk carrying a rising chirp and a steady tone, so its spectrum has something to show. */
2419
1812
  static sampleSignal(seed, points = 600) {
2420
- const rows = _chunkUMEKIIHJcjs.SampleData.timeSeries(seed, points, 1);
1813
+ const rows = _chunkLNWTC72Ycjs.SampleData.timeSeries(seed, points, 1);
2421
1814
  return rows.map((row, t) => {
2422
1815
  const u = t / points, chirp = Math.sin(2 * Math.PI * (0.05 * t + 0.185 * t * u)), tone = 0.6 * Math.sin(2 * Math.PI * 0.09 * t) * (u < 0.65 ? 1 : 0.15);
2423
1816
  return { ...row, value: +(chirp * (0.5 + 0.5 * Math.sin(u * 9) ** 2) + tone + row.value * 2e-3).toFixed(4) };
@@ -2437,7 +1830,7 @@ var SpectrumAmplitude = /* @__PURE__ */ ((SpectrumAmplitude2) => {
2437
1830
  SpectrumAmplitude2["Decibel"] = "decibel";
2438
1831
  return SpectrumAmplitude2;
2439
1832
  })(SpectrumAmplitude || {});
2440
- var Waterfall3DSpectrum = (_class17 = class extends GridSurfaceBase {
1833
+ var Waterfall3DSpectrum = (_class15 = class extends GridSurfaceBase {
2441
1834
  static __initStatic15() {this.meta = {
2442
1835
  id: "waterfall-3d-spectrum",
2443
1836
  name: "3D waterfall spectrum",
@@ -2462,22 +1855,22 @@ var Waterfall3DSpectrum = (_class17 = class extends GridSurfaceBase {
2462
1855
  const raw = this.field(128);
2463
1856
  const peak = raw.hasData ? Math.max(Math.abs(raw.zMax), Math.abs(raw.zMin), 1e-12) : 1;
2464
1857
  const field = scale === "decibel" /* Decibel */ ? raw.map((z) => Math.max(-48, 20 * Math.log10(Math.max(Math.abs(z) / peak, 1e-6)))) : raw;
2465
- const space = new SurfaceSpace(field, "linear" /* Linear */);
2466
- const zero = field.zDomain[0] < 0 && scale !== "decibel" /* Decibel */ ? space.level(0) : FLOOR;
1858
+ const space = new (0, _chunkSYABFMD7cjs.SurfaceSpace)(field, "linear" /* Linear */);
1859
+ const zero = field.zDomain[0] < 0 && scale !== "decibel" /* Decibel */ ? space.level(0) : _chunkSYABFMD7cjs.FLOOR;
2467
1860
  const paint = this.painter(ctx, scale === "decibel" /* Decibel */ ? [0, 1] : field.zDomain);
2468
1861
  const tone = (value) => paint(scale === "decibel" /* Decibel */ ? (value - field.zDomain[0]) / (field.zDomain[1] - field.zDomain[0]) : value);
2469
1862
  this.box(ctx, this.axes(space));
2470
1863
  const lift = this.rise(ctx);
2471
1864
  const count = Math.min(field.ny, frames);
2472
1865
  const order = Array.from({ length: count }, (_, k) => Math.round(k * (field.ny - 1) / Math.max(1, count - 1)));
2473
- const lines = new TubeBatch(48e-4), stems = new TubeBatch(38e-4);
1866
+ const lines = new (0, _chunkSYABFMD7cjs.TubeBatch)(48e-4), stems = new (0, _chunkSYABFMD7cjs.TubeBatch)(38e-4);
2474
1867
  const line = (j) => Array.from({ length: field.nx }, (_, i) => space.at(i, j));
2475
1868
  const tip = this.gridTip(space);
2476
1869
  for (const j of order) {
2477
1870
  const top = line(j);
2478
1871
  if (mark === "fins" /* Fins */) {
2479
1872
  const surface = ctx.color(ctx.theme.surface);
2480
- this.solid(ctx, SurfaceGeometry.curtain(top, zero, (k) => tone(field.at(k, j)).clone().lerp(surface, 0.12), () => surface), lift, (k) => tip(k % field.nx + j * field.nx), { roughness: 0.8 });
1873
+ this.solid(ctx, _chunkSYABFMD7cjs.SurfaceGeometry.curtain(top, zero, (k) => tone(field.at(k, j)).clone().lerp(surface, 0.12), () => surface), lift, (k) => tip(k % field.nx + j * field.nx), { roughness: 0.8 });
2481
1874
  }
2482
1875
  const quiet = field.zMin + (field.zMax - field.zMin) * 0.05;
2483
1876
  const audible = top.map((point, k) => Math.max(field.at(k - 2, j), field.at(k - 1, j), field.at(k, j), field.at(k + 1, j), field.at(k + 2, j)) > quiet ? point : [NaN, NaN, NaN]);
@@ -2497,10 +1890,10 @@ var Waterfall3DSpectrum = (_class17 = class extends GridSurfaceBase {
2497
1890
  }
2498
1891
  return space.at(best, j, 0.012);
2499
1892
  });
2500
- this.tubes(new TubeBatch(95e-4, 6).add(track), lift, ctx.theme.ink);
1893
+ this.tubes(new (0, _chunkSYABFMD7cjs.TubeBatch)(95e-4, 6).add(track), lift, ctx.theme.ink);
2501
1894
  }
2502
1895
  }
2503
- }, _class17.__initStatic15(), _class17);
1896
+ }, _class15.__initStatic15(), _class15);
2504
1897
 
2505
1898
  // src/charts/threesurfaces/Spectrogram3DChart.ts
2506
1899
 
@@ -2514,7 +1907,7 @@ var SpectrogramMark = /* @__PURE__ */ ((SpectrogramMark2) => {
2514
1907
  return SpectrogramMark2;
2515
1908
  })(SpectrogramMark || {});
2516
1909
  var TRANSFORM_MARKS = ["surface" /* Surface */, "ridges" /* Ridges */, "columns" /* Columns */];
2517
- var Spectrogram3DChart = (_class18 = class extends GridSurfaceBase {
1910
+ var Spectrogram3DChart = (_class16 = class extends GridSurfaceBase {
2518
1911
  static __initStatic16() {this.meta = {
2519
1912
  id: "spectrogram-3d",
2520
1913
  name: "3D spectrogram",
@@ -2540,9 +1933,9 @@ var Spectrogram3DChart = (_class18 = class extends GridSurfaceBase {
2540
1933
  field() {
2541
1934
  const { data, value, size, overlap, window, scale } = this.options;
2542
1935
  const signal = Array.isArray(data) ? data.map((row) => +(_nullishCoalesce(row[value], () => ( 0)))) : [];
2543
- if (!signal.length) return SurfaceField.empty();
1936
+ if (!signal.length) return _chunkSYABFMD7cjs.SurfaceField.empty();
2544
1937
  const grid = ShortTimeTransform.spectrogram(signal, size, Math.max(1, Math.round(size * (1 - overlap))), window);
2545
- const field = SurfaceField.from(grid).capped(96);
1938
+ const field = _chunkSYABFMD7cjs.SurfaceField.from(grid).capped(96);
2546
1939
  if (scale !== "decibel" /* Decibel */) return field;
2547
1940
  const peak = Math.max(field.zMax, 1e-12);
2548
1941
  return field.map((z) => Math.max(-48, 20 * Math.log10(Math.max(z / peak, 1e-6))));
@@ -2550,7 +1943,7 @@ var Spectrogram3DChart = (_class18 = class extends GridSurfaceBase {
2550
1943
  build(ctx) {
2551
1944
  const { mark, floor } = this.options;
2552
1945
  const field = this.field();
2553
- const space = new SurfaceSpace(field);
1946
+ const space = new (0, _chunkSYABFMD7cjs.SurfaceSpace)(field);
2554
1947
  const [lo, hi] = field.zDomain;
2555
1948
  const base = this.painter(ctx, [0, 1]);
2556
1949
  const paint = (value) => base((value - lo) / (hi - lo));
@@ -2558,10 +1951,10 @@ var Spectrogram3DChart = (_class18 = class extends GridSurfaceBase {
2558
1951
  if (floor) this.floorHeatmap(ctx, space, paint);
2559
1952
  const lift = this.rise(ctx);
2560
1953
  if (mark === "surface" /* Surface */) {
2561
- return void this.solid(ctx, SurfaceGeometry.grid(field.nx, field.ny, (i, j) => space.at(i, j), (i, j) => paint(field.at(i, j))), lift, this.gridTip(space));
1954
+ return void this.solid(ctx, _chunkSYABFMD7cjs.SurfaceGeometry.grid(field.nx, field.ny, (i, j) => space.at(i, j), (i, j) => paint(field.at(i, j))), lift, this.gridTip(space));
2562
1955
  }
2563
1956
  if (mark === "ridges" /* Ridges */ || mark === "wire" /* Wire */) {
2564
- const wire = mark === "wire" /* Wire */, step = wire ? 3 : 2, batch = new TubeBatch(wire ? 4e-3 : 55e-4);
1957
+ const wire = mark === "wire" /* Wire */, step = wire ? 3 : 2, batch = new (0, _chunkSYABFMD7cjs.TubeBatch)(wire ? 4e-3 : 55e-4);
2565
1958
  for (let j = 0; j < field.ny; j += step) batch.add(Array.from({ length: field.nx }, (_, i) => space.at(i, j)), (k) => paint(field.at(k, j)));
2566
1959
  if (wire) for (let i = 0; i < field.nx; i += step) batch.add(Array.from({ length: field.ny }, (_, j) => space.at(i, j)), (k) => paint(field.at(i, k)));
2567
1960
  return void this.tubes(batch, lift);
@@ -2569,12 +1962,12 @@ var Spectrogram3DChart = (_class18 = class extends GridSurfaceBase {
2569
1962
  if (mark === "ribbons" /* Ribbons */) {
2570
1963
  const strips = Array.from({ length: Math.ceil(field.ny / 4) }, (_, k) => k * 4).map((j) => {
2571
1964
  const top = Array.from({ length: field.nx }, (_, i) => space.at(i, j));
2572
- return SurfaceGeometry.curtain(top, FLOOR, (i) => paint(field.at(i, j)), () => paint(lo));
1965
+ return _chunkSYABFMD7cjs.SurfaceGeometry.curtain(top, _chunkSYABFMD7cjs.FLOOR, (i) => paint(field.at(i, j)), () => paint(lo));
2573
1966
  });
2574
- return void this.solid(ctx, SurfaceGeometry.merge(strips), lift);
1967
+ return void this.solid(ctx, _chunkSYABFMD7cjs.SurfaceGeometry.merge(strips), lift);
2575
1968
  }
2576
1969
  if (mark === "bars" /* Bars */) return this.bars(ctx, space, paint, lift);
2577
- const stems = new TubeBatch(85e-4, 4), stepX = Math.ceil(field.nx / 26), stepY = Math.ceil(field.ny / 26);
1970
+ const stems = new (0, _chunkSYABFMD7cjs.TubeBatch)(85e-4, 4), stepX = Math.ceil(field.nx / 26), stepY = Math.ceil(field.ny / 26);
2578
1971
  for (let j = 0; j < field.ny; j += stepY) for (let i = 0; i < field.nx; i += stepX) {
2579
1972
  if (field.at(i, j) > lo + (hi - lo) * 0.02) stems.add([space.floor(i, j), space.at(i, j)], (k) => paint(k ? field.at(i, j) : lo));
2580
1973
  }
@@ -2590,8 +1983,8 @@ var Spectrogram3DChart = (_class18 = class extends GridSurfaceBase {
2590
1983
  const bars = new (0, _three.InstancedMesh)(new (0, _three.BoxGeometry)(wide, 1, deep).translate(0, 0.5, 0), new (0, _three.MeshStandardMaterial)({ roughness: 0.55 }), cells.length), dummy = new (0, _three.Object3D)();
2591
1984
  cells.forEach((cell, k) => {
2592
1985
  const i = cell % field.nx, j = Math.floor(cell / field.nx), [x, y, z] = space.at(i, j);
2593
- dummy.position.set(x, FLOOR, z);
2594
- dummy.scale.set(1, Math.max(2e-3, y - FLOOR), 1);
1986
+ dummy.position.set(x, _chunkSYABFMD7cjs.FLOOR, z);
1987
+ dummy.scale.set(1, Math.max(2e-3, y - _chunkSYABFMD7cjs.FLOOR), 1);
2595
1988
  dummy.updateMatrix();
2596
1989
  bars.setMatrixAt(k, dummy.matrix);
2597
1990
  bars.setColorAt(k, paint(field.at(i, j)));
@@ -2601,7 +1994,7 @@ var Spectrogram3DChart = (_class18 = class extends GridSurfaceBase {
2601
1994
  const tip = this.gridTip(space);
2602
1995
  ctx.pick(bars, (k) => tip(cells[k]));
2603
1996
  }
2604
- }, _class18.__initStatic16(), _class18);
1997
+ }, _class16.__initStatic16(), _class16);
2605
1998
 
2606
1999
  // src/charts/threesurfaces/SurfaceChart.ts
2607
2000
  var SurfaceShading = /* @__PURE__ */ ((SurfaceShading2) => {
@@ -2609,7 +2002,7 @@ var SurfaceShading = /* @__PURE__ */ ((SurfaceShading2) => {
2609
2002
  SurfaceShading2["Faceted"] = "faceted";
2610
2003
  return SurfaceShading2;
2611
2004
  })(SurfaceShading || {});
2612
- var SurfaceChart = (_class19 = class extends GridSurfaceBase {
2005
+ var SurfaceChart = (_class17 = class extends GridSurfaceBase {
2613
2006
  static __initStatic17() {this.meta = {
2614
2007
  id: "surface-3d",
2615
2008
  name: "3D surface",
@@ -2618,7 +2011,7 @@ var SurfaceChart = (_class19 = class extends GridSurfaceBase {
2618
2011
  shape: "grid" /* Grid */,
2619
2012
  description: "Draws a shaded height field over an x and y grid, with optional contour, mesh and floor projections.",
2620
2013
  tags: ["surface", "height field", "plot3d"],
2621
- sample: (seed) => _chunkUMEKIIHJcjs.SampleData.surface(seed, 48),
2014
+ sample: (seed) => _chunkLNWTC72Ycjs.SampleData.surface(seed, 48),
2622
2015
  variants: {
2623
2016
  overlay: ["mesh-lines" /* Mesh */, "contour-lines" /* Contours */, "bare" /* None */],
2624
2017
  projection: ["floor-contours" /* FloorContours */, "unprojected" /* None */, "floor-heatmap" /* FloorHeatmap */, "wall-profiles" /* Walls */],
@@ -2634,18 +2027,18 @@ var SurfaceChart = (_class19 = class extends GridSurfaceBase {
2634
2027
  build(ctx) {
2635
2028
  const { overlay, projection, scale, shading, solidBase } = this.options;
2636
2029
  const field = this.field();
2637
- const space = new SurfaceSpace(field, scale);
2030
+ const space = new (0, _chunkSYABFMD7cjs.SurfaceSpace)(field, scale);
2638
2031
  const paint = this.painter(ctx, field.zDomain);
2639
2032
  this.box(ctx, this.axes(space));
2640
2033
  const lift = this.rise(ctx);
2641
- const sheet = SurfaceGeometry.grid(field.nx, field.ny, (i, j) => space.at(i, j), (i, j) => paint(field.at(i, j)));
2642
- this.solid(ctx, shading === "faceted" /* Faceted */ ? SurfaceGeometry.faceted(sheet) : sheet, lift, this.gridTip(space));
2034
+ const sheet = _chunkSYABFMD7cjs.SurfaceGeometry.grid(field.nx, field.ny, (i, j) => space.at(i, j), (i, j) => paint(field.at(i, j)));
2035
+ this.solid(ctx, shading === "faceted" /* Faceted */ ? _chunkSYABFMD7cjs.SurfaceGeometry.faceted(sheet) : sheet, lift, this.gridTip(space));
2643
2036
  if (solidBase) this.skirt(ctx, space, paint, lift);
2644
2037
  if (overlay === "mesh-lines" /* Mesh */) this.meshLines(ctx, space, lift);
2645
2038
  if (overlay === "contour-lines" /* Contours */) this.contourLines(ctx, space, lift);
2646
2039
  this.project(ctx, space, projection, paint);
2647
2040
  }
2648
- }, _class19.__initStatic17(), _class19);
2041
+ }, _class17.__initStatic17(), _class17);
2649
2042
 
2650
2043
  // src/charts/threesurfaces/TerrainChart.ts
2651
2044
 
@@ -2659,7 +2052,7 @@ var TerrainBase = /* @__PURE__ */ ((TerrainBase2) => {
2659
2052
  var SEA = 0.3;
2660
2053
  var BEDROCK = 0.2;
2661
2054
  function ridges(seed, n) {
2662
- const octaves = [0, 1, 2].map((k) => SurfaceField.from(_chunkUMEKIIHJcjs.SampleData.surface(seed + k * 2.3, n)));
2055
+ const octaves = [0, 1, 2].map((k) => _chunkSYABFMD7cjs.SurfaceField.from(_chunkLNWTC72Ycjs.SampleData.surface(seed + k * 2.3, n)));
2663
2056
  const fold = (t) => {
2664
2057
  const m = t % 2;
2665
2058
  return m > 1 ? 2 - m : m;
@@ -2671,7 +2064,7 @@ function ridges(seed, n) {
2671
2064
  }, 0)));
2672
2065
  return { x: axis.map((t) => t * 100), y: axis.map((t) => t * 100), z };
2673
2066
  }
2674
- var TerrainChart = (_class20 = class extends GridSurfaceBase {
2067
+ var TerrainChart = (_class18 = class extends GridSurfaceBase {
2675
2068
  static __initStatic18() {this.meta = {
2676
2069
  id: "terrain-3d",
2677
2070
  name: "Terrain",
@@ -2756,32 +2149,32 @@ var TerrainChart = (_class20 = class extends GridSurfaceBase {
2756
2149
  const color = ctx.color(ctx.palette.sequential(0.28 + 0.16 * bed));
2757
2150
  const depth = (k, share) => {
2758
2151
  const y = crest[k][1], surface = Number.isFinite(y) ? y : top;
2759
- return FLOOR + (surface - FLOOR) * share;
2152
+ return _chunkSYABFMD7cjs.FLOOR + (surface - _chunkSYABFMD7cjs.FLOOR) * share;
2760
2153
  };
2761
2154
  const upper = (beds - bed) / beds, lower = (beds - bed - 1) / beds;
2762
- parts.push(SurfaceGeometry.curtain(crest.map(([x, _y, z], k) => [x, depth(k, upper) - (bed ? gap / 2 : 0), z]), (k) => depth(k, lower) + (bed < beds - 1 ? gap / 2 : 0), () => color, () => color));
2155
+ parts.push(_chunkSYABFMD7cjs.SurfaceGeometry.curtain(crest.map(([x, _y, z], k) => [x, depth(k, upper) - (bed ? gap / 2 : 0), z]), (k) => depth(k, lower) + (bed < beds - 1 ? gap / 2 : 0), () => color, () => color));
2763
2156
  }
2764
2157
  });
2765
- this.solid(ctx, SurfaceGeometry.merge(parts), lift);
2158
+ this.solid(ctx, _chunkSYABFMD7cjs.SurfaceGeometry.merge(parts), lift);
2766
2159
  }
2767
2160
  build(ctx) {
2768
- const { base, water, rivers, contours: contours2, relief } = this.options;
2161
+ const { base, water, rivers, contours, relief } = this.options;
2769
2162
  const field = this.shaped();
2770
2163
  const raised = base === "block" /* Block */ || base === "strata" /* Strata */ ? BEDROCK : 0.02;
2771
- const bottom = FLOOR + raised;
2772
- const space = new SurfaceSpace(field, "linear" /* Linear */, [bottom, bottom + (CEIL - bottom) * relief]);
2773
- const [lo, hi] = field.zDomain, ramp = new ColorRamp(ctx.palette.sequential);
2164
+ const bottom = _chunkSYABFMD7cjs.FLOOR + raised;
2165
+ const space = new (0, _chunkSYABFMD7cjs.SurfaceSpace)(field, "linear" /* Linear */, [bottom, bottom + (_chunkSYABFMD7cjs.CEIL - bottom) * relief]);
2166
+ const [lo, hi] = field.zDomain, ramp = new (0, _chunkSYABFMD7cjs.ColorRamp)(ctx.palette.sequential);
2774
2167
  const tone = (value) => ramp.at(0.1 + 0.8 * (value - lo) / (hi - lo));
2775
2168
  this.box(ctx, this.axes(space), { walls: false });
2776
2169
  const lift = this.rise(ctx);
2777
- this.solid(ctx, SurfaceGeometry.grid(field.nx, field.ny, (i, j) => space.at(i, j), (i, j) => tone(field.at(i, j))), lift, this.gridTip(space), { roughness: 0.85 });
2170
+ this.solid(ctx, _chunkSYABFMD7cjs.SurfaceGeometry.grid(field.nx, field.ny, (i, j) => space.at(i, j), (i, j) => tone(field.at(i, j))), lift, this.gridTip(space), { roughness: 0.85 });
2778
2171
  if (!field.hasData) return;
2779
2172
  if (base === "block" /* Block */) this.skirt(ctx, space, () => ctx.color(ctx.palette.sequential(0.3)), lift);
2780
2173
  if (base === "strata" /* Strata */) this.strata(ctx, space, lift);
2781
2174
  const sea = field.zMin + (field.zMax - field.zMin) * SEA;
2782
- if (contours2) this.contourLines(ctx, space, lift, 7);
2175
+ if (contours) this.contourLines(ctx, space, lift, 7);
2783
2176
  if (rivers) {
2784
- const batch = new TubeBatch();
2177
+ const batch = new (0, _chunkSYABFMD7cjs.TubeBatch)();
2785
2178
  this.channels(space, batch);
2786
2179
  this.tubes(batch, lift, ctx.theme.surface, 0.85);
2787
2180
  }
@@ -2791,10 +2184,10 @@ var TerrainChart = (_class20 = class extends GridSurfaceBase {
2791
2184
  const y = space.level(sea);
2792
2185
  const material = new (0, _three.MeshStandardMaterial)({ color: ctx.palette.sequential(0.55), roughness: 0.25, transparent: true, opacity: 0.6, depthWrite: false });
2793
2186
  const bed = this.options.base;
2794
- const body = bed === "island" /* Island */ ? new (0, _three.CircleGeometry)(1, 72).rotateX(-Math.PI / 2).translate(0, y, 0) : bed === "sheet" /* Sheet */ ? new (0, _three.PlaneGeometry)(2, 2).rotateX(-Math.PI / 2).translate(0, y, 0) : new (0, _three.BoxGeometry)(1.996, y - FLOOR, 1.996).translate(0, (y + FLOOR) / 2, 0);
2187
+ const body = bed === "island" /* Island */ ? new (0, _three.CircleGeometry)(1, 72).rotateX(-Math.PI / 2).translate(0, y, 0) : bed === "sheet" /* Sheet */ ? new (0, _three.PlaneGeometry)(2, 2).rotateX(-Math.PI / 2).translate(0, y, 0) : new (0, _three.BoxGeometry)(1.996, y - _chunkSYABFMD7cjs.FLOOR, 1.996).translate(0, (y + _chunkSYABFMD7cjs.FLOOR) / 2, 0);
2795
2188
  lift.add(new (0, _three.Mesh)(body, material));
2796
2189
  }
2797
- }, _class20.__initStatic18(), _class20);
2190
+ }, _class18.__initStatic18(), _class18);
2798
2191
 
2799
2192
  // src/charts/threesurfaces/TriangulatedSurface.ts
2800
2193
  var _d3delaunay = require('d3-delaunay');
@@ -2812,7 +2205,7 @@ var TriangulationTrim = /* @__PURE__ */ ((TriangulationTrim2) => {
2812
2205
  TriangulationTrim2["Alpha"] = "alpha-trim";
2813
2206
  return TriangulationTrim2;
2814
2207
  })(TriangulationTrim || {});
2815
- var TriangulatedSurface = (_class21 = class extends SurfaceBase {
2208
+ var TriangulatedSurface = (_class19 = class extends _chunkSYABFMD7cjs.SurfaceBase {
2816
2209
  static __initStatic19() {this.meta = {
2817
2210
  id: "triangulated-surface",
2818
2211
  name: "Triangulated surface",
@@ -2821,7 +2214,7 @@ var TriangulatedSurface = (_class21 = class extends SurfaceBase {
2821
2214
  shape: "table" /* Table */,
2822
2215
  description: "Connects scattered x, y, z points with a Delaunay triangulation or Voronoi cells, without assuming a grid.",
2823
2216
  tags: ["tin", "delaunay", "voronoi", "scattered", "trisurf"],
2824
- sample: (seed) => _chunkUMEKIIHJcjs.SampleData.points(seed, 260, 1).map((row) => {
2217
+ sample: (seed) => _chunkLNWTC72Ycjs.SampleData.points(seed, 260, 1).map((row) => {
2825
2218
  const x = row.x, y = row.y - x * 0.8 - 10;
2826
2219
  return { x, y: +y.toFixed(2), value: +(Math.sin(x / 6) * Math.cos(y / 6) * 30 + row.size * 0.12).toFixed(2) };
2827
2220
  }),
@@ -2847,7 +2240,7 @@ var TriangulatedSurface = (_class21 = class extends SurfaceBase {
2847
2240
  });
2848
2241
  const [x0 = 0, x1 = 1] = _d3.extent.call(void 0, rows, (p) => p.x), [y0 = 0, y1 = 1] = _d3.extent.call(void 0, rows, (p) => p.y), [z0 = 0, z1 = 1] = _d3.extent.call(void 0, rows, (p) => p.z);
2849
2242
  const sx = _d3.scaleLinear.call(void 0, [x0, x1 > x0 ? x1 : x0 + 1], [-1, 1]), sz = _d3.scaleLinear.call(void 0, [y0, y1 > y0 ? y1 : y0 + 1], [1, -1]);
2850
- const zDomain = [z0, z1 > z0 ? z1 : z0 + 1], sy = _d3.scaleLinear.call(void 0, zDomain, [FLOOR, CEIL]);
2243
+ const zDomain = [z0, z1 > z0 ? z1 : z0 + 1], sy = _d3.scaleLinear.call(void 0, zDomain, [_chunkSYABFMD7cjs.FLOOR, _chunkSYABFMD7cjs.CEIL]);
2851
2244
  const paint = this.painter(ctx, zDomain);
2852
2245
  this.box(ctx, { x: this.ticks(sx.domain(), sx), y: this.ticks(sz.domain(), sz), z: this.ticks(zDomain, sy, 3) });
2853
2246
  const lift = this.rise(ctx);
@@ -2864,8 +2257,8 @@ var TriangulatedSurface = (_class21 = class extends SurfaceBase {
2864
2257
  }
2865
2258
  if (points) this.dots(ctx, world, mark === "voronoi-cells" /* Cells */ ? 0.012 : 0.016, () => ctx.color(ctx.theme.ink), lift, tip);
2866
2259
  if (stems) {
2867
- const batch = new TubeBatch(3e-3, 4);
2868
- for (const [a, b, c] of world) batch.add([[a, b, c], [a, FLOOR, c]]);
2260
+ const batch = new (0, _chunkSYABFMD7cjs.TubeBatch)(3e-3, 4);
2261
+ for (const [a, b, c] of world) batch.add([[a, b, c], [a, _chunkSYABFMD7cjs.FLOOR, c]]);
2869
2262
  this.tubes(batch, lift, ctx.theme.inkMuted, 0.7);
2870
2263
  }
2871
2264
  }
@@ -2882,7 +2275,7 @@ var TriangulatedSurface = (_class21 = class extends SurfaceBase {
2882
2275
  const limit = (_nullishCoalesce(_d3.median.call(void 0, lengths), () => ( 1))) * 2.6;
2883
2276
  const kept = trim === "alpha-trim" /* Alpha */ ? faces.filter(([a, b, c]) => Math.max(edge(a, b), edge(b, c), edge(c, a)) < limit) : faces;
2884
2277
  if (mark === "wire" /* Wire */) {
2885
- const batch = new TubeBatch(48e-4);
2278
+ const batch = new (0, _chunkSYABFMD7cjs.TubeBatch)(48e-4);
2886
2279
  const drawn = /* @__PURE__ */ new Set();
2887
2280
  for (const [a, b, c] of kept) for (const [p, q] of [[a, b], [b, c], [c, a]]) {
2888
2281
  const key = p < q ? `${p}:${q}` : `${q}:${p}`;
@@ -2901,7 +2294,7 @@ var TriangulatedSurface = (_class21 = class extends SurfaceBase {
2901
2294
  return [c.r, c.g, c.b];
2902
2295
  }), 3));
2903
2296
  if (smooth) painted.setIndex(kept.flat());
2904
- const geometry = smooth && kept.length ? SurfaceGeometry.compact(painted) : painted;
2297
+ const geometry = smooth && kept.length ? _chunkSYABFMD7cjs.SurfaceGeometry.compact(painted) : painted;
2905
2298
  geometry.computeVertexNormals();
2906
2299
  if (!smooth) geometry.userData.source = Uint32Array.from(order);
2907
2300
  const mesh = new (0, _chunkCM7X3KFUcjs.SurfaceMesh)(geometry, this.material());
@@ -2932,7 +2325,7 @@ var TriangulatedSurface = (_class21 = class extends SurfaceBase {
2932
2325
  });
2933
2326
  ring.forEach(([a, b], k) => {
2934
2327
  const [c, d] = ring[(k + 1) % ring.length];
2935
- const p = [a, cy, b], q = [c, cy, d], r = [a, FLOOR, b], s = [c, FLOOR, d];
2328
+ const p = [a, cy, b], q = [c, cy, d], r = [a, _chunkSYABFMD7cjs.FLOOR, b], s = [c, _chunkSYABFMD7cjs.FLOOR, d];
2936
2329
  push(owner, [cx, cy, cz], p, q, p, r, q, q, r, s);
2937
2330
  });
2938
2331
  });
@@ -2946,7 +2339,7 @@ var TriangulatedSurface = (_class21 = class extends SurfaceBase {
2946
2339
  parent.add(mesh);
2947
2340
  ctx.pick(mesh, tip);
2948
2341
  }
2949
- }, _class21.__initStatic19(), _class21);
2342
+ }, _class19.__initStatic19(), _class19);
2950
2343
 
2951
2344
  // src/charts/threesurfaces/WireframeSurface.ts
2952
2345
  var WireLines = /* @__PURE__ */ ((WireLines2) => {
@@ -2957,7 +2350,7 @@ var WireLines = /* @__PURE__ */ ((WireLines2) => {
2957
2350
  WireLines2["Diagonal"] = "diamond";
2958
2351
  return WireLines2;
2959
2352
  })(WireLines || {});
2960
- var WireframeSurface = (_class22 = class extends GridSurfaceBase {
2353
+ var WireframeSurface = (_class20 = class extends GridSurfaceBase {
2961
2354
  static __initStatic20() {this.meta = {
2962
2355
  id: "wireframe-surface",
2963
2356
  name: "Wireframe surface",
@@ -2966,7 +2359,7 @@ var WireframeSurface = (_class22 = class extends GridSurfaceBase {
2966
2359
  shape: "grid" /* Grid */,
2967
2360
  description: "Draws only the lattice of a height field, so the far side of the surface stays visible.",
2968
2361
  tags: ["wireframe", "hidden line", "mesh plot"],
2969
- sample: (seed) => _chunkUMEKIIHJcjs.SampleData.surface(seed, 49),
2362
+ sample: (seed) => _chunkLNWTC72Ycjs.SampleData.surface(seed, 49),
2970
2363
  variants: {
2971
2364
  lines: ["lattice" /* Both */, "rows" /* Rows */, "columns" /* Columns */, "triangles" /* Triangles */, "diamond" /* Diagonal */],
2972
2365
  hiddenLine: [true, false],
@@ -2981,15 +2374,15 @@ var WireframeSurface = (_class22 = class extends GridSurfaceBase {
2981
2374
  build(ctx) {
2982
2375
  const { lines, hiddenLine, stride, nodes } = this.options;
2983
2376
  const field = this.field(73);
2984
- const space = new SurfaceSpace(field);
2377
+ const space = new (0, _chunkSYABFMD7cjs.SurfaceSpace)(field);
2985
2378
  const paint = this.painter(ctx, field.zDomain);
2986
2379
  const { nx, ny } = field, step = stride;
2987
2380
  this.box(ctx, this.axes(space));
2988
2381
  const lift = this.rise(ctx);
2989
2382
  if (hiddenLine) {
2990
- this.solid(ctx, SurfaceGeometry.grid(nx, ny, (i, j) => space.at(i, j, -6e-3), () => ctx.color(ctx.theme.surface)), lift, this.gridTip(space), { roughness: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 1 });
2383
+ this.solid(ctx, _chunkSYABFMD7cjs.SurfaceGeometry.grid(nx, ny, (i, j) => space.at(i, j, -6e-3), () => ctx.color(ctx.theme.surface)), lift, this.gridTip(space), { roughness: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 1 });
2991
2384
  }
2992
- const batch = new TubeBatch(55e-4);
2385
+ const batch = new (0, _chunkSYABFMD7cjs.TubeBatch)(55e-4);
2993
2386
  const wire = (count, read) => {
2994
2387
  const path = Array.from({ length: count }, (_, k) => read(k));
2995
2388
  batch.add(path.map(([i, j]) => space.at(i, j)), (k) => paint(field.sample(...path[k])));
@@ -3023,7 +2416,7 @@ var WireframeSurface = (_class22 = class extends GridSurfaceBase {
3023
2416
  const tip = this.gridTip(space);
3024
2417
  return (k) => tip(lattice[k][0] + lattice[k][1] * space.field.nx);
3025
2418
  }
3026
- }, _class22.__initStatic20(), _class22);
2419
+ }, _class20.__initStatic20(), _class20);
3027
2420
 
3028
2421
  // src/charts/threesurfaces/index.ts
3029
2422
  var threesurfacesCatalog = [
@@ -3113,6 +2506,4 @@ var threesurfacesCatalog = [
3113
2506
 
3114
2507
 
3115
2508
 
3116
-
3117
-
3118
- exports.SurfaceOverlay = SurfaceOverlay; exports.SurfaceProjection = SurfaceProjection; exports.ComplexFunction = ComplexFunction; exports.ComplexHeight = ComplexHeight; exports.ComplexSurface = ComplexSurface; exports.ContourMode = ContourMode; exports.ContourLevels = ContourLevels; exports.ContourSurface = ContourSurface; exports.SurfaceDensityKernel = SurfaceDensityKernel; exports.SurfaceDensityMark = SurfaceDensityMark; exports.DensitySurface = DensitySurface; exports.HeightBarShape = HeightBarShape; exports.HeightBarLayout = HeightBarLayout; exports.HeightBarBaseline = HeightBarBaseline; exports.HeightfieldBars = HeightfieldBars; exports.ImplicitSurfaceForm = ImplicitSurfaceForm; exports.ImplicitClip = ImplicitClip; exports.ImplicitSurface = ImplicitSurface; exports.LayerArrangement = LayerArrangement; exports.LayerMark = LayerMark; exports.LayeredSurfaces = LayeredSurfaces; exports.MeshTile = MeshTile; exports.MeshPose = MeshPose; exports.MeshBody = MeshBody; exports.MeshSurface = MeshSurface; exports.ParametricSurfaceForm = ParametricSurfaceForm; exports.ParametricCut = ParametricCut; exports.ParametricSurface = ParametricSurface; exports.PhaseSurfaceSystem = PhaseSurfaceSystem; exports.PhaseMarks = PhaseMarks; exports.PhaseSeeding = PhaseSeeding; exports.PhaseSurface = PhaseSurface; exports.PolarAngleAxis = PolarAngleAxis; exports.PolarSurface = PolarSurface; exports.RibbonForm = RibbonForm; exports.RibbonSmoothing = RibbonSmoothing; exports.RibbonLayout = RibbonLayout; exports.RibbonSurface = RibbonSurface; exports.Ridge3DProfile = Ridge3DProfile; exports.Ridge3DMark = Ridge3DMark; exports.Ridge3DScaling = Ridge3DScaling; exports.Ridge3DOrder = Ridge3DOrder; exports.Ridgeline3DChart = Ridgeline3DChart; exports.SaddleModel = SaddleModel; exports.SaddleFootprint = SaddleFootprint; exports.SaddleSurface = SaddleSurface; exports.SliceAxis = SliceAxis; exports.SliceMark = SliceMark; exports.SliceSurface = SliceSurface; exports.SpectrogramWindow = SpectrogramWindow; exports.SpectrumWaterfallMark = SpectrumWaterfallMark; exports.SpectrumAmplitude = SpectrumAmplitude; exports.Waterfall3DSpectrum = Waterfall3DSpectrum; exports.SpectrogramMark = SpectrogramMark; exports.Spectrogram3DChart = Spectrogram3DChart; exports.SurfaceShading = SurfaceShading; exports.SurfaceChart = SurfaceChart; exports.TerrainBase = TerrainBase; exports.TerrainChart = TerrainChart; exports.TriangulationMark = TriangulationMark; exports.TriangulationTrim = TriangulationTrim; exports.TriangulatedSurface = TriangulatedSurface; exports.WireLines = WireLines; exports.WireframeSurface = WireframeSurface; exports.threesurfacesCatalog = threesurfacesCatalog;
2509
+ exports.ComplexFunction = ComplexFunction; exports.ComplexHeight = ComplexHeight; exports.ComplexSurface = ComplexSurface; exports.ContourMode = ContourMode; exports.ContourLevels = ContourLevels; exports.ContourSurface = ContourSurface; exports.SurfaceDensityKernel = SurfaceDensityKernel; exports.SurfaceDensityMark = SurfaceDensityMark; exports.DensitySurface = DensitySurface; exports.HeightBarShape = HeightBarShape; exports.HeightBarLayout = HeightBarLayout; exports.HeightBarBaseline = HeightBarBaseline; exports.HeightfieldBars = HeightfieldBars; exports.ImplicitSurfaceForm = ImplicitSurfaceForm; exports.ImplicitClip = ImplicitClip; exports.ImplicitSurface = ImplicitSurface; exports.LayerArrangement = LayerArrangement; exports.LayerMark = LayerMark; exports.LayeredSurfaces = LayeredSurfaces; exports.MeshTile = MeshTile; exports.MeshPose = MeshPose; exports.MeshBody = MeshBody; exports.MeshSurface = MeshSurface; exports.ParametricSurfaceForm = ParametricSurfaceForm; exports.ParametricCut = ParametricCut; exports.ParametricSurface = ParametricSurface; exports.PhaseSurfaceSystem = PhaseSurfaceSystem; exports.PhaseMarks = PhaseMarks; exports.PhaseSeeding = PhaseSeeding; exports.PhaseSurface = PhaseSurface; exports.PolarAngleAxis = PolarAngleAxis; exports.PolarSurface = PolarSurface; exports.RibbonForm = RibbonForm; exports.RibbonSmoothing = RibbonSmoothing; exports.RibbonLayout = RibbonLayout; exports.RibbonSurface = RibbonSurface; exports.Ridge3DProfile = Ridge3DProfile; exports.Ridge3DMark = Ridge3DMark; exports.Ridge3DScaling = Ridge3DScaling; exports.Ridge3DOrder = Ridge3DOrder; exports.Ridgeline3DChart = Ridgeline3DChart; exports.SaddleModel = SaddleModel; exports.SaddleFootprint = SaddleFootprint; exports.SaddleSurface = SaddleSurface; exports.SliceAxis = SliceAxis; exports.SliceMark = SliceMark; exports.SliceSurface = SliceSurface; exports.SpectrogramWindow = SpectrogramWindow; exports.SpectrumWaterfallMark = SpectrumWaterfallMark; exports.SpectrumAmplitude = SpectrumAmplitude; exports.Waterfall3DSpectrum = Waterfall3DSpectrum; exports.SpectrogramMark = SpectrogramMark; exports.Spectrogram3DChart = Spectrogram3DChart; exports.SurfaceShading = SurfaceShading; exports.SurfaceChart = SurfaceChart; exports.TerrainBase = TerrainBase; exports.TerrainChart = TerrainChart; exports.TriangulationMark = TriangulationMark; exports.TriangulationTrim = TriangulationTrim; exports.TriangulatedSurface = TriangulatedSurface; exports.WireLines = WireLines; exports.WireframeSurface = WireframeSurface; exports.threesurfacesCatalog = threesurfacesCatalog;