@sjcrh/proteinpaint-client 2.204.0 → 2.205.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 (924) hide show
  1. package/dist/2dmaf-ZQ7ACPAD.js +1367 -0
  2. package/dist/AggMatrixInput-EACGUIQA.js +277 -0
  3. package/dist/AggregateMatrix-TC5DTSYN.js +41 -0
  4. package/dist/AppHeader-PHI6US5B.js +830 -0
  5. package/dist/BoxPlot-QWKK3IJ7.js +1211 -0
  6. package/dist/CorrelationVolcano-QJJN7FVP.js +614 -0
  7. package/dist/Cuminc-6F2C5C4E.js +1219 -0
  8. package/dist/DE-HRJH6ZQL.js +89 -0
  9. package/dist/DE-HRJH6ZQL.js.map +7 -0
  10. package/dist/DEinput-T3MPAYPH.js +499 -0
  11. package/dist/DEinput-T3MPAYPH.js.map +7 -0
  12. package/dist/DM-PEG4ED2X.js +90 -0
  13. package/dist/DM-PEG4ED2X.js.map +7 -0
  14. package/dist/DifferentialAnalysis-XGXHWGPI.js +237 -0
  15. package/dist/Disco-7SRTTB3X.js +3389 -0
  16. package/dist/Disco.UI-CKKZ5MMK.js +243 -0
  17. package/dist/DmrPlot-N4CT4J2I.js +637 -0
  18. package/dist/GB-NVCLPRWN.js +1391 -0
  19. package/dist/GSEA-UZUNJG7Z.js +851 -0
  20. package/dist/GeneExpInput-3MDN2CAW.js +362 -0
  21. package/dist/Geomap-ZUF2PE5A.js +84 -0
  22. package/dist/HicApp-OIJT5TFU.js +2245 -0
  23. package/dist/IDCViewer-ZSH2E57L.js +10812 -0
  24. package/dist/NumBinaryEditor-74ZPGT7L.js +279 -0
  25. package/dist/NumBinaryEditor.unit.spec-T2I66SO5.js +312 -0
  26. package/dist/NumContEditor-M2GARZXM.js +105 -0
  27. package/dist/NumContEditor.unit.spec-G2QBBNH7.js +164 -0
  28. package/dist/NumCustomBinEditor-P44G67KS.js +33 -0
  29. package/dist/NumCustomBinEditor.unit.spec-AZHJN3V6.js +397 -0
  30. package/dist/NumDiscreteEditor-VOZ63LZY.js +170 -0
  31. package/dist/NumDiscreteEditor.unit.spec-CFSVPNBA.js +233 -0
  32. package/dist/NumRegularBinEditor-I6GJQR7W.js +33 -0
  33. package/dist/NumRegularBinEditor.unit.spec-IDJE7H6S.js +278 -0
  34. package/dist/NumSplineEditor-BCGWE52A.js +210 -0
  35. package/dist/NumSplineEditor.unit.spec-YQAL7L2E.js +224 -0
  36. package/dist/NumericDensity-P25W63RV.js +33 -0
  37. package/dist/NumericDensity.unit.spec-N7CQ5W5L.js +418 -0
  38. package/dist/NumericHandler-R7JWIFEO.js +34 -0
  39. package/dist/NumericHandler.unit.spec-LMGIAGZJ.js +214 -0
  40. package/dist/ProteomeInput-PRYKKF5E.js +388 -0
  41. package/dist/Regression-PSHH7ZXN.js +1416 -0
  42. package/dist/RunChart2-KJ2UWVCE.js +749 -0
  43. package/dist/SC-R6ZIJZ6F.js +1107 -0
  44. package/dist/Violin-GTQAUJ7B.js +1082 -0
  45. package/dist/Volcano-NER64J7W.js +1649 -0
  46. package/dist/Volcano-NER64J7W.js.map +7 -0
  47. package/dist/Wsi-GXNGL7O6.js +431 -0
  48. package/dist/adSandbox-SXSHVG4P.js +33 -0
  49. package/dist/animatedBubbleChart-Q4NEETEH.js +547 -0
  50. package/dist/app-MX4PL2QO.js +42 -0
  51. package/dist/app-R5CTEVAC.js +32 -0
  52. package/dist/app.js +14 -14
  53. package/dist/bam-45N3FEEM.js +876 -0
  54. package/dist/barchart-YCTKQJQX.js +42 -0
  55. package/dist/barchart2-252GS3CA.js +309 -0
  56. package/dist/block-CR75JHV3.js +6249 -0
  57. package/dist/block.init-U3JMED2E.js +33 -0
  58. package/dist/block.mds.expressionrank-TAN3BDPS.js +354 -0
  59. package/dist/block.mds.geneboxplot-EN344GEP.js +823 -0
  60. package/dist/block.mds.junction-RFVVJUTR.js +1539 -0
  61. package/dist/block.mds.svcnv-SSUMXEWD.js +6796 -0
  62. package/dist/block.svg-LRPGNFFI.js +159 -0
  63. package/dist/block.tk.aicheck-YY23FT2G.js +278 -0
  64. package/dist/block.tk.ase-JCGPFKFT.js +360 -0
  65. package/dist/block.tk.bam-NZDC4H7Y.js +1901 -0
  66. package/dist/block.tk.bedgraphdot-NCNZPZH6.js +379 -0
  67. package/dist/block.tk.bigwig.ui-Z7G6ZITU.js +206 -0
  68. package/dist/block.tk.hicstraw-VVDP4UF5.js +818 -0
  69. package/dist/block.tk.junction-L4YBPAHM.js +2358 -0
  70. package/dist/block.tk.junction.textmatrixui-6CMKKUB5.js +194 -0
  71. package/dist/block.tk.ld-VCP2R5UO.js +94 -0
  72. package/dist/block.tk.menu-ZJYGMEDX.js +1024 -0
  73. package/dist/block.tk.pgv-M5WNUIVS.js +938 -0
  74. package/dist/brainImaging-JGECJHZO.js +515 -0
  75. package/dist/brainRegions-NTEAXNZJ.js +234 -0
  76. package/dist/brainRegions-NTEAXNZJ.js.map +7 -0
  77. package/dist/bubbleHeatmap-7DQNWBQ2.js +378 -0
  78. package/dist/cellTypeBubbleHeatmap-LAE7U3RF.js +278 -0
  79. package/dist/chunk-2AQT3ZWL.js +626 -0
  80. package/dist/chunk-2GLNPB5J.js +203 -0
  81. package/dist/chunk-2O4CS3EZ.js +274 -0
  82. package/dist/chunk-2Z4ZSINZ.js +323 -0
  83. package/dist/chunk-2Z4ZSINZ.js.map +7 -0
  84. package/dist/chunk-3MFFZRH3.js +6360 -0
  85. package/dist/chunk-3PHXBY3Z.js +1275 -0
  86. package/dist/chunk-3PHXBY3Z.js.map +7 -0
  87. package/dist/chunk-4AQQ3BXD.js +70 -0
  88. package/dist/chunk-4PPZYVWZ.js +281 -0
  89. package/dist/chunk-4WEA7HHH.js +26 -0
  90. package/dist/chunk-57NYHASA.js +38 -0
  91. package/dist/chunk-5AAAH4OZ.js +141 -0
  92. package/dist/chunk-5BCNVZIW.js +480 -0
  93. package/dist/chunk-6JBQLOJW.js +1339 -0
  94. package/dist/chunk-756KZF5Y.js +158 -0
  95. package/dist/chunk-ABTO5QSB.js +276 -0
  96. package/dist/chunk-ALEZQQOK.js +299 -0
  97. package/dist/chunk-APK7TUJX.js +102 -0
  98. package/dist/chunk-AQAFURQM.js +59 -0
  99. package/dist/chunk-CZ5QLVWK.js +49 -0
  100. package/dist/chunk-D2MZT7CC.js +176 -0
  101. package/dist/chunk-DE3F7FAP.js +34 -0
  102. package/dist/chunk-DF3IMIR2.js +464 -0
  103. package/dist/chunk-E4WIMTK4.js +446 -0
  104. package/dist/chunk-E7TJXNIL.js +42 -0
  105. package/dist/chunk-G3JNTWCX.js +103 -0
  106. package/dist/chunk-GN2IIC6U.js +160 -0
  107. package/dist/chunk-GRI74AXV.js +294 -0
  108. package/dist/chunk-IAE3KWN5.js +550 -0
  109. package/dist/chunk-IB4NE4SI.js +397 -0
  110. package/dist/chunk-IK2BO37K.js +1608 -0
  111. package/dist/chunk-IK2BO37K.js.map +7 -0
  112. package/dist/chunk-IS4VLUEX.js +382 -0
  113. package/dist/chunk-J2DICGKC.js +194 -0
  114. package/dist/chunk-J7JDCNLU.js +24141 -0
  115. package/dist/chunk-J7JDCNLU.js.map +7 -0
  116. package/dist/chunk-JBUEQ4E6.js +263 -0
  117. package/dist/chunk-JIDJBM2R.js +2676 -0
  118. package/dist/chunk-JNVWSFNC.js +54 -0
  119. package/dist/chunk-JYOIO5UY.js +2133 -0
  120. package/dist/chunk-JYOIO5UY.js.map +7 -0
  121. package/dist/chunk-KAFDQKN7.js +1720 -0
  122. package/dist/chunk-L743GRJE.js +783 -0
  123. package/dist/chunk-L743GRJE.js.map +7 -0
  124. package/dist/chunk-LGOTIL62.js +54 -0
  125. package/dist/chunk-LHP7RXET.js +243 -0
  126. package/dist/chunk-LK2GHBUH.js +123 -0
  127. package/dist/chunk-MAVDQAZE.js +518 -0
  128. package/dist/chunk-MKT4OJ3G.js +102 -0
  129. package/dist/chunk-N635HDJ4.js +178 -0
  130. package/dist/chunk-N635HDJ4.js.map +7 -0
  131. package/dist/chunk-NFAE6VNU.js +2327 -0
  132. package/dist/chunk-NG7K5KYO.js +56 -0
  133. package/dist/chunk-NXVUL3EY.js +2853 -0
  134. package/dist/chunk-NXVUL3EY.js.map +7 -0
  135. package/dist/chunk-ODMLC5FN.js +55 -0
  136. package/dist/chunk-OJ4TDGPQ.js +339 -0
  137. package/dist/chunk-OXLBPSJ6.js +379 -0
  138. package/dist/chunk-P5GRGXH4.js +98 -0
  139. package/dist/chunk-POWG4MPT.js +31 -0
  140. package/dist/chunk-Q25DABNW.js +217 -0
  141. package/dist/chunk-QHJGWCH3.js +4311 -0
  142. package/dist/chunk-QHJGWCH3.js.map +7 -0
  143. package/dist/chunk-R5OIIFSF.js +197 -0
  144. package/dist/chunk-RJFCT67B.js +2784 -0
  145. package/dist/chunk-RN4BOWRH.js +402 -0
  146. package/dist/chunk-RZFJ6K77.js +302 -0
  147. package/dist/chunk-S5UN4VIQ.js +272 -0
  148. package/dist/chunk-SDMNZJ7X.js +50 -0
  149. package/dist/chunk-SWZAHJYP.js +170 -0
  150. package/dist/chunk-SY63UUF7.js +562 -0
  151. package/dist/chunk-T46FA72N.js +119 -0
  152. package/dist/chunk-TBPVP3KZ.js +1986 -0
  153. package/dist/chunk-TBPVP3KZ.js.map +7 -0
  154. package/dist/chunk-VIBK253J.js +134 -0
  155. package/dist/chunk-WTAPOH2W.js +22699 -0
  156. package/dist/chunk-WTAPOH2W.js.map +7 -0
  157. package/dist/chunk-XKL2D2NN.js +240 -0
  158. package/dist/chunk-XXJT7DSL.js +677 -0
  159. package/dist/chunk-YHA3AYAM.js +5071 -0
  160. package/dist/chunk-YN5NY3D3.js +339 -0
  161. package/dist/chunk-YX6FIREB.js +14 -0
  162. package/dist/chunk-ZXU4ALLZ.js +129 -0
  163. package/dist/cohort-75FUW3UO.js +70 -0
  164. package/dist/condition-VW43Q6ZE.js +327 -0
  165. package/dist/controls-HOP2AFHD.js +34 -0
  166. package/dist/controls.config-CMIFSKQE.js +34 -0
  167. package/dist/correlation-PN7BS5OR.js +95 -0
  168. package/dist/customdata.inputui-ZBZX63PS.js +284 -0
  169. package/dist/dataDownload-LGA4LAUF.js +329 -0
  170. package/dist/databrowser.ui-IQRDVL66.js +425 -0
  171. package/dist/dictionary-BPWD77LJ.js +113 -0
  172. package/dist/dnaMethylation-A3XPPBBB.js +33 -0
  173. package/dist/dnaMethylation.integration.spec-554ITDQC.js +198 -0
  174. package/dist/dofetch-FQ42AX7C.js +48 -0
  175. package/dist/e2pca-F3GWG7WZ.js +344 -0
  176. package/dist/ep-QAVN472H.js +1249 -0
  177. package/dist/expclust.gdc.spec-DQNX7FTL.js +302 -0
  178. package/dist/facet-DH7OOZTJ.js +519 -0
  179. package/dist/gb-OCXOLAMD.js +81 -0
  180. package/dist/geneExpClustering-DWYRZGTS.js +244 -0
  181. package/dist/geneExpression-2NKSKZR6.js +33 -0
  182. package/dist/geneExpression-BGFR3KQE.js +310 -0
  183. package/dist/geneExpression.unit.spec-63EKKMET.js +99 -0
  184. package/dist/geneORA-BED6XL4D.js +273 -0
  185. package/dist/geneRanking-UB5RCQNP.js +548 -0
  186. package/dist/geneVariant-WJEONTTY.js +286 -0
  187. package/dist/geneVariant-Y4C2FPJK.js +36 -0
  188. package/dist/geneVariant.integration.spec-VFYLC47N.js +388 -0
  189. package/dist/genefusion.ui-P3NBIMLE.js +303 -0
  190. package/dist/geneset-O22RQAED.js +203 -0
  191. package/dist/genomeBrowser.spec-MM7WZUGI.js +276 -0
  192. package/dist/grin2-3YBIRKUT.js +70 -0
  193. package/dist/grin2-O637DNDS.js +1137 -0
  194. package/dist/hierCluster-3X3BQVNE.js +59 -0
  195. package/dist/hierCluster-7P7M75TU.js +55 -0
  196. package/dist/hierCluster.config-XFUOLLDK.js +36 -0
  197. package/dist/hierCluster.integration.spec-HKYGSDDG.js +483 -0
  198. package/dist/hierCluster.interactivity-JUZSWCM7.js +49 -0
  199. package/dist/hierCluster.renderers-NGPPAYFM.js +19 -0
  200. package/dist/imagePlot-LKGAFJO7.js +156 -0
  201. package/dist/importPlot-SRWQA2FH.js +8 -0
  202. package/dist/isoformExpression-RYIZQIVX.js +35 -0
  203. package/dist/isoformExpression.unit.spec-DP4ECITF.js +237 -0
  204. package/dist/junction-D7QQ3YSG.js +36 -0
  205. package/dist/junction.customTerm-ZEVNCVU7.js +16 -0
  206. package/dist/junction.unit.spec-6MAKIB3R.js +182 -0
  207. package/dist/launch.adhoc-FAHRZFYG.js +37 -0
  208. package/dist/leftlabel.sample-PDZLWLJ4.js +258 -0
  209. package/dist/lollipop-VWGJUHNX.js +166 -0
  210. package/dist/maf-W52H44WK.js +455 -0
  211. package/dist/maftimeline-5JV3HZLE.js +587 -0
  212. package/dist/matrix-CEVGKXSK.js +54 -0
  213. package/dist/matrix-EXNYXYLK.js +59 -0
  214. package/dist/matrix.cells-DVPWSLJW.js +26 -0
  215. package/dist/matrix.config-RLSTWDXC.js +37 -0
  216. package/dist/matrix.data-Z6GUACVZ.js +23 -0
  217. package/dist/matrix.groups-3ZSTUWRK.js +26 -0
  218. package/dist/matrix.integration.spec-4U2R3UB2.js +3160 -0
  219. package/dist/matrix.interactivity-DJZFQ7DN.js +37 -0
  220. package/dist/matrix.layout-RQJ6VB4P.js +39 -0
  221. package/dist/matrix.legend-YQ36NWKW.js +20 -0
  222. package/dist/matrix.renderers-MWDFI6HW.js +34 -0
  223. package/dist/matrix.serieses-LTC4RLYD.js +19 -0
  224. package/dist/matrix.sort-5VFYLABY.js +26 -0
  225. package/dist/matrix.sort.unit.spec-2RUEKUT4.js +468 -0
  226. package/dist/matrix.sorterUi-EEMYZLPI.js +16 -0
  227. package/dist/matrix.sorterUi.unit.spec-ZXGSPRFZ.js +338 -0
  228. package/dist/matrix.unit.spec-HTF6UV4L.js +150 -0
  229. package/dist/mavb-GGQRDCO6.js +727 -0
  230. package/dist/mds.fimo-YKV5OIYV.js +513 -0
  231. package/dist/mds.samplescatterplot-RQOEW2AW.js +1545 -0
  232. package/dist/mds.survivalplot-TN636DED.js +477 -0
  233. package/dist/multivalue-MDQY64EH.js +83 -0
  234. package/dist/numericDictTermCluster-E73TJCLI.js +63 -0
  235. package/dist/oncomatrix-AENXQMLL.js +290 -0
  236. package/dist/oncomatrix.spec-UD6U462U.js +443 -0
  237. package/dist/plot.2dvaf-XMRV6KEG.js +372 -0
  238. package/dist/plot.app-A6JKLYQQ.js +36 -0
  239. package/dist/plot.barplot-UIX7LVWR.js +97 -0
  240. package/dist/plot.boxplot-DIFWVLMA.js +146 -0
  241. package/dist/plot.brainImaging-ZRPVE2UK.js +51 -0
  242. package/dist/plot.disco-I56MT3PC.js +99 -0
  243. package/dist/plot.ssgq-FCKFSZTV.js +134 -0
  244. package/dist/plot.vaf2cov-E5C7RJ7Z.js +253 -0
  245. package/dist/polar2-SKVBB4FD.js +232 -0
  246. package/dist/profileForms-5B3MTUNP.js +941 -0
  247. package/dist/profilePlot-MCYCGEWT.js +49 -0
  248. package/dist/proteinView-5X55JWVL.js +1562 -0
  249. package/dist/proteomeCohortCompare-WZBMBLFD.js +780 -0
  250. package/dist/pseudbulk.unit.spec-Q4YTIPH7.js +86 -0
  251. package/dist/pseudobulk-3UIWCCCQ.js +35 -0
  252. package/dist/qualitative-6TJRXZFV.js +38 -0
  253. package/dist/radar2-6X4XW5IZ.js +327 -0
  254. package/dist/radarFacility2-UVPXWPV5.js +335 -0
  255. package/dist/rememberedGvQ.unit.spec-GVRFRVSO.js +211 -0
  256. package/dist/render-G7V6R4PV.js +33 -0
  257. package/dist/report-O7D46EKQ.js +217 -0
  258. package/dist/sampleView-6Y3OOOMW.js +43 -0
  259. package/dist/samplelst-JRVC4GYC.js +106 -0
  260. package/dist/samplematrix-VP5RQVRH.js +2193 -0
  261. package/dist/sc-BPHVEP6N.js +81 -0
  262. package/dist/scatter-2YYRZCSW.js +88 -0
  263. package/dist/scatter-Y4BIG2PW.js +880 -0
  264. package/dist/selectGenomeWithTklst-2BVZU5SW.js +129 -0
  265. package/dist/singleCellCellType-XBGCSIQT.js +33 -0
  266. package/dist/singleCellCellType.unit.spec-T4GFRLVZ.js +154 -0
  267. package/dist/singleCellGeneExpression-5ZPWLSVW.js +33 -0
  268. package/dist/singleCellGeneExpression.unit.spec-4O5UBUDU.js +148 -0
  269. package/dist/singleCellPlot-CZLQBGVU.js +49 -0
  270. package/dist/singlecell-IIUYX7OG.js +1566 -0
  271. package/dist/singlecell-O3P5BLWT.js +81 -0
  272. package/dist/snp-ZCYBF3ZQ.js +33 -0
  273. package/dist/snp.unit.spec-TAGD2DRL.js +171 -0
  274. package/dist/snplocus-TL25OOPE.js +203 -0
  275. package/dist/spliceevent.a53ss.diagram-I7J4PQZT.js +146 -0
  276. package/dist/spliceevent.exonskip.diagram-SB4454HB.js +278 -0
  277. package/dist/spliceevent.noeventdiagram-FOSDNYLH.js +455 -0
  278. package/dist/ssGSEA-WANB2X5L.js +33 -0
  279. package/dist/ssGSEA.unit.spec-4XXWU4XV.js +83 -0
  280. package/dist/stattable-FNTJLVNB.js +117 -0
  281. package/dist/studyCatalog-7KEOFLO2.js +378 -0
  282. package/dist/summarizeCnvGeneexp-P4AFZMKD.js +158 -0
  283. package/dist/summarizeGeneexpSurvival-YL2J7F4R.js +105 -0
  284. package/dist/summarizeMutationCnv-BHBHST5F.js +159 -0
  285. package/dist/summarizeMutationDiagnosis-Z7ZHTV27.js +35 -0
  286. package/dist/summarizeMutationSurvival-PZ4TYHT7.js +99 -0
  287. package/dist/summary-ZMNPO65S.js +42 -0
  288. package/dist/summary.integration.spec-DPJR2ZBE.js +409 -0
  289. package/dist/summaryInput-6JUFJZ5P.js +242 -0
  290. package/dist/sunburst-OWAUI3HC.js +278 -0
  291. package/dist/survival-6JPKG3VA.js +53 -0
  292. package/dist/survival-7EXICNK7.js +1248 -0
  293. package/dist/survival-7EXICNK7.js.map +7 -0
  294. package/dist/survival.integration.spec-A6NUJLL6.js +613 -0
  295. package/dist/svgraph-34IKFHUS.js +1382 -0
  296. package/dist/svmr-4XNPSVVQ.js +3837 -0
  297. package/dist/table-LPZATFLC.js +197 -0
  298. package/dist/termCollection-DYY5FXU5.js +252 -0
  299. package/dist/termCollection-WOAUFFIC.js +33 -0
  300. package/dist/termCollection.unit.spec-WTICTZ7H.js +299 -0
  301. package/dist/termCollectionFractionSelection-K5HPDEFP.js +42 -0
  302. package/dist/termCollectionFractionSelection.unit.spec-D7DG2HOI.js +188 -0
  303. package/dist/tk-DD2LWVGM.js +1121 -0
  304. package/dist/tk-NV7NBLT6.js +41 -0
  305. package/dist/tp.ui-B5J3UUVB.js +1454 -0
  306. package/dist/tvs.dt-XLKQT64T.js +34 -0
  307. package/dist/tvs.dtcnv.categorical-XIC3RH2D.js +35 -0
  308. package/dist/tvs.dtcnv.continuous-OA2K4LHF.js +67 -0
  309. package/dist/tvs.dtfusion-ZGNKALZB.js +35 -0
  310. package/dist/tvs.dtitd-6QSG4E34.js +35 -0
  311. package/dist/tvs.dtsnvindel-5CXXOGPH.js +35 -0
  312. package/dist/tvs.dtsv-QYYEYUD3.js +35 -0
  313. package/dist/tvs.samplelst-X77ODFFR.js +98 -0
  314. package/dist/tvs.termCollection-VXROWAPS.js +124 -0
  315. package/dist/vocabulary-DKWYTZRC.js +36 -0
  316. package/dist/wsi.direct-C3HQEC2V.js +8184 -0
  317. package/dist/wsi.direct-C3HQEC2V.js.map +7 -0
  318. package/package.json +3 -3
  319. package/dist/2dmaf-JIY57FG6.js +0 -1367
  320. package/dist/AIProjectAdmin-DGTBIE6E.js +0 -952
  321. package/dist/AIProjectAdmin-DGTBIE6E.js.map +0 -7
  322. package/dist/AggMatrixInput-FH6WRTLP.js +0 -277
  323. package/dist/AggregateMatrix-MGEX5AVF.js +0 -41
  324. package/dist/AppHeader-FFOQFH55.js +0 -830
  325. package/dist/BoxPlot-KCY4JVRX.js +0 -1211
  326. package/dist/CorrelationVolcano-E5URKQSM.js +0 -614
  327. package/dist/Cuminc-CBPMCKIC.js +0 -1219
  328. package/dist/DE-VANPWKZI.js +0 -88
  329. package/dist/DE-VANPWKZI.js.map +0 -7
  330. package/dist/DEinput-MONPHDB2.js +0 -405
  331. package/dist/DEinput-MONPHDB2.js.map +0 -7
  332. package/dist/DifferentialAnalysis-XRBS4PZI.js +0 -237
  333. package/dist/Disco-V2VJIDWG.js +0 -3389
  334. package/dist/Disco.UI-OEF5JXBU.js +0 -243
  335. package/dist/DmrPlot-KZUWJWBD.js +0 -637
  336. package/dist/GB-IYTEMMU7.js +0 -1391
  337. package/dist/GSEA-QB62B5KB.js +0 -851
  338. package/dist/GeneExpInput-CXX7SXMQ.js +0 -362
  339. package/dist/Geomap-QNHSCN4N.js +0 -84
  340. package/dist/HicApp-UIULZYYJ.js +0 -2245
  341. package/dist/IDCViewer-B2JENGZZ.js +0 -10812
  342. package/dist/NumBinaryEditor-JOU2J23M.js +0 -279
  343. package/dist/NumBinaryEditor.unit.spec-UXZBBVWL.js +0 -312
  344. package/dist/NumContEditor-BJGP4PVS.js +0 -105
  345. package/dist/NumContEditor.unit.spec-HEXOYIXC.js +0 -164
  346. package/dist/NumCustomBinEditor-HDRTVWNK.js +0 -33
  347. package/dist/NumCustomBinEditor.unit.spec-MN6QZ3ZB.js +0 -397
  348. package/dist/NumDiscreteEditor-JUBR45IJ.js +0 -170
  349. package/dist/NumDiscreteEditor.unit.spec-SDK2LR5B.js +0 -233
  350. package/dist/NumRegularBinEditor-AQPRZ3MI.js +0 -33
  351. package/dist/NumRegularBinEditor.unit.spec-GM3SFB2N.js +0 -278
  352. package/dist/NumSplineEditor-LYLROEGE.js +0 -210
  353. package/dist/NumSplineEditor.unit.spec-3Q2HP6IB.js +0 -224
  354. package/dist/NumericDensity-3ZCDZORO.js +0 -33
  355. package/dist/NumericDensity.unit.spec-MNIAR2PR.js +0 -418
  356. package/dist/NumericHandler-MUNEB5IS.js +0 -34
  357. package/dist/NumericHandler.unit.spec-KPWG2T27.js +0 -214
  358. package/dist/ProteomeInput-NEUHQ2G4.js +0 -388
  359. package/dist/Regression-C75T5LOY.js +0 -1416
  360. package/dist/RunChart2-CMQ2BBSJ.js +0 -749
  361. package/dist/SC-HYK26DXI.js +0 -1107
  362. package/dist/Violin-J5Z3NKMU.js +0 -1082
  363. package/dist/Volcano-VZGOJFM7.js +0 -1573
  364. package/dist/Volcano-VZGOJFM7.js.map +0 -7
  365. package/dist/WSIViewer-EEKHINZU.js +0 -18892
  366. package/dist/WSIViewer-EEKHINZU.js.map +0 -7
  367. package/dist/Wsi-ZP36MKK7.js +0 -431
  368. package/dist/WsiSamplesPlot-6G3U7U5L.js +0 -160
  369. package/dist/WsiSamplesPlot-6G3U7U5L.js.map +0 -7
  370. package/dist/adSandbox-W4THMDUI.js +0 -33
  371. package/dist/animatedBubbleChart-2IVR2WC3.js +0 -547
  372. package/dist/app-LAIPU5IO.js +0 -42
  373. package/dist/app-WMRDJINC.js +0 -32
  374. package/dist/bam-44WCWB5P.js +0 -876
  375. package/dist/barchart-P6XKCJRF.js +0 -42
  376. package/dist/barchart2-5NTYCQYN.js +0 -309
  377. package/dist/block-VEOD6CP4.js +0 -6249
  378. package/dist/block.init-RCPDUYAV.js +0 -33
  379. package/dist/block.mds.expressionrank-KALPK27B.js +0 -354
  380. package/dist/block.mds.geneboxplot-ZASU25BG.js +0 -823
  381. package/dist/block.mds.junction-DCVGVSYG.js +0 -1539
  382. package/dist/block.mds.svcnv-CEGYMRSE.js +0 -6796
  383. package/dist/block.svg-AW4E7NSS.js +0 -159
  384. package/dist/block.tk.aicheck-4ZPFLI5I.js +0 -278
  385. package/dist/block.tk.ase-F3VMNBE3.js +0 -360
  386. package/dist/block.tk.bam-3VDSEMVO.js +0 -1901
  387. package/dist/block.tk.bedgraphdot-3F6AMWFD.js +0 -379
  388. package/dist/block.tk.bigwig.ui-QO334QC3.js +0 -206
  389. package/dist/block.tk.hicstraw-VA7GNOOD.js +0 -818
  390. package/dist/block.tk.junction-7WIZ63R7.js +0 -2358
  391. package/dist/block.tk.junction.textmatrixui-ZHSVODGI.js +0 -194
  392. package/dist/block.tk.ld-JME4SP6A.js +0 -94
  393. package/dist/block.tk.menu-7BFQTH3Q.js +0 -1024
  394. package/dist/block.tk.pgv-C2N7UFYT.js +0 -938
  395. package/dist/brainImaging-6XFUKFZE.js +0 -515
  396. package/dist/brainRegions-SEMS7V4O.js +0 -216
  397. package/dist/brainRegions-SEMS7V4O.js.map +0 -7
  398. package/dist/bubbleHeatmap-YO4232WO.js +0 -378
  399. package/dist/cellTypeBubbleHeatmap-GM4BGCQ3.js +0 -278
  400. package/dist/chunk-2YDQC5BV.js +0 -562
  401. package/dist/chunk-3QMXNK7G.js +0 -379
  402. package/dist/chunk-4C2N2BQC.js +0 -6360
  403. package/dist/chunk-4Q46RDNU.js +0 -34
  404. package/dist/chunk-4YEDSMFX.js +0 -123
  405. package/dist/chunk-56HEUYYM.js +0 -2891
  406. package/dist/chunk-56HEUYYM.js.map +0 -7
  407. package/dist/chunk-5VMEMA4O.js +0 -158
  408. package/dist/chunk-66BJC6ZX.js +0 -217
  409. package/dist/chunk-6RN4RVKF.js +0 -480
  410. package/dist/chunk-6SKLD7JU.js +0 -59
  411. package/dist/chunk-7C45EYL6.js +0 -274
  412. package/dist/chunk-7RX5UEF3.js +0 -24193
  413. package/dist/chunk-7RX5UEF3.js.map +0 -7
  414. package/dist/chunk-AAM7HHPU.js +0 -103
  415. package/dist/chunk-AFMD6226.js +0 -240
  416. package/dist/chunk-AK3SW3VT.js +0 -176
  417. package/dist/chunk-BBYVVPEO.js +0 -1271
  418. package/dist/chunk-BBYVVPEO.js.map +0 -7
  419. package/dist/chunk-BMVRYEN2.js +0 -397
  420. package/dist/chunk-BZYTL2EU.js +0 -294
  421. package/dist/chunk-CLOHFGFX.js +0 -14
  422. package/dist/chunk-DAJT3XVZ.js +0 -31
  423. package/dist/chunk-DKPV7GCZ.js +0 -7966
  424. package/dist/chunk-DKPV7GCZ.js.map +0 -7
  425. package/dist/chunk-DMT6S5HJ.js +0 -5071
  426. package/dist/chunk-DO4SLQNP.js +0 -194
  427. package/dist/chunk-DUGOFIQS.js +0 -464
  428. package/dist/chunk-E3O6ZEWQ.js +0 -129
  429. package/dist/chunk-EJ3SSI5J.js +0 -382
  430. package/dist/chunk-FSDY4QVA.js +0 -272
  431. package/dist/chunk-FUEJFIQX.js +0 -203
  432. package/dist/chunk-FUSTNOQZ.js +0 -2130
  433. package/dist/chunk-FUSTNOQZ.js.map +0 -7
  434. package/dist/chunk-GAW2EETX.js +0 -281
  435. package/dist/chunk-GF6CKFXE.js +0 -1720
  436. package/dist/chunk-GI3RVOO4.js +0 -339
  437. package/dist/chunk-GQ6T62VJ.js +0 -141
  438. package/dist/chunk-GTMHDSOQ.js +0 -550
  439. package/dist/chunk-H555QBYP.js +0 -243
  440. package/dist/chunk-HKQDZKSF.js +0 -119
  441. package/dist/chunk-HLZVDBAI.js +0 -1985
  442. package/dist/chunk-HLZVDBAI.js.map +0 -7
  443. package/dist/chunk-HWMZ2OHD.js +0 -49
  444. package/dist/chunk-JG6SE6YU.js +0 -1339
  445. package/dist/chunk-JSVLKCIQ.js +0 -160
  446. package/dist/chunk-JVRGY6IU.js +0 -54
  447. package/dist/chunk-JXUFZZRJ.js +0 -626
  448. package/dist/chunk-K5YG7MVJ.js +0 -2676
  449. package/dist/chunk-KAUMP3RR.js +0 -56
  450. package/dist/chunk-KLGNLUXR.js +0 -518
  451. package/dist/chunk-KWLBPOPE.js +0 -38
  452. package/dist/chunk-L42F5J5C.js +0 -185
  453. package/dist/chunk-L42F5J5C.js.map +0 -7
  454. package/dist/chunk-LXTBOUBG.js +0 -677
  455. package/dist/chunk-MCRWA655.js +0 -98
  456. package/dist/chunk-NGBQL4CM.js +0 -54
  457. package/dist/chunk-OKUFTLFL.js +0 -4297
  458. package/dist/chunk-OKUFTLFL.js.map +0 -7
  459. package/dist/chunk-ONXYJWY6.js +0 -102
  460. package/dist/chunk-OYHID2D7.js +0 -50
  461. package/dist/chunk-PT5JDHPR.js +0 -42
  462. package/dist/chunk-PZZIDJIB.js +0 -806
  463. package/dist/chunk-PZZIDJIB.js.map +0 -7
  464. package/dist/chunk-S5SOLLGM.js +0 -1654
  465. package/dist/chunk-S5SOLLGM.js.map +0 -7
  466. package/dist/chunk-S6XG74R4.js +0 -70
  467. package/dist/chunk-TAEU6SPJ.js +0 -197
  468. package/dist/chunk-UBZRZ3PS.js +0 -102
  469. package/dist/chunk-VHDVTQFR.js +0 -2784
  470. package/dist/chunk-VRY7WSS6.js +0 -170
  471. package/dist/chunk-VSPUFGDX.js +0 -339
  472. package/dist/chunk-VVDFRJVN.js +0 -306
  473. package/dist/chunk-VVDFRJVN.js.map +0 -7
  474. package/dist/chunk-WFOC4W5A.js +0 -55
  475. package/dist/chunk-WVPFLPWB.js +0 -402
  476. package/dist/chunk-WZUUWGEU.js +0 -22834
  477. package/dist/chunk-WZUUWGEU.js.map +0 -7
  478. package/dist/chunk-X7IAKV5Z.js +0 -276
  479. package/dist/chunk-XHOL37O6.js +0 -299
  480. package/dist/chunk-XJGPL2JZ.js +0 -39
  481. package/dist/chunk-XJGPL2JZ.js.map +0 -7
  482. package/dist/chunk-XPB2GP3C.js +0 -2327
  483. package/dist/chunk-XPVU5AMT.js +0 -263
  484. package/dist/chunk-YLWSTPPL.js +0 -302
  485. package/dist/chunk-YZVWOQBP.js +0 -134
  486. package/dist/chunk-ZB3RP5QP.js +0 -446
  487. package/dist/chunk-ZU47ERPU.js +0 -26
  488. package/dist/cohort-ZTT2PSQA.js +0 -70
  489. package/dist/condition-L5DXIAJT.js +0 -327
  490. package/dist/controls-ROZP2O7A.js +0 -34
  491. package/dist/controls.config-YQKGHMIP.js +0 -34
  492. package/dist/correlation-6AKRIQXN.js +0 -95
  493. package/dist/customdata.inputui-DD3OFHUS.js +0 -284
  494. package/dist/dataDownload-VHHSLSZV.js +0 -329
  495. package/dist/databrowser.ui-RLYJOEWQ.js +0 -425
  496. package/dist/dictionary-IMOOQHIH.js +0 -113
  497. package/dist/dnaMethylation-T6XUIOJF.js +0 -33
  498. package/dist/dnaMethylation.integration.spec-NRJOIDRD.js +0 -198
  499. package/dist/dofetch-MLAEV3A2.js +0 -48
  500. package/dist/e2pca-F3TGJOMW.js +0 -344
  501. package/dist/ep-UAF6OL2Y.js +0 -1249
  502. package/dist/expclust.gdc.spec-GHH3JQ65.js +0 -302
  503. package/dist/facet-MB4C7GII.js +0 -519
  504. package/dist/gb-C5YSAFWP.js +0 -81
  505. package/dist/geneExpClustering-3BRSI5BR.js +0 -244
  506. package/dist/geneExpression-K3IZLSYC.js +0 -310
  507. package/dist/geneExpression-SIAPRA3E.js +0 -33
  508. package/dist/geneExpression.unit.spec-I66QVNT5.js +0 -99
  509. package/dist/geneORA-SLM3SNNS.js +0 -273
  510. package/dist/geneRanking-4EFYOR6A.js +0 -548
  511. package/dist/geneVariant-O347F2OY.js +0 -286
  512. package/dist/geneVariant-Z3BUIBLS.js +0 -36
  513. package/dist/geneVariant.integration.spec-ZZ65EYEL.js +0 -388
  514. package/dist/genefusion.ui-TK6UKPDR.js +0 -303
  515. package/dist/geneset-MVXSEOKZ.js +0 -203
  516. package/dist/genomeBrowser.spec-QDB4Z2L6.js +0 -276
  517. package/dist/grin2-DCU6PLPU.js +0 -70
  518. package/dist/grin2-P6Z45MCJ.js +0 -1137
  519. package/dist/hierCluster-3H47NLKS.js +0 -55
  520. package/dist/hierCluster-JG6VXTCV.js +0 -59
  521. package/dist/hierCluster.config-IP6I7RTS.js +0 -36
  522. package/dist/hierCluster.integration.spec-7PUNHRRS.js +0 -483
  523. package/dist/hierCluster.interactivity-FIDVRACV.js +0 -49
  524. package/dist/hierCluster.renderers-QMJWUPAI.js +0 -19
  525. package/dist/imagePlot-CXYKBCWS.js +0 -156
  526. package/dist/importPlot-Z4A54RXH.js +0 -8
  527. package/dist/isoformExpression-DMDV2PZY.js +0 -35
  528. package/dist/isoformExpression.unit.spec-W2LIYOXS.js +0 -237
  529. package/dist/junction-R5GMEO7Z.js +0 -36
  530. package/dist/junction.customTerm-AI44GNFV.js +0 -16
  531. package/dist/junction.unit.spec-SCRCANOC.js +0 -182
  532. package/dist/launch.adhoc-THLTYZJT.js +0 -37
  533. package/dist/leftlabel.sample-GKQXEY4J.js +0 -258
  534. package/dist/lollipop-2TW6GGPY.js +0 -166
  535. package/dist/maf-A4PVW5V2.js +0 -455
  536. package/dist/maftimeline-QMX3HOAU.js +0 -587
  537. package/dist/matrix-BGRYRU3T.js +0 -54
  538. package/dist/matrix-GPXTUVCQ.js +0 -59
  539. package/dist/matrix.cells-C6OY7F5T.js +0 -26
  540. package/dist/matrix.config-Z5ZGHXDV.js +0 -37
  541. package/dist/matrix.data-WB26I3TF.js +0 -23
  542. package/dist/matrix.groups-C2V2CV4A.js +0 -26
  543. package/dist/matrix.integration.spec-3COAXQBV.js +0 -3160
  544. package/dist/matrix.interactivity-NGHIQR3A.js +0 -37
  545. package/dist/matrix.layout-NYIOESGN.js +0 -39
  546. package/dist/matrix.legend-Q5HHWP5Q.js +0 -20
  547. package/dist/matrix.renderers-GLXZARIP.js +0 -34
  548. package/dist/matrix.serieses-LDQEPXPD.js +0 -19
  549. package/dist/matrix.sort-44TQNRIX.js +0 -26
  550. package/dist/matrix.sort.unit.spec-T3BDWJ3Z.js +0 -468
  551. package/dist/matrix.sorterUi-6Y4YBQYL.js +0 -16
  552. package/dist/matrix.sorterUi.unit.spec-NHUYNMNU.js +0 -338
  553. package/dist/matrix.unit.spec-C7IRIBN6.js +0 -150
  554. package/dist/mavb-E37LI73X.js +0 -727
  555. package/dist/mds.fimo-YTGX7VEN.js +0 -513
  556. package/dist/mds.samplescatterplot-FFGGJSI3.js +0 -1545
  557. package/dist/mds.survivalplot-NCWRXXV4.js +0 -477
  558. package/dist/multivalue-N7A2PU5K.js +0 -83
  559. package/dist/numericDictTermCluster-AKQKRBQH.js +0 -63
  560. package/dist/oncomatrix-QPVGACMF.js +0 -290
  561. package/dist/oncomatrix.spec-6L2NDN2G.js +0 -443
  562. package/dist/plot.2dvaf-6TLON77B.js +0 -372
  563. package/dist/plot.app-VM273TXU.js +0 -36
  564. package/dist/plot.barplot-IQTZURHK.js +0 -97
  565. package/dist/plot.boxplot-WEXB6HII.js +0 -146
  566. package/dist/plot.brainImaging-REGSSBHV.js +0 -51
  567. package/dist/plot.disco-F25Z3FQL.js +0 -99
  568. package/dist/plot.ssgq-CRRK26RS.js +0 -134
  569. package/dist/plot.vaf2cov-WCNPZKXK.js +0 -253
  570. package/dist/plot.wsi-6OAPT5BA.js +0 -36
  571. package/dist/plot.wsi-6OAPT5BA.js.map +0 -7
  572. package/dist/polar2-MH5GPXHJ.js +0 -232
  573. package/dist/profileForms-2YX2OYDI.js +0 -941
  574. package/dist/profilePlot-FUTMZ2PP.js +0 -49
  575. package/dist/proteinView-6Z4ALZW2.js +0 -1562
  576. package/dist/proteomeCohortCompare-6GLFOYI5.js +0 -780
  577. package/dist/pseudbulk.unit.spec-S7FDL3IX.js +0 -86
  578. package/dist/pseudobulk-A3LB23N2.js +0 -35
  579. package/dist/qualitative-5VJRMF4S.js +0 -38
  580. package/dist/radar2-2SJX4ZXN.js +0 -327
  581. package/dist/radarFacility2-7FPO34JS.js +0 -335
  582. package/dist/rememberedGvQ.unit.spec-WOQVPQ75.js +0 -211
  583. package/dist/render-ZLA2RRBP.js +0 -33
  584. package/dist/report-VCE6RILD.js +0 -217
  585. package/dist/sampleView-QYTX4OLI.js +0 -43
  586. package/dist/samplelst-7NGH3SUM.js +0 -106
  587. package/dist/samplematrix-SNAR6IBB.js +0 -2193
  588. package/dist/sc-2JETYAI4.js +0 -81
  589. package/dist/scatter-D7VZOBEE.js +0 -880
  590. package/dist/scatter-GHBQM2RR.js +0 -88
  591. package/dist/selectGenomeWithTklst-BD4GMGX3.js +0 -129
  592. package/dist/singleCellCellType-XHLOJVVC.js +0 -33
  593. package/dist/singleCellCellType.unit.spec-LCLR3IOD.js +0 -154
  594. package/dist/singleCellGeneExpression-JRBONI5C.js +0 -33
  595. package/dist/singleCellGeneExpression.unit.spec-Z2KSVCIG.js +0 -148
  596. package/dist/singleCellPlot-4462CQHF.js +0 -49
  597. package/dist/singlecell-CDUQ6MTO.js +0 -81
  598. package/dist/singlecell-SO3B5KJ7.js +0 -1566
  599. package/dist/snp-YE2MXKJO.js +0 -33
  600. package/dist/snp.unit.spec-MT57TGGQ.js +0 -171
  601. package/dist/snplocus-RSNKWY63.js +0 -203
  602. package/dist/spliceevent.a53ss.diagram-6N6YGYV7.js +0 -146
  603. package/dist/spliceevent.exonskip.diagram-LMNUS4XV.js +0 -278
  604. package/dist/spliceevent.noeventdiagram-LTBH4YD5.js +0 -455
  605. package/dist/ssGSEA-DPK4PDM2.js +0 -33
  606. package/dist/ssGSEA.unit.spec-K2SA7ME7.js +0 -83
  607. package/dist/stattable-PR47XT4F.js +0 -117
  608. package/dist/studyCatalog-GMUWIUL4.js +0 -378
  609. package/dist/summarizeCnvGeneexp-YZEMDLES.js +0 -158
  610. package/dist/summarizeGeneexpSurvival-3TXV6ZNI.js +0 -105
  611. package/dist/summarizeMutationCnv-EBWSEHWJ.js +0 -159
  612. package/dist/summarizeMutationDiagnosis-FXA25W3O.js +0 -35
  613. package/dist/summarizeMutationSurvival-MR4AOMNS.js +0 -99
  614. package/dist/summary-4C6LGTMF.js +0 -42
  615. package/dist/summary.integration.spec-Y6JLH7NH.js +0 -409
  616. package/dist/summaryInput-NWT2DXWU.js +0 -242
  617. package/dist/sunburst-266MA7E2.js +0 -278
  618. package/dist/survival-CAZCIY2N.js +0 -53
  619. package/dist/survival-EILGNIY7.js +0 -1246
  620. package/dist/survival-EILGNIY7.js.map +0 -7
  621. package/dist/survival.integration.spec-34JJVLLI.js +0 -613
  622. package/dist/svgraph-OFUESREM.js +0 -1382
  623. package/dist/svmr-PVH42MY4.js +0 -3837
  624. package/dist/table-C2SICFZV.js +0 -197
  625. package/dist/termCollection-H4RL5WJG.js +0 -33
  626. package/dist/termCollection-TGYDI7NP.js +0 -252
  627. package/dist/termCollection.unit.spec-JSALS7GL.js +0 -299
  628. package/dist/termCollectionFractionSelection-YJVDNV4I.js +0 -42
  629. package/dist/termCollectionFractionSelection.unit.spec-4GM7P4ZW.js +0 -188
  630. package/dist/tk-RZCPSHJG.js +0 -1121
  631. package/dist/tk-SNTRA5CC.js +0 -41
  632. package/dist/tp.ui-2W4K3XH6.js +0 -1454
  633. package/dist/tvs.dt-GIPVC3R6.js +0 -34
  634. package/dist/tvs.dtcnv.categorical-TEYAS4OU.js +0 -35
  635. package/dist/tvs.dtcnv.continuous-VQRATYPZ.js +0 -67
  636. package/dist/tvs.dtfusion-P2KF5Z4H.js +0 -35
  637. package/dist/tvs.dtitd-TM6UROSH.js +0 -35
  638. package/dist/tvs.dtsnvindel-FZXC23NF.js +0 -35
  639. package/dist/tvs.dtsv-Y5QEJPYG.js +0 -35
  640. package/dist/tvs.samplelst-MLAFPFER.js +0 -98
  641. package/dist/tvs.termCollection-ZQQDKESH.js +0 -124
  642. package/dist/vocabulary-JRUZPHMG.js +0 -36
  643. package/dist/wsi.direct-6QYNXOBY.js +0 -244
  644. package/dist/wsi.direct-6QYNXOBY.js.map +0 -7
  645. /package/dist/{2dmaf-JIY57FG6.js.map → 2dmaf-ZQ7ACPAD.js.map} +0 -0
  646. /package/dist/{AggMatrixInput-FH6WRTLP.js.map → AggMatrixInput-EACGUIQA.js.map} +0 -0
  647. /package/dist/{AggregateMatrix-MGEX5AVF.js.map → AggregateMatrix-TC5DTSYN.js.map} +0 -0
  648. /package/dist/{AppHeader-FFOQFH55.js.map → AppHeader-PHI6US5B.js.map} +0 -0
  649. /package/dist/{BoxPlot-KCY4JVRX.js.map → BoxPlot-QWKK3IJ7.js.map} +0 -0
  650. /package/dist/{CorrelationVolcano-E5URKQSM.js.map → CorrelationVolcano-QJJN7FVP.js.map} +0 -0
  651. /package/dist/{Cuminc-CBPMCKIC.js.map → Cuminc-6F2C5C4E.js.map} +0 -0
  652. /package/dist/{DifferentialAnalysis-XRBS4PZI.js.map → DifferentialAnalysis-XGXHWGPI.js.map} +0 -0
  653. /package/dist/{Disco-V2VJIDWG.js.map → Disco-7SRTTB3X.js.map} +0 -0
  654. /package/dist/{Disco.UI-OEF5JXBU.js.map → Disco.UI-CKKZ5MMK.js.map} +0 -0
  655. /package/dist/{DmrPlot-KZUWJWBD.js.map → DmrPlot-N4CT4J2I.js.map} +0 -0
  656. /package/dist/{GB-IYTEMMU7.js.map → GB-NVCLPRWN.js.map} +0 -0
  657. /package/dist/{GSEA-QB62B5KB.js.map → GSEA-UZUNJG7Z.js.map} +0 -0
  658. /package/dist/{GeneExpInput-CXX7SXMQ.js.map → GeneExpInput-3MDN2CAW.js.map} +0 -0
  659. /package/dist/{Geomap-QNHSCN4N.js.map → Geomap-ZUF2PE5A.js.map} +0 -0
  660. /package/dist/{HicApp-UIULZYYJ.js.map → HicApp-OIJT5TFU.js.map} +0 -0
  661. /package/dist/{IDCViewer-B2JENGZZ.js.map → IDCViewer-ZSH2E57L.js.map} +0 -0
  662. /package/dist/{NumBinaryEditor-JOU2J23M.js.map → NumBinaryEditor-74ZPGT7L.js.map} +0 -0
  663. /package/dist/{NumBinaryEditor.unit.spec-UXZBBVWL.js.map → NumBinaryEditor.unit.spec-T2I66SO5.js.map} +0 -0
  664. /package/dist/{NumContEditor-BJGP4PVS.js.map → NumContEditor-M2GARZXM.js.map} +0 -0
  665. /package/dist/{NumContEditor.unit.spec-HEXOYIXC.js.map → NumContEditor.unit.spec-G2QBBNH7.js.map} +0 -0
  666. /package/dist/{NumCustomBinEditor-HDRTVWNK.js.map → NumCustomBinEditor-P44G67KS.js.map} +0 -0
  667. /package/dist/{NumCustomBinEditor.unit.spec-MN6QZ3ZB.js.map → NumCustomBinEditor.unit.spec-AZHJN3V6.js.map} +0 -0
  668. /package/dist/{NumDiscreteEditor-JUBR45IJ.js.map → NumDiscreteEditor-VOZ63LZY.js.map} +0 -0
  669. /package/dist/{NumDiscreteEditor.unit.spec-SDK2LR5B.js.map → NumDiscreteEditor.unit.spec-CFSVPNBA.js.map} +0 -0
  670. /package/dist/{NumRegularBinEditor-AQPRZ3MI.js.map → NumRegularBinEditor-I6GJQR7W.js.map} +0 -0
  671. /package/dist/{NumRegularBinEditor.unit.spec-GM3SFB2N.js.map → NumRegularBinEditor.unit.spec-IDJE7H6S.js.map} +0 -0
  672. /package/dist/{NumSplineEditor-LYLROEGE.js.map → NumSplineEditor-BCGWE52A.js.map} +0 -0
  673. /package/dist/{NumSplineEditor.unit.spec-3Q2HP6IB.js.map → NumSplineEditor.unit.spec-YQAL7L2E.js.map} +0 -0
  674. /package/dist/{NumericDensity-3ZCDZORO.js.map → NumericDensity-P25W63RV.js.map} +0 -0
  675. /package/dist/{NumericDensity.unit.spec-MNIAR2PR.js.map → NumericDensity.unit.spec-N7CQ5W5L.js.map} +0 -0
  676. /package/dist/{NumericHandler-MUNEB5IS.js.map → NumericHandler-R7JWIFEO.js.map} +0 -0
  677. /package/dist/{NumericHandler.unit.spec-KPWG2T27.js.map → NumericHandler.unit.spec-LMGIAGZJ.js.map} +0 -0
  678. /package/dist/{ProteomeInput-NEUHQ2G4.js.map → ProteomeInput-PRYKKF5E.js.map} +0 -0
  679. /package/dist/{Regression-C75T5LOY.js.map → Regression-PSHH7ZXN.js.map} +0 -0
  680. /package/dist/{RunChart2-CMQ2BBSJ.js.map → RunChart2-KJ2UWVCE.js.map} +0 -0
  681. /package/dist/{SC-HYK26DXI.js.map → SC-R6ZIJZ6F.js.map} +0 -0
  682. /package/dist/{Violin-J5Z3NKMU.js.map → Violin-GTQAUJ7B.js.map} +0 -0
  683. /package/dist/{Wsi-ZP36MKK7.js.map → Wsi-GXNGL7O6.js.map} +0 -0
  684. /package/dist/{adSandbox-W4THMDUI.js.map → adSandbox-SXSHVG4P.js.map} +0 -0
  685. /package/dist/{animatedBubbleChart-2IVR2WC3.js.map → animatedBubbleChart-Q4NEETEH.js.map} +0 -0
  686. /package/dist/{app-LAIPU5IO.js.map → app-MX4PL2QO.js.map} +0 -0
  687. /package/dist/{app-WMRDJINC.js.map → app-R5CTEVAC.js.map} +0 -0
  688. /package/dist/{bam-44WCWB5P.js.map → bam-45N3FEEM.js.map} +0 -0
  689. /package/dist/{barchart-P6XKCJRF.js.map → barchart-YCTKQJQX.js.map} +0 -0
  690. /package/dist/{barchart2-5NTYCQYN.js.map → barchart2-252GS3CA.js.map} +0 -0
  691. /package/dist/{block-VEOD6CP4.js.map → block-CR75JHV3.js.map} +0 -0
  692. /package/dist/{block.init-RCPDUYAV.js.map → block.init-U3JMED2E.js.map} +0 -0
  693. /package/dist/{block.mds.expressionrank-KALPK27B.js.map → block.mds.expressionrank-TAN3BDPS.js.map} +0 -0
  694. /package/dist/{block.mds.geneboxplot-ZASU25BG.js.map → block.mds.geneboxplot-EN344GEP.js.map} +0 -0
  695. /package/dist/{block.mds.junction-DCVGVSYG.js.map → block.mds.junction-RFVVJUTR.js.map} +0 -0
  696. /package/dist/{block.mds.svcnv-CEGYMRSE.js.map → block.mds.svcnv-SSUMXEWD.js.map} +0 -0
  697. /package/dist/{block.svg-AW4E7NSS.js.map → block.svg-LRPGNFFI.js.map} +0 -0
  698. /package/dist/{block.tk.aicheck-4ZPFLI5I.js.map → block.tk.aicheck-YY23FT2G.js.map} +0 -0
  699. /package/dist/{block.tk.ase-F3VMNBE3.js.map → block.tk.ase-JCGPFKFT.js.map} +0 -0
  700. /package/dist/{block.tk.bam-3VDSEMVO.js.map → block.tk.bam-NZDC4H7Y.js.map} +0 -0
  701. /package/dist/{block.tk.bedgraphdot-3F6AMWFD.js.map → block.tk.bedgraphdot-NCNZPZH6.js.map} +0 -0
  702. /package/dist/{block.tk.bigwig.ui-QO334QC3.js.map → block.tk.bigwig.ui-Z7G6ZITU.js.map} +0 -0
  703. /package/dist/{block.tk.hicstraw-VA7GNOOD.js.map → block.tk.hicstraw-VVDP4UF5.js.map} +0 -0
  704. /package/dist/{block.tk.junction-7WIZ63R7.js.map → block.tk.junction-L4YBPAHM.js.map} +0 -0
  705. /package/dist/{block.tk.junction.textmatrixui-ZHSVODGI.js.map → block.tk.junction.textmatrixui-6CMKKUB5.js.map} +0 -0
  706. /package/dist/{block.tk.ld-JME4SP6A.js.map → block.tk.ld-VCP2R5UO.js.map} +0 -0
  707. /package/dist/{block.tk.menu-7BFQTH3Q.js.map → block.tk.menu-ZJYGMEDX.js.map} +0 -0
  708. /package/dist/{block.tk.pgv-C2N7UFYT.js.map → block.tk.pgv-M5WNUIVS.js.map} +0 -0
  709. /package/dist/{brainImaging-6XFUKFZE.js.map → brainImaging-JGECJHZO.js.map} +0 -0
  710. /package/dist/{bubbleHeatmap-YO4232WO.js.map → bubbleHeatmap-7DQNWBQ2.js.map} +0 -0
  711. /package/dist/{cellTypeBubbleHeatmap-GM4BGCQ3.js.map → cellTypeBubbleHeatmap-LAE7U3RF.js.map} +0 -0
  712. /package/dist/{chunk-JXUFZZRJ.js.map → chunk-2AQT3ZWL.js.map} +0 -0
  713. /package/dist/{chunk-FUEJFIQX.js.map → chunk-2GLNPB5J.js.map} +0 -0
  714. /package/dist/{chunk-7C45EYL6.js.map → chunk-2O4CS3EZ.js.map} +0 -0
  715. /package/dist/{chunk-4C2N2BQC.js.map → chunk-3MFFZRH3.js.map} +0 -0
  716. /package/dist/{chunk-S6XG74R4.js.map → chunk-4AQQ3BXD.js.map} +0 -0
  717. /package/dist/{chunk-GAW2EETX.js.map → chunk-4PPZYVWZ.js.map} +0 -0
  718. /package/dist/{chunk-ZU47ERPU.js.map → chunk-4WEA7HHH.js.map} +0 -0
  719. /package/dist/{chunk-KWLBPOPE.js.map → chunk-57NYHASA.js.map} +0 -0
  720. /package/dist/{chunk-GQ6T62VJ.js.map → chunk-5AAAH4OZ.js.map} +0 -0
  721. /package/dist/{chunk-6RN4RVKF.js.map → chunk-5BCNVZIW.js.map} +0 -0
  722. /package/dist/{chunk-JG6SE6YU.js.map → chunk-6JBQLOJW.js.map} +0 -0
  723. /package/dist/{chunk-5VMEMA4O.js.map → chunk-756KZF5Y.js.map} +0 -0
  724. /package/dist/{chunk-X7IAKV5Z.js.map → chunk-ABTO5QSB.js.map} +0 -0
  725. /package/dist/{chunk-XHOL37O6.js.map → chunk-ALEZQQOK.js.map} +0 -0
  726. /package/dist/{chunk-UBZRZ3PS.js.map → chunk-APK7TUJX.js.map} +0 -0
  727. /package/dist/{chunk-6SKLD7JU.js.map → chunk-AQAFURQM.js.map} +0 -0
  728. /package/dist/{chunk-HWMZ2OHD.js.map → chunk-CZ5QLVWK.js.map} +0 -0
  729. /package/dist/{chunk-AK3SW3VT.js.map → chunk-D2MZT7CC.js.map} +0 -0
  730. /package/dist/{chunk-4Q46RDNU.js.map → chunk-DE3F7FAP.js.map} +0 -0
  731. /package/dist/{chunk-DUGOFIQS.js.map → chunk-DF3IMIR2.js.map} +0 -0
  732. /package/dist/{chunk-ZB3RP5QP.js.map → chunk-E4WIMTK4.js.map} +0 -0
  733. /package/dist/{chunk-PT5JDHPR.js.map → chunk-E7TJXNIL.js.map} +0 -0
  734. /package/dist/{chunk-AAM7HHPU.js.map → chunk-G3JNTWCX.js.map} +0 -0
  735. /package/dist/{chunk-JSVLKCIQ.js.map → chunk-GN2IIC6U.js.map} +0 -0
  736. /package/dist/{chunk-BZYTL2EU.js.map → chunk-GRI74AXV.js.map} +0 -0
  737. /package/dist/{chunk-GTMHDSOQ.js.map → chunk-IAE3KWN5.js.map} +0 -0
  738. /package/dist/{chunk-BMVRYEN2.js.map → chunk-IB4NE4SI.js.map} +0 -0
  739. /package/dist/{chunk-EJ3SSI5J.js.map → chunk-IS4VLUEX.js.map} +0 -0
  740. /package/dist/{chunk-DO4SLQNP.js.map → chunk-J2DICGKC.js.map} +0 -0
  741. /package/dist/{chunk-XPVU5AMT.js.map → chunk-JBUEQ4E6.js.map} +0 -0
  742. /package/dist/{chunk-K5YG7MVJ.js.map → chunk-JIDJBM2R.js.map} +0 -0
  743. /package/dist/{chunk-JVRGY6IU.js.map → chunk-JNVWSFNC.js.map} +0 -0
  744. /package/dist/{chunk-GF6CKFXE.js.map → chunk-KAFDQKN7.js.map} +0 -0
  745. /package/dist/{chunk-NGBQL4CM.js.map → chunk-LGOTIL62.js.map} +0 -0
  746. /package/dist/{chunk-H555QBYP.js.map → chunk-LHP7RXET.js.map} +0 -0
  747. /package/dist/{chunk-4YEDSMFX.js.map → chunk-LK2GHBUH.js.map} +0 -0
  748. /package/dist/{chunk-KLGNLUXR.js.map → chunk-MAVDQAZE.js.map} +0 -0
  749. /package/dist/{chunk-ONXYJWY6.js.map → chunk-MKT4OJ3G.js.map} +0 -0
  750. /package/dist/{chunk-XPB2GP3C.js.map → chunk-NFAE6VNU.js.map} +0 -0
  751. /package/dist/{chunk-KAUMP3RR.js.map → chunk-NG7K5KYO.js.map} +0 -0
  752. /package/dist/{chunk-WFOC4W5A.js.map → chunk-ODMLC5FN.js.map} +0 -0
  753. /package/dist/{chunk-GI3RVOO4.js.map → chunk-OJ4TDGPQ.js.map} +0 -0
  754. /package/dist/{chunk-3QMXNK7G.js.map → chunk-OXLBPSJ6.js.map} +0 -0
  755. /package/dist/{chunk-MCRWA655.js.map → chunk-P5GRGXH4.js.map} +0 -0
  756. /package/dist/{chunk-DAJT3XVZ.js.map → chunk-POWG4MPT.js.map} +0 -0
  757. /package/dist/{chunk-66BJC6ZX.js.map → chunk-Q25DABNW.js.map} +0 -0
  758. /package/dist/{chunk-TAEU6SPJ.js.map → chunk-R5OIIFSF.js.map} +0 -0
  759. /package/dist/{chunk-VHDVTQFR.js.map → chunk-RJFCT67B.js.map} +0 -0
  760. /package/dist/{chunk-WVPFLPWB.js.map → chunk-RN4BOWRH.js.map} +0 -0
  761. /package/dist/{chunk-YLWSTPPL.js.map → chunk-RZFJ6K77.js.map} +0 -0
  762. /package/dist/{chunk-FSDY4QVA.js.map → chunk-S5UN4VIQ.js.map} +0 -0
  763. /package/dist/{chunk-OYHID2D7.js.map → chunk-SDMNZJ7X.js.map} +0 -0
  764. /package/dist/{chunk-VRY7WSS6.js.map → chunk-SWZAHJYP.js.map} +0 -0
  765. /package/dist/{chunk-2YDQC5BV.js.map → chunk-SY63UUF7.js.map} +0 -0
  766. /package/dist/{chunk-HKQDZKSF.js.map → chunk-T46FA72N.js.map} +0 -0
  767. /package/dist/{chunk-YZVWOQBP.js.map → chunk-VIBK253J.js.map} +0 -0
  768. /package/dist/{chunk-AFMD6226.js.map → chunk-XKL2D2NN.js.map} +0 -0
  769. /package/dist/{chunk-LXTBOUBG.js.map → chunk-XXJT7DSL.js.map} +0 -0
  770. /package/dist/{chunk-DMT6S5HJ.js.map → chunk-YHA3AYAM.js.map} +0 -0
  771. /package/dist/{chunk-VSPUFGDX.js.map → chunk-YN5NY3D3.js.map} +0 -0
  772. /package/dist/{chunk-CLOHFGFX.js.map → chunk-YX6FIREB.js.map} +0 -0
  773. /package/dist/{chunk-E3O6ZEWQ.js.map → chunk-ZXU4ALLZ.js.map} +0 -0
  774. /package/dist/{cohort-ZTT2PSQA.js.map → cohort-75FUW3UO.js.map} +0 -0
  775. /package/dist/{condition-L5DXIAJT.js.map → condition-VW43Q6ZE.js.map} +0 -0
  776. /package/dist/{controls-ROZP2O7A.js.map → controls-HOP2AFHD.js.map} +0 -0
  777. /package/dist/{controls.config-YQKGHMIP.js.map → controls.config-CMIFSKQE.js.map} +0 -0
  778. /package/dist/{correlation-6AKRIQXN.js.map → correlation-PN7BS5OR.js.map} +0 -0
  779. /package/dist/{customdata.inputui-DD3OFHUS.js.map → customdata.inputui-ZBZX63PS.js.map} +0 -0
  780. /package/dist/{dataDownload-VHHSLSZV.js.map → dataDownload-LGA4LAUF.js.map} +0 -0
  781. /package/dist/{databrowser.ui-RLYJOEWQ.js.map → databrowser.ui-IQRDVL66.js.map} +0 -0
  782. /package/dist/{dictionary-IMOOQHIH.js.map → dictionary-BPWD77LJ.js.map} +0 -0
  783. /package/dist/{dnaMethylation-T6XUIOJF.js.map → dnaMethylation-A3XPPBBB.js.map} +0 -0
  784. /package/dist/{dnaMethylation.integration.spec-NRJOIDRD.js.map → dnaMethylation.integration.spec-554ITDQC.js.map} +0 -0
  785. /package/dist/{dofetch-MLAEV3A2.js.map → dofetch-FQ42AX7C.js.map} +0 -0
  786. /package/dist/{e2pca-F3TGJOMW.js.map → e2pca-F3GWG7WZ.js.map} +0 -0
  787. /package/dist/{ep-UAF6OL2Y.js.map → ep-QAVN472H.js.map} +0 -0
  788. /package/dist/{expclust.gdc.spec-GHH3JQ65.js.map → expclust.gdc.spec-DQNX7FTL.js.map} +0 -0
  789. /package/dist/{facet-MB4C7GII.js.map → facet-DH7OOZTJ.js.map} +0 -0
  790. /package/dist/{gb-C5YSAFWP.js.map → gb-OCXOLAMD.js.map} +0 -0
  791. /package/dist/{geneExpClustering-3BRSI5BR.js.map → geneExpClustering-DWYRZGTS.js.map} +0 -0
  792. /package/dist/{geneExpression-SIAPRA3E.js.map → geneExpression-2NKSKZR6.js.map} +0 -0
  793. /package/dist/{geneExpression-K3IZLSYC.js.map → geneExpression-BGFR3KQE.js.map} +0 -0
  794. /package/dist/{geneExpression.unit.spec-I66QVNT5.js.map → geneExpression.unit.spec-63EKKMET.js.map} +0 -0
  795. /package/dist/{geneORA-SLM3SNNS.js.map → geneORA-BED6XL4D.js.map} +0 -0
  796. /package/dist/{geneRanking-4EFYOR6A.js.map → geneRanking-UB5RCQNP.js.map} +0 -0
  797. /package/dist/{geneVariant-O347F2OY.js.map → geneVariant-WJEONTTY.js.map} +0 -0
  798. /package/dist/{geneVariant-Z3BUIBLS.js.map → geneVariant-Y4C2FPJK.js.map} +0 -0
  799. /package/dist/{geneVariant.integration.spec-ZZ65EYEL.js.map → geneVariant.integration.spec-VFYLC47N.js.map} +0 -0
  800. /package/dist/{genefusion.ui-TK6UKPDR.js.map → genefusion.ui-P3NBIMLE.js.map} +0 -0
  801. /package/dist/{geneset-MVXSEOKZ.js.map → geneset-O22RQAED.js.map} +0 -0
  802. /package/dist/{genomeBrowser.spec-QDB4Z2L6.js.map → genomeBrowser.spec-MM7WZUGI.js.map} +0 -0
  803. /package/dist/{grin2-DCU6PLPU.js.map → grin2-3YBIRKUT.js.map} +0 -0
  804. /package/dist/{grin2-P6Z45MCJ.js.map → grin2-O637DNDS.js.map} +0 -0
  805. /package/dist/{hierCluster-3H47NLKS.js.map → hierCluster-3X3BQVNE.js.map} +0 -0
  806. /package/dist/{hierCluster-JG6VXTCV.js.map → hierCluster-7P7M75TU.js.map} +0 -0
  807. /package/dist/{hierCluster.config-IP6I7RTS.js.map → hierCluster.config-XFUOLLDK.js.map} +0 -0
  808. /package/dist/{hierCluster.integration.spec-7PUNHRRS.js.map → hierCluster.integration.spec-HKYGSDDG.js.map} +0 -0
  809. /package/dist/{hierCluster.interactivity-FIDVRACV.js.map → hierCluster.interactivity-JUZSWCM7.js.map} +0 -0
  810. /package/dist/{hierCluster.renderers-QMJWUPAI.js.map → hierCluster.renderers-NGPPAYFM.js.map} +0 -0
  811. /package/dist/{imagePlot-CXYKBCWS.js.map → imagePlot-LKGAFJO7.js.map} +0 -0
  812. /package/dist/{importPlot-Z4A54RXH.js.map → importPlot-SRWQA2FH.js.map} +0 -0
  813. /package/dist/{isoformExpression-DMDV2PZY.js.map → isoformExpression-RYIZQIVX.js.map} +0 -0
  814. /package/dist/{isoformExpression.unit.spec-W2LIYOXS.js.map → isoformExpression.unit.spec-DP4ECITF.js.map} +0 -0
  815. /package/dist/{junction-R5GMEO7Z.js.map → junction-D7QQ3YSG.js.map} +0 -0
  816. /package/dist/{junction.customTerm-AI44GNFV.js.map → junction.customTerm-ZEVNCVU7.js.map} +0 -0
  817. /package/dist/{junction.unit.spec-SCRCANOC.js.map → junction.unit.spec-6MAKIB3R.js.map} +0 -0
  818. /package/dist/{launch.adhoc-THLTYZJT.js.map → launch.adhoc-FAHRZFYG.js.map} +0 -0
  819. /package/dist/{leftlabel.sample-GKQXEY4J.js.map → leftlabel.sample-PDZLWLJ4.js.map} +0 -0
  820. /package/dist/{lollipop-2TW6GGPY.js.map → lollipop-VWGJUHNX.js.map} +0 -0
  821. /package/dist/{maf-A4PVW5V2.js.map → maf-W52H44WK.js.map} +0 -0
  822. /package/dist/{maftimeline-QMX3HOAU.js.map → maftimeline-5JV3HZLE.js.map} +0 -0
  823. /package/dist/{matrix-BGRYRU3T.js.map → matrix-CEVGKXSK.js.map} +0 -0
  824. /package/dist/{matrix-GPXTUVCQ.js.map → matrix-EXNYXYLK.js.map} +0 -0
  825. /package/dist/{matrix.cells-C6OY7F5T.js.map → matrix.cells-DVPWSLJW.js.map} +0 -0
  826. /package/dist/{matrix.config-Z5ZGHXDV.js.map → matrix.config-RLSTWDXC.js.map} +0 -0
  827. /package/dist/{matrix.data-WB26I3TF.js.map → matrix.data-Z6GUACVZ.js.map} +0 -0
  828. /package/dist/{matrix.groups-C2V2CV4A.js.map → matrix.groups-3ZSTUWRK.js.map} +0 -0
  829. /package/dist/{matrix.integration.spec-3COAXQBV.js.map → matrix.integration.spec-4U2R3UB2.js.map} +0 -0
  830. /package/dist/{matrix.interactivity-NGHIQR3A.js.map → matrix.interactivity-DJZFQ7DN.js.map} +0 -0
  831. /package/dist/{matrix.layout-NYIOESGN.js.map → matrix.layout-RQJ6VB4P.js.map} +0 -0
  832. /package/dist/{matrix.legend-Q5HHWP5Q.js.map → matrix.legend-YQ36NWKW.js.map} +0 -0
  833. /package/dist/{matrix.renderers-GLXZARIP.js.map → matrix.renderers-MWDFI6HW.js.map} +0 -0
  834. /package/dist/{matrix.serieses-LDQEPXPD.js.map → matrix.serieses-LTC4RLYD.js.map} +0 -0
  835. /package/dist/{matrix.sort-44TQNRIX.js.map → matrix.sort-5VFYLABY.js.map} +0 -0
  836. /package/dist/{matrix.sort.unit.spec-T3BDWJ3Z.js.map → matrix.sort.unit.spec-2RUEKUT4.js.map} +0 -0
  837. /package/dist/{matrix.sorterUi-6Y4YBQYL.js.map → matrix.sorterUi-EEMYZLPI.js.map} +0 -0
  838. /package/dist/{matrix.sorterUi.unit.spec-NHUYNMNU.js.map → matrix.sorterUi.unit.spec-ZXGSPRFZ.js.map} +0 -0
  839. /package/dist/{matrix.unit.spec-C7IRIBN6.js.map → matrix.unit.spec-HTF6UV4L.js.map} +0 -0
  840. /package/dist/{mavb-E37LI73X.js.map → mavb-GGQRDCO6.js.map} +0 -0
  841. /package/dist/{mds.fimo-YTGX7VEN.js.map → mds.fimo-YKV5OIYV.js.map} +0 -0
  842. /package/dist/{mds.samplescatterplot-FFGGJSI3.js.map → mds.samplescatterplot-RQOEW2AW.js.map} +0 -0
  843. /package/dist/{mds.survivalplot-NCWRXXV4.js.map → mds.survivalplot-TN636DED.js.map} +0 -0
  844. /package/dist/{multivalue-N7A2PU5K.js.map → multivalue-MDQY64EH.js.map} +0 -0
  845. /package/dist/{numericDictTermCluster-AKQKRBQH.js.map → numericDictTermCluster-E73TJCLI.js.map} +0 -0
  846. /package/dist/{oncomatrix-QPVGACMF.js.map → oncomatrix-AENXQMLL.js.map} +0 -0
  847. /package/dist/{oncomatrix.spec-6L2NDN2G.js.map → oncomatrix.spec-UD6U462U.js.map} +0 -0
  848. /package/dist/{plot.2dvaf-6TLON77B.js.map → plot.2dvaf-XMRV6KEG.js.map} +0 -0
  849. /package/dist/{plot.app-VM273TXU.js.map → plot.app-A6JKLYQQ.js.map} +0 -0
  850. /package/dist/{plot.barplot-IQTZURHK.js.map → plot.barplot-UIX7LVWR.js.map} +0 -0
  851. /package/dist/{plot.boxplot-WEXB6HII.js.map → plot.boxplot-DIFWVLMA.js.map} +0 -0
  852. /package/dist/{plot.brainImaging-REGSSBHV.js.map → plot.brainImaging-ZRPVE2UK.js.map} +0 -0
  853. /package/dist/{plot.disco-F25Z3FQL.js.map → plot.disco-I56MT3PC.js.map} +0 -0
  854. /package/dist/{plot.ssgq-CRRK26RS.js.map → plot.ssgq-FCKFSZTV.js.map} +0 -0
  855. /package/dist/{plot.vaf2cov-WCNPZKXK.js.map → plot.vaf2cov-E5C7RJ7Z.js.map} +0 -0
  856. /package/dist/{polar2-MH5GPXHJ.js.map → polar2-SKVBB4FD.js.map} +0 -0
  857. /package/dist/{profileForms-2YX2OYDI.js.map → profileForms-5B3MTUNP.js.map} +0 -0
  858. /package/dist/{profilePlot-FUTMZ2PP.js.map → profilePlot-MCYCGEWT.js.map} +0 -0
  859. /package/dist/{proteinView-6Z4ALZW2.js.map → proteinView-5X55JWVL.js.map} +0 -0
  860. /package/dist/{proteomeCohortCompare-6GLFOYI5.js.map → proteomeCohortCompare-WZBMBLFD.js.map} +0 -0
  861. /package/dist/{pseudbulk.unit.spec-S7FDL3IX.js.map → pseudbulk.unit.spec-Q4YTIPH7.js.map} +0 -0
  862. /package/dist/{pseudobulk-A3LB23N2.js.map → pseudobulk-3UIWCCCQ.js.map} +0 -0
  863. /package/dist/{qualitative-5VJRMF4S.js.map → qualitative-6TJRXZFV.js.map} +0 -0
  864. /package/dist/{radar2-2SJX4ZXN.js.map → radar2-6X4XW5IZ.js.map} +0 -0
  865. /package/dist/{radarFacility2-7FPO34JS.js.map → radarFacility2-UVPXWPV5.js.map} +0 -0
  866. /package/dist/{rememberedGvQ.unit.spec-WOQVPQ75.js.map → rememberedGvQ.unit.spec-GVRFRVSO.js.map} +0 -0
  867. /package/dist/{render-ZLA2RRBP.js.map → render-G7V6R4PV.js.map} +0 -0
  868. /package/dist/{report-VCE6RILD.js.map → report-O7D46EKQ.js.map} +0 -0
  869. /package/dist/{sampleView-QYTX4OLI.js.map → sampleView-6Y3OOOMW.js.map} +0 -0
  870. /package/dist/{samplelst-7NGH3SUM.js.map → samplelst-JRVC4GYC.js.map} +0 -0
  871. /package/dist/{samplematrix-SNAR6IBB.js.map → samplematrix-VP5RQVRH.js.map} +0 -0
  872. /package/dist/{sc-2JETYAI4.js.map → sc-BPHVEP6N.js.map} +0 -0
  873. /package/dist/{scatter-GHBQM2RR.js.map → scatter-2YYRZCSW.js.map} +0 -0
  874. /package/dist/{scatter-D7VZOBEE.js.map → scatter-Y4BIG2PW.js.map} +0 -0
  875. /package/dist/{selectGenomeWithTklst-BD4GMGX3.js.map → selectGenomeWithTklst-2BVZU5SW.js.map} +0 -0
  876. /package/dist/{singleCellCellType-XHLOJVVC.js.map → singleCellCellType-XBGCSIQT.js.map} +0 -0
  877. /package/dist/{singleCellCellType.unit.spec-LCLR3IOD.js.map → singleCellCellType.unit.spec-T4GFRLVZ.js.map} +0 -0
  878. /package/dist/{singleCellGeneExpression-JRBONI5C.js.map → singleCellGeneExpression-5ZPWLSVW.js.map} +0 -0
  879. /package/dist/{singleCellGeneExpression.unit.spec-Z2KSVCIG.js.map → singleCellGeneExpression.unit.spec-4O5UBUDU.js.map} +0 -0
  880. /package/dist/{singleCellPlot-4462CQHF.js.map → singleCellPlot-CZLQBGVU.js.map} +0 -0
  881. /package/dist/{singlecell-SO3B5KJ7.js.map → singlecell-IIUYX7OG.js.map} +0 -0
  882. /package/dist/{singlecell-CDUQ6MTO.js.map → singlecell-O3P5BLWT.js.map} +0 -0
  883. /package/dist/{snp-YE2MXKJO.js.map → snp-ZCYBF3ZQ.js.map} +0 -0
  884. /package/dist/{snp.unit.spec-MT57TGGQ.js.map → snp.unit.spec-TAGD2DRL.js.map} +0 -0
  885. /package/dist/{snplocus-RSNKWY63.js.map → snplocus-TL25OOPE.js.map} +0 -0
  886. /package/dist/{spliceevent.a53ss.diagram-6N6YGYV7.js.map → spliceevent.a53ss.diagram-I7J4PQZT.js.map} +0 -0
  887. /package/dist/{spliceevent.exonskip.diagram-LMNUS4XV.js.map → spliceevent.exonskip.diagram-SB4454HB.js.map} +0 -0
  888. /package/dist/{spliceevent.noeventdiagram-LTBH4YD5.js.map → spliceevent.noeventdiagram-FOSDNYLH.js.map} +0 -0
  889. /package/dist/{ssGSEA-DPK4PDM2.js.map → ssGSEA-WANB2X5L.js.map} +0 -0
  890. /package/dist/{ssGSEA.unit.spec-K2SA7ME7.js.map → ssGSEA.unit.spec-4XXWU4XV.js.map} +0 -0
  891. /package/dist/{stattable-PR47XT4F.js.map → stattable-FNTJLVNB.js.map} +0 -0
  892. /package/dist/{studyCatalog-GMUWIUL4.js.map → studyCatalog-7KEOFLO2.js.map} +0 -0
  893. /package/dist/{summarizeCnvGeneexp-YZEMDLES.js.map → summarizeCnvGeneexp-P4AFZMKD.js.map} +0 -0
  894. /package/dist/{summarizeGeneexpSurvival-3TXV6ZNI.js.map → summarizeGeneexpSurvival-YL2J7F4R.js.map} +0 -0
  895. /package/dist/{summarizeMutationCnv-EBWSEHWJ.js.map → summarizeMutationCnv-BHBHST5F.js.map} +0 -0
  896. /package/dist/{summarizeMutationDiagnosis-FXA25W3O.js.map → summarizeMutationDiagnosis-Z7ZHTV27.js.map} +0 -0
  897. /package/dist/{summarizeMutationSurvival-MR4AOMNS.js.map → summarizeMutationSurvival-PZ4TYHT7.js.map} +0 -0
  898. /package/dist/{summary-4C6LGTMF.js.map → summary-ZMNPO65S.js.map} +0 -0
  899. /package/dist/{summary.integration.spec-Y6JLH7NH.js.map → summary.integration.spec-DPJR2ZBE.js.map} +0 -0
  900. /package/dist/{summaryInput-NWT2DXWU.js.map → summaryInput-6JUFJZ5P.js.map} +0 -0
  901. /package/dist/{sunburst-266MA7E2.js.map → sunburst-OWAUI3HC.js.map} +0 -0
  902. /package/dist/{survival-CAZCIY2N.js.map → survival-6JPKG3VA.js.map} +0 -0
  903. /package/dist/{survival.integration.spec-34JJVLLI.js.map → survival.integration.spec-A6NUJLL6.js.map} +0 -0
  904. /package/dist/{svgraph-OFUESREM.js.map → svgraph-34IKFHUS.js.map} +0 -0
  905. /package/dist/{svmr-PVH42MY4.js.map → svmr-4XNPSVVQ.js.map} +0 -0
  906. /package/dist/{table-C2SICFZV.js.map → table-LPZATFLC.js.map} +0 -0
  907. /package/dist/{termCollection-TGYDI7NP.js.map → termCollection-DYY5FXU5.js.map} +0 -0
  908. /package/dist/{termCollection-H4RL5WJG.js.map → termCollection-WOAUFFIC.js.map} +0 -0
  909. /package/dist/{termCollection.unit.spec-JSALS7GL.js.map → termCollection.unit.spec-WTICTZ7H.js.map} +0 -0
  910. /package/dist/{termCollectionFractionSelection-YJVDNV4I.js.map → termCollectionFractionSelection-K5HPDEFP.js.map} +0 -0
  911. /package/dist/{termCollectionFractionSelection.unit.spec-4GM7P4ZW.js.map → termCollectionFractionSelection.unit.spec-D7DG2HOI.js.map} +0 -0
  912. /package/dist/{tk-RZCPSHJG.js.map → tk-DD2LWVGM.js.map} +0 -0
  913. /package/dist/{tk-SNTRA5CC.js.map → tk-NV7NBLT6.js.map} +0 -0
  914. /package/dist/{tp.ui-2W4K3XH6.js.map → tp.ui-B5J3UUVB.js.map} +0 -0
  915. /package/dist/{tvs.dt-GIPVC3R6.js.map → tvs.dt-XLKQT64T.js.map} +0 -0
  916. /package/dist/{tvs.dtcnv.categorical-TEYAS4OU.js.map → tvs.dtcnv.categorical-XIC3RH2D.js.map} +0 -0
  917. /package/dist/{tvs.dtcnv.continuous-VQRATYPZ.js.map → tvs.dtcnv.continuous-OA2K4LHF.js.map} +0 -0
  918. /package/dist/{tvs.dtfusion-P2KF5Z4H.js.map → tvs.dtfusion-ZGNKALZB.js.map} +0 -0
  919. /package/dist/{tvs.dtitd-TM6UROSH.js.map → tvs.dtitd-6QSG4E34.js.map} +0 -0
  920. /package/dist/{tvs.dtsnvindel-FZXC23NF.js.map → tvs.dtsnvindel-5CXXOGPH.js.map} +0 -0
  921. /package/dist/{tvs.dtsv-Y5QEJPYG.js.map → tvs.dtsv-QYYEYUD3.js.map} +0 -0
  922. /package/dist/{tvs.samplelst-MLAFPFER.js.map → tvs.samplelst-X77ODFFR.js.map} +0 -0
  923. /package/dist/{tvs.termCollection-ZQQDKESH.js.map → tvs.termCollection-VXROWAPS.js.map} +0 -0
  924. /package/dist/{vocabulary-JRUZPHMG.js.map → vocabulary-DKWYTZRC.js.map} +0 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../node_modules/ol/render/VectorContext.js", "../../node_modules/ol/render/canvas/Instruction.js", "../../node_modules/ol/render/canvas/Builder.js", "../../node_modules/ol/render/canvas/ImageBuilder.js", "../../node_modules/ol/render/canvas/LineStringBuilder.js", "../../node_modules/ol/render/canvas/PolygonBuilder.js", "../../node_modules/ol/geom/flat/linechunk.js", "../../node_modules/ol/geom/flat/straightchunk.js", "../../node_modules/ol/render/canvas/TextBuilder.js", "../../node_modules/ol/render/canvas/BuilderGroup.js", "../../node_modules/ol/geom/flat/length.js", "../../node_modules/ol/geom/flat/lineoffset.js", "../../node_modules/ol/geom/flat/textpath.js", "../../node_modules/ol/render/canvas/Executor.js", "../../node_modules/ol/render/canvas/ExecutorGroup.js", "../../node_modules/ol/render/canvas/Immediate.js", "../../node_modules/ol/render/canvas/hitdetect.js", "../../node_modules/ol/renderer/vector.js", "../../node_modules/ol/renderer/canvas/VectorLayer.js", "../../node_modules/ol/layer/Vector.js", "../../node_modules/ol/featureloader.js", "../../node_modules/ol/loadingstrategy.js", "../../node_modules/ol/Feature.js", "../../node_modules/ol/geom/flat/center.js", "../../node_modules/ol/geom/flat/interpolate.js", "../../node_modules/ol/geom/MultiPoint.js", "../../node_modules/ol/geom/MultiPolygon.js", "../../node_modules/ol/render/Feature.js", "../../node_modules/ol/structs/RBush.js", "../../node_modules/ol/source/VectorEventType.js", "../../node_modules/ol/source/Vector.js", "../plots/w2/wsi.direct.ts"],
4
+ "sourcesContent": ["/**\n * @module ol/render/VectorContext\n */\n\n/**\n * @classdesc\n * Context for drawing geometries. A vector context is available on render\n * events and does not need to be constructed directly.\n * @api\n */\nclass VectorContext {\n /**\n * Render a geometry with a custom renderer.\n *\n * @param {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {Function} renderer Renderer.\n * @param {Function} hitDetectionRenderer Renderer.\n * @param {number} [index] Render order index.\n */\n drawCustom(geometry, feature, renderer, hitDetectionRenderer, index) {}\n\n /**\n * Render a geometry.\n *\n * @param {import(\"../geom/Geometry.js\").default} geometry The geometry to render.\n */\n drawGeometry(geometry) {}\n\n /**\n * Set the rendering style.\n *\n * @param {import(\"../style/Style.js\").default} style The rendering style.\n */\n setStyle(style) {}\n\n /**\n * @param {import(\"../geom/Circle.js\").default} circleGeometry Circle geometry.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {number} [index] Render order index.\n */\n drawCircle(circleGeometry, feature, index) {}\n\n /**\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {number} [index] Render order index.\n */\n drawFeature(feature, style, index) {}\n\n /**\n * @param {import(\"../geom/GeometryCollection.js\").default} geometryCollectionGeometry Geometry collection.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {number} [index] Render order index.\n */\n drawGeometryCollection(geometryCollectionGeometry, feature, index) {}\n\n /**\n * @param {import(\"../geom/LineString.js\").default|import(\"./Feature.js\").default} lineStringGeometry Line string geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n */\n drawLineString(lineStringGeometry, feature, index) {}\n\n /**\n * @param {import(\"../geom/MultiLineString.js\").default|import(\"./Feature.js\").default} multiLineStringGeometry MultiLineString geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n */\n drawMultiLineString(multiLineStringGeometry, feature, index) {}\n\n /**\n * @param {import(\"../geom/MultiPoint.js\").default|import(\"./Feature.js\").default} multiPointGeometry MultiPoint geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n */\n drawMultiPoint(multiPointGeometry, feature, index) {}\n\n /**\n * @param {import(\"../geom/MultiPolygon.js\").default} multiPolygonGeometry MultiPolygon geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n */\n drawMultiPolygon(multiPolygonGeometry, feature, index) {}\n\n /**\n * @param {import(\"../geom/Point.js\").default|import(\"./Feature.js\").default} pointGeometry Point geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n */\n drawPoint(pointGeometry, feature, index) {}\n\n /**\n * @param {import(\"../geom/Polygon.js\").default|import(\"./Feature.js\").default} polygonGeometry Polygon geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n */\n drawPolygon(polygonGeometry, feature, index) {}\n\n /**\n * @param {import(\"../geom/SimpleGeometry.js\").default|import(\"./Feature.js\").default} geometry Geometry.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n */\n drawText(geometry, feature, index) {}\n\n /**\n * @param {import(\"../style/Fill.js\").default} fillStyle Fill style.\n * @param {import(\"../style/Stroke.js\").default} strokeStyle Stroke style.\n */\n setFillStrokeStyle(fillStyle, strokeStyle) {}\n\n /**\n * @param {import(\"../style/Image.js\").default} imageStyle Image style.\n * @param {import(\"../render/canvas.js\").DeclutterImageWithText} [declutterImageWithText] Shared data for combined decluttering with a text style.\n */\n setImageStyle(imageStyle, declutterImageWithText) {}\n\n /**\n * @param {import(\"../style/Text.js\").default} textStyle Text style.\n * @param {import(\"../render/canvas.js\").DeclutterImageWithText} [declutterImageWithText] Shared data for combined decluttering with an image style.\n */\n setTextStyle(textStyle, declutterImageWithText) {}\n}\n\nexport default VectorContext;\n", "/**\n * @module ol/render/canvas/Instruction\n */\n\n/**\n * @enum {number}\n */\nconst Instruction = {\n BEGIN_GEOMETRY: 0,\n BEGIN_PATH: 1,\n CIRCLE: 2,\n CLOSE_PATH: 3,\n CUSTOM: 4,\n DRAW_CHARS: 5,\n DRAW_IMAGE: 6,\n END_GEOMETRY: 7,\n FILL: 8,\n MOVE_TO_LINE_TO: 9,\n SET_FILL_STYLE: 10,\n SET_STROKE_STYLE: 11,\n STROKE: 12,\n};\n\n/**\n * @type {Array<Instruction>}\n */\nexport const fillInstruction = [Instruction.FILL];\n\n/**\n * @type {Array<Instruction>}\n */\nexport const strokeInstruction = [Instruction.STROKE];\n\n/**\n * @type {Array<Instruction>}\n */\nexport const beginPathInstruction = [Instruction.BEGIN_PATH];\n\n/**\n * @type {Array<Instruction>}\n */\nexport const closePathInstruction = [Instruction.CLOSE_PATH];\n\nexport default Instruction;\n", "/**\n * @module ol/render/canvas/Builder\n */\nimport {equals, reverseSubArray} from '../../array.js';\nimport {asColorLike} from '../../colorlike.js';\nimport Relationship from '../../extent/Relationship.js';\nimport {\n buffer,\n clone,\n containsCoordinate,\n coordinateRelationship,\n} from '../../extent.js';\nimport {\n inflateCoordinates,\n inflateCoordinatesArray,\n inflateMultiCoordinatesArray,\n} from '../../geom/flat/inflate.js';\nimport VectorContext from '../VectorContext.js';\nimport {\n defaultFillStyle,\n defaultLineCap,\n defaultLineDash,\n defaultLineDashOffset,\n defaultLineJoin,\n defaultLineWidth,\n defaultMiterLimit,\n defaultStrokeOffset,\n defaultStrokeStyle,\n} from '../canvas.js';\nimport CanvasInstruction from './Instruction.js';\n\nclass CanvasBuilder extends VectorContext {\n /**\n * @param {number} tolerance Tolerance.\n * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n */\n constructor(tolerance, maxExtent, resolution, pixelRatio) {\n super();\n\n /**\n * @protected\n * @type {number}\n */\n this.tolerance = tolerance;\n\n /**\n * @protected\n * @const\n * @type {import(\"../../extent.js\").Extent}\n */\n this.maxExtent = maxExtent;\n\n /**\n * @protected\n * @type {number}\n */\n this.pixelRatio = pixelRatio;\n\n /**\n * @protected\n * @type {number}\n */\n this.maxLineWidth = 0;\n\n /**\n * @protected\n * @const\n * @type {number}\n */\n this.resolution = resolution;\n\n /**\n * @private\n * @type {Array<*>}\n */\n this.beginGeometryInstruction1_ = null;\n\n /**\n * @private\n * @type {Array<*>}\n */\n this.beginGeometryInstruction2_ = null;\n\n /**\n * @private\n * @type {import(\"../../extent.js\").Extent}\n */\n this.bufferedMaxExtent_ = null;\n\n /**\n * @protected\n * @type {Array<*>}\n */\n this.instructions = [];\n\n /**\n * @protected\n * @type {Array<number>}\n */\n this.coordinates = [];\n\n /**\n * @private\n * @type {import(\"../../coordinate.js\").Coordinate}\n */\n this.tmpCoordinate_ = [];\n\n /**\n * @protected\n * @type {Array<*>}\n */\n this.hitDetectionInstructions = [];\n\n /**\n * @protected\n * @type {import(\"../canvas.js\").FillStrokeState}\n */\n this.state = /** @type {import(\"../canvas.js\").FillStrokeState} */ ({});\n }\n\n /**\n * @protected\n * @param {Array<number>} dashArray Dash array.\n * @return {Array<number>} Dash array with pixel ratio applied\n */\n applyPixelRatio(dashArray) {\n const pixelRatio = this.pixelRatio;\n return pixelRatio == 1\n ? dashArray\n : dashArray.map(function (dash) {\n return dash * pixelRatio;\n });\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} stride Stride.\n * @protected\n * @return {number} My end\n */\n appendFlatPointCoordinates(flatCoordinates, stride) {\n const extent = this.getBufferedMaxExtent();\n const tmpCoord = this.tmpCoordinate_;\n const coordinates = this.coordinates;\n let myEnd = coordinates.length;\n for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n tmpCoord[0] = flatCoordinates[i];\n tmpCoord[1] = flatCoordinates[i + 1];\n if (containsCoordinate(extent, tmpCoord)) {\n coordinates[myEnd++] = tmpCoord[0];\n coordinates[myEnd++] = tmpCoord[1];\n }\n }\n return myEnd;\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {boolean} closed Last input coordinate equals first.\n * @param {boolean} skipFirst Skip first coordinate.\n * @protected\n * @return {number} My end.\n */\n appendFlatLineCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n closed,\n skipFirst,\n ) {\n const coordinates = this.coordinates;\n let myEnd = coordinates.length;\n const extent = this.getBufferedMaxExtent();\n if (skipFirst) {\n offset += stride;\n }\n let lastXCoord = flatCoordinates[offset];\n let lastYCoord = flatCoordinates[offset + 1];\n const nextCoord = this.tmpCoordinate_;\n let skipped = true;\n\n let i, lastRel, nextRel;\n for (i = offset + stride; i < end; i += stride) {\n nextCoord[0] = flatCoordinates[i];\n nextCoord[1] = flatCoordinates[i + 1];\n nextRel = coordinateRelationship(extent, nextCoord);\n if (nextRel !== lastRel) {\n if (skipped) {\n coordinates[myEnd++] = lastXCoord;\n coordinates[myEnd++] = lastYCoord;\n skipped = false;\n }\n coordinates[myEnd++] = nextCoord[0];\n coordinates[myEnd++] = nextCoord[1];\n } else if (nextRel === Relationship.INTERSECTING) {\n coordinates[myEnd++] = nextCoord[0];\n coordinates[myEnd++] = nextCoord[1];\n skipped = false;\n } else {\n skipped = true;\n }\n lastXCoord = nextCoord[0];\n lastYCoord = nextCoord[1];\n lastRel = nextRel;\n }\n\n // Last coordinate equals first or only one point to append:\n if ((closed && skipped) || i === offset + stride) {\n coordinates[myEnd++] = lastXCoord;\n coordinates[myEnd++] = lastYCoord;\n }\n return myEnd;\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {Array<number>} builderEnds Builder ends.\n * @return {number} Offset.\n */\n drawCustomCoordinates_(flatCoordinates, offset, ends, stride, builderEnds) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n const builderEnd = this.appendFlatLineCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n false,\n false,\n );\n builderEnds.push(builderEnd);\n offset = end;\n }\n return offset;\n }\n\n /**\n * @param {import(\"../../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {Function} renderer Renderer.\n * @param {Function} hitDetectionRenderer Renderer.\n * @param {number} [index] Render order index.\n * @override\n */\n drawCustom(geometry, feature, renderer, hitDetectionRenderer, index) {\n this.beginGeometry(geometry, feature, index);\n\n const type = geometry.getType();\n const stride = geometry.getStride();\n const builderBegin = this.coordinates.length;\n\n let flatCoordinates, builderEnd, builderEnds, builderEndss;\n let offset;\n\n switch (type) {\n case 'MultiPolygon':\n flatCoordinates =\n /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (\n geometry\n ).getOrientedFlatCoordinates();\n builderEndss = [];\n const endss =\n /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (\n geometry\n ).getEndss();\n offset = 0;\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const myEnds = [];\n offset = this.drawCustomCoordinates_(\n flatCoordinates,\n offset,\n endss[i],\n stride,\n myEnds,\n );\n builderEndss.push(myEnds);\n }\n this.instructions.push([\n CanvasInstruction.CUSTOM,\n builderBegin,\n builderEndss,\n geometry,\n renderer,\n inflateMultiCoordinatesArray,\n index,\n ]);\n this.hitDetectionInstructions.push([\n CanvasInstruction.CUSTOM,\n builderBegin,\n builderEndss,\n geometry,\n hitDetectionRenderer || renderer,\n inflateMultiCoordinatesArray,\n index,\n ]);\n break;\n case 'Polygon':\n case 'MultiLineString':\n builderEnds = [];\n flatCoordinates =\n type == 'Polygon'\n ? /** @type {import(\"../../geom/Polygon.js\").default} */ (\n geometry\n ).getOrientedFlatCoordinates()\n : geometry.getFlatCoordinates();\n offset = this.drawCustomCoordinates_(\n flatCoordinates,\n 0,\n /** @type {import(\"../../geom/Polygon.js\").default|import(\"../../geom/MultiLineString.js\").default} */ (\n geometry\n ).getEnds(),\n stride,\n builderEnds,\n );\n this.instructions.push([\n CanvasInstruction.CUSTOM,\n builderBegin,\n builderEnds,\n geometry,\n renderer,\n inflateCoordinatesArray,\n index,\n ]);\n this.hitDetectionInstructions.push([\n CanvasInstruction.CUSTOM,\n builderBegin,\n builderEnds,\n geometry,\n hitDetectionRenderer || renderer,\n inflateCoordinatesArray,\n index,\n ]);\n break;\n case 'LineString':\n case 'Circle':\n flatCoordinates = geometry.getFlatCoordinates();\n builderEnd = this.appendFlatLineCoordinates(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n false,\n false,\n );\n this.instructions.push([\n CanvasInstruction.CUSTOM,\n builderBegin,\n builderEnd,\n geometry,\n renderer,\n inflateCoordinates,\n index,\n ]);\n this.hitDetectionInstructions.push([\n CanvasInstruction.CUSTOM,\n builderBegin,\n builderEnd,\n geometry,\n hitDetectionRenderer || renderer,\n inflateCoordinates,\n index,\n ]);\n break;\n case 'MultiPoint':\n flatCoordinates = geometry.getFlatCoordinates();\n builderEnd = this.appendFlatPointCoordinates(flatCoordinates, stride);\n\n if (builderEnd > builderBegin) {\n this.instructions.push([\n CanvasInstruction.CUSTOM,\n builderBegin,\n builderEnd,\n geometry,\n renderer,\n inflateCoordinates,\n index,\n ]);\n this.hitDetectionInstructions.push([\n CanvasInstruction.CUSTOM,\n builderBegin,\n builderEnd,\n geometry,\n hitDetectionRenderer || renderer,\n inflateCoordinates,\n index,\n ]);\n }\n break;\n case 'Point':\n flatCoordinates = geometry.getFlatCoordinates();\n this.coordinates.push(flatCoordinates[0], flatCoordinates[1]);\n builderEnd = this.coordinates.length;\n\n this.instructions.push([\n CanvasInstruction.CUSTOM,\n builderBegin,\n builderEnd,\n geometry,\n renderer,\n undefined,\n index,\n ]);\n this.hitDetectionInstructions.push([\n CanvasInstruction.CUSTOM,\n builderBegin,\n builderEnd,\n geometry,\n hitDetectionRenderer || renderer,\n undefined,\n index,\n ]);\n break;\n default:\n }\n this.endGeometry(feature);\n }\n\n /**\n * @protected\n * @param {import(\"../../geom/Geometry\").default|import(\"../Feature.js\").default} geometry The geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {number} index Render order index\n */\n beginGeometry(geometry, feature, index) {\n this.beginGeometryInstruction1_ = [\n CanvasInstruction.BEGIN_GEOMETRY,\n feature,\n 0,\n geometry,\n index,\n ];\n this.instructions.push(this.beginGeometryInstruction1_);\n this.beginGeometryInstruction2_ = [\n CanvasInstruction.BEGIN_GEOMETRY,\n feature,\n 0,\n geometry,\n index,\n ];\n this.hitDetectionInstructions.push(this.beginGeometryInstruction2_);\n }\n\n /**\n * @return {import(\"../canvas.js\").SerializableInstructions} the serializable instructions.\n */\n finish() {\n return {\n instructions: this.instructions,\n hitDetectionInstructions: this.hitDetectionInstructions,\n coordinates: this.coordinates,\n };\n }\n\n /**\n * Reverse the hit detection instructions.\n */\n reverseHitDetectionInstructions() {\n const hitDetectionInstructions = this.hitDetectionInstructions;\n // step 1 - reverse array\n hitDetectionInstructions.reverse();\n // step 2 - reverse instructions within geometry blocks\n let i;\n const n = hitDetectionInstructions.length;\n let instruction;\n let type;\n let begin = -1;\n for (i = 0; i < n; ++i) {\n instruction = hitDetectionInstructions[i];\n type = /** @type {import(\"./Instruction.js\").default} */ (instruction[0]);\n if (type == CanvasInstruction.END_GEOMETRY) {\n begin = i;\n } else if (type == CanvasInstruction.BEGIN_GEOMETRY) {\n instruction[2] = i;\n reverseSubArray(this.hitDetectionInstructions, begin, i);\n begin = -1;\n }\n }\n }\n\n /**\n * @param {import(\"../../style/Fill.js\").default} fillStyle Fill style.\n * @param {import('../canvas.js').FillStrokeState} [state] State.\n * @return {import('../canvas.js').FillStrokeState} State.\n */\n fillStyleToState(\n fillStyle,\n state = /** @type {import('../canvas.js').FillStrokeState} */ ({}),\n ) {\n if (fillStyle) {\n const fillStyleColor = fillStyle.getColor();\n state.fillPatternScale =\n fillStyleColor &&\n typeof fillStyleColor === 'object' &&\n 'src' in fillStyleColor\n ? this.pixelRatio\n : 1;\n state.fillStyle = asColorLike(\n fillStyleColor ? fillStyleColor : defaultFillStyle,\n );\n } else {\n state.fillStyle = undefined;\n }\n return state;\n }\n\n /**\n * @param {import(\"../../style/Stroke.js\").default} strokeStyle Stroke style.\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n * @return {import(\"../canvas.js\").FillStrokeState} State.\n */\n strokeStyleToState(\n strokeStyle,\n state = /** @type {import('../canvas.js').FillStrokeState} */ ({}),\n ) {\n if (strokeStyle) {\n const strokeStyleColor = strokeStyle.getColor();\n state.strokeStyle = asColorLike(\n strokeStyleColor ? strokeStyleColor : defaultStrokeStyle,\n );\n const strokeStyleLineCap = strokeStyle.getLineCap();\n state.lineCap =\n strokeStyleLineCap !== undefined ? strokeStyleLineCap : defaultLineCap;\n const strokeStyleLineDash = strokeStyle.getLineDash();\n state.lineDash = strokeStyleLineDash\n ? strokeStyleLineDash.slice()\n : defaultLineDash;\n const strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();\n state.lineDashOffset = strokeStyleLineDashOffset\n ? strokeStyleLineDashOffset\n : defaultLineDashOffset;\n const strokeStyleLineJoin = strokeStyle.getLineJoin();\n state.lineJoin =\n strokeStyleLineJoin !== undefined\n ? strokeStyleLineJoin\n : defaultLineJoin;\n const strokeStyleWidth = strokeStyle.getWidth();\n state.lineWidth =\n strokeStyleWidth !== undefined ? strokeStyleWidth : defaultLineWidth;\n const strokeStyleMiterLimit = strokeStyle.getMiterLimit();\n state.miterLimit =\n strokeStyleMiterLimit !== undefined\n ? strokeStyleMiterLimit\n : defaultMiterLimit;\n const strokeStyleOffset = strokeStyle.getOffset();\n state.strokeOffset = strokeStyleOffset ?? defaultStrokeOffset;\n\n if (state.lineWidth > this.maxLineWidth) {\n this.maxLineWidth = state.lineWidth;\n // invalidate the buffered max extent cache\n this.bufferedMaxExtent_ = null;\n }\n } else {\n state.strokeStyle = undefined;\n state.lineCap = undefined;\n state.lineDash = null;\n state.lineDashOffset = undefined;\n state.lineJoin = undefined;\n state.lineWidth = undefined;\n state.miterLimit = undefined;\n state.strokeOffset = undefined;\n }\n return state;\n }\n\n /**\n * @param {import(\"../../style/Fill.js\").default} fillStyle Fill style.\n * @param {import(\"../../style/Stroke.js\").default} strokeStyle Stroke style.\n * @override\n */\n setFillStrokeStyle(fillStyle, strokeStyle) {\n const state = this.state;\n this.fillStyleToState(fillStyle, state);\n this.strokeStyleToState(strokeStyle, state);\n }\n\n /**\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n * @return {Array<*>} Fill instruction.\n */\n createFill(state) {\n const fillStyle = state.fillStyle;\n /** @type {Array<*>} */\n const fillInstruction = [CanvasInstruction.SET_FILL_STYLE, fillStyle];\n if (typeof fillStyle !== 'string') {\n // Fill is a pattern or gradient - align and scale it!\n fillInstruction.push(state.fillPatternScale);\n }\n return fillInstruction;\n }\n\n /**\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n */\n applyStroke(state) {\n this.instructions.push(this.createStroke(state));\n }\n\n /**\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n * @return {Array<*>} Stroke instruction.\n */\n createStroke(state) {\n return [\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle,\n state.lineWidth * this.pixelRatio,\n state.lineCap,\n state.lineJoin,\n state.miterLimit,\n state.lineDash ? this.applyPixelRatio(state.lineDash) : null,\n state.lineDashOffset * this.pixelRatio,\n ];\n }\n\n /**\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n * @param {function(this:CanvasBuilder, import(\"../canvas.js\").FillStrokeState):Array<*>} createFill Create fill.\n */\n updateFillStyle(state, createFill) {\n const fillStyle = state.fillStyle;\n if (typeof fillStyle !== 'string' || state.currentFillStyle != fillStyle) {\n this.instructions.push(createFill.call(this, state));\n state.currentFillStyle = fillStyle;\n }\n }\n\n /**\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n * @param {function(this:CanvasBuilder, import(\"../canvas.js\").FillStrokeState): void} applyStroke Apply stroke.\n */\n updateStrokeStyle(state, applyStroke) {\n const strokeStyle = state.strokeStyle;\n const lineCap = state.lineCap;\n const lineDash = state.lineDash;\n const lineDashOffset = state.lineDashOffset;\n const lineJoin = state.lineJoin;\n const lineWidth = state.lineWidth;\n const miterLimit = state.miterLimit;\n const strokeOffset = state.strokeOffset;\n if (\n state.currentStrokeStyle != strokeStyle ||\n state.currentLineCap != lineCap ||\n (lineDash != state.currentLineDash &&\n !equals(state.currentLineDash, lineDash)) ||\n state.currentLineDashOffset != lineDashOffset ||\n state.currentLineJoin != lineJoin ||\n state.currentLineWidth != lineWidth ||\n state.currentMiterLimit != miterLimit ||\n state.currentStrokeOffset != strokeOffset\n ) {\n applyStroke.call(this, state);\n state.currentStrokeStyle = strokeStyle;\n state.currentLineCap = lineCap;\n state.currentLineDash = lineDash;\n state.currentLineDashOffset = lineDashOffset;\n state.currentLineJoin = lineJoin;\n state.currentLineWidth = lineWidth;\n state.currentMiterLimit = miterLimit;\n state.currentStrokeOffset = strokeOffset;\n }\n }\n\n /**\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n */\n endGeometry(feature) {\n this.beginGeometryInstruction1_[2] = this.instructions.length;\n this.beginGeometryInstruction1_ = null;\n this.beginGeometryInstruction2_[2] = this.hitDetectionInstructions.length;\n this.beginGeometryInstruction2_ = null;\n const endGeometryInstruction = [CanvasInstruction.END_GEOMETRY, feature];\n this.instructions.push(endGeometryInstruction);\n this.hitDetectionInstructions.push(endGeometryInstruction);\n }\n\n /**\n * Get the buffered rendering extent. Rendering will be clipped to the extent\n * provided to the constructor. To account for symbolizers that may intersect\n * this extent, we calculate a buffered extent (e.g. based on stroke width).\n * @return {import(\"../../extent.js\").Extent} The buffered rendering extent.\n * @protected\n */\n getBufferedMaxExtent() {\n if (!this.bufferedMaxExtent_) {\n this.bufferedMaxExtent_ = clone(this.maxExtent);\n if (this.maxLineWidth > 0) {\n const width = (this.resolution * (this.maxLineWidth + 1)) / 2;\n buffer(this.bufferedMaxExtent_, width, this.bufferedMaxExtent_);\n }\n }\n return this.bufferedMaxExtent_;\n }\n}\n\nexport default CanvasBuilder;\n", "/**\n * @module ol/render/canvas/ImageBuilder\n */\nimport {containsCoordinate} from '../../extent.js';\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction from './Instruction.js';\n\nclass CanvasImageBuilder extends CanvasBuilder {\n /**\n * @param {number} tolerance Tolerance.\n * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n */\n constructor(tolerance, maxExtent, resolution, pixelRatio) {\n super(tolerance, maxExtent, resolution, pixelRatio);\n\n /**\n * @private\n * @type {import('../../DataTile.js').ImageLike}\n */\n this.hitDetectionImage_ = null;\n\n /**\n * @private\n * @type {import('../../DataTile.js').ImageLike}\n */\n this.image_ = null;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.imagePixelRatio_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.anchorX_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.anchorY_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.height_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.opacity_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.originX_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.originY_ = undefined;\n\n /**\n * @private\n * @type {boolean|undefined}\n */\n this.rotateWithView_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.rotation_ = undefined;\n\n /**\n * @private\n * @type {import(\"../../size.js\").Size|undefined}\n */\n this.scale_ = undefined;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.width_ = undefined;\n\n /**\n * @private\n * @type {import('../../style/Style.js').DeclutterMode}\n */\n this.declutterMode_ = undefined;\n\n /**\n * Data shared with a text builder for combined decluttering.\n * @private\n * @type {import(\"../canvas.js\").DeclutterImageWithText}\n */\n this.declutterImageWithText_ = undefined;\n }\n\n /**\n * @param {import(\"../../geom/Point.js\").default|import(\"../Feature.js\").default} pointGeometry Point geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n * @override\n */\n drawPoint(pointGeometry, feature, index) {\n if (\n !this.image_ ||\n (this.maxExtent &&\n !containsCoordinate(this.maxExtent, pointGeometry.getFlatCoordinates()))\n ) {\n return;\n }\n this.beginGeometry(pointGeometry, feature, index);\n const flatCoordinates = pointGeometry.getFlatCoordinates();\n const stride = pointGeometry.getStride();\n const myBegin = this.coordinates.length;\n const myEnd = this.appendFlatPointCoordinates(flatCoordinates, stride);\n this.instructions.push([\n CanvasInstruction.DRAW_IMAGE,\n myBegin,\n myEnd,\n this.image_,\n // Remaining arguments to DRAW_IMAGE are in alphabetical order\n this.anchorX_ * this.imagePixelRatio_,\n this.anchorY_ * this.imagePixelRatio_,\n Math.ceil(this.height_ * this.imagePixelRatio_),\n this.opacity_,\n this.originX_ * this.imagePixelRatio_,\n this.originY_ * this.imagePixelRatio_,\n this.rotateWithView_,\n this.rotation_,\n [\n (this.scale_[0] * this.pixelRatio) / this.imagePixelRatio_,\n (this.scale_[1] * this.pixelRatio) / this.imagePixelRatio_,\n ],\n Math.ceil(this.width_ * this.imagePixelRatio_),\n this.declutterMode_,\n this.declutterImageWithText_,\n ]);\n this.hitDetectionInstructions.push([\n CanvasInstruction.DRAW_IMAGE,\n myBegin,\n myEnd,\n this.hitDetectionImage_,\n // Remaining arguments to DRAW_IMAGE are in alphabetical order\n this.anchorX_,\n this.anchorY_,\n this.height_,\n 1,\n this.originX_,\n this.originY_,\n this.rotateWithView_,\n this.rotation_,\n this.scale_,\n this.width_,\n this.declutterMode_,\n this.declutterImageWithText_,\n ]);\n this.endGeometry(feature);\n }\n\n /**\n * @param {import(\"../../geom/MultiPoint.js\").default|import(\"../Feature.js\").default} multiPointGeometry MultiPoint geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n * @override\n */\n drawMultiPoint(multiPointGeometry, feature, index) {\n if (!this.image_) {\n return;\n }\n this.beginGeometry(multiPointGeometry, feature, index);\n const flatCoordinates = multiPointGeometry.getFlatCoordinates();\n const filteredFlatCoordinates = [];\n for (\n let i = 0, ii = flatCoordinates.length;\n i < ii;\n i += multiPointGeometry.getStride()\n ) {\n if (\n !this.maxExtent ||\n containsCoordinate(this.maxExtent, flatCoordinates.slice(i, i + 2))\n ) {\n filteredFlatCoordinates.push(\n flatCoordinates[i],\n flatCoordinates[i + 1],\n );\n }\n }\n const myBegin = this.coordinates.length;\n const myEnd = this.appendFlatPointCoordinates(filteredFlatCoordinates, 2);\n this.instructions.push([\n CanvasInstruction.DRAW_IMAGE,\n myBegin,\n myEnd,\n this.image_,\n // Remaining arguments to DRAW_IMAGE are in alphabetical order\n this.anchorX_ * this.imagePixelRatio_,\n this.anchorY_ * this.imagePixelRatio_,\n Math.ceil(this.height_ * this.imagePixelRatio_),\n this.opacity_,\n this.originX_ * this.imagePixelRatio_,\n this.originY_ * this.imagePixelRatio_,\n this.rotateWithView_,\n this.rotation_,\n [\n (this.scale_[0] * this.pixelRatio) / this.imagePixelRatio_,\n (this.scale_[1] * this.pixelRatio) / this.imagePixelRatio_,\n ],\n Math.ceil(this.width_ * this.imagePixelRatio_),\n this.declutterMode_,\n this.declutterImageWithText_,\n ]);\n this.hitDetectionInstructions.push([\n CanvasInstruction.DRAW_IMAGE,\n myBegin,\n myEnd,\n this.hitDetectionImage_,\n // Remaining arguments to DRAW_IMAGE are in alphabetical order\n this.anchorX_,\n this.anchorY_,\n this.height_,\n 1,\n this.originX_,\n this.originY_,\n this.rotateWithView_,\n this.rotation_,\n this.scale_,\n this.width_,\n this.declutterMode_,\n this.declutterImageWithText_,\n ]);\n this.endGeometry(feature);\n }\n\n /**\n * @return {import(\"../canvas.js\").SerializableInstructions} the serializable instructions.\n * @override\n */\n finish() {\n this.reverseHitDetectionInstructions();\n // FIXME this doesn't really protect us against further calls to draw*Geometry\n this.anchorX_ = undefined;\n this.anchorY_ = undefined;\n this.hitDetectionImage_ = null;\n this.image_ = null;\n this.imagePixelRatio_ = undefined;\n this.height_ = undefined;\n this.scale_ = undefined;\n this.opacity_ = undefined;\n this.originX_ = undefined;\n this.originY_ = undefined;\n this.rotateWithView_ = undefined;\n this.rotation_ = undefined;\n this.width_ = undefined;\n return super.finish();\n }\n\n /**\n * @param {import(\"../../style/Image.js\").default} imageStyle Image style.\n * @param {Object} [sharedData] Shared data.\n * @override\n */\n setImageStyle(imageStyle, sharedData) {\n const anchor = imageStyle.getAnchor();\n const size = imageStyle.getSize();\n const origin = imageStyle.getOrigin();\n this.imagePixelRatio_ = imageStyle.getPixelRatio(this.pixelRatio);\n this.anchorX_ = anchor[0];\n this.anchorY_ = anchor[1];\n this.hitDetectionImage_ = imageStyle.getHitDetectionImage();\n this.image_ = imageStyle.getImage(this.pixelRatio);\n this.height_ = size[1];\n this.opacity_ = imageStyle.getOpacity();\n this.originX_ = origin[0];\n this.originY_ = origin[1];\n this.rotateWithView_ = imageStyle.getRotateWithView();\n this.rotation_ = imageStyle.getRotation();\n this.scale_ = imageStyle.getScaleArray();\n this.width_ = size[0];\n this.declutterMode_ = imageStyle.getDeclutterMode();\n this.declutterImageWithText_ = sharedData;\n }\n}\n\nexport default CanvasImageBuilder;\n", "/**\n * @module ol/render/canvas/LineStringBuilder\n */\nimport {defaultLineDash, defaultLineDashOffset} from '../canvas.js';\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction, {\n beginPathInstruction,\n strokeInstruction,\n} from './Instruction.js';\n\nclass CanvasLineStringBuilder extends CanvasBuilder {\n /**\n * @param {number} tolerance Tolerance.\n * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n */\n constructor(tolerance, maxExtent, resolution, pixelRatio) {\n super(tolerance, maxExtent, resolution, pixelRatio);\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} [strokeOffset] Stroke Offset in pixels.\n * @private\n * @return {number} end.\n */\n drawFlatCoordinates_(flatCoordinates, offset, end, stride, strokeOffset) {\n const myBegin = this.coordinates.length;\n const myEnd = this.appendFlatLineCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n false,\n false,\n );\n this.instructions.push([\n CanvasInstruction.MOVE_TO_LINE_TO,\n myBegin,\n myEnd,\n strokeOffset * this.pixelRatio,\n ]);\n this.hitDetectionInstructions.push([\n CanvasInstruction.MOVE_TO_LINE_TO,\n myBegin,\n myEnd,\n strokeOffset,\n ]);\n return end;\n }\n\n /**\n * @param {import(\"../../geom/LineString.js\").default|import(\"../Feature.js\").default} lineStringGeometry Line string geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n * @override\n */\n drawLineString(lineStringGeometry, feature, index) {\n const state = this.state;\n const strokeStyle = state.strokeStyle;\n const lineWidth = state.lineWidth;\n const strokeOffset = state.strokeOffset;\n if (strokeStyle === undefined || lineWidth === undefined) {\n return;\n }\n this.updateStrokeStyle(state, this.applyStroke);\n this.beginGeometry(lineStringGeometry, feature, index);\n this.hitDetectionInstructions.push(\n [\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle,\n state.lineWidth,\n state.lineCap,\n state.lineJoin,\n state.miterLimit,\n defaultLineDash,\n defaultLineDashOffset,\n ],\n beginPathInstruction,\n );\n const flatCoordinates = lineStringGeometry.getFlatCoordinates();\n const stride = lineStringGeometry.getStride();\n this.drawFlatCoordinates_(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n strokeOffset,\n );\n this.hitDetectionInstructions.push(strokeInstruction);\n this.endGeometry(feature);\n }\n\n /**\n * @param {import(\"../../geom/MultiLineString.js\").default|import(\"../Feature.js\").default} multiLineStringGeometry MultiLineString geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n * @override\n */\n drawMultiLineString(multiLineStringGeometry, feature, index) {\n const state = this.state;\n const strokeStyle = state.strokeStyle;\n const lineWidth = state.lineWidth;\n const strokeOffset = state.strokeOffset;\n if (strokeStyle === undefined || lineWidth === undefined) {\n return;\n }\n this.updateStrokeStyle(state, this.applyStroke);\n this.beginGeometry(multiLineStringGeometry, feature, index);\n this.hitDetectionInstructions.push(\n [\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle,\n state.lineWidth,\n state.lineCap,\n state.lineJoin,\n state.miterLimit,\n defaultLineDash,\n defaultLineDashOffset,\n ],\n beginPathInstruction,\n );\n const ends = multiLineStringGeometry.getEnds();\n const flatCoordinates = multiLineStringGeometry.getFlatCoordinates();\n const stride = multiLineStringGeometry.getStride();\n let offset = 0;\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n offset = this.drawFlatCoordinates_(\n flatCoordinates,\n offset,\n /** @type {number} */ (ends[i]),\n stride,\n strokeOffset,\n );\n }\n this.hitDetectionInstructions.push(strokeInstruction);\n this.endGeometry(feature);\n }\n\n /**\n * @return {import(\"../canvas.js\").SerializableInstructions} the serializable instructions.\n * @override\n */\n finish() {\n const state = this.state;\n if (\n state.lastStroke != undefined &&\n state.lastStroke != this.coordinates.length\n ) {\n this.instructions.push(strokeInstruction);\n }\n this.reverseHitDetectionInstructions();\n this.state = null;\n return super.finish();\n }\n\n /**\n * @param {import(\"../canvas.js\").FillStrokeState} state State.\n * @override\n */\n applyStroke(state) {\n if (\n state.lastStroke != undefined &&\n state.lastStroke != this.coordinates.length\n ) {\n this.instructions.push(strokeInstruction);\n state.lastStroke = this.coordinates.length;\n }\n state.lastStroke = 0;\n super.applyStroke(state);\n this.instructions.push(beginPathInstruction);\n }\n}\n\nexport default CanvasLineStringBuilder;\n", "/**\n * @module ol/render/canvas/PolygonBuilder\n */\nimport {snap} from '../../geom/flat/simplify.js';\nimport {\n defaultFillStyle,\n defaultLineDash,\n defaultLineDashOffset,\n} from '../canvas.js';\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction, {\n beginPathInstruction,\n closePathInstruction,\n fillInstruction,\n strokeInstruction,\n} from './Instruction.js';\n\nclass CanvasPolygonBuilder extends CanvasBuilder {\n /**\n * @param {number} tolerance Tolerance.\n * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n */\n constructor(tolerance, maxExtent, resolution, pixelRatio) {\n super(tolerance, maxExtent, resolution, pixelRatio);\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} [strokeOffset] Stroke Offset in pixels.\n * @private\n * @return {number} End.\n */\n drawFlatCoordinatess_(flatCoordinates, offset, ends, stride, strokeOffset) {\n const state = this.state;\n const fill = state.fillStyle !== undefined;\n const stroke = state.strokeStyle !== undefined;\n const numEnds = ends.length;\n this.instructions.push(beginPathInstruction);\n this.hitDetectionInstructions.push(beginPathInstruction);\n for (let i = 0; i < numEnds; ++i) {\n const end = ends[i];\n const myBegin = this.coordinates.length;\n const myEnd = this.appendFlatLineCoordinates(\n flatCoordinates,\n offset,\n end,\n stride,\n true,\n !stroke,\n );\n this.instructions.push([\n CanvasInstruction.MOVE_TO_LINE_TO,\n myBegin,\n myEnd,\n strokeOffset * this.pixelRatio,\n true,\n ]);\n this.hitDetectionInstructions.push([\n CanvasInstruction.MOVE_TO_LINE_TO,\n myBegin,\n myEnd,\n strokeOffset,\n true,\n ]);\n if (stroke) {\n // Performance optimization: only call closePath() when we have a stroke.\n // Otherwise the ring is closed already (see appendFlatLineCoordinates above).\n this.instructions.push(closePathInstruction);\n this.hitDetectionInstructions.push(closePathInstruction);\n }\n offset = end;\n }\n if (fill) {\n this.instructions.push(fillInstruction);\n this.hitDetectionInstructions.push(fillInstruction);\n }\n if (stroke) {\n this.instructions.push(strokeInstruction);\n this.hitDetectionInstructions.push(strokeInstruction);\n }\n return offset;\n }\n\n /**\n * @param {import(\"../../geom/Circle.js\").default} circleGeometry Circle geometry.\n * @param {import(\"../../Feature.js\").default} feature Feature.\n * @param {number} [index] Render order index.\n * @override\n */\n drawCircle(circleGeometry, feature, index) {\n const state = this.state;\n const fillStyle = state.fillStyle;\n const strokeStyle = state.strokeStyle;\n const strokeOffset = state.strokeOffset;\n if (fillStyle === undefined && strokeStyle === undefined) {\n return;\n }\n\n if (\n this.handleStrokeOffset_(() =>\n this.drawCircle(circleGeometry, feature, index),\n )\n ) {\n return;\n }\n this.setFillStrokeStyles_();\n this.beginGeometry(circleGeometry, feature, index);\n if (state.fillStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_FILL_STYLE,\n defaultFillStyle,\n ]);\n }\n if (state.strokeStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle,\n state.lineWidth,\n state.lineCap,\n state.lineJoin,\n state.miterLimit,\n defaultLineDash,\n defaultLineDashOffset,\n ]);\n }\n const flatCoordinates = circleGeometry.getFlatCoordinates();\n const stride = circleGeometry.getStride();\n const myBegin = this.coordinates.length;\n this.appendFlatLineCoordinates(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n stride,\n false,\n false,\n );\n const circleInstruction = [CanvasInstruction.CIRCLE, myBegin, strokeOffset];\n this.instructions.push(beginPathInstruction, circleInstruction);\n this.hitDetectionInstructions.push(beginPathInstruction, circleInstruction);\n if (state.fillStyle !== undefined) {\n this.instructions.push(fillInstruction);\n this.hitDetectionInstructions.push(fillInstruction);\n }\n if (state.strokeStyle !== undefined) {\n this.instructions.push(strokeInstruction);\n this.hitDetectionInstructions.push(strokeInstruction);\n }\n this.endGeometry(feature);\n }\n\n /**\n * @param {import(\"../../geom/Polygon.js\").default|import(\"../Feature.js\").default} polygonGeometry Polygon geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n * @override\n */\n drawPolygon(polygonGeometry, feature, index) {\n const state = this.state;\n const fillStyle = state.fillStyle;\n const strokeStyle = state.strokeStyle;\n const strokeOffset = state.strokeOffset;\n if (fillStyle === undefined && strokeStyle === undefined) {\n return;\n }\n if (\n this.handleStrokeOffset_(() =>\n this.drawPolygon(polygonGeometry, feature, index),\n )\n ) {\n return;\n }\n\n this.setFillStrokeStyles_();\n this.beginGeometry(polygonGeometry, feature, index);\n if (state.fillStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_FILL_STYLE,\n defaultFillStyle,\n ]);\n }\n if (state.strokeStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle,\n state.lineWidth,\n state.lineCap,\n state.lineJoin,\n state.miterLimit,\n defaultLineDash,\n defaultLineDashOffset,\n ]);\n }\n const ends = polygonGeometry.getEnds();\n const flatCoordinates = polygonGeometry.getOrientedFlatCoordinates();\n const stride = polygonGeometry.getStride();\n this.drawFlatCoordinatess_(\n flatCoordinates,\n 0,\n /** @type {Array<number>} */ (ends),\n stride,\n strokeOffset,\n );\n this.endGeometry(feature);\n }\n\n /**\n * @param {import(\"../../geom/MultiPolygon.js\").default} multiPolygonGeometry MultiPolygon geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n * @override\n */\n drawMultiPolygon(multiPolygonGeometry, feature, index) {\n const state = this.state;\n const fillStyle = state.fillStyle;\n const strokeStyle = state.strokeStyle;\n const strokeOffset = state.strokeOffset;\n if (fillStyle === undefined && strokeStyle === undefined) {\n return;\n }\n if (\n this.handleStrokeOffset_(() =>\n this.drawMultiPolygon(multiPolygonGeometry, feature, index),\n )\n ) {\n return;\n }\n this.setFillStrokeStyles_();\n this.beginGeometry(multiPolygonGeometry, feature, index);\n if (state.fillStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_FILL_STYLE,\n defaultFillStyle,\n ]);\n }\n if (state.strokeStyle !== undefined) {\n this.hitDetectionInstructions.push([\n CanvasInstruction.SET_STROKE_STYLE,\n state.strokeStyle,\n state.lineWidth,\n state.lineCap,\n state.lineJoin,\n state.miterLimit,\n defaultLineDash,\n defaultLineDashOffset,\n ]);\n }\n const endss = multiPolygonGeometry.getEndss();\n const flatCoordinates = multiPolygonGeometry.getOrientedFlatCoordinates();\n const stride = multiPolygonGeometry.getStride();\n let offset = 0;\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n offset = this.drawFlatCoordinatess_(\n flatCoordinates,\n offset,\n endss[i],\n stride,\n strokeOffset,\n );\n }\n this.endGeometry(feature);\n }\n\n /**\n * @return {import(\"../canvas.js\").SerializableInstructions} the serializable instructions.\n * @override\n */\n finish() {\n this.reverseHitDetectionInstructions();\n this.state = null;\n // We want to preserve topology when drawing polygons. Polygons are\n // simplified using quantization and point elimination. However, we might\n // have received a mix of quantized and non-quantized geometries, so ensure\n // that all are quantized by quantizing all coordinates in the batch.\n const tolerance = this.tolerance;\n if (tolerance !== 0) {\n const coordinates = this.coordinates;\n for (let i = 0, ii = coordinates.length; i < ii; ++i) {\n coordinates[i] = snap(coordinates[i], tolerance);\n }\n }\n return super.finish();\n }\n\n /**\n * @private\n */\n setFillStrokeStyles_() {\n const state = this.state;\n this.updateFillStyle(state, this.createFill);\n this.updateStrokeStyle(state, this.applyStroke);\n }\n\n handleStrokeOffset_(drawGeometryCallback) {\n const state = this.state;\n const fillStyle = state.fillStyle;\n const strokeStyle = state.strokeStyle;\n const strokeOffset = state.strokeOffset;\n\n // In case both fill style and stroke style are defined and the stroke style has an offset,\n // the stroke and fill should be done in separate steps, because offset stroke shape will\n // be different from the original shape used for the fill.\n if (\n Math.abs(strokeOffset) > 0 &&\n fillStyle !== undefined &&\n strokeStyle !== undefined\n ) {\n // First do only fill\n state.strokeStyle = undefined;\n state.strokeOffset = 0;\n drawGeometryCallback();\n // Now separately do the stroke\n state.fillStyle = undefined;\n state.strokeStyle = strokeStyle;\n state.strokeOffset = strokeOffset;\n drawGeometryCallback();\n // Reset the state to the original\n state.fillStyle = fillStyle;\n return true;\n }\n return false;\n }\n}\n\nexport default CanvasPolygonBuilder;\n", "import {lerp} from '../../math.js';\n\n/**\n * Creates chunks of equal length from a linestring\n * @param {number} chunkLength Length of each chunk.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Start offset of the `flatCoordinates`.\n * @param {number} end End offset of the `flatCoordinates`.\n * @param {number} stride Stride.\n * @return {Array<Array<number>>} Chunks of linestrings with stride 2.\n */\nexport function lineChunk(chunkLength, flatCoordinates, offset, end, stride) {\n const chunks = [];\n let cursor = offset;\n let chunkM = 0;\n let currentChunk = flatCoordinates.slice(offset, 2);\n while (chunkM < chunkLength && cursor + stride < end) {\n const [x1, y1] = currentChunk.slice(-2);\n const x2 = flatCoordinates[cursor + stride];\n const y2 = flatCoordinates[cursor + stride + 1];\n const segmentLength = Math.sqrt(\n (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1),\n );\n chunkM += segmentLength;\n if (chunkM >= chunkLength) {\n const m = (chunkLength - chunkM + segmentLength) / segmentLength;\n const x = lerp(x1, x2, m);\n const y = lerp(y1, y2, m);\n currentChunk.push(x, y);\n chunks.push(currentChunk);\n currentChunk = [x, y];\n if (chunkM == chunkLength) {\n cursor += stride;\n }\n chunkM = 0;\n } else if (chunkM < chunkLength) {\n currentChunk.push(\n flatCoordinates[cursor + stride],\n flatCoordinates[cursor + stride + 1],\n );\n cursor += stride;\n } else {\n const missing = segmentLength - chunkM;\n const x = lerp(x1, x2, missing / segmentLength);\n const y = lerp(y1, y2, missing / segmentLength);\n currentChunk.push(x, y);\n chunks.push(currentChunk);\n currentChunk = [x, y];\n chunkM = 0;\n cursor += stride;\n }\n }\n if (chunkM > 0) {\n chunks.push(currentChunk);\n }\n return chunks;\n}\n", "/**\n * @module ol/geom/flat/straightchunk\n */\n\n/**\n * @param {number} maxAngle Maximum acceptable angle delta between segments.\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {Array<number>} Start and end of the first suitable chunk of the\n * given `flatCoordinates`.\n */\nexport function matchingChunk(maxAngle, flatCoordinates, offset, end, stride) {\n let chunkStart = offset;\n let chunkEnd = offset;\n let chunkM = 0;\n let m = 0;\n let start = offset;\n let acos, i, m12, m23, x1, y1, x12, y12, x23, y23;\n for (i = offset; i < end; i += stride) {\n const x2 = flatCoordinates[i];\n const y2 = flatCoordinates[i + 1];\n if (x1 !== undefined) {\n x23 = x2 - x1;\n y23 = y2 - y1;\n m23 = Math.sqrt(x23 * x23 + y23 * y23);\n if (x12 !== undefined) {\n m += m12;\n acos = Math.acos((x12 * x23 + y12 * y23) / (m12 * m23));\n if (acos > maxAngle) {\n if (m > chunkM) {\n chunkM = m;\n chunkStart = start;\n chunkEnd = i;\n }\n m = 0;\n start = i - stride;\n }\n }\n m12 = m23;\n x12 = x23;\n y12 = y23;\n }\n x1 = x2;\n y1 = y2;\n }\n m += m23;\n return m > chunkM ? [start, i] : [chunkStart, chunkEnd];\n}\n", "/**\n * @module ol/render/canvas/TextBuilder\n */\nimport {asColorLike} from '../../colorlike.js';\nimport {intersects} from '../../extent.js';\nimport {lineChunk} from '../../geom/flat/linechunk.js';\nimport {matchingChunk} from '../../geom/flat/straightchunk.js';\nimport {getUid} from '../../util.js';\nimport {\n defaultFillStyle,\n defaultFont,\n defaultLineCap,\n defaultLineDash,\n defaultLineDashOffset,\n defaultLineJoin,\n defaultLineWidth,\n defaultMiterLimit,\n defaultPadding,\n defaultStrokeStyle,\n defaultTextAlign,\n defaultTextBaseline,\n registerFont,\n} from '../canvas.js';\nimport CanvasBuilder from './Builder.js';\nimport CanvasInstruction from './Instruction.js';\n/**\n * @const\n * @type {{left: 0, center: 0.5, right: 1, top: 0, middle: 0.5, hanging: 0.2, alphabetic: 0.8, ideographic: 0.8, bottom: 1}}\n */\nexport const TEXT_ALIGN = {\n 'left': 0,\n 'center': 0.5,\n 'right': 1,\n 'top': 0,\n 'middle': 0.5,\n 'hanging': 0.2,\n 'alphabetic': 0.8,\n 'ideographic': 0.8,\n 'bottom': 1,\n};\n\nclass CanvasTextBuilder extends CanvasBuilder {\n /**\n * @param {number} tolerance Tolerance.\n * @param {import(\"../../extent.js\").Extent} maxExtent Maximum extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n */\n constructor(tolerance, maxExtent, resolution, pixelRatio) {\n super(tolerance, maxExtent, resolution, pixelRatio);\n\n /**\n * @private\n * @type {Array<HTMLCanvasElement>}\n */\n this.labels_ = null;\n\n /**\n * @private\n * @type {string|Array<string>}\n */\n this.text_ = '';\n\n /**\n * @private\n * @type {number}\n */\n this.textOffsetX_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.textOffsetY_ = 0;\n\n /**\n * @private\n * @type {boolean|undefined}\n */\n this.textRotateWithView_ = undefined;\n\n /**\n * @private\n * @type {boolean|undefined}\n */\n this.textKeepUpright_ = undefined;\n\n /**\n * @private\n * @type {number}\n */\n this.textRotation_ = 0;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").FillState}\n */\n this.textFillState_ = null;\n\n /**\n * @type {!Object<string, import(\"../canvas.js\").FillState>}\n */\n this.fillStates = {};\n this.fillStates[defaultFillStyle] = {fillStyle: defaultFillStyle};\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").StrokeState}\n */\n this.textStrokeState_ = null;\n\n /**\n * @type {!Object<string, import(\"../canvas.js\").StrokeState>}\n */\n this.strokeStates = {};\n\n /**\n * @private\n * @type {import(\"../canvas.js\").TextState}\n */\n this.textState_ = /** @type {import(\"../canvas.js\").TextState} */ ({});\n\n /**\n * @type {!Object<string, import(\"../canvas.js\").TextState>}\n */\n this.textStates = {};\n\n /**\n * @private\n * @type {string}\n */\n this.textKey_ = '';\n\n /**\n * @private\n * @type {string}\n */\n this.fillKey_ = '';\n\n /**\n * @private\n * @type {string}\n */\n this.strokeKey_ = '';\n\n /**\n * @private\n * @type {import('../../style/Style.js').DeclutterMode}\n */\n this.declutterMode_ = undefined;\n\n /**\n * Data shared with an image builder for combined decluttering.\n * @private\n * @type {import(\"../canvas.js\").DeclutterImageWithText}\n */\n this.declutterImageWithText_ = undefined;\n }\n\n /**\n * @return {import(\"../canvas.js\").SerializableInstructions} the serializable instructions.\n * @override\n */\n finish() {\n const instructions = super.finish();\n instructions.textStates = this.textStates;\n instructions.fillStates = this.fillStates;\n instructions.strokeStates = this.strokeStates;\n return instructions;\n }\n\n /**\n * @param {import(\"../../geom/SimpleGeometry.js\").default|import(\"../Feature.js\").default} geometry Geometry.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n * @override\n */\n drawText(geometry, feature, index) {\n const fillState = this.textFillState_;\n const strokeState = this.textStrokeState_;\n const textState = this.textState_;\n if (this.text_ === '' || !textState || (!fillState && !strokeState)) {\n return;\n }\n\n const coordinates = this.coordinates;\n let begin = coordinates.length;\n\n const geometryType = geometry.getType();\n let flatCoordinates = null;\n let stride = geometry.getStride();\n\n if (\n textState.placement === 'line' &&\n (geometryType == 'LineString' ||\n geometryType == 'MultiLineString' ||\n geometryType == 'Polygon' ||\n geometryType == 'MultiPolygon')\n ) {\n if (!intersects(this.maxExtent, geometry.getExtent())) {\n return;\n }\n let ends;\n flatCoordinates = geometry.getFlatCoordinates();\n if (geometryType == 'LineString') {\n ends = [flatCoordinates.length];\n } else if (geometryType == 'MultiLineString') {\n ends = /** @type {import(\"../../geom/MultiLineString.js\").default} */ (\n geometry\n ).getEnds();\n } else if (geometryType == 'Polygon') {\n ends = /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry)\n .getEnds()\n .slice(0, 1);\n } else if (geometryType == 'MultiPolygon') {\n const endss =\n /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (\n geometry\n ).getEndss();\n ends = [];\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n ends.push(endss[i][0]);\n }\n }\n this.beginGeometry(geometry, feature, index);\n const repeat = textState.repeat;\n const textAlign = repeat ? undefined : textState.textAlign;\n // No `justify` support for line placement.\n let flatOffset = 0;\n for (let o = 0, oo = ends.length; o < oo; ++o) {\n let chunks;\n if (repeat) {\n chunks = lineChunk(\n repeat * this.resolution,\n flatCoordinates,\n flatOffset,\n ends[o],\n stride,\n );\n } else {\n chunks = [flatCoordinates.slice(flatOffset, ends[o])];\n }\n for (let c = 0, cc = chunks.length; c < cc; ++c) {\n const chunk = chunks[c];\n let chunkBegin = 0;\n let chunkEnd = chunk.length;\n if (textAlign == undefined) {\n const range = matchingChunk(\n textState.maxAngle,\n chunk,\n 0,\n chunk.length,\n 2,\n );\n chunkBegin = range[0];\n chunkEnd = range[1];\n }\n for (let i = chunkBegin; i < chunkEnd; i += stride) {\n coordinates.push(chunk[i], chunk[i + 1]);\n }\n const end = coordinates.length;\n flatOffset = ends[o];\n this.drawChars_(begin, end);\n begin = end;\n }\n }\n this.endGeometry(feature);\n } else {\n let geometryWidths = textState.overflow ? null : [];\n switch (geometryType) {\n case 'Point':\n case 'MultiPoint':\n flatCoordinates =\n /** @type {import(\"../../geom/MultiPoint.js\").default} */ (\n geometry\n ).getFlatCoordinates();\n break;\n case 'LineString':\n flatCoordinates =\n /** @type {import(\"../../geom/LineString.js\").default} */ (\n geometry\n ).getFlatMidpoint();\n break;\n case 'Circle':\n flatCoordinates =\n /** @type {import(\"../../geom/Circle.js\").default} */ (\n geometry\n ).getCenter();\n break;\n case 'MultiLineString':\n flatCoordinates =\n /** @type {import(\"../../geom/MultiLineString.js\").default} */ (\n geometry\n ).getFlatMidpoints();\n stride = 2;\n break;\n case 'Polygon':\n flatCoordinates =\n /** @type {import(\"../../geom/Polygon.js\").default} */ (\n geometry\n ).getFlatInteriorPoint();\n if (!textState.overflow) {\n geometryWidths.push(flatCoordinates[2] / this.resolution);\n }\n stride = 3;\n break;\n case 'MultiPolygon':\n const interiorPoints =\n /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (\n geometry\n ).getFlatInteriorPoints();\n flatCoordinates = [];\n for (let i = 0, ii = interiorPoints.length; i < ii; i += 3) {\n if (!textState.overflow) {\n geometryWidths.push(interiorPoints[i + 2] / this.resolution);\n }\n flatCoordinates.push(interiorPoints[i], interiorPoints[i + 1]);\n }\n if (flatCoordinates.length === 0) {\n return;\n }\n stride = 2;\n break;\n default:\n }\n const end = this.appendFlatPointCoordinates(flatCoordinates, stride);\n if (end === begin) {\n return;\n }\n if (\n geometryWidths &&\n (end - begin) / 2 !== flatCoordinates.length / stride\n ) {\n let beg = begin / 2;\n geometryWidths = geometryWidths.filter((w, i) => {\n const keep =\n coordinates[(beg + i) * 2] === flatCoordinates[i * stride] &&\n coordinates[(beg + i) * 2 + 1] === flatCoordinates[i * stride + 1];\n if (!keep) {\n --beg;\n }\n return keep;\n });\n }\n\n this.saveTextStates_();\n\n const backgroundFill = textState.backgroundFill\n ? this.createFill(this.fillStyleToState(textState.backgroundFill))\n : null;\n const backgroundStroke = textState.backgroundStroke\n ? this.createStroke(this.strokeStyleToState(textState.backgroundStroke))\n : null;\n\n this.beginGeometry(geometry, feature, index);\n\n // adjust padding for negative scale\n let padding = textState.padding;\n if (\n padding != defaultPadding &&\n (textState.scale[0] < 0 || textState.scale[1] < 0)\n ) {\n let p0 = textState.padding[0];\n let p1 = textState.padding[1];\n let p2 = textState.padding[2];\n let p3 = textState.padding[3];\n if (textState.scale[0] < 0) {\n p1 = -p1;\n p3 = -p3;\n }\n if (textState.scale[1] < 0) {\n p0 = -p0;\n p2 = -p2;\n }\n padding = [p0, p1, p2, p3];\n }\n\n // The image is unknown at this stage so we pass null; it will be computed at render time.\n // For clarity, we pass NaN for offsetX, offsetY, width and height, which will be computed at\n // render time.\n const pixelRatio = this.pixelRatio;\n this.instructions.push([\n CanvasInstruction.DRAW_IMAGE,\n begin,\n end,\n null,\n NaN,\n NaN,\n NaN,\n 1,\n 0,\n 0,\n this.textRotateWithView_,\n this.textRotation_,\n [1, 1],\n NaN,\n this.declutterMode_,\n this.declutterImageWithText_,\n padding == defaultPadding\n ? defaultPadding\n : padding.map(function (p) {\n return p * pixelRatio;\n }),\n backgroundFill,\n backgroundStroke,\n this.text_,\n this.textKey_,\n this.strokeKey_,\n this.fillKey_,\n this.textOffsetX_,\n this.textOffsetY_,\n geometryWidths,\n ]);\n const scale = 1 / pixelRatio;\n // Set default fill for hit detection background\n const hitDetectionBackgroundFill = backgroundFill\n ? backgroundFill.slice(0)\n : null;\n if (hitDetectionBackgroundFill) {\n hitDetectionBackgroundFill[1] = defaultFillStyle;\n }\n this.hitDetectionInstructions.push([\n CanvasInstruction.DRAW_IMAGE,\n begin,\n end,\n null,\n NaN,\n NaN,\n NaN,\n 1,\n 0,\n 0,\n this.textRotateWithView_,\n this.textRotation_,\n [scale, scale],\n NaN,\n this.declutterMode_,\n this.declutterImageWithText_,\n padding,\n hitDetectionBackgroundFill,\n backgroundStroke,\n this.text_,\n this.textKey_,\n this.strokeKey_,\n this.fillKey_ ? defaultFillStyle : this.fillKey_,\n this.textOffsetX_,\n this.textOffsetY_,\n geometryWidths,\n ]);\n\n this.endGeometry(feature);\n }\n }\n\n /**\n * @private\n */\n saveTextStates_() {\n const strokeState = this.textStrokeState_;\n const textState = this.textState_;\n const fillState = this.textFillState_;\n\n const strokeKey = this.strokeKey_;\n if (strokeState) {\n if (!(strokeKey in this.strokeStates)) {\n this.strokeStates[strokeKey] = {\n strokeStyle: strokeState.strokeStyle,\n lineCap: strokeState.lineCap,\n lineDashOffset: strokeState.lineDashOffset,\n lineWidth: strokeState.lineWidth,\n lineJoin: strokeState.lineJoin,\n miterLimit: strokeState.miterLimit,\n lineDash: strokeState.lineDash,\n };\n }\n }\n const textKey = this.textKey_;\n if (!(textKey in this.textStates)) {\n this.textStates[textKey] = {\n font: textState.font,\n textAlign: textState.textAlign || defaultTextAlign,\n justify: textState.justify,\n textBaseline: textState.textBaseline || defaultTextBaseline,\n scale: textState.scale,\n };\n }\n const fillKey = this.fillKey_;\n if (fillState) {\n if (!(fillKey in this.fillStates)) {\n this.fillStates[fillKey] = {\n fillStyle: fillState.fillStyle,\n };\n }\n }\n }\n\n /**\n * @private\n * @param {number} begin Begin.\n * @param {number} end End.\n */\n drawChars_(begin, end) {\n const strokeState = this.textStrokeState_;\n const textState = this.textState_;\n\n const strokeKey = this.strokeKey_;\n const textKey = this.textKey_;\n const fillKey = this.fillKey_;\n this.saveTextStates_();\n\n const pixelRatio = this.pixelRatio;\n const baseline = TEXT_ALIGN[textState.textBaseline];\n\n const offsetY = this.textOffsetY_ * pixelRatio;\n const text = this.text_;\n const strokeWidth = strokeState\n ? (strokeState.lineWidth * Math.abs(textState.scale[0])) / 2\n : 0;\n\n this.instructions.push([\n CanvasInstruction.DRAW_CHARS,\n begin,\n end,\n baseline,\n textState.overflow,\n fillKey,\n textState.maxAngle,\n pixelRatio,\n offsetY,\n strokeKey,\n strokeWidth * pixelRatio,\n text,\n textKey,\n 1,\n this.declutterMode_,\n this.textKeepUpright_,\n ]);\n this.hitDetectionInstructions.push([\n CanvasInstruction.DRAW_CHARS,\n begin,\n end,\n baseline,\n textState.overflow,\n fillKey ? defaultFillStyle : fillKey,\n textState.maxAngle,\n pixelRatio,\n offsetY,\n strokeKey,\n strokeWidth * pixelRatio,\n text,\n textKey,\n 1 / pixelRatio,\n this.declutterMode_,\n this.textKeepUpright_,\n ]);\n }\n\n /**\n * @param {import(\"../../style/Text.js\").default} textStyle Text style.\n * @param {Object} [sharedData] Shared data.\n * @override\n */\n setTextStyle(textStyle, sharedData) {\n let textState, fillState, strokeState;\n if (!textStyle) {\n this.text_ = '';\n } else {\n const textFillStyle = textStyle.getFill();\n if (!textFillStyle) {\n fillState = null;\n this.textFillState_ = fillState;\n } else {\n fillState = this.textFillState_;\n if (!fillState) {\n fillState = /** @type {import(\"../canvas.js\").FillState} */ ({});\n this.textFillState_ = fillState;\n }\n fillState.fillStyle = asColorLike(\n textFillStyle.getColor() || defaultFillStyle,\n );\n }\n\n const textStrokeStyle = textStyle.getStroke();\n if (!textStrokeStyle) {\n strokeState = null;\n this.textStrokeState_ = strokeState;\n } else {\n strokeState = this.textStrokeState_;\n if (!strokeState) {\n strokeState = /** @type {import(\"../canvas.js\").StrokeState} */ ({});\n this.textStrokeState_ = strokeState;\n }\n const lineDash = textStrokeStyle.getLineDash();\n const lineDashOffset = textStrokeStyle.getLineDashOffset();\n const lineWidth = textStrokeStyle.getWidth();\n const miterLimit = textStrokeStyle.getMiterLimit();\n strokeState.lineCap = textStrokeStyle.getLineCap() || defaultLineCap;\n strokeState.lineDash = lineDash ? lineDash.slice() : defaultLineDash;\n strokeState.lineDashOffset =\n lineDashOffset === undefined ? defaultLineDashOffset : lineDashOffset;\n strokeState.lineJoin = textStrokeStyle.getLineJoin() || defaultLineJoin;\n strokeState.lineWidth =\n lineWidth === undefined ? defaultLineWidth : lineWidth;\n strokeState.miterLimit =\n miterLimit === undefined ? defaultMiterLimit : miterLimit;\n strokeState.strokeStyle = asColorLike(\n textStrokeStyle.getColor() || defaultStrokeStyle,\n );\n }\n\n textState = this.textState_;\n const font = textStyle.getFont() || defaultFont;\n registerFont(font);\n const textScale = textStyle.getScaleArray();\n textState.overflow = textStyle.getOverflow();\n textState.font = font;\n textState.maxAngle = textStyle.getMaxAngle();\n textState.placement = textStyle.getPlacement();\n textState.textAlign = textStyle.getTextAlign();\n textState.repeat = textStyle.getRepeat();\n textState.justify = textStyle.getJustify();\n textState.textBaseline =\n textStyle.getTextBaseline() || defaultTextBaseline;\n textState.backgroundFill = textStyle.getBackgroundFill();\n textState.backgroundStroke = textStyle.getBackgroundStroke();\n textState.padding = textStyle.getPadding() || defaultPadding;\n textState.scale = textScale === undefined ? [1, 1] : textScale;\n\n const textOffsetX = textStyle.getOffsetX();\n const textOffsetY = textStyle.getOffsetY();\n const textRotateWithView = textStyle.getRotateWithView();\n const textKeepUpright = textStyle.getKeepUpright();\n const textRotation = textStyle.getRotation();\n this.text_ = textStyle.getText() || '';\n this.textOffsetX_ = textOffsetX === undefined ? 0 : textOffsetX;\n this.textOffsetY_ = textOffsetY === undefined ? 0 : textOffsetY;\n this.textRotateWithView_ =\n textRotateWithView === undefined ? false : textRotateWithView;\n this.textKeepUpright_ =\n textKeepUpright === undefined ? true : textKeepUpright;\n this.textRotation_ = textRotation === undefined ? 0 : textRotation;\n\n this.strokeKey_ = strokeState\n ? (typeof strokeState.strokeStyle == 'string'\n ? strokeState.strokeStyle\n : getUid(strokeState.strokeStyle)) +\n strokeState.lineCap +\n strokeState.lineDashOffset +\n '|' +\n strokeState.lineWidth +\n strokeState.lineJoin +\n strokeState.miterLimit +\n '[' +\n strokeState.lineDash.join() +\n ']'\n : '';\n this.textKey_ =\n textState.font +\n textState.scale +\n (textState.textAlign || '?') +\n (textState.repeat || '?') +\n (textState.justify || '?') +\n (textState.textBaseline || '?');\n this.fillKey_ =\n fillState && fillState.fillStyle\n ? typeof fillState.fillStyle == 'string'\n ? fillState.fillStyle\n : '|' + getUid(fillState.fillStyle)\n : '';\n }\n this.declutterMode_ = textStyle.getDeclutterMode();\n this.declutterImageWithText_ = sharedData;\n }\n}\n\nexport default CanvasTextBuilder;\n", "/**\n * @module ol/render/canvas/BuilderGroup\n */\n\nimport Builder from './Builder.js';\nimport ImageBuilder from './ImageBuilder.js';\nimport LineStringBuilder from './LineStringBuilder.js';\nimport PolygonBuilder from './PolygonBuilder.js';\nimport TextBuilder from './TextBuilder.js';\n\n/**\n * @type {Object<import(\"../canvas.js\").BuilderType, typeof Builder>}\n */\nconst BATCH_CONSTRUCTORS = {\n 'Circle': PolygonBuilder,\n 'Default': Builder,\n 'Image': ImageBuilder,\n 'LineString': LineStringBuilder,\n 'Polygon': PolygonBuilder,\n 'Text': TextBuilder,\n};\n\nclass BuilderGroup {\n /**\n * @param {number} tolerance Tolerance.\n * @param {import(\"../../extent.js\").Extent} maxExtent Max extent.\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n */\n constructor(tolerance, maxExtent, resolution, pixelRatio) {\n /**\n * @private\n * @type {number}\n */\n this.tolerance_ = tolerance;\n\n /**\n * @private\n * @type {import(\"../../extent.js\").Extent}\n */\n this.maxExtent_ = maxExtent;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ = pixelRatio;\n\n /**\n * @private\n * @type {number}\n */\n this.resolution_ = resolution;\n\n /**\n * @private\n * @type {!Object<string, !Object<import(\"../canvas.js\").BuilderType, Builder>>}\n */\n this.buildersByZIndex_ = {};\n }\n\n /**\n * @return {!Object<string, !Object<import(\"../canvas.js\").BuilderType, import(\"./Builder.js\").SerializableInstructions>>} The serializable instructions\n */\n finish() {\n const builderInstructions = {};\n for (const zKey in this.buildersByZIndex_) {\n builderInstructions[zKey] = builderInstructions[zKey] || {};\n const builders = this.buildersByZIndex_[zKey];\n for (const builderKey in builders) {\n const builderInstruction = builders[builderKey].finish();\n builderInstructions[zKey][builderKey] = builderInstruction;\n }\n }\n return builderInstructions;\n }\n\n /**\n * @param {number|undefined} zIndex Z index.\n * @param {import(\"../canvas.js\").BuilderType} builderType Replay type.\n * @return {import(\"../VectorContext.js\").default} Replay.\n */\n getBuilder(zIndex, builderType) {\n const zIndexKey = zIndex !== undefined ? zIndex.toString() : '0';\n let replays = this.buildersByZIndex_[zIndexKey];\n if (replays === undefined) {\n replays = {};\n this.buildersByZIndex_[zIndexKey] = replays;\n }\n let replay = replays[builderType];\n if (replay === undefined) {\n const Constructor = BATCH_CONSTRUCTORS[builderType];\n replay = new Constructor(\n this.tolerance_,\n this.maxExtent_,\n this.resolution_,\n this.pixelRatio_,\n );\n replays[builderType] = replay;\n }\n return replay;\n }\n}\n\nexport default BuilderGroup;\n", "/**\n * @module ol/geom/flat/length\n */\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Length.\n */\nexport function lineStringLength(flatCoordinates, offset, end, stride) {\n let x1 = flatCoordinates[offset];\n let y1 = flatCoordinates[offset + 1];\n let length = 0;\n for (let i = offset + stride; i < end; i += stride) {\n const x2 = flatCoordinates[i];\n const y2 = flatCoordinates[i + 1];\n length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n x1 = x2;\n y1 = y2;\n }\n return length;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @return {number} Perimeter.\n */\nexport function linearRingLength(flatCoordinates, offset, end, stride) {\n let perimeter = lineStringLength(flatCoordinates, offset, end, stride);\n const dx = flatCoordinates[end - stride] - flatCoordinates[offset];\n const dy = flatCoordinates[end - stride + 1] - flatCoordinates[offset + 1];\n perimeter += Math.sqrt(dx * dx + dy * dy);\n return perimeter;\n}\n", "import {angleBetween} from '../../coordinate.js';\n\n/**\n * Offsets a line string to the left / right along its segments direction.\n * Offset is applied to each segment of the line in the direciton of the segment normal (positive offset goes \"right\" relative to the line direction).\n * For very sharp angles between segments, the function falls back to offsetting along the segment normal direction to avoid excessively long miters.\n *\n * Coordinates and the offset should be in the same units \u2014 either pixels or the same spatial reference system as the input line coordinates.\n *\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} stride Stride.\n * @param {number} offset Offset distance along the segment normal direction.\n * Positive values offset to the right relative to the direction of the line.\n * Negative values offset to the left.\n * @param {boolean} isClosedRing If coordinates build a closed circle (in this the first and the last coordinate offsets will consider previous / next ring coordinate)\n * @param {Array<number>} [dest] Destination coordinate array. If not provided a new one will be created\n * @param {number} [destinationStride] Stride of destination coordinates. If unspecified, assumed to be same as the source coordinates stride.\n * @return {Array<number>} Result flat coordinates of the offset line.\n */\nexport function offsetLineString(\n flatCoordinates,\n stride,\n offset,\n isClosedRing,\n dest,\n destinationStride,\n) {\n dest = dest ?? [];\n destinationStride = destinationStride ?? stride;\n\n const firstPointX = flatCoordinates[0];\n const firstPointY = flatCoordinates[1];\n const secondToLastPointX = flatCoordinates[flatCoordinates.length - 4];\n const secondToLastPointY = flatCoordinates[flatCoordinates.length - 3];\n let x, y, prevX, prevY, nextX, nextY, offsetX, offsetY;\n\n let i = 0;\n for (let j = 0; j < flatCoordinates.length; j += stride) {\n // 1. Detect previous and next coordinates of a current vertex\n prevX = x;\n prevY = y;\n nextX = undefined;\n nextY = undefined;\n if (j + stride < flatCoordinates.length) {\n nextX = flatCoordinates[j + stride];\n nextY = flatCoordinates[j + stride + 1];\n }\n // First coordinate of a closed ring -> previous coordinate is the second to last one\n if (isClosedRing && j === 0) {\n prevX = secondToLastPointX;\n prevY = secondToLastPointY;\n }\n // Last coordinate of a closed ring -> next coordinate is the first vertex of a line string\n if (isClosedRing && j === flatCoordinates.length - 2) {\n // last coordinate\n nextX = firstPointX;\n nextY = firstPointY;\n }\n\n // 2. Current vertex to offset\n x = flatCoordinates[j];\n y = flatCoordinates[j + 1];\n\n // 3. Offset the vertex\n [offsetX, offsetY] = offsetLineVertex(\n x,\n y,\n prevX,\n prevY,\n nextX,\n nextY,\n offset,\n );\n dest[i++] = offsetX;\n dest[i++] = offsetY;\n\n // 4. Copy over other dimension values if any\n for (let k = 2; k < destinationStride; k++) {\n dest[i++] = flatCoordinates[j + k];\n }\n }\n\n if (dest.length != i) {\n dest.length = i;\n }\n return dest;\n}\n\n/**\n * Computes the offset of a single vertex of a line string.\n *\n * The function calculates a new vertex coordinate offset along the normal/miter direction of the line at this vertex.\n * Offset is applied along the segment normal (positive offset goes \"right\" relative to the line direction).\n * It handles first and last vertices (caps) as well as joins between two segments (mitering).\n * For very sharp angles, the function falls back to offsetting along the segment normal direction to avoid excessively long miters.\n *\n * Coordinates and the offset should be in the same units \u2014 either pixels or the same spatial reference system as the input line coordinates.\n *\n * @param {number} x Vertex x-coordinate.\n * @param {number} y Vertex y-coordinate.\n * @param {number|undefined} prevX Previous vertex x-coordinate.\n * Pass undefined if computing the offset for the first vertex (no previous vertex).\n * @param {number|undefined} prevY Previous vertex y-coordinate.\n * Pass undefined if computing the offset for the first vertex (no previous vertex).\n * @param {number|undefined} nextX Next vertex x-coordinate.\n * Pass undefined if computing the offset for the last vertex (no next vertex).\n * @param {number|undefined} nextY Next vertex y-coordinate.\n * Pass undefined if computing the offset for the last vertex (no next vertex).\n * @param {number} offset Offset distance along the segment normal direction.\n * Positive values offset to the right relative to the direction from previous to next vertex.\n * Negative values offset to the left.\n * @return {import(\"../../coordinate.js\").Coordinate} Offset vertex coordinate as `[x, y]`.\n */\nexport function offsetLineVertex(x, y, prevX, prevY, nextX, nextY, offset) {\n // Compute segment direction\n let nx, ny;\n if (prevX !== undefined && prevY !== undefined) {\n nx = x - prevX;\n ny = y - prevY;\n } else if (nextX !== undefined && nextY !== undefined) {\n nx = nextX - x;\n ny = nextY - y;\n } else {\n // no next, no previous point given -> just assume some default (horizontal) direction\n nx = 1;\n ny = 0;\n }\n\n // Normalize -> tangent\n const len = Math.hypot(nx, ny);\n const tx = nx / len;\n const ty = ny / len;\n\n // Rotate tangent 90\u00B0 -> normal\n nx = -ty;\n ny = tx;\n\n // First / last vertex -> offset the point in the direction of the normal vector\n if (prevX === undefined || prevY === undefined) {\n return [x + nx * offset, y + ny * offset];\n }\n if (nextX === undefined || nextY === undefined) {\n return [x + nx * offset, y + ny * offset];\n }\n\n // Compute join angle - angle between 2 segments of the vertex.\n const joinAngle = angleBetween([x, y], [prevX, prevY], [nextX, nextY]);\n\n // Avoid huge or infinite miter joins for very sharp angles, offset in the segment direction in this case.\n if (Math.cos(joinAngle) > 0.998) {\n return [x + tx * offset, y + ty * offset];\n }\n\n // Compute join offset direction.\n // We rotate the normal vector by half of the join angle.\n // This gives the direction of the miter at the vertex.\n const cos = Math.cos(joinAngle / 2);\n const sin = Math.sin(joinAngle / 2);\n\n // Rotate the normal vector (nx, ny) by half of the join angle.\n // bx/by = bisector direction before normalization\n const bx = sin * nx + cos * ny;\n const by = -cos * nx + sin * ny;\n\n // Scale the bisector so that moving along it preserves the correct offset distance.\n // Dividing by sin(half of angle) converts the bisector into the true miter vector.\n // (This expands the miter for sharp angles and shortens it for wide ones.)\n const dx = bx * (1 / sin);\n const dy = by * (1 / sin);\n\n // Offset final vertex along miter direction\n return [x + dx * offset, y + dy * offset];\n}\n", "/**\n * @module ol/geom/flat/textpath\n */\nimport {lerp} from '../../math.js';\nimport {rotate} from './transform.js';\n\n/**\n * @param {Array<number>} flatCoordinates Path to put text on.\n * @param {number} offset Start offset of the `flatCoordinates`.\n * @param {number} end End offset of the `flatCoordinates`.\n * @param {number} stride Stride.\n * @param {string} text Text to place on the path.\n * @param {number} startM m along the path where the text starts.\n * @param {number} maxAngle Max angle between adjacent chars in radians.\n * @param {number} scale The product of the text scale and the device pixel ratio.\n * @param {function(string, string, Object<string, number>):number} measureAndCacheTextWidth Measure and cache text width.\n * @param {string} font The font.\n * @param {Object<string, number>} cache A cache of measured widths.\n * @param {number} rotation Rotation to apply to the flatCoordinates to determine whether text needs to be reversed.\n * @param {boolean} keepUpright Whether the text needs to be kept upright\n * @return {Array<Array<*>>|null} The result array (or null if `maxAngle` was\n * exceeded). Entries of the array are x, y, anchorX, angle, chunk.\n */\nexport function drawTextOnPath(\n flatCoordinates,\n offset,\n end,\n stride,\n text,\n startM,\n maxAngle,\n scale,\n measureAndCacheTextWidth,\n font,\n cache,\n rotation,\n keepUpright = true,\n) {\n let x2 = flatCoordinates[offset];\n let y2 = flatCoordinates[offset + 1];\n let x1 = 0;\n let y1 = 0;\n let segmentLength = 0;\n let segmentM = 0;\n\n function advance() {\n x1 = x2;\n y1 = y2;\n offset += stride;\n x2 = flatCoordinates[offset];\n y2 = flatCoordinates[offset + 1];\n segmentM += segmentLength;\n segmentLength = Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n }\n do {\n advance();\n } while (offset < end - stride && segmentM + segmentLength < startM);\n\n let interpolate =\n segmentLength === 0 ? 0 : (startM - segmentM) / segmentLength;\n const beginX = lerp(x1, x2, interpolate);\n const beginY = lerp(y1, y2, interpolate);\n\n const startOffset = offset - stride;\n const startLength = segmentM;\n const endM = startM + scale * measureAndCacheTextWidth(font, text, cache);\n while (offset < end - stride && segmentM + segmentLength < endM) {\n advance();\n }\n interpolate = segmentLength === 0 ? 0 : (endM - segmentM) / segmentLength;\n const endX = lerp(x1, x2, interpolate);\n const endY = lerp(y1, y2, interpolate);\n\n // Keep text upright if the option is selected\n let reverse = false;\n if (keepUpright) {\n if (rotation) {\n const flat = [beginX, beginY, endX, endY];\n rotate(flat, 0, 4, 2, rotation, flat, flat);\n reverse = flat[0] > flat[2];\n } else {\n reverse = beginX > endX;\n }\n }\n\n const PI = Math.PI;\n const result = [];\n const singleSegment = startOffset + stride === offset;\n\n offset = startOffset;\n segmentLength = 0;\n segmentM = startLength;\n x2 = flatCoordinates[offset];\n y2 = flatCoordinates[offset + 1];\n\n let previousAngle;\n // All on the same segment\n if (singleSegment) {\n advance();\n\n previousAngle = Math.atan2(y2 - y1, x2 - x1);\n if (reverse) {\n previousAngle += previousAngle > 0 ? -PI : PI;\n }\n const x = (endX + beginX) / 2;\n const y = (endY + beginY) / 2;\n result[0] = [x, y, (endM - startM) / 2, previousAngle, text];\n return result;\n }\n\n // rendering across line segments\n text = text.replace(/\\n/g, ' '); // ensure rendering in single-line as all calculations below don't handle multi-lines\n\n for (let i = 0, ii = text.length; i < ii; ) {\n advance();\n let angle = Math.atan2(y2 - y1, x2 - x1);\n if (reverse) {\n angle += angle > 0 ? -PI : PI;\n }\n if (previousAngle !== undefined) {\n let delta = angle - previousAngle;\n delta += delta > PI ? -2 * PI : delta < -PI ? 2 * PI : 0;\n if (Math.abs(delta) > maxAngle) {\n return null;\n }\n }\n previousAngle = angle;\n\n const iStart = i;\n let charLength = 0;\n for (; i < ii; ++i) {\n const index = reverse ? ii - i - 1 : i;\n const len = scale * measureAndCacheTextWidth(font, text[index], cache);\n if (\n offset + stride < end &&\n segmentM + segmentLength < startM + charLength + len / 2\n ) {\n break;\n }\n charLength += len;\n }\n if (i === iStart) {\n continue;\n }\n const chars = reverse\n ? text.substring(ii - iStart, ii - i)\n : text.substring(iStart, i);\n interpolate =\n segmentLength === 0\n ? 0\n : (startM + charLength / 2 - segmentM) / segmentLength;\n const x = lerp(x1, x2, interpolate);\n const y = lerp(y1, y2, interpolate);\n result.push([x, y, charLength / 2, angle, chars]);\n startM += charLength;\n }\n return result;\n}\n", "/**\n * @module ol/render/canvas/Executor\n */\nimport {equals} from '../../array.js';\nimport {createEmpty, createOrUpdate, intersects} from '../../extent.js';\nimport {lineStringLength} from '../../geom/flat/length.js';\nimport {offsetLineVertex} from '../../geom/flat/lineoffset.js';\nimport {drawTextOnPath} from '../../geom/flat/textpath.js';\nimport {transform2D} from '../../geom/flat/transform.js';\nimport {\n apply as applyTransform,\n compose as composeTransform,\n create as createTransform,\n setFromArray as transformSetFromArray,\n} from '../../transform.js';\nimport ZIndexContext from '../canvas/ZIndexContext.js';\nimport {\n defaultPadding,\n defaultTextAlign,\n defaultTextBaseline,\n drawImageOrLabel,\n getTextDimensions,\n measureAndCacheTextWidth,\n} from '../canvas.js';\nimport CanvasInstruction from './Instruction.js';\nimport {TEXT_ALIGN} from './TextBuilder.js';\n\n/**\n * @typedef {import('../../structs/RBush.js').Entry<import('../../Feature.js').FeatureLike>} DeclutterEntry\n */\n\n/**\n * @typedef {Object} ImageOrLabelDimensions\n * @property {number} drawImageX DrawImageX.\n * @property {number} drawImageY DrawImageY.\n * @property {number} drawImageW DrawImageW.\n * @property {number} drawImageH DrawImageH.\n * @property {number} originX OriginX.\n * @property {number} originY OriginY.\n * @property {Array<number>} scale Scale.\n * @property {DeclutterEntry} declutterBox DeclutterBox.\n * @property {import(\"../../transform.js\").Transform} canvasTransform CanvasTransform.\n */\n\n/**\n * @typedef {{0: CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D, 1: import('../../size.js').Size, 2: import(\"../canvas.js\").Label|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement, 3: ImageOrLabelDimensions, 4: number, 5: Array<*>, 6: Array<*>}} ReplayImageOrLabelArgs\n */\n\n/**\n * @template T\n * @typedef {function(import(\"../../Feature.js\").FeatureLike, import(\"../../geom/SimpleGeometry.js\").default, import(\"../../style/Style.js\").DeclutterMode): T} FeatureCallback\n */\n\n/**\n * @type {import(\"../../extent.js\").Extent}\n */\nconst tmpExtent = createEmpty();\n\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nconst p1 = [];\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nconst p2 = [];\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nconst p3 = [];\n/** @type {import(\"../../coordinate.js\").Coordinate} */\nconst p4 = [];\n\n/**\n * @param {ReplayImageOrLabelArgs} replayImageOrLabelArgs Arguments to replayImageOrLabel\n * @return {DeclutterEntry} Declutter rbush entry.\n */\nfunction getDeclutterBox(replayImageOrLabelArgs) {\n return replayImageOrLabelArgs[3].declutterBox;\n}\n\nconst rtlRegEx = new RegExp(\n /* eslint-disable prettier/prettier */\n '[' +\n String.fromCharCode(0x00591) + '-' + String.fromCharCode(0x008ff) +\n String.fromCharCode(0x0fb1d) + '-' + String.fromCharCode(0x0fdff) +\n String.fromCharCode(0x0fe70) + '-' + String.fromCharCode(0x0fefc) +\n String.fromCharCode(0x10800) + '-' + String.fromCharCode(0x10fff) +\n String.fromCharCode(0x1e800) + '-' + String.fromCharCode(0x1efff) +\n ']'\n /* eslint-enable prettier/prettier */\n);\n\n/**\n * @param {string} text Text.\n * @param {CanvasTextAlign} align Alignment.\n * @return {number} Text alignment.\n */\nfunction horizontalTextAlign(text, align) {\n if (align === 'start') {\n align = rtlRegEx.test(text) ? 'right' : 'left';\n } else if (align === 'end') {\n align = rtlRegEx.test(text) ? 'left' : 'right';\n }\n return TEXT_ALIGN[align];\n}\n\n/**\n * @param {Array<string>} acc Accumulator.\n * @param {string} line Line of text.\n * @param {number} i Index\n * @return {Array<string>} Accumulator.\n */\nfunction createTextChunks(acc, line, i) {\n if (i > 0) {\n acc.push('\\n', '');\n }\n acc.push(line, '');\n return acc;\n}\n\n/**\n * Converts rich text to plain text for text along lines.\n * @param {string} result The resulting plain text.\n * @param {string} part Item of the rich text array.\n * @param {number} index Index of the item in the rich text array.\n * @return {string} The resulting plain text.\n */\nfunction richTextToPlainText(result, part, index) {\n if (index % 2 === 0) {\n result += part;\n }\n return result;\n}\n\nclass Executor {\n /**\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {boolean} overlaps The replay can have overlapping geometries.\n * @param {import(\"../canvas.js\").SerializableInstructions} instructions The serializable instructions.\n * @param {boolean} [deferredRendering] Enable deferred rendering.\n */\n constructor(\n resolution,\n pixelRatio,\n overlaps,\n instructions,\n deferredRendering,\n ) {\n /**\n * @protected\n * @type {boolean}\n */\n this.overlaps = overlaps;\n\n /**\n * @protected\n * @type {number}\n */\n this.pixelRatio = pixelRatio;\n\n /**\n * @protected\n * @const\n * @type {number}\n */\n this.resolution = resolution;\n\n /**\n * @private\n * @type {number}\n */\n this.alignAndScaleFill_;\n\n /**\n * @protected\n * @type {Array<*>}\n */\n this.instructions = instructions.instructions;\n\n /**\n * @protected\n * @type {Array<number>}\n */\n this.coordinates = instructions.coordinates;\n\n /**\n * @private\n * @type {!Object<number,import(\"../../coordinate.js\").Coordinate|Array<import(\"../../coordinate.js\").Coordinate>|Array<Array<import(\"../../coordinate.js\").Coordinate>>>}\n */\n this.coordinateCache_ = {};\n\n /**\n * @private\n * @type {!import(\"../../transform.js\").Transform}\n */\n this.renderedTransform_ = createTransform();\n\n /**\n * @protected\n * @type {Array<*>}\n */\n this.hitDetectionInstructions = instructions.hitDetectionInstructions;\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.pixelCoordinates_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.viewRotation_ = 0;\n\n /**\n * @type {!Object<string, import(\"../canvas.js\").FillState>}\n */\n this.fillStates = instructions.fillStates || {};\n\n /**\n * @type {!Object<string, import(\"../canvas.js\").StrokeState>}\n */\n this.strokeStates = instructions.strokeStates || {};\n\n /**\n * @type {!Object<string, import(\"../canvas.js\").TextState>}\n */\n this.textStates = instructions.textStates || {};\n\n /**\n * @private\n * @type {Object<string, Object<string, number>>}\n */\n this.widths_ = {};\n\n /**\n * @private\n * @type {Object<string, import(\"../canvas.js\").Label>}\n */\n this.labels_ = {};\n\n /**\n * @private\n * @type {import(\"../canvas/ZIndexContext.js\").default}\n */\n this.zIndexContext_ = deferredRendering ? new ZIndexContext() : null;\n }\n\n /**\n * @return {ZIndexContext} ZIndex context.\n */\n getZIndexContext() {\n return this.zIndexContext_;\n }\n\n /**\n * @param {string|Array<string>} text Text.\n * @param {string} textKey Text style key.\n * @param {string} fillKey Fill style key.\n * @param {string} strokeKey Stroke style key.\n * @return {import(\"../canvas.js\").Label} Label.\n */\n createLabel(text, textKey, fillKey, strokeKey) {\n const key = text + textKey + fillKey + strokeKey;\n if (this.labels_[key]) {\n return this.labels_[key];\n }\n const strokeState = strokeKey ? this.strokeStates[strokeKey] : null;\n const fillState = fillKey ? this.fillStates[fillKey] : null;\n const textState = this.textStates[textKey];\n const pixelRatio = this.pixelRatio;\n const scale = [\n textState.scale[0] * pixelRatio,\n textState.scale[1] * pixelRatio,\n ];\n const align = textState.justify\n ? TEXT_ALIGN[textState.justify]\n : horizontalTextAlign(\n Array.isArray(text) ? text[0] : text,\n textState.textAlign || defaultTextAlign,\n );\n const strokeWidth =\n strokeKey && strokeState.lineWidth ? strokeState.lineWidth : 0;\n\n const chunks = Array.isArray(text)\n ? text\n : String(text).split('\\n').reduce(createTextChunks, []);\n\n const {width, height, widths, heights, lineWidths} = getTextDimensions(\n textState,\n chunks,\n );\n const renderWidth = width + strokeWidth;\n const contextInstructions = [];\n // make canvas 2 pixels wider to account for italic text width measurement errors\n const w = (renderWidth + 2) * scale[0];\n const h = (height + strokeWidth) * scale[1];\n /** @type {import(\"../canvas.js\").Label} */\n const label = {\n width: w < 0 ? Math.floor(w) : Math.ceil(w),\n height: h < 0 ? Math.floor(h) : Math.ceil(h),\n contextInstructions: contextInstructions,\n };\n if (scale[0] != 1 || scale[1] != 1) {\n contextInstructions.push('scale', scale);\n }\n if (strokeKey) {\n contextInstructions.push('strokeStyle', strokeState.strokeStyle);\n contextInstructions.push('lineWidth', strokeWidth);\n contextInstructions.push('lineCap', strokeState.lineCap);\n contextInstructions.push('lineJoin', strokeState.lineJoin);\n contextInstructions.push('miterLimit', strokeState.miterLimit);\n contextInstructions.push('setLineDash', [strokeState.lineDash]);\n contextInstructions.push('lineDashOffset', strokeState.lineDashOffset);\n }\n if (fillKey) {\n contextInstructions.push('fillStyle', fillState.fillStyle);\n }\n contextInstructions.push('textBaseline', 'middle');\n contextInstructions.push('textAlign', 'center');\n const leftRight = 0.5 - align;\n let x = align * renderWidth + leftRight * strokeWidth;\n const strokeInstructions = [];\n const fillInstructions = [];\n let lineHeight = 0;\n let lineOffset = 0;\n let widthHeightIndex = 0;\n let lineWidthIndex = 0;\n let previousFont;\n for (let i = 0, ii = chunks.length; i < ii; i += 2) {\n const text = chunks[i];\n if (text === '\\n') {\n lineOffset += lineHeight;\n lineHeight = 0;\n x = align * renderWidth + leftRight * strokeWidth;\n ++lineWidthIndex;\n continue;\n }\n const font = chunks[i + 1] || textState.font;\n if (font !== previousFont) {\n if (strokeKey) {\n strokeInstructions.push('font', font);\n }\n if (fillKey) {\n fillInstructions.push('font', font);\n }\n previousFont = font;\n }\n lineHeight = Math.max(lineHeight, heights[widthHeightIndex]);\n const fillStrokeArgs = [\n text,\n x +\n leftRight * widths[widthHeightIndex] +\n align * (widths[widthHeightIndex] - lineWidths[lineWidthIndex]),\n 0.5 * (strokeWidth + lineHeight) + lineOffset,\n ];\n x += widths[widthHeightIndex];\n if (strokeKey) {\n strokeInstructions.push('strokeText', fillStrokeArgs);\n }\n if (fillKey) {\n fillInstructions.push('fillText', fillStrokeArgs);\n }\n ++widthHeightIndex;\n }\n Array.prototype.push.apply(contextInstructions, strokeInstructions);\n Array.prototype.push.apply(contextInstructions, fillInstructions);\n this.labels_[key] = label;\n return label;\n }\n\n /**\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import(\"../../coordinate.js\").Coordinate} p1 1st point of the background box.\n * @param {import(\"../../coordinate.js\").Coordinate} p2 2nd point of the background box.\n * @param {import(\"../../coordinate.js\").Coordinate} p3 3rd point of the background box.\n * @param {import(\"../../coordinate.js\").Coordinate} p4 4th point of the background box.\n * @param {Array<*>} fillInstruction Fill instruction.\n * @param {Array<*>} strokeInstruction Stroke instruction.\n */\n replayTextBackground_(\n context,\n p1,\n p2,\n p3,\n p4,\n fillInstruction,\n strokeInstruction,\n ) {\n context.beginPath();\n context.moveTo.apply(context, p1);\n context.lineTo.apply(context, p2);\n context.lineTo.apply(context, p3);\n context.lineTo.apply(context, p4);\n context.lineTo.apply(context, p1);\n if (fillInstruction) {\n this.alignAndScaleFill_ = /** @type {number} */ (fillInstruction[2]);\n context.fillStyle = /** @type {string} */ (fillInstruction[1]);\n this.fill_(context);\n }\n if (strokeInstruction) {\n this.setStrokeStyle_(\n context,\n /** @type {Array<*>} */ (strokeInstruction),\n );\n context.stroke();\n }\n }\n\n /**\n * @private\n * @param {number} sheetWidth Width of the sprite sheet.\n * @param {number} sheetHeight Height of the sprite sheet.\n * @param {number} centerX X.\n * @param {number} centerY Y.\n * @param {number} width Width.\n * @param {number} height Height.\n * @param {number} anchorX Anchor X.\n * @param {number} anchorY Anchor Y.\n * @param {number} originX Origin X.\n * @param {number} originY Origin Y.\n * @param {number} rotation Rotation.\n * @param {import(\"../../size.js\").Size} scale Scale.\n * @param {boolean} snapToPixel Snap to pixel.\n * @param {Array<number>} padding Padding.\n * @param {boolean} fillStroke Background fill or stroke.\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @return {ImageOrLabelDimensions} Dimensions for positioning and decluttering the image or label.\n */\n calculateImageOrLabelDimensions_(\n sheetWidth,\n sheetHeight,\n centerX,\n centerY,\n width,\n height,\n anchorX,\n anchorY,\n originX,\n originY,\n rotation,\n scale,\n snapToPixel,\n padding,\n fillStroke,\n feature,\n ) {\n anchorX *= scale[0];\n anchorY *= scale[1];\n let x = centerX - anchorX;\n let y = centerY - anchorY;\n\n const w = width + originX > sheetWidth ? sheetWidth - originX : width;\n const h = height + originY > sheetHeight ? sheetHeight - originY : height;\n const boxW = padding[3] + w * scale[0] + padding[1];\n const boxH = padding[0] + h * scale[1] + padding[2];\n const boxX = x - padding[3];\n const boxY = y - padding[0];\n\n if (fillStroke || rotation !== 0) {\n p1[0] = boxX;\n p4[0] = boxX;\n p1[1] = boxY;\n p2[1] = boxY;\n p2[0] = boxX + boxW;\n p3[0] = p2[0];\n p3[1] = boxY + boxH;\n p4[1] = p3[1];\n }\n\n let transform;\n if (rotation !== 0) {\n transform = composeTransform(\n createTransform(),\n centerX,\n centerY,\n 1,\n 1,\n rotation,\n -centerX,\n -centerY,\n );\n\n applyTransform(transform, p1);\n applyTransform(transform, p2);\n applyTransform(transform, p3);\n applyTransform(transform, p4);\n createOrUpdate(\n Math.min(p1[0], p2[0], p3[0], p4[0]),\n Math.min(p1[1], p2[1], p3[1], p4[1]),\n Math.max(p1[0], p2[0], p3[0], p4[0]),\n Math.max(p1[1], p2[1], p3[1], p4[1]),\n tmpExtent,\n );\n } else {\n createOrUpdate(\n Math.min(boxX, boxX + boxW),\n Math.min(boxY, boxY + boxH),\n Math.max(boxX, boxX + boxW),\n Math.max(boxY, boxY + boxH),\n tmpExtent,\n );\n }\n if (snapToPixel) {\n x = Math.round(x);\n y = Math.round(y);\n }\n return {\n drawImageX: x,\n drawImageY: y,\n drawImageW: w,\n drawImageH: h,\n originX: originX,\n originY: originY,\n declutterBox: {\n minX: tmpExtent[0],\n minY: tmpExtent[1],\n maxX: tmpExtent[2],\n maxY: tmpExtent[3],\n value: feature,\n },\n canvasTransform: transform,\n scale: scale,\n };\n }\n\n /**\n * @private\n * @param {CanvasRenderingContext2D} context Context.\n * @param {import('../../size.js').Size} scaledCanvasSize Scaled canvas size.\n * @param {import(\"../canvas.js\").Label|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} imageOrLabel Image.\n * @param {ImageOrLabelDimensions} dimensions Dimensions.\n * @param {number} opacity Opacity.\n * @param {Array<*>} fillInstruction Fill instruction.\n * @param {Array<*>} strokeInstruction Stroke instruction.\n * @return {boolean} The image or label was rendered.\n */\n replayImageOrLabel_(\n context,\n scaledCanvasSize,\n imageOrLabel,\n dimensions,\n opacity,\n fillInstruction,\n strokeInstruction,\n ) {\n const fillStroke = !!(fillInstruction || strokeInstruction);\n\n const box = dimensions.declutterBox;\n const strokePadding = strokeInstruction\n ? (strokeInstruction[2] * dimensions.scale[0]) / 2\n : 0;\n const intersects =\n box.minX - strokePadding <= scaledCanvasSize[0] &&\n box.maxX + strokePadding >= 0 &&\n box.minY - strokePadding <= scaledCanvasSize[1] &&\n box.maxY + strokePadding >= 0;\n\n if (intersects) {\n if (fillStroke) {\n this.replayTextBackground_(\n context,\n p1,\n p2,\n p3,\n p4,\n /** @type {Array<*>} */ (fillInstruction),\n /** @type {Array<*>} */ (strokeInstruction),\n );\n }\n drawImageOrLabel(\n context,\n dimensions.canvasTransform,\n opacity,\n imageOrLabel,\n dimensions.originX,\n dimensions.originY,\n dimensions.drawImageW,\n dimensions.drawImageH,\n dimensions.drawImageX,\n dimensions.drawImageY,\n dimensions.scale,\n );\n }\n return true;\n }\n\n /**\n * @private\n * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n */\n fill_(context) {\n const alignAndScale = this.alignAndScaleFill_;\n if (alignAndScale) {\n const origin = applyTransform(this.renderedTransform_, [0, 0]);\n const repeatSize = 512 * this.pixelRatio;\n context.save();\n context.translate(origin[0] % repeatSize, origin[1] % repeatSize);\n if (alignAndScale !== 1) {\n context.scale(alignAndScale, alignAndScale);\n }\n }\n context.fill();\n if (alignAndScale) {\n context.restore();\n }\n }\n\n /**\n * @private\n * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n * @param {Array<*>} instruction Instruction.\n */\n setStrokeStyle_(context, instruction) {\n context.strokeStyle =\n /** @type {import(\"../../colorlike.js\").ColorLike} */ (instruction[1]);\n if (!instruction[1]) {\n return;\n }\n context.lineWidth = /** @type {number} */ (instruction[2]);\n context.lineCap = /** @type {CanvasLineCap} */ (instruction[3]);\n context.lineJoin = /** @type {CanvasLineJoin} */ (instruction[4]);\n context.miterLimit = /** @type {number} */ (instruction[5]);\n context.lineDashOffset = /** @type {number} */ (instruction[7]);\n context.setLineDash(/** @type {Array<number>} */ (instruction[6]));\n }\n\n /**\n * @private\n * @param {string|Array<string>} text The text to draw.\n * @param {string} textKey The key of the text state.\n * @param {string} strokeKey The key for the stroke state.\n * @param {string} fillKey The key for the fill state.\n * @return {{label: import(\"../canvas.js\").Label, anchorX: number, anchorY: number}} The text image and its anchor.\n */\n drawLabelWithPointPlacement_(text, textKey, strokeKey, fillKey) {\n const textState = this.textStates[textKey];\n\n const label = this.createLabel(text, textKey, fillKey, strokeKey);\n\n const strokeState = this.strokeStates[strokeKey];\n const pixelRatio = this.pixelRatio;\n const align = horizontalTextAlign(\n Array.isArray(text) ? text[0] : text,\n textState.textAlign || defaultTextAlign,\n );\n const baseline = TEXT_ALIGN[textState.textBaseline || defaultTextBaseline];\n const strokeWidth =\n strokeState && strokeState.lineWidth ? strokeState.lineWidth : 0;\n\n // Remove the 2 pixels we added in createLabel() for the anchor\n const width = label.width / pixelRatio - 2 * textState.scale[0];\n const anchorX = align * width + 2 * (0.5 - align) * strokeWidth;\n const anchorY =\n (baseline * label.height) / pixelRatio +\n 2 * (0.5 - baseline) * strokeWidth;\n\n return {\n label: label,\n anchorX: anchorX,\n anchorY: anchorY,\n };\n }\n\n /**\n * @private\n * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n * @param {import('../../size.js').Size} scaledCanvasSize Scaled canvas size\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {Array<*>} instructions Instructions array.\n * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.\n * @param {FeatureCallback<T>} [featureCallback] Feature callback.\n * @param {import(\"../../extent.js\").Extent} [hitExtent] Only check\n * features that intersect this extent.\n * @param {import(\"rbush\").default<DeclutterEntry>} [declutterTree] Declutter tree.\n * @return {T|undefined} Callback result.\n * @template T\n */\n execute_(\n context,\n scaledCanvasSize,\n transform,\n instructions,\n snapToPixel,\n featureCallback,\n hitExtent,\n declutterTree,\n ) {\n const zIndexContext = this.zIndexContext_;\n /** @type {Array<number>} */\n let pixelCoordinates;\n if (this.pixelCoordinates_ && equals(transform, this.renderedTransform_)) {\n pixelCoordinates = this.pixelCoordinates_;\n } else {\n if (!this.pixelCoordinates_) {\n this.pixelCoordinates_ = [];\n }\n pixelCoordinates = transform2D(\n this.coordinates,\n 0,\n this.coordinates.length,\n 2,\n transform,\n this.pixelCoordinates_,\n );\n transformSetFromArray(this.renderedTransform_, transform);\n }\n let i = 0; // instruction index\n const ii = instructions.length; // end of instructions\n let d = 0; // data index\n let dd; // end of per-instruction data\n let anchorX,\n anchorY,\n lineOffsetPx,\n /** @type {boolean} */ isClosedRing,\n /** @type {number} */ dStart,\n /** @type {import('../../style/Style.js').DeclutterMode} */\n declutterMode,\n prevX,\n prevY,\n roundX,\n roundY,\n image,\n text,\n textKey,\n strokeKey,\n fillKey;\n let pendingFill = 0;\n let pendingStroke = 0;\n const coordinateCache = this.coordinateCache_;\n const viewRotation = this.viewRotation_;\n const viewRotationFromTransform =\n Math.round(Math.atan2(-transform[1], transform[0]) * 1e12) / 1e12;\n\n const state = /** @type {import(\"../../render.js\").State} */ ({\n context: context,\n pixelRatio: this.pixelRatio,\n resolution: this.resolution,\n rotation: viewRotation,\n });\n\n // When the batch size gets too big, performance decreases. 200 is a good\n // balance between batch size and number of fill/stroke instructions.\n const batchSize =\n this.instructions != instructions || this.overlaps ? 0 : 200;\n let /** @type {import(\"../../Feature.js\").FeatureLike} */ feature;\n let x, y, currentGeometry;\n while (i < ii) {\n const instruction = instructions[i];\n const type = /** @type {import(\"./Instruction.js\").default} */ (\n instruction[0]\n );\n switch (type) {\n case CanvasInstruction.BEGIN_GEOMETRY:\n feature = /** @type {import(\"../../Feature.js\").FeatureLike} */ (\n instruction[1]\n );\n currentGeometry = instruction[3];\n if (!feature.getGeometry()) {\n i = /** @type {number} */ (instruction[2]);\n } else if (\n hitExtent !== undefined &&\n !intersects(hitExtent, currentGeometry.getExtent())\n ) {\n i = /** @type {number} */ (instruction[2]) + 1;\n } else {\n ++i;\n }\n if (zIndexContext) {\n zIndexContext.zIndex = instruction[4];\n }\n break;\n case CanvasInstruction.BEGIN_PATH:\n if (pendingFill > batchSize) {\n this.fill_(context);\n pendingFill = 0;\n }\n if (pendingStroke > batchSize) {\n context.stroke();\n pendingStroke = 0;\n }\n if (!pendingFill && !pendingStroke) {\n context.beginPath();\n prevX = NaN;\n prevY = NaN;\n }\n ++i;\n break;\n case CanvasInstruction.CIRCLE:\n d = /** @type {number} */ (instruction[1]);\n lineOffsetPx = /** @type {number} */ instruction[2] ?? 0;\n const x1 = pixelCoordinates[d];\n const y1 = pixelCoordinates[d + 1];\n const x2 = pixelCoordinates[d + 2] - lineOffsetPx;\n const y2 = pixelCoordinates[d + 3] - lineOffsetPx;\n const dx = x2 - x1;\n const dy = y2 - y1;\n const r = Math.sqrt(dx * dx + dy * dy);\n context.moveTo(x1 + r, y1);\n context.arc(x1, y1, r, 0, 2 * Math.PI, true);\n ++i;\n break;\n case CanvasInstruction.CLOSE_PATH:\n context.closePath();\n ++i;\n break;\n case CanvasInstruction.CUSTOM:\n d = /** @type {number} */ (instruction[1]);\n dd = instruction[2];\n const geometry =\n /** @type {import(\"../../geom/SimpleGeometry.js\").default} */ (\n instruction[3]\n );\n const renderer = instruction[4];\n const fn = instruction[5];\n state.geometry = geometry;\n state.feature = feature;\n if (!(i in coordinateCache)) {\n coordinateCache[i] = [];\n }\n const coords = coordinateCache[i];\n if (fn) {\n fn(pixelCoordinates, d, dd, 2, coords);\n } else {\n coords[0] = pixelCoordinates[d];\n coords[1] = pixelCoordinates[d + 1];\n coords.length = 2;\n }\n if (zIndexContext) {\n zIndexContext.zIndex = instruction[6];\n }\n renderer(coords, state);\n ++i;\n break;\n case CanvasInstruction.DRAW_IMAGE:\n d = /** @type {number} */ (instruction[1]);\n dd = /** @type {number} */ (instruction[2]);\n image =\n /** @type {HTMLCanvasElement|HTMLVideoElement|HTMLImageElement} */ (\n instruction[3]\n );\n\n // Remaining arguments in DRAW_IMAGE are in alphabetical order\n anchorX = /** @type {number} */ (instruction[4]);\n anchorY = /** @type {number} */ (instruction[5]);\n let height = /** @type {number} */ (instruction[6]);\n const opacity = /** @type {number} */ (instruction[7]);\n const originX = /** @type {number} */ (instruction[8]);\n const originY = /** @type {number} */ (instruction[9]);\n const rotateWithView = /** @type {boolean} */ (instruction[10]);\n let rotation = /** @type {number} */ (instruction[11]);\n const scale = /** @type {import(\"../../size.js\").Size} */ (\n instruction[12]\n );\n let width = /** @type {number} */ (instruction[13]);\n declutterMode = instruction[14] || 'declutter';\n const declutterImageWithText =\n /** @type {{args: import(\"../canvas.js\").DeclutterImageWithText, declutterMode: import('../../style/Style.js').DeclutterMode}} */ (\n instruction[15]\n );\n\n if (!image && instruction.length >= 20) {\n // create label images\n text = /** @type {string} */ (instruction[19]);\n textKey = /** @type {string} */ (instruction[20]);\n strokeKey = /** @type {string} */ (instruction[21]);\n fillKey = /** @type {string} */ (instruction[22]);\n const labelWithAnchor = this.drawLabelWithPointPlacement_(\n text,\n textKey,\n strokeKey,\n fillKey,\n );\n image = labelWithAnchor.label;\n instruction[3] = image;\n const textOffsetX = /** @type {number} */ (instruction[23]);\n anchorX = (labelWithAnchor.anchorX - textOffsetX) * this.pixelRatio;\n instruction[4] = anchorX;\n const textOffsetY = /** @type {number} */ (instruction[24]);\n anchorY = (labelWithAnchor.anchorY - textOffsetY) * this.pixelRatio;\n instruction[5] = anchorY;\n height = image.height;\n instruction[6] = height;\n width = image.width;\n instruction[13] = width;\n }\n\n let geometryWidths;\n if (instruction.length > 25) {\n geometryWidths = /** @type {number} */ (instruction[25]);\n }\n\n let padding, backgroundFillInstruction, backgroundStrokeInstruction;\n if (instruction.length > 17) {\n padding = /** @type {Array<number>} */ (instruction[16]);\n backgroundFillInstruction = /** @type {Array<*>} */ (\n instruction[17]\n );\n backgroundStrokeInstruction = /** @type {Array<*>} */ (\n instruction[18]\n );\n } else {\n padding = defaultPadding;\n backgroundFillInstruction = null;\n backgroundStrokeInstruction = null;\n }\n\n if (rotateWithView && viewRotationFromTransform) {\n // Canvas is expected to be rotated to reverse view rotation.\n rotation += viewRotation;\n } else if (!rotateWithView && !viewRotationFromTransform) {\n // Canvas is not rotated, images need to be rotated back to be north-up.\n rotation -= viewRotation;\n }\n let widthIndex = 0;\n for (; d < dd; d += 2) {\n if (\n geometryWidths &&\n geometryWidths[widthIndex++] < width / this.pixelRatio\n ) {\n continue;\n }\n const dimensions = this.calculateImageOrLabelDimensions_(\n image.width,\n image.height,\n pixelCoordinates[d],\n pixelCoordinates[d + 1],\n width,\n height,\n anchorX,\n anchorY,\n originX,\n originY,\n rotation,\n scale,\n snapToPixel,\n padding,\n !!backgroundFillInstruction || !!backgroundStrokeInstruction,\n feature,\n );\n /** @type {ReplayImageOrLabelArgs} */\n const args = [\n context,\n scaledCanvasSize,\n image,\n dimensions,\n opacity,\n backgroundFillInstruction,\n backgroundStrokeInstruction,\n ];\n if (declutterTree) {\n let imageArgs, imageDeclutterMode, imageDeclutterBox;\n if (declutterImageWithText) {\n const index = dd - d;\n if (!declutterImageWithText[index]) {\n // We now have the image for an image+text combination.\n declutterImageWithText[index] = {args, declutterMode};\n // Don't render anything for now, wait for the text.\n continue;\n }\n const imageDeclutter = declutterImageWithText[index];\n imageArgs = imageDeclutter.args;\n imageDeclutterMode = imageDeclutter.declutterMode;\n delete declutterImageWithText[index];\n imageDeclutterBox = getDeclutterBox(imageArgs);\n }\n // We now have image and text for an image+text combination.\n let renderImage, renderText;\n if (\n imageArgs &&\n (imageDeclutterMode !== 'declutter' ||\n !declutterTree.collides(imageDeclutterBox))\n ) {\n renderImage = true;\n }\n if (\n declutterMode !== 'declutter' ||\n !declutterTree.collides(dimensions.declutterBox)\n ) {\n renderText = true;\n }\n if (\n imageDeclutterMode === 'declutter' &&\n declutterMode === 'declutter'\n ) {\n const render = renderImage && renderText;\n renderImage = render;\n renderText = render;\n }\n if (renderImage) {\n if (imageDeclutterMode !== 'none') {\n declutterTree.insert(imageDeclutterBox);\n }\n this.replayImageOrLabel_.apply(this, imageArgs);\n }\n if (renderText) {\n if (declutterMode !== 'none') {\n declutterTree.insert(dimensions.declutterBox);\n }\n this.replayImageOrLabel_.apply(this, args);\n }\n } else {\n this.replayImageOrLabel_.apply(this, args);\n }\n }\n ++i;\n break;\n case CanvasInstruction.DRAW_CHARS:\n const begin = /** @type {number} */ (instruction[1]);\n const end = /** @type {number} */ (instruction[2]);\n const baseline = /** @type {number} */ (instruction[3]);\n const overflow = /** @type {number} */ (instruction[4]);\n fillKey = /** @type {string} */ (instruction[5]);\n const maxAngle = /** @type {number} */ (instruction[6]);\n const measurePixelRatio = /** @type {number} */ (instruction[7]);\n const offsetY = /** @type {number} */ (instruction[8]);\n strokeKey = /** @type {string} */ (instruction[9]);\n const strokeWidth = /** @type {number} */ (instruction[10]);\n text = /** @type {string|Array<string>} */ (instruction[11]);\n if (Array.isArray(text)) {\n //FIXME Add support for rich text along lines\n text = text.reduce(richTextToPlainText, '');\n }\n textKey = /** @type {string} */ (instruction[12]);\n const pixelRatioScale = [\n /** @type {number} */ (instruction[13]),\n /** @type {number} */ (instruction[13]),\n ];\n declutterMode = instruction[14] || 'declutter';\n\n const textKeepUpright = /** @type {boolean} */ (instruction[15]);\n const textState = this.textStates[textKey];\n const font = textState.font;\n const textScale = [\n textState.scale[0] * measurePixelRatio,\n textState.scale[1] * measurePixelRatio,\n ];\n\n let cachedWidths;\n if (font in this.widths_) {\n cachedWidths = this.widths_[font];\n } else {\n cachedWidths = {};\n this.widths_[font] = cachedWidths;\n }\n\n const pathLength = lineStringLength(pixelCoordinates, begin, end, 2);\n const textLength =\n Math.abs(textScale[0]) *\n measureAndCacheTextWidth(font, text, cachedWidths);\n if (overflow || textLength <= pathLength) {\n const textAlign = this.textStates[textKey].textAlign;\n const startM =\n (pathLength - textLength) * horizontalTextAlign(text, textAlign);\n const parts = drawTextOnPath(\n pixelCoordinates,\n begin,\n end,\n 2,\n text,\n startM,\n maxAngle,\n Math.abs(textScale[0]),\n measureAndCacheTextWidth,\n font,\n cachedWidths,\n viewRotationFromTransform ? 0 : this.viewRotation_,\n textKeepUpright,\n );\n drawChars: if (parts) {\n /** @type {Array<ReplayImageOrLabelArgs>} */\n const replayImageOrLabelArgs = [];\n let c, cc, chars, label, part;\n if (strokeKey) {\n for (c = 0, cc = parts.length; c < cc; ++c) {\n part = parts[c]; // x, y, anchorX, rotation, chunk\n chars = /** @type {string} */ (part[4]);\n label = this.createLabel(chars, textKey, '', strokeKey);\n anchorX =\n /** @type {number} */ (part[2]) +\n (textScale[0] < 0 ? -strokeWidth : strokeWidth);\n anchorY =\n baseline * label.height +\n ((0.5 - baseline) * 2 * strokeWidth * textScale[1]) /\n textScale[0] -\n offsetY;\n const dimensions = this.calculateImageOrLabelDimensions_(\n label.width,\n label.height,\n part[0],\n part[1],\n label.width,\n label.height,\n anchorX,\n anchorY,\n 0,\n 0,\n part[3],\n pixelRatioScale,\n false,\n defaultPadding,\n false,\n feature,\n );\n if (\n declutterTree &&\n declutterMode === 'declutter' &&\n declutterTree.collides(dimensions.declutterBox)\n ) {\n break drawChars;\n }\n replayImageOrLabelArgs.push([\n context,\n scaledCanvasSize,\n label,\n dimensions,\n 1,\n null,\n null,\n ]);\n }\n }\n if (fillKey) {\n for (c = 0, cc = parts.length; c < cc; ++c) {\n part = parts[c]; // x, y, anchorX, rotation, chunk\n chars = /** @type {string} */ (part[4]);\n label = this.createLabel(chars, textKey, fillKey, '');\n anchorX = /** @type {number} */ (part[2]);\n anchorY = baseline * label.height - offsetY;\n const dimensions = this.calculateImageOrLabelDimensions_(\n label.width,\n label.height,\n part[0],\n part[1],\n label.width,\n label.height,\n anchorX,\n anchorY,\n 0,\n 0,\n part[3],\n pixelRatioScale,\n false,\n defaultPadding,\n false,\n feature,\n );\n if (\n declutterTree &&\n declutterMode === 'declutter' &&\n declutterTree.collides(dimensions.declutterBox)\n ) {\n break drawChars;\n }\n replayImageOrLabelArgs.push([\n context,\n scaledCanvasSize,\n label,\n dimensions,\n 1,\n null,\n null,\n ]);\n }\n }\n if (declutterTree && declutterMode !== 'none') {\n declutterTree.load(replayImageOrLabelArgs.map(getDeclutterBox));\n }\n for (let i = 0, ii = replayImageOrLabelArgs.length; i < ii; ++i) {\n this.replayImageOrLabel_.apply(this, replayImageOrLabelArgs[i]);\n }\n }\n }\n ++i;\n break;\n case CanvasInstruction.END_GEOMETRY:\n if (featureCallback !== undefined) {\n feature = /** @type {import(\"../../Feature.js\").FeatureLike} */ (\n instruction[1]\n );\n const result = featureCallback(\n feature,\n currentGeometry,\n declutterMode,\n );\n if (result) {\n return result;\n }\n }\n ++i;\n break;\n case CanvasInstruction.FILL:\n if (batchSize) {\n pendingFill++;\n } else {\n this.fill_(context);\n }\n ++i;\n break;\n case CanvasInstruction.MOVE_TO_LINE_TO:\n d = /** @type {number} */ (instruction[1]);\n dd = /** @type {number} */ (instruction[2]);\n lineOffsetPx = /** @type {number|undefined} */ (instruction[3]);\n isClosedRing =\n /** @type {boolean|undefined} */ (instruction[4]) ?? false;\n x = pixelCoordinates[d];\n y = pixelCoordinates[d + 1];\n\n if (lineOffsetPx) {\n dStart = d;\n [x, y] = offsetLineVertex(\n x,\n y,\n isClosedRing ? pixelCoordinates[dd - 4] : undefined,\n isClosedRing ? pixelCoordinates[dd - 3] : undefined,\n pixelCoordinates[d + 2],\n pixelCoordinates[d + 3],\n lineOffsetPx,\n );\n }\n\n context.moveTo(x, y);\n prevX = (x + 0.5) | 0;\n prevY = (y + 0.5) | 0;\n for (d += 2; d < dd; d += 2) {\n x = pixelCoordinates[d];\n y = pixelCoordinates[d + 1];\n roundX = (x + 0.5) | 0;\n roundY = (y + 0.5) | 0;\n if (d == dd - 2 || roundX !== prevX || roundY !== prevY) {\n if (lineOffsetPx) {\n if (d == dd - 2) {\n // last coordinate\n [x, y] = offsetLineVertex(\n x,\n y,\n pixelCoordinates[d - 2],\n pixelCoordinates[d - 1],\n isClosedRing ? pixelCoordinates[dStart + 2] : undefined,\n isClosedRing ? pixelCoordinates[dStart + 3] : undefined,\n lineOffsetPx,\n );\n } else {\n [x, y] = offsetLineVertex(\n x,\n y,\n pixelCoordinates[d - 2],\n pixelCoordinates[d - 1],\n pixelCoordinates[d + 2],\n pixelCoordinates[d + 3],\n lineOffsetPx,\n );\n }\n }\n\n context.lineTo(x, y);\n prevX = roundX;\n prevY = roundY;\n }\n }\n ++i;\n break;\n case CanvasInstruction.SET_FILL_STYLE:\n this.alignAndScaleFill_ = instruction[2];\n\n if (pendingFill) {\n this.fill_(context);\n pendingFill = 0;\n if (pendingStroke) {\n context.stroke();\n pendingStroke = 0;\n }\n }\n\n /** @type {import(\"../../colorlike.js\").ColorLike} */\n context.fillStyle = instruction[1];\n ++i;\n break;\n case CanvasInstruction.SET_STROKE_STYLE:\n if (pendingStroke) {\n context.stroke();\n pendingStroke = 0;\n }\n this.setStrokeStyle_(context, /** @type {Array<*>} */ (instruction));\n ++i;\n break;\n case CanvasInstruction.STROKE:\n if (batchSize) {\n pendingStroke++;\n } else {\n context.stroke();\n }\n ++i;\n break;\n default: // consume the instruction anyway, to avoid an infinite loop\n ++i;\n break;\n }\n }\n if (pendingFill) {\n this.fill_(context);\n }\n if (pendingStroke) {\n context.stroke();\n }\n return undefined;\n }\n\n /**\n * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n * @param {import('../../size.js').Size} scaledCanvasSize Scaled canvas size.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {number} viewRotation View rotation.\n * @param {boolean} snapToPixel Snap point symbols and text to integer pixels.\n * @param {import(\"rbush\").default<DeclutterEntry>} [declutterTree] Declutter tree.\n */\n execute(\n context,\n scaledCanvasSize,\n transform,\n viewRotation,\n snapToPixel,\n declutterTree,\n ) {\n this.viewRotation_ = viewRotation;\n this.execute_(\n context,\n scaledCanvasSize,\n transform,\n this.instructions,\n snapToPixel,\n undefined,\n undefined,\n declutterTree,\n );\n }\n\n /**\n * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {number} viewRotation View rotation.\n * @param {FeatureCallback<T>} [featureCallback] Feature callback.\n * @param {import(\"../../extent.js\").Extent} [hitExtent] Only check\n * features that intersect this extent.\n * @return {T|undefined} Callback result.\n * @template T\n */\n executeHitDetection(\n context,\n transform,\n viewRotation,\n featureCallback,\n hitExtent,\n ) {\n this.viewRotation_ = viewRotation;\n return this.execute_(\n context,\n [context.canvas.width, context.canvas.height],\n transform,\n this.hitDetectionInstructions,\n true,\n featureCallback,\n hitExtent,\n );\n }\n}\n\nexport default Executor;\n", "/**\n * @module ol/render/canvas/ExecutorGroup\n */\n\nimport {ascending, descending} from '../../array.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {buffer, createEmpty, extendCoordinate} from '../../extent.js';\nimport {transform2D} from '../../geom/flat/transform.js';\nimport {isEmpty} from '../../obj.js';\nimport {\n compose as composeTransform,\n create as createTransform,\n} from '../../transform.js';\nimport Executor from './Executor.js';\n\n/**\n * @const\n * @type {Array<import(\"../canvas.js\").BuilderType>}\n */\nexport const ALL = [\n 'Polygon',\n 'Circle',\n 'LineString',\n 'Image',\n 'Text',\n 'Default',\n];\n\n/**\n * @const\n * @type {Array<import(\"../canvas.js\").BuilderType>}\n */\nexport const DECLUTTER = ['Image', 'Text'];\n\n/**\n * @const\n * @type {Array<import(\"../canvas.js\").BuilderType>}\n */\nexport const NON_DECLUTTER = ALL.filter(\n (builderType) => !DECLUTTER.includes(builderType),\n);\n\n/** @type {boolean|undefined} */\nlet willReadFrequently = false;\n\n/** @type {boolean|undefined} */\nlet canvasReadsBenchmarked = false;\n\n/** Determine if canvas read operations are faster with willReadFrequently set to true or false */\nfunction benchmarkCanvasReads() {\n let bestResult = 0;\n /**\n * @param {boolean} willReadFrequently Will read frequently.\n * @return {number} Operation count.\n */\n const measure = (willReadFrequently) => {\n const context = createCanvasContext2D(1, 1, null, {willReadFrequently});\n let count = 0;\n const start = performance.now();\n for (; performance.now() - start < 50; ++count) {\n context.fillStyle = `rgba(255,0,${count % 256},1)`;\n context.fillRect(0, 0, 1, 1);\n context.getImageData(0, 0, 1, 1);\n }\n bestResult = count > bestResult ? count : bestResult;\n return count;\n };\n\n const measures = {\n [measure(true)]: true,\n [measure(false)]: false,\n [measure(undefined)]: undefined,\n };\n willReadFrequently = measures[bestResult];\n canvasReadsBenchmarked = true;\n}\n\nclass ExecutorGroup {\n /**\n * @param {import(\"../../extent.js\").Extent} maxExtent Max extent for clipping. When a\n * `maxExtent` was set on the Builder for this executor group, the same `maxExtent`\n * should be set here, unless the target context does not exceed that extent (which\n * can be the case when rendering to tiles).\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @param {boolean} overlaps The executor group can have overlapping geometries.\n * @param {!Object<string, !Object<import(\"../canvas.js\").BuilderType, import(\"../canvas.js\").SerializableInstructions>>} allInstructions\n * The serializable instructions.\n * @param {number} [renderBuffer] Optional rendering buffer.\n * @param {boolean} [deferredRendering] Enable deferred rendering with renderDeferred().\n */\n constructor(\n maxExtent,\n resolution,\n pixelRatio,\n overlaps,\n allInstructions,\n renderBuffer,\n deferredRendering,\n ) {\n /**\n * @private\n * @type {import(\"../../extent.js\").Extent}\n */\n this.maxExtent_ = maxExtent;\n\n /**\n * @private\n * @type {boolean}\n */\n this.overlaps_ = overlaps;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ = pixelRatio;\n\n /**\n * @private\n * @type {number}\n */\n this.resolution_ = resolution;\n\n /**\n * @private\n * @type {number|undefined}\n */\n this.renderBuffer_ = renderBuffer;\n\n /**\n * @private\n * @type {!Object<string, !Object<string, import(\"./Executor\").default>>}\n */\n this.executorsByZIndex_ = {};\n\n /**\n * @private\n * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D}\n */\n this.hitDetectionContext_ = null;\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.hitDetectionTransform_ = createTransform();\n\n /**\n * @private\n * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D}\n */\n this.renderedContext_ = null;\n\n /**\n * @private\n * @type {Object<number, Array<import(\"./ZIndexContext.js\").default>>}\n */\n this.deferredZIndexContexts_ = {};\n\n this.createExecutors_(allInstructions, deferredRendering);\n }\n\n /**\n * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n */\n clip(context, transform) {\n const flatClipCoords = this.getClipCoords(transform);\n context.beginPath();\n context.moveTo(flatClipCoords[0], flatClipCoords[1]);\n context.lineTo(flatClipCoords[2], flatClipCoords[3]);\n context.lineTo(flatClipCoords[4], flatClipCoords[5]);\n context.lineTo(flatClipCoords[6], flatClipCoords[7]);\n context.clip();\n }\n\n /**\n * Create executors and populate them using the provided instructions.\n * @private\n * @param {!Object<string, !Object<string, import(\"../canvas.js\").SerializableInstructions>>} allInstructions The serializable instructions\n * @param {boolean} deferredRendering Enable deferred rendering.\n */\n createExecutors_(allInstructions, deferredRendering) {\n for (const zIndex in allInstructions) {\n let executors = this.executorsByZIndex_[zIndex];\n if (executors === undefined) {\n executors = {};\n this.executorsByZIndex_[zIndex] = executors;\n }\n const instructionByZindex = allInstructions[zIndex];\n for (const builderType in instructionByZindex) {\n const instructions = instructionByZindex[builderType];\n executors[builderType] = new Executor(\n this.resolution_,\n this.pixelRatio_,\n this.overlaps_,\n instructions,\n deferredRendering,\n );\n }\n }\n }\n\n /**\n * @param {Array<import(\"../canvas.js\").BuilderType>} executors Executors.\n * @return {boolean} Has executors of the provided types.\n */\n hasExecutors(executors) {\n for (const zIndex in this.executorsByZIndex_) {\n const candidates = this.executorsByZIndex_[zIndex];\n for (let i = 0, ii = executors.length; i < ii; ++i) {\n if (executors[i] in candidates) {\n return true;\n }\n }\n }\n return false;\n }\n\n /**\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @param {number} hitTolerance Hit tolerance in pixels.\n * @param {function(import(\"../../Feature.js\").FeatureLike, import(\"../../geom/SimpleGeometry.js\").default, number): T} callback Feature callback.\n * @param {Array<import(\"../../Feature.js\").FeatureLike>} declutteredFeatures Decluttered features.\n * @return {T|undefined} Callback result.\n * @template T\n */\n forEachFeatureAtCoordinate(\n coordinate,\n resolution,\n rotation,\n hitTolerance,\n callback,\n declutteredFeatures,\n ) {\n if (canvasReadsBenchmarked === false) {\n benchmarkCanvasReads();\n }\n\n hitTolerance = Math.round(hitTolerance);\n const contextSize = hitTolerance * 2 + 1;\n const transform = composeTransform(\n this.hitDetectionTransform_,\n hitTolerance + 0.5,\n hitTolerance + 0.5,\n 1 / resolution,\n -1 / resolution,\n -rotation,\n -coordinate[0],\n -coordinate[1],\n );\n\n const newContext = !this.hitDetectionContext_;\n if (newContext) {\n this.hitDetectionContext_ = createCanvasContext2D(\n contextSize,\n contextSize,\n null,\n {willReadFrequently},\n );\n }\n const context = this.hitDetectionContext_;\n\n if (\n context.canvas.width !== contextSize ||\n context.canvas.height !== contextSize\n ) {\n context.canvas.width = contextSize;\n context.canvas.height = contextSize;\n } else if (!newContext) {\n context.clearRect(0, 0, contextSize, contextSize);\n }\n\n /** @type {import(\"../../extent.js\").Extent|undefined} */\n let hitExtent;\n if (this.renderBuffer_ !== undefined) {\n hitExtent = createEmpty();\n extendCoordinate(hitExtent, coordinate);\n buffer(\n hitExtent,\n resolution * (this.renderBuffer_ + hitTolerance),\n hitExtent,\n );\n }\n\n const indexes = getPixelIndexArray(hitTolerance);\n\n /** @type {import(\"../canvas.js\").BuilderType} */\n let builderType;\n\n /**\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @param {import('../../style/Style.js').DeclutterMode} declutterMode Declutter mode.\n * @return {T|undefined} Callback result.\n */\n function featureCallback(feature, geometry, declutterMode) {\n const imageData = context.getImageData(\n 0,\n 0,\n contextSize,\n contextSize,\n ).data;\n for (let i = 0, ii = indexes.length; i < ii; i++) {\n if (imageData[indexes[i]] > 0) {\n if (\n !declutteredFeatures ||\n declutterMode === 'none' ||\n (builderType !== 'Image' && builderType !== 'Text') ||\n declutteredFeatures.includes(feature)\n ) {\n const idx = (indexes[i] - 3) / 4;\n const x = hitTolerance - (idx % contextSize);\n const y = hitTolerance - ((idx / contextSize) | 0);\n const result = callback(feature, geometry, x * x + y * y);\n if (result) {\n return result;\n }\n }\n context.clearRect(0, 0, contextSize, contextSize);\n break;\n }\n }\n return undefined;\n }\n\n /** @type {Array<number>} */\n const zs = Object.keys(this.executorsByZIndex_).map(Number);\n zs.sort(ascending);\n\n let i, j, executors, executor, result;\n for (i = zs.length - 1; i >= 0; --i) {\n const zIndexKey = zs[i].toString();\n executors = this.executorsByZIndex_[zIndexKey];\n for (j = ALL.length - 1; j >= 0; --j) {\n builderType = ALL[j];\n executor = executors[builderType];\n if (executor !== undefined) {\n result = executor.executeHitDetection(\n context,\n transform,\n rotation,\n featureCallback,\n hitExtent,\n );\n if (result) {\n return result;\n }\n }\n }\n }\n return undefined;\n }\n\n /**\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @return {Array<number>|null} Clip coordinates.\n */\n getClipCoords(transform) {\n const maxExtent = this.maxExtent_;\n if (!maxExtent) {\n return null;\n }\n const minX = maxExtent[0];\n const minY = maxExtent[1];\n const maxX = maxExtent[2];\n const maxY = maxExtent[3];\n const flatClipCoords = [minX, minY, minX, maxY, maxX, maxY, maxX, minY];\n transform2D(flatClipCoords, 0, 8, 2, transform, flatClipCoords);\n return flatClipCoords;\n }\n\n /**\n * @return {boolean} Is empty.\n */\n isEmpty() {\n return isEmpty(this.executorsByZIndex_);\n }\n\n /**\n * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} targetContext Context.\n * @param {import('../../size.js').Size} scaledCanvasSize Scale of the context.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {number} viewRotation View rotation.\n * @param {boolean} snapToPixel Snap point symbols and test to integer pixel.\n * @param {Array<import(\"../canvas.js\").BuilderType>} [builderTypes] Ordered replay types to replay.\n * Default is {@link module:ol/render/replay~ALL}\n * @param {import(\"rbush\").default<import('./Executor.js').DeclutterEntry>|null} [declutterTree] Declutter tree.\n * When set to null, no decluttering is done, even when the executor group has a `ZIndexContext`.\n */\n execute(\n targetContext,\n scaledCanvasSize,\n transform,\n viewRotation,\n snapToPixel,\n builderTypes,\n declutterTree,\n ) {\n const zs = Object.keys(this.executorsByZIndex_).map(Number);\n zs.sort(declutterTree ? descending : ascending);\n\n builderTypes = builderTypes ? builderTypes : ALL;\n const maxBuilderTypes = ALL.length;\n for (let i = 0, ii = zs.length; i < ii; ++i) {\n const zIndexKey = zs[i].toString();\n const replays = this.executorsByZIndex_[zIndexKey];\n for (let j = 0, jj = builderTypes.length; j < jj; ++j) {\n const builderType = builderTypes[j];\n const replay = replays[builderType];\n if (replay !== undefined) {\n const zIndexContext =\n declutterTree === null ? undefined : replay.getZIndexContext();\n const context = zIndexContext\n ? zIndexContext.getContext()\n : targetContext;\n const requireClip =\n this.maxExtent_ &&\n builderType !== 'Image' &&\n builderType !== 'Text';\n if (requireClip) {\n context.save();\n // setup clipping so that the parts of over-simplified geometries are not\n // visible outside the current extent when panning\n this.clip(context, transform);\n }\n if (\n !zIndexContext ||\n builderType === 'Text' ||\n builderType === 'Image'\n ) {\n replay.execute(\n context,\n scaledCanvasSize,\n transform,\n viewRotation,\n snapToPixel,\n declutterTree,\n );\n } else {\n zIndexContext.pushFunction((context) =>\n replay.execute(\n context,\n scaledCanvasSize,\n transform,\n viewRotation,\n snapToPixel,\n declutterTree,\n ),\n );\n }\n if (requireClip) {\n context.restore();\n }\n if (zIndexContext) {\n zIndexContext.offset();\n const index = zs[i] * maxBuilderTypes + ALL.indexOf(builderType);\n if (!this.deferredZIndexContexts_[index]) {\n this.deferredZIndexContexts_[index] = [];\n }\n this.deferredZIndexContexts_[index].push(zIndexContext);\n }\n }\n }\n }\n\n this.renderedContext_ = targetContext;\n }\n\n getDeferredZIndexContexts() {\n return this.deferredZIndexContexts_;\n }\n\n getRenderedContext() {\n return this.renderedContext_;\n }\n\n renderDeferred() {\n const deferredZIndexContexts = this.deferredZIndexContexts_;\n const zs = Object.keys(deferredZIndexContexts).map(Number).sort(ascending);\n for (let i = 0, ii = zs.length; i < ii; ++i) {\n deferredZIndexContexts[zs[i]].forEach((zIndexContext) => {\n zIndexContext.draw(this.renderedContext_); // FIXME Pass clip to replay for temporarily enabling clip\n zIndexContext.clear();\n });\n deferredZIndexContexts[zs[i]].length = 0;\n }\n }\n}\n\n/**\n * This cache is used to store arrays of indexes for calculated pixel circles\n * to increase performance.\n * It is a static property to allow each Replaygroup to access it.\n * @type {Object<number, Array<number>>}\n */\nconst circlePixelIndexArrayCache = {};\n\n/**\n * This methods creates an array with indexes of all pixels within a circle,\n * ordered by how close they are to the center.\n * A cache is used to increase performance.\n * @param {number} radius Radius.\n * @return {Array<number>} An array with indexes within a circle.\n */\nexport function getPixelIndexArray(radius) {\n if (circlePixelIndexArrayCache[radius] !== undefined) {\n return circlePixelIndexArrayCache[radius];\n }\n\n const size = radius * 2 + 1;\n const maxDistanceSq = radius * radius;\n const distances = new Array(maxDistanceSq + 1);\n for (let i = 0; i <= radius; ++i) {\n for (let j = 0; j <= radius; ++j) {\n const distanceSq = i * i + j * j;\n if (distanceSq > maxDistanceSq) {\n break;\n }\n let distance = distances[distanceSq];\n if (!distance) {\n distance = [];\n distances[distanceSq] = distance;\n }\n distance.push(((radius + i) * size + (radius + j)) * 4 + 3);\n if (i > 0) {\n distance.push(((radius - i) * size + (radius + j)) * 4 + 3);\n }\n if (j > 0) {\n distance.push(((radius + i) * size + (radius - j)) * 4 + 3);\n if (i > 0) {\n distance.push(((radius - i) * size + (radius - j)) * 4 + 3);\n }\n }\n }\n }\n\n const pixelIndex = [];\n for (let i = 0, ii = distances.length; i < ii; ++i) {\n if (distances[i]) {\n pixelIndex.push(...distances[i]);\n }\n }\n\n circlePixelIndexArrayCache[radius] = pixelIndex;\n return pixelIndex;\n}\n\nexport default ExecutorGroup;\n", "/**\n * @module ol/render/canvas/Immediate\n */\n// FIXME test, especially polygons with holes and multipolygons\n// FIXME need to handle large thick features (where pixel size matters)\n// FIXME add offset and end to ol/geom/flat/transform~transform2D?\n\nimport {equals} from '../../array.js';\nimport {asColorLike} from '../../colorlike.js';\nimport {intersects} from '../../extent.js';\nimport {transformGeom2D} from '../../geom/SimpleGeometry.js';\nimport {offsetLineString} from '../../geom/flat/lineoffset.js';\nimport {transform2D} from '../../geom/flat/transform.js';\nimport {toFixed} from '../../math.js';\nimport {\n compose as composeTransform,\n create as createTransform,\n} from '../../transform.js';\nimport VectorContext from '../VectorContext.js';\nimport {\n defaultFillStyle,\n defaultFont,\n defaultLineCap,\n defaultLineDash,\n defaultLineDashOffset,\n defaultLineJoin,\n defaultLineWidth,\n defaultMiterLimit,\n defaultStrokeStyle,\n defaultTextAlign,\n defaultTextBaseline,\n} from '../canvas.js';\n\n/**\n * @classdesc\n * A concrete subclass of {@link module:ol/render/VectorContext~VectorContext} that implements\n * direct rendering of features and geometries to an HTML5 Canvas context.\n * Instances of this class are created internally by the library and\n * provided to application code as vectorContext member of the\n * {@link module:ol/render/Event~RenderEvent} object associated with postcompose, precompose and\n * render events emitted by layers and maps.\n */\nclass CanvasImmediateRenderer extends VectorContext {\n /**\n * @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.\n * @param {number} pixelRatio Pixel ratio.\n * @param {import(\"../../extent.js\").Extent} extent Extent.\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n * @param {number} viewRotation View rotation.\n * @param {number} [squaredTolerance] Optional squared tolerance for simplification.\n * @param {import(\"../../proj.js\").TransformFunction} [userTransform] Transform from user to view projection.\n */\n constructor(\n context,\n pixelRatio,\n extent,\n transform,\n viewRotation,\n squaredTolerance,\n userTransform,\n ) {\n super();\n\n /**\n * @private\n * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D}\n */\n this.context_ = context;\n\n /**\n * @private\n * @type {number}\n */\n this.pixelRatio_ = pixelRatio;\n\n /**\n * @private\n * @type {import(\"../../extent.js\").Extent}\n */\n this.extent_ = extent;\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.transform_ = transform;\n\n /**\n * @private\n * @type {number}\n */\n this.transformRotation_ = transform\n ? toFixed(Math.atan2(transform[1], transform[0]), 10)\n : 0;\n\n /**\n * @private\n * @type {number}\n */\n this.viewRotation_ = viewRotation;\n\n /**\n * @private\n * @type {number}\n */\n this.squaredTolerance_ = squaredTolerance;\n\n /**\n * @private\n * @type {import(\"../../proj.js\").TransformFunction}\n */\n this.userTransform_ = userTransform;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").FillState}\n */\n this.contextFillState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").StrokeState}\n */\n this.contextStrokeState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").TextState}\n */\n this.contextTextState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").FillState}\n */\n this.fillState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").StrokeState}\n */\n this.strokeState_ = null;\n\n /**\n * @private\n * @type {import('../../DataTile.js').ImageLike}\n */\n this.image_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.imageAnchorX_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.imageAnchorY_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.imageHeight_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.imageOpacity_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.imageOriginX_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.imageOriginY_ = 0;\n\n /**\n * @private\n * @type {boolean}\n */\n this.imageRotateWithView_ = false;\n\n /**\n * @private\n * @type {number}\n */\n this.imageRotation_ = 0;\n\n /**\n * @private\n * @type {import(\"../../size.js\").Size}\n */\n this.imageScale_ = [0, 0];\n\n /**\n * @private\n * @type {number}\n */\n this.imageWidth_ = 0;\n\n /**\n * @private\n * @type {string}\n */\n this.text_ = '';\n\n /**\n * @private\n * @type {number}\n */\n this.textOffsetX_ = 0;\n\n /**\n * @private\n * @type {number}\n */\n this.textOffsetY_ = 0;\n\n /**\n * @private\n * @type {boolean}\n */\n this.textRotateWithView_ = false;\n\n /**\n * @private\n * @type {number}\n */\n this.textRotation_ = 0;\n\n /**\n * @private\n * @type {import(\"../../size.js\").Size}\n */\n this.textScale_ = [0, 0];\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").FillState}\n */\n this.textFillState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").StrokeState}\n */\n this.textStrokeState_ = null;\n\n /**\n * @private\n * @type {?import(\"../canvas.js\").TextState}\n */\n this.textState_ = null;\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.pixelCoordinates_ = [];\n\n /**\n * @private\n * @type {import(\"../../transform.js\").Transform}\n */\n this.tmpLocalTransform_ = createTransform();\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @private\n */\n drawImages_(flatCoordinates, offset, end, stride) {\n if (!this.image_) {\n return;\n }\n const pixelCoordinates = transform2D(\n flatCoordinates,\n offset,\n end,\n stride,\n this.transform_,\n this.pixelCoordinates_,\n );\n const context = this.context_;\n const localTransform = this.tmpLocalTransform_;\n const alpha = context.globalAlpha;\n if (this.imageOpacity_ != 1) {\n context.globalAlpha = alpha * this.imageOpacity_;\n }\n let rotation = this.imageRotation_;\n if (this.transformRotation_ === 0) {\n rotation -= this.viewRotation_;\n }\n if (this.imageRotateWithView_) {\n rotation += this.viewRotation_;\n }\n for (let i = 0, ii = pixelCoordinates.length; i < ii; i += 2) {\n const x = pixelCoordinates[i] - this.imageAnchorX_;\n const y = pixelCoordinates[i + 1] - this.imageAnchorY_;\n if (\n rotation !== 0 ||\n this.imageScale_[0] != 1 ||\n this.imageScale_[1] != 1\n ) {\n const centerX = x + this.imageAnchorX_;\n const centerY = y + this.imageAnchorY_;\n composeTransform(\n localTransform,\n centerX,\n centerY,\n 1,\n 1,\n rotation,\n -centerX,\n -centerY,\n );\n context.save();\n context.transform.apply(context, localTransform);\n context.translate(centerX, centerY);\n context.scale(this.imageScale_[0], this.imageScale_[1]);\n context.drawImage(\n this.image_,\n this.imageOriginX_,\n this.imageOriginY_,\n this.imageWidth_,\n this.imageHeight_,\n -this.imageAnchorX_,\n -this.imageAnchorY_,\n this.imageWidth_,\n this.imageHeight_,\n );\n context.restore();\n } else {\n context.drawImage(\n this.image_,\n this.imageOriginX_,\n this.imageOriginY_,\n this.imageWidth_,\n this.imageHeight_,\n x,\n y,\n this.imageWidth_,\n this.imageHeight_,\n );\n }\n }\n if (this.imageOpacity_ != 1) {\n context.globalAlpha = alpha;\n }\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @private\n */\n drawText_(flatCoordinates, offset, end, stride) {\n if (!this.textState_ || this.text_ === '') {\n return;\n }\n if (this.textFillState_) {\n this.setContextFillState_(this.textFillState_);\n }\n if (this.textStrokeState_) {\n this.setContextStrokeState_(this.textStrokeState_);\n }\n this.setContextTextState_(this.textState_);\n const pixelCoordinates = transform2D(\n flatCoordinates,\n offset,\n end,\n stride,\n this.transform_,\n this.pixelCoordinates_,\n );\n const context = this.context_;\n let rotation = this.textRotation_;\n if (this.transformRotation_ === 0) {\n rotation -= this.viewRotation_;\n }\n if (this.textRotateWithView_) {\n rotation += this.viewRotation_;\n }\n for (; offset < end; offset += stride) {\n const x = pixelCoordinates[offset] + this.textOffsetX_;\n const y = pixelCoordinates[offset + 1] + this.textOffsetY_;\n if (\n rotation !== 0 ||\n this.textScale_[0] != 1 ||\n this.textScale_[1] != 1\n ) {\n context.save();\n context.translate(x - this.textOffsetX_, y - this.textOffsetY_);\n context.rotate(rotation);\n context.translate(this.textOffsetX_, this.textOffsetY_);\n context.scale(this.textScale_[0], this.textScale_[1]);\n if (this.textStrokeState_) {\n context.strokeText(this.text_, 0, 0);\n }\n if (this.textFillState_) {\n context.fillText(this.text_, 0, 0);\n }\n context.restore();\n } else {\n if (this.textStrokeState_) {\n context.strokeText(this.text_, x, y);\n }\n if (this.textFillState_) {\n context.fillText(this.text_, x, y);\n }\n }\n }\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {boolean} close Close.\n * @param {number} [strokeOffset] Stroke Offset.\n * @private\n * @return {number} end End.\n */\n moveToLineTo_(flatCoordinates, offset, end, stride, close, strokeOffset) {\n const context = this.context_;\n let pixelCoordinates = transform2D(\n flatCoordinates,\n offset,\n end,\n stride,\n this.transform_,\n this.pixelCoordinates_,\n );\n if (Math.abs(strokeOffset) > 0) {\n pixelCoordinates = offsetLineString(\n pixelCoordinates,\n stride,\n strokeOffset,\n close,\n pixelCoordinates,\n );\n }\n context.moveTo(pixelCoordinates[0], pixelCoordinates[1]);\n let length = pixelCoordinates.length;\n if (close) {\n length -= 2;\n }\n for (let i = 2; i < length; i += 2) {\n context.lineTo(pixelCoordinates[i], pixelCoordinates[i + 1]);\n }\n if (close) {\n context.closePath();\n }\n return end;\n }\n\n /**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} [strokeOffset] Stroke Offset.\n * @private\n * @return {number} End.\n */\n drawRings_(flatCoordinates, offset, ends, stride, strokeOffset) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n offset = this.moveToLineTo_(\n flatCoordinates,\n offset,\n ends[i],\n stride,\n true,\n strokeOffset,\n );\n }\n return offset;\n }\n\n /**\n * Render a circle geometry into the canvas. Rendering is immediate and uses\n * the current fill and stroke styles.\n *\n * @param {import(\"../../geom/Circle.js\").default} geometry Circle geometry.\n * @api\n * @override\n */\n drawCircle(geometry) {\n if (this.squaredTolerance_) {\n geometry = /** @type {import(\"../../geom/Circle.js\").default} */ (\n geometry.simplifyTransformed(\n this.squaredTolerance_,\n this.userTransform_,\n )\n );\n }\n if (!intersects(this.extent_, geometry.getExtent())) {\n return;\n }\n if (this.fillState_ || this.strokeState_) {\n if (this.fillState_) {\n this.setContextFillState_(this.fillState_);\n }\n if (this.strokeState_) {\n this.setContextStrokeState_(this.strokeState_);\n }\n const pixelCoordinates = transformGeom2D(\n geometry,\n this.transform_,\n this.pixelCoordinates_,\n );\n const dx = pixelCoordinates[2] - pixelCoordinates[0];\n const dy = pixelCoordinates[3] - pixelCoordinates[1];\n const radius = Math.sqrt(dx * dx + dy * dy);\n const context = this.context_;\n context.beginPath();\n context.arc(\n pixelCoordinates[0],\n pixelCoordinates[1],\n radius,\n 0,\n 2 * Math.PI,\n );\n if (this.fillState_) {\n context.fill();\n }\n if (this.strokeState_) {\n context.stroke();\n }\n }\n if (this.text_ !== '') {\n this.drawText_(geometry.getCenter(), 0, 2, 2);\n }\n }\n\n /**\n * Set the rendering style. Note that since this is an immediate rendering API,\n * any `zIndex` on the provided style will be ignored.\n *\n * @param {import(\"../../style/Style.js\").default} style The rendering style.\n * @api\n * @override\n */\n setStyle(style) {\n this.setFillStrokeStyle(style.getFill(), style.getStroke());\n this.setImageStyle(style.getImage());\n this.setTextStyle(style.getText());\n }\n\n /**\n * @param {import(\"../../transform.js\").Transform} transform Transform.\n */\n setTransform(transform) {\n this.transform_ = transform;\n }\n\n /**\n * Render a geometry into the canvas. Call\n * {@link module:ol/render/canvas/Immediate~CanvasImmediateRenderer#setStyle renderer.setStyle()} first to set the rendering style.\n *\n * @param {import(\"../../geom/Geometry.js\").default|import(\"../Feature.js\").default} geometry The geometry to render.\n * @api\n * @override\n */\n drawGeometry(geometry) {\n const type = geometry.getType();\n switch (type) {\n case 'Point':\n this.drawPoint(\n /** @type {import(\"../../geom/Point.js\").default} */ (geometry),\n );\n break;\n case 'LineString':\n this.drawLineString(\n /** @type {import(\"../../geom/LineString.js\").default} */ (geometry),\n );\n break;\n case 'Polygon':\n this.drawPolygon(\n /** @type {import(\"../../geom/Polygon.js\").default} */ (geometry),\n );\n break;\n case 'MultiPoint':\n this.drawMultiPoint(\n /** @type {import(\"../../geom/MultiPoint.js\").default} */ (geometry),\n );\n break;\n case 'MultiLineString':\n this.drawMultiLineString(\n /** @type {import(\"../../geom/MultiLineString.js\").default} */ (\n geometry\n ),\n );\n break;\n case 'MultiPolygon':\n this.drawMultiPolygon(\n /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (\n geometry\n ),\n );\n break;\n case 'GeometryCollection':\n this.drawGeometryCollection(\n /** @type {import(\"../../geom/GeometryCollection.js\").default} */ (\n geometry\n ),\n );\n break;\n case 'Circle':\n this.drawCircle(\n /** @type {import(\"../../geom/Circle.js\").default} */ (geometry),\n );\n break;\n default:\n }\n }\n\n /**\n * Render a feature into the canvas. Note that any `zIndex` on the provided\n * style will be ignored - features are rendered immediately in the order that\n * this method is called. If you need `zIndex` support, you should be using an\n * {@link module:ol/layer/Vector~VectorLayer} instead.\n *\n * @param {import(\"../../Feature.js\").default} feature Feature.\n * @param {import(\"../../style/Style.js\").default} style Style.\n * @api\n * @override\n */\n drawFeature(feature, style) {\n const geometry = style.getGeometryFunction()(feature);\n if (!geometry) {\n return;\n }\n this.setStyle(style);\n this.drawGeometry(geometry);\n }\n\n /**\n * Render a GeometryCollection to the canvas. Rendering is immediate and\n * uses the current styles appropriate for each geometry in the collection.\n *\n * @param {import(\"../../geom/GeometryCollection.js\").default} geometry Geometry collection.\n * @override\n */\n drawGeometryCollection(geometry) {\n const geometries = geometry.getGeometriesArray();\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n this.drawGeometry(geometries[i]);\n }\n }\n\n /**\n * Render a Point geometry into the canvas. Rendering is immediate and uses\n * the current style.\n *\n * @param {import(\"../../geom/Point.js\").default|import(\"../Feature.js\").default} geometry Point geometry.\n * @override\n */\n drawPoint(geometry) {\n if (this.squaredTolerance_) {\n geometry = /** @type {import(\"../../geom/Point.js\").default} */ (\n geometry.simplifyTransformed(\n this.squaredTolerance_,\n this.userTransform_,\n )\n );\n }\n const flatCoordinates = geometry.getFlatCoordinates();\n const stride = geometry.getStride();\n if (this.image_) {\n this.drawImages_(flatCoordinates, 0, flatCoordinates.length, stride);\n }\n if (this.text_ !== '') {\n this.drawText_(flatCoordinates, 0, flatCoordinates.length, stride);\n }\n }\n\n /**\n * Render a MultiPoint geometry into the canvas. Rendering is immediate and\n * uses the current style.\n *\n * @param {import(\"../../geom/MultiPoint.js\").default|import(\"../Feature.js\").default} geometry MultiPoint geometry.\n * @override\n */\n drawMultiPoint(geometry) {\n if (this.squaredTolerance_) {\n geometry = /** @type {import(\"../../geom/MultiPoint.js\").default} */ (\n geometry.simplifyTransformed(\n this.squaredTolerance_,\n this.userTransform_,\n )\n );\n }\n const flatCoordinates = geometry.getFlatCoordinates();\n const stride = geometry.getStride();\n if (this.image_) {\n this.drawImages_(flatCoordinates, 0, flatCoordinates.length, stride);\n }\n if (this.text_ !== '') {\n this.drawText_(flatCoordinates, 0, flatCoordinates.length, stride);\n }\n }\n\n /**\n * Render a LineString into the canvas. Rendering is immediate and uses\n * the current style.\n *\n * @param {import(\"../../geom/LineString.js\").default|import(\"../Feature.js\").default} geometry LineString geometry.\n * @override\n */\n drawLineString(geometry) {\n if (this.squaredTolerance_) {\n geometry = /** @type {import(\"../../geom/LineString.js\").default} */ (\n geometry.simplifyTransformed(\n this.squaredTolerance_,\n this.userTransform_,\n )\n );\n }\n if (!intersects(this.extent_, geometry.getExtent())) {\n return;\n }\n if (this.strokeState_) {\n this.setContextStrokeState_(this.strokeState_);\n const context = this.context_;\n const flatCoordinates = geometry.getFlatCoordinates();\n context.beginPath();\n this.moveToLineTo_(\n flatCoordinates,\n 0,\n flatCoordinates.length,\n geometry.getStride(),\n false,\n this.strokeState_.strokeOffset,\n );\n context.stroke();\n }\n if (this.text_ !== '') {\n const flatMidpoint = geometry.getFlatMidpoint();\n this.drawText_(flatMidpoint, 0, 2, 2);\n }\n }\n\n /**\n * Render a MultiLineString geometry into the canvas. Rendering is immediate\n * and uses the current style.\n *\n * @param {import(\"../../geom/MultiLineString.js\").default|import(\"../Feature.js\").default} geometry MultiLineString geometry.\n * @override\n */\n drawMultiLineString(geometry) {\n if (this.squaredTolerance_) {\n geometry =\n /** @type {import(\"../../geom/MultiLineString.js\").default} */ (\n geometry.simplifyTransformed(\n this.squaredTolerance_,\n this.userTransform_,\n )\n );\n }\n const geometryExtent = geometry.getExtent();\n if (!intersects(this.extent_, geometryExtent)) {\n return;\n }\n if (this.strokeState_) {\n this.setContextStrokeState_(this.strokeState_);\n const context = this.context_;\n const flatCoordinates = geometry.getFlatCoordinates();\n let offset = 0;\n const ends = /** @type {Array<number>} */ (geometry.getEnds());\n const stride = geometry.getStride();\n context.beginPath();\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n offset = this.moveToLineTo_(\n flatCoordinates,\n offset,\n ends[i],\n stride,\n false,\n this.strokeState_.strokeOffset,\n );\n }\n context.stroke();\n }\n if (this.text_ !== '') {\n const flatMidpoints = geometry.getFlatMidpoints();\n this.drawText_(flatMidpoints, 0, flatMidpoints.length, 2);\n }\n }\n\n /**\n * Render a Polygon geometry into the canvas. Rendering is immediate and uses\n * the current style.\n *\n * @param {import(\"../../geom/Polygon.js\").default|import(\"../Feature.js\").default} geometry Polygon geometry.\n * @override\n */\n drawPolygon(geometry) {\n if (this.squaredTolerance_) {\n geometry = /** @type {import(\"../../geom/Polygon.js\").default} */ (\n geometry.simplifyTransformed(\n this.squaredTolerance_,\n this.userTransform_,\n )\n );\n }\n if (!intersects(this.extent_, geometry.getExtent())) {\n return;\n }\n if (this.strokeState_ || this.fillState_) {\n if (this.fillState_) {\n this.setContextFillState_(this.fillState_);\n }\n if (this.strokeState_) {\n this.setContextStrokeState_(this.strokeState_);\n }\n const context = this.context_;\n context.beginPath();\n this.drawRings_(\n geometry.getOrientedFlatCoordinates(),\n 0,\n /** @type {Array<number>} */ (geometry.getEnds()),\n geometry.getStride(),\n this.strokeState_?.strokeOffset,\n );\n if (this.fillState_) {\n context.fill();\n }\n if (this.strokeState_) {\n context.stroke();\n }\n }\n if (this.text_ !== '') {\n const flatInteriorPoint = geometry.getFlatInteriorPoint();\n this.drawText_(flatInteriorPoint, 0, 2, 2);\n }\n }\n\n /**\n * Render MultiPolygon geometry into the canvas. Rendering is immediate and\n * uses the current style.\n * @param {import(\"../../geom/MultiPolygon.js\").default} geometry MultiPolygon geometry.\n * @override\n */\n drawMultiPolygon(geometry) {\n if (this.squaredTolerance_) {\n geometry = /** @type {import(\"../../geom/MultiPolygon.js\").default} */ (\n geometry.simplifyTransformed(\n this.squaredTolerance_,\n this.userTransform_,\n )\n );\n }\n if (!intersects(this.extent_, geometry.getExtent())) {\n return;\n }\n if (this.strokeState_ || this.fillState_) {\n if (this.fillState_) {\n this.setContextFillState_(this.fillState_);\n }\n if (this.strokeState_) {\n this.setContextStrokeState_(this.strokeState_);\n }\n const context = this.context_;\n const flatCoordinates = geometry.getOrientedFlatCoordinates();\n let offset = 0;\n const endss = geometry.getEndss();\n const stride = geometry.getStride();\n context.beginPath();\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n offset = this.drawRings_(\n flatCoordinates,\n offset,\n ends,\n stride,\n this.strokeState_?.strokeOffset,\n );\n }\n if (this.fillState_) {\n context.fill();\n }\n if (this.strokeState_) {\n context.stroke();\n }\n }\n if (this.text_ !== '') {\n const flatInteriorPoints = geometry.getFlatInteriorPoints();\n this.drawText_(flatInteriorPoints, 0, flatInteriorPoints.length, 2);\n }\n }\n\n /**\n * @param {import(\"../canvas.js\").FillState} fillState Fill state.\n * @private\n */\n setContextFillState_(fillState) {\n const context = this.context_;\n const contextFillState = this.contextFillState_;\n if (!contextFillState) {\n context.fillStyle = fillState.fillStyle;\n this.contextFillState_ = {\n fillStyle: fillState.fillStyle,\n };\n } else {\n if (contextFillState.fillStyle != fillState.fillStyle) {\n contextFillState.fillStyle = fillState.fillStyle;\n context.fillStyle = fillState.fillStyle;\n }\n }\n }\n\n /**\n * @param {import(\"../canvas.js\").StrokeState} strokeState Stroke state.\n * @private\n */\n setContextStrokeState_(strokeState) {\n const context = this.context_;\n const contextStrokeState = this.contextStrokeState_;\n if (!contextStrokeState) {\n context.lineCap = strokeState.lineCap;\n context.setLineDash(strokeState.lineDash);\n context.lineDashOffset = strokeState.lineDashOffset;\n context.lineJoin = strokeState.lineJoin;\n context.lineWidth = strokeState.lineWidth;\n context.miterLimit = strokeState.miterLimit;\n context.strokeStyle = strokeState.strokeStyle;\n this.contextStrokeState_ = {\n lineCap: strokeState.lineCap,\n lineDash: strokeState.lineDash,\n lineDashOffset: strokeState.lineDashOffset,\n lineJoin: strokeState.lineJoin,\n lineWidth: strokeState.lineWidth,\n miterLimit: strokeState.miterLimit,\n strokeStyle: strokeState.strokeStyle,\n };\n } else {\n if (contextStrokeState.lineCap != strokeState.lineCap) {\n contextStrokeState.lineCap = strokeState.lineCap;\n context.lineCap = strokeState.lineCap;\n }\n if (!equals(contextStrokeState.lineDash, strokeState.lineDash)) {\n context.setLineDash(\n (contextStrokeState.lineDash = strokeState.lineDash),\n );\n }\n if (contextStrokeState.lineDashOffset != strokeState.lineDashOffset) {\n contextStrokeState.lineDashOffset = strokeState.lineDashOffset;\n context.lineDashOffset = strokeState.lineDashOffset;\n }\n if (contextStrokeState.lineJoin != strokeState.lineJoin) {\n contextStrokeState.lineJoin = strokeState.lineJoin;\n context.lineJoin = strokeState.lineJoin;\n }\n if (contextStrokeState.lineWidth != strokeState.lineWidth) {\n contextStrokeState.lineWidth = strokeState.lineWidth;\n context.lineWidth = strokeState.lineWidth;\n }\n if (contextStrokeState.miterLimit != strokeState.miterLimit) {\n contextStrokeState.miterLimit = strokeState.miterLimit;\n context.miterLimit = strokeState.miterLimit;\n }\n if (contextStrokeState.strokeStyle != strokeState.strokeStyle) {\n contextStrokeState.strokeStyle = strokeState.strokeStyle;\n context.strokeStyle = strokeState.strokeStyle;\n }\n }\n }\n\n /**\n * @param {import(\"../canvas.js\").TextState} textState Text state.\n * @private\n */\n setContextTextState_(textState) {\n const context = this.context_;\n const contextTextState = this.contextTextState_;\n const textAlign = textState.textAlign\n ? textState.textAlign\n : defaultTextAlign;\n if (!contextTextState) {\n context.font = textState.font;\n context.textAlign = textAlign;\n context.textBaseline = textState.textBaseline;\n this.contextTextState_ = {\n font: textState.font,\n textAlign: textAlign,\n textBaseline: textState.textBaseline,\n };\n } else {\n if (contextTextState.font != textState.font) {\n contextTextState.font = textState.font;\n context.font = textState.font;\n }\n if (contextTextState.textAlign != textAlign) {\n contextTextState.textAlign = textAlign;\n context.textAlign = textAlign;\n }\n if (contextTextState.textBaseline != textState.textBaseline) {\n contextTextState.textBaseline = textState.textBaseline;\n context.textBaseline = textState.textBaseline;\n }\n }\n }\n\n /**\n * Set the fill and stroke style for subsequent draw operations. To clear\n * either fill or stroke styles, pass null for the appropriate parameter.\n *\n * @param {import(\"../../style/Fill.js\").default} fillStyle Fill style.\n * @param {import(\"../../style/Stroke.js\").default} strokeStyle Stroke style.\n * @override\n */\n setFillStrokeStyle(fillStyle, strokeStyle) {\n if (!fillStyle) {\n this.fillState_ = null;\n } else {\n const fillStyleColor = fillStyle.getColor();\n this.fillState_ = {\n fillStyle: asColorLike(\n fillStyleColor ? fillStyleColor : defaultFillStyle,\n ),\n };\n }\n if (!strokeStyle) {\n this.strokeState_ = null;\n } else {\n const strokeStyleColor = strokeStyle.getColor();\n const strokeStyleLineCap = strokeStyle.getLineCap();\n const strokeStyleLineDash = strokeStyle.getLineDash();\n const strokeStyleLineDashOffset = strokeStyle.getLineDashOffset();\n const strokeStyleLineJoin = strokeStyle.getLineJoin();\n const strokeStyleWidth = strokeStyle.getWidth();\n const strokeStyleMiterLimit = strokeStyle.getMiterLimit();\n const lineDash = strokeStyleLineDash\n ? strokeStyleLineDash\n : defaultLineDash;\n const strokeOffset = strokeStyle.getOffset();\n this.strokeState_ = {\n lineCap:\n strokeStyleLineCap !== undefined\n ? strokeStyleLineCap\n : defaultLineCap,\n lineDash:\n this.pixelRatio_ === 1\n ? lineDash\n : lineDash.map((n) => n * this.pixelRatio_),\n lineDashOffset:\n (strokeStyleLineDashOffset\n ? strokeStyleLineDashOffset\n : defaultLineDashOffset) * this.pixelRatio_,\n lineJoin:\n strokeStyleLineJoin !== undefined\n ? strokeStyleLineJoin\n : defaultLineJoin,\n lineWidth:\n (strokeStyleWidth !== undefined\n ? strokeStyleWidth\n : defaultLineWidth) * this.pixelRatio_,\n miterLimit:\n strokeStyleMiterLimit !== undefined\n ? strokeStyleMiterLimit\n : defaultMiterLimit,\n strokeStyle: asColorLike(\n strokeStyleColor ? strokeStyleColor : defaultStrokeStyle,\n ),\n strokeOffset: (strokeOffset ?? 0) * this.pixelRatio_,\n };\n }\n }\n\n /**\n * Set the image style for subsequent draw operations. Pass null to remove\n * the image style.\n *\n * @param {import(\"../../style/Image.js\").default} imageStyle Image style.\n * @override\n */\n setImageStyle(imageStyle) {\n let imageSize;\n if (!imageStyle || !(imageSize = imageStyle.getSize())) {\n this.image_ = null;\n return;\n }\n const imagePixelRatio = imageStyle.getPixelRatio(this.pixelRatio_);\n const imageAnchor = imageStyle.getAnchor();\n const imageOrigin = imageStyle.getOrigin();\n this.image_ = imageStyle.getImage(this.pixelRatio_);\n this.imageAnchorX_ = imageAnchor[0] * imagePixelRatio;\n this.imageAnchorY_ = imageAnchor[1] * imagePixelRatio;\n this.imageHeight_ = imageSize[1] * imagePixelRatio;\n this.imageOpacity_ = imageStyle.getOpacity();\n this.imageOriginX_ = imageOrigin[0];\n this.imageOriginY_ = imageOrigin[1];\n this.imageRotateWithView_ = imageStyle.getRotateWithView();\n this.imageRotation_ = imageStyle.getRotation();\n const imageScale = imageStyle.getScaleArray();\n this.imageScale_ = [\n (imageScale[0] * this.pixelRatio_) / imagePixelRatio,\n (imageScale[1] * this.pixelRatio_) / imagePixelRatio,\n ];\n this.imageWidth_ = imageSize[0] * imagePixelRatio;\n }\n\n /**\n * Set the text style for subsequent draw operations. Pass null to\n * remove the text style.\n *\n * @param {import(\"../../style/Text.js\").default} textStyle Text style.\n * @override\n */\n setTextStyle(textStyle) {\n if (!textStyle) {\n this.text_ = '';\n } else {\n const textFillStyle = textStyle.getFill();\n if (!textFillStyle) {\n this.textFillState_ = null;\n } else {\n const textFillStyleColor = textFillStyle.getColor();\n this.textFillState_ = {\n fillStyle: asColorLike(\n textFillStyleColor ? textFillStyleColor : defaultFillStyle,\n ),\n };\n }\n const textStrokeStyle = textStyle.getStroke();\n if (!textStrokeStyle) {\n this.textStrokeState_ = null;\n } else {\n const textStrokeStyleColor = textStrokeStyle.getColor();\n const textStrokeStyleLineCap = textStrokeStyle.getLineCap();\n const textStrokeStyleLineDash = textStrokeStyle.getLineDash();\n const textStrokeStyleLineDashOffset =\n textStrokeStyle.getLineDashOffset();\n const textStrokeStyleLineJoin = textStrokeStyle.getLineJoin();\n const textStrokeStyleWidth = textStrokeStyle.getWidth();\n const textStrokeStyleMiterLimit = textStrokeStyle.getMiterLimit();\n this.textStrokeState_ = {\n lineCap:\n textStrokeStyleLineCap !== undefined\n ? textStrokeStyleLineCap\n : defaultLineCap,\n lineDash: textStrokeStyleLineDash\n ? textStrokeStyleLineDash\n : defaultLineDash,\n lineDashOffset: textStrokeStyleLineDashOffset\n ? textStrokeStyleLineDashOffset\n : defaultLineDashOffset,\n lineJoin:\n textStrokeStyleLineJoin !== undefined\n ? textStrokeStyleLineJoin\n : defaultLineJoin,\n lineWidth:\n textStrokeStyleWidth !== undefined\n ? textStrokeStyleWidth\n : defaultLineWidth,\n miterLimit:\n textStrokeStyleMiterLimit !== undefined\n ? textStrokeStyleMiterLimit\n : defaultMiterLimit,\n strokeStyle: asColorLike(\n textStrokeStyleColor ? textStrokeStyleColor : defaultStrokeStyle,\n ),\n };\n }\n const textFont = textStyle.getFont();\n const textOffsetX = textStyle.getOffsetX();\n const textOffsetY = textStyle.getOffsetY();\n const textRotateWithView = textStyle.getRotateWithView();\n const textRotation = textStyle.getRotation();\n const textScale = textStyle.getScaleArray();\n const textText = textStyle.getText();\n const textTextAlign = textStyle.getTextAlign();\n const textTextBaseline = textStyle.getTextBaseline();\n this.textState_ = {\n font: textFont !== undefined ? textFont : defaultFont,\n textAlign:\n textTextAlign !== undefined ? textTextAlign : defaultTextAlign,\n textBaseline:\n textTextBaseline !== undefined\n ? textTextBaseline\n : defaultTextBaseline,\n };\n this.text_ =\n textText !== undefined\n ? Array.isArray(textText)\n ? textText.reduce((acc, t, i) => (acc += i % 2 ? ' ' : t), '')\n : textText\n : '';\n this.textOffsetX_ =\n textOffsetX !== undefined ? this.pixelRatio_ * textOffsetX : 0;\n this.textOffsetY_ =\n textOffsetY !== undefined ? this.pixelRatio_ * textOffsetY : 0;\n this.textRotateWithView_ =\n textRotateWithView !== undefined ? textRotateWithView : false;\n this.textRotation_ = textRotation !== undefined ? textRotation : 0;\n this.textScale_ = [\n this.pixelRatio_ * textScale[0],\n this.pixelRatio_ * textScale[1],\n ];\n }\n }\n}\n\nexport default CanvasImmediateRenderer;\n", "/**\n * @module ol/render/canvas/hitdetect\n */\n\nimport {ascending} from '../../array.js';\nimport {createCanvasContext2D} from '../../dom.js';\nimport {intersects} from '../../extent.js';\nimport {clamp} from '../../math.js';\nimport {\n getTransformFromProjections,\n getUserProjection,\n toUserExtent,\n} from '../../proj.js';\nimport {Icon} from '../../style.js';\nimport CanvasImmediateRenderer from './Immediate.js';\n\nexport const HIT_DETECT_RESOLUTION = 0.5;\n\n/**\n * @param {import(\"../../size.js\").Size} size Canvas size in css pixels.\n * @param {Array<import(\"../../transform.js\").Transform>} transforms Transforms\n * for rendering features to all worlds of the viewport, from coordinates to css\n * pixels.\n * @param {Array<import(\"../../Feature.js\").FeatureLike>} features\n * Features to consider for hit detection.\n * @param {import(\"../../style/Style.js\").StyleFunction|undefined} styleFunction\n * Layer style function.\n * @param {import(\"../../extent.js\").Extent} extent Extent in render projection.\n * @param {number} resolution Resolution.\n * @param {number} rotation Rotation.\n * @param {number} [squaredTolerance] Squared tolerance.\n * @param {import(\"../../proj/Projection.js\").default} [projection] Render projection.\n * @return {ImageData} Hit detection image data.\n */\nexport function createHitDetectionImageData(\n size,\n transforms,\n features,\n styleFunction,\n extent,\n resolution,\n rotation,\n squaredTolerance,\n projection,\n) {\n const userExtent = projection ? toUserExtent(extent, projection) : extent;\n const width = size[0] * HIT_DETECT_RESOLUTION;\n const height = size[1] * HIT_DETECT_RESOLUTION;\n const context = createCanvasContext2D(width, height);\n context.imageSmoothingEnabled = false;\n const canvas = context.canvas;\n const renderer = new CanvasImmediateRenderer(\n context,\n HIT_DETECT_RESOLUTION,\n extent,\n null,\n rotation,\n squaredTolerance,\n projection\n ? getTransformFromProjections(getUserProjection(), projection)\n : null,\n );\n const featureCount = features.length;\n // Stretch hit detection index to use the whole available color range\n const indexFactor = Math.floor((256 * 256 * 256 - 1) / featureCount);\n const featuresByZIndex = {};\n for (let i = 1; i <= featureCount; ++i) {\n const feature = features[i - 1];\n const featureStyleFunction = feature.getStyleFunction() || styleFunction;\n if (!featureStyleFunction) {\n continue;\n }\n let styles = featureStyleFunction(feature, resolution);\n if (!styles) {\n continue;\n }\n if (!Array.isArray(styles)) {\n styles = [styles];\n }\n const index = i * indexFactor;\n const color = index.toString(16).padStart(7, '#00000');\n for (let j = 0, jj = styles.length; j < jj; ++j) {\n const originalStyle = styles[j];\n const geometry = originalStyle.getGeometryFunction()(feature);\n if (!geometry || !intersects(userExtent, geometry.getExtent())) {\n continue;\n }\n const style = originalStyle.clone();\n const fill = style.getFill();\n if (fill) {\n fill.setColor(color);\n }\n const stroke = style.getStroke();\n if (stroke) {\n stroke.setColor(color);\n stroke.setLineDash(null);\n }\n style.setText(undefined);\n const image = originalStyle.getImage();\n if (image) {\n const imgSize = image.getImageSize();\n if (!imgSize) {\n continue;\n }\n\n const imgContext = createCanvasContext2D(\n imgSize[0],\n imgSize[1],\n undefined,\n {alpha: false},\n );\n const img = imgContext.canvas;\n imgContext.fillStyle = color;\n imgContext.fillRect(0, 0, img.width, img.height);\n style.setImage(\n new Icon({\n img: img,\n anchor: image.getAnchor(),\n anchorXUnits: 'pixels',\n anchorYUnits: 'pixels',\n offset: image.getOrigin(),\n opacity: 1,\n size: image.getSize(),\n scale: image.getScale(),\n rotation: image.getRotation(),\n rotateWithView: image.getRotateWithView(),\n }),\n );\n }\n const zIndex = style.getZIndex() || 0;\n let byGeometryType = featuresByZIndex[zIndex];\n if (!byGeometryType) {\n byGeometryType = {};\n featuresByZIndex[zIndex] = byGeometryType;\n byGeometryType['Polygon'] = [];\n byGeometryType['Circle'] = [];\n byGeometryType['LineString'] = [];\n byGeometryType['Point'] = [];\n }\n const type = geometry.getType();\n if (type === 'GeometryCollection') {\n const geometries =\n /** @type {import(\"../../geom/GeometryCollection.js\").default} */ (\n geometry\n ).getGeometriesArrayRecursive();\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n const geometry = geometries[i];\n byGeometryType[geometry.getType().replace('Multi', '')].push(\n geometry,\n style,\n );\n }\n } else {\n byGeometryType[type.replace('Multi', '')].push(geometry, style);\n }\n }\n }\n\n const zIndexKeys = Object.keys(featuresByZIndex).map(Number).sort(ascending);\n for (let i = 0, ii = zIndexKeys.length; i < ii; ++i) {\n const byGeometryType = featuresByZIndex[zIndexKeys[i]];\n for (const type in byGeometryType) {\n const geomAndStyle = byGeometryType[type];\n for (let j = 0, jj = geomAndStyle.length; j < jj; j += 2) {\n renderer.setStyle(geomAndStyle[j + 1]);\n for (let k = 0, kk = transforms.length; k < kk; ++k) {\n renderer.setTransform(transforms[k]);\n renderer.drawGeometry(geomAndStyle[j]);\n }\n }\n }\n }\n return context.getImageData(0, 0, canvas.width, canvas.height);\n}\n\n/**\n * @param {import(\"../../pixel\").Pixel} pixel Pixel coordinate on the hit\n * detection canvas in css pixels.\n * @param {Array<F>} features Features. Has to\n * match the `features` array that was passed to `createHitDetectionImageData()`.\n * @param {ImageData} imageData Hit detection image data generated by\n * `createHitDetectionImageData()`.\n * @return {Array<F>} Features.\n * @template {import(\"../../Feature.js\").FeatureLike} F\n */\nexport function hitDetect(pixel, features, imageData) {\n /** @type {Array<F>} */\n const resultFeatures = [];\n if (imageData) {\n const x = Math.floor(Math.round(pixel[0]) * HIT_DETECT_RESOLUTION);\n const y = Math.floor(Math.round(pixel[1]) * HIT_DETECT_RESOLUTION);\n // The pixel coordinate is clamped down to the hit-detect canvas' size to account\n // for browsers returning coordinates slightly larger than the actual canvas size\n // due to a non-integer pixel ratio.\n const index =\n (clamp(x, 0, imageData.width - 1) +\n clamp(y, 0, imageData.height - 1) * imageData.width) *\n 4;\n const r = imageData.data[index];\n const g = imageData.data[index + 1];\n const b = imageData.data[index + 2];\n const i = b + 256 * (g + 256 * r);\n const indexFactor = Math.floor((256 * 256 * 256 - 1) / features.length);\n if (i && i % indexFactor === 0) {\n resultFeatures.push(features[i / indexFactor - 1]);\n }\n }\n return resultFeatures;\n}\n", "/**\n * @module ol/renderer/vector\n */\nimport ImageState from '../ImageState.js';\nimport {getUid} from '../util.js';\n\n/**\n * Feature callback. The callback will be called with three arguments. The first\n * argument is one {@link module:ol/Feature~Feature feature} or {@link module:ol/render/Feature~RenderFeature render feature}\n * at the pixel, the second is the {@link module:ol/layer/Layer~Layer layer} of the feature and will be null for\n * unmanaged layers. The third is the {@link module:ol/geom/SimpleGeometry~SimpleGeometry} of the feature. For features\n * with a GeometryCollection geometry, it will be the first detected geometry from the collection.\n * @template T\n * @typedef {function(import(\"../Feature.js\").FeatureLike, import(\"../layer/Layer.js\").default<import(\"../source/Source\").default>, import(\"../geom/SimpleGeometry.js\").default): T} FeatureCallback\n */\n\n/**\n * Tolerance for geometry simplification in device pixels.\n * @type {number}\n */\nconst SIMPLIFY_TOLERANCE = 0.5;\n\n/**\n * @const\n * @type {Object<import(\"../geom/Geometry.js\").Type,\n * function(import(\"../render/canvas/BuilderGroup.js\").default, import(\"../geom/Geometry.js\").default,\n * import(\"../style/Style.js\").default, Object): void>}\n */\nconst GEOMETRY_RENDERERS = {\n 'Point': renderPointGeometry,\n 'LineString': renderLineStringGeometry,\n 'Polygon': renderPolygonGeometry,\n 'MultiPoint': renderMultiPointGeometry,\n 'MultiLineString': renderMultiLineStringGeometry,\n 'MultiPolygon': renderMultiPolygonGeometry,\n 'GeometryCollection': renderGeometryCollectionGeometry,\n 'Circle': renderCircleGeometry,\n};\n\n/**\n * @param {import(\"../Feature.js\").FeatureLike} feature1 Feature 1.\n * @param {import(\"../Feature.js\").FeatureLike} feature2 Feature 2.\n * @return {number} Order.\n */\nexport function defaultOrder(feature1, feature2) {\n return parseInt(getUid(feature1), 10) - parseInt(getUid(feature2), 10);\n}\n\n/**\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Squared pixel tolerance.\n */\nexport function getSquaredTolerance(resolution, pixelRatio) {\n const tolerance = getTolerance(resolution, pixelRatio);\n return tolerance * tolerance;\n}\n\n/**\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Pixel tolerance.\n */\nexport function getTolerance(resolution, pixelRatio) {\n return (SIMPLIFY_TOLERANCE * resolution) / pixelRatio;\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Builder group.\n * @param {import(\"../geom/Circle.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {number} [index] Render order index.\n */\nfunction renderCircleGeometry(builderGroup, geometry, style, feature, index) {\n const fillStyle = style.getFill();\n const strokeStyle = style.getStroke();\n if (fillStyle || strokeStyle) {\n const circleReplay = builderGroup.getBuilder(style.getZIndex(), 'Circle');\n circleReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n circleReplay.drawCircle(geometry, feature, index);\n }\n const textStyle = style.getText();\n if (textStyle && textStyle.getText()) {\n const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');\n textReplay.setTextStyle(textStyle);\n textReplay.drawText(geometry, feature);\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n * @param {import(\"../proj.js\").TransformFunction} [transform] Transform from user to view projection.\n * @param {boolean} [declutter] Enable decluttering.\n * @param {number} [index] Render order index..\n * @return {boolean} `true` if style is loading.\n */\nexport function renderFeature(\n replayGroup,\n feature,\n style,\n squaredTolerance,\n listener,\n transform,\n declutter,\n index,\n) {\n const loadingPromises = [];\n const imageStyle = style.getImage();\n if (imageStyle) {\n let loading = true;\n const imageState = imageStyle.getImageState();\n if (imageState == ImageState.LOADED || imageState == ImageState.ERROR) {\n loading = false;\n } else {\n if (imageState == ImageState.IDLE) {\n imageStyle.load();\n }\n }\n if (loading) {\n loadingPromises.push(imageStyle.ready());\n }\n }\n const fillStyle = style.getFill();\n if (fillStyle && fillStyle.loading()) {\n loadingPromises.push(fillStyle.ready());\n }\n const loading = loadingPromises.length > 0;\n if (loading) {\n Promise.all(loadingPromises).then(() => listener(null));\n }\n renderFeatureInternal(\n replayGroup,\n feature,\n style,\n squaredTolerance,\n transform,\n declutter,\n index,\n );\n\n return loading;\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"../proj.js\").TransformFunction} [transform] Optional transform function.\n * @param {boolean} [declutter] Enable decluttering.\n * @param {number} [index] Render order index..\n */\nfunction renderFeatureInternal(\n replayGroup,\n feature,\n style,\n squaredTolerance,\n transform,\n declutter,\n index,\n) {\n const geometry = style.getGeometryFunction()(feature);\n if (!geometry) {\n return;\n }\n const simplifiedGeometry = geometry.simplifyTransformed(\n squaredTolerance,\n transform,\n );\n const renderer = style.getRenderer();\n if (renderer) {\n renderGeometry(replayGroup, simplifiedGeometry, style, feature, index);\n } else {\n const geometryRenderer = GEOMETRY_RENDERERS[simplifiedGeometry.getType()];\n geometryRenderer(\n replayGroup,\n simplifiedGeometry,\n style,\n feature,\n index,\n declutter,\n );\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n */\nfunction renderGeometry(replayGroup, geometry, style, feature, index) {\n if (geometry.getType() == 'GeometryCollection') {\n const geometries =\n /** @type {import(\"../geom/GeometryCollection.js\").default} */ (\n geometry\n ).getGeometries();\n for (let i = 0, ii = geometries.length; i < ii; ++i) {\n renderGeometry(replayGroup, geometries[i], style, feature, index);\n }\n return;\n }\n const replay = replayGroup.getBuilder(style.getZIndex(), 'Default');\n replay.drawCustom(\n /** @type {import(\"../geom/SimpleGeometry.js\").default} */ (geometry),\n feature,\n style.getRenderer(),\n style.getHitDetectionRenderer(),\n index,\n );\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/GeometryCollection.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [declutterBuilderGroup] Builder for decluttering.\n * @param {number} [index] Render order index.\n */\nfunction renderGeometryCollectionGeometry(\n replayGroup,\n geometry,\n style,\n feature,\n declutterBuilderGroup,\n index,\n) {\n const geometries = geometry.getGeometriesArray();\n let i, ii;\n for (i = 0, ii = geometries.length; i < ii; ++i) {\n const geometryRenderer = GEOMETRY_RENDERERS[geometries[i].getType()];\n geometryRenderer(\n replayGroup,\n geometries[i],\n style,\n feature,\n declutterBuilderGroup,\n index,\n );\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/LineString.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n */\nfunction renderLineStringGeometry(\n builderGroup,\n geometry,\n style,\n feature,\n index,\n) {\n const strokeStyle = style.getStroke();\n if (strokeStyle) {\n const lineStringReplay = builderGroup.getBuilder(\n style.getZIndex(),\n 'LineString',\n );\n lineStringReplay.setFillStrokeStyle(null, strokeStyle);\n lineStringReplay.drawLineString(geometry, feature, index);\n }\n const textStyle = style.getText();\n if (textStyle && textStyle.getText()) {\n const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');\n textReplay.setTextStyle(textStyle);\n textReplay.drawText(geometry, feature, index);\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiLineString.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n */\nfunction renderMultiLineStringGeometry(\n builderGroup,\n geometry,\n style,\n feature,\n index,\n) {\n const strokeStyle = style.getStroke();\n if (strokeStyle) {\n const lineStringReplay = builderGroup.getBuilder(\n style.getZIndex(),\n 'LineString',\n );\n lineStringReplay.setFillStrokeStyle(null, strokeStyle);\n lineStringReplay.drawMultiLineString(geometry, feature, index);\n }\n const textStyle = style.getText();\n if (textStyle && textStyle.getText()) {\n const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');\n textReplay.setTextStyle(textStyle);\n textReplay.drawText(geometry, feature, index);\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {number} [index] Render order index.\n */\nfunction renderMultiPolygonGeometry(\n builderGroup,\n geometry,\n style,\n feature,\n index,\n) {\n const fillStyle = style.getFill();\n const strokeStyle = style.getStroke();\n if (strokeStyle || fillStyle) {\n const polygonReplay = builderGroup.getBuilder(style.getZIndex(), 'Polygon');\n polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n polygonReplay.drawMultiPolygon(geometry, feature, index);\n }\n const textStyle = style.getText();\n if (textStyle && textStyle.getText()) {\n const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');\n textReplay.setTextStyle(textStyle);\n textReplay.drawText(geometry, feature, index);\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/Point.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n * @param {boolean} [declutter] Enable decluttering.\n */\nfunction renderPointGeometry(\n builderGroup,\n geometry,\n style,\n feature,\n index,\n declutter,\n) {\n const imageStyle = style.getImage();\n const textStyle = style.getText();\n const hasText = textStyle && textStyle.getText();\n /** @type {import(\"../render/canvas.js\").DeclutterImageWithText} */\n const declutterImageWithText =\n declutter && imageStyle && hasText ? {} : undefined;\n if (imageStyle) {\n if (imageStyle.getImageState() != ImageState.LOADED) {\n return;\n }\n const imageReplay = builderGroup.getBuilder(style.getZIndex(), 'Image');\n imageReplay.setImageStyle(imageStyle, declutterImageWithText);\n imageReplay.drawPoint(geometry, feature, index);\n }\n if (hasText) {\n const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');\n textReplay.setTextStyle(textStyle, declutterImageWithText);\n textReplay.drawText(geometry, feature, index);\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiPoint.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n * @param {boolean} [declutter] Enable decluttering.\n */\nfunction renderMultiPointGeometry(\n builderGroup,\n geometry,\n style,\n feature,\n index,\n declutter,\n) {\n const imageStyle = style.getImage();\n const hasImage = imageStyle && imageStyle.getOpacity() !== 0;\n const textStyle = style.getText();\n const hasText = textStyle && textStyle.getText();\n /** @type {import(\"../render/canvas.js\").DeclutterImageWithText} */\n const declutterImageWithText =\n declutter && hasImage && hasText ? {} : undefined;\n if (hasImage) {\n if (imageStyle.getImageState() != ImageState.LOADED) {\n return;\n }\n const imageReplay = builderGroup.getBuilder(style.getZIndex(), 'Image');\n imageReplay.setImageStyle(imageStyle, declutterImageWithText);\n imageReplay.drawMultiPoint(geometry, feature, index);\n }\n if (hasText) {\n const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');\n textReplay.setTextStyle(textStyle, declutterImageWithText);\n textReplay.drawText(geometry, feature, index);\n }\n}\n\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/Polygon.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {number} [index] Render order index.\n */\nfunction renderPolygonGeometry(builderGroup, geometry, style, feature, index) {\n const fillStyle = style.getFill();\n const strokeStyle = style.getStroke();\n if (fillStyle || strokeStyle) {\n const polygonReplay = builderGroup.getBuilder(style.getZIndex(), 'Polygon');\n polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n polygonReplay.drawPolygon(geometry, feature, index);\n }\n const textStyle = style.getText();\n if (textStyle && textStyle.getText()) {\n const textReplay = builderGroup.getBuilder(style.getZIndex(), 'Text');\n textReplay.setTextStyle(textStyle);\n textReplay.drawText(geometry, feature, index);\n }\n}\n", "/**\n * @module ol/renderer/canvas/VectorLayer\n */\nimport ViewHint from '../../ViewHint.js';\nimport {equals} from '../../array.js';\nimport {wrapX as wrapCoordinateX} from '../../coordinate.js';\nimport {createCanvasContext2D, releaseCanvas} from '../../dom.js';\nimport {\n buffer,\n containsExtent,\n createEmpty,\n getHeight,\n getWidth,\n intersects as intersectsExtent,\n isEmpty,\n wrapX as wrapExtentX,\n} from '../../extent.js';\nimport {\n fromUserExtent,\n getTransformFromProjections,\n getUserProjection,\n toUserExtent,\n toUserResolution,\n} from '../../proj.js';\nimport RenderEventType from '../../render/EventType.js';\nimport CanvasBuilderGroup from '../../render/canvas/BuilderGroup.js';\nimport ExecutorGroup, {\n ALL,\n DECLUTTER,\n NON_DECLUTTER,\n} from '../../render/canvas/ExecutorGroup.js';\nimport {\n HIT_DETECT_RESOLUTION,\n createHitDetectionImageData,\n hitDetect,\n} from '../../render/canvas/hitdetect.js';\nimport {getUid} from '../../util.js';\nimport {\n defaultOrder as defaultRenderOrder,\n getSquaredTolerance as getSquaredRenderTolerance,\n getTolerance as getRenderTolerance,\n renderFeature,\n} from '../vector.js';\nimport CanvasLayerRenderer, {canvasPool} from './Layer.js';\n\n/**\n * @classdesc\n * Canvas renderer for vector layers.\n * @api\n */\nclass CanvasVectorLayerRenderer extends CanvasLayerRenderer {\n /**\n * @param {import(\"../../layer/BaseVector.js\").default} vectorLayer Vector layer.\n */\n constructor(vectorLayer) {\n super(vectorLayer);\n\n /** @private */\n this.boundHandleStyleImageChange_ = this.handleStyleImageChange_.bind(this);\n\n /**\n * @private\n * @type {boolean}\n */\n this.animatingOrInteracting_;\n\n /**\n * @private\n * @type {ImageData|null}\n */\n this.hitDetectionImageData_ = null;\n\n /**\n * @private\n * @type {import(\"../../extent.js\").Extent}\n */\n this.clipExtent_ = null;\n\n /**\n * Do we need to extend the rendered area on the x-axis to handle\n * features that cross the antimeridian?\n * @private\n * @type {boolean}\n */\n this.extendX_ = false;\n\n /**\n * @private\n * @type {Array<import(\"../../Feature.js\").default>}\n */\n this.renderedFeatures_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.renderedRevision_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.renderedResolution_ = NaN;\n\n /**\n * @private\n * @type {import(\"../../extent.js\").Extent}\n */\n this.renderedExtent_ = createEmpty();\n\n /**\n * @private\n * @type {import(\"../../extent.js\").Extent}\n */\n this.wrappedRenderedExtent_ = createEmpty();\n\n /**\n * @private\n * @type {number}\n */\n this.renderedRotation_;\n\n /**\n * @private\n * @type {import(\"../../coordinate\").Coordinate}\n */\n this.renderedCenter_ = null;\n\n /**\n * @private\n * @type {import(\"../../proj/Projection\").default}\n */\n this.renderedProjection_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.renderedPixelRatio_ = 1;\n\n /**\n * @private\n * @type {import(\"../../render.js\").OrderFunction|null}\n */\n this.renderedRenderOrder_ = null;\n\n /**\n * @private\n * @type {boolean}\n */\n this.renderedFrameDeclutter_;\n\n /**\n * @private\n * @type {import(\"../../render/canvas/ExecutorGroup\").default}\n */\n this.replayGroup_ = null;\n\n /**\n * A new replay group had to be created by `prepareFrame()`\n * @type {boolean}\n */\n this.replayGroupChanged = true;\n\n /**\n * Clipping to be performed by `renderFrame()`\n * @type {boolean}\n */\n this.clipping = true;\n\n /**\n * @private\n * @type {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D}\n */\n this.targetContext_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.opacity_ = 1;\n }\n\n /**\n * @param {ExecutorGroup} executorGroup Executor group.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {boolean} [declutterable] `true` to only render declutterable items,\n * `false` to only render non-declutterable items, `undefined` to render all.\n */\n renderWorlds(executorGroup, frameState, declutterable) {\n const extent = frameState.extent;\n const viewState = frameState.viewState;\n const center = viewState.center;\n const resolution = viewState.resolution;\n const projection = viewState.projection;\n const rotation = viewState.rotation;\n const projectionExtent = projection.getExtent();\n const vectorSource = this.getLayer().getSource();\n const declutter = this.getLayer().getDeclutter();\n const pixelRatio = frameState.pixelRatio;\n const viewHints = frameState.viewHints;\n const snapToPixel = !(\n viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]\n );\n const context = this.context;\n const width = Math.round((getWidth(extent) / resolution) * pixelRatio);\n const height = Math.round((getHeight(extent) / resolution) * pixelRatio);\n\n const multiWorld = vectorSource.getWrapX() && projection.canWrapX();\n const worldWidth = multiWorld ? getWidth(projectionExtent) : null;\n const endWorld = multiWorld\n ? Math.ceil((extent[2] - projectionExtent[2]) / worldWidth) +\n (this.extendX_ ? 2 : 1)\n : 1;\n let world = multiWorld\n ? Math.floor((extent[0] - projectionExtent[0]) / worldWidth) -\n (this.extendX_ ? 1 : 0)\n : 0;\n do {\n let transform = this.getRenderTransform(\n center,\n resolution,\n 0,\n pixelRatio,\n width,\n height,\n world * worldWidth,\n );\n if (frameState.declutter) {\n transform = transform.slice(0);\n }\n executorGroup.execute(\n context,\n [context.canvas.width, context.canvas.height],\n transform,\n rotation,\n snapToPixel,\n declutterable === undefined\n ? ALL\n : declutterable\n ? DECLUTTER\n : NON_DECLUTTER,\n declutterable\n ? declutter && frameState.declutter[declutter]\n : undefined,\n );\n } while (++world < endWorld);\n }\n\n /**\n * @private\n */\n setDrawContext_() {\n if (this.opacity_ !== 1) {\n this.targetContext_ = this.context;\n this.context = createCanvasContext2D(\n this.context.canvas.width,\n this.context.canvas.height,\n canvasPool,\n );\n }\n }\n\n /**\n * @private\n */\n resetDrawContext_() {\n if (this.opacity_ !== 1 && this.targetContext_) {\n const alpha = this.targetContext_.globalAlpha;\n this.targetContext_.globalAlpha = this.opacity_;\n this.targetContext_.drawImage(this.context.canvas, 0, 0);\n this.targetContext_.globalAlpha = alpha;\n releaseCanvas(this.context);\n canvasPool.push(this.context.canvas);\n this.context = this.targetContext_;\n this.targetContext_ = null;\n }\n }\n\n /**\n * Render declutter items for this layer\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n */\n renderDeclutter(frameState) {\n if (!this.replayGroup_ || !this.getLayer().getDeclutter()) {\n return;\n }\n this.renderWorlds(this.replayGroup_, frameState, true);\n }\n\n /**\n * Render deferred instructions.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @override\n */\n renderDeferredInternal(frameState) {\n if (!this.replayGroup_) {\n return;\n }\n if (this.clipExtent_) {\n this.clipUnrotated(this.context, frameState, this.clipExtent_);\n }\n this.replayGroup_.renderDeferred();\n if (this.clipExtent_) {\n this.context.restore();\n this.clipExtent_ = null;\n }\n this.resetDrawContext_();\n }\n\n /**\n * Render the layer.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {HTMLElement|null} target Target that may be used to render content to.\n * @return {HTMLElement} The rendered element.\n * @override\n */\n renderFrame(frameState, target) {\n const layerState = frameState.layerStatesArray[frameState.layerIndex];\n this.opacity_ = layerState.opacity;\n const viewState = frameState.viewState;\n\n this.prepareContainer(frameState, target);\n const context = this.context;\n\n const replayGroup = this.replayGroup_;\n let render = replayGroup && !replayGroup.isEmpty();\n if (!render) {\n const hasRenderListeners =\n this.getLayer().hasListener(RenderEventType.PRERENDER) ||\n this.getLayer().hasListener(RenderEventType.POSTRENDER);\n if (!hasRenderListeners) {\n return this.container;\n }\n }\n\n this.setDrawContext_();\n\n this.preRender(context, frameState);\n\n const projection = viewState.projection;\n\n // clipped rendering if layer extent is set\n this.clipExtent_ = null;\n let clipped = false;\n if (render && layerState.extent && this.clipping) {\n const layerExtent = fromUserExtent(layerState.extent, projection);\n render = intersectsExtent(layerExtent, frameState.extent);\n const needsClip =\n render && !containsExtent(layerExtent, frameState.extent);\n if (needsClip) {\n if (frameState.declutter) {\n // Store extent for deferred clipping\n this.clipExtent_ = layerExtent;\n } else {\n // Apply clipping immediately for non-declutter rendering\n this.clipUnrotated(context, frameState, layerExtent);\n clipped = true;\n }\n }\n }\n\n if (render) {\n this.renderWorlds(\n replayGroup,\n frameState,\n this.getLayer().getDeclutter() ? false : undefined,\n );\n }\n\n if (clipped) {\n context.restore();\n }\n\n this.postRender(context, frameState);\n\n if (this.renderedRotation_ !== viewState.rotation) {\n this.renderedRotation_ = viewState.rotation;\n this.hitDetectionImageData_ = null;\n }\n if (!frameState.declutter) {\n this.resetDrawContext_();\n }\n return this.container;\n }\n\n /**\n * Asynchronous layer level hit detection.\n * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n * @return {Promise<Array<import(\"../../Feature\").default>>} Promise\n * that resolves with an array of features.\n * @override\n */\n getFeatures(pixel) {\n return new Promise((resolve) => {\n if (\n this.frameState &&\n !this.hitDetectionImageData_ &&\n !this.animatingOrInteracting_\n ) {\n const size = this.frameState.size.slice();\n const center = this.renderedCenter_;\n const resolution = this.renderedResolution_;\n const rotation = this.renderedRotation_;\n const projection = this.renderedProjection_;\n const extent = this.wrappedRenderedExtent_;\n const layer = this.getLayer();\n const transforms = [];\n const width = size[0] * HIT_DETECT_RESOLUTION;\n const height = size[1] * HIT_DETECT_RESOLUTION;\n transforms.push(\n this.getRenderTransform(\n center,\n resolution,\n rotation,\n HIT_DETECT_RESOLUTION,\n width,\n height,\n 0,\n ).slice(),\n );\n const source = layer.getSource();\n const projectionExtent = projection.getExtent();\n if (\n source.getWrapX() &&\n projection.canWrapX() &&\n !containsExtent(projectionExtent, extent)\n ) {\n let startX = extent[0];\n const worldWidth = getWidth(projectionExtent);\n let world = 0;\n let offsetX;\n while (startX < projectionExtent[0]) {\n --world;\n offsetX = worldWidth * world;\n transforms.push(\n this.getRenderTransform(\n center,\n resolution,\n rotation,\n HIT_DETECT_RESOLUTION,\n width,\n height,\n offsetX,\n ).slice(),\n );\n startX += worldWidth;\n }\n world = 0;\n startX = extent[2];\n while (startX > projectionExtent[2]) {\n ++world;\n offsetX = worldWidth * world;\n transforms.push(\n this.getRenderTransform(\n center,\n resolution,\n rotation,\n HIT_DETECT_RESOLUTION,\n width,\n height,\n offsetX,\n ).slice(),\n );\n startX -= worldWidth;\n }\n }\n const userProjection = getUserProjection();\n this.hitDetectionImageData_ = createHitDetectionImageData(\n size,\n transforms,\n this.renderedFeatures_,\n layer.getStyleFunction(),\n extent,\n resolution,\n rotation,\n getSquaredRenderTolerance(resolution, this.renderedPixelRatio_),\n userProjection ? projection : null,\n );\n }\n resolve(\n hitDetect(pixel, this.renderedFeatures_, this.hitDetectionImageData_),\n );\n });\n }\n\n /**\n * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @param {number} hitTolerance Hit tolerance in pixels.\n * @param {import(\"../vector.js\").FeatureCallback<T>} callback Feature callback.\n * @param {Array<import(\"../Map.js\").HitMatch<T>>} matches The hit detected matches with tolerance.\n * @return {T|undefined} Callback result.\n * @template T\n * @override\n */\n forEachFeatureAtCoordinate(\n coordinate,\n frameState,\n hitTolerance,\n callback,\n matches,\n ) {\n if (!this.replayGroup_) {\n return undefined;\n }\n const resolution = frameState.viewState.resolution;\n const rotation = frameState.viewState.rotation;\n const layer = this.getLayer();\n\n /** @type {!Object<string, import(\"../Map.js\").HitMatch<T>|true>} */\n const features = {};\n\n /**\n * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @param {number} distanceSq The squared distance to the click position\n * @return {T|undefined} Callback result.\n */\n const featureCallback = function (feature, geometry, distanceSq) {\n const key = getUid(feature);\n const match = features[key];\n if (!match) {\n if (distanceSq === 0) {\n features[key] = true;\n return callback(feature, layer, geometry);\n }\n matches.push(\n (features[key] = {\n feature: feature,\n layer: layer,\n geometry: geometry,\n distanceSq: distanceSq,\n callback: callback,\n }),\n );\n } else if (match !== true && distanceSq < match.distanceSq) {\n if (distanceSq === 0) {\n features[key] = true;\n matches.splice(matches.lastIndexOf(match), 1);\n return callback(feature, layer, geometry);\n }\n match.geometry = geometry;\n match.distanceSq = distanceSq;\n }\n return undefined;\n };\n\n const declutter = this.getLayer().getDeclutter();\n return this.replayGroup_.forEachFeatureAtCoordinate(\n coordinate,\n resolution,\n rotation,\n hitTolerance,\n featureCallback,\n declutter\n ? frameState.declutter?.[declutter]?.all().map((item) => item.value)\n : null,\n );\n }\n\n /**\n * Perform action necessary to get the layer rendered after new fonts have loaded\n * @override\n */\n handleFontsChanged() {\n const layer = this.getLayer();\n if (layer.getVisible() && this.replayGroup_) {\n layer.changed();\n }\n }\n\n /**\n * Handle changes in image style state.\n * @param {import(\"../../events/Event.js\").default} event Image style change event.\n * @private\n */\n handleStyleImageChange_(event) {\n this.renderIfReadyAndVisible();\n }\n\n /**\n * Determine whether render should be called.\n * @param {import(\"../../Map.js\").FrameState} frameState Frame state.\n * @return {boolean} Layer is ready to be rendered.\n * @override\n */\n prepareFrame(frameState) {\n const vectorLayer = this.getLayer();\n const vectorSource = vectorLayer.getSource();\n if (!vectorSource) {\n return false;\n }\n\n const animating = frameState.viewHints[ViewHint.ANIMATING];\n const interacting = frameState.viewHints[ViewHint.INTERACTING];\n const updateWhileAnimating = vectorLayer.getUpdateWhileAnimating();\n const updateWhileInteracting = vectorLayer.getUpdateWhileInteracting();\n\n if (\n (this.ready && !updateWhileAnimating && animating) ||\n (!updateWhileInteracting && interacting)\n ) {\n this.animatingOrInteracting_ = true;\n return true;\n }\n this.animatingOrInteracting_ = false;\n\n const frameStateExtent = frameState.extent;\n const viewState = frameState.viewState;\n const projection = viewState.projection;\n const resolution = viewState.resolution;\n const pixelRatio = frameState.pixelRatio;\n const vectorLayerRevision = vectorLayer.getRevision();\n const vectorLayerRenderBuffer = vectorLayer.getRenderBuffer();\n let vectorLayerRenderOrder = vectorLayer.getRenderOrder();\n\n if (vectorLayerRenderOrder === undefined) {\n vectorLayerRenderOrder = defaultRenderOrder;\n }\n\n const center = viewState.center.slice();\n const extent = buffer(\n frameStateExtent,\n vectorLayerRenderBuffer * resolution,\n );\n const renderedExtent = extent.slice();\n const loadExtents = [extent.slice()];\n const projectionExtent = projection.getExtent();\n\n const canWrapX = vectorSource.getWrapX() && projection.canWrapX();\n this.extendX_ = false;\n if (canWrapX) {\n const sourceExtent = vectorSource.getExtent();\n if (sourceExtent && !isEmpty(sourceExtent)) {\n this.extendX_ =\n sourceExtent[0] < projectionExtent[0] ||\n sourceExtent[2] > projectionExtent[2];\n }\n }\n\n if (\n canWrapX &&\n (!containsExtent(projectionExtent, frameState.extent) || this.extendX_)\n ) {\n // For the replay group, we need an extent that intersects the real world\n // (-180\u00B0 to +180\u00B0). To support geometries in a coordinate range from -540\u00B0\n // to +540\u00B0, we add at least 1 world width on each side of the projection\n // extent. If the viewport is wider than the world, we need to add half of\n // the viewport width to make sure we cover the whole viewport.\n const worldWidth = getWidth(projectionExtent);\n const gutter = Math.max(getWidth(extent) / 2, worldWidth);\n let projMinX = projectionExtent[0];\n let projMaxX = projectionExtent[2];\n if (this.extendX_) {\n projMinX -= worldWidth;\n projMaxX += worldWidth;\n }\n extent[0] = projMinX - gutter;\n extent[2] = projMaxX + gutter;\n wrapCoordinateX(center, projection);\n const loadExtent = wrapExtentX(loadExtents[0], projection);\n // If the extent crosses the date line, we load data for both edges of the worlds\n if (\n loadExtent[0] < projectionExtent[0] &&\n loadExtent[2] < projectionExtent[2]\n ) {\n loadExtents.push([\n loadExtent[0] + worldWidth,\n loadExtent[1],\n loadExtent[2] + worldWidth,\n loadExtent[3],\n ]);\n } else if (\n loadExtent[0] > projectionExtent[0] &&\n loadExtent[2] > projectionExtent[2]\n ) {\n loadExtents.push([\n loadExtent[0] - worldWidth,\n loadExtent[1],\n loadExtent[2] - worldWidth,\n loadExtent[3],\n ]);\n }\n }\n\n if (\n this.ready &&\n this.renderedResolution_ == resolution &&\n this.renderedPixelRatio_ === pixelRatio &&\n this.renderedRevision_ == vectorLayerRevision &&\n this.renderedRenderOrder_ == vectorLayerRenderOrder &&\n this.renderedFrameDeclutter_ === !!frameState.declutter &&\n containsExtent(this.wrappedRenderedExtent_, extent)\n ) {\n if (!equals(this.renderedExtent_, renderedExtent)) {\n this.hitDetectionImageData_ = null;\n this.renderedExtent_ = renderedExtent;\n }\n this.renderedCenter_ = center;\n this.replayGroupChanged = false;\n return true;\n }\n\n this.replayGroup_ = null;\n\n const replayGroup = new CanvasBuilderGroup(\n getRenderTolerance(resolution, pixelRatio),\n extent,\n resolution,\n pixelRatio,\n );\n\n const userProjection = getUserProjection();\n let userTransform;\n if (userProjection) {\n for (let i = 0, ii = loadExtents.length; i < ii; ++i) {\n const extent = loadExtents[i];\n const userExtent = toUserExtent(extent, projection);\n vectorSource.loadFeatures(\n userExtent,\n toUserResolution(resolution, projection),\n userProjection,\n );\n }\n userTransform = getTransformFromProjections(userProjection, projection);\n } else {\n for (let i = 0, ii = loadExtents.length; i < ii; ++i) {\n vectorSource.loadFeatures(loadExtents[i], resolution, projection);\n }\n }\n\n const squaredTolerance = getSquaredRenderTolerance(resolution, pixelRatio);\n let ready = true;\n const render =\n /**\n * @param {import(\"../../Feature.js\").default} feature Feature.\n * @param {number} index Index.\n */\n (feature, index) => {\n let styles;\n const styleFunction =\n feature.getStyleFunction() || vectorLayer.getStyleFunction();\n if (styleFunction) {\n styles = styleFunction(feature, resolution);\n }\n if (styles) {\n const dirty = this.renderFeature(\n feature,\n squaredTolerance,\n styles,\n replayGroup,\n userTransform,\n this.getLayer().getDeclutter(),\n index,\n );\n ready = ready && !dirty;\n }\n };\n\n const userExtent = toUserExtent(extent, projection);\n /** @type {Array<import(\"../../Feature.js\").default>} */\n const features = vectorSource.getFeaturesInExtent(userExtent);\n if (vectorLayerRenderOrder) {\n features.sort(vectorLayerRenderOrder);\n }\n for (let i = 0, ii = features.length; i < ii; ++i) {\n render(features[i], i);\n }\n this.renderedFeatures_ = features;\n this.ready = ready;\n\n const replayGroupInstructions = replayGroup.finish();\n const executorGroup = new ExecutorGroup(\n extent,\n resolution,\n pixelRatio,\n vectorSource.getOverlaps(),\n replayGroupInstructions,\n vectorLayer.getRenderBuffer(),\n !!frameState.declutter,\n );\n\n this.renderedResolution_ = resolution;\n this.renderedRevision_ = vectorLayerRevision;\n this.renderedRenderOrder_ = vectorLayerRenderOrder;\n this.renderedFrameDeclutter_ = !!frameState.declutter;\n this.renderedExtent_ = renderedExtent;\n this.wrappedRenderedExtent_ = extent;\n this.renderedCenter_ = center;\n this.renderedProjection_ = projection;\n this.renderedPixelRatio_ = pixelRatio;\n this.replayGroup_ = executorGroup;\n this.hitDetectionImageData_ = null;\n\n this.replayGroupChanged = true;\n return true;\n }\n\n /**\n * @param {import(\"../../Feature.js\").default} feature Feature.\n * @param {number} squaredTolerance Squared render tolerance.\n * @param {import(\"../../style/Style.js\").default|Array<import(\"../../style/Style.js\").default>} styles The style or array of styles.\n * @param {import(\"../../render/canvas/BuilderGroup.js\").default} builderGroup Builder group.\n * @param {import(\"../../proj.js\").TransformFunction} [transform] Transform from user to view projection.\n * @param {boolean} [declutter] Enable decluttering.\n * @param {number} [index] Render order index.\n * @return {boolean} `true` if an image is loading.\n */\n renderFeature(\n feature,\n squaredTolerance,\n styles,\n builderGroup,\n transform,\n declutter,\n index,\n ) {\n if (!styles) {\n return false;\n }\n let loading = false;\n if (Array.isArray(styles)) {\n for (let i = 0, ii = styles.length; i < ii; ++i) {\n loading =\n renderFeature(\n builderGroup,\n feature,\n styles[i],\n squaredTolerance,\n this.boundHandleStyleImageChange_,\n transform,\n declutter,\n index,\n ) || loading;\n }\n } else {\n loading = renderFeature(\n builderGroup,\n feature,\n styles,\n squaredTolerance,\n this.boundHandleStyleImageChange_,\n transform,\n declutter,\n index,\n );\n }\n return loading;\n }\n}\n\nexport default CanvasVectorLayerRenderer;\n", "/**\n * @module ol/layer/Vector\n */\nimport CanvasVectorLayerRenderer from '../renderer/canvas/VectorLayer.js';\nimport BaseVectorLayer from './BaseVector.js';\n\n/**\n * @template {import(\"../source/Vector.js\").default<FeatureType>} [VectorSourceType=import(\"../source/Vector.js\").default<*>]\n * @template {import('../Feature.js').FeatureLike} [FeatureType=import(\"./BaseVector.js\").ExtractedFeatureType<VectorSourceType>]\n * @typedef {Object} Options\n * @property {string} [className='ol-layer'] A CSS class name to set to the layer element.\n * @property {number} [opacity=1] Opacity (0, 1).\n * @property {boolean} [visible=true] Visibility.\n * @property {import(\"../extent.js\").Extent} [extent] The bounding extent for layer rendering. The layer will not be\n * rendered outside of this extent.\n * @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers\n * will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed\n * for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`\n * method was used.\n * @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be\n * visible.\n * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will\n * be visible.\n * @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be\n * visible.\n * @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will\n * be visible.\n * @property {import(\"../render.js\").OrderFunction} [renderOrder] Render order. Function to be used when sorting\n * features before rendering. By default features are drawn in the order that they are created. Use\n * `null` to avoid the sort, but get an undefined draw order.\n * @property {number} [renderBuffer=100] The buffer in pixels around the viewport extent used by the\n * renderer when getting features from the vector source for the rendering or hit-detection.\n * Recommended value: the size of the largest symbol, line width or label.\n * @property {VectorSourceType} [source] Source.\n * @property {import(\"../Map.js\").default} [map] Sets the layer as overlay on a map. The map will not manage\n * this layer in its layers collection, and the layer will be rendered on top. This is useful for\n * temporary layers. The standard way to add a layer to a map and have it managed by the map is to\n * use [map.addLayer()]{@link import(\"../Map.js\").default#addLayer}.\n * @property {boolean|string|number} [declutter=false] Declutter images and text. Any truthy value will enable\n * decluttering. Within a layer, a feature rendered before another has higher priority. All layers with the\n * same `declutter` value will be decluttered together. The priority is determined by the drawing order of the\n * layers with the same `declutter` value. Higher in the layer stack means higher priority. To declutter distinct\n * layers or groups of layers separately, use different truthy values for `declutter`.\n * @property {import(\"../style/Style.js\").StyleLike|import(\"../style/flat.js\").FlatStyleLike|null} [style] Layer style. When set to `null`, only\n * features that have their own style will be rendered. See {@link module:ol/style/Style~Style} for the default style\n * which will be used if this is not set.\n * @property {import(\"./Base.js\").BackgroundColor} [background] Background color for the layer. If not specified, no background\n * will be rendered.\n * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will\n * be recreated during animations. This means that no vectors will be shown clipped, but the\n * setting will have a performance impact for large amounts of vector data. When set to `false`,\n * batches will be recreated when no animation is active.\n * @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will\n * be recreated during interactions. See also `updateWhileAnimating`.\n * @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.\n */\n\n/**\n * @classdesc\n * Vector data is rendered client-side, as vectors. This layer type provides most accurate rendering\n * even during animations. Points and labels stay upright on rotated views. For very large\n * amounts of vector data, performance may suffer during pan and zoom animations. In this case,\n * try {@link module:ol/layer/VectorImage~VectorImageLayer}.\n *\n * Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}\n * property on the layer object; for example, setting `title: 'My Title'` in the\n * options means that `title` is observable, and has get/set accessors.\n *\n * @template {import(\"../source/Vector.js\").default<FeatureType>} [VectorSourceType=import(\"../source/Vector.js\").default<*>]\n * @template {import('../Feature.js').FeatureLike} [FeatureType=import(\"./BaseVector.js\").ExtractedFeatureType<VectorSourceType>]\n * @extends {BaseVectorLayer<FeatureType, VectorSourceType, CanvasVectorLayerRenderer>}\n * @api\n */\nclass VectorLayer extends BaseVectorLayer {\n /**\n * @param {Options<VectorSourceType, FeatureType>} [options] Options.\n */\n constructor(options) {\n super(options);\n }\n\n /**\n * @override\n */\n createRenderer() {\n return new CanvasVectorLayerRenderer(this);\n }\n}\n\nexport default VectorLayer;\n", "/**\n * @module ol/featureloader\n */\n\n/**\n *\n * @type {boolean}\n * @private\n */\nlet withCredentials = false;\n\n/**\n * {@link module:ol/source/Vector~VectorSource} sources use a function of this type to\n * load features.\n *\n * This function takes up to 5 arguments. These are an {@link module:ol/extent~Extent} representing\n * the area to be loaded, a `{number}` representing the resolution (map units per pixel), a\n * {@link module:ol/proj/Projection~Projection} for the projection, an optional success callback that should get\n * the loaded features passed as an argument and an optional failure callback with no arguments. If\n * the callbacks are not used, the corresponding vector source will not fire `'featuresloadend'` and\n * `'featuresloaderror'` events. `this` within the function is bound to the\n * {@link module:ol/source/Vector~VectorSource} it's called from.\n *\n * The function is responsible for loading the features and adding them to the\n * source.\n *\n * @template {import(\"./Feature.js\").FeatureLike} [FeatureType=import(\"./Feature.js\").FeatureLike]\n * @typedef {(\n * extent: import(\"./extent.js\").Extent,\n * resolution: number,\n * projection: import(\"./proj/Projection.js\").default,\n * success?: (features: Array<FeatureType>) => void,\n * failure?: () => void) => void} FeatureLoader\n * @api\n */\n\n/**\n * {@link module:ol/source/Vector~VectorSource} sources use a function of this type to\n * get the url to load features from.\n *\n * This function takes an {@link module:ol/extent~Extent} representing the area\n * to be loaded, a `{number}` representing the resolution (map units per pixel)\n * and an {@link module:ol/proj/Projection~Projection} for the projection as\n * arguments and returns a `{string}` representing the URL.\n * @typedef {function(import(\"./extent.js\").Extent, number, import(\"./proj/Projection.js\").default): string} FeatureUrlFunction\n * @api\n */\n\n/**\n * @template {import(\"./Feature.js\").FeatureLike} [FeatureType=import(\"./Feature.js\").default]\n * @param {string|FeatureUrlFunction} url Feature URL service.\n * @param {import(\"./format/Feature.js\").default<FeatureType>} format Feature format.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @param {function(Array<FeatureType>, import(\"./proj/Projection.js\").default): void} success Success\n * Function called with the loaded features and optionally with the data projection.\n * @param {function(): void} failure Failure\n * Function called when loading failed.\n */\nexport function loadFeaturesXhr(\n url,\n format,\n extent,\n resolution,\n projection,\n success,\n failure,\n) {\n const xhr = new XMLHttpRequest();\n xhr.open(\n 'GET',\n typeof url === 'function' ? url(extent, resolution, projection) : url,\n true,\n );\n if (format.getType() == 'arraybuffer') {\n xhr.responseType = 'arraybuffer';\n }\n xhr.withCredentials = withCredentials;\n /**\n * @param {Event} event Event.\n * @private\n */\n xhr.onload = function (event) {\n // status will be 0 for file:// urls\n if (!xhr.status || (xhr.status >= 200 && xhr.status < 300)) {\n const type = format.getType();\n try {\n /** @type {Document|Node|Object|string|undefined} */\n let source;\n if (type == 'text' || type == 'json') {\n source = xhr.responseText;\n } else if (type == 'xml') {\n source = xhr.responseXML || xhr.responseText;\n } else if (type == 'arraybuffer') {\n source = /** @type {ArrayBuffer} */ (xhr.response);\n }\n if (source) {\n success(\n /** @type {Array<FeatureType>} */\n (\n format.readFeatures(source, {\n extent: extent,\n featureProjection: projection,\n })\n ),\n format.readProjection(source),\n );\n } else {\n failure();\n }\n } catch {\n failure();\n }\n } else {\n failure();\n }\n };\n /**\n * @private\n */\n xhr.onerror = failure;\n xhr.send();\n}\n\n/**\n * Create an XHR feature loader for a `url` and `format`. The feature loader\n * loads features (with XHR), parses the features, and adds them to the\n * vector source.\n *\n * @template {import(\"./Feature.js\").FeatureLike} [FeatureType=import(\"./Feature.js\").default]\n * @param {string|FeatureUrlFunction} url Feature URL service.\n * @param {import(\"./format/Feature.js\").default<FeatureType>} format Feature format.\n * @return {FeatureLoader<FeatureType>} The feature loader.\n * @api\n */\nexport function xhr(url, format) {\n /**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"./proj/Projection.js\").default} projection Projection.\n * @param {function(Array<FeatureType>): void} [success] Success\n * Function called when loading succeeded.\n * @param {function(): void} [failure] Failure\n * Function called when loading failed.\n * @this {import(\"./source/Vector.js\").default<FeatureType>}\n */\n return function (extent, resolution, projection, success, failure) {\n loadFeaturesXhr(\n url,\n format,\n extent,\n resolution,\n projection,\n /**\n * @param {Array<FeatureType>} features The loaded features.\n * @param {import(\"./proj/Projection.js\").default} dataProjection Data\n * projection.\n */\n (features, dataProjection) => {\n this.addFeatures(features);\n if (success !== undefined) {\n success(features);\n }\n },\n () => {\n this.changed();\n if (failure !== undefined) {\n failure();\n }\n },\n );\n };\n}\n\n/**\n * Setter for the withCredentials configuration for the XHR.\n *\n * @param {boolean} xhrWithCredentials The value of withCredentials to set.\n * Compare https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/\n * @api\n */\nexport function setWithCredentials(xhrWithCredentials) {\n withCredentials = xhrWithCredentials;\n}\n", "/**\n * @module ol/loadingstrategy\n */\n\nimport {fromUserExtent, fromUserResolution, toUserExtent} from './proj.js';\n\n/**\n * Strategy function for loading all features with a single request.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @return {Array<import(\"./extent.js\").Extent>} Extents.\n * @api\n */\nexport function all(extent, resolution) {\n return [[-Infinity, -Infinity, Infinity, Infinity]];\n}\n\n/**\n * Strategy function for loading features based on the view's extent and\n * resolution.\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @return {Array<import(\"./extent.js\").Extent>} Extents.\n * @api\n */\nexport function bbox(extent, resolution) {\n return [extent];\n}\n\n/**\n * Creates a strategy function for loading features based on a tile grid.\n * @param {import(\"./tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n * @return {function(import(\"./extent.js\").Extent, number, import(\"./proj.js\").Projection): Array<import(\"./extent.js\").Extent>} Loading strategy.\n * @api\n */\nexport function tile(tileGrid) {\n return (\n /**\n * @param {import(\"./extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"./proj.js\").Projection} projection Projection.\n * @return {Array<import(\"./extent.js\").Extent>} Extents.\n */\n function (extent, resolution, projection) {\n const z = tileGrid.getZForResolution(\n fromUserResolution(resolution, projection),\n );\n const tileRange = tileGrid.getTileRangeForExtentAndZ(\n fromUserExtent(extent, projection),\n z,\n );\n /** @type {Array<import(\"./extent.js\").Extent>} */\n const extents = [];\n /** @type {import(\"./tilecoord.js\").TileCoord} */\n const tileCoord = [z, 0, 0];\n for (\n tileCoord[1] = tileRange.minX;\n tileCoord[1] <= tileRange.maxX;\n ++tileCoord[1]\n ) {\n for (\n tileCoord[2] = tileRange.minY;\n tileCoord[2] <= tileRange.maxY;\n ++tileCoord[2]\n ) {\n extents.push(\n toUserExtent(tileGrid.getTileCoordExtent(tileCoord), projection),\n );\n }\n }\n return extents;\n }\n );\n}\n", "/**\n * @module ol/Feature\n */\nimport BaseObject from './Object.js';\nimport {assert} from './asserts.js';\nimport EventType from './events/EventType.js';\nimport {listen, unlistenByKey} from './events.js';\n\n/**\n * @typedef {typeof Feature|typeof import(\"./render/Feature.js\").default} FeatureClass\n */\n\n/**\n * @typedef {Feature|import(\"./render/Feature.js\").default} FeatureLike\n */\n\n/***\n * @template Return\n * @typedef {import(\"./Observable\").OnSignature<import(\"./Observable\").EventTypes, import(\"./events/Event.js\").default, Return> &\n * import(\"./Observable\").OnSignature<import(\"./ObjectEventType\").Types|'change:geometry', import(\"./Object\").ObjectEvent, Return> &\n * import(\"./Observable\").CombinedOnSignature<import(\"./Observable\").EventTypes|import(\"./ObjectEventType\").Types\n * |'change:geometry', Return>} FeatureOnSignature\n */\n\n/***\n * @template {import(\"./geom/Geometry.js\").default} [Geometry=import(\"./geom/Geometry.js\").default]\n * @template {Object<string, *>} [Properties=Object<string, *>]\n * @typedef {Properties & { geometry?: Geometry }} ObjectWithGeometry\n */\n\n/**\n * @classdesc\n * A vector object for geographic features with a geometry and other\n * attribute properties, similar to the features in vector file formats like\n * GeoJSON.\n *\n * Features can be styled individually with `setStyle`; otherwise they use the\n * style of their vector layer.\n *\n * Note that attribute properties are set as {@link module:ol/Object~BaseObject} properties on\n * the feature object, so they are observable, and have get/set accessors.\n *\n * Typically, a feature has a single geometry property. You can set the\n * geometry using the `setGeometry` method and get it with `getGeometry`.\n * It is possible to store more than one geometry on a feature using attribute\n * properties. By default, the geometry used for rendering is identified by\n * the property name `geometry`. If you want to use another geometry property\n * for rendering, use the `setGeometryName` method to change the attribute\n * property associated with the geometry for the feature. For example:\n *\n * ```js\n *\n * import Feature from 'ol/Feature.js';\n * import Polygon from 'ol/geom/Polygon.js';\n * import Point from 'ol/geom/Point.js';\n *\n * const feature = new Feature({\n * geometry: new Polygon(polyCoords),\n * labelPoint: new Point(labelCoords),\n * name: 'My Polygon',\n * });\n *\n * // get the polygon geometry\n * const poly = feature.getGeometry();\n *\n * // Render the feature as a point using the coordinates from labelPoint\n * feature.setGeometryName('labelPoint');\n *\n * // get the point geometry\n * const point = feature.getGeometry();\n * ```\n *\n * @api\n * @template {import(\"./geom/Geometry.js\").default} [Geometry=import(\"./geom/Geometry.js\").default]\n * @template {Object<string, *>} [Properties=Object<string, *>]\n * @extends {BaseObject<NoInfer<Properties>>}\n */\nclass Feature extends BaseObject {\n /**\n * @param {Geometry|ObjectWithGeometry<Geometry, NoInfer<Properties>>} [geometryOrProperties]\n * You may pass a Geometry object directly, or an object literal containing\n * properties. If you pass an object literal, you may include a Geometry\n * associated with a `geometry` key.\n */\n constructor(geometryOrProperties) {\n super();\n\n /***\n * @type {FeatureOnSignature<import(\"./events\").EventsKey>}\n */\n this.on;\n\n /***\n * @type {FeatureOnSignature<import(\"./events\").EventsKey>}\n */\n this.once;\n\n /***\n * @type {FeatureOnSignature<void>}\n */\n this.un;\n\n /**\n * @private\n * @type {number|string|undefined}\n */\n this.id_ = undefined;\n\n /**\n * @type {string}\n * @private\n */\n this.geometryName_ = 'geometry';\n\n /**\n * User provided style.\n * @private\n * @type {import(\"./style/Style.js\").StyleLike}\n */\n this.style_ = null;\n\n /**\n * @private\n * @type {import(\"./style/Style.js\").StyleFunction|undefined}\n */\n this.styleFunction_ = undefined;\n\n /**\n * @private\n * @type {?import(\"./events.js\").EventsKey}\n */\n this.geometryChangeKey_ = null;\n\n this.addChangeListener(this.geometryName_, this.handleGeometryChanged_);\n\n if (geometryOrProperties) {\n if (\n typeof (\n /** @type {?} */ (geometryOrProperties).getSimplifiedGeometry\n ) === 'function'\n ) {\n const geometry = /** @type {Geometry} */ (geometryOrProperties);\n this.setGeometry(geometry);\n } else {\n /** @type {?} */\n const properties = geometryOrProperties;\n this.setProperties(properties);\n }\n }\n }\n\n /**\n * Clone this feature. If the original feature has a geometry it\n * is also cloned. The feature id is not set in the clone.\n * @return {Feature<Geometry>} The clone.\n * @api\n */\n clone() {\n const clone = /** @type {Feature<Geometry>} */ (\n new Feature(this.hasProperties() ? this.getProperties() : null)\n );\n clone.setGeometryName(this.getGeometryName());\n const geometry = this.getGeometry();\n if (geometry) {\n clone.setGeometry(/** @type {Geometry} */ (geometry.clone()));\n }\n const style = this.getStyle();\n if (style) {\n clone.setStyle(style);\n }\n return clone;\n }\n\n /**\n * Get the feature's default geometry. A feature may have any number of named\n * geometries. The \"default\" geometry (the one that is rendered by default) is\n * set when calling {@link module:ol/Feature~Feature#setGeometry}.\n * @return {Geometry|undefined} The default geometry for the feature.\n * @api\n * @observable\n */\n getGeometry() {\n return /** @type {Geometry|undefined} */ (this.get(this.geometryName_));\n }\n\n /**\n * Get the feature identifier. This is a stable identifier for the feature and\n * is either set when reading data from a remote source or set explicitly by\n * calling {@link module:ol/Feature~Feature#setId}.\n * @return {number|string|undefined} Id.\n * @api\n */\n getId() {\n return this.id_;\n }\n\n /**\n * Get the name of the feature's default geometry. By default, the default\n * geometry is named `geometry`.\n * @return {string} Get the property name associated with the default geometry\n * for this feature.\n * @api\n */\n getGeometryName() {\n return this.geometryName_;\n }\n\n /**\n * Get the feature's style. Will return what was provided to the\n * {@link module:ol/Feature~Feature#setStyle} method.\n * @return {import(\"./style/Style.js\").StyleLike|undefined} The feature style.\n * @api\n */\n getStyle() {\n return this.style_;\n }\n\n /**\n * Get the feature's style function.\n * @return {import(\"./style/Style.js\").StyleFunction|undefined} Return a function\n * representing the current style of this feature.\n * @api\n */\n getStyleFunction() {\n return this.styleFunction_;\n }\n\n /**\n * @private\n */\n handleGeometryChange_() {\n this.changed();\n }\n\n /**\n * @private\n */\n handleGeometryChanged_() {\n if (this.geometryChangeKey_) {\n unlistenByKey(this.geometryChangeKey_);\n this.geometryChangeKey_ = null;\n }\n const geometry = this.getGeometry();\n if (geometry) {\n this.geometryChangeKey_ = listen(\n geometry,\n EventType.CHANGE,\n this.handleGeometryChange_,\n this,\n );\n }\n this.changed();\n }\n\n /**\n * Set the default geometry for the feature. This will update the property\n * with the name returned by {@link module:ol/Feature~Feature#getGeometryName}.\n * @param {Geometry|undefined} geometry The new geometry.\n * @api\n * @observable\n */\n setGeometry(geometry) {\n this.set(this.geometryName_, geometry);\n }\n\n /**\n * Set the style for the feature to override the layer style. This can be a\n * single style object, an array of styles, or a function that takes a\n * resolution and returns an array of styles. To unset the feature style, call\n * `setStyle()` without arguments or a falsey value.\n * @param {import(\"./style/Style.js\").StyleLike} [style] Style for this feature.\n * @api\n * @fires module:ol/events/Event~BaseEvent#event:change\n */\n setStyle(style) {\n this.style_ = style;\n this.styleFunction_ = !style ? undefined : createStyleFunction(style);\n this.changed();\n }\n\n /**\n * Set the feature id. The feature id is considered stable and may be used when\n * requesting features or comparing identifiers returned from a remote source.\n * The feature id can be used with the\n * {@link module:ol/source/Vector~VectorSource#getFeatureById} method.\n * @param {number|string|undefined} id The feature id.\n * @api\n * @fires module:ol/events/Event~BaseEvent#event:change\n */\n setId(id) {\n this.id_ = id;\n this.changed();\n }\n\n /**\n * Set the property name to be used when getting the feature's default geometry.\n * When calling {@link module:ol/Feature~Feature#getGeometry}, the value of the property with\n * this name will be returned.\n * @param {string} name The property name of the default geometry.\n * @api\n */\n setGeometryName(name) {\n this.removeChangeListener(this.geometryName_, this.handleGeometryChanged_);\n this.geometryName_ = name;\n this.addChangeListener(this.geometryName_, this.handleGeometryChanged_);\n this.handleGeometryChanged_();\n }\n}\n\n/**\n * Convert the provided object into a feature style function. Functions passed\n * through unchanged. Arrays of Style or single style objects wrapped\n * in a new feature style function.\n * @param {!import(\"./style/Style.js\").StyleFunction|!Array<import(\"./style/Style.js\").default>|!import(\"./style/Style.js\").default} obj\n * A feature style function, a single style, or an array of styles.\n * @return {import(\"./style/Style.js\").StyleFunction} A style function.\n */\nexport function createStyleFunction(obj) {\n if (typeof obj === 'function') {\n return obj;\n }\n /**\n * @type {Array<import(\"./style/Style.js\").default>}\n */\n let styles;\n if (Array.isArray(obj)) {\n styles = obj;\n } else {\n assert(\n typeof (/** @type {?} */ (obj).getZIndex) === 'function',\n 'Expected an `ol/style/Style` or an array of `ol/style/Style.js`',\n );\n const style = /** @type {import(\"./style/Style.js\").default} */ (obj);\n styles = [style];\n }\n return function () {\n return styles;\n };\n}\nexport default Feature;\n", "/**\n * @module ol/geom/flat/center\n */\nimport {createEmpty, createOrUpdateFromFlatCoordinates} from '../../extent.js';\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<Array<number>>} endss Endss.\n * @param {number} stride Stride.\n * @return {Array<number>} Flat centers.\n */\nexport function linearRingss(flatCoordinates, offset, endss, stride) {\n const flatCenters = [];\n let extent = createEmpty();\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i];\n extent = createOrUpdateFromFlatCoordinates(\n flatCoordinates,\n offset,\n ends[0],\n stride,\n );\n flatCenters.push((extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2);\n offset = ends[ends.length - 1];\n }\n return flatCenters;\n}\n", "/**\n * @module ol/geom/flat/interpolate\n */\nimport {binarySearch} from '../../array.js';\nimport {lerp} from '../../math.js';\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} fraction Fraction.\n * @param {Array<number>} [dest] Destination.\n * @param {number} [dimension] Destination dimension (default is `2`)\n * @return {Array<number>} Destination.\n */\nexport function interpolatePoint(\n flatCoordinates,\n offset,\n end,\n stride,\n fraction,\n dest,\n dimension,\n) {\n let o, t;\n const n = (end - offset) / stride;\n if (n === 1) {\n o = offset;\n } else if (n === 2) {\n o = offset;\n t = fraction;\n } else if (n !== 0) {\n let x1 = flatCoordinates[offset];\n let y1 = flatCoordinates[offset + 1];\n let length = 0;\n const cumulativeLengths = [0];\n for (let i = offset + stride; i < end; i += stride) {\n const x2 = flatCoordinates[i];\n const y2 = flatCoordinates[i + 1];\n length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n cumulativeLengths.push(length);\n x1 = x2;\n y1 = y2;\n }\n const target = fraction * length;\n const index = binarySearch(cumulativeLengths, target);\n if (index < 0) {\n t =\n (target - cumulativeLengths[-index - 2]) /\n (cumulativeLengths[-index - 1] - cumulativeLengths[-index - 2]);\n o = offset + (-index - 2) * stride;\n } else {\n o = offset + index * stride;\n }\n }\n dimension = dimension > 1 ? dimension : 2;\n dest = dest ? dest : new Array(dimension);\n for (let i = 0; i < dimension; ++i) {\n dest[i] =\n o === undefined\n ? NaN\n : t === undefined\n ? flatCoordinates[o + i]\n : lerp(flatCoordinates[o + i], flatCoordinates[o + stride + i], t);\n }\n return dest;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {number} end End.\n * @param {number} stride Stride.\n * @param {number} m M.\n * @param {boolean} extrapolate Extrapolate.\n * @return {import(\"../../coordinate.js\").Coordinate|null} Coordinate.\n */\nexport function lineStringCoordinateAtM(\n flatCoordinates,\n offset,\n end,\n stride,\n m,\n extrapolate,\n) {\n if (end == offset) {\n return null;\n }\n let coordinate;\n if (m < flatCoordinates[offset + stride - 1]) {\n if (extrapolate) {\n coordinate = flatCoordinates.slice(offset, offset + stride);\n coordinate[stride - 1] = m;\n return coordinate;\n }\n return null;\n }\n if (flatCoordinates[end - 1] < m) {\n if (extrapolate) {\n coordinate = flatCoordinates.slice(end - stride, end);\n coordinate[stride - 1] = m;\n return coordinate;\n }\n return null;\n }\n // FIXME use O(1) search\n if (m == flatCoordinates[offset + stride - 1]) {\n return flatCoordinates.slice(offset, offset + stride);\n }\n let lo = offset / stride;\n let hi = end / stride;\n while (lo < hi) {\n const mid = (lo + hi) >> 1;\n if (m < flatCoordinates[(mid + 1) * stride - 1]) {\n hi = mid;\n } else {\n lo = mid + 1;\n }\n }\n const m0 = flatCoordinates[lo * stride - 1];\n if (m == m0) {\n return flatCoordinates.slice((lo - 1) * stride, (lo - 1) * stride + stride);\n }\n const m1 = flatCoordinates[(lo + 1) * stride - 1];\n const t = (m - m0) / (m1 - m0);\n coordinate = [];\n for (let i = 0; i < stride - 1; ++i) {\n coordinate.push(\n lerp(\n flatCoordinates[(lo - 1) * stride + i],\n flatCoordinates[lo * stride + i],\n t,\n ),\n );\n }\n coordinate.push(m);\n return coordinate;\n}\n\n/**\n * @param {Array<number>} flatCoordinates Flat coordinates.\n * @param {number} offset Offset.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {number} m M.\n * @param {boolean} extrapolate Extrapolate.\n * @param {boolean} interpolate Interpolate.\n * @return {import(\"../../coordinate.js\").Coordinate|null} Coordinate.\n */\nexport function lineStringsCoordinateAtM(\n flatCoordinates,\n offset,\n ends,\n stride,\n m,\n extrapolate,\n interpolate,\n) {\n if (interpolate) {\n return lineStringCoordinateAtM(\n flatCoordinates,\n offset,\n ends[ends.length - 1],\n stride,\n m,\n extrapolate,\n );\n }\n let coordinate;\n if (m < flatCoordinates[stride - 1]) {\n if (extrapolate) {\n coordinate = flatCoordinates.slice(0, stride);\n coordinate[stride - 1] = m;\n return coordinate;\n }\n return null;\n }\n if (flatCoordinates[flatCoordinates.length - 1] < m) {\n if (extrapolate) {\n coordinate = flatCoordinates.slice(flatCoordinates.length - stride);\n coordinate[stride - 1] = m;\n return coordinate;\n }\n return null;\n }\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n if (offset == end) {\n continue;\n }\n if (m < flatCoordinates[offset + stride - 1]) {\n return null;\n }\n if (m <= flatCoordinates[end - 1]) {\n return lineStringCoordinateAtM(\n flatCoordinates,\n offset,\n end,\n stride,\n m,\n false,\n );\n }\n offset = end;\n }\n return null;\n}\n", "/**\n * @module ol/geom/MultiPoint\n */\nimport {extend} from '../array.js';\nimport {closestSquaredDistanceXY, containsXY} from '../extent.js';\nimport {squaredDistance as squaredDx} from '../math.js';\nimport Point from './Point.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {deflateCoordinates} from './flat/deflate.js';\nimport {inflateCoordinates} from './flat/inflate.js';\n\n/**\n * @classdesc\n * Multi-point geometry.\n *\n * @api\n */\nclass MultiPoint extends SimpleGeometry {\n /**\n * @param {Array<import(\"../coordinate.js\").Coordinate>|Array<number>} coordinates Coordinates.\n * For internal use, flat coordinates in combination with `layout` are also accepted.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n */\n constructor(coordinates, layout) {\n super();\n if (layout && !Array.isArray(coordinates[0])) {\n this.setFlatCoordinates(\n layout,\n /** @type {Array<number>} */ (coordinates),\n );\n } else {\n this.setCoordinates(\n /** @type {Array<import(\"../coordinate.js\").Coordinate>} */ (\n coordinates\n ),\n layout,\n );\n }\n }\n\n /**\n * Append the passed point to this multipoint.\n * @param {Point} point Point.\n * @api\n */\n appendPoint(point) {\n extend(this.flatCoordinates, point.getFlatCoordinates());\n this.changed();\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!MultiPoint} Clone.\n * @api\n * @override\n */\n clone() {\n const multiPoint = new MultiPoint(\n this.flatCoordinates.slice(),\n this.layout,\n );\n multiPoint.applyProperties(this);\n return multiPoint;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n * @override\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n const flatCoordinates = this.flatCoordinates;\n const stride = this.stride;\n for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n const squaredDistance = squaredDx(\n x,\n y,\n flatCoordinates[i],\n flatCoordinates[i + 1],\n );\n if (squaredDistance < minSquaredDistance) {\n minSquaredDistance = squaredDistance;\n for (let j = 0; j < stride; ++j) {\n closestPoint[j] = flatCoordinates[i + j];\n }\n closestPoint.length = stride;\n }\n }\n return minSquaredDistance;\n }\n\n /**\n * Return the coordinates of the multipoint.\n * @return {Array<import(\"../coordinate.js\").Coordinate>} Coordinates.\n * @api\n * @override\n */\n getCoordinates() {\n return inflateCoordinates(\n this.flatCoordinates,\n 0,\n this.flatCoordinates.length,\n this.stride,\n );\n }\n\n /**\n * Return the point at the specified index.\n * @param {number} index Index.\n * @return {Point} Point.\n * @api\n */\n getPoint(index) {\n const n = this.flatCoordinates.length / this.stride;\n if (index < 0 || n <= index) {\n return null;\n }\n return new Point(\n this.flatCoordinates.slice(\n index * this.stride,\n (index + 1) * this.stride,\n ),\n this.layout,\n );\n }\n\n /**\n * Return the points of this multipoint.\n * @return {Array<Point>} Points.\n * @api\n */\n getPoints() {\n const flatCoordinates = this.flatCoordinates;\n const layout = this.layout;\n const stride = this.stride;\n /** @type {Array<Point>} */\n const points = [];\n for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n const point = new Point(flatCoordinates.slice(i, i + stride), layout);\n points.push(point);\n }\n return points;\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n * @override\n */\n getType() {\n return 'MultiPoint';\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n * @override\n */\n intersectsExtent(extent) {\n const flatCoordinates = this.flatCoordinates;\n const stride = this.stride;\n for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {\n const x = flatCoordinates[i];\n const y = flatCoordinates[i + 1];\n if (containsXY(extent, x, y)) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Set the coordinates of the multipoint.\n * @param {!Array<import(\"../coordinate.js\").Coordinate>} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n * @override\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(layout, coordinates, 1);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n this.flatCoordinates.length = deflateCoordinates(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride,\n );\n this.changed();\n }\n}\n\nexport default MultiPoint;\n", "/**\n * @module ol/geom/MultiPolygon\n */\nimport {extend} from '../array.js';\nimport {closestSquaredDistanceXY} from '../extent.js';\nimport MultiPoint from './MultiPoint.js';\nimport Polygon from './Polygon.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport {linearRingss as linearRingssArea} from './flat/area.js';\nimport {linearRingss as linearRingssCenter} from './flat/center.js';\nimport {\n assignClosestMultiArrayPoint,\n multiArrayMaxSquaredDelta,\n} from './flat/closest.js';\nimport {linearRingssContainsXY} from './flat/contains.js';\nimport {deflateMultiCoordinatesArray} from './flat/deflate.js';\nimport {inflateMultiCoordinatesArray} from './flat/inflate.js';\nimport {getInteriorPointsOfMultiArray} from './flat/interiorpoint.js';\nimport {intersectsLinearRingMultiArray} from './flat/intersectsextent.js';\nimport {\n linearRingssAreOriented,\n orientLinearRingsArray,\n} from './flat/orient.js';\nimport {quantizeMultiArray} from './flat/simplify.js';\n\n/**\n * @classdesc\n * Multi-polygon geometry.\n *\n * @api\n */\nclass MultiPolygon extends SimpleGeometry {\n /**\n * @param {Array<Array<Array<import(\"../coordinate.js\").Coordinate>>|Polygon>|Array<number>} coordinates Coordinates.\n * For internal use, flat coordinates in combination with `layout` and `endss` are also accepted.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @param {Array<Array<number>>} [endss] Array of ends for internal use with flat coordinates.\n */\n constructor(coordinates, layout, endss) {\n super();\n\n /**\n * @type {Array<Array<number>>}\n * @private\n */\n this.endss_ = [];\n\n /**\n * @private\n * @type {number}\n */\n this.flatInteriorPointsRevision_ = -1;\n\n /**\n * @private\n * @type {Array<number>|null}\n */\n this.flatInteriorPoints_ = null;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDelta_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.maxDeltaRevision_ = -1;\n\n /**\n * @private\n * @type {number}\n */\n this.orientedRevision_ = -1;\n\n /**\n * @private\n * @type {Array<number>|null}\n */\n this.orientedFlatCoordinates_ = null;\n\n if (!endss && !Array.isArray(coordinates[0])) {\n const polygons = /** @type {Array<Polygon>} */ (coordinates);\n /** @type {Array<number>} */\n const flatCoordinates = [];\n const thisEndss = [];\n for (let i = 0, ii = polygons.length; i < ii; ++i) {\n const polygon = polygons[i];\n const offset = flatCoordinates.length;\n const ends = polygon.getEnds();\n for (let j = 0, jj = ends.length; j < jj; ++j) {\n ends[j] += offset;\n }\n extend(flatCoordinates, polygon.getFlatCoordinates());\n thisEndss.push(ends);\n }\n layout =\n polygons.length === 0 ? this.getLayout() : polygons[0].getLayout();\n coordinates = flatCoordinates;\n endss = thisEndss;\n }\n if (layout !== undefined && endss) {\n this.setFlatCoordinates(\n layout,\n /** @type {Array<number>} */ (coordinates),\n );\n this.endss_ = endss;\n } else {\n this.setCoordinates(\n /** @type {Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>} */ (\n coordinates\n ),\n layout,\n );\n }\n }\n\n /**\n * Append the passed polygon to this multipolygon.\n * @param {Polygon} polygon Polygon.\n * @api\n */\n appendPolygon(polygon) {\n /** @type {Array<number>} */\n let ends;\n if (!this.flatCoordinates) {\n this.flatCoordinates = polygon.getFlatCoordinates().slice();\n ends = polygon.getEnds().slice();\n this.endss_.push();\n } else {\n const offset = this.flatCoordinates.length;\n extend(this.flatCoordinates, polygon.getFlatCoordinates());\n ends = polygon.getEnds().slice();\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n ends[i] += offset;\n }\n }\n this.endss_.push(ends);\n this.changed();\n }\n\n /**\n * Make a complete copy of the geometry.\n * @return {!MultiPolygon} Clone.\n * @api\n * @override\n */\n clone() {\n const len = this.endss_.length;\n const newEndss = new Array(len);\n for (let i = 0; i < len; ++i) {\n newEndss[i] = this.endss_[i].slice();\n }\n\n const multiPolygon = new MultiPolygon(\n this.flatCoordinates.slice(),\n this.layout,\n newEndss,\n );\n multiPolygon.applyProperties(this);\n\n return multiPolygon;\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n * @override\n */\n closestPointXY(x, y, closestPoint, minSquaredDistance) {\n if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {\n return minSquaredDistance;\n }\n if (this.maxDeltaRevision_ != this.getRevision()) {\n this.maxDelta_ = Math.sqrt(\n multiArrayMaxSquaredDelta(\n this.flatCoordinates,\n 0,\n this.endss_,\n this.stride,\n 0,\n ),\n );\n this.maxDeltaRevision_ = this.getRevision();\n }\n return assignClosestMultiArrayPoint(\n this.getOrientedFlatCoordinates(),\n 0,\n this.endss_,\n this.stride,\n this.maxDelta_,\n true,\n x,\n y,\n closestPoint,\n minSquaredDistance,\n );\n }\n\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n * @override\n */\n containsXY(x, y) {\n return linearRingssContainsXY(\n this.getOrientedFlatCoordinates(),\n 0,\n this.endss_,\n this.stride,\n x,\n y,\n );\n }\n\n /**\n * Return the area of the multipolygon on projected plane.\n * @return {number} Area (on projected plane).\n * @api\n */\n getArea() {\n return linearRingssArea(\n this.getOrientedFlatCoordinates(),\n 0,\n this.endss_,\n this.stride,\n );\n }\n\n /**\n * Get the coordinate array for this geometry. This array has the structure\n * of a GeoJSON coordinate array for multi-polygons.\n *\n * @param {boolean} [right] Orient coordinates according to the right-hand\n * rule (counter-clockwise for exterior and clockwise for interior rings).\n * If `false`, coordinates will be oriented according to the left-hand rule\n * (clockwise for exterior and counter-clockwise for interior rings).\n * By default, coordinate orientation will depend on how the geometry was\n * constructed.\n * @return {Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>} Coordinates.\n * @api\n * @override\n */\n getCoordinates(right) {\n let flatCoordinates;\n if (right !== undefined) {\n flatCoordinates = this.getOrientedFlatCoordinates().slice();\n orientLinearRingsArray(\n flatCoordinates,\n 0,\n this.endss_,\n this.stride,\n right,\n );\n } else {\n flatCoordinates = this.flatCoordinates;\n }\n\n return inflateMultiCoordinatesArray(\n flatCoordinates,\n 0,\n this.endss_,\n this.stride,\n );\n }\n\n /**\n * @return {Array<Array<number>>} Endss.\n */\n getEndss() {\n return this.endss_;\n }\n\n /**\n * @return {Array<number>} Flat interior points.\n */\n getFlatInteriorPoints() {\n if (this.flatInteriorPointsRevision_ != this.getRevision()) {\n const flatCenters = linearRingssCenter(\n this.flatCoordinates,\n 0,\n this.endss_,\n this.stride,\n );\n this.flatInteriorPoints_ = getInteriorPointsOfMultiArray(\n this.getOrientedFlatCoordinates(),\n 0,\n this.endss_,\n this.stride,\n flatCenters,\n );\n this.flatInteriorPointsRevision_ = this.getRevision();\n }\n return /** @type {Array<number>} */ (this.flatInteriorPoints_);\n }\n\n /**\n * Return the interior points as {@link module:ol/geom/MultiPoint~MultiPoint multipoint}.\n * @return {MultiPoint} Interior points as XYM coordinates, where M is\n * the length of the horizontal intersection that the point belongs to.\n * @api\n */\n getInteriorPoints() {\n return new MultiPoint(this.getFlatInteriorPoints().slice(), 'XYM');\n }\n\n /**\n * @return {Array<number>} Oriented flat coordinates.\n */\n getOrientedFlatCoordinates() {\n if (this.orientedRevision_ != this.getRevision()) {\n const flatCoordinates = this.flatCoordinates;\n if (\n linearRingssAreOriented(flatCoordinates, 0, this.endss_, this.stride)\n ) {\n this.orientedFlatCoordinates_ = flatCoordinates;\n } else {\n this.orientedFlatCoordinates_ = flatCoordinates.slice();\n this.orientedFlatCoordinates_.length = orientLinearRingsArray(\n this.orientedFlatCoordinates_,\n 0,\n this.endss_,\n this.stride,\n );\n }\n this.orientedRevision_ = this.getRevision();\n }\n return /** @type {Array<number>} */ (this.orientedFlatCoordinates_);\n }\n\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {MultiPolygon} Simplified MultiPolygon.\n * @protected\n * @override\n */\n getSimplifiedGeometryInternal(squaredTolerance) {\n /** @type {Array<number>} */\n const simplifiedFlatCoordinates = [];\n /** @type {Array<Array<number>>} */\n const simplifiedEndss = [];\n simplifiedFlatCoordinates.length = quantizeMultiArray(\n this.flatCoordinates,\n 0,\n this.endss_,\n this.stride,\n Math.sqrt(squaredTolerance),\n simplifiedFlatCoordinates,\n 0,\n simplifiedEndss,\n );\n return new MultiPolygon(simplifiedFlatCoordinates, 'XY', simplifiedEndss);\n }\n\n /**\n * Return the polygon at the specified index.\n * @param {number} index Index.\n * @return {Polygon} Polygon.\n * @api\n */\n getPolygon(index) {\n if (index < 0 || this.endss_.length <= index) {\n return null;\n }\n let offset;\n if (index === 0) {\n offset = 0;\n } else {\n const prevEnds = this.endss_[index - 1];\n offset = prevEnds[prevEnds.length - 1];\n }\n const ends = this.endss_[index].slice();\n const end = ends[ends.length - 1];\n if (offset !== 0) {\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n ends[i] -= offset;\n }\n }\n return new Polygon(\n this.flatCoordinates.slice(offset, end),\n this.layout,\n ends,\n );\n }\n\n /**\n * Return the polygons of this multipolygon.\n * @return {Array<Polygon>} Polygons.\n * @api\n */\n getPolygons() {\n const layout = this.layout;\n const flatCoordinates = this.flatCoordinates;\n const endss = this.endss_;\n const polygons = [];\n let offset = 0;\n for (let i = 0, ii = endss.length; i < ii; ++i) {\n const ends = endss[i].slice();\n const end = ends[ends.length - 1];\n if (offset !== 0) {\n for (let j = 0, jj = ends.length; j < jj; ++j) {\n ends[j] -= offset;\n }\n }\n const polygon = new Polygon(\n flatCoordinates.slice(offset, end),\n layout,\n ends,\n );\n polygons.push(polygon);\n offset = end;\n }\n return polygons;\n }\n\n /**\n * Get the type of this geometry.\n * @return {import(\"./Geometry.js\").Type} Geometry type.\n * @api\n * @override\n */\n getType() {\n return 'MultiPolygon';\n }\n\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n * @override\n */\n intersectsExtent(extent) {\n return intersectsLinearRingMultiArray(\n this.getOrientedFlatCoordinates(),\n 0,\n this.endss_,\n this.stride,\n extent,\n );\n }\n\n /**\n * Set the coordinates of the multipolygon.\n * @param {!Array<Array<Array<import(\"../coordinate.js\").Coordinate>>>} coordinates Coordinates.\n * @param {import(\"./Geometry.js\").GeometryLayout} [layout] Layout.\n * @api\n * @override\n */\n setCoordinates(coordinates, layout) {\n this.setLayout(layout, coordinates, 3);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n const endss = deflateMultiCoordinatesArray(\n this.flatCoordinates,\n 0,\n coordinates,\n this.stride,\n this.endss_,\n );\n if (endss.length === 0) {\n this.flatCoordinates.length = 0;\n } else {\n const lastEnds = endss[endss.length - 1];\n this.flatCoordinates.length =\n lastEnds.length === 0 ? 0 : lastEnds[lastEnds.length - 1];\n }\n this.changed();\n }\n}\n\nexport default MultiPolygon;\n", "/**\n * @module ol/render/Feature\n */\nimport Feature from '../Feature.js';\nimport {extend} from '../array.js';\nimport {\n createOrUpdateFromCoordinate,\n createOrUpdateFromFlatCoordinates,\n getCenter,\n getHeight,\n} from '../extent.js';\nimport {memoizeOne} from '../functions.js';\nimport {linearRingss as linearRingssCenter} from '../geom/flat/center.js';\nimport {\n getInteriorPointOfArray,\n getInteriorPointsOfMultiArray,\n} from '../geom/flat/interiorpoint.js';\nimport {interpolatePoint} from '../geom/flat/interpolate.js';\nimport {inflateEnds} from '../geom/flat/orient.js';\nimport {\n douglasPeucker,\n douglasPeuckerArray,\n quantizeArray,\n} from '../geom/flat/simplify.js';\nimport {transform2D} from '../geom/flat/transform.js';\nimport {\n LineString,\n MultiLineString,\n MultiPoint,\n MultiPolygon,\n Point,\n Polygon,\n} from '../geom.js';\nimport {get as getProjection} from '../proj.js';\nimport {\n compose as composeTransform,\n create as createTransform,\n} from '../transform.js';\n\n/**\n * @typedef {'Point' | 'LineString' | 'LinearRing' | 'Polygon' | 'MultiPoint' | 'MultiLineString'} Type\n * The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`,\n * `'Polygon'`, `'MultiPoint'` or 'MultiLineString'`.\n */\n\n/**\n * @type {import(\"../transform.js\").Transform}\n */\nconst tmpTransform = createTransform();\n\n/**\n * Lightweight, read-only, {@link module:ol/Feature~Feature} and {@link module:ol/geom/Geometry~Geometry} like\n * structure, optimized for vector tile rendering and styling. Geometry access\n * through the API is limited to getting the type and extent of the geometry.\n */\nclass RenderFeature {\n /**\n * @param {Type} type Geometry type.\n * @param {Array<number>} flatCoordinates Flat coordinates. These always need\n * to be right-handed for polygons.\n * @param {Array<number>} ends Ends.\n * @param {number} stride Stride.\n * @param {Object<string, *>} properties Properties.\n * @param {number|string|undefined} id Feature id.\n */\n constructor(type, flatCoordinates, ends, stride, properties, id) {\n /**\n * @type {import(\"../style/Style.js\").StyleFunction|undefined}\n */\n this.styleFunction;\n\n /**\n * @private\n * @type {import(\"../extent.js\").Extent|undefined}\n */\n this.extent_;\n\n /**\n * @private\n * @type {number|string|undefined}\n */\n this.id_ = id;\n\n /**\n * @private\n * @type {Type}\n */\n this.type_ = type;\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.flatCoordinates_ = flatCoordinates;\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.flatInteriorPoints_ = null;\n\n /**\n * @private\n * @type {Array<number>}\n */\n this.flatMidpoints_ = null;\n\n /**\n * @private\n * @type {Array<number>|null}\n */\n this.ends_ = ends || null;\n\n /**\n * @private\n * @type {Object<string, *>}\n */\n this.properties_ = properties;\n\n /**\n * @private\n * @type {number}\n */\n this.squaredTolerance_;\n\n /**\n * @private\n * @type {number}\n */\n this.stride_ = stride;\n\n /**\n * @private\n * @type {RenderFeature}\n */\n this.simplifiedGeometry_;\n }\n\n /**\n * Get a feature property by its key.\n * @param {string} key Key\n * @return {*} Value for the requested key.\n * @api\n */\n get(key) {\n return this.properties_[key];\n }\n\n /**\n * Get the extent of this feature's geometry.\n * @return {import(\"../extent.js\").Extent} Extent.\n * @api\n */\n getExtent() {\n if (!this.extent_) {\n this.extent_ =\n this.type_ === 'Point'\n ? createOrUpdateFromCoordinate(this.flatCoordinates_)\n : createOrUpdateFromFlatCoordinates(\n this.flatCoordinates_,\n 0,\n this.flatCoordinates_.length,\n 2,\n );\n }\n return this.extent_;\n }\n\n /**\n * @return {Array<number>} Flat interior points.\n */\n getFlatInteriorPoint() {\n if (!this.flatInteriorPoints_) {\n const flatCenter = getCenter(this.getExtent());\n this.flatInteriorPoints_ = getInteriorPointOfArray(\n this.flatCoordinates_,\n 0,\n this.ends_,\n 2,\n flatCenter,\n 0,\n );\n }\n return this.flatInteriorPoints_;\n }\n\n /**\n * @return {Array<number>} Flat interior points.\n */\n getFlatInteriorPoints() {\n if (!this.flatInteriorPoints_) {\n const ends = inflateEnds(this.flatCoordinates_, this.ends_);\n const flatCenters = linearRingssCenter(this.flatCoordinates_, 0, ends, 2);\n this.flatInteriorPoints_ = getInteriorPointsOfMultiArray(\n this.flatCoordinates_,\n 0,\n ends,\n 2,\n flatCenters,\n );\n }\n return this.flatInteriorPoints_;\n }\n\n /**\n * @return {Array<number>} Flat midpoint.\n */\n getFlatMidpoint() {\n if (!this.flatMidpoints_) {\n this.flatMidpoints_ = interpolatePoint(\n this.flatCoordinates_,\n 0,\n this.flatCoordinates_.length,\n 2,\n 0.5,\n );\n }\n return this.flatMidpoints_;\n }\n\n /**\n * @return {Array<number>} Flat midpoints.\n */\n getFlatMidpoints() {\n if (!this.flatMidpoints_) {\n this.flatMidpoints_ = [];\n const flatCoordinates = this.flatCoordinates_;\n let offset = 0;\n const ends = /** @type {Array<number>} */ (this.ends_);\n for (let i = 0, ii = ends.length; i < ii; ++i) {\n const end = ends[i];\n const midpoint = interpolatePoint(flatCoordinates, offset, end, 2, 0.5);\n extend(this.flatMidpoints_, midpoint);\n offset = end;\n }\n }\n return this.flatMidpoints_;\n }\n\n /**\n * Get the feature identifier. This is a stable identifier for the feature and\n * is set when reading data from a remote source.\n * @return {number|string|undefined} Id.\n * @api\n */\n getId() {\n return this.id_;\n }\n\n /**\n * @return {Array<number>} Flat coordinates.\n */\n getOrientedFlatCoordinates() {\n return this.flatCoordinates_;\n }\n\n /**\n * For API compatibility with {@link module:ol/Feature~Feature}, this method is useful when\n * determining the geometry type in style function (see {@link #getType}).\n * @return {RenderFeature} Feature.\n * @api\n */\n getGeometry() {\n return this;\n }\n\n /**\n * @param {number} squaredTolerance Squared tolerance.\n * @return {RenderFeature} Simplified geometry.\n */\n getSimplifiedGeometry(squaredTolerance) {\n return this;\n }\n\n /**\n * Get a transformed and simplified version of the geometry.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"../proj.js\").TransformFunction} [transform] Optional transform function.\n * @return {RenderFeature} Simplified geometry.\n */\n simplifyTransformed(squaredTolerance, transform) {\n return this;\n }\n\n /**\n * Get the feature properties.\n * @return {Object<string, *>} Feature properties.\n * @api\n */\n getProperties() {\n return this.properties_;\n }\n\n /**\n * Get an object of all property names and values. This has the same behavior as getProperties,\n * but is here to conform with the {@link module:ol/Feature~Feature} interface.\n * @return {Object<string, *>?} Object.\n */\n getPropertiesInternal() {\n return this.properties_;\n }\n\n /**\n * @return {number} Stride.\n */\n getStride() {\n return this.stride_;\n }\n\n /**\n * @return {import('../style/Style.js').StyleFunction|undefined} Style\n */\n getStyleFunction() {\n return this.styleFunction;\n }\n\n /**\n * Get the type of this feature's geometry.\n * @return {Type} Geometry type.\n * @api\n */\n getType() {\n return this.type_;\n }\n\n /**\n * Transform geometry coordinates from tile pixel space to projected.\n *\n * @param {import(\"../proj.js\").ProjectionLike} projection The data projection\n */\n transform(projection) {\n projection = getProjection(projection);\n const pixelExtent = projection.getExtent();\n const projectedExtent = projection.getWorldExtent();\n if (pixelExtent && projectedExtent) {\n const scale = getHeight(projectedExtent) / getHeight(pixelExtent);\n composeTransform(\n tmpTransform,\n projectedExtent[0],\n projectedExtent[3],\n scale,\n -scale,\n 0,\n 0,\n 0,\n );\n transform2D(\n this.flatCoordinates_,\n 0,\n this.flatCoordinates_.length,\n 2,\n tmpTransform,\n this.flatCoordinates_,\n );\n }\n }\n\n /**\n * Apply a transform function to the coordinates of the geometry.\n * The geometry is modified in place.\n * If you do not want the geometry modified in place, first `clone()` it and\n * then use this function on the clone.\n * @param {import(\"../proj.js\").TransformFunction} transformFn Transform function.\n */\n applyTransform(transformFn) {\n transformFn(this.flatCoordinates_, this.flatCoordinates_, this.stride_);\n }\n\n /**\n * @return {RenderFeature} A cloned render feature.\n */\n clone() {\n return new RenderFeature(\n this.type_,\n this.flatCoordinates_.slice(),\n this.ends_?.slice(),\n this.stride_,\n Object.assign({}, this.properties_),\n this.id_,\n );\n }\n\n /**\n * @return {Array<number>|null} Ends.\n */\n getEnds() {\n return this.ends_;\n }\n\n /**\n * Add transform and resolution based geometry simplification to this instance.\n * @return {RenderFeature} This render feature.\n */\n enableSimplifyTransformed() {\n this.simplifyTransformed = memoizeOne((squaredTolerance, transform) => {\n if (squaredTolerance === this.squaredTolerance_) {\n return this.simplifiedGeometry_;\n }\n this.simplifiedGeometry_ = this.clone();\n if (transform) {\n this.simplifiedGeometry_.applyTransform(transform);\n }\n const simplifiedFlatCoordinates =\n this.simplifiedGeometry_.getFlatCoordinates();\n let simplifiedEnds;\n switch (this.type_) {\n case 'LineString':\n simplifiedFlatCoordinates.length = douglasPeucker(\n simplifiedFlatCoordinates,\n 0,\n this.simplifiedGeometry_.flatCoordinates_.length,\n this.simplifiedGeometry_.stride_,\n squaredTolerance,\n simplifiedFlatCoordinates,\n 0,\n );\n simplifiedEnds = [simplifiedFlatCoordinates.length];\n break;\n case 'MultiLineString':\n simplifiedEnds = [];\n simplifiedFlatCoordinates.length = douglasPeuckerArray(\n simplifiedFlatCoordinates,\n 0,\n this.simplifiedGeometry_.ends_,\n this.simplifiedGeometry_.stride_,\n squaredTolerance,\n simplifiedFlatCoordinates,\n 0,\n simplifiedEnds,\n );\n break;\n case 'Polygon':\n simplifiedEnds = [];\n simplifiedFlatCoordinates.length = quantizeArray(\n simplifiedFlatCoordinates,\n 0,\n this.simplifiedGeometry_.ends_,\n this.simplifiedGeometry_.stride_,\n Math.sqrt(squaredTolerance),\n simplifiedFlatCoordinates,\n 0,\n simplifiedEnds,\n );\n break;\n default:\n }\n if (simplifiedEnds) {\n this.simplifiedGeometry_ = new RenderFeature(\n this.type_,\n simplifiedFlatCoordinates,\n simplifiedEnds,\n 2,\n this.properties_,\n this.id_,\n );\n }\n this.squaredTolerance_ = squaredTolerance;\n return this.simplifiedGeometry_;\n });\n return this;\n }\n}\n\n/**\n * @return {Array<number>} Flat coordinates.\n */\nRenderFeature.prototype.getFlatCoordinates =\n RenderFeature.prototype.getOrientedFlatCoordinates;\n\n/**\n * Create a geometry from an `ol/render/Feature`\n * @param {RenderFeature} renderFeature\n * Render Feature\n * @return {Point|MultiPoint|LineString|MultiLineString|Polygon|MultiPolygon}\n * New geometry instance.\n * @api\n */\nexport function toGeometry(renderFeature) {\n const geometryType = renderFeature.getType();\n switch (geometryType) {\n case 'Point':\n return new Point(renderFeature.getFlatCoordinates());\n case 'MultiPoint':\n return new MultiPoint(renderFeature.getFlatCoordinates(), 'XY');\n case 'LineString':\n return new LineString(renderFeature.getFlatCoordinates(), 'XY');\n case 'MultiLineString':\n return new MultiLineString(\n renderFeature.getFlatCoordinates(),\n 'XY',\n /** @type {Array<number>} */ (renderFeature.getEnds()),\n );\n case 'Polygon':\n const flatCoordinates = renderFeature.getFlatCoordinates();\n const ends = renderFeature.getEnds();\n const endss = inflateEnds(flatCoordinates, ends);\n return endss.length > 1\n ? new MultiPolygon(flatCoordinates, 'XY', endss)\n : new Polygon(flatCoordinates, 'XY', ends);\n default:\n throw new Error('Invalid geometry type:' + geometryType);\n }\n}\n\n/**\n * Create an `ol/Feature` from an `ol/render/Feature`\n * @param {RenderFeature} renderFeature RenderFeature\n * @param {string} [geometryName] Geometry name to use\n * when creating the Feature.\n * @return {Feature} Newly constructed `ol/Feature` with properties,\n * geometry, and id copied over.\n * @api\n */\nexport function toFeature(renderFeature, geometryName) {\n const id = renderFeature.getId();\n const geometry = toGeometry(renderFeature);\n const properties = renderFeature.getProperties();\n const feature = new Feature();\n if (geometryName !== undefined) {\n feature.setGeometryName(geometryName);\n }\n feature.setGeometry(geometry);\n if (id !== undefined) {\n feature.setId(id);\n }\n feature.setProperties(properties, true);\n return feature;\n}\n\nexport default RenderFeature;\n", "/**\n * @module ol/structs/RBush\n */\nimport RBush_ from 'rbush';\nimport {createOrUpdate, equals} from '../extent.js';\nimport {isEmpty} from '../obj.js';\nimport {getUid} from '../util.js';\n\n/**\n * @typedef {import(\"rbush\").BBox & {value: T}} Entry\n * @template T\n */\n\n/**\n * @classdesc\n * Wrapper around the RBush by Vladimir Agafonkin.\n * See https://github.com/mourner/rbush.\n *\n * @template {Object} T\n */\nclass RBush {\n /**\n * @param {number} [maxEntries] Max entries.\n */\n constructor(maxEntries) {\n /**\n * @private\n * @type {RBush_<Entry<T>>}\n */\n this.rbush_ = new RBush_(maxEntries);\n\n /**\n * A mapping between the objects added to this rbush wrapper\n * and the objects that are actually added to the internal rbush.\n * @private\n * @type {Object<string, Entry<T>>}\n */\n this.items_ = {};\n }\n\n /**\n * Insert a value into the RBush.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {T} value Value.\n */\n insert(extent, value) {\n /** @type {Entry<T>} */\n const item = {\n minX: extent[0],\n minY: extent[1],\n maxX: extent[2],\n maxY: extent[3],\n value: value,\n };\n\n this.rbush_.insert(item);\n this.items_[getUid(value)] = item;\n }\n\n /**\n * Bulk-insert values into the RBush.\n * @param {Array<import(\"../extent.js\").Extent>} extents Extents.\n * @param {Array<T>} values Values.\n */\n load(extents, values) {\n const items = new Array(values.length);\n for (let i = 0, l = values.length; i < l; i++) {\n const extent = extents[i];\n const value = values[i];\n\n /** @type {Entry<T>} */\n const item = {\n minX: extent[0],\n minY: extent[1],\n maxX: extent[2],\n maxY: extent[3],\n value: value,\n };\n items[i] = item;\n this.items_[getUid(value)] = item;\n }\n this.rbush_.load(items);\n }\n\n /**\n * Remove a value from the RBush.\n * @param {T} value Value.\n * @return {boolean} Removed.\n */\n remove(value) {\n const uid = getUid(value);\n\n // get the object in which the value was wrapped when adding to the\n // internal rbush. then use that object to do the removal.\n const item = this.items_[uid];\n delete this.items_[uid];\n return this.rbush_.remove(item) !== null;\n }\n\n /**\n * Update the extent of a value in the RBush.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {T} value Value.\n */\n update(extent, value) {\n const item = this.items_[getUid(value)];\n const bbox = [item.minX, item.minY, item.maxX, item.maxY];\n if (!equals(bbox, extent)) {\n this.remove(value);\n this.insert(extent, value);\n }\n }\n\n /**\n * Return all values in the RBush.\n * @return {Array<T>} All.\n */\n getAll() {\n const items = this.rbush_.all();\n return items.map(function (item) {\n return item.value;\n });\n }\n\n /**\n * Return all values in the given extent.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {Array<T>} All in extent.\n */\n getInExtent(extent) {\n /** @type {import(\"rbush\").BBox} */\n const bbox = {\n minX: extent[0],\n minY: extent[1],\n maxX: extent[2],\n maxY: extent[3],\n };\n const items = this.rbush_.search(bbox);\n return items.map(function (item) {\n return item.value;\n });\n }\n\n /**\n * Calls a callback function with each value in the tree.\n * If the callback returns a truthy value, this value is returned without\n * checking the rest of the tree.\n * @param {function(T): R} callback Callback.\n * @return {R|undefined} Callback return value.\n * @template R\n */\n forEach(callback) {\n return this.forEach_(this.getAll(), callback);\n }\n\n /**\n * Calls a callback function with each value in the provided extent.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {function(T): R} callback Callback.\n * @return {R|undefined} Callback return value.\n * @template R\n */\n forEachInExtent(extent, callback) {\n return this.forEach_(this.getInExtent(extent), callback);\n }\n\n /**\n * @param {Array<T>} values Values.\n * @param {function(T): R} callback Callback.\n * @return {R|undefined} Callback return value.\n * @template R\n * @private\n */\n forEach_(values, callback) {\n let result;\n for (let i = 0, l = values.length; i < l; i++) {\n result = callback(values[i]);\n if (result) {\n return result;\n }\n }\n return result;\n }\n\n /**\n * @return {boolean} Is empty.\n */\n isEmpty() {\n return isEmpty(this.items_);\n }\n\n /**\n * Remove all values from the RBush.\n */\n clear() {\n this.rbush_.clear();\n this.items_ = {};\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} [extent] Extent.\n * @return {import(\"../extent.js\").Extent} Extent.\n */\n getExtent(extent) {\n const data = this.rbush_.toJSON();\n return createOrUpdate(data.minX, data.minY, data.maxX, data.maxY, extent);\n }\n\n /**\n * @param {RBush<T>} rbush R-Tree.\n */\n concat(rbush) {\n this.rbush_.load(rbush.rbush_.all());\n for (const i in rbush.items_) {\n this.items_[i] = rbush.items_[i];\n }\n }\n}\n\nexport default RBush;\n", "/**\n * @module ol/source/VectorEventType\n */\n\n/**\n * @enum {string}\n */\nexport default {\n /**\n * Triggered when a feature is added to the source.\n * @event module:ol/source/Vector.VectorSourceEvent#addfeature\n * @api\n */\n ADDFEATURE: 'addfeature',\n\n /**\n * Triggered when a feature is updated.\n * @event module:ol/source/Vector.VectorSourceEvent#changefeature\n * @api\n */\n CHANGEFEATURE: 'changefeature',\n\n /**\n * Triggered when the clear method is called on the source.\n * @event module:ol/source/Vector.VectorSourceEvent#clear\n * @api\n */\n CLEAR: 'clear',\n\n /**\n * Triggered when a feature is removed from the source.\n * See {@link module:ol/source/Vector~VectorSource#clear source.clear()} for exceptions.\n * @event module:ol/source/Vector.VectorSourceEvent#removefeature\n * @api\n */\n REMOVEFEATURE: 'removefeature',\n\n /**\n * Triggered when features starts loading.\n * @event module:ol/source/Vector.VectorSourceEvent#featuresloadstart\n * @api\n */\n FEATURESLOADSTART: 'featuresloadstart',\n\n /**\n * Triggered when features finishes loading.\n * @event module:ol/source/Vector.VectorSourceEvent#featuresloadend\n * @api\n */\n FEATURESLOADEND: 'featuresloadend',\n\n /**\n * Triggered if feature loading results in an error.\n * @event module:ol/source/Vector.VectorSourceEvent#featuresloaderror\n * @api\n */\n FEATURESLOADERROR: 'featuresloaderror',\n};\n\n/**\n * @typedef {'addfeature'|'changefeature'|'clear'|'removefeature'|'featuresloadstart'|'featuresloadend'|'featuresloaderror'} VectorSourceEventTypes\n */\n", "/**\n * @module ol/source/Vector\n */\n\nimport Collection from '../Collection.js';\nimport CollectionEventType from '../CollectionEventType.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport {extend} from '../array.js';\nimport {assert} from '../asserts.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport {listen, unlistenByKey} from '../events.js';\nimport {containsExtent, equals, wrapAndSliceX} from '../extent.js';\nimport {xhr} from '../featureloader.js';\nimport {TRUE, VOID} from '../functions.js';\nimport {all as allStrategy} from '../loadingstrategy.js';\nimport {isEmpty} from '../obj.js';\nimport RenderFeature from '../render/Feature.js';\nimport RBush from '../structs/RBush.js';\nimport {getUid} from '../util.js';\nimport Source from './Source.js';\nimport VectorEventType from './VectorEventType.js';\n\n/**\n * A function that takes an {@link module:ol/extent~Extent} and a resolution as arguments, and\n * returns an array of {@link module:ol/extent~Extent} with the extents to load. Usually this\n * is one of the standard {@link module:ol/loadingstrategy} strategies.\n *\n * @typedef {function(import(\"../extent.js\").Extent, number, import(\"../proj/Projection.js\").default): Array<import(\"../extent.js\").Extent>} LoadingStrategy\n * @api\n */\n\n/**\n * @classdesc\n * Events emitted by {@link module:ol/source/Vector~VectorSource} instances are instances of this\n * type.\n * @template {import(\"../Feature.js\").FeatureLike} [FeatureType=import(\"../Feature.js\").default]\n */\nexport class VectorSourceEvent extends Event {\n /**\n * @param {string} type Type.\n * @param {FeatureType} [feature] Feature.\n * @param {Array<FeatureType>} [features] Features.\n */\n constructor(type, feature, features) {\n super(type);\n\n /**\n * The added or removed feature for the `ADDFEATURE` and `REMOVEFEATURE` events, `undefined` otherwise.\n * @type {FeatureType|undefined}\n * @api\n */\n this.feature = feature;\n\n /**\n * The loaded features for the `FEATURESLOADED` event, `undefined` otherwise.\n * @type {Array<FeatureType>|undefined}\n * @api\n */\n this.features = features;\n }\n}\n\n/***\n * @template {import(\"../Feature.js\").FeatureLike} [T=import(\"../Feature.js\").default]\n * @typedef {T extends RenderFeature ? T|Array<T> : T} FeatureClassOrArrayOfRenderFeatures\n */\n\n/***\n * @template Return\n * @template {import(\"../Feature.js\").FeatureLike} [FeatureType=import(\"../Feature.js\").default]\n * @typedef {import(\"../Observable\").OnSignature<import(\"../Observable\").EventTypes, import(\"../events/Event.js\").default, Return> &\n * import(\"../Observable\").OnSignature<import(\"../ObjectEventType\").Types, import(\"../Object\").ObjectEvent, Return> &\n * import(\"../Observable\").OnSignature<import(\"./VectorEventType\").VectorSourceEventTypes, VectorSourceEvent<FeatureType>, Return> &\n * import(\"../Observable\").CombinedOnSignature<import(\"../Observable\").EventTypes|import(\"../ObjectEventType\").Types|\n * import(\"./VectorEventType\").VectorSourceEventTypes, Return>} VectorSourceOnSignature\n */\n\n/**\n * @template {import(\"../Feature.js\").FeatureLike} [FeatureType=import(\"../Feature.js\").default]\n * @typedef {Object} Options\n * @property {import(\"./Source.js\").AttributionLike} [attributions] Attributions.\n * @property {Array<FeatureType>|Collection<FeatureType>} [features]\n * Features. If provided as {@link module:ol/Collection~Collection}, the features in the source\n * and the collection will stay in sync.\n * @property {import(\"../format/Feature.js\").default<FeatureType>} [format] The feature format used by the XHR\n * feature loader when `url` is set. Required if `url` is set, otherwise ignored.\n * @property {import(\"../featureloader.js\").FeatureLoader<FeatureType>} [loader]\n * The loader function used to load features, from a remote source for example.\n * If this is not set and `url` is set, the source will create and use an XHR\n * feature loader. The `'featuresloadend'` and `'featuresloaderror'` events\n * will only fire if the `success` and `failure` callbacks are used.\n *\n * Example:\n *\n * ```js\n * import Vector from 'ol/source/Vector.js';\n * import GeoJSON from 'ol/format/GeoJSON.js';\n * import {bbox} from 'ol/loadingstrategy.js';\n *\n * const vectorSource = new Vector({\n * format: new GeoJSON(),\n * loader: function(extent, resolution, projection, success, failure) {\n * const proj = projection.getCode();\n * const url = 'https://ahocevar.com/geoserver/wfs?service=WFS&' +\n * 'version=1.1.0&request=GetFeature&typename=osm:water_areas&' +\n * 'outputFormat=application/json&srsname=' + proj + '&' +\n * 'bbox=' + extent.join(',') + ',' + proj;\n * const xhr = new XMLHttpRequest();\n * xhr.open('GET', url);\n * const onError = function() {\n * vectorSource.removeLoadedExtent(extent);\n * failure();\n * }\n * xhr.onerror = onError;\n * xhr.onload = function() {\n * if (xhr.status == 200) {\n * const features = vectorSource.getFormat().readFeatures(xhr.responseText);\n * vectorSource.addFeatures(features);\n * success(features);\n * } else {\n * onError();\n * }\n * }\n * xhr.send();\n * },\n * strategy: bbox,\n * });\n * ```\n * @property {boolean} [overlaps=true] This source may have overlapping geometries.\n * Setting this to `false` (e.g. for sources with polygons that represent administrative\n * boundaries or TopoJSON sources) allows the renderer to optimise fill and\n * stroke operations.\n * @property {LoadingStrategy} [strategy] The loading strategy to use.\n * By default an {@link module:ol/loadingstrategy.all}\n * strategy is used, a one-off strategy which loads all features at once.\n * @property {string|import(\"../featureloader.js\").FeatureUrlFunction} [url]\n * Setting this option instructs the source to load features using an XHR loader\n * (see {@link module:ol/featureloader.xhr}). Use a `string` and an\n * {@link module:ol/loadingstrategy.all} for a one-off download of all features from\n * the given URL. Use a {@link module:ol/featureloader~FeatureUrlFunction} to generate the url with\n * other loading strategies.\n * Requires `format` to be set as well.\n * When default XHR feature loader is provided, the features will\n * be transformed from the data projection to the view projection\n * during parsing. If your remote data source does not advertise its projection\n * properly, this transformation will be incorrect. For some formats, the\n * default projection (usually EPSG:4326) can be overridden by setting the\n * dataProjection constructor option on the format.\n * Note that if a source contains non-feature data, such as a GeoJSON geometry\n * or a KML NetworkLink, these will be ignored. Use a custom loader to load these.\n * @property {boolean} [useSpatialIndex=true]\n * By default, an RTree is used as spatial index. When features are removed and\n * added frequently, and the total number of features is low, setting this to\n * `false` may improve performance.\n *\n * Note that\n * {@link module:ol/source/Vector~VectorSource#getFeaturesInExtent},\n * {@link module:ol/source/Vector~VectorSource#getClosestFeatureToCoordinate} and\n * {@link module:ol/source/Vector~VectorSource#getExtent} cannot be used when `useSpatialIndex` is\n * set to `false`, and {@link module:ol/source/Vector~VectorSource#forEachFeatureInExtent} will loop\n * through all features.\n *\n * When set to `false`, the features will be maintained in an\n * {@link module:ol/Collection~Collection}, which can be retrieved through\n * {@link module:ol/source/Vector~VectorSource#getFeaturesCollection}.\n * @property {boolean} [wrapX=true] Wrap the world horizontally. For vector editing across the\n * -180\u00B0 and 180\u00B0 meridians to work properly, this should be set to `false`. The\n * resulting geometry coordinates will then exceed the world bounds.\n */\n\n/**\n * @classdesc\n * Provides a source of features for vector layers. Vector features provided\n * by this source are suitable for editing. See {@link module:ol/source/VectorTile~VectorTile} for\n * vector data that is optimized for rendering.\n *\n * @fires VectorSourceEvent\n * @api\n * @template {import(\"../Feature.js\").FeatureLike} [FeatureType=import(\"../Feature.js\").default]\n */\nclass VectorSource extends Source {\n /**\n * @param {Options<FeatureType>} [options] Vector source options.\n */\n constructor(options) {\n options = options || {};\n\n super({\n attributions: options.attributions,\n interpolate: true,\n projection: undefined,\n state: 'ready',\n wrapX: options.wrapX !== undefined ? options.wrapX : true,\n });\n\n /***\n * @type {VectorSourceOnSignature<import(\"../events\").EventsKey, FeatureType>}\n */\n this.on;\n\n /***\n * @type {VectorSourceOnSignature<import(\"../events\").EventsKey, FeatureType>}\n */\n this.once;\n\n /***\n * @type {VectorSourceOnSignature<void>}\n */\n this.un;\n\n /**\n * @private\n * @type {import(\"../featureloader.js\").FeatureLoader<import(\"../Feature.js\").FeatureLike>}\n */\n this.loader_ = VOID;\n\n /**\n * @private\n * @type {import(\"../format/Feature.js\").default<FeatureType>|null}\n */\n this.format_ = options.format || null;\n\n /**\n * @private\n * @type {boolean}\n */\n this.overlaps_ = options.overlaps === undefined ? true : options.overlaps;\n\n /**\n * @private\n * @type {string|import(\"../featureloader.js\").FeatureUrlFunction|undefined}\n */\n this.url_ = options.url;\n\n if (options.loader !== undefined) {\n this.loader_ = options.loader;\n } else if (this.url_ !== undefined) {\n assert(this.format_, '`format` must be set when `url` is set');\n // create a XHR feature loader for \"url\" and \"format\"\n this.loader_ = xhr(this.url_, this.format_);\n }\n\n /**\n * @private\n * @type {LoadingStrategy}\n */\n this.strategy_ =\n options.strategy !== undefined ? options.strategy : allStrategy;\n\n const useSpatialIndex =\n options.useSpatialIndex !== undefined ? options.useSpatialIndex : true;\n\n /**\n * @private\n * @type {RBush<FeatureType>}\n */\n this.featuresRtree_ = useSpatialIndex ? new RBush() : null;\n\n /**\n * @private\n * @type {RBush<{extent: import(\"../extent.js\").Extent}>}\n */\n this.loadedExtentsRtree_ = new RBush();\n\n /**\n * @type {number}\n * @private\n */\n this.loadingExtentsCount_ = 0;\n\n /**\n * @private\n * @type {!Object<string, FeatureType>}\n */\n this.nullGeometryFeatures_ = {};\n\n /**\n * A lookup of features by id (the return from feature.getId()).\n * @private\n * @type {!Object<string, import('../Feature.js').FeatureLike|Array<import('../Feature.js').FeatureLike>>}\n */\n this.idIndex_ = {};\n\n /**\n * A lookup of features by uid (using getUid(feature)).\n * @private\n * @type {!Object<string, FeatureType>}\n */\n this.uidIndex_ = {};\n\n /**\n * @private\n * @type {Object<string, Array<import(\"../events.js\").EventsKey>>}\n */\n this.featureChangeKeys_ = {};\n\n /**\n * @private\n * @type {Collection<FeatureType>|null}\n */\n this.featuresCollection_ = null;\n\n /** @type {Collection<FeatureType>} */\n let collection;\n /** @type {Array<FeatureType>} */\n let features;\n if (Array.isArray(options.features)) {\n features = options.features;\n } else if (options.features) {\n collection = options.features;\n features = collection.getArray();\n }\n if (!useSpatialIndex && collection === undefined) {\n collection = new Collection(features);\n }\n if (features !== undefined) {\n this.addFeaturesInternal(features);\n }\n if (collection !== undefined) {\n this.bindFeaturesCollection_(collection);\n }\n }\n\n /**\n * Add a single feature to the source. If you want to add a batch of features\n * at once, call {@link module:ol/source/Vector~VectorSource#addFeatures #addFeatures()}\n * instead. A feature will not be added to the source if feature with\n * the same id is already there. The reason for this behavior is to avoid\n * feature duplication when using bbox or tile loading strategies.\n * Note: this also applies if a {@link module:ol/Collection~Collection} is used for features,\n * meaning that if a feature with a duplicate id is added in the collection, it will\n * be removed from it right away.\n * @param {FeatureType} feature Feature to add.\n * @api\n */\n addFeature(feature) {\n this.addFeatureInternal(feature);\n this.changed();\n }\n\n /**\n * Add a feature without firing a `change` event.\n * @param {FeatureType} feature Feature.\n * @protected\n */\n addFeatureInternal(feature) {\n const featureKey = getUid(feature);\n\n if (!this.addToIndex_(featureKey, feature)) {\n if (this.featuresCollection_) {\n this.featuresCollection_.remove(feature);\n }\n return;\n }\n\n this.setupChangeEvents_(featureKey, feature);\n\n const geometry = feature.getGeometry();\n if (geometry) {\n const extent = geometry.getExtent();\n if (this.featuresRtree_) {\n this.featuresRtree_.insert(extent, feature);\n }\n } else {\n this.nullGeometryFeatures_[featureKey] = feature;\n }\n\n this.dispatchEvent(\n new VectorSourceEvent(VectorEventType.ADDFEATURE, feature),\n );\n }\n\n /**\n * @param {string} featureKey Unique identifier for the feature.\n * @param {FeatureType} feature The feature.\n * @private\n */\n setupChangeEvents_(featureKey, feature) {\n if (feature instanceof RenderFeature) {\n return;\n }\n this.featureChangeKeys_[featureKey] = [\n listen(feature, EventType.CHANGE, this.handleFeatureChange_, this),\n listen(\n feature,\n ObjectEventType.PROPERTYCHANGE,\n this.handleFeatureChange_,\n this,\n ),\n ];\n }\n\n /**\n * @param {string} featureKey Unique identifier for the feature.\n * @param {FeatureType} feature The feature.\n * @return {boolean} The feature is \"valid\", in the sense that it is also a\n * candidate for insertion into the Rtree.\n * @private\n */\n addToIndex_(featureKey, feature) {\n let valid = true;\n if (feature.getId() !== undefined) {\n const id = String(feature.getId());\n if (!(id in this.idIndex_)) {\n this.idIndex_[id] = feature;\n } else if (feature instanceof RenderFeature) {\n const indexedFeature = this.idIndex_[id];\n if (!(indexedFeature instanceof RenderFeature)) {\n valid = false;\n } else if (!Array.isArray(indexedFeature)) {\n this.idIndex_[id] = [indexedFeature, feature];\n } else {\n indexedFeature.push(feature);\n }\n } else {\n valid = false;\n }\n }\n if (valid) {\n assert(\n !(featureKey in this.uidIndex_),\n 'The passed `feature` was already added to the source',\n );\n this.uidIndex_[featureKey] = feature;\n }\n return valid;\n }\n\n /**\n * Add a batch of features to the source.\n * @param {Array<FeatureType>} features Features to add.\n * @api\n */\n addFeatures(features) {\n this.addFeaturesInternal(features);\n this.changed();\n }\n\n /**\n * Add features without firing a `change` event.\n * @param {Array<FeatureType>} features Features.\n * @protected\n */\n addFeaturesInternal(features) {\n const extents = [];\n /** @type {Array<FeatureType>} */\n const newFeatures = [];\n /** @type {Array<FeatureType>} */\n const geometryFeatures = [];\n\n for (let i = 0, length = features.length; i < length; i++) {\n const feature = features[i];\n const featureKey = getUid(feature);\n if (this.addToIndex_(featureKey, feature)) {\n newFeatures.push(feature);\n }\n }\n\n for (let i = 0, length = newFeatures.length; i < length; i++) {\n const feature = newFeatures[i];\n const featureKey = getUid(feature);\n this.setupChangeEvents_(featureKey, feature);\n\n const geometry = feature.getGeometry();\n if (geometry) {\n const extent = geometry.getExtent();\n extents.push(extent);\n geometryFeatures.push(feature);\n } else {\n this.nullGeometryFeatures_[featureKey] = feature;\n }\n }\n if (this.featuresRtree_) {\n this.featuresRtree_.load(extents, geometryFeatures);\n }\n\n if (this.hasListener(VectorEventType.ADDFEATURE)) {\n for (let i = 0, length = newFeatures.length; i < length; i++) {\n this.dispatchEvent(\n new VectorSourceEvent(VectorEventType.ADDFEATURE, newFeatures[i]),\n );\n }\n }\n }\n\n /**\n * @param {!Collection<FeatureType>} collection Collection.\n * @private\n */\n bindFeaturesCollection_(collection) {\n let modifyingCollection = false;\n this.addEventListener(\n VectorEventType.ADDFEATURE,\n /**\n * @param {VectorSourceEvent<FeatureType>} evt The vector source event\n */\n function (evt) {\n if (!modifyingCollection) {\n modifyingCollection = true;\n collection.push(evt.feature);\n modifyingCollection = false;\n }\n },\n );\n this.addEventListener(\n VectorEventType.REMOVEFEATURE,\n /**\n * @param {VectorSourceEvent<FeatureType>} evt The vector source event\n */\n function (evt) {\n if (!modifyingCollection) {\n modifyingCollection = true;\n collection.remove(evt.feature);\n modifyingCollection = false;\n }\n },\n );\n collection.addEventListener(\n CollectionEventType.ADD,\n /**\n * @param {import(\"../Collection.js\").CollectionEvent<FeatureType>} evt The collection event\n */\n (evt) => {\n if (!modifyingCollection) {\n modifyingCollection = true;\n this.addFeature(evt.element);\n modifyingCollection = false;\n }\n },\n );\n collection.addEventListener(\n CollectionEventType.REMOVE,\n /**\n * @param {import(\"../Collection.js\").CollectionEvent<FeatureType>} evt The collection event\n */\n (evt) => {\n if (!modifyingCollection) {\n modifyingCollection = true;\n this.removeFeature(evt.element);\n modifyingCollection = false;\n }\n },\n );\n this.featuresCollection_ = collection;\n }\n\n /**\n * Remove all features from the source.\n * @param {boolean} [fast] Skip dispatching of {@link module:ol/source/Vector.VectorSourceEvent#event:removefeature} events.\n * @api\n */\n clear(fast) {\n if (fast) {\n for (const featureId in this.featureChangeKeys_) {\n const keys = this.featureChangeKeys_[featureId];\n keys.forEach(unlistenByKey);\n }\n if (!this.featuresCollection_) {\n this.featureChangeKeys_ = {};\n this.idIndex_ = {};\n this.uidIndex_ = {};\n }\n } else {\n if (this.featuresRtree_) {\n this.featuresRtree_.forEach((feature) => {\n this.removeFeatureInternal(feature);\n });\n for (const id in this.nullGeometryFeatures_) {\n this.removeFeatureInternal(this.nullGeometryFeatures_[id]);\n }\n }\n }\n if (this.featuresCollection_) {\n this.featuresCollection_.clear();\n }\n\n if (this.featuresRtree_) {\n this.featuresRtree_.clear();\n }\n this.nullGeometryFeatures_ = {};\n\n const clearEvent = new VectorSourceEvent(VectorEventType.CLEAR);\n this.dispatchEvent(clearEvent);\n this.changed();\n }\n\n /**\n * Iterate through all features on the source, calling the provided callback\n * with each one. If the callback returns any \"truthy\" value, iteration will\n * stop and the function will return the same value.\n * Note: this function only iterate through the feature that have a defined geometry.\n *\n * @param {function(FeatureType): T} callback Called with each feature\n * on the source. Return a truthy value to stop iteration.\n * @return {T|undefined} The return value from the last call to the callback.\n * @template T\n * @api\n */\n forEachFeature(callback) {\n if (this.featuresRtree_) {\n return this.featuresRtree_.forEach(callback);\n }\n if (this.featuresCollection_) {\n this.featuresCollection_.forEach(callback);\n }\n }\n\n /**\n * Iterate through all features whose geometries contain the provided\n * coordinate, calling the callback with each feature. If the callback returns\n * a \"truthy\" value, iteration will stop and the function will return the same\n * value.\n *\n * For {@link module:ol/render/Feature~RenderFeature} features, the callback will be\n * called for all features.\n *\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {function(FeatureType): T} callback Called with each feature\n * whose goemetry contains the provided coordinate.\n * @return {T|undefined} The return value from the last call to the callback.\n * @template T\n */\n forEachFeatureAtCoordinateDirect(coordinate, callback) {\n const extent = [coordinate[0], coordinate[1], coordinate[0], coordinate[1]];\n return this.forEachFeatureInExtent(extent, function (feature) {\n const geometry = feature.getGeometry();\n if (\n geometry instanceof RenderFeature ||\n geometry.intersectsCoordinate(coordinate)\n ) {\n return callback(feature);\n }\n return undefined;\n });\n }\n\n /**\n * Iterate through all features whose bounding box intersects the provided\n * extent (note that the feature's geometry may not intersect the extent),\n * calling the callback with each feature. If the callback returns a \"truthy\"\n * value, iteration will stop and the function will return the same value.\n *\n * If you are interested in features whose geometry intersects an extent, call\n * the {@link module:ol/source/Vector~VectorSource#forEachFeatureIntersectingExtent #forEachFeatureIntersectingExtent()} method instead.\n *\n * When `useSpatialIndex` is set to false, this method will loop through all\n * features, equivalent to {@link module:ol/source/Vector~VectorSource#forEachFeature #forEachFeature()}.\n *\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {function(FeatureType): T} callback Called with each feature\n * whose bounding box intersects the provided extent.\n * @return {T|undefined} The return value from the last call to the callback.\n * @template T\n * @api\n */\n forEachFeatureInExtent(extent, callback) {\n if (this.featuresRtree_) {\n return this.featuresRtree_.forEachInExtent(extent, callback);\n }\n if (this.featuresCollection_) {\n this.featuresCollection_.forEach(callback);\n }\n }\n\n /**\n * Iterate through all features whose geometry intersects the provided extent,\n * calling the callback with each feature. If the callback returns a \"truthy\"\n * value, iteration will stop and the function will return the same value.\n *\n * If you only want to test for bounding box intersection, call the\n * {@link module:ol/source/Vector~VectorSource#forEachFeatureInExtent #forEachFeatureInExtent()} method instead.\n *\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {function(FeatureType): T} callback Called with each feature\n * whose geometry intersects the provided extent.\n * @return {T|undefined} The return value from the last call to the callback.\n * @template T\n * @api\n */\n forEachFeatureIntersectingExtent(extent, callback) {\n return this.forEachFeatureInExtent(\n extent,\n /**\n * @param {FeatureType} feature Feature.\n * @return {T|undefined} The return value from the last call to the callback.\n */\n function (feature) {\n const geometry = feature.getGeometry();\n if (\n geometry instanceof RenderFeature ||\n geometry.intersectsExtent(extent)\n ) {\n const result = callback(feature);\n if (result) {\n return result;\n }\n }\n },\n );\n }\n\n /**\n * Get the features collection associated with this source. Will be `null`\n * unless the source was configured with `useSpatialIndex` set to `false`, or\n * with a {@link module:ol/Collection~Collection} as `features`.\n * @return {Collection<FeatureType>|null} The collection of features.\n * @api\n */\n getFeaturesCollection() {\n return this.featuresCollection_;\n }\n\n /**\n * Get a snapshot of the features currently on the source in random order. The returned array\n * is a copy, the features are references to the features in the source.\n * @return {Array<FeatureType>} Features.\n * @api\n */\n getFeatures() {\n let features;\n if (this.featuresCollection_) {\n features = this.featuresCollection_.getArray().slice(0);\n } else if (this.featuresRtree_) {\n features = this.featuresRtree_.getAll();\n if (!isEmpty(this.nullGeometryFeatures_)) {\n extend(features, Object.values(this.nullGeometryFeatures_));\n }\n }\n return features;\n }\n\n /**\n * Get all features whose geometry intersects the provided coordinate.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @return {Array<FeatureType>} Features.\n * @api\n */\n getFeaturesAtCoordinate(coordinate) {\n /** @type {Array<FeatureType>} */\n const features = [];\n this.forEachFeatureAtCoordinateDirect(coordinate, function (feature) {\n features.push(feature);\n });\n return features;\n }\n\n /**\n * Get all features whose bounding box intersects the provided extent. Note that this returns an array of\n * all features intersecting the given extent in random order (so it may include\n * features whose geometries do not intersect the extent).\n *\n * When `useSpatialIndex` is set to false, this method will return all\n * features.\n *\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {import(\"../proj/Projection.js\").default} [projection] Include features\n * where `extent` exceeds the x-axis bounds of `projection` and wraps around the world.\n * @return {Array<FeatureType>} Features.\n * @api\n */\n getFeaturesInExtent(extent, projection) {\n if (this.featuresRtree_) {\n const multiWorld = projection && projection.canWrapX() && this.getWrapX();\n\n if (!multiWorld) {\n return this.featuresRtree_.getInExtent(extent);\n }\n\n const extents = wrapAndSliceX(extent, projection);\n\n return [].concat(\n ...extents.map((anExtent) => this.featuresRtree_.getInExtent(anExtent)),\n );\n }\n if (this.featuresCollection_) {\n return this.featuresCollection_.getArray().slice(0);\n }\n return [];\n }\n\n /**\n * Get the closest feature to the provided coordinate.\n *\n * This method is not available when the source is configured with\n * `useSpatialIndex` set to `false` and the features in this source are of type\n * {@link module:ol/Feature~Feature}.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @param {function(FeatureType):boolean} [filter] Feature filter function.\n * The filter function will receive one argument, the {@link module:ol/Feature~Feature feature}\n * and it should return a boolean value. By default, no filtering is made.\n * @return {FeatureType|null} Closest feature (or `null` if none found).\n * @api\n */\n getClosestFeatureToCoordinate(coordinate, filter) {\n // Find the closest feature using branch and bound. We start searching an\n // infinite extent, and find the distance from the first feature found. This\n // becomes the closest feature. We then compute a smaller extent which any\n // closer feature must intersect. We continue searching with this smaller\n // extent, trying to find a closer feature. Every time we find a closer\n // feature, we update the extent being searched so that any even closer\n // feature must intersect it. We continue until we run out of features.\n const x = coordinate[0];\n const y = coordinate[1];\n let closestFeature = null;\n const closestPoint = [NaN, NaN];\n let minSquaredDistance = Infinity;\n const extent = [-Infinity, -Infinity, Infinity, Infinity];\n filter = filter ? filter : TRUE;\n this.featuresRtree_.forEachInExtent(\n extent,\n /**\n * @param {FeatureType} feature Feature.\n */\n function (feature) {\n if (filter(feature)) {\n const geometry = feature.getGeometry();\n const previousMinSquaredDistance = minSquaredDistance;\n minSquaredDistance =\n geometry instanceof RenderFeature\n ? 0\n : geometry.closestPointXY(x, y, closestPoint, minSquaredDistance);\n if (minSquaredDistance < previousMinSquaredDistance) {\n closestFeature = feature;\n // This is sneaky. Reduce the extent that it is currently being\n // searched while the R-Tree traversal using this same extent object\n // is still in progress. This is safe because the new extent is\n // strictly contained by the old extent.\n const minDistance = Math.sqrt(minSquaredDistance);\n extent[0] = x - minDistance;\n extent[1] = y - minDistance;\n extent[2] = x + minDistance;\n extent[3] = y + minDistance;\n }\n }\n },\n );\n return closestFeature;\n }\n\n /**\n * Get the extent of the features currently in the source.\n *\n * This will return `null` when the source is configured with\n * `useSpatialIndex` set to `false`.\n * @param {import(\"../extent.js\").Extent} [extent] Destination extent. If provided, no new extent\n * will be created. Instead, that extent's coordinates will be overwritten.\n * @return {import(\"../extent.js\").Extent | null} Extent.\n * @api\n */\n getExtent(extent) {\n return this.featuresRtree_?.getExtent(extent) ?? null;\n }\n\n /**\n * Get a feature by its identifier (the value returned by feature.getId()). When `RenderFeature`s\n * are used, `getFeatureById()` can return an array of `RenderFeature`s. This allows for handling\n * of `GeometryCollection` geometries, where format readers create one `RenderFeature` per\n * `GeometryCollection` member.\n * Note that the index treats string and numeric identifiers as the same. So\n * `source.getFeatureById(2)` will return a feature with id `'2'` or `2`.\n *\n * @param {string|number} id Feature identifier.\n * @return {FeatureClassOrArrayOfRenderFeatures<FeatureType>|null} The feature (or `null` if not found).\n * @api\n */\n getFeatureById(id) {\n const feature = this.idIndex_[id.toString()];\n return feature !== undefined\n ? /** @type {FeatureClassOrArrayOfRenderFeatures<FeatureType>} */ (\n feature\n )\n : null;\n }\n\n /**\n * Get a feature by its internal unique identifier (using `getUid`).\n *\n * @param {string} uid Feature identifier.\n * @return {FeatureType|null} The feature (or `null` if not found).\n */\n getFeatureByUid(uid) {\n const feature = this.uidIndex_[uid];\n return feature !== undefined ? feature : null;\n }\n\n /**\n * Get the format associated with this source.\n *\n * @return {import(\"../format/Feature.js\").default<FeatureType>|null}} The feature format.\n * @api\n */\n getFormat() {\n return this.format_;\n }\n\n /**\n * @return {boolean} The source can have overlapping geometries.\n */\n getOverlaps() {\n return this.overlaps_;\n }\n\n /**\n * Get the url associated with this source.\n *\n * @return {string|import(\"../featureloader.js\").FeatureUrlFunction|undefined} The url.\n * @api\n */\n getUrl() {\n return this.url_;\n }\n\n /**\n * @param {Event} event Event.\n * @private\n */\n handleFeatureChange_(event) {\n const feature = /** @type {FeatureType} */ (event.target);\n const featureKey = getUid(feature);\n const geometry = feature.getGeometry();\n if (!geometry) {\n if (!(featureKey in this.nullGeometryFeatures_)) {\n if (this.featuresRtree_) {\n this.featuresRtree_.remove(feature);\n }\n this.nullGeometryFeatures_[featureKey] = feature;\n }\n } else {\n const extent = geometry.getExtent();\n if (featureKey in this.nullGeometryFeatures_) {\n delete this.nullGeometryFeatures_[featureKey];\n if (this.featuresRtree_) {\n this.featuresRtree_.insert(extent, feature);\n }\n } else {\n if (this.featuresRtree_) {\n this.featuresRtree_.update(extent, feature);\n }\n }\n }\n const id = feature.getId();\n if (id !== undefined) {\n const sid = id.toString();\n if (this.idIndex_[sid] !== feature) {\n this.removeFromIdIndex_(feature);\n this.idIndex_[sid] = feature;\n }\n } else {\n this.removeFromIdIndex_(feature);\n this.uidIndex_[featureKey] = feature;\n }\n this.changed();\n this.dispatchEvent(\n new VectorSourceEvent(VectorEventType.CHANGEFEATURE, feature),\n );\n }\n\n /**\n * Returns true if the feature is contained within the source.\n * @param {FeatureType} feature Feature.\n * @return {boolean} Has feature.\n * @api\n */\n hasFeature(feature) {\n const id = feature.getId();\n if (id !== undefined) {\n return id in this.idIndex_;\n }\n return getUid(feature) in this.uidIndex_;\n }\n\n /**\n * @return {boolean} Is empty.\n */\n isEmpty() {\n if (this.featuresRtree_) {\n return (\n this.featuresRtree_.isEmpty() && isEmpty(this.nullGeometryFeatures_)\n );\n }\n if (this.featuresCollection_) {\n return this.featuresCollection_.getLength() === 0;\n }\n return true;\n }\n\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @param {number} resolution Resolution.\n * @param {import(\"../proj/Projection.js\").default} projection Projection.\n */\n loadFeatures(extent, resolution, projection) {\n const loadedExtentsRtree = this.loadedExtentsRtree_;\n const extentsToLoad = this.strategy_(extent, resolution, projection);\n for (let i = 0, ii = extentsToLoad.length; i < ii; ++i) {\n const extentToLoad = extentsToLoad[i];\n const alreadyLoaded = loadedExtentsRtree.forEachInExtent(\n extentToLoad,\n /**\n * @param {{extent: import(\"../extent.js\").Extent}} object Object.\n * @return {boolean} Contains.\n */\n function (object) {\n return containsExtent(object.extent, extentToLoad);\n },\n );\n if (!alreadyLoaded) {\n ++this.loadingExtentsCount_;\n this.dispatchEvent(\n new VectorSourceEvent(VectorEventType.FEATURESLOADSTART),\n );\n this.loader_.call(\n this,\n extentToLoad,\n resolution,\n projection,\n /**\n * @param {Array<FeatureType>} features Loaded features\n */\n (features) => {\n --this.loadingExtentsCount_;\n this.dispatchEvent(\n new VectorSourceEvent(\n VectorEventType.FEATURESLOADEND,\n undefined,\n features,\n ),\n );\n },\n () => {\n --this.loadingExtentsCount_;\n this.dispatchEvent(\n new VectorSourceEvent(VectorEventType.FEATURESLOADERROR),\n );\n },\n );\n loadedExtentsRtree.insert(extentToLoad, {extent: extentToLoad.slice()});\n }\n }\n this.loading =\n this.loader_.length < 4 ? false : this.loadingExtentsCount_ > 0;\n }\n\n /**\n * @override\n */\n refresh() {\n this.clear(true);\n this.loadedExtentsRtree_.clear();\n super.refresh();\n }\n\n /**\n * Remove an extent from the list of loaded extents.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @api\n */\n removeLoadedExtent(extent) {\n const loadedExtentsRtree = this.loadedExtentsRtree_;\n const obj = loadedExtentsRtree.forEachInExtent(extent, function (object) {\n if (equals(object.extent, extent)) {\n return object;\n }\n });\n if (obj) {\n loadedExtentsRtree.remove(obj);\n }\n }\n\n /**\n * Batch remove features from the source. If you want to remove all features\n * at once, use the {@link module:ol/source/Vector~VectorSource#clear #clear()} method\n * instead.\n * @param {Array<FeatureType>} features Features to remove.\n * @api\n */\n removeFeatures(features) {\n let removed = false;\n for (let i = 0, ii = features.length; i < ii; ++i) {\n removed = this.removeFeatureInternal(features[i]) || removed;\n }\n if (removed) {\n this.changed();\n }\n }\n\n /**\n * Remove a single feature from the source. If you want to batch remove\n * features, use the {@link module:ol/source/Vector~VectorSource#removeFeatures #removeFeatures()} method\n * instead.\n * @param {FeatureType} feature Feature to remove.\n * @api\n */\n removeFeature(feature) {\n if (!feature) {\n return;\n }\n const removed = this.removeFeatureInternal(feature);\n if (removed) {\n this.changed();\n }\n }\n\n /**\n * Remove feature without firing a `change` event.\n * @param {FeatureType} feature Feature.\n * @return {boolean} True if the feature was removed, false if it was not found.\n * @protected\n */\n removeFeatureInternal(feature) {\n const featureKey = getUid(feature);\n if (!(featureKey in this.uidIndex_)) {\n return false;\n }\n\n if (featureKey in this.nullGeometryFeatures_) {\n delete this.nullGeometryFeatures_[featureKey];\n } else {\n if (this.featuresRtree_) {\n this.featuresRtree_.remove(feature);\n }\n }\n\n const featureChangeKeys = this.featureChangeKeys_[featureKey];\n featureChangeKeys?.forEach(unlistenByKey);\n delete this.featureChangeKeys_[featureKey];\n\n const id = feature.getId();\n if (id !== undefined) {\n const idString = id.toString();\n const indexedFeature = this.idIndex_[idString];\n if (indexedFeature === feature) {\n delete this.idIndex_[idString];\n } else if (Array.isArray(indexedFeature)) {\n indexedFeature.splice(indexedFeature.indexOf(feature), 1);\n if (indexedFeature.length === 1) {\n this.idIndex_[idString] = indexedFeature[0];\n }\n }\n }\n delete this.uidIndex_[featureKey];\n if (this.hasListener(VectorEventType.REMOVEFEATURE)) {\n this.dispatchEvent(\n new VectorSourceEvent(VectorEventType.REMOVEFEATURE, feature),\n );\n }\n return true;\n }\n\n /**\n * Remove a feature from the id index. Called internally when the feature id\n * may have changed.\n * @param {FeatureType} feature The feature.\n * @private\n */\n removeFromIdIndex_(feature) {\n for (const id in this.idIndex_) {\n if (this.idIndex_[id] === feature) {\n delete this.idIndex_[id];\n break;\n }\n }\n }\n\n /**\n * Set the new loader of the source. The next render cycle will use the\n * new loader.\n * @param {import(\"../featureloader.js\").FeatureLoader} loader The loader to set.\n * @api\n */\n setLoader(loader) {\n this.loader_ = loader;\n }\n\n /**\n * Points the source to a new url. The next render cycle will use the new url.\n * @param {string|import(\"../featureloader.js\").FeatureUrlFunction} url Url.\n * @api\n */\n setUrl(url) {\n assert(this.format_, '`format` must be set when `url` is set');\n this.url_ = url;\n this.setLoader(xhr(url, this.format_));\n }\n\n /**\n * @param {boolean} overlaps The source can have overlapping geometries.\n */\n setOverlaps(overlaps) {\n this.overlaps_ = overlaps;\n this.changed();\n }\n}\n\nexport default VectorSource;\n", "/*\n Direct whole-slide viewer for a single file, launched via runpp URL param:\n http://localhost:3000/?image_file=SVS/slide.svs\n The format (SVS, OME-TIFF, ...) is deduced from the file extension,\n case-insensitively, by the server (wsi_tile.py open_slide()).\n\n Optional boundary overlays (Xenium segmentation), drawn when these params name\n CSV files; like the slide itself, paths are relative to serverconfig.tpmasterdir:\n &cell_boundaries=SVS/cell_boundaries.csv&nucleus_boundaries=SVS/nucleus_boundaries.csv\n CSV columns: cell_id, vertex_x, vertex_y (\u00B5m); rows of one cell are contiguous\n and its first vertex is repeated last to close the polygon.\n\n &annotation_level=n limits the boundary strokes to the n most zoomed-in levels\n of the viewer: zoomed out beyond that, the boundaries are hidden. Omit to\n always show. Gene expression fills are not affected \u2014 they show at all zooms.\n\n Gene expression overlay (needs cell_boundaries):\n &gene_expression_file=SVS/cell_feature_matrix.h5&gene_expression=ACE2,ACTA2\n draws one fill overlay per comma-separated gene, each in its own color (see\n GENE_COLORS), shaded by that gene's transcript count in the cell (10x\n cell_feature_matrix HDF5; cell ids match the boundary CSV's). A legend\n overlaid on the map's top-right corner shows each gene's color gradient and\n count range; cells expressing several genes blend their fills.\n An unknown gene name surfaces an error in the UI (other genes still render).\n\n &gene_groups=g1,g2,g3 instead sums each cell's counts over all listed genes\n and draws ONE overlay of the totals in a single color. Can be combined with\n gene_expression (the group takes the next unused palette color).\n\n Bypasses datasets/samples: hits the wsitiles route with a direct slide path\n (resolved relative to serverconfig.tpmasterdir; gated by features.wsi.allowDirectSlidePath). Minimal\n pan/zoom viewer \u2014 the same OpenLayers Zoomify setup the full viewer uses.\n*/\nimport 'ol/ol.css' // OpenLayers base styles\nimport Map from 'ol/Map.js' // the pan/zoom map widget\nimport View from 'ol/View.js' // its camera (resolutions + extent)\nimport TileLayer from 'ol/layer/Tile.js' // mosaics the slide tiles\nimport Zoomify from 'ol/source/Zoomify.js' // tile source matching wsi_tile.py's tier math\nimport VectorLayer from 'ol/layer/Vector.js' // boundary strokes / expression fills\nimport VectorSource from 'ol/source/Vector.js' // holds the polygon features\nimport Feature from 'ol/Feature.js' // one drawable geometry + style\nimport MultiPolygon from 'ol/geom/MultiPolygon.js' // many cell rings in one feature\nimport { Fill, Stroke, Style } from 'ol/style.js' // polygon styling primitives\nimport { dofetch3 } from '#common/dofetch' // fetch wrapper for meta/genecounts\nimport { sayerror } from '#dom' // inline error banner\n\nexport async function init(\n\topts: {\n\t\t/** direct slide path relative to tpmasterdir (runpp ?image_file=) */\n\t\tslide?: string\n\t\t/** alternative to slide: raw wsitiles query addressing the slide through a\n\t\t dataset (wsimage=&dslabel=&genome=&sample_id=), already URI-encoded \u2014\n\t\t lets the w2 plot reuse this viewer for spatial images without the\n\t\t allowDirectSlidePath gate */\n\t\tslideQuery?: string\n\t\t/** display name when slide is not given (e.g. the spatial image fileName) */\n\t\tlabel?: string\n\t\tcellBoundaries?: string\n\t\t/** fetch cellBoundaries (expression fills need the polygons) but don't draw their strokes */\n\t\thideCellStrokes?: boolean\n\t\tnucleusBoundaries?: string\n\t\tannotationLevel?: string | number\n\t\tgeneExpression?: string\n\t\tgeneExpressionFile?: string\n\t\tgeneGroups?: string\n\t\t/** map div size; defaults fit the full-window direct viewer */\n\t\twidth?: string\n\t\theight?: string\n\t},\n\tholder: any\n) {\n\tconst name = opts.slide ?? opts.label ?? 'slide' // display name in messages\n\tconst loading = holder.append('div').style('margin', '20px').text(`Loading ${name} \u2026`) // placeholder while meta loads\n\ttry {\n\t\t// every wsitiles request carries this query to address the slide\n\t\tconst sq = opts.slideQuery ?? `slide=${encodeURIComponent(opts.slide!)}`\n\t\tconst meta = await dofetch3(`wsitiles/meta?${sq}`) // geometry first: tiles need it\n\t\tif (!meta || meta.error || meta.status === 'error') throw meta?.error || 'failed to load slide metadata'\n\n\t\tconst [w, h] = meta.slide_dimensions // level-0 slide size in px\n\t\t// server origin for tile URLs ('' when same-origin); trailing slashes trimmed\n\t\tconst host = (sessionStorage.getItem('hostURL') || (window as any).testHost || '').replace(/\\/+$/, '')\n\n\t\t// z-planes of a 3D OME-TIFF stack (meta.planes = 1 for 2D slides);\n\t\t// start on the middle plane, matching the server's default\n\t\tconst planes: number = meta.planes || 1\n\t\tlet plane = Math.floor(planes / 2)\n\n\t\tconst makeSource = (p: number) =>\n\t\t\tnew Zoomify({\n\t\t\t\t// {z}/{x}/{y} hit wsitiles/tile; unused {TileGroup} satisfies OL's\n\t\t\t\t// requirement that a {TileGroup}/{tileIndex} placeholder be present.\n\t\t\t\t// v=<slide mtime>: regenerating the slide file in place busts the\n\t\t\t\t// browser's immutable tile cache (the server's disk cache keys on it too)\n\t\t\t\turl: `${host}/wsitiles/tile/{z}/{x}/{y}?${sq}${planes > 1 ? `&plane=${p}` : ''}&v=${\n\t\t\t\t\tmeta.version || 0\n\t\t\t\t}&_={TileGroup}`,\n\t\t\t\tsize: [w, h], // OL derives the tier count from this, same math as wsi_tile.py\n\t\t\t\tcrossOrigin: 'anonymous', // tiles come from the API origin, not the page's\n\t\t\t\tzDirection: -1 // pick the sharper tier when between two zoom levels\n\t\t\t})\n\t\tconst source = makeSource(plane) // start on the default (middle) plane\n\t\tconst grid = source.getTileGrid()! // the z/x/y grid OL computed from [w, h]\n\t\tconst extent = grid.getExtent() // slide bounds in map coordinates\n\n\t\tloading.remove() // meta arrived; the map replaces the placeholder\n\n\t\tconst slideLayer = new TileLayer({ source }) // bottom layer: the slide tiles\n\n\t\t// z-plane scroll bar ABOVE the map (the 90vh map pushes anything after\n\t\t// it below the fold); swapping the tile source refetches visible tiles\n\t\t// for the chosen plane, view position unchanged\n\t\tif (planes > 1) {\n\t\t\tconst bar = holder.append('div').style('font', '12px system-ui').style('padding', '4px 8px')\n\t\t\tbar.append('span').text('z-plane: ')\n\t\t\tconst label = () => `${plane + 1}/${planes}` // 1-based display, e.g. '3/5'\n\t\t\tconst planeText = bar.append('span').text(label())\n\t\t\tbar\n\t\t\t\t.append('input')\n\t\t\t\t.attr('type', 'range') // native slider, one notch per plane\n\t\t\t\t.attr('min', 0)\n\t\t\t\t.attr('max', planes - 1)\n\t\t\t\t.attr('step', 1)\n\t\t\t\t.property('value', plane) // start at the default (middle) plane\n\t\t\t\t.style('vertical-align', 'middle')\n\t\t\t\t.style('margin-left', '8px')\n\t\t\t\t.style('width', '200px')\n\t\t\t\t.on('change', function (this: HTMLInputElement) {\n\t\t\t\t\tplane = Number(this.value) // slider position = plane index\n\t\t\t\t\tplaneText.text(label()) // update the '3/5' readout\n\t\t\t\t\tslideLayer.setSource(makeSource(plane)) // refetch visible tiles for this plane\n\t\t\t\t})\n\t\t}\n\n\t\tconst mapDiv = holder\n\t\t\t.append('div')\n\t\t\t.style('width', opts.width ?? '100vw') // full-window unless the w2 plot passes a size\n\t\t\t.style('height', opts.height ?? '90vh')\n\t\tconst map = new Map({\n\t\t\ttarget: mapDiv.node(), // mount the map into the holder\n\t\t\tlayers: [slideLayer], // overlays are addLayer'd on top below\n\t\t\tview: new View({ resolutions: grid.getResolutions(), extent }) // camera locked to the pyramid\n\t\t})\n\t\tmap.getView().fit(extent) // start fully zoomed out, whole slide visible\n\n\t\tholder\n\t\t\t.append('div')\n\t\t\t.style('font', '12px system-ui')\n\t\t\t.style('padding', '4px 8px')\n\t\t\t.text(\n\t\t\t\t`${name} \u2014 ${w}\u00D7${h}px${\n\t\t\t\t\tArray.isArray(meta.mpp) && meta.mpp.length === 2\n\t\t\t\t\t\t? `, ${meta.mpp[0].toFixed(3)}\u00D7${meta.mpp[1].toFixed(3)} \u00B5m/px`\n\t\t\t\t\t\t: ''\n\t\t\t\t}, ${meta.levels} levels`\n\t\t\t)\n\n\t\t// segmentation overlays: boundary CSVs are in \u00B5m, converted to level-0\n\t\t// pixels via the slide's mpp (defaulting to 1 = coords already in px)\n\t\tconst [mppX, mppY] = Array.isArray(meta.mpp) && meta.mpp.length === 2 ? meta.mpp : [1, 1]\n\n\t\t// annotation_level=n: show the overlays only within the n most zoomed-in\n\t\t// levels. OL picks the tile level with resolution <= the view resolution,\n\t\t// so \"within the n finest levels\" means view resolution < the (n+1)'th\n\t\t// finest grid resolution \u2014 that becomes the layer's (exclusive) maxResolution.\n\t\tconst resolutions = grid.getResolutions() // per-tier map resolutions, coarse -> fine\n\t\tconst n = Number(opts.annotationLevel) // boundaries visible in the n finest tiers\n\t\tconst maxResolution =\n\t\t\tNumber.isInteger(n) && n > 0 && n < resolutions.length ? resolutions[resolutions.length - 1 - n] : undefined\n\n\t\t// the two boundary overlays with their stroke colors (cell green, nucleus blue)\n\t\tconst overlays: Array<[string | undefined, string]> = [\n\t\t\t[opts.cellBoundaries, 'rgba(0, 200, 80, 0.9)'],\n\t\t\t[opts.nucleusBoundaries, 'rgba(0, 150, 255, 0.9)']\n\t\t]\n\t\tlet cellPolys: CellPoly[] | undefined // kept for the expression fills below\n\t\tfor (const [file, color] of overlays) {\n\t\t\tif (!file) continue // that overlay was not requested\n\t\t\ttry {\n\t\t\t\tconst polys = await fetchBoundaries(host, sq, file, mppX, mppY) // csv -> px polygons\n\t\t\t\tif (file === opts.cellBoundaries) {\n\t\t\t\t\tcellPolys = polys // expression fills reuse these rings\n\t\t\t\t\tif (opts.hideCellStrokes) continue // polygons fetched, strokes suppressed\n\t\t\t\t}\n\t\t\t\tmap.addLayer(strokeLayer(polys, color, maxResolution)) // draw on top of the slide\n\t\t\t} catch (e: any) {\n\t\t\t\tsayerror(holder, `Error loading ${file}: ${e.message || e}`) // one overlay failing kills nothing else\n\t\t\t}\n\t\t}\n\n\t\tconst geneList = (s?: string) =>\n\t\t\t(s || '')\n\t\t\t\t.split(',')\n\t\t\t\t.map(t => t.trim())\n\t\t\t\t.filter(Boolean)\n\t\tconst exprGenes = geneList(opts.geneExpression) // one overlay per gene\n\t\tconst groupGenes = geneList(opts.geneGroups) // summed into a single overlay\n\t\tif (exprGenes.length || groupGenes.length) {\n\t\t\ttry {\n\t\t\t\tif (!opts.geneExpressionFile)\n\t\t\t\t\tthrow new Error('gene_expression/gene_groups requires gene_expression_file=<h5 file>')\n\t\t\t\tif (!cellPolys) throw new Error('gene_expression/gene_groups requires cell_boundaries=<csv file>')\n\t\t\t\t// one genecounts request per gene, expr + group genes together\n\t\t\t\tconst results = await Promise.all(\n\t\t\t\t\t[...exprGenes, ...groupGenes].map(gene =>\n\t\t\t\t\t\tdofetch3(\n\t\t\t\t\t\t\t`wsitiles/genecounts?${sq}&file=${encodeURIComponent(opts.geneExpressionFile!)}&gene=${encodeURIComponent(\n\t\t\t\t\t\t\t\tgene\n\t\t\t\t\t\t\t)}`\n\t\t\t\t\t\t).catch((e: any) => ({ error: e.message || String(e) }))\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t// legend overlaid on the map's top-right corner \u2014 anything appended\n\t\t\t\t// below the 90vh map div lands below the fold and is never seen.\n\t\t\t\t// Created lazily so an all-errors run doesn't leave an empty box.\n\t\t\t\tlet legend: any\n\t\t\t\tconst addLegend = (rgb: string, name: string, max: number) => {\n\t\t\t\t\tif (!legend) {\n\t\t\t\t\t\tmapDiv.style('position', 'relative')\n\t\t\t\t\t\tlegend = mapDiv\n\t\t\t\t\t\t\t.append('div')\n\t\t\t\t\t\t\t.style('position', 'absolute')\n\t\t\t\t\t\t\t.style('top', '8px')\n\t\t\t\t\t\t\t.style('right', '8px')\n\t\t\t\t\t\t\t.style('z-index', '10')\n\t\t\t\t\t\t\t.style('background', 'rgba(255,255,255,0.85)')\n\t\t\t\t\t\t\t.style('padding', '6px 10px')\n\t\t\t\t\t\t\t.style('border-radius', '4px')\n\t\t\t\t\t\t\t.style('font', '12px system-ui')\n\t\t\t\t\t}\n\t\t\t\t\tconst row = legend.append('div').style('margin', '2px 0')\n\t\t\t\t\trow.append('span').style('margin-right', '6px').text(name)\n\t\t\t\t\t// alpha range mirrors expressionLayer's shades (log-scaled counts)\n\t\t\t\t\trow\n\t\t\t\t\t\t.append('span')\n\t\t\t\t\t\t.style('display', 'inline-block')\n\t\t\t\t\t\t.style('width', '80px')\n\t\t\t\t\t\t.style('height', '10px')\n\t\t\t\t\t\t.style('vertical-align', 'middle')\n\t\t\t\t\t\t.style('border', '1px solid #ccc')\n\t\t\t\t\t\t.style('background', `linear-gradient(to right, rgba(${rgb}, 0.15), rgba(${rgb}, 0.9))`)\n\t\t\t\t\trow.append('span').style('margin-left', '4px').text(`1\u2013${max}`)\n\t\t\t\t}\n\n\t\t\t\t// gene_expression: one layer per gene, each its own color\n\t\t\t\tlet colorIdx = 0 // next palette slot; shared with the group overlay\n\t\t\t\tfor (const [i, gene] of exprGenes.entries()) {\n\t\t\t\t\tconst r = results[i] // this gene's genecounts answer\n\t\t\t\t\tif (!r || r.error) {\n\t\t\t\t\t\tsayerror(holder, `Gene expression error (${gene}): ${r?.error || 'failed to load'}`)\n\t\t\t\t\t\tcontinue // one bad gene doesn't block the others\n\t\t\t\t\t}\n\t\t\t\t\tconst rgb = GENE_COLORS[colorIdx++ % GENE_COLORS.length] // this gene's fill color\n\t\t\t\t\tmap.addLayer(expressionLayer(cellPolys, r.cells, r.max, rgb)) // fill the expressing cells\n\t\t\t\t\taddLegend(rgb, gene, r.max) // gradient + count range in the legend\n\t\t\t\t}\n\n\t\t\t\t// gene_groups: sum each cell's counts over the group, one layer/color\n\t\t\t\tif (groupGenes.length) {\n\t\t\t\t\tconst total: { [id: string]: number } = {} // per-cell sum across the group\n\t\t\t\t\tconst found: string[] = [] // genes that actually answered\n\t\t\t\t\tfor (const [i, gene] of groupGenes.entries()) {\n\t\t\t\t\t\tconst r = results[exprGenes.length + i] // group answers follow the expr ones\n\t\t\t\t\t\tif (!r || r.error) {\n\t\t\t\t\t\t\tsayerror(holder, `Gene expression error (${gene}): ${r?.error || 'failed to load'}`)\n\t\t\t\t\t\t\tcontinue // skip the missing gene, keep summing the rest\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfound.push(gene)\n\t\t\t\t\t\tfor (const id in r.cells) total[id] = (total[id] || 0) + r.cells[id] // accumulate per cell\n\t\t\t\t\t}\n\t\t\t\t\tif (found.length) {\n\t\t\t\t\t\tlet max = 0 // the summed overlay's own count ceiling\n\t\t\t\t\t\tfor (const id in total) if (total[id] > max) max = total[id]\n\t\t\t\t\t\tconst rgb = GENE_COLORS[colorIdx++ % GENE_COLORS.length] // next unused palette color\n\t\t\t\t\t\tmap.addLayer(expressionLayer(cellPolys, total, max, rgb)) // ONE overlay of the totals\n\t\t\t\t\t\taddLegend(rgb, found.join('+'), max) // e.g. 'PTPRC+EPCAM'\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e: any) {\n\t\t\t\tsayerror(holder, `Gene expression error: ${e.message || e}`)\n\t\t\t}\n\t\t}\n\t} catch (e: any) {\n\t\tloading.remove()\n\t\tsayerror(holder, `WSI error: ${e.message || e}`)\n\t}\n}\n\ntype CellPoly = { id: string; ring: number[][] }\n\n/** Fetch a boundary CSV (via wsitiles/boundaries) and parse it into one closed\n ring per cell, keyed by the unquoted cell_id (matches h5 barcodes). */\nasync function fetchBoundaries(\n\thost: string,\n\t/** wsitiles query addressing the slide (slide= or dataset params) */\n\tsq: string,\n\tfile: string,\n\tmppX: number,\n\tmppY: number\n): Promise<CellPoly[]> {\n\tconst res = await fetch(`${host}/wsitiles/boundaries?${sq}&file=${encodeURIComponent(file)}`) // raw csv text\n\tif (!res.ok) throw new Error(`${res.status} ${res.statusText}`)\n\tconst text = await res.text()\n\n\t// rows: \"cell_id\",vertex_x,vertex_y \u2014 one cell's vertices are contiguous.\n\t// OL's Zoomify extent is [0,-h,w,0]: x in px to the right, y in px negated.\n\tconst cells: CellPoly[] = [] // finished polygons\n\tlet ring: number[][] = [] // vertices of the cell being read\n\tlet curId = '' // the cell those vertices belong to\n\tfor (const line of text.split('\\n')) {\n\t\tconst [id, xs, ys] = line.split(',') // one vertex per row\n\t\tconst x = Number(xs)\n\t\tif (!xs || Number.isNaN(x)) continue // header / blank line\n\t\tif (id !== curId) {\n\t\t\t// a new cell_id starts: close out the previous cell's ring\n\t\t\tif (ring.length > 2) cells.push({ id: curId.replace(/\"/g, ''), ring })\n\t\t\tring = []\n\t\t\tcurId = id\n\t\t}\n\t\tring.push([x / mppX, -Number(ys) / mppY]) // \u00B5m -> level-0 px, y negated for OL\n\t}\n\tif (ring.length > 2) cells.push({ id: curId.replace(/\"/g, ''), ring }) // don't drop the last cell\n\treturn cells\n}\n\n/** One stroke-only vector layer holding every polygon; maxResolution (when\n set) hides the layer once the user zooms out beyond it.\n ponytail: all ~100k polygons in one MultiPolygon feature \u2014 switch to vector\n tiling if rendering within the visible zoom range ever feels sluggish. */\nfunction strokeLayer(cells: CellPoly[], color: string, maxResolution?: number): VectorLayer {\n\treturn new VectorLayer({\n\t\t// every ring wrapped into a single MultiPolygon feature\n\t\tsource: new VectorSource({ features: [new Feature(new MultiPolygon(cells.map(c => [c.ring])))] }),\n\t\tstyle: new Style({ stroke: new Stroke({ color, width: 1 }) }), // outline only, no fill\n\t\tmaxResolution // undefined = visible at every zoom\n\t})\n}\n\n// number of opacity steps for the expression fills\nconst SHADES = 8\n\n// fill colors (\"r, g, b\") cycled per gene; green/blue-ish avoided so fills\n// stay distinguishable from the cell (green) and nucleus (blue) strokes\nconst GENE_COLORS = ['255, 0, 0', '0, 90, 255', '255, 165, 0', '160, 0, 200', '0, 160, 160', '200, 160, 0']\n\n/** Fill each expressing cell with `rgb` at an opacity scaling with the cell's\n transcript count for the chosen gene; zero-count cells stay unfilled. Cells\n are bucketed into SHADES opacity steps so the layer is a handful of\n MultiPolygon features instead of one per cell. Counts are log-normalized\n (log1p(n)/log1p(max)) so a few hot cells don't push everything else into\n the faintest shade. Shown at every zoom level \u2014 annotation_level only\n gates the boundary strokes, not the expression fills. */\nfunction expressionLayer(cells: CellPoly[], counts: { [id: string]: number }, max: number, rgb: string): VectorLayer {\n\tconst buckets: number[][][][][] = Array.from({ length: SHADES }, () => []) // one polygon list per shade\n\tfor (const c of cells) {\n\t\tconst n = counts[c.id] // this cell's transcript count\n\t\tif (!n || !max) continue // zero count (or empty result): no fill\n\t\t// log-normalize the count into a shade index 0..SHADES-1\n\t\tbuckets[Math.min(SHADES - 1, Math.floor((Math.log1p(n) / Math.log1p(max)) * SHADES))].push([c.ring])\n\t}\n\tconst features: Feature[] = [] // one MultiPolygon feature per non-empty shade\n\tfor (const [i, polys] of buckets.entries()) {\n\t\tif (!polys.length) continue // no cell landed in this shade\n\t\tconst f = new Feature(new MultiPolygon(polys)) // all of this shade's cells at once\n\t\tconst alpha = 0.15 + (0.75 * (i + 1)) / SHADES // faintest 0.24 .. strongest 0.90\n\t\tf.setStyle(new Style({ fill: new Fill({ color: `rgba(${rgb}, ${alpha.toFixed(2)})` }) }))\n\t\tfeatures.push(f)\n\t}\n\treturn new VectorLayer({ source: new VectorSource({ features }) }) // fills only, no strokes\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAS;AAIf,IAAM,cAAc,CAAC,aAAa,cAAc,eAAe,eAAe,eAAe,aAAa;AAS1G,SAAS,gBAAgB,OAAmB,QAAkC,KAAa,KAA0B;AACpH,QAAM,UAA4B,MAAM,KAAK,EAAE,QAAQ,OAAO,GAAG,MAAM,CAAC,CAAC;AACzE,aAAW,KAAK,OAAO;AACtB,UAAM,IAAI,OAAO,EAAE,EAAE;AACrB,QAAI,CAAC,KAAK,CAAC,IAAK;AAEhB,YAAQ,KAAK,IAAI,SAAS,GAAG,KAAK,MAAO,KAAK,MAAM,CAAC,IAAI,KAAK,MAAM,GAAG,IAAK,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,IAAI,CAAC;AAAA,EACpG;AACA,QAAM,WAAsB,CAAC;AAC7B,aAAW,CAAC,GAAG,KAAK,KAAK,QAAQ,QAAQ,GAAG;AAC3C,QAAI,CAAC,MAAM,OAAQ;AACnB,UAAM,IAAI,IAAI,gBAAQ,IAAI,qBAAa,KAAK,CAAC;AAC7C,UAAM,QAAQ,OAAQ,QAAQ,IAAI,KAAM;AACxC,MAAE,SAAS,IAAI,cAAM,EAAE,MAAM,IAAI,aAAK,EAAE,OAAO,QAAQ,GAAG,KAAK,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxF,aAAS,KAAK,CAAC;AAAA,EAChB;AACA,SAAO,IAAI,eAAY,EAAE,QAAQ,IAAIA,gBAAa,EAAE,SAAS,CAAC,EAAE,CAAC;AAClE;",
6
+ "names": ["fillInstruction", "p1", "p2", "p3", "measureAndCacheTextWidth", "text", "p1", "p2", "p3", "p4", "fillInstruction", "strokeInstruction", "intersects", "i", "ii", "willReadFrequently", "i", "result", "context", "i", "geometry", "loading", "EventType_default", "isEmpty", "wrapX", "extent", "userExtent", "xhr", "clone", "linearRingss", "squaredDistance", "linearRingss", "linearRingss", "Feature_default", "RBush", "equals", "Feature_default", "equals", "Vector_default", "name", "Vector_default"]
7
+ }