@arcgis/core 6.0.0-next.30 → 6.0.0-next.31
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/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/00d1c99779bd91b1d10e.js +1 -0
- package/assets/esri/core/workers/chunks/0694c7bcfe71692e2ccf.js +1 -0
- package/assets/esri/core/workers/chunks/{e2c6cd8dac01e129ccfe.js → 0e445ec3523de9f2dfa2.js} +1 -1
- package/assets/esri/core/workers/chunks/0f6c0d42100c21367e5c.js +1 -0
- package/assets/esri/core/workers/chunks/16cda273927ab0a39544.js +1 -0
- package/assets/esri/core/workers/chunks/1a3f71c4d97c36050030.js +1 -0
- package/assets/esri/core/workers/chunks/{0b4481b57a611b15f65c.js → 1eaf8bfdd3765a90ccc2.js} +1 -1
- package/assets/esri/core/workers/chunks/{8ca2bb3c0551bb1898b6.js → 3fdcc383bbd9cf0d274c.js} +1 -1
- package/assets/esri/core/workers/chunks/{fefdd10bdd5a4c8d8ed0.js → 4741fac6b6b4202a97c5.js} +1 -1
- package/assets/esri/core/workers/chunks/{ad21757d78e372fa2ed6.js → 4a979fce1c971b614a18.js} +1 -1
- package/assets/esri/core/workers/chunks/4d8833f48348cbbcc947.js +1 -0
- package/assets/esri/core/workers/chunks/{865cebc5c982c040ab6f.js → 55a9eaeb152a3abada67.js} +1 -1
- package/assets/esri/core/workers/chunks/572aec57593a08b8045b.js +1 -0
- package/assets/esri/core/workers/chunks/6029773458ab98600f67.js +1 -0
- package/assets/esri/core/workers/chunks/6b5c073dddd89d06ed80.js +1 -0
- package/assets/esri/core/workers/chunks/7cc9d7a88b64e25fce14.js +1 -0
- package/assets/esri/core/workers/chunks/7e211d8a8ad6c6a7cf3e.js +1 -0
- package/assets/esri/core/workers/chunks/{64b360625c68cb863a08.js → 84940d8e14caf5a27e04.js} +1 -1
- package/assets/esri/core/workers/chunks/{c90388932a7825d9d933.js → 85de980c5b296ec69323.js} +1 -1
- package/assets/esri/core/workers/chunks/89dc49e784f7ba3b93ea.js +1 -0
- package/assets/esri/core/workers/chunks/{9d40786c5ceface786ba.js → 8a485130781b49dbf608.js} +1 -1
- package/assets/esri/core/workers/chunks/8d13f11d0bcc8d3a4bdf.js +1 -0
- package/assets/esri/core/workers/chunks/8da2a10318f49d0dc73a.js +1 -0
- package/assets/esri/core/workers/chunks/8e6276ddd8d094c61f08.js +1 -0
- package/assets/esri/core/workers/chunks/{1dc6f093028530a492e6.js → 90ba0af9690dc32b2958.js} +1 -1
- package/assets/esri/core/workers/chunks/{71f792a20077aa739f87.js → a607541959169741a943.js} +1 -1
- package/assets/esri/core/workers/chunks/b2d6b1ac9fbb50c7c8ab.js +1 -0
- package/assets/esri/core/workers/chunks/b657363113f4a37e634b.js +1 -0
- package/assets/esri/core/workers/chunks/b9cb92858a576eb6aa06.js +1 -0
- package/assets/esri/core/workers/chunks/{4419732baf3459a80e6d.js → ceb2d5b0a23f0ab81f68.js} +1 -1
- package/assets/esri/core/workers/chunks/{7030a4d0714a35995a58.js → d09d8cd43e846d467827.js} +1 -1
- package/assets/esri/core/workers/chunks/{12b84262dedc6b393136.js → d9a240a3c6bf85124474.js} +1 -1
- package/assets/esri/core/workers/chunks/{8f008eedb11685ee2048.js → e096c1d9d53af74d3207.js} +1 -1
- package/assets/esri/core/workers/chunks/e30fdde253e5521473a2.js +1 -0
- package/assets/esri/core/workers/chunks/e4e2edfdc85dd14e66d4.js +1 -0
- package/assets/esri/core/workers/chunks/{ba4520ddcb6a49988da6.js → f21edbfdcab111d8a6cd.js} +1 -1
- package/assets/esri/core/workers/chunks/f4d91d470ca5fea0bd26.js +1 -0
- package/assets/esri/core/workers/chunks/f717005e14a7e9141df7.js +1 -0
- package/assets/esri/core/workers/chunks/f75eec2cbc541eec9712.js +1 -0
- package/assets/esri/core/workers/chunks/{b5eff28cf482d920b9ea.js → f7fb6cb7f08c16384443.js} +1 -1
- package/assets/esri/core/workers/chunks/fcc3902d6d9eda6f09f5.js +1 -0
- package/assets/esri/core/workers/chunks/{28a821de9dbf10324033.js → fd031150d3a7f896e6b3.js} +1 -1
- package/assets/esri/core/workers/chunks/{cc97e4fd0dacad970a23.js → ffaaa388773e60869df0.js} +1 -1
- package/config.js +1 -1
- package/core/scheduling.js +1 -1
- package/geometry/Mesh.d.ts +2 -125
- package/geometry/Mesh.js +1 -1
- package/geometry/support/meshErrors.js +1 -1
- package/geometry/support/plane.js +1 -1
- package/geometry/support/polygonUtils.js +1 -1
- package/interfaces.d.ts +0 -3
- package/kernel.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/raster/functions/rasterProjectionHelper.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/package.json +2 -2
- package/support/arcadeUtils.js +1 -1
- package/views/2d/engine/webgl/SpriteMosaic.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightConfiguration.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightEditTool.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightItemTool.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightManipulators.js +1 -1
- package/views/3d/environment/SunLighting.d.ts +10 -8
- package/views/3d/environment/VirtualLighting.d.ts +10 -8
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/support/renderInfoUtils/polygon.js +1 -1
- package/views/3d/terrain/PatchGeometryFactory.js +1 -1
- package/views/3d/terrain/PlanarPatch.js +1 -1
- package/views/3d/terrain/SphericalPatch.js +1 -1
- package/views/3d/webgl-engine/lib/Path.js +1 -1
- package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
- package/views/3d/webgl-engine/lib/PathExtruder.js +1 -1
- package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
- package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
- package/views/support/TextureCompressionWorker.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/webscene/Environment.d.ts +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
- package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/assets/esri/core/workers/chunks/02335385b1476fe322eb.js +0 -1
- package/assets/esri/core/workers/chunks/07b726a46864501b90a0.js +0 -1
- package/assets/esri/core/workers/chunks/189321d88026bd7e6d3e.js +0 -1
- package/assets/esri/core/workers/chunks/18d47ab571b613fbe719.js +0 -1
- package/assets/esri/core/workers/chunks/1967b9c96045a5802d08.js +0 -1
- package/assets/esri/core/workers/chunks/199a7f97916679e0257c.js +0 -1
- package/assets/esri/core/workers/chunks/1d96fbad881a7d14a950.js +0 -1
- package/assets/esri/core/workers/chunks/2cd60fd062d954322c1f.js +0 -1
- package/assets/esri/core/workers/chunks/2d3e0e4442dbc6ec6def.js +0 -1
- package/assets/esri/core/workers/chunks/2f5d014d6a72108b0b3a.js +0 -1
- package/assets/esri/core/workers/chunks/3105336a05f38a95ebea.js +0 -1
- package/assets/esri/core/workers/chunks/4fb2fcc95f852bf8f86c.js +0 -1
- package/assets/esri/core/workers/chunks/59bc55880e6fd8ce20c0.js +0 -1
- package/assets/esri/core/workers/chunks/5f787809b74eed7b9a91.js +0 -1
- package/assets/esri/core/workers/chunks/6a7de221cea4426cb490.js +0 -1
- package/assets/esri/core/workers/chunks/7a0b4dc0cda190367a39.js +0 -1
- package/assets/esri/core/workers/chunks/7d3f7940815fa5dc244e.js +0 -1
- package/assets/esri/core/workers/chunks/999c23da883eb11cb29e.js +0 -1
- package/assets/esri/core/workers/chunks/9bc3afe7013ef4ae737b.js +0 -1
- package/assets/esri/core/workers/chunks/bab1d010970d98c25470.js +0 -1
- package/assets/esri/core/workers/chunks/c4f78a481f43cfae7b63.js +0 -1
- package/assets/esri/core/workers/chunks/dcf6024dc19428ff2b9d.js +0 -1
- package/assets/esri/core/workers/chunks/ee0dc906cc7979080329.js +0 -1
- package/assets/esri/core/workers/chunks/f0d0ed155275c2e6d3da.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4844],{80200(e,t,r){r.d(t,{d:()=>p});const i={Base64:0,Hex:1,String:2,Raw:3};function s(e,t){let r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function n(e,t,r,i,n,a){return s(function(e,t){return e<<t|e>>>32-t}(s(s(t,e),s(i,a)),n),r)}function a(e,t,r,i,s,a,o){return n(t&r|~t&i,e,t,s,a,o)}function o(e,t,r,i,s,a,o){return n(t&i|r&~i,e,t,s,a,o)}function l(e,t,r,i,s,a,o){return n(t^r^i,e,t,s,a,o)}function u(e,t,r,i,s,a,o){return n(r^(t|~i),e,t,s,a,o)}function d(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,n=-1732584194,d=271733878;for(let t=0;t<e.length;t+=16){let p=r,c=i,h=n,f=d;r=a(r,i,n,d,e[t],7,-680876936),d=a(d,r,i,n,e[t+1],12,-389564586),n=a(n,d,r,i,e[t+2],17,606105819),i=a(i,n,d,r,e[t+3],22,-1044525330),r=a(r,i,n,d,e[t+4],7,-176418897),d=a(d,r,i,n,e[t+5],12,1200080426),n=a(n,d,r,i,e[t+6],17,-1473231341),i=a(i,n,d,r,e[t+7],22,-45705983),r=a(r,i,n,d,e[t+8],7,1770035416),d=a(d,r,i,n,e[t+9],12,-1958414417),n=a(n,d,r,i,e[t+10],17,-42063),i=a(i,n,d,r,e[t+11],22,-1990404162),r=a(r,i,n,d,e[t+12],7,1804603682),d=a(d,r,i,n,e[t+13],12,-40341101),n=a(n,d,r,i,e[t+14],17,-1502002290),i=a(i,n,d,r,e[t+15],22,1236535329),r=o(r,i,n,d,e[t+1],5,-165796510),d=o(d,r,i,n,e[t+6],9,-1069501632),n=o(n,d,r,i,e[t+11],14,643717713),i=o(i,n,d,r,e[t],20,-373897302),r=o(r,i,n,d,e[t+5],5,-701558691),d=o(d,r,i,n,e[t+10],9,38016083),n=o(n,d,r,i,e[t+15],14,-660478335),i=o(i,n,d,r,e[t+4],20,-405537848),r=o(r,i,n,d,e[t+9],5,568446438),d=o(d,r,i,n,e[t+14],9,-1019803690),n=o(n,d,r,i,e[t+3],14,-187363961),i=o(i,n,d,r,e[t+8],20,1163531501),r=o(r,i,n,d,e[t+13],5,-1444681467),d=o(d,r,i,n,e[t+2],9,-51403784),n=o(n,d,r,i,e[t+7],14,1735328473),i=o(i,n,d,r,e[t+12],20,-1926607734),r=l(r,i,n,d,e[t+5],4,-378558),d=l(d,r,i,n,e[t+8],11,-2022574463),n=l(n,d,r,i,e[t+11],16,1839030562),i=l(i,n,d,r,e[t+14],23,-35309556),r=l(r,i,n,d,e[t+1],4,-1530992060),d=l(d,r,i,n,e[t+4],11,1272893353),n=l(n,d,r,i,e[t+7],16,-155497632),i=l(i,n,d,r,e[t+10],23,-1094730640),r=l(r,i,n,d,e[t+13],4,681279174),d=l(d,r,i,n,e[t],11,-358537222),n=l(n,d,r,i,e[t+3],16,-722521979),i=l(i,n,d,r,e[t+6],23,76029189),r=l(r,i,n,d,e[t+9],4,-640364487),d=l(d,r,i,n,e[t+12],11,-421815835),n=l(n,d,r,i,e[t+15],16,530742520),i=l(i,n,d,r,e[t+2],23,-995338651),r=u(r,i,n,d,e[t],6,-198630844),d=u(d,r,i,n,e[t+7],10,1126891415),n=u(n,d,r,i,e[t+14],15,-1416354905),i=u(i,n,d,r,e[t+5],21,-57434055),r=u(r,i,n,d,e[t+12],6,1700485571),d=u(d,r,i,n,e[t+3],10,-1894986606),n=u(n,d,r,i,e[t+10],15,-1051523),i=u(i,n,d,r,e[t+1],21,-2054922799),r=u(r,i,n,d,e[t+8],6,1873313359),d=u(d,r,i,n,e[t+15],10,-30611744),n=u(n,d,r,i,e[t+6],15,-1560198380),i=u(i,n,d,r,e[t+13],21,1309151649),r=u(r,i,n,d,e[t+4],6,-145523070),d=u(d,r,i,n,e[t+11],10,-1120210379),n=u(n,d,r,i,e[t+2],15,718787259),i=u(i,n,d,r,e[t+9],21,-343485551),r=s(r,p),i=s(i,c),n=s(n,h),d=s(d,f)}return[r,i,n,d]}function p(e,t=i.Hex){let r=t||i.Base64,s=d(function(e){let t=[];for(let r=0,i=8*e.length;r<i;r+=8)t[r>>5]|=(255&e.charCodeAt(r/8))<<r%32;return t}(e),8*e.length);switch(r){case i.Raw:return s;case i.Hex:return function(e){let t="0123456789abcdef",r=[];for(let i=0,s=4*e.length;i<s;i++)r.push(t.charAt(e[i>>2]>>i%4*8+4&15)+t.charAt(e[i>>2]>>i%4*8&15));return r.join("")}(s);case i.String:return function(e){let t=[];for(let r=0,i=32*e.length;r<i;r+=8)t.push(String.fromCharCode(e[r>>5]>>>r%32&255));return t.join("")}(s);case i.Base64:return function(e){let t=[];for(let r=0,i=4*e.length;r<i;r+=3){let i=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let s=0;s<4;s++)8*r+6*s>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-s)&63))}return t.join("")}(s)}}r.d(t,["T",0,i])},87024(e,t,r){r.d(t,{P:()=>h});var i=r(49186),s=r(80200),n=r(76553),a=r(84952),o=r(13069),l=r(96156),u=r(35666),d=r(10107),p=r(85648),c=r(97159);function h(e){let t=e?.origins??[void 0];return(r,i)=>{let s=function(e,t,r){if("resource"===e?.type)return function(e,t,r){let i=(0,l.z4)(t,r);return{type:String,read:(e,t,r)=>{let s=(0,c.r)(e,t,r);return i.type===String?s:"function"==typeof i.type?new i.type({url:s}):void 0},write:{isRequired:i.json?.write?.isRequired,writer(t,s,o,l){if(!l?.resources)return"string"==typeof t?void(s[o]=(0,c.t)(t,l)):void(s[o]=t.write({},l));let d=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),h=(0,c.t)(d,{...l,verifyItemRelativeUrls:l?.verifyItemRelativeUrls?{writtenUrls:l.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},1),m=i.type!==String&&(!(0,n.H)(this)||l?.origin&&this.originIdOf(r)>(0,u.aB)(l.origin)),v={object:this,propertyName:r,value:t,targetUrl:h,dest:s,targetPropertyName:o,context:l,params:e};l?.portalItem&&h&&!(0,a.oP)(h)?m&&e?.contentAddressed?f(v):m?function(e){let{context:t,targetUrl:r,params:i,value:s,dest:n,targetPropertyName:o}=e;if(!t.portalItem)return;let l=t.portalItem.resourceFromPath(r),u=g(s,r,t),d=(0,p.n)(u),c=(0,a.Zo)(l.path),h=i?.compress??!1;d===c?(t.resources&&y({...e,resource:l,content:u,compress:h,updates:t.resources.toUpdate}),n[o]=r):f(e)}(v):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(v):l?.portalItem&&(null==h||null!=(0,c.i)(h)||(0,a.w8)(h)||m)?f(v):s[o]=h}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{let{read:e,write:t}=c.b;return{read:e,write:t}}}}(e,r,i);for(let e of t){let t=(0,d.rM)(r,e,i);for(let e in s)t[e]=s[e]}}}function f(e){let{targetUrl:t,params:r,value:n,context:l,dest:u,targetPropertyName:d}=e;if(!l.portalItem)return;let h=(0,c.p)(t),f=g(n,t,l);if(r?.contentAddressed&&"json"!==f.type)return void l.messages?.push(new i.A("persistable:contentAddressingUnsupported",`Property "${d}" is trying to serializing a resource with content of type ${f.type} with content addressing. Content addressing is only supported for json resources.`,{content:f}));let m=r?.contentAddressed&&"json"===f.type?(0,s.d)(f.jsonString):h?.filename??(0,o.lk)(),v=r?.prefix??h?.prefix,w=(0,a.fj)(v,m),b=`${w}.${(0,p.n)(f)}`;if(r?.contentAddressed&&l.resources&&"json"===f.type){let e=l.resources.toKeep.find(({resource:e})=>e.path===b)??l.resources.toAdd.find(({resource:e})=>e.path===b);if(e)return void(u[d]=e.resource.itemRelativeUrl)}let M=l.portalItem.resourceFromPath(b);(0,a.w8)(t)&&l.resources&&l.resources.pendingOperations.push((0,a.tk)(t).then(e=>{M.path=`${w}.${(0,p.n)({type:"blob",blob:e})}`,u[d]=M.itemRelativeUrl}).catch(()=>{}));let I=r?.compress??!1;l.resources&&y({...e,resource:M,content:f,compress:I,updates:l.resources.toAdd}),u[d]=M.itemRelativeUrl}function y({object:e,propertyName:t,updates:r,resource:i,content:s,compress:n}){r.push({resource:i,content:s,compress:n,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function g(e,t,r){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(r))}}},48163(e,t,r){function i(){return[0,0]}function s(e){return[e[0],e[1]]}function n(e,t){return[e,t]}function a(){return n(1,1)}function o(){return n(-1,-1)}function l(){return n(1,0)}function u(){return n(0,1)}r.d(t,{fA:()=>n,o8:()=>s,vt:()=>i});const d=a(),p=o(),c=l(),h=u();Object.freeze(Object.defineProperty({__proto__:null,NEGATIVE_ONES:p,ONES:d,UNIT_X:c,UNIT_Y:h,ZEROS:[0,0],clone:s,create:i,freeze:function(e,t){return[e,t]},fromArray:function(e,t=[0,0]){let r=Math.min(2,e.length);for(let i=0;i<r;++i)t[i]=e[i];return t},fromValues:n,negativeOnes:o,ones:a,unitX:l,unitY:u,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"})),r.d(t,["IA",0,p,"Un",0,d])},58083(e,t,r){r.d(t,{$0:()=>m,$h:()=>x,B8:()=>d,C:()=>n,D_:()=>o,N9:()=>w,O7:()=>C,Qw:()=>u,Tl:()=>c,X_:()=>A,e$:()=>f,eL:()=>y,hM:()=>v,hZ:()=>a,hs:()=>h,kN:()=>g,l:()=>F,lw:()=>p,mg:()=>l,o1:()=>S,sC:()=>I,t2:()=>P,t5:()=>L,tZ:()=>_,ut:()=>O});var i=r(51850),s=r(34304);function n(e,t){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}function a(e,t,r,i,s,n,a,o,l,u,d,p,c,h,f,y,g){return e[0]=t,e[1]=r,e[2]=i,e[3]=s,e[4]=n,e[5]=a,e[6]=o,e[7]=l,e[8]=u,e[9]=d,e[10]=p,e[11]=c,e[12]=h,e[13]=f,e[14]=y,e[15]=g,e}function o(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function l(e,t){if(e===t){let r=t[1],i=t[2],s=t[3],n=t[6],a=t[7],o=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=i,e[9]=n,e[11]=t[14],e[12]=s,e[13]=a,e[14]=o}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function u(e,t){return d(e,t)||o(e),e}function d(e,t){let r=t[0],i=t[1],s=t[2],n=t[3],a=t[4],o=t[5],l=t[6],u=t[7],d=t[8],p=t[9],c=t[10],h=t[11],f=t[12],y=t[13],g=t[14],m=t[15],v=r*o-i*a,w=r*l-s*a,b=r*u-n*a,M=i*l-s*o,I=i*u-n*o,A=s*u-n*l,F=d*y-p*f,S=d*g-c*f,C=d*m-h*f,x=p*g-c*y,L=p*m-h*y,j=c*m-h*g,P=v*j-w*L+b*x+M*C-I*S+A*F;return P?(P=1/P,e[0]=(o*j-l*L+u*x)*P,e[1]=(s*L-i*j-n*x)*P,e[2]=(y*A-g*I+m*M)*P,e[3]=(c*I-p*A-h*M)*P,e[4]=(l*C-a*j-u*S)*P,e[5]=(r*j-s*C+n*S)*P,e[6]=(g*b-f*A-m*w)*P,e[7]=(d*A-c*b+h*w)*P,e[8]=(a*L-o*C+u*F)*P,e[9]=(i*C-r*L-n*F)*P,e[10]=(f*I-y*b+m*v)*P,e[11]=(p*b-d*I-h*v)*P,e[12]=(o*S-a*x-l*F)*P,e[13]=(r*x-i*S+s*F)*P,e[14]=(y*w-f*M-g*v)*P,e[15]=(d*M-p*w+c*v)*P,e):null}function p(e,t,r){let i=t[0],s=t[1],n=t[2],a=t[3],o=t[4],l=t[5],u=t[6],d=t[7],p=t[8],c=t[9],h=t[10],f=t[11],y=t[12],g=t[13],m=t[14],v=t[15],w=r[0],b=r[1],M=r[2],I=r[3];return e[0]=w*i+b*o+M*p+I*y,e[1]=w*s+b*l+M*c+I*g,e[2]=w*n+b*u+M*h+I*m,e[3]=w*a+b*d+M*f+I*v,w=r[4],b=r[5],M=r[6],I=r[7],e[4]=w*i+b*o+M*p+I*y,e[5]=w*s+b*l+M*c+I*g,e[6]=w*n+b*u+M*h+I*m,e[7]=w*a+b*d+M*f+I*v,w=r[8],b=r[9],M=r[10],I=r[11],e[8]=w*i+b*o+M*p+I*y,e[9]=w*s+b*l+M*c+I*g,e[10]=w*n+b*u+M*h+I*m,e[11]=w*a+b*d+M*f+I*v,w=r[12],b=r[13],M=r[14],I=r[15],e[12]=w*i+b*o+M*p+I*y,e[13]=w*s+b*l+M*c+I*g,e[14]=w*n+b*u+M*h+I*m,e[15]=w*a+b*d+M*f+I*v,e}function c(e,t,r){let i=r[0],s=r[1],n=r[2];if(t===e)e[12]=t[0]*i+t[4]*s+t[8]*n+t[12],e[13]=t[1]*i+t[5]*s+t[9]*n+t[13],e[14]=t[2]*i+t[6]*s+t[10]*n+t[14],e[15]=t[3]*i+t[7]*s+t[11]*n+t[15];else{let r=t[0],a=t[1],o=t[2],l=t[3],u=t[4],d=t[5],p=t[6],c=t[7],h=t[8],f=t[9],y=t[10],g=t[11];e[0]=r,e[1]=a,e[2]=o,e[3]=l,e[4]=u,e[5]=d,e[6]=p,e[7]=c,e[8]=h,e[9]=f,e[10]=y,e[11]=g,e[12]=r*i+u*s+h*n+t[12],e[13]=a*i+d*s+f*n+t[13],e[14]=o*i+p*s+y*n+t[14],e[15]=l*i+c*s+g*n+t[15]}return e}function h(e,t,r){let i=r[0],s=r[1],n=r[2];return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*s,e[5]=t[5]*s,e[6]=t[6]*s,e[7]=t[7]*s,e[8]=t[8]*n,e[9]=t[9]*n,e[10]=t[10]*n,e[11]=t[11]*n,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function f(e,t,r,i){let a=i[0],o=i[1],l=i[2],u=Math.sqrt(a*a+o*o+l*l);if(u<=(0,s.FD)())return void n(e,t);u=1/u,a*=u,o*=u,l*=u;let d=Math.sin(r),p=Math.cos(r),c=1-p,h=t[0],f=t[1],y=t[2],g=t[3],m=t[4],v=t[5],w=t[6],b=t[7],M=t[8],I=t[9],A=t[10],F=t[11],S=a*a*c+p,C=o*a*c+l*d,x=l*a*c-o*d,L=a*o*c-l*d,j=o*o*c+p,P=l*o*c+a*d,O=a*l*c+o*d,_=o*l*c-a*d,T=l*l*c+p;e[0]=h*S+m*C+M*x,e[1]=f*S+v*C+I*x,e[2]=y*S+w*C+A*x,e[3]=g*S+b*C+F*x,e[4]=h*L+m*j+M*P,e[5]=f*L+v*j+I*P,e[6]=y*L+w*j+A*P,e[7]=g*L+b*j+F*P,e[8]=h*O+m*_+M*T,e[9]=f*O+v*_+I*T,e[10]=y*O+w*_+A*T,e[11]=g*O+b*_+F*T,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15])}function y(e,t,r){let i=Math.sin(r),s=Math.cos(r),n=t[4],a=t[5],o=t[6],l=t[7],u=t[8],d=t[9],p=t[10],c=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=n*s+u*i,e[5]=a*s+d*i,e[6]=o*s+p*i,e[7]=l*s+c*i,e[8]=u*s-n*i,e[9]=d*s-a*i,e[10]=p*s-o*i,e[11]=c*s-l*i,e}function g(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}function m(e,t,r){if(0===t)return o(e);let i=r[0],n=r[1],a=r[2],l=Math.sqrt(i*i+n*n+a*a);if(l<=(0,s.FD)())return null;l=1/l,i*=l,n*=l,a*=l;let u=Math.sin(t),d=Math.cos(t),p=1-d;return e[0]=i*i*p+d,e[1]=n*i*p+a*u,e[2]=a*i*p-n*u,e[3]=0,e[4]=i*n*p-a*u,e[5]=n*n*p+d,e[6]=a*n*p+i*u,e[7]=0,e[8]=i*a*p+n*u,e[9]=n*a*p-i*u,e[10]=a*a*p+d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function v(e,t){let r=Math.sin(t),i=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function w(e,t){let r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function b(e,t,r){let i=t[0],s=t[1],n=t[2],a=t[3],o=i+i,l=s+s,u=n+n,d=i*o,p=i*l,c=i*u,h=s*l,f=s*u,y=n*u,g=a*o,m=a*l,v=a*u;return e[0]=1-(h+y),e[1]=p+v,e[2]=c-m,e[3]=0,e[4]=p-v,e[5]=1-(d+y),e[6]=f+g,e[7]=0,e[8]=c+m,e[9]=f-g,e[10]=1-(d+h),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}const M=(0,i.vt)();function I(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function A(e,t){let r=t[0],i=t[1],s=t[2],n=t[4],a=t[5],o=t[6],l=t[8],u=t[9],d=t[10];return e[0]=Math.sqrt(r*r+i*i+s*s),e[1]=Math.sqrt(n*n+a*a+o*o),e[2]=Math.sqrt(l*l+u*u+d*d),e}function F(e,t){let r=t[0]+t[5]+t[10],i=0;return r>0?(i=2*Math.sqrt(r+1),e[3]=.25*i,e[0]=(t[6]-t[9])/i,e[1]=(t[8]-t[2])/i,e[2]=(t[1]-t[4])/i):t[0]>t[5]&&t[0]>t[10]?(i=2*Math.sqrt(1+t[0]-t[5]-t[10]),e[3]=(t[6]-t[9])/i,e[0]=.25*i,e[1]=(t[1]+t[4])/i,e[2]=(t[8]+t[2])/i):t[5]>t[10]?(i=2*Math.sqrt(1+t[5]-t[0]-t[10]),e[3]=(t[8]-t[2])/i,e[0]=(t[1]+t[4])/i,e[1]=.25*i,e[2]=(t[6]+t[9])/i):(i=2*Math.sqrt(1+t[10]-t[0]-t[5]),e[3]=(t[1]-t[4])/i,e[0]=(t[8]+t[2])/i,e[1]=(t[6]+t[9])/i,e[2]=.25*i),e}function S(e,t,r,i){let s=t[0],n=t[1],a=t[2],o=t[3],l=s+s,u=n+n,d=a+a,p=s*l,c=s*u,h=s*d,f=n*u,y=n*d,g=a*d,m=o*l,v=o*u,w=o*d,b=i[0],M=i[1],I=i[2];return e[0]=(1-(f+g))*b,e[1]=(c+w)*b,e[2]=(h-v)*b,e[3]=0,e[4]=(c-w)*M,e[5]=(1-(p+g))*M,e[6]=(y+m)*M,e[7]=0,e[8]=(h+v)*I,e[9]=(y-m)*I,e[10]=(1-(p+f))*I,e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function C(e,t,r,i,s){let n=t[0],a=t[1],o=t[2],l=t[3],u=n+n,d=a+a,p=o+o,c=n*u,h=n*d,f=n*p,y=a*d,g=a*p,m=o*p,v=l*u,w=l*d,b=l*p,M=i[0],I=i[1],A=i[2],F=s[0],S=s[1],C=s[2],x=(1-(y+m))*M,L=(h+b)*M,j=(f-w)*M,P=(h-b)*I,O=(1-(c+m))*I,_=(g+v)*I,T=(f+w)*A,R=(g-v)*A,Z=(1-(c+y))*A;return e[0]=x,e[1]=L,e[2]=j,e[3]=0,e[4]=P,e[5]=O,e[6]=_,e[7]=0,e[8]=T,e[9]=R,e[10]=Z,e[11]=0,e[12]=r[0]+F-(x*F+P*S+T*C),e[13]=r[1]+S-(L*F+O*S+R*C),e[14]=r[2]+C-(j*F+_*S+Z*C),e[15]=1,e}function x(e,t,r,i,s,n,a){let o=1/(r-t),l=1/(s-i),u=1/(n-a);return e[0]=2*n*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*n*l,e[6]=0,e[7]=0,e[8]=(r+t)*o,e[9]=(s+i)*l,e[10]=(a+n)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=a*n*2*u,e[15]=0,e}function L(e,t,r,i){let n=t[0],a=t[1],l=t[2],u=n-r[0],d=a-r[1],p=l-r[2],c=(0,s.FD)();if(Math.abs(u)<c&&Math.abs(d)<c&&Math.abs(p)<c)return void o(e);let h=1/Math.sqrt(u*u+d*d+p*p);u*=h,d*=h,p*=h;let f=i[0],y=i[1],g=i[2],m=y*p-g*d,v=g*u-f*p,w=f*d-y*u;h=Math.sqrt(m*m+v*v+w*w),h?(h=1/h,m*=h,v*=h,w*=h):(m=0,v=0,w=0);let b=d*w-p*v,M=p*m-u*w,I=u*v-d*m;h=Math.sqrt(b*b+M*M+I*I),h?(h=1/h,b*=h,M*=h,I*=h):(b=0,M=0,I=0),e[0]=m,e[1]=b,e[2]=u,e[3]=0,e[4]=v,e[5]=M,e[6]=d,e[7]=0,e[8]=w,e[9]=I,e[10]=p,e[11]=0,e[12]=-(m*n+v*a+w*l),e[13]=-(b*n+M*a+I*l),e[14]=-(u*n+d*a+p*l),e[15]=1}function j(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e[9]=t[9]-r[9],e[10]=t[10]-r[10],e[11]=t[11]-r[11],e[12]=t[12]-r[12],e[13]=t[13]-r[13],e[14]=t[14]-r[14],e[15]=t[15]-r[15],e}function P(e,t){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]}function O(e){let t=(0,s.FD)(),r=e[0],i=e[1],n=e[2],a=e[4],o=e[5],l=e[6],u=e[8],d=e[9],p=e[10];return Math.abs(1-(r*r+a*a+u*u))<=t&&Math.abs(1-(i*i+o*o+d*d))<=t&&Math.abs(1-(n*n+l*l+p*p))<=t}function _(e){return 1===e[0]&&0===e[1]&&0===e[2]&&0===e[4]&&1===e[5]&&0===e[6]&&0===e[8]&&0===e[9]&&1===e[10]}const T=p,R=j;Object.freeze(Object.defineProperty({__proto__:null,add:function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e[9]=t[9]+r[9],e[10]=t[10]+r[10],e[11]=t[11]+r[11],e[12]=t[12]+r[12],e[13]=t[13]+r[13],e[14]=t[14]+r[14],e[15]=t[15]+r[15],e},adjoint:function(e,t){let r=t[0],i=t[1],s=t[2],n=t[3],a=t[4],o=t[5],l=t[6],u=t[7],d=t[8],p=t[9],c=t[10],h=t[11],f=t[12],y=t[13],g=t[14],m=t[15];return e[0]=o*(c*m-h*g)-p*(l*m-u*g)+y*(l*h-u*c),e[1]=-(i*(c*m-h*g)-p*(s*m-n*g)+y*(s*h-n*c)),e[2]=i*(l*m-u*g)-o*(s*m-n*g)+y*(s*u-n*l),e[3]=-(i*(l*h-u*c)-o*(s*h-n*c)+p*(s*u-n*l)),e[4]=-(a*(c*m-h*g)-d*(l*m-u*g)+f*(l*h-u*c)),e[5]=r*(c*m-h*g)-d*(s*m-n*g)+f*(s*h-n*c),e[6]=-(r*(l*m-u*g)-a*(s*m-n*g)+f*(s*u-n*l)),e[7]=r*(l*h-u*c)-a*(s*h-n*c)+d*(s*u-n*l),e[8]=a*(p*m-h*y)-d*(o*m-u*y)+f*(o*h-u*p),e[9]=-(r*(p*m-h*y)-d*(i*m-n*y)+f*(i*h-n*p)),e[10]=r*(o*m-u*y)-a*(i*m-n*y)+f*(i*u-n*o),e[11]=-(r*(o*h-u*p)-a*(i*h-n*p)+d*(i*u-n*o)),e[12]=-(a*(p*g-c*y)-d*(o*g-l*y)+f*(o*c-l*p)),e[13]=r*(p*g-c*y)-d*(i*g-s*y)+f*(i*c-s*p),e[14]=-(r*(o*g-l*y)-a*(i*g-s*y)+f*(i*l-s*o)),e[15]=r*(o*c-l*p)-a*(i*c-s*p)+d*(i*l-s*o),e},copy:n,determinant:function(e){let t=e[0],r=e[1],i=e[2],s=e[3],n=e[4],a=e[5],o=e[6],l=e[7],u=e[8],d=e[9],p=e[10],c=e[11],h=e[12],f=e[13],y=e[14],g=e[15];return(t*a-r*n)*(p*g-c*y)-(t*o-i*n)*(d*g-c*f)+(t*l-s*n)*(d*y-p*f)+(r*o-i*a)*(u*g-c*h)-(r*l-s*a)*(u*y-p*h)+(i*l-s*o)*(u*f-d*h)},equals:function(e,t){if(e===t)return!0;let r=e[0],i=e[1],n=e[2],a=e[3],o=e[4],l=e[5],u=e[6],d=e[7],p=e[8],c=e[9],h=e[10],f=e[11],y=e[12],g=e[13],m=e[14],v=e[15],w=t[0],b=t[1],M=t[2],I=t[3],A=t[4],F=t[5],S=t[6],C=t[7],x=t[8],L=t[9],j=t[10],P=t[11],O=t[12],_=t[13],T=t[14],R=t[15],Z=(0,s.FD)();return Math.abs(r-w)<=Z*Math.max(1,Math.abs(r),Math.abs(w))&&Math.abs(i-b)<=Z*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(n-M)<=Z*Math.max(1,Math.abs(n),Math.abs(M))&&Math.abs(a-I)<=Z*Math.max(1,Math.abs(a),Math.abs(I))&&Math.abs(o-A)<=Z*Math.max(1,Math.abs(o),Math.abs(A))&&Math.abs(l-F)<=Z*Math.max(1,Math.abs(l),Math.abs(F))&&Math.abs(u-S)<=Z*Math.max(1,Math.abs(u),Math.abs(S))&&Math.abs(d-C)<=Z*Math.max(1,Math.abs(d),Math.abs(C))&&Math.abs(p-x)<=Z*Math.max(1,Math.abs(p),Math.abs(x))&&Math.abs(c-L)<=Z*Math.max(1,Math.abs(c),Math.abs(L))&&Math.abs(h-j)<=Z*Math.max(1,Math.abs(h),Math.abs(j))&&Math.abs(f-P)<=Z*Math.max(1,Math.abs(f),Math.abs(P))&&Math.abs(y-O)<=Z*Math.max(1,Math.abs(y),Math.abs(O))&&Math.abs(g-_)<=Z*Math.max(1,Math.abs(g),Math.abs(_))&&Math.abs(m-T)<=Z*Math.max(1,Math.abs(m),Math.abs(T))&&Math.abs(v-R)<=Z*Math.max(1,Math.abs(v),Math.abs(R))},exactEquals:P,frob:function(e){return Math.sqrt(e[0]**2+e[1]**2+e[2]**2+e[3]**2+e[4]**2+e[5]**2+e[6]**2+e[7]**2+e[8]**2+e[9]**2+e[10]**2+e[11]**2+e[12]**2+e[13]**2+e[14]**2+e[15]**2)},fromQuat:function(e,t){let r=t[0],i=t[1],s=t[2],n=t[3],a=r+r,o=i+i,l=s+s,u=r*a,d=i*a,p=i*o,c=s*a,h=s*o,f=s*l,y=n*a,g=n*o,m=n*l;return e[0]=1-p-f,e[1]=d+m,e[2]=c-g,e[3]=0,e[4]=d-m,e[5]=1-u-f,e[6]=h+y,e[7]=0,e[8]=c+g,e[9]=h-y,e[10]=1-u-p,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},fromQuat2:function(e,t){let r=M,i=-t[0],s=-t[1],n=-t[2],a=t[3],o=t[4],l=t[5],u=t[6],d=t[7],p=i*i+s*s+n*n+a*a;return p>0?(r[0]=2*(o*a+d*i+l*n-u*s)/p,r[1]=2*(l*a+d*s+u*i-o*n)/p,r[2]=2*(u*a+d*n+o*s-l*i)/p):(r[0]=2*(o*a+d*i+l*n-u*s),r[1]=2*(l*a+d*s+u*i-o*n),r[2]=2*(u*a+d*n+o*s-l*i)),b(e,t,r),e},fromRotation:m,fromRotationTranslation:b,fromRotationTranslationScale:S,fromRotationTranslationScaleOrigin:C,fromScaling:function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},fromTranslation:g,fromXRotation:v,fromYRotation:function(e,t){let r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},fromZRotation:w,frustum:x,getRotation:F,getScale:A,getTranslation:I,hasIdentityRotation:_,identity:o,invert:d,invertOrIdentity:u,isOrthoNormal:O,lookAt:L,mul:T,multiply:p,multiplyScalar:function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e[9]=t[9]*r,e[10]=t[10]*r,e[11]=t[11]*r,e[12]=t[12]*r,e[13]=t[13]*r,e[14]=t[14]*r,e[15]=t[15]*r,e},multiplyScalarAndAdd:function(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e[3]=t[3]+r[3]*i,e[4]=t[4]+r[4]*i,e[5]=t[5]+r[5]*i,e[6]=t[6]+r[6]*i,e[7]=t[7]+r[7]*i,e[8]=t[8]+r[8]*i,e[9]=t[9]+r[9]*i,e[10]=t[10]+r[10]*i,e[11]=t[11]+r[11]*i,e[12]=t[12]+r[12]*i,e[13]=t[13]+r[13]*i,e[14]=t[14]+r[14]*i,e[15]=t[15]+r[15]*i,e},ortho:function(e,t,r,i,s,n,a){let o=1/(t-r),l=1/(i-s),u=1/(n-a);return e[0]=-2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*o,e[13]=(s+i)*l,e[14]=(a+n)*u,e[15]=1,e},perspective:function(e,t,r,i,s){let n,a=1/Math.tan(t/2);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=s&&s!==1/0?(n=1/(i-s),e[10]=(s+i)*n,e[14]=2*s*i*n):(e[10]=-1,e[14]=-2*i),e},perspectiveFromFieldOfView:function(e,t,r,i){let s=Math.tan(t.upDegrees*Math.PI/180),n=Math.tan(t.downDegrees*Math.PI/180),a=Math.tan(t.leftDegrees*Math.PI/180),o=Math.tan(t.rightDegrees*Math.PI/180),l=2/(a+o),u=2/(s+n);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-(a-o)*l*.5,e[9]=(s-n)*u*.5,e[10]=i/(r-i),e[11]=-1,e[12]=0,e[13]=0,e[14]=i*r/(r-i),e[15]=0,e},rotate:f,rotateX:y,rotateY:function(e,t,r){let i=Math.sin(r),s=Math.cos(r),n=t[0],a=t[1],o=t[2],l=t[3],u=t[8],d=t[9],p=t[10],c=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=n*s-u*i,e[1]=a*s-d*i,e[2]=o*s-p*i,e[3]=l*s-c*i,e[8]=n*i+u*s,e[9]=a*i+d*s,e[10]=o*i+p*s,e[11]=l*i+c*s,e},rotateZ:function(e,t,r){let i=Math.sin(r),s=Math.cos(r),n=t[0],a=t[1],o=t[2],l=t[3],u=t[4],d=t[5],p=t[6],c=t[7];return t!==e&&(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[0]=n*s+u*i,e[1]=a*s+d*i,e[2]=o*s+p*i,e[3]=l*s+c*i,e[4]=u*s-n*i,e[5]=d*s-a*i,e[6]=p*s-o*i,e[7]=c*s-l*i,e},scale:h,set:a,str:function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"},sub:R,subtract:j,targetTo:function(e,t,r,i){let s=t[0],n=t[1],a=t[2],o=i[0],l=i[1],u=i[2],d=s-r[0],p=n-r[1],c=a-r[2],h=d*d+p*p+c*c;h>0&&(h=1/Math.sqrt(h),d*=h,p*=h,c*=h);let f=l*c-u*p,y=u*d-o*c,g=o*p-l*d;return h=f*f+y*y+g*g,h>0&&(h=1/Math.sqrt(h),f*=h,y*=h,g*=h),e[0]=f,e[1]=y,e[2]=g,e[3]=0,e[4]=p*g-c*y,e[5]=c*f-d*g,e[6]=d*y-p*f,e[7]=0,e[8]=d,e[9]=p,e[10]=c,e[11]=0,e[12]=s,e[13]=n,e[14]=a,e[15]=1,e},translate:c,transpose:l},Symbol.toStringTag,{value:"Module"}))},54239(e,t,r){r.d(t,{A:()=>m});var i,s=r(32198),n=r(4576),a=r(66552),o=r(25482),l=r(86211),u=r(67076),d=r(91429),p=r(97348),c=r(43937),h=r(36005);const f=(0,a.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),y=f.jsonValues.slice();(0,n.Xy)(y,"orthometric");const g=(0,a.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let m=i=class extends o.o{constructor(e){super(e),this.origin=0,this.associatedSpatialReference=null,this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}read(e,t){super.read(e,t),("service"===t?.origin||"web-scene"===t?.origin)&&(this.origin="service"===t.origin?2:1,this.associatedSpatialReference=null)}writeHeightModel(e,t,r){return f.write(e,t,r)}readHeightModel(e,t,r){return f.read(e)||(r?.messages&&r.messages.push(function(e,t){return new u.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return g.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.LA)(e)||g.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS,origin:this.origin,associatedSpatialReference:this.associatedSpatialReference})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static fromSpatialReference(e){let{latestVcsWkid:t,vcsWkid:r}=e;if(!r)return null;let s=(null==t?null:p.B.get(t))??p.B.get(r);return s?new i({heightModel:0===s.type?"gravity-related-height":"ellipsoidal",heightUnit:(0,l.LA)(s.unit.name),vertCRS:s.datum,origin:3,associatedSpatialReference:e}):null}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;let t=new i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new u.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s.Cg)([(0,d.MZ)()],m.prototype,"origin",void 0),(0,s.Cg)([(0,d.MZ)()],m.prototype,"associatedSpatialReference",void 0),(0,s.Cg)([(0,d.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:y,default:"ellipsoidal",write:{isRequired:!0,alwaysWriteDefaults:!0}}}}})],m.prototype,"heightModel",void 0),(0,s.Cg)([(0,c.K)("web-scene","heightModel")],m.prototype,"writeHeightModel",null),(0,s.Cg)([(0,h.w)(["web-scene","service"],"heightModel")],m.prototype,"readHeightModel",null),(0,s.Cg)([(0,d.MZ)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:{writer:g.write,isRequired:!0}}}}})],m.prototype,"heightUnit",void 0),(0,s.Cg)([(0,h.w)("web-scene","heightUnit")],m.prototype,"readHeightUnit",null),(0,s.Cg)([(0,h.w)("service","heightUnit")],m.prototype,"readHeightUnitService",null),(0,s.Cg)([(0,d.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],m.prototype,"vertCRS",void 0),(0,s.Cg)([(0,h.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],m.prototype,"readVertCRS",null),m=i=(0,s.Cg)([(0,d.$K)("esri.geometry.HeightModelInfo")],m)},73836(e,t,r){r.d(t,{A:()=>h});var i=r(32198),s=r(69540),n=r(25482),a=r(91429),o=r(58083),l=r(9093),u=r(67026),d=r(82534),p=r(51850),c=r(24770);let h=class extends((0,s.OU)(n.o)){constructor(e){super(e),this.translation=(0,p.vt)(),this.rotationAxis=(0,p.ci)(c.up),this.rotationAngle=0,this.scale=(0,p.fA)(1,1,1)}get rotation(){return(0,c.i4)(this.rotationAxis,this.rotationAngle)}set rotation(e){this.rotationAxis=(0,p.o8)((0,c.yo)(e)),this.rotationAngle=(0,c.g7)(e)}get localMatrix(){let e=(0,l.vt)();return(0,u.x8)(f,(0,c.yo)(this.rotation),(0,c.$I)(this.rotation)),(0,o.o1)(e,f,this.translation,this.scale),e}get localMatrixInverse(){return(0,o.B8)((0,l.vt)(),this.localMatrix)}equals(e){return this===e||null!=e&&(0,o.t2)(this.localMatrix,e.localMatrix)}};(0,i.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"translation",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"rotationAxis",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],h.prototype,"rotationAngle",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"scale",void 0),(0,i.Cg)([(0,a.MZ)()],h.prototype,"rotation",null),(0,i.Cg)([(0,a.MZ)()],h.prototype,"localMatrix",null),(0,i.Cg)([(0,a.MZ)()],h.prototype,"localMatrixInverse",null),h=(0,i.Cg)([(0,a.$K)("esri.geometry.support.MeshTransform")],h);const f=(0,d.vt)()},24770(e,t,r){r.d(t,{$I:()=>g,AU:()=>h,g7:()=>y,i4:()=>d,ui:()=>p,vt:()=>u,yo:()=>f});var i=r(34727),s=r(58083),n=r(67026),a=r(82534),o=r(35522),l=r(51850);function u(e=v){return[e[0],e[1],e[2],e[3]]}function d(e,t,r=u()){return(0,o.C)(r,e),r[3]=t,r}function p(e,t=u()){let r=(0,s.l)(w,e);return m(t,(0,i.KJ)((0,n.Xd)(t,r))),t}function c(e,t,r=u()){return(0,n.x8)(w,e,g(e)),(0,n.x8)(b,t,g(t)),(0,n.lw)(w,b,w),m(r,(0,i.KJ)((0,n.Xd)(r,w)))}function h(e,t,r,i=u()){return d(l.Cw,e,M),d(l.JP,t,I),d(l.Cb,r,A),c(M,I,M),c(M,A,i),i}function f(e){return e}function y(e){return e[3]}function g(e){return(0,i.kU)(e[3])}function m(e,t){return e[3]=t,e}const v=[0,0,1,0],w=(0,a.vt)(),b=(0,a.vt)(),M=(u(),u()),I=u(),A=u();r.d(t,["up",0,v])},2e4(e,t,r){r.r(t),r.d(t,{default:()=>Ze});var i=r(32198),s=r(52106),n=r(40124),a=r(69540),o=r(7762),l=r(49186),u=r(36563),d=r(53966),p=r(97768),c=r(25728),h=r(17676),f=r(36708),y=r(91429),g=r(88620),m=r(86738),v=r(99917),w=r(41910),b=r(55156),M=r(60950),I=r(89808),A=r(99959);const F=Symbol("isSceneGraphicOrigin");var S;class C extends A.A{get[(S=F,M.ym)](){return this.layer}get[b.e](){return this.layer}get[I.Q](){return this.layer}get[w.e7](){return this.layer}constructor(e){super(),this[S]=!0,this.type="scene",this.layer=e}get id(){return this.layer.id}}var x=r(4146),L=r(55726),j=r(52136),P=r(18768),O=r(69208),_=r(47685),T=r(34287),R=r(8303),Z=r(25036),E=r(58947),U=r(82935),$=r(60694),q=r(92009),D=r(4071),N=r(10873),k=r(15426),H=r(67202),V=r(17036),G=r(95466),K=r(30524),Q=r(50805),z=r(20557),J=r(46499),B=r(39383),W=r(37352),X=r(2976),Y=r(86390),ee=r(25482);let te=class extends ee.o{constructor(){super(...arguments),this.name=null,this.field=null,this.currentRangeExtent=null,this.fullRangeExtent=null,this.type="rangeInfo"}};(0,i.Cg)([(0,y.MZ)({type:String,json:{read:!0,write:{isRequired:!0}}})],te.prototype,"name",void 0),(0,i.Cg)([(0,y.MZ)({type:String,json:{read:!0,write:{isRequired:!0}}})],te.prototype,"field",void 0),(0,i.Cg)([(0,y.MZ)({type:[Number],json:{read:!0,write:!0}})],te.prototype,"currentRangeExtent",void 0),(0,i.Cg)([(0,y.MZ)({type:[Number],json:{read:!0,write:!0}})],te.prototype,"fullRangeExtent",void 0),(0,i.Cg)([(0,y.MZ)({type:["rangeInfo"],readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],te.prototype,"type",void 0),te=(0,i.Cg)([(0,y.$K)("esri.layers.support.RangeInfo")],te);var re,ie=r(56507),se=r(4718),ne=r(87024),ae=r(67076),oe=r(39829);let le=re=class extends((0,ee.T)(o.A.ofType(oe.A))){constructor(e){super(e)}clone(){return new re(this.items.map(e=>e.clone()))}write(e,t){return this.toJSON(t)}toJSON(e){let t=e?.layer?.spatialReference;return t?this.toArray().map(r=>{if(!t.equals(r.spatialReference)){if(!(0,v.canProjectWithoutEngine)(r.spatialReference,t))return e?.messages?.push(new ae.A("scenefilter:unsupported","Scene filters with incompatible spatial references are not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),null;let i=new oe.A;(0,v.projectPolygon)(r,i,t),r=i}let i=r.toJSON(e);return delete i.spatialReference,i}).filter(e=>null!=e):this.toArray().map(t=>t.toJSON(e))}static fromJSON(e,t){let r=new re;return e.forEach(e=>r.add(oe.A.fromJSON(e,t))),r}};le=re=(0,i.Cg)([(0,y.$K)("esri.layers.support.PolygonCollection")],le);const ue=le;var de,pe=r(97159),ce=r(36005);let he=de=class extends ee.o{constructor(e){super(e),this.spatialRelationship="disjoint",this.geometries=new ue,this._geometriesSource=null}initialize(){this.addHandles((0,f.on)(()=>this.geometries,"after-changes",()=>this.geometries=this.geometries,f.OH))}readGeometries(e,t,r){Array.isArray(e)?this.geometries=ue.fromJSON(e,r):("web-scene"===r.origin||"portal-item"===r.origin)&&(this._geometriesSource={url:(0,pe.f)(e,r),context:r})}async loadGeometries(e,t){if(null==this._geometriesSource)return;let{url:r,context:i}=this._geometriesSource,s=await(0,ie.A)(r,{responseType:"json",signal:t?.signal}),n=e.toJSON(),a=s.data.map(e=>({...e,spatialReference:n}));this.geometries=ue.fromJSON(a,i),this._geometriesSource=null}clone(){let e=new de({geometries:(0,se.o8)(this.geometries),spatialRelationship:this.spatialRelationship});return e._geometriesSource=this._geometriesSource,e}};(0,i.Cg)([(0,y.MZ)({type:["disjoint","contains"],nonNullable:!0,json:{write:{isRequired:!0}}})],he.prototype,"spatialRelationship",void 0),(0,i.Cg)([(0,y.MZ)({type:ue,nonNullable:!0,json:{write:!0,origins:{"web-scene":{write:{isRequired:!0}}}}}),(0,ne.P)({origins:["web-scene","portal-item"],type:"resource",prefix:"geometries",contentAddressed:!0})],he.prototype,"geometries",void 0),(0,i.Cg)([(0,ce.w)(["web-scene","portal-item","service"],"geometries")],he.prototype,"readGeometries",null),he=de=(0,i.Cg)([(0,y.$K)("esri.layers.support.SceneFilter")],he);const fe=he;function ye({associatedLayer:e,serviceUpdateTimeStamp:t}){let r=e?.editingInfo?.lastEditDate,i=e?.serverGens,s=null!=r,n=null!=t,a=s&&n&&t.lastUpdate!==r.getTime();return s&&(a||!n&&i?.minServerGen!==i?.serverGen)}var ge=r(84952);let me=class extends ee.o{constructor(){super(...arguments),this.endTimeField=null,this.startTimeField=null}};(0,i.Cg)([(0,y.MZ)({type:String})],me.prototype,"endTimeField",void 0),(0,i.Cg)([(0,y.MZ)({type:String})],me.prototype,"startTimeField",void 0),me=(0,i.Cg)([(0,y.$K)("esri.layers.support.SceneServiceTimeInfo")],me);var ve=r(96184),we=r(8947),be=r(41214),Me=r(97552),Ie=r(24212),Ae=r(30291);async function Fe(e){let{BlobReader:t,ZipReader:i,BlobWriter:s}=await Promise.all([r.e(3120),r.e(9588)]).then(()=>r(9588)),n=[];return(await new i(new t(e)).getEntries()).forEach(e=>{if(e.directory||/^__MACOS/i.test(e.filename))return;let t=new s;n.push(e.getData(t).then(t=>new File([t],e.filename)))}),Promise.all(n)}var Se=r(79677),Ce=r(10184),xe=r(66480),Le=r(45671),je=r(78553);const Pe=new Set(["3DObject","Point"]),Oe=(0,V.p)();let _e=class extends((0,_.w6)((0,E.w6)((0,P.b)((0,T.q)((0,R.A)((0,Z.j)((0,c.M)((0,O.d)((0,j.p)((0,a.OU)(x.A))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.graphicOrigin=new C(this),this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new o.A,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0,this.serviceTimeInfo=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null),this.associatedLayer=(0,p.pR)(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let r=this.getField(e)?.domain??null;return this.associatedLayer?(0,k.Vq)(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new G.A(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),"object"==typeof e&&e?Q.W4.fromJSON(e,r):null}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&(0,k.C$)(this.associatedLayer)}get geometryType(){return Re[this.profile]||"mesh"}set renderer(e){(0,K.yp)(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return"object"==typeof e&&e||(e={}),e.color??(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e??=D.P;let{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:n,supportsGeometryUpdate:a,supportsReturnServiceEditsInSourceSpatialReference:o},data:{supportsZ:l,supportsM:u,isVersioned:d,supportsAttachment:p},operations:{supportsEditing:c,supportsAdd:h,supportsUpdate:f,supportsDelete:y,supportsQuery:g,supportsQueryAttachments:m,supportsAsyncConvert3D:v},attachment:w}=e,b=e.operations.supportsChangeTracking,M=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:o,supportsRollbackOnFailure:s,supportsGeometryUpdate:M&&a,supportsUploadWithItemId:n},data:{supportsAttachment:p,supportsZ:l,supportsM:u,isVersioned:d,queryFormats:e.data.queryFormats,sourceFormats:e.data.sourceFormats},operations:{supportsQuery:g,supportsQueryAttachments:m,supportsEditing:c&&b,supportsAdd:M&&h&&b,supportsDelete:M&&y&&b,supportsUpdate:f&&b,supportsAsyncConvert3D:v},attachment:w}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){let r=t.store.profile;return null!=r&&Te[r]?Te[r]:(d.A.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override("useViewTime",e)}get timeInfo(){let e=this.associatedLayer?.timeInfo;if(null==e)return null;let t=e.clone();return(0,K.sv)(t,this.fieldsIndex),t}set timeInfo(e){(0,K.sv)(e,this.fieldsIndex),this._override("timeInfo",e),this.associatedLayer&&(this.associatedLayer.timeInfo=e)}get timeExtent(){return this.associatedLayer?.timeExtent}set timeExtent(e){this._override("timeExtent",e)}get timeOffset(){return this.associatedLayer?.timeOffset}set timeOffset(e){this._override("timeOffset",e)}get datesInUnknownTimezone(){return this.associatedLayer?.datesInUnknownTimezone??!1}set datesInUnknownTimezone(e){this._override("datesInUnknownTimezone",e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){let t=e?.signal;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(h.QP),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await(0,we.L)(this,{origin:"service"},t),(0,K.yp)(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){d.A.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){let e=new Me.A;"mesh"===this.geometryType?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0);let{timeOffset:t,timeExtent:r}=this;return e.timeExtent=null!=t&&null!=r?r.offset(-t.value,t.unit):r||null,e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(let t of e.features)t.layer=this,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryModels(e,t){let[i,{queryModels:s}]=await Promise.all([this._getAssociatedLayerForQuery(),Promise.all([r.e(893),r.e(2387)]).then(()=>r(41653))]);return s(this,i,e,t)}async queryModel(e,t){let[i,{queryModel:s}]=await Promise.all([this._getAssociatedLayerForQuery(),Promise.all([r.e(893),r.e(2387)]).then(()=>r(41653))]);return s(this,i,e,t)}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new l.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new l.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){let r=(0,K.hL)(this.fieldsIndex,await(0,Le.TO)(this,(0,Le.D8)(this)));return(0,xe.s1)(this.parsedUrl?.path??"",this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,t){let r=await this.queryCachedAttributes(e,[t]);if(!r||0===r.length)throw new l.A("scenelayer:feature-not-in-cached-data","Feature not found in cached data");let i=new s.A;return i.attributes=r[0],i.layer=this,i.sourceLayer=this,i.origin=this.graphicOrigin,i}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryAttachments(e,t))}getFieldUsageInfo(e){let t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(d.A.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return(0,Ae.tn)(this,e)}_getAssociatedLayerForQuery(){let e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new l.A("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new l.A("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){return this._debouncedSaveOperations(0,{getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"})}async applyEdits(e,t){let{applyEdits:i}=await r.e(6247).then(()=>r(78628)),s=t;await this.load();let n=this.associatedLayer;if(!n)throw new l.A(`${this.type}-layer:not-editable`,"Service is not editable");await n.load();let{globalIdField:a}=n,o=!!n.infoFor3D,u=s?.globalIdUsed??!0;if(o&&null==a)throw new l.A(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(o&&!u)throw new l.A(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return(0,$.Wo)(n.url)&&o&&null!=e.deleteFeatures&&null!=a&&(s={...s,globalIdToObjectId:await(0,k.GA)(n,e.deleteFeatures,a)}),i(this,n.source,e,s)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new l.A(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}async convertMesh(e,t){t??={};let i=e=>{throw d.A.getLogger(this).error(".convertMesh()",e.message),e};await this.load(t),this.infoFor3D||i(new l.A("invalid:layer","SceneLayer has no capability for mesh conversion"));let s=await this.extractAndFilterFiles(e);(0,h.Te)(t);let n=s.reduce((e,t)=>(0,z.oF)(this.infoFor3D,t)?e+1:e,0);0===n&&i(new L.VP),n>1&&i(new L.XQ);let a=this.spatialReference,o=t.origin,u=await(0,v.projectAsync)(o??t.defaultOrigin??new m.A({x:0,y:0,z:0,spatialReference:a}),a,t),p=a.isGeographic?"local":"georeferenced",{createWithExternalSource:c}=await Promise.all([r.e(2258),r.e(8331)]).then(()=>r(98331));(0,h.Te)(t);let f=c(u,{type:"client",files:s},{vertexSpace:p,transform:(0,Y.Z)(a),unitConversionDisabled:!0}),[y]=await this.uploadAssets([f],{...t,useAssetOrigin:!o});return y}async extractAndFilterFiles(e){await this.load();let t=this.infoFor3D;return t?(await async function(e){let t=[];for(let r of e)r.name.toLowerCase().endsWith(".zip")?t.push(Fe(r)):t.push(Promise.resolve(r));return(await Promise.all(t)).flat()}(e)).filter(e=>(0,z.fu)(t,e)):e}validateLayer(e){if(e.layerType&&!Pe.has(e.layerType))throw new l.A("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new l.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new l.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});!function(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{let s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new l.A("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new l.A("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}(this.normalReferenceFrame,this.spatialReference)}get isUsedAsGroundLayer(){return!1}_getTypeKeywords(){let e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new l.A("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(let e of this.fields){let t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),r=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(let t of this.associatedLayer.fields){let r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||=this.fields?this.fields.slice():[],e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;let e=["popupTemplate","popupEnabled","attributeTableTemplate"],t=(0,g.oY)(this);for(let r=0;r<e.length;r++){let i=e[r],s=this.originIdOf(i),n=this.associatedLayer.originIdOf(i);s<n&&(2===n||3===n)&&t.setAtOrigin(i,this.associatedLayer[i],n)}}_applyAssociatedLayerExtentOverride(){let e=this.associatedLayer?.getAtOrigin("fullExtent","service");null!=this.associatedLayer?.infoFor3D&&e&&(0,$.Wo)(this.associatedLayer?.url)&&ye(this)&&(0,g.oY)(this).setAtOrigin("fullExtent",e.clone(),2)}_applyAssociatedLayerPrivileges(){let e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{let{serverUrl:t,layerId:r,portalItem:i}=await(0,q.L)(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await X.U.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,apiKey:this.apiKey,layerId:r,portalItem:i}),await this.associatedLayer.load(),this._isOverridden("timeInfo")&&(this.associatedLayer.timeInfo=this.timeInfo)}catch(e){(0,h.zf)(e)||this._logWarningOnPopupEnabled().catch(()=>{})}}async _logWarningOnPopupEnabled(){let e=new AbortController;this.addHandles((0,u.rE)(e));try{await(0,f.C_)(()=>this.popupEnabled&&null!=this.popupTemplate,e.signal)}catch(e){return void(0,h.jH)(e)}let t=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?d.A.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):d.A.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){let e=this.elevationInfo;"mesh-pyramids"===this.profile&&(0,Ie.XF)(d.A.getLogger(this),(0,Ie.$7)("Mesh scene layers","relative-to-scene",e)),(0,Ie.XF)(d.A.getLogger(this),(0,Ie.tW)("Scene layers",e))}async fetchStatistics(e,t){return await async function({fieldName:e,statisticsInfo:t,errorContext:r,fieldsIndex:i,path:s,customParameters:n,apiKey:a,signal:o}){if(null==t)throw new l.A(`${r}:no-cached-statistics`,"Cached statistics are not available for this layer");let u=i.get(e);if(null==u)throw new l.A(`${r}:field-unexisting`,`Field '${e}' does not exist on the layer`);let d=t.find(e=>e.name===u.name);if(null==d)throw new l.A(`${r}:no-cached-statistics`,"Cached statistics for this attribute are not available");let p=(0,ge.fj)(s,d.href),{data:c}=await(0,ie.A)(p,{query:{f:"json",...n,token:a},responseType:"json",signal:o});return c}({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}async loadTimeInfoFromService(e){let{serviceTimeInfo:t}=this;if(null==t)return;let{startTimeField:r,endTimeField:i}=t;if(null==r&&null==i||ye({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;let s=async t=>{let i=null;try{i=(await this.fetchStatistics(t,e))?.stats}catch{}if(null==i)return null;let{minTimeStr:s,min:n,maxTimeStr:a,max:o}=i,l=t===r?s??n:a??o;return null==l?null:new Date(l)},[n,a]=await Promise.all([s(r),s(i)]);if(null!=r&&null==n||null!=i&&null==a)return;let o=new Se.A({start:n,end:a});this.setAtOrigin("timeInfo",new ve.A({endField:i,startField:r,fullTimeExtent:o}),"service")}};(0,i.Cg)([(0,y.MZ)({types:{key:"type",base:null,typeMap:{selection:H.A}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:{allowNull:!0}},"portal-item":{name:"layerDefinition.featureReduction",write:{allowNull:!0}}}}})],_e.prototype,"featureReduction",void 0),(0,i.Cg)([(0,y.MZ)({type:[te],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}},clonable:!1})],_e.prototype,"rangeInfos",void 0),(0,i.Cg)([(0,y.MZ)({json:{read:!1}})],_e.prototype,"associatedLayer",void 0),(0,i.Cg)([(0,y.MZ)({type:["show","hide"]})],_e.prototype,"listMode",void 0),(0,i.Cg)([(0,y.MZ)({type:["ArcGISSceneServiceLayer"]})],_e.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,y.MZ)({json:{read:!1},readOnly:!0})],_e.prototype,"type",void 0),(0,i.Cg)([(0,y.MZ)({...Oe.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],_e.prototype,"fields",void 0),(0,i.Cg)([(0,y.MZ)()],_e.prototype,"types",null),(0,i.Cg)([(0,y.MZ)()],_e.prototype,"typeIdField",null),(0,i.Cg)([(0,y.MZ)()],_e.prototype,"templates",null),(0,i.Cg)([(0,y.MZ)()],_e.prototype,"formTemplate",null),(0,i.Cg)([(0,y.MZ)({readOnly:!0})],_e.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0,clonable:!1})],_e.prototype,"fieldsIndex",null),(0,i.Cg)([(0,y.MZ)({type:W.A,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],_e.prototype,"floorInfo",void 0),(0,i.Cg)([(0,y.MZ)(Oe.outFields)],_e.prototype,"outFields",void 0),(0,i.Cg)([(0,y.MZ)({type:Q.W4,readOnly:!0,json:{read:!1},clonable:!1})],_e.prototype,"nodePages",void 0),(0,i.Cg)([(0,ce.w)("service","nodePages",["nodePages","pointNodePages"])],_e.prototype,"readNodePages",null),(0,i.Cg)([(0,y.MZ)({type:[Q.uV],readOnly:!0,clonable:!1})],_e.prototype,"materialDefinitions",void 0),(0,i.Cg)([(0,y.MZ)({type:[Q.Ot],readOnly:!0,clonable:!1})],_e.prototype,"textureSetDefinitions",void 0),(0,i.Cg)([(0,y.MZ)({type:[Q.L0],readOnly:!0,clonable:!1})],_e.prototype,"geometryDefinitions",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0})],_e.prototype,"serviceUpdateTimeStamp",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0})],_e.prototype,"attributeStorageInfo",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0})],_e.prototype,"statisticsInfo",void 0),(0,i.Cg)([(0,y.MZ)({type:o.A.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],_e.prototype,"excludeObjectIds",void 0),(0,i.Cg)([(0,y.MZ)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],_e.prototype,"definitionExpression",void 0),(0,i.Cg)([(0,y.MZ)({type:fe,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],_e.prototype,"filter",void 0),(0,i.Cg)([(0,y.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],_e.prototype,"path",void 0),(0,i.Cg)([(0,y.MZ)(N.Yj)],_e.prototype,"elevationInfo",null),(0,i.Cg)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],_e.prototype,"effectiveCapabilities",null),(0,i.Cg)([(0,y.MZ)({readOnly:!0})],_e.prototype,"effectiveEditingEnabled",null),(0,i.Cg)([(0,y.MZ)({type:String})],_e.prototype,"geometryType",null),(0,i.Cg)([(0,y.MZ)(N.kF)],_e.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,y.MZ)({type:[J.A],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:B.w},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:B.w},write:!0}})],_e.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,y.MZ)(N.fV)],_e.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,y.MZ)({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;let r=t.layerDefinition?.drawingInfo?.transparency;return void 0===r?void 0:(0,je.D)(r)}}},"portal-item":{write:!0},service:{read:!1}}}})],_e.prototype,"opacity",void 0),(0,i.Cg)([(0,y.MZ)({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],_e.prototype,"priority",void 0),(0,i.Cg)([(0,y.MZ)({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],_e.prototype,"semantic",void 0),(0,i.Cg)([(0,y.MZ)({types:be.XJ,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],_e.prototype,"renderer",null),(0,i.Cg)([(0,y.MZ)({json:{read:!1}})],_e.prototype,"cachedDrawingInfo",void 0),(0,i.Cg)([(0,ce.w)("service","cachedDrawingInfo")],_e.prototype,"readCachedDrawingInfo",null),(0,i.Cg)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],_e.prototype,"capabilities",null),(0,i.Cg)([(0,y.MZ)({type:Boolean,json:{read:!1}})],_e.prototype,"editingEnabled",null),(0,i.Cg)([(0,y.MZ)({readOnly:!0,json:{write:!1,read:!1}})],_e.prototype,"infoFor3D",null),(0,i.Cg)([(0,y.MZ)({readOnly:!0,json:{write:!1,read:!1}})],_e.prototype,"relationships",null),(0,i.Cg)([(0,y.MZ)(N.M6)],_e.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,y.MZ)({type:n.A,json:{name:"popupInfo",write:!0}})],_e.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],_e.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,y.MZ)(N.zQ)],_e.prototype,"attributeTableTemplate",void 0),(0,i.Cg)([(0,y.MZ)({type:String,json:{read:!1}})],_e.prototype,"objectIdField",void 0),(0,i.Cg)([(0,ce.w)("service","objectIdField",["objectIdField","fields"])],_e.prototype,"readObjectIdField",null),(0,i.Cg)([(0,y.MZ)({type:String,json:{read:!1}})],_e.prototype,"globalIdField",void 0),(0,i.Cg)([(0,ce.w)("service","globalIdField",["globalIdField","fields"])],_e.prototype,"readGlobalIdField",null),(0,i.Cg)([(0,y.MZ)({readOnly:!0,type:String,json:{read:!1}})],_e.prototype,"displayField",null),(0,i.Cg)([(0,y.MZ)({type:String,json:{read:!1}})],_e.prototype,"profile",void 0),(0,i.Cg)([(0,ce.w)("service","profile",["store.profile"])],_e.prototype,"readProfile",null),(0,i.Cg)([(0,y.MZ)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],_e.prototype,"normalReferenceFrame",void 0),(0,i.Cg)([(0,y.MZ)(N.PY)],_e.prototype,"screenSizePerspectiveEnabled",void 0),(0,i.Cg)([(0,y.MZ)({json:{read:!1,origins:{service:{read:!0}}}})],_e.prototype,"serviceItemId",void 0),(0,i.Cg)([(0,y.MZ)(U.B)],_e.prototype,"useViewTime",null),(0,i.Cg)([(0,y.MZ)((0,N.U$)({disableServiceOrigin:!0,webDocumentOrigin:"web-scene"}))],_e.prototype,"timeInfo",null),(0,i.Cg)([(0,y.MZ)({type:Se.A,json:{read:!1,write:!1}})],_e.prototype,"timeExtent",null),(0,i.Cg)([(0,y.MZ)({type:Ce.A,json:{read:!1,write:!1}})],_e.prototype,"timeOffset",null),(0,i.Cg)([(0,y.MZ)({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],_e.prototype,"datesInUnknownTimezone",null),(0,i.Cg)([(0,y.MZ)({type:me,readOnly:!0,json:{read:{source:"timeInfo"}},clonable:!1})],_e.prototype,"serviceTimeInfo",void 0),(0,i.Cg)([(0,y.MZ)()],_e.prototype,"isUsedAsGroundLayer",null),_e=(0,i.Cg)([(0,y.$K)("esri.layers.SceneLayer")],_e);const Te={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},Re={"mesh-pyramids":"mesh",points:"point"},Ze=_e},55726(e,t,r){r.d(t,{$1:()=>u,H2:()=>h,MT:()=>f,VP:()=>y,WF:()=>d,Wt:()=>a,XQ:()=>g,hK:()=>c,nS:()=>p,uh:()=>o,xY:()=>l});var i=r(49186);const s="upload-assets",n=()=>Error();class a extends i.A{constructor(){super(`${s}:unsupported`,"Layer does not support asset uploads.",n())}}class o extends i.A{constructor(){super(`${s}:no-glb-support`,"Layer does not support glb.",n())}}class l extends i.A{constructor(){super(`${s}:no-supported-source`,"No supported external source found",n())}}class u extends i.A{constructor(){super(`${s}:not-base-64`,"Expected gltf data in base64 format after conversion.",n())}}class d extends i.A{constructor(){super(`${s}:unable-to-prepare-options`,"Unable to prepare uploadAsset request options.",n())}}class p extends i.A{constructor(e,t){super(`${s}:bad-response`,`Bad response. Uploaded ${e} items and received ${t} results.`,n())}}class c extends i.A{constructor(e,t){super(`${s}-layer:upload-failed`,`Failed to upload mesh file ${e}. Error code: ${t?.code??"-1"}. Error message: ${t?.messages??"unknown"}`,n())}}class h extends i.A{constructor(e){super(`${s}-layer:unsupported-format`,`The service allowed us to upload an asset of FormatID ${e}, but it does not list it in its supported formats.`,n())}}class f extends i.A{constructor(){super(`${s}:convert3D-failed`,"convert3D failed.")}}class y extends i.A{constructor(){super("invalid-input:no-model","No supported model found")}}class g extends i.A{constructor(){super("invalid-input:multiple-models","Multiple supported models found")}}},18768(e,t,r){var i=r(32198),s=r(53966),n=r(91429),a=r(60694);r.d(t,["b",0,e=>{let t=e,r=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){let e=(0,a.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,s.A.getLogger(this)))}};return(0,i.Cg)([(0,n.MZ)()],r.prototype,"title",null),(0,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"url",null),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.ArcGISService")],r),r}])},69208(e,t,r){var i=r(32198),s=r(91429);r.d(t,["d",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i.Cg)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.CustomParametersMixin")],r),r}])},47685(e,t,r){r.d(t,{Mk:()=>h,Zk:()=>p});var i=r(32198),s=r(65529),n=r(4718),a=r(91429),o=r(20816);const l=new s.bk;function u(e){return l.on("apply-edits",new WeakRef(e))}function d(e){return l.on("update-moment",new WeakRef(e))}function p(e,t,r=null,i=!1){let s=Promise.withResolvers();return i=null==t||i,l.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:r,mayReceiveServiceEdits:i,result:s.promise}),s}const c=Symbol();function h(e){return"object"==typeof e&&!!e&&c in e}function f(e){return"object"==typeof e&&!!e&&"gdbVersion"in e}function y(e,t,r){let i=new URL(e).host,s=o.Z3.get(i),n=e=>!e||e===s;return n(t)&&n(r)||t===r}r.d(t,["w6",0,e=>{var t;let r=e,s=class extends r{static{t=c}constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{let{serviceUrl:t,layerId:r,gdbVersion:i,mayReceiveServiceEdits:s,result:a}=e,o=t===this.url,l=null!=r&&null!=this.layerId&&r===this.layerId,u=null!=r&&this.relationships?.some(e=>e.relatedTableId===r),d=f(this),p=f(this)&&y(t,i,this.gdbVersion);if(!o||d&&!p||!l&&!u&&!s)return;let c=a.then(e=>{if(this.lastEditsEventDate=new Date,l&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,n.o8)(e)),e;let r=e.editedFeatures?.find(({layerId:e})=>e===this.layerId);if(r){let{adds:t,updates:i,deletes:s}=r.editedFeatures,a={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:t?t.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],deletedFeatures:s?s.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],updatedFeatures:i?i.map(({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],editedFeatures:(0,n.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.o8)(e.historicMoment)};return this.emit("edits",a),a}let s={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,n.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.o8)(e.historicMoment)};return"historicMoment"in this&&this._shouldUpdateHistoricMoment(t,i,s.historicMoment)&&this.emit("edits",s),s}).then(e=>("historicMoment"in this&&this._shouldUpdateHistoricMoment(t,i,e.historicMoment)&&(this.historicMoment=e.historicMoment),e));c.catch(()=>{}),this.emit("apply-edits",{result:c})},this._updateMomentHandler=e=>{let{serviceUrl:t,gdbVersion:r,moment:i}=e,s=t===this.url,n=f(this),a=f(this)&&y(t,r,this.gdbVersion),o=f(this)&&!y(t,this.gdbVersion,null);s&&n&&a&&o&&"historicMoment"in this&&this.historicMoment!==i&&(this.historicMoment=i)},this.when().then(()=>{this.addHandles(u(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(d(this._updateMomentHandler))},()=>{})}_shouldUpdateHistoricMoment(e,t,r){return"historicMoment"in this&&this.historicMoment!==r&&(0,o.w5)(e,t)}};return(0,i.Cg)([(0,a.MZ)()],s.prototype,"lastEditsEventDate",void 0),s=(0,i.Cg)([(0,a.$K)("esri.layers.mixins.EditBusLayer")],s),s}])},85707(e,t,r){var i=r(32198),s=r(91429),n=r(54239);r.d(t,["a",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.heightModelInfo=null}read(e,t){super.read(e,t),"service"===t?.origin&&2===this.heightModelInfo?.origin&&(this.heightModelInfo.associatedSpatialReference=this.getAtOrigin("spatialReference","service"))}};return(0,i.Cg)([(0,s.MZ)({readOnly:!0,type:n.A})],r.prototype,"heightModelInfo",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.HeightModelInfoMixin")],r),r}])},8303(e,t,r){var i=r(32198),s=r(92602),n=r(70333),a=r(56507),o=r(60999),l=r(49186),u=r(36563),d=r(53966),p=r(97768),c=r(17676),h=r(84952),f=r(91429),y=r(77548),g=r(20655),m=r(80812),v=r(41318),w=r(10407),b=r(26121),M=r(36005),I=r(43937);const A={credential:null,user:null};r.d(t,["A",0,e=>{let t=e,F=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new m.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{let{load:i}=await r.e(1204).then(()=>r(41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||d.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e,t){if(!this.loaded||!this.portalItem?.id)return!1;let i=t?.signal?null:new AbortController;try{let{reload:s}=await r.e(1204).then(()=>r(41204));return i&&this.addHandles((0,u.rE)(i),"reloadFromPortal"),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t?.signal?t:{signal:i.signal})}catch(e){throw(0,c.zf)(e)||d.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{i&&this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,c.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{let{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);let i,s,a=!n.id?.findCredential(this.url),o=e===r.id;if(o&&r.portal.user)return this._getUserPrivileges(r,a);if(o)i=r.portal.url;else try{i=await(0,y.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!i||!(0,h.b8)(i,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{let e=null==t?null:t.signal;s=await(n.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}if(!s)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(o?await r.reload():(r=new m.default({id:e,portal:{url:i}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,a)}catch(e){(0,c.QP)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}_getUserPrivileges(e,t){let r=(0,w.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){let t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;let r=A.credential===t?A.user:await this._fetchEditingUser(e);return A.credential=t,A.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){let t=this.portalItem?.portal?.user;if(t)return t;let r=n.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;let i=`${r.owningSystemUrl}/sharing/rest`,s=g.A.getDefault();if(s&&s.loaded&&(0,h.S8)(s.restUrl)===(0,h.S8)(i))return s.user;let l=`${i}/community/self`,u=null==e?null:e.signal,d=await(0,o.Ke)((0,a.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return d.ok?v.A.fromJSON(d.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){return(0,b.wN)(this.portalItem,t)?(t?.messages?.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i.Cg)([(0,f.MZ)({type:m.default})],F.prototype,"portalItem",null),(0,i.Cg)([(0,M.w)("web-document","portalItem",["itemId"])],F.prototype,"readPortalItem",null),(0,i.Cg)([(0,I.K)("web-document","portalItem",{itemId:{type:String}})],F.prototype,"writePortalItem",null),(0,i.Cg)([(0,f.MZ)({clonable:!1})],F.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],F.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],F.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],F.prototype,"userHasUpdateItemPrivileges",void 0),F=(0,i.Cg)([(0,f.$K)("esri.layers.mixins.PortalLayer")],F),F}])},25036(e,t,r){var i=r(32198),s=r(91429),n=r(83960);r.d(t,["j",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){let e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;void 0!==t?.effectiveScaleRange&&(0,n.RH)(e,t.effectiveScaleRange);let r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"minScale",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"maxScale",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],r.prototype,"effectiveScaleRange",null),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.ScaleRangeLayer")],r),r}])},82935(e,t,r){var i=r(32198),s=r(91429),n=r(30524),a=r(96184),o=r(73133),l=r(79677),u=r(10184),d=r(36005);const p={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"}}};r.d(t,["B",0,p,"e",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){let r=t.timeInfo.exportOptions;if(!r)return null;let i=r.timeOffset,s=o.j.fromJSON(r.timeOffsetUnits);return i&&s?new u.A({value:i,unit:s}):null}get timeInfo(){return this._get("timeInfo")}set timeInfo(e){(0,n.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i.Cg)([(0,s.MZ)({type:l.A,json:{write:!1}})],r.prototype,"timeExtent",void 0),(0,i.Cg)([(0,s.MZ)({type:u.A})],r.prototype,"timeOffset",void 0),(0,i.Cg)([(0,d.w)("service","timeOffset",["timeInfo.exportOptions"])],r.prototype,"readOffset",null),(0,i.Cg)([(0,s.MZ)({value:null,type:a.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],r.prototype,"timeInfo",null),(0,i.Cg)([(0,s.MZ)(p)],r.prototype,"useViewTime",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.TemporalLayer")],r),r}])},67202(e,t,r){r.d(t,{A:()=>o});var i,s=r(32198),n=r(25482),a=r(91429);let o=i=class extends n.o{constructor(e){super(e),this.type="selection"}clone(){return new i}};(0,s.Cg)([(0,a.MZ)({type:["selection"],readOnly:!0,json:{write:!0}})],o.prototype,"type",void 0),o=i=(0,s.Cg)([(0,a.$K)("esri.layers.support.FeatureReductionSelection")],o)},37352(e,t,r){r.d(t,{A:()=>l});var i,s=r(32198),n=r(7762),a=r(25482),o=r(91429);let l=i=class extends a.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new n.A}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,s.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],l.prototype,"floorField",void 0),(0,s.Cg)([(0,o.MZ)({json:{read:!1,write:!1}})],l.prototype,"viewAllMode",void 0),(0,s.Cg)([(0,o.MZ)({json:{read:!1,write:!1}})],l.prototype,"viewAllLevelIds",void 0),l=i=(0,s.Cg)([(0,o.$K)("esri.layers.support.LayerFloorInfo")],l)},17036(e,t,r){r.d(t,{p:()=>l});var i=r(44208),s=r(53966),n=r(20437),a=r(95466),o=r(30524);function l(){return{fields:{type:[n.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){let t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){let e=t.map(e=>`'${e.name}'`).join(", ");s.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${2**53-1} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return a.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){let e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(let t of e)this.fieldsIndex?.has(t)||s.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e});return(0,o.DB)(this.fieldsIndex,e)}}}}},20557(e,t,r){r.d(t,{Fm:()=>l,Hz:()=>g,JQ:()=>y,JZ:()=>S,ND:()=>v,R_:()=>a,U9:()=>f,_h:()=>b,be:()=>p,fE:()=>h,fu:()=>s,nr:()=>m,oF:()=>n,qv:()=>F,rP:()=>c,rq:()=>u,z$:()=>d});const i=[["binary","application/octet-stream","bin",""]];function s(e,t){return null!=M(t.name,e?.supportedFormats??[])}function n(e,t){if(!e)return!1;let r=u(t,e.supportedFormats??[]);return null!=r&&e.editFormats.includes(r)}function a(e,t){return I(function(e,t){let r=e.toLowerCase();return w(t).find(e=>A(e)===r)}(e,t))}function o(e,t){return I(M(e,t))}function l(e,t){return A(b(e,t))}function u(e,t){return o(e.name,t)??a(e.type,t)}function d(e,t,r){return a(e,r)??o(t,r)}function p(e,t){if(!e||!b(e,t))return;let r=/^3d_(.+)$/iu.exec(e)?.[1]?.toLowerCase();return r||void 0}function c(e,t){return(e??[]).map(e=>p(e,t)).filter(e=>!!e)}function h(e,t){return I(t.find(r=>p(I(r),t)===e))}function f({supportedFormats:e}){return d("model/gltf-binary","glb",e)}function y(e){let t=f(e);return null!=t&&e.editFormats.includes(t)}function g(e){if(!e)return null;let t=f(e),r=function({supportedFormats:e}){return d("model/gltf+json","gltf",e)}(e),i=null;for(let s of e.queryFormats){if(s===t)return s;s===r&&(i=s)}return i}function m({supportedFormats:e}){return d("application/esri3do-SR_world","wld",e)}function v({supportedFormats:e}){return d("application/esri3do-SR_prj","prj",e)}function w(e){return[...i,...e]}function b(e,t){return w(t).find(t=>I(t)===e)}function M(e,t){let r=e.toLowerCase();return w(t).find(e=>F(e).some(e=>r.endsWith(e)))}function I(e){return e?.[0]}function A(e){return e?.[1].toLowerCase()}function F(e){return e?.[2].split(",").map(e=>e.toLowerCase())??[]}function S(e){return e.tables?.find(e=>"assetMaps"===e.role)}},86390(e,t,r){r.d(t,{Z:()=>n});var i=r(86211),s=r(73836);function n(e){let t=1/(0,i.GA)(e,1);return 1===t?void 0:new s.A({scale:[t,t,t]})}},73179(e,t,r){r.d(t,{b:()=>l,h:()=>u});var i=r(4718),s=r(53966),n=r(84952),a=r(60694),o=r(10873);function l(e){let{nonStandardUrlAllowed:t=!1,separator:r}=e??{},n=(0,i.o8)(o.OZ),l=n.json?.write;return"object"==typeof l&&l&&(l.writer=function(e,t,i,s){(0,a.LS)(this,e,r,t,s)}),{...n,set:function(e){if(null==e)return void this._set("url",e);let r=(0,a.HZ)({layer:this,url:e,nonStandardUrlAllowed:t,logger:s.A.getLogger(this)});this._set("url",r.url),null!=r.layerId&&this._set("layerId",r.layerId)}}}function u(e,t){let{separator:r}=t??{},i=(0,n.An)(e.url);return null!=i&&(null==e.dynamicDataSource?null!=e.layerId&&(i.path=(0,n.fj)(i.path,r??"",e.layerId.toString())):i.path=(0,n.fj)(i.path,"dynamicLayer")),i}},85648(e,t,r){r.d(t,{n:()=>s});var i=r(84952);function s(e){return n[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){let t=(0,i.Zo)(e);return l[t]||a}(e.url)}(e)]||o}const n={},a="text/plain",o=n[a],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(let e in l)n[l[e]]=e},8947(e,t,r){r.d(t,{L:()=>a});var i=r(60999),s=r(17676),n=r(67076);async function a(e,t,r){let a=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(a&&"unique-value"===a.type&&a.styleOrigin){let o=await(0,i.Ke)(a.populateFromStyle());if((0,s.Te)(r),!1===o.ok){let r=o.error;t?.messages&&t.messages.push(new n.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:t})),e.clear("renderer",t?.origin)}}}},20816(e,t,r){r.d(t,{We:()=>o,ZJ:()=>l,w5:()=>u});var i=r(56507);const s=(0,r(13069).vD)(),n=new Map,a=new Map;async function o(e,t,r){if(!e||!r)return!1;if(!t)return!0;let s=new URL(e).host,a=n.get(s);if(!a){let t=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");a=(await(0,i.A)(t,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return a===t}async function l(e,t,i=!1){if(!e||!t)return!0;let n=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),o=a.get(n)?.entries();if(o)for(let[e,a]of o)if(a.name===t){let t=!a.stack?.hasForwardEdits();if(!t&&i){let[{deleteForwardEdits:t},{default:i}]=await Promise.all([r.e(2186).then(()=>r(32186)),r.e(2558).then(()=>r(32558))]),o=await t(n,e,new i({sessionId:s,moment:a.moment}));return o.success&&a.stack?.clearForwardEdits(),o.success}return t}return!0}function u(e,t){if(!e)return!1;let r=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),i=a.get(r)?.entries();if(i)for(let[e,r]of i)if(r.name===t)return"edit"===r.lockType;return!1}new Map,r.d(t,["TA",0,s,"Z3",0,n])},45671(e,t,r){r.d(t,{D8:()=>n,TO:()=>s});var i=r(30524);async function s(e,t=e.popupTemplate){if(null==t)return[];let r=await t.getRequiredFields(e.fieldsIndex),{lastEditInfoEnabled:s}=t,{objectIdField:n,typeIdField:a,globalIdField:o,relationships:l}=e;if(r.includes("*"))return["*"];let u=s?(0,i.eX)(e):[],d=(0,i.DB)(e.fieldsIndex,[...r,...u]);return a&&d.push(a),d&&n&&e.fieldsIndex?.has(n)&&!d.includes(n)&&d.push(n),d&&o&&e.fieldsIndex?.has(o)&&!d.includes(o)&&d.push(o),l?.forEach(t=>{let{keyField:r}=t;d&&r&&e.fieldsIndex?.has(r)&&!d.includes(r)&&d.push(r)}),d}function n(e,t){return!e||"object"!=typeof e||t?.checkPopupEnabled&&"popupEnabled"in e&&!e.popupEnabled?null:"popupTemplate"in e&&e.popupTemplate?e.popupTemplate:null!=t&&t.defaultPopupTemplateEnabled&&"defaultPopupTemplate"in e&&e.defaultPopupTemplate?e.defaultPopupTemplate:null}},26121(e,t,r){r.d(t,{I6:()=>d,ci:()=>u,dL:()=>l,wN:()=>p});var i=r(49186),s=r(84952),n=r(77548),a=r(20655),o=r(59923);async function l(e){let t=[];for(let r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){let e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}function u(e,t,r){let s=(e.messages??[]).filter(({type:e})=>"error"===e).map(({name:e,message:t,details:r})=>new i.A(e,t,r));if(e.blockedRelativeUrls&&(s=s.concat(e.blockedRelativeUrls.map(e=>(0,o.GL)("url",`Relative url '${e}' is not supported`)))),r){let{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:i}=r;e&&(s=s.filter(({name:e})=>!(o.MG.has(e)||t.includes(e)))),i&&(s=s.filter(e=>"web-document-write:property-required"!==e.name))}if(s.length>0)throw new i.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:s})}function d(e){return(0,n.qd)(e).some(e=>!!e.charts?.length)}function p(e,t){let r=t?.portal,i=e?.id&&(e.portal||a.A.getDefault());return!!r&&!!i&&!(0,s.ut)(i.restUrl,r.restUrl)}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8331],{83349(e,t,r){r.d(t,{e:()=>o});const n=new Set;let i=!1;function o(e,t,r=2){let i=t&&t.length,o=i?t[0]*r:e.length;n.size&&n.clear();let l=s(e,0,o,r,!0),u=[];if(!l||l.next===l.prev)return u;let c=0,f=0,p=0;if(i&&(l=g(e,t,l,r)),e.length>80*r){c=e[0],f=e[1];let t=c,n=f;for(let i=r;i<o;i+=r){let r=e[i],o=e[i+1];r<c&&(c=r),o<f&&(f=o),r>t&&(t=r),o>n&&(n=o)}p=Math.max(t-c,n-f),p=0===p?0:32767/p}return a(l,u,c,f,p),u}function s(e,t,r,n,i){let o=null;if(i===k(e,t,r,n)>0)for(let i=t;i<r;i+=n)o=$(i/n|0,e[i],e[i+1],o);else for(let i=r-n;i>=t;i-=n)o=$(i/n|0,e[i],e[i+1],o);return o&&O(o,o.next)&&(F(o),o=o.next),o}function l(e,t=e){let r,o=t===e,s=e;do{r=!1,s===s.next||0!==n.size&&n.has(s)||!O(s,s.next)&&0!==L(s.prev,s,s.next)?(o||s!==t)&&(s=s.next,r=!o):((o||s===t)&&(t=s.prev),i=!0,F(s),s=s.prev,r=!0)}while(r||s!==t);return t}function a(e,t,r,n,o){o&&function(e,t,r,n){let i=e,o=0;do{i.z=_(i.x,i.y,t,r,n),T[o++]=i,i=i.next}while(i!==e);!function(e){if(e<=32)for(let t=1;t<e;t++){let e=T[t],r=e.z,n=t-1;for(;n>=0&&T[n].z>r;)T[n+1]=T[n],n--;T[n+1]=e}else{R.length<e&&(R=new Uint32Array(e),Z=new Uint32Array(e),S=Array(e));for(let t=0;t<e;t++)R[t]=T[t].z;N(e,T,R,S,Z,0),N(e,S,Z,T,R,8),N(e,T,R,S,Z,16),N(e,S,Z,T,R,24)}}(o);let s=null;for(let e=0;e<o;e++){let t=T[e];t.prevZ=s,s&&(s.nextZ=t),s=t}s.nextZ=null,T.fill(null,0,o),S.fill(null,0,o)}(e,r,n,o);let s=e,a=!1;for(;e.prev!==e.next;){let h=e.prev,g=e.next;if(L(h,e,g)<0&&(o?c(e,r,n,o):u(e)))t.push(h.i,e.i,g.i),F(e),e=g,s=g;else if((e=g)===s){if(i=!1,e=l(e),i){s=e;continue}if(!a){s=e=f(e,t),a=!0;continue}p(e,t,r,n,o);break}}}function u(e){let t=e.prev,r=e,n=e.next,i=t.x,o=r.x,s=n.x,l=t.y,a=r.y,u=n.y,c=Math.min(i,o,s),f=Math.min(l,a,u),p=Math.max(i,o,s),h=Math.max(l,a,u),g=n.next;for(;g!==t;){if(g.x>=c&&g.x<=p&&g.y>=f&&g.y<=h&&(i!==g.x||l!==g.y)&&j(i,l,o,a,s,u,g.x,g.y)&&L(g.prev,g,g.next)>=0)return!1;g=g.next}return!0}function c(e,t,r,n){let i=e.prev,o=e,s=e.next,l=i.x,a=o.x,u=s.x,c=i.y,f=o.y,p=s.y,h=Math.min(l,a,u),g=Math.min(c,f,p),y=Math.max(l,a,u),d=Math.max(c,f,p),m=_(h,g,t,r,n),x=_(y,d,t,r,n),v=e.prevZ;for(;v&&v.z>=m;){if(v.x>=h&&v.x<=y&&v.y>=g&&v.y<=d&&v!==s&&(l!==v.x||c!==v.y)&&j(l,c,a,f,u,p,v.x,v.y)&&L(v.prev,v,v.next)>=0)return!1;v=v.prevZ}let w=e.nextZ;for(;w&&w.z<=x;){if(w.x>=h&&w.x<=y&&w.y>=g&&w.y<=d&&w!==s&&(l!==w.x||c!==w.y)&&j(l,c,a,f,u,p,w.x,w.y)&&L(w.prev,w,w.next)>=0)return!1;w=w.nextZ}return!0}function f(e,t){let r=e,n=!1;do{let i=r.prev,o=r.next.next;z(i,r,r.next,o,!1)&&D(i,o)&&D(o,i)&&(t.push(i.i,r.i,o.i),F(r),F(r.next),r=e=o,n=!0),r=r.next}while(r!==e);return n?l(r):r}function p(e,t,r,n,i){let o=e;do{let e=o.next.next;for(;e!==o.prev;){if(o.i!==e.i&&E(o,e)){let s=I(o,e);return o=l(o,o.next),s=l(s,s.next),a(o,t,r,n,i),void a(s,t,r,n,i)}e=e.next}o=o.next}while(o!==e)}let h=!1;function g(e,t,r,i){let o=[];for(let r=0,l=t.length;r<l;r++){let a=s(e,t[r]*i,r<l-1?t[r+1]*i:e.length,i,!1);a===a.next&&n.add(a),o.push(B(a))}o.sort(y),function(e,t){let r=Math.ceil((e+2*t)/16)+t+2;m.length<4*r&&(m=new Float64Array(4*r)),x=0}(e.length/i,t.length),A(r,r),h=!0;for(let e=0;e<o.length;e++)r=d(o[e],r);return h=!1,l(r)}function y(e,t){return e.x-t.x||e.y-t.y||(e.next.y-e.y)/(e.next.x-e.x)-(t.next.y-t.y)/(t.next.x-t.x)}function d(e,t){let r=function(e,t){let r,n=t,i=e.x,o=e.y,s=-1/0;if(O(e,n))return n;for(let t=0,l=0;t<x;t++,l+=4){if(o<m[l+1]||o>m[l+3]||m[l]>i||m[l+2]<=s)continue;let a=b(t);n=M(t);do{if(n.prev.next===n){if(O(e,n.next))return n.next;if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){let e=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(e<=i&&e>s&&(s=e,r=n.x<n.next.x?n:n.next,e===i))return r}}n=n.next}while(n!==a)}if(!r)return null;let l=r.x,a=r.y,u=Math.min(o,a),c=Math.max(o,a),f=1/0;for(let t=0,p=0;t<x;t++,p+=4){if(m[p+2]<l||m[p]>i||m[p+3]<u||m[p+1]>c)continue;let h=b(t);n=M(t);do{if(n.prev.next===n&&i>=n.x&&n.x>=l&&i!==n.x&&j(o<a?i:s,o,l,a,o<a?s:i,o,n.x,n.y)){let t=Math.abs(o-n.y)/(i-n.x);(D(n,e)||n.y===o&&n.next.y===o&&n.next.x>i)&&(t<f||t===f&&(n.x>r.x||n.x===r.x&&C(r,n)))&&(r=n,f=t)}n=n.next}while(n!==h)}return r}(e,t);if(!r)return t;let n=I(r,e);return A(r,n.next.next),l(n,n.next),l(r,r.next)}let m=new Float64Array,x=0;const v=[],w=[];function A(e,t){let r=e;do{let e=x++;v[e]=r;let n=1/0,i=1/0,o=-1/0,s=-1/0,l=0;do{let t=r.next;r.z=e,r.x<n&&(n=r.x),r.x>o&&(o=r.x),r.y<i&&(i=r.y),r.y>s&&(s=r.y),t.x<n&&(n=t.x),t.x>o&&(o=t.x),t.y<i&&(i=t.y),t.y>s&&(s=t.y),r=t}while(++l<16&&r!==t);w[e]=r;let a=4*e;m[a]=n,m[a+1]=i,m[a+2]=o,m[a+3]=s}while(r!==t)}function b(e){let t=w[e];for(;t.prev.next!==t;)t=t.next;return w[e]=t,t}function M(e){let t=v[e];for(;t.prev.next!==t;)t=t.next;return v[e]=t,t}function C(e,t){return L(e.prev,e,t.prev)<0&&L(t.next,e,e.next)<0}const T=[];let S=[],R=new Uint32Array,Z=new Uint32Array;const U=new Uint32Array(256);function N(e,t,r,n,i,o){U.fill(0);for(let t=0;t<e;t++)U[r[t]>>>o&255]++;let s=0;for(let e=0;e<256;e++){let t=U[e];U[e]=s,s+=t}for(let s=0;s<e;s++){let e=r[s],l=U[e>>>o&255]++;n[l]=t[s],i[l]=e}}function _(e,t,r,n,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function B(e){let t=e,r=e;do{(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next}while(t!==e);return r}function j(e,t,r,n,i,o,s,l){return(i-s)*(t-l)>=(e-s)*(o-l)&&(e-s)*(n-l)>=(r-s)*(t-l)&&(r-s)*(o-l)>=(i-s)*(n-l)}function E(e,t){let r=O(e,t)&&L(e.prev,e,e.next)>0&&L(t.prev,t,t.next)>0;return e.next.i!==t.i&&(r||D(e,t)&&D(t,e)&&(0!==L(e.prev,e,t.prev)||0!==L(e,t.prev,t)))&&!function(e,t){let r=Math.min(e.x,t.x),n=Math.max(e.x,t.x),i=Math.min(e.y,t.y),o=Math.max(e.y,t.y),s=e;do{let l=s.next;if(s.x>n&&l.x>n||s.x<r&&l.x<r||s.y>o&&l.y>o||s.y<i&&l.y<i)s=l;else{if(s.i!==e.i&&l.i!==e.i&&s.i!==t.i&&l.i!==t.i&&z(s,l,e,t))return!0;s=l}}while(s!==e);return!1}(e,t)&&(r||function(e,t){let r=e,n=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{let e=r.next;r.y>o!=e.y>o&&i<(e.x-r.x)*(o-r.y)/(e.y-r.y)+r.x&&(n=!n),r=e}while(r!==e);return n}(e,t))}function L(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function O(e,t){return e.x===t.x&&e.y===t.y}function z(e,t,r,n,i=!0){let o=L(e,t,r),s=L(e,t,n),l=L(r,n,e),a=L(r,n,t);return(o>0&&s<0||o<0&&s>0)&&(l>0&&a<0||l<0&&a>0)||!!i&&!!(0===o&&P(e,r,t)||0===s&&P(e,n,t)||0===l&&P(r,e,n)||0===a&&P(r,t,n))}function P(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function D(e,t){return L(e.prev,e,e.next)<0?L(e,t,e.next)>=0&&L(e,e.prev,t)>=0:L(e,t,e.prev)<0||L(e,e.next,t)<0}function I(e,t){let r=H(e.i,e.x,e.y),n=H(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function $(e,t,r,n){let i=H(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function F(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ),h&&function(e,t){let r=4*e.z;t.x<m[r]&&(m[r]=t.x),t.y<m[r+1]&&(m[r+1]=t.y),t.x>m[r+2]&&(m[r+2]=t.x),t.y>m[r+3]&&(m[r+3]=t.y)}(e.prev,e.next)}function H(e,t,r){return{i:e,x:t,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function k(e,t,r,n){let i=0;for(let o=t,s=r-n;o<r;o+=n)i+=(e[s]-e[o])*(e[o+1]+e[s+1]),s=o;return i}let K,W,q,V,G,Y=0,J=0;function Q(e,t,r,n,i,o){return(r-e)*(o-t)-(n-t)*(i-e)}function X(e,t,r,n,i,o,s,l){let a=e-s,u=t-l,c=r-s,f=n-l,p=i-s,h=o-l,g=a*a+u*u,y=c*c+f*f,d=p*p+h*h,m=g+y+d;return a*(f*d-y*h)-u*(c*d-y*p)+g*(c*h-f*p)<=1e-13*m*m}function ee(e){return e-e%3+(e+1)%3}o.deviation=function(e,t,r,n){let i=t&&t.length,o=i?t[0]*r:e.length,s=Math.abs(k(e,0,o,r));if(i)for(let n=0,i=t.length;n<i;n++){let o=t[n]*r,l=n<i-1?t[n+1]*r:e.length;s-=Math.abs(k(e,o,l,r))}let l=0;for(let t=0;t<n.length;t+=3){let i=n[t]*r,o=n[t+1]*r,s=n[t+2]*r;l+=Math.abs((e[i]-e[s])*(e[o+1]-e[i+1])-(e[i]-e[o])*(e[s+1]-e[i+1]))}return 0===s&&0===l?0:Math.abs((l-s)/s)},o.flatten=function(e){let t=[],r=[],n=e[0][0].length,i=0,o=0;for(let s of e){for(let e of s)for(let r=0;r<n;r++)t.push(e[r]);o&&(i+=o,r.push(i)),o=s.length}return{vertices:t,holes:r,dimensions:n}},o.refine=function(e,t,r=2){let n=e,i=n.length;if(i<6)return;(function(e){(!K||K.length<e)&&(K=new Int32Array(e)),(!W||W.length<e)&&(W=new Int32Array(e)),(!G||G.length<e)&&(G=new Uint8Array(e));let t=1;for(;t<4*e;)t<<=1;(!q||q.length<t)&&(q=new Int32Array(t),V=new Uint32Array(t)),Y=t-1})(i),J++,W.fill(-1,0,i);let o=0;for(let e=0;e<i;e++){let t=n[e],r=n[ee(e)],i=t<r?t:r,s=t<r?r:t,l=(Math.imul(i,2654435761)^Math.imul(s,2246822507))&Y;for(;V[l]===J;){let t=q[l];if(-1!==t){let r=n[t],a=n[ee(t)];if(r===i&&a===s||r===s&&a===i){W[e]=t,W[t]=e,q[l]=-1,G[t]=1,K[o++]=t;break}}l=l+1&Y}V[l]!==J&&(q[l]=e,V[l]=J)}for(;o>0;){let e=K[--o];G[e]=0;let i=W[e];if(-1===i)continue;let s=e-e%3,l=i-i%3,a=s+(e+2)%3,u=s+(e+1)%3,c=l+(i+2)%3,f=l+(i+1)%3,p=n[a],h=n[e],g=n[u],y=n[c],d=t[p*r],m=t[p*r+1],x=t[h*r],v=t[h*r+1],w=t[g*r],A=t[g*r+1],b=t[y*r],M=t[y*r+1];if(!X(d,m,x,v,w,A,b,M)&&Q(d,m,x,v,b,M)>0&&Q(d,m,b,M,w,A)>0){n[e]=y,n[i]=p;let t=W[c],r=W[a];W[e]=t,-1!==t&&(W[t]=e),W[i]=r,-1!==r&&(W[r]=i),W[a]=c,W[c]=a,-1!==t&&0===G[e]&&(G[e]=1,K[o++]=e),-1!==r&&0===G[i]&&(G[i]=1,K[o++]=i),-1!==W[u]&&0===G[u]&&(G[u]=1,K[o++]=u),-1!==W[f]&&0===G[f]&&(G[f]=1,K[o++]=f)}}}},73354(e,t,r){r.d(t,{a:()=>f,b:()=>l,c:()=>i,d:()=>s,e:()=>p,f:()=>c,l:()=>u,n:()=>h,t:()=>o}),r(44208);var n=r(72727);function i(e,t,r){o(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r,i=3,o=i){let s=(0,n.k)(e.length,i,3),l=(0,n.k)(t.length,o,3),a=Math.min(s,l),u=r[0],c=r[1],f=r[2],p=r[4],h=r[5],g=r[6],y=r[8],d=r[9],m=r[10],x=r[12],v=r[13],w=r[14],A=0,b=0;for(let r=0;r<a;r++){let r=t[A],n=t[A+1],s=t[A+2];e[b]=u*r+p*n+y*s+x,e[b+1]=c*r+h*n+d*s+v,e[b+2]=f*r+g*n+m*s+w,A+=o,b+=i}return e}function s(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function l(e,t,r,i=3,o=i){let s=(0,n.k)(e.length,i,3),l=(0,n.k)(t.length,o,3),a=Math.min(s,l),u=r[0],c=r[1],f=r[2],p=r[3],h=r[4],g=r[5],y=r[6],d=r[7],m=r[8],x=0,v=0;for(let r=0;r<a;r++){let r=t[x],n=t[x+1],s=t[x+2];e[v]=u*r+p*n+y*s,e[v+1]=c*r+h*n+d*s,e[v+2]=f*r+g*n+m*s,x+=o,v+=i}}function a(e,t,r,n=3,i=n){let o=Math.min(e.length/n,t.length/i),s=0,l=0;for(let a=0;a<o;a++)e[l]=r*t[s],e[l+1]=r*t[s+1],e[l+2]=r*t[s+2],s+=i,l+=n;return e}function u(e,t,r,n){c(e.typedBuffer,t.typedBuffer,r,n,e.typedBufferStride,t.typedBufferStride)}function c(e,t,r,n,i=3,o=i){let s=Math.min(e.length/i,t.length/o),l=0,a=0,u=1/2.2;for(let c=0;c<s;c++)e[a]=n*(r*t[l])**u,e[a+1]=n*(r*t[l+1])**u,e[a+2]=n*(r*t[l+2])**u,l+=o,a+=i}function f(e,t,r,i=3,o=i){let s=(0,n.k)(e.length,i,3),l=(0,n.k)(t.length,o,3),a=Math.min(s,l),u=0,c=0;for(let n=0;n<a;n++)e[c]=t[u]+r[0],e[c+1]=t[u+1]+r[1],e[c+2]=t[u+2]+r[2],u+=o,c+=i;return e}function p(e,t){h(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function h(e,t,r=3,n=r){let i=Math.min(e.length/r,t.length/n),o=0,s=0;for(let l=0;l<i;l++){let i=t[o],l=t[o+1],a=t[o+2],u=i*i+l*l+a*a;if(u>0){let t=1/Math.sqrt(u);e[s]=t*i,e[s+1]=t*l,e[s+2]=t*a}o+=n,s+=r}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:u,normalize:h,normalizeView:p,scale:a,scaleView:function(e,t,r){a(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){let n=Math.min(e.count,t.count),i=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,l=t.typedBufferStride,a=0,u=0;for(let e=0;e<n;e++)i[u]=s[a]>>r,i[u+1]=s[a+1]>>r,i[u+2]=s[a+2]>>r,a+=l,u+=o},transformMat3:l,transformMat3View:s,transformMat4:o,transformMat4View:i,translate:f},Symbol.toStringTag,{value:"Module"}))},21287(e,t,r){r.d(t,{M5:()=>f,eV:()=>c});var n=r(56507),i=r(49186),o=r(17676),s=r(84952),l=r(26306);let a=null,u=!0;function c(e,t,r,n){if(!t||!r)throw Error("Cannot construct image data without dimensions");if(u)try{return new ImageData(e,t,r)}catch{u=!1}let i=function(e,t,r){return r||=(a||(a=document.createElement("canvas"),a.width=1,a.height=1),a),r.getContext("2d").createImageData(e,t)}(t,r,n);return i.data.set(e,0),i}async function f(e,t){let{arrayBuffer:a,mediaType:u}=await async function(e,t){let r=(0,s.r$)(e);if(r?.isBase64)return{arrayBuffer:(0,l.M)(r.data),mediaType:r.mediaType};let i=await(0,n.A)(e,{responseType:"array-buffer",...t});return{arrayBuffer:i.data,mediaType:i.getHeader?.("Content-Type")??""}}(e,t),c="image/png"===u;if("image/gif"===u){let{isAnimatedGIF:e,parseGif:n}=await r.e(820).then(()=>r(10820));if(e(a))return n(a,t)}if(c){let{isAnimatedPNG:e,parseApng:n}=await r.e(2390).then(()=>r(22390));if(e(a))return n(a,t)}return async function(e,t){let r=window.URL.createObjectURL(e);try{let{data:e}=await(0,n.A)(r,{...t,responseType:"image"});return e}catch(e){throw(0,o.zf)(e)?e:new i.A("invalid-image",`Could not fetch requested image at ${r}`)}finally{window.URL.revokeObjectURL(r)}}(new Blob([a],{type:u}),t)}},83300(e,t,r){r.d(t,{A:()=>Me});var n=r(32198),i=r(69540),o=r(92474),s=r(53966),l=r(61893),a=r(17676),u=r(36708),c=r(91429),f=r(51850),p=r(91075),h=r(86738),g=r(70328),y=r(24770),d=r(16939),m=r(95696),x=r(18251),v=r(73836),w=r(1193),A=r(27615),b=r(35522),M=r(65806);function C(e,t){switch(e.type){case"georeferenced":return t.isGeographic;case"local":return t.isGeographic||t.isWebMercator}}var T=r(22141),S=r(72258);const R=()=>s.A.getLogger("esri.geometry.support.meshUtils.centerAt");const Z=(0,f.vt)(),U=(0,f.vt)(),N=(0,f.vt)();var _=r(9093),B=r(5443),j=r(99917),E=r(98764),L=r(48353),O=r(9762),z=r(4197),P=r(73354);const D=(0,_.vt)(),I=(0,z.jh)(24);var $=r(49186),F=r(84952);function H(e){let t=(0,F.nM)(e.url);return r=>{let n=(0,F.V1)(r,t,t),i=n?n.replace(/^ *\.\//,""):null;return(i?e.files.get(i):null)??r}}function k(e){return J.fromBlob(e,Q(e.name,e.type))}const K=/^model\/gltf\+json$/,W=/^model\/gltf-binary$/,q=/\.gltf$/i,V=/\.glb$/i;function G({mimeType:e,source:t,name:r}){return K.test(e)||q.test(r)?{url:t.url,type:"gltf"}:W.test(e)||V.test(r)?{url:t.url,type:"glb"}:null}function Y(e){let t=new Map,r=null,n=null;for(let i of e){let{source:e,name:o}=i;r??=G(i),"ESRI3DO_NORM.glb"===o&&(n=G(i)),t.set(o,e.url),e.files.forEach((e,r)=>t.set(r,e))}let i=n??r;if(null==i)throw new $.A("mesh-load-external:missing-files","Missing files to load external mesh source");return new J(i.url,()=>e.forEach(({source:e})=>e.dispose()),t,i.type)}class J{constructor(e,t=()=>{},r=new Map,n){this.url=e,this.dispose=t,this.files=r,this.type=n}static fromBlob(e,t){let r=URL.createObjectURL(e);return new J(r,()=>URL.revokeObjectURL(r),void 0,t)}}function Q(e,t){return K.test(t)||q.test(e)?"gltf":W.test(t)||q.test(e)?"glb":void 0}var X=r(66895),ee=r(29461),te=r(77690),re=r(29242),ne=r(58083),ie=r(67026),oe=r(82534);const se=()=>s.A.getLogger("esri.geometry.support.meshUtils.rotate");function le(e,t,r,n=f.uY){if(null!=e){(0,ne.$0)(fe,(0,y.$I)(t),(0,y.yo)(t));for(let t=0;t<e.length;t+=r){for(let r=0;r<3;r++)ae[r]=e[t+r]-n[r];(0,b.Z0)(ae,ae,fe);for(let r=0;r<3;r++)e[t+r]=ae[r]+n[r]}}}const ae=(0,f.vt)(),ue=(0,_.vt)(),ce=(0,y.vt)(),fe=(0,_.vt)(),pe=(0,re.vt)(),he=(0,f.vt)(),ge=(0,oe.vt)(),ye=()=>s.A.getLogger("esri.geometry.support.meshUtils.scale");function de(e,t,r=f.uY){if(e)for(let n=0;n<e.length;n+=3){for(let t=0;t<3;t++)me[t]=e[n+t]-r[t];(0,b.hs)(me,me,t);for(let t=0;t<3;t++)e[n+t]=me[t]+r[t]}}const me=(0,f.vt)(),xe=(0,f.vt)(),ve=(0,_.vt)(),we=(0,f.vt)();var Ae;const be={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:m.A,local:x.A}};let Me=Ae=class extends((0,i.OU)((0,o.WV)((0,l.g)(p.A)))){constructor(e){super(e),this.components=null,this.vertexSpace=new m.A,this.transform=null,this.metadata=new ee.O,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new w.A,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when(()=>{this.addHandles((0,u.wB)(()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map(e=>e.clone())}),()=>this._clearSources(),{once:!0,sync:!0}))}).catch(()=>{})}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){let{spatialReference:e,vertexSpace:t}=this,r=this;return function(e){let{spatialReference:t,vertexSpace:r,untransformedBounds:n}=e,i=(0,g.gE)(n,I);if((0,A.Hq)(r)&&e.transform&&(0,P.t)(i,i,e.transform.localMatrix),"georeferenced"===r.type){let e=r.origin;return e&&(0,P.a)(i,i,e),(0,g.w1)((0,g.vY)(i),t)}let o=(0,E.lO)(t),s=r.origin;if(!(0,j.canProjectWithoutEngine)(o,t)){let[e,r,n]=s;return new B.A({xmin:e,ymin:r,zmin:n,xmax:e,ymax:r,zmax:n,spatialReference:t})}return(0,L.l)(t,s,D,o),(0,P.t)(i,i,D),(0,O.projectBuffer)(i,o,0,i,t,0),(0,g.w1)((0,g.vY)(i),t)}({get transform(){return r.transform},vertexSpace:t,spatialReference:e,untransformedBounds:this._untransformedBounds})}get _untransformedBounds(){let{vertexAttributes:{position:e},components:t}=this;return 0===e.length||0===t?.length?(0,g.vt)(g.v_):(0,g.vY)(e)}get origin(){let e=(0,A.MW)(this.vertexSpace,this.spatialReference);if(null!=e)return e;let{center:t,zmin:r}=this._transformedExtent;return new h.A({x:t.x,y:t.y,z:r,spatialReference:this.spatialReference})}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this._checkIfLoaded("addComponent()")&&(this.components||=[],this.components.push(d.A.from(e)),this.notifyChange("components"))}removeComponent(e){if(this._checkIfLoaded("removeComponent()")){if(this.components){let t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}s.A.getLogger(this).error("removeComponent()","Provided component is not part of the list of components")}}rotate(e,t,r,n){return(0,y.AU)(e,t,r,Ce),function(e,t,r){if(!e.vertexAttributes?.position||0===t[3])return;let{spatialReference:n,vertexSpace:i}=e,o=r?.origin??e.origin;(0,A.CK)(e)?function(e,t,r){e.transform??=new v.A;let{vertexSpace:n,transform:i,spatialReference:o}=e,[s,l,a]=n.origin,u=new h.A({x:s,y:l,z:a,spatialReference:o}),c=ae;if(u.equals(r))(0,b.hZ)(c,0,0,0);else if(!(0,S.p5)(c,r,e))return void(0,T.CN)(se(),r.spatialReference,o,T.JP);(0,ie.x8)(ge,(0,y.yo)(t),(0,y.$I)(t));let p=(0,ne.O7)(ue,ge,f.uY,f.Un,c),{localMatrix:g}=i,d=(0,ne.lw)(ue,p,g);i.scale=(0,ne.X_)((0,f.vt)(),d),(0,ne.hs)(d,d,(0,b.DI)(ae,i.scale));let m=i.rotationAxis;i.rotation=(0,y.ui)(d),0===i.rotationAngle&&(i.rotationAxis=m),i.translation=(0,ne.sC)((0,f.vt)(),d)}(e,t,o):C(i,n)?function(e,t,r){let n=e.spatialReference,i=(0,E.lO)(n),o=he;if(!(0,M.g)(r,o,i)&&((0,T.CN)(se(),r.spatialReference,i,"Falling back to mesh origin"),!(0,M.g)(e.origin,o,i)))return void(0,T.CN)(se(),e.origin.spatialReference,i);let s=e.vertexAttributes.position,l=e.vertexAttributes.normal,a=e.vertexAttributes.tangent,u=new Float64Array(s.length),c=null==l?null:new Float32Array(l.length),f=null==a?null:new Float32Array(a.length);(0,L.l)(i,o,fe,i),(0,te.z0)(pe,fe);let p=ce;(0,b.ei)((0,y.yo)(ce),(0,y.yo)(t),pe),p[3]=t[3],(0,T.gr)(s,n,u,i)?null!=l&&null!=c&&!(0,T.X4)(l,s,n,u,i,c)||null!=a&&null!=f&&!(0,T.xA)(a,s,n,u,i,f)?(0,T.CN)(se(),n,i):(le(u,p,3,o),(0,T.$5)(u,i,s,n)?null!=l&&null!=c&&(le(c,p,3),!(0,T.si)(c,s,n,u,i,l))||null!=a&&null!=f&&(le(f,p,4),!(0,T.Mv)(f,s,n,u,i,a))?(0,T.CN)(se(),i,n):e.vertexAttributesChanged():(0,T.CN)(se(),i,n)):(0,T.CN)(se(),n,i)}(e,t,o):function(e,t,r){let n=he;if((0,M.g)(r,n,e.spatialReference))le(e.vertexAttributes.position,t,3,n),le(e.vertexAttributes.normal,t,3),le(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged();else{let t=e.origin;n[0]=t.x,n[1]=t.y,n[2]=t.z,(0,T.CN)(se(),r.spatialReference,e.spatialReference,T.JP)}}(e,t,o)}(this,Ce,n),this}offset(e,t,r){if(!this._checkIfLoaded("offset()"))return this;let{vertexSpace:n,vertexAttributes:i}=this,o=i?.position;if(!o)return this;if((0,A.Hq)(n)){let[i,o,s]=n.origin;n.origin=(0,f.fA)(i+e,o+t,s+r)}else{for(let n=0;n<o.length;n+=3)o[n]+=e,o[n+1]+=t,o[n+2]+=r;this.vertexAttributesChanged()}return this}scale(e,t){return this._checkIfLoaded("scale()")&&function(e,t,r){if(!e.vertexAttributes?.position)return;let{vertexSpace:n,spatialReference:i}=e,o=r?.origin??e.origin;(0,A.CK)(e)?function(e,t,r){e.transform??=new v.A;let{vertexSpace:n,transform:i,spatialReference:o}=e,[s,l,a]=n.origin,u=new h.A({x:s,y:l,z:a,spatialReference:o}),c=me;if(u.equals(r))(0,b.hZ)(c,0,0,0);else if(!(0,S.p5)(c,r,e))return void(0,T.CN)(ye(),r.spatialReference,o,T.JP);let p=(0,b.hZ)(xe,t,t,t),g=(0,ne.O7)(ve,oe.zK,f.uY,p,c),{localMatrix:d}=i,m=(0,ne.lw)(ve,g,d);i.scale=(0,ne.X_)((0,f.vt)(),m),(0,ne.hs)(m,m,(0,b.DI)(me,i.scale));let x=i.rotationAxis;i.rotation=(0,y.ui)(m),0===i.rotationAngle&&(i.rotationAxis=x),i.translation=(0,ne.sC)((0,f.vt)(),m)}(e,t,o):C(n,i)?function(e,t,r){let n=e.spatialReference,i=(0,E.lO)(n),o=we;if(!(0,M.g)(r,o,i)&&((0,T.CN)(ye(),r.spatialReference,i,"Falling back to mesh origin"),!(0,M.g)(e.origin,o,i)))return void(0,T.CN)(ye(),e.origin.spatialReference,i);let s=e.vertexAttributes.position,l=e.vertexAttributes.normal,a=e.vertexAttributes.tangent,u=new Float64Array(s.length),c=null==l?null:new Float32Array(l.length),f=null==a?null:new Float32Array(a.length);(0,T.gr)(s,n,u,i)?null!=l&&null!=c&&!(0,T.X4)(l,s,n,u,i,c)||null!=a&&null!=f&&!(0,T.xA)(a,s,n,u,i,f)?(0,T.CN)(ye(),n,i):(de(u,t,o),(0,T.$5)(u,i,s,n)?null!=l&&null!=c&&!(0,T.si)(c,s,n,u,i,l)||null!=a&&null!=f&&!(0,T.Mv)(f,s,n,u,i,a)?(0,T.CN)(ye(),i,n):e.vertexAttributesChanged():(0,T.CN)(ye(),i,n)):(0,T.CN)(ye(),n,i)}(e,t,o):function(e,t,r){let n=we;if((0,M.g)(r,n,e.spatialReference))de(e.vertexAttributes.position,t,n),e.vertexAttributesChanged();else{let t=e.origin;n[0]=t.x,n[1]=t.y,n[2]=t.z,(0,T.CN)(ye(),r.spatialReference,e.spatialReference,T.JP)}}(e,t,o)}(this,e,t),this}centerAt(e,t){return this._checkIfLoaded("centerAt()")&&function(e,t,r){if(!e.vertexAttributes?.position)return;let{vertexSpace:n}=e,i=r?.origin??e.origin;(0,A.Hq)(n)?function(e,t,r){let{vertexSpace:n}=e;if(!(0,A.Hq)(n))return;let i=U,o=Z;if(!(0,M.g)(t,o,e.spatialReference))return void(0,T.CN)(R(),t.spatialReference,e.spatialReference,T.JP);if(!(0,M.g)(r,i,e.spatialReference))return void(0,T.CN)(R(),r.spatialReference,e.spatialReference,T.JP);let s=(0,b.Re)(N,o,i);n.origin=(0,b.WQ)((0,f.vt)(),n.origin,s)}(e,t,i):C(n,i.spatialReference)?function(e,t,r){let n=(0,f.fA)(r.x,r.y,r.z??0),i=(0,S.UR)(e,new x.A({origin:n}));if(!i)return;let o=(0,f.fA)(t.x,t.y,t.z??0),s=(0,S.UR)({vertexAttributes:i,spatialReference:e.spatialReference,vertexSpace:new x.A({origin:o})},m.A.absolute);if(!s)return;let{position:l,normal:a,tangent:u}=s;e.vertexAttributes.position=l,e.vertexAttributes.normal=a,e.vertexAttributes.tangent=u,e.vertexAttributesChanged()}(e,t,i):function(e,t,r){let n=U,i=Z;if((0,M.g)(t,i,e.spatialReference))if((0,M.g)(r,n,e.spatialReference))(function(e,t,r){if(e)for(let n=0;n<e.length;n+=3)for(let i=0;i<3;i++)e[n+i]+=t[i]-r[i]})(e.vertexAttributes.position,i,n),e.vertexAttributesChanged();else{let t=e.origin;n[0]=t.x,n[1]=t.y,n[2]=t.z,(0,T.CN)(R(),r.spatialReference,e.spatialReference,T.JP)}else(0,T.CN)(R(),t.spatialReference,e.spatialReference,T.JP)}(e,t,i)}(this,e,t),this}load(e){let{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(async function(e,t,n){switch(t.source.type){case"client":case"service":return async function(e,t,n){let{source:i}=t,{loadGLTFMesh:o}=await(0,a.qr)(r.e(5841).then(()=>r(35841)),n),s=await async function(e,t){switch(e.type){case"client":return Array.isArray(e.files)?function(e){if(!e.length)throw new $.A("mesh-load-external:missing-assets","There must be at least one file to load");return Y(e.map(e=>({name:e.name,mimeType:e.type,source:k(e)})))}(e.files):k(e.files);case"service":return async function(e,t){if(!e.length)throw new $.A("mesh-load-external:missing-assets","There must be at least one file to load");let r=await(0,a.nA)(e.map(async e=>{let r=await async function(e,t){let{parts:r,assetMimeType:n,assetName:i}=e;if(1===r.length)return new J(r[0].partUrl);let o=await e.toBlob(t);return(0,a.Te)(t),J.fromBlob(o,Q(i,n))}(e);return(0,a.Te)(t),{name:e.assetName,mimeType:e.assetMimeType,source:r}}));if((0,a.G4)(t))throw r.forEach(e=>e.source.dispose()),(0,a.NK)();return Y(r)}(e.assets,t);default:throw new $.A("mesh-load-external:invalid-source","Invalid source type")}}(i,n);(0,a.Te)(n);let{mesh:{vertexAttributes:l,components:u},meta:{isDracoDecompressed:c}}=await o(new h.A({x:0,y:0,z:0,spatialReference:e.spatialReference}),s.url,{resolveFile:H(s),signal:n?.signal,expectedType:s.type,unitConversionDisabled:t.unitConversionDisabled}).finally(()=>s.dispose());if(c)throw new $.A("mesh-load-external:draco-not-supported","The provided mesh uses Draco compression which is not supported.");e.vertexAttributes=l,e.components=u}(e,t,n);case"loadable":return t.source.load(e,n);default:t.source}}(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(e){return super.clone((0,X.WO)((0,X.QN)(e)))}cloneShallow(){return new Ae({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){let[{toBinaryGLTF:t}]=await Promise.all([r.e(4038).then(()=>r(84038)),this.load(e)]);return(0,a.Te)(e),await t(this,e)}get usedMemory(){return this.components?this.components.reduce((e,t)=>e+t.memoryUsage,this.vertexAttributes.usedMemory):this.vertexAttributes.usedMemory}_clearSources(){this.metadata.clearSources()}_checkIfLoaded(e){return!!this.loaded||(s.A.getLogger(this).error(e,"Mesh must be loaded before applying operations"),!1)}};(0,n.Cg)([(0,c.MZ)({type:[d.A],json:{write:!0}})],Me.prototype,"components",void 0),(0,n.Cg)([(0,c.MZ)({nonNullable:!0,types:be,constructOnly:!0,json:{write:!0},clonable:(e,t)=>(0,X.o2)(t)?.vertexSpace??e.clone(t)})],Me.prototype,"vertexSpace",void 0),(0,n.Cg)([(0,c.MZ)({type:v.A,clonable:(e,t)=>{let r=(0,X.o2)(t);return r&&"transform"in r?r.transform:e?.clone()??e},json:{write:!0}})],Me.prototype,"transform",void 0),(0,n.Cg)([(0,c.MZ)({constructOnly:!0,type:ee.O,clonable:(e,t)=>(0,X.o2)(t)?.metadata??e.clone()})],Me.prototype,"metadata",void 0),(0,n.Cg)([(0,c.MZ)()],Me.prototype,"hasExtent",null),(0,n.Cg)([(0,c.MZ)()],Me.prototype,"_transformedExtent",null),(0,n.Cg)([(0,c.MZ)()],Me.prototype,"_untransformedBounds",null),(0,n.Cg)([(0,c.MZ)()],Me.prototype,"origin",null),(0,n.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],Me.prototype,"extent",null),(0,n.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],Me.prototype,"hasZ",void 0),(0,n.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],Me.prototype,"hasM",void 0),(0,n.Cg)([(0,c.MZ)({type:w.A,nonNullable:!0,json:{write:!0},clonable:(e,t)=>(0,X.o2)(t)?.vertexAttributes??e.clone(t)})],Me.prototype,"vertexAttributes",void 0),Me=Ae=(0,n.Cg)([(0,c.$K)("esri.geometry.Mesh")],Me);const Ce=(0,y.vt)()},15585(e,t,r){r.d(t,{If:()=>u,QT:()=>c});var n=r(32198),i=r(2741),o=r(49186),s=r(44208);r(34727);let l=null,a=null;async function u(){return l??=async function(){a=await(await r.e(2997).then(()=>r(42997))).default({locateFile:e=>(0,i.s)(`esri/core/libs/libtess/${e}`)})}(),l}function c(e,t,r=2){let i={stack:[],error:void 0,hasError:!1};try{let l=a;if(!l)throw new o.A("libtess:not-loaded","libtessF32 not loaded");let u=(0,n.mS)(i,h.from(l,e),!1),c=(0,n.mS)(i,g.from(l,t),!1),f=e.length/r*4,p=(0,n.mS)(i,new h(l,f*r),!1),y=l.triangulate(u.ptr,c.ptr,c.size,r,p.ptr,f);if((0,s.A)("esri-tessellation-debug")){let e=l.getError();0!==e&&console.warn("libtess:triangulation",function(e){switch(e){case 100903:return"Insufficient output buffer";case 100902:return"Out of memory";case 100151:return"Missing begin polygon";case 100152:return"Missing begin contour";case 100153:return"Missing end polygon";case 100154:return"Missing end countour";case 100155:return"Coordinates too large";case 100156:return"Missing combine callback";default:return`Unknown: ${e}`}}(e))}return{buffer:p.slice(0,y*r),vertexCount:y}}catch(e){i.error=e,i.hasError=!0}finally{(0,n.hk)(i)}}function f(e){return e.HEAPF32}function p(e){return e.HEAP32}new Float32Array,new Uint32Array,new Uint32Array,new Uint32Array,new Float64Array,new Uint32Array,new Uint32Array,new Uint32Array;class h{static from(e,t){let r=new h(e,t.length);return r.set(t),r}constructor(e,t){this._libtess=e,this.size=t,this.ptr=e.allocateCoordinateArray(t)}destroy(){this._libtess.destroyCoordinateArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Float32Array.BYTES_PER_ELEMENT}set(e){f(this._libtess).set(e,this.ptr/this.bytesPerCoordinate)}slice(e,t){let r=this.ptr/this.bytesPerCoordinate;return f(this._libtess).slice(r+e,r+t)}}Symbol.dispose;class g{static from(e,t){let r=new g(e,t.length);return r.set(t),r}constructor(e,t){this._libtess=e,this.size=t,this.ptr=e.allocateLengthsArray(t)}destroy(){this._libtess.destroyLengthsArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Int32Array.BYTES_PER_ELEMENT}set(e){p(this._libtess).set(e,this.ptr/this.bytesPerCoordinate)}slice(e,t){let r=this.ptr/this.bytesPerCoordinate;return function(e){let t=p(e);return new Uint32Array(t.buffer,t.byteOffset,t.length)}(this._libtess).slice(r+e,r+t)}}},97146(e,t,r){r.d(t,{Dg:()=>o,lc:()=>f,my:()=>s,tM:()=>p,uW:()=>i});var n=r(34275);function i(e){return o(e,!0)}function o(e,t){if(Array.isArray(e)){if(e.length<1024)return e}else if(e.length<1024)return Array.from(e);let r=!0,i=!0;return e.some((e,t)=>(r&&=0===e,i&&=e===t,!r&&!i)),r?function(e){if(1===e)return u;if(e<1024)return Array(e).fill(0);if(e>a.length){let t=Math.max(2*a.length,e);a=new Uint8Array(t)}return new Uint8Array(a.buffer,0,e)}(e.length):i?p(e.length):(0,n.iu)(e)&&e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:function(e,t){for(let r of e){if(r>=65536)return(0,n.iu)(e)?e:new Uint32Array(e);r>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}(e,!t)}function s(e,t=e){return e<=1024?Array(e):t<=65536?new Uint16Array(e):new Uint32Array(e)}let l=h(131072),a=new Uint8Array(65536);const u=[0],c=(()=>{let e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function f(e){if(e===u)return!0;if(!(0,n.iu)(e))return!1;let{buffer:t}=e;return t===c.buffer||t===l.buffer||t===a.buffer}function p(e){return 1===e?u:e<1024?function(e){let t=Array(e).fill(0);for(let r=0;r<e;r++)t[r]=r;return t}(e):e<c.length?new Uint16Array(c.buffer,0,e):(e>l.length&&(l=h(Math.max(2*l.length,e))),new Uint32Array(l.buffer,0,e))}function h(e){let t=new Uint32Array(e);for(let e=0;e<t.length;e++)t[e]=e;return t}},16939(e,t,r){r.d(t,{A:()=>h});var n,i=r(32198),o=r(69540),s=r(25482),l=r(53966),a=r(91429),u=r(78888),c=r(19211),f=r(80882),p=r(31199);let h=n=class extends((0,o.OU)(s.o)){static from(e){return(0,u.PZ)(n,e)}constructor(e){super(e),this.material=null,this.name=void 0,this.shading="source",this.trustSourceNormals=!1}get faces(){return this._get("faces")??null}set faces(e){this._set("faces",(0,p.b)(e,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},l.A.getLogger(this)))}castMaterial(e){return e&&"object"==typeof e&&("metallic"in e||"roughness"in e||"metallicRoughnessTexture"in e)?(0,u.PZ)(f.A,e):(0,u.PZ)(c.A,e)}get memoryUsage(){let e=0;return null!=this.faces&&(e+=this.faces.byteLength),null!=this.material&&(e+=this.material.memoryUsage),e}};(0,i.Cg)([(0,a.MZ)({json:{write:p.B}})],h.prototype,"faces",null),(0,i.Cg)([(0,a.MZ)({type:c.A,json:{write:!0}})],h.prototype,"material",void 0),(0,i.Cg)([(0,a.wg)("material")],h.prototype,"castMaterial",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],h.prototype,"shading",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean})],h.prototype,"trustSourceNormals",void 0),h=n=(0,i.Cg)([(0,a.$K)("esri.geometry.support.MeshComponent")],h)},95696(e,t,r){r.d(t,{A:()=>u});var n,i=r(32198),o=r(69540),s=r(25482),l=r(91429),a=r(93223);let u=class extends((0,o.OU)(s.o)){static{n=this}constructor(e){super(e),this.type="georeferenced",this.origin=null}static{this.absolute=new n}};(0,i.Cg)([(0,a.e)({georeferenced:"georeferenced"},{readOnly:!0})],u.prototype,"type",void 0),(0,i.Cg)([(0,l.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],u.prototype,"origin",void 0),u=n=(0,i.Cg)([(0,l.$K)("esri.geometry.support.MeshGeoreferencedVertexSpace")],u)},18251(e,t,r){r.d(t,{A:()=>u});var n=r(32198),i=r(69540),o=r(25482),s=r(91429),l=r(51850),a=r(93223);let u=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.type="local",this.origin=(0,l.vt)()}};(0,n.Cg)([(0,a.e)({local:"local"},{readOnly:!0})],u.prototype,"type",void 0),(0,n.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],u.prototype,"origin",void 0),u=(0,n.Cg)([(0,s.$K)("esri.geometry.support.MeshLocalVertexSpace")],u)},19211(e,t,r){r.d(t,{A:()=>f});var n=r(32198),i=r(68197),o=r(69540),s=r(25482),l=r(91429),a=r(35063),u=r(51147),c=r(66895);let f=class extends((0,o.OU)(s.o)){constructor(e){super(e),this.color=null,this.colorTextureTransform=null,this.normalTextureTransform=void 0,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}get colorTexture(){return this._get("colorTexture")}set colorTexture(e){this._set("colorTexture",null==e?null:a.A.from(e))}get normalTexture(){return this._get("normalTexture")}set normalTexture(e){this._set("normalTexture",null==e?null:a.A.from(e))}clone(e){let t=(0,c.hz)(e),r=t?.materialMap?.get(this);if(r)return r;let n=super.clone((0,c.QN)(e));return t?.materialMap?.set(this,n),n}get memoryUsage(){return this.getMemoryUsage()}getMemoryUsage(){let e=0;return e+=null==this.color?0:16,null!=this.colorTexture&&(e+=this.colorTexture.memoryUsage),e+=null==this.colorTextureTransform?0:20,null!=this.normalTexture&&(e+=this.normalTexture.memoryUsage),e+=null==this.normalTextureTransform?0:20,e}};(0,n.Cg)([(0,l.MZ)({type:i.A,json:{write:!0}})],f.prototype,"color",void 0),(0,n.Cg)([(0,l.MZ)({type:a.A,json:{write:!0},value:null})],f.prototype,"colorTexture",null),(0,n.Cg)([(0,l.MZ)({type:u.A,json:{write:!0}})],f.prototype,"colorTextureTransform",void 0),(0,n.Cg)([(0,l.MZ)({type:a.A,json:{write:!0},value:null})],f.prototype,"normalTexture",null),(0,n.Cg)([(0,l.MZ)({type:u.A,json:{write:!0}})],f.prototype,"normalTextureTransform",void 0),(0,n.Cg)([(0,l.MZ)({nonNullable:!0,json:{write:!0}})],f.prototype,"alphaMode",void 0),(0,n.Cg)([(0,l.MZ)({nonNullable:!0,json:{write:!0}})],f.prototype,"alphaCutoff",void 0),(0,n.Cg)([(0,l.MZ)({nonNullable:!0,json:{write:!0}})],f.prototype,"doubleSided",void 0),f=(0,n.Cg)([(0,l.$K)("esri.geometry.support.MeshMaterial")],f)},80882(e,t,r){r.d(t,{A:()=>u});var n=r(32198),i=r(68197),o=r(91429),s=r(19211),l=r(35063),a=r(51147);let u=class extends s.A{constructor(e){super(e),this.emissiveColor=null,this.emissiveStrength=null,this.emissiveTextureTransform=void 0,this.occlusionTextureTransform=void 0,this.metallic=1,this.roughness=1,this.metallicRoughnessTextureTransform=void 0,this.unlit=!1}get emissiveTexture(){return this._get("emissiveTexture")}set emissiveTexture(e){this._set("emissiveTexture",null==e?null:l.A.from(e))}get occlusionTexture(){return this._get("occlusionTexture")}set occlusionTexture(e){this._set("occlusionTexture",null==e?null:l.A.from(e))}get metallicRoughnessTexture(){return this._get("metallicRoughnessTexture")}set metallicRoughnessTexture(e){this._set("metallicRoughnessTexture",null==e?null:l.A.from(e))}getMemoryUsage(){let e=super.getMemoryUsage();return e+=null==this.emissiveColor?0:16,null!=this.emissiveTexture&&(e+=this.emissiveTexture.memoryUsage),e+=null==this.emissiveTextureTransform?0:20,null!=this.occlusionTexture&&(e+=this.occlusionTexture.memoryUsage),e+=null==this.occlusionTextureTransform?0:20,null!=this.metallicRoughnessTexture&&(e+=this.metallicRoughnessTexture.memoryUsage),e+=null==this.metallicRoughnessTextureTransform?0:20,e}};(0,n.Cg)([(0,o.MZ)({type:i.A,json:{write:!0}})],u.prototype,"emissiveColor",void 0),(0,n.Cg)([(0,o.MZ)({json:{write:!0}})],u.prototype,"emissiveStrength",void 0),(0,n.Cg)([(0,o.MZ)({type:l.A,json:{write:!0},value:null})],u.prototype,"emissiveTexture",null),(0,n.Cg)([(0,o.MZ)({type:a.A,json:{write:!0}})],u.prototype,"emissiveTextureTransform",void 0),(0,n.Cg)([(0,o.MZ)({type:l.A,json:{write:!0},value:null})],u.prototype,"occlusionTexture",null),(0,n.Cg)([(0,o.MZ)({type:a.A,json:{write:!0}})],u.prototype,"occlusionTextureTransform",void 0),(0,n.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],u.prototype,"metallic",void 0),(0,n.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],u.prototype,"roughness",void 0),(0,n.Cg)([(0,o.MZ)({type:l.A,json:{write:!0},value:null})],u.prototype,"metallicRoughnessTexture",null),(0,n.Cg)([(0,o.MZ)({type:a.A,json:{write:!0}})],u.prototype,"metallicRoughnessTextureTransform",void 0),(0,n.Cg)([(0,o.MZ)({type:Boolean,nonNullable:!0,json:{write:!0}})],u.prototype,"unlit",void 0),u=(0,n.Cg)([(0,o.$K)("esri.geometry.support.MeshMaterialMetallicRoughness")],u)},35063(e,t,r){r.d(t,{A:()=>d});var n,i=r(32198),o=r(69540),s=r(21287),l=r(25482),a=r(91429),u=r(78888),c=r(66895),f=r(97159),p=r(43937),h=r(36005);const g=new WeakMap;let y=0,d=class extends((0,o.OU)(l.o)){static{n=this}constructor(e){super(e),this.wrap="repeat"}get url(){return this._get("url")||null}set url(e){this._set("url",e),e&&this._set("data",null)}get data(){return this._get("data")||null}set data(e){this._set("data",e),e&&this._set("url",null)}writeData(e,t,r,n){e instanceof HTMLImageElement?t[r]={type:"image-element",src:(0,f.t)(e.src,n),crossOrigin:e.crossOrigin}:e instanceof HTMLCanvasElement?t[r]={type:"canvas-element",imageData:m(e.getContext("2d").getImageData(0,0,e.width,e.height))}:e instanceof HTMLVideoElement?t[r]={type:"video-element",src:(0,f.t)(e.src,n),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload}:e instanceof ImageData&&(t[r]={type:"image-data",imageData:m(e)})}readData(e){switch(e.type){case"image-element":{let t=new Image;return t.src=e.src,t.crossOrigin=e.crossOrigin,t}case"canvas-element":{let t=x(e.imageData),r=document.createElement("canvas");return r.width=t.width,r.height=t.height,r.getContext("2d").putImageData(t,0,0),r}case"image-data":return x(e.imageData);case"video-element":{let t=document.createElement("video");return t.src=e.src,t.crossOrigin=e.crossOrigin,t.autoplay=e.autoplay,t.loop=e.loop,t.muted=e.muted,t.preload=e.preload,t}default:return}}get transparent(){let{data:e,url:t}=this,r=e=>e?.toLowerCase().endsWith(".png")||e?.toLocaleLowerCase().startsWith("data:image/png;");return e instanceof HTMLCanvasElement?v(e.getContext("2d").getImageData(0,0,e.width,e.height)):e instanceof ImageData?v(e):!!(t&&r(t)||e instanceof HTMLImageElement&&r(e.src))}set transparent(e){this._overrideIfSome("transparent",e)}get contentHash(){let e="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",t=(t="")=>`d:${t},t:${this.transparent},w:${e}`;return null==this.url?null==this.data?t():this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?t(this.data.src):(g.has(this.data)||g.set(this.data,++y),t(g.get(this.data))):t(this.url)}get memoryUsage(){let e=0;if(e+=null==this.url?0:this.url.length,null!=this.data){let t=this.data;"data"in t?e+=t.data.byteLength:t instanceof HTMLImageElement?e+=t.naturalWidth*t.naturalHeight*3:t instanceof HTMLCanvasElement&&(e+=t.width*t.height*3)}return e}clone(e){let t=(0,c.$N)(e),r=t?.textureMap?.get(this);if(r)return r;let n=super.clone(e);return t?.textureMap?.set(this,n),n}static from(e){return"string"==typeof e?new n({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new n({data:e}):(0,u.PZ)(n,e)}};function m(e){let t="";for(let r=0;r<e.data.length;r++)t+=String.fromCharCode(e.data[r]);return{data:btoa(t),width:e.width,height:e.height}}function x(e){let t=atob(e.data),r=new Uint8ClampedArray(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return(0,s.eV)(r,e.width,e.height)}function v(e){for(let t=3;t<e.data.length;t+=4)if(255!==e.data[t])return!0;return!1}(0,i.Cg)([(0,a.MZ)({type:String,json:{write:f.w}})],d.prototype,"url",null),(0,i.Cg)([(0,a.MZ)({clonable:"reference",json:{write:{overridePolicy(){return{enabled:!this.url}}}}})],d.prototype,"data",null),(0,i.Cg)([(0,p.K)("data")],d.prototype,"writeData",null),(0,i.Cg)([(0,h.w)("data")],d.prototype,"readData",null),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],d.prototype,"transparent",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"wrap",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],d.prototype,"contentHash",null),d=n=(0,i.Cg)([(0,a.$K)("esri.geometry.support.MeshTexture")],d)},51147(e,t,r){r.d(t,{A:()=>l});var n=r(32198),i=r(69540),o=r(25482),s=r(91429);let l=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.offset=[0,0],this.rotation=0,this.scale=[1,1]}};(0,n.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"offset",void 0),(0,n.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],l.prototype,"rotation",void 0),(0,n.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"scale",void 0),l=(0,n.Cg)([(0,s.$K)("esri.geometry.support.MeshTextureTransform")],l)},1193(e,t,r){r.d(t,{A:()=>f});var n,i=r(32198),o=r(69540),s=r(25482),l=r(4718),a=r(53966),u=r(91429),c=r(31199);let f=n=class extends((0,o.OU)(s.o)){constructor(e){super(e),this.color=null,this.position=new Float64Array,this.uv=null,this.normal=null,this.tangent=null}castColor(e){return(0,c.b)(e,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},a.A.getLogger(this))}castPosition(e){return e&&e instanceof Float32Array&&a.A.getLogger(this).warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),(0,c.b)(e,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},a.A.getLogger(this))}castUv(e){return(0,c.b)(e,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},a.A.getLogger(this))}castNormal(e){return(0,c.b)(e,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},a.A.getLogger(this))}castTangent(e){return(0,c.b)(e,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},a.A.getLogger(this))}clonePositional(){let e={position:(0,l.o8)(this.position),normal:(0,l.o8)(this.normal),tangent:(0,l.o8)(this.tangent),uv:this.uv,color:this.color};return new n(e)}get usedMemory(){return this.position.byteLength+(this.uv?.byteLength??0)+(this.normal?.byteLength??0)+(this.tangent?.byteLength??0)+(this.color?.byteLength??0)}};(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],f.prototype,"color",void 0),(0,i.Cg)([(0,u.wg)("color")],f.prototype,"castColor",null),(0,i.Cg)([(0,u.MZ)({nonNullable:!0,json:{write:c.B}})],f.prototype,"position",void 0),(0,i.Cg)([(0,u.wg)("position")],f.prototype,"castPosition",null),(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],f.prototype,"uv",void 0),(0,i.Cg)([(0,u.wg)("uv")],f.prototype,"castUv",null),(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],f.prototype,"normal",void 0),(0,i.Cg)([(0,u.wg)("normal")],f.prototype,"castNormal",null),(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],f.prototype,"tangent",void 0),(0,i.Cg)([(0,u.wg)("tangent")],f.prototype,"castTangent",null),f=n=(0,i.Cg)([(0,u.$K)("esri.geometry.support.MeshVertexAttributes")],f)},72727(e,t,r){function n(e,t,r){if(t<=0)return 0;let n=e-r;return n<0?0:Math.floor(n/t)+1}r.d(t,{k:()=>n}),r(53966)},31199(e,t,r){function n(e,t,r,n){let{loggerTag:i,stride:o}=t;return e.length%o===0?e:(n.error(i,`Invalid array length, expected a multiple of ${o}`),new r([]))}function i(e,t,r,i,o){if(!e)return e;if(e instanceof t)return n(e,i,t,o);for(let s of r)if(e instanceof s)return n(new t(e),i,t,o);if(Array.isArray(e))return n(new t(e),i,t,o);{let n=r.map(e=>`'${e.name}'`);return o.error(`Failed to set property, expected one of ${n}, but got ${e.constructor.name}`),new t([])}}function o(e,t,r){t[r]=function(e){let t=Array(e.length);for(let r=0;r<e.length;r++)t[r]=e[r];return t}(e)}r.d(t,{B:()=>o,b:()=>i})},98331(e,t,r){r.d(t,{H5:()=>p,createWithExternalSource:()=>f});var n=r(49186),i=(r(17676),r(83300)),o=(r(16939),r(95696),r(73836)),s=(r(1193),r(27615)),l=(r(53966),r(35522),r(51850));r(66895),r(72258);var a=r(29461),u=r(29242);(0,l.vt)(),(0,u.vt)(),r(9762),r(4197),r(77690),r(48353),r(13030),(0,u.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),new class{constructor(){this.verticalDistanceToGround=0,this.sampledElevation=0,this.z=0}},r(44208),r(62788);var c=r(95488);function f(e,t,r){let n=r?.extent??null,{spatialReference:l}=e,u=r?.transform?.clone()??new o.A,c=(0,s.TE)(e,r),f={source:t,extent:n,unitConversionDisabled:r?.unitConversionDisabled},p=new a.O;return p.externalSources.push(f),new i.A({metadata:p,transform:u,vertexSpace:c,spatialReference:l})}function p(e,t){let{spatialReference:r}=e,l=t?.transform?.clone()??new o.A,a=(0,s.TE)(e,t),u=new i.A({transform:l,vertexSpace:a,spatialReference:r});return u.addResolvingPromise(Promise.reject(new n.A("mesh-incomplete","Mesh resources are not complete"))),u}r(83349),r(15585),r(95108),r(97146),r(34727),r(86211),(0,r(27921).vt)(),new c.I,new WeakSet},63579(e,t,r){r.d(t,{Bq:()=>a,Qp:()=>l,WN:()=>d,dK:()=>m,eN:()=>h,fH:()=>y,in:()=>g,yr:()=>u});var n=r(56507),i=r(4576),o=r(17676),s=r(20557);class l{constructor(e,t,r){this.assetName=e,this.assetMimeType=t,this.parts=r}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,i.aI)(this.parts,e.parts,(e,t)=>e.equals(t))}isOnService(e){return this.parts.every(t=>t.isOnService(e))}makeHash(){let e="";for(let t of this.parts)e+=t.partHash;return e}async toBlob(e){let{parts:t}=this;if(1===t.length)return t[0].toBlob(e);let r=await Promise.all(t.map(t=>t.toBlob(e)));return(0,o.Te)(e),new Blob(r)}}class a{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){let{data:t}=await(0,n.A)(this.partUrl,{responseType:"blob"});return(0,o.Te)(e),t}}function u(e){return function(e){switch(e?.type){case"client":return Array.isArray(e.files)?e.files.some(p):p(e.files);case"service":return e.assets.some(p);case"loadable":return!0;default:return!1}}(e?.source)}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,f=/\.(gltf|glb)/i;function p(e){if(e instanceof File){let{type:t,name:r}=e;return c.test(t)||f.test(r)}return c.test(e.assetMimeType)||f.test(e.assetName)}function h(e,t){if(!e)return!1;let{source:r}=e;return function(e,t){return"service"===e.type&&e.assets.every(e=>e.isOnService(t))}(r,t)}function g(e,t){if(e===t)return!0;let{source:r}=e,{source:n}=t;if(r===n)return!0;if("service"===r.type&&"service"===n.type){if(r.assets.length!==n.assets.length)return!1;let e=(e,t)=>e.assetName<t.assetName?-1:+(e.assetName>t.assetName),t=[...r.assets].sort(e),i=[...n.assets].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(i[e]))return!1;return!0}return!1}function y(e,t){return e instanceof File?(0,s.rq)(e,t):(0,s.z$)(e.assetMimeType,e.assetName,t)}function d(e){switch(e.type){case"client":return Array.isArray(e.files)?e.files:[e.files];case"service":return e.assets;case"loadable":return}}function m(e){return!!e.original}},29461(e,t,r){r.d(t,{O:()=>u});var n=r(32198),i=r(69540),o=r(7762),s=r(36708),l=r(91429),a=r(63579);let u=class extends i.Pw{constructor(e){super(e),this.externalSources=new o.A,this._explicitDisplaySource=null,this.addHandles((0,s.on)(()=>this.externalSources,"after-remove",({item:e})=>{e===this._explicitDisplaySource&&(this._explicitDisplaySource=null)},{sync:!0,onListenerRemove:()=>this._explicitDisplaySource=null}))}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(e){if(null!=e&&!(0,a.yr)(e))throw Error("Cannot use this source for display: it is not in a supported format.");this._explicitDisplaySource=e,e&&this.externalSources.every(t=>!(0,a.in)(t,e))&&this.externalSources.add(e)}clearSources(){this.externalSources.removeAll()}getExternalSourcesOnService(e){return this.externalSources.items.filter(t=>(0,a.eN)(t,e))}get _implicitDisplaySource(){return this.externalSources.find(a.yr)}};(0,n.Cg)([(0,l.MZ)()],u.prototype,"externalSources",void 0),(0,n.Cg)([(0,l.MZ)()],u.prototype,"displaySource",null),(0,n.Cg)([(0,l.MZ)()],u.prototype,"_implicitDisplaySource",null),(0,n.Cg)([(0,l.MZ)()],u.prototype,"_explicitDisplaySource",void 0),u=(0,n.Cg)([(0,l.$K)("esri.geometry.support.meshUtils.Metadata")],u)},66895(e,t,r){r.d(t,{$N:()=>c,Lz:()=>o,QN:()=>f,WO:()=>a,hz:()=>l,o2:()=>i});const n=Symbol("meshContext");function i(e){return e&&"object"==typeof e&&n in e?e[n]:void 0}function o(e,t){let r=i(e);return{...e,[n]:{...r,...t}}}const s=Symbol("meshMaterialContext");function l(e){return e&&"object"==typeof e&&s in e?e[s]:void 0}function a(e){if(l(e)?.materialMap)return e;let t={materialMap:new Map};return{...e,[s]:t}}const u=Symbol("meshTextureContext");function c(e){return e&&"object"==typeof e&&u in e?e[u]:void 0}function f(e){if(c(e)?.textureMap)return e;let t={textureMap:new Map};return{...e,[u]:t}}},27615(e,t,r){r.d(t,{CK:()=>a,Hq:()=>l,MW:()=>u,TE:()=>c,yJ:()=>f});var n=r(35522),i=r(86738),o=r(95696),s=r(18251);function l(e){return null!=e.origin}function a(e){return l(e.vertexSpace)}function u(e,t){if(!l(e))return null;let[r,n,o]=e.origin;return new i.A({x:r,y:n,z:o,spatialReference:t})}function c(e,t){let{x:r,y:n,z:i,spatialReference:l}=e,a=[r,n,i??0];return"local"===(t?.vertexSpace??function(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}(l))?new s.A({origin:a}):new o.A({origin:a})}function f(e,t){return e.type===t.type&&(e.origin===t.origin||null!=e.origin&&null!=t.origin&&(0,n.t2)(e.origin,t.origin))}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6884],{38961(e,t,r){var i=r(32198),s=r(7762),o=r(36708),a=r(10107),l=r(64108),n=r(80559);let u=class extends s.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,n.fm)(()=>this._refresh(),o.OH))}destroy(){this.getCollections=null}_refresh(){let e=this.getCollections?.();if(null==e)return void this.removeAll();let t=0;for(let r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t)}_createNewInstance(e){return new s.A(e)}_processCollection(e,t){if(!t)return e;let r=this.itemFilterFunction??(e=>!!e);for(let i of t)if(i){if(r(i)){let t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){let t=this.getChildrenFunction(i);if(Array.isArray(t))for(let r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i.Cg)([(0,a.MZ)()],u.prototype,"getCollections",void 0),(0,i.Cg)([(0,a.MZ)()],u.prototype,"getChildrenFunction",void 0),(0,i.Cg)([(0,a.MZ)()],u.prototype,"itemFilterFunction",void 0),u=(0,i.Cg)([(0,l.$)("esri.core.CollectionFlattener")],u);const p=u;r.d(t,["A",0,p])},46140(e,t,r){r.d(t,{A:()=>s});var i=r(49186);class s{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){let t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new s(this.major,this.minor,this._context)}static parse(e,t=""){let[r,o]=e.split("."),a=/^\s*\d+\s*$/;if(!r?.match||!a.test(r)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e})}if(!o?.match||!a.test(o)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e})}return new s(parseInt(r,10),parseInt(o,10),t)}}},6797(e,t,r){r.d(t,{Ui:()=>y});var i=r(69622),s=r(7762),o=r(88620);const a=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof i.A}function n(e){return e instanceof s.A?Object.keys(e.items):l(e)?(0,o.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof s.A?e.items[t]:e[t]}function p(e){return e?e.declaredClass:null}function d(e,t){let r=e.diff;if(r&&"function"==typeof r)return r(e,t);let i=n(e),s=n(t);if(0===i.length&&0===s.length)return;if(!i.length||!s.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};let o=s.filter(e=>!i.includes(e)),y=i.filter(e=>!s.includes(e)),c=i.filter(r=>s.includes(r)&&u(e,r)!==u(t,r)).concat(o,y).sort(),h=p(e);if(h&&a.has(h)&&c.length)return{type:"complete",oldValue:e,newValue:t};let f,g=l(e)&&l(t);for(let i of c){let s,o=u(e,i),a=u(t,i);if((g||"function"!=typeof o&&"function"!=typeof a)&&o!==a&&(null!=o||null!=a)){if(r&&r[i]&&"function"==typeof r[i])s=r[i]?.(o,a);else if(o instanceof Date&&a instanceof Date){if(o.getTime()===a.getTime())continue;s={type:"complete",oldValue:o,newValue:a}}else s="object"==typeof o&&"object"==typeof a&&p(o)===p(a)?d(o,a):{type:"complete",oldValue:o,newValue:a};null!=s&&(null==f?f={type:"partial",diff:{[i]:s}}:f.diff[i]=s)}}return f}function y(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&p(e)!==p(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},81583(e,t,r){r.d(t,{L:()=>l,g:()=>a});var i=r(60999),s=r(7762),o=r(92474);async function a(e,t){return await e.load(),l(e,t)}async function l(e,t){let r=[],a=(...e)=>{for(let t of e)null!=t&&(Array.isArray(t)?a(...t):s.A.isCollection(t)?t.forEach(e=>a(e)):(0,o.Zm)(t)&&r.push(t))};t(a);let l=null;if(await(0,i.Tj)(r,async e=>{let t=await(0,i.Ke)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1===t.ok&&!l&&(l=t)}),l)throw l.error;return e}},64314(e,t,r){r.d(t,{A:()=>C});var i=r(32198),s=r(69622),o=r(49186),a=r(44208),l=r(17676),n=r(84952),u=r(91429),p=r(21325),d=r(20557),y=r(2272),c=r(99614),h=r(20615),f=r(74910),g=r(78286),m=r(99199),b=r(62815),v=r(63746);class w{constructor(e){this._options=e,this.featureSet={features:[]},this.parseOnly=null,this._transformInPlace=null,this._transformInPlaceXY=null,this._finishVertex=w._finishVertexNonPoint,this._attributesClass=null,this._previousX=0,this._previousY=0,this._point=null,this._lengths=null,this._vertex=[],this._part=null,this._parts=null,this._i=0}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(e){"string"==typeof e&&(this.featureSet.objectIdFieldName=e)}finish(){this._options.applyTransform&&(this.featureSet.transform=null);let{spatialReference:e,features:t}=this.featureSet;if(e)for(let{geometry:r}of t)r&&(r.spatialReference=e)}feature(){this._attributesClass??=(0,v._)(this.featureSet.fields?.map(e=>e.name)??[]),this.featureSet.features.push({attributes:new this._attributesClass}),this._options.applyTransform&&this._setVertexTransformer()}centroid([e,t]){this.featureSet.features.at(-1).centroid={x:e,y:t}}geometry(e,t,r){this._previousX=this._previousY=0,this._lengths=r;let i,{hasZ:s,hasM:o}=this.featureSet;switch(s??=!1,o??=!1,this._i=0,this._vertex=[0,0],s&&this._vertex.push(0),o&&this._vertex.push(0),this._finishVertex=w._finishVertexNonPoint,t){case"esriGeometryPoint":this._point={x:0,y:0},i=this._point,this._finishVertex=s?o?w._finishVertexPointXYZM:w._finishVertexPointXYZ:o?w._finishVertexPointXYM:w._finishVertexPointXY;break;case"esriGeometryMultipoint":i={points:[],hasZ:s,hasM:o},this._part=i.points,this._parts=[];break;case"esriGeometryPolyline":i={paths:[],hasZ:s,hasM:o},this._parts=i.paths,this._part=[];break;case"esriGeometryPolygon":i={rings:[],hasZ:s,hasM:o},this._parts=i.rings,this._part=[]}1===e?(this.featureSet.queryGeometry=i,this.featureSet.queryGeometryType=t,this._options.applyTransform||this._setVertexTransformer()):this.featureSet.features.at(-1).geometry=i}coord(e){let t=this._vertex;t[this._i++]=e,this._i<t.length||(this._i=0,this._transformInPlace&&(t[0]+=this._previousX,t[1]+=this._previousY,[this._previousX,this._previousY]=t,this._transformInPlace(t)),this._finishVertex(this))}curvedGeometry(e,t,r,i){let s,{hasZ:o,hasM:a}=this.featureSet;switch(o??=!1,a??=!1,e){case"esriGeometryPoint":case"esriGeometryMultipoint":throw Error(`Curved ${e} does not make sense`);case"esriGeometryPolyline":s={paths:[],curvePaths:[],hasZ:o,hasM:a},this._parts=s.curvePaths,this._part=[];break;case"esriGeometryPolygon":s={rings:[],curveRings:[],hasZ:o,hasM:a},this._parts=s.curveRings,this._part=[]}this.featureSet.features.at(-1).geometry=s}startCurvedPart(e){this._part.push(this._transform(e))}finishCurvedPart(e){this._parts.push(this._part),this._part=[]}lineSegment(e,t){this._part.push(this._transform(t))}bezierSegment(e,t,r,i){this._part.push({b:[this._transform(t),this._transformXY(r),this._transformXY(i)]})}circularArcSegment(e,t,r){this._part.push({c:[this._transform(t),this._transformXY(r)]})}ellipticArcSegment(e,t,r,i,s,o,a,l){this._part.push({a:[this._transform(t),this._transformXY(r),i,s,o,a,l]})}static _finishVertexPointXY({_point:e,_vertex:t}){[e.x,e.y]=t}static _finishVertexPointXYZ({_point:e,_vertex:t}){[e.x,e.y,e.z]=t}static _finishVertexPointXYM({_point:e,_vertex:t}){[e.x,e.y,e.m]=t}static _finishVertexPointXYZM({_point:e,_vertex:t}){[e.x,e.y,e.z,e.m]=t}static _finishVertexNonPoint(e){let{_part:t,_parts:r,_lengths:i,_vertex:s}=e;t.push([...s]),t.length<i[r.length]||(e._previousX=e._previousY=0,e._part=[],r.push(t))}_setVertexTransformer(){let{sourceSpatialReference:e}=this._options,{spatialReference:t,hasZ:r,transform:i}=this.featureSet,s=r?(0,b.d)(e,t):1;this._transformInPlace??=(0,v.M)(this.featureSet,s),this._transformInPlaceXY??=(0,v.M)({transform:i})}_transform(e){let t=[...e];return this._transformInPlace?.(t),t}_transformXY(e){let t=[e[0],e[1]];return this._transformInPlaceXY?.(t),t}}var S=r(80893),I=r(22671),x=r(97552);let C=class extends s.A{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.pbfSupportedWithCurves=!1,this.queryAttachmentsSupported=!1,this.relativeTimeBinWindow=0,this.sourceSpatialReference=null,this.timeInformation=null,this.uniqueIdFields=null,this.url=null}get parsedUrl(){return(0,n.An)(this.url)}async execute(e,t){let r=await this.executeJSON(e,t);return this.featureSetFromJSON(e,r,t)}async executeJSON(e,t){let r,i=this._normalizeQuery(e),s=null!=e.outStatistics?.[0],o=(0,a.A)("featurelayer-pbf-statistics");if(this.pbfSupported&&(!s||o)&&(!e.returnTrueCurves||this.pbfSupportedWithCurves))try{r=await async function(e,t,r,i){let s=(0,y.Dl)(e),o={...r},a=x.A.from(t),l=!a.quantizationParameters;return await(0,S.IJ)(s,a,new w({sourceSpatialReference:a.sourceSpatialReference,applyTransform:l}),o,i)}(this.url,i,t,{timeInformation:this.timeInformation,uniqueIdFields:this.uniqueIdFields})}catch(e){if("query:parsing-pbf"!==e.name)throw e;this.pbfSupported=!1}return r??=await(0,m.e)(this.url,i,t,{timeInformation:this.timeInformation,uniqueIdFields:this.uniqueIdFields}),this._normalizeFields(r.fields),r}async featureSetFromJSON(e,t,i){if(!this._queryGet3DObjectFormat(e)||null==this.infoFor3D||!t.features)return I.A.fromJSON(t);let{meshFeatureSetFromJSON:s}=await(0,l.qr)(Promise.all([r.e(2258),r.e(8331),r.e(9855)]).then(()=>r(40050)),i);return s(e,this.infoFor3D,t)}executeForCount(e,t){return(0,h.I)(this.url,this._normalizeQuery(e),t,{timeInformation:this.timeInformation,uniqueIdFields:this.uniqueIdFields})}executeForExtent(e,t){return(0,f.L)(this.url,this._normalizeQuery(e),t)}executeForIds(e,t){return(0,g.V)(this.url,this._normalizeQuery(e),t,{timeInformation:this.timeInformation,uniqueIdFields:this.uniqueIdFields})}async executeRelationshipQuery(e,t){let[{default:i},{executeRelationshipQuery:s}]=await(0,l.qr)(Promise.all([Promise.resolve().then(()=>r(26591)),r.e(1763).then(()=>r(71763))]),t),o=i.from(e);return(this.gdbVersion||this.dynamicDataSource)&&(o=o.clone(),o.gdbVersion=o.gdbVersion||this.gdbVersion,o.dynamicDataSource=o.dynamicDataSource||this.dynamicDataSource),s(this.url,o,t)}async executeRelationshipQueryForCount(e,t){let[{default:i},{executeRelationshipQueryForCount:s}]=await(0,l.qr)(Promise.all([Promise.resolve().then(()=>r(26591)),r.e(1763).then(()=>r(71763))]),t),o=i.from(e);return(this.gdbVersion||this.dynamicDataSource)&&(o=o.clone(),o.gdbVersion=o.gdbVersion||this.gdbVersion,o.dynamicDataSource=o.dynamicDataSource||this.dynamicDataSource),s(this.url,o,t)}async executeAttachmentQuery(e,t){let{executeAttachmentQuery:i,fetchAttachments:s,processAttachmentQueryResult:o}=await(0,l.qr)(r.e(9239).then(()=>r(9239)),t),a=(0,y.Dl)(this.url);return o(a,await(this.queryAttachmentsSupported?i(a,e,t):s(a,e,t)))}async executeAttributeBinsQuery(e,t){let{executeAttributeBinsQuery:i}=await(0,l.qr)(r.e(3103).then(()=>r(33103)),t);return i(this.parsedUrl,e,t)}async executePivotQuery(e,t){let{executePivotQuery:i}=await(0,l.qr)(r.e(566).then(()=>r(80566)),t);return i(this.parsedUrl,e,t)}async executeTopFeaturesQuery(e,t){let{executeTopFeaturesQuery:i}=await(0,l.qr)(r.e(1273).then(()=>r(11273)),t);return i(this.parsedUrl,e,this.sourceSpatialReference,t)}async executeForTopIds(e,t){let{executeForTopIds:i}=await(0,l.qr)(r.e(1277).then(()=>r(21277)),t);return i(this.parsedUrl,e,t)}async executeForTopExtents(e,t){let{executeForTopExtents:i}=await(0,l.qr)(r.e(8018).then(()=>r(8018)),t);return i(this.parsedUrl,e,t)}async executeForTopCount(e,t){let{executeForTopCount:i}=await(0,l.qr)(r.e(980).then(()=>r(10980)),t);return i(this.parsedUrl,e,t)}_normalizeQuery(e){let t=x.A.from(e);t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource);let{infoFor3D:r}=this,i=this._queryGet3DObjectFormat(e);if(null!=r&&i){if(t=t===e?t.clone():t,t.formatOf3DObjects=i,t.outSpatialReference&&!(0,p.aI)(t.outSpatialReference,this.sourceSpatialReference))throw new o.A("query:unsupported-out-spatial-reference","3D object feature services do not support projection of geometries");if(null==t.outFields||!t.outFields.includes("*")){t=t===e?t.clone():t,t.outFields??(t.outFields=[]);let{originX:i,originY:s,originZ:o,translationX:a,translationY:l,translationZ:n,scaleX:u,scaleY:p,scaleZ:d,rotationX:y,rotationY:c,rotationZ:h,rotationDeg:f}=r.transformFieldRoles;t.outFields.push(i,s,o,a,l,n,u,p,d,y,c,h,f)}}return t}_normalizeFields(e){if(null!=this.fieldsIndex&&null!=e)for(let t of e){let e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryGet3DObjectFormat({returnGeometry:e,multipatchOption:t,outStatistics:r}){return!0!==e||"xyFootprint"===t||r?null:(0,d.Hz)(this.infoFor3D)}};(0,i.Cg)([(0,u.MZ)({types:c.e})],C.prototype,"dynamicDataSource",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"gdbVersion",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"infoFor3D",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],C.prototype,"parsedUrl",null),(0,i.Cg)([(0,u.MZ)()],C.prototype,"pbfSupported",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"pbfSupportedWithCurves",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"queryAttachmentsSupported",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"relativeTimeBinWindow",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"sourceSpatialReference",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"timeInformation",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"uniqueIdFields",void 0),(0,i.Cg)([(0,u.MZ)({type:String})],C.prototype,"url",void 0),C=(0,i.Cg)([(0,u.$K)("esri.layers.graphics.sources.support.QueryTask")],C)},52136(e,t,r){var i=r(32198),s=r(91429);r.d(t,["p",0,e=>{let t=e,r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null==e?(this._clearOverride("apiKey"),this.clear("apiKey","user")):this._override("apiKey",e)}};return(0,i.Cg)([(0,s.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.APIKeyMixin")],r),r}])},98534(e,t,r){var i=r(32198),s=r(56507),o=r(5479),a=r(91869),l=r(17676),n=r(84952),u=r(46140),p=r(91429),d=r(5443),y=r(16930),c=r(60694),h=r(10873),f=r(10407),g=r(36005);r.d(t,["V",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.capabilities=void 0,this.copyright=null,this.fullExtent=null,this.legendEnabled=!0,this.spatialReference=null,this.version=void 0,this._allLayersAndTablesMap=null}readCapabilities(e,t){let r=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());if(!r)return{operations:{supportsExportMap:!1,supportsExportTiles:!1,supportsIdentify:!1,supportsQuery:!1,supportsTileMap:!1},exportMap:null,exportTiles:null};let i=this.type,s="tile"!==i&&!!t.supportsDynamicLayers,o=r.includes("query"),a=r.includes("map"),l=!!t.exportTilesAllowed,n=r.includes("tilemap"),p=r.includes("data"),d="tile"!==i&&(!t.tileInfo||s),y="tile"!==i&&(!t.tileInfo||s),c="tile"!==i,h="tile"!==i&&s&&t.currentVersion>=11.1,f=t.cimVersion?u.A.parse(t.cimVersion):null,g=f?.greaterEqual(1,4)??!1,m=f?.greaterEqual(2,0)??!1;return{operations:{supportsExportMap:a,supportsExportTiles:l,supportsIdentify:o,supportsQuery:p,supportsTileMap:n},exportMap:a?{supportsArcadeExpressionForLabeling:g,supportsCIMSymbols:m,supportsDynamicLayers:s,supportsSublayerOrderBy:h,supportsSublayerDefinitionExpression:y,supportsSublayerVisibility:d,supportsSublayersChanges:c}:null,exportTiles:l?{maxExportTilesCount:+t.maxExportTilesCount}:null}}readVersion(e,t){let r=t.currentVersion;return r||=t.hasOwnProperty("capabilities")||t.hasOwnProperty("tables")?10:t.hasOwnProperty("supportedImageFormatTypes")?9.31:9.3,r}async fetchRelatedService(e){let t=this.portalItem;if(!t||!(0,f.bK)(t))return null;this._relatedFeatureServicePromise||=t.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},e).then(e=>e.find(e=>"Feature Service"===e.type)??null,()=>null);let r=await this._relatedFeatureServicePromise;return(0,l.Te)(e),r?{itemId:r.id,url:r.url}:null}async fetchSublayerInfo(e,t){let{source:r}=e;if(this?.portalItem&&"tile"===this.type&&"map-layer"===r?.type&&(0,f.bK)(this.portalItem)&&e.originIdOf("url")<2){let i=await this.fetchRelatedService(t);i&&(e.url=(0,n.fj)(i.url,r.mapLayerId.toString()),e.layerItemId=i.itemId)}let i,{url:o}=e;if("data-layer"===r.type||"workspace-layer"===r.type)i=(await(0,s.A)(o,{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey},...t})).data;else{let s=e.id;"map-layer"===r?.type&&(s=r.mapLayerId);try{i=(await this.fetchAllLayersAndTables(t)).get(s)}catch{}if(o&&e.originIdOf("url")>2)try{let e=await this._fetchAllLayersAndTablesFromService(o),t=(0,c.qg)(o)?.sublayer??r.mapLayerId,s=structuredClone(e.get(t));if(null!=s){for(let e of["drawingInfo","maxScale","minScale","name"])delete s[e];i={...i,...s}}}catch{}}return i}async fetchAllLayersAndTables(e){return this._fetchAllLayersAndTablesFromService(this.parsedUrl?.path,e)}async _fetchAllLayersAndTablesFromService(e,t){await this.load(t),this._allLayersAndTablesMap||=new Map;let r=(0,c.qg)(e),i=await(0,a.tE)(this._allLayersAndTablesMap,r?.url.path,()=>(0,s.A)((0,n.fj)(r?.url.path,"/layers"),{query:{f:"json",...this.customParameters,token:this.apiKey}}).then(async e=>{let t=new Map,{layers:i,tables:a}=e.data,l=[...i??[],...a??[]];for(let e of l)t.set(e.id,e);if((0,o.zN)(t.values(),e=>null==e.capabilities||null==e.extent)){let{data:e}=await(0,s.A)(r?.url.path,{query:{f:"json",...this.customParameters,token:this.apiKey}}).catch(()=>({data:{capabilities:"",fullExtent:void 0}}));for(let r of t.values())r.capabilities??=e.capabilities??"",r.extent??=e.fullExtent}return{result:t}},e=>({error:e})));if((0,l.Te)(t),"result"in i)return i.result;throw i.error}};return(0,i.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"capabilities",void 0),(0,i.Cg)([(0,g.w)("service","capabilities",["capabilities","cimVersion","currentVersion","exportTilesAllowed","maxExportTilesCount","supportsDynamicLayers","tileInfo"])],r.prototype,"readCapabilities",null),(0,i.Cg)([(0,p.MZ)({json:{read:{source:"copyrightText"}}})],r.prototype,"copyright",void 0),(0,i.Cg)([(0,p.MZ)({type:d.A})],r.prototype,"fullExtent",void 0),(0,i.Cg)([(0,p.MZ)(h.id)],r.prototype,"id",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend"}}})],r.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,p.MZ)(h.M6)],r.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:y.A})],r.prototype,"spatialReference",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"version",void 0),(0,i.Cg)([(0,g.w)("service","version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],r.prototype,"readVersion",null),r=(0,i.Cg)([(0,p.$K)("esri.layers.mixins.ArcGISMapService")],r),r}])},32756(e,t,r){r.d(t,{Rr:()=>l});var i=r(32198),s=r(93637),o=r(91429),a=r(91880);function l(e,t,r){if(!e)return null;let i=e.find(e=>!!e.field);if(!i)return null;let s=new a.A;return s.read(i,r),[s]}const n={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,i){let o=e.find(e=>!!e.field);o&&(0,s.sM)(r,[o.toJSON()],t)}}}};r.d(t,["fY",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,o.MZ)(n)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.OrderedLayer")],r),r},"ne",0,n])},91921(e,t,r){var i=r(32198),s=r(7762),o=r(38961),a=r(49186),l=r(53966),n=r(36708),u=r(91429),p=r(35666),d=r(88620),y=r(15775),c=r(63389);const h=s.A.ofType(y.A);function f(e,t){e&&e.forEach(e=>{t(e),e.sublayers&&e.sublayers.length&&f(e.sublayers,t)})}r.d(t,["I",0,e=>{let t=e,r=class extends t{constructor(...e){super(...e),this.allSublayers=new o.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.sublayersSourceJSON={2:{},3:{},4:{},5:{},6:{}},this.subtables=null,this.addHandles([(0,n.wB)(()=>this.sublayers,(e,t)=>this._handleSublayersChange(e,t),n.OH),(0,n.wB)(()=>this.subtables,(e,t)=>this._handleSublayersChange(e,t),n.OH)])}destroy(){this.allSublayers.destroy()}readSublayers(e,t){if(!t||!e)return;let{sublayersSourceJSON:r}=this,i=(0,p.aB)(t.origin);if(i<2||(r[i]={context:t,visibleLayers:e.visibleLayers||r[i].visibleLayers,layers:e.layers||r[i].layers},i>2))return;this._set("serviceSublayers",this.createSublayersForOrigin("service").sublayers);let{sublayers:s,origin:o}=this.createSublayersForOrigin("web-document"),a=(0,d.oY)(this);a.setDefaultOrigin(o),this._set("sublayers",new h(s)),a.setDefaultOrigin("user")}findSublayerById(e){return this.allSublayers.find(t=>t.id===e)}createServiceSublayers(){return this.createSublayersForOrigin("service").sublayers}createSublayersForOrigin(e){let t,r=(0,p.aB)("web-document"===e?"web-map":e),i=2,s=this.sublayersSourceJSON[2].layers,o=this.sublayersSourceJSON[2].context,a=null,l=[3,4,5].filter(e=>e<=r);for(let e of l){let t=this.sublayersSourceJSON[e];(0,c._X)(t.layers)&&(i=e,s=t.layers,o=t.context,t.visibleLayers&&(a={visibleLayers:t.visibleLayers,context:t.context}))}let n=[3,4,5].filter(e=>e>i&&e<=r),u=null;for(let e of n){let{layers:r,visibleLayers:i,context:s}=this.sublayersSourceJSON[e];r&&(u={layers:r,context:s},t??=e),i&&(a={visibleLayers:i,context:s})}let d=function(e,t){let r=[],i={};return e&&e.forEach(e=>{let s=new y.A;if(s.read(e,t),i[s.id]=s,null!=e.parentLayerId&&-1!==e.parentLayerId){let t=i[e.parentLayerId];t.sublayers||=[],t.sublayers.unshift(s)}else r.unshift(s)}),r}(s,o),g=new Map,m=new Set;if(u)for(let e of u.layers)g.set(e.id,e);if(a?.visibleLayers)for(let e of a.visibleLayers)m.add(e);return f(d,e=>{u&&e.read(g.get(e.id),u.context),a&&e.read({defaultVisibility:m.has(e.id)},a.context)}),{origin:(0,p.OL)(i),originWithPartialOverrides:t?(0,p.OL)(t):null,sublayers:new h({items:d})}}read(e,t){super.read(e,t),this.readSublayers(e,t)}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null,e.layer=null}),this.removeHandles("sublayers-owner")),e&&(e.forEach(e=>{e.parent=this,e.layer=this}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this,e.layer=this}),e.on("after-remove",({item:e})=>{e.parent=null,e.layer=null})],"sublayers-owner"),"tile"===this.type&&this.addHandles(e.on("before-changes",e=>{l.A.getLogger("esri.layers.TileLayer").error(new a.A("tilelayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{layer:this})),e.preventDefault()}),"sublayers-owner"))}};return(0,i.Cg)([(0,u.MZ)({readOnly:!0})],r.prototype,"allSublayers",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],r.prototype,"effectiveScaleRange",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],r.prototype,"effectiveVisible",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0,type:s.A.ofType(y.A)})],r.prototype,"serviceSublayers",void 0),(0,i.Cg)([(0,u.MZ)({value:null,type:h,json:{read:!1,write:{allowNull:!0,ignoreOrigin:!0}}})],r.prototype,"sublayers",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],r.prototype,"sublayersSourceJSON",void 0),(0,i.Cg)([(0,u.MZ)({type:h,json:{read:{source:"tables"}}})],r.prototype,"subtables",void 0),r=(0,i.Cg)([(0,u.$K)("esri.layers.mixins.SublayersOwner")],r),r}])},28032(e,t,r){r.d(t,{A:()=>n});var i=r(32198),s=r(69540),o=r(25482),a=r(91429),l=r(56400);let n=class extends((0,s.OU)(o.o)){constructor(e){super(e),this.creatorField=null,this.creationDateField=null,this.editorField=null,this.editDateField=null,this.realm=null,this.timeZone=null}};(0,i.Cg)([(0,a.MZ)()],n.prototype,"creatorField",void 0),(0,i.Cg)([(0,a.MZ)()],n.prototype,"creationDateField",void 0),(0,i.Cg)([(0,a.MZ)()],n.prototype,"editorField",void 0),(0,i.Cg)([(0,a.MZ)()],n.prototype,"editDateField",void 0),(0,i.Cg)([(0,a.MZ)()],n.prototype,"realm",void 0),(0,i.Cg)([(0,a.MZ)((0,l.P6)("dateFieldsTimeReference",!0))],n.prototype,"timeZone",void 0),n=(0,i.Cg)([(0,a.$K)("esri.layers.support.EditFieldsInfo")],n)},29005(e,t,r){r.d(t,{A:()=>u});var i=r(32198),s=r(69540),o=r(66552),a=r(25482),l=r(91429);const n=new o.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,s.OU)(a.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"description",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:n.read,write:n.write}})],u.prototype,"drawingTool",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,i.Cg)([(0,l.$K)("esri.layers.support.FeatureTemplate")],u)},33143(e,t,r){r.d(t,{A:()=>d});var i=r(32198),s=r(69540),o=r(25482),a=r(91429),l=r(8631),n=r(29005),u=r(36005),p=r(43937);let d=class extends((0,s.OU)(o.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){let t={};for(let r of Object.keys(e))t[r]=(0,l.r)(e[r]);return t}writeDomains(e,t){let r={};for(let t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,i.Cg)([(0,u.w)("domains")],d.prototype,"readDomains",null),(0,i.Cg)([(0,p.K)("domains")],d.prototype,"writeDomains",null),(0,i.Cg)([(0,a.MZ)({type:[n.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,i.Cg)([(0,a.$K)("esri.layers.support.FeatureType")],d)},46499(e,t,r){r.d(t,{A:()=>C});var i,s,o=r(32198),a=(r(44208),r(66552)),l=r(25482),n=r(4718),u=r(90629),p=r(91429),d=r(90360),y=r(73913),c=r(32730),h=r(77548),f=r(59868),g=r(73838),m=r(33910),b=r(36005),v=r(43937);const w=new a.J({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function S(e,t,r){return{enabled:!(0,h.TU)(r?.layer)}}function I(e){return!e||"service"!==e.origin&&"map-image"!==e.layer?.type}function x(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let C=class extends l.o{static{i=c.vK}static{s=this}static evaluateWhere(e,t){let r=(e,t,r)=>{switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;let i=e.split(" ");if(3===i.length)return r(t[i[0]],i[1],i[2]);if(7===i.length){let e=r(t[i[0]],i[1],i[2]),s=i[3],o=r(t[i[4]],i[5],i[6]);switch(s){case"AND":return e&&o;case"OR":return e||o}}return!1}catch{}}constructor(e){super(e),this[i]=!0,this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.offsetDistance=0,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.symbol=f.Hk,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){let r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,c.D3)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){let t=(0,c.tH)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,i){if(null==e&&null!=this.labelExpression&&I(i))e=new y.A({expression:this.getLabelExpressionArcade()});else if(!e)return;let s=e.toJSON(i);s.expression&&(t[r]=s)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}get repeatLabelDistance(){return this._get("repeatLabelDistance")}set repeatLabelDistance(e){this._set("repeatLabelDistance",e)}getLabelExpression(){return(0,c.XJ)(this)}getLabelExpressionArcade(){return(0,c.BI)(this)}getLabelExpressionSingleField(){return(0,c.rU)(this)}hash(){return JSON.stringify(this)}clone(){return new s({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,n.o8)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,offsetDistance:this.offsetDistance,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,n.o8)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,o.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],C.prototype,"name",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:S}}}}})],C.prototype,"allowOverrun",void 0),(0,o.Cg)([(0,p.MZ)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:S}}}}})],C.prototype,"deconflictionStrategy",void 0),(0,o.Cg)([(0,p.MZ)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===r?.origin&&x(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],C.prototype,"labelExpression",void 0),(0,o.Cg)([(0,b.w)("labelExpression")],C.prototype,"readLabelExpression",null),(0,o.Cg)([(0,v.K)("labelExpression")],C.prototype,"writeLabelExpression",null),(0,o.Cg)([(0,p.MZ)({type:y.A,json:{write:{overridePolicy:(e,t,r)=>function(e){return I(e)||x(e?.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],C.prototype,"labelExpressionInfo",void 0),(0,o.Cg)([(0,v.K)("labelExpressionInfo")],C.prototype,"writeLabelExpressionInfo",null),(0,o.Cg)([(0,p.MZ)({type:w.apiValues,json:{type:w.jsonValues,read:w.read,write:w.write}})],C.prototype,"labelPlacement",void 0),(0,o.Cg)([(0,p.MZ)({type:Number,json:{read:!0,write:!0,default:0,origins:{"web-scene":{write:!1}}}})],C.prototype,"offsetDistance",void 0),(0,o.Cg)([(0,p.MZ)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],C.prototype,"labelPosition",void 0),(0,o.Cg)([(0,p.MZ)({type:Number})],C.prototype,"maxScale",void 0),(0,o.Cg)([(0,v.K)("maxScale")],C.prototype,"writeMaxScale",null),(0,o.Cg)([(0,p.MZ)({type:Number})],C.prototype,"minScale",void 0),(0,o.Cg)([(0,v.K)("minScale")],C.prototype,"writeMinScale",null),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:S}}}}})],C.prototype,"repeatLabel",void 0),(0,o.Cg)([(0,p.MZ)({type:Number,cast:u.cr,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:S}}}}})],C.prototype,"repeatLabelDistance",null),(0,o.Cg)([(0,p.MZ)({types:m.em,json:{types:m.em,origins:{"portal-item":{types:m.em,read:{reader:(0,d.C)({types:m.em})},default:null},"web-scene":{types:m.Rv,read:{reader:(0,d.C)({types:m.Rv})},write:g.oO,default:null}},write:g.oO,default:null}})],C.prototype,"symbol",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0}})],C.prototype,"useCodedValues",void 0),(0,o.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],C.prototype,"where",void 0),C=s=(0,o.Cg)([(0,p.$K)("esri.layers.support.LabelClass")],C)},73913(e,t,r){r.d(t,{A:()=>p});var i,s=r(32198),o=r(25482),a=r(91429),l=r(32730),n=r(36005),u=r(43937);let p=class extends o.o{static{i=this}constructor(e){super(e),this.name=null,this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,l.mX)(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=(0,l.mX)(this.value)),null!=e&&(t[r]=e)}clone(){return new i({name:this.name,expression:this.expression,title:this.title,value:this.value})}};(0,s.Cg)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],p.prototype,"name",void 0),(0,s.Cg)([(0,a.MZ)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],p.prototype,"expression",void 0),(0,s.Cg)([(0,n.w)("expression",["expression","value"])],p.prototype,"readExpression",null),(0,s.Cg)([(0,u.K)("expression")],p.prototype,"writeExpression",null),(0,s.Cg)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],p.prototype,"title",void 0),(0,s.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],p.prototype,"value",void 0),p=i=(0,s.Cg)([(0,a.$K)("esri.layers.support.LabelExpressionInfo")],p)},37352(e,t,r){r.d(t,{A:()=>n});var i,s=r(32198),o=r(7762),a=r(25482),l=r(91429);let n=i=class extends a.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new o.A}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,s.Cg)([(0,l.MZ)({type:String,json:{write:{isRequired:!0}}})],n.prototype,"floorField",void 0),(0,s.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],n.prototype,"viewAllMode",void 0),(0,s.Cg)([(0,l.MZ)({json:{read:!1,write:!1}})],n.prototype,"viewAllLevelIds",void 0),n=i=(0,s.Cg)([(0,l.$K)("esri.layers.support.LayerFloorInfo")],n)},91880(e,t,r){r.d(t,{A:()=>u});var i,s=r(32198),o=r(66552),a=r(25482),l=r(91429);const n=new o.J({asc:"ascending",desc:"descending"});let u=class extends a.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,s.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,s.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,s.Cg)([(0,l.MZ)({type:n.apiValues,json:{type:n.jsonValues,read:n.read,write:n.write}})],u.prototype,"order",void 0),u=i=(0,s.Cg)([(0,l.$K)("esri.layers.support.OrderByInfo")],u)},45067(e,t,r){r.d(t,{A:()=>p});var i=r(32198),s=r(69540),o=r(66552),a=r(25482),l=r(91429);const n=new o.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),u=new o.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let p=class extends((0,s.OU)(a.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,i.Cg)([(0,l.MZ)({json:{read:n.read,write:n.write}})],p.prototype,"cardinality",void 0),(0,i.Cg)([(0,l.MZ)({json:{name:"catalogID"}})],p.prototype,"catalogId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],p.prototype,"composite",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],p.prototype,"id",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],p.prototype,"keyField",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],p.prototype,"keyFieldInRelationshipTable",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],p.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],p.prototype,"relatedTableId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:!0,write:!0}})],p.prototype,"relationshipTableId",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:u.read,write:u.write}})],p.prototype,"role",void 0),p=(0,i.Cg)([(0,l.$K)("esri.layers.support.Relationship")],p)},15775(e,t,r){r.d(t,{A:()=>ge});var i=r(32198),s=r(40124),o=r(56507),a=r(7762),l=r(49186),n=r(44208),u=r(4902),p=r(4718),d=r(92474),y=r(53966),c=r(25728),h=r(39516),f=r(84952),g=r(91429),m=r(78888),b=r(35666),v=r(88620),w=r(5443),S=r(16930),I=r(83960),x=r(50498),C=r(41910),A=r(60950),M=r(89808),_=r(99959);const F=Symbol("isMapImageGraphicOriginSymbol");var P;class O extends _.A{get[(P=F,A.ym)](){return this.sublayer}get[M.Q](){return this.layer}get[C.e7](){return this.sublayer}constructor(e,t){super(),this[P]=!0,this.type="map-image",this.layer=e,this.sublayer=t}get id(){return`${this.layer.id}:__${this.sublayer.id}__`}}const L=Symbol("isTileGraphicOriginSymbol");var T;class Z extends _.A{get[(T=L,A.ym)](){return this.sublayer}get[M.Q](){return this.layer}get[C.e7](){return this.sublayer}constructor(e,t){super(),this[T]=!0,this.type="tile",this.layer=e,this.sublayer=t}get id(){return`${this.layer.id}:__${this.sublayer.id}__`}}var D,j=r(64314),E=r(32756),q=r(28032),V=r(15426),R=r(33143),N=r(20437),B=r(95466),k=r(30524),z=r(46499),$=r(39383),K=r(37352),J=r(91880),Q=r(45067),U=r(6666),G=r(41214),X=r(2272),Y=r(65615),W=r(93849),H=r(29308),ee=r(54546),te=r(97552),re=r(30291),ie=r(33910),se=r(43440),oe=r(36005),ae=r(43937);function le(e){return"esriSMS"===e?.type}function ne(e,t,r){let i=r.minimumWritableOrigin||r.origin;return!!i&&e.originIdOf(t)>=(0,b.aB)(i)}function ue(e,t,r){let i=ne(this,t,r);return{ignoreOrigin:!0,allowNull:i,enabled:!!r&&"map-image"===r.layer?.type&&(r.writeSublayerStructure||i)}}function pe(e,t,r){return{enabled:!!r&&"tile"===r.layer?.type&&(ne(this,t,r)||this._isOverridden(t))}}function de(e,t,r){return{ignoreOrigin:!0,enabled:r&&r.writeSublayerStructure||!1}}function ye(e,t,r){return{ignoreOrigin:!0,enabled:!!r?.writeSublayerStructure&&this.originIdOf(t)>2}}function ce(e,t,r){return{ignoreOrigin:!0,enabled:!!r&&(r.writeSublayerStructure||ne(this,t,r))}}let he=0;const fe=new Set(["layer","parent","loaded","loadStatus","loadError","loadWarnings"]);let ge=class extends((0,c.M)((0,u.s)(d.x_))){static{D=this}constructor(e){super(e),this.attributeTableTemplate=null,this.capabilities=void 0,this.editFieldsInfo=null,this.maxScaleRange={minScale:0,maxScale:0},this.fields=null,this.fullExtent=null,this.geometryType=null,this.globalIdField=null,this.isTable=!1,this.legendEnabled=!0,this.objectIdField=null,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.relationships=null,this.sourceJSON=null,this.spatialReference=null,this.title=null,this.typeIdField=null,this.type="sublayer",this.types=null,this.uniqueIdFields=null,this._lastParsedUrl=null}async load(e){return this.addResolvingPromise(this.reload(e)),this}readCapabilities(e,t){t=t.layerDefinition||t;let{attachment:r,operations:{supportsQuery:i,supportsQueryAttachments:s},query:{supportsFormatPBF:o,supportsOrderBy:a,supportsPagination:l,relativeTimeBinWindow:n},data:{supportsAttachment:u},queryRelated:p}=(0,U.S$)(t,this.url);return{attachment:{supportsOrderByFields:r?.supportsOrderByFields??!1,supportsResize:r?.supportsResize??!1,supportsTypeWildcard:r?.supportsTypeWildcard??!1},exportMap:{supportsModification:!!t.canModifyLayer},operations:{supportsQuery:i,supportsQueryAttachments:s},data:{supportsAttachment:u},query:{relativeTimeBinWindow:n,supportsFormatPBF:o,supportsOrderBy:a,supportsPagination:l},queryRelated:p}}get defaultPopupTemplate(){return this.createPopupTemplate()}set definitionExpression(e){this._setAndNotifyLayer("definitionExpression",e)}get effectiveScaleRange(){let e=this._get("effectiveScaleRange"),{maxScale:t,minScale:r,parent:i}=this,s={minScale:r,maxScale:t};return void 0!==i?.effectiveScaleRange&&(0,I.RH)(s,i.effectiveScaleRange),e&&e.minScale===s.minScale&&e.maxScale===s.maxScale?e:s}get effectiveUniqueIdFields(){return this.uniqueIdFields?[...this.uniqueIdFields]:this.objectIdField?[this.objectIdField]:[]}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}readMaxScaleRange(e,t){return{minScale:(t=t.layerDefinition||t).minScale??0,maxScale:t.maxScale??0}}get fieldsIndex(){return new B.A(this.fields||[])}set floorInfo(e){this._setAndNotifyLayer("floorInfo",e)}readGlobalIdFieldFromService(e,t){if((t=t.layerDefinition||t).globalIdField)return t.globalIdField;if(t.fields)for(let e of t.fields)if("esriFieldTypeGlobalID"===e.type)return e.name}get graphicOrigin(){if(!this.layer)return null;switch(this.layer.type){case"tile":return new Z(this.layer,this);case"map-image":return new O(this.layer,this)}}get id(){return this._get("id")??he++}set id(e){this._get("id")!==e&&(!1===this.layer?.capabilities?.exportMap?.supportsDynamicLayers?this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"):this._set("id",e))}readIsTable(e,t){return"Table"===t.type}set labelingInfo(e){this._setAndNotifyLayer("labelingInfo",e)}writeLabelingInfo(e,t,r,i){e&&e.length&&(t.layerDefinition={drawingInfo:{labelingInfo:e.map(e=>e.write({},i))}})}set labelsVisible(e){this._setAndNotifyLayer("labelsVisible",e)}set layer(e){this._set("layer",e),this.sublayers?.forEach(t=>t.layer=e)}set listMode(e){this._set("listMode",e)}get loaded(){return super.loaded}set minScale(e){this._setAndNotifyLayer("minScale",e)}readMinScale(e,t){return t.minScale||t.layerDefinition?.minScale||0}set maxScale(e){this._setAndNotifyLayer("maxScale",e)}readMaxScale(e,t){return t.maxScale||t.layerDefinition?.maxScale||0}readObjectIdFieldFromService(e,t){return(t=t.layerDefinition||t).objectIdField?t.objectIdField:t.fields?.find(e=>"esriFieldTypeOID"===e.type)?.name}set opacity(e){this._setAndNotifyLayer("opacity",e)}readOpacity(e,t){let{layerDefinition:r}=t;return 1-.01*(r?.transparency??r?.drawingInfo?.transparency??0)}writeOpacity(e,t,r,i){t.layerDefinition={drawingInfo:{transparency:100-100*e}}}set orderBy(e){this._setAndNotifyLayer("orderBy",e)}writeParent(e,t){t.parentLayerId=this.parent&&this.parent!==this.layer?(0,m.Vr)(this.parent.id):-1}get queryTask(){if(!this.layer)return null;let{capabilities:e,fieldsIndex:t,layer:r,uniqueIdFields:i,url:s}=this,{spatialReference:o}=r,a="gdbVersion"in r?r.gdbVersion:void 0,l=(0,n.A)("featurelayer-pbf")&&e?.query.supportsFormatPBF,u=e?.operations?.supportsQueryAttachments??!1,p=e?.query?.relativeTimeBinWindow??0;return new j.A({fieldsIndex:t,gdbVersion:a,pbfSupported:l,queryAttachmentsSupported:u,relativeTimeBinWindow:p,sourceSpatialReference:o,uniqueIdFields:i,url:s})}set renderer(e){if((0,k.yp)(e,this.fieldsIndex),e)for(let t of e.symbols)if((0,ie.wk)(t)){y.A.getLogger(this).warn("Sublayer renderer should use 2D symbols");break}this._setAndNotifyLayer("renderer",e)}get source(){return this._get("source")||new W.A({mapLayerId:this.id})}set source(e){this._setAndNotifyLayer("source",e)}get sublayers(){return this._get("sublayers")}set sublayers(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}castSublayers(e){return(0,m.dp)(a.A.ofType(D),e)}writeSublayers(e,t,r){this.sublayers?.length&&(t[r]=this.sublayers.map(e=>e.id).toArray().reverse())}readTitle(e,t){return t.layerDefinition?.name??t.name}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();let e=t.fields.find(e=>e.name.toLowerCase()===r);e&&(r=e.name)}return r}readUniqueIdFields(e,t){return t.layerDefinition?.uniqueIdInfo?.OIDFieldContainsHashValue?t.layerDefinition.uniqueIdInfo.fields:null}get url(){let e=this.layer?.parsedUrl??this._lastParsedUrl,t=this.source;if(!e)return null;if(this._lastParsedUrl=e,"map-layer"===t?.type)return`${e.path}/${t.mapLayerId}`;let r={layer:JSON.stringify({source:this.source})};return`${e.path}/dynamicLayer?${(0,f.x0)(r)}`}set url(e){this._overrideIfSome("url",e)}set visible(e){this._setAndNotifyLayer("visible",e)}writeVisible(e,t,r,i){t[r]=this.getAtOrigin("defaultVisibility","service")||e}clone(){let{store:e}=(0,v.oY)(this),t=new D;return(0,v.oY)(t).store=e.clone(fe),this.commitProperty("url"),t._lastParsedUrl=this._lastParsedUrl,t}createPopupTemplate(e){return(0,re.tn)(this,e)}createQuery(){return new te.A({returnGeometry:!0,where:this.definitionExpression||"1=1"})}async createFeatureLayer(){if(this.sublayers)return null;let e,t=(await Promise.all([r.e(6361),r.e(9953),r.e(6263),r.e(8247),r.e(5087),r.e(8589),r.e(1560)]).then(()=>r(18589))).default,{layer:i,url:s}=this;if(s&&this.originIdOf("url")>2)e=new t({url:s});else{if(!i?.parsedUrl)throw new l.A("createFeatureLayer:missing-information","Cannot create a FeatureLayer without a url or a parent layer");{let r=i.parsedUrl;e=new t({url:r.path}),r&&this.source&&("map-layer"===this.source.type?e.layerId=this.source.mapLayerId:e.dynamicDataSource=this.source)}}return null!=i?.refreshInterval&&(e.refreshInterval=i.refreshInterval),this.definitionExpression&&(e.definitionExpression=this.definitionExpression),this.floorInfo&&(e.floorInfo=(0,p.o8)(this.floorInfo)),this.originIdOf("labelingInfo")>2&&(e.labelingInfo=(0,p.o8)(this.labelingInfo)),this.originIdOf("labelsVisible")>0&&(e.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>0&&(e.legendEnabled=this.legendEnabled),this.originIdOf("visible")>0&&(e.visible=this.visible),this.originIdOf("minScale")>0&&(e.minScale=this.minScale),this.originIdOf("maxScale")>0&&(e.maxScale=this.maxScale),this.originIdOf("opacity")>0&&(e.opacity=this.opacity),this.originIdOf("popupTemplate")>0&&(e.popupTemplate=(0,p.o8)(this.popupTemplate)),this.originIdOf("renderer")>2&&(e.renderer=(0,p.o8)(this.renderer)),"data-layer"===this.source?.type&&(e.dynamicDataSource=this.source.clone()),this.originIdOf("title")>0&&(e.title=this.title),"map-image"===i?.type&&i.originIdOf("customParameters")>0&&(e.customParameters=i.customParameters),"tile"===i?.type&&i.originIdOf("customParameters")>0&&(e.customParameters=i.customParameters),e}getField(e){return this.fieldsIndex.get(e)}getFeatureType(e){return(0,V.xd)(this.types,this.typeIdField,e)}getFieldDomain(e,t){let r=t?.feature,i=this.getFeatureType(r);if(i){let t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this._getLayerDomain(e)}async queryAttachments(e,t){await this.load();let r=ee.A.from(e),i=this.capabilities;if(!i?.data?.supportsAttachment)throw new l.A("queryAttachments:not-supported","this layer doesn't support attachments");let{attachmentTypes:s,objectIds:o,globalIds:a,num:n,size:u,start:p,where:d}=r;if(!i?.operations?.supportsQueryAttachments&&(s?.length>0||a?.length>0||u?.length>0||n||p||d))throw new l.A("queryAttachments:option-not-supported","when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",r);if(!(o?.length||a?.length||d))throw new l.A("queryAttachments:invalid-query","'objectIds', 'globalIds', or 'where' are required to perform attachment query",r);return!i?.attachment?.supportsOrderByFields&&r.orderByFields?.length&&(r=r.clone(),r.orderByFields=null),this.queryTask.executeAttachmentQuery(r,t)}async queryFeatureCount(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new l.A("queryFeatureCount:not-supported","this layer doesn't support queries.");if(!this.url)throw new l.A("queryFeatureCount:not-supported","this layer has no url.");let r=this.layer?.apiKey;return await this.queryTask.executeForCount(e,{...t,query:{...this.layer?.customParameters,token:r}})}async queryFeatures(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new l.A("queryFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new l.A("queryFeatures:not-supported","this layer has no url.");let r=await this.queryTask.execute(e,{...t,query:{...this.layer?.customParameters,token:this.layer?.apiKey}});if(r?.features){let e=this.graphicOrigin;for(let t of r.features)t.sourceLayer=this,t.origin=e}return r}async queryObjectIds(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new l.A("queryObjectIds:not-supported","this layer doesn't support queries.");if(!this.url)throw new l.A("queryObjectIds:not-supported","this layer has no url.");let r=this.layer?.apiKey;return await this.queryTask.executeForIds(e,{...t,query:{...this.layer?.customParameters,token:r}})}async queryRelatedFeatures(e,t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new l.A("queryRelatedFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new l.A("queryRelatedFeatures:not-supported","this layer has no url.");let r=this.layer?.apiKey;return await this.queryTask.executeRelationshipQuery(e,{...t,query:{...this.layer?.customParameters,token:r}})}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new l.A("queryRelatedFeaturesCount:not-supported","this layer doesn't support queries.");if(!this.capabilities.queryRelated.supportsCount)throw new l.A("queryRelatedFeaturesCount:not-supported","this layer doesn't support query related counts.");if(!this.url)throw new l.A("queryRelatedFeaturesCount:not-supported","this layer has no url.");let r=this.layer?.apiKey;return await this.queryTask.executeRelationshipQueryForCount(e,{...t,query:{...this.layer?.customParameters,token:r}})}async reload(e){if("not-loaded"===this.loadStatus)return this.load(e).then(()=>{});let{layer:t,url:r}=this;if(!t&&!r)throw new l.A("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:this});let i=t?await t.fetchSublayerInfo(this,e):(await(0,o.A)(r,{query:{f:"json"},...e})).data;i&&(this.sourceJSON={...this.sourceJSON,...i},this.read({layerDefinition:i},{origin:"service",layer:t,url:(0,X.Dl)(r)}))}toExportImageJSON(e){let t={id:this.id,source:this.source?.toJSON()||{mapLayerId:this.id,type:"mapLayer"}},r=(0,h.mA)(e,this.definitionExpression);null!=r&&(t.definitionExpression=r);let i=["renderer","labelingInfo","opacity","labelsVisible"].reduce((e,t)=>(e[t]=this.originIdOf(t),e),{});if(Object.keys(i).some(e=>i[e]>2)){let e=t.drawingInfo={};if(i.renderer>2&&(e.renderer=this.renderer?this.renderer.toJSON():null),i.labelsVisible>2&&(e.showLabels=this.labelsVisible),this.labelsVisible&&i.labelingInfo>2)if(this.labelingInfo){!this.loaded&&this.labelingInfo?.some(e=>!e.labelPlacement)&&y.A.getLogger(this).warnOnce(`A Sublayer (title: ${this.title}, id: ${this.id}) has an undefined 'labelPlacement' and so labels cannot be displayed. Either define a valid 'labelPlacement' or call Sublayer.load() to use a default value based on geometry type.`,{sublayer:this});let t=this.labelingInfo;null!=this.geometryType&&(t=(0,$.z)(this.labelingInfo,x.gy.toJSON(this.geometryType))),e.showLabels=!0,e.labelingInfo=t.filter(e=>e.labelPlacement).map(e=>e.toJSON({origin:"service",layer:this.layer}))}else e.showLabels=!1;i.opacity>2&&(e.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(e.renderer)}return(this.layer?.capabilities?.exportMap?.supportsSublayerOrderBy??!1)&&this.originIdOf("orderBy")>2&&(t.orderBy=this.orderBy?.map(e=>e.toJSON())??null),t}_assignDefaultSymbolColors(e){this._forEachSimpleMarkerSymbols(e,e=>{e.color||("esriSMSX"===e.style||"esriSMSCross"===e.style)&&(e.color=e.outline?.color?e.outline.color:[0,0,0,0])})}_forEachSimpleMarkerSymbols(e,t){if(e){let r=("uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:null)??[];for(let e of r)le(e.symbol)&&t(e.symbol);"symbol"in e&&le(e.symbol)&&t(e.symbol),"defaultSymbol"in e&&le(e.defaultSymbol)&&t(e.defaultSymbol)}}_setAndNotifyLayer(e,t){let r,i,s=this.layer,o=this._get(e);switch(e){case"definitionExpression":case"floorInfo":r="supportsSublayerDefinitionExpression";break;case"minScale":case"maxScale":case"visible":r="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":r="supportsDynamicLayers",i="supportsModification";break;case"orderBy":r="supportsSublayerOrderBy",i="supportsModification"}let a=(0,v.oY)(this).getDefaultOrigin();if("service"!==a){if(r&&!1===this.layer?.capabilities?.exportMap?.[r])return void this._logLockedError(e,`capability not available 'layer.capabilities.exportMap.${r}'`);if(i&&!1===this.capabilities?.exportMap[i])return void this._logLockedError(e,`capability not available 'capabilities.exportMap.${i}'`)}"source"===e&&"not-loaded"!==this.loadStatus?this._logLockedError(e,"'source' can't be changed after calling sublayer.load()"):(this._set(e,t),"service"!==a&&o!==t&&s?.emit&&s.emit("sublayer-update",{propertyName:e,target:this}))}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null,e.layer=null}),this.removeAllHandles()),e&&(e.forEach(e=>{e.parent=this,e.layer=this.layer}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this,e.layer=this.layer}),e.on("after-remove",({item:e})=>{e.parent=null,e.layer=null}),e.on("before-changes",e=>{(this.layer?.capabilities?.exportMap?.supportsSublayersChanges??!0)||(y.A.getLogger(this).error(new l.A("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:this,layer:this.layer})),e.preventDefault())})]))}_logLockedError(e,t){let{layer:r,declaredClass:i}=this;y.A.getLogger(i).error(new l.A("sublayer:locked",`Property '${String(e)}' can't be changed on Sublayer from the layer '${r?.id}'`,{reason:t,sublayer:this,layer:r}))}_getLayerDomain(e){return this.fieldsIndex.get(e)?.domain??null}static{this.test={isMapImageLayerOverridePolicy:e=>e===ye||e===de||e===ue,isTileImageLayerOverridePolicy:e=>e===pe}}};(0,i.Cg)([(0,g.MZ)({type:se.A,json:{name:"attributeTableInfo",write:{overridePolicy:ue},origins:{"web-scene":{write:!1}}}})],ge.prototype,"attributeTableTemplate",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],ge.prototype,"capabilities",void 0),(0,i.Cg)([(0,oe.w)("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],ge.prototype,"readCapabilities",null),(0,i.Cg)([(0,g.MZ)()],ge.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,g.MZ)({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{allowNull:!0,overridePolicy:ue}}})],ge.prototype,"definitionExpression",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,type:q.A,json:{origins:{service:{read:{source:"layerDefinition.editFieldsInfo"}}}}})],ge.prototype,"editFieldsInfo",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],ge.prototype,"effectiveScaleRange",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0,type:[String]})],ge.prototype,"effectiveUniqueIdFields",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],ge.prototype,"effectiveVisible",null),(0,i.Cg)([(0,oe.w)("service","maxScaleRange",["minScale","maxScale"])],ge.prototype,"readMaxScaleRange",null),(0,i.Cg)([(0,g.MZ)({type:[N.A],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],ge.prototype,"fields",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],ge.prototype,"fieldsIndex",null),(0,i.Cg)([(0,g.MZ)({type:K.A,value:null,json:{name:"layerDefinition.floorInfo",read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo",overridePolicy:ue},origins:{"web-scene":{read:!1,write:!1}}}})],ge.prototype,"floorInfo",null),(0,i.Cg)([(0,g.MZ)({type:w.A,json:{read:{source:"layerDefinition.extent"}}})],ge.prototype,"fullExtent",void 0),(0,i.Cg)([(0,g.MZ)({type:x.gy.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:x.gy.read}}}}})],ge.prototype,"geometryType",void 0),(0,i.Cg)([(0,g.MZ)({type:String})],ge.prototype,"globalIdField",void 0),(0,i.Cg)([(0,oe.w)("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],ge.prototype,"readGlobalIdFieldFromService",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],ge.prototype,"graphicOrigin",null),(0,i.Cg)([(0,g.MZ)({type:m.jz,json:{write:{ignoreOrigin:!0}}})],ge.prototype,"id",null),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],ge.prototype,"isTable",void 0),(0,i.Cg)([(0,oe.w)("service","isTable",["type"])],ge.prototype,"readIsTable",null),(0,i.Cg)([(0,g.MZ)({value:null,type:[z.A],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:ye}}})],ge.prototype,"labelingInfo",null),(0,i.Cg)([(0,ae.K)("labelingInfo")],ge.prototype,"writeLabelingInfo",null),(0,i.Cg)([(0,g.MZ)({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:de}}})],ge.prototype,"labelsVisible",null),(0,i.Cg)([(0,g.MZ)({value:null})],ge.prototype,"layer",null),(0,i.Cg)([(0,g.MZ)({type:String,json:{write:{overridePolicy:pe}}})],ge.prototype,"layerItemId",void 0),(0,i.Cg)([(0,g.MZ)({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:ce}}})],ge.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,g.MZ)({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],ge.prototype,"listMode",null),(0,i.Cg)([(0,g.MZ)({type:Number,value:0,json:{write:{overridePolicy:de}}})],ge.prototype,"minScale",null),(0,i.Cg)([(0,oe.w)("minScale",["minScale","layerDefinition.minScale"])],ge.prototype,"readMinScale",null),(0,i.Cg)([(0,g.MZ)({type:Number,value:0,json:{write:{overridePolicy:de}}})],ge.prototype,"maxScale",null),(0,i.Cg)([(0,oe.w)("maxScale",["maxScale","layerDefinition.maxScale"])],ge.prototype,"readMaxScale",null),(0,i.Cg)([(0,g.MZ)()],ge.prototype,"objectIdField",void 0),(0,i.Cg)([(0,oe.w)("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],ge.prototype,"readObjectIdFieldFromService",null),(0,i.Cg)([(0,g.MZ)({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:de}}})],ge.prototype,"opacity",null),(0,i.Cg)([(0,oe.w)("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],ge.prototype,"readOpacity",null),(0,i.Cg)([(0,ae.K)("opacity")],ge.prototype,"writeOpacity",null),(0,i.Cg)([(0,g.MZ)({value:null,type:[J.A],json:{name:"layerDefinition.orderBy",read:{reader:E.Rr},write:{overridePolicy:ue},origins:{"web-scene":{read:!1,write:!1}}}})],ge.prototype,"orderBy",null),(0,i.Cg)([(0,g.MZ)({json:{type:m.jz,write:{target:"parentLayerId",writerEnsuresNonNull:!0,overridePolicy:de}}})],ge.prototype,"parent",void 0),(0,i.Cg)([(0,ae.K)("parent")],ge.prototype,"writeParent",null),(0,i.Cg)([(0,g.MZ)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy:ce,writer(e,t,r){t[r]=!e}}}})],ge.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,g.MZ)({type:s.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:ce}}})],ge.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,g.MZ)({readOnly:!0})],ge.prototype,"queryTask",null),(0,i.Cg)([(0,g.MZ)({type:[Q.A],readOnly:!0,json:{origins:{service:{read:{source:"layerDefinition.relationships"}}}}})],ge.prototype,"relationships",void 0),(0,i.Cg)([(0,g.MZ)({types:G.Hg,value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:ye},origins:{"web-scene":{types:G.XJ,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:ye}}}}})],ge.prototype,"renderer",null),(0,i.Cg)([(0,g.MZ)({types:{key:"type",base:null,typeMap:{"data-layer":Y.A,"map-layer":W.A,"workspace-layer":H.A}},cast(e){if(e){if("mapLayerId"in e)return(0,m.PZ)(W.A,e);if("dataSource"in e)return(0,m.PZ)(Y.A,e);if("workspaceId"in e&&"layerId"in e)return(0,m.PZ)(H.A,e)}return e},json:{name:"layerDefinition.source",types:{key:"type",base:null,typeMap:{"data-layer":Y.A,"map-layer":W.A}},write:{overridePolicy:de}}})],ge.prototype,"source",null),(0,i.Cg)([(0,g.MZ)()],ge.prototype,"sourceJSON",void 0),(0,i.Cg)([(0,g.MZ)({type:S.A,json:{origins:{service:{read:{source:"layerDefinition.extent.spatialReference"}}}}})],ge.prototype,"spatialReference",void 0),(0,i.Cg)([(0,g.MZ)({value:null,json:{type:[m.jz],write:{target:"subLayerIds",allowNull:!0,overridePolicy:de}}})],ge.prototype,"sublayers",null),(0,i.Cg)([(0,g.wg)("sublayers")],ge.prototype,"castSublayers",null),(0,i.Cg)([(0,ae.K)("sublayers")],ge.prototype,"writeSublayers",null),(0,i.Cg)([(0,g.MZ)({type:String,json:{name:"name",write:{overridePolicy:ce}}})],ge.prototype,"title",void 0),(0,i.Cg)([(0,oe.w)("service","title",["name","layerDefinition.name"])],ge.prototype,"readTitle",null),(0,i.Cg)([(0,g.MZ)({type:String})],ge.prototype,"typeIdField",void 0),(0,i.Cg)([(0,g.MZ)({json:{read:!1},readOnly:!0,value:"sublayer"})],ge.prototype,"type",void 0),(0,i.Cg)([(0,oe.w)("typeIdField",["layerDefinition.typeIdField"])],ge.prototype,"readTypeIdField",null),(0,i.Cg)([(0,g.MZ)({type:[R.A],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],ge.prototype,"types",void 0),(0,i.Cg)([(0,g.MZ)({type:[String],readOnly:!0})],ge.prototype,"uniqueIdFields",void 0),(0,i.Cg)([(0,oe.w)("service","uniqueIdFields",["layerDefinition.uniqueIdInfo.OIDFieldContainsHashValue","layerDefinition.uniqueIdInfo.fields"])],ge.prototype,"readUniqueIdFields",null),(0,i.Cg)([(0,g.MZ)({type:String,json:{name:"layerUrl",write:{overridePolicy:pe}}})],ge.prototype,"url",null),(0,i.Cg)([(0,g.MZ)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:de}}})],ge.prototype,"visible",null),(0,i.Cg)([(0,ae.K)("visible")],ge.prototype,"writeVisible",null),ge=D=(0,i.Cg)([(0,g.$K)("esri.layers.support.Sublayer")],ge)},33446(e,t,r){r.d(t,{Cp:()=>a,mn:()=>o});var i=r(49186),s=r(17676);async function o(e,t,r){let o;try{o=await l(e,r)}catch(e){throw new i.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.Te)(r),o}async function a(e,t,r,o,a){let n;try{n=await l(e,a)}catch(e){throw new i.A("request:server",`Unable to load tile ${t}/${r}/${o}`,{error:e,level:t,row:r,col:o})}return(0,s.Te)(a),n}async function l(e,t){let r=await createImageBitmap(e,{imageOrientation:t?.imageOrientation??"none"}),i=t?.type??(e instanceof Blob?e.type.startsWith("image/")?e.type:t?.allowDeriveTypeFromData?await async function(e){return e.byteLength<2?"unknown":137===e[0]&&80===e[1]?"image/png":71===e[0]&&73===e[1]?"image/gif":66===e[0]&&77===e[1]?"image/bmp":255===e[0]&&216===e[1]?"image/jpeg":"unknown"}(await e.bytes()):void 0:void 0);return new n(r,i)}class n{constructor(e,t){this.bitmap=e,this.type=t}get isOpaque(){return"image/jpeg"===this.type}}},39383(e,t,r){r.d(t,{w:()=>n,z:()=>d});var i=r(49186),s=r(53966),o=r(46499);const a=()=>s.A.getLogger("esri.layers.support.labelingInfo"),l=/\[([^[\]]+)\]/gi;function n(e,t,r){return e?e.map(e=>{let i=new o.A;if(i.read(e,r),i.labelExpression){let e=t.fields||t.layerDefinition?.fields||this.fields;i.labelExpression=i.labelExpression.replaceAll(l,(t,r)=>`[${function(e,t){if(!t)return e;let r=e.toLowerCase();for(let e=0;e<t.length;e++){let i=t[e].name;if(i.toLowerCase()===r)return i}return e}(r,e)}]`)}return i}):null}const u=["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],p={esriGeometryPoint:u,esriGeometryMultiPatch:["always-horizontal"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along","above-along","below-along"],esriGeometryMultipoint:u,esriGeometryEnvelope:null};function d(e,t){let r=[];for(let s of e){let e=s.labelPlacement,o=p[t];if(!s.symbol)return a().warn("No ILabelClass symbol specified."),[];if(!o)return a().error(new i.A("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),[];if(o.includes(e))r.push(s);else{let i=o[0];e&&a().warn(`Found invalid label placement type ${e} for ${t}. Defaulting to ${i}`);let l=s.clone();l.labelPlacement=i,r.push(l)}}return r}},63389(e,t,r){function i(e,t,r){return!(t.flatten(({sublayers:e})=>e).length===e.length&&!e.some(e=>e.originIdOf("minScale")>r||e.originIdOf("maxScale")>r||e.originIdOf("renderer")>r||e.originIdOf("labelingInfo")>r||e.originIdOf("opacity")>r||e.originIdOf("labelsVisible")>r||e.originIdOf("source")>r)&&o(e,t))}function s(e,t,r){return!!e.some(e=>{let t=e.source,i=!t||"map-layer"===t.type&&t.mapLayerId===e.id&&(null==t.gdbVersion||t.gdbVersion===r);e.commitProperty("renderer"),e.commitProperty("labelingInfo"),e.commitProperty("opacity"),e.commitProperty("labelsVisible"),e.commitProperty("orderBy");let s=e.layer?.capabilities?.exportMap?.supportsSublayerOrderBy??!1;return!i||e.originIdOf("renderer")>2||e.originIdOf("labelingInfo")>2||e.originIdOf("opacity")>2||e.originIdOf("labelsVisible")>2||s&&e.originIdOf("orderBy")>2})||!o(e,t)}function o(e,t){if(!e?.length||null==t)return!0;let r=t.slice().reverse().flatten(({sublayers:e})=>e&&e.toArray().reverse()).map(e=>e.id).toArray();if(e.length>r.length)return!1;let i=0,s=r.length;for(let{id:t}of e){for(;i<s&&r[i]!==t;)i++;if(i>=s)return!1}return!0}function a(e){return!!e&&e.some(e=>null!=e.minScale||null!=e.layerDefinition?.minScale)}r.d(t,{Sk:()=>s,Zx:()=>i,_X:()=>a})},73681(e,t,r){r.d(t,{n:()=>n});var i=r(49186),s=r(53966),o=r(46140),a=r(95466),l=r(55674);class n{static async from(e,t,r){let a=e.dictionary_version?o.A.parse(e.dictionary_version):null,p=new Set(e.itemsNames),d={};if(t)for(let e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(let t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);let y=new Set(e.authoringInfo.symbol);for(let e of Object.keys(r))y.delete(e);y.size&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:y});let c=await(0,l.xR)(e.expression,null,d);if(!c)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");let h=!a||!a.greaterEqual(4,0);h&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:a});let f=new u(r,h);return new n(h,p,c,f)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new a.A(e);let t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new a.A(t)}}class u extends l.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){let t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);let t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},20615(e,t,r){r.d(t,{I:()=>a});var i=r(2272),s=r(80893),o=r(97552);function a(e,t,r,a){return(0,s.gW)((0,i.Dl)(e),o.A.from(t),r,a)}},74910(e,t,r){r.d(t,{L:()=>l});var i=r(5443),s=r(2272),o=r(80893),a=r(97552);async function l(e,t,r){let l=(0,s.Dl)(e),n=await(0,o.Jf)(l,a.A.from(t),{...r}),u=n.extent;return!u||isNaN(u.xmin)||isNaN(u.ymin)||isNaN(u.xmax)||isNaN(u.ymax)?{count:n.count,extent:null}:{count:n.count,extent:i.A.fromJSON(u)}}},78286(e,t,r){r.d(t,{V:()=>a});var i=r(2272),s=r(80893),o=r(97552);async function a(e,t,r,a){let l=(0,i.Dl)(e),n=await(0,s.Pk)(l,o.A.from(t),r,a);return n.objectIds??function(e){if(e)return function(e){return!Array.isArray(e[0])}(e)?e:e.map(e=>JSON.stringify(e))}(n.uniqueIds)??[]}},99199(e,t,r){r.d(t,{e:()=>n,s:()=>l});var i=r(2272),s=r(80893),o=r(22671),a=r(97552);async function l(e,t,r,i){let s=await n(e,t,r,i);return o.A.fromJSON(s)}function n(e,t,r,o){let l=(0,i.Dl)(e),n={...r},u=a.A.from(t);return(0,s.eW)(l,u,u.sourceSpatialReference,n,o)}},63746(e,t,r){function i(e){return class{constructor(){for(let t of e)this[t]=null}}}function s(e,t=1){let{transform:r,hasZ:i,hasM:s}=e;if(null==r)return i&&1!==t?e=>{e[2]*=t}:null;let[o,a]=function(e,t,r,i){let{scale:s,translate:o,originPosition:a}=e;return"upperLeft"===a&&(s=s.map((e,t)=>1===t?-e:e)),t&&(s=s.map((e,t)=>2===t?e*i:e),o=o.map((e,t)=>2===t?e*i:e)),!t&&r&&(s=s.filter((e,t)=>2!==t),o=o.filter((e,t)=>2!==t)),[s,o]}(r,i,s,t),l=e.hasZ?3:2;return e=>{for(let t=0;t<e.length&&(t!==l||0!==e[t]);++t)e[t]=e[t]*o[t]+a[t]}}r.d(t,{M:()=>s,_:()=>i})},41366(e,t,r){var i=r(32198),s=r(66552),o=r(53966),a=r(91429),l=r(93223);const n=(0,s.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",p="field";r.d(t,["K",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType"),t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&p||r&&u||null,t&&r&&o.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):(e===p||e===u)&&(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i.Cg)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,i.Cg)([(0,l.e)(n,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,i.Cg)([(0,a.$K)("esri.rest.support.NormalizationBinParametersMixin")],r),r},"Q",0,n])},93470(e,t,r){const i=[252,146,31,255],s={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i};r.d(t,["Cb",0,s,"HW",0,{type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},"JR",0,[153,153,153,255],"JZ",0,{type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},"WR",0,{type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},"b6",0,{type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null},"fT",0,i,"nC",0,{type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},"yM",0,o])}}]);
|