jupytergis-core 0.6.2__tar.gz → 0.8.0__tar.gz

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 (161) hide show
  1. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/PKG-INFO +1 -1
  2. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/_version.py +1 -1
  3. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/package.json +4 -4
  4. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/schemas/@jupytergis/jupytergis-core/package.json.orig +3 -3
  5. jupytergis_core-0.8.0/jupytergis_core/labextension/static/199.2055e6228d3eceaf410d.js +1 -0
  6. jupytergis_core-0.8.0/jupytergis_core/labextension/static/397.ffeb4d7f31b735ce0a86.js +1 -0
  7. jupytergis_core-0.8.0/jupytergis_core/labextension/static/465.5ee170b35409f85f5361.js +1 -0
  8. jupytergis_core-0.8.0/jupytergis_core/labextension/static/639.096de5d4b4e9c562ab4b.js +1 -0
  9. jupytergis_core-0.8.0/jupytergis_core/labextension/static/671.12b59750568be4443b33.js +8 -0
  10. jupytergis_core-0.8.0/jupytergis_core/labextension/static/991.a3b4feb2455f9054cfef.js +1 -0
  11. jupytergis_core-0.8.0/jupytergis_core/labextension/static/remoteEntry.2c88e4f082054467fd67.js +1 -0
  12. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/third-party-licenses.json +39 -9
  13. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/schema/__init__.py +1 -0
  14. {jupytergis_core-0.6.2/jupytergis_core/schema/interfaces/processing → jupytergis_core-0.8.0/jupytergis_core/schema/interfaces}/__init__.py +1 -1
  15. {jupytergis_core-0.6.2/jupytergis_core/schema/interfaces/project → jupytergis_core-0.8.0/jupytergis_core/schema/interfaces/export}/__init__.py +1 -1
  16. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/schema/interfaces/export/exportGeoJson.py +1 -1
  17. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/schema/interfaces/export/exportGeoTiff.py +1 -1
  18. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/schema/interfaces/geojson.py +1 -1
  19. {jupytergis_core-0.6.2/jupytergis_core/schema/interfaces → jupytergis_core-0.8.0/jupytergis_core/schema/interfaces/processing}/__init__.py +1 -1
  20. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/schema/interfaces/processing/boundingBoxes.py +1 -1
  21. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/schema/interfaces/processing/buffer.py +1 -1
  22. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/schema/interfaces/processing/centroids.py +1 -1
  23. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/schema/interfaces/processing/concaveHull.py +1 -1
  24. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/schema/interfaces/processing/convexHull.py +1 -1
  25. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/schema/interfaces/processing/dissolve.py +1 -1
  26. {jupytergis_core-0.6.2/jupytergis_core/schema/interfaces/export → jupytergis_core-0.8.0/jupytergis_core/schema/interfaces/project}/__init__.py +1 -1
  27. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/schema/interfaces/project/jgis.py +2 -1
  28. jupytergis_core-0.8.0/jupytergis_core/schema/interfaces/project/layers/__init__.py +3 -0
  29. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/schema/interfaces/project/layers/heatmapLayer.py +2 -2
  30. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/schema/interfaces/project/layers/hillshadeLayer.py +1 -1
  31. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/schema/interfaces/project/layers/imageLayer.py +1 -1
  32. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/schema/interfaces/project/layers/rasterLayer.py +1 -1
  33. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/schema/interfaces/project/layers/stacLayer.py +1 -1
  34. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/schema/interfaces/project/layers/vectorLayer.py +2 -2
  35. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/schema/interfaces/project/layers/vectorTileLayer.py +1 -1
  36. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/schema/interfaces/project/layers/webGlLayer.py +2 -2
  37. jupytergis_core-0.8.0/jupytergis_core/schema/interfaces/project/sources/__init__.py +3 -0
  38. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/schema/interfaces/project/sources/geoJsonSource.py +1 -1
  39. jupytergis_core-0.8.0/jupytergis_core/schema/interfaces/project/sources/geoParquetSource.py +23 -0
  40. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/schema/interfaces/project/sources/geoTiffSource.py +1 -1
  41. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/schema/interfaces/project/sources/imageSource.py +1 -1
  42. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/schema/interfaces/project/sources/rasterDemSource.py +1 -1
  43. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/schema/interfaces/project/sources/rasterSource.py +1 -1
  44. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/schema/interfaces/project/sources/shapefileSource.py +1 -1
  45. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/schema/interfaces/project/sources/vectorTileSource.py +1 -1
  46. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/schema/interfaces/project/sources/videoSource.py +1 -1
  47. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/lib/factory.d.ts +5 -1
  48. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/lib/factory.js +8 -1
  49. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/lib/jgisplugin/plugins.js +9 -2
  50. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/package.json +3 -3
  51. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/src/factory.ts +15 -1
  52. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/src/jgisplugin/plugins.ts +11 -0
  53. jupytergis_core-0.8.0/tsconfig.tsbuildinfo +1 -0
  54. jupytergis_core-0.6.2/jupytergis_core/labextension/static/229.ee0310f26253b45fe462.js +0 -8
  55. jupytergis_core-0.6.2/jupytergis_core/labextension/static/397.60274eedc66443d2b6fc.js +0 -1
  56. jupytergis_core-0.6.2/jupytergis_core/labextension/static/671.8da90f680f4c1d71b5fb.js +0 -1
  57. jupytergis_core-0.6.2/jupytergis_core/labextension/static/991.347021da09be0d178782.js +0 -1
  58. jupytergis_core-0.6.2/jupytergis_core/labextension/static/remoteEntry.9d9d71140699a8998c5a.js +0 -1
  59. jupytergis_core-0.6.2/jupytergis_core/schema/interfaces/project/layers/__init__.py +0 -3
  60. jupytergis_core-0.6.2/jupytergis_core/schema/interfaces/project/sources/__init__.py +0 -3
  61. jupytergis_core-0.6.2/tsconfig.tsbuildinfo +0 -1
  62. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/.gitignore +0 -0
  63. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/LICENSE +0 -0
  64. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/README.md +0 -0
  65. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupyter-config/server-config/jupytergis_core.json +0 -0
  66. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/__init__.py +0 -0
  67. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/handler.py +0 -0
  68. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/jgis_ydoc.py +0 -0
  69. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/schemas/@jupytergis/jupytergis-core/jupytergis-settings.json +0 -0
  70. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/026680ab0cd1523edc87.png +0 -0
  71. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/02ff7d503bbd90b21fc4.png +0 -0
  72. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/062a9554f6b4caac9713.png +0 -0
  73. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/064f37cecb8130ad66e8.png +0 -0
  74. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/08da2741746ddab81d04.png +0 -0
  75. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/0c6a0352b82839119f95.png +0 -0
  76. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/13c485bb93f5567f02fd.png +0 -0
  77. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/1474207a6b3ca1001e78.png +0 -0
  78. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/14b98240613d5256c621.png +0 -0
  79. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/154.0d16fbe1d1182d138b2c.js +0 -0
  80. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/1b97ea0f2b3af717cffa.png +0 -0
  81. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/1d440270da19a2f22fee.png +0 -0
  82. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/1ed164e010f3c0306d15.png +0 -0
  83. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/2218dfba22fc2b08e948.png +0 -0
  84. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/234.2f0fc49f516ad354aa18.js +0 -0
  85. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/27.6ee794baeb00791424c2.js +0 -0
  86. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/27.6ee794baeb00791424c2.js.LICENSE.txt +0 -0
  87. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/2ab791b60c4058e664f8.png +0 -0
  88. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/2b24b6a745c11511f055.png +0 -0
  89. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/2d676bc0a01c2cd2fccb.png +0 -0
  90. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/2f02309ea499725612ea.png +0 -0
  91. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/32c7a73662cceb5bb1d7.png +0 -0
  92. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/350eec4ce9ae4bc10bca.wasm +0 -0
  93. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/363ca7c5f78deb6fd033.png +0 -0
  94. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/376.58a6410b7089dea5b0d5.js +0 -0
  95. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/3ae0bf244442de7efc35.png +0 -0
  96. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/3d48be10ffea86eb15de.png +0 -0
  97. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/407.da5d00862f4879fe3c9c.js +0 -0
  98. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/415edc3fa381260cf31e.png +0 -0
  99. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/42cbddf5e883673bc4e2.png +0 -0
  100. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/432.b81aa01fd224321ff376.js +0 -0
  101. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/472.b2ea9ebc35d5ad4e1fcc.js +0 -0
  102. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/527ef171d5df15dc7da5.png +0 -0
  103. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/542.477a73b8682de0e8d45e.js +0 -0
  104. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/552.0936beb209d3ea5a1229.js +0 -0
  105. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/555.be80e60305924af2e139.js +0 -0
  106. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/5bb02252f243f8c7494f.png +0 -0
  107. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/5d181edc3c046e1454a1.png +0 -0
  108. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/5f32ad48aefe00e51312.png +0 -0
  109. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/618.86523276f857e0a3362e.js +0 -0
  110. /jupytergis_core-0.6.2/jupytergis_core/labextension/static/229.ee0310f26253b45fe462.js.LICENSE.txt → /jupytergis_core-0.8.0/jupytergis_core/labextension/static/671.12b59750568be4443b33.js.LICENSE.txt +0 -0
  111. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/6e4f6b4d0dfca3bd4450.png +0 -0
  112. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/71d436fb44627b6bfbd7.png +0 -0
  113. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/7b225dc2d37cd3582156.png +0 -0
  114. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/803.5f3759c98814aa602705.js +0 -0
  115. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/803.5f3759c98814aa602705.js.LICENSE.txt +0 -0
  116. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/843ab141e62516b9df5c.png +0 -0
  117. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/8814e17f6b110e8f3e42.png +0 -0
  118. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/88b2ae0d29edb684eae5.png +0 -0
  119. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/971a42d174dd17b9451a.png +0 -0
  120. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/a3c609f5bff95a7a53be.png +0 -0
  121. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/a86d626c9ed2e222d190.png +0 -0
  122. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/a9e286b0c0264a9fc737.png +0 -0
  123. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/ab309078b494f850430a.png +0 -0
  124. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/b15e3989b7b90b5a8d9d.png +0 -0
  125. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/b36717fbb06f21d53b01.png +0 -0
  126. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/ba4b6e82fe5a816c40a5.png +0 -0
  127. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/bb2b310570da7a3587e9.png +0 -0
  128. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/be92bcf7bb99753b4b3d.png +0 -0
  129. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/c2ffa011d7f52a0ddf45.png +0 -0
  130. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/d83457b1b925c1718f6d.png +0 -0
  131. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/e473e1e9f20af114bbb4.data +0 -0
  132. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/f2617180c6907263a7ff.png +0 -0
  133. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/fe99a6dbf5a71d308989.png +0 -0
  134. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/jupytergis_core/labextension/static/style.js +0 -0
  135. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/lib/externalcommand.d.ts +0 -0
  136. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/lib/externalcommand.js +0 -0
  137. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/lib/index.d.ts +0 -0
  138. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/lib/index.js +0 -0
  139. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/lib/jgisplugin/modelfactory.d.ts +0 -0
  140. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/lib/jgisplugin/modelfactory.js +0 -0
  141. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/lib/jgisplugin/plugins.d.ts +0 -0
  142. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/lib/layerBrowserRegistry.d.ts +0 -0
  143. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/lib/layerBrowserRegistry.js +0 -0
  144. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/lib/plugin.d.ts +0 -0
  145. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/lib/plugin.js +0 -0
  146. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/lib/schemaregistry.d.ts +0 -0
  147. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/lib/schemaregistry.js +0 -0
  148. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/pyproject.toml +0 -0
  149. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/schema/jupytergis-settings.json +0 -0
  150. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/scripts/bump-version.py +0 -0
  151. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/setup.py +0 -0
  152. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/src/externalcommand.ts +0 -0
  153. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/src/index.ts +0 -0
  154. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/src/jgisplugin/modelfactory.ts +0 -0
  155. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/src/layerBrowserRegistry.ts +0 -0
  156. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/src/plugin.ts +0 -0
  157. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/src/schemaregistry.ts +0 -0
  158. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/style/base.css +0 -0
  159. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/style/index.css +0 -0
  160. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/style/index.js +0 -0
  161. {jupytergis_core-0.6.2 → jupytergis_core-0.8.0}/tsconfig.json +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jupytergis_core
