@arcgis/core 5.2.0-next.7 → 5.2.0-next.9
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/applications/SceneViewer/layerUtils.d.ts +9 -1
- package/applications/SceneViewer/layerUtils.js +1 -1
- package/arcgisGlobal.d.ts +4 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/07cc5743cb6a9fd68adb.js +1 -0
- package/assets/esri/core/workers/chunks/0cbd7f5fe24271942abd.js +1 -0
- package/assets/esri/core/workers/chunks/0ecc1bc1686844cdd60e.js +1 -0
- package/assets/esri/core/workers/chunks/0f75c19d8e296a32e329.js +1 -0
- package/assets/esri/core/workers/chunks/174cc2e69e5b5a13d880.js +1 -0
- package/assets/esri/core/workers/chunks/18f980465db5a86153d1.js +1 -0
- package/assets/esri/core/workers/chunks/1996f0a930abdd97b855.js +1 -0
- package/assets/esri/core/workers/chunks/1c8436b27a3d3cde5cfc.js +1 -0
- package/assets/esri/core/workers/chunks/1cb1f125dccbf8c8cac9.js +1 -0
- package/assets/esri/core/workers/chunks/1dd06335bb2d35c66339.js +1 -0
- package/assets/esri/core/workers/chunks/1f289aa69dd6b6be534a.js +1 -0
- package/assets/esri/core/workers/chunks/2185e8a52c5e29d46680.js +1 -0
- package/assets/esri/core/workers/chunks/{da29cf0e64065631a470.js → 24810c36ae09bb4e83dc.js} +1 -1
- package/assets/esri/core/workers/chunks/26583db2af1a1cc456e5.js +1 -0
- package/assets/esri/core/workers/chunks/274b82cb183ddd0042f3.js +1 -0
- package/assets/esri/core/workers/chunks/27c6def22c2b0791ce9e.js +1 -0
- package/assets/esri/core/workers/chunks/2d2895f1fdf44d212a4d.js +1 -0
- package/assets/esri/core/workers/chunks/2dbc2fd0f2dde505c465.js +1 -0
- package/assets/esri/core/workers/chunks/2dbcdfdf000226bfe746.js +1 -0
- package/assets/esri/core/workers/chunks/2e6382d50bf012064eae.js +1 -0
- package/assets/esri/core/workers/chunks/30f1909c5ef1835b8507.js +1 -0
- package/assets/esri/core/workers/chunks/31918a0d9886dedf385f.js +1 -0
- package/assets/esri/core/workers/chunks/{1c029b03ed836f393a50.js → 3248001d9dfb9153699e.js} +1 -1
- package/assets/esri/core/workers/chunks/3297658ccd8d4b9ce733.js +1 -0
- package/assets/esri/core/workers/chunks/{716a4d7e8b908b81870b.js → 32f26757e36704923286.js} +1 -1
- package/assets/esri/core/workers/chunks/3529afab0c2444275d91.js +1 -0
- package/assets/esri/core/workers/chunks/36dac6ab51d9dbdd091d.js +1 -0
- package/assets/esri/core/workers/chunks/390fda094fa8695d98cf.js +1 -0
- package/assets/esri/core/workers/chunks/39596715e84d0da2f803.js +30 -0
- package/assets/esri/core/workers/chunks/398eb3100a282e4736bb.js +1 -0
- package/assets/esri/core/workers/chunks/3b3f91a61e3f29af1fb2.js +1 -0
- package/assets/esri/core/workers/chunks/{f815106d439ff1f76e51.js → 3b837b512999e6ab24bc.js} +1 -1
- package/assets/esri/core/workers/chunks/3d20c86f1fe877bf884b.js +1 -0
- package/assets/esri/core/workers/chunks/3dc5fbecc427df1fd827.js +1 -0
- package/assets/esri/core/workers/chunks/3e65b4b18760bde8ceee.js +1 -0
- package/assets/esri/core/workers/chunks/3ff7aa216cd794d951e8.js +1 -0
- package/assets/esri/core/workers/chunks/{8e1865392681d390ab2e.js → 401ee7fa500adad77db1.js} +1 -1
- package/assets/esri/core/workers/chunks/{60915a3708a34da1977e.js → 426156137f279d979ddd.js} +1 -1
- package/assets/esri/core/workers/chunks/434c1dd3f48e6f0802fc.js +1 -0
- package/assets/esri/core/workers/chunks/4517630bf869205bab87.js +1 -0
- package/assets/esri/core/workers/chunks/48f1c3a7c9f16d6896f6.js +1 -0
- package/assets/esri/core/workers/chunks/{cfd28eba44cf5a296c6d.js → 49308bdc36373555f1af.js} +1 -1
- package/assets/esri/core/workers/chunks/{09d0e430c66788a2626f.js → 4a20f7a0700fd14a129f.js} +1 -1
- package/assets/esri/core/workers/chunks/5075e85e1eafd431a8c0.js +1 -0
- package/assets/esri/core/workers/chunks/5121768c70f1e03b685c.js +1 -0
- package/assets/esri/core/workers/chunks/5201105ca11a2d450460.js +1 -0
- package/assets/esri/core/workers/chunks/528ed0bd8dc149ead023.js +1 -0
- package/assets/esri/core/workers/chunks/52f354bf80ee5ab0379a.js +1 -0
- package/assets/esri/core/workers/chunks/538537f9bc866d9caa75.js +1 -0
- package/assets/esri/core/workers/chunks/58a7cdebc3d182c15ec6.js +1 -0
- package/assets/esri/core/workers/chunks/58ac245ff7fb57c1004f.js +1 -0
- package/assets/esri/core/workers/chunks/58acc18b92533166135d.js +1 -0
- package/assets/esri/core/workers/chunks/597aa39cdb5366ef9a74.js +1 -0
- package/assets/esri/core/workers/chunks/5bfae465872760e7af6d.js +1 -0
- package/assets/esri/core/workers/chunks/5cb274e5759f7ca0d4ed.js +1 -0
- package/assets/esri/core/workers/chunks/5d3ddbf94539cb4f493e.js +1 -0
- package/assets/esri/core/workers/chunks/{542f5469f7b42026b24f.js → 5d62d1920e3e35fc0192.js} +1 -1
- package/assets/esri/core/workers/chunks/5dd441db1e74dc9b56e9.js +1 -0
- package/assets/esri/core/workers/chunks/630ad47857de3cf726d1.js +1 -0
- package/assets/esri/core/workers/chunks/64114a7d2da162987958.js +1 -0
- package/assets/esri/core/workers/chunks/6821462e5c1e9c76010a.js +1 -0
- package/assets/esri/core/workers/chunks/684d3cb4fb233180b2d0.js +1 -0
- package/assets/esri/core/workers/chunks/686c51fd2144e132783e.js +1 -0
- package/assets/esri/core/workers/chunks/68f9b2da1fd08785320f.js +2 -0
- package/assets/esri/core/workers/chunks/69e98de578f467a35054.js +1 -0
- package/assets/esri/core/workers/chunks/6a3d207308b29651f397.js +1 -0
- package/assets/esri/core/workers/chunks/6aabde21b0b376d95888.js +1 -0
- package/assets/esri/core/workers/chunks/6d616b66fb32904b55a1.js +1 -0
- package/assets/esri/core/workers/chunks/{bcb021a167580bb1619f.js → 6ef3b8d67b498d655a99.js} +1 -1
- package/assets/esri/core/workers/chunks/6f125b4ed06c0022dee6.js +1 -0
- package/assets/esri/core/workers/chunks/6f4825c3ef1fe202ab82.js +1 -0
- package/assets/esri/core/workers/chunks/6f5d61f734ec40dafabb.js +1 -0
- package/assets/esri/core/workers/chunks/{fce7995c26953bfd8d3d.js → 70229007d594536ba6a3.js} +1 -1
- package/assets/esri/core/workers/chunks/71e55381fdff3fc2542e.js +1 -0
- package/assets/esri/core/workers/chunks/{90953a827bc89d0e6bd5.js → 72cfb186e50537bcdd19.js} +1 -1
- package/assets/esri/core/workers/chunks/72d67cc3a382e83bf1a2.js +1 -0
- package/assets/esri/core/workers/chunks/7748743d4be047094d67.js +1 -0
- package/assets/esri/core/workers/chunks/78c53aeb0a408ab3c80c.js +1 -0
- package/assets/esri/core/workers/chunks/7b5c1030a7cf0f382cc4.js +1 -0
- package/assets/esri/core/workers/chunks/7cee81c5aa1e6b7d2452.js +1 -0
- package/assets/esri/core/workers/chunks/7e89cb9ff615742e0894.js +1 -0
- package/assets/esri/core/workers/chunks/80f4f686ce403cb2693f.js +1 -0
- package/assets/esri/core/workers/chunks/{62dfbdc847be4800e833.js → 8103d06f760a2c79773d.js} +10 -14
- package/assets/esri/core/workers/chunks/{8477b5fdd99c6ac5c27b.js → 851705cf276eae8d4d37.js} +1 -1
- package/assets/esri/core/workers/chunks/89e09276086745aa21fa.js +1 -0
- package/assets/esri/core/workers/chunks/{4894997bfa438f66da36.js → 8a8c5e5ce457ca004687.js} +1 -1
- package/assets/esri/core/workers/chunks/{b79428c5093614174e76.js → 8b0a01ebc86ab226f01f.js} +1 -1
- package/assets/esri/core/workers/chunks/{452c01cecbbd1e370098.js → 8f93e6fc11a158d4f1ee.js} +1 -1
- package/assets/esri/core/workers/chunks/93bd56396b8cd020f965.js +1 -0
- package/assets/esri/core/workers/chunks/{359d3acb3953e64e5a78.js → 93ceb74ac88ef460fe5f.js} +1 -1
- package/assets/esri/core/workers/chunks/957f7b8de4aecb6f644e.js +1 -0
- package/assets/esri/core/workers/chunks/{875cce0be4f6c89f80f3.js → 9629601de5e44ffe90ea.js} +2 -2
- package/assets/esri/core/workers/chunks/976ab2be6c244768c08a.js +1 -0
- package/assets/esri/core/workers/chunks/{e785f76c1a75cb1d1e1f.js → 99101789035f1787c630.js} +1 -1
- package/assets/esri/core/workers/chunks/99e5296192ab98fd0d99.js +1 -0
- package/assets/esri/core/workers/chunks/9d5f7573bfe3b051daf1.js +1 -0
- package/assets/esri/core/workers/chunks/a0c00c6fe60db49b3ab9.js +1 -0
- package/assets/esri/core/workers/chunks/a2247f4c3116efb16c4f.js +1 -0
- package/assets/esri/core/workers/chunks/a4245bd4e67a428fd835.js +1 -0
- package/assets/esri/core/workers/chunks/a442534ac0956a68b769.js +1 -0
- package/assets/esri/core/workers/chunks/a4e9a17dacbb52444d75.js +1 -0
- package/assets/esri/core/workers/chunks/{8bdca6f06c8b5fedd917.js → a5abba59e738c3240c22.js} +1 -1
- package/assets/esri/core/workers/chunks/a9fc53ae040320e49834.js +1 -0
- package/assets/esri/core/workers/chunks/aa118c1bcd922b8ac328.js +1 -0
- package/assets/esri/core/workers/chunks/aae0049c2c3e15a813e8.js +1 -0
- package/assets/esri/core/workers/chunks/ac33b10fe65f9e9e824f.js +1 -0
- package/assets/esri/core/workers/chunks/adc32f6b45ea3026fc34.js +1 -0
- package/assets/esri/core/workers/chunks/af31e62499d45bdab3c3.js +1 -0
- package/assets/esri/core/workers/chunks/b22a1c98271c2e4d8808.js +1 -0
- package/assets/esri/core/workers/chunks/{9f4681713f03365a2a53.js → b666027b9022fa346a79.js} +1 -1
- package/assets/esri/core/workers/chunks/b73c146d3e550eaf07eb.js +1 -0
- package/assets/esri/core/workers/chunks/{0f3654c8157ec8f22869.js → b895674c0550826ecb28.js} +3 -3
- package/assets/esri/core/workers/chunks/c0cbc50e5afd68bd485c.js +1 -0
- package/assets/esri/core/workers/chunks/c2a65de34f6a6c89c652.js +1 -0
- package/assets/esri/core/workers/chunks/c357c0a08b99c1e7f290.js +1 -0
- package/assets/esri/core/workers/chunks/{4a23b27bfbcfa08fd9a7.js → c3cf9e6e91f71c9cc5f3.js} +1 -1
- package/assets/esri/core/workers/chunks/c3ff2ff0a86a9143d7a5.js +1 -0
- package/assets/esri/core/workers/chunks/{e545df5ea7c0ced92cee.js → c424a66f1546275e2bcb.js} +1 -1
- package/assets/esri/core/workers/chunks/c60b4f2dd5fccdf362a7.js +1 -0
- package/assets/esri/core/workers/chunks/c6d0b4875b6b8d6bc25a.js +1 -0
- package/assets/esri/core/workers/chunks/c80fc1b3048e8d58a1f8.js +1 -0
- package/assets/esri/core/workers/chunks/c911f0b5bdd43b66b731.js +1 -0
- package/assets/esri/core/workers/chunks/c9a4601073e1a3eee9d0.js +1 -0
- package/assets/esri/core/workers/chunks/ccffaba50674adba7a0f.js +1 -0
- package/assets/esri/core/workers/chunks/{24646a1176ce34039155.js → cdf6ad970dc1893dac58.js} +1 -1
- package/assets/esri/core/workers/chunks/d13e003c9293cb7e2852.js +1 -0
- package/assets/esri/core/workers/chunks/d24e027bb8b2c09f25c8.js +1 -0
- package/assets/esri/core/workers/chunks/d2df8c328054dc6cb7b7.js +1 -0
- package/assets/esri/core/workers/chunks/d5c35a75fd4c41def420.js +1 -0
- package/assets/esri/core/workers/chunks/{5e3e0d7b85dfd52d1c7d.js → d78b7cac322755e87eb8.js} +1 -1
- package/assets/esri/core/workers/chunks/d7be278aed1fb37ad5ec.js +1 -0
- package/assets/esri/core/workers/chunks/d9695794cfaa014a55b1.js +1 -0
- package/assets/esri/core/workers/chunks/da1e8b338ab9fe9e0a8e.js +1 -0
- package/assets/esri/core/workers/chunks/dd920a6f6422fa213eba.js +1 -0
- package/assets/esri/core/workers/chunks/e1bf87077541da6853c6.js +1 -0
- package/assets/esri/core/workers/chunks/e279bcbe4f10e87bde6c.js +1 -0
- package/assets/esri/core/workers/chunks/e4406baf206b9e4c7e4f.js +1 -0
- package/assets/esri/core/workers/chunks/e499252cb52f7aed49a0.js +1 -0
- package/assets/esri/core/workers/chunks/{e178cd0e9178d6716410.js → e5837e5ac6ef761f26a2.js} +1 -1
- package/assets/esri/core/workers/chunks/e6a7272b59a4c2e34dca.js +1 -0
- package/assets/esri/core/workers/chunks/e912b515704e20313e53.js +1 -0
- package/assets/esri/core/workers/chunks/eac683a37339aa558455.js +1 -0
- package/assets/esri/core/workers/chunks/ec1841e6e498d54012eb.js +1 -0
- package/assets/esri/core/workers/chunks/ed3d16a5b4084ef61f8a.js +1 -0
- package/assets/esri/core/workers/chunks/ee07f54bc77fe9f8575a.js +1 -0
- package/assets/esri/core/workers/chunks/{e094364e54981c91e1b4.js → eeea5710275c967e8d51.js} +1 -1
- package/assets/esri/core/workers/chunks/ef46ef4f0ee9f2aeaa4a.js +1 -0
- package/assets/esri/core/workers/chunks/efb4aa5886730ea377bd.js +1 -0
- package/assets/esri/core/workers/chunks/{485d20152495c27b8074.js → f2a268c69f2a5566381b.js} +1 -1
- package/assets/esri/core/workers/chunks/f590db684d88e72bd79b.js +1 -0
- package/assets/esri/core/workers/chunks/f69df22a5c64389ebe28.js +1 -0
- package/assets/esri/core/workers/chunks/{f60292d97bcdbf19165b.js → f6d047358d14328f3622.js} +1 -1
- package/assets/esri/core/workers/chunks/f7fca88d120d45bb782a.js +1 -0
- package/assets/esri/core/workers/chunks/f819854098d63fe4ccdb.js +1 -0
- package/assets/esri/core/workers/chunks/f8f3579d0c1b65762902.js +1 -0
- package/assets/esri/core/workers/chunks/f98118127469449ca145.js +1 -0
- package/assets/esri/core/workers/chunks/f9ed05d4ad1f44d033bb.js +1 -0
- package/assets/esri/core/workers/chunks/fb6605be0c5e36785543.js +1 -0
- package/assets/esri/core/workers/chunks/fbe7dae0b4bf2d172487.js +1 -0
- package/assets/esri/core/workers/chunks/fc4d9be62cf5e9758842.js +1 -0
- package/assets/esri/core/workers/chunks/fd70a25ffdf2cc6c5be2.js +1 -0
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
- package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
- package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +38 -8
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/GaussianSplatComposition.glsl.js +1 -1
- package/chunks/GlobalIllumination.glsl.js +1 -1
- package/chunks/GlowComposition.glsl.js +2 -2
- package/chunks/OITBlend.glsl.js +3 -3
- package/chunks/OITBlendEmission.glsl.js +2 -2
- package/chunks/OITDimOpaque.glsl.js +2 -2
- package/chunks/SlicePlaneMaterial.glsl.js +4 -4
- package/chunks/bundle2.js +1 -1
- package/chunks/lyr3DMain.js +1 -1
- package/chunks/lyr3DWorker.js +1 -1
- package/chunks/vxlLayer.js +1 -1
- package/config.js +1 -1
- package/core/has.js +1 -1
- package/core/screenUtils.js +1 -1
- package/core/sql.d.ts +1 -1
- package/geometry/Extent.d.ts +0 -13
- package/geometry/Geometry.d.ts +10 -8
- package/geometry/Multipoint.d.ts +9 -0
- package/geometry/Multipoint.js +1 -1
- package/geometry/Point.d.ts +15 -71
- package/geometry/Polygon.js +1 -1
- package/geometry/support/geometryUtils.js +1 -1
- package/graphic/AnnotationGraphicOrigin.d.ts +34 -0
- package/graphic/AnnotationGraphicOrigin.js +2 -0
- package/graphic/DimensionFeatureGraphicOrigin.d.ts +34 -0
- package/graphic/DimensionFeatureGraphicOrigin.js +2 -0
- package/identity/IdentityManagerBase.js +1 -1
- package/interfaces.d.ts +11 -0
- package/kernel.js +1 -1
- package/layers/AnnotationLayer.d.ts +263 -32
- package/layers/AnnotationLayer.js +1 -1
- package/layers/DimensionFeatureLayer.d.ts +263 -32
- package/layers/DimensionFeatureLayer.js +1 -1
- package/layers/FeatureLayer.d.ts +1 -1
- package/layers/GeoJSONLayer.d.ts +7 -7
- package/layers/ParquetLayer.d.ts +22 -2
- package/layers/SceneLayer.d.ts +4 -2
- package/layers/VideoLayer.d.ts +7 -1
- package/layers/VideoLayer.js +1 -1
- package/layers/catalog/CatalogFootprintLayer.d.ts +40 -10
- package/layers/graphics/sources/parquet/FileProvider.js +1 -1
- package/layers/graphics/sources/parquet/ParquetFileInfo.js +2 -0
- package/layers/graphics/sources/parquet/ParquetFileStatistics.js +2 -0
- package/layers/graphics/sources/parquet/PortalParquetFileProvider.js +1 -1
- package/layers/graphics/sources/parquet/PortalParquetLayerFileProvider.js +1 -1
- package/layers/graphics/sources/parquet/UrlsFileProvider.js +1 -1
- package/layers/graphics/sources/parquet/createFileProvider.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/mixins/FeatureLayerBase.d.ts +40 -16
- package/layers/mixins/TemporalLayer.d.ts +4 -2
- package/layers/support/AnnotationSublayer.d.ts +44 -0
- package/layers/support/AnnotationSublayer.js +2 -0
- package/layers/support/GeometryEncodingLocation.d.ts +1 -1
- package/layers/support/GeometryEncodingWkb.d.ts +3 -2
- package/layers/support/ParquetFilesData.d.ts +13 -3
- package/layers/support/ParquetPortalItemData.d.ts +12 -1
- package/layers/support/arcgisLayers.js +1 -1
- package/layers/support/commonProperties.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/layers/support/parquetUtils.js +1 -1
- package/layers/support/tiles3DUtils.js +1 -1
- package/layers/support/timeSeriesUtils.js +1 -1
- package/layers/video/types.d.ts +61 -1
- package/libs/parquet/parquet.js +1 -1
- package/package.json +1 -1
- package/request/types.d.ts +18 -20
- package/rest/support/Query.d.ts +1 -0
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPolygonShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexOutlineFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapAccumulateShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
- package/views/2d/layers/GraphicsLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/KMLLayerView2D.js +1 -1
- package/views/2d/layers/MapNotesLayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/RouteLayerView2D.js +1 -1
- package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
- package/views/2d/layers/graphics/GraphicStore.js +1 -1
- package/views/2d/support/hitTestUtils.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightAggregateManipulatedObject3D.js +2 -0
- package/views/3d/analysis/LineOfSight/LineOfSightAuthoringUtils.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightConfiguration.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightManipulators.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightObserverPlugin.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightPlacementLeafPlugin.js +2 -0
- package/views/3d/analysis/LineOfSight/LineOfSightPlacementTool.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +2 -0
- package/views/3d/analysis/LineOfSight/LineOfSightRootPlugin.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool2.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSnappingController.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/isSupportedObject.js +1 -1
- package/views/3d/interactive/editingTools/reshape/reshapeTooltipUtils3D.js +1 -1
- package/views/3d/interactive/editingTools/visualElementUtils.js +1 -1
- package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl/RenderNode.d.ts +25 -4
- package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/RenderSubmitSystem.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/EmissionDimming.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/effects/emissive/emissions.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlendTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/RendererBase.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +2 -2
- package/views/3d/webgl-engine/shaders/SlicePlaneMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ToneMapping.glsl.js +6 -10
- package/views/draw/plugins/PolygonPlugin.js +1 -1
- package/views/interactive/interactiveToolUtils.js +1 -1
- package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
- package/views/interactive/snapping/LineSnapper.js +1 -1
- package/views/interactive/snapping/ParallelLineSnapper.js +1 -1
- package/views/interactive/snapping/RightAngleSnapper.js +1 -1
- package/views/interactive/snapping/RightAngleTriangleSnapper.js +1 -1
- package/views/interactive/snapping/SnappingAlgorithm.js +1 -1
- package/views/interactive/snapping/SnappingManager.js +1 -1
- package/views/interactive/snapping/snappingUtils.js +1 -1
- package/views/layers/FeatureLikeLayerView.d.ts +25 -1
- package/views/layers/FeatureLikeLayerView.js +1 -1
- package/views/types.d.ts +4 -4
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/renderState.js +1 -1
- package/webdoc/support/webdocSaveUtils.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +10 -2
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/ReactiveContingentValuesManager.js +1 -1
- package/widgets/BatchAttributeForm/attachmentUtils.d.ts +14 -0
- package/widgets/BatchAttributeForm/attachmentUtils.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/css.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +8 -6
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/attachmentValidationCriteriaState.d.ts +5 -0
- package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
- package/widgets/BatchAttributeForm/inputs/types.d.ts +8 -1
- package/widgets/BatchAttributeForm/interfaceUtils.js +1 -1
- package/widgets/BatchAttributeForm/rendered-content/RelationshipDetails.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm.d.ts +9 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/Column.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/GroupColumn.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/Print/PrintViewModel.js +1 -1
- package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +7 -1
- package/widgets/VideoPlayer/VideoPlayerViewModel.js +1 -1
- package/widgets/support/ContingentValuesManager.js +1 -1
- package/assets/esri/core/workers/chunks/02aaeaa988e9e7d65a7f.js +0 -1
- package/assets/esri/core/workers/chunks/03354ad3d74d858173b4.js +0 -1
- package/assets/esri/core/workers/chunks/09a4139fc6d069ab6928.js +0 -1
- package/assets/esri/core/workers/chunks/0a510acf50915e00c62b.js +0 -1
- package/assets/esri/core/workers/chunks/0a780a883abfcdf0b900.js +0 -1
- package/assets/esri/core/workers/chunks/0fbf9bf52ecb4cd8293b.js +0 -1
- package/assets/esri/core/workers/chunks/119d352dd586f2bb61ec.js +0 -1
- package/assets/esri/core/workers/chunks/130784a27661de6b52a5.js +0 -1
- package/assets/esri/core/workers/chunks/145364aa20b4435294c2.js +0 -1
- package/assets/esri/core/workers/chunks/1595dc499a06b23b6a96.js +0 -1
- package/assets/esri/core/workers/chunks/16713986893adfbc9331.js +0 -1
- package/assets/esri/core/workers/chunks/179c9fe4ac83b42e5976.js +0 -1
- package/assets/esri/core/workers/chunks/19dcae83be0fc0aced02.js +0 -1
- package/assets/esri/core/workers/chunks/1c64e10f966e26af6fed.js +0 -1
- package/assets/esri/core/workers/chunks/1eabe746481e0b228498.js +0 -1
- package/assets/esri/core/workers/chunks/201007cf1a91e2b126fc.js +0 -1
- package/assets/esri/core/workers/chunks/20d0adc678f11981059c.js +0 -1
- package/assets/esri/core/workers/chunks/227eff8aa4a6f5f03bc2.js +0 -1
- package/assets/esri/core/workers/chunks/233ff588798c8a5eedf4.js +0 -1
- package/assets/esri/core/workers/chunks/238478cfe493fd4a6100.js +0 -1
- package/assets/esri/core/workers/chunks/24647e7424798dccdaf5.js +0 -1
- package/assets/esri/core/workers/chunks/249616ea2d90d40a8299.js +0 -1
- package/assets/esri/core/workers/chunks/24d9e4f1c7b8ff0d2cce.js +0 -1
- package/assets/esri/core/workers/chunks/2b36a54927f5a7281da3.js +0 -1
- package/assets/esri/core/workers/chunks/2bcd4d395bfe6a19ccc8.js +0 -1
- package/assets/esri/core/workers/chunks/2c8584ec1c3c9fd5aba2.js +0 -1
- package/assets/esri/core/workers/chunks/2d374cc8c54a722a7afe.js +0 -1
- package/assets/esri/core/workers/chunks/2e11b4e9d66474a60064.js +0 -1
- package/assets/esri/core/workers/chunks/2fa080539d039c92ce08.js +0 -1
- package/assets/esri/core/workers/chunks/3109b05fe4fc40d4f25b.js +0 -1
- package/assets/esri/core/workers/chunks/31442f25d550ead58fc4.js +0 -1
- package/assets/esri/core/workers/chunks/32323b0e0fcecd8f640e.js +0 -1
- package/assets/esri/core/workers/chunks/330da3828eefd8d72d3f.js +0 -1
- package/assets/esri/core/workers/chunks/33e0130e6a40fc768978.js +0 -1
- package/assets/esri/core/workers/chunks/343ba5ea459e96ba79c6.js +0 -1
- package/assets/esri/core/workers/chunks/388e71e8f2ec41bfa5a9.js +0 -1
- package/assets/esri/core/workers/chunks/3a5c1c501808352857bd.js +0 -1
- package/assets/esri/core/workers/chunks/3aacaa1be5efeac23a37.js +0 -1
- package/assets/esri/core/workers/chunks/3b765a8cac9e92f644f2.js +0 -1
- package/assets/esri/core/workers/chunks/3bf6d55511cd7722eb93.js +0 -1
- package/assets/esri/core/workers/chunks/3e012cd3ca4451f89f59.js +0 -1
- package/assets/esri/core/workers/chunks/3fbb6ff940156a981983.js +0 -1
- package/assets/esri/core/workers/chunks/40910c69307e2d2d3f28.js +0 -1
- package/assets/esri/core/workers/chunks/40c4e14e7bb505ef10a3.js +0 -1
- package/assets/esri/core/workers/chunks/4104fa1ede36bcee9be5.js +0 -1
- package/assets/esri/core/workers/chunks/423a9882abd4a6dadf86.js +0 -1
- package/assets/esri/core/workers/chunks/428561df7ba6f02e2d80.js +0 -1
- package/assets/esri/core/workers/chunks/45323491f9005629c602.js +0 -1
- package/assets/esri/core/workers/chunks/46d0a25d33b5b328cfce.js +0 -1
- package/assets/esri/core/workers/chunks/47dd2bfecc5c4b5f10f0.js +0 -1
- package/assets/esri/core/workers/chunks/4845df00f6ebcce6ea3e.js +0 -1
- package/assets/esri/core/workers/chunks/48fcc10768d93e95a04e.js +0 -1
- package/assets/esri/core/workers/chunks/4a9dd9f8aa98882218f3.js +0 -1
- package/assets/esri/core/workers/chunks/4bfffdfbe6d467f143a4.js +0 -1
- package/assets/esri/core/workers/chunks/518046d2b95a7590a092.js +0 -1
- package/assets/esri/core/workers/chunks/54dad475dc806a38c287.js +0 -1
- package/assets/esri/core/workers/chunks/552945a73a95cd2a9f54.js +0 -1
- package/assets/esri/core/workers/chunks/5553279998ae07b60f5f.js +0 -1
- package/assets/esri/core/workers/chunks/58155f24f8ed6aca7a21.js +0 -1
- package/assets/esri/core/workers/chunks/5838f46d341d2fde42ee.js +0 -1
- package/assets/esri/core/workers/chunks/592a599f514de373dead.js +0 -1
- package/assets/esri/core/workers/chunks/5aba23584e0b230c75f5.js +0 -1
- package/assets/esri/core/workers/chunks/5f9bacee6fbf9ac1bca0.js +0 -1
- package/assets/esri/core/workers/chunks/62206d5d497b95fc4caf.js +0 -1
- package/assets/esri/core/workers/chunks/624b1bb269744142b835.js +0 -1
- package/assets/esri/core/workers/chunks/62fc3c367f736c73b0d7.js +0 -1
- package/assets/esri/core/workers/chunks/643c33a98f2d30a92001.js +0 -1
- package/assets/esri/core/workers/chunks/64daa2a714e59d22bbd4.js +0 -1
- package/assets/esri/core/workers/chunks/65621650a53f69f7b05a.js +0 -1
- package/assets/esri/core/workers/chunks/6a5356ebed70e0f8f979.js +0 -1
- package/assets/esri/core/workers/chunks/6c9933f948efd7923aa1.js +0 -1
- package/assets/esri/core/workers/chunks/6cab67fc7044ee9b863b.js +0 -1
- package/assets/esri/core/workers/chunks/7014e73dfd3c8baa704c.js +0 -1
- package/assets/esri/core/workers/chunks/75839240022b280929f7.js +0 -1
- package/assets/esri/core/workers/chunks/76589434d573111a8fb4.js +0 -1
- package/assets/esri/core/workers/chunks/767ea5b455b3823afd09.js +0 -1
- package/assets/esri/core/workers/chunks/77859a61d059738d057f.js +0 -1
- package/assets/esri/core/workers/chunks/78aa5bc6af2758da20d0.js +0 -1
- package/assets/esri/core/workers/chunks/7b564226def99fcf79d8.js +0 -1
- package/assets/esri/core/workers/chunks/7bbffe07e62897928773.js +0 -1
- package/assets/esri/core/workers/chunks/7cadfd7444a2a05cf2fb.js +0 -1
- package/assets/esri/core/workers/chunks/7df94cb985db41815fad.js +0 -2
- package/assets/esri/core/workers/chunks/823789261ca3338f0fa8.js +0 -1
- package/assets/esri/core/workers/chunks/8419934bec7723b0feef.js +0 -1
- package/assets/esri/core/workers/chunks/84b0b6e099d949e0fea5.js +0 -1
- package/assets/esri/core/workers/chunks/9133c1b7cc1c9da27deb.js +0 -1
- package/assets/esri/core/workers/chunks/92ab5886aa2d8b9b179f.js +0 -1
- package/assets/esri/core/workers/chunks/9a6e62ef984e9c5babc4.js +0 -1
- package/assets/esri/core/workers/chunks/9b676606bf839b7aa433.js +0 -1
- package/assets/esri/core/workers/chunks/9d27cc631bab8aa7479e.js +0 -1
- package/assets/esri/core/workers/chunks/9dcfaca1f4fa8c8026ac.js +0 -1
- package/assets/esri/core/workers/chunks/9f23a61c60949459c14f.js +0 -30
- package/assets/esri/core/workers/chunks/a03c4c0bf138734a002e.js +0 -1
- package/assets/esri/core/workers/chunks/a0fa60a24e58f7a47e41.js +0 -1
- package/assets/esri/core/workers/chunks/a261f4c22224511fdfff.js +0 -1
- package/assets/esri/core/workers/chunks/a2ac139d0975085279a6.js +0 -1
- package/assets/esri/core/workers/chunks/a806ac351ef5da04c250.js +0 -1
- package/assets/esri/core/workers/chunks/ab94c9f62462d7a98f6a.js +0 -1
- package/assets/esri/core/workers/chunks/abdb05754c50776c3edd.js +0 -1
- package/assets/esri/core/workers/chunks/ad488985824fbb830ed6.js +0 -1
- package/assets/esri/core/workers/chunks/b0ac4b0b7aec70cfe6eb.js +0 -1
- package/assets/esri/core/workers/chunks/b23009d9f8eb7c20ce45.js +0 -1
- package/assets/esri/core/workers/chunks/bfbd1ca28ed2f263e58f.js +0 -1
- package/assets/esri/core/workers/chunks/c1b6de0d728d25d7905a.js +0 -1
- package/assets/esri/core/workers/chunks/c44be4aaba829e6d149d.js +0 -1
- package/assets/esri/core/workers/chunks/ca6907e14b1dde4d5c07.js +0 -1
- package/assets/esri/core/workers/chunks/cbbd94c53e75efc99876.js +0 -1
- package/assets/esri/core/workers/chunks/ce0e627a5e1cb78adce8.js +0 -1
- package/assets/esri/core/workers/chunks/cf7acf5acb6d322fd996.js +0 -1
- package/assets/esri/core/workers/chunks/d21480b078ec9680d4c4.js +0 -1
- package/assets/esri/core/workers/chunks/d81291dac1932350eccd.js +0 -1
- package/assets/esri/core/workers/chunks/da3c54e27a808f4fcc18.js +0 -1
- package/assets/esri/core/workers/chunks/dc6d50e1097a920ff820.js +0 -1
- package/assets/esri/core/workers/chunks/dd58286dde3b20356f84.js +0 -1
- package/assets/esri/core/workers/chunks/dfeddb7b17fa9eaae64c.js +0 -1
- package/assets/esri/core/workers/chunks/e4e0c5a45cf32973d5d5.js +0 -1
- package/assets/esri/core/workers/chunks/e638391801ad83fe4a68.js +0 -1
- package/assets/esri/core/workers/chunks/e755477dc78e9d6038d4.js +0 -1
- package/assets/esri/core/workers/chunks/e7712467db46e1385cf4.js +0 -1
- package/assets/esri/core/workers/chunks/ed2cb60e4f17f46fb78d.js +0 -1
- package/assets/esri/core/workers/chunks/edb55329305becdb204f.js +0 -1
- package/assets/esri/core/workers/chunks/f02fe24177e56a7e42b2.js +0 -1
- package/assets/esri/core/workers/chunks/f1fb2f12371f4c562079.js +0 -1
- package/assets/esri/core/workers/chunks/f3dfe1bd1146a6927407.js +0 -1
- package/assets/esri/core/workers/chunks/ff48334528d2554db4fe.js +0 -1
- package/views/3d/analysis/LineOfSight/LineOfSightAuthoringStore.js +0 -2
- /package/assets/esri/core/workers/chunks/{7df94cb985db41815fad.js.LICENSE.txt → 68f9b2da1fd08785320f.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{875cce0be4f6c89f80f3.js.LICENSE.txt → 9629601de5e44ffe90ea.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{id as e}from"../../kernel.js";import{isPopupTemplate as t}from"../../popupTemplateUtils.js";import{resultOrAbort as r}from"../../core/asyncUtils.js";import n from"../../core/Error.js";import{JSONMap as o}from"../../core/jsonMap.js";import i from"../../core/Logger.js";import{parseWhereClause as s}from"../../core/sql.js";import{normalizeGlobalID as a}from"../../core/uuid.js";import{createTypeReader as u}from"../../core/accessorSupport/extensions/serializableProperty/reader.js";import{isHostedAgolService as l}from"./arcgisLayerUrl.js";import c from"./CodedValue.js";import p from"./CodedValueDomain.js";import{queryAllJSON as d}from"./featureQueryAll.js";import{isStringField as f,isIntegerField as y}from"./fieldUtils.js";import{isLabelClass as m}from"./labelUtils.js";import{isLayerWithFeatureCapabilities as b,getOwningPortalUrl as h}from"./layerUtils.js";import w from"../../renderers/SimpleRenderer.js";import g from"../../renderers/UniqueValueRenderer.js";import{isSizeVariable as I}from"../../renderers/visualVariables/support/sizeVariableUtils.js";import j from"../../rest/support/AttachmentQuery.js";import{normalizationTypeJsonMap as x}from"../../rest/support/NormalizationBinParametersMixin.js";import v from"../../rest/support/Query.js";import F from"../../rest/support/RelationshipQuery.js";import{loadArcade as S}from"../../support/loadArcade.js";import{symbolTypesRenderer as P}from"../../symbols/support/typeUtils.js";const L=()=>i.getLogger("esri.layers.support.featureLayerUtils"),q=new o({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function A(e,t,r,o){const i=await Y(e);if(await E(e,t,o),!i.addAttachment)throw new n(o,"Layer source does not support addAttachment capability");return i.addAttachment(t,r)}function E(e,t,r){const{attributes:o}=t,{objectIdField:i}=e;return e.capabilities?.data?.supportsAttachment?t?o?i&&o[i]?Promise.resolve():Promise.reject(new n(r,`feature is missing the identifying attribute ${i}`)):Promise.reject(new n(r,"'attributes' are required on a feature to query attachments")):Promise.reject(new n(r,"A feature is required to add/delete/update attachments")):Promise.reject(new n(r,"this layer doesn't support attachments"))}async function M(e,t,r,o,i){const s=await Y(e);if(await E(e,t,i),!s.updateAttachment)throw new n(i,"Layer source does not support updateAttachment capability");return s.updateAttachment(t,r,o)}async function O(e,t,r){const{applyEdits:n}=await import("../graphics/editingSupport.js"),o=await e.load();let i=r;const{url:s,type:a,globalIdField:u}=o;return"feature"===a&&l(s)&&o.infoFor3D&&null!=t.deleteFeatures&&null!=u&&(i={...i,globalIdToObjectId:await pe(o,t.deleteFeatures,u)}),n(o,o.source,t,i)}async function C(e,t,r){const{uploadAssets:n}=await import("../graphics/editingSupport.js"),o=await e.load();return n(o,o.source,t,r)}async function D(e,t,r,o){const i=await Y(e);if(await E(e,t,o),!i.deleteAttachments)throw new n(o,"Layer source does not support deleteAttachments capability");return i.deleteAttachments(t,r)}async function T(e,t,r){const o=(await e.load({signal:t?.signal})).source;if(!o.fetchRecomputedExtents)throw new n(r,"Layer source does not support fetchUpdates capability");return o.fetchRecomputedExtents(t)}async function z(e,t,r,o){let i=j.from(t);await e.load();const s=e.source,a=e.capabilities;if(!a?.data?.supportsAttachment)throw new n(o,"this layer doesn't support attachments");const{attachmentTypes:u,objectIds:l,globalIds:c,num:p,size:d,start:f,where:y}=i;if(!a?.operations?.supportsQueryAttachments){if(u?.length>0||c?.length>0||d?.length>0||p||f||y)throw new n(o,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",i)}if(!(l?.length||c?.length||y))throw new n(o,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",i);if(!s.queryAttachments)throw new n(o,"Layer source does not support queryAttachments capability",i);return!a?.attachment?.supportsOrderByFields&&i.orderByFields?.length&&(i=i.clone(),i.orderByFields=null),s.queryAttachments(i)}async function U(e,t,r,o){const i=await Y(e);if(!i.queryObjectIds)throw new n(o,"Layer source does not support queryObjectIds capability");return i.queryObjectIds(v.from(t)??e.createQuery(),r)}async function k(e,t,r,o){const i=await Y(e);if(!i.queryFeatureCount)throw new n(o,"Layer source does not support queryFeatureCount capability");return i.queryFeatureCount(v.from(t)??e.createQuery(),r)}async function B(e,t,r,o){const i=await Y(e);if(!i.queryExtent)throw new n(o,"Layer source does not support queryExtent capability");return i.queryExtent(v.from(t)??e.createQuery(),r)}async function V(e,t,r,o){const i=await Y(e);if(!i.queryRelatedFeatures)throw new n(o,"Layer source does not support queryRelatedFeatures capability");return i.queryRelatedFeatures(F.from(t),r)}async function R(e,t,r,o){const i=await Y(e);if(!i.queryRelatedFeaturesCount)throw new n(o,"Layer source does not support queryRelatedFeaturesCount capability");return i.queryRelatedFeaturesCount(F.from(t),r)}async function N(e){const t=e.source;if(t?.refresh)try{const{dataChanged:r,updates:n}=await t.refresh();if(null!=n&&(e.sourceJSON={...e.sourceJSON,...n},e.read(n,{origin:"service",url:e.parsedUrl})),r)return!0}catch{}if(e.definitionExpression)try{return(await s(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function G(e){const t=new v;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,t.outFields=["*"],t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null;const r=e.capabilities?.query;r&&(t.compactGeometryEnabled=r.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=r.supportsDefaultSpatialReference);const n=e.capabilities?.data;n?.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),n?.supportsM&&null!=e.returnM&&(t.returnM=e.returnM);const{timeOffset:o,timeExtent:i}=e;return t.timeExtent=null!=o&&null!=i?i.offset(-o.value,o.unit):i||null,t}function Q(e){const{globalIdField:t,fields:r}=e;if(t)return t;if(r)for(const n of r)if("esriFieldTypeGlobalID"===n.type)return n.name}function Z(e){const{objectIdField:t,fields:r}=e;if(t)return t;if(r)for(const n of r)if("esriFieldTypeOID"===n.type)return n.name}function $(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}function J(e,t,r,n){const o=r?.feature,i=!!e.subtypes?.length;if(i&&!r?.excludeImpliedDomains){const r=W(e,t);if(r)return r}const s=i&&H(e,o);if(s){const e=s?.domains?.[t];return"inherited"===e?.type?n:e}const a=de(e.types,e.typeIdField,o);if(a){const e=a.domains&&a.domains[t];if(e&&"inherited"!==e?.type)return e}if(n)return n;if(!r?.excludeImpliedDomains){const r=_(e,t);if(r)return r}return null}function H(e,t){const{subtypes:r,subtypeField:n}=e;if(!t?.attributes||!r?.length||!n)return null;const o=t.attributes[n];return null==o?null:r.find(e=>e.code===o)}function W(e,t){const{fieldsIndex:r,subtypeField:n}=e,{name:o,type:i}=r.get(t)??{};if(!o)return null;if((n&&r.get(n)?.name)===o&&e.subtypes?.length){const t=e.subtypes.map(e=>new c({code:X(e.code,i),name:e.name}));if(t?.length)return new p({codedValues:t})}return null}function _(e,t){const{fieldsIndex:r}=e,{name:n,type:o}=r.get(t)??{};if(!n)return null;if(("typeIdField"in e?r.get(e.typeIdField)?.name:null)===n&&"types"in e&&e.types?.length&&K(e.types)){const t=e.types?.map(e=>new c({code:X(e.id,o),name:e.name}));return new p({codedValues:t})}return null}function K(e){const t=new Set,r=new Set;for(const n of e){if(t.has(n.id)||r.has(n.name))return!1;t.add(n.id),r.add(n.name)}return!0}function X(e,t){return t?f({type:t})&&"number"==typeof e?`${e}`:y({type:t})&&"string"==typeof e?Number.parseInt(e,10):e:e}async function Y(e){return(await e.load()).source}async function ee(t,r){if(!e)return;const n=e.findCredential(t);if(n)return n.userId;let o;try{const n=await h(t,r);n&&(o=await e.checkSignInStatus(`${n}/sharing`))}catch(i){}return o?o.userId:null}async function te(t,r){if(!e)return;if(e.findCredential(t))return;let n;try{const o=await h(t,r);o&&(n=await e.checkSignInStatus(`${o}/sharing`))}catch(o){}if(n)try{const n=null!=r?r.signal:null;await e.getCredential(t,{signal:n})}catch(o){}}async function re(e,t,r){const n=e.parsedUrl?.path;n&&e.authenticationTriggerEvent===t&&await te(n,r)}async function ne(e){const t=e.parsedUrl?.path;t&&oe(e)&&await te(t)}function oe(e){return ie(e)&&("serviceDefinitionExpression"in e&&se(e.serviceDefinitionExpression)||"definitionExpression"in e&&se(e.definitionExpression))}function ie(e){return!(!b(e)||!e.capabilities?.query.supportsCurrentUser)}function se(e){return!!e?.toLowerCase().includes("current_user")}function ae(e){return!fe(e)&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const ue=u({types:P});function le(e,t){if(e.defaultSymbol)return e.types?.length?new g({defaultSymbol:ue(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map(e=>({id:e.id,symbol:ue(e.symbol,e,t)}))}):new w({symbol:ue(e.defaultSymbol,e,t)})}function ce(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const r=e.editingInfo?.lastEditDate?.getTime();return null==r||(t*=1e3,Date.now()-r<t)}async function pe(e,t,n){if(null==t)return null;const o=[],{objectIdField:i}=e;if(t.forEach(e=>{let t=null;if("attributes"in e){const{attributes:r}=e;t={globalId:r[n],objectId:null!=r[i]&&-1!==r[i]?r[i]:null}}else t={globalId:e.globalId,objectId:null!=e.objectId&&-1!==e.objectId?e.objectId:null};null!=t.globalId&&(null!=t.objectId&&-1!==t.objectId||o.push(t.globalId))}),0===o.length)return null;const s=e.createQuery();s.where=o.map(e=>`${n}='${e}'`).join(" OR "),s.returnGeometry=!1,s.outFields=[i,n],s.cacheHint=!1;const u=await r(d(e,s));if(!u.ok)return null;const l=new Map,c=u.value.features;for(const r of c){const e=r.attributes[n],t=r.attributes[i];null!=e&&null!=t&&-1!==t&&l.set(a(e),t)}return l}function de(e,t,r){if(!t||!r||!e)return null;const n=r.getAttribute(t);if(null==n)return null;const o=e.filter(e=>{const{id:t}=e;return null!=t&&t.toString()===n.toString()});return o.length>1&&L().warn("getFeatureType",`Cannot unambiguously determine feature type because multiple types have the id ${n}.`),o[0]??null}function fe(e){return e.sourceJSON?.isMultiServicesView||ye(e)}function ye(e){return!!e.sourceJSON?.capabilities?.toLowerCase().split(",").map(e=>e.trim()).includes("map")}function me(e,t,r){const o=t?.queryAttributeBins;if(!t?.operations?.supportsQueryBins||!o)throw new n(r,"Layer source does not support binning");switch(e.binParameters?.type){case"auto-interval":if(!o.supportsAutoInterval)throw new n(r,"Layer source does not support auto-interval binning");if(e.binParameters.normalizationType&&(!o.supportsNormalization||!be(e.binParameters.normalizationType,o.supportedNormalizationTypes)))throw new n(r,"Layer source does not support normalization binning");break;case"date":if(!o.supportsDate)throw new n(r,"Layer source does not support date binning");if(e.binParameters.snapToData&&!o.supportsSnapToData)throw new n(r,"Layer source does not support snapToData binning");if(e.binParameters.returnFullIntervalBin&&!o.supportsReturnFullIntervalBin)throw new n(r,"Layer source does not support returnFullIntervalBin binning");break;case"fixed-boundaries":if(!o.supportsFixedBoundaries)throw new n(r,"Layer source does not support fixed-boundaries binning");break;case"fixed-interval":if(!o.supportsFixedInterval)throw new n(r,"Layer source does not support fixed-interval binning");if(e.binParameters.normalizationType&&(!o.supportsNormalization||!be(e.binParameters.normalizationType,o.supportedNormalizationTypes)))throw new n(r,"Layer source does not support normalization binning")}if(e.binParameters?.stackBy&&!o.supportsStackBy)throw new n(r,"Layer source does not support stackBy binning");if(e.binParameters?.splitBy&&!o.supportsSplitBy)throw new n(r,"Layer source does not support splitBy binning");if(e.binParameters?.firstDayOfWeek&&!o.supportsFirstDayOfWeek)throw new n(r,"Layer source does not support firstDayOfWeek binning");const i=o?.supportedStatistics;if(e.outStatistics&&i){const t=new Map([["count","count"],["sum","sum"],["min","min"],["max","max"],["avg","avg"],["stddev","stddev"],["var","var"],["percentile-continuous","percentileContinuous"],["percentile-discrete","percentileDiscrete"],["centroid-aggregate","centroid"],["convex-hull-aggregate","convexHull"],["envelope-aggregate","envelope"]]);for(const{statisticType:o}of e.outStatistics){const e=t.get(o);if(e&&!i[e])throw new n(r,`Layer source does not support ${o} statistic type`)}}}function be(e,t){return null!=e&&!!t?.[x.toJSON(e)]}function he(e){return m(e)?Boolean(e.labelExpressionInfo?.expression):t(e)?!!e.expressionInfos?.some(e=>e.expression)||!!Array.isArray(e.content)&&e.content.some(e=>"expression"===e.type&&e.expressionInfo?.expression):!("dot-density"!==e.type||!e.attributes?.some(e=>e.valueExpression))||(!(!("valueExpression"in e)||!e.valueExpression)||"visualVariables"in e&&null!=e.visualVariables&&e.visualVariables.some(e=>!!e.valueExpression||"size"===e.type&&(I(e.minSize)&&e.minSize.valueExpression||I(e.maxSize)&&e.maxSize.valueExpression)))}function we(e){if("renderer"in e&&e.renderer&&he(e.renderer))return!0;if("labelingInfo"in e&&e.labelingInfo)for(const t of e.labelingInfo)if(m(t)&&he(t))return!0;return!1}async function ge(e){let t="returnZ"in e?e.returnZ:void 0,r="returnM"in e?e.returnM:void 0;if(null!=t&&null!=r)return{returnZ:t,returnM:r};if(we(e)){const{arcadeUtils:n}=await S();n.layerHasGeometryFunctions(e)&&(t??=!0,r??=!0)}if("renderer"in e&&e.renderer?.symbols)for(const n of e.renderer.symbols)"cim"===n.type&&(Ie??=(await import("../../symbols/cim/CIMSymbolHelper.js")).forEachSymbolLayer,Ie(n.data.symbol,e=>{switch(e.type){case"CIMPictureMarker":case"CIMVectorMarker":if("CIMMarkerPlacementAtMeasuredUnits"===e.markerPlacement?.type)r??=!0}}));return{returnZ:t,returnM:r}}let Ie;export{A as addAttachment,O as applyEdits,ne as checkServiceCurrentUserSupport,W as computeDomainFromSubtypes,_ as computeDomainFromTypes,ae as computeEffectiveEditingEnabled,le as createDefaultRenderer,G as createQuery,D as deleteAttachments,te as ensureCredentialIfSignedIn,re as ensureLayerCredential,T as fetchRecomputedExtents,q as geometryTypeKebabDict,H as getFeatureSubtype,de as getFeatureType,J as getFieldDomain,pe as getGlobalIdToObjectIdMap,ee as getSignedInUser,se as hasCurrentUser,N as hasDataChanged,ce as isLayerCacheStale,ge as layerRequiresGeometryZM,z as queryAttachments,B as queryExtent,k as queryFeatureCount,U as queryObjectIds,V as queryRelatedFeatures,R as queryRelatedFeaturesCount,Q as readGlobalIdField,Z as readObjectIdField,$ as readVersion,fe as supportsQueryOnly,K as typesHaveUniqueIdsAndNames,M as updateAttachment,C as uploadAssets,me as validateBinsQuery};
|
|
2
|
+
import{id as e}from"../../kernel.js";import{isPopupTemplate as t}from"../../popupTemplateUtils.js";import{resultOrAbort as r}from"../../core/asyncUtils.js";import n from"../../core/Error.js";import{JSONMap as o}from"../../core/jsonMap.js";import i from"../../core/Logger.js";import{parseWhereClause as s}from"../../core/sql.js";import{normalizeGlobalID as a}from"../../core/uuid.js";import{createTypeReader as u}from"../../core/accessorSupport/extensions/serializableProperty/reader.js";import{isHostedAgolService as l}from"./arcgisLayerUrl.js";import c from"./CodedValue.js";import p from"./CodedValueDomain.js";import{queryAllJSON as d}from"./featureQueryAll.js";import{isStringField as f,isIntegerField as y}from"./fieldUtils.js";import{isLabelClass as m}from"./labelUtils.js";import{isLayerWithFeatureCapabilities as b,getOwningPortalUrl as h}from"./layerUtils.js";import w from"../../renderers/SimpleRenderer.js";import g from"../../renderers/UniqueValueRenderer.js";import{isSizeVariable as I}from"../../renderers/visualVariables/support/sizeVariableUtils.js";import j from"../../rest/support/AttachmentQuery.js";import{normalizationTypeJsonMap as x}from"../../rest/support/NormalizationBinParametersMixin.js";import v from"../../rest/support/Query.js";import F from"../../rest/support/RelationshipQuery.js";import{loadArcade as S}from"../../support/loadArcade.js";import{symbolTypesRenderer as P}from"../../symbols/support/typeUtils.js";const L=()=>i.getLogger("esri.layers.support.featureLayerUtils"),q=new o({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function A(e,t,r,o){const i=await Y(e);if(await E(e,t,o),!i.addAttachment)throw new n(o,"Layer source does not support addAttachment capability");return i.addAttachment(t,r)}function E(e,t,r){const{attributes:o}=t,{objectIdField:i}=e;return e.capabilities?.data?.supportsAttachment?t?o?i&&o[i]?Promise.resolve():Promise.reject(new n(r,`feature is missing the identifying attribute ${i}`)):Promise.reject(new n(r,"'attributes' are required on a feature to query attachments")):Promise.reject(new n(r,"A feature is required to add/delete/update attachments")):Promise.reject(new n(r,"this layer doesn't support attachments"))}async function M(e,t,r,o,i){const s=await Y(e);if(await E(e,t,i),!s.updateAttachment)throw new n(i,"Layer source does not support updateAttachment capability");return s.updateAttachment(t,r,o)}async function O(e,t,r){const{applyEdits:n}=await import("../graphics/editingSupport.js"),o=await e.load();let i=r;const{url:s,type:a,globalIdField:u}=o;return"feature"===a&&l(s)&&o.infoFor3D&&null!=t.deleteFeatures&&null!=u&&(i={...i,globalIdToObjectId:await pe(o,t.deleteFeatures,u)}),n(o,o.source,t,i)}async function C(e,t,r){const{uploadAssets:n}=await import("../graphics/editingSupport.js"),o=await e.load();return n(o,o.source,t,r)}async function D(e,t,r,o){const i=await Y(e);if(await E(e,t,o),!i.deleteAttachments)throw new n(o,"Layer source does not support deleteAttachments capability");return i.deleteAttachments(t,r)}async function T(e,t,r){const o=(await e.load({signal:t?.signal})).source;if(!o.fetchRecomputedExtents)throw new n(r,"Layer source does not support fetchUpdates capability");return o.fetchRecomputedExtents(t)}async function z(e,t,r,o){let i=j.from(t);const s=await e.load(),a=s.source,u=s.capabilities;if(!u?.data?.supportsAttachment)throw new n(o,"this layer doesn't support attachments");const{attachmentTypes:l,objectIds:c,globalIds:p,num:d,size:f,start:y,where:m}=i;if(!u?.operations?.supportsQueryAttachments){if(l?.length>0||p?.length>0||f?.length>0||d||y||m)throw new n(o,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",i)}if(!(c?.length||p?.length||m))throw new n(o,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",i);if(!a.queryAttachments)throw new n(o,"Layer source does not support queryAttachments capability",i);return!u?.attachment?.supportsOrderByFields&&i.orderByFields?.length&&(i=i.clone(),i.orderByFields=null),a.queryAttachments(i)}async function U(e,t,r,o){const i=await Y(e);if(!i.queryObjectIds)throw new n(o,"Layer source does not support queryObjectIds capability");return i.queryObjectIds(v.from(t)??e.createQuery(),r)}async function k(e,t,r,o){const i=await Y(e);if(!i.queryFeatureCount)throw new n(o,"Layer source does not support queryFeatureCount capability");return i.queryFeatureCount(v.from(t)??e.createQuery(),r)}async function B(e,t,r,o){const i=await Y(e);if(!i.queryExtent)throw new n(o,"Layer source does not support queryExtent capability");return i.queryExtent(v.from(t)??e.createQuery(),r)}async function V(e,t,r,o){const i=await Y(e);if(!i.queryRelatedFeatures)throw new n(o,"Layer source does not support queryRelatedFeatures capability");return i.queryRelatedFeatures(F.from(t),r)}async function R(e,t,r,o){const i=await Y(e);if(!i.queryRelatedFeaturesCount)throw new n(o,"Layer source does not support queryRelatedFeaturesCount capability");return i.queryRelatedFeaturesCount(F.from(t),r)}async function N(e){const t=e.source;if(t?.refresh)try{const{dataChanged:r,updates:n}=await t.refresh();if(null!=n&&(e.sourceJSON={...e.sourceJSON,...n},e.read(n,{origin:"service",url:e.parsedUrl})),r)return!0}catch{}if(e.definitionExpression)try{return(await s(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function G(e){const t=new v;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,t.outFields=["*"],t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null;const r=e.capabilities?.query;r&&(t.compactGeometryEnabled=r.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=r.supportsDefaultSpatialReference);const n=e.capabilities?.data;n?.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),n?.supportsM&&null!=e.returnM&&(t.returnM=e.returnM);const{timeOffset:o,timeExtent:i}=e;return t.timeExtent=null!=o&&null!=i?i.offset(-o.value,o.unit):i||null,t}function Q(e){const{globalIdField:t,fields:r}=e;if(t)return t;if(r)for(const n of r)if("esriFieldTypeGlobalID"===n.type)return n.name}function Z(e){const{objectIdField:t,fields:r}=e;if(t)return t;if(r)for(const n of r)if("esriFieldTypeOID"===n.type)return n.name}function $(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}function J(e,t,r,n){const o=r?.feature,i=!!e.subtypes?.length;if(i&&!r?.excludeImpliedDomains){const r=W(e,t);if(r)return r}const s=i&&H(e,o);if(s){const e=s?.domains?.[t];return"inherited"===e?.type?n:e}const a=de(e.types,e.typeIdField,o);if(a){const e=a.domains&&a.domains[t];if(e&&"inherited"!==e?.type)return e}if(n)return n;if(!r?.excludeImpliedDomains){const r=_(e,t);if(r)return r}return null}function H(e,t){const{subtypes:r,subtypeField:n}=e;if(!t?.attributes||!r?.length||!n)return null;const o=t.attributes[n];return null==o?null:r.find(e=>e.code===o)}function W(e,t){const{fieldsIndex:r,subtypeField:n}=e,{name:o,type:i}=r.get(t)??{};if(!o)return null;if((n&&r.get(n)?.name)===o&&e.subtypes?.length){const t=e.subtypes.map(e=>new c({code:X(e.code,i),name:e.name}));if(t?.length)return new p({codedValues:t})}return null}function _(e,t){const{fieldsIndex:r}=e,{name:n,type:o}=r.get(t)??{};if(!n)return null;if(("typeIdField"in e?r.get(e.typeIdField)?.name:null)===n&&"types"in e&&e.types?.length&&K(e.types)){const t=e.types?.map(e=>new c({code:X(e.id,o),name:e.name}));return new p({codedValues:t})}return null}function K(e){const t=new Set,r=new Set;for(const n of e){if(t.has(n.id)||r.has(n.name))return!1;t.add(n.id),r.add(n.name)}return!0}function X(e,t){return t?f({type:t})&&"number"==typeof e?`${e}`:y({type:t})&&"string"==typeof e?Number.parseInt(e,10):e:e}async function Y(e){return(await e.load()).source}async function ee(t,r){if(!e)return;const n=e.findCredential(t);if(n)return n.userId;let o;try{const n=await h(t,r);n&&(o=await e.checkSignInStatus(`${n}/sharing`))}catch(i){}return o?o.userId:null}async function te(t,r){if(!e)return;if(e.findCredential(t))return;let n;try{const o=await h(t,r);o&&(n=await e.checkSignInStatus(`${o}/sharing`))}catch(o){}if(n)try{const n=null!=r?r.signal:null;await e.getCredential(t,{signal:n})}catch(o){}}async function re(e,t,r){const n=e.parsedUrl?.path;n&&e.authenticationTriggerEvent===t&&await te(n,r)}async function ne(e){const t=e.parsedUrl?.path;t&&oe(e)&&await te(t)}function oe(e){return ie(e)&&("serviceDefinitionExpression"in e&&se(e.serviceDefinitionExpression)||"definitionExpression"in e&&se(e.definitionExpression))}function ie(e){return!(!b(e)||!e.capabilities?.query.supportsCurrentUser)}function se(e){return!!e?.toLowerCase().includes("current_user")}function ae(e){return!fe(e)&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const ue=u({types:P});function le(e,t){if(e.defaultSymbol)return e.types?.length?new g({defaultSymbol:ue(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map(e=>({id:e.id,symbol:ue(e.symbol,e,t)}))}):new w({symbol:ue(e.defaultSymbol,e,t)})}function ce(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const r=e.editingInfo?.lastEditDate?.getTime();return null==r||(t*=1e3,Date.now()-r<t)}async function pe(e,t,n){if(null==t)return null;const o=[],{objectIdField:i}=e;if(t.forEach(e=>{let t=null;if("attributes"in e){const{attributes:r}=e;t={globalId:r[n],objectId:null!=r[i]&&-1!==r[i]?r[i]:null}}else t={globalId:e.globalId,objectId:null!=e.objectId&&-1!==e.objectId?e.objectId:null};null!=t.globalId&&(null!=t.objectId&&-1!==t.objectId||o.push(t.globalId))}),0===o.length)return null;const s=e.createQuery();s.where=o.map(e=>`${n}='${e}'`).join(" OR "),s.returnGeometry=!1,s.outFields=[i,n],s.cacheHint=!1;const u=await r(d(e,s));if(!u.ok)return null;const l=new Map,c=u.value.features;for(const r of c){const e=r.attributes[n],t=r.attributes[i];null!=e&&null!=t&&-1!==t&&l.set(a(e),t)}return l}function de(e,t,r){if(!t||!r||!e)return null;const n=r.getAttribute(t);if(null==n)return null;const o=e.filter(e=>{const{id:t}=e;return null!=t&&t.toString()===n.toString()});return o.length>1&&L().warn("getFeatureType",`Cannot unambiguously determine feature type because multiple types have the id ${n}.`),o[0]??null}function fe(e){return e.sourceJSON?.isMultiServicesView||ye(e)}function ye(e){return!!e.sourceJSON?.capabilities?.toLowerCase().split(",").map(e=>e.trim()).includes("map")}function me(e,t,r){const o=t?.queryAttributeBins;if(!t?.operations?.supportsQueryBins||!o)throw new n(r,"Layer source does not support binning");switch(e.binParameters?.type){case"auto-interval":if(!o.supportsAutoInterval)throw new n(r,"Layer source does not support auto-interval binning");if(e.binParameters.normalizationType&&(!o.supportsNormalization||!be(e.binParameters.normalizationType,o.supportedNormalizationTypes)))throw new n(r,"Layer source does not support normalization binning");break;case"date":if(!o.supportsDate)throw new n(r,"Layer source does not support date binning");if(e.binParameters.snapToData&&!o.supportsSnapToData)throw new n(r,"Layer source does not support snapToData binning");if(e.binParameters.returnFullIntervalBin&&!o.supportsReturnFullIntervalBin)throw new n(r,"Layer source does not support returnFullIntervalBin binning");break;case"fixed-boundaries":if(!o.supportsFixedBoundaries)throw new n(r,"Layer source does not support fixed-boundaries binning");break;case"fixed-interval":if(!o.supportsFixedInterval)throw new n(r,"Layer source does not support fixed-interval binning");if(e.binParameters.normalizationType&&(!o.supportsNormalization||!be(e.binParameters.normalizationType,o.supportedNormalizationTypes)))throw new n(r,"Layer source does not support normalization binning")}if(e.binParameters?.stackBy&&!o.supportsStackBy)throw new n(r,"Layer source does not support stackBy binning");if(e.binParameters?.splitBy&&!o.supportsSplitBy)throw new n(r,"Layer source does not support splitBy binning");if(e.binParameters?.firstDayOfWeek&&!o.supportsFirstDayOfWeek)throw new n(r,"Layer source does not support firstDayOfWeek binning");const i=o?.supportedStatistics;if(e.outStatistics&&i){const t=new Map([["count","count"],["sum","sum"],["min","min"],["max","max"],["avg","avg"],["stddev","stddev"],["var","var"],["percentile-continuous","percentileContinuous"],["percentile-discrete","percentileDiscrete"],["centroid-aggregate","centroid"],["convex-hull-aggregate","convexHull"],["envelope-aggregate","envelope"]]);for(const{statisticType:o}of e.outStatistics){const e=t.get(o);if(e&&!i[e])throw new n(r,`Layer source does not support ${o} statistic type`)}}}function be(e,t){return null!=e&&!!t?.[x.toJSON(e)]}function he(e){return m(e)?Boolean(e.labelExpressionInfo?.expression):t(e)?!!e.expressionInfos?.some(e=>e.expression)||!!Array.isArray(e.content)&&e.content.some(e=>"expression"===e.type&&e.expressionInfo?.expression):!("dot-density"!==e.type||!e.attributes?.some(e=>e.valueExpression))||(!(!("valueExpression"in e)||!e.valueExpression)||"visualVariables"in e&&null!=e.visualVariables&&e.visualVariables.some(e=>!!e.valueExpression||"size"===e.type&&(I(e.minSize)&&e.minSize.valueExpression||I(e.maxSize)&&e.maxSize.valueExpression)))}function we(e){if("renderer"in e&&e.renderer&&he(e.renderer))return!0;if("labelingInfo"in e&&e.labelingInfo)for(const t of e.labelingInfo)if(m(t)&&he(t))return!0;return!1}async function ge(e){let t="returnZ"in e?e.returnZ:void 0,r="returnM"in e?e.returnM:void 0;if(null!=t&&null!=r)return{returnZ:t,returnM:r};if(we(e)){const{arcadeUtils:n}=await S();n.layerHasGeometryFunctions(e)&&(t??=!0,r??=!0)}if("renderer"in e&&e.renderer?.symbols)for(const n of e.renderer.symbols)"cim"===n.type&&(Ie??=(await import("../../symbols/cim/CIMSymbolHelper.js")).forEachSymbolLayer,Ie(n.data.symbol,e=>{switch(e.type){case"CIMPictureMarker":case"CIMVectorMarker":if("CIMMarkerPlacementAtMeasuredUnits"===e.markerPlacement?.type)r??=!0}}));return{returnZ:t,returnM:r}}let Ie;export{A as addAttachment,O as applyEdits,ne as checkServiceCurrentUserSupport,W as computeDomainFromSubtypes,_ as computeDomainFromTypes,ae as computeEffectiveEditingEnabled,le as createDefaultRenderer,G as createQuery,D as deleteAttachments,te as ensureCredentialIfSignedIn,re as ensureLayerCredential,T as fetchRecomputedExtents,q as geometryTypeKebabDict,H as getFeatureSubtype,de as getFeatureType,J as getFieldDomain,pe as getGlobalIdToObjectIdMap,ee as getSignedInUser,se as hasCurrentUser,N as hasDataChanged,ce as isLayerCacheStale,ge as layerRequiresGeometryZM,z as queryAttachments,B as queryExtent,k as queryFeatureCount,U as queryObjectIds,V as queryRelatedFeatures,R as queryRelatedFeaturesCount,Q as readGlobalIdField,Z as readObjectIdField,$ as readVersion,fe as supportsQueryOnly,K as typesHaveUniqueIdsAndNames,M as updateAttachment,C as uploadAssets,me as validateBinsQuery};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{id as e}from"../../kernel.js";import t from"../../request.js";import n from"../../core/Collection.js";import"../../core/urlUtils.js";import{isLayerFromCatalog as r}from"../catalog/catalogUtils.js";import{isBasemap as i}from"../../support/userTypeGuards/isBasemap.js";function u(e,t){return null!=e&&"object"==typeof e&&"type"in e&&e.type===t}function o(e){return w(e)||m(e)}function s(e){return u(e,"feature")}function
|
|
2
|
+
import{id as e}from"../../kernel.js";import t from"../../request.js";import n from"../../core/Collection.js";import"../../core/urlUtils.js";import{isLayerFromCatalog as r}from"../catalog/catalogUtils.js";import{isBasemap as i}from"../../support/userTypeGuards/isBasemap.js";function u(e,t){return null!=e&&"object"==typeof e&&"type"in e&&e.type===t}function o(e){return w(e)||m(e)}function s(e){return u(e,"feature")}function a(e){return"gaussian-splat"===e?.type}function c(e){return u(e,"oriented-imagery")}function l(e){return u(e,"catalog-footprint")}function f(e){return u(e,"graphics")}function p(e){return u(e,"map-image")}function y(e){return u(e,"map-notes")&&"sublayers"in e}function g(e){return u(e,"knowledge-graph")&&"layers"in e}function d(e){return u(e,"knowledge-graph-sublayer")}function b(e){return u(e,"link-chart")&&"layers"in e}function m(e){return u(e,"scene")}function h(e){return u(e,"subtype-group")&&"sublayers"in e}function v(e){return"subtype-sublayer"===e?.type}function w(e){const t=e?.type;return"imagery-tile"===t||"tile"===t||"open-street-map"===t||"vector-tile"===t||"web-tile"===t||"wmts"===t}function j(e){const t=e?.type;return"base-tile"===t||"tile"===t||"elevation"===t||"imagery-tile"===t||"base-elevation"===t||"open-street-map"===t||"wcs"===t||"web-tile"===t||"wmts"===t||"vector-tile"===t}function L(e){return"group"===e?.type}function S(e){const t=e.parent;return L(t)&&t.tables.includes(e)}const E={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function k(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function C(e){return"integrated-mesh"===e.type||"integrated-mesh-3dtiles"===e.type}function x(e){return"integrated-mesh-3dtiles"===e.type}function R(e){return"voxel"===e?.type}function T(e){return"imagery-tile"===e?.type}function U(e,t){return i(e?.parent)&&e.parent[t].includes(e)}function M(e){return U(e,"baseLayers")}function O(e){return U(e,"referenceLayers")}function P(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function B(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t||"annotation"===t||"dimension-feature"===t)&&"feature-layer"===e?.source?.type}function I(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}function q(e){return null!=e&&"object"==typeof e&&"featureReduction"in e}function F(e){return l(e)||s(e)&&I(e)||c(e)||v(e)}function J(e){const t=e?.type;return"binning"===t||"cluster"===t}function N(e,t){if(!F(e))return;const n=t?.graphic,r="featureReduction"in e?e.featureReduction:null;if(n){if(n.isAggregate){const e=n.origin;return e&&("featureReductionProvider"in e&&r)?J(r)?r:null:void 0}return e}return t?.checkFeatureReduction&&r?J(r)?r:null:e}function A(e){const t=/[:;]/,n=[];let r=!1;if(e&&(e.forEach((e,i)=>{n.push([i,e]),!r&&t.test(e)&&(r=!0)}),n.length>0)){let e;if(r){const t={};n.forEach(e=>{t[e[0]]=e[1]}),e=JSON.stringify(t)}else{const t=[];n.forEach(e=>{t.push(e[0]+":"+e[1])}),e=t.join(";")}return e}return null}function D(e){if(!e)return;const t=[];return e.forEach((e,n)=>{t.push('"'+n+'":'+JSON.stringify(e))}),t.length?"{"+t.join(",")+"}":void 0}function G(e){if(e.activeLayer){const t=e.activeLayer.tileMatrixSet;if(t)return t;const n=e.activeLayer.tileMatrixSets;if(n)return n}return null}async function V(n,r){const i=e?.findServerInfo(n);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const u=n.toLowerCase().indexOf("/rest/services");if(-1===u)return null;const o=`${n.slice(0,u)}/rest/info`,s=null!=r?r.signal:null,{data:a}=await t(o,{query:{f:"json"},responseType:"json",signal:s});return a?.owningSystemUrl||null}function $(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}function z(e){return null!=e&&"object"==typeof e&&"isTable"in e&&!!e.isTable}function H(e){return $(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function K(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}function Q(e){return!!K(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function W(e){if(!e)return[];return("subtypes"in e?e.subtypes:h(e.parent)?e.parent.subtypes:[])??[]}function X(e){return("imagery"===e.type||"imagery-tile"===e.type)&&"flow"===e.renderer?.type}function Y(e){const t=new n;for(const n of e.allLayers.concat(e.allTables))r(n)||S(n)||"annotation"===n.type||"dimension-feature"===n.type||("charts"in n&&t.push(n),"subtype-group"===n.type&&t.push(...n.sublayers));return t}function Z(e,t){return null}function _(e){return null}function ee(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function te(e,t){if(!t||!ee(e))return;const n=Z(e.url);n&&(e.url=n)}export{te as applyPreferredHostToPortalItem,Q as getEffectiveEditingEnabled,H as getEffectiveLayerCapabilities,N as getFieldConfigurationsContainer,Y as getLayersWithChartSupport,V as getOwningPortalUrl,_ as getPreferredHost,Z as getPreferredUrl,W as getSubtypesFromLayer,G as getTileMaxtrixSetFromActiveLayer,M as isBaseLayer,o as isBasemap3DSupportedLayer,w as isBasemapSupportedTiledLayer,P as isFeatureCollectionLayer,s as isFeatureLayer,I as isFeatureServiceLayer,a as isGaussianSplatLayer,f as isGraphicsLayer,L as isGroupLayer,T as isImageryTileLayer,x as isIntegratedMesh3DTilesLayer,C as isIntegratedMeshLayer,g as isKnowledgeGraphLayer,d as isKnowledgeGraphSublayer,$ as isLayerWithFeatureCapabilities,B as isLayerWithFeatureLayerSource,X as isLayerWithFlowRenderer,b as isLinkChartLayer,p as isMapImageLayer,y as isMapNotesLayer,ee as isPreferredUrlApplicable,O as isReferenceLayer,m as isSceneLayer,k as isSceneServiceLayer,h as isSubtypeGroupLayer,v as isSubtypeSublayer,z as isTable,j as isTiledLayer,R as isVoxelLayer,E as sceneServiceLayerTypeToClassName,A as serializeLayerDefinitions,D as serializeTimeOptions,q as supportsFeatureReduction,F as supportsFieldConfiguration};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../core/Collection.js";import t from"../../core/Error.js";import{JSONMap as
|
|
2
|
+
import e from"../../core/Collection.js";import t from"../../core/Error.js";import{JSONMap as r}from"../../core/jsonMap.js";import o from"../../geometry/SpatialReference.js";import{createFileProvider as i}from"../graphics/sources/parquet/createFileProvider.js";import n from"./Field.js";import{isNumericField as a}from"./fieldUtils.js";import{fromParquetGeometryEncodingJSON as l}from"./parquetEncodingUtils.js";import s from"./ParquetFilesData.js";const p=new r({esriGeometryPoint:"point",esriGeometryPolygon:"polygon",esriGeometryPolyline:"polyline",esriGeometryMultipoint:"multipoint"});function m(e){return p.toJSON(e)}function d(e){return p.fromJSON(e)}async function u(t,r={}){const o=Array.isArray(t)?new s({urls:new e(t)}):t,n=await y(o,r),a=i(n,null,()=>r.customParameters);return f(await a.getMetadata(),{data:o})}async function f(e,r){if(r.geometryType&&r.spatialReference&&r.geometryEncoding&&r.fields)return r;if(!e)throw new t("parquet:bad-input","No metadata found");const i={...r};if(null==i.fields&&(i.fields=e.fields.map(e=>n.fromJSON(e))),null!=i.geometryEncoding){const e=i.geometryEncoding;switch(e.type){case"wkb":{const r=i.fields.find(t=>t.name===e.field);if(!r)throw new t("parquet:unsupported",`Geometry encoding references field ${e.field} which does not exist`);if("blob"!==r.type)throw new t("parquet:unsupported",`Invalid field type for geometry encoding. Found ${r.type} but expected 'blob'`);break}case"location":for(const r of[e.xField,e.yField])if(null!=r){const e=i.fields.find(e=>e.name===r);if(!e)throw new t("parquet:unsupported",`Geometry encoding references field ${r} which does not exist`);if(!a(e))throw new t("parquet:unsupported",`Invalid field type for location geometry encoding. Found ${e.type} but expected a numeric`)}}}return null==i.geometryEncoding&&(i.geometryEncoding=e.geometryEncoding?l(e.geometryEncoding):null),i.fields=c(i.fields,e),e.displayOptimization&&(i.displayOptimization=e.displayOptimization),!i.geometryType&&e.geometryType&&(i.geometryType=d(e.geometryType)),!i.spatialReference&&e.spatialReference&&(i.spatialReference=o.fromJSON(e.spatialReference)),i}function c(e,t){const r=t.geoMetadata;if(null==r)return e;const o=new Set(Object.keys(r.columns));return e.filter(e=>!o.has(e.name))}async function y(e,r){switch(e.type){case"files":return{type:"urls",urls:e.urls.toArray()};case"portal-item":{const o=await e.portalItem.load(r);switch(o.type){case"Apache Parquet":return{type:"portal-parquet-file",itemUrl:o.itemUrl,itemCdnUrl:o.itemCdnUrl,modified:o.modified,size:o.size};case"Parquet layer":case"Parquet Layer":case"Parquet feature layer":case"Parquet Feature Layer":if(!o.url)throw new t("parquet:bad-item",`Item of type ${o.type} must have a url defined`,o);return{type:"portal-parquet-layer",itemUrl:o.itemUrl,itemCdnUrl:o.itemCdnUrl,itemMetadata:{modified:o.modified,url:o.url}};default:throw new t("parquet:bad-item",`Item of type ${o.type} is not supported`,o)}}}}export{f as completeParquetLayerInfo,y as createFileProviderSchema,d as fromParquetJSONGeometryType,u as getParquetLayerInfo,p as parquetGeometryTypeKebabDict,m as toParquetJSONGeometryType};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{rad2deg as e}from"../../core/mathUtils.js";import{subtract as t,add as r,transformMat4 as n,copy as i,min as o,max as s,sub as m}from"../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as h,create as l}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{WGS84ECEFSpatialReferenceLike as
|
|
2
|
+
import{rad2deg as e}from"../../core/mathUtils.js";import{subtract as t,add as r,transformMat4 as n,copy as i,min as o,max as s,sub as m}from"../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as h,create as l}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{WGS84ECEFSpatialReferenceLike as c}from"../../geometry/ellipsoidUtils.js";import a from"../../geometry/Extent.js";import f from"../../geometry/HeightModelInfo.js";import u from"../../geometry/SpatialReference.js";import{projectBuffer as g}from"../../geometry/projection/projectBuffer.js";const x=new u({wkid:4326,vcsWkid:115700}),d=new a(-180,-90,180,90,x);function p(e,t){if(!Array.isArray(e)||e.length<t)return!1;for(const r of e)if("number"!=typeof r)return!1;return!0}const S=7645211,R={xmin:-180,ymin:-90,zmin:-450,xmax:180,ymax:90,zmax:8850},_=new Map([[5773,new f({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"EGM96_Geoid"})],[3855,new f({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"EGM2008_Geoid"})],[115700,new f({heightModel:"ellipsoidal",heightUnit:"meters",vertCRS:"WGS_1984"})],[115701,new f({heightModel:"ellipsoidal",heightUnit:"meters",vertCRS:"ETRS_1989"})],[6360,new f({heightModel:"gravity-related-height",heightUnit:"us-feet",vertCRS:"NAVD88_height_(ftUS)"})],[7837,new f({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"DHHN2016_(height)"})],[5709,new f({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"NAP"})]]);function w(e){let t=null;return e?(_.forEach((r,n)=>{t||r.vertCRS!==e.vertCRS||r.heightUnit!==e.heightUnit||(t=n)}),t):t}function E(e){if(!e)return null;const t=e.vcsWkid||e.latestVcsWkid;return t?_.get(t):null}function b(e){return!(!(e.extensions?.ESRI_crs?.wkid||e.extensions?.ESRI_crs?.latestWkid||e.extensions?.ESRI_crs?.wkt)||!e.root?.extensions?.ESRI_crs?.boundingVolume?.box&&!e.root?.extensions?.ESRI_crs?.boundingVolume?.sphere)}function y(f,x=!1){let d=new u({wkid:4326,vcsWkid:115700}),_=f.root?.boundingVolume,w=!1,E=f?.root?.transform;if(x&&(f.extensions?.ESRI_crs?.wkid||f.extensions?.ESRI_crs?.latestWkid||f.extensions?.ESRI_crs?.wkt)&&(f.root?.extensions?.ESRI_crs?.boundingVolume?.box||f.root?.extensions?.ESRI_crs?.boundingVolume?.sphere))d=new u(f.extensions?.ESRI_crs),_=f.root?.extensions?.ESRI_crs?.boundingVolume,E=f.root?.transform,w=!0;else if(!_)return new a(-180,-90,180,90,d);if(_.box){const e=_?.box;if(e[3]>S&&e[7]>S&&e[11]>S)return new a({...R,spatialReference:d})}const b=l();if(!w&&_.region&&p(_.region,6)){const t=_.region,r=e(t[0]),n=e(t[1]),i=t[4],o=e(t[2]),s=e(t[3]),m=t[5];return new a({xmin:r,ymin:n,zmin:i,xmax:o,ymax:s,zmax:m,spatialReference:d})}if(_.sphere&&p(_.sphere,4)){const e=_.sphere,m=h(e[0],e[1],e[2]),f=e[3]/Math.sqrt(3),x=l();t(x,m,h(f,f,f));const S=l();if(r(S,m,h(f,f,f)),E&&p(E,16)){const e=E;n(b,x,e),i(x,b),n(b,S,e),i(S,b)}w||(g(x,c,0,x,u.WGS84,0),g(S,c,0,S,u.WGS84,0));const R=l(),y=l();return o(R,x,S),s(y,x,S),new a({xmin:R[0],ymin:R[1],zmin:R[2],xmax:y[0],ymax:y[1],zmax:y[2],spatialReference:d})}if(_.box&&p(_.box,12)){const e=_.box,t=h(e[0],e[1],e[2]),i=h(e[3],e[4],e[5]),f=h(e[6],e[7],e[8]),x=h(e[9],e[10],e[11]),S=[];for(let r=0;r<8;++r)S.push(l());if(r(S[0],t,i),r(S[0],S[0],f),r(S[0],S[0],x),m(S[1],t,i),r(S[1],S[1],f),r(S[1],S[1],x),r(S[2],t,i),m(S[2],S[2],f),r(S[2],S[2],x),m(S[3],t,i),m(S[3],S[3],f),r(S[3],S[3],x),r(S[4],t,i),r(S[4],S[4],f),m(S[4],S[4],x),m(S[5],t,i),r(S[5],S[5],f),m(S[5],S[5],x),r(S[6],t,i),m(S[6],S[6],f),m(S[6],S[6],x),m(S[7],t,i),m(S[7],S[7],f),m(S[7],S[7],x),E&&p(E,16)){const e=E;for(let t=0;t<8;++t)n(S[t],S[t],e)}const R=h(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),b=h(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE);for(let r=0;r<8;++r)w||g(S[r],c,0,S[r],u.WGS84,0),o(b,b,S[r]),s(R,R,S[r]);return new a({xmin:b[0],ymin:b[1],zmin:b[2],xmax:R[0],ymax:R[1],zmax:R[2],spatialReference:d})}return new a(-180,-90,180,90,d)}function v(e){return null!=e.data&&("string"==typeof e.desc&&(e.desc=JSON.parse(e.desc)),null!=e.desc)}function M(e){return`${e}`}export{d as default3DTilesFullExtent,x as default3DTilesSpatialReference,E as getHeightModelInfoFromVCS,w as getVCSFromHeightModelInfo,b as hasEsriCrs,y as initFullExtent,M as makeCacheKey,v as validateMeshData,p as verifyArray};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
function e(e){const t=e.fieldTimeMappings??[],n=e.timeValueUnits??"years",a=t.map(({fieldName:e,timeValue:r})=>` "${r}", $feature.${e},`);return`var timeFormat = "${r(n)}";\n\nvar hasCurrentStart = HasValue($view, ["timeProperties", "currentStart"]);\nvar hasCurrentEnd = HasValue($view, ["timeProperties", "currentEnd"]);\n\nvar hasCurrentTime = hasCurrentStart || hasCurrentEnd;\n\nif (!hasCurrentTime) {\n
|
|
2
|
+
function e(e){const t=e.fieldTimeMappings??[],n=e.timeValueUnits??"years",a=t.map(({fieldName:e,timeValue:r})=>` "${r}", $feature.${e},`);return`var timeFormat = "${r(n)}";\n\nvar hasCurrentStart = HasValue($view, ["timeProperties", "currentStart"]);\nvar hasCurrentEnd = HasValue($view, ["timeProperties", "currentEnd"]);\n\nvar hasCurrentTime = hasCurrentStart || hasCurrentEnd;\n\nif (!hasCurrentTime) {\n return $feature.${t[0].fieldName};\n}\n\nvar currentTime = DefaultValue($view.timeProperties.currentEnd, $view.timeProperties.currentStart);\nvar formattedCurrentTime = Text(currentTime, timeFormat);\n\nvar result = Decode(formattedCurrentTime,\n${a.join("\n")}\n null\n);\n\nreturn result;`}function r(e){switch(e){case"years":default:return"Y";case"months":return"Y-M";case"days":return"Y-M-D";case"hours":case"minutes":return"Y-M-D-H-mm";case"seconds":return"Y-M-D-H-mm-ss"}}export{e as createTimeSeriesExpression,r as getArcadeTimeFormatString};
|
package/layers/video/types.d.ts
CHANGED
|
@@ -113,4 +113,64 @@ export interface LivestreamStatus {
|
|
|
113
113
|
*
|
|
114
114
|
* @since 5.1
|
|
115
115
|
*/
|
|
116
|
-
export interface Coverage {}
|
|
116
|
+
export interface Coverage {}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Defines an object that contains metadata defining layer previews information.
|
|
120
|
+
*
|
|
121
|
+
* @since 5.1
|
|
122
|
+
*/
|
|
123
|
+
export interface PreviewsInfo {
|
|
124
|
+
/**
|
|
125
|
+
* The number of preview thumbnails in the sprite sheet.
|
|
126
|
+
*
|
|
127
|
+
* @since 5.1
|
|
128
|
+
*/
|
|
129
|
+
count: number;
|
|
130
|
+
/**
|
|
131
|
+
* The height in pixels of each preview thumbnail in the sprite sheet.
|
|
132
|
+
*
|
|
133
|
+
* @since 5.1
|
|
134
|
+
*/
|
|
135
|
+
height: number;
|
|
136
|
+
/**
|
|
137
|
+
* The time in milliseconds between each preview thumbnail in the sprite sheet.
|
|
138
|
+
*
|
|
139
|
+
* @since 5.1
|
|
140
|
+
*/
|
|
141
|
+
interval: number;
|
|
142
|
+
/**
|
|
143
|
+
* The number of columns of preview thumbnails in the sprite sheet.
|
|
144
|
+
*
|
|
145
|
+
* @since 5.1
|
|
146
|
+
*/
|
|
147
|
+
numCols: number;
|
|
148
|
+
/**
|
|
149
|
+
* The number of rows of preview thumbnails in the sprite sheet.
|
|
150
|
+
*
|
|
151
|
+
* @since 5.1
|
|
152
|
+
*/
|
|
153
|
+
numRows: number;
|
|
154
|
+
/**
|
|
155
|
+
* An array of objects containing metadata for each preview thumbnail in
|
|
156
|
+
* the sprite sheet, including the time offset of each thumbnail in
|
|
157
|
+
* milliseconds.
|
|
158
|
+
*
|
|
159
|
+
* @since 5.1
|
|
160
|
+
*/
|
|
161
|
+
thumbnailInfo: { offset: number; }[];
|
|
162
|
+
/**
|
|
163
|
+
* The URL fragment for fetching the sprite sheet containing the thumbnails.
|
|
164
|
+
* This URL is relative to the video source URL and can be used to construct
|
|
165
|
+
* the full URL to the sprite sheet.
|
|
166
|
+
*
|
|
167
|
+
* @since 5.1
|
|
168
|
+
*/
|
|
169
|
+
urlFragment: string;
|
|
170
|
+
/**
|
|
171
|
+
* The width in pixels of each preview thumbnail in the sprite sheet.
|
|
172
|
+
*
|
|
173
|
+
* @since 5.1
|
|
174
|
+
*/
|
|
175
|
+
width: number;
|
|
176
|
+
}
|
package/libs/parquet/parquet.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../core/Error.js";import{
|
|
2
|
+
import e from"../../core/Error.js";import{latitudeFieldNames as t,longitudeFieldNames as n}from"../../layers/support/locationUtils.js";import{loadParquetModule as o}from"./loadParquetModule.js";const i=new Set(["uncompressed","snappy","gzip"]),r=new Set(["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeBigInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]);function l(t,n){switch(n){case"esriGeometryPoint":return t.GeometryType.Point;case"esriGeometryPolygon":case"polygon":return t.GeometryType.Polygon;case"esriGeometryPolyline":case"polyline":return t.GeometryType.Polyline;case"esriGeometryMultipoint":case"multipoint":return t.GeometryType.Multipoint;default:throw new e("parquet",`Found unexpected GeometryType: ${n}`)}}function a(e,t){const n=t.encoding,o=l(e,t.geometryType),i=t.spatialReference.wkid;if(null==i)throw new Error("InternalError: Wkid must be defined.");switch(n.type){case"wkb":return e.GeometryField.fromWkb(n.field,i,o);case"location":{const{yField:t,xField:r}=n;return e.GeometryField.fromLocation(t,r,i,o)}}}function s(e,t){const n=e.GeometryInfo.new();t.geometry&&n.setGeometry(a(e,t.geometry));const o=t.displayOptimization;if(o){const{index:t,parentColumn:i}=o,r=e=>null!=i?[i,e].join("."):e;if("z"===t.type){const o=e.DisplayOptimizationZBuilder.new();o.setCodeField(r(t.code)),o.setXColumn(r(t.xColumn)),o.setYColumn(r(t.yColumn)),o.setCooordinatePrecision(t.coordinatePrecision),o.setFullExtent(t.fullExtent),o.setSpatialReference(t.wkid,t.wkt),o.setHasZ(!!t.zColumn),o.setHasM(!!t.mColumn),n.setOptmizationZ(o)}if("xz"===t.type){const o=l(e,t.geometryType),i=e.DisplayOptimizationXZBuilder.new();i.setCodeField(r(t.code)),i.setEncoding(t.encoding),i.setFullExtent(t.fullExtent),i.setGeometryType(o),i.setSpatialReference(t.wkid,t.wkt),i.setMaxLevel(t.maxLevel),i.setHasZ(t.hasZ??!1),i.setHasM(t.hasM??!1);for(const n of t.levels??[]){const[t,o]=n.transform.translate,[l,a]=n.transform.scale,s=new Float64Array([t,o]),u=new Float64Array([l,a]),c=r(n.column);i.addLevel(e.MultiscaleGeometryField.new(n.level,n.scale,c,s,u))}n.setOptmizationXZ(i)}}return n}async function u(t,n){const i=await o(),r=n.geometryInfo?s(i,n.geometryInfo):null,l=n.provider.fetchRange.bind(n.provider),a=n.provider.fetchLength.bind(n.provider);try{return await i.ParquetFile.fromUrl(t,l,a,r)}catch(u){throw new e("parquet","Failed to parse file",{error:u})}}function c(e){const t=e.keyValueMetadata("geo");return null!=t?JSON.parse(t):null}function p(t){if(t.keyValueMetadata("esri"))throw new e("parquet:unsupported","File was created using an unsupported experimental display index. Please regenerate the file.");const n=t.keyValueMetadata("geodisplay");if(null!=n)return JSON.parse(n);const o=t.keyValueMetadata("org.apache.spark.sql.parquet.row.metadata");if(null!=o){const t=JSON.parse(o);for(const n of t.fields)if(null!=n.metadata&&"type"in n.metadata&&("xz"===n.metadata.type||"z"===n.metadata.type)){const t={parentColumn:n.name,index:n.metadata};if("xz"===t.index.type&&(t.index.geometryType=h(t.index.geometryType),"esri-pbf"===t.index.encoding&&(t.index.encoding="esriPBF"),"esriPBF"!==t.index.encoding))throw new e("parquet:unsupported",`Encoding for display index must be of type esriPBF, but found ${t.index.encoding}`);return t}}return null}function d(e){y(e);const t=m(e),n=c(e),o=p(e),i=f(n,t);let r,l;if(i)switch(i.type){case"location":l={wkid:4326},r="esriGeometryPoint";break;case"wkb":if(n){const e=n.primary_column,t=n.columns[e];r=w(t),l=G(t)}}if(o){const e=o.index;!l&&e.wkid&&(l={wkid:e.wkid}),r||(r="z"===e.type?"esriGeometryPoint":F(e.geometryType))}return{geoMetadata:n,displayOptimization:o,geometryEncoding:i,geometryInfo:l&&r?{geometry:i?{geometryType:r,spatialReference:l,encoding:i}:null,displayOptimization:o}:null,geometryType:r,spatialReference:l,extent:P(n,o,l),fields:t}}function y(t){for(const n of t.compressionCodecs())if(!i.has(n))throw new e("parquet:unsupported",`Compression codec ${n} is unsupported. Must be of type ${Array.from(i).join(",")}`)}function m(e){return e.fields(!1).map(e=>({name:e.name,alias:e.name,type:e.type}))}function f(e,t){if(null!=e){const t=e.primary_column;return{type:"wkb",field:t,orientation:"counterclockwise"===e.columns[t].orientation?"counter-clockwise":null}}const n=g(t.filter(e=>r.has(e.type)).map(e=>e.name));return n.latitudeFieldName&&n.longitudeFieldName?{type:"location",xField:n.longitudeFieldName,yField:n.latitudeFieldName}:null}function g(e){const o=e.map(e=>e.toLowerCase());return{longitudeFieldName:e[o.indexOf(n.find(e=>o.includes(e)))],latitudeFieldName:e[o.indexOf(t.find(e=>o.includes(e)))]}}function w(t){const{geometry_types:n}=t,o=new Set;for(const e of n){const t=x(e);t&&o.add(t)}if(o.size>1)throw new e("parquet:unsupported","Parquet mixed geometry types are not supported",{geometryTypes:o});return 1===o.size?o.values().next().value:void 0}function x(e){switch(e){case"Point":return"esriGeometryPoint";case"Polygon":case"MultiPolygon":return"esriGeometryPolygon";case"LineString":return"esriGeometryPolyline";case"MultiPoint":return"esriGeometryMultipoint";default:return null}}function F(e){switch(e){case"polygon":return"esriGeometryPolygon";case"polyline":return"esriGeometryPolyline";case"multipoint":return"esriGeometryMultipoint"}}function h(t){switch(t.toLowerCase()){case"polygon":return"polygon";case"polyline":return"polyline";case"multipoint":return"multipoint";default:throw new e("parquet:unsupported",`Geometry type ${t} is unsupported`)}}function G(e){const t=e.crs?.id?.code;return t&&"number"==typeof t?{wkid:t}:void 0}function P(t,n,o){if(!o)return null;const i=t?t.columns[t.primary_column]:null,r=i?.bbox;if(r)switch(r.length){case 4:return{xmin:r[0],ymin:r[1],xmax:r[2],ymax:r[3],spatialReference:o};case 6:return{xmin:r[0],ymin:r[1],xmax:r[3],ymax:r[4],spatialReference:o};default:throw new e("parquet:protocol-violation","Invalid Geoparquet file. BoundingBox size must be 4 or 6.",{bbox:r})}const l=n?.index.fullExtent;return l?{...l,spatialReference:o}:null}export{u as createParquetFile,c as readGeoMetadata,p as readGeodisplayMetadata,d as readMetadata};
|
package/package.json
CHANGED
package/request/types.d.ts
CHANGED
|
@@ -321,7 +321,7 @@ export interface RequestParameters {
|
|
|
321
321
|
* // use the BeforeInterceptorCallback to check if the query of the
|
|
322
322
|
* // FeatureLayer has a maxAllowableOffset property set.
|
|
323
323
|
* // if so, then set the maxAllowableOffset to 0
|
|
324
|
-
* before:
|
|
324
|
+
* before: (params) => {
|
|
325
325
|
* if (params.requestOptions.query.maxAllowableOffset) {
|
|
326
326
|
* params.requestOptions.query.maxAllowableOffset = 0;
|
|
327
327
|
* }
|
|
@@ -329,7 +329,7 @@ export interface RequestParameters {
|
|
|
329
329
|
* // use the AfterInterceptorCallback to check if `ssl` is set to 'true'
|
|
330
330
|
* // on the response to the request, if it's set to 'false', change
|
|
331
331
|
* // the value to 'true' before returning the response
|
|
332
|
-
* after:
|
|
332
|
+
* after: (response) => {
|
|
333
333
|
* if (!response.ssl) {
|
|
334
334
|
* response.ssl = true;
|
|
335
335
|
* }
|
|
@@ -344,7 +344,7 @@ export interface RequestParameters {
|
|
|
344
344
|
* urls: featureLayer.url,
|
|
345
345
|
* // set the error function and check if an error occurs, and if it's name is "AbortError"
|
|
346
346
|
* // if so, display a useful error about the layer, if not, ignore the error
|
|
347
|
-
* error:
|
|
347
|
+
* error: (error) => {
|
|
348
348
|
* if (error.name == "AbortError") {
|
|
349
349
|
* // we're only interested in aborted request errors
|
|
350
350
|
* console.error(`An error happened with layer ${featureLayer.title}`, error);
|
|
@@ -415,7 +415,7 @@ export interface RequestInterceptor {
|
|
|
415
415
|
* // use the AfterInterceptorCallback to check if `ssl` is set to 'true'
|
|
416
416
|
* // on the response to the request, if it's set to 'false', change
|
|
417
417
|
* // the value to 'true' before returning the response
|
|
418
|
-
* after:
|
|
418
|
+
* after: (response) => {
|
|
419
419
|
* if (!response.ssl) {
|
|
420
420
|
* response.ssl = true;
|
|
421
421
|
* }
|
|
@@ -447,7 +447,7 @@ export type AfterInterceptorCallback = (response: RequestResponse<any>) => void;
|
|
|
447
447
|
* // use the BeforeInterceptorCallback to check if the query of the
|
|
448
448
|
* // FeatureLayer has a maxAllowableOffset property set.
|
|
449
449
|
* // if so, then set the maxAllowableOffset to 0
|
|
450
|
-
* before:
|
|
450
|
+
* before: (params) => {
|
|
451
451
|
* if (params.requestOptions.query.maxAllowableOffset) {
|
|
452
452
|
* params.requestOptions.query.maxAllowableOffset = 0;
|
|
453
453
|
* }
|
|
@@ -459,22 +459,20 @@ export type AfterInterceptorCallback = (response: RequestResponse<any>) => void;
|
|
|
459
459
|
*
|
|
460
460
|
* esriConfig.request.interceptors.push({
|
|
461
461
|
* urls: wmsLayerUrl,
|
|
462
|
-
* before:
|
|
462
|
+
* before: (params) => {
|
|
463
463
|
* if (params.url === url && params.requestOptions.responseType === "xml") {
|
|
464
|
-
*
|
|
465
|
-
*
|
|
466
|
-
*
|
|
467
|
-
*
|
|
468
|
-
*
|
|
469
|
-
*
|
|
470
|
-
*
|
|
471
|
-
*
|
|
472
|
-
*
|
|
473
|
-
*
|
|
474
|
-
*
|
|
475
|
-
*
|
|
476
|
-
* });
|
|
477
|
-
* }
|
|
464
|
+
* // decode the response as ISO-8859-1 if it's not UTF-8 as expected
|
|
465
|
+
* return fetch(url + "?SERVICE=WMS&REQUEST=GetCapabilities")
|
|
466
|
+
* .then((response) => {
|
|
467
|
+
* return response.arrayBuffer();
|
|
468
|
+
* })
|
|
469
|
+
* .then((buffer) => {
|
|
470
|
+
* let textDecoder = new TextDecoder("ISO-8859-1"); // specified in the Capabilities XML declaration
|
|
471
|
+
* let xmlText = textDecoder.decode(buffer);
|
|
472
|
+
* let parser = new DOMParser();
|
|
473
|
+
* let xml = parser.parseFromString(xmlText, "application/xml");
|
|
474
|
+
* return xml;
|
|
475
|
+
* });
|
|
478
476
|
* }
|
|
479
477
|
* }
|
|
480
478
|
* });
|
package/rest/support/Query.d.ts
CHANGED
|
@@ -846,6 +846,7 @@ export default class Query extends JSONSupport {
|
|
|
846
846
|
* @see [Graphic.statisticsAggregatedIds](https://developers.arcgis.com/javascript/latest/references/core/Graphic/#statisticsAggregatedIds)
|
|
847
847
|
* @internal
|
|
848
848
|
* @since 5.1
|
|
849
|
+
* @internal
|
|
849
850
|
* @example
|
|
850
851
|
* // query for the count of trees in each park and include the IDs of
|
|
851
852
|
* // the trees contributing to each count. The aggregateIds can then be
|
package/support/revision.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
const
|
|
2
|
+
const c="20260605",d="d14538f77f3c54bc530155c281d248a944370465";export{c as buildDate,d as commitHash};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{defaultFontFamily as t}from"../../core/fontUtils.js";import has from"../../core/has.js";import{clone as e}from"../../core/lang.js";import r from"../../core/Logger.js";import{deg2rad as s}from"../../core/mathUtils.js";import i from"../../core/ObjectPool.js";import{px2pt as n,pt2px as o}from"../../core/screenUtils.js";import{GeometryCursor as a}from"../../geometry/GeometryCursor.js";import{fromValues as l,empty as h,expandPointInPlace as c,center as m,width as f,height as u,diagonal as d,create as g}from"../../geometry/support/aaBoundingRect.js";import{getBoundsXY as p}from"../../geometry/support/boundsUtils.js";import{polygonCentroid as _}from"../../geometry/support/centroid.js";import{segmentIntersects as y}from"../../geometry/support/intersectsBase.js";import{isPolygon as P,isPolyline as S,isExtent as x,isMultipoint as w,isPoint as M}from"../../geometry/support/jsonTypeUtils.js";import{SimpleEffectCursor as b}from"./CIMEffects.js";import k from"./CIMImageColorSubstitutionHelper.js";import{getEffectOperator as T,getPlacementOperator as C}from"./CIMOperators.js";import{Placement as v}from"./CIMPlacements.js";import{defaultCIMValues as I}from"./defaultCIMValues.js";import{getFirstFrame as R}from"./imageUtils.js";import{rotate as z}from"./mathUtils.js";import{addColorStops as L}from"./rasterizingUtils.js";import U from"./Rect.js";import F from"./TextRasterizer.js";import{getNumericValue as A,isSVGImage as j,getRelativeGradientSize as G,getEffectsInflateSize as D,fromCIMFontDecoration as H,fromCIMFontStyle as E,fromCIMHorizontalAlignment as B,fromCIMVerticalAlignment as X,getFillColor as J,getStrokeColor as N,getStrokeWidth as O,getFontWeight as q,getFontStyle as V,isCIMFill as W,getSize as Y}from"./utils.js";import{destroyHiddenSvg as K,createHiddenSvg as $,createSvgElement as Q}from"../../views/2d/engine/svgUtils.js";import{magicLabelLineHeight as Z,glyphSize as tt,hittestToleranceSmallSymbol as et,hittestSmallSymbolThreshold as rt}from"../../views/2d/engine/webgl/definitions.js";import{shapeGlyphs as st}from"../../views/2d/engine/webgl/mesh/templates/shapingUtils.js";import{roundPtToWholePixel as it,getLineWidth as nt}from"../../views/2d/layers/graphics/graphicsUtils.js";const ot=Math.PI/180,at=.5,lt=()=>r.getLogger("esri.symbols.cim.CIMSymbolDrawHelper");class ht{constructor(t){this._t=t}static createIdentity(){return new ht([1,0,0,0,1,0])}clone(){const t=this._t;return new ht(t.slice())}transform(t){const e=this._t;return[e[0]*t[0]+e[1]*t[1]+e[2],e[3]*t[0]+e[4]*t[1]+e[5]]}static createScale(t,e){return new ht([t,0,0,0,e,0])}scale(t,e){const r=this._t;return r[0]*=t,r[1]*=t,r[2]*=t,r[3]*=e,r[4]*=e,r[5]*=e,this}scaleRatio(){return Math.sqrt(this._t[0]*this._t[0]+this._t[1]*this._t[1])}static createTranslate(t,e){return new ht([0,0,t,0,0,e])}translate(t,e){const r=this._t;return r[2]+=t,r[5]+=e,this}static createRotate(t){const e=Math.cos(t),r=Math.sin(t);return new ht([e,-r,0,r,e,0])}rotate(t){return ht.multiply(this,ht.createRotate(t),this)}angle(){const t=this._t[0],e=this._t[3],r=Math.sqrt(t*t+e*e);return[t/r,e/r]}static multiply(t,e,r){const s=t._t,i=e._t,n=s[0]*i[0]+s[3]*i[1],o=s[1]*i[0]+s[4]*i[1],a=s[2]*i[0]+s[5]*i[1]+i[2],l=s[0]*i[3]+s[3]*i[4],h=s[1]*i[3]+s[4]*i[4],c=s[2]*i[3]+s[5]*i[4]+i[5],m=r._t;return m[0]=n,m[1]=o,m[2]=a,m[3]=l,m[4]=h,m[5]=c,r}invert(){const t=this._t;let e=t[0]*t[4]-t[1]*t[3];if(0===e)return new ht([0,0,0,0,0,0]);e=1/e;const r=(t[1]*t[5]-t[2]*t[4])*e,s=(t[2]*t[3]-t[0]*t[5])*e,i=t[4]*e,n=-t[1]*e,o=-t[3]*e,a=t[0]*e;return new ht([i,n,r,o,a,s])}}class ct{constructor(t,e){this._resourceManager=t,this._transfos=[],this._sizeTransfos=[],this._geomUnitsPerPoint=1,this._placementPool=new i(()=>new v,void 0,void 0,100),this._earlyReturn=!1,this._mapRotation=0,this._transfos.push(e||ht.createIdentity()),this._sizeTransfos.push(e?e.scaleRatio():1)}setTransform(t,e){this._transfos=[t||ht.createIdentity()],this._sizeTransfos=[e||(t?t.scaleRatio():1)]}setGeomUnitsPerPoint(t){this._geomUnitsPerPoint=t}transformPt(t){return this._transfos[this._transfos.length-1].transform(t)}transformSize(t){return t*this._sizeTransfos[this._sizeTransfos.length-1]}reverseTransformPt(t){return this._transfos[this._transfos.length-1].invert().transform(t)}reverseTransformSize(t){return t/this._sizeTransfos[this._sizeTransfos.length-1]}reverseTransformScalar(t){return t/this._transfos[this._transfos.length-1].scaleRatio()}getTransformAngle(){return this._transfos[this._transfos.length-1].angle()}geomUnitsPerPoint(){return this.isEmbedded()?1:this._geomUnitsPerPoint}prevGeomUnitsPerPoint(){return this._transfos.length>2?1:this._geomUnitsPerPoint}isEmbedded(){return this._transfos.length>1}back(){return this._transfos[this._transfos.length-1]}push(t,e){const r=e?t.scaleRatio():1;ht.multiply(t,this.back(),t),this._transfos.push(t),this._sizeTransfos.push(this._sizeTransfos[this._sizeTransfos.length-1]*r)}pop(){this._transfos.splice(-1,1),this._sizeTransfos.splice(-1,1)}drawSymbol(t,e,r){if(t)switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":this.drawMultiLayerSymbol(t,e);break;case"CIMTextSymbol":this.drawTextSymbol(t,e,r)}}drawMultiLayerSymbol(t,e){if(!t||!e)return;const r=t.symbolLayers;if(!r)return;const s=t.effects;if(s&&s.length>0){const t=this.executeEffects(s,e);if(t){let e=t.next();for(;e;)this.drawSymbolLayers(r,e.asJSON()),e=t.next()}}else this.drawSymbolLayers(r,e)}executeEffects(t,e){const r=this.geomUnitsPerPoint(),s=null,i=D(t),n=!1;let o=new b(a.fromJSONCIM(e));for(const a of t){const t=T(a);t&&(o=t.execute(o,a,{geomUnitsPerPoint:r,tileKey:s,maxInflateSize:i,scale:null,spatialReference:e.spatialReference,preventClipping:n}))}return o}drawSymbolLayers(t,e){let r=t.length;for(;r--;){const s=t[r];if(!s||!1===s.enable)continue;const i=s.effects;if(i&&i.length>0){const t=this.executeEffects(i,e);if(t){let e=null;for(;(e=t.next())&&(this.drawSymbolLayer(s,e.asJSON()),!this._earlyReturn););}}else this.drawSymbolLayer(s,e);if(this._earlyReturn)return}}drawSymbolLayer(t,e){switch(t.type){case"CIMSolidFill":this.drawSolidFill(e,t.color,t.path);break;case"CIMHatchFill":this.drawHatchFill(e,t);break;case"CIMPictureFill":this.drawPictureFill(e,t);break;case"CIMGradientFill":this.drawGradientFill(e,t);break;case"CIMSolidStroke":this.drawSolidStroke(e,t.color,t.width,t.capStyle,t.joinStyle,t.miterLimit,t.path);break;case"CIMPictureStroke":this.drawPictureStroke(e,t);break;case"CIMGradientStroke":this.drawGradientStroke(e,t);break;case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":this.drawMarkerLayer(t,e)}}drawHatchFill(t,e){const r=dt(e,t,this.geomUnitsPerPoint());r&&(this.pushClipPath(t),this.drawMultiLayerSymbol(e.lineSymbol,r),this.popClipPath())}drawPictureFill(t,e){}drawGradientFill(t,e){}drawPictureStroke(t,e){}drawGradientStroke(t,e){}drawMarkerLayer(t,e){const r=t.markerPlacement;if(r){const s=C(r);if(s){const i="CIMMarkerPlacementInsidePolygon"===r.type||"CIMMarkerPlacementPolygonCenter"===r.type&&r.clipAtBoundary;i&&this.pushClipPath(e);const n=s.execute(a.fromJSONCIM(e),r,this.geomUnitsPerPoint(),null);if(n){let e=null;for(;(e=n.next())&&(this.drawMarker(t,e),!this._earlyReturn););}i&&this.popClipPath()}}else{const r=this._placementPool.acquire();if(M(e))r.tx=e.x,r.ty=e.y,this.drawMarker(t,r);else if(P(e)){const s=_(e);s&&([r.tx,r.ty]=s,this.drawMarker(t,r))}else if(S(e)){for(const s of e.paths)for(const e of s)if(r.tx=e[0],r.ty=e[1],this.drawMarker(t,r),this._earlyReturn)break}else for(const s of e.points)if(r.tx=s[0],r.ty=s[1],this.drawMarker(t,r),this._earlyReturn)break;this._placementPool.release(r)}}drawMarker(t,e){switch(t.type){case"CIMCharacterMarker":case"CIMPictureMarker":this.drawPictureMarker(t,e);break;case"CIMVectorMarker":this.drawVectorMarker(t,e)}}drawPictureMarker(t,e){if(!t)return;const r=this._resourceManager.getResource(t.url),s=A(t.size,I.CIMPictureMarker.size);if(null==r||s<=0)return;const i=r.width,n=r.height;if(!i||!n)return;const o=i/n,a=A(t.scaleX,1),l=ht.createIdentity(),h=t.anchorPoint;if(h){let e=h.x,r=h.y;"Absolute"!==t.anchorPointUnits&&(e*=s*o*a,r*=s),l.translate(-e,-r)}let c=A(t.rotation);t.rotateClockwise&&(c=-c),this._mapRotation&&(c+=this._mapRotation),c&&l.rotate(c*ot);let m=A(t.offsetX),f=A(t.offsetY);if(m||f){if(this._mapRotation){const t=ot*this._mapRotation,e=Math.cos(t),r=Math.sin(t),s=m*r+f*e;m=m*e-f*r,f=s}l.translate(m,f)}const u=this.geomUnitsPerPoint();1!==u&&l.scale(u,u);const d=e.getAngle();d&&l.rotate(d),l.translate(e.tx,e.ty),this.push(l,!1),this.drawImage(t,s),this.pop()}drawVectorMarker(t,e){if(!t)return;const r=t.markerGraphics;if(!r)return;const s=A(t.size,I.CIMVectorMarker.size),i=t.frame,n=i?i.ymax-i.ymin:0,o=s&&n?s/n:1,a=ht.createIdentity();i&&a.translate(.5*-(i.xmax+i.xmin),.5*-(i.ymax+i.ymin));const l=t.anchorPoint;if(l){let e=l.x,r=l.y;"Absolute"!==t.anchorPointUnits?i&&(e*=i.xmax-i.xmin,r*=i.ymax-i.ymin):(e/=o,r/=o),a.translate(-e,-r)}1!==o&&a.scale(o,o);let h=A(t.rotation);t.rotateClockwise&&(h=-h),this._mapRotation&&(h+=this._mapRotation),h&&a.rotate(h*ot);let c=A(t.offsetX),m=A(t.offsetY);if(c||m){if(this._mapRotation){const t=ot*this._mapRotation,e=Math.cos(t),r=Math.sin(t),s=c*r+m*e;c=c*e-m*r,m=s}a.translate(c,m)}const f=this.geomUnitsPerPoint();1!==f&&a.scale(f,f);const u=e.getAngle();u&&a.rotate(u),a.translate(e.tx,e.ty),this.push(a,t.scaleSymbolsProportionally);for(const d of r){d?.symbol&&d.geometry||lt().error("Invalid marker graphic",d);let t=d.textString;if("number"==typeof t&&(t=t.toString()),this.drawSymbol(d.symbol,d.geometry,t),this._earlyReturn)break}this.pop()}drawTextSymbol(t,e,r){if(!t)return;if(!M(e))return;if(A(t.height,I.CIMTextSymbol.height)<=0)return;const s=ht.createIdentity();let i=A(t.angle);i=-i,i&&s.rotate(i*ot);const n=A(t.offsetX),o=A(t.offsetY);(n||o)&&s.translate(n,o);const a=this.geomUnitsPerPoint();1!==a&&s.scale(a,a),s.translate(e.x,e.y),this.push(s,!1),this.drawText(t,r),this.pop()}}class mt extends ct{constructor(t,e){super(t,e),this.reset()}reset(){this._xmin=this._ymin=1/0,this._xmax=this._ymax=-1/0,this._clipCount=0}envelope(){return new U(this._xmin,this._ymin,this._xmax-this._xmin,this._ymax-this._ymin)}bounds(){return l(this._xmin,this._ymin,this._xmax,this._ymax)}drawSolidFill(t){if(t&&!(this._clipCount>0))if(P(t))this._processPath(t.rings,0);else if(S(t))this._processPath(t.paths,0);else if(x(t)){const e=yt(t);e&&this._processPath(e.rings,0)}else console.error("drawSolidFill Unexpected geometry type!")}drawSolidStroke(t,e,r){if(!t||this._clipCount>0||null==r||r<=0)return;const s=Math.max(.5*this.transformSize(A(r,I.CIMSolidStroke.width)),.5*at);if(P(t))this._processPath(t.rings,s);else if(S(t))this._processPath(t.paths,s);else if(x(t)){const e=yt(t);e&&this._processPath(e.rings,s)}else console.error("drawSolidStroke unexpected geometry type!")}drawMarkerLayer(t,e){P(e)&&t.markerPlacement&&("CIMMarkerPlacementInsidePolygon"===t.markerPlacement.type||"CIMMarkerPlacementPolygonCenter"===t.markerPlacement.type&&t.markerPlacement.clipAtBoundary)?this._processPath(e.rings,0):super.drawMarkerLayer(t,e)}drawHatchFill(t,e){this.drawSolidFill(t)}drawPictureFill(t,e){this.drawSolidFill(t)}drawGradientFill(t,e){this.drawSolidFill(t)}drawPictureStroke(t,e){this.drawSolidStroke(t,null,e.width)}drawGradientStroke(t,e){this.drawSolidStroke(t,null,e.width)}pushClipPath(t){this.drawSolidFill(t),this._clipCount++}popClipPath(){this._clipCount--}drawImage(t,e){const{url:r}=t,s=A(t.scaleX,1);let i=s*e,n=e;const o=this._resourceManager.getResource(r);if(null!=o){const t=o.height/o.width;i=s*(e?t>1?e:e/t:o.width),n=e?t>1?e*t:e:o.height}this._merge(this.transformPt([-i/2,-n/2]),0),this._merge(this.transformPt([-i/2,n/2]),0),this._merge(this.transformPt([i/2,-n/2]),0),this._merge(this.transformPt([i/2,n/2]),0)}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new F);const r=St(t);let[s,i]=this._textRasterizer.computeTextSize(e,r);s=n(s),i=n(i);const o=this.transformSize(1)*this.reverseTransformScalar(1);s*=o,i*=o;const a=t.horizontalAlignment??I.CIMTextSymbol.horizontalalignment,l=t.verticalAlignment??I.CIMTextSymbol.verticalalignment;let h=0;switch(a){case"Left":h=s/2;break;case"Right":h=-s/2}let c=0;switch(l){case"Bottom":c=i/2;break;case"Top":c=-i/2;break;case"Baseline":c=i/6}this._merge(this.transformPt([-s/2+h,-i/2+c]),0),this._merge(this.transformPt([-s/2+h,i/2+c]),0),this._merge(this.transformPt([s/2+h,-i/2+c]),0),this._merge(this.transformPt([s/2+h,i/2+c]),0)}_processPath(t,e){if(t)for(const r of t){const t=r?r.length:0;if(t>1){this._merge(this.transformPt(r[0]),e);for(let s=1;s<t;s++)this._merge(this.transformPt(r[s]),e)}}}_merge(t,e){t[0]-e<this._xmin&&(this._xmin=t[0]-e),t[0]+e>this._xmax&&(this._xmax=t[0]+e),t[1]-e<this._ymin&&(this._ymin=t[1]-e),t[1]+e>this._ymax&&(this._ymax=t[1]+e)}}class ft extends ct{constructor(){super(...arguments),this._hittestType="point",this._searchTarget=[],this._searchDistPoint=0,this._textInfo=null,this._svg=null,this._path=null,this._canvas=null}destroy(){this._svg=K(this._svg),this._path=null,this._canvas=null}hitTest(t,e,r,s,i,a,l,h){this._resetHittest();const c=a*o(1);switch(this.setGeomUnitsPerPoint(c),h){case"point":if(1!==t.length)return lt().error("Unexpected hittest area",t),!1;this._hittestType="point",this._searchDistPoint=l/2/c,this._searchTarget=[[t[0].x,t[0].y]];break;case"rect":if(4!==t.length)return lt().error("Unexpected hittest area",t),!1;this._hittestType="rect",this._searchDistPoint=0,this._searchTarget=t.map(t=>[t.x,t.y])}this._textInfo=s;const m=e&&("CIMPointSymbol"===e.type&&"Map"!==e.angleAlignment||"CIMTextSymbol"===e.type);if(this._mapRotation=m?i:0,!has("esri-mobile")){const t=n(et*window.devicePixelRatio),r=n(rt);!(("CIMLineSymbol"===e?.type||"CIMPolygonSymbol"===e?.type)&&e.symbolLayers?.some(W))&&"CIMMeshSymbol"!==e?.type&&(Y(e)??0)<r&&(this._searchDistPoint=t)}return this._earlyReturn=!1,this.drawSymbol(e,r),this._earlyReturn}executeEffects(t,e){return"CIMGeometricEffectDashes"===t.at(-1)?.type&&(t=t.slice(0,-1)),super.executeEffects(t,e)}drawSolidFill(t,e,r){null!=r?this._hittestSvgPath(t,r,!0):this._hitTestFill(t)}drawHatchFill(t,e){this._hitTestFill(t)}drawPictureFill(t,e){this._hitTestFill(t)}drawGradientFill(t,e){this._hitTestFill(t)}drawSolidStroke(t,e,r,s,i,n,o){null!=o?this._hittestSvgPath(t,o,!1,r):this._hitTestStroke(t,r)}drawPictureStroke(t,e){this._hitTestStroke(t,e.width)}drawGradientStroke(t,e){this._hitTestStroke(t,e.width)}drawMarkerLayer(t,e){t.markerPlacement&&("CIMMarkerPlacementInsidePolygon"===t.markerPlacement.type||"CIMMarkerPlacementPolygonCenter"===t.markerPlacement.type&&t.markerPlacement.clipAtBoundary)?this._hitTestFill(e):super.drawMarkerLayer(t,e)}pushClipPath(t){}popClipPath(){}drawImage(t,e){const{url:r}=t,s=A(t.scaleX,1),i=this._resourceManager.getResource(r);if(null==i||0===i.height||0===e)return;const n=e*this.geomUnitsPerPoint(),o=n*s*(i.width/i.height);if("point"===this._hittestType){const t=this.reverseTransformPt(this._searchTarget[0]),e=this._searchDistPoint;Math.abs(t[0])<o/2+e&&Math.abs(t[1])<n/2+e&&(this._earlyReturn=!0)}else{const t=o/2,e=n/2,r=[[-t,e],[t,e],[t,-e],[-t,-e],[-t,e]];bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,[r])&&(this._earlyReturn=!0)}}drawText(t,e){const r=this._textInfo;if(!r)return;const s=r.get(t);if(!s)return;if(!s.glyphMosaicItems.glyphs.length)return;const i=it(A(t.height,I.CIMTextSymbol.height)),{lineGapType:n,lineGap:o}=t,a=n?Pt(n,A(o),i):0,l=t.horizontalAlignment??I.CIMTextSymbol.horizontalalignment,h=t.verticalAlignment??I.CIMTextSymbol.verticalalignment,c="CIMBackgroundCallout"===t.callout?.type,m=st(s.glyphMosaicItems,{scale:i/tt,angle:0,xOffset:0,yOffset:0,horizontalAlignment:l,verticalAlignment:h,maxLineWidth:nt(t.lineWidth),lineHeight:Z*Math.max(.25,Math.min(a||1,4)),decoration:t.font.decoration||"none",useCIMAngleBehavior:!0,hasBackground:c});if("point"===this._hittestType){const t=this.reverseTransformPt(this._searchTarget[0]),e=t[0],r=t[1];for(const s of m.glyphs){const[t,i]=s.offsets.topLeft,[n,o]=s.offsets.bottomRight;if(e>t&&e<n&&r>-o&&r<-i){this._earlyReturn=!0;break}}}else for(const f of m.glyphs){const[t,e]=f.offsets.topLeft,[r,s]=f.offsets.bottomRight,i=[[t,-e],[r,-e],[r,-s],[t,-s],[t,-e]];if(bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,[i])){this._earlyReturn=!0;break}}}_hitTestFill(t){let e=null;if(x(t)){const r=t;e=[[[r.xmin,r.ymin],[r.xmin,r.ymax],[r.xmax,r.ymax],[r.xmax,r.ymin],[r.xmin,r.ymin]]]}else if(P(t))e=t.rings;else{if(!S(t))return;e=t.paths}if("point"===this._hittestType){const t=this.reverseTransformPt(this._searchTarget[0]);if(gt(t,e)&&(this._earlyReturn=!0),!this._earlyReturn){pt(t,e,this.reverseTransformScalar(this._searchDistPoint)*this.prevGeomUnitsPerPoint())&&(this._earlyReturn=!0)}}else{bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,e)&&(this._earlyReturn=!0)}}_getSvgPath(){return null!=this._svg&&null!=this._path||(this._svg??=$(),this._path??=Q("path"),this._svg.appendChild(this._path)),this._path}_getCanvasContext(t,e){return this._canvas??=document.createElement("canvas"),this._canvas.width=t,this._canvas.height=e,this._canvas.getContext("2d",{willReadFrequently:!0})}_hittestSvgPath(t,e,r,s=0){const i=g();p(i,t);const n={x:i[0],y:i[1],width:i[2]-i[0],height:i[3]-i[1]},o=this._getSvgPath();o.setAttribute("d",e);const a=o.getBBox();if("point"===this._hittestType){const t=this.reverseTransformScalar(this._searchDistPoint)*this.prevGeomUnitsPerPoint(),i=this.reverseTransformPt(this._searchTarget[0]);let o=Math.max(a.width/n.width,a.height/n.height),l=1;const h=2*t*o;h<1&&(l=2/h,o*=l,a.x*=l,a.y*=l,a.width*=l,a.height*=l);const c=1+s*o/2,m=this._getCanvasContext(a.width+2*c,a.height+2*c);m.setTransform(l,0,0,l,-a.x+c,-a.y+c);const f=new Path2D(e);r?m.fill(f):(m.lineWidth=s*(o/l),m.stroke(f));const u=(n.width*o-a.width)/2,d=(n.height*o-a.height)/2,g=Math.floor((i[0]-n.x-t)*o-u+c),p=Math.floor((n.height-(i[1]-n.y)-t)*o+d+c),_=Math.ceil(2*t*o),y=Math.ceil(2*t*o),P=m.getImageData(g,p,_,y).data;for(let e=3;e<P.length;e+=4)if(P[e]>127.5)return void(this._earlyReturn=!0)}else{const t=[[n.x,n.y],[n.x,n.y+n.height],[n.x+n.width,n.y+n.height],[n.x+n.width,n.y],[n.x,n.y]];if(bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,[t]))return void(this._earlyReturn=!0)}}_hitTestStroke(t,e){let r=null;if(x(t)){const e=t;r=[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}else if(P(t))r=t.rings;else{if(!S(t))return;r=t.paths}if("point"===this._hittestType){pt(this.reverseTransformPt(this._searchTarget[0]),r,A(e,I.CIMSolidStroke.width)*this.geomUnitsPerPoint()/2+this.reverseTransformScalar(this._searchDistPoint)*this.prevGeomUnitsPerPoint())&&(this._earlyReturn=!0)}else{bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,r)&&(this._earlyReturn=!0)}}_resetHittest(){this.setTransform(),this._hittestType="point",this._searchTarget=[],this._searchDistPoint=0,this._textInfo=null}}class ut extends ct{constructor(t,e,r,s){super(e,r),this._applyAdditionalRenderProps=s,this._colorSubstitutionHelper=new k,this._ctx=t}drawSolidFill(t,e){if(!t)return;if(P(t))this._buildPath(t.rings,!0);else if(S(t))this._buildPath(t.paths,!0);else if(x(t))this._buildPath(yt(t).rings,!0);else{if(!w(t))return;console.log("CanvasDrawHelper.drawSolidFill - No implementation!")}const r=this._ctx;r.fillStyle="string"==typeof e?e:"rgba("+Math.round(e[0])+","+Math.round(e[1])+","+Math.round(e[2])+","+(e[3]??255)/255+")",r.fill("evenodd")}drawSolidStroke(t,e,r,s,i,n){if(!t||!e||0===r)return;if(P(t))this._buildPath(t.rings,!0);else if(S(t))this._buildPath(t.paths,!1);else{if(!x(t))return void console.log("CanvasDrawHelper.drawSolidStroke isn't implemented!");this._buildPath(yt(t).rings,!0)}const o=this._ctx;o.strokeStyle="string"==typeof e?e:"rgba("+Math.round(e[0])+","+Math.round(e[1])+","+Math.round(e[2])+","+(e[3]??255)/255+")",o.lineWidth=Math.max(this.transformSize(r),at),this._setCapStyle(s),this._setJoinStyle(i),o.miterLimit=n,o.stroke()}pushClipPath(t){if(this._ctx.save(),P(t))this._buildPath(t.rings,!0);else if(S(t))this._buildPath(t.paths,!0);else{if(!x(t))return;this._buildPath(yt(t).rings,!0)}this._ctx.clip("evenodd")}popClipPath(){this._ctx.restore()}drawImage(t,e){const{colorSubstitutions:r,url:s,tintColor:i}=t,n=A(t.scaleX,1),o=this._resourceManager.getResource(s);if(null==o)return;let a=e*(o.width/o.height),l=e;e||(a=o.width,l=o.height);const h=j(s)||"src"in o&&j(o.src);let c="getFrame"in o?R(o):o;r&&(c=this._colorSubstitutionHelper.applyColorSubstitution(c,r)),this._applyAdditionalRenderProps&&!h&&i&&(c=this._colorSubstitutionHelper.tintImageData(c,i));const m=this.transformPt([0,0]),[f,u]=this.getTransformAngle(),d=this.transformSize(1),g=this._ctx;g.save(),g.setTransform({m11:n*d*f,m12:n*d*u,m21:-d*u,m22:d*f,m41:m[0],m42:m[1]}),g.drawImage(c,-a/2,-l/2,a,l),g.restore()}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new F);const r=St(t,this.transformSize(n(1))),s=this._textRasterizer.rasterizeText(e,r);if(!s)return;const{size:i,anchorX:o,anchorY:a,canvas:l}=s,h=i[0]*(o+.5),c=i[1]*(a-.5),m=this._ctx,f=this.transformPt([0,0]),[u,d]=this.getTransformAngle(),g=1;m.save(),m.setTransform({m11:g*u,m12:g*d,m21:-g*d,m22:g*u,m41:f[0]-g*h,m42:f[1]+g*c}),m.drawImage(l,0,0),m.restore()}drawPictureFill(t,e){if(!t)return;let{colorSubstitutions:r,height:s,offsetX:i,offsetY:n,rotation:o,scaleX:a,tintColor:l,url:h}=e;const c=this._resourceManager.getResource(h);if(null==c)return;if(P(t))this._buildPath(t.rings,!0);else if(S(t))this._buildPath(t.paths,!0);else if(x(t))this._buildPath(yt(t).rings,!0);else{if(!w(t))return;console.log("CanvasDrawHelper.drawPictureFill - No implementation!")}const m=this._ctx,f=j(h)||"src"in c&&j(c.src);let u,d="getFrame"in c?R(c):c;if(r&&(d=this._colorSubstitutionHelper.applyColorSubstitution(d,r)),this._applyAdditionalRenderProps){f||l&&(d=this._colorSubstitutionHelper.tintImageData(d,l)),u=m.createPattern(d,"repeat");const t=this.transformSize(1);o||(o=0),i?i*=t:i=0,n?n*=t:n=0,s&&(s*=t);const e=s?s/c.height:1,r=a&&s?a*s/c.width:1;if(0!==o||1!==e||1!==r||0!==i||0!==n){const t=new DOMMatrix;t.rotateSelf(0,0,-o).translateSelf(i,n).scaleSelf(r,e,1),u.setTransform(t)}}else u=m.createPattern(d,"repeat");m.save(),m.fillStyle=u,m.fill("evenodd"),m.restore()}drawPictureStroke(t,r){if(!t)return;let{colorSubstitutions:s,capStyle:i,joinStyle:n,miterLimit:a,tintColor:l,url:h,width:c}=r;const m=this._resourceManager.getResource(h);if(null==m)return;let f;if(P(t))f=t.rings;else if(S(t))f=t.paths;else{if(!x(t))return w(t)?void console.log("CanvasDrawHelper.drawPictureStroke - No implementation!"):void 0;f=yt(t).rings}c||(c=m.width);const u=j(h)||"src"in m&&j(m.src);let d="getFrame"in m?R(m):m;s&&(d=this._colorSubstitutionHelper.applyColorSubstitution(d,s)),this._applyAdditionalRenderProps&&(u||l&&(d=this._colorSubstitutionHelper.tintImageData(d,l)));const g=Math.max(this.transformSize(o(c)),.5),p=g/d.width,_=this._ctx,y=_.createPattern(d,"repeat-y");let M,b;_.save(),this._setCapStyle(i),this._setJoinStyle(n),void 0!==a&&(_.miterLimit=a),_.lineWidth=g;for(let o of f)if(o=e(o),wt(o),o&&!(o.length<=1)){M=this.transformPt(o[0]);for(let t=1;t<o.length;t++){b=this.transformPt(o[t]);const e=_t(M,b),r=new DOMMatrix;r.translateSelf(0,M[1]-g/2).scaleSelf(p,p,1).rotateSelf(0,0,90-e),y.setTransform(r),_.strokeStyle=y,_.beginPath(),_.moveTo(M[0],M[1]),_.lineTo(b[0],b[1]),_.stroke(),M=b}}_.restore()}drawGradientFill(t,e){if(!t)return;let r;if(P(t))r=t.rings;else if(S(t))r=t.paths;else{if(!x(t))return void lt().error("Unable to draw gradient fill");r=yt(t).rings}this._buildPath(r,!0);const{angle:i,gradientMethod:n,gradientSize:a,gradientSizeUnits:l}=e,g=I.CIMGradientFill,p=e.gradientType??g.gradientType,_=-s(i??0),y=h();for(const s of r){const t=s?s.length:0;if(t>1)for(let e=0;e<t;e++){let t=this.transformPt(s[e]);"Linear"!==n&&"Rectangular"!==n||(t=z(t,-_)),c(y,t)}}const[w,M,b,k]=y,T=this._ctx;switch(T.save(),n){case"Buffered":lt().error(`Gradient method "${n}" currently unsupported.`);break;case"Linear":{const t=(M+k)/2,r="Absolute"===l?this.transformSize(o(a)):G(a,g.gradientSize)*(b-w),[s,i]="Discrete"===p?[b,b-r]:[w+r,w],n=z([s,t],_),h=z([i,t],_),c=T.createLinearGradient(n[0],n[1],h[0],h[1]);L(c,e),T.fillStyle=c,T.fill("evenodd");break}case"Circular":{const t=m(y),r=d(y)/2,s="Absolute"===l?this.transformSize(o(a)):G(a,g.gradientSize)*r,[i,n]="Discrete"===p?[r,r-s]:[s,0],h=T.createRadialGradient(t[0],t[1],i,t[0],t[1],n);L(h,e),T.fillStyle=h,T.fill("evenodd");break}case"Rectangular":{const r=m(y),s=r[0],i=r[1],n=z(r,_),h=(r,s,i,o,a,l,h,c)=>{T.save(),this.pushClipPath(t);const m=z([a,l],_),f=z([h,c],_);T.beginPath(),T.moveTo(n[0],n[1]),T.lineTo(m[0],m[1]),T.lineTo(f[0],f[1]),T.lineTo(n[0],n[1]),T.clip();const u=z([r,s],_),d=z([i,o],_),g=T.createLinearGradient(u[0],u[1],d[0],d[1]);L(g,e),T.fillStyle=g,T.fill("evenodd"),T.restore()};let c="Absolute"===l?this.transformSize(o(a)):G(a,g.gradientSize)*(f(y)/2),[d,P]="Discrete"===p?[b,b-c]:[s+c,s];h(d,i,P,i,b,M,b,k),[d,P]="Discrete"===p?[w,w+c]:[s-c,s],h(d,i,P,i,w,k,w,M),c="Absolute"===l?this.transformSize(o(a)):G(a,g.gradientSize)*(u(y)/2);let[S,x]="Discrete"===p?[k,k-c]:[i+c,i];h(s,S,s,x,b,k,w,k),[S,x]="Discrete"===p?[M,M+c]:[i-c,i],h(s,S,s,x,w,M,b,M);break}}T.restore()}drawGradientStroke(t,r){const{capStyle:s,gradientMethod:i,gradientSize:n,gradientSizeUnits:a,joinStyle:l,miterLimit:h,width:c}=r;if(!t||0===c)return;let m;if(P(t))m=t.rings;else if(S(t))m=t.paths;else{if(!x(t))return void lt().error("Unable to draw gradient stroke");m=yt(t).rings}const f=r.gradientType??I.CIMGradientStroke.gradientType,u=Math.max(this.transformSize(o(c)),.5),d=this._ctx;let g,p;d.save(),this._setCapStyle(s),this._setJoinStyle(l),void 0!==h&&(d.miterLimit=h),d.lineWidth=u;for(let _ of m){if(_=e(_),wt(_),!_||_.length<=1)continue;let t=0;g=this.transformPt(_[0]);for(let e=1;e<_.length;e++){p=this.transformPt(_[e]);const r=p[0]-g[0],s=p[1]-g[1];t+=Math.sqrt(r*r+s*s),g=p}const s="Absolute"===a?this.transformSize(o(n)):G(n,I.CIMGradientStroke.gradientSize)*("AcrossLine"===i?u:t);let l=0;g=this.transformPt(_[0]);for(let e=1;e<_.length;e++){p=this.transformPt(_[e]);const n=p[0]-g[0],o=p[1]-g[1],a=Math.sqrt(n*n+o*o);let h,c,m,y;switch(i){case"AcrossLine":{const[t,e]=z([n/a,o/a],-Math.PI/2),r=u/2,i="Discrete"===f?r:s-r;h=(g[0]+p[0])/2+t*i,c=(g[1]+p[1])/2+e*i,m=h-t*s,y=c-e*s;break}case"AlongLine":{const e=n/a,r=o/a;"Discrete"===f?(h=g[0]-e*l,c=g[1]-r*l,m=h+e*s,y=c+r*s):(m=g[0]+e*(t-l),y=g[1]+r*(t-l),h=m-e*s,c=y-r*s);break}default:return lt().error("Unrecognized gradient method:",i),void d.restore()}const P=d.createLinearGradient(h,c,m,y);L(P,r),d.strokeStyle=P,d.beginPath(),d.moveTo(g[0],g[1]),d.lineTo(p[0],p[1]),d.stroke(),l+=a,g=p}}d.restore()}_buildPath(t,e){const r=this._ctx;if(r.beginPath(),t)for(const s of t){const t=s?s.length:0;if(t>1){let i=this.transformPt(s[0]);r.moveTo(i[0],i[1]);for(let e=1;e<t;e++)i=this.transformPt(s[e]),r.lineTo(i[0],i[1]);e&&r.closePath()}}}_setCapStyle(t){switch(t){case"Butt":this._ctx.lineCap="butt";break;case"Round":this._ctx.lineCap="round";break;case"Square":this._ctx.lineCap="square"}}_setJoinStyle(t){switch(t){case"Bevel":this._ctx.lineJoin="bevel";break;case"Round":this._ctx.lineJoin="round";break;case"Miter":this._ctx.lineJoin="miter"}}}function dt(t,e,r){let s=A(t.separation,I.CIMHatchFill.separation)*r,i=A(t.rotation);if(0===s)return null;s<0&&(s=-s);let n=0;const o=.5*s;for(;n>o;)n-=s;for(;n<-o;)n+=s;const a=g();p(a,e),a[0]-=o,a[1]-=o,a[2]+=o,a[3]+=o;const l=[[a[0],a[1]],[a[0],a[3]],[a[2],a[3]],[a[2],a[1]]];for(;i>180;)i-=180;for(;i<0;)i+=180;const h=Math.cos(i*ot),c=Math.sin(i*ot),m=-s*c,f=s*h;let u,d,_,y;n=A(t.offsetX)*r*c-A(t.offsetY)*r*h,u=_=Number.MAX_VALUE,d=y=-Number.MAX_VALUE;for(const g of l){const t=g[0],e=g[1],r=h*t+c*e,s=-c*t+h*e;u=Math.min(u,r),_=Math.min(_,s),d=Math.max(d,r),y=Math.max(y,s)}_=Math.floor(_/s)*s;let P=h*u-c*_-m*n/s,S=c*u+h*_-f*n/s,x=h*d-c*_-m*n/s,w=c*d+h*_-f*n/s;const M=1+Math.round((y-_)/s),b=[];for(let g=0;g<M;g++)P+=m,S+=f,x+=m,w+=f,b.push([[P,S],[x,w]]);return{paths:b}}function gt(t,e){let r=0;for(const s of e){const e=s.length;for(let i=1;i<e;i++){const e=s[i-1],n=s[i];if(e[1]>t[1]==n[1]>t[1])continue;(n[0]-e[0])*(t[1]-e[1])-(n[1]-e[1])*(t[0]-e[0])>0?r++:r--}}return 0!==r}function pt(t,e,r){for(const s of e){const e=s.length;for(let i=1;i<e;i++){const e=s[i-1],n=s[i];let o=(n[0]-e[0])*(n[0]-e[0])+(n[1]-e[1])*(n[1]-e[1]);if(0===o)continue;o=Math.sqrt(o);const a=((n[0]-e[0])*(t[1]-e[1])-(n[1]-e[1])*(t[0]-e[0]))/o;if(Math.abs(a)<r){const s=((n[0]-e[0])*(t[0]-e[0])+(n[1]-e[1])*(t[1]-e[1]))/o;if(s>-r&&s<o+r)return!0}}}return!1}function _t(t,e){const r=e[0]-t[0],s=e[1]-t[1];return 180/Math.PI*Math.atan2(s,r)}const yt=t=>t?{spatialReference:t.spatialReference,rings:[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]]}:null,Pt=(t,e,r)=>{switch(t){case"ExtraLeading":return 1+e/r;case"Multiple":return e;case"Exact":return e/r}};function St(e,r=1){const s=H(e),i=E(e.fontStyleName),n=e.fontFamilyName??t,{weight:o,style:a}=i,l=r*(e.height||5),h=B(e.horizontalAlignment),c=X(e.verticalAlignment),m=J(e),f=J(e.haloSymbol),u=null!=f?r*(e.haloSize??0):0,d=N(e.symbol),g=r*(O(e.symbol)||0),p="CIMBackgroundCallout"===e.callout?.type?e.callout.backgroundSymbol:null,_=J(p),y=O(p),P=N(p);return{color:m,size:l,horizontalAlignment:h,verticalAlignment:c,font:{family:n,style:V(a),weight:q(o),decoration:s},outline:{size:g||0,color:d},halo:{size:u||0,color:f,style:a},backgroundColor:_,borderLine:null!=y&&null!=P?{size:y,color:P}:null,pixelRatio:1,premultiplyColors:!0}}const xt=1e-4;function wt(t){let e,r,s,i,n,o=t[0],a=1;for(;a<t.length;)e=t[a][0]-o[0],r=t[a][1]-o[1],i=0!==e?r/e:Math.PI/2,void 0!==s&&Math.abs(i-s)<=xt?(t.splice(a-1,1),o=n):(n=o,o=t[a],a++),s=i}function Mt(t){const e=1e-6,r=t[0],s=t[t.length-1];return Math.abs(r[0]-s[0])<=e&&Math.abs(r[1]-s[1])<=e}function bt(t,e){t.length>1&&!Mt(t)&&(t=[...t,t[0]]);for(let r=0;r<e.length;r++){const s=e[r],i=s.length;for(const e of s)if(gt(e,[t]))return!0;if(Mt(s))for(const r of t)if(gt(r,e))return!0;for(let e=1;e<i;e++){const r=s[e-1],i=s[e];for(let e=0;e<t.length;e++){const s=t[e],n=t[(e+1)%t.length];if(y(r,i,s,n))return!0}}}return!1}export{ct as CIMSymbolDrawHelper,ut as CanvasDrawHelper,mt as EnvDrawHelper,ft as HittestDrawHelper,ht as Transformation,ot as cDegToRad,Pt as lineGapType2LineHeight};
|
|
2
|
+
import{defaultFontFamily as t}from"../../core/fontUtils.js";import has from"../../core/has.js";import{clone as e}from"../../core/lang.js";import r from"../../core/Logger.js";import{deg2rad as i}from"../../core/mathUtils.js";import s from"../../core/ObjectPool.js";import{px2pt as n,pt2px as a}from"../../core/screenUtils.js";import{GeometryCursor as o}from"../../geometry/GeometryCursor.js";import{fromValues as l,empty as h,expandPointInPlace as c,center as m,width as f,height as u,diagonal as d,create as g}from"../../geometry/support/aaBoundingRect.js";import{getBoundsXY as p}from"../../geometry/support/boundsUtils.js";import{polygonCentroid as _}from"../../geometry/support/centroid.js";import{segmentIntersects as y}from"../../geometry/support/intersectsBase.js";import{isPolygon as P,isPolyline as S,isExtent as x,isMultipoint as w,isPoint as M}from"../../geometry/support/jsonTypeUtils.js";import{SimpleEffectCursor as b}from"./CIMEffects.js";import T from"./CIMImageColorSubstitutionHelper.js";import{getEffectOperator as k,getPlacementOperator as C}from"./CIMOperators.js";import{Placement as v}from"./CIMPlacements.js";import{defaultCIMValues as I}from"./defaultCIMValues.js";import{getFirstFrame as R}from"./imageUtils.js";import{rotate as z}from"./mathUtils.js";import{addColorStops as L}from"./rasterizingUtils.js";import U from"./Rect.js";import F from"./TextRasterizer.js";import{getNumericValue as A,isSVGImage as j,getRelativeGradientSize as D,getEffectsInflateSize as G,fromCIMFontDecoration as H,fromCIMFontStyle as E,fromCIMHorizontalAlignment as B,fromCIMVerticalAlignment as X,getFillColor as J,getStrokeColor as N,getStrokeWidth as O,getFontWeight as q,getFontStyle as V,isCIMFill as Y,getSize as W}from"./utils.js";import{destroyHiddenSvg as K,createHiddenSvg as $,createSvgElement as Q}from"../../views/2d/engine/svgUtils.js";import{magicLabelLineHeight as Z,glyphSize as tt,hittestToleranceSmallSymbol as et,hittestSmallSymbolThreshold as rt}from"../../views/2d/engine/webgl/definitions.js";import{shapeGlyphs as it}from"../../views/2d/engine/webgl/mesh/templates/shapingUtils.js";import{roundPtToWholePixel as st,getLineWidth as nt}from"../../views/2d/layers/graphics/graphicsUtils.js";const at=Math.PI/180,ot=.5,lt=()=>r.getLogger("esri.symbols.cim.CIMSymbolDrawHelper");class ht{constructor(t){this._t=t}static createIdentity(){return new ht([1,0,0,0,1,0])}clone(){const t=this._t;return new ht(t.slice())}transform(t){const e=this._t;return[e[0]*t[0]+e[1]*t[1]+e[2],e[3]*t[0]+e[4]*t[1]+e[5]]}static createScale(t,e){return new ht([t,0,0,0,e,0])}scale(t,e){const r=this._t;return r[0]*=t,r[1]*=t,r[2]*=t,r[3]*=e,r[4]*=e,r[5]*=e,this}scaleRatio(){return Math.sqrt(this._t[0]*this._t[0]+this._t[1]*this._t[1])}static createTranslate(t,e){return new ht([0,0,t,0,0,e])}translate(t,e){const r=this._t;return r[2]+=t,r[5]+=e,this}static createRotate(t){const e=Math.cos(t),r=Math.sin(t);return new ht([e,-r,0,r,e,0])}rotate(t){return ht.multiply(this,ht.createRotate(t),this)}angle(){const t=this._t[0],e=this._t[3],r=Math.sqrt(t*t+e*e);return[t/r,e/r]}static multiply(t,e,r){const i=t._t,s=e._t,n=i[0]*s[0]+i[3]*s[1],a=i[1]*s[0]+i[4]*s[1],o=i[2]*s[0]+i[5]*s[1]+s[2],l=i[0]*s[3]+i[3]*s[4],h=i[1]*s[3]+i[4]*s[4],c=i[2]*s[3]+i[5]*s[4]+s[5],m=r._t;return m[0]=n,m[1]=a,m[2]=o,m[3]=l,m[4]=h,m[5]=c,r}invert(){const t=this._t;let e=t[0]*t[4]-t[1]*t[3];if(0===e)return new ht([0,0,0,0,0,0]);e=1/e;const r=(t[1]*t[5]-t[2]*t[4])*e,i=(t[2]*t[3]-t[0]*t[5])*e,s=t[4]*e,n=-t[1]*e,a=-t[3]*e,o=t[0]*e;return new ht([s,n,r,a,o,i])}}class ct{constructor(t,e){this._resourceManager=t,this._transfos=[],this._sizeTransfos=[],this._textScaling=[],this._geomUnitsPerPoint=1,this._placementPool=new s(()=>new v,void 0,void 0,100),this._earlyReturn=!1,this._mapRotation=0,this._transfos.push(e||ht.createIdentity()),this._sizeTransfos.push(e?e.scaleRatio():1),this._textScaling.push(1)}setTransform(t,e){this._transfos=[t||ht.createIdentity()],this._sizeTransfos=[e||(t?t.scaleRatio():1)],this._textScaling=[1]}setGeomUnitsPerPoint(t){this._geomUnitsPerPoint=t}transformPt(t){return this._transfos[this._transfos.length-1].transform(t)}transformSize(t){return t*this._sizeTransfos[this._sizeTransfos.length-1]}scaleText(t){return t*this._textScaling[this._textScaling.length-1]}reverseTransformPt(t){return this._transfos[this._transfos.length-1].invert().transform(t)}reverseTransformSize(t){return t/this._sizeTransfos[this._sizeTransfos.length-1]}reverseTransformScalar(t){return t/this._transfos[this._transfos.length-1].scaleRatio()}reverseScaleText(t){return t/this._textScaling[this._textScaling.length-1]}getTransformAngle(){return this._transfos[this._transfos.length-1].angle()}geomUnitsPerPoint(){return this.isEmbedded()?1:this._geomUnitsPerPoint}prevGeomUnitsPerPoint(){return this._transfos.length>2?1:this._geomUnitsPerPoint}isEmbedded(){return this._transfos.length>1}back(){return this._transfos[this._transfos.length-1]}push(t,e=!1,r=1){const i=e?t.scaleRatio():1;ht.multiply(t,this.back(),t),this._transfos.push(t),this._sizeTransfos.push(this._sizeTransfos[this._sizeTransfos.length-1]*i),this._textScaling.push(this._textScaling[this._textScaling.length-1]*r)}pop(){this._transfos.splice(-1,1),this._sizeTransfos.splice(-1,1),this._textScaling.splice(-1,1)}drawSymbol(t,e,r){if(t)switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":this.drawMultiLayerSymbol(t,e);break;case"CIMTextSymbol":this.drawTextSymbol(t,e,r)}}drawMultiLayerSymbol(t,e){if(!t||!e)return;const r=t.symbolLayers;if(!r)return;const i=t.effects;if(i&&i.length>0){const t=this.executeEffects(i,e);if(t){let e=t.next();for(;e;)this.drawSymbolLayers(r,e.asJSON()),e=t.next()}}else this.drawSymbolLayers(r,e)}executeEffects(t,e){const r=this.geomUnitsPerPoint(),i=null,s=G(t),n=!1;let a=new b(o.fromJSONCIM(e));for(const o of t){const t=k(o);t&&(a=t.execute(a,o,{geomUnitsPerPoint:r,tileKey:i,maxInflateSize:s,scale:null,spatialReference:e.spatialReference,preventClipping:n}))}return a}drawSymbolLayers(t,e){let r=t.length;for(;r--;){const i=t[r];if(!i||!1===i.enable)continue;const s=i.effects;if(s&&s.length>0){const t=this.executeEffects(s,e);if(t){let e=null;for(;(e=t.next())&&(this.drawSymbolLayer(i,e.asJSON()),!this._earlyReturn););}}else this.drawSymbolLayer(i,e);if(this._earlyReturn)return}}drawSymbolLayer(t,e){switch(t.type){case"CIMSolidFill":this.drawSolidFill(e,t.color,t.path);break;case"CIMHatchFill":this.drawHatchFill(e,t);break;case"CIMPictureFill":this.drawPictureFill(e,t);break;case"CIMGradientFill":this.drawGradientFill(e,t);break;case"CIMSolidStroke":this.drawSolidStroke(e,t.color,t.width,t.capStyle,t.joinStyle,t.miterLimit,t.path);break;case"CIMPictureStroke":this.drawPictureStroke(e,t);break;case"CIMGradientStroke":this.drawGradientStroke(e,t);break;case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":this.drawMarkerLayer(t,e)}}drawHatchFill(t,e){const r=dt(e,t,this.geomUnitsPerPoint());r&&(this.pushClipPath(t),this.drawMultiLayerSymbol(e.lineSymbol,r),this.popClipPath())}drawPictureFill(t,e){}drawGradientFill(t,e){}drawPictureStroke(t,e){}drawGradientStroke(t,e){}drawMarkerLayer(t,e){const r=t.markerPlacement;if(r){const i=C(r);if(i){const s="CIMMarkerPlacementInsidePolygon"===r.type||"CIMMarkerPlacementPolygonCenter"===r.type&&r.clipAtBoundary;s&&this.pushClipPath(e);const n=i.execute(o.fromJSONCIM(e),r,this.geomUnitsPerPoint(),null);if(n){let e=null;for(;(e=n.next())&&(this.drawMarker(t,e),!this._earlyReturn););}s&&this.popClipPath()}}else{const r=this._placementPool.acquire();if(M(e))r.tx=e.x,r.ty=e.y,this.drawMarker(t,r);else if(P(e)){const i=_(e);i&&([r.tx,r.ty]=i,this.drawMarker(t,r))}else if(S(e)){for(const i of e.paths)for(const e of i)if(r.tx=e[0],r.ty=e[1],this.drawMarker(t,r),this._earlyReturn)break}else for(const i of e.points)if(r.tx=i[0],r.ty=i[1],this.drawMarker(t,r),this._earlyReturn)break;this._placementPool.release(r)}}drawMarker(t,e){switch(t.type){case"CIMCharacterMarker":case"CIMPictureMarker":this.drawPictureMarker(t,e);break;case"CIMVectorMarker":this.drawVectorMarker(t,e)}}drawPictureMarker(t,e){if(!t)return;const r=this._resourceManager.getResource(t.url),i=A(t.size,I.CIMPictureMarker.size);if(null==r||i<=0)return;const s=r.width,n=r.height;if(!s||!n)return;const a=s/n,o=A(t.scaleX,1),l=ht.createIdentity(),h=t.anchorPoint;if(h){let e=h.x,r=h.y;"Absolute"!==t.anchorPointUnits&&(e*=i*a*o,r*=i),l.translate(-e,-r)}let c=A(t.rotation);t.rotateClockwise&&(c=-c),this._mapRotation&&(c+=this._mapRotation),c&&l.rotate(c*at);let m=A(t.offsetX),f=A(t.offsetY);if(m||f){if(this._mapRotation){const t=at*this._mapRotation,e=Math.cos(t),r=Math.sin(t),i=m*r+f*e;m=m*e-f*r,f=i}l.translate(m,f)}const u=this.geomUnitsPerPoint();1!==u&&l.scale(u,u);const d=e.getAngle();d&&l.rotate(d),l.translate(e.tx,e.ty),this.push(l),this.drawImage(t,i),this.pop()}drawVectorMarker(t,e){if(!t)return;const r=t.markerGraphics;if(!r)return;const i=A(t.size,I.CIMVectorMarker.size),s=t.frame,n=s?s.ymax-s.ymin:0,a=i&&n?i/n:1,o=ht.createIdentity();s&&o.translate(.5*-(s.xmax+s.xmin),.5*-(s.ymax+s.ymin));const l=t.anchorPoint;if(l){let e=l.x,r=l.y;"Absolute"!==t.anchorPointUnits?s&&(e*=s.xmax-s.xmin,r*=s.ymax-s.ymin):(e/=a,r/=a),o.translate(-e,-r)}1!==a&&o.scale(a,a);let h=A(t.rotation);t.rotateClockwise&&(h=-h),this._mapRotation&&(h+=this._mapRotation),h&&o.rotate(h*at);let c=A(t.offsetX),m=A(t.offsetY);if(c||m){if(this._mapRotation){const t=at*this._mapRotation,e=Math.cos(t),r=Math.sin(t),i=c*r+m*e;c=c*e-m*r,m=i}o.translate(c,m)}const f=this.geomUnitsPerPoint();1!==f&&o.scale(f,f);const u=e.getAngle();u&&o.rotate(u),o.translate(e.tx,e.ty);const d=t.scaleSymbolsProportionally?1:a;this.push(o,t.scaleSymbolsProportionally,d);for(const g of r){g?.symbol&&g.geometry||lt().error("Invalid marker graphic",g);let t=g.textString;if("number"==typeof t&&(t=t.toString()),this.drawSymbol(g.symbol,g.geometry,t),this._earlyReturn)break}this.pop()}drawTextSymbol(t,e,r){if(!t)return;if(!M(e))return;if(A(t.height,I.CIMTextSymbol.height)<=0)return;const i=ht.createIdentity();let s=A(t.angle);s=-s,s&&i.rotate(s*at);const n=A(t.offsetX),a=A(t.offsetY);(n||a)&&i.translate(n,a);const o=this.geomUnitsPerPoint();1!==o&&i.scale(o,o),i.translate(e.x,e.y),this.push(i),this.drawText(t,r),this.pop()}}class mt extends ct{constructor(t,e){super(t,e),this.reset()}reset(){this._xmin=this._ymin=1/0,this._xmax=this._ymax=-1/0,this._clipCount=0}envelope(){return new U(this._xmin,this._ymin,this._xmax-this._xmin,this._ymax-this._ymin)}bounds(){return l(this._xmin,this._ymin,this._xmax,this._ymax)}drawSolidFill(t){if(t&&!(this._clipCount>0))if(P(t))this._processPath(t.rings,0);else if(S(t))this._processPath(t.paths,0);else if(x(t)){const e=yt(t);e&&this._processPath(e.rings,0)}else console.error("drawSolidFill Unexpected geometry type!")}drawSolidStroke(t,e,r){if(!t||this._clipCount>0||null==r||r<=0)return;const i=Math.max(.5*this.transformSize(A(r,I.CIMSolidStroke.width)),.5*ot);if(P(t))this._processPath(t.rings,i);else if(S(t))this._processPath(t.paths,i);else if(x(t)){const e=yt(t);e&&this._processPath(e.rings,i)}else console.error("drawSolidStroke unexpected geometry type!")}drawMarkerLayer(t,e){P(e)&&t.markerPlacement&&("CIMMarkerPlacementInsidePolygon"===t.markerPlacement.type||"CIMMarkerPlacementPolygonCenter"===t.markerPlacement.type&&t.markerPlacement.clipAtBoundary)?this._processPath(e.rings,0):super.drawMarkerLayer(t,e)}drawHatchFill(t,e){this.drawSolidFill(t)}drawPictureFill(t,e){this.drawSolidFill(t)}drawGradientFill(t,e){this.drawSolidFill(t)}drawPictureStroke(t,e){this.drawSolidStroke(t,null,e.width)}drawGradientStroke(t,e){this.drawSolidStroke(t,null,e.width)}pushClipPath(t){this.drawSolidFill(t),this._clipCount++}popClipPath(){this._clipCount--}drawImage(t,e){const{url:r}=t,i=A(t.scaleX,1);let s=i*e,n=e;const a=this._resourceManager.getResource(r);if(null!=a){const t=a.height/a.width;s=i*(e?t>1?e:e/t:a.width),n=e?t>1?e*t:e:a.height}this._merge(this.transformPt([-s/2,-n/2]),0),this._merge(this.transformPt([-s/2,n/2]),0),this._merge(this.transformPt([s/2,-n/2]),0),this._merge(this.transformPt([s/2,n/2]),0)}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new F);const r=St(t);let[i,s]=this._textRasterizer.computeTextSize(e,r);i=n(i),s=n(s);const a=this.transformSize(1)*this.reverseTransformScalar(1);i*=a,s*=a;const o=t.horizontalAlignment??I.CIMTextSymbol.horizontalalignment,l=t.verticalAlignment??I.CIMTextSymbol.verticalalignment;let h=0;switch(o){case"Left":h=i/2;break;case"Right":h=-i/2}let c=0;switch(l){case"Bottom":c=s/2;break;case"Top":c=-s/2;break;case"Baseline":c=s/6}this._merge(this.transformPt([-i/2+h,-s/2+c]),0),this._merge(this.transformPt([-i/2+h,s/2+c]),0),this._merge(this.transformPt([i/2+h,-s/2+c]),0),this._merge(this.transformPt([i/2+h,s/2+c]),0)}_processPath(t,e){if(t)for(const r of t){const t=r?r.length:0;if(t>1){this._merge(this.transformPt(r[0]),e);for(let i=1;i<t;i++)this._merge(this.transformPt(r[i]),e)}}}_merge(t,e){t[0]-e<this._xmin&&(this._xmin=t[0]-e),t[0]+e>this._xmax&&(this._xmax=t[0]+e),t[1]-e<this._ymin&&(this._ymin=t[1]-e),t[1]+e>this._ymax&&(this._ymax=t[1]+e)}}class ft extends ct{constructor(){super(...arguments),this._hittestType="point",this._searchTarget=[],this._searchDistPoint=0,this._textInfo=null,this._svg=null,this._path=null,this._canvas=null}destroy(){this._svg=K(this._svg),this._path=null,this._canvas=null}hitTest(t,e,r,i){const{textInfo:s,mapRotation:o,resolution:l,searchDist:h,hittestType:c,isScreenAligned:m}=i;this._resetHittest();const f=l*a(1);switch(this.setGeomUnitsPerPoint(f),c){case"point":if(1!==t.length)return lt().error("Unexpected hittest area",t),!1;this._hittestType="point",this._searchDistPoint=h/2/f,this._searchTarget=[[t[0].x,t[0].y]];break;case"rect":if(4!==t.length)return lt().error("Unexpected hittest area",t),!1;this._hittestType="rect",this._searchDistPoint=0,this._searchTarget=t.map(t=>[t.x,t.y])}if(this._textInfo=s,this._mapRotation=m?o:0,!has("esri-mobile")){const t=n(et*window.devicePixelRatio),r=n(rt);!(("CIMLineSymbol"===e?.type||"CIMPolygonSymbol"===e?.type)&&e.symbolLayers?.some(Y))&&"CIMMeshSymbol"!==e?.type&&(W(e)??0)<r&&(this._searchDistPoint=t)}return this._earlyReturn=!1,this.drawSymbol(e,r),this._earlyReturn}executeEffects(t,e){return"CIMGeometricEffectDashes"===t.at(-1)?.type&&(t=t.slice(0,-1)),super.executeEffects(t,e)}drawSolidFill(t,e,r){null!=r?this._hittestSvgPath(t,r,!0):this._hitTestFill(t)}drawHatchFill(t,e){this._hitTestFill(t)}drawPictureFill(t,e){this._hitTestFill(t)}drawGradientFill(t,e){this._hitTestFill(t)}drawSolidStroke(t,e,r,i,s,n,a){null!=a?this._hittestSvgPath(t,a,!1,r):this._hitTestStroke(t,r)}drawPictureStroke(t,e){this._hitTestStroke(t,e.width)}drawGradientStroke(t,e){this._hitTestStroke(t,e.width)}drawMarkerLayer(t,e){t.markerPlacement&&("CIMMarkerPlacementInsidePolygon"===t.markerPlacement.type||"CIMMarkerPlacementPolygonCenter"===t.markerPlacement.type&&t.markerPlacement.clipAtBoundary)?this._hitTestFill(e):super.drawMarkerLayer(t,e)}drawTextSymbol(t,e,r){if(!t||!M(e))return;if(A(t.height,I.CIMTextSymbol.height)<=0)return;const i=ht.createIdentity(),s=this.geomUnitsPerPoint();1!==s&&i.scale(s,s),i.translate(e.x,e.y),this.push(i),this.drawText(t,r),this.pop()}pushClipPath(t){}popClipPath(){}drawImage(t,e){const{url:r}=t,i=A(t.scaleX,1),s=this._resourceManager.getResource(r);if(null==s||0===s.height||0===e)return;const n=e*this.geomUnitsPerPoint(),a=n*i*(s.width/s.height);if("point"===this._hittestType){const t=this.reverseTransformPt(this._searchTarget[0]),e=this._searchDistPoint;Math.abs(t[0])<a/2+e&&Math.abs(t[1])<n/2+e&&(this._earlyReturn=!0)}else{const t=a/2,e=n/2,r=[[-t,e],[t,e],[t,-e],[-t,-e],[-t,e]];bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,[r])&&(this._earlyReturn=!0)}}drawText(t,e){const r=this._textInfo;if(!r)return;const i=r.get(t);if(!i)return;if(!i.glyphMosaicItems.glyphs.length)return;const s=st(A(t.height,I.CIMTextSymbol.height)),{lineGapType:n,lineGap:a}=t,o=n?Pt(n,A(a),s):0,l=t.horizontalAlignment??I.CIMTextSymbol.horizontalalignment,h=t.verticalAlignment??I.CIMTextSymbol.verticalalignment,c="CIMBackgroundCallout"===t.callout?.type,m=it(i.glyphMosaicItems,{scale:s/tt,angle:A(t.angle),xOffset:A(t.offsetX),yOffset:A(t.offsetY),horizontalAlignment:l,verticalAlignment:h,maxLineWidth:nt(t.lineWidth),lineHeight:Z*Math.max(.25,Math.min(o||1,4)),decoration:t.font.decoration||"none",useCIMAngleBehavior:!1,hasBackground:c}),f=this.reverseScaleText(1);for(const u of m.glyphs){const t=u.offsets,e=[[t.topLeft[0]*f,-t.topLeft[1]*f],[t.topRight[0]*f,-t.topRight[1]*f],[t.bottomRight[0]*f,-t.bottomRight[1]*f],[t.bottomLeft[0]*f,-t.bottomLeft[1]*f],[t.topLeft[0]*f,-t.topLeft[1]*f]];if("point"===this._hittestType){gt(this.reverseTransformPt(this._searchTarget[0]),[e])&&(this._earlyReturn=!0)}else{bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,[e])&&(this._earlyReturn=!0)}}}_hitTestFill(t){let e=null;if(x(t)){const r=t;e=[[[r.xmin,r.ymin],[r.xmin,r.ymax],[r.xmax,r.ymax],[r.xmax,r.ymin],[r.xmin,r.ymin]]]}else if(P(t))e=t.rings;else{if(!S(t))return;e=t.paths}if("point"===this._hittestType){const t=this.reverseTransformPt(this._searchTarget[0]);if(gt(t,e)&&(this._earlyReturn=!0),!this._earlyReturn){pt(t,e,this.reverseTransformScalar(this._searchDistPoint)*this.prevGeomUnitsPerPoint())&&(this._earlyReturn=!0)}}else{bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,e)&&(this._earlyReturn=!0)}}_getSvgPath(){return null!=this._svg&&null!=this._path||(this._svg??=$(),this._path??=Q("path"),this._svg.appendChild(this._path)),this._path}_getCanvasContext(t,e){return this._canvas??=document.createElement("canvas"),this._canvas.width=t,this._canvas.height=e,this._canvas.getContext("2d",{willReadFrequently:!0})}_hittestSvgPath(t,e,r,i=0){const s=g();p(s,t);const n={x:s[0],y:s[1],width:s[2]-s[0],height:s[3]-s[1]},a=this._getSvgPath();a.setAttribute("d",e);const o=a.getBBox();if("point"===this._hittestType){const t=this.reverseTransformScalar(this._searchDistPoint)*this.prevGeomUnitsPerPoint(),s=this.reverseTransformPt(this._searchTarget[0]);let a=Math.max(o.width/n.width,o.height/n.height),l=1;const h=2*t*a;h<1&&(l=2/h,a*=l,o.x*=l,o.y*=l,o.width*=l,o.height*=l);const c=1+i*a/2,m=this._getCanvasContext(o.width+2*c,o.height+2*c);m.setTransform(l,0,0,l,-o.x+c,-o.y+c);const f=new Path2D(e);r?m.fill(f):(m.lineWidth=i*(a/l),m.stroke(f));const u=(n.width*a-o.width)/2,d=(n.height*a-o.height)/2,g=Math.floor((s[0]-n.x-t)*a-u+c),p=Math.floor((n.height-(s[1]-n.y)-t)*a+d+c),_=Math.ceil(2*t*a),y=Math.ceil(2*t*a),P=m.getImageData(g,p,_,y).data;for(let e=3;e<P.length;e+=4)if(P[e]>127.5)return void(this._earlyReturn=!0)}else{const t=[[n.x,n.y],[n.x,n.y+n.height],[n.x+n.width,n.y+n.height],[n.x+n.width,n.y],[n.x,n.y]];if(bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,[t]))return void(this._earlyReturn=!0)}}_hitTestStroke(t,e){let r=null;if(x(t)){const e=t;r=[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}else if(P(t))r=t.rings;else{if(!S(t))return;r=t.paths}if("point"===this._hittestType){pt(this.reverseTransformPt(this._searchTarget[0]),r,A(e,I.CIMSolidStroke.width)*this.geomUnitsPerPoint()/2+this.reverseTransformScalar(this._searchDistPoint)*this.prevGeomUnitsPerPoint())&&(this._earlyReturn=!0)}else{bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,r)&&(this._earlyReturn=!0)}}_resetHittest(){this.setTransform(),this._hittestType="point",this._searchTarget=[],this._searchDistPoint=0,this._textInfo=null}}class ut extends ct{constructor(t,e,r,i){super(e,r),this._applyAdditionalRenderProps=i,this._colorSubstitutionHelper=new T,this._ctx=t}drawSolidFill(t,e){if(!t)return;if(P(t))this._buildPath(t.rings,!0);else if(S(t))this._buildPath(t.paths,!0);else if(x(t))this._buildPath(yt(t).rings,!0);else{if(!w(t))return;console.log("CanvasDrawHelper.drawSolidFill - No implementation!")}const r=this._ctx;r.fillStyle="string"==typeof e?e:"rgba("+Math.round(e[0])+","+Math.round(e[1])+","+Math.round(e[2])+","+(e[3]??255)/255+")",r.fill("evenodd")}drawSolidStroke(t,e,r,i,s,n){if(!t||!e||0===r)return;if(P(t))this._buildPath(t.rings,!0);else if(S(t))this._buildPath(t.paths,!1);else{if(!x(t))return void console.log("CanvasDrawHelper.drawSolidStroke isn't implemented!");this._buildPath(yt(t).rings,!0)}const a=this._ctx;a.strokeStyle="string"==typeof e?e:"rgba("+Math.round(e[0])+","+Math.round(e[1])+","+Math.round(e[2])+","+(e[3]??255)/255+")",a.lineWidth=Math.max(this.transformSize(r),ot),this._setCapStyle(i),this._setJoinStyle(s),a.miterLimit=n,a.stroke()}pushClipPath(t){if(this._ctx.save(),P(t))this._buildPath(t.rings,!0);else if(S(t))this._buildPath(t.paths,!0);else{if(!x(t))return;this._buildPath(yt(t).rings,!0)}this._ctx.clip("evenodd")}popClipPath(){this._ctx.restore()}drawImage(t,e){const{colorSubstitutions:r,url:i,tintColor:s}=t,n=A(t.scaleX,1),a=this._resourceManager.getResource(i);if(null==a)return;let o=e*(a.width/a.height),l=e;e||(o=a.width,l=a.height);const h=j(i)||"src"in a&&j(a.src);let c="getFrame"in a?R(a):a;r&&(c=this._colorSubstitutionHelper.applyColorSubstitution(c,r)),this._applyAdditionalRenderProps&&!h&&s&&(c=this._colorSubstitutionHelper.tintImageData(c,s));const m=this.transformPt([0,0]),[f,u]=this.getTransformAngle(),d=this.transformSize(1),g=this._ctx;g.save(),g.setTransform({m11:n*d*f,m12:n*d*u,m21:-d*u,m22:d*f,m41:m[0],m42:m[1]}),g.drawImage(c,-o/2,-l/2,o,l),g.restore()}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new F);const r=St(t,this.transformSize(n(1))),i=this._textRasterizer.rasterizeText(e,r);if(!i)return;const{size:s,anchorX:a,anchorY:o,canvas:l}=i,h=s[0]*(a+.5),c=s[1]*(o-.5),m=this._ctx,f=this.transformPt([0,0]),[u,d]=this.getTransformAngle(),g=1;m.save(),m.setTransform({m11:g*u,m12:g*d,m21:-g*d,m22:g*u,m41:f[0]-g*h,m42:f[1]+g*c}),m.drawImage(l,0,0),m.restore()}drawPictureFill(t,e){if(!t)return;let{colorSubstitutions:r,height:i,offsetX:s,offsetY:n,rotation:a,scaleX:o,tintColor:l,url:h}=e;const c=this._resourceManager.getResource(h);if(null==c)return;if(P(t))this._buildPath(t.rings,!0);else if(S(t))this._buildPath(t.paths,!0);else if(x(t))this._buildPath(yt(t).rings,!0);else{if(!w(t))return;console.log("CanvasDrawHelper.drawPictureFill - No implementation!")}const m=this._ctx,f=j(h)||"src"in c&&j(c.src);let u,d="getFrame"in c?R(c):c;if(r&&(d=this._colorSubstitutionHelper.applyColorSubstitution(d,r)),this._applyAdditionalRenderProps){f||l&&(d=this._colorSubstitutionHelper.tintImageData(d,l)),u=m.createPattern(d,"repeat");const t=this.transformSize(1);a||(a=0),s?s*=t:s=0,n?n*=t:n=0,i&&(i*=t);const e=i?i/c.height:1,r=o&&i?o*i/c.width:1;if(0!==a||1!==e||1!==r||0!==s||0!==n){const t=new DOMMatrix;t.rotateSelf(0,0,-a).translateSelf(s,n).scaleSelf(r,e,1),u.setTransform(t)}}else u=m.createPattern(d,"repeat");m.save(),m.fillStyle=u,m.fill("evenodd"),m.restore()}drawPictureStroke(t,r){if(!t)return;let{colorSubstitutions:i,capStyle:s,joinStyle:n,miterLimit:o,tintColor:l,url:h,width:c}=r;const m=this._resourceManager.getResource(h);if(null==m)return;let f;if(P(t))f=t.rings;else if(S(t))f=t.paths;else{if(!x(t))return w(t)?void console.log("CanvasDrawHelper.drawPictureStroke - No implementation!"):void 0;f=yt(t).rings}c||(c=m.width);const u=j(h)||"src"in m&&j(m.src);let d="getFrame"in m?R(m):m;i&&(d=this._colorSubstitutionHelper.applyColorSubstitution(d,i)),this._applyAdditionalRenderProps&&(u||l&&(d=this._colorSubstitutionHelper.tintImageData(d,l)));const g=Math.max(this.transformSize(a(c)),.5),p=g/d.width,_=this._ctx,y=_.createPattern(d,"repeat-y");let M,b;_.save(),this._setCapStyle(s),this._setJoinStyle(n),void 0!==o&&(_.miterLimit=o),_.lineWidth=g;for(let a of f)if(a=e(a),wt(a),a&&!(a.length<=1)){M=this.transformPt(a[0]);for(let t=1;t<a.length;t++){b=this.transformPt(a[t]);const e=_t(M,b),r=new DOMMatrix;r.translateSelf(0,M[1]-g/2).scaleSelf(p,p,1).rotateSelf(0,0,90-e),y.setTransform(r),_.strokeStyle=y,_.beginPath(),_.moveTo(M[0],M[1]),_.lineTo(b[0],b[1]),_.stroke(),M=b}}_.restore()}drawGradientFill(t,e){if(!t)return;let r;if(P(t))r=t.rings;else if(S(t))r=t.paths;else{if(!x(t))return void lt().error("Unable to draw gradient fill");r=yt(t).rings}this._buildPath(r,!0);const{angle:s,gradientMethod:n,gradientSize:o,gradientSizeUnits:l}=e,g=I.CIMGradientFill,p=e.gradientType??g.gradientType,_=-i(s??0),y=h();for(const i of r){const t=i?i.length:0;if(t>1)for(let e=0;e<t;e++){let t=this.transformPt(i[e]);"Linear"!==n&&"Rectangular"!==n||(t=z(t,-_)),c(y,t)}}const[w,M,b,T]=y,k=this._ctx;switch(k.save(),n){case"Buffered":lt().error(`Gradient method "${n}" currently unsupported.`);break;case"Linear":{const t=(M+T)/2,r="Absolute"===l?this.transformSize(a(o)):D(o,g.gradientSize)*(b-w),[i,s]="Discrete"===p?[b,b-r]:[w+r,w],n=z([i,t],_),h=z([s,t],_),c=k.createLinearGradient(n[0],n[1],h[0],h[1]);L(c,e),k.fillStyle=c,k.fill("evenodd");break}case"Circular":{const t=m(y),r=d(y)/2,i="Absolute"===l?this.transformSize(a(o)):D(o,g.gradientSize)*r,[s,n]="Discrete"===p?[r,r-i]:[i,0],h=k.createRadialGradient(t[0],t[1],s,t[0],t[1],n);L(h,e),k.fillStyle=h,k.fill("evenodd");break}case"Rectangular":{const r=m(y),i=r[0],s=r[1],n=z(r,_),h=(r,i,s,a,o,l,h,c)=>{k.save(),this.pushClipPath(t);const m=z([o,l],_),f=z([h,c],_);k.beginPath(),k.moveTo(n[0],n[1]),k.lineTo(m[0],m[1]),k.lineTo(f[0],f[1]),k.lineTo(n[0],n[1]),k.clip();const u=z([r,i],_),d=z([s,a],_),g=k.createLinearGradient(u[0],u[1],d[0],d[1]);L(g,e),k.fillStyle=g,k.fill("evenodd"),k.restore()};let c="Absolute"===l?this.transformSize(a(o)):D(o,g.gradientSize)*(f(y)/2),[d,P]="Discrete"===p?[b,b-c]:[i+c,i];h(d,s,P,s,b,M,b,T),[d,P]="Discrete"===p?[w,w+c]:[i-c,i],h(d,s,P,s,w,T,w,M),c="Absolute"===l?this.transformSize(a(o)):D(o,g.gradientSize)*(u(y)/2);let[S,x]="Discrete"===p?[T,T-c]:[s+c,s];h(i,S,i,x,b,T,w,T),[S,x]="Discrete"===p?[M,M+c]:[s-c,s],h(i,S,i,x,w,M,b,M);break}}k.restore()}drawGradientStroke(t,r){const{capStyle:i,gradientMethod:s,gradientSize:n,gradientSizeUnits:o,joinStyle:l,miterLimit:h,width:c}=r;if(!t||0===c)return;let m;if(P(t))m=t.rings;else if(S(t))m=t.paths;else{if(!x(t))return void lt().error("Unable to draw gradient stroke");m=yt(t).rings}const f=r.gradientType??I.CIMGradientStroke.gradientType,u=Math.max(this.transformSize(a(c)),.5),d=this._ctx;let g,p;d.save(),this._setCapStyle(i),this._setJoinStyle(l),void 0!==h&&(d.miterLimit=h),d.lineWidth=u;for(let _ of m){if(_=e(_),wt(_),!_||_.length<=1)continue;let t=0;g=this.transformPt(_[0]);for(let e=1;e<_.length;e++){p=this.transformPt(_[e]);const r=p[0]-g[0],i=p[1]-g[1];t+=Math.sqrt(r*r+i*i),g=p}const i="Absolute"===o?this.transformSize(a(n)):D(n,I.CIMGradientStroke.gradientSize)*("AcrossLine"===s?u:t);let l=0;g=this.transformPt(_[0]);for(let e=1;e<_.length;e++){p=this.transformPt(_[e]);const n=p[0]-g[0],a=p[1]-g[1],o=Math.sqrt(n*n+a*a);let h,c,m,y;switch(s){case"AcrossLine":{const[t,e]=z([n/o,a/o],-Math.PI/2),r=u/2,s="Discrete"===f?r:i-r;h=(g[0]+p[0])/2+t*s,c=(g[1]+p[1])/2+e*s,m=h-t*i,y=c-e*i;break}case"AlongLine":{const e=n/o,r=a/o;"Discrete"===f?(h=g[0]-e*l,c=g[1]-r*l,m=h+e*i,y=c+r*i):(m=g[0]+e*(t-l),y=g[1]+r*(t-l),h=m-e*i,c=y-r*i);break}default:return lt().error("Unrecognized gradient method:",s),void d.restore()}const P=d.createLinearGradient(h,c,m,y);L(P,r),d.strokeStyle=P,d.beginPath(),d.moveTo(g[0],g[1]),d.lineTo(p[0],p[1]),d.stroke(),l+=o,g=p}}d.restore()}_buildPath(t,e){const r=this._ctx;if(r.beginPath(),t)for(const i of t){const t=i?i.length:0;if(t>1){let s=this.transformPt(i[0]);r.moveTo(s[0],s[1]);for(let e=1;e<t;e++)s=this.transformPt(i[e]),r.lineTo(s[0],s[1]);e&&r.closePath()}}}_setCapStyle(t){switch(t){case"Butt":this._ctx.lineCap="butt";break;case"Round":this._ctx.lineCap="round";break;case"Square":this._ctx.lineCap="square"}}_setJoinStyle(t){switch(t){case"Bevel":this._ctx.lineJoin="bevel";break;case"Round":this._ctx.lineJoin="round";break;case"Miter":this._ctx.lineJoin="miter"}}}function dt(t,e,r){let i=A(t.separation,I.CIMHatchFill.separation)*r,s=A(t.rotation);if(0===i)return null;i<0&&(i=-i);let n=0;const a=.5*i;for(;n>a;)n-=i;for(;n<-a;)n+=i;const o=g();p(o,e),o[0]-=a,o[1]-=a,o[2]+=a,o[3]+=a;const l=[[o[0],o[1]],[o[0],o[3]],[o[2],o[3]],[o[2],o[1]]];for(;s>180;)s-=180;for(;s<0;)s+=180;const h=Math.cos(s*at),c=Math.sin(s*at),m=-i*c,f=i*h;let u,d,_,y;n=A(t.offsetX)*r*c-A(t.offsetY)*r*h,u=_=Number.MAX_VALUE,d=y=-Number.MAX_VALUE;for(const g of l){const t=g[0],e=g[1],r=h*t+c*e,i=-c*t+h*e;u=Math.min(u,r),_=Math.min(_,i),d=Math.max(d,r),y=Math.max(y,i)}_=Math.floor(_/i)*i;let P=h*u-c*_-m*n/i,S=c*u+h*_-f*n/i,x=h*d-c*_-m*n/i,w=c*d+h*_-f*n/i;const M=1+Math.round((y-_)/i),b=[];for(let g=0;g<M;g++)P+=m,S+=f,x+=m,w+=f,b.push([[P,S],[x,w]]);return{paths:b}}function gt(t,e){let r=0;for(const i of e){const e=i.length;for(let s=1;s<e;s++){const e=i[s-1],n=i[s];if(e[1]>t[1]==n[1]>t[1])continue;(n[0]-e[0])*(t[1]-e[1])-(n[1]-e[1])*(t[0]-e[0])>0?r++:r--}}return 0!==r}function pt(t,e,r){for(const i of e){const e=i.length;for(let s=1;s<e;s++){const e=i[s-1],n=i[s];let a=(n[0]-e[0])*(n[0]-e[0])+(n[1]-e[1])*(n[1]-e[1]);if(0===a)continue;a=Math.sqrt(a);const o=((n[0]-e[0])*(t[1]-e[1])-(n[1]-e[1])*(t[0]-e[0]))/a;if(Math.abs(o)<r){const i=((n[0]-e[0])*(t[0]-e[0])+(n[1]-e[1])*(t[1]-e[1]))/a;if(i>-r&&i<a+r)return!0}}}return!1}function _t(t,e){const r=e[0]-t[0],i=e[1]-t[1];return 180/Math.PI*Math.atan2(i,r)}const yt=t=>t?{spatialReference:t.spatialReference,rings:[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]]}:null,Pt=(t,e,r)=>{switch(t){case"ExtraLeading":return 1+e/r;case"Multiple":return e;case"Exact":return e/r}};function St(e,r=1){const i=H(e),s=E(e.fontStyleName),n=e.fontFamilyName??t,{weight:a,style:o}=s,l=r*(e.height||5),h=B(e.horizontalAlignment),c=X(e.verticalAlignment),m=J(e),f=J(e.haloSymbol),u=null!=f?r*(e.haloSize??0):0,d=N(e.symbol),g=r*(O(e.symbol)||0),p="CIMBackgroundCallout"===e.callout?.type?e.callout.backgroundSymbol:null,_=J(p),y=O(p),P=N(p);return{color:m,size:l,horizontalAlignment:h,verticalAlignment:c,font:{family:n,style:V(o),weight:q(a),decoration:i},outline:{size:g||0,color:d},halo:{size:u||0,color:f,style:o},backgroundColor:_,borderLine:null!=y&&null!=P?{size:y,color:P}:null,pixelRatio:1,premultiplyColors:!0}}const xt=1e-4;function wt(t){let e,r,i,s,n,a=t[0],o=1;for(;o<t.length;)e=t[o][0]-a[0],r=t[o][1]-a[1],s=0!==e?r/e:Math.PI/2,void 0!==i&&Math.abs(s-i)<=xt?(t.splice(o-1,1),a=n):(n=a,a=t[o],o++),i=s}function Mt(t){const e=1e-6,r=t[0],i=t[t.length-1];return Math.abs(r[0]-i[0])<=e&&Math.abs(r[1]-i[1])<=e}function bt(t,e){t.length>1&&!Mt(t)&&(t=[...t,t[0]]);for(let r=0;r<e.length;r++){const i=e[r],s=i.length;for(const e of i)if(gt(e,[t]))return!0;if(Mt(i))for(const r of t)if(gt(r,e))return!0;for(let e=1;e<s;e++){const r=i[e-1],s=i[e];for(let e=0;e<t.length;e++){const i=t[e],n=t[(e+1)%t.length];if(y(r,s,i,n))return!0}}}return!1}export{ct as CIMSymbolDrawHelper,ut as CanvasDrawHelper,mt as EnvDrawHelper,ft as HittestDrawHelper,ht as Transformation,at as cDegToRad,Pt as lineGapType2LineHeight};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t,__param as e}from"tslib";import{animationDebugFlags as i}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{location as s,input as o,ComputeVertexInput as l}from"../../GraphShaderModule.js";import{Vec2 as r,Float as a,Vec4 as n,ifElse as d,or as u,Bool as m,mix as p,Mat3 as h,lessThan as c,
|
|
2
|
+
import{__decorate as t,__param as e}from"tslib";import{animationDebugFlags as i}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{location as s,input as o,ComputeVertexInput as l}from"../../GraphShaderModule.js";import{Vec2 as r,Float as a,Vec4 as n,ifElse as d,or as u,Bool as m,mix as p,Mat3 as h,lessThan as c,Vec3 as x,distance as y,greaterThan as w,negate as f}from"../../graph/glsl.js";import{AAnimatedVertexInput as g,AAnimatedShader as v,getValue as b,AAnimatedFragmentInput as S}from"./AAnimatedShader.js";import{MarkerConstants as _}from"../markers/markerConstants.js";import{trueHit as V,noHit as z}from"../shaders/constants.js";import{isRectHittest as C,hittestMarkerScreenRect as P,distPointTriangle as N,xyToBarycentric as k,inTriangle as R}from"../shaders/hittestUtils.js";import{getBitBool as M}from"../shaders/utils.js";import{getVisualVariableColor as D,getVisualVariableOpacity as j}from"../shaders/vvUtils.js";class q extends g{}t([s(9,r)],q.prototype,"uv",void 0),t([s(10,a)],q.prototype,"angle",void 0);class F extends l{}t([s(11,r)],F.prototype,"offsetNextVertex1",void 0),t([s(12,r)],F.prototype,"offsetNextVertex2",void 0),t([s(13,r)],F.prototype,"textureUVNextVertex1",void 0),t([s(14,r)],F.prototype,"textureUVNextVertex2",void 0);class T extends S{}function U(t,e,i,s){return e.multiply(t.x).add(i.multiply(t.y)).add(s.multiply(t.z))}class A extends v{constructor(){super(...arguments),this.type="AnimatedMarkerShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"],uv:["textureUVNextVertex1","textureUVNextVertex2"]}}vertex(t,e){const i=t.uv.divide(this.mosaicInfo.size),{position:s,animationPointer:o,evalParams:l,isOutline:r,unscaledDistanceToPx:c,vvScale:x,strokeWidth:y,scaleSymbolsProportionally:w,scale:f,isSDF:g,baseSize:v,clip:S}=this._vertexPreamble(t,t.angle,t.lineLength||new a(0)),V=this._toNdc(s);let z=b(o,1,l);z=new n(z.rgb.multiply(z.a),z.a);let C=d(M(t.bitset,_.bitset.colorLocked),z,b(o,2,l));C=new n(C.rgb.multiply(C.a),C.a);let P=b(o,3,l);P=new n(P.rgb.multiply(P.a),P.a);const N=b(o,4,l).a,k=b(o,5,l).a,R=D(this,t.id,z,u(M(t.bitset,_.bitset.colorLocked),new m(r))),q=p(R,C,P),F=j(this,t.id),T=p(F,N,k),U=q.multiply(T),A=this.clip(t.id,t.zoomRange).add(S.multiply(2)),I=c.multiply(x);return{glPosition:new n(V,A,1),uv:i,color:U.multiply(new a(1).subtract(r)),outlineColor:U.multiply(r),distanceToPx:I,strokeWidth:y.multiply(p(new a(1),f,w)),isOutline:r,isSDF:g,...this.maybeRunHittest(t,e,{pos:t.pos,size:v,sizeCorrection:new a(1),isMapAligned:new a(1),vvRotationMat3:new h(1,0,0,0,1,0,0,0,1),placementMat3:new h(1,0,0,0,1,0,0,0,1),outlineSize:new a(1),distanceToPx:I,isSDF:g})}}fragment(t){let e=this._getColor(t.uv,{color:t.color,distanceToPx:t.distanceToPx,isSDF:t.isSDF,outlineColor:t.outlineColor,outlineSize:t.strokeWidth});return i.spotlightAnimatedSymbols&&(e=e.add(new n(0,.3,0,.3))),this.getFragmentOutput(e,t)}hittest(t,e,i){const{pos0:s,pos1:o,pos2:l}=this.computeHittestTriangle(t,e,i),r=C(this.hittestRequest);return d(r,()=>{const{tlbr:t}=this.hittestRequest;return P(s,o,l,t)},()=>d(c(i.size,this.hittestRequest.smallSymbolSizeThreshold),this._hittestSmallMarker(t,e,i),this._hittestMarker(t,e,i)))}_hittestSmallMarker(t,e,i){const{position:s,distance:o,smallSymbolDistance:l}=this.hittestRequest,r=o.subtract(l),{viewMat3:n,tileMat3:u}=this.view,m=n.multiply(u).multiply(new x(i.pos,1)).xy,p=i.size.multiply(.5),h=y(m,s).subtract(p).add(r);return d(w(h,this.hittestRequest.distance),new a(z),new a(V))}_hittestMarker(t,e,i){const s=this._vertexPreamble({...t},t.angle,new a(0)).position,o=this._vertexPreamble({...t,offset:e.offsetNextVertex1},t.angle,new a(0)).position,l=this._vertexPreamble({...t,offset:e.offsetNextVertex2},t.angle,new a(0)).position,r=this.hittestRequest.position,n=this.hittestRequest.distance,u=N(r,s,o,l);return d(w(u,n),new a(z),this._hittestSamples(s,o,l,t,e,i))}_hittestSamples(t,e,i,s,o,l){const{outlineSize:u,isSDF:m,distanceToPx:p}=l,h=this.hittestRequest.position,c=this.hittestRequest.distance,x=k(h.add(new r(f(c),f(c))),t,e,i),y=k(h.add(new r(0,f(c))),t,e,i),g=k(h.add(new r(c,f(c))),t,e,i),v=k(h.add(new r(f(c),0)),t,e,i),b=k(h,t,e,i),S=k(h.add(new r(c,0)),t,e,i),_=k(h.add(new r(f(c),c)),t,e,i),C=k(h.add(new r(0,c)),t,e,i),P=k(h.add(new r(c,c)),t,e,i),N=s.uv.divide(this.mosaicInfo.size),M=o.textureUVNextVertex1.divide(this.mosaicInfo.size),D=o.textureUVNextVertex2.divide(this.mosaicInfo.size),j={color:new n(1,1,1,1),outlineSize:u,outlineColor:new n(1,1,1,1),isSDF:m,distanceToPx:p};let q=new a(0);return q=q.add(R(x).multiply(this._getColor(U(x,N,M,D),j).a)),q=q.add(R(y).multiply(this._getColor(U(y,N,M,D),j).a)),q=q.add(R(g).multiply(this._getColor(U(g,N,M,D),j).a)),q=q.add(R(v).multiply(this._getColor(U(v,N,M,D),j).a)),q=q.add(R(b).multiply(this._getColor(U(b,N,M,D),j).a)),q=q.add(R(S).multiply(this._getColor(U(S,N,M,D),j).a)),q=q.add(R(_).multiply(this._getColor(U(_,N,M,D),j).a)),q=q.add(R(C).multiply(this._getColor(U(C,N,M,D),j).a)),q=q.add(R(P).multiply(this._getColor(U(P,N,M,D),j).a)),d(w(q,new a(.05)),new a(V),new a(z))}}t([e(0,o(q)),e(1,o(F))],A.prototype,"vertex",null),t([e(0,o(T))],A.prototype,"fragment",null);export{T as AnimatedMarkerFragmentInput,A as AnimatedMarkerShader,q as AnimatedMarkerVertexInput};
|