@arcgis/core 4.23.0-next.20220124 → 4.23.0-next.20220126
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/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/00c5bb5eecb0e89266df.js +1 -0
- package/assets/esri/core/workers/chunks/021a37e2b191298e80b7.js +1 -0
- package/assets/esri/core/workers/chunks/1370c92c40fd6271553c.js +1 -0
- package/assets/esri/core/workers/chunks/1fbcc8424452d0256bd6.js +1 -0
- package/assets/esri/core/workers/chunks/{fe864d01e72aa24574b6.js → 23b15e7c2f96d260e16c.js} +1 -1
- package/assets/esri/core/workers/chunks/{b2ae5fc4f787ea568b88.js → 2460f3b6ada6ae900dec.js} +1 -1
- package/assets/esri/core/workers/chunks/2792ca40f1e92849247c.js +1 -0
- package/assets/esri/core/workers/chunks/2a96f1bba9ce6883e5e0.js +1 -0
- package/assets/esri/core/workers/chunks/2e899ef5881b4ec6fa55.js +1 -0
- package/assets/esri/core/workers/chunks/3231ee3e090bb4cac3fc.js +1 -0
- package/assets/esri/core/workers/chunks/{0c3e3a5baf54bd5e210c.js → 36e250278b5622ccf068.js} +1 -1
- package/assets/esri/core/workers/chunks/395ba088d4864588ff66.js +1 -0
- package/assets/esri/core/workers/chunks/3cc77692b2eee27b9c9e.js +1 -0
- package/assets/esri/core/workers/chunks/3f343f792fd9f44d6f25.js +1 -0
- package/assets/esri/core/workers/chunks/422537fc3df707bb62c9.js +1 -0
- package/assets/esri/core/workers/chunks/{625d2663daa8e0cf64b0.js → 434b16731c6a81f868ef.js} +1 -1
- package/assets/esri/core/workers/chunks/4385a268c2a64281d1c1.js +1 -0
- package/assets/esri/core/workers/chunks/{44b01d42d4ec72913229.js → 438f0b5ae5c53ae4f06a.js} +1 -1
- package/assets/esri/core/workers/chunks/{4d539878bfbd7c549e60.js → 46b4bb66a54bbd8e2e57.js} +1 -1
- package/assets/esri/core/workers/chunks/4c76146014dc15143ba3.js +1 -0
- package/assets/esri/core/workers/chunks/5d991b74d958005c26c4.js +1 -0
- package/assets/esri/core/workers/chunks/5dfe1f8d520025e2118b.js +1 -0
- package/assets/esri/core/workers/chunks/601e697dc7414bda128a.js +1 -0
- package/assets/esri/core/workers/chunks/{9cdaba126ac7fa5f33f0.js → 6cd5e4380d29b9a3c344.js} +1 -1
- package/assets/esri/core/workers/chunks/{a7b1b75643ed31489495.js → 6f50a9647f026a8d4729.js} +1 -1
- package/assets/esri/core/workers/chunks/7d661129a0d8c466eeec.js +1 -0
- package/assets/esri/core/workers/chunks/{64276aacaafa4c8a15bd.js → 7dcf52d3db3903c8eb9f.js} +1 -1
- package/assets/esri/core/workers/chunks/8070972c0efb78523b68.js +1 -0
- package/assets/esri/core/workers/chunks/94515fb3ef38067eeadd.js +1 -0
- package/assets/esri/core/workers/chunks/97a28641b3b2fd31bea2.js +1 -0
- package/assets/esri/core/workers/chunks/{d1454155ee1b8a421cbb.js → 97ec9eef0048760fa260.js} +1 -1
- package/assets/esri/core/workers/chunks/98986e6601b0366376b4.js +1 -0
- package/assets/esri/core/workers/chunks/9cdcf9309d6feda70185.js +1 -0
- package/assets/esri/core/workers/chunks/aa04b90b82bf70caaae4.js +1 -0
- package/assets/esri/core/workers/chunks/aace7e1fef256bb961c9.js +1 -0
- package/assets/esri/core/workers/chunks/{c080114a69fa95b88d22.js → af5694b4d278cf1db2d9.js} +1 -1
- package/assets/esri/core/workers/chunks/afbb4f802ca5774f0326.js +1 -0
- package/assets/esri/core/workers/chunks/b2c5f92e3d7606297ca9.js +1 -0
- package/assets/esri/core/workers/chunks/b2d2de935487257c568b.js +1 -0
- package/assets/esri/core/workers/chunks/b2ebe4f6d100e15b512d.js +1 -0
- package/assets/esri/core/workers/chunks/b8316c6469a543029bc6.js +1 -0
- package/assets/esri/core/workers/chunks/{4c9084a04948b6924749.js → ba5eb394f098968c22d2.js} +1 -1
- package/assets/esri/core/workers/chunks/bf0a65b4be31959f921d.js +1 -0
- package/assets/esri/core/workers/chunks/c890c7fca27170e3341f.js +1 -0
- package/assets/esri/core/workers/chunks/c976785f2391c77d8a30.js +1 -0
- package/assets/esri/core/workers/chunks/{d39b7983b68d6e5b404d.js → cdbc005eebec1503b99d.js} +1 -1
- package/assets/esri/core/workers/chunks/e4b84ca8ddfd48dd79b1.js +1 -0
- package/assets/esri/core/workers/chunks/e4e2036373166c1d5cf5.js +1 -0
- package/assets/esri/core/workers/chunks/e4f93c55eaefab4192b5.js +1 -0
- package/assets/esri/core/workers/chunks/e6165e17fbb07bfc40a1.js +1 -0
- package/assets/esri/core/workers/chunks/e9e5196b44b6923be1a3.js +1 -0
- package/assets/esri/core/workers/chunks/{f678293de9a6d8f5b5db.js → ec89466f76d0ba22525e.js} +1 -1
- package/assets/esri/core/workers/chunks/ee45618c45806ab654cb.js +1 -0
- package/assets/esri/core/workers/chunks/f4baa5ea2e42b1317941.js +1 -0
- package/assets/esri/core/workers/chunks/f760a3e030b0f358a92a.js +1 -0
- package/assets/esri/core/workers/chunks/face43cf5abcd2f5bd9d.js +1 -0
- package/assets/esri/themes/base/_mixins.scss +4 -1
- package/assets/esri/themes/base/icons/style.scss +11 -2
- package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +13 -10
- package/assets/esri/themes/base/widgets/_CoordinateConversion.scss +4 -2
- package/assets/esri/themes/base/widgets/_Directions.scss +5 -3
- package/assets/esri/themes/base/widgets/_Editor.scss +5 -2
- package/assets/esri/themes/base/widgets/_ElevationProfile.scss +6 -4
- package/assets/esri/themes/base/widgets/_ItemList.scss +1 -1
- package/assets/esri/themes/base/widgets/_LayerList.scss +13 -9
- package/assets/esri/themes/base/widgets/_Popup.scss +4 -2
- package/assets/esri/themes/base/widgets/_Print.scss +24 -11
- package/assets/esri/themes/base/widgets/_Search.scss +4 -2
- package/assets/esri/themes/base/widgets/_TableList.scss +9 -7
- package/assets/esri/themes/base/widgets/_Weather.scss +12 -0
- package/assets/esri/themes/base/widgets/_Widget.scss +18 -9
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/dark-blue/main.css +1 -1
- package/assets/esri/themes/dark-green/main.css +1 -1
- package/assets/esri/themes/dark-purple/main.css +1 -1
- package/assets/esri/themes/dark-red/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/themes/light-blue/main.css +1 -1
- package/assets/esri/themes/light-green/main.css +1 -1
- package/assets/esri/themes/light-purple/main.css +1 -1
- package/assets/esri/themes/light-red/main.css +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_en.json +1 -1
- package/chunks/ComponentShader.glsl.js +19 -19
- package/chunks/Terrain.glsl.js +11 -11
- package/chunks/WaterSurface.glsl.js +21 -21
- package/chunks/pe.js +1 -1
- package/chunks/vec3.js +1 -1
- package/core/accessorSupport/read.js +1 -1
- package/core/accessorSupport/write.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/geometry/pe.js +1 -1
- package/geometry/support/axisAngleDegrees.js +1 -1
- package/interfaces.d.ts +36 -2
- package/layers/support/rasterDatasets/BaseRaster.js +1 -1
- package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
- package/package.json +2 -2
- package/popup/content/AttachmentsContent.js +1 -1
- package/popup/content/support/mediaInfoTypes.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/LabelSymbol3D.js +1 -1
- package/symbols/PointSymbol3D.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/CIMSymbolRasterizer.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/support/Symbol3DVerticalOffset.js +1 -1
- package/symbols/support/previewCIMSymbol.js +1 -1
- package/symbols/support/previewSymbol2D.js +1 -1
- package/symbols/support/previewSymbol3D.js +1 -1
- package/symbols/support/previewWebStyleSymbol.js +1 -1
- package/symbols/support/svgUtils.js +1 -1
- package/symbols.js +1 -1
- package/views/2d/engine/webgl/brushes/raster/BrushRasterBitmap.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLFillTemplate.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/3d/environment/CloudsComposition.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
- package/views/3d/environment/weather.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateMeshAdapter.js +1 -1
- package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
- package/views/3d/support/pointsOfInterest/Focus.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +21 -13
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +2 -2
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
- package/views/interactive/dragEventPipeline.js +1 -1
- package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
- package/views/webgl/Program.js +1 -1
- package/views/webgl/rasterUtils.js +1 -1
- package/widgets/Attachments.js +1 -1
- package/widgets/FeatureForm/InputField.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/Popup/PopupViewModel.js +1 -1
- package/widgets/Popup/actionUtils.js +1 -1
- package/widgets/Slice/SliceViewModel.js +1 -1
- package/widgets/Slider/SliderViewModel.js +1 -1
- package/widgets/Slider.js +1 -1
- package/widgets/Weather/WeatherViewModel.js +1 -1
- package/widgets/Weather/css.js +1 -1
- package/widgets/Weather.js +1 -1
- package/widgets/support/InteractiveAnalysisViewModel.js +1 -1
- package/widgets/support/InteractiveToolViewModel.js +1 -1
- package/assets/components/assets/calcite-icon/checkSquareF16.json +0 -1
- package/assets/components/assets/calcite-icon/checkSquareF24.json +0 -1
- package/assets/components/assets/calcite-icon/checkSquareF32.json +0 -1
- package/assets/components/assets/calcite-icon/lineSolid4.json +0 -1
- package/assets/components/assets/calcite-icon/squareF16.json +0 -1
- package/assets/components/assets/calcite-icon/squareF24.json +0 -1
- package/assets/components/assets/calcite-icon/squareF32.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagon16.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagon24.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagon32.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagonF16.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagonF24.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagonF32.json +0 -1
- package/assets/components/assets/calcite-icon/xOctagonF16.json +0 -1
- package/assets/components/assets/calcite-icon/xOctagonF24.json +0 -1
- package/assets/components/assets/calcite-icon/xOctagonF32.json +0 -1
- package/assets/esri/core/workers/chunks/09da224052976e290828.js +0 -1
- package/assets/esri/core/workers/chunks/0bf079e752ab79468478.js +0 -1
- package/assets/esri/core/workers/chunks/20411bb8e04703962ce6.js +0 -1
- package/assets/esri/core/workers/chunks/23745a5ab47c840dc452.js +0 -1
- package/assets/esri/core/workers/chunks/2416f8bf8bbd2ec786ab.js +0 -1
- package/assets/esri/core/workers/chunks/2e445a8735ea2adb641a.js +0 -1
- package/assets/esri/core/workers/chunks/32f8c4af7e70ebdcb19e.js +0 -1
- package/assets/esri/core/workers/chunks/390d9021169e65c10eb8.js +0 -1
- package/assets/esri/core/workers/chunks/3a9740dccda6a733313c.js +0 -1
- package/assets/esri/core/workers/chunks/43cdff2418325e163420.js +0 -1
- package/assets/esri/core/workers/chunks/5538639a49c7cc2eca63.js +0 -1
- package/assets/esri/core/workers/chunks/60371c0f750cde87656d.js +0 -1
- package/assets/esri/core/workers/chunks/67162b3e2cc1b5dc6818.js +0 -1
- package/assets/esri/core/workers/chunks/739e579150bf466d43ae.js +0 -1
- package/assets/esri/core/workers/chunks/74df1f3e1e2e524a89d2.js +0 -1
- package/assets/esri/core/workers/chunks/76eef4799f6c5fff7e2d.js +0 -1
- package/assets/esri/core/workers/chunks/7baf6b1f3f050aa67ae4.js +0 -1
- package/assets/esri/core/workers/chunks/8967288145f8fbd20e7d.js +0 -1
- package/assets/esri/core/workers/chunks/99a777693e4539f0b03b.js +0 -1
- package/assets/esri/core/workers/chunks/9cb2ae42a8e328b1d98d.js +0 -1
- package/assets/esri/core/workers/chunks/9d3c58a0ef634d95b7bd.js +0 -1
- package/assets/esri/core/workers/chunks/a6ff3db3493543df81bc.js +0 -1
- package/assets/esri/core/workers/chunks/a8c13529367c037cdd94.js +0 -1
- package/assets/esri/core/workers/chunks/a96afc176041f698c7a1.js +0 -1
- package/assets/esri/core/workers/chunks/ac8dca61ade28c542ae2.js +0 -1
- package/assets/esri/core/workers/chunks/afa6912454f2a5ffadce.js +0 -1
- package/assets/esri/core/workers/chunks/b2beb6e1fd2ee6503830.js +0 -1
- package/assets/esri/core/workers/chunks/bab1cfd0a901181622af.js +0 -1
- package/assets/esri/core/workers/chunks/be2b7cce79fd41627931.js +0 -1
- package/assets/esri/core/workers/chunks/c13dfdd548dcb1bdb294.js +0 -1
- package/assets/esri/core/workers/chunks/c6bd943fe8fd13bb4806.js +0 -1
- package/assets/esri/core/workers/chunks/c6f94b92e866b881d9b9.js +0 -1
- package/assets/esri/core/workers/chunks/cd7d83d127e085d52584.js +0 -1
- package/assets/esri/core/workers/chunks/d52108864136c5a8a618.js +0 -1
- package/assets/esri/core/workers/chunks/da1c2873bdbc0956dca0.js +0 -1
- package/assets/esri/core/workers/chunks/de03439ca2c9782bf325.js +0 -1
- package/assets/esri/core/workers/chunks/e079cb1d53aca15b7df2.js +0 -1
- package/assets/esri/core/workers/chunks/e6df9839b551569fbc62.js +0 -1
- package/assets/esri/core/workers/chunks/e97e986120aaadad7d4c.js +0 -1
- package/assets/esri/core/workers/chunks/f8e7755240a94b499e1f.js +0 -1
- package/assets/esri/core/workers/chunks/fd3e5d823dc7917f4b8f.js +0 -1
- package/views/3d/layers/graphics/IGraphics3DFeatureProcessor.js +0 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6740,36],{1692:(e,t,i)=>{i.d(t,{Z:()=>w});var r=i(43697),s=i(66577),n=i(51773),l=i(78223),o=i(15923),a=(i(80442),i(22974)),u=i(92604),c=i(70586),p=i(31263),d=i(1153),f=i(52011);u.Z.getLogger("esri.core.Clonable");const y=e=>{let t=class extends e{clone(){const e=(0,c.s3)((0,d.vw)(this),"unable to clone instance of non-accessor class"),t=e.metadatas,i=e.store,r={},s=new Map;for(const e in t){const n=t[e],l=null==i?void 0:i.originOf(e);if(n.readOnly||!1===n.clonable||l!==p.s3.USER&&l!==p.s3.DEFAULTS)continue;const o=this[e];let u=null;const c=n.clonable;u="function"==typeof c?c(o):"reference"===c?o:(0,a.Vo)(o),null!=o&&null==u||(l===p.s3.DEFAULTS?s.set(e,u):r[e]=u)}const n=new(0,Object.getPrototypeOf(this).constructor)(r);if(s.size){var l;const e=null==(l=(0,d.vw)(n))?void 0:l.store;if(e)for(const[t,i]of s)e.set(t,i,p.s3.DEFAULTS)}return n}};return t=(0,r._)([(0,f.j)("esri.core.Clonable")],t),t};let m=class extends(y(o.Z)){};m=(0,r._)([(0,f.j)("esri.core.Clonable")],m);var h=i(96674),b=i(99001),g=i(5600),v=(i(67676),i(75215),i(33955));let x=class extends(y(h.wq)){constructor(...e){super(...e),this.isAggregate=!1,this.layer=null,this.popupTemplate=null,this.sourceLayer=null,Object.defineProperty(this,"uid",{value:(0,b.D)(),configurable:!0})}normalizeCtorArgs(e,t,i,r){return e&&!e.declaredClass?e:{geometry:e,symbol:t,attributes:i,popupTemplate:r}}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),this._notifyLayer("geometry",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;for(const t of[this.sourceLayer,this.layer])if(t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&(0,c.pC)(t.defaultPopupTemplate))return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes&&this.attributes[e]}setAttribute(e,t){if(this.attributes){const i=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",i,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{geometry:(0,c.pC)(this.geometry)?this.geometry.toJSON():null,symbol:(0,c.pC)(this.symbol)?this.symbol.toJSON():null,attributes:{...this.attributes},popupTemplate:this.popupTemplate&&this.popupTemplate.toJSON()}}notifyGeometryChanged(){this._notifyLayer("geometry",this.geometry,this.geometry)}notifyMeshTransformChanged(){(0,c.pC)(this.geometry)&&"mesh"===this.geometry.type&&this._notifyLayer("transform",this.geometry.transform,this.geometry.transform)}_notifyLayer(e,t,i,r){if(!this.layer||!("graphicChanged"in this.layer))return;const s={graphic:this,property:e,oldValue:t,newValue:i};"attributes"===e&&(s.attributeName=r),this.layer.graphicChanged(s)}};(0,r._)([(0,g.Cb)({value:null})],x.prototype,"attributes",null),(0,r._)([(0,g.Cb)({value:null,types:s.qM,json:{read:v.im}})],x.prototype,"geometry",null),(0,r._)([(0,g.Cb)({type:Boolean})],x.prototype,"isAggregate",void 0),(0,r._)([(0,g.Cb)({clonable:"reference"})],x.prototype,"layer",void 0),(0,r._)([(0,g.Cb)({type:n.Z})],x.prototype,"popupTemplate",void 0),(0,r._)([(0,g.Cb)({clonable:"reference"})],x.prototype,"sourceLayer",void 0),(0,r._)([(0,g.Cb)({value:null,types:l.LB})],x.prototype,"symbol",null),(0,r._)([(0,g.Cb)({type:Boolean,value:!0})],x.prototype,"visible",null),x=(0,r._)([(0,f.j)("esri.Graphic")],x),(x||(x={})).generateUID=b.D;const w=x},44543:(e,t,i)=>{i.d(t,{F:()=>p,M:()=>r});const r={Base64:0,Hex:1,String:2,Raw:3};function s(e,t){const i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}function n(e,t,i,r,n,l){return s(function(e,t){return e<<t|e>>>32-t}(s(s(t,e),s(r,l)),n),i)}function l(e,t,i,r,s,l,o){return n(t&i|~t&r,e,t,s,l,o)}function o(e,t,i,r,s,l,o){return n(t&r|i&~r,e,t,s,l,o)}function a(e,t,i,r,s,l,o){return n(t^i^r,e,t,s,l,o)}function u(e,t,i,r,s,l,o){return n(i^(t|~r),e,t,s,l,o)}function c(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let i=1732584193,r=-271733879,n=-1732584194,c=271733878;for(let t=0;t<e.length;t+=16){const p=i,d=r,f=n,y=c;i=l(i,r,n,c,e[t+0],7,-680876936),c=l(c,i,r,n,e[t+1],12,-389564586),n=l(n,c,i,r,e[t+2],17,606105819),r=l(r,n,c,i,e[t+3],22,-1044525330),i=l(i,r,n,c,e[t+4],7,-176418897),c=l(c,i,r,n,e[t+5],12,1200080426),n=l(n,c,i,r,e[t+6],17,-1473231341),r=l(r,n,c,i,e[t+7],22,-45705983),i=l(i,r,n,c,e[t+8],7,1770035416),c=l(c,i,r,n,e[t+9],12,-1958414417),n=l(n,c,i,r,e[t+10],17,-42063),r=l(r,n,c,i,e[t+11],22,-1990404162),i=l(i,r,n,c,e[t+12],7,1804603682),c=l(c,i,r,n,e[t+13],12,-40341101),n=l(n,c,i,r,e[t+14],17,-1502002290),r=l(r,n,c,i,e[t+15],22,1236535329),i=o(i,r,n,c,e[t+1],5,-165796510),c=o(c,i,r,n,e[t+6],9,-1069501632),n=o(n,c,i,r,e[t+11],14,643717713),r=o(r,n,c,i,e[t+0],20,-373897302),i=o(i,r,n,c,e[t+5],5,-701558691),c=o(c,i,r,n,e[t+10],9,38016083),n=o(n,c,i,r,e[t+15],14,-660478335),r=o(r,n,c,i,e[t+4],20,-405537848),i=o(i,r,n,c,e[t+9],5,568446438),c=o(c,i,r,n,e[t+14],9,-1019803690),n=o(n,c,i,r,e[t+3],14,-187363961),r=o(r,n,c,i,e[t+8],20,1163531501),i=o(i,r,n,c,e[t+13],5,-1444681467),c=o(c,i,r,n,e[t+2],9,-51403784),n=o(n,c,i,r,e[t+7],14,1735328473),r=o(r,n,c,i,e[t+12],20,-1926607734),i=a(i,r,n,c,e[t+5],4,-378558),c=a(c,i,r,n,e[t+8],11,-2022574463),n=a(n,c,i,r,e[t+11],16,1839030562),r=a(r,n,c,i,e[t+14],23,-35309556),i=a(i,r,n,c,e[t+1],4,-1530992060),c=a(c,i,r,n,e[t+4],11,1272893353),n=a(n,c,i,r,e[t+7],16,-155497632),r=a(r,n,c,i,e[t+10],23,-1094730640),i=a(i,r,n,c,e[t+13],4,681279174),c=a(c,i,r,n,e[t+0],11,-358537222),n=a(n,c,i,r,e[t+3],16,-722521979),r=a(r,n,c,i,e[t+6],23,76029189),i=a(i,r,n,c,e[t+9],4,-640364487),c=a(c,i,r,n,e[t+12],11,-421815835),n=a(n,c,i,r,e[t+15],16,530742520),r=a(r,n,c,i,e[t+2],23,-995338651),i=u(i,r,n,c,e[t+0],6,-198630844),c=u(c,i,r,n,e[t+7],10,1126891415),n=u(n,c,i,r,e[t+14],15,-1416354905),r=u(r,n,c,i,e[t+5],21,-57434055),i=u(i,r,n,c,e[t+12],6,1700485571),c=u(c,i,r,n,e[t+3],10,-1894986606),n=u(n,c,i,r,e[t+10],15,-1051523),r=u(r,n,c,i,e[t+1],21,-2054922799),i=u(i,r,n,c,e[t+8],6,1873313359),c=u(c,i,r,n,e[t+15],10,-30611744),n=u(n,c,i,r,e[t+6],15,-1560198380),r=u(r,n,c,i,e[t+13],21,1309151649),i=u(i,r,n,c,e[t+4],6,-145523070),c=u(c,i,r,n,e[t+11],10,-1120210379),n=u(n,c,i,r,e[t+2],15,718787259),r=u(r,n,c,i,e[t+9],21,-343485551),i=s(i,p),r=s(r,d),n=s(n,f),c=s(c,y)}return[i,r,n,c]}function p(e,t=r.Hex){const i=t||r.Base64,s=c(function(e){const t=[];for(let i=0,r=8*e.length;i<r;i+=8)t[i>>5]|=(255&e.charCodeAt(i/8))<<i%32;return t}(e),8*e.length);switch(i){case r.Raw:return s;case r.Hex:return function(e){const t="0123456789abcdef",i=[];for(let r=0,s=4*e.length;r<s;r++)i.push(t.charAt(e[r>>2]>>r%4*8+4&15)+t.charAt(e[r>>2]>>r%4*8&15));return i.join("")}(s);case r.String:return function(e){const t=[];for(let i=0,r=32*e.length;i<r;i+=8)t.push(String.fromCharCode(e[i>>5]>>>i%32&255));return t.join("")}(s);case r.Base64:return function(e){const t=[];for(let i=0,r=4*e.length;i<r;i+=3){const r=(e[i>>2]>>i%4*8&255)<<16|(e[i+1>>2]>>(i+1)%4*8&255)<<8|e[i+2>>2]>>(i+2)%4*8&255;for(let s=0;s<4;s++)8*i+6*s>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>6*(3-s)&63))}return t.join("")}(s)}}},74085:(e,t,i)=>{function r(e){}i.d(t,{Bg:()=>r}),i(80442)},12501:(e,t,i)=>{i.r(t),i.d(t,{default:()=>E});var r,s=i(43697),n=i(22303),l=i(3172),o=i(20102),a=i(22974),u=i(92604),c=i(13867),p=i(70586),d=i(95330),f=i(19153),y=i(5600),m=(i(75215),i(52011)),h=i(30556),b=i(35671),g=i(5499),v=i(12571),x=i(59266),w=i(17386);const S=u.Z.getLogger("esri.renderers.DictionaryRenderer"),V={type:"CIMSimpleLineCallout",lineSymbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",width:.5,color:[0,0,0,255]}]}};let C=r=class extends((0,v.W)(g.Z)){constructor(e){super(e),this._ongoingRequests=new Map,this._symbolCache=new c.Z(100),this.config=null,this.fieldMap=null,this.scaleExpression=null,this.scaleExpressionTitle=null,this.url=null,this.type="dictionary"}writeData(e,t){e&&(t.scalingExpressionInfo={expression:e,returnType:"number"})}writeVisualVariables(e,t,i,r){null!=r&&r.origin||super.writeVisualVariables(e,t,i,r)}clone(){return new r({config:(0,a.d9)(this.config),scaleExpression:this.scaleExpression,scaleExpressionTitle:this.scaleExpressionTitle,fieldMap:(0,a.d9)(this.fieldMap),url:(0,a.d9)(this.url),visualVariables:(0,a.d9)(this.visualVariables)})}async getSymbolAsync(e,t){let i;this._dictionaryPromise||(this._dictionaryPromise=this.fetchResources(t));try{i=await this._dictionaryPromise}catch(e){if((0,d.D_)(e))return this._dictionaryPromise=null,null}const r={};if(this.fieldMap)for(const t of this._symbolFields){const i=this.fieldMap[t];if(i&&null!==e.attributes[i]&&void 0!==e.attributes[i]){const s=""+e.attributes[i];r[t]=s}else r[t]=""}const s=i(r,t);if(!s||"string"!=typeof s)return null;const l=(0,f.hP)(s).toString(),o=this._symbolCache.get(l);if(o)return o.catch((()=>{this._symbolCache.pop(l)})),o;const a=s.split(";"),u=[],c=[];for(const e of a)if(e&&0!==e.length)if(-1===e.indexOf("po:"))if(-1!==e.indexOf("|")){for(const t of e.split("|"))if(this._itemNames.has(t)){u.push(t);break}}else this._itemNames.has(e)&&u.push(e);else{const t=e.substr(3).split("|");if(3===t.length){const e=t[0],i=t[1];let r=t[2];if("DashTemplate"===i)r=r.split(" ").map((e=>Number(e)));else if("Color"===i){const e=new n.Z(r).toRgba();r=[e[0],e[1],e[2],255*e[3]]}else r=Number(r);c.push({primitiveName:e,propertyName:i,value:r})}}const y=!(0,p.pC)(e.geometry)||!e.geometry.hasZ&&"point"===e.geometry.type,m=this._cimPartsToCIMSymbol(u,c,y,t);return this._symbolCache.put(l,m,1),m}async collectRequiredFields(e,t){await this.collectVVRequiredFields(e,t),this.scaleExpression&&await(0,b.io)(e,t,this.scaleExpression);for(const i in this.fieldMap){const r=this.fieldMap[i];t.has(r)&&e.add(r)}}get arcadeRequired(){return!0}async fetchResources(e){if(this._dictionaryPromise)return this._dictionaryPromise;if(!this.url)return void S.error("no valid URL!");const t=(0,p.pC)(e)?e.abortOptions:null,i=(0,l.default)(this.url+"/resources/styles/dictionary-info.json",{responseType:"json",query:{f:"json"},...t}),[{data:r}]=await Promise.all([i,(0,x.LC)()]);if(!r)throw this._dictionaryPromise=null,new o.Z("esri.renderers.DictionaryRenderer","Bad dictionary data!");const s=r.expression,n=r.authoringInfo;this._refSymbolUrlTemplate=this.url+"/"+r.cimRefTemplateUrl,this._itemNames=new Set(r.itemsNames),this._symbolFields=n.symbol;const a={};if(this.config){const e=this.config;for(const t in e)a[t]=e[t]}if(n.configuration)for(const e of n.configuration)a.hasOwnProperty(e.name)||(a[e.name]=e.value);const u=[];if((0,p.pC)(e)&&e.fields&&this.fieldMap)for(const t of this._symbolFields){const i=this.fieldMap[t],r=e.fields.filter((e=>e.name===i));r.length>0&&u.push({...r[0],name:t})}return this._dictionaryPromise=(0,x.pp)(s,(0,p.pC)(e)?e.spatialReference:null,u,a).then((e=>{const t={scale:0};return(i,r)=>{const s=e.repurposeFeature({geometry:null,attributes:i});return t.scale=(0,p.pC)(r)?r.scale:void 0,e.evaluate({$feature:s,$view:t})}})).catch((e=>(S.error("Creating dictinoary expression failed:",e),null))),this._dictionaryPromise}getSymbol(){return null}getSymbols(){return[]}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce(((e,t)=>e+t.getAttributeHash()),"")}getMeshHash(){return`${this.url}-${JSON.stringify(this.fieldMap)}`}getSymbolFields(){return this._symbolFields}async _getSymbolPart(e,t){if(this._ongoingRequests.has(e))return this._ongoingRequests.get(e).then((e=>e.data));const i=this._refSymbolUrlTemplate.replace(/\{itemName\}/gi,e),r=(0,l.default)(i,{responseType:"json",query:{f:"json"},...t});this._ongoingRequests.set(e,r);try{return(await r).data}catch(t){return this._ongoingRequests.delete(e),Promise.reject(t)}}_combineSymbolParts(e,t,i){if(!e||0===e.length)return null;const r={...e[0]};if(e.length>1){r.symbolLayers=[];for(const t of e){const e=t;r.symbolLayers.unshift(...e.symbolLayers)}}return i&&(r.callout=V),{type:"CIMSymbolReference",symbol:r,primitiveOverrides:t}}async _cimPartsToCIMSymbol(e,t,i,r){const s=new Array(e.length);for(let t=0;t<e.length;t++)s[t]=this._getSymbolPart(e[t],r);const n=await Promise.all(s);return new w.Z({data:this._combineSymbolParts(n,t,i)})}};(0,s._)([(0,y.Cb)({type:Object,json:{read:{source:"configuration"},write:{target:"configuration"}}})],C.prototype,"config",void 0),(0,s._)([(0,y.Cb)({type:Object,json:{write:!0}})],C.prototype,"fieldMap",void 0),(0,s._)([(0,y.Cb)({type:String,json:{read:{source:"scalingExpressionInfo.expression"},write:!0}})],C.prototype,"scaleExpression",void 0),(0,s._)([(0,h.c)("scaleExpression")],C.prototype,"writeData",null),(0,s._)([(0,y.Cb)({type:String,json:{read:{source:"scalingExpressionInfo.title"},write:{target:"scalingExpressionInfo.title",overridePolicy(e){return{enabled:!!e&&!!this.scaleExpression}}}}})],C.prototype,"scaleExpressionTitle",void 0),(0,s._)([(0,y.Cb)({type:String,json:{write:!0}})],C.prototype,"url",void 0),(0,s._)([(0,h.c)("visualVariables")],C.prototype,"writeVisualVariables",null),C=r=(0,s._)([(0,m.j)("esri.renderers.DictionaryRenderer")],C);const E=C},95088:(e,t,i)=>{i.d(t,{Z:()=>z});var r,s=i(43697),n=i(22303),l=i(22974),o=i(44422),a=i(75215),u=i(36030),c=i(5600),p=i(52011),d=i(35671),f=i(5499),y=i(12571),m=i(96674),h=i(92604),b=(i(67676),i(80442),i(90578));const g=h.Z.getLogger("esri.renderers.support.AttributeColorInfo");let v=r=class extends m.wq{constructor(e){super(e),this.color=null,this.field=null,this.label=null,this.valueExpression=null,this.valueExpressionTitle=null}castField(e){return null==e?e:"function"==typeof e?(g.error(".field: field must be a string value"),null):(0,a.Zs)(e)}getAttributeHash(){return`${this.field}-${this.valueExpression}`}clone(){return new r({color:this.color&&this.color.clone(),field:this.field,label:this.label,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle})}};(0,s._)([(0,c.Cb)({type:n.Z,json:{type:[Number],write:!0}})],v.prototype,"color",void 0),(0,s._)([(0,c.Cb)({type:String,json:{write:!0}})],v.prototype,"field",void 0),(0,s._)([(0,b.p)("field")],v.prototype,"castField",null),(0,s._)([(0,c.Cb)({type:String,json:{write:!0}})],v.prototype,"label",void 0),(0,s._)([(0,c.Cb)({type:String,json:{write:!0}})],v.prototype,"valueExpression",void 0),(0,s._)([(0,c.Cb)({type:String,json:{write:!0}})],v.prototype,"valueExpressionTitle",void 0),v=r=(0,s._)([(0,p.j)("esri.renderers.support.AttributeColorInfo")],v);const x=v;var w;let S=w=class extends m.wq{constructor(){super(...arguments),this.unit=null}clone(){return new w({unit:this.unit})}};(0,s._)([(0,c.Cb)({type:String,json:{write:!0}})],S.prototype,"unit",void 0),S=w=(0,s._)([(0,p.j)("esri.renderers.support.DotDensityLegendOptions")],S);const V=S;var C,E=i(20256),_=i(4095);let F=C=class extends((0,y.W)(f.Z)){constructor(e){super(e),this.attributes=null,this.backgroundColor=new n.Z([0,0,0,0]),this.blendDots=!0,this.dotBlendingEnabled=!0,this.dotShape="square",this.dotSize=1,this.legendOptions=null,this.outline=new _.Z,this.dotValue=null,this.referenceDotValue=null,this.referenceScale=null,this.seed=1,this.type="dot-density"}calculateDotValue(e){if(null==this.referenceScale)return this.dotValue;const t=e/this.referenceScale*this.dotValue;return t<1?1:t}getSymbol(){return new E.Z({outline:this.outline})}async getSymbolAsync(){return this.getSymbol()}getSymbols(){return[this.getSymbol()]}getAttributeHash(){return this.attributes&&this.attributes.reduce(((e,t)=>e+t.getAttributeHash()),"")}getMeshHash(){return JSON.stringify(this.outline)}clone(){return new C({attributes:(0,l.d9)(this.attributes),backgroundColor:(0,l.d9)(this.backgroundColor),dotBlendingEnabled:(0,l.d9)(this.dotBlendingEnabled),dotShape:(0,l.d9)(this.dotShape),dotSize:(0,l.d9)(this.dotSize),dotValue:(0,l.d9)(this.dotValue),legendOptions:(0,l.d9)(this.legendOptions),outline:(0,l.d9)(this.outline),referenceScale:(0,l.d9)(this.referenceScale),visualVariables:(0,l.d9)(this.visualVariables),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})}getControllerHash(){return`${this.attributes.map((e=>e.field||e.valueExpression||""))}-${this.outline&&JSON.stringify(this.outline.toJSON())||""}`}async collectRequiredFields(e,t){await this.collectVVRequiredFields(e,t);for(const i of this.attributes)i.valueExpression&&await(0,d.io)(e,t,i.valueExpression),i.field&&e.add(i.field)}};(0,s._)([(0,c.Cb)({type:[x],json:{write:!0}})],F.prototype,"attributes",void 0),(0,s._)([(0,c.Cb)({type:n.Z,json:{write:!0}})],F.prototype,"backgroundColor",void 0),(0,s._)([(0,c.Cb)({type:Boolean}),(0,o.B)("dotBlendingEnabled")],F.prototype,"blendDots",void 0),(0,s._)([(0,c.Cb)({type:Boolean,json:{write:!0}})],F.prototype,"dotBlendingEnabled",void 0),(0,s._)([(0,c.Cb)({type:String,json:{write:!1}})],F.prototype,"dotShape",void 0),(0,s._)([(0,c.Cb)({type:Number,json:{write:!1}})],F.prototype,"dotSize",void 0),(0,s._)([(0,c.Cb)({type:V,json:{write:!0}})],F.prototype,"legendOptions",void 0),(0,s._)([(0,c.Cb)({type:_.Z,json:{default:null,write:!0}})],F.prototype,"outline",void 0),(0,s._)([(0,c.Cb)({type:Number,json:{write:!0}})],F.prototype,"dotValue",void 0),(0,s._)([(0,c.Cb)({type:Number}),(0,o.B)("dotValue")],F.prototype,"referenceDotValue",void 0),(0,s._)([(0,c.Cb)({type:Number,json:{write:!0}})],F.prototype,"referenceScale",void 0),(0,s._)([(0,c.Cb)({type:Number,json:{write:!0}})],F.prototype,"seed",void 0),(0,s._)([(0,u.J)({dotDensity:"dot-density"})],F.prototype,"type",void 0),F=C=(0,s._)([(0,p.j)("esri.renderers.DotDensityRenderer")],F);const z=F},79056:(e,t,i)=>{i.d(t,{Z:()=>b});var r,s=i(43697),n=i(22303),l=i(22974),o=i(5600),a=(i(75215),i(36030)),u=i(52011),c=i(35671),p=i(5499),d=i(96674);i(67676),i(80442);let f=r=class extends d.wq{constructor(e){super(e),this.color=null,this.ratio=null}clone(){return new r({color:this.color,ratio:this.ratio})}};(0,s._)([(0,o.Cb)({type:n.Z,json:{write:!0}})],f.prototype,"color",void 0),(0,s._)([(0,o.Cb)({type:Number,json:{write:!0}})],f.prototype,"ratio",void 0),f=r=(0,s._)([(0,u.j)("esri.renderers.support.HeatmapColorStop")],f);const y=f;var m;let h=m=class extends p.Z{constructor(e){super(e),this.blurRadius=10,this.colorStops=[new y({ratio:0,color:new n.Z("rgba(255, 140, 0, 0)")}),new y({ratio:.75,color:new n.Z("rgba(255, 140, 0, 1)")}),new y({ratio:.9,color:new n.Z("rgba(255, 0, 0, 1)")})],this.field=null,this.fieldOffset=0,this.maxPixelIntensity=100,this.minPixelIntensity=0,this.type="heatmap"}async collectRequiredFields(e,t){const i=this.field;i&&"string"==typeof i&&(0,c.AB)(e,t,i)}getAttributeHash(){return null}getMeshHash(){return`${JSON.stringify(this.colorStops)}.${this.blurRadius}.${this.field}`}clone(){return new m({blurRadius:this.blurRadius,colorStops:(0,l.d9)(this.colorStops),field:this.field,maxPixelIntensity:this.maxPixelIntensity,minPixelIntensity:this.minPixelIntensity})}};(0,s._)([(0,o.Cb)({type:Number,json:{write:!0}})],h.prototype,"blurRadius",void 0),(0,s._)([(0,o.Cb)({type:[y],json:{write:!0}})],h.prototype,"colorStops",void 0),(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],h.prototype,"field",void 0),(0,s._)([(0,o.Cb)({type:Number,json:{write:{overridePolicy:(e,t,i)=>({enabled:null==i})}}})],h.prototype,"fieldOffset",void 0),(0,s._)([(0,o.Cb)({type:Number,json:{write:!0}})],h.prototype,"maxPixelIntensity",void 0),(0,s._)([(0,o.Cb)({type:Number,json:{write:!0}})],h.prototype,"minPixelIntensity",void 0),(0,s._)([(0,a.J)({heatmap:"heatmap"})],h.prototype,"type",void 0),h=m=(0,s._)([(0,u.j)("esri.renderers.HeatmapRenderer")],h);const b=h},84382:(e,t,i)=>{i.d(t,{Z:()=>f});var r,s=i(43697),n=i(22974),l=i(5600),o=(i(75215),i(36030)),a=i(52011),u=i(5499),c=i(12571),p=i(9833);let d=r=class extends((0,c.W)(u.Z)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(e,t){await Promise.all([this.collectSymbolFields(e,t),this.collectVVRequiredFields(e,t)])}async collectSymbolFields(e,t){await Promise.all(this.getSymbols().map((i=>i.collectRequiredFields(e,t))))}getSymbol(e,t){return this.symbol}async getSymbolAsync(e,t){return this.symbol}getSymbols(){return this.symbol?[this.symbol]:[]}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce(((e,t)=>e+t.getAttributeHash()),"")}getMeshHash(){return this.getSymbols().reduce(((e,t)=>e+JSON.stringify(t)),"")}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new r({description:this.description,label:this.label,symbol:this.symbol&&this.symbol.clone(),visualVariables:(0,n.d9)(this.visualVariables),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})}};(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],d.prototype,"description",void 0),(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],d.prototype,"label",void 0),(0,s._)([(0,l.Cb)(p.G)],d.prototype,"symbol",void 0),(0,s._)([(0,o.J)({simple:"simple"})],d.prototype,"type",void 0),d=r=(0,s._)([(0,a.j)("esri.renderers.SimpleRenderer")],d);const f=d},91423:(e,t,i)=>{i.d(t,{a:()=>o});var r=i(20941),s=i(63213),n=i(32400);const l=(0,s.d)({types:n.A});function o(e,t,i){return e?e&&(e.styleName||e.styleUrl)&&"uniqueValue"!==e.type?(i&&i.messages&&i.messages.push(new r.Z("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+e.type+"'",{definition:e,context:i})),null):l(e,t,i):null}},99282:(e,t,i)=>{i.d(t,{a:()=>n});var r=i(67900),s=i(68441);const n={inches:(0,r.En)(1,"meters","inches"),feet:(0,r.En)(1,"meters","feet"),"us-feet":(0,r.En)(1,"meters","us-feet"),yards:(0,r.En)(1,"meters","yards"),miles:(0,r.En)(1,"meters","miles"),"nautical-miles":(0,r.En)(1,"meters","nautical-miles"),millimeters:(0,r.En)(1,"meters","millimeters"),centimeters:(0,r.En)(1,"meters","centimeters"),decimeters:(0,r.En)(1,"meters","decimeters"),meters:(0,r.En)(1,"meters","meters"),kilometers:(0,r.En)(1,"meters","kilometers"),"decimal-degrees":1/(0,r.ty)(1,"meters",s.sv.radius)}},32400:(e,t,i)=>{i.d(t,{A:()=>c,o:()=>p});var r=i(16050),s=i(12501),n=i(95088),l=i(79056),o=i(5499),a=i(84382),u=i(30687);const c={key:"type",base:o.Z,typeMap:{heatmap:l.Z,simple:a.Z,"unique-value":u.Z,"class-breaks":r.Z,"dot-density":n.Z,dictionary:s.default},errorContext:"renderer"},p={key:"type",base:o.Z,typeMap:{simple:a.Z,"unique-value":u.Z,"class-breaks":r.Z},errorContext:"renderer"}},51706:(e,t,i)=>{var r,s;function n(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function l(e){return null!=e&&!isNaN(e)&&isFinite(e)}function o(e){return e.valueExpression?r.Expression:e.field&&"string"==typeof e.field?r.Field:r.Unknown}function a(e,t){const i=t||o(e),n=e.valueUnit||"unknown";return i===r.Unknown?s.Constant:e.stops?s.Stops:null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?s.ClampedLinear:"unknown"===n?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?s.Proportional:s.Additive:s.Identity:s.RealWorldSize}i.d(t,{RY:()=>r,hL:()=>s,PS:()=>o,QW:()=>a,iY:()=>n,qh:()=>l}),function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"}(r||(r={})),function(e){e.Unknown="unknown",e.Stops="stops",e.ClampedLinear="clamped-linear",e.Proportional="proportional",e.Additive="additive",e.Constant="constant",e.Identity="identity",e.RealWorldSize="real-world-size"}(s||(s={}))},28101:(e,t,i)=>{i.d(t,{PR:()=>S,Lq:()=>y,Km:()=>m,cM:()=>h,ap:()=>b,V3:()=>x,B3:()=>f});var r=i(22303),s=i(1692),n=i(74085),l=i(92604),o=i(70586),a=i(99282),u=i(51706);const c=l.Z.getLogger("esri.renderers.visualVariables.support.visualVariableUtils"),p=new s.Z,d=Math.PI,f=/^\s*(return\s+)?\$view\.scale\s*(;)?\s*$/i;function y(e,t,i){const s="visualVariables"in e&&e.visualVariables?e.visualVariables.filter((e=>"color"===e.type))[0]:e;if(!s)return;if("esri.renderers.visualVariables.ColorVariable"!==s.declaredClass)return void c.warn("The visualVariable should be an instance of esri.renderers.visualVariables.ColorVariable");const n="number"==typeof t,l=n?null:t,a=l&&l.attributes;let u=n?t:null;const p=s.field,{ipData:d,hasExpression:f}=s.cache;let y=s.cache.compiledFunc;if(!p&&!f){const e=s.stops;return e&&e[0]&&e[0].color}if("number"!=typeof u)if(f){if(!(0,o.pC)(i)||!(0,o.pC)(i.arcade))return void c.error("Use of arcade expressions requires an arcade context");const e={viewingMode:i.viewingMode,scale:i.scale,spatialReference:i.spatialReference},t=i.arcade.arcadeUtils,r=t.getViewInfo(e),n=t.createExecContext(l,r);if(!y){const e=t.createSyntaxTree(s.valueExpression);y=t.createFunction(e),s.cache.compiledFunc=y}u=t.executeFunction(y,n)}else a&&(u=a[p]);const m=s.normalizationField,h=a?parseFloat(a[m]):void 0;if(null!=u&&(!m||n||!isNaN(h)&&0!==h)){isNaN(h)||n||(u/=h);const e=w(u,d);if(e){const t=e[0],n=e[1],l=t===n?s.stops[t].color:r.Z.blendColors(s.stops[t].color,s.stops[n].color,e[2],(0,o.pC)(i)?i.color:void 0);return new r.Z(l)}}}function m(e,t,i){const r="visualVariables"in e&&e.visualVariables?e.visualVariables.filter((e=>"opacity"===e.type))[0]:e;if(!r)return;if("esri.renderers.visualVariables.OpacityVariable"!==r.declaredClass)return void c.warn("The visualVariable should be an instance of esri.renderers.visualVariables.OpacityVariable");const s="number"==typeof t,n=s?null:t,l=n&&n.attributes;let a=s?t:null;const u=r.field,{ipData:p,hasExpression:d}=r.cache;let f=r.cache.compiledFunc;if(!u&&!d){const e=r.stops;return e&&e[0]&&e[0].opacity}if("number"!=typeof a)if(d){if((0,o.Wi)(i)||(0,o.Wi)(i.arcade))return void c.error("Use of arcade expressions requires an arcade context");const e={viewingMode:i.viewingMode,scale:i.scale,spatialReference:i.spatialReference},t=i.arcade.arcadeUtils,s=t.getViewInfo(e),l=t.createExecContext(n,s);if(!f){const e=t.createSyntaxTree(r.valueExpression);f=t.createFunction(e),r.cache.compiledFunc=f}a=t.executeFunction(f,l)}else l&&(a=l[u]);const y=r.normalizationField,m=l?parseFloat(l[y]):void 0;if(null!=a&&(!y||s||!isNaN(m)&&0!==m)){isNaN(m)||s||(a/=m);const e=w(a,p);if(e){const t=e[0],i=e[1];if(t===i)return r.stops[t].opacity;{const s=r.stops[t].opacity;return s+(r.stops[i].opacity-s)*e[2]}}}}function h(e,t,i){const r="visualVariables"in e&&e.visualVariables?e.visualVariables.filter((e=>"rotation"===e.type))[0]:e;if(!r)return;if("esri.renderers.visualVariables.RotationVariable"!==r.declaredClass)return void c.warn("The visualVariable should be an instance of esri.renderers.visualVariables.RotationVariable");const s=r.axis||"heading",n="heading"===s&&"arithmetic"===r.rotationType?90:0,l="heading"===s&&"arithmetic"===r.rotationType?-1:1,a="number"==typeof t?null:t,u=a&&a.attributes,p=r.field,{hasExpression:d}=r.cache;let f=r.cache.compiledFunc,y=0;if(!p&&!d)return y;if(d){if((0,o.Wi)(i)||(0,o.Wi)(i.arcade))return void c.error("Use of arcade expressions requires an arcade context");const e={viewingMode:i.viewingMode,scale:i.scale,spatialReference:i.spatialReference},t=i.arcade.arcadeUtils,s=t.getViewInfo(e),n=t.createExecContext(a,s);if(!f){const e=t.createSyntaxTree(r.valueExpression);f=t.createFunction(e),r.cache.compiledFunc=f}y=t.executeFunction(f,n)}else u&&(y=u[p]||0);return y="number"!=typeof y||isNaN(y)?null:n+l*y,y}function b(e,t,i){const r="visualVariables"in e&&e.visualVariables?e.visualVariables.filter((e=>"size"===e.type))[0]:e;if(!r)return;if("esri.renderers.visualVariables.SizeVariable"!==r.declaredClass)return void c.warn("The visualVariable should be an instance of esri.renderers.visualVariables.SizeVariable");const s=function(e,t,i,r,s){switch(t.transformationType){case u.hL.Additive:return function(e,t,i,r){return e+(g(t.minSize,i,r)||t.minDataValue)}(e,t,i,r);case u.hL.Constant:return function(e,t,i){const r=e.stops;let s=r&&r.length&&r[0].size;return null==s&&(s=e.minSize),g(s,t,i)}(t,i,r);case u.hL.ClampedLinear:return function(e,t,i,r){const s=(e-t.minDataValue)/(t.maxDataValue-t.minDataValue),n=g(t.minSize,i,r),l=g(t.maxSize,i,r),a=(0,o.pC)(r)?r.shape:void 0;if(e<=t.minDataValue)return n;if(e>=t.maxDataValue)return l;if("area"===t.scaleBy&&a){const e="circle"===a,t=e?d*(n/2)**2:n*n,i=t+s*((e?d*(l/2)**2:l*l)-t);return e?2*Math.sqrt(i/d):Math.sqrt(i)}return n+s*(l-n)}(e,t,i,r);case u.hL.Proportional:return function(e,t,i,r){const s=(0,o.pC)(r)?r.shape:void 0,n=e/t.minDataValue,l=g(t.minSize,i,r),a=g(t.maxSize,i,r);let u=null;return u="circle"===s?2*Math.sqrt(n*(l/2)**2):"square"===s||"diamond"===s||"image"===s?Math.sqrt(n*l**2):n*l,v(u,l,a)}(e,t,i,r);case u.hL.Stops:return function(e,t,i,r,s){const[n,l,o]=w(e,s);if(n===l)return g(t.stops[n].size,i,r);{const e=g(t.stops[n].size,i,r);return e+(g(t.stops[l].size,i,r)-e)*o}}(e,t,i,r,s);case u.hL.RealWorldSize:return function(e,t,i,r){const s=((0,o.pC)(r)&&r.resolution?r.resolution:1)*a.a[t.valueUnit],n=g(t.minSize,i,r),l=g(t.maxSize,i,r),{valueRepresentation:u}=t;let c=null;return c="area"===u?2*Math.sqrt(e/d)/s:"radius"===u||"distance"===u?2*e/s:e/s,v(c,n,l)}(e,t,i,r);case u.hL.Identity:return e;case u.hL.Unknown:return null}}(function(e,t,i){const r="number"==typeof t,s=r?null:t,n=s&&s.attributes;let l=r?t:null;const{isScaleDriven:a}=e.cache;let p=e.cache.compiledFunc;if(a){const t=(0,o.pC)(i)?i.scale:void 0,r=(0,o.pC)(i)?i.view:void 0;l=null==t||"3d"===r?function(e){let t=null,i=null;const r=e.stops;return r?(t=r[0].value,i=r[r.length-1].value):(t=e.minDataValue||0,i=e.maxDataValue||0),(t+i)/2}(e):t}else if(!r)switch(e.inputValueType){case u.RY.Expression:{if((0,o.Wi)(i)||(0,o.Wi)(i.arcade))return void c.error("Use of arcade expressions requires an arcade context");const t={viewingMode:i.viewingMode,scale:i.scale,spatialReference:i.spatialReference},r=i.arcade.arcadeUtils,n=r.getViewInfo(t),a=r.createExecContext(s,n);if(!p){const t=r.createSyntaxTree(e.valueExpression);p=r.createFunction(t),e.cache.compiledFunc=p}l=r.executeFunction(p,a);break}case u.RY.Field:n&&(l=n[e.field]);break;case u.RY.Unknown:l=null}if(!(0,u.qh)(l))return null;if(r||!e.normalizationField)return l;const d=n?parseFloat(n[e.normalizationField]):null;return(0,u.qh)(d)&&0!==d?l/d:null}(r,t,i),r,t,i,r.cache.ipData);return null==s||isNaN(s)?0:s}function g(e,t,i){return null==e?null:(0,u.iY)(e)?b(e,t,i):(0,u.qh)(e)?e:null}function v(e,t,i){return(0,u.qh)(i)&&e>i?i:(0,u.qh)(t)&&e<t?t:e}function x(e,t,i){const{isScaleDriven:r}=e.cache;if(!(r&&"3d"===i||t))return null;const s={scale:t,view:i};let n=g(e.minSize,p,s),l=g(e.maxSize,p,s);if(null!=n||null!=l){if(n>l){const e=l;l=n,n=e}return{minSize:n,maxSize:l}}}function w(e,t){if(!t)return;let i=0,r=t.length-1;return t.some(((t,s)=>e<t?(r=s,!0):(i=s,!1))),[i,r,(e-t[i])/(t[r]-t[i])]}function S(e,t,i){const r=["proportional","proportional","proportional"];for(const s of e){const e=s.useSymbolValue?"symbol-value":b(s,t,i);switch(s.axis){case"width":r[0]=e;break;case"depth":r[1]=e;break;case"height":r[2]=e;break;case"width-and-depth":r[0]=e,r[1]=e;break;case"all":case void 0:case null:r[0]=e,r[1]=e,r[2]=e;break;default:(0,n.Bg)(s.axis)}}return r}},72961:(e,t,i)=>{i.r(t),i.d(t,{addAggregateFields:()=>ee,createMatcherSchema:()=>ie,createSchema:()=>$,createSymbolSchema:()=>U,createSymbolSchemaOptions:()=>A}),i(16050),i(12501),i(95088),i(79056),i(5499);var r=i(84382),s=(i(30687),i(91423),i(20102)),n=i(80442),l=i(22974),o=i(92604),a=i(70586),u=i(62357),c=i(21878),p=i(66039),d=i(29996),f=i(63523),y=i(40660);i(24562);var m=i(34240),h=i(16534);function b(e,t){return Math.max(e,t)}i(83798),i(17332),i(24470),i(73913),i(30729),i(58195),i(28823),h.eF.metrics,new m.Z(0,0,24,24);const g=o.Z.getLogger("esri.renderers.visualVariables.support.utils");function v(e){return e.map((e=>function(e){return("size"===e.type||"color"===e.type||"opacity"===e.type)&&null!=e.stops}(e)?function(e){return e.stops=function(e,t){return t.length<=8?t:(g.warn(`Found ${t.length} Visual Variable stops, but MapView only supports 8. Displayed stops will be simplified.`),t.length>16?function(e,t){const[i,...r]=t,s=r.pop(),n=r[0].value,l=r[r.length-1].value,o=(l-n)/6,a=[];for(let i=n;i<l;i+=o){let s=0;for(;i>=r[s].value;)s++;const n=r[s],l=t[s-1],o=i-l.value,c=n.value===l.value?1:o/(n.value-l.value);if("color"===e){const e=r[s],n=t[s-1],l=e.color.clone();l.r=x(n.color.r,l.r,c),l.g=x(n.color.g,l.g,c),l.b=x(n.color.b,l.b,c),l.a=x(n.color.a,l.a,c),a.push({value:i,color:l,label:e.label})}else if("size"===e){const e=r[s],n=t[s-1],l=(0,u.t_)(e.size),o=x((0,u.t_)(n.size),l,c);a.push({value:i,size:o,label:e.label})}else{const e=r[s],n=x(t[s-1].opacity,e.opacity,c);a.push({value:i,opacity:n,label:e.label})}}return[i,...a,s]}(e,t):function(e){const[t,...i]=e,r=i.pop();for(;i.length>6;){let e=0,t=0;for(let r=1;r<i.length;r++){const s=i[r-1],n=i[r],l=Math.abs(n.value-s.value);l>t&&(t=l,e=r)}i.splice(e,1)}return[t,...i,r]}(t))}(e.type,e.stops),e}(e.clone()):e))}function x(e,t,i){return(1-i)*e+i*t}var w,S=i(44543),V=i(23847),C=i(30856),E=i(43697),_=i(5600),F=(i(75215),i(52011)),z=i(30556),T=i(51706);let R=w=class extends V.Z{writeLevels(e,t,i){for(const i in e){const e=this.levels[i];return void(t.stops=e)}}clone(){return new w({axis:this.axis,field:this.field,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,maxDataValue:this.maxDataValue,maxSize:(0,T.iY)(this.maxSize)?this.maxSize.clone():this.maxSize,minDataValue:this.minDataValue,minSize:(0,T.iY)(this.minSize)?this.minSize.clone():this.minSize,normalizationField:this.normalizationField,stops:this.stops&&this.stops.map((e=>e.clone())),target:this.target,useSymbolValue:this.useSymbolValue,valueRepresentation:this.valueRepresentation,valueUnit:this.valueUnit,legendOptions:this.legendOptions&&this.legendOptions.clone(),levels:(0,l.d9)(this.levels)})}};(0,E._)([(0,_.Cb)()],R.prototype,"levels",void 0),(0,E._)([(0,z.c)("levels")],R.prototype,"writeLevels",null),R=w=(0,E._)([(0,F.j)("esri.views.2d.engine.LevelDependentSizeVariable")],R);const I=o.Z.getLogger("esri.views.2d.layers.support.clusterUtils");n.Z.add("esri-cluster-arcade-enabled",!0);const j=(0,n.Z)("esri-cluster-arcade-enabled");function N(e,t){const{name:i,outStatistic:r}=t,{onStatisticField:n,onStatisticValueExpression:l,statisticType:o}=r;if(l){const t=(0,S.F)(l.toLowerCase());e.push({name:i,outStatistic:{onStatisticField:t,onStatisticValueExpression:l,statisticType:o}})}else n?e.push({name:i,outStatistic:{onStatisticField:n,statisticType:o}}):I.error(new s.Z("mapview-unsupported-field","Unable to handle field",{field:t}))}function L(e,t,i){const r=(0,S.F)(t),s="mode"===i?`cluster_type_${r}`:`cluster_avg_${r}`;return e.some((e=>e.name===s))||e.push({name:s,outStatistic:{onStatisticField:r,onStatisticValueExpression:t,statisticType:i}}),s}function Z(e,t,i,r){if("cluster_count"===t||e.some((e=>e.name===t)))return t;const s=function(e,t,i){switch(e){case"avg":case"avg_angle":return`cluster_avg_${t}`;case"mode":return`cluster_type_${t}`;case"norm":{const e=i,r="field",s=t.toLowerCase()+",norm:"+r+","+e.toLowerCase();return"cluster_avg_"+(0,S.F)(s)}}}(i,t,r);return e.some((e=>e.name===s))||("norm"===i?e.push({name:s,outStatistic:{onStatisticField:t,onStatisticNormalizationField:r,statisticType:i}}):e.push({name:s,outStatistic:{onStatisticField:t,statisticType:i}})),s}const M=new(i(35454).Xn)({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch",mesh:"mesh"}),O=o.Z.getLogger("esri.views.2d.layers.features.schemaUtils"),P="ValidationError",k={esriGeometryPoint:["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along"],esriGeometryMultipoint:null};function q(e){return(0,f.hF)(e)}function D(e){var t;return"line-marker"===e.type?{type:"line-marker",color:null==(t=e.color)?void 0:t.toJSON(),placement:e.placement,style:e.style}:(0,c.i)(e.toJSON()).toJSON()}function A(e){let t=0,i=0,r=!1,s=!0,n=!0;if((0,a.pC)(e)&&(i=function(e){if(!("visualVariables"in e))return 0;if(!e.hasVisualVariables("size"))return 0;const t=e.getVisualVariablesForType("size");if(!t[0])return 0;const i=t[0];if("outline"===i.target)return 0;if("stops"===i.transformationType)return i.stops.map((e=>e.size)).reduce(b,0);if("clamped-linear"===i.transformationType){let e=-1/0,t=-1/0;return e="number"==typeof i.maxSize?i.maxSize:i.maxSize.stops.map((e=>e.size)).reduce(b,0),t="number"==typeof i.minSize?i.minSize:i.minSize.stops.map((e=>e.size)).reduce(b,0),Math.max(e,t)}return"real-world-size"===i.transformationType?30:void 0}(e),"visualVariables"in e&&(t=function(e){if(!e)return p.X.NONE;let t=0;for(const i of e)if("size"===i.type){const e=(0,y.a)(i);t|=e,"outline"===i.target&&(t|=e<<4)}else"color"===i.type?t|=p.X.COLOR:"opacity"===i.type?t|=p.X.OPACITY:"rotation"===i.type&&(t|=p.X.ROTATION);return t}(e.visualVariables||[]),r="dot-density"===e.type),!r)){const t=e.getSymbols();"backgroundFillSymbol"in e&&e.backgroundFillSymbol&&t.push(e.backgroundFillSymbol);for(const e of t)if("cim"===e.type&&(s=!1),"simple-fill"===e.type||"picture-fill"===e.type){const t=e.outline;t&&"none"!==t.style&&"solid"!==t.style&&(n=!1);const i=t&&"none"!==t.style&&"solid"!==t.style,r="simple-fill"===e.type&&"none"!==e.style&&"solid"!==e.style;("picture-fill"===e.type||r||i)&&(s=!1)}}return r&&(n=!1),{vvFlags:t,maxVVSize:i,supportsOutlineFills:n,stride:{fill:r?"dot-density":s?"simple":"default"}}}function U(e,t,i){return B(e,A(t),i)}function B(e,t,i){if(!e)return null;switch(e.type){case"simple-fill":case"picture-fill":return function(e,t,i){const r=t.supportsOutlineFills,s=(0,f.jj)(p.LW.FILL,{...t,isOutlinedFill:r}),n=i?q(s):s,l=e.clone(),o=l.outline;t.supportsOutlineFills||(l.outline=null);const a={materialKey:n,hash:l.hash(),isOutlinedFill:!!t.supportsOutlineFills,...D(l)};if(t.supportsOutlineFills)return a;const u=[];if(u.push(a),o){const e=(0,f.jj)(p.LW.LINE,{...t,isOutline:!0}),r={materialKey:i?q(e):e,hash:o.hash(),...D(o)};u.push(r)}return{type:"composite-symbol",layers:u,hash:u.reduce(((e,t)=>t.hash+e),"")}}(e,t,i);case"simple-marker":case"picture-marker":return function(e,t,i){const r=(0,f.jj)(p.LW.MARKER,t),s=i?q(r):r,n=D(e);return{materialKey:s,hash:e.hash(),...n,angle:e.angle,maxVVSize:t.maxVVSize}}(e,t,i);case"simple-line":return function(e,t,i){const r=(0,f.jj)(p.LW.LINE,t),s=i?q(r):r,n=e.clone(),l=n.marker;n.marker=null;const o=[];if(o.push({materialKey:s,hash:n.hash(),...D(n)}),l){var a;const e=(0,f.jj)(p.LW.MARKER,t),r=i?q(e):e;l.color=null!=(a=l.color)?a:n.color,o.push({materialKey:r,hash:l.hash(),lineWidth:n.width,...D(l)})}return{type:"composite-symbol",layers:o,hash:o.reduce(((e,t)=>t.hash+e),"")}}(e,t,i);case"text":return function(e,t,i){const r=(0,f.jj)(p.LW.TEXT,t),s=i?q(r):r,n=D(e);return{materialKey:s,hash:e.hash(),...n,angle:e.angle,maxVVSize:t.maxVVSize}}(e,t,i);case"label":return function(e,t,i){const r=e.toJSON(),s=(0,f.jj)(p.LW.LABEL,{...t,placement:r.labelPlacement});return{materialKey:i?q(s):s,hash:e.hash(),...r,labelPlacement:r.labelPlacement}}(e,t,i);case"cim":return{type:"cim",rendererKey:t.vvFlags,data:e.data,maxVVSize:t.maxVVSize};case"CIMSymbolReference":return{type:"cim",rendererKey:t.vvFlags,data:e,maxVVSize:t.maxVVSize};case"web-style":return{...D(e),type:"web-style",hash:e.hash(),rendererKey:t.vvFlags,maxVVSize:t.maxVVSize};default:throw new Error(`symbol not supported ${e.type}`)}}function W(e,t){const i=(0,l.d9)(e);return i.some((e=>function(e,t){const i=e.labelPlacement,r=k[t];if(!e.symbol)return O.warn("No ILabelClass symbol specified."),!0;if(!r)return O.error(new s.Z("mapview-labeling:unsupported-geometry-type",`Unable to create labels for Feature Layer, ${t} is not supported`)),!0;if(!r.some((e=>e===i))){const s=r[0];i&&O.warn(`Found invalid label placement type ${i} for ${t}. Defaulting to ${s}`),e.labelPlacement=s}return!1}(e,t)))?[]:i}function $(e){return(0,n.Z)("esri-2d-update-debug")&&console.debug("Created new schema",J(e,!0)),J(e)}function J(e,t=!1){try{var i,n;const l=function(e,t=!1){const i=new Array;return i.push(function(e,t,i=!1){const n={indexCount:0,fields:{}},l="featureReduction"in e&&e.featureReduction,o=l?"aggregate":"feature";if("sublayers"in e){const t={type:"subtype",subtypeField:e.subtypeField,renderers:{},stride:{fill:"default"}},r={type:"subtype",mapping:{},target:"feature"},l={type:"subtype",classes:{}},u={type:"symbol",target:"feature",aggregateFields:[],attributes:n,storage:r,mesh:{matcher:t,aggregateMatcher:null,labels:l,sortKey:null}},c=new Set;let p=0;for(const{renderer:u,subtypeCode:d,labelingInfo:f,labelsVisible:y}of e.sublayers){const e=ie(n,o,u,i),m=te(n,o,u),h=y&&f;if("visualVariables"in u&&u.visualVariables&&u.visualVariables.length)throw new s.Z(P,"Visual variables are currently not supported for subtype layers");if("dictionary"===e.type)throw new s.Z(P,"Dictionary renderer is not supported in subtype layers");if("subtype"===e.type)throw new s.Z(P,"Nested subtype renderers is not supported");if((0,a.pC)(m)&&"subtype"===m.type)throw new s.Z(P,"Nested subtype storage is not supported");if((0,a.pC)(m)&&"dot-density"===m.type)throw new s.Z(P,"Dot density attributes are not supported in subtype layers");if(c.has(d))throw new s.Z(P,"Subtype codes for sublayers must be unique");c.add(d),t.renderers[d]=e,r.mapping[d]=m,h&&(l.classes[d]=h.map((e=>Q(u,n,e,"feature",p++,i))))}return u}if("heatmap"===e.renderer.type){const{blurRadius:t,fieldOffset:i,field:r}=e.renderer;return{type:"heatmap",aggregateFields:[],attributes:n,target:o,storage:null,mesh:{blurRadius:t,fieldOffset:i,field:Y(n,{target:o,field:r,resultType:"numeric"}).field}}}{const t=[],u="aggregate"===o?((e,t,i,r)=>{const n=t.clone();if(!(e=>{const t=t=>I.error(new s.Z("Unsupported-renderer",t,{renderer:e}));if("unique-value"===e.type){if(e.field2||e.field3)return t("FeatureReductionCluster does not support multi-field UniqueValueRenderers"),!1}else if("class-breaks"===e.type){if(e.normalizationField){const i=e.normalizationType;if("field"!==i)return t(`FeatureReductionCluster does not support a normalizationType of ${i}`),!1}}else if("simple"!==e.type)return t(`FeatureReductionCluster does not support renderers of type ${e.type}`),!1;if(!j){if("valueExpression"in e&&e.valueExpression)return t("FeatureReductionCluster does not currently support renderer.valueExpression. Support will be added in a future release"),!1;if(("visualVariables"in e&&e.visualVariables||[]).some((e=>!(!("valueExpression"in e)||!e.valueExpression))))return t("FeatureReductionCluster does not currently support visualVariables with a valueExpression. Support will be added in a future release"),!1}return!0})(n))return n;if(i.fields)for(const t of i.fields)N(e,t);if("visualVariables"in n){const t=(n.visualVariables||[]).filter((e=>"$view.scale"!==e.valueExpression)),r=(e=>{for(const t of e)if("size"===t.type)return t;return null})(t);t.forEach((t=>{"rotation"===t.type?t.field?t.field=Z(e,t.field,"avg_angle"):t.valueExpression&&(t.field=L(e,t.valueExpression,"avg_angle"),t.valueExpression=null):t.normalizationField?(t.field=Z(e,t.field,"norm",t.normalizationField),t.normalizationField=null):t.field?t.field=Z(e,t.field,"avg"):(t.field=L(e,t.valueExpression,"avg"),t.valueExpression=null)})),(0,a.Wi)(r)&&!(e=>{for(const t of e)if("cluster_count"===t.field)return!0;return!1})(t)&&(t.push(((e,t)=>{const i=[new C.Z({value:0,size:0}),new C.Z({value:1})];if((0,a.Wi)(t))return new V.Z({field:"cluster_count",stops:[...i,new C.Z({value:2,size:0})]});const r=Object.keys(t).reduce(((r,s)=>({...r,[s]:[...i,new C.Z({value:Math.max(2,t[s].minValue),size:e.clusterMinSize}),new C.Z({value:Math.max(3,t[s].maxValue),size:e.clusterMaxSize})]})),{});return new R({field:"cluster_count",levels:r})})(i,null)),n.dynamicClusterSize=!0),n.visualVariables=t}switch(n.type){case"simple":break;case"unique-value":n.field?n.field=Z(e,n.field,"mode"):n.valueExpression&&(n.field=L(e,n.valueExpression,"mode"),n.valueExpression=null);break;case"class-breaks":n.normalizationField?(n.field=Z(e,n.field,"norm",n.normalizationField),n.normalizationField=null):n.field?n.field=Z(e,n.field,"avg"):(n.field=L(e,n.valueExpression,"avg"),n.valueExpression=null)}return n})(t,e.renderer,l):e.renderer;ee(n,t);const c=ie(n,o,u,i);let p=null;const d=te(n,o,u),f=function(e){return M.toJSON(e)}(e.geometryType);let y=e.labelsVisible&&e.labelingInfo||[],m=[];if(l){if("selection"===l.type)throw new s.Z(P,"Mapview does not support `selection` reduction type",l);if(l.symbol){const e=new r.Z({symbol:l.symbol,visualVariables:"visualVariables"in u?u.visualVariables:null});p=ie(n,o,e,i)}m=l&&l.labelsVisible&&l.labelingInfo||[]}y=W(y,f),m=W(m,f);let h=0;const b=[...y.map((e=>Q(u,n,e,"feature",h++,i))),...m.map((e=>Q(u,n,e,"aggregate",h++,i)))],g=function(e,t){if((0,a.Wi)(t)||!t.length)return null;t.length>1&&O.warn(`Layer rendering currently only supports ordering by 1 orderByInfo, but found ${t.length}. All but the first will be discarded`);const i=t[0],r="ascending"===i.order?"asc":"desc";return i.field?{field:i.field,order:r}:i.valueExpression?{fieldIndex:X(e,{type:"expression",target:"feature",valueExpression:i.valueExpression,resultType:"numeric"}).fieldIndex,order:r}:(O.error(new s.Z(P,"Expected to find a field or valueExpression for OrderByInfo",i)),null)}(n,e.orderBy);return{type:"symbol",target:o,attributes:n,aggregateFields:t,storage:d,mesh:{matcher:c,labels:{type:"simple",classes:b},aggregateMatcher:p,sortKey:g}}}}(e)),i}(e,t),o={};return l.map((t=>function(e,t,i){switch(i.target){case"feature":return void G(e,K(t),i);case"aggregate":{if(!("featureReduction"in t))return;const r=t.featureReduction;if("selection"===r.type)throw new s.Z(P,"Mapview does not support `selection` reduction type",r);return G(e,K(t),i),void function(e,t,i){e.aggregate||(e.aggregate={name:"aggregate",input:"feature",filters:null,attributes:{},params:{clusterRadius:(0,u.F2)(t.clusterRadius/2),clusterPixelBuffer:64*Math.ceil((0,u.F2)(t.clusterMaxSize)/64),fields:i.aggregateFields}}),H(e.aggregate,i.attributes.fields)}(e,r,i)}}}(o,e,t))),{source:{definitionExpression:e.definitionExpression,fields:e.fields.map((e=>e.toJSON())),gdbVersion:e.gdbVersion,historicMoment:null==(i=e.historicMoment)?void 0:i.getTime(),outFields:e.availableFields,pixelBuffer:e.pixelBuffer,spatialReference:e.spatialReference.toJSON(),timeExtent:null==(n=e.timeExtent)?void 0:n.toJSON(),customParameters:e.customParameters},attributes:{fields:{},indexCount:0},processors:l,targets:o}}catch(e){if(e.fieldName===P)return O.error(e),null;throw e}}function H(e,t){for(const i in t){const r=t[i];if(r.target!==e.name)continue;const s=e.attributes[i];s?(s.context.mesh=s.context.mesh||r.context.mesh,s.context.storage=s.context.storage||r.context.storage):e.attributes[i]=r}return e}function K(e){var t,i,r,s,n;return[null!=(t=null==(i=(0,a.Wg)(e.filter))?void 0:i.toJSON())?t:null,null!=(r=null==(s=(0,a.Wg)(null==(n=(0,a.Wg)(e.featureEffect))?void 0:n.filter))?void 0:s.toJSON())?r:null]}function G(e,t,i){return e.feature||(e.feature={name:"feature",input:"source",filters:t,attributes:{}}),H(e.feature,i.attributes.fields),e}function Y(e,t){return t.field?X(e,{...t,type:"field",field:t.field}):t.valueExpression?X(e,{...t,type:"expression",valueExpression:t.valueExpression}):{field:null,fieldIndex:null}}function X(e,t){switch(t.type){case"expression":{const i=t.valueExpression;if(!e.fields[i]){const r=e.indexCount++;e.fields[i]={...t,name:i,fieldIndex:r}}return{fieldIndex:e.fields[i].fieldIndex}}case"label-expression":{const i=JSON.stringify(t.label);if(!e.fields[i]){const r=e.indexCount++;e.fields[i]={...t,name:i,fieldIndex:r}}return{fieldIndex:e.fields[i].fieldIndex}}case"field":{const i=t.field;return"aggregate"===t.target&&e.fields[i]||(e.fields[i]={...t,name:i}),{field:i}}case"statistic":return e.fields[t.name]={...t},{field:t.name}}}function Q(e,t,i,r,s,n=!1){const l=X(t,{type:"label-expression",target:r,context:{mesh:!0},resultType:"string",label:{labelExpression:i.labelExpression,labelExpressionInfo:i.labelExpressionInfo?{expression:i.labelExpressionInfo.expression}:null,symbol:!!i.symbol,where:i.where}}),{fieldIndex:o}=l;return{...U(i,e,n),fieldIndex:o,target:r,index:s}}function ee(e,t){const i={mesh:!0,storage:!0};for(const r of t){const{name:t,outStatistic:s}=r,{statisticType:n,onStatisticField:l}=s;let o=null,a=null,u=null;const c="numeric",p="feature";"onStatisticValueExpression"in s?a=X(e,{type:"expression",target:p,valueExpression:s.onStatisticValueExpression,resultType:c}).fieldIndex:"onStatisticNormalizationField"in s?(o=X(e,{type:"field",target:p,field:l,resultType:c}).field,u=s.onStatisticNormalizationField):o=X(e,{type:"field",target:p,field:l,resultType:c}).field,X(e,{type:"statistic",target:"aggregate",name:t,context:i,inField:o,inNormalizationField:u,inFieldIndex:a,statisticType:n})}}function te(e,t,i){switch(i.type){case"dot-density":return function(e,t,i){return i&&i.length?{type:"dot-density",mapping:i.map(((i,r)=>{const{field:s,fieldIndex:n}=Y(e,{valueExpression:i.valueExpression,field:i.field,resultType:"numeric",target:t});return{binding:r,field:s,fieldIndex:n}})),target:t}:{type:"dot-density",mapping:[],target:t}}(e,t,i.attributes);case"simple":case"class-breaks":case"unique-value":case"dictionary":return function(e,t,i){if(!i||!i.length)return{type:"visual-variable",mapping:[],target:t};const r={storage:!0},s="numeric";return{type:"visual-variable",mapping:v(i).map((i=>{var n;const l=(0,d.nU)(i.type),{field:o,fieldIndex:a}=Y(e,{target:t,valueExpression:i.valueExpression,field:i.field,context:r,resultType:s});switch(i.type){case"size":return"$view.scale"===i.valueExpression?null:{type:"size",binding:l,field:o,fieldIndex:a,normalizationField:Y(e,{target:t,field:i.normalizationField,context:r,resultType:s}).field,valueRepresentation:null!=(n=i.valueRepresentation)?n:null};case"color":return{type:"color",binding:l,field:o,fieldIndex:a,normalizationField:Y(e,{target:t,field:i.normalizationField,context:r,resultType:s}).field};case"opacity":return{type:"opacity",binding:l,field:o,fieldIndex:a,normalizationField:Y(e,{target:t,field:i.normalizationField,context:r,resultType:s}).field};case"rotation":return{type:"rotation",binding:l,field:o,fieldIndex:a}}})).filter((e=>e)),target:t}}(e,t,i.visualVariables);case"heatmap":return null}}function ie(e,t,i,r=!1){const n=(0,a.Pt)(e,{indexCount:0,fields:{}});switch(i.type){case"simple":case"dot-density":return function(e,t,i=!1){const r=t.getSymbols(),s=r.length?r[0]:null,{stride:n}=A(t);return{type:"simple",symbol:U(s,t,i),stride:n}}(0,i,r);case"class-breaks":return function(e,t,i,r=!1){const s=i.backgroundFillSymbol,{field:n,fieldIndex:l}=Y(e,{target:t,field:i.field,valueExpression:i.valueExpression,resultType:"numeric",context:{mesh:!0,use:"renderer.field"}}),o=i.normalizationType,a="log"===o?"esriNormalizeByLog":"percent-of-total"===o?"esriNormalizeByPercentOfTotal":"field"===o?"esriNormalizeByField":null,u=A(i),c=i.classBreakInfos.map((e=>({symbol:B(e.symbol,u,r),min:e.minValue,max:e.maxValue}))).sort(((e,t)=>e.min-t.min));return{type:"interval",attributes:e.fields,field:n,fieldIndex:l,backgroundFillSymbol:B(s,u,r),defaultSymbol:B(i.defaultSymbol,u,r),intervals:c,normalizationField:i.normalizationField,normalizationTotal:i.normalizationTotal,normalizationType:a,isMaxInclusive:i.isMaxInclusive,stride:u.stride}}(n,t,i,r);case"unique-value":return function(e,t,i,r=!1){const n=[],l=i.backgroundFillSymbol,o={target:t,context:{mesh:!0},resultType:"string"};if(i.field&&"string"!=typeof i.field)throw new s.Z(P,"Expected renderer.field to be a string",i);const{field:a,fieldIndex:u}=Y(e,{...o,field:i.field,valueExpression:i.valueExpression}),c=A(i);for(const e of i.uniqueValueInfos)n.push({value:""+e.value,symbol:B(e.symbol,c,r)});return{type:"map",attributes:e.fields,field:a,fieldIndex:u,field2:Y(e,{...o,field:i.field2}).field,field3:Y(e,{...o,field:i.field3}).field,fieldDelimiter:i.fieldDelimiter,backgroundFillSymbol:B(l,c),defaultSymbol:B(i.defaultSymbol,c),map:n,stride:c.stride}}(n,t,i,r);case"dictionary":return function(e,t,i=!1){return{type:"dictionary",renderer:t.toJSON(),stride:{fill:"default"}}}(0,i,r)}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4579,8062],{87344:(e,a,t)=>{t.d(a,{T:()=>r});const r={BingMapsLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(6968),t.e(3485),t.e(3749)]).then(t.bind(t,2723))).default,BuildingSceneLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(2303),t.e(6968),t.e(7319),t.e(1773),t.e(7668),t.e(755),t.e(3471),t.e(5638),t.e(4588),t.e(511),t.e(635),t.e(9101),t.e(7284),t.e(3792),t.e(8216),t.e(223)]).then(t.bind(t,30223))).default,CSVLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(2303),t.e(6968),t.e(7319),t.e(1773),t.e(7668),t.e(755),t.e(3471),t.e(5638),t.e(4588),t.e(511),t.e(635),t.e(9101),t.e(7284),t.e(9938)]).then(t.bind(t,45425))).default,ElevationLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(7668),t.e(3485),t.e(9151),t.e(9932),t.e(1765)]).then(t.bind(t,49932))).default,FeatureLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(2303),t.e(6968),t.e(7319),t.e(1773),t.e(7668),t.e(755),t.e(3471),t.e(5638),t.e(4588),t.e(511),t.e(635),t.e(9101),t.e(7284),t.e(6104)]).then(t.bind(t,67284))).default,GroupLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(6968),t.e(6401),t.e(7049)]).then(t.bind(t,63144))).default,GeoRSSLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(2303),t.e(6968),t.e(7319),t.e(9201)]).then(t.bind(t,3723))).default,GeoJSONLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(2303),t.e(6968),t.e(7319),t.e(1773),t.e(755),t.e(3471),t.e(5638),t.e(4588),t.e(511),t.e(635),t.e(3307)]).then(t.bind(t,23477))).default,ImageryLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(2303),t.e(6968),t.e(7319),t.e(1773),t.e(755),t.e(3471),t.e(5638),t.e(4588),t.e(9101),t.e(3578),t.e(3942),t.e(176),t.e(3081),t.e(4464)]).then(t.bind(t,66984))).default,ImageryTileLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(2303),t.e(6968),t.e(7319),t.e(1773),t.e(7668),t.e(755),t.e(3471),t.e(5638),t.e(4547),t.e(3485),t.e(3578),t.e(9151),t.e(176),t.e(3081),t.e(2398),t.e(7622)]).then(t.bind(t,52294))).default,IntegratedMeshLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(4547),t.e(3792),t.e(8589)]).then(t.bind(t,4717))).default,KMLLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(2303),t.e(6968),t.e(7319),t.e(1773),t.e(7668),t.e(755),t.e(3471),t.e(5638),t.e(8014)]).then(t.bind(t,42756))).default,MapImageLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(2303),t.e(6968),t.e(7319),t.e(1773),t.e(7668),t.e(755),t.e(3471),t.e(5638),t.e(4588),t.e(511),t.e(4369),t.e(5823),t.e(6204)]).then(t.bind(t,75823))).default,MapNotesLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(2303),t.e(6968),t.e(7319),t.e(1773),t.e(7668),t.e(755),t.e(3471),t.e(5638),t.e(4588),t.e(511),t.e(4547),t.e(635),t.e(9101),t.e(7284),t.e(4859)]).then(t.bind(t,62128))).default,OGCFeatureLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(2303),t.e(6968),t.e(7319),t.e(1773),t.e(755),t.e(3471),t.e(5638),t.e(4588),t.e(511),t.e(635),t.e(2730),t.e(7616)]).then(t.bind(t,88068))).default,OpenStreetMapLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(6968),t.e(3485),t.e(8659),t.e(6237)]).then(t.bind(t,66237))).default,PointCloudLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(2303),t.e(1773),t.e(3792),t.e(9294),t.e(6726)]).then(t.bind(t,10608))).default,RouteLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(2303),t.e(6968),t.e(7319),t.e(1773),t.e(755),t.e(3471),t.e(5638),t.e(4273),t.e(368),t.e(4889)]).then(t.bind(t,66277))).default,SceneLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(2303),t.e(6968),t.e(7319),t.e(1773),t.e(7668),t.e(755),t.e(3471),t.e(5638),t.e(4588),t.e(511),t.e(635),t.e(9101),t.e(7284),t.e(3792),t.e(8216),t.e(9254)]).then(t.bind(t,49254))).default,StreamLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(2303),t.e(6968),t.e(7319),t.e(1773),t.e(755),t.e(3471),t.e(5638),t.e(4588),t.e(511),t.e(635),t.e(3667)]).then(t.bind(t,88387))).default,TileLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(2303),t.e(6968),t.e(7319),t.e(1773),t.e(7668),t.e(755),t.e(3471),t.e(5638),t.e(4588),t.e(511),t.e(3485),t.e(9151),t.e(4369),t.e(9767)]).then(t.bind(t,98636))).default,UnknownLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(4166)]).then(t.bind(t,44166))).default,UnsupportedLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(9296)]).then(t.bind(t,39296))).default,VectorTileLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(2303),t.e(6968),t.e(7668),t.e(3485),t.e(9151),t.e(4325),t.e(1785),t.e(7212)]).then(t.bind(t,44854))).default,VoxelLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(2303),t.e(7668),t.e(3792),t.e(5410)]).then(t.bind(t,58092))).default,WebTileLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(6968),t.e(3485),t.e(8659)]).then(t.bind(t,16199))).default,WFSLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(2303),t.e(6968),t.e(7319),t.e(1773),t.e(7668),t.e(755),t.e(3471),t.e(5638),t.e(4588),t.e(511),t.e(4547),t.e(635),t.e(4556),t.e(3516)]).then(t.bind(t,12653))).default,WMSLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(2303),t.e(6968),t.e(7319),t.e(1773),t.e(7668),t.e(5845)]).then(t.bind(t,25906))).default,WMTSLayer:async()=>(await Promise.all([t.e(2785),t.e(6570),t.e(9928),t.e(102),t.e(6968),t.e(3485),t.e(8659),t.e(5853)]).then(t.bind(t,55853))).default}},33516:(e,a,t)=>{t.d(a,{m:()=>l});var r=t(17452),n=t(65587);function l(e){return{origin:"portal-item",url:(0,r.mN)(e.itemUrl),portal:e.portal||n.Z.getDefault(),portalItem:e,readResourcePaths:[]}}},18062:(e,a,t)=>{t.r(a),t.d(a,{getFirstLayerOrTableId:()=>p,getNumLayersAndTables:()=>f,load:()=>u,preprocessFSItemData:()=>m});var r=t(20102),n=t(87344),l=t(65587),i=t(33516),s=t(40555),o=t(96187);async function u(e,a){const t=e.instance.portalItem;return t&&t.id?(await t.load(a),function(e){const a=e.instance.portalItem;if(-1===e.supportedTypes.indexOf(a.type))throw new r.Z("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}'",{type:a.type,expectedType:e.supportedTypes.join(", ")})}(e),async function(e,a){const t=e.instance,l=t.portalItem,{url:u,title:y}=l,p=(0,i.m)(l);if("group"===t.type)return t.read({title:y},p),function(e,a){let t;const l=e.portalItem.type;switch(l){case"Feature Service":case"Feature Collection":t=n.T.FeatureLayer;break;case"Stream Service":t=n.T.StreamLayer;break;case"Scene Service":t=n.T.SceneLayer;break;default:throw new r.Z("portal:unsupported-item-type-as-group",`The item type '${l}' is not supported as a 'IGroupLayer'`)}let i;return t().then((e=>(i=e,d(a)))).then((async a=>"Feature Service"===l?(a=await m(a,e.portalItem.url),c(e,i,a)):f(a)>0?c(e,i,a):function(e,a){return e.portalItem.url?(0,o.b)(e.portalItem.url).then((t=>{var r,n;function l(e){return{id:e.id,name:e.name}}t&&c(e,a,{layers:null==(r=t.layers)?void 0:r.map(l),tables:null==(n=t.tables)?void 0:n.map(l)})})):Promise.resolve()}(e,i)))}(t,e);u&&t.read({url:u},p);const h=await d(e,a);return h&&t.read(h,p),t.resourceReferences={portalItem:l,paths:p.readResourcePaths},t.read({title:y},p),(0,s.y)(t,p)}(e,a)):Promise.resolve()}function c(e,a,t){let r=t.layers||[];const n=t.tables||[];"Feature Collection"===e.portalItem.type&&(r.forEach((e=>{var a;"Table"===(null==e||null==(a=e.layerDefinition)?void 0:a.type)&&n.push(e)})),r=r.filter((e=>{var a;return"Table"!==(null==e||null==(a=e.layerDefinition)?void 0:a.type)}))),r.reverse().forEach((r=>{const n=y(e,a,t,r);e.add(n)})),n.reverse().forEach((r=>{const n=y(e,a,t,r);e.tables.add(n)}))}function y(e,a,t,r){const n=new a({portalItem:e.portalItem.clone(),layerId:r.id,sublayerTitleMode:"service-name"});if("Feature Collection"===e.portalItem.type){const a={origin:"portal-item",portal:e.portalItem.portal||l.Z.getDefault()};n.read(r,a);const i=t.showLegend;null!=i&&n.read({showLegend:i},a)}return n}function d(e,a){if(!1===e.supportsData)return Promise.resolve(void 0);const t=e.instance;return t.portalItem.fetchData("json",a).catch((()=>null)).then((async e=>{if(function(e){return"stream"!==e.type&&"layerId"in e}(t)){let a,r=!0;return e&&f(e)>0&&(null==t.layerId&&(t.layerId=p(e)),a=function(e,a){const t=e.layers;if(t)for(let e=0;e<t.length;e++)if(t[e].id===a)return t[e];const r=e.tables;if(r)for(let e=0;e<r.length;e++)if(r[e].id===a)return r[e];return null}(e,t.layerId),a&&(1===f(e)&&(r=!1),null!=e.showLegend&&(a.showLegend=e.showLegend))),r&&"service-name"!==t.sublayerTitleMode&&(t.sublayerTitleMode="item-title-and-service-name"),a}return e}))}async function m(e,a){var t,r;if(null==(null==(t=e)?void 0:t.layers)||null==(null==(r=e)?void 0:r.tables)){const t=await(0,o.b)(a);(e=e||{}).layers=e.layers||(null==t?void 0:t.layers),e.tables=e.tables||(null==t?void 0:t.tables)}return e}function p(e){const a=e.layers;if(a&&a.length)return a[0].id;const t=e.tables;return t&&t.length?t[0].id:null}function f(e){var a,t,r,n;return(null!=(a=null==e||null==(t=e.layers)?void 0:t.length)?a:0)+(null!=(r=null==e||null==(n=e.tables)?void 0:n.length)?r:0)}},44579:(e,a,t)=>{t.r(a),t.d(a,{fromItem:()=>u,selectLayerClassPath:()=>c});var r=t(20102),n=t(87344),l=t(15235),i=t(18062);function s(e,a){return!!e.typeKeywords&&e.typeKeywords.indexOf(a)>-1}var o=t(96187);function u(e){return!e.portalItem||e.portalItem instanceof l.default||(e={...e,portalItem:new l.default(e.portalItem)}),function(e){return e.load().then(c).then(y)}(e.portalItem).then((a=>{const t={portalItem:e.portalItem,...a.properties},r=a.constructor;return Promise.resolve(new r(t))}))}function c(e){switch(e.type){case"Map Service":return function(e){return(0,o.b)(e.url).then((e=>e.tileInfo))}(e).then((e=>e?{className:"TileLayer"}:{className:"MapImageLayer"}));case"Feature Service":return function(e){return d(e).then((e=>{if("object"==typeof e){const a={};return null!=e.id&&(a.layerId=e.id),{className:"FeatureLayer",properties:a}}return{className:"GroupLayer"}}))}(e);case"Feature Collection":return async function(e){if(await e.load(),s(e,"Map Notes"))return{className:"MapNotesLayer"};if(s(e,"Route Layer"))return{className:"RouteLayer"};const a=await e.fetchData();return 1===(0,i.getNumLayersAndTables)(a)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Scene Service":return function(e){return d(e).then((a=>{if("object"==typeof a){const t={};let r;if(null!=a.id?(t.layerId=a.id,r=`${e.url}/layers/${a.id}`):r=e.url,Array.isArray(e.typeKeywords)&&e.typeKeywords.length>0){const a={IntegratedMesh:"IntegratedMeshLayer","3DObject":"SceneLayer",Point:"SceneLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};for(const t of Object.keys(a))if(-1!==e.typeKeywords.indexOf(t))return{className:a[t]}}return(0,o.b)(r).then((e=>{let a="SceneLayer";const r={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};return e&&e.layerType&&r[e.layerType]&&(a=r[e.layerType]),{className:a,properties:t}}))}return!1===a?(0,o.b)(e.url).then((e=>"Voxel"===(null==e?void 0:e.layerType)?{className:"VoxelLayer"}:{className:"GroupLayer"})):{className:"GroupLayer"}}))}(e);case"Image Service":return async function(e){var a,t,r;await e.load();const n=null!=(a=null==(t=e.typeKeywords)?void 0:t.map((e=>e.toLowerCase())))?a:[];if(n.indexOf("elevation 3d layer")>-1)return{className:"ElevationLayer"};if(n.indexOf("tiled imagery")>-1)return{className:"ImageryTileLayer"};const l=await e.fetchData(),i=null==l?void 0:l.layerType;return"ArcGISTiledImageServiceLayer"===i?{className:"ImageryTileLayer"}:"ArcGISImageServiceLayer"===i?{className:"ImageryLayer"}:"map"===(null==(r=(await(0,o.b)(e.url)).cacheType)?void 0:r.toLowerCase())?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e);case"Stream Service":case"Feed":return{className:"StreamLayer"};case"Vector Tile Service":return{className:"VectorTileLayer"};case"KML":return{className:"KMLLayer"};case"WFS":return{className:"WFSLayer"};case"WMTS":return{className:"WMTSLayer"};case"WMS":return{className:"WMSLayer"};default:return Promise.reject(new r.Z("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type}))}}function y(e){return(0,n.T[e.className])().then((a=>({constructor:a,properties:e.properties})))}function d(e){return!e.url||e.url.match(/\/\d+$/)?Promise.resolve({}):e.load().then((()=>e.fetchData())).then((async a=>"Feature Service"===e.type?m(a=await(0,i.preprocessFSItemData)(a,e.url)):(0,i.getNumLayersAndTables)(a)>0?m(a):(0,o.b)(e.url).then(m)))}function m(e){return 1===(0,i.getNumLayersAndTables)(e)&&{id:(0,i.getFirstLayerOrTableId)(e)}}},40555:(e,a,t)=>{t.d(a,{y:()=>i});var r=t(66643),n=t(95330),l=t(20941);async function i(e,a,t){const i=e&&e.getAtOrigin&&e.getAtOrigin("renderer",a.origin);if(i&&"unique-value"===i.type&&i.styleOrigin){const s=await(0,r.q6)(i.populateFromStyle());if((0,n.k_)(t),!1===s.ok){const t=s.error;a&&a.messages&&a.messages.push(new l.Z("renderer:style-reference",`Failed to create unique value renderer from style reference: ${t.message}`,{error:t,context:a})),e.clear("renderer",a.origin)}}}},96187:(e,a,t)=>{t.d(a,{b:()=>n});var r=t(3172);async function n(e){const{data:a}=await(0,r.default)(e,{responseType:"json",query:{f:"json"}});return a}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3505],{46851:(t,e,n)=>{n.d(e,{E:()=>a,R:()=>i});const a=1e-6,i=Math.random,o=Math.PI/180,s=180/Math.PI;Object.freeze({__proto__:null,EPSILON:a,RANDOM:i,toRadian:function(t){return t*o},toDegree:function(t){return t*s},equals:function(t,e){return Math.abs(t-e)<=a*Math.max(1,Math.abs(t),Math.abs(e))}})},52138:(t,e,n)=>{n.d(e,{a:()=>l,d:()=>d,e:()=>f,f:()=>m,h:()=>h,i:()=>s,j:()=>u,m:()=>c,p:()=>b,s:()=>o,t:()=>r,u:()=>p,v:()=>T,w:()=>g,y:()=>M});var a=n(65617),i=n(46851);function o(t,e,n,a,i,o,s,r,l,c,u,h,f,m,p,d,M){return t[0]=e,t[1]=n,t[2]=a,t[3]=i,t[4]=o,t[5]=s,t[6]=r,t[7]=l,t[8]=c,t[9]=u,t[10]=h,t[11]=f,t[12]=m,t[13]=p,t[14]=d,t[15]=M,t}function s(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function r(t,e){if(t===e){const n=e[1],a=e[2],i=e[3],o=e[6],s=e[7],r=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=a,t[9]=o,t[11]=e[14],t[12]=i,t[13]=s,t[14]=r}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function l(t,e){const n=e[0],a=e[1],i=e[2],o=e[3],s=e[4],r=e[5],l=e[6],c=e[7],u=e[8],h=e[9],f=e[10],m=e[11],p=e[12],d=e[13],M=e[14],y=e[15],x=n*r-a*s,v=n*l-i*s,g=n*c-o*s,T=a*l-i*r,b=a*c-o*r,w=i*c-o*l,R=u*d-h*p,_=u*M-f*p,E=u*y-m*p,q=h*M-f*d,I=h*y-m*d,A=f*y-m*M;let D=x*A-v*I+g*q+T*E-b*_+w*R;return D?(D=1/D,t[0]=(r*A-l*I+c*q)*D,t[1]=(i*I-a*A-o*q)*D,t[2]=(d*w-M*b+y*T)*D,t[3]=(f*b-h*w-m*T)*D,t[4]=(l*E-s*A-c*_)*D,t[5]=(n*A-i*E+o*_)*D,t[6]=(M*g-p*w-y*v)*D,t[7]=(u*w-f*g+m*v)*D,t[8]=(s*I-r*E+c*R)*D,t[9]=(a*E-n*I-o*R)*D,t[10]=(p*b-d*g+y*x)*D,t[11]=(h*g-u*b-m*x)*D,t[12]=(r*_-s*q-l*R)*D,t[13]=(n*q-a*_+i*R)*D,t[14]=(d*v-p*T-M*x)*D,t[15]=(u*T-h*v+f*x)*D,t):null}function c(t,e,n){const a=e[0],i=e[1],o=e[2],s=e[3],r=e[4],l=e[5],c=e[6],u=e[7],h=e[8],f=e[9],m=e[10],p=e[11],d=e[12],M=e[13],y=e[14],x=e[15];let v=n[0],g=n[1],T=n[2],b=n[3];return t[0]=v*a+g*r+T*h+b*d,t[1]=v*i+g*l+T*f+b*M,t[2]=v*o+g*c+T*m+b*y,t[3]=v*s+g*u+T*p+b*x,v=n[4],g=n[5],T=n[6],b=n[7],t[4]=v*a+g*r+T*h+b*d,t[5]=v*i+g*l+T*f+b*M,t[6]=v*o+g*c+T*m+b*y,t[7]=v*s+g*u+T*p+b*x,v=n[8],g=n[9],T=n[10],b=n[11],t[8]=v*a+g*r+T*h+b*d,t[9]=v*i+g*l+T*f+b*M,t[10]=v*o+g*c+T*m+b*y,t[11]=v*s+g*u+T*p+b*x,v=n[12],g=n[13],T=n[14],b=n[15],t[12]=v*a+g*r+T*h+b*d,t[13]=v*i+g*l+T*f+b*M,t[14]=v*o+g*c+T*m+b*y,t[15]=v*s+g*u+T*p+b*x,t}function u(t,e,n){const a=n[0],i=n[1],o=n[2];let s,r,l,c,u,h,f,m,p,d,M,y;return e===t?(t[12]=e[0]*a+e[4]*i+e[8]*o+e[12],t[13]=e[1]*a+e[5]*i+e[9]*o+e[13],t[14]=e[2]*a+e[6]*i+e[10]*o+e[14],t[15]=e[3]*a+e[7]*i+e[11]*o+e[15]):(s=e[0],r=e[1],l=e[2],c=e[3],u=e[4],h=e[5],f=e[6],m=e[7],p=e[8],d=e[9],M=e[10],y=e[11],t[0]=s,t[1]=r,t[2]=l,t[3]=c,t[4]=u,t[5]=h,t[6]=f,t[7]=m,t[8]=p,t[9]=d,t[10]=M,t[11]=y,t[12]=s*a+u*i+p*o+e[12],t[13]=r*a+h*i+d*o+e[13],t[14]=l*a+f*i+M*o+e[14],t[15]=c*a+m*i+y*o+e[15]),t}function h(t,e,n){const a=n[0],i=n[1],o=n[2];return t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t[3]=e[3]*a,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function f(t,e,n,a){let o,s,r,l,c,u,h,f,m,p,d,M,y,x,v,g,T,b,w,R,_,E,q,I,A=a[0],D=a[1],z=a[2],C=Math.sqrt(A*A+D*D+z*z);return C<i.E?null:(C=1/C,A*=C,D*=C,z*=C,o=Math.sin(n),s=Math.cos(n),r=1-s,l=e[0],c=e[1],u=e[2],h=e[3],f=e[4],m=e[5],p=e[6],d=e[7],M=e[8],y=e[9],x=e[10],v=e[11],g=A*A*r+s,T=D*A*r+z*o,b=z*A*r-D*o,w=A*D*r-z*o,R=D*D*r+s,_=z*D*r+A*o,E=A*z*r+D*o,q=D*z*r-A*o,I=z*z*r+s,t[0]=l*g+f*T+M*b,t[1]=c*g+m*T+y*b,t[2]=u*g+p*T+x*b,t[3]=h*g+d*T+v*b,t[4]=l*w+f*R+M*_,t[5]=c*w+m*R+y*_,t[6]=u*w+p*R+x*_,t[7]=h*w+d*R+v*_,t[8]=l*E+f*q+M*I,t[9]=c*E+m*q+y*I,t[10]=u*E+p*q+x*I,t[11]=h*E+d*q+v*I,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function m(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function p(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function d(t,e,n){let a,o,s,r=n[0],l=n[1],c=n[2],u=Math.sqrt(r*r+l*l+c*c);return u<i.E?null:(u=1/u,r*=u,l*=u,c*=u,a=Math.sin(e),o=Math.cos(e),s=1-o,t[0]=r*r*s+o,t[1]=l*r*s+c*a,t[2]=c*r*s-l*a,t[3]=0,t[4]=r*l*s-c*a,t[5]=l*l*s+o,t[6]=c*l*s+r*a,t[7]=0,t[8]=r*c*s+l*a,t[9]=l*c*s-r*a,t[10]=c*c*s+o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function M(t,e){const n=Math.sin(e),a=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function y(t,e,n){const a=e[0],i=e[1],o=e[2],s=e[3],r=a+a,l=i+i,c=o+o,u=a*r,h=a*l,f=a*c,m=i*l,p=i*c,d=o*c,M=s*r,y=s*l,x=s*c;return t[0]=1-(m+d),t[1]=h+x,t[2]=f-y,t[3]=0,t[4]=h-x,t[5]=1-(u+d),t[6]=p+M,t[7]=0,t[8]=f+y,t[9]=p-M,t[10]=1-(u+m),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}const x=(0,a.c)();function v(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function g(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function T(t,e){if(t===e)return!0;const n=t[0],a=t[1],o=t[2],s=t[3],r=t[4],l=t[5],c=t[6],u=t[7],h=t[8],f=t[9],m=t[10],p=t[11],d=t[12],M=t[13],y=t[14],x=t[15],v=e[0],g=e[1],T=e[2],b=e[3],w=e[4],R=e[5],_=e[6],E=e[7],q=e[8],I=e[9],A=e[10],D=e[11],z=e[12],C=e[13],Z=e[14],S=e[15];return Math.abs(n-v)<=i.E*Math.max(1,Math.abs(n),Math.abs(v))&&Math.abs(a-g)<=i.E*Math.max(1,Math.abs(a),Math.abs(g))&&Math.abs(o-T)<=i.E*Math.max(1,Math.abs(o),Math.abs(T))&&Math.abs(s-b)<=i.E*Math.max(1,Math.abs(s),Math.abs(b))&&Math.abs(r-w)<=i.E*Math.max(1,Math.abs(r),Math.abs(w))&&Math.abs(l-R)<=i.E*Math.max(1,Math.abs(l),Math.abs(R))&&Math.abs(c-_)<=i.E*Math.max(1,Math.abs(c),Math.abs(_))&&Math.abs(u-E)<=i.E*Math.max(1,Math.abs(u),Math.abs(E))&&Math.abs(h-q)<=i.E*Math.max(1,Math.abs(h),Math.abs(q))&&Math.abs(f-I)<=i.E*Math.max(1,Math.abs(f),Math.abs(I))&&Math.abs(m-A)<=i.E*Math.max(1,Math.abs(m),Math.abs(A))&&Math.abs(p-D)<=i.E*Math.max(1,Math.abs(p),Math.abs(D))&&Math.abs(d-z)<=i.E*Math.max(1,Math.abs(d),Math.abs(z))&&Math.abs(M-C)<=i.E*Math.max(1,Math.abs(M),Math.abs(C))&&Math.abs(y-Z)<=i.E*Math.max(1,Math.abs(y),Math.abs(Z))&&Math.abs(x-S)<=i.E*Math.max(1,Math.abs(x),Math.abs(S))}function b(t){const e=i.E,n=t[0],a=t[1],o=t[2],s=t[4],r=t[5],l=t[6],c=t[8],u=t[9],h=t[10];return Math.abs(1-(n*n+s*s+c*c))<=e&&Math.abs(1-(a*a+r*r+u*u))<=e&&Math.abs(1-(o*o+l*l+h*h))<=e}const w=c,R=v;Object.freeze({__proto__:null,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},set:o,identity:s,transpose:r,invert:l,adjoint:function(t,e){const n=e[0],a=e[1],i=e[2],o=e[3],s=e[4],r=e[5],l=e[6],c=e[7],u=e[8],h=e[9],f=e[10],m=e[11],p=e[12],d=e[13],M=e[14],y=e[15];return t[0]=r*(f*y-m*M)-h*(l*y-c*M)+d*(l*m-c*f),t[1]=-(a*(f*y-m*M)-h*(i*y-o*M)+d*(i*m-o*f)),t[2]=a*(l*y-c*M)-r*(i*y-o*M)+d*(i*c-o*l),t[3]=-(a*(l*m-c*f)-r*(i*m-o*f)+h*(i*c-o*l)),t[4]=-(s*(f*y-m*M)-u*(l*y-c*M)+p*(l*m-c*f)),t[5]=n*(f*y-m*M)-u*(i*y-o*M)+p*(i*m-o*f),t[6]=-(n*(l*y-c*M)-s*(i*y-o*M)+p*(i*c-o*l)),t[7]=n*(l*m-c*f)-s*(i*m-o*f)+u*(i*c-o*l),t[8]=s*(h*y-m*d)-u*(r*y-c*d)+p*(r*m-c*h),t[9]=-(n*(h*y-m*d)-u*(a*y-o*d)+p*(a*m-o*h)),t[10]=n*(r*y-c*d)-s*(a*y-o*d)+p*(a*c-o*r),t[11]=-(n*(r*m-c*h)-s*(a*m-o*h)+u*(a*c-o*r)),t[12]=-(s*(h*M-f*d)-u*(r*M-l*d)+p*(r*f-l*h)),t[13]=n*(h*M-f*d)-u*(a*M-i*d)+p*(a*f-i*h),t[14]=-(n*(r*M-l*d)-s*(a*M-i*d)+p*(a*l-i*r)),t[15]=n*(r*f-l*h)-s*(a*f-i*h)+u*(a*l-i*r),t},determinant:function(t){const e=t[0],n=t[1],a=t[2],i=t[3],o=t[4],s=t[5],r=t[6],l=t[7],c=t[8],u=t[9],h=t[10],f=t[11],m=t[12],p=t[13],d=t[14],M=t[15];return(e*s-n*o)*(h*M-f*d)-(e*r-a*o)*(u*M-f*p)+(e*l-i*o)*(u*d-h*p)+(n*r-a*s)*(c*M-f*m)-(n*l-i*s)*(c*d-h*m)+(a*l-i*r)*(c*p-u*m)},multiply:c,translate:u,scale:h,rotate:f,rotateX:function(t,e,n){const a=Math.sin(n),i=Math.cos(n),o=e[4],s=e[5],r=e[6],l=e[7],c=e[8],u=e[9],h=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+c*a,t[5]=s*i+u*a,t[6]=r*i+h*a,t[7]=l*i+f*a,t[8]=c*i-o*a,t[9]=u*i-s*a,t[10]=h*i-r*a,t[11]=f*i-l*a,t},rotateY:function(t,e,n){const a=Math.sin(n),i=Math.cos(n),o=e[0],s=e[1],r=e[2],l=e[3],c=e[8],u=e[9],h=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-c*a,t[1]=s*i-u*a,t[2]=r*i-h*a,t[3]=l*i-f*a,t[8]=o*a+c*i,t[9]=s*a+u*i,t[10]=r*a+h*i,t[11]=l*a+f*i,t},rotateZ:function(t,e,n){const a=Math.sin(n),i=Math.cos(n),o=e[0],s=e[1],r=e[2],l=e[3],c=e[4],u=e[5],h=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+c*a,t[1]=s*i+u*a,t[2]=r*i+h*a,t[3]=l*i+f*a,t[4]=c*i-o*a,t[5]=u*i-s*a,t[6]=h*i-r*a,t[7]=f*i-l*a,t},fromTranslation:m,fromScaling:p,fromRotation:d,fromXRotation:M,fromYRotation:function(t,e){const n=Math.sin(e),a=Math.cos(e);return t[0]=a,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){const n=Math.sin(e),a=Math.cos(e);return t[0]=a,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotationTranslation:y,fromQuat2:function(t,e){const n=x,a=-e[0],i=-e[1],o=-e[2],s=e[3],r=e[4],l=e[5],c=e[6],u=e[7],h=a*a+i*i+o*o+s*s;return h>0?(n[0]=2*(r*s+u*a+l*o-c*i)/h,n[1]=2*(l*s+u*i+c*a-r*o)/h,n[2]=2*(c*s+u*o+r*i-l*a)/h):(n[0]=2*(r*s+u*a+l*o-c*i),n[1]=2*(l*s+u*i+c*a-r*o),n[2]=2*(c*s+u*o+r*i-l*a)),y(t,e,n),t},getTranslation:function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},getScaling:function(t,e){const n=e[0],a=e[1],i=e[2],o=e[4],s=e[5],r=e[6],l=e[8],c=e[9],u=e[10];return t[0]=Math.sqrt(n*n+a*a+i*i),t[1]=Math.sqrt(o*o+s*s+r*r),t[2]=Math.sqrt(l*l+c*c+u*u),t},getRotation:function(t,e){const n=e[0]+e[5]+e[10];let a=0;return n>0?(a=2*Math.sqrt(n+1),t[3]=.25*a,t[0]=(e[6]-e[9])/a,t[1]=(e[8]-e[2])/a,t[2]=(e[1]-e[4])/a):e[0]>e[5]&&e[0]>e[10]?(a=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/a,t[0]=.25*a,t[1]=(e[1]+e[4])/a,t[2]=(e[8]+e[2])/a):e[5]>e[10]?(a=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/a,t[0]=(e[1]+e[4])/a,t[1]=.25*a,t[2]=(e[6]+e[9])/a):(a=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/a,t[0]=(e[8]+e[2])/a,t[1]=(e[6]+e[9])/a,t[2]=.25*a),t},fromRotationTranslationScale:function(t,e,n,a){const i=e[0],o=e[1],s=e[2],r=e[3],l=i+i,c=o+o,u=s+s,h=i*l,f=i*c,m=i*u,p=o*c,d=o*u,M=s*u,y=r*l,x=r*c,v=r*u,g=a[0],T=a[1],b=a[2];return t[0]=(1-(p+M))*g,t[1]=(f+v)*g,t[2]=(m-x)*g,t[3]=0,t[4]=(f-v)*T,t[5]=(1-(h+M))*T,t[6]=(d+y)*T,t[7]=0,t[8]=(m+x)*b,t[9]=(d-y)*b,t[10]=(1-(h+p))*b,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:function(t,e,n,a,i){const o=e[0],s=e[1],r=e[2],l=e[3],c=o+o,u=s+s,h=r+r,f=o*c,m=o*u,p=o*h,d=s*u,M=s*h,y=r*h,x=l*c,v=l*u,g=l*h,T=a[0],b=a[1],w=a[2],R=i[0],_=i[1],E=i[2],q=(1-(d+y))*T,I=(m+g)*T,A=(p-v)*T,D=(m-g)*b,z=(1-(f+y))*b,C=(M+x)*b,Z=(p+v)*w,S=(M-x)*w,F=(1-(f+d))*w;return t[0]=q,t[1]=I,t[2]=A,t[3]=0,t[4]=D,t[5]=z,t[6]=C,t[7]=0,t[8]=Z,t[9]=S,t[10]=F,t[11]=0,t[12]=n[0]+R-(q*R+D*_+Z*E),t[13]=n[1]+_-(I*R+z*_+S*E),t[14]=n[2]+E-(A*R+C*_+F*E),t[15]=1,t},fromQuat:function(t,e){const n=e[0],a=e[1],i=e[2],o=e[3],s=n+n,r=a+a,l=i+i,c=n*s,u=a*s,h=a*r,f=i*s,m=i*r,p=i*l,d=o*s,M=o*r,y=o*l;return t[0]=1-h-p,t[1]=u+y,t[2]=f-M,t[3]=0,t[4]=u-y,t[5]=1-c-p,t[6]=m+d,t[7]=0,t[8]=f+M,t[9]=m-d,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},frustum:function(t,e,n,a,i,o,s){const r=1/(n-e),l=1/(i-a),c=1/(o-s);return t[0]=2*o*r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*l,t[6]=0,t[7]=0,t[8]=(n+e)*r,t[9]=(i+a)*l,t[10]=(s+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=s*o*2*c,t[15]=0,t},perspective:function(t,e,n,a,i){const o=1/Math.tan(e/2);let s;return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(s=1/(a-i),t[10]=(i+a)*s,t[14]=2*i*a*s):(t[10]=-1,t[14]=-2*a),t},perspectiveFromFieldOfView:function(t,e,n,a){const i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),s=Math.tan(e.leftDegrees*Math.PI/180),r=Math.tan(e.rightDegrees*Math.PI/180),l=2/(s+r),c=2/(i+o);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(s-r)*l*.5,t[9]=(i-o)*c*.5,t[10]=a/(n-a),t[11]=-1,t[12]=0,t[13]=0,t[14]=a*n/(n-a),t[15]=0,t},ortho:function(t,e,n,a,i,o,s){const r=1/(e-n),l=1/(a-i),c=1/(o-s);return t[0]=-2*r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*r,t[13]=(i+a)*l,t[14]=(s+o)*c,t[15]=1,t},lookAt:function(t,e,n,a){let o,r,l,c,u,h,f,m,p,d;const M=e[0],y=e[1],x=e[2],v=a[0],g=a[1],T=a[2],b=n[0],w=n[1],R=n[2];return Math.abs(M-b)<i.E&&Math.abs(y-w)<i.E&&Math.abs(x-R)<i.E?s(t):(f=M-b,m=y-w,p=x-R,d=1/Math.sqrt(f*f+m*m+p*p),f*=d,m*=d,p*=d,o=g*p-T*m,r=T*f-v*p,l=v*m-g*f,d=Math.sqrt(o*o+r*r+l*l),d?(d=1/d,o*=d,r*=d,l*=d):(o=0,r=0,l=0),c=m*l-p*r,u=p*o-f*l,h=f*r-m*o,d=Math.sqrt(c*c+u*u+h*h),d?(d=1/d,c*=d,u*=d,h*=d):(c=0,u=0,h=0),t[0]=o,t[1]=c,t[2]=f,t[3]=0,t[4]=r,t[5]=u,t[6]=m,t[7]=0,t[8]=l,t[9]=h,t[10]=p,t[11]=0,t[12]=-(o*M+r*y+l*x),t[13]=-(c*M+u*y+h*x),t[14]=-(f*M+m*y+p*x),t[15]=1,t)},targetTo:function(t,e,n,a){const i=e[0],o=e[1],s=e[2],r=a[0],l=a[1],c=a[2];let u=i-n[0],h=o-n[1],f=s-n[2],m=u*u+h*h+f*f;m>0&&(m=1/Math.sqrt(m),u*=m,h*=m,f*=m);let p=l*f-c*h,d=c*u-r*f,M=r*h-l*u;return m=p*p+d*d+M*M,m>0&&(m=1/Math.sqrt(m),p*=m,d*=m,M*=m),t[0]=p,t[1]=d,t[2]=M,t[3]=0,t[4]=h*M-f*d,t[5]=f*p-u*M,t[6]=u*d-h*p,t[7]=0,t[8]=u,t[9]=h,t[10]=f,t[11]=0,t[12]=i,t[13]=o,t[14]=s,t[15]=1,t},str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},subtract:v,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,a){return t[0]=e[0]+n[0]*a,t[1]=e[1]+n[1]*a,t[2]=e[2]+n[2]*a,t[3]=e[3]+n[3]*a,t[4]=e[4]+n[4]*a,t[5]=e[5]+n[5]*a,t[6]=e[6]+n[6]*a,t[7]=e[7]+n[7]*a,t[8]=e[8]+n[8]*a,t[9]=e[9]+n[9]*a,t[10]=e[10]+n[10]*a,t[11]=e[11]+n[11]*a,t[12]=e[12]+n[12]*a,t[13]=e[13]+n[13]*a,t[14]=e[14]+n[14]*a,t[15]=e[15]+n[15]*a,t},exactEquals:g,equals:T,isOrthoNormal:b,mul:w,sub:R})},17896:(t,e,n)=>{n.d(e,{E:()=>h,a:()=>f,b:()=>l,c:()=>x,d:()=>y,e:()=>v,f:()=>c,g:()=>s,h:()=>p,i:()=>m,k:()=>_,l:()=>o,m:()=>g,n:()=>M,p:()=>d,q:()=>b,r:()=>E,s:()=>r,t:()=>T,u:()=>C});var a=n(65617),i=n(46851);function o(t){const e=t[0],n=t[1],a=t[2];return Math.sqrt(e*e+n*n+a*a)}function s(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function r(t,e,n,a){return t[0]=e,t[1]=n,t[2]=a,t}function l(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function c(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function u(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function h(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function f(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function m(t,e){const n=e[0]-t[0],a=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+a*a+i*i)}function p(t,e){const n=e[0]-t[0],a=e[1]-t[1],i=e[2]-t[2];return n*n+a*a+i*i}function d(t){const e=t[0],n=t[1],a=t[2];return e*e+n*n+a*a}function M(t,e){const n=e[0],a=e[1],i=e[2];let o=n*n+a*a+i*i;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function y(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function x(t,e,n){const a=e[0],i=e[1],o=e[2],s=n[0],r=n[1],l=n[2];return t[0]=i*l-o*r,t[1]=o*s-a*l,t[2]=a*r-i*s,t}function v(t,e,n,a){const i=e[0],o=e[1],s=e[2];return t[0]=i+a*(n[0]-i),t[1]=o+a*(n[1]-o),t[2]=s+a*(n[2]-s),t}function g(t,e,n){const a=e[0],i=e[1],o=e[2];return t[0]=n[0]*a+n[4]*i+n[8]*o+n[12],t[1]=n[1]*a+n[5]*i+n[9]*o+n[13],t[2]=n[2]*a+n[6]*i+n[10]*o+n[14],t}function T(t,e,n){const a=e[0],i=e[1],o=e[2];return t[0]=a*n[0]+i*n[3]+o*n[6],t[1]=a*n[1]+i*n[4]+o*n[7],t[2]=a*n[2]+i*n[5]+o*n[8],t}function b(t,e,n){const a=n[0],i=n[1],o=n[2],s=n[3],r=e[0],l=e[1],c=e[2];let u=i*c-o*l,h=o*r-a*c,f=a*l-i*r,m=i*f-o*h,p=o*u-a*f,d=a*h-i*u;const M=2*s;return u*=M,h*=M,f*=M,m*=2,p*=2,d*=2,t[0]=r+u+m,t[1]=l+h+p,t[2]=c+f+d,t}const w=(0,a.c)(),R=(0,a.c)();function _(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function E(t,e,n){const a=n[0]-e[0],i=n[1]-e[1],o=n[2]-e[2];let s=a*a+i*i+o*o;return s>0?(s=1/Math.sqrt(s),t[0]=a*s,t[1]=i*s,t[2]=o*s,t):(t[0]=0,t[1]=0,t[2]=0,t)}const q=c,I=u,A=h,D=m,z=p,C=o,Z=d;Object.freeze({__proto__:null,length:o,copy:s,set:r,add:l,subtract:c,multiply:u,divide:h,ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t},max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:f,scaleAndAdd:function(t,e,n,a){return t[0]=e[0]+n[0]*a,t[1]=e[1]+n[1]*a,t[2]=e[2]+n[2]*a,t},distance:m,squaredDistance:p,squaredLength:d,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t},normalize:M,dot:y,cross:x,lerp:v,hermite:function(t,e,n,a,i,o){const s=o*o,r=s*(2*o-3)+1,l=s*(o-2)+o,c=s*(o-1),u=s*(3-2*o);return t[0]=e[0]*r+n[0]*l+a[0]*c+i[0]*u,t[1]=e[1]*r+n[1]*l+a[1]*c+i[1]*u,t[2]=e[2]*r+n[2]*l+a[2]*c+i[2]*u,t},bezier:function(t,e,n,a,i,o){const s=1-o,r=s*s,l=o*o,c=r*s,u=3*o*r,h=3*l*s,f=l*o;return t[0]=e[0]*c+n[0]*u+a[0]*h+i[0]*f,t[1]=e[1]*c+n[1]*u+a[1]*h+i[1]*f,t[2]=e[2]*c+n[2]*u+a[2]*h+i[2]*f,t},random:function(t,e){e=e||1;const n=2*(0,i.R)()*Math.PI,a=2*(0,i.R)()-1,o=Math.sqrt(1-a*a)*e;return t[0]=Math.cos(n)*o,t[1]=Math.sin(n)*o,t[2]=a*e,t},transformMat4:g,transformMat3:T,transformQuat:b,rotateX:function(t,e,n,a){const i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(a)-i[2]*Math.sin(a),o[2]=i[1]*Math.sin(a)+i[2]*Math.cos(a),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},rotateY:function(t,e,n,a){const i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(a)+i[0]*Math.cos(a),o[1]=i[1],o[2]=i[2]*Math.cos(a)-i[0]*Math.sin(a),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},rotateZ:function(t,e,n,a){const i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(a)-i[1]*Math.sin(a),o[1]=i[0]*Math.sin(a)+i[1]*Math.cos(a),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},angle:function(t,e){s(w,t),s(R,e),M(w,w),M(R,R);const n=y(w,R);return n>1?0:n<-1?Math.PI:Math.acos(n)},str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},exactEquals:_,equals:function(t,e){if(t===e)return!0;const n=t[0],a=t[1],o=t[2],s=e[0],r=e[1],l=e[2];return Math.abs(n-s)<=i.E*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(a-r)<=i.E*Math.max(1,Math.abs(a),Math.abs(r))&&Math.abs(o-l)<=i.E*Math.max(1,Math.abs(o),Math.abs(l))},direction:E,sub:q,mul:I,div:A,dist:D,sqrDist:z,len:C,sqrLen:Z})},65617:(t,e,n)=>{function a(){return[0,0,0]}function i(t){return[t[0],t[1],t[2]]}function o(t,e,n){return[t,e,n]}function s(t){const e=[0,0,0],n=Math.min(3,t.length);for(let a=0;a<n;++a)e[a]=t[a];return e}function r(t,e){return new Float64Array(t,e,3)}function l(){return o(1,1,1)}function c(){return o(1,0,0)}function u(){return o(0,1,0)}function h(){return o(0,0,1)}n.d(e,{O:()=>m,Z:()=>f,a:()=>i,b:()=>r,c:()=>a,d:()=>s,f:()=>o});const f=[0,0,0],m=l(),p=c(),d=u(),M=h();Object.freeze({__proto__:null,create:a,clone:i,fromValues:o,fromArray:s,createView:r,zeros:function(){return[0,0,0]},ones:l,unitX:c,unitY:u,unitZ:h,ZEROS:f,ONES:m,UNIT_X:p,UNIT_Y:d,UNIT_Z:M})},98766:(t,e,n)=>{n.d(e,{a:()=>s,b:()=>u,c:()=>i,d:()=>M,e:()=>m,f:()=>p,g:()=>x,h:()=>v,l:()=>y,n:()=>d,s:()=>o});var a=n(46851);function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function o(t,e,n,a,i){return t[0]=e,t[1]=n,t[2]=a,t[3]=i,t}function s(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}function r(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}function l(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t}function c(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t}function u(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}function h(t,e){const n=e[0]-t[0],a=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return Math.sqrt(n*n+a*a+i*i+o*o)}function f(t,e){const n=e[0]-t[0],a=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return n*n+a*a+i*i+o*o}function m(t){const e=t[0],n=t[1],a=t[2],i=t[3];return Math.sqrt(e*e+n*n+a*a+i*i)}function p(t){const e=t[0],n=t[1],a=t[2],i=t[3];return e*e+n*n+a*a+i*i}function d(t,e){const n=e[0],a=e[1],i=e[2],o=e[3];let s=n*n+a*a+i*i+o*o;return s>0&&(s=1/Math.sqrt(s),t[0]=n*s,t[1]=a*s,t[2]=i*s,t[3]=o*s),t}function M(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function y(t,e,n,a){const i=e[0],o=e[1],s=e[2],r=e[3];return t[0]=i+a*(n[0]-i),t[1]=o+a*(n[1]-o),t[2]=s+a*(n[2]-s),t[3]=r+a*(n[3]-r),t}function x(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function v(t,e){const n=t[0],i=t[1],o=t[2],s=t[3],r=e[0],l=e[1],c=e[2],u=e[3];return Math.abs(n-r)<=a.E*Math.max(1,Math.abs(n),Math.abs(r))&&Math.abs(i-l)<=a.E*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(o-c)<=a.E*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(s-u)<=a.E*Math.max(1,Math.abs(s),Math.abs(u))}const g=r,T=l,b=c,w=h,R=f,_=m,E=p;Object.freeze({__proto__:null,copy:i,set:o,add:s,subtract:r,multiply:l,divide:c,ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t[3]=Math.ceil(e[3]),t},floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t[3]=Math.floor(e[3]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t},max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t[3]=Math.round(e[3]),t},scale:u,scaleAndAdd:function(t,e,n,a){return t[0]=e[0]+n[0]*a,t[1]=e[1]+n[1]*a,t[2]=e[2]+n[2]*a,t[3]=e[3]+n[3]*a,t},distance:h,squaredDistance:f,length:m,squaredLength:p,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t},normalize:d,dot:M,lerp:y,random:function(t,e){let n,i,o,s,r,l;e=e||1;do{n=2*(0,a.R)()-1,i=2*(0,a.R)()-1,r=n*n+i*i}while(r>=1);do{o=2*(0,a.R)()-1,s=2*(0,a.R)()-1,l=o*o+s*s}while(l>=1);const c=Math.sqrt((1-r)/l);return t[0]=e*n,t[1]=e*i,t[2]=e*o*c,t[3]=e*s*c,t},transformMat4:function(t,e,n){const a=e[0],i=e[1],o=e[2],s=e[3];return t[0]=n[0]*a+n[4]*i+n[8]*o+n[12]*s,t[1]=n[1]*a+n[5]*i+n[9]*o+n[13]*s,t[2]=n[2]*a+n[6]*i+n[10]*o+n[14]*s,t[3]=n[3]*a+n[7]*i+n[11]*o+n[15]*s,t},transformQuat:function(t,e,n){const a=e[0],i=e[1],o=e[2],s=n[0],r=n[1],l=n[2],c=n[3],u=c*a+r*o-l*i,h=c*i+l*a-s*o,f=c*o+s*i-r*a,m=-s*a-r*i-l*o;return t[0]=u*c+m*-s+h*-l-f*-r,t[1]=h*c+m*-r+f*-s-u*-l,t[2]=f*c+m*-l+u*-r-h*-s,t[3]=e[3],t},str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},exactEquals:x,equals:v,sub:g,mul:T,div:b,dist:w,sqrDist:R,len:_,sqrLen:E})},22021:(t,e,n)=>{n.d(e,{ZF:()=>f,Kt:()=>m,jE:()=>M,uZ:()=>s,oK:()=>p,Vl:()=>u,wt:()=>r,t7:()=>c,Sf:()=>o,fp:()=>l,BV:()=>h});var a=n(17896);n(98766);const i=new Float32Array(1);function o(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function s(t,e,n){return Math.min(Math.max(t,e),n)}function r(t){return 0==(t&t-1)}function l(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t}function c(t,e,n){return t+(e-t)*n}function u(t){return t*Math.PI/180}function h(t){return 180*t/Math.PI}function f(t){return Math.acos(s(t,-1,1))}function m(t){return Math.asin(s(t,-1,1))}function p(t){return d(Math.max(-y,Math.min(t,y)))}function d(t){return i[0]=t,i[0]}function M(t,e){const n=(0,a.l)(t),i=m(t[2]/n),o=Math.atan2(t[1]/n,t[0]/n);return(0,a.s)(e,n,i,o),e}const y=d(34028234663852886e22)},69285:(t,e,n)=>{n.d(e,{k:()=>s});var a=n(70586),i=n(67900),o=n(8744);function s(t,e,n){if((0,a.Wi)(e)||(0,a.Wi)(n)||n.vcsWkid||(0,o.fS)(e,n))return null;const s=(0,i._R)(e)/(0,i._R)(n);if(1===s)return null;switch(t){case"point":case"esriGeometryPoint":return t=>function(t,e){t&&null!=t.z&&(t.z*=e)}(t,s);case"polyline":case"esriGeometryPolyline":return t=>function(t,e){if(t)for(const n of t.paths)for(const t of n)t.length>2&&(t[2]*=e)}(t,s);case"polygon":case"esriGeometryPolygon":return t=>function(t,e){if(t)for(const n of t.rings)for(const t of n)t.length>2&&(t[2]*=e)}(t,s);case"multipoint":case"esriGeometryMultipoint":return t=>function(t,e){if(t)for(const n of t.points)n.length>2&&(n[2]*=e)}(t,s);case"extent":case"esriGeometryExtent":return t=>function(t,e){t&&null!=t.zmin&&null!=t.zmax&&(t.zmin*=e,t.zmax*=e)}(t,s);default:return null}}},33127:(t,e,n)=>{n.r(e),n.d(e,{ElevationQuery:()=>_,GeometryDescriptor:()=>E,default:()=>_,getFinestLodIndex:()=>D});var a=n(66643),i=n(20102),o=n(70586),s=n(95330),r=n(67900),l=n(65091),c=n(13473),u=n(58901),h=n(90411),f=n(24470),m=(n(66577),n(80442),n(92604)),p=n(54102),d=n(40488);const M=m.Z.getLogger("esri.layers.support.ElevationSampler");class y{queryElevation(t){return function(t,e){const n=g(t,e.spatialReference);if(!n)return null;switch(t.type){case"point":!function(t,e,n){t.z=(0,o.Pt)(n.elevationAt(e),0)}(t,n,e);break;case"polyline":!function(t,e,n){T.spatialReference=e.spatialReference;const a=t.hasM&&!t.hasZ;for(let i=0;i<t.paths.length;i++){const s=t.paths[i],r=e.paths[i];for(let t=0;t<s.length;t++){const e=s[t],i=r[t];T.x=i[0],T.y=i[1],a&&(e[3]=e[2]),e[2]=(0,o.Pt)(n.elevationAt(T),0)}}t.hasZ=!0}(t,n,e);break;case"multipoint":!function(t,e,n){T.spatialReference=e.spatialReference;const a=t.hasM&&!t.hasZ;for(let i=0;i<t.points.length;i++){const s=t.points[i],r=e.points[i];T.x=r[0],T.y=r[1],a&&(s[3]=s[2]),s[2]=(0,o.Pt)(n.elevationAt(T),0)}t.hasZ=!0}(t,n,e)}return t}(t.clone(),this)}on(){return b}projectIfRequired(t,e){return g(t,e)}}class x extends y{constructor(t,e,n){super(),this.tile=t,this.noDataValue=n,this.extent=(0,f.HH)(t.tile.extent,e.spatialReference);const a=(0,r.c9)(e.spatialReference),i=e.lodAt(t.tile.level).resolution*a;this.demResolution={min:i,max:i}}get spatialReference(){return this.extent.spatialReference}contains(t){const e=this.projectIfRequired(t,this.spatialReference);return(0,p.aV)(this.extent,e)}elevationAt(t){const e=this.projectIfRequired(t,this.spatialReference);if((0,o.Wi)(e))return null;if(!this.contains(t)){const e=this.extent,n=`${e.xmin}, ${e.ymin}, ${e.xmax}, ${e.ymax}`;return M.warn("#elevationAt()",`Point used to sample elevation (${t.x}, ${t.y}) is outside of the sampler extent (${n})`),this.noDataValue}return this.tile.sample(e.x,e.y)}}class v extends y{constructor(t,e,n){let a;super(),"number"==typeof e?(this.noDataValue=e,a=null):(a=e,this.noDataValue=n),this.samplers=a?t.map((t=>new x(t,a,this.noDataValue))):t;const i=this.samplers[0];if(i){this.extent=i.extent.clone();const{min:t,max:e}=i.demResolution;this.demResolution={min:t,max:e};for(let t=1;t<this.samplers.length;t++){const e=this.samplers[t];this.extent.union(e.extent),this.demResolution.min=Math.min(this.demResolution.min,e.demResolution.min),this.demResolution.max=Math.max(this.demResolution.max,e.demResolution.max)}}else this.extent=(0,f.HH)((0,f.Ue)(),a.spatialReference),this.demResolution={min:0,max:0}}get spatialReference(){return this.extent.spatialReference}elevationAt(t){const e=this.projectIfRequired(t,this.spatialReference);if(!e)return null;for(const t of this.samplers)if(t.contains(e))return t.elevationAt(e);return M.warn("#elevationAt()",`Point used to sample elevation (${t.x}, ${t.y}) is outside of the sampler`),this.noDataValue}}function g(t,e){if((0,o.Wi)(t))return null;const n=t.spatialReference;if(n.equals(e))return t;const a=(0,d.iV)(t,e);return a||M.error(`Cannot project geometry spatial reference (wkid:${n.wkid}) to elevation sampler spatial reference (wkid:${e.wkid})`),a}const T=new c.Z,b={remove(){}};class w{constructor(t,e=null){if(this.tile=t,(0,o.pC)(e)){const n=t.extent;this.samplerData={pixelData:e.values,width:e.width,height:e.height,safeWidth:.99999999*(e.width-1),noDataValue:e.noDataValue,dx:(e.width-1)/(n[2]-n[0]),dy:(e.width-1)/(n[3]-n[1]),x0:n[0],y1:n[3]}}}sample(t,e){if((0,o.Wi)(this.samplerData))return;const{safeWidth:n,width:a,pixelData:i,noDataValue:s,dx:r,dy:l,y1:c,x0:u}=this.samplerData,h=R(l*(c-e),0,n),f=R(r*(t-u),0,n),m=Math.floor(h),p=Math.floor(f),d=m*a+p,M=d+a,y=i[d],x=i[M],v=i[d+1],g=i[M+1];if(y!==s&&x!==s&&v!==s&&g!==s){const t=f-p,e=y+(v-y)*t;return e+(x+(g-x)*t-e)*(h-m)}}}function R(t,e,n){return t<e?e:t>n?n:t}class _{async queryAll(t,e,n){if(!(t=n&&n.ignoreInvisibleLayers?t.filter((t=>t.visible)):t.slice()).length)throw new i.Z("elevation-query:invalid-layer","Elevation queries require at least one elevation layer to fetch tiles from");const a=E.fromGeometry(e);let o=!1;n&&n.returnSampleInfo||(o=!0);const s={...z,...n,returnSampleInfo:!0},r=await this.query(t[t.length-1],a,s),l=await this._queryAllContinue(t,r,s);return l.geometry=l.geometry.export(),o&&delete l.sampleInfo,l}async query(t,e,n){if(!t)throw new i.Z("elevation-query:invalid-layer","Elevation queries require an elevation layer to fetch tiles from");if(!e||!(e instanceof E)&&"point"!==e.type&&"multipoint"!==e.type&&"polyline"!==e.type)throw new i.Z("elevation-query:invalid-geometry","Only point, polyline and multipoint geometries can be used to query elevation");const a={...z,...n},o=new I(t,e.spatialReference,a),s=a.signal;return await t.load({signal:s}),await this._createGeometryDescriptor(o,e,s),await this._selectTiles(o,s),await this._populateElevationTiles(o,s),this._sampleGeometryWithElevation(o),this._createQueryResult(o,s)}async createSampler(t,e,n){if(!t)throw new i.Z("elevation-query:invalid-layer","Elevation queries require an elevation layer to fetch tiles from");if(!e||"extent"!==e.type)throw new i.Z("elevation-query:invalid-extent","Invalid or undefined extent");const a={...z,...n};return this._createSampler(t,e,a)}async createSamplerAll(t,e,n){if(!(t=n&&n.ignoreInvisibleLayers?t.filter((t=>t.visible)):t.slice()).length)throw new i.Z("elevation-query:invalid-layer","Elevation queries require at least one elevation layer to fetch tiles from");if(!e||"extent"!==e.type)throw new i.Z("elevation-query:invalid-extent","Invalid or undefined extent");const a={...z,...n,returnSampleInfo:!0},o=await this._createSampler(t[t.length-1],e,a);return this._createSamplerAllContinue(t,e,o,a)}async _createSampler(t,e,n,a){const i=n.signal;await t.load({signal:i});const o=e.spatialReference,s=t.tileInfo.spatialReference;o.equals(s)||(await(0,h.iQ)([{source:o,dest:s}],{signal:i}),e=(0,h.iV)(e,s));const r=new A(t,e,n,a);return await this._selectTiles(r,i),await this._populateElevationTiles(r,i),new v(r.elevationTiles,r.layer.tileInfo,r.options.noDataValue)}async _createSamplerAllContinue(t,e,n,a){if(t.pop(),!t.length)return n;const i=n.samplers.map((t=>(0,f.oJ)(t.extent))),o=await this._createSampler(t[t.length-1],e,a,i);if(0===o.samplers.length)return n;const s=n.samplers.concat(o.samplers),r=new v(s,a.noDataValue);return this._createSamplerAllContinue(t,e,r,a)}async _queryAllContinue(t,e,n){const a=t.pop(),i=e.geometry.coordinates,o=[],s=[];for(let n=0;n<i.length;n++){const r=e.sampleInfo[n];r.demResolution>=0?r.source||(r.source=a):t.length&&(o.push(i[n]),s.push(n))}if(!t.length||0===o.length)return e;const r=e.geometry.clone(o),l=await this.query(t[t.length-1],r,n);return s.forEach(((t,n)=>{i[t].z=l.geometry.coordinates[n].z,e.sampleInfo[t].demResolution=l.sampleInfo[n].demResolution})),this._queryAllContinue(t,e,n)}async _createQueryResult(t,e){const n={geometry:(await t.geometry.project(t.outSpatialReference,e)).export(),noDataValue:t.options.noDataValue};return t.options.returnSampleInfo&&(n.sampleInfo=this._extractSampleInfo(t)),t.geometry.coordinates.forEach((t=>{t.tile=null,t.elevationTile=null})),n}async _createGeometryDescriptor(t,e,n){let a;const o=t.layer.tileInfo.spatialReference;if(e instanceof E?a=await e.project(o,n):(await(0,h.iQ)([{source:e.spatialReference,dest:o}],{signal:n}),a=(0,h.iV)(e,o)),!a)throw new i.Z("elevation-query:spatial-reference-mismatch",`Cannot query elevation in '${e.spatialReference.wkid}' on an elevation service in '${o.wkid}'`);t.geometry=E.fromGeometry(a)}async _selectTiles(t,e){const n=t.options.demResolution;if("geometry"===t.type&&this._preselectOutsideLayerExtent(t),"number"==typeof n)this._selectTilesClosestResolution(t);else if("finest-contiguous"===n)await this._selectTilesFinestContiguous(t,e);else{if("auto"!==n)throw new i.Z("elevation-query:invalid-dem-resolution",`Invalid dem resolution value '${n}', expected a number, "finest-contiguous" or "auto"`);await this._selectTilesAuto(t,e)}}_preselectOutsideLayerExtent(t){if((0,o.Wi)(t.layer.fullExtent))return;const e=new w(null);e.sample=()=>t.options.noDataValue,t.outsideExtentTile=e;const n=t.layer.fullExtent;t.geometry.coordinates.forEach((t=>{const a=t.x,i=t.y;(a<n.xmin||a>n.xmax||i<n.ymin||i>n.ymax)&&(t.elevationTile=e)}))}_selectTilesClosestResolution(t){const e=t.layer.tileInfo,n=this._findNearestDemResolutionLODIndex(e,t.options.demResolution);t.selectTilesAtLOD(n)}_findNearestDemResolutionLODIndex(t,e){const n=e/(0,r.c9)(t.spatialReference);let a=t.lods[0],i=0;for(let e=1;e<t.lods.length;e++){const o=t.lods[e];Math.abs(o.resolution-n)<Math.abs(a.resolution-n)&&(a=o,i=e)}return i}async _selectTilesFinestContiguous(t,e){const n=D(t.layer.tileInfo,t.options.minDemResolution);await this._selectTilesFinestContiguousAt(t,n,e)}async _selectTilesFinestContiguousAt(t,e,n){const a=t.layer;if(t.selectTilesAtLOD(e),e<0)return;const o=a.tilemapCache,r=t.getTilesToFetch();try{if(o)await(0,s.Hl)(Promise.all(r.map((t=>o.fetchAvailability(t.level,t.row,t.col,{signal:n})))),n);else if(await this._populateElevationTiles(t,n),!t.allElevationTilesFetched())throw t.clearElevationTiles(),new i.Z("elevation-query:has-unavailable-tiles")}catch(a){(0,s.r9)(a),await this._selectTilesFinestContiguousAt(t,e-1,n)}}async _populateElevationTiles(t,e){const n=t.getTilesToFetch(),a={},i=t.options.cache,r=t.options.noDataValue,l=n.map((async n=>{const s=`${t.layer.uid}:${n.id}:${r}`,l=(0,o.pC)(i)?i.get(s):null,c=(0,o.pC)(l)?l:await t.layer.fetchTile(n.level,n.row,n.col,{noDataValue:r,signal:e});(0,o.pC)(i)&&i.put(s,c),a[n.id]=new w(n,c)}));await(0,s.Hl)((0,s.as)(l),e),t.populateElevationTiles(a)}async _selectTilesAuto(t,e){this._selectTilesAutoFinest(t),this._reduceTilesForMaximumRequests(t);const n=t.layer.tilemapCache;if(!n)return this._selectTilesAutoPrefetchUpsample(t,e);const i=t.getTilesToFetch(),o={},r=i.map((async t=>{const i={id:null,level:0,row:0,col:0,extent:(0,f.Ue)()},r=await(0,a.q6)(n.fetchAvailabilityUpsample(t.level,t.row,t.col,i,{signal:e}));!1===r.ok?(0,s.r9)(r.error):o[t.id]=i}));await(0,s.Hl)(Promise.all(r),e),t.remapTiles(o)}_reduceTilesForMaximumRequests(t){const e=t.layer.tileInfo;let n=0;const a={},i=t=>{t.id in a?a[t.id]++:(a[t.id]=1,n++)},o=t=>{const e=a[t.id];1===e?(delete a[t.id],n--):a[t.id]=e-1};t.forEachTileToFetch(i,o);let s=!0;for(;s&&(s=!1,t.forEachTileToFetch((a=>{n<=t.options.maximumAutoTileRequests||(o(a),e.upsampleTile(a)&&(s=!0),i(a))}),o),s););}_selectTilesAutoFinest(t){const e=D(t.layer.tileInfo,t.options.minDemResolution);t.selectTilesAtLOD(e,t.options.maximumAutoTileRequests)}async _selectTilesAutoPrefetchUpsample(t,e){const n=t.layer.tileInfo;await this._populateElevationTiles(t,e);let a=!1;t.forEachTileToFetch(((t,e)=>{n.upsampleTile(t)?a=!0:e()})),a&&await this._selectTilesAutoPrefetchUpsample(t,e)}_sampleGeometryWithElevation(t){t.geometry.coordinates.forEach((e=>{const n=e.elevationTile;let a=t.options.noDataValue;if(n){const t=n.sample(e.x,e.y);(0,o.pC)(t)?a=t:e.elevationTile=null}e.z=a}))}_extractSampleInfo(t){const e=t.layer.tileInfo,n=(0,r.c9)(e.spatialReference);return t.geometry.coordinates.map((a=>{let i=-1;return a.elevationTile&&a.elevationTile!==t.outsideExtentTile&&(i=e.lodAt(a.elevationTile.tile.level).resolution*n),{demResolution:i}}))}}class E{export(){return this._exporter(this.coordinates,this.spatialReference)}clone(t){const e=new E;return e.geometry=this.geometry,e.spatialReference=this.spatialReference,e.coordinates=t||this.coordinates.map((t=>this._cloneCoordinate(t))),e._exporter=this._exporter,e}async project(t,e){if(this.spatialReference.equals(t))return this.clone();await(0,h.iQ)([{source:this.spatialReference,dest:t}],{signal:e});const n=new l.Z({spatialReference:this.spatialReference,points:this.coordinates.map((t=>[t.x,t.y]))}),a=(0,h.iV)(n,t);if(!a)return null;const i=this.coordinates.map(((t,e)=>{const n=this._cloneCoordinate(t),i=a.points[e];return n.x=i[0],n.y=i[1],n})),o=this.clone(i);return o.spatialReference=t,o}_cloneCoordinate(t){return{x:t.x,y:t.y,z:t.z,m:t.m,tile:null,elevationTile:null}}static fromGeometry(t){const e=new E;if(e.geometry=t,e.spatialReference=t.spatialReference,t instanceof E)e.coordinates=t.coordinates.map((t=>e._cloneCoordinate(t))),e._exporter=(e,n)=>{const a=t.clone(e);return a.spatialReference=n,a};else switch(t.type){case"point":{const n=t,{hasZ:a,hasM:i}=n;e.coordinates=a&&i?[{x:n.x,y:n.y,z:n.z,m:n.m}]:a?[{x:n.x,y:n.y,z:n.z}]:i?[{x:n.x,y:n.y,m:n.m}]:[{x:n.x,y:n.y}],e._exporter=(e,n)=>t.hasM?new c.Z(e[0].x,e[0].y,e[0].z,e[0].m,n):new c.Z(e[0].x,e[0].y,e[0].z,n);break}case"multipoint":{const n=t,{hasZ:a,hasM:i}=n;e.coordinates=a&&i?n.points.map((t=>({x:t[0],y:t[1],z:t[2],m:t[3]}))):a?n.points.map((t=>({x:t[0],y:t[1],z:t[2]}))):i?n.points.map((t=>({x:t[0],y:t[1],m:t[2]}))):n.points.map((t=>({x:t[0],y:t[1]}))),e._exporter=(e,n)=>t.hasM?new l.Z({points:e.map((t=>[t.x,t.y,t.z,t.m])),hasZ:!0,hasM:!0,spatiaReference:n}):new l.Z(e.map((t=>[t.x,t.y,t.z])),n);break}case"polyline":{const n=t,a=[],i=[],{hasZ:o,hasM:s}=t;let r=0;for(const t of n.paths)if(i.push([r,r+t.length]),r+=t.length,o&&s)for(const e of t)a.push({x:e[0],y:e[1],z:e[2],m:e[3]});else if(o)for(const e of t)a.push({x:e[0],y:e[1],z:e[2]});else if(s)for(const e of t)a.push({x:e[0],y:e[1],m:e[2]});else for(const e of t)a.push({x:e[0],y:e[1]});e.coordinates=a,e._exporter=(e,n)=>{const a=t.hasM?e.map((t=>[t.x,t.y,t.z,t.m])):e.map((t=>[t.x,t.y,t.z])),o=i.map((t=>a.slice(t[0],t[1])));return new u.Z({paths:o,hasM:t.hasM,hasZ:!0,spatialReference:n})};break}}return e}}class q{constructor(t,e){this.layer=t,this.options=e}}class I extends q{constructor(t,e,n){super(t,n),this.outSpatialReference=e,this.type="geometry"}selectTilesAtLOD(t){if(t<0)this.geometry.coordinates.forEach((t=>t.tile=null));else{const e=this.layer.tileInfo,n=e.lods[t].level;this.geometry.coordinates.forEach((t=>{t.tile=e.tileAt(n,t.x,t.y)}))}}allElevationTilesFetched(){return!this.geometry.coordinates.some((t=>!t.elevationTile))}clearElevationTiles(){for(const t of this.geometry.coordinates)t.elevationTile!==this.outsideExtentTile&&(t.elevationTile=null)}populateElevationTiles(t){for(const e of this.geometry.coordinates)!e.elevationTile&&e.tile&&(e.elevationTile=t[e.tile.id])}remapTiles(t){for(const e of this.geometry.coordinates)e.tile=t[e.tile.id]}getTilesToFetch(){const t={},e=[];for(const n of this.geometry.coordinates){const a=n.tile;n.elevationTile||!n.tile||t[a.id]||(t[a.id]=a,e.push(a))}return e}forEachTileToFetch(t){for(const e of this.geometry.coordinates)e.tile&&!e.elevationTile&&t(e.tile,(()=>e.tile=null))}}class A extends q{constructor(t,e,n,a){super(t,n),this.type="extent",this.elevationTiles=[],this.candidateTiles=[],this.fetchedCandidates=new Set,this.extent=e.intersection(t.fullExtent),this.maskExtents=a}selectTilesAtLOD(t,e){const n=this._maximumLodForRequests(e),a=Math.min(n,t);a<0?this.candidateTiles.length=0:this._selectCandidateTilesCoveringExtentAt(a)}_maximumLodForRequests(t){const e=this.layer.tileInfo;if(!t)return e.lods.length-1;const n=this.extent;if((0,o.Wi)(n))return-1;for(let a=e.lods.length-1;a>=0;a--){const i=e.lods[a],o=i.resolution*e.size[0],s=i.resolution*e.size[1];if(Math.ceil(n.width/o)*Math.ceil(n.height/s)<=t)return a}return-1}allElevationTilesFetched(){return this.candidateTiles.length===this.elevationTiles.length}clearElevationTiles(){this.elevationTiles.length=0,this.fetchedCandidates.clear()}populateElevationTiles(t){for(const e of this.candidateTiles){const n=t[e.id];n&&(this.fetchedCandidates.add(e),this.elevationTiles.push(n))}}remapTiles(t){this.candidateTiles=this._uniqueNonOverlappingTiles(this.candidateTiles.map((e=>t[e.id])))}getTilesToFetch(){return this.candidateTiles}forEachTileToFetch(t,e){const n=this.candidateTiles;this.candidateTiles=[],n.forEach((n=>{if(this.fetchedCandidates.has(n))return void(e&&e(n));let a=!1;t(n,(()=>a=!0)),a?e&&e(n):this.candidateTiles.push(n)})),this.candidateTiles=this._uniqueNonOverlappingTiles(this.candidateTiles,e)}_uniqueNonOverlappingTiles(t,e){const n={},a=[];for(const i of t)n[i.id]?e&&e(i):(n[i.id]=i,a.push(i));const i=a.sort(((t,e)=>t.level-e.level));return i.filter(((t,n)=>{for(let a=0;a<n;a++)if((0,f.r3)(i[a].extent,t.extent))return e&&e(t),!1;return!0}))}_selectCandidateTilesCoveringExtentAt(t){this.candidateTiles.length=0;const e=this.extent;if((0,o.Wi)(e))return;const n=this.layer.tileInfo,a=n.lods[t],i=n.tileAt(a.level,e.xmin,e.ymin),s=a.resolution*n.size[0],r=a.resolution*n.size[1],l=Math.ceil((e.xmax-i.extent[0])/s),c=Math.ceil((e.ymax-i.extent[1])/r);for(let t=0;t<c;t++)for(let e=0;e<l;e++){const a={id:null,level:i.level,row:i.row-t,col:i.col+e};n.updateTileInfo(a),this._tileIsMasked(a)||this.candidateTiles.push(a)}}_tileIsMasked(t){return!!this.maskExtents&&this.maskExtents.some((e=>(0,f.r3)(e,t.extent)))}}function D(t,e){let n=t.lods.length-1;if(e>0){const a=t.lods.findIndex((t=>t.resolution<e));0===a?n=0:a>0&&(n=a-1)}return n}const z={maximumAutoTileRequests:20,noDataValue:0,returnSampleInfo:!1,demResolution:"auto",minDemResolution:0}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3505],{46851:(t,e,n)=>{n.d(e,{E:()=>a,R:()=>i});const a=1e-6,i=Math.random,o=Math.PI/180,s=180/Math.PI;Object.freeze({__proto__:null,EPSILON:a,RANDOM:i,toRadian:function(t){return t*o},toDegree:function(t){return t*s},equals:function(t,e){return Math.abs(t-e)<=a*Math.max(1,Math.abs(t),Math.abs(e))}})},52138:(t,e,n)=>{n.d(e,{a:()=>l,d:()=>d,e:()=>f,f:()=>m,h:()=>h,i:()=>s,j:()=>u,m:()=>c,p:()=>b,s:()=>o,t:()=>r,u:()=>p,v:()=>T,w:()=>g,y:()=>M});var a=n(65617),i=n(46851);function o(t,e,n,a,i,o,s,r,l,c,u,h,f,m,p,d,M){return t[0]=e,t[1]=n,t[2]=a,t[3]=i,t[4]=o,t[5]=s,t[6]=r,t[7]=l,t[8]=c,t[9]=u,t[10]=h,t[11]=f,t[12]=m,t[13]=p,t[14]=d,t[15]=M,t}function s(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function r(t,e){if(t===e){const n=e[1],a=e[2],i=e[3],o=e[6],s=e[7],r=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=a,t[9]=o,t[11]=e[14],t[12]=i,t[13]=s,t[14]=r}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function l(t,e){const n=e[0],a=e[1],i=e[2],o=e[3],s=e[4],r=e[5],l=e[6],c=e[7],u=e[8],h=e[9],f=e[10],m=e[11],p=e[12],d=e[13],M=e[14],y=e[15],x=n*r-a*s,v=n*l-i*s,g=n*c-o*s,T=a*l-i*r,b=a*c-o*r,w=i*c-o*l,R=u*d-h*p,_=u*M-f*p,E=u*y-m*p,q=h*M-f*d,I=h*y-m*d,A=f*y-m*M;let D=x*A-v*I+g*q+T*E-b*_+w*R;return D?(D=1/D,t[0]=(r*A-l*I+c*q)*D,t[1]=(i*I-a*A-o*q)*D,t[2]=(d*w-M*b+y*T)*D,t[3]=(f*b-h*w-m*T)*D,t[4]=(l*E-s*A-c*_)*D,t[5]=(n*A-i*E+o*_)*D,t[6]=(M*g-p*w-y*v)*D,t[7]=(u*w-f*g+m*v)*D,t[8]=(s*I-r*E+c*R)*D,t[9]=(a*E-n*I-o*R)*D,t[10]=(p*b-d*g+y*x)*D,t[11]=(h*g-u*b-m*x)*D,t[12]=(r*_-s*q-l*R)*D,t[13]=(n*q-a*_+i*R)*D,t[14]=(d*v-p*T-M*x)*D,t[15]=(u*T-h*v+f*x)*D,t):null}function c(t,e,n){const a=e[0],i=e[1],o=e[2],s=e[3],r=e[4],l=e[5],c=e[6],u=e[7],h=e[8],f=e[9],m=e[10],p=e[11],d=e[12],M=e[13],y=e[14],x=e[15];let v=n[0],g=n[1],T=n[2],b=n[3];return t[0]=v*a+g*r+T*h+b*d,t[1]=v*i+g*l+T*f+b*M,t[2]=v*o+g*c+T*m+b*y,t[3]=v*s+g*u+T*p+b*x,v=n[4],g=n[5],T=n[6],b=n[7],t[4]=v*a+g*r+T*h+b*d,t[5]=v*i+g*l+T*f+b*M,t[6]=v*o+g*c+T*m+b*y,t[7]=v*s+g*u+T*p+b*x,v=n[8],g=n[9],T=n[10],b=n[11],t[8]=v*a+g*r+T*h+b*d,t[9]=v*i+g*l+T*f+b*M,t[10]=v*o+g*c+T*m+b*y,t[11]=v*s+g*u+T*p+b*x,v=n[12],g=n[13],T=n[14],b=n[15],t[12]=v*a+g*r+T*h+b*d,t[13]=v*i+g*l+T*f+b*M,t[14]=v*o+g*c+T*m+b*y,t[15]=v*s+g*u+T*p+b*x,t}function u(t,e,n){const a=n[0],i=n[1],o=n[2];let s,r,l,c,u,h,f,m,p,d,M,y;return e===t?(t[12]=e[0]*a+e[4]*i+e[8]*o+e[12],t[13]=e[1]*a+e[5]*i+e[9]*o+e[13],t[14]=e[2]*a+e[6]*i+e[10]*o+e[14],t[15]=e[3]*a+e[7]*i+e[11]*o+e[15]):(s=e[0],r=e[1],l=e[2],c=e[3],u=e[4],h=e[5],f=e[6],m=e[7],p=e[8],d=e[9],M=e[10],y=e[11],t[0]=s,t[1]=r,t[2]=l,t[3]=c,t[4]=u,t[5]=h,t[6]=f,t[7]=m,t[8]=p,t[9]=d,t[10]=M,t[11]=y,t[12]=s*a+u*i+p*o+e[12],t[13]=r*a+h*i+d*o+e[13],t[14]=l*a+f*i+M*o+e[14],t[15]=c*a+m*i+y*o+e[15]),t}function h(t,e,n){const a=n[0],i=n[1],o=n[2];return t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t[3]=e[3]*a,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function f(t,e,n,a){let o,s,r,l,c,u,h,f,m,p,d,M,y,x,v,g,T,b,w,R,_,E,q,I,A=a[0],D=a[1],z=a[2],C=Math.sqrt(A*A+D*D+z*z);return C<i.E?null:(C=1/C,A*=C,D*=C,z*=C,o=Math.sin(n),s=Math.cos(n),r=1-s,l=e[0],c=e[1],u=e[2],h=e[3],f=e[4],m=e[5],p=e[6],d=e[7],M=e[8],y=e[9],x=e[10],v=e[11],g=A*A*r+s,T=D*A*r+z*o,b=z*A*r-D*o,w=A*D*r-z*o,R=D*D*r+s,_=z*D*r+A*o,E=A*z*r+D*o,q=D*z*r-A*o,I=z*z*r+s,t[0]=l*g+f*T+M*b,t[1]=c*g+m*T+y*b,t[2]=u*g+p*T+x*b,t[3]=h*g+d*T+v*b,t[4]=l*w+f*R+M*_,t[5]=c*w+m*R+y*_,t[6]=u*w+p*R+x*_,t[7]=h*w+d*R+v*_,t[8]=l*E+f*q+M*I,t[9]=c*E+m*q+y*I,t[10]=u*E+p*q+x*I,t[11]=h*E+d*q+v*I,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function m(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function p(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function d(t,e,n){let a,o,s,r=n[0],l=n[1],c=n[2],u=Math.sqrt(r*r+l*l+c*c);return u<i.E?null:(u=1/u,r*=u,l*=u,c*=u,a=Math.sin(e),o=Math.cos(e),s=1-o,t[0]=r*r*s+o,t[1]=l*r*s+c*a,t[2]=c*r*s-l*a,t[3]=0,t[4]=r*l*s-c*a,t[5]=l*l*s+o,t[6]=c*l*s+r*a,t[7]=0,t[8]=r*c*s+l*a,t[9]=l*c*s-r*a,t[10]=c*c*s+o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function M(t,e){const n=Math.sin(e),a=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function y(t,e,n){const a=e[0],i=e[1],o=e[2],s=e[3],r=a+a,l=i+i,c=o+o,u=a*r,h=a*l,f=a*c,m=i*l,p=i*c,d=o*c,M=s*r,y=s*l,x=s*c;return t[0]=1-(m+d),t[1]=h+x,t[2]=f-y,t[3]=0,t[4]=h-x,t[5]=1-(u+d),t[6]=p+M,t[7]=0,t[8]=f+y,t[9]=p-M,t[10]=1-(u+m),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}const x=(0,a.c)();function v(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function g(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function T(t,e){if(t===e)return!0;const n=t[0],a=t[1],o=t[2],s=t[3],r=t[4],l=t[5],c=t[6],u=t[7],h=t[8],f=t[9],m=t[10],p=t[11],d=t[12],M=t[13],y=t[14],x=t[15],v=e[0],g=e[1],T=e[2],b=e[3],w=e[4],R=e[5],_=e[6],E=e[7],q=e[8],I=e[9],A=e[10],D=e[11],z=e[12],C=e[13],Z=e[14],S=e[15];return Math.abs(n-v)<=i.E*Math.max(1,Math.abs(n),Math.abs(v))&&Math.abs(a-g)<=i.E*Math.max(1,Math.abs(a),Math.abs(g))&&Math.abs(o-T)<=i.E*Math.max(1,Math.abs(o),Math.abs(T))&&Math.abs(s-b)<=i.E*Math.max(1,Math.abs(s),Math.abs(b))&&Math.abs(r-w)<=i.E*Math.max(1,Math.abs(r),Math.abs(w))&&Math.abs(l-R)<=i.E*Math.max(1,Math.abs(l),Math.abs(R))&&Math.abs(c-_)<=i.E*Math.max(1,Math.abs(c),Math.abs(_))&&Math.abs(u-E)<=i.E*Math.max(1,Math.abs(u),Math.abs(E))&&Math.abs(h-q)<=i.E*Math.max(1,Math.abs(h),Math.abs(q))&&Math.abs(f-I)<=i.E*Math.max(1,Math.abs(f),Math.abs(I))&&Math.abs(m-A)<=i.E*Math.max(1,Math.abs(m),Math.abs(A))&&Math.abs(p-D)<=i.E*Math.max(1,Math.abs(p),Math.abs(D))&&Math.abs(d-z)<=i.E*Math.max(1,Math.abs(d),Math.abs(z))&&Math.abs(M-C)<=i.E*Math.max(1,Math.abs(M),Math.abs(C))&&Math.abs(y-Z)<=i.E*Math.max(1,Math.abs(y),Math.abs(Z))&&Math.abs(x-S)<=i.E*Math.max(1,Math.abs(x),Math.abs(S))}function b(t){const e=i.E,n=t[0],a=t[1],o=t[2],s=t[4],r=t[5],l=t[6],c=t[8],u=t[9],h=t[10];return Math.abs(1-(n*n+s*s+c*c))<=e&&Math.abs(1-(a*a+r*r+u*u))<=e&&Math.abs(1-(o*o+l*l+h*h))<=e}const w=c,R=v;Object.freeze({__proto__:null,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},set:o,identity:s,transpose:r,invert:l,adjoint:function(t,e){const n=e[0],a=e[1],i=e[2],o=e[3],s=e[4],r=e[5],l=e[6],c=e[7],u=e[8],h=e[9],f=e[10],m=e[11],p=e[12],d=e[13],M=e[14],y=e[15];return t[0]=r*(f*y-m*M)-h*(l*y-c*M)+d*(l*m-c*f),t[1]=-(a*(f*y-m*M)-h*(i*y-o*M)+d*(i*m-o*f)),t[2]=a*(l*y-c*M)-r*(i*y-o*M)+d*(i*c-o*l),t[3]=-(a*(l*m-c*f)-r*(i*m-o*f)+h*(i*c-o*l)),t[4]=-(s*(f*y-m*M)-u*(l*y-c*M)+p*(l*m-c*f)),t[5]=n*(f*y-m*M)-u*(i*y-o*M)+p*(i*m-o*f),t[6]=-(n*(l*y-c*M)-s*(i*y-o*M)+p*(i*c-o*l)),t[7]=n*(l*m-c*f)-s*(i*m-o*f)+u*(i*c-o*l),t[8]=s*(h*y-m*d)-u*(r*y-c*d)+p*(r*m-c*h),t[9]=-(n*(h*y-m*d)-u*(a*y-o*d)+p*(a*m-o*h)),t[10]=n*(r*y-c*d)-s*(a*y-o*d)+p*(a*c-o*r),t[11]=-(n*(r*m-c*h)-s*(a*m-o*h)+u*(a*c-o*r)),t[12]=-(s*(h*M-f*d)-u*(r*M-l*d)+p*(r*f-l*h)),t[13]=n*(h*M-f*d)-u*(a*M-i*d)+p*(a*f-i*h),t[14]=-(n*(r*M-l*d)-s*(a*M-i*d)+p*(a*l-i*r)),t[15]=n*(r*f-l*h)-s*(a*f-i*h)+u*(a*l-i*r),t},determinant:function(t){const e=t[0],n=t[1],a=t[2],i=t[3],o=t[4],s=t[5],r=t[6],l=t[7],c=t[8],u=t[9],h=t[10],f=t[11],m=t[12],p=t[13],d=t[14],M=t[15];return(e*s-n*o)*(h*M-f*d)-(e*r-a*o)*(u*M-f*p)+(e*l-i*o)*(u*d-h*p)+(n*r-a*s)*(c*M-f*m)-(n*l-i*s)*(c*d-h*m)+(a*l-i*r)*(c*p-u*m)},multiply:c,translate:u,scale:h,rotate:f,rotateX:function(t,e,n){const a=Math.sin(n),i=Math.cos(n),o=e[4],s=e[5],r=e[6],l=e[7],c=e[8],u=e[9],h=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+c*a,t[5]=s*i+u*a,t[6]=r*i+h*a,t[7]=l*i+f*a,t[8]=c*i-o*a,t[9]=u*i-s*a,t[10]=h*i-r*a,t[11]=f*i-l*a,t},rotateY:function(t,e,n){const a=Math.sin(n),i=Math.cos(n),o=e[0],s=e[1],r=e[2],l=e[3],c=e[8],u=e[9],h=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-c*a,t[1]=s*i-u*a,t[2]=r*i-h*a,t[3]=l*i-f*a,t[8]=o*a+c*i,t[9]=s*a+u*i,t[10]=r*a+h*i,t[11]=l*a+f*i,t},rotateZ:function(t,e,n){const a=Math.sin(n),i=Math.cos(n),o=e[0],s=e[1],r=e[2],l=e[3],c=e[4],u=e[5],h=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+c*a,t[1]=s*i+u*a,t[2]=r*i+h*a,t[3]=l*i+f*a,t[4]=c*i-o*a,t[5]=u*i-s*a,t[6]=h*i-r*a,t[7]=f*i-l*a,t},fromTranslation:m,fromScaling:p,fromRotation:d,fromXRotation:M,fromYRotation:function(t,e){const n=Math.sin(e),a=Math.cos(e);return t[0]=a,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){const n=Math.sin(e),a=Math.cos(e);return t[0]=a,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotationTranslation:y,fromQuat2:function(t,e){const n=x,a=-e[0],i=-e[1],o=-e[2],s=e[3],r=e[4],l=e[5],c=e[6],u=e[7],h=a*a+i*i+o*o+s*s;return h>0?(n[0]=2*(r*s+u*a+l*o-c*i)/h,n[1]=2*(l*s+u*i+c*a-r*o)/h,n[2]=2*(c*s+u*o+r*i-l*a)/h):(n[0]=2*(r*s+u*a+l*o-c*i),n[1]=2*(l*s+u*i+c*a-r*o),n[2]=2*(c*s+u*o+r*i-l*a)),y(t,e,n),t},getTranslation:function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},getScaling:function(t,e){const n=e[0],a=e[1],i=e[2],o=e[4],s=e[5],r=e[6],l=e[8],c=e[9],u=e[10];return t[0]=Math.sqrt(n*n+a*a+i*i),t[1]=Math.sqrt(o*o+s*s+r*r),t[2]=Math.sqrt(l*l+c*c+u*u),t},getRotation:function(t,e){const n=e[0]+e[5]+e[10];let a=0;return n>0?(a=2*Math.sqrt(n+1),t[3]=.25*a,t[0]=(e[6]-e[9])/a,t[1]=(e[8]-e[2])/a,t[2]=(e[1]-e[4])/a):e[0]>e[5]&&e[0]>e[10]?(a=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/a,t[0]=.25*a,t[1]=(e[1]+e[4])/a,t[2]=(e[8]+e[2])/a):e[5]>e[10]?(a=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/a,t[0]=(e[1]+e[4])/a,t[1]=.25*a,t[2]=(e[6]+e[9])/a):(a=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/a,t[0]=(e[8]+e[2])/a,t[1]=(e[6]+e[9])/a,t[2]=.25*a),t},fromRotationTranslationScale:function(t,e,n,a){const i=e[0],o=e[1],s=e[2],r=e[3],l=i+i,c=o+o,u=s+s,h=i*l,f=i*c,m=i*u,p=o*c,d=o*u,M=s*u,y=r*l,x=r*c,v=r*u,g=a[0],T=a[1],b=a[2];return t[0]=(1-(p+M))*g,t[1]=(f+v)*g,t[2]=(m-x)*g,t[3]=0,t[4]=(f-v)*T,t[5]=(1-(h+M))*T,t[6]=(d+y)*T,t[7]=0,t[8]=(m+x)*b,t[9]=(d-y)*b,t[10]=(1-(h+p))*b,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:function(t,e,n,a,i){const o=e[0],s=e[1],r=e[2],l=e[3],c=o+o,u=s+s,h=r+r,f=o*c,m=o*u,p=o*h,d=s*u,M=s*h,y=r*h,x=l*c,v=l*u,g=l*h,T=a[0],b=a[1],w=a[2],R=i[0],_=i[1],E=i[2],q=(1-(d+y))*T,I=(m+g)*T,A=(p-v)*T,D=(m-g)*b,z=(1-(f+y))*b,C=(M+x)*b,Z=(p+v)*w,S=(M-x)*w,F=(1-(f+d))*w;return t[0]=q,t[1]=I,t[2]=A,t[3]=0,t[4]=D,t[5]=z,t[6]=C,t[7]=0,t[8]=Z,t[9]=S,t[10]=F,t[11]=0,t[12]=n[0]+R-(q*R+D*_+Z*E),t[13]=n[1]+_-(I*R+z*_+S*E),t[14]=n[2]+E-(A*R+C*_+F*E),t[15]=1,t},fromQuat:function(t,e){const n=e[0],a=e[1],i=e[2],o=e[3],s=n+n,r=a+a,l=i+i,c=n*s,u=a*s,h=a*r,f=i*s,m=i*r,p=i*l,d=o*s,M=o*r,y=o*l;return t[0]=1-h-p,t[1]=u+y,t[2]=f-M,t[3]=0,t[4]=u-y,t[5]=1-c-p,t[6]=m+d,t[7]=0,t[8]=f+M,t[9]=m-d,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},frustum:function(t,e,n,a,i,o,s){const r=1/(n-e),l=1/(i-a),c=1/(o-s);return t[0]=2*o*r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*l,t[6]=0,t[7]=0,t[8]=(n+e)*r,t[9]=(i+a)*l,t[10]=(s+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=s*o*2*c,t[15]=0,t},perspective:function(t,e,n,a,i){const o=1/Math.tan(e/2);let s;return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(s=1/(a-i),t[10]=(i+a)*s,t[14]=2*i*a*s):(t[10]=-1,t[14]=-2*a),t},perspectiveFromFieldOfView:function(t,e,n,a){const i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),s=Math.tan(e.leftDegrees*Math.PI/180),r=Math.tan(e.rightDegrees*Math.PI/180),l=2/(s+r),c=2/(i+o);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(s-r)*l*.5,t[9]=(i-o)*c*.5,t[10]=a/(n-a),t[11]=-1,t[12]=0,t[13]=0,t[14]=a*n/(n-a),t[15]=0,t},ortho:function(t,e,n,a,i,o,s){const r=1/(e-n),l=1/(a-i),c=1/(o-s);return t[0]=-2*r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*r,t[13]=(i+a)*l,t[14]=(s+o)*c,t[15]=1,t},lookAt:function(t,e,n,a){let o,r,l,c,u,h,f,m,p,d;const M=e[0],y=e[1],x=e[2],v=a[0],g=a[1],T=a[2],b=n[0],w=n[1],R=n[2];return Math.abs(M-b)<i.E&&Math.abs(y-w)<i.E&&Math.abs(x-R)<i.E?s(t):(f=M-b,m=y-w,p=x-R,d=1/Math.sqrt(f*f+m*m+p*p),f*=d,m*=d,p*=d,o=g*p-T*m,r=T*f-v*p,l=v*m-g*f,d=Math.sqrt(o*o+r*r+l*l),d?(d=1/d,o*=d,r*=d,l*=d):(o=0,r=0,l=0),c=m*l-p*r,u=p*o-f*l,h=f*r-m*o,d=Math.sqrt(c*c+u*u+h*h),d?(d=1/d,c*=d,u*=d,h*=d):(c=0,u=0,h=0),t[0]=o,t[1]=c,t[2]=f,t[3]=0,t[4]=r,t[5]=u,t[6]=m,t[7]=0,t[8]=l,t[9]=h,t[10]=p,t[11]=0,t[12]=-(o*M+r*y+l*x),t[13]=-(c*M+u*y+h*x),t[14]=-(f*M+m*y+p*x),t[15]=1,t)},targetTo:function(t,e,n,a){const i=e[0],o=e[1],s=e[2],r=a[0],l=a[1],c=a[2];let u=i-n[0],h=o-n[1],f=s-n[2],m=u*u+h*h+f*f;m>0&&(m=1/Math.sqrt(m),u*=m,h*=m,f*=m);let p=l*f-c*h,d=c*u-r*f,M=r*h-l*u;return m=p*p+d*d+M*M,m>0&&(m=1/Math.sqrt(m),p*=m,d*=m,M*=m),t[0]=p,t[1]=d,t[2]=M,t[3]=0,t[4]=h*M-f*d,t[5]=f*p-u*M,t[6]=u*d-h*p,t[7]=0,t[8]=u,t[9]=h,t[10]=f,t[11]=0,t[12]=i,t[13]=o,t[14]=s,t[15]=1,t},str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},subtract:v,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,a){return t[0]=e[0]+n[0]*a,t[1]=e[1]+n[1]*a,t[2]=e[2]+n[2]*a,t[3]=e[3]+n[3]*a,t[4]=e[4]+n[4]*a,t[5]=e[5]+n[5]*a,t[6]=e[6]+n[6]*a,t[7]=e[7]+n[7]*a,t[8]=e[8]+n[8]*a,t[9]=e[9]+n[9]*a,t[10]=e[10]+n[10]*a,t[11]=e[11]+n[11]*a,t[12]=e[12]+n[12]*a,t[13]=e[13]+n[13]*a,t[14]=e[14]+n[14]*a,t[15]=e[15]+n[15]*a,t},exactEquals:g,equals:T,isOrthoNormal:b,mul:w,sub:R})},17896:(t,e,n)=>{n.d(e,{E:()=>h,a:()=>f,b:()=>l,c:()=>x,d:()=>y,e:()=>v,f:()=>c,g:()=>s,h:()=>p,i:()=>m,k:()=>_,l:()=>o,m:()=>g,n:()=>M,p:()=>d,q:()=>b,r:()=>E,s:()=>r,t:()=>T,u:()=>C});var a=n(65617),i=n(46851);function o(t){const e=t[0],n=t[1],a=t[2];return Math.sqrt(e*e+n*n+a*a)}function s(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function r(t,e,n,a){return t[0]=e,t[1]=n,t[2]=a,t}function l(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function c(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function u(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function h(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function f(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function m(t,e){const n=e[0]-t[0],a=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+a*a+i*i)}function p(t,e){const n=e[0]-t[0],a=e[1]-t[1],i=e[2]-t[2];return n*n+a*a+i*i}function d(t){const e=t[0],n=t[1],a=t[2];return e*e+n*n+a*a}function M(t,e){const n=e[0],a=e[1],i=e[2];let o=n*n+a*a+i*i;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function y(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function x(t,e,n){const a=e[0],i=e[1],o=e[2],s=n[0],r=n[1],l=n[2];return t[0]=i*l-o*r,t[1]=o*s-a*l,t[2]=a*r-i*s,t}function v(t,e,n,a){const i=e[0],o=e[1],s=e[2];return t[0]=i+a*(n[0]-i),t[1]=o+a*(n[1]-o),t[2]=s+a*(n[2]-s),t}function g(t,e,n){const a=e[0],i=e[1],o=e[2];return t[0]=n[0]*a+n[4]*i+n[8]*o+n[12],t[1]=n[1]*a+n[5]*i+n[9]*o+n[13],t[2]=n[2]*a+n[6]*i+n[10]*o+n[14],t}function T(t,e,n){const a=e[0],i=e[1],o=e[2];return t[0]=a*n[0]+i*n[3]+o*n[6],t[1]=a*n[1]+i*n[4]+o*n[7],t[2]=a*n[2]+i*n[5]+o*n[8],t}function b(t,e,n){const a=n[0],i=n[1],o=n[2],s=n[3],r=e[0],l=e[1],c=e[2];let u=i*c-o*l,h=o*r-a*c,f=a*l-i*r,m=i*f-o*h,p=o*u-a*f,d=a*h-i*u;const M=2*s;return u*=M,h*=M,f*=M,m*=2,p*=2,d*=2,t[0]=r+u+m,t[1]=l+h+p,t[2]=c+f+d,t}const w=(0,a.c)(),R=(0,a.c)();function _(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function E(t,e,n){const a=n[0]-e[0],i=n[1]-e[1],o=n[2]-e[2];let s=a*a+i*i+o*o;return s>0?(s=1/Math.sqrt(s),t[0]=a*s,t[1]=i*s,t[2]=o*s,t):(t[0]=0,t[1]=0,t[2]=0,t)}const q=c,I=u,A=h,D=m,z=p,C=o,Z=d;Object.freeze({__proto__:null,length:o,copy:s,set:r,add:l,subtract:c,multiply:u,divide:h,ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t},max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:f,scaleAndAdd:function(t,e,n,a){return t[0]=e[0]+n[0]*a,t[1]=e[1]+n[1]*a,t[2]=e[2]+n[2]*a,t},distance:m,squaredDistance:p,squaredLength:d,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t},normalize:M,dot:y,cross:x,lerp:v,hermite:function(t,e,n,a,i,o){const s=o*o,r=s*(2*o-3)+1,l=s*(o-2)+o,c=s*(o-1),u=s*(3-2*o);return t[0]=e[0]*r+n[0]*l+a[0]*c+i[0]*u,t[1]=e[1]*r+n[1]*l+a[1]*c+i[1]*u,t[2]=e[2]*r+n[2]*l+a[2]*c+i[2]*u,t},bezier:function(t,e,n,a,i,o){const s=1-o,r=s*s,l=o*o,c=r*s,u=3*o*r,h=3*l*s,f=l*o;return t[0]=e[0]*c+n[0]*u+a[0]*h+i[0]*f,t[1]=e[1]*c+n[1]*u+a[1]*h+i[1]*f,t[2]=e[2]*c+n[2]*u+a[2]*h+i[2]*f,t},random:function(t,e){e=e||1;const n=2*(0,i.R)()*Math.PI,a=2*(0,i.R)()-1,o=Math.sqrt(1-a*a)*e;return t[0]=Math.cos(n)*o,t[1]=Math.sin(n)*o,t[2]=a*e,t},transformMat4:g,transformMat3:T,transformQuat:b,rotateX:function(t,e,n,a){const i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(a)-i[2]*Math.sin(a),o[2]=i[1]*Math.sin(a)+i[2]*Math.cos(a),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},rotateY:function(t,e,n,a){const i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(a)+i[0]*Math.cos(a),o[1]=i[1],o[2]=i[2]*Math.cos(a)-i[0]*Math.sin(a),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},rotateZ:function(t,e,n,a){const i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(a)-i[1]*Math.sin(a),o[1]=i[0]*Math.sin(a)+i[1]*Math.cos(a),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},angle:function(t,e){s(w,t),s(R,e),M(w,w),M(R,R);const n=y(w,R);return n>1?0:n<-1?Math.PI:Math.acos(n)},str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},exactEquals:_,equals:function(t,e){if(t===e)return!0;const n=t[0],a=t[1],o=t[2],s=e[0],r=e[1],l=e[2];return Math.abs(n-s)<=i.E*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(a-r)<=i.E*Math.max(1,Math.abs(a),Math.abs(r))&&Math.abs(o-l)<=i.E*Math.max(1,Math.abs(o),Math.abs(l))},direction:E,sub:q,mul:I,div:A,dist:D,sqrDist:z,len:C,sqrLen:Z})},65617:(t,e,n)=>{function a(){return[0,0,0]}function i(t){return[t[0],t[1],t[2]]}function o(t,e,n){return[t,e,n]}function s(t){const e=[0,0,0],n=Math.min(3,t.length);for(let a=0;a<n;++a)e[a]=t[a];return e}function r(t,e){return new Float64Array(t,e,3)}function l(){return o(1,1,1)}function c(){return o(1,0,0)}function u(){return o(0,1,0)}function h(){return o(0,0,1)}n.d(e,{O:()=>m,Z:()=>f,a:()=>i,b:()=>r,c:()=>a,d:()=>s,f:()=>o});const f=[0,0,0],m=l(),p=c(),d=u(),M=h();Object.freeze({__proto__:null,create:a,clone:i,fromValues:o,fromArray:s,createView:r,zeros:function(){return[0,0,0]},ones:l,unitX:c,unitY:u,unitZ:h,ZEROS:f,ONES:m,UNIT_X:p,UNIT_Y:d,UNIT_Z:M})},98766:(t,e,n)=>{n.d(e,{a:()=>s,b:()=>u,c:()=>i,d:()=>M,e:()=>m,f:()=>p,g:()=>x,h:()=>v,l:()=>y,n:()=>d,s:()=>o});var a=n(46851);function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function o(t,e,n,a,i){return t[0]=e,t[1]=n,t[2]=a,t[3]=i,t}function s(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}function r(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}function l(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t}function c(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t}function u(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}function h(t,e){const n=e[0]-t[0],a=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return Math.sqrt(n*n+a*a+i*i+o*o)}function f(t,e){const n=e[0]-t[0],a=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return n*n+a*a+i*i+o*o}function m(t){const e=t[0],n=t[1],a=t[2],i=t[3];return Math.sqrt(e*e+n*n+a*a+i*i)}function p(t){const e=t[0],n=t[1],a=t[2],i=t[3];return e*e+n*n+a*a+i*i}function d(t,e){const n=e[0],a=e[1],i=e[2],o=e[3];let s=n*n+a*a+i*i+o*o;return s>0&&(s=1/Math.sqrt(s),t[0]=n*s,t[1]=a*s,t[2]=i*s,t[3]=o*s),t}function M(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function y(t,e,n,a){const i=e[0],o=e[1],s=e[2],r=e[3];return t[0]=i+a*(n[0]-i),t[1]=o+a*(n[1]-o),t[2]=s+a*(n[2]-s),t[3]=r+a*(n[3]-r),t}function x(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function v(t,e){const n=t[0],i=t[1],o=t[2],s=t[3],r=e[0],l=e[1],c=e[2],u=e[3];return Math.abs(n-r)<=a.E*Math.max(1,Math.abs(n),Math.abs(r))&&Math.abs(i-l)<=a.E*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(o-c)<=a.E*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(s-u)<=a.E*Math.max(1,Math.abs(s),Math.abs(u))}const g=r,T=l,b=c,w=h,R=f,_=m,E=p;Object.freeze({__proto__:null,copy:i,set:o,add:s,subtract:r,multiply:l,divide:c,ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t[3]=Math.ceil(e[3]),t},floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t[3]=Math.floor(e[3]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t},max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t[3]=Math.round(e[3]),t},scale:u,scaleAndAdd:function(t,e,n,a){return t[0]=e[0]+n[0]*a,t[1]=e[1]+n[1]*a,t[2]=e[2]+n[2]*a,t[3]=e[3]+n[3]*a,t},distance:h,squaredDistance:f,length:m,squaredLength:p,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t},normalize:d,dot:M,lerp:y,random:function(t,e){let n,i,o,s,r,l;e=e||1;do{n=2*(0,a.R)()-1,i=2*(0,a.R)()-1,r=n*n+i*i}while(r>=1);do{o=2*(0,a.R)()-1,s=2*(0,a.R)()-1,l=o*o+s*s}while(l>=1);const c=Math.sqrt((1-r)/l);return t[0]=e*n,t[1]=e*i,t[2]=e*o*c,t[3]=e*s*c,t},transformMat4:function(t,e,n){const a=e[0],i=e[1],o=e[2],s=e[3];return t[0]=n[0]*a+n[4]*i+n[8]*o+n[12]*s,t[1]=n[1]*a+n[5]*i+n[9]*o+n[13]*s,t[2]=n[2]*a+n[6]*i+n[10]*o+n[14]*s,t[3]=n[3]*a+n[7]*i+n[11]*o+n[15]*s,t},transformQuat:function(t,e,n){const a=e[0],i=e[1],o=e[2],s=n[0],r=n[1],l=n[2],c=n[3],u=c*a+r*o-l*i,h=c*i+l*a-s*o,f=c*o+s*i-r*a,m=-s*a-r*i-l*o;return t[0]=u*c+m*-s+h*-l-f*-r,t[1]=h*c+m*-r+f*-s-u*-l,t[2]=f*c+m*-l+u*-r-h*-s,t[3]=e[3],t},str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},exactEquals:x,equals:v,sub:g,mul:T,div:b,dist:w,sqrDist:R,len:_,sqrLen:E})},22021:(t,e,n)=>{n.d(e,{ZF:()=>f,Kt:()=>m,jE:()=>M,uZ:()=>s,oK:()=>p,Vl:()=>u,wt:()=>r,t7:()=>c,Sf:()=>o,fp:()=>l,BV:()=>h});var a=n(17896);n(98766);const i=new Float32Array(1);function o(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function s(t,e,n){return Math.min(Math.max(t,e),n)}function r(t){return 0==(t&t-1)}function l(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,++t}function c(t,e,n){return t+(e-t)*n}function u(t){return t*Math.PI/180}function h(t){return 180*t/Math.PI}function f(t){return Math.acos(s(t,-1,1))}function m(t){return Math.asin(s(t,-1,1))}function p(t){return d(Math.max(-y,Math.min(t,y)))}function d(t){return i[0]=t,i[0]}function M(t,e){const n=(0,a.l)(t),i=m(t[2]/n),o=Math.atan2(t[1]/n,t[0]/n);return(0,a.s)(e,n,i,o),e}const y=d(34028234663852886e22)},69285:(t,e,n)=>{n.d(e,{k:()=>s});var a=n(70586),i=n(67900),o=n(8744);function s(t,e,n){if((0,a.Wi)(e)||(0,a.Wi)(n)||n.vcsWkid||(0,o.fS)(e,n))return null;const s=(0,i._R)(e)/(0,i._R)(n);if(1===s)return null;switch(t){case"point":case"esriGeometryPoint":return t=>function(t,e){t&&null!=t.z&&(t.z*=e)}(t,s);case"polyline":case"esriGeometryPolyline":return t=>function(t,e){if(t)for(const n of t.paths)for(const t of n)t.length>2&&(t[2]*=e)}(t,s);case"polygon":case"esriGeometryPolygon":return t=>function(t,e){if(t)for(const n of t.rings)for(const t of n)t.length>2&&(t[2]*=e)}(t,s);case"multipoint":case"esriGeometryMultipoint":return t=>function(t,e){if(t)for(const n of t.points)n.length>2&&(n[2]*=e)}(t,s);case"extent":case"esriGeometryExtent":return t=>function(t,e){t&&null!=t.zmin&&null!=t.zmax&&(t.zmin*=e,t.zmax*=e)}(t,s);default:return null}}},33127:(t,e,n)=>{n.r(e),n.d(e,{ElevationQuery:()=>_,GeometryDescriptor:()=>E,default:()=>_,getFinestLodIndex:()=>D});var a=n(66643),i=n(20102),o=n(70586),s=n(95330),r=n(67900),l=n(65091),c=n(13473),u=n(58901),h=n(44547),f=n(24470),m=(n(66577),n(80442),n(92604)),p=n(54102),d=n(40488);const M=m.Z.getLogger("esri.layers.support.ElevationSampler");class y{queryElevation(t){return function(t,e){const n=g(t,e.spatialReference);if(!n)return null;switch(t.type){case"point":!function(t,e,n){t.z=(0,o.Pt)(n.elevationAt(e),0)}(t,n,e);break;case"polyline":!function(t,e,n){T.spatialReference=e.spatialReference;const a=t.hasM&&!t.hasZ;for(let i=0;i<t.paths.length;i++){const s=t.paths[i],r=e.paths[i];for(let t=0;t<s.length;t++){const e=s[t],i=r[t];T.x=i[0],T.y=i[1],a&&(e[3]=e[2]),e[2]=(0,o.Pt)(n.elevationAt(T),0)}}t.hasZ=!0}(t,n,e);break;case"multipoint":!function(t,e,n){T.spatialReference=e.spatialReference;const a=t.hasM&&!t.hasZ;for(let i=0;i<t.points.length;i++){const s=t.points[i],r=e.points[i];T.x=r[0],T.y=r[1],a&&(s[3]=s[2]),s[2]=(0,o.Pt)(n.elevationAt(T),0)}t.hasZ=!0}(t,n,e)}return t}(t.clone(),this)}on(){return b}projectIfRequired(t,e){return g(t,e)}}class x extends y{constructor(t,e,n){super(),this.tile=t,this.noDataValue=n,this.extent=(0,f.HH)(t.tile.extent,e.spatialReference);const a=(0,r.c9)(e.spatialReference),i=e.lodAt(t.tile.level).resolution*a;this.demResolution={min:i,max:i}}get spatialReference(){return this.extent.spatialReference}contains(t){const e=this.projectIfRequired(t,this.spatialReference);return(0,p.aV)(this.extent,e)}elevationAt(t){const e=this.projectIfRequired(t,this.spatialReference);if((0,o.Wi)(e))return null;if(!this.contains(t)){const e=this.extent,n=`${e.xmin}, ${e.ymin}, ${e.xmax}, ${e.ymax}`;return M.warn("#elevationAt()",`Point used to sample elevation (${t.x}, ${t.y}) is outside of the sampler extent (${n})`),this.noDataValue}return this.tile.sample(e.x,e.y)}}class v extends y{constructor(t,e,n){let a;super(),"number"==typeof e?(this.noDataValue=e,a=null):(a=e,this.noDataValue=n),this.samplers=a?t.map((t=>new x(t,a,this.noDataValue))):t;const i=this.samplers[0];if(i){this.extent=i.extent.clone();const{min:t,max:e}=i.demResolution;this.demResolution={min:t,max:e};for(let t=1;t<this.samplers.length;t++){const e=this.samplers[t];this.extent.union(e.extent),this.demResolution.min=Math.min(this.demResolution.min,e.demResolution.min),this.demResolution.max=Math.max(this.demResolution.max,e.demResolution.max)}}else this.extent=(0,f.HH)((0,f.Ue)(),a.spatialReference),this.demResolution={min:0,max:0}}get spatialReference(){return this.extent.spatialReference}elevationAt(t){const e=this.projectIfRequired(t,this.spatialReference);if(!e)return null;for(const t of this.samplers)if(t.contains(e))return t.elevationAt(e);return M.warn("#elevationAt()",`Point used to sample elevation (${t.x}, ${t.y}) is outside of the sampler`),this.noDataValue}}function g(t,e){if((0,o.Wi)(t))return null;const n=t.spatialReference;if(n.equals(e))return t;const a=(0,d.iV)(t,e);return a||M.error(`Cannot project geometry spatial reference (wkid:${n.wkid}) to elevation sampler spatial reference (wkid:${e.wkid})`),a}const T=new c.Z,b={remove(){}};class w{constructor(t,e=null){if(this.tile=t,(0,o.pC)(e)){const n=t.extent;this.samplerData={pixelData:e.values,width:e.width,height:e.height,safeWidth:.99999999*(e.width-1),noDataValue:e.noDataValue,dx:(e.width-1)/(n[2]-n[0]),dy:(e.width-1)/(n[3]-n[1]),x0:n[0],y1:n[3]}}}sample(t,e){if((0,o.Wi)(this.samplerData))return;const{safeWidth:n,width:a,pixelData:i,noDataValue:s,dx:r,dy:l,y1:c,x0:u}=this.samplerData,h=R(l*(c-e),0,n),f=R(r*(t-u),0,n),m=Math.floor(h),p=Math.floor(f),d=m*a+p,M=d+a,y=i[d],x=i[M],v=i[d+1],g=i[M+1];if(y!==s&&x!==s&&v!==s&&g!==s){const t=f-p,e=y+(v-y)*t;return e+(x+(g-x)*t-e)*(h-m)}}}function R(t,e,n){return t<e?e:t>n?n:t}class _{async queryAll(t,e,n){if(!(t=n&&n.ignoreInvisibleLayers?t.filter((t=>t.visible)):t.slice()).length)throw new i.Z("elevation-query:invalid-layer","Elevation queries require at least one elevation layer to fetch tiles from");const a=E.fromGeometry(e);let o=!1;n&&n.returnSampleInfo||(o=!0);const s={...z,...n,returnSampleInfo:!0},r=await this.query(t[t.length-1],a,s),l=await this._queryAllContinue(t,r,s);return l.geometry=l.geometry.export(),o&&delete l.sampleInfo,l}async query(t,e,n){if(!t)throw new i.Z("elevation-query:invalid-layer","Elevation queries require an elevation layer to fetch tiles from");if(!e||!(e instanceof E)&&"point"!==e.type&&"multipoint"!==e.type&&"polyline"!==e.type)throw new i.Z("elevation-query:invalid-geometry","Only point, polyline and multipoint geometries can be used to query elevation");const a={...z,...n},o=new I(t,e.spatialReference,a),s=a.signal;return await t.load({signal:s}),await this._createGeometryDescriptor(o,e,s),await this._selectTiles(o,s),await this._populateElevationTiles(o,s),this._sampleGeometryWithElevation(o),this._createQueryResult(o,s)}async createSampler(t,e,n){if(!t)throw new i.Z("elevation-query:invalid-layer","Elevation queries require an elevation layer to fetch tiles from");if(!e||"extent"!==e.type)throw new i.Z("elevation-query:invalid-extent","Invalid or undefined extent");const a={...z,...n};return this._createSampler(t,e,a)}async createSamplerAll(t,e,n){if(!(t=n&&n.ignoreInvisibleLayers?t.filter((t=>t.visible)):t.slice()).length)throw new i.Z("elevation-query:invalid-layer","Elevation queries require at least one elevation layer to fetch tiles from");if(!e||"extent"!==e.type)throw new i.Z("elevation-query:invalid-extent","Invalid or undefined extent");const a={...z,...n,returnSampleInfo:!0},o=await this._createSampler(t[t.length-1],e,a);return this._createSamplerAllContinue(t,e,o,a)}async _createSampler(t,e,n,a){const i=n.signal;await t.load({signal:i});const o=e.spatialReference,s=t.tileInfo.spatialReference;o.equals(s)||(await(0,h.iQ)([{source:o,dest:s}],{signal:i}),e=(0,h.iV)(e,s));const r=new A(t,e,n,a);return await this._selectTiles(r,i),await this._populateElevationTiles(r,i),new v(r.elevationTiles,r.layer.tileInfo,r.options.noDataValue)}async _createSamplerAllContinue(t,e,n,a){if(t.pop(),!t.length)return n;const i=n.samplers.map((t=>(0,f.oJ)(t.extent))),o=await this._createSampler(t[t.length-1],e,a,i);if(0===o.samplers.length)return n;const s=n.samplers.concat(o.samplers),r=new v(s,a.noDataValue);return this._createSamplerAllContinue(t,e,r,a)}async _queryAllContinue(t,e,n){const a=t.pop(),i=e.geometry.coordinates,o=[],s=[];for(let n=0;n<i.length;n++){const r=e.sampleInfo[n];r.demResolution>=0?r.source||(r.source=a):t.length&&(o.push(i[n]),s.push(n))}if(!t.length||0===o.length)return e;const r=e.geometry.clone(o),l=await this.query(t[t.length-1],r,n);return s.forEach(((t,n)=>{i[t].z=l.geometry.coordinates[n].z,e.sampleInfo[t].demResolution=l.sampleInfo[n].demResolution})),this._queryAllContinue(t,e,n)}async _createQueryResult(t,e){const n={geometry:(await t.geometry.project(t.outSpatialReference,e)).export(),noDataValue:t.options.noDataValue};return t.options.returnSampleInfo&&(n.sampleInfo=this._extractSampleInfo(t)),t.geometry.coordinates.forEach((t=>{t.tile=null,t.elevationTile=null})),n}async _createGeometryDescriptor(t,e,n){let a;const o=t.layer.tileInfo.spatialReference;if(e instanceof E?a=await e.project(o,n):(await(0,h.iQ)([{source:e.spatialReference,dest:o}],{signal:n}),a=(0,h.iV)(e,o)),!a)throw new i.Z("elevation-query:spatial-reference-mismatch",`Cannot query elevation in '${e.spatialReference.wkid}' on an elevation service in '${o.wkid}'`);t.geometry=E.fromGeometry(a)}async _selectTiles(t,e){const n=t.options.demResolution;if("geometry"===t.type&&this._preselectOutsideLayerExtent(t),"number"==typeof n)this._selectTilesClosestResolution(t);else if("finest-contiguous"===n)await this._selectTilesFinestContiguous(t,e);else{if("auto"!==n)throw new i.Z("elevation-query:invalid-dem-resolution",`Invalid dem resolution value '${n}', expected a number, "finest-contiguous" or "auto"`);await this._selectTilesAuto(t,e)}}_preselectOutsideLayerExtent(t){if((0,o.Wi)(t.layer.fullExtent))return;const e=new w(null);e.sample=()=>t.options.noDataValue,t.outsideExtentTile=e;const n=t.layer.fullExtent;t.geometry.coordinates.forEach((t=>{const a=t.x,i=t.y;(a<n.xmin||a>n.xmax||i<n.ymin||i>n.ymax)&&(t.elevationTile=e)}))}_selectTilesClosestResolution(t){const e=t.layer.tileInfo,n=this._findNearestDemResolutionLODIndex(e,t.options.demResolution);t.selectTilesAtLOD(n)}_findNearestDemResolutionLODIndex(t,e){const n=e/(0,r.c9)(t.spatialReference);let a=t.lods[0],i=0;for(let e=1;e<t.lods.length;e++){const o=t.lods[e];Math.abs(o.resolution-n)<Math.abs(a.resolution-n)&&(a=o,i=e)}return i}async _selectTilesFinestContiguous(t,e){const n=D(t.layer.tileInfo,t.options.minDemResolution);await this._selectTilesFinestContiguousAt(t,n,e)}async _selectTilesFinestContiguousAt(t,e,n){const a=t.layer;if(t.selectTilesAtLOD(e),e<0)return;const o=a.tilemapCache,r=t.getTilesToFetch();try{if(o)await(0,s.Hl)(Promise.all(r.map((t=>o.fetchAvailability(t.level,t.row,t.col,{signal:n})))),n);else if(await this._populateElevationTiles(t,n),!t.allElevationTilesFetched())throw t.clearElevationTiles(),new i.Z("elevation-query:has-unavailable-tiles")}catch(a){(0,s.r9)(a),await this._selectTilesFinestContiguousAt(t,e-1,n)}}async _populateElevationTiles(t,e){const n=t.getTilesToFetch(),a={},i=t.options.cache,r=t.options.noDataValue,l=n.map((async n=>{const s=`${t.layer.uid}:${n.id}:${r}`,l=(0,o.pC)(i)?i.get(s):null,c=(0,o.pC)(l)?l:await t.layer.fetchTile(n.level,n.row,n.col,{noDataValue:r,signal:e});(0,o.pC)(i)&&i.put(s,c),a[n.id]=new w(n,c)}));await(0,s.Hl)((0,s.as)(l),e),t.populateElevationTiles(a)}async _selectTilesAuto(t,e){this._selectTilesAutoFinest(t),this._reduceTilesForMaximumRequests(t);const n=t.layer.tilemapCache;if(!n)return this._selectTilesAutoPrefetchUpsample(t,e);const i=t.getTilesToFetch(),o={},r=i.map((async t=>{const i={id:null,level:0,row:0,col:0,extent:(0,f.Ue)()},r=await(0,a.q6)(n.fetchAvailabilityUpsample(t.level,t.row,t.col,i,{signal:e}));!1===r.ok?(0,s.r9)(r.error):o[t.id]=i}));await(0,s.Hl)(Promise.all(r),e),t.remapTiles(o)}_reduceTilesForMaximumRequests(t){const e=t.layer.tileInfo;let n=0;const a={},i=t=>{t.id in a?a[t.id]++:(a[t.id]=1,n++)},o=t=>{const e=a[t.id];1===e?(delete a[t.id],n--):a[t.id]=e-1};t.forEachTileToFetch(i,o);let s=!0;for(;s&&(s=!1,t.forEachTileToFetch((a=>{n<=t.options.maximumAutoTileRequests||(o(a),e.upsampleTile(a)&&(s=!0),i(a))}),o),s););}_selectTilesAutoFinest(t){const e=D(t.layer.tileInfo,t.options.minDemResolution);t.selectTilesAtLOD(e,t.options.maximumAutoTileRequests)}async _selectTilesAutoPrefetchUpsample(t,e){const n=t.layer.tileInfo;await this._populateElevationTiles(t,e);let a=!1;t.forEachTileToFetch(((t,e)=>{n.upsampleTile(t)?a=!0:e()})),a&&await this._selectTilesAutoPrefetchUpsample(t,e)}_sampleGeometryWithElevation(t){t.geometry.coordinates.forEach((e=>{const n=e.elevationTile;let a=t.options.noDataValue;if(n){const t=n.sample(e.x,e.y);(0,o.pC)(t)?a=t:e.elevationTile=null}e.z=a}))}_extractSampleInfo(t){const e=t.layer.tileInfo,n=(0,r.c9)(e.spatialReference);return t.geometry.coordinates.map((a=>{let i=-1;return a.elevationTile&&a.elevationTile!==t.outsideExtentTile&&(i=e.lodAt(a.elevationTile.tile.level).resolution*n),{demResolution:i}}))}}class E{export(){return this._exporter(this.coordinates,this.spatialReference)}clone(t){const e=new E;return e.geometry=this.geometry,e.spatialReference=this.spatialReference,e.coordinates=t||this.coordinates.map((t=>this._cloneCoordinate(t))),e._exporter=this._exporter,e}async project(t,e){if(this.spatialReference.equals(t))return this.clone();await(0,h.iQ)([{source:this.spatialReference,dest:t}],{signal:e});const n=new l.Z({spatialReference:this.spatialReference,points:this.coordinates.map((t=>[t.x,t.y]))}),a=(0,h.iV)(n,t);if(!a)return null;const i=this.coordinates.map(((t,e)=>{const n=this._cloneCoordinate(t),i=a.points[e];return n.x=i[0],n.y=i[1],n})),o=this.clone(i);return o.spatialReference=t,o}_cloneCoordinate(t){return{x:t.x,y:t.y,z:t.z,m:t.m,tile:null,elevationTile:null}}static fromGeometry(t){const e=new E;if(e.geometry=t,e.spatialReference=t.spatialReference,t instanceof E)e.coordinates=t.coordinates.map((t=>e._cloneCoordinate(t))),e._exporter=(e,n)=>{const a=t.clone(e);return a.spatialReference=n,a};else switch(t.type){case"point":{const n=t,{hasZ:a,hasM:i}=n;e.coordinates=a&&i?[{x:n.x,y:n.y,z:n.z,m:n.m}]:a?[{x:n.x,y:n.y,z:n.z}]:i?[{x:n.x,y:n.y,m:n.m}]:[{x:n.x,y:n.y}],e._exporter=(e,n)=>t.hasM?new c.Z(e[0].x,e[0].y,e[0].z,e[0].m,n):new c.Z(e[0].x,e[0].y,e[0].z,n);break}case"multipoint":{const n=t,{hasZ:a,hasM:i}=n;e.coordinates=a&&i?n.points.map((t=>({x:t[0],y:t[1],z:t[2],m:t[3]}))):a?n.points.map((t=>({x:t[0],y:t[1],z:t[2]}))):i?n.points.map((t=>({x:t[0],y:t[1],m:t[2]}))):n.points.map((t=>({x:t[0],y:t[1]}))),e._exporter=(e,n)=>t.hasM?new l.Z({points:e.map((t=>[t.x,t.y,t.z,t.m])),hasZ:!0,hasM:!0,spatiaReference:n}):new l.Z(e.map((t=>[t.x,t.y,t.z])),n);break}case"polyline":{const n=t,a=[],i=[],{hasZ:o,hasM:s}=t;let r=0;for(const t of n.paths)if(i.push([r,r+t.length]),r+=t.length,o&&s)for(const e of t)a.push({x:e[0],y:e[1],z:e[2],m:e[3]});else if(o)for(const e of t)a.push({x:e[0],y:e[1],z:e[2]});else if(s)for(const e of t)a.push({x:e[0],y:e[1],m:e[2]});else for(const e of t)a.push({x:e[0],y:e[1]});e.coordinates=a,e._exporter=(e,n)=>{const a=t.hasM?e.map((t=>[t.x,t.y,t.z,t.m])):e.map((t=>[t.x,t.y,t.z])),o=i.map((t=>a.slice(t[0],t[1])));return new u.Z({paths:o,hasM:t.hasM,hasZ:!0,spatialReference:n})};break}}return e}}class q{constructor(t,e){this.layer=t,this.options=e}}class I extends q{constructor(t,e,n){super(t,n),this.outSpatialReference=e,this.type="geometry"}selectTilesAtLOD(t){if(t<0)this.geometry.coordinates.forEach((t=>t.tile=null));else{const e=this.layer.tileInfo,n=e.lods[t].level;this.geometry.coordinates.forEach((t=>{t.tile=e.tileAt(n,t.x,t.y)}))}}allElevationTilesFetched(){return!this.geometry.coordinates.some((t=>!t.elevationTile))}clearElevationTiles(){for(const t of this.geometry.coordinates)t.elevationTile!==this.outsideExtentTile&&(t.elevationTile=null)}populateElevationTiles(t){for(const e of this.geometry.coordinates)!e.elevationTile&&e.tile&&(e.elevationTile=t[e.tile.id])}remapTiles(t){for(const e of this.geometry.coordinates)e.tile=t[e.tile.id]}getTilesToFetch(){const t={},e=[];for(const n of this.geometry.coordinates){const a=n.tile;n.elevationTile||!n.tile||t[a.id]||(t[a.id]=a,e.push(a))}return e}forEachTileToFetch(t){for(const e of this.geometry.coordinates)e.tile&&!e.elevationTile&&t(e.tile,(()=>e.tile=null))}}class A extends q{constructor(t,e,n,a){super(t,n),this.type="extent",this.elevationTiles=[],this.candidateTiles=[],this.fetchedCandidates=new Set,this.extent=e.intersection(t.fullExtent),this.maskExtents=a}selectTilesAtLOD(t,e){const n=this._maximumLodForRequests(e),a=Math.min(n,t);a<0?this.candidateTiles.length=0:this._selectCandidateTilesCoveringExtentAt(a)}_maximumLodForRequests(t){const e=this.layer.tileInfo;if(!t)return e.lods.length-1;const n=this.extent;if((0,o.Wi)(n))return-1;for(let a=e.lods.length-1;a>=0;a--){const i=e.lods[a],o=i.resolution*e.size[0],s=i.resolution*e.size[1];if(Math.ceil(n.width/o)*Math.ceil(n.height/s)<=t)return a}return-1}allElevationTilesFetched(){return this.candidateTiles.length===this.elevationTiles.length}clearElevationTiles(){this.elevationTiles.length=0,this.fetchedCandidates.clear()}populateElevationTiles(t){for(const e of this.candidateTiles){const n=t[e.id];n&&(this.fetchedCandidates.add(e),this.elevationTiles.push(n))}}remapTiles(t){this.candidateTiles=this._uniqueNonOverlappingTiles(this.candidateTiles.map((e=>t[e.id])))}getTilesToFetch(){return this.candidateTiles}forEachTileToFetch(t,e){const n=this.candidateTiles;this.candidateTiles=[],n.forEach((n=>{if(this.fetchedCandidates.has(n))return void(e&&e(n));let a=!1;t(n,(()=>a=!0)),a?e&&e(n):this.candidateTiles.push(n)})),this.candidateTiles=this._uniqueNonOverlappingTiles(this.candidateTiles,e)}_uniqueNonOverlappingTiles(t,e){const n={},a=[];for(const i of t)n[i.id]?e&&e(i):(n[i.id]=i,a.push(i));const i=a.sort(((t,e)=>t.level-e.level));return i.filter(((t,n)=>{for(let a=0;a<n;a++)if((0,f.r3)(i[a].extent,t.extent))return e&&e(t),!1;return!0}))}_selectCandidateTilesCoveringExtentAt(t){this.candidateTiles.length=0;const e=this.extent;if((0,o.Wi)(e))return;const n=this.layer.tileInfo,a=n.lods[t],i=n.tileAt(a.level,e.xmin,e.ymin),s=a.resolution*n.size[0],r=a.resolution*n.size[1],l=Math.ceil((e.xmax-i.extent[0])/s),c=Math.ceil((e.ymax-i.extent[1])/r);for(let t=0;t<c;t++)for(let e=0;e<l;e++){const a={id:null,level:i.level,row:i.row-t,col:i.col+e};n.updateTileInfo(a),this._tileIsMasked(a)||this.candidateTiles.push(a)}}_tileIsMasked(t){return!!this.maskExtents&&this.maskExtents.some((e=>(0,f.r3)(e,t.extent)))}}function D(t,e){let n=t.lods.length-1;if(e>0){const a=t.lods.findIndex((t=>t.resolution<e));0===a?n=0:a>0&&(n=a-1)}return n}const z={maximumAutoTileRequests:20,noDataValue:0,returnSampleInfo:!1,demResolution:"auto",minDemResolution:0}}}]);
|