3
- Version: 0.6.2
3
+ Version: 0.8.0
4
4
  Dynamic: Keywords
5
5
  Summary: JupyterGIS core extension
6
6
  Project-URL: Homepage, https://github.com/geojupyter/jupytergis
@@ -1,4 +1,4 @@
1
1
  # This file is auto-generated by Hatchling. As such, do not:
2
2
  # - modify
3
3
  # - track in version control e.g. be sure to add to .gitignore
4
- __version__ = VERSION = '0.6.2'
4
+ __version__ = VERSION = '0.8.0'
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupytergis/jupytergis-core",
3
- "version": "0.6.2",
3
+ "version": "0.8.0",
4
4
  "description": "JupyterGIS core extension",
5
5
  "keywords": [
6
6
  "jupyter",
@@ -54,8 +54,8 @@
54
54
  },
55
55
  "dependencies": {
56
56
  "@jupyter/collaborative-drive": "^3.0.0",
57
- "@jupytergis/base": "^0.6.2",
58
- "@jupytergis/schema": "^0.6.2",
57
+ "@jupytergis/base": "^0.8.0",
58
+ "@jupytergis/schema": "^0.8.0",
59
59
  "@jupyterlab/application": "^4.3.0",
60
60
  "@jupyterlab/apputils": "^4.3.0",
61
61
  "@jupyterlab/docregistry": "^4.3.0",
@@ -120,7 +120,7 @@
120
120
  }
121
121
  },
