@agrotools1/at-components 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AGraphicContainer-98a4c8a4.js +109 -0
- package/dist/APIKeyMixin-9511e0a5.js +19 -0
- package/dist/Analysis-4b1d1fb5.js +31 -0
- package/dist/ArcGISCachedService-93e2cb27.js +47 -0
- package/dist/ArcGISService-3f8d89c1.js +25 -0
- package/dist/AreaMeasurement2D-e0bb230c.js +405 -0
- package/dist/AreaMeasurement3D-a9959ecf.js +488 -0
- package/dist/AttachmentInfo-601c56e2.js +34 -0
- package/dist/AttachmentQuery-3504d550.js +18 -0
- package/dist/AttributeStore-b90878e3.js +1707 -0
- package/dist/BaseDynamicLayerView2D-b2faf028.js +63 -0
- package/dist/BindType-5e76c8e1.js +7 -0
- package/dist/BingMapsLayer-5d79fe2b.js +112 -0
- package/dist/Bitmap-f775c851.js +128 -0
- package/dist/BitmapContainer-af5942b8.js +23 -0
- package/dist/BlendLayer-a792edf6.js +13 -0
- package/dist/BoundsStore-789624df.js +63 -0
- package/dist/BufferObject-cbd0168e.js +100 -0
- package/dist/BufferView-004ad517.js +683 -0
- package/dist/BuildingSceneLayer-25bc760b.js +535 -0
- package/dist/Button/Button.d.ts +24 -2
- package/dist/Button-70963624.js +36 -0
- package/dist/ByteSizeUnit-90df2840.js +7 -0
- package/dist/CSVLayer-fd3b6750.js +208 -0
- package/dist/CSVSourceWorker-eb24cd85.js +367 -0
- package/dist/CatalogDynamicGroupLayerView2D-dfc700a4.js +66 -0
- package/dist/CatalogFootprintLayerView2D-6eb16597.js +76 -0
- package/dist/CatalogLayer-1cc632fe.js +262 -0
- package/dist/CatalogLayerView2D-d143aa34.js +52 -0
- package/dist/Chips/index.d.ts +1 -0
- package/dist/CircularArray-b2bc1dfd.js +40 -0
- package/dist/ClassBreaksDefinition-07ba0c64.js +18 -0
- package/dist/ColorMaterial.glsl-e7801766.js +64 -0
- package/dist/ColorSet-df5696b5.js +45 -0
- package/dist/ColorStop-7187f368.js +29 -0
- package/dist/Container-ac97765a.js +521 -0
- package/dist/CustomParametersMixin-b3432b3e.js +12 -0
- package/dist/DatePicker/DatePicker.helper.d.ts +22 -0
- package/dist/DatePicker/DatePickerCalendar/DatePickerCalendar.helper.d.ts +18 -0
- package/dist/DatePicker/index.d.ts +2 -0
- package/dist/DefaultMaterial.glsl-3cc4efe7.js +42 -0
- package/dist/DefaultMaterial_COLOR_GAMMA-337c63aa.js +653 -0
- package/dist/DefaultTheme-12dffc66.js +130 -0
- package/dist/DeleteForwardEditsParameters-ae76d898.js +18 -0
- package/dist/DimensionLayer-9eb47c76.js +129 -0
- package/dist/DirectLineMeasurement3D-e9903136.js +449 -0
- package/dist/DistanceMeasurement2D-a4853462.js +303 -0
- package/dist/DoubleArray-5076283e.js +25 -0
- package/dist/EdgeProcessingWorker-c1783ddd.js +63 -0
- package/dist/EditBusLayer-e812f4c9.js +107 -0
- package/dist/ElevationInfo-fad03d5e.js +56 -0
- package/dist/ElevationLayer-397792d5.js +129 -0
- package/dist/ElevationQuery-beceb62f.js +598 -0
- package/dist/ElevationSamplerWorker-0048a204.js +62 -0
- package/dist/ExportImageParameters-c6c4bc61.js +66 -0
- package/dist/ExportStrategy-908f5b8d.js +93 -0
- package/dist/ExportWMSImageParameters-34da6b46.js +33 -0
- package/dist/External-14daf0c1.js +110 -0
- package/dist/FeatureCollectionSnappingSource-f97a1829.js +130 -0
- package/dist/FeatureCommandQueue-d4817eac.js +1244 -0
- package/dist/FeatureEffect-08976bbd.js +39 -0
- package/dist/FeatureEffectLayer-05c258f4.js +13 -0
- package/dist/FeatureFilter-8c5e44b1.js +27 -0
- package/dist/FeatureLayer-d3659466.js +693 -0
- package/dist/FeatureLayerBase-9b63f732.js +148 -0
- package/dist/FeatureLayerSource-960f1c01.js +444 -0
- package/dist/FeatureLayerView2D-7503e1ed.js +1967 -0
- package/dist/FeaturePipelineWorker-d4301d2a.js +3633 -0
- package/dist/FeatureReductionLayer-e6cf73ac.js +225 -0
- package/dist/FeatureReductionSelection-d90249a7.js +22 -0
- package/dist/FeatureServiceSnappingSource-9e49ca72.js +481 -0
- package/dist/FeatureServiceSnappingSourceWorker-39b093b3.js +747 -0
- package/dist/FeatureSet-d79f0e48.js +188 -0
- package/dist/FeatureStore-eb4b87c0.js +131 -0
- package/dist/FeatureTemplate-edb1b782.js +12 -0
- package/dist/FeatureType-bba29adb.js +25 -0
- package/dist/FieldsIndex-75cca4d0.js +109 -0
- package/dist/FormTemplate-22911c47.js +350 -0
- package/dist/GeoJSONLayer-b33c96b8.js +236 -0
- package/dist/GeoJSONSourceWorker-b04ff552.js +247 -0
- package/dist/GeoRSSLayer-6e5fcd0e.js +73 -0
- package/dist/GeoRSSLayerView2D-21b6b12e.js +140 -0
- package/dist/GeometryUtils-fa897cbd.js +403 -0
- package/dist/GraphicContainer-1fd6bfce.js +26 -0
- package/dist/GraphicManipulator-f3b7dc9b.js +1499 -0
- package/dist/GraphicsLayer-e0686779.js +38 -0
- package/dist/GraphicsLayerView2D-a7eba2fe.js +114 -0
- package/dist/GraphicsSnappingSource-594f402a.js +273 -0
- package/dist/GraphicsView2D-347562b8.js +620 -0
- package/dist/GroupLayer-7ae0a916.js +147 -0
- package/dist/GroupLayerView2D-ffcde606.js +98 -0
- package/dist/HUDMaterial.glsl-b0a3e0ce.js +65 -0
- package/dist/HighlightCounter-e18f0179.js +41 -0
- package/dist/HighlightGraphicContainer-fd774cea.js +18 -0
- package/dist/I3SBinaryReader-190e99de.js +310 -0
- package/dist/I3SLayerDefinitions-6ddaca60.js +55 -0
- package/dist/I3SUtil-44b83dc0.js +59 -0
- package/dist/IdentityManager-fbe91c13.js +899 -0
- package/dist/ImageHistogramParameters-d64fd9c8.js +905 -0
- package/dist/ImageryLayer-67878a78.js +1799 -0
- package/dist/ImageryLayerView2D-ae45faba.js +352 -0
- package/dist/ImageryTileLayer-9dca8b93.js +2157 -0
- package/dist/ImageryTileLayerView2D-977f66aa.js +1110 -0
- package/dist/ImmutableArray-fb7b7a6a.js +20 -0
- package/dist/Indices-e6dc3b15.js +67 -0
- package/dist/Input/Input.core.d.ts +37 -11
- package/dist/Input/index.d.ts +37 -11
- package/dist/IntegratedMesh3DTilesLayer-8811e7bf.js +112 -0
- package/dist/IntegratedMeshLayer-9162c0b5.js +141 -0
- package/dist/InteractiveAnalysisViewModel-b046fcb9.js +7397 -0
- package/dist/InterleavedLayout-32973c8a.js +163 -0
- package/dist/KMLLayer-80f81df7.js +162 -0
- package/dist/KMLLayerView2D-b6ba3b80.js +253 -0
- package/dist/KnowledgeGraphLayerView2D-ae91bd81.js +43 -0
- package/dist/LRUCache-27e8c401.js +32 -0
- package/dist/LabelClass-d9a476d6.js +135 -0
- package/dist/LabelMetric-e2728bbf.js +400 -0
- package/dist/LaserlinePath.glsl-60d00e61.js +64 -0
- package/dist/Laserlines.glsl-499a6cbf.js +65 -0
- package/dist/LayerFloorInfo-d05cf9dd.js +15 -0
- package/dist/LayerView-036988a9.js +206 -0
- package/dist/LercWorker-b1b4bb47.js +157 -0
- package/dist/LineOfSightLayer-9a9a60b7.js +147 -0
- package/dist/LinkChartLayer-d61803bb.js +1027 -0
- package/dist/Lyr3DWorker-87be14e0.js +82 -0
- package/dist/MD5-1b5ec1c3.js +76 -0
- package/dist/MagnifierPrograms-da7a27ab.js +806 -0
- package/dist/Map/Map.d.ts +26 -0
- package/dist/Map/index.d.ts +1 -0
- package/dist/Map/types/index.d.ts +38 -0
- package/dist/Map/utils/index.d.ts +24 -0
- package/dist/MapImageLayer-f07adf1a.js +169 -0
- package/dist/MapImageLayerView2D-d1b140c3.js +146 -0
- package/dist/MapNotesLayer-c662d147.js +283 -0
- package/dist/MapNotesLayerView2D-bf9ac698.js +161 -0
- package/dist/MapServiceLayerViewHelper-fb724de9.js +288 -0
- package/dist/MeasurementWidgetContent-e4888ef2.js +2642 -0
- package/dist/MediaLayer-36d873a3.js +523 -0
- package/dist/MediaLayerView2D-e58b8ec0.js +332 -0
- package/dist/MemCache-a9232ec2.js +227 -0
- package/dist/MemorySourceWorker-20ff27d6.js +222 -0
- package/dist/Mesh-3839826a.js +980 -0
- package/dist/MeshLocalVertexSpace-00151564.js +19 -0
- package/dist/MultiOriginJSONSupport-bb258670.js +158 -0
- package/dist/NestedMap-83f8e815.js +29 -0
- package/dist/OGCFeatureLayer-2a8b7ecc.js +211 -0
- package/dist/OGCFeatureLayerView2D-185f9649.js +82 -0
- package/dist/ObjectStack-10d91171.js +21 -0
- package/dist/Octree-78797046.js +495 -0
- package/dist/OpenStreetMapLayer-b0a17790.js +30 -0
- package/dist/OperationalLayer-55af27d6.js +44 -0
- package/dist/OptimizedFeatureSet-54e095c4.js +12 -0
- package/dist/OptimizedGeometry-3b808152.js +68 -0
- package/dist/OrderByInfo-22e3c805.js +16 -0
- package/dist/OrderIndependentTransparency-3eadfe42.js +214 -0
- package/dist/OrderedLayer-1403a591.js +26 -0
- package/dist/OrientedImageryLayer-8ec8d7d1.js +216 -0
- package/dist/OverlayCompositing.glsl-ba3bd81d.js +65 -0
- package/dist/OverrideHelper-82325a2c.js +242 -0
- package/dist/PBFDecoderWorker-f6517afc.js +213 -0
- package/dist/PointCloudLayer-cff43a10.js +197 -0
- package/dist/PointCloudUniqueValueRenderer-f337a895.js +115 -0
- package/dist/PointCloudWorker-cdb28dc1.js +212 -0
- package/dist/PooledRBush-ee4e60af.js +272 -0
- package/dist/Popup-c7f55588.js +3990 -0
- package/dist/PortalLayer-07b3c53e.js +126 -0
- package/dist/Program-ba2f18b2.js +694 -0
- package/dist/ProgramTemplate-eee4f097.js +35 -0
- package/dist/ProgressBar/ProgressBar.d.ts +0 -13
- package/dist/QueryEngine-10c97624.js +896 -0
- package/dist/QueryEngineCapabilities-0d8477a2.js +4 -0
- package/dist/QueryTask-115430b6.js +119 -0
- package/dist/RasterSymbolizer-fbf433fe.js +3024 -0
- package/dist/RasterVFDisplayObject-20b0dd86.js +581 -0
- package/dist/RasterWorker-44c37e20.js +78 -0
- package/dist/RawBlockCache-25203dbd.js +185 -0
- package/dist/RealisticTree.glsl-bc07c4dc.js +42 -0
- package/dist/Rect-894f011c.js +14 -0
- package/dist/RefreshableLayer-9550b85a.js +80 -0
- package/dist/RefreshableLayerView-601f7038.js +16 -0
- package/dist/Relationship-c662830e.js +64 -0
- package/dist/RelationshipQuery-765f068e.js +22 -0
- package/dist/RenderState-b244097f.js +7 -0
- package/dist/RenderingContext-3db74548.js +889 -0
- package/dist/RibbonLine.glsl-c6a715b7.js +65 -0
- package/dist/RouteLayer-3f5411f3.js +786 -0
- package/dist/RouteLayerView2D-a5fd4cbf.js +195 -0
- package/dist/SDFHelper-a34e90ee.js +140 -0
- package/dist/SSAO.glsl-5491a708.js +43 -0
- package/dist/SSAOBlur.glsl-f3068b8e.js +42 -0
- package/dist/ScaleRangeLayer-7ddf00b4.js +21 -0
- package/dist/SceneLayer-c594bfc3.js +542 -0
- package/dist/SceneLayerSnappingSource-a0504ac7.js +218 -0
- package/dist/SceneLayerSnappingSourceWorker-a04d6692.js +112 -0
- package/dist/SceneLayerWorker-1865768e.js +164 -0
- package/dist/SceneService-fb9f0142.js +215 -0
- package/dist/Scheduler-eacc84bb.js +373 -0
- package/dist/Select/Item/Item.d.ts +2 -1
- package/dist/Select/{Select.multiple.d.ts → Multiple/Select.multiple.d.ts} +26 -16
- package/dist/Select/Select.core.d.ts +18 -15
- package/dist/Select/{Select.single.d.ts → Single/Select.single.d.ts} +23 -14
- package/dist/Select/index.d.ts +42 -24
- package/dist/ShadedColorMaterial.glsl-db97956b.js +64 -0
- package/dist/SnappingOperation-9622a00d.js +48 -0
- package/dist/SourceLayerData-7016f1a5.js +116 -0
- package/dist/SpatialFilter-d20d4f50.js +1701 -0
- package/dist/Stop-68022e32.js +281 -0
- package/dist/StreamLayer-7c837e3d.js +188 -0
- package/dist/StreamLayerView2D-586f5a6a.js +164 -0
- package/dist/StyleDefinition-f4862d5a.js +36 -0
- package/dist/StyleRepository-fba75e70.js +2212 -0
- package/dist/SublayersOwner-3dc574cd.js +545 -0
- package/dist/SubtypeGroupLayer-1f9c5398.js +514 -0
- package/dist/SubtypeGroupLayerView2D-0f108d9d.js +84 -0
- package/dist/Tabs/Tab/Tab.d.ts +3 -3
- package/dist/TechniqueInstance-0481dbff.js +233 -0
- package/dist/TemporalLayer-8116b4a4.js +23 -0
- package/dist/Texture-22a8cca5.js +501 -0
- package/dist/TextureOnly.glsl-458f8148.js +65 -0
- package/dist/Theme-f05b8eb0.js +3426 -0
- package/dist/Tick-aef93b48.js +723 -0
- package/dist/TileContainer-0bf0ea1b.js +31 -0
- package/dist/TileInfoTilemapCache-d78858c0.js +38 -0
- package/dist/TileLayer-0edee064.js +194 -0
- package/dist/TileLayerView2D-78d5801b.js +187 -0
- package/dist/TilemapCache-79699d61.js +189 -0
- package/dist/TimeInfo-40c96ade.js +42 -0
- package/dist/TimeOnly-9ee66ca6.js +706 -0
- package/dist/Tooltip-e7498dc9.js +138 -0
- package/dist/TopFeaturesQuery-ad224e01.js +32 -0
- package/dist/TurboLine-6ab04aef.js +565 -0
- package/dist/UniqueValueRenderer-eaa5f8a6.js +1039 -0
- package/dist/UnknownLayer-e280ddd4.js +30 -0
- package/dist/UnknownTimeZone-220952b5.js +15 -0
- package/dist/UnsupportedLayer-447f7676.js +31 -0
- package/dist/UpdateTracking2D-e9adad8f.js +8566 -0
- package/dist/Util-002f5109.js +57 -0
- package/dist/VectorTileLayer-3210be81.js +544 -0
- package/dist/VectorTileLayerView2D-6a51e3b8.js +2108 -0
- package/dist/Version-3de8cbca.js +33 -0
- package/dist/VertexArrayObject-07998745.js +73 -0
- package/dist/VertexAttribute-faad30bf.js +11 -0
- package/dist/VertexColor.glsl-e415cf02.js +2683 -0
- package/dist/VertexElementDescriptor-d7c718c2.js +8 -0
- package/dist/VertexSnappingCandidate-b676241f.js +13 -0
- package/dist/VideoLayerView2D-f659dd0d.js +124 -0
- package/dist/VoxelLayer-003f82ff.js +631 -0
- package/dist/WFSLayer-3da6c5f7.js +221 -0
- package/dist/WFSSourceWorker-9a11693a.js +157 -0
- package/dist/WGLContainer-3d159b63.js +5426 -0
- package/dist/WMSLayer-fc0632f8.js +536 -0
- package/dist/WMSLayerView2D-54e80e1b.js +117 -0
- package/dist/WMTSLayer-9324b12b.js +531 -0
- package/dist/WMTSLayerView2D-3ef936db.js +142 -0
- package/dist/WebTileLayer-45c563ff.js +110 -0
- package/dist/WhereClause-7a28b740.js +2766 -0
- package/dist/WorkerHandle-0d54a6c7.js +47 -0
- package/dist/WorkerTileHandler-786c2b24.js +1539 -0
- package/dist/action-163397e3.js +198 -0
- package/dist/action-group-4859fb97.js +145 -0
- package/dist/action-menu-2d70b2fc.js +1759 -0
- package/dist/agrotools-theme.css.map +1 -1
- package/dist/apng-9b71d52c.js +392 -0
- package/dist/ar-a17f8064.js +18 -0
- package/dist/arcade-fa309282.js +229 -0
- package/dist/arcadeAsyncRuntime-738498fd.js +943 -0
- package/dist/arcadeUtils-f71d80fa.js +8741 -0
- package/dist/arcgis-knowledge-client-core-6056bcea.js +1218 -0
- package/dist/arcgis-knowledge-client-core-simd-9bc1f83e.js +1218 -0
- package/dist/arcgisLayers-b2b878bd.js +152 -0
- package/dist/associatedFeatureServiceUtils-df5b5187.js +92 -0
- package/dist/axisAngleDegrees-32643b7c.js +49 -0
- package/dist/basicInterfaces-fa4f5fa7.js +30 -0
- package/dist/basis_transcoder-3187cc92.js +1248 -0
- package/dist/bg_BG-9950a70b.js +18 -0
- package/dist/bs_BA-60482871.js +18 -0
- package/dist/ca_ES-a121088e.js +18 -0
- package/dist/calcite-action-bar-5a87c23c.js +303 -0
- package/dist/calcite-action-ee2ca847.js +22 -0
- package/dist/calcite-action-group-19aa86ee.js +28 -0
- package/dist/calcite-button-8e9175c0.js +228 -0
- package/dist/calcite-flow-57d26d2d.js +128 -0
- package/dist/calcite-flow-item-4a3e3fc0.js +499 -0
- package/dist/calcite-icon-d99e280a.js +16 -0
- package/dist/calcite-input-28b20785.js +24 -0
- package/dist/calcite-label-4f30e08d.js +79 -0
- package/dist/calcite-list-0cee7628.js +2135 -0
- package/dist/calcite-list-item-0a19efa8.js +576 -0
- package/dist/calcite-list-item-group-0706662f.js +71 -0
- package/dist/calcite-loader-865045b1.js +14 -0
- package/dist/calcite-modal-3e4da6fd.js +333 -0
- package/dist/calcite-notice-50b74ab7.js +181 -0
- package/dist/calcite-option-713c1d40.js +94 -0
- package/dist/calcite-scrim-809fbd0b.js +18 -0
- package/dist/calcite-select-28d8edfc.js +231 -0
- package/dist/capabilities-c8f838be.js +50 -0
- package/dist/chartCommon-13718cda.js +256 -0
- package/dist/chartUtilsAm5-6be145fb.js +2954 -0
- package/dist/clientSideDefaults-5c1f97c9.js +39 -0
- package/dist/colorRamps-8792655e.js +38 -0
- package/dist/colorUtils-54f4b662.js +164 -0
- package/dist/commonProperties-f9559903.js +60 -0
- package/dist/component-51a10bc0.js +18 -0
- package/dist/computeTranslationToOriginAndRotation-4876cb93.js +60 -0
- package/dist/conditionalSlot-87175989.js +27 -0
- package/dist/config-61215215.js +7 -0
- package/dist/constants-5bd557fe.js +5 -0
- package/dist/createConnection-f974a00a.js +299 -0
- package/dist/crsUtils-59933b10.js +7 -0
- package/dist/cs_CZ-1b968650.js +18 -0
- package/dist/da_DK-e0fe1642.js +18 -0
- package/dist/dataUtils-7c276b73.js +1421 -0
- package/dist/date-1c28c6a5.js +52 -0
- package/dist/de_CH-b0dbd4c8.js +6 -0
- package/dist/de_DE-8609ef65.js +6 -0
- package/dist/debounce-de27a42a.js +121 -0
- package/dist/deduplicate-59fb9cac.js +89 -0
- package/dist/defaults-2bfa4a36.js +31 -0
- package/dist/defaultsJSON-ba17aa15.js +10 -0
- package/dist/definitions-a00a3a6c.js +52 -0
- package/dist/deleteForwardEdits-f653b513.js +13 -0
- package/dist/devEnvironmentUtils-42cb97c7.js +11 -0
- package/dist/diffUtils-e71a6152.js +90 -0
- package/dist/dom-b589b728.js +358 -0
- package/dist/doublePrecisionUtils-46e21550.js +22 -0
- package/dist/drapedUtils-b42fcbc6.js +75 -0
- package/dist/earcut-6fa1a128.js +292 -0
- package/dist/edgeProcessing-2ff1f201.js +252 -0
- package/dist/editingSupport-68545668.js +203 -0
- package/dist/editsZScale-c7cdd215.js +37 -0
- package/dist/el_GR-5cfd1e7e.js +18 -0
- package/dist/elevationInfoUtils-5456a079.js +126 -0
- package/dist/en_CA-47f2633b.js +18 -0
- package/dist/en_US-47f2633b.js +18 -0
- package/dist/enums-25d066fc.js +13 -0
- package/dist/enums-2c166c09.js +99 -0
- package/dist/enums-fa8f05ab.js +152 -0
- package/dist/es_ES-489878a2.js +6 -0
- package/dist/et_EE-6472669a.js +18 -0
- package/dist/executeForIds-4ab75c0d.js +14 -0
- package/dist/executeForTopCount-7e095ec1.js +17 -0
- package/dist/executeForTopExtents-19daf9d0.js +17 -0
- package/dist/executeForTopIds-1ba3a4af.js +17 -0
- package/dist/executeQueryJSON-46168866.js +15 -0
- package/dist/executeQueryPBF-d8623daf.js +152 -0
- package/dist/executeRelationshipQuery-011dfb45.js +53 -0
- package/dist/executeTopFeaturesQuery-02166801.js +18 -0
- package/dist/featureConversionUtils-650d7601.js +479 -0
- package/dist/featureLayerUtils-64e09283.js +142 -0
- package/dist/featureLayerUtils-b07f9c11.js +250 -0
- package/dist/featureSetUtils-9d37d6f8.js +2530 -0
- package/dist/featuresetbase-62aeb079.js +707 -0
- package/dist/featuresetgeom-51f9fc4e.js +99 -0
- package/dist/featuresetstats-4db32894.js +81 -0
- package/dist/featuresetstring-990c3287.js +95 -0
- package/dist/fetchService-5198dd4a.js +33 -0
- package/dist/fi_FI-d7a3a525.js +18 -0
- package/dist/fieldProperties-edfa24cb.js +33 -0
- package/dist/floatRGBA-516d7961.js +20 -0
- package/dist/floorFilterUtils-936f7587.js +19 -0
- package/dist/focusTrapComponent-e849bb89.js +475 -0
- package/dist/form-99719d52.js +138 -0
- package/dist/fr_FR-a88f2596.js +7 -0
- package/dist/geohashUtils-2bc76440.js +85 -0
- package/dist/geojson-603231df.js +208 -0
- package/dist/geomasync-e9063b4c.js +567 -0
- package/dist/geometryEngine-d3bb2fd6.js +192 -0
- package/dist/geometryEngineAsync-55aa6170.js +217 -0
- package/dist/geometryEngineBase-527e8b63.js +18463 -0
- package/dist/geometryEngineJSON-28087174.js +46 -0
- package/dist/geometryEngineJSON-d54949f9.js +171 -0
- package/dist/geometryEngineWorker-dc2c7127.js +11 -0
- package/dist/geometryServiceUtils-6a3e1e93.js +28 -0
- package/dist/georeference-ed8b2c30.js +291 -0
- package/dist/gif-204e82dd.js +323 -0
- package/dist/glUtil-8f8bce6b.js +19 -0
- package/dist/gltfexport-b2566542.js +705 -0
- package/dist/groupLayerUtils-ea9e6359.js +39 -0
- package/dist/guid-5ee54248.js +17 -0
- package/dist/he_IL-e34cf273.js +18 -0
- package/dist/heatmapUtils-56758920.js +45 -0
- package/dist/highlightReasons-de432106.js +19 -0
- package/dist/hr_HR-6a124f87.js +18 -0
- package/dist/hu_HU-58f3feb6.js +18 -0
- package/dist/hydrated-0e1c7565.js +40 -0
- package/dist/i3s-bb0b5b67.js +809 -0
- package/dist/icon-c6e3bd23.js +127 -0
- package/dist/id_ID-18d97715.js +18 -0
- package/dist/imageBitmapUtils-881d8c64.js +23 -0
- package/dist/imageUtils-57eeedc5.js +69 -0
- package/dist/imageUtils-ef69c578.js +89 -0
- package/dist/imageryUtils-23f51cb1.js +43 -0
- package/dist/index-01c737ed.js +42563 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +22 -10177
- package/dist/infoFor3D-bf4e6c95.js +58 -0
- package/dist/input-message-673a9baa.js +92 -0
- package/dist/input2-bbf6454e.js +575 -0
- package/dist/interactive-aeb2cb9f.js +80 -0
- package/dist/interfaces-fac3cfda.js +7 -0
- package/dist/it_IT-49e70bbf.js +6 -0
- package/dist/ja_JP-eaef2cc3.js +18 -0
- package/dist/json-5febf88a.js +57 -0
- package/dist/jsonContext-2dc288b1.js +15 -0
- package/dist/jsonUtils-1abd4bfc.js +59 -0
- package/dist/jsonUtils-913fa1bd.js +86 -0
- package/dist/jsonUtils-f6a5e63b.js +476 -0
- package/dist/kmlUtils-7c2744fe.js +112 -0
- package/dist/knowledgeGraphService-6a349e04.js +739 -0
- package/dist/knowledgegraph-c91b0bb2.js +149 -0
- package/dist/ko_KR-5c972fd8.js +14 -0
- package/dist/label2-1ab25f27.js +90 -0
- package/dist/labelUtils-a3634e8f.js +61 -0
- package/dist/labelingInfo-568c9210.js +46 -0
- package/dist/layerViewUtils-052e603c.js +10 -0
- package/dist/layersCreator-4a5366ea.js +151 -0
- package/dist/layersLoader-b87d4857.js +197 -0
- package/dist/lazyLayerLoader-8817000c.js +10 -0
- package/dist/lclayout-64c67b4e.js +773 -0
- package/dist/lengthUtils-695e744c.js +5 -0
- package/dist/lerc-wasm-13192bf3.js +325 -0
- package/dist/libtess-asm-4883179d.js +3673 -0
- package/dist/libtess-fc70d1ce.js +269 -0
- package/dist/lineSegment-3aa941f5.js +76 -0
- package/dist/loadGLTFMesh-db6645f5.js +181 -0
- package/dist/loadable-266f324b.js +24 -0
- package/dist/loader-d1ce1bc1.js +79 -0
- package/dist/lt_LT-26f13fd1.js +6 -0
- package/dist/lv_LV-4feafa92.js +18 -0
- package/dist/lyr3DWorker-dd48e619.js +2108 -0
- package/dist/mapViewDeps-226d9da3.js +3052 -0
- package/dist/mask-svg-30f64a7b.js +4 -0
- package/dist/mat3f64-03233387.js +19 -0
- package/dist/mat4f64-cce69db4.js +19 -0
- package/dist/mediaLayerUtils-ae485c27.js +35 -0
- package/dist/meshFeatureSet-8a2ad011.js +126 -0
- package/dist/meshVertexSpaceUtils-6efe3dcc.js +58 -0
- package/dist/multiOriginJSONSupportUtils-207ba4d4.js +6 -0
- package/dist/multidimensionalUtils-508a3f3f.js +290 -0
- package/dist/nb_NO-21543153.js +18 -0
- package/dist/nl_NL-7876d97f.js +7 -0
- package/dist/normalizeUtilsSync-1dae280b.js +181 -0
- package/dist/number-5aa3a81b.js +128 -0
- package/dist/objectIdUtils-93dae423.js +14 -0
- package/dist/objectResourceUtils-642ab03e.js +1455 -0
- package/dist/observers-f646a6a4.js +30 -0
- package/dist/ogcFeatureUtils-46ac1c44.js +206 -0
- package/dist/openCloseComponent-47eb52c6.js +37 -0
- package/dist/orientedBoundingBox-554ccdc6.js +447 -0
- package/dist/originUtils-87edf087.js +9 -0
- package/dist/overlay-svg-c3941b3b.js +4 -0
- package/dist/parser-0701286c.js +488 -0
- package/dist/pbf-5dd791f5.js +215 -0
- package/dist/pbfQueryUtils-a6ca7e23.js +422 -0
- package/dist/pe-wasm-6c16b121.js +887 -0
- package/dist/persistable-9eb0e8df.js +89 -0
- package/dist/perspectiveUtils-b194621d.js +42 -0
- package/dist/pieChart-b97433d0.js +555 -0
- package/dist/pl_PL-276c6dae.js +18 -0
- package/dist/plane-3398eec1.js +160 -0
- package/dist/popupUtils-c444b896.js +22 -0
- package/dist/popupUtils-d871563b.js +50 -0
- package/dist/portalItemUtils-4c4caad0.js +57 -0
- package/dist/portalLayers-cb07742f.js +312 -0
- package/dist/portalUtils-effd590f.js +7 -0
- package/dist/programUtils-65af7b7c.js +59 -0
- package/dist/project-ee9c2947.js +21 -0
- package/dist/projectPointToVector-7dc831a9.js +14 -0
- package/dist/projectVectorToVector-5163db7a.js +13 -0
- package/dist/pt_BR-4fae3055.js +6 -0
- package/dist/pt_PT-14d9efb1.js +6 -0
- package/dist/quantityUtils-5cd4cf90.js +33 -0
- package/dist/quantizationUtils-0a8f74c6.js +68 -0
- package/dist/quat-a508aed3.js +104 -0
- package/dist/quatf64-bec1af25.js +19 -0
- package/dist/query-b6e1fd14.js +89 -0
- package/dist/queryAttachments-7b39ebdc.js +39 -0
- package/dist/queryEngineUtils-cb8e309e.js +21 -0
- package/dist/queryTopFeatures-2e0e3941.js +50 -0
- package/dist/queryZScale-c5733d0a.js +12 -0
- package/dist/rasterProjectionHelper-213afa27.js +577 -0
- package/dist/rasterUtils-f2e44e8b.js +122 -0
- package/dist/rasterizingUtils-25cc0190.js +46 -0
- package/dist/request-e0c679b3.js +46 -0
- package/dist/requestImageUtils-37d79281.js +8 -0
- package/dist/resourceExtension-5f3f1c80.js +17 -0
- package/dist/resourceUtils-0d68cbc2.js +69 -0
- package/dist/resourceUtils-374db840.js +62 -0
- package/dist/resourceUtils-43ce192b.js +42 -0
- package/dist/ro_RO-8e733cf5.js +18 -0
- package/dist/ru_RU-f7bafc90.js +6 -0
- package/dist/saveAPIKeyUtils-1a3d4a8a.js +8 -0
- package/dist/saveUtils-43fdc547.js +24 -0
- package/dist/scaleUtils-bdf8b6cb.js +23 -0
- package/dist/scrim-44eb4dc0.js +114 -0
- package/dist/serviceCapabilitiesUtils-823612b8.js +64 -0
- package/dist/sizeVariableUtils-a1b694d8.js +27 -0
- package/dist/sk_SK-c279eea3.js +6 -0
- package/dist/sl_SL-e40950dd.js +6 -0
- package/dist/sourceUtils-01d115c6.js +71 -0
- package/dist/sphere-908cd9aa.js +199 -0
- package/dist/sr_RS-b1835dfa.js +18 -0
- package/dist/statsWorker-49f9befe.js +37 -0
- package/dist/streamLayerUtils-29324e05.js +31 -0
- package/dist/style.css +1 -1
- package/dist/styleUtils-82e8da52.js +75 -0
- package/dist/styleUtils-8541d60d.js +14 -0
- package/dist/sublayerUtils-eaac2486.js +37 -0
- package/dist/substitute-1f578d70.js +52 -0
- package/dist/sv_SE-15ca9e36.js +6 -0
- package/dist/symbolColorUtils-18fd6b3d.js +8 -0
- package/dist/symbolLayerUtils-4c58b291.js +31 -0
- package/dist/symbologySnappingCandidates-14d94b6b.js +221 -0
- package/dist/t9n-c1c2b6c8.js +349 -0
- package/dist/testSVGPremultipliedAlpha-159dac90.js +94 -0
- package/dist/th_TH-bf624a56.js +18 -0
- package/dist/tileUtils-3e0c8c1d.js +7 -0
- package/dist/timeSupport-3f529cdb.js +410 -0
- package/dist/tr_TR-ca5c315f.js +18 -0
- package/dist/triangle-8a3a2ba8.js +98 -0
- package/dist/types-adba9034.js +19 -0
- package/dist/uk_UA-4b3cb86d.js +6 -0
- package/dist/unitConversionUtils-f0ebaf75.js +17 -0
- package/dist/unitFormatUtils-555e2d94.js +40 -0
- package/dist/uploadAssetErrors-d1389781.js +70 -0
- package/dist/uploadAssets-5e85f09d.js +330 -0
- package/dist/utils-3a10b10c.js +34 -0
- package/dist/utils-505c54e9.js +91 -0
- package/dist/utils-5432e258.js +433 -0
- package/dist/utils-7a88ec6a.js +419 -0
- package/dist/utils-7fa9cdf9.js +2746 -0
- package/dist/utils-d252c575.js +73 -0
- package/dist/utils-f07e00b3.js +232 -0
- package/dist/utils-fda10b4b.js +79 -0
- package/dist/utils3-c34ab97c.js +75 -0
- package/dist/vec3-f79c600d.js +81 -0
- package/dist/vec3f32-304a6a9c.js +36 -0
- package/dist/vec42-36edeb73.js +125 -0
- package/dist/vec4f32-b2628ced.js +38 -0
- package/dist/vec4f64-043e974c.js +45 -0
- package/dist/versionUtils-6935648b.js +161 -0
- package/dist/vi_VN-ad09e708.js +18 -0
- package/dist/visualVariableUtils-c425461a.js +267 -0
- package/dist/webStyleSymbolUtils-4f42a29f.js +48 -0
- package/dist/webglDeps-5f18210d.js +23 -0
- package/dist/wfsUtils-6f7f1e3e.js +343 -0
- package/dist/workerHelper-9dc9a790.js +11 -0
- package/dist/xmlUtils-64cc47e1.js +24 -0
- package/dist/xyChart-e5648fee.js +3335 -0
- package/dist/zh_Hans-61faef57.js +14 -0
- package/dist/zh_Hant-87a9767b.js +14 -0
- package/dist/zipjs-wrapper-1bd67e07.js +6496 -0
- package/package.json +6 -1
|
@@ -0,0 +1,1539 @@
|
|
|
1
|
+
import { iY as Le, gY as Ae, ap as je, gW as qe, i as Ge } from "./index-01c737ed.js";
|
|
2
|
+
import { E as me, I as ae } from "./enums-25d066fc.js";
|
|
3
|
+
import { h as L, s as Te, o as oe, r as se, f as $e, a as Ve, e as ke, i as Ye, c as Y, p as ye, d as Ze, g as Je, _ as Qe } from "./GeometryUtils-fa897cbd.js";
|
|
4
|
+
import { t as Ce } from "./Rect-894f011c.js";
|
|
5
|
+
import { o as Ee } from "./config-61215215.js";
|
|
6
|
+
import { l as ie, m as k, o as Se, n as Pe, p as Xe, u as we, a as ee } from "./StyleDefinition-f4862d5a.js";
|
|
7
|
+
import { n as et } from "./pbf-5dd791f5.js";
|
|
8
|
+
import { a as tt, c as st, C as it, i as rt } from "./TurboLine-6ab04aef.js";
|
|
9
|
+
import { s as nt, e as at } from "./SourceLayerData-7016f1a5.js";
|
|
10
|
+
import { t as v, U as ot, O as lt, l as ht } from "./StyleRepository-fba75e70.js";
|
|
11
|
+
import { i as ve } from "./earcut-6fa1a128.js";
|
|
12
|
+
import "vue";
|
|
13
|
+
import "./enums-fa8f05ab.js";
|
|
14
|
+
import "./definitions-a00a3a6c.js";
|
|
15
|
+
import "./enums-2c166c09.js";
|
|
16
|
+
import "./VertexElementDescriptor-d7c718c2.js";
|
|
17
|
+
import "./colorUtils-54f4b662.js";
|
|
18
|
+
import "./vec42-36edeb73.js";
|
|
19
|
+
import "./vec4f64-043e974c.js";
|
|
20
|
+
function ct(f) {
|
|
21
|
+
return f === 746 || f === 747 || !(f < 4352) && (f >= 12704 && f <= 12735 || f >= 12544 && f <= 12591 || f >= 65072 && f <= 65103 && !(f >= 65097 && f <= 65103) || f >= 63744 && f <= 64255 || f >= 13056 && f <= 13311 || f >= 11904 && f <= 12031 || f >= 12736 && f <= 12783 || f >= 12288 && f <= 12351 && !(f >= 12296 && f <= 12305 || f >= 12308 && f <= 12319 || f === 12336) || f >= 13312 && f <= 19903 || f >= 19968 && f <= 40959 || f >= 12800 && f <= 13055 || f >= 12592 && f <= 12687 || f >= 43360 && f <= 43391 || f >= 55216 && f <= 55295 || f >= 4352 && f <= 4607 || f >= 44032 && f <= 55215 || f >= 12352 && f <= 12447 || f >= 12272 && f <= 12287 || f >= 12688 && f <= 12703 || f >= 12032 && f <= 12255 || f >= 12784 && f <= 12799 || f >= 12448 && f <= 12543 && f !== 12540 || f >= 65280 && f <= 65519 && !(f === 65288 || f === 65289 || f === 65293 || f >= 65306 && f <= 65310 || f === 65339 || f === 65341 || f === 65343 || f >= 65371 && f <= 65503 || f === 65507 || f >= 65512 && f <= 65519) || f >= 65104 && f <= 65135 && !(f >= 65112 && f <= 65118 || f >= 65123 && f <= 65126) || f >= 5120 && f <= 5759 || f >= 6320 && f <= 6399 || f >= 65040 && f <= 65055 || f >= 19904 && f <= 19967 || f >= 40960 && f <= 42127 || f >= 42128 && f <= 42191);
|
|
22
|
+
}
|
|
23
|
+
function ut(f) {
|
|
24
|
+
return !(f < 11904) && (f >= 12704 && f <= 12735 || f >= 12544 && f <= 12591 || f >= 65072 && f <= 65103 || f >= 63744 && f <= 64255 || f >= 13056 && f <= 13311 || f >= 11904 && f <= 12031 || f >= 12736 && f <= 12783 || f >= 12288 && f <= 12351 || f >= 13312 && f <= 19903 || f >= 19968 && f <= 40959 || f >= 12800 && f <= 13055 || f >= 65280 && f <= 65519 || f >= 12352 && f <= 12447 || f >= 12272 && f <= 12287 || f >= 12032 && f <= 12255 || f >= 12784 && f <= 12799 || f >= 12448 && f <= 12543 || f >= 65040 && f <= 65055 || f >= 42128 && f <= 42191 || f >= 40960 && f <= 42127);
|
|
25
|
+
}
|
|
26
|
+
function ft(f) {
|
|
27
|
+
switch (f) {
|
|
28
|
+
case 10:
|
|
29
|
+
case 32:
|
|
30
|
+
case 38:
|
|
31
|
+
case 40:
|
|
32
|
+
case 41:
|
|
33
|
+
case 43:
|
|
34
|
+
case 45:
|
|
35
|
+
case 47:
|
|
36
|
+
case 173:
|
|
37
|
+
case 183:
|
|
38
|
+
case 8203:
|
|
39
|
+
case 8208:
|
|
40
|
+
case 8211:
|
|
41
|
+
case 8231:
|
|
42
|
+
return !0;
|
|
43
|
+
}
|
|
44
|
+
return !1;
|
|
45
|
+
}
|
|
46
|
+
function Oe(f) {
|
|
47
|
+
switch (f) {
|
|
48
|
+
case 9:
|
|
49
|
+
case 10:
|
|
50
|
+
case 11:
|
|
51
|
+
case 12:
|
|
52
|
+
case 13:
|
|
53
|
+
case 32:
|
|
54
|
+
return !0;
|
|
55
|
+
}
|
|
56
|
+
return !1;
|
|
57
|
+
}
|
|
58
|
+
const K = 24, He = 17;
|
|
59
|
+
let Ke = class {
|
|
60
|
+
constructor(t, e, i, s, n, a, r) {
|
|
61
|
+
this._glyphItems = t, this._maxWidth = e, this._lineHeight = i, this._letterSpacing = s, this._hAnchor = n, this._vAnchor = a, this._justify = r;
|
|
62
|
+
}
|
|
63
|
+
getShaping(t, e, i) {
|
|
64
|
+
const s = this._letterSpacing, n = this._lineHeight, a = this._justify, r = this._maxWidth, o = [];
|
|
65
|
+
let l = 0, h = 0;
|
|
66
|
+
for (const g of t) {
|
|
67
|
+
const I = g.codePointAt(0);
|
|
68
|
+
if (I == null)
|
|
69
|
+
continue;
|
|
70
|
+
const w = i && ct(I);
|
|
71
|
+
let m;
|
|
72
|
+
for (const P of this._glyphItems)
|
|
73
|
+
if (m = P[I], m)
|
|
74
|
+
break;
|
|
75
|
+
o.push({ codePoint: I, x: l, y: h, vertical: w, glyphMosaicItem: m }), m && (l += m.metrics.advance + s);
|
|
76
|
+
}
|
|
77
|
+
let d = l;
|
|
78
|
+
r > 0 && (d = l / Math.max(1, Math.ceil(l / r)));
|
|
79
|
+
const u = t.includes(""), c = [], y = o.length;
|
|
80
|
+
for (let g = 0; g < y - 1; g++) {
|
|
81
|
+
const I = o[g].codePoint, w = ut(I);
|
|
82
|
+
if (ft(I) || w) {
|
|
83
|
+
let m = 0;
|
|
84
|
+
if (I === 10)
|
|
85
|
+
m -= 1e4;
|
|
86
|
+
else if (w && u)
|
|
87
|
+
m += 150;
|
|
88
|
+
else {
|
|
89
|
+
I !== 40 && I !== 65288 || (m += 50);
|
|
90
|
+
const P = o[g + 1].codePoint;
|
|
91
|
+
P !== 41 && P !== 65289 || (m += 50);
|
|
92
|
+
}
|
|
93
|
+
c.push(this._buildBreak(g + 1, o[g].x, d, c, m, !1));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
const p = this._optimalBreaks(this._buildBreak(y, l, d, c, 0, !0));
|
|
97
|
+
let M = 0;
|
|
98
|
+
const x = e ? -n : n;
|
|
99
|
+
let _ = 0;
|
|
100
|
+
for (let g = 0; g < p.length; g++) {
|
|
101
|
+
const I = p[g];
|
|
102
|
+
let w = _;
|
|
103
|
+
for (; w < I && Oe(o[w].codePoint); )
|
|
104
|
+
o[w].glyphMosaicItem = null, ++w;
|
|
105
|
+
let m = I - 1;
|
|
106
|
+
for (; m > w && Oe(o[m].codePoint); )
|
|
107
|
+
o[m].glyphMosaicItem = null, --m;
|
|
108
|
+
if (w <= m) {
|
|
109
|
+
const P = o[w].x;
|
|
110
|
+
for (let T = w; T <= m; T++)
|
|
111
|
+
o[T].x -= P, o[T].y = h;
|
|
112
|
+
let D = o[m].x;
|
|
113
|
+
o[m].glyphMosaicItem && (D += o[m].glyphMosaicItem.metrics.advance), M = Math.max(D, M), a && this._applyJustification(o, w, m);
|
|
114
|
+
}
|
|
115
|
+
_ = I, h += x;
|
|
116
|
+
}
|
|
117
|
+
if (o.length > 0) {
|
|
118
|
+
const g = p.length - 1, I = (a - this._hAnchor) * M;
|
|
119
|
+
let w = (-this._vAnchor * (g + 1) + 0.5) * n;
|
|
120
|
+
e && g && (w += g * n);
|
|
121
|
+
for (const m of o)
|
|
122
|
+
m.x += I, m.y += w;
|
|
123
|
+
}
|
|
124
|
+
return o.filter((g) => g.glyphMosaicItem);
|
|
125
|
+
}
|
|
126
|
+
static getTextBox(t, e) {
|
|
127
|
+
if (!t.length)
|
|
128
|
+
return null;
|
|
129
|
+
let i = 1 / 0, s = 1 / 0, n = 0, a = 0;
|
|
130
|
+
for (const r of t) {
|
|
131
|
+
const o = r.glyphMosaicItem.metrics.advance, l = r.x, h = r.y - He, d = l + o, u = h + e;
|
|
132
|
+
i = Math.min(i, l), n = Math.max(n, d), s = Math.min(s, h), a = Math.max(a, u);
|
|
133
|
+
}
|
|
134
|
+
return { x: i, y: s, width: n - i, height: a - s };
|
|
135
|
+
}
|
|
136
|
+
static getBox(t) {
|
|
137
|
+
if (!t.length)
|
|
138
|
+
return null;
|
|
139
|
+
let e = 1 / 0, i = 1 / 0, s = 0, n = 0;
|
|
140
|
+
for (const a of t) {
|
|
141
|
+
const { height: r, left: o, top: l, width: h } = a.glyphMosaicItem.metrics, d = a.x, u = a.y - (r - Math.abs(l)), c = d + h + o, y = u + r;
|
|
142
|
+
e = Math.min(e, d), s = Math.max(s, c), i = Math.min(i, u), n = Math.max(n, y);
|
|
143
|
+
}
|
|
144
|
+
return { x: e, y: i, width: s - e, height: n - i };
|
|
145
|
+
}
|
|
146
|
+
static addDecoration(t, e) {
|
|
147
|
+
const i = t.length;
|
|
148
|
+
if (i === 0)
|
|
149
|
+
return;
|
|
150
|
+
const s = 3;
|
|
151
|
+
let n = t[0].x + t[0].glyphMosaicItem.metrics.left, a = t[0].y;
|
|
152
|
+
for (let o = 1; o < i; o++) {
|
|
153
|
+
const l = t[o];
|
|
154
|
+
if (l.y !== a) {
|
|
155
|
+
const h = t[o - 1].x + t[o - 1].glyphMosaicItem.metrics.left + t[o - 1].glyphMosaicItem.metrics.width;
|
|
156
|
+
t.push({ codePoint: 0, x: n, y: a + e - s, vertical: !1, glyphMosaicItem: { sdf: !0, rect: new Ce(4, 0, 4, 8), metrics: { width: h - n, height: 2 + 2 * s, left: 0, top: 0, advance: 0 }, page: 0, code: 0 } }), a = l.y, n = l.x + l.glyphMosaicItem.metrics.left;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
const r = t[i - 1].x + t[i - 1].glyphMosaicItem.metrics.left + t[i - 1].glyphMosaicItem.metrics.width;
|
|
160
|
+
t.push({ codePoint: 0, x: n, y: a + e - s, vertical: !1, glyphMosaicItem: { sdf: !0, rect: new Ce(4, 0, 4, 8), metrics: { width: r - n, height: 2 + 2 * s, left: 0, top: 0, advance: 0 }, page: 0, code: 0 } });
|
|
161
|
+
}
|
|
162
|
+
_breakScore(t, e, i, s) {
|
|
163
|
+
const n = (t - e) * (t - e);
|
|
164
|
+
return s ? t < e ? n / 2 : 2 * n : n + Math.abs(i) * i;
|
|
165
|
+
}
|
|
166
|
+
_buildBreak(t, e, i, s, n, a) {
|
|
167
|
+
let r = null, o = this._breakScore(e, i, n, a);
|
|
168
|
+
for (const l of s) {
|
|
169
|
+
const h = e - l.x, d = this._breakScore(h, i, n, a) + l.score;
|
|
170
|
+
d <= o && (r = l, o = d);
|
|
171
|
+
}
|
|
172
|
+
return { index: t, x: e, score: o, previousBreak: r };
|
|
173
|
+
}
|
|
174
|
+
_optimalBreaks(t) {
|
|
175
|
+
return t ? this._optimalBreaks(t.previousBreak).concat(t.index) : [];
|
|
176
|
+
}
|
|
177
|
+
_applyJustification(t, e, i) {
|
|
178
|
+
const s = t[i], n = s.vertical ? K : s.glyphMosaicItem ? s.glyphMosaicItem.metrics.advance : 0, a = (s.x + n) * this._justify;
|
|
179
|
+
for (let r = e; r <= i; r++)
|
|
180
|
+
t[r].x -= a;
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
const Re = 4096, le = 8, X = 0.5, be = 2;
|
|
184
|
+
class ge {
|
|
185
|
+
constructor(t, e, i = 0, s = -1, n = X) {
|
|
186
|
+
this.x = t, this.y = e, this.angle = i, this.segment = s, this.minzoom = n;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
class pe {
|
|
190
|
+
constructor(t, e, i, s, n, a = X, r = se) {
|
|
191
|
+
this.anchor = t, this.labelAngle = e, this.glyphAngle = i, this.page = s, this.alternateVerticalGlyph = n, this.minzoom = a, this.maxzoom = r;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
let Fe = class {
|
|
195
|
+
constructor(t, e, i, s, n, a, r, o, l, h, d, u) {
|
|
196
|
+
this.tl = t, this.tr = e, this.bl = i, this.br = s, this.mosaicRect = n, this.labelAngle = a, this.minAngle = r, this.maxAngle = o, this.anchor = l, this.minzoom = h, this.maxzoom = d, this.page = u;
|
|
197
|
+
}
|
|
198
|
+
}, ze = class {
|
|
199
|
+
constructor(t) {
|
|
200
|
+
this.shapes = t;
|
|
201
|
+
}
|
|
202
|
+
}, dt = class {
|
|
203
|
+
getIconPlacement(t, e, i) {
|
|
204
|
+
const s = new L(t.x, t.y), n = i.rotationAlignment === ie.MAP, a = i.keepUpright;
|
|
205
|
+
let r = i.rotate * Te;
|
|
206
|
+
n && (r += t.angle);
|
|
207
|
+
const o = new ze([]);
|
|
208
|
+
return i.allowOverlap && i.ignorePlacement || !Ee || (o.iconColliders = []), this._addIconPlacement(o, s, e, i, r), n && a && this._addIconPlacement(o, s, e, i, r + oe), o;
|
|
209
|
+
}
|
|
210
|
+
_addIconPlacement(t, e, i, s, n) {
|
|
211
|
+
const a = i.rasterizationScale, r = i.width / a, o = i.height / a, l = s.offset;
|
|
212
|
+
let h = l[0], d = l[1];
|
|
213
|
+
switch (s.anchor) {
|
|
214
|
+
case k.CENTER:
|
|
215
|
+
h -= r / 2, d -= o / 2;
|
|
216
|
+
break;
|
|
217
|
+
case k.LEFT:
|
|
218
|
+
d -= o / 2;
|
|
219
|
+
break;
|
|
220
|
+
case k.RIGHT:
|
|
221
|
+
h -= r, d -= o / 2;
|
|
222
|
+
break;
|
|
223
|
+
case k.TOP:
|
|
224
|
+
h -= r / 2;
|
|
225
|
+
break;
|
|
226
|
+
case k.BOTTOM:
|
|
227
|
+
h -= r / 2, d -= o;
|
|
228
|
+
break;
|
|
229
|
+
case k.TOP_LEFT:
|
|
230
|
+
break;
|
|
231
|
+
case k.BOTTOM_LEFT:
|
|
232
|
+
d -= o;
|
|
233
|
+
break;
|
|
234
|
+
case k.TOP_RIGHT:
|
|
235
|
+
h -= r;
|
|
236
|
+
break;
|
|
237
|
+
case k.BOTTOM_RIGHT:
|
|
238
|
+
h -= r, d -= o;
|
|
239
|
+
}
|
|
240
|
+
const u = i.rect, c = 2 / a, y = h - c, p = d - c, M = y + u.width / a, x = p + u.height / a, _ = new L(y, p), g = new L(M, x), I = new L(y, x), w = new L(M, p);
|
|
241
|
+
if (n !== 0) {
|
|
242
|
+
const P = Math.cos(n), D = Math.sin(n);
|
|
243
|
+
_.rotate(P, D), g.rotate(P, D), I.rotate(P, D), w.rotate(P, D);
|
|
244
|
+
}
|
|
245
|
+
const m = new Fe(_, w, I, g, u, n, 0, 256, e, X, se, 0);
|
|
246
|
+
if (t.shapes.push(m), (!s.allowOverlap || !s.ignorePlacement) && Ee) {
|
|
247
|
+
const P = s.size, D = s.padding, T = { xTile: e.x, yTile: e.y, dxPixels: h * P - D, dyPixels: d * P - D, hard: !s.optional, partIndex: 0, width: r * P + 2 * D, height: o * P + 2 * D, angle: n, minLod: X, maxLod: se };
|
|
248
|
+
t.iconColliders.push(T);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
getTextPlacement(t, e, i, s) {
|
|
252
|
+
const n = new L(t.x, t.y), a = s.rotate * Te, r = s.rotationAlignment === ie.MAP, o = s.keepUpright, l = s.padding;
|
|
253
|
+
let h = X;
|
|
254
|
+
const d = r ? t.angle : 0, u = t.segment >= 0 && r, c = s.allowOverlap && s.ignorePlacement ? null : [], y = [], p = 4, M = !u;
|
|
255
|
+
let x = Number.POSITIVE_INFINITY, _ = Number.NEGATIVE_INFINITY, g = x, I = _;
|
|
256
|
+
const w = (u || r) && o, m = s.size / K;
|
|
257
|
+
let P = !1;
|
|
258
|
+
for (const b of e)
|
|
259
|
+
if (b.vertical) {
|
|
260
|
+
P = !0;
|
|
261
|
+
break;
|
|
262
|
+
}
|
|
263
|
+
let D, T = 0, B = 0;
|
|
264
|
+
if (!u && P) {
|
|
265
|
+
const b = Ke.getTextBox(e, s.lineHeight * K);
|
|
266
|
+
switch (s.anchor) {
|
|
267
|
+
case k.LEFT:
|
|
268
|
+
T = b.height / 2, B = -b.width / 2;
|
|
269
|
+
break;
|
|
270
|
+
case k.RIGHT:
|
|
271
|
+
T = -b.height / 2, B = b.width / 2;
|
|
272
|
+
break;
|
|
273
|
+
case k.TOP:
|
|
274
|
+
T = b.height / 2, B = b.width / 2;
|
|
275
|
+
break;
|
|
276
|
+
case k.BOTTOM:
|
|
277
|
+
T = -b.height / 2, B = -b.width / 2;
|
|
278
|
+
break;
|
|
279
|
+
case k.TOP_LEFT:
|
|
280
|
+
T = b.height;
|
|
281
|
+
break;
|
|
282
|
+
case k.BOTTOM_LEFT:
|
|
283
|
+
B = -b.width;
|
|
284
|
+
break;
|
|
285
|
+
case k.TOP_RIGHT:
|
|
286
|
+
B = b.width;
|
|
287
|
+
break;
|
|
288
|
+
case k.BOTTOM_RIGHT:
|
|
289
|
+
T = -b.height;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
T += s.offset[0] * K, B += s.offset[1] * K;
|
|
293
|
+
for (const b of e) {
|
|
294
|
+
const E = b.glyphMosaicItem;
|
|
295
|
+
if (!E || E.rect.isEmpty)
|
|
296
|
+
continue;
|
|
297
|
+
const V = E.rect, C = E.metrics, O = E.page;
|
|
298
|
+
if (c && M) {
|
|
299
|
+
if (D !== void 0 && D !== b.y) {
|
|
300
|
+
let S, F, z, N;
|
|
301
|
+
P ? (S = -I + T, F = x + B, z = I - g, N = _ - x) : (S = x + T, F = g + B, z = _ - x, N = I - g);
|
|
302
|
+
const G = { xTile: t.x, yTile: t.y, dxPixels: S * m - l, dyPixels: F * m - l, hard: !s.optional, partIndex: 1, width: z * m + 2 * l, height: N * m + 2 * l, angle: a, minLod: X, maxLod: se };
|
|
303
|
+
c.push(G), x = Number.POSITIVE_INFINITY, _ = Number.NEGATIVE_INFINITY, g = x, I = _;
|
|
304
|
+
}
|
|
305
|
+
D = b.y;
|
|
306
|
+
}
|
|
307
|
+
const Z = [];
|
|
308
|
+
if (u) {
|
|
309
|
+
const S = 0.5 * E.metrics.width, F = (b.x + C.left - p + S) * m * le;
|
|
310
|
+
if (h = this._placeGlyph(t, h, F, i, t.segment, 1, b.vertical, O, Z), o && (h = this._placeGlyph(t, h, F, i, t.segment, -1, b.vertical, O, Z)), h >= be)
|
|
311
|
+
break;
|
|
312
|
+
} else
|
|
313
|
+
Z.push(new pe(n, d, d, O, !1)), r && o && Z.push(new pe(n, d + oe, d + oe, O, !1));
|
|
314
|
+
const $ = b.x + C.left, j = b.y - He - C.top, J = $ + C.width, Ie = j + C.height;
|
|
315
|
+
let R, H, he, ce, Q, ue, De, Be;
|
|
316
|
+
if (!u && P)
|
|
317
|
+
if (b.vertical) {
|
|
318
|
+
const S = ($ + J) / 2 - C.height / 2, F = (j + Ie) / 2 + C.width / 2;
|
|
319
|
+
R = new L(-F - p + T, S - p + B), H = new L(R.x + V.width, R.y + V.height), he = new L(R.x, H.y), ce = new L(H.x, R.y);
|
|
320
|
+
} else
|
|
321
|
+
R = new L(-j + p + T, $ - p + B), H = new L(R.x - V.height, R.y + V.width), he = new L(H.x, R.y), ce = new L(R.x, H.y);
|
|
322
|
+
else
|
|
323
|
+
R = new L($ - p + T, j - p + B), H = new L(R.x + V.width, R.y + V.height), he = new L(R.x, H.y), ce = new L(H.x, R.y);
|
|
324
|
+
for (const S of Z) {
|
|
325
|
+
let F, z, N, G;
|
|
326
|
+
if (S.alternateVerticalGlyph) {
|
|
327
|
+
if (!Q) {
|
|
328
|
+
const q = (j + Ie) / 2 + B;
|
|
329
|
+
Q = new L(($ + J) / 2 + T - C.height / 2 - p, q + C.width / 2 + p), ue = new L(Q.x + V.height, Q.y - V.width), De = new L(ue.x, Q.y), Be = new L(Q.x, ue.y);
|
|
330
|
+
}
|
|
331
|
+
F = Q, z = De, N = Be, G = ue;
|
|
332
|
+
} else
|
|
333
|
+
F = R, z = he, N = ce, G = H;
|
|
334
|
+
const fe = j, Me = Ie, de = S.glyphAngle + a;
|
|
335
|
+
if (de !== 0) {
|
|
336
|
+
const q = Math.cos(de), xe = Math.sin(de);
|
|
337
|
+
F = F.clone(), z = z == null ? void 0 : z.clone(), N = N == null ? void 0 : N.clone(), G = G == null ? void 0 : G.clone(), F.rotate(q, xe), G == null || G.rotate(q, xe), z == null || z.rotate(q, xe), N == null || N.rotate(q, xe);
|
|
338
|
+
}
|
|
339
|
+
let re = 0, ne = 256;
|
|
340
|
+
if (u && P ? b.vertical ? S.alternateVerticalGlyph ? (re = 32, ne = 96) : (re = 224, ne = 32) : (re = 224, ne = 96) : (re = 192, ne = 64), y.push(new Fe(F, N, z, G, V, S.labelAngle, re, ne, S.anchor, S.minzoom, S.maxzoom, S.page)), c && (!w || this._legible(S.labelAngle))) {
|
|
341
|
+
if (M)
|
|
342
|
+
$ < x && (x = $), fe < g && (g = fe), J > _ && (_ = J), Me > I && (I = Me);
|
|
343
|
+
else if (S.minzoom < be) {
|
|
344
|
+
const q = { xTile: t.x, yTile: t.y, dxPixels: ($ + T) * m - l, dyPixels: (fe + T) * m - l, hard: !s.optional, partIndex: 1, width: (J - $) * m + 2 * l, height: (Me - fe) * m + 2 * l, angle: de, minLod: S.minzoom, maxLod: S.maxzoom };
|
|
345
|
+
c.push(q);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
if (h >= be)
|
|
351
|
+
return null;
|
|
352
|
+
if (c && M) {
|
|
353
|
+
let b, E, V, C;
|
|
354
|
+
P ? (b = -I + T, E = x + B, V = I - g, C = _ - x) : (b = x + T, E = g + B, V = _ - x, C = I - g);
|
|
355
|
+
const O = { xTile: t.x, yTile: t.y, dxPixels: b * m - l, dyPixels: E * m - l, hard: !s.optional, partIndex: 1, width: V * m + 2 * l, height: C * m + 2 * l, angle: a, minLod: X, maxLod: se };
|
|
356
|
+
c.push(O);
|
|
357
|
+
}
|
|
358
|
+
const A = new ze(y);
|
|
359
|
+
return c && c.length > 0 && (A.textColliders = c), A;
|
|
360
|
+
}
|
|
361
|
+
_legible(t) {
|
|
362
|
+
const e = $e(t);
|
|
363
|
+
return e < 65 || e >= 193;
|
|
364
|
+
}
|
|
365
|
+
_placeGlyph(t, e, i, s, n, a, r, o, l) {
|
|
366
|
+
let h = a;
|
|
367
|
+
const d = h < 0 ? Ve(t.angle + oe, ke) : t.angle;
|
|
368
|
+
let u = 0;
|
|
369
|
+
i < 0 && (h *= -1, i *= -1, u = oe), h > 0 && ++n;
|
|
370
|
+
let c = new L(t.x, t.y), y = s[n], p = se;
|
|
371
|
+
if (s.length <= n)
|
|
372
|
+
return p;
|
|
373
|
+
for (; ; ) {
|
|
374
|
+
const M = y.x - c.x, x = y.y - c.y, _ = Math.sqrt(M * M + x * x), g = Math.max(i / _, e), I = M / _, w = x / _, m = Ve(Math.atan2(w, I) + u, ke);
|
|
375
|
+
if (l.push(new pe(c, d, m, o, !1, g, p)), r && l.push(new pe(c, d, m, o, !0, g, p)), g <= e)
|
|
376
|
+
return g;
|
|
377
|
+
c = y.clone();
|
|
378
|
+
do {
|
|
379
|
+
if (n += h, s.length <= n || n < 0)
|
|
380
|
+
return g;
|
|
381
|
+
y = s[n];
|
|
382
|
+
} while (c.isEqual(y));
|
|
383
|
+
let P = y.x - c.x, D = y.y - c.y;
|
|
384
|
+
const T = Math.sqrt(P * P + D * D);
|
|
385
|
+
P *= _ / T, D *= _ / T, c.x -= P, c.y -= D, p = g;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}, te = class extends v {
|
|
389
|
+
constructor() {
|
|
390
|
+
super(12);
|
|
391
|
+
}
|
|
392
|
+
add(t, e, i) {
|
|
393
|
+
const s = this.array;
|
|
394
|
+
s.push(t), s.push(e), s.push(i);
|
|
395
|
+
}
|
|
396
|
+
}, xt = class extends v {
|
|
397
|
+
constructor(t) {
|
|
398
|
+
super(t);
|
|
399
|
+
}
|
|
400
|
+
add(t, e, i, s, n, a, r, o, l, h, d, u) {
|
|
401
|
+
const c = this.array;
|
|
402
|
+
let y = v.i1616to32(t, e);
|
|
403
|
+
c.push(y);
|
|
404
|
+
const p = 31;
|
|
405
|
+
y = v.i8888to32(Math.round(p * i), Math.round(p * s), Math.round(p * n), Math.round(p * a)), c.push(y), y = v.i8888to32(Math.round(p * r), Math.round(p * o), Math.round(p * l), Math.round(p * h)), c.push(y), y = v.i1616to32(d, 0), c.push(y), u && c.push(...u);
|
|
406
|
+
}
|
|
407
|
+
}, yt = class extends v {
|
|
408
|
+
constructor(t) {
|
|
409
|
+
super(t);
|
|
410
|
+
}
|
|
411
|
+
add(t, e, i) {
|
|
412
|
+
const s = this.array;
|
|
413
|
+
s.push(v.i1616to32(t, e)), i && s.push(...i);
|
|
414
|
+
}
|
|
415
|
+
};
|
|
416
|
+
class gt extends v {
|
|
417
|
+
constructor(t) {
|
|
418
|
+
super(t);
|
|
419
|
+
}
|
|
420
|
+
add(t, e, i, s, n, a, r) {
|
|
421
|
+
const o = this.array, l = this.index;
|
|
422
|
+
let h = v.i1616to32(t, e);
|
|
423
|
+
o.push(h);
|
|
424
|
+
const d = 15;
|
|
425
|
+
return h = v.i8888to32(Math.round(d * i), Math.round(d * s), n, a), o.push(h), r && o.push(...r), l;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
class Ne extends v {
|
|
429
|
+
constructor(t) {
|
|
430
|
+
super(t);
|
|
431
|
+
}
|
|
432
|
+
add(t, e, i, s, n, a, r, o, l, h, d, u) {
|
|
433
|
+
const c = this.array;
|
|
434
|
+
let y = v.i1616to32(t, e);
|
|
435
|
+
c.push(y), y = v.i1616to32(Math.round(8 * i), Math.round(8 * s)), c.push(y), y = v.i8888to32(n / 4, a / 4, o, l), c.push(y), y = v.i8888to32(0, $e(r), 10 * h, Math.min(10 * d, 255)), c.push(y), u && c.push(...u);
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
class pt extends v {
|
|
439
|
+
constructor(t) {
|
|
440
|
+
super(t);
|
|
441
|
+
}
|
|
442
|
+
add(t, e, i, s, n) {
|
|
443
|
+
const a = this.array, r = v.i1616to32(2 * t + i, 2 * e + s);
|
|
444
|
+
a.push(r), n && a.push(...n);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
class _e {
|
|
448
|
+
constructor(t, e, i) {
|
|
449
|
+
this.layerExtent = 4096, this._features = [], this.layer = t, this.zoom = e, this._spriteInfo = i, this._filter = t.getFeatureFilter();
|
|
450
|
+
}
|
|
451
|
+
pushFeature(t) {
|
|
452
|
+
this._filter && !this._filter.filter(t, this.zoom) || this._features.push(t);
|
|
453
|
+
}
|
|
454
|
+
hasFeatures() {
|
|
455
|
+
return this._features.length > 0;
|
|
456
|
+
}
|
|
457
|
+
getResources(t, e, i) {
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
let mt = class extends _e {
|
|
461
|
+
constructor(t, e, i, s, n) {
|
|
462
|
+
super(t, e, i), this.type = me.CIRCLE, this._circleVertexBuffer = s, this._circleIndexBuffer = n;
|
|
463
|
+
}
|
|
464
|
+
get circleIndexStart() {
|
|
465
|
+
return this._circleIndexStart;
|
|
466
|
+
}
|
|
467
|
+
get circleIndexCount() {
|
|
468
|
+
return this._circleIndexCount;
|
|
469
|
+
}
|
|
470
|
+
processFeatures(t) {
|
|
471
|
+
const e = this._circleVertexBuffer, i = this._circleIndexBuffer;
|
|
472
|
+
this._circleIndexStart = 3 * i.index, this._circleIndexCount = 0;
|
|
473
|
+
const s = this.layer, n = this.zoom;
|
|
474
|
+
t && t.setExtent(this.layerExtent);
|
|
475
|
+
for (const a of this._features) {
|
|
476
|
+
const r = a.getGeometry(t);
|
|
477
|
+
if (!r)
|
|
478
|
+
continue;
|
|
479
|
+
const o = s.circleMaterial.encodeAttributes(a, n, s);
|
|
480
|
+
for (const l of r)
|
|
481
|
+
if (l)
|
|
482
|
+
for (const h of l) {
|
|
483
|
+
const d = e.index;
|
|
484
|
+
e.add(h.x, h.y, 0, 0, o), e.add(h.x, h.y, 0, 1, o), e.add(h.x, h.y, 1, 0, o), e.add(h.x, h.y, 1, 1, o), i.add(d, d + 1, d + 2), i.add(d + 1, d + 2, d + 3), this._circleIndexCount += 6;
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
serialize() {
|
|
489
|
+
let t = 6;
|
|
490
|
+
t += this.layerUIDs.length, t += this._circleVertexBuffer.array.length, t += this._circleIndexBuffer.array.length;
|
|
491
|
+
const e = new Uint32Array(t), i = new Int32Array(e.buffer);
|
|
492
|
+
let s = 0;
|
|
493
|
+
e[s++] = this.type, e[s++] = this.layerUIDs.length;
|
|
494
|
+
for (let n = 0; n < this.layerUIDs.length; n++)
|
|
495
|
+
e[s++] = this.layerUIDs[n];
|
|
496
|
+
e[s++] = this._circleIndexStart, e[s++] = this._circleIndexCount, e[s++] = this._circleVertexBuffer.array.length;
|
|
497
|
+
for (let n = 0; n < this._circleVertexBuffer.array.length; n++)
|
|
498
|
+
i[s++] = this._circleVertexBuffer.array[n];
|
|
499
|
+
e[s++] = this._circleIndexBuffer.array.length;
|
|
500
|
+
for (let n = 0; n < this._circleIndexBuffer.array.length; n++)
|
|
501
|
+
e[s++] = this._circleIndexBuffer.array[n];
|
|
502
|
+
return e.buffer;
|
|
503
|
+
}
|
|
504
|
+
}, _t = class We extends _e {
|
|
505
|
+
constructor(t, e, i, s, n, a, r) {
|
|
506
|
+
super(t, e, i), this.type = me.FILL, this._patternMap = /* @__PURE__ */ new Map(), this._fillVertexBuffer = s, this._fillIndexBuffer = n, this._outlineVertexBuffer = a, this._outlineIndexBuffer = r;
|
|
507
|
+
}
|
|
508
|
+
get fillIndexStart() {
|
|
509
|
+
return this._fillIndexStart;
|
|
510
|
+
}
|
|
511
|
+
get fillIndexCount() {
|
|
512
|
+
return this._fillIndexCount;
|
|
513
|
+
}
|
|
514
|
+
get outlineIndexStart() {
|
|
515
|
+
return this._outlineIndexStart;
|
|
516
|
+
}
|
|
517
|
+
get outlineIndexCount() {
|
|
518
|
+
return this._outlineIndexCount;
|
|
519
|
+
}
|
|
520
|
+
getResources(t, e, i) {
|
|
521
|
+
const s = this.layer, n = this.zoom, a = s.getPaintProperty("fill-pattern");
|
|
522
|
+
if (a)
|
|
523
|
+
if (a.isDataDriven)
|
|
524
|
+
for (const r of this._features)
|
|
525
|
+
e(a.getValue(n, r), !0);
|
|
526
|
+
else
|
|
527
|
+
e(a.getValue(n), !0);
|
|
528
|
+
}
|
|
529
|
+
processFeatures(t) {
|
|
530
|
+
this._fillIndexStart = 3 * this._fillIndexBuffer.index, this._fillIndexCount = 0, this._outlineIndexStart = 3 * this._outlineIndexBuffer.index, this._outlineIndexCount = 0;
|
|
531
|
+
const e = this.layer, i = this.zoom, { fillMaterial: s, outlineMaterial: n, hasDataDrivenFill: a, hasDataDrivenOutline: r } = e;
|
|
532
|
+
t && t.setExtent(this.layerExtent);
|
|
533
|
+
const o = e.getPaintProperty("fill-pattern"), l = o == null ? void 0 : o.isDataDriven;
|
|
534
|
+
let h = !o && e.getPaintValue("fill-antialias", i);
|
|
535
|
+
if (e.outlineUsesFillColor) {
|
|
536
|
+
if (h && !e.hasDataDrivenOpacity) {
|
|
537
|
+
const c = e.getPaintValue("fill-opacity", i), y = e.getPaintValue("fill-opacity", i + 1);
|
|
538
|
+
c < 1 && y < 1 && (h = !1);
|
|
539
|
+
}
|
|
540
|
+
if (h && !e.hasDataDrivenColor) {
|
|
541
|
+
const c = e.getPaintValue("fill-color", i), y = e.getPaintValue("fill-color", i + 1);
|
|
542
|
+
c[3] < 1 && y[3] < 1 && (h = !1);
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
const d = this._features, u = t == null ? void 0 : t.validateTessellation;
|
|
546
|
+
if (l) {
|
|
547
|
+
const c = [];
|
|
548
|
+
for (const y of d) {
|
|
549
|
+
const p = o.getValue(i, y), M = this._spriteInfo[p];
|
|
550
|
+
if (!(M != null && M.rect))
|
|
551
|
+
continue;
|
|
552
|
+
const x = s.encodeAttributes(y, i, e, M), _ = h && r ? n.encodeAttributes(y, i, e) : [], g = y.getGeometry(t);
|
|
553
|
+
c.push({ ddFillAttributes: x, ddOutlineAttributes: _, page: M.page, geometry: g }), c.sort((I, w) => I.page - w.page);
|
|
554
|
+
for (const { ddFillAttributes: I, ddOutlineAttributes: w, page: m, geometry: P } of c)
|
|
555
|
+
this._processFeature(P, h, e.outlineUsesFillColor, I, w, u, m);
|
|
556
|
+
}
|
|
557
|
+
} else
|
|
558
|
+
for (const c of d) {
|
|
559
|
+
const y = a ? s.encodeAttributes(c, i, e) : null, p = h && r ? n.encodeAttributes(c, i, e) : null, M = c.getGeometry(t);
|
|
560
|
+
this._processFeature(M, h, e.outlineUsesFillColor, y, p, u);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
serialize() {
|
|
564
|
+
let t = 10;
|
|
565
|
+
t += this.layerUIDs.length, t += this._fillVertexBuffer.array.length, t += this._fillIndexBuffer.array.length, t += this._outlineVertexBuffer.array.length, t += this._outlineIndexBuffer.array.length, t += 3 * this._patternMap.size + 1;
|
|
566
|
+
const e = new Uint32Array(t), i = new Int32Array(e.buffer);
|
|
567
|
+
let s = 0;
|
|
568
|
+
e[s++] = this.type, e[s++] = this.layerUIDs.length;
|
|
569
|
+
for (let r = 0; r < this.layerUIDs.length; r++)
|
|
570
|
+
e[s++] = this.layerUIDs[r];
|
|
571
|
+
e[s++] = this._fillIndexStart, e[s++] = this._fillIndexCount, e[s++] = this._outlineIndexStart, e[s++] = this._outlineIndexCount;
|
|
572
|
+
const n = this._patternMap, a = n.size;
|
|
573
|
+
if (e[s++] = a, a > 0)
|
|
574
|
+
for (const [r, [o, l]] of n)
|
|
575
|
+
e[s++] = r, e[s++] = o, e[s++] = l;
|
|
576
|
+
e[s++] = this._fillVertexBuffer.array.length;
|
|
577
|
+
for (let r = 0; r < this._fillVertexBuffer.array.length; r++)
|
|
578
|
+
i[s++] = this._fillVertexBuffer.array[r];
|
|
579
|
+
e[s++] = this._fillIndexBuffer.array.length;
|
|
580
|
+
for (let r = 0; r < this._fillIndexBuffer.array.length; r++)
|
|
581
|
+
e[s++] = this._fillIndexBuffer.array[r];
|
|
582
|
+
e[s++] = this._outlineVertexBuffer.array.length;
|
|
583
|
+
for (let r = 0; r < this._outlineVertexBuffer.array.length; r++)
|
|
584
|
+
i[s++] = this._outlineVertexBuffer.array[r];
|
|
585
|
+
e[s++] = this._outlineIndexBuffer.array.length;
|
|
586
|
+
for (let r = 0; r < this._outlineIndexBuffer.array.length; r++)
|
|
587
|
+
e[s++] = this._outlineIndexBuffer.array[r];
|
|
588
|
+
return e.buffer;
|
|
589
|
+
}
|
|
590
|
+
_processFeature(t, e, i, s, n, a, r) {
|
|
591
|
+
if (!t)
|
|
592
|
+
return;
|
|
593
|
+
const o = t.length, l = !n || n.length === 0;
|
|
594
|
+
if (e && (!i || l))
|
|
595
|
+
for (let u = 0; u < o; u++)
|
|
596
|
+
this._processOutline(t[u], n);
|
|
597
|
+
const h = 32;
|
|
598
|
+
let d;
|
|
599
|
+
for (let u = 0; u < o; u++) {
|
|
600
|
+
const c = We._area(t[u]);
|
|
601
|
+
c > h ? (d !== void 0 && this._processFill(t, d, s, a, r), d = [u]) : c < -h && d !== void 0 && d.push(u);
|
|
602
|
+
}
|
|
603
|
+
d !== void 0 && this._processFill(t, d, s, a, r);
|
|
604
|
+
}
|
|
605
|
+
_processOutline(t, e) {
|
|
606
|
+
const i = this._outlineVertexBuffer, s = this._outlineIndexBuffer, n = s.index;
|
|
607
|
+
let a, r, o;
|
|
608
|
+
const l = new L(0, 0), h = new L(0, 0), d = new L(0, 0);
|
|
609
|
+
let u = -1, c = -1, y = -1, p = -1, M = -1, x = !1;
|
|
610
|
+
const _ = 0;
|
|
611
|
+
let g = t.length;
|
|
612
|
+
if (g < 2)
|
|
613
|
+
return;
|
|
614
|
+
const I = t[_];
|
|
615
|
+
let w = t[g - 1];
|
|
616
|
+
for (; g && w.isEqual(I); )
|
|
617
|
+
--g, w = t[g - 1];
|
|
618
|
+
if (!(g - _ < 2)) {
|
|
619
|
+
for (let m = _; m < g; ++m) {
|
|
620
|
+
m === _ ? (a = t[g - 1], r = t[_], o = t[_ + 1], l.assignSub(r, a), l.normalize(), l.rightPerpendicular()) : (a = r, r = o, o = m !== g - 1 ? t[m + 1] : t[_], l.assign(h));
|
|
621
|
+
const P = this._isClipEdge(a, r);
|
|
622
|
+
p === -1 && (x = P), h.assignSub(o, r), h.normalize(), h.rightPerpendicular();
|
|
623
|
+
const D = l.x * h.y - l.y * h.x;
|
|
624
|
+
d.assignAdd(l, h), d.normalize();
|
|
625
|
+
const T = -d.x * -l.x + -d.y * -l.y;
|
|
626
|
+
let B = Math.abs(T !== 0 ? 1 / T : 1);
|
|
627
|
+
B > 8 && (B = 8), D >= 0 ? (y = i.add(r.x, r.y, l.x, l.y, 0, 1, e), p === -1 && (p = y), u >= 0 && c >= 0 && y >= 0 && !P && s.add(u, c, y), c = i.add(r.x, r.y, B * -d.x, B * -d.y, 0, -1, e), M === -1 && (M = c), u >= 0 && c >= 0 && y >= 0 && !P && s.add(u, c, y), u = c, c = y, y = i.add(r.x, r.y, d.x, d.y, 0, 1, e), u >= 0 && c >= 0 && y >= 0 && !P && s.add(u, c, y), c = i.add(r.x, r.y, h.x, h.y, 0, 1, e), u >= 0 && c >= 0 && y >= 0 && !P && s.add(u, c, y)) : (y = i.add(r.x, r.y, B * d.x, B * d.y, 0, 1, e), p === -1 && (p = y), u >= 0 && c >= 0 && y >= 0 && !P && s.add(u, c, y), c = i.add(r.x, r.y, -l.x, -l.y, 0, -1, e), M === -1 && (M = c), u >= 0 && c >= 0 && y >= 0 && !P && s.add(u, c, y), u = c, c = y, y = i.add(r.x, r.y, -d.x, -d.y, 0, -1, e), u >= 0 && c >= 0 && y >= 0 && !P && s.add(u, c, y), u = i.add(r.x, r.y, -h.x, -h.y, 0, -1, e), u >= 0 && c >= 0 && y >= 0 && !P && s.add(u, c, y));
|
|
628
|
+
}
|
|
629
|
+
u >= 0 && c >= 0 && p >= 0 && !x && s.add(u, c, p), u >= 0 && p >= 0 && M >= 0 && !x && s.add(u, M, p), this._outlineIndexCount += 3 * (s.index - n);
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
_processFill(t, e, i, s, n) {
|
|
633
|
+
s = !0;
|
|
634
|
+
let a;
|
|
635
|
+
e.length > 1 && (a = []);
|
|
636
|
+
let r = 0;
|
|
637
|
+
for (const d of e)
|
|
638
|
+
r !== 0 && a.push(r), r += t[d].length;
|
|
639
|
+
const o = 2 * r, l = Le.acquire();
|
|
640
|
+
for (const d of e) {
|
|
641
|
+
const u = t[d], c = u.length;
|
|
642
|
+
for (let y = 0; y < c; ++y)
|
|
643
|
+
l.push(u[y].x, u[y].y);
|
|
644
|
+
}
|
|
645
|
+
const h = ve(l, a, 2);
|
|
646
|
+
if (s && ve.deviation(l, a, 2, h) > 0) {
|
|
647
|
+
const d = e.map((y) => t[y].length), { buffer: u, vertexCount: c } = tt(l, d);
|
|
648
|
+
if (c > 0) {
|
|
649
|
+
const y = this._fillVertexBuffer.index;
|
|
650
|
+
for (let p = 0; p < c; p++)
|
|
651
|
+
this._fillVertexBuffer.add(u[2 * p], u[2 * p + 1], i);
|
|
652
|
+
for (let p = 0; p < c; p += 3) {
|
|
653
|
+
const M = y + p;
|
|
654
|
+
this._fillIndexBuffer.add(M, M + 1, M + 2);
|
|
655
|
+
}
|
|
656
|
+
if (n !== void 0) {
|
|
657
|
+
const p = this._patternMap, M = p.get(n);
|
|
658
|
+
M ? M[1] += c : p.set(n, [this._fillIndexStart + this._fillIndexCount, c]);
|
|
659
|
+
}
|
|
660
|
+
this._fillIndexCount += c;
|
|
661
|
+
}
|
|
662
|
+
} else {
|
|
663
|
+
const d = h.length;
|
|
664
|
+
if (d > 0) {
|
|
665
|
+
const u = this._fillVertexBuffer.index;
|
|
666
|
+
let c = 0;
|
|
667
|
+
for (; c < o; )
|
|
668
|
+
this._fillVertexBuffer.add(l[c++], l[c++], i);
|
|
669
|
+
let y = 0;
|
|
670
|
+
for (; y < d; )
|
|
671
|
+
this._fillIndexBuffer.add(u + h[y++], u + h[y++], u + h[y++]);
|
|
672
|
+
if (n !== void 0) {
|
|
673
|
+
const p = this._patternMap, M = p.get(n);
|
|
674
|
+
M ? M[1] += d : p.set(n, [this._fillIndexStart + this._fillIndexCount, d]);
|
|
675
|
+
}
|
|
676
|
+
this._fillIndexCount += d;
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
Le.release(l);
|
|
680
|
+
}
|
|
681
|
+
_isClipEdge(t, e) {
|
|
682
|
+
return t.x === e.x ? t.x <= -64 || t.x >= 4160 : t.y === e.y && (t.y <= -64 || t.y >= 4160);
|
|
683
|
+
}
|
|
684
|
+
static _area(t) {
|
|
685
|
+
let e = 0;
|
|
686
|
+
const i = t.length - 1;
|
|
687
|
+
for (let s = 0; s < i; s++)
|
|
688
|
+
e += (t[s].x - t[s + 1].x) * (t[s].y + t[s + 1].y);
|
|
689
|
+
return e += (t[i].x - t[0].x) * (t[i].y + t[0].y), 0.5 * e;
|
|
690
|
+
}
|
|
691
|
+
};
|
|
692
|
+
const It = 65535;
|
|
693
|
+
class Mt extends _e {
|
|
694
|
+
constructor(t, e, i, s, n) {
|
|
695
|
+
super(t, e, i), this.type = me.LINE, this._tessellationOptions = { pixelCoordRatio: 8, halfWidth: 0, offset: 0 }, this._patternMap = /* @__PURE__ */ new Map(), this.tessellationProperties = { _lineVertexBuffer: null, _lineIndexBuffer: null, _ddValues: null }, this.tessellationProperties._lineVertexBuffer = s, this.tessellationProperties._lineIndexBuffer = n, this._lineTessellator = new st(Pt(this.tessellationProperties), wt(this.tessellationProperties), t.canUseThinTessellation);
|
|
696
|
+
}
|
|
697
|
+
get lineIndexStart() {
|
|
698
|
+
return this._lineIndexStart;
|
|
699
|
+
}
|
|
700
|
+
get lineIndexCount() {
|
|
701
|
+
return this._lineIndexCount;
|
|
702
|
+
}
|
|
703
|
+
getResources(t, e, i) {
|
|
704
|
+
const s = this.layer, n = this.zoom, a = s.getPaintProperty("line-pattern"), r = s.getPaintProperty("line-dasharray"), o = s.getLayoutProperty("line-cap");
|
|
705
|
+
if (!a && !r)
|
|
706
|
+
return;
|
|
707
|
+
const l = (o == null ? void 0 : o.getValue(n)) || 0, h = o == null ? void 0 : o.isDataDriven, d = a == null ? void 0 : a.isDataDriven, u = r == null ? void 0 : r.isDataDriven;
|
|
708
|
+
if (d || u)
|
|
709
|
+
for (const c of this._features)
|
|
710
|
+
e(d ? a.getValue(n, c) : this._getDashArrayKey(c, n, s, r, h, o, l));
|
|
711
|
+
else if (a)
|
|
712
|
+
e(a.getValue(n));
|
|
713
|
+
else if (r) {
|
|
714
|
+
const c = r.getValue(n);
|
|
715
|
+
e(s.getDashKey(c, l));
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
processFeatures(t) {
|
|
719
|
+
this._lineIndexStart = 3 * this.tessellationProperties._lineIndexBuffer.index, this._lineIndexCount = 0;
|
|
720
|
+
const e = this.layer, i = this.zoom, s = this._features, n = this._tessellationOptions, { hasDataDrivenLine: a, lineMaterial: r } = e;
|
|
721
|
+
t && t.setExtent(this.layerExtent);
|
|
722
|
+
const o = e.getPaintProperty("line-pattern"), l = e.getPaintProperty("line-dasharray"), h = o == null ? void 0 : o.isDataDriven, d = l == null ? void 0 : l.isDataDriven;
|
|
723
|
+
let u;
|
|
724
|
+
u = e.getLayoutProperty("line-cap");
|
|
725
|
+
const c = u != null && u.isDataDriven ? u : null, y = c ? null : e.getLayoutValue("line-cap", i), p = y || 0, M = !!c;
|
|
726
|
+
u = e.getLayoutProperty("line-join");
|
|
727
|
+
const x = u != null && u.isDataDriven ? u : null, _ = x ? null : e.getLayoutValue("line-join", i);
|
|
728
|
+
u = e.getLayoutProperty("line-miter-limit");
|
|
729
|
+
const g = u != null && u.isDataDriven ? u : null, I = g ? null : e.getLayoutValue("line-miter-limit", i);
|
|
730
|
+
u = e.getLayoutProperty("line-round-limit");
|
|
731
|
+
const w = u != null && u.isDataDriven ? u : null, m = w ? null : e.getLayoutValue("line-round-limit", i);
|
|
732
|
+
u = e.getPaintProperty("line-width");
|
|
733
|
+
const P = u != null && u.isDataDriven ? u : null, D = P ? null : e.getPaintValue("line-width", i);
|
|
734
|
+
u = e.getPaintProperty("line-offset");
|
|
735
|
+
const T = u != null && u.isDataDriven ? u : null, B = T ? null : e.getPaintValue("line-offset", i);
|
|
736
|
+
if (h || d) {
|
|
737
|
+
const A = [];
|
|
738
|
+
for (const b of s) {
|
|
739
|
+
const E = h ? o.getValue(i, b) : this._getDashArrayKey(b, i, e, l, M, c, p), V = this._spriteInfo[E];
|
|
740
|
+
if (!(V != null && V.rect))
|
|
741
|
+
continue;
|
|
742
|
+
const C = r.encodeAttributes(b, i, e, V), O = b.getGeometry(t);
|
|
743
|
+
A.push({ ddAttributes: C, page: V.page, cap: c ? c.getValue(i, b) : y, join: x ? x.getValue(i, b) : _, miterLimit: g ? g.getValue(i, b) : I, roundLimit: w ? w.getValue(i, b) : m, halfWidth: 0.5 * (P ? P.getValue(i, b) : D), offset: T ? T.getValue(i, b) : B, geometry: O });
|
|
744
|
+
}
|
|
745
|
+
A.sort((b, E) => b.page - E.page), n.textured = !0;
|
|
746
|
+
for (const { ddAttributes: b, page: E, cap: V, join: C, miterLimit: O, roundLimit: Z, halfWidth: $, offset: j, geometry: J } of A)
|
|
747
|
+
n.capType = V, n.joinType = C, n.miterLimit = O, n.roundLimit = Z, n.halfWidth = $, n.offset = j, this._processFeature(J, b, E);
|
|
748
|
+
} else {
|
|
749
|
+
if (o) {
|
|
750
|
+
const A = o.getValue(i), b = this._spriteInfo[A];
|
|
751
|
+
if (!(b != null && b.rect))
|
|
752
|
+
return;
|
|
753
|
+
}
|
|
754
|
+
n.textured = !(!o && !l), n.capType = y, n.joinType = _, n.miterLimit = I, n.roundLimit = m, n.halfWidth = 0.5 * D, n.offset = B;
|
|
755
|
+
for (const A of s) {
|
|
756
|
+
const b = a ? r.encodeAttributes(A, i, e) : null;
|
|
757
|
+
c && (n.capType = c.getValue(i, A)), x && (n.joinType = x.getValue(i, A)), g && (n.miterLimit = g.getValue(i, A)), w && (n.roundLimit = w.getValue(i, A)), P && (n.halfWidth = 0.5 * P.getValue(i, A)), T && (n.offset = T.getValue(i, A));
|
|
758
|
+
const E = A.getGeometry(t);
|
|
759
|
+
this._processFeature(E, b);
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
serialize() {
|
|
764
|
+
let t = 6;
|
|
765
|
+
t += this.layerUIDs.length, t += this.tessellationProperties._lineVertexBuffer.array.length, t += this.tessellationProperties._lineIndexBuffer.array.length, t += 3 * this._patternMap.size + 1;
|
|
766
|
+
const e = new Uint32Array(t), i = new Int32Array(e.buffer);
|
|
767
|
+
let s = 0;
|
|
768
|
+
e[s++] = this.type, e[s++] = this.layerUIDs.length;
|
|
769
|
+
for (let r = 0; r < this.layerUIDs.length; r++)
|
|
770
|
+
e[s++] = this.layerUIDs[r];
|
|
771
|
+
e[s++] = this._lineIndexStart, e[s++] = this._lineIndexCount;
|
|
772
|
+
const n = this._patternMap, a = n.size;
|
|
773
|
+
if (e[s++] = a, a > 0)
|
|
774
|
+
for (const [r, [o, l]] of n)
|
|
775
|
+
e[s++] = r, e[s++] = o, e[s++] = l;
|
|
776
|
+
e[s++] = this.tessellationProperties._lineVertexBuffer.array.length;
|
|
777
|
+
for (let r = 0; r < this.tessellationProperties._lineVertexBuffer.array.length; r++)
|
|
778
|
+
i[s++] = this.tessellationProperties._lineVertexBuffer.array[r];
|
|
779
|
+
e[s++] = this.tessellationProperties._lineIndexBuffer.array.length;
|
|
780
|
+
for (let r = 0; r < this.tessellationProperties._lineIndexBuffer.array.length; r++)
|
|
781
|
+
e[s++] = this.tessellationProperties._lineIndexBuffer.array[r];
|
|
782
|
+
return e.buffer;
|
|
783
|
+
}
|
|
784
|
+
_processFeature(t, e, i) {
|
|
785
|
+
if (!t)
|
|
786
|
+
return;
|
|
787
|
+
const s = t.length;
|
|
788
|
+
for (let n = 0; n < s; n++)
|
|
789
|
+
this._processGeometry(t[n], e, i);
|
|
790
|
+
}
|
|
791
|
+
_processGeometry(t, e, i) {
|
|
792
|
+
if (t.length < 2)
|
|
793
|
+
return;
|
|
794
|
+
const s = 1e-3;
|
|
795
|
+
let n, a, r = t[0], o = 1;
|
|
796
|
+
for (; o < t.length; )
|
|
797
|
+
n = t[o].x - r.x, a = t[o].y - r.y, n * n + a * a < s * s ? t.splice(o, 1) : (r = t[o], ++o);
|
|
798
|
+
if (t.length < 2)
|
|
799
|
+
return;
|
|
800
|
+
const l = this.tessellationProperties._lineIndexBuffer, h = 3 * l.index;
|
|
801
|
+
this._tessellationOptions.initialDistance = 0, this._tessellationOptions.wrapDistance = It, this.tessellationProperties._ddValues = e, this._lineTessellator.tessellate(t, this._tessellationOptions);
|
|
802
|
+
const d = 3 * l.index - h;
|
|
803
|
+
if (i !== void 0) {
|
|
804
|
+
const u = this._patternMap, c = u.get(i);
|
|
805
|
+
c ? c[1] += d : u.set(i, [h + this._lineIndexCount, d]);
|
|
806
|
+
}
|
|
807
|
+
this._lineIndexCount += d;
|
|
808
|
+
}
|
|
809
|
+
_getDashArrayKey(t, e, i, s, n, a, r) {
|
|
810
|
+
const o = n ? a.getValue(e, t) : r, l = s.getValue(e, t);
|
|
811
|
+
return i.getDashKey(l, o);
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
const Pt = (f) => (t, e, i, s, n, a, r, o, l, h, d) => (f._lineVertexBuffer.add(t, e, r, o, i, s, n, a, l, h, d, f._ddValues), f._lineVertexBuffer.index - 1), wt = (f) => (t, e, i) => {
|
|
815
|
+
f._lineIndexBuffer.add(t, e, i);
|
|
816
|
+
}, Ue = 10;
|
|
817
|
+
function bt(f, t) {
|
|
818
|
+
return f.iconMosaicItem && t.iconMosaicItem ? f.iconMosaicItem.page === t.iconMosaicItem.page ? 0 : f.iconMosaicItem.page - t.iconMosaicItem.page : f.iconMosaicItem && !t.iconMosaicItem ? 1 : !f.iconMosaicItem && t.iconMosaicItem ? -1 : 0;
|
|
819
|
+
}
|
|
820
|
+
class U extends _e {
|
|
821
|
+
constructor(t, e, i, s, n, a, r, o, l) {
|
|
822
|
+
super(e, i, l.getSpriteItems()), this.type = me.SYMBOL, this._markerMap = /* @__PURE__ */ new Map(), this._glyphMap = /* @__PURE__ */ new Map(), this._glyphBufferDataStorage = /* @__PURE__ */ new Map(), this._isIconSDF = !1, this._sourceTileKey = t, this._iconVertexBuffer = s, this._iconIndexBuffer = n, this._textVertexBuffer = a, this._textIndexBuffer = r, this._placementEngine = o, this._workerTileHandler = l;
|
|
823
|
+
}
|
|
824
|
+
get markerPageMap() {
|
|
825
|
+
return this._markerMap;
|
|
826
|
+
}
|
|
827
|
+
get glyphsPageMap() {
|
|
828
|
+
return this._glyphMap;
|
|
829
|
+
}
|
|
830
|
+
get symbolInstances() {
|
|
831
|
+
return this._symbolInstances;
|
|
832
|
+
}
|
|
833
|
+
getResources(t, e, i) {
|
|
834
|
+
const s = this.layer, n = this.zoom;
|
|
835
|
+
t && t.setExtent(this.layerExtent);
|
|
836
|
+
const a = s.getLayoutProperty("icon-image"), r = s.getLayoutProperty("text-field");
|
|
837
|
+
let o = s.getLayoutProperty("text-transform"), l = s.getLayoutProperty("text-font");
|
|
838
|
+
const h = [];
|
|
839
|
+
let d, u, c, y;
|
|
840
|
+
a && !a.isDataDriven && (d = a.getValue(n)), r && !r.isDataDriven && (u = r.getValue(n)), o && o.isDataDriven || (c = s.getLayoutValue("text-transform", n), o = null), l && l.isDataDriven || (y = s.getLayoutValue("text-font", n), l = null);
|
|
841
|
+
for (const p of this._features) {
|
|
842
|
+
const M = p.getGeometry(t);
|
|
843
|
+
if (!M || M.length === 0)
|
|
844
|
+
continue;
|
|
845
|
+
let x, _;
|
|
846
|
+
a && (x = a.isDataDriven ? a.getValue(n, p) : this._replaceKeys(d, p.values), x && e(x));
|
|
847
|
+
let g = !1;
|
|
848
|
+
if (r && (_ = r.isDataDriven ? r.getValue(n, p) : this._replaceKeys(u, p.values), _)) {
|
|
849
|
+
switch (_ = _.replaceAll("\\n", `
|
|
850
|
+
`), o && (c = o.getValue(n, p)), c) {
|
|
851
|
+
case Se.LOWERCASE:
|
|
852
|
+
_ = _.toLowerCase();
|
|
853
|
+
break;
|
|
854
|
+
case Se.UPPERCASE:
|
|
855
|
+
_ = _.toUpperCase();
|
|
856
|
+
}
|
|
857
|
+
if (U._bidiEngine.hasBidiChar(_)) {
|
|
858
|
+
let m;
|
|
859
|
+
m = U._bidiEngine.checkContextual(_) === "rtl" ? "IDNNN" : "ICNNN", _ = U._bidiEngine.bidiTransform(_, m, "VLYSN"), g = !0;
|
|
860
|
+
}
|
|
861
|
+
if (_.length > 0) {
|
|
862
|
+
l && (y = l.getValue(n, p));
|
|
863
|
+
for (const m of y) {
|
|
864
|
+
let P = i[m];
|
|
865
|
+
P || (P = i[m] = /* @__PURE__ */ new Set());
|
|
866
|
+
for (const D of _) {
|
|
867
|
+
const T = D.codePointAt(0);
|
|
868
|
+
T != null && P.add(T);
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
if (!x && !_)
|
|
874
|
+
continue;
|
|
875
|
+
const I = s.getLayoutValue("symbol-sort-key", n, p), w = { feature: p, sprite: x, label: _, rtl: g, geometry: M, hash: (_ ? Ae(_) : 0) ^ (x ? Ae(x) : 0), priority: I, textFont: y };
|
|
876
|
+
h.push(w);
|
|
877
|
+
}
|
|
878
|
+
this._symbolFeatures = h;
|
|
879
|
+
}
|
|
880
|
+
processFeatures(t) {
|
|
881
|
+
t && t.setExtent(this.layerExtent);
|
|
882
|
+
const e = this.layer, i = this.zoom, s = e.getLayoutValue("symbol-placement", i), n = s !== Pe.POINT, a = e.getLayoutValue("symbol-spacing", i) * le, r = e.getLayoutProperty("icon-image"), o = e.getLayoutProperty("text-field"), l = r ? new ot(e, i, n) : null, h = o ? new lt(e, i, n) : null, d = this._workerTileHandler;
|
|
883
|
+
let u;
|
|
884
|
+
r && (u = d.getSpriteItems()), this._iconIndexStart = 3 * this._iconIndexBuffer.index, this._textIndexStart = 3 * this._textIndexBuffer.index, this._iconIndexCount = 0, this._textIndexCount = 0, this._markerMap.clear(), this._glyphMap.clear();
|
|
885
|
+
const c = [];
|
|
886
|
+
let y = 1;
|
|
887
|
+
h && h.size && (y = h.size / K);
|
|
888
|
+
const p = h ? h.maxAngle * Te : 0, M = h ? h.size * le : 0;
|
|
889
|
+
for (const x of this._symbolFeatures) {
|
|
890
|
+
let _;
|
|
891
|
+
l && u && x.sprite && (_ = u[x.sprite], _ && _.sdf && (this._isIconSDF = !0));
|
|
892
|
+
let g;
|
|
893
|
+
_ && l.update(i, x.feature);
|
|
894
|
+
let I = 0;
|
|
895
|
+
const w = x.label;
|
|
896
|
+
if (w) {
|
|
897
|
+
je(h), h.update(i, x.feature);
|
|
898
|
+
const m = n && h.rotationAlignment === ie.MAP ? h.keepUpright : h.writingMode && h.writingMode.includes(Xe.VERTICAL);
|
|
899
|
+
let P = 0.5;
|
|
900
|
+
switch (h.anchor) {
|
|
901
|
+
case k.TOP_LEFT:
|
|
902
|
+
case k.LEFT:
|
|
903
|
+
case k.BOTTOM_LEFT:
|
|
904
|
+
P = 0;
|
|
905
|
+
break;
|
|
906
|
+
case k.TOP_RIGHT:
|
|
907
|
+
case k.RIGHT:
|
|
908
|
+
case k.BOTTOM_RIGHT:
|
|
909
|
+
P = 1;
|
|
910
|
+
}
|
|
911
|
+
let D = 0.5;
|
|
912
|
+
switch (h.anchor) {
|
|
913
|
+
case k.TOP_LEFT:
|
|
914
|
+
case k.TOP:
|
|
915
|
+
case k.TOP_RIGHT:
|
|
916
|
+
D = 0;
|
|
917
|
+
break;
|
|
918
|
+
case k.BOTTOM_LEFT:
|
|
919
|
+
case k.BOTTOM:
|
|
920
|
+
case k.BOTTOM_RIGHT:
|
|
921
|
+
D = 1;
|
|
922
|
+
}
|
|
923
|
+
let T = 0.5;
|
|
924
|
+
switch (h.justify) {
|
|
925
|
+
case we.AUTO:
|
|
926
|
+
T = P;
|
|
927
|
+
break;
|
|
928
|
+
case we.LEFT:
|
|
929
|
+
T = 0;
|
|
930
|
+
break;
|
|
931
|
+
case we.RIGHT:
|
|
932
|
+
T = 1;
|
|
933
|
+
}
|
|
934
|
+
const B = h.letterSpacing * K, A = n ? 0 : h.maxWidth * K, b = h.lineHeight * K, E = x.textFont.map((V) => d.getGlyphItems(V));
|
|
935
|
+
if (g = new Ke(E, A, b, B, P, D, T).getShaping(w, x.rtl, m), g && g.length > 0) {
|
|
936
|
+
let V = 1e30, C = -1e30;
|
|
937
|
+
for (const O of g)
|
|
938
|
+
V = Math.min(V, O.x), C = Math.max(C, O.x);
|
|
939
|
+
I = (C - V + 2 * K) * y * le;
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
for (let m of x.geometry) {
|
|
943
|
+
const P = [];
|
|
944
|
+
if (s === Pe.LINE) {
|
|
945
|
+
if (g != null && g.length && (h != null && h.size)) {
|
|
946
|
+
const D = h.size * le * (2 + Math.min(2, 4 * Math.abs(h.offset[1])));
|
|
947
|
+
m = U._smoothVertices(m, D);
|
|
948
|
+
}
|
|
949
|
+
U._pushAnchors(P, m, a, I);
|
|
950
|
+
} else
|
|
951
|
+
s === Pe.LINE_CENTER ? U._pushCenterAnchor(P, m) : x.feature.type === Ye.Polygon ? U._pushCentroid(P, m) : P.push(new ge(m[0].x, m[0].y));
|
|
952
|
+
for (const D of P) {
|
|
953
|
+
if (D.x < 0 || D.x > Re || D.y < 0 || D.y > Re || n && I > 0 && (h == null ? void 0 : h.rotationAlignment) === ie.MAP && !U._honorsTextMaxAngle(m, D, I, p, M))
|
|
954
|
+
continue;
|
|
955
|
+
const T = { shaping: g, line: m, iconMosaicItem: _, anchor: D, symbolFeature: x, textColliders: [], iconColliders: [], textVertexRanges: [], iconVertexRanges: [] };
|
|
956
|
+
c.push(T), this._processFeature(T, l, h);
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
c.sort(bt), this._addPlacedGlyphs(), this._symbolInstances = c;
|
|
961
|
+
}
|
|
962
|
+
serialize() {
|
|
963
|
+
let t = 14;
|
|
964
|
+
t += this.layerUIDs.length, t += 3 * this.markerPageMap.size, t += 3 * this.glyphsPageMap.size, t += U._symbolsSerializationLength(this._symbolInstances), t += this._iconVertexBuffer.array.length, t += this._iconIndexBuffer.array.length, t += this._textVertexBuffer.array.length, t += this._textIndexBuffer.array.length;
|
|
965
|
+
const e = new Uint32Array(t), i = new Int32Array(e.buffer), s = new Float32Array(e.buffer), [n, a, r] = this._sourceTileKey.split("/");
|
|
966
|
+
let o = 0;
|
|
967
|
+
e[o++] = this.type, e[o++] = this.layerUIDs.length;
|
|
968
|
+
for (let l = 0; l < this.layerUIDs.length; l++)
|
|
969
|
+
e[o++] = this.layerUIDs[l];
|
|
970
|
+
e[o++] = this._isIconSDF ? 1 : 0, e[o++] = parseFloat(n), e[o++] = parseFloat(a), e[o++] = parseFloat(r), e[o++] = this.markerPageMap.size;
|
|
971
|
+
for (const [l, [h, d]] of this.markerPageMap)
|
|
972
|
+
e[o++] = l, e[o++] = h, e[o++] = d;
|
|
973
|
+
e[o++] = this.glyphsPageMap.size;
|
|
974
|
+
for (const [l, [h, d]] of this.glyphsPageMap)
|
|
975
|
+
e[o++] = l, e[o++] = h, e[o++] = d;
|
|
976
|
+
e[o++] = this._iconVertexBuffer.index / 4, e[o++] = this._textVertexBuffer.index / 4, o = U.serializeSymbols(e, i, s, o, this._symbolInstances), e[o++] = this._iconVertexBuffer.array.length;
|
|
977
|
+
for (let l = 0; l < this._iconVertexBuffer.array.length; l++)
|
|
978
|
+
i[o++] = this._iconVertexBuffer.array[l];
|
|
979
|
+
e[o++] = this._iconIndexBuffer.array.length;
|
|
980
|
+
for (let l = 0; l < this._iconIndexBuffer.array.length; l++)
|
|
981
|
+
e[o++] = this._iconIndexBuffer.array[l];
|
|
982
|
+
e[o++] = this._textVertexBuffer.array.length;
|
|
983
|
+
for (let l = 0; l < this._textVertexBuffer.array.length; l++)
|
|
984
|
+
i[o++] = this._textVertexBuffer.array[l];
|
|
985
|
+
e[o++] = this._textIndexBuffer.array.length;
|
|
986
|
+
for (let l = 0; l < this._textIndexBuffer.array.length; l++)
|
|
987
|
+
e[o++] = this._textIndexBuffer.array[l];
|
|
988
|
+
return e.buffer;
|
|
989
|
+
}
|
|
990
|
+
static _symbolsSerializationLength(t) {
|
|
991
|
+
let e = 0;
|
|
992
|
+
e += 1;
|
|
993
|
+
for (const i of t || []) {
|
|
994
|
+
e += 5, e += 1;
|
|
995
|
+
for (const s of i.textColliders)
|
|
996
|
+
e += Ue;
|
|
997
|
+
for (const s of i.iconColliders)
|
|
998
|
+
e += Ue;
|
|
999
|
+
e += 1, e += 2 * i.textVertexRanges.length, e += 1, e += 2 * i.iconVertexRanges.length;
|
|
1000
|
+
}
|
|
1001
|
+
return e;
|
|
1002
|
+
}
|
|
1003
|
+
static serializeSymbols(t, e, i, s, n) {
|
|
1004
|
+
n = n || [], e[s++] = n.length;
|
|
1005
|
+
for (const a of n) {
|
|
1006
|
+
e[s++] = a.anchor.x, e[s++] = a.anchor.y, e[s++] = a.symbolFeature.hash, e[s++] = a.symbolFeature.priority, e[s++] = a.symbolFeature.feature.featureIndex, e[s++] = a.textColliders.length + a.iconColliders.length;
|
|
1007
|
+
for (const r of a.textColliders)
|
|
1008
|
+
e[s++] = r.xTile, e[s++] = r.yTile, e[s++] = r.dxPixels, e[s++] = r.dyPixels, e[s++] = r.hard ? 1 : 0, e[s++] = r.partIndex, i[s++] = r.minLod, i[s++] = r.maxLod, e[s++] = r.width, e[s++] = r.height;
|
|
1009
|
+
for (const r of a.iconColliders)
|
|
1010
|
+
e[s++] = r.xTile, e[s++] = r.yTile, e[s++] = r.dxPixels, e[s++] = r.dyPixels, e[s++] = r.hard ? 1 : 0, e[s++] = r.partIndex, i[s++] = r.minLod, i[s++] = r.maxLod, e[s++] = r.width, e[s++] = r.height;
|
|
1011
|
+
e[s++] = a.textVertexRanges.length;
|
|
1012
|
+
for (const [r, o] of a.textVertexRanges)
|
|
1013
|
+
e[s++] = r, e[s++] = o;
|
|
1014
|
+
e[s++] = a.iconVertexRanges.length;
|
|
1015
|
+
for (const [r, o] of a.iconVertexRanges)
|
|
1016
|
+
e[s++] = r, e[s++] = o;
|
|
1017
|
+
}
|
|
1018
|
+
return s;
|
|
1019
|
+
}
|
|
1020
|
+
_replaceKeys(t, e) {
|
|
1021
|
+
return t.replaceAll(/{([^{}]+)}/g, (i, s) => s in e ? e[s] : "");
|
|
1022
|
+
}
|
|
1023
|
+
_processFeature(t, e, i) {
|
|
1024
|
+
const { line: s, iconMosaicItem: n, shaping: a, anchor: r } = t, o = this.zoom, l = this.layer, h = !!n;
|
|
1025
|
+
let d = !0;
|
|
1026
|
+
h && (d = (e == null ? void 0 : e.optional) || !n);
|
|
1027
|
+
const u = a && a.length > 0, c = !u || (i == null ? void 0 : i.optional);
|
|
1028
|
+
let y, p;
|
|
1029
|
+
if (h && (y = this._placementEngine.getIconPlacement(r, n, e)), (y || d) && (u && (p = this._placementEngine.getTextPlacement(r, a, s, i)), p || c)) {
|
|
1030
|
+
if (y && p || (c || d ? c || p ? d || y || (p = null) : y = null : (y = null, p = null)), p) {
|
|
1031
|
+
const M = l.hasDataDrivenText ? l.textMaterial.encodeAttributes(t.symbolFeature.feature, o, l) : null;
|
|
1032
|
+
if (this._storePlacedGlyphs(t, p.shapes, o, i.rotationAlignment, M), p.textColliders) {
|
|
1033
|
+
t.textColliders = p.textColliders;
|
|
1034
|
+
for (const x of p.textColliders) {
|
|
1035
|
+
x.minLod = Math.max(o + Y(x.minLod), 0), x.maxLod = Math.min(o + Y(x.maxLod), 25);
|
|
1036
|
+
const _ = x.angle;
|
|
1037
|
+
if (_) {
|
|
1038
|
+
const g = Math.cos(_), I = Math.sin(_), w = x.dxPixels * g - x.dyPixels * I, m = x.dxPixels * I + x.dyPixels * g, P = (x.dxPixels + x.width) * g - x.dyPixels * I, D = (x.dxPixels + x.width) * I + x.dyPixels * g, T = x.dxPixels * g - (x.dyPixels + x.height) * I, B = x.dxPixels * I + (x.dyPixels + x.height) * g, A = (x.dxPixels + x.width) * g - (x.dyPixels + x.height) * I, b = (x.dxPixels + x.width) * I + (x.dyPixels + x.height) * g, E = Math.min(w, P, T, A), V = Math.max(w, P, T, A), C = Math.min(m, D, B, b), O = Math.max(m, D, B, b);
|
|
1039
|
+
x.dxPixels = E, x.dyPixels = C, x.width = V - E, x.height = O - C;
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
if (y) {
|
|
1045
|
+
const M = l.hasDataDrivenIcon ? l.iconMaterial.encodeAttributes(t.symbolFeature.feature, o, l) : null;
|
|
1046
|
+
if (this._addPlacedIcons(t, y.shapes, o, n.page, e.rotationAlignment === ie.VIEWPORT, M), y.iconColliders) {
|
|
1047
|
+
t.iconColliders = y.iconColliders;
|
|
1048
|
+
for (const x of y.iconColliders) {
|
|
1049
|
+
x.minLod = Math.max(o + Y(x.minLod), 0), x.maxLod = Math.min(o + Y(x.maxLod), 25);
|
|
1050
|
+
const _ = x.angle;
|
|
1051
|
+
if (_) {
|
|
1052
|
+
const g = Math.cos(_), I = Math.sin(_), w = x.dxPixels * g - x.dyPixels * I, m = x.dxPixels * I + x.dyPixels * g, P = (x.dxPixels + x.width) * g - x.dyPixels * I, D = (x.dxPixels + x.width) * I + x.dyPixels * g, T = x.dxPixels * g - (x.dyPixels + x.height) * I, B = x.dxPixels * I + (x.dyPixels + x.height) * g, A = (x.dxPixels + x.width) * g - (x.dyPixels + x.height) * I, b = (x.dxPixels + x.width) * I + (x.dyPixels + x.height) * g, E = Math.min(w, P, T, A), V = Math.max(w, P, T, A), C = Math.min(m, D, B, b), O = Math.max(m, D, B, b);
|
|
1053
|
+
x.dxPixels = E, x.dyPixels = C, x.width = V - E, x.height = O - C;
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
_addPlacedIcons(t, e, i, s, n, a) {
|
|
1061
|
+
const r = Math.max(i - 1, 0), o = this._iconVertexBuffer, l = this._iconIndexBuffer, h = this._markerMap;
|
|
1062
|
+
for (const d of e) {
|
|
1063
|
+
const u = n ? 0 : Math.max(i + Y(d.minzoom), r), c = n ? 25 : Math.min(i + Y(d.maxzoom), 25);
|
|
1064
|
+
if (c <= u)
|
|
1065
|
+
continue;
|
|
1066
|
+
const y = d.tl, p = d.tr, M = d.bl, x = d.br, _ = d.mosaicRect, g = d.labelAngle, I = d.minAngle, w = d.maxAngle, m = d.anchor, P = o.index, D = _.x, T = _.y, B = D + _.width, A = T + _.height, b = o.index;
|
|
1067
|
+
o.add(m.x, m.y, y.x, y.y, D, T, g, I, w, u, c, a), o.add(m.x, m.y, p.x, p.y, B, T, g, I, w, u, c, a), o.add(m.x, m.y, M.x, M.y, D, A, g, I, w, u, c, a), o.add(m.x, m.y, x.x, x.y, B, A, g, I, w, u, c, a), t.iconVertexRanges.length > 0 && t.iconVertexRanges[0][0] + t.iconVertexRanges[0][1] === b ? t.iconVertexRanges[0][1] += 4 : t.iconVertexRanges.push([b, 4]), l.add(P, P + 1, P + 2), l.add(P + 1, P + 2, P + 3), h.has(s) ? h.get(s)[1] += 6 : h.set(s, [this._iconIndexStart + this._iconIndexCount, 6]), this._iconIndexCount += 6;
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
_addPlacedGlyphs() {
|
|
1071
|
+
const t = this._textVertexBuffer, e = this._textIndexBuffer, i = this._glyphMap;
|
|
1072
|
+
for (const [s, n] of this._glyphBufferDataStorage)
|
|
1073
|
+
for (const a of n) {
|
|
1074
|
+
const r = t.index, o = a.symbolInstance, l = a.ddAttributes, h = t.index;
|
|
1075
|
+
t.add(a.glyphAnchor[0], a.glyphAnchor[1], a.tl[0], a.tl[1], a.xmin, a.ymin, a.labelAngle, a.minAngle, a.maxAngle, a.minLod, a.maxLod, l), t.add(a.glyphAnchor[0], a.glyphAnchor[1], a.tr[0], a.tr[1], a.xmax, a.ymin, a.labelAngle, a.minAngle, a.maxAngle, a.minLod, a.maxLod, l), t.add(a.glyphAnchor[0], a.glyphAnchor[1], a.bl[0], a.bl[1], a.xmin, a.ymax, a.labelAngle, a.minAngle, a.maxAngle, a.minLod, a.maxLod, l), t.add(a.glyphAnchor[0], a.glyphAnchor[1], a.br[0], a.br[1], a.xmax, a.ymax, a.labelAngle, a.minAngle, a.maxAngle, a.minLod, a.maxLod, l), o.textVertexRanges.length > 0 && o.textVertexRanges[0][0] + o.textVertexRanges[0][1] === h ? o.textVertexRanges[0][1] += 4 : o.textVertexRanges.push([h, 4]), e.add(r, r + 1, r + 2), e.add(r + 1, r + 2, r + 3), i.has(s) ? i.get(s)[1] += 6 : i.set(s, [this._textIndexStart + this._textIndexCount, 6]), this._textIndexCount += 6;
|
|
1076
|
+
}
|
|
1077
|
+
this._glyphBufferDataStorage.clear();
|
|
1078
|
+
}
|
|
1079
|
+
_storePlacedGlyphs(t, e, i, s, n) {
|
|
1080
|
+
const a = Math.max(i - 1, 0), r = s === ie.VIEWPORT;
|
|
1081
|
+
let o, l, h, d, u, c, y, p, M, x, _;
|
|
1082
|
+
for (const g of e)
|
|
1083
|
+
o = r ? 0 : Math.max(i + Y(g.minzoom), a), l = r ? 25 : Math.min(i + Y(g.maxzoom), 25), !(l <= o) && (h = g.tl, d = g.tr, u = g.bl, c = g.br, y = g.labelAngle, p = g.minAngle, M = g.maxAngle, x = g.anchor, _ = g.mosaicRect, this._glyphBufferDataStorage.has(g.page) || this._glyphBufferDataStorage.set(g.page, []), this._glyphBufferDataStorage.get(g.page).push({ glyphAnchor: [x.x, x.y], tl: [h.x, h.y], tr: [d.x, d.y], bl: [u.x, u.y], br: [c.x, c.y], xmin: _.x, ymin: _.y, xmax: _.x + _.width, ymax: _.y + _.height, labelAngle: y, minAngle: p, maxAngle: M, minLod: o, maxLod: l, placementLod: a, symbolInstance: t, ddAttributes: n }));
|
|
1084
|
+
}
|
|
1085
|
+
static _pushAnchors(t, e, i, s) {
|
|
1086
|
+
i += s;
|
|
1087
|
+
let n = 0;
|
|
1088
|
+
const a = e.length - 1;
|
|
1089
|
+
for (let u = 0; u < a; u++)
|
|
1090
|
+
n += L.distance(e[u], e[u + 1]);
|
|
1091
|
+
let r = s || i;
|
|
1092
|
+
if (r *= 0.5, n <= r)
|
|
1093
|
+
return;
|
|
1094
|
+
const o = r / n;
|
|
1095
|
+
let l = 0, h = -(i = n / Math.max(Math.round(n / i), 1)) / 2;
|
|
1096
|
+
const d = e.length - 1;
|
|
1097
|
+
for (let u = 0; u < d; u++) {
|
|
1098
|
+
const c = e[u], y = e[u + 1], p = y.x - c.x, M = y.y - c.y, x = Math.sqrt(p * p + M * M);
|
|
1099
|
+
let _;
|
|
1100
|
+
for (; h + i < l + x; ) {
|
|
1101
|
+
h += i;
|
|
1102
|
+
const g = (h - l) / x, I = ye(c.x, y.x, g), w = ye(c.y, y.y, g);
|
|
1103
|
+
_ === void 0 && (_ = Math.atan2(M, p)), t.push(new ge(I, w, _, u, o));
|
|
1104
|
+
}
|
|
1105
|
+
l += x;
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
static _pushCenterAnchor(t, e) {
|
|
1109
|
+
let i = 0;
|
|
1110
|
+
const s = e.length - 1;
|
|
1111
|
+
for (let o = 0; o < s; o++)
|
|
1112
|
+
i += L.distance(e[o], e[o + 1]);
|
|
1113
|
+
const n = i / 2;
|
|
1114
|
+
let a = 0;
|
|
1115
|
+
const r = e.length - 1;
|
|
1116
|
+
for (let o = 0; o < r; o++) {
|
|
1117
|
+
const l = e[o], h = e[o + 1], d = h.x - l.x, u = h.y - l.y, c = Math.sqrt(d * d + u * u);
|
|
1118
|
+
if (n < a + c) {
|
|
1119
|
+
const y = (n - a) / c, p = ye(l.x, h.x, y), M = ye(l.y, h.y, y), x = Math.atan2(u, d);
|
|
1120
|
+
return void t.push(new ge(p, M, x, o, 0));
|
|
1121
|
+
}
|
|
1122
|
+
a += c;
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
static _deviation(t, e, i) {
|
|
1126
|
+
const s = (e.x - t.x) * (i.x - e.x) + (e.y - t.y) * (i.y - e.y), n = (e.x - t.x) * (i.y - e.y) - (e.y - t.y) * (i.x - e.x);
|
|
1127
|
+
return Math.atan2(n, s);
|
|
1128
|
+
}
|
|
1129
|
+
static _honorsTextMaxAngle(t, e, i, s, n) {
|
|
1130
|
+
let a = 0;
|
|
1131
|
+
const r = i / 2;
|
|
1132
|
+
let o = new L(e.x, e.y), l = e.segment + 1;
|
|
1133
|
+
for (; a > -r; ) {
|
|
1134
|
+
if (--l, l < 0)
|
|
1135
|
+
return !1;
|
|
1136
|
+
a -= L.distance(t[l], o), o = t[l];
|
|
1137
|
+
}
|
|
1138
|
+
a += L.distance(t[l], t[l + 1]);
|
|
1139
|
+
const h = [];
|
|
1140
|
+
let d = 0;
|
|
1141
|
+
const u = t.length;
|
|
1142
|
+
for (; a < r; ) {
|
|
1143
|
+
const c = t[l];
|
|
1144
|
+
let y, p = l;
|
|
1145
|
+
do {
|
|
1146
|
+
if (++p, p === u)
|
|
1147
|
+
return !1;
|
|
1148
|
+
y = t[p];
|
|
1149
|
+
} while (y.isEqual(c));
|
|
1150
|
+
let M, x = p;
|
|
1151
|
+
do {
|
|
1152
|
+
if (++x, x === u)
|
|
1153
|
+
return !1;
|
|
1154
|
+
M = t[x];
|
|
1155
|
+
} while (M.isEqual(y));
|
|
1156
|
+
const _ = this._deviation(c, y, M);
|
|
1157
|
+
for (h.push({ deviation: _, distToAnchor: a }), d += _; a - h[0].distToAnchor > n; )
|
|
1158
|
+
d -= h.shift().deviation;
|
|
1159
|
+
if (Math.abs(d) > s)
|
|
1160
|
+
return !1;
|
|
1161
|
+
a += L.distance(y, M), l = p;
|
|
1162
|
+
}
|
|
1163
|
+
return !0;
|
|
1164
|
+
}
|
|
1165
|
+
static _smoothVertices(t, e) {
|
|
1166
|
+
if (e <= 0)
|
|
1167
|
+
return t;
|
|
1168
|
+
let i = t.length;
|
|
1169
|
+
if (i < 3)
|
|
1170
|
+
return t;
|
|
1171
|
+
const s = [];
|
|
1172
|
+
let n = 0, a = 0;
|
|
1173
|
+
s.push(0);
|
|
1174
|
+
for (let p = 1; p < i; p++) {
|
|
1175
|
+
const M = L.distance(t[p], t[p - 1]);
|
|
1176
|
+
M > 0 && (n += M, s.push(n), a++, a !== p && (t[a] = t[p]));
|
|
1177
|
+
}
|
|
1178
|
+
if (i = a + 1, i < 3)
|
|
1179
|
+
return t;
|
|
1180
|
+
e = Math.min(e, 0.2 * n);
|
|
1181
|
+
const r = t[0].x, o = t[0].y, l = t[i - 1].x, h = t[i - 1].y, d = L.sub(t[0], t[1]);
|
|
1182
|
+
d.normalize(), t[0].x += e * d.x, t[0].y += e * d.y, d.assignSub(t[i - 1], t[i - 2]), d.normalize(), t[i - 1].x += e * d.x, t[i - 1].y += e * d.y, s[0] -= e, s[i - 1] += e;
|
|
1183
|
+
const u = [];
|
|
1184
|
+
u.push(new L(r, o));
|
|
1185
|
+
const c = 1e-6, y = 0.5 * e;
|
|
1186
|
+
for (let p = 1; p < i - 1; p++) {
|
|
1187
|
+
let M = 0, x = 0, _ = 0;
|
|
1188
|
+
for (let g = p - 1; g >= 0; g--) {
|
|
1189
|
+
const I = y + s[g + 1] - s[p];
|
|
1190
|
+
if (I < 0)
|
|
1191
|
+
break;
|
|
1192
|
+
const w = s[g + 1] - s[g], m = s[p] - s[g] < y ? 1 : I / w;
|
|
1193
|
+
if (m < c)
|
|
1194
|
+
break;
|
|
1195
|
+
const P = m * m, D = m * I - 0.5 * P * w, T = m * w / e, B = t[g + 1], A = t[g].x - B.x, b = t[g].y - B.y;
|
|
1196
|
+
M += T / D * (B.x * m * I + 0.5 * P * (I * A - w * B.x) - P * m * w * A / 3), x += T / D * (B.y * m * I + 0.5 * P * (I * b - w * B.y) - P * m * w * b / 3), _ += T;
|
|
1197
|
+
}
|
|
1198
|
+
for (let g = p + 1; g < i; g++) {
|
|
1199
|
+
const I = y - s[g - 1] + s[p];
|
|
1200
|
+
if (I < 0)
|
|
1201
|
+
break;
|
|
1202
|
+
const w = s[g] - s[g - 1], m = s[g] - s[p] < y ? 1 : I / w;
|
|
1203
|
+
if (m < c)
|
|
1204
|
+
break;
|
|
1205
|
+
const P = m * m, D = m * I - 0.5 * P * w, T = m * w / e, B = t[g - 1], A = t[g].x - B.x, b = t[g].y - B.y;
|
|
1206
|
+
M += T / D * (B.x * m * I + 0.5 * P * (I * A - w * B.x) - P * m * w * A / 3), x += T / D * (B.y * m * I + 0.5 * P * (I * b - w * B.y) - P * m * w * b / 3), _ += T;
|
|
1207
|
+
}
|
|
1208
|
+
u.push(new L(M / _, x / _));
|
|
1209
|
+
}
|
|
1210
|
+
return u.push(new L(l, h)), t[0].x = r, t[0].y = o, t[i - 1].x = l, t[i - 1].y = h, u;
|
|
1211
|
+
}
|
|
1212
|
+
static _pushCentroid(t, e) {
|
|
1213
|
+
const r = e.length - 1;
|
|
1214
|
+
let o = 0, l = 0, h = 0, d = e[0].x, u = e[0].y;
|
|
1215
|
+
d > 4096 && (d = 4096), d < 0 && (d = 0), u > 4096 && (u = 4096), u < 0 && (u = 0);
|
|
1216
|
+
for (let c = 1; c < r; c++) {
|
|
1217
|
+
let y = e[c].x, p = e[c].y, M = e[c + 1].x, x = e[c + 1].y;
|
|
1218
|
+
y > 4096 && (y = 4096), y < 0 && (y = 0), p > 4096 && (p = 4096), p < 0 && (p = 0), M > 4096 && (M = 4096), M < 0 && (M = 0), x > 4096 && (x = 4096), x < 0 && (x = 0);
|
|
1219
|
+
const _ = (y - d) * (x - u) - (M - d) * (p - u);
|
|
1220
|
+
o += _ * (d + y + M), l += _ * (u + p + x), h += _;
|
|
1221
|
+
}
|
|
1222
|
+
o /= 3 * h, l /= 3 * h, isNaN(o) || isNaN(l) || t.push(new ge(o, l));
|
|
1223
|
+
}
|
|
1224
|
+
}
|
|
1225
|
+
U._bidiEngine = new it();
|
|
1226
|
+
var W;
|
|
1227
|
+
(function(f) {
|
|
1228
|
+
f[f.INITIALIZED = 0] = "INITIALIZED", f[f.NO_DATA = 1] = "NO_DATA", f[f.READY = 2] = "READY", f[f.MODIFIED = 3] = "MODIFIED", f[f.INVALID = 4] = "INVALID";
|
|
1229
|
+
})(W || (W = {}));
|
|
1230
|
+
class Tt {
|
|
1231
|
+
constructor(t, e, i, s, n, a) {
|
|
1232
|
+
var d;
|
|
1233
|
+
if (this._pbfTiles = {}, this._tileClippers = {}, this._client = i, this._tile = e, this._sourceDataMaxLOD = s, a) {
|
|
1234
|
+
this._styleLayerUIDs = /* @__PURE__ */ new Set();
|
|
1235
|
+
for (const u of a)
|
|
1236
|
+
this._styleLayerUIDs.add(u);
|
|
1237
|
+
}
|
|
1238
|
+
this._styleRepository = n, this._layers = ((d = this._styleRepository) == null ? void 0 : d.layers) ?? [];
|
|
1239
|
+
const [r, o, l] = e.tileKey.split("/").map(parseFloat);
|
|
1240
|
+
this._level = r;
|
|
1241
|
+
const h = Ze(this._level);
|
|
1242
|
+
for (const u of Object.keys(t)) {
|
|
1243
|
+
const c = t[u];
|
|
1244
|
+
if (this._pbfTiles[u] = new et(new Uint8Array(c.protobuff), new DataView(c.protobuff)), c.refKey) {
|
|
1245
|
+
const [y] = c.refKey.split("/").map(parseFloat), p = r - y;
|
|
1246
|
+
if (p > 0) {
|
|
1247
|
+
const M = (1 << p) - 1, x = o & M, _ = l & M;
|
|
1248
|
+
this._tileClippers[u] = new Je(p, x, _, 8, h);
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
this._tileClippers[u] || (this._tileClippers[u] = new Qe());
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
_canParseStyleLayer(t) {
|
|
1255
|
+
return !this._styleLayerUIDs || this._styleLayerUIDs.has(t);
|
|
1256
|
+
}
|
|
1257
|
+
async parse(t) {
|
|
1258
|
+
const e = rt(), i = this._initialize(t), { returnedBuckets: s } = i;
|
|
1259
|
+
this._processLayers(i), this._linkReferences(i), this._filterFeatures(i);
|
|
1260
|
+
const n = [], a = /* @__PURE__ */ new Set(), r = (h, d) => {
|
|
1261
|
+
a.has(h) || (n.push({ name: h, repeat: d }), a.add(h));
|
|
1262
|
+
}, o = {};
|
|
1263
|
+
for (const h of s)
|
|
1264
|
+
h.getResources(h.tileClipper, r, o);
|
|
1265
|
+
if (this._tile.status === W.INVALID)
|
|
1266
|
+
return [];
|
|
1267
|
+
const l = this._fetchResources(n, o, t);
|
|
1268
|
+
return Promise.all([...l, e]).then(() => this._processFeatures(i.returnedBuckets));
|
|
1269
|
+
}
|
|
1270
|
+
_initialize(t) {
|
|
1271
|
+
return { signal: t == null ? void 0 : t.signal, sourceNameToTileData: this._parseTileData(this._pbfTiles), layers: this._layers, zoom: this._level, sourceNameToTileClipper: this._tileClippers, sourceNameToUniqueSourceLayerBuckets: {}, sourceNameToUniqueSourceLayers: {}, returnedBuckets: [], layerIdToBucket: {}, referencerUIDToReferencedId: /* @__PURE__ */ new Map() };
|
|
1272
|
+
}
|
|
1273
|
+
_processLayers(t) {
|
|
1274
|
+
const { sourceNameToTileData: e, zoom: i, layers: s, sourceNameToTileClipper: n, sourceNameToUniqueSourceLayerBuckets: a, sourceNameToUniqueSourceLayers: r, returnedBuckets: o, layerIdToBucket: l, referencerUIDToReferencedId: h } = t, d = this._sourceDataMaxLOD;
|
|
1275
|
+
for (let u = s.length - 1; u >= 0; u--) {
|
|
1276
|
+
const c = s[u];
|
|
1277
|
+
if (i < d) {
|
|
1278
|
+
if (c.minzoom && i < Math.floor(c.minzoom) || c.maxzoom && i >= c.maxzoom)
|
|
1279
|
+
continue;
|
|
1280
|
+
} else if (c.maxzoom && i >= c.maxzoom)
|
|
1281
|
+
continue;
|
|
1282
|
+
if (c.type === ee.BACKGROUND || !this._canParseStyleLayer(c.uid) || !e[c.source] || !n[c.source])
|
|
1283
|
+
continue;
|
|
1284
|
+
const y = e[c.source], p = n[c.source], M = c.sourceLayer, x = y[M];
|
|
1285
|
+
if (x) {
|
|
1286
|
+
let _ = r[c.source];
|
|
1287
|
+
if (_ || (_ = r[c.source] = /* @__PURE__ */ new Set()), _.add(c.sourceLayer), c.refLayerId)
|
|
1288
|
+
h.set(c.uid, c.refLayerId);
|
|
1289
|
+
else {
|
|
1290
|
+
const g = this._createBucket(c);
|
|
1291
|
+
if (g) {
|
|
1292
|
+
g.layerUIDs = [c.uid], g.layerExtent = x.extent, g.tileClipper = p;
|
|
1293
|
+
let I = a[c.source];
|
|
1294
|
+
I || (I = a[c.source] = {});
|
|
1295
|
+
let w = I[M];
|
|
1296
|
+
w || (w = I[M] = []), w.push(g), o.push(g), l[c.id] = g;
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
_linkReferences(t) {
|
|
1303
|
+
const { layerIdToBucket: e, referencerUIDToReferencedId: i } = t;
|
|
1304
|
+
i.forEach((s, n) => {
|
|
1305
|
+
e[s] && e[s].layerUIDs.push(n);
|
|
1306
|
+
});
|
|
1307
|
+
}
|
|
1308
|
+
_filterFeatures(t) {
|
|
1309
|
+
const { signal: e, sourceNameToTileData: i, sourceNameToUniqueSourceLayerBuckets: s, sourceNameToUniqueSourceLayers: n } = t, a = 10 * this._level, r = 10 * (this._level + 1), o = [], l = [];
|
|
1310
|
+
for (const h of Object.keys(n))
|
|
1311
|
+
n[h].forEach((d) => {
|
|
1312
|
+
o.push(d), l.push(h);
|
|
1313
|
+
});
|
|
1314
|
+
for (let h = 0; h < o.length; h++) {
|
|
1315
|
+
const d = l[h], u = o[h];
|
|
1316
|
+
if (!i[d] || !s[d])
|
|
1317
|
+
continue;
|
|
1318
|
+
const c = i[d][u], y = s[d][u];
|
|
1319
|
+
if (!y || y.length === 0)
|
|
1320
|
+
continue;
|
|
1321
|
+
if (qe(e))
|
|
1322
|
+
return;
|
|
1323
|
+
let p = 0;
|
|
1324
|
+
const M = c.getData();
|
|
1325
|
+
for (; M.nextTag(2); ) {
|
|
1326
|
+
const x = M.getMessage(), _ = new nt(x, c, p++);
|
|
1327
|
+
x.release();
|
|
1328
|
+
const g = _.values;
|
|
1329
|
+
if (g) {
|
|
1330
|
+
const I = g._minzoom;
|
|
1331
|
+
if (I && I >= r)
|
|
1332
|
+
continue;
|
|
1333
|
+
const w = g._maxzoom;
|
|
1334
|
+
if (w && w <= a)
|
|
1335
|
+
continue;
|
|
1336
|
+
}
|
|
1337
|
+
for (const I of y)
|
|
1338
|
+
I.pushFeature(_);
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
_fetchResources(t, e, i) {
|
|
1343
|
+
const s = [], n = this._tile.getWorkerTileHandler();
|
|
1344
|
+
let a, r;
|
|
1345
|
+
t.length > 0 && (a = n.fetchSprites(t, this._client, i), s.push(a));
|
|
1346
|
+
for (const o in e) {
|
|
1347
|
+
const l = e[o];
|
|
1348
|
+
l.size > 0 && (r = n.fetchGlyphs(this._tile.tileKey, o, l, this._client, i), s.push(r));
|
|
1349
|
+
}
|
|
1350
|
+
return s;
|
|
1351
|
+
}
|
|
1352
|
+
_processFeatures(t) {
|
|
1353
|
+
const e = t.filter((i) => i.hasFeatures() || this._canParseStyleLayer(i.layer.uid));
|
|
1354
|
+
for (const i of e)
|
|
1355
|
+
i.processFeatures(i.tileClipper);
|
|
1356
|
+
return e;
|
|
1357
|
+
}
|
|
1358
|
+
_parseTileData(t) {
|
|
1359
|
+
const e = {};
|
|
1360
|
+
for (const i of Object.keys(t)) {
|
|
1361
|
+
const s = t[i], n = {};
|
|
1362
|
+
for (; s.next(); )
|
|
1363
|
+
switch (s.tag()) {
|
|
1364
|
+
case 3: {
|
|
1365
|
+
const a = s.getMessage(), r = new at(a);
|
|
1366
|
+
a.release(), n[r.name] = r;
|
|
1367
|
+
break;
|
|
1368
|
+
}
|
|
1369
|
+
default:
|
|
1370
|
+
s.skip();
|
|
1371
|
+
}
|
|
1372
|
+
e[i] = n;
|
|
1373
|
+
}
|
|
1374
|
+
return e;
|
|
1375
|
+
}
|
|
1376
|
+
_createBucket(t) {
|
|
1377
|
+
switch (t.type) {
|
|
1378
|
+
case ee.BACKGROUND:
|
|
1379
|
+
return null;
|
|
1380
|
+
case ee.FILL:
|
|
1381
|
+
return this._createFillBucket(t);
|
|
1382
|
+
case ee.LINE:
|
|
1383
|
+
return this._createLineBucket(t);
|
|
1384
|
+
case ee.CIRCLE:
|
|
1385
|
+
return this._createCircleBucket(t);
|
|
1386
|
+
case ee.SYMBOL:
|
|
1387
|
+
return this._createSymbolBucket(t);
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
_createFillBucket(t) {
|
|
1391
|
+
return new _t(t, this._level, this._tile.getWorkerTileHandler().getSpriteItems(), new yt(t.fillMaterial.getStride()), new te(), new gt(t.outlineMaterial.getStride()), new te());
|
|
1392
|
+
}
|
|
1393
|
+
_createLineBucket(t) {
|
|
1394
|
+
return new Mt(t, this._level, this._tile.getWorkerTileHandler().getSpriteItems(), new xt(t.lineMaterial.getStride()), new te());
|
|
1395
|
+
}
|
|
1396
|
+
_createCircleBucket(t) {
|
|
1397
|
+
return new mt(t, this._level, this._tile.getWorkerTileHandler().getSpriteItems(), new pt(t.circleMaterial.getStride()), new te());
|
|
1398
|
+
}
|
|
1399
|
+
_createSymbolBucket(t) {
|
|
1400
|
+
const e = this._tile;
|
|
1401
|
+
return new U(e.tileKey, t, this._level, new Ne(t.iconMaterial.getStride()), new te(), new Ne(t.textMaterial.getStride()), new te(), e.placementEngine, e.getWorkerTileHandler());
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
let Dt = class {
|
|
1405
|
+
constructor(t, e, i, s) {
|
|
1406
|
+
this.status = W.INITIALIZED, this.placementEngine = new dt(), this.tileKey = t, this.refKeys = e, this._workerTileHandler = i, this._styleRepository = s;
|
|
1407
|
+
}
|
|
1408
|
+
release() {
|
|
1409
|
+
this.tileKey = "", this.refKeys = null, this.status = W.INITIALIZED, this._workerTileHandler = null;
|
|
1410
|
+
}
|
|
1411
|
+
async parse(t, e) {
|
|
1412
|
+
const i = e == null ? void 0 : e.signal;
|
|
1413
|
+
if (i != null) {
|
|
1414
|
+
const h = () => {
|
|
1415
|
+
i.removeEventListener("abort", h), this.status = W.INVALID;
|
|
1416
|
+
};
|
|
1417
|
+
i.addEventListener("abort", h);
|
|
1418
|
+
}
|
|
1419
|
+
let s;
|
|
1420
|
+
const n = { bucketsWithData: [], emptyBuckets: null };
|
|
1421
|
+
try {
|
|
1422
|
+
s = await this._parse(t, e);
|
|
1423
|
+
} catch (h) {
|
|
1424
|
+
if (Ge(h))
|
|
1425
|
+
throw h;
|
|
1426
|
+
return { result: n, transferList: [] };
|
|
1427
|
+
}
|
|
1428
|
+
this.status = W.READY;
|
|
1429
|
+
const a = n.bucketsWithData, r = [];
|
|
1430
|
+
for (const h of s)
|
|
1431
|
+
if (h.hasFeatures()) {
|
|
1432
|
+
const d = h.serialize();
|
|
1433
|
+
a.push(d);
|
|
1434
|
+
} else
|
|
1435
|
+
r.push(h.layer.uid);
|
|
1436
|
+
const o = [...a];
|
|
1437
|
+
let l = null;
|
|
1438
|
+
return r.length > 0 && (l = Uint32Array.from(r), o.push(l.buffer)), n.emptyBuckets = l, { result: n, transferList: o };
|
|
1439
|
+
}
|
|
1440
|
+
setObsolete() {
|
|
1441
|
+
this.status = W.INVALID;
|
|
1442
|
+
}
|
|
1443
|
+
getLayers() {
|
|
1444
|
+
return this._workerTileHandler.getLayers();
|
|
1445
|
+
}
|
|
1446
|
+
getWorkerTileHandler() {
|
|
1447
|
+
return this._workerTileHandler;
|
|
1448
|
+
}
|
|
1449
|
+
async _parse(t, e) {
|
|
1450
|
+
const i = t.sourceName2DataAndRefKey;
|
|
1451
|
+
return Object.keys(i).length === 0 ? [] : (this.status = W.MODIFIED, new Tt(i, this, e.client, t.sourceDataMaxLOD, this._styleRepository, t.styleLayerUIDs).parse(e));
|
|
1452
|
+
}
|
|
1453
|
+
};
|
|
1454
|
+
const Bt = 25;
|
|
1455
|
+
class ss {
|
|
1456
|
+
constructor() {
|
|
1457
|
+
this._spriteInfo = {}, this._glyphInfo = {}, this._sourceDataMaxLOD = Bt;
|
|
1458
|
+
}
|
|
1459
|
+
reset() {
|
|
1460
|
+
return this._spriteInfo = {}, this._glyphInfo = {}, Promise.resolve();
|
|
1461
|
+
}
|
|
1462
|
+
getLayers() {
|
|
1463
|
+
var t;
|
|
1464
|
+
return ((t = this._styleRepository) == null ? void 0 : t.layers) ?? [];
|
|
1465
|
+
}
|
|
1466
|
+
async createTileAndParse(t, e) {
|
|
1467
|
+
const { key: i } = t, s = {};
|
|
1468
|
+
for (const a of Object.keys(t.sourceName2DataAndRefKey)) {
|
|
1469
|
+
const r = t.sourceName2DataAndRefKey[a];
|
|
1470
|
+
s[a] = r.refKey;
|
|
1471
|
+
}
|
|
1472
|
+
const n = new Dt(i, s, this, this._styleRepository);
|
|
1473
|
+
try {
|
|
1474
|
+
return await n.parse({ ...t, sourceDataMaxLOD: this._sourceDataMaxLOD }, e);
|
|
1475
|
+
} catch (a) {
|
|
1476
|
+
if (n.setObsolete(), n.release(), !Ge(a))
|
|
1477
|
+
throw a;
|
|
1478
|
+
return null;
|
|
1479
|
+
}
|
|
1480
|
+
}
|
|
1481
|
+
updateStyle(t) {
|
|
1482
|
+
if (!t || t.length === 0 || !this._styleRepository)
|
|
1483
|
+
return;
|
|
1484
|
+
const e = this._styleRepository;
|
|
1485
|
+
for (const i of t) {
|
|
1486
|
+
const s = i.type, n = i.data;
|
|
1487
|
+
switch (s) {
|
|
1488
|
+
case ae.PAINTER_CHANGED:
|
|
1489
|
+
e.setPaintProperties(n.layer, n.paint);
|
|
1490
|
+
break;
|
|
1491
|
+
case ae.LAYOUT_CHANGED:
|
|
1492
|
+
e.setLayoutProperties(n.layer, n.layout);
|
|
1493
|
+
break;
|
|
1494
|
+
case ae.LAYER_REMOVED:
|
|
1495
|
+
e.deleteStyleLayer(n.layer);
|
|
1496
|
+
break;
|
|
1497
|
+
case ae.LAYER_CHANGED:
|
|
1498
|
+
e.setStyleLayer(n.layer, n.index);
|
|
1499
|
+
break;
|
|
1500
|
+
case ae.SPRITES_CHANGED:
|
|
1501
|
+
this._spriteInfo = {};
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
setStyle(t) {
|
|
1506
|
+
const { style: e, sourceDataMaxLOD: i } = t;
|
|
1507
|
+
this._styleRepository = new ht(e), this._sourceDataMaxLOD = i, this._spriteInfo = {}, this._glyphInfo = {};
|
|
1508
|
+
}
|
|
1509
|
+
fetchSprites(t, e, i) {
|
|
1510
|
+
const s = [], n = this._spriteInfo;
|
|
1511
|
+
for (const a of t)
|
|
1512
|
+
n[a.name] === void 0 && s.push(a);
|
|
1513
|
+
return s.length === 0 ? Promise.resolve() : e.invoke("getSprites", s, { signal: i == null ? void 0 : i.signal }).then((a) => {
|
|
1514
|
+
for (const r in a) {
|
|
1515
|
+
const o = a[r];
|
|
1516
|
+
n[r] = o;
|
|
1517
|
+
}
|
|
1518
|
+
});
|
|
1519
|
+
}
|
|
1520
|
+
getSpriteItems() {
|
|
1521
|
+
return this._spriteInfo;
|
|
1522
|
+
}
|
|
1523
|
+
fetchGlyphs(t, e, i, s, n) {
|
|
1524
|
+
const a = [];
|
|
1525
|
+
let r = this._glyphInfo[e];
|
|
1526
|
+
return r ? i.forEach((o) => {
|
|
1527
|
+
r[o] || a.push(o);
|
|
1528
|
+
}) : (r = this._glyphInfo[e] = [], i.forEach((o) => a.push(o))), a.length === 0 ? Promise.resolve() : s.invoke("getGlyphs", { tileID: t, font: e, codePoints: a }, n).then((o) => {
|
|
1529
|
+
for (let l = 0; l < o.length; l++)
|
|
1530
|
+
o[l] && (r[l] = o[l]);
|
|
1531
|
+
});
|
|
1532
|
+
}
|
|
1533
|
+
getGlyphItems(t) {
|
|
1534
|
+
return this._glyphInfo[t];
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
export {
|
|
1538
|
+
ss as default
|
|
1539
|
+
};
|