@arcgis/core 4.28.0-rc.2 → 4.28.0-rc.3
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/{0e354096ad8817971eed.js → 02d235849ba93541d7ad.js} +1 -1
- package/assets/esri/core/workers/chunks/0422c5160491fbcf01dc.js +1 -0
- package/assets/esri/core/workers/chunks/224e79f6c172da444e0a.js +1 -0
- package/assets/esri/core/workers/chunks/{ca3d5803cdf035d7389d.js → 30776102fbab294bfe7b.js} +1 -1
- package/assets/esri/core/workers/chunks/{61dec8399919b278b636.js → 3ac9001b19a90faf5573.js} +1 -1
- package/assets/esri/core/workers/chunks/41081c921037e543a22f.js +1 -0
- package/assets/esri/core/workers/chunks/4564a7885d045a850887.js +1 -0
- package/assets/esri/core/workers/chunks/4adf3a8c6b49c381a633.js +1 -0
- package/assets/esri/core/workers/chunks/{2721aa6b6941b28b9758.js → 63c8bf00120a4e67f5b0.js} +1 -1
- package/assets/esri/core/workers/chunks/74951370a341f02d3714.js +1 -0
- package/assets/esri/core/workers/chunks/{fa6103e3d4e857b0035b.js → 78e2fa121760383b08ec.js} +9 -6
- package/assets/esri/core/workers/chunks/7b8377b3a9f78f9d3613.js +1 -0
- package/assets/esri/core/workers/chunks/{fd28400141a6751327ae.js → 7cf7f2b991a7cbdad2ce.js} +1 -1
- package/assets/esri/core/workers/chunks/{1a723bb4a341f645e5fe.js → 83b8141f0c80e3448012.js} +1 -1
- package/assets/esri/core/workers/chunks/934c32c49bb9e21482fd.js +1 -0
- package/assets/esri/core/workers/chunks/969a82b674eda9f8720f.js +1 -0
- package/assets/esri/core/workers/chunks/a1e16c33f1843dbdce26.js +1 -0
- package/assets/esri/core/workers/chunks/{d07235ce2765a25b9be4.js → a50ec5b647a160199cb2.js} +1 -1
- package/assets/esri/core/workers/chunks/{77923afde29ae1ff10ca.js → b6e86e179f99b5cf8dff.js} +1 -1
- package/assets/esri/core/workers/chunks/c3ddf5dbc34f118002df.js +1 -0
- package/assets/esri/core/workers/chunks/{7b3d5f044c96e2c2af11.js → d191267d91a53db42956.js} +1 -1
- package/assets/esri/core/workers/chunks/ffa330a19a09679212fb.js +1 -0
- package/assets/esri/themes/base/widgets/_BasemapGallery.scss +3 -9
- package/assets/esri/themes/base/widgets/_Legend.scss +1 -1
- package/assets/esri/themes/base/widgets/_TimeZoneLabel.scss +3 -3
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/geometry/support/meshUtils/georeference.js +1 -1
- package/interfaces.d.ts +1254 -262
- package/kernel.js +1 -1
- package/layers/GroupLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/data/queryValidationUtils.js +1 -1
- package/layers/mixins/ArcGISMapService.js +1 -1
- package/layers/save/groupLayerUtils.js +1 -1
- package/layers/save/utils.js +1 -1
- package/layers/support/ImageElement.js +1 -1
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/Subtype.d.ts +4 -0
- package/layers/support/Subtype.js +1 -1
- package/layers/support/imageryRendererUtils.js +1 -1
- package/networks/Network.js +1 -1
- package/package.json +1 -1
- package/portal/support/jsonContext.js +1 -1
- package/portal/support/layersLoader.js +1 -1
- package/rest/featureService/FeatureService.d.ts +4 -0
- package/rest/featureService/FeatureService.js +1 -1
- package/rest/featureService/utils.d.ts +4 -0
- package/rest/query/operations/query.js +1 -1
- package/support/basemapUtils.js +1 -1
- package/support/revision.js +1 -1
- package/versionManagement/VersionManagementService.d.ts +4 -0
- package/versionManagement/VersionManagementService.js +1 -1
- package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
- package/views/2d/engine/webgl/Overlay.js +1 -1
- package/views/2d/input/handlers/KeyPan.js +1 -1
- package/views/2d/interactive/editingTools/manipulations/DragManipulation.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
- package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/MediaLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
- package/views/3d/layers/graphics/elevationAlignPointsInFeatures.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/support/MemoryController.js +1 -1
- package/views/3d/support/PBFDecoder.js +1 -1
- package/views/3d/support/ResourceController.js +1 -1
- package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/FBOPool.js +5 -0
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +9 -6
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/lib/Camera.js +1 -1
- package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/webgl-engine/lib/textureUtils.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
- package/views/interactive/snapping/featureSources/FeatureCollectionSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
- package/views/interactive/snapping/featureSources/snappingCandidateElevationAlignment.js +1 -1
- package/widgets/BasemapGallery.js +1 -1
- package/widgets/DirectionalPad.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/widgets/TimeZoneLabel.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/assets/esri/core/workers/chunks/00da3c16741a9bc47f3a.js +0 -1
- package/assets/esri/core/workers/chunks/0e4646d14fa0775bf463.js +0 -1
- package/assets/esri/core/workers/chunks/4e0bf30da4281070e453.js +0 -1
- package/assets/esri/core/workers/chunks/51b8913dff24e693bd25.js +0 -1
- package/assets/esri/core/workers/chunks/5e907ec0ee1565b5fbbc.js +0 -1
- package/assets/esri/core/workers/chunks/7388fd97e7b1a2142744.js +0 -1
- package/assets/esri/core/workers/chunks/92d8f75e616afa5c761e.js +0 -1
- package/assets/esri/core/workers/chunks/a877a4826cd6a46ec99b.js +0 -1
- package/assets/esri/core/workers/chunks/b251d8a856dc8b9406e0.js +0 -1
- package/assets/esri/core/workers/chunks/d8c696da42f8f8919b83.js +0 -1
- package/assets/esri/core/workers/chunks/fac3e57784d7f37053af.js +0 -1
- package/assets/esri/core/workers/chunks/fc95b1a36ed68b851400.js +0 -1
- package/widgets/DirectionalPad/DirectionalPadViewModel.d.ts +0 -4
- package/widgets/DirectionalPad.d.ts +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4599],{45091:(e,t,s)=>{s.d(t,{Z:()=>c});var n,r,i=s(80442),a=s(71143);(r=n||(n={}))[r.varint=0]="varint",r[r.fixed64=1]="fixed64",r[r.delimited=2]="delimited",r[r.fixed32=5]="fixed32",r[r.unknown=99]="unknown";const o=4294967296,u=new TextDecoder("utf-8"),l=(0,i.Z)("safari")||(0,i.Z)("ios")?6:(0,i.Z)("ff")?12:32;class c{constructor(e,t,s=0,r=(e?e.byteLength:0)){this._tag=0,this._dataType=n.unknown,this._init(e,t,s,r)}_init(e,t,s,n){this._data=e,this._dataView=t,this._pos=s,this._end=n}asUnsafe(){return this}clone(){return new c(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;return e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128?e:(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128?e:void 0))))}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();if(void 0!==e)return e>>>1^-(1&e)|0}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getUint32(t+4,!0)*o;return this._skip(8),s}getSFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getInt32(t+4,!0)*o;return this._skip(8),s}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,s=this._toString(this._data,t,t+e);return this._skip(e),s}getBytes(){const e=this._getLength(),t=this._pos,s=this._toBytes(this._data,t,t+e);return this._skip(e),s}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,s,n){const r=this.getMessage(),i=e(r,t,s,n);return r.release(),i}processMessage(e){const t=this.getMessage(),s=e(t);return t.release(),s}getMessage(){const e=this._getLength(),t=c.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){c.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case n.varint:this._decodeVarint();break;case n.fixed64:this._skip(8);break;case n.delimited:this._skip(this._getLength());break;case n.fixed32:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t=this._pos,s=0,n=0;if(this._end-t>=10)do{if(n=e[t++],s|=127&n,0==(128&n))break;if(n=e[t++],s|=(127&n)<<7,0==(128&n))break;if(n=e[t++],s|=(127&n)<<14,0==(128&n))break;if(n=e[t++],s|=(127&n)<<21,0==(128&n))break;if(n=e[t++],s+=268435456*(127&n),0==(128&n))break;if(n=e[t++],s+=34359738368*(127&n),0==(128&n))break;if(n=e[t++],s+=4398046511104*(127&n),0==(128&n))break;if(n=e[t++],s+=562949953421312*(127&n),0==(128&n))break;if(n=e[t++],s+=72057594037927940*(127&n),0==(128&n))break;if(n=e[t++],s+=0x8000000000000000*(127&n),0==(128&n))break;throw new Error("Varint too long!")}while(0);else{let r=1;for(;t!==this._end&&(n=e[t],0!=(128&n));)++t,s+=(127&n)*r,r*=128;if(t===this._end)throw new Error("Varint overrun!");++t,s+=n*r}return this._pos=t,s}_decodeSVarint(){const e=this._data;let t,s=0,n=0;const r=1&e[this._pos];if(n=e[this._pos++],s|=127&n,0==(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s|=(127&n)<<7,0==(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s|=(127&n)<<14,0==(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s|=(127&n)<<21,0==(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s+=268435456*(127&n),0==(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s+=34359738368*(127&n),0==(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s+=4398046511104*(127&n),0==(128&n))return r?-(s+1)/2:s/2;if(t=BigInt(s),n=e[this._pos++],t+=0x2000000000000n*BigInt(127&n),0==(128&n))return Number(r?-(t+1n)/2n:t/2n);if(n=e[this._pos++],t+=0x100000000000000n*BigInt(127&n),0==(128&n))return Number(r?-(t+1n)/2n:t/2n);if(n=e[this._pos++],t+=0x8000000000000000n*BigInt(127&n),0==(128&n))return Number(r?-(t+1n)/2n:t/2n);throw new Error("Varint too long!")}_getLength(){if(this._dataType!==n.delimited)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,s){if((s=Math.min(this._end,s))-t>l){const n=e.subarray(t,s);return u.decode(n)}let n="",r="";for(let i=t;i<s;++i){const t=e[i];128&t?r+="%"+t.toString(16):(n+=decodeURIComponent(r)+String.fromCharCode(t),r="")}return r.length&&(n+=decodeURIComponent(r)),n}_toBytes(e,t,s){return s=Math.min(this._end,s),new Uint8Array(e.buffer,t,s-t)}}c.pool=new a.Z(c,void 0,(e=>{e._data=null,e._dataView=null}))},16306:(e,t,s)=>{s.d(t,{aX:()=>S});var n=s(68773),r=s(20102),i=s(92604),a=s(38913),o=s(58901),u=s(73913),l=s(8744),c=s(40488),p=(s(66577),s(3172)),f=s(33955),h=s(11282),d=s(17452);async function g(e,t,s){const n="string"==typeof e?(0,d.mN)(e):e,r=t[0].spatialReference,i=(0,f.Ji)(t[0]),a={...s,query:{...n.query,f:"json",sr:(0,l.B9)(r),geometries:JSON.stringify((u=t,{geometryType:(0,f.Ji)(u[0]),geometries:u.map((e=>e.toJSON()))}))}},{data:o}=await(0,p.Z)(n.path+"/simplify",a);var u;return function(e,t,s){const n=(0,f.q9)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=s,t}))}(o.geometries,i,r)}const y=i.Z.getLogger("esri.geometry.support.normalizeUtils");function m(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function b(e,t,s){if(t){const t=function(e,t){if(!(e instanceof o.Z||e instanceof a.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y.error(e),new r.Z(e)}const s=(0,u.x3)(e),n=[];for(const e of s){const s=[];n.push(s),s.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const r=e[n][0],i=e[n][1],a=e[n+1][0],o=e[n+1][1],u=Math.sqrt((a-r)*(a-r)+(o-i)*(o-i)),l=(o-i)/u,c=(a-r)/u,p=u/t;if(p>1){for(let e=1;e<=p-1;e++){const n=e*t,a=c*n+r,o=l*n+i;s.push([a,o])}const e=(u+Math.floor(p-1)*t)/2,n=c*e+r,a=l*e+i;s.push([n,a])}s.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new a.Z({rings:n,spatialReference:e.spatialReference}):new o.Z({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,c.Sx)(t,!0)}return s&&(e=(0,u.Sy)(e,s)),e}function k(e,t,s){if(Array.isArray(e)){const n=e[0];if(n>t){const s=(0,u.XZ)(n,t);e[0]=n+s*(-2*t)}else if(n<s){const t=(0,u.XZ)(n,s);e[0]=n+t*(-2*s)}}else{const n=e.x;if(n>t){const s=(0,u.XZ)(n,t);e=e.clone().offset(s*(-2*t),0)}else if(n<s){const t=(0,u.XZ)(n,s);e=e.clone().offset(t*(-2*s),0)}}return e}function x(e,t){let s=-1;for(let n=0;n<t.cutIndexes.length;n++){const r=t.cutIndexes[n],i=t.geometries[n],a=(0,u.x3)(i);for(let e=0;e<a.length;e++){const t=a[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const n=t[e][0];s=n>s?n:s}s=Number(s.toFixed(9));const n=-360*(0,u.XZ)(s,180);for(let s=0;s<t.length;s++){const t=i.getPoint(e,s);i.setPoint(e,s,t.clone().offset(n,0))}return!0}}))}if(r===s){if(m(e))for(const t of(0,u.x3)(i))e[r]=e[r].addRing(t);else if(_(e))for(const t of(0,u.x3)(i))e[r]=e[r].addPath(t)}else s=r,e[r]=i}return e}async function S(e,t,s){if(!Array.isArray(e))return S([e],t);t&&"string"!=typeof t&&y.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const r="string"==typeof t?t:t?.url??n.default.geometryServiceUrl;let i,d,m,_,w,T,q,I,F=0;const R=[],U=[];for(const t of e)if(null!=t)if(i||(i=t.spatialReference,d=(0,l.C5)(i),m=i.isWebMercator,T=m?102100:4326,_=u.UZ[T].maxX,w=u.UZ[T].minX,q=u.UZ[T].plus180Line,I=u.UZ[T].minus180Line),d)if("mesh"===t.type)U.push(t);else if("point"===t.type)U.push(k(t.clone(),_,w));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>k(e,_,w))),U.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,d);U.push(e.rings?new a.Z(e):e)}else if(t.extent){const e=t.extent,s=(0,u.XZ)(e.xmin,w)*(2*_);let n=0===s?t.clone():(0,u.Sy)(t.clone(),s);e.offset(s,0),e.intersects(q)&&e.xmax!==_?(F=e.xmax>F?e.xmax:F,n=b(n,m),R.push(n),U.push("cut")):e.intersects(I)&&e.xmin!==w?(F=e.xmax*(2*_)>F?e.xmax*(2*_):F,n=b(n,m,360),R.push(n),U.push("cut")):U.push(n)}else U.push(t.clone());else U.push(t);else U.push(t);let Z=(0,u.XZ)(F,_),E=-90;const O=Z,V=new o.Z;for(;Z>0;){const e=360*Z-180;V.addPath([[e,E],[e,-1*E]]),E*=-1,Z--}if(R.length>0&&O>0){const t=x(R,await async function(e,t,s,n){const r=(0,h.en)(e),i=t[0].spatialReference,a={...n,responseType:"json",query:{...r.query,f:"json",sr:(0,l.B9)(i),target:JSON.stringify({geometryType:(0,f.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},o=await(0,p.Z)(r.path+"/cut",a),{cutIndexes:u,geometries:c=[]}=o.data;return{cutIndexes:u,geometries:c.map((e=>{const t=(0,f.im)(e);return t.spatialReference=i,t}))}}(r,R,V,s)),n=[],i=[];for(let s=0;s<U.length;s++){const r=U[s];if("cut"!==r)i.push(r);else{const r=t.shift(),a=e[s];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&r.rings.length>=a.rings.length?(n.push(r),i.push("simplify")):i.push(m?(0,c.$)(r):r)}}if(!n.length)return i;const a=await g(r,n,s),o=[];for(let e=0;e<i.length;e++){const t=i[e];"simplify"!==t?o.push(t):o.push(m?(0,c.$)(a.shift()):a.shift())}return o}const N=[];for(let e=0;e<U.length;e++){const t=U[e];if("cut"!==t)N.push(t);else{const e=R.shift();N.push(!0===m?(0,c.$)(e):e)}}return N}},73913:(e,t,s)=>{s.d(t,{Sy:()=>u,UZ:()=>a,XZ:()=>o,x3:()=>l});var n=s(58901),r=s(82971),i=s(33955);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.Z.WebMercator}),minus180Line:new n.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.Z({paths:[[[180,-180],[180,180]]],spatialReference:r.Z.WGS84}),minus180Line:new n.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:r.Z.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){const s=l(e);for(const e of s)for(const s of e)s[0]+=t;return e}function l(e){return(0,i.oU)(e)?e.rings:e.paths}},76497:(e,t,s)=>{function n(e){const t={};for(const s in e){if("declaredClass"===s)continue;const r=e[s];if(null!=r&&"function"!=typeof r)if(Array.isArray(r)){t[s]=[];for(let e=0;e<r.length;e++)t[s][e]=n(r[e])}else"object"==typeof r?r.toJSON&&(t[s]=JSON.stringify(r)):t[s]=r}return t}s.d(t,{A:()=>n})},77863:(e,t,s)=>{s.d(t,{G$:()=>w,K9:()=>R,wn:()=>_});var n=s(20102),r=s(45091),i=s(5428),a=s(78760);const o=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeBigInteger","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],u=["sqlTypeBigInt","sqlTypeBinary","sqlTypeBit","sqlTypeChar","sqlTypeDate","sqlTypeDecimal","sqlTypeDouble","sqlTypeFloat","sqlTypeGeometry","sqlTypeGUID","sqlTypeInteger","sqlTypeLongNVarchar","sqlTypeLongVarbinary","sqlTypeLongVarchar","sqlTypeNChar","sqlTypeNVarchar","sqlTypeOther","sqlTypeReal","sqlTypeSmallInt","sqlTypeSqlXml","sqlTypeTime","sqlTypeTimestamp","sqlTypeTimestamp2","sqlTypeTinyInt","sqlTypeVarbinary","sqlTypeVarchar"],l=["upperLeft","lowerLeft"];function c(e){return e>=o.length?null:o[e]}function p(e){return e>=u.length?null:u[e]}function f(e){return e>=l.length?null:l[e]}function h(e,t){return t>=e.geometryTypes.length?null:e.geometryTypes[t]}function d(e,t,s){const n=e.asUnsafe(),r=t.createPointGeometry(s);for(;n.next();)switch(n.tag()){case 3:{const e=n.getUInt32(),s=n.pos()+e;let i=0;for(;n.pos()<s;)t.addCoordinatePoint(r,n.getSInt64(),i++);break}default:n.skip()}return r}function g(e,t,s){const n=e.asUnsafe(),r=t.createGeometry(s),i=2+(s.hasZ?1:0)+(s.hasM?1:0);for(;n.next();)switch(n.tag()){case 2:{const e=n.getUInt32(),s=n.pos()+e;let i=0;for(;n.pos()<s;)t.addLength(r,n.getUInt32(),i++);break}case 3:{const e=n.getUInt32(),s=n.pos()+e;let a=0;for(t.allocateCoordinates(r);n.pos()<s;)t.addCoordinate(r,n.getSInt64(),a),a++,a===i&&(a=0);break}default:n.skip()}return r}function y(e){const t=e.asUnsafe(),s=new i.Z;let n="esriGeometryPoint";for(;t.next();)switch(t.tag()){case 2:{const e=t.getUInt32(),n=t.pos()+e;for(;t.pos()<n;)s.lengths.push(t.getUInt32());break}case 3:{const e=t.getUInt32(),n=t.pos()+e;for(;t.pos()<n;)s.coords.push(t.getSInt64());break}case 1:n=a.S[t.getEnum()];break;default:t.skip()}return{queryGeometry:s,queryGeometryType:n}}function m(e){const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:return t.getString();case 2:return t.getFloat();case 3:return t.getDouble();case 4:return t.getSInt32();case 5:return t.getUInt32();case 6:return t.getInt64();case 7:return t.getUInt64();case 8:return t.getSInt64();case 9:return t.getBool();default:return t.skip(),null}return null}function _(e){const t=e.asUnsafe(),s={type:c(0)};for(;t.next();)switch(t.tag()){case 1:s.name=t.getString();break;case 2:s.type=c(t.getEnum());break;case 3:s.alias=t.getString();break;case 4:s.sqlType=p(t.getEnum());break;case 5:default:t.skip();break;case 6:s.defaultValue=t.getString()}return s}function b(e){const t={},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.name=s.getString();break;case 2:t.isSystemMaintained=s.getBool();break;default:s.skip()}return t}function k(e,t,s,n){const r=t.createFeature(s);let i=0;for(;e.next();)switch(e.tag()){case 1:{const t=n[i++].name;r.attributes[t]=e.processMessage(m);break}case 2:r.geometry=e.processMessageWithArgs(g,t,s);break;case 4:r.centroid=e.processMessageWithArgs(d,t,s);break;default:e.skip()}return r}function x(e){const t=[1,1,1,1],s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t[0]=s.getDouble();break;case 2:t[1]=s.getDouble();break;case 4:t[2]=s.getDouble();break;case 3:t[3]=s.getDouble();break;default:s.skip()}return t}function S(e){const t=[0,0,0,0],s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t[0]=s.getDouble();break;case 2:t[1]=s.getDouble();break;case 4:t[2]=s.getDouble();break;case 3:t[3]=s.getDouble();break;default:s.skip()}return t}function w(e){const t={originPosition:f(0)},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.originPosition=f(s.getEnum());break;case 2:t.scale=s.processMessage(x);break;case 3:t.translate=s.processMessage(S);break;default:s.skip()}return t}function T(e){const t={},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.shapeAreaFieldName=s.getString();break;case 2:t.shapeLengthFieldName=s.getString();break;case 3:t.units=s.getString();break;default:s.skip()}return t}function q(e,t){const s=t.createSpatialReference();for(;e.next();)switch(e.tag()){case 1:s.wkid=e.getUInt32();break;case 5:s.wkt=e.getString();break;case 2:s.latestWkid=e.getUInt32();break;case 3:s.vcsWkid=e.getUInt32();break;case 4:s.latestVcsWkid=e.getUInt32();break;default:e.skip()}return s}function I(e,t){const s=t.createFeatureResult(),n=e.asUnsafe();s.geometryType=h(t,0);let r=!1;for(;n.next();)switch(n.tag()){case 1:s.objectIdFieldName=n.getString();break;case 3:s.globalIdFieldName=n.getString();break;case 4:s.geohashFieldName=n.getString();break;case 5:s.geometryProperties=n.processMessage(T);break;case 7:s.geometryType=h(t,n.getEnum());break;case 8:s.spatialReference=n.processMessageWithArgs(q,t);break;case 10:s.hasZ=n.getBool();break;case 11:s.hasM=n.getBool();break;case 12:s.transform=n.processMessage(w);break;case 9:s.exceededTransferLimit=n.getBool();break;case 13:t.addField(s,n.processMessage(_));break;case 15:r||(t.prepareFeatures(s),r=!0),t.addFeature(s,n.processMessageWithArgs(k,t,s,s.fields));break;case 2:s.uniqueIdField=n.processMessage(b);break;default:n.skip()}return t.finishFeatureResult(s),s}function F(e,t){const s={};let n=null;for(;e.next();)switch(e.tag()){case 4:n=e.processMessageWithArgs(y);break;case 1:s.featureResult=e.processMessageWithArgs(I,t);break;default:e.skip()}return null!=n&&s.featureResult&&t.addQueryGeometry(s,n),s}function R(e,t){try{const s=2,n=new r.Z(new Uint8Array(e),new DataView(e)),i={};for(;n.next();)n.tag()===s?i.queryResult=n.processMessageWithArgs(F,t):n.skip();return i}catch(e){throw new n.Z("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:e})}}},78760:(e,t,s)=>{s.d(t,{J:()=>l,S:()=>u});var n=s(67900),r=s(8744),i=s(70272),a=s(44876),o=s(5428);const u=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class l{constructor(e){this._options=e,this.geometryTypes=u,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new a.Z}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e?.features||!e.hasZ||!this._options.sourceSpatialReference||!e.spatialReference||(0,r.fS)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,n._R)(this._options.sourceSpatialReference)/(0,n._R)(e.spatialReference);if(1!==t)for(const s of e.features){if(!(0,i.S6)(s))continue;const e=s.geometry.coords;for(let s=2;s<e.length;s+=3)e[s]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new i.u_}createSpatialReference(){return{wkid:0}}createGeometry(){return new o.Z}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce(((e,t)=>e+t),0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new o.Z}}},45178:(e,t,s)=>{s.d(t,{C:()=>r});var n=s(77863);function r(e,t){const s=(0,n.K9)(e,t),r=s.queryResult.featureResult,i=s.queryResult.queryGeometry,a=s.queryResult.queryGeometryType;if(r&&r.features&&r.features.length&&r.objectIdFieldName){const e=r.objectIdFieldName;for(const t of r.features)t.attributes&&(t.objectId=t.attributes[e])}return r&&(r.queryGeometry=i,r.queryGeometryType=a),r}},34599:(e,t,s)=>{s.d(t,{Ev:()=>y,JT:()=>h,Vr:()=>_,hH:()=>m,n7:()=>g,qp:()=>d});var n=s(3172),r=s(17452),i=s(33955),a=s(16306),o=s(8744),u=s(76497),l=s(45178),c=s(28694);const p="Layer does not support extent calculation.";function f(e,t){const s=e.geometry,n=e.toJSON();delete n.compactGeometryEnabled,delete n.defaultSpatialReferenceEnabled;const r=n;let a,u,l;if(null!=s&&(u=s.spatialReference,l=(0,o.B9)(u),r.geometryType=(0,i.Ji)(s),r.geometry=function(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;const s=e.toJSON();return delete s.spatialReference,JSON.stringify(s)}(s,e.compactGeometryEnabled),r.inSR=l),n.groupByFieldsForStatistics&&(r.groupByFieldsForStatistics=n.groupByFieldsForStatistics.join(",")),n.objectIds&&(r.objectIds=n.objectIds.join(",")),n.orderByFields&&(r.orderByFields=n.orderByFields.join(",")),!n.outFields||!n.returnDistinctValues&&(t?.returnCountOnly||t?.returnExtentOnly||t?.returnIdsOnly)?delete r.outFields:n.outFields.includes("*")?r.outFields="*":r.outFields=n.outFields.join(","),n.outSR?(r.outSR=(0,o.B9)(n.outSR),a=e.outSpatialReference):s&&(n.returnGeometry||n.returnCentroid)&&(r.outSR=r.inSR,a=u),n.returnGeometry&&delete n.returnGeometry,n.outStatistics&&(r.outStatistics=JSON.stringify(n.outStatistics)),n.fullText&&(n.fullText.forEach((e=>{e.searchTerm&&(e.searchTerm=encodeURIComponent(e.searchTerm))})),r.fullText=JSON.stringify(n.fullText)),n.pixelSize&&(r.pixelSize=JSON.stringify(n.pixelSize)),n.quantizationParameters&&(e.defaultSpatialReferenceEnabled&&null!=u&&null!=e.quantizationParameters?.extent&&u.equals(e.quantizationParameters.extent.spatialReference)&&delete n.quantizationParameters.extent.spatialReference,r.quantizationParameters=JSON.stringify(n.quantizationParameters)),n.parameterValues&&(r.parameterValues=JSON.stringify(n.parameterValues)),n.rangeValues&&(r.rangeValues=JSON.stringify(n.rangeValues)),n.dynamicDataSource&&(r.layer=JSON.stringify({source:n.dynamicDataSource}),delete n.dynamicDataSource),n.timeExtent){const e=n.timeExtent,{start:t,end:s}=e;null==t&&null==s||(r.time=t===s?t:`${t??"null"},${s??"null"}`),delete n.timeExtent}return e.defaultSpatialReferenceEnabled&&null!=u&&null!=a&&u.equals(a)&&(r.defaultSR=r.inSR,delete r.inSR,delete r.outSR),r}async function h(e,t,s,n){const r=null!=t.timeExtent&&t.timeExtent.isEmpty?{data:{features:[]}}:await b(e,t,"json",n);return(0,c.p)(t,s,r.data),r}async function d(e,t,s,n){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:s.createFeatureResult()};const r=await g(e,t,n),i=r;return i.data=(0,l.C)(r.data,s),i}function g(e,t,s){return b(e,t,"pbf",s)}function y(e,t,s){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{objectIds:[]}}):b(e,t,"json",s,{returnIdsOnly:!0})}function m(e,t,s){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):b(e,t,"json",s,{returnIdsOnly:!0,returnCountOnly:!0})}async function _(e,t,s){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:{count:0,extent:null}};const n=await b(e,t,"json",s,{returnExtentOnly:!0,returnCountOnly:!0}),r=n.data;if(r.hasOwnProperty("extent"))return n;if(r.features)throw new Error(p);if(r.hasOwnProperty("count"))throw new Error(p);return n}async function b(e,t,s,i={},o={}){const l="string"==typeof e?(0,r.mN)(e):e,c=t.geometry?[t.geometry]:[],p=await(0,a.aX)(c,null,{signal:i.signal}),h=p?.[0];null!=h&&((t=t.clone()).geometry=h);const d=(0,u.A)({...l.query,f:s,...o,...f(t,o)});return(0,n.Z)((0,r.v_)(l.path,(g=o,null==t.formatOf3DObjects||g.returnCountOnly||g.returnExtentOnly||g.returnIdsOnly?"query":"query3d")),{...i,responseType:"pbf"===s?"array-buffer":"json",query:{...d,...i.query}});var g}},11282:(e,t,s)=>{s.d(t,{cv:()=>o,en:()=>a,lA:()=>i}),s(68773),s(40330);var n=s(22974),r=s(17452);function i(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function a(e){return"string"==typeof e?(0,r.mN)(e):(0,n.d9)(e)}function o(e,t,s){const n={};for(const r in e){if("declaredClass"===r)continue;const i=e[r];if(null!=i&&"function"!=typeof i)if(Array.isArray(i)){n[r]=[];for(let e=0;e<i.length;e++)n[r][e]=o(i[e])}else if("object"==typeof i)if(i.toJSON){const e=i.toJSON(s?.[r]);n[r]=t?e:JSON.stringify(e)}else n[r]=t?i:JSON.stringify(i);else n[r]=i}return n}s(71058)}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4599],{45091:(e,t,s)=>{s.d(t,{Z:()=>c});var n,r,i=s(80442),a=s(71143);(r=n||(n={}))[r.varint=0]="varint",r[r.fixed64=1]="fixed64",r[r.delimited=2]="delimited",r[r.fixed32=5]="fixed32",r[r.unknown=99]="unknown";const o=4294967296,u=new TextDecoder("utf-8"),l=(0,i.Z)("safari")||(0,i.Z)("ios")?6:(0,i.Z)("ff")?12:32;class c{constructor(e,t,s=0,r=(e?e.byteLength:0)){this._tag=0,this._dataType=n.unknown,this._init(e,t,s,r)}_init(e,t,s,n){this._data=e,this._dataView=t,this._pos=s,this._end=n}asUnsafe(){return this}clone(){return new c(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;return e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128?e:(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128?e:void 0))))}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();if(void 0!==e)return e>>>1^-(1&e)|0}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getUint32(t+4,!0)*o;return this._skip(8),s}getSFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getInt32(t+4,!0)*o;return this._skip(8),s}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,s=this._toString(this._data,t,t+e);return this._skip(e),s}getBytes(){const e=this._getLength(),t=this._pos,s=this._toBytes(this._data,t,t+e);return this._skip(e),s}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,s,n){const r=this.getMessage(),i=e(r,t,s,n);return r.release(),i}processMessage(e){const t=this.getMessage(),s=e(t);return t.release(),s}getMessage(){const e=this._getLength(),t=c.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){c.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case n.varint:this._decodeVarint();break;case n.fixed64:this._skip(8);break;case n.delimited:this._skip(this._getLength());break;case n.fixed32:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t=this._pos,s=0,n=0;if(this._end-t>=10)do{if(n=e[t++],s|=127&n,0==(128&n))break;if(n=e[t++],s|=(127&n)<<7,0==(128&n))break;if(n=e[t++],s|=(127&n)<<14,0==(128&n))break;if(n=e[t++],s|=(127&n)<<21,0==(128&n))break;if(n=e[t++],s+=268435456*(127&n),0==(128&n))break;if(n=e[t++],s+=34359738368*(127&n),0==(128&n))break;if(n=e[t++],s+=4398046511104*(127&n),0==(128&n))break;if(n=e[t++],s+=562949953421312*(127&n),0==(128&n))break;if(n=e[t++],s+=72057594037927940*(127&n),0==(128&n))break;if(n=e[t++],s+=0x8000000000000000*(127&n),0==(128&n))break;throw new Error("Varint too long!")}while(0);else{let r=1;for(;t!==this._end&&(n=e[t],0!=(128&n));)++t,s+=(127&n)*r,r*=128;if(t===this._end)throw new Error("Varint overrun!");++t,s+=n*r}return this._pos=t,s}_decodeSVarint(){const e=this._data;let t,s=0,n=0;const r=1&e[this._pos];if(n=e[this._pos++],s|=127&n,0==(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s|=(127&n)<<7,0==(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s|=(127&n)<<14,0==(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s|=(127&n)<<21,0==(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s+=268435456*(127&n),0==(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s+=34359738368*(127&n),0==(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s+=4398046511104*(127&n),0==(128&n))return r?-(s+1)/2:s/2;if(t=BigInt(s),n=e[this._pos++],t+=0x2000000000000n*BigInt(127&n),0==(128&n))return Number(r?-(t+1n)/2n:t/2n);if(n=e[this._pos++],t+=0x100000000000000n*BigInt(127&n),0==(128&n))return Number(r?-(t+1n)/2n:t/2n);if(n=e[this._pos++],t+=0x8000000000000000n*BigInt(127&n),0==(128&n))return Number(r?-(t+1n)/2n:t/2n);throw new Error("Varint too long!")}_getLength(){if(this._dataType!==n.delimited)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,s){if((s=Math.min(this._end,s))-t>l){const n=e.subarray(t,s);return u.decode(n)}let n="",r="";for(let i=t;i<s;++i){const t=e[i];128&t?r+="%"+t.toString(16):(n+=decodeURIComponent(r)+String.fromCharCode(t),r="")}return r.length&&(n+=decodeURIComponent(r)),n}_toBytes(e,t,s){return s=Math.min(this._end,s),new Uint8Array(e.buffer,t,s-t)}}c.pool=new a.Z(c,void 0,(e=>{e._data=null,e._dataView=null}))},16306:(e,t,s)=>{s.d(t,{aX:()=>S});var n=s(68773),r=s(20102),i=s(92604),a=s(38913),o=s(58901),u=s(73913),l=s(8744),c=s(40488),p=(s(66577),s(3172)),f=s(33955),h=s(11282),d=s(17452);async function g(e,t,s){const n="string"==typeof e?(0,d.mN)(e):e,r=t[0].spatialReference,i=(0,f.Ji)(t[0]),a={...s,query:{...n.query,f:"json",sr:(0,l.B9)(r),geometries:JSON.stringify((u=t,{geometryType:(0,f.Ji)(u[0]),geometries:u.map((e=>e.toJSON()))}))}},{data:o}=await(0,p.Z)(n.path+"/simplify",a);var u;return function(e,t,s){const n=(0,f.q9)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=s,t}))}(o.geometries,i,r)}const y=i.Z.getLogger("esri.geometry.support.normalizeUtils");function m(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function b(e,t,s){if(t){const t=function(e,t){if(!(e instanceof o.Z||e instanceof a.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y.error(e),new r.Z(e)}const s=(0,u.x3)(e),n=[];for(const e of s){const s=[];n.push(s),s.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const r=e[n][0],i=e[n][1],a=e[n+1][0],o=e[n+1][1],u=Math.sqrt((a-r)*(a-r)+(o-i)*(o-i)),l=(o-i)/u,c=(a-r)/u,p=u/t;if(p>1){for(let e=1;e<=p-1;e++){const n=e*t,a=c*n+r,o=l*n+i;s.push([a,o])}const e=(u+Math.floor(p-1)*t)/2,n=c*e+r,a=l*e+i;s.push([n,a])}s.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new a.Z({rings:n,spatialReference:e.spatialReference}):new o.Z({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,c.Sx)(t,!0)}return s&&(e=(0,u.Sy)(e,s)),e}function k(e,t,s){if(Array.isArray(e)){const n=e[0];if(n>t){const s=(0,u.XZ)(n,t);e[0]=n+s*(-2*t)}else if(n<s){const t=(0,u.XZ)(n,s);e[0]=n+t*(-2*s)}}else{const n=e.x;if(n>t){const s=(0,u.XZ)(n,t);e=e.clone().offset(s*(-2*t),0)}else if(n<s){const t=(0,u.XZ)(n,s);e=e.clone().offset(t*(-2*s),0)}}return e}function x(e,t){let s=-1;for(let n=0;n<t.cutIndexes.length;n++){const r=t.cutIndexes[n],i=t.geometries[n],a=(0,u.x3)(i);for(let e=0;e<a.length;e++){const t=a[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const n=t[e][0];s=n>s?n:s}s=Number(s.toFixed(9));const n=-360*(0,u.XZ)(s,180);for(let s=0;s<t.length;s++){const t=i.getPoint(e,s);i.setPoint(e,s,t.clone().offset(n,0))}return!0}}))}if(r===s){if(m(e))for(const t of(0,u.x3)(i))e[r]=e[r].addRing(t);else if(_(e))for(const t of(0,u.x3)(i))e[r]=e[r].addPath(t)}else s=r,e[r]=i}return e}async function S(e,t,s){if(!Array.isArray(e))return S([e],t);t&&"string"!=typeof t&&y.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const r="string"==typeof t?t:t?.url??n.default.geometryServiceUrl;let i,d,m,_,w,T,q,F,I=0;const R=[],U=[];for(const t of e)if(null!=t)if(i||(i=t.spatialReference,d=(0,l.C5)(i),m=i.isWebMercator,T=m?102100:4326,_=u.UZ[T].maxX,w=u.UZ[T].minX,q=u.UZ[T].plus180Line,F=u.UZ[T].minus180Line),d)if("mesh"===t.type)U.push(t);else if("point"===t.type)U.push(k(t.clone(),_,w));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>k(e,_,w))),U.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,d);U.push(e.rings?new a.Z(e):e)}else if(t.extent){const e=t.extent,s=(0,u.XZ)(e.xmin,w)*(2*_);let n=0===s?t.clone():(0,u.Sy)(t.clone(),s);e.offset(s,0),e.intersects(q)&&e.xmax!==_?(I=e.xmax>I?e.xmax:I,n=b(n,m),R.push(n),U.push("cut")):e.intersects(F)&&e.xmin!==w?(I=e.xmax*(2*_)>I?e.xmax*(2*_):I,n=b(n,m,360),R.push(n),U.push("cut")):U.push(n)}else U.push(t.clone());else U.push(t);else U.push(t);let Z=(0,u.XZ)(I,_),E=-90;const O=Z,V=new o.Z;for(;Z>0;){const e=360*Z-180;V.addPath([[e,E],[e,-1*E]]),E*=-1,Z--}if(R.length>0&&O>0){const t=x(R,await async function(e,t,s,n){const r=(0,h.en)(e),i=t[0].spatialReference,a={...n,responseType:"json",query:{...r.query,f:"json",sr:(0,l.B9)(i),target:JSON.stringify({geometryType:(0,f.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},o=await(0,p.Z)(r.path+"/cut",a),{cutIndexes:u,geometries:c=[]}=o.data;return{cutIndexes:u,geometries:c.map((e=>{const t=(0,f.im)(e);return t.spatialReference=i,t}))}}(r,R,V,s)),n=[],i=[];for(let s=0;s<U.length;s++){const r=U[s];if("cut"!==r)i.push(r);else{const r=t.shift(),a=e[s];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&r.rings.length>=a.rings.length?(n.push(r),i.push("simplify")):i.push(m?(0,c.$)(r):r)}}if(!n.length)return i;const a=await g(r,n,s),o=[];for(let e=0;e<i.length;e++){const t=i[e];"simplify"!==t?o.push(t):o.push(m?(0,c.$)(a.shift()):a.shift())}return o}const N=[];for(let e=0;e<U.length;e++){const t=U[e];if("cut"!==t)N.push(t);else{const e=R.shift();N.push(!0===m?(0,c.$)(e):e)}}return N}},73913:(e,t,s)=>{s.d(t,{Sy:()=>u,UZ:()=>a,XZ:()=>o,x3:()=>l});var n=s(58901),r=s(82971),i=s(33955);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.Z.WebMercator}),minus180Line:new n.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.Z({paths:[[[180,-180],[180,180]]],spatialReference:r.Z.WGS84}),minus180Line:new n.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:r.Z.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){const s=l(e);for(const e of s)for(const s of e)s[0]+=t;return e}function l(e){return(0,i.oU)(e)?e.rings:e.paths}},76497:(e,t,s)=>{function n(e){const t={};for(const s in e){if("declaredClass"===s)continue;const r=e[s];if(null!=r&&"function"!=typeof r)if(Array.isArray(r)){t[s]=[];for(let e=0;e<r.length;e++)t[s][e]=n(r[e])}else"object"==typeof r?r.toJSON&&(t[s]=JSON.stringify(r)):t[s]=r}return t}s.d(t,{A:()=>n})},77863:(e,t,s)=>{s.d(t,{G$:()=>w,K9:()=>R,wn:()=>_});var n=s(20102),r=s(45091),i=s(5428),a=s(78760);const o=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeBigInteger","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],u=["sqlTypeBigInt","sqlTypeBinary","sqlTypeBit","sqlTypeChar","sqlTypeDate","sqlTypeDecimal","sqlTypeDouble","sqlTypeFloat","sqlTypeGeometry","sqlTypeGUID","sqlTypeInteger","sqlTypeLongNVarchar","sqlTypeLongVarbinary","sqlTypeLongVarchar","sqlTypeNChar","sqlTypeNVarchar","sqlTypeOther","sqlTypeReal","sqlTypeSmallInt","sqlTypeSqlXml","sqlTypeTime","sqlTypeTimestamp","sqlTypeTimestamp2","sqlTypeTinyInt","sqlTypeVarbinary","sqlTypeVarchar"],l=["upperLeft","lowerLeft"];function c(e){return e>=o.length?null:o[e]}function p(e){return e>=u.length?null:u[e]}function f(e){return e>=l.length?null:l[e]}function h(e,t){return t>=e.geometryTypes.length?null:e.geometryTypes[t]}function d(e,t,s){const n=e.asUnsafe(),r=t.createPointGeometry(s);for(;n.next();)switch(n.tag()){case 3:{const e=n.getUInt32(),s=n.pos()+e;let i=0;for(;n.pos()<s;)t.addCoordinatePoint(r,n.getSInt64(),i++);break}default:n.skip()}return r}function g(e,t,s){const n=e.asUnsafe(),r=t.createGeometry(s),i=2+(s.hasZ?1:0)+(s.hasM?1:0);for(;n.next();)switch(n.tag()){case 2:{const e=n.getUInt32(),s=n.pos()+e;let i=0;for(;n.pos()<s;)t.addLength(r,n.getUInt32(),i++);break}case 3:{const e=n.getUInt32(),s=n.pos()+e;let a=0;for(t.allocateCoordinates(r);n.pos()<s;)t.addCoordinate(r,n.getSInt64(),a),a++,a===i&&(a=0);break}default:n.skip()}return r}function y(e){const t=e.asUnsafe(),s=new i.Z;let n="esriGeometryPoint";for(;t.next();)switch(t.tag()){case 2:{const e=t.getUInt32(),n=t.pos()+e;for(;t.pos()<n;)s.lengths.push(t.getUInt32());break}case 3:{const e=t.getUInt32(),n=t.pos()+e;for(;t.pos()<n;)s.coords.push(t.getSInt64());break}case 1:n=a.S[t.getEnum()];break;default:t.skip()}return{queryGeometry:s,queryGeometryType:n}}function m(e){const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:return t.getString();case 2:return t.getFloat();case 3:return t.getDouble();case 4:return t.getSInt32();case 5:return t.getUInt32();case 6:return t.getInt64();case 7:return t.getUInt64();case 8:return t.getSInt64();case 9:return t.getBool();default:return t.skip(),null}return null}function _(e){const t=e.asUnsafe(),s={type:c(0)};for(;t.next();)switch(t.tag()){case 1:s.name=t.getString();break;case 2:s.type=c(t.getEnum());break;case 3:s.alias=t.getString();break;case 4:s.sqlType=p(t.getEnum());break;case 5:default:t.skip();break;case 6:s.defaultValue=t.getString()}return s}function b(e){const t={},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.name=s.getString();break;case 2:t.isSystemMaintained=s.getBool();break;default:s.skip()}return t}function k(e,t,s,n){const r=t.createFeature(s);let i=0;for(;e.next();)switch(e.tag()){case 1:{const t=n[i++].name;r.attributes[t]=e.processMessage(m);break}case 2:r.geometry=e.processMessageWithArgs(g,t,s);break;case 4:r.centroid=e.processMessageWithArgs(d,t,s);break;default:e.skip()}return r}function x(e){const t=[1,1,1,1],s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t[0]=s.getDouble();break;case 2:t[1]=s.getDouble();break;case 4:t[2]=s.getDouble();break;case 3:t[3]=s.getDouble();break;default:s.skip()}return t}function S(e){const t=[0,0,0,0],s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t[0]=s.getDouble();break;case 2:t[1]=s.getDouble();break;case 4:t[2]=s.getDouble();break;case 3:t[3]=s.getDouble();break;default:s.skip()}return t}function w(e){const t={originPosition:f(0)},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.originPosition=f(s.getEnum());break;case 2:t.scale=s.processMessage(x);break;case 3:t.translate=s.processMessage(S);break;default:s.skip()}return t}function T(e){const t={},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.shapeAreaFieldName=s.getString();break;case 2:t.shapeLengthFieldName=s.getString();break;case 3:t.units=s.getString();break;default:s.skip()}return t}function q(e,t){const s=t.createSpatialReference();for(;e.next();)switch(e.tag()){case 1:s.wkid=e.getUInt32();break;case 5:s.wkt=e.getString();break;case 2:s.latestWkid=e.getUInt32();break;case 3:s.vcsWkid=e.getUInt32();break;case 4:s.latestVcsWkid=e.getUInt32();break;default:e.skip()}return s}function F(e,t){const s=t.createFeatureResult(),n=e.asUnsafe();s.geometryType=h(t,0);let r=!1;for(;n.next();)switch(n.tag()){case 1:s.objectIdFieldName=n.getString();break;case 3:s.globalIdFieldName=n.getString();break;case 4:s.geohashFieldName=n.getString();break;case 5:s.geometryProperties=n.processMessage(T);break;case 7:s.geometryType=h(t,n.getEnum());break;case 8:s.spatialReference=n.processMessageWithArgs(q,t);break;case 10:s.hasZ=n.getBool();break;case 11:s.hasM=n.getBool();break;case 12:s.transform=n.processMessage(w);break;case 9:s.exceededTransferLimit=n.getBool();break;case 13:t.addField(s,n.processMessage(_));break;case 15:r||(t.prepareFeatures(s),r=!0),t.addFeature(s,n.processMessageWithArgs(k,t,s,s.fields));break;case 2:s.uniqueIdField=n.processMessage(b);break;default:n.skip()}return t.finishFeatureResult(s),s}function I(e,t){const s={};let n=null;for(;e.next();)switch(e.tag()){case 4:n=e.processMessageWithArgs(y);break;case 1:s.featureResult=e.processMessageWithArgs(F,t);break;default:e.skip()}return null!=n&&s.featureResult&&t.addQueryGeometry(s,n),s}function R(e,t){try{const s=2,n=new r.Z(new Uint8Array(e),new DataView(e)),i={};for(;n.next();)n.tag()===s?i.queryResult=n.processMessageWithArgs(I,t):n.skip();return i}catch(e){throw new n.Z("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:e})}}},78760:(e,t,s)=>{s.d(t,{J:()=>l,S:()=>u});var n=s(67900),r=s(8744),i=s(70272),a=s(44876),o=s(5428);const u=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class l{constructor(e){this._options=e,this.geometryTypes=u,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new a.Z}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e?.features||!e.hasZ||!this._options.sourceSpatialReference||!e.spatialReference||(0,r.fS)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,n._R)(this._options.sourceSpatialReference)/(0,n._R)(e.spatialReference);if(1!==t)for(const s of e.features){if(!(0,i.S6)(s))continue;const e=s.geometry.coords;for(let s=2;s<e.length;s+=3)e[s]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new i.u_}createSpatialReference(){return{wkid:0}}createGeometry(){return new o.Z}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce(((e,t)=>e+t),0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new o.Z}}},45178:(e,t,s)=>{s.d(t,{C:()=>r});var n=s(77863);function r(e,t){const s=(0,n.K9)(e,t),r=s.queryResult.featureResult,i=s.queryResult.queryGeometry,a=s.queryResult.queryGeometryType;if(r&&r.features&&r.features.length&&r.objectIdFieldName){const e=r.objectIdFieldName;for(const t of r.features)t.attributes&&(t.objectId=t.attributes[e])}return r&&(r.queryGeometry=i,r.queryGeometryType=a),r}},34599:(e,t,s)=>{s.d(t,{Ev:()=>y,JT:()=>h,Vr:()=>_,hH:()=>m,n7:()=>g,qp:()=>d});var n=s(3172),r=s(17452),i=s(33955),a=s(16306),o=s(8744),u=s(76497),l=s(45178),c=s(28694);const p="Layer does not support extent calculation.";function f(e,t){const s=e.geometry,n=e.toJSON();delete n.compactGeometryEnabled,delete n.defaultSpatialReferenceEnabled;const r=n;let a,u,l;if(null!=s&&(u=s.spatialReference,l=(0,o.B9)(u),r.geometryType=(0,i.Ji)(s),r.geometry=function(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;const s=e.toJSON();return delete s.spatialReference,JSON.stringify(s)}(s,e.compactGeometryEnabled),r.inSR=l),n.groupByFieldsForStatistics&&(r.groupByFieldsForStatistics=n.groupByFieldsForStatistics.join(",")),n.objectIds&&(r.objectIds=n.objectIds.join(",")),n.orderByFields&&(r.orderByFields=n.orderByFields.join(",")),!n.outFields||!n.returnDistinctValues&&(t?.returnCountOnly||t?.returnExtentOnly||t?.returnIdsOnly)?delete r.outFields:n.outFields.includes("*")?r.outFields="*":r.outFields=n.outFields.join(","),n.outSR?(r.outSR=(0,o.B9)(n.outSR),a=e.outSpatialReference):s&&(n.returnGeometry||n.returnCentroid)&&(r.outSR=r.inSR,a=u),n.returnGeometry&&delete n.returnGeometry,n.outStatistics&&(r.outStatistics=JSON.stringify(n.outStatistics)),n.fullText&&(r.fullText=JSON.stringify(n.fullText)),n.pixelSize&&(r.pixelSize=JSON.stringify(n.pixelSize)),n.quantizationParameters&&(e.defaultSpatialReferenceEnabled&&null!=u&&null!=e.quantizationParameters?.extent&&u.equals(e.quantizationParameters.extent.spatialReference)&&delete n.quantizationParameters.extent.spatialReference,r.quantizationParameters=JSON.stringify(n.quantizationParameters)),n.parameterValues&&(r.parameterValues=JSON.stringify(n.parameterValues)),n.rangeValues&&(r.rangeValues=JSON.stringify(n.rangeValues)),n.dynamicDataSource&&(r.layer=JSON.stringify({source:n.dynamicDataSource}),delete n.dynamicDataSource),n.timeExtent){const e=n.timeExtent,{start:t,end:s}=e;null==t&&null==s||(r.time=t===s?t:`${t??"null"},${s??"null"}`),delete n.timeExtent}return e.defaultSpatialReferenceEnabled&&null!=u&&null!=a&&u.equals(a)&&(r.defaultSR=r.inSR,delete r.inSR,delete r.outSR),r}async function h(e,t,s,n){const r=null!=t.timeExtent&&t.timeExtent.isEmpty?{data:{features:[]}}:await b(e,t,"json",n);return(0,c.p)(t,s,r.data),r}async function d(e,t,s,n){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:s.createFeatureResult()};const r=await g(e,t,n),i=r;return i.data=(0,l.C)(r.data,s),i}function g(e,t,s){return b(e,t,"pbf",s)}function y(e,t,s){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{objectIds:[]}}):b(e,t,"json",s,{returnIdsOnly:!0})}function m(e,t,s){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):b(e,t,"json",s,{returnIdsOnly:!0,returnCountOnly:!0})}async function _(e,t,s){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:{count:0,extent:null}};const n=await b(e,t,"json",s,{returnExtentOnly:!0,returnCountOnly:!0}),r=n.data;if(r.hasOwnProperty("extent"))return n;if(r.features)throw new Error(p);if(r.hasOwnProperty("count"))throw new Error(p);return n}async function b(e,t,s,i={},o={}){const l="string"==typeof e?(0,r.mN)(e):e,c=t.geometry?[t.geometry]:[],p=await(0,a.aX)(c,null,{signal:i.signal}),h=p?.[0];null!=h&&((t=t.clone()).geometry=h);const d=(0,u.A)({...l.query,f:s,...o,...f(t,o)});return(0,n.Z)((0,r.v_)(l.path,(g=o,null==t.formatOf3DObjects||g.returnCountOnly||g.returnExtentOnly||g.returnIdsOnly?"query":"query3d")),{...i,responseType:"pbf"===s?"array-buffer":"json",query:{...d,...i.query}});var g}},11282:(e,t,s)=>{s.d(t,{cv:()=>o,en:()=>a,lA:()=>i}),s(68773),s(40330);var n=s(22974),r=s(17452);function i(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function a(e){return"string"==typeof e?(0,r.mN)(e):(0,n.d9)(e)}function o(e,t,s){const n={};for(const r in e){if("declaredClass"===r)continue;const i=e[r];if(null!=i&&"function"!=typeof i)if(Array.isArray(i)){n[r]=[];for(let e=0;e<i.length;e++)n[r][e]=o(i[e])}else if("object"==typeof i)if(i.toJSON){const e=i.toJSON(s?.[r]);n[r]=t?e:JSON.stringify(e)}else n[r]=t?i:JSON.stringify(i);else n[r]=i}return n}s(71058)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6459],{21787:(t,n,r)=>{r.d(n,{a:()=>c,d:()=>s,f:()=>o,i:()=>h,m:()=>u,n:()=>l,s:()=>a,t:()=>i});var e=r(46851);function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function a(t,n,r,e,o,a,i,s,c,u){return t[0]=n,t[1]=r,t[2]=e,t[3]=o,t[4]=a,t[5]=i,t[6]=s,t[7]=c,t[8]=u,t}function i(t,n){if(t===n){const r=n[1],e=n[2],o=n[5];t[1]=n[3],t[2]=n[6],t[3]=r,t[5]=n[7],t[6]=e,t[7]=o}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t}function s(t,n){const r=n[0],e=n[1],o=n[2],a=n[3],i=n[4],s=n[5],c=n[6],u=n[7],l=n[8],f=l*i-s*u,h=-l*a+s*c,p=u*a-i*c;let M=r*f+e*h+o*p;return M?(M=1/M,t[0]=f*M,t[1]=(-l*e+o*u)*M,t[2]=(s*e-o*i)*M,t[3]=h*M,t[4]=(l*r-o*c)*M,t[5]=(-s*r+o*a)*M,t[6]=p*M,t[7]=(-u*r+e*c)*M,t[8]=(i*r-e*a)*M,t):null}function c(t,n){const r=n[0],e=n[1],o=n[2],a=n[3],i=n[4],s=n[5],c=n[6],u=n[7],l=n[8];return t[0]=i*l-s*u,t[1]=o*u-e*l,t[2]=e*s-o*i,t[3]=s*c-a*l,t[4]=r*l-o*c,t[5]=o*a-r*s,t[6]=a*u-i*c,t[7]=e*c-r*u,t[8]=r*i-e*a,t}function u(t,n,r){const e=n[0],o=n[1],a=n[2],i=n[3],s=n[4],c=n[5],u=n[6],l=n[7],f=n[8],h=r[0],p=r[1],M=r[2],g=r[3],m=r[4],y=r[5],b=r[6],A=r[7],d=r[8];return t[0]=h*e+p*i+M*u,t[1]=h*o+p*s+M*l,t[2]=h*a+p*c+M*f,t[3]=g*e+m*i+y*u,t[4]=g*o+m*s+y*l,t[5]=g*a+m*c+y*f,t[6]=b*e+A*i+d*u,t[7]=b*o+A*s+d*l,t[8]=b*a+A*c+d*f,t}function l(t,n){const r=n[0],e=n[1],o=n[2],a=n[3],i=n[4],s=n[5],c=n[6],u=n[7],l=n[8],f=n[9],h=n[10],p=n[11],M=n[12],g=n[13],m=n[14],y=n[15],b=r*s-e*i,A=r*c-o*i,d=r*u-a*i,P=e*c-o*s,E=e*u-a*s,_=o*u-a*c,C=l*g-f*M,T=l*m-h*M,F=l*y-p*M,x=f*m-h*g,R=f*y-p*g,v=h*y-p*m;let j=b*v-A*R+d*x+P*F-E*T+_*C;return j?(j=1/j,t[0]=(s*v-c*R+u*x)*j,t[1]=(c*F-i*v-u*T)*j,t[2]=(i*R-s*F+u*C)*j,t[3]=(o*R-e*v-a*x)*j,t[4]=(r*v-o*F+a*T)*j,t[5]=(e*F-r*R-a*C)*j,t[6]=(g*_-m*E+y*P)*j,t[7]=(m*d-M*_-y*A)*j,t[8]=(M*E-g*d+y*b)*j,t):null}function f(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t[3]=n[3]-r[3],t[4]=n[4]-r[4],t[5]=n[5]-r[5],t[6]=n[6]-r[6],t[7]=n[7]-r[7],t[8]=n[8]-r[8],t}function h(t){const n=(0,e.g)(),r=t[0],o=t[1],a=t[2],i=t[3],s=t[4],c=t[5],u=t[6],l=t[7],f=t[8];return Math.abs(1-(r*r+i*i+u*u))<=n&&Math.abs(1-(o*o+s*s+l*l))<=n&&Math.abs(1-(a*a+c*c+f*f))<=n}const p=u,M=f;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t[3]=n[3]+r[3],t[4]=n[4]+r[4],t[5]=n[5]+r[5],t[6]=n[6]+r[6],t[7]=n[7]+r[7],t[8]=n[8]+r[8],t},adjoint:c,copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},determinant:function(t){const n=t[0],r=t[1],e=t[2],o=t[3],a=t[4],i=t[5],s=t[6],c=t[7],u=t[8];return n*(u*a-i*c)+r*(-u*o+i*s)+e*(c*o-a*s)},equals:function(t,n){const r=t[0],o=t[1],a=t[2],i=t[3],s=t[4],c=t[5],u=t[6],l=t[7],f=t[8],h=n[0],p=n[1],M=n[2],g=n[3],m=n[4],y=n[5],b=n[6],A=n[7],d=n[8],P=(0,e.g)();return Math.abs(r-h)<=P*Math.max(1,Math.abs(r),Math.abs(h))&&Math.abs(o-p)<=P*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(a-M)<=P*Math.max(1,Math.abs(a),Math.abs(M))&&Math.abs(i-g)<=P*Math.max(1,Math.abs(i),Math.abs(g))&&Math.abs(s-m)<=P*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(c-y)<=P*Math.max(1,Math.abs(c),Math.abs(y))&&Math.abs(u-b)<=P*Math.max(1,Math.abs(u),Math.abs(b))&&Math.abs(l-A)<=P*Math.max(1,Math.abs(l),Math.abs(A))&&Math.abs(f-d)<=P*Math.max(1,Math.abs(f),Math.abs(d))},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},fromMat4:o,fromQuat:function(t,n){const r=n[0],e=n[1],o=n[2],a=n[3],i=r+r,s=e+e,c=o+o,u=r*i,l=e*i,f=e*s,h=o*i,p=o*s,M=o*c,g=a*i,m=a*s,y=a*c;return t[0]=1-f-M,t[3]=l-y,t[6]=h+m,t[1]=l+y,t[4]=1-u-M,t[7]=p-g,t[2]=h-m,t[5]=p+g,t[8]=1-u-f,t},fromRotation:function(t,n){const r=Math.sin(n),e=Math.cos(n);return t[0]=e,t[1]=r,t[2]=0,t[3]=-r,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:s,isOrthoNormal:h,mul:p,multiply:u,multiplyScalar:function(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=n[7]*r,t[8]=n[8]*r,t},multiplyScalarAndAdd:function(t,n,r,e){return t[0]=n[0]+r[0]*e,t[1]=n[1]+r[1]*e,t[2]=n[2]+r[2]*e,t[3]=n[3]+r[3]*e,t[4]=n[4]+r[4]*e,t[5]=n[5]+r[5]*e,t[6]=n[6]+r[6]*e,t[7]=n[7]+r[7]*e,t[8]=n[8]+r[8]*e,t},normalFromMat4:l,normalFromMat4Legacy:function(t,n){const r=n[0],e=n[1],o=n[2],a=n[4],i=n[5],s=n[6],c=n[8],u=n[9],l=n[10],f=l*i-s*u,h=-l*a+s*c,p=u*a-i*c,M=r*f+e*h+o*p;if(!M)return null;const g=1/M;return t[0]=f*g,t[1]=(-l*e+o*u)*g,t[2]=(s*e-o*i)*g,t[3]=h*g,t[4]=(l*r-o*c)*g,t[5]=(-s*r+o*a)*g,t[6]=p*g,t[7]=(-u*r+e*c)*g,t[8]=(i*r-e*a)*g,t},projection:function(t,n,r){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/r,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,n,r){const e=n[0],o=n[1],a=n[2],i=n[3],s=n[4],c=n[5],u=n[6],l=n[7],f=n[8],h=Math.sin(r),p=Math.cos(r);return t[0]=p*e+h*i,t[1]=p*o+h*s,t[2]=p*a+h*c,t[3]=p*i-h*e,t[4]=p*s-h*o,t[5]=p*c-h*a,t[6]=u,t[7]=l,t[8]=f,t},scale:function(t,n,r){const e=r[0],o=r[1],a=r[2];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t[6]=a*n[6],t[7]=a*n[7],t[8]=a*n[8],t},scaleByVec2:function(t,n,r){const e=r[0],o=r[1];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t},set:a,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:M,subtract:f,translate:function(t,n,r){const e=n[0],o=n[1],a=n[2],i=n[3],s=n[4],c=n[5],u=n[6],l=n[7],f=n[8],h=r[0],p=r[1];return t[0]=e,t[1]=o,t[2]=a,t[3]=i,t[4]=s,t[5]=c,t[6]=h*e+p*i+u,t[7]=h*o+p*s+l,t[8]=h*a+p*c+f,t},transpose:i},Symbol.toStringTag,{value:"Module"}))},51305:(t,n,r)=>{r.d(n,{a:()=>p,c:()=>m,g:()=>l,j:()=>R,k:()=>g,m:()=>f,s:()=>u});var e=r(46521),o=r(94961),a=r(65617),i=r(46851),s=r(17896),c=r(98766);function u(t,n,r){r*=.5;const e=Math.sin(r);return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=Math.cos(r),t}function l(t,n){const r=2*Math.acos(n[3]),e=Math.sin(r/2);return e>(0,i.g)()?(t[0]=n[0]/e,t[1]=n[1]/e,t[2]=n[2]/e):(t[0]=1,t[1]=0,t[2]=0),r}function f(t,n,r){const e=n[0],o=n[1],a=n[2],i=n[3],s=r[0],c=r[1],u=r[2],l=r[3];return t[0]=e*l+i*s+o*u-a*c,t[1]=o*l+i*c+a*s-e*u,t[2]=a*l+i*u+e*c-o*s,t[3]=i*l-e*s-o*c-a*u,t}function h(t,n,r,e){const o=n[0],a=n[1],s=n[2],c=n[3];let u,l,f,h,p,M=r[0],g=r[1],m=r[2],y=r[3];return l=o*M+a*g+s*m+c*y,l<0&&(l=-l,M=-M,g=-g,m=-m,y=-y),1-l>(0,i.g)()?(u=Math.acos(l),f=Math.sin(u),h=Math.sin((1-e)*u)/f,p=Math.sin(e*u)/f):(h=1-e,p=e),t[0]=h*o+p*M,t[1]=h*a+p*g,t[2]=h*s+p*m,t[3]=h*c+p*y,t}function p(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t}function M(t,n){const r=n[0]+n[4]+n[8];let e;if(r>0)e=Math.sqrt(r+1),t[3]=.5*e,e=.5/e,t[0]=(n[5]-n[7])*e,t[1]=(n[6]-n[2])*e,t[2]=(n[1]-n[3])*e;else{let r=0;n[4]>n[0]&&(r=1),n[8]>n[3*r+r]&&(r=2);const o=(r+1)%3,a=(r+2)%3;e=Math.sqrt(n[3*r+r]-n[3*o+o]-n[3*a+a]+1),t[r]=.5*e,e=.5/e,t[3]=(n[3*o+a]-n[3*a+o])*e,t[o]=(n[3*o+r]+n[3*r+o])*e,t[a]=(n[3*a+r]+n[3*r+a])*e}return t}function g(t,n,r,e){const o=.5*Math.PI/180;n*=o,r*=o,e*=o;const a=Math.sin(n),i=Math.cos(n),s=Math.sin(r),c=Math.cos(r),u=Math.sin(e),l=Math.cos(e);return t[0]=a*c*l-i*s*u,t[1]=i*s*l+a*c*u,t[2]=i*c*u-a*s*l,t[3]=i*c*l+a*s*u,t}const m=c.c,y=c.s,b=c.a,A=f,d=c.b,P=c.d,E=c.l,_=c.f,C=_,T=c.g,F=T,x=c.n,R=c.h,v=c.e,j=(0,a.c)(),w=(0,a.f)(1,0,0),S=(0,a.f)(0,1,0),O=(0,o.a)(),L=(0,o.a)(),Z=(0,e.a)();Object.freeze(Object.defineProperty({__proto__:null,add:b,calculateW:function(t,n){const r=n[0],e=n[1],o=n[2];return t[0]=r,t[1]=e,t[2]=o,t[3]=Math.sqrt(Math.abs(1-r*r-e*e-o*o)),t},conjugate:p,copy:m,dot:P,equals:v,exactEquals:R,fromEuler:g,fromMat3:M,getAxisAngle:l,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,n){const r=n[0],e=n[1],o=n[2],a=n[3],i=r*r+e*e+o*o+a*a,s=i?1/i:0;return t[0]=-r*s,t[1]=-e*s,t[2]=-o*s,t[3]=a*s,t},len:C,length:_,lerp:E,mul:A,multiply:f,normalize:x,random:function(t){const n=i.R,r=n(),e=n(),o=n(),a=Math.sqrt(1-r),s=Math.sqrt(r);return t[0]=a*Math.sin(2*Math.PI*e),t[1]=a*Math.cos(2*Math.PI*e),t[2]=s*Math.sin(2*Math.PI*o),t[3]=s*Math.cos(2*Math.PI*o),t},rotateX:function(t,n,r){r*=.5;const e=n[0],o=n[1],a=n[2],i=n[3],s=Math.sin(r),c=Math.cos(r);return t[0]=e*c+i*s,t[1]=o*c+a*s,t[2]=a*c-o*s,t[3]=i*c-e*s,t},rotateY:function(t,n,r){r*=.5;const e=n[0],o=n[1],a=n[2],i=n[3],s=Math.sin(r),c=Math.cos(r);return t[0]=e*c-a*s,t[1]=o*c+i*s,t[2]=a*c+e*s,t[3]=i*c-o*s,t},rotateZ:function(t,n,r){r*=.5;const e=n[0],o=n[1],a=n[2],i=n[3],s=Math.sin(r),c=Math.cos(r);return t[0]=e*c+o*s,t[1]=o*c-e*s,t[2]=a*c+i*s,t[3]=i*c-a*s,t},rotationTo:function(t,n,r){const e=(0,s.j)(n,r);return e<-.999999?((0,s.b)(j,w,n),(0,s.k)(j)<1e-6&&(0,s.b)(j,S,n),(0,s.n)(j,j),u(t,j,Math.PI),t):e>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,s.b)(j,n,r),t[0]=j[0],t[1]=j[1],t[2]=j[2],t[3]=1+e,x(t,t))},scale:d,set:y,setAxes:function(t,n,r,e){const o=Z;return o[0]=r[0],o[3]=r[1],o[6]=r[2],o[1]=e[0],o[4]=e[1],o[7]=e[2],o[2]=-n[0],o[5]=-n[1],o[8]=-n[2],x(t,M(t,o))},setAxisAngle:u,slerp:h,sqlerp:function(t,n,r,e,o,a){return h(O,n,o,a),h(L,r,e,a),h(t,O,L,2*a*(1-a)),t},sqrLen:F,squaredLength:T,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},83932:(t,n,r)=>{r.d(n,{B:()=>u});var e=r(22021),o=r(52138),a=r(65617);function i(t,n,r){const e=Math.sin(t),o=Math.cos(t),a=Math.sin(n),i=Math.cos(n),s=r;return s[0]=-e,s[4]=-a*o,s[8]=i*o,s[12]=0,s[1]=o,s[5]=-a*e,s[9]=i*e,s[13]=0,s[2]=0,s[6]=i,s[10]=a,s[14]=0,s[3]=0,s[7]=0,s[11]=0,s[15]=1,s}var s=r(29166),c=r(8744);function u(t,n,r,e){if(null==t||null==e)return!1;const a=(0,s.eT)(t,s.Jz),u=(0,s.eT)(e,s.sp);if(a===u&&!l(u)&&(a!==s.Ej.UNKNOWN||(0,c.fS)(t,e)))return(0,o.d)(r,n),!0;if(l(u)){const t=s.rf[a][s.Ej.LON_LAT],e=s.rf[s.Ej.LON_LAT][u];return null!=t&&null!=e&&(t(n,0,h,0),e(h,0,p,0),i(f*h[0],f*h[1],r),r[12]=p[0],r[13]=p[1],r[14]=p[2],!0)}if((u===s.Ej.WEB_MERCATOR||u===s.Ej.PLATE_CARREE)&&(a===s.Ej.WGS84||a===s.Ej.CGCS2000&&u===s.Ej.PLATE_CARREE||a===s.Ej.SPHERICAL_ECEF||a===s.Ej.WEB_MERCATOR)){const t=s.rf[a][s.Ej.LON_LAT],e=s.rf[s.Ej.LON_LAT][u];return null!=t&&null!=e&&(t(n,0,h,0),e(h,0,p,0),a===s.Ej.SPHERICAL_ECEF?function(t,n,r){i(t,n,r),(0,o.t)(r,r)}(f*h[0],f*h[1],r):(0,o.g)(r),r[12]=p[0],r[13]=p[1],r[14]=p[2],!0)}return!1}function l(t){return t===s.Ej.SPHERICAL_ECEF||t===s.Ej.SPHERICAL_MARS_PCPF||t===s.Ej.SPHERICAL_MOON_PCPF}const f=(0,e.Vl)(1),h=(0,a.c)(),p=(0,a.c)()},58995:(t,n,r)=>{r.d(n,{rS:()=>u});var e=r(2109),o=r(82971),a=r(8744);const i=new o.Z(e.kU),s=new o.Z(e.JL),c=new o.Z(e.mM);function u(t){return t&&((0,a.BZ)(t)||(0,a.fS)(t,s))?s:t&&((0,a.V2)(t)||(0,a.fS)(t,c))?c:i}new o.Z(e.pn)},50567:(t,n,r)=>{r.d(n,{Z:()=>u});var e=r(43697),o=r(2368),a=r(96674),i=(r(92604),r(75215),r(67676),r(80442),r(20102),r(36030)),s=r(52011);let c=class extends((0,o.J)(a.wq)){constructor(){super({}),this.type="georeferenced",this.isRelative=!1,this.isGeoreferenced=!0}};(0,e._)([(0,i.J)({georeferenced:"georeferenced"},{readOnly:!0})],c.prototype,"type",void 0),c=(0,e._)([(0,s.j)("esri.geometry.support.MeshGeoreferencedVertexSpace")],c);const u=c},2674:(t,n,r)=>{r.d(n,{Z:()=>y});var e,o=r(43697),a=r(96674),i=r(5600),s=(r(75215),r(67676),r(80442),r(52011)),c=r(52138),u=r(13598),l=r(51305),f=r(94961),h=r(17896),p=r(65617),M=r(3709);let g=e=class extends a.wq{constructor(t){super(t),this.translation=(0,p.c)(),this.rotationAxis=(0,p.e)(M.up),this.rotationAngle=0,this.scale=(0,p.f)(1,1,1)}get rotation(){return(0,M.uT)(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=(0,p.g)((0,M.ZZ)(t)),this.rotationAngle=(0,M.EU)(t)}get localMatrix(){const t=(0,u.a)();return(0,l.s)(m,(0,M.ZZ)(this.rotation),(0,M.WH)(this.rotation)),(0,c.f)(t,m,this.translation,this.scale),t}get localMatrixInverse(){return(0,c.i)((0,u.a)(),this.localMatrix)}applyLocal(t,n){return(0,h.e)(n,t,this.localMatrix)}applyLocalInverse(t,n){return(0,h.e)(n,t,this.localMatrixInverse)}equals(t){return this===t||null!=t&&(0,c.e)(this.localMatrix,t.localMatrix)}clone(){const t={translation:(0,p.g)(this.translation),rotationAxis:(0,p.g)(this.rotationAxis),rotationAngle:this.rotationAngle,scale:(0,p.g)(this.scale)};return new e(t)}};(0,o._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],g.prototype,"translation",void 0),(0,o._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],g.prototype,"rotationAxis",void 0),(0,o._)([(0,i.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],g.prototype,"rotationAngle",void 0),(0,o._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],g.prototype,"scale",void 0),(0,o._)([(0,i.Cb)()],g.prototype,"rotation",null),(0,o._)([(0,i.Cb)()],g.prototype,"localMatrix",null),(0,o._)([(0,i.Cb)()],g.prototype,"localMatrixInverse",null),g=e=(0,o._)([(0,s.j)("esri.geometry.support.MeshTransform")],g);const m=(0,f.a)(),y=g},3709:(t,n,r)=>{r.d(n,{EU:()=>p,Ue:()=>c,WH:()=>M,ZZ:()=>h,qC:()=>l,qw:()=>f,uT:()=>u,up:()=>g});var e=r(22021),o=r(51305),a=r(94961),i=r(17896),s=r(65617);function c(t=g){return[t[0],t[1],t[2],t[3]]}function u(t,n,r=c()){return(0,i.c)(r,t),r[3]=n,r}function l(t,n,r=c()){return(0,o.s)(m,t,M(t)),(0,o.s)(y,n,M(n)),(0,o.m)(m,y,m),function(t,n){return t[3]=n,t}(r,(0,e.BV)((0,o.g)(r,m)))}function f(t,n,r,e=c()){return u(s.U,t,b),u(s.b,n,A),u(s.d,r,d),l(b,A,b),l(b,d,e),e}function h(t){return t}function p(t){return t[3]}function M(t){return(0,e.Vl)(t[3])}const g=[0,0,1,0],m=(0,a.a)(),y=(0,a.a)(),b=(c(),c()),A=c(),d=c()},13442:(t,n,r)=>{r.d(n,{A:()=>a,h:()=>o});var e=r(92604);function o(t,n){return t.isGeographic||t.isWebMercator&&(n?.geographic??!0)}function a(t,n,r){const o=!t.isGeoreferenced;null!=r?.geographic&&r.geographic!==o&&e.Z.getLogger(n).warnOnce(`Specifying the 'geographic' parameter (${r.geographic}) for a Mesh vertex space of type "${t.type}" is not supported. This parameter will be ignored.`)}},66459:(t,n,r)=>{r.d(n,{FF:()=>F,I5:()=>C,Ne:()=>_,Yq:()=>x,iv:()=>E,project:()=>R,w1:()=>T});var e=r(67900),o=r(46521),a=r(52138),i=r(13598),s=r(17896),c=r(65617),u=r(21787),l=r(73615),f=r(58995),h=r(83932),p=r(87360),M=r(83025),g=r(85872),m=r(50567),y=r(84555),b=r(2674),A=r(20773),d=r(13442),P=r(56493);function E(t,n,r){return(0,d.h)(n.spatialReference,r)?function(t,n,r){const e=n.spatialReference,o=S(n,r,I),a=new Float64Array(t.position.length),i=function(t,n,r,e){(0,A.t)(e,t,n);const o=new Float64Array(t.length);return(0,P.To)(e,o,r)}(t.position,o,e,a),s=(0,u.n)(N,o);return{position:i,normal:v(i,a,t.normal,s,e),tangent:j(i,a,t.tangent,s,e)}}(t,n,r):function(t,n,r){const e=new Float64Array(t.position.length),o=t.position,a=n.x,i=n.y,s=n.z??0,c=Z(r?r.unit:null,n.spatialReference);for(let t=0;t<o.length;t+=3)e[t]=o[t]*c+a,e[t+1]=o[t+1]*c+i,e[t+2]=o[t+2]*c+s;return{position:e,normal:t.normal,tangent:t.tangent}}(t,n,r)}function _(t,n=i.I){const{position:r,normal:e,tangent:o}=t;return{position:(0,A.t)(new Float64Array(r.length),r,n),normal:null!=e?(0,P.w9)(e,new Float32Array(e.length),n):null,tangent:null!=o?(0,P.VS)(o,new Float32Array(o.length),n):null}}function C(t,n,r,e){const{position:o,normal:a,tangent:i}=t;return n.isRelative?E(_(t,r?.localMatrix),n.getOriginPoint(e),{geographic:!n.isGeoreferenced}):{position:o,normal:a,tangent:i}}function T(t,n,r){if(r?.useTransform){const{position:e,normal:o,tangent:a}=t,{x:i,y:s,z:u}=n,l=(0,c.f)(i,s,u??0);return{vertexAttributes:{position:e,normal:o,tangent:a},vertexSpace:r.geographic??1?new y.Z({origin:l}):new g.Z({origin:l}),transform:new b.Z}}return{vertexAttributes:E(t,n,r),vertexSpace:new m.Z,transform:null}}function F(t,n,r){return(0,d.h)(n.spatialReference,r)?function(t,n,r){const e=n.spatialReference;S(n,r,I);const o=(0,a.i)(q,I),i=new Float64Array(t.position.length),s=function(t,n,r,e){const o=(0,P.XO)(t,n,e),a=new Float64Array(o.length);return(0,A.t)(a,o,r),a}(t.position,e,o,i),c=(0,u.n)(N,o);return{position:s,normal:O(t.normal,t.position,i,e,c),tangent:L(t.tangent,t.position,i,e,c)}}(t,n,r):w(t,n,r)}function x(t,n,r,e,o){if(!n.isRelative)return F(t,e,o);const{spatialReference:a}=e,i=C(t,n,r,a);return e.equals(n.getOriginPoint(a))?w(i,e,o):F(i,e,o)}function R({positions:t,transform:n,vertexSpace:r,inSpatialReference:e,outSpatialReference:o,outPositions:u}){const g=r.isRelative?r.origin:c.Z,m=r.isRelative?n?.localMatrix??i.I:i.I;if(r.isGeoreferenced){const n=u??(0,M.bg)(t.length);if((0,a.a)(m,i.I)?(0,M.JK)(n,t):(0,A.t)(n,t,m),!(0,s.h)(g,c.Z)){const[t,r,e]=g;for(let o=0;o<n.length;o+=3)n[o]+=t,n[o+1]+=r,n[o+2]+=e}return(0,p.projectBuffer)(n,e,0,n,o,0,n.length/3),n}let y=e;const b=(0,f.rS)(e);(0,l.canProjectWithoutEngine)(e,b)&&(y=b),(0,h.B)(e,g,I,y),(0,a.m)(I,I,m);const d=u??(0,M.bg)(t.length);return(0,A.t)(d,t,I),(0,p.projectBuffer)(d,y,0,d,o,0,d.length/3),d}function v(t,n,r,e,o){if(null==r)return null;const a=new Float32Array(r.length);return(0,A.a)(a,r,e),(0,P.Yk)(a,t,n,o,a),a}function j(t,n,r,e,o){if(null==r)return null;const a=new Float32Array(r.length);(0,A.a)(a,r,e,4);for(let t=3;t<a.length;t+=4)a[t]=r[t];return(0,P.M2)(a,t,n,o,a),a}function w(t,n,r){const e=new Float64Array(t.position.length),o=t.position,a=n.x,i=n.y,s=n.z??0,c=Z(r?r.unit:null,n.spatialReference);for(let t=0;t<o.length;t+=3)e[t]=(o[t]-a)/c,e[t+1]=(o[t+1]-i)/c,e[t+2]=(o[t+2]-s)/c;return{position:e,normal:t.normal,tangent:t.tangent}}function S(t,n,r){(0,h.B)(t.spatialReference,[t.x,t.y,t.z??0],r,(0,f.rS)(t.spatialReference));const e=Z(n?n.unit:null,t.spatialReference);return(0,a.b)(r,r,[e,e,e]),r}function O(t,n,r,e,o){if(null==t)return null;const a=(0,P.Iz)(t,n,r,e,new Float32Array(t.length));return(0,A.a)(a,a,o),a}function L(t,n,r,e,o){if(null==t)return null;const a=(0,P.wi)(t,n,r,e,new Float32Array(t.length));return(0,A.a)(a,a,o,4),a}function Z(t,n){if(null==t)return 1;const r=(0,e.r6)(n);return 1/(0,e.En)(r,"meters",t)}const I=(0,i.a)(),q=(0,i.a)(),N=(0,o.a)()},56493:(t,n,r)=>{r.d(n,{Iz:()=>y,M2:()=>C,To:()=>d,VS:()=>E,XO:()=>A,Yk:()=>b,w9:()=>P,wi:()=>_});var e=r(92604),o=r(21787),a=r(46521),i=r(13598),s=r(17896),c=r(65617),u=r(58995),l=r(83932),f=r(87360),h=r(8744),p=r(40488),M=r(56481),g=r(20773);const m=e.Z.getLogger("esri.geometry.support.meshUtils.normalProjection");function y(t,n,r,e,o){return F(e)?(T(R.TO_PCPF,M.ct.fromTypedArray(t),M.fP.fromTypedArray(n),M.fP.fromTypedArray(r),e,M.ct.fromTypedArray(o)),o):(m.error("Cannot convert spatial reference to PCPF"),o)}function b(t,n,r,e,o){return F(e)?(T(R.FROM_PCPF,M.ct.fromTypedArray(t),M.fP.fromTypedArray(n),M.fP.fromTypedArray(r),e,M.ct.fromTypedArray(o)),o):(m.error("Cannot convert to spatial reference from PCPF"),o)}function A(t,n,r){return(0,f.projectBuffer)(t,n,0,r,(0,u.rS)(n),0,t.length/3),r}function d(t,n,r){return(0,f.projectBuffer)(t,(0,u.rS)(r),0,n,r,0,t.length/3),n}function P(t,n,r){return(0,o.n)(O,r),(0,g.a)(n,t,O),(0,o.i)(O)||(0,g.n)(n,n),n}function E(t,n,r){if((0,o.n)(O,r),(0,g.a)(n,t,O,4),(0,o.i)(O)||(0,g.n)(n,n,4),t!==n)for(let r=3;r<t.length;r+=4)n[r]=t[r];return n}function _(t,n,r,e,o){if(!F(e))return m.error("Cannot convert spatial reference to PCPF"),o;T(R.TO_PCPF,M.ct.fromTypedArray(t,4*Float32Array.BYTES_PER_ELEMENT),M.fP.fromTypedArray(n),M.fP.fromTypedArray(r),e,M.ct.fromTypedArray(o,4*Float32Array.BYTES_PER_ELEMENT));for(let n=3;n<t.length;n+=4)o[n]=t[n];return o}function C(t,n,r,e,o){if(!F(e))return m.error("Cannot convert to spatial reference from PCPF"),o;T(R.FROM_PCPF,M.ct.fromTypedArray(t,16),M.fP.fromTypedArray(n),M.fP.fromTypedArray(r),e,M.ct.fromTypedArray(o,16));for(let n=3;n<t.length;n+=4)o[n]=t[n];return o}function T(t,n,r,e,a,i){if(!n)return;const c=r.count,f=(0,u.rS)(a);if(x(a))for(let r=0;r<c;r++)e.getVec(r,j),n.getVec(r,w),(0,l.B)(f,j,S,f),(0,o.f)(O,S),t===R.FROM_PCPF&&(0,o.t)(O,O),(0,s.t)(w,w,O),i.setVec(r,w);else for(let a=0;a<c;a++){e.getVec(a,j),n.getVec(a,w),(0,l.B)(f,j,S,f),(0,o.f)(O,S);const c=(0,p.mZ)(r.get(a,1));let u=Math.cos(c);t===R.TO_PCPF&&(u=1/u),O[0]*=u,O[1]*=u,O[2]*=u,O[3]*=u,O[4]*=u,O[5]*=u,t===R.FROM_PCPF&&(0,o.t)(O,O),(0,s.t)(w,w,O),(0,s.n)(w,w),i.setVec(a,w)}return i}function F(t){return x(t)||function(t){return t.isWebMercator}(t)}function x(t){return t.isWGS84||(0,h.yW)(t)||(0,h.BZ)(t)||(0,h.V2)(t)}var R,v;(v=R||(R={}))[v.TO_PCPF=0]="TO_PCPF",v[v.FROM_PCPF=1]="FROM_PCPF";const j=(0,c.c)(),w=(0,c.c)(),S=(0,i.a)(),O=(0,a.a)()}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6459],{21787:(t,n,r)=>{r.d(n,{a:()=>c,d:()=>s,f:()=>o,i:()=>h,m:()=>u,n:()=>l,s:()=>a,t:()=>i});var e=r(46851);function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function a(t,n,r,e,o,a,i,s,c,u){return t[0]=n,t[1]=r,t[2]=e,t[3]=o,t[4]=a,t[5]=i,t[6]=s,t[7]=c,t[8]=u,t}function i(t,n){if(t===n){const r=n[1],e=n[2],o=n[5];t[1]=n[3],t[2]=n[6],t[3]=r,t[5]=n[7],t[6]=e,t[7]=o}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t}function s(t,n){const r=n[0],e=n[1],o=n[2],a=n[3],i=n[4],s=n[5],c=n[6],u=n[7],l=n[8],f=l*i-s*u,h=-l*a+s*c,p=u*a-i*c;let M=r*f+e*h+o*p;return M?(M=1/M,t[0]=f*M,t[1]=(-l*e+o*u)*M,t[2]=(s*e-o*i)*M,t[3]=h*M,t[4]=(l*r-o*c)*M,t[5]=(-s*r+o*a)*M,t[6]=p*M,t[7]=(-u*r+e*c)*M,t[8]=(i*r-e*a)*M,t):null}function c(t,n){const r=n[0],e=n[1],o=n[2],a=n[3],i=n[4],s=n[5],c=n[6],u=n[7],l=n[8];return t[0]=i*l-s*u,t[1]=o*u-e*l,t[2]=e*s-o*i,t[3]=s*c-a*l,t[4]=r*l-o*c,t[5]=o*a-r*s,t[6]=a*u-i*c,t[7]=e*c-r*u,t[8]=r*i-e*a,t}function u(t,n,r){const e=n[0],o=n[1],a=n[2],i=n[3],s=n[4],c=n[5],u=n[6],l=n[7],f=n[8],h=r[0],p=r[1],M=r[2],g=r[3],m=r[4],y=r[5],b=r[6],A=r[7],d=r[8];return t[0]=h*e+p*i+M*u,t[1]=h*o+p*s+M*l,t[2]=h*a+p*c+M*f,t[3]=g*e+m*i+y*u,t[4]=g*o+m*s+y*l,t[5]=g*a+m*c+y*f,t[6]=b*e+A*i+d*u,t[7]=b*o+A*s+d*l,t[8]=b*a+A*c+d*f,t}function l(t,n){const r=n[0],e=n[1],o=n[2],a=n[3],i=n[4],s=n[5],c=n[6],u=n[7],l=n[8],f=n[9],h=n[10],p=n[11],M=n[12],g=n[13],m=n[14],y=n[15],b=r*s-e*i,A=r*c-o*i,d=r*u-a*i,P=e*c-o*s,E=e*u-a*s,_=o*u-a*c,C=l*g-f*M,T=l*m-h*M,F=l*y-p*M,x=f*m-h*g,R=f*y-p*g,v=h*y-p*m;let j=b*v-A*R+d*x+P*F-E*T+_*C;return j?(j=1/j,t[0]=(s*v-c*R+u*x)*j,t[1]=(c*F-i*v-u*T)*j,t[2]=(i*R-s*F+u*C)*j,t[3]=(o*R-e*v-a*x)*j,t[4]=(r*v-o*F+a*T)*j,t[5]=(e*F-r*R-a*C)*j,t[6]=(g*_-m*E+y*P)*j,t[7]=(m*d-M*_-y*A)*j,t[8]=(M*E-g*d+y*b)*j,t):null}function f(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t[3]=n[3]-r[3],t[4]=n[4]-r[4],t[5]=n[5]-r[5],t[6]=n[6]-r[6],t[7]=n[7]-r[7],t[8]=n[8]-r[8],t}function h(t){const n=(0,e.g)(),r=t[0],o=t[1],a=t[2],i=t[3],s=t[4],c=t[5],u=t[6],l=t[7],f=t[8];return Math.abs(1-(r*r+i*i+u*u))<=n&&Math.abs(1-(o*o+s*s+l*l))<=n&&Math.abs(1-(a*a+c*c+f*f))<=n}const p=u,M=f;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t[3]=n[3]+r[3],t[4]=n[4]+r[4],t[5]=n[5]+r[5],t[6]=n[6]+r[6],t[7]=n[7]+r[7],t[8]=n[8]+r[8],t},adjoint:c,copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},determinant:function(t){const n=t[0],r=t[1],e=t[2],o=t[3],a=t[4],i=t[5],s=t[6],c=t[7],u=t[8];return n*(u*a-i*c)+r*(-u*o+i*s)+e*(c*o-a*s)},equals:function(t,n){const r=t[0],o=t[1],a=t[2],i=t[3],s=t[4],c=t[5],u=t[6],l=t[7],f=t[8],h=n[0],p=n[1],M=n[2],g=n[3],m=n[4],y=n[5],b=n[6],A=n[7],d=n[8],P=(0,e.g)();return Math.abs(r-h)<=P*Math.max(1,Math.abs(r),Math.abs(h))&&Math.abs(o-p)<=P*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(a-M)<=P*Math.max(1,Math.abs(a),Math.abs(M))&&Math.abs(i-g)<=P*Math.max(1,Math.abs(i),Math.abs(g))&&Math.abs(s-m)<=P*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(c-y)<=P*Math.max(1,Math.abs(c),Math.abs(y))&&Math.abs(u-b)<=P*Math.max(1,Math.abs(u),Math.abs(b))&&Math.abs(l-A)<=P*Math.max(1,Math.abs(l),Math.abs(A))&&Math.abs(f-d)<=P*Math.max(1,Math.abs(f),Math.abs(d))},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},fromMat4:o,fromQuat:function(t,n){const r=n[0],e=n[1],o=n[2],a=n[3],i=r+r,s=e+e,c=o+o,u=r*i,l=e*i,f=e*s,h=o*i,p=o*s,M=o*c,g=a*i,m=a*s,y=a*c;return t[0]=1-f-M,t[3]=l-y,t[6]=h+m,t[1]=l+y,t[4]=1-u-M,t[7]=p-g,t[2]=h-m,t[5]=p+g,t[8]=1-u-f,t},fromRotation:function(t,n){const r=Math.sin(n),e=Math.cos(n);return t[0]=e,t[1]=r,t[2]=0,t[3]=-r,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:s,isOrthoNormal:h,mul:p,multiply:u,multiplyScalar:function(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=n[7]*r,t[8]=n[8]*r,t},multiplyScalarAndAdd:function(t,n,r,e){return t[0]=n[0]+r[0]*e,t[1]=n[1]+r[1]*e,t[2]=n[2]+r[2]*e,t[3]=n[3]+r[3]*e,t[4]=n[4]+r[4]*e,t[5]=n[5]+r[5]*e,t[6]=n[6]+r[6]*e,t[7]=n[7]+r[7]*e,t[8]=n[8]+r[8]*e,t},normalFromMat4:l,normalFromMat4Legacy:function(t,n){const r=n[0],e=n[1],o=n[2],a=n[4],i=n[5],s=n[6],c=n[8],u=n[9],l=n[10],f=l*i-s*u,h=-l*a+s*c,p=u*a-i*c,M=r*f+e*h+o*p;if(!M)return null;const g=1/M;return t[0]=f*g,t[1]=(-l*e+o*u)*g,t[2]=(s*e-o*i)*g,t[3]=h*g,t[4]=(l*r-o*c)*g,t[5]=(-s*r+o*a)*g,t[6]=p*g,t[7]=(-u*r+e*c)*g,t[8]=(i*r-e*a)*g,t},projection:function(t,n,r){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/r,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,n,r){const e=n[0],o=n[1],a=n[2],i=n[3],s=n[4],c=n[5],u=n[6],l=n[7],f=n[8],h=Math.sin(r),p=Math.cos(r);return t[0]=p*e+h*i,t[1]=p*o+h*s,t[2]=p*a+h*c,t[3]=p*i-h*e,t[4]=p*s-h*o,t[5]=p*c-h*a,t[6]=u,t[7]=l,t[8]=f,t},scale:function(t,n,r){const e=r[0],o=r[1],a=r[2];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t[6]=a*n[6],t[7]=a*n[7],t[8]=a*n[8],t},scaleByVec2:function(t,n,r){const e=r[0],o=r[1];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t},set:a,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:M,subtract:f,translate:function(t,n,r){const e=n[0],o=n[1],a=n[2],i=n[3],s=n[4],c=n[5],u=n[6],l=n[7],f=n[8],h=r[0],p=r[1];return t[0]=e,t[1]=o,t[2]=a,t[3]=i,t[4]=s,t[5]=c,t[6]=h*e+p*i+u,t[7]=h*o+p*s+l,t[8]=h*a+p*c+f,t},transpose:i},Symbol.toStringTag,{value:"Module"}))},51305:(t,n,r)=>{r.d(n,{a:()=>p,c:()=>m,g:()=>l,j:()=>R,k:()=>g,m:()=>f,s:()=>u});var e=r(46521),o=r(94961),a=r(65617),i=r(46851),s=r(17896),c=r(98766);function u(t,n,r){r*=.5;const e=Math.sin(r);return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=Math.cos(r),t}function l(t,n){const r=2*Math.acos(n[3]),e=Math.sin(r/2);return e>(0,i.g)()?(t[0]=n[0]/e,t[1]=n[1]/e,t[2]=n[2]/e):(t[0]=1,t[1]=0,t[2]=0),r}function f(t,n,r){const e=n[0],o=n[1],a=n[2],i=n[3],s=r[0],c=r[1],u=r[2],l=r[3];return t[0]=e*l+i*s+o*u-a*c,t[1]=o*l+i*c+a*s-e*u,t[2]=a*l+i*u+e*c-o*s,t[3]=i*l-e*s-o*c-a*u,t}function h(t,n,r,e){const o=n[0],a=n[1],s=n[2],c=n[3];let u,l,f,h,p,M=r[0],g=r[1],m=r[2],y=r[3];return l=o*M+a*g+s*m+c*y,l<0&&(l=-l,M=-M,g=-g,m=-m,y=-y),1-l>(0,i.g)()?(u=Math.acos(l),f=Math.sin(u),h=Math.sin((1-e)*u)/f,p=Math.sin(e*u)/f):(h=1-e,p=e),t[0]=h*o+p*M,t[1]=h*a+p*g,t[2]=h*s+p*m,t[3]=h*c+p*y,t}function p(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t}function M(t,n){const r=n[0]+n[4]+n[8];let e;if(r>0)e=Math.sqrt(r+1),t[3]=.5*e,e=.5/e,t[0]=(n[5]-n[7])*e,t[1]=(n[6]-n[2])*e,t[2]=(n[1]-n[3])*e;else{let r=0;n[4]>n[0]&&(r=1),n[8]>n[3*r+r]&&(r=2);const o=(r+1)%3,a=(r+2)%3;e=Math.sqrt(n[3*r+r]-n[3*o+o]-n[3*a+a]+1),t[r]=.5*e,e=.5/e,t[3]=(n[3*o+a]-n[3*a+o])*e,t[o]=(n[3*o+r]+n[3*r+o])*e,t[a]=(n[3*a+r]+n[3*r+a])*e}return t}function g(t,n,r,e){const o=.5*Math.PI/180;n*=o,r*=o,e*=o;const a=Math.sin(n),i=Math.cos(n),s=Math.sin(r),c=Math.cos(r),u=Math.sin(e),l=Math.cos(e);return t[0]=a*c*l-i*s*u,t[1]=i*s*l+a*c*u,t[2]=i*c*u-a*s*l,t[3]=i*c*l+a*s*u,t}const m=c.c,y=c.s,b=c.a,A=f,d=c.b,P=c.d,E=c.l,_=c.f,C=_,T=c.g,F=T,x=c.n,R=c.h,v=c.e,j=(0,a.c)(),w=(0,a.f)(1,0,0),S=(0,a.f)(0,1,0),O=(0,o.a)(),L=(0,o.a)(),Z=(0,e.a)();Object.freeze(Object.defineProperty({__proto__:null,add:b,calculateW:function(t,n){const r=n[0],e=n[1],o=n[2];return t[0]=r,t[1]=e,t[2]=o,t[3]=Math.sqrt(Math.abs(1-r*r-e*e-o*o)),t},conjugate:p,copy:m,dot:P,equals:v,exactEquals:R,fromEuler:g,fromMat3:M,getAxisAngle:l,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,n){const r=n[0],e=n[1],o=n[2],a=n[3],i=r*r+e*e+o*o+a*a,s=i?1/i:0;return t[0]=-r*s,t[1]=-e*s,t[2]=-o*s,t[3]=a*s,t},len:C,length:_,lerp:E,mul:A,multiply:f,normalize:x,random:function(t){const n=i.R,r=n(),e=n(),o=n(),a=Math.sqrt(1-r),s=Math.sqrt(r);return t[0]=a*Math.sin(2*Math.PI*e),t[1]=a*Math.cos(2*Math.PI*e),t[2]=s*Math.sin(2*Math.PI*o),t[3]=s*Math.cos(2*Math.PI*o),t},rotateX:function(t,n,r){r*=.5;const e=n[0],o=n[1],a=n[2],i=n[3],s=Math.sin(r),c=Math.cos(r);return t[0]=e*c+i*s,t[1]=o*c+a*s,t[2]=a*c-o*s,t[3]=i*c-e*s,t},rotateY:function(t,n,r){r*=.5;const e=n[0],o=n[1],a=n[2],i=n[3],s=Math.sin(r),c=Math.cos(r);return t[0]=e*c-a*s,t[1]=o*c+i*s,t[2]=a*c+e*s,t[3]=i*c-o*s,t},rotateZ:function(t,n,r){r*=.5;const e=n[0],o=n[1],a=n[2],i=n[3],s=Math.sin(r),c=Math.cos(r);return t[0]=e*c+o*s,t[1]=o*c-e*s,t[2]=a*c+i*s,t[3]=i*c-a*s,t},rotationTo:function(t,n,r){const e=(0,s.j)(n,r);return e<-.999999?((0,s.b)(j,w,n),(0,s.k)(j)<1e-6&&(0,s.b)(j,S,n),(0,s.n)(j,j),u(t,j,Math.PI),t):e>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,s.b)(j,n,r),t[0]=j[0],t[1]=j[1],t[2]=j[2],t[3]=1+e,x(t,t))},scale:d,set:y,setAxes:function(t,n,r,e){const o=Z;return o[0]=r[0],o[3]=r[1],o[6]=r[2],o[1]=e[0],o[4]=e[1],o[7]=e[2],o[2]=-n[0],o[5]=-n[1],o[8]=-n[2],x(t,M(t,o))},setAxisAngle:u,slerp:h,sqlerp:function(t,n,r,e,o,a){return h(O,n,o,a),h(L,r,e,a),h(t,O,L,2*a*(1-a)),t},sqrLen:F,squaredLength:T,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},83932:(t,n,r)=>{r.d(n,{B:()=>u});var e=r(22021),o=r(52138),a=r(65617);function i(t,n,r){const e=Math.sin(t),o=Math.cos(t),a=Math.sin(n),i=Math.cos(n),s=r;return s[0]=-e,s[4]=-a*o,s[8]=i*o,s[12]=0,s[1]=o,s[5]=-a*e,s[9]=i*e,s[13]=0,s[2]=0,s[6]=i,s[10]=a,s[14]=0,s[3]=0,s[7]=0,s[11]=0,s[15]=1,s}var s=r(29166),c=r(8744);function u(t,n,r,e){if(null==t||null==e)return!1;const a=(0,s.eT)(t,s.Jz),u=(0,s.eT)(e,s.sp);if(a===u&&!l(u)&&(a!==s.Ej.UNKNOWN||(0,c.fS)(t,e)))return(0,o.d)(r,n),!0;if(l(u)){const t=s.rf[a][s.Ej.LON_LAT],e=s.rf[s.Ej.LON_LAT][u];return null!=t&&null!=e&&(t(n,0,h,0),e(h,0,p,0),i(f*h[0],f*h[1],r),r[12]=p[0],r[13]=p[1],r[14]=p[2],!0)}if((u===s.Ej.WEB_MERCATOR||u===s.Ej.PLATE_CARREE)&&(a===s.Ej.WGS84||a===s.Ej.CGCS2000&&u===s.Ej.PLATE_CARREE||a===s.Ej.SPHERICAL_ECEF||a===s.Ej.WEB_MERCATOR)){const t=s.rf[a][s.Ej.LON_LAT],e=s.rf[s.Ej.LON_LAT][u];return null!=t&&null!=e&&(t(n,0,h,0),e(h,0,p,0),a===s.Ej.SPHERICAL_ECEF?function(t,n,r){i(t,n,r),(0,o.t)(r,r)}(f*h[0],f*h[1],r):(0,o.g)(r),r[12]=p[0],r[13]=p[1],r[14]=p[2],!0)}return!1}function l(t){return t===s.Ej.SPHERICAL_ECEF||t===s.Ej.SPHERICAL_MARS_PCPF||t===s.Ej.SPHERICAL_MOON_PCPF}const f=(0,e.Vl)(1),h=(0,a.c)(),p=(0,a.c)()},58995:(t,n,r)=>{r.d(n,{rS:()=>u});var e=r(2109),o=r(82971),a=r(8744);const i=new o.Z(e.kU),s=new o.Z(e.JL),c=new o.Z(e.mM);function u(t){return t&&((0,a.BZ)(t)||(0,a.fS)(t,s))?s:t&&((0,a.V2)(t)||(0,a.fS)(t,c))?c:i}new o.Z(e.pn)},50567:(t,n,r)=>{r.d(n,{Z:()=>u});var e=r(43697),o=r(2368),a=r(96674),i=(r(92604),r(75215),r(67676),r(80442),r(20102),r(36030)),s=r(52011);let c=class extends((0,o.J)(a.wq)){constructor(){super({}),this.type="georeferenced",this.isRelative=!1,this.isGeoreferenced=!0}};(0,e._)([(0,i.J)({georeferenced:"georeferenced"},{readOnly:!0})],c.prototype,"type",void 0),c=(0,e._)([(0,s.j)("esri.geometry.support.MeshGeoreferencedVertexSpace")],c);const u=c},2674:(t,n,r)=>{r.d(n,{Z:()=>y});var e,o=r(43697),a=r(96674),i=r(5600),s=(r(75215),r(67676),r(80442),r(52011)),c=r(52138),u=r(13598),l=r(51305),f=r(94961),h=r(17896),p=r(65617),M=r(3709);let g=e=class extends a.wq{constructor(t){super(t),this.translation=(0,p.c)(),this.rotationAxis=(0,p.e)(M.up),this.rotationAngle=0,this.scale=(0,p.f)(1,1,1)}get rotation(){return(0,M.uT)(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=(0,p.g)((0,M.ZZ)(t)),this.rotationAngle=(0,M.EU)(t)}get localMatrix(){const t=(0,u.a)();return(0,l.s)(m,(0,M.ZZ)(this.rotation),(0,M.WH)(this.rotation)),(0,c.f)(t,m,this.translation,this.scale),t}get localMatrixInverse(){return(0,c.i)((0,u.a)(),this.localMatrix)}applyLocal(t,n){return(0,h.e)(n,t,this.localMatrix)}applyLocalInverse(t,n){return(0,h.e)(n,t,this.localMatrixInverse)}equals(t){return this===t||null!=t&&(0,c.e)(this.localMatrix,t.localMatrix)}clone(){const t={translation:(0,p.g)(this.translation),rotationAxis:(0,p.g)(this.rotationAxis),rotationAngle:this.rotationAngle,scale:(0,p.g)(this.scale)};return new e(t)}};(0,o._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],g.prototype,"translation",void 0),(0,o._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],g.prototype,"rotationAxis",void 0),(0,o._)([(0,i.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],g.prototype,"rotationAngle",void 0),(0,o._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],g.prototype,"scale",void 0),(0,o._)([(0,i.Cb)()],g.prototype,"rotation",null),(0,o._)([(0,i.Cb)()],g.prototype,"localMatrix",null),(0,o._)([(0,i.Cb)()],g.prototype,"localMatrixInverse",null),g=e=(0,o._)([(0,s.j)("esri.geometry.support.MeshTransform")],g);const m=(0,f.a)(),y=g},3709:(t,n,r)=>{r.d(n,{EU:()=>p,Ue:()=>c,WH:()=>M,ZZ:()=>h,qC:()=>l,qw:()=>f,uT:()=>u,up:()=>g});var e=r(22021),o=r(51305),a=r(94961),i=r(17896),s=r(65617);function c(t=g){return[t[0],t[1],t[2],t[3]]}function u(t,n,r=c()){return(0,i.c)(r,t),r[3]=n,r}function l(t,n,r=c()){return(0,o.s)(m,t,M(t)),(0,o.s)(y,n,M(n)),(0,o.m)(m,y,m),function(t,n){return t[3]=n,t}(r,(0,e.BV)((0,o.g)(r,m)))}function f(t,n,r,e=c()){return u(s.U,t,b),u(s.b,n,A),u(s.d,r,d),l(b,A,b),l(b,d,e),e}function h(t){return t}function p(t){return t[3]}function M(t){return(0,e.Vl)(t[3])}const g=[0,0,1,0],m=(0,a.a)(),y=(0,a.a)(),b=(c(),c()),A=c(),d=c()},13442:(t,n,r)=>{r.d(n,{A:()=>a,h:()=>o});var e=r(92604);function o(t,n){return t.isGeographic||t.isWebMercator&&(n?.geographic??!0)}function a(t,n,r){const o=!t.isGeoreferenced;null!=r?.geographic&&r.geographic!==o&&e.Z.getLogger(n).warnOnce(`Specifying the 'geographic' parameter (${r.geographic}) for a Mesh vertex space of type "${t.type}" is not supported. This parameter will be ignored.`)}},66459:(t,n,r)=>{r.d(n,{FF:()=>F,I5:()=>C,Ne:()=>_,Yq:()=>x,iv:()=>E,project:()=>R,w1:()=>T});var e=r(67900),o=r(46521),a=r(52138),i=r(13598),s=r(17896),c=r(65617),u=r(21787),l=r(73615),f=r(58995),h=r(83932),p=r(87360),M=r(83025),g=r(85872),m=r(50567),y=r(84555),b=r(2674),A=r(20773),d=r(13442),P=r(56493);function E(t,n,r){return(0,d.h)(n.spatialReference,r)?function(t,n,r){const e=n.spatialReference,o=S(n,r,I),a=new Float64Array(t.position.length),i=function(t,n,r,e){(0,A.t)(e,t,n);const o=new Float64Array(t.length);return(0,P.To)(e,o,r)}(t.position,o,e,a),s=(0,u.n)(N,o);return{position:i,normal:v(i,a,t.normal,s,e),tangent:j(i,a,t.tangent,s,e)}}(t,n,r):function(t,n,r){const e=new Float64Array(t.position.length),o=t.position,a=n.x,i=n.y,s=n.z??0,c=Z(r?r.unit:null,n.spatialReference);for(let t=0;t<o.length;t+=3)e[t]=o[t]*c+a,e[t+1]=o[t+1]*c+i,e[t+2]=o[t+2]*c+s;return{position:e,normal:t.normal,tangent:t.tangent}}(t,n,r)}function _(t,n=i.I){const{position:r,normal:e,tangent:o}=t;return{position:(0,A.t)(new Float64Array(r.length),r,n),normal:null!=e?(0,P.w9)(e,new Float32Array(e.length),n):null,tangent:null!=o?(0,P.VS)(o,new Float32Array(o.length),n):null}}function C(t,n,r,e){const{position:o,normal:a,tangent:i}=t;return n.isRelative?E(_(t,r?.localMatrix),n.getOriginPoint(e),{geographic:!n.isGeoreferenced}):{position:o,normal:a,tangent:i}}function T(t,n,r){if(r?.useTransform){const{position:e,normal:o,tangent:a}=t,{x:i,y:s,z:u}=n,l=(0,c.f)(i,s,u??0);return{vertexAttributes:{position:e,normal:o,tangent:a},vertexSpace:r.geographic??1?new y.Z({origin:l}):new g.Z({origin:l}),transform:new b.Z}}return{vertexAttributes:E(t,n,r),vertexSpace:new m.Z,transform:null}}function F(t,n,r){return(0,d.h)(n.spatialReference,r)?function(t,n,r){const e=n.spatialReference;S(n,r,I);const o=(0,a.i)(q,I),i=new Float64Array(t.position.length),s=function(t,n,r,e){const o=(0,P.XO)(t,n,e),a=new Float64Array(o.length);return(0,A.t)(a,o,r),a}(t.position,e,o,i),c=(0,u.n)(N,o);return{position:s,normal:O(t.normal,t.position,i,e,c),tangent:L(t.tangent,t.position,i,e,c)}}(t,n,r):w(t,n,r)}function x(t,n,r,e,o){if(!n.isRelative)return F(t,e,o);const{spatialReference:a}=e,i=C(t,n,r,a);return e.equals(n.getOriginPoint(a))?w(i,e,o):F(i,e,o)}function R({positions:t,transform:n,vertexSpace:r,inSpatialReference:e,outSpatialReference:o,outPositions:u,localMode:g}){const m=r.isRelative?r.origin:c.Z,y=r.isRelative?n?.localMatrix??i.I:i.I;if(r.isGeoreferenced){const n=u??(0,M.bg)(t.length);if((0,a.a)(y,i.I)?(0,M.JK)(n,t):(0,A.t)(n,t,y),!(0,s.h)(m,c.Z)){const[t,r,e]=m;for(let o=0;o<n.length;o+=3)n[o]+=t,n[o+1]+=r,n[o+2]+=e}return(0,p.projectBuffer)(n,e,0,n,o,0,n.length/3),n}let b=e;const d=(0,f.rS)(e);b=o.isWebMercator&&g||!(0,l.canProjectWithoutEngine)(e,d)?b:d,(0,h.B)(e,m,I,b),(0,a.m)(I,I,y);const P=u??(0,M.bg)(t.length);return(0,A.t)(P,t,I),(0,p.projectBuffer)(P,b,0,P,o,0,P.length/3),P}function v(t,n,r,e,o){if(null==r)return null;const a=new Float32Array(r.length);return(0,A.a)(a,r,e),(0,P.Yk)(a,t,n,o,a),a}function j(t,n,r,e,o){if(null==r)return null;const a=new Float32Array(r.length);(0,A.a)(a,r,e,4);for(let t=3;t<a.length;t+=4)a[t]=r[t];return(0,P.M2)(a,t,n,o,a),a}function w(t,n,r){const e=new Float64Array(t.position.length),o=t.position,a=n.x,i=n.y,s=n.z??0,c=Z(r?r.unit:null,n.spatialReference);for(let t=0;t<o.length;t+=3)e[t]=(o[t]-a)/c,e[t+1]=(o[t+1]-i)/c,e[t+2]=(o[t+2]-s)/c;return{position:e,normal:t.normal,tangent:t.tangent}}function S(t,n,r){(0,h.B)(t.spatialReference,[t.x,t.y,t.z??0],r,(0,f.rS)(t.spatialReference));const e=Z(n?n.unit:null,t.spatialReference);return(0,a.b)(r,r,[e,e,e]),r}function O(t,n,r,e,o){if(null==t)return null;const a=(0,P.Iz)(t,n,r,e,new Float32Array(t.length));return(0,A.a)(a,a,o),a}function L(t,n,r,e,o){if(null==t)return null;const a=(0,P.wi)(t,n,r,e,new Float32Array(t.length));return(0,A.a)(a,a,o,4),a}function Z(t,n){if(null==t)return 1;const r=(0,e.r6)(n);return 1/(0,e.En)(r,"meters",t)}const I=(0,i.a)(),q=(0,i.a)(),N=(0,o.a)()},56493:(t,n,r)=>{r.d(n,{Iz:()=>y,M2:()=>C,To:()=>d,VS:()=>E,XO:()=>A,Yk:()=>b,w9:()=>P,wi:()=>_});var e=r(92604),o=r(21787),a=r(46521),i=r(13598),s=r(17896),c=r(65617),u=r(58995),l=r(83932),f=r(87360),h=r(8744),p=r(40488),M=r(56481),g=r(20773);const m=e.Z.getLogger("esri.geometry.support.meshUtils.normalProjection");function y(t,n,r,e,o){return F(e)?(T(R.TO_PCPF,M.ct.fromTypedArray(t),M.fP.fromTypedArray(n),M.fP.fromTypedArray(r),e,M.ct.fromTypedArray(o)),o):(m.error("Cannot convert spatial reference to PCPF"),o)}function b(t,n,r,e,o){return F(e)?(T(R.FROM_PCPF,M.ct.fromTypedArray(t),M.fP.fromTypedArray(n),M.fP.fromTypedArray(r),e,M.ct.fromTypedArray(o)),o):(m.error("Cannot convert to spatial reference from PCPF"),o)}function A(t,n,r){return(0,f.projectBuffer)(t,n,0,r,(0,u.rS)(n),0,t.length/3),r}function d(t,n,r){return(0,f.projectBuffer)(t,(0,u.rS)(r),0,n,r,0,t.length/3),n}function P(t,n,r){return(0,o.n)(O,r),(0,g.a)(n,t,O),(0,o.i)(O)||(0,g.n)(n,n),n}function E(t,n,r){if((0,o.n)(O,r),(0,g.a)(n,t,O,4),(0,o.i)(O)||(0,g.n)(n,n,4),t!==n)for(let r=3;r<t.length;r+=4)n[r]=t[r];return n}function _(t,n,r,e,o){if(!F(e))return m.error("Cannot convert spatial reference to PCPF"),o;T(R.TO_PCPF,M.ct.fromTypedArray(t,4*Float32Array.BYTES_PER_ELEMENT),M.fP.fromTypedArray(n),M.fP.fromTypedArray(r),e,M.ct.fromTypedArray(o,4*Float32Array.BYTES_PER_ELEMENT));for(let n=3;n<t.length;n+=4)o[n]=t[n];return o}function C(t,n,r,e,o){if(!F(e))return m.error("Cannot convert to spatial reference from PCPF"),o;T(R.FROM_PCPF,M.ct.fromTypedArray(t,16),M.fP.fromTypedArray(n),M.fP.fromTypedArray(r),e,M.ct.fromTypedArray(o,16));for(let n=3;n<t.length;n+=4)o[n]=t[n];return o}function T(t,n,r,e,a,i){if(!n)return;const c=r.count,f=(0,u.rS)(a);if(x(a))for(let r=0;r<c;r++)e.getVec(r,j),n.getVec(r,w),(0,l.B)(f,j,S,f),(0,o.f)(O,S),t===R.FROM_PCPF&&(0,o.t)(O,O),(0,s.t)(w,w,O),i.setVec(r,w);else for(let a=0;a<c;a++){e.getVec(a,j),n.getVec(a,w),(0,l.B)(f,j,S,f),(0,o.f)(O,S);const c=(0,p.mZ)(r.get(a,1));let u=Math.cos(c);t===R.TO_PCPF&&(u=1/u),O[0]*=u,O[1]*=u,O[2]*=u,O[3]*=u,O[4]*=u,O[5]*=u,t===R.FROM_PCPF&&(0,o.t)(O,O),(0,s.t)(w,w,O),(0,s.n)(w,w),i.setVec(a,w)}return i}function F(t){return x(t)||function(t){return t.isWebMercator}(t)}function x(t){return t.isWGS84||(0,h.yW)(t)||(0,h.BZ)(t)||(0,h.V2)(t)}var R,v;(v=R||(R={}))[v.TO_PCPF=0]="TO_PCPF",v[v.FROM_PCPF=1]="FROM_PCPF";const j=(0,c.c)(),w=(0,c.c)(),S=(0,i.a)(),O=(0,a.a)()}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2664],{65845:(e,t,r)=>{r.d(t,{D:()=>n});var a=r(81153);function n(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,a.l)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},81153:(e,t,r)=>{function a(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{l:()=>a})},32664:(e,t,r)=>{r.d(t,{save:()=>P,saveAs:()=>N});var a=r(67676),n=(r(20102),r(19238)),o=r(64383),i=r(66677),s=r(52104),l=r(84230),u=(r(33516),r(14661));const c="Feature Service",p="feature-layer-utils",d=`${p}-save`,y=`${p}-save-as`;function f(e){return{isValid:(0,l.fP)(e)&&("feature"!==e.type||!e.dynamicDataSource),errorMessage:"Feature layer should be a layer or table in a map or feature service"}}function m(e){const t=[],r=[];for(const{layer:a,layerJSON:n}of e)a.isTable?r.push(n):t.push(n);return{layers:t,tables:r}}function w(e){return m([e])}async function v(e,t){return/\/\d+\/?$/.test(e.url)?w(t[0]):async function(e,t){if(!t)return m(e);const{layer:{url:r,customParameters:a,apiKey:o}}=e[0];let i=await t.fetchData("json");null!=i?.layers&&null!=i.tables||(i=await async function(e,t,r){e||={},e.layers||=[],e.tables||=[];const{url:a,customParameters:o,apiKey:i}=t,{serviceJSON:l,layersJSON:u}=await(0,s.V)(a,{customParameters:o,apiKey:i}),c=b(e.layers,l.layers,r),p=b(e.tables,l.tables,r);e.layers=c.itemResources,e.tables=p.itemResources;const d=[...c.added,...p.added],y=u?[...u.layers,...u.tables]:[];return await async function(e,t,r,a){const o=t.map((({id:e})=>new n.default({url:r,layerId:e,sourceJSON:a.find((({id:t})=>t===e))})));await Promise.allSettled(o.map((e=>e.load()))),o.forEach((t=>{const{layerId:r,loaded:a,defaultPopupTemplate:n}=t;a&&null!=n&&g(t,{id:r,popupInfo:n.toJSON()},e)}))}(e,d,a,y),e}(i,{url:r??"",customParameters:a,apiKey:o},e.map((e=>e.layer.layerId))));for(const t of e)g(t.layer,t.layerJSON,i);return i}(t,e)}function b(e,t,r){const n=(0,a.e5)(e,t,((e,t)=>e.id===t.id));e=e.filter((e=>!n.removed.some((t=>t.id===e.id))));const o=n.added.map((({id:e})=>({id:e})));return o.forEach((({id:t})=>{e.push({id:t})})),{itemResources:e,added:o.filter((({id:e})=>!r.includes(e)))}}function g(e,t,r){e.isTable?h(r.tables,t):h(r.layers,t)}function h(e,t){const r=e.findIndex((({id:e})=>e===t.id));-1===r?e.push(t):e[r]=t}async function I(e,t){const{url:r,layerId:a,title:n,fullExtent:o,isTable:s}=e,l=(0,i.Qc)(r);t.url="FeatureServer"===l?.serverType?r:`${r}/${a}`,t.title||=n,t.extent=null,s||null==o||(t.extent=await(0,u.$o)(o)),(0,u.ck)(t,u.Kz.METADATA),(0,u.ck)(t,u.Kz.MULTI_LAYER),(0,u.qj)(t,u.Kz.SINGLE_LAYER),s&&(0,u.qj)(t,u.Kz.TABLE)}async function P(e,t){return(0,o.a1)({layer:e,itemType:c,validateLayer:f,createItemData:(e,t)=>v(t,[e]),errorNamePrefix:d},t)}async function N(e,t,r){return(0,o.po)({layer:e,itemType:c,validateLayer:f,createItemData:(e,t)=>Promise.resolve(w(e)),errorNamePrefix:y,newItem:t,setItemProperties:I},r)}},64383:(e,t,r)=>{r.d(t,{a1:()=>v,po:()=>b});var a=r(20102),n=r(65845),o=r(48522),i=r(15235),s=r(33516),l=r(14661),u=r(14769);async function c(e){const{layer:t,errorNamePrefix:r,validateLayer:n}=e;await t.load(),function(e,t,r){const n=r(e);if(!n.isValid)throw new a.Z(`${t}:invalid-parameters`,n.errorMessage,{layer:e})}(t,r,n)}function p(e,t){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${t}`}function d(e){const{item:t,itemType:r,errorNamePrefix:n,layer:o,validateItem:i}=e;if((0,u.w)(t),t.type!==r)throw new a.Z(`${n}:portal-item-wrong-type`,`Portal item type should be "${r}"`,{item:t,layer:o});if(i){const e=i(t);if(!e.isValid)throw new a.Z(`${n}:invalid-parameters`,e.errorMessage,{layer:o})}}function y(e){const{layer:t,errorNamePrefix:r}=e,{portalItem:n}=t;if(!n)throw new a.Z(`${r}:portal-item-not-set`,p(t,"requires the portalItem property to be set"));if(!n.loaded)throw new a.Z(`${r}:portal-item-not-loaded`,p(t,"cannot be saved to a portal item that does not exist or is inaccessible"));d({...e,item:n})}function f(e){const{newItem:t,itemType:r}=e;let a=i.default.from(t);return a.id&&(a=a.clone(),a.id=null),a.type??=r,a.portal??=o.Z.getDefault(),d({...e,item:a}),a}async function m(e,t,r){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();const n=e.write({},t);return await Promise.all(t.resources?.pendingOperations??[]),function(e,t){let r=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:t,details:r})=>new a.Z(e,t,r)));if(e.blockedRelativeUrls&&(r=r.concat(e.blockedRelativeUrls.map((e=>new a.Z("url:unsupported",`Relative url '${e}' is not supported`))))),t?.ignoreUnsupported&&(r=r.filter((({name:e})=>"layer:unsupported"!==e&&"symbol:unsupported"!==e&&"symbol-layer:unsupported"!==e&&"property:unsupported"!==e&&"url:unsupported"!==e))),r.length>0)throw new a.Z("layer-write:unsupported","Failed to save layer due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:r})}(t,r),n}function w(e){(0,l.qj)(e,l.Kz.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)))}async function v(e,t){const{layer:r,createItemData:a,createJSONContext:o,saveResources:i}=e;await c(e),y(e);const l=r.portalItem,u=o?o(l):(0,s.Yv)(l),p=await m(r,u,t),d=await a({layer:r,layerJSON:p},l);return w(l),await l.update({data:d}),(0,n.D)(u),await(i?.(l,u)),l}async function b(e,t){const{layer:r,createItemData:a,createJSONContext:o,setItemProperties:i,saveResources:l}=e;await c(e);const u=f(e),p=o?o(u):(0,s.Yv)(u),d=await m(r,p,t),y=await a({layer:r,layerJSON:d},u);return await i(r,u),w(u),await async function(e,t,r){const a=e.portal;await a.signIn(),await(a.user?.addItem({item:e,data:t,folder:r?.folder}))}(u,y,t),r.portalItem=u,(0,n.D)(p),await(l?.(u,p)),u}},52104:(e,t,r)=>{r.d(t,{V:()=>n});var a=r(96187);async function n(e,t){const r=await(0,a.T)(e,t);r.layers=r.layers.filter(o);const n={serviceJSON:r};if((r.currentVersion??0)<10.5)return n;const i=await(0,a.T)(e+"/layers",t);return n.layersJSON={layers:i.layers.filter(o),tables:i.tables},n}function o(e){return!e.type||"Feature Layer"===e.type||"Oriented Imagery Layer"===e.type}},33516:(e,t,r)=>{r.d(t,{M4:()=>l,Yv:()=>i,ht:()=>o,wk:()=>s});var a=r(17452),n=r(48522);function o(e){return{origin:"portal-item",url:(0,a.mN)(e.itemUrl),portal:e.portal||n.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function i(e){const t=(0,a.mN)(e.itemUrl);return{origin:"portal-item",messages:[],writtenProperties:[],url:t,portal:e.portal||n.Z.getDefault(),portalItem:e,verifyItemRelativeUrls:t?{rootPath:t.path,writtenUrls:[]}:null,blockedRelativeUrls:[]}}function s(e){return{origin:"web-map",url:(0,a.mN)(e.itemUrl),portal:e.portal||n.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function l(e,t){const r=(0,a.mN)(e.itemUrl);return{origin:"web-map",messages:[],writtenProperties:[],url:r,portal:e.portal||n.Z.getDefault(),portalItem:e,initiator:t,verifyItemRelativeUrls:r?{rootPath:r.path,writtenUrls:[]}:null,blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}}}},96187:(e,t,r)=>{r.d(t,{T:()=>n});var a=r(3172);async function n(e,t){const{data:r}=await(0,a.Z)(e,{responseType:"json",query:{f:"json",...t?.customParameters,token:t?.apiKey}});return r}},14769:(e,t,r)=>{r.d(t,{w:()=>i});var a=r(68773),n=r(20102),o=r(71058);function i(e){if(a.default.apiKey&&(0,o.r)(e.portal.url))throw new n.Z("save-api-key-utils:api-key-not-supported",`Saving is not supported on ${e.portal.url} when using an api key`)}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3794,8592],{48853:(e,t,s)=>{s.d(t,{Qn:()=>d,iG:()=>h});var i,r=s(19153),n=s(1542),a=s(17126);(i||(i={})).TimeZoneNotRecognized="TimeZoneNotRecognized";const o={[i.TimeZoneNotRecognized]:"Timezone identifier has not been recognized."};class l extends Error{constructor(e,t){super((0,r.gx)(o[e],t)),this.declaredRootClass="esri.arcade.arcadedate.dateerror",Error.captureStackTrace&&Error.captureStackTrace(this,l)}}function u(e,t,s){return e<t?e-t:e>s?e-s:0}function c(e,t,s){return e<t?t:e>s?s:e}class h{constructor(e){this._date=e,this.declaredRootClass="esri.arcade.arcadedate"}static fromParts(e=0,t=1,s=1,i=0,r=0,n=0,o=0,l){if(isNaN(e)||isNaN(t)||isNaN(s)||isNaN(i)||isNaN(r)||isNaN(n)||isNaN(o))return null;const m=a.ou.local(e,t).daysInMonth;let f=a.ou.fromObject({day:c(s,1,m),year:e,month:c(t,1,12),hour:c(i,0,23),minute:c(r,0,59),second:c(n,0,59),millisecond:c(o,0,999)},{zone:d(l)});return f=f.plus({months:u(t,1,12),days:u(s,1,m),hours:u(i,0,23),minutes:u(r,0,59),seconds:u(n,0,59),milliseconds:u(o,0,999)}),new h(f)}static get systemTimeZoneCanonicalName(){return Intl.DateTimeFormat().resolvedOptions().timeZone??"system"}static arcadeDateAndZoneToArcadeDate(e,t){const s=d(t);return e.isUnknownTimeZone||s===n.yV.instance?h.fromParts(e.year,e.monthJS+1,e.day,e.hour,e.minute,e.second,e.millisecond,s):new h(e._date.setZone(s))}static dateJSToArcadeDate(e){return new h(a.ou.fromJSDate(e,{zone:"system"}))}static dateJSAndZoneToArcadeDate(e,t="system"){const s=d(t);return new h(a.ou.fromJSDate(e,{zone:s}))}static unknownEpochToArcadeDate(e){return new h(a.ou.fromMillis(e,{zone:n.yV.instance}))}static unknownDateJSToArcadeDate(e){return new h(a.ou.fromMillis(e.getTime(),{zone:n.yV.instance}))}static epochToArcadeDate(e,t="system"){const s=d(t);return new h(a.ou.fromMillis(e,{zone:s}))}static dateTimeToArcadeDate(e){return new h(e)}clone(){return new h(this._date)}changeTimeZone(e){const t=d(e);return h.dateTimeToArcadeDate(this._date.setZone(t))}static dateTimeAndZoneToArcadeDate(e,t){const s=d(t);return e.zone===n.yV.instance||s===n.yV.instance?h.fromParts(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond,s):new h(e.setZone(s))}static nowToArcadeDate(e){const t=d(e);return new h(a.ou.fromJSDate(new Date,{zone:t}))}static nowUTCToArcadeDate(){return new h(a.ou.utc())}get isSystem(){return"system"===this.timeZone||this.timeZone===h.systemTimeZoneCanonicalName}equals(e){return this.isSystem&&e.isSystem?this.toNumber()===e.toNumber():this.isUnknownTimeZone===e.isUnknownTimeZone&&this._date.equals(e._date)}get isUnknownTimeZone(){return this._date.zone===n.yV.instance}get isValid(){return this._date.isValid}get hour(){return this._date.hour}get second(){return this._date.second}get day(){return this._date.day}get dayOfWeekISO(){return this._date.weekday}get dayOfWeekJS(){let e=this._date.weekday;return e>6&&(e=0),e}get millisecond(){return this._date.millisecond}get monthISO(){return this._date.month}get weekISO(){return this._date.weekNumber}get yearISO(){return this._date.weekYear}get monthJS(){return this._date.month-1}get year(){return this._date.year}get minute(){return this._date.minute}get zone(){return this._date.zone}get timeZoneOffset(){return this.isUnknownTimeZone?0:this._date.offset}get timeZone(){if(this.isUnknownTimeZone)return"unknown";if("system"===this._date.zone.type)return"system";const e=this.zone;return"fixed"===e.type?0===e.fixed?"UTC":e.formatOffset(0,"short"):e.name}stringify(){return JSON.stringify(this.toJSDate())}plus(e){return new h(this._date.plus(e))}diff(e,t="milliseconds"){return this._date.diff(e._date,t)[t]}toISOString(e){return e?this._date.toISO({suppressMilliseconds:!0,includeOffset:!this.isUnknownTimeZone}):this._date.toISO({includeOffset:!this.isUnknownTimeZone})}toFormat(e,t){return this.isUnknownTimeZone&&(e=e.replaceAll("Z","")),this._date.toFormat(e,t)}toJSDate(){return this._date.toJSDate()}toSQLValue(){return this._date.toFormat("yyyy-LL-dd HH:mm:ss")}toSQLWithKeyword(){return`timestamp '${this.toSQLValue()}'`}toDateTime(){return this._date}toNumber(){return this._date.toMillis()}getTime(){return this._date.toMillis()}toUTC(){return new h(this._date.toUTC())}toLocal(){return new h(this._date.toLocal())}toString(){return this.toISOString(!0)}static fromReaderAsTimeStampOffset(e){if(!e)return null;const t=a.ou.fromISO(e,{setZone:!0});return new h(t)}}function d(e,t=!0){if(e instanceof a.ld)return e;if("system"===e.toLowerCase())return"system";if("utc"===e.toLowerCase())return"UTC";if("unknown"===e.toLowerCase())return n.yV.instance;if(/^[\+\-]?[0-9]{1,2}([:][0-9]{2})?$/.test(e)){const t=a.Qf.parseSpecifier("UTC"+(e.startsWith("+")||e.startsWith("-")?"":"+")+e);if(t)return t}const s=a.vF.create(e);if(!s.isValid){if(t)throw new l(i.TimeZoneNotRecognized);return null}return s}},77286:(e,t,s)=>{s.d(t,{EI:()=>r,Lz:()=>a,SV:()=>n,U:()=>l,r1:()=>o});var i=s(6570);function r(e){if(null==e)return null;if("number"==typeof e)return e;let t=e.toLowerCase();switch(t=t.replaceAll(/\s/g,""),t=t.replaceAll("-",""),t){case"meters":case"meter":case"m":case"squaremeters":case"squaremeter":return 109404;case"miles":case"mile":case"squaremile":case"squaremiles":return 109439;case"kilometers":case"kilometer":case"squarekilometers":case"squarekilometer":case"km":return 109414;case"acres":case"acre":case"ac":return 109402;case"hectares":case"hectare":case"ha":return 109401;case"yard":case"yd":case"yards":case"squareyards":case"squareyard":return 109442;case"feet":case"ft":case"foot":case"squarefeet":case"squarefoot":return 109405;case"nmi":case"nauticalmile":case"nauticalmiles":case"squarenauticalmile":case"squarenauticalmiles":return 109409}return null}function n(e){if(null==e)return null;switch(e.type){case"polygon":case"multipoint":case"polyline":return e.extent;case"point":return new i.Z({xmin:e.x,ymin:e.y,xmax:e.x,ymax:e.y,spatialReference:e.spatialReference});case"extent":return e}return null}function a(e){if(null==e)return null;if("number"==typeof e)return e;let t=e.toLowerCase();switch(t=t.replaceAll(/\s/g,""),t=t.replaceAll("-",""),t){case"meters":case"meter":case"m":case"squaremeters":case"squaremeter":return 9001;case"miles":case"mile":case"squaremile":case"squaremiles":return 9093;case"kilometers":case"kilometer":case"squarekilometers":case"squarekilometer":case"km":return 9036;case"yard":case"yd":case"yards":case"squareyards":case"squareyard":return 9096;case"feet":case"ft":case"foot":case"squarefeet":case"squarefoot":return 9002;case"nmi":case"nauticalmile":case"nauticalmiles":case"squarenauticalmile":case"squarenauticalmiles":return 9030}return null}function o(e){if(null==e)return null;const t=e.clone();return void 0!==e.cache._geVersion&&(t.cache._geVersion=e.cache._geVersion),t}function l(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}},88764:(e,t,s)=>{s.d(t,{q:()=>l});var i,r,n,a=s(5732),o={exports:{}};i=o,r=function(){function e(s,i,r,n,a){for(;n>r;){if(n-r>600){var o=n-r+1,l=i-r+1,u=Math.log(o),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);e(s,i,Math.max(r,Math.floor(i-l*c/o+h)),Math.min(n,Math.floor(i+(o-l)*c/o+h)),a)}var d=s[i],m=r,f=n;for(t(s,r,i),a(s[n],d)>0&&t(s,r,n);m<f;){for(t(s,m,f),m++,f--;a(s[m],d)<0;)m++;for(;a(s[f],d)>0;)f--}0===a(s[r],d)?t(s,r,f):t(s,++f,n),f<=i&&(r=f+1),i<=f&&(n=f-1)}}function t(e,t,s){var i=e[t];e[t]=e[s],e[s]=i}function s(e,t){return e<t?-1:e>t?1:0}return function(t,i,r,n,a){e(t,i,r||0,n||t.length-1,a||s)}},void 0!==(n=r())&&(i.exports=n);const l=(0,a.g)(o.exports)},95528:(e,t,s)=>{s.d(t,{t:()=>o});var i=s(22974),r=s(58971),n=s(10661);class a{constructor(e,t){this._observable=new n.s,this._value=e,this._equalityFunction=t}get value(){return(0,r.it)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function o(e,t=i.y7){return new a(e,t)}},22641:(e,t,s)=>{s.d(t,{u:()=>o});var i=s(48853),r=s(70171),n=s(17126);function a(e){e=e.replaceAll(/LTS|LT|LL?L?L?|l{1,4}/g,"[$&]");let t="";const s=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;for(const i of e.match(s)||[])switch(i){case"D":t+="d";break;case"DD":t+="dd";break;case"DDD":t+="o";break;case"d":t+="c";break;case"ddd":t+="ccc";break;case"dddd":t+="cccc";break;case"M":t+="L";break;case"MM":t+="LL";break;case"MMM":t+="LLL";break;case"MMMM":t+="LLLL";break;case"YY":t+="yy";break;case"Y":case"YYYY":t+="yyyy";break;case"Q":t+="q";break;case"X":case"x":t+=i;break;default:i.length>=2&&"["===i.slice(0,1)&&"]"===i.slice(-1)?t+=`'${i.slice(1,-1)}'`:t+=`'${i}'`}return t}class o{constructor(e,t,s){this._year=e,this._month=t,this._day=s,this.declaredRootClass="esri.core.sql.dateonly"}get month(){return this._month}get monthJS(){return this._month-1}get year(){return this._year}get day(){return this._day}get isValid(){return this.toDateTime("unknown").isValid}equals(e){return e instanceof o&&e.day===this.day&&e.month===this.month&&e.year===this.year}clone(){return new o(this._year,this._month,this._day)}toDateTime(e){return n.ou.fromObject({day:this.day,month:this.month,year:this.year},{zone:(0,i.Qn)(e)})}toDateTimeLuxon(e){return n.ou.fromObject({day:this.day,month:this.month,year:this.year},{zone:(0,i.Qn)(e)})}toString(){return`${this.year.toString().padStart(4,"0")}-${this.month.toString().padStart(2,"0")}-${this.day.toString().padStart(2,"0")}`}toFormat(e=null){if(null===e||""===e)return this.toString();if(!(e=a(e)))return"";const t=this.toDateTime("unknown");return i.iG.dateTimeToArcadeDate(t).toFormat(e,{locale:(0,r.Kd)(),numberingSystem:"latn"})}toArcadeDate(){const e=this.toDateTime("unknown");return i.iG.dateTimeToArcadeDate(e)}toNumber(){return this.toDateTime("unknown").toMillis()}toJSDate(){return this.toDateTime("unknown").toJSDate()}toStorageFormat(){return this.toFormat("yyyy-LL-dd")}toSQLValue(){return this.toFormat("yyyy-LL-dd")}toSQLWithKeyword(){return"date '"+this.toFormat("yyyy-LL-dd")+"'"}plus(e,t){return o.fromDateTime(this.toUTCDateTime().plus({[e]:t}))}toUTCDateTime(){return n.ou.utc(this.year,this.month,this.day,0,0,0,0)}difference(e,t){switch(t.toLowerCase()){case"days":case"day":case"d":return this.toUTCDateTime().diff(e.toUTCDateTime(),"days").days;case"months":case"month":return this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months;case"minutes":case"minute":case"m":return"M"===t?this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months:this.toUTCDateTime().diff(e.toUTCDateTime(),"minutes").minutes;case"seconds":case"second":case"s":return this.toUTCDateTime().diff(e.toUTCDateTime(),"seconds").seconds;case"milliseconds":case"millisecond":case"ms":default:return this.toUTCDateTime().diff(e.toUTCDateTime(),"milliseconds").milliseconds;case"hours":case"hour":case"h":return this.toUTCDateTime().diff(e.toUTCDateTime(),"hours").hours;case"years":case"year":case"y":return this.toUTCDateTime().diff(e.toUTCDateTime(),"years").years}}static fromMilliseconds(e){const t=n.ou.fromMillis(e,{zone:n.Qf.utcInstance});return t.isValid?o.fromParts(t.year,t.month,t.day):null}static fromSeconds(e){const t=n.ou.fromSeconds(e,{zone:n.Qf.utcInstance});return t.isValid?o.fromParts(t.year,t.month,t.day):null}static fromReader(e){if(!e)return null;const t=e.split("-");return 3!==t.length?null:new o(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10))}static fromParts(e,t,s){const i=new o(e,t,s);return!1===i.isValid?null:i}static fromDateJS(e){return o.fromParts(e.getFullYear(),e.getMonth()+1,e.getDay())}static fromDateTime(e){return o.fromParts(e.year,e.month,e.day)}static fromSqlTimeStampOffset(e){return this.fromDateTime(e.toDateTime())}static fromString(e,t=null){if(""===e)return null;if(null===e)return null;const s=[];if(t)(t=a(t))&&s.push(t);else if(null===t||""===t){const t=n.ou.fromISO(e,{setZone:!0});return t.isValid?o.fromParts(t.year,t.month,t.day):null}for(const i of s){const s=n.ou.fromFormat(e,t??i);if(s.isValid)return new o(s.year,s.month,s.day)}return null}static fromNow(e="system"){const t=n.ou.fromJSDate(new Date).setZone((0,i.Qn)(e));return new o(t.year,t.month,t.day)}}},53970:(e,t,s)=>{s.d(t,{n:()=>o});var i=s(77286),r=s(70171),n=s(17126);function a(e){if(!e)return"";const t=/(a|A|hh?|HH?|mm?|ss?|SSS|S|.)/g;let s="";for(const i of e.match(t)||[])switch(i){case"SSS":case"m":case"mm":case"h":case"hh":case"H":case"HH":case"s":case"ss":s+=i;break;case"A":case"a":s+="a";break;default:s+=`'${i}'`}return s}class o{constructor(e,t,s,i){this._hour=e,this._minute=t,this._second=s,this._millisecond=i,this.declaredRootClass="esri.core.sql.timeonly"}get hour(){return this._hour}get minute(){return this._minute}get second(){return this._second}get millisecond(){return this._millisecond}equals(e){return e instanceof o&&e.hour===this.hour&&e.minute===this.minute&&e.second===this.second&&e.millisecond===this.millisecond}clone(){return new o(this.hour,this.minute,this.second,this.millisecond)}isValid(){return(0,i.U)(this.hour)&&(0,i.U)(this.minute)&&(0,i.U)(this.second)&&(0,i.U)(this.millisecond)&&this.hour>=0&&this.hour<24&&this.minute>=0&&this.minute<60&&this.second>=0&&this.second<60&&this.millisecond>=0&&this.millisecond<1e3}toString(){return`${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}`+(this.millisecond>0?"."+this.millisecond.toString().padStart(3,"0"):"")}toSQLValue(){return this.toString()}toSQLWithKeyword(){return`time '${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}${this.millisecond>0?"."+this.millisecond.toString().padStart(3,"0"):""}'`}toStorageString(){return`${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}`}toFormat(e=null){return null===e||""===e?this.toString():(e=a(e))?n.ou.local(1970,1,1,this._hour,this._minute,this._second,this._millisecond).toFormat(e,{locale:(0,r.Kd)(),numberingSystem:"latn"}):""}toNumber(){return this.millisecond+1e3*this.second+1e3*this.minute*60+60*this.hour*60*1e3}static fromParts(e,t,s,i){const r=new o(e,t,s,i);return r.isValid()?r:null}static fromReader(e){if(!e)return null;const t=e.split(":");return 3!==t.length?null:new o(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10),0)}static fromMilliseconds(e){if(e>864e5||e<0)return null;const t=Math.floor(e/1e3%60),s=Math.floor(e/6e4%60),i=Math.floor(e/36e5%24),r=Math.floor(e%1e3);return new o(i,s,t,r)}static fromDateJS(e){return new o(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}static fromDateTime(e){return new o(e.hour,e.minute,e.second,e.millisecond)}static fromSqlTimeStampOffset(e){return this.fromDateTime(e.toDateTime())}static fromString(e,t=null){if(""===e)return null;if(null===e)return null;const s=[];t?(t=a(t))&&s.push(t):null!==t&&""!==t||(s.push("HH:mm:ss"),s.push("HH:mm:ss.SSS"),s.push("hh:mm:ss a"),s.push("hh:mm:ss.SSS a"),s.push("HH:mm"),s.push("hh:mm a"),s.push("H:mm"),s.push("h:mm a"),s.push("H:mm:ss"),s.push("h:mm:ss a"),s.push("H:mm:ss.SSS"),s.push("h:mm:ss.SSS a"));for(const t of s){const s=n.ou.fromFormat(e,t);if(s.isValid)return new o(s.hour,s.minute,s.second,s.millisecond)}return null}plus(e,t){switch(e){case"days":case"years":case"months":return this.clone();case"hours":case"minutes":case"seconds":case"milliseconds":return o.fromDateTime(this.toUTCDateTime().plus({[e]:t}))}return null}toUTCDateTime(){return n.ou.utc(1970,1,1,this.hour,this.minute,this.second,this.millisecond)}difference(e,t){switch(t.toLowerCase()){case"days":case"day":case"d":return this.toUTCDateTime().diff(e.toUTCDateTime(),"days").days;case"months":case"month":return this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months;case"minutes":case"minute":case"m":return"M"===t?this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months:this.toUTCDateTime().diff(e.toUTCDateTime(),"minutes").minutes;case"seconds":case"second":case"s":return this.toUTCDateTime().diff(e.toUTCDateTime(),"seconds").seconds;case"milliseconds":case"millisecond":case"ms":default:return this.toUTCDateTime().diff(e.toUTCDateTime(),"milliseconds").milliseconds;case"hours":case"hour":case"h":return this.toUTCDateTime().diff(e.toUTCDateTime(),"hours").hours;case"years":case"year":case"y":return this.toUTCDateTime().diff(e.toUTCDateTime(),"years").years}}}},1542:(e,t,s)=>{s.d(t,{A4:()=>n,L9:()=>a,Rw:()=>o,yV:()=>r});var i=s(17126);class r{}function n(e){return e instanceof i.ld?e===r.instance:"unknown"===e?.toString().toLowerCase()}function a(e){return n(e)?r.instance:e}function o(e,t){return i.ou.fromObject({day:e.day,year:e.year,month:e.month,hour:e.hour,minute:e.minute,second:e.second,millisecond:e.millisecond},{zone:t})}r.instance=new i.vF("Etc/UTC")},37455:(e,t,s)=>{s.d(t,{N:()=>i});const i={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,s){const i=new r(e.getPointX(t),e.getPointY(t),s),n=e.hasZ(t),a=e.hasM(t);return n&&(i.z=e.getPointZ(t)),a&&(i.m=e.getPointM(t)),i},exportPolygon:function(e,t,s){return new n(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,s){return new a(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,s){return new o(e.exportPoints(t),s,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,s){const i=e.hasZ(t),r=e.hasM(t),n=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),s);if(i){const s=e.getZExtent(t);n.zmin=s.vmin,n.zmax=s.vmax}if(r){const s=e.getMExtent(t);n.mmin=s.vmin,n.mmax=s.vmax}return n}};class r{constructor(e,t,s){this.x=e,this.y=t,this.spatialReference=s,this.z=void 0,this.m=void 0}}class n{constructor(e,t,s,i){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class a{constructor(e,t,s,i){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class o{constructor(e,t,s,i){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class l{constructor(e,t,s,i,r){this.xmin=e,this.ymin=t,this.xmax=s,this.ymax=i,this.spatialReference=r,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},60437:(e,t,s)=>{s.d(t,{G_:()=>_,HH:()=>a,JR:()=>f,TC:()=>o,Tn:()=>h,Ue:()=>r,al:()=>n,bZ:()=>p,cS:()=>m,dp:()=>u,fS:()=>g,is:()=>y,op:()=>c,pp:()=>l,t8:()=>d});var i=s(6570);function r(e=T){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function n(e,t,s,i,n,a,o=r()){return o[0]=e,o[1]=t,o[2]=s,o[3]=i,o[4]=n,o[5]=a,o}function a(e,t){const s=isFinite(e[2])||isFinite(e[5]);return new i.Z(s?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function o(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function c(e,t,s=e){return s[0]=t[0],s[1]=t[1],s[2]=t[2],s!==e&&(s[3]=e[3],s[4]=e[4],s[5]=e[5]),s}function h(e,t,s=e){return s[3]=t[0],s[4]=t[1],s[5]=t[2],s!==e&&(s[0]=e[0],s[1]=e[1],s[2]=e[2]),e}function d(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}function m(e){return e?d(e,_):r(_)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function p(e,t,s,i,r){return e[0]=t,e[1]=s,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=r,e[5]=Number.POSITIVE_INFINITY,e}function y(e){return 6===e.length}function g(e,t,s){if(null==e||null==t)return e===t;if(!y(e)||!y(t))return!1;if(s){for(let i=0;i<e.length;i++)if(!s(e[i],t[i]))return!1}else for(let s=0;s<e.length;s++)if(e[s]!==t[s])return!1;return!0}s(24470);const _=[1/0,1/0,1/0,-1/0,-1/0,-1/0],T=[0,0,0,0,0,0];r()},70272:(e,t,s)=>{s.d(t,{S6:()=>r,nd:()=>n,u_:()=>i});class i{constructor(e=null,t={},s,i){this.geometry=e,this.attributes=t,this.centroid=s,this.objectId=i,this.displayId=0,this.geohashX=0,this.geohashY=0}weakClone(){const e=new i(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}}function r(e){return!!e.geometry?.coords?.length}class n extends i{}},44876:(e,t,s)=>{s.d(t,{Z:()=>i});class i{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new i;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},5428:(e,t,s)=>{s.d(t,{Z:()=>i});class i{constructor(e=[],t=[],s=!1){this.lengths=e??[],this.coords=t??[],this.hasIndeterminateRingOrder=s}static fromRect(e){const[t,s,r,n]=e,a=r-t,o=n-s;return new i([5],[t,s,a,0,0,o,-a,0,0,-o])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let s=0;s<this.lengths.length;s++){const i=this.lengths[s];for(let s=0;s<i;s++)e(this.coords[2*(s+t)],this.coords[2*(s+t)+1]);t+=i}}clone(e){return e?(e.set(this.coords),new i(this.lengths.slice(),e,this.hasIndeterminateRingOrder)):new i(this.lengths.slice(),this.coords.slice(),this.hasIndeterminateRingOrder)}}},3489:(e,t,s)=>{s.d(t,{q:()=>Ge});var i=s(67676),r=s(20102),n=s(96674),a=s(22974),o=s(70586),l=s(69801),u=s(95330),c=s(67900),h=s(73615),d=s(60437),m=s(24470),f=s(20322),p=s(33955),y=s(16306),g=s(8744),_=s(98732),T=s(13867),S=s(8968),x=s(86719);const I=new class{constructor(e,t){this._cache=new T.z(e),this._invalidCache=new T.z(t)}get(e,t){const s=`${t.uid}:${e}`,i=this._cache.get(s);if(i)return i;if(null!=this._invalidCache.get(s))return null;try{const i=S.WhereClause.create(e,t);return this._cache.put(s,i),i}catch(e){return this._invalidCache.put(s,e),null}}getError(e,t){const s=`${t.uid}:${e}`;return this._invalidCache.get(s)??null}}(50,500),F="unsupported-query",w=" as ",R=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]),E=new Set(["esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),b=new Set(["esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...R,...E]);function N(e,t,s={}){const i=v(t,e);if(!i){const s=I.getError(t,e);throw new r.Z(F,"invalid SQL expression",{expression:t,error:s})}const n=s.expressionName||"expression";if(s.validateStandardized&&!i.isStandardized)throw new r.Z(F,`${n} is not standard`,{expression:t});if(s.validateAggregate&&!i.isAggregate)throw new r.Z(F,`${n} does not contain a valid aggregate function`,{expression:t});return i.fieldNames}function A(e,t,s,i,n){if(!s)return!0;const a="having clause",o=N(e,s,{validateAggregate:!0,expressionName:a});C(e,t,o,{expressionName:a,query:n});const l=v(s,e),u=l?.getExpressions().every((t=>{const{aggregateType:s,field:r}=t,n=e.get(r)?.name;return i.some((t=>{const{onStatisticField:i,statisticType:r}=t,a=e.get(i)?.name;return a===n&&r.toLowerCase().trim()===s}))}));if(!u)throw new r.Z(F,"expressions in having clause should also exist in outStatistics",{having:s});return!0}function v(e,t){return e?I.get(e,t):null}function D(e){return/\((.*?)\)/.test(e)?e:e.split(w)[0]}function M(e){return e.split(w)[1]}function C(e,t,s,i={}){const n=new Map;if(function(e,t,s,i,r){for(const n of r)if("*"!==n)if(t.get(n))O(e,t,s,i,n);else try{const r=N(t,D(n),{validateStandardized:!0});for(const n of r)O(e,t,s,i,n)}catch(t){e.set(n,{type:"expression-error",expression:n,error:t})}}(n,e,t,i.allowedFieldTypes??b,s),n.size){const e=i.expressionName??"expression";throw new r.Z(F,`${e} contains invalid or missing fields`,{errors:Array.from(n.values()),query:i.query})}}function O(e,t,s,i,r){if("*"===r)return;const n=t.get(r);n?s.has(n.name)?!1===i?.has(n.type)&&e.set(r,{type:"invalid-type",fieldName:n.name,fieldType:x.v.fromJSON(n.type),allowedFieldTypes:Array.from(i,(e=>x.v.fromJSON(e)))}):e.set(r,{type:"missing-field",fieldName:n.name}):e.set(r,{type:"invalid-field",fieldName:r})}var P=s(42712),k=s(37427),Z=s(61159),L=s(35308),G=s(49600),U=s(82397),q=s(35671),V=s(79213),z=s(24452),Q=s(59266);class Y{constructor(e,t,s){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=s,this.featureAdapter=t;const i=e.outFields;if(i&&!i.includes("*")){this.outFields=i;let e=0;for(const t of i){const i=D(t),r=this.fieldsIndex.get(i),n=r?null:v(i,s),a=r?r.name:M(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:n})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach((e=>this.getAttributes(e))),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,s){const i=s?s.name:t;let r=null;return this._fieldDataCache.has(i)?r=this._fieldDataCache.get(i)?.clause:s||(r=v(t,this.fieldsIndex),this._fieldDataCache.set(i,{alias:i,clause:r})),s?this.featureAdapter.getAttribute(e,i):r?.calculateValue(e,this.featureAdapter)}getDataValues(e,t,s=!0){const i=t.normalizationType,r=t.normalizationTotal,n=this.fieldsIndex.get(t.field),a=(0,q.UQ)(n)||(0,q.ig)(n),o=(0,q.sX)(n);return e.map((e=>{let n=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(n=`${(0,z.wk)(n)}${t.fieldDelimiter}${(0,z.wk)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(n=`${n}${t.fieldDelimiter}${(0,z.wk)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):"string"==typeof n&&s&&(a?n=n?new Date(n).getTime():null:o&&(n=n?(0,V.yO)(n):null)),i&&Number.isFinite(n)){const s="field"===i&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;n=(0,z.fk)(n,i,s,r)}return n}))}async getExpressionValues(e,t,s,i,r){const{arcadeUtils:n}=await(0,Q.LC)(),a=n.hasGeometryOperations(t);a&&await n.enableGeometryOperations();const o=n.createFunction(t),l=n.getViewInfo(s),u={fields:this.fieldsIndex.fields};return e.map((e=>{const t={attributes:this.featureAdapter.getAttributes(e),layer:u,geometry:a?{...(0,P.Op)(i.geometryType,i.hasZ,i.hasM,this.featureAdapter.getGeometry(e)),spatialReference:s?.spatialReference}:null},c=n.createExecContext(t,l,r);return n.executeFunction(o,c)}))}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:v(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testFeature(e,this.featureAdapter)??!1}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:v(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){const t=this.outFields;if(!t?.length)return this.featureAdapter.getAttributes(e);const s={};for(const i of t){const{alias:t,clause:r}=this._fieldDataCache.get(i);s[t]=r?r.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return s}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,s=[];if(t)for(const i of t){const{alias:t}=this._fieldDataCache.get(i);s.push(e[t])}else for(const t in e)s.push(e[t]);const i=`${(t||["*"]).join(",")}=${s.join(",")}`;let r=this._returnDistinctMap.get(i)||0;return this._returnDistinctMap.set(i,++r),r>1?null:e}}function j(e,t,s){return{objectId:e,target:t,distance:s,type:"vertex"}}function B(e,t,s,i,r,n=!1){return{objectId:e,target:t,distance:s,type:"edge",start:i,end:r,draped:n}}class H{constructor(e,t,s){this.items=e,this.query=t,this.geometryType=s.geometryType,this.hasM=s.hasM,this.hasZ=s.hasZ,this.fieldsIndex=s.fieldsIndex,this.objectIdField=s.objectIdField,this.spatialReference=s.spatialReference,this.featureAdapter=s.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new Y(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:s,outStatistics:i}=this.query,r=t?.length;if(!r)return 1;const n=new Map,a=new Map,o=new Set;for(const r of i){const{statisticType:i}=r,l="exceedslimit"!==i?r.onStatisticField:void 0;if(!a.has(l)){const s=[];for(const i of t){const t=this._getAttributeValues(e,i,n);s.push(t)}a.set(l,this._calculateUniqueValues(s,e.returnDistinctValues))}const u=a.get(l);for(const t in u){const{data:i,items:r}=u[t],n=i.join(",");s&&!e.validateItems(r,s)||o.add(n)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some((e=>"exceedslimit"===e.statisticType))?this._createExceedsLimitQueryResponse(this.query):await this._createStatisticsQueryResponse(this.query):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){const t=this.query.geometry;(0,g.JY)(this.query.outSR)&&!(0,g.fS)(t.spatialReference,this.query.outSR)?e.queryGeometry=(0,P.S2)({spatialReference:this.query.outSR,...(0,k.iV)(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=(0,P.S2)({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t){const s=this.featureAdapter,i=J(this.hasZ,this.hasM),{point:r,mode:n}=e,a="number"==typeof e.distance?e.distance:e.distance.x,o="number"==typeof e.distance?e.distance:e.distance.y,l={candidates:[]},u="esriGeometryPolygon"===this.geometryType,c=this._getPointCreator(n,this.spatialReference,t),h=new W(null,0),d=new W(null,0),m={x:0,y:0,z:0};for(const t of this.items){const n=s.getGeometry(t);if(null==n)continue;const{coords:f,lengths:p}=n;if(h.coords=f,d.coords=f,e.returnEdge){let e=0;for(let n=0;n<p.length;n++){const u=p[n];for(let n=0;n<u;n++,e+=i){const f=h;if(f.coordsIndex=e,n!==u-1){const n=d;n.coordsIndex=e+i;const u=m;$(m,r,f,n);const h=(r.x-u.x)/a,p=(r.y-u.y)/o,y=h*h+p*p;y<=1&&l.candidates.push(B(s.getObjectId(t),c(u),Math.sqrt(y),c(f),c(n)))}}}}if("none"!==e.vertexMode){const n=u?f.length-i:f.length;if("all"===e.vertexMode)for(let e=0;e<n;e+=i){const i=h;i.coordsIndex=e;const n=(r.x-i.x)/a,u=(r.y-i.y)/o,d=n*n+u*u;d<=1&&l.candidates.push(j(s.getObjectId(t),c(i),Math.sqrt(d)))}else if("ends"===e.vertexMode){const e=[0];u||e.push(f.length-i);for(const i of e){const e=h;e.coordsIndex=i;const n=(r.x-e.x)/a,u=(r.y-e.y)/o,d=n*n+u*u;d<=1&&l.candidates.push(j(s.getObjectId(t),c(e),Math.sqrt(d)))}}}}return l.candidates.sort(((e,t)=>e.distance-t.distance)),l}_getPointCreator(e,t,s){const i=null==s||(0,g.fS)(t,s)?e=>e:e=>(0,k.iV)(e,t,s),{hasZ:r}=this;return"3d"===e?r?({x:e,y:t,z:s})=>i({x:e,y:t,z:s}):({x:e,y:t})=>i({x:e,y:t,z:0}):({x:e,y:t})=>i({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,minValue:a,maxValue:o,scale:l,timeZone:u}=e,c=this.fieldsIndex.get(t),h=(0,q.y2)(c)||(0,q.UQ)(c)||(0,q.ig)(c),d=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,scale:l,timeZone:u}),m=(0,z.S5)({normalizationType:r,normalizationField:i,minValue:a,maxValue:o}),f={value:.5,fieldType:c?.type},p=(0,q.qN)(c)?(0,z.H0)({values:d,supportsNullCount:m,percentileParams:f}):(0,z.i5)({values:d,minValue:a,maxValue:o,useSampleStdDev:!r,supportsNullCount:m,percentileParams:f});return(0,z.F_)(p,h)}async createUniqueValuesResponse(e){const{field:t,valueExpression:s,domains:i,returnAllCodedValues:r,scale:n,timeZone:a}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:s,scale:n,timeZone:a},!1),l=(0,z.eT)(o);return(0,z.Qm)(l,i,r,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:h,timeZone:d}=e,m=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,scale:h,timeZone:d}),f=(0,z.G2)(m,{field:t,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return(0,z.DL)(f,a)}async createHistogramResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:h,timeZone:d}=e,m=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,scale:h,timeZone:d});return(0,z.oF)(m,{field:t,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,s){if(e.length>1&&t?.length)for(const i of t.reverse()){const t=i.split(" "),r=t[0],n=this.fieldsIndex.get(r),a=!!t[1]&&"desc"===t[1].toLowerCase(),o=(0,z.Lq)(n?.type,a);e.sort(((e,t)=>{const i=s(e,r,n),a=s(t,r,n);return o(i,a)}))}}_createFeatureQueryResponse(e){const t=this.items,{geometryType:s,hasM:i,hasZ:r,objectIdField:n,spatialReference:a}=this,{outFields:o,outSR:l,quantizationParameters:u,resultRecordCount:c,resultOffset:h,returnZ:d,returnM:m}=e,f=null!=c&&t.length>(h||0)+c,p=o&&(o.includes("*")?[...this.fieldsIndex.fields]:o.map((e=>this.fieldsIndex.get(e))));return{exceededTransferLimit:f,features:this._createFeatures(e,t),fields:p,geometryType:s,hasM:i&&m,hasZ:r&&d,objectIdFieldName:n,spatialReference:(0,P.S2)(l||a),transform:u&&(0,U.vY)(u)||null}}_createFeatures(e,t){const s=new Y(e,this.featureAdapter,this.fieldsIndex),{hasM:i,hasZ:r}=this,{orderByFields:n,quantizationParameters:a,returnGeometry:o,returnCentroid:l,maxAllowableOffset:u,resultOffset:c,resultRecordCount:h,returnZ:d=!1,returnM:m=!1}=e,f=r&&d,p=i&&m;let y=[],g=0;const _=[...t];if(this._sortFeatures(_,n,((e,t,i)=>s.getFieldValue(e,t,i))),o||l){const e=(0,U.vY)(a)??void 0;if(o&&!l)for(const t of _)y[g++]={attributes:s.getAttributes(t),geometry:(0,P.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),u,e,f,p)};else if(!o&&l)for(const t of _)y[g++]={attributes:s.getAttributes(t),centroid:(0,P.EG)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of _)y[g++]={attributes:s.getAttributes(t),centroid:(0,P.EG)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,P.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),u,e,f,p)}}else for(const e of _){const t=s.getAttributes(e);t&&(y[g++]={attributes:t})}const T=c||0;if(null!=h){const e=T+h;y=y.slice(T,Math.min(y.length,e))}return y}_createExceedsLimitQueryResponse(e){let t=!1,s=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY;for(const t of e.outStatistics??[])if("exceedslimit"===t.statisticType){s=null!=t.maxPointCount?t.maxPointCount:Number.POSITIVE_INFINITY,i=null!=t.maxRecordCount?t.maxRecordCount:Number.POSITIVE_INFINITY,r=null!=t.maxVertexCount?t.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)t=this.items.length>s;else if(this.items.length>i)t=!0;else{const e=J(this.hasZ,this.hasM),s=this.featureAdapter;t=this.items.reduce(((e,t)=>{const i=s.getGeometry(t);return e+(null!=i&&i.coords.length||0)}),0)/e>r}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(t)}}]}}async _createStatisticsQueryResponse(e){const t={attributes:{}},s=[],i=new Map,r=new Map,n=new Map,a=new Map,o=new Y(e,this.featureAdapter,this.fieldsIndex),l=e.outStatistics,{groupByFieldsForStatistics:u,having:c,orderByFields:h,resultRecordCount:d}=e,m=u?.length,f=!!m,p=f?u[0]:null,y=f&&!this.fieldsIndex.get(p);for(const e of l??[]){const{outStatisticFieldName:l,statisticType:h}=e,g=e,_="exceedslimit"!==h?e.onStatisticField:void 0,T="percentile_disc"===h||"percentile_cont"===h,S="EnvelopeAggregate"===h||"CentroidAggregate"===h||"ConvexHullAggregate"===h,x=f&&1===m&&(_===p||y)&&"count"===h;if(f){if(!n.has(_)){const e=[];for(const t of u){const s=this._getAttributeValues(o,t,i);e.push(s)}n.set(_,this._calculateUniqueValues(e,!S&&o.returnDistinctValues))}const e=n.get(_);if(!e)continue;const t=Object.keys(e);d&&(t.sort(),t.length=d);for(const s of t){const{count:t,data:r,items:n,itemPositions:h}=e[s],d=r.join(",");if(!c||o.validateItems(n,c)){const e=a.get(d)||{attributes:{}};if(S){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:s}=await this._getAggregateGeometry(g,n);e.aggregateGeometries[s]=t}else{let s=null;if(x)s=t;else{const e=this._getAttributeValues(o,_,i),t=h.map((t=>e[t]));s=T&&"statisticParameters"in g?this._getPercentileValue(g,t):this._getStatisticValue(g,t,null,o.returnDistinctValues)}e.attributes[l]=s}let s=0;u.forEach(((t,i)=>e.attributes[this.fieldsIndex.get(t)?t:"EXPR_"+ ++s]=r[i])),a.set(d,e)}}}else if(S){t.aggregateGeometries||(t.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(g,this.items);t.aggregateGeometries[s]=e}else{const e=this._getAttributeValues(o,_,i);t.attributes[l]=T&&"statisticParameters"in g?this._getPercentileValue(g,e):this._getStatisticValue(g,e,r,o.returnDistinctValues)}const I="min"!==h&&"max"!==h||!(0,q.qN)(this.fieldsIndex.get(_))&&!this._isAnyDateField(_)?null:this.fieldsIndex.get(_)?.type;s.push({name:l,alias:l,type:I||"esriFieldTypeDouble"})}const g=f?Array.from(a.values()):[t];return this._sortFeatures(g,h,((e,t)=>e.attributes[t])),{fields:s,features:g}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return(0,q.y2)(t)||(0,q.UQ)(t)||(0,q.ig)(t)||(0,q.sX)(t)}async _getAggregateGeometry(e,t){const{convexHull:i,union:r}=await Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247)),{statisticType:n,outStatisticFieldName:a}=e,{featureAdapter:o,spatialReference:l,geometryType:u,hasZ:c,hasM:h}=this,d=t.map((e=>(0,P.Op)(u,c,h,o.getGeometry(e)))),m=i(l,d,!0)[0],f={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===n){const e=m?(0,G._w)(m):(0,G.aO)(r(l,d));f.aggregateGeometries={...e,spatialReference:l},f.outStatisticFieldName=a||"extent"}else if("CentroidAggregate"===n){const e=m?(0,L.tO)(m):(0,L.$G)((0,G.aO)(r(l,d)));f.aggregateGeometries={x:e[0],y:e[1],spatialReference:l},f.outStatisticFieldName=a||"centroid"}else"ConvexHullAggregate"===n&&(f.aggregateGeometries=m,f.outStatisticFieldName=a||"convexHull");return f}_getStatisticValue(e,t,s,i){const{onStatisticField:r,statisticType:n}=e;let a=null;return a=s?.has(r)?s.get(r):(0,q.qN)(this.fieldsIndex.get(r))||this._isAnyDateField(r)?(0,z.H0)({values:t,returnDistinct:i}):(0,z.i5)({values:i?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),s&&s.set(r,a),a["var"===n?"variance":n]}_getPercentileValue(e,t){const{onStatisticField:s,statisticParameters:i,statisticType:r}=e,{value:n,orderBy:a}=i,o=this.fieldsIndex.get(s);return(0,z.XL)(t,{value:n,orderBy:a,fieldType:o?.type,isDiscrete:"percentile_disc"===r})}_getAttributeValues(e,t,s){if(s.has(t))return s.get(t);const i=this.fieldsIndex.get(t),r=this.items.map((s=>e.getFieldValue(s,t,i)));return s.set(t,r),r}_calculateUniqueValues(e,t){const s={},i=this.items,r=i.length;for(let n=0;n<r;n++){const r=i[n],a=[];for(const t of e)a.push(t[n]);const o=a.join(",");null==s[o]?s[o]={count:1,data:a,items:[r],itemPositions:[n]}:(t||s[o].count++,s[o].items.push(r),s[o].itemPositions.push(n))}return s}async _getDataValues(e,t=!0){const s=new Y(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:i,scale:r,timeZone:n}=e;return i?s.getExpressionValues(this.items,i,{viewingMode:"map",scale:r,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},n):s.getDataValues(this.items,(0,a.d9)(e),t)}}function $(e,t,s,i){const r=i.x-s.x,n=i.y-s.y,a=r*r+n*n,o=(t.x-s.x)*r+(t.y-s.y)*n,l=Math.min(1,Math.max(0,o/a));e.x=s.x+r*l,e.y=s.y+n*l}function J(e,t){return e?t?4:3:t?3:2}class W{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}var X=s(22222),K=s(10402);const ee="unsupported-query";async function te(e,{fieldsIndex:t,geometryType:s,spatialReference:i,availableFields:n}){if((e.distance??0)<0||null!=e.geometryPrecision||e.multipatchOption&&"xyFootprint"!==e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new r.Z(ee,"Unsupported query options",{query:e});return se(t,n,e),function(e,t,s){const{outStatistics:i,groupByFieldsForStatistics:n,having:a}=s,o=n?.length,l=i?.length;if(a){if(!o||!l)throw new r.Z(ee,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:s});A(e,t,a,i,s)}if(l){if(null==(u=i)||!u.every((e=>"exceedslimit"!==e.statisticType)))return;const a=i.map((e=>e.onStatisticField)).filter(Boolean);C(e,t,a,{expressionName:"onStatisticFields",query:s}),o&&C(e,t,n,{expressionName:"groupByFieldsForStatistics",query:s});for(const n of i){const{onStatisticField:i,statisticType:a}=n;if("percentile_disc"!==a&&"percentile_cont"!==a||!("statisticParameters"in n))e.get(i)&&"count"!==a&&"min"!==a&&"max"!==a&&C(e,t,[i],{expressionName:`outStatistics with '${a}' statistic type`,allowedFieldTypes:ie,query:s});else{const{statisticParameters:e}=n;if(!e)throw new r.Z(ee,"statisticParameters should be set for percentile type",{definition:n,query:s})}}}var u}(t,n,e),Promise.all([(0,K.P0)(e,s,i),(0,k._W)(i,e.outSR)]).then((()=>e))}function se(e,t,s){const{outFields:i,orderByFields:n,returnDistinctValues:a,outStatistics:o}=s,l=o?o.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())).filter(Boolean):[];if(n&&n.length>0){const i=" asc",r=" desc",a=n.map((e=>{const t=e.toLowerCase();return t.includes(i)?t.split(i)[0]:t.includes(r)?t.split(r)[0]:e})).filter((e=>!l.includes(e)));C(e,t,a,{expressionName:"orderByFields",query:s})}if(i&&i.length>0)C(e,t,i,{expressionName:"outFields",query:s});else if(a)throw new r.Z(ee,"outFields should be specified for returnDistinctValues",{query:s});!function(e,t,s,i){if(!s)return!0;const r="where clause";C(e,t,N(e,s,{validateStandardized:!0,expressionName:r}),{expressionName:r,query:i})}(e,t,s.where,s)}const ie=new Set([...R,...E]);async function re(e,t,s,i){let n=[];if(s.valueExpression){const{arcadeUtils:e}=await(0,Q.LC)();n=e.extractFieldNames(s.valueExpression)}if(s.field&&n.push(s.field),s.field2&&n.push(s.field2),s.field3&&n.push(s.field3),s.normalizationField&&n.push(s.normalizationField),!n.length&&!s.valueExpression)throw new r.Z(ee,"field or valueExpression is required",{params:s});C(e,t,n,{expressionName:"statistics",query:i})}var ne=s(17590),ae=s(99514),oe=s(61247),le=(s(80442),s(92604)),ue=s(54790),ce=s(44553),he=s(17445),de=s(95528),me=s(76882);class fe{constructor(){this._tasks=new Array,this._running=(0,de.t)(!1)}get length(){return this._tasks.length}get running(){return this._running.value}destroy(){this.cancelAll()}runTask(e){for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,s){return this._running.value=!0,new Promise(((i,r)=>this._tasks.push(new pe(i,r,e,t,s))))}unshift(e,t,s){return this._running.value=!0,new Promise(((i,r)=>this._tasks.unshift(new pe(i,r,e,t,s))))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const s=(0,u.Hc)(t.signal);if(s&&!t.abortCallback)t.reject((0,u.zE)());else{const i=s?t.abortCallback?.((0,u.zE)()):t.callback(e);(0,u.y8)(i)?i.then(t.resolve,t.reject):t.resolve(i)}}catch(e){t.reject(e)}return this._running.value=this._tasks.length>0,!0}cancelAll(){const e=(0,u.zE)();for(const t of this._tasks)if(t.abortCallback){const s=t.abortCallback(e);t.resolve(s)}else t.reject(e);this._tasks.length=0,this._running.value=!1}}class pe{constructor(e,t,s,i=void 0,r=void 0){this.resolve=e,this.reject=t,this.callback=s,this.signal=i,this.abortCallback=r}}var ye=s(43697),ge=s(92036),_e=s(5600),Te=(s(75215),s(52011));let Se=class extends ge.Z{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,ye._)([(0,_e.Cb)()],Se.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,ye._)([(0,_e.Cb)()],Se.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),Se=(0,ye._)([(0,Te.j)("esri.views.support.DebugFlags")],Se);const xe=new Se;var Ie,Fe,we,Re=s(95720);(we=Ie||(Ie={}))[we.YIELD=1]="YIELD",function(e){e.RESOURCE_CONTROLLER_IMMEDIATE="immediate",e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.LOD_RENDERER="LoD renderer",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.OVERLAY="overlay",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="clouds generator",e[e.NONE=0]="NONE",e[e.TEST_PRIO=1]="TEST_PRIO"}(Fe||(Fe={}));const Ee=new Map([[Fe.RESOURCE_CONTROLLER_IMMEDIATE,0],[Fe.RESOURCE_CONTROLLER,4],[Fe.SLIDE,0],[Fe.STREAM_DATA_LOADER,0],[Fe.ELEVATION_QUERY,0],[Fe.TERRAIN_SURFACE,1],[Fe.SURFACE_GEOMETRY_UPDATES,1],[Fe.LOD_RENDERER,2],[Fe.GRAPHICS_CORE,2],[Fe.I3S_CONTROLLER,2],[Fe.POINT_CLOUD_LAYER,2],[Fe.FEATURE_TILE_FETCHER,2],[Fe.OVERLAY,4],[Fe.STAGE,4],[Fe.GRAPHICS_DECONFLICTOR,4],[Fe.FILTER_VISIBILITY,4],[Fe.SCALE_VISIBILITY,4],[Fe.FRUSTUM_VISIBILITY,4],[Fe.CLOUDS_GENERATOR,4],[Fe.POINT_OF_INTEREST_FREQUENT,6],[Fe.POINT_OF_INTEREST_INFREQUENT,30],[Fe.LABELER,8],[Fe.FEATURE_QUERY_ENGINE,8],[Fe.FEATURE_TILE_TREE,16],[Fe.FEATURE_TILE_TREE_ACTIVE,0],[Fe.ELEVATION_ALIGNMENT,12],[Fe.TEXT_TEXTURE_ATLAS,12],[Fe.TEXTURE_UNLOAD,12],[Fe.LINE_OF_SIGHT_TOOL,16],[Fe.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[Fe.SNAPPING,0],[Fe.SHADOW_ACCUMULATOR,30]]);function be(e){return Ee.has(e)?Ee.get(e):"number"==typeof e?e:1}const Ne=(0,me.HA)(6.5),Ae=(0,me.HA)(1),ve=(0,me.HA)(30),De=(0,me.HA)(1e3/30),Me=(0,me.HA)(100);var Ce,Oe;!function(e){e.Scheduler=class{get updating(){return this._updating.value}_updatingChanged(){this._updating.value=this._tasks.some((e=>e.needsUpdate))}constructor(){this._updating=(0,de.t)(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new ue.Z("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new s,this._state=Re.n.INTERACTING,this._tasks=new ce.Z,this._runQueue=new ce.Z,this._load=0,this._idleStateCallbacks=new ce.Z,this._idleUpdatesStartFired=!1,this._forceTask=!1,this._debug=!1,this._debugHandle=(0,he.YP)((()=>xe.SCHEDULER_LOG_SLOW_TASKS),(e=>this._debug=e),he.nn);for(const e of Object.keys(Fe))this.performanceInfo.tasks.set(Fe[e],new ue.Z(Fe[e]));const e=this;this._test={FRAME_SAFETY_BUDGET:Ne,INTERACTING_BUDGET:De,IDLE_BUDGET:Me,get availableBudget(){return e._budget.budget},usedBudget:0,getBudget:()=>e._budget,setBudget:t=>e._budget=t,updateTask:e=>this._updateTask(e),getState:e=>this._getState(e),getRuntime:e=>this._getRuntime(e),frameTaskTimes:this._frameTaskTimes,resetRuntimes:()=>this._resetRuntimes(),getRunning:()=>this._getRunning()}}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,o.hw)(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask((()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this.frame())})))}registerTask(e,s){const i=be(e),r=new t(this,e,s,i);return this._tasks.push(r),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new ue.Z(e)),r}registerIdleStateCallbacks(e,t){const s={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(s),this.state===Re.n.IDLE&&this._idleUpdatesStartFired&&s.idleBegin();const i=this;return{remove:()=>this._removeIdleStateCallbacks(s),set idleBegin(e){i._idleUpdatesStartFired&&(s.idleEnd(),i._state===Re.n.IDLE&&e()),s.idleBegin=e},set idleEnd(e){s.idleEnd=e}}}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==Re.n.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll((e=>e.idleEnd()))))}get state(){return this._state}updateBudget(e){this._test.usedBudget=0,++this._frameNumber;let t=Ne,s=e.frameDuration,i=Ae;switch(this.state){case Re.n.IDLE:t=(0,me.HA)(0),s=(0,me.HA)(Math.max(Me,e.frameDuration)),i=ve;break;case Re.n.INTERACTING:s=(0,me.HA)(Math.max(De,e.frameDuration));case Re.n.ANIMATING:}return s=(0,me.HA)(s-e.elapsedFrameTime-t),this.state!==Re.n.IDLE&&s<Ae&&!this._forceTask?(this._forceTask=!0,!1):(s=(0,me.HA)(Math.max(s,i)),this._budget.reset(s,this.state),this._updateLoad(),this._schedule())}frame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case Re.n.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll((e=>e.idleBegin()))),this._runIdle();break;case Re.n.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test.usedBudget=this._budget.elapsed}stopFrame(){this._budget.reset((0,me.HA)(0),this._state),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e),this._updatingChanged()}_updateTask(e){this._tasks.forAll((t=>{t.name===e&&t.setPriority(e)}))}_getState(e){if(this._runQueue.some((t=>t.name===e)))return Oe.SCHEDULED;let t=Oe.IDLE;return this._tasks.forAll((s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t=Oe.READY:t!==Oe.READY&&(t=Oe.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((s=>{s.name===e&&(t+=s.runtime)})),t}_resetRuntimes(){this._tasks.forAll((e=>e.runtime=0))}_getRunning(){const e=new Map;if(this._tasks.forAll((t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)})),0===e.size)return null;let t="";return e.forEach(((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`})),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce(((e,t)=>t.needsUpdate?++e:e),0);this._load=.9*this._load+e*(1-.9)}_schedule(){for(this._runQueue.filterInPlace((e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1))),this._tasks.forAll((e=>{0===e.basePriority&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)}));0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll((s=>{s.needsUpdate&&0!==s.schedulePriority&&0!==s.basePriority&&s.blockFrame!==this._frameNumber&&(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority?(s.schedulePriority=0,this._runQueue.push(s)):--s.schedulePriority)})),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){const e=this._budget.now();this._startFrameTaskTimes();do{for(;this._runQueue.length>0;){const t=this._budget.now(),s=this._runQueue.pop();this._budget.resetProgress();try{s.task.runTask(this._budget)===Ie.YIELD&&(s.blockFrame=this._frameNumber)}catch(e){le.Z.getLogger("esri.views.support.Scheduler").error(`Exception in task "${s.name}"`,e),s.blockFrame=this._frameNumber}!this._budget.hasProgressed&&s.blockFrame!==this._frameNumber&&s.needsUpdate&&(s.name,Fe.I3S_CONTROLLER,s.blockFrame=this._frameNumber),s.schedulePriority=s.basePriority;const i=this._budget.now()-t;if(s.runtime+=i,this._frameTaskTimes.set(s.priority,this._frameTaskTimes.get(s.priority)+i),this._debug&&i>2*this._budget.budget&&console.log("Task",s.name,"used",i,"of max",this._budget.budget,"ms"),this._budget.remaining<=0)return this._updatingChanged(),void this._recordFrameTaskTimes(this._budget.now()-e)}}while(this._schedule());this._updatingChanged(),this._recordFrameTaskTimes(this._budget.now()-e)}_startFrameTaskTimes(){for(const e of Object.keys(Fe))this._frameTaskTimes.set(Fe[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach(((e,t)=>this.performanceInfo.tasks.get(t).record(e))),this.performanceInfo.total.record(e)}get test(){return this._test}};class t{get task(){return this._task.value}get updating(){return this._queue.running}constructor(e,t,s,i){this._scheduler=e,this.name=t,this._basePriority=i,this.blockFrame=0,this.runtime=0,this._queue=new fe,this._handles=new oe.Z,this.schedulePriority=this._basePriority,this._task=(0,de.t)(null!=s?s:this._queue),this._handles.add((0,he.gx)((()=>this.task.running),(t=>e.taskRunningChanged(t))))}remove(){this.processQueue(Pe),this._scheduler.removeTask(this),this.schedule=ke.schedule,this.reschedule=ke.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){this.name=e;const t=be(e);0!==this._basePriority&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}processQueue(e){this._queue.runTask(e)}}class s{constructor(){this._begin="undefined"!=typeof performance?performance.now():0,this._budget=0,this._state=Re.n.IDLE,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get state(){return this._state}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e,t){this._begin=this.now(),this._budget=e,this._state=t,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return performance.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}e.Budget=s}(Ce||(Ce={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(Oe||(Oe={}));const Pe=(()=>{const e=new Ce.Budget;return e.enabled=!1,e})(),ke=new class{remove(){}processQueue(){}schedule(e,t,s){try{if((0,u.Hc)(t)){const e=(0,u.zE)();return s?Promise.resolve(s(e)):Promise.reject(e)}return(0,u.gx)(e(Pe))}catch(e){return Promise.reject(e)}}reschedule(e,t,s){return this.schedule(e,t,s)}},Ze=new l.WJ(2e6);let Le=0;class Ge{constructor(e){this._geometryQueryCache=null,this._changeHandle=null,this.capabilities={query:Z.g},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.objectIdField=e.objectIdField,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._changeHandle=this.featureStore.events.on("changed",(()=>this.clearCache())),this.timeInfo=e.timeInfo,e.cacheSpatialQueries&&(this._geometryQueryCache=new l.Xq(Le+++"$$",Ze)),this.fieldsIndex=(0,n.AK)(e.fieldsIndex)?e.fieldsIndex:ae.Z.fromJSON(e.fieldsIndex),this.availableFields=null==e.availableFields?new Set(this.fieldsIndex.fields.map((e=>e.name))):new Set(e.availableFields.map((e=>this.fieldsIndex.get(e)?.name)).filter((e=>null!=e))),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._frameTask=(0,o.hw)(this._frameTask),this.clearCache(),(0,o.SC)(this._geometryQueryCache),this._changeHandle=(0,o.hw)(this._changeHandle)}get featureAdapter(){return this.featureStore.featureAdapter}clearCache(){this._geometryQueryCache?.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async executeQuery(e,t){try{return(await this._executeQuery(e,{},t)).createQueryResponse()}catch(t){if(t!==X.Ti)throw t;return new H([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},t)).createQueryResponseForCount()}catch(e){if(e!==X.Ti)throw e;return 0}}async executeQueryForExtent(e,t){const s=e.outSR;try{const i=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),r=i.size;return r?{count:r,extent:await this._getBounds(i.items,i.spatialReference,s||this.spatialReference)}:{count:0,extent:null}}catch(e){if(e===X.Ti)return{count:0,extent:null};throw e}}async executeQueryForIds(e,t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e,t){try{const s=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),i=s.items,r=new Set;return await this._reschedule((()=>{for(const e of i)r.add(s.featureAdapter.getObjectId(e))}),t),r}catch(e){if(e===X.Ti)return new Set;throw e}}async executeQueryForSnapping(e,t){const{point:s,distance:i,returnEdge:r,vertexMode:n}=e;if(!r&&"none"===n)return{candidates:[]};let o=(0,a.d9)(e.query);o=await this._schedule((()=>(0,X.j6)(o,this.definitionExpression,this.spatialReference)),t),o=await this._reschedule((()=>te(o,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),t);const l=!(0,g.fS)(s.spatialReference,this.spatialReference);l&&await(0,k._W)(s.spatialReference,this.spatialReference);const u="number"==typeof i?i:i.x,c="number"==typeof i?i:i.y,h={xmin:s.x-u,xmax:s.x+u,ymin:s.y-c,ymax:s.y+c,spatialReference:s.spatialReference},d=l?(0,k.iV)(h,this.spatialReference):h;if(!d)return{candidates:[]};const m=(await(0,y.aX)((0,p.im)(s),null,{signal:t}))[0],f=(await(0,y.aX)((0,p.im)(d),null,{signal:t}))[0];if(null==m||null==f)return{candidates:[]};const _=new H(await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(f.toJSON()))),t),o,this);await this._reschedule((()=>this._executeObjectIdsQuery(_)),t),await this._reschedule((()=>this._executeTimeQuery(_)),t),await this._reschedule((()=>this._executeAttributesQuery(_)),t),await this._reschedule((()=>this._executeGeometryQueryForSnapping(_,t)),t);const T=m.toJSON(),S=l?(0,k.iV)(T,this.spatialReference):T,x=l?Math.max(d.xmax-d.xmin,d.ymax-d.ymin)/2:i;return _.createSnappingResponse({...e,point:S,distance:x},s.spatialReference)}async executeQueryForLatestObservations(e,t){if(!this.timeInfo?.trackIdField)throw new r.Z("unsupported-query","Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});try{const s=await this._executeQuery(e,{},t);return await this._reschedule((()=>this._filterLatest(s)),t),s.createQueryResponse()}catch(t){if(t!==X.Ti)throw t;return new H([],e,this).createQueryResponse()}}async executeQueryForSummaryStatistics(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:n},s)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,s){const{field:i,field2:r,field3:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:i,field2:r,field3:n,valueExpression:a},s)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:n},s)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:n},s)).createHistogramResponse(t)}async fetchRecomputedExtents(e){this._timeExtentPromise||=(0,ne.R)(this.timeInfo,this.featureStore);const[t,s]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,u.k_)(e),{fullExtent:t,timeExtent:s}}async _getBounds(e,t,s){const i=(0,d.t8)((0,d.Ue)(),d.G_);await this.featureStore.forEachBounds(e,(e=>(0,d.TC)(i,e)));const r={xmin:i[0],ymin:i[1],xmax:i[3],ymax:i[4],spatialReference:(0,P.S2)(this.spatialReference)};this.hasZ&&isFinite(i[2])&&isFinite(i[5])&&(r.zmin=i[2],r.zmax=i[5]);const n=(0,k.iV)(r,t,s);if(n.spatialReference=(0,P.S2)(s),n.xmax-n.xmin==0){const e=(0,c.c9)(n.spatialReference);n.xmin-=e,n.xmax+=e}if(n.ymax-n.ymin==0){const e=(0,c.c9)(n.spatialReference);n.ymin-=e,n.ymax+=e}if(this.hasZ&&null!=n.zmin&&null!=n.zmax&&n.zmax-n.zmin==0){const e=(0,c.c9)(n.spatialReference);n.zmin-=e,n.zmax+=e}return n}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then((e=>this._getBounds(e,this.spatialReference,this.spatialReference))),this._fullExtentPromise}async _schedule(e,t){return null!=this._frameTask?this._frameTask.schedule(e,t):e(Pe)}async _reschedule(e,t){return null!=this._frameTask?this._frameTask.reschedule(e,t):e(Pe)}async _getAllFeaturesQueryEngineResult(e){return new H(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>{await this.featureStore.forEach((t=>e.push(t)))})().then((()=>e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async _executeQuery(e,t,s){e=(0,a.d9)(e),e=await this._schedule((()=>(0,X.Up)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>te(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),s),e={...e,...t};const i=await this._reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this._reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this._reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this._reschedule((()=>this._executeObjectIdsQuery(r)),s),await this._reschedule((()=>this._executeTimeQuery(r)),s),await this._reschedule((()=>this._executeAttributesQuery(r)),s),r}async _executeSceneFilterQuery(e,t){if(null==e.sceneFilter)return null;const{outSR:s,returnGeometry:i,returnCentroid:r}=e,n=this.featureStore.featureSpatialReference,a=e.sceneFilter.geometry,o=null==n||(0,g.fS)(n,a.spatialReference)?a:(0,k.iV)(a,n);if(!o)return null;const l=i||r,u=(0,g.JY)(s)&&!(0,g.fS)(this.spatialReference,s)&&l?async e=>this._project(e,s):e=>e,c=this.featureAdapter,h=await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(o))),t);if("disjoint"===e.sceneFilter.spatialRelationship){if(!h.length)return null;const s=new Set;for(const e of h)s.add(c.getObjectId(e));const i=await this._reschedule((()=>this._getAllFeatures()),t),r=await this._reschedule((async()=>{const r=await(0,K.cW)("esriSpatialRelDisjoint",o,this.geometryType,this.hasZ,this.hasM),n=await this._runSpatialFilter(i,(e=>!s.has(c.getObjectId(e))||r(c.getGeometry(e))),t);return new H(n,e,this)}),t);return u(r)}if(!h.length)return new H([],e,this);if(this._canExecuteSinglePass(o,e))return u(new H(h,e,this));const d=await(0,K.cW)("esriSpatialRelContains",o,this.geometryType,this.hasZ,this.hasM),m=await this._runSpatialFilter(h,(e=>d(c.getGeometry(e))),t);return u(new H(m,e,this))}async _executeGeometryQuery(e,t,s){if(null!=t&&0===t.items.length)return t;e=null!=t?t.query:e;const{geometry:r,outSR:n,spatialRel:a,returnGeometry:o,returnCentroid:l}=e,u=this.featureStore.featureSpatialReference,c=!r||null==u||(0,g.fS)(u,r.spatialReference)?r:(0,k.iV)(r,u),h=o||l,d=(0,g.JY)(n)&&!(0,g.fS)(this.spatialReference,n),m=this._geometryQueryCache&&null==t?d&&h?JSON.stringify({originalFilterGeometry:r,spatialRelationship:a,outSpatialReference:n}):JSON.stringify({originalFilterGeometry:r,spatialRelationship:a}):null,f=m?this._geometryQueryCache.get(m):null;if(null!=f)return new H(f,e,this);const p=async e=>(d&&h&&await this._project(e,n),m&&this._geometryQueryCache.put(m,e.items,e.items.length+1),e);if(!c)return p(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const y=this.featureAdapter;let _=await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(r))),s);if("esriSpatialRelDisjoint"===a){if(!_.length)return p(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const i=new Set;for(const e of _)i.add(y.getObjectId(e));const r=null!=t?t.items:await this._reschedule((()=>this._getAllFeatures()),s),n=await this._reschedule((async()=>{const t=await(0,K.cW)(a,c,this.geometryType,this.hasZ,this.hasM),n=await this._runSpatialFilter(r,(e=>!i.has(y.getObjectId(e))||t(y.getGeometry(e))),s);return new H(n,e,this)}),s);return p(n)}if(null!=t){const e=new i.SO;_=_.filter((s=>(0,i.cq)(t.items,s,t.items.length,e)>=0))}if(!_.length){const t=new H([],e,this);return m&&this._geometryQueryCache.put(m,t.items,1),t}if(this._canExecuteSinglePass(c,e))return p(new H(_,e,this));const T=await(0,K.cW)(a,c,this.geometryType,this.hasZ,this.hasM),S=await this._runSpatialFilter(_,(e=>T(y.getGeometry(e))),s);return p(new H(S,e,this))}async _executeGeometryQueryForSnapping(e,t){const{query:s}=e,{spatialRel:i}=s;if(!e?.items?.length||!s.geometry||!i)return;const r=await(0,K.cW)(i,s.geometry,this.geometryType,this.hasZ,this.hasM),n=await this._runSpatialFilter(e.items,(e=>r(e.geometry)),t);e.items=n}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const s of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(s).forEach((e=>t.add(e)));const s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}_executeTimeQuery(e){if(0===e.items.length)return;const t=(0,ne.y)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=v(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter((e=>t.testFeature(e,this.featureAdapter)))}}async _runSpatialFilter(e,t,s){if(!t)return e;if(null==this._frameTask)return e.filter((e=>t(e)));let i=0;const r=new Array,n=async a=>{for(;i<e.length;){const o=e[i++];t(o)&&(r.push(o),a.madeProgress()),a.done&&await this._reschedule((e=>n(e)),s)}};return this._reschedule((e=>n(e)),s).then((()=>r))}_filterLatest(e){const{trackIdField:t,startTimeField:s,endTimeField:i}=this.timeInfo,r=i||s,n=new Map,a=this.featureAdapter.getAttribute;for(const s of e.items){const e=a(s,t),i=a(s,r),o=n.get(e);(!o||i>a(o,r))&&n.set(e,s)}e.items=Array.from(n.values())}_canExecuteSinglePass(e,t){const{spatialRel:s}=t;return(0,K.hN)(e)&&("esriSpatialRelEnvelopeIntersects"===s||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===s||"esriSpatialRelContains"===s))}async _project(e,t){if(!t||(0,g.fS)(this.spatialReference,t))return e;const s=this.featureAdapter;let i;try{const e=await this._getFullExtent();i=(0,h.getTransformation)(this.spatialReference,t,e)}catch{}const r=await(0,k.oj)(e.items.map((e=>(0,P.Op)(this.geometryType,this.hasZ,this.hasM,s.getGeometry(e)))),this.spatialReference,t,i);return e.items=r.map(((t,i)=>s.cloneWithGeometry(e.items[i],(0,_.GH)(t,this.hasZ,this.hasM)))),e}_getQueryBBoxes(e){if((0,K.hN)(e)){if((0,p.YX)(e))return[(0,m.al)(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if((0,p.oU)(e))return e.rings.map((e=>(0,m.al)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1]))))}return[(0,f.$P)((0,m.Ue)(),e)]}async _searchFeatures(e){const t=new Set;await Promise.all(e.map((e=>this.featureStore.forEachInBounds(e,(e=>t.add(e))))));const s=Array.from(t.values());return t.clear(),s}async _executeQueryForStatistics(e,t,s){e=(0,a.d9)(e);try{e=await this._schedule((()=>(0,X.Up)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>async function(e,t,{fieldsIndex:s,geometryType:i,spatialReference:n,availableFields:a}){if((e.distance??0)<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new r.Z(ee,"Unsupported query options",{query:e});return se(s,a,e),Promise.all([re(s,a,t,e),(0,K.P0)(e,i,n),(0,k._W)(n,e.outSR)]).then((()=>e))}(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),s);const i=await this._reschedule((()=>this._executeSceneFilterQuery(e,s)),s),n=await this._reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this._reschedule((()=>this._executeAggregateIdsQuery(n)),s),await this._reschedule((()=>this._executeObjectIdsQuery(n)),s),await this._reschedule((()=>this._executeTimeQuery(n)),s),await this._reschedule((()=>this._executeAttributesQuery(n)),s),n}catch(t){if(t!==X.Ti)throw t;return new H([],e,this)}}}},61159:(e,t,s)=>{s.d(t,{g:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},42712:(e,t,s)=>{s.d(t,{EG:()=>u,Op:()=>c,S2:()=>h});var i=s(98732),r=s(5428);const n=new r.Z,a=new r.Z,o=new r.Z,l={esriGeometryPoint:i.fQ,esriGeometryPolyline:i.J6,esriGeometryPolygon:i.eG,esriGeometryMultipoint:i.Iv};function u(e,t,s,r=e.hasZ,n=e.hasM){if(null==t)return null;const a=e.hasZ&&r,l=e.hasM&&n;if(s){const u=(0,i.Nh)(o,t,e.hasZ,e.hasM,"esriGeometryPoint",s,r,n);return(0,i.fQ)(u,a,l)}return(0,i.fQ)(t,a,l)}function c(e,t,s,r,u,c,h=t,d=s){const m=t&&h,f=s&&d,p=null!=r?"coords"in r?r:r.geometry:null;if(null==p)return null;if(u){let r=(0,i.zj)(a,p,t,s,e,u,h,d);return c&&(r=(0,i.Nh)(o,r,m,f,e,c)),l[e]?.(r,m,f)??null}if(c){const r=(0,i.Nh)(o,p,t,s,e,c,h,d);return l[e]?.(r,m,f)??null}return(0,i.hY)(n,p,t,s,h,d),l[e]?.(n,m,f)??null}function h(e){return e&&d in e?JSON.parse(JSON.stringify(e,m)):e}const d="_geVersion",m=(e,t)=>e!==d?t:void 0},37427:(e,t,s)=>{s.d(t,{_W:()=>m,iV:()=>y,oj:()=>_});var i=s(67676),r=s(95330),n=s(73615),a=s(37455),o=s(8744),l=s(40488);const u=[0,0];function c(e,t){if(!t)return null;if("x"in t){const s={x:0,y:0};return[s.x,s.y]=e(t.x,t.y,u),null!=t.z&&(s.z=t.z),null!=t.m&&(s.m=t.m),s}if("xmin"in t){const s={xmin:0,ymin:0,xmax:0,ymax:0};return[s.xmin,s.ymin]=e(t.xmin,t.ymin,u),[s.xmax,s.ymax]=e(t.xmax,t.ymax,u),t.hasZ&&(s.zmin=t.zmin,s.zmax=t.zmax,s.hasZ=!0),t.hasM&&(s.mmin=t.mmin,s.mmax=t.mmax,s.hasM=!0),s}return"rings"in t?{rings:h(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:h(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:d(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function h(e,t){const s=[];for(const i of e)s.push(d(i,t));return s}function d(e,t){const s=[];for(const i of e){const e=t(i[0],i[1],[0,0]);s.push(e),i.length>2&&e.push(i[2]),i.length>3&&e.push(i[3])}return s}async function m(e,t){if(!e||!t)return;const s=Array.isArray(e)?e.map((e=>null!=e.geometry?e.geometry.spatialReference:null)).filter(i.pC):[e];await(0,n.initializeProjection)(s.map((e=>({source:e,dest:t}))))}const f=c.bind(null,l.hG),p=c.bind(null,l.R6);function y(e,t,s,i){if(!e)return e;if(s||(s=t,t=e.spatialReference),!(0,o.JY)(t)||!(0,o.JY)(s)||(0,o.fS)(t,s))return e;if((0,l.Q8)(t,s)){const t=(0,o.sS)(s)?f(e):p(e);return t.spatialReference=s,t}return(0,n.projectMany)(a.N,[e],t,s,null,i)[0]}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,s,i){if(!e?.length||!t||!s||(0,o.fS)(t,s))return e;const n={geometries:e,inSpatialReference:t,outSpatialReference:s,geographicTransformation:i,resolve:(0,r.hh)()};return this._jobs.push(n),this._timer??=setTimeout(this._process,10),n.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:s,outSpatialReference:i,resolve:r,geographicTransformation:u}=e;(0,l.Q8)(s,i)?(0,o.sS)(i)?r(t.map(f)):r(t.map(p)):r((0,n.projectMany)(a.N,t,s,i,u,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function _(e,t,s,i){return g.push(e,t,s,i)}},22222:(e,t,s)=>{s.d(t,{Ti:()=>d,Up:()=>m,j6:()=>f});var i=s(35454),r=s(67900),n=s(73615),a=s(49600),o=s(33955),l=s(16306),u=s(8744),c=s(37427);const h=new i.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),d=Object.freeze({});async function m(e,t,s){const{outFields:i,orderByFields:r,groupByFieldsForStatistics:n,outStatistics:a}=e;if(i)for(let e=0;e<i.length;e++)i[e]=i[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),f(e,t,s)}async function f(e,t,i){if(!e)return null;let{where:n}=e;if(e.where=n=n?.trim(),(!n||/^1 *= *1$/.test(n)||t&&t===n)&&(e.where=null),!e.geometry)return e;let m=await async function(e){const{distance:t,units:i}=e,n=e.geometry;if(null==t||"vertexAttributes"in n)return n;const a=n.spatialReference,o=i?h.fromJSON(i):(0,r.qE)(a),l=a&&((0,u.sT)(a)||(0,u.sS)(a))?n:await(0,c._W)(a,u.Zn).then((()=>(0,c.iV)(n,u.Zn)));return(await async function(){return(await Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247))).geodesicBuffer}())(l.spatialReference,l,t,o)}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;m=(0,a.aO)(m),m.spatialReference=t}if(m){await(0,c._W)(m.spatialReference,i),m=function(e,t){const s=e.spatialReference;return p(e,t)&&(0,o.YX)(e)?{spatialReference:s,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(m,i);const t=(await(0,l.aX)((0,o.im)(m)))[0];if(null==t)throw d;const s="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,r=s&&p(m,i)?{densificationStep:8*s}:void 0,n=t.toJSON(),a=(0,c.iV)(n,n.spatialReference,i,r);if(!a)throw d;a.spatialReference=i,e.geometry=a}return e}function p(e,t){if(!e)return!1;const s=e.spatialReference;return((0,o.YX)(e)||(0,o.oU)(e)||(0,o.l9)(e))&&!(0,u.fS)(s,t)&&!(0,n.canProjectWithoutEngine)(s,t)}},10402:(e,t,s)=>{s.d(t,{hN:()=>x,P0:()=>S,cW:()=>T});var i=s(20102),r=s(54102),n=s(87416),a=s(33955),o=s(8744);function l(e,t){return e?t?4:3:t?3:2}function u(e,t,s,i,r,n){const a=l(r,n),{coords:o,lengths:u}=i;if(!u)return!1;for(let i=0,r=0;i<u.length;i++,r+=a)if(!c(e,t,s,o[r],o[r+1]))return!1;return!0}function c(e,t,s,i,r){if(!e)return!1;const n=l(t,s),{coords:a,lengths:o}=e;let u=!1,c=0;for(const e of o)u=h(u,a,n,c,e,i,r),c+=e*n;return u}function h(e,t,s,i,r,n,a){let o=e,l=i;for(let e=i,u=i+r*s;e<u;e+=s){l=e+s,l===u&&(l=i);const r=t[e],c=t[e+1],h=t[l],d=t[l+1];(c<a&&d>=a||d<a&&c>=a)&&r+(a-c)/(d-c)*(h-r)<n&&(o=!o)}return o}var d=s(98732),m=s(5428),f=s(42712),p=s(37427);const y="unsupported-query",g={esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"intersects",esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:null},_={spatialRelationship:{esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},queryGeometry:{esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},layerGeometry:{esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1}};function T(e,t,i,o,l){if((0,a.oU)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Uy)(new m.Z,t,!1,!1);return Promise.resolve((t=>function(e,t,s,i){return c(e,!1,!1,i.coords[0],i.coords[1])}(e,0,0,t)))}if((0,a.oU)(t)&&"esriGeometryMultipoint"===i){const s=(0,d.Uy)(new m.Z,t,!1,!1);if("esriSpatialRelContains"===e)return Promise.resolve((e=>u(s,!1,!1,e,o,l)))}if((0,a.YX)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return Promise.resolve((e=>(0,r.aV)(t,(0,f.Op)(i,o,l,e))));if((0,a.YX)(t)&&"esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return Promise.resolve((e=>(0,r.lQ)(t,(0,f.Op)(i,o,l,e))));if((0,a.YX)(t)&&"esriSpatialRelIntersects"===e){const e="mesh"===(h=i)?n.h_:(0,n.IY)(h);return Promise.resolve((s=>e(t,(0,f.Op)(i,o,l,s))))}var h;return Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247)).then((s=>{const r=s[g[e]].bind(null,t.spatialReference,t);return e=>r((0,f.Op)(i,o,l,e))}))}async function S(e,t,s){const{spatialRel:r,geometry:n}=e;if(n){if(!function(e){return null!=e&&!0===_.spatialRelationship[e]}(r))throw new i.Z(y,"Unsupported query spatial relationship",{query:e});if((0,o.JY)(n.spatialReference)&&(0,o.JY)(s)){if(!function(e){return null!=e&&!0===_.queryGeometry[(0,a.Ji)(e)]}(n))throw new i.Z(y,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===_.layerGeometry[e]}(t))throw new i.Z(y,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,p._W)(e.geometry?.spatialReference,e.outSR)}}}function x(e){if((0,a.YX)(e))return!0;if((0,a.oU)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},17590:(e,t,s)=>{async function i(e,t){if(!e)return null;const s=t.featureAdapter,{startTimeField:i,endTimeField:r}=e;let n=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if(i&&r)await t.forEach((e=>{const t=s.getAttribute(e,i),o=s.getAttribute(e,r);null==t||isNaN(t)||(n=Math.min(n,t)),null==o||isNaN(o)||(a=Math.max(a,o))}));else{const e=i||r;await t.forEach((t=>{const i=s.getAttribute(t,e);null==i||isNaN(i)||(n=Math.min(n,i),a=Math.max(a,i))}))}return{start:n,end:a}}function r(e,t,s){if(!t||!e)return null;const{startTimeField:i,endTimeField:r}=e;if(!i&&!r)return null;const{start:n,end:a}=t;if(null===n&&null===a)return null;if(void 0===n&&void 0===a)return()=>!1;const o=s.getAttributeAsTimestamp?.bind(s)??s.getAttribute.bind(s);return i&&r?function(e,t,s,i,r){return null!=i&&null!=r?n=>{const a=e(n,t),o=e(n,s);return(null==a||a<=r)&&(null==o||o>=i)}:null!=i?t=>{const r=e(t,s);return null==r||r>=i}:null!=r?s=>{const i=e(s,t);return null==i||i<=r}:void 0}(o,i,r,n,a):function(e,t,s,i){return null!=s&&null!=i&&s===i?i=>e(i,t)===s:null!=s&&null!=i?r=>{const n=e(r,t);return null!=n&&n>=s&&n<=i}:null!=s?i=>{const r=e(i,t);return null!=r&&r>=s}:null!=i?s=>{const r=e(s,t);return null!=r&&r<=i}:void 0}(o,i||r,n,a)}s.d(t,{R:()=>i,y:()=>r})},98732:(e,t,s)=>{s.d(t,{$:()=>se,$g:()=>ie,EI:()=>Q,GH:()=>Y,IN:()=>x,Iv:()=>O,J6:()=>k,Jd:()=>S,Nh:()=>X,RZ:()=>W,Uy:()=>G,XA:()=>V,Yn:()=>z,cn:()=>H,dd:()=>C,di:()=>j,eG:()=>L,fQ:()=>F,hY:()=>re,h_:()=>$,lM:()=>J,lz:()=>ae,zj:()=>K});var i=s(20102),r=s(92604),n=s(70586),a=s(60437),o=s(24470),l=s(33955),u=s(70272),c=s(44876),h=s(5428);function d(e,t){return e?t?4:3:t?3:2}const m=r.Z.getLogger("esri.layers.graphics.featureConversionUtils"),f={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryEnvelope:0},p=(e,t,s,i,r,n)=>{e[s]=r,e[s+1]=n},y=(e,t,s,i,r,n)=>{e[s]=r,e[s+1]=n,e[s+2]=t[i+2]},g=(e,t,s,i,r,n)=>{e[s]=r,e[s+1]=n,e[s+2]=t[i+3]},_=(e,t,s,i,r,n)=>{e[s]=r,e[s+1]=n,e[s+2]=t[i+2],e[s+3]=t[i+3]};function T(e,t,s,i){if(e){if(s)return t&&i?_:y;if(t&&i)return g}else if(t&&i)return y;return p}function S({scale:e,translate:t},s){return Math.round((s-t[0])/e[0])}function x({scale:e,translate:t},s){return Math.round((t[1]-s)/e[1])}function I({scale:e,translate:t},s,i){return s*e[i]+t[i]}function F(e,t,s){return e?t?s?v(e):E(e):s?N(e):w(e):null}function w(e){const t=e.coords;return{x:t[0],y:t[1]}}function R(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e}function E(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2]}}function b(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e}function N(e){const t=e.coords;return{x:t[0],y:t[1],m:t[2]}}function A(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.m,e}function v(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2],m:t[3]}}function D(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e.coords[3]=t.m,e}function M(e,t){return e&&t?D:e?b:t?A:R}function C(e,t,s=M(null!=t.z,null!=t.m)){return s(e,t)}function O(e,t,s){if(null==e)return null;const i=d(t,s),r=[];for(let t=0;t<e.coords.length;t+=i){const s=[];for(let r=0;r<i;r++)s.push(e.coords[t+r]);r.push(s)}return t?s?{points:r,hasZ:t,hasM:s}:{points:r,hasZ:t}:s?{points:r,hasM:s}:{points:r}}function P(e,t,s=d(t.hasZ,t.hasM)){e.lengths[0]=t.points.length;const i=e.coords;let r=0;for(const e of t.points)for(let t=0;t<s;t++)i[r++]=e[t];return e}function k(e,t,s){if(!e)return null;const i=d(t,s),{coords:r,lengths:n}=e,a=[];let o=0;for(const e of n){const t=[];for(let s=0;s<e;s++){const e=[];for(let t=0;t<i;t++)e.push(r[o++]);t.push(e)}a.push(t)}return t?s?{paths:a,hasZ:t,hasM:s}:{paths:a,hasZ:t}:s?{paths:a,hasM:s}:{paths:a}}function Z(e,t,s=d(t.hasZ,t.hasM)){const{lengths:i,coords:r}=e;let n=0;for(const e of t.paths){for(const t of e)for(let e=0;e<s;e++)r[n++]=t[e];i.push(e.length)}return e}function L(e,t,s){if(!e)return null;const i=d(t,s),{coords:r,lengths:n}=e,a=[];let o=0;for(const e of n){const t=[];for(let s=0;s<e;s++){const e=[];for(let t=0;t<i;t++)e.push(r[o++]);t.push(e)}a.push(t)}return t?s?{rings:a,hasZ:t,hasM:s}:{rings:a,hasZ:t}:s?{rings:a,hasM:s}:{rings:a}}function G(e,t,s=t.hasZ,i=t.hasM){return function(e,t,s,i){const r=d(s,i),{lengths:n,coords:a}=e;let o=0;oe(e);for(const e of t){for(const t of e)for(let e=0;e<r;e++)a[o++]=t[e];n.push(e.length)}return e}(e,t.rings,s,i)}const U=[],q=[];function V(e,t,s,i,r){U[0]=e;const[n]=z(q,U,t,s,i,r);return le(U),le(q),n}function z(e,t,s,r,n,a){if(le(e),!s){for(const s of t){const t=a?s.attributes[a]:void 0;e.push(new u.u_(null,s.attributes,null,t))}return e}switch(s){case"esriGeometryPoint":return function(e,t,s,i,r){const n=M(s,i);for(const{geometry:s,attributes:i}of t){const t=null!=s?n(new h.Z,s):null;e.push(new u.u_(t,i,null,r?i[r]:void 0))}return e}(e,t,r,n,a);case"esriGeometryMultipoint":return function(e,t,s,i,r){const n=d(s,i);for(const{geometry:s,attributes:i}of t){const t=null!=s?P(new h.Z,s,n):null;e.push(new u.u_(t,i,null,r?i[r]:void 0))}return e}(e,t,r,n,a);case"esriGeometryPolyline":return function(e,t,s,i,r){const n=d(s,i);for(const{geometry:s,attributes:i}of t){const t=null!=s?Z(new h.Z,s,n):null;e.push(new u.u_(t,i,null,r?i[r]:void 0))}return e}(e,t,r,n,a);case"esriGeometryPolygon":return function(e,t,s,i,r){for(const{geometry:n,centroid:a,attributes:o}of t){const t=null!=n?G(new h.Z,n,s,i):null,l=r?o[r]:void 0;null!=a?e.push(new u.u_(t,o,R(new h.Z,a),l)):e.push(new u.u_(t,o,null,l))}return e}(e,t,r,n,a);default:m.error("convertToFeatureSet:unknown-geometry",new i.Z(`Unable to parse unknown geometry type '${s}'`)),le(e)}return e}function Q(e,t,s,i){q[0]=e,B(U,q,t,s,i);const r=U[0];return le(U),le(q),r}function Y(e,t,s){if(null==e)return null;const r=new h.Z;return"hasZ"in e&&null==t&&(t=e.hasZ),"hasM"in e&&null==s&&(s=e.hasM),(0,l.wp)(e)?M(null!=t?t:null!=e.z,null!=s?s:null!=e.m)(r,e):(0,l.oU)(e)?G(r,e,t,s):(0,l.l9)(e)?Z(r,e,d(t,s)):(0,l.aW)(e)?P(r,e,d(t,s)):void m.error("convertFromGeometry:unknown-geometry",new i.Z(`Unable to parse unknown geometry type '${e}'`))}function j(e,t,s,r){const n=e&&("coords"in e?e:e.geometry);if(null==n)return null;switch(t){case"esriGeometryPoint":{let e=w;return s&&r?e=v:s?e=E:r&&(e=N),e(n)}case"esriGeometryMultipoint":return O(n,s,r);case"esriGeometryPolyline":return k(n,s,r);case"esriGeometryPolygon":return L(n,s,r);default:return m.error("convertToGeometry:unknown-geometry",new i.Z(`Unable to parse unknown geometry type '${t}'`)),null}}function B(e,t,s,r,n){if(le(e),null==s)return function(e,t){for(const s of t)e.push({attributes:s.attributes});return e}(e,t);switch(s){case"esriGeometryPoint":return function(e,t,s,i){let r=w;s&&i?r=v:s?r=E:i&&(r=N);for(const s of t){const{geometry:t,attributes:i}=s,n=null!=t?r(t):null;e.push({attributes:i,geometry:n})}return e}(e,t,r,n);case"esriGeometryMultipoint":return function(e,t,s,i){for(const{geometry:r,attributes:n}of t)e.push({attributes:n,geometry:null!=r?O(r,s,i):null});return e}(e,t,r,n);case"esriGeometryPolyline":return function(e,t,s,i){for(const{geometry:r,attributes:n}of t)e.push({attributes:n,geometry:null!=r?k(r,s,i):null});return e}(e,t,r,n);case"esriGeometryPolygon":return function(e,t,s,i){for(const{geometry:r,attributes:n,centroid:a}of t){const t=null!=r?L(r,s,i):null;if(null!=a){const s=w(a);e.push({attributes:n,centroid:s,geometry:t})}else e.push({attributes:n,geometry:t})}return e}(e,t,r,n);default:m.error("convertToFeatureSet:unknown-geometry",new i.Z(`Unable to parse unknown geometry type '${s}'`))}return e}function H(e){const{objectIdFieldName:t,spatialReference:s,transform:i,fields:r,hasM:n,hasZ:a,features:o,geometryType:l,exceededTransferLimit:u,uniqueIdField:c,queryGeometry:h,queryGeometryType:d}=e,m={features:B([],o,l,a,n),fields:r,geometryType:l,objectIdFieldName:t,spatialReference:s,uniqueIdField:c,queryGeometry:j(h,d,!1,!1)};return i&&(m.transform=i),u&&(m.exceededTransferLimit=u),n&&(m.hasM=n),a&&(m.hasZ=a),m}function $(e,t){const s=new c.Z,{hasM:r,hasZ:n,features:a,objectIdFieldName:o,spatialReference:l,geometryType:u,exceededTransferLimit:h,transform:d,fields:f}=e;return f&&(s.fields=f),s.geometryType=u??null,s.objectIdFieldName=o??t??null,s.spatialReference=l??null,s.objectIdFieldName?(a&&z(s.features,a,u,n,r,s.objectIdFieldName),h&&(s.exceededTransferLimit=h),r&&(s.hasM=r),n&&(s.hasZ=n),d&&(s.transform=d),s):(m.error(new i.Z("optimized-features:invalid-objectIdFieldName","objectIdFieldName is missing")),s)}function J(e){const{transform:t,features:s,hasM:i,hasZ:r}=e;if(!t)return e;for(const e of s)null!=e.geometry&&ie(e.geometry,e.geometry,i,r,t),null!=e.centroid&&ie(e.centroid,e.centroid,i,r,t);return e.transform=null,e}function W(e,t){const{geometryType:s,features:i,hasM:r,hasZ:n}=t;if(!e)return t;for(let t=0;t<i.length;t++){const a=i[t],o=a.weakClone();o.geometry=new h.Z,X(o.geometry,a.geometry,r,n,s,e),a.centroid&&(o.centroid=new h.Z,X(o.centroid,a.centroid,r,n,"esriGeometryPoint",e)),i[t]=o}return t.transform=e,t}function X(e,t,s,i,r,n,a=s,o=i){if(oe(e),!t?.coords.length)return null;const l=f[r],{coords:u,lengths:c}=t,h=d(s,i),m=d(s&&a,i&&o),p=T(s,i,a,o);if(!c.length)return p(e.coords,u,0,0,S(n,u[0]),x(n,u[1])),oe(e,h,0),e;let y,g,_,I,F=0,w=0,R=w;for(const t of c){if(t<l)continue;let s=0;w=R,_=y=S(n,u[F]),I=g=x(n,u[F+1]),p(e.coords,u,w,F,_,I),s++,F+=h,w+=m;for(let i=1;i<t;i++,F+=h)_=S(n,u[F]),I=x(n,u[F+1]),_===y&&I===g||(p(e.coords,u,w,F,_-y,I-g),w+=m,s++,y=_,g=I);s>=l&&(e.lengths.push(s),R=w)}return le(e.coords,R),e.coords.length?e:null}function K(e,t,s,i,r,n,a=s,o=i){if(oe(e),!t?.coords.length)return null;const l=f[r],{coords:u,lengths:c}=t,h=d(s,i),m=d(s&&a,i&&o),p=T(s,i,a,o);if(!c.length)return p(e.coords,u,0,0,u[0],u[1]),oe(e,h,0),e;let y=0;const g=n*n;for(const t of c){if(t<l){y+=t*h;continue}const s=e.coords.length/m,i=y,r=y+(t-1)*h;p(e.coords,u,e.coords.length,i,u[i],u[i+1]),te(e.coords,u,h,g,p,i,r),p(e.coords,u,e.coords.length,r,u[r],u[r+1]);const n=e.coords.length/m-s;n>=l?e.lengths.push(n):le(e.coords,s*m),y+=t*h}return e.coords.length?e:null}function ee(e,t,s,i){const r=e[t],n=e[t+1],a=e[s],o=e[s+1],l=e[i],u=e[i+1];let c=a,h=o,d=l-c,m=u-h;if(0!==d||0!==m){const e=((r-c)*d+(n-h)*m)/(d*d+m*m);e>1?(c=l,h=u):e>0&&(c+=d*e,h+=m*e)}return d=r-c,m=n-h,d*d+m*m}function te(e,t,s,i,r,n,a){let o,l=i,u=0;for(let e=n+s;e<a;e+=s)o=ee(t,e,n,a),o>l&&(u=e,l=o);l>i&&(u-n>s&&te(e,t,s,i,r,n,u),r(e,t,e.length,u,t[u],t[u+1]),a-u>s&&te(e,t,s,i,r,u,a))}function se(e,t,s,i){if(!t?.coords?.length)return null;const r=d(s,i);let n=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,c=Number.NEGATIVE_INFINITY;if(t&&t.coords){const e=t.coords;for(let t=0;t<e.length;t+=r){const s=e[t],i=e[t+1];n=Math.min(n,s),u=Math.max(u,s),l=Math.min(l,i),c=Math.max(c,i)}}return(0,a.is)(e)?(0,a.bZ)(e,n,l,u,c):(0,o.al)(n,l,u,c,e),e}function ie(e,t,s,i,r){const{coords:a,lengths:o}=t,l=d(s,i);if(!a.length)return e!==t&&oe(e),e;(0,n.O3)(r);const{originPosition:u,scale:c,translate:h}=r,m=ue;m.originPosition=u;const f=m.scale;f[0]=c[0]??1,f[1]=-(c[1]??1),f[2]=c[2]??1,f[3]=c[3]??1;const p=m.translate;if(p[0]=h[0]??0,p[1]=h[1]??0,p[2]=h[2]??0,p[3]=h[3]??0,!o.length){for(let t=0;t<l;++t)e.coords[t]=I(m,a[t],t);return e!==t&&oe(e,l,0),e}let y=0;for(let t=0;t<o.length;t++){const s=o[t];e.lengths[t]=s;for(let t=0;t<l;++t)e.coords[y+t]=I(m,a[y+t],t);let i=e.coords[y],r=e.coords[y+1];y+=l;for(let t=1;t<s;t++,y+=l){i+=a[y]*f[0],r+=a[y+1]*f[1],e.coords[y]=i,e.coords[y+1]=r;for(let t=2;t<l;++t)e.coords[y+t]=I(m,a[y+t],t)}}return e!==t&&oe(e,a.length,o.length),e}function re(e,t,s,i,r,n){if(oe(e),e.lengths.push(...t.lengths),s===r&&i===n)for(let s=0;s<t.coords.length;s++)e.coords.push(t.coords[s]);else{const a=d(s,i),o=T(s,i,r,n),l=t.coords;for(let t=0;t<l.length;t+=a)o(e.coords,l,e.coords.length,t,l[t],l[t+1])}return e}function ne(e,t,s,i){let r=0,n=e[i*t],a=e[i*(t+1)];for(let o=1;o<s;o++){const s=n+e[i*(t+o)],l=a+e[i*(t+o)+1],u=(s-n)*(l+a);n=s,a=l,r+=u}return.5*r}function ae(e,t){const{coords:s,lengths:i}=e;let r=0,n=0;for(let e=0;e<i.length;e++){const a=i[e];n+=ne(s,r,a,t),r+=a}return Math.abs(n)}function oe(e,t=0,s=0){le(e.lengths,s),le(e.coords,t)}function le(e,t=0){e.length!==t&&(e.length=t)}const ue={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},99514:(e,t,s)=>{s.d(t,{Z:()=>l});var i=s(20102),r=s(96674),n=s(92604),a=s(35671),o=s(25031);class l{static fromJSON(e){return new l(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new l(e.fields??[],d(e))}static fromLayerJSON(e){return new l(e.fields??[],d(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const s=[];for(const e of this.fields){const t=e?.name,i=c(t);if(t&&i){const r=u(t);this._fieldsMap.set(t,e),this._fieldsMap.set(r,e),this._normalizedFieldsMap.set(i,e),s.push(`${r}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.y2)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.H7)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.Dl)(e)||(0,a.Se)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}s.sort(),this.uid=s.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.Dl)(e)||(0,a.Se)(e)||e.nullable||void 0!==(0,a.os)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(u(e))??this._normalizedFieldsMap.get(c(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.Z.getLogger("esri.layers.support.FieldsIndex").error(new i.Z("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),o.pt):h.has(t.type)?o._4:null:null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.sX)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,r.AK)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function u(e){return e.trim().toLowerCase()}function c(e){return(0,a.q6)(e)?.toLowerCase()??""}const h=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function d(e){const t=new Map;if(!e.fields)return t;const s=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:r}=e,n=(i?"startField"in i?i.startField:i.startTimeField:"")??"",a=(i?"endField"in i?i.endField:i.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,o.Jv)(e.dateFieldsTimeReference):null,c=r?function(e){return"timeZone"in e}(r)?r.timeZone??l:r.dateFieldsTimeReference?(0,o.Jv)(r.dateFieldsTimeReference):l??o.pt:null,d=i?function(e){return"timeZone"in e}(i)?i.timeZone??l:i.timeReference?(0,o.Jv)(i.timeReference):l:null,m=new Map([[u(r?.creationDateField??""),c],[u(r?.editDateField??""),c],[u(n),d],[u(a),d]]);for(const{name:i,type:r}of e.fields)if(h.has(r))t.set(i,o._4);else if("date"!==r&&"esriFieldTypeDate"!==r)t.set(i,null);else if(s)t.set(i,o._4);else{const e=m.get(u(i??""))??l;t.set(i,e)}return t}},86719:(e,t,s)=>{s.d(t,{v:()=>i});const i=new(s(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},95720:(e,t,s)=>{var i;s.d(t,{n:()=>i}),function(e){e[e.ANIMATING=0]="ANIMATING",e[e.INTERACTING=1]="INTERACTING",e[e.IDLE=2]="IDLE"}(i||(i={}))}}]);
|