@arcgis/core 5.1.0-next.93 → 5.1.0-next.95
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/Graphic.js +1 -1
- package/analysis/Viewshed.js +1 -1
- package/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/arcadeRuntime.js +1 -1
- package/arcade/compilerUtils.js +1 -1
- package/arcade/debug.d.ts +10 -1
- package/arcade.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/02aaeaa988e9e7d65a7f.js +1 -0
- package/assets/esri/core/workers/chunks/031ea31bbdb7f1be791e.js +1 -0
- package/assets/esri/core/workers/chunks/03a4543b94f9adeb1852.js +1 -0
- package/assets/esri/core/workers/chunks/05c52e8f187740da9b36.js +1 -0
- package/assets/esri/core/workers/chunks/0630ce1975c91ae362d9.js +1 -0
- package/assets/esri/core/workers/chunks/{7f0f10946f05a09b5654.js → 07ddf1b1f7602063ceb0.js} +1 -1
- package/assets/esri/core/workers/chunks/0ab1384282afc8731857.js +1 -0
- package/assets/esri/core/workers/chunks/{be47e42c6c8c0820efd8.js → 0e6b24e8864940ed9877.js} +1 -1
- package/assets/esri/core/workers/chunks/0f527961805cd45c14e2.js +1 -0
- package/assets/esri/core/workers/chunks/11a99ee68409a641810e.js +1 -0
- package/assets/esri/core/workers/chunks/11b0d3a825fe50dd1e84.js +1 -0
- package/assets/esri/core/workers/chunks/130abc6a353e4d79a1b1.js +1 -0
- package/assets/esri/core/workers/chunks/16006dc0cb95f7c291a5.js +1 -0
- package/assets/esri/core/workers/chunks/177472a6a9beb1590934.js +1 -0
- package/assets/esri/core/workers/chunks/19a9a555365a8363d34b.js +1 -0
- package/assets/esri/core/workers/chunks/1a68a249540fda9083a9.js +1 -0
- package/assets/esri/core/workers/chunks/1ae016e4f5e39c34a941.js +1 -0
- package/assets/esri/core/workers/chunks/{43f58604ba4a94a9167c.js → 1f3a676e7a4eae5ad566.js} +1 -1
- package/assets/esri/core/workers/chunks/23241e6093e245f9c774.js +1 -0
- package/assets/esri/core/workers/chunks/{172228d1a392ca7a5b21.js → 246253fbbb2ecea48f91.js} +1 -1
- package/assets/esri/core/workers/chunks/25d795a1697803d77e56.js +1 -0
- package/assets/esri/core/workers/chunks/268ed861c882740c805b.js +1 -0
- package/assets/esri/core/workers/chunks/{da008d6a3afb30d18392.js → 299b4eecd0288348c971.js} +1 -1
- package/assets/esri/core/workers/chunks/{df8a3d3cac454d42e14d.js → 29aba121db7f00e0cf81.js} +1 -1
- package/assets/esri/core/workers/chunks/2b52c1c01cf568ba01fb.js +1 -0
- package/assets/esri/core/workers/chunks/2f6ba01ea8b8f193bea5.js +1 -0
- package/assets/esri/core/workers/chunks/{f52443cd203e687551da.js → 2fda38219d778f0447b5.js} +1 -1
- package/assets/esri/core/workers/chunks/2ffffc1931b2e27c6617.js +1 -0
- package/assets/esri/core/workers/chunks/3116a1c2b67a296ba86e.js +1 -0
- package/assets/esri/core/workers/chunks/31837f2f8859e2cf2efd.js +1 -0
- package/assets/esri/core/workers/chunks/3241e0ed26aff61ec213.js +1 -0
- package/assets/esri/core/workers/chunks/330da3828eefd8d72d3f.js +1 -0
- package/assets/esri/core/workers/chunks/359465b9726edcc70c83.js +1 -0
- package/assets/esri/core/workers/chunks/36ecb0082b8804b10fbf.js +1 -0
- package/assets/esri/core/workers/chunks/389e57aab12d52d72695.js +1 -0
- package/assets/esri/core/workers/chunks/38b1d2ffcc318ac0119d.js +1 -0
- package/assets/esri/core/workers/chunks/390717f079def83a0d9c.js +1 -0
- package/assets/esri/core/workers/chunks/{3397eae416622c64e628.js → 3f0483cbcd893acf240c.js} +1 -1
- package/assets/esri/core/workers/chunks/{77c2d8d0ce1c1ab469e9.js → 40afdb74517a7df59e0d.js} +1 -1
- package/assets/esri/core/workers/chunks/{41cbde4738ae4adf973d.js → 4142d5232c99d8aa943d.js} +5 -5
- package/assets/esri/core/workers/chunks/41e811138c96d85fd3e8.js +1 -0
- package/assets/esri/core/workers/chunks/43b5cfb34b11c4124b51.js +1 -0
- package/assets/esri/core/workers/chunks/{747e258f57f0543c836e.js → 43cc82373be791b7cb4c.js} +1 -1
- package/assets/esri/core/workers/chunks/{8a370cc1a99ddc7ce70b.js → 4456bbb4b7dfe80c7477.js} +1 -1
- package/assets/esri/core/workers/chunks/44b30dfce12824ee1f33.js +1 -0
- package/assets/esri/core/workers/chunks/453c3b265481c80fc625.js +1 -0
- package/assets/esri/core/workers/chunks/4644e1b00fd4e628219d.js +1 -0
- package/assets/esri/core/workers/chunks/47dd2bfecc5c4b5f10f0.js +1 -0
- package/assets/esri/core/workers/chunks/4b19acf8bde5b2e80692.js +1 -0
- package/assets/esri/core/workers/chunks/4faaf61d20e20fcf6c18.js +1 -0
- package/assets/esri/core/workers/chunks/{a169d9fe66b5865911d9.js → 503439246250d9e1cbd5.js} +1 -1
- package/assets/esri/core/workers/chunks/{f8072a4cf1b25d8b93f9.js → 509beae195c900a85e0b.js} +1 -1
- package/assets/esri/core/workers/chunks/5217d676749bca59d90f.js +1 -0
- package/assets/esri/core/workers/chunks/{1e3fe89970c57a883fe5.js → 53ff47c06ccfc0be885c.js} +1 -1
- package/assets/esri/core/workers/chunks/{53750e85f3128993a43a.js → 545c38789267e3487dbd.js} +1 -1
- package/assets/esri/core/workers/chunks/54dad475dc806a38c287.js +1 -0
- package/assets/esri/core/workers/chunks/5648379d1ed4ca02eedd.js +1 -0
- package/assets/esri/core/workers/chunks/{12f41c1c66fb446b6286.js → 5853925d2f7fb550bd2e.js} +11 -11
- package/assets/esri/core/workers/chunks/58579c53be1a44bd08d2.js +1 -0
- package/assets/esri/core/workers/chunks/598271956c46e21e5c09.js +1 -0
- package/assets/esri/core/workers/chunks/{d82da31dc702b8fd6a07.js → 59a64d72eed8c40c63cf.js} +1 -1
- package/assets/esri/core/workers/chunks/5ea0096a282e87a269bd.js +1 -0
- package/assets/esri/core/workers/chunks/63378b0b4265a547656b.js +1 -0
- package/assets/esri/core/workers/chunks/{394812e19b6915d560b0.js → 642be1619c0e76355cb6.js} +1 -1
- package/assets/esri/core/workers/chunks/65b0b4e808479187da00.js +1 -0
- package/assets/esri/core/workers/chunks/6666cd3bf1a3d175dc8c.js +1 -0
- package/assets/esri/core/workers/chunks/69a1cbf0af059548f96a.js +1 -0
- package/assets/esri/core/workers/chunks/6ae2408ac075b974e887.js +1 -0
- package/assets/esri/core/workers/chunks/{19a0cb2d335d97ad9488.js → 6b4c99c7648f37feec00.js} +1 -1
- package/assets/esri/core/workers/chunks/6b79c254897ece95b7a3.js +1 -0
- package/assets/esri/core/workers/chunks/6d66dc77af8d112c33c6.js +1 -0
- package/assets/esri/core/workers/chunks/71119398ec91f1b209d7.js +1 -0
- package/assets/esri/core/workers/chunks/71e12db99589c98a4357.js +1 -0
- package/assets/esri/core/workers/chunks/7536f0683e488159d8bd.js +1 -0
- package/assets/esri/core/workers/chunks/76589434d573111a8fb4.js +1 -0
- package/assets/esri/core/workers/chunks/{6f67c9f68101a084b683.js → 765bc49e58e9d0caa496.js} +6 -6
- package/assets/esri/core/workers/chunks/7c2d2f22df057ba8cb50.js +1 -0
- package/assets/esri/core/workers/chunks/7d6299ab7b0db23ab961.js +1 -0
- package/assets/esri/core/workers/chunks/8042e001545e2782499c.js +1 -0
- package/assets/esri/core/workers/chunks/82b2acc6f181927de89c.js +1 -0
- package/assets/esri/core/workers/chunks/85a200aecc7a844c9566.js +1 -0
- package/assets/esri/core/workers/chunks/89250d268dc2554a9ece.js +1 -0
- package/assets/esri/core/workers/chunks/8a23a62cbf1c5b4019c5.js +1 -0
- package/assets/esri/core/workers/chunks/8ac8ef856ed9592c433b.js +1 -0
- package/assets/esri/core/workers/chunks/8bfe4841c83eb3abfbe8.js +1 -0
- package/assets/esri/core/workers/chunks/{6aed2e42e65ac80f1fab.js → 8de61993e114f453579b.js} +1 -1
- package/assets/esri/core/workers/chunks/8e374ce47256a567ae11.js +1 -0
- package/assets/esri/core/workers/chunks/8f992ff87173a3ca1621.js +640 -0
- package/assets/esri/core/workers/chunks/{d7e7f3efd1d28617b808.js → 92e7067960549733f8e6.js} +1 -1
- package/assets/esri/core/workers/chunks/{f1673e723b336204ad77.js → 9b23d999db902d25ba58.js} +1 -1
- package/assets/esri/core/workers/chunks/9bb2251ba58932f85d13.js +1 -0
- package/assets/esri/core/workers/chunks/{d8ccc713c5ad93e7a0c3.js → 9bd713d96502ddc2ce25.js} +1 -1
- package/assets/esri/core/workers/chunks/{8351012ceb466f01b8fd.js → 9d8e7839772029d83c93.js} +1 -1
- package/assets/esri/core/workers/chunks/a12fd6a445f42326642f.js +1 -0
- package/assets/esri/core/workers/chunks/a50fd0e66b01fe205033.js +1 -0
- package/assets/esri/core/workers/chunks/{51716e411fad624ac21c.js → a567d001fcfa1f1cdeea.js} +1 -1
- package/assets/esri/core/workers/chunks/{5eff240a0e41a4f80e61.js → a68b5cb66c2c5e6b46e0.js} +1 -1
- package/assets/esri/core/workers/chunks/a8e2fbbfbdf1c3203d5e.js +1 -0
- package/assets/esri/core/workers/chunks/a94674826e5893c9d197.js +1 -0
- package/assets/esri/core/workers/chunks/aad02c7417648d881129.js +1 -0
- package/assets/esri/core/workers/chunks/ad329226c8b579d0964c.js +1 -0
- package/assets/esri/core/workers/chunks/afdc6fc453157528cf9b.js +1 -0
- package/assets/esri/core/workers/chunks/b2504657d3ef8769005e.js +1 -0
- package/assets/esri/core/workers/chunks/b7f5d51ac26f37837b3b.js +1 -0
- package/assets/esri/core/workers/chunks/b90db0829da3f96e4a19.js +1 -0
- package/assets/esri/core/workers/chunks/{359d3acb3953e64e5a78.js → ba7fe21a78ea37a02b7c.js} +1 -1
- package/assets/esri/core/workers/chunks/bd17ac2e6f1eb8cf7abf.js +1 -0
- package/assets/esri/core/workers/chunks/bd721bbc7afc75d3bddb.js +1 -0
- package/assets/esri/core/workers/chunks/bd9dae2d5ec199f8e9ba.js +1 -0
- package/assets/esri/core/workers/chunks/{75c09a2fa4c34b4844c5.js → be0eab592db0e651b023.js} +6 -6
- package/assets/esri/core/workers/chunks/be19d4a6fb9b1c923127.js +1 -0
- package/assets/esri/core/workers/chunks/beba9f2213d8a850ddb6.js +1 -0
- package/assets/esri/core/workers/chunks/{f706bfea34d22539b46a.js → bf6c6bc15b0d2d82d1a4.js} +2 -2
- package/assets/esri/core/workers/chunks/bf706a5d065a357de51b.js +1 -0
- package/assets/esri/core/workers/chunks/{baea6f86b2dbe067940e.js → bf73232057ebc1ecc0ad.js} +1 -1
- package/assets/esri/core/workers/chunks/c2589e5e0e0f81a378c2.js +1 -0
- package/assets/esri/core/workers/chunks/c321bcda8e8893577948.js +1 -0
- package/assets/esri/core/workers/chunks/c33f1f722499a5c6fc11.js +1 -0
- package/assets/esri/core/workers/chunks/c452c74ba9de218c3e57.js +1 -0
- package/assets/esri/core/workers/chunks/{fade7b878a9498382bb2.js → c514135bf7703ba69a47.js} +1 -1
- package/assets/esri/core/workers/chunks/c798a40418e7ff38042a.js +1 -0
- package/assets/esri/core/workers/chunks/{969f58a2de4ebe63619d.js → c88fd4f69cb2b53b48ec.js} +1 -1
- package/assets/esri/core/workers/chunks/ca6c128940ddbebcaaab.js +1 -0
- package/assets/esri/core/workers/chunks/{c7ee05f46b26b17f9414.js → ce2ed9405ff1b704d35c.js} +1 -1
- package/assets/esri/core/workers/chunks/ce3e51c799a80648e46d.js +1 -0
- package/assets/esri/core/workers/chunks/{e81afc8a058a8ecc9b24.js → ce4e09b623ebb640c46c.js} +1 -1
- package/assets/esri/core/workers/chunks/cf7acf5acb6d322fd996.js +1 -0
- package/assets/esri/core/workers/chunks/{e0b27bceb397482bd0e8.js → d122431f3b0b88dcb488.js} +1 -1
- package/assets/esri/core/workers/chunks/{2647c739cda29361a463.js → d87e504082e293640ece.js} +2 -2
- package/assets/esri/core/workers/chunks/d8c4fb66c733ab2f66d3.js +1 -0
- package/assets/esri/core/workers/chunks/d8d338665fe00494c826.js +1 -0
- package/assets/esri/core/workers/chunks/d93a4ccf8f0208dc6ad7.js +1 -0
- package/assets/esri/core/workers/chunks/de11ebcea2b8f9dfe65d.js +1 -0
- package/assets/esri/core/workers/chunks/e03713dee3205c96d53f.js +1 -0
- package/assets/esri/core/workers/chunks/e133840540abf20262a4.js +1 -0
- package/assets/esri/core/workers/chunks/e54ad3683ad992682deb.js +1 -0
- package/assets/esri/core/workers/chunks/{3092184350d66c79f610.js → e5d969214d9eda5c0b4c.js} +1 -1
- package/assets/esri/core/workers/chunks/e63e24101e7e92c62d98.js +1 -0
- package/assets/esri/core/workers/chunks/e7e7c7cbfd8542bd7a46.js +1 -0
- package/assets/esri/core/workers/chunks/ead6e4d0a515c0913bee.js +1 -0
- package/assets/esri/core/workers/chunks/ee635172be7fdea69367.js +1 -0
- package/assets/esri/core/workers/chunks/{aefeb5a17bb481c95da3.js → eeb847bfea558566adf6.js} +1 -1
- package/assets/esri/core/workers/chunks/{d11de13537b623739e14.js → f14e3693cd644265f909.js} +1 -1
- package/assets/esri/core/workers/chunks/f196ad0c7dbcbf632776.js +1 -0
- package/assets/esri/core/workers/chunks/f31deeedb2508e81293b.js +2 -0
- package/assets/esri/core/workers/chunks/f618ee43581e8de6ad0c.js +1 -0
- package/assets/esri/core/workers/chunks/{2fd4220131bfc3f5e2dd.js → f635a8e3b0bfeda99ed5.js} +1 -1
- package/assets/esri/core/workers/chunks/f66262f8582909157f01.js +1 -0
- package/assets/esri/core/workers/chunks/f69c44479ee3fd8c831d.js +1 -0
- package/assets/esri/core/workers/chunks/{ea97619a4470f1540b99.js → f6ebec8d2248c719b89f.js} +1 -1
- package/assets/esri/core/workers/chunks/f948e4a80a7dbda70f2e.js +1 -0
- package/assets/esri/core/workers/chunks/f95e3333a65a0c09fd1e.js +1 -0
- package/assets/esri/core/workers/chunks/fa3138dd8139008b430d.js +1 -0
- package/assets/esri/core/workers/chunks/fa9ab152ea785b5e97e0.js +1 -0
- package/assets/esri/core/workers/chunks/fae147d03ed723ab234d.js +1 -0
- package/assets/esri/core/workers/chunks/fae79769df54eb4c4154.js +1 -0
- package/assets/esri/core/workers/chunks/fd2afff07aaac8203c18.js +1 -0
- package/assets/esri/core/workers/chunks/fdb7851e98e8d2ba48d3.js +1 -0
- package/assets/esri/core/workers/chunks/ff7708aaa2de720e3a47.js +1 -0
- package/assets/esri/core/workers/chunks/ffb8fa77297578afef7c.js +1 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
- package/chunks/GaussianSplat.glsl.js +8 -8
- package/chunks/GlobalIllumination.glsl.js +31 -31
- package/chunks/GlowComposition.glsl.js +4 -4
- package/chunks/OITBlend.glsl.js +3 -7
- package/chunks/OITBlendEmission.glsl.js +22 -0
- package/chunks/{OITDim.glsl.js → OITDimOpaque.glsl.js} +2 -2
- package/chunks/RibbonLine.glsl.js +57 -53
- package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
- package/chunks/arcgis-knowledge-client-core.js +1 -1
- package/config.js +1 -1
- package/core/has.js +1 -1
- package/geometry/support/geometryUtils.js +1 -1
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/DimensionFeatureLayer.d.ts +7 -0
- package/layers/DimensionFeatureLayer.js +2 -0
- package/layers/FeatureLayer.d.ts +27 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/catalog/CatalogFootprintLayer.js +1 -1
- package/layers/graphics/OptimizedFeature.js +1 -1
- package/layers/graphics/data/QueryEngineCapabilities.js +1 -1
- package/layers/graphics/data/optimizedFeatureQueryEngineAdapter.js +1 -1
- package/layers/graphics/featureConversionUtils.js +1 -1
- package/layers/graphics/sources/OGCFeatureSource.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/FeatureReductionLayer.js +1 -1
- package/layers/mixins/PortalLayer.js +1 -1
- package/layers/raster/datasets/ImageAuxRaster.js +1 -1
- package/layers/raster/datasets/InMemoryRaster.js +1 -1
- package/layers/raster/formats/ImageCanvasDecoder.js +1 -1
- package/layers/raster/formats/RasterCodec.js +1 -1
- package/layers/support/RasterJobHandler.js +1 -1
- package/layers/support/capabilities.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/layers/types.d.ts +1 -1
- package/networks/support/CircuitPathConnectivityElement.js +1 -1
- package/networks/support/networkFieldUtils.js +1 -1
- package/package.json +2 -2
- package/popup/Features.js +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/portal/support/layersLoader.js +1 -1
- package/rest/knowledgeGraph/ReplicaDefinition.d.ts +0 -3
- package/rest/knowledgeGraph/types.d.ts +1 -1
- package/rest/knowledgeGraph/wasmInterface/queryToWasmEncodedFactories.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/replicaToWasmEncodedFactories.js +1 -1
- package/rest/support/Query.js +1 -1
- package/rest/versionManagement/gdbVersion/support/ConflictsParameters.js +1 -1
- package/rest/versionManagement/gdbVersion/support/DifferencesParameters.js +1 -1
- package/rest/versionManagement/gdbVersion/support/DifferencesResult.d.ts +25 -0
- package/rest/versionManagement/gdbVersion/support/InspectConflictsParameters.js +1 -1
- package/rest/versionManagement/gdbVersion/support/ReconcileParameters.d.ts +3 -5
- package/rest/versionManagement/gdbVersion/support/ReconcileParameters.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMEffects.js +1 -1
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/defaultCIMValues.js +1 -1
- package/symbols/cim/effects/EffectAddControlPoints.js +1 -1
- package/symbols/cim/effects/EffectArrow.js +1 -1
- package/symbols/cim/effects/EffectBuffer.js +1 -1
- package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
- package/symbols/cim/effects/EffectCut.js +1 -1
- package/symbols/cim/effects/EffectDashes.js +1 -1
- package/symbols/cim/effects/EffectDonut.js +1 -1
- package/symbols/cim/effects/EffectEnclosingPolygon.js +1 -1
- package/symbols/cim/effects/EffectHelper.js +1 -1
- package/symbols/cim/effects/EffectJog.js +1 -1
- package/symbols/cim/effects/EffectMove.js +1 -1
- package/symbols/cim/effects/EffectOffset.js +1 -1
- package/symbols/cim/effects/EffectRadial.js +1 -1
- package/symbols/cim/effects/EffectTaperedPolygon.js +1 -1
- package/symbols/cim/effects/EffectWave.js +1 -1
- package/symbols/cim/placements/PlacementAtRatioPositions.js +1 -1
- package/symbols/cim/types.d.ts +34 -1
- package/symbols/cim/utils.js +1 -1
- package/symbols/dimensions/effects/LinearDimensionArrowEffect.js +1 -1
- package/symbols/dimensions/effects/LinearDimensionExtensionLineEffect.js +1 -1
- package/symbols/dimensions/effects/LinearDimensionLeaderLineEffect.js +1 -1
- package/symbols/dimensions/effects/LinearDimensionLineEffect.js +1 -1
- package/symbols/dimensions/effects/LinearDimensionPointEffect.js +1 -1
- package/symbols/dimensions/effects/LinearDimensionTextEffect.js +1 -1
- package/symbols/types.d.ts +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolDeclutterer.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolRepository.js +1 -1
- package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
- package/views/2d/engine/webgl/GlyphSDFCreator.js +1 -1
- package/views/2d/engine/webgl/alignmentUtils.js +1 -1
- package/views/2d/engine/webgl/definitions.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TestTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/AFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.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/layerViewModuleImportUtils.js +1 -1
- package/views/2d/layers/DimensionLayerView2D.js +2 -0
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +2 -0
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/schema/SourceSchema.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/strategies/AFeatureTileLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/FeatureHybridTileLoadStrategy.js +2 -0
- package/views/2d/layers/features/sources/strategies/chunks/ByReferenceTileSourceChunk.js +2 -0
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/features/support/DisplayIdGenerator.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
- package/views/2d/layers/features/support/RefCounted.js +2 -0
- package/views/2d/types.d.ts +2 -0
- package/views/3d/layerViewModuleImportUtils.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/support/QualityProfile.js +1 -1
- package/views/3d/support/QualitySettings.js +1 -1
- package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
- package/views/3d/types.d.ts +2 -0
- package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +11 -12
- package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +5 -5
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/{ComputeCovariance.glsl.js → GaussianSplatCovariance.glsl.js} +15 -9
- package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js +43 -0
- package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js +36 -0
- package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/LocalAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/MarsAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/CloudsRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlightBuffer.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
- package/views/3d/webgl-engine/effects/precipitation/Precipitation.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlendEmission.glsl.js +2 -0
- package/views/3d/webgl-engine/effects/transparency/OITBlendEmissionTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/transparency/OITBlendEmissionTechniqueConfiguration.js +2 -0
- package/views/3d/webgl-engine/effects/transparency/OITBlendTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/{OITDim.glsl.js → OITDimOpaque.glsl.js} +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITDimOpaqueTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/transparency/{OITDimTechniqueConfiguration.js → OITDimOpaqueTechniqueConfiguration.js} +1 -1
- package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/oitResolution.glsl.js +1 -1
- package/views/PopupView.js +1 -1
- package/views/SceneView.d.ts +3 -3
- package/views/layers/FeatureLikeLayerView.d.ts +2 -1
- package/views/layers/FeatureLikeLayerView.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +12 -12
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/Column.d.ts +2 -17
- 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.d.ts +1 -7
- package/widgets/FeatureTable/Grid/GroupColumn.js +1 -1
- package/widgets/FeatureTable/support/ColumnTemplateBase.d.ts +1 -9
- package/widgets/FeatureTable/support/ColumnTemplateBase.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/FeatureTable/support/types.d.ts +0 -8
- package/widgets/FeatureTable.d.ts +18 -3
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/Search/support/layerSearchUtils.js +1 -1
- package/widgets/Search/support/locatorUtils.js +1 -1
- package/assets/esri/core/workers/chunks/00e9e25269d5776f8645.js +0 -1
- package/assets/esri/core/workers/chunks/014a5fad55f97b9b5166.js +0 -1
- package/assets/esri/core/workers/chunks/015fc0a17b17d69cc3bb.js +0 -1
- package/assets/esri/core/workers/chunks/02e8fc598ee09cf1b678.js +0 -1
- package/assets/esri/core/workers/chunks/06003996a378c45bc605.js +0 -1
- package/assets/esri/core/workers/chunks/0a6df243b18acae471be.js +0 -1
- package/assets/esri/core/workers/chunks/127cd8fee3717a473fc5.js +0 -1
- package/assets/esri/core/workers/chunks/146424b5717d0a645ee1.js +0 -1
- package/assets/esri/core/workers/chunks/169ca3724053fc046d1b.js +0 -1
- package/assets/esri/core/workers/chunks/17445fd8048966617d49.js +0 -1
- package/assets/esri/core/workers/chunks/1765dfeac20e34ce25b7.js +0 -1
- package/assets/esri/core/workers/chunks/1768f1a7e3caa6074d91.js +0 -1
- package/assets/esri/core/workers/chunks/1906416c84bab369bbd6.js +0 -1
- package/assets/esri/core/workers/chunks/1a35121a0c2595a41fdb.js +0 -1
- package/assets/esri/core/workers/chunks/1f85646936200a399c15.js +0 -1
- package/assets/esri/core/workers/chunks/1ff3c15a51c4dc991806.js +0 -1
- package/assets/esri/core/workers/chunks/206bdfd868a9ef88f3a8.js +0 -1
- package/assets/esri/core/workers/chunks/2343b1105bc4c1b4a086.js +0 -1
- package/assets/esri/core/workers/chunks/2387613b855771a3e537.js +0 -1
- package/assets/esri/core/workers/chunks/2b0b398180ed98c2c84c.js +0 -1
- package/assets/esri/core/workers/chunks/3469df5c4846b0cee012.js +0 -1
- package/assets/esri/core/workers/chunks/34b6b5dd415c68f0b0d1.js +0 -1
- package/assets/esri/core/workers/chunks/34f7450769826e8b7069.js +0 -636
- package/assets/esri/core/workers/chunks/36f6673b23579b88d8f7.js +0 -1
- package/assets/esri/core/workers/chunks/384c235d36f32769e32b.js +0 -1
- package/assets/esri/core/workers/chunks/38c28189f273636e4017.js +0 -1
- package/assets/esri/core/workers/chunks/3a183259805638c25363.js +0 -1
- package/assets/esri/core/workers/chunks/3d9032217347dadcbe41.js +0 -1
- package/assets/esri/core/workers/chunks/3efbb684c0409955186d.js +0 -1
- package/assets/esri/core/workers/chunks/3feec3d08424b94e1bcf.js +0 -1
- package/assets/esri/core/workers/chunks/412745bfacef23e3b702.js +0 -1
- package/assets/esri/core/workers/chunks/46b16501db6681dc467b.js +0 -1
- package/assets/esri/core/workers/chunks/47b3a5213539548ff3a6.js +0 -1
- package/assets/esri/core/workers/chunks/48549d3d7bf0154c0afa.js +0 -1
- package/assets/esri/core/workers/chunks/4b79ebfb3328f9483147.js +0 -1
- package/assets/esri/core/workers/chunks/4c97cc922eece3a91b6b.js +0 -1
- package/assets/esri/core/workers/chunks/4dbbf59c79d9e72f20ee.js +0 -1
- package/assets/esri/core/workers/chunks/4e206957b28253ddc1a3.js +0 -1
- package/assets/esri/core/workers/chunks/52b3a11c962810bc6dbe.js +0 -1
- package/assets/esri/core/workers/chunks/53ef72edc3ed80bf558c.js +0 -1
- package/assets/esri/core/workers/chunks/54c035cdc171998d0776.js +0 -1
- package/assets/esri/core/workers/chunks/54c6e870262469d0d702.js +0 -1
- package/assets/esri/core/workers/chunks/55fd201ca5e10c6e4761.js +0 -1
- package/assets/esri/core/workers/chunks/566f6319ded0634769e0.js +0 -1
- package/assets/esri/core/workers/chunks/56717ff315c6ec874142.js +0 -1
- package/assets/esri/core/workers/chunks/56941e8bbd2d49bf2656.js +0 -1
- package/assets/esri/core/workers/chunks/5fccb372b4d5ee2f64cc.js +0 -1
- package/assets/esri/core/workers/chunks/60cee9a44929decd2474.js +0 -1
- package/assets/esri/core/workers/chunks/6124141ac642e4ce1454.js +0 -1
- package/assets/esri/core/workers/chunks/61fada8942b65fa0b5e1.js +0 -1
- package/assets/esri/core/workers/chunks/65c61171e6c6be5c5c2f.js +0 -1
- package/assets/esri/core/workers/chunks/6a3d207308b29651f397.js +0 -1
- package/assets/esri/core/workers/chunks/6d696beddcc5fbed5875.js +0 -1
- package/assets/esri/core/workers/chunks/6dac8dfcd63fc757ae2d.js +0 -1
- package/assets/esri/core/workers/chunks/71cfab6305f275cfb04e.js +0 -1
- package/assets/esri/core/workers/chunks/728ad5bbbcbf88d6249f.js +0 -1
- package/assets/esri/core/workers/chunks/7b505112c7e6d9b7a239.js +0 -1
- package/assets/esri/core/workers/chunks/7b6c8be59ed87e386aa4.js +0 -1
- package/assets/esri/core/workers/chunks/7ba67f1d7831a5576a5a.js +0 -1
- package/assets/esri/core/workers/chunks/7c820c5f6f05480d5050.js +0 -1
- package/assets/esri/core/workers/chunks/7ef51b0ebd560113ae7e.js +0 -1
- package/assets/esri/core/workers/chunks/80f4f686ce403cb2693f.js +0 -1
- package/assets/esri/core/workers/chunks/81d761c837b7456ec99f.js +0 -1
- package/assets/esri/core/workers/chunks/83f1871d04c979fa23b7.js +0 -1
- package/assets/esri/core/workers/chunks/85da2987e17b6755a94e.js +0 -1
- package/assets/esri/core/workers/chunks/8a3bff0f58483c1665f9.js +0 -1
- package/assets/esri/core/workers/chunks/8a5a827ee557d9f9a66e.js +0 -1
- package/assets/esri/core/workers/chunks/8a7a99533d02eb9cb058.js +0 -2
- package/assets/esri/core/workers/chunks/8b046e28f879079caada.js +0 -1
- package/assets/esri/core/workers/chunks/8d738e9acc2f222235ea.js +0 -1
- package/assets/esri/core/workers/chunks/915e2711d3a2cfa402b2.js +0 -1
- package/assets/esri/core/workers/chunks/9a5ef33d99a8f89956ff.js +0 -1
- package/assets/esri/core/workers/chunks/9c09097e390985bbac58.js +0 -1
- package/assets/esri/core/workers/chunks/9c402657f63a4d5668d0.js +0 -1
- package/assets/esri/core/workers/chunks/9f51a69b8f1937a8794a.js +0 -1
- package/assets/esri/core/workers/chunks/a015c2f54eb91e43a1f4.js +0 -1
- package/assets/esri/core/workers/chunks/a232d05c0a055f398c6e.js +0 -1
- package/assets/esri/core/workers/chunks/a242ec19a7508de436da.js +0 -1
- package/assets/esri/core/workers/chunks/a25acccda8febac71a3d.js +0 -1
- package/assets/esri/core/workers/chunks/a432219de6a873f88776.js +0 -1
- package/assets/esri/core/workers/chunks/a6b75576d598ec161cc4.js +0 -1
- package/assets/esri/core/workers/chunks/a7f9f478bd1493fc3c76.js +0 -1
- package/assets/esri/core/workers/chunks/aac6a57edd7494125204.js +0 -1
- package/assets/esri/core/workers/chunks/afc0baf86ece710ef867.js +0 -1
- package/assets/esri/core/workers/chunks/b2662bfdbd1e3623ceb9.js +0 -1
- package/assets/esri/core/workers/chunks/b4bac22467e96be7a974.js +0 -1
- package/assets/esri/core/workers/chunks/b73c146d3e550eaf07eb.js +0 -1
- package/assets/esri/core/workers/chunks/b7af0e6b9aadbcaf6a0b.js +0 -1
- package/assets/esri/core/workers/chunks/bc78937986854e500b8e.js +0 -1
- package/assets/esri/core/workers/chunks/bd10d21545bca9a49de0.js +0 -1
- package/assets/esri/core/workers/chunks/bea170f08f5261e22d29.js +0 -1
- package/assets/esri/core/workers/chunks/bec3ee5ea945e1e07a35.js +0 -1
- package/assets/esri/core/workers/chunks/bf4dd8e50704e4040966.js +0 -1
- package/assets/esri/core/workers/chunks/c31ee5617c61a933cb0e.js +0 -1
- package/assets/esri/core/workers/chunks/c3e89c7c7b677bd18557.js +0 -1
- package/assets/esri/core/workers/chunks/cb81d524f12edcadb9bb.js +0 -1
- package/assets/esri/core/workers/chunks/cc0f3b9b153a0c232afe.js +0 -1
- package/assets/esri/core/workers/chunks/cd0c232f4e3868d91a05.js +0 -1
- package/assets/esri/core/workers/chunks/ce7ef7c4ca14d66d96f6.js +0 -1
- package/assets/esri/core/workers/chunks/d3d9d40556c847bba1a7.js +0 -1
- package/assets/esri/core/workers/chunks/d55cef8199b8246fea3f.js +0 -1
- package/assets/esri/core/workers/chunks/d8decaee2c780e1b5e35.js +0 -1
- package/assets/esri/core/workers/chunks/dc54d4a9fe1691862356.js +0 -1
- package/assets/esri/core/workers/chunks/dd5b362bded458afa2d6.js +0 -1
- package/assets/esri/core/workers/chunks/dde94664110ff231a52d.js +0 -1
- package/assets/esri/core/workers/chunks/de3e5d82502ee15b7eae.js +0 -1
- package/assets/esri/core/workers/chunks/e18badd11f360cc2912b.js +0 -1
- package/assets/esri/core/workers/chunks/e6f1ed5e56f1d9862821.js +0 -1
- package/assets/esri/core/workers/chunks/e6fe8b5fbe95de01453b.js +0 -1
- package/assets/esri/core/workers/chunks/eaab5ac049622986e3bc.js +0 -1
- package/assets/esri/core/workers/chunks/ee7e9bca57160694b3c4.js +0 -1
- package/assets/esri/core/workers/chunks/ef0085aa743b33cb549f.js +0 -1
- package/assets/esri/core/workers/chunks/f0250cecb243b32cdba7.js +0 -1
- package/assets/esri/core/workers/chunks/f1e5626a0cc1631a1efb.js +0 -1
- package/assets/esri/core/workers/chunks/f36345ebb9851ab92453.js +0 -1
- package/assets/esri/core/workers/chunks/f468c6ea2818a1f97e19.js +0 -1
- package/assets/esri/core/workers/chunks/f49c7bb5d134bcb22155.js +0 -1
- package/assets/esri/core/workers/chunks/f6c8e93ca2987e83f925.js +0 -1
- package/assets/esri/core/workers/chunks/f7531aa69a87814c60d1.js +0 -1
- package/assets/esri/themes/base/fonts/cdn.scss +0 -3
- package/views/3d/webgl-engine/effects/transparency/OITDimTechnique.js +0 -2
- /package/assets/esri/core/workers/chunks/{f706bfea34d22539b46a.js.LICENSE.txt → bf6c6bc15b0d2d82d1a4.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{2647c739cda29361a463.js.LICENSE.txt → d87e504082e293640ece.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{8a7a99533d02eb9cb058.js.LICENSE.txt → f31deeedb2508e81293b.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{CIMSymbolUnits as e}from"./types.js";const t={color:[128,128,128,1],outlinecolor:[0,0,0,1],backgroundcolor:[128,128,128,1],borderlinecolor:[0,0,0,1],tintcolor:[255,255,255,1]},o={CIMVectorMarker:{scalesymbolsproportionally:!1,respectframe:!0,anchorpointunits:"Relative",offsetx:0,offsety:0,rotateclockwise:!1,rotation:0,size:10,enable:!0,colorlocked:!1},CIMPictureMarker:{scalex:1,texturefilter:"Draft",anchorpointunits:"Relative",offsetx:0,offsety:0,rotateclockwise:!1,rotation:0,size:10,enable:!0,colorlocked:!1},CIMTextSymbol:{angle:0,anglex:0,angley:0,halosize:1,height:10,horizontalalignment:"Left",kerning:!0,letterspacing:0,letterwidth:100,ligatures:!0,linegap:0,offsetx:0,offsety:0,strikethrough:!1,textcase:"Normal",textstring:"",underline:!1,verticalalignment:"Bottom",enable:!0,colorlocked:!1},CIMSolidStroke:{capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1},CIMPictureStroke:{texturefilter:"Draft",capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1},CIMGradientStroke:{capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1,gradientMethod:"AcrossLine",gradientSize:75,gradientSizeUnits:e.Relative,gradientType:"Discrete",interval:5},CIMSolidFill:{enable:!0,colorlocked:!1},CIMPictureFill:{offsetx:0,offsety:0,rotation:0,scalex:1,height:10,texturefilter:"Draft",enable:!0,colorlocked:!1},CIMHatchFill:{offsetx:0,offsety:0,rotation:0,separation:4,enable:!0,colorlocked:!1},CIMGradientFill:{enable:!0,angle:90,gradientMethod:"Linear",gradientSize:75,gradientSizeUnits:e.Relative,gradientType:"Discrete",interval:5},CIMGeometricEffectAddControlPoints:{angletolerance:120},CIMGeometricEffectArrow:{arrowtype:"OpenEnded",width:5},CIMGeometricEffectBuffer:{size:1},CIMGeometricEffectCut:{begincut:1,endcut:1,middlecut:0,invert:!1},CIMGeometricEffectDashes:{customendingoffset:0,linedashending:"NoConstraint",offsetalongline:0},CIMGeometricEffectDonut:{method:"Mitered",option:"Accurate",width:2},CIMGeometricEffectJog:{angle:225,length:20,position:50},CIMGeometricEffectControlMeasureLine:{rule:"FullGeometry"},CIMGeometricEffectMove:{offsetx:1,offsety:-1},CIMGeometricEffectOffset:{method:"Square",offset:1,option:"Fast"},CIMGeometricEffectRadial:{angle:0,length:5},CIMGeometricEffectRotate:{angle:15},CIMGeometricEffectScale:{xscalefactor:1.15,yscalefactor:1.15},CIMGeometricEffectWave:{amplitude:2,period:3,seed:1,waveform:"Sinus"},CIMMarkerPlacementAlongLine:{customendingoffset:0,endings:"WithHalfGap",offsetalongline:0,placeperpart:!0,angletoline:!0,offset:0},CIMMarkerPlacementAtExtremities:{extremityplacement:"Both",offsetalongline:0,angletoline:!0,offset:0},CIMMarkerPlacementAtRatioPositions:{beginposition:0,endposition:0,flipfirst:!0,angletoline:!0,offset:0},CIMMarkerPlacementInsidePolygon:{gridangle:0,gridtype:"Fixed",offsetx:0,offsety:0,randomness:100,seed:0,shiftoddrows:!1,stepx:16,stepy:16,clipping:"ClipAtBoundary"},CIMMarkerPlacementOnLine:{relativeto:"LineMiddle",startpointoffset:0,angletoline:!0,offset:0},CIMMarkerPlacementOnVertices:{placeperpart:!0,placeoncontrolpoints:!0,placeonendpoints:!0,placeonregularvertices:!0,angletoline:!0,offset:0},CIMMarkerPlacementPolygonCenter:{method:"OnPolygon",offsetx:0,offsety:0,clipatboundary:!1},CIMAnimatedSymbolProperties:{playanimation:!1,reverseanimation:!1,randomizestarttime:!1,randomizestartseed:0,starttimeoffset:0,duration:3,endingduration:3,useendingduration:!1,repeattype:"Loop",repeatdelay:0,easing:"Linear"},CIMSymbolAnimationSize:{tosize:10},CIMSymbolAnimationScale:{scalefactor:1},CIMSymbolAnimationColor:{tocolor:[255,255,255,1],colormode:"Multiply"},CIMSymbolAnimationTransparency:{totransparency:0},CIMSymbolAnimationRotation:{torotation:0,rotateclockwise:!1},CIMSymbolAnimationOffset:{offsetx:0,offsety:0},CIMSymbolAnimationMoveAlongLine:{speed:30,distanceAlong:100}};export{t as defaultCIMColor,o as defaultCIMValues};
|
|
2
|
+
import{CIMSymbolUnits as e}from"./types.js";const t={color:[128,128,128,1],outlinecolor:[0,0,0,1],backgroundcolor:[128,128,128,1],borderlinecolor:[0,0,0,1],tintcolor:[255,255,255,1]},o={CIMVectorMarker:{scalesymbolsproportionally:!1,respectframe:!0,anchorpointunits:"Relative",offsetx:0,offsety:0,rotateclockwise:!1,rotation:0,size:10,enable:!0,colorlocked:!1},CIMPictureMarker:{scalex:1,texturefilter:"Draft",anchorpointunits:"Relative",offsetx:0,offsety:0,rotateclockwise:!1,rotation:0,size:10,enable:!0,colorlocked:!1},CIMTextSymbol:{angle:0,anglex:0,angley:0,halosize:1,height:10,horizontalalignment:"Left",kerning:!0,letterspacing:0,letterwidth:100,ligatures:!0,linegap:0,offsetx:0,offsety:0,strikethrough:!1,textcase:"Normal",textstring:"",underline:!1,verticalalignment:"Bottom",enable:!0,colorlocked:!1},CIMSolidStroke:{capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1},CIMPictureStroke:{texturefilter:"Draft",capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1},CIMGradientStroke:{capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1,gradientMethod:"AcrossLine",gradientSize:75,gradientSizeUnits:e.Relative,gradientType:"Discrete",interval:5},CIMSolidFill:{enable:!0,colorlocked:!1},CIMPictureFill:{offsetx:0,offsety:0,rotation:0,scalex:1,height:10,texturefilter:"Draft",enable:!0,colorlocked:!1},CIMHatchFill:{offsetx:0,offsety:0,rotation:0,separation:4,enable:!0,colorlocked:!1},CIMGradientFill:{enable:!0,angle:90,gradientMethod:"Linear",gradientSize:75,gradientSizeUnits:e.Relative,gradientType:"Discrete",interval:5},CIMGeometricEffectAddControlPoints:{angletolerance:120},CIMGeometricEffectArrow:{arrowtype:"OpenEnded",width:5},CIMGeometricEffectBuffer:{size:1},CIMGeometricEffectCut:{begincut:1,endcut:1,middlecut:0,invert:!1},CIMGeometricEffectDashes:{customendingoffset:0,linedashending:"NoConstraint",offsetalongline:0},CIMGeometricEffectDonut:{method:"Mitered",option:"Accurate",width:2},CIMGeometricEffectJog:{angle:225,length:20,position:50},CIMGeometricEffectControlMeasureLine:{rule:"FullGeometry",width:25},CIMGeometricEffectMove:{offsetx:1,offsety:-1},CIMGeometricEffectOffset:{method:"Square",offset:1,option:"Fast"},CIMGeometricEffectRadial:{angle:0,length:5},CIMGeometricEffectRotate:{angle:15},CIMGeometricEffectScale:{xscalefactor:1.15,yscalefactor:1.15},CIMGeometricEffectWave:{amplitude:2,period:3,seed:1,waveform:"Sinus"},CIMMarkerPlacementAlongLine:{customendingoffset:0,endings:"WithHalfGap",offsetalongline:0,placeperpart:!0,angletoline:!0,offset:0},CIMMarkerPlacementAtExtremities:{extremityplacement:"Both",offsetalongline:0,angletoline:!0,offset:0},CIMMarkerPlacementAtRatioPositions:{beginposition:0,endposition:0,flipfirst:!0,angletoline:!0,offset:0},CIMMarkerPlacementInsidePolygon:{gridangle:0,gridtype:"Fixed",offsetx:0,offsety:0,randomness:100,seed:0,shiftoddrows:!1,stepx:16,stepy:16,clipping:"ClipAtBoundary"},CIMMarkerPlacementOnLine:{relativeto:"LineMiddle",startpointoffset:0,angletoline:!0,offset:0},CIMMarkerPlacementOnVertices:{placeperpart:!0,placeoncontrolpoints:!0,placeonendpoints:!0,placeonregularvertices:!0,angletoline:!0,offset:0},CIMMarkerPlacementPolygonCenter:{method:"OnPolygon",offsetx:0,offsety:0,clipatboundary:!1},CIMAnimatedSymbolProperties:{playanimation:!1,reverseanimation:!1,randomizestarttime:!1,randomizestartseed:0,starttimeoffset:0,duration:3,endingduration:3,useendingduration:!1,repeattype:"Loop",repeatdelay:0,easing:"Linear"},CIMSymbolAnimationSize:{tosize:10},CIMSymbolAnimationScale:{scalefactor:1},CIMSymbolAnimationColor:{tocolor:[255,255,255,1],colormode:"Multiply"},CIMSymbolAnimationTransparency:{totransparency:0},CIMSymbolAnimationRotation:{torotation:0,rotateclockwise:!1},CIMSymbolAnimationOffset:{offsetx:0,offsety:0},CIMSymbolAnimationMoveAlongLine:{speed:30,distanceAlong:100}};export{t as defaultCIMColor,o as defaultCIMValues};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
class e{static{this.instance=null}static local(){return null===e.instance&&(e.instance=new e),e.instance}execute(e,s){return new t(e,s)}}class t{constructor(e,t){this._inputGeometries=e,this._angleTolerance=void 0!==t.angleTolerance?t.angleTolerance:120,this._maxCosAngle=Math.cos((1-Math.abs(this._angleTolerance)/180)*Math.PI)}next(){let e=this._inputGeometries.next();if(!e)return null;for(;e;){if("esriGeometryPolygon"===e.geometryType)this._isClosed=!0;else if("esriGeometryPolyline"===e.geometryType)this._isClosed=!1;else{if("esriGeometryEnvelope"!==e.geometryType){e=this._inputGeometries.next();continue}if(this._maxCosAngle)return e;this._isClosed=!0}for(;e.nextPath();)this._processPath(e);return e.reset(),e}return null}_processPath(e){if(e.nextPoint()){const t=e.x,s=e.y;let n=t,i=s,o=e.pathSize,l=0,r=0,a=0,h=0,c=0,_=0;this._isClosed&&++o;for(let u=1;e.nextPoint()||u<o;++u){let x,m;this._isClosed&&u===o-1?(x=t,m=s):(x=e.x,m=e.y);const y=x-n,g=m-i,C=Math.sqrt(y*y+g*g);if(u>1&&C>0&&a>0){(l*y+r*g)/C/a<=this._maxCosAngle&&e.setControlPointAt(u-1)}1===u&&(h=y,c=g,_=C),C>0&&(n=x,i=m,l=y,r=g,a=C)}if(this._isClosed&&a>0&&_>0){(l*h+r*c)/_/a<=this._maxCosAngle&&e.setControlPointAt(0)}}}}export{e as EffectAddControlPoints};
|
|
2
|
+
class e{static{this.instance=null}static local(){return null===e.instance&&(e.instance=new e),e.instance}execute(e,s,n){return new t(e,s)}}class t{constructor(e,t){this._inputGeometries=e,this._angleTolerance=void 0!==t.angleTolerance?t.angleTolerance:120,this._maxCosAngle=Math.cos((1-Math.abs(this._angleTolerance)/180)*Math.PI)}next(){let e=this._inputGeometries.next();if(!e)return null;for(;e;){if("esriGeometryPolygon"===e.geometryType)this._isClosed=!0;else if("esriGeometryPolyline"===e.geometryType)this._isClosed=!1;else{if("esriGeometryEnvelope"!==e.geometryType){e=this._inputGeometries.next();continue}if(this._maxCosAngle)return e;this._isClosed=!0}for(;e.nextPath();)this._processPath(e);return e.reset(),e}return null}_processPath(e){if(e.nextPoint()){const t=e.x,s=e.y;let n=t,i=s,o=e.pathSize,l=0,r=0,a=0,h=0,c=0,_=0;this._isClosed&&++o;for(let u=1;e.nextPoint()||u<o;++u){let x,m;this._isClosed&&u===o-1?(x=t,m=s):(x=e.x,m=e.y);const y=x-n,g=m-i,C=Math.sqrt(y*y+g*g);if(u>1&&C>0&&a>0){(l*y+r*g)/C/a<=this._maxCosAngle&&e.setControlPointAt(u-1)}1===u&&(h=y,c=g,_=C),C>0&&(n=x,i=m,l=y,r=g,a=C)}if(this._isClosed&&a>0&&_>0){(l*h+r*c)/_/a<=this._maxCosAngle&&e.setControlPointAt(0)}}}}export{e as EffectAddControlPoints};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{GeometryCursor as t}from"../../../geometry/GeometryCursor.js";import{collectPath as e}from"../../../geometry/geometryCursorCollectUtils.js";import{PathEffectCursor as r}from"../CIMCursor.js";import{CurveHelper as n,pixelTolerance as o}from"../CurveHelper.js";const s=1.7320508075688772,i=5,c="OpenEnded";class u{static{this.instance=null}static local(){return null===u.instance&&(u.instance=new u),u.instance}execute(t,e,r){return new h(t,e,r)}}class h extends r{constructor(t,e,r){super(t,!1,!0),this._curveHelper=new n
|
|
2
|
+
import{GeometryCursor as t}from"../../../geometry/GeometryCursor.js";import{collectPath as e}from"../../../geometry/geometryCursorCollectUtils.js";import{PathEffectCursor as r}from"../CIMCursor.js";import{CurveHelper as n,pixelTolerance as o}from"../CurveHelper.js";const s=1.7320508075688772,i=5,c="OpenEnded";class u{static{this.instance=null}static local(){return null===u.instance&&(u.instance=new u),u.instance}execute(t,e,r){return new h(t,e,r)}}class h extends r{constructor(t,e,r){super(t,!1,!0),this._curveHelper=new n;const s=r.geomUnitsPerPoint;this._width=(void 0!==e.width?e.width:i)*s,this._arrowType=void 0!==e.geometricEffectArrowType?e.geometricEffectArrowType:void 0!==e.arrowType?e.arrowType:c,this._offsetFlattenError=o*s}processPath(e){const r=t.createEmptyOptimizedCIM(e.geometryType);switch(this._arrowType){case"OpenEnded":default:this._constructSimpleArrow(r,e,!0);break;case"Block":this._constructSimpleArrow(r,e,!1);break;case"Crossed":this._constructCrossedArrow(r,e)}return r}_constructSimpleArrow(t,r,n){const o=r.pathLength();let s=this._width;o<2*s&&(s=o/2);const i=this._curveHelper.getSubCurve(r,0,o-s);if(!i||!i.nextPath())return;i.seekPathStart();const c=s/2;if(this._curveHelper.isEmpty(i))return;const u=e(i),h=this._constructOffset(u,-c);if(!h)return;const P=this._constructOffset(u,c);if(!P)return;const l=this._constructArrowBasePoint(h,-c/2);if(!l)return;const p=this._constructArrowBasePoint(P,c/2);if(!p)return;r.seekInPath(r.pathSize-1);const a=[r.x,r.y];t.pushPath(P),t.nextPath(),t.nextPoint(),t.setControlPoint(),t.pushPoint(p),t.nextPoint(),t.setControlPoint(),t.pushPoint(a),t.nextPoint(),t.setControlPoint(),t.pushPoint(l),t.nextPoint(),t.setControlPoint(),t.pushPoints(h.reverse()),t.setControlPoint(),n||(t.setControlPointAt(0),t.setControlPointAt(t.pathSize-1),t.pushPoint(P[0])),t.reset()}_constructCrossedArrow(t,r){const n=r.pathLength();let o=this._width;n<o*(1+s+1)&&(o=n/(1+s+1)),r.seekPathStart();const i=this._curveHelper.getSubCurve(r,0,n-o*(1+s));if(!i)return;i.nextPath();const c=o/2;if(this._curveHelper.isEmpty(i))return;const u=e(i),h=this._constructOffset(u,c);if(!h)return;const P=this._constructOffset(u,-c);if(!P)return;const l=this._curveHelper.getSubCurve(r,0,n-o);if(!l)return;if(l.nextPath(),this._curveHelper.isEmpty(l))return;const p=e(l),a=this._constructOffset(p,c);if(!a)return;const f=this._constructOffset(p,-c);if(!f)return;const _=a[a.length-1],C=this._constructArrowBasePoint(a,c/2);if(!C)return;const m=f[f.length-1],w=this._constructArrowBasePoint(f,-c/2);if(!w)return;r.seekInPath(r.pathSize-1);const x=[r.x,r.y];t.pushPath(h),t.nextPath(),t.nextPoint(),t.setControlPoint(),t.pushPoint(m),t.nextPoint(),t.setControlPoint(),t.pushPoint(w),t.nextPoint(),t.setControlPoint(),t.pushPoint(x),t.nextPoint(),t.setControlPoint(),t.pushPoint(C),t.nextPoint(),t.setControlPoint(),t.pushPoint(_),t.nextPoint(),t.setControlPoint(),t.pushPoints(P.reverse()),t.nextPoint(),t.setControlPoint(),t.reset()}_constructOffset(t,e){return this._curveHelper.offset(t,e,"Rounded",4,this._offsetFlattenError)}_constructArrowBasePoint(t,e){if(!t||t.length<2)return null;const r=t[t.length-2],n=t[t.length-1],o=[n[0]-r[0],n[1]-r[1]];return this._curveHelper.normalize(o),[n[0]+o[1]*e,n[1]-o[0]*e]}}export{u as EffectArrow};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{GeometryCursor as e}from"../../../geometry/GeometryCursor.js";import{collectMultipath as t}from"../../../geometry/geometryCursorCollectUtils.js";import i from"../../../geometry/SpatialReference.js";import{clipCursorToTileExtent as s,lazyBufferOperator as r}from"../CIMEffects.js";import{CurveHelper as n,pixelTolerance as o}from"../CurveHelper.js";class m{static{this.instance=null}static local(){return null===m.instance&&(m.instance=new m),m.instance}execute(e,t,i
|
|
2
|
+
import{GeometryCursor as e}from"../../../geometry/GeometryCursor.js";import{collectMultipath as t}from"../../../geometry/geometryCursorCollectUtils.js";import i from"../../../geometry/SpatialReference.js";import{clipCursorToTileExtent as s,lazyBufferOperator as r}from"../CIMEffects.js";import{CurveHelper as n,pixelTolerance as o}from"../CurveHelper.js";class m{static{this.instance=null}static local(){return null===m.instance&&(m.instance=new m),m.instance}execute(e,t,i){return new l(e,t,i)}}class l{constructor(e,t,i){const s=i.geomUnitsPerPoint,r=i.tileKey,m=i.maxInflateSize;this._preventClipping=i.preventClipping,this._inputGeometries=e,this._tileKey=r,this._curveHelper=new n,this._size=(void 0!==t.size?t.size:1)*s,this._maxInflateSize=m*s,this._offsetFlattenError=o*s}next(){let n;for(;n=this._inputGeometries.next();){if(0===this._size)return n;if("esriGeometryEnvelope"===n.geometryType)if(this._size>0){const i=e.createEmptyOptimizedCIM(n.geometryType),s=t(n)[0],r=this._curveHelper.offset(s,this._size,"Rounded",4,this._offsetFlattenError);if(r)return i.pushPath(r),i}else if(this._size<0){const t=n.asJSON();if(Math.min(t.xmax-t.xmin,t.ymax-t.ymin)+2*this._size>0)return e.fromJSONCIM({xmin:t.xmin-this._size,xmax:t.xmax+this._size,ymin:t.ymin-this._size,ymax:t.ymax+this._size})}const o=!this._preventClipping&&this._tileKey?s(n,this._maxInflateSize,!0):n;if(!o)continue;const m=r.module,l={...o.asJSON(),spatialReference:{wkid:i.WebMercator.wkid}},a=m.execute(l,this._size);return a?e.fromJSONCIM(a):null}return null}}export{m as EffectBuffer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{GeometryCursor as s}from"../../../geometry/GeometryCursor.js";import{collectMultipath as t}from"../../../geometry/geometryCursorCollectUtils.js";import{getPathLength as i}from"../../../geometry/support/coordsUtils.js";import{setId as h}from"../CIMCursor.js";class e{static{this.instance=null}static local(){return null===e.instance&&(e.instance=new e),e.instance}execute(s,t,i){return new r(s,t,i)}}class r{constructor(s,t,i){this._defaultPointSize=20,this._inputGeometries=s,this._geomUnitsPerPoint=i,this._rule=t.rule??"FullGeometry",this._defaultSize=this._defaultPointSize*i}next(){let i;for(;i=this._inputGeometries.next();){const h=this._processGeom(t(i));if(h?.length)return s.fromJSONCIM({paths:h})}return null}_clone(s){return[s[0],s[1]]}_mid(s,t){return[(s[0]+t[0])/2,(s[1]+t[1])/2]}_mix(s,t,i,h){return[s[0]*t+i[0]*h,s[1]*t+i[1]*h]}_add(s,t){return[s[0]+t[0],s[1]+t[1]]}_add2(s,t,i){return[s[0]+t,s[1]+i]}_sub(s,t){return[s[0]-t[0],s[1]-t[1]]}_dist(s,t){return Math.sqrt((s[0]-t[0])*(s[0]-t[0])+(s[1]-t[1])*(s[1]-t[1]))}_norm(s){return Math.sqrt(s[0]*s[0]+s[1]*s[1])}_normalize(s,t=1){const i=t/this._norm(s);s[0]*=i,s[1]*=i}_leftPerpendicular(s){const t=-s[1],i=s[0];s[0]=t,s[1]=i}_leftPerp(s){return[-s[1],s[0]]}_rightPerpendicular(s){const t=s[1],i=-s[0];s[0]=t,s[1]=i}_rightPerp(s){return[s[1],-s[0]]}_dotProduct(s,t){return s[0]*t[0]+s[1]*t[1]}_crossProduct(s,t){return s[0]*t[1]-s[1]*t[0]}_rotateDirect(s,t,i){const h=s[0]*t-s[1]*i,e=s[0]*i+s[1]*t;s[0]=h,s[1]=e}_makeCtrlPt(s){const t=[s[0],s[1]];return h(t,1),t}_addAngledTicks(s,t,i,h){const e=this._sub(i,t);this._normalize(e);const r=this._crossProduct(e,this._sub(h,t));let _;_=r>0?this._rightPerp(e):this._leftPerp(e);const c=Math.abs(r)/2,u=[];u.push([t[0]+(_[0]-e[0])*c,t[1]+(_[1]-e[1])*c]),u.push(t),u.push(i),u.push([i[0]+(_[0]+e[0])*c,i[1]+(_[1]+e[1])*c]),s.push(u)}_addBezier2(s,t,i,h,e){if(0===e--)return void s.push(h);const r=this._mid(t,i),_=this._mid(i,h),c=this._mid(r,_);this._addBezier2(s,t,r,c,e),this._addBezier2(s,c,_,h,e)}_addBezier3(s,t,i,h,e,r){if(0===r--)return void s.push(e);const _=this._mid(t,i),c=this._mid(i,h),u=this._mid(h,e),o=this._mid(_,c),a=this._mid(c,u),n=this._mid(o,a);this._addBezier3(s,t,_,o,n,r),this._addBezier3(s,n,a,u,e,r)}_add90DegArc(s,t,i,h,e){const r=e??this._crossProduct(this._sub(i,t),this._sub(h,t))>0,_=this._mid(t,i),c=this._sub(_,t);r?this._leftPerpendicular(c):this._rightPerpendicular(c),_[0]+=c[0],_[1]+=c[1],this._addBezier3(s,t,this._mix(t,.33333,_,.66667),this._mix(i,.33333,_,.66667),i,4)}_addArrow(s,t,i){const h=t[0],e=t[1],r=t[t.length-1],_=this._sub(h,e),c=this._norm(_);this._normalize(_);const u=Math.abs(this._crossProduct(_,this._sub(r,e)));let o=this._dotProduct(_,this._sub(r,e));o<.05*c?o=.05*c:o>.95*c&&(o=.95*c);const a=.5*u,n=this._leftPerp(_),p=[e[0]+_[0]*o,e[1]+_[1]*o],d=t.length-1,l=[];l.push(i?[-n[0],-n[1]]:n);let b=[-_[0],-_[1]];for(let P=1;P<d-1;P++){const s=this._sub(t[P+1],t[P]);this._normalize(s);const i=this._dotProduct(s,b),h=this._crossProduct(s,b),e=Math.sqrt((1+i)/2),r=this._sub(s,b);this._normalize(r),r[0]/=e,r[1]/=e,l.push(h<0?[-r[0],-r[1]]:r),b=s}l.push(this._rightPerp(b));for(let P=l.length-1;P>0;P--)s.push([t[P][0]+l[P][0]*a,t[P][1]+l[P][1]*a]);s.push([p[0]+l[0][0]*a,p[1]+l[0][1]*a]),s.push([p[0]+l[0][0]*u,p[1]+l[0][1]*u]),s.push(h),s.push([p[0]-l[0][0]*u,p[1]-l[0][1]*u]),s.push([p[0]-l[0][0]*a,p[1]-l[0][1]*a]);for(let P=1;P<l.length;P++)s.push([t[P][0]-l[P][0]*a,t[P][1]-l[P][1]*a])}_addDash(s,t,i){const h=this._norm(i)/7;this._normalize(i);let e=[];for(let r=0;r<=7;r++)e.push([t[0]+i[0]*r*h,t[1]+i[1]*r*h]),1&r&&(s.push(e),e=[])}_cp2(s,t,i){return s.length>=2?s[1]:this._add2(s[0],t*this._defaultSize,i*this._defaultSize)}_cp3(s,t,i,h){if(s.length>=3)return s[2];const e=this._mix(s[0],1-i,t,i),r=this._sub(t,s[0]);return this._normalize(r),this._rightPerpendicular(r),[e[0]+r[0]*h*this._defaultSize,e[1]+r[1]*h*this._defaultSize]}_arrowPath(s){if(s.length>2)return s;const t=s[0],i=this._cp2(s,-4,0),h=this._sub(t,i);this._normalize(h);const e=this._rightPerp(h);return[t,i,[t[0]+(e[0]-h[0])*this._defaultSize,t[1]+(e[1]-h[1])*this._defaultSize]]}_arrowLastSeg(s){const t=s[0],i=this._cp2(s,-4,0);let h;if(s.length>=3)h=s[s.length-1];else{const s=this._sub(t,i);this._normalize(s);const e=this._rightPerp(s);h=[t[0]+(e[0]-s[0])*this._defaultSize,t[1]+(e[1]-s[1])*this._defaultSize]}return[i,h]}_processGeom(s){if(!s)return null;const t=[];for(const e of s){const s=e.length>1&&i(e)<this._defaultSize;if(!e||0===e.length||s)continue;const r=e.length;let _=e[0];switch(this._rule){case"PerpendicularFromFirstSegment":{const s=this._cp2(e,0,-1),i=this._cp3(e,s,.5,4),h=[];h.push(i),h.push(this._mid(_,s)),t.push(h);break}case"ReversedFirstSegment":{const s=this._cp2(e,0,-1);t.push([s,_]);break}case"PerpendicularToSecondSegment":{if(e.length<3)return[];const s=this._cp2(e,-4,1),i=this._cp3(e,s,.882353,-1.94),h=[];h.push(this._mid(s,i)),h.push(_),t.push(h);break}case"SecondSegmentWithTicks":{if(e.length<3)return[];const s=this._cp2(e,-4,1),i=this._cp3(e,s,.882353,-1.94),h=this._sub(i,s);let r;r=this._crossProduct(h,this._sub(_,s))>0?this._rightPerp(h):this._leftPerp(h);const c=[];c.push([s[0]+(r[0]-h[0])/3,s[1]+(r[1]-h[1])/3]),c.push(s),c.push(i),c.push([i[0]+(r[0]+h[0])/3,i[1]+(r[1]+h[1])/3]),t.push(c);break}case"DoublePerpendicular":{const s=this._cp2(e,0,-1),i=this._cp3(e,s,.5,3),h=this._mid(_,s),r=this._sub(h,i);this._normalize(r);const c=this._crossProduct(r,this._sub(_,i));this._leftPerpendicular(r);const u=[];u.push(_),u.push([i[0]+r[0]*c,i[1]+r[1]*c]),t.push(u);const o=[];o.push([i[0]-r[0]*c,i[1]-r[1]*c]),o.push(s),t.push(o);break}case"OppositeToFirstSegment":{const s=this._cp2(e,0,-1),i=this._cp3(e,s,.5,3),h=this._mid(_,s),r=this._sub(h,i);this._normalize(r);const c=this._crossProduct(r,this._sub(_,i));this._leftPerpendicular(r);const u=[];u.push([i[0]+r[0]*c,i[1]+r[1]*c]),u.push([i[0]-r[0]*c,i[1]-r[1]*c]),t.push(u);break}case"TriplePerpendicular":{const s=this._cp2(e,0,-1),i=this._cp3(e,s,.5,4),h=this._mid(_,s),r=this._sub(h,i);this._normalize(r);const c=this._crossProduct(r,this._sub(_,i));this._leftPerpendicular(r);const u=[];u.push([i[0]+r[0]*c*.8,i[1]+r[1]*c*.8]),u.push([h[0]+.8*(_[0]-h[0]),h[1]+.8*(_[1]-h[1])]),t.push(u),t.push([i,h]);const o=[];o.push([i[0]-r[0]*c*.8,i[1]-r[1]*c*.8]),o.push([h[0]+.8*(s[0]-h[0]),h[1]+.8*(s[1]-h[1])]),t.push(o);break}case"HalfCircleFirstSegment":{const s=this._cp2(e,0,-1),i=this._cp3(e,s,.5,4),h=this._mid(_,s);let r=this._sub(s,_);const c=Math.cos(Math.PI/18),u=Math.sin(Math.PI/18),o=Math.sqrt((1+c)/2),a=Math.sqrt((1-c)/2),n=[];let p;this._crossProduct(r,this._sub(i,_))>0?(n.push(_),r=this._sub(_,h),p=s):(n.push(s),r=this._sub(s,h),p=_),this._rotateDirect(r,o,a),r[0]/=o,r[1]/=o;for(let t=1;t<=18;t++)n.push(this._add(h,r)),this._rotateDirect(r,c,u);n.push(p),t.push(n);break}case"HalfCircleSecondSegment":{const s=this._cp2(e,0,-1),i=this._cp3(e,s,1,-1);let h=this._sub(_,s);this._normalize(h);const r=this._crossProduct(h,this._sub(i,s))/2;this._leftPerpendicular(h);const c=[s[0]+h[0]*r,s[1]+h[1]*r];h=this._sub(s,c);const u=Math.cos(Math.PI/18);let o=Math.sin(Math.PI/18);r>0&&(o=-o);const a=[s];for(let t=1;t<=18;t++)this._rotateDirect(h,u,o),a.push(this._add(c,h));t.push(a);break}case"HalfCircleExtended":{const s=this._cp2(e,0,-2),i=this._cp3(e,s,1,-1);let h;if(r>=4)h=e[3];else{const t=this._sub(_,s);h=this._add(i,t)}const c=this._dist(s,i)/2/.75,u=this._sub(s,_);this._normalize(u,c);const o=this._sub(i,h);this._normalize(o,c);const a=[h,i];t.push(a);const n=[this._clone(i)];this._addBezier3(n,i,this._add(i,o),this._add(s,u),s,4),n.push(_),t.push(n);break}case"OpenCircle":{const s=this._cp2(e,-2,0),i=this._sub(s,_),h=Math.cos(Math.PI/18),r=-Math.sin(Math.PI/18),c=[s];for(let t=1;t<=33;t++)this._rotateDirect(i,h,r),c.push(this._add(_,i));t.push(c);break}case"CoverageEdgesWithTicks":{const s=this._cp2(e,0,-1);let i,h;if(r>=3)i=e[2];else{const t=this._sub(s,_),h=this._leftPerp(t);i=[_[0]+h[0]-.25*t[0],_[1]+h[1]-.25*t[1]]}if(r>=4)h=e[3];else{const t=this._mid(_,s),e=this._sub(_,s);this._normalize(e),this._leftPerpendicular(e);const r=this._crossProduct(e,this._sub(i,t));this._rightPerpendicular(e),h=[i[0]+e[0]*r*2,i[1]+e[1]*r*2]}const c=this._sub(s,_);let u,o;u=this._crossProduct(c,this._sub(i,_))>0?this._rightPerp(c):this._leftPerp(c),o=[],o.push(i),o.push(_),o.push([_[0]+(u[0]-c[0])/3,_[1]+(u[1]-c[1])/3]),t.push(o),u=this._crossProduct(c,this._sub(h,s))>0?this._rightPerp(c):this._leftPerp(c),o=[],o.push([s[0]+(u[0]+c[0])/3,s[1]+(u[1]+c[1])/3]),o.push(s),o.push(h),t.push(o);break}case"GapExtentWithDoubleTicks":{const s=this._cp2(e,0,2),i=this._cp3(e,s,0,1);let h;if(r>=4)h=e[3];else{const t=this._sub(s,_);h=this._add(i,t)}this._addAngledTicks(t,_,s,this._mid(i,h)),this._addAngledTicks(t,i,h,this._mid(_,s));break}case"GapExtentMidline":{const s=this._cp2(e,2,0),i=this._cp3(e,s,0,1);let h;if(r>=4)h=e[3];else{const t=this._sub(s,_);h=this._add(i,t)}const c=[];c.push(this._mid(_,i)),c.push(this._mid(s,h)),t.push(c);break}case"Chevron":{const s=this._cp2(e,-1,-1);let i;if(r>=3)i=e[2];else{const t=this._sub(s,_);this._leftPerpendicular(t),i=this._add(_,t)}t.push([s,this._makeCtrlPt(_),i]);break}case"PerpendicularWithArc":{const s=this._cp2(e,0,-2),i=this._cp3(e,s,.5,-1),h=this._sub(s,_),c=this._norm(h);h[0]/=c,h[1]/=c;const u=this._crossProduct(h,this._sub(i,_));let o=this._dotProduct(h,this._sub(i,_));o<.05*c?o=.05*c:o>.95*c&&(o=.95*c);const a=[_[0]+h[0]*o,_[1]+h[1]*o];let n=this._leftPerp(h),p=[];if(p.push([a[0]-n[0]*u,a[1]-n[1]*u]),p.push([a[0]+n[0]*u,a[1]+n[1]*u]),t.push(p),r>=4){const s=e[3];let i=this._dotProduct(h,this._sub(s,_));i<.1*c?i=.1*c:i>.9*c&&(i=.9*c);const r=[_[0]+h[0]*i,_[1]+h[1]*i],u=this._crossProduct(h,this._sub(s,_)),o=[];o.push([r[0]-n[0]*u,r[1]-n[1]*u]),o.push([r[0]+n[0]*u,r[1]+n[1]*u]),t.push(o)}const d=[s[0]+n[0]*u,s[1]+n[1]*u];n=this._sub(s,d);const l=Math.cos(Math.PI/18);let b=Math.sin(Math.PI/18);u<0&&(b=-b),p=[_,s];for(let t=1;t<=9;t++)this._rotateDirect(n,l,b),p.push(this._add(d,n));t.push(p);break}case"ClosedHalfCircle":{const s=this._cp2(e,2,0),i=this._mid(_,s),h=this._sub(s,i),r=Math.cos(Math.PI/18),c=Math.sin(Math.PI/18),u=[_,s];for(let t=1;t<=18;t++)this._rotateDirect(h,r,c),u.push(this._add(i,h));t.push(u);break}case"TripleParallelExtended":{const s=this._cp2(e,0,-2),i=this._cp3(e,s,1,-2),r=this._mid(_,s),c=this._sub(i,s);this._normalize(c);const u=Math.abs(this._crossProduct(c,this._sub(r,s)))/2,o=this._dist(s,i),a=[s,_];a.push([_[0]+c[0]*o*.5,_[1]+c[1]*o*.5]),t.push(a);const n=[];n.push([r[0]-c[0]*u,r[1]-c[1]*u]),n.push([r[0]+c[0]*o*.375,r[1]+c[1]*o*.375]),h(n[n.length-1],1),n.push([r[0]+c[0]*o*.75,r[1]+c[1]*o*.75]),t.push(n);const p=[s,i];t.push(p);break}case"ParallelWithTicks":{const s=this._cp2(e,3,0),i=this._cp3(e,s,.5,-1),h=this._sub(i,s);this._normalize(h);const r=this._crossProduct(h,this._sub(i,_));this._leftPerpendicular(h),this._addAngledTicks(t,_,s,i),this._addAngledTicks(t,this._mix(_,1,h,r),this._mix(s,1,h,r),this._mid(_,s));break}case"Parallel":{const s=this._cp2(e,3,0),i=this._cp3(e,s,.5,-1),h=this._sub(s,_);this._normalize(h);const r=this._leftPerp(h),c=this._crossProduct(h,this._sub(i,_));let u=[_,s];t.push(u),u=[],u.push([_[0]+r[0]*c,_[1]+r[1]*c]),u.push([s[0]+r[0]*c,s[1]+r[1]*c]),t.push(u);break}case"PerpendicularToFirstSegment":{const s=this._cp2(e,3,0),i=this._cp3(e,s,.5,-1),h=this._mid(_,s),r=this._sub(s,_);this._normalize(r);const c=this._crossProduct(r,this._sub(i,_));this._leftPerpendicular(r);const u=[];u.push([h[0]-r[0]*c*.25,h[1]-r[1]*c*.25]),u.push([h[0]+r[0]*c*1.25,h[1]+r[1]*c*1.25]),t.push(u);break}case"ParallelOffset":{const s=this._cp2(e,3,0),i=this._cp3(e,s,.5,-1),h=this._sub(s,_);this._normalize(h);const r=this._crossProduct(h,this._sub(i,_));this._leftPerpendicular(h);const c=[];c.push([_[0]-h[0]*r,_[1]-h[1]*r]),c.push([s[0]-h[0]*r,s[1]-h[1]*r]),t.push(c);const u=[];u.push([_[0]+h[0]*r,_[1]+h[1]*r]),u.push([s[0]+h[0]*r,s[1]+h[1]*r]),t.push(u);break}case"OffsetOpposite":{const s=this._cp2(e,3,0),i=this._cp3(e,s,.5,-1),h=this._sub(s,_);this._normalize(h);const r=this._crossProduct(h,this._sub(i,_));this._leftPerpendicular(h);const c=[];c.push([_[0]-h[0]*r,_[1]-h[1]*r]),c.push([s[0]-h[0]*r,s[1]-h[1]*r]),t.push(c);break}case"OffsetSame":{const s=this._cp2(e,3,0),i=this._cp3(e,s,.5,-1),h=this._sub(s,_);this._normalize(h);const r=this._crossProduct(h,this._sub(i,_));this._leftPerpendicular(h);const c=[];c.push([_[0]+h[0]*r,_[1]+h[1]*r]),c.push([s[0]+h[0]*r,s[1]+h[1]*r]),t.push(c);break}case"CircleWithArc":{let s=this._cp2(e,3,0);const i=this._cp3(e,s,.5,-1);let c,u;if(r>=4)c=e[3],u=this._crossProduct(this._sub(c,s),this._sub(i,s))>0;else{c=s,u=this._crossProduct(this._sub(c,_),this._sub(i,_))>0;const t=24*this._geomUnitsPerPoint,h=this._sub(c,_);this._normalize(h,t);const e=Math.sqrt(2)/2;this._rotateDirect(h,e,u?e:-e),s=this._add(_,h)}const o=this._sub(s,_),a=Math.cos(Math.PI/18),n=Math.sin(Math.PI/18),p=[s];for(let t=1;t<=36;t++)this._rotateDirect(o,a,n),p.push(this._add(_,o));this._add90DegArc(p,s,c,i,u),h(p[p.length-8],1),t.push(p);break}case"DoubleJog":{let s,i=this._cp2(e,-3,1),h=this._cp3(e,i,-1,-.5);if(r>=4)s=e[3];else{const t=_;_=i,s=h;const e=this._dist(_,t),r=this._dist(s,t);let c=30*this._geomUnitsPerPoint;.5*e<c&&(c=.5*e),.5*r<c&&(c=.5*r),i=this._mix(_,c/e,t,(e-c)/e),h=this._mix(s,c/r,t,(r-c)/r)}const c=this._mid(_,i),u=this._mid(s,h),o=this._dist(_,i),a=this._dist(h,s);let n=Math.min(o,a)/8;n=Math.min(n,24*this._geomUnitsPerPoint);const p=Math.cos(Math.PI/4);let d=this._sub(_,i);this._normalize(d,n),this._crossProduct(d,this._sub(s,i))>0?this._rotateDirect(d,p,-p):this._rotateDirect(d,p,p);let l=[];l.push(i),l.push(this._add(c,d)),l.push(this._sub(c,d)),l.push(_),t.push(l),d=this._sub(s,h),this._normalize(d,n),this._crossProduct(d,this._sub(_,h))<0?this._rotateDirect(d,p,p):this._rotateDirect(d,p,-p),l=[],l.push(h),l.push(this._add(u,d)),l.push(this._sub(u,d)),l.push(s),t.push(l);break}case"PerpendicularOffset":{const s=this._cp2(e,-4,1),i=this._cp3(e,s,.882353,-1.94),h=this._sub(i,s);this._crossProduct(h,this._sub(_,s))>0?this._rightPerpendicular(h):this._leftPerpendicular(h);const r=[h[0]/8,h[1]/8],c=this._sub(this._mid(s,i),r);t.push([c,_]);break}case"LineExcludingLastSegment":{const s=this._arrowPath(e),i=[];let h=s.length-2;for(;h--;)i.push(s[h]);t.push(i);break}case"MultivertexArrow":{const s=this._arrowPath(e),i=[];this._addArrow(i,s,!1),t.push(i);break}case"CrossedArrow":{const s=this._arrowPath(e),i=[];this._addArrow(i,s,!0),t.push(i);break}case"ChevronArrow":{const[s,i]=this._arrowLastSeg(e),h=10*this._geomUnitsPerPoint,r=this._sub(_,s),c=this._norm(r);this._normalize(r);const u=this._crossProduct(r,this._sub(i,s));let o=this._dotProduct(r,this._sub(i,s));o<.05*c?o=.05*c:o>.95*c-h&&(o=.95*c-h);const a=[s[0]+r[0]*o,s[1]+r[1]*o],n=this._leftPerp(r),p=[];p.push([a[0]+n[0]*u+r[0]*h,a[1]+n[1]*u+r[1]*h]),p.push(_),p.push([a[0]-n[0]*u+r[0]*h,a[1]-n[1]*u+r[1]*h]),t.push(p);break}case"ChevronArrowOffset":{const[s,i]=this._arrowLastSeg(e),h=this._sub(_,s),r=this._norm(h);this._normalize(h);const c=this._crossProduct(h,this._sub(i,s));let u=this._dotProduct(h,this._sub(i,s));u<.05*r?u=.05*r:u>.95*r&&(u=.95*r);const o=[s[0]+h[0]*u,s[1]+h[1]*u];this._leftPerpendicular(h);const a=[];a.push([o[0]+h[0]*c*.5,o[1]+h[1]*c*.5]),a.push(this._mid(o,_)),a.push([o[0]-h[0]*c*.5,o[1]-h[1]*c*.5]),t.push(a);break}case"PartialFirstSegment":{const[s,i]=this._arrowLastSeg(e),h=this._sub(_,s),r=this._norm(h);this._normalize(h);let c=this._dotProduct(h,this._sub(i,s));c<.05*r?c=.05*r:c>.95*r&&(c=.95*r);const u=[s[0]+h[0]*c,s[1]+h[1]*c];t.push([s,u]);break}case"Arch":{const s=this._cp2(e,0,-1),i=this._cp3(e,s,.5,1),h=this._sub(_,s),r=this._mix(i,1,h,.55),c=this._mix(i,1,h,-.55),u=[_];this._addBezier2(u,_,r,i,4),this._addBezier2(u,i,c,s,4),t.push(u);break}case"CurvedParallelTicks":{const s=this._cp2(e,-4,1),i=this._cp3(e,s,.882353,-1.94),h=this._sub(i,s);this._crossProduct(h,this._sub(_,s))>0?this._rightPerpendicular(h):this._leftPerpendicular(h);const r=[h[0]/8,h[1]/8],c=this._sub(this._mid(s,i),r),u=this._sub(this._mix(s,.75,i,.25),r),o=this._sub(this._mix(s,.25,i,.75),r),a=[s];this._addBezier2(a,s,u,c,3),this._addBezier2(a,c,o,i,3),t.push(a);for(let e=0;e<8;e++){const s=a[2*e+1],i=[this._clone(s)];i.push(this._add(s,[h[0]/4,h[1]/4])),t.push(i)}break}case"Arc90Degrees":{const s=this._cp2(e,0,-1),i=this._cp3(e,s,.5,1),h=[s];this._add90DegArc(h,s,_,i),t.push(h);break}case"TipWithPerpendicularAndTicks":{const[s,i]=this._arrowLastSeg(e),h=10*this._geomUnitsPerPoint,r=this._sub(_,s),c=this._norm(r);this._normalize(r);let u=this._crossProduct(r,this._sub(i,s)),o=this._dotProduct(r,this._sub(i,s));o<.05*c?o=.05*c:o>.95*c-h&&(o=.95*c-h);const a=this._leftPerp(r),n=[_[0]-r[0]*h,_[1]-r[1]*h],p=.5*Math.max(c-o-h,h);u=Math.abs(u);const d=[];d.push([n[0]+a[0]*(u+p)-r[0]*p,n[1]+a[1]*(u+p)-r[1]*p]),d.push([n[0]+a[0]*u,n[1]+a[1]*u]),d.push([n[0]-a[0]*u,n[1]-a[1]*u]),d.push([n[0]-a[0]*(u+p)-r[0]*p,n[1]-a[1]*(u+p)-r[1]*p]),t.push(d),t.push([n,_]);break}case"ConcentricCircles":{const s=this._cp2(e,1,0),i=this._cp3(e,s,2,0),c=Math.cos(Math.PI/18),u=Math.sin(Math.PI/18);let o=this._dist(s,_),a=[o,0],n=[];for(let t=0;t<=36;t++)n.push(this._add(_,a)),this._rotateDirect(a,c,u);if(t.push(n),r>=4){n=[];const s=e[3];o=this._dist(s,_),a=[o,0];for(let t=0;t<=36;t++)n.push(this._add(_,a)),0===t&&(n.push(this._add(_,a)),h(n[1],1)),this._rotateDirect(a,c,u);t.push(n)}n=[],o=this._dist(i,_),a=[o,0];for(let t=0;t<=36;t++)n.push(this._add(_,a)),this._rotateDirect(a,c,u);t.push(n);break}case"DoubleJogArrow":{_=this._arrowPath(e)[0];const[s,i]=this._arrowLastSeg(e),h=this._sub(_,s),r=this._norm(h);this._normalize(h);const c=Math.abs(this._crossProduct(h,this._sub(i,_)));let u=Math.abs(this._dotProduct(h,this._sub(i,_)));u<.05*r?u=.05*r:u>.95*r&&(u=.95*r);const o=Math.max(c,u),a=this._leftPerp(h);let n=[];const p=[_[0]-h[0]*u*.5+a[0]*c*.5,_[1]-h[1]*u*.5+a[1]*c*.5];n.push([p[0],p[1]]),p[0]+=h[0]*o*.5+a[0]*o*.4,p[1]+=h[1]*o*.5+a[1]*o*.4,n.push([p[0],p[1]]),p[0]-=a[0]*o*.25,p[1]-=a[1]*o*.25,n.push([p[0],p[1]]),p[0]+=h[0]*o*.5+a[0]*o*.4,p[1]+=h[1]*o*.5+a[1]*o*.4,n.push([p[0],p[1]]),t.push(n),n=[],p[0]=_[0]-h[0]*u*.5-a[0]*c*.5,p[1]=_[1]-h[1]*u*.5-a[1]*c*.5,n.push([p[0],p[1]]),p[0]+=h[0]*o*.5-a[0]*o*.4,p[1]+=h[1]*o*.5-a[1]*o*.4,n.push([p[0],p[1]]),p[0]+=a[0]*o*.25,p[1]+=a[1]*o*.25,n.push([p[0],p[1]]),p[0]+=h[0]*o*.5-a[0]*o*.4,p[1]+=h[1]*o*.5-a[1]*o*.4,n.push([p[0],p[1]]),t.push(n);break}case"LinkedChevrons":{const s=this._cp2(e,-5,0),i=this._cp3(e,s,-.2,1),h=this._sub(_,s);this._normalize(h);const r=this._leftPerp(h),c=Math.abs(this._crossProduct(h,this._sub(i,s)));t.push([s,_]);const u=[];u.push([_[0]-h[0]*c+r[0]*c,_[1]-h[1]*c+r[1]*c]),u.push(_),u.push([_[0]-h[0]*c-r[0]*c,_[1]-h[1]*c-r[1]*c]),t.push(u),this._addDash(t,s,[-h[0]*c+r[0]*c,-h[1]*c+r[1]*c]),this._addDash(t,s,[-h[0]*c-r[0]*c,-h[1]*c-r[1]*c]);break}case"SegmentThenHalfCircle":{const s=this._cp2(e,2,0),i=this._cp3(e,s,1.5,0);let h;h=r>=4?e[3]:this._cp3(e,s,1.25,-.5);const c=this._sub(s,_);this._normalize(c);const u=.5*this._dist(s,i),o=this._crossProduct(c,this._sub(h,_))>0,a=Math.cos(Math.PI/18);let n=Math.sin(Math.PI/18);o&&(n=-n);const p=[_,s];c[0]*=u,c[1]*=u;const d=this._add(s,c);c[0]=-c[0],c[1]=-c[1];for(let t=1;t<=18;t++)this._rotateDirect(c,a,n),p.push(this._add(d,c));t.push(p);break}case"LineWithStraightTicks":{const s=this._cp2(e,-2,1),i=this._cp3(e,s,-1,-.5),h=this._sub(i,s);this._normalize(h);const r=this._dotProduct(h,this._sub(s,_)),c=this._dotProduct(h,this._sub(i,_));let u=[_];u.push([_[0]+h[0]*r,_[1]+h[1]*r]),u.push(s),t.push(u),u=[_],u.push([_[0]+h[0]*c,_[1]+h[1]*c]),u.push(i),t.push(u);break}case"DoubleCurve":{const s=this._cp2(e,-5,-1),i=this._cp3(e,s,2,0),r=Math.atan2(1,5),c=Math.cos(r),u=Math.sin(r),o=this._sub(s,_),a=this._dist(_,s);this._normalize(o),this._rotateDirect(o,c,-u);const n=[_];n.push([_[0]+o[0]*a*.5,_[1]+o[1]*a*.5]),h(n[1],1),n.push([_[0]+o[0]*a*.8,_[1]+o[1]*a*.8]),this._addBezier2(n,n[2],[_[0]+o[0]*a,_[1]+o[1]*a],s,3);const p=this._sub(i,s),d=this._dist(s,i);this._normalize(p),this._rotateDirect(p,c,-u),this._addBezier2(n,s,[i[0]-p[0]*d,i[1]-p[1]*d],[i[0]-p[0]*d*.8,i[1]-p[1]*d*.8],3),n.push(i),t.push(n);break}case"ParallelWithTicksByWidth":{const s=this._cp2(e,0,-1),i=this._cp3(e,s,.5,3),h=this._sub(s,_);this._normalize(h);const r=this._crossProduct(h,this._sub(i,_));this._leftPerpendicular(h),r>0?(this._addAngledTicks(t,_,[_[0]+h[0]*r,_[1]+h[1]*r],s),this._addAngledTicks(t,s,[s[0]+h[0]*r,s[1]+h[1]*r],_)):(this._addAngledTicks(t,[_[0]+h[0]*r,_[1]+h[1]*r],_,s),this._addAngledTicks(t,[s[0]+h[0]*r,s[1]+h[1]*r],_,s));break}case"EnclosingRoundedRectangle":{const s=this._cp2(e,3,-2),t=[Math.min(_[0],s[0]),Math.max(_[1],s[1])],i=[Math.max(_[0],s[0]),Math.min(_[1],s[1])],h=i[0]-t[0],r=t[1]-i[1],c=Math.min(h,r)/10,u=[];u.push([t[0]+c+.75*(h-2*c),t[1]]),u.push([i[0]-c,t[1]]),this._add90DegArc(u,[i[0]-c,t[1]],[i[0],t[1]-c],[i[0],t[1]]),u.push([i[0],i[1]+c]),this._add90DegArc(u,[i[0],i[1]+c],[i[0]-c,i[1]],i),u.push([t[0]+c,i[1]]),this._add90DegArc(u,[t[0]+c,i[1]],[t[0],i[1]+c],[t[0],i[1]]),u.push([t[0],t[1]-c]),this._add90DegArc(u,[t[0],t[1]-c],[t[0]+c,t[1]],t),u.push([t[0]+c+.75*(h-2*c),t[1]]);break}default:t.push(e)}}return t}}export{e as EffectControlMeasureLine};
|
|
2
|
+
import{inchesPerMeter as s}from"../../../core/units.js";import{GeometryCursor as t}from"../../../geometry/GeometryCursor.js";import{collectMultipath as i}from"../../../geometry/geometryCursorCollectUtils.js";import h from"../../../geometry/SpatialReference.js";import{getPathLength as e}from"../../../geometry/support/coordsUtils.js";import{setId as r}from"../CIMCursor.js";import{lazyOffsetOperator as _}from"../CIMEffects.js";class c{static{this.instance=null}static local(){return null===c.instance&&(c.instance=new c),c.instance}execute(s,t,i){return new o(s,t,i)}}class o{constructor(s,t,i){this._defaultPointSize=20,this._inputGeometries=s,this._geomUnitsPerPoint=i.geomUnitsPerPoint??1,this._scale=i?.scale,this._rule=t.rule??"FullGeometry",this._spatialReference=i?.spatialReference??h.WebMercator,this._width=this._computeWidth(t.width??25),this._defaultSize=this._defaultPointSize*this._geomUnitsPerPoint}next(){let s;for(;s=this._inputGeometries.next();){const h=this._processGeom(i(s));if(h?.length)return t.fromJSONCIM({paths:h})}return null}_computeWidth(t){if(!u(this._rule)||null==this._scale||!this._spatialReference.metersPerUnit)return t*this._geomUnitsPerPoint;const i=this._scale/(96*s*this._spatialReference.metersPerUnit);return t/(this._spatialReference.metersPerUnit*i)}_clone(s){return[s[0],s[1]]}_mid(s,t){return[(s[0]+t[0])/2,(s[1]+t[1])/2]}_mix(s,t,i,h){return[s[0]*t+i[0]*h,s[1]*t+i[1]*h]}_add(s,t){return[s[0]+t[0],s[1]+t[1]]}_add2(s,t,i){return[s[0]+t,s[1]+i]}_sub(s,t){return[s[0]-t[0],s[1]-t[1]]}_dist(s,t){return Math.sqrt((s[0]-t[0])*(s[0]-t[0])+(s[1]-t[1])*(s[1]-t[1]))}_norm(s){return Math.sqrt(s[0]*s[0]+s[1]*s[1])}_normalize(s,t=1){const i=t/this._norm(s);s[0]*=i,s[1]*=i}_leftPerpendicular(s){const t=-s[1],i=s[0];s[0]=t,s[1]=i}_leftPerp(s){return[-s[1],s[0]]}_rightPerpendicular(s){const t=s[1],i=-s[0];s[0]=t,s[1]=i}_rightPerp(s){return[s[1],-s[0]]}_dotProduct(s,t){return s[0]*t[0]+s[1]*t[1]}_crossProduct(s,t){return s[0]*t[1]-s[1]*t[0]}_rotateDirect(s,t,i){const h=s[0]*t-s[1]*i,e=s[0]*i+s[1]*t;s[0]=h,s[1]=e}_makeCtrlPt(s){const t=[s[0],s[1]];return r(t,1),t}_addAngledTicks(s,t,i,h){const e=this._sub(i,t);this._normalize(e);const r=this._crossProduct(e,this._sub(h,t));let _;_=r>0?this._rightPerp(e):this._leftPerp(e);const c=Math.abs(r)/2,o=[];o.push([t[0]+(_[0]-e[0])*c,t[1]+(_[1]-e[1])*c]),o.push(t),o.push(i),o.push([i[0]+(_[0]+e[0])*c,i[1]+(_[1]+e[1])*c]),s.push(o)}_addBezier2(s,t,i,h,e){if(0===e--)return void s.push(h);const r=this._mid(t,i),_=this._mid(i,h),c=this._mid(r,_);this._addBezier2(s,t,r,c,e),this._addBezier2(s,c,_,h,e)}_addBezier3(s,t,i,h,e,r){if(0===r--)return void s.push(e);const _=this._mid(t,i),c=this._mid(i,h),o=this._mid(h,e),u=this._mid(_,c),a=this._mid(c,o),n=this._mid(u,a);this._addBezier3(s,t,_,u,n,r),this._addBezier3(s,n,a,o,e,r)}_add90DegArc(s,t,i,h,e){const r=e??this._crossProduct(this._sub(i,t),this._sub(h,t))>0,_=this._mid(t,i),c=this._sub(_,t);r?this._leftPerpendicular(c):this._rightPerpendicular(c),_[0]+=c[0],_[1]+=c[1],this._addBezier3(s,t,this._mix(t,.33333,_,.66667),this._mix(i,.33333,_,.66667),i,4)}_addArrow(s,t,i){const h=t[0],e=t[1],r=t[t.length-1],_=this._sub(h,e),c=this._norm(_);this._normalize(_);const o=Math.abs(this._crossProduct(_,this._sub(r,e)));let u=this._dotProduct(_,this._sub(r,e));u<.05*c?u=.05*c:u>.95*c&&(u=.95*c);const a=.5*o,n=this._leftPerp(_),p=[e[0]+_[0]*u,e[1]+_[1]*u],d=t.length-1,l=[];l.push(i?[-n[0],-n[1]]:n);let b=[-_[0],-_[1]];for(let m=1;m<d-1;m++){const s=this._sub(t[m+1],t[m]);this._normalize(s);const i=this._dotProduct(s,b),h=this._crossProduct(s,b),e=Math.sqrt((1+i)/2),r=this._sub(s,b);this._normalize(r),r[0]/=e,r[1]/=e,l.push(h<0?[-r[0],-r[1]]:r),b=s}l.push(this._rightPerp(b));for(let m=l.length-1;m>0;m--)s.push([t[m][0]+l[m][0]*a,t[m][1]+l[m][1]*a]);s.push([p[0]+l[0][0]*a,p[1]+l[0][1]*a]),s.push([p[0]+l[0][0]*o,p[1]+l[0][1]*o]),s.push(h),s.push([p[0]-l[0][0]*o,p[1]-l[0][1]*o]),s.push([p[0]-l[0][0]*a,p[1]-l[0][1]*a]);for(let m=1;m<l.length;m++)s.push([t[m][0]-l[m][0]*a,t[m][1]-l[m][1]*a])}_addDash(s,t,i){const h=this._norm(i)/7;this._normalize(i);let e=[];for(let r=0;r<=7;r++)e.push([t[0]+i[0]*r*h,t[1]+i[1]*r*h]),1&r&&(s.push(e),e=[])}_cp2(s,t,i){return s.length>=2?s[1]:this._add2(s[0],t*this._defaultSize,i*this._defaultSize)}_cp3(s,t,i,h){if(s.length>=3)return s[2];const e=this._mix(s[0],1-i,t,i),r=this._sub(t,s[0]);return this._normalize(r),this._rightPerpendicular(r),[e[0]+r[0]*h*this._defaultSize,e[1]+r[1]*h*this._defaultSize]}_arrowPath(s){if(s.length>2)return s;const t=s[0],i=this._cp2(s,-4,0),h=this._sub(t,i);this._normalize(h);const e=this._rightPerp(h);return[t,i,[t[0]+(e[0]-h[0])*this._defaultSize,t[1]+(e[1]-h[1])*this._defaultSize]]}_arrowLastSeg(s){const t=s[0],i=this._cp2(s,-4,0);let h;if(s.length>=3)h=s[s.length-1];else{const s=this._sub(t,i);this._normalize(s);const e=this._rightPerp(s);h=[t[0]+(e[0]-s[0])*this._defaultSize,t[1]+(e[1]-s[1])*this._defaultSize]}return[i,h]}_offsetPath(s,h){const e=_.module.execute({paths:[s],spatialReference:this._spatialReference.toJSON()},h,{joins:"miter",miterLimit:4}),[r]=i(t.fromJSONCIM(e));return r?.length?r:null}_processGeom(s){if(!s)return null;const t=[];for(const i of s){const s=i.length>1&&e(i)<this._defaultSize;if(!i||0===i.length||s)continue;const h=i.length;let _=i[0];switch(this._rule){case"PerpendicularFromFirstSegment":{const s=this._cp2(i,0,-1),h=this._cp3(i,s,.5,4),e=[];e.push(h),e.push(this._mid(_,s)),t.push(e);break}case"ReversedFirstSegment":{const s=this._cp2(i,0,-1);t.push([s,_]);break}case"PerpendicularToSecondSegment":{if(i.length<3)return[];const s=this._cp2(i,-4,1),h=this._cp3(i,s,.882353,-1.94),e=[];e.push(this._mid(s,h)),e.push(_),t.push(e);break}case"SecondSegmentWithTicks":{if(i.length<3)return[];const s=this._cp2(i,-4,1),h=this._cp3(i,s,.882353,-1.94),e=this._sub(h,s);let r;r=this._crossProduct(e,this._sub(_,s))>0?this._rightPerp(e):this._leftPerp(e);const c=[];c.push([s[0]+(r[0]-e[0])/3,s[1]+(r[1]-e[1])/3]),c.push(s),c.push(h),c.push([h[0]+(r[0]+e[0])/3,h[1]+(r[1]+e[1])/3]),t.push(c);break}case"DoublePerpendicular":{const s=this._cp2(i,0,-1),h=this._cp3(i,s,.5,3),e=this._mid(_,s),r=this._sub(e,h);this._normalize(r);const c=this._crossProduct(r,this._sub(_,h));this._leftPerpendicular(r);const o=[];o.push(_),o.push([h[0]+r[0]*c,h[1]+r[1]*c]),t.push(o);const u=[];u.push([h[0]-r[0]*c,h[1]-r[1]*c]),u.push(s),t.push(u);break}case"OppositeToFirstSegment":{const s=this._cp2(i,0,-1),h=this._cp3(i,s,.5,3),e=this._mid(_,s),r=this._sub(e,h);this._normalize(r);const c=this._crossProduct(r,this._sub(_,h));this._leftPerpendicular(r);const o=[];o.push([h[0]+r[0]*c,h[1]+r[1]*c]),o.push([h[0]-r[0]*c,h[1]-r[1]*c]),t.push(o);break}case"TriplePerpendicular":{const s=this._cp2(i,0,-1),h=this._cp3(i,s,.5,4),e=this._mid(_,s),r=this._sub(e,h);this._normalize(r);const c=this._crossProduct(r,this._sub(_,h));this._leftPerpendicular(r);const o=[];o.push([h[0]+r[0]*c*.8,h[1]+r[1]*c*.8]),o.push([e[0]+.8*(_[0]-e[0]),e[1]+.8*(_[1]-e[1])]),t.push(o),t.push([h,e]);const u=[];u.push([h[0]-r[0]*c*.8,h[1]-r[1]*c*.8]),u.push([e[0]+.8*(s[0]-e[0]),e[1]+.8*(s[1]-e[1])]),t.push(u);break}case"HalfCircleFirstSegment":{const s=this._cp2(i,0,-1),h=this._cp3(i,s,.5,4),e=this._mid(_,s);let r=this._sub(s,_);const c=Math.cos(Math.PI/18),o=Math.sin(Math.PI/18),u=Math.sqrt((1+c)/2),a=Math.sqrt((1-c)/2),n=[];let p;this._crossProduct(r,this._sub(h,_))>0?(n.push(_),r=this._sub(_,e),p=s):(n.push(s),r=this._sub(s,e),p=_),this._rotateDirect(r,u,a),r[0]/=u,r[1]/=u;for(let t=1;t<=18;t++)n.push(this._add(e,r)),this._rotateDirect(r,c,o);n.push(p),t.push(n);break}case"HalfCircleSecondSegment":{const s=this._cp2(i,0,-1),h=this._cp3(i,s,1,-1);let e=this._sub(_,s);this._normalize(e);const r=this._crossProduct(e,this._sub(h,s))/2;this._leftPerpendicular(e);const c=[s[0]+e[0]*r,s[1]+e[1]*r];e=this._sub(s,c);const o=Math.cos(Math.PI/18);let u=Math.sin(Math.PI/18);r>0&&(u=-u);const a=[s];for(let t=1;t<=18;t++)this._rotateDirect(e,o,u),a.push(this._add(c,e));t.push(a);break}case"HalfCircleExtended":{const s=this._cp2(i,0,-2),e=this._cp3(i,s,1,-1);let r;if(h>=4)r=i[3];else{const t=this._sub(_,s);r=this._add(e,t)}const c=this._dist(s,e)/2/.75,o=this._sub(s,_);this._normalize(o,c);const u=this._sub(e,r);this._normalize(u,c);const a=[r,e];t.push(a);const n=[this._clone(e)];this._addBezier3(n,e,this._add(e,u),this._add(s,o),s,4),n.push(_),t.push(n);break}case"OpenCircle":{const s=this._cp2(i,-2,0),h=this._sub(s,_),e=Math.cos(Math.PI/18),r=-Math.sin(Math.PI/18),c=[s];for(let t=1;t<=33;t++)this._rotateDirect(h,e,r),c.push(this._add(_,h));t.push(c);break}case"CoverageEdgesWithTicks":{const s=this._cp2(i,0,-1);let e,r;if(h>=3)e=i[2];else{const t=this._sub(s,_),i=this._leftPerp(t);e=[_[0]+i[0]-.25*t[0],_[1]+i[1]-.25*t[1]]}if(h>=4)r=i[3];else{const t=this._mid(_,s),i=this._sub(_,s);this._normalize(i),this._leftPerpendicular(i);const h=this._crossProduct(i,this._sub(e,t));this._rightPerpendicular(i),r=[e[0]+i[0]*h*2,e[1]+i[1]*h*2]}const c=this._sub(s,_);let o,u;o=this._crossProduct(c,this._sub(e,_))>0?this._rightPerp(c):this._leftPerp(c),u=[],u.push(e),u.push(_),u.push([_[0]+(o[0]-c[0])/3,_[1]+(o[1]-c[1])/3]),t.push(u),o=this._crossProduct(c,this._sub(r,s))>0?this._rightPerp(c):this._leftPerp(c),u=[],u.push([s[0]+(o[0]+c[0])/3,s[1]+(o[1]+c[1])/3]),u.push(s),u.push(r),t.push(u);break}case"GapExtentWithDoubleTicks":{const s=this._cp2(i,0,2),e=this._cp3(i,s,0,1);let r;if(h>=4)r=i[3];else{const t=this._sub(s,_);r=this._add(e,t)}this._addAngledTicks(t,_,s,this._mid(e,r)),this._addAngledTicks(t,e,r,this._mid(_,s));break}case"GapExtentMidline":{const s=this._cp2(i,2,0),e=this._cp3(i,s,0,1);let r;if(h>=4)r=i[3];else{const t=this._sub(s,_);r=this._add(e,t)}const c=[];c.push(this._mid(_,e)),c.push(this._mid(s,r)),t.push(c);break}case"Chevron":{const s=this._cp2(i,-1,-1);let e;if(h>=3)e=i[2];else{const t=this._sub(s,_);this._leftPerpendicular(t),e=this._add(_,t)}t.push([s,this._makeCtrlPt(_),e]);break}case"PerpendicularWithArc":{const s=this._cp2(i,0,-2),e=this._cp3(i,s,.5,-1),r=this._sub(s,_),c=this._norm(r);r[0]/=c,r[1]/=c;const o=this._crossProduct(r,this._sub(e,_));let u=this._dotProduct(r,this._sub(e,_));u<.05*c?u=.05*c:u>.95*c&&(u=.95*c);const a=[_[0]+r[0]*u,_[1]+r[1]*u];let n=this._leftPerp(r),p=[];if(p.push([a[0]-n[0]*o,a[1]-n[1]*o]),p.push([a[0]+n[0]*o,a[1]+n[1]*o]),t.push(p),h>=4){const s=i[3];let h=this._dotProduct(r,this._sub(s,_));h<.1*c?h=.1*c:h>.9*c&&(h=.9*c);const e=[_[0]+r[0]*h,_[1]+r[1]*h],o=this._crossProduct(r,this._sub(s,_)),u=[];u.push([e[0]-n[0]*o,e[1]-n[1]*o]),u.push([e[0]+n[0]*o,e[1]+n[1]*o]),t.push(u)}const d=[s[0]+n[0]*o,s[1]+n[1]*o];n=this._sub(s,d);const l=Math.cos(Math.PI/18);let b=Math.sin(Math.PI/18);o<0&&(b=-b),p=[_,s];for(let t=1;t<=9;t++)this._rotateDirect(n,l,b),p.push(this._add(d,n));t.push(p);break}case"ClosedHalfCircle":{const s=this._cp2(i,2,0),h=this._mid(_,s),e=this._sub(s,h),r=Math.cos(Math.PI/18),c=Math.sin(Math.PI/18),o=[_,s];for(let t=1;t<=18;t++)this._rotateDirect(e,r,c),o.push(this._add(h,e));t.push(o);break}case"TripleParallelExtended":{const s=this._cp2(i,0,-2),h=this._cp3(i,s,1,-2),e=this._mid(_,s),c=this._sub(h,s);this._normalize(c);const o=Math.abs(this._crossProduct(c,this._sub(e,s)))/2,u=this._dist(s,h),a=[s,_];a.push([_[0]+c[0]*u*.5,_[1]+c[1]*u*.5]),t.push(a);const n=[];n.push([e[0]-c[0]*o,e[1]-c[1]*o]),n.push([e[0]+c[0]*u*.375,e[1]+c[1]*u*.375]),r(n[n.length-1],1),n.push([e[0]+c[0]*u*.75,e[1]+c[1]*u*.75]),t.push(n);const p=[s,h];t.push(p);break}case"ParallelWithTicks":{const s=this._cp2(i,3,0),h=this._cp3(i,s,.5,-1),e=this._sub(h,s);this._normalize(e);const r=this._crossProduct(e,this._sub(h,_));this._leftPerpendicular(e),this._addAngledTicks(t,_,s,h),this._addAngledTicks(t,this._mix(_,1,e,r),this._mix(s,1,e,r),this._mid(_,s));break}case"Parallel":{const s=this._cp2(i,3,0),h=this._cp3(i,s,.5,-1),e=this._sub(s,_);this._normalize(e);const r=this._leftPerp(e),c=this._crossProduct(e,this._sub(h,_));let o=[_,s];t.push(o),o=[],o.push([_[0]+r[0]*c,_[1]+r[1]*c]),o.push([s[0]+r[0]*c,s[1]+r[1]*c]),t.push(o);break}case"PerpendicularToFirstSegment":{const s=this._cp2(i,3,0),h=this._cp3(i,s,.5,-1),e=this._mid(_,s),r=this._sub(s,_);this._normalize(r);const c=this._crossProduct(r,this._sub(h,_));this._leftPerpendicular(r);const o=[];o.push([e[0]-r[0]*c*.25,e[1]-r[1]*c*.25]),o.push([e[0]+r[0]*c*1.25,e[1]+r[1]*c*1.25]),t.push(o);break}case"ParallelOffset":{const s=this._cp2(i,3,0),h=this._cp3(i,s,.5,-1),e=this._sub(s,_);this._normalize(e);const r=this._crossProduct(e,this._sub(h,_));this._leftPerpendicular(e);const c=[];c.push([_[0]-e[0]*r,_[1]-e[1]*r]),c.push([s[0]-e[0]*r,s[1]-e[1]*r]),t.push(c);const o=[];o.push([_[0]+e[0]*r,_[1]+e[1]*r]),o.push([s[0]+e[0]*r,s[1]+e[1]*r]),t.push(o);break}case"OffsetOpposite":{const s=this._cp2(i,3,0),h=this._cp3(i,s,.5,-1),e=this._sub(s,_);this._normalize(e);const r=this._crossProduct(e,this._sub(h,_));this._leftPerpendicular(e);const c=[];c.push([_[0]-e[0]*r,_[1]-e[1]*r]),c.push([s[0]-e[0]*r,s[1]-e[1]*r]),t.push(c);break}case"OffsetSame":{const s=this._cp2(i,3,0),h=this._cp3(i,s,.5,-1),e=this._sub(s,_);this._normalize(e);const r=this._crossProduct(e,this._sub(h,_));this._leftPerpendicular(e);const c=[];c.push([_[0]+e[0]*r,_[1]+e[1]*r]),c.push([s[0]+e[0]*r,s[1]+e[1]*r]),t.push(c);break}case"CircleWithArc":{let s=this._cp2(i,3,0);const e=this._cp3(i,s,.5,-1);let c,o;if(h>=4)c=i[3],o=this._crossProduct(this._sub(c,s),this._sub(e,s))>0;else{c=s,o=this._crossProduct(this._sub(c,_),this._sub(e,_))>0;const t=24*this._geomUnitsPerPoint,i=this._sub(c,_);this._normalize(i,t);const h=Math.sqrt(2)/2;this._rotateDirect(i,h,o?h:-h),s=this._add(_,i)}const u=this._sub(s,_),a=Math.cos(Math.PI/18),n=Math.sin(Math.PI/18),p=[s];for(let t=1;t<=36;t++)this._rotateDirect(u,a,n),p.push(this._add(_,u));this._add90DegArc(p,s,c,e,o),r(p[p.length-8],1),t.push(p);break}case"DoubleJog":{let s,e=this._cp2(i,-3,1),r=this._cp3(i,e,-1,-.5);if(h>=4)s=i[3];else{const t=_;_=e,s=r;const i=this._dist(_,t),h=this._dist(s,t);let c=30*this._geomUnitsPerPoint;.5*i<c&&(c=.5*i),.5*h<c&&(c=.5*h),e=this._mix(_,c/i,t,(i-c)/i),r=this._mix(s,c/h,t,(h-c)/h)}const c=this._mid(_,e),o=this._mid(s,r),u=this._dist(_,e),a=this._dist(r,s);let n=Math.min(u,a)/8;n=Math.min(n,24*this._geomUnitsPerPoint);const p=Math.cos(Math.PI/4);let d=this._sub(_,e);this._normalize(d,n),this._crossProduct(d,this._sub(s,e))>0?this._rotateDirect(d,p,-p):this._rotateDirect(d,p,p);let l=[];l.push(e),l.push(this._add(c,d)),l.push(this._sub(c,d)),l.push(_),t.push(l),d=this._sub(s,r),this._normalize(d,n),this._crossProduct(d,this._sub(_,r))<0?this._rotateDirect(d,p,p):this._rotateDirect(d,p,-p),l=[],l.push(r),l.push(this._add(o,d)),l.push(this._sub(o,d)),l.push(s),t.push(l);break}case"PerpendicularOffset":{const s=this._cp2(i,-4,1),h=this._cp3(i,s,.882353,-1.94),e=this._sub(h,s);this._crossProduct(e,this._sub(_,s))>0?this._rightPerpendicular(e):this._leftPerpendicular(e);const r=[e[0]/8,e[1]/8],c=this._sub(this._mid(s,h),r);t.push([c,_]);break}case"LineExcludingLastSegment":{const s=this._arrowPath(i),h=[];let e=s.length-2;for(;e--;)h.push(s[e]);t.push(h);break}case"MultivertexArrow":{const s=this._arrowPath(i),h=[];this._addArrow(h,s,!1),t.push(h);break}case"CrossedArrow":{const s=this._arrowPath(i),h=[];this._addArrow(h,s,!0),t.push(h);break}case"ChevronArrow":{const[s,h]=this._arrowLastSeg(i),e=10*this._geomUnitsPerPoint,r=this._sub(_,s),c=this._norm(r);this._normalize(r);const o=this._crossProduct(r,this._sub(h,s));let u=this._dotProduct(r,this._sub(h,s));u<.05*c?u=.05*c:u>.95*c-e&&(u=.95*c-e);const a=[s[0]+r[0]*u,s[1]+r[1]*u],n=this._leftPerp(r),p=[];p.push([a[0]+n[0]*o+r[0]*e,a[1]+n[1]*o+r[1]*e]),p.push(_),p.push([a[0]-n[0]*o+r[0]*e,a[1]-n[1]*o+r[1]*e]),t.push(p);break}case"ChevronArrowOffset":{const[s,h]=this._arrowLastSeg(i),e=this._sub(_,s),r=this._norm(e);this._normalize(e);const c=this._crossProduct(e,this._sub(h,s));let o=this._dotProduct(e,this._sub(h,s));o<.05*r?o=.05*r:o>.95*r&&(o=.95*r);const u=[s[0]+e[0]*o,s[1]+e[1]*o];this._leftPerpendicular(e);const a=[];a.push([u[0]+e[0]*c*.5,u[1]+e[1]*c*.5]),a.push(this._mid(u,_)),a.push([u[0]-e[0]*c*.5,u[1]-e[1]*c*.5]),t.push(a);break}case"PartialFirstSegment":{const[s,h]=this._arrowLastSeg(i),e=this._sub(_,s),r=this._norm(e);this._normalize(e);let c=this._dotProduct(e,this._sub(h,s));c<.05*r?c=.05*r:c>.95*r&&(c=.95*r);const o=[s[0]+e[0]*c,s[1]+e[1]*c];t.push([s,o]);break}case"Arch":{const s=this._cp2(i,0,-1),h=this._cp3(i,s,.5,1),e=this._sub(_,s),r=this._mix(h,1,e,.55),c=this._mix(h,1,e,-.55),o=[_];this._addBezier2(o,_,r,h,4),this._addBezier2(o,h,c,s,4),t.push(o);break}case"CurvedParallelTicks":{const s=this._cp2(i,-4,1),h=this._cp3(i,s,.882353,-1.94),e=this._sub(h,s);this._crossProduct(e,this._sub(_,s))>0?this._rightPerpendicular(e):this._leftPerpendicular(e);const r=[e[0]/8,e[1]/8],c=this._sub(this._mid(s,h),r),o=this._sub(this._mix(s,.75,h,.25),r),u=this._sub(this._mix(s,.25,h,.75),r),a=[s];this._addBezier2(a,s,o,c,3),this._addBezier2(a,c,u,h,3),t.push(a);for(let i=0;i<8;i++){const s=a[2*i+1],h=[this._clone(s)];h.push(this._add(s,[e[0]/4,e[1]/4])),t.push(h)}break}case"Arc90Degrees":{const s=this._cp2(i,0,-1),h=this._cp3(i,s,.5,1),e=[s];this._add90DegArc(e,s,_,h),t.push(e);break}case"TipWithPerpendicularAndTicks":{const[s,h]=this._arrowLastSeg(i),e=10*this._geomUnitsPerPoint,r=this._sub(_,s),c=this._norm(r);this._normalize(r);let o=this._crossProduct(r,this._sub(h,s)),u=this._dotProduct(r,this._sub(h,s));u<.05*c?u=.05*c:u>.95*c-e&&(u=.95*c-e);const a=this._leftPerp(r),n=[_[0]-r[0]*e,_[1]-r[1]*e],p=.5*Math.max(c-u-e,e);o=Math.abs(o);const d=[];d.push([n[0]+a[0]*(o+p)-r[0]*p,n[1]+a[1]*(o+p)-r[1]*p]),d.push([n[0]+a[0]*o,n[1]+a[1]*o]),d.push([n[0]-a[0]*o,n[1]-a[1]*o]),d.push([n[0]-a[0]*(o+p)-r[0]*p,n[1]-a[1]*(o+p)-r[1]*p]),t.push(d),t.push([n,_]);break}case"ConcentricCircles":{const s=this._cp2(i,1,0),e=this._cp3(i,s,2,0),c=Math.cos(Math.PI/18),o=Math.sin(Math.PI/18);let u=this._dist(s,_),a=[u,0],n=[];for(let t=0;t<=36;t++)n.push(this._add(_,a)),this._rotateDirect(a,c,o);if(t.push(n),h>=4){n=[];const s=i[3];u=this._dist(s,_),a=[u,0];for(let t=0;t<=36;t++)n.push(this._add(_,a)),0===t&&(n.push(this._add(_,a)),r(n[1],1)),this._rotateDirect(a,c,o);t.push(n)}n=[],u=this._dist(e,_),a=[u,0];for(let t=0;t<=36;t++)n.push(this._add(_,a)),this._rotateDirect(a,c,o);t.push(n);break}case"DoubleJogArrow":{_=this._arrowPath(i)[0];const[s,h]=this._arrowLastSeg(i),e=this._sub(_,s),r=this._norm(e);this._normalize(e);const c=Math.abs(this._crossProduct(e,this._sub(h,_)));let o=Math.abs(this._dotProduct(e,this._sub(h,_)));o<.05*r?o=.05*r:o>.95*r&&(o=.95*r);const u=Math.max(c,o),a=this._leftPerp(e);let n=[];const p=[_[0]-e[0]*o*.5+a[0]*c*.5,_[1]-e[1]*o*.5+a[1]*c*.5];n.push([p[0],p[1]]),p[0]+=e[0]*u*.5+a[0]*u*.4,p[1]+=e[1]*u*.5+a[1]*u*.4,n.push([p[0],p[1]]),p[0]-=a[0]*u*.25,p[1]-=a[1]*u*.25,n.push([p[0],p[1]]),p[0]+=e[0]*u*.5+a[0]*u*.4,p[1]+=e[1]*u*.5+a[1]*u*.4,n.push([p[0],p[1]]),t.push(n),n=[],p[0]=_[0]-e[0]*o*.5-a[0]*c*.5,p[1]=_[1]-e[1]*o*.5-a[1]*c*.5,n.push([p[0],p[1]]),p[0]+=e[0]*u*.5-a[0]*u*.4,p[1]+=e[1]*u*.5-a[1]*u*.4,n.push([p[0],p[1]]),p[0]+=a[0]*u*.25,p[1]+=a[1]*u*.25,n.push([p[0],p[1]]),p[0]+=e[0]*u*.5-a[0]*u*.4,p[1]+=e[1]*u*.5-a[1]*u*.4,n.push([p[0],p[1]]),t.push(n);break}case"LinkedChevrons":{const s=this._cp2(i,-5,0),h=this._cp3(i,s,-.2,1),e=this._sub(_,s);this._normalize(e);const r=this._leftPerp(e),c=Math.abs(this._crossProduct(e,this._sub(h,s)));t.push([s,_]);const o=[];o.push([_[0]-e[0]*c+r[0]*c,_[1]-e[1]*c+r[1]*c]),o.push(_),o.push([_[0]-e[0]*c-r[0]*c,_[1]-e[1]*c-r[1]*c]),t.push(o),this._addDash(t,s,[-e[0]*c+r[0]*c,-e[1]*c+r[1]*c]),this._addDash(t,s,[-e[0]*c-r[0]*c,-e[1]*c-r[1]*c]);break}case"SegmentThenHalfCircle":{const s=this._cp2(i,2,0),e=this._cp3(i,s,1.5,0);let r;r=h>=4?i[3]:this._cp3(i,s,1.25,-.5);const c=this._sub(s,_);this._normalize(c);const o=.5*this._dist(s,e),u=this._crossProduct(c,this._sub(r,_))>0,a=Math.cos(Math.PI/18);let n=Math.sin(Math.PI/18);u&&(n=-n);const p=[_,s];c[0]*=o,c[1]*=o;const d=this._add(s,c);c[0]=-c[0],c[1]=-c[1];for(let t=1;t<=18;t++)this._rotateDirect(c,a,n),p.push(this._add(d,c));t.push(p);break}case"LineWithStraightTicks":{const s=this._cp2(i,-2,1),h=this._cp3(i,s,-1,-.5),e=this._sub(h,s);this._normalize(e);const r=this._dotProduct(e,this._sub(s,_)),c=this._dotProduct(e,this._sub(h,_));let o=[_];o.push([_[0]+e[0]*r,_[1]+e[1]*r]),o.push(s),t.push(o),o=[_],o.push([_[0]+e[0]*c,_[1]+e[1]*c]),o.push(h),t.push(o);break}case"DoubleCurve":{const s=this._cp2(i,-5,-1),h=this._cp3(i,s,2,0),e=Math.atan2(1,5),c=Math.cos(e),o=Math.sin(e),u=this._sub(s,_),a=this._dist(_,s);this._normalize(u),this._rotateDirect(u,c,-o);const n=[_];n.push([_[0]+u[0]*a*.5,_[1]+u[1]*a*.5]),r(n[1],1),n.push([_[0]+u[0]*a*.8,_[1]+u[1]*a*.8]),this._addBezier2(n,n[2],[_[0]+u[0]*a,_[1]+u[1]*a],s,3);const p=this._sub(h,s),d=this._dist(s,h);this._normalize(p),this._rotateDirect(p,c,-o),this._addBezier2(n,s,[h[0]-p[0]*d,h[1]-p[1]*d],[h[0]-p[0]*d*.8,h[1]-p[1]*d*.8],3),n.push(h),t.push(n);break}case"ParallelWithTicksByWidth":{const s=this._cp2(i,0,-1),h=this._cp3(i,s,.5,3),e=this._sub(s,_);this._normalize(e);const r=this._crossProduct(e,this._sub(h,_));this._leftPerpendicular(e),r>0?(this._addAngledTicks(t,_,[_[0]+e[0]*r,_[1]+e[1]*r],s),this._addAngledTicks(t,s,[s[0]+e[0]*r,s[1]+e[1]*r],_)):(this._addAngledTicks(t,[_[0]+e[0]*r,_[1]+e[1]*r],_,s),this._addAngledTicks(t,[s[0]+e[0]*r,s[1]+e[1]*r],_,s));break}case"EnclosingRoundedRectangle":{const s=this._cp2(i,3,-2),t=[Math.min(_[0],s[0]),Math.max(_[1],s[1])],h=[Math.max(_[0],s[0]),Math.min(_[1],s[1])],e=h[0]-t[0],r=t[1]-h[1],c=Math.min(e,r)/10,o=[];o.push([t[0]+c+.75*(e-2*c),t[1]]),o.push([h[0]-c,t[1]]),this._add90DegArc(o,[h[0]-c,t[1]],[h[0],t[1]-c],[h[0],t[1]]),o.push([h[0],h[1]+c]),this._add90DegArc(o,[h[0],h[1]+c],[h[0]-c,h[1]],h),o.push([t[0]+c,h[1]]),this._add90DegArc(o,[t[0]+c,h[1]],[t[0],h[1]+c],[t[0],h[1]]),o.push([t[0],t[1]-c]),this._add90DegArc(o,[t[0],t[1]-c],[t[0]+c,t[1]],t),o.push([t[0]+c+.75*(e-2*c),t[1]]);break}case"ParallelOffsetByValue":{if(i.length<2||0===this._width)break;const s=this._offsetPath(i,.5*this._width);s&&t.push(s);const h=this._offsetPath(i,.5*-this._width);h&&t.push(h);break}default:t.push(i)}}return t}}function u(s){return"ParallelOffsetByValue"===s}export{c as EffectControlMeasureLine};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{GeometryCursor as e}from"../../../geometry/GeometryCursor.js";import{PathEffectCursor as t}from"../CIMCursor.js";import{CurveHelper as i}from"../CurveHelper.js";class r{static{this.instance=null}static local(){return null===r.instance&&(r.instance=new r),r.instance}execute(e,t,i){return new
|
|
2
|
+
import{GeometryCursor as e}from"../../../geometry/GeometryCursor.js";import{PathEffectCursor as t}from"../CIMCursor.js";import{CurveHelper as i}from"../CurveHelper.js";class r{static{this.instance=null}static local(){return null===r.instance&&(r.instance=new r),r.instance}execute(e,t,i){return new n(e,t,i)}}class n extends t{constructor(e,t,r){super(e,!0,!0),this._curveHelper=new i;const n=r?.geomUnitsPerPoint;this._beginCut=(void 0!==t.beginCut?t.beginCut:1)*n,this._endCut=(void 0!==t.endCut?t.endCut:1)*n,this._middleCut=(void 0!==t.middleCut?t.middleCut:0)*n,this._invert=void 0!==t.invert&&t.invert,this._beginCut<0&&(this._beginCut=0),this._endCut<0&&(this._endCut=0),this._middleCut<0&&(this._middleCut=0)}processPath(t){const{_beginCut:i,_endCut:r,_middleCut:n}=this,s=t.pathLength(),u=e.createEmptyOptimizedCIM("esriGeometryPolyline");if(this._invert){if(0!==i||0!==r||0!==n)if(i+r+n>=s)for(u.startPath();t.nextPoint();)u.pushXY(t.x,t.y);else this._curveHelper.appendSubCurve(u,t,0,i),this._curveHelper.appendSubCurve(u,t,.5*(s-n),.5*(s+n)),this._curveHelper.appendSubCurve(u,t,s-r,r)}else if(0===i&&0===r&&0===n)for(u.startPath();t.nextPoint();)u.pushXY(t.x,t.y);else i+r+n<s&&(0===n?this._curveHelper.appendSubCurve(u,t,i,s-r):(this._curveHelper.appendSubCurve(u,t,i,.5*(s-n)),this._curveHelper.appendSubCurve(u,t,.5*(s+n),s-r)));return 0===u.totalSize?null:u}}export{r as EffectCut};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{GeometryCursor as t}from"../../../geometry/GeometryCursor.js";import{collectPath as e}from"../../../geometry/geometryCursorCollectUtils.js";import{PathEffectCursor as s}from"../CIMCursor.js";import{GeometryWalker as i,DashPattern as r}from"../GeometryWalker.js";import{normalizeDashEffectTemplate as a}from"../utils.js";class n{static{this.instance=null}static local(){return null===n.instance&&(n.instance=new n),n.instance}execute(t,e,s){return new h(t,e,s)}}class h extends s{constructor(t,e,s){super(t,!0,!0),this._firstCurve=null
|
|
2
|
+
import{GeometryCursor as t}from"../../../geometry/GeometryCursor.js";import{collectPath as e}from"../../../geometry/geometryCursorCollectUtils.js";import{PathEffectCursor as s}from"../CIMCursor.js";import{GeometryWalker as i,DashPattern as r}from"../GeometryWalker.js";import{normalizeDashEffectTemplate as a}from"../utils.js";class n{static{this.instance=null}static local(){return null===n.instance&&(n.instance=new n),n.instance}execute(t,e,s){return new h(t,e,s)}}class h extends s{constructor(t,e,s){super(t,!0,!0),this._firstCurve=null;const n=s.geomUnitsPerPoint;this._walker=new i,this._walker.updateTolerance(n),this._endings=e.lineDashEnding??"NoConstraint",this._customDashPos=-(e.offsetAlongLine??0)*n,this._offsetAtEnd=(e.customEndingOffset??0)*n;let h=a(e).dashTemplate;null==h&&(h=[]),h.length%2&&(h=[...h,...h]);let l=0;for(;l<h.length&&0===h[l];)l++;let o=0;const u=[];for(let i=l;i<h.length;i++)0===h[i]?o++:0===o?u.push(h[i]):1&o?(u[u.length-1]+=h[i],o=0):(u.push(h[i]),o=0);h=u,h.length<=1?h=0===h.length||l%2==0?[]:[-1]:h.length%2==1?l%2==1?h.unshift(0):h.push(0):l%2==1&&(h.unshift(0),h.push(0)),this._pattern=new r,this._pattern.init(h,!1),this._pattern.scale(n)}processPath(s){if(this._pattern.size()%2==1)return null;if(0===this._pattern.length()){this.iteratePath=!1;const i=e(s);return t.fromJSONCIM({paths:[i]})}if(!this.iteratePath){let i=!0;switch(this._endings){case"HalfPattern":case"HalfGap":default:this._pattern.extPtGap=0;break;case"FullPattern":this.isClosed||(this._pattern.extPtGap=.5*this._pattern.firstValue());break;case"FullGap":this.isClosed||(this._pattern.extPtGap=.5*this._pattern.lastValue());break;case"NoConstraint":this.isClosed||(i=!1);break;case"Custom":this.isClosed||(this._pattern.extPtGap=.5*this._offsetAtEnd)}const r=s.pathLength();if(this._pattern.isEmpty()||r<.1*this._pattern.length()){const i=e(s);return t.fromJSONCIM({paths:[i]})}if(!this._walker.init(s,this._pattern,i)){const i=e(s);return t.fromJSONCIM({paths:[i]})}}let i;if(this.iteratePath)i=this._pattern.nextValue();else{let t;switch(this._endings){case"HalfPattern":default:t=.5*this._pattern.firstValue();break;case"HalfGap":t=.5*-this._pattern.lastValue();break;case"FullGap":t=-this._pattern.lastValue();break;case"FullPattern":t=0;break;case"NoConstraint":case"Custom":t=-this._customDashPos}let e=t/this._pattern.length();e-=Math.floor(e),t=e*this._pattern.length(),this._pattern.reset(),i=this._pattern.nextValue();let s=!1;for(;t>=i;)t-=i,i=this._pattern.nextValue(),s=!s;i-=t,s?(this._walker.nextPosition(i),i=this._pattern.nextValue()):this.isClosed&&(this._firstCurve=this._walker.nextCurve(i),i=this._pattern.nextValue(),this._walker.nextPosition(i),i=this._pattern.nextValue())}0===i&&(i=this._pattern.nextValue(),this._walker.nextPosition(i),i=this._pattern.nextValue());let r=this._walker.nextCurve(i);if(r)if(this._walker.isPathEnd()){if(this.iteratePath=!1,this._firstCurve){for(this._firstCurve.nextPath();this._firstCurve.nextPoint();)r.pushXY(this._firstCurve.x,this._firstCurve.y);this._firstCurve=null}}else i=this._pattern.nextValue(),!this._walker.nextPosition(i)||this._walker.isPathEnd()?(this.iteratePath=!1,this._firstCurve&&(r.pushCursor(this._firstCurve),this._firstCurve=null)):this.iteratePath=!0;else this.iteratePath=!1,r=this._firstCurve,this._firstCurve=null;return r?.reset(),r}}export{n as EffectDashes};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{GeometryCursor as t}from"../../../geometry/GeometryCursor.js";import i from"../../../geometry/SpatialReference.js";import{lazyBufferOperator as e,clipCursorToTileExtent as n}from"../CIMEffects.js";class s{static{this.instance=null}static local(){return null===s.instance&&(s.instance=new s),s.instance}execute(t,i,e
|
|
2
|
+
import{GeometryCursor as t}from"../../../geometry/GeometryCursor.js";import i from"../../../geometry/SpatialReference.js";import{lazyBufferOperator as e,clipCursorToTileExtent as n}from"../CIMEffects.js";class s{static{this.instance=null}static local(){return null===s.instance&&(s.instance=new s),s.instance}execute(t,i,e){return new r(t,i,e)}}class r{constructor(t,i,e){this._inputGeometries=t,this._tileKey=e.tileKey,this._maxInflateSize=e.maxInflateSize*e.geomUnitsPerPoint,this._preventClipping=e.preventClipping,this._width=(void 0!==i.width?i.width:2)*e.geomUnitsPerPoint,i.method,this._option=i.option??"Accurate"}next(){let s;for(;s=this._inputGeometries.next();){if("esriGeometryEnvelope"===s.geometryType&&this._width>0){const i=s.asJSON();return Math.min(i.xmax-i.xmin,i.ymax-i.ymin)-2*this._width<0?s:t.fromJSONCIM({paths:[[[i.xmin+this._width,i.ymin+this._width],[i.xmax-this._width,i.ymin+this._width],[i.xmax-this._width,i.ymax-this._width],[i.xmin+this._width,i.ymax-this._width],[i.xmin+this._width,i.ymin+this._width]],[[i.xmin,i.ymin],[i.xmin,i.ymax],[i.xmax,i.ymax],[i.xmax,i.ymin],[i.xmin,i.ymin]]]})}if("esriGeometryPolygon"===s.geometryType){if(0===this._width)return s.clone();const t=e.module,r=!this._preventClipping&&this._tileKey?n(s,this._maxInflateSize,!0):s.clone();if(!r)continue;const o={...r.asJSON(),spatialReference:{wkid:i.WebMercator.wkid}},m=t.execute(o,-this._width);if(m)for(const i of m.rings)if(i){r.startPath();for(const t of i.reverse())r.pushXY(t[0],r.yFactor*t[1])}return r}}return null}}export{s as EffectDonut};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{GeometryCursor as e}from"../../../geometry/GeometryCursor.js";import t from"../../../geometry/SpatialReference.js";import{getCursorBoundsXY as r}from"../../../geometry/support/boundsUtils.js";import{lazyConvexHullOperator as n}from"../CIMEffects.js";class o{static{this.instance=null}static local(){return null===o.instance&&(o.instance=new o),o.instance}execute(e,t){return new s(e,t)}}class s{constructor(e,t){this._inputGeometries=e,this._medhod=t.method}next(){let e=this._inputGeometries.next();const t=this._medhod;for(;null!=e;){if(e.totalSize>0)switch(t){case"RectangularBox":return i(e);case"ConvexHull":return this._constructConvexHull(e);default:return u(e)}e=this._inputGeometries.next()}return null}_constructConvexHull(r){switch(r.geometryType){case"esriGeometryPolyline":case"esriGeometryPolygon":{const o=n.module,s={...r.asJSON(),spatialReference:{wkid:t.WebMercator.wkid}},i=o.execute(s);return i?e.fromJSONCIM(i):null}case"esriGeometryEnvelope":return r;default:return null}}}function i(t){const n=r(t),o={xmin:n[0],ymin:n[1],xmax:n[2],ymax:n[3]};return e.fromJSONCIM(o)}function u(t){switch(t.geometryType){case"esriGeometryPolyline":{const r=[];for(;t.nextPath();)l(t,r);return e.fromJSONCIM({rings:r})}case"esriGeometryPolygon":case"esriGeometryEnvelope":return t;default:return null}}function l(e,t){if(e.seekPathStart(),!e.nextPoint())return;const r=e.x,n=e.y,o=[[r,n]];for(t.push(o);e.nextPoint();)o.push([e.x,e.y]);o.push([r,n])}export{o as EffectEnclosingPolygon};
|
|
2
|
+
import{GeometryCursor as e}from"../../../geometry/GeometryCursor.js";import t from"../../../geometry/SpatialReference.js";import{getCursorBoundsXY as r}from"../../../geometry/support/boundsUtils.js";import{lazyConvexHullOperator as n}from"../CIMEffects.js";class o{static{this.instance=null}static local(){return null===o.instance&&(o.instance=new o),o.instance}execute(e,t,r){return new s(e,t,r)}}class s{constructor(e,t,r){this._inputGeometries=e,this._medhod=t.method}next(){let e=this._inputGeometries.next();const t=this._medhod;for(;null!=e;){if(e.totalSize>0)switch(t){case"RectangularBox":return i(e);case"ConvexHull":return this._constructConvexHull(e);default:return u(e)}e=this._inputGeometries.next()}return null}_constructConvexHull(r){switch(r.geometryType){case"esriGeometryPolyline":case"esriGeometryPolygon":{const o=n.module,s={...r.asJSON(),spatialReference:{wkid:t.WebMercator.wkid}},i=o.execute(s);return i?e.fromJSONCIM(i):null}case"esriGeometryEnvelope":return r;default:return null}}}function i(t){const n=r(t),o={xmin:n[0],ymin:n[1],xmax:n[2],ymax:n[3]};return e.fromJSONCIM(o)}function u(t){switch(t.geometryType){case"esriGeometryPolyline":{const r=[];for(;t.nextPath();)l(t,r);return e.fromJSONCIM({rings:r})}case"esriGeometryPolygon":case"esriGeometryEnvelope":return t;default:return null}}function l(e,t){if(e.seekPathStart(),!e.nextPoint())return;const r=e.x,n=e.y,o=[[r,n]];for(t.push(o);e.nextPoint();)o.push([e.x,e.y]);o.push([r,n])}export{o as EffectEnclosingPolygon};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{GeometryCursor as
|
|
2
|
+
import{GeometryCursor as e}from"../../../geometry/GeometryCursor.js";import{collectMultipath as t}from"../../../geometry/geometryCursorCollectUtils.js";import{SimpleEffectCursor as r}from"../CIMEffects.js";import{getEffectOperator as o}from"../CIMOperators.js";import{getEffectsInflateSize as s}from"../utils.js";class l{static executeEffects(e,t,s){let l=new r(t);for(const r of e){const e=o(r);e&&(l=e.execute(l,r,s))}return l}static applyEffects(l,n){if(!l)return n;const f=!1,i={geomUnitsPerPoint:1,tileKey:null,maxInflateSize:s(l),scale:null,spatialReference:null,preventClipping:f};let m,c=new r(e.fromJSONCIM(n));for(const e of l){const t=o(e);t&&(c=t.execute(c,e,i))}const p=[];let u=null;for(;m=c.next();)p.push(...t(m)),u=m.geometryType;return 0===p.length||null===u?null:"esriGeometryPolygon"===u?{rings:p}:{paths:p}}}export{l as EffectHelper};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{GeometryCursor as t}from"../../../geometry/GeometryCursor.js";import{PathEffectCursor as i}from"../CIMCursor.js";import{CurveHelper as s}from"../CurveHelper.js";class e{static{this.instance=null}static local(){return null===e.instance&&(e.instance=new e),e.instance}execute(t,i,s){return new n(t,i,s)}}class n extends i{constructor(t,i,e){super(t,!1,!0),this._curveHelper=new s
|
|
2
|
+
import{GeometryCursor as t}from"../../../geometry/GeometryCursor.js";import{PathEffectCursor as i}from"../CIMCursor.js";import{CurveHelper as s}from"../CurveHelper.js";class e{static{this.instance=null}static local(){return null===e.instance&&(e.instance=new e),e.instance}execute(t,i,s){return new n(t,i,s)}}class n extends i{constructor(t,i,e){super(t,!1,!0),this._curveHelper=new s;const n=e.geomUnitsPerPoint;this._length=(void 0!==i.length?i.length:20)*n,this._angle=void 0!==i.angle?i.angle:225,this._position=void 0!==i.position?i.position:50,this._length<0&&(this._length=-this._length),this._position<20&&(this._position=20),this._position>80&&(this._position=80),this._mirror=!1}processPath(i){const s=t.createEmptyOptimizedCIM("esriGeometryPolyline");if(this._curveHelper.isEmpty(i))return null;i.seekInPath(0);const e=i.x,n=i.y;i.seekInPath(i.pathSize-1);const o=i.x,r=i.y,h=[o-e,r-n];this._curveHelper.normalize(h);const l=e+(o-e)*this._position/100,a=n+(r-n)*this._position/100,_=Math.cos((90-this._angle)/180*Math.PI);let c=Math.sin((90-this._angle)/180*Math.PI);this._mirror&&(c=-c),this._mirror=!this._mirror;const p=[l-this._length/2*_,a-this._length/2*c],m=[l+this._length/2*_,a+this._length/2*c];return s.pushPath([[e,n],p,m,[o,r]]),s}}export{e as EffectJog};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
class t{static{this.instance=null}static local(){return null===t.instance&&(t.instance=new t),t.instance}execute(t,s,n){return new e(t,s,n)}}class e{constructor(t,e,s){this._inputGeometries=t
|
|
2
|
+
class t{static{this.instance=null}static local(){return null===t.instance&&(t.instance=new t),t.instance}execute(t,s,n){return new e(t,s,n)}}class e{constructor(t,e,s){this._inputGeometries=t;const n=s.geomUnitsPerPoint;this._offsetX=void 0!==e.offsetX?e.offsetX*n:0,this._offsetY=void 0!==e.offsetY?e.offsetY*n:0}next(){let t=this._inputGeometries.next();for(;t;){if(t.totalSize>0)return this._move(t.clone(),this._offsetX,this._offsetY);t=this._inputGeometries.next()}return null}_move(t,e,s){for(;t.nextPath();)for(;t.nextPoint();)t.x=t.x+e,t.y=t.y+s;return t.reset(),t}}export{t as EffectMove};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{GeometryCursor as e}from"../../../geometry/GeometryCursor.js";import{collectPath as t}from"../../../geometry/geometryCursorCollectUtils.js";import r from"../../../geometry/SpatialReference.js";import{isExtent as s}from"../../../geometry/support/jsonTypeUtils.js";import{clipCursorToTileExtent as i,lazyOffsetOperator as o,lazyGraphicBufferOperator as n}from"../CIMEffects.js";import{CurveHelper as f,pixelTolerance as m}from"../CurveHelper.js";const a=10;class l{static{this.instance=null}static local(){return null===l.instance&&(l.instance=new l),l.instance}execute(e,t,r
|
|
2
|
+
import{GeometryCursor as e}from"../../../geometry/GeometryCursor.js";import{collectPath as t}from"../../../geometry/geometryCursorCollectUtils.js";import r from"../../../geometry/SpatialReference.js";import{isExtent as s}from"../../../geometry/support/jsonTypeUtils.js";import{clipCursorToTileExtent as i,lazyOffsetOperator as o,lazyGraphicBufferOperator as n}from"../CIMEffects.js";import{CurveHelper as f,pixelTolerance as m}from"../CurveHelper.js";const a=10;class l{static{this.instance=null}static local(){return null===l.instance&&(l.instance=new l),l.instance}execute(e,t,r){return new h(e,t,r)}}class h{constructor(e,t,r){const s=r.geomUnitsPerPoint,i=r.maxInflateSize;this._preventClipping=r.preventClipping,this._inputGeometries=e,this._tileKey=r.tileKey,this._curveHelper=new f,this._offset=(t.offset??1)*s,this._method=t.method??"Square",this._maxInflateSize=Math.max(Math.abs(i*s),a),this._option=t.option||"Fast",this._offsetFlattenError=m*s}next(){let f;for(;f=this._inputGeometries.next();){if(0===this._offset)return f.clone();if("esriGeometryEnvelope"===f.geometryType){if("Rounded"===this._method&&this._offset>0){const r=t(f),s=this._curveHelper.offset(r,-this._offset,this._method,4,this._offsetFlattenError);if(s){const t=e.createEmptyOptimizedCIM(f.geometryType);return t.pushPath(s),t}return null}const r=f.asJSON();if(s(r)&&Math.min(r.xmax-r.xmin,r.ymax-r.ymin)+2*this._offset>0)return e.fromJSONCIM({xmin:r.xmin-this._offset,xmax:r.xmax+this._offset,ymin:r.ymin-this._offset,ymax:r.ymax+this._offset})}const m=!this._preventClipping&&this._tileKey?i(f,this._maxInflateSize,!0):f.clone();if(!m)continue;const a=o.module,l=n.module,h={...m.asJSON(),spatialReference:{wkid:r.WebMercator.wkid}};let c,p=u(this._method);return"esriGeometryPolygon"===f.geometryType&&this._offset>0?("square"===p&&(p="bevel"),c=l.executeMany([h],[this._offset],p,"round")[0]):c=a.execute(h,-this._offset,{joins:p,flattenError:this._offsetFlattenError,miterLimit:4}),c?e.fromJSONCIM(c):null}return null}}function u(e){switch(e){case"Rounded":return"round";case"Bevelled":return"bevel";case"Mitered":return"miter";case"Square":return"square"}}export{l as EffectOffset};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{GeometryCursor as t}from"../../../geometry/GeometryCursor.js";import{ringsCentroidCursor as e}from"../../../geometry/support/centroid.js";import{defaultCIMValues as i}from"../defaultCIMValues.js";class n{static{this.instance=null}static local(){return null===n.instance&&(n.instance=new n),n.instance}execute(t,e,i){return new r(t,e,i)}}class r{constructor(t,e,n){this._inputGeometries=t,this._length=(void 0!==e.length?e.length:i.CIMGeometricEffectRadial.length)*
|
|
2
|
+
import{GeometryCursor as t}from"../../../geometry/GeometryCursor.js";import{ringsCentroidCursor as e}from"../../../geometry/support/centroid.js";import{defaultCIMValues as i}from"../defaultCIMValues.js";class n{static{this.instance=null}static local(){return null===n.instance&&(n.instance=new n),n.instance}execute(t,e,i){return new r(t,e,i)}}class r{constructor(t,e,n){const r=n.geomUnitsPerPoint;this._inputGeometries=t,this._length=(void 0!==e.length?e.length:i.CIMGeometricEffectRadial.length)*r,this._angle=void 0!==e.angle?e.angle*Math.PI/180:i.CIMGeometricEffectRadial.angle,this._lx=Math.cos(this._angle)*this._length,this._ly=Math.sin(this._angle)*this._length}next(){let i=this._inputGeometries.next();for(;i;){if("esriGeometryPoint"===i.geometryType||"esriGeometryMultipoint"===i.geometryType){const e=t.createEmptyOptimizedCIM("esriGeometryPolyline");return i.nextPath()&&i.nextPoint()&&e.pushPath([[i.x,i.y],[i.x+this._lx,i.y+this._ly]]),e}if("esriGeometryPolygon"===i.geometryType){const n=e(i);if(!n)return null;const r=t.createEmptyOptimizedCIM("esriGeometryPolyline");return r.pushPath([[n[0],n[1]],[n[0]+this._lx,n[1]+this._ly]]),r}i=this._inputGeometries.next()}return null}}export{n as EffectRadial};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import e from"../../../core/Error.js";import t from"../../../core/Logger.js";import{GeometryCursor as s}from"../../../geometry/GeometryCursor.js";import o from"../../../geometry/SpatialReference.js";import{isPolygon as i,isPolyline as l}from"../../../geometry/support/jsonTypeUtils.js";import r from"../../../geometry/support/PolylineBuilder.js";import{Point as n}from"../../../geometry/support/TileClipper.js";import{PathEffectCursor as h}from"../CIMCursor.js";import{lazyGeneralizeOperator as a,lazyLengthOperator as c,lazySimplifyOperator as _}from"../CIMEffects.js";const p=()=>t.getLogger("esri.symbols.cim.effects.EffectTaperedPolygon");class y{static{this.instance=null}static local(){return null===y.instance&&(y.instance=new y),y.instance}execute(e,t,s){return new f(e,t,s)}}class f extends h{constructor(e,t,s){super(e,!1,!0),this._slopeS=0,this._slopeC=1,this._lastTangent1=new n(NaN,NaN),this._lastWidth=0
|
|
2
|
+
import e from"../../../core/Error.js";import t from"../../../core/Logger.js";import{GeometryCursor as s}from"../../../geometry/GeometryCursor.js";import o from"../../../geometry/SpatialReference.js";import{isPolygon as i,isPolyline as l}from"../../../geometry/support/jsonTypeUtils.js";import r from"../../../geometry/support/PolylineBuilder.js";import{Point as n}from"../../../geometry/support/TileClipper.js";import{PathEffectCursor as h}from"../CIMCursor.js";import{lazyGeneralizeOperator as a,lazyLengthOperator as c,lazySimplifyOperator as _}from"../CIMEffects.js";const p=()=>t.getLogger("esri.symbols.cim.effects.EffectTaperedPolygon");class y{static{this.instance=null}static local(){return null===y.instance&&(y.instance=new y),y.instance}execute(e,t,s){return new f(e,t,s)}}class f extends h{constructor(e,t,s){super(e,!1,!0),this._slopeS=0,this._slopeC=1,this._lastTangent1=new n(NaN,NaN),this._lastWidth=0;const o=s.geomUnitsPerPoint;this._geomUnitsPerPoint=o,this._halfFromWidth=Math.abs(void 0!==t.fromWidth?t.fromWidth:0)*o*.5,this._halfToWidth=Math.abs(void 0!==t.toWidth?t.toWidth:1)*o*.5,this._originalLength=(void 0!==t.length?t.length:0)*o,this._length=0}processPath(t){if(t.totalSize<=0)return null;if(this._halfFromWidth<=0&&this._halfToWidth<=0){const e=s.createEmptyOptimizedCIM("esriGeometryPolygon",!1,!1,t.yFactor);for(t.seekPathEnd();t.prevPoint();)e.pushXY(t.x,t.y);for(t.seekPathStart();t.nextPoint();)e.pushXY(t.x,t.y);return e}const n=t.getCurrentPath().asJSON(),h=a.module.execute(n,.25*this._geomUnitsPerPoint,{removeDegenerateParts:!0}),y=null==h?null:i(h)?h.rings:l(h)?h.paths:null;if(!y)return p().error(new e("mapview-bad-resource","Unable to process geometry")),null;const f=c.module.execute(h);if((0===this._originalLength||this._originalLength>f)&&f>0){this._length=f;const e=(this._halfToWidth-this._halfFromWidth)/this._length;if(Math.abs(e)<1){const t=e*e;this._slopeC=Math.sqrt(1/(1+t)),this._slopeS=Math.sqrt(t/(1+t)),e<0&&(this._slopeS=-this._slopeS)}else this._slopeC=this._slopeS=.7071}else this._length=this._originalLength,this._slopeC=1,this._slopeS=0;const m=[];for(const e of y){const t=new r,s=new r;let o=0;this._setFromOffset(e.slice(0,2),t,s);for(let r=0,n=3;n<=e.length;++r,++n)o=this._setOffset(e.slice(r,n),o,t,s);this._setToOffset(e.slice(-2),o,t,s);const[i]=t.getGeometry(),[l]=s.getGeometry();m.push([...i,...l.reverse()])}const x={rings:m,spatialReference:{wkid:o.WebMercator.wkid}},d=_.module.execute(x);return s.fromJSONCIM(d)}_setFromOffset([[e,t],[s,o]],i,l){const r=this._halfFromWidth,h=new n(s-e,o-t).normalize().scale(r);i.beginPath([e-h.y,t+h.x]),l.beginPath([e+h.y,t-h.x])}_setToOffset([[e,t],[s,o]],i,l,r){let h;h=(i+=Math.sqrt((s-e)**2+(o-t)**2))>=this._length?this._halfToWidth:this._halfFromWidth+(this._halfToWidth-this._halfFromWidth)*i/this._length;const a=new n(s-e,o-t).normalize().scale(h);l.lineTo([s-a.y,o+a.x]),r.lineTo([s+a.y,o-a.x])}_setOffset([[t,s],[o,i],[l,r]],h,a,c){const _=Math.sqrt((o-t)**2+(i-s)**2);let y;y=h+_>=this._length?this._halfToWidth:this._halfFromWidth+(this._halfToWidth-this._halfFromWidth)*(h+_)/this._length,h+=_;const f=new n(o,i),m=new n(o-t,i-s).normalize(),x=new n(l-o,r-i).normalize(),d=n.sub(x,m),g=a.getPointCount(),u=c.getPointCount();m.leftPerpendicular(),x.leftPerpendicular();const T=m.x*x.x+m.y*x.y;if(T>.99){const e=n.add(m,x).scale(y/2),t=e.clone().rotate(this._slopeC,this._slopeS);a.lineTo([f.x+t.x,f.y+t.y]);const s=e.rotateReverse(this._slopeC,this._slopeS);c.lineTo([f.x-s.x,f.y-s.y])}else{const o=m.x*x.y-m.y*x.x;if(d.scale(1/o),o<0){d.scale(-y).rotateReverse(this._slopeC,this._slopeS);const t=c.getXY(u-1);t||p().error(new e("mapview-bad-resource","Unable to process geometry, index out of scope"));const s=n.add(f,d).sub(n.fromArray(t));if(m.x*s.y-m.y*s.x>0){const e=m.clone().scale(-y).rotateReverse(this._slopeC,this._slopeS),t=x.clone().scale(-y).rotateReverse(this._slopeC,this._slopeS);c.lineTo([f.x+e.x,f.y+e.y]),c.lineTo([f.x,f.y]),c.lineTo([f.x+t.x,f.y+t.y])}else c.lineTo([f.x+d.x,f.y+d.y])}else{d.scale(y).rotate(this._slopeC,this._slopeS);const t=a.getXY(g-1);t||p().error(new e("mapview-bad-resource","Unable to process geometry, index out of scope"));const s=n.add(f,d).sub(n.fromArray(t));if(m.x*s.y-m.y*s.x>0){const e=m.clone().scale(y).rotate(this._slopeC,this._slopeS),t=x.clone().scale(y).rotate(this._slopeC,this._slopeS);a.lineTo([f.x+e.x,f.y+e.y]),a.lineTo([f.x,f.y]),a.lineTo([f.x+t.x,f.y+t.y])}else a.lineTo([f.x+d.x,f.y+d.y])}const i=Math.acos(T);let l=1;if(y>.25){const e=2*Math.acos(1-.25/y);e<i&&(l=Math.round(i/e))}const r=Math.cos(i/l),h=Math.sin(i/l),_=m.clone();if(o<0){_.rotate(this._slopeC,this._slopeS);const o=a.getXY(g-1);o||p().error(new e("mapview-bad-resource","Unable to process geometry, index out of scope"));const i=n.add(f,_.clone().scale(this._lastWidth)),l=n.sub(i,n.fromArray(o)),r=m.x*l.y-m.y*l.x;if(!isNaN(this._lastTangent1.x)&&!isNaN(this._lastTangent1.y)&&r>0){const e=new n(t,s),o=this._lastTangent1.clone().scale(this._lastWidth);o.rotate(this._slopeC,this._slopeS);const i=m.clone().scale(this._lastWidth);i.rotate(this._slopeC,this._slopeS),a.lineTo([e.x+o.x,e.y+o.y]),a.lineTo([e.x,e.y]),a.lineTo([e.x+i.x,e.y+i.y])}}else{_.scale(-1).rotateReverse(this._slopeC,this._slopeS);const o=c.getXY(u-1);o||p().error(new e("mapview-bad-resource","Unable to process geometry, index out of scope"));const i=n.add(f,_.clone().scale(this._lastWidth)),l=n.sub(i,n.fromArray(o)),r=m.x*l.y-m.y*l.x;if(!isNaN(this._lastTangent1.x)&&!isNaN(this._lastTangent1.y)&&r>0){const e=new n(t,s),o=this._lastTangent1.clone().scale(-this._lastWidth);o.rotateReverse(this._slopeC,this._slopeS);const i=m.clone().scale(-this._lastWidth);i.rotateReverse(this._slopeC,this._slopeS),c.lineTo([e.x+o.x,e.y+o.y]),c.lineTo([e.x,e.y]),c.lineTo([e.x+i.x,e.y+i.y])}}_.scale(y);for(let e=0;e<=l;e++)o<0?(a.lineTo([f.x+_.x,f.y+_.y]),_.rotateReverse(r,h)):(c.lineTo([f.x+_.x,f.y+_.y]),_.rotate(r,h))}return this._lastTangent1.setCoords(m.x,m.y),this._lastWidth=y,h}}export{y as EffectTaperedPolygon};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{GeometryCursor as t}from"../../../geometry/GeometryCursor.js";import{DashPattern as e,GeometryWalker as i,Pos as s}from"../GeometryWalker.js";class h{static{this.instance=null}static local(){return null===h.instance&&(h.instance=new h),h.instance}execute(t,e,i){return new n(t,e,i)}}class n{constructor(t,s,h){this._inputGeometries=t
|
|
2
|
+
import{GeometryCursor as t}from"../../../geometry/GeometryCursor.js";import{DashPattern as e,GeometryWalker as i,Pos as s}from"../GeometryWalker.js";class h{static{this.instance=null}static local(){return null===h.instance&&(h.instance=new h),h.instance}execute(t,e,i){return new n(t,e,i)}}class n{constructor(t,s,h){this._inputGeometries=t;const n=h.geomUnitsPerPoint;this._height=(void 0!==s.amplitude?s.amplitude:2)*n,this._period=(void 0!==s.period?s.period:3)*n,this._style=s.waveform??"Sinus",this._height<=0&&(this._height=Math.abs(this._height)),this._period<=0&&(this._period=Math.abs(this._period)),this._pattern=new e,this._pattern.addValue(this._period),this._pattern.addValue(this._period),this._walker=new i,this._walker.updateTolerance(n)}next(){let t=this._inputGeometries.next();for(;t;){if(0===this._height||0===this._period)return t;const e=this._processGeom(t);if(e)return e;t=this._inputGeometries.next()}return null}_processGeom(e){const i=t.createEmptyOptimizedCIM(e.geometryType);for(;e.nextPath();){i.startPath();const t=e.pathLength();if(this._walker.init(e,this._pattern))switch(this._style){case"Sinus":default:this._constructCurve(i,t,!1);break;case"Square":this._constructSquare(i,t);break;case"Triangle":this._constructTriangle(i,t);break;case"Random":this._constructCurve(i,t,!0)}else for(;e.nextPoint();)i.pushXY(e.x,e.y)}return i}_constructCurve(t,e,i){let h=Math.round(e/this._period);0===h&&(h=1);const n=h*16+1,r=e/h,a=this._period/16,o=1/n,p=2*Math.PI*e/r,_=2*Math.PI*Math.random(),c=2*Math.PI*Math.random(),u=2*Math.PI*Math.random(),l=.75-Math.random()/2,d=.75-Math.random()/2,g=new s;this._walker.curPointAndAngle(g),t.pushPoint(g.pt);let P=0;for(;;){if(!this._walker.nextPointAndAngle(a,g)){t.pushPoint(this._walker.getPathEnd());break}{const e=P;let s;if(P+=o,i){const t=this._height/2*(1+.3*Math.sin(l*p*e+_));s=t*Math.sin(p*e+c),s+=t*Math.sin(d*p*e+u),s/=2}else s=.5*this._height*Math.sin(.5*p*e);t.pushXY(g.pt[0]-s*g.sa,g.pt[1]+s*g.ca)}}}_constructSquare(t,e){Math.round(e/this._period);let i=!0;for(;;){let e=!1;if(this._walker.curPositionIsValid()){const h=new s;this._walker.curPointAndAngle(h);const n=new s;if(this._walker.nextPointAndAngle(this._period,n)){const r=new s;this._walker.nextPointAndAngle(this._period,r)&&(i?(t.pushPoint(h.pt),i=!1):t.pushPoint(h.pt),t.pushXY(h.pt[0]-this._height/2*h.sa,h.pt[1]+this._height/2*h.ca),t.pushXY(n.pt[0]-this._height/2*n.sa,n.pt[1]+this._height/2*n.ca),t.pushXY(n.pt[0]+this._height/2*n.sa,n.pt[1]-this._height/2*n.ca),t.pushXY(r.pt[0]+this._height/2*r.sa,r.pt[1]-this._height/2*r.ca),e=!0)}}if(!e){t.pushPoint(this._walker.getPathEnd());break}}}_constructTriangle(t,e){Math.round(e/this._period);let i=!0;for(;;){let e=!1;if(this._walker.curPositionIsValid()){const h=new s;this._walker.curPointAndAngle(h);const n=new s;if(this._walker.nextPointAndAngle(this._period/2,n)){const r=new s;this._walker.nextPointAndAngle(this._period,r)&&(this._walker.nextPosition(this._period/2)&&(i?(t.pushPoint(h.pt),i=!1):t.pushPoint(h.pt),t.pushXY(n.pt[0]-this._height/2*n.sa,n.pt[1]+this._height/2*n.ca),t.pushXY(r.pt[0]+this._height/2*r.sa,r.pt[1]-this._height/2*r.ca)),e=!0)}}if(!e){t.pushPoint(this._walker.getPathEnd());break}}}}export{h as EffectWave};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{PathTransformationCursor as t}from"../CIMCursor.js";import{GeometryWalker as
|
|
2
|
+
import{PathTransformationCursor as t}from"../CIMCursor.js";import{GeometryWalker as s,DashPattern as i,Pos as e}from"../GeometryWalker.js";class h{static{this.instance=null}static local(){return null===h.instance&&(h.instance=new h),h.instance}execute(t,s,i){return new n(t,s,i)}}class n extends t{constructor(t,e,h){super(t),this._walker=new s,this._walker.updateTolerance(h),this._placePerPart=e.placePerPart??!1,this._angleToLine=void 0===e.angleToLine||e.angleToLine,this._keepUpright=e.keepUpright??!1,this._offset=void 0!==e.offset?e.offset*h:0,this._beginGap=void 0!==e.beginPosition?e.beginPosition*h:0,this._endGap=void 0!==e.endPosition?e.endPosition*h:0,this._flipFirst=void 0===e.flipFirst||e.flipFirst,this._pattern=new i,this._pattern.init(e.positionArray,!1),this._subPathLen=0,this._totalPathLen=0,this._posCount=this._pattern.size(),this._pathIndexes=[],this._pathLengths=[],this._pathStarts=[],this._posIndex=0,this._positions=[],this._isFirst=!0,this._prevPos=0}processMultiPath(t){return this._placePerPart?super.processMultiPath(t):this.processPath(t)}processPath(t){return this._pattern.isEmpty()?null:this._placePerPart?this._processPathPerPart(t):this._processMultiPart(t)}_processPathPerPart(t){let s;if(this.iteratePath){const t=this._pattern.nextValue()*this._subPathLen,i=this._beginGap+t;s=i-this._prevPos,this._prevPos=i}else{if(this._posCount=this._pattern.size(),this._isFirst=!0,this._prevPos=0,this._subPathLen=t.pathLength()-this._beginGap-this._endGap,this._subPathLen<0)return this.iteratePath=!1,null;if(!this._walker.init(t,this._pattern,!1))return null;this._pattern.reset();const i=this._pattern.nextValue()*this._subPathLen,e=this._beginGap+i;s=e-this._prevPos,this._prevPos=e,this.iteratePath=!0}const i=new e;return this._walker.nextPointAndAngle(s,i,1)?(this._posCount--,0===this._posCount&&(this.iteratePath=!1),this._setPlacement(i)):(this.iteratePath=!1,null)}_processMultiPart(t){if(!this.iteratePath){if(!this._initializeMultiPart(t))return null;this.iteratePath=!0}if(this._posIndex>=this._positions.length)return this.iteratePath=!1,null;const s=this._getPositionAtDistance(t,this._positions[this._posIndex]);if(null==s)return this.iterateMultiPath=!1,this.iteratePath=!1,null;this._posIndex++;const i=this._posIndex<this._positions.length;return this.iterateMultiPath=i,this.iteratePath=i,this._setPlacement(s)}_initializeMultiPart(t){this._pathIndexes.length=0,this._pathLengths.length=0,this._pathStarts.length=0,this._positions.length=0,this._totalPathLen=0,this._posIndex=0,this._isFirst=!0;for(let s=0;s<t.totalSize;s++){if(!t.seekPath(s))continue;const i=t.pathLength();i<=0||(this._pathIndexes.push(s),this._pathStarts.push(this._totalPathLen),this._pathLengths.push(i),this._totalPathLen+=i)}if(this._subPathLen=this._totalPathLen-this._beginGap-this._endGap,this._subPathLen<0||!this._pathIndexes.length)return!1;this._pattern.reset();for(let s=0;s<this._pattern.size();s++)this._positions.push(this._beginGap+this._pattern.nextValue()*this._subPathLen);return this._positions.length>0}_getPositionAtDistance(t,s){const i=Math.max(0,Math.min(s,this._totalPathLen));let h=this._pathIndexes.length-1;for(let e=0;e<this._pathIndexes.length-1;e++)if(i<=this._pathStarts[e]+this._pathLengths[e]){h=e;break}if(!t.seekPath(this._pathIndexes[h]))return null;if(!this._walker.init(t,this._pattern,!1))return null;const n=new e,a=Math.max(0,Math.min(i-this._pathStarts[h],this._pathLengths[h]));return this._walker.nextPointAndAngle(a,n,1)?n:null}_setPlacement(t){this.internalPlacement.setTranslate(t.pt[0]-this._offset*t.sa,t.pt[1]+this._offset*t.ca);const s=this._isFirst&&this._flipFirst;let i,e;return this._angleToLine?(i=t.ca,e=t.sa):(i=1,e=0),s&&(i=-i,e=-e),this.internalPlacement.setRotateCS(i,e),this._isFirst=!1,this.internalPlacement}}export{h as PlacementAtRatioPositions};
|
package/symbols/cim/types.d.ts
CHANGED
|
@@ -370,6 +370,15 @@ export interface CIMMarker extends CIMSymbolLayer {
|
|
|
370
370
|
markerPlacement?: CIMMarkerPlacement | null;
|
|
371
371
|
}
|
|
372
372
|
|
|
373
|
+
/**
|
|
374
|
+
* > [!WARNING]
|
|
375
|
+
* >
|
|
376
|
+
* > This type is not currently supported.
|
|
377
|
+
*/
|
|
378
|
+
export interface CIMCharacterMarker extends CIMMarker {
|
|
379
|
+
type: "CIMCharacterMarker";
|
|
380
|
+
}
|
|
381
|
+
|
|
373
382
|
/**
|
|
374
383
|
* Represents color substitution, an ordered list of color substitutes.
|
|
375
384
|
*
|
|
@@ -517,6 +526,12 @@ export interface CIMGeometricEffectControlMeasureLine extends CIMGeometricEffect
|
|
|
517
526
|
* @since 5.0
|
|
518
527
|
*/
|
|
519
528
|
rule: CIMGeometricEffectControlMeasureLineRule;
|
|
529
|
+
/**
|
|
530
|
+
* A width value.
|
|
531
|
+
*
|
|
532
|
+
* @since 5.1
|
|
533
|
+
*/
|
|
534
|
+
width?: number;
|
|
520
535
|
}
|
|
521
536
|
|
|
522
537
|
/**
|
|
@@ -1916,6 +1931,24 @@ export interface CIMMarkerPlacementPolygonCenter extends CIMMarkerFillPlacement
|
|
|
1916
1931
|
clipAtBoundary?: boolean;
|
|
1917
1932
|
}
|
|
1918
1933
|
|
|
1934
|
+
/**
|
|
1935
|
+
* > [!WARNING]
|
|
1936
|
+
* >
|
|
1937
|
+
* > This type is not currently supported.
|
|
1938
|
+
*/
|
|
1939
|
+
export interface CIMMaterialSymbolLayer extends CIMSymbolLayer {
|
|
1940
|
+
type: "CIMMaterialSymbolLayer";
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
/**
|
|
1944
|
+
* > [!WARNING]
|
|
1945
|
+
* >
|
|
1946
|
+
* > This type is not currently supported.
|
|
1947
|
+
*/
|
|
1948
|
+
export interface CIMObjectMarker3D extends CIMMarker {
|
|
1949
|
+
type: "CIMObjectMarker3D";
|
|
1950
|
+
}
|
|
1951
|
+
|
|
1919
1952
|
/**
|
|
1920
1953
|
* Represents a picture fill which fills polygonal geometry with a picture. Supported file types are .bmp, .jpg, .png, and .gif.
|
|
1921
1954
|
*
|
|
@@ -2885,7 +2918,7 @@ export type CIMGeometricEffectArrowType = "OpenEnded" | "Block" | "Crossed";
|
|
|
2885
2918
|
*
|
|
2886
2919
|
* @since 5.0
|
|
2887
2920
|
*/
|
|
2888
|
-
export type CIMGeometricEffectControlMeasureLineRule = "FullGeometry" | "PerpendicularFromFirstSegment" | "ReversedFirstSegment" | "PerpendicularToSecondSegment" | "SecondSegmentWithTicks" | "DoublePerpendicular" | "OppositeToFirstSegment" | "TriplePerpendicular" | "HalfCircleFirstSegment" | "HalfCircleSecondSegment" | "HalfCircleExtended" | "OpenCircle" | "CoverageEdgesWithTicks" | "GapExtentWithDoubleTicks" | "GapExtentMidline" | "Chevron" | "PerpendicularWithArc" | "ClosedHalfCircle" | "TripleParallelExtended" | "ParallelWithTicks" | "Parallel" | "PerpendicularToFirstSegment" | "ParallelOffset" | "OffsetOpposite" | "OffsetSame" | "CircleWithArc" | "DoubleJog" | "PerpendicularOffset" | "LineExcludingLastSegment" | "MultivertexArrow" | "CrossedArrow" | "ChevronArrow" | "ChevronArrowOffset" | "PartialFirstSegment" | "Arch" | "CurvedParallelTicks" | "Arc90Degrees" | "TipWithPerpendicularAndTicks" | "ConcentricCircles" | "DoubleJogArrow" | "LinkedChevrons" | "SegmentThenHalfCircle" | "LineWithStraightTicks" | "DoubleCurve" | "ParallelWithTicksByWidth" | "EnclosingRoundedRectangle";
|
|
2921
|
+
export type CIMGeometricEffectControlMeasureLineRule = "FullGeometry" | "PerpendicularFromFirstSegment" | "ReversedFirstSegment" | "PerpendicularToSecondSegment" | "SecondSegmentWithTicks" | "DoublePerpendicular" | "OppositeToFirstSegment" | "TriplePerpendicular" | "HalfCircleFirstSegment" | "HalfCircleSecondSegment" | "HalfCircleExtended" | "OpenCircle" | "CoverageEdgesWithTicks" | "GapExtentWithDoubleTicks" | "GapExtentMidline" | "Chevron" | "PerpendicularWithArc" | "ClosedHalfCircle" | "TripleParallelExtended" | "ParallelWithTicks" | "Parallel" | "PerpendicularToFirstSegment" | "ParallelOffset" | "OffsetOpposite" | "OffsetSame" | "CircleWithArc" | "DoubleJog" | "PerpendicularOffset" | "LineExcludingLastSegment" | "MultivertexArrow" | "CrossedArrow" | "ChevronArrow" | "ChevronArrowOffset" | "PartialFirstSegment" | "Arch" | "CurvedParallelTicks" | "Arc90Degrees" | "TipWithPerpendicularAndTicks" | "ConcentricCircles" | "DoubleJogArrow" | "LinkedChevrons" | "SegmentThenHalfCircle" | "LineWithStraightTicks" | "DoubleCurve" | "ParallelWithTicksByWidth" | "EnclosingRoundedRectangle" | "ParallelOffsetByValue";
|
|
2889
2922
|
|
|
2890
2923
|
/**
|
|
2891
2924
|
* Options for enclosing polygon methods in geometric effects.
|
package/symbols/cim/utils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{defaultCIMValues as e,defaultCIMColor as t}from"./defaultCIMValues.js";function r(e){return"function"==typeof e}function n(e,t,n,o){return r(e)?e(t,n,o):e}function o(e){return[e.r,e.g,e.b,e.a]}const l=" /-,\n";function i(e){let t=e.length;for(;t--;)if(!l.includes(e.charAt(t)))return!1;return!0}function a(e,t){const r=[];let n=0,o=-1;do{if(o=e.indexOf("[",n),o>=n){if(o>n){const t=e.slice(n,o);r.push([t,null,i(t)])}if(n=o+1,o=e.indexOf("]",n),o>=n){if(o>n){const l=t[e.slice(n,o)];l&&r.push([null,l,!1])}n=o+1}}}while(-1!==o);if(n<e.length){const t=e.slice(n);r.push([t,null,i(t)])}return r}function u(e,t,r){let n="",o=null;for(const l of t){const[t,r,i]=l;if(null!=t&&""!==t)i?o=t:(null!=o&&(n+=o,o=null),n+=t);else{const t=e.readAttribute(r);null!=t&&""!==t&&(null!==o&&(n+=o,o=null),n+=t)}}return s(n,r)}function c(e,t,r,n){let o="",l=null;for(const i of t){const[t,n,a]=i;if(null!=t&&""!==t)a?l=t:(null!=l&&(o+=l,l=null),o+=t);else{let t=n;null!=r&&(t=W(n,r));const i=e.attributes[t];null!=i&&""!==i&&(null!=l&&(o+=l,l=null),o+=i)}}return s(o,n)}function s(e,t){switch("string"!=typeof e&&(e=String(e)),t){case"LowerCase":return e.toLowerCase();case"Allcaps":return e.toUpperCase();default:return e}}function f(e,t,r,n,o,l,i=!0){const a=t/o,u=r/l,c=Math.ceil(a/2),s=Math.ceil(u/2);for(let f=0;f<l;f++)for(let r=0;r<o;r++){const M=4*(r+(i?l-f-1:f)*o);let y=0,m=0,C=0,h=0,p=0,I=0,b=0;const d=(f+.5)*u;for(let n=Math.floor(f*u);n<(f+1)*u;n++){const o=Math.abs(d-(n+.5))/s,l=(r+.5)*a,i=o*o;for(let u=Math.floor(r*a);u<(r+1)*a;u++){let r=Math.abs(l-(u+.5))/c;const o=Math.sqrt(i+r*r);o>=-1&&o<=1&&(y=2*o*o*o-3*o*o+1,y>0&&(r=4*(u+n*t),b+=y*e[r+3],C+=y,e[r+3]<255&&(y=y*e[r+3]/250),h+=y*e[r],p+=y*e[r+1],I+=y*e[r+2],m+=y))}}n[M]=h/m,n[M+1]=p/m,n[M+2]=I/m,n[M+3]=b/C}}function M(e){return e?[e[0],e[1],e[2],e[3]/255]:[0,0,0,0]}function y(e){return e.data?.symbol??null}function m(e){return"CIMVectorMarker"===e.type||"CIMPictureMarker"===e.type||"CIMBarChartMarker"===e.type||"CIMCharacterMarker"===e.type||"CIMPieChartMarker"===e.type||"CIMStackedBarChartMarker"===e.type}function C(e){return"CIMGradientStroke"===e.type||"CIMPictureStroke"===e.type||"CIMSolidStroke"===e.type}function h(e){return null!=e&&("CIMGradientFill"===e.type||"CIMHatchFill"===e.type||"CIMPictureFill"===e.type||"CIMSolidFill"===e.type||"CIMWaterFill"===e.type)}function p(e){return null!=e&&("CIMMarkerPlacementAlongLineRandomSize"===e.type||"CIMMarkerPlacementAlongLineSameSize"===e.type||"CIMMarkerPlacementAlongLineVariableSize"===e.type||"CIMMarkerPlacementAtExtremities"===e.type||"CIMMarkerPlacementAtMeasuredUnits"===e.type||"CIMMarkerPlacementAtRatioPositions"===e.type||"CIMMarkerPlacementOnLine"===e.type||"CIMMarkerPlacementOnVertices"===e.type)}const I=(e,t=0)=>null==e||isNaN(e)?t:e,b=(e,t)=>null!=e?e:t,d=(e,t)=>e??t,k=e=>e.tintColor?M(e.tintColor):[255,255,255,1];class S{constructor(e){this._import=e}getImportPromise(){return null==this._promise&&(this._promise=this._import().then(e=>this.module=e)),this._promise}}function P(e){return new S(e)}function g(e){if(!e)return"normal";switch(e.toLowerCase()){case"italic":return"italic";case"oblique":return"oblique";default:return"normal"}}function w(e){if(!e)return"normal";switch(e.toLowerCase()){case"bold":return"bold";case"bolder":return"bolder";case"lighter":return"lighter";default:return"normal"}}function L(e){let t="normal",r="normal";if(e){const n=e.toLowerCase();n.includes("italic")?t="italic":n.includes("oblique")&&(t="oblique"),n.includes("bold")?r="bold":n.includes("light")&&(r="lighter")}return{style:t,weight:r}}function T(e){return e.underline?"underline":e.strikethrough?"line-through":"none"}function x(e){if(!e)return null;switch(e.type){case"CIMPolygonSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=x(t);if(null!=e)return e}break;case"CIMTextSymbol":return x(e.symbol);case"CIMSolidFill":return e.color}return null}function A(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":{const t=e.symbolLayers;if(t)for(const e of t){const t=A(e);if(null!=t)return t}break}case"CIMTextSymbol":return A(e.symbol);case"CIMSolidStroke":return e.color}}function N(e){for(const t of e)if(t.enable)switch(t.type){case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return!0}return!1}function v(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=v(t);if(void 0!==e)return e}break;case"CIMTextSymbol":return v(e.symbol);case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return e.width}}function F(e){switch(e){case"Left":default:return"left";case"Right":return"right";case"Center":case"Justify":return"center"}}function V(e){switch(e){case"Top":default:return"top";case"Center":return"middle";case"Baseline":return"baseline";case"Bottom":return"bottom"}}function z(e){return(e?Object.keys(e):[]).map(t=>({name:t,alias:t,type:"string"==typeof e[t]?"esriFieldTypeString":"esriFieldTypeDouble"}))}const G=e=>e.includes("data:image/svg+xml");function E(e){if(!e)return null;switch(e.type){case"CIMPointSymbol":case"CIMTextSymbol":return"esriGeometryPoint";case"CIMLineSymbol":return"esriGeometryPolyline";case"CIMPolygonSymbol":return"esriGeometryPolygon";default:return null}}function O(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}function B(e,t,r,n,o,l,i=!0){const{infos:a}=l;let u=1,c=0,s=0,f=0,M=1;for(const{absoluteAnchorPoint:C,offsetX:h,offsetY:p,rotation:I,size:b,frameHeight:d,rotateClockWise:k,scaleSymbolsProportionally:S}of a){M=C?1:u;s=J(h,p,c,M,s),f=$(h,p,c,M,f),d&&(S||i)&&(u*=b/d),c=K(I,k,c)}const y=J(n,o,c,M,s),m=$(n,o,c,M,f);return{size:e*u,rotation:K(t,r,c),offsetX:y,offsetY:m}}function D(e){if(null==e)return!1;if(Array.isArray(e))return e.every(e=>D(e));switch(typeof e){case"string":return!!e;case"number":return!isNaN(e)}}function q(r,n){if("color"===n||"outlinecolor"===n||"backgroundcolor"===n||"borderlinecolor"===n||"tintcolor"===n)return[...t[n]];const o=e[r];if(!o)throw new Error(`InternalError: default value for type ${r}.`);return o[n]}function R(e){return e.split(" ").map(e=>Number(e))}function _(e){return"string"==typeof e?R(e):e}function j(e){return e?.dashTemplate&&(e.dashTemplate=_(e.dashTemplate)),e}function H(e){if(null==e)return"Normal";switch(e.type){case"CIMTextSymbol":return e.textCase??"Normal";case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const t=e.symbolLayers;if(!t)return"Normal";for(const e of t)if("CIMVectorMarker"===e.type)return H(e)}break;case"CIMVectorMarker":{const t=e.markerGraphics;if(!t)return"Normal";for(const e of t)if(e.symbol)return H(e.symbol)}}return"Normal"}function U(t){if(t)switch(t.type){case"CIMTextSymbol":return t.height;case"CIMPointSymbol":{let r=0;if(t.symbolLayers)for(const n of t.symbolLayers)if(n)switch(n.type){case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":{const t=n.size??e.CIMVectorMarker.size;t>r&&(r=t);break}}return r}case"CIMLineSymbol":case"CIMPolygonSymbol":{let r=0;if(t.symbolLayers)for(const n of t.symbolLayers)if(n)switch(n.type){case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":{const e=n.width;null!=e&&e>r&&(r=e);break}case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":if(n.markerPlacement&&p(n.markerPlacement)){const t=n.size??e.CIMVectorMarker.size;t>r&&(r=t)}break;case"CIMPictureFill":{const e=n.height;null!=e&&e>r&&(r=e)}}return r}}}function W(e,t){if(null!==t){const r=t.get(e);return r?r.name:e}return e}function X(e){return e.map(e=>({...e,propertyName:O(e.propertyName)}))}function Y(e){const t={};for(const r in e){const n=e[r];t[O(r)]=n}return t}function $(e,t,r,n,o){const l=r*Math.PI/180;if(l){const r=Math.cos(l);return(Math.sin(l)*e+r*t)*n+o}return t*n+o}function J(e,t,r,n,o){const l=r*Math.PI/180;if(l){return(Math.cos(l)*e-Math.sin(l)*t)*n+o}return e*n+o}function K(e,t,r){return t?r-e:r+e}function Q(e,t,r){const n="Color"===r||"TintColor"===r||"ToColor"===r,o="Rotation"===r||"Angle"===r||"ToRotation"===r;let l=t[O(r)];if(null!=l&&(n?l=[l[0]/255,l[1]/255,l[2]/255,l[3]/255]:o&&(l*=Math.PI/180)),null==l&&(l=q(t.type,r.toLowerCase()),null!=l&&(n?l=[l[0]/255,l[1]/255,l[2]/255,l[3]]:o&&(l*=Math.PI/180))),null!=t.primitiveName){const i=e[t.primitiveName];if(null!=i){const e=i[r];null==e||("string"==typeof e||"number"==typeof e||Array.isArray(e)?(l=e,null!=l&&(n?l=[l[0]/255,l[1]/255,l[2]/255,l[3]/255]:o&&(l*=Math.PI/180))):(l={valueExpressionInfo:e,defaultValue:l},null!=l&&(n?l={type:"Process",op:"ArcadeColor",value:l}:o&&(l={type:"Process",op:"Divide",left:l,right:180/Math.PI}))))}}if(null==l)throw new Error(`Failed to derive a value or an expression for "${r}".`);return l}function Z(e,t,r){if(null!=t[O(r)])return!0;if(null!=t.primitiveName){const n=e[t.primitiveName];if(null!=n){if(null!=n[r])return!0}}return!1}function ee(e,t){return Math.max(Math.min((e??t)/100,1),0)}function te(e){if(!e)return 3;switch(e){case"Begin":return 0;case"End":return 2;case"Both":return 1;default:return 3}}function re(e){if(!e)return 2;switch(e){case"Tolerance":return 0;case"Text":return 1;default:return 2}}function ne(e){if(!e)return 2;switch(e){case"MoveBegin":return 0;case"MoveEnd":return 1;default:return 2}}function oe(e){if(!e)return 3;switch(e){case"Only":return 0;case"Suffix":return 1;case"Expression":return 2;default:return 3}}function le(e){return null!=e&&"inflateSize"in e&&null!=e.inflateSize}function ie(e){if("CIMPictureMarker"!==e.type&&"CIMVectorMarker"!==e.type)return!1;const t=e.markerPlacement;return!(p(t)&&!0===t.angleToLine)}export{s as adjustTextCase,a as analyzeTextParts,B as applyParentTransform,c as assignTextValuesFromFeature,z as attributesToFields,o as colorToArray,n as evaluateValueOrFunction,T as fromCIMFontDecoration,L as fromCIMFontStyle,F as fromCIMHorizontalAlignment,V as fromCIMVerticalAlignment,q as getDefaultCIMValue,d as getEnum,W as getFieldName,x as getFillColor,g as getFontStyle,w as getFontWeight,I as getNumericValue,Q as getProcessParam,ee as getRelativeGradientSize,U as getSize,A as getStrokeColor,v as getStrokeWidth,H as getTextCasing,u as getTextValuesFromFeatureHandle,k as getTintColor,b as getValue,Z as hasProcessParam,N as hasStrokeLayer,P as importLazily,h as isCIMFill,m as isCIMMarker,p as isCIMMarkerStrokePlacement,C as isCIMStroke,r as isFeatureValueFn,le as isGeometricLinearEffect,ie as isMarkerScreenAligned,G as isSVGImage,D as isValidCIMValue,E as mapCIMSymbolToGeometryType,M as normalizeAlpha,j as normalizeDashEffectTemplate,_ as normalizeDashTemplate,X as normalizePrimitiveOverrideProps,R as parseDashTemplate,f as resampleHermite,re as stringToDimensionMarkerFit,te as stringToDimensionPartOptions,ne as stringToDimensionTextFit,oe as stringToDimensionTextOptions,y as toCIMSymbolJSON,Y as toLowerCaseProps,O as uncapitalize};
|
|
2
|
+
import{defaultCIMValues as e,defaultCIMColor as t}from"./defaultCIMValues.js";function r(e){return"function"==typeof e}function n(e,t,n,o){return r(e)?e(t,n,o):e}function o(e){return[e.r,e.g,e.b,e.a]}const i=" /-,\n";function a(e){let t=e.length;for(;t--;)if(!i.includes(e.charAt(t)))return!1;return!0}function l(e,t){const r=[];let n=0,o=-1;do{if(o=e.indexOf("[",n),o>=n){if(o>n){const t=e.slice(n,o);r.push([t,null,a(t)])}if(n=o+1,o=e.indexOf("]",n),o>=n){if(o>n){const i=t[e.slice(n,o)];i&&r.push([null,i,!1])}n=o+1}}}while(-1!==o);if(n<e.length){const t=e.slice(n);r.push([t,null,a(t)])}return r}function c(e,t,r){let n="",o=null;for(const i of t){const[t,r,a]=i;if(null!=t&&""!==t)a?o=t:(null!=o&&(n+=o,o=null),n+=t);else{const t=e.readAttribute(r);null!=t&&""!==t&&(null!==o&&(n+=o,o=null),n+=t)}}return u(n,r)}function s(e,t,r,n){let o="",i=null;for(const a of t){const[t,n,l]=a;if(null!=t&&""!==t)l?i=t:(null!=i&&(o+=i,i=null),o+=t);else{let t=n;null!=r&&(t=Y(n,r));const a=e.attributes[t];null!=a&&""!==a&&(null!=i&&(o+=i,i=null),o+=a)}}return u(o,n)}function u(e,t){switch("string"!=typeof e&&(e=String(e)),t){case"LowerCase":return e.toLowerCase();case"Allcaps":return e.toUpperCase();default:return e}}function f(e,t,r,n,o,i,a=!0){const l=t/o,c=r/i,s=Math.ceil(l/2),u=Math.ceil(c/2);for(let f=0;f<i;f++)for(let r=0;r<o;r++){const M=4*(r+(a?i-f-1:f)*o);let m=0,y=0,C=0,h=0,I=0,p=0,b=0;const d=(f+.5)*c;for(let n=Math.floor(f*c);n<(f+1)*c;n++){const o=Math.abs(d-(n+.5))/u,i=(r+.5)*l,a=o*o;for(let c=Math.floor(r*l);c<(r+1)*l;c++){let r=Math.abs(i-(c+.5))/s;const o=Math.sqrt(a+r*r);o>=-1&&o<=1&&(m=2*o*o*o-3*o*o+1,m>0&&(r=4*(c+n*t),b+=m*e[r+3],C+=m,e[r+3]<255&&(m=m*e[r+3]/250),h+=m*e[r],I+=m*e[r+1],p+=m*e[r+2],y+=m))}}n[M]=h/y,n[M+1]=I/y,n[M+2]=p/y,n[M+3]=b/C}}function M(e){return e?[e[0],e[1],e[2],e[3]/255]:[0,0,0,0]}function m(e){return e.data?.symbol??null}function y(e){return"CIMVectorMarker"===e.type||"CIMPictureMarker"===e.type||"CIMBarChartMarker"===e.type||"CIMCharacterMarker"===e.type||"CIMPieChartMarker"===e.type||"CIMStackedBarChartMarker"===e.type}function C(e){return"CIMGradientStroke"===e.type||"CIMPictureStroke"===e.type||"CIMSolidStroke"===e.type}function h(e){return null!=e&&("CIMGradientFill"===e.type||"CIMHatchFill"===e.type||"CIMPictureFill"===e.type||"CIMSolidFill"===e.type||"CIMWaterFill"===e.type)}function I(e){return null!=e&&("CIMMarkerPlacementAlongLineRandomSize"===e.type||"CIMMarkerPlacementAlongLineSameSize"===e.type||"CIMMarkerPlacementAlongLineVariableSize"===e.type||"CIMMarkerPlacementAtExtremities"===e.type||"CIMMarkerPlacementAtMeasuredUnits"===e.type||"CIMMarkerPlacementAtRatioPositions"===e.type||"CIMMarkerPlacementOnLine"===e.type||"CIMMarkerPlacementOnVertices"===e.type)}const p=(e,t=0)=>null==e||isNaN(e)?t:e,b=(e,t)=>null!=e?e:t,d=(e,t)=>e??t,k=e=>e.tintColor?M(e.tintColor):[255,255,255,1];class g{constructor(e){this._import=e}getImportPromise(){return null==this._promise&&(this._promise=this._import().then(e=>this.module=e)),this._promise}}function S(e){return new g(e)}function P(e){if(!e)return"normal";switch(e.toLowerCase()){case"italic":return"italic";case"oblique":return"oblique";default:return"normal"}}function w(e){if(!e)return"normal";switch(e.toLowerCase()){case"bold":return"bold";case"bolder":return"bolder";case"lighter":return"lighter";default:return"normal"}}function L(e){let t="normal",r="normal";if(e){const n=e.toLowerCase();n.includes("italic")?t="italic":n.includes("oblique")&&(t="oblique"),n.includes("bold")?r="bold":n.includes("light")&&(r="lighter")}return{style:t,weight:r}}function E(e){return e.underline?"underline":e.strikethrough?"line-through":"none"}function G(e){if(!e)return null;switch(e.type){case"CIMPolygonSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=G(t);if(null!=e)return e}break;case"CIMTextSymbol":return G(e.symbol);case"CIMSolidFill":return e.color}return null}function T(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":{const t=e.symbolLayers;if(t)for(const e of t){const t=T(e);if(null!=t)return t}break}case"CIMTextSymbol":return T(e.symbol);case"CIMSolidStroke":return e.color}}function x(e){for(const t of e)if(t.enable)switch(t.type){case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return!0}return!1}function A(e){if(e)switch(e.type){case"CIMPolygonSymbol":case"CIMLineSymbol":if(e.symbolLayers)for(const t of e.symbolLayers){const e=A(t);if(void 0!==e)return e}break;case"CIMTextSymbol":return A(e.symbol);case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return e.width}}function v(e){switch(e){case"Left":default:return"left";case"Right":return"right";case"Center":return"center";case"Justify":return"justify"}}function N(e){switch(e){default:case"Bottom":return"bottom";case"Top":return"top";case"Center":return"middle";case"Baseline":return"baseline"}}function z(e){return(e?Object.keys(e):[]).map(t=>({name:t,alias:t,type:"string"==typeof e[t]?"esriFieldTypeString":"esriFieldTypeDouble"}))}const F=e=>e.includes("data:image/svg+xml");function V(e){if(!e)return null;switch(e.type){case"CIMPointSymbol":case"CIMTextSymbol":return"esriGeometryPoint";case"CIMLineSymbol":return"esriGeometryPolyline";case"CIMPolygonSymbol":return"esriGeometryPolygon";default:return null}}function O(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}function B(e,t,r,n,o,i,a=!0){const{infos:l}=i;let c=1,s=0,u=0,f=0,M=1;for(const{absoluteAnchorPoint:C,offsetX:h,offsetY:I,rotation:p,size:b,frameHeight:d,rotateClockWise:k,scaleSymbolsProportionally:g}of l){M=C?1:c;u=Q(h,I,s,M,u),f=K(h,I,s,M,f),d&&(g||a)&&(c*=b/d),s=Z(p,k,s)}const m=Q(n,o,s,M,u),y=K(n,o,s,M,f);return{size:e*c,rotation:Z(t,r,s),offsetX:m,offsetY:y}}function R(e){if(null==e)return!1;if(Array.isArray(e))return e.every(e=>R(e));switch(typeof e){case"string":return!!e;case"number":return!isNaN(e)}}function D(r,n){if("color"===n||"outlinecolor"===n||"backgroundcolor"===n||"borderlinecolor"===n||"tintcolor"===n)return[...t[n]];const o=e[r];if(!o)throw new Error(`InternalError: default value for type ${r}.`);return o[n]}function j(e){return e.split(" ").map(e=>Number(e))}function q(e){return"string"==typeof e?j(e):e}function W(e){return e?.dashTemplate&&(e.dashTemplate=q(e.dashTemplate)),e}function _(e){if(null==e)return"Normal";switch(e.type){case"CIMTextSymbol":return e.textCase??"Normal";case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const t=e.symbolLayers;if(!t)return"Normal";for(const e of t)if("CIMVectorMarker"===e.type)return _(e)}break;case"CIMVectorMarker":{const t=e.markerGraphics;if(!t)return"Normal";for(const e of t)if(e.symbol)return _(e.symbol)}}return"Normal"}function X(t){if(t)switch(t.type){case"CIMTextSymbol":return t.height;case"CIMPointSymbol":{let r=0;if(t.symbolLayers)for(const n of t.symbolLayers)if(n)switch(n.type){case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":{const t=n.size??e.CIMVectorMarker.size;t>r&&(r=t);break}}return r}case"CIMLineSymbol":case"CIMPolygonSymbol":{let r=0;if(t.symbolLayers)for(const n of t.symbolLayers)if(n)switch(n.type){case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":{const e=n.width;null!=e&&e>r&&(r=e);break}case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":if(n.markerPlacement&&I(n.markerPlacement)){const t=n.size??e.CIMVectorMarker.size;t>r&&(r=t)}break;case"CIMPictureFill":{const e=n.height;null!=e&&e>r&&(r=e)}}return r}}}function Y(e,t){if(null!==t){const r=t.get(e);return r?r.name:e}return e}function H(e){return e.map(e=>({...e,propertyName:O(e.propertyName)}))}function J(e){const t={};for(const r in e){const n=e[r];t[O(r)]=n}return t}function U(e){if(!e)return 0;let t=0;for(const r of e)t+=$(r);return t}function $(e){if(!e)return 0;if(le(e))return e.inflateSize??256;switch(e.type){case"CIMGeometricEffectArrow":return Math.abs(.5*e.width);case"CIMGeometricEffectBuffer":return Math.abs(e.size);case"CIMGeometricEffectControlMeasureLine":return 500;case"CIMGeometricEffectExtension":return Math.abs(e.length);case"CIMGeometricEffectJog":return Math.abs(.5*e.length);case"CIMGeometricEffectMove":return Math.max(Math.abs(p(e.offsetX)),Math.abs(p(e.offsetY)));case"CIMGeometricEffectOffset":case"CIMGeometricEffectOffsetTangent":return Math.abs(e.offset);case"CIMGeometricEffectRadial":return Math.abs(e.length??5);case"CIMGeometricEffectRegularPolygon":return Math.abs(e.radius);case"CIMGeometricEffectRotate":case"CIMGeometricEffectScale":default:return 0;case"CIMGeometricEffectTaperedPolygon":return.5*Math.max(Math.abs(e.fromWidth),Math.abs(e.toWidth));case"CIMGeometricEffectWave":return Math.abs(e.amplitude);case"CIMGeometricEffectDonut":return Math.abs(e.width)}}function K(e,t,r,n,o){const i=r*Math.PI/180;if(i){const r=Math.cos(i);return(Math.sin(i)*e+r*t)*n+o}return t*n+o}function Q(e,t,r,n,o){const i=r*Math.PI/180;if(i){return(Math.cos(i)*e-Math.sin(i)*t)*n+o}return e*n+o}function Z(e,t,r){return t?r-e:r+e}function ee(e,t,r){const n="Color"===r||"TintColor"===r||"ToColor"===r,o="Rotation"===r||"Angle"===r||"ToRotation"===r;let i=t[O(r)];if(null!=i&&(n?i=[i[0]/255,i[1]/255,i[2]/255,i[3]/255]:o&&(i*=Math.PI/180)),null==i&&(i=D(t.type,r.toLowerCase()),null!=i&&(n?i=[i[0]/255,i[1]/255,i[2]/255,i[3]]:o&&(i*=Math.PI/180))),null!=t.primitiveName){const a=e[t.primitiveName];if(null!=a){const e=a[r];null==e||("string"==typeof e||"number"==typeof e||Array.isArray(e)?(i=e,null!=i&&(n?i=[i[0]/255,i[1]/255,i[2]/255,i[3]/255]:o&&(i*=Math.PI/180))):(i={valueExpressionInfo:e,defaultValue:i},null!=i&&(n?i={type:"Process",op:"ArcadeColor",value:i}:o&&(i={type:"Process",op:"Divide",left:i,right:180/Math.PI}))))}}if(null==i)throw new Error(`Failed to derive a value or an expression for "${r}".`);return i}function te(e,t,r){if(null!=t[O(r)])return!0;if(null!=t.primitiveName){const n=e[t.primitiveName];if(null!=n){if(null!=n[r])return!0}}return!1}function re(e,t){return Math.max(Math.min((e??t)/100,1),0)}function ne(e){if(!e)return 3;switch(e){case"Begin":return 0;case"End":return 2;case"Both":return 1;default:return 3}}function oe(e){if(!e)return 2;switch(e){case"Tolerance":return 0;case"Text":return 1;default:return 2}}function ie(e){if(!e)return 2;switch(e){case"MoveBegin":return 0;case"MoveEnd":return 1;default:return 2}}function ae(e){if(!e)return 3;switch(e){case"Only":return 0;case"Suffix":return 1;case"Expression":return 2;default:return 3}}function le(e){return null!=e&&"inflateSize"in e&&null!=e.inflateSize}function ce(e){if("CIMPictureMarker"!==e.type&&"CIMVectorMarker"!==e.type)return!1;const t=e.markerPlacement;return!(I(t)&&!0===t.angleToLine)}function se(e){return null!=e&&ue(e)?e:void 0}function ue(e){return"setControlPoint"in e&&"getControlPoint"in e&&"setControlPointAt"in e&&"getControlPointAt"in e}export{u as adjustTextCase,l as analyzeTextParts,B as applyParentTransform,se as asCIMGeometryCursor,s as assignTextValuesFromFeature,z as attributesToFields,o as colorToArray,n as evaluateValueOrFunction,E as fromCIMFontDecoration,L as fromCIMFontStyle,v as fromCIMHorizontalAlignment,N as fromCIMVerticalAlignment,D as getDefaultCIMValue,U as getEffectsInflateSize,d as getEnum,Y as getFieldName,G as getFillColor,P as getFontStyle,w as getFontWeight,p as getNumericValue,ee as getProcessParam,re as getRelativeGradientSize,X as getSize,T as getStrokeColor,A as getStrokeWidth,_ as getTextCasing,c as getTextValuesFromFeatureHandle,k as getTintColor,b as getValue,te as hasProcessParam,x as hasStrokeLayer,S as importLazily,h as isCIMFill,y as isCIMMarker,I as isCIMMarkerStrokePlacement,C as isCIMStroke,r as isFeatureValueFn,le as isGeometricLinearEffect,ce as isMarkerScreenAligned,F as isSVGImage,R as isValidCIMValue,V as mapCIMSymbolToGeometryType,M as normalizeAlpha,W as normalizeDashEffectTemplate,q as normalizeDashTemplate,H as normalizePrimitiveOverrideProps,j as parseDashTemplate,f as resampleHermite,oe as stringToDimensionMarkerFit,ne as stringToDimensionPartOptions,ie as stringToDimensionTextFit,ae as stringToDimensionTextOptions,m as toCIMSymbolJSON,J as toLowerCaseProps,O as uncapitalize};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
class t{static{this.instance=null}static local(){return null===t.instance&&(t.instance=new t),t.instance}execute(t,n,s){return new e(t,n,s)}}class e{constructor(t,e,n){}next(){throw new Error("Method not implemented.")}}export{t as default};
|
|
2
|
+
class t{static{this.instance=null}static local(){return null===t.instance&&(t.instance=new t),t.instance}execute(t,n,s){return new e(t,n,s?.geomUnitsPerPoint??1)}}class e{constructor(t,e,n){}next(){throw new Error("Method not implemented.")}}export{t as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
class t{static{this.instance=null}static local(){return null===t.instance&&(t.instance=new t),t.instance}execute(t,n,s){return new e(t,n,s)}}class e{constructor(t,e,n){}next(){throw new Error("Method not implemented.")}}export{t as default};
|
|
2
|
+
class t{static{this.instance=null}static local(){return null===t.instance&&(t.instance=new t),t.instance}execute(t,n,s){return new e(t,n,s?.geomUnitsPerPoint??1)}}class e{constructor(t,e,n){}next(){throw new Error("Method not implemented.")}}export{t as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
class t{static{this.instance=null}static local(){return null===t.instance&&(t.instance=new t),t.instance}execute(t,n,s){return new e(t,n,s)}}class e{constructor(t,e,n){}next(){throw new Error("Method not implemented.")}}export{t as default};
|
|
2
|
+
class t{static{this.instance=null}static local(){return null===t.instance&&(t.instance=new t),t.instance}execute(t,n,s){return new e(t,n,s?.geomUnitsPerPoint??1)}}class e{constructor(t,e,n){}next(){throw new Error("Method not implemented.")}}export{t as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
class t{static{this.instance=null}static local(){return null===t.instance&&(t.instance=new t),t.instance}execute(t,n,s){return new e(t,n,s)}}class e{constructor(t,e,n){}next(){throw new Error("Method not implemented.")}}export{t as default};
|
|
2
|
+
class t{static{this.instance=null}static local(){return null===t.instance&&(t.instance=new t),t.instance}execute(t,n,s){return new e(t,n,s?.geomUnitsPerPoint??1)}}class e{constructor(t,e,n){}next(){throw new Error("Method not implemented.")}}export{t as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
class e{static{this.instance=null}static local(){return null===e.instance&&(e.instance=new e),e.instance}execute(e,t,i){if("linearDimensionPointEffect"!==t?.type)throw new Error("Invalid effect type for LinearDimensionPointEffect");return new n(e,t,
|
|
2
|
+
class e{static{this.instance=null}static local(){return null===e.instance&&(e.instance=new e),e.instance}execute(e,t,i){const r=i?.geomUnitsPerPoint??1;if("linearDimensionPointEffect"!==t?.type)throw new Error("Invalid effect type for LinearDimensionPointEffect");return new n(e,t,r)}}class n{constructor(e,n,t){}next(){throw new Error("Method not implemented.")}}export{e as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
class t{static{this.instance=null}static local(){return null===t.instance&&(t.instance=new t),t.instance}execute(t,n,s){return new e(t,n,s)}}class e{constructor(t,e,n){}next(){throw new Error("Method not implemented.")}}export{t as default};
|
|
2
|
+
class t{static{this.instance=null}static local(){return null===t.instance&&(t.instance=new t),t.instance}execute(t,n,s){return new e(t,n,s?.geomUnitsPerPoint??1)}}class e{constructor(t,e,n){}next(){throw new Error("Method not implemented.")}}export{t as default};
|
package/symbols/types.d.ts
CHANGED
|
@@ -206,7 +206,7 @@ export type FontWeight = "normal" | "lighter" | "bold" | "bolder";
|
|
|
206
206
|
* @see [TextSymbol.horizontalAlignment](https://developers.arcgis.com/javascript/latest/references/core/symbols/TextSymbol/#horizontalAlignment)
|
|
207
207
|
* @see [TextSymbol3DLayer.horizontalAlignment](https://developers.arcgis.com/javascript/latest/references/core/symbols/TextSymbol3DLayer/#horizontalAlignment)
|
|
208
208
|
*/
|
|
209
|
-
export type TextHorizontalAlignment = "left" | "right" | "center";
|
|
209
|
+
export type TextHorizontalAlignment = "left" | "right" | "center" | "justify";
|
|
210
210
|
|
|
211
211
|
/**
|
|
212
212
|
* Vertical text alignment options.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{VectorTile as e}from"../VectorTile.js";import{fadeDuration as t}from"./config.js";function o(e){return(e.uniqueSymbol?.show&&e.uniqueSymbol?.lastShow)??!1}function i(e,t){if(e.priority-t.priority)return e.priority-t.priority;if(o(e)&&!o(t))return-1;if(o(t)&&!o(e))return 1;const i=e.tile.key,s=t.tile.key;return i.world-s.world?i.world-s.world:i.level-s.level?i.level-s.level:i.row-s.row?i.row-s.row:i.col-s.col?i.col-s.col:e.xTile-t.xTile?e.xTile-t.xTile:e.yTile-t.yTile}class s{get running(){return this._running}constructor(e,t,o,i,s,r,n,l){this.selectionMode=e,this._visibleTiles=t,this._symbolRepository=o,this._styleRepository=i,this._createCollisionJob=s,this._assignTileSymbolsOpacity=r,this._symbolLayerSorter=n,this._isLayerVisible=l,this._selectionJob=null,this._selectionJobCompleted=!1,this._collisionJob=null,this._collisionJobCompleted=!1,this._opacityJob=null,this._opacityJobCompleted=!1,this._running=!0}setScreenSize(e,t){this._screenWidth===e&&this._screenHeight===t||this.restart(),this._screenWidth=e,this._screenHeight=t}restart(){this._selectionJob=null,this._selectionJobCompleted=!1,this._collisionJob=null,this._collisionJobCompleted=!1,this._opacityJob=null,this._opacityJobCompleted=!1,this._running=!0}continue(e){if(this._selectionJob||(this._selectionJob=this._createSelectionJob()),!this._selectionJobCompleted){const t=performance.now();if(!this._selectionJob.work(e))return!1;if(this._selectionJobCompleted=!0,0===(e=Math.max(0,e-(performance.now()-t))))return!1}if(this._collisionJob||(this._collisionJob=this._createCollisionJob(this._selectionJob.sortedSymbols,this._screenWidth,this._screenHeight)),!this._collisionJobCompleted){const t=performance.now();if(!this._collisionJob.work(e))return!1;if(this._collisionJobCompleted=!0,0===(e=Math.max(0,e-(performance.now()-t))))return!1}if(this._opacityJob||(this._opacityJob=this._createOpacityJob()),!this._opacityJobCompleted){const t=performance.now();if(!this._opacityJob.work(e))return!1;if(this._opacityJobCompleted=!0,0===(e=Math.max(0,e-(performance.now()-t))))return!1}return this._running=!1,!0}_getFilteredByLayer(){let e;if(this._styleRepository?.layerContexts)for(const t of this._symbolRepository.uniqueSymbols){const o=this._styleRepository.layerContexts?.get(t.styleLayerUID);if(o?.attributeView)for(const i of t.uniqueSymbols){e??=new Map,e.get(t.styleLayerUID)||e.set(t.styleLayerUID,new Set);const s=e.get(t.styleLayerUID);o.isFeatureFiltered(i.id)&&s.add(i.id)}}return e}_resetSelection(){for(let e=0;e<this._symbolRepository.uniqueSymbols.length;e++){const t=this._symbolRepository.uniqueSymbols[e];for(let e=0;e<t.uniqueSymbols.length;e++){const o=t.uniqueSymbols[e];for(const e of o.tileSymbols)e.selectedForRendering=!1}}}_createSelectionJob(){const e="feature-tile"===this.selectionMode?n:l,t=this._symbolRepository.uniqueSymbols;this._resetSelection();const o=[];let s=0,r=0;const c=this._isLayerVisible,y=this._getFilteredByLayer(),a=this._styleRepository?.layerContexts;function h(n){let l;const h=performance.now();for(;r<t.length;r++,s=0){const i=t[r],u=i.styleLayerUID,f=y?.get(u);let b=0;if(a){b=a.get(u).layerOrder}if(!c(u)){o[r]||(o[r]={styleLayerUID:u,layerOrder:b,symbols:[]});continue}o[r]||={styleLayerUID:u,symbols:[],layerOrder:b};const m=o[r];for(;s<i.uniqueSymbols.length;s++){if(l=i.uniqueSymbols[s],s%100==99&&performance.now()-h>n)return!1;if(l.lastShow=l.show,l.id&&f?.has(l.id)){l.show=!1,l.parts[0].show=!1,l.parts[1].show=!1;continue}const t=e(l);if(t){t.selectedForRendering=!0,m.symbols.push(t),l.show=!0;for(const e of l.parts)e.show=!0}else l.show=!1}}for(const e of o)e.symbols.sort(i);return o.sort((e,t)=>t.layerOrder-e.layerOrder),!0}const u=this._symbolLayerSorter;return{work:h,get sortedSymbols(){return o.sort(u)}}}_createOpacityJob(){const t=this._assignTileSymbolsOpacity,o=this._visibleTiles;let i=0;function s(e,o){for(const t of e.symbols.values())r(t,o);t(e,o);for(const t of e.childrenTiles)s(t,o)}return{work(r){const n=performance.now();for(;i<o.length;i++){if(performance.now()-n>r)return!1;const l=o[i];if(null!=l.parentTile)continue;const c=performance.now();l instanceof e?s(l,c):t(l,c)}return!0}}}}function r(e,o){for(const i of e){const e=i.uniqueSymbol;for(const i of e.parts){const s=i.targetOpacity>.5?1:-1;i.startOpacity+=s*((o-i.startTime)/t),i.startOpacity=Math.min(Math.max(i.startOpacity,0),1),i.startTime=o,i.targetOpacity=e.show&&i.show?1:0}}}function n(e){for(const t of e.tileSymbols)if(t.tile.decluttering)return t;return null}function l(e){let t=null,o=!1,i=!1;for(const s of e.tileSymbols)if(!i||!o){const e=s.tile;(!t||e.isCoverage||e.neededForCoverage&&!o)&&(t=s,(e.neededForCoverage||e.isCoverage)&&(i=!0),e.isCoverage&&(o=!0))}return i?t:null}export{s as SymbolDeclutterer};
|
|
2
|
+
import{VectorTile as e}from"../VectorTile.js";import{fadeDuration as t}from"./config.js";function o(e){return(e.uniqueSymbol?.show&&e.uniqueSymbol?.lastShow)??!1}function i(e,t){if(e.priority-t.priority)return e.priority-t.priority;if(o(e)&&!o(t))return-1;if(o(t)&&!o(e))return 1;const i=e.tile.key,s=t.tile.key;return i.world-s.world?i.world-s.world:i.level-s.level?i.level-s.level:i.row-s.row?i.row-s.row:i.col-s.col?i.col-s.col:e.xTile-t.xTile?e.xTile-t.xTile:e.yTile-t.yTile}class s{get running(){return this._running}constructor(e,t,o,i,s,r,n,l){this.selectionMode=e,this._visibleTiles=t,this._symbolRepository=o,this._styleRepository=i,this._createCollisionJob=s,this._assignTileSymbolsOpacity=r,this._symbolLayerSorter=n,this._isLayerVisible=l,this._selectionJob=null,this._selectionJobCompleted=!1,this._collisionJob=null,this._collisionJobCompleted=!1,this._opacityJob=null,this._opacityJobCompleted=!1,this._running=!0}setScreenSize(e,t){this._screenWidth===e&&this._screenHeight===t||this.restart(),this._screenWidth=e,this._screenHeight=t}restart(){this._selectionJob=null,this._selectionJobCompleted=!1,this._collisionJob=null,this._collisionJobCompleted=!1,this._opacityJob=null,this._opacityJobCompleted=!1,this._running=!0}continue(e){if(this._selectionJob||(this._selectionJob=this._createSelectionJob()),!this._selectionJobCompleted){const t=performance.now();if(!this._selectionJob.work(e))return!1;if(this._selectionJobCompleted=!0,0===(e=Math.max(0,e-(performance.now()-t))))return!1}if(this._collisionJob||(this._collisionJob=this._createCollisionJob(this._selectionJob.sortedSymbols,this._screenWidth,this._screenHeight)),!this._collisionJobCompleted){const t=performance.now();if(!this._collisionJob.work(e))return!1;if(this._collisionJobCompleted=!0,0===(e=Math.max(0,e-(performance.now()-t))))return!1}if(this._opacityJob||(this._opacityJob=this._createOpacityJob()),!this._opacityJobCompleted){const t=performance.now();if(!this._opacityJob.work(e))return!1;if(this._opacityJobCompleted=!0,0===(e=Math.max(0,e-(performance.now()-t))))return!1}return this._running=!1,!0}_getFilteredByLayer(){let e;if(this._styleRepository?.layerContexts)for(const t of this._symbolRepository.uniqueSymbols){const o=this._styleRepository.layerContexts?.get(t.styleLayerUID);if(o?.attributeView)for(const i of t.uniqueSymbols){e??=new Map,e.get(t.styleLayerUID)||e.set(t.styleLayerUID,new Set);const s=e.get(t.styleLayerUID);o.isFeatureFiltered(i.id)&&s.add(i.id)}}return e}_resetSelection(){for(let e=0;e<this._symbolRepository.uniqueSymbols.length;e++){const t=this._symbolRepository.uniqueSymbols[e];for(let e=0;e<t.uniqueSymbols.length;e++){const o=t.uniqueSymbols[e];for(const e of o.tileSymbols)e.selectedForRendering=!1}}}_createSelectionJob(){const e="feature-tile"===this.selectionMode?n:l,t=this._symbolRepository.uniqueSymbols;this._resetSelection();const o=[];let s=0,r=0;const c=this._isLayerVisible,y=this._getFilteredByLayer(),a=this._styleRepository?.layerContexts;function h(n){let l;const h=performance.now();for(;r<t.length;r++,s=0){const i=t[r],u=i.styleLayerUID,f=y?.get(u);let b=0;if(a){b=a.get(u).layerOrder}if(!c(u)){o[r]||(o[r]={styleLayerUID:u,layerOrder:b,symbols:[]});continue}o[r]||={styleLayerUID:u,symbols:[],layerOrder:b};const m=o[r];for(;s<i.uniqueSymbols.length;s++){if(l=i.uniqueSymbols[s],s%100==99&&performance.now()-h>n)return!1;if(l.lastShow=l.show,l.id&&f?.has(l.id)){l.show=!1,l.parts[0].show=!1,l.parts[1].show=!1;continue}const t=e(l);if(t){t.selectedForRendering=!0,m.symbols.push(t),l.show=!0;for(const e of l.parts)e.show=!0}else l.show=!1}}for(const e of o)e.symbols.sort(i);return o.sort((e,t)=>t.layerOrder-e.layerOrder),!0}const u=this._symbolLayerSorter;return{work:h,get sortedSymbols(){return o.sort(u)}}}_createOpacityJob(){const t=this._assignTileSymbolsOpacity,o=this._visibleTiles;let i=0;function s(e,o){for(const t of e.symbols.values())r(t,o);t(e,o);for(const t of e.childrenTiles)s(t,o)}return{work(r){const n=performance.now();for(;i<o.length;i++){if(performance.now()-n>r)return!1;const l=o[i];if(null!=l.parentTile)continue;const c=performance.now();l instanceof e?s(l,c):t(l,c)}return!0}}}}function r(e,o){for(const i of e){const e=i.uniqueSymbol;if(e&&e.parts)for(const i of e.parts){const s=i.targetOpacity>.5?1:-1;i.startOpacity+=s*((o-i.startTime)/t),i.startOpacity=Math.min(Math.max(i.startOpacity,0),1),i.startTime=o,i.targetOpacity=e.show&&i.show?1:0}}}function n(e){for(const t of e.tileSymbols)if(t.tile.decluttering)return t;return null}function l(e){let t=null,o=!1,i=!1;for(const s of e.tileSymbols)if(!i||!o){const e=s.tile;(!t||e.isCoverage||e.neededForCoverage&&!o)&&(t=s,(e.neededForCoverage||e.isCoverage)&&(i=!0),e.isCoverage&&(o=!0))}return i?t:null}export{s as SymbolDeclutterer};
|