@arcgis/core 4.27.0-rc.3 → 4.27.0-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{0e65e00173b66c7fec2e.js → 09e677ca7532a281d262.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{89001ee8d3f69fa03cc1.js → 0f7ddb063ee0664f2fca.js} +1 -1
  4. package/assets/esri/core/workers/chunks/17ab08f60764244b2cf8.js +1 -0
  5. package/assets/esri/core/workers/chunks/{2446e336b1f7256d4fde.js → 2c587ed66e2586cccb8d.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{00c7b9fb375c9a934158.js → 38c6452dc9cf18e8bca8.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{16db0bc87d87a7313dc4.js → 4806df402845c717c842.js} +1 -1
  8. package/assets/esri/core/workers/chunks/4884432d80e9af947449.js +1 -0
  9. package/assets/esri/core/workers/chunks/588cd91d08cec5207be1.js +1 -0
  10. package/assets/esri/core/workers/chunks/{83e3d104886b48f00397.js → 633c00c02a81397fc8df.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{efb96aefe979a0f5c632.js → 640e8ac3498be30c6614.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{33901eb1574e46abd9af.js → 6c213768715c52625855.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{5e6471dd2a08e66b47d0.js → 6e4940fe3bba014c921b.js} +57 -58
  14. package/assets/esri/core/workers/chunks/{3160af63b860b52db389.js → 6f724f75f85dc3989d60.js} +1 -1
  15. package/assets/esri/core/workers/chunks/8b05fb365336cc42fecc.js +1 -0
  16. package/assets/esri/core/workers/chunks/8eec6da5e862cc33ea2b.js +1 -0
  17. package/assets/esri/core/workers/chunks/90d8f297d9cb359e071d.js +1 -0
  18. package/assets/esri/core/workers/chunks/91785144901dfe56c5e2.js +1 -0
  19. package/assets/esri/core/workers/chunks/{471f6eba213412b82840.js → 927417abea79c955b216.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{adaa9d4239f4e905d011.js → 9d4bd73dd50400e9d328.js} +1 -1
  21. package/assets/esri/core/workers/chunks/a324cc07d486061d0d8e.js +1 -0
  22. package/assets/esri/core/workers/chunks/a40130579791293cefa2.js +1 -0
  23. package/assets/esri/core/workers/chunks/{50f910797c17c3028521.js → a49718c74053314ed741.js} +1 -1
  24. package/assets/esri/core/workers/chunks/ad2891985e0fe45aa8d2.js +1 -0
  25. package/assets/esri/core/workers/chunks/afcba35eea836aea98ca.js +1 -0
  26. package/assets/esri/core/workers/chunks/b3d2e397ea74ebef4423.js +1 -0
  27. package/assets/esri/core/workers/chunks/b5fb9da45cc9dee286f8.js +1 -0
  28. package/assets/esri/core/workers/chunks/b846d4215210aac9f6ef.js +1 -0
  29. package/assets/esri/core/workers/chunks/c7dc821db8c14fec24a7.js +1 -0
  30. package/assets/esri/core/workers/chunks/c9df9a0a4a45f9a53ce9.js +1 -0
  31. package/assets/esri/core/workers/chunks/{45a4041881e6235d73a2.js → d0a9711f48dfa5fee68a.js} +1 -1
  32. package/assets/esri/core/workers/chunks/e23ec4f867c4735eec20.js +1 -0
  33. package/assets/esri/core/workers/chunks/{ff42585e1b1d0c5497af.js → ea16230a0edfc9f756bd.js} +1 -1
  34. package/assets/esri/core/workers/chunks/ef900614353505afb210.js +1 -0
  35. package/assets/esri/themes/base/_View.scss +2 -5
  36. package/assets/esri/themes/base/widgets/_Feature.scss +12 -4
  37. package/assets/esri/themes/dark/main.css +1 -1
  38. package/assets/esri/themes/light/main.css +1 -1
  39. package/assets/esri/themes/light/view.css +1 -1
  40. package/chunks/DefaultMaterial.glsl.js +42 -42
  41. package/chunks/Terrain.glsl.js +7 -7
  42. package/copyright.txt +1 -1
  43. package/geometry/Mesh.js +1 -1
  44. package/geometry/support/meshUtils/bounds.js +1 -1
  45. package/geometry/support/meshUtils/georeference.js +1 -1
  46. package/interfaces.d.ts +3 -3
  47. package/kernel.js +1 -1
  48. package/layers/OrientedImageryLayer.js +1 -1
  49. package/layers/SceneLayer.js +1 -1
  50. package/layers/VideoLayer.js +1 -1
  51. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  52. package/layers/graphics/editingSupport.js +1 -1
  53. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  54. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  55. package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
  56. package/layers/graphics/sources/support/uploadAssets.js +1 -1
  57. package/layers/mixins/ArcGISImageService.js +1 -1
  58. package/layers/mixins/ImageryTileMixin.js +1 -1
  59. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  60. package/layers/orientedImagery/core/bestImageUtils.js +1 -1
  61. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  62. package/layers/orientedImagery/transformations/groundToImageUtils.js +1 -1
  63. package/layers/orientedImagery/transformations/imageToGroundUtils.js +1 -1
  64. package/layers/support/SubtypeSublayer.js +1 -1
  65. package/layers/support/capabilities.js +1 -1
  66. package/layers/support/layerUtils.js +1 -1
  67. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  68. package/layers/video/VideoCameraSensorModel.js +5 -0
  69. package/layers/video/VideoController.js +1 -1
  70. package/layers/video/videoUtils.js +1 -1
  71. package/package.json +1 -1
  72. package/portal/PortalItem.js +1 -1
  73. package/renderers/support/colorRampUtils.js +1 -1
  74. package/rest/support/meshFeatureSet.js +1 -1
  75. package/smartMapping/labels/bins.js +5 -0
  76. package/smartMapping/labels/clusters.js +1 -1
  77. package/smartMapping/labels/support/utils.js +5 -0
  78. package/smartMapping/support/binningUtils.js +1 -1
  79. package/support/revision.js +1 -1
  80. package/views/2d/layers/features/schemaUtils.js +1 -1
  81. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  82. package/views/3d/layers/I3SMeshView3D.js +1 -1
  83. package/views/3d/layers/I3SMeshViewLabeler.js +1 -1
  84. package/views/3d/layers/I3SMeshWorkerHandle.js +1 -1
  85. package/views/3d/layers/SceneLayerWorker.js +1 -1
  86. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  87. package/views/3d/layers/i3s/I3SClientMaterialUtil.js +5 -0
  88. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  89. package/views/3d/layers/i3s/I3SGeometryUtil.js +1 -1
  90. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  91. package/views/3d/terrain/TerrainRenderer.js +1 -1
  92. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +19 -20
  93. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +2 -2
  94. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +9 -9
  95. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  96. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  97. package/views/DOMContainer.js +1 -1
  98. package/views/PopupView.js +1 -1
  99. package/views/ui/DefaultUI.js +1 -1
  100. package/views/ui/UI.js +1 -1
  101. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  102. package/widgets/Editor/EditorViewModel.js +1 -1
  103. package/widgets/Editor/UpdateWorkflow.js +1 -1
  104. package/widgets/Editor/workflowUtils.js +1 -1
  105. package/widgets/Feature/support/featureUtils.js +1 -1
  106. package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
  107. package/widgets/FeatureForm/RelationshipInput.js +1 -1
  108. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  109. package/widgets/OrientedImageryViewer.js +1 -1
  110. package/widgets/Popup.js +1 -1
  111. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
  112. package/assets/esri/core/workers/chunks/013de5c2955801b329b3.js +0 -1
  113. package/assets/esri/core/workers/chunks/0618fb0058f39ecd363f.js +0 -1
  114. package/assets/esri/core/workers/chunks/07163dcbb871f927a580.js +0 -1
  115. package/assets/esri/core/workers/chunks/0e46687004392c493c06.js +0 -1
  116. package/assets/esri/core/workers/chunks/21328f3dd26abe84a10d.js +0 -1
  117. package/assets/esri/core/workers/chunks/2faa8f08f2fdaac3f4af.js +0 -1
  118. package/assets/esri/core/workers/chunks/624521961fe1f2c4f2c5.js +0 -1
  119. package/assets/esri/core/workers/chunks/6f510f28526c73ab453c.js +0 -1
  120. package/assets/esri/core/workers/chunks/7479dc0c790337af7597.js +0 -1
  121. package/assets/esri/core/workers/chunks/a6ddf80eb324c35076e1.js +0 -1
  122. package/assets/esri/core/workers/chunks/a7fd2a95fde197c06828.js +0 -1
  123. package/assets/esri/core/workers/chunks/b8e6c64792a512df4c4d.js +0 -1
  124. package/assets/esri/core/workers/chunks/bf9e1fde9f6b2b4f10c0.js +0 -1
  125. package/assets/esri/core/workers/chunks/c96db6b7ce47bd343fdb.js +0 -1
  126. package/assets/esri/core/workers/chunks/cfa3b2b1e184681e9af4.js +0 -1
  127. package/assets/esri/core/workers/chunks/d95ca50ca7af4c222036.js +0 -1
  128. package/assets/esri/core/workers/chunks/ee5ee03dd2c7dc940272.js +0 -1
  129. package/assets/esri/core/workers/chunks/f720967ba8c5486a26a2.js +0 -1
  130. package/layers/orientedImagery/core/Affixes.js +0 -5
  131. package/layers/orientedImagery/core/CameraProperties.js +0 -5
  132. package/layers/orientedImagery/core/ImageProperties.js +0 -5
  133. package/layers/orientedImagery/core/ImageryTypes.js +0 -5
  134. package/layers/orientedImagery/core/imageryUtils.js +0 -5
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3477],{84552:(e,t,r)=>{r.d(t,{Z:()=>c});var i=r(43697),s=r(2368),o=r(96674),n=r(35463),l=r(5600),a=(r(75215),r(67676),r(80442),r(36030)),u=r(52011),p=r(78981);let d=class extends((0,s.J)(o.wq)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,n.rJ)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,a.J)(p.v,{nonNullable:!0})],d.prototype,"unit",void 0),(0,i._)([(0,l.Cb)({type:Number,json:{write:!0},nonNullable:!0})],d.prototype,"value",void 0),d=(0,i._)([(0,u.j)("esri.TimeInterval")],d);const c=d},23477:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Q});var i=r(43697),s=(r(66577),r(51773)),o=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423),r(32400)),n=r(16453),l=r(95330),a=r(81271),u=r(5600),p=(r(75215),r(67676),r(80442)),d=r(52011),c=r(86973),y=r(87085),h=r(20102),m=r(83379),f=r(92604),g=r(78346),b=r(25278),v=r(74889),w=r(6570),_=r(38913);const S="esri.layers.graphics.sources.GeoJSONSource",x=f.Z.getLogger(S);let E=class extends m.Z{constructor(){super(...arguments),this.type="geojson",this.refresh=(0,l.Ds)((async e=>{await this.load();const{extent:t,timeExtent:r}=await this._connection.invoke("refresh",e);return this.sourceJSON.extent=t,r&&(this.sourceJSON.timeInfo.timeExtent=[r.start,r.end]),{dataChanged:!0,updates:{extent:this.sourceJSON.extent,timeInfo:this.sourceJSON.timeInfo}}}))}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}applyEdits(e){return this.load().then((()=>this._applyEdits(e)))}openPorts(){return this.load().then((()=>this._connection.openPorts()))}queryFeatures(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t))).then((e=>v.Z.fromJSON(e)))}queryFeaturesJSON(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t)))}queryFeatureCount(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t)))}queryObjectIds(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t)))}queryExtent(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t))).then((e=>({count:e.count,extent:w.Z.fromJSON(e.extent)})))}querySnapping(e,t={}){return this.load(t).then((()=>this._connection.invoke("querySnapping",e,t)))}_applyEdits(e){if(!this._connection)throw new h.Z("geojson-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField,r=[],i=[],s=[];if(e.addFeatures)for(const t of e.addFeatures)r.push(this._serializeFeature(t));if(e.deleteFeatures)for(const r of e.deleteFeatures)"objectId"in r&&null!=r.objectId?i.push(r.objectId):"attributes"in r&&null!=r.attributes[t]&&i.push(r.attributes[t]);if(e.updateFeatures)for(const t of e.updateFeatures)s.push(this._serializeFeature(t));return this._connection.invoke("applyEdits",{adds:r,updates:s,deletes:i}).then((({extent:e,timeExtent:t,featureEditResults:r})=>(this.sourceJSON.extent=e,t&&(this.sourceJSON.timeInfo.timeExtent=[t.start,t.end]),this._createEditsResult(r))))}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new h.Z("geojson-layer-source:edit-failure",t.description,{code:t.code}):null}}_serializeFeature(e){const{attributes:t}=e,r=this._geometryForSerialization(e);return r?{geometry:r.toJSON(),attributes:t}:{attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;return null==t?null:"mesh"===t.type||"extent"===t.type?_.Z.fromExtent(t.extent):t}async _startWorker(e){this._connection=await(0,g.bA)("GeoJSONSourceWorker",{strategy:(0,p.Z)("feature-layers-workers")?"dedicated":"local",signal:e});const{fields:t,spatialReference:r,hasZ:i,geometryType:s,objectIdField:o,url:n,timeInfo:l,customParameters:a}=this.layer,u="defaults"===this.layer.originOf("spatialReference"),d={url:n,customParameters:a,fields:t&&t.map((e=>e.toJSON())),geometryType:c.M.toJSON(s),hasZ:i,objectIdField:o,timeInfo:l?l.toJSON():null,spatialReference:u?null:r&&r.toJSON()},y=await this._connection.invoke("load",d,{signal:e});for(const e of y.warnings)x.warn(e.message,{layer:this.layer,warning:e});y.featureErrors.length&&x.warn(`Encountered ${y.featureErrors.length} validation errors while loading features`,y.featureErrors),this.sourceJSON=y.layerDefinition,this.capabilities=(0,b.MS)(this.sourceJSON.hasZ,!0)}};(0,i._)([(0,u.Cb)()],E.prototype,"capabilities",void 0),(0,i._)([(0,u.Cb)()],E.prototype,"type",void 0),(0,i._)([(0,u.Cb)({constructOnly:!0})],E.prototype,"layer",void 0),(0,i._)([(0,u.Cb)()],E.prototype,"sourceJSON",void 0),E=(0,i._)([(0,d.j)(S)],E);var I=r(71612),C=r(17017),F=r(69637),j=r(6404),T=r(38009),R=r(68825),O=r(16859),P=r(34760),N=r(72965),Z=r(28294),U=r(21506),q=r(70082),J=r(16451),D=r(1231),L=r(53518),M=r(35671),G=r(54306),k=r(30707),A=r(14165),z=r(32163),B=r(82971);const $=(0,L.v)();let H=class extends((0,R.c)((0,C.N)((0,j.M)((0,F.b)((0,I.h)((0,Z.n)((0,N.M)((0,P.Q)((0,T.q)((0,O.I)((0,n.R)(y.Z)))))))))))){constructor(e){super(e),this.copyright=null,this.definitionExpression=null,this.displayField=null,this.editingEnabled=!1,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.hasZ=void 0,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="GeoJSON",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new E({layer:this}),this.spatialReference=B.Z.WGS84,this.templates=null,this.title="GeoJSON",this.type="geojson",this.typeIdField=null,this.types=null}destroy(){this.source?.destroy()}load(e){const t=this.loadFromPortal({supportedTypes:["GeoJson"],supportsData:!1},e).catch(l.r9).then((()=>this.source.load(e))).then((()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo"],"service"),(0,M.YN)(this.renderer,this.fieldsIndex),(0,M.UF)(this.timeInfo,this.fieldsIndex)}));return this.addResolvingPromise(t),Promise.resolve(this)}get capabilities(){return this.source?this.source.capabilities:null}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}get isTable(){return this.loaded&&null==this.geometryType}get parsedUrl(){return this.url?(0,a.mN)(this.url):null}set renderer(e){(0,M.YN)(e,this.fieldsIndex),this._set("renderer",e)}set url(e){if(!e)return void this._set("url",e);const t=(0,a.mN)(e);this._set("url",t.path),t.query&&(this.customParameters={...this.customParameters,...t.query})}async applyEdits(e,t){const{applyEdits:i}=await r.e(4720).then(r.bind(r,14720));await this.load();const s=await i(this,this.source,e,t);return this.read({extent:this.source.sourceJSON.extent,timeInfo:this.source.sourceJSON.timeInfo},{origin:"service",ignoreDefaults:!0}),s}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,z.eZ)(this,e)}createQuery(){const e=new A.Z,t=this.get("capabilities.data");e.returnGeometry=!0,t&&t.supportsZ&&(e.returnZ=!0),e.outFields=["*"],e.where=this.definitionExpression||"1=1";const{timeOffset:r,timeExtent:i}=this;return e.timeExtent=null!=r&&null!=i?i.offset(-r.value,r.unit):i||null,e}getFieldDomain(e,t){let r,i=!1;const s=t&&t.feature,o=s&&s.attributes,n=this.typeIdField&&o&&o[this.typeIdField];return null!=n&&this.types&&(i=this.types.some((t=>t.id==n&&(r=t.domains&&t.domains[e],r&&"inherited"===r.type&&(r=this._getLayerDomain(e)),!0)))),i||r||(r=this._getLayerDomain(e)),r}getField(e){return this.fieldsIndex.get(e)}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(A.Z.from(e)||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryObjectIds(e,t){return this.load().then((()=>this.source.queryObjectIds(A.Z.from(e)||this.createQuery(),t)))}queryFeatureCount(e,t){return this.load().then((()=>this.source.queryFeatureCount(A.Z.from(e)||this.createQuery(),t)))}queryExtent(e,t){return this.load().then((()=>this.source.queryExtent(A.Z.from(e)||this.createQuery(),t)))}async hasDataChanged(){try{const{dataChanged:e,updates:t}=await this.source.refresh(this.customParameters);return null!=t&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}_getLayerDomain(e){if(!this.fields)return null;let t=null;return this.fields.some((r=>(r.name===e&&(t=r.domain),!!t))),t}};(0,i._)([(0,u.Cb)({readOnly:!0,json:{read:!1,write:!1}})],H.prototype,"capabilities",null),(0,i._)([(0,u.Cb)({type:String})],H.prototype,"copyright",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],H.prototype,"createQueryVersion",null),(0,i._)([(0,u.Cb)({readOnly:!0})],H.prototype,"defaultPopupTemplate",null),(0,i._)([(0,u.Cb)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],H.prototype,"definitionExpression",void 0),(0,i._)([(0,u.Cb)({type:String})],H.prototype,"displayField",void 0),(0,i._)([(0,u.Cb)({type:Boolean})],H.prototype,"editingEnabled",void 0),(0,i._)([(0,u.Cb)(U.PV)],H.prototype,"elevationInfo",void 0),(0,i._)([(0,u.Cb)({type:[D.Z],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],H.prototype,"fields",void 0),(0,i._)([(0,u.Cb)($.fieldsIndex)],H.prototype,"fieldsIndex",void 0),(0,i._)([(0,u.Cb)({type:w.Z,json:{name:"extent"}})],H.prototype,"fullExtent",void 0),(0,i._)([(0,u.Cb)({type:["point","polygon","polyline","multipoint"],json:{read:{reader:c.M.read}}})],H.prototype,"geometryType",void 0),(0,i._)([(0,u.Cb)({type:Boolean})],H.prototype,"hasZ",void 0),(0,i._)([(0,u.Cb)(U.id)],H.prototype,"id",void 0),(0,i._)([(0,u.Cb)({type:Boolean,readOnly:!0})],H.prototype,"isTable",null),(0,i._)([(0,u.Cb)(U.iR)],H.prototype,"labelsVisible",void 0),(0,i._)([(0,u.Cb)({type:[G.Z],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:k.r},write:!0}})],H.prototype,"labelingInfo",void 0),(0,i._)([(0,u.Cb)(U.rn)],H.prototype,"legendEnabled",void 0),(0,i._)([(0,u.Cb)({type:["show","hide"]})],H.prototype,"listMode",void 0),(0,i._)([(0,u.Cb)({type:String,json:{name:"layerDefinition.objectIdField",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"objectIdField"}}}})],H.prototype,"objectIdField",void 0),(0,i._)([(0,u.Cb)(U.Oh)],H.prototype,"opacity",void 0),(0,i._)([(0,u.Cb)({type:["GeoJSON"]})],H.prototype,"operationalLayerType",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],H.prototype,"parsedUrl",null),(0,i._)([(0,u.Cb)(U.C_)],H.prototype,"popupEnabled",void 0),(0,i._)([(0,u.Cb)({type:s.Z,json:{name:"popupInfo",write:!0}})],H.prototype,"popupTemplate",void 0),(0,i._)([(0,u.Cb)({types:o.A,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:o.o}}}})],H.prototype,"renderer",null),(0,i._)([(0,u.Cb)(U.YI)],H.prototype,"screenSizePerspectiveEnabled",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],H.prototype,"source",void 0),(0,i._)([(0,u.Cb)({type:B.Z})],H.prototype,"spatialReference",void 0),(0,i._)([(0,u.Cb)({type:[q.Z]})],H.prototype,"templates",void 0),(0,i._)([(0,u.Cb)()],H.prototype,"title",void 0),(0,i._)([(0,u.Cb)({json:{read:!1},readOnly:!0})],H.prototype,"type",void 0),(0,i._)([(0,u.Cb)({type:String,readOnly:!0})],H.prototype,"typeIdField",void 0),(0,i._)([(0,u.Cb)({type:[J.Z]})],H.prototype,"types",void 0),(0,i._)([(0,u.Cb)(U.HQ)],H.prototype,"url",null),H=(0,i._)([(0,d.j)("esri.layers.GeoJSONLayer")],H);const Q=H},61159:(e,t,r)=>{r.d(t,{g:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},25278:(e,t,r)=>{r.d(t,{Dm:()=>p,Hq:()=>d,MS:()=>c,bU:()=>l});var i=r(80442),s=r(22974),o=r(61159),n=r(58333);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?n.I4:"esriGeometryPolyline"===e?n.ET:n.lF}}}const a=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function p(e,t){if((0,i.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${a.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new i}catch(r){return()=>({[t]:null,...e})}}function d(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,s.d9)(e)}}]}function c(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0},query:o.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1}}}},17017:(e,t,r)=>{r.d(t,{N:()=>n});var i=r(43697),s=r(5600),o=(r(75215),r(67676),r(80442),r(52011));const n=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,s.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,o.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},69637:(e,t,r)=>{r.d(t,{b:()=>F});var i,s=r(43697),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011)),l=r(20102),a=r(96674),u=r(78286),p=r(67760),d=r(66577),c=r(92835),y=r(35454),h=r(22974),m=r(14165);const f=new y.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),g=new y.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let b=i=class extends a.wq{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:r,spatialRelationship:i,timeExtent:s,objectIds:o,units:n,distance:l}=this;return new m.Z({geometry:(0,h.d9)(r),objectIds:(0,h.d9)(o),spatialRelationship:i,timeExtent:(0,h.d9)(s),where:t,units:n,distance:l,...e})}clone(){const{where:e,geometry:t,spatialRelationship:r,timeExtent:s,objectIds:o,units:n,distance:l}=this;return new i({geometry:(0,h.d9)(t),objectIds:(0,h.d9)(o),spatialRelationship:r,timeExtent:(0,h.d9)(s),where:e,units:n,distance:l})}};(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],b.prototype,"where",void 0),(0,s._)([(0,o.Cb)({types:d.qM,json:{write:!0}})],b.prototype,"geometry",void 0),(0,s._)([(0,o.Cb)({type:f.apiValues,json:{name:"spatialRel",read:{reader:f.read},write:{allowNull:!1,writer:f.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],b.prototype,"spatialRelationship",void 0),(0,s._)([(0,o.Cb)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],b.prototype,"distance",void 0),(0,s._)([(0,o.Cb)({type:[Number],json:{write:!0}})],b.prototype,"objectIds",void 0),(0,s._)([(0,o.Cb)({type:g.apiValues,json:{read:g.read,write:{writer:g.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],b.prototype,"units",void 0),(0,s._)([(0,o.Cb)({type:c.Z,json:{write:!0}})],b.prototype,"timeExtent",void 0),b=i=(0,s._)([(0,n.j)("esri.layers.support.FeatureFilter")],b);const v=b;var w;const _={read:{reader:p.ij},write:{writer:p.cW,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},S={read:{reader:p.ij},write:{writer:p.cW,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},x={name:"showExcludedLabels",default:!0};let E=w=class extends a.wq{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){const r=super.write(e,t);if(t?.origin){if(r.filter){const e=Object.keys(r.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new l.Z("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return t.messages?.push(new l.Z("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new w({filter:null!=this.filter?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,s._)([(0,o.Cb)({type:v,json:{write:{allowNull:!0,writer(e,t,r,i){const s=e?.write({},i);s&&0!==Object.keys(s).length?(0,u.RB)(r,s,t):(0,u.RB)(r,null,t)}}}})],E.prototype,"filter",void 0),(0,s._)([(0,o.Cb)({json:{write:!0,origins:{"web-map":_,"portal-item":_}}})],E.prototype,"includedEffect",void 0),(0,s._)([(0,o.Cb)({json:{write:!0,origins:{"web-map":S,"portal-item":S}}})],E.prototype,"excludedEffect",void 0),(0,s._)([(0,o.Cb)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":x,"portal-item":x}}})],E.prototype,"excludedLabelsVisible",void 0),E=w=(0,s._)([(0,n.j)("esri.layers.support.FeatureEffect")],E);const I=E,C={write:{allowNull:!0}},F=e=>{let t=class extends e{constructor(){super(...arguments),this.featureEffect=null}};return(0,s._)([(0,o.Cb)({type:I,json:{origins:{"web-map":C,"portal-item":C}}})],t.prototype,"featureEffect",void 0),t=(0,s._)([(0,n.j)("esri.layers.mixins.FeatureEffectLayer")],t),t}},68825:(e,t,r)=>{r.d(t,{c:()=>m});var i,s=r(43697),o=r(78286),n=r(5600),l=(r(75215),r(67676),r(80442),r(52011)),a=r(35454),u=r(96674);const p=new a.X({asc:"ascending",desc:"descending"});let d=i=class extends u.wq{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],d.prototype,"field",void 0),(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],d.prototype,"valueExpression",void 0),(0,s._)([(0,n.Cb)({type:p.apiValues,json:{read:p.read,write:p.write}})],d.prototype,"order",void 0),d=i=(0,s._)([(0,l.j)("esri.layers.support.OrderByInfo")],d);const c=d;function y(e,t,r){if(!e)return null;const i=e.find((e=>!!e.field));if(!i)return null;const s=new c;return s.read(i,r),[s]}function h(e,t,r,i){const s=e.find((e=>!!e.field));s&&(0,o.RB)(r,[s.toJSON()],t)}const m=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,s._)([(0,n.Cb)({type:[c],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:y},write:{target:"layerDefinition.orderBy",writer:h}}})],t.prototype,"orderBy",void 0),t=(0,s._)([(0,l.j)("esri.layers.mixins.OrderedLayer")],t),t}},16859:(e,t,r)=>{r.d(t,{I:()=>S});var i=r(43697),s=r(68773),o=r(40330),n=r(3172),l=r(66643),a=r(20102),u=r(92604),p=r(70586),d=r(95330),c=r(81271),y=r(5600),h=(r(75215),r(67676),r(80442),r(71715)),m=r(52011),f=r(30556),g=r(84230),b=r(48522),v=r(15235),w=r(86082),_=r(14661);const S=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new v.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:i}=await r.e(8062).then(r.bind(r,18062));return(0,d.k_)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,d.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,d.r9)(e),!0))))}async _setUserPrivileges(e,t){if(!s.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,d.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,_.Ss)(r);let s,n;if(i)s=r.portal.url;else try{s=await(0,g.oP)(this.url,t)}catch(e){(0,d.r9)(e)}if(!s||!(0,c.Zo)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(o.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.r9)(e)}if(!n)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await r.reload():(r=new v.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return(0,_.Ss)(r)}catch(e){(0,d.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=x.credential===t?x.user:await this._fetchEditingUser(e);return x.credential=t,x.user=r,null==r||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=o.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=b.Z.getDefault();if(s&&s.loaded&&(0,c.Fv)(s.restUrl)===(0,c.Fv)(i))return s.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,l.q6)((0,n.default)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?w.default.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||b.Z.getDefault());return r&&i&&!(0,c.tm)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,y.Cb)({type:v.default})],t.prototype,"portalItem",null),(0,i._)([(0,h.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,f.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,y.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,y.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,y.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,y.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,m.j)("esri.layers.mixins.PortalLayer")],t),t},x={credential:null,user:null}},28294:(e,t,r)=>{r.d(t,{n:()=>c});var i=r(43697),s=r(92835),o=r(84552),n=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),u=r(35671),p=r(76259),d=r(78981);const c=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,s=d.v.fromJSON(r.timeOffsetUnits);return i&&s?new o.Z({value:i,unit:s}):null}set timeInfo(e){(0,u.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,n.Cb)({type:s.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,i._)([(0,n.Cb)({type:o.Z})],t.prototype,"timeOffset",void 0),(0,i._)([(0,l.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,i._)([(0,n.Cb)({value:null,type:p.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,i._)([(0,n.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,i._)([(0,a.j)("esri.layers.mixins.TemporalLayer")],t),t}},70082:(e,t,r)=>{r.d(t,{Z:()=>d});var i=r(43697),s=r(2368),o=r(35454),n=r(96674),l=r(5600),a=(r(75215),r(67676),r(80442),r(52011));const u=new o.X({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let p=class extends((0,s.J)(n.wq)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"name",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"description",void 0),(0,i._)([(0,l.Cb)({json:{read:u.read,write:u.write}})],p.prototype,"drawingTool",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,i._)([(0,a.j)("esri.layers.support.FeatureTemplate")],p);const d=p},16451:(e,t,r)=>{r.d(t,{Z:()=>y});var i=r(43697),s=r(2368),o=r(96674),n=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),u=r(30556),p=r(72729),d=r(70082);let c=class extends((0,s.J)(o.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,p.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,n.Cb)({json:{write:!0}})],c.prototype,"id",void 0),(0,i._)([(0,n.Cb)({json:{write:!0}})],c.prototype,"name",void 0),(0,i._)([(0,n.Cb)({json:{write:!0}})],c.prototype,"domains",void 0),(0,i._)([(0,l.r)("domains")],c.prototype,"readDomains",null),(0,i._)([(0,u.c)("domains")],c.prototype,"writeDomains",null),(0,i._)([(0,n.Cb)({type:[d.Z],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,i._)([(0,a.j)("esri.layers.support.FeatureType")],c);const y=c},76259:(e,t,r)=>{r.d(t,{Z:()=>m});var i=r(43697),s=r(92835),o=r(84552),n=r(2368),l=r(96674),a=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),p=r(52011),d=r(30556),c=r(80216);function y(e,t){return o.Z.fromJSON({value:e,unit:t})}let h=class extends((0,n.J)(l.wq)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeReference=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),i=new Date(t.timeExtent[1]);return new s.Z({start:r,end:i})}writeFullTimeExtent(e,t){e&&null!=e.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?y(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?y(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i._)([(0,a.Cb)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,i._)([(0,a.Cb)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,i._)([(0,a.Cb)({type:s.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,i._)([(0,u.r)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,i._)([(0,d.c)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,i._)([(0,a.Cb)({type:o.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,i._)([(0,u.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,i._)([(0,d.c)("interval")],h.prototype,"writeInterval",null),(0,i._)([(0,a.Cb)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,i._)([(0,a.Cb)({type:c.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"timeReference",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),h=(0,i._)([(0,p.j)("esri.layers.support.TimeInfo")],h);const m=h},30707:(e,t,r)=>{r.d(t,{a:()=>d,r:()=>u});var i=r(20102),s=r(22974),o=r(92604),n=r(54306);const l=o.Z.getLogger("esri.layers.support.labelingInfo"),a=/\[([^\[\]]+)\]/gi;function u(e,t,r){return e?e.map((e=>{const i=new n.Z;if(i.read(e,r),i.labelExpression){const e=t.fields||t.layerDefinition&&t.layerDefinition.fields||this.fields;i.labelExpression=i.labelExpression.replaceAll(a,((t,r)=>`[${function(e,t){if(!t)return e;const r=e.toLowerCase();for(let e=0;e<t.length;e++){const i=t[e].name;if(i.toLowerCase()===r)return i}return e}(r,e)}]`))}return i})):null}const p={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 d(e,t){const r=(0,s.d9)(e);return r.some((e=>function(e,t){const r=e.labelPlacement,s=p[t];if(!e.symbol)return l.warn("No ILabelClass symbol specified."),!0;if(!s)return l.error(new i.Z("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),!0;if(!s.includes(r)){const i=s[0];r&&l.warn(`Found invalid label placement type ${r} for ${t}. Defaulting to ${i}`),e.labelPlacement=i}return!1}(e,t)))?[]:r}},78981:(e,t,r)=>{r.d(t,{v:()=>i});const i=(0,r(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},74889:(e,t,r)=>{r.d(t,{Z:()=>v});var i,s=r(43697),o=r(66577),n=r(38171),l=r(35454),a=r(96674),u=r(22974),p=r(5600),d=(r(75215),r(71715)),c=r(52011),y=r(30556),h=r(82971),m=r(33955),f=r(1231);const g=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=i=class extends a.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=h.Z.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const s=e[t],o=n.Z.fromJSON(s),l=s.geometry&&s.geometry.spatialReference;null==o.geometry||l||(o.geometry.spatialReference=r);const a=s.aggregateGeometries,u=o.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],i=a[e],s=i?.spatialReference;null==t||s||(t.spatialReference=r)}i.push(o)}return i}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:s}=this;if(s)for(const e of s)if(e&&null!=e.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,m.im)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=h.Z.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e&&e[r];i.geometry=t&&t.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,s]}=e,o=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((s-e)/r)));for(let e=0,t=o.length;e<t;e++)n?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,s],scale:[o,n]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*o+i),(e=>s-e*n),l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,s;const o=[];for(let n=0,l=e.length;n<l;n++){const l=e[n];if(n>0){const e=t(l[0]),n=r(l[1]);e===i&&n===s||(o.push([e-i,n-s]),i=e,s=n)}else i=t(l[0]),s=r(l[1]),o.push([i,s])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,m.oU)(e)?e.rings:e.paths,s=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],n=this._quantizePoints(o,t,r);n&&s.push(n)}return s.length>0?((0,m.oU)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,s){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,m.oU)(e)?e.rings:e.paths;let n,l;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(n+=s[0],l+=s[1]):(n=s[0],l=s[1]),s[0]=t(n),s[1]=r(l)}}if(i&&s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=s(r[3])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let n,l;for(let e=0,i=o.length;e<i;e++){const i=o[e];e>0?(n+=i[0],l+=i[1]):(n=i[0],l=i[1]),i[0]=t(n),i[1]=r(l)}if(i&&s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2]),t[3]=s(t[3])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2])}}:null}};(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,p.Cb)({type:[n.Z],json:{write:!0}})],b.prototype,"features",void 0),(0,s._)([(0,d.r)("features")],b.prototype,"readFeatures",null),(0,s._)([(0,p.Cb)({type:[f.Z],json:{write:!0}})],b.prototype,"fields",void 0),(0,s._)([(0,p.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],b.prototype,"geometryType",void 0),(0,s._)([(0,y.c)("geometryType")],b.prototype,"writeGeometryType",null),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,s._)([(0,p.Cb)({types:o.qM,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,s._)([(0,d.r)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,s._)([(0,p.Cb)({type:h.Z,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,s._)([(0,y.c)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,s._)([(0,p.Cb)({json:{write:!0}})],b.prototype,"transform",void 0),b=i=(0,s._)([(0,c.j)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0;const v=b},58333:(e,t,r)=>{r.d(t,{ET:()=>o,I4:()=>s,eG:()=>a,lF:()=>n,lj:()=>p,qP:()=>l,wW:()=>u});const i=[252,146,31,255],s={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},n={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},a={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},p={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8068],{84552:(e,t,r)=>{r.d(t,{Z:()=>d});var i=r(43697),n=r(2368),o=r(96674),s=r(35463),l=r(5600),a=(r(75215),r(67676),r(80442),r(36030)),u=r(52011),p=r(78981);let c=class extends((0,n.J)(o.wq)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,s.rJ)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,a.J)(p.v,{nonNullable:!0})],c.prototype,"unit",void 0),(0,i._)([(0,l.Cb)({type:Number,json:{write:!0},nonNullable:!0})],c.prototype,"value",void 0),c=(0,i._)([(0,u.j)("esri.TimeInterval")],c);const d=c},88068:(e,t,r)=>{r.r(t),r.d(t,{default:()=>q});var i=r(43697),n=(r(66577),r(51773)),o=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423),r(32400)),s=r(16453),l=r(5600),a=(r(75215),r(67676),r(80442),r(52011)),u=r(86973),p=r(87085),c=r(20102),d=r(83379),y=r(16467),f=r(74889),m=r(82971);let h=class extends d.Z{constructor(){super(...arguments),this.featureDefinition=null,this.type="ogc-feature"}load(e){return this.addResolvingPromise(this._loadOGCServices(this.layer,e)),this.when()}getSource(){const{featureDefinition:{collection:e,layerDefinition:t,spatialReference:r,supportedCrs:i},layer:{apiKey:n,customParameters:o,effectiveMaxRecordCount:s}}=this;return{type:"ogc-source",collection:e,layerDefinition:t,maxRecordCount:s,queryParameters:{apiKey:n,customParameters:o},spatialReference:r,supportedCrs:i}}queryExtent(e,t={}){return null}queryFeatureCount(e,t={}){return null}queryFeatures(e,t={}){return this.queryFeaturesJSON(e,t).then((e=>f.Z.fromJSON(e)))}queryFeaturesJSON(e,t={}){const r=this.getSource();return this.load(t).then((()=>(0,y.yN)(r,e,t)))}queryObjectIds(e,t={}){return null}serviceSupportsSpatialReference(e){return!(!e.isWGS84&&!e.isWebMercator&&!this.featureDefinition.supportedCrs[e.wkid])}_conformsToType(e,t){const r=new RegExp(`^${t}$`,"i");return e.conformsTo.some((e=>r.test(e)))??!1}_getCapabilities(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1},query:{maxRecordCount:t,maxRecordCountFactor:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,tileMaxRecordCount:void 0},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1}}}_getMaxRecordCount(e){const t=e?.components?.parameters;return t?.limit?.schema?.maximum??t?.limitFeatures?.schema?.maximum}_getStorageSpatialReference(e){const t=e.storageCrs??y.$9,r=(0,y.d)(t);return null==r?m.Z.WGS84:new m.Z({wkid:r})}_getSupportedSpatialReferences(e,t){const r="#/crs",i=e.crs??[y.$9],n=i.includes(r)?i.filter((e=>e!==r)).concat(t.crs??[]):i,o=/^http:\/\/www\.opengis.net\/def\/crs\/epsg\/.*\/3785$/i;return n.filter((e=>!o.test(e)))}async _loadOGCServices(e,t){const r=null!=t?t.signal:null,{apiKey:i,collectionId:n,customParameters:o,fields:s,geometryType:l,hasZ:a,objectIdField:p,timeInfo:d,url:f}=e,m={fields:s?.map((e=>e.toJSON())),geometryType:u.P.toJSON(l),hasZ:a??!1,objectIdField:p,timeInfo:d?.toJSON()},h={apiKey:i,customParameters:o,signal:r},g=await(0,y.gp)(f,h),[w,b]=await Promise.all([(0,y.G4)(g,h),(0,y.j)(g,h)]);if(!this._conformsToType(w,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"))throw new c.Z("ogc-feature-layer:no-geojson-support","Server does not support geojson");const v=b.collections.find((e=>e.id===n));if(!v)throw new c.Z("ogc-feature-layer:collection-not-found","Server does not contain the named collection");const S=this._conformsToType(w,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30")?await(0,y.eS)(g,h):null,_=await(0,y.w9)(v,m,h),C=this._getMaxRecordCount(S),x=this._getCapabilities(_.hasZ,C),I=this._getStorageSpatialReference(v).toJSON(),F=this._getSupportedSpatialReferences(v,b),T=new RegExp(`^${y.Lu}`,"i"),j={};for(const e of F){const t=(0,y.d)(e);null!=t&&(j[t]||(j[t]=e.replace(T,"")))}this.featureDefinition={capabilities:x,collection:v,layerDefinition:_,spatialReference:I,supportedCrs:j}}};(0,i._)([(0,l.Cb)()],h.prototype,"featureDefinition",void 0),(0,i._)([(0,l.Cb)({constructOnly:!0})],h.prototype,"layer",void 0),(0,i._)([(0,l.Cb)()],h.prototype,"type",void 0),h=(0,i._)([(0,a.j)("esri.layers.graphics.sources.OGCFeatureSource")],h);var g=r(54295),w=r(71612),b=r(17017),v=r(69637),S=r(6404),_=r(38009),C=r(68825),x=r(16859),I=r(34760),F=r(72965),T=r(28294),j=r(21506),R=r(16451),E=r(1231),P=r(53518),O=r(35671),Z=r(54306),M=r(30707),N=r(14165),D=r(32163),G=r(6570);const U=(0,P.v)();let k=class extends((0,g.V)((0,b.N)((0,S.M)((0,v.b)((0,w.h)((0,C.c)((0,T.n)((0,F.M)((0,_.q)((0,x.I)((0,I.Q)((0,s.R)(p.Z))))))))))))){constructor(e){super(e),this.capabilities=null,this.collectionId=null,this.copyright=null,this.definitionExpression=null,this.description=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.hasZ=void 0,this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxRecordCount=null,this.objectIdField=null,this.operationalLayerType="OGCFeatureLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new h({layer:this}),this.spatialReference=null,this.title=null,this.type="ogc-feature",this.typeIdField=null,this.types=null,this.url=null}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["OGCFeatureServer"]},e).then((()=>this._fetchService(e)))),this.when()}get defaultPopupTemplate(){return this.createPopupTemplate()}get effectiveMaxRecordCount(){return this.maxRecordCount??this.capabilities?.query.maxRecordCount??5e3}get isTable(){return this.loaded&&null==this.geometryType}set renderer(e){(0,O.YN)(e,this.fieldsIndex),this._set("renderer",e)}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,D.eZ)(this,e)}createQuery(){return new N.Z}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let r,i=!1;const n=t?.feature?.attributes,o=this.typeIdField&&n?.[this.typeIdField];return null!=o&&this.types&&(i=this.types.some((t=>t.id==o&&(r=t.domains?.[e],"inherited"===r?.type&&(r=this._getLayerDomain(e)),!0)))),i||r||(r=this._getLayerDomain(e)),r}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(N.Z.from(e)||this.createQuery(),t))).then((e=>(e?.features?.forEach((e=>{e.layer=e.sourceLayer=this})),e)))}serviceSupportsSpatialReference(e){return this.source?.serviceSupportsSpatialReference(e)??!1}async _fetchService(e){await this.source.load(e),this.read(this.source.featureDefinition,{origin:"service"}),(0,O.YN)(this.renderer,this.fieldsIndex),(0,O.UF)(this.timeInfo,this.fieldsIndex)}_getLayerDomain(e){if(!this.fields)return null;for(const t of this.fields)if(t.name===e&&t.domain)return t.domain;return null}};(0,i._)([(0,l.Cb)({readOnly:!0,json:{origins:{service:{read:!0}}}})],k.prototype,"capabilities",void 0),(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],k.prototype,"collectionId",void 0),(0,i._)([(0,l.Cb)({type:String})],k.prototype,"copyright",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],k.prototype,"defaultPopupTemplate",null),(0,i._)([(0,l.Cb)({type:String})],k.prototype,"definitionExpression",void 0),(0,i._)([(0,l.Cb)({readOnly:!0,type:String,json:{origins:{service:{name:"collection.description"}}}})],k.prototype,"description",void 0),(0,i._)([(0,l.Cb)({type:String})],k.prototype,"displayField",void 0),(0,i._)([(0,l.Cb)({type:Number})],k.prototype,"effectiveMaxRecordCount",null),(0,i._)([(0,l.Cb)(j.PV)],k.prototype,"elevationInfo",void 0),(0,i._)([(0,l.Cb)({type:[E.Z],json:{origins:{service:{name:"layerDefinition.fields"}}}})],k.prototype,"fields",void 0),(0,i._)([(0,l.Cb)(U.fieldsIndex)],k.prototype,"fieldsIndex",void 0),(0,i._)([(0,l.Cb)({readOnly:!0,type:G.Z,json:{origins:{service:{name:"layerDefinition.extent"}}}})],k.prototype,"fullExtent",void 0),(0,i._)([(0,l.Cb)({type:u.M.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:u.M.read}}}}})],k.prototype,"geometryType",void 0),(0,i._)([(0,l.Cb)({type:Boolean,json:{origins:{service:{name:"layerDefinition.hasZ"}}}})],k.prototype,"hasZ",void 0),(0,i._)([(0,l.Cb)({type:Boolean,readOnly:!0})],k.prototype,"isTable",null),(0,i._)([(0,l.Cb)({type:[Z.Z],json:{origins:{"web-document":{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:M.r},write:!0}}}})],k.prototype,"labelingInfo",void 0),(0,i._)([(0,l.Cb)(j.iR)],k.prototype,"labelsVisible",void 0),(0,i._)([(0,l.Cb)(j.rn)],k.prototype,"legendEnabled",void 0),(0,i._)([(0,l.Cb)({type:Number})],k.prototype,"maxRecordCount",void 0),(0,i._)([(0,l.Cb)({type:String,json:{origins:{service:{name:"layerDefinition.objectIdField"}}}})],k.prototype,"objectIdField",void 0),(0,i._)([(0,l.Cb)({type:["OGCFeatureLayer"]})],k.prototype,"operationalLayerType",void 0),(0,i._)([(0,l.Cb)(j.C_)],k.prototype,"popupEnabled",void 0),(0,i._)([(0,l.Cb)({type:n.Z,json:{name:"popupInfo",write:!0}})],k.prototype,"popupTemplate",void 0),(0,i._)([(0,l.Cb)({types:o.A,json:{origins:{service:{name:"layerDefinition.drawingInfo.renderer",write:!1},"web-scene":{types:o.o,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:!0}})],k.prototype,"renderer",null),(0,i._)([(0,l.Cb)(j.YI)],k.prototype,"screenSizePerspectiveEnabled",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],k.prototype,"source",void 0),(0,i._)([(0,l.Cb)({readOnly:!0,type:m.Z,json:{origins:{service:{read:!0}}}})],k.prototype,"spatialReference",void 0),(0,i._)([(0,l.Cb)({type:String,json:{write:{enabled:!0,ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"collection.title"}}}})],k.prototype,"title",void 0),(0,i._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],k.prototype,"type",void 0),(0,i._)([(0,l.Cb)({type:String,readOnly:!0})],k.prototype,"typeIdField",void 0),(0,i._)([(0,l.Cb)({type:[R.Z]})],k.prototype,"types",void 0),(0,i._)([(0,l.Cb)(j.HQ)],k.prototype,"url",void 0),k=(0,i._)([(0,a.j)("esri.layers.OGCFeatureLayer")],k);const q=k},61159:(e,t,r)=>{r.d(t,{g:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},92722:(e,t,r)=>{r.d(t,{O3:()=>S,lG:()=>C,my:()=>_,q9:()=>a});var i=r(20102),n=r(70272),o=r(5428),s=r(35671);const l={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function a(e){return l[e]}function*u(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*p(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function c(e){for(const t of e)if(t.length>2)return!0;return!1}function d(e){let t=0;for(let r=0;r<e.length;r++){const i=e[r],n=e[(r+1)%e.length];t+=i[0]*n[1]-n[0]*i[1]}return t<=0}function y(e){const t=e[0],r=e[e.length-1];return t[0]===r[0]&&t[1]===r[1]&&t[2]===r[2]||e.push(t),e}function f(e,t,r){switch(t.type){case"LineString":case"MultiPoint":return function(e,t,r){return g(e,t.coordinates,r),e}(e,t,r);case"MultiLineString":return function(e,t,r){for(const i of t.coordinates)g(e,i,r);return e}(e,t,r);case"MultiPolygon":return function(e,t,r){for(const i of t.coordinates){m(e,i[0],r);for(let t=1;t<i.length;t++)h(e,i[t],r)}return e}(e,t,r);case"Point":return function(e,t,r){return b(e,t.coordinates,r),e}(e,t,r);case"Polygon":return function(e,t,r){const i=t.coordinates;m(e,i[0],r);for(let t=1;t<i.length;t++)h(e,i[t],r);return e}(e,t,r)}}function m(e,t,r){const i=y(t);!function(e){return!d(e)}(i)?g(e,i,r):w(e,i,r)}function h(e,t,r){const i=y(t);!function(e){return d(e)}(i)?g(e,i,r):w(e,i,r)}function g(e,t,r){for(const i of t)b(e,i,r);e.lengths.push(t.length)}function w(e,t,r){for(let i=t.length-1;i>=0;i--)b(e,t[i],r);e.lengths.push(t.length)}function b(e,t,r){const[i,n,o]=t;e.coords.push(i,n),r.hasZ&&e.coords.push(o||0)}function v(e){switch(typeof e){case"string":return"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function S(e){if(!e)throw new i.Z("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new i.Z("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:t}=e;if(!t)return;const r="string"==typeof t?t:"name"===t.type?t.properties.name:"EPSG"===t.type?t.properties.code:null,n=new RegExp(".*(CRS84H?|4326)$","i");if(!r||!n.test(r))throw new i.Z("geojson-layer:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:t})}function _(e,t={}){const r=[],i=new Set,n=new Set;let o,l=!1,d=null,y=!1,{geometryType:f=null}=t,m=!1;for(const t of u(e)){const{geometry:e,properties:u,id:h}=t;if((!e||(f||(f=a(e.type)),a(e.type)===f))&&(l||(l=c(p(e))),y||(y=null!=h,y&&(o=typeof h,u&&(d=Object.keys(u).filter((e=>u[e]===h))))),u&&d&&y&&null!=h&&(d.length>1?d=d.filter((e=>u[e]===h)):1===d.length&&(d=u[d[0]]===h?d:[])),!m&&u)){let e=!0;for(const t in u){if(i.has(t))continue;const o=u[t];if(null==o){e=!1,n.add(t);continue}const l=v(o);if("unknown"===l){n.add(t);continue}n.delete(t),i.add(t);const a=(0,s.q6)(t);a&&r.push({name:a,alias:t,type:l})}m=e}}const h=(0,s.q6)(1===d?.length&&d[0]||null)??void 0;if(h)for(const e of r)if(e.name===h&&(0,s.H7)(e)){e.type="esriFieldTypeOID";break}return{fields:r,geometryType:f,hasZ:l,objectIdFieldName:h,objectIdFieldType:o,unknownFields:Array.from(n)}}function C(e,t){return Array.from(function*(e,t={}){const{geometryType:r,objectIdField:i}=t;for(const s of e){const{geometry:e,properties:l,id:u}=s;if(e&&a(e.type)!==r)continue;const p=l||{};let c;i&&(c=p[i],null==u||c||(p[i]=c=u));const d=new n.u_(e?f(new o.Z,e,t):null,p,null,c??void 0);yield d}}(u(e),t))}},25278:(e,t,r)=>{r.d(t,{Dm:()=>p,Hq:()=>c,MS:()=>d,bU:()=>l});var i=r(80442),n=r(22974),o=r(61159),s=r(58333);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?s.I4:"esriGeometryPolyline"===e?s.ET:s.lF}}}const a=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function p(e,t){if((0,i.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${a.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new i}catch(r){return()=>({[t]:null,...e})}}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.d9)(e)}}]}function d(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0},query:o.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1}}}},54295:(e,t,r)=>{r.d(t,{V:()=>s});var i=r(43697),n=r(5600),o=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,n.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,o.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17017:(e,t,r)=>{r.d(t,{N:()=>s});var i=r(43697),n=r(5600),o=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,n.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,o.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},69637:(e,t,r)=>{r.d(t,{b:()=>T});var i,n=r(43697),o=r(5600),s=(r(75215),r(67676),r(80442),r(52011)),l=r(20102),a=r(96674),u=r(78286),p=r(67760),c=r(66577),d=r(92835),y=r(35454),f=r(22974),m=r(14165);const h=new y.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),g=new y.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let w=i=class extends a.wq{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:r,spatialRelationship:i,timeExtent:n,objectIds:o,units:s,distance:l}=this;return new m.Z({geometry:(0,f.d9)(r),objectIds:(0,f.d9)(o),spatialRelationship:i,timeExtent:(0,f.d9)(n),where:t,units:s,distance:l,...e})}clone(){const{where:e,geometry:t,spatialRelationship:r,timeExtent:n,objectIds:o,units:s,distance:l}=this;return new i({geometry:(0,f.d9)(t),objectIds:(0,f.d9)(o),spatialRelationship:r,timeExtent:(0,f.d9)(n),where:e,units:s,distance:l})}};(0,n._)([(0,o.Cb)({type:String,json:{write:!0}})],w.prototype,"where",void 0),(0,n._)([(0,o.Cb)({types:c.qM,json:{write:!0}})],w.prototype,"geometry",void 0),(0,n._)([(0,o.Cb)({type:h.apiValues,json:{name:"spatialRel",read:{reader:h.read},write:{allowNull:!1,writer:h.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],w.prototype,"spatialRelationship",void 0),(0,n._)([(0,o.Cb)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],w.prototype,"distance",void 0),(0,n._)([(0,o.Cb)({type:[Number],json:{write:!0}})],w.prototype,"objectIds",void 0),(0,n._)([(0,o.Cb)({type:g.apiValues,json:{read:g.read,write:{writer:g.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],w.prototype,"units",void 0),(0,n._)([(0,o.Cb)({type:d.Z,json:{write:!0}})],w.prototype,"timeExtent",void 0),w=i=(0,n._)([(0,s.j)("esri.layers.support.FeatureFilter")],w);const b=w;var v;const S={read:{reader:p.ij},write:{writer:p.cW,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},_={read:{reader:p.ij},write:{writer:p.cW,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},C={name:"showExcludedLabels",default:!0};let x=v=class extends a.wq{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){const r=super.write(e,t);if(t?.origin){if(r.filter){const e=Object.keys(r.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new l.Z("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return t.messages?.push(new l.Z("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new v({filter:null!=this.filter?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,n._)([(0,o.Cb)({type:b,json:{write:{allowNull:!0,writer(e,t,r,i){const n=e?.write({},i);n&&0!==Object.keys(n).length?(0,u.RB)(r,n,t):(0,u.RB)(r,null,t)}}}})],x.prototype,"filter",void 0),(0,n._)([(0,o.Cb)({json:{write:!0,origins:{"web-map":S,"portal-item":S}}})],x.prototype,"includedEffect",void 0),(0,n._)([(0,o.Cb)({json:{write:!0,origins:{"web-map":_,"portal-item":_}}})],x.prototype,"excludedEffect",void 0),(0,n._)([(0,o.Cb)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":C,"portal-item":C}}})],x.prototype,"excludedLabelsVisible",void 0),x=v=(0,n._)([(0,s.j)("esri.layers.support.FeatureEffect")],x);const I=x,F={write:{allowNull:!0}},T=e=>{let t=class extends e{constructor(){super(...arguments),this.featureEffect=null}};return(0,n._)([(0,o.Cb)({type:I,json:{origins:{"web-map":F,"portal-item":F}}})],t.prototype,"featureEffect",void 0),t=(0,n._)([(0,s.j)("esri.layers.mixins.FeatureEffectLayer")],t),t}},68825:(e,t,r)=>{r.d(t,{c:()=>m});var i,n=r(43697),o=r(78286),s=r(5600),l=(r(75215),r(67676),r(80442),r(52011)),a=r(35454),u=r(96674);const p=new a.X({asc:"ascending",desc:"descending"});let c=i=class extends u.wq{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n._)([(0,s.Cb)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,n._)([(0,s.Cb)({type:String,json:{write:!0}})],c.prototype,"valueExpression",void 0),(0,n._)([(0,s.Cb)({type:p.apiValues,json:{read:p.read,write:p.write}})],c.prototype,"order",void 0),c=i=(0,n._)([(0,l.j)("esri.layers.support.OrderByInfo")],c);const d=c;function y(e,t,r){if(!e)return null;const i=e.find((e=>!!e.field));if(!i)return null;const n=new d;return n.read(i,r),[n]}function f(e,t,r,i){const n=e.find((e=>!!e.field));n&&(0,o.RB)(r,[n.toJSON()],t)}const m=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,n._)([(0,s.Cb)({type:[d],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:y},write:{target:"layerDefinition.orderBy",writer:f}}})],t.prototype,"orderBy",void 0),t=(0,n._)([(0,l.j)("esri.layers.mixins.OrderedLayer")],t),t}},16859:(e,t,r)=>{r.d(t,{I:()=>_});var i=r(43697),n=r(68773),o=r(40330),s=r(3172),l=r(66643),a=r(20102),u=r(92604),p=r(70586),c=r(95330),d=r(81271),y=r(5600),f=(r(75215),r(67676),r(80442),r(71715)),m=r(52011),h=r(30556),g=r(84230),w=r(48522),b=r(15235),v=r(86082),S=r(14661);const _=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new b.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:i}=await r.e(8062).then(r.bind(r,18062));return(0,c.k_)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.r9)(e),!0))))}async _setUserPrivileges(e,t){if(!n.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,c.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,S.Ss)(r);let n,s;if(i)n=r.portal.url;else try{n=await(0,g.oP)(this.url,t)}catch(e){(0,c.r9)(e)}if(!n||!(0,d.Zo)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;s=await(o.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.r9)(e)}if(!s)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await r.reload():(r=new b.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return(0,S.Ss)(r)}catch(e){(0,c.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=C.credential===t?C.user:await this._fetchEditingUser(e);return C.credential=t,C.user=r,null==r||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=o.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=w.Z.getDefault();if(n&&n.loaded&&(0,d.Fv)(n.restUrl)===(0,d.Fv)(i))return n.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,l.q6)((0,s.default)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?v.default.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||w.Z.getDefault());return r&&i&&!(0,d.tm)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,y.Cb)({type:b.default})],t.prototype,"portalItem",null),(0,i._)([(0,f.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,h.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,y.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,y.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,y.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,y.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,m.j)("esri.layers.mixins.PortalLayer")],t),t},C={credential:null,user:null}},28294:(e,t,r)=>{r.d(t,{n:()=>d});var i=r(43697),n=r(92835),o=r(84552),s=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),u=r(35671),p=r(76259),c=r(78981);const d=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,n=c.v.fromJSON(r.timeOffsetUnits);return i&&n?new o.Z({value:i,unit:n}):null}set timeInfo(e){(0,u.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,s.Cb)({type:n.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,i._)([(0,s.Cb)({type:o.Z})],t.prototype,"timeOffset",void 0),(0,i._)([(0,l.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,i._)([(0,s.Cb)({value:null,type:p.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,i._)([(0,s.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,i._)([(0,a.j)("esri.layers.mixins.TemporalLayer")],t),t}},16467:(e,t,r)=>{r.d(t,{$9:()=>g,G4:()=>v,Lu:()=>h,WW:()=>I,d:()=>C,eS:()=>_,gp:()=>S,j:()=>b,w9:()=>w,yN:()=>x}),r(66577);var i=r(3172),n=r(20102),o=r(92604),s=r(8744),l=r(40488),a=r(98732),u=r(44876),p=r(92722),c=r(25278),d=r(99514),y=r(86719),f=r(82971);const m=o.Z.getLogger("esri.layers.graphics.sources.ogcfeature"),h="http://www.opengis.net/def/crs/",g=`${h}OGC/1.3/CRS84`;async function w(e,t,r={},o=5){const{links:s}=e,l=E(s,"items","application/geo+json")||E(s,"http://www.opengis.net/def/rel/ogc/1.0/items","application/geo+json");if(null==l)throw new n.Z("ogc-feature-layer:missing-items-page","Missing items url");const{data:a}=await(0,i.default)(l.href,{signal:r.signal,query:{limit:o,...r.customParameters,token:r.apiKey},headers:{accept:"application/geo+json"}});await(0,p.O3)(a);const u=(0,p.my)(a,{geometryType:t.geometryType}),f=t.fields||u.fields||[],h=null!=t.hasZ?t.hasZ:u.hasZ,g=u.geometryType,w=t.objectIdField||u.objectIdFieldName||"OBJECTID";let b=t.timeInfo;const v=f.find((({name:e})=>e===w));if(v)v.editable=!1,v.nullable=!1;else{if(!u.objectIdFieldType)throw new n.Z("ogc-feature-layer:missing-feature-id","Collection geojson require a feature id as a unique identifier");f.unshift({name:w,alias:w,type:"number"===u.objectIdFieldType?"esriFieldTypeOID":"esriFieldTypeString",editable:!1,nullable:!1})}if(w!==u.objectIdFieldName){const e=f.find((({name:e})=>e===u.objectIdFieldName));e&&(e.type="esriFieldTypeInteger")}f===u.fields&&u.unknownFields.length>0&&m.warn({name:"ogc-feature-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:u.unknownFields}});for(const e of f){if(null==e.name&&(e.name=e.alias),null==e.alias&&(e.alias=e.name),"esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type&&(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable),!e.name)throw new n.Z("ogc-feature-layer:invalid-field-name","field name is missing",{field:e});if(!y.v.jsonValues.includes(e.type))throw new n.Z("ogc-feature-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e})}if(b){const e=new d.Z(f);if(b.startTimeField){const t=e.get(b.startTimeField);t?(b.startTimeField=t.name,t.type="esriFieldTypeDate"):b.startTimeField=null}if(b.endTimeField){const t=e.get(b.endTimeField);t?(b.endTimeField=t.name,t.type="esriFieldTypeDate"):b.endTimeField=null}if(b.trackIdField){const t=e.get(b.trackIdField);t?b.trackIdField=t.name:(b.trackIdField=null,m.warn({name:"ogc-feature-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:b}}))}b.startTimeField||b.endTimeField||(m.warn({name:"ogc-feature-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:b}}),b=null)}return{drawingInfo:g?(0,c.bU)(g):null,extent:R(e),geometryType:g,fields:f,hasZ:!!h,objectIdField:w,timeInfo:b}}async function b(e,t={}){const{links:r}=e,o=E(r,"data","application/json")||E(r,"http://www.opengis.net/def/rel/ogc/1.0/data","application/json");if(null==o)throw new n.Z("ogc-feature-layer:missing-collections-page","Missing collections url");const{apiKey:s,customParameters:l,signal:a}=t,{data:u}=await(0,i.default)(o.href,{signal:a,headers:{accept:"application/json"},query:{...l,token:s}});return u}async function v(e,t={}){const{links:r}=e,o=E(r,"conformance","application/json")||E(r,"http://www.opengis.net/def/rel/ogc/1.0/conformance","application/json");if(null==o)throw new n.Z("ogc-feature-layer:missing-conformance-page","Missing conformance url");const{apiKey:s,customParameters:l,signal:a}=t,{data:u}=await(0,i.default)(o.href,{signal:a,headers:{accept:"application/json"},query:{...l,token:s}});return u}async function S(e,t={}){const{apiKey:r,customParameters:n,signal:o}=t,{data:s}=await(0,i.default)(e,{signal:o,headers:{accept:"application/json"},query:{...n,token:r}});return s}async function _(e,t={}){const r="application/vnd.oai.openapi+json;version=3.0",n=E(e.links,"service-desc",r);if(null==n)return m.warn("ogc-feature-layer:missing-openapi-page","The OGC API-Features server does not have an OpenAPI page."),null;const{apiKey:o,customParameters:s,signal:l}=t,{data:a}=await(0,i.default)(n.href,{signal:l,headers:{accept:r},query:{...s,token:o}});return a}function C(e){const t=/^http:\/\/www\.opengis.net\/def\/crs\/(?<authority>.*)\/(?<version>.*)\/(?<code>.*)$/i.exec(e),r=t?.groups;if(!r)return null;const{authority:i,code:n}=r;switch(i.toLowerCase()){case"ogc":switch(n.toLowerCase()){case"crs27":return f.Z.GCS_NAD_1927.wkid;case"crs83":return 4269;case"crs84":case"crs84h":return f.Z.WGS84.wkid;default:return null}case"esri":case"epsg":{const e=Number.parseInt(n,10);return Number.isNaN(e)?null:e}default:return null}}async function x(e,t,r){const i=await I(e,t,r);return(0,a.cn)(i)}async function I(e,t,r){const{collection:o,layerDefinition:c,maxRecordCount:d,queryParameters:{apiKey:y,customParameters:m},spatialReference:h,supportedCrs:g}=e,{links:w}=o,b=E(w,"items","application/geo+json")||E(w,"http://www.opengis.net/def/rel/ogc/1.0/items","application/geo+json");if(null==b)throw new n.Z("ogc-feature-layer:missing-items-page","Missing items url");const{geometry:v,num:S,start:_,timeExtent:C,where:x}=t;if(t.objectIds)throw new n.Z("ogc-feature-layer:query-by-objectids-not-supported","Queries with objectids are not supported");const I=f.Z.fromJSON(h),T=t.outSpatialReference??I,R=T.isWGS84?null:F(T,g),P=j(v,g),O=function(e){if(null==e)return null;const{start:t,end:r}=e;return`${null!=t?t.toISOString():".."}/${null!=r?r.toISOString():".."}`}(C),Z=null!=(D=x)&&D&&"1=1"!==D?D:null,M=S??(null!=_&&void 0!==_?10:d),{data:N}=await(0,i.default)(b.href,{...r,query:{...m,...P,crs:R,datetime:O,query:Z,limit:M,startindex:_,token:y},headers:{accept:"application/geo+json"}});var D;let G=!1;N.links&&(G=!!N.links.find((e=>"next"===e.rel))),!G&&Number.isInteger(N.numberMatched)&&Number.isInteger(N.numberReturned)&&(G=N.numberReturned<N.numberMatched);const{fields:U,geometryType:k,hasZ:q,objectIdField:L}=c,A=(0,p.lG)(N,{geometryType:k,hasZ:q,objectIdField:L});if(!R&&T.isWebMercator)for(const e of A)if(null!=e.geometry&&null!=k){const t=(0,a.di)(e.geometry,k,q,!1);t.spatialReference=f.Z.WGS84,e.geometry=(0,a.GH)((0,l.iV)(t,T))}for(const e of A)e.objectId=e.attributes[L];const $=R||!R&&T.isWebMercator?T.toJSON():s.Zn,B=new u.Z;return B.exceededTransferLimit=G,B.features=A,B.fields=U,B.geometryType=k,B.hasZ=q,B.objectIdFieldName=L,B.spatialReference=$,B}function F(e,t){const{isWebMercator:r,wkid:i}=e;if(!i)return null;const n=r?t[3857]??t[102100]??t[102113]??t[900913]:t[e.wkid];return n?`${h}${n}`:null}function T(e){if(null==e)return"";const{xmin:t,ymin:r,xmax:i,ymax:n}=e;return`${t},${r},${i},${n}`}function j(e,t){if(!function(e){return null!=e&&"extent"===e.type}(e))return null;const{spatialReference:r}=e;if(!r||r.isWGS84)return{bbox:T(e)};const i=F(r,t);return null!=i?{bbox:T(e),"bbox-crs":i}:r.isWebMercator?{bbox:T((0,l.iV)(e,f.Z.WGS84))}:null}function R(e){const t=e.extent?.spatial;if(!t)return null;const r=t.bbox[0],i=4===r.length,n=r[0],o=r[1],s=i?void 0:r[2];return{xmin:n,ymin:o,xmax:i?r[2]:r[3],ymax:i?r[3]:r[4],zmin:s,zmax:i?void 0:r[5],spatialReference:f.Z.WGS84.toJSON()}}function E(e,t,r){return e.find((e=>e.rel===t&&e.type===r))||e.find((e=>e.rel===t&&!e.type))}},70082:(e,t,r)=>{r.d(t,{Z:()=>c});var i=r(43697),n=r(2368),o=r(35454),s=r(96674),l=r(5600),a=(r(75215),r(67676),r(80442),r(52011));const u=new o.X({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let p=class extends((0,n.J)(s.wq)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"name",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"description",void 0),(0,i._)([(0,l.Cb)({json:{read:u.read,write:u.write}})],p.prototype,"drawingTool",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,i._)([(0,a.j)("esri.layers.support.FeatureTemplate")],p);const c=p},16451:(e,t,r)=>{r.d(t,{Z:()=>y});var i=r(43697),n=r(2368),o=r(96674),s=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),u=r(30556),p=r(72729),c=r(70082);let d=class extends((0,n.J)(o.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,p.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,s.Cb)({json:{write:!0}})],d.prototype,"id",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],d.prototype,"name",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],d.prototype,"domains",void 0),(0,i._)([(0,l.r)("domains")],d.prototype,"readDomains",null),(0,i._)([(0,u.c)("domains")],d.prototype,"writeDomains",null),(0,i._)([(0,s.Cb)({type:[c.Z],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,i._)([(0,a.j)("esri.layers.support.FeatureType")],d);const y=d},76259:(e,t,r)=>{r.d(t,{Z:()=>m});var i=r(43697),n=r(92835),o=r(84552),s=r(2368),l=r(96674),a=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),p=r(52011),c=r(30556),d=r(80216);function y(e,t){return o.Z.fromJSON({value:e,unit:t})}let f=class extends((0,s.J)(l.wq)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeReference=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),i=new Date(t.timeExtent[1]);return new n.Z({start:r,end:i})}writeFullTimeExtent(e,t){e&&null!=e.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?y(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?y(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i._)([(0,a.Cb)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],f.prototype,"cumulative",void 0),(0,i._)([(0,a.Cb)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],f.prototype,"endField",void 0),(0,i._)([(0,a.Cb)({type:n.Z,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"fullTimeExtent",void 0),(0,i._)([(0,u.r)("fullTimeExtent",["timeExtent"])],f.prototype,"readFullTimeExtent",null),(0,i._)([(0,c.c)("fullTimeExtent")],f.prototype,"writeFullTimeExtent",null),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"hasLiveData",void 0),(0,i._)([(0,a.Cb)({type:o.Z,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"interval",void 0),(0,i._)([(0,u.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],f.prototype,"readInterval",null),(0,i._)([(0,c.c)("interval")],f.prototype,"writeInterval",null),(0,i._)([(0,a.Cb)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],f.prototype,"startField",void 0),(0,i._)([(0,a.Cb)({type:d.Z,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"timeReference",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"trackIdField",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],f.prototype,"useTime",void 0),f=(0,i._)([(0,p.j)("esri.layers.support.TimeInfo")],f);const m=f},30707:(e,t,r)=>{r.d(t,{a:()=>c,r:()=>u});var i=r(20102),n=r(22974),o=r(92604),s=r(54306);const l=o.Z.getLogger("esri.layers.support.labelingInfo"),a=/\[([^\[\]]+)\]/gi;function u(e,t,r){return e?e.map((e=>{const i=new s.Z;if(i.read(e,r),i.labelExpression){const e=t.fields||t.layerDefinition&&t.layerDefinition.fields||this.fields;i.labelExpression=i.labelExpression.replaceAll(a,((t,r)=>`[${function(e,t){if(!t)return e;const r=e.toLowerCase();for(let e=0;e<t.length;e++){const i=t[e].name;if(i.toLowerCase()===r)return i}return e}(r,e)}]`))}return i})):null}const p={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 c(e,t){const r=(0,n.d9)(e);return r.some((e=>function(e,t){const r=e.labelPlacement,n=p[t];if(!e.symbol)return l.warn("No ILabelClass symbol specified."),!0;if(!n)return l.error(new i.Z("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),!0;if(!n.includes(r)){const i=n[0];r&&l.warn(`Found invalid label placement type ${r} for ${t}. Defaulting to ${i}`),e.labelPlacement=i}return!1}(e,t)))?[]:r}},78981:(e,t,r)=>{r.d(t,{v:()=>i});const i=(0,r(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},74889:(e,t,r)=>{r.d(t,{Z:()=>b});var i,n=r(43697),o=r(66577),s=r(38171),l=r(35454),a=r(96674),u=r(22974),p=r(5600),c=(r(75215),r(71715)),d=r(52011),y=r(30556),f=r(82971),m=r(33955),h=r(1231);const g=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=i=class extends a.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=f.Z.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const n=e[t],o=s.Z.fromJSON(n),l=n.geometry&&n.geometry.spatialReference;null==o.geometry||l||(o.geometry.spatialReference=r);const a=n.aggregateGeometries,u=o.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],i=a[e],n=i?.spatialReference;null==t||n||(t.spatialReference=r)}i.push(o)}return i}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(e&&null!=e.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,m.im)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=f.Z.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e&&e[r];i.geometry=t&&t.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((n-e)/r)));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[o,s]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*o+i),(e=>n-e*s),l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,n;const o=[];for(let s=0,l=e.length;s<l;s++){const l=e[s];if(s>0){const e=t(l[0]),s=r(l[1]);e===i&&s===n||(o.push([e-i,s-n]),i=e,n=s)}else i=t(l[0]),n=r(l[1]),o.push([i,n])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,m.oU)(e)?e.rings:e.paths,n=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],s=this._quantizePoints(o,t,r);s&&n.push(s)}return n.length>0?((0,m.oU)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,m.oU)(e)?e.rings:e.paths;let s,l;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(s+=n[0],l+=n[1]):(s=n[0],l=n[1]),n[0]=t(s),n[1]=r(l)}}if(i&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,l;for(let e=0,i=o.length;e<i;e++){const i=o[e];e>0?(s+=i[0],l+=i[1]):(s=i[0],l=i[1]),i[0]=t(s),i[1]=r(l)}if(i&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2])}}:null}};(0,n._)([(0,p.Cb)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,n._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,n._)([(0,p.Cb)({type:[s.Z],json:{write:!0}})],w.prototype,"features",void 0),(0,n._)([(0,c.r)("features")],w.prototype,"readFeatures",null),(0,n._)([(0,p.Cb)({type:[h.Z],json:{write:!0}})],w.prototype,"fields",void 0),(0,n._)([(0,p.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,n._)([(0,y.c)("geometryType")],w.prototype,"writeGeometryType",null),(0,n._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,n._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,n._)([(0,p.Cb)({types:o.qM,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,n._)([(0,c.r)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,n._)([(0,p.Cb)({type:f.Z,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,n._)([(0,y.c)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,n._)([(0,p.Cb)({json:{write:!0}})],w.prototype,"transform",void 0),w=i=(0,n._)([(0,d.j)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const b=w},58333:(e,t,r)=>{r.d(t,{ET:()=>o,I4:()=>n,eG:()=>a,lF:()=>s,lj:()=>p,qP:()=>l,wW:()=>u});const i=[252,146,31,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},s={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},a={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},p={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7616],{95401:(e,t,r)=>{r.d(t,{e:()=>l});var n,o,i,s=r(5732),a={exports:{}};n=a,o=function(){function e(e,r,o){o=o||2;var i,s,a,c,u,p,h,f=r&&r.length,g=f?r[0]*o:e.length,m=t(e,0,g,o,!0),d=[];if(!m||m.next===m.prev)return d;if(f&&(m=l(e,r,m,o)),e.length>80*o){i=a=e[0],s=c=e[1];for(var y=o;y<g;y+=o)(u=e[y])<i&&(i=u),(p=e[y+1])<s&&(s=p),u>a&&(a=u),p>c&&(c=p);h=0!==(h=Math.max(a-i,c-s))?1/h:0}return n(m,d,o,i,s,h),d}function t(e,t,r,n,o){var i,s;if(o===M(e,t,r,n)>0)for(i=t;i<r;i+=n)s=_(i,e[i],e[i+1],s);else for(i=r-n;i>=t;i-=n)s=_(i,e[i],e[i+1],s);if(s&&v(s,s.next)){var a=s.next;C(s),s=a}return s}function r(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!v(n,n.next)&&0!==x(n.prev,n,n.next))n=n.next;else{var o=n.prev;if(C(n),(n=t=o)===n.next)break;r=!0}}while(r||n!==t);return t}function n(e,t,l,c,u,p,h){if(e){!h&&p&&f(e,c,u,p);for(var g,m,d=e;e.prev!==e.next;)if(g=e.prev,m=e.next,p?i(e,c,u,p):o(e))t.push(g.i/l),t.push(e.i/l),t.push(m.i/l),C(e),e=m.next,d=m.next;else if((e=m)===d){h?1===h?n(e=s(r(e),t,l),t,l,c,u,p,2):2===h&&a(e,t,l,c,u,p):n(r(e),t,l,c,u,p,1);break}}}function o(e){var t=e.prev,r=e,n=e.next;if(x(t,r,n)>=0)return!1;for(var o=e.next.next;o!==e.prev;){if(d(t.x,t.y,r.x,r.y,n.x,n.y,o.x,o.y)&&x(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function i(e,t,r,n){var o=e.prev,i=e,s=e.next;if(x(o,i,s)>=0)return!1;for(var a=o.x<i.x?o.x<s.x?o.x:s.x:i.x<s.x?i.x:s.x,l=o.y<i.y?o.y<s.y?o.y:s.y:i.y<s.y?i.y:s.y,c=o.x>i.x?o.x>s.x?o.x:s.x:i.x>s.x?i.x:s.x,u=o.y>i.y?o.y>s.y?o.y:s.y:i.y>s.y?i.y:s.y,p=g(a,l,t,r,n),h=g(c,u,t,r,n),f=e.prevZ,m=e.nextZ;f&&f.z>=p&&m&&m.z<=h;){if(f!==e.prev&&f!==e.next&&d(o.x,o.y,i.x,i.y,s.x,s.y,f.x,f.y)&&x(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,m!==e.prev&&m!==e.next&&d(o.x,o.y,i.x,i.y,s.x,s.y,m.x,m.y)&&x(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;f&&f.z>=p;){if(f!==e.prev&&f!==e.next&&d(o.x,o.y,i.x,i.y,s.x,s.y,f.x,f.y)&&x(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;m&&m.z<=h;){if(m!==e.prev&&m!==e.next&&d(o.x,o.y,i.x,i.y,s.x,s.y,m.x,m.y)&&x(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function s(e,t,n){var o=e;do{var i=o.prev,s=o.next.next;!v(i,s)&&w(i,o,o.next,s)&&T(i,s)&&T(s,i)&&(t.push(i.i/n),t.push(o.i/n),t.push(s.i/n),C(o),C(o.next),o=e=s),o=o.next}while(o!==e);return r(o)}function a(e,t,o,i,s,a){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&y(l,c)){var u=Z(l,c);return l=r(l,l.next),u=r(u,u.next),n(l,t,o,i,s,a),void n(u,t,o,i,s,a)}c=c.next}l=l.next}while(l!==e)}function l(e,n,o,i){var s,a,l,u=[];for(s=0,a=n.length;s<a;s++)(l=t(e,n[s]*i,s<a-1?n[s+1]*i:e.length,i,!1))===l.next&&(l.steiner=!0),u.push(m(l));for(u.sort(c),s=0;s<u.length;s++)o=r(o=p(u[s],o),o.next);return o}function c(e,t){return e.x-t.x}function u(e){if(e.next.prev===e)return e;let t=e;for(;;){const r=t.next;if(r.prev===t||r===t||r===e)break;t=r}return t}function p(e,t){var n=function(e,t){var r,n=t,o=e.x,i=e.y,s=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){var a=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(a<=o&&a>s){if(s=a,a===o){if(i===n.y)return n;if(i===n.next.y)return n.next}r=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!r)return null;if(o===s)return r;var l,c=r,u=r.x,p=r.y,f=1/0;n=r;do{o>=n.x&&n.x>=u&&o!==n.x&&d(i<p?o:s,i,u,p,i<p?s:o,i,n.x,n.y)&&(l=Math.abs(i-n.y)/(o-n.x),T(n,e)&&(l<f||l===f&&(n.x>r.x||n.x===r.x&&h(r,n)))&&(r=n,f=l)),n=n.next}while(n!==c);return r}(e,t);if(!n)return t;var o=Z(n,e),i=r(n,n.next);let s=u(o);return r(s,s.next),i=u(i),u(t===n?i:t)}function h(e,t){return x(e.prev,e,t.prev)<0&&x(t.next,e,e.next)<0}function f(e,t,r,n){var o=e;do{null===o.z&&(o.z=g(o.x,o.y,t,r,n)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,function(e){var t,r,n,o,i,s,a,l,c=1;do{for(r=e,e=null,i=null,s=0;r;){for(s++,n=r,a=0,t=0;t<c&&(a++,n=n.nextZ);t++);for(l=c;a>0||l>0&&n;)0!==a&&(0===l||!n||r.z<=n.z)?(o=r,r=r.nextZ,a--):(o=n,n=n.nextZ,l--),i?i.nextZ=o:e=o,o.prevZ=i,i=o;r=n}i.nextZ=null,c*=2}while(s>1)}(o)}function g(e,t,r,n,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*o)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*o)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function m(e){var t=e,r=e;do{(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next}while(t!==e);return r}function d(e,t,r,n,o,i,s,a){return(o-s)*(t-a)-(e-s)*(i-a)>=0&&(e-s)*(n-a)-(r-s)*(t-a)>=0&&(r-s)*(i-a)-(o-s)*(n-a)>=0}function y(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&w(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&(T(e,t)&&T(t,e)&&function(e,t){var r=e,n=!1,o=(e.x+t.x)/2,i=(e.y+t.y)/2;do{r.y>i!=r.next.y>i&&r.next.y!==r.y&&o<(r.next.x-r.x)*(i-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)&&(x(e.prev,e,t.prev)||x(e,t.prev,t))||v(e,t)&&x(e.prev,e,e.next)>0&&x(t.prev,t,t.next)>0)}function x(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function v(e,t){return e.x===t.x&&e.y===t.y}function w(e,t,r,n){var o=A(x(e,t,r)),i=A(x(e,t,n)),s=A(x(r,n,e)),a=A(x(r,n,t));return o!==i&&s!==a||!(0!==o||!b(e,r,t))||!(0!==i||!b(e,n,t))||!(0!==s||!b(r,e,n))||!(0!==a||!b(r,t,n))}function b(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function A(e){return e>0?1:e<0?-1:0}function T(e,t){return x(e.prev,e,e.next)<0?x(e,t,e.next)>=0&&x(e,e.prev,t)>=0:x(e,t,e.prev)<0||x(e,e.next,t)<0}function Z(e,t){var r=new S(e.i,e.x,e.y),n=new S(t.i,t.x,t.y),o=e.next,i=t.prev;return e.next=t,t.prev=e,r.next=o,o.prev=r,n.next=r,r.prev=n,i.next=n,n.prev=i,n}function _(e,t,r,n){var o=new S(e,t,r);return n?(o.next=n.next,o.prev=n,n.next.prev=o,n.next=o):(o.prev=o,o.next=o),o}function C(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function S(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function M(e,t,r,n){for(var o=0,i=t,s=r-n;i<r;i+=n)o+=(e[s]-e[i])*(e[i+1]+e[s+1]),s=i;return o}return e.deviation=function(e,t,r,n){var o=t&&t.length,i=o?t[0]*r:e.length,s=Math.abs(M(e,0,i,r));if(o)for(var a=0,l=t.length;a<l;a++){var c=t[a]*r,u=a<l-1?t[a+1]*r:e.length;s-=Math.abs(M(e,c,u,r))}var p=0;for(a=0;a<n.length;a+=3){var h=n[a]*r,f=n[a+1]*r,g=n[a+2]*r;p+=Math.abs((e[h]-e[g])*(e[f+1]-e[h+1])-(e[h]-e[f])*(e[g+1]-e[h+1]))}return 0===s&&0===p?0:Math.abs((p-s)/s)},e.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},n=0,o=0;o<e.length;o++){for(var i=0;i<e[o].length;i++)for(var s=0;s<t;s++)r.vertices.push(e[o][i][s]);o>0&&(n+=e[o-1].length,r.holes.push(n))}return r},e},void 0!==(i=o())&&(n.exports=i);const l=(0,s.g)(a.exports)},46521:(e,t,r)=>{function n(){return[1,0,0,0,1,0,0,0,1]}function o(e,t,r,n,o,i,s,a,l){return[e,t,r,n,o,i,s,a,l]}function i(e,t){return new Float64Array(e,t,9)}r.d(t,{a:()=>i,c:()=>n,f:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:n,createView:i,fromValues:o},Symbol.toStringTag,{value:"Module"}))},13598:(e,t,r)=>{function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}function i(e,t){return new Float64Array(e,t,16)}r.d(t,{I:()=>s,a:()=>i,b:()=>o,c:()=>n});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:o,create:n,createView:i,fromValues:function(e,t,r,n,o,i,s,a,l,c,u,p,h,f,g,m){return[e,t,r,n,o,i,s,a,l,c,u,p,h,f,g,m]}},Symbol.toStringTag,{value:"Module"}))},94961:(e,t,r)=>{function n(){return[0,0,0,1]}function o(e){return[e[0],e[1],e[2],e[3]]}function i(e,t){return new Float64Array(e,t,4)}r.d(t,{I:()=>s,a:()=>n,b:()=>o,c:()=>i});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:o,create:n,createView:i,fromValues:function(e,t,r,n){return[e,t,r,n]}},Symbol.toStringTag,{value:"Module"}))},83025:(e,t,r)=>{r.d(t,{JK:()=>a,QZ:()=>i,Rq:()=>s,bg:()=>o,mB:()=>l});var n=r(1533);function o(e,t=!1){return e<=n.DB?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function i(e){return((0,n.kJ)(e)?e.length:e.byteLength/8)<=n.DB?Array.from(e):new Float64Array(e)}function s(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}function a(e,t){for(let r=0;r<t.length;++r)e[r]=t[r];return e}function l(e){return Array.isArray(e)?new Float64Array(e):e}},24882:(e,t,r)=>{r.d(t,{$z:()=>s,KF:()=>u,mi:()=>o});var n=r(1533);function o(e){return(0,n.kJ)(e)?e.length<n.DB?e:i(e):e.length<n.DB?Array.from(e):e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:i(e)}function i(e){let t=!0;for(const r of e){if(r>=65536)return(0,n.kJ)(e)?new Uint32Array(e):e;r>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}function s(e){return e<=n.DB?new Array(e):e<=65536?new Uint16Array(e):new Uint32Array(e)}let a=(()=>{const e=new Uint32Array(131072);for(let t=0;t<e.length;++t)e[t]=t;return e})();const l=[0],c=(()=>{const e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function u(e){if(1===e)return l;if(e<n.DB)return Array.from(new Uint16Array(c.buffer,0,e));if(e<c.length)return new Uint16Array(c.buffer,0,e);if(e>a.length){const t=Math.max(2*a.length,e);a=new Uint32Array(t);for(let e=0;e<a.length;e++)a[e]=e}return new Uint32Array(a.buffer,0,e)}new Uint8Array(65536)},62540:(e,t,r)=>{r.d(t,{Z:()=>x});var n,o=r(43697),i=r(96674),s=r(22974),a=r(92604),l=r(5600),c=r(90578),u=r(52011),p=r(75215),h=r(65542),f=r(60746),g=r(71630);const m="esri.geometry.support.MeshComponent",d=a.Z.getLogger(m);let y=n=class extends i.wq{static from(e){return(0,p.TJ)(n,e)}constructor(e){super(e),this.faces=null,this.material=null,this.shading="source",this.trustSourceNormals=!1}castFaces(e){return(0,g.X)(e,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},d)}castMaterial(e){return(0,p.TJ)(e&&"object"==typeof e&&("metallic"in e||"roughness"in e||"metallicRoughnessTexture"in e)?f.Z:h.Z,e)}clone(){return new n({faces:(0,s.d9)(this.faces),shading:this.shading,material:(0,s.d9)(this.material),trustSourceNormals:this.trustSourceNormals})}cloneWithDeduplication(e,t){const r={faces:(0,s.d9)(this.faces),shading:this.shading,material:this.material?this.material.cloneWithDeduplication(e,t):null,trustSourceNormals:this.trustSourceNormals};return new n(r)}get memoryUsage(){let e=0;return null!=this.faces&&(e+=this.faces.byteLength),null!=this.material&&(e+=this.material.memoryUsage),e}};(0,o._)([(0,l.Cb)({json:{write:!0}})],y.prototype,"faces",void 0),(0,o._)([(0,c.p)("faces")],y.prototype,"castFaces",null),(0,o._)([(0,l.Cb)({type:h.Z,json:{write:!0}})],y.prototype,"material",void 0),(0,o._)([(0,c.p)("material")],y.prototype,"castMaterial",null),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],y.prototype,"shading",void 0),(0,o._)([(0,l.Cb)({type:Boolean})],y.prototype,"trustSourceNormals",void 0),y=n=(0,o._)([(0,u.j)(m)],y);const x=y},85872:(e,t,r)=>{r.d(t,{Z:()=>h});var n=r(43697),o=r(2368),i=r(96674),s=r(5600),a=(r(75215),r(67676),r(80442),r(36030)),l=r(52011),c=r(65617),u=r(94139);let p=class extends((0,o.J)(i.wq)){constructor(e){super(e),this.type="georeferenced-relative",this.isRelative=!0,this.isGeoreferenced=!0,this.origin=(0,c.c)()}getOriginPoint(e){const[t,r,n]=this.origin;return new u.Z({x:t,y:r,z:n,spatialReference:e})}setOriginFormPoint({x:e,y:t,z:r}){this.origin=(0,c.f)(e,t,r??0)}};(0,n._)([(0,a.J)({georeferencedRelative:"georeferenced-relative"},{readOnly:!0})],p.prototype,"type",void 0),(0,n._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],p.prototype,"origin",void 0),p=(0,n._)([(0,l.j)("esri.geometry.support.MeshGeoreferencedRelativeVertexSpace")],p);const h=p},50567:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(43697),o=r(2368),i=r(96674),s=(r(92604),r(75215),r(67676),r(80442),r(20102),r(36030)),a=r(52011);let l=class extends((0,o.J)(i.wq)){constructor(){super({}),this.type="georeferenced",this.isRelative=!1,this.isGeoreferenced=!0}};(0,n._)([(0,s.J)({georeferenced:"georeferenced"},{readOnly:!0})],l.prototype,"type",void 0),l=(0,n._)([(0,a.j)("esri.geometry.support.MeshGeoreferencedVertexSpace")],l);const c=l},84555:(e,t,r)=>{r.d(t,{Z:()=>h});var n=r(43697),o=r(2368),i=r(96674),s=r(5600),a=(r(75215),r(67676),r(80442),r(36030)),l=r(52011),c=r(65617),u=r(94139);let p=class extends((0,o.J)(i.wq)){constructor(e){super(e),this.type="local",this.isRelative=!0,this.isGeoreferenced=!1,this.origin=(0,c.c)()}getOriginPoint(e){const[t,r,n]=this.origin;return new u.Z({x:t,y:r,z:n,spatialReference:e})}setOriginFormPoint({x:e,y:t,z:r}){this.origin=(0,c.f)(e,t,r??0)}};(0,n._)([(0,a.J)({local:"local"},{readOnly:!0})],p.prototype,"type",void 0),(0,n._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],p.prototype,"origin",void 0),p=(0,n._)([(0,l.j)("esri.geometry.support.MeshLocalVertexSpace")],p);const h=p},65542:(e,t,r)=>{r.d(t,{Z:()=>h});var n,o=r(43697),i=r(22303),s=r(96674),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011)),c=r(91024),u=r(80218);let p=n=class extends s.wq{constructor(e){super(e),this.color=null,this.colorTexture=null,this.colorTextureTransform=null,this.normalTexture=void 0,this.normalTextureTransform=void 0,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const r=null!=e?e.get(this):null;if(r)return r;const o=new n(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,o),o}clonePropertiesWithDeduplication(e){return{color:null!=this.color?this.color.clone():null,colorTexture:this.colorTexture?.cloneWithDeduplication(e),normalTexture:this.normalTexture?.cloneWithDeduplication(e),alphaMode:this.alphaMode,alphaCutoff:this.alphaCutoff,doubleSided:this.doubleSided,colorTextureTransform:this.colorTextureTransform?.clone(),normalTextureTransform:this.normalTextureTransform?.clone()}}get memoryUsage(){return this.getMemoryUsage()}getMemoryUsage(){let e=0;return e+=null!=this.color?16:0,null!=this.colorTexture&&(e+=this.colorTexture.memoryUsage),e+=null!=this.colorTextureTransform?20:0,null!=this.normalTexture&&(e+=this.normalTexture.memoryUsage),e+=null!=this.normalTextureTransform?20:0,e}};(0,o._)([(0,a.Cb)({type:i.Z,json:{write:!0}})],p.prototype,"color",void 0),(0,o._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],p.prototype,"colorTexture",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"colorTextureTransform",void 0),(0,o._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],p.prototype,"normalTexture",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"normalTextureTransform",void 0),(0,o._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],p.prototype,"alphaMode",void 0),(0,o._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],p.prototype,"alphaCutoff",void 0),(0,o._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],p.prototype,"doubleSided",void 0),p=n=(0,o._)([(0,l.j)("esri.geometry.support.MeshMaterial")],p);const h=p},60746:(e,t,r)=>{r.d(t,{Z:()=>h});var n,o=r(43697),i=r(22303),s=r(5600),a=(r(75215),r(67676),r(80442),r(52011)),l=r(65542),c=r(91024),u=r(80218);let p=n=class extends l.Z{constructor(e){super(e),this.emissiveColor=null,this.emissiveTexture=null,this.emissiveTextureTransform=void 0,this.occlusionTexture=null,this.occlusionTextureTransform=void 0,this.metallic=1,this.roughness=1,this.metallicRoughnessTexture=null,this.metallicRoughnessTextureTransform=void 0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const r=null!=e?e.get(this):null;if(r)return r;const o=new n(this.clonePropertiesWithDeduplication(t));return null!=e&&e.set(this,o),o}getMemoryUsage(){let e=super.getMemoryUsage();return e+=null!=this.emissiveColor?16:0,null!=this.emissiveTexture&&(e+=this.emissiveTexture.memoryUsage),e+=null!=this.emissiveTextureTransform?20:0,null!=this.occlusionTexture&&(e+=this.occlusionTexture.memoryUsage),e+=null!=this.occlusionTextureTransform?20:0,null!=this.metallicRoughnessTexture&&(e+=this.metallicRoughnessTexture.memoryUsage),e+=null!=this.metallicRoughnessTextureTransform?20:0,e}clonePropertiesWithDeduplication(e){return{...super.clonePropertiesWithDeduplication(e),emissiveColor:this.emissiveColor?.clone(),emissiveTexture:this.emissiveTexture?.cloneWithDeduplication(e),emissiveTextureTransform:this.emissiveTextureTransform?.clone(),occlusionTexture:this.occlusionTexture?.cloneWithDeduplication(e),occlusionTextureTransform:this.occlusionTextureTransform?.clone(),metallic:this.metallic,roughness:this.roughness,metallicRoughnessTexture:this.metallicRoughnessTexture?.cloneWithDeduplication(e),metallicRoughnessTextureTransform:this.metallicRoughnessTextureTransform?.clone()}}};(0,o._)([(0,s.Cb)({type:i.Z,json:{write:!0}})],p.prototype,"emissiveColor",void 0),(0,o._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],p.prototype,"emissiveTexture",void 0),(0,o._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"emissiveTextureTransform",void 0),(0,o._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],p.prototype,"occlusionTexture",void 0),(0,o._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"occlusionTextureTransform",void 0),(0,o._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],p.prototype,"metallic",void 0),(0,o._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],p.prototype,"roughness",void 0),(0,o._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],p.prototype,"metallicRoughnessTexture",void 0),(0,o._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"metallicRoughnessTextureTransform",void 0),p=n=(0,o._)([(0,a.j)("esri.geometry.support.MeshMaterialMetallicRoughness")],p);const h=p},91024:(e,t,r)=>{r.d(t,{Z:()=>v});var n=r(43697);r(80442);let o=null,i=!0;function s(){return o||(o=document.createElement("canvas"),o.width=1,o.height=1),o}function a(e,t,r){return r||(r=s()),r.getContext("2d").createImageData(e,t)}var l,c=r(96674),u=r(5600),p=r(75215),h=(r(67676),r(71715)),f=r(52011),g=r(30556),m=r(25929);const d=new WeakMap;let y=0,x=l=class extends c.wq{constructor(e){super(e),this.wrap="repeat"}get url(){return this._get("url")||null}set url(e){this._set("url",e),e&&this._set("data",null)}get data(){return this._get("data")||null}set data(e){this._set("data",e),e&&this._set("url",null)}writeData(e,t,r,n){if(e instanceof HTMLImageElement){const o={type:"image-element",src:(0,m.t)(e.src,n),crossOrigin:e.crossOrigin};t[r]=o}else if(e instanceof HTMLCanvasElement){const n=e.getContext("2d").getImageData(0,0,e.width,e.height),o={type:"canvas-element",imageData:this._encodeImageData(n)};t[r]=o}else if(e instanceof HTMLVideoElement){const o={type:"video-element",src:(0,m.t)(e.src,n),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload};t[r]=o}else if(e instanceof ImageData){const n={type:"image-data",imageData:this._encodeImageData(e)};t[r]=n}}readData(e){switch(e.type){case"image-element":{const t=new Image;return t.src=e.src,t.crossOrigin=e.crossOrigin,t}case"canvas-element":{const t=this._decodeImageData(e.imageData),r=document.createElement("canvas");return r.width=t.width,r.height=t.height,r.getContext("2d").putImageData(t,0,0),r}case"image-data":return this._decodeImageData(e.imageData);case"video-element":{const t=document.createElement("video");return t.src=e.src,t.crossOrigin=e.crossOrigin,t.autoplay=e.autoplay,t.loop=e.loop,t.muted=e.muted,t.preload=e.preload,t}default:return}}get transparent(){const e=this.data,t=this.url;if(e instanceof HTMLCanvasElement)return this._imageDataContainsTransparent(e.getContext("2d").getImageData(0,0,e.width,e.height));if(e instanceof ImageData)return this._imageDataContainsTransparent(e);if(t){const e=t.substr(t.length-4,4).toLowerCase(),r=t.substr(0,15).toLocaleLowerCase();if(".png"===e||"data:image/png;"===r)return!0}return!1}set transparent(e){this._overrideIfSome("transparent",e)}get contentHash(){const e="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",t=(t="")=>`d:${t},t:${this.transparent},w:${e}`;return null!=this.url?t(this.url):null!=this.data?this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?t(this.data.src):(d.has(this.data)||d.set(this.data,++y),t(d.get(this.data))):t()}get memoryUsage(){let e=0;if(e+=null!=this.url?this.url.length:0,null!=this.data){const t=this.data;"data"in t?e+=t.data.byteLength:t instanceof HTMLImageElement?e+=t.naturalWidth*t.naturalHeight*3:t instanceof HTMLCanvasElement&&(e+=t.width*t.height*3)}return e}clone(){const e={url:this.url,data:this.data,wrap:this._cloneWrap()};return new l(e)}cloneWithDeduplication(e){const t=e.get(this);if(t)return t;const r=this.clone();return e.set(this,r),r}_cloneWrap(){return"string"==typeof this.wrap?this.wrap:{horizontal:this.wrap.horizontal,vertical:this.wrap.vertical}}_encodeImageData(e){let t="";for(let r=0;r<e.data.length;r++)t+=String.fromCharCode(e.data[r]);return{data:btoa(t),width:e.width,height:e.height}}_decodeImageData(e){const t=atob(e.data),r=new Uint8ClampedArray(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return function(e,t,r,n){if(!t||!r)throw new Error("Cannot construct image data without dimensions");if(i)try{return new ImageData(e,t,r)}catch(e){i=!1}const o=a(t,r,void 0);return o.data.set(e,0),o}(r,e.width,e.height)}_imageDataContainsTransparent(e){for(let t=3;t<e.data.length;t+=4)if(255!==e.data[t])return!0;return!1}static from(e){return"string"==typeof e?new l({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new l({data:e}):(0,p.TJ)(l,e)}};(0,n._)([(0,u.Cb)({type:String,json:{write:m.w}})],x.prototype,"url",null),(0,n._)([(0,u.Cb)({json:{write:{overridePolicy(){return{enabled:!this.url}}}}}),(0,u.Cb)()],x.prototype,"data",null),(0,n._)([(0,g.c)("data")],x.prototype,"writeData",null),(0,n._)([(0,h.r)("data")],x.prototype,"readData",null),(0,n._)([(0,u.Cb)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],x.prototype,"transparent",null),(0,n._)([(0,u.Cb)({json:{write:!0}})],x.prototype,"wrap",void 0),(0,n._)([(0,u.Cb)({readOnly:!0})],x.prototype,"contentHash",null),x=l=(0,n._)([(0,f.j)("esri.geometry.support.MeshTexture")],x);const v=x},80218:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(43697),o=r(2368),i=r(96674),s=r(5600),a=(r(75215),r(67676),r(80442),r(52011));let l=class extends((0,o.J)(i.wq)){constructor(e){super(e),this.offset=[0,0],this.rotation=0,this.scale=[1,1]}};(0,n._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"offset",void 0),(0,n._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],l.prototype,"rotation",void 0),(0,n._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"scale",void 0),l=(0,n._)([(0,a.j)("esri.geometry.support.MeshTextureTransform")],l);const c=l},71630:(e,t,r)=>{r.d(t,{Q:()=>f,X:()=>m});var n,o=r(43697),i=r(96674),s=r(22974),a=r(92604),l=r(5600),c=r(90578),u=r(52011);const p="esri.geometry.support.MeshVertexAttributes",h=a.Z.getLogger(p);let f=n=class extends i.wq{constructor(e){super(e),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(e){return m(e,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},h)}castPosition(e){return e&&e instanceof Float32Array&&h.warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),m(e,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},h)}castUv(e){return m(e,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},h)}castNormal(e){return m(e,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},h)}castTangent(e){return m(e,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},h)}clone(){const e={position:(0,s.d9)(this.position),uv:(0,s.d9)(this.uv),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),color:(0,s.d9)(this.color)};return new n(e)}clonePositional(){const e={position:(0,s.d9)(this.position),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),uv:this.uv,color:this.color};return new n(e)}get memoryUsage(){let e=0;return e+=this.position.byteLength,null!=this.uv&&(e+=this.uv.byteLength),null!=this.normal&&(e+=this.normal.byteLength),null!=this.tangent&&(e+=this.tangent.byteLength),null!=this.color&&(e+=this.color.byteLength),e}};function g(e,t,r,n){const{loggerTag:o,stride:i}=t;return e.length%i!=0?(n.error(o,`Invalid array length, expected a multiple of ${i}`),new r([])):e}function m(e,t,r,n,o){if(!e)return e;if(e instanceof t)return g(e,n,t,o);for(const i of r)if(e instanceof i)return g(new t(e),n,t,o);if(Array.isArray(e))return g(new t(e),n,t,o);{const n=r.map((e=>`'${e.name}'`));return o.error(`Failed to set property, expected one of ${n}, but got ${e.constructor.name}`),new t([])}}function d(e,t,r){t[r]=function(e){const t=new Array(e.length);for(let r=0;r<e.length;r++)t[r]=e[r];return t}(e)}(0,o._)([(0,l.Cb)({json:{write:d}})],f.prototype,"color",void 0),(0,o._)([(0,c.p)("color")],f.prototype,"castColor",null),(0,o._)([(0,l.Cb)({nonNullable:!0,json:{write:d}})],f.prototype,"position",void 0),(0,o._)([(0,c.p)("position")],f.prototype,"castPosition",null),(0,o._)([(0,l.Cb)({json:{write:d}})],f.prototype,"uv",void 0),(0,o._)([(0,c.p)("uv")],f.prototype,"castUv",null),(0,o._)([(0,l.Cb)({json:{write:d}})],f.prototype,"normal",void 0),(0,o._)([(0,c.p)("normal")],f.prototype,"castNormal",null),(0,o._)([(0,l.Cb)({json:{write:d}})],f.prototype,"tangent",void 0),(0,o._)([(0,c.p)("tangent")],f.prototype,"castTangent",null),f=n=(0,o._)([(0,u.j)(p)],f)},84470:(e,t,r)=>{r.d(t,{CP:()=>a,JG:()=>g,LL:()=>l,NZ:()=>c,fV:()=>m,vj:()=>y,yT:()=>v,zE:()=>x});var n=r(3172),o=r(67676),i=r(95330),s=r(2981);class a{constructor(e,t,r){this.assetName=e,this.assetMimeType=t,this.parts=r}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,o.fS)(this.parts,e.parts,((e,t)=>e.equals(t)))}isOnService(e){return this.parts.every((t=>t.isOnService(e)))}makeHash(){let e="";for(const t of this.parts)e+=t.partHash;return e}async toBlob(e){const{parts:t}=this;if(1===t.length)return t[0].toBlob(e);const r=await Promise.all(t.map((t=>t.toBlob(e))));return(0,i.k_)(e),new Blob(r)}}class l{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){const{data:t}=await(0,n.default)(this.partUrl,{responseType:"blob"});return(0,i.k_)(e),t}}function c(e){return function(e){return!!e&&(Array.isArray(e)?e.some(f):f(e))}(e?.source)}function u(e){return!!Array.isArray(e)&&e.every((e=>e instanceof a))}const p=/^(model\/gltf\+json)|(model\/gltf-binary)$/,h=/\.(gltf|glb)/i;function f(e){if(e instanceof File){const{type:t,name:r}=e;return p.test(t)||h.test(r)}return p.test(e.assetMimeType)||h.test(e.assetName)}function g(e,t){if(!e)return!1;const{source:r}=e;return function(e,t){return Array.isArray(e)?e.every((e=>d(e,t))):d(e,t)}(r,t)}function m(e,t){if(e===t)return!0;const{source:r}=e,{source:n}=t;if(r===n)return!0;if(u(r)&&u(n)){if(r.length!==n.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...r].sort(e),o=[...n].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(o[e]))return!1;return!0}return!1}function d(e,t){return e instanceof a&&e.isOnService(t)}function y(e,t){return e instanceof File?(0,s.Ow)(e.name,t)??(0,s.S0)(e.type,t):(0,s.S0)(e.assetMimeType,t)??(0,s.Ow)(e.assetName,t)}function x(e){return Array.isArray(e)?e:[e]}function v(e){return!!e.original}},47545:(e,t,r)=>{r.d(t,{d:()=>i});var n=r(22021),o=r(24882);function i(e,t,r){const i=Array.isArray(e),u=i?e.length/t:e.byteLength/(4*t),p=i?e:new Uint32Array(e,0,u*t),h=r?.minReduction??0,f=r?.originalIndices||null,g=f?f.length:0,m=r?.componentOffsets||null;let d=0;if(m)for(let e=0;e<m.length-1;e++){const t=m[e+1]-m[e];t>d&&(d=t)}else d=u;const y=Math.floor(1.1*d)+1;(null==c||c.length<2*y)&&(c=new Uint32Array((0,n.Sf)(2*y)));for(let e=0;e<2*y;e++)c[e]=0;let x=0;const v=!!m&&!!f,w=v?g:u;let b=(0,o.$z)(u);const A=new Uint32Array(g),T=1.96;let Z=0!==h?Math.ceil(4*T*T/(h*h)*h*(1-h)):w,_=1,C=m?m[1]:w;for(let e=0;e<w;e++){if(e===Z){const t=1-x/e;if(t+T*Math.sqrt(t*(1-t)/e)<h)return null;Z*=2}if(e===C){for(let e=0;e<2*y;e++)c[e]=0;if(f)for(let e=m[_-1];e<m[_];e++)A[e]=b[f[e]];C=m[++_]}const r=v?f[e]:e,n=r*t,o=l(p,n,t);let i=o%y,a=x;for(;0!==c[2*i+1];){if(c[2*i]===o){const e=c[2*i+1]-1;if(s(p,n,e*t,t)){a=b[e];break}}i++,i>=y&&(i-=y)}a===x&&(c[2*i]=o,c[2*i+1]=r+1,x++),b[r]=a}if(0!==h&&1-x/u<h)return null;if(v){for(let e=m[_-1];e<A.length;e++)A[e]=b[f[e]];b=(0,o.mi)(A)}const S=i?new Array(x):new Uint32Array(x*t);x=0;for(let e=0;e<w;e++)b[e]===x&&(a(p,(v?f[e]:e)*t,S,x*t,t),x++);if(f&&!v){const e=new Uint32Array(g);for(let t=0;t<e.length;t++)e[t]=b[f[t]];b=(0,o.mi)(e)}return{buffer:Array.isArray(S)?S:S.buffer,indices:b,uniqueCount:x}}function s(e,t,r,n){for(let o=0;o<n;o++)if(e[t+o]!==e[r+o])return!1;return!0}function a(e,t,r,n,o){for(let i=0;i<o;i++)r[n+i]=e[t+i]}function l(e,t,r){let n=0;for(let o=0;o<r;o++)n=e[t+o]+n|0,n=n+(n<<11)+(n>>>2)|0;return n>>>0}let c=null},91681:(e,t,r)=>{r.r(t),r.d(t,{assetMapFromAssetMapsJSON:()=>Je,extractMesh:()=>$e,meshFeatureSetFromJSON:()=>Ve});var n,o,i=r(38171),s=r(92604),a=r(30175),l=r(65617),c=r(6570),u=r(43697),p=r(20102),h=r(3920),f=r(83379),g=r(609),m=r(95330),d=r(17445),y=r(5600),x=(r(75215),r(67676),r(80442),r(52011)),v=r(9361),w=r(94139),b=r(38913),A=r(3709),T=r(62540),Z=r(85872),_=r(50567),C=r(84555),S=r(2674),M=r(71630),R=r(95401),F=r(86662),j=r(83025),L=r(24882),E=r(47545);function D(e,t,r){const o=e.length,i=new Array(o),s=new Array(o),a=new Array(o);let l=0,c=0,u=0,p=0;for(let t=0;t<o;++t)p+=e[t].length;const h=(0,j.bg)(3*p);let f=0;for(let p=o-1;p>=0;p--){const g=e[p],m=r===n.CCW_IS_HOLE&&P(g);if(m&&1!==o)i[l++]=g;else{let e=g.length;for(let t=0;t<l;++t)e+=i[t].length;const r={index:f,pathLengths:new Array(l+1),count:e,holeIndices:new Array(l)};r.pathLengths[0]=g.length,g.length>0&&(a[u++]={index:f,count:g.length}),f=m?O(g,g.length-1,-1,h,f,g.length,t):O(g,0,1,h,f,g.length,t);for(let e=0;e<l;++e){const n=i[e];r.holeIndices[e]=f,r.pathLengths[e+1]=n.length,n.length>0&&(a[u++]={index:f,count:n.length}),f=O(n,0,1,h,f,n.length,t)}l=0,r.count>0&&(s[c++]=r)}}for(let e=0;e<l;++e){const r=i[e];r.length>0&&(a[u++]={index:f,count:r.length}),f=O(r,0,1,h,f,r.length,t)}return s.length=c,a.length=u,{position:h,polygons:s,outlines:a}}function O(e,t,r,n,o,i,s){o*=3;for(let a=0;a<i;++a){const i=e[t];n[o++]=i[0],n[o++]=i[1],n[o++]=s?i[2]:0,t+=r}return o/3}function P(e){return!(0,F.bu)(e,!1,!1)}(o=n||(n={}))[o.NONE=0]="NONE",o[o.CCW_IS_HOLE=1]="CCW_IS_HOLE";var U=r(66459);let N=null;function I(e,t){let r=1/0,n=1/0,o=1/0,i=-1/0,s=-1/0,a=-1/0;const l=e.length;let u=0;for(;u<l;){const t=e[u++],l=e[u++],c=e[u++];r=Math.min(r,t),n=Math.min(n,l),o=Math.min(o,c),i=Math.max(i,t),s=Math.max(s,l),a=Math.max(a,c)}return new c.Z({xmin:r,ymin:n,zmin:o,xmax:i,ymax:s,zmax:a,spatialReference:t})}var z=r(17896),k=r(44547),W=r(13442);const H="esri.geometry.support.meshUtils.centerAt";const B=(0,l.c)(),V=(0,l.c)(),$=(0,l.c)();var J=r(81271);function q(e){const t=(0,J.Yd)(e.url);return r=>{const n=(0,J.PF)(r,t,t),o=n?n.replace(/^ *\.\//,""):null;return(o?e.files.get(o):null)??r}}function G(e){return Q.fromBlob(e)}const K=/^(model\/gltf\+json)|(model\/gltf-binary)$/,Y=/\.(gltf|glb)/i;function X(e){const t=new Map;let r=null;for(const{name:n,mimeType:o,source:i}of e)(null==r||K.test(o)||Y.test(n))&&(r=i.url),t.set(n,i.url),i.files.forEach(((e,r)=>t.set(r,e)));if(null==r)throw new p.Z("mesh-load-external:missing-files","Missing files to load external mesh source");return new Q(r,(()=>e.forEach((({source:e})=>e.dispose()))),t)}class Q{constructor(e,t=(()=>{}),r=new Map){this.url=e,this.dispose=t,this.files=r}static fromBlob(e){const t=URL.createObjectURL(e);return new Q(t,(()=>URL.revokeObjectURL(t)))}}var ee=r(2368),te=r(46791),re=r(84470);let ne=class extends ee.j{constructor(){super(),this.externalSources=new te.Z,this._explicitDisplaySource=null}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(e){if(null!=e&&!(0,re.NZ)(e))throw new Error("Cannot use this source for display: it is not in a supported format.");this._explicitDisplaySource=e,e&&this.externalSources.every((t=>!(0,re.fV)(t,e)))&&this.externalSources.add(e)}clearSources(){this.displaySource=null,this.externalSources.removeAll()}getExternalSourcesOnService(e){return this.externalSources.items.filter((t=>(0,re.JG)(t,e)))}get _implicitDisplaySource(){return this.externalSources.find(re.NZ)}};(0,u._)([(0,y.Cb)()],ne.prototype,"externalSources",void 0),(0,u._)([(0,y.Cb)()],ne.prototype,"displaySource",null),(0,u._)([(0,y.Cb)()],ne.prototype,"_implicitDisplaySource",null),(0,u._)([(0,y.Cb)()],ne.prototype,"_explicitDisplaySource",void 0),ne=(0,u._)([(0,x.j)("esri.geometry.support.meshUtils.Metadata")],ne);var oe=r(21787),ie=r(46521),se=r(13598),ae=r(58995),le=r(56493);function ce(e,t){if(e)for(let r=0;r<e.length;r+=3)for(let n=0;n<3;n++)e[r+n]+=t[n]}const ue=(0,l.c)(),pe=(0,se.c)(),he=(0,ie.c)(),fe={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};function ge(e,t,r){e.isPlane||function(e){for(let t=0;t<e.position.length;t+=3)e.position[t+2]+=.5}(e),function(e,t){if(null==t)return;const r="number"==typeof t?[t,t,t]:[null!=t.width?t.width:1,null!=t.depth?t.depth:1,null!=t.height?t.height:1];xe[0]=r[0],xe[4]=r[1],xe[8]=r[2];for(let t=0;t<e.position.length;t+=3){for(let r=0;r<3;r++)ye[r]=e.position[t+r];(0,z.t)(ye,ye,xe);for(let r=0;r<3;r++)e.position[t+r]=ye[r]}if(r[0]!==r[1]||r[1]!==r[2]){xe[0]=1/r[0],xe[4]=1/r[1],xe[8]=1/r[2];for(let t=0;t<e.normal.length;t+=3){for(let r=0;r<3;r++)ye[r]=e.normal[t+r];(0,z.t)(ye,ye,xe),(0,z.n)(ye,ye);for(let r=0;r<3;r++)e.normal[t+r]=ye[r]}}}(e,r?.size);const{vertexAttributes:n,vertexSpace:o,transform:i}=(0,U.w1)(e,t,r);return{vertexAttributes:new M.Q({...n,uv:e.uv}),vertexSpace:o,transform:i,components:[new T.Z({faces:e.faces,material:r&&r.material||null})],spatialReference:t.spatialReference}}const me={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},de={south:0,east:1,north:2,west:3,up:4,down:5},ye=(0,l.c)(),xe=(0,ie.c)();var ve=r(52138);const we="esri.geometry.support.meshUtils.rotate";function be(e,t,r,n=l.Z){if(null!=e){(0,ve.d)(_e,(0,A.WH)(t),(0,A.ZZ)(t));for(let t=0;t<e.length;t+=r){for(let r=0;r<3;r++)Ae[r]=e[t+r]-n[r];(0,z.m)(Ae,Ae,_e);for(let r=0;r<3;r++)e[t+r]=Ae[r]+n[r]}}}const Ae=(0,l.c)(),Te=(0,l.c)(),Ze=(0,A.Ue)(),_e=(0,se.c)(),Ce=(0,ie.c)(),Se=(0,l.c)(),Me="esri.geometry.support.meshUtils.scale";function Re(e,t,r=l.Z){if(e)for(let n=0;n<e.length;n+=3){for(let t=0;t<3;t++)Fe[t]=e[n+t]-r[t];(0,z.g)(Fe,Fe,t);for(let t=0;t<3;t++)e[n+t]=Fe[t]+r[t]}}const Fe=(0,l.c)(),je=(0,l.c)(),Le=(0,l.c)();var Ee;const De="esri.geometry.Mesh",Oe={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:_.Z,"georeferenced-relative":Z.Z,local:C.Z}};let Pe=Ee=class extends((0,h.p)(f.Z.LoadableMixin((0,g.v)(v.Z)))){constructor(e){super(e),this.components=null,this.vertexSpace=new _.Z,this.transform=null,this.metadata=new ne,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new M.Q,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.handles.add((0,d.YP)((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((e=>e.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){const{components:e,spatialReference:t,vertexAttributes:r,vertexSpace:n}=this,o=r.position;if(0===o.length||e&&0===e.length)return new c.Z({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:t});if("local"===n.type){const{_untransformedExtent:e,transform:r}=this;return function({xmin:e,xmax:t,ymin:r,ymax:n,zmin:o,zmax:i},s,a,l){o??=0,i??=0,N??=new Float64Array(24);const c=N;return c[0]=e,c[1]=r,c[2]=o,c[3]=e,c[4]=n,c[5]=o,c[6]=t,c[7]=n,c[8]=o,c[9]=t,c[10]=r,c[11]=o,c[12]=e,c[13]=r,c[14]=i,c[15]=e,c[16]=n,c[17]=i,c[18]=t,c[19]=n,c[20]=i,c[21]=t,c[22]=r,c[23]=i,(0,U.project)(l,s,a,c,l,c),I(c,l)}(e,r,n,t)}if("georeferenced-relative"===n.type){const{transform:e}=this;return I((0,U.project)(t,e,n,o,t),t)}return I(o,t)}get _untransformedExtent(){return I(this.vertexAttributes.position,this.spatialReference)}get anchor(){const{vertexSpace:e}=this;if(e.isRelative)return e.getOriginPoint(this.spatialReference);const{center:t,zmin:r}=this._transformedExtent;return new w.Z({x:t.x,y:t.y,z:r,spatialReference:this.spatialReference})}get origin(){const{vertexSpace:e}=this;return e.isRelative?e.getOriginPoint(this.spatialReference):this._transformedExtent.center}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this.loaded?(this.components||(this.components=[]),this.components.push(T.Z.from(e)),this.notifyChange("components")):s.Z.getLogger(this).error("addComponent()","Mesh must be loaded before applying operations")}removeComponent(e){if(this.loaded){if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}s.Z.getLogger(this).error("removeComponent()","Provided component is not part of the list of components")}else s.Z.getLogger(this).error("removeComponent()","Mesh must be loaded before applying operations")}rotate(e,t,r,n){return(0,A.qw)(e,t,r,Ne),function(e,t,r){if(!e.vertexAttributes||!e.vertexAttributes.position||0===t[3])return;const{spatialReference:n,vertexSpace:o}=e;if(o.isRelative){(0,W.A)(o,we,r);const n=r?.origin??e.origin;e.transform??=new S.Z,function(e,t,r,n){const o=t.origin,i=(0,z.s)(Ae,n.x,n.y,n.z??0),s=(0,z.b)(Ae,i,o);e.applyLocalInverse(s,Te),e.rotation=(0,A.qC)(e.rotation,r,(0,A.Ue)()),e.applyLocalInverse(s,s),(0,z.b)(s,s,Te),e.translation=(0,z.a)((0,l.c)(),e.translation,s)}(e.transform,o,t,n)}else{const o=r?.origin??e.origin;(0,W.h)(n,r)?function(e,t,r){const n=e.spatialReference,o=(0,ae.rS)(n),i=Se;(0,k.KC)(r,i,o)||(0,k.KC)(e.origin,i,o);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,p=null!=l?new Float32Array(l.length):null;(0,k.Bm)(o,i,_e,o),(0,oe.f)(Ce,_e);const h=Ze;(0,z.t)((0,A.ZZ)(Ze),(0,A.ZZ)(t),Ce),h[3]=t[3],(0,le.XO)(s,n,c),null!=a&&null!=u&&(0,le.Iz)(a,s,c,n,u),null!=l&&null!=p&&(0,le.wi)(l,s,c,n,p),be(c,h,3,i),(0,le.To)(c,s,n),null!=a&&null!=u&&(be(u,h,3),(0,le.Yk)(u,s,c,n,a)),null!=l&&null!=p&&(be(p,h,4),(0,le.M2)(p,s,c,n,l)),e.vertexAttributesChanged()}(e,t,o):function(e,t,r){const n=Se;if(!(0,k.KC)(r,n,e.spatialReference)){const t=e.origin;n[0]=t.x,n[1]=t.y,n[2]=t.z,s.Z.getLogger(we).error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}be(e.vertexAttributes.position,t,3,n),be(e.vertexAttributes.normal,t,3),be(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged()}(e,t,o)}}(this,Ne,n),this}offset(e,t,r,n){return this.loaded?(Ue[0]=e,Ue[1]=t,Ue[2]=r,function(e,t,r){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{vertexSpace:n}=e;n.isRelative?((0,W.A)(n,"esri.geometry.support.meshUtils.offset",r),function(e,t){const r=e.origin;e.origin=(0,z.a)((0,l.c)(),r,t)}(n,t)):(0,W.h)(e.spatialReference,r)?function(e,t){const r=e.spatialReference,n=e.vertexAttributes.position,o=e.vertexAttributes.normal,i=e.vertexAttributes.tangent,s=new Float64Array(n.length),a=null!=o?new Float32Array(o.length):null,l=null!=i?new Float32Array(i.length):null,c=e.extent.center,u=ue;(0,k.Bm)(r,[c.x,c.y,c.z],pe,(0,ae.rS)(r)),(0,oe.f)(he,pe),(0,z.t)(u,t,he),(0,le.XO)(n,r,s),null!=o&&null!=a&&(0,le.Iz)(o,n,s,r,a),null!=i&&null!=l&&(0,le.wi)(i,n,s,r,l),ce(s,u),(0,le.To)(s,n,r),null!=o&&null!=a&&(0,le.Yk)(a,n,s,r,o),null!=i&&null!=l&&(0,le.M2)(l,n,s,r,i),e.vertexAttributesChanged()}(e,t):function(e,t){ce(e.vertexAttributes.position,t),e.vertexAttributesChanged()}(e,t)}(this,Ue,n),this):(s.Z.getLogger(this).error("offset()","Mesh must be loaded before applying operations"),this)}scale(e,t){return this.loaded?(function(e,t,r){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{spatialReference:n,vertexSpace:o}=e;if(o.isRelative){(0,W.A)(o,Me,r);const n=r?.origin??e.origin;e.transform??=new S.Z,function(e,t,r,n){const o=t.origin,i=(0,z.s)(Fe,n.x,n.y,n.z),s=(0,z.b)(Fe,i,o);e.applyLocalInverse(s,je);const a=(0,z.g)((0,l.c)(),e.scale,r);e.scale=a,e.applyLocalInverse(s,s),(0,z.b)(s,s,je),e.translation=(0,z.a)((0,l.c)(),e.translation,s)}(e.transform,o,t,n)}else{const o=(0,W.h)(n,r),i=r?.origin??e.origin;o?function(e,t,r){const n=e.spatialReference,o=(0,ae.rS)(n),i=Le;(0,k.KC)(r,i,o)||(0,k.KC)(e.origin,i,o);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,p=null!=l?new Float32Array(l.length):null;(0,le.XO)(s,n,c),null!=a&&null!=u&&(0,le.Iz)(a,s,c,n,u),null!=l&&null!=p&&(0,le.wi)(l,s,c,n,p),Re(c,t,i),(0,le.To)(c,s,n),null!=a&&null!=u&&(0,le.Yk)(u,s,c,n,a),null!=l&&null!=p&&(0,le.M2)(p,s,c,n,l),e.vertexAttributesChanged()}(e,t,i):function(e,t,r){const n=Le;if(!(0,k.KC)(r,n,e.spatialReference)){const t=e.origin;n[0]=t.x,n[1]=t.y,n[2]=t.z,s.Z.getLogger(Me).error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}Re(e.vertexAttributes.position,t,n),e.vertexAttributesChanged()}(e,t,i)}}(this,e,t),this):(s.Z.getLogger(this).error("scale()","Mesh must be loaded before applying operations"),this)}centerAt(e,t){return this.loaded?(function(e,t,r){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const{vertexSpace:n}=e,o=r?.origin??e.origin;n.isRelative?((0,W.A)(n,H,r),function(e,t,r){const{vertexSpace:n}=e;if(!n.isRelative)return;const o=V,i=B;if(!(0,k.KC)(t,i,e.spatialReference))return void s.Z.getLogger(H).error(`Failed to project centerAt location (wkid:${t.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`);if(!(0,k.KC)(r,o,e.spatialReference)){const t=e.origin;o[0]=t.x,o[1]=t.y,o[2]=t.z,s.Z.getLogger(H).error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}const a=(0,z.b)($,i,o),c=n.origin;n.origin=(0,z.a)((0,l.c)(),c,a)}(e,t,o)):(0,W.h)(e.spatialReference,r)?function(e,t,r){const n=(0,U.FF)(e.vertexAttributes,r,{geographic:!0}),{position:o,normal:i,tangent:s}=(0,U.iv)(n,t,{geographic:!0});e.vertexAttributes.position=o,e.vertexAttributes.normal=i,e.vertexAttributes.tangent=s,e.vertexAttributesChanged()}(e,t,o):function(e,t,r){const n=V,o=B;if((0,k.KC)(t,o,e.spatialReference)){if(!(0,k.KC)(r,n,e.spatialReference)){const t=e.origin;n[0]=t.x,n[1]=t.y,n[2]=t.z,s.Z.getLogger(H).error(`Failed to project specified origin (wkid:${r.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(function(e,t,r){if(e)for(let n=0;n<e.length;n+=3)for(let o=0;o<3;o++)e[n+o]+=t[o]-r[o]})(e.vertexAttributes.position,o,n),e.vertexAttributesChanged()}else s.Z.getLogger(H).error(`Failed to project centerAt location (wkid:${t.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(e,t,o)}(this,e,t),this):(s.Z.getLogger(this).error("centerAt()","Mesh must be loaded before applying operations"),this)}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(async function(e,t,n){const{source:o}=t,{loadGLTFMesh:i}=await(0,m.Hl)(Promise.all([r.e(8598),r.e(8079)]).then(r.bind(r,78079)),n),s=await async function(e,t){if(Array.isArray(e)){if(!e.length)throw new p.Z("mesh-load-external:missing-assets","There must be at least one file to load");return e[0]instanceof File?function(e){return X(e.map((e=>({name:e.name,mimeType:e.type,source:G(e)}))))}(e):async function(e,t){const r=await(0,m.WW)(e.map((async e=>{const r=await async function(e,t){const{parts:r}=e;if(1===r.length)return new Q(r[0].partUrl);const n=await e.toBlob(t);return(0,m.k_)(t),Q.fromBlob(n)}(e);return(0,m.k_)(t),{name:e.assetName,mimeType:e.assetMimeType,source:r}})));if((0,m.Hc)(t))throw r.forEach((e=>e.source.dispose())),(0,m.zE)();return X(r)}(e,t)}return G(e)}(o,n);(0,m.k_)(n);const a=i(new w.Z({x:0,y:0,z:0,spatialReference:e.spatialReference}),s.url,{resolveFile:q(s),useTransform:!0,signal:n?.signal});a.then((()=>s.dispose()),(()=>s.dispose()));const{vertexAttributes:l,components:c}=await a;e.vertexAttributes=l,e.components=c}(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(){return this.cloneWithVertexSpace(this.vertexSpace.clone())}cloneWithVertexSpace(e){let t=null;if(this.components){const e=new Map,r=new Map;t=this.components.map((t=>t.cloneWithDeduplication(e,r)))}const r={components:t,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),vertexSpace:e,transform:this.transform?.clone()??null,metadata:this.metadata.clone()};return new Ee(r)}cloneShallow(){return new Ee({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const t=r.e(7277).then(r.bind(r,7277)),n=this.load(),o=await Promise.all([t,n]),{toBinaryGLTF:i}=o[0];return i(this,e)}get memoryUsage(){let e=0;if(e+=this.vertexAttributes.memoryUsage,null!=this.components)for(const t of this.components)e+=t.memoryUsage;return e}_clearSources(){this.metadata.clearSources()}static createBox(e,t){if(!(e instanceof w.Z))return s.Z.getLogger(De).error(".createBox()","expected location to be a Point instance"),null;const r=new Ee(ge(function(){const{faceDescriptions:e,faceVertexOffsets:t,uvScales:r}=me,n=4*e.length,o=new Float64Array(3*n),i=new Float32Array(3*n),s=new Float32Array(2*n),a=new Uint32Array(2*e.length*3);let l=0,c=0,u=0,p=0;for(let n=0;n<e.length;n++){const h=e[n],f=l/3;for(const e of t)a[p++]=f+e;const g=h.corners;for(let e=0;e<4;e++){const t=g[e];let n=0;s[u++]=.25*r[e][0]+h.uvOrigin[0],s[u++]=h.uvOrigin[1]-.25*r[e][1];for(let e=0;e<3;e++)0!==h.axis[e]?(o[l++]=.5*h.axis[e],i[c++]=h.axis[e]):(o[l++]=.5*t[n++],i[c++]=0)}}return{position:o,normal:i,uv:s,faces:a}}(),e,t));return t&&t.imageFace&&"all"!==t.imageFace?function(e,t){const r=e.components[0],n=r.faces,o=de[t],i=6*o,s=new Array(6),a=new Array(n.length-6);let l=0,c=0;for(let e=0;e<n.length;e++)e>=i&&e<i+6?s[l++]=n[e]:a[c++]=n[e];if(null!=e.vertexAttributes.uv){const t=new Float32Array(e.vertexAttributes.uv),r=4*o*2,n=[0,1,1,1,1,0,0,0];for(let e=0;e<n.length;e++)t[r+e]=n[e];e.vertexAttributes.uv=t}return e.components=[new T.Z({faces:s,material:r.material}),new T.Z({faces:a})],e}(r,t.imageFace):r}static createSphere(e,t){return e instanceof w.Z?new Ee(ge(function(e=0){const t=Math.round(8*2**e),r=2*t,n=(t-1)*(r+1)+2*r,o=new Float64Array(3*n),i=new Float32Array(3*n),s=new Float32Array(2*n),a=new Uint32Array((t-1)*r*2*3);let l=0,c=0,u=0,p=0;for(let e=0;e<=t;e++){const n=e/t*Math.PI+.5*Math.PI,h=Math.cos(n),f=Math.sin(n);ye[2]=f;const g=0===e||e===t,m=g?r-1:r;for(let n=0;n<=m;n++){const f=n/m*2*Math.PI;ye[0]=-Math.sin(f)*h,ye[1]=Math.cos(f)*h;for(let e=0;e<3;e++)o[l]=.5*ye[e],i[l]=ye[e],++l;s[c++]=(n+(g?.5:0))/r,s[c++]=e/t,0!==e&&n!==r&&(e!==t&&(a[u++]=p,a[u++]=p+1,a[u++]=p-r),1!==e&&(a[u++]=p,a[u++]=p-r,a[u++]=p-r-1)),p++}}return{position:o,normal:i,uv:s,faces:a}}(t&&t.densificationFactor||0),e,t)):(s.Z.getLogger(De).error(".createSphere()","expected location to be a Point instance"),null)}static createCylinder(e,t){return e instanceof w.Z?new Ee(ge(function(e=0){const t=Math.round(16*2**e),r=4*(t+1)+2*t,n=new Float64Array(3*r),o=new Float32Array(3*r),i=new Float32Array(2*r),s=new Uint32Array(4*t*3);let a=0,l=0,c=0,u=0,p=0;for(let e=0;e<=5;e++){const r=0===e||5===e,h=e<=1||e>=4,f=2===e||4===e,g=r?t-1:t;for(let m=0;m<=g;m++){const d=m/g*2*Math.PI,y=r?0:.5;ye[0]=y*Math.sin(d),ye[1]=y*-Math.cos(d),ye[2]=e<=2?.5:-.5;for(let t=0;t<3;t++)n[a++]=ye[t],o[l++]=h?2===t?e<=1?1:-1:0:2===t?0:ye[t]/y;i[c++]=(m+(r?.5:0))/t,i[c++]=e<=1?1*e/3:e<=3?1*(e-2)/3+1/3:1*(e-4)/3+2/3,f||0===e||m===t||(5!==e&&(s[u++]=p,s[u++]=p+1,s[u++]=p-t),1!==e&&(s[u++]=p,s[u++]=p-t,s[u++]=p-t-1)),p++}}return{position:n,normal:o,uv:i,faces:s}}(t&&t.densificationFactor||0),e,t)):(s.Z.getLogger(De).error(".createCylinder()","expected location to be a Point instance"),null)}static createPlane(e,t){if(!(e instanceof w.Z))return s.Z.getLogger(De).error(".createPlane()","expected location to be a Point instance"),null;const r=t?.facing??"up",n=function(e,t){const r="number"==typeof t?t:null!=t?t.width:1,n="number"==typeof t?t:null!=t?t.height:1;switch(e){case"up":case"down":return{width:r,depth:n};case"north":case"south":return{width:r,height:n};case"east":case"west":return{depth:r,height:n}}}(r,t?.size);return new Ee(ge(function(e){const t=fe.facingAxisOrderSwap[e],r=fe.position,n=fe.normal,o=new Float64Array(r.length),i=new Float32Array(n.length);let s=0;for(let e=0;e<4;e++){const e=s;for(let a=0;a<3;a++){const l=t[a],c=Math.abs(l)-1,u=l>=0?1:-1;o[s]=r[e+c]*u,i[s]=n[e+c]*u,s++}}return{position:o,normal:i,uv:new Float32Array(fe.uv),faces:new Uint32Array(fe.faces),isPlane:!0}}(r),e,{...t,size:n}))}static createFromPolygon(e,t){if(!(e instanceof b.Z))return s.Z.getLogger(De).error(".createFromPolygon()","expected polygon to be a Polygon instance"),null;const r=function(e){const t=D(e.rings,e.hasZ,n.CCW_IS_HOLE),r=new Array;let o=0,i=0;for(const e of t.polygons){const n=e.count,s=e.index,a=(0,j.Rq)(t.position,3*s,3*n),l=e.holeIndices.map((e=>e-s)),c=(0,L.mi)((0,R.e)(a,l,3));r.push({position:a,faces:c}),o+=a.length,i+=c.length}const s=function(e,t,r){if(1===e.length)return e[0];const n=(0,j.bg)(t),o=new Array(r);let i=0,s=0,a=0;for(const t of e){for(let e=0;e<t.position.length;e++)n[i++]=t.position[e];for(const e of t.faces)o[s++]=e+a;a=i/3}return{position:n,faces:(0,L.mi)(o)}}(r,o,i),a=Array.isArray(s.position)?(0,E.d)(s.position,3,{originalIndices:s.faces}):(0,E.d)(s.position.buffer,6,{originalIndices:s.faces});return s.position=(0,j.QZ)(new Float64Array(a.buffer)),s.faces=a.indices,s}(e);return new Ee({vertexAttributes:new M.Q({position:r.position}),components:[new T.Z({faces:r.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new _.Z})}static async createFromGLTF(e,t,n){if(!(e instanceof w.Z))throw s.Z.getLogger(De).error(".createfromGLTF()","expected location to be a Point instance"),new p.Z("invalid-input","Expected location to be a Point instance");const{loadGLTFMesh:o}=await(0,m.Hl)(Promise.all([r.e(8598),r.e(8079)]).then(r.bind(r,78079)),n);return new Ee(await o(e,t,n))}static async createFromFiles(e,t,r){if(!(e instanceof w.Z)){const e="Expected location to be a Point instance";throw s.Z.getLogger(De).error(".createFromFiles()",e),new p.Z("invalid-input",e)}const n=Ee.createWithExternalSource(e,t),o=r?.layer;if(!o){const e="A layer is needed to convert the files";throw s.Z.getLogger(De).error(".createFromFiles()",e),new p.Z("invalid-input",e)}const[i]=await o.uploadAssets([n],r);return i}static createWithExternalSource(e,t,r){const n=r?.extent??null,{x:o,y:i,z:s,spatialReference:a}=e,l=r?.transform?.clone()??new S.Z,c=r?.vertexSpace??new C.Z({origin:[o,i,s??0]}),u={source:t,extent:n},p=new ne;return p.externalSources.push(u),new Ee({metadata:p,transform:l,vertexSpace:c,spatialReference:a})}static createIncomplete(e,t){const{x:r,y:n,z:o,spatialReference:i}=e,s=t?.transform?.clone()??new S.Z,a=t?.vertexSpace??new C.Z({origin:[r,n,o??0]}),l=new Ee({transform:s,vertexSpace:a,spatialReference:i});return l.addResolvingPromise(Promise.reject(new p.Z("mesh-incomplete","Mesh resources are not complete"))),l}};(0,u._)([(0,y.Cb)({type:[T.Z],json:{write:!0}})],Pe.prototype,"components",void 0),(0,u._)([(0,y.Cb)({nonNullable:!0,types:Oe,constructOnly:!0,json:{write:!0}})],Pe.prototype,"vertexSpace",void 0),(0,u._)([(0,y.Cb)({type:S.Z,json:{write:!0}})],Pe.prototype,"transform",void 0),(0,u._)([(0,y.Cb)({constructOnly:!0})],Pe.prototype,"metadata",void 0),(0,u._)([(0,y.Cb)()],Pe.prototype,"hasExtent",null),(0,u._)([(0,y.Cb)()],Pe.prototype,"_transformedExtent",null),(0,u._)([(0,y.Cb)()],Pe.prototype,"_untransformedExtent",null),(0,u._)([(0,y.Cb)()],Pe.prototype,"anchor",null),(0,u._)([(0,y.Cb)()],Pe.prototype,"origin",null),(0,u._)([(0,y.Cb)({readOnly:!0,json:{read:!1}})],Pe.prototype,"extent",null),(0,u._)([(0,y.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],Pe.prototype,"hasZ",void 0),(0,u._)([(0,y.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],Pe.prototype,"hasM",void 0),(0,u._)([(0,y.Cb)({type:M.Q,nonNullable:!0,json:{write:!0}})],Pe.prototype,"vertexAttributes",void 0),Pe=Ee=(0,u._)([(0,x.j)(De)],Pe);const Ue=(0,l.c)(),Ne=(0,A.Ue)(),Ie=Pe;var ze,ke,We=r(82971),He=r(2981),Be=r(74889);function Ve(e,t,r){const n=r.features;r.features=[],delete r.geometryType;const o=Be.Z.fromJSON(r);if(o.geometryType="mesh",!r.assetMaps)return o;const s=Je(t,r.assetMaps),a=e.sourceSpatialReference??We.Z.WGS84,l=r.globalIdFieldName,{outFields:c}=e,u=null!=c&&c.length>0?(p=c.includes("*")?null:new Set(c),({attributes:e})=>{if(!e)return{};if(!p)return e;for(const t in e)p.has(t)||delete e[t];return e}):()=>({});var p;for(const e of n){const r=$e(e,l,a,t,s);null!=r&&o.features.push(new i.Z({geometry:r,attributes:u(e)}))}return o}function $e(e,t,r,n,o){const i=e.attributes[t],s=o.get(i);if(null==s||!e.geometry)return null;const{originPoint:a,originVector:u}=function({attributes:e},t,{transformFieldRoles:r}){const n=e[r.originX],o=e[r.originY],i=e[r.originZ];return{originPoint:new w.Z({x:n,y:o,z:i,spatialReference:t}),originVector:(0,l.f)(n,o,i)}}(e,r,n),p=c.Z.fromJSON(e.geometry);p.spatialReference=r;const h=function(e,{transformFieldRoles:t}){return new S.Z({translation:[e[t.translationX],-e[t.translationZ],e[t.translationY]],rotationAxis:[e[t.rotationX],e[t.rotationZ],e[t.rotationY]],rotationAngle:e[t.rotationDeg],scale:[e[t.scaleX],e[t.scaleY],e[t.scaleZ]]})}(e.attributes,n),f=s.projectVertices?new Z.Z({origin:u}):new C.Z({origin:u}),g=function(e){const t=Array.from(e.files.values()),r=new Array;for(const e of t){if(e.status!==ze.COMPLETED)return null;const t=new Array;for(const r of e.parts){if(!r)return null;t.push(new re.LL(r.url,r.hash))}r.push(new re.CP(e.name,e.mimeType,t))}return r}(s);return g?Ie.createWithExternalSource(a,g,{extent:p,transform:h,vertexSpace:f}):Ie.createIncomplete(a,{extent:p,transform:h,vertexSpace:f})}function Je(e,t){const r=new Map;for(const n of t){const t=n.parentGlobalId;if(null==t)continue;const o=n.assetName,i=n.assetType,l=n.assetHash,c=n.assetURL,u=n.conversionStatus,p=n.seqNo,h=(0,He.d1)(i,e.supportedFormats);if(!h){s.Z.getLogger("esri.rest.support.meshFeatureSet").error("mesh-feature-set:unknown-format",`Service returned an asset of type ${i}, but it does not list it as a supported type`);continue}const f=(0,a.s1)(r,t,(()=>({projectVertices:Ge(n.flags).projectVertices,files:new Map})));(0,a.s1)(f.files,o,(()=>({name:o,type:i,mimeType:h,status:qe(u),parts:[]}))).parts[p]={hash:l,url:c}}return r}function qe(e){switch(e){case"COMPLETED":case"SUBMITTED":return ze.COMPLETED;case"INPROGRESS":return ze.PENDING;default:return ze.FAILED}}function Ge(e){return{projectVertices:e.includes("PROJECT_VERTICES")}}(ke=ze||(ze={}))[ke.FAILED=0]="FAILED",ke[ke.PENDING=1]="PENDING",ke[ke.COMPLETED=2]="COMPLETED"}}]);