@arcgis/core 4.34.0-next.21 → 4.34.0-next.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/applications/Components/arcadeFeatureUtils.d.ts +5 -0
- package/applications/Components/arcadeFeatureUtils.js +5 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{bcaf6edf887e4afbbdd2.js → 02dc6e31b1244e5bb785.js} +1 -1
- package/assets/esri/core/workers/chunks/{871fae52d2fddc9e7794.js → 04c17957c15234ca0321.js} +1 -1
- package/assets/esri/core/workers/chunks/084236ca316aad980192.js +1 -0
- package/assets/esri/core/workers/chunks/0b484224a92b52c34330.js +1 -0
- package/assets/esri/core/workers/chunks/{822b32aaeec05a347c84.js → 0ba6177ba118a0f032e2.js} +1 -1
- package/assets/esri/core/workers/chunks/0f6203ae32663b2b52db.js +1 -0
- package/assets/esri/core/workers/chunks/12723e79b996969e304e.js +1 -0
- package/assets/esri/core/workers/chunks/{bd7b985f7962b1cc7b8a.js → 146520d263b910b5bdc7.js} +1 -1
- package/assets/esri/core/workers/chunks/{445ddf57d2f503a0b98b.js → 15064c3b21b325d5c2f6.js} +1 -1
- package/assets/esri/core/workers/chunks/19ae76283a0cb0fe4dee.js +346 -0
- package/assets/esri/core/workers/chunks/{82a5000296134834d1ac.js → 1d75cb1747ffb7b8b050.js} +1 -1
- package/assets/esri/core/workers/chunks/20bcd2e6cf02e057ad7d.js +1 -0
- package/assets/esri/core/workers/chunks/{55ce214a10fb6fc2e901.js → 24fe862b607ec927e07f.js} +1 -1
- package/assets/esri/core/workers/chunks/30fae1f066dc3cd781f1.js +1 -0
- package/assets/esri/core/workers/chunks/{7ec73f63929b1623de72.js → 3793f282ddaccd3465f2.js} +1 -1
- package/assets/esri/core/workers/chunks/3fcd73ba832cb53d3a07.js +1 -0
- package/assets/esri/core/workers/chunks/{5e7f35bf1aab93cb1c52.js → 4cea5170939c8d363ef7.js} +1 -1
- package/assets/esri/core/workers/chunks/5253cca467fe9bc0a210.js +1 -0
- package/assets/esri/core/workers/chunks/{735d96d2b951cc1df3a3.js → 576e408fb0834f3948e8.js} +1 -1
- package/assets/esri/core/workers/chunks/{27c9d3f6cebca087a123.js → 6136bf09950adc46bc33.js} +1 -1
- package/assets/esri/core/workers/chunks/{dfd9ac2e28c96900c53e.js → 6c33ecffbc783cb8f944.js} +1 -1
- package/assets/esri/core/workers/chunks/6ca764b4baadef5c1515.js +1 -0
- package/assets/esri/core/workers/chunks/{fcdf714339060731fe1c.js → 7051bcc178eb512819f6.js} +1 -1
- package/assets/esri/core/workers/chunks/7cfba5cec425221962e8.js +1 -0
- package/assets/esri/core/workers/chunks/{3a753ce4de2e6ad40f7b.js → 86d6007c45f2aa643ac8.js} +1 -1
- package/assets/esri/core/workers/chunks/92ad9098006568358550.js +1 -0
- package/assets/esri/core/workers/chunks/{2ed698579befe73caafd.js → 94d75f3b215e3bd1b4d7.js} +1 -1
- package/assets/esri/core/workers/chunks/{15d1ab71aaf6bcf3145b.js → a7a5b89c2bb69f3af59c.js} +1 -1
- package/assets/esri/core/workers/chunks/{1d9e44bdd129cc682ae5.js → ac93b3f1ff15a95d926c.js} +1 -1
- package/assets/esri/core/workers/chunks/b4512d62b6cb26fc6b25.js +1 -0
- package/assets/esri/core/workers/chunks/{63e984a65ee670449a4a.js → b4bb461955a4c2bce072.js} +1 -1
- package/assets/esri/core/workers/chunks/{abc75c945f3cfb1629b0.js → ba5b24beebeb703b5919.js} +1 -1
- package/assets/esri/core/workers/chunks/{51afd0e71df1825d7593.js → c64fa94cba71ba2794e2.js} +1 -1
- package/assets/esri/core/workers/chunks/c94cc026c4ed330408fb.js +1 -0
- package/assets/esri/core/workers/chunks/cab1a1067f44ce374673.js +1 -0
- package/assets/esri/core/workers/chunks/{3f4a8c874c022dace9be.js → d1b363c418a67b087306.js} +1 -1
- package/assets/esri/core/workers/chunks/d45383d76ba99718b6d9.js +1 -0
- package/assets/esri/core/workers/chunks/{8b19fe829a9dc26fb3fe.js → d915d0a30d9beb24bd3a.js} +1 -1
- package/assets/esri/core/workers/chunks/{bbca1b85656d9ba71e4c.js → def8a854a05f17d3538e.js} +1 -1
- package/assets/esri/core/workers/chunks/{273ff53a68714e4daad5.js → e49a135a2933306a6105.js} +1 -1
- package/assets/esri/core/workers/chunks/{d31fa648497b0af97dc1.js → e9a9174c4d1a0a9effb6.js} +1 -1
- package/assets/esri/core/workers/chunks/f3d5d92e0aefc2593208.js +1 -0
- package/assets/esri/core/workers/chunks/{fc8bbc571216edd9ef5a.js → f3e3c2340452c1d60c95.js} +1 -1
- package/assets/esri/core/workers/chunks/{85b0e2a898251d048dda.js → f42155b7a4e6c5e80757.js} +1 -1
- package/assets/esri/core/workers/chunks/f43110391f124b8a179c.js +1009 -0
- package/assets/esri/core/workers/chunks/f90573c9dc36e51cd588.js +1 -0
- package/assets/esri/core/workers/chunks/{080a8a1c6fe2d215142d.js → fb5e2b1ced03eef28e96.js} +1 -1
- package/assets/esri/core/workers/chunks/fe73e74e3e4278aedcc3.js +1 -0
- package/config.js +1 -1
- package/core/Clonable.js +1 -1
- package/core/lang.js +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/support/MeshComponent.js +1 -1
- package/geometry/support/MeshMaterial.js +1 -1
- package/geometry/support/MeshMaterialMetallicRoughness.js +1 -1
- package/geometry/support/MeshTexture.js +1 -1
- package/geometry/support/MeshTransform.js +1 -1
- package/geometry/support/MeshVertexAttributes.js +1 -1
- package/geometry/support/meshUtils/convertMeshVertexSpace.js +1 -1
- package/geometry/support/meshUtils/merge.js +1 -1
- package/geometry/support/meshUtils/meshCloneUtils.js +5 -0
- package/interfaces.d.ts +183 -41
- package/kernel.js +1 -1
- package/layers/VideoLayer.js +1 -1
- package/layers/support/SceneModification.js +1 -1
- package/layers/support/SceneModifications.js +1 -1
- package/layers/support/rasterDatasets/MRFRaster.js +1 -1
- package/layers/video/videoUtils.js +1 -1
- package/libs/basisu/BasisUEncoder.js +1 -1
- package/libs/dxtEncoder/DXTEncoder.js +1 -1
- package/libs/i3s/I3SModule.js +1 -1
- package/networks/support/utils.js +1 -1
- package/package.json +1 -1
- package/rest/knowledgeGraph/GraphAddFieldIndexResult.js +1 -1
- package/rest/knowledgeGraph/GraphAddNamedTypesResult.js +1 -1
- package/rest/knowledgeGraph/GraphAddPropertyResult.js +1 -1
- package/rest/knowledgeGraph/GraphDataModelOperationResult.d.ts +1 -1
- package/rest/knowledgeGraph/GraphDataModelOperationResult.js +1 -1
- package/rest/knowledgeGraph/GraphDeleteFieldIndexResult.js +1 -1
- package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.js +1 -1
- package/rest/knowledgeGraph/GraphDeletePropertyResult.js +1 -1
- package/rest/knowledgeGraph/GraphUpdateNamedTypesResult.js +1 -1
- package/rest/knowledgeGraph/GraphUpdatePropertyResult.js +1 -1
- package/rest/knowledgeGraph/GraphUpdateSearchIndexResult.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/layers/VideoLayerView2D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/state/GoToOperation.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/support/cameraUtils.js +1 -1
- package/views/3d/support/viewingModeUtils.js +5 -0
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderTargets.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/webgl/ManagedFBOResource.js +1 -1
- package/views/3d/webgl.d.ts +2 -0
- package/views/3d/webgl.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/draw/DrawScreenTool.js +1 -1
- package/views/support/TextureCompressionHelper.js +1 -1
- package/views/support/TextureCompressionWorker.js +1 -1
- package/views/support/TextureCompressionWorkerHandle.js +1 -1
- package/views/support/layerViewUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/EditableInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/GroupInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/InputBase.d.ts +1 -1
- package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
- package/widgets/Editor/Edits.js +1 -1
- package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeaturesDrillIn.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/support/Selector2D/SelectionOperation.js +1 -1
- package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/06c3725d6cc21e7e4bcf.js +0 -1
- package/assets/esri/core/workers/chunks/0f5643d5437f48c63225.js +0 -1
- package/assets/esri/core/workers/chunks/1c7393bcd6e85ba25e1b.js +0 -1
- package/assets/esri/core/workers/chunks/2a784da5fa3f502d1803.js +0 -1
- package/assets/esri/core/workers/chunks/2e3f620c79ec04033a6e.js +0 -1
- package/assets/esri/core/workers/chunks/48953ddf0bbcf3d77e04.js +0 -1
- package/assets/esri/core/workers/chunks/5b7464137aacf1c5fd78.js +0 -1
- package/assets/esri/core/workers/chunks/7925e8ffa8027b59410e.js +0 -1
- package/assets/esri/core/workers/chunks/8235a997acb45ab43173.js +0 -1
- package/assets/esri/core/workers/chunks/8fa6c938e8dc7bbfaeb7.js +0 -1
- package/assets/esri/core/workers/chunks/9d2cb559dd9af4e1727c.js +0 -1
- package/assets/esri/core/workers/chunks/9eb1a171f5ef1fef42ed.js +0 -346
- package/assets/esri/core/workers/chunks/bac5e1d50b69f0d94694.js +0 -1
- package/assets/esri/core/workers/chunks/bcefb413d03d59506b5a.js +0 -1009
- package/assets/esri/core/workers/chunks/c317819ab0544c50c078.js +0 -1
- package/assets/esri/core/workers/chunks/c96fed4889712f5a9135.js +0 -1
- package/assets/esri/core/workers/chunks/cb4c49d5b70f9563bc46.js +0 -1
- package/assets/esri/core/workers/chunks/e9aa1d9ded8a52a40c57.js +0 -1
- package/assets/esri/core/workers/chunks/f65ad6a41c0c69bf1b21.js +0 -1
- package/assets/esri/core/workers/chunks/f806e9221dff7fcfc2f9.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4753],{4902:(t,e,r)=>{r.d(e,{A:()=>u});var s=r(90237),i=r(40608);let o=0;const l=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+o++})}};return e=(0,s._)([(0,i.$)("esri.core.Identifiable")],e),e};let n=class extends(l(class{})){};var a;n=(0,s._)([(0,i.$)("esri.core.Identifiable")],n),(a=n||(n={})).IdentifiableMixin=l,a.NumericIdentifiableMixin=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:o++})}};return e=(0,s._)([(0,i.$)("esri.core.Identifiable.NumericIdentifiable")],e),e};const u=n},8303:(t,e,r)=>{r.d(e,{A:()=>S});var s=r(90237),i=r(92602),o=r(70333),l=r(78888),n=r(60999),a=r(49186),u=r(53966),h=r(97768),c=r(74887),p=r(84952),d=r(10107),y=(r(44208),r(87811),r(36005)),f=r(40608),m=r(43937),g=r(77548),_=r(20655),w=r(80812),A=r(41318),v=r(10407);const S=t=>{let e=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,h.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(t){t!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",t))}readPortalItem(t,e,r){if(e.itemId)return new w.default({id:e.itemId,portal:r?.portal})}writePortalItem(t,e){t?.id&&(e.itemId=t.id)}async loadFromPortal(t,e){if(this.portalItem?.id)try{const{load:s}=await r.e(1204).then(r.bind(r,41204));return(0,c.Te)(e),await s({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)||u.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(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(e);if(this.url)try{const{features:{edit:r,fullEdit:s},content:{updateItem:i}}=await this._fetchUserPrivileges(t,e);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",i)}catch(t){(0,c.QP)(t)}}async _fetchUserPrivileges(t,e){let r=this.portalItem;if(!t||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(e);const s=!o.id?.findCredential(this.url),i=t===r.id;if(i&&r.portal.user)return this._getUserPrivileges(r,s);let l,n;if(i)l=r.portal.url;else try{l=await(0,g.wI)(this.url,e)}catch(t){(0,c.QP)(t)}if(!l||!(0,p.b8)(l,r.portal.url))return this._fetchFallbackUserPrivileges(e);try{const t=null!=e?e.signal:null;n=await(o.id?.getCredential(`${l}/sharing`,{prompt:!1,signal:t}))}catch(t){(0,c.QP)(t)}const a=!0,u=!1,h=!1;if(!n)return{features:{edit:a,fullEdit:u},content:{updateItem:h}};try{if(i?await r.reload():(r=new w.default({id:t,portal:{url:l}}),await r.load(e)),r.portal.user)return this._getUserPrivileges(r,s)}catch(t){(0,c.QP)(t)}return{features:{edit:a,fullEdit:u},content:{updateItem:h}}}_getUserPrivileges(t,e){const r=(0,v.It)(t);return e&&(r.features.edit=!0),r}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?o.id?.findCredential(this.url):null;if(!e)return!0;const r=x.credential===e?x.user:await this._fetchEditingUser(t);return x.credential=e,x.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(t){const e=this.portalItem?.portal?.user;if(e)return e;const r=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const s=`${r.owningSystemUrl}/sharing/rest`,i=_.A.getDefault();if(i&&i.loaded&&(0,p.S8)(i.restUrl)===(0,p.S8)(s))return i.user;const a=`${s}/community/self`,u=null!=t?t.signal:null,h=await(0,n.Ke)((0,l.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return h.ok?A.A.fromJSON(h.value.data):null}read(t,e){e&&(e.layer=this),super.read(t,e)}write(t,e){const r=e?.portal,s=this.portalItem?.id&&(this.portalItem.portal||_.A.getDefault());return r&&s&&!(0,p.ut)(s.restUrl,r.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,s._)([(0,d.MZ)({type:w.default})],e.prototype,"portalItem",null),(0,s._)([(0,y.w)("web-document","portalItem",["itemId"])],e.prototype,"readPortalItem",null),(0,s._)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],e.prototype,"writePortalItem",null),(0,s._)([(0,d.MZ)({clonable:!1})],e.prototype,"resourceReferences",void 0),(0,s._)([(0,d.MZ)({type:Boolean,readOnly:!0})],e.prototype,"userHasEditingPrivileges",void 0),(0,s._)([(0,d.MZ)({type:Boolean,readOnly:!0})],e.prototype,"userHasFullEditingPrivileges",void 0),(0,s._)([(0,d.MZ)({type:Boolean,readOnly:!0})],e.prototype,"userHasUpdateItemPrivileges",void 0),e=(0,s._)([(0,f.$)("esri.layers.mixins.PortalLayer")],e),e},x={credential:null,user:null}},18768:(t,e,r)=>{r.d(e,{b:()=>a});var s=r(90237),i=r(53966),o=r(10107),l=(r(44208),r(87811),r(40608)),n=r(60694);const a=t=>{let e=class extends t{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,i.A.getLogger(this)))}};return(0,s._)([(0,o.MZ)()],e.prototype,"title",null),(0,s._)([(0,o.MZ)({type:String})],e.prototype,"url",null),e=(0,s._)([(0,l.$)("esri.layers.mixins.ArcGISService")],e),e}},27865:(t,e,r)=>{r.d(e,{O9:()=>o,dw:()=>l,mj:()=>i});var s=r(59247);function i(t,e){const r=t.length>e.length?t:e;return(t.length>e.length?e:t).every((t,e)=>t.type===r[e].type)}function o(t,e){const r=t.length>e.length?t:e,i=t.length>e.length?e:t;for(let t=i.length;t<r.length;t++)i.push((0,s.sK)(r[t]))}function l(t){const e=t[0];return!!e&&"type"in e}},44159:(t,e,r)=>{r.d(e,{A:()=>i});var s=r(93687);class i{static{this.pool=new s.A(i,null,null,25,50)}static getId(t,e,r,s){return"object"==typeof t?`${t.level}/${t.row}/${t.col}/${t.world}`:`${t}/${e}/${r}/${s}`}constructor(t,e,r,s){this.set(t,e,r,s)}get key(){return this}get id(){return this.toString()}get normalizedId(){return`${this.level}/${this.row}/${this.col}`}set id(t){this.set(t)}get hash(){const t=4095&this.row,e=4095&this.col,r=63&this.level;return(3&this.world)<<30|e<<22|t<<8|r}acquire(t,e,r,s){this.set(t,e,r,s)}contains(t){const e=t.level-this.level;return e>=0&&this.row===t.row>>e&&this.col===t.col>>e&&this.world===t.world}containsChild(t){const e=t.level-this.level;return e>0&&this.row===t.row>>e&&this.col===t.col>>e&&this.world===t.world}equals(t){return this.level===t.level&&this.row===t.row&&this.col===t.col&&this.world===t.world}clone(){return new i(this)}release(){this.level=0,this.row=0,this.col=0,this.world=0}set(t,e,r,s){if(null==t)this.level=0,this.row=0,this.col=0,this.world=0;else if("object"==typeof t)this.level=t.level||0,this.row=t.row||0,this.col=t.col||0,this.world=t.world||0;else if("string"==typeof t){const[e,r,s,i]=t.split("/");this.level=parseFloat(e),this.row=parseFloat(r),this.col=parseFloat(s),this.world=parseFloat(i)}else this.level=+t,this.row=+e,this.col=+r,this.world=+s||0;return this}toString(){return`${this.level}/${this.row}/${this.col}/${this.world}`}getParentKey(){return this.level<=0?null:new i(this.level-1,this.row>>1,this.col>>1,this.world)}getNormalizedNeighbor(t,e,r){const s=this.clone();return s.col+=t,s.row+=e,r.normalizeKey(s),s}getChildKeys(){const t=this.level+1,e=this.row<<1,r=this.col<<1,s=this.world;return[new i(t,e,r,s),new i(t,e,r+1,s),new i(t,e+1,r,s),new i(t,e+1,r+1,s)]}compareRowMajor(t){return this.row<t.row?-1:this.row>t.row?1:this.col<t.col?-1:this.col>t.col?1:0}}},48757:(t,e,r)=>{r.r(e),r.d(e,{default:()=>ct});var s=r(90237),i=r(78888),o=r(60999),l=r(49186),n=r(4718),a=r(92071),u=r(74887),h=r(84952),c=r(10107),p=(r(44208),r(53966)),d=r(36005),y=r(40608),f=r(43937),m=r(5443),g=r(16930),_=r(4146),w=r(52136),A=r(89186),v=r(18768),S=r(63074),x=r(69208),b=r(16131),M=r(8303),I=r(54310),R=r(25036);let T=null;var P=r(34275);class E{constructor(t,e){this._spriteSource=t,this._maxTextureSize=e,this.devicePixelRatio=1,this._spriteImageFormat="png",this._isRetina=!1,this._spritesData={},this.image=null,this.width=null,this.height=null,this.loadStatus="not-loaded","url"===t.type&&t.spriteFormat&&(this._spriteImageFormat=t.spriteFormat),t.pixelRatio&&(this.devicePixelRatio=t.pixelRatio),this.baseURL=t.spriteUrl}get spriteNames(){const t=[];for(const e in this._spritesData)t.push(e);return t.sort(),t}getSpriteInfo(t){return this._spritesData?this._spritesData[t]:null}async load(t){if(this.baseURL){this.loadStatus="loading";try{await this._loadSprites(t),this.loadStatus="loaded"}catch{this.loadStatus="failed"}}else this.loadStatus="failed"}async _loadSprites(t){this._isRetina=this.devicePixelRatio>1.15;const{width:e,height:r,data:s,json:i}=await this._getSpriteData(this._spriteSource,t),o=Object.keys(i);if(!o||0===o.length||!s)return this._spritesData=this.image=null,void(this.width=this.height=0);this._spritesData=i,this.width=e,this.height=r;const n=Math.max(this._maxTextureSize,4096);if(e>n||r>n){const t=`Sprite resource for style ${this.baseURL} is bigger than the maximum allowed of ${n} pixels}`;throw p.A.getLogger("esri.layers.support.SpriteSource").error(t),new l.A("SpriteSource",t)}let a;for(let t=0;t<s.length;t+=4)a=s[t+3]/255,s[t]=s[t]*a,s[t+1]=s[t+1]*a,s[t+2]=s[t+2]*a;this.image=s}async _getSpriteData(t,e){if("image"===t.type){let e,r;if(this.devicePixelRatio<1.15){if(!t.spriteSource1x)throw new l.A("SpriteSource","no image data provided for low resolution sprites!");e=t.spriteSource1x.image,r=t.spriteSource1x.json}else{if(!t.spriteSource2x)throw new l.A("SpriteSource","no image data provided for high resolution sprites!");e=t.spriteSource2x.image,r=t.spriteSource2x.json}return"width"in e&&"height"in e&&"data"in e&&((0,P.mw)(e.data)||(0,P.UR)(e.data))?{width:e.width,height:e.height,data:new Uint8Array(e.data),json:r}:{...U(e),json:r}}const r=(0,h.An)(this.baseURL),s=r.query?"?"+(0,h.x0)(r.query):"",o=this._isRetina?"@2x":"",n=`${r.path}${o}.${this._spriteImageFormat}${s}`,a=`${r.path}${o}.json${s}`,[u,c]=await Promise.all([(0,i.A)(a,e),(0,i.A)(n,{responseType:"image",...e})]);return{...U(c.data),json:u.data}}}function U(t){const e=document.createElement("canvas"),r=e.getContext("2d");e.width=t.width,e.height=t.height,r.drawImage(t,0,0,t.width,t.height);const s=r.getImageData(0,0,t.width,t.height);return{width:t.width,height:t.height,data:new Uint8Array(s.data)}}var z=r(87045),L=r(25943),O=r(21325),D=r(28735),j=r(44159);class C{constructor(t){this.url=t}destroy(){this._tileIndexPromise=null}async fetchTileIndex(){return this._tileIndexPromise||(this._tileIndexPromise=(0,i.A)(this.url).then(t=>t.data.index)),this._tileIndexPromise}async dataKey(t,e){const r=await this.fetchTileIndex();return(0,u.Te)(e),this._getIndexedDataKey(r,t)}_getIndexedDataKey(t,e){const r=[e];if(e.level<0||e.row<0||e.col<0||e.row>>e.level>0||e.col>>e.level>0)return null;let s=e;for(;0!==s.level;)s=new j.A(s.level-1,s.row>>1,s.col>>1,s.world),r.push(s);let i,o,l=t,n=r.pop();if(1===l)return n;for(;r.length;)if(i=r.pop(),o=(1&i.col)+((1&i.row)<<1),l){if(0===l[o]){n=null;break}if(1===l[o]){n=i;break}n=i,l=l[o]}return n}}var k=r(97768);class N{constructor(t,e){this._tilemap=t,this._tileIndexUrl=e}destroy(){this._tilemap=(0,k.pR)(this._tilemap),this._tileIndexPromise=null}async fetchTileIndex(t){return this._tileIndexPromise||(this._tileIndexPromise=(0,i.A)(this._tileIndexUrl,{query:{...t?.query}}).then(t=>t.data.index)),this._tileIndexPromise}dataKey(t,e){const{level:r,row:s,col:i}=t,o=new j.A(t);return this._tilemap.fetchAvailabilityUpsample(r,s,i,o,e).then(()=>(o.world=t.world,o)).catch(t=>{if((0,u.zf)(t))throw t;return null})}}var $=r(91869);class F{constructor(t){this._tileUrl=t,this._promise=null,this._abortController=null,this._abortOptions=[]}getData(t){(null==this._promise||(0,u.G4)(this._abortController?.signal))&&(this._promise=this._makeRequest(this._tileUrl));const e=this._abortOptions;return e.push(t),(0,u.u7)(t,()=>{e.every(t=>(0,u.G4)(t))&&this._abortController.abort()}),this._promise.then(t=>(0,n.o8)(t))}async _makeRequest(t){this._abortController=new AbortController;const{data:e}=await(0,i.A)(t,{responseType:"array-buffer",signal:this._abortController.signal});return e}}const B=new Map;function Z(t,e){return(0,$.tE)(B,t,()=>new F(t)).getData(e).finally(()=>B.delete(t))}class K{constructor(t,e,r){this.tilemap=null,this.tileInfo=null,this.capabilities=null,this.fullExtent=null,this.initialExtent=null,this.name=t,this.sourceUrl=e;const s=(0,h.An)(this.sourceUrl),i=(0,n.o8)(r),o=i.tiles;if(s)for(let t=0;t<o.length;t++){const e=(0,h.An)(o[t]);e&&((0,h.oP)(e.path)||(e.path=(0,h.fj)(s.path,e.path)),o[t]=(0,h.a6)(e.path,{...s.query,...e.query}))}this.tileServers=o;const l=r.capabilities&&r.capabilities.split(",").map(t=>t.toLowerCase().trim()),a=!0===r?.exportTilesAllowed,u=!0===l?.includes("tilemap"),c=a&&r.hasOwnProperty("maxExportTilesCount")?r.maxExportTilesCount:0;this.capabilities={operations:{supportsExportTiles:a,supportsTileMap:u},exportTiles:a?{maxExportTilesCount:+c}:null},this.tileInfo=z.A.fromJSON(i.tileInfo);const p=r.tileMap?(0,h.a6)((0,h.fj)(s.path,r.tileMap),s.query??{}):null;u?(this.type="vector-tile",this.tilemap=new N(new L.d({layer:{parsedUrl:s,tileInfo:this.tileInfo},minLOD:i.minLOD??this.tileInfo.lods[0].level,maxLOD:i.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}),p)):p&&(this.tilemap=new C(p)),this.fullExtent=m.A.fromJSON(r.fullExtent),this.initialExtent=m.A.fromJSON(r.initialExtent)}destroy(){this.tilemap?.destroy()}async getRefKey(t,e){return this.tilemap?this.tilemap.dataKey(t,e):t}requestTile(t,e,r,s){return function(t,e,r,s,i){const o=(0,h.An)(t),l=o.query;if(l)for(const[t,i]of Object.entries(l))switch(i){case"{x}":l[t]=s.toString();break;case"{y}":l[t]=r.toString();break;case"{z}":l[t]=e.toString()}const n=o.path;return Z((0,h.a6)(n.replaceAll(/\{z\}/gi,e.toString()).replaceAll(/\{y\}/gi,r.toString()).replaceAll(/\{x\}/gi,s.toString()),{...o.query}),i)}(this.tileServers[e%this.tileServers.length],t,e,r,s)}isCompatibleWith(t){const e=this.tileInfo,r=t.tileInfo;if(!e.spatialReference.equals(r.spatialReference))return!1;if(!e.origin.equals(r.origin))return!1;if(Math.round(e.dpi)!==Math.round(r.dpi))return!1;const s=e.lods,i=r.lods,o=Math.min(s.length,i.length);for(let t=0;t<o;t++){const e=s[t],r=i[t];if(e.level!==r.level||Math.round(e.scale)!==Math.round(r.scale))return!1}return!0}}function q(...t){let e;for(const r of t)if(null!=r)if((0,h.BQ)(r)){if(e){const t=e.split("://")[0];e=t+":"+r.trim()}}else e=(0,h.oP)(r)?r:(0,h.fj)(e,r);return e?(0,h.UC)(e):void 0}async function G(t,e,r,s,o){let l,n,a;if((0,u.Te)(o),"string"==typeof r){const t=(0,h.S8)(r);a=await(0,i.A)(t,{...o,responseType:"json",query:{f:"json",...o?.query}}),a.ssl&&(l&&(l=l.replace(/^http:/i,"https:")),n&&(n=n.replace(/^http:/i,"https:"))),l=t,n=t}else null!=r&&(a={data:r},l=r.jsonUrl||null,n=s);const c=a?.data;if(H(c))return t.styleUrl=l||null,async function(t,e,r,s){const i=r?(0,h.nM)(r):(0,h.gd)();t.styleBase=i,t.style=e,e["sprite-format"]&&"webp"===e["sprite-format"].toLowerCase()&&(t.spriteFormat="webp");const o=[];if(e.sources&&e.sources.esri){const r=e.sources.esri;r.url?await G(t,"esri",q(i,r.url),void 0,s):o.push(G(t,"esri",r,i,s))}for(const r of Object.keys(e.sources))"esri"!==r&&"vector"===e.sources[r].type&&(e.sources[r].url?o.push(G(t,r,q(i,e.sources[r].url),void 0,s)):e.sources[r].tiles&&o.push(G(t,r,e.sources[r],i,s)));await Promise.all(o)}(t,c,n,o);if(function(t){return!H(t)}(c))return t.sourceUrl?W(t,c,n,!1,e,o):(t.sourceUrl=l||null,W(t,c,n,!0,e,o));throw new Error("You must specify the URL or the JSON for a service or for a style.")}function Q(t){return"object"==typeof t&&!!t&&"tilejson"in t&&null!=t.tilejson}function H(t){return!!t&&"sources"in t&&!!t.sources}async function W(t,e,r,s,i,o){const l=r?(0,h.UC)(r)+"/":(0,h.gd)(),a=function(t){const e=512;if(function(t){return t.hasOwnProperty("tileInfo")}(t)){const r=t?.tileInfo;return null!=r&&(null==r.rows&&(r.rows=e),null==r.cols&&(r.cols=e)),t}const r={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100,latestWkid:3857}};let s=null;if(Q(t)){const{bounds:e}=t;if(e){const t=(0,D.Gh)({x:e[0],y:e[1],spatialReference:(0,n.o8)(O.KK)}),r=(0,D.Gh)({x:e[2],y:e[3],spatialReference:(0,n.o8)(O.KK)});s={xmin:t.x,ymin:t.y,xmax:r.x,ymax:r.y,spatialReference:(0,n.o8)(O.ch)}}}null===s&&(s=r);let i=78271.51696400007,o=295828763.7957775;const l=[],a=t.hasOwnProperty("maxzoom")&&null!=t.maxzoom?+t.maxzoom:22;for(let t=0;t<=a;t++)l.push({level:t,scale:o,resolution:i}),i/=2,o/=2;return{capabilities:"TilesOnly",initialExtent:s,fullExtent:r,minScale:0,maxScale:0,tiles:t.tiles,tileInfo:{rows:e,cols:e,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:l,spatialReference:(0,n.o8)(O.ch)}}}(e),u=new K(i,(0,h.a6)(l,o?.query??{}),a);if(!s&&t.primarySourceName in t.sourceNameToSource){const e=t.sourceNameToSource[t.primarySourceName];if(!e.isCompatibleWith(u))return;null!=u.fullExtent&&(null!=e.fullExtent?e.fullExtent.union(u.fullExtent):e.fullExtent=u.fullExtent.clone()),e.tileInfo&&u.tileInfo&&e.tileInfo.lods.length<u.tileInfo.lods.length&&(e.tileInfo=u.tileInfo)}if(s&&(t.sourceBase=l,t.source=e,t.validatedSource=a,t.primarySourceName=i),t.sourceNameToSource[i]=u,!Q(t)&&"defaultStyles"in e&&!t.style){if(null==e.defaultStyles)throw new Error;return"string"==typeof e.defaultStyles?G(t,"",q(l,e.defaultStyles,"root.json"),void 0,o):G(t,"",e.defaultStyles,q(l,"root.json"),o)}}var V=r(88788),J=r(39131),X=r(97159),Y=r(86738),tt=r(91806);const et=1e-6;function rt(t,e){if(t===e)return!0;if(null==t&&null!=e)return!1;if(null!=t&&null==e)return!1;if(null==t||null==e)return!1;if(!t.spatialReference.equals(e.spatialReference)||t.dpi!==e.dpi)return!1;const r=t.origin,s=e.origin;if(Math.abs(r.x-s.x)>=et||Math.abs(r.y-s.y)>=et)return!1;let i,o;t.lods[0].scale>e.lods[0].scale?(i=t,o=e):(o=t,i=e);for(let t=i.lods[0].scale;t>=o.lods[o.lods.length-1].scale-et;t/=2)if(Math.abs(t-o.lods[0].scale)<et)return!0;return!1}function st(t,e){if(t===e)return t;if(null==t&&null!=e)return e;if(null!=t&&null==e)return t;if(null==t||null==e)return null;const r=t.size[0],s=t.format,i=t.dpi,o=new Y.A({x:t.origin.x,y:t.origin.y}),l=t.spatialReference,n=t.lods[0].scale>e.lods[0].scale?t.lods[0]:e.lods[0],a=t.lods[t.lods.length-1].scale<=e.lods[e.lods.length-1].scale?t.lods[t.lods.length-1]:e.lods[e.lods.length-1],u=n.scale,h=n.resolution,c=a.scale,p=[];let d=u,y=h,f=0;for(;d>=c;)p.push(new tt.A({level:f,resolution:y,scale:d})),f++,d/=2,y/=2;return new z.A({size:[r,r],dpi:i,format:s||"pbf",origin:o,lods:p,spatialReference:l})}var it=r(45013);class ot{constructor(t){this.getUnmaskedRenderer=t}}function lt(t){const e=t.getExtension("WEBGL_debug_renderer_info");return e?new ot(()=>t.getParameter(e.UNMASKED_RENDERER_WEBGL)):null}let nt;function at(){return nt??=function(){const t=new ut,e=function(t){if("undefined"==typeof WebGL2RenderingContext)return null;const e=document.createElement("canvas");if(!e)return null;let r=e.getContext("webgl2",{failIfMajorPerformanceCaveat:!0});if(null==r&&(r=e.getContext("webgl2"),null!=r&&(t.majorPerformanceCaveat=!0,t.unmaskedRenderer=lt(r)?.getUnmaskedRenderer()??"unknown")),null==r)return r;t.available=!0,t.maxTextureSize=r.getParameter(r.MAX_TEXTURE_SIZE),t.supportsVertexShaderSamplers=r.getParameter(r.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;const s=r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT);return s&&(t.supportsHighPrecisionFragment=s.precision>0),r}(t);return null==e||(t.supportsColorBufferFloat=null!==e.getExtension("EXT_color_buffer_float"),t.supportsColorBufferFloatBlend=null!==e.getExtension("EXT_float_blend"),t.supportsColorBufferHalfFloat=t.supportsColorBufferFloat||null!==e.getExtension("EXT_color_buffer_half_float")),t}(),nt}class ut{constructor(){this.available=!1,this.majorPerformanceCaveat=!1,this.maxTextureSize=0,this.supportsVertexShaderSamplers=!1,this.supportsHighPrecisionFragment=!1,this.supportsColorBufferFloat=!1,this.supportsColorBufferFloatBlend=!1,this.supportsColorBufferHalfFloat=!1,this.unmaskedRenderer="unloaded"}}let ht=class extends((0,S.dM)((0,R.j)((0,I.J)((0,A.f)((0,v.b)((0,b.q)((0,M.A)((0,x.d)((0,w.p)((0,a.P)(_.A))))))))))){constructor(...t){super(...t),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.path=null,this.refreshInterval=0,this.style=null,this.tilemapCache=null,this.type="vector-tile",this.url=null}normalizeCtorArgs(t,e){return"string"==typeof t?{url:t,...e}:t}destroy(){if(this.sourceNameToSource)for(const t of Object.values(this.sourceNameToSource))t?.destroy();this.primarySource?.destroy(),this._spriteSourceMap.clear()}async prefetchResources(t){await this.loadSpriteSource(globalThis.devicePixelRatio||1,t)}load(t){const e=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},t).catch(u.QP).then(async()=>{if(!this.portalItem?.id)return;const e=`${this.portalItem.itemCdnUrl}/resources/styles/root.json`;(await(0,i.A)(e,{...t,query:{f:"json",...this.customParameters,token:this.apiKey},authMode:this.portalItem.portal.authMode})).data&&this.read({url:e},(0,V.v)(this.portalItem,"portal-item"))}).catch(u.QP).then(()=>this._loadStyle(t));return this.addResolvingPromise(e),Promise.resolve(this)}get attributionDataUrl(){const t=this.currentStyleInfo,e=t?.serviceUrl&&(0,h.An)(t.serviceUrl);if(!e)return null;const r=this._getDefaultAttribution(e.path);return r?(0,h.a6)(r,{...this.customParameters,token:this.apiKey}):null}get capabilities(){const t=this.primarySource;return t?t.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){return this.primarySource?.fullExtent||null}get initialExtent(){return this.primarySource?.initialExtent||null}get parsedUrl(){return this.serviceUrl?(0,h.An)(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo?.serviceUrl||null}get spatialReference(){return this.tileInfo?.spatialReference??null}get styleUrl(){return this.currentStyleInfo?.styleUrl||null}writeStyleUrl(t,e){t&&(0,h.BQ)(t)&&(t=`https:${t}`);const r=(0,J.py)(t);e.styleUrl=(0,X.e)(t,r)}get tileInfo(){const t=[];for(const e in this.sourceNameToSource)t.push(this.sourceNameToSource[e]);let e=this.primarySource?.tileInfo||new z.A;if(t.length>1)for(let r=0;r<t.length;r++)rt(e,t[r].tileInfo)&&(e=st(e,t[r].tileInfo));return e}readTilemapCache(t,e){const r=e.capabilities?.includes("Tilemap");return r?new L.d({layer:this}):null}readVersion(t,e){return e.version?parseFloat(e.version):parseFloat(e.currentVersion)}async loadSpriteSource(t=1,e){if(!this._spriteSourceMap.has(t)){const r=at().maxTextureSize,s=this.currentStyleInfo?.spriteUrl?(0,h.a6)(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null,i=new E({type:"url",spriteUrl:s,pixelRatio:t,spriteFormat:this.currentStyleInfo?.spriteFormat},r);await i.load(e),this._spriteSourceMap.set(t,i)}return this._spriteSourceMap.get(t)}async setSpriteSource(t,e){if(!t)return null;const r=at().maxTextureSize,s=t.spriteUrl,i=s?(0,h.a6)(s,{...this.customParameters,token:this.apiKey}):null;if(!i&&"url"===t.type)return null;const o=new E(t,r);try{await o.load(e);const r=t.pixelRatio||1;return this._spriteSourceMap.clear(),this._spriteSourceMap.set(r,o),i&&this.currentStyleInfo&&(this.currentStyleInfo.spriteUrl=i),this.emit("spriteSource-change",{spriteSource:o}),o}catch(t){(0,u.QP)(t)}return null}async loadStyle(t,e){const r=t||this.style||this.url;return this._loadingTask&&"string"==typeof r&&this.url===r||(this._loadingTask?.abort(),this._loadingTask=(0,o.UT)(t=>(this._spriteSourceMap.clear(),this._getSourceAndStyle(r,{signal:t})),e)),this._loadingTask.promise}getStyleLayerId(t){return this.styleRepository.getStyleLayerId(t)}getStyleLayerIndex(t){return this.styleRepository.getStyleLayerIndex(t)}getPaintProperties(t){return(0,n.o8)(this.styleRepository?.getPaintProperties(t))}setPaintProperties(t,e){const r=this.styleRepository.isPainterDataDriven(t);this.styleRepository.setPaintProperties(t,e);const s=this.styleRepository.isPainterDataDriven(t);this.emit("paint-change",{layer:t,paint:e,isDataDriven:r||s})}getStyleLayer(t){return(0,n.o8)(this.styleRepository.getStyleLayer(t))}setStyleLayer(t,e){this.styleRepository.setStyleLayer(t,e),this.emit("style-layer-change",{layer:t,index:e})}deleteStyleLayer(t){this.styleRepository.deleteStyleLayer(t),this.emit("delete-style-layer",{layer:t})}getLayoutProperties(t){return(0,n.o8)(this.styleRepository.getLayoutProperties(t))}setLayoutProperties(t,e){this.styleRepository.setLayoutProperties(t,e),this.emit("layout-change",{layer:t,layout:e})}setStyleLayerVisibility(t,e){this.styleRepository.setStyleLayerVisibility(t,e),this.emit("style-layer-visibility-change",{layer:t,visibility:e})}getStyleLayerVisibility(t){return this.styleRepository.getStyleLayerVisibility(t)}write(t,e){return e?.origin&&!this.styleUrl?(e.messages&&e.messages.push(new l.A("vectortilelayer:unsupported",`VectorTileLayer (${this.title}, ${this.id}) with style defined by JSON only are not supported`,{layer:this})),null):super.write(t,e)}getTileUrl(t,e,r){return null}async _getSourceAndStyle(t,e){if(!t)throw new Error("invalid style!");const r=await async function(t,e){const r={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[s,i]="string"==typeof t?[t,null]:[null,t.jsonUrl];return await G(r,"esri",t,i,e),{layerDefinition:r.validatedSource,url:s,serviceUrl:r.sourceUrl,style:r.style,styleUrl:r.styleUrl,spriteUrl:r.style.sprite&&q(r.styleBase,r.style.sprite),spriteFormat:r.spriteFormat,glyphsUrl:r.style.glyphs&&q(r.styleBase,r.style.glyphs),sourceNameToSource:r.sourceNameToSource,primarySourceName:r.primarySourceName}}(t,{...e,query:{...this.customParameters,token:this.apiKey}});"webp"===r.spriteFormat&&(await function(){if(T)return T;const t={lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"};return T=new Promise(e=>{const r=new Image;r.onload=()=>{r.onload=r.onerror=null,e(r.width>0&&r.height>0)},r.onerror=()=>{r.onload=r.onerror=null,e(!1)},r.src="data:image/webp;base64,"+t.lossy}),T}()||(r.spriteFormat="png")),this._set("currentStyleInfo",{...r}),"string"==typeof t?(this.url=t,this.style=null):(this.url=null,this.style=t),this._set("sourceNameToSource",r.sourceNameToSource),this._set("primarySource",r.sourceNameToSource[r.primarySourceName]),this._set("styleRepository",new it.A(r.style,!1)),this.read(r.layerDefinition,{origin:"service"}),this.emit("load-style")}_getDefaultAttribution(t){const e=t.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^/]+)?\/arcgis\/rest\/services\/([^/]+(\/[^/]+)*)\/vectortileserver/i),r=["OpenBasemap_v2","OpenBasemap_GCS_v2","OpenStreetMap_v2","OpenStreetMap_Daylight_v2","OpenStreetMap_Export_v2","OpenStreetMap_FTS_v2","OpenStreetMap_GCS_v2","World_Basemap","World_Basemap_v2","World_Basemap_Export_v2","World_Basemap_GCS_v2","World_Basemap_WGS84","World_Contours_v2","World_Hillshade_v2"];if(!e)return;const s=e[2]&&e[2].toLowerCase();if(!s)return;const i=e[1]||"";for(const t of r)if(t.toLowerCase().includes(s))return(0,h.S8)(`//static.arcgis.com/attribution/Vector${i}/${t}`)}async _loadStyle(t){return this._loadingTask?.promise??this.loadStyle(null,t)}};(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"attributionDataUrl",null),(0,s._)([(0,c.MZ)({type:["show","hide"]})],ht.prototype,"listMode",void 0),(0,s._)([(0,c.MZ)({json:{read:!0,write:!0}})],ht.prototype,"blendMode",void 0),(0,s._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],ht.prototype,"capabilities",null),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"currentStyleInfo",void 0),(0,s._)([(0,c.MZ)({json:{read:!1},readOnly:!0,type:m.A})],ht.prototype,"fullExtent",null),(0,s._)([(0,c.MZ)({json:{read:!1},readOnly:!0,type:m.A})],ht.prototype,"initialExtent",null),(0,s._)([(0,c.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],ht.prototype,"isReference",void 0),(0,s._)([(0,c.MZ)({type:["VectorTileLayer"]})],ht.prototype,"operationalLayerType",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"parsedUrl",null),(0,s._)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],ht.prototype,"path",void 0),(0,s._)([(0,c.MZ)({type:Number,json:{write:!1,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],ht.prototype,"refreshInterval",void 0),(0,s._)([(0,c.MZ)()],ht.prototype,"style",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"serviceUrl",null),(0,s._)([(0,c.MZ)({type:g.A,readOnly:!0})],ht.prototype,"spatialReference",null),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"styleRepository",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"sourceNameToSource",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"primarySource",void 0),(0,s._)([(0,c.MZ)({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],ht.prototype,"styleUrl",null),(0,s._)([(0,f.K)(["portal-item","web-document"],"styleUrl")],ht.prototype,"writeStyleUrl",null),(0,s._)([(0,c.MZ)({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:z.A})],ht.prototype,"tileInfo",null),(0,s._)([(0,c.MZ)()],ht.prototype,"tilemapCache",void 0),(0,s._)([(0,d.w)("service","tilemapCache",["capabilities","tileInfo"])],ht.prototype,"readTilemapCache",null),(0,s._)([(0,c.MZ)({json:{read:!1},readOnly:!0,value:"vector-tile"})],ht.prototype,"type",void 0),(0,s._)([(0,c.MZ)({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}})],ht.prototype,"url",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"version",void 0),(0,s._)([(0,d.w)("version",["version","currentVersion"])],ht.prototype,"readVersion",null),ht=(0,s._)([(0,y.$)("esri.layers.VectorTileLayer")],ht);const ct=ht},52136:(t,e,r)=>{r.d(e,{p:()=>l});var s=r(90237),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const l=t=>{let e=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(t){null!=t?this._override("apiKey",t):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,s._)([(0,i.MZ)({type:String})],e.prototype,"apiKey",null),e=(0,s._)([(0,o.$)("esri.layers.mixins.APIKeyMixin")],e),e}},59247:(t,e,r)=>{r.d(e,{bv:()=>a,Fk:()=>u,yG:()=>h,$b:()=>c,Nd:()=>p,jm:()=>d,sK:()=>m});var s=r(40876),i=r(90629);function o(){const t=new Float32Array(16);return t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}const l=o();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:l,clone:function(t){const e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},create:o,fromValues:function(t,e,r,s,i,o,l,n,a,u,h,c,p,d,y,f){const m=new Float32Array(16);return m[0]=t,m[1]=e,m[2]=r,m[3]=s,m[4]=i,m[5]=o,m[6]=l,m[7]=n,m[8]=a,m[9]=u,m[10]=h,m[11]=c,m[12]=p,m[13]=d,m[14]=y,m[15]=f,m}},Symbol.toStringTag,{value:"Module"}));var n=r(58083);class a{constructor(t,e,r){this.strength=t,this.radius=e,this.threshold=r,this.type="bloom"}interpolate(t,e,r){this.strength=y(t.strength,e.strength,r),this.radius=y(t.radius,e.radius,r),this.threshold=y(t.threshold,e.threshold,r)}clone(){return new a(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:f(this.radius),strength:this.strength,threshold:this.threshold}}}class u{constructor(t){this.radius=t,this.type="blur"}interpolate(t,e,r){this.radius=Math.round(y(t.radius,e.radius,r))}clone(){return new u(this.radius)}toJSON(){return{type:"blur",radius:f(this.radius)}}}class h{constructor(t,e){this.type=t,this.amount=e,"invert"!==this.type&&"grayscale"!==this.type&&"sepia"!==this.type||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(t,e,r){this.amount=y(t.amount,e.amount,r),this._updateMatrix()}clone(){return new h(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const t=this._colorMatrix||o();switch(this.type){case"brightness":this._colorMatrix=((t,e)=>{const r=(0,n.hZ)(t,e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1);return(0,n.mg)(r,r)})(t,this.amount);break;case"contrast":this._colorMatrix=((t,e)=>{const r=(0,n.hZ)(t,e,0,0,.5-.5*e,0,e,0,.5-.5*e,0,0,e,.5-.5*e,0,0,0,1);return(0,n.mg)(r,r)})(t,this.amount);break;case"grayscale":this._colorMatrix=(t=>{const e=1-this.amount,r=(0,n.hZ)(t,.2126+.7874*e,.7152-.7152*e,.0722-.0722*e,0,.2126-.2126*e,.7152+.2848*e,.0722-.0722*e,0,.2126-.2126*e,.7152-.7152*e,.0722+.9278*e,0,0,0,0,1);return(0,n.mg)(r,r)})(t);break;case"invert":this._colorMatrix=((t,e)=>{const r=1-2*e,s=(0,n.hZ)(t,r,0,0,e,0,r,0,e,0,0,r,e,0,0,0,1);return(0,n.mg)(s,s)})(t,this.amount);break;case"saturate":this._colorMatrix=((t,e)=>{const r=(0,n.hZ)(t,.213+.787*e,.715-.715*e,.072-.072*e,0,.213-.213*e,.715+.285*e,.072-.072*e,0,.213-.213*e,.715-.715*e,.072+.928*e,0,0,0,0,1);return(0,n.mg)(r,r)})(t,this.amount);break;case"sepia":this._colorMatrix=(t=>{const e=1-this.amount,r=(0,n.hZ)(t,.393+.607*e,.769-.769*e,.189-.189*e,0,.349-.349*e,.686+.314*e,.168-.168*e,0,.272-.272*e,.534-.534*e,.131+.869*e,0,0,0,0,1);return(0,n.mg)(r,r)})(t)}}}class c{constructor(t,e,r,s){this.offsetX=t,this.offsetY=e,this.blurRadius=r,this.color=s,this.type="drop-shadow"}interpolate(t,e,r){this.offsetX=y(t.offsetX,e.offsetX,r),this.offsetY=y(t.offsetY,e.offsetY,r),this.blurRadius=y(t.blurRadius,e.blurRadius,r),this.color[0]=Math.round(y(t.color[0],e.color[0],r)),this.color[1]=Math.round(y(t.color[1],e.color[1],r)),this.color[2]=Math.round(y(t.color[2],e.color[2],r)),this.color[3]=y(t.color[3],e.color[3],r)}clone(){return new c(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const t=[...this.color];return t[3]*=255,{type:"drop-shadow",xoffset:f(this.offsetX),yoffset:f(this.offsetY),blurRadius:f(this.blurRadius),color:t}}}class p{constructor(t){this.angle=t,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(t,e,r){this.angle=y(t.angle,e.angle,r),this._updateMatrix()}clone(){return new p(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const t=this._colorMatrix||o();this._colorMatrix=((t,e)=>{const r=Math.sin(e*Math.PI/180),s=Math.cos(e*Math.PI/180),i=(0,n.hZ)(t,.213+.787*s-.213*r,.715-.715*s-.715*r,.072-.072*s+.928*r,0,.213-.213*s+.143*r,.715+.285*s+.14*r,.072-.072*s-.283*r,0,.213-.213*s-.787*r,.715-.715*s+.715*r,.072+.928*s+.072*r,0,0,0,0,1);return(0,n.mg)(i,i)})(t,this.angle)}}class d{constructor(t){this.amount=t,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(t,e,r){this.amount=y(t.amount,e.amount,r)}clone(){return new d(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function y(t,e,r){return t+(e-t)*r}function f(t){return Math.round(1e3*(0,i.PN)(t))/1e3}function m(t){switch(t.type){case"grayscale":case"sepia":case"invert":return new h(t.type,0);case"saturate":case"brightness":case"contrast":return new h(t.type,1);case"opacity":return new d(1);case"hue-rotate":return new p(0);case"blur":return new u(0);case"drop-shadow":return new c(0,0,0,[...(0,s.TS)("transparent")]);case"bloom":return new a(0,0,1)}}},64272:(t,e,r)=>{r.d(e,{T:()=>p});var s,i=r(90237),o=r(25482),l=r(88930),n=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),u=r(40608),h=r(43937),c=r(98623);let p=class extends o.A{static{s=this}static get allTime(){return d}static get empty(){return y}static fromArray(t){return new s({start:null!=t[0]?new Date(t[0]):t[0],end:null!=t[1]?new Date(t[1]):t[1]})}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new s({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,s=t.start?.getTime()??t.start,i=t.end?.getTime()??t.end;return e===s&&r===i}expandTo(t,e=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,l.lL)(r,t,e));let i=this.end;if(i){const r=(0,l.lL)(i,t,e);i=i.getTime()===r.getTime()?r:(0,l.S1)(r,1,t,e)}return new s({start:r,end:i})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return s.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=t.start?.getTime()??-1/0,o=t.end?.getTime()??1/0;let l,n;return i>=e&&i<=r?l=i:e>=i&&e<=o&&(l=e),r>=i&&r<=o?n=r:o>=e&&o<=r&&(n=o),null==l||null==n||isNaN(l)||isNaN(n)?s.empty:new s({start:l===-1/0?null:new Date(l),end:n===1/0?null:new Date(n)})}offset(t,e,r=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new s,{start:o,end:n}=this;return null!=o&&(i.start=(0,l.S1)(o,t,e,r)),null!=n&&(i.end=(0,l.S1)(n,t,e,r)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return d.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,r=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new s({start:e,end:r})}};(0,i._)([(0,n.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,i._)([(0,a.w)("end")],p.prototype,"readEnd",null),(0,i._)([(0,h.K)("end")],p.prototype,"writeEnd",null),(0,i._)([(0,n.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,i._)([(0,n.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,i._)([(0,n.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,i._)([(0,a.w)("start")],p.prototype,"readStart",null),(0,i._)([(0,h.K)("start")],p.prototype,"writeStart",null),p=s=(0,i._)([(0,u.$)("esri.time.TimeExtent")],p);const d=new p,y=new p({start:void 0,end:void 0})},66344:(t,e,r)=>{var s,i;r.d(e,{q:()=>a}),(i=s||(s={}))[i.ALL=0]="ALL",i[i.SOME=1]="SOME",Symbol.iterator;class o{get size(){return this._size}constructor(t=10485760){this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear(),this._db=null}register(t){this._users.set(t.id.slice(0,-1),t)}deregister(t){this.clear(t),this._sizeLimits.delete(t),this._users.delete(t.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,-1),this._checkSize()}getSize(t,e){const r=this._db.get(t.id+e);return r?.size??0}put(t,e,r,i,o){e=t.id+e;const n=this._db.get(e);if(n&&(this._size-=n.size,t.size-=n.size,this._db.delete(e),n.entry!==r&&this._notifyRemove(e,n.entry,n.size,s.ALL)),i>this._maxSize)return void this._notifyRemove(e,r,i,s.ALL);if(void 0===r)return void console.warn("Refusing to cache undefined entry ");if(!i||i<0)return console.warn(`Refusing to cache entry with size ${i} for key ${e}`),void this._notifyRemove(e,r,0,s.ALL);const a=1+Math.max(o,-4)- -3;this._db.set(e,new l(r,i,a)),this._size+=i,t.size+=i,this._checkSize()}updateSize(t,e,r,i){e=t.id+e;const o=this._db.get(e);if(o&&o.entry===r){for(this._size-=o.size,t.size-=o.size;i>this._maxSize;){const t=this._notifyRemove(e,r,i,s.SOME);if(!(null!=t&&t>0))return void this._db.delete(e);i=t}o.size=i,this._size+=i,t.size+=i,this._checkSize()}}pop(t,e){e=t.id+e;const r=this._db.get(e);if(r)return this._size-=r.size,t.size-=r.size,this._db.delete(e),++this._hit,r.entry;++this._miss}get(t,e){e=t.id+e;const r=this._db.get(e);if(void 0!==r)return this._db.delete(e),r.lives=r.lifetime,this._db.set(e,r),++this._hit,r.entry;++this._miss}peek(t,e){const r=this._db.get(t.id+e);return r?++this._hit:++this._miss,r?.entry}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},r=new Array;this._db.forEach((t,s)=>{const i=t.lifetime;r[i]=(r[i]||0)+t.size,this._users.forEach(r=>{const{id:i,name:o}=r;if(s.startsWith(i)){const r=e[o]||0;e[o]=r+t.size}})});const s={};this._users.forEach(t=>{const r=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const i=e[r]||0;e[r]=i,s[r]=Math.round(100*t.hitRate)+"%"}else s[r]="0%"});const i=Object.keys(e);i.sort((t,r)=>e[r]-e[t]),i.forEach(r=>t[r]=Math.round(e[r]/2**20)+"MB / "+s[r]);for(let e=r.length-1;e>=0;--e){const s=r[e];s&&(t["Priority "+(e+-3-1)]=Math.round(s/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._users.forEach(t=>t.resetHitRate())}clear(t){const e=t.id;this._db.forEach((t,r)=>{r.startsWith(e)&&(this._size-=t.size,this._db.delete(r),this._notifyRemove(r,t.entry,t.size,s.ALL))}),t.size=0}clearAll(){this._db.forEach((t,e)=>this._notifyRemove(e,t.entry,t.size,s.ALL)),this._users.forEach(t=>t.size=0),this._size=0,this._db.clear()}*values(t){for(const[e,r]of this._db)e.startsWith(t.id)&&(yield r.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,r,s){const i=this._users.get(t.split(n)[0])?.removeFunc,o=i?.(e,s,r);return"number"==typeof o?o:null}_checkSize(){this._sizeLimits.forEach((t,e)=>this._checkSizeLimits(t,e)),this._checkSizeLimits(this.maxSize)}setMaxSize(t,e){null==e||e<=0?this._sizeLimits.delete(t):this._sizeLimits.set(t,e)}_checkSizeLimits(t,e){const r=e??this;if(r.size<=t)return;const s=e?.id;let i=!0;for(;i;){i=!1;for(const[o,l]of this._db)if(0===l.lifetime&&(!s||o.startsWith(s))){const s=e??this._users.get(o.split(n)[0]);if(this._purgeItem(o,l,s),r.size<=.9*t)return;i||=this._db.has(o)}}for(const[i,o]of this._db)if(!s||i.startsWith(s)){const s=e??this._users.get(i.split(n)[0]);if(this._purgeItem(i,o,s),r.size<=.9*t)return}}_purgeItem(t,e,r){if(this._db.delete(t),e.lives<=1){this._size-=e.size,r&&(r.size-=e.size);const i=this._notifyRemove(t,e.entry,e.size,s.SOME);null!=i&&i>0&&(this._size+=i,r&&(r.size+=i),e.lives=e.lifetime,e.size=i,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}class l{constructor(t,e,r){this.entry=t,this.size=e,this.lifetime=r,this.lives=r}}const n=":";class a{constructor(t,e){this.removeFunc=e,this._storage=new o,this.id="",this.name="",this.size=0,this._storage.maxSize=t,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy(),this._storage=null}put(t,e,r=1){this._storage.put(this,t,e,r,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},69208:(t,e,r)=>{r.d(e,{d:()=>l});var s=r(90237),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const l=t=>{let e=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,s._)([(0,i.MZ)({type:Object,json:{write:{overridePolicy:t=>({enabled:!!(t&&Object.keys(t).length>0)})}}})],e.prototype,"customParameters",void 0),e=(0,s._)([(0,o.$)("esri.layers.mixins.CustomParametersMixin")],e),e}},69540:(t,e,r)=>{r.d(e,{A:()=>p});var s=r(90237),i=r(69622),o=(r(44208),r(4718)),l=(r(53966),r(97768)),n=r(35666),a=r(88620),u=r(40608);const h=t=>{let e=class extends t{clone(){const t=(0,a.oY)(this);(0,l.Lw)(t,"unable to clone instance of non-accessor class");const e=t.metadata,r=t.store,s={},i=new Map;for(const t in e){const l=e[t],a=r?.originOf(t),u=l.clonable;if(l.readOnly||!1===u||a!==n.Gr.USER&&a!==n.Gr.DEFAULTS&&a!==n.Gr.WEB_MAP&&a!==n.Gr.WEB_SCENE)continue;const h=this[t];let c=null;c="function"==typeof u?u(h):"reference"===u?h:(0,o.TU)(h),null!=h&&null==c||(a===n.Gr.DEFAULTS?i.set(t,c):s[t]=c)}const u=new(0,Object.getPrototypeOf(this).constructor)(s);if(i.size){const t=(0,a.oY)(u)?.store;if(t)for(const[e,r]of i)t.set(e,r,n.Gr.DEFAULTS)}return u}};return e=(0,s._)([(0,u.$)("esri.core.Clonable")],e),e};let c=class extends(h(i.A)){};c=(0,s._)([(0,u.$)("esri.core.Clonable")],c),(c||(c={})).ClonableMixin=h;const p=c},78553:(t,e,r)=>{r.d(e,{D:()=>o,p:()=>i});var s=r(56507);function i(t){const e=(0,s.Vr)(100*(1-t));return Math.max(0,Math.min(e,100))}function o(t){const e=1-t/100;return Math.max(0,Math.min(e,1))}},88788:(t,e,r)=>{r.d(e,{m:()=>l,v:()=>o});var s=r(84952),i=r(20655);function o(t,e){return{...n(t,e),readResourcePaths:[]}}function l(t,e,r){const i=(0,s.An)(t.itemUrl);return{...n(t,e),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:i?{rootPath:i.path,writtenUrls:[]}:null,resources:r?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function n(t,e){return{origin:e,url:(0,s.An)(t.itemUrl),portal:t.portal||i.A.getDefault(),portalItem:t}}},90629:(t,e,r)=>{r.d(e,{Lz:()=>l,PN:()=>n,cr:()=>a,tc:()=>u});const s=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,i="screenUtils.toPt: input not recognized!",o=96;function l(t){return t?t/72*o:0}function n(t){return t?72*t/o:0}function a(t){if("string"==typeof t){const e=t.match(s);if(e){const r=Number(e[1]),s=e[3]&&e[3].toLowerCase(),i="-"===t.charAt(0),o="px"===s?n(r):r;return i?-o:o}return console.warn(i),null}return t}function u(t=0,e=0){return{x:t,y:e}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4753],{4902:(t,e,r)=>{r.d(e,{A:()=>u});var s=r(90237),i=r(40608);let o=0;const l=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+o++})}};return e=(0,s._)([(0,i.$)("esri.core.Identifiable")],e),e};let n=class extends(l(class{})){};var a;n=(0,s._)([(0,i.$)("esri.core.Identifiable")],n),(a=n||(n={})).IdentifiableMixin=l,a.NumericIdentifiableMixin=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:o++})}};return e=(0,s._)([(0,i.$)("esri.core.Identifiable.NumericIdentifiable")],e),e};const u=n},8303:(t,e,r)=>{r.d(e,{A:()=>S});var s=r(90237),i=r(92602),o=r(70333),l=r(78888),n=r(60999),a=r(49186),u=r(53966),h=r(97768),c=r(74887),p=r(84952),d=r(10107),y=(r(44208),r(87811),r(36005)),f=r(40608),m=r(43937),g=r(77548),_=r(20655),w=r(80812),A=r(41318),v=r(10407);const S=t=>{let e=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,h.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(t){t!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",t))}readPortalItem(t,e,r){if(e.itemId)return new w.default({id:e.itemId,portal:r?.portal})}writePortalItem(t,e){t?.id&&(e.itemId=t.id)}async loadFromPortal(t,e){if(this.portalItem?.id)try{const{load:s}=await r.e(1204).then(r.bind(r,41204));return(0,c.Te)(e),await s({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)||u.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(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(e);if(this.url)try{const{features:{edit:r,fullEdit:s},content:{updateItem:i}}=await this._fetchUserPrivileges(t,e);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",i)}catch(t){(0,c.QP)(t)}}async _fetchUserPrivileges(t,e){let r=this.portalItem;if(!t||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(e);const s=!o.id?.findCredential(this.url),i=t===r.id;if(i&&r.portal.user)return this._getUserPrivileges(r,s);let l,n;if(i)l=r.portal.url;else try{l=await(0,g.wI)(this.url,e)}catch(t){(0,c.QP)(t)}if(!l||!(0,p.b8)(l,r.portal.url))return this._fetchFallbackUserPrivileges(e);try{const t=null!=e?e.signal:null;n=await(o.id?.getCredential(`${l}/sharing`,{prompt:!1,signal:t}))}catch(t){(0,c.QP)(t)}const a=!0,u=!1,h=!1;if(!n)return{features:{edit:a,fullEdit:u},content:{updateItem:h}};try{if(i?await r.reload():(r=new w.default({id:t,portal:{url:l}}),await r.load(e)),r.portal.user)return this._getUserPrivileges(r,s)}catch(t){(0,c.QP)(t)}return{features:{edit:a,fullEdit:u},content:{updateItem:h}}}_getUserPrivileges(t,e){const r=(0,v.It)(t);return e&&(r.features.edit=!0),r}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?o.id?.findCredential(this.url):null;if(!e)return!0;const r=x.credential===e?x.user:await this._fetchEditingUser(t);return x.credential=e,x.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(t){const e=this.portalItem?.portal?.user;if(e)return e;const r=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const s=`${r.owningSystemUrl}/sharing/rest`,i=_.A.getDefault();if(i&&i.loaded&&(0,p.S8)(i.restUrl)===(0,p.S8)(s))return i.user;const a=`${s}/community/self`,u=null!=t?t.signal:null,h=await(0,n.Ke)((0,l.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return h.ok?A.A.fromJSON(h.value.data):null}read(t,e){e&&(e.layer=this),super.read(t,e)}write(t,e){const r=e?.portal,s=this.portalItem?.id&&(this.portalItem.portal||_.A.getDefault());return r&&s&&!(0,p.ut)(s.restUrl,r.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,s._)([(0,d.MZ)({type:w.default})],e.prototype,"portalItem",null),(0,s._)([(0,y.w)("web-document","portalItem",["itemId"])],e.prototype,"readPortalItem",null),(0,s._)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],e.prototype,"writePortalItem",null),(0,s._)([(0,d.MZ)({clonable:!1})],e.prototype,"resourceReferences",void 0),(0,s._)([(0,d.MZ)({type:Boolean,readOnly:!0})],e.prototype,"userHasEditingPrivileges",void 0),(0,s._)([(0,d.MZ)({type:Boolean,readOnly:!0})],e.prototype,"userHasFullEditingPrivileges",void 0),(0,s._)([(0,d.MZ)({type:Boolean,readOnly:!0})],e.prototype,"userHasUpdateItemPrivileges",void 0),e=(0,s._)([(0,f.$)("esri.layers.mixins.PortalLayer")],e),e},x={credential:null,user:null}},18768:(t,e,r)=>{r.d(e,{b:()=>a});var s=r(90237),i=r(53966),o=r(10107),l=(r(44208),r(87811),r(40608)),n=r(60694);const a=t=>{let e=class extends t{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,i.A.getLogger(this)))}};return(0,s._)([(0,o.MZ)()],e.prototype,"title",null),(0,s._)([(0,o.MZ)({type:String})],e.prototype,"url",null),e=(0,s._)([(0,l.$)("esri.layers.mixins.ArcGISService")],e),e}},27865:(t,e,r)=>{r.d(e,{O9:()=>o,dw:()=>l,mj:()=>i});var s=r(59247);function i(t,e){const r=t.length>e.length?t:e;return(t.length>e.length?e:t).every((t,e)=>t.type===r[e].type)}function o(t,e){const r=t.length>e.length?t:e,i=t.length>e.length?e:t;for(let t=i.length;t<r.length;t++)i.push((0,s.sK)(r[t]))}function l(t){const e=t[0];return!!e&&"type"in e}},44159:(t,e,r)=>{r.d(e,{A:()=>i});var s=r(93687);class i{static{this.pool=new s.A(i,null,null,25,50)}static getId(t,e,r,s){return"object"==typeof t?`${t.level}/${t.row}/${t.col}/${t.world}`:`${t}/${e}/${r}/${s}`}constructor(t,e,r,s){this.set(t,e,r,s)}get key(){return this}get id(){return this.toString()}get normalizedId(){return`${this.level}/${this.row}/${this.col}`}set id(t){this.set(t)}get hash(){const t=4095&this.row,e=4095&this.col,r=63&this.level;return(3&this.world)<<30|e<<22|t<<8|r}acquire(t,e,r,s){this.set(t,e,r,s)}contains(t){const e=t.level-this.level;return e>=0&&this.row===t.row>>e&&this.col===t.col>>e&&this.world===t.world}containsChild(t){const e=t.level-this.level;return e>0&&this.row===t.row>>e&&this.col===t.col>>e&&this.world===t.world}equals(t){return this.level===t.level&&this.row===t.row&&this.col===t.col&&this.world===t.world}clone(){return new i(this)}release(){this.level=0,this.row=0,this.col=0,this.world=0}set(t,e,r,s){if(null==t)this.level=0,this.row=0,this.col=0,this.world=0;else if("object"==typeof t)this.level=t.level||0,this.row=t.row||0,this.col=t.col||0,this.world=t.world||0;else if("string"==typeof t){const[e,r,s,i]=t.split("/");this.level=parseFloat(e),this.row=parseFloat(r),this.col=parseFloat(s),this.world=parseFloat(i)}else this.level=+t,this.row=+e,this.col=+r,this.world=+s||0;return this}toString(){return`${this.level}/${this.row}/${this.col}/${this.world}`}getParentKey(){return this.level<=0?null:new i(this.level-1,this.row>>1,this.col>>1,this.world)}getNormalizedNeighbor(t,e,r){const s=this.clone();return s.col+=t,s.row+=e,r.normalizeKey(s),s}getChildKeys(){const t=this.level+1,e=this.row<<1,r=this.col<<1,s=this.world;return[new i(t,e,r,s),new i(t,e,r+1,s),new i(t,e+1,r,s),new i(t,e+1,r+1,s)]}compareRowMajor(t){return this.row<t.row?-1:this.row>t.row?1:this.col<t.col?-1:this.col>t.col?1:0}}},48757:(t,e,r)=>{r.r(e),r.d(e,{default:()=>ct});var s=r(90237),i=r(78888),o=r(60999),l=r(49186),n=r(4718),a=r(92071),u=r(74887),h=r(84952),c=r(10107),p=(r(44208),r(53966)),d=r(36005),y=r(40608),f=r(43937),m=r(5443),g=r(16930),_=r(4146),w=r(52136),A=r(89186),v=r(18768),S=r(63074),x=r(69208),b=r(16131),M=r(8303),I=r(54310),R=r(25036);let T=null;var P=r(34275);class E{constructor(t,e){this._spriteSource=t,this._maxTextureSize=e,this.devicePixelRatio=1,this._spriteImageFormat="png",this._isRetina=!1,this._spritesData={},this.image=null,this.width=null,this.height=null,this.loadStatus="not-loaded","url"===t.type&&t.spriteFormat&&(this._spriteImageFormat=t.spriteFormat),t.pixelRatio&&(this.devicePixelRatio=t.pixelRatio),this.baseURL=t.spriteUrl}get spriteNames(){const t=[];for(const e in this._spritesData)t.push(e);return t.sort(),t}getSpriteInfo(t){return this._spritesData?this._spritesData[t]:null}async load(t){if(this.baseURL){this.loadStatus="loading";try{await this._loadSprites(t),this.loadStatus="loaded"}catch{this.loadStatus="failed"}}else this.loadStatus="failed"}async _loadSprites(t){this._isRetina=this.devicePixelRatio>1.15;const{width:e,height:r,data:s,json:i}=await this._getSpriteData(this._spriteSource,t),o=Object.keys(i);if(!o||0===o.length||!s)return this._spritesData=this.image=null,void(this.width=this.height=0);this._spritesData=i,this.width=e,this.height=r;const n=Math.max(this._maxTextureSize,4096);if(e>n||r>n){const t=`Sprite resource for style ${this.baseURL} is bigger than the maximum allowed of ${n} pixels}`;throw p.A.getLogger("esri.layers.support.SpriteSource").error(t),new l.A("SpriteSource",t)}let a;for(let t=0;t<s.length;t+=4)a=s[t+3]/255,s[t]=s[t]*a,s[t+1]=s[t+1]*a,s[t+2]=s[t+2]*a;this.image=s}async _getSpriteData(t,e){if("image"===t.type){let e,r;if(this.devicePixelRatio<1.15){if(!t.spriteSource1x)throw new l.A("SpriteSource","no image data provided for low resolution sprites!");e=t.spriteSource1x.image,r=t.spriteSource1x.json}else{if(!t.spriteSource2x)throw new l.A("SpriteSource","no image data provided for high resolution sprites!");e=t.spriteSource2x.image,r=t.spriteSource2x.json}return"width"in e&&"height"in e&&"data"in e&&((0,P.mw)(e.data)||(0,P.UR)(e.data))?{width:e.width,height:e.height,data:new Uint8Array(e.data),json:r}:{...U(e),json:r}}const r=(0,h.An)(this.baseURL),s=r.query?"?"+(0,h.x0)(r.query):"",o=this._isRetina?"@2x":"",n=`${r.path}${o}.${this._spriteImageFormat}${s}`,a=`${r.path}${o}.json${s}`,[u,c]=await Promise.all([(0,i.A)(a,e),(0,i.A)(n,{responseType:"image",...e})]);return{...U(c.data),json:u.data}}}function U(t){const e=document.createElement("canvas"),r=e.getContext("2d");e.width=t.width,e.height=t.height,r.drawImage(t,0,0,t.width,t.height);const s=r.getImageData(0,0,t.width,t.height);return{width:t.width,height:t.height,data:new Uint8Array(s.data)}}var z=r(87045),L=r(25943),O=r(21325),D=r(28735),j=r(44159);class C{constructor(t){this.url=t}destroy(){this._tileIndexPromise=null}async fetchTileIndex(){return this._tileIndexPromise||(this._tileIndexPromise=(0,i.A)(this.url).then(t=>t.data.index)),this._tileIndexPromise}async dataKey(t,e){const r=await this.fetchTileIndex();return(0,u.Te)(e),this._getIndexedDataKey(r,t)}_getIndexedDataKey(t,e){const r=[e];if(e.level<0||e.row<0||e.col<0||e.row>>e.level>0||e.col>>e.level>0)return null;let s=e;for(;0!==s.level;)s=new j.A(s.level-1,s.row>>1,s.col>>1,s.world),r.push(s);let i,o,l=t,n=r.pop();if(1===l)return n;for(;r.length;)if(i=r.pop(),o=(1&i.col)+((1&i.row)<<1),l){if(0===l[o]){n=null;break}if(1===l[o]){n=i;break}n=i,l=l[o]}return n}}var k=r(97768);class N{constructor(t,e){this._tilemap=t,this._tileIndexUrl=e}destroy(){this._tilemap=(0,k.pR)(this._tilemap),this._tileIndexPromise=null}async fetchTileIndex(t){return this._tileIndexPromise||(this._tileIndexPromise=(0,i.A)(this._tileIndexUrl,{query:{...t?.query}}).then(t=>t.data.index)),this._tileIndexPromise}dataKey(t,e){const{level:r,row:s,col:i}=t,o=new j.A(t);return this._tilemap.fetchAvailabilityUpsample(r,s,i,o,e).then(()=>(o.world=t.world,o)).catch(t=>{if((0,u.zf)(t))throw t;return null})}}var $=r(91869);class F{constructor(t){this._tileUrl=t,this._promise=null,this._abortController=null,this._abortOptions=[]}getData(t){(null==this._promise||(0,u.G4)(this._abortController?.signal))&&(this._promise=this._makeRequest(this._tileUrl));const e=this._abortOptions;return e.push(t),(0,u.u7)(t,()=>{e.every(t=>(0,u.G4)(t))&&this._abortController.abort()}),this._promise.then(t=>(0,n.o8)(t))}async _makeRequest(t){this._abortController=new AbortController;const{data:e}=await(0,i.A)(t,{responseType:"array-buffer",signal:this._abortController.signal});return e}}const B=new Map;function Z(t,e){return(0,$.tE)(B,t,()=>new F(t)).getData(e).finally(()=>B.delete(t))}class K{constructor(t,e,r){this.tilemap=null,this.tileInfo=null,this.capabilities=null,this.fullExtent=null,this.initialExtent=null,this.name=t,this.sourceUrl=e;const s=(0,h.An)(this.sourceUrl),i=(0,n.o8)(r),o=i.tiles;if(s)for(let t=0;t<o.length;t++){const e=(0,h.An)(o[t]);e&&((0,h.oP)(e.path)||(e.path=(0,h.fj)(s.path,e.path)),o[t]=(0,h.a6)(e.path,{...s.query,...e.query}))}this.tileServers=o;const l=r.capabilities&&r.capabilities.split(",").map(t=>t.toLowerCase().trim()),a=!0===r?.exportTilesAllowed,u=!0===l?.includes("tilemap"),c=a&&r.hasOwnProperty("maxExportTilesCount")?r.maxExportTilesCount:0;this.capabilities={operations:{supportsExportTiles:a,supportsTileMap:u},exportTiles:a?{maxExportTilesCount:+c}:null},this.tileInfo=z.A.fromJSON(i.tileInfo);const p=r.tileMap?(0,h.a6)((0,h.fj)(s.path,r.tileMap),s.query??{}):null;u?(this.type="vector-tile",this.tilemap=new N(new L.d({layer:{parsedUrl:s,tileInfo:this.tileInfo},minLOD:i.minLOD??this.tileInfo.lods[0].level,maxLOD:i.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}),p)):p&&(this.tilemap=new C(p)),this.fullExtent=m.A.fromJSON(r.fullExtent),this.initialExtent=m.A.fromJSON(r.initialExtent)}destroy(){this.tilemap?.destroy()}async getRefKey(t,e){return this.tilemap?this.tilemap.dataKey(t,e):t}requestTile(t,e,r,s){return function(t,e,r,s,i){const o=(0,h.An)(t),l=o.query;if(l)for(const[t,i]of Object.entries(l))switch(i){case"{x}":l[t]=s.toString();break;case"{y}":l[t]=r.toString();break;case"{z}":l[t]=e.toString()}const n=o.path;return Z((0,h.a6)(n.replaceAll(/\{z\}/gi,e.toString()).replaceAll(/\{y\}/gi,r.toString()).replaceAll(/\{x\}/gi,s.toString()),{...o.query}),i)}(this.tileServers[e%this.tileServers.length],t,e,r,s)}isCompatibleWith(t){const e=this.tileInfo,r=t.tileInfo;if(!e.spatialReference.equals(r.spatialReference))return!1;if(!e.origin.equals(r.origin))return!1;if(Math.round(e.dpi)!==Math.round(r.dpi))return!1;const s=e.lods,i=r.lods,o=Math.min(s.length,i.length);for(let t=0;t<o;t++){const e=s[t],r=i[t];if(e.level!==r.level||Math.round(e.scale)!==Math.round(r.scale))return!1}return!0}}function q(...t){let e;for(const r of t)if(null!=r)if((0,h.BQ)(r)){if(e){const t=e.split("://")[0];e=t+":"+r.trim()}}else e=(0,h.oP)(r)?r:(0,h.fj)(e,r);return e?(0,h.UC)(e):void 0}async function G(t,e,r,s,o){let l,n,a;if((0,u.Te)(o),"string"==typeof r){const t=(0,h.S8)(r);a=await(0,i.A)(t,{...o,responseType:"json",query:{f:"json",...o?.query}}),a.ssl&&(l&&(l=l.replace(/^http:/i,"https:")),n&&(n=n.replace(/^http:/i,"https:"))),l=t,n=t}else null!=r&&(a={data:r},l=r.jsonUrl||null,n=s);const c=a?.data;if(H(c))return t.styleUrl=l||null,async function(t,e,r,s){const i=r?(0,h.nM)(r):(0,h.gd)();t.styleBase=i,t.style=e,e["sprite-format"]&&"webp"===e["sprite-format"].toLowerCase()&&(t.spriteFormat="webp");const o=[];if(e.sources&&e.sources.esri){const r=e.sources.esri;r.url?await G(t,"esri",q(i,r.url),void 0,s):o.push(G(t,"esri",r,i,s))}for(const r of Object.keys(e.sources))"esri"!==r&&"vector"===e.sources[r].type&&(e.sources[r].url?o.push(G(t,r,q(i,e.sources[r].url),void 0,s)):e.sources[r].tiles&&o.push(G(t,r,e.sources[r],i,s)));await Promise.all(o)}(t,c,n,o);if(function(t){return!H(t)}(c))return t.sourceUrl?W(t,c,n,!1,e,o):(t.sourceUrl=l||null,W(t,c,n,!0,e,o));throw new Error("You must specify the URL or the JSON for a service or for a style.")}function Q(t){return"object"==typeof t&&!!t&&"tilejson"in t&&null!=t.tilejson}function H(t){return!!t&&"sources"in t&&!!t.sources}async function W(t,e,r,s,i,o){const l=r?(0,h.UC)(r)+"/":(0,h.gd)(),a=function(t){const e=512;if(function(t){return t.hasOwnProperty("tileInfo")}(t)){const r=t?.tileInfo;return null!=r&&(null==r.rows&&(r.rows=e),null==r.cols&&(r.cols=e)),t}const r={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100,latestWkid:3857}};let s=null;if(Q(t)){const{bounds:e}=t;if(e){const t=(0,D.Gh)({x:e[0],y:e[1],spatialReference:(0,n.o8)(O.KK)}),r=(0,D.Gh)({x:e[2],y:e[3],spatialReference:(0,n.o8)(O.KK)});s={xmin:t.x,ymin:t.y,xmax:r.x,ymax:r.y,spatialReference:(0,n.o8)(O.ch)}}}null===s&&(s=r);let i=78271.51696400007,o=295828763.7957775;const l=[],a=t.hasOwnProperty("maxzoom")&&null!=t.maxzoom?+t.maxzoom:22;for(let t=0;t<=a;t++)l.push({level:t,scale:o,resolution:i}),i/=2,o/=2;return{capabilities:"TilesOnly",initialExtent:s,fullExtent:r,minScale:0,maxScale:0,tiles:t.tiles,tileInfo:{rows:e,cols:e,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:l,spatialReference:(0,n.o8)(O.ch)}}}(e),u=new K(i,(0,h.a6)(l,o?.query??{}),a);if(!s&&t.primarySourceName in t.sourceNameToSource){const e=t.sourceNameToSource[t.primarySourceName];if(!e.isCompatibleWith(u))return;null!=u.fullExtent&&(null!=e.fullExtent?e.fullExtent.union(u.fullExtent):e.fullExtent=u.fullExtent.clone()),e.tileInfo&&u.tileInfo&&e.tileInfo.lods.length<u.tileInfo.lods.length&&(e.tileInfo=u.tileInfo)}if(s&&(t.sourceBase=l,t.source=e,t.validatedSource=a,t.primarySourceName=i),t.sourceNameToSource[i]=u,!Q(t)&&"defaultStyles"in e&&!t.style){if(null==e.defaultStyles)throw new Error;return"string"==typeof e.defaultStyles?G(t,"",q(l,e.defaultStyles,"root.json"),void 0,o):G(t,"",e.defaultStyles,q(l,"root.json"),o)}}var V=r(88788),J=r(39131),X=r(97159),Y=r(86738),tt=r(91806);const et=1e-6;function rt(t,e){if(t===e)return!0;if(null==t&&null!=e)return!1;if(null!=t&&null==e)return!1;if(null==t||null==e)return!1;if(!t.spatialReference.equals(e.spatialReference)||t.dpi!==e.dpi)return!1;const r=t.origin,s=e.origin;if(Math.abs(r.x-s.x)>=et||Math.abs(r.y-s.y)>=et)return!1;let i,o;t.lods[0].scale>e.lods[0].scale?(i=t,o=e):(o=t,i=e);for(let t=i.lods[0].scale;t>=o.lods[o.lods.length-1].scale-et;t/=2)if(Math.abs(t-o.lods[0].scale)<et)return!0;return!1}function st(t,e){if(t===e)return t;if(null==t&&null!=e)return e;if(null!=t&&null==e)return t;if(null==t||null==e)return null;const r=t.size[0],s=t.format,i=t.dpi,o=new Y.A({x:t.origin.x,y:t.origin.y}),l=t.spatialReference,n=t.lods[0].scale>e.lods[0].scale?t.lods[0]:e.lods[0],a=t.lods[t.lods.length-1].scale<=e.lods[e.lods.length-1].scale?t.lods[t.lods.length-1]:e.lods[e.lods.length-1],u=n.scale,h=n.resolution,c=a.scale,p=[];let d=u,y=h,f=0;for(;d>=c;)p.push(new tt.A({level:f,resolution:y,scale:d})),f++,d/=2,y/=2;return new z.A({size:[r,r],dpi:i,format:s||"pbf",origin:o,lods:p,spatialReference:l})}var it=r(45013);class ot{constructor(t){this.getUnmaskedRenderer=t}}function lt(t){const e=t.getExtension("WEBGL_debug_renderer_info");return e?new ot(()=>t.getParameter(e.UNMASKED_RENDERER_WEBGL)):null}let nt;function at(){return nt??=function(){const t=new ut,e=function(t){if("undefined"==typeof WebGL2RenderingContext)return null;const e=document.createElement("canvas");if(!e)return null;let r=e.getContext("webgl2",{failIfMajorPerformanceCaveat:!0});if(null==r&&(r=e.getContext("webgl2"),null!=r&&(t.majorPerformanceCaveat=!0,t.unmaskedRenderer=lt(r)?.getUnmaskedRenderer()??"unknown")),null==r)return r;t.available=!0,t.maxTextureSize=r.getParameter(r.MAX_TEXTURE_SIZE),t.supportsVertexShaderSamplers=r.getParameter(r.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;const s=r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT);return s&&(t.supportsHighPrecisionFragment=s.precision>0),r}(t);return null==e||(t.supportsColorBufferFloat=null!==e.getExtension("EXT_color_buffer_float"),t.supportsColorBufferFloatBlend=null!==e.getExtension("EXT_float_blend"),t.supportsColorBufferHalfFloat=t.supportsColorBufferFloat||null!==e.getExtension("EXT_color_buffer_half_float")),t}(),nt}class ut{constructor(){this.available=!1,this.majorPerformanceCaveat=!1,this.maxTextureSize=0,this.supportsVertexShaderSamplers=!1,this.supportsHighPrecisionFragment=!1,this.supportsColorBufferFloat=!1,this.supportsColorBufferFloatBlend=!1,this.supportsColorBufferHalfFloat=!1,this.unmaskedRenderer="unloaded"}}let ht=class extends((0,S.dM)((0,R.j)((0,I.J)((0,A.f)((0,v.b)((0,b.q)((0,M.A)((0,x.d)((0,w.p)((0,a.P)(_.A))))))))))){constructor(...t){super(...t),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.path=null,this.refreshInterval=0,this.style=null,this.tilemapCache=null,this.type="vector-tile",this.url=null}normalizeCtorArgs(t,e){return"string"==typeof t?{url:t,...e}:t}destroy(){if(this.sourceNameToSource)for(const t of Object.values(this.sourceNameToSource))t?.destroy();this.primarySource?.destroy(),this._spriteSourceMap.clear()}async prefetchResources(t){await this.loadSpriteSource(globalThis.devicePixelRatio||1,t)}load(t){const e=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},t).catch(u.QP).then(async()=>{if(!this.portalItem?.id)return;const e=`${this.portalItem.itemCdnUrl}/resources/styles/root.json`;(await(0,i.A)(e,{...t,query:{f:"json",...this.customParameters,token:this.apiKey},authMode:this.portalItem.portal.authMode})).data&&this.read({url:e},(0,V.v)(this.portalItem,"portal-item"))}).catch(u.QP).then(()=>this._loadStyle(t));return this.addResolvingPromise(e),Promise.resolve(this)}get attributionDataUrl(){const t=this.currentStyleInfo,e=t?.serviceUrl&&(0,h.An)(t.serviceUrl);if(!e)return null;const r=this._getDefaultAttribution(e.path);return r?(0,h.a6)(r,{...this.customParameters,token:this.apiKey}):null}get capabilities(){const t=this.primarySource;return t?t.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){return this.primarySource?.fullExtent||null}get initialExtent(){return this.primarySource?.initialExtent||null}get parsedUrl(){return this.serviceUrl?(0,h.An)(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo?.serviceUrl||null}get spatialReference(){return this.tileInfo?.spatialReference??null}get styleUrl(){return this.currentStyleInfo?.styleUrl||null}writeStyleUrl(t,e){t&&(0,h.BQ)(t)&&(t=`https:${t}`);const r=(0,J.py)(t);e.styleUrl=(0,X.e)(t,r)}get tileInfo(){const t=[];for(const e in this.sourceNameToSource)t.push(this.sourceNameToSource[e]);let e=this.primarySource?.tileInfo||new z.A;if(t.length>1)for(let r=0;r<t.length;r++)rt(e,t[r].tileInfo)&&(e=st(e,t[r].tileInfo));return e}readTilemapCache(t,e){const r=e.capabilities?.includes("Tilemap");return r?new L.d({layer:this}):null}readVersion(t,e){return e.version?parseFloat(e.version):parseFloat(e.currentVersion)}async loadSpriteSource(t=1,e){if(!this._spriteSourceMap.has(t)){const r=at().maxTextureSize,s=this.currentStyleInfo?.spriteUrl?(0,h.a6)(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null,i=new E({type:"url",spriteUrl:s,pixelRatio:t,spriteFormat:this.currentStyleInfo?.spriteFormat},r);await i.load(e),this._spriteSourceMap.set(t,i)}return this._spriteSourceMap.get(t)}async setSpriteSource(t,e){if(!t)return null;const r=at().maxTextureSize,s=t.spriteUrl,i=s?(0,h.a6)(s,{...this.customParameters,token:this.apiKey}):null;if(!i&&"url"===t.type)return null;const o=new E(t,r);try{await o.load(e);const r=t.pixelRatio||1;return this._spriteSourceMap.clear(),this._spriteSourceMap.set(r,o),i&&this.currentStyleInfo&&(this.currentStyleInfo.spriteUrl=i),this.emit("spriteSource-change",{spriteSource:o}),o}catch(t){(0,u.QP)(t)}return null}async loadStyle(t,e){const r=t||this.style||this.url;return this._loadingTask&&"string"==typeof r&&this.url===r||(this._loadingTask?.abort(),this._loadingTask=(0,o.UT)(t=>(this._spriteSourceMap.clear(),this._getSourceAndStyle(r,{signal:t})),e)),this._loadingTask.promise}getStyleLayerId(t){return this.styleRepository.getStyleLayerId(t)}getStyleLayerIndex(t){return this.styleRepository.getStyleLayerIndex(t)}getPaintProperties(t){return(0,n.o8)(this.styleRepository?.getPaintProperties(t))}setPaintProperties(t,e){const r=this.styleRepository.isPainterDataDriven(t);this.styleRepository.setPaintProperties(t,e);const s=this.styleRepository.isPainterDataDriven(t);this.emit("paint-change",{layer:t,paint:e,isDataDriven:r||s})}getStyleLayer(t){return(0,n.o8)(this.styleRepository.getStyleLayer(t))}setStyleLayer(t,e){this.styleRepository.setStyleLayer(t,e),this.emit("style-layer-change",{layer:t,index:e})}deleteStyleLayer(t){this.styleRepository.deleteStyleLayer(t),this.emit("delete-style-layer",{layer:t})}getLayoutProperties(t){return(0,n.o8)(this.styleRepository.getLayoutProperties(t))}setLayoutProperties(t,e){this.styleRepository.setLayoutProperties(t,e),this.emit("layout-change",{layer:t,layout:e})}setStyleLayerVisibility(t,e){this.styleRepository.setStyleLayerVisibility(t,e),this.emit("style-layer-visibility-change",{layer:t,visibility:e})}getStyleLayerVisibility(t){return this.styleRepository.getStyleLayerVisibility(t)}write(t,e){return e?.origin&&!this.styleUrl?(e.messages&&e.messages.push(new l.A("vectortilelayer:unsupported",`VectorTileLayer (${this.title}, ${this.id}) with style defined by JSON only are not supported`,{layer:this})),null):super.write(t,e)}getTileUrl(t,e,r){return null}async _getSourceAndStyle(t,e){if(!t)throw new Error("invalid style!");const r=await async function(t,e){const r={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[s,i]="string"==typeof t?[t,null]:[null,t.jsonUrl];return await G(r,"esri",t,i,e),{layerDefinition:r.validatedSource,url:s,serviceUrl:r.sourceUrl,style:r.style,styleUrl:r.styleUrl,spriteUrl:r.style.sprite&&q(r.styleBase,r.style.sprite),spriteFormat:r.spriteFormat,glyphsUrl:r.style.glyphs&&q(r.styleBase,r.style.glyphs),sourceNameToSource:r.sourceNameToSource,primarySourceName:r.primarySourceName}}(t,{...e,query:{...this.customParameters,token:this.apiKey}});"webp"===r.spriteFormat&&(await function(){if(T)return T;const t={lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"};return T=new Promise(e=>{const r=new Image;r.onload=()=>{r.onload=r.onerror=null,e(r.width>0&&r.height>0)},r.onerror=()=>{r.onload=r.onerror=null,e(!1)},r.src="data:image/webp;base64,"+t.lossy}),T}()||(r.spriteFormat="png")),this._set("currentStyleInfo",{...r}),"string"==typeof t?(this.url=t,this.style=null):(this.url=null,this.style=t),this._set("sourceNameToSource",r.sourceNameToSource),this._set("primarySource",r.sourceNameToSource[r.primarySourceName]),this._set("styleRepository",new it.A(r.style,!1)),this.read(r.layerDefinition,{origin:"service"}),this.emit("load-style")}_getDefaultAttribution(t){const e=t.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^/]+)?\/arcgis\/rest\/services\/([^/]+(\/[^/]+)*)\/vectortileserver/i),r=["OpenBasemap_v2","OpenBasemap_GCS_v2","OpenStreetMap_v2","OpenStreetMap_Daylight_v2","OpenStreetMap_Export_v2","OpenStreetMap_FTS_v2","OpenStreetMap_GCS_v2","World_Basemap","World_Basemap_v2","World_Basemap_Export_v2","World_Basemap_GCS_v2","World_Basemap_WGS84","World_Contours_v2","World_Hillshade_v2"];if(!e)return;const s=e[2]&&e[2].toLowerCase();if(!s)return;const i=e[1]||"";for(const t of r)if(t.toLowerCase().includes(s))return(0,h.S8)(`//static.arcgis.com/attribution/Vector${i}/${t}`)}async _loadStyle(t){return this._loadingTask?.promise??this.loadStyle(null,t)}};(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"attributionDataUrl",null),(0,s._)([(0,c.MZ)({type:["show","hide"]})],ht.prototype,"listMode",void 0),(0,s._)([(0,c.MZ)({json:{read:!0,write:!0}})],ht.prototype,"blendMode",void 0),(0,s._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],ht.prototype,"capabilities",null),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"currentStyleInfo",void 0),(0,s._)([(0,c.MZ)({json:{read:!1},readOnly:!0,type:m.A})],ht.prototype,"fullExtent",null),(0,s._)([(0,c.MZ)({json:{read:!1},readOnly:!0,type:m.A})],ht.prototype,"initialExtent",null),(0,s._)([(0,c.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],ht.prototype,"isReference",void 0),(0,s._)([(0,c.MZ)({type:["VectorTileLayer"]})],ht.prototype,"operationalLayerType",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"parsedUrl",null),(0,s._)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],ht.prototype,"path",void 0),(0,s._)([(0,c.MZ)({type:Number,json:{write:!1,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],ht.prototype,"refreshInterval",void 0),(0,s._)([(0,c.MZ)()],ht.prototype,"style",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"serviceUrl",null),(0,s._)([(0,c.MZ)({type:g.A,readOnly:!0})],ht.prototype,"spatialReference",null),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"styleRepository",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"sourceNameToSource",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"primarySource",void 0),(0,s._)([(0,c.MZ)({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],ht.prototype,"styleUrl",null),(0,s._)([(0,f.K)(["portal-item","web-document"],"styleUrl")],ht.prototype,"writeStyleUrl",null),(0,s._)([(0,c.MZ)({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:z.A})],ht.prototype,"tileInfo",null),(0,s._)([(0,c.MZ)()],ht.prototype,"tilemapCache",void 0),(0,s._)([(0,d.w)("service","tilemapCache",["capabilities","tileInfo"])],ht.prototype,"readTilemapCache",null),(0,s._)([(0,c.MZ)({json:{read:!1},readOnly:!0,value:"vector-tile"})],ht.prototype,"type",void 0),(0,s._)([(0,c.MZ)({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}})],ht.prototype,"url",void 0),(0,s._)([(0,c.MZ)({readOnly:!0})],ht.prototype,"version",void 0),(0,s._)([(0,d.w)("version",["version","currentVersion"])],ht.prototype,"readVersion",null),ht=(0,s._)([(0,y.$)("esri.layers.VectorTileLayer")],ht);const ct=ht},52136:(t,e,r)=>{r.d(e,{p:()=>l});var s=r(90237),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const l=t=>{let e=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(t){null!=t?this._override("apiKey",t):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,s._)([(0,i.MZ)({type:String})],e.prototype,"apiKey",null),e=(0,s._)([(0,o.$)("esri.layers.mixins.APIKeyMixin")],e),e}},59247:(t,e,r)=>{r.d(e,{bv:()=>a,Fk:()=>u,yG:()=>h,$b:()=>c,Nd:()=>p,jm:()=>d,sK:()=>m});var s=r(40876),i=r(90629);function o(){const t=new Float32Array(16);return t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}const l=o();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:l,clone:function(t){const e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},create:o,fromValues:function(t,e,r,s,i,o,l,n,a,u,h,c,p,d,y,f){const m=new Float32Array(16);return m[0]=t,m[1]=e,m[2]=r,m[3]=s,m[4]=i,m[5]=o,m[6]=l,m[7]=n,m[8]=a,m[9]=u,m[10]=h,m[11]=c,m[12]=p,m[13]=d,m[14]=y,m[15]=f,m}},Symbol.toStringTag,{value:"Module"}));var n=r(58083);class a{constructor(t,e,r){this.strength=t,this.radius=e,this.threshold=r,this.type="bloom"}interpolate(t,e,r){this.strength=y(t.strength,e.strength,r),this.radius=y(t.radius,e.radius,r),this.threshold=y(t.threshold,e.threshold,r)}clone(){return new a(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:f(this.radius),strength:this.strength,threshold:this.threshold}}}class u{constructor(t){this.radius=t,this.type="blur"}interpolate(t,e,r){this.radius=Math.round(y(t.radius,e.radius,r))}clone(){return new u(this.radius)}toJSON(){return{type:"blur",radius:f(this.radius)}}}class h{constructor(t,e){this.type=t,this.amount=e,"invert"!==this.type&&"grayscale"!==this.type&&"sepia"!==this.type||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(t,e,r){this.amount=y(t.amount,e.amount,r),this._updateMatrix()}clone(){return new h(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const t=this._colorMatrix||o();switch(this.type){case"brightness":this._colorMatrix=((t,e)=>{const r=(0,n.hZ)(t,e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1);return(0,n.mg)(r,r)})(t,this.amount);break;case"contrast":this._colorMatrix=((t,e)=>{const r=(0,n.hZ)(t,e,0,0,.5-.5*e,0,e,0,.5-.5*e,0,0,e,.5-.5*e,0,0,0,1);return(0,n.mg)(r,r)})(t,this.amount);break;case"grayscale":this._colorMatrix=(t=>{const e=1-this.amount,r=(0,n.hZ)(t,.2126+.7874*e,.7152-.7152*e,.0722-.0722*e,0,.2126-.2126*e,.7152+.2848*e,.0722-.0722*e,0,.2126-.2126*e,.7152-.7152*e,.0722+.9278*e,0,0,0,0,1);return(0,n.mg)(r,r)})(t);break;case"invert":this._colorMatrix=((t,e)=>{const r=1-2*e,s=(0,n.hZ)(t,r,0,0,e,0,r,0,e,0,0,r,e,0,0,0,1);return(0,n.mg)(s,s)})(t,this.amount);break;case"saturate":this._colorMatrix=((t,e)=>{const r=(0,n.hZ)(t,.213+.787*e,.715-.715*e,.072-.072*e,0,.213-.213*e,.715+.285*e,.072-.072*e,0,.213-.213*e,.715-.715*e,.072+.928*e,0,0,0,0,1);return(0,n.mg)(r,r)})(t,this.amount);break;case"sepia":this._colorMatrix=(t=>{const e=1-this.amount,r=(0,n.hZ)(t,.393+.607*e,.769-.769*e,.189-.189*e,0,.349-.349*e,.686+.314*e,.168-.168*e,0,.272-.272*e,.534-.534*e,.131+.869*e,0,0,0,0,1);return(0,n.mg)(r,r)})(t)}}}class c{constructor(t,e,r,s){this.offsetX=t,this.offsetY=e,this.blurRadius=r,this.color=s,this.type="drop-shadow"}interpolate(t,e,r){this.offsetX=y(t.offsetX,e.offsetX,r),this.offsetY=y(t.offsetY,e.offsetY,r),this.blurRadius=y(t.blurRadius,e.blurRadius,r),this.color[0]=Math.round(y(t.color[0],e.color[0],r)),this.color[1]=Math.round(y(t.color[1],e.color[1],r)),this.color[2]=Math.round(y(t.color[2],e.color[2],r)),this.color[3]=y(t.color[3],e.color[3],r)}clone(){return new c(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const t=[...this.color];return t[3]*=255,{type:"drop-shadow",xoffset:f(this.offsetX),yoffset:f(this.offsetY),blurRadius:f(this.blurRadius),color:t}}}class p{constructor(t){this.angle=t,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(t,e,r){this.angle=y(t.angle,e.angle,r),this._updateMatrix()}clone(){return new p(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const t=this._colorMatrix||o();this._colorMatrix=((t,e)=>{const r=Math.sin(e*Math.PI/180),s=Math.cos(e*Math.PI/180),i=(0,n.hZ)(t,.213+.787*s-.213*r,.715-.715*s-.715*r,.072-.072*s+.928*r,0,.213-.213*s+.143*r,.715+.285*s+.14*r,.072-.072*s-.283*r,0,.213-.213*s-.787*r,.715-.715*s+.715*r,.072+.928*s+.072*r,0,0,0,0,1);return(0,n.mg)(i,i)})(t,this.angle)}}class d{constructor(t){this.amount=t,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(t,e,r){this.amount=y(t.amount,e.amount,r)}clone(){return new d(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function y(t,e,r){return t+(e-t)*r}function f(t){return Math.round(1e3*(0,i.PN)(t))/1e3}function m(t){switch(t.type){case"grayscale":case"sepia":case"invert":return new h(t.type,0);case"saturate":case"brightness":case"contrast":return new h(t.type,1);case"opacity":return new d(1);case"hue-rotate":return new p(0);case"blur":return new u(0);case"drop-shadow":return new c(0,0,0,[...(0,s.TS)("transparent")]);case"bloom":return new a(0,0,1)}}},64272:(t,e,r)=>{r.d(e,{T:()=>p});var s,i=r(90237),o=r(25482),l=r(88930),n=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),u=r(40608),h=r(43937),c=r(98623);let p=class extends o.A{static{s=this}static get allTime(){return d}static get empty(){return y}static fromArray(t){return new s({start:null!=t[0]?new Date(t[0]):t[0],end:null!=t[1]?new Date(t[1]):t[1]})}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new s({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,s=t.start?.getTime()??t.start,i=t.end?.getTime()??t.end;return e===s&&r===i}expandTo(t,e=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,l.lL)(r,t,e));let i=this.end;if(i){const r=(0,l.lL)(i,t,e);i=i.getTime()===r.getTime()?r:(0,l.S1)(r,1,t,e)}return new s({start:r,end:i})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return s.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=t.start?.getTime()??-1/0,o=t.end?.getTime()??1/0;let l,n;return i>=e&&i<=r?l=i:e>=i&&e<=o&&(l=e),r>=i&&r<=o?n=r:o>=e&&o<=r&&(n=o),null==l||null==n||isNaN(l)||isNaN(n)?s.empty:new s({start:l===-1/0?null:new Date(l),end:n===1/0?null:new Date(n)})}offset(t,e,r=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new s,{start:o,end:n}=this;return null!=o&&(i.start=(0,l.S1)(o,t,e,r)),null!=n&&(i.end=(0,l.S1)(n,t,e,r)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return d.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,r=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new s({start:e,end:r})}};(0,i._)([(0,n.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,i._)([(0,a.w)("end")],p.prototype,"readEnd",null),(0,i._)([(0,h.K)("end")],p.prototype,"writeEnd",null),(0,i._)([(0,n.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,i._)([(0,n.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,i._)([(0,n.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,i._)([(0,a.w)("start")],p.prototype,"readStart",null),(0,i._)([(0,h.K)("start")],p.prototype,"writeStart",null),p=s=(0,i._)([(0,u.$)("esri.time.TimeExtent")],p);const d=new p,y=new p({start:void 0,end:void 0})},66344:(t,e,r)=>{var s,i;r.d(e,{q:()=>a}),(i=s||(s={}))[i.ALL=0]="ALL",i[i.SOME=1]="SOME",Symbol.iterator;class o{get size(){return this._size}constructor(t=10485760){this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear(),this._db=null}register(t){this._users.set(t.id.slice(0,-1),t)}deregister(t){this.clear(t),this._sizeLimits.delete(t),this._users.delete(t.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,-1),this._checkSize()}getSize(t,e){const r=this._db.get(t.id+e);return r?.size??0}put(t,e,r,i,o){e=t.id+e;const n=this._db.get(e);if(n&&(this._size-=n.size,t.size-=n.size,this._db.delete(e),n.entry!==r&&this._notifyRemove(e,n.entry,n.size,s.ALL)),i>this._maxSize)return void this._notifyRemove(e,r,i,s.ALL);if(void 0===r)return void console.warn("Refusing to cache undefined entry ");if(!i||i<0)return console.warn(`Refusing to cache entry with size ${i} for key ${e}`),void this._notifyRemove(e,r,0,s.ALL);const a=1+Math.max(o,-4)- -3;this._db.set(e,new l(r,i,a)),this._size+=i,t.size+=i,this._checkSize()}updateSize(t,e,r,i){e=t.id+e;const o=this._db.get(e);if(o&&o.entry===r){for(this._size-=o.size,t.size-=o.size;i>this._maxSize;){const t=this._notifyRemove(e,r,i,s.SOME);if(!(null!=t&&t>0))return void this._db.delete(e);i=t}o.size=i,this._size+=i,t.size+=i,this._checkSize()}}pop(t,e){e=t.id+e;const r=this._db.get(e);if(r)return this._size-=r.size,t.size-=r.size,this._db.delete(e),++this._hit,r.entry;++this._miss}get(t,e){e=t.id+e;const r=this._db.get(e);if(void 0!==r)return this._db.delete(e),r.lives=r.lifetime,this._db.set(e,r),++this._hit,r.entry;++this._miss}peek(t,e){const r=this._db.get(t.id+e);return r?++this._hit:++this._miss,r?.entry}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},r=new Array;this._db.forEach((t,s)=>{const i=t.lifetime;r[i]=(r[i]||0)+t.size,this._users.forEach(r=>{const{id:i,name:o}=r;if(s.startsWith(i)){const r=e[o]||0;e[o]=r+t.size}})});const s={};this._users.forEach(t=>{const r=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const i=e[r]||0;e[r]=i,s[r]=Math.round(100*t.hitRate)+"%"}else s[r]="0%"});const i=Object.keys(e);i.sort((t,r)=>e[r]-e[t]),i.forEach(r=>t[r]=Math.round(e[r]/2**20)+"MB / "+s[r]);for(let e=r.length-1;e>=0;--e){const s=r[e];s&&(t["Priority "+(e+-3-1)]=Math.round(s/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._users.forEach(t=>t.resetHitRate())}clear(t){const e=t.id;this._db.forEach((t,r)=>{r.startsWith(e)&&(this._size-=t.size,this._db.delete(r),this._notifyRemove(r,t.entry,t.size,s.ALL))}),t.size=0}clearAll(){this._db.forEach((t,e)=>this._notifyRemove(e,t.entry,t.size,s.ALL)),this._users.forEach(t=>t.size=0),this._size=0,this._db.clear()}*values(t){for(const[e,r]of this._db)e.startsWith(t.id)&&(yield r.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,r,s){const i=this._users.get(t.split(n)[0])?.removeFunc,o=i?.(e,s,r);return"number"==typeof o?o:null}_checkSize(){this._sizeLimits.forEach((t,e)=>this._checkSizeLimits(t,e)),this._checkSizeLimits(this.maxSize)}setMaxSize(t,e){null==e||e<=0?this._sizeLimits.delete(t):this._sizeLimits.set(t,e)}_checkSizeLimits(t,e){const r=e??this;if(r.size<=t)return;const s=e?.id;let i=!0;for(;i;){i=!1;for(const[o,l]of this._db)if(0===l.lifetime&&(!s||o.startsWith(s))){const s=e??this._users.get(o.split(n)[0]);if(this._purgeItem(o,l,s),r.size<=.9*t)return;i||=this._db.has(o)}}for(const[i,o]of this._db)if(!s||i.startsWith(s)){const s=e??this._users.get(i.split(n)[0]);if(this._purgeItem(i,o,s),r.size<=.9*t)return}}_purgeItem(t,e,r){if(this._db.delete(t),e.lives<=1){this._size-=e.size,r&&(r.size-=e.size);const i=this._notifyRemove(t,e.entry,e.size,s.SOME);null!=i&&i>0&&(this._size+=i,r&&(r.size+=i),e.lives=e.lifetime,e.size=i,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}class l{constructor(t,e,r){this.entry=t,this.size=e,this.lifetime=r,this.lives=r}}const n=":";class a{constructor(t,e){this.removeFunc=e,this._storage=new o,this.id="",this.name="",this.size=0,this._storage.maxSize=t,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy(),this._storage=null}put(t,e,r=1){this._storage.put(this,t,e,r,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},69208:(t,e,r)=>{r.d(e,{d:()=>l});var s=r(90237),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const l=t=>{let e=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,s._)([(0,i.MZ)({type:Object,json:{write:{overridePolicy:t=>({enabled:!!(t&&Object.keys(t).length>0)})}}})],e.prototype,"customParameters",void 0),e=(0,s._)([(0,o.$)("esri.layers.mixins.CustomParametersMixin")],e),e}},69540:(t,e,r)=>{r.d(e,{A:()=>p});var s=r(90237),i=r(69622),o=(r(44208),r(4718)),l=(r(53966),r(97768)),n=r(35666),a=r(88620),u=r(40608);const h=t=>{let e=class extends t{clone(t){const e=(0,a.oY)(this);(0,l.Lw)(e,"unable to clone instance of non-accessor class");const r=e.metadata,s=e.store,i={},u=new Map;for(const e in r){const l=r[e],a=s?.originOf(e),h=l.clonable;if(l.readOnly||!1===h||a!==n.Gr.USER&&a!==n.Gr.DEFAULTS&&a!==n.Gr.WEB_MAP&&a!==n.Gr.WEB_SCENE)continue;const c=this[e];let p=null;p="function"==typeof h?h(c,t):"reference"===h?c:(0,o.TU)(c,t),null!=c&&null==p||(a===n.Gr.DEFAULTS?u.set(e,p):i[e]=p)}const h=new(0,Object.getPrototypeOf(this).constructor)(i);if(u.size){const t=(0,a.oY)(h)?.store;if(t)for(const[e,r]of u)t.set(e,r,n.Gr.DEFAULTS)}return h}};return e=(0,s._)([(0,u.$)("esri.core.Clonable")],e),e};let c=class extends(h(i.A)){};c=(0,s._)([(0,u.$)("esri.core.Clonable")],c),(c||(c={})).ClonableMixin=h;const p=c},78553:(t,e,r)=>{r.d(e,{D:()=>o,p:()=>i});var s=r(56507);function i(t){const e=(0,s.Vr)(100*(1-t));return Math.max(0,Math.min(e,100))}function o(t){const e=1-t/100;return Math.max(0,Math.min(e,1))}},88788:(t,e,r)=>{r.d(e,{m:()=>l,v:()=>o});var s=r(84952),i=r(20655);function o(t,e){return{...n(t,e),readResourcePaths:[]}}function l(t,e,r){const i=(0,s.An)(t.itemUrl);return{...n(t,e),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:i?{rootPath:i.path,writtenUrls:[]}:null,resources:r?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function n(t,e){return{origin:e,url:(0,s.An)(t.itemUrl),portal:t.portal||i.A.getDefault(),portalItem:t}}},90629:(t,e,r)=>{r.d(e,{Lz:()=>l,PN:()=>n,cr:()=>a,gs:()=>h,r_:()=>c,tc:()=>u});const s=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,i="screenUtils.toPt: input not recognized!",o=96;function l(t){return t?t/72*o:0}function n(t){return t?72*t/o:0}function a(t){if("string"==typeof t){const e=t.match(s);if(e){const r=Number(e[1]),s=e[3]&&e[3].toLowerCase(),i="-"===t.charAt(0),o="px"===s?n(r):r;return i?-o:o}return console.warn(i),null}return t}function u(t=0,e=0){return{x:t,y:e}}function h(t=0,e=0){return[t,e]}function c(t=0,e=0,r=0){return[t,e,r]}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8263],{431:(t,e,n)=>{n.d(e,{o6:()=>v,HY:()=>D,hx:()=>F,Jb:()=>B});var o=n(9318);function r(t,e,n){const o=e/3,r=new Uint32Array(n+1),i=new Uint32Array(n+1),s=(t,e)=>{t<e?r[t+1]++:i[e+1]++};for(let e=0;e<o;e++){const n=t[3*e],o=t[3*e+1],r=t[3*e+2];s(n,o),s(o,r),s(r,n)}let a=0,c=0;for(let t=0;t<n;t++){const e=r[t+1],n=i[t+1];r[t+1]=a,i[t+1]=c,a+=e,c+=n}const u=new Uint32Array(6*o),l=r[n],h=(t,e,n)=>{if(t<e){const o=r[t+1]++;u[2*o]=e,u[2*o+1]=n}else{const o=i[e+1]++;u[2*l+2*o]=t,u[2*l+2*o+1]=n}};for(let e=0;e<o;e++){const n=t[3*e],o=t[3*e+1],r=t[3*e+2];h(n,o,e),h(o,r,e),h(r,n,e)}const d=(t,e)=>{const n=2*t,o=e-t;for(let t=1;t<o;t++){const e=u[n+2*t],o=u[n+2*t+1];let r=t-1;for(;r>=0&&u[n+2*r]>e;r--)u[n+2*r+2]=u[n+2*r],u[n+2*r+3]=u[n+2*r+1];u[n+2*r+2]=e,u[n+2*r+3]=o}};for(let t=0;t<n;t++)d(r[t],r[t+1]),d(l+i[t],l+i[t+1]);const f=new Int32Array(3*o),T=(e,n)=>e===t[3*n]?0:e===t[3*n+1]?1:e===t[3*n+2]?2:-1,_=(t,e)=>{const n=T(t,e);f[3*e+n]=-1},O=(t,e,n,o)=>{const r=T(t,e);f[3*e+r]=o;const i=T(n,o);f[3*o+i]=e};for(let t=0;t<n;t++){let e=r[t];const n=r[t+1];let o=i[t];const s=i[t+1];for(;e<n&&o<s;){const n=u[2*e],r=u[2*l+2*o];n===r?(O(t,u[2*e+1],r,u[2*l+2*o+1]),e++,o++):n<r?(_(t,u[2*e+1]),e++):(_(r,u[2*l+2*o+1]),o++)}for(;e<n;)_(t,u[2*e+1]),e++;for(;o<s;)_(u[2*l+2*o],u[2*l+2*o+1]),o++}return f}var i=n(1843),s=n(46540),a=n(3055),c=n(87811),u=n(38954),l=n(51850),h=n(4431),d=n(34727);function f(t,e,n,o,r,i=2){const s=1/(Math.abs(n)+Math.abs(o)+Math.abs(r)),a=n*s,c=o*s,u=r<=0?(a>=0?1:-1)*(1-Math.abs(c)):a,l=r<=0?(c>=0?1:-1)*(1-Math.abs(a)):c,h=e*i;t[h]=T(u),t[h+1]=T(l)}function T(t){return(0,d.qE)(Math.round(32767*t),-32767,32767)}n(11868),n(34275);class _{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?N:A}write(t,e,n){M.seed=this._edgeHashFunction(n);const o=M.getIntRange(0,255),r=M.getIntRange(0,this.settings.variants-1),i=M.getFloat(),s=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(i/.7,1))+Math.max(0,i-.7)/(1-.7))+.5);t.position0.setVec(e,n.position0),t.position1.setVec(e,n.position1),t.componentIndex.set(e,n.componentIndex),t.variantOffset.set(e,o),t.variantStroke.set(e,r),t.variantExtension.set(e,s)}}const O=new Float32Array(6),E=new Uint32Array(O.buffer),m=new Uint32Array(1);function A(t){return O[0]=t.position0[0],O[1]=t.position0[1],O[2]=t.position0[2],O[3]=t.position1[0],O[4]=t.position1[1],O[5]=t.position1[2],m[0]=31*(31*(31*(31*(31*(166811+E[0])+E[1])+E[2])+E[3])+E[4])+E[5],m[0]}function N(t){const e=O;e[0]=g(t.position0[0]),e[1]=g(t.position0[1]),e[2]=g(t.position0[2]),e[3]=g(t.position1[0]),e[4]=g(t.position1[1]),e[5]=g(t.position1[2]),m[0]=5381;for(let t=0;t<E.length;t++)m[0]=31*m[0]+E[t];return m[0]}const I=1e4;function g(t){return Math.round(t*I)/I}class p{constructor(){this._commonWriter=new _}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return a.gr.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n),(0,u.f)(S,n.faceNormal0,n.faceNormal1),(0,u.n)(S,S);const{typedBuffer:o,typedBufferStride:r}=t.normalCompressed;f(o,e,S[0],S[1],S[2],r)}static{this.Layout=a.gr}static{this.glLayout=(0,h.U)(a.gr,1)}}class R{constructor(){this._commonWriter=new _}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return a.In.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n);{const{typedBuffer:o,typedBufferStride:r}=t.normalCompressed;f(o,e,n.faceNormal0[0],n.faceNormal0[1],n.faceNormal0[2],r)}{const{typedBuffer:o,typedBufferStride:r}=t.normal2Compressed;f(o,e,n.faceNormal1[0],n.faceNormal1[1],n.faceNormal1[2],r)}}static{this.Layout=a.In}static{this.glLayout=(0,h.U)(a.In,1)}}const S=(0,l.vt)(),M=new c.A;var b=n(93406);function v(t){const e=F(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return P.updateSettings(t.writerSettings),C.updateSettings(t.writerSettings),(0,b.K)(e,P,C)}function F(t,e,n,i){if(e){const e=r(n,i,t.count);return new L(n,i,e,t)}const s=(0,o.b)(t.buffer,t.stride/4,{originalIndices:n}),c=r(s.indices,i,s.uniqueCount);return{faces:s.indices,facesLength:s.indices.length,neighbors:c,vertices:a.I$.createView(s.buffer)}}class L{constructor(t,e,n,o){this.faces=t,this.facesLength=e,this.neighbors=n,this.vertices=o}}const P=new p,C=new R,B=(0,i.BP)().vec3f(s.r.POSITION0).vec3f(s.r.POSITION1),D=(0,i.BP)().vec3f(s.r.POSITION0).vec3f(s.r.POSITION1).u16(s.r.COMPONENTINDEX)},3055:(t,e,n)=>{n.d(e,{I$:()=>s,In:()=>u,gr:()=>c});var o=n(4431),r=n(1843),i=n(46540);const s=(0,r.BP)().vec3f(i.r.POSITION).u16(i.r.COMPONENTINDEX).freeze(),a=(0,r.BP)().vec2u8(i.r.SIDENESS).freeze(),c=((0,o.U)(a),(0,r.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze()),u=(0,r.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).vec2i16(i.r.NORMAL2COMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze();new Map([[i.r.POSITION0,0],[i.r.POSITION1,1],[i.r.COMPONENTINDEX,2],[i.r.VARIANTOFFSET,3],[i.r.VARIANTSTROKE,4],[i.r.VARIANTEXTENSION,5],[i.r.NORMALCOMPRESSED,6],[i.r.NORMAL2COMPRESSED,7],[i.r.SIDENESS,8]])},4431:(t,e,n)=>{n.d(e,{U:()=>i});var o=n(63907),r=n(74038);function i(t,e=0){const n=t.stride;return Array.from(t.fields.keys()).map(o=>{const i=t.fields.get(o),a=i.constructor.ElementCount,c=s(i.constructor.ElementType),u=i.offset,l=i.optional?.glNormalized??!1;return new r._(o,a,c,u,n,l,e)})}function s(t){const e=a[t];if(e)return e;throw new Error("BufferType not supported in WebGL")}const a={u8:o.pe.UNSIGNED_BYTE,u16:o.pe.UNSIGNED_SHORT,u32:o.pe.UNSIGNED_INT,i8:o.pe.BYTE,i16:o.pe.SHORT,i32:o.pe.INT,f16:o.pe.HALF_FLOAT,f32:o.pe.FLOAT}},9318:(t,e,n)=>{n.d(e,{b:()=>i});var o=n(34727),r=n(97146);function i(t,e,n){const i=Array.isArray(t),l=i?t.length/e:t.byteLength/(4*e),h=i?t:new Uint32Array(t,0,l*e),d=n?.minReduction??0,f=n?.originalIndices||null,T=f?f.length:0,_=n?.componentOffsets||null;let O=0;if(_)for(let t=0;t<_.length-1;t++){const e=_[t+1]-_[t];e>O&&(O=e)}else O=l;const E=Math.floor(1.1*O)+1;(null==u||u.length<2*E)&&(u=new Uint32Array((0,o.cU)(2*E)));for(let t=0;t<2*E;t++)u[t]=0;let m=0;const A=!!_&&!!f,N=A?T:l;let I=(0,r.my)(l);const g=new Uint32Array(T),p=1.96;let R=0!==d?Math.ceil(4*p*p/(d*d)*d*(1-d)):N,S=1,M=_?_[1]:N;for(let t=0;t<N;t++){if(t===R){const e=1-m/t;if(e+p*Math.sqrt(e*(1-e)/t)<d)return null;R*=2}if(t===M){for(let t=0;t<2*E;t++)u[t]=0;if(f)for(let t=_[S-1];t<_[S];t++)g[t]=I[f[t]];M=_[++S]}const n=A?f[t]:t,o=n*e,r=c(h,o,e);let i=r%E,a=m;for(;0!==u[2*i+1];){if(u[2*i]===r){const t=u[2*i+1]-1;if(s(h,o,t*e,e)){a=I[t];break}}i++,i>=E&&(i-=E)}a===m&&(u[2*i]=r,u[2*i+1]=n+1,m++),I[n]=a}if(0!==d&&1-m/l<d)return null;if(A){for(let t=_[S-1];t<g.length;t++)g[t]=I[f[t]];I=(0,r.uW)(g)}const b=i?new Array(m):new Uint32Array(m*e);m=0;for(let t=0;t<N;t++)I[t]===m&&(a(h,(A?f[t]:t)*e,b,m*e,e),m++);if(f&&!A){const t=new Uint32Array(T);for(let e=0;e<t.length;e++)t[e]=I[f[e]];I=(0,r.uW)(t)}return{buffer:Array.isArray(b)?b:b.buffer,indices:I,uniqueCount:m}}function s(t,e,n,o){for(let r=0;r<o;r++)if(t[e+r]!==t[n+r])return!1;return!0}function a(t,e,n,o,r){for(let i=0;i<r;i++)n[o+i]=t[e+i]}function c(t,e,n){let o=0;for(let r=0;r<n;r++)o=t[e+r]+o|0,o=o+(o<<11)+(o>>>2)|0;return o>>>0}let u=null},11964:(t,e,n)=>{n.d(e,{Cr:()=>l,H6:()=>f,LV:()=>u,_I:()=>d,kb:()=>h,vt:()=>c});var o=n(34727),r=n(4341),i=n(38954),s=n(51850),a=n(32114);function c(t){return t?{origin:(0,s.o8)(t.origin),vector:(0,s.o8)(t.vector)}:{origin:(0,s.vt)(),vector:(0,s.vt)()}}function u(t,e){const n=T.get();return n.origin=t,n.vector=e,n}function l(t,e,n=c()){return(0,i.c)(n.origin,t),(0,i.d)(n.vector,e,t),n}function h(t,e){const n=(0,i.d)(a.rq.get(),e,t.origin),r=(0,i.e)(t.vector,n),s=(0,i.e)(t.vector,t.vector),c=(0,o.qE)(r/s,0,1),u=(0,i.d)(a.rq.get(),(0,i.g)(a.rq.get(),t.vector,c),n);return(0,i.e)(u,u)}function d(t,e,n){return f(t,e,0,1,n)}function f(t,e,n,r,s){const{vector:c,origin:u}=t,l=(0,i.d)(a.rq.get(),e,u),h=(0,i.e)(c,l)/(0,i.k)(c);return(0,i.g)(s,c,(0,o.qE)(h,n,r)),(0,i.f)(s,s,t.origin)}(0,s.vt)(),(0,s.vt)();const T=new r.I(()=>c())},27444:(t,e,n)=>{n.r(e),n.d(e,{default:()=>J});var o,r,i=n(90237),s=n(74887),a=(n(53966),n(44208),n(87811),n(49186),n(40608)),c=n(38954),u=n(51850),l=n(11964),h=n(97937),d=n(93687),f=n(3694),T=n(82919),_=n(71351),O=n(620);class E{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(t,e){this.objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new m,this._objectCount=0,e&&(void 0!==e.maximumObjectsPerNode&&(this._maximumObjectsPerNode=e.maximumObjectsPerNode),void 0!==e.maximumDepth&&(this._maximumDepth=e.maximumDepth))}destroy(){this._degenerateObjects.clear(),m.clearPool(),D[0]=null,j.prune(),k.prune()}add(t){const e=Array.from(t);this._grow(e);const n=m.acquire();for(const t of e)++this._objectCount,this._isDegenerate(t)?this._degenerateObjects.add(t):(n.init(this._root),this._add(t,n));m.release(n)}remove(t,e=null){this._objectCount-=t.length;const n=m.acquire();for(const o of t){const t=e??(0,h.h)(this.objectToBoundingSphere(o),H);L(t[3])?(n.init(this._root),I(o,t,n)):this._degenerateObjects.delete(o)}m.release(n),this._shrink()}update(t,e){if(!L(e[3])&&this._isDegenerate(t))return;const n=function(t){return D[0]=t,D}(t);this.remove(n,e),this.add(n)}forEachAlongRay(t,e,n){const o=(0,_.LV)(t,e);A(this._root,t=>{if(!function(t,e){return M((0,h.a)(e.bounds),2*-e.halfSize,y),M((0,h.a)(e.bounds),2*e.halfSize,U),(0,O.O_)(t.origin,t.direction,y,U)}(o,t))return!1;const e=t.node;return e.terminals.forAll(t=>{this._intersectsObject(o,t)&&n(t)}),null!==e.residents&&e.residents.forAll(t=>{this._intersectsObject(o,t)&&n(t)}),!0})}forEachAlongRayWithVerticalOffset(t,e,n,o){const r=(0,_.LV)(t,e);A(this._root,t=>{if(!function(t,e,n){return M((0,h.a)(e.bounds),2*-e.halfSize,y),M((0,h.a)(e.bounds),2*e.halfSize,U),n.applyToMinMax(y,U),(0,O.O_)(t.origin,t.direction,y,U)}(r,t,o))return!1;const e=t.node;return e.terminals.forAll(t=>{this._intersectsObjectWithOffset(r,t,o)&&n(t)}),null!==e.residents&&e.residents.forAll(t=>{this._intersectsObjectWithOffset(r,t,o)&&n(t)}),!0})}forEach(t){A(this._root,e=>{const n=e.node;return n.terminals.forAll(t),null!==n.residents&&n.residents.forAll(t),!0}),this._degenerateObjects.forEach(t)}forEachDegenerateObject(t){this._degenerateObjects.forEach(t)}findClosest(t,e,n,o=()=>!0,r=1/0){let i=1/0,s=1/0,a=null;const u=v(t,e),l=c=>{if(--r,!o(c))return;const u=this.objectToBoundingSphere(c);if(!(0,T.m7)(n,u))return;const l=F(t,e,(0,h.a)(u)),d=l-u[3],f=l+u[3];d<i&&(i=d,s=f,a=c)};return N(this._root,o=>{if(r<=0||!(0,T.m7)(n,o.bounds))return!1;if((0,c.g)(x,u,o.halfSize),(0,c.f)(x,x,(0,h.a)(o.bounds)),F(t,e,x)>s)return!1;const i=o.node;return i.terminals.forAll(t=>l(t)),null!==i.residents&&i.residents.forAll(t=>l(t)),!0},t,e),a}forEachInDepthRange(t,e,n,o,r,i,s){let a=-1/0,u=1/0;const l={setRange:t=>{n===E.DepthOrder.FRONT_TO_BACK?(a=Math.max(a,t.near),u=Math.min(u,t.far)):(a=Math.max(a,-t.far),u=Math.min(u,-t.near))}};l.setRange(o);const d=F(e,n,t),f=v(e,n),_=v(e,-n),O=t=>{if(!s(t))return;const o=this.objectToBoundingSphere(t),c=(0,h.a)(o),f=F(e,n,c)-d,_=f-o[3],O=f+o[3];_>u||O<a||!(0,T.m7)(i,o)||r(t,l)};N(this._root,t=>{if(!(0,T.m7)(i,t.bounds))return!1;if((0,c.g)(x,f,t.halfSize),(0,c.f)(x,x,(0,h.a)(t.bounds)),F(e,n,x)-d>u)return!1;if((0,c.g)(x,_,t.halfSize),(0,c.f)(x,x,(0,h.a)(t.bounds)),F(e,n,x)-d<a)return!1;const o=t.node;return o.terminals.forAll(t=>O(t)),null!==o.residents&&o.residents.forAll(t=>O(t)),!0},e,n)}forEachNode(t){A(this._root,e=>t(e.node,e.bounds,e.halfSize,e.depth))}forEachNeighbor(t,e){const n=(0,h.g)(e),o=(0,h.a)(e),r=e=>{const r=this.objectToBoundingSphere(e),i=(0,h.g)(r),s=n+i;return!((0,c.s)((0,h.a)(r),o)-s*s<=0)||t(e)};let i=!0;const s=t=>{i&&(i=r(t))};A(this._root,t=>{const e=(0,h.g)(t.bounds),r=n+e;if((0,c.s)((0,h.a)(t.bounds),o)-r*r>0)return!1;const a=t.node;return a.terminals.forAll(s),i&&null!==a.residents&&a.residents.forAll(s),i}),i&&this.forEachDegenerateObject(s)}_intersectsObject(t,e){const n=this.objectToBoundingSphere(e);return!(n[3]>0)||(0,h.k)(n,t)}_intersectsObjectWithOffset(t,e,n){const o=this.objectToBoundingSphere(e);return!(o[3]>0)||(0,h.k)(n.applyToBoundingSphere(o),t)}_add(t,e){e.advanceTo(this.objectToBoundingSphere(t))?e.node.terminals.push(t):(e.node.residents.push(t),e.node.residents.length>this._maximumObjectsPerNode&&e.depth<this._maximumDepth&&this._split(e))}_split(t){const e=t.node.residents;t.node.residents=null;for(let n=0;n<e.length;n++){const o=m.acquire().init(t);this._add(e.at(n),o),m.release(o)}}_grow(t){if(b(t,t=>this.objectToBoundingSphere(t),G),L(G[3])&&!this._fitsInsideTree(G))if(p(this._root.node))(0,h.h)(G,this._root.bounds),this._root.halfSize=1.25*this._root.bounds[3],this._root.updateBoundsRadiusFromHalfSize();else{const t=this._rootBoundsForRootAsSubNode(G);this._placingRootViolatesMaxDepth(t)?this._rebuildTree(G,t):this._growRootAsSubNode(t),m.release(t)}}_rebuildTree(t,e){(0,c.c)((0,h.a)(V),(0,h.a)(e.bounds)),V[3]=e.halfSize,b([t,V],t=>t,z);const n=m.acquire().init(this._root);this._root.initFrom(null,z,z[3]),this._root.increaseHalfSize(1.25),A(n,t=>(this.add(t.node.terminals.data),null!==t.node.residents&&this.add(t.node.residents.data),!0)),m.release(n)}_placingRootViolatesMaxDepth(t){const e=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E;let n=0;return A(this._root,t=>(n=Math.max(n,t.depth),n+e<=this._maximumDepth)),n+e>this._maximumDepth}_rootBoundsForRootAsSubNode(t){const e=t[3],n=t;let o=-1/0;const r=this._root.bounds,i=this._root.halfSize;for(let t=0;t<3;t++){const s=r[t]-i-(n[t]-e),a=n[t]+e-(r[t]+i),c=Math.max(0,Math.ceil(s/(2*i))),u=Math.max(0,Math.ceil(a/(2*i)))+1,l=2**Math.ceil(Math.log(c+u)*Math.LOG2E);o=Math.max(o,l),q[t].min=c,q[t].max=u}for(let t=0;t<3;t++){let e=q[t].min,n=q[t].max;const s=(o-(e+n))/2;e+=Math.ceil(s),n+=Math.floor(s);const a=r[t]-i-e*i*2;w[t]=a+(n+e)*i}const s=o*i;return w[3]=s*B,m.acquire().initFrom(null,w,s,0)}_growRootAsSubNode(t){const e=this._root.node;(0,c.c)((0,h.a)(G),(0,h.a)(this._root.bounds)),G[3]=this._root.halfSize,this._root.init(t),t.advanceTo(G,null,!0),t.node.children=e.children,t.node.residents=e.residents,t.node.terminals=e.terminals}_shrink(){for(;;){const t=this._findShrinkIndex();if(-1===t)break;this._root.advance(t),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let t=null;const e=this._root.node.children;let n=0,o=0;for(;o<e.length&&null==t;)n=o++,t=e[n];for(;o<e.length;)if(e[o++])return-1;return n}_isDegenerate(t){return!L(this.objectToBoundingSphere(t)[3])}_fitsInsideTree(t){const e=this._root.bounds,n=this._root.halfSize;return t[3]<=n&&t[0]>=e[0]-n&&t[0]<=e[0]+n&&t[1]>=e[1]-n&&t[1]<=e[1]+n&&t[2]>=e[2]-n&&t[2]<=e[2]+n}toJSON(){const{maximumDepth:t,maximumObjectsPerNode:e,_objectCount:n}=this,o=this._nodeToJSON(this._root.node);return{maximumDepth:t,maximumObjectsPerNode:e,objectCount:n,root:{bounds:this._root.bounds,halfSize:this._root.halfSize,depth:this._root.depth,node:o}}}_nodeToJSON(t){const e=t.children.map(t=>t?this._nodeToJSON(t):null),n=t.residents?.map(t=>this.objectToBoundingSphere(t)),o=t.terminals?.map(t=>this.objectToBoundingSphere(t));return{children:e,residents:n,terminals:o}}static fromJSON(t){const e=new E(t=>t,{maximumDepth:t.maximumDepth,maximumObjectsPerNode:t.maximumObjectsPerNode});return e._objectCount=t.objectCount,e._root.initFrom(t.root.node,t.root.bounds,t.root.halfSize,t.root.depth),e}}class m{constructor(){this.bounds=(0,h.c)(),this.halfSize=0,this.initFrom(null,null,0,0)}init(t){return this.initFrom(t.node,t.bounds,t.halfSize,t.depth)}initFrom(t,e,n,o=this.depth){return this.node=null!=t?t:m.createEmptyNode(),e&&(0,h.h)(e,this.bounds),this.halfSize=n,this.depth=o,this}increaseHalfSize(t){this.halfSize*=t,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds[3]=this.halfSize*B}advance(t){let e=this.node.children[t];e||(e=m.createEmptyNode(),this.node.children[t]=e),this.node=e,this.halfSize/=2,this.depth++;const n=P[t];return this.bounds[0]+=n[0]*this.halfSize,this.bounds[1]+=n[1]*this.halfSize,this.bounds[2]+=n[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(t,e,n=!1){for(;;){if(this.isTerminalFor(t))return e&&e(this,-1),!0;if(this.isLeaf()){if(!n)return e&&e(this,-1),!1;this.node.residents=null}const o=this._childIndex(t);e&&e(this,o),this.advance(o)}}isLeaf(){return null!=this.node.residents}isTerminalFor(t){return t[3]>this.halfSize/2}_childIndex(t){const e=this.bounds;return(e[0]<t[0]?1:0)+(e[1]<t[1]?2:0)+(e[2]<t[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new f.A({shrink:!0}),residents:new f.A({shrink:!0})}}static{this._pool=new d.A(m)}static acquire(){return m._pool.acquire()}static release(t){m._pool.release(t)}static clearPool(){m._pool.prune()}}function A(t,e){let n=m.acquire().init(t);const o=[n];for(;0!==o.length;){if(n=o.pop(),e(n)&&!n.isLeaf())for(let t=0;t<n.node.children.length;t++)n.node.children[t]&&o.push(m.acquire().init(n).advance(t));m.release(n)}}function N(t,e,n,o=E.DepthOrder.FRONT_TO_BACK){let r=m.acquire().init(t);const i=[r];for(function(t,e,n){if(!k.length)for(let t=0;t<8;++t)k.push({index:0,distance:0});for(let n=0;n<8;++n){const o=P[n];k.data[n].index=n,k.data[n].distance=F(t,e,o)}k.sort((t,e)=>t.distance-e.distance);for(let t=0;t<8;++t)n[t]=k.data[t].index}(n,o,X);0!==i.length;){if(r=i.pop(),e(r)&&!r.isLeaf())for(let t=7;t>=0;--t){const e=X[t];r.node.children[e]&&i.push(m.acquire().init(r).advance(e))}m.release(r)}}function I(t,e,n){j.clear();const o=n.advanceTo(e,(t,e)=>{j.push(t.node),j.push(e)})?n.node.terminals:n.node.residents;if(o.removeUnordered(t),0===o.length)for(let t=j.length-2;t>=0&&g(j.data[t],j.data[t+1]);t-=2);}function g(t,e){return e>=0&&(t.children[e]=null),!!p(t)&&(null===t.residents&&(t.residents=new f.A({shrink:!0})),!0)}function p(t){if(0!==t.terminals.length)return!1;if(null!==t.residents)return 0===t.residents.length;for(let e=0;e<t.children.length;e++)if(t.children[e])return!1;return!0}function R(t,e){t[0]=Math.min(t[0],e[0]-e[3]),t[1]=Math.min(t[1],e[1]-e[3]),t[2]=Math.min(t[2],e[2]-e[3])}function S(t,e){t[0]=Math.max(t[0],e[0]+e[3]),t[1]=Math.max(t[1],e[1]+e[3]),t[2]=Math.max(t[2],e[2]+e[3])}function M(t,e,n){n[0]=t[0]+e,n[1]=t[1]+e,n[2]=t[2]+e}function b(t,e,n){y[0]=1/0,y[1]=1/0,y[2]=1/0,U[0]=-1/0,U[1]=-1/0,U[2]=-1/0;for(const n of t){const t=e(n);L(t[3])&&(R(y,t),S(U,t))}(0,c.m)((0,h.a)(n),y,U,.5),n[3]=Math.max(U[0]-y[0],U[1]-y[1],U[2]-y[2])/2}function v(t,e){let n,o=1/0;for(let r=0;r<8;++r){const i=F(t,e,C[r]);i<o&&(o=i,n=C[r])}return n}function F(t,e,n){return e*(t[0]*n[0]+t[1]*n[1]+t[2]*n[2])}function L(t){return!isNaN(t)&&t!==-1/0&&t!==1/0&&t>0}o=E||(E={}),(r=o.DepthOrder||(o.DepthOrder={}))[r.FRONT_TO_BACK=1]="FRONT_TO_BACK",r[r.BACK_TO_FRONT=-1]="BACK_TO_FRONT";const P=[(0,u.fA)(-1,-1,-1),(0,u.fA)(1,-1,-1),(0,u.fA)(-1,1,-1),(0,u.fA)(1,1,-1),(0,u.fA)(-1,-1,1),(0,u.fA)(1,-1,1),(0,u.fA)(-1,1,1),(0,u.fA)(1,1,1)],C=[(0,u.fA)(-1,-1,-1),(0,u.fA)(-1,-1,1),(0,u.fA)(-1,1,-1),(0,u.fA)(-1,1,1),(0,u.fA)(1,-1,-1),(0,u.fA)(1,-1,1),(0,u.fA)(1,1,-1),(0,u.fA)(1,1,1)],B=Math.sqrt(3),D=[null],w=(0,h.c)(),x=(0,u.vt)(),y=(0,u.vt)(),U=(0,u.vt)(),j=new f.A,H=(0,h.c)(),G=(0,h.c)(),V=(0,h.c)(),z=(0,h.c)(),q=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],k=new f.A,X=[0,0,0,0,0,0,0,0];var K=n(431);function W(t,e,n){const o=(0,h.c)(),r=(0,h.a)(o);return(0,c.b)(r,r,t,.5),(0,c.b)(r,r,e,.5),o[3]=(0,c.j)(r,t),(0,c.f)(r,r,n),o}let Y=class{constructor(){this._idToComponent=new Map,this._components=new E(t=>t.bounds),this._edges=new E(t=>t.bounds),this._tmpLineSegment=(0,l.vt)(),this._tmpP1=(0,u.vt)(),this._tmpP2=(0,u.vt)(),this._tmpP3=(0,u.vt)(),this.remoteClient=null}async fetchCandidates(t,e){await Promise.resolve(),(0,s.Te)(e),await this._ensureEdgeLocations(t,e);const n=[];return this._edges.forEachNeighbor(e=>(this._addCandidates(t,e,n),n.length<1e3),t.bounds),{result:{candidates:n}}}async _ensureEdgeLocations(t,e){const n=[];if(this._components.forEachNeighbor(t=>{if(null==t.info){const{id:e,uid:o}=t;n.push({id:e,uid:o})}return!0},t.bounds),!n.length)return;const o={components:n},r=await this.remoteClient.invoke("fetchAllEdgeLocations",o,e??{});for(const t of r.components)this._setFetchEdgeLocations(t)}async add(t){const e=new Z(t.id,t.bounds);return this._idToComponent.set(e.id,e),this._components.add([e]),{result:{}}}async remove(t){const e=this._idToComponent.get(t.id);if(e){const t=[];this._edges.forEachNeighbor(n=>(n.component===e&&t.push(n),!0),e.bounds),this._edges.remove(t),this._components.remove([e]),this._idToComponent.delete(e.id)}return{result:{}}}_setFetchEdgeLocations(t){const e=this._idToComponent.get(t.id);if(null==e||t.uid!==e.uid)return;const n=K.HY.createView(t.locations),o=new Array(n.count),r=(0,u.vt)(),i=(0,u.vt)();for(let s=0;s<n.count;s++){n.position0.getVec(s,r),n.position1.getVec(s,i);const a=W(r,i,t.origin),c=new Q(e,s,a);o[s]=c}this._edges.add(o);const{objectIds:s,origin:a}=t;e.info={locations:n,objectIds:s,origin:a}}_addCandidates(t,e,n){const{info:o}=e.component,{origin:r,objectIds:i}=o,s=o.locations,a=s.position0.getVec(e.index,this._tmpP1),u=s.position1.getVec(e.index,this._tmpP2);(0,c.f)(a,a,r),(0,c.f)(u,u,r);const l=i[s.componentIndex.get(e.index)];this._addEdgeCandidate(t,l,a,u,n),$(t,l,a,n),$(t,l,u,n)}_addEdgeCandidate(t,e,n,o,r){if(!t.returnEdge)return;const i=(0,h.a)(t.bounds),s=(0,l.Cr)(n,o,this._tmpLineSegment),a=(0,l._I)(s,i,this._tmpP3);(0,h.o)(t.bounds,a)&&r.push({type:"edge",objectId:e,target:(0,u.o8)(a),distance:(0,c.j)(i,a),start:(0,u.o8)(n),end:(0,u.o8)(o)})}};Y=(0,i._)([(0,a.$)("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],Y);const J=Y;function $(t,e,n,o){if(!t.returnVertex||!(0,h.o)(t.bounds,n))return;const r=(0,h.a)(t.bounds);o.push({type:"vertex",objectId:e,target:(0,u.o8)(n),distance:(0,c.j)(r,n)})}class Z{constructor(t,e){this.id=t,this.bounds=e,this.info=null,this.uid=++Z.uid}static{this.uid=0}}class Q{constructor(t,e,n){this.component=t,this.index=e,this.bounds=n}}},27921:(t,e,n)=>{n.d(e,{$Q:()=>b,C:()=>u,Cr:()=>f,LV:()=>c,Nj:()=>L,O_:()=>d,Qj:()=>l,T7:()=>R,Tj:()=>M,Ui:()=>p,_I:()=>v,fA:()=>h,gv:()=>S,lU:()=>T,mN:()=>F,mP:()=>I,mR:()=>g,v1:()=>w,vE:()=>B,vt:()=>a});var o=n(34727),r=n(38954),i=n(51850),s=(n(87317),n(44280),n(32114));function a(t=D){return[t[0],t[1],t[2],t[3]]}function c(t=D[0],e=D[1],n=D[2],o=D[3]){return h(t,e,n,o,s.Km.get())}function u(t,e){return h(e[0],e[1],e[2],e[3],t)}function l(t){return t}function h(t,e,n,o,r=a()){return r[0]=t,r[1]=e,r[2]=n,r[3]=o,r}function d(t,e,n){const o=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return n[0]=e[0]*r,n[1]=e[1]*r,n[2]=e[2]*r,n[3]=-(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]),n}function f(t,e,n,o=a()){const r=n[0]-e[0],i=n[1]-e[1],s=n[2]-e[2],c=t[0]-e[0],u=t[1]-e[1],l=t[2]-e[2],h=i*l-s*u,d=s*c-r*l,f=r*u-i*c,T=h*h+d*d+f*f,_=Math.abs(T-1)>1e-5&&T>1e-12?1/Math.sqrt(T):1;return o[0]=h*_,o[1]=d*_,o[2]=f*_,o[3]=-(o[0]*t[0]+o[1]*t[1]+o[2]*t[2]),o}function T(t,e,n,o=0,i=Math.floor(n*(1/3)),s=Math.floor(n*(2/3))){if(n<3)return!1;e(O,o);let a=i,c=!1;for(;a<n-1&&!c;)e(E,a),a++,c=!(0,r.q)(O,E);if(!c)return!1;for(a=Math.max(a,s),c=!1;a<n&&!c;)e(m,a),a++,(0,r.d)(A,O,E),(0,r.n)(A,A),(0,r.d)(N,E,m),(0,r.n)(N,N),c=!(0,r.q)(O,m)&&!(0,r.q)(E,m)&&Math.abs((0,r.e)(A,N))<_;return c?(f(O,E,m,t),!0):(0!==o||1!==i||2!==s)&&T(t,e,n,0,1,2)}n(32728);const _=.99619469809,O=(0,i.vt)(),E=(0,i.vt)(),m=(0,i.vt)(),A=(0,i.vt)(),N=(0,i.vt)();function I(t,e,n){return e!==t&&u(t,e),t[3]=-(0,r.e)(t,n),t}function g(t,e,n,o){return(0,r.h)(m,e,t),d(n,m,o)}function p(t,e,n){return null!=e&&C(B(t,e.origin,e.direction,x,n))}function R(t,e,n){return C(B(t,e.origin,e.vector,w.NONE,n))}function S(t,e,n){return C(B(t,e.origin,e.vector,w.CLAMP,n))}function M(t,e){return F(t,e)>=0}function b(t,e){const n=(0,r.e)(t,e.ray.direction),o=-F(t,e.ray.origin);if(o<0&&n>=0)return!1;if(n>-1e-6&&n<1e-6)return o>0;if((o<0||n<0)&&!(o<0&&n<0))return!0;const i=o/n;return n>0?i<e.c1&&(e.c1=i):i>e.c0&&(e.c0=i),e.c0<=e.c1}function v(t,e,n){const o=(0,r.g)(s.rq.get(),t,-t[3]),i=function(t,e,n){const o=(0,r.g)(s.rq.get(),t,(0,r.e)(t,e));return(0,r.d)(n,e,o),n}(t,(0,r.d)(s.rq.get(),e,o),s.rq.get());return(0,r.f)(n,i,o),n}function F(t,e){return(0,r.e)(t,e)+t[3]}var L,P;function C(t){return t===L.INTERSECTS_INSIDE_OUT||t===L.INTERSECTS_OUTSIDE_IN}function B(t,e,n,i,s){const a=(0,r.e)(t,n),c=F(t,e);if(0===a)return c>=0?L.INSIDE:L.OUTSIDE;let u=-c/a;return i&w.CLAMP&&(u=(0,o.qE)(u,0,1)),!(i&w.INFINITE_MIN)&&u<0||!(i&w.INFINITE_MAX)&&u>1?c>=0?L.INSIDE:L.OUTSIDE:((0,r.f)(s,e,(0,r.g)(s,n,u)),c>=0?L.INTERSECTS_INSIDE_OUT:L.INTERSECTS_OUTSIDE_IN)}(P=L||(L={}))[P.INTERSECTS_INSIDE_OUT=0]="INTERSECTS_INSIDE_OUT",P[P.INTERSECTS_OUTSIDE_IN=1]="INTERSECTS_OUTSIDE_IN",P[P.INSIDE=2]="INSIDE",P[P.OUTSIDE=3]="OUTSIDE";const D=[0,0,1,0];var w;!function(t){t[t.NONE=0]="NONE",t[t.CLAMP=1]="CLAMP",t[t.INFINITE_MIN=4]="INFINITE_MIN",t[t.INFINITE_MAX=8]="INFINITE_MAX"}(w||(w={})),w.INFINITE_MIN,w.INFINITE_MAX;const x=w.INFINITE_MAX},32728:(t,e,n)=>{n.d(e,{nu:()=>i}),n(34727);var o=n(38954),r=n(51850);function i(t,e,n,i=(0,r.vt)()){const c=(0,o.l)(t),u=(0,o.l)(e),l=(0,o.e)(t,e)/(c*u);if(l<.9999999999999999){const r=Math.acos(l),h=((1-n)*c+n*u)/Math.sin(r),d=h/c*Math.sin((1-n)*r),f=h/u*Math.sin(n*r);return(0,o.g)(s,t,d),(0,o.g)(a,e,f),(0,o.f)(i,s,a)}return(0,o.m)(i,t,e,n)}(0,r.vt)(),(0,r.vt)(),(0,r.vt)();const s=(0,r.vt)(),a=(0,r.vt)()},34727:(t,e,n)=>{n.d(e,{$8:()=>g,Cc:()=>s,Hx:()=>_,Io:()=>I,KJ:()=>u,Sp:()=>d,XM:()=>l,YN:()=>h,ZH:()=>T,cU:()=>r,gg:()=>f,hs:()=>a,kU:()=>c,or:()=>R,pF:()=>M,pq:()=>S,qE:()=>i});const o=new Float32Array(1);function r(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function i(t,e,n){return Math.min(Math.max(t,e),n)}function s(t,e,n){return t+(e-t)*n}function a(t,e,n,o,r){return s(o,r,(t-e)/(n-e))}function c(t){return t*Math.PI/180}function u(t){return 180*t/Math.PI}function l(t){return Math.acos(i(t,-1,1))}function h(t){return Math.asin(i(t,-1,1))}function d(t,e,n=1e-6){return t===e||!(!Number.isFinite(t)||!Number.isFinite(e))&&(t>e?t-e:e-t)<=n}function f(t,e,n=1e-6){return!d(t,e,n)&&t>e}function T(t,e,n=1e-6){return!d(t,e,n)&&t<e}function _(t,e,n=1e-6){return d(t,e,n)||t>e}const O=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function E(t){return O.setFloat64(0,t),O.getBigInt64(0)}const m=BigInt("1000000"),A=N(1);function N(t){const e=E(t=Math.abs(t)),n=function(t){return O.setBigInt64(0,t),O.getFloat64(0)}(e<=m?m:e-m);return Math.abs(t-n)}function I(t,e,n=A){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;if(null!=n&&N(Math.min(Math.abs(t),Math.abs(e)))<n)return Math.abs(t-e)<=n;const o=E(t),r=E(e);return o<0==r<0&&!((o<r?r-o:o-r)>m)}function g(t){return p(Math.max(-S,Math.min(t,S)))}function p(t){return o[0]=t,o[0]}function R(t){const e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],o=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(d(e,1)&&d(n,1)&&d(o,1))}const S=p(34028234663852886e22);function M(t,e,n){if(void 0===n||0===+n)return Math[t](e);if(e=+e,n=+n,isNaN(e)||"number"!=typeof n||n%1!=0)return NaN;let o=e.toString().split("e");return o=(e=Math[t](+(o[0]+"e"+(o[1]?+o[1]-n:-n)))).toString().split("e"),+(o[0]+"e"+(o[1]?+o[1]+n:n))}},46540:(t,e,n)=>{var o;n.d(e,{r:()=>o}),function(t){t.POSITION="position",t.NORMAL="normal",t.NORMALCOMPRESSED="normalCompressed",t.UV0="uv0",t.UVI="uvi",t.COLOR="color",t.SYMBOLCOLOR="symbolColor",t.SIZE="size",t.ROTATION="rotation",t.TANGENT="tangent",t.OFFSET="offset",t.PERSPECTIVEDIVIDE="perspectiveDivide",t.CENTEROFFSETANDDISTANCE="centerOffsetAndDistance",t.LENGTH="length",t.NEXTDELTA="nextDelta",t.PREVIOUSDELTA="previousDelta",t.U0="u0",t.LINEPARAMETERS="lineParameters",t.COLORFEATUREATTRIBUTE="colorFeatureAttribute",t.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",t.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",t.DISTANCETOSTART="distanceToStart",t.UVMAPSPACE="uvMapSpace",t.BOUNDINGRECT="boundingRect",t.UVREGION="uvRegion",t.PROFILERIGHT="profileRight",t.PROFILEUP="profileUp",t.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",t.PROFILEAUXDATA="profileAuxData",t.INSTANCEMODELORIGINHI="instanceModelOriginHi",t.INSTANCEMODELORIGINLO="instanceModelOriginLo",t.INSTANCEMODEL="instanceModel",t.INSTANCEMODELNORMAL="instanceModelNormal",t.INSTANCECOLOR="instanceColor",t.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",t.LOCALTRANSFORM="localTransform",t.GLOBALTRANSFORM="globalTransform",t.BOUNDINGSPHERE="boundingSphere",t.MODELORIGIN="modelOrigin",t.MODELSCALEFACTORS="modelScaleFactors",t.FEATUREATTRIBUTE="featureAttribute",t.STATE="state",t.LODLEVEL="lodLevel",t.POSITION0="position0",t.POSITION1="position1",t.NORMAL2COMPRESSED="normal2Compressed",t.COMPONENTINDEX="componentIndex",t.VARIANTOFFSET="variantOffset",t.VARIANTSTROKE="variantStroke",t.VARIANTEXTENSION="variantExtension",t.SIDENESS="sideness",t.START="start",t.END="end",t.UP="up",t.START_UP="startUp",t.END_UP="endUp",t.EXTRUDE="extrude",t.OLIDCOLOR="objectAndLayerIdColor",t.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(o||(o={}))},74038:(t,e,n)=>{n.d(e,{_:()=>o});class o{constructor(t,e,n,o,r,i=!1,s=0){this.name=t,this.count=e,this.type=n,this.offset=o,this.stride=r,this.normalized=i,this.divisor=s}}},82919:(t,e,n)=>{n.d(e,{FB:()=>h,J7:()=>d,DV:()=>N,C:()=>m,vt:()=>O,Qy:()=>E,ui:()=>A,ST:()=>p,bU:()=>R,pw:()=>g,m7:()=>I,c8:()=>M});var o=n(4341),r=n(58083),i=n(38954),s=n(51850),a=n(87317),c=n(91829),u=n(71351);function l(t){return t?{ray:(0,u.vt)(t.ray),c0:t.c0,c1:t.c1}:{ray:(0,u.vt)(),c0:0,c1:Number.MAX_VALUE}}new o.I(()=>l());var h,d,f,T=n(27921),_=n(32114);function O(t){return t?[(0,T.vt)(t[0]),(0,T.vt)(t[1]),(0,T.vt)(t[2]),(0,T.vt)(t[3]),(0,T.vt)(t[4]),(0,T.vt)(t[5])]:[(0,T.vt)(),(0,T.vt)(),(0,T.vt)(),(0,T.vt)(),(0,T.vt)(),(0,T.vt)()]}function E(){return[(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)()]}function m(t,e){for(let n=0;n<b;n++)(0,T.C)(t[n],e[n]);return t}function A(t,e,n,o=P){const s=(0,r.lw)(_.Rc.get(),e,t);(0,r.B8)(s,s);for(let t=0;t<v;++t){const e=(0,a.t)(_.Km.get(),F[t],s);(0,i.i)(o[t],e[0]/e[3],e[1]/e[3],e[2]/e[3])}N(n,o)}function N(t,e){(0,T.Cr)(e[d.FAR_BOTTOM_LEFT],e[d.NEAR_BOTTOM_LEFT],e[d.NEAR_TOP_LEFT],t[h.LEFT]),(0,T.Cr)(e[d.NEAR_BOTTOM_RIGHT],e[d.FAR_BOTTOM_RIGHT],e[d.FAR_TOP_RIGHT],t[h.RIGHT]),(0,T.Cr)(e[d.FAR_BOTTOM_LEFT],e[d.FAR_BOTTOM_RIGHT],e[d.NEAR_BOTTOM_RIGHT],t[h.BOTTOM]),(0,T.Cr)(e[d.NEAR_TOP_LEFT],e[d.NEAR_TOP_RIGHT],e[d.FAR_TOP_RIGHT],t[h.TOP]),(0,T.Cr)(e[d.NEAR_BOTTOM_LEFT],e[d.NEAR_BOTTOM_RIGHT],e[d.NEAR_TOP_RIGHT],t[h.NEAR]),(0,T.Cr)(e[d.FAR_BOTTOM_RIGHT],e[d.FAR_BOTTOM_LEFT],e[d.FAR_TOP_LEFT],t[h.FAR])}function I(t,e){for(let n=0;n<b;n++){const o=t[n];if(o[0]*e[0]+o[1]*e[1]+o[2]*e[2]+o[3]>=e[3])return!1}return!0}function g(t,e){return S(t,function(t,e=l()){return(0,u.C)(t,e.ray),e.c0=0,e.c1=Number.MAX_VALUE,e}(e,L.get()))}function p(t,e,n){return S(t,function(t,e,n=l()){const o=(0,i.l)(t.vector);return(0,u.fA)(t.origin,e,n.ray),n.c0=0,n.c1=o,n}(e,n,L.get()))}function R(t,e){for(let n=0;n<b;n++)if((0,T.mN)(t[n],e)>0)return!1;return!0}function S(t,e){for(let n=0;n<b;n++)if(!(0,T.$Q)(t[n],e))return!1;return!0}(f=h||(h={}))[f.LEFT=0]="LEFT",f[f.RIGHT=1]="RIGHT",f[f.BOTTOM=2]="BOTTOM",f[f.TOP=3]="TOP",f[f.NEAR=4]="NEAR",f[f.FAR=5]="FAR",function(t){t[t.NEAR_BOTTOM_LEFT=0]="NEAR_BOTTOM_LEFT",t[t.NEAR_BOTTOM_RIGHT=1]="NEAR_BOTTOM_RIGHT",t[t.NEAR_TOP_RIGHT=2]="NEAR_TOP_RIGHT",t[t.NEAR_TOP_LEFT=3]="NEAR_TOP_LEFT",t[t.FAR_BOTTOM_LEFT=4]="FAR_BOTTOM_LEFT",t[t.FAR_BOTTOM_RIGHT=5]="FAR_BOTTOM_RIGHT",t[t.FAR_TOP_RIGHT=6]="FAR_TOP_RIGHT",t[t.FAR_TOP_LEFT=7]="FAR_TOP_LEFT"}(d||(d={}));const M={bottom:[d.FAR_BOTTOM_RIGHT,d.NEAR_BOTTOM_RIGHT,d.NEAR_BOTTOM_LEFT,d.FAR_BOTTOM_LEFT],near:[d.NEAR_BOTTOM_LEFT,d.NEAR_BOTTOM_RIGHT,d.NEAR_TOP_RIGHT,d.NEAR_TOP_LEFT],far:[d.FAR_BOTTOM_RIGHT,d.FAR_BOTTOM_LEFT,d.FAR_TOP_LEFT,d.FAR_TOP_RIGHT],right:[d.NEAR_BOTTOM_RIGHT,d.FAR_BOTTOM_RIGHT,d.FAR_TOP_RIGHT,d.NEAR_TOP_RIGHT],left:[d.FAR_BOTTOM_LEFT,d.NEAR_BOTTOM_LEFT,d.NEAR_TOP_LEFT,d.FAR_TOP_LEFT],top:[d.FAR_TOP_LEFT,d.NEAR_TOP_LEFT,d.NEAR_TOP_RIGHT,d.FAR_TOP_RIGHT]},b=6,v=8,F=[(0,c.fA)(-1,-1,-1,1),(0,c.fA)(1,-1,-1,1),(0,c.fA)(1,1,-1,1),(0,c.fA)(-1,1,-1,1),(0,c.fA)(-1,-1,1,1),(0,c.fA)(1,-1,1,1),(0,c.fA)(1,1,1,1),(0,c.fA)(-1,1,1,1)],L=new o.I(l),P=E()},88582:(t,e,n)=>{var o;n.d(e,{_:()=>o}),function(t){t[t.X=0]="X",t[t.Y=1]="Y",t[t.Z=2]="Z"}(o||(o={}))},91869:(t,e,n)=>{function o(t,e){for(const n of t.values())if(e(n))return!0;return!1}function r(t,e,n){const o=t.get(e);if(void 0!==o)return o;const r=n();return t.set(e,r),r}function i(t){const e=new Map;return n=>(e.has(n)||e.set(n,t(n)),e.get(n))}n.d(e,{Bj:()=>i,Bs:()=>o,tE:()=>r})},93406:(t,e,n)=>{n.d(e,{K:()=>c});var o=n(34727),r=n(3694),i=n(38954),s=n(51850);const a=-1;function c(t,e,n){const o=t.vertices.position,r=t.vertices.componentIndex,s=_.position0,c=_.position1,h=_.faceNormal0,f=_.faceNormal1,{edges:T,normals:O}=l(t),E=T.length/4,m=e.allocate(E);let A=0;const N=E,p=n?.allocate(N);let S=0,M=0,b=0;d.length=0;for(let t=0;t<E;++t){const e=4*t;o.getVec(T.data[e],s),o.getVec(T.data[e+1],c);const n=d.pushNew();n.index=4*t,n.length=(0,i.j)(s,c)}d.sort((t,e)=>e.length-t.length);const v=new Array,F=new Array;d.forAll(({length:t,index:l})=>{const d=T.data[l],E=T.data[l+1],N=T.data[l+2],L=T.data[l+3],P=L===a;if(o.getVec(d,s),o.getVec(E,c),P){const t=3*N;(0,i.i)(h,O.data[t],O.data[t+1],O.data[t+2]),(0,i.c)(f,h),_.componentIndex=r.get(d),_.cosAngle=(0,i.e)(h,f)}else{let t=3*N;if((0,i.i)(h,O.data[t],O.data[t+1],O.data[t+2]),t=3*L,(0,i.i)(f,O.data[t],O.data[t+1],O.data[t+2]),_.componentIndex=r.get(d),_.cosAngle=(0,i.e)(h,f),function(t,e){return t.cosAngle>e}(_,g))return;_.cosAngle<-.9999&&(0,i.c)(f,h)}M+=t,b++,P||function(t,e){return t.cosAngle<e}(_,R)?(e.write(m,A++,_),v.push(t)):u(_,I)&&(p&&n&&n.write(p,S++,_),F.push(t))});const L=new Float32Array(v.reverse()),P=new Float32Array(F.reverse()),C=p&&n?{instancesData:p.slice(0,S),lodInfo:{lengths:P}}:void 0;return{regular:{instancesData:m.slice(0,A),lodInfo:{lengths:L}},silhouette:C,averageEdgeLength:M/b}}function u(t,e){const n=(0,o.XM)(t.cosAngle);return(0,i.E)(E,t.position1,t.position0),n*((0,i.e)((0,i.h)(O,t.faceNormal0,t.faceNormal1),E)>0?-1:1)>e}function l(t){const e=t.faces.length/3,n=t.faces,o=t.neighbors,r=t.vertices.position;f.length=T.length=0;for(let t=0;t<e;t++){const e=3*t,s=o[e],c=o[e+1],u=o[e+2],l=n[e],h=n[e+1],d=n[e+2];r.getVec(l,m),r.getVec(h,A),r.getVec(d,N),(0,i.d)(A,A,m),(0,i.d)(N,N,m),(0,i.h)(m,A,N),(0,i.n)(m,m),T.pushArray(m),(s===a||l<h)&&(f.push(l),f.push(h),f.push(t),f.push(s)),(c===a||h<d)&&(f.push(h),f.push(d),f.push(t),f.push(c)),(u===a||d<l)&&(f.push(d),f.push(l),f.push(t),f.push(u))}return{edges:f,normals:T}}class h{constructor(){this.index=0,this.length=0}}const d=new r.A({allocator:t=>t||new h,deallocator:null}),f=new r.A({deallocator:null}),T=new r.A({deallocator:null}),_=new class{constructor(){this.position0=(0,s.vt)(),this.position1=(0,s.vt)(),this.faceNormal0=(0,s.vt)(),this.faceNormal1=(0,s.vt)(),this.componentIndex=0,this.cosAngle=0}},O=(0,s.vt)(),E=(0,s.vt)(),m=(0,s.vt)(),A=(0,s.vt)(),N=(0,s.vt)(),I=(0,o.kU)(4),g=Math.cos(I),p=(0,o.kU)(35),R=Math.cos(p)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2593],{9093:(t,e,r)=>{function s(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function n(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}r.d(e,{o8:()=>n,vt:()=>s,zK:()=>a});const a=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:a,clone:n,create:s,fromValues:function(t,e,r,s,n,a,i,o,u,l,c,p,d,h,y,f){return[t,e,r,s,n,a,i,o,u,l,c,p,d,h,y,f]}},Symbol.toStringTag,{value:"Module"}))},18251:(t,e,r)=>{r.d(e,{A:()=>c});var s=r(90237),n=r(69540),a=r(25482),i=r(10107),o=(r(44208),r(53966),r(87811),r(93223)),u=r(40608),l=r(51850);let c=class extends(n.A.ClonableMixin(a.A)){constructor(t){super(t),this.type="local",this.origin=(0,l.vt)()}};(0,s._)([(0,o.e)({local:"local"},{readOnly:!0})],c.prototype,"type",void 0),(0,s._)([(0,i.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],c.prototype,"origin",void 0),c=(0,s._)([(0,u.$)("esri.geometry.support.MeshLocalVertexSpace")],c)},24770:(t,e,r)=>{r.d(e,{$I:()=>m,AU:()=>h,g7:()=>f,i4:()=>c,ui:()=>p,up:()=>b,vt:()=>l,yo:()=>y});var s=r(34727),n=r(58083),a=r(67026),i=r(82534),o=r(38954),u=r(51850);function l(t=b){return[t[0],t[1],t[2],t[3]]}function c(t,e,r=l()){return(0,o.c)(r,t),r[3]=e,r}function p(t,e=l()){const r=(0,n.l)(M,t);return g(e,(0,s.KJ)((0,a.Xd)(e,r))),e}function d(t,e,r=l()){return(0,a.x8)(M,t,m(t)),(0,a.x8)(_,e,m(e)),(0,a.lw)(M,_,M),g(r,(0,s.KJ)((0,a.Xd)(r,M)))}function h(t,e,r,s=l()){return c(u.Cw,t,A),c(u.JP,e,S),c(u.Cb,r,q),d(A,S,A),d(A,q,s),s}function y(t){return t}function f(t){return t[3]}function m(t){return(0,s.kU)(t[3])}function g(t,e){return t[3]=e,t}const b=[0,0,1,0],M=(0,i.vt)(),_=(0,i.vt)(),A=(l(),l()),S=l(),q=l()},27615:(t,e,r)=>{r.d(e,{CK:()=>u,Hq:()=>o,MW:()=>l,TE:()=>c,yJ:()=>p});var s=r(38954),n=r(86738),a=r(95696),i=r(18251);function o(t){return null!=t.origin}function u(t){return o(t.vertexSpace)}function l(t,e){if(!o(t))return null;const[r,s,a]=t.origin;return new n.A({x:r,y:s,z:a,spatialReference:e})}function c(t,e){const{x:r,y:s,z:n,spatialReference:o}=t,u=[r,s,n??0];return"local"===(e?.vertexSpace??function(t){return t.isGeographic||t.isWebMercator?"local":"georeferenced"}(o))?new i.A({origin:u}):new a.A({origin:u})}function p(t,e){return t.type===e.type&&(t.origin===e.origin||null!=t.origin&&null!=e.origin&&(0,s.q)(t.origin,e.origin))}},28132:(t,e,r)=>{r.d(e,{A:()=>C});var s=r(90237),n=r(69622),a=r(49186),i=r(44208),o=r(74887),u=r(84952),l=r(10107),c=(r(53966),r(87811),r(40608)),p=r(21325),d=r(20557),h=r(27733),y=r(2272),f=r(20615),m=r(5443),g=r(80893),b=r(61956),M=r(78286),_=r(99199),A=r(97768),S=r(62815),q=r(90708);function v(t,e){return e}function x(t,e,r,s){switch(r){case 0:return R(t,e+s,0);case 1:return"lowerLeft"===t.originPosition?R(t,e+s,1):function({translate:t,scale:e},r,s){return t[s]-r*e[s]}(t,e+s,1)}}function w(t,e,r,s){return 2===r?R(t,e,2):x(t,e,r,s)}function F(t,e,r,s){return 2===r?0===e?0:R(t,e,3):x(t,e,r,s)}function I(t,e,r,s){return 3===r?0===e?0:R(t,e,3):w(t,e,r,s)}function R({translate:t,scale:e},r,s){return t[s]+r*e[s]}class O{constructor(t){this._options=t,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=v,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._mValueOffset=null,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(t){if(this._options.applyTransform&&(t.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!t.hasZ)return;const e=(0,S.N)(t.geometryType,this._options.sourceSpatialReference,t.spatialReference);if(null!=e)for(const r of t.features)e(r.geometry)}createSpatialReference(){return{}}addField(t,e){const r=t.fields;(0,A.Lw)(r),r.push(e);const s=r.map(t=>t.name);this._attributesConstructor=function(){for(const t of s)this[t]=null}}addFeature(t,e){t.features.push(e)}prepareFeatures(t){switch(this._transform=t.transform,this._options.applyTransform&&t.transform&&(this._applyTransform=this._deriveApplyTransform(t)),this._mValueOffset=null,this._vertexDimension=2,t.hasZ&&this._vertexDimension++,t.hasM&&(this._mValueOffset=this._vertexDimension,this._vertexDimension++),t.geometryType){case"esriGeometryPoint":this.addCoordinate=(t,e,r)=>this.addCoordinatePoint(t,e,r),this.createGeometry=t=>this.createPointGeometry(t);break;case"esriGeometryPolygon":this.addCoordinate=(t,e,r)=>this._addCoordinatePolygon(t,e,r),this.createGeometry=t=>this._createPolygonGeometry(t);break;case"esriGeometryPolyline":this.addCoordinate=(t,e,r)=>this._addCoordinatePolyline(t,e,r),this.createGeometry=t=>this._createPolylineGeometry(t);break;case"esriGeometryMultipoint":this.addCoordinate=(t,e,r)=>this._addCoordinateMultipoint(t,e,r),this.createGeometry=t=>this._createMultipointGeometry(t)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(t,e,r){0===this._lengths.length&&(this._toAddInCurrentPath=e),this._lengths.push(e)}addQueryGeometry(t,e){const{queryGeometry:r,queryGeometryType:s}=e,n=this._transform?(0,q.Ch)(r.clone(),r,!1,!1,this._transform):r.clone(),a=(0,q.zv)(n,s,!1,!1);t.queryGeometryType=s,t.queryGeometry={...a}}createPointGeometry(t){const e={x:0,y:0,spatialReference:t.spatialReference};return t.hasZ&&(e.z=0),t.hasM&&(e.m=0),e}addCoordinatePoint(t,e,r){const s=this._transform;switch(e=this._applyTransform(s,e,r,0),r){case 0:t.x=e;break;case 1:t.y=e;break;case 2:"z"in t?t.z=e:t.m=e;break;case 3:t.m=e}}_transformPathLikeValue(t,e){let r=0;e<=1&&(r=this._previousCoordinate[e],this._previousCoordinate[e]+=t);const s=this._transform;return null!==this._mValueOffset&&0===t&&e>0&&!(e%this._mValueOffset)?0:this._applyTransform(s,t,e,r)}_addCoordinatePolyline(t,e,r){this._dehydratedAddPointsCoordinate(t.paths,e,r)}_addCoordinatePolygon(t,e,r){this._dehydratedAddPointsCoordinate(t.rings,e,r)}_addCoordinateMultipoint(t,e,r){0===r&&t.points.push([]);const s=this._transformPathLikeValue(e,r);t.points[t.points.length-1].push(s)}_createPolygonGeometry(t){return{rings:[[]],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_createPolylineGeometry(t){return{paths:[[]],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_createMultipointGeometry(t){return{points:[],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_dehydratedAddPointsCoordinate(t,e,r){0===r&&0===this._toAddInCurrentPath--&&(t.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const s=this._transformPathLikeValue(e,r),n=t[t.length-1];0===r&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),n.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=s}_deriveApplyTransform(t){const{hasZ:e,hasM:r}=t;return e&&r?I:e?w:r?F:x}}var T=r(22671);let C=class extends n.A{constructor(t){super(t),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.queryAttachmentsSupported=!1,this.sourceSpatialReference=null,this.uniqueIdFields=null,this.url=null}get parsedUrl(){return(0,u.An)(this.url)}async execute(t,e){const r=await this.executeJSON(t,e);return this.featureSetFromJSON(t,r,e)}async executeJSON(t,e){const r=this._normalizeQuery(t),s=null!=t.outStatistics?.[0],n=(0,i.A)("featurelayer-pbf-statistics"),a=(!s||n)&&!0!==t.returnTrueCurves;let o;if(this.pbfSupported&&a)try{o=await async function(t,e,r,s){const n=(0,y.Dl)(t),a={...r},i=b.A.from(e),o=!i.quantizationParameters,{data:u}=await(0,g.IJ)(n,i,new O({sourceSpatialReference:i.sourceSpatialReference,applyTransform:o}),a,s);return u}(this.url,r,e,{uniqueIdFields:this.uniqueIdFields})}catch(t){if("query:parsing-pbf"!==t.name)throw t;this.pbfSupported=!1}return this.pbfSupported&&a||(o=await(0,_.e)(this.url,r,e,{uniqueIdFields:this.uniqueIdFields})),this._normalizeFields(o.fields),o}async featureSetFromJSON(t,e,s){if(!this._queryIs3DObjectFormat(t)||null==this.infoFor3D||!e.features)return T.A.fromJSON(e);const{meshFeatureSetFromJSON:n}=await(0,o.qr)(Promise.all([r.e(3030),r.e(36),r.e(6112)]).then(r.bind(r,40050)),s);return n(t,this.infoFor3D,e)}executeForCount(t,e){return(0,f.I)(this.url,this._normalizeQuery(t),e,{uniqueIdFields:this.uniqueIdFields})}executeForExtent(t,e){return async function(t,e,r){const s=(0,y.Dl)(t),n=await(0,g.Jf)(s,b.A.from(e),{...r}),a=n.data.extent;return!a||isNaN(a.xmin)||isNaN(a.ymin)||isNaN(a.xmax)||isNaN(a.ymax)?{count:n.data.count,extent:null}:{count:n.data.count,extent:m.A.fromJSON(a)}}(this.url,this._normalizeQuery(t),e)}executeForIds(t,e){return(0,M.V)(this.url,this._normalizeQuery(t),e,{uniqueIdFields:this.uniqueIdFields})}async executeRelationshipQuery(t,e){const[{default:s},{executeRelationshipQuery:n}]=await(0,o.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(5257).then(r.bind(r,15257))]),e);return t=s.from(t),(this.gdbVersion||this.dynamicDataSource)&&((t=t.clone()).gdbVersion=t.gdbVersion||this.gdbVersion,t.dynamicDataSource=t.dynamicDataSource||this.dynamicDataSource),n(this.url,t,e)}async executeRelationshipQueryForCount(t,e){const[{default:s},{executeRelationshipQueryForCount:n}]=await(0,o.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(5257).then(r.bind(r,15257))]),e);return t=s.from(t),(this.gdbVersion||this.dynamicDataSource)&&((t=t.clone()).gdbVersion=t.gdbVersion||this.gdbVersion,t.dynamicDataSource=t.dynamicDataSource||this.dynamicDataSource),n(this.url,t,e)}async executeAttachmentQuery(t,e){const{executeAttachmentQuery:s,fetchAttachments:n,processAttachmentQueryResult:a}=await(0,o.qr)(r.e(9239).then(r.bind(r,9239)),e),i=(0,y.Dl)(this.url);return a(i,await(this.queryAttachmentsSupported?s(i,t,e):n(i,t,e)))}async executeAttributeBinsQuery(t,e){const{executeAttributeBinsQuery:s}=await(0,o.qr)(Promise.all([r.e(4575),r.e(3103)]).then(r.bind(r,33103)),e);return s(this.parsedUrl,t,e)}async executeTopFeaturesQuery(t,e){const{executeTopFeaturesQuery:s}=await(0,o.qr)(r.e(1273).then(r.bind(r,11273)),e);return s(this.parsedUrl,t,this.sourceSpatialReference,e)}async executeForTopIds(t,e){const{executeForTopIds:s}=await(0,o.qr)(r.e(1277).then(r.bind(r,21277)),e);return s(this.parsedUrl,t,e)}async executeForTopExtents(t,e){const{executeForTopExtents:s}=await(0,o.qr)(r.e(8018).then(r.bind(r,8018)),e);return s(this.parsedUrl,t,e)}async executeForTopCount(t,e){const{executeForTopCount:s}=await(0,o.qr)(r.e(980).then(r.bind(r,10980)),e);return s(this.parsedUrl,t,e)}_normalizeQuery(t){let e=b.A.from(t);e.sourceSpatialReference=e.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(e=e===t?e.clone():e,e.gdbVersion=t.gdbVersion||this.gdbVersion,e.dynamicDataSource=t.dynamicDataSource?h.L.from(t.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:r}=this;if(null!=r&&this._queryIs3DObjectFormat(t)){if(e=e===t?e.clone():e,e.formatOf3DObjects=(0,d.Hz)(r),!e.formatOf3DObjects)throw new a.A("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if(e.outSpatialReference&&!(0,p.aI)(e.outSpatialReference,this.sourceSpatialReference))throw new a.A("query:unsupported-out-spatial-reference","3D object feature services do not support projection of geometries");if(null==e.outFields||!e.outFields.includes("*")){e=e===t?e.clone():e,null==e.outFields&&(e.outFields=[]);const{originX:s,originY:n,originZ:a,translationX:i,translationY:o,translationZ:u,scaleX:l,scaleY:c,scaleZ:p,rotationX:d,rotationY:h,rotationZ:y,rotationDeg:f}=r.transformFieldRoles;e.outFields.push(s,n,a,i,o,u,l,c,p,d,h,y,f)}}return e}_normalizeFields(t){if(null!=this.fieldsIndex&&null!=t)for(const e of t){const t=this.fieldsIndex.get(e.name);t&&Object.assign(e,t.toJSON())}}_queryIs3DObjectFormat(t){return null!=this.infoFor3D&&!0===t.returnGeometry&&"xyFootprint"!==t.multipatchOption&&!t.outStatistics}};(0,s._)([(0,l.MZ)({type:h.L})],C.prototype,"dynamicDataSource",void 0),(0,s._)([(0,l.MZ)()],C.prototype,"fieldsIndex",void 0),(0,s._)([(0,l.MZ)()],C.prototype,"gdbVersion",void 0),(0,s._)([(0,l.MZ)()],C.prototype,"infoFor3D",void 0),(0,s._)([(0,l.MZ)({readOnly:!0})],C.prototype,"parsedUrl",null),(0,s._)([(0,l.MZ)()],C.prototype,"pbfSupported",void 0),(0,s._)([(0,l.MZ)()],C.prototype,"queryAttachmentsSupported",void 0),(0,s._)([(0,l.MZ)()],C.prototype,"sourceSpatialReference",void 0),(0,s._)([(0,l.MZ)()],C.prototype,"uniqueIdFields",void 0),(0,s._)([(0,l.MZ)({type:String})],C.prototype,"url",void 0),C=(0,s._)([(0,c.$)("esri.layers.graphics.sources.support.QueryTask")],C)},29242:(t,e,r)=>{function s(){return[1,0,0,0,1,0,0,0,1]}function n(t,e,r,s,n,a,i,o,u){return[t,e,r,s,n,a,i,o,u]}r.d(e,{fA:()=>n,vt:()=>s,zK:()=>a});const a=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:a,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:s,fromValues:n},Symbol.toStringTag,{value:"Module"}))},38954:(t,e,r)=>{r.d(e,{A:()=>y,B:()=>h,C:()=>c,D:()=>p,E:()=>E,F:()=>j,H:()=>Z,a:()=>D,b:()=>g,c:()=>i,d:()=>l,e:()=>v,f:()=>u,g:()=>m,h:()=>x,i:()=>o,j:()=>b,k:()=>_,l:()=>a,m:()=>w,n:()=>q,o:()=>I,q:()=>C,r:()=>S,s:()=>M,t:()=>F,u:()=>A,v:()=>R,w:()=>d,x:()=>Q,y:()=>G,z:()=>f});var s=r(51850),n=r(34304);function a(t){const e=t[0],r=t[1],s=t[2];return Math.sqrt(e*e+r*r+s*s)}function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function o(t,e,r,s){return t[0]=e,t[1]=r,t[2]=s,t}function u(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t}function l(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}function c(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t}function p(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}function d(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function h(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function y(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t}function f(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t}function m(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}function g(t,e,r,s){return t[0]=e[0]+r[0]*s,t[1]=e[1]+r[1]*s,t[2]=e[2]+r[2]*s,t}function b(t,e){const r=e[0]-t[0],s=e[1]-t[1],n=e[2]-t[2];return Math.sqrt(r*r+s*s+n*n)}function M(t,e){const r=e[0]-t[0],s=e[1]-t[1],n=e[2]-t[2];return r*r+s*s+n*n}function _(t){const e=t[0],r=t[1],s=t[2];return e*e+r*r+s*s}function A(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function S(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function q(t,e){const r=e[0],s=e[1],n=e[2];let a=r*r+s*s+n*n;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}function v(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function x(t,e,r){const s=e[0],n=e[1],a=e[2],i=r[0],o=r[1],u=r[2];return t[0]=n*u-a*o,t[1]=a*i-s*u,t[2]=s*o-n*i,t}function w(t,e,r,s){const n=e[0],a=e[1],i=e[2];return t[0]=n+s*(r[0]-n),t[1]=a+s*(r[1]-a),t[2]=i+s*(r[2]-i),t}function F(t,e,r){const s=e[0],n=e[1],a=e[2];return t[0]=r[0]*s+r[4]*n+r[8]*a+r[12],t[1]=r[1]*s+r[5]*n+r[9]*a+r[13],t[2]=r[2]*s+r[6]*n+r[10]*a+r[14],t}function I(t,e,r){const s=e[0],n=e[1],a=e[2];return t[0]=s*r[0]+n*r[3]+a*r[6],t[1]=s*r[1]+n*r[4]+a*r[7],t[2]=s*r[2]+n*r[5]+a*r[8],t}function R(t,e,r){const s=r[0],n=r[1],a=r[2],i=r[3],o=e[0],u=e[1],l=e[2],c=n*l-a*u,p=a*o-s*l,d=s*u-n*o,h=n*d-a*p,y=a*c-s*d,f=s*p-n*c,m=2*i;return t[0]=o+c*m+2*h,t[1]=u+p*m+2*y,t[2]=l+d*m+2*f,t}const O=(0,s.vt)(),T=(0,s.vt)();function C(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function E(t,e,r){const s=r[0]-e[0],n=r[1]-e[1],a=r[2]-e[2];let i=s*s+n*n+a*a;return i>0?(i=1/Math.sqrt(i),t[0]=s*i,t[1]=n*i,t[2]=a*i,t):(t[0]=0,t[1]=0,t[2]=0,t)}const D=l,P=c,N=p,j=b,Q=M,Z=a,G=_;Object.freeze(Object.defineProperty({__proto__:null,abs:d,add:u,angle:function(t,e){q(O,t),q(T,e);const r=v(O,T);return r>1?0:r<-1?Math.PI:Math.acos(r)},bezier:function(t,e,r,s,n,a){const i=1-a,o=i*i,u=a*a,l=o*i,c=3*a*o,p=3*u*i,d=u*a;return t[0]=e[0]*l+r[0]*c+s[0]*p+n[0]*d,t[1]=e[1]*l+r[1]*c+s[1]*p+n[1]*d,t[2]=e[2]*l+r[2]*c+s[2]*p+n[2]*d,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,r=1){return t[0]=Math.min(Math.max(t[0],e),r),t[1]=Math.min(Math.max(t[1],e),r),t[2]=Math.min(Math.max(t[2],e),r),t},copy:i,cross:x,crossAndNormalize:function(t,e,r){const s=e[0],n=e[1],a=e[2],i=r[0],o=r[1],u=r[2],l=n*u-a*o,c=a*i-s*u,p=s*o-n*i,d=Math.sqrt(l*l+c*c+p*p);return t[0]=l/d,t[1]=c/d,t[2]=p/d,t},direction:E,dist:j,distance:b,div:N,divide:p,dot:v,equals:function(t,e){if(t===e)return!0;const r=t[0],s=t[1],a=t[2],i=e[0],o=e[1],u=e[2],l=(0,n.FD)();return Math.abs(r-i)<=l*Math.max(1,Math.abs(r),Math.abs(i))&&Math.abs(s-o)<=l*Math.max(1,Math.abs(s),Math.abs(o))&&Math.abs(a-u)<=l*Math.max(1,Math.abs(a),Math.abs(u))},exactEquals:C,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,r,s,n,a){const i=a*a,o=i*(2*a-3)+1,u=i*(a-2)+a,l=i*(a-1),c=i*(3-2*a);return t[0]=e[0]*o+r[0]*u+s[0]*l+n[0]*c,t[1]=e[1]*o+r[1]*u+s[1]*l+n[1]*c,t[2]=e[2]*o+r[2]*u+s[2]*l+n[2]*c,t},inverse:S,len:Z,length:a,lerp:w,max:f,min:y,mul:P,multiply:c,negate:A,normalize:q,random:function(t,e=1){const r=n.Ov,s=2*r()*Math.PI,a=2*r()-1,i=Math.sqrt(1-a*a)*e;return t[0]=Math.cos(s)*i,t[1]=Math.sin(s)*i,t[2]=a*e,t},rotateX:function(t,e,r,s){const n=[],a=[];return n[0]=e[0]-r[0],n[1]=e[1]-r[1],n[2]=e[2]-r[2],a[0]=n[0],a[1]=n[1]*Math.cos(s)-n[2]*Math.sin(s),a[2]=n[1]*Math.sin(s)+n[2]*Math.cos(s),t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},rotateY:function(t,e,r,s){const n=[],a=[];return n[0]=e[0]-r[0],n[1]=e[1]-r[1],n[2]=e[2]-r[2],a[0]=n[2]*Math.sin(s)+n[0]*Math.cos(s),a[1]=n[1],a[2]=n[2]*Math.cos(s)-n[0]*Math.sin(s),t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},rotateZ:function(t,e,r,s){const n=[],a=[];return n[0]=e[0]-r[0],n[1]=e[1]-r[1],n[2]=e[2]-r[2],a[0]=n[0]*Math.cos(s)-n[1]*Math.sin(s),a[1]=n[0]*Math.sin(s)+n[1]*Math.cos(s),a[2]=n[2],t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:m,scaleAndAdd:g,set:o,sign:h,sqrDist:Q,sqrLen:G,squaredDistance:M,squaredLength:_,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:D,subtract:l,transformMat3:I,transformMat4:F,transformQuat:R},Symbol.toStringTag,{value:"Module"}))},63579:(t,e,r)=>{r.d(e,{Bq:()=>u,Qp:()=>o,WN:()=>m,dK:()=>g,eN:()=>h,fH:()=>f,in:()=>y,yr:()=>l});var s=r(78888),n=r(4576),a=(r(44208),r(74887)),i=r(20557);class o{constructor(t,e,r){this.assetName=t,this.assetMimeType=e,this.parts=r}equals(t){return this===t||this.assetName===t.assetName&&this.assetMimeType===t.assetMimeType&&(0,n.aI)(this.parts,t.parts,(t,e)=>t.equals(e))}isOnService(t){return this.parts.every(e=>e.isOnService(t))}makeHash(){let t="";for(const e of this.parts)t+=e.partHash;return t}async toBlob(t){const{parts:e}=this;if(1===e.length)return e[0].toBlob(t);const r=await Promise.all(e.map(e=>e.toBlob(t)));return(0,a.Te)(t),new Blob(r)}}class u{constructor(t,e){this.partUrl=t,this.partHash=e}equals(t){return this===t||this.partUrl===t.partUrl&&this.partHash===t.partHash}isOnService(t){return this.partUrl.startsWith(`${t.path}/assets/`)}async toBlob(t){const{data:e}=await(0,s.A)(this.partUrl,{responseType:"blob"});return(0,a.Te)(t),e}}function l(t){return function(t){switch(t?.type){case"client":return Array.isArray(t.files)?t.files.some(d):d(t.files);case"service":return t.assets.some(d);case"loadable":return!0;default:return!1}}(t?.source)}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,p=/\.(gltf|glb)/i;function d(t){if(t instanceof File){const{type:e,name:r}=t;return c.test(e)||p.test(r)}return c.test(t.assetMimeType)||p.test(t.assetName)}function h(t,e){if(!t)return!1;const{source:r}=t;return function(t,e){return"service"===t.type&&t.assets.every(t=>t.isOnService(e))}(r,e)}function y(t,e){if(t===e)return!0;const{source:r}=t,{source:s}=e;if(r===s)return!0;if("service"===r.type&&"service"===s.type){if(r.assets.length!==s.assets.length)return!1;const t=(t,e)=>t.assetName<e.assetName?-1:t.assetName>e.assetName?1:0,e=[...r.assets].sort(t),n=[...s.assets].sort(t);for(let t=0;t<e.length;++t)if(!e[t].equals(n[t]))return!1;return!0}return!1}function f(t,e){return t instanceof File?(0,i.rq)(t,e):(0,i.z$)(t.assetMimeType,t.assetName,e)}function m(t){switch(t.type){case"client":return Array.isArray(t.files)?t.files:[t.files];case"service":return t.assets;case"loadable":return}}function g(t){return!!t.original}},64714:(t,e,r)=>{r.d(e,{F0:()=>o,Vx:()=>c,e2:()=>d,f:()=>h});var s=r(44208),n=r(4718),a=r(99352),i=r(93470);function o(t){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===t||"esriGeometryMultipoint"===t?i.Cb:"esriGeometryPolyline"===t?i.yM:i.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function c(t,e){if((0,s.A)("esri-csp-restrictions"))return()=>({[e]:null,...t});try{let r=`this${p(e)} = null;`;for(const e in t)r+=`this${p(e)} = ${JSON.stringify(t[e])};`;const s=new Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[e]:null,...t})}}function p(t){return u.test(t)?`.${t}`:`["${t}"]`}function d(t={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(t)}}]}function h(t,e){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:e,supportsDelete:e,supportsEditing:e,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:e,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:a.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:a.P,editing:{supportsGeometryUpdate:e,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},67026:(t,e,r)=>{r.d(e,{A6:()=>f,Xd:()=>c,Xr:()=>h,hZ:()=>g,lw:()=>p,t2:()=>I,x8:()=>l});var s=r(29242),n=r(82534),a=r(51850),i=r(34304),o=r(38954),u=r(87317);function l(t,e,r){r*=.5;const s=Math.sin(r);return t[0]=s*e[0],t[1]=s*e[1],t[2]=s*e[2],t[3]=Math.cos(r),t}function c(t,e){const r=2*Math.acos(e[3]),s=Math.sin(r/2);return s>(0,i.FD)()?(t[0]=e[0]/s,t[1]=e[1]/s,t[2]=e[2]/s):(t[0]=1,t[1]=0,t[2]=0),r}function p(t,e,r){const s=e[0],n=e[1],a=e[2],i=e[3],o=r[0],u=r[1],l=r[2],c=r[3];return t[0]=s*c+i*o+n*l-a*u,t[1]=n*c+i*u+a*o-s*l,t[2]=a*c+i*l+s*u-n*o,t[3]=i*c-s*o-n*u-a*l,t}function d(t,e,r,s){const n=e[0],a=e[1],o=e[2],u=e[3];let l,c,p,d,h,y=r[0],f=r[1],m=r[2],g=r[3];return c=n*y+a*f+o*m+u*g,c<0&&(c=-c,y=-y,f=-f,m=-m,g=-g),1-c>(0,i.FD)()?(l=Math.acos(c),p=Math.sin(l),d=Math.sin((1-s)*l)/p,h=Math.sin(s*l)/p):(d=1-s,h=s),t[0]=d*n+h*y,t[1]=d*a+h*f,t[2]=d*o+h*m,t[3]=d*u+h*g,t}function h(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function y(t,e){const r=e[0]+e[4]+e[8];let s;if(r>0)s=Math.sqrt(r+1),t[3]=.5*s,s=.5/s,t[0]=(e[5]-e[7])*s,t[1]=(e[6]-e[2])*s,t[2]=(e[1]-e[3])*s;else{let r=0;e[4]>e[0]&&(r=1),e[8]>e[3*r+r]&&(r=2);const n=(r+1)%3,a=(r+2)%3;s=Math.sqrt(e[3*r+r]-e[3*n+n]-e[3*a+a]+1),t[r]=.5*s,s=.5/s,t[3]=(e[3*n+a]-e[3*a+n])*s,t[n]=(e[3*n+r]+e[3*r+n])*s,t[a]=(e[3*a+r]+e[3*r+a])*s}return t}function f(t,e,r,s){const n=.5*Math.PI/180;e*=n,r*=n,s*=n;const a=Math.sin(e),i=Math.cos(e),o=Math.sin(r),u=Math.cos(r),l=Math.sin(s),c=Math.cos(s);return t[0]=a*u*c-i*o*l,t[1]=i*o*c+a*u*l,t[2]=i*u*l-a*o*c,t[3]=i*u*c+a*o*l,t}const m=u.c,g=u.s,b=u.g,M=p,_=u.d,A=u.h,S=u.l,q=u.j,v=q,x=u.b,w=x,F=u.n,I=u.a,R=u.e,O=(0,a.vt)(),T=(0,a.fA)(1,0,0),C=(0,a.fA)(0,1,0),E=(0,n.vt)(),D=(0,n.vt)(),P=(0,s.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:b,calculateW:function(t,e){const r=e[0],s=e[1],n=e[2];return t[0]=r,t[1]=s,t[2]=n,t[3]=Math.sqrt(Math.abs(1-r*r-s*s-n*n)),t},conjugate:h,copy:m,dot:A,equals:R,exactEquals:I,fromEuler:f,fromMat3:y,getAxisAngle:c,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,e){const r=e[0],s=e[1],n=e[2],a=e[3],i=r*r+s*s+n*n+a*a,o=i?1/i:0;return t[0]=-r*o,t[1]=-s*o,t[2]=-n*o,t[3]=a*o,t},len:v,length:q,lerp:S,mul:M,multiply:p,normalize:F,random:function(t){const e=i.Ov,r=e(),s=e(),n=e(),a=Math.sqrt(1-r),o=Math.sqrt(r);return t[0]=a*Math.sin(2*Math.PI*s),t[1]=a*Math.cos(2*Math.PI*s),t[2]=o*Math.sin(2*Math.PI*n),t[3]=o*Math.cos(2*Math.PI*n),t},rotateX:function(t,e,r){r*=.5;const s=e[0],n=e[1],a=e[2],i=e[3],o=Math.sin(r),u=Math.cos(r);return t[0]=s*u+i*o,t[1]=n*u+a*o,t[2]=a*u-n*o,t[3]=i*u-s*o,t},rotateY:function(t,e,r){r*=.5;const s=e[0],n=e[1],a=e[2],i=e[3],o=Math.sin(r),u=Math.cos(r);return t[0]=s*u-a*o,t[1]=n*u+i*o,t[2]=a*u+s*o,t[3]=i*u-n*o,t},rotateZ:function(t,e,r){r*=.5;const s=e[0],n=e[1],a=e[2],i=e[3],o=Math.sin(r),u=Math.cos(r);return t[0]=s*u+n*o,t[1]=n*u-s*o,t[2]=a*u+i*o,t[3]=i*u-a*o,t},rotationTo:function(t,e,r){const s=(0,o.e)(e,r);return s<-.999999?((0,o.h)(O,T,e),(0,o.H)(O)<1e-6&&(0,o.h)(O,C,e),(0,o.n)(O,O),l(t,O,Math.PI),t):s>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,o.h)(O,e,r),t[0]=O[0],t[1]=O[1],t[2]=O[2],t[3]=1+s,F(t,t))},scale:_,set:g,setAxes:function(t,e,r,s){const n=P;return n[0]=r[0],n[3]=r[1],n[6]=r[2],n[1]=s[0],n[4]=s[1],n[7]=s[2],n[2]=-e[0],n[5]=-e[1],n[8]=-e[2],F(t,y(t,n))},setAxisAngle:l,slerp:d,sqlerp:function(t,e,r,s,n,a){return d(E,e,n,a),d(D,r,s,a),d(t,E,D,2*a*(1-a)),t},sqrLen:w,squaredLength:x,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},72593:(t,e,r)=>{r.r(e),r.d(e,{default:()=>H});var s=r(90237),n=r(92602),a=r(78888),i=r(4576),o=r(49186),u=r(44208),l=r(66552),c=r(92474),p=r(53966),d=r(93637),h=r(74887),y=r(36708),f=r(84952),m=r(13069),g=r(10107),b=r(40608),M=r(5443),_=r(16930),A=r(95696),S=r(27615),q=r(63579),v=r(52106),x=r(83047),w=r(98988),F=r(65864),I=r(73836),R=r(21325),O=r(78628);async function T(t,e,r){const{geometry:s}=e,n={...e.attributes};if(null!=r&&"mesh"===s?.type){const{transformFieldRoles:e}=r,{origin:a,spatialReference:i,vertexSpace:o}=s,u=s.transform??new I.A,l="local"===o.type,c=t.spatialReference,p=c.isGeographic,d=(0,R.aI)(c,i),h=(0,w.isEqualBaseGCS)(i,c)&&(0,w.canProjectWithoutEngine)(i,c);if(!(l&&p&&h||!l&&!p&&d))return null;const y=(0,w.projectWithoutEngine)(a,i,c);if(null==y)return null;if(n[e.originX]=y.x,n[e.originY]=y.y,n[e.originZ]=y.z??0,null!=u){const{translation:t,scale:r,rotation:s}=u,a=l?1:(0,x.KX)(i)/(0,x.KX)(c);n[e.translationX]=t[0]*a,n[e.translationY]=t[2]*a,n[e.translationZ]=-t[1]*a,n[e.scaleX]=r[0],n[e.scaleY]=r[2],n[e.scaleZ]=r[1],n[e.rotationX]=s[0],n[e.rotationY]=s[2],n[e.rotationZ]=-s[1],n[e.rotationDeg]=s[3]}return{attributes:n}}return null==s?{attributes:n}:"mesh"===s.type||"extent"===s.type?null:{geometry:s.toJSON(),attributes:n}}async function C(t,e){const r=await Promise.all((e.addAttachments??[]).map(e=>E(t,e))),s=await Promise.all((e.updateAttachments??[]).map(e=>E(t,e))),n=e.deleteAttachments??[];return r.length||s.length||n.length?{adds:r,updates:s,deletes:[...n]}:null}async function E(t,e){const{feature:r,attachment:s}=e,{globalId:n,name:a,contentType:i,data:o,uploadId:u}=s,l={globalId:n};if(r&&("attributes"in r?l.parentGlobalId=r.attributes?.[t.globalIdField]:r.globalId&&(l.parentGlobalId=r.globalId)),u)l.uploadId=u;else if(o){const t=await(0,f._0)(o);t&&(l.contentType=t.mediaType,l.data=t.data),o instanceof File&&(l.name=o.name)}return a&&(l.name=a),i&&(l.contentType=i),l}function D(t){const e=!0===t.success?null:t.error||{code:void 0,description:"Feature edit failed"};return{objectId:t.objectId,globalId:t.globalId,error:e?new o.A("feature-layer-source:edit-failure",e.description,{code:e.code}):null}}function P(t,e){return new v.A({attributes:t.attributes,geometry:(0,F.rS)({...t.geometry,spatialReference:e})})}function N(t,e){return{adds:t?.adds?.map(t=>P(t,e))||[],updates:t?.updates?.map(t=>({original:P(t[0],e),current:P(t[1],e)}))||[],deletes:t?.deletes?.map(t=>P(t,e))||[],spatialReference:e}}var j=r(64714),Q=r(28132),Z=r(60694),G=r(15426),J=r(20557),U=r(99199),k=r(96520),V=r(61956),z=r(64272),B=r(20816);const L=new l.J({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),$=new l.J({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let H=class extends c.A{constructor(t){super(t),this.type="feature-layer",this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),this.refresh=(0,h.sg)(async()=>{await this.load();const t=this.sourceJSON.editingInfo?.lastEditDate;if(null==t)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const e=t!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:e,updates:e?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}}),this._ongoingAssetUploads=new Map}load(t){const e=this.layer.sourceJSON,r=this._fetchService(e,{...t}).then(()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,t)).then(()=>this._ensureLatestMetadata(t));return this.addResolvingPromise(r),Promise.resolve(this)}initialize(){this.addHandles([(0,y.wB)(()=>{const t=this.layer;return t&&"lastEditsEventDate"in t?t.lastEditsEventDate:null},t=>this._handleLastEditsEventChange(t))])}destroy(){this._removeEditInterceptor()}get queryTask(){const{capabilities:t,parsedUrl:e,gdbVersion:r,spatialReference:s,fieldsIndex:n,uniqueIdFields:a}=this.layer,i="infoFor3D"in this.layer?this.layer.infoFor3D:null,o="dynamicDataSource"in this.layer?this.layer.dynamicDataSource:null,l=(0,u.A)("featurelayer-pbf")&&t?.query.supportsFormatPBF&&null==i;return new Q.A({dynamicDataSource:o,fieldsIndex:n,gdbVersion:r,infoFor3D:i,pbfSupported:l,queryAttachmentsSupported:t?.operations?.supportsQueryAttachments??!1,sourceSpatialReference:s,uniqueIdFields:a,url:e.path})}async addAttachment(t,e){await this.load();const{layer:r}=this;await(0,G.VA)(r,"editing");const s=t.attributes[r.objectIdField],n=r.parsedUrl.path+"/"+s+"/addAttachment",i=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(e,i.query);try{return D((await(0,a.A)(n,{body:o})).data.addAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(s,t)}}async updateAttachment(t,e,r){await this.load();const{layer:s}=this;await(0,G.VA)(s,"editing");const n=t.attributes[s.objectIdField],i=s.parsedUrl.path+"/"+n+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:e}}),u=this._getFormDataForAttachment(r,o.query);try{return D((await(0,a.A)(i,{body:u})).data.updateAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(n,t)}}async applyEdits(t,e){await this.load();const{layer:r}=this;await(0,G.VA)(r,"editing");const s="infoFor3D"in r?r.infoFor3D:null,n=null!=s,u=n||(e?.globalIdUsed??!1),l=n?await this._uploadMeshesAndGetAssetMapEditsJSON(t):null,c=t.addFeatures?.map(t=>T(this.layer,t,s))??[],p=(await Promise.all(c)).filter(i.Ru),d=t.updateFeatures?.map(t=>T(this.layer,t,s))??[],h=(await Promise.all(d)).filter(i.Ru),y=function(t,e,r){if(!e||0===e.length)return[];if(r&&(0,O.zp)(e))return e.map(t=>t.globalId);if((0,O.r3)(e))return e.map(t=>t.objectId);const s=r?t.globalIdField:t.objectIdField;return s?e.map(t=>t.getAttribute(s)):[]}(this.layer,t.deleteFeatures,u);(0,k.u)(p,h,r.spatialReference);const f=await C(this.layer,t),m=r.capabilities.editing.supportsAsyncApplyEdits&&n,g=e?.gdbVersion||r.gdbVersion,b={gdbVersion:g,rollbackOnFailure:e?.rollbackOnFailureEnabled,useGlobalIds:u,returnEditMoment:e?.returnEditMoment,usePreviousEditMoment:e?.usePreviousEditMoment,async:m};await(0,B.ZJ)(this.layer.url,g,!0);const M=(0,B.w5)(this.layer.url,g||null);if(await(0,B.We)(r.url,g,r.historicMoment))throw new o.A("feature-layer-source:historic-version","Editing a historic version is not allowed");e?.returnServiceEditsOption?(b.edits=JSON.stringify([{id:r.layerId,adds:p.length?p:null,updates:h.length?h:null,deletes:y.length?y:null,attachments:f,assetMaps:l}]),b.returnServiceEditsOption=L.toJSON(e?.returnServiceEditsOption),b.returnServiceEditsInSourceSR=e?.returnServiceEditsInSourceSR):(b.adds=p.length?JSON.stringify(p):null,b.updates=h.length?JSON.stringify(h):null,b.deletes=y.length?u?JSON.stringify(y):y.join(","):null,b.attachments=f&&JSON.stringify(f),b.assetMaps=null!=l?JSON.stringify(l):void 0);const _=this._getLayerRequestOptions({method:"post",query:b});M&&(_.authMode="immediate",_.query.returnEditMoment=!0,_.query.sessionId=B.TA);const A=e?.returnServiceEditsOption?r.url:r.parsedUrl.path;let S;try{S=m?await this._asyncApplyEdits(A+"/applyEdits",_):await(0,a.A)(A+"/applyEdits",_)}catch(t){if(!function(t){const e=t.details.raw,r=+e.code,s=+e.extendedCode;return 500===r&&(-2147217144===s||-2147467261===s)}(t))throw t;_.authMode="immediate",S=m?await this._asyncApplyEdits(A+"/applyEdits",_):await(0,a.A)(A+"/applyEdits",_)}return this._createEditsResult(S)}async deleteAttachments(t,e){await this.load();const{layer:r}=this;await(0,G.VA)(r,"editing");const s=t.attributes[r.objectIdField],n=r.parsedUrl.path+"/"+s+"/deleteAttachments";try{return(await(0,a.A)(n,this._getLayerRequestOptions({query:{attachmentIds:e.join(",")},method:"post"}))).data.deleteAttachmentResults.map(D)}catch(t){throw this._createAttachmentErrorResult(s,t)}}fetchRecomputedExtents(t={}){const e=t.signal;return this.load({signal:e}).then(async()=>{const e=this._getLayerRequestOptions({...t,query:{returnUpdates:!0}}),{layerId:r,url:s}=this.layer,{data:n}=await(0,a.A)(`${s}/${r}`,e),{id:i,extent:o,fullExtent:u,timeExtent:l}=n,c=o||u;return{id:i,fullExtent:c&&M.A.fromJSON(c),timeExtent:l&&z.T.fromJSON({start:l[0],end:l[1]})}})}async queryAttachments(t,e={}){await this.load();const r=this._getLayerRequestOptions(e);return this.queryTask.executeAttachmentQuery(t,r)}async queryFeatures(t,e){await this.load();const r=await this.queryTask.execute(t,{...e,query:this._createRequestQueryOptions(e)});if(t.outStatistics?.length&&r.features.length){const e=new Map;if(r.features.forEach(r=>{const s=r.attributes;t.outStatistics?.forEach(({outStatisticFieldName:t})=>{if(t){const r=t.toLowerCase();r&&r in s&&t!==r&&(s[t]=s[r],delete s[r],e.set(r,t))}})}),null!=r.fields)for(const t of r.fields){const r=e.get(t.name.toLowerCase());null!=r&&(t.name=r)}}return r}async queryFeaturesJSON(t,e){return await this.load(),this.queryTask.executeJSON(t,{...e,query:this._createRequestQueryOptions(e)})}async queryObjectIds(t,e){return await this.load(),this.queryTask.executeForIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryFeatureCount(t,e){return await this.load(),this.queryTask.executeForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryExtent(t,e){return await this.load(),this.queryTask.executeForExtent(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeatures(t,e){return await this.load(),this.queryTask.executeRelationshipQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeaturesCount(t,e){return await this.load(),this.queryTask.executeRelationshipQueryForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopFeatures(t,e){return await this.load(),this.queryTask.executeTopFeaturesQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryAttributeBins(t,e){return await this.load(),this.queryTask.executeAttributeBinsQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopObjectIds(t,e){return await this.load(),this.queryTask.executeForTopIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopExtents(t,e){return await this.load(),this.queryTask.executeForTopExtents(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopCount(t,e){return await this.load(),this.queryTask.executeForTopCount(t,{...e,query:this._createRequestQueryOptions(e)})}async fetchPublishingStatus(){if(!(0,Z.Wo)(this.layer.url))return"unavailable";const t=(0,f.fj)(this.layer.url,"status"),e=await(0,a.A)(t,{query:{f:"json"}});return $.fromJSON(e.data.status)}async uploadAssets(t,e){const{uploadAssets:s}=await r.e(1384).then(r.bind(r,31384));return s(t,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},e)}_handleLastEditsEventChange(t){const e=this.layer;if(null==t||!("capabilities"in e)||!("effectiveCapabilities"in e))return;if(e.capabilities?.operations?.supportsEditing||!e.effectiveCapabilities?.operations?.supportsEditing)return;const r=e.url;null!=r&&("layerId"in e&&(0,f.fj)(r,e.layerId.toString()),this._getOrCreateEditInterceptor(r).before=e=>{const r=e.requestOptions.method??"auto";if("auto"===r||"head"===r){const r=e.requestOptions.query??{};r._ts=t.getTime(),e.requestOptions.query=r}})}_getOrCreateEditInterceptor(t){return null==this._editInterceptor&&(this._editInterceptor={urls:t},n.A.request.internalInterceptors.push(this._editInterceptor)),this._editInterceptor}_removeEditInterceptor(){null!=this._editInterceptor&&((0,i.TF)(n.A.request.internalInterceptors,this._editInterceptor),this._editInterceptor=null)}async _asyncApplyEdits(t,e){const r=(await(0,a.A)(t,e)).data.statusUrl;for(;;){const t=(await(0,a.A)(r,{query:{f:"json"},responseType:"json"})).data;switch(t.status){case"Completed":return(0,a.A)(t.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new o.A("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new o.A("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await(0,h.Pl)(X)}}_createRequestQueryOptions(t){const e={...this.layer.customParameters,token:this.layer.apiKey,...t?.query};return this.layer.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),e}async _fetchService(t,e){if(!t){const r={};(0,u.A)("featurelayer-advanced-symbols")&&(r.returnAdvancedSymbols=!0),e?.cacheBust&&(r._ts=Date.now());const{data:s}=await(0,a.A)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:r,signal:e?.signal}));t=s}this.layer.applyPreferredHost(t),this.sourceJSON=await this._patchServiceJSON(t,e?.signal);const r=t.type;if(!this.supportedSourceTypes.has(r))throw new o.A("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}async _patchServiceJSON(t,e){if("Table"!==t.type&&t.geometryType&&!t?.drawingInfo?.renderer&&!t.defaultSymbol){const e=(0,j.F0)(t.geometryType).renderer;(0,d.sM)("drawingInfo.renderer",e,t)}if("esriGeometryMultiPatch"===t.geometryType&&t.infoFor3D&&(t.geometryType="mesh"),null==t.extent)try{const{data:r}=await(0,a.A)(this.layer.url,this._getLayerRequestOptions({signal:e}));r.spatialReference&&(t.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:r.spatialReference})}catch(t){(0,h.QP)(t)}return t}async _ensureLatestMetadata(t){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...t,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(t){const{addAssetFeatures:e}=t;if(!e?.length)return null;if(await this._areAllAssetsAlreadyMapped(e))return null;const s=t.addFeatures.filter(t=>t.geometry);if(e.length!==s.length+t.updateFeatures.length)throw new o.A("feature-layer-source:unsupported-mesh-edits","Mixing attribute only edits with mesh geometry edits is not currently supported");const n=new Array,a=new Map;for(const t of e){const{geometry:e}=t,{vertexSpace:s}=e;if((0,S.Hq)(s))n.push(e);else{const s=e.origin,{convertMeshVertexSpace:i}=await Promise.all([r.e(3030),r.e(4496)]).then(r.bind(r,28846)),o=await i(e,new A.A({origin:[s.x,s.y,s.z??0]}));a.set(o,e),t.geometry=o,n.push(o)}}await this.uploadAssets(n);for(const[t,e]of a)e.addExternalSources(t.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(e),updates:[],deletes:[]}}_getAssetMapEditsJSON(t){const e=new Array,r=this.layer.globalIdField,s=this.layer.parsedUrl;for(const n of t){const t=n.geometry,{metadata:a}=t,i=a.getExternalSourcesOnService(s),o=n.getAttribute(r);if(0===i.length){p.A.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:u}=i.find(q.dK)??i[0];for(const t of u.assets)1===t.parts.length?e.push({globalId:(0,m.yS)(),parentGlobalId:o,assetName:t.assetName,assetHash:t.parts[0].partHash,flags:[]}):p.A.getLogger(this).error(`Skipping asset ${t.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return e}_createEditsResult(t){const e=t.data,{layerId:r}=this.layer,s=[];let n=null;if(Array.isArray(e))for(const t of e)s.push({id:t.id,editedFeatures:t.editedFeatures}),t.id===r&&(n={addResults:t.addResults??[],updateResults:t.updateResults??[],deleteResults:t.deleteResults??[],attachments:t.attachments,editMoment:t.editMoment});else n=e;const a=function(t){const e=t?.assetMaps;if(e){for(const t of e.addResults)t.success||p.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`);for(const t of e.updateResults)t.success||p.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`)}const r=t?.attachments,s={addFeatureResults:t?.addResults?.map(D)??[],updateFeatureResults:t?.updateResults?.map(D)??[],deleteFeatureResults:t?.deleteResults?.map(D)??[],addAttachmentResults:r?.addResults?r.addResults.map(D):[],updateAttachmentResults:r?.updateResults?r.updateResults.map(D):[],deleteAttachmentResults:r?.deleteResults?r.deleteResults.map(D):[]};return t?.editMoment&&(s.editMoment=t.editMoment),s}(n);if(s.length>0){a.editedFeatureResults=[];for(const t of s){const{editedFeatures:e}=t,r=e?.spatialReference?new _.A(e.spatialReference):null;a.editedFeatureResults.push({layerId:t.id,editedFeatures:N(e,r)})}}return a}_createAttachmentErrorResult(t,e){const r=e.details.messages?.[0]||e.message,s=e.details.httpStatus||e.details.messageCode;return{objectId:t,globalId:null,error:new o.A("feature-layer-source:attachment-failure",r,{code:s})}}_getFormDataForAttachment(t,e){const r=t instanceof FormData?t:t&&t.elements?new FormData(t):null;if(r)for(const t in e){const s=e[t];null!=s&&(r.set?r.set(t,s):r.append(t,s))}return r}_getLayerRequestOptions(t={}){const{layer:e,layer:{parsedUrl:r,gdbVersion:s}}=this;return{...t,query:{gdbVersion:s,layer:"dynamicDataSource"in e&&e.dynamicDataSource?JSON.stringify({source:e.dynamicDataSource}):void 0,...r.query,f:"json",...this._createRequestQueryOptions(t)},responseType:"json"}}async _areAllAssetsAlreadyMapped(t){const{layer:e}=this,{globalIdField:r,parsedUrl:s}=e,n="infoFor3D"in e?e.infoFor3D:null;if(null==n||null==r)return!1;const a=(0,J.JZ)(n);if(null==a)return!1;const o=(0,f.fj)(s.path,`../${a.id}`),u=new Array;for(const e of t){if(!(e.geometry.metadata.getExternalSourcesOnService(s).length>0))return!1;u.push(e)}const l=u.map(t=>t.getAttribute(r)).filter(i.Ru);if(0===l.length)return!1;const{assetMapFieldRoles:{parentGlobalId:c,assetHash:p}}=n,d=new V.A({where:`${c} IN (${l.map(t=>`'${t}'`)})`,outFields:[p,c],returnGeometry:!1}),h=await(0,U.s)(o,d),{features:y}=h;return 0!==y.length&&!u.some(t=>{const e=t.getAttribute(r);if(!e)return!0;const{metadata:n}=t.geometry,a=y.filter(t=>t.getAttribute(c)===e);if(0===a.length)return!0;const i=a.map(t=>t.getAttribute(p));return n.getExternalSourcesOnService(s).flatMap(({source:t})=>t.assets.flatMap(t=>t.parts.map(t=>t.partHash))).some(t=>i.every(e=>t!==e))})}};(0,s._)([(0,g.MZ)()],H.prototype,"type",void 0),(0,s._)([(0,g.MZ)({constructOnly:!0})],H.prototype,"layer",void 0),(0,s._)([(0,g.MZ)({constructOnly:!0})],H.prototype,"supportedSourceTypes",void 0),(0,s._)([(0,g.MZ)({readOnly:!0})],H.prototype,"queryTask",null),H=(0,s._)([(0,b.$)("esri.layers.graphics.sources.FeatureLayerSource")],H);const X=1e3},73836:(t,e,r)=>{r.d(e,{A:()=>y});var s,n=r(90237),a=r(25482),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),u=r(58083),l=r(9093),c=r(67026),p=r(82534),d=r(51850),h=r(24770);let y=class extends a.A{static{s=this}constructor(t){super(t),this.translation=(0,d.vt)(),this.rotationAxis=(0,d.ci)(h.up),this.rotationAngle=0,this.scale=(0,d.fA)(1,1,1)}get rotation(){return(0,h.i4)(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=(0,d.o8)((0,h.yo)(t)),this.rotationAngle=(0,h.g7)(t)}get localMatrix(){const t=(0,l.vt)();return(0,c.x8)(f,(0,h.yo)(this.rotation),(0,h.$I)(this.rotation)),(0,u.o1)(t,f,this.translation,this.scale),t}get localMatrixInverse(){return(0,u.B8)((0,l.vt)(),this.localMatrix)}equals(t){return this===t||null!=t&&(0,u.t2)(this.localMatrix,t.localMatrix)}clone(){const t={translation:(0,d.o8)(this.translation),rotationAxis:(0,d.o8)(this.rotationAxis),rotationAngle:this.rotationAngle,scale:(0,d.o8)(this.scale)};return new s(t)}};(0,n._)([(0,i.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"translation",void 0),(0,n._)([(0,i.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"rotationAxis",void 0),(0,n._)([(0,i.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],y.prototype,"rotationAngle",void 0),(0,n._)([(0,i.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"scale",void 0),(0,n._)([(0,i.MZ)()],y.prototype,"rotation",null),(0,n._)([(0,i.MZ)()],y.prototype,"localMatrix",null),(0,n._)([(0,i.MZ)()],y.prototype,"localMatrixInverse",null),y=s=(0,n._)([(0,o.$)("esri.geometry.support.MeshTransform")],y);const f=(0,p.vt)()},82534:(t,e,r)=>{function s(){return[0,0,0,1]}function n(t){return[t[0],t[1],t[2],t[3]]}r.d(e,{o8:()=>n,vt:()=>s,zK:()=>a});const a=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:a,clone:n,create:s,fromValues:function(t,e,r,s){return[t,e,r,s]}},Symbol.toStringTag,{value:"Module"}))},95696:(t,e,r)=>{r.d(e,{A:()=>c});var s,n=r(90237),a=r(69540),i=r(25482),o=r(10107),u=(r(44208),r(53966),r(87811),r(93223)),l=r(40608);let c=class extends(a.A.ClonableMixin(i.A)){static{s=this}constructor(t){super(t),this.type="georeferenced",this.origin=null}static{this.absolute=new s}};(0,n._)([(0,u.e)({georeferenced:"georeferenced"},{readOnly:!0})],c.prototype,"type",void 0),(0,n._)([(0,o.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],c.prototype,"origin",void 0),c=s=(0,n._)([(0,l.$)("esri.geometry.support.MeshGeoreferencedVertexSpace")],c)},99352:(t,e,r)=>{r.d(e,{F:()=>s,P:()=>n});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},n={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2593],{9093:(t,e,r)=>{function s(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function n(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}r.d(e,{o8:()=>n,vt:()=>s,zK:()=>a});const a=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:a,clone:n,create:s,fromValues:function(t,e,r,s,n,a,i,o,u,l,c,p,d,h,y,f){return[t,e,r,s,n,a,i,o,u,l,c,p,d,h,y,f]}},Symbol.toStringTag,{value:"Module"}))},18251:(t,e,r)=>{r.d(e,{A:()=>c});var s=r(90237),n=r(69540),a=r(25482),i=r(10107),o=(r(44208),r(53966),r(87811),r(93223)),u=r(40608),l=r(51850);let c=class extends(n.A.ClonableMixin(a.A)){constructor(t){super(t),this.type="local",this.origin=(0,l.vt)()}};(0,s._)([(0,o.e)({local:"local"},{readOnly:!0})],c.prototype,"type",void 0),(0,s._)([(0,i.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],c.prototype,"origin",void 0),c=(0,s._)([(0,u.$)("esri.geometry.support.MeshLocalVertexSpace")],c)},24770:(t,e,r)=>{r.d(e,{$I:()=>m,AU:()=>h,g7:()=>f,i4:()=>c,ui:()=>p,up:()=>b,vt:()=>l,yo:()=>y});var s=r(34727),n=r(58083),a=r(67026),i=r(82534),o=r(38954),u=r(51850);function l(t=b){return[t[0],t[1],t[2],t[3]]}function c(t,e,r=l()){return(0,o.c)(r,t),r[3]=e,r}function p(t,e=l()){const r=(0,n.l)(M,t);return g(e,(0,s.KJ)((0,a.Xd)(e,r))),e}function d(t,e,r=l()){return(0,a.x8)(M,t,m(t)),(0,a.x8)(_,e,m(e)),(0,a.lw)(M,_,M),g(r,(0,s.KJ)((0,a.Xd)(r,M)))}function h(t,e,r,s=l()){return c(u.Cw,t,A),c(u.JP,e,S),c(u.Cb,r,q),d(A,S,A),d(A,q,s),s}function y(t){return t}function f(t){return t[3]}function m(t){return(0,s.kU)(t[3])}function g(t,e){return t[3]=e,t}const b=[0,0,1,0],M=(0,i.vt)(),_=(0,i.vt)(),A=(l(),l()),S=l(),q=l()},27615:(t,e,r)=>{r.d(e,{CK:()=>u,Hq:()=>o,MW:()=>l,TE:()=>c,yJ:()=>p});var s=r(38954),n=r(86738),a=r(95696),i=r(18251);function o(t){return null!=t.origin}function u(t){return o(t.vertexSpace)}function l(t,e){if(!o(t))return null;const[r,s,a]=t.origin;return new n.A({x:r,y:s,z:a,spatialReference:e})}function c(t,e){const{x:r,y:s,z:n,spatialReference:o}=t,u=[r,s,n??0];return"local"===(e?.vertexSpace??function(t){return t.isGeographic||t.isWebMercator?"local":"georeferenced"}(o))?new i.A({origin:u}):new a.A({origin:u})}function p(t,e){return t.type===e.type&&(t.origin===e.origin||null!=t.origin&&null!=e.origin&&(0,s.q)(t.origin,e.origin))}},28132:(t,e,r)=>{r.d(e,{A:()=>C});var s=r(90237),n=r(69622),a=r(49186),i=r(44208),o=r(74887),u=r(84952),l=r(10107),c=(r(53966),r(87811),r(40608)),p=r(21325),d=r(20557),h=r(27733),y=r(2272),f=r(20615),m=r(5443),g=r(80893),b=r(61956),M=r(78286),_=r(99199),A=r(97768),S=r(62815),q=r(90708);function v(t,e){return e}function x(t,e,r,s){switch(r){case 0:return R(t,e+s,0);case 1:return"lowerLeft"===t.originPosition?R(t,e+s,1):function({translate:t,scale:e},r,s){return t[s]-r*e[s]}(t,e+s,1)}}function w(t,e,r,s){return 2===r?R(t,e,2):x(t,e,r,s)}function F(t,e,r,s){return 2===r?0===e?0:R(t,e,3):x(t,e,r,s)}function I(t,e,r,s){return 3===r?0===e?0:R(t,e,3):w(t,e,r,s)}function R({translate:t,scale:e},r,s){return t[s]+r*e[s]}class O{constructor(t){this._options=t,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=v,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._mValueOffset=null,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(t){if(this._options.applyTransform&&(t.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!t.hasZ)return;const e=(0,S.N)(t.geometryType,this._options.sourceSpatialReference,t.spatialReference);if(null!=e)for(const r of t.features)e(r.geometry)}createSpatialReference(){return{}}addField(t,e){const r=t.fields;(0,A.Lw)(r),r.push(e);const s=r.map(t=>t.name);this._attributesConstructor=function(){for(const t of s)this[t]=null}}addFeature(t,e){t.features.push(e)}prepareFeatures(t){switch(this._transform=t.transform,this._options.applyTransform&&t.transform&&(this._applyTransform=this._deriveApplyTransform(t)),this._mValueOffset=null,this._vertexDimension=2,t.hasZ&&this._vertexDimension++,t.hasM&&(this._mValueOffset=this._vertexDimension,this._vertexDimension++),t.geometryType){case"esriGeometryPoint":this.addCoordinate=(t,e,r)=>this.addCoordinatePoint(t,e,r),this.createGeometry=t=>this.createPointGeometry(t);break;case"esriGeometryPolygon":this.addCoordinate=(t,e,r)=>this._addCoordinatePolygon(t,e,r),this.createGeometry=t=>this._createPolygonGeometry(t);break;case"esriGeometryPolyline":this.addCoordinate=(t,e,r)=>this._addCoordinatePolyline(t,e,r),this.createGeometry=t=>this._createPolylineGeometry(t);break;case"esriGeometryMultipoint":this.addCoordinate=(t,e,r)=>this._addCoordinateMultipoint(t,e,r),this.createGeometry=t=>this._createMultipointGeometry(t)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(t,e,r){0===this._lengths.length&&(this._toAddInCurrentPath=e),this._lengths.push(e)}addQueryGeometry(t,e){const{queryGeometry:r,queryGeometryType:s}=e,n=this._transform?(0,q.Ch)(r.clone(),r,!1,!1,this._transform):r.clone(),a=(0,q.zv)(n,s,!1,!1);t.queryGeometryType=s,t.queryGeometry={...a}}createPointGeometry(t){const e={x:0,y:0,spatialReference:t.spatialReference};return t.hasZ&&(e.z=0),t.hasM&&(e.m=0),e}addCoordinatePoint(t,e,r){const s=this._transform;switch(e=this._applyTransform(s,e,r,0),r){case 0:t.x=e;break;case 1:t.y=e;break;case 2:"z"in t?t.z=e:t.m=e;break;case 3:t.m=e}}_transformPathLikeValue(t,e){let r=0;e<=1&&(r=this._previousCoordinate[e],this._previousCoordinate[e]+=t);const s=this._transform;return null!==this._mValueOffset&&0===t&&e>0&&!(e%this._mValueOffset)?0:this._applyTransform(s,t,e,r)}_addCoordinatePolyline(t,e,r){this._dehydratedAddPointsCoordinate(t.paths,e,r)}_addCoordinatePolygon(t,e,r){this._dehydratedAddPointsCoordinate(t.rings,e,r)}_addCoordinateMultipoint(t,e,r){0===r&&t.points.push([]);const s=this._transformPathLikeValue(e,r);t.points[t.points.length-1].push(s)}_createPolygonGeometry(t){return{rings:[[]],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_createPolylineGeometry(t){return{paths:[[]],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_createMultipointGeometry(t){return{points:[],spatialReference:t.spatialReference,hasZ:!!t.hasZ,hasM:!!t.hasM}}_dehydratedAddPointsCoordinate(t,e,r){0===r&&0===this._toAddInCurrentPath--&&(t.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const s=this._transformPathLikeValue(e,r),n=t[t.length-1];0===r&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),n.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=s}_deriveApplyTransform(t){const{hasZ:e,hasM:r}=t;return e&&r?I:e?w:r?F:x}}var T=r(22671);let C=class extends n.A{constructor(t){super(t),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.queryAttachmentsSupported=!1,this.sourceSpatialReference=null,this.uniqueIdFields=null,this.url=null}get parsedUrl(){return(0,u.An)(this.url)}async execute(t,e){const r=await this.executeJSON(t,e);return this.featureSetFromJSON(t,r,e)}async executeJSON(t,e){const r=this._normalizeQuery(t),s=null!=t.outStatistics?.[0],n=(0,i.A)("featurelayer-pbf-statistics"),a=(!s||n)&&!0!==t.returnTrueCurves;let o;if(this.pbfSupported&&a)try{o=await async function(t,e,r,s){const n=(0,y.Dl)(t),a={...r},i=b.A.from(e),o=!i.quantizationParameters,{data:u}=await(0,g.IJ)(n,i,new O({sourceSpatialReference:i.sourceSpatialReference,applyTransform:o}),a,s);return u}(this.url,r,e,{uniqueIdFields:this.uniqueIdFields})}catch(t){if("query:parsing-pbf"!==t.name)throw t;this.pbfSupported=!1}return this.pbfSupported&&a||(o=await(0,_.e)(this.url,r,e,{uniqueIdFields:this.uniqueIdFields})),this._normalizeFields(o.fields),o}async featureSetFromJSON(t,e,s){if(!this._queryIs3DObjectFormat(t)||null==this.infoFor3D||!e.features)return T.A.fromJSON(e);const{meshFeatureSetFromJSON:n}=await(0,o.qr)(Promise.all([r.e(3030),r.e(36),r.e(8189)]).then(r.bind(r,40050)),s);return n(t,this.infoFor3D,e)}executeForCount(t,e){return(0,f.I)(this.url,this._normalizeQuery(t),e,{uniqueIdFields:this.uniqueIdFields})}executeForExtent(t,e){return async function(t,e,r){const s=(0,y.Dl)(t),n=await(0,g.Jf)(s,b.A.from(e),{...r}),a=n.data.extent;return!a||isNaN(a.xmin)||isNaN(a.ymin)||isNaN(a.xmax)||isNaN(a.ymax)?{count:n.data.count,extent:null}:{count:n.data.count,extent:m.A.fromJSON(a)}}(this.url,this._normalizeQuery(t),e)}executeForIds(t,e){return(0,M.V)(this.url,this._normalizeQuery(t),e,{uniqueIdFields:this.uniqueIdFields})}async executeRelationshipQuery(t,e){const[{default:s},{executeRelationshipQuery:n}]=await(0,o.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(5257).then(r.bind(r,15257))]),e);return t=s.from(t),(this.gdbVersion||this.dynamicDataSource)&&((t=t.clone()).gdbVersion=t.gdbVersion||this.gdbVersion,t.dynamicDataSource=t.dynamicDataSource||this.dynamicDataSource),n(this.url,t,e)}async executeRelationshipQueryForCount(t,e){const[{default:s},{executeRelationshipQueryForCount:n}]=await(0,o.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(5257).then(r.bind(r,15257))]),e);return t=s.from(t),(this.gdbVersion||this.dynamicDataSource)&&((t=t.clone()).gdbVersion=t.gdbVersion||this.gdbVersion,t.dynamicDataSource=t.dynamicDataSource||this.dynamicDataSource),n(this.url,t,e)}async executeAttachmentQuery(t,e){const{executeAttachmentQuery:s,fetchAttachments:n,processAttachmentQueryResult:a}=await(0,o.qr)(r.e(9239).then(r.bind(r,9239)),e),i=(0,y.Dl)(this.url);return a(i,await(this.queryAttachmentsSupported?s(i,t,e):n(i,t,e)))}async executeAttributeBinsQuery(t,e){const{executeAttributeBinsQuery:s}=await(0,o.qr)(Promise.all([r.e(4575),r.e(3103)]).then(r.bind(r,33103)),e);return s(this.parsedUrl,t,e)}async executeTopFeaturesQuery(t,e){const{executeTopFeaturesQuery:s}=await(0,o.qr)(r.e(1273).then(r.bind(r,11273)),e);return s(this.parsedUrl,t,this.sourceSpatialReference,e)}async executeForTopIds(t,e){const{executeForTopIds:s}=await(0,o.qr)(r.e(1277).then(r.bind(r,21277)),e);return s(this.parsedUrl,t,e)}async executeForTopExtents(t,e){const{executeForTopExtents:s}=await(0,o.qr)(r.e(8018).then(r.bind(r,8018)),e);return s(this.parsedUrl,t,e)}async executeForTopCount(t,e){const{executeForTopCount:s}=await(0,o.qr)(r.e(980).then(r.bind(r,10980)),e);return s(this.parsedUrl,t,e)}_normalizeQuery(t){let e=b.A.from(t);e.sourceSpatialReference=e.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(e=e===t?e.clone():e,e.gdbVersion=t.gdbVersion||this.gdbVersion,e.dynamicDataSource=t.dynamicDataSource?h.L.from(t.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:r}=this;if(null!=r&&this._queryIs3DObjectFormat(t)){if(e=e===t?e.clone():e,e.formatOf3DObjects=(0,d.Hz)(r),!e.formatOf3DObjects)throw new a.A("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if(e.outSpatialReference&&!(0,p.aI)(e.outSpatialReference,this.sourceSpatialReference))throw new a.A("query:unsupported-out-spatial-reference","3D object feature services do not support projection of geometries");if(null==e.outFields||!e.outFields.includes("*")){e=e===t?e.clone():e,null==e.outFields&&(e.outFields=[]);const{originX:s,originY:n,originZ:a,translationX:i,translationY:o,translationZ:u,scaleX:l,scaleY:c,scaleZ:p,rotationX:d,rotationY:h,rotationZ:y,rotationDeg:f}=r.transformFieldRoles;e.outFields.push(s,n,a,i,o,u,l,c,p,d,h,y,f)}}return e}_normalizeFields(t){if(null!=this.fieldsIndex&&null!=t)for(const e of t){const t=this.fieldsIndex.get(e.name);t&&Object.assign(e,t.toJSON())}}_queryIs3DObjectFormat(t){return null!=this.infoFor3D&&!0===t.returnGeometry&&"xyFootprint"!==t.multipatchOption&&!t.outStatistics}};(0,s._)([(0,l.MZ)({type:h.L})],C.prototype,"dynamicDataSource",void 0),(0,s._)([(0,l.MZ)()],C.prototype,"fieldsIndex",void 0),(0,s._)([(0,l.MZ)()],C.prototype,"gdbVersion",void 0),(0,s._)([(0,l.MZ)()],C.prototype,"infoFor3D",void 0),(0,s._)([(0,l.MZ)({readOnly:!0})],C.prototype,"parsedUrl",null),(0,s._)([(0,l.MZ)()],C.prototype,"pbfSupported",void 0),(0,s._)([(0,l.MZ)()],C.prototype,"queryAttachmentsSupported",void 0),(0,s._)([(0,l.MZ)()],C.prototype,"sourceSpatialReference",void 0),(0,s._)([(0,l.MZ)()],C.prototype,"uniqueIdFields",void 0),(0,s._)([(0,l.MZ)({type:String})],C.prototype,"url",void 0),C=(0,s._)([(0,c.$)("esri.layers.graphics.sources.support.QueryTask")],C)},29242:(t,e,r)=>{function s(){return[1,0,0,0,1,0,0,0,1]}function n(t,e,r,s,n,a,i,o,u){return[t,e,r,s,n,a,i,o,u]}r.d(e,{fA:()=>n,vt:()=>s,zK:()=>a});const a=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:a,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:s,fromValues:n},Symbol.toStringTag,{value:"Module"}))},38954:(t,e,r)=>{r.d(e,{A:()=>y,B:()=>h,C:()=>c,D:()=>p,E:()=>E,F:()=>j,H:()=>Z,a:()=>D,b:()=>g,c:()=>i,d:()=>l,e:()=>v,f:()=>u,g:()=>m,h:()=>x,i:()=>o,j:()=>b,k:()=>_,l:()=>a,m:()=>w,n:()=>q,o:()=>I,q:()=>C,r:()=>S,s:()=>M,t:()=>F,u:()=>A,v:()=>R,w:()=>d,x:()=>Q,y:()=>G,z:()=>f});var s=r(51850),n=r(34304);function a(t){const e=t[0],r=t[1],s=t[2];return Math.sqrt(e*e+r*r+s*s)}function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function o(t,e,r,s){return t[0]=e,t[1]=r,t[2]=s,t}function u(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t}function l(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}function c(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t}function p(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}function d(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function h(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function y(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t}function f(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t}function m(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}function g(t,e,r,s){return t[0]=e[0]+r[0]*s,t[1]=e[1]+r[1]*s,t[2]=e[2]+r[2]*s,t}function b(t,e){const r=e[0]-t[0],s=e[1]-t[1],n=e[2]-t[2];return Math.sqrt(r*r+s*s+n*n)}function M(t,e){const r=e[0]-t[0],s=e[1]-t[1],n=e[2]-t[2];return r*r+s*s+n*n}function _(t){const e=t[0],r=t[1],s=t[2];return e*e+r*r+s*s}function A(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function S(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function q(t,e){const r=e[0],s=e[1],n=e[2];let a=r*r+s*s+n*n;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}function v(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function x(t,e,r){const s=e[0],n=e[1],a=e[2],i=r[0],o=r[1],u=r[2];return t[0]=n*u-a*o,t[1]=a*i-s*u,t[2]=s*o-n*i,t}function w(t,e,r,s){const n=e[0],a=e[1],i=e[2];return t[0]=n+s*(r[0]-n),t[1]=a+s*(r[1]-a),t[2]=i+s*(r[2]-i),t}function F(t,e,r){const s=e[0],n=e[1],a=e[2];return t[0]=r[0]*s+r[4]*n+r[8]*a+r[12],t[1]=r[1]*s+r[5]*n+r[9]*a+r[13],t[2]=r[2]*s+r[6]*n+r[10]*a+r[14],t}function I(t,e,r){const s=e[0],n=e[1],a=e[2];return t[0]=s*r[0]+n*r[3]+a*r[6],t[1]=s*r[1]+n*r[4]+a*r[7],t[2]=s*r[2]+n*r[5]+a*r[8],t}function R(t,e,r){const s=r[0],n=r[1],a=r[2],i=r[3],o=e[0],u=e[1],l=e[2],c=n*l-a*u,p=a*o-s*l,d=s*u-n*o,h=n*d-a*p,y=a*c-s*d,f=s*p-n*c,m=2*i;return t[0]=o+c*m+2*h,t[1]=u+p*m+2*y,t[2]=l+d*m+2*f,t}const O=(0,s.vt)(),T=(0,s.vt)();function C(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function E(t,e,r){const s=r[0]-e[0],n=r[1]-e[1],a=r[2]-e[2];let i=s*s+n*n+a*a;return i>0?(i=1/Math.sqrt(i),t[0]=s*i,t[1]=n*i,t[2]=a*i,t):(t[0]=0,t[1]=0,t[2]=0,t)}const D=l,P=c,N=p,j=b,Q=M,Z=a,G=_;Object.freeze(Object.defineProperty({__proto__:null,abs:d,add:u,angle:function(t,e){q(O,t),q(T,e);const r=v(O,T);return r>1?0:r<-1?Math.PI:Math.acos(r)},bezier:function(t,e,r,s,n,a){const i=1-a,o=i*i,u=a*a,l=o*i,c=3*a*o,p=3*u*i,d=u*a;return t[0]=e[0]*l+r[0]*c+s[0]*p+n[0]*d,t[1]=e[1]*l+r[1]*c+s[1]*p+n[1]*d,t[2]=e[2]*l+r[2]*c+s[2]*p+n[2]*d,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,r=1){return t[0]=Math.min(Math.max(t[0],e),r),t[1]=Math.min(Math.max(t[1],e),r),t[2]=Math.min(Math.max(t[2],e),r),t},copy:i,cross:x,crossAndNormalize:function(t,e,r){const s=e[0],n=e[1],a=e[2],i=r[0],o=r[1],u=r[2],l=n*u-a*o,c=a*i-s*u,p=s*o-n*i,d=Math.sqrt(l*l+c*c+p*p);return t[0]=l/d,t[1]=c/d,t[2]=p/d,t},direction:E,dist:j,distance:b,div:N,divide:p,dot:v,equals:function(t,e){if(t===e)return!0;const r=t[0],s=t[1],a=t[2],i=e[0],o=e[1],u=e[2],l=(0,n.FD)();return Math.abs(r-i)<=l*Math.max(1,Math.abs(r),Math.abs(i))&&Math.abs(s-o)<=l*Math.max(1,Math.abs(s),Math.abs(o))&&Math.abs(a-u)<=l*Math.max(1,Math.abs(a),Math.abs(u))},exactEquals:C,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,r,s,n,a){const i=a*a,o=i*(2*a-3)+1,u=i*(a-2)+a,l=i*(a-1),c=i*(3-2*a);return t[0]=e[0]*o+r[0]*u+s[0]*l+n[0]*c,t[1]=e[1]*o+r[1]*u+s[1]*l+n[1]*c,t[2]=e[2]*o+r[2]*u+s[2]*l+n[2]*c,t},inverse:S,len:Z,length:a,lerp:w,max:f,min:y,mul:P,multiply:c,negate:A,normalize:q,random:function(t,e=1){const r=n.Ov,s=2*r()*Math.PI,a=2*r()-1,i=Math.sqrt(1-a*a)*e;return t[0]=Math.cos(s)*i,t[1]=Math.sin(s)*i,t[2]=a*e,t},rotateX:function(t,e,r,s){const n=[],a=[];return n[0]=e[0]-r[0],n[1]=e[1]-r[1],n[2]=e[2]-r[2],a[0]=n[0],a[1]=n[1]*Math.cos(s)-n[2]*Math.sin(s),a[2]=n[1]*Math.sin(s)+n[2]*Math.cos(s),t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},rotateY:function(t,e,r,s){const n=[],a=[];return n[0]=e[0]-r[0],n[1]=e[1]-r[1],n[2]=e[2]-r[2],a[0]=n[2]*Math.sin(s)+n[0]*Math.cos(s),a[1]=n[1],a[2]=n[2]*Math.cos(s)-n[0]*Math.sin(s),t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},rotateZ:function(t,e,r,s){const n=[],a=[];return n[0]=e[0]-r[0],n[1]=e[1]-r[1],n[2]=e[2]-r[2],a[0]=n[0]*Math.cos(s)-n[1]*Math.sin(s),a[1]=n[0]*Math.sin(s)+n[1]*Math.cos(s),a[2]=n[2],t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:m,scaleAndAdd:g,set:o,sign:h,sqrDist:Q,sqrLen:G,squaredDistance:M,squaredLength:_,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:D,subtract:l,transformMat3:I,transformMat4:F,transformQuat:R},Symbol.toStringTag,{value:"Module"}))},63579:(t,e,r)=>{r.d(e,{Bq:()=>u,Qp:()=>o,WN:()=>m,dK:()=>g,eN:()=>h,fH:()=>f,in:()=>y,yr:()=>l});var s=r(78888),n=r(4576),a=(r(44208),r(74887)),i=r(20557);class o{constructor(t,e,r){this.assetName=t,this.assetMimeType=e,this.parts=r}equals(t){return this===t||this.assetName===t.assetName&&this.assetMimeType===t.assetMimeType&&(0,n.aI)(this.parts,t.parts,(t,e)=>t.equals(e))}isOnService(t){return this.parts.every(e=>e.isOnService(t))}makeHash(){let t="";for(const e of this.parts)t+=e.partHash;return t}async toBlob(t){const{parts:e}=this;if(1===e.length)return e[0].toBlob(t);const r=await Promise.all(e.map(e=>e.toBlob(t)));return(0,a.Te)(t),new Blob(r)}}class u{constructor(t,e){this.partUrl=t,this.partHash=e}equals(t){return this===t||this.partUrl===t.partUrl&&this.partHash===t.partHash}isOnService(t){return this.partUrl.startsWith(`${t.path}/assets/`)}async toBlob(t){const{data:e}=await(0,s.A)(this.partUrl,{responseType:"blob"});return(0,a.Te)(t),e}}function l(t){return function(t){switch(t?.type){case"client":return Array.isArray(t.files)?t.files.some(d):d(t.files);case"service":return t.assets.some(d);case"loadable":return!0;default:return!1}}(t?.source)}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,p=/\.(gltf|glb)/i;function d(t){if(t instanceof File){const{type:e,name:r}=t;return c.test(e)||p.test(r)}return c.test(t.assetMimeType)||p.test(t.assetName)}function h(t,e){if(!t)return!1;const{source:r}=t;return function(t,e){return"service"===t.type&&t.assets.every(t=>t.isOnService(e))}(r,e)}function y(t,e){if(t===e)return!0;const{source:r}=t,{source:s}=e;if(r===s)return!0;if("service"===r.type&&"service"===s.type){if(r.assets.length!==s.assets.length)return!1;const t=(t,e)=>t.assetName<e.assetName?-1:t.assetName>e.assetName?1:0,e=[...r.assets].sort(t),n=[...s.assets].sort(t);for(let t=0;t<e.length;++t)if(!e[t].equals(n[t]))return!1;return!0}return!1}function f(t,e){return t instanceof File?(0,i.rq)(t,e):(0,i.z$)(t.assetMimeType,t.assetName,e)}function m(t){switch(t.type){case"client":return Array.isArray(t.files)?t.files:[t.files];case"service":return t.assets;case"loadable":return}}function g(t){return!!t.original}},64714:(t,e,r)=>{r.d(e,{F0:()=>o,Vx:()=>c,e2:()=>d,f:()=>h});var s=r(44208),n=r(4718),a=r(99352),i=r(93470);function o(t){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===t||"esriGeometryMultipoint"===t?i.Cb:"esriGeometryPolyline"===t?i.yM:i.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function c(t,e){if((0,s.A)("esri-csp-restrictions"))return()=>({[e]:null,...t});try{let r=`this${p(e)} = null;`;for(const e in t)r+=`this${p(e)} = ${JSON.stringify(t[e])};`;const s=new Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[e]:null,...t})}}function p(t){return u.test(t)?`.${t}`:`["${t}"]`}function d(t={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(t)}}]}function h(t,e){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:e,supportsDelete:e,supportsEditing:e,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:e,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:a.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:a.P,editing:{supportsGeometryUpdate:e,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},67026:(t,e,r)=>{r.d(e,{A6:()=>f,Xd:()=>c,Xr:()=>h,hZ:()=>g,lw:()=>p,t2:()=>I,x8:()=>l});var s=r(29242),n=r(82534),a=r(51850),i=r(34304),o=r(38954),u=r(87317);function l(t,e,r){r*=.5;const s=Math.sin(r);return t[0]=s*e[0],t[1]=s*e[1],t[2]=s*e[2],t[3]=Math.cos(r),t}function c(t,e){const r=2*Math.acos(e[3]),s=Math.sin(r/2);return s>(0,i.FD)()?(t[0]=e[0]/s,t[1]=e[1]/s,t[2]=e[2]/s):(t[0]=1,t[1]=0,t[2]=0),r}function p(t,e,r){const s=e[0],n=e[1],a=e[2],i=e[3],o=r[0],u=r[1],l=r[2],c=r[3];return t[0]=s*c+i*o+n*l-a*u,t[1]=n*c+i*u+a*o-s*l,t[2]=a*c+i*l+s*u-n*o,t[3]=i*c-s*o-n*u-a*l,t}function d(t,e,r,s){const n=e[0],a=e[1],o=e[2],u=e[3];let l,c,p,d,h,y=r[0],f=r[1],m=r[2],g=r[3];return c=n*y+a*f+o*m+u*g,c<0&&(c=-c,y=-y,f=-f,m=-m,g=-g),1-c>(0,i.FD)()?(l=Math.acos(c),p=Math.sin(l),d=Math.sin((1-s)*l)/p,h=Math.sin(s*l)/p):(d=1-s,h=s),t[0]=d*n+h*y,t[1]=d*a+h*f,t[2]=d*o+h*m,t[3]=d*u+h*g,t}function h(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function y(t,e){const r=e[0]+e[4]+e[8];let s;if(r>0)s=Math.sqrt(r+1),t[3]=.5*s,s=.5/s,t[0]=(e[5]-e[7])*s,t[1]=(e[6]-e[2])*s,t[2]=(e[1]-e[3])*s;else{let r=0;e[4]>e[0]&&(r=1),e[8]>e[3*r+r]&&(r=2);const n=(r+1)%3,a=(r+2)%3;s=Math.sqrt(e[3*r+r]-e[3*n+n]-e[3*a+a]+1),t[r]=.5*s,s=.5/s,t[3]=(e[3*n+a]-e[3*a+n])*s,t[n]=(e[3*n+r]+e[3*r+n])*s,t[a]=(e[3*a+r]+e[3*r+a])*s}return t}function f(t,e,r,s){const n=.5*Math.PI/180;e*=n,r*=n,s*=n;const a=Math.sin(e),i=Math.cos(e),o=Math.sin(r),u=Math.cos(r),l=Math.sin(s),c=Math.cos(s);return t[0]=a*u*c-i*o*l,t[1]=i*o*c+a*u*l,t[2]=i*u*l-a*o*c,t[3]=i*u*c+a*o*l,t}const m=u.c,g=u.s,b=u.g,M=p,_=u.d,A=u.h,S=u.l,q=u.j,v=q,x=u.b,w=x,F=u.n,I=u.a,R=u.e,O=(0,a.vt)(),T=(0,a.fA)(1,0,0),C=(0,a.fA)(0,1,0),E=(0,n.vt)(),D=(0,n.vt)(),P=(0,s.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:b,calculateW:function(t,e){const r=e[0],s=e[1],n=e[2];return t[0]=r,t[1]=s,t[2]=n,t[3]=Math.sqrt(Math.abs(1-r*r-s*s-n*n)),t},conjugate:h,copy:m,dot:A,equals:R,exactEquals:I,fromEuler:f,fromMat3:y,getAxisAngle:c,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,e){const r=e[0],s=e[1],n=e[2],a=e[3],i=r*r+s*s+n*n+a*a,o=i?1/i:0;return t[0]=-r*o,t[1]=-s*o,t[2]=-n*o,t[3]=a*o,t},len:v,length:q,lerp:S,mul:M,multiply:p,normalize:F,random:function(t){const e=i.Ov,r=e(),s=e(),n=e(),a=Math.sqrt(1-r),o=Math.sqrt(r);return t[0]=a*Math.sin(2*Math.PI*s),t[1]=a*Math.cos(2*Math.PI*s),t[2]=o*Math.sin(2*Math.PI*n),t[3]=o*Math.cos(2*Math.PI*n),t},rotateX:function(t,e,r){r*=.5;const s=e[0],n=e[1],a=e[2],i=e[3],o=Math.sin(r),u=Math.cos(r);return t[0]=s*u+i*o,t[1]=n*u+a*o,t[2]=a*u-n*o,t[3]=i*u-s*o,t},rotateY:function(t,e,r){r*=.5;const s=e[0],n=e[1],a=e[2],i=e[3],o=Math.sin(r),u=Math.cos(r);return t[0]=s*u-a*o,t[1]=n*u+i*o,t[2]=a*u+s*o,t[3]=i*u-n*o,t},rotateZ:function(t,e,r){r*=.5;const s=e[0],n=e[1],a=e[2],i=e[3],o=Math.sin(r),u=Math.cos(r);return t[0]=s*u+n*o,t[1]=n*u-s*o,t[2]=a*u+i*o,t[3]=i*u-a*o,t},rotationTo:function(t,e,r){const s=(0,o.e)(e,r);return s<-.999999?((0,o.h)(O,T,e),(0,o.H)(O)<1e-6&&(0,o.h)(O,C,e),(0,o.n)(O,O),l(t,O,Math.PI),t):s>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,o.h)(O,e,r),t[0]=O[0],t[1]=O[1],t[2]=O[2],t[3]=1+s,F(t,t))},scale:_,set:g,setAxes:function(t,e,r,s){const n=P;return n[0]=r[0],n[3]=r[1],n[6]=r[2],n[1]=s[0],n[4]=s[1],n[7]=s[2],n[2]=-e[0],n[5]=-e[1],n[8]=-e[2],F(t,y(t,n))},setAxisAngle:l,slerp:d,sqlerp:function(t,e,r,s,n,a){return d(E,e,n,a),d(D,r,s,a),d(t,E,D,2*a*(1-a)),t},sqrLen:w,squaredLength:x,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},72593:(t,e,r)=>{r.r(e),r.d(e,{default:()=>H});var s=r(90237),n=r(92602),a=r(78888),i=r(4576),o=r(49186),u=r(44208),l=r(66552),c=r(92474),p=r(53966),d=r(93637),h=r(74887),y=r(36708),f=r(84952),m=r(13069),g=r(10107),b=r(40608),M=r(5443),_=r(16930),A=r(95696),S=r(27615),q=r(63579),v=r(52106),x=r(83047),w=r(98988),F=r(65864),I=r(73836),R=r(21325),O=r(78628);async function T(t,e,r){const{geometry:s}=e,n={...e.attributes};if(null!=r&&"mesh"===s?.type){const{transformFieldRoles:e}=r,{origin:a,spatialReference:i,vertexSpace:o}=s,u=s.transform??new I.A,l="local"===o.type,c=t.spatialReference,p=c.isGeographic,d=(0,R.aI)(c,i),h=(0,w.isEqualBaseGCS)(i,c)&&(0,w.canProjectWithoutEngine)(i,c);if(!(l&&p&&h||!l&&!p&&d))return null;const y=(0,w.projectWithoutEngine)(a,i,c);if(null==y)return null;if(n[e.originX]=y.x,n[e.originY]=y.y,n[e.originZ]=y.z??0,null!=u){const{translation:t,scale:r,rotation:s}=u,a=l?1:(0,x.KX)(i)/(0,x.KX)(c);n[e.translationX]=t[0]*a,n[e.translationY]=t[2]*a,n[e.translationZ]=-t[1]*a,n[e.scaleX]=r[0],n[e.scaleY]=r[2],n[e.scaleZ]=r[1],n[e.rotationX]=s[0],n[e.rotationY]=s[2],n[e.rotationZ]=-s[1],n[e.rotationDeg]=s[3]}return{attributes:n}}return null==s?{attributes:n}:"mesh"===s.type||"extent"===s.type?null:{geometry:s.toJSON(),attributes:n}}async function C(t,e){const r=await Promise.all((e.addAttachments??[]).map(e=>E(t,e))),s=await Promise.all((e.updateAttachments??[]).map(e=>E(t,e))),n=e.deleteAttachments??[];return r.length||s.length||n.length?{adds:r,updates:s,deletes:[...n]}:null}async function E(t,e){const{feature:r,attachment:s}=e,{globalId:n,name:a,contentType:i,data:o,uploadId:u}=s,l={globalId:n};if(r&&("attributes"in r?l.parentGlobalId=r.attributes?.[t.globalIdField]:r.globalId&&(l.parentGlobalId=r.globalId)),u)l.uploadId=u;else if(o){const t=await(0,f._0)(o);t&&(l.contentType=t.mediaType,l.data=t.data),o instanceof File&&(l.name=o.name)}return a&&(l.name=a),i&&(l.contentType=i),l}function D(t){const e=!0===t.success?null:t.error||{code:void 0,description:"Feature edit failed"};return{objectId:t.objectId,globalId:t.globalId,error:e?new o.A("feature-layer-source:edit-failure",e.description,{code:e.code}):null}}function P(t,e){return new v.A({attributes:t.attributes,geometry:(0,F.rS)({...t.geometry,spatialReference:e})})}function N(t,e){return{adds:t?.adds?.map(t=>P(t,e))||[],updates:t?.updates?.map(t=>({original:P(t[0],e),current:P(t[1],e)}))||[],deletes:t?.deletes?.map(t=>P(t,e))||[],spatialReference:e}}var j=r(64714),Q=r(28132),Z=r(60694),G=r(15426),J=r(20557),U=r(99199),k=r(96520),V=r(61956),z=r(64272),B=r(20816);const L=new l.J({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),$=new l.J({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let H=class extends c.A{constructor(t){super(t),this.type="feature-layer",this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),this.refresh=(0,h.sg)(async()=>{await this.load();const t=this.sourceJSON.editingInfo?.lastEditDate;if(null==t)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const e=t!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:e,updates:e?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}}),this._ongoingAssetUploads=new Map}load(t){const e=this.layer.sourceJSON,r=this._fetchService(e,{...t}).then(()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,t)).then(()=>this._ensureLatestMetadata(t));return this.addResolvingPromise(r),Promise.resolve(this)}initialize(){this.addHandles([(0,y.wB)(()=>{const t=this.layer;return t&&"lastEditsEventDate"in t?t.lastEditsEventDate:null},t=>this._handleLastEditsEventChange(t))])}destroy(){this._removeEditInterceptor()}get queryTask(){const{capabilities:t,parsedUrl:e,gdbVersion:r,spatialReference:s,fieldsIndex:n,uniqueIdFields:a}=this.layer,i="infoFor3D"in this.layer?this.layer.infoFor3D:null,o="dynamicDataSource"in this.layer?this.layer.dynamicDataSource:null,l=(0,u.A)("featurelayer-pbf")&&t?.query.supportsFormatPBF&&null==i;return new Q.A({dynamicDataSource:o,fieldsIndex:n,gdbVersion:r,infoFor3D:i,pbfSupported:l,queryAttachmentsSupported:t?.operations?.supportsQueryAttachments??!1,sourceSpatialReference:s,uniqueIdFields:a,url:e.path})}async addAttachment(t,e){await this.load();const{layer:r}=this;await(0,G.VA)(r,"editing");const s=t.attributes[r.objectIdField],n=r.parsedUrl.path+"/"+s+"/addAttachment",i=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(e,i.query);try{return D((await(0,a.A)(n,{body:o})).data.addAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(s,t)}}async updateAttachment(t,e,r){await this.load();const{layer:s}=this;await(0,G.VA)(s,"editing");const n=t.attributes[s.objectIdField],i=s.parsedUrl.path+"/"+n+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:e}}),u=this._getFormDataForAttachment(r,o.query);try{return D((await(0,a.A)(i,{body:u})).data.updateAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(n,t)}}async applyEdits(t,e){await this.load();const{layer:r}=this;await(0,G.VA)(r,"editing");const s="infoFor3D"in r?r.infoFor3D:null,n=null!=s,u=n||(e?.globalIdUsed??!1),l=n?await this._uploadMeshesAndGetAssetMapEditsJSON(t):null,c=t.addFeatures?.map(t=>T(this.layer,t,s))??[],p=(await Promise.all(c)).filter(i.Ru),d=t.updateFeatures?.map(t=>T(this.layer,t,s))??[],h=(await Promise.all(d)).filter(i.Ru),y=function(t,e,r){if(!e||0===e.length)return[];if(r&&(0,O.zp)(e))return e.map(t=>t.globalId);if((0,O.r3)(e))return e.map(t=>t.objectId);const s=r?t.globalIdField:t.objectIdField;return s?e.map(t=>t.getAttribute(s)):[]}(this.layer,t.deleteFeatures,u);(0,k.u)(p,h,r.spatialReference);const f=await C(this.layer,t),m=r.capabilities.editing.supportsAsyncApplyEdits&&n,g=e?.gdbVersion||r.gdbVersion,b={gdbVersion:g,rollbackOnFailure:e?.rollbackOnFailureEnabled,useGlobalIds:u,returnEditMoment:e?.returnEditMoment,usePreviousEditMoment:e?.usePreviousEditMoment,async:m};await(0,B.ZJ)(this.layer.url,g,!0);const M=(0,B.w5)(this.layer.url,g||null);if(await(0,B.We)(r.url,g,r.historicMoment))throw new o.A("feature-layer-source:historic-version","Editing a historic version is not allowed");e?.returnServiceEditsOption?(b.edits=JSON.stringify([{id:r.layerId,adds:p.length?p:null,updates:h.length?h:null,deletes:y.length?y:null,attachments:f,assetMaps:l}]),b.returnServiceEditsOption=L.toJSON(e?.returnServiceEditsOption),b.returnServiceEditsInSourceSR=e?.returnServiceEditsInSourceSR):(b.adds=p.length?JSON.stringify(p):null,b.updates=h.length?JSON.stringify(h):null,b.deletes=y.length?u?JSON.stringify(y):y.join(","):null,b.attachments=f&&JSON.stringify(f),b.assetMaps=null!=l?JSON.stringify(l):void 0);const _=this._getLayerRequestOptions({method:"post",query:b});M&&(_.authMode="immediate",_.query.returnEditMoment=!0,_.query.sessionId=B.TA);const A=e?.returnServiceEditsOption?r.url:r.parsedUrl.path;let S;try{S=m?await this._asyncApplyEdits(A+"/applyEdits",_):await(0,a.A)(A+"/applyEdits",_)}catch(t){if(!function(t){const e=t.details.raw,r=+e.code,s=+e.extendedCode;return 500===r&&(-2147217144===s||-2147467261===s)}(t))throw t;_.authMode="immediate",S=m?await this._asyncApplyEdits(A+"/applyEdits",_):await(0,a.A)(A+"/applyEdits",_)}return this._createEditsResult(S)}async deleteAttachments(t,e){await this.load();const{layer:r}=this;await(0,G.VA)(r,"editing");const s=t.attributes[r.objectIdField],n=r.parsedUrl.path+"/"+s+"/deleteAttachments";try{return(await(0,a.A)(n,this._getLayerRequestOptions({query:{attachmentIds:e.join(",")},method:"post"}))).data.deleteAttachmentResults.map(D)}catch(t){throw this._createAttachmentErrorResult(s,t)}}fetchRecomputedExtents(t={}){const e=t.signal;return this.load({signal:e}).then(async()=>{const e=this._getLayerRequestOptions({...t,query:{returnUpdates:!0}}),{layerId:r,url:s}=this.layer,{data:n}=await(0,a.A)(`${s}/${r}`,e),{id:i,extent:o,fullExtent:u,timeExtent:l}=n,c=o||u;return{id:i,fullExtent:c&&M.A.fromJSON(c),timeExtent:l&&z.T.fromJSON({start:l[0],end:l[1]})}})}async queryAttachments(t,e={}){await this.load();const r=this._getLayerRequestOptions(e);return this.queryTask.executeAttachmentQuery(t,r)}async queryFeatures(t,e){await this.load();const r=await this.queryTask.execute(t,{...e,query:this._createRequestQueryOptions(e)});if(t.outStatistics?.length&&r.features.length){const e=new Map;if(r.features.forEach(r=>{const s=r.attributes;t.outStatistics?.forEach(({outStatisticFieldName:t})=>{if(t){const r=t.toLowerCase();r&&r in s&&t!==r&&(s[t]=s[r],delete s[r],e.set(r,t))}})}),null!=r.fields)for(const t of r.fields){const r=e.get(t.name.toLowerCase());null!=r&&(t.name=r)}}return r}async queryFeaturesJSON(t,e){return await this.load(),this.queryTask.executeJSON(t,{...e,query:this._createRequestQueryOptions(e)})}async queryObjectIds(t,e){return await this.load(),this.queryTask.executeForIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryFeatureCount(t,e){return await this.load(),this.queryTask.executeForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryExtent(t,e){return await this.load(),this.queryTask.executeForExtent(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeatures(t,e){return await this.load(),this.queryTask.executeRelationshipQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeaturesCount(t,e){return await this.load(),this.queryTask.executeRelationshipQueryForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopFeatures(t,e){return await this.load(),this.queryTask.executeTopFeaturesQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryAttributeBins(t,e){return await this.load(),this.queryTask.executeAttributeBinsQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopObjectIds(t,e){return await this.load(),this.queryTask.executeForTopIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopExtents(t,e){return await this.load(),this.queryTask.executeForTopExtents(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopCount(t,e){return await this.load(),this.queryTask.executeForTopCount(t,{...e,query:this._createRequestQueryOptions(e)})}async fetchPublishingStatus(){if(!(0,Z.Wo)(this.layer.url))return"unavailable";const t=(0,f.fj)(this.layer.url,"status"),e=await(0,a.A)(t,{query:{f:"json"}});return $.fromJSON(e.data.status)}async uploadAssets(t,e){const{uploadAssets:s}=await r.e(1384).then(r.bind(r,31384));return s(t,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},e)}_handleLastEditsEventChange(t){const e=this.layer;if(null==t||!("capabilities"in e)||!("effectiveCapabilities"in e))return;if(e.capabilities?.operations?.supportsEditing||!e.effectiveCapabilities?.operations?.supportsEditing)return;const r=e.url;null!=r&&("layerId"in e&&(0,f.fj)(r,e.layerId.toString()),this._getOrCreateEditInterceptor(r).before=e=>{const r=e.requestOptions.method??"auto";if("auto"===r||"head"===r){const r=e.requestOptions.query??{};r._ts=t.getTime(),e.requestOptions.query=r}})}_getOrCreateEditInterceptor(t){return null==this._editInterceptor&&(this._editInterceptor={urls:t},n.A.request.internalInterceptors.push(this._editInterceptor)),this._editInterceptor}_removeEditInterceptor(){null!=this._editInterceptor&&((0,i.TF)(n.A.request.internalInterceptors,this._editInterceptor),this._editInterceptor=null)}async _asyncApplyEdits(t,e){const r=(await(0,a.A)(t,e)).data.statusUrl;for(;;){const t=(await(0,a.A)(r,{query:{f:"json"},responseType:"json"})).data;switch(t.status){case"Completed":return(0,a.A)(t.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new o.A("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new o.A("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await(0,h.Pl)(X)}}_createRequestQueryOptions(t){const e={...this.layer.customParameters,token:this.layer.apiKey,...t?.query};return this.layer.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),e}async _fetchService(t,e){if(!t){const r={};(0,u.A)("featurelayer-advanced-symbols")&&(r.returnAdvancedSymbols=!0),e?.cacheBust&&(r._ts=Date.now());const{data:s}=await(0,a.A)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:r,signal:e?.signal}));t=s}this.layer.applyPreferredHost(t),this.sourceJSON=await this._patchServiceJSON(t,e?.signal);const r=t.type;if(!this.supportedSourceTypes.has(r))throw new o.A("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}async _patchServiceJSON(t,e){if("Table"!==t.type&&t.geometryType&&!t?.drawingInfo?.renderer&&!t.defaultSymbol){const e=(0,j.F0)(t.geometryType).renderer;(0,d.sM)("drawingInfo.renderer",e,t)}if("esriGeometryMultiPatch"===t.geometryType&&t.infoFor3D&&(t.geometryType="mesh"),null==t.extent)try{const{data:r}=await(0,a.A)(this.layer.url,this._getLayerRequestOptions({signal:e}));r.spatialReference&&(t.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:r.spatialReference})}catch(t){(0,h.QP)(t)}return t}async _ensureLatestMetadata(t){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...t,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(t){const{addAssetFeatures:e}=t;if(!e?.length)return null;if(await this._areAllAssetsAlreadyMapped(e))return null;const s=t.addFeatures.filter(t=>t.geometry);if(e.length!==s.length+t.updateFeatures.length)throw new o.A("feature-layer-source:unsupported-mesh-edits","Mixing attribute only edits with mesh geometry edits is not currently supported");const n=new Array,a=new Map;for(const t of e){const{geometry:e}=t,{vertexSpace:s}=e;if((0,S.Hq)(s))n.push(e);else{const s=e.origin,{convertMeshVertexSpace:i}=await Promise.all([r.e(3030),r.e(4496)]).then(r.bind(r,28846)),o=await i(e,new A.A({origin:[s.x,s.y,s.z??0]}));a.set(o,e),t.geometry=o,n.push(o)}}await this.uploadAssets(n);for(const[t,e]of a)e.addExternalSources(t.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(e),updates:[],deletes:[]}}_getAssetMapEditsJSON(t){const e=new Array,r=this.layer.globalIdField,s=this.layer.parsedUrl;for(const n of t){const t=n.geometry,{metadata:a}=t,i=a.getExternalSourcesOnService(s),o=n.getAttribute(r);if(0===i.length){p.A.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:u}=i.find(q.dK)??i[0];for(const t of u.assets)1===t.parts.length?e.push({globalId:(0,m.yS)(),parentGlobalId:o,assetName:t.assetName,assetHash:t.parts[0].partHash,flags:[]}):p.A.getLogger(this).error(`Skipping asset ${t.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return e}_createEditsResult(t){const e=t.data,{layerId:r}=this.layer,s=[];let n=null;if(Array.isArray(e))for(const t of e)s.push({id:t.id,editedFeatures:t.editedFeatures}),t.id===r&&(n={addResults:t.addResults??[],updateResults:t.updateResults??[],deleteResults:t.deleteResults??[],attachments:t.attachments,editMoment:t.editMoment});else n=e;const a=function(t){const e=t?.assetMaps;if(e){for(const t of e.addResults)t.success||p.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`);for(const t of e.updateResults)t.success||p.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`)}const r=t?.attachments,s={addFeatureResults:t?.addResults?.map(D)??[],updateFeatureResults:t?.updateResults?.map(D)??[],deleteFeatureResults:t?.deleteResults?.map(D)??[],addAttachmentResults:r?.addResults?r.addResults.map(D):[],updateAttachmentResults:r?.updateResults?r.updateResults.map(D):[],deleteAttachmentResults:r?.deleteResults?r.deleteResults.map(D):[]};return t?.editMoment&&(s.editMoment=t.editMoment),s}(n);if(s.length>0){a.editedFeatureResults=[];for(const t of s){const{editedFeatures:e}=t,r=e?.spatialReference?new _.A(e.spatialReference):null;a.editedFeatureResults.push({layerId:t.id,editedFeatures:N(e,r)})}}return a}_createAttachmentErrorResult(t,e){const r=e.details.messages?.[0]||e.message,s=e.details.httpStatus||e.details.messageCode;return{objectId:t,globalId:null,error:new o.A("feature-layer-source:attachment-failure",r,{code:s})}}_getFormDataForAttachment(t,e){const r=t instanceof FormData?t:t&&t.elements?new FormData(t):null;if(r)for(const t in e){const s=e[t];null!=s&&(r.set?r.set(t,s):r.append(t,s))}return r}_getLayerRequestOptions(t={}){const{layer:e,layer:{parsedUrl:r,gdbVersion:s}}=this;return{...t,query:{gdbVersion:s,layer:"dynamicDataSource"in e&&e.dynamicDataSource?JSON.stringify({source:e.dynamicDataSource}):void 0,...r.query,f:"json",...this._createRequestQueryOptions(t)},responseType:"json"}}async _areAllAssetsAlreadyMapped(t){const{layer:e}=this,{globalIdField:r,parsedUrl:s}=e,n="infoFor3D"in e?e.infoFor3D:null;if(null==n||null==r)return!1;const a=(0,J.JZ)(n);if(null==a)return!1;const o=(0,f.fj)(s.path,`../${a.id}`),u=new Array;for(const e of t){if(!(e.geometry.metadata.getExternalSourcesOnService(s).length>0))return!1;u.push(e)}const l=u.map(t=>t.getAttribute(r)).filter(i.Ru);if(0===l.length)return!1;const{assetMapFieldRoles:{parentGlobalId:c,assetHash:p}}=n,d=new V.A({where:`${c} IN (${l.map(t=>`'${t}'`)})`,outFields:[p,c],returnGeometry:!1}),h=await(0,U.s)(o,d),{features:y}=h;return 0!==y.length&&!u.some(t=>{const e=t.getAttribute(r);if(!e)return!0;const{metadata:n}=t.geometry,a=y.filter(t=>t.getAttribute(c)===e);if(0===a.length)return!0;const i=a.map(t=>t.getAttribute(p));return n.getExternalSourcesOnService(s).flatMap(({source:t})=>t.assets.flatMap(t=>t.parts.map(t=>t.partHash))).some(t=>i.every(e=>t!==e))})}};(0,s._)([(0,g.MZ)()],H.prototype,"type",void 0),(0,s._)([(0,g.MZ)({constructOnly:!0})],H.prototype,"layer",void 0),(0,s._)([(0,g.MZ)({constructOnly:!0})],H.prototype,"supportedSourceTypes",void 0),(0,s._)([(0,g.MZ)({readOnly:!0})],H.prototype,"queryTask",null),H=(0,s._)([(0,b.$)("esri.layers.graphics.sources.FeatureLayerSource")],H);const X=1e3},73836:(t,e,r)=>{r.d(e,{A:()=>y});var s=r(90237),n=r(69540),a=r(25482),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),u=r(58083),l=r(9093),c=r(67026),p=r(82534),d=r(51850),h=r(24770);let y=class extends(n.A.ClonableMixin(a.A)){constructor(t){super(t),this.translation=(0,d.vt)(),this.rotationAxis=(0,d.ci)(h.up),this.rotationAngle=0,this.scale=(0,d.fA)(1,1,1)}get rotation(){return(0,h.i4)(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=(0,d.o8)((0,h.yo)(t)),this.rotationAngle=(0,h.g7)(t)}get localMatrix(){const t=(0,l.vt)();return(0,c.x8)(f,(0,h.yo)(this.rotation),(0,h.$I)(this.rotation)),(0,u.o1)(t,f,this.translation,this.scale),t}get localMatrixInverse(){return(0,u.B8)((0,l.vt)(),this.localMatrix)}equals(t){return this===t||null!=t&&(0,u.t2)(this.localMatrix,t.localMatrix)}};(0,s._)([(0,i.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"translation",void 0),(0,s._)([(0,i.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"rotationAxis",void 0),(0,s._)([(0,i.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],y.prototype,"rotationAngle",void 0),(0,s._)([(0,i.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],y.prototype,"scale",void 0),(0,s._)([(0,i.MZ)()],y.prototype,"rotation",null),(0,s._)([(0,i.MZ)()],y.prototype,"localMatrix",null),(0,s._)([(0,i.MZ)()],y.prototype,"localMatrixInverse",null),y=(0,s._)([(0,o.$)("esri.geometry.support.MeshTransform")],y);const f=(0,p.vt)()},82534:(t,e,r)=>{function s(){return[0,0,0,1]}function n(t){return[t[0],t[1],t[2],t[3]]}r.d(e,{o8:()=>n,vt:()=>s,zK:()=>a});const a=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:a,clone:n,create:s,fromValues:function(t,e,r,s){return[t,e,r,s]}},Symbol.toStringTag,{value:"Module"}))},95696:(t,e,r)=>{r.d(e,{A:()=>c});var s,n=r(90237),a=r(69540),i=r(25482),o=r(10107),u=(r(44208),r(53966),r(87811),r(93223)),l=r(40608);let c=class extends(a.A.ClonableMixin(i.A)){static{s=this}constructor(t){super(t),this.type="georeferenced",this.origin=null}static{this.absolute=new s}};(0,n._)([(0,u.e)({georeferenced:"georeferenced"},{readOnly:!0})],c.prototype,"type",void 0),(0,n._)([(0,o.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],c.prototype,"origin",void 0),c=s=(0,n._)([(0,l.$)("esri.geometry.support.MeshGeoreferencedVertexSpace")],c)},99352:(t,e,r)=>{r.d(e,{F:()=>s,P:()=>n});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},n={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}}}]);
|