122
122
  "_build": {
123
- "load": "static/remoteEntry.9d9d71140699a8998c5a.js",
123
+ "load": "static/remoteEntry.2c88e4f082054467fd67.js",
124
124
  "extension": "./extension",
125
125
  "style": "./style"
126
126
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jupytergis/jupytergis-core",
3
- "version": "0.6.2",
3
+ "version": "0.8.0",
4
4
  "description": "JupyterGIS core extension",
5
5
  "keywords": [
6
6
  "jupyter",
@@ -54,8 +54,8 @@
54
54
  },
55
55
  "dependencies": {
56
56
  "@jupyter/collaborative-drive": "^3.0.0",
57
- "@jupytergis/base": "^0.6.2",
58
- "@jupytergis/schema": "^0.6.2",
57
+ "@jupytergis/base": "^0.8.0",
58
+ "@jupytergis/schema": "^0.8.0",
59
59
  "@jupyterlab/application": "^4.3.0",
60
60
  "@jupyterlab/apputils": "^4.3.0",
61
61
  "@jupyterlab/docregistry": "^4.3.0",
@@ -0,0 +1 @@
1
+ (self.webpackChunk_jupytergis_jupytergis_core=self.webpackChunk_jupytergis_jupytergis_core||[]).push([[199],{10199:e=>{function r(e){return Promise.resolve().then(()=>{var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r})}r.keys=()=>[],r.resolve=r,r.id=10199,e.exports=r}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_jupytergis_jupytergis_core=self.webpackChunk_jupytergis_jupytergis_core||[]).push([[397],{67397:(e,t,r)=>{r.r(t),r.d(t,{IAnnotationToken:()=>_,IJGISExternalCommandRegistryToken:()=>p,IJGISFormSchemaRegistryToken:()=>c,IJGISLayerBrowserRegistryToken:()=>m,IJupyterGISDocTracker:()=>y,JupyterGISDoc:()=>d,JupyterGISModel:()=>g,ProcessingCommandIDs:()=>T,ProcessingLogicType:()=>S,ProcessingMerge:()=>f,SCHEMA_VERSION:()=>l,processingList:()=>v});var s=r(74602),a=r(26803),i=r.n(a),o=r(28e3),n=r(67262);const l="0.5.0";class d extends o.YDocument{constructor(){super(),this.editable=!0,this._optionsObserver=e=>{this._optionsChanged.emit(e.keys)},this._metaObserver=e=>{this._metadataChanged.emit(e.keys)},this._optionsChanged=new s.Signal(this),this._layersChanged=new s.Signal(this),this._layerTreeChanged=new s.Signal(this),this._sourcesChanged=new s.Signal(this),this._metadataChanged=new s.Signal(this),this._options=this.ydoc.getMap("options"),this._layers=this.ydoc.getMap("layers"),this._layerTree=this.ydoc.getArray("layerTree"),this._sources=this.ydoc.getMap("sources"),this._metadata=this.ydoc.getMap("metadata"),this.undoManager.addToScope(this._layers),this.undoManager.addToScope(this._sources),this.undoManager.addToScope(this._layerTree),this._layers.observeDeep(this._layersObserver.bind(this)),this._layerTree.observe(this._layerTreeObserver.bind(this)),this._sources.observeDeep(this._sourcesObserver.bind(this)),this._options.observe(this._optionsObserver.bind(this)),this._metadata.observe(this._metaObserver.bind(this))}getSource(){const e=this._layers.toJSON(),t=this._layerTree.toJSON(),r=this._options.toJSON();return{layers:e,layerTree:t,sources:this._sources.toJSON(),options:r,metadata:this._metadata.toJSON()}}setSource(e){e&&("string"==typeof e&&(e=JSON.parse(e)),this.transact(()=>{var t,r,s,a,i;const o=null!==(t=e.layers)&&void 0!==t?t:{};Object.entries(o).forEach(([e,t])=>this._layers.set(e,t)),(null!==(r=e.layerTree)&&void 0!==r?r:[]).forEach(e=>{this._layerTree.push([e])});const n=null!==(s=e.options)&&void 0!==s?s:{};Object.entries(n).forEach(([e,t])=>this._options.set(e,t));const l=null!==(a=e.sources)&&void 0!==a?a:{};Object.entries(l).forEach(([e,t])=>this._sources.set(e,t));const d=null!==(i=e.metadata)&&void 0!==i?i:{};Object.entries(d).forEach(([e,t])=>this._metadata.set(e,t))}))}dispose(){super.dispose()}get version(){return l}get layers(){return n.JSONExt.deepCopy(this._layers.toJSON())}set layers(e){this.transact(()=>{for(const[t,r]of Object.entries(e))this._layers.set(t,r)})}set sources(e){this.transact(()=>{for(const[t,r]of Object.entries(e))this._sources.set(t,r)})}get sources(){return n.JSONExt.deepCopy(this._sources.toJSON())}get layerTree(){return n.JSONExt.deepCopy(this._layerTree.toJSON())}set layerTree(e){this.transact(()=>{this._layerTree.delete(0,this._layerTree.length),this._layerTree.push(e)})}getLayer(e){if(this._layers.has(e))return n.JSONExt.deepCopy(this._layers.get(e))}getLayerSource(e){if(this._sources.has(e))return n.JSONExt.deepCopy(this._sources.get(e))}set options(e){this.transact(()=>{for(const[t,r]of Object.entries(e))this._options.set(t,r)})}get options(){return n.JSONExt.deepCopy(this._options.toJSON())}get layersChanged(){return this._layersChanged}get layerTreeChanged(){return this._layerTreeChanged}get sourcesChanged(){return this._sourcesChanged}get optionsChanged(){return this._optionsChanged}layerExists(e){return Boolean(this._getLayerAsYMap(e))}removeLayer(e){this.transact(()=>{this._layers.delete(e)})}addLayer(e,t){this.transact(()=>{this._layers.set(e,t)})}updateLayer(e,t){this.transact(()=>{this._layers.set(e,t)})}addLayerTreeItem(e,t){this.transact(()=>{this._layerTree.insert(e,[t])})}updateLayerTreeItem(e,t){this.transact(()=>{this._layerTree.delete(e),t&&this._layerTree.insert(e,[t])})}getObject(e){const t=this.getLayer(e);if(t)return t;return this.getLayerSource(e)||void 0}updateObjectParameters(e,t){const r=this.getLayer(e);r&&(r.parameters=Object.assign(Object.assign({},r.parameters),t),this.updateLayer(e,r));const s=this.getLayerSource(e);s&&(s.parameters=Object.assign(Object.assign({},s.parameters),t),this.updateSource(e,s))}sourceExists(e){return Boolean(this._getSourceAsYMap(e))}removeSource(e){this.transact(()=>{this._sources.delete(e)})}addSource(e,t){this.transact(()=>{this._sources.set(e,t)})}updateSource(e,t){this.transact(()=>this._sources.set(e,t))}getOption(e){const t=this._options.get(e);if(t)return n.JSONExt.deepCopy(t)}setOption(e,t){this.transact(()=>{this._options.set(e,t)})}getMetadata(e){return this._metadata.get(e)}setMetadata(e,t){this.transact(()=>{this._metadata.set(e,t)})}removeMetadata(e){this._metadata.has(e)&&this._metadata.delete(e)}get metadata(){return n.JSONExt.deepCopy(this._metadata.toJSON())}set metadata(e){this.transact(()=>{for(const[t,r]of Object.entries(e))this._metadata.set(t,r)})}get metadataChanged(){return this._metadataChanged}static create(){return new d}_getLayerAsYMap(e){if(this._layers.has(e))return this._layers.get(e)}_getSourceAsYMap(e){if(this._sources.has(e))return this._sources.get(e)}_layersObserver(e){const t=[];let r=!1;e.forEach(e=>{e.keys.forEach((s,a)=>{r||(r=!0),t.push({id:a,oldValue:s.oldValue,newValue:n.JSONExt.deepCopy(e.target.toJSON()[a])})})}),r=0===t.length||r,r&&this._layersChanged.emit({layerChange:t})}_layerTreeObserver(e){const t=e.delta;this._layerTreeChanged.emit({layerTreeChange:t})}_sourcesObserver(e){const t=[];let r=!1;e.forEach(e=>{e.keys.forEach((s,a)=>{r||(r=!0),t.push({id:a,newValue:n.JSONExt.deepCopy(e.target.toJSON()[a])})})}),r=0===t.length||r,r&&this._sourcesChanged.emit({sourceChange:t})}}const h=JSON.parse('{"type":"object","title":"IJGISContent","required":["layers","sources"],"additionalProperties":false,"properties":{"schemaVersion":{"type":"string","default":"0.5.0"},"layers":{"$ref":"#/definitions/jGISLayers"},"sources":{"$ref":"#/definitions/jGISSources"},"layerTree":{"$ref":"#/definitions/jGISLayerTree"},"options":{"$ref":"#/definitions/jGISOptions"},"metadata":{"type":"object","patternProperties":{"^.*$":{"type":"string"}},"additionalProperties":false}},"definitions":{"layerType":{"type":"string","enum":["RasterLayer","VectorLayer","VectorTileLayer","HillshadeLayer","WebGlLayer","ImageLayer","HeatmapLayer","StacLayer"]},"sourceType":{"type":"string","enum":["RasterSource","VectorTileSource","GeoJSONSource","RasterDemSource","VideoSource","ImageSource","ShapefileSource","GeoTiffSource","GeoParquetSource"]},"jGISLayer":{"title":"IJGISLayer","type":"object","additionalProperties":false,"required":["name","type","visible"],"properties":{"name":{"type":"string"},"type":{"$ref":"#/definitions/layerType"},"visible":{"type":"boolean","default":true},"parameters":{"type":"object"},"filters":{"$ref":"#/definitions/jGISFilter"}}},"jGISSource":{"title":"IJGISSource","type":"object","additionalProperties":false,"required":["name","type"],"properties":{"name":{"type":"string"},"type":{"$ref":"#/definitions/sourceType"},"parameters":{"type":"object"}}},"jGISLayerGroup":{"title":"IJGISLayerGroup","type":"object","additionalProperties":false,"required":["name","layers"],"properties":{"name":{"type":"string"},"layers":{"type":"array","default":[],"items":{"$ref":"#/definitions/jGISLayerItem"}},"visible":{"type":"boolean","default":true},"parameters":{"type":"object"}}},"jGISLayerItem":{"title":"IJGISLayerItem","oneOf":[{"type":"string"},{"$ref":"#/definitions/jGISLayerGroup"}]},"jGISLayers":{"title":"IJGISLayers","type":"object","default":{},"additionalProperties":{"$ref":"#/definitions/jGISLayer"}},"jGISSources":{"title":"IJGISSources","type":"object","default":{},"additionalProperties":{"$ref":"#/definitions/jGISSource"}},"jGISLayerTree":{"title":"IJGISLayerTree","type":"array","default":[],"items":{"$ref":"#/definitions/jGISLayerItem"}},"jGISOptions":{"title":"IJGISOptions","type":"object","default":{},"required":[],"additionalProperties":false,"properties":{"latitude":{"type":"number","default":0},"longitude":{"type":"number","default":0},"zoom":{"type":"number","default":0},"bearing":{"type":"number","default":0},"pitch":{"type":"number","default":0},"extent":{"type":"array","default":null,"items":{"type":"number"}},"projection":{"type":"string","default":"EPSG:3857"},"useExtent":{"type":"boolean","default":false}}},"jGISFilterItem":{"title":"IJGISFilterItem","type":"object","default":{},"required":["operator","feature","value"],"additionalProperties":false,"properties":{"operator":{"type":"string","enum":["==","!=",">","<",">=","<=","between"],"default":"=="},"feature":{"type":"string","default":""},"value":{"type":["string","number"]},"betweenMin":{"type":["number"]},"betweenMax":{"type":["number"]}}},"jGISFilter":{"title":"IJGISFilter","type":"object","required":["logicalOp","appliedFilters"],"additionalProperties":false,"properties":{"logicalOp":{"type":"string","default":"all"},"appliedFilters":{"type":"array","default":[],"items":{"$ref":"#/definitions/jGISFilterItem"}}}}}}');class g{constructor(e){this._onSharedModelChanged=(e,t)=>{var r;t&&(null===(r=null==t?void 0:t.objectChange)||void 0===r?void 0:r.length)&&(this._contentChanged.emit(void 0),this.dirty=!0)},this.collaborative=void 0===document.querySelectorAll("[data-jupyter-lite-root]")[0],this.flyToGeometrySignal=new s.Signal(this),this.highlightFeatureSignal=new s.Signal(this),this.updateBboxSignal=new s.Signal(this),this._onClientStateChanged=e=>{const t=this.sharedModel.awareness.getStates();this._clientStateChanged.emit(t),(e.added.length||e.removed.length)&&this._userChanged.emit(this.users)},this.addFeatureAsMs=(e,t)=>{this.addFeatureAsMsSignal.emit(JSON.stringify({id:e,selectedFeature:t}))},this.triggerLayerUpdate=(e,t)=>{this.updateLayerSignal.emit(JSON.stringify({layerId:e,layer:t}))},this.defaultKernelName="",this.defaultKernelLanguage="",this._dirty=!1,this._readOnly=!1,this._isDisposed=!1,this._userChanged=new s.Signal(this),this._disposed=new s.Signal(this),this._contentChanged=new s.Signal(this),this._stateChanged=new s.Signal(this),this._themeChanged=new s.Signal(this),this._clientStateChanged=new s.Signal(this),this._sharedMetadataChanged=new s.Signal(this),this._zoomToPositionSignal=new s.Signal(this),this._addFeatureAsMsSignal=new s.Signal(this),this._updateLayerSignal=new s.Signal(this),this._isIdentifying=!1,this._isTemporalControllerActive=!1,this._geolocationChanged=new s.Signal(this),this._tileFeatureCache=new Map;const{annotationModel:t,sharedModel:r,settingRegistry:a}=e;r?this._sharedModel=r:(this._sharedModel=d.create(),this._sharedModel.changed.connect(this._onSharedModelChanged)),this.sharedModel.awareness.on("change",this._onClientStateChanged),this._sharedModel.metadataChanged.connect(this._metadataChangedHandler,this),this.annotationModel=t,this.settingRegistry=a,this._pathChanged=new s.Signal(this)}async initSettings(){if(this.settingRegistry){const e=await this.settingRegistry.load("@jupytergis/jupytergis-core:jupytergis-settings");this._settings=e.composite,e.changed.connect(()=>{this._settings=e.composite,console.log("JupyterGIS Settings updated:",this._settings)})}}getSettings(){return this._settings}getFeaturesForCurrentTile({sourceId:e}){var t;return Array.from(null!==(t=this._tileFeatureCache.get(e))&&void 0!==t?t:[])}syncTileFeatures({sourceId:e,features:t}){let r=this._tileFeatureCache.get(e);r||(r=new Set,this._tileFeatureCache.set(e,r)),t.forEach(e=>r.add(e))}get sharedModel(){return this._sharedModel}get isDisposed(){return this._isDisposed}get contentChanged(){return this._contentChanged}get stateChanged(){return this._stateChanged}get pathChanged(){return this._pathChanged}get themeChanged(){return this._themeChanged}get currentUserId(){var e;return null===(e=this.sharedModel)||void 0===e?void 0:e.awareness.clientID}get users(){var e;this._usersMap=null===(e=this._sharedModel)||void 0===e?void 0:e.awareness.getStates();const t=[];return this._usersMap&&this._usersMap.forEach((e,r)=>{t.push({userId:r,userData:e.user})}),t}get userChanged(){return this._userChanged}get dirty(){return this._dirty}set dirty(e){this._dirty=e}get readOnly(){return this._readOnly}set readOnly(e){this._readOnly=e}get localState(){return this.sharedModel.awareness.getLocalState()}get clientStateChanged(){return this._clientStateChanged}get sharedOptionsChanged(){return this.sharedModel.optionsChanged}get sharedLayersChanged(){return this.sharedModel.layersChanged}get sharedLayerTreeChanged(){return this.sharedModel.layerTreeChanged}get sharedSourcesChanged(){return this.sharedModel.sourcesChanged}get disposed(){return this._disposed}get sharedMetadataChanged(){return this._sharedMetadataChanged}get zoomToPositionSignal(){return this._zoomToPositionSignal}set isIdentifying(e){this._isIdentifying=e}get isIdentifying(){return this._isIdentifying}set isTemporalControllerActive(e){this._isTemporalControllerActive=e}get isTemporalControllerActive(){return this._isTemporalControllerActive}centerOnPosition(e){this._zoomToPositionSignal.emit(e)}_metadataChangedHandler(e,t){this._sharedMetadataChanged.emit(t)}addMetadata(e,t){this.sharedModel.setMetadata(e,t)}removeMetadata(e){this.sharedModel.removeMetadata(e)}dispose(){this._isDisposed||(this._isDisposed=!0,this._sharedModel.dispose(),this._disposed.emit(),s.Signal.clearData(this))}toString(){return JSON.stringify(this.getContent(),null,2)}fromString(e){const t=JSON.parse(e),r=(new(i())).compile(h);if(!r(t)){let e="JupyterGIS format errors:\n";for(const t of r.errors||[])e=`${e}- ${t.instancePath} ${t.message}\n`;console.warn(e)}this.sharedModel.transact(()=>{var e,r,s,a,i;this.sharedModel.sources=null!==(e=t.sources)&&void 0!==e?e:{},this.sharedModel.layers=null!==(r=t.layers)&&void 0!==r?r:{},this.sharedModel.layerTree=null!==(s=t.layerTree)&&void 0!==s?s:[],this.sharedModel.options=null!==(a=t.options)&&void 0!==a?a:{latitude:0,longitude:0,zoom:0,bearing:0,pitch:0,projection:"EPSG:3857"},this.sharedModel.metadata=null!==(i=t.metadata)&&void 0!==i?i:{}}),this.dirty=!0}toJSON(){return JSON.parse(this.toString())}fromJSON(e){}initialize(){}getWorker(){return g.worker}getContent(){return{sources:this.sharedModel.sources,layers:this.sharedModel.layers,layerTree:this.sharedModel.layerTree,options:this.sharedModel.options,metadata:this.sharedModel.metadata}}get contentsManager(){return this._contentsManager}set contentsManager(e){this._contentsManager=e}get filePath(){return this._filePath}set filePath(e){this._filePath=e,this._pathChanged.emit(e)}getLayers(){return this.sharedModel.layers}getSources(){return this.sharedModel.sources}getLayerTree(){return this.sharedModel.layerTree}getLayer(e){return this.sharedModel.getLayer(e)}getSource(e){return this.sharedModel.getLayerSource(e)}getSourcesByType(e){const t={};for(const r of Object.keys(this.getSources()||{})){const s=this.getSource(r);(null==s?void 0:s.type)===e&&(t[r]=s.name)}return t}getLayersBySource(e){const t=[];return Object.entries(this.getLayers()||{}).forEach(([r,s])=>{var a;(null===(a=s.parameters)||void 0===a?void 0:a.source)===e&&t.push(r)}),t}addGroup(e,t,r){if(u.findItemPath(this.getLayerTree(),e).length)return void console.warn(`The group "${t}" already exist in the layer tree`);const s={name:e,layers:[]};this._addLayerTreeItem(s,t,r)}addLayer(e,t,r,s){this.getLayer(e)||this.sharedModel.addLayer(e,t),this._addLayerTreeItem(e,r,s)}removeLayer(e){var t;const r=this._sharedModel.getLayer(e),s=null===(t=null==r?void 0:r.parameters)||void 0===t?void 0:t.source;this._removeLayerTreeLayer(this.getLayerTree(),e),this.sharedModel.removeLayer(e),this.sharedModel.removeSource(s)}setOptions(e){this._sharedModel.options=e}getOptions(){return this._sharedModel.options}syncViewport(e,t){this.sharedModel.awareness.setLocalStateField("viewportState",{value:e,emitter:t})}syncPointer(e,t){this.sharedModel.awareness.setLocalStateField("pointer",{value:e,emitter:t})}syncSelected(e,t){this.sharedModel.awareness.setLocalStateField("selected",{value:e,emitter:t})}syncIdentifiedFeatures(e,t){this.sharedModel.awareness.setLocalStateField("identifiedFeatures",{value:e,emitter:t})}setUserToFollow(e){this._sharedModel&&this._sharedModel.awareness.setLocalStateField("remoteUser",e)}getClientId(){return this.sharedModel.awareness.clientID}_addLayerTreeItem(e,t,r){if(t){const s=this._getLayerTreeInfo(t);s&&(s.workingGroup.layers.splice(null!=r?r:s.workingGroup.layers.length,0,e),this._sharedModel.updateLayerTreeItem(s.mainGroupIndex,s.mainGroup))}else this.sharedModel.addLayerTreeItem(null!=r?r:this.getLayerTree().length,e)}moveItemsToGroup(e,t,r){const s=this.getLayerTree();for(const a of e)if(this.getLayer(a))this._removeLayerTreeLayer(s,a),this._addLayerTreeItem(a,t,r);else{const e=this._getLayerTreeInfo(a);if(void 0===e)continue;const i=Object.assign({},e.workingGroup);this._removeLayerTreeGroup(s,a),this._addLayerTreeItem(i,t,r)}}moveItemRelatedTo(e,t,r){var s;const a=this.getLayerTree();let i;if(this.getLayer(e))this._removeLayerTreeLayer(a,e),i=e;else{const t=this._getLayerTreeInfo(e);if(void 0===t)return;i=Object.assign({},t.workingGroup),this._removeLayerTreeGroup(a,e)}const o=u.findItemPath(a,t),n=(null!==(s=o.pop())&&void 0!==s?s:0)+(r?1:0);let l="",d=o.shift();if(void 0!==d){let e=a[d];for(;o.length&&(d=o.shift(),void 0!==d);)e=e.layers[d];l=e.name}this._addLayerTreeItem(i,l,n)}addNewLayerGroup(e,t){const r=this.getLayerTree();for(const t in e)this._removeLayerTreeLayer(r,t);this._addLayerTreeItem(t)}_removeLayerTreeLayer(e,t){this._removeLayerTreeItem(e,t,!0),this.sharedModel.layerTree=e}_removeLayerTreeGroup(e,t){this._removeLayerTreeItem(e,t,!1),this.sharedModel.layerTree=e}_removeLayerTreeItem(e,t,r){for(let s=0;s<e.length;s++){const a=e[s];(r?"string"==typeof a&&a===t:"string"!=typeof a&&a.name===t)?(e.splice(s,1),s--):"string"!=typeof a&&"layers"in a&&this._removeLayerTreeItem(a.layers,t,r)}}renameLayerGroup(e,t){const r=this._getLayerTreeInfo(e);r?(r.workingGroup.name=t,this._sharedModel.updateLayerTreeItem(r.mainGroupIndex,r.mainGroup)):console.log("Something went wrong when renaming layer")}removeLayerGroup(e){const t=this.getLayerTree(),r=this._getLayerTreeInfo(e),s=function e(t,r){const s=[];for(const a of t)if("string"==typeof a)s.push(a);else if(a.name!==r){const t=e(a.layers,r);s.push(Object.assign(Object.assign({},a),{layers:t}))}return s}(t,e);r&&this._sharedModel.updateLayerTreeItem(r.mainGroupIndex,s[r.mainGroupIndex])}toggleIdentify(){this._isIdentifying=!this._isIdentifying}toggleTemporalController(){this._isTemporalControllerActive=!this._isTemporalControllerActive,this.sharedModel.awareness.setLocalStateField("isTemporalControllerActive",this._isTemporalControllerActive)}_getLayerTreeInfo(e){const t=this.getLayerTree(),r=u.findItemPath(t,e);if(!r.length)return void console.warn(`The group "${e}" does not exist in the layer tree`);const s=r.shift();if(void 0===s)return;const a=t[s];let i=a;for(;r.length;){const e=r.shift();if(void 0===e)break;i=i.layers[e]}return{mainGroup:a,workingGroup:i,mainGroupIndex:s}}get addFeatureAsMsSignal(){return this._addFeatureAsMsSignal}get updateLayerSignal(){return this._updateLayerSignal}get geolocation(){return this._geolocation}set geolocation(e){this._geolocation=e,this.geolocationChanged.emit(this.geolocation)}get geolocationChanged(){return this._geolocationChanged}}var u;!function(e){e.getOrderedLayerIds=function(e){return u.layerTreeRecursion(e.sharedModel.layerTree)}}(g||(g={})),function(e){e.layerTreeRecursion=function e(t,r=[]){for(const s of t)"string"==typeof s?r.push(s):r.push(...e(s.layers));return r},e.findItemPath=function e(t,r,s=[]){for(let a=0;a<t.length;a++){const i=t[a];if("string"==typeof i){if(i===r){const e=[...s];return e.push(a),e}}else{const t=[...s];if(t.push(a),i.name===r)return t;const o=e(i.layers,r,t);if(o.length>t.length)return o}}return s}}(u||(u={}));const y=new n.Token("jupyterGISDocTracker"),c=new n.Token("jupytergisFormSchemaRegistry"),p=new n.Token("jupytergisExternalCommandRegistry"),m=new n.Token("jupytergisExternalCommandRegistry"),_=new n.Token("jupytergisAnnotationModel"),S={vector:"vector"},f=JSON.parse('[{"description":"Buffer","name":"buffer","label":"Buffer","operationParams":["bufferDistance"],"operations":{"gdalFunction":"ogr2ogr","sql":"SELECT ST_Union(ST_Buffer(geometry, {bufferDistance})) AS geometry, * FROM \\"{layerName}\\""},"type":"vector"},{"description":"ConcaveHull","name":"concaveHull","operationParams":["pctconvex","allowHoles"],"label":"Concave Hull","operations":{"sql":"SELECT ST_ConcaveHull(geometry,{pctconvex},{allowHoles}) AS geometry, * FROM \\"{layerName}\\"","gdalFunction":"ogr2ogr"},"type":"vector"},{"description":"Centroids","name":"centroids","operationParams":[],"label":"Centroids","operations":{"gdalFunction":"ogr2ogr","sql":"SELECT ST_Centroid(geometry) AS geometry, * FROM \\"{layerName}\\""},"type":"vector"},{"description":"ConvexHull","name":"convexHull","operationParams":[],"label":"Convex Hull","operations":{"sql":"SELECT ST_ConvexHull(geometry) AS geometry, * FROM \\"{layerName}\\"","gdalFunction":"ogr2ogr"},"type":"vector"},{"description":"Dissolve","name":"dissolve","operationParams":["dissolveField"],"label":"Dissolve","operations":{"gdalFunction":"ogr2ogr","sql":"SELECT ST_Union(geometry) AS geometry, {dissolveField} FROM \\"{layerName}\\" GROUP BY {dissolveField}"},"type":"vector"},{"description":"BoundingBoxes","name":"boundingBoxes","operationParams":[],"label":"Bounding Boxes","operations":{"sql":"SELECT ST_Envelope(geometry) AS geometry, * FROM \\"{layerName}\\"","gdalFunction":"ogr2ogr"},"type":"vector"}]'),T={};for(const e of f)T[e.name]=`jupytergis:${e.name}`;const v=["Buffer","ConcaveHull","Centroids","ConvexHull","Dissolve","BoundingBoxes"]}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_jupytergis_jupytergis_core=self.webpackChunk_jupytergis_jupytergis_core||[]).push([[465],{12465:(e,t,n)=>{n.d(t,{asyncBufferFromUrl:()=>W,toGeoJson:()=>_e});const r=["BOOLEAN","INT32","INT64","INT96","FLOAT","DOUBLE","BYTE_ARRAY","FIXED_LEN_BYTE_ARRAY"],i=["PLAIN",void 0,"PLAIN_DICTIONARY","RLE","BIT_PACKED","DELTA_BINARY_PACKED","DELTA_LENGTH_BYTE_ARRAY","DELTA_BYTE_ARRAY","RLE_DICTIONARY","BYTE_STREAM_SPLIT"],o=["REQUIRED","OPTIONAL","REPEATED"],f=["UTF8","MAP","MAP_KEY_VALUE","LIST","ENUM","DECIMAL","DATE","TIME_MILLIS","TIME_MICROS","TIMESTAMP_MILLIS","TIMESTAMP_MICROS","UINT_8","UINT_16","UINT_32","UINT_64","INT_8","INT_16","INT_32","INT_64","JSON","BSON","INTERVAL"],s=["UNCOMPRESSED","SNAPPY","GZIP","LZO","BROTLI","LZ4","ZSTD","LZ4_RAW"],l=["DATA_PAGE","INDEX_PAGE","DICTIONARY_PAGE","DATA_PAGE_V2"],a=864e5;function c(e,t,n,r,i=!0){if(t&&r.endsWith("_DICTIONARY")){t=u(t,n,i);let r=e;e instanceof Uint8Array&&!(t instanceof Uint8Array)&&(r=new t.constructor(e.length));for(let n=0;n<e.length;n++)r[n]=t[e[n]];return r}return u(e,n,i)}function u(e,t,n=!0){const r=t.converted_type;if("DECIMAL"===r){const n=t.scale||0,r=Math.pow(10,-n),i=new Array(e.length);for(let t=0;t<i.length;t++)e[0]instanceof Uint8Array?i[t]=d(e[t])*r:i[t]=Number(e[t])*r;return i}if(void 0===r&&"INT96"===t.type)return Array.from(e).map(_);if("DATE"===r){const t=new Array(e.length);for(let n=0;n<t.length;n++)t[n]=new Date(e[n]*a);return t}if("TIMESTAMP_MILLIS"===r){const t=new Array(e.length);for(let n=0;n<t.length;n++)t[n]=new Date(Number(e[n]));return t}if("TIMESTAMP_MICROS"===r){const t=new Array(e.length);for(let n=0;n<t.length;n++)t[n]=new Date(Number(e[n]/1000n));return t}if("JSON"===r){const t=new TextDecoder;return e.map(e=>JSON.parse(t.decode(e)))}if("BSON"===r)throw new Error("parquet bson not supported");if("INTERVAL"===r)throw new Error("parquet interval not supported");if("UTF8"===r||n&&"BYTE_ARRAY"===t.type){const t=new TextDecoder,n=new Array(e.length);for(let r=0;r<n.length;r++)n[r]=e[r]&&t.decode(e[r]);return n}if("UINT_64"===r){const t=new BigUint64Array(e.length);for(let n=0;n<t.length;n++)t[n]=BigInt(e[n]);return t}if("FLOAT16"===t.logical_type?.type)return Array.from(e).map(p);if("TIMESTAMP"===t.logical_type?.type){const{unit:n}=t.logical_type;let r=1n;"MICROS"===n&&(r=1000n),"NANOS"===n&&(r=1000000n);const i=new Array(e.length);for(let t=0;t<i.length;t++)i[t]=new Date(Number(e[t]/r));return i}return e}function d(e){let t=0;for(const n of e)t=t<<8|n;return t}function _(e){const t=Number((e>>64n)-2440588n),n=Number((0xffffffffffffffffn&e)/1000000n);return new Date(t*a+n)}function p(e){if(!e)return;const t=e[1]<<8|e[0],n=t>>15?-1:1,r=t>>10&31,i=1023&t;return 0===r?n*Math.pow(2,-14)*(i/1024):31===r?i?NaN:n*(1/0):n*Math.pow(2,r-15)*(1+i/1024)}const w={STOP:0,TRUE:1,FALSE:2,BYTE:3,I16:4,I32:5,I64:6,DOUBLE:7,BINARY:8,LIST:9,SET:10,MAP:11,STRUCT:12,UUID:13};function h(e){let t=0;const n={};for(;e.offset<e.view.byteLength;){const[r,i,o]=A(e,t);if(t=o,r===w.STOP)break;n[`field_${i}`]=g(e,r)}return n}function g(e,t){switch(t){case w.TRUE:return!0;case w.FALSE:return!1;case w.BYTE:return e.view.getInt8(e.offset++);case w.I16:case w.I32:return function(e){const t=y(e);return t>>>1^-(1&t)}(e);case w.I64:return m(e);case w.DOUBLE:{const t=e.view.getFloat64(e.offset,!0);return e.offset+=8,t}case w.BINARY:{const t=y(e),n=new Uint8Array(e.view.buffer,e.view.byteOffset+e.offset,t);return e.offset+=t,n}case w.LIST:{const[t,n]=function(e){const t=e.view.getUint8(e.offset++),n=t>>4,r=E(t);return 15===n?[r,y(e)]:[r,n]}(e),r=t===w.TRUE||t===w.FALSE,i=new Array(n);for(let o=0;o<n;o++)i[o]=r?1===g(e,w.BYTE):g(e,t);return i}case w.STRUCT:{const t={};let n=0;for(;;){let r,i;if([r,i,n]=A(e,n),r===w.STOP)break;t[`field_${i}`]=g(e,r)}return t}case w.UUID:{let t="";for(let n=0;n<16;n++)t+=e.view.getUint8(e.offset++).toString(16).padStart(2,"0");return t}default:throw new Error(`thrift unhandled type: ${t}`)}}function y(e){let t=0,n=0;for(;;){const r=e.view.getUint8(e.offset++);if(t|=(127&r)<<n,!(128&r))return t;n+=7}}function m(e){const t=function(e){let t=0n,n=0n;for(;;){const r=e.view.getUint8(e.offset++);if(t|=BigInt(127&r)<<n,!(128&r))return t;n+=7n}}(e);return t>>BigInt(1)^-(t&BigInt(1))}function E(e){return 15&e}function A(e,t){const n=e.view.getUint8(e.offset++);if((15&n)===w.STOP)return[0,0,t];const r=n>>4;let i;if(!r)throw new Error("non-delta field id not supported");return i=t+r,[E(n),i,i]}async function I(e,t=1<<19){if(!e)throw new Error("parquet file is required");if(!(e.byteLength>=0))throw new Error("parquet file byteLength is required");const n=Math.max(0,e.byteLength-t),r=await e.slice(n,e.byteLength),i=new DataView(r);if(827474256!==i.getUint32(r.byteLength-4,!0))throw new Error("parquet file invalid (footer != PAR1)");const o=i.getUint32(r.byteLength-8,!0);if(o>e.byteLength-8)throw new Error(`parquet metadata length ${o} exceeds available buffer ${e.byteLength-8}`);if(o+8>t){const t=e.byteLength-o-8,i=await e.slice(t,n),f=new ArrayBuffer(o+8),s=new Uint8Array(f);return s.set(new Uint8Array(i)),s.set(new Uint8Array(r),n-t),T(f)}return T(r)}function T(e){if(!e)throw new Error("parquet file is required");const t=new DataView(e);if(t.byteLength<8)throw new Error("parquet file is too short");if(827474256!==t.getUint32(t.byteLength-4,!0))throw new Error("parquet file invalid (footer != PAR1)");const n=t.byteLength-8,a=t.getUint32(n,!0);if(a>t.byteLength-8)throw new Error(`parquet metadata length ${a} exceeds available buffer ${t.byteLength-8}`);const c=h({view:t,offset:n-a}),u=new TextDecoder;function d(e){return e&&u.decode(e)}const _=c.field_1,p=c.field_2.map(e=>({type:r[e.field_1],type_length:e.field_2,repetition_type:o[e.field_3],name:d(e.field_4),num_children:e.field_5,converted_type:f[e.field_6],scale:e.field_7,precision:e.field_8,field_id:e.field_9,logical_type:v(e.field_10)})),w=p.filter(e=>e.type),g=c.field_3,y=c.field_4.map(e=>({columns:e.field_1.map((e,t)=>({file_path:d(e.field_1),file_offset:e.field_2,meta_data:e.field_3&&{type:r[e.field_3.field_1],encodings:e.field_3.field_2?.map(e=>i[e]),path_in_schema:e.field_3.field_3.map(d),codec:s[e.field_3.field_4],num_values:e.field_3.field_5,total_uncompressed_size:e.field_3.field_6,total_compressed_size:e.field_3.field_7,key_value_metadata:e.field_3.field_8,data_page_offset:e.field_3.field_9,index_page_offset:e.field_3.field_10,dictionary_page_offset:e.field_3.field_11,statistics:L(e.field_3.field_12,w[t]),encoding_stats:e.field_3.field_13?.map(e=>({page_type:l[e.field_1],encoding:i[e.field_2],count:e.field_3})),bloom_filter_offset:e.field_3.field_14,bloom_filter_length:e.field_3.field_15,size_statistics:e.field_3.field_16&&{unencoded_byte_array_data_bytes:e.field_3.field_16.field_1,repetition_level_histogram:e.field_3.field_16.field_2,definition_level_histogram:e.field_3.field_16.field_3}},offset_index_offset:e.field_4,offset_index_length:e.field_5,column_index_offset:e.field_6,column_index_length:e.field_7,crypto_metadata:e.field_7,encrypted_column_metadata:e.field_8})),total_byte_size:e.field_2,num_rows:e.field_3,sorting_columns:e.field_4?.map(e=>({column_idx:e.field_1,descending:e.field_2,nulls_first:e.field_3})),file_offset:e.field_5,total_compressed_size:e.field_6,ordinal:e.field_7})),m=c.field_5?.map(e=>({key:d(e.field_1),value:d(e.field_2)}));return{version:_,schema:p,num_rows:g,row_groups:y,key_value_metadata:m,created_by:d(c.field_6),metadata_length:a}}function v(e){return e?.field_1?{type:"STRING"}:e?.field_2?{type:"MAP"}:e?.field_3?{type:"LIST"}:e?.field_4?{type:"ENUM"}:e?.field_5?{type:"DECIMAL",scale:e.field_5.field_1,precision:e.field_5.field_2}:e?.field_6?{type:"DATE"}:e?.field_7?{type:"TIME",isAdjustedToUTC:e.field_7.field_1,unit:b(e.field_7.field_2)}:e?.field_8?{type:"TIMESTAMP",isAdjustedToUTC:e.field_8.field_1,unit:b(e.field_8.field_2)}:e?.field_10?{type:"INTEGER",bitWidth:e.field_10.field_1,isSigned:e.field_10.field_2}:e?.field_11?{type:"NULL"}:e?.field_12?{type:"JSON"}:e?.field_13?{type:"BSON"}:e?.field_14?{type:"UUID"}:e?.field_15?{type:"FLOAT16"}:e}function b(e){if(e.field_1)return"MILLIS";if(e.field_2)return"MICROS";if(e.field_3)return"NANOS";throw new Error("parquet time unit required")}function L(e,t){return e&&{max:N(e.field_1,t),min:N(e.field_2,t),null_count:e.field_3,distinct_count:e.field_4,max_value:N(e.field_5,t),min_value:N(e.field_6,t),is_max_value_exact:e.field_7,is_min_value_exact:e.field_8}}function N(e,t){const{type:n,converted_type:r,logical_type:i}=t;if(void 0===e)return e;if("BOOLEAN"===n)return 1===e[0];if("BYTE_ARRAY"===n)return(new TextDecoder).decode(e);const o=new DataView(e.buffer,e.byteOffset,e.byteLength);return"FLOAT"===n&&4===o.byteLength?o.getFloat32(0,!0):"DOUBLE"===n&&8===o.byteLength?o.getFloat64(0,!0):"INT32"===n&&"DATE"===r?new Date(864e5*o.getInt32(0,!0)):"INT64"===n&&"TIMESTAMP_MICROS"===r?new Date(Number(o.getBigInt64(0,!0)/1000n)):"INT64"===n&&"TIMESTAMP_MILLIS"===r?new Date(Number(o.getBigInt64(0,!0))):"INT64"===n&&"TIMESTAMP"===i?.type&&"NANOS"===i?.unit?new Date(Number(o.getBigInt64(0,!0)/1000000n)):"INT64"===n&&"TIMESTAMP"===i?.type&&"MICROS"===i?.unit?new Date(Number(o.getBigInt64(0,!0)/1000n)):"INT64"===n&&"TIMESTAMP"===i?.type?new Date(Number(o.getBigInt64(0,!0))):"INT32"===n&&4===o.byteLength?o.getInt32(0,!0):"INT64"===n&&8===o.byteLength?o.getBigInt64(0,!0):"DECIMAL"===r?d(e)*Math.pow(10,-(t.scale||0)):"FLOAT16"===i?.type?p(e):e}function R(e,t,n){const r=e[t],i=[];let o=1;if(r.num_children)for(;i.length<r.num_children;){const r=e[t+o],f=R(e,t+o,[...n,r.name]);o+=f.count,i.push(f)}return{count:o,element:r,children:i,path:n}}function U(e,t){let n=R(e,0,[]);const r=[n];for(const e of t){const i=n.children.find(t=>t.element.name===e);if(!i)throw new Error(`parquet schema element not found: ${t}`);r.push(i),n=i}return r}function D(e){let t=0;for(const{element:n}of e)"REPEATED"===n.repetition_type&&t++;return t}function O(e){let t=0;for(const{element:n}of e.slice(1))"REQUIRED"!==n.repetition_type&&t++;return t}function P(e,t,n,r,i,o){const f=t?.length||n.length;let s=0;const l=[e];let a=e,c=0,u=0,d=0;if(n[0])for(;c<i.length-2&&d<n[0];)a=a.at(-1),l.push(a),c++,"REQUIRED"!==i[c]&&u++,"REPEATED"===i[c]&&d++;for(let e=0;e<f;e++){const f=t?.length?t[e]:o,_=n[e];for(;c&&(_<d||"REPEATED"!==i[c]);)"REQUIRED"!==i[c]&&(l.pop(),u--),"REPEATED"===i[c]&&d--,c--;for(a=l.at(-1);(c<i.length-2||"REPEATED"===i[c+1])&&(u<f||"REQUIRED"===i[c+1]);){if(c++,"REQUIRED"!==i[c]){const e=[];a.push(e),a=e,l.push(e),u++}"REPEATED"===i[c]&&d++}f===o?a.push(r[s++]):c===i.length-2?a.push(null):a.push([])}if(!e.length)for(let e=0;e<o;e++){const e=[];a.push(e),a=e}return e}function S(e,t,n=0){const r=t.path.join("."),i="OPTIONAL"===t.element.repetition_type,o=i?n+1:n;if(function(e){if(!e)return!1;if("LIST"!==e.element.converted_type)return!1;if(e.children.length>1)return!1;const t=e.children[0];return!(t.children.length>1)&&"REPEATED"===t.element.repetition_type}(t)){let f=t.children[0],s=o;1===f.children.length&&(f=f.children[0],s++),S(e,f,s);const l=f.path.join("."),a=e.get(l);if(!a)throw new Error("parquet list column missing values");return i&&M(a,n),e.set(r,a),void e.delete(l)}if(function(e){if(!e)return!1;if("MAP"!==e.element.converted_type)return!1;if(e.children.length>1)return!1;const t=e.children[0];if(2!==t.children.length)return!1;if("REPEATED"!==t.element.repetition_type)return!1;const n=t.children.find(e=>"key"===e.element.name);if("REPEATED"===n?.element.repetition_type)return!1;const r=t.children.find(e=>"value"===e.element.name);return"REPEATED"!==r?.element.repetition_type}(t)){const f=t.children[0].element.name;S(e,t.children[0].children[0],o+1),S(e,t.children[0].children[1],o+1);const s=e.get(`${r}.${f}.key`),l=e.get(`${r}.${f}.value`);if(!s)throw new Error("parquet map column missing keys");if(!l)throw new Error("parquet map column missing values");if(s.length!==l.length)throw new Error("parquet map column key/value length mismatch");const a=B(s,l,o);return i&&M(a,n),e.delete(`${r}.${f}.key`),e.delete(`${r}.${f}.value`),void e.set(r,a)}if(t.children.length){const o="REQUIRED"===t.element.repetition_type?n:n+1,f={};for(const n of t.children){S(e,n,o);const t=e.get(n.path.join("."));if(!t)throw new Error("parquet struct missing child data");f[n.element.name]=t}for(const n of t.children)e.delete(n.path.join("."));const s=q(f,o);i&&M(s,n),e.set(r,s)}}function M(e,t){for(let n=0;n<e.length;n++)t?M(e[n],t-1):e[n]=e[n][0]}function B(e,t,n){const r=[];for(let i=0;i<e.length;i++)if(n)r.push(B(e[i],t[i],n-1));else if(e[i]){const n={};for(let r=0;r<e[i].length;r++){const o=t[i][r];n[e[i][r]]=void 0===o?null:o}r.push(n)}else r.push(void 0);return r}function q(e,t){const n=Object.keys(e),r=e[n[0]]?.length,i=[];for(let o=0;o<r;o++){const f={};for(const t of n){if(e[t].length!==r)throw new Error("parquet struct parsing error");f[t]=e[t][o]}t?i.push(q(f,t-1)):i.push(f)}return i}function Y(e,t,n){const r=n instanceof Int32Array,i=y(e),o=y(e);y(e);let f=m(e),s=0;n[s++]=r?Number(f):f;const l=i/o;for(;s<t;){const i=m(e),a=new Uint8Array(o);for(let t=0;t<o;t++)a[t]=e.view.getUint8(e.offset++);for(let c=0;c<o&&s<t;c++){const o=BigInt(a[c]);if(o){let a=0n,c=l;const u=(1n<<o)-1n;for(;c&&s<t;){let t=BigInt(e.view.getUint8(e.offset))>>a&u;for(a+=o;a>=8;)a-=8n,e.offset++,a&&(t|=BigInt(e.view.getUint8(e.offset))<<o-a&u);f+=i+t,n[s++]=r?Number(f):f,c--}c&&(e.offset+=Math.ceil((c*Number(o)+Number(a))/8))}else for(let e=0;e<l&&s<t;e++)f+=i,n[s++]=r?Number(f):f}}}function F(e){return 32-Math.clz32(e)}function $(e,t,n,r){n||(e.offset+=4);let i=0;for(;i<r.length;){const n=y(e);if(1&n)i=x(e,n,t,r,i);else{const o=n>>>1;C(e,o,t,r,i),i+=o}}}function C(e,t,n,r,i){const o=n+7>>3;let f=0;for(let t=0;t<o;t++)f|=e.view.getUint8(e.offset++)<<(t<<3);for(let e=0;e<t;e++)r[i+e]=f}function x(e,t,n,r,i){let o=t>>1<<3;const f=(1<<n)-1;let s=0;if(e.offset<e.view.byteLength)s=e.view.getUint8(e.offset++);else if(f)throw new Error(`parquet bitpack offset ${e.offset} out of range`);let l=8,a=0;for(;o;)a>8?(a-=8,l-=8,s>>>=8):l-a<n?(s|=e.view.getUint8(e.offset)<<l,e.offset++,l+=8):(i<r.length&&(r[i++]=s>>a&f),o--,a+=n);return i}function k(e,t,n,r){const i=function(e,t){switch(e){case"INT32":case"FLOAT":return 4;case"INT64":case"DOUBLE":return 8;case"FIXED_LEN_BYTE_ARRAY":if(!t)throw new Error("parquet byteWidth missing type_length");return t;default:throw new Error(`parquet unsupported type: ${e}`)}}(n,r),o=new Uint8Array(t*i);for(let n=0;n<i;n++)for(let r=0;r<t;r++)o[r*i+n]=e.view.getUint8(e.offset++);if("FLOAT"===n)return new Float32Array(o.buffer);if("DOUBLE"===n)return new Float64Array(o.buffer);if("INT32"===n)return new Int32Array(o.buffer);if("INT64"===n)return new BigInt64Array(o.buffer);if("FIXED_LEN_BYTE_ARRAY"===n){const e=new Array(t);for(let n=0;n<t;n++)e[n]=o.subarray(n*i,(n+1)*i);return e}throw new Error(`parquet byte_stream_split unsupported type: ${n}`)}function j(e,t,n,r){if(0===n)return[];if("BOOLEAN"===t)return function(e,t){const n=new Array(t);for(let r=0;r<t;r++){const t=e.offset+(r/8|0),i=r%8,o=e.view.getUint8(t);n[r]=!!(o&1<<i)}return e.offset+=Math.ceil(t/8),n}(e,n);if("INT32"===t)return function(e,t){const n=(e.view.byteOffset+e.offset)%4?new Int32Array(z(e.view.buffer,e.view.byteOffset+e.offset,4*t)):new Int32Array(e.view.buffer,e.view.byteOffset+e.offset,t);return e.offset+=4*t,n}(e,n);if("INT64"===t)return function(e,t){const n=(e.view.byteOffset+e.offset)%8?new BigInt64Array(z(e.view.buffer,e.view.byteOffset+e.offset,8*t)):new BigInt64Array(e.view.buffer,e.view.byteOffset+e.offset,t);return e.offset+=8*t,n}(e,n);if("INT96"===t)return function(e,t){const n=new Array(t);for(let r=0;r<t;r++){const t=e.view.getBigInt64(e.offset+12*r,!0),i=e.view.getInt32(e.offset+12*r+8,!0);n[r]=BigInt(i)<<64n|t}return e.offset+=12*t,n}(e,n);if("FLOAT"===t)return function(e,t){const n=(e.view.byteOffset+e.offset)%4?new Float32Array(z(e.view.buffer,e.view.byteOffset+e.offset,4*t)):new Float32Array(e.view.buffer,e.view.byteOffset+e.offset,t);return e.offset+=4*t,n}(e,n);if("DOUBLE"===t)return function(e,t){const n=(e.view.byteOffset+e.offset)%8?new Float64Array(z(e.view.buffer,e.view.byteOffset+e.offset,8*t)):new Float64Array(e.view.buffer,e.view.byteOffset+e.offset,t);return e.offset+=8*t,n}(e,n);if("BYTE_ARRAY"===t)return function(e,t){const n=new Array(t);for(let r=0;r<t;r++){const t=e.view.getInt32(e.offset,!0);e.offset+=4,n[r]=new Uint8Array(e.view.buffer,e.view.byteOffset+e.offset,t),e.offset+=t}return n}(e,n);if("FIXED_LEN_BYTE_ARRAY"===t){if(!r)throw new Error("parquet missing fixed length");return function(e,t,n){const r=new Array(t);for(let i=0;i<t;i++)r[i]=new Uint8Array(e.view.buffer,e.view.byteOffset+e.offset,n),e.offset+=n;return r}(e,n,r)}throw new Error(`parquet unhandled type: ${t}`)}function z(e,t,n){const r=new ArrayBuffer(n);return new Uint8Array(r).set(new Uint8Array(e,t,n)),r}const G=[0,255,65535,16777215,4294967295];function V(e,t,n,r,i){for(let o=0;o<i;o++)n[r+o]=e[t+o]}function Q(e,t,n,r){for(let i=0;i<r;i++)e[t+i]=e[t-n+i]}function J(e,t,n,{type:r}){const i=new DataView(e.buffer,e.byteOffset,e.byteLength),o={view:i,offset:0};let f;const s=function(e,t,n){if(n.length>1){const r=D(n);if(r){const n=new Array(t.num_values);return $(e,F(r),0,n),n}}return[]}(o,t,n),{definitionLevels:l,numNulls:a}=function(e,t,n){const r=O(n);if(!r)return{definitionLevels:[],numNulls:0};const i=new Array(t.num_values);$(e,F(r),0,i);let o=t.num_values;for(const e of i)e===r&&o--;return 0===o&&(i.length=0),{definitionLevels:i,numNulls:o}}(o,t,n),c=t.num_values-a;if("PLAIN"===t.encoding){const{type_length:e}=n[n.length-1].element;f=j(o,r,c,e)}else if("PLAIN_DICTIONARY"===t.encoding||"RLE_DICTIONARY"===t.encoding||"RLE"===t.encoding){const e="BOOLEAN"===r?1:i.getUint8(o.offset++);e?(f=new Array(c),$(o,e,i.byteLength-o.offset,f)):f=new Uint8Array(c)}else{if("BYTE_STREAM_SPLIT"!==t.encoding)throw new Error(`parquet unsupported encoding: ${t.encoding}`);{const{type_length:e}=n[n.length-1].element;f=k(o,c,r,e)}}return{definitionLevels:l,repetitionLevels:s,dataPage:f}}function X(e,t,n,r){return j({view:new DataView(e.buffer,e.byteOffset,e.byteLength),offset:0},n.type,t.num_values,r)}function Z(e,t,n,r){let i;const o=r?.[n];if("UNCOMPRESSED"===n)i=e;else if(o)i=o(e,t);else{if("SNAPPY"!==n)throw new Error(`parquet unsupported compression codec: ${n}`);i=new Uint8Array(t),function(e,t){const n=e.byteLength,r=t.byteLength;let i=0,o=0;for(;i<n;){const t=e[i];if(i++,t<128)break}if(r&&i>=n)throw new Error("invalid snappy length header");for(;i<n;){const r=e[i];let f=0;if(i++,i>=n)throw new Error("missing eof marker");if(3&r){let s=0;switch(3&r){case 1:f=4+(r>>>2&7),s=e[i]+(r>>>5<<8),i++;break;case 2:if(n<=i+1)throw new Error("snappy error end of input");f=(r>>>2)+1,s=e[i]+(e[i+1]<<8),i+=2;break;case 3:if(n<=i+3)throw new Error("snappy error end of input");f=(r>>>2)+1,s=e[i]+(e[i+1]<<8)+(e[i+2]<<16)+(e[i+3]<<24),i+=4}if(0===s||isNaN(s))throw new Error(`invalid offset ${s} pos ${i} inputLength ${n}`);if(s>o)throw new Error("cannot copy from before start of buffer");Q(t,o,s,f),o+=f}else{let f=(r>>>2)+1;if(f>60){if(i+3>=n)throw new Error("snappy error literal pos + 3 >= inputLength");const t=f-60;f=e[i]+(e[i+1]<<8)+(e[i+2]<<16)+(e[i+3]<<24),f=1+(f&G[t]),i+=t}if(i+f>n)throw new Error("snappy error literal exceeds input length");V(e,i,t,o,f),i+=f,o+=f}}if(o!==r)throw new Error("premature end of input")}(e,i)}if(i?.length!==t)throw new Error(`parquet decompressed page length ${i?.length} does not match header ${t}`);return i}function H(e,t,n,r,i){const o={view:new DataView(e.buffer,e.byteOffset,e.byteLength),offset:0},{codec:f,type:s}=r,l=t.data_page_header_v2;if(!l)throw new Error("parquet data page header v2 is undefined");const a=function(e,t,n){const r=D(n);if(!r)return[];const i=new Array(t.num_values);return $(e,F(r),t.repetition_levels_byte_length,i),i}(o,l,n);o.offset=l.repetition_levels_byte_length;const c=function(e,t,n){const r=O(n);if(r){const n=new Array(t.num_values);return $(e,F(r),t.definition_levels_byte_length,n),n}}(o,l,n),u=t.uncompressed_page_size-l.definition_levels_byte_length-l.repetition_levels_byte_length;let d=e.subarray(o.offset);!1!==l.is_compressed&&(d=Z(d,u,f,i));const _=new DataView(d.buffer,d.byteOffset,d.byteLength),p={view:_,offset:0};let w;const h=l.num_values-l.num_nulls;if("PLAIN"===l.encoding){const{type_length:e}=n[n.length-1].element;w=j(p,s,h,e)}else if("RLE"===l.encoding)w=new Array(h),$(p,1,0,w),w=w.map(e=>!!e);else if("PLAIN_DICTIONARY"===l.encoding||"RLE_DICTIONARY"===l.encoding){const e=_.getUint8(p.offset++);w=new Array(h),$(p,e,u-1,w)}else if("DELTA_BINARY_PACKED"===l.encoding)w="INT32"===s?new Int32Array(h):new BigInt64Array(h),Y(p,h,w);else if("DELTA_LENGTH_BYTE_ARRAY"===l.encoding)w=new Array(h),function(e,t,n){const r=new Int32Array(t);Y(e,t,r);for(let i=0;i<t;i++)n[i]=new Uint8Array(e.view.buffer,e.view.byteOffset+e.offset,r[i]),e.offset+=r[i]}(p,h,w);else if("DELTA_BYTE_ARRAY"===l.encoding)w=new Array(h),function(e,t,n){const r=new Int32Array(t);Y(e,t,r);const i=new Int32Array(t);Y(e,t,i);for(let o=0;o<t;o++){const t=new Uint8Array(e.view.buffer,e.view.byteOffset+e.offset,i[o]);r[o]?(n[o]=new Uint8Array(r[o]+i[o]),n[o].set(n[o-1].subarray(0,r[o])),n[o].set(t,r[o])):n[o]=t,e.offset+=i[o]}}(p,h,w);else{if("BYTE_STREAM_SPLIT"!==l.encoding)throw new Error(`parquet unsupported encoding: ${l.encoding}`);{const{type_length:e}=n[n.length-1].element;w=k(o,h,s,e)}}return{definitionLevels:c,repetitionLevels:a,dataPage:w}}function K(e,t){for(let n=0;n<t.length;n+=1e4)e.push(...t.slice(n,n+1e4))}async function W({url:e,byteLength:t,requestInit:n}){if(!e)throw new Error("missing url");t||=await async function(e,t){return await fetch(e,{...t,method:"HEAD"}).then(e=>{if(!e.ok)throw new Error(`fetch head failed ${e.status}`);const t=e.headers.get("Content-Length");if(!t)throw new Error("missing content length");return parseInt(t)})}(e,n);const r=n||{};return{byteLength:t,async slice(t,n){const i=new Headers(r.headers),o=void 0===n?"":n-1;i.set("Range",`bytes=${t}-${o}`);const f=await fetch(e,{...r,headers:i});if(!f.ok||!f.body)throw new Error(`fetch failed ${f.status}`);return f.arrayBuffer()}}}function ee(e,t,n,r,{compressors:i,utf8:o}){const{element:f}=r[r.length-1];let s;const l=[],a=void 0!==t&&t>=0&&isFinite(t);for(;(!a||l.length<t)&&!(e.offset>=e.view.byteLength-1);){const t=ne(e),a=new Uint8Array(e.view.buffer,e.view.byteOffset+e.offset,t.compressed_page_size);let u;if("DATA_PAGE"===t.type){const e=t.data_page_header;if(!e)throw new Error("parquet data page header is undefined");const d=Z(a,Number(t.uncompressed_page_size),n.codec,i),{definitionLevels:_,repetitionLevels:p,dataPage:w}=J(d,e,r,n);if(u=c(w,s,f,e.encoding,o),p.length||_?.length){const e=O(r),t=r.map(({element:e})=>e.repetition_type);P(l,_,p,u,t,e)}else{for(let e=2;e<r.length;e++)"REQUIRED"!==r[e].element.repetition_type&&(u=Array.from(u,e=>[e]));K(l,u)}}else if("DATA_PAGE_V2"===t.type){const e=t.data_page_header_v2;if(!e)throw new Error("parquet data page header v2 is undefined");const{definitionLevels:d,repetitionLevels:_,dataPage:p}=H(a,t,r,n,i);if(u=c(p,s,f,e.encoding,o),_.length||d?.length){const e=O(r),t=r.map(({element:e})=>e.repetition_type);P(l,d,_,u,t,e)}else K(l,u)}else{if("DICTIONARY_PAGE"!==t.type)throw new Error(`parquet unsupported page type: ${t.type}`);{const e=t.dictionary_page_header;if(!e)throw new Error("parquet dictionary page header is undefined");s=X(Z(a,Number(t.uncompressed_page_size),n.codec,i),e,n,f.type_length)}}e.offset+=t.compressed_page_size}if(a){if(l.length<t)throw new Error(`parquet row data length ${l.length} does not match row group limit ${t}}`);l.length>t&&(l.length=t)}return l}function te({dictionary_page_offset:e,data_page_offset:t,total_compressed_size:n}){let r=e;return(!r||t<r)&&(r=t),[r,r+n]}function ne(e){const t=h(e);return{type:l[t.field_1],uncompressed_page_size:t.field_2,compressed_page_size:t.field_3,crc:t.field_4,data_page_header:t.field_5&&{num_values:t.field_5.field_1,encoding:i[t.field_5.field_2],definition_level_encoding:i[t.field_5.field_3],repetition_level_encoding:i[t.field_5.field_4],statistics:t.field_5.field_5&&{max:t.field_5.field_5.field_1,min:t.field_5.field_5.field_2,null_count:t.field_5.field_5.field_3,distinct_count:t.field_5.field_5.field_4,max_value:t.field_5.field_5.field_5,min_value:t.field_5.field_5.field_6}},index_page_header:t.field_6,dictionary_page_header:t.field_7&&{num_values:t.field_7.field_1,encoding:i[t.field_7.field_2],is_sorted:t.field_7.field_3},data_page_header_v2:t.field_8&&{num_values:t.field_8.field_1,num_nulls:t.field_8.field_2,num_rows:t.field_8.field_3,encoding:i[t.field_8.field_4],definition_levels_byte_length:t.field_8.field_5,repetition_levels_byte_length:t.field_8.field_6,is_compressed:void 0===t.field_8.field_7||t.field_8.field_7,statistics:t.field_8.field_8}}}async function re(e,t,n,r){const{file:i,metadata:o,columns:f}=e;if(!o)throw new Error("parquet metadata not found");(void 0===r||r>t.num_rows)&&(r=Number(t.num_rows));let s,[l,a]=[i.byteLength,0];if(t.columns.forEach(({meta_data:e})=>{if(!e)throw new Error("parquet column metadata is undefined");if(f&&!f.includes(e.path_in_schema[0]))return;const[t,n]=te(e).map(Number);l=Math.min(l,t),a=Math.max(a,n)}),l>=a&&f?.length)throw new Error(`parquet columns not found: ${f.join(", ")}`);a-l<=1<<25&&(s=await i.slice(l,a));const c=[],{children:u}=U(o.schema,[])[0],d=new Map(u.map(e=>[e.element.name,ie(e)])),_=new Map;for(let a=0;a<t.columns.length;a++){const u=t.columns[a].meta_data;if(!u)throw new Error("parquet column metadata is undefined");const p=u.path_in_schema[0];if(f&&!f.includes(p))continue;const[w,h]=te(u).map(Number),g=h-w;if(g>1<<30){console.warn(`parquet skipping huge column "${u.path_in_schema}" ${g.toLocaleString()} bytes`);continue}let y,m=0;s?(y=Promise.resolve(s),m=w-l):y=Promise.resolve(i.slice(w,h)),c.push(y.then(t=>{const i=U(o.schema,u.path_in_schema);let f=ee({view:new DataView(t),offset:m},r,u,i,e);const s=u.path_in_schema.join(".");_.set(s,f),f=void 0;const l=d.get(p);if(l?.every(e=>_.has(e))&&(S(_,i[1]),f=_.get(p),!f))throw new Error(`parquet column data not assembled: ${p}`);f&&e.onChunk?.({columnName:p,columnData:f,rowStart:n,rowEnd:n+f.length})}))}if(await Promise.all(c),e.onComplete){const t=new Array(r),n=u.map(e=>e.element.name).filter(e=>!f||f.includes(e)),i=f||n,o=i.map(e=>n.includes(e)?_.get(e):void 0);for(let n=0;n<r;n++)if("object"===e.rowFormat){const e={};i.forEach((t,r)=>{e[t]=o[r]?.[n]}),t[n]=e}else t[n]=o.map(e=>e?.[n]);return t}return[]}function ie(e,t=[]){if(e.children.length)for(const n of e.children)ie(n,t);else t.push(e.path.join("."));return t}function oe(e){return new Promise((t,n)=>{(async function(e){if(!e.file)throw new Error("parquet file is required");if(e.metadata||=await I(e.file),!e.metadata)throw new Error("parquet metadata not found");const{metadata:t,onComplete:n,rowEnd:r}=e,i=e.rowStart||0,o=[];let f=0;for(const s of t.row_groups){const t=Number(s.num_rows);if(f+t>=i&&(void 0===r||f<r)){const t=r&&r-f,l=await re(e,s,f,t);if(n){const e=Math.max(i-f,0),t=void 0===r?void 0:r-f;K(o,l.slice(e,t))}}f+=t}n&&n(o)})({rowFormat:"object",...e,onComplete:t}).catch(n)})}const fe=1,se=2,le=3,ae=4,ce=5,ue=6;function de(e){const t=new DataView(e.buffer,e.byteOffset,e.byteLength);let n=0;const r=e[n];n+=1;const i=1===r,o=t.getUint32(n,i);if(n+=4,o===fe){const e=t.getFloat64(n,i);n+=8;const r=t.getFloat64(n,i);return n+=8,{type:"Point",coordinates:[e,r]}}if(o===se){const e=t.getUint32(n,i);n+=4;const r=[];for(let o=0;o<e;o++){const e=t.getFloat64(n,i);n+=8;const o=t.getFloat64(n,i);n+=8,r.push([e,o])}return{type:"LineString",coordinates:r}}if(o===le){const e=t.getUint32(n,i);n+=4;const r=[];for(let o=0;o<e;o++){const e=t.getUint32(n,i);n+=4;const o=[];for(let r=0;r<e;r++){const e=t.getFloat64(n,i);n+=8;const r=t.getFloat64(n,i);n+=8,o.push([e,r])}r.push(o)}return{type:"Polygon",coordinates:r}}if(o===ue){const r=t.getUint32(n,i);n+=4;const o=[];for(let i=0;i<r;i++){const r=1===e[n];n+=1;const i=t.getUint32(n,r);if(n+=4,i!==le)throw new Error(`Expected Polygon in MultiPolygon, got ${i}`);const f=t.getUint32(n,r);n+=4;const s=[];for(let e=0;e<f;e++){const e=t.getUint32(n,r);n+=4;const i=[];for(let o=0;o<e;o++){const e=t.getFloat64(n,r);n+=8;const o=t.getFloat64(n,r);n+=8,i.push([e,o])}s.push(i)}o.push(s)}return{type:"MultiPolygon",coordinates:o}}if(o===ae){const r=t.getUint32(n,i);n+=4;const o=[];for(let i=0;i<r;i++){const r=1===e[n];n+=1;const i=t.getUint32(n,r);if(n+=4,i!==fe)throw new Error(`Expected Point in MultiPoint, got ${i}`);const f=t.getFloat64(n,r);n+=8;const s=t.getFloat64(n,r);n+=8,o.push([f,s])}return{type:"MultiPoint",coordinates:o}}if(o===ce){const r=t.getUint32(n,i);n+=4;const o=[];for(let f=0;f<r;f++){const r=1===e[n];n+=1;const f=t.getUint32(n,r);if(n+=4,f!==se)throw new Error(`Expected LineString in MultiLineString, got ${f}`);const s=t.getUint32(n,i);n+=4;const l=[];for(let e=0;e<s;e++){const e=t.getFloat64(n,r);n+=8;const i=t.getFloat64(n,r);n+=8,l.push([e,i])}o.push(l)}return{type:"MultiLineString",coordinates:o}}throw new Error(`Unsupported geometry type: ${o}`)}async function _e({file:e,compressors:t}){const n=await I(e),r=n.key_value_metadata?.find(e=>"geo"===e.key);if(!r)throw new Error('Invalid GeoParquet file: missing "geo" metadata');const i=JSON.parse(r.value||"{}"),o=await async function(e){const{file:t,rowStart:n,rowEnd:r,orderBy:i}=e;if(e.metadata||=await I(t),"string"==typeof i){const t=await oe({...e,rowStart:void 0,rowEnd:void 0,columns:[i]}),o=Array.from(t,(e,t)=>t).sort((e,n)=>function(e,t){return e<t?-1:1}(t[e][i],t[n][i])).slice(n,r),f=await async function(e){const{file:t,rows:n}=e;e.metadata||=await I(t);const{row_groups:r}=e.metadata,i=Array(r.length).fill(!1);let o=0;const f=r.map(e=>o+=Number(e.num_rows));for(const e of n)i[f.findIndex(t=>e<t)]=!0;const s=[];let l;o=0;for(let e=0;e<i.length;e++){const t=o+Number(r[e].num_rows);i[e]?void 0===l&&(l=o):void 0!==l&&(s.push([l,t]),l=void 0),o=t}void 0!==l&&s.push([l,o]);const a=new Array(Number(e.metadata.num_rows));for(const[t,n]of s){const r=await oe({...e,rowStart:t,rowEnd:n});for(let e=t;e<n;e++)a[e]=r[e-t],a[e].__index__=e}return a}({...e,rows:o});return o.map(e=>f[e])}return await oe(e)}({file:e,utf8:!1,compressors:t}),f=[],s=i.primary_column||"geometry";for(const e of o){const t=e[s];if(!t)continue;const n=de(t),r={};for(const t of Object.keys(e)){let n=e[t];if(t!==s&&null!==n){try{n=JSON.parse(n)}catch(e){}r[t]=n}}const i={type:"Feature",geometry:n,properties:r};f.push(i)}return{type:"FeatureCollection",features:f}}}}]);