@arcgis/core 5.0.0-next.39 → 5.0.0-next.40

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 (174) hide show
  1. package/Basemap.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/02d1c48e874dfd985bc4.js +1 -0
  4. package/assets/esri/core/workers/chunks/0429ca6ba562ae29897e.js +1 -0
  5. package/assets/esri/core/workers/chunks/{a6324f5f560ffadc6e5d.js → 061def9163a09c804b5c.js} +1 -1
  6. package/assets/esri/core/workers/chunks/0e4d0213d568f50c231f.js +1 -0
  7. package/assets/esri/core/workers/chunks/{1de216d9850c39c1735d.js → 1357cc637524cd254974.js} +1 -1
  8. package/assets/esri/core/workers/chunks/13839d220e5c62404923.js +1 -0
  9. package/assets/esri/core/workers/chunks/1c0fb4795a52204882a8.js +1 -0
  10. package/assets/esri/core/workers/chunks/1e286fb7bb833f00dd88.js +1 -0
  11. package/assets/esri/core/workers/chunks/{52ecbaa2d32692d6d8df.js → 1f6ead46b723630db897.js} +1 -1
  12. package/assets/esri/core/workers/chunks/218b2b767b40d85fb713.js +1 -0
  13. package/assets/esri/core/workers/chunks/2c9865e34f32fb5683e5.js +1 -0
  14. package/assets/esri/core/workers/chunks/{48d1a443b324753921de.js → 2db7a7607657f1d669f7.js} +1 -1
  15. package/assets/esri/core/workers/chunks/2f8cf7d9ff1f4de19a4c.js +1 -0
  16. package/assets/esri/core/workers/chunks/{6330d8767ba1d5329daa.js → 31b074ae2162a3508d2a.js} +1 -1
  17. package/assets/esri/core/workers/chunks/338570424337be05cef5.js +1 -0
  18. package/assets/esri/core/workers/chunks/{a59433c78ed01febca6d.js → 3767617c0dfc7d801441.js} +1 -1
  19. package/assets/esri/core/workers/chunks/3a16347e17312556e02c.js +1 -0
  20. package/assets/esri/core/workers/chunks/3ac8de121a07c70bae0f.js +1 -0
  21. package/assets/esri/core/workers/chunks/3f33708eb39c7169a226.js +1 -0
  22. package/assets/esri/core/workers/chunks/4278b35fb6fd578c403e.js +1 -0
  23. package/assets/esri/core/workers/chunks/{3f8849c49f0e3ce7eb6b.js → 44f036cc21e3a2308f69.js} +1 -1
  24. package/assets/esri/core/workers/chunks/46daa1ff5b412a97edc9.js +1 -0
  25. package/assets/esri/core/workers/chunks/{a5d25c71aa4dfaa878cf.js → 4c4a55be41ba105c091c.js} +1 -1
  26. package/assets/esri/core/workers/chunks/537de53ef1e9101468f5.js +1 -0
  27. package/assets/esri/core/workers/chunks/679088064420a906aa7f.js +1 -0
  28. package/assets/esri/core/workers/chunks/6e8c20ff1d28ef2fe72c.js +1 -0
  29. package/assets/esri/core/workers/chunks/75643711d9585ee26a15.js +1 -0
  30. package/assets/esri/core/workers/chunks/7ba13b52fce1060fbb2a.js +1 -0
  31. package/assets/esri/core/workers/chunks/800c91302eaad7f00877.js +1 -0
  32. package/assets/esri/core/workers/chunks/804958f3f4ff47a4eff5.js +1 -0
  33. package/assets/esri/core/workers/chunks/816227de5bd42b437df4.js +1 -0
  34. package/assets/esri/core/workers/chunks/926c2a0e21b7aa1a86e4.js +1 -0
  35. package/assets/esri/core/workers/chunks/933dce4d4ff8b90219c8.js +1 -0
  36. package/assets/esri/core/workers/chunks/93d11075f65a5b6625ea.js +1 -0
  37. package/assets/esri/core/workers/chunks/9c0efd06c9000ccbd62d.js +1 -0
  38. package/assets/esri/core/workers/chunks/9f1d3c0b53bef07e39bf.js +1 -0
  39. package/assets/esri/core/workers/chunks/9f2a8445a5848502c7e7.js +1 -0
  40. package/assets/esri/core/workers/chunks/9f6c63a580b28ab715bd.js +1 -0
  41. package/assets/esri/core/workers/chunks/a96742e678a506c461ab.js +1 -0
  42. package/assets/esri/core/workers/chunks/b7bcff9a64f41a0a0b6a.js +1 -0
  43. package/assets/esri/core/workers/chunks/c0b15510a8cab98df77f.js +1 -0
  44. package/assets/esri/core/workers/chunks/c367c7e553be3682f2db.js +1 -0
  45. package/assets/esri/core/workers/chunks/cfd2839e218610a222e5.js +1 -0
  46. package/assets/esri/core/workers/chunks/{014dbe6fa93a277b08f7.js → d0014b4a8c013f59b113.js} +1 -1
  47. package/assets/esri/core/workers/chunks/d08ee45c501102deea20.js +1 -0
  48. package/assets/esri/core/workers/chunks/d42273394f575e71dd55.js +1 -0
  49. package/assets/esri/core/workers/chunks/d723619579cc8f5ef2cd.js +1 -0
  50. package/assets/esri/core/workers/chunks/da1e61f355fb943085dc.js +1 -0
  51. package/assets/esri/core/workers/chunks/dddb6cb44cbe4dc1af97.js +1 -0
  52. package/assets/esri/core/workers/chunks/efc293c8bbc12156096d.js +1 -0
  53. package/assets/esri/core/workers/chunks/f65f1798f398bc549463.js +1 -0
  54. package/assets/esri/core/workers/chunks/f93f0586ce10cb5d98b3.js +1 -0
  55. package/assets/esri/core/workers/chunks/{06462b267ff8d5984882.js → fb9643b74cf35221ff98.js} +1 -1
  56. package/chunks/Envelope.js +1 -1
  57. package/chunks/GaussianSplat.glsl.js +2 -2
  58. package/chunks/MultiPathImpl.js +1 -1
  59. package/chunks/Point2D.js +1 -1
  60. package/chunks/UnitFactory.js +1 -1
  61. package/config.js +1 -1
  62. package/core/has.js +1 -1
  63. package/form/FormTemplate.js +1 -1
  64. package/form/elements/GroupElement.js +1 -1
  65. package/form/elements/inputs/attachments/AttachmentInput.js +1 -1
  66. package/geometry/FlatGeometry.js +5 -0
  67. package/geometry/operators/gx/operatorShapePreservingProject.js +1 -1
  68. package/geometry/operators/support/jsonConverter.js +1 -1
  69. package/geometry/support/aaBoundingBox.js +1 -1
  70. package/geometry/support/aaBoundingRect.js +1 -1
  71. package/geometry/support/boundsUtils.js +1 -1
  72. package/interfaces.d.ts +259 -7
  73. package/kernel.js +1 -1
  74. package/layers/BaseElevationLayer.js +1 -1
  75. package/layers/BaseTileLayer.js +1 -1
  76. package/layers/CSVLayer.js +1 -1
  77. package/layers/FeatureLayer.js +1 -1
  78. package/layers/GeoJSONLayer.js +1 -1
  79. package/layers/GroupLayer.js +1 -1
  80. package/layers/MapImageLayer.js +1 -1
  81. package/layers/MediaLayer.js +1 -1
  82. package/layers/OrientedImageryLayer.js +1 -1
  83. package/layers/ParquetLayer.js +1 -1
  84. package/layers/VectorTileLayer.js +1 -1
  85. package/layers/VideoLayer.js +1 -1
  86. package/layers/WMSLayer.js +1 -1
  87. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  88. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  89. package/layers/mixins/ArcGISImageService.js +1 -1
  90. package/layers/mixins/ImageryTileMixin.js +1 -1
  91. package/layers/mixins/PortalLayer.js +1 -1
  92. package/layers/mixins/TemporalLayer.js +1 -1
  93. package/layers/mixins/operationalLayerModuleMap.js +1 -1
  94. package/layers/mixins/operationalLayers.js +1 -1
  95. package/layers/support/LocalMediaElementSource.js +1 -1
  96. package/layers/support/ParquetEncodingBase.js +1 -1
  97. package/layers/support/ParquetEncodingLocation.js +1 -1
  98. package/layers/support/ParquetEncodingWkb.js +1 -1
  99. package/layers/support/Sublayer.js +1 -1
  100. package/layers/support/WMSSublayer.js +1 -1
  101. package/layers/support/layersCreator.js +1 -1
  102. package/layers/support/lazyLayerLoader.js +1 -1
  103. package/layers/support/parquetUtils.js +1 -1
  104. package/libs/parquet/parquet.js +1 -1
  105. package/package.json +2 -2
  106. package/renderers/FlowRenderer.js +1 -1
  107. package/renderers/VectorFieldRenderer.js +1 -1
  108. package/renderers/visualVariables/support/ColorSizeStop.js +1 -1
  109. package/renderers/visualVariables/support/SizeStop.js +1 -1
  110. package/support/LayersMixin.js +1 -1
  111. package/support/TablesMixin.js +1 -1
  112. package/support/revision.js +1 -1
  113. package/symbols/edges/Edges3D.js +1 -1
  114. package/versionManagement/VersionManager.d.ts +4 -0
  115. package/versionManagement/VersionManager.js +5 -0
  116. package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
  117. package/views/2d/layers/LayerView2D.js +1 -1
  118. package/views/3d/GroundView3D.js +1 -1
  119. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  120. package/views/3d/support/gaussianSplatting/GaussianSplatAtlasPages.js +1 -1
  121. package/views/3d/support/gaussianSplatting/GaussianSplatFadeTexture.js +1 -1
  122. package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
  123. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  124. package/views/3d/webgl-engine/shaders/GaussianSplatTechnique.js +1 -1
  125. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  126. package/views/input/gamepad/GamepadInputDevice.js +1 -1
  127. package/views/layers/support/{Geometry.js → GeometryClipArea.js} +1 -1
  128. package/views/webgl/capabilities/Capabilities.js +1 -1
  129. package/views/webgl/capabilities/load.js +1 -1
  130. package/webdoc/support/writeUtils.js +1 -1
  131. package/widgets/FeatureTable/FieldColumn.js +1 -1
  132. package/widgets/VersionManagement/VersionManagementViewModel.js +1 -1
  133. package/assets/esri/core/workers/chunks/09ac2bbc7327e6e6b5a2.js +0 -1
  134. package/assets/esri/core/workers/chunks/1432e789aa4cba627337.js +0 -1
  135. package/assets/esri/core/workers/chunks/1a9ed3c59a9a8bafb251.js +0 -1
  136. package/assets/esri/core/workers/chunks/1c857191e5898aba50fe.js +0 -1
  137. package/assets/esri/core/workers/chunks/234ffd08c2be03a0b9fe.js +0 -1
  138. package/assets/esri/core/workers/chunks/2d0d8243ed0c21f8a498.js +0 -1
  139. package/assets/esri/core/workers/chunks/31675811cacdb6fd96cf.js +0 -1
  140. package/assets/esri/core/workers/chunks/39d2b540738431adec98.js +0 -1
  141. package/assets/esri/core/workers/chunks/48820e12d94eb49c0a65.js +0 -1
  142. package/assets/esri/core/workers/chunks/4c278fb2d51ca6226050.js +0 -1
  143. package/assets/esri/core/workers/chunks/4d6706d6dbe578653c28.js +0 -1
  144. package/assets/esri/core/workers/chunks/4ff40eea70d19c934504.js +0 -1
  145. package/assets/esri/core/workers/chunks/59ce992d3a5e7c32b9fb.js +0 -1
  146. package/assets/esri/core/workers/chunks/5e30acfda04f7fc2b676.js +0 -1
  147. package/assets/esri/core/workers/chunks/6052eccb9395c8efb295.js +0 -1
  148. package/assets/esri/core/workers/chunks/61369838aa337d0156c5.js +0 -1
  149. package/assets/esri/core/workers/chunks/690a40d2eef52bfc149f.js +0 -1
  150. package/assets/esri/core/workers/chunks/6b820f14c110d9da118e.js +0 -1
  151. package/assets/esri/core/workers/chunks/7fd2366ee1fc81fa8c56.js +0 -1
  152. package/assets/esri/core/workers/chunks/8d9e622cec13f5cea726.js +0 -1
  153. package/assets/esri/core/workers/chunks/9110287f272141f60c35.js +0 -1
  154. package/assets/esri/core/workers/chunks/98997841ec3955287ba2.js +0 -1
  155. package/assets/esri/core/workers/chunks/a716b8fdeda4e16f03ab.js +0 -1
  156. package/assets/esri/core/workers/chunks/a9577a700b6a7b69d6aa.js +0 -1
  157. package/assets/esri/core/workers/chunks/ad4fcb73cfe9a1e4b710.js +0 -1
  158. package/assets/esri/core/workers/chunks/aead7c9830fa310e5b53.js +0 -1
  159. package/assets/esri/core/workers/chunks/b48aceaeefa07214e430.js +0 -1
  160. package/assets/esri/core/workers/chunks/bcfa98b6866a96c194cb.js +0 -1
  161. package/assets/esri/core/workers/chunks/c052fb8c952cda0b5d13.js +0 -1
  162. package/assets/esri/core/workers/chunks/c0d6f8e55349f4f5cd58.js +0 -1
  163. package/assets/esri/core/workers/chunks/c1a4d1ec0125617374b4.js +0 -1
  164. package/assets/esri/core/workers/chunks/c582fb447c89d732cfff.js +0 -1
  165. package/assets/esri/core/workers/chunks/cb500d673ca7ec1ef945.js +0 -1
  166. package/assets/esri/core/workers/chunks/ce99abfdcd71ff9e4e36.js +0 -1
  167. package/assets/esri/core/workers/chunks/cf0e2c91b330b1d0ef77.js +0 -1
  168. package/assets/esri/core/workers/chunks/d764b6273974f4bca31b.js +0 -1
  169. package/assets/esri/core/workers/chunks/d87dc2eeffabd3507143.js +0 -1
  170. package/assets/esri/core/workers/chunks/dca6a61fd239cf1ff90c.js +0 -1
  171. package/assets/esri/core/workers/chunks/edc3d98f33d7bf959154.js +0 -1
  172. package/assets/esri/core/workers/chunks/f1381c5a2a1de1ef9139.js +0 -1
  173. package/assets/esri/core/workers/chunks/f6148611d883a59f8fb8.js +0 -1
  174. package/views/3d/webgl-engine/shaders/GaussianSplatDepthTechnique.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9203],{6518:(e,t,n)=>{n.d(t,{F:()=>a});var i=n(44208),r=n(75503),s=n(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new r.wq(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((n,i)=>{e[t++]=i}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,s.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,n){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,n)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},8303:(e,t,n)=>{n.d(t,{A:()=>w});var i=n(31635),r=n(92602),s=n(70333),o=n(11254),a=n(60999),l=n(49186),c=n(53966),u=n(97768),h=n(74887),d=n(84952),p=n(91429),m=n(77548),f=n(20655),g=n(80812),y=n(41318),x=n(10407),_=n(36005),v=n(43937);const w=e=>{const t=e;let w=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,n){if(t.itemId)return new g.default({id:t.itemId,portal:n?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await n.e(1204).then(n.bind(n,41204));return(0,h.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,h.zf)(e)||c.A.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,h.QP)(e),!0)))}async setUserPrivileges(e,t){if(!r.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:n,fullEdit:i},content:{updateItem:r}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",n),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",r)}catch(e){(0,h.QP)(e)}}async _fetchUserPrivileges(e,t){let n=this.portalItem;if(!e||!n||!n.loaded||n.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!s.id?.findCredential(this.url),r=e===n.id;if(r&&n.portal.user)return this._getUserPrivileges(n,i);let o,a;if(r)o=n.portal.url;else try{o=await(0,m.wI)(this.url,t)}catch(e){(0,h.QP)(e)}if(!o||!(0,d.b8)(o,n.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(s.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.QP)(e)}const l=!0,c=!1,u=!1;if(!a)return{features:{edit:l,fullEdit:c},content:{updateItem:u}};try{if(r?await n.reload():(n=new g.default({id:e,portal:{url:o}}),await n.load(t)),n.portal.user)return this._getUserPrivileges(n,i)}catch(e){(0,h.QP)(e)}return{features:{edit:l,fullEdit:c},content:{updateItem:u}}}_getUserPrivileges(e,t){const n=(0,x.It)(e);return t&&(n.features.edit=!0),n}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,h.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const n=P.credential===t?P.user:await this._fetchEditingUser(e);return P.credential=t,P.user=n,null==n?.privileges||n.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const n=s.id?.findServerInfo(this.url??"");if(!n?.owningSystemUrl)return null;const i=`${n.owningSystemUrl}/sharing/rest`,r=f.A.getDefault();if(r&&r.loaded&&(0,d.S8)(r.restUrl)===(0,d.S8)(i))return r.user;const l=`${i}/community/self`,c=null!=e?e.signal:null,u=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:c}));return u.ok?y.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const n=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||f.A.getDefault());return n&&i&&!(0,d.ut)(i.restUrl,n.restUrl)?(t.messages&&t.messages.push(new l.A("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.Cg)([(0,p.MZ)({type:g.default})],w.prototype,"portalItem",null),(0,i.Cg)([(0,_.w)("web-document","portalItem",["itemId"])],w.prototype,"readPortalItem",null),(0,i.Cg)([(0,v.K)("web-document","portalItem",{itemId:{type:String}})],w.prototype,"writePortalItem",null),(0,i.Cg)([(0,p.MZ)({clonable:!1})],w.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],w.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],w.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],w.prototype,"userHasUpdateItemPrivileges",void 0),w=(0,i.Cg)([(0,p.$K)("esri.layers.mixins.PortalLayer")],w),w},P={credential:null,user:null}},10407:(e,t,n)=>{n.d(t,{It:()=>p,LG:()=>o,OM:()=>c,Sm:()=>u,Y:()=>a,bK:()=>l,mm:()=>d,sQ:()=>h});var i=n(91218),r=n(16930),s=n(28735);function o(e,t){if(!a(e,t)){const n=e.typeKeywords;n?n.push(t):e.typeKeywords=[t]}}function a(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return a(e,d.HOSTED_SERVICE)}function c(e,t){const n=e.typeKeywords;if(n){const e=n.indexOf(t);e>-1&&n.splice(e,1)}}function u(e,t,n){n?o(e,t):c(e,t)}async function h(e){const t=e.clone().normalize();let n;if(t.length>1)for(const e of t)n?e.width>n.width&&(n=e):n=e;else n=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,s.ci)(e);const n=r.A.WGS84;return await(0,i.initializeProjection)(t,n),(0,i.project)(e,n)}(n)}const d={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function p(e){const{portal:t,isOrgItem:n,itemControl:i}=e,r=t.user?.privileges;let s=!r||r.includes("features:user:edit"),o=!!n&&!!r?.includes("features:user:fullEdit");const a="update"===i||"admin"===i;return a?o=s=!0:o&&(s=!0),{features:{edit:s,fullEdit:o},content:{updateItem:a}}}},11006:(e,t,n)=>{function i(e,t,n,i,s){r(e,t,n||0,i||e.length-1,s||o)}function r(e,t,n,i,o){for(;i>n;){if(i-n>600){var a=i-n+1,l=t-n+1,c=Math.log(a),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(a-u)/a)*(l-a/2<0?-1:1);r(e,t,Math.max(n,Math.floor(t-l*u/a+h)),Math.min(i,Math.floor(t+(a-l)*u/a+h)),o)}var d=e[t],p=n,m=i;for(s(e,n,t),o(e[i],d)>0&&s(e,n,i);p<m;){for(s(e,p,m),p++,m--;o(e[p],d)<0;)p++;for(;o(e[m],d)>0;)m--}0===o(e[n],d)?s(e,n,m):s(e,++m,i),m<=t&&(n=m+1),t<=m&&(i=m-1)}}function s(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function o(e,t){return e<t?-1:e>t?1:0}n.d(t,{q:()=>i})},13069:(e,t,n)=>{n.d(t,{AG:()=>a,lk:()=>r,vD:()=>o,yS:()=>s});const i="randomUUID"in crypto;function r(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function s(){return`{${r().toUpperCase()}}`}function o(){return`{${r()}}`}function a(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},16494:(e,t,n)=>{n.d(t,{Nd:()=>a,W5:()=>o});var i=n(37330);const r=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce((e,t)=>(e[t]=[],e),{}),s=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],o=new i.I({whiteList:r,onTagAttr:(e,t,n)=>{const i=`${t}="${n}"`;if(s.includes(t))return i},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),a=new i.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1)},21287:(e,t,n)=>{n.d(t,{M5:()=>h,eV:()=>u});var i=n(11254),r=n(49186),s=n(74887),o=n(84952),a=n(26306);let l=null,c=!0;function u(e,t,n,i){if(!t||!n)throw new Error("Cannot construct image data without dimensions");if(c)try{return new ImageData(e,t,n)}catch(e){c=!1}const r=function(e,t,n){return n||(l||(l=document.createElement("canvas"),l.width=1,l.height=1),n=l),n.getContext("2d").createImageData(e,t)}(t,n,i);return r.data.set(e,0),r}async function h(e,t){const{arrayBuffer:l,mediaType:c}=await async function(e,t){const n=(0,o.r$)(e);if(n?.isBase64)return{arrayBuffer:(0,a.M)(n.data),mediaType:n.mediaType};const r=await(0,i.A)(e,{responseType:"array-buffer",...t});return{arrayBuffer:r.data,mediaType:r.getHeader?.("Content-Type")??""}}(e,t),u="image/png"===c;if("image/gif"===c){const{isAnimatedGIF:e,parseGif:i}=await n.e(820).then(n.bind(n,10820));if(e(l))return i(l,t)}if(u){const{isAnimatedPNG:e,parseApng:i}=await n.e(2390).then(n.bind(n,22390));if(e(l))return i(l,t)}return async function(e,t){const n=window.URL.createObjectURL(e);try{const{data:e}=await(0,i.A)(n,{...t,responseType:"image"});return e}catch(e){if(!(0,s.zf)(e))throw new r.A("invalid-image",`Could not fetch requested image at ${n}`);throw e}finally{window.URL.revokeObjectURL(n)}}(new Blob([l],{type:c}),t)}},29203:(e,t,n)=>{n.r(t),n.d(t,{default:()=>et});var i=n(31635),r=n(7762),s=n(49186),o=n(53966),a=n(25728),l=n(74887),c=n(91429),u=n(16930),h=n(4146),d=n(63074),p=n(16131),m=n(8303),f=n(25036),g=n(25482),y=n(77690),x=n(29242),_=n(37585),v=n(38954);const w=(0,n(51850).vt)(),P=(0,x.vt)(),M=(0,x.vt)(),I=(0,x.vt)();function b(e,t,n){return(0,v.h)(w,t[0],t[1],1),(0,v.t)(w,w,(0,y.mg)(P,n)),0===w[2]?(0,_.hZ)(e,w[0],w[1]):(0,_.hZ)(e,w[0]/w[2],w[1]/w[2])}function A(e,t,n){return C(M,t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]),C(I,n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),(0,y.lw)(e,(0,y.KC)(M,M),I),0!==e[8]&&(e[0]/=e[8],e[1]/=e[8],e[2]/=e[8],e[3]/=e[8],e[4]/=e[8],e[5]/=e[8],e[6]/=e[8],e[7]/=e[8],e[8]/=e[8]),e}function C(e,t,n,i,r,s,o,a,l){(0,y.hZ)(e,t,i,s,n,r,o,1,1,1),(0,v.h)(w,a,l,1),(0,y.KC)(P,e);const[c,u,h]=(0,v.t)(w,w,(0,y.mg)(P,P));return(0,y.hZ)(P,c,0,0,0,u,0,0,0,h),(0,y.lw)(e,P,e)}var R=n(90629),S=n(48163),O=n(86738),E=n(39829),L=n(91218),B=n(56560),T=n(69540);let Z=class extends T.Pw{projectOrWarn(e,t){if(null==e)return e;const{geometry:n,pending:i}=(0,L.projectOrLoad)(e,t);return i?null:i||n?n:(o.A.getLogger(this).warn("geometry could not be projected to the spatial reference",{georeference:this,geometry:e,sourceSpatialReference:e.spatialReference,targetSpatialReference:t}),null)}};Z=(0,i.Cg)([(0,c.$K)("esri.layers.support.GeoreferenceBase")],Z);var j=n(36005),Y=n(43937);const U=(0,x.vt)(),X=(0,S.vt)();let H=class extends g.o{};(0,i.Cg)([(0,c.MZ)({type:Number,json:{write:{isRequired:!0}}})],H.prototype,"x",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{write:{isRequired:!0}}})],H.prototype,"y",void 0),H=(0,i.Cg)([(0,c.$K)("esri.layers.support.ControlPointsGeoreference.ControlPointJSONType")],H);let N=class extends((0,g.T)(Z)){constructor(e){super(e),this.controlPoints=null,this.height=0,this.type="control-points",this.width=0}readControlPoints(e,t){const n=u.A.fromJSON(t.spatialReference),i=(0,x.fA)(...t.coefficients,1);return e.map(e=>((0,_.hZ)(X,e.x,e.y),b(X,X,i),{sourcePoint:e,mapPoint:new O.A({x:X[0],y:X[1],spatialReference:n})}))}writeControlPoints(e,t,n,i){if(null==this.transform){const e=new s.A("web-document-write:invalid-georeference","Invalid 'controlPoints', 'width', 'height' configuration. Make sure the parent media element is loaded i.e. the ImageElement or VideoElement set as 'MediaLayer.source'.",{layer:i?.layer,georeference:this});return void(i?.messages?i.messages.push(e):o.A.getLogger(this).error(e.name,e.message))}null!=e&&$(e[0])&&(t.controlPoints=e.map(e=>{const t=e.sourcePoint;return{x:t.x,y:t.y}}),t.spatialReference=e[0].mapPoint.spatialReference.toJSON(),t.coefficients=this.transform.slice(0,8))}get coords(){if(null==this.controlPoints)return null;const e=this._updateTransform(U);if(null==e||!$(this.controlPoints[0]))return null;const t=this.controlPoints[0].mapPoint.spatialReference;return function(e,t,n,i){const r=(0,S.fA)(0,n),s=(0,S.fA)(0,0),o=(0,S.fA)(t,0),a=(0,S.fA)(t,n);return b(r,r,e),b(s,s,e),b(o,o,e),b(a,a,e),new E.A({rings:[[r,s,o,a,r]],spatialReference:i})}(e,this.width,this.height,t)}set coords(e){if(null==this.controlPoints||!$(this.controlPoints[0]))return;const t=this.controlPoints[0].mapPoint.spatialReference;if(null==(e=this.projectOrWarn(e,t)))return;const{width:n,height:i}=this,{rings:[[r,s,o,a]]}=e,l=new B.A({sourcePoint:(0,R.tc)(0,i),mapPoint:new O.A({x:r[0],y:r[1],spatialReference:t})}),c=new B.A({sourcePoint:(0,R.tc)(0,0),mapPoint:new O.A({x:s[0],y:s[1],spatialReference:t})}),u=new B.A({sourcePoint:(0,R.tc)(n,0),mapPoint:new O.A({x:o[0],y:o[1],spatialReference:t})}),h=new B.A({sourcePoint:(0,R.tc)(n,i),mapPoint:new O.A({x:a[0],y:a[1],spatialReference:t})});$(l)&&$(c)&&$(u)&&$(h)&&(Q(U,l,c,u,h),this.controlPoints=this.controlPoints.map(({sourcePoint:e})=>((0,_.hZ)(X,e.x,e.y),b(X,X,U),{sourcePoint:e,mapPoint:new O.A({x:X[0],y:X[1],spatialReference:t})})))}get inverseTransform(){return null==this.transform?null:(0,y.B8)((0,x.vt)(),this.transform)}get transform(){return this._updateTransform()}toMap(e){if(null==e||null==this.transform||null==this.controlPoints||!$(this.controlPoints[0]))return null;(0,_.hZ)(X,e.x,e.y);const t=this.controlPoints[0].mapPoint.spatialReference;return b(X,X,this.transform),new O.A({x:X[0],y:X[1],spatialReference:t})}toSource(e){if(null==e||null==this.inverseTransform||null==this.controlPoints||!$(this.controlPoints[0]))return null;const t=this.controlPoints[0].mapPoint.spatialReference;return e=e.normalize(),null==(e=(0,L.projectOrLoad)(e,t).geometry)?null:((0,_.hZ)(X,e.x,e.y),b(X,X,this.inverseTransform),(0,R.tc)(X[0],X[1]))}toSourceNormalized(e){const t=this.toSource(e);return null!=t&&(t.x/=this.width,t.y/=this.height),t}_updateTransform(e){const{controlPoints:t,width:n,height:i}=this;if(!(null!=t&&n>0&&i>0))return null;const[r,s,o,a]=t;if(!$(r))return null;const l=r.mapPoint.spatialReference,c=this._projectControlPoint(s,l),u=this._projectControlPoint(o,l),h=this._projectControlPoint(a,l);if(!c.valid||!u.valid||!h.valid)return null;if(!$(c.controlPoint))return null;null==e&&(e=(0,x.vt)());let d=null;return d=$(u.controlPoint)&&$(h.controlPoint)?Q(e,r,c.controlPoint,u.controlPoint,h.controlPoint):$(u.controlPoint)?function(e,t,n,i){return J(z,W,t),J(V,K,n),J(k,D,i),(0,_.Cc)(G,z,V,.5),(0,_.e$)(G,k,G,Math.PI),(0,_.Cc)(F,W,K,.5),(0,_.e$)(F,D,F,Math.PI),ie(e,z,V,k,G,W,K,D,F)}(e,r,c.controlPoint,u.controlPoint):function(e,t,n){return J(z,W,t),J(V,K,n),(0,_.e$)(k,V,z,q),(0,_.e$)(G,z,V,q),(0,_.e$)(D,K,W,-q),(0,_.e$)(F,W,K,-q),ie(e,z,V,k,G,W,K,D,F)}(e,r,c.controlPoint),d.every(e=>0===e)?null:d}_projectControlPoint(e,t){if(!$(e))return{valid:!0,controlPoint:e};const{sourcePoint:n,mapPoint:i}=e,{geometry:r,pending:s}=(0,L.projectOrLoad)(i,t);return s?{valid:!1,controlPoint:null}:s||r?{valid:!0,controlPoint:new B.A({sourcePoint:n,mapPoint:r})}:(o.A.getLogger(this).warn("map point could not be projected to the spatial reference",{georeference:this,controlPoint:e,sourceSpatialReference:i.spatialReference,targetSpatialReference:t}),{valid:!1,controlPoint:null})}};function $(e){return null!=e?.sourcePoint&&null!=e.mapPoint}(0,i.Cg)([(0,c.MZ)({type:[B.A],json:{write:{allowNull:!1,isRequired:!0,target:{controlPoints:{type:[H],isRequired:!0},coefficients:{type:[Number],isRequired:!0},spatialReference:{type:u.A,isRequired:!0}}}}})],N.prototype,"controlPoints",void 0),(0,i.Cg)([(0,j.w)("controlPoints")],N.prototype,"readControlPoints",null),(0,i.Cg)([(0,Y.K)("controlPoints")],N.prototype,"writeControlPoints",null),(0,i.Cg)([(0,c.MZ)({clonable:!1})],N.prototype,"coords",null),(0,i.Cg)([(0,c.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],N.prototype,"height",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],N.prototype,"inverseTransform",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],N.prototype,"transform",null),(0,i.Cg)([(0,c.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],N.prototype,"width",void 0),N=(0,i.Cg)([(0,c.$K)("esri.layers.support.ControlPointsGeoreference")],N);const z=(0,S.vt)(),V=(0,S.vt)(),k=(0,S.vt)(),G=(0,S.vt)(),W=(0,S.vt)(),K=(0,S.vt)(),D=(0,S.vt)(),F=(0,S.vt)(),q=Math.PI/2;function J(e,t,n){(0,_.hZ)(e,n.sourcePoint.x,n.sourcePoint.y),(0,_.hZ)(t,n.mapPoint.x,n.mapPoint.y)}function Q(e,t,n,i,r){return J(z,W,t),J(V,K,n),J(k,D,i),J(G,F,r),ie(e,z,V,k,G,W,K,D,F)}const ee=new Array(8).fill(0),te=new Array(8).fill(0);function ne(e,t,n,i,r){return e[0]=t[0],e[1]=t[1],e[2]=n[0],e[3]=n[1],e[4]=i[0],e[5]=i[1],e[6]=r[0],e[7]=r[1],e}function ie(e,t,n,i,r,s,o,a,l){return A(e,ne(ee,t,n,i,r),ne(te,s,o,a,l))}var re=n(11254),se=n(21287),oe=n(84952),ae=n(13069),le=n(92474),ce=n(64108);let ue=0;const he=e=>{const t=e;let n=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:ue++})}};return n=(0,i.Cg)([(0,ce.$)("esri.core.NumericIdentifiable")],n),n};var de=n(35666),pe=n(5443),me=n(21325);const fe=(0,S.vt)();let ge=class extends Z{constructor(e){super(e),this.bottomLeft=null,this.bottomRight=null,this.topLeft=null,this.topRight=null,this.type="corners"}get coords(){let{topLeft:e,topRight:t,bottomLeft:n,bottomRight:i}=this;if(null==e||null==t||null==n||null==i)return null;const r=e.spatialReference;return t=this.projectOrWarn(t,r),n=this.projectOrWarn(n,r),i=this.projectOrWarn(i,r),null==t||null==n||null==i?null:new E.A({rings:[[[n.x,n.y],[e.x,e.y],[t.x,t.y],[i.x,i.y],[n.x,n.y]]],spatialReference:r})}set coords(e){const{topLeft:t}=this;if(null==t)return;const n=t.spatialReference;if(null==(e=this.projectOrWarn(e,n)))return;const{rings:[[i,r,s,o]]}=e;this.bottomLeft=new O.A({x:i[0],y:i[1],spatialReference:n}),this.topLeft=new O.A({x:r[0],y:r[1],spatialReference:n}),this.topRight=new O.A({x:s[0],y:s[1],spatialReference:n}),this.bottomRight=new O.A({x:o[0],y:o[1],spatialReference:n})}toSourceNormalized(e){const{topLeft:t,topRight:n,bottomRight:i,bottomLeft:r}=this;if(null==e||null==t||null==n||null==i||null==r)return null;const s=t.spatialReference;e=e.normalize();const o=(0,L.projectOrLoad)(e,s).geometry;if(null==o)return null;(0,_.hZ)(fe,o.x,o.y);const a=A((0,x.vt)(),[t.x,t.y,r.x,r.y,n.x,n.y,i.x,i.y],[0,0,0,1,1,0,1,1]);return b(fe,fe,a),(0,R.tc)(fe[0],fe[1])}};(0,i.Cg)([(0,c.MZ)({clonable:!1})],ge.prototype,"coords",null),(0,i.Cg)([(0,c.MZ)({type:O.A})],ge.prototype,"bottomLeft",void 0),(0,i.Cg)([(0,c.MZ)({type:O.A})],ge.prototype,"bottomRight",void 0),(0,i.Cg)([(0,c.MZ)({type:O.A})],ge.prototype,"topLeft",void 0),(0,i.Cg)([(0,c.MZ)({type:O.A})],ge.prototype,"topRight",void 0),ge=(0,i.Cg)([(0,c.$K)("esri.layers.support.CornersGeoreference")],ge);const ye=ge;var xe=n(34727),_e=n(34304);let ve=class extends Z{constructor(e){super(e),this.extent=null,this.rotation=0,this.type="extent-and-rotation"}get coords(){if(null==this.extent)return null;const{xmin:e,ymin:t,xmax:n,ymax:i,spatialReference:r}=this.extent;let s;if(this.rotation){const{x:r,y:o}=this.extent.center,a=we(r,o,this.rotation);s=[a(e,t),a(e,i),a(n,i),a(n,t)],s.push(s[0])}else s=[[e,t],[e,i],[n,i],[n,t],[e,t]];return new E.A({rings:[s],spatialReference:r})}set coords(e){if(null==e||null==this.extent)return;const t=this.extent.spatialReference;if(e=this.projectOrWarn(e,t),null==e?.extent)return;const{rings:[[n,i,r]],extent:{center:{x:s,y:o}}}=e,a=(0,xe.KJ)(Math.PI/2-Math.atan2(i[1]-n[1],i[0]-n[0])),l=we(s,o,-a),[c,u]=l(n[0],n[1]),[h,d]=l(r[0],r[1]);this.extent=new pe.A({xmin:c,ymin:u,xmax:h,ymax:d,spatialReference:t}),this.rotation=a}toSourceNormalized(e){const{extent:t,rotation:n}=this;if(null==e||null==t)return null;const{xmin:i,ymin:r,xmax:s,ymax:o,center:a,spatialReference:l}=t;e=e.normalize();const c=(0,L.projectOrLoad)(e,l).geometry;if(null==c)return null;let u=c.x,h=c.y;return n&&([u,h]=we(a.x,a.y,-n)(u,h)),(0,R.tc)((0,xe.hs)(u,i,s,0,1),(0,xe.hs)(h,o,r,0,1))}};function we(e,t,n){const i=(0,_e.DF)(n),r=Math.cos(i),s=Math.sin(i);return(n,i)=>[r*(n-e)+s*(i-t)+e,r*(i-t)-s*(n-e)+t]}function Pe(e,t){const n=(0,de.aB)(t);return function(e){return"media"===e?.type}(e)&&!!e.portalItem&&null!=n&&n>3}function Me(e,t,n){return{enabled:!Pe(n?.layer,n?.origin),ignoreOrigin:!0}}(0,i.Cg)([(0,c.MZ)({clonable:!1})],ve.prototype,"coords",null),(0,i.Cg)([(0,c.MZ)({type:pe.A})],ve.prototype,"extent",void 0),(0,i.Cg)([(0,c.MZ)({type:Number})],ve.prototype,"rotation",void 0),ve=(0,i.Cg)([(0,c.$K)("esri.layers.support.ExtentAndRotationGeoreference")],ve);const Ie={json:{name:"url",type:String,write:{overridePolicy:Me}}},be={readOnly:!0,json:{read:!1,write:{target:"mediaType",overridePolicy:Me}}},Ae={types:{key:"type",base:Z,typeMap:{"control-points":N,corners:ye,"extent-and-rotation":ve}},json:{types:{key:"type",base:Z,typeMap:{"control-points":N}},write:{overridePolicy:()=>({enabled:!0,ignoreOrigin:!0})}}};let Ce=class extends(he((0,a.P)(le.x_))){constructor(e){super(e),this.georeference=null,this.opacity=1}readGeoreference(e){return N.fromJSON(e)}writeGeoreference(e,t,n,i){const r=i?.resources?.pendingOperations,a=()=>{const r=function(e,t,n){if(!e||"control-points"===e.type)return e;const{coords:i}=e;if(5!==i?.rings[0]?.length)return null;const[r,s,o,a]=i.rings[0],{spatialReference:l}=i;return new N({controlPoints:[new B.A({mapPoint:new O.A({x:r[0],y:r[1],spatialReference:l}),sourcePoint:(0,R.tc)(0,n)}),new B.A({mapPoint:new O.A({x:s[0],y:s[1],spatialReference:l}),sourcePoint:(0,R.tc)(0,0)}),new B.A({mapPoint:new O.A({x:o[0],y:o[1],spatialReference:l}),sourcePoint:(0,R.tc)(t,0)}),new B.A({mapPoint:new O.A({x:a[0],y:a[1],spatialReference:l}),sourcePoint:(0,R.tc)(t,n)})],width:t,height:n})}(this.georeference,this.contentWidth,this.contentHeight);if(r){if("control-points"!==e.type&&o.A.getLogger(this).warn(`only georeference of type 'control-points' may be persisted. The georeference of type '${e.type}' has been automatically converted.`),4!==r.controlPoints?.length&&i?.messages)return void i.messages.push(new s.A("property:unsupported","only 'control-points' georeference with 4 control points may be persisted."));t[n]=r.write({},i)}};if("control-points"!==e.type&&!this.loaded&&r)return t[n]={},void r.push(this.load().then(a));a()}get contentWidth(){return 0}get contentHeight(){return 0}toSource(e){const{georeference:t,contentWidth:n,contentHeight:i}=this;if(null==e||null==t||0===n||0===i)return null;const r=t.toSourceNormalized(e);return null==r?null:(r.x*=n,r.y*=i,r)}};(0,i.Cg)([(0,c.MZ)(Ae)],Ce.prototype,"georeference",void 0),(0,i.Cg)([(0,j.w)("georeference")],Ce.prototype,"readGeoreference",null),(0,i.Cg)([(0,Y.K)("georeference")],Ce.prototype,"writeGeoreference",null),(0,i.Cg)([(0,c.MZ)({json:{read:!1,write:!1}})],Ce.prototype,"opacity",void 0),Ce=(0,i.Cg)([(0,c.$K)("esri.layers.support.MediaElementBase")],Ce);var Re=n(85648);const Se=Symbol("ImageElementInstance"),Oe=Symbol("VideoElementInstance");function Ee(e){return function(e){return null!=e&&"object"==typeof e&&Se in e}(e)||function(e){return null!=e&&"object"==typeof e&&Oe in e}(e)}var Le,Be=n(97159);let Te=class extends Ce{static{Le=Se}constructor(e){super(e),this.animationOptions=null,this.content=null,this.image=null,this.type="image",this[Le]=!0,this.image=null}load(){const e=this.image;if("string"==typeof e){const t=(0,se.M5)(e).then(e=>{this._set("content",e)});this.addResolvingPromise(t)}else if(e instanceof HTMLImageElement){const t=e.decode().then(()=>{this._set("content",e)});this.addResolvingPromise(t)}else e?this._set("content",e):this.addResolvingPromise(Promise.reject(new s.A("image-element:invalid-image-type","Invalid image type",{image:e})));return Promise.resolve(this)}get contentWidth(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalWidth:this.content.width}get contentHeight(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalHeight:this.content.height}readImage(e,t,n){return(0,Be.f)(t.url,n)}writeImage(e,t,n,i){if(null==e)return;const r=i?.portalItem,s=i?.resources;if(!r||!s)return void("string"==typeof e&&(t[n]=(0,Be.t)(e,i)));const o=function(e){return"string"==typeof e&&!(0,oe.DB)(e)&&!(0,oe.w8)(e)}(e)?e:null;if(o){if(null==(0,Be.i)(o))return void(t[n]=o);const e=(0,Be.t)(o,{...i,verifyItemRelativeUrls:i?.verifyItemRelativeUrls?{writtenUrls:i.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},1);if(r&&e&&!(0,oe.oP)(e))return s.toKeep.push({resource:r.resourceFromPath(e),compress:!1}),void(t[n]=e)}t[n]="<pending>",s.pendingOperations.push(async function(e){return"string"==typeof e?(0,oe.DB)(e)?(0,oe.N9)(e):(await(0,re.A)(e,{responseType:"blob"})).data:new Promise(t=>function(e){if(e instanceof HTMLCanvasElement)return e;const t=e instanceof HTMLImageElement?e.naturalWidth:e.width,n=e instanceof HTMLImageElement?e.naturalHeight:e.height,i=document.createElement("canvas"),r=i.getContext("2d");return i.width=t,i.height=n,e instanceof HTMLImageElement?r.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&r.putImageData(e,0,0),i}(e).toBlob(t))}(e).then(e=>{const i=function(e,t){const n=(0,ae.lk)(),i=`${(0,oe.fj)("media",n)}.${(0,Re.n)({type:"blob",blob:e})}`;return t.resourceFromPath(i)}(e,r);t[n]=i.itemRelativeUrl,s.toAdd.push({resource:i,content:{type:"blob",blob:e},compress:!1,finish:e=>{this.image=e.url}})}))}};(0,i.Cg)([(0,c.MZ)()],Te.prototype,"animationOptions",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],Te.prototype,"content",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],Te.prototype,"contentWidth",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],Te.prototype,"contentHeight",null),(0,i.Cg)([(0,c.MZ)(Ie)],Te.prototype,"image",void 0),(0,i.Cg)([(0,j.w)("image",["url"])],Te.prototype,"readImage",null),(0,i.Cg)([(0,Y.K)("image")],Te.prototype,"writeImage",null),(0,i.Cg)([(0,c.MZ)(be)],Te.prototype,"type",void 0),Te=(0,i.Cg)([(0,c.$K)("esri.layers.support.ImageElement")],Te);var Ze=n(62885),je=n(65529),Ye=n(61893),Ue=n(36708),Xe=n(19419),He=n(12176),Ne=n(6518),$e=n(69622),ze=n(89056);let Ve=class extends $e.A{constructor(e){super(e)}get bounds(){const e=this.coords;return null==e?.extent?null:(0,Xe.VY)(e.extent)}get coords(){const e=this.element.georeference?.coords;return(0,L.projectOrLoad)(e,this.spatialReference).geometry}get normalizedCoords(){return E.A.fromJSON((0,ze.jZ)(this.coords))}get normalizedBounds(){const e=null!=this.normalizedCoords?this.normalizedCoords.extent:null;return null!=e?(0,Xe.VY)(e):null}};(0,i.Cg)([(0,c.MZ)()],Ve.prototype,"spatialReference",void 0),(0,i.Cg)([(0,c.MZ)()],Ve.prototype,"element",void 0),(0,i.Cg)([(0,c.MZ)()],Ve.prototype,"bounds",null),(0,i.Cg)([(0,c.MZ)()],Ve.prototype,"coords",null),(0,i.Cg)([(0,c.MZ)()],Ve.prototype,"normalizedCoords",null),(0,i.Cg)([(0,c.MZ)()],Ve.prototype,"normalizedBounds",null),Ve=(0,i.Cg)([(0,c.$K)("esri.layers.support.MediaElementView")],Ve);var ke,Ge=n(16494),We=n(38969);const Ke=Symbol("canplay");let De=class extends Ce{static{ke=Oe}constructor(e){super(e),this.autoplay=!0,this.content=null,this.type="video",this[ke]=!0}load(){const e=this.video;return"string"==typeof e?this.addResolvingPromise(this._preProcessVideoUrl(e).then(async e=>{const t=document.createElement("video");return t.src=Ge.W5.sanitizeUrl((0,oe.s2)(e)),t.crossOrigin="anonymous",t.autoplay=this.autoplay,t.muted=!0,t.loop=!0,t.playsInline=!0,this._loadVideo(t).then(()=>{this._set("content",t)})})):e instanceof HTMLVideoElement?this.addResolvingPromise(this._loadVideo(e).then(()=>{this._set("content",e)})):this.addResolvingPromise(Promise.reject(new s.A("video-element:invalid-video-type","Invalid video type",{video:e}))),Promise.resolve(this)}get contentWidth(){return this.content?.videoWidth??0}get contentHeight(){return this.content?.videoHeight??0}get currentTime(){return this.content?.currentTime}set currentTime(e){if(!this.content)return;const t=(0,xe.qE)(e,0,this.content.duration);"fastSeek"in this.content?this.content.fastSeek(t):this.content.currentTime=t,this.content.play().then(()=>{this.content?.pause()}).catch(()=>{})}get duration(){return this.content?.duration}set video(e){"not-loaded"===this.loadStatus?this._set("video",e):o.A.getLogger(this).error("#video","video cannot be changed after the element is loaded.")}writeVideo(e,t,n,i){if(!e)return void(i?.messages&&i.messages.push(new s.A("video-element:unsupported-video","video source is missing")));const r=function(e){return"string"==typeof e&&!(0,oe.DB)(e)&&!(0,oe.w8)(e)}(e)?e:null;if(!r)return void(i?.messages&&i.messages.push(new s.A("video-element:unsupported-video","video source must be an absolute url")));!(0,oe.oP)(r)&&i?.blockedRelativeUrls&&i.blockedRelativeUrls.push(r);const o=(0,oe.s2)(r);(0,Be.i)(o)?i?.messages&&i.messages.push(new s.A("video-element:unsupported-video","video source cannot be an item resource")):t[n]=o}async _preProcessVideoUrl(e){if((0,oe.zs)(e))return(0,oe.yM)(e);try{return await(0,re.A)(e,{method:"head"}),e}catch{try{return(0,oe.yM)(e,!0)}catch{return e}}}async _loadVideo(e){"anonymous"!==e.crossOrigin&&(e.crossOrigin="anonymous",(0,oe.w8)(e.src)||(e.src=e.src));try{await(0,We.i)(e,e=>this.addHandles(e,Ke)),this.autoplay&&await e.play().catch(e=>{throw console.error(e),e})}finally{this.removeHandles(Ke)}}};(0,i.Cg)([(0,c.MZ)()],De.prototype,"autoplay",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],De.prototype,"content",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],De.prototype,"contentWidth",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],De.prototype,"contentHeight",null),(0,i.Cg)([(0,c.MZ)({type:Number})],De.prototype,"currentTime",null),(0,i.Cg)([(0,c.MZ)({type:Number})],De.prototype,"duration",null),(0,i.Cg)([(0,c.MZ)(Ie)],De.prototype,"video",null),(0,i.Cg)([(0,Y.K)("video")],De.prototype,"writeVideo",null),(0,i.Cg)([(0,c.MZ)(be)],De.prototype,"type",void 0),De=(0,i.Cg)([(0,c.$K)("esri.layers.support.VideoElement")],De);const Fe={key:"type",defaultKeyValue:"image",base:Ce,typeMap:{image:Te,video:De}},qe=r.A.ofType(Fe);let Je=class extends((0,le.WV)((0,Ye.g)(je.nJ))){constructor(e){super(e),this._index=new Ne.F,this._elementViewsMap=new Map,this._elementsIndexes=new Map,this._elementsChangedHandler=e=>{for(const t of e.removed){const e=this._elementViewsMap.get(t);this._elementViewsMap.delete(t),this._index.delete(e),this.removeHandles(e),e.destroy(),this.notifyChange("fullExtent")}const{spatialReference:t}=this;for(const n of e.added){if(this._elementViewsMap.get(n))continue;const e=new Ve({spatialReference:t,element:n});this._elementViewsMap.set(n,e);const i=(0,Ue.wB)(()=>e.coords,()=>this._updateIndexForElement(e,!1));this._updateIndexForElement(e,!0),this.addHandles(i,e)}this._elementsIndexes.clear(),this.elements.forEach((e,t)=>this._elementsIndexes.set(e,t)),this.emit("refresh")},this.elements=new qe}async load(e){if((0,l.Te)(e),!this.spatialReference){const e=this.elements.find(e=>null!=e.georeference?.coords);this._set("spatialReference",e?e.georeference.coords.spatialReference:u.A.WGS84)}return this._elementsChangedHandler({added:this.elements.items,removed:[]}),this.addHandles(this.elements.on("change",this._elementsChangedHandler)),this}destroy(){this._index.clear(),this._elementViewsMap.clear(),this._elementsIndexes.clear()}get elements(){return this._get("elements")}set elements(e){this._set("elements",(0,Ze.V)(e,this._get("elements"),qe))}get fullExtent(){if("not-loaded"===this.loadStatus)return null;const e=this._index.fullBounds;return null==e?null:new pe.A({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:this.spatialReference})}set spatialReference(e){"not-loaded"===this.loadStatus?this._set("spatialReference",e):o.A.getLogger(this).error("#spatialReference","spatialReference cannot be changed after the source is loaded.")}async queryElements(e,t){await this.load(),await(0,L.initializeProjection)(e.spatialReference,this.spatialReference,null,t);const n=(0,me.aI)(e.spatialReference,this.spatialReference)?e:(0,L.project)(e,this.spatialReference);if(!n)return[];const i=n.normalize(),r=[];for(const e of i)this._index.forEachInBounds((0,Xe.VY)(e),({normalizedCoords:t,element:n})=>{null!=t&&(0,He.fA)(e,t)&&r.push(n)});return r.sort((e,t)=>this._elementsIndexes.get(e)-this._elementsIndexes.get(t)),r}hasElement(e){return this.elements.includes(e)}_updateIndexForElement(e,t){const n=e.normalizedBounds,i=this._index.has(e),r=null!=n;this._index.delete(e),r&&this._index.set(e,n),this.notifyChange("fullExtent"),t||(i!==r?this.emit("refresh"):this.emit("change",{element:e.element}))}};(0,i.Cg)([(0,c.MZ)()],Je.prototype,"elements",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],Je.prototype,"fullExtent",null),(0,i.Cg)([(0,c.MZ)()],Je.prototype,"spatialReference",null),Je=(0,i.Cg)([(0,c.$K)("esri.layers.support.LocalMediaElementSource")],Je);let Qe=class extends((0,d.dM)((0,f.j)((0,p.q)((0,m.A)((0,a.P)(h.A)))))){constructor(e){super(e),this.effectiveSource=null,this.georeference=null,this.copyright=null,this.operationalLayerType="MediaLayer",this.spatialReference=null,this.type="media",this._debouncedSaveOperations=(0,l.sg)(async(e,t,i)=>{const{save:r,saveAs:s}=await n.e(3561).then(n.bind(n,63561));switch(e){case 0:return r(this,t);case 1:return s(this,i,t)}}),this.source=new Je}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){await this.loadFromPortal({supportedTypes:["Media Layer"]},e);let t=this.source;if(!t)throw new s.A("media-layer:source-missing","Set 'MediaLayer.source' before loading the layer.");const n=this._getSourceOverride(t,this.georeference);n&&(this.setAtOrigin("source",n,"web-map"),this.setAtOrigin("source",n,"web-scene"),t=n);const i=Ee(t)?new Je({elements:new r.A([t])}):t;this._set("effectiveSource",i),this.spatialReference&&(i.spatialReference=this.spatialReference),await i.load(e),this.spatialReference=i.spatialReference}destroy(){this.effectiveSource?.destroy(),this.effectiveSource!==this.source&&this.source?.destroy()}readGeoreference(e,t){return e&&"itemId"in t&&t.itemId?e:void 0}get fullExtent(){return this.loaded?this.effectiveSource.fullExtent:null}get loaded(){return super.loaded}get source(){return this._get("source")}set source(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("source",e):o.A.getLogger(this).error("#source","source cannot be changed after the layer is loaded.")}castSource(e){return e?Array.isArray(e)?new Je({elements:new r.A(e)}):e instanceof r.A?new Je({elements:e}):e:null}readSource(e,t,n){if("itemId"in t&&t.itemId)return;const i=this._createSource(t);return i?.read(t,n),i}writeSource(e,t,n,i){if(e&&e instanceof Je){const t=e.elements.length;if(1!==t)return void(i?.messages&&i.messages.push(new s.A("media-layer:unsupported-source",`local media element source can only be persisted if it contains exactly one ImageElement, but it has ${t}.`)));e=e.elements.at(0)}Ee(e)?e.write(t,i):i?.messages&&(e?i.messages.push(new s.A("media-layer:unsupported-source","only media elements of type 'ImageElement' or 'VideoElement' can be persisted")):i.messages.push(new s.A("media-layer:unsupported-source","the media layer is missing a source")))}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}_createSource(e){if("mediaType"in e)switch(e.mediaType){case"image":return new Te;case"video":return new De}return null}_getSourceOverride(e,t){if(Ee(e)&&3===this.originIdOf("source")&&t&&(5===this.originIdOf("georeference")||4===this.originIdOf("georeference"))){const n=e.toJSON(),i=this._createSource(n);return i.read({...n},{origin:"portal-item"}),i.read({georeference:t},{origin:"web-map"}),i.read({georeference:t},{origin:"web-scene"}),i}return null}};(0,i.Cg)([(0,c.MZ)({readOnly:!0})],Qe.prototype,"effectiveSource",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{"web-document":{read:!0}}}})],Qe.prototype,"georeference",void 0),(0,i.Cg)([(0,j.w)("web-document","georeference")],Qe.prototype,"readGeoreference",null),(0,i.Cg)([(0,c.MZ)({type:String})],Qe.prototype,"copyright",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],Qe.prototype,"fullExtent",null),(0,i.Cg)([(0,c.MZ)({type:["MediaLayer"]})],Qe.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,c.MZ)({type:["show","hide"]})],Qe.prototype,"listMode",void 0),(0,i.Cg)([(0,c.MZ)({nonNullable:!0,json:{write:{enabled:!0,allowNull:!1,target:{url:{type:String},mediaType:{type:["image","video"]},georeference:{type:N}},overridePolicy(e,t,n){return{enabled:!0,allowNull:!1,ignoreOrigin:Pe(this,n?.origin)&&Ee(e)&&!!e.georeference&&e.originIdOf("georeference")>3}}}}})],Qe.prototype,"source",null),(0,i.Cg)([(0,c.wg)("source")],Qe.prototype,"castSource",null),(0,i.Cg)([(0,j.w)("source",["url"])],Qe.prototype,"readSource",null),(0,i.Cg)([(0,Y.K)("source")],Qe.prototype,"writeSource",null),(0,i.Cg)([(0,c.MZ)({type:u.A})],Qe.prototype,"spatialReference",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],Qe.prototype,"type",void 0),Qe=(0,i.Cg)([(0,c.$K)("esri.layers.MediaLayer")],Qe);const et=Qe},38969:(e,t,n)=>{n.d(t,{i:()=>r});var i=n(37955);function r(e,t){return new Promise((n,r)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?n():(t((0,i.Oo)(e,"canplay",n)),t((0,i.Oo)(e,"error",r)))})}},48163:(e,t,n)=>{function i(){return[0,0]}function r(e){return[e[0],e[1]]}function s(e,t){return[e,t]}function o(){return s(1,1)}function a(){return s(1,0)}function l(){return s(0,1)}n.d(t,{Un:()=>c,fA:()=>s,o8:()=>r,vt:()=>i});const c=o(),u=a(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:u,UNIT_Y:h,ZEROS:[0,0],clone:r,create:i,freeze:function(e,t){return[e,t]},fromArray:function(e,t=[0,0]){const n=Math.min(2,e.length);for(let i=0;i<n;++i)t[i]=e[i];return t},fromValues:s,ones:o,unitX:a,unitY:l,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},62885:(e,t,n)=>{n.d(t,{H:()=>s,V:()=>r});var i=n(7762);function r(e,t,n=i.A){return t||(t=new n),t===e||t.destroyed||(t.removeAll(),(r=e)&&(Array.isArray(r)||"items"in r&&Array.isArray(r.items))?t.addMany(e):e&&t.add(e)),t;var r}function s(e){return e}},69540:(e,t,n)=>{n.d(t,{OU:()=>u,Pw:()=>h});var i=n(31635),r=n(69622),s=(n(44208),n(4718)),o=(n(53966),n(97768)),a=n(88620),l=n(64108);const c=Symbol("ClonableMixin"),u=e=>{var t;const n=e;let r=class extends n{constructor(){super(...arguments),this[t]=!0}static{t=c}clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const n=t.metadata,i=t.store,r={},l=new Map;for(const t in n){const o=n[t],a=i?.originOf(t),c=o.clonable;if(o.readOnly||!1===c||7!==a&&0!==a&&5!==a&&4!==a)continue;const u=this[t];let h=null;if("function"==typeof c)h=c(u,e);else if("reference"===c)h=u;else if(h=(0,s.TU)(u,e),null!=u&&null==h)continue;0===a?l.set(t,h):r[t]=h}const c=new(0,Object.getPrototypeOf(this).constructor)(r);if(l.size){const e=(0,a.oY)(c)?.store;if(e)for(const[t,n]of l)e.set(t,n,0)}return c}};return r=(0,i.Cg)([(0,l.$)("esri.core.Clonable")],r),r},h=u(r.A)},75503:(e,t,n)=>{n.d(t,{EC:()=>b,wq:()=>a});var i=n(4576),r=n(21818),s=(n(44208),n(15142)),o=n(11006);class a{constructor(e=9,t){this._compareMinX=d,this._compareMinY=p,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),w.prune(),P.prune(),M.prune(),I.prune()}all(e){l(this._data,e)}search(e,t){let n=this._data;const i=this._toBBox;if(_(e,n))for(w.clear();n;){for(let r=0,s=n.children.length;r<s;r++){const s=n.children[r],o=n.leaf?i(s):s;_(e,o)&&(n.leaf?t(s):x(e,o)?l(s,t):w.push(s))}n=w.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!_(e,t))return!1;for(w.clear();t;){for(let i=0,r=t.children.length;i<r;i++){const r=t.children[i],s=t.leaf?n(r):r;if(_(e,s)){if(t.leaf||x(e,s))return!0;w.push(r)}}t=w.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new C([]),this}remove(e){if(!e)return this;let t,n=this._data,s=null,o=0,a=!1;const l=this._toBBox(e);for(M.clear(),I.clear();n||M.length>0;){if(n||(n=M.pop(),s=M.data[M.length-1],o=I.pop()??0,a=!0),n.leaf&&(t=(0,i.qh)(n.children,(0,r.zI)(e),n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),M.push(n),this._condense(M),this;a||n.leaf||!x(n,l)?s?(o++,n=s.children[o],a=!1):n=null:(M.push(n),I.push(o),o=0,s=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,i){const r=n-t+1;let s=this._maxEntries;if(r<=s){const i=new C(e.slice(t,n+1));return c(i,this._toBBox),i}i||(i=Math.ceil(Math.log(r)/Math.log(s)),s=Math.ceil(r/s**(i-1)));const o=new R([]);o.height=i;const a=Math.ceil(r/s),l=a*Math.ceil(Math.sqrt(s));v(e,t,n,l,this._compareMinX);for(let r=t;r<=n;r+=l){const t=Math.min(r+l-1,n);v(e,r,t,a,this._compareMinY);for(let n=r;n<=t;n+=a){const r=Math.min(n+a-1,t);o.children.push(this._build(e,n,r,i-1))}}return c(o,this._toBBox),o}_insert(e,t,n){const i=this._toBBox,r=n?e:i(e);M.clear();const s=function(e,t,n,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==n;){let n,i=1/0,r=1/0;for(let s=0,o=t.children.length;s<o;s++){const o=t.children[s],a=m(o),l=g(e,o)-a;l<r?(r=l,i=a<i?a:i,n=o):l===r&&a<i&&(i=a,n=o)}t=n||t.children[0]}return t}(r,this._data,t,M);for(s.children.push(e),h(s,r);t>=0&&M.data[t].children.length>this._maxEntries;)this._split(M,t),t--;!function(e,t,n){for(let i=n;i>=0;i--)h(t.data[i],e)}(r,M,t)}_split(e,t){const n=e.data[t],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);const s=this._chooseSplitIndex(n,r,i);if(!s)return;const o=n.children.splice(s,n.children.length-s),a=n.leaf?new C(o):new R(o);a.height=n.height,c(n,this._toBBox),c(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this._data=new R([e,t]),this._data.height=e.height+1,c(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let i,r,s;i=r=1/0;for(let o=t;o<=n-t;o++){const t=u(e,0,o,this._toBBox),a=u(e,o,n,this._toBBox),l=y(t,a),c=m(t)+m(a);l<i?(i=l,s=o,r=c<r?c:r):l===i&&c<r&&(r=c,s=o)}return s}_chooseSplitAxis(e,t,n){const i=e.leaf?this._compareMinX:d,r=e.leaf?this._compareMinY:p;this._allDistMargin(e,t,n,i)<this._allDistMargin(e,t,n,r)&&e.children.sort(i)}_allDistMargin(e,t,n,i){e.children.sort(i);const r=this._toBBox,s=u(e,0,t,r),o=u(e,n-t,n,r);let a=f(s)+f(o);for(let i=t;i<n-t;i++){const t=e.children[i];h(s,e.leaf?r(t):t),a+=f(s)}for(let i=n-t-1;i>=t;i--){const t=e.children[i];h(o,e.leaf?r(t):t),a+=f(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const r=e.data[t-1],s=r.children;s.splice((0,i.qh)(s,n,s.length,r.indexHint),1)}else this.clear();else c(n,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let n=e;for(P.clear();n;){if(!0===n.leaf)for(const e of n.children)t((0,r.zI)(e));else P.pushArray(n.children);n=P.pop()??null}}function c(e,t){u(e,0,e.children.length,t,e)}function u(e,t,n,i,r){r||(r=new C([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let s,o=t;o<n;o++)s=e.children[o],h(r,e.leaf?i(s):s);return r}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function p(e,t){return e.minY-t.minY}function m(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const n=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,r-n)*Math.max(0,s-i)}function x(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,n,i,r){const s=[t,n];for(;s.length;){const t=s.pop(),n=s.pop();if(t-n<=i)continue;const a=n+Math.ceil((t-n)/i/2)*i;(0,o.q)(e,a,n,t,r),s.push(n,a,a,t)}}const w=new s.A,P=new s.A,M=new s.A,I=new s.A({deallocator:void 0});class b{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class A extends b{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class C extends A{constructor(e){super(),this.children=e,this.leaf=!0}}class R extends A{constructor(e){super(),this.children=e,this.leaf=!1}}},80754:(e,t,n)=>{n.d(t,{j7:()=>o,kS:()=>l,kd:()=>a,r8:()=>c});var i=n(82799),r=n(16930),s=n(65864);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const n=c(e);for(const e of n)for(const n of e)n[0]+=t;return e}function c(e){return(0,s.Bi)(e)?e.rings:e.paths}},85648:(e,t,n)=>{n.d(t,{n:()=>r});var i=n(84952);function r(e){return s[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.Zo)(e);return l[t]||o}(e.url)}(e)]||a}const s={},o="text/plain",a=s[o],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)s[l[e]]=e},89056:(e,t,n)=>{n.d(t,{b3:()=>h,jZ:()=>u});var i=n(12195),r=n(19419),s=n(6606),o=n(95108),a=n(65864),l=n(80754),c=n(21325);function u(e){return d(e,!0)}function h(e){return d(e,!1)}function d(e,t){if(null==e)return null;const n=e.spatialReference,r=(0,c.Vp)(n),o=(0,i.W)(e)?e.toJSON():e;if(!r)return o;const u=(0,c.K8)(n)?102100:4326,h=l.j7[u].maxX,d=l.j7[u].minX;if((0,a.fT)(o))return m(o,h,d);if((0,a.U9)(o))return o.points=o.points.map(e=>m(e,h,d)),o;if((0,a.ZC)(o))return p(o,r);if((0,a.Bi)(o)||(0,a.Rg)(o)){const e=(0,s.Rg)(v,o),n={xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3]},i=(0,l.kd)(n.xmin,d)*(2*h),r=0===i?o:(0,l.kS)(o,i);return n.xmin+=i,n.xmax+=i,n.xmax>h?x(r,h,t):n.xmin<d?x(r,d,t):r}return o}function p(e,t){if(!t)return e;const n=function(e,t){const n=[],{ymin:i,ymax:r,xmin:s,xmax:o}=e,a=e.xmax-e.xmin,[l,c]=t.valid,{x:u,frameId:h}=f(e.xmin,t),{x:d,frameId:p}=f(e.xmax,t),m=u===d&&a>0;if(a>2*c){const e={xmin:s<o?u:d,ymin:i,xmax:c,ymax:r},t={xmin:l,ymin:i,xmax:s<o?d:u,ymax:r},a={xmin:0,ymin:i,xmax:c,ymax:r},m={xmin:l,ymin:i,xmax:0,ymax:r},f=[],y=[];g(e,a)&&f.push(h),g(e,m)&&y.push(h),g(t,a)&&f.push(p),g(t,m)&&y.push(p);for(let e=h+1;e<p;e++)f.push(e),y.push(e);n.push(new _(e,[h]),new _(t,[p]),new _(a,f),new _(m,y))}else u>d||m?n.push(new _({xmin:u,ymin:i,xmax:c,ymax:r},[h]),new _({xmin:l,ymin:i,xmax:d,ymax:r},[p])):n.push(new _({xmin:u,ymin:i,xmax:d,ymax:r},[h]));return n}(e,t).map(e=>e.extent);return n.length<2?n[0]||e:n.length>2?(e.xmin=t.valid[0],e.xmax=t.valid[1],e):{rings:n.map(e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]])}}function m(e,t,n){if(Array.isArray(e)){const i=e[0];if(i>t){const n=(0,l.kd)(i,t);e[0]=i+n*(-2*t)}else if(i<n){const t=(0,l.kd)(i,n);e[0]=i+t*(-2*n)}}else{const i=e.x;if(i>t){const n=(0,l.kd)(i,t);e.x+=n*(-2*t)}else if(i<n){const t=(0,l.kd)(i,n);e.x+=t*(-2*n)}}return e}function f(e,t){const[n,i]=t.valid,r=2*i;let s,o=0;return e>i?(s=Math.ceil(Math.abs(e-i)/r),e-=s*r,o=s):e<n&&(s=Math.ceil(Math.abs(e-n)/r),e+=s*r,o=-s),{x:e,frameId:o}}function g(e,t){const{xmin:n,ymin:i,xmax:r,ymax:s}=t;return y(e,n,i)&&y(e,n,s)&&y(e,r,s)&&y(e,r,i)}function y(e,t,n){return t>=e.xmin&&t<=e.xmax&&n>=e.ymin&&n<=e.ymax}function x(e,t,n=!0){const i=!(0,a.Rg)(e);if(i&&(0,o.m3)(e),n)return(new w).cut(e,t);const r=i?e.rings:e.paths,s=i?4:2,l=r.length,c=-2*t;for(let e=0;e<l;e++){const t=r[e];if(t&&t.length>=s){const e=[];for(const[n,...i]of t)e.push([n+c,...i]);r.push(e)}}return i?e.rings=r:e.paths=r,e}class _{constructor(e,t){this.extent=e,this.frameIds=t}}const v=(0,r.vt)();class w{constructor(){this._linesIn=[],this._linesOut=[]}cut(e,t){let n;if(this._xCut=t,e.rings)this._closed=!0,n=e.rings,this._minPts=4;else{if(!e.paths)return null;this._closed=!1,n=e.paths,this._minPts=2}for(const e of n){if(!e||e.length<this._minPts)continue;let t=!0;for(const n of e)t?(this.moveTo(n),t=!1):this.lineTo(n);this._closed&&this.close()}this._pushLineIn(),this._pushLineOut(),n=[];for(const e of this._linesIn)e&&e.length>=this._minPts&&n.push(e);const i=-2*this._xCut;for(const e of this._linesOut)if(e&&e.length>=this._minPts){for(const t of e)t[0]+=i;n.push(e)}return this._closed?e.rings=n:e.paths=n,e}moveTo(e){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(e[0]),this._moveTo(e[0],e[1],this._prevSide),this._prevPt=e,this._firstPt=e}lineTo(e){const t=this._side(e[0]);if(t*this._prevSide===-1){const n=this._intersect(this._prevPt,e);this._lineTo(this._xCut,n,0),this._prevSide=0,this._lineTo(e[0],e[1],t)}else this._lineTo(e[0],e[1],t);this._prevSide=t,this._prevPt=e}close(){const e=this._firstPt,t=this._prevPt;e[0]===t[0]&&e[1]===t[1]||this.lineTo(e),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(e,t,n){this._closed?(this._lineIn.push([n<=0?e:this._xCut,t]),this._lineOut.push([n>=0?e:this._xCut,t])):(n<=0&&this._lineIn.push([e,t]),n>=0&&this._lineOut.push([e,t]))}_lineTo(e,t,n){this._closed?(P(this._lineIn,n<=0?e:this._xCut,t),P(this._lineOut,n>=0?e:this._xCut,t)):n<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push([e,t])):n>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push([e,t])):this._prevSide<0?(this._lineIn.push([e,t]),this._lineOut.push([e,t])):this._prevSide>0&&(this._lineOut.push([e,t]),this._lineIn.push([e,t]))}_checkClosingPt(e){const t=e.length;t>3&&e[0][0]===this._xCut&&e[t-2][0]===this._xCut&&e[1][0]===this._xCut&&(e[0][1]=e[t-2][1],e.pop())}_side(e){return e<this._xCut?-1:e>this._xCut?1:0}_intersect(e,t){const n=(this._xCut-e[0])/(t[0]-e[0]);return e[1]+n*(t[1]-e[1])}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}function P(e,t,n){const i=e.length;i>1&&e[i-1][0]===t&&e[i-2][0]===t?e[i-1][1]=n:e.push([t,n])}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[957],{8303:(t,e,s)=>{s.d(e,{A:()=>A});var r=s(31635),o=s(92602),i=s(70333),n=s(11254),u=s(60999),a=s(49186),p=s(53966),l=s(97768),c=s(74887),d=s(84952),y=s(91429),g=s(77548),m=s(20655),f=s(80812),h=s(41318),v=s(10407),C=s(36005),I=s(43937);const A=t=>{const e=t;let A=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,l.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(t){t!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",t))}readPortalItem(t,e,s){if(e.itemId)return new f.default({id:e.itemId,portal:s?.portal})}writePortalItem(t,e){t?.id&&(e.itemId=t.id)}async loadFromPortal(t,e){if(this.portalItem?.id)try{const{load:r}=await s.e(1204).then(s.bind(s,41204));return(0,c.Te)(e),await r({instance:this,supportedTypes:t.supportedTypes,validateItem:t.validateItem,supportsData:t.supportsData,layerModuleTypeMap:t.layerModuleTypeMap,populateGroupLayer:t.populateGroupLayer},e)}catch(t){throw(0,c.zf)(t)||p.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${t}`),t}}async finishLoadEditablePortalLayer(t){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(t).catch(t=>((0,c.QP)(t),!0)))}async setUserPrivileges(t,e){if(!o.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(e);if(this.url)try{const{features:{edit:s,fullEdit:r},content:{updateItem:o}}=await this._fetchUserPrivileges(t,e);this._set("userHasEditingPrivileges",s),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",o)}catch(t){(0,c.QP)(t)}}async _fetchUserPrivileges(t,e){let s=this.portalItem;if(!t||!s||!s.loaded||s.sourceUrl)return this._fetchFallbackUserPrivileges(e);const r=!i.id?.findCredential(this.url),o=t===s.id;if(o&&s.portal.user)return this._getUserPrivileges(s,r);let n,u;if(o)n=s.portal.url;else try{n=await(0,g.wI)(this.url,e)}catch(t){(0,c.QP)(t)}if(!n||!(0,d.b8)(n,s.portal.url))return this._fetchFallbackUserPrivileges(e);try{const t=null!=e?e.signal:null;u=await(i.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:t}))}catch(t){(0,c.QP)(t)}const a=!0,p=!1,l=!1;if(!u)return{features:{edit:a,fullEdit:p},content:{updateItem:l}};try{if(o?await s.reload():(s=new f.default({id:t,portal:{url:n}}),await s.load(e)),s.portal.user)return this._getUserPrivileges(s,r)}catch(t){(0,c.QP)(t)}return{features:{edit:a,fullEdit:p},content:{updateItem:l}}}_getUserPrivileges(t,e){const s=(0,v.It)(t);return e&&(s.features.edit=!0),s}async _fetchFallbackUserPrivileges(t){let e=!0;try{e=await this._fetchUserHasEditingPrivileges(t)}catch(t){(0,c.QP)(t)}return{features:{edit:e,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(t){const e=this.url?i.id?.findCredential(this.url):null;if(!e)return!0;const s=S.credential===e?S.user:await this._fetchEditingUser(t);return S.credential=e,S.user=s,null==s?.privileges||s.privileges.includes("features:user:edit")}async _fetchEditingUser(t){const e=this.portalItem?.portal?.user;if(e)return e;const s=i.id?.findServerInfo(this.url??"");if(!s?.owningSystemUrl)return null;const r=`${s.owningSystemUrl}/sharing/rest`,o=m.A.getDefault();if(o&&o.loaded&&(0,d.S8)(o.restUrl)===(0,d.S8)(r))return o.user;const a=`${r}/community/self`,p=null!=t?t.signal:null,l=await(0,u.Ke)((0,n.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:p}));return l.ok?h.A.fromJSON(l.value.data):null}read(t,e){e&&(e.layer=this),super.read(t,e)}write(t,e){const s=e?.portal,r=this.portalItem?.id&&(this.portalItem.portal||m.A.getDefault());return s&&r&&!(0,d.ut)(r.restUrl,s.restUrl)?(e.messages&&e.messages.push(new a.A("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(t,{...e,layer:this})}};return(0,r.Cg)([(0,y.MZ)({type:f.default})],A.prototype,"portalItem",null),(0,r.Cg)([(0,C.w)("web-document","portalItem",["itemId"])],A.prototype,"readPortalItem",null),(0,r.Cg)([(0,I.K)("web-document","portalItem",{itemId:{type:String}})],A.prototype,"writePortalItem",null),(0,r.Cg)([(0,y.MZ)({clonable:!1})],A.prototype,"resourceReferences",void 0),(0,r.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasEditingPrivileges",void 0),(0,r.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasFullEditingPrivileges",void 0),(0,r.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasUpdateItemPrivileges",void 0),A=(0,r.Cg)([(0,y.$K)("esri.layers.mixins.PortalLayer")],A),A},S={credential:null,user:null}},10407:(t,e,s)=>{s.d(e,{It:()=>y,LG:()=>n,OM:()=>p,Sm:()=>l,Y:()=>u,bK:()=>a,mm:()=>d,sQ:()=>c});var r=s(91218),o=s(16930),i=s(28735);function n(t,e){if(!u(t,e)){const s=t.typeKeywords;s?s.push(e):t.typeKeywords=[e]}}function u(t,e){return!!t.typeKeywords?.includes(e)}function a(t){return u(t,d.HOSTED_SERVICE)}function p(t,e){const s=t.typeKeywords;if(s){const t=s.indexOf(e);t>-1&&s.splice(t,1)}}function l(t,e,s){s?n(t,e):p(t,e)}async function c(t){const e=t.clone().normalize();let s;if(e.length>1)for(const t of e)s?t.width>s.width&&(s=t):s=t;else s=e[0];return async function(t){const e=t.spatialReference;if(e.isWGS84)return t.clone();if(e.isWebMercator)return(0,i.ci)(t);const s=o.A.WGS84;return await(0,r.initializeProjection)(e,s),(0,r.project)(t,s)}(s)}const d={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function y(t){const{portal:e,isOrgItem:s,itemControl:r}=t,o=e.user?.privileges;let i=!o||o.includes("features:user:edit"),n=!!s&&!!o?.includes("features:user:fullEdit");const u="update"===r||"admin"===r;return u?n=i=!0:n&&(i=!0),{features:{edit:i,fullEdit:n},content:{updateItem:u}}}},18768:(t,e,s)=>{s.d(e,{b:()=>u});var r=s(31635),o=s(53966),i=s(91429),n=s(60694);const u=t=>{const e=t;let s=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const t=(0,n.qg)(this.url);if(t?.title)return t.title}return this._get("title")||""}set title(t){this._set("title",t)}set url(t){this._set("url",(0,n.Jf)(t,o.A.getLogger(this)))}};return(0,r.Cg)([(0,i.MZ)()],s.prototype,"title",null),(0,r.Cg)([(0,i.MZ)({type:String})],s.prototype,"url",null),s=(0,r.Cg)([(0,i.$K)("esri.layers.mixins.ArcGISService")],s),s}},20557:(t,e,s)=>{s.d(e,{Fm:()=>a,Hz:()=>y,JQ:()=>d,JZ:()=>I,ND:()=>m,R_:()=>n,U9:()=>c,fu:()=>o,nr:()=>g,oF:()=>i,rq:()=>p,z$:()=>l});const r=[["binary","application/octet-stream","bin",""]];function o(t,e){return null!=h(e.name,t?.supportedFormats??[])}function i(t,e){if(!t)return!1;const s=p(e,t.supportedFormats??[]);return null!=s&&t.editFormats.includes(s)}function n(t,e){return v(function(t,e){const s=t.toLowerCase();return f(e).find(t=>C(t)===s)}(t,e))}function u(t,e){return v(h(t,e))}function a(t,e){return C(function(t,e){return f(e).find(e=>v(e)===t)}(t,e))}function p(t,e){return u(t.name,e)??n(t.type,e)}function l(t,e,s){return n(t,s)??u(e,s)}function c({supportedFormats:t}){return l("model/gltf-binary","glb",t)}function d(t){const e=c(t);return null!=e&&t.editFormats.includes(e)}function y(t){if(!t)return null;const e=c(t),s=function({supportedFormats:t}){return l("model/gltf+json","gltf",t)}(t);let r=null;for(const o of t.queryFormats){if(o===e)return o;o===s&&(r=o)}return r}function g({supportedFormats:t}){return l("application/esri3do-SR_world","wld",t)}function m({supportedFormats:t}){return l("application/esri3do-SR_prj","prj",t)}function f(t){return[...r,...t]}function h(t,e){const s=t.toLowerCase();return f(e).find(t=>function(t){return t?.[2].split(",").map(t=>t.toLowerCase())??[]}(t).some(t=>s.endsWith(t)))}function v(t){return t?.[0]}function C(t){return t?.[1].toLowerCase()}function I(t){return t.tables?.find(t=>"assetMaps"===t.role)}},22453:(t,e,s)=>{s.d(e,{S:()=>g,d:()=>w});var r=s(44208),o=s(60694),i=s(20557);function n(t,e,s){return!!a(t,e,s)}function u(t,e,s){return a(t,e,s)}function a(t,e,s){return t&&t.hasOwnProperty(e)?t[e]:s}const p={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function l(t){const e=t?.supportedSpatialAggregationStatistics?.map(t=>t.toLowerCase());return{envelope:!!e?.includes("envelopeaggregate"),centroid:!!e?.includes("centroidaggregate"),convexHull:!!e?.includes("convexhullaggregate")}}function c(t,e){const s=t?.supportedOperationsWithCacheHint?.map(t=>t.toLowerCase());return!!s?.includes(e.toLowerCase())}function d(t){const e=t?.supportedStatisticTypes?.map(t=>t.toLowerCase());return{count:!!e?.includes("count"),sum:!!e?.includes("sum"),min:!!e?.includes("min"),max:!!e?.includes("max"),avg:!!e?.includes("avg"),var:!!e?.includes("var"),stddev:!!e?.includes("stddev"),percentileContinuous:!!e?.includes("percentile_cont"),percentileDiscrete:!!e?.includes("percentile_disc"),envelope:!!e?.includes("envelopeaggregate"),centroid:!!e?.includes("centroidaggregate"),convexHull:!!e?.includes("convexhullaggregate")}}function y(t){const e=t?.supportedNormalizationTypes?.map(t=>t.toLowerCase());return{field:!!e?.includes("field"),log:!!e?.includes("log"),naturalLog:!!e?.includes("naturallog"),percentOfTotal:!!e?.includes("percentoftotal"),squareRoot:!!e?.includes("squareroot")}}function g(t,e){return{analytics:m(t),attachment:f(t),data:h(t),metadata:v(t),operations:C(t.capabilities,t,e),query:I(t,e),queryAttributeBins:P(t),queryRelated:A(t),queryTopFeatures:S(t),editing:E(t)}}function m(t){return{supportsCacheHint:c(t.advancedQueryCapabilities,"queryAnalytics")}}function f(t){const e=t.attachmentProperties,s={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:c(t.advancedQueryCapabilities,"queryAttachments"),supportsOrderByFields:n(t.advancedQueryCapabilities,"supportsQueryAttachmentOrderByFields",!1),supportsResize:n(t,"supportsAttachmentsResizing",!1),supportsTypeWildcard:n(t.advancedQueryCapabilities,"supportsQueryAttachmentWithTypeWildcard",!1)};return e&&Array.isArray(e)&&e.forEach(t=>{const e=p[t.name];e&&(s[e]=!!t.isEnabled)}),s}function h(t){return{isVersioned:n(t,"isDataVersioned",!1),isBranchVersioned:n(t,"isDataBranchVersioned",!1),supportsAttachment:n(t,"hasAttachments",!1),supportsM:n(t,"hasM",!1),supportsZ:n(t,"hasZ",!1)}}function v(t){return{supportsAdvancedFieldProperties:n(t,"supportsFieldDescriptionProperty",!1)}}function C(t,e,s){const r=t?.toLowerCase().split(",").map(t=>t.trim())??[],i=s?(0,o.qg)(s):null,u=r.includes("MapServer"===i?.serverType?"data":"query"),a=r.includes("editing")&&!e.datesInUnknownTimezone&&!(!0===e.uniqueIdInfo?.OIDFieldContainsHashValue);let p=a&&r.includes("create"),l=a&&r.includes("delete"),c=a&&r.includes("update");const d=r.includes("changetracking"),y=e.advancedQueryCapabilities;return a&&!(p||l||c)&&(p=l=c=!0),{supportsCalculate:n(e,"supportsCalculate",!1),supportsTruncate:n(e,"supportsTruncate",!1),supportsValidateSql:n(e,"supportsValidateSql",!1),supportsAdd:p,supportsDelete:l,supportsEditing:a,supportsChangeTracking:d,supportsQuery:u,supportsQueryAnalytics:n(y,"supportsQueryAnalytic",!1),supportsQueryAttachments:n(y,"supportsQueryAttachments",!1),supportsQueryBins:n(y,"supportsQueryBins",!1)||!!e.queryBinsCapabilities,supportsQueryPivot:n(y,"supportsQueryPivot",!1),supportsQueryTopFeatures:n(y,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:n(e,"supportsAttachmentsResizing",!1),supportsSync:r.includes("sync"),supportsUpdate:c,supportsExceedsLimitStatistics:n(e,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:n(e,"supportsAsyncConvert3D",!1)}}function I(t,e){const s=t.advancedQueryCapabilities,a=t.ownershipBasedAccessControlForFeatures,p=t.archivingInfo,d=t.currentVersion,y=e?.includes("MapServer"),g=!y||d>=(0,r.A)("mapserver-pbf-version-support"),m=(0,o.Wo)(e),f=new Set((t.supportedQueryFormats??"").split(",").map(t=>t.toLowerCase().trim()));return{maxRecordCount:u(t,"maxRecordCount",void 0),maxRecordCountFactor:u(t,"maxRecordCountFactor",void 0),maxUniqueIDCount:u(t,"maxUniqueIDCount",void 0),standardMaxRecordCount:u(t,"standardMaxRecordCount",void 0),supportedSpatialAggregationStatistics:l(s),supportsCacheHint:n(s,"supportsQueryWithCacheHint",!1)||c(s,"query"),supportsCentroid:n(s,"supportsReturningGeometryCentroid",!1),supportsCentroidOnDegeneratedQuantizedGeometry:m||null==e,supportsCompactGeometry:m,supportsCurrentUser:n(s,"supportsCurrentUserQueries",!1),supportsDefaultSpatialReference:n(s,"supportsDefaultSR",!1),supportsDegeneratedQuantizedGeometry:n(s,"supportsDegeneratedQuantizedGeometry",!1),supportsDisjointSpatialRelationship:n(s,"supportsDisjointSpatialRel",!1),supportsDistance:n(s,"supportsQueryWithDistance",!1),supportsDistinct:n(s,"supportsDistinct",t.supportsAdvancedQueries),supportsExtent:n(s,"supportsReturningQueryExtent",!1),supportsFormatPBF:g&&f.has("pbf"),supportsFullTextSearch:n(s,"supportsFullTextSearch",!1),supportsGeometryProperties:n(s,"supportsReturningGeometryProperties",!1),supportsHavingClause:n(s,"supportsHavingClause",!1),supportsHistoricMoment:n(p,"supportsQueryWithHistoricMoment",!1),supportsMaxRecordCountFactor:n(s,"supportsMaxRecordCountFactor",!1),supportsOrderBy:n(s,"supportsOrderBy",t.supportsAdvancedQueries),supportsPagination:n(s,"supportsPagination",!1),supportsPaginationOnAggregatedQueries:n(s,"supportsPaginationOnAggregatedQueries",!1),supportsPercentileStatistics:n(s,"supportsPercentileStatistics",!1),supportsQuantization:n(t,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:n(t,"supportsQuantizationEditMode",!1),supportsQueryByAnonymous:n(a,"allowAnonymousToQuery",!0),supportsQueryByOthers:n(a,"allowOthersToQuery",!0),supportsQueryGeometry:n(t,"supportsReturningQueryGeometry",!1),supportsResultType:n(s,"supportsQueryWithResultType",!1),supportsReturnMesh:!!(0,i.Hz)(t.infoFor3D),supportsSpatialAggregationStatistics:n(s,"supportsSpatialAggregationStatistics",!1),supportsSqlExpression:n(s,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:n(t,"useStandardizedQueries",!1),supportsStatistics:n(s,"supportsStatistics",t.supportsStatistics),supportsTopFeaturesQuery:n(s,"supportsTopFeaturesQuery",!1),supportsTrueCurve:n(s,"supportsTrueCurve",!1),tileMaxRecordCount:u(t,"tileMaxRecordCount",void 0)}}function A(t){const e=t.advancedQueryCapabilities,s=n(e,"supportsAdvancedQueryRelated",!1);return{supportsPagination:n(e,"supportsQueryRelatedPagination",!1),supportsCount:s,supportsOrderBy:s,supportsCacheHint:c(e,"queryRelated")}}function S(t){return{supportsCacheHint:c(t.advancedQueryCapabilities,"queryTopFilter")}}function P(t){const e=t?t.queryBinsCapabilities:void 0;return{supportsDate:n(e,"supportsDateBin",!1),supportsFixedInterval:n(e,"supportsFixedIntervalBin",!1),supportsAutoInterval:n(e,"supportsAutoIntervalBin",!1),supportsFixedBoundaries:n(e,"supportsFixedBoundariesBin",!1),supportsStackBy:n(e,"supportsStackBy",!1),supportsSplitBy:n(e,"supportsSplitBy",!1),supportsSnapToData:n(e,"supportsSnapToData",!1),supportsReturnFullIntervalBin:n(e,"supportsReturnFullIntervalBin",!1),supportsFirstDayOfWeek:n(e,"supportsFirstDayOfWeek",!1),supportsNormalization:n(e,"supportsNormalization",!1),supportedStatistics:d(e),supportedNormalizationTypes:y(e)}}function E(t){const e=t.ownershipBasedAccessControlForFeatures,s=t?t.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:n(t,"allowGeometryUpdates",!0),supportsGlobalId:n(t,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:n(t,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:n(t,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:n(t,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:n(t,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:n(e,"allowAnonymousToDelete",!0),supportsDeleteByOthers:n(e,"allowOthersToDelete",!0),supportsUpdateByAnonymous:n(e,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:n(e,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:n(s,"supportsAsyncApplyEdits",!1),zDefault:u(t,"zDefault",void 0)}}function w(t){return{operations:{supportsAppend:n(t,"supportsAppend",!1),supportsCoverageQuery:t?.playbackInfo?.klv["0601"]??!1,supportsExportClip:n(t,"supportsExportClip",!1),supportsExportFrameset:n(t,"supportsExportFrameset",!1),supportsMensuration:n(t,"supportsMensuration",!1),supportsPreviews:n(t,"supportsPreviews",!1),supportsUpdate:n(t,"supportsUpdate",!1)}}}},69208:(t,e,s)=>{s.d(e,{d:()=>i});var r=s(31635),o=s(91429);const i=t=>{const e=t;let s=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,r.Cg)([(0,o.MZ)({type:Object,json:{write:{overridePolicy:t=>({enabled:!!(t&&Object.keys(t).length>0)})}}})],s.prototype,"customParameters",void 0),s=(0,r.Cg)([(0,o.$K)("esri.layers.mixins.CustomParametersMixin")],s),s}}}]);