@arcgis/core 4.28.0-next.20230911 → 4.28.0-next.20230913
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/arcade/Feature.js +1 -1
- package/arcade/arcadeTimeUtils.js +1 -1
- package/arcade/executionError.js +1 -1
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/featureset/actions/Adapted.js +1 -1
- package/arcade/featureset/actions/GroupBy.js +1 -1
- package/arcade/featureset/support/FeatureSet.js +1 -1
- package/arcade/featureset/support/errorsupport.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade/functions/featuresetstats.js +1 -1
- package/arcade/functions/string.js +1 -1
- package/arcade.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0920312e3c7b63c2e253.js +1 -0
- package/assets/esri/core/workers/chunks/0cb007ab5db0a2a598ec.js +1 -0
- package/assets/esri/core/workers/chunks/0cc61f1b2c0473ded5c2.js +1 -0
- package/assets/esri/core/workers/chunks/0f804e3f888cb4998f46.js +1 -0
- package/assets/esri/core/workers/chunks/189dd81cf95bd8417ee3.js +1 -0
- package/assets/esri/core/workers/chunks/1a723bb4a341f645e5fe.js +1 -0
- package/assets/esri/core/workers/chunks/24c717492ea1b35310d8.js +1 -0
- package/assets/esri/core/workers/chunks/{3ce73dd4113dbc7d11de.js → 2eb58dc339b2bb03d9e3.js} +1 -1
- package/assets/esri/core/workers/chunks/{38c07a8574352a7f2f6d.js → 2ff0dbd5eb7ca57bb7fc.js} +1 -1
- package/assets/esri/core/workers/chunks/{768f3db2705fa9e57641.js → 49dfdc0463450491df9d.js} +1 -1
- package/assets/esri/core/workers/chunks/650a317b6dc245a7060f.js +1 -0
- package/assets/esri/core/workers/chunks/{56ed099745360888604e.js → 67f01c71280fa0759742.js} +1 -1
- package/assets/esri/core/workers/chunks/{f62842807744bdfaced7.js → 67fab13f56b340076763.js} +1 -1
- package/assets/esri/core/workers/chunks/6d94b358e8d1cf79bba3.js +1 -0
- package/assets/esri/core/workers/chunks/718607d7a3b33fc33b0a.js +1 -0
- package/assets/esri/core/workers/chunks/{4c63d6b9460aa6ae9843.js → 860417f4138f53d315ba.js} +2 -2
- package/assets/esri/core/workers/chunks/8aa7e994b74f66522c37.js +1 -0
- package/assets/esri/core/workers/chunks/9fa485b04b997b0a5509.js +1 -0
- package/assets/esri/core/workers/chunks/a047fcf3c7307a69b63c.js +1 -0
- package/assets/esri/core/workers/chunks/a753d9874801cd448946.js +1 -0
- package/assets/esri/core/workers/chunks/c51233ad51823cb98c35.js +1 -0
- package/assets/esri/core/workers/chunks/c61f20d91a5c432b07dc.js +1 -0
- package/assets/esri/core/workers/chunks/d3d11242e5af57ba77f4.js +1 -0
- package/assets/esri/core/workers/chunks/dbf343d1fb746f99bb6e.js +1 -0
- package/assets/esri/core/workers/chunks/{271ec1d1666bf6dc3dda.js → dc74b4ec85e8e3de5b27.js} +1 -1
- package/assets/esri/core/workers/chunks/e8a8791d765ab6c450dd.js +1 -0
- package/assets/esri/core/workers/chunks/{5fe7b5665710ec6d3046.js → eb0d1c5c96f735c162d3.js} +1 -1
- package/assets/esri/themes/base/widgets/_Sketch.scss +0 -5
- package/assets/esri/themes/base/widgets/_SketchTooltipControls.scss +0 -5
- 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/chunks/HUDMaterial.glsl.js +38 -45
- package/chunks/languageUtils.js +1 -1
- package/core/promiseUtils.js +1 -1
- package/core/sql/AggregateFunctions.js +1 -1
- package/core/sql/DateOnly.js +1 -1
- package/core/sql/SqlTimestampOffset.js +1 -1
- package/core/sql/TimeOnly.js +1 -1
- package/core/sql/WhereClause.js +1 -1
- package/core/sql/WhereGrammar.js +1 -1
- package/core/sql/sqlCompareUtils.js +1 -1
- package/geometry/GeometryCursor.js +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/support/labelPoint.js +1 -1
- package/geometry/support/meshUtils/bounds.js +1 -1
- package/geometry/support/meshUtils/georeference.js +1 -1
- package/interfaces.d.ts +190 -144
- package/layers/ImageryLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/sources/csv/csv.js +1 -1
- package/layers/support/FetchAssociatedFeatureLayer.js +1 -1
- package/layers/support/TilemapCache.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/layers/support/rasterDatasets/BaseRaster.js +1 -1
- package/layers/support/wmsUtils.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/package.json +3 -3
- package/smartMapping/heuristics/sizeRange.js +1 -1
- package/smartMapping/labels/bins.js +1 -1
- package/smartMapping/labels/clusters.js +1 -1
- package/smartMapping/labels/support/utils.js +1 -1
- package/smartMapping/popup/support/clusterUtils.js +1 -1
- package/smartMapping/support/clusterUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/DisplayId.js +1 -1
- package/views/2d/engine/webgl/Utils.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/analysis/Dimension/DimensionVisualization.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionVisualization.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
- package/views/3d/analysis/Dimension/settings.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/editingTools/originGraphicVisualElementUtils.js +1 -1
- package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/I3SMeshWorkerHandle.js +1 -1
- package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
- package/views/ToolViewManager.js +1 -1
- package/views/View.js +1 -1
- package/views/animation/easing.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/enums.js +1 -1
- package/views/webgl/renderState.js +1 -1
- package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/support/SketchTooltipControls/SketchTooltipControlsViewModel.js +1 -1
- package/widgets/support/SketchTooltipControls.js +1 -1
- package/widgets/support/SnappingControls.js +1 -1
- package/assets/esri/core/workers/chunks/055575ed2ab78be0bdb2.js +0 -1
- package/assets/esri/core/workers/chunks/0ee90a0b4d09a56c0d48.js +0 -1
- package/assets/esri/core/workers/chunks/15056f91d87f11b00bcc.js +0 -1
- package/assets/esri/core/workers/chunks/344e40934c98d6fe66ae.js +0 -1
- package/assets/esri/core/workers/chunks/558049fcac3a82a093fc.js +0 -1
- package/assets/esri/core/workers/chunks/5c41eb67d19b8710118a.js +0 -1
- package/assets/esri/core/workers/chunks/5d183ac1a8b68ba9c656.js +0 -1
- package/assets/esri/core/workers/chunks/610d4a5d2511fa81460e.js +0 -1
- package/assets/esri/core/workers/chunks/6755bb1f2a6575a8e082.js +0 -1
- package/assets/esri/core/workers/chunks/84173936b309712ba9b3.js +0 -1
- package/assets/esri/core/workers/chunks/877302d6e39a0d530aab.js +0 -1
- package/assets/esri/core/workers/chunks/a07dc782e69111e2eeaf.js +0 -1
- package/assets/esri/core/workers/chunks/b825019841247d173072.js +0 -1
- package/assets/esri/core/workers/chunks/bed1bc13b168fae46404.js +0 -1
- package/assets/esri/core/workers/chunks/c8dd21a332559c99815c.js +0 -1
- package/assets/esri/core/workers/chunks/ccc3564e76c0ec5c0228.js +0 -1
- package/assets/esri/core/workers/chunks/d0a81c7ec8a84eeadd31.js +0 -1
- package/assets/esri/core/workers/chunks/e7a852b319c1d89eddc5.js +0 -1
- package/assets/esri/core/workers/chunks/ebde11fdccb437954ce7.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7439,5732,2596,661,5234,9880],{99880:(t,e,n)=>{n.d(e,{V:()=>l});var r=n(68773),s=(n(3172),n(20102)),o=n(92604),i=n(17452);const a=o.Z.getLogger("esri.assets");function l(t){if(!r.default.assetsPath)throw a.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new s.Z("assets:path-not-set","config.assetsPath is not set");return(0,i.v_)(r.default.assetsPath,t)}},5732:(t,e,n)=>{n.d(e,{c:()=>r,g:()=>s});var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}},46521:(t,e,n)=>{function r(){return[1,0,0,0,1,0,0,0,1]}function s(t,e,n,r,s,o,i,a,l){return[t,e,n,r,s,o,i,a,l]}function o(t,e){return new Float64Array(t,e,9)}n.d(e,{a:()=>r,c:()=>o,f:()=>s}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:r,createView:o,fromValues:s},Symbol.toStringTag,{value:"Module"}))},52138:(t,e,n)=>{n.d(e,{A:()=>m,a:()=>w,b:()=>h,c:()=>p,d:()=>f,e:()=>x,f:()=>b,g:()=>i,i:()=>l,k:()=>d,m:()=>c,s:()=>o,t:()=>a,w:()=>u,y:()=>v,z:()=>_});var r=n(65617),s=n(46851);function o(t,e,n,r,s,o,i,a,l,c,u,h,d,f,p,m,y){return t[0]=e,t[1]=n,t[2]=r,t[3]=s,t[4]=o,t[5]=i,t[6]=a,t[7]=l,t[8]=c,t[9]=u,t[10]=h,t[11]=d,t[12]=f,t[13]=p,t[14]=m,t[15]=y,t}function i(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function a(t,e){if(t===e){const n=e[1],r=e[2],s=e[3],o=e[6],i=e[7],a=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=s,t[13]=i,t[14]=a}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function l(t,e){const n=e[0],r=e[1],s=e[2],o=e[3],i=e[4],a=e[5],l=e[6],c=e[7],u=e[8],h=e[9],d=e[10],f=e[11],p=e[12],m=e[13],y=e[14],g=e[15],b=n*a-r*i,M=n*l-s*i,x=n*c-o*i,w=r*l-s*a,_=r*c-o*a,v=s*c-o*l,S=u*m-h*p,q=u*y-d*p,O=u*g-f*p,R=h*y-d*m,T=h*g-f*m,C=d*g-f*y;let B=b*C-M*T+x*R+w*O-_*q+v*S;return B?(B=1/B,t[0]=(a*C-l*T+c*R)*B,t[1]=(s*T-r*C-o*R)*B,t[2]=(m*v-y*_+g*w)*B,t[3]=(d*_-h*v-f*w)*B,t[4]=(l*O-i*C-c*q)*B,t[5]=(n*C-s*O+o*q)*B,t[6]=(y*x-p*v-g*M)*B,t[7]=(u*v-d*x+f*M)*B,t[8]=(i*T-a*O+c*S)*B,t[9]=(r*O-n*T-o*S)*B,t[10]=(p*_-m*x+g*b)*B,t[11]=(h*x-u*_-f*b)*B,t[12]=(a*q-i*R-l*S)*B,t[13]=(n*R-r*q+s*S)*B,t[14]=(m*M-p*w-y*b)*B,t[15]=(u*w-h*M+d*b)*B,t):null}function c(t,e,n){const r=e[0],s=e[1],o=e[2],i=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=e[8],d=e[9],f=e[10],p=e[11],m=e[12],y=e[13],g=e[14],b=e[15];let M=n[0],x=n[1],w=n[2],_=n[3];return t[0]=M*r+x*a+w*h+_*m,t[1]=M*s+x*l+w*d+_*y,t[2]=M*o+x*c+w*f+_*g,t[3]=M*i+x*u+w*p+_*b,M=n[4],x=n[5],w=n[6],_=n[7],t[4]=M*r+x*a+w*h+_*m,t[5]=M*s+x*l+w*d+_*y,t[6]=M*o+x*c+w*f+_*g,t[7]=M*i+x*u+w*p+_*b,M=n[8],x=n[9],w=n[10],_=n[11],t[8]=M*r+x*a+w*h+_*m,t[9]=M*s+x*l+w*d+_*y,t[10]=M*o+x*c+w*f+_*g,t[11]=M*i+x*u+w*p+_*b,M=n[12],x=n[13],w=n[14],_=n[15],t[12]=M*r+x*a+w*h+_*m,t[13]=M*s+x*l+w*d+_*y,t[14]=M*o+x*c+w*f+_*g,t[15]=M*i+x*u+w*p+_*b,t}function u(t,e,n){const r=n[0],s=n[1],o=n[2];if(e===t)t[12]=e[0]*r+e[4]*s+e[8]*o+e[12],t[13]=e[1]*r+e[5]*s+e[9]*o+e[13],t[14]=e[2]*r+e[6]*s+e[10]*o+e[14],t[15]=e[3]*r+e[7]*s+e[11]*o+e[15];else{const n=e[0],i=e[1],a=e[2],l=e[3],c=e[4],u=e[5],h=e[6],d=e[7],f=e[8],p=e[9],m=e[10],y=e[11];t[0]=n,t[1]=i,t[2]=a,t[3]=l,t[4]=c,t[5]=u,t[6]=h,t[7]=d,t[8]=f,t[9]=p,t[10]=m,t[11]=y,t[12]=n*r+c*s+f*o+e[12],t[13]=i*r+u*s+p*o+e[13],t[14]=a*r+h*s+m*o+e[14],t[15]=l*r+d*s+y*o+e[15]}return t}function h(t,e,n){const r=n[0],s=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*s,t[5]=e[5]*s,t[6]=e[6]*s,t[7]=e[7]*s,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function d(t,e,n,r){let o,i,a,l,c,u,h,d,f,p,m,y,g,b,M,x,w,_,v,S,q,O,R,T,C=r[0],B=r[1],P=r[2],j=Math.sqrt(C*C+B*B+P*P);return j<(0,s.g)()?null:(j=1/j,C*=j,B*=j,P*=j,o=Math.sin(n),i=Math.cos(n),a=1-i,l=e[0],c=e[1],u=e[2],h=e[3],d=e[4],f=e[5],p=e[6],m=e[7],y=e[8],g=e[9],b=e[10],M=e[11],x=C*C*a+i,w=B*C*a+P*o,_=P*C*a-B*o,v=C*B*a-P*o,S=B*B*a+i,q=P*B*a+C*o,O=C*P*a+B*o,R=B*P*a-C*o,T=P*P*a+i,t[0]=l*x+d*w+y*_,t[1]=c*x+f*w+g*_,t[2]=u*x+p*w+b*_,t[3]=h*x+m*w+M*_,t[4]=l*v+d*S+y*q,t[5]=c*v+f*S+g*q,t[6]=u*v+p*S+b*q,t[7]=h*v+m*S+M*q,t[8]=l*O+d*R+y*T,t[9]=c*O+f*R+g*T,t[10]=u*O+p*R+b*T,t[11]=h*O+m*R+M*T,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function f(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function p(t,e,n){if(0===e)return i(t);let r,o,a,l=n[0],c=n[1],u=n[2],h=Math.sqrt(l*l+c*c+u*u);return h<(0,s.g)()?null:(h=1/h,l*=h,c*=h,u*=h,r=Math.sin(e),o=Math.cos(e),a=1-o,t[0]=l*l*a+o,t[1]=c*l*a+u*r,t[2]=u*l*a-c*r,t[3]=0,t[4]=l*c*a-u*r,t[5]=c*c*a+o,t[6]=u*c*a+l*r,t[7]=0,t[8]=l*u*a+c*r,t[9]=c*u*a-l*r,t[10]=u*u*a+o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function m(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function y(t,e,n){const r=e[0],s=e[1],o=e[2],i=e[3],a=r+r,l=s+s,c=o+o,u=r*a,h=r*l,d=r*c,f=s*l,p=s*c,m=o*c,y=i*a,g=i*l,b=i*c;return t[0]=1-(f+m),t[1]=h+b,t[2]=d-g,t[3]=0,t[4]=h-b,t[5]=1-(u+m),t[6]=p+y,t[7]=0,t[8]=d+g,t[9]=p-y,t[10]=1-(u+f),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}const g=(0,r.c)();function b(t,e,n,r){const s=e[0],o=e[1],i=e[2],a=e[3],l=s+s,c=o+o,u=i+i,h=s*l,d=s*c,f=s*u,p=o*c,m=o*u,y=i*u,g=a*l,b=a*c,M=a*u,x=r[0],w=r[1],_=r[2];return t[0]=(1-(p+y))*x,t[1]=(d+M)*x,t[2]=(f-b)*x,t[3]=0,t[4]=(d-M)*w,t[5]=(1-(h+y))*w,t[6]=(m+g)*w,t[7]=0,t[8]=(f+b)*_,t[9]=(m-g)*_,t[10]=(1-(h+p))*_,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function M(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function x(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function w(t,e){if(t===e)return!0;const n=t[0],r=t[1],o=t[2],i=t[3],a=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=t[9],f=t[10],p=t[11],m=t[12],y=t[13],g=t[14],b=t[15],M=e[0],x=e[1],w=e[2],_=e[3],v=e[4],S=e[5],q=e[6],O=e[7],R=e[8],T=e[9],C=e[10],B=e[11],P=e[12],j=e[13],A=e[14],E=e[15],k=(0,s.g)();return Math.abs(n-M)<=k*Math.max(1,Math.abs(n),Math.abs(M))&&Math.abs(r-x)<=k*Math.max(1,Math.abs(r),Math.abs(x))&&Math.abs(o-w)<=k*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(i-_)<=k*Math.max(1,Math.abs(i),Math.abs(_))&&Math.abs(a-v)<=k*Math.max(1,Math.abs(a),Math.abs(v))&&Math.abs(l-S)<=k*Math.max(1,Math.abs(l),Math.abs(S))&&Math.abs(c-q)<=k*Math.max(1,Math.abs(c),Math.abs(q))&&Math.abs(u-O)<=k*Math.max(1,Math.abs(u),Math.abs(O))&&Math.abs(h-R)<=k*Math.max(1,Math.abs(h),Math.abs(R))&&Math.abs(d-T)<=k*Math.max(1,Math.abs(d),Math.abs(T))&&Math.abs(f-C)<=k*Math.max(1,Math.abs(f),Math.abs(C))&&Math.abs(p-B)<=k*Math.max(1,Math.abs(p),Math.abs(B))&&Math.abs(m-P)<=k*Math.max(1,Math.abs(m),Math.abs(P))&&Math.abs(y-j)<=k*Math.max(1,Math.abs(y),Math.abs(j))&&Math.abs(g-A)<=k*Math.max(1,Math.abs(g),Math.abs(A))&&Math.abs(b-E)<=k*Math.max(1,Math.abs(b),Math.abs(E))}function _(t){const e=(0,s.g)(),n=t[0],r=t[1],o=t[2],i=t[4],a=t[5],l=t[6],c=t[8],u=t[9],h=t[10];return Math.abs(1-(n*n+i*i+c*c))<=e&&Math.abs(1-(r*r+a*a+u*u))<=e&&Math.abs(1-(o*o+l*l+h*h))<=e}function v(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const S=c,q=M;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},adjoint:function(t,e){const n=e[0],r=e[1],s=e[2],o=e[3],i=e[4],a=e[5],l=e[6],c=e[7],u=e[8],h=e[9],d=e[10],f=e[11],p=e[12],m=e[13],y=e[14],g=e[15];return t[0]=a*(d*g-f*y)-h*(l*g-c*y)+m*(l*f-c*d),t[1]=-(r*(d*g-f*y)-h*(s*g-o*y)+m*(s*f-o*d)),t[2]=r*(l*g-c*y)-a*(s*g-o*y)+m*(s*c-o*l),t[3]=-(r*(l*f-c*d)-a*(s*f-o*d)+h*(s*c-o*l)),t[4]=-(i*(d*g-f*y)-u*(l*g-c*y)+p*(l*f-c*d)),t[5]=n*(d*g-f*y)-u*(s*g-o*y)+p*(s*f-o*d),t[6]=-(n*(l*g-c*y)-i*(s*g-o*y)+p*(s*c-o*l)),t[7]=n*(l*f-c*d)-i*(s*f-o*d)+u*(s*c-o*l),t[8]=i*(h*g-f*m)-u*(a*g-c*m)+p*(a*f-c*h),t[9]=-(n*(h*g-f*m)-u*(r*g-o*m)+p*(r*f-o*h)),t[10]=n*(a*g-c*m)-i*(r*g-o*m)+p*(r*c-o*a),t[11]=-(n*(a*f-c*h)-i*(r*f-o*h)+u*(r*c-o*a)),t[12]=-(i*(h*y-d*m)-u*(a*y-l*m)+p*(a*d-l*h)),t[13]=n*(h*y-d*m)-u*(r*y-s*m)+p*(r*d-s*h),t[14]=-(n*(a*y-l*m)-i*(r*y-s*m)+p*(r*l-s*a)),t[15]=n*(a*d-l*h)-i*(r*d-s*h)+u*(r*l-s*a),t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},determinant:function(t){const e=t[0],n=t[1],r=t[2],s=t[3],o=t[4],i=t[5],a=t[6],l=t[7],c=t[8],u=t[9],h=t[10],d=t[11],f=t[12],p=t[13],m=t[14],y=t[15];return(e*i-n*o)*(h*y-d*m)-(e*a-r*o)*(u*y-d*p)+(e*l-s*o)*(u*m-h*p)+(n*a-r*i)*(c*y-d*f)-(n*l-s*i)*(c*m-h*f)+(r*l-s*a)*(c*p-u*f)},equals:w,exactEquals:x,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+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},fromQuat:function(t,e){const n=e[0],r=e[1],s=e[2],o=e[3],i=n+n,a=r+r,l=s+s,c=n*i,u=r*i,h=r*a,d=s*i,f=s*a,p=s*l,m=o*i,y=o*a,g=o*l;return t[0]=1-h-p,t[1]=u+g,t[2]=d-y,t[3]=0,t[4]=u-g,t[5]=1-c-p,t[6]=f+m,t[7]=0,t[8]=d+y,t[9]=f-m,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,e){const n=g,r=-e[0],s=-e[1],o=-e[2],i=e[3],a=e[4],l=e[5],c=e[6],u=e[7],h=r*r+s*s+o*o+i*i;return h>0?(n[0]=2*(a*i+u*r+l*o-c*s)/h,n[1]=2*(l*i+u*s+c*r-a*o)/h,n[2]=2*(c*i+u*o+a*s-l*r)/h):(n[0]=2*(a*i+u*r+l*o-c*s),n[1]=2*(l*i+u*s+c*r-a*o),n[2]=2*(c*i+u*o+a*s-l*r)),y(t,e,n),t},fromRotation:p,fromRotationTranslation:y,fromRotationTranslationScale:b,fromRotationTranslationScaleOrigin:function(t,e,n,r,s){const o=e[0],i=e[1],a=e[2],l=e[3],c=o+o,u=i+i,h=a+a,d=o*c,f=o*u,p=o*h,m=i*u,y=i*h,g=a*h,b=l*c,M=l*u,x=l*h,w=r[0],_=r[1],v=r[2],S=s[0],q=s[1],O=s[2],R=(1-(m+g))*w,T=(f+x)*w,C=(p-M)*w,B=(f-x)*_,P=(1-(d+g))*_,j=(y+b)*_,A=(p+M)*v,E=(y-b)*v,k=(1-(d+m))*v;return t[0]=R,t[1]=T,t[2]=C,t[3]=0,t[4]=B,t[5]=P,t[6]=j,t[7]=0,t[8]=A,t[9]=E,t[10]=k,t[11]=0,t[12]=n[0]+S-(R*S+B*q+A*O),t[13]=n[1]+q-(T*S+P*q+E*O),t[14]=n[2]+O-(C*S+j*q+k*O),t[15]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:f,fromXRotation:m,fromYRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},frustum:function(t,e,n,r,s,o,i){const a=1/(n-e),l=1/(s-r),c=1/(o-i);return t[0]=2*o*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*l,t[6]=0,t[7]=0,t[8]=(n+e)*a,t[9]=(s+r)*l,t[10]=(i+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=i*o*2*c,t[15]=0,t},getRotation:function(t,e){const n=e[0]+e[5]+e[10];let r=0;return n>0?(r=2*Math.sqrt(n+1),t[3]=.25*r,t[0]=(e[6]-e[9])/r,t[1]=(e[8]-e[2])/r,t[2]=(e[1]-e[4])/r):e[0]>e[5]&&e[0]>e[10]?(r=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/r,t[0]=.25*r,t[1]=(e[1]+e[4])/r,t[2]=(e[8]+e[2])/r):e[5]>e[10]?(r=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/r,t[0]=(e[1]+e[4])/r,t[1]=.25*r,t[2]=(e[6]+e[9])/r):(r=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/r,t[0]=(e[8]+e[2])/r,t[1]=(e[6]+e[9])/r,t[2]=.25*r),t},getScaling:function(t,e){const n=e[0],r=e[1],s=e[2],o=e[4],i=e[5],a=e[6],l=e[8],c=e[9],u=e[10];return t[0]=Math.sqrt(n*n+r*r+s*s),t[1]=Math.sqrt(o*o+i*i+a*a),t[2]=Math.sqrt(l*l+c*c+u*u),t},getTranslation:function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},hasIdentityRotation:v,identity:i,invert:l,invertOrIdentity:function(t,e){return l(t,e)||i(t),t},isOrthoNormal:_,lookAt:function(t,e,n,r){const o=e[0],a=e[1],l=e[2];let c=o-n[0],u=a-n[1],h=l-n[2];const d=(0,s.g)();if(Math.abs(c)<d&&Math.abs(u)<d&&Math.abs(h)<d)return void i(t);let f=1/Math.sqrt(c*c+u*u+h*h);c*=f,u*=f,h*=f;const p=r[0],m=r[1],y=r[2];let g=m*h-y*u,b=y*c-p*h,M=p*u-m*c;f=Math.sqrt(g*g+b*b+M*M),f?(f=1/f,g*=f,b*=f,M*=f):(g=0,b=0,M=0);let x=u*M-h*b,w=h*g-c*M,_=c*b-u*g;f=Math.sqrt(x*x+w*w+_*_),f?(f=1/f,x*=f,w*=f,_*=f):(x=0,w=0,_=0),t[0]=g,t[1]=x,t[2]=c,t[3]=0,t[4]=b,t[5]=w,t[6]=u,t[7]=0,t[8]=M,t[9]=_,t[10]=h,t[11]=0,t[12]=-(g*o+b*a+M*l),t[13]=-(x*o+w*a+_*l),t[14]=-(c*o+u*a+h*l),t[15]=1},mul:S,multiply:c,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},ortho:function(t,e,n,r,s,o,i){const a=1/(e-n),l=1/(r-s),c=1/(o-i);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*a,t[13]=(s+r)*l,t[14]=(i+o)*c,t[15]=1,t},perspective:function(t,e,n,r,s){const o=1/Math.tan(e/2);let i;return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=s&&s!==1/0?(i=1/(r-s),t[10]=(s+r)*i,t[14]=2*s*r*i):(t[10]=-1,t[14]=-2*r),t},perspectiveFromFieldOfView:function(t,e,n,r){const s=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),i=Math.tan(e.leftDegrees*Math.PI/180),a=Math.tan(e.rightDegrees*Math.PI/180),l=2/(i+a),c=2/(s+o);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(i-a)*l*.5,t[9]=(s-o)*c*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},rotate:d,rotateX:function(t,e,n){const r=Math.sin(n),s=Math.cos(n),o=e[4],i=e[5],a=e[6],l=e[7],c=e[8],u=e[9],h=e[10],d=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*s+c*r,t[5]=i*s+u*r,t[6]=a*s+h*r,t[7]=l*s+d*r,t[8]=c*s-o*r,t[9]=u*s-i*r,t[10]=h*s-a*r,t[11]=d*s-l*r,t},rotateY:function(t,e,n){const r=Math.sin(n),s=Math.cos(n),o=e[0],i=e[1],a=e[2],l=e[3],c=e[8],u=e[9],h=e[10],d=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*s-c*r,t[1]=i*s-u*r,t[2]=a*s-h*r,t[3]=l*s-d*r,t[8]=o*r+c*s,t[9]=i*r+u*s,t[10]=a*r+h*s,t[11]=l*r+d*s,t},rotateZ:function(t,e,n){const r=Math.sin(n),s=Math.cos(n),o=e[0],i=e[1],a=e[2],l=e[3],c=e[4],u=e[5],h=e[6],d=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*s+c*r,t[1]=i*s+u*r,t[2]=a*s+h*r,t[3]=l*s+d*r,t[4]=c*s-o*r,t[5]=u*s-i*r,t[6]=h*s-a*r,t[7]=d*s-l*r,t},scale:h,set:o,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:q,subtract:M,targetTo:function(t,e,n,r){const s=e[0],o=e[1],i=e[2],a=r[0],l=r[1],c=r[2];let u=s-n[0],h=o-n[1],d=i-n[2],f=u*u+h*h+d*d;f>0&&(f=1/Math.sqrt(f),u*=f,h*=f,d*=f);let p=l*d-c*h,m=c*u-a*d,y=a*h-l*u;return f=p*p+m*m+y*y,f>0&&(f=1/Math.sqrt(f),p*=f,m*=f,y*=f),t[0]=p,t[1]=m,t[2]=y,t[3]=0,t[4]=h*y-d*m,t[5]=d*p-u*y,t[6]=u*m-h*p,t[7]=0,t[8]=u,t[9]=h,t[10]=d,t[11]=0,t[12]=s,t[13]=o,t[14]=i,t[15]=1,t},translate:u,transpose:a},Symbol.toStringTag,{value:"Module"}))},13598:(t,e,n)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}function o(t,e){return new Float64Array(t,e,16)}n.d(e,{I:()=>i,a:()=>r,b:()=>s,c:()=>o});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:s,create:r,createView:o,fromValues:function(t,e,n,r,s,o,i,a,l,c,u,h,d,f,p,m){return[t,e,n,r,s,o,i,a,l,c,u,h,d,f,p,m]}},Symbol.toStringTag,{value:"Module"}))},94961:(t,e,n)=>{function r(){return[0,0,0,1]}function s(t){return[t[0],t[1],t[2],t[3]]}function o(t,e){return new Float64Array(t,e,4)}n.d(e,{I:()=>i,a:()=>r,b:()=>s,c:()=>o});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:s,create:r,createView:o,fromValues:function(t,e,n,r){return[t,e,n,r]}},Symbol.toStringTag,{value:"Module"}))},88764:(t,e,n)=>{n.d(e,{q:()=>l});var r,s,o,i=n(5732),a={exports:{}};r=a,s=function(){function t(n,r,s,o,i){for(;o>s;){if(o-s>600){var a=o-s+1,l=r-s+1,c=Math.log(a),u=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*u*(a-u)/a)*(l-a/2<0?-1:1);t(n,r,Math.max(s,Math.floor(r-l*u/a+h)),Math.min(o,Math.floor(r+(a-l)*u/a+h)),i)}var d=n[r],f=s,p=o;for(e(n,s,r),i(n[o],d)>0&&e(n,s,o);f<p;){for(e(n,f,p),f++,p--;i(n[f],d)<0;)f++;for(;i(n[p],d)>0;)p--}0===i(n[s],d)?e(n,s,p):e(n,++p,o),p<=r&&(s=p+1),r<=p&&(o=p-1)}}function e(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function n(t,e){return t<e?-1:t>e?1:0}return function(e,r,s,o,i){t(e,r,s||0,o||e.length-1,i||n)}},void 0!==(o=s())&&(r.exports=o);const l=(0,i.g)(a.exports)},20773:(t,e,n)=>{n.d(e,{a:()=>a,b:()=>i,c:()=>s,d:()=>u,e:()=>l,n:()=>h,s:()=>c,t:()=>o});var r=n(72220);function s(t,e,n){o(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function o(t,e,n,s=3,o=s){if(t.length/s!==Math.ceil(e.length/o))return r.c.error("source and destination buffers need to have the same number of elements"),t;const i=t.length/s,a=n[0],l=n[1],c=n[2],u=n[4],h=n[5],d=n[6],f=n[8],p=n[9],m=n[10],y=n[12],g=n[13],b=n[14];let M=0,x=0;for(let n=0;n<i;n++){const n=e[M],r=e[M+1],i=e[M+2];t[x]=a*n+u*r+f*i+y,t[x+1]=l*n+h*r+p*i+g,t[x+2]=c*n+d*r+m*i+b,M+=o,x+=s}return t}function i(t,e,n){a(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function a(t,e,n,s=3,o=s){if(t.length/s!==Math.ceil(e.length/o))return void r.c.error("source and destination buffers need to have the same number of elements");const i=t.length/s,a=n[0],l=n[1],c=n[2],u=n[3],h=n[4],d=n[5],f=n[6],p=n[7],m=n[8];let y=0,g=0;for(let n=0;n<i;n++){const n=e[y],r=e[y+1],i=e[y+2];t[g]=a*n+u*r+f*i,t[g+1]=l*n+h*r+p*i,t[g+2]=c*n+d*r+m*i,y+=o,g+=s}}function l(t,e,n){c(t.typedBuffer,e,n,t.typedBufferStride)}function c(t,e,n,r=3){const s=Math.min(t.length/r,e.count),o=e.typedBuffer,i=e.typedBufferStride;let a=0,l=0;for(let e=0;e<s;e++)t[l]=n*o[a],t[l+1]=n*o[a+1],t[l+2]=n*o[a+2],a+=i,l+=r}function u(t,e){h(t.typedBuffer,e.typedBuffer,t.typedBufferStride,e.typedBufferStride)}function h(t,e,n=3,r=n){const s=Math.min(t.length/n,e.length/r);let o=0,i=0;for(let a=0;a<s;a++){const s=e[o],a=e[o+1],l=e[o+2],c=s*s+a*a+l*l;if(c>0){const e=1/Math.sqrt(c);t[i]=e*s,t[i+1]=e*a,t[i+2]=e*l}o+=r,i+=n}}Object.freeze(Object.defineProperty({__proto__:null,normalize:h,normalizeView:u,scale:c,scaleView:l,shiftRight:function(t,e,n){const r=Math.min(t.count,e.count),s=t.typedBuffer,o=t.typedBufferStride,i=e.typedBuffer,a=e.typedBufferStride;let l=0,c=0;for(let t=0;t<r;t++)s[c]=i[l]>>n,s[c+1]=i[l+1]>>n,s[c+2]=i[l+2]>>n,l+=a,c+=o},transformMat3:a,transformMat3View:i,transformMat4:o,transformMat4View:s},Symbol.toStringTag,{value:"Module"}))},2368:(t,e,n)=>{n.d(e,{J:()=>u,j:()=>h});var r=n(43697),s=n(92036),o=(n(80442),n(22974)),i=(n(92604),n(70586)),a=n(31263),l=n(1153),c=n(52011);const u=t=>{let e=class extends t{clone(){const t=(0,l.vw)(this);(0,i.O3)(t,"unable to clone instance of non-accessor class");const e=t.metadatas,n=t.store,r={},s=new Map;for(const t in e){const i=e[t],l=n?.originOf(t),c=i.clonable;if(i.readOnly||!1===c||l!==a.s3.USER&&l!==a.s3.DEFAULTS&&l!==a.s3.WEB_MAP&&l!==a.s3.WEB_SCENE)continue;const u=this[t];let h=null;h="function"==typeof c?c(u):"reference"===c?u:(0,o.Vo)(u),null!=u&&null==h||(l===a.s3.DEFAULTS?s.set(t,h):r[t]=h)}const c=new(0,Object.getPrototypeOf(this).constructor)(r);if(s.size){const t=(0,l.vw)(c)?.store;if(t)for(const[e,n]of s)t.set(e,n,a.s3.DEFAULTS)}return c}};return e=(0,r._)([(0,c.j)("esri.core.Clonable")],e),e};let h=class extends(u(s.Z)){};h=(0,r._)([(0,c.j)("esri.core.Clonable")],h)},90578:(t,e,n)=>{n.d(e,{p:()=>l});var r=n(75215),s=n(7628);const o=Object.prototype.toString;function i(t){const e="__accessorMetadata__"in t?(0,r.se)(t):t;return function(...t){if(t.push(e),"number"==typeof t[2])throw new Error("Using @cast has parameter decorator is not supported since 4.16");return a.apply(this,t)}}function a(t,e,n,r){(0,s.Oe)(t,e).cast=r}function l(...t){if(3!==t.length||"string"!=typeof t[1])return 1===t.length&&"[object Function]"===o.call(t[0])?i(t[0]):1===t.length&&"string"==typeof t[0]?function(t){return(e,n)=>{(0,s.Oe)(e,t).cast=e[n]}}(t[0]):void 0}},71715:(t,e,n)=>{n.d(e,{r:()=>s});var r=n(5600);function s(t,e,n){let s,o;return void 0===e||Array.isArray(e)?(o=t,n=e,s=[void 0]):(o=e,s=Array.isArray(t)?t:[t]),(t,e)=>{const i=t.constructor.prototype;s.forEach((s=>{const a=(0,r.CJ)(t,s,o);a.read&&"object"==typeof a.read||(a.read={}),a.read.reader=i[e],n&&(a.read.source=(a.read.source||[]).concat(n))}))}}},10661:(t,e,n)=>{n.d(e,{s:()=>s});var r=n(42100);class s extends r.s{notify(){const t=this._observers;if(t&&t.length>0){const e=t.slice();for(const t of e)t.onInvalidated(),t.onCommitted()}}}},24133:(t,e,n)=>{n.d(e,{Q:()=>i});var r=n(67676),s=n(44553),o=n(88764);class i{constructor(t=9,e){this._compareMinX=u,this._compareMinY=h,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),M.prune(),x.prune(),w.prune(),_.prune()}all(t){this._all(this._data,t)}search(t,e){let n=this._data;const r=this._toBBox;if(g(t,n))for(M.clear();n;){for(let s=0,o=n.children.length;s<o;s++){const o=n.children[s],i=n.leaf?r(o):o;g(t,i)&&(n.leaf?e(o):y(t,i)?this._all(o,e):M.push(o))}n=M.pop()}}collides(t){let e=this._data;const n=this._toBBox;if(!g(t,e))return!1;for(M.clear();e;){for(let r=0,s=e.children.length;r<s;r++){const s=e.children[r],o=e.leaf?n(s):s;if(g(t,o)){if(e.leaf||y(t,o))return!0;M.push(s)}}e=M.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,n=t.length;e<n;e++)this.insert(t[e]);return this}let e=this._build(t.slice(0,t.length),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){const t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new q([]),this}remove(t){if(!t)return this;let e,n=this._data,s=null,o=0,i=!1;const a=this._toBBox(t);for(w.clear(),_.clear();n||w.length>0;){if(n||(n=w.pop(),s=w.data[w.length-1],o=_.pop()??0,i=!0),n.leaf&&(e=(0,r.cq)(n.children,t,n.children.length,n.indexHint),-1!==e))return n.children.splice(e,1),w.push(n),this._condense(w),this;i||n.leaf||!y(n,a)?s?(o++,n=s.children[o],i=!1):n=null:(w.push(n),_.push(o),o=0,s=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_all(t,e){let n=t;for(x.clear();n;){if(!0===n.leaf)for(const t of n.children)e(t);else x.pushArray(n.children);n=x.pop()??null}}_build(t,e,n,r){const s=n-e+1;let o=this._maxEntries;if(s<=o){const r=new q(t.slice(e,n+1));return a(r,this._toBBox),r}r||(r=Math.ceil(Math.log(s)/Math.log(o)),o=Math.ceil(s/o**(r-1)));const i=new O([]);i.height=r;const l=Math.ceil(s/o),c=l*Math.ceil(Math.sqrt(o));b(t,e,n,c,this._compareMinX);for(let s=e;s<=n;s+=c){const e=Math.min(s+c-1,n);b(t,s,e,l,this._compareMinY);for(let n=s;n<=e;n+=l){const s=Math.min(n+l-1,e);i.children.push(this._build(t,n,s,r-1))}}return a(i,this._toBBox),i}_chooseSubtree(t,e,n,r){for(;r.push(e),!0!==e.leaf&&r.length-1!==n;){let n,r=1/0,s=1/0;for(let o=0,i=e.children.length;o<i;o++){const i=e.children[o],a=d(i),l=p(t,i)-a;l<s?(s=l,r=a<r?a:r,n=i):l===s&&a<r&&(r=a,n=i)}e=n||e.children[0]}return e}_insert(t,e,n){const r=this._toBBox,s=n?t:r(t);w.clear();const o=this._chooseSubtree(s,this._data,e,w);for(o.children.push(t),c(o,s);e>=0&&w.data[e].children.length>this._maxEntries;)this._split(w,e),e--;this._adjustParentBBoxes(s,w,e)}_split(t,e){const n=t.data[e],r=n.children.length,s=this._minEntries;this._chooseSplitAxis(n,s,r);const o=this._chooseSplitIndex(n,s,r);if(!o)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const i=n.children.splice(o,n.children.length-o),l=n.leaf?new q(i):new O(i);l.height=n.height,a(n,this._toBBox),a(l,this._toBBox),e?t.data[e-1].children.push(l):this._splitRoot(n,l)}_splitRoot(t,e){this._data=new O([t,e]),this._data.height=t.height+1,a(this._data,this._toBBox)}_chooseSplitIndex(t,e,n){let r,s,o;r=s=1/0;for(let i=e;i<=n-e;i++){const e=l(t,0,i,this._toBBox),a=l(t,i,n,this._toBBox),c=m(e,a),u=d(e)+d(a);c<r?(r=c,o=i,s=u<s?u:s):c===r&&u<s&&(s=u,o=i)}return o}_chooseSplitAxis(t,e,n){const r=t.leaf?this._compareMinX:u,s=t.leaf?this._compareMinY:h;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,s)&&t.children.sort(r)}_allDistMargin(t,e,n,r){t.children.sort(r);const s=this._toBBox,o=l(t,0,e,s),i=l(t,n-e,n,s);let a=f(o)+f(i);for(let r=e;r<n-e;r++){const e=t.children[r];c(o,t.leaf?s(e):e),a+=f(o)}for(let r=n-e-1;r>=e;r--){const e=t.children[r];c(i,t.leaf?s(e):e),a+=f(i)}return a}_adjustParentBBoxes(t,e,n){for(let r=n;r>=0;r--)c(e.data[r],t)}_condense(t){for(let e=t.length-1;e>=0;e--){const n=t.data[e];if(0===n.children.length)if(e>0){const s=t.data[e-1],o=s.children;o.splice((0,r.cq)(o,n,o.length,s.indexHint),1)}else this.clear();else a(n,this._toBBox)}}_initFormat(t){const e=["return a"," - b",";"];this._compareMinX=new Function("a","b",e.join(t[0])),this._compareMinY=new Function("a","b",e.join(t[1])),this._toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function a(t,e){l(t,0,t.children.length,e,t)}function l(t,e,n,r,s){s||(s=new q([])),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(let o,i=e;i<n;i++)o=t.children[i],c(s,t.leaf?r(o):o);return s}function c(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function u(t,e){return t.minX-e.minX}function h(t,e){return t.minY-e.minY}function d(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function f(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function m(t,e){const n=Math.max(t.minX,e.minX),r=Math.max(t.minY,e.minY),s=Math.min(t.maxX,e.maxX),o=Math.min(t.maxY,e.maxY);return Math.max(0,s-n)*Math.max(0,o-r)}function y(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function g(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function b(t,e,n,r,s){const i=[e,n];for(;i.length;){const e=i.pop(),n=i.pop();if(e-n<=r)continue;const a=n+Math.ceil((e-n)/r/2)*r;(0,o.q)(t,a,n,e,s),i.push(n,a,a,e)}}const M=new s.Z,x=new s.Z,w=new s.Z,_=new s.Z({deallocator:void 0});class v{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class S extends v{constructor(){super(...arguments),this.height=1,this.indexHint=new r.SO}}class q extends S{constructor(t){super(),this.children=t,this.leaf=!0}}class O extends S{constructor(t){super(),this.children=t,this.leaf=!1}}},9361:(t,e,n)=>{n.d(e,{Z:()=>u});var r=n(43697),s=n(96674),o=n(5600),i=(n(75215),n(67676),n(80442),n(71715)),a=n(52011),l=n(82971);let c=class extends s.wq{constructor(...t){super(...t),this.type=null,this.hasM=!1,this.hasZ=!1,this.spatialReference=l.Z.WGS84}get cache(){return this.commitProperty("spatialReference"),{}}get extent(){return null}readSpatialReference(t,e){if(t instanceof l.Z)return t;if(null!=t){const n=new l.Z;return n.read(t,e),n}return t}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}clearCache(){this.notifyChange("cache")}getCacheValue(t){return this.cache[t]}setCacheValue(t,e){this.cache[t]=e}};(0,r._)([(0,o.Cb)()],c.prototype,"type",void 0),(0,r._)([(0,o.Cb)({readOnly:!0})],c.prototype,"cache",null),(0,r._)([(0,o.Cb)({readOnly:!0})],c.prototype,"extent",null),(0,r._)([(0,o.Cb)({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],c.prototype,"hasM",void 0),(0,r._)([(0,o.Cb)({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],c.prototype,"hasZ",void 0),(0,r._)([(0,o.Cb)({type:l.Z,json:{write:!0},value:l.Z.WGS84})],c.prototype,"spatialReference",void 0),(0,r._)([(0,i.r)("spatialReference")],c.prototype,"readSpatialReference",null),c=(0,r._)([(0,a.j)("esri.geometry.Geometry")],c);const u=c},94139:(t,e,n)=>{n.d(e,{Z:()=>M});var r,s=n(43697),o=n(92604),i=n(5600),a=n(90578),l=(n(67676),n(80442),n(71715)),c=n(52011),u=n(30556),h=n(75215),d=n(9361),f=n(82971),p=n(8744),m=n(40488);const y=[0,0];function g(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}let b=r=class extends d.Z{static copy(t,e){e._set("x",t._get("x")),e._set("y",t._get("y")),e._set("z",t._get("z")),e._set("m",t._get("m"));const n=t._get("spatialReference");e._set("spatialReference",Object.isFrozen(n)?n:n.clone())}constructor(...t){super(...t),this.x=0,this.y=0,this.z=void 0,this.m=void 0,this.type="point"}normalizeCtorArgs(t,e,n,r,s){let i;if(Array.isArray(t))i=t,s=e,t=i[0],e=i[1],n=i[2],r=i[3];else if(t&&"object"==typeof t){if(i=t,t=null!=i.x?i.x:i.longitude,e=null!=i.y?i.y:i.latitude,n=i.z,r=i.m,(s=i.spatialReference)&&"esri.geometry.SpatialReference"!==s.declaredClass&&(s=new f.Z(s)),null!=i.longitude||null!=i.latitude)if(null==i.longitude)o.Z.getLogger(this).warn(".longitude=","Latitude was defined without longitude");else if(null==i.latitude)o.Z.getLogger(this).warn(".latitude=","Longitude was defined without latitude");else if(!i.declaredClass&&s&&s.isWebMercator){const n=(0,m.hG)(i.longitude,i.latitude,y);t=n[0],e=n[1]}}else g(n)?(s=n,n=null):g(r)&&(s=r,r=null);const a={x:t,y:e};return null==a.x&&null!=a.y?o.Z.getLogger(this).warn(".y=","Y coordinate was defined without an X coordinate"):null==a.y&&null!=a.x&&o.Z.getLogger(this).warn(".x=","X coordinate was defined without a Y coordinate"),null!=s&&(a.spatialReference=s),null!=n&&(a.z=n),null!=r&&(a.m=r),a}get cache(){return this.commitProperty("x"),this.commitProperty("y"),this.commitProperty("z"),this.commitProperty("m"),this.commitProperty("spatialReference"),{}}get hasM(){return void 0!==this.m}set hasM(t){t!==(void 0!==this._get("m"))&&(this._set("m",t?0:void 0),this._set("hasM",t))}get hasZ(){return void 0!==this.z}set hasZ(t){t!==(void 0!==this._get("z"))&&(this._set("z",t?0:void 0),this._set("hasZ",t))}get latitude(){const{spatialReference:t,x:e,y:n}=this;if(t){if(t.isWebMercator)return(0,m.R6)(e,n,y)[1];if(t.isGeographic)return n}return null}set latitude(t){const{spatialReference:e,x:n}=this;null!=t&&e&&(e.isWebMercator?this._set("y",(0,m.hG)(n,t,y)[1]):e.isGeographic&&this._set("y",t),this._set("latitude",t))}get longitude(){const{x:t,y:e,spatialReference:n}=this;if(n){if(n.isWebMercator)return(0,m.R6)(t,e,y)[0];if(n.isGeographic)return t}return null}set longitude(t){const{y:e,spatialReference:n}=this;null!=t&&n&&(n.isWebMercator?this._set("x",(0,m.hG)(t,e,y)[0]):n.isGeographic&&this._set("x",t),this._set("longitude",t))}writeX(t,e,n){e[n]=isNaN(t)?"NaN":t}readX(t){return"string"==typeof t?NaN:t}clone(){const t=new r;return t.x=this.x,t.y=this.y,t.z=this.z,t.m=this.m,t.spatialReference=this.spatialReference,t}copy(t){return r.copy(t,this),this}equals(t){if(null==t)return!1;const{x:e,y:n,z:r,m:s,spatialReference:o}=this,{z:i,m:a}=t;let{x:l,y:c,spatialReference:u}=t;if(!o.equals(u))if(o.isWebMercator&&u.isWGS84)[l,c]=(0,m.hG)(l,c),u=o;else{if(!o.isWGS84||!u.isWebMercator)return!1;[l,c]=(0,m.R6)(l,c),u=o}return e===l&&n===c&&r===i&&s===a&&o.wkid===u.wkid}offset(t,e,n){return this.x+=t,this.y+=e,null!=n&&(this.z=(this.z??0)+n),this}normalize(){if(!this.spatialReference)return this;const t=(0,p.C5)(this.spatialReference);if(!t)return this;let e=this.x;const[n,r]=t.valid,s=2*r;let o;return e>r?(o=Math.ceil(Math.abs(e-r)/s),e-=o*s):e<n&&(o=Math.ceil(Math.abs(e-n)/s),e+=o*s),this._set("x",e),this}distance(t){return function(t,e){const n=t.x-e.x,r=t.y-e.y,s=t.hasZ&&e.hasZ?t.z-e.z:0;return Math.sqrt(n*n+r*r+s*s)}(this,t)}toArray(){const t=this.hasZ,e=this.hasM;return t&&e?[this.x,this.y,this.z,this.m]:t?[this.x,this.y,this.z]:e?[this.x,this.y,this.m]:[this.x,this.y]}toJSON(t){return this.write({},t)}};(0,s._)([(0,i.Cb)({readOnly:!0})],b.prototype,"cache",null),(0,s._)([(0,i.Cb)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],b.prototype,"hasM",null),(0,s._)([(0,i.Cb)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],b.prototype,"hasZ",null),(0,s._)([(0,i.Cb)({type:Number})],b.prototype,"latitude",null),(0,s._)([(0,i.Cb)({type:Number})],b.prototype,"longitude",null),(0,s._)([(0,i.Cb)({type:Number,json:{type:[Number,String],write:{isRequired:!0,allowNull:!0}}}),(0,a.p)((t=>isNaN(t)?t:(0,h.q9)(t)))],b.prototype,"x",void 0),(0,s._)([(0,u.c)("x")],b.prototype,"writeX",null),(0,s._)([(0,l.r)("x")],b.prototype,"readX",null),(0,s._)([(0,i.Cb)({type:Number,json:{write:!0}})],b.prototype,"y",void 0),(0,s._)([(0,i.Cb)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasZ}}}}})],b.prototype,"z",void 0),(0,s._)([(0,i.Cb)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasM}}}}})],b.prototype,"m",void 0),b=r=(0,s._)([(0,c.j)("esri.geometry.Point")],b),b.prototype.toJSON.isDefaultToJSON=!0;const M=b},62155:(t,e,n)=>{var r;n.d(e,{R:()=>r}),function(t){t[t.X=0]="X",t[t.Y=1]="Y",t[t.Z=2]="Z"}(r||(r={}))},83025:(t,e,n)=>{n.d(e,{JK:()=>a,QZ:()=>o,Rq:()=>i,bg:()=>s,mB:()=>l});var r=n(1533);function s(t,e=!1){return t<=r.c8?e?new Array(t).fill(0):new Array(t):new Float64Array(t)}function o(t){return((0,r.kJ)(t)?t.length:t.byteLength/8)<=r.c8?Array.from(t):new Float64Array(t)}function i(t,e,n){return Array.isArray(t)?t.slice(e,e+n):t.subarray(e,e+n)}function a(t,e){for(let n=0;n<e.length;++n)t[n]=e[n];return t}function l(t){return Array.isArray(t)?new Float64Array(t):t}},85872:(t,e,n)=>{n.d(e,{Z:()=>d});var r=n(43697),s=n(2368),o=n(96674),i=n(5600),a=(n(75215),n(67676),n(80442),n(36030)),l=n(52011),c=n(65617),u=n(94139);let h=class extends((0,s.J)(o.wq)){constructor(t){super(t),this.type="georeferenced-relative",this.isRelative=!0,this.isGeoreferenced=!0,this.origin=(0,c.c)()}getOriginPoint(t){const[e,n,r]=this.origin;return new u.Z({x:e,y:n,z:r,spatialReference:t})}setOriginFromPoint({x:t,y:e,z:n}){this.origin=(0,c.f)(t,e,n??0)}};(0,r._)([(0,a.J)({georeferencedRelative:"georeferenced-relative"},{readOnly:!0})],h.prototype,"type",void 0),(0,r._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"origin",void 0),h=(0,r._)([(0,l.j)("esri.geometry.support.MeshGeoreferencedRelativeVertexSpace")],h);const d=h},84555:(t,e,n)=>{n.d(e,{Z:()=>d});var r=n(43697),s=n(2368),o=n(96674),i=n(5600),a=(n(75215),n(67676),n(80442),n(36030)),l=n(52011),c=n(65617),u=n(94139);let h=class extends((0,s.J)(o.wq)){constructor(t){super(t),this.type="local",this.isRelative=!0,this.isGeoreferenced=!1,this.origin=(0,c.c)()}getOriginPoint(t){const[e,n,r]=this.origin;return new u.Z({x:e,y:n,z:r,spatialReference:t})}setOriginFromPoint({x:t,y:e,z:n}){this.origin=(0,c.f)(t,e,n??0)}};(0,r._)([(0,a.J)({local:"local"},{readOnly:!0})],h.prototype,"type",void 0),(0,r._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"origin",void 0),h=(0,r._)([(0,l.j)("esri.geometry.support.MeshLocalVertexSpace")],h);const d=h},72220:(t,e,n)=>{n.d(e,{c:()=>r});const r=n(92604).Z.getLogger("esri.views.3d.support.buffer.math")},61787:(t,e,n)=>{n.r(e),n.d(e,{default:()=>i});var r=n(80442),s=n(24133),o=n(66459);class i{async createIndex(t,e){const n=new Array;if(!t.vertexAttributes||!t.vertexAttributes.position)return new s.Q;const r=this._createMeshData(t),o=null!=e?await e.invoke("createIndexThread",r,{transferList:n}):this.createIndexThread(r).result;return this._createPooledRBush().fromJSON(o)}createIndexThread(t){const e=new Float64Array(t.position),n=this._createPooledRBush();return t.components?this._createIndexComponentsThread(n,e,t.components.map((t=>new Uint32Array(t)))):this._createIndexAllThread(n,e)}_createIndexAllThread(t,e){const n=new Array(e.length/9);let r=0;for(let t=0;t<e.length;t+=9)n[r++]=a(e,t,t+3,t+6);return t.load(n),{result:t.toJSON()}}_createIndexComponentsThread(t,e,n){let r=0;for(const t of n)r+=t.length/3;const s=new Array(r);let o=0;for(const t of n)for(let n=0;n<t.length;n+=3)s[o++]=a(e,3*t[n],3*t[n+1],3*t[n+2]);return t.load(s),{result:t.toJSON()}}_createMeshData(t){const e=(t.vertexSpace.isRelative?(0,o.I5)({position:t.vertexAttributes.position,normal:null,tangent:null},t.vertexSpace,t.transform,t.spatialReference).position:t.vertexAttributes.position).buffer;return!t.components||t.components.some((t=>!t.faces))?{position:e}:{position:e,components:t.components.map((t=>t.faces))}}_createPooledRBush(){return new s.Q(9,(0,r.Z)("esri-csp-restrictions")?t=>t:[".minX",".minY",".maxX",".maxY"])}}function a(t,e,n,r){return{minX:Math.min(t[e],t[n],t[r]),maxX:Math.max(t[e],t[n],t[r]),minY:Math.min(t[e+1],t[n+1],t[r+1]),maxY:Math.max(t[e+1],t[n+1],t[r+1]),p0:[t[e],t[e+1],t[e+2]],p1:[t[n],t[n+1],t[n+2]],p2:[t[r],t[r+1],t[r+2]]}}},40488:(t,e,n)=>{n.d(e,{$:()=>M,Q8:()=>m,R6:()=>b,Sx:()=>x,hG:()=>g,iV:()=>y,mZ:()=>h});var r=n(22974),s=n(82971),o=n(68441),i=n(8744);const a=57.29577951308232,l=.017453292519943;function c(t){return t*a}function u(t){return t*l}function h(t){return Math.PI/2-2*Math.atan(Math.exp(-t/o.sv.radius))}function d(t){return null!=t.wkid||null!=t.wkt}const f=[0,0];function p(t,e,n,r,s){const o=t,i=s;if(i.spatialReference=n,"x"in o&&"x"in i)[i.x,i.y]=e(o.x,o.y,f,r);else if("xmin"in o&&"xmin"in i)[i.xmin,i.ymin]=e(o.xmin,o.ymin,f,r),[i.xmax,i.ymax]=e(o.xmax,o.ymax,f,r);else if("paths"in o&&"paths"in i||"rings"in o&&"rings"in i){const t="paths"in o?o.paths:o.rings,n=[];let s;for(let o=0;o<t.length;o++){const i=t[o];s=[],n.push(s);for(let t=0;t<i.length;t++)s.push(e(i[t][0],i[t][1],[0,0],r)),i[t].length>2&&s[t].push(i[t][2]),i[t].length>3&&s[t].push(i[t][3])}"paths"in i?i.paths=n:i.rings=n}else if("points"in o&&"points"in i){const t=o.points,n=[];for(let s=0;s<t.length;s++)n[s]=e(t[s][0],t[s][1],[0,0],r),t[s].length>2&&n[s].push(t[s][2]),t[s].length>3&&n[s].push(t[s][3]);i.points=n}return s}function m(t,e){const n=t&&(d(t)?t:t.spatialReference),r=e&&(d(e)?e:e.spatialReference);return!(t&&"type"in t&&"mesh"===t.type||e&&"type"in e&&"mesh"===e.type||!n||!r)&&(!!(0,i.fS)(r,n)||(0,i.sS)(r)&&(0,i.oR)(n)||(0,i.sS)(n)&&(0,i.oR)(r))}function y(t,e){if(null==t)return null;const n=t.spatialReference,o=e&&(d(e)?e:e.spatialReference);return m(n,o)?(0,i.fS)(n,o)?(0,r.d9)(t):(0,i.sS)(o)?p(t,g,s.Z.WebMercator,!1,(0,r.d9)(t)):(0,i.oR)(o)?p(t,b,s.Z.WGS84,!1,(0,r.d9)(t)):null:null}function g(t,e,n=[0,0]){e>89.99999?e=89.99999:e<-89.99999&&(e=-89.99999);const r=u(e);return n[0]=u(t)*o.sv.radius,n[1]=o.sv.halfSemiMajorAxis*Math.log((1+Math.sin(r))/(1-Math.sin(r))),n}function b(t,e,n=[0,0],r=!1){const s=c(t/o.sv.radius);return n[0]=r?s:s-360*Math.floor((s+180)/360),n[1]=c(Math.PI/2-2*Math.atan(Math.exp(-e/o.sv.radius))),n}function M(t,e=!1,n=(0,r.d9)(t)){return p(t,g,s.Z.WebMercator,e,n)}function x(t,e=!1,n=(0,r.d9)(t)){return p(t,b,s.Z.WGS84,e,n)}},3172:(t,e,n)=>{n.d(e,{Z:()=>f});var r=n(68773),s=n(40330),o=n(20102),i=n(80442),a=n(22974),l=n(95330),c=n(17452),u=n(19745),h=n(71058),d=n(85958);async function f(t,e){t instanceof URL&&(t=t.toString()),e?.query instanceof URLSearchParams&&(e.query=(0,c.u0)(e.query.toString().replaceAll("+"," ")));const a=(0,c.HK)(t),u=(0,c.jc)(t);u||a||(t=(0,c.Fv)(t));const g={url:t,requestOptions:{...e}};let b=(0,c.oh)(t);if(b){const t=await async function(t,e){if(null!=t.responseData)return t.responseData;if(t.headers&&(e.requestOptions.headers={...e.requestOptions.headers,...t.headers}),t.query&&(e.requestOptions.query={...e.requestOptions.query,...t.query}),t.before){let n,r;try{r=await t.before(e)}catch(t){n=v("request:interceptor",t,e)}if((r instanceof Error||r instanceof o.Z)&&(n=v("request:interceptor",r,e)),n)throw t.error&&t.error(n),n;return r}}(b,g);if(null!=t)return{data:t,getHeader:x,httpStatus:200,requestOptions:g.requestOptions,url:g.url};b.after||b.error||(b=null)}if(t=g.url,"image"===(e=g.requestOptions).responseType&&((0,i.Z)("host-webworker")||(0,i.Z)("host-node")))throw v("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),g);if("head"===e.method){if(e.body)throw v("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),g);if(a||u)throw v("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),g)}if(await async function(){(0,i.Z)("host-webworker")?p||(p=await n.e(9884).then(n.bind(n,29884))):f._abortableFetch||(f._abortableFetch=globalThis.fetch.bind(globalThis))}(),p)return p.execute(t,e);const M=new AbortController;(0,l.fu)(e,(()=>M.abort()));const w={controller:M,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:b,params:g,redoRequest:!1,useIdentity:m.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},_=await async function(t){let e,n;await async function(t){const e=t.params.url,n=t.params.requestOptions,o=t.controller.signal,i=n.body;let a=null,c=null;if(y&&"HTMLFormElement"in globalThis&&(i instanceof FormData?a=i:i instanceof HTMLFormElement&&(a=new FormData(i))),"string"==typeof i&&(c=i),t.fetchOptions={cache:n.cacheBust&&!("polyfill"in f._abortableFetch)?"no-cache":"default",credentials:"same-origin",headers:n.headers||{},method:"head"===n.method?"HEAD":"GET",mode:"cors",priority:m.priority,redirect:"follow",signal:o},(a||c)&&(t.fetchOptions.body=a||c),"anonymous"===n.authMode&&(t.useIdentity=!1),t.hasToken=!!(/token=/i.test(e)||n.query?.token||a?.get("token")),!t.hasToken&&r.default.apiKey&&(0,h.r)(e)&&(n.query||(n.query={}),n.query.token=r.default.apiKey,t.hasToken=!0),t.useIdentity&&!t.hasToken&&!t.credentialToken&&!q(e)&&!(0,l.Hc)(o)){let r;"immediate"===n.authMode?(await S(),r=await s.id.getCredential(e,{signal:o}),t.credential=r):"no-prompt"===n.authMode?(await S(),r=await s.id.getCredential(e,{prompt:!1,signal:o}).catch((()=>{})),t.credential=r):s.id&&(r=s.id.findCredential(e)),r&&(t.credentialToken=r.token,t.useSSL=!!r.ssl)}}(t);try{do{[e,n]=await O(t)}while(!await T(t,e,n))}catch(n){const r=v("request:server",n,t.params,e);throw r.details.ssl=t.useSSL,t.interceptor?.error&&t.interceptor.error(r),r}const o=t.params.url;if(n&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(o)){if(!t.hasToken&&!t.credentialToken&&n.user?.username&&!(0,c.kl)(o)){const t=(0,c.P$)(o,!0);t&&m.trustedServers.push(t)}Array.isArray(n.authorizedCrossOriginNoCorsDomains)&&(0,d.Hu)(n.authorizedCrossOriginNoCorsDomains)}const i=t.credential;if(i&&s.id){const t=s.id.findServerInfo(i.server);let e=t?.owningSystemUrl;if(e){e=e.replace(/\/?$/,"/sharing");const t=s.id.findCredential(e,i.userId);t&&-1===s.id._getIdenticalSvcIdx(e,t)&&t.resources.unshift(e)}}return{data:n,getHeader:e?t=>e?.headers.get(t):x,httpStatus:e?.status??200,requestOptions:t.params.requestOptions,ssl:t.useSSL,url:t.params.url}}(w);return b?.after?.(_),_}let p;const m=r.default.request,y="FormData"in globalThis,g=[499,498,403,401],b=["COM_0056","COM_0057","SB_0008"],M=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],x=()=>null,w=Symbol();function _(t){const e=(0,c.P$)(t);return!e||e.endsWith(".arcgis.com")||f._corsServers.includes(e)||(0,c.kl)(e)}function v(t,e,n,r){let s="Error";const i={url:n.url,requestOptions:n.requestOptions,getHeader:x,ssl:!1};if(e instanceof o.Z)return e.details?(e.details=(0,a.d9)(e.details),e.details.url=n.url,e.details.requestOptions=n.requestOptions):e.details=i,e;if(e){const t=r&&(t=>r.headers.get(t)),n=r?.status,o=e.message;o&&(s=o),t&&(i.getHeader=t),i.httpStatus=(null!=e.httpCode?e.httpCode:e.code)||n||0,i.subCode=e.subcode,i.messageCode=e.messageCode,"string"==typeof e.details?i.messages=[e.details]:i.messages=e.details,i.raw=w in e?e[w]:e}return(0,l.D_)(e)?(0,l.zE)():new o.Z(t,s,i)}async function S(){s.id||await Promise.all([n.e(7126),n.e(6261),n.e(450)]).then(n.bind(n,73660))}function q(t){return M.some((e=>e.test(t)))}async function O(t){let e=t.params.url;const n=t.params.requestOptions,r=t.fetchOptions??{},o=(0,c.jc)(e)||(0,c.HK)(e),a=n.responseType||"json",h=o?0:null!=n.timeout?n.timeout:m.timeout;let p=!1;if(!o){t.useSSL&&(e=(0,c.hO)(e)),n.cacheBust&&"default"===r.cache&&(e=(0,c.ZN)(e,"request.preventCache",Date.now()));let o={...n.query};t.credentialToken&&(o.token=t.credentialToken);let a=(0,c.B7)(o);(0,i.Z)("esri-url-encodes-apostrophe")&&(a=a.replaceAll("'","%27"));const l=e.length+1+a.length;let h;p="delete"===n.method||"post"===n.method||"put"===n.method||!!n.body||l>m.maxUrlLength;const f=n.useProxy||!!(0,c.ed)(e);if(f){const t=(0,c.b7)(e);h=t.path,!p&&h.length+1+l>m.maxUrlLength&&(p=!0),t.query&&(o={...t.query,...o})}if("HEAD"===r.method&&(p||f)){if(p){if(l>m.maxUrlLength)throw v("request:invalid-parameters",new Error("URL exceeds maximum length"),t.params);throw v("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),t.params)}if(f)throw v("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),t.params)}if(p?(r.method="delete"===n.method?"DELETE":"put"===n.method?"PUT":"POST",n.body?e=(0,c.fl)(e,o):(r.body=(0,c.B7)(o),r.headers||(r.headers={}),r.headers["Content-Type"]="application/x-www-form-urlencoded")):e=(0,c.fl)(e,o),f&&(t.useProxy=!0,e=`${h}?${e}`),o.token&&y&&r.body instanceof FormData&&!(0,u.P)(e)&&r.body.set("token",o.token),n.hasOwnProperty("withCredentials"))t.withCredentials=n.withCredentials;else if(!(0,c.D6)(e,(0,c.TI)()))if((0,c.kl)(e))t.withCredentials=!0;else if(s.id){const n=s.id.findServerInfo(e);n?.webTierAuth&&(t.withCredentials=!0)}t.withCredentials&&(r.credentials="include",(0,d.jH)(e)&&await(0,d.jz)(p?(0,c.fl)(e,o):e))}let g,b,M=0,x=!1;h>0&&(M=setTimeout((()=>{x=!0,t.controller.abort()}),h));try{if("native-request-init"===n.responseType)b=r,b.url=e;else if("image"!==n.responseType||"default"!==r.cache||"GET"!==r.method||p||function(t){if(t)for(const e of Object.getOwnPropertyNames(t))if(t[e])return!0;return!1}(n.headers)||!o&&!t.useProxy&&m.proxyUrl&&!_(e)){if(g=await f._abortableFetch(e,r),t.useProxy||function(t){const e=(0,c.P$)(t);e&&!f._corsServers.includes(e)&&f._corsServers.push(e)}(e),"native"===n.responseType)b=g;else if("HEAD"!==r.method)if(g.ok){switch(a){case"array-buffer":b=await g.arrayBuffer();break;case"blob":case"image":b=await g.blob();break;default:b=await g.text()}if(M&&(clearTimeout(M),M=0),"json"===a||"xml"===a||"document"===a)if(b)switch(a){case"json":b=JSON.parse(b);break;case"xml":b=R(b,"application/xml");break;case"document":b=R(b,"text/html")}else b=null;if(b){if("array-buffer"===a||"blob"===a){const t=g.headers.get("Content-Type");if(t&&/application\/json|text\/plain/i.test(t)&&b["blob"===a?"size":"byteLength"]<=750)try{const t=await new Response(b).json();t.error&&(b=t)}catch{}}"image"===a&&b instanceof Blob&&(b=await C(URL.createObjectURL(b),t,!0))}}else{b=await g.text();try{b=JSON.parse(b)}catch{}}}else b=await C(e,t)}catch(r){if("AbortError"===r.name){if(x)throw(0,d.Tf)();throw(0,l.zE)("Request canceled")}if(!(!g&&r instanceof TypeError&&m.proxyUrl)||n.body||"delete"===n.method||"head"===n.method||"post"===n.method||"put"===n.method||t.useProxy||_(e))throw r;t.redoRequest=!0,(0,c.tD)({proxyUrl:m.proxyUrl,urlPrefix:(0,c.P$)(e)??""})}finally{M&&clearTimeout(M)}return[g,b]}function R(t,e){let n;try{n=(new DOMParser).parseFromString(t,e)}catch{}if(!n||n.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return n}async function T(t,e,n){if(t.redoRequest)return t.redoRequest=!1,!1;const r=t.params.requestOptions;if(!e||"native"===r.responseType||"native-request-init"===r.responseType)return!0;let o,i;if(n&&(n.error?o=n.error:"error"===n.status&&Array.isArray(n.messages)&&(o={...n},o[w]=n,o.details=n.messages)),!o&&!e.ok)throw o=new Error(`Unable to load ${e.url} status: ${e.status}`),o[w]=n,o;let a,l=null;o&&(i=Number(o.code),l=o.hasOwnProperty("subcode")?Number(o.subcode):null,a=o.messageCode,a=a?.toUpperCase());const c=r.authMode;if(403===i&&(4===l||o.message?.toLowerCase().includes("ssl")&&!o.message.toLowerCase().includes("permission"))){if(!t.useSSL)return t.useSSL=!0,!1}else if(!t.hasToken&&t.useIdentity&&("no-prompt"!==c||498===i)&&void 0!==i&&g.includes(i)&&!q(t.params.url)&&(403!==i||a&&!b.includes(a)&&(null==l||2===l&&t.credentialToken))){await S();try{const e=await s.id.getCredential(t.params.url,{error:v("request:server",o,t.params),prompt:"no-prompt"!==c,signal:t.controller.signal,token:t.credentialToken});return t.credential=e,t.credentialToken=e.token,t.useSSL=t.useSSL||e.ssl,!1}catch(e){if("no-prompt"===c)return t.credential=void 0,t.credentialToken=void 0,!1;o=e}}if(o)throw o;return!0}function C(t,e,n=!1){const r=e.controller.signal,s=new Image;return e.withCredentials?s.crossOrigin="use-credentials":s.crossOrigin="anonymous",s.alt="",s.fetchPriority=m.priority,s.src=t,(0,d.fY)(s,t,n,r)}f._abortableFetch=null,f._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"]},71058:(t,e,n)=>{n.d(e,{r:()=>o});var r=n(17452);const s=["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"];function o(t){const e=(0,r.P$)(t,!0);return!!e&&e.endsWith(".arcgis.com")&&!s.includes(e)&&!t.endsWith("/sharing/rest/generateToken")}},85958:(t,e,n)=>{n.d(e,{Hu:()=>h,Tf:()=>u,fY:()=>a,jH:()=>d,jz:()=>f});var r=n(68773),s=n(80442),o=n(95330),i=n(17452);function a(t,e,n=!1,r){return new Promise(((i,a)=>{if((0,o.Hc)(r))return void a(l());let c=()=>{d(),a(new Error(`Unable to load ${e}`))},u=()=>{const e=t;d(),i(e)},h=()=>{if(!t)return;const e=t;d(),e.src="",a(l())};const d=()=>{(0,s.Z)("esri-image-decode")||(t.removeEventListener("error",c),t.removeEventListener("load",u)),c=null,u=null,t=null,null!=r&&r.removeEventListener("abort",h),h=null,n&&URL.revokeObjectURL(e)};null!=r&&r.addEventListener("abort",h),(0,s.Z)("esri-image-decode")?t.decode().then(u,c):(t.addEventListener("error",c),t.addEventListener("load",u))}))}function l(){try{return new DOMException("Aborted","AbortError")}catch{const t=new Error;return t.name="AbortError",t}}const c="Timeout exceeded";function u(){return new Error(c)}function h(t){r.default.request.crossOriginNoCorsDomains||(r.default.request.crossOriginNoCorsDomains={});const e=r.default.request.crossOriginNoCorsDomains;for(let n of t)n=n.toLowerCase(),/^https?:\/\//.test(n)?e[(0,i.P$)(n)??""]=0:(e[(0,i.P$)("http://"+n)??""]=0,e[(0,i.P$)("https://"+n)??""]=0)}function d(t){const e=r.default.request.crossOriginNoCorsDomains;if(e){let n=(0,i.P$)(t);if(n)return n=n.toLowerCase(),!(0,i.D6)(n,(0,i.TI)())&&e[n]<Date.now()-36e5}return!1}async function f(t){const e=r.default.request.crossOriginNoCorsDomains,n=(0,i.P$)(t);e&&n&&(e[n.toLowerCase()]=Date.now());const s=(0,i.mN)(t);t=s.path,"json"===s.query?.f&&(t+="?f=json");try{await fetch(t,{mode:"no-cors",credentials:"include"})}catch{}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7476],{28576:(e,t,r)=>{r.d(t,{B:()=>y});var i=r(20102),s=r(44543),o=r(81153),a=r(17452),n=r(41123),l=r(7628),p=r(31263),d=r(5600),c=r(66094),u=r(25929);function y(e){const t=e?.origins??[void 0];return(r,i)=>{const s=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const i=(0,l.Oe)(t,r);return{type:String,read:(e,t,r)=>{const s=(0,u.r)(e,t,r);return i.type===String?s:"function"==typeof i.type?new i.type({url:s}):void 0},write:{writer(t,s,n,l){if(!l||!l.resources)return"string"==typeof t?void(s[n]=(0,u.t)(t,l)):void(s[n]=t.write({},l));const d=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),y=(0,u.t)(d,{...l,verifyItemRelativeUrls:l&&l.verifyItemRelativeUrls?{writtenUrls:l.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},u.M.NO),m=i.type!==String&&(!(0,o.l)(this)||l&&l.origin&&this.originIdOf(r)>(0,p.M9)(l.origin)),b={object:this,propertyName:r,value:t,targetUrl:y,dest:s,targetPropertyName:n,context:l,params:e};l&&l.portalItem&&y&&!(0,a.YP)(y)?m&&e?.contentAddressed?h(b):m?function(e){const{context:t,targetUrl:r,params:i,value:s,dest:o,targetPropertyName:n}=e;if(!t.portalItem)return;const l=t.portalItem.resourceFromPath(r),p=g(s,r,t),d=(0,c.B)(p),u=(0,a.Ml)(l.path),y=i?.compress??!1;d===u?(t.resources&&f({...e,resource:l,content:p,compress:y,updates:t.resources.toUpdate}),o[n]=r):h(e)}(b):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(b):l&&l.portalItem&&(null==y||null!=(0,u.i)(y)||(0,a.jc)(y)||m)?h(b):s[n]=y}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=u.a;return{read:e,write:t}}}}(e,r,i);for(const e of t){const t=(0,d.CJ)(r,e,i);for(const e in s)t[e]=s[e]}}}function h(e){const{targetUrl:t,params:r,value:o,context:l,dest:p,targetPropertyName:d}=e;if(!l.portalItem)return;const y=(0,u.p)(t),h=g(o,t,l);if(r?.contentAddressed&&"json"!==h.type)return void l.messages?.push(new i.Z("persistable:contentAddressingUnsupported",`Property "${d}" is trying to serializing a resource with content of type ${h.type} with content addressing. Content addressing is only supported for json resources.`,{content:h}));const m=r?.contentAddressed&&"json"===h.type?(0,s.F)(h.jsonString):y?.filename??(0,n.D)(),b=(0,a.v_)(r?.prefix??y?.prefix,m),v=`${b}.${(0,c.B)(h)}`;if(r?.contentAddressed&&l.resources&&"json"===h.type){const e=l.resources.toKeep.find((e=>e.resource.path===v))??l.resources.toAdd.find((e=>e.resource.path===v));if(e)return void(p[d]=e.resource.itemRelativeUrl)}const w=l.portalItem.resourceFromPath(v);(0,a.jc)(t)&&l.resources&&l.resources.pendingOperations.push((0,a.gi)(t).then((e=>{w.path=`${b}.${(0,c.B)({type:"blob",blob:e})}`,p[d]=w.itemRelativeUrl})).catch((()=>{})));const _=r?.compress??!1;l.resources&&f({...e,resource:w,content:h,compress:_,updates:l.resources.toAdd}),p[d]=w.itemRelativeUrl}function f({object:e,propertyName:t,updates:r,resource:i,content:s,compress:o}){r.push({resource:i,content:s,compress:o,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function g(e,t,r){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(r))}}},57476:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ge});var i=r(43697),s=r(38171),o=r(51773),a=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423),r(32400)),n=r(3172),l=r(2368),p=r(46791),d=r(20102),c=r(92604),u=r(16453),y=r(95330),h=r(17445),f=r(17452),g=r(5600),m=(r(75215),r(67676),r(80442),r(1153)),b=r(71715),v=r(52011),w=r(31263),_=r(87085),I=r(54295),L=r(17287),S=r(54253),F=r(38009),C=r(16859),j=r(72965),O=r(20559),x=r(66677),A=r(15506),E=r(21506),R=r(50957),P=r(61960),T=r(85857),Z=r(14147),N=r(53518),U=r(99514),D=r(35671),q=r(51161),G=r(54306),Q=r(30707),k=r(56765),V=r(96674);let J=class extends V.wq{constructor(){super(...arguments),this.name=null,this.field=null,this.currentRangeExtent=null,this.fullRangeExtent=null,this.type="rangeInfo"}};(0,i._)([(0,g.Cb)({type:String,json:{read:!0,write:!0}})],J.prototype,"name",void 0),(0,i._)([(0,g.Cb)({type:String,json:{read:!0,write:!0}})],J.prototype,"field",void 0),(0,i._)([(0,g.Cb)({type:[Number],json:{read:!0,write:!0}})],J.prototype,"currentRangeExtent",void 0),(0,i._)([(0,g.Cb)({type:[Number],json:{read:!0,write:!0}})],J.prototype,"fullRangeExtent",void 0),(0,i._)([(0,g.Cb)({type:["rangeInfo"],readOnly:!0,json:{read:!1,write:!0}})],J.prototype,"type",void 0),J=(0,i._)([(0,v.j)("esri.layers.support.RangeInfo")],J);var M,$=r(22974),z=r(28576),H=r(20941),K=r(38913),B=r(73615);let W=M=class extends((0,V.eC)(p.Z.ofType(K.Z))){constructor(e){super(e)}clone(){return new M(this.items.map((e=>e.clone())))}write(e,t){return this.toJSON(t)}toJSON(e){const t=e?.layer?.spatialReference;return t?this.toArray().map((r=>{if(!t.equals(r.spatialReference)){if(!(0,B.canProjectWithoutEngine)(r.spatialReference,t))return e&&e.messages&&e.messages.push(new H.Z("scenefilter:unsupported","Scene filters with incompatible spatial references are not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),null;const i=new K.Z;(0,B.projectPolygon)(r,i,t),r=i}const i=r.toJSON(e);return delete i.spatialReference,i})).filter((e=>null!=e)):(e?.messages&&e.messages.push(new H.Z("scenefilter:unsupported","Writing Scene filters without context layer is not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),this.toArray().map((t=>t.toJSON(e))))}static fromJSON(e,t){const r=new M;return e.forEach((e=>r.add(K.Z.fromJSON(e,t)))),r}};W=M=(0,i._)([(0,v.j)("esri.layers.support.PolygonCollection")],W);const Y=W;var X,ee=r(25929);let te=X=class extends V.wq{constructor(e){super(e),this.spatialRelationship="disjoint",this.geometries=new Y,this._geometriesSource=null}initialize(){this.addHandles((0,h.on)((()=>this.geometries),"after-changes",(()=>this.geometries=this.geometries),h.Z_))}readGeometries(e,t,r){Array.isArray(e)?this.geometries=Y.fromJSON(e,r):this._geometriesSource={url:(0,ee.f)(e,r),context:r}}async loadGeometries(e,t){if(null==this._geometriesSource)return;const{url:r,context:i}=this._geometriesSource,s=await(0,n.Z)(r,{responseType:"json",signal:t?.signal}),o=e.toJSON(),a=s.data.map((e=>({...e,spatialReference:o})));this.geometries=Y.fromJSON(a,i),this._geometriesSource=null}clone(){const e=new X({geometries:(0,$.d9)(this.geometries),spatialRelationship:this.spatialRelationship});return e._geometriesSource=this._geometriesSource,e}};(0,i._)([(0,g.Cb)({type:["disjoint","contains"],nonNullable:!0,json:{write:!0}})],te.prototype,"spatialRelationship",void 0),(0,i._)([(0,g.Cb)({type:Y,nonNullable:!0,json:{write:!0}}),(0,z.B)({origins:["web-scene","portal-item"],type:"resource",prefix:"geometries",contentAddressed:!0})],te.prototype,"geometries",void 0),(0,i._)([(0,b.r)(["web-scene","portal-item"],"geometries")],te.prototype,"readGeometries",null),te=X=(0,i._)([(0,v.j)("esri.layers.support.SceneFilter")],te);const re=te;var ie=r(40555),se=r(14165),oe=r(36405),ae=r(72245),ne=r(32163),le=r(2358),pe=r(19833),de=r(65242);const ce=["3DObject","Point"],ue=(0,N.v)();let ye=class extends((0,S.o1)((0,O.Vt)((0,L.Y)((0,F.q)((0,C.I)((0,j.M)((0,u.R)((0,I.V)((0,l.J)(_.Z)))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new p.Z,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new U.Z(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:q.U4.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&(0,R.sX)(this.associatedLayer)}get geometryType(){return fe[this.profile]||"mesh"}set renderer(e){(0,D.YN)(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:A.C;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:o,supportsGeometryUpdate:a,supportsReturnServiceEditsInSourceSpatialReference:n},data:{supportsZ:l,supportsM:p,isVersioned:d,supportsAttachment:c},operations:{supportsEditing:u,supportsAdd:y,supportsUpdate:h,supportsDelete:f,supportsQuery:g,supportsQueryAttachments:m,supportsAsyncConvert3D:b}}=e,v=e.operations.supportsChangeTracking,w=!!this.associatedLayer?.infoFor3D&&(0,ae.Rx)();return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:n,supportsRollbackOnFailure:s,supportsGeometryUpdate:w&&a,supportsUploadWithItemId:o},data:{supportsAttachment:c,supportsZ:l,supportsM:p,isVersioned:d},operations:{supportsQuery:g,supportsQueryAttachments:m,supportsEditing:u&&v,supportsAdd:w&&y&&v,supportsDelete:w&&f&&v,supportsUpdate:h&&v,supportsAsyncConvert3D:b}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e))),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e))),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&he[r]?he[r]:(c.Z.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=null!=e?e.signal:null;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(y.r9),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),await this._validateElevationInfo(),await this._applyAssociatedLayerOverrides(),await this._populateFieldUsageInfo(),await(0,ie.y)(this,{origin:"service"},t),await(0,D.YN)(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){c.Z.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new se.Z;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this;return e}))}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new d.Z("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new d.Z("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=(0,D.Lk)(this.fieldsIndex,await(0,pe.e7)(this,(0,pe.V5)(this)));return(0,le.xe)(this.parsedUrl.path,this.attributeStorageInfo??[],e,t,r)}async queryCachedFeature(e,t){const r=await this.queryCachedAttributes(e,[t]);if(!r||0===r.length)throw new d.Z("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const i=new s.Z;return i.attributes=r[0],i.layer=this,i.sourceLayer=this,i}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryObjectIds(e||this.createQuery(),t)))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryAttachments(e,t)))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(c.Z.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return(0,ne.eZ)(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new d.Z("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new d.Z("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some((t=>t.name===e))}async queryCachedStatistics(e,t){if(await this.load(t),!this.statisticsInfo)throw new d.Z("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new d.Z("scenelayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const e of this.statisticsInfo)if(e.name===r.name){const r=(0,f.v_)(this.parsedUrl.path,e.href);return(0,n.Z)(r,{query:{f:"json",token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then((e=>e.data))}throw new d.Z("scenelayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(O.xp.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(O.xp.SAVE,e)}async applyEdits(e,t){const{applyEdits:i}=await r.e(1444).then(r.bind(r,14720));if(await this.load(),!this.associatedLayer)throw new d.Z(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),i(this,this.associatedLayer.source,e,t)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new d.Z(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}validateLayer(e){if(e.layerType&&!ce.includes(e.layerType))throw new d.Z("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new d.Z("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new d.Z("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});!function(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new d.Z("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new d.Z("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new d.Z("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!(!this.attributeStorageInfo||!this.attributeStorageInfo.some((t=>t.name===e.name))),r=!!this.associatedLayer?.fields?.some((t=>t&&e.name===t.name)),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPopupOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPopupOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled"],t=(0,m.vw)(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),o=this.associatedLayer.originIdOf(i);s<o&&(o===w.s3.SERVICE||o===w.s3.PORTAL_ITEM)&&t.setAtOrigin(i,this.associatedLayer[i],o)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.editingInfo?.lastEditDate,t=this.associatedLayer?.serverGens,r=this.associatedLayer?.getAtOrigin("fullExtent","service");(0,ae.Rx)()&&null!=this.associatedLayer?.infoFor3D&&r&&(0,x.M8)(this.associatedLayer?.url)&&e&&this.serviceUpdateTimeStamp?.lastUpdate!==e.getTime()&&(this.serviceUpdateTimeStamp||t?.minServerGen!==t?.serverGen)&&(0,m.vw)(this).setAtOrigin("fullExtent",r.clone(),w.s3.SERVICE)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(!["mesh-pyramids","points"].includes(this.profile))return;const t=new Z.W(this.parsedUrl,this.portalItem,this.apiKey,e);try{this.associatedLayer=await t.fetch()}catch(e){(0,y.D_)(e)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){await(0,h.N1)((()=>this.popupEnabled&&null!=this.popupTemplate));const e=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?c.Z.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):c.Z.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${e}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&(0,oe.LR)(c.Z.getLogger(this),(0,oe.Wb)("Mesh scene layers","relative-to-scene",e)),(0,oe.LR)(c.Z.getLogger(this),(0,oe.kf)("Scene layers",e))}};(0,i._)([(0,g.Cb)({types:{key:"type",base:P.B,typeMap:{selection:T.Z}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],ye.prototype,"featureReduction",void 0),(0,i._)([(0,g.Cb)({type:[J],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],ye.prototype,"rangeInfos",void 0),(0,i._)([(0,g.Cb)({json:{read:!1}})],ye.prototype,"associatedLayer",void 0),(0,i._)([(0,g.Cb)({type:["show","hide"]})],ye.prototype,"listMode",void 0),(0,i._)([(0,g.Cb)({type:["ArcGISSceneServiceLayer"]})],ye.prototype,"operationalLayerType",void 0),(0,i._)([(0,g.Cb)({json:{read:!1},readOnly:!0})],ye.prototype,"type",void 0),(0,i._)([(0,g.Cb)({...ue.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ye.prototype,"fields",void 0),(0,i._)([(0,g.Cb)()],ye.prototype,"types",null),(0,i._)([(0,g.Cb)()],ye.prototype,"typeIdField",null),(0,i._)([(0,g.Cb)()],ye.prototype,"templates",null),(0,i._)([(0,g.Cb)()],ye.prototype,"formTemplate",null),(0,i._)([(0,g.Cb)({readOnly:!0})],ye.prototype,"fieldsIndex",null),(0,i._)([(0,g.Cb)({type:k.Z,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],ye.prototype,"floorInfo",void 0),(0,i._)([(0,g.Cb)(ue.outFields)],ye.prototype,"outFields",void 0),(0,i._)([(0,g.Cb)({type:q.U4,readOnly:!0,json:{read:!1}})],ye.prototype,"nodePages",void 0),(0,i._)([(0,b.r)("service","nodePages",["nodePages","pointNodePages"])],ye.prototype,"readNodePages",null),(0,i._)([(0,g.Cb)({type:[q.QI],readOnly:!0})],ye.prototype,"materialDefinitions",void 0),(0,i._)([(0,g.Cb)({type:[q.Yh],readOnly:!0})],ye.prototype,"textureSetDefinitions",void 0),(0,i._)([(0,g.Cb)({type:[q.H3],readOnly:!0})],ye.prototype,"geometryDefinitions",void 0),(0,i._)([(0,g.Cb)({readOnly:!0})],ye.prototype,"serviceUpdateTimeStamp",void 0),(0,i._)([(0,g.Cb)({readOnly:!0})],ye.prototype,"attributeStorageInfo",void 0),(0,i._)([(0,g.Cb)({readOnly:!0})],ye.prototype,"statisticsInfo",void 0),(0,i._)([(0,g.Cb)({type:p.Z.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],ye.prototype,"excludeObjectIds",void 0),(0,i._)([(0,g.Cb)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],ye.prototype,"definitionExpression",void 0),(0,i._)([(0,g.Cb)({type:re,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],ye.prototype,"filter",void 0),(0,i._)([(0,g.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],ye.prototype,"path",void 0),(0,i._)([(0,g.Cb)(E.PV)],ye.prototype,"elevationInfo",null),(0,i._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],ye.prototype,"effectiveCapabilities",null),(0,i._)([(0,g.Cb)({readOnly:!0})],ye.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,g.Cb)({type:String})],ye.prototype,"geometryType",null),(0,i._)([(0,g.Cb)(E.iR)],ye.prototype,"labelsVisible",void 0),(0,i._)([(0,g.Cb)({type:[G.Z],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:Q.r},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:Q.r},write:!0}})],ye.prototype,"labelingInfo",void 0),(0,i._)([(0,g.Cb)(E.rn)],ye.prototype,"legendEnabled",void 0),(0,i._)([(0,g.Cb)({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?(0,de.b)(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],ye.prototype,"opacity",void 0),(0,i._)([(0,g.Cb)({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ye.prototype,"priority",void 0),(0,i._)([(0,g.Cb)({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ye.prototype,"semantic",void 0),(0,i._)([(0,g.Cb)({types:a.o,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],ye.prototype,"renderer",null),(0,i._)([(0,g.Cb)({json:{read:!1}})],ye.prototype,"cachedDrawingInfo",void 0),(0,i._)([(0,b.r)("service","cachedDrawingInfo")],ye.prototype,"readCachedDrawingInfo",null),(0,i._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],ye.prototype,"capabilities",null),(0,i._)([(0,g.Cb)({type:Boolean,json:{read:!1}})],ye.prototype,"editingEnabled",null),(0,i._)([(0,g.Cb)({readOnly:!0,json:{write:!1,read:!1}})],ye.prototype,"infoFor3D",null),(0,i._)([(0,g.Cb)({readOnly:!0,json:{write:!1,read:!1}})],ye.prototype,"relationships",null),(0,i._)([(0,g.Cb)(E.C_)],ye.prototype,"popupEnabled",void 0),(0,i._)([(0,g.Cb)({type:o.Z,json:{name:"popupInfo",write:!0}})],ye.prototype,"popupTemplate",void 0),(0,i._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],ye.prototype,"defaultPopupTemplate",null),(0,i._)([(0,g.Cb)({type:String,json:{read:!1}})],ye.prototype,"objectIdField",void 0),(0,i._)([(0,b.r)("service","objectIdField",["objectIdField","fields"])],ye.prototype,"readObjectIdField",null),(0,i._)([(0,g.Cb)({type:String,json:{read:!1}})],ye.prototype,"globalIdField",void 0),(0,i._)([(0,b.r)("service","globalIdField",["globalIdField","fields"])],ye.prototype,"readGlobalIdField",null),(0,i._)([(0,g.Cb)({readOnly:!0,type:String,json:{read:!1}})],ye.prototype,"displayField",null),(0,i._)([(0,g.Cb)({type:String,json:{read:!1}})],ye.prototype,"profile",void 0),(0,i._)([(0,b.r)("service","profile",["store.profile"])],ye.prototype,"readProfile",null),(0,i._)([(0,g.Cb)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],ye.prototype,"normalReferenceFrame",void 0),(0,i._)([(0,g.Cb)(E.YI)],ye.prototype,"screenSizePerspectiveEnabled",void 0),(0,i._)([(0,g.Cb)({json:{read:!1,origins:{service:{read:!0}}}})],ye.prototype,"serviceItemId",void 0),ye=(0,i._)([(0,v.j)("esri.layers.SceneLayer")],ye);const he={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},fe={"mesh-pyramids":"mesh",points:"point",lines:"polyline",polygons:"polygon"},ge=ye},66094:(e,t,r)=>{r.d(t,{B:()=>s});var i=r(17452);function s(e){return o[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.Ml)(e);return l[t]||a}(e.url)}(e)]||n}const o={},a="text/plain",n=o[a],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)o[l[e]]=e}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[223],{91303:(e,t,i)=>{var r;i.d(t,{Y:()=>r}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(r||(r={}))},17287:(e,t,i)=>{i.d(t,{Y:()=>o});var r=i(43697),l=i(92604),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),a=i(66677);const o=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,l.Z.getLogger(this)))}};return(0,r._)([(0,s.Cb)()],t.prototype,"title",null),(0,r._)([(0,s.Cb)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,n.j)("esri.layers.mixins.ArcGISService")],t),t}},16859:(e,t,i)=>{i.d(t,{I:()=>I});var r=i(43697),l=i(68773),s=i(40330),n=i(3172),a=i(66643),o=i(20102),c=i(92604),u=i(70586),h=i(95330),p=i(17452),d=i(5600),f=(i(75215),i(67676),i(80442),i(71715)),v=i(52011),m=i(30556),y=i(84230),g=i(48522),w=i(15235),_=i(86082),b=i(14661);const I=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new w.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:r}=await i.e(8062).then(i.bind(i,18062));return(0,h.k_)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,h.D_)(e)||c.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,h.r9)(e),!0))))}async setUserPrivileges(e,t){if(!l.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:l}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",l)}catch(e){(0,h.r9)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===i.id;if(r&&i.portal.user)return(0,b.Ss)(i);let l,n;if(r)l=i.portal.url;else try{l=await(0,y.oP)(this.url,t)}catch(e){(0,h.r9)(e)}if(!l||!(0,p.Zo)(l,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(s.id?.getCredential(`${l}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.r9)(e)}if(!n)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(r?await i.reload():(i=new w.default({id:e,portal:{url:l}}),await i.load(t)),i.portal.user)return(0,b.Ss)(i)}catch(e){(0,h.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,h.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const i=S.credential===t?S.user:await this._fetchEditingUser(e);return S.credential=t,S.user=i,null==i||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=s.id.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,l=g.Z.getDefault();if(l&&l.loaded&&(0,p.Fv)(l.restUrl)===(0,p.Fv)(r))return l.user;const o=`${r}/community/self`,c=null!=e?e.signal:null,u=await(0,a.q6)((0,n.Z)(o,{authMode:"no-prompt",query:{f:"json"},signal:c}));return u.ok?_.Z.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,r=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||g.Z.getDefault());return i&&r&&!(0,p.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new o.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,d.Cb)({type:w.default})],t.prototype,"portalItem",null),(0,r._)([(0,f.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,m.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,d.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,v.j)("esri.layers.mixins.PortalLayer")],t),t},S={credential:null,user:null}},39450:(e,t,i)=>{i.d(t,{Z:()=>u});var r,l=i(43697),s=i(96674),n=i(5600),a=i(75215),o=(i(67676),i(80442),i(52011));let c=r=class extends s.wq{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new r({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,l._)([(0,n.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"cols",void 0),(0,l._)([(0,n.Cb)({type:a.z8,json:{write:!0}})],c.prototype,"level",void 0),(0,l._)([(0,n.Cb)({type:String,json:{write:!0}})],c.prototype,"levelValue",void 0),(0,l._)([(0,n.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"origin",void 0),(0,l._)([(0,n.Cb)({type:Number,json:{write:!0}})],c.prototype,"resolution",void 0),(0,l._)([(0,n.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"rows",void 0),(0,l._)([(0,n.Cb)({type:Number,json:{write:!0}})],c.prototype,"scale",void 0),c=r=(0,l._)([(0,o.j)("esri.layers.support.LOD")],c);const u=c},11145:(e,t,i)=>{i.d(t,{Z:()=>O});var r,l=i(43697),s=i(35454),n=i(96674),a=i(67900),o=i(5600),c=i(75215),u=(i(67676),i(80442),i(71715)),h=i(52011),p=i(30556),d=i(94139),f=i(82971),v=i(24470),m=i(8744),y=i(40488),g=i(39450),w=i(43077);const _=new s.X({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let b=r=class extends n.wq{static create(e={}){const{resolutionFactor:t=1,scales:i,size:l=256,spatialReference:s=f.Z.WebMercator,numLODs:n=24}=e;if(!(0,m.JY)(s)){const e=[];if(i)for(let t=0;t<i.length;t++){const r=i[t];e.push(new g.Z({level:t,scale:r,resolution:r}))}else{let t=5e-4;for(let i=n-1;i>=0;i--)e.unshift(new g.Z({level:i,scale:t,resolution:t})),t*=2}return new r({dpi:96,lods:e,origin:new d.Z(0,0,s),size:[l,l],spatialReference:s})}const o=(0,m.C5)(s),c=e.origin?new d.Z({x:e.origin.x,y:e.origin.y,spatialReference:s}):new d.Z(o?{x:o.origin[0],y:o.origin[1],spatialReference:s}:{x:0,y:0,spatialReference:s}),u=1/(39.37*(0,a.c9)(s)*96),h=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],r=t*u;h.push(new g.Z({level:e,scale:t,resolution:r}))}else{let e=(0,m.sT)(s)?512/l*591657527.5917094:256/l*591657527.591555;const i=Math.ceil(n/t);h.push(new g.Z({level:0,scale:e,resolution:e*u}));for(let r=1;r<i;r++){const i=e/2**t,l=i*u;h.push(new g.Z({level:r,scale:i,resolution:l})),e=i}}return new r({dpi:96,lods:h,origin:c,size:[l,l],spatialReference:s})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,m.C5)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return d.Z.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const r=[],l=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach((e=>{r.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,l[e.level]=e}))),this._set("scales",r),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const i=Math.floor(e),r=i+1;return t[i]/(t[i]/t[r])**(e-i)}scaleToZoom(e){const t=this.scales,i=t.length-1;let r=0;for(;r<i;r++){const i=t[r],l=t[r+1];if(i<=e)return r;if(l===e)return r+1;if(i>e&&l<e)return r+Math.log(i/e)/Math.log(i/l)}return r}snapScale(e,t=.95){const i=this.scaleToZoom(e);return i%Math.floor(i)>=t?this.zoomToScale(Math.ceil(i)):this.zoomToScale(Math.floor(i))}tileAt(e,t,i,r){const l=this.lodAt(e);if(!l)return null;let s,n;if("number"==typeof t)s=t,n=i;else if((0,m.fS)(t.spatialReference,this.spatialReference))s=t.x,n=t.y,r=i;else{const e=(0,y.iV)(t,this.spatialReference);if(null==e)return null;s=e.x,n=e.y,r=i}const a=l.resolution*this.size[0],o=l.resolution*this.size[1];return r||(r=new w.f(null,0,0,0,(0,v.Ue)())),r.level=e,r.row=Math.floor((this.origin.y-n)/o+.001),r.col=Math.floor((s-this.origin.x)/a+.001),this.updateTileInfo(r),r}updateTileInfo(e,t=r.ExtrapolateOptions.NONE){let i=this.lodAt(e.level);if(!i&&t===r.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return;const l=e.level-i.level,s=i.resolution*this.size[0]/2**l,n=i.resolution*this.size[1]/2**l;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,v.Ue)()),e.extent[0]=this.origin.x+e.col*s,e.extent[1]=this.origin.y-(e.row+1)*n,e.extent[2]=e.extent[0]+s,e.extent[3]=e.extent[1]+n}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const i=this.lodAt(t.level);if(null==i)return null;const{resolution:r}=i,l=r*this.size[0],s=r*this.size[1];return e[0]=this.origin.x+t.col*l,e[1]=this.origin.y-(t.row+1)*s,e[2]=e[0]+l,e[3]=e[1]+s,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return r.fromJSON(this.write({}))}getOrCreateCompatible(e,t){if(256===this.size[0]&&256===this.size[1])return 256===e?this:null;const i=[],l=this.lods.length;for(let e=0;e<l;e++){const r=this.lods[e],l=r.resolution*t;i.push(new g.Z({level:r.level,scale:r.scale,resolution:l}))}return new r({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const r=e[i];this._upsampleLevels[r.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/r.resolution:0},t=r}}};var I,S;(0,l._)([(0,o.Cb)({type:Number,json:{write:!0}})],b.prototype,"compressionQuality",void 0),(0,l._)([(0,o.Cb)({type:Number,json:{write:!0}})],b.prototype,"dpi",void 0),(0,l._)([(0,o.Cb)({type:String,json:{read:_.read,write:_.write,origins:{"web-scene":{read:!1,write:!1}}}})],b.prototype,"format",void 0),(0,l._)([(0,o.Cb)({readOnly:!0})],b.prototype,"isWrappable",null),(0,l._)([(0,o.Cb)({type:d.Z,json:{write:!0}})],b.prototype,"origin",void 0),(0,l._)([(0,u.r)("origin")],b.prototype,"readOrigin",null),(0,l._)([(0,o.Cb)({type:[g.Z],value:null,json:{write:!0}})],b.prototype,"lods",null),(0,l._)([(0,o.Cb)({readOnly:!0})],b.prototype,"scales",void 0),(0,l._)([(0,o.Cb)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],b.prototype,"size",void 0),(0,l._)([(0,u.r)("size",["rows","cols"])],b.prototype,"readSize",null),(0,l._)([(0,p.c)("size",{cols:{type:c.z8},rows:{type:c.z8}})],b.prototype,"writeSize",null),(0,l._)([(0,o.Cb)({type:f.Z,json:{write:!0}})],b.prototype,"spatialReference",void 0),b=r=(0,l._)([(0,h.j)("esri.layers.support.TileInfo")],b),(S=(I=b||(b={})).ExtrapolateOptions||(I.ExtrapolateOptions={}))[S.NONE=0]="NONE",S[S.POWER_OF_TWO=1]="POWER_OF_TWO";const O=b},43077:(e,t,i)=>{i.d(t,{f:()=>r});class r{constructor(e,t,i,r,l=void 0){this.id=e,this.level=t,this.row=i,this.col=r,this.extent=l}}},28589:(e,t,i)=>{i.d(t,{y:()=>O});var r,l=i(43697),s=i(3172),n=i(92036),a=i(91303),o=i(20102),c=i(50758),u=i(13867),h=i(44553),p=i(95330),d=i(17445),f=i(1654),v=i(17452),m=i(5600),y=(i(75215),i(67676)),g=(i(80442),i(52011)),w=i(43077),_=i(22974),b=i(1533);class I{constructor(e){this._validateJSON(e);const{location:t,data:i}=e;this.location=Object.freeze((0,_.d9)(t));const r=this.location.width,l=this.location.height;let s=!0,n=!0;const a=function(e,t=!1){return e<=b.c8?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(r*l/32));let o=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(n=!1,a[o]|=1<<t):s=!1,31===t&&++o}n?(this._availability="unavailable",this.byteSize=40):s?(this._availability="available",this.byteSize=40):(this._availability=a,this.byteSize=40+(0,b.Xw)(a))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),r=i%32,l=i>>5,s=this._availability;return l<0||l>s.length?"unknown":s[l]&1<<r?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||s.Z,{row:r,col:l,width:n,height:a}=e,c={query:{f:"json"}};return t=t?{...c,...t}:c,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then((e=>e.data)).catch((e=>{if(e&&e.details&&422===e.details.httpStatus)return{location:{top:r,left:l,width:n,height:a},valid:!0,data:(0,y.a9)(n*a,0)};throw e})).then((e=>{if(e.location&&(e.location.top!==r||e.location.left!==l||e.location.width!==n||e.location.height!==a))throw new o.Z("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:r,left:l,width:n,height:a}});return I.fromJSON(e)}))}static fromJSON(e){return Object.freeze(new I(e))}_validateJSON(e){if(!e||!e.location)throw new o.Z("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new o.Z("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new o.Z("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new o.Z("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new o.Z("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}}function S(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}let O=r=class extends n.Z{constructor(e){super(e),this._pendingTilemapRequests={},this.request=s.Z,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new u.z(2*a.Y.MEGABYTES),this.addHandles([(0,d.YP)((()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]}),(()=>this._initializeTilemapDefinition()),d.nn)])}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}fetchTilemap(e,t,i,r){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new o.Z("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const l=this._tmpTilemapDefinition,s=this._tilemapFromCache(e,t,i,l);if(s)return Promise.resolve(s);const n=r&&r.signal;return r={...r,signal:null},new Promise(((e,t)=>{(0,p.fu)(n,(()=>t((0,p.zE)())));const i=S(l);let s=this._pendingTilemapRequests[i];if(!s){s=I.fromDefinition(l,r).then((e=>(this._tilemapCache.put(i,e,e.byteSize),e)));const e=()=>delete this._pendingTilemapRequests[i];this._pendingTilemapRequests[i]=s,s.then(e,e)}s.then(e,t)}))}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const r=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return r?r.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,r){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(new o.Z("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})):this.fetchTilemap(e,t,i,r).catch((e=>e)).then((r=>{if(r instanceof I){const l=r.getAvailability(t,i);if("unavailable"===l)throw new o.Z("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return l}if((0,p.D_)(r))throw r;return"unknown"}))}fetchAvailabilityUpsample(e,t,i,r,l){r.level=e,r.row=t,r.col=i;const s=this.layer.tileInfo;s.updateTileInfo(r);const n=this.fetchAvailability(e,t,i,l).catch((e=>{if((0,p.D_)(e))throw e;if(s.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,l);throw e}));return this._fetchAvailabilityUpsamplePrefetch(r.id,e,t,i,l,n),n}async _fetchAvailabilityUpsamplePrefetch(e,t,i,l,s,n){if(!this._prefetchingEnabled||null==e)return;const a=`prefetch-${e}`;if(this.hasHandles(a))return;const o=new AbortController;n.then((()=>o.abort()),(()=>o.abort()));let u=!1;const h=(0,c.kB)((()=>{u||(u=!0,o.abort())}));if(this.addHandles(h,a),await(0,f.MU)(10,o.signal).catch((()=>{})),u||(u=!0,this.removeHandles(a)),(0,p.Hc)(o))return;const d=new w.f(e,t,i,l),v={...s,signal:o.signal},m=this.layer.tileInfo;for(let e=0;r._prefetches.length<r._maxPrefetch&&m.upsampleTile(d);++e){const e=this.fetchAvailability(d.level,d.row,d.col,v);r._prefetches.push(e);const t=()=>{r._prefetches.removeUnordered(e)};e.then(t,t)}}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,v.B7)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,r){r.level=e,r.row=t-t%this.size,r.col=i-i%this.size;const l=S(r);return this._tilemapCache.get(l)}get test(){const e=this;return{get prefetchingEnabled(){return e._prefetchingEnabled},set prefetchingEnabled(t){e._prefetchingEnabled=t},hasTilemap:(t,i,r)=>!!e._tilemapFromCache(t,i,r,e._tmpTilemapDefinition)}}};O._maxPrefetch=4,O._prefetches=new h.Z({initialSize:r._maxPrefetch}),(0,l._)([(0,m.Cb)({constructOnly:!0})],O.prototype,"layer",void 0),(0,l._)([(0,m.Cb)({constructOnly:!0})],O.prototype,"minLOD",void 0),(0,l._)([(0,m.Cb)({constructOnly:!0})],O.prototype,"maxLOD",void 0),(0,l._)([(0,m.Cb)({constructOnly:!0})],O.prototype,"request",void 0),(0,l._)([(0,m.Cb)({constructOnly:!0})],O.prototype,"size",void 0),O=r=(0,l._)([(0,g.j)("esri.layers.support.TilemapCache")],O)},66677:(e,t,i)=>{i.d(t,{B5:()=>u,DR:()=>p,G:()=>w,M8:()=>v,Nm:()=>m,Qc:()=>h,XG:()=>y,a7:()=>f,ld:()=>d,wH:()=>g});var r=i(17452),l=i(25929);const s={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},n=Object.values(s),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${n.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),o=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${n.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),c=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function u(e){return!!a.test(e)}function h(e){if(null==e)return null;const t=(0,r.mN)(e),i=t.path.match(a)||t.path.match(o);if(!i)return null;const[,l,n,c,u]=i,h=n.indexOf("/");return{title:d(-1!==h?n.slice(h+1):n),serverType:s[c.toLowerCase()],sublayer:null!=u&&""!==u?parseInt(u,10):null,url:{path:l}}}function p(e){const t=(0,r.mN)(e).path.match(c);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function d(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function f(e,t){const i=[];if(e){const t=h(e);null!=t&&t.title&&i.push(t.title)}if(t){const e=d(t);i.push(e)}if(2===i.length){if(i[0].toLowerCase().includes(i[1].toLowerCase()))return i[0];if(i[1].toLowerCase().includes(i[0].toLowerCase()))return i[1]}return i.join(" - ")}function v(e){if(!e)return!1;const t=(e=e.toLowerCase()).includes(".arcgis.com/"),i=e.includes("//services")||e.includes("//tiles")||e.includes("//features");return t&&i}function m(e,t){return e?(0,r.Qj)((0,r.Hu)(e,t)):e}function y(e){let{url:t}=e;if(!t)return{url:t};t=(0,r.Hu)(t,e.logger);const i=(0,r.mN)(t),l=h(i.path);let s;if(null!=l)null!=l.sublayer&&null==e.layer.layerId&&(s=l.sublayer),t=l.url.path;else if(e.nonStandardUrlAllowed){const e=p(i.path);null!=e&&(t=e.serviceUrl,s=e.sublayerId)}return{url:(0,r.Qj)(t),layerId:s}}function g(e,t,i,s,n){(0,l.w)(t,s,"url",n),s.url&&null!=e.layerId&&(s.url=(0,r.v_)(s.url,i,e.layerId.toString()))}function w(e){if(!e)return!1;const t=e.toLowerCase(),i=t.includes("/services/"),r=t.includes("/mapserver/wmsserver"),l=t.includes("/imageserver/wmsserver"),s=t.includes("/wmsserver");return i&&(r||l||s)}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[223],{91303:(e,t,i)=>{var r;i.d(t,{Y:()=>r}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(r||(r={}))},17287:(e,t,i)=>{i.d(t,{Y:()=>o});var r=i(43697),l=i(92604),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),a=i(66677);const o=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,l.Z.getLogger(this)))}};return(0,r._)([(0,s.Cb)()],t.prototype,"title",null),(0,r._)([(0,s.Cb)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,n.j)("esri.layers.mixins.ArcGISService")],t),t}},16859:(e,t,i)=>{i.d(t,{I:()=>I});var r=i(43697),l=i(68773),s=i(40330),n=i(3172),a=i(66643),o=i(20102),c=i(92604),u=i(70586),h=i(95330),p=i(17452),d=i(5600),f=(i(75215),i(67676),i(80442),i(71715)),v=i(52011),m=i(30556),y=i(84230),g=i(48522),w=i(15235),_=i(86082),b=i(14661);const I=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new w.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:r}=await i.e(8062).then(i.bind(i,18062));return(0,h.k_)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,h.D_)(e)||c.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,h.r9)(e),!0))))}async setUserPrivileges(e,t){if(!l.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:l}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",l)}catch(e){(0,h.r9)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===i.id;if(r&&i.portal.user)return(0,b.Ss)(i);let l,n;if(r)l=i.portal.url;else try{l=await(0,y.oP)(this.url,t)}catch(e){(0,h.r9)(e)}if(!l||!(0,p.Zo)(l,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(s.id?.getCredential(`${l}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.r9)(e)}if(!n)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(r?await i.reload():(i=new w.default({id:e,portal:{url:l}}),await i.load(t)),i.portal.user)return(0,b.Ss)(i)}catch(e){(0,h.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,h.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const i=S.credential===t?S.user:await this._fetchEditingUser(e);return S.credential=t,S.user=i,null==i||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=s.id.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,l=g.Z.getDefault();if(l&&l.loaded&&(0,p.Fv)(l.restUrl)===(0,p.Fv)(r))return l.user;const o=`${r}/community/self`,c=null!=e?e.signal:null,u=await(0,a.q6)((0,n.Z)(o,{authMode:"no-prompt",query:{f:"json"},signal:c}));return u.ok?_.Z.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,r=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||g.Z.getDefault());return i&&r&&!(0,p.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new o.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,d.Cb)({type:w.default})],t.prototype,"portalItem",null),(0,r._)([(0,f.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,m.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,d.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,v.j)("esri.layers.mixins.PortalLayer")],t),t},S={credential:null,user:null}},39450:(e,t,i)=>{i.d(t,{Z:()=>u});var r,l=i(43697),s=i(96674),n=i(5600),a=i(75215),o=(i(67676),i(80442),i(52011));let c=r=class extends s.wq{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new r({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,l._)([(0,n.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"cols",void 0),(0,l._)([(0,n.Cb)({type:a.z8,json:{write:!0}})],c.prototype,"level",void 0),(0,l._)([(0,n.Cb)({type:String,json:{write:!0}})],c.prototype,"levelValue",void 0),(0,l._)([(0,n.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"origin",void 0),(0,l._)([(0,n.Cb)({type:Number,json:{write:!0}})],c.prototype,"resolution",void 0),(0,l._)([(0,n.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"rows",void 0),(0,l._)([(0,n.Cb)({type:Number,json:{write:!0}})],c.prototype,"scale",void 0),c=r=(0,l._)([(0,o.j)("esri.layers.support.LOD")],c);const u=c},11145:(e,t,i)=>{i.d(t,{Z:()=>O});var r,l=i(43697),s=i(35454),n=i(96674),a=i(67900),o=i(5600),c=i(75215),u=(i(67676),i(80442),i(71715)),h=i(52011),p=i(30556),d=i(94139),f=i(82971),v=i(24470),m=i(8744),y=i(40488),g=i(39450),w=i(43077);const _=new s.X({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let b=r=class extends n.wq{static create(e={}){const{resolutionFactor:t=1,scales:i,size:l=256,spatialReference:s=f.Z.WebMercator,numLODs:n=24}=e;if(!(0,m.JY)(s)){const e=[];if(i)for(let t=0;t<i.length;t++){const r=i[t];e.push(new g.Z({level:t,scale:r,resolution:r}))}else{let t=5e-4;for(let i=n-1;i>=0;i--)e.unshift(new g.Z({level:i,scale:t,resolution:t})),t*=2}return new r({dpi:96,lods:e,origin:new d.Z(0,0,s),size:[l,l],spatialReference:s})}const o=(0,m.C5)(s),c=e.origin?new d.Z({x:e.origin.x,y:e.origin.y,spatialReference:s}):new d.Z(o?{x:o.origin[0],y:o.origin[1],spatialReference:s}:{x:0,y:0,spatialReference:s}),u=1/(39.37*(0,a.c9)(s)*96),h=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],r=t*u;h.push(new g.Z({level:e,scale:t,resolution:r}))}else{let e=(0,m.sT)(s)?512/l*591657527.5917094:256/l*591657527.591555;const i=Math.ceil(n/t);h.push(new g.Z({level:0,scale:e,resolution:e*u}));for(let r=1;r<i;r++){const i=e/2**t,l=i*u;h.push(new g.Z({level:r,scale:i,resolution:l})),e=i}}return new r({dpi:96,lods:h,origin:c,size:[l,l],spatialReference:s})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,m.C5)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return d.Z.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const r=[],l=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach((e=>{r.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,l[e.level]=e}))),this._set("scales",r),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const i=Math.floor(e),r=i+1;return t[i]/(t[i]/t[r])**(e-i)}scaleToZoom(e){const t=this.scales,i=t.length-1;let r=0;for(;r<i;r++){const i=t[r],l=t[r+1];if(i<=e)return r;if(l===e)return r+1;if(i>e&&l<e)return r+Math.log(i/e)/Math.log(i/l)}return r}snapScale(e,t=.95){const i=this.scaleToZoom(e);return i%Math.floor(i)>=t?this.zoomToScale(Math.ceil(i)):this.zoomToScale(Math.floor(i))}tileAt(e,t,i,r){const l=this.lodAt(e);if(!l)return null;let s,n;if("number"==typeof t)s=t,n=i;else if((0,m.fS)(t.spatialReference,this.spatialReference))s=t.x,n=t.y,r=i;else{const e=(0,y.iV)(t,this.spatialReference);if(null==e)return null;s=e.x,n=e.y,r=i}const a=l.resolution*this.size[0],o=l.resolution*this.size[1];return r||(r=new w.f(null,0,0,0,(0,v.Ue)())),r.level=e,r.row=Math.floor((this.origin.y-n)/o+.001),r.col=Math.floor((s-this.origin.x)/a+.001),this.updateTileInfo(r),r}updateTileInfo(e,t=r.ExtrapolateOptions.NONE){let i=this.lodAt(e.level);if(!i&&t===r.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return;const l=e.level-i.level,s=i.resolution*this.size[0]/2**l,n=i.resolution*this.size[1]/2**l;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,v.Ue)()),e.extent[0]=this.origin.x+e.col*s,e.extent[1]=this.origin.y-(e.row+1)*n,e.extent[2]=e.extent[0]+s,e.extent[3]=e.extent[1]+n}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const i=this.lodAt(t.level);if(null==i)return null;const{resolution:r}=i,l=r*this.size[0],s=r*this.size[1];return e[0]=this.origin.x+t.col*l,e[1]=this.origin.y-(t.row+1)*s,e[2]=e[0]+l,e[3]=e[1]+s,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return r.fromJSON(this.write({}))}getOrCreateCompatible(e,t){if(256===this.size[0]&&256===this.size[1])return 256===e?this:null;const i=[],l=this.lods.length;for(let e=0;e<l;e++){const r=this.lods[e],l=r.resolution*t;i.push(new g.Z({level:r.level,scale:r.scale,resolution:l}))}return new r({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const r=e[i];this._upsampleLevels[r.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/r.resolution:0},t=r}}};var I,S;(0,l._)([(0,o.Cb)({type:Number,json:{write:!0}})],b.prototype,"compressionQuality",void 0),(0,l._)([(0,o.Cb)({type:Number,json:{write:!0}})],b.prototype,"dpi",void 0),(0,l._)([(0,o.Cb)({type:String,json:{read:_.read,write:_.write,origins:{"web-scene":{read:!1,write:!1}}}})],b.prototype,"format",void 0),(0,l._)([(0,o.Cb)({readOnly:!0})],b.prototype,"isWrappable",null),(0,l._)([(0,o.Cb)({type:d.Z,json:{write:!0}})],b.prototype,"origin",void 0),(0,l._)([(0,u.r)("origin")],b.prototype,"readOrigin",null),(0,l._)([(0,o.Cb)({type:[g.Z],value:null,json:{write:!0}})],b.prototype,"lods",null),(0,l._)([(0,o.Cb)({readOnly:!0})],b.prototype,"scales",void 0),(0,l._)([(0,o.Cb)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],b.prototype,"size",void 0),(0,l._)([(0,u.r)("size",["rows","cols"])],b.prototype,"readSize",null),(0,l._)([(0,p.c)("size",{cols:{type:c.z8},rows:{type:c.z8}})],b.prototype,"writeSize",null),(0,l._)([(0,o.Cb)({type:f.Z,json:{write:!0}})],b.prototype,"spatialReference",void 0),b=r=(0,l._)([(0,h.j)("esri.layers.support.TileInfo")],b),(S=(I=b||(b={})).ExtrapolateOptions||(I.ExtrapolateOptions={}))[S.NONE=0]="NONE",S[S.POWER_OF_TWO=1]="POWER_OF_TWO";const O=b},43077:(e,t,i)=>{i.d(t,{f:()=>r});class r{constructor(e,t,i,r,l=void 0){this.id=e,this.level=t,this.row=i,this.col=r,this.extent=l}}},28589:(e,t,i)=>{i.d(t,{y:()=>O});var r,l=i(43697),s=i(3172),n=i(92036),a=i(91303),o=i(20102),c=i(50758),u=i(13867),h=i(44553),p=i(95330),d=i(17445),f=i(1654),v=i(17452),m=i(5600),y=(i(75215),i(67676)),g=(i(80442),i(52011)),w=i(43077),_=i(22974),b=i(1533);class I{constructor(e){this._validateJSON(e);const{location:t,data:i}=e;this.location=Object.freeze((0,_.d9)(t));const r=this.location.width,l=this.location.height;let s=!0,n=!0;const a=function(e,t=!1){return e<=b.c8?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(r*l/32));let o=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(n=!1,a[o]|=1<<t):s=!1,31===t&&++o}n?(this._availability="unavailable",this.byteSize=40):s?(this._availability="available",this.byteSize=40):(this._availability=a,this.byteSize=40+(0,b.Xw)(a))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),r=i%32,l=i>>5,s=this._availability;return l<0||l>s.length?"unknown":s[l]&1<<r?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||s.Z,{row:r,col:l,width:n,height:a}=e,c={query:{f:"json"}};return t=t?{...c,...t}:c,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then((e=>e.data)).catch((e=>{if(e&&e.details&&422===e.details.httpStatus)return{location:{top:r,left:l,width:n,height:a},valid:!0,data:(0,y.a9)(n*a,0)};throw e})).then((e=>{if(e.location&&(e.location.top!==r||e.location.left!==l||e.location.width!==n||e.location.height!==a))throw new o.Z("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:r,left:l,width:n,height:a}});return I.fromJSON(e)}))}static fromJSON(e){return Object.freeze(new I(e))}_validateJSON(e){if(!e||!e.location)throw new o.Z("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new o.Z("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new o.Z("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new o.Z("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new o.Z("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}}function S(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}let O=r=class extends n.Z{constructor(e){super(e),this._pendingTilemapRequests={},this.request=s.Z,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new u.z(2*a.Y.MEGABYTES),this.addHandles([(0,d.YP)((()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]}),(()=>this._initializeTilemapDefinition()),d.nn)])}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}fetchTilemap(e,t,i,r){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new o.Z("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const l=this._tmpTilemapDefinition,s=this._tilemapFromCache(e,t,i,l);if(s)return Promise.resolve(s);const n=r&&r.signal;return r={...r,signal:null},new Promise(((e,t)=>{(0,p.fu)(n,(()=>t((0,p.zE)())));const i=S(l);let s=this._pendingTilemapRequests[i];if(!s){s=I.fromDefinition(l,r).then((e=>(this._tilemapCache.put(i,e,e.byteSize),e)));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=s,s.then(e,e)}s.then(e,t)}))}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const r=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return r?r.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,r){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(new o.Z("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})):this.fetchTilemap(e,t,i,r).catch((e=>e)).then((r=>{if(r instanceof I){const l=r.getAvailability(t,i);if("unavailable"===l)throw new o.Z("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return l}if((0,p.D_)(r))throw r;return"unknown"}))}fetchAvailabilityUpsample(e,t,i,r,l){r.level=e,r.row=t,r.col=i;const s=this.layer.tileInfo;s.updateTileInfo(r);const n=this.fetchAvailability(e,t,i,l).catch((e=>{if((0,p.D_)(e))throw e;if(s.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,l);throw e}));return this._fetchAvailabilityUpsamplePrefetch(r.id,e,t,i,l,n),n}async _fetchAvailabilityUpsamplePrefetch(e,t,i,l,s,n){if(!this._prefetchingEnabled||null==e)return;const a=`prefetch-${e}`;if(this.hasHandles(a))return;const o=new AbortController;n.then((()=>o.abort()),(()=>o.abort()));let u=!1;const h=(0,c.kB)((()=>{u||(u=!0,o.abort())}));if(this.addHandles(h,a),await(0,f.MU)(10,o.signal).catch((()=>{})),u||(u=!0,this.removeHandles(a)),(0,p.Hc)(o))return;const d=new w.f(e,t,i,l),v={...s,signal:o.signal},m=this.layer.tileInfo;for(let e=0;r._prefetches.length<r._maxPrefetch&&m.upsampleTile(d);++e){const e=this.fetchAvailability(d.level,d.row,d.col,v);r._prefetches.push(e);const t=()=>{r._prefetches.removeUnordered(e)};e.then(t,t)}}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,v.B7)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,r){r.level=e,r.row=t-t%this.size,r.col=i-i%this.size;const l=S(r);return this._tilemapCache.get(l)}get test(){const e=this;return{get prefetchingEnabled(){return e._prefetchingEnabled},set prefetchingEnabled(t){e._prefetchingEnabled=t},hasTilemap:(t,i,r)=>!!e._tilemapFromCache(t,i,r,e._tmpTilemapDefinition)}}};O._maxPrefetch=4,O._prefetches=new h.Z({initialSize:r._maxPrefetch}),(0,l._)([(0,m.Cb)({constructOnly:!0})],O.prototype,"layer",void 0),(0,l._)([(0,m.Cb)({constructOnly:!0})],O.prototype,"minLOD",void 0),(0,l._)([(0,m.Cb)({constructOnly:!0})],O.prototype,"maxLOD",void 0),(0,l._)([(0,m.Cb)({constructOnly:!0})],O.prototype,"request",void 0),(0,l._)([(0,m.Cb)({constructOnly:!0})],O.prototype,"size",void 0),O=r=(0,l._)([(0,g.j)("esri.layers.support.TilemapCache")],O)},66677:(e,t,i)=>{i.d(t,{B5:()=>u,DR:()=>p,G:()=>w,M8:()=>v,Nm:()=>m,Qc:()=>h,XG:()=>y,a7:()=>f,ld:()=>d,wH:()=>g});var r=i(17452),l=i(25929);const s={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},n=Object.values(s),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${n.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),o=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${n.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),c=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function u(e){return!!a.test(e)}function h(e){if(null==e)return null;const t=(0,r.mN)(e),i=t.path.match(a)||t.path.match(o);if(!i)return null;const[,l,n,c,u]=i,h=n.indexOf("/");return{title:d(-1!==h?n.slice(h+1):n),serverType:s[c.toLowerCase()],sublayer:null!=u&&""!==u?parseInt(u,10):null,url:{path:l}}}function p(e){const t=(0,r.mN)(e).path.match(c);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function d(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function f(e,t){const i=[];if(e){const t=h(e);null!=t&&t.title&&i.push(t.title)}if(t){const e=d(t);i.push(e)}if(2===i.length){if(i[0].toLowerCase().includes(i[1].toLowerCase()))return i[0];if(i[1].toLowerCase().includes(i[0].toLowerCase()))return i[1]}return i.join(" - ")}function v(e){if(!e)return!1;const t=(e=e.toLowerCase()).includes(".arcgis.com/"),i=e.includes("//services")||e.includes("//tiles")||e.includes("//features");return t&&i}function m(e,t){return e?(0,r.Qj)((0,r.Hu)(e,t)):e}function y(e){let{url:t}=e;if(!t)return{url:t};t=(0,r.Hu)(t,e.logger);const i=(0,r.mN)(t),l=h(i.path);let s;if(null!=l)null!=l.sublayer&&null==e.layer.layerId&&(s=l.sublayer),t=l.url.path;else if(e.nonStandardUrlAllowed){const e=p(i.path);null!=e&&(t=e.serviceUrl,s=e.sublayerId)}return{url:(0,r.Qj)(t),layerId:s}}function g(e,t,i,s,n){(0,l.w)(t,s,"url",n),s.url&&null!=e.layerId&&(s.url=(0,r.v_)(s.url,i,e.layerId.toString()))}function w(e){if(!e)return!1;const t=e.toLowerCase(),i=t.includes("/services/"),r=t.includes("/mapserver/wmsserver"),l=t.includes("/imageserver/wmsserver"),s=t.includes("/wmsserver");return i&&(r||l||s)}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7487],{75517:(e,t,n)=>{function i(e,t){if(!t)return e;for(const n of t)e.add(n);return e}function r(e,t){const n=new Set;return i(n,e),i(n,t),n}function l(e,t){const n=new Set;for(const i of t)e.has(i)&&n.add(i);return n}function a(e,t){if(!e||!t)return!1;if(e===t)return!0;for(const n of e)if(!t.has(n))return!1;return!0}function o(e,t){if(null==e&&null==t)return!0;if(null==e||null==t||e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function s(e,t){const n=new Set(e);for(const e of t)n.delete(e);return n}n.d(t,{G0:()=>r,e5:()=>s,fS:()=>o,ik:()=>a,jV:()=>l})},90578:(e,t,n)=>{n.d(t,{p:()=>s});var i=n(75215),r=n(7628);const l=Object.prototype.toString;function a(e){const t="__accessorMetadata__"in e?(0,i.se)(e):e;return function(...e){if(e.push(t),"number"==typeof e[2])throw new Error("Using @cast has parameter decorator is not supported since 4.16");return o.apply(this,e)}}function o(e,t,n,i){(0,r.Oe)(e,t).cast=i}function s(...e){if(3!==e.length||"string"!=typeof e[1])return 1===e.length&&"[object Function]"===l.call(e[0])?a(e[0]):1===e.length&&"string"==typeof e[0]?function(e){return(t,n)=>{(0,r.Oe)(t,e).cast=t[n]}}(e[0]):void 0}},71715:(e,t,n)=>{n.d(t,{r:()=>r});var i=n(5600);function r(e,t,n){let r,l;return void 0===t||Array.isArray(t)?(l=e,n=t,r=[void 0]):(l=t,r=Array.isArray(e)?e:[e]),(e,t)=>{const a=e.constructor.prototype;r.forEach((r=>{const o=(0,i.CJ)(e,r,l);o.read&&"object"==typeof o.read||(o.read={}),o.read.reader=a[t],n&&(o.read.source=(o.read.source||[]).concat(n))}))}}},66577:(e,t,n)=>{n.d(t,{qM:()=>c});var i=n(75215),r=n(6570),l=n(9361),a=n(65091),o=n(94139),s=n(38913),u=n(58901);n(82971),n(86973),n(33955);const c={base:l.Z,key:"type",typeMap:{extent:r.Z,multipoint:a.Z,point:o.Z,polyline:u.Z,polygon:s.Z}};(0,i.N7)(c)},9361:(e,t,n)=>{n.d(t,{Z:()=>c});var i=n(43697),r=n(96674),l=n(5600),a=(n(75215),n(67676),n(80442),n(71715)),o=n(52011),s=n(82971);let u=class extends r.wq{constructor(...e){super(...e),this.type=null,this.hasM=!1,this.hasZ=!1,this.spatialReference=s.Z.WGS84}get cache(){return this.commitProperty("spatialReference"),{}}get extent(){return null}readSpatialReference(e,t){if(e instanceof s.Z)return e;if(null!=e){const n=new s.Z;return n.read(e,t),n}return e}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}clearCache(){this.notifyChange("cache")}getCacheValue(e){return this.cache[e]}setCacheValue(e,t){this.cache[e]=t}};(0,i._)([(0,l.Cb)()],u.prototype,"type",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],u.prototype,"cache",null),(0,i._)([(0,l.Cb)({readOnly:!0})],u.prototype,"extent",null),(0,i._)([(0,l.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],u.prototype,"hasM",void 0),(0,i._)([(0,l.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],u.prototype,"hasZ",void 0),(0,i._)([(0,l.Cb)({type:s.Z,json:{write:!0},value:s.Z.WGS84})],u.prototype,"spatialReference",void 0),(0,i._)([(0,a.r)("spatialReference")],u.prototype,"readSpatialReference",null),u=(0,i._)([(0,o.j)("esri.geometry.Geometry")],u);const c=u},94139:(e,t,n)=>{n.d(t,{Z:()=>v});var i,r=n(43697),l=n(92604),a=n(5600),o=n(90578),s=(n(67676),n(80442),n(71715)),u=n(52011),c=n(30556),f=n(75215),d=n(9361),p=n(82971),m=n(8744),h=n(40488);const y=[0,0];function g(e){return e&&("esri.geometry.SpatialReference"===e.declaredClass||null!=e.wkid)}let b=i=class extends d.Z{static copy(e,t){t._set("x",e._get("x")),t._set("y",e._get("y")),t._set("z",e._get("z")),t._set("m",e._get("m"));const n=e._get("spatialReference");t._set("spatialReference",Object.isFrozen(n)?n:n.clone())}constructor(...e){super(...e),this.x=0,this.y=0,this.z=void 0,this.m=void 0,this.type="point"}normalizeCtorArgs(e,t,n,i,r){let a;if(Array.isArray(e))a=e,r=t,e=a[0],t=a[1],n=a[2],i=a[3];else if(e&&"object"==typeof e){if(a=e,e=null!=a.x?a.x:a.longitude,t=null!=a.y?a.y:a.latitude,n=a.z,i=a.m,(r=a.spatialReference)&&"esri.geometry.SpatialReference"!==r.declaredClass&&(r=new p.Z(r)),null!=a.longitude||null!=a.latitude)if(null==a.longitude)l.Z.getLogger(this).warn(".longitude=","Latitude was defined without longitude");else if(null==a.latitude)l.Z.getLogger(this).warn(".latitude=","Longitude was defined without latitude");else if(!a.declaredClass&&r&&r.isWebMercator){const n=(0,h.hG)(a.longitude,a.latitude,y);e=n[0],t=n[1]}}else g(n)?(r=n,n=null):g(i)&&(r=i,i=null);const o={x:e,y:t};return null==o.x&&null!=o.y?l.Z.getLogger(this).warn(".y=","Y coordinate was defined without an X coordinate"):null==o.y&&null!=o.x&&l.Z.getLogger(this).warn(".x=","X coordinate was defined without a Y coordinate"),null!=r&&(o.spatialReference=r),null!=n&&(o.z=n),null!=i&&(o.m=i),o}get cache(){return this.commitProperty("x"),this.commitProperty("y"),this.commitProperty("z"),this.commitProperty("m"),this.commitProperty("spatialReference"),{}}get hasM(){return void 0!==this.m}set hasM(e){e!==(void 0!==this._get("m"))&&(this._set("m",e?0:void 0),this._set("hasM",e))}get hasZ(){return void 0!==this.z}set hasZ(e){e!==(void 0!==this._get("z"))&&(this._set("z",e?0:void 0),this._set("hasZ",e))}get latitude(){const{spatialReference:e,x:t,y:n}=this;if(e){if(e.isWebMercator)return(0,h.R6)(t,n,y)[1];if(e.isGeographic)return n}return null}set latitude(e){const{spatialReference:t,x:n}=this;null!=e&&t&&(t.isWebMercator?this._set("y",(0,h.hG)(n,e,y)[1]):t.isGeographic&&this._set("y",e),this._set("latitude",e))}get longitude(){const{x:e,y:t,spatialReference:n}=this;if(n){if(n.isWebMercator)return(0,h.R6)(e,t,y)[0];if(n.isGeographic)return e}return null}set longitude(e){const{y:t,spatialReference:n}=this;null!=e&&n&&(n.isWebMercator?this._set("x",(0,h.hG)(e,t,y)[0]):n.isGeographic&&this._set("x",e),this._set("longitude",e))}writeX(e,t,n){t[n]=isNaN(e)?"NaN":e}readX(e){return"string"==typeof e?NaN:e}clone(){const e=new i;return e.x=this.x,e.y=this.y,e.z=this.z,e.m=this.m,e.spatialReference=this.spatialReference,e}copy(e){return i.copy(e,this),this}equals(e){if(null==e)return!1;const{x:t,y:n,z:i,m:r,spatialReference:l}=this,{z:a,m:o}=e;let{x:s,y:u,spatialReference:c}=e;if(!l.equals(c))if(l.isWebMercator&&c.isWGS84)[s,u]=(0,h.hG)(s,u),c=l;else{if(!l.isWGS84||!c.isWebMercator)return!1;[s,u]=(0,h.R6)(s,u),c=l}return t===s&&n===u&&i===a&&r===o&&l.wkid===c.wkid}offset(e,t,n){return this.x+=e,this.y+=t,null!=n&&(this.z=(this.z??0)+n),this}normalize(){if(!this.spatialReference)return this;const e=(0,m.C5)(this.spatialReference);if(!e)return this;let t=this.x;const[n,i]=e.valid,r=2*i;let l;return t>i?(l=Math.ceil(Math.abs(t-i)/r),t-=l*r):t<n&&(l=Math.ceil(Math.abs(t-n)/r),t+=l*r),this._set("x",t),this}distance(e){return function(e,t){const n=e.x-t.x,i=e.y-t.y,r=e.hasZ&&t.hasZ?e.z-t.z:0;return Math.sqrt(n*n+i*i+r*r)}(this,e)}toArray(){const e=this.hasZ,t=this.hasM;return e&&t?[this.x,this.y,this.z,this.m]:e?[this.x,this.y,this.z]:t?[this.x,this.y,this.m]:[this.x,this.y]}toJSON(e){return this.write({},e)}};(0,r._)([(0,a.Cb)({readOnly:!0})],b.prototype,"cache",null),(0,r._)([(0,a.Cb)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],b.prototype,"hasM",null),(0,r._)([(0,a.Cb)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],b.prototype,"hasZ",null),(0,r._)([(0,a.Cb)({type:Number})],b.prototype,"latitude",null),(0,r._)([(0,a.Cb)({type:Number})],b.prototype,"longitude",null),(0,r._)([(0,a.Cb)({type:Number,json:{type:[Number,String],write:{isRequired:!0,allowNull:!0}}}),(0,o.p)((e=>isNaN(e)?e:(0,f.q9)(e)))],b.prototype,"x",void 0),(0,r._)([(0,c.c)("x")],b.prototype,"writeX",null),(0,r._)([(0,s.r)("x")],b.prototype,"readX",null),(0,r._)([(0,a.Cb)({type:Number,json:{write:!0}})],b.prototype,"y",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasZ}}}}})],b.prototype,"z",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasM}}}}})],b.prototype,"m",void 0),b=i=(0,r._)([(0,u.j)("esri.geometry.Point")],b),b.prototype.toJSON.isDefaultToJSON=!0;const v=b},62155:(e,t,n)=>{var i;n.d(t,{R:()=>i}),function(e){e[e.X=0]="X",e[e.Y=1]="Y",e[e.Z=2]="Z"}(i||(i={}))},33955:(e,t,n)=>{n.d(t,{Ji:()=>h,YX:()=>u,aW:()=>c,im:()=>m,l9:()=>d,oU:()=>p,q9:()=>g,wp:()=>f});var i=n(6570),r=n(9361),l=n(65091),a=n(94139),o=n(38913),s=n(58901);function u(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function c(e){return void 0!==e.points}function f(e){return void 0!==e.x&&void 0!==e.y}function d(e){return void 0!==e.paths}function p(e){return void 0!==e.rings}function m(e){return null==e?null:e instanceof r.Z?e:f(e)?a.Z.fromJSON(e):d(e)?s.Z.fromJSON(e):p(e)?o.Z.fromJSON(e):c(e)?l.Z.fromJSON(e):u(e)?i.Z.fromJSON(e):null}function h(e){return e?f(e)?"esriGeometryPoint":d(e)?"esriGeometryPolyline":p(e)?"esriGeometryPolygon":u(e)?"esriGeometryEnvelope":c(e)?"esriGeometryMultipoint":null:null}const y={esriGeometryPoint:a.Z,esriGeometryPolyline:s.Z,esriGeometryPolygon:o.Z,esriGeometryEnvelope:i.Z,esriGeometryMultipoint:l.Z};function g(e){return e&&y[e]||null}},82397:(e,t,n)=>{n.d(t,{G6:()=>h,Ie:()=>m,J9:()=>d,RF:()=>f,U1:()=>p,vY:()=>a}),n(33955);const i=(e,t,n)=>[t,n],r=(e,t,n)=>[t,n,e[2]],l=(e,t,n)=>[t,n,e[2],e[3]];function a(e){return e?{originPosition:"upper-left"===e.originPosition?"upperLeft":"lower-left"===e.originPosition?"lowerLeft":e.originPosition,scale:e.tolerance?[e.tolerance,e.tolerance]:[1,1],translate:null!=e.extent?[e.extent.xmin,e.extent.ymax]:[0,0]}:null}function o({scale:e,translate:t},n){return n*e[0]+t[0]}function s({scale:e,translate:t},n){return t[1]-n*e[1]}function u(e,t,n){const i=new Array(n.length);if(!n.length)return i;const[r,l]=e.scale;let a=o(e,n[0][0]),u=s(e,n[0][1]);i[0]=t(n[0],a,u);for(let e=1;e<n.length;e++){const o=n[e];a+=o[0]*r,u-=o[1]*l,i[e]=t(o,a,u)}return i}function c(e,t,n){const i=new Array(n.length);for(let r=0;r<n.length;r++)i[r]=u(e,t,n[r]);return i}function f(e,t,n,i,r){return t.x=function({scale:e,translate:t},n){return Math.round((n-t[0])/e[0])}(e,n.x),t.y=function({scale:e,translate:t},n){return Math.round((t[1]-n)/e[1])}(e,n.y),t!==n&&(i&&(t.z=n.z),r&&(t.m=n.m)),t}function d(e,t,n,a,o){return null!=n&&(t.points=function(e,t,n,a){return u(e,n?a?l:r:a?r:i,t)}(e,n.points,a,o)),t}function p(e,t,n,i,r){return null==n||(t.x=o(e,n.x),t.y=s(e,n.y),t!==n&&(i&&(t.z=n.z),r&&(t.m=n.m))),t}function m(e,t,n,a,o){return null!=n&&(t.rings=function(e,t,n,a){return c(e,n?a?l:r:a?r:i,t)}(e,n.rings,a,o)),t}function h(e,t,n,a,o){return null!=n&&(t.paths=function(e,t,n,a){return c(e,n?a?l:r:a?r:i,t)}(e,n.paths,a,o)),t}},86973:(e,t,n)=>{n.d(t,{M:()=>r,P:()=>l});var i=n(35454);const r=(0,i.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),l=(0,i.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"})},40488:(e,t,n)=>{n.d(t,{$:()=>v,Q8:()=>h,R6:()=>b,Sx:()=>x,hG:()=>g,iV:()=>y,mZ:()=>f});var i=n(22974),r=n(82971),l=n(68441),a=n(8744);const o=57.29577951308232,s=.017453292519943;function u(e){return e*o}function c(e){return e*s}function f(e){return Math.PI/2-2*Math.atan(Math.exp(-e/l.sv.radius))}function d(e){return null!=e.wkid||null!=e.wkt}const p=[0,0];function m(e,t,n,i,r){const l=e,a=r;if(a.spatialReference=n,"x"in l&&"x"in a)[a.x,a.y]=t(l.x,l.y,p,i);else if("xmin"in l&&"xmin"in a)[a.xmin,a.ymin]=t(l.xmin,l.ymin,p,i),[a.xmax,a.ymax]=t(l.xmax,l.ymax,p,i);else if("paths"in l&&"paths"in a||"rings"in l&&"rings"in a){const e="paths"in l?l.paths:l.rings,n=[];let r;for(let l=0;l<e.length;l++){const a=e[l];r=[],n.push(r);for(let e=0;e<a.length;e++)r.push(t(a[e][0],a[e][1],[0,0],i)),a[e].length>2&&r[e].push(a[e][2]),a[e].length>3&&r[e].push(a[e][3])}"paths"in a?a.paths=n:a.rings=n}else if("points"in l&&"points"in a){const e=l.points,n=[];for(let r=0;r<e.length;r++)n[r]=t(e[r][0],e[r][1],[0,0],i),e[r].length>2&&n[r].push(e[r][2]),e[r].length>3&&n[r].push(e[r][3]);a.points=n}return r}function h(e,t){const n=e&&(d(e)?e:e.spatialReference),i=t&&(d(t)?t:t.spatialReference);return!(e&&"type"in e&&"mesh"===e.type||t&&"type"in t&&"mesh"===t.type||!n||!i)&&(!!(0,a.fS)(i,n)||(0,a.sS)(i)&&(0,a.oR)(n)||(0,a.sS)(n)&&(0,a.oR)(i))}function y(e,t){if(null==e)return null;const n=e.spatialReference,l=t&&(d(t)?t:t.spatialReference);return h(n,l)?(0,a.fS)(n,l)?(0,i.d9)(e):(0,a.sS)(l)?m(e,g,r.Z.WebMercator,!1,(0,i.d9)(e)):(0,a.oR)(l)?m(e,b,r.Z.WGS84,!1,(0,i.d9)(e)):null:null}function g(e,t,n=[0,0]){t>89.99999?t=89.99999:t<-89.99999&&(t=-89.99999);const i=c(t);return n[0]=c(e)*l.sv.radius,n[1]=l.sv.halfSemiMajorAxis*Math.log((1+Math.sin(i))/(1-Math.sin(i))),n}function b(e,t,n=[0,0],i=!1){const r=u(e/l.sv.radius);return n[0]=i?r:r-360*Math.floor((r+180)/360),n[1]=u(Math.PI/2-2*Math.atan(Math.exp(-t/l.sv.radius))),n}function v(e,t=!1,n=(0,i.d9)(e)){return m(e,g,r.Z.WebMercator,t,n)}function x(e,t=!1,n=(0,i.d9)(e)){return m(e,b,r.Z.WGS84,t,n)}},35671:(e,t,n)=>{n.d(t,{io:()=>F,AB:()=>v,gd:()=>b,Q0:()=>g,YN:()=>p,UF:()=>h,O5:()=>_,CH:()=>V,os:()=>D,Hp:()=>C,Fv:()=>z,H7:()=>q,Ec:()=>ie,qN:()=>U,q6:()=>c,Pz:()=>X,Lk:()=>x,Qc:()=>J,vP:()=>ne}),n(20102);var i,r,l=n(78286),a=n(75517);(r=i||(i={})).VALUE_OUT_OF_RANGE="domain-validation-error::value-out-of-range",r.INVALID_CODED_VALUE="domain-validation-error::invalid-coded-value";var o=n(59266);const s=/^([0-9_])/,u=/[^a-z0-9_\u0080-\uffff]+/gi;function c(e){return null==e?null:e.trim().replaceAll(u,"_").replace(s,"F$1")||null}const f=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],d=["field","normalizationField"];function p(e,t){if(null!=e&&null!=t)for(const n of Array.isArray(e)?e:[e])if(m(f,n,t),"visualVariables"in n&&n.visualVariables)for(const e of n.visualVariables)m(d,e,t)}function m(e,t,n){if(e)for(const i of e){const e=(0,l.hS)(i,t),r=e&&"function"!=typeof e&&n.get(e);r&&(0,l.RB)(i,r.name,t)}}function h(e,t){if(null!=e&&t?.fields?.length)if("startField"in e){const n=t.get(e.startField),i=t.get(e.endField);e.startField=n?.name??null,e.endField=i?.name??null}else{const n=t.get(e.startTimeField),i=t.get(e.endTimeField);e.startTimeField=n?.name??null,e.endTimeField=i?.name??null}}const y=new Set;function g(e,t){return e&&t?(y.clear(),b(y,e,t),Array.from(y).sort()):[]}function b(e,t,n){if(n)if(t?.fields?.length)if(n.includes("*"))for(const{name:n}of t.fields)e.add(n);else for(const i of n)v(e,t,i);else{if(n.includes("*"))return e.clear(),void e.add("*");for(const t of n)null!=t&&e.add(t)}}function v(e,t,n){if("string"==typeof n)if(t){const i=t.get(n);i&&e.add(i.name)}else e.add(n)}function x(e,t){return null==t||null==e?[]:t.includes("*")?(e.fields??[]).map((e=>e.name)):t}async function F(e,t,n){if(!n)return;const{arcadeUtils:i}=await(0,o.LC)(),r=i.extractFieldNames(n,t?.fields?.map((e=>e.name)));for(const n of r)v(e,t,n)}function _({displayField:e,fields:t}){return e||(t&&t.length?w(t,"name-or-title")||w(t,"unique-identifier")||w(t,"type-or-category")||function(e){for(const t of e){if(!t||!t.name)continue;const e=t.name.toLowerCase();if(e.includes("name")||e.includes("title"))return t.name}return null}(t):null)}function w(e,t){for(const n of e)if(n&&n.valueType&&n.valueType===t)return n.name;return null}function V(e){return e?g(e.fieldsIndex,N(e)):[]}const S=["oid","global-id","guid"],T=["oid","global-id"],M=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/shape/i,/perimeter/i,/objectid/i,/_i$/i];function N(e){if(!e)return[];const t="editFieldsInfo"in e&&e.editFieldsInfo;if(!t)return[];const{creationDateField:n,creatorField:i,editDateField:r,editorField:l}=t;return[n,i,r,l].filter(Boolean)}function I(e){return N(e).map((e=>e.toLowerCase()))}function C(e,t){return e.editable&&!S.includes(e.type)&&!I(t).includes(e.name?.toLowerCase()??"")}function z(e,t){const n=e.name?.toLowerCase()??"";return!(null!=t?.objectIdField&&n===t.objectIdField.toLowerCase()||null!=t?.globalIdField&&n===t.globalIdField.toLowerCase()||function(e){const t=new Set;I(e).forEach((e=>t.add(e))),function(e){if(!e)return[];const t=e.geometryFieldsInfo;return t?g(e.fieldsIndex,[t.shapeAreaField,t.shapeLengthField]):[]}(e).forEach((e=>t.add(e.toLowerCase())));const n=e&&"infoFor3D"in e?e.infoFor3D:void 0;return n&&(Object.values(n.assetMapFieldRoles).forEach((e=>t.add(e.toLowerCase()))),Object.values(n.transformFieldRoles).forEach((e=>t.add(e.toLowerCase())))),Array.from(t)}(t).includes(n)||T.includes(e.type)||M.some((e=>e.test(n))))}function D(e){const t=e.defaultValue;return void 0!==t&&L(e,t)?t:e.nullable?null:void 0}function G(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function R(e){return null===e||G(e)}const Z="isInteger"in Number?Number.isInteger:e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e;function A(e){return null===e||Z(e)}function k(e){return null!=e&&"string"==typeof e}function E(e){return null===e||k(e)}function $(){return!0}function L(e,t){let n;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"big-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":case"esriFieldTypeBigInteger":n=e.nullable?A:Z;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":n=e.nullable?R:G;break;case"string":case"esriFieldTypeString":n=e.nullable?E:k;break;default:n=$}return 1===arguments.length?n:n(t)}const P=new Set(["integer","small-integer","big-integer","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeBigInteger"]),O=new Set(["single","double","esriFieldTypeSingle","esriFieldTypeDouble"]),j=(0,a.G0)(P,O);function q(e){return null!=e&&j.has(e.type)}function U(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}var B,W;function X(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function J(e,t){return null==e||e.nullable&&null===t?null:q(e)&&!function(e,t){const n="string"==typeof e?Y(e):e;if(!n)return!1;const i=n.min,r=n.max;return n.isInteger?Z(t)&&t>=i&&t<=r:t>=i&&t<=r}(e.type,Number(t))?B.OUT_OF_RANGE:L(e,t)?e.domain?function(e,t){switch(e.type){case"range":{const n="range"in e?e.range[0]:e.minValue,r="range"in e?e.range[1]:e.maxValue;if(null!=n&&+t<n||null!=r&&+t>r)return i.VALUE_OUT_OF_RANGE;break}case"coded-value":case"codedValue":if(null==e.codedValues||e.codedValues.every((e=>null==e||e.code!==t)))return i.INVALID_CODED_VALUE}return null}(e.domain,t):null:W.INVALID_TYPE}function Y(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return Q;case"esriFieldTypeInteger":case"integer":return H;case"esriFieldTypeBigInteger":case"big-integer":return K;case"esriFieldTypeSingle":case"single":return ee;case"esriFieldTypeDouble":case"double":return te}}new Set(["date","date-only","time-only","timestamp-offset","esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),function(e){e.OUT_OF_RANGE="numeric-range-validation-error::out-of-range"}(B||(B={})),function(e){e.INVALID_TYPE="type-validation-error::invalid-type"}(W||(W={}));const Q={min:-32768,max:32767,isInteger:!0},H={min:-2147483648,max:2147483647,isInteger:!0},K={min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,isInteger:!0},ee={min:-34e37,max:12e37,isInteger:!1},te={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1};function ne(e,t,n){switch(e){case i.INVALID_CODED_VALUE:return`Value ${n} is not in the coded domain - field: ${t.name}, domain: ${JSON.stringify(t.domain)}`;case i.VALUE_OUT_OF_RANGE:return`Value ${n} is out of the range of valid values - field: ${t.name}, domain: ${JSON.stringify(t.domain)}`;case W.INVALID_TYPE:return`Value ${n} is not a valid value for the field type - field: ${t.name}, type: ${t.type}, nullable: ${t.nullable}`;case B.OUT_OF_RANGE:{const{min:e,max:i}=Y(t.type);return`Value ${n} is out of range for the number type - field: ${t.name}, type: ${t.type}, value range is ${e} to ${i}`}}}function ie(e){return!!e&&["raster.itempixelvalue","raster.servicepixelvalue"].some((t=>e.toLowerCase().startsWith(t)))}},10278:(e,t,n)=>{n.d(t,{Z:()=>d});var i=n(43697),r=n(35454),l=n(96674),a=n(5600),o=(n(75215),n(67676),n(80442),n(36030)),s=n(52011);const u=new r.X({esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation",esriClassifyDefinedInterval:"defined-interval"}),c=new r.X({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:"percent-of-total",esriNormalizeByField:"field"});let f=class extends l.wq{constructor(e){super(e),this.type="class-breaks-definition",this.breakCount=null,this.classificationField=null,this.classificationMethod=null,this.normalizationField=null,this.normalizationType=null}set standardDeviationInterval(e){"standard-deviation"===this.classificationMethod&&this._set("standardDeviationInterval",e)}set definedInterval(e){"defined-interval"===this.classificationMethod&&this._set("definedInterval",e)}};(0,i._)([(0,o.J)({classBreaksDef:"class-breaks-definition"})],f.prototype,"type",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"breakCount",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"classificationField",void 0),(0,i._)([(0,a.Cb)({type:String,json:{read:u.read,write:u.write}})],f.prototype,"classificationMethod",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"normalizationField",void 0),(0,i._)([(0,a.Cb)({json:{read:c.read,write:c.write}})],f.prototype,"normalizationType",void 0),(0,i._)([(0,a.Cb)({value:null,json:{write:!0}})],f.prototype,"standardDeviationInterval",null),(0,i._)([(0,a.Cb)({value:null,json:{write:!0}})],f.prototype,"definedInterval",null),f=(0,i._)([(0,s.j)("esri.rest.support.ClassBreaksDefinition")],f);const d=f},622:(e,t,n)=>{n.d(t,{k:()=>l});const i=n(92604).Z.getLogger("esri.rest.support.generateRendererUtils");function r(e,t){return Number(e.toFixed(t))}function l(e){const{normalizationTotal:t}=e;return{classBreaks:a(e),normalizationTotal:t}}function a(e){const t=e.definition,{classificationMethod:n,normalizationType:i,definedInterval:l}=t,a=t.breakCount??1,u=[];let c=e.values;if(0===c.length)return[];c=c.sort(((e,t)=>e-t));const f=c[0],d=c[c.length-1];if("equal-interval"===n)if(c.length>=a){const e=(d-f)/a;let t=f;for(let n=1;n<a;n++){const l=r(f+n*e,6);u.push({minValue:t,maxValue:l,label:o(t,l,i)}),t=l}u.push({minValue:t,maxValue:d,label:o(t,d,i)})}else c.forEach((e=>{u.push({minValue:e,maxValue:e,label:o(e,e,i)})}));else if("natural-breaks"===n){const t=function(e){const t=[],n=[];let i=Number.MIN_VALUE,r=1,l=-1;for(let a=0;a<e.length;a++){const o=e[a];o===i?(r++,n[l]=r):null!==o&&(t.push(o),i=o,r=1,n.push(r),l++)}return{uniqueValues:t,valueFrequency:n}}(c),n=e.valueFrequency||t.valueFrequency,l=s(t.uniqueValues,n,a);let p=f;for(let e=1;e<a;e++)if(t.uniqueValues.length>e){const n=r(t.uniqueValues[l[e]],6);u.push({minValue:p,maxValue:n,label:o(p,n,i)}),p=n}u.push({minValue:p,maxValue:d,label:o(p,d,i)})}else if("quantile"===n)if(c.length>=a&&f!==d){let e=f,t=Math.ceil(c.length/a),n=0;for(let r=1;r<a;r++){let l=t+n-1;l>c.length&&(l=c.length-1),l<0&&(l=0),u.push({minValue:e,maxValue:c[l],label:o(e,c[l],i)}),e=c[l],n+=t,t=Math.ceil((c.length-n)/(a-r))}u.push({minValue:e,maxValue:d,label:o(e,d,i)})}else{let e=-1;for(let t=0;t<c.length;t++){const n=c[t];n!==e&&(e=n,u.push({minValue:e,maxValue:n,label:o(e,n,i)}),e=n)}}else if("standard-deviation"===n){const e=function(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t/=e.length,t}(c),t=function(e,t){let n=0;for(let i=0;i<e.length;i++){const r=e[i];n+=(r-t)*(r-t)}return n/=e.length,Math.sqrt(n)}(c,e);if(0===t)u.push({minValue:c[0],maxValue:c[0],label:o(c[0],c[0],i)});else{const n=function(e,t,n,i,r){let l=Math.max(i-e,t-i)/r/n;return l=l>=1?1:l>=.5?.5:.25,l}(f,d,a,e,t)*t;let l=0,s=f;for(let t=a;t>=1;t--){const a=r(e-(t-.5)*n,6);u.push({minValue:s,maxValue:a,label:o(s,a,i)}),s=a,l++}let c=r(e+.5*n,6);u.push({minValue:s,maxValue:c,label:o(s,c,i)}),s=c,l++;for(let t=1;t<=a;t++)c=l===2*a?d:r(e+(t+.5)*n,6),u.push({minValue:s,maxValue:c,label:o(s,c,i)}),s=c,l++}}else if("defined-interval"===n){if(!l)return u;const e=c[0],t=c[c.length-1],n=Math.ceil((t-e)/l);let a=e;for(let t=1;t<n;t++){const n=r(e+t*l,6);u.push({minValue:a,maxValue:n,label:o(a,n,i)}),a=n}u.push({minValue:a,maxValue:t,label:o(a,t,i)})}return u}function o(e,t,n){let i=null;return i=e===t?n&&"percent-of-total"===n?e+"%":e.toString():n&&"percent-of-total"===n?e+"% - "+t+"%":e+" - "+t,i}function s(e,t,n){const i=e.length,r=[];n>i&&(n=i);for(let e=0;e<n;e++)r.push(Math.round(e*i/n-1));r.push(i-1);let l=u(r,e,t,n);return function(e,t,n,i,r,l){let a=0,o=0,s=0,u=0,f=!0;for(let d=0;d<2&&f;d++){0===d&&(f=!1);for(let d=0;d<l-1;d++)for(;n[d+1]+1!==n[d+2];){n[d+1]=n[d+1]+1;const l=c(d,n,i,r);s=l.sbMean,a=l.sbSdcm;const p=c(d+1,n,i,r);if(u=p.sbMean,o=p.sbSdcm,!(a+o<t[d]+t[d+1])){n[d+1]=n[d+1]-1;break}t[d]=a,t[d+1]=o,e[d]=s,e[d+1]=u,f=!0}for(let d=l-1;d>0;d--)for(;n[d]!==n[d-1]+1;){n[d]=n[d]-1;const l=c(d-1,n,i,r);s=l.sbMean,a=l.sbSdcm;const p=c(d,n,i,r);if(u=p.sbMean,o=p.sbSdcm,!(a+o<t[d-1]+t[d])){n[d]=n[d]+1;break}t[d-1]=a,t[d]=o,e[d-1]=s,e[d]=u,f=!0}}return f}(l.mean,l.sdcm,r,e,t,n)&&(l=u(r,e,t,n)),r}function u(e,t,n,i){let r=[],l=[],a=[],o=0;const s=[],u=[];for(let r=0;r<i;r++){const i=c(r,e,t,n);s.push(i.sbMean),u.push(i.sbSdcm),o+=u[r]}let f,d=o,p=!0;for(;p||o<d;){p=!1,r=[];for(let t=0;t<i;t++)r.push(e[t]);for(let n=0;n<i;n++)for(let r=e[n]+1;r<=e[n+1];r++)if(f=t[r],n>0&&r!==e[n+1]&&Math.abs(f-s[n])>Math.abs(f-s[n-1]))e[n]=r;else if(n<i-1&&e[n]!==r-1&&Math.abs(f-s[n])>Math.abs(f-s[n+1])){e[n+1]=r-1;break}d=o,o=0,l=[],a=[];for(let r=0;r<i;r++){l.push(s[r]),a.push(u[r]);const i=c(r,e,t,n);s[r]=i.sbMean,u[r]=i.sbSdcm,o+=u[r]}}if(o>d){for(let t=0;t<i;t++)e[t]=r[t],s[t]=l[t],u[t]=a[t];o=d}return{mean:s,sdcm:u}}function c(e,t,n,r){let l=0,a=0;for(let i=t[e]+1;i<=t[e+1];i++){const e=r[i];l+=n[i]*e,a+=e}a<=0&&i.warn("Exception in Natural Breaks calculation");const o=l/a;let s=0;for(let i=t[e]+1;i<=t[e+1];i++)s+=r[i]*(n[i]-o)**2;return{sbMean:o,sbSdcm:s}}},24452:(e,t,n)=>{n.d(t,{DL:()=>I,F_:()=>_,G2:()=>M,H0:()=>h,Lq:()=>b,Qm:()=>S,S5:()=>m,XL:()=>g,eT:()=>w,fk:()=>T,i5:()=>y,oF:()=>C,wk:()=>p});var i=n(10278),r=n(622);const l="<Null>",a="equal-interval",o=1,s=5,u=10,c=/\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*/gi,f=new Set(["esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble"]),d=["min","max","avg","stddev","count","sum","variance","nullcount","median"];function p(e){return null==e||"string"==typeof e&&!e?l:e}function m(e){const t=null!=e.normalizationField||null!=e.normalizationType,n=null!=e.minValue||null!=e.maxValue,i=!!e.sqlExpression&&e.supportsSQLExpression;return!t&&!n&&!i}function h(e){const t=e.returnDistinct?[...new Set(e.values)]:e.values,n=t.filter((e=>null!=e)).sort(),i=n.length,r={count:i,min:n[0],max:n[i-1]};return e.supportsNullCount&&(r.nullcount=t.length-i),e.percentileParams&&(r.median=g(t,e.percentileParams)),r}function y(e){const{values:t,useSampleStdDev:n,supportsNullCount:i}=e;let r=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,a=null,o=null,s=null,u=null,c=0;const f=null==e.minValue?-1/0:e.minValue,d=null==e.maxValue?1/0:e.maxValue;for(const e of t)Number.isFinite(e)?e>=f&&e<=d&&(a=null===a?e:a+e,r=Math.min(r,e),l=Math.max(l,e),c++):"string"==typeof e&&c++;if(c&&null!=a){o=a/c;let e=0;for(const n of t)Number.isFinite(n)&&n>=f&&n<=d&&(e+=(n-o)**2);u=n?c>1?e/(c-1):0:c>0?e/c:0,s=Math.sqrt(u)}else r=null,l=null;const p={avg:o,count:c,max:l,min:r,stddev:s,sum:a,variance:u};return i&&(p.nullcount=t.length-c),e.percentileParams&&(p.median=g(t,e.percentileParams)),p}function g(e,t){const{fieldType:n,value:i,orderBy:r,isDiscrete:l}=t,a=b(n,"desc"===r);if(0===(e=[...e].filter((e=>null!=e)).sort(((e,t)=>a(e,t)))).length)return null;if(i<=0)return e[0];if(i>=1)return e[e.length-1];const o=(e.length-1)*i,s=Math.floor(o),u=s+1,c=o%1,f=e[s],d=e[u];return u>=e.length||l||"string"==typeof f||"string"==typeof d?f:f*(1-c)+d*c}function b(e,t){const n=t?1:-1,i=function(e){return e?(e,t)=>{const n=v(e,t,!0);return null!=n?n:t-e}:(e,t)=>{const n=v(e,t,!1);return null!=n?n:e-t}}(t),r=x(t);if(!e||!["esriFieldTypeDate","esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...f].includes(e))return(e,t)=>"number"==typeof e&&"number"==typeof t?i(e,t):"string"==typeof e&&"string"==typeof t?r(e,t):n;if("esriFieldTypeDate"===e)return(e,t)=>{const r=new Date(e).getTime(),l=new Date(t).getTime();return isNaN(r)||isNaN(l)?n:i(r,l)};if(f.has(e))return(e,t)=>i(e,t);if("esriFieldTypeString"===e)return(e,t)=>r(e,t);if("esriFieldTypeGUID"===e||"esriFieldTypeGlobalID"===e){const e=x(t);return(t,n)=>e(F(t),F(n))}return t?(e,t)=>1:(e,t)=>-1}function v(e,t,n){if(n){if(null==e)return null==t?0:1;if(null==t)return-1}else{if(null==e)return null==t?0:-1;if(null==t)return 1}return null}function x(e){return e?(e,t)=>{const n=v(e,t,!0);return null!=n?n:(e=e.toUpperCase())>(t=t.toUpperCase())?-1:e<t?1:0}:(e,t)=>{const n=v(e,t,!1);return null!=n?n:(e=e.toUpperCase())<(t=t.toUpperCase())?-1:e>t?1:0}}function F(e){return e.substr(24,12)+e.substr(19,4)+e.substr(16,2)+e.substr(14,2)+e.substr(11,2)+e.substr(9,2)+e.substr(6,2)+e.substr(4,2)+e.substr(2,2)+e.substr(0,2)}function _(e,t){let n;for(n in e)d.includes(n)&&(Number.isFinite(e[n])||(e[n]=null));return t?(["avg","stddev","variance"].forEach((t=>{null!=e[t]&&(e[t]=Math.ceil(e[t]??0))})),e):e}function w(e){const t={};for(let n of e)(null==n||"string"==typeof n&&""===n.trim())&&(n=null),null==t[n]?t[n]={count:1,data:n}:t[n].count++;return{count:t}}function V(e){return"coded-value"!==e?.type?[]:e.codedValues.map((e=>e.code))}function S(e,t,n,i){const r=e.count,l=[];if(n&&t){const e=[],n=V(t[0]);for(const r of n)if(t[1]){const n=V(t[1]);for(const l of n)if(t[2]){const n=V(t[2]);for(const t of n)e.push(`${p(r)}${i}${p(l)}${i}${p(t)}`)}else e.push(`${p(r)}${i}${p(l)}`)}else e.push(r);for(const t of e)r.hasOwnProperty(t)||(r[t]={data:t,count:0})}for(const e in r){const t=r[e];l.push({value:t.data,count:t.count,label:t.label})}return{uniqueValueInfos:l}}function T(e,t,n,i){let r=null;switch(t){case"log":0!==e&&(r=Math.log(e)*Math.LOG10E);break;case"percent-of-total":Number.isFinite(i)&&0!==i&&(r=e/i*100);break;case"field":Number.isFinite(n)&&0!==n&&(r=e/n);break;case"natural-log":e>0&&(r=Math.log(e));break;case"square-root":e>0&&(r=e**.5)}return r}function M(e,t){const n=N({field:t.field,normalizationType:t.normalizationType,normalizationField:t.normalizationField,classificationMethod:t.classificationMethod,standardDeviationInterval:t.standardDeviationInterval,breakCount:t.numClasses||s});return e=function(e,t,n){const i=t??-1/0,r=n??1/0;return e.filter((e=>Number.isFinite(e)&&e>=i&&e<=r))}(e,t.minValue,t.maxValue),(0,r.k)({definition:n,values:e,normalizationTotal:t.normalizationTotal})}function N(e){const{breakCount:t,field:n,normalizationField:r,normalizationType:l}=e,s=e.classificationMethod||a,u="standard-deviation"===s?e.standardDeviationInterval||o:void 0;return new i.Z({breakCount:t,classificationField:n,classificationMethod:s,normalizationField:"field"===l?r:void 0,normalizationType:l,standardDeviationInterval:u})}function I(e,t){let n=e.classBreaks;const i=n.length,r=n[0]?.minValue,l=n[i-1]?.maxValue,a="standard-deviation"===t,o=c;return n=n.map((e=>{const t=e.label,n={minValue:e.minValue,maxValue:e.maxValue,label:t};if(a&&t){const e=t.match(o),i=e?.map((e=>+e.trim()))??[];2===i.length?(n.minStdDev=i[0],n.maxStdDev=i[1],i[0]<0&&i[1]>0&&(n.hasAvg=!0)):1===i.length&&(t.includes("<")?(n.minStdDev=null,n.maxStdDev=i[0]):t.includes(">")&&(n.minStdDev=i[0],n.maxStdDev=null))}return n})),{minValue:r,maxValue:l,classBreakInfos:n,normalizationTotal:e.normalizationTotal}}function C(e,t){const n=z(e,t);if(null==n.min&&null==n.max)return{bins:[],minValue:n.min,maxValue:n.max,normalizationTotal:t.normalizationTotal};const i=n.intervals,r=n.min??0,l=n.max??0,a=i.map(((e,t)=>({minValue:i[t][0],maxValue:i[t][1],count:0})));for(const t of e)if(null!=t&&t>=r&&t<=l){const e=D(i,t);e>-1&&a[e].count++}return{bins:a,minValue:r,maxValue:l,normalizationTotal:t.normalizationTotal}}function z(e,t){const{field:n,classificationMethod:i,standardDeviationInterval:r,normalizationType:l,normalizationField:a,normalizationTotal:o,minValue:s,maxValue:c}=t,f=t.numBins||u;let d=null,p=null,h=null;if(i&&"equal-interval"!==i||l){const{classBreaks:t}=M(e,{field:n,normalizationType:l,normalizationField:a,normalizationTotal:o,classificationMethod:i,standardDeviationInterval:r,minValue:s,maxValue:c,numClasses:f});d=t[0].minValue,p=t[t.length-1].maxValue,h=t.map((e=>[e.minValue,e.maxValue]))}else{if(null!=s&&null!=c)d=s,p=c;else{const t=y({values:e,minValue:s,maxValue:c,useSampleStdDev:!l,supportsNullCount:m({normalizationType:l,normalizationField:a,minValue:s,maxValue:c})});d=t.min??null,p=t.max??null}h=function(e,t,n){const i=(t-e)/n,r=[];let l,a=e;for(let e=1;e<=n;e++)l=a+i,l=Number(l.toFixed(16)),r.push([a,e===n?t:l]),a=l;return r}(d??0,p??0,f)}return{min:d,max:p,intervals:h}}function D(e,t){let n=-1;for(let i=e.length-1;i>=0;i--)if(t>=e[i][0]){n=i;break}return n}},59266:(e,t,n)=>{n.d(t,{LC:()=>s,WW:()=>u,Yi:()=>c,mz:()=>d,pp:()=>f}),n(66577);var i=n(20102),r=n(92604),l=n(82971);const a=r.Z.getLogger("esri.support.arcadeOnDemand");let o;function s(){return o||(o=(async()=>{const e=await Promise.all([n.e(7126),n.e(8592),n.e(8732),n.e(8522),n.e(1804),n.e(304)]).then(n.bind(n,20304));return{arcade:e.arcade,arcadeUtils:e,Dictionary:e.Dictionary,Feature:e.arcadeFeature}})()),o}const u=(e,t,n)=>d.create(e,t,n,null,["$feature"],[]),c=(e,t,n)=>d.create(e,t,n,null,["$feature","$view"],[]),f=(e,t,n,i)=>d.create(e,t,n,i,["$feature","$view"],[]);class d{constructor(e,t,n,i,r,l,a){this.services=null,this.script=e,this.evaluate=i;const o=Array.isArray(l)?l:l.fields;this.fields=o,this._syntaxTree=n,this._arcade=t,this._arcadeFeature=r,this._spatialReference=a,this._referencesGeometry=t.scriptTouchesGeometry(this._syntaxTree),this._referencesScale=this._arcade.referencesMember(this._syntaxTree,"scale")}static async create(e,t,n,r,o,u){const{arcade:c,Feature:f,Dictionary:p}=await s(),m=l.Z.fromJSON(t);let h;try{h=c.parseScript(e,u)}catch(t){return a.error(new i.Z("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})),null}const y=o.reduce(((e,t)=>({...e,[t]:null})),{});let g=null;null!=r&&(g=new p(r),g.immutable=!0,y.$config=null);const b=c.scriptUsesGeometryEngine(h),v=b&&c.enableGeometrySupport(),x=c.scriptUsesFeatureSet(h)&&c.enableFeatureSetSupport(),F=c.scriptIsAsync(h),_=F&&c.enableAsyncSupport(),w={vars:y,spatialReference:m,useAsync:!!_};await Promise.all([v,x,_]);const V=new Set;await c.loadDependentModules(V,h,null,F,b);const S=new p;S.immutable=!1,S.setField("scale",0);const T=c.compileScript(h,w);return new d(e,c,h,((e,t)=>("$view"in e&&e.$view&&(S.setField("scale","object"==typeof e.$view&&"scale"in e.$view?e.$view.scale:void 0),e.$view=S),g&&(e.$config=g),T({vars:e,spatialReference:m,services:t}))),new f,n,m)}repurposeFeature(e){return e.geometry&&!e.geometry.spatialReference&&(e.geometry.spatialReference=this._spatialReference),this._arcadeFeature.repurposeFromGraphicLikeObject(e.geometry,e.attributes,{fields:this.fields}),this._arcadeFeature}referencesGeometry(){return this._referencesGeometry}referencesScale(){return this._referencesScale}}}}]);
|