@arcgis/core 5.2.0-next.30 → 5.2.0-next.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/WebDocument2D.js +1 -1
  2. package/WebScene.js +1 -1
  3. package/arcade/ArcadePortal.js +1 -1
  4. package/arcade/Attachment.js +1 -1
  5. package/arcade/Dictionary.js +1 -1
  6. package/arcade/Feature.js +1 -1
  7. package/arcade/arcadeAsyncRuntime.js +1 -1
  8. package/arcade/arcadeCompiler.js +1 -1
  9. package/arcade/arcadeRuntime.js +1 -1
  10. package/arcade/containerUtils.js +1 -1
  11. package/arcade/debug.js +1 -1
  12. package/arcade/deepClone.js +1 -1
  13. package/arcade/featureSetUtils.js +1 -1
  14. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  15. package/arcade/featureset/support/shared.js +1 -1
  16. package/arcade/functions/convertdirection.js +1 -1
  17. package/arcade/functions/date.js +1 -1
  18. package/arcade/functions/feature.js +1 -1
  19. package/arcade/functions/featuresetbase.js +1 -1
  20. package/arcade/functions/featuresetgeom.js +1 -1
  21. package/arcade/functions/featuresetstats.js +1 -1
  22. package/arcade/functions/featuresetstring.js +1 -1
  23. package/arcade/functions/geomasync.js +1 -1
  24. package/arcade/functions/geometry.js +1 -1
  25. package/arcade/functions/geomsync.js +1 -1
  26. package/arcade/functions/knowledgegraph.js +1 -1
  27. package/arcade/functions/maths.js +1 -1
  28. package/arcade/functions/stats.js +1 -1
  29. package/arcade/functions/string.js +1 -1
  30. package/arcade/geometry/constructors.js +1 -1
  31. package/arcade/geometry/functions.js +1 -1
  32. package/arcade/languageUtils.js +1 -1
  33. package/assets/esri/core/workers/RemoteClient.js +1 -1
  34. package/assets/esri/core/workers/chunks/{e5d2fab228d54b18a8a8.js → 08405116b5feb2d00101.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{774615303c1cc9a77e20.js → 11af659688cf963ea6cd.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{2665337e1b665e7e2b70.js → 15081b361fc42f40b865.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{bcb2092c87d8d21c6458.js → 197b9f8483fad2258650.js} +1 -1
  38. package/assets/esri/core/workers/chunks/1cd8dff4373494b01ad4.js +1 -0
  39. package/assets/esri/core/workers/chunks/1d92da90fbbc3f98b201.js +1 -0
  40. package/assets/esri/core/workers/chunks/210ffc448c73a7bf63aa.js +1 -0
  41. package/assets/esri/core/workers/chunks/{a14e5607c5c091c77e3d.js → 2540beb53f1443a070d7.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{689673173ca1c0e098fe.js → 25932fa010f9a32475c1.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{e2d500ac1a264d09c857.js → 32b5d2537feefe6e94a3.js} +1 -1
  44. package/assets/esri/core/workers/chunks/34a024eda22d228e1fbe.js +1 -0
  45. package/assets/esri/core/workers/chunks/3f63b14b53b5ca716e3a.js +1 -0
  46. package/assets/esri/core/workers/chunks/{6df54132299b9e8f6dad.js → 456b77b8f13933a75b68.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{3c342e662c13a05f4caf.js → 49713dfa4c8b788079d1.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{45e4b9069263adeae394.js → 49a45083a9a155614c1c.js} +1 -1
  49. package/assets/esri/core/workers/chunks/4be31fcc5482a2526d2b.js +1 -0
  50. package/assets/esri/core/workers/chunks/{31d92ba9089617aa59ab.js → 57c003c6745d450558a7.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{8104ac2eee69d79ada86.js → 6048c89fc4dcd2e9988d.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{1b9c68e8431bb4608209.js → 6162f6735ea4622e54d8.js} +1 -1
  53. package/assets/esri/core/workers/chunks/684c9b4bd9590d2db12f.js +1 -0
  54. package/assets/esri/core/workers/chunks/684d3cb4fb233180b2d0.js +1 -0
  55. package/assets/esri/core/workers/chunks/{fe6385115d76e16e8da0.js → 75baf6dff6e7658b17b3.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{166a0df6e37627e18976.js → 7a2dfa42610fe8414ed7.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{43847d66726fd0bcbbb7.js → 83ae56c7fa8d84865605.js} +1 -1
  58. package/assets/esri/core/workers/chunks/8722e2790272e90a1897.js +1 -0
  59. package/assets/esri/core/workers/chunks/{1282598516cd0e3056b7.js → 977e6f589bd266d6067d.js} +2 -2
  60. package/assets/esri/core/workers/chunks/9f3d37e5f42bf1529673.js +1 -0
  61. package/assets/esri/core/workers/chunks/a833fc9250635eb4152f.js +1 -0
  62. package/assets/esri/core/workers/chunks/{47290f27375c76bcc9c7.js → b0253fe7b3529bc22270.js} +1 -1
  63. package/assets/esri/core/workers/chunks/b324bdb9c74fc3f956db.js +1 -0
  64. package/assets/esri/core/workers/chunks/{1bd7b7f4ee7ea6cb7ef9.js → b60f24a6c777301803f4.js} +1 -1
  65. package/assets/esri/core/workers/chunks/bd155794e9bc16dd0474.js +1 -0
  66. package/assets/esri/core/workers/chunks/{906f4c0fa8135e6c2f03.js → c660a5a1086870a3a6b9.js} +1 -1
  67. package/assets/esri/core/workers/chunks/cb58aff1ff186fa18345.js +1 -0
  68. package/assets/esri/core/workers/chunks/{17b98787a0698f584882.js → e7cb1b72f0b54e845741.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{21122f3f3e19a7fd7d33.js → f69d3ff8a69c1985bca3.js} +1 -1
  70. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  71. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  72. package/chunks/ShadowCastVisualize.glsl.js +4 -10
  73. package/chunks/aiServices.js +1 -1
  74. package/chunks/array.js +1 -1
  75. package/chunks/languageUtils.js +1 -1
  76. package/chunks/lyr3DMain.js +1 -1
  77. package/config.js +1 -1
  78. package/core/has.js +1 -1
  79. package/graphic/AnnotationFeatureGraphicOrigin.d.ts +3 -3
  80. package/graphic/AnnotationFeatureGraphicOrigin.js +1 -1
  81. package/intl/messages.d.ts +12 -2
  82. package/intl/t9n.d.ts +8 -1
  83. package/intl.d.ts +4 -0
  84. package/kernel.js +1 -1
  85. package/layers/AnnotationFeatureLayer.d.ts +1 -4
  86. package/layers/AnnotationFeatureLayer.js +1 -1
  87. package/layers/DimensionFeatureLayer.js +1 -1
  88. package/layers/VoxelWasmPerSceneView.js +1 -1
  89. package/layers/mixins/DataElementMixin.js +2 -0
  90. package/layers/support/AnnotationFeatureSublayer.js +1 -1
  91. package/layers/support/parquetUtils.js +1 -1
  92. package/package.json +1 -1
  93. package/support/ArcadeExpression.js +1 -1
  94. package/support/arcadeUtils.js +1 -1
  95. package/support/revision.js +1 -1
  96. package/symbols/cim/supportUtils.js +2 -0
  97. package/views/2d/engine/webgl/util/DimensionMatcher.js +1 -1
  98. package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
  99. package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
  100. package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
  101. package/views/2d/layers/support/annodime/annotationSchema.js +1 -1
  102. package/views/2d/layers/support/annodime/dimensionSchema.js +1 -1
  103. package/views/2d/layers/support/annodime/utils.js +1 -1
  104. package/views/2d/layers/support/annodime/virtualFields.js +1 -1
  105. package/views/3d/camera/constraintUtils.js +1 -1
  106. package/views/3d/state/ConstraintsManager.js +1 -1
  107. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  108. package/views/3d/terrain/PatchRenderData.js +1 -1
  109. package/views/3d/terrain/PatchRenderDataWaterproofness.js +2 -0
  110. package/views/3d/terrain/PlanarPatch.js +1 -1
  111. package/views/3d/terrain/SphericalPatch.js +1 -1
  112. package/views/3d/terrain/TileRenderer.js +1 -1
  113. package/views/3d/webgl-engine/effects/OpaqueEnvironment.js +1 -1
  114. package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
  115. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  116. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMask.js +1 -1
  117. package/views/3d/webgl-engine/effects/geometry/ObjectAndLayerID.js +1 -1
  118. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  119. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  120. package/views/3d/webgl-engine/effects/highlight/ShadowHighlightBuffer.js +1 -1
  121. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  122. package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
  123. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  124. package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
  125. package/views/3d/webgl-engine/effects/stars/StarsTechnique.js +1 -1
  126. package/views/3d/webgl-engine/lib/CutFillComputation.js +1 -1
  127. package/views/3d/webgl-engine/lib/GaussianSplatRenderer.js +1 -1
  128. package/views/3d/webgl-engine/lib/GaussianSplatShadows.js +1 -1
  129. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  130. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  131. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
  132. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  133. package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
  134. package/views/3d/webgl.js +1 -1
  135. package/views/PopupView.js +1 -1
  136. package/views/layers/FeatureLikeLayerView.js +1 -1
  137. package/views/popupAdapter.js +1 -1
  138. package/webdoc/support/thumbnailUtils.js +1 -1
  139. package/webdoc/support/webdocSaveUtils.js +1 -1
  140. package/widgets/support/widget.d.ts +1 -0
  141. package/assets/esri/core/workers/chunks/125edba5c618c6257cb8.js +0 -1
  142. package/assets/esri/core/workers/chunks/168be2eac0fa3c67ae27.js +0 -1
  143. package/assets/esri/core/workers/chunks/32740b075d7a890d7888.js +0 -1
  144. package/assets/esri/core/workers/chunks/5189413a83faf3480e29.js +0 -1
  145. package/assets/esri/core/workers/chunks/a2be8784f2cfdbb42681.js +0 -1
  146. package/assets/esri/core/workers/chunks/a9db775210ebeee41738.js +0 -1
  147. package/assets/esri/core/workers/chunks/bca6abc185dedec0f41b.js +0 -1
  148. package/assets/esri/core/workers/chunks/bee56a6ac99312f03109.js +0 -1
  149. package/assets/esri/core/workers/chunks/d1d135a54233092ad637.js +0 -1
  150. package/assets/esri/core/workers/chunks/d750e4abeb777caa8c36.js +0 -1
  151. package/assets/esri/core/workers/chunks/daf539e9f88fc9e101e4.js +0 -1
  152. package/assets/esri/core/workers/chunks/e774303efefee31952d0.js +0 -1
  153. package/assets/esri/core/workers/chunks/e8546ab510fc9515bd23.js +0 -1
  154. package/assets/esri/core/workers/chunks/fc9664d3282b052ef40f.js +0 -1
  155. package/views/2d/layers/support/annodime/DimensionMatcherSchema.js +0 -2
  156. package/views/2d/layers/support/annodime/unsupported.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import has from"../../../../core/has.js";import{clamp as t,lerp as e,acosClamped as s}from"../../../../core/mathUtils.js";import{releaseMaybe as i}from"../../../../core/maybe.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{translate as r,multiply as h,invert as c,lookAt as o}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as n,create as u}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as l,add as m,scale as d,lerp as _,squaredDistance as g,subtract as f,dot as p,negate as x,normalize as b,copy as w}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as M}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{exactEquals as C,copy as j,negate as y,transformMat4 as v,set as H}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as D}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{set as O,transformMat4 as Q}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{create as L}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{CascadeCamera as S}from"./CascadeCamera.js";import{applyTextureResizeModulo as V}from"./textureUtils.js";import{assert as T,logWithBase as N,verify as F,rayRay2D as R}from"./Util.js";import{DepthStencilAttachment as W}from"../../../webgl/enums.js";class z{constructor(){this.camera=new S,this.lightMat=u()}}class A{constructor(){this.maxNumCascadesHighQuality=4,this.maxNumCascadesLowQuality=4,this.textureSizeModHighQuality=1.3,this.textureSizeModLowQuality=.9,this.splitSchemeLambda=0}}class E{constructor(t,e){this._fbos=t,this._viewingMode=e,this._enabled=!1,this._outputs=new Array,this._textureHeight=0,this._numCascades=1,this.settings=new A,this._projectionView=u(),this._projectionViewInverse=u(),this._modelViewLight=u(),this._cascadeDistances=[0,0,0,0,0],this._usedCascadeDistances=L(),this._cascades=[new z,new z,new z,new z],this._lastOrigin=null,this._maxTextureWidth=Math.min(has("esri-mobile")?4096:16384,t.rctx.parameters.maxTextureSize)}dispose(){this.enabled=!1}disposeOutputs(){this._handle=i(this._handle),this._outputs.forEach(t=>t?.release()),this._outputs.length=0}disposeOutput(t){this._outputs[t]=i(this._outputs[t])}set maxCascades(e){this.settings.maxNumCascadesHighQuality=t(Math.floor(e),1,4)}get maxCascades(){return this.settings.maxNumCascadesHighQuality}set enabled(t){this._enabled=t,t||this.disposeOutputs()}get enabled(){return this._enabled}get ready(){return!!this.getOutput(5)||!!this.getOutput(7)}get renderTarget(){return this._handle}get cascades(){for(let t=0;t<this._numCascades;++t)X[t]=this._cascades[t];return X.length=this._numCascades,X}start(t,e,s,i,a){T(this.enabled);const{near:r,far:h}=xt(s);this._computeCascadeDistances(r,h,i),this._textureHeight=this._computeTextureHeight(t,a,i),this._setupMatrices(t,e);for(let c=0;c<this._numCascades;++c)this._constructCascade(c,t,e);this._lastOrigin=null,this.clear()}getShadowMapMatrices(t){if(!this._lastOrigin||!C(t,this._lastOrigin)){this._lastOrigin=this._lastOrigin||D(),j(this._lastOrigin,t);for(let e=0;e<this._numCascades;++e){r(Z,this._cascades[e].lightMat,t);for(let t=0;t<16;++t)$[16*e+t]=Z[t]}}return $}finish(t){T(this.enabled),this._outputs[t]?.release(),this._outputs[t]=this._handle,this._handle?.setName(6===t?"shadow map highlight":"shadow map excluding highlight"),this._handle=null}getOutput(t){return this.enabled?this._outputs[t]?.getTexture(W):null}clear(){this._ensureFbo(),this.bindFramebuffer(),this._fbos.rctx.clear(256)}_computeTextureHeight({pixelRatio:t,fullWidth:e,fullHeight:s},i,a){const r=Math.min(window.devicePixelRatio,i)/t,h=a?this.settings.textureSizeModHighQuality:this.settings.textureSizeModLowQuality;return V(Math.max(e,s)*r*h,this._maxTextureWidth/this._numCascades)}_ensureFbo(){this._handle?.fbo?.width===this._textureWidth&&this._handle?.fbo.height===this._textureHeight||(this._handle?.release(),this._handle=this._fbos.acquire(this._textureWidth,this._textureHeight,"shadow map",13),this._handle.getTexture(W)?.setShadowFiltering(!0))}bindFramebuffer(){this._fbos.rctx.bindFramebuffer(this._handle?.fbo)}_constructCascade(t,e,s){const{viewMatrix:i,projectionMatrix:a,relativeElevation:c}=e,o=this._cascades[t],n=-this._cascadeDistances[t],u=-this._cascadeDistances[t+1],l=(a[10]*n+a[14])/Math.abs(a[11]*n+a[15]),m=(a[10]*u+a[14])/Math.abs(a[11]*u+a[15]);T(l<m);for(let r=0;r<8;++r){O(U,r%4==0||r%4==3?-1:1,r%4==0||r%4==1?-1:1,r<4?l:m,1);const t=q[r];Q(t,U,this._projectionViewInverse),t[0]/=t[3],t[1]/=t[3],t[2]/=t[3]}y(K,q[0]),o.camera.viewMatrix=r(I,this._modelViewLight,K);for(let r=0;r<8;++r)v(q[r],q[r],o.camera.viewMatrix);let d=q[0][2],_=q[0][2];for(let r=1;r<8;++r)d=Math.min(d,q[r][2]),_=Math.max(_,q[r][2]);d-=200,_+=200,o.camera.near=-_,o.camera.far=-d,o.camera.relativeElevation=c,pt(i,s,d,_,o.camera),h(o.lightMat,o.camera.projectionMatrix,o.camera.viewMatrix);const g=this._textureHeight;o.camera.viewport=[t*g,0,g,g]}_setupMatrices(t,e){h(this._projectionView,t.projectionMatrix,t.viewMatrix),c(this._projectionViewInverse,this._projectionView);const s=1===this._viewingMode?t.eye:H(K,0,0,1);o(this._modelViewLight,[0,0,0],[-e[0],-e[1],-e[2]],s)}_computeCascadeDistances(t,s,i){const a=i?this.settings.maxNumCascadesHighQuality:this.settings.maxNumCascadesLowQuality;this._numCascades=Math.min(1+Math.floor(N(s/t,4)),a);const r=(s-t)/this._numCascades,h=(s/t)**(1/this._numCascades);let c=t,o=t;for(let n=0;n<this._numCascades+1;++n)this._cascadeDistances[n]=e(c,o,this.settings.splitSchemeLambda),c*=h,o+=r}get _textureWidth(){return this._textureHeight*this._numCascades}get numCascades(){return this._numCascades}get cascadeDistances(){return O(this._usedCascadeDistances,this._cascadeDistances[0],this._numCascades>1?this._cascadeDistances[1]:1/0,this._numCascades>2?this._cascadeDistances[2]:1/0,this._numCascades>3?this._cascadeDistances[3]:1/0)}get test(){}}const I=u(),U=L(),q=[];for(let bt=0;bt<8;++bt)q.push(L());const P=M(),k=M(),B=M(),G=M(),J=M(),K=D(),X=[];function Y(){X.length=0}const Z=u(),$=n.concat(n,n,n),tt=M(),et=M(),st=[M(),M(),M(),M()],it=M(),at=M(),rt=M(),ht=M(),ct=M(),ot=M(),nt=M();function ut(t,e,s,i,a,r,h,c){l(tt,0,0);for(let l=0;l<4;++l)m(tt,tt,t[l]);d(tt,tt,.25),l(et,0,0);for(let l=4;l<8;++l)m(et,et,t[l]);d(et,et,.25),_(st[0],t[4],t[5],.5),_(st[1],t[5],t[6],.5),_(st[2],t[6],t[7],.5),_(st[3],t[7],t[4],.5);let o=0,n=g(st[0],tt);for(let l=1;l<4;++l){const t=g(st[l],tt);t<n&&(n=t,o=l)}f(it,st[o],t[o+4]);const u=it[0];let M,C;it[0]=-it[1],it[1]=u,f(at,et,tt),p(at,it)<0&&x(it,it),_(it,it,at,s),b(it,it),M=C=p(f(rt,t[0],tt),it);for(let l=1;l<8;++l){const e=p(f(rt,t[l],tt),it);e<M?M=e:e>C&&(C=e)}w(i,tt),d(rt,it,M-e),m(i,i,rt);let j=-1,y=1,v=0,H=0;for(let l=0;l<8;++l){f(ht,t[l],i),b(ht,ht);const e=it[0]*ht[1]-it[1]*ht[0];e>0?e>j&&(j=e,v=l):e<y&&(y=e,H=l)}F(j>0,"leftArea"),F(y<0,"rightArea"),d(ct,it,M),m(ct,ct,tt),d(ot,it,C),m(ot,ot,tt),nt[0]=-it[1],nt[1]=it[0];const D=R(i,t[H],ot,m(rt,ot,nt),1,a),O=R(i,t[v],ot,rt,1,r),Q=R(i,t[v],ct,m(rt,ct,nt),1,h),L=R(i,t[H],ct,rt,1,c);F(D,"rayRay"),F(O,"rayRay"),F(Q,"rayRay"),F(L,"rayRay")}function lt(t,e){return 3*e+t}const mt=M();function dt(t,e){return l(mt,t[e],t[e+3]),mt}const _t=M(),gt=a();function ft(t,e,s,i,a){f(_t,s,i),d(_t,_t,.5),gt[0]=_t[0],gt[1]=_t[1],gt[2]=0,gt[3]=_t[1],gt[4]=-_t[0],gt[5]=0,gt[6]=_t[0]*_t[0]+_t[1]*_t[1],gt[7]=_t[0]*_t[1]-_t[1]*_t[0],gt[8]=1,gt[lt(0,2)]=-p(dt(gt,0),t),gt[lt(1,2)]=-p(dt(gt,1),t);let r=p(dt(gt,0),s)+gt[lt(0,2)],h=p(dt(gt,1),s)+gt[lt(1,2)],c=p(dt(gt,0),i)+gt[lt(0,2)],o=p(dt(gt,1),i)+gt[lt(1,2)];r=-(r+c)/(h+o),gt[lt(0,0)]+=gt[lt(1,0)]*r,gt[lt(0,1)]+=gt[lt(1,1)]*r,gt[lt(0,2)]+=gt[lt(1,2)]*r,r=1/(p(dt(gt,0),s)+gt[lt(0,2)]),h=1/(p(dt(gt,1),s)+gt[lt(1,2)]),gt[lt(0,0)]*=r,gt[lt(0,1)]*=r,gt[lt(0,2)]*=r,gt[lt(1,0)]*=h,gt[lt(1,1)]*=h,gt[lt(1,2)]*=h,gt[lt(2,0)]=gt[lt(1,0)],gt[lt(2,1)]=gt[lt(1,1)],gt[lt(2,2)]=gt[lt(1,2)],gt[lt(1,2)]+=1,r=p(dt(gt,1),e)+gt[lt(1,2)],h=p(dt(gt,2),e)+gt[lt(2,2)],c=p(dt(gt,1),s)+gt[lt(1,2)],o=p(dt(gt,2),s)+gt[lt(2,2)],r=-.5*(r/h+c/o),gt[lt(1,0)]+=gt[lt(2,0)]*r,gt[lt(1,1)]+=gt[lt(2,1)]*r,gt[lt(1,2)]+=gt[lt(2,2)]*r,r=p(dt(gt,1),e)+gt[lt(1,2)],h=p(dt(gt,2),e)+gt[lt(2,2)],c=-h/r,gt[lt(1,0)]*=c,gt[lt(1,1)]*=c,gt[lt(1,2)]*=c,a[0]=gt[0],a[1]=gt[1],a[2]=0,a[3]=gt[2],a[4]=gt[3],a[5]=gt[4],a[6]=0,a[7]=gt[5],a[8]=0,a[9]=0,a[10]=1,a[11]=0,a[12]=gt[6],a[13]=gt[7],a[14]=0,a[15]=gt[8]}function pt(t,e,i,a,r){const h=1/q[0][3],c=1/q[4][3];T(h<c);let o=h+Math.sqrt(h*c);const n=Math.sin(s(t[2]*e[0]+t[6]*e[1]+t[10]*e[2]));o/=n,ut(q,o,n,P,k,B,G,J),ft(P,k,G,J,r.projectionMatrix),r.projectionMatrix[10]=2/(i-a),r.projectionMatrix[14]=-(i+a)/(i-a)}function xt(t){let{near:e,far:s}=t;return e<2&&(e=2),s<2&&(s=2),e>=s&&(e=2,s=4),{near:e,far:s}}export{E as ShadowMap,Y as cleanupShadowmap};
2
+ import has from"../../../../core/has.js";import{clamp as t,lerp as s,acosClamped as e}from"../../../../core/mathUtils.js";import{releaseMaybe as i}from"../../../../core/maybe.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{translate as r,multiply as h,invert as c,lookAt as o}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{IDENTITY as n,create as l}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as m,add as u,scale as d,lerp as _,squaredDistance as g,subtract as f,dot as p,negate as x,normalize as b,copy as w}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as M}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{exactEquals as C,copy as j,negate as y,transformMat4 as v,set as D}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as O}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{set as H,transformMat4 as Q}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{create as S}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{InternalRenderCategory as L}from"../../webgl.js";import{CascadeCamera as V}from"./CascadeCamera.js";import{applyTextureResizeModulo as T}from"./textureUtils.js";import{assert as N,logWithBase as F,verify as R,rayRay2D as z}from"./Util.js";import{DepthStencilAttachment as A}from"../../../webgl/enums.js";class W{constructor(){this.camera=new V,this.lightMat=l()}}class E{constructor(){this.maxNumCascadesHighQuality=4,this.maxNumCascadesLowQuality=4,this.textureSizeModHighQuality=1.3,this.textureSizeModLowQuality=.9,this.splitSchemeLambda=0}}class I{constructor(t,s){this._fbos=t,this._viewingMode=s,this._enabled=!1,this._outputs=new Array,this._height=0,this._numCascades=1,this.settings=new E,this._projectionView=l(),this._projectionViewInverse=l(),this._modelViewLight=l(),this._cascadeDistances=[0,0,0,0,0],this._usedCascadeDistances=S(),this._cascades=[new W,new W,new W,new W],this._lastOrigin=null,this._maxTextureWidth=Math.min(has("esri-mobile")?4096:16384,t.rctx.parameters.maxTextureSize)}dispose(){this.enabled=!1}disposeOutputs(){this._handle=i(this._handle),this._outputs.forEach(t=>t?.release()),this._outputs.length=0}disposeOutput(t){this._outputs[t]=i(this._outputs[t])}set maxCascades(s){this.settings.maxNumCascadesHighQuality=t(Math.floor(s),1,4)}get maxCascades(){return this.settings.maxNumCascadesHighQuality}set enabled(t){this._enabled=t,t||this.disposeOutputs()}get enabled(){return this._enabled}get ready(){return!!this.getOutput(5)||!!this.getOutput(7)}get renderTarget(){return this._handle}get cascades(){for(let t=0;t<this._numCascades;++t)Y[t]=this._cascades[t];return Y.length=this._numCascades,Y}start(t,s,e,i,a){N(this.enabled);const{near:r,far:h}=bt(e);this._computeCascadeDistances(r,h,i),this._height=this._computeTextureHeight(t,a,i),this._setupMatrices(t,s);for(let c=0;c<this._numCascades;++c)this._constructCascade(c,t,s);this._lastOrigin=null,this.clear()}getShadowMapMatrices(t){if(!this._lastOrigin||!C(t,this._lastOrigin)){this._lastOrigin=this._lastOrigin||O(),j(this._lastOrigin,t);for(let s=0;s<this._numCascades;++s){r($,this._cascades[s].lightMat,t);for(let t=0;t<16;++t)tt[16*s+t]=$[t]}}return tt}finish(t){N(this.enabled),this._outputs[t]?.release(),this._outputs[t]=this._handle,this._handle?.setName(6===t?"shadow map highlight":"shadow map excluding highlight"),this._handle=null}getOutput(t){return this.enabled?this._outputs[t]?.getTexture(A):null}clear(){this._ensureFbo(),this.bindFramebuffer(),this._fbos.rctx.clear(256)}_computeTextureHeight({pixelRatio:t,fullWidth:s,fullHeight:e},i,a){const r=Math.min(window.devicePixelRatio,i)/t,h=a?this.settings.textureSizeModHighQuality:this.settings.textureSizeModLowQuality;return T(Math.max(s,e)*r*h,this._maxTextureWidth/this._numCascades)}_ensureFbo(){this._handle?.fbo?.width===this._width&&this._handle?.fbo.height===this._height||(this._handle?.release(),this._handle=this._fbos.acquire(this._width,this._height,L.SHADOWMAP,13),this._handle.getTexture(A)?.setShadowFiltering(!0))}bindFramebuffer(){this._fbos.rctx.bindFramebuffer(this._handle?.fbo)}_constructCascade(t,s,e){const{viewMatrix:i,projectionMatrix:a,relativeElevation:c}=s,o=this._cascades[t],n=-this._cascadeDistances[t],l=-this._cascadeDistances[t+1],m=(a[10]*n+a[14])/Math.abs(a[11]*n+a[15]),u=(a[10]*l+a[14])/Math.abs(a[11]*l+a[15]);N(m<u);for(let r=0;r<8;++r){H(q,r%4==0||r%4==3?-1:1,r%4==0||r%4==1?-1:1,r<4?m:u,1);const t=P[r];Q(t,q,this._projectionViewInverse),t[0]/=t[3],t[1]/=t[3],t[2]/=t[3]}y(X,P[0]),o.camera.viewMatrix=r(U,this._modelViewLight,X);for(let r=0;r<8;++r)v(P[r],P[r],o.camera.viewMatrix);let d=P[0][2],_=P[0][2];for(let r=1;r<8;++r)d=Math.min(d,P[r][2]),_=Math.max(_,P[r][2]);d-=200,_+=200,o.camera.near=-_,o.camera.far=-d,o.camera.relativeElevation=c,xt(i,e,d,_,o.camera),h(o.lightMat,o.camera.projectionMatrix,o.camera.viewMatrix);const g=this._height;o.camera.viewport=[t*g,0,g,g]}_setupMatrices(t,s){h(this._projectionView,t.projectionMatrix,t.viewMatrix),c(this._projectionViewInverse,this._projectionView);const e=1===this._viewingMode?t.eye:D(X,0,0,1);o(this._modelViewLight,[0,0,0],[-s[0],-s[1],-s[2]],e)}_computeCascadeDistances(t,e,i){const a=i?this.settings.maxNumCascadesHighQuality:this.settings.maxNumCascadesLowQuality;this._numCascades=Math.min(1+Math.floor(F(e/t,4)),a);const r=(e-t)/this._numCascades,h=(e/t)**(1/this._numCascades);let c=t,o=t;for(let n=0;n<this._numCascades+1;++n)this._cascadeDistances[n]=s(c,o,this.settings.splitSchemeLambda),c*=h,o+=r}get _width(){return this._height*this._numCascades}get numCascades(){return this._numCascades}get cascadeDistances(){return H(this._usedCascadeDistances,this._cascadeDistances[0],this._numCascades>1?this._cascadeDistances[1]:1/0,this._numCascades>2?this._cascadeDistances[2]:1/0,this._numCascades>3?this._cascadeDistances[3]:1/0)}get test(){}}const U=l(),q=S(),P=[];for(let wt=0;wt<8;++wt)P.push(S());const k=M(),B=M(),G=M(),J=M(),K=M(),X=O(),Y=[];function Z(){Y.length=0}const $=l(),tt=n.concat(n,n,n),st=M(),et=M(),it=[M(),M(),M(),M()],at=M(),rt=M(),ht=M(),ct=M(),ot=M(),nt=M(),lt=M();function mt(t,s,e,i,a,r,h,c){m(st,0,0);for(let m=0;m<4;++m)u(st,st,t[m]);d(st,st,.25),m(et,0,0);for(let m=4;m<8;++m)u(et,et,t[m]);d(et,et,.25),_(it[0],t[4],t[5],.5),_(it[1],t[5],t[6],.5),_(it[2],t[6],t[7],.5),_(it[3],t[7],t[4],.5);let o=0,n=g(it[0],st);for(let m=1;m<4;++m){const t=g(it[m],st);t<n&&(n=t,o=m)}f(at,it[o],t[o+4]);const l=at[0];let M,C;at[0]=-at[1],at[1]=l,f(rt,et,st),p(rt,at)<0&&x(at,at),_(at,at,rt,e),b(at,at),M=C=p(f(ht,t[0],st),at);for(let m=1;m<8;++m){const s=p(f(ht,t[m],st),at);s<M?M=s:s>C&&(C=s)}w(i,st),d(ht,at,M-s),u(i,i,ht);let j=-1,y=1,v=0,D=0;for(let m=0;m<8;++m){f(ct,t[m],i),b(ct,ct);const s=at[0]*ct[1]-at[1]*ct[0];s>0?s>j&&(j=s,v=m):s<y&&(y=s,D=m)}R(j>0,"leftArea"),R(y<0,"rightArea"),d(ot,at,M),u(ot,ot,st),d(nt,at,C),u(nt,nt,st),lt[0]=-at[1],lt[1]=at[0];const O=z(i,t[D],nt,u(ht,nt,lt),1,a),H=z(i,t[v],nt,ht,1,r),Q=z(i,t[v],ot,u(ht,ot,lt),1,h),S=z(i,t[D],ot,ht,1,c);R(O,"rayRay"),R(H,"rayRay"),R(Q,"rayRay"),R(S,"rayRay")}function ut(t,s){return 3*s+t}const dt=M();function _t(t,s){return m(dt,t[s],t[s+3]),dt}const gt=M(),ft=a();function pt(t,s,e,i,a){f(gt,e,i),d(gt,gt,.5),ft[0]=gt[0],ft[1]=gt[1],ft[2]=0,ft[3]=gt[1],ft[4]=-gt[0],ft[5]=0,ft[6]=gt[0]*gt[0]+gt[1]*gt[1],ft[7]=gt[0]*gt[1]-gt[1]*gt[0],ft[8]=1,ft[ut(0,2)]=-p(_t(ft,0),t),ft[ut(1,2)]=-p(_t(ft,1),t);let r=p(_t(ft,0),e)+ft[ut(0,2)],h=p(_t(ft,1),e)+ft[ut(1,2)],c=p(_t(ft,0),i)+ft[ut(0,2)],o=p(_t(ft,1),i)+ft[ut(1,2)];r=-(r+c)/(h+o),ft[ut(0,0)]+=ft[ut(1,0)]*r,ft[ut(0,1)]+=ft[ut(1,1)]*r,ft[ut(0,2)]+=ft[ut(1,2)]*r,r=1/(p(_t(ft,0),e)+ft[ut(0,2)]),h=1/(p(_t(ft,1),e)+ft[ut(1,2)]),ft[ut(0,0)]*=r,ft[ut(0,1)]*=r,ft[ut(0,2)]*=r,ft[ut(1,0)]*=h,ft[ut(1,1)]*=h,ft[ut(1,2)]*=h,ft[ut(2,0)]=ft[ut(1,0)],ft[ut(2,1)]=ft[ut(1,1)],ft[ut(2,2)]=ft[ut(1,2)],ft[ut(1,2)]+=1,r=p(_t(ft,1),s)+ft[ut(1,2)],h=p(_t(ft,2),s)+ft[ut(2,2)],c=p(_t(ft,1),e)+ft[ut(1,2)],o=p(_t(ft,2),e)+ft[ut(2,2)],r=-.5*(r/h+c/o),ft[ut(1,0)]+=ft[ut(2,0)]*r,ft[ut(1,1)]+=ft[ut(2,1)]*r,ft[ut(1,2)]+=ft[ut(2,2)]*r,r=p(_t(ft,1),s)+ft[ut(1,2)],h=p(_t(ft,2),s)+ft[ut(2,2)],c=-h/r,ft[ut(1,0)]*=c,ft[ut(1,1)]*=c,ft[ut(1,2)]*=c,a[0]=ft[0],a[1]=ft[1],a[2]=0,a[3]=ft[2],a[4]=ft[3],a[5]=ft[4],a[6]=0,a[7]=ft[5],a[8]=0,a[9]=0,a[10]=1,a[11]=0,a[12]=ft[6],a[13]=ft[7],a[14]=0,a[15]=ft[8]}function xt(t,s,i,a,r){const h=1/P[0][3],c=1/P[4][3];N(h<c);let o=h+Math.sqrt(h*c);const n=Math.sin(e(t[2]*s[0]+t[6]*s[1]+t[10]*s[2]));o/=n,mt(P,o,n,k,B,G,J,K),pt(k,B,J,K,r.projectionMatrix),r.projectionMatrix[10]=2/(i-a),r.projectionMatrix[14]=-(i+a)/(i-a)}function bt(t){let{near:s,far:e}=t;return s<2&&(s=2),e<2&&(e=2),s>=e&&(s=2,e=4),{near:s,far:e}}export{I as ShadowMap,Z as cleanupShadowmap};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{disposeMaybe as t}from"../../../../core/maybe.js";import{recordPerformance as e}from"../../../../core/performance.js";import i from"../../../../core/PerformanceSampler.js";import{Milliseconds as r}from"../../../../core/time.js";import{RenderNodeOutput as a,InternalRenderCategory as s}from"../../webgl.js";import{createElapsedTimerPool as m}from"../../../webgl/TimerPool.js";const o={OVERLAY:"overlay",PREPARE:"prepare",SHADOW_MAP:"shadow map",DEPTH:"depth",ACCUMULATED_SHADOWS:"accumulated shadows",APPLY_ACCUMULATED_SHADOWS:"apply accumulated shadows",OBJECT_AND_LAYER_ID_COLOR:"object/layer id color",NORMALS:"normals",AMBIENT_ILLUMINATION:"ambient illumination",AMBIENT_ILLUMINATION_HIGH_QUALITY:"ambient illumination high quality",HIGHLIGHTS:"highlights",OPAQUE_EDGES:"opaque edges",TRANSPARENT:"transparent",TRANSPARENT_EDGES:"transparent edges",TRANSPARENT_MATERIAL_WITHOUT_DEPTH:"transparent material without depth",OPAQUE_ENVIRONMENT:"opaque environment",TRANSPARENT_ENVIRONMENT:"transparent environment",OCCLUDED:"occluded",HUD:"HUD",HUD_OCCLUDED:"HUD occluded",FINISH:"finish",FOCUS_AREA_MASK:"focus area mask"},l=Object.values(a).concat(Object.values(s)).concat(Object.values(o)),p="Total";class T{constructor(t){this._rctx=t,this._startTimeStampCPU=r(0),this._lastTimeStampCPU=r(0),this._totalCPUTime=new i(p),this._cpuTimeSamplers=new Map(l.map(t=>[t,new i(t)])),this._enableGPUTimer=0,this._totalGPUTime=new i("GPU"),this._gpuTimeSamplers=new Map(l.map(t=>[t,new i(t)])),this._totalTime=r(0),this._totalFrameCount=0}get totalCPUTimeSampler(){return this._totalCPUTime}get cpuTimeSamplers(){return Array.from(this._cpuTimeSamplers.values())}get totalGPUTimeSampler(){return this._totalGPUTime}get gpuTimeSamplers(){return Array.from(this._gpuTimeSamplers.values())}get gpuSamplingEnabled(){return null!=this._gpuTimerPool}get totalTime(){return this._totalTime}get totalFrameCount(){return this._totalFrameCount}get elapsedTime(){return r(performance.now()-this._startTimeStampCPU)}enableGPUPerformanceInfo(){if(null==this._gpuTimerPool){const t=[...l,p];this._gpuTimerPool=m(this._rctx,t)}if(null==this._gpuTimerPool)return{hasGPUTimerSupport:!1,remove:()=>{}};++this._enableGPUTimer;let e=!1;return{hasGPUTimerSupport:!0,remove:()=>{e||(e=!0,--this._enableGPUTimer,0===this._enableGPUTimer&&(this._gpuTimerPool=t(this._gpuTimerPool)))}}}startFrame(){this._startTimeStampCPU=this._lastTimeStampCPU=r(performance.now()),this._gpuTimerPool&&(this._gpuTimeSamplers.forEach(t=>t.push(0)),this._gpuTimerPool.start())}advance(t){const i=r(performance.now());if(this._cpuTimeSamplers.get(t).push(i-this._lastTimeStampCPU),e(t,this._lastTimeStampCPU,i,"Maps SDK","Scheduling"),this._lastTimeStampCPU=i,this._gpuTimerPool){const e=this._gpuTimerPool.stop(t);this._gpuTimeSamplers.get(t).set(e),this._gpuTimerPool.start()}}finishFrame(){if(this._gpuTimerPool){const t=this._gpuTimerPool.stop(o.FINISH);this._gpuTimeSamplers.get(o.FINISH).set(t),this._rctx.gl.flush()}const t=r(performance.now()-this._startTimeStampCPU);this._totalTime=r(this._totalTime+t),this._totalCPUTime.push(t),this._gpuTimerPool&&this._totalGPUTime.push(this.gpuTimeSamplers.reduce((t,e)=>t+(e.last||0),0)),++this._totalFrameCount}}export{l as PerformanceCategories,o as PerformanceCategory,T as RendererPerformanceInfo};
2
+ import{disposeMaybe as t}from"../../../../core/maybe.js";import{recordPerformance as e}from"../../../../core/performance.js";import i from"../../../../core/PerformanceSampler.js";import{Milliseconds as r}from"../../../../core/time.js";import{RenderNodeOutput as s,InternalRenderCategory as a}from"../../webgl.js";import{createElapsedTimerPool as m}from"../../../webgl/TimerPool.js";const o={OVERLAY:"overlay",PREPARE:"prepare",DEPTH:"depth",ACCUMULATED_SHADOWS:"accumulated shadows",NORMALS:"normals",AMBIENT_ILLUMINATION:"ambient illumination",AMBIENT_ILLUMINATION_HIGH_QUALITY:"ambient illumination high quality",HIGHLIGHTS:"highlights",OPAQUE_EDGES:"opaque edges",TRANSPARENT:"transparent",TRANSPARENT_EDGES:"transparent edges",TRANSPARENT_MATERIAL_WITHOUT_DEPTH:"transparent material without depth",OPAQUE_ENVIRONMENT:"opaque environment",TRANSPARENT_ENVIRONMENT:"transparent environment",OCCLUDED:"occluded",HUD:"HUD",HUD_OCCLUDED:"HUD occluded",FINISH:"finish",FOCUS_AREA_MASK:"focus area mask"},l=Object.values(s).concat(Object.values(a)).concat(Object.values(o)),p="Total";class T{constructor(t){this._rctx=t,this._startTimeStampCPU=r(0),this._lastTimeStampCPU=r(0),this._totalCPUTime=new i(p),this._cpuTimeSamplers=new Map(l.map(t=>[t,new i(t)])),this._enableGPUTimer=0,this._totalGPUTime=new i("GPU"),this._gpuTimeSamplers=new Map(l.map(t=>[t,new i(t)])),this._totalTime=r(0),this._totalFrameCount=0}get totalCPUTimeSampler(){return this._totalCPUTime}get cpuTimeSamplers(){return Array.from(this._cpuTimeSamplers.values())}get totalGPUTimeSampler(){return this._totalGPUTime}get gpuTimeSamplers(){return Array.from(this._gpuTimeSamplers.values())}get gpuSamplingEnabled(){return null!=this._gpuTimerPool}get totalTime(){return this._totalTime}get totalFrameCount(){return this._totalFrameCount}get elapsedTime(){return r(performance.now()-this._startTimeStampCPU)}enableGPUPerformanceInfo(){if(null==this._gpuTimerPool){const t=[...l,p];this._gpuTimerPool=m(this._rctx,t)}if(null==this._gpuTimerPool)return{hasGPUTimerSupport:!1,remove:()=>{}};++this._enableGPUTimer;let e=!1;return{hasGPUTimerSupport:!0,remove:()=>{e||(e=!0,--this._enableGPUTimer,0===this._enableGPUTimer&&(this._gpuTimerPool=t(this._gpuTimerPool)))}}}startFrame(){this._startTimeStampCPU=this._lastTimeStampCPU=r(performance.now()),this._gpuTimerPool&&(this._gpuTimeSamplers.forEach(t=>t.push(0)),this._gpuTimerPool.start())}advance(t){const i=r(performance.now());if(this._cpuTimeSamplers.get(t).push(i-this._lastTimeStampCPU),e(t,this._lastTimeStampCPU,i,"Maps SDK","Scheduling"),this._lastTimeStampCPU=i,this._gpuTimerPool){const e=this._gpuTimerPool.stop(t);this._gpuTimeSamplers.get(t).set(e),this._gpuTimerPool.start()}}finishFrame(){if(this._gpuTimerPool){const t=this._gpuTimerPool.stop(o.FINISH);this._gpuTimeSamplers.get(o.FINISH).set(t),this._rctx.gl.flush()}const t=r(performance.now()-this._startTimeStampCPU);this._totalTime=r(this._totalTime+t),this._totalCPUTime.push(t),this._gpuTimerPool&&this._totalGPUTime.push(this.gpuTimeSamplers.reduce((t,e)=>t+(e.last||0),0)),++this._totalFrameCount}}export{l as PerformanceCategories,o as PerformanceCategory,T as RendererPerformanceInfo};
package/views/3d/webgl.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import o from"../../Camera.js";import{rad2deg as e,deg2rad as r}from"../../core/mathUtils.js";import{create as t}from"../../core/libs/gl-matrix-2/factories/mat4f64.js";import{scale as i,add as n}from"../../core/libs/gl-matrix-2/math/vec3.js";import{create as a}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import c from"../../geometry/Point.js";import l from"../../geometry/SpatialReference.js";import{computeTranslationToOriginAndRotation as s}from"../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBuffer as m}from"../../geometry/projection/projectBuffer.js";import{projectPointToVector as u}from"../../geometry/projection/projectPointToVector.js";import{projectVectorToVector as p}from"../../geometry/projection/projectVectorToVector.js";import{cameraOnContentAlongViewDirection as f}from"./camera/intersectionUtils.js";import{directionToHeadingTilt as A,viewModeDependentUtil as d}from"./support/viewingModeUtils.js";const O={OPAQUE:"opaque-color",TRANSPARENT:"transparent-color",COMPOSITE:"composite-color",FINAL:"final-color"},R=[O.FINAL,O.COMPOSITE,O.OPAQUE,O.TRANSPARENT],T={ANTIALIASING:"aa-color",CUTFILL_COLOR:"cutfill-color",CUTFILL_COMPUTATION:"cutfill-computation",FOCUSAREA_COLOR:"focusarea-color",FOCUSAREA:"focusarea",GAUSSIAN_SPLAT:"gaussian",GROUND_DEPTH:"ground-depth",HIGHLIGHT_COLOR:"highlight-color",LASERLINES:"laserlines",MAGNIFIER:"magnifier",OCCLUDED:"occluded",OPAQUE_OCCLUSION_QUERY:"opaque-occlusion-query",OPAQUE_ENVIRONMENT:"opaque-environment",TRANSPARENT_ENVIRONMENT:"transparent-environment",AMBIENT_ILLUMINATION:"ambient-illumination",SHADOW_CASTERS:"shadow-casters",SHADOW_HIGHLIGHT:"shadow-highlight",VOXEL:"voxel",VIEWSHED:"viewshed"},E=Array.from(Object.values(T)).concat(R);function I(o,e,r,t,i,n,a){return t=t||o.spatialReference,m(e,t,r,i,o.renderCoordsHelper.spatialReference,n,a)?i:null}function N(o,e,r,t,i,n,a){return n=n||o.spatialReference,m(e,o.renderCoordsHelper.spatialReference,r,t,n,i,a)?t:null}function g(o,e,r,i){return i||(i=t()),r=r||o.spatialReference,s(r,e,i,o.renderCoordsHelper.spatialReference)?i:null}function S(r,t,i){const n=r.renderSpatialReference,a=A(r,t.eye,t.viewForward,t.up,C);let s=r.spatialReference;return p(t.eye,n,L,s)||(s=l.WGS84,p(t.eye,n,L,s)),null==i?i=new o(new c(L,s),a.heading,a.tilt,e(t.fov)):(i.position.x=L[0],i.position.y=L[1],i.position.z=L[2],i.position.spatialReference=s,i.heading=a.heading,i.tilt=a.tilt,i.fov=e(t.fov)),i.layout.row=t.row,i.layout.rows=t.rows,i.layout.column=t.column,i.layout.columns=t.columns,i}function j(o,e){return y(o,e,void 0)}function y(o,e,t){if(!e)return null;const c=o.renderSpatialReference,l=d(o).headingTiltToDirectionUp,s=a();if(!u(e.position,s,c))return null;const m=l(s,e.heading,e.tilt);i(m.direction,m.direction,o.state.camera.distance),n(m.direction,m.direction,s);const p=f(o,s,m.direction,m.up,t);return p.fov=r(e.fov),p.row=e.layout.row,p.rows=e.layout.rows,p.column=e.layout.column,p.columns=e.layout.columns,p}const L=a(),C={heading:0,tilt:0};export{E as AllInternalRenderNodeOutputs,R as AllRenderNodeOutputs,T as InternalRenderCategory,O as RenderNodeOutput,S as fromRenderCamera,N as fromRenderCoordinates,g as renderCoordinateTransformAt,j as toRenderCamera,y as toRenderCameraWithScale,I as toRenderCoordinates};
2
+ import o from"../../Camera.js";import{rad2deg as e,deg2rad as r}from"../../core/mathUtils.js";import{create as t}from"../../core/libs/gl-matrix-2/factories/mat4f64.js";import{scale as i,add as n}from"../../core/libs/gl-matrix-2/math/vec3.js";import{create as a}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import l from"../../geometry/Point.js";import c from"../../geometry/SpatialReference.js";import{computeTranslationToOriginAndRotation as s}from"../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBuffer as m}from"../../geometry/projection/projectBuffer.js";import{projectPointToVector as p}from"../../geometry/projection/projectPointToVector.js";import{projectVectorToVector as u}from"../../geometry/projection/projectVectorToVector.js";import{cameraOnContentAlongViewDirection as f}from"./camera/intersectionUtils.js";import{directionToHeadingTilt as A,viewModeDependentUtil as O}from"./support/viewingModeUtils.js";const d={OPAQUE:"opaque-color",TRANSPARENT:"transparent-color",COMPOSITE:"composite-color",FINAL:"final-color"},R=[d.FINAL,d.COMPOSITE,d.OPAQUE,d.TRANSPARENT],T={ANTIALIASING:"aa-color",CUTFILL_COLOR:"cutfill-color",CUTFILL_COMPUTATION:"cutfill-computation",FOCUSAREA_COLOR:"focusarea-color",FOCUSAREA:"focusarea",GAUSSIAN_SPLAT:"gaussian",GROUND_DEPTH:"ground-depth",HIGHLIGHT_COLOR:"highlight-color",LASERLINES:"laserlines",TRANSPARENT_NO_DEPTH:"transparent-no-depth",MAGNIFIER:"magnifier",OCCLUDED:"occluded",OPAQUE_OCCLUSION_QUERY:"opaque-occlusion-query",OPAQUE_ENVIRONMENT:"opaque-environment",TRANSPARENT_ENVIRONMENT:"transparent-environment",AMBIENT_ILLUMINATION:"ambient-illumination",SHADOWMAP:"shadowmap",SHADOW_HIGHLIGHT:"shadow-highlight",VOXEL:"voxel",VIEWSHED:"viewshed",OBJECT_AND_LAYER_ID_COLOR:"olid"},E=Array.from(Object.values(T)).concat(R);function N(o,e,r,t,i,n,a){return t=t||o.spatialReference,m(e,t,r,i,o.renderCoordsHelper.spatialReference,n,a)?i:null}function I(o,e,r,t,i,n,a){return n=n||o.spatialReference,m(e,o.renderCoordsHelper.spatialReference,r,t,n,i,a)?t:null}function g(o,e,r,i){return i||(i=t()),r=r||o.spatialReference,s(r,e,i,o.renderCoordsHelper.spatialReference)?i:null}function L(r,t,i){const n=r.renderSpatialReference,a=A(r,t.eye,t.viewForward,t.up,C);let s=r.spatialReference;return u(t.eye,n,y,s)||(s=c.WGS84,u(t.eye,n,y,s)),null==i?i=new o(new l(y,s),a.heading,a.tilt,e(t.fov)):(i.position.x=y[0],i.position.y=y[1],i.position.z=y[2],i.position.spatialReference=s,i.heading=a.heading,i.tilt=a.tilt,i.fov=e(t.fov)),i.layout.row=t.row,i.layout.rows=t.rows,i.layout.column=t.column,i.layout.columns=t.columns,i}function S(o,e){return j(o,e,void 0)}function j(o,e,t){if(!e)return null;const l=o.renderSpatialReference,c=O(o).headingTiltToDirectionUp,s=a();if(!p(e.position,s,l))return null;const m=c(s,e.heading,e.tilt);i(m.direction,m.direction,o.state.camera.distance),n(m.direction,m.direction,s);const u=f(o,s,m.direction,m.up,t);return u.fov=r(e.fov),u.row=e.layout.row,u.rows=e.layout.rows,u.column=e.layout.column,u.columns=e.layout.columns,u}const y=a(),C={heading:0,tilt:0};export{E as AllInternalRenderNodeOutputs,R as AllRenderNodeOutputs,T as InternalRenderCategory,d as RenderNodeOutput,L as fromRenderCamera,I as fromRenderCoordinates,g as renderCoordinateTransformAt,S as toRenderCamera,j as toRenderCameraWithScale,N as toRenderCoordinates};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as p}from"tslib";import{createTask as e}from"../core/asyncUtils.js";import t from"../core/Error.js";import{generatorFlat as o,generatorFromPromises as s}from"../core/generatorUtils.js";import has from"../core/has.js";import i from"../core/Logger.js";import{allSettledValues as r,throwIfAborted as u,wrapAbortWithTimeout as n}from"../core/promiseUtils.js";import{watch as a,syncAndInitial as h,whenOnce as c}from"../core/reactiveUtils.js";import{property as l,subclass as m}from"../core/accessorSupport/decorators.js";import{addPopup as d,openPopupWithViewClick as f,isPopup as g,isPopupElement as w,openPopupWithOptions as y,closePopup as P}from"./popupAdapter.js";import{ViewEventPriorities as E}from"./input/InputManager.js";const _=_=>{const T=_;let j=class extends T{constructor(...p){super(...p),this._popupSetupTask=null,this.popupEnabled=!0,this.popup={}}initialize(){this.addHandles([a(()=>[this.ui,this.popup,this.popupElement],([p,e,t],o)=>{const[s,i,r]=o??[];d(this,[p,e,t],[s,i,r])},h),this.on("click",p=>{this.popup&&this.popupEnabled&&("mouse"!==p.pointerType||0===p.button)&&f(this,p)},E.WIDGET)]),c(()=>this.ready&&this.popupEnabled&&!this.updating).then(()=>import("../widgets/Popup.js"))}destroy(){this.destroyed||this.closePopup()}get popup(){return this._get("popup")}set popup(p){this._set("popup",p)}async openPopup(p){if(g(this.popup))return this.popup.open(p);if(this.popupElement&&w(this.popupElement))this.popupElement.open(p).catch(()=>{});else try{if(await this.setupPopup(),!this.popup)return void i.getLogger(this).error(new t("view:null-popup","Popup is null and can't be opened"));y(this,p)}catch{}}closePopup(){this._popupSetupTask?.abort(),P(this.popup,this.popupElement)}async*fetchPopupFeatures(p,e){await this.when();const t=await this._getPopupHits(p,e),i=this._popupHitsToFeatures(p,t.hits,e);yield*o(s(i,e),e)}async fetchPopupFeaturesLegacy(p,e){await this.when();const t=await this._getPopupHits(p,e),o=this._popupHitsToFeatures(p,t.hits,e);return{pendingFeatures:o,allGraphicsPromise:r(o).then(p=>p.filter(p=>!!p).flat()),location:t.location}}async setupPopup(){if(this._popupSetupTask?.abort(),this.popup&&!g(this.popup))return this._popupSetupTask=e(async p=>{if(!this.popupEnabled||!w(this.popupElement))if(this.dependencies.popup&&"function"==typeof this.dependencies.popup)await this.dependencies.popup(),u(p),customElements.get("arcgis-popup")||i.getLogger(this).error(new t("view:undefined-popup-element","`arcgis-popup` custom element is undefined and can't be opened")),this.popupElement=document.createElement("arcgis-popup");else{const{default:e}=await import("../widgets/Popup.js");if(u(p),!this.popup||g(this.popup))return;const t=this.popup;if("open"in t||"close"in t){const{open:p,close:o,...s}=t;this.popup=new e({...s})}else this.popup=new e(t)}}),this._popupSetupTask.promise}_popupHitsToFeatures(p,e,t){const o=[],s=[];let i=!1;const r=n(t,has("popup-view-fetch-timeout")??V),u=p=>{const e=new v(p);return s.push(e),o.push(e.promise),e},a=p=>{const e=s.at(-1);return e&&e.layerView===p&&!i?e:u(p)};for(const n of e)if("graphic"in n){a(n.layerView).graphics.push(n.graphic),i=!1}else o.push(n.layerView.fetchPopupFeaturesAtTarget(p,n.geometry,r)),i=!0;return s.forEach(p=>p.resolve(r)),o}async _getPopupHits(p,e){const{hits:t,location:o}=await this.popupHitTest(p);u(e);const s=[];for(const i of t)if("graphic"in i){if(this._isValidPopupGraphic(i.graphic,e)){const p=this._isFeaturePatchingLayerView(i.layerView)?i.layerView:void 0;s.push({graphic:i.graphic,layerView:p})}}else s.push({geometry:i.geometry,layerView:i.layerView});return{hits:s,location:o}}_isValidPopupGraphic(p,e){return p&&!!p.getEffectivePopupTemplate(e?.defaultPopupTemplateEnabled)}_isFeaturePatchingLayerView(p){return!p||(!("layer"in p)||!p.suspended)&&"patchFeaturesForPopup"in p}};return p([l()],j.prototype,"popup",null),p([l()],j.prototype,"popupElement",void 0),p([l()],j.prototype,"popupEnabled",void 0),j=p([m("esri.views.PopupView")],j),j};class v{constructor(p){this.layerView=p,this._resolver=Promise.withResolvers(),this.graphics=[]}get promise(){return this._resolver.promise}resolve(p){const{layerView:e,graphics:t,_resolver:o}=this;if(!e)return o.resolve(t),o.promise;let s;return e.patchFeaturesForPopup(t,p).catch(p=>(s=p,null)).then(p=>{p?o.resolve(p):o.reject(s)}),o.promise}}const V=5e3;export{_ as PopupView};
2
+ import{__decorate as e}from"tslib";import{createTask as p}from"../core/asyncUtils.js";import t from"../core/Error.js";import{generatorFlat as o,generatorFromPromises as s}from"../core/generatorUtils.js";import has from"../core/has.js";import i from"../core/Logger.js";import{allSettledValues as r,throwIfAborted as u,wrapAbortWithTimeout as n}from"../core/promiseUtils.js";import{watch as a,syncAndInitial as h,whenOnce as c}from"../core/reactiveUtils.js";import{property as l,subclass as m}from"../core/accessorSupport/decorators.js";import{addPopup as d,openPopupWithViewClick as f,isPopup as g,isPopupElement as w,openPopupWithOptions as y,closePopup as P}from"./popupAdapter.js";import{ViewEventPriorities as E}from"./input/InputManager.js";const _=_=>{const V=_;let j=class extends V{constructor(...e){super(...e),this._popupSetupTask=null,this.popupEnabled=!0,this.popup={}}initialize(){this.addHandles([a(()=>[this.ui,this.popup,this.popupElement],([e,p,t],o)=>{const[s,i,r]=o??[];d(this,[e,p,t],[s,i,r])},h),this.on("click",e=>{this.popup&&this.popupEnabled&&("mouse"!==e.pointerType||0===e.button)&&f(this,e)},E.WIDGET)]),c(()=>this.ready&&this.popupEnabled&&!this.updating).then(()=>import("../widgets/Popup.js"))}destroy(){this.destroyed||this.closePopup()}get popup(){return this._get("popup")}set popup(e){this._set("popup",e)}async openPopup(e){if(g(this.popup))return this.popup.open(e);if(this.popupElement&&w(this.popupElement)){if(e){const{fetchFeatures:p,title:t,...o}=e;delete e.fetchFeatures,Object.assign(this.popupElement,o),void 0!==t&&(this.popupElement.heading=t)}this.popupElement.open=!0}try{if(await this.setupPopup(),!this.popup)return void i.getLogger(this).error(new t("view:null-popup","Popup is null and can't be opened"));y(this,e)}catch{}}closePopup(){this._popupSetupTask?.abort(),P(this.popup,this.popupElement)}async*fetchPopupFeatures(e,p){await this.when();const t=await this._getPopupHits(e,p),i=this._popupHitsToFeatures(e,t.hits,p);yield*o(s(i,p),p)}async fetchPopupFeaturesLegacy(e,p){await this.when();const t=await this._getPopupHits(e,p),o=this._popupHitsToFeatures(e,t.hits,p);return{pendingFeatures:o,allGraphicsPromise:r(o).then(e=>e.filter(e=>!!e).flat()),location:t.location}}async setupPopup(){if(this._popupSetupTask?.abort(),this.popup&&!g(this.popup))return this._popupSetupTask=p(async e=>{if(!this.popupEnabled||!w(this.popupElement))if(this.dependencies.popup&&"function"==typeof this.dependencies.popup)await this.dependencies.popup(),u(e),customElements.get("arcgis-popup")||i.getLogger(this).error(new t("view:undefined-popup-element","`arcgis-popup` custom element is undefined and can't be opened")),this.popupElement=document.createElement("arcgis-popup");else{const{default:p}=await import("../widgets/Popup.js");if(u(e),!this.popup||g(this.popup))return;const t=this.popup;if("open"in t||"close"in t){const{open:e,close:o,...s}=t;this.popup=new p({...s})}else this.popup=new p(t)}}),this._popupSetupTask.promise}_popupHitsToFeatures(e,p,t){const o=[],s=[];let i=!1;const r=n(t,has("popup-view-fetch-timeout")??F),u=e=>{const p=new v(e);return s.push(p),o.push(p.promise),p},a=e=>{const p=s.at(-1);return p&&p.layerView===e&&!i?p:u(e)};for(const n of p)if("graphic"in n){a(n.layerView).graphics.push(n.graphic),i=!1}else o.push(n.layerView.fetchPopupFeaturesAtTarget(e,n.geometry,r)),i=!0;return s.forEach(e=>e.resolve(r)),o}async _getPopupHits(e,p){const{hits:t,location:o}=await this.popupHitTest(e);u(p);const s=[];for(const i of t)if("graphic"in i){if(this._isValidPopupGraphic(i.graphic,p)){const e=this._isFeaturePatchingLayerView(i.layerView)?i.layerView:void 0;s.push({graphic:i.graphic,layerView:e})}}else s.push({geometry:i.geometry,layerView:i.layerView});return{hits:s,location:o}}_isValidPopupGraphic(e,p){return e&&!!e.getEffectivePopupTemplate(p?.defaultPopupTemplateEnabled)}_isFeaturePatchingLayerView(e){return!e||(!("layer"in e)||!e.suspended)&&"patchFeaturesForPopup"in e}};return e([l()],j.prototype,"popup",null),e([l()],j.prototype,"popupElement",void 0),e([l()],j.prototype,"popupEnabled",void 0),j=e([m("esri.views.PopupView")],j),j};class v{constructor(e){this.layerView=e,this._resolver=Promise.withResolvers(),this.graphics=[]}get promise(){return this._resolver.promise}resolve(e){const{layerView:p,graphics:t,_resolver:o}=this;if(!p)return o.resolve(t),o.promise;let s;return p.patchFeaturesForPopup(t,e).catch(e=>(s=e,null)).then(e=>{e?o.resolve(e):o.reject(s)}),o.promise}}const F=5e3;export{_ as PopupView};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import"../../core/has.js";import t from"../../core/Logger.js";import{getOrCreateMapValue as i}from"../../core/MapUtils.js";import{throwIfAborted as r}from"../../core/promiseUtils.js";import{watch as s,syncAndInitial as l,on as n,whenOnce as a}from"../../core/reactiveUtils.js";import{sqlOr as o,sqlIn as u,sqlAnd as d}from"../../core/sql.js";import{property as p,subclass as f}from"../../core/accessorSupport/decorators.js";import{getPopupProvider as y}from"../../graphic/getPopupProvider.js";import{getFeatureIdInfoFieldNames as h}from"../../layers/graphics/data/FeatureIdInfo.js";import{systemIsSpatialFieldName as m}from"../../layers/knowledgeGraph/constants.js";import{getEffectiveDisplayFilter as c}from"../../layers/support/displayFilterUtils.js";import F from"../../layers/support/FeatureEffect.js";import g from"../../layers/support/FeatureFilter.js";import{getSignedInUser as I,layerRequiresGeometryZM as b}from"../../layers/support/featureLayerUtils.js";import{fetchFeaturePopupFeatures as v,loadFeaturePopupArcadeModules as w}from"../../layers/support/featurePopupQueryUtils.js";import{fixFields as x,unpackFieldNames as E,collectLabelingFields as R,collectElevationFields as q,collectFilterFields as _,collectFeatureReductionFields as j,collectOrderByInfos as O,collectFields as C,collectTrackInfoFields as k,collectDisplayFilterFields as Z,collectField as M,featureHasFields as U}from"../../layers/support/fieldUtils.js";import{getFloorFilterClause as P}from"../../layers/support/floorFilterUtils.js";import{collectRelativeTimeFields as T}from"../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as L}from"../../networks/support/networkFieldUtils.js";import S from"../../rest/support/Query.js";import{createFeatureIdInfo as D}from"../2d/layers/features/layerAdapters/featureServiceUtils.js";import N from"./LayerView.js";import{getFetchPopupTemplate as Q,getRequiredFields as H}from"./support/popupUtils.js";import{WhereClauseVisitor as B}from"./support/WhereClauseVisitor.js";let G=class extends N{constructor(){super(...arguments),this._updatingRequiredPromise=null,this._defaultReturnZ=!1,this.hasZ=!1,this.hasM=!1,this.filter=null,this.layer=null,this.requiresCurrentUser=!1,this.requiredFields=[],this.view=null}initialize(){this.addHandles([s(()=>{const e=this.layer,t=this.view;return[e&&"elevationInfo"in e?e.elevationInfo?.featureExpressionInfo:null,e&&"displayField"in e?e.displayField:null,e&&"timeInfo"in e&&e.timeInfo,e&&"renderer"in e&&e.renderer,e&&"returnZ"in e&&e.returnZ,e&&"returnM"in e&&e.returnM,e&&"capabilities"in e&&e.capabilities,e&&"labelingInfo"in e&&e.labelingInfo,e&&"floorInfo"in e&&e.floorInfo,t?.requiredFieldsOptions?.featureTitleFields&&e&&"featureTitleFields"in e&&e.featureTitleFields,t?.requiredFieldsOptions?.utilityNetworkFields&&L(t,e),e&&"displayFilterInfo"in e&&e.displayFilterInfo,this.displayFilterEnabled,this.filter,this.featureEffect,this.timeExtent,"knowledge-graph-sublayer"===e?.type&&"link-chart"===e.parentCompositeLayer?.type&&e.parentCompositeLayer.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode]},()=>this._handleChange(),l),n(()=>this.view?.floors,"change",()=>this._handleChange()),n(()=>(this.layer&&"displayFilterInfo"in this.layer?this.layer.displayFilterInfo:null)?.filters,"change",()=>this._handleChange()),n(()=>this.layer&&"sublayers"in this.layer?this.layer.sublayers:null,"change",()=>this._handleChange())])}get availableFields(){if(!this.layer)return[];const{layer:e,layer:{fieldsIndex:t},requiredFields:i}=this;return"outFields"in e&&e.outFields?x(t,[...E(t,e.outFields),...i]):x(t,i)}get displayFilterEnabled(){return(this.view?.displayFilterEnabled??!0)&&(!("displayFilterEnabled"in this.layer)||(this.layer?.displayFilterEnabled??!0))}get effectiveDisplayFilter(){const e=this.layer;return"displayFilterInfo"in e&&this.displayFilterEnabled&&e.displayFilterInfo?c(e.displayFilterInfo,this.view):null}get effectiveDisplayFilterClause(){const e=this.effectiveDisplayFilter?.where??null;return e&&this.hasHighlight?o(e,u(this.layer.objectIdField,this.highlightIds)):e}get featureEffect(){return this.layer&&"featureEffect"in this.layer?this.layer.featureEffect:null}set featureEffect(e){this._override("featureEffect",e)}get highlightOptions(){}set highlightOptions(e){}get maximumNumberOfFeatures(){return 0}set maximumNumberOfFeatures(e){t.getLogger(this).error("#maximumNumberOfFeatures=","Setting maximum number of features is not supported")}get maximumNumberOfFeaturesExceeded(){return!1}get signedInUser(){return this.layer?.url?I(this.layer.url):Promise.resolve(null)}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference},t=null!=this.filter?this.filter.createQuery(e):new S(e);if("floorInfo"in this.layer&&this.layer.floorInfo&&(t.where=d(t.where,P(this))),this.displayFilterEnabled&&(t.where=d(t.where,this.effectiveDisplayFilter?.where)),null!=this.timeExtent&&(t.timeExtent=null!=t.timeExtent?t.timeExtent.intersection(this.timeExtent):this.timeExtent.clone()),"capabilities"in this.layer){const e=this.layer.capabilities?.data;"returnZ"in this.layer&&e?.supportsZ&&null!=this.layer.returnZ&&(t.returnZ=this.layer.returnZ),"returnM"in this.layer&&e?.supportsM&&null!=this.layer.returnM&&(t.returnM=this.layer.returnM)}return t}createAggregateQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return new S(e)}async patchFeaturesForPopup(e,t){const r=[],s=new Set,l=new Map;for(const a of e){const e=i(l,a.origin,()=>{const e=y(a.origin);return Q(e,{...t,checkPopupEnabled:!0})});e&&(r.push(a),s.add(e))}if(0===r.length||0===s.size)return[];const n=await this._createPopupQuery(s,t);return await v(this.layer,r,n,{hasRequiredFields:(e,t)=>this._popupFeatureHasRequiredFields(e,t),...t})}_handleChange(){const e=Promise.all([a(()=>!("reloading"in this.layer&&this.layer.reloading)),this._updateRequiredFields(),this._updateClientWhereClauseRequirements(),this._updateHasZM()]).then(()=>{});return this._updatingRequiredPromise=e,e.then(()=>{this._updatingRequiredPromise===e&&(this._updatingRequiredPromise=null)}),e}async _updateClientWhereClauseRequirements(){if(!this.layer||!this.view)return;const{layer:e}=this,i=new B(e.fieldsIndex);if(i.visitFilter(this.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"labelingInfo"in e&&i.visitLabelingInfo(e.labelsVisible,e.labelingInfo),"trackInfo"in e&&i.visitTrackInfo(e.trackInfo),"2d"===this.view.type&&(i.visitFilter(this.featureEffect?.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"displayFilterInfo"in e&&i.visitDisplayFilter(this.displayFilterEnabled,e.displayFilterInfo)),"subtype-group"===e.type)for(const t of e.sublayers)i.visitLabelingInfo(t.labelsVisible,t.labelingInfo);"definitionExpression"in e&&"capabilities"in e&&e.capabilities?.query.relativeTimeBinWindow&&i.visitRelativeTimeQuery(e.definitionExpression);try{const e=await i.finish();this._set("requiresCurrentUser",e.requiresCurrentUser)}catch(r){t.getLogger(this).error(r)}}async _updateRequiredFields(){if(!this.layer||!this.view)return;const e="3d"===this.view.type,{layer:i,layer:{fieldsIndex:r}}=this,s="renderer"in i&&i.renderer,l="orderBy"in i&&i.orderBy,n="featureReduction"in i?i.featureReduction:null,a=new Set,o=[s?s.collectRequiredFields(a,r):null,R(a,i),e&&"elevationInfo"in i?q(a,i):null,null!=this.filter?_(a,i,this.filter):null,e||null==this.featureEffect?null:_(a,i,this.featureEffect.filter),!e&&n?j(a,i,n):null,e&&"catalog-footprint"!==i.type||!l?null:O(a,i,l),"definitionExpression"in i&&"capabilities"in i&&i.capabilities?.query.relativeTimeBinWindow?T(a,i.fieldsIndex,i.definitionExpression):null];if("timeInfo"in i&&i.timeInfo&&this.timeExtent&&C(a,i.fieldsIndex,[i.timeInfo.startField,i.timeInfo.endField]),"timeInfo"in i&&i.timeInfo&&"trackInfo"in i&&i.trackInfo){const{trackInfo:e}=i;C(a,i.fieldsIndex,[i.timeInfo.trackIdField]),"feature"!==i.type&&"startTimeField"!==e.timeField||C(a,i.fieldsIndex,[i.timeInfo.startField]),"endTimeField"===e.timeField&&C(a,i.fieldsIndex,[i.timeInfo.endField]),await k(a,i)}if("floorInfo"in i&&i.floorInfo&&C(a,i.fieldsIndex,[i.floorInfo.floorField]),"featureTitleFields"in i&&this.view?.requiredFieldsOptions?.featureTitleFields&&i.featureTitleFields&&C(a,i.fieldsIndex,i.featureTitleFields),"feature"===i.type&&i.globalIdField&&this.view?.requiredFieldsOptions?.globalIdField&&C(a,i.fieldsIndex,[i.globalIdField]),"feature"!==i.type&&"subtype-group"!==i.type||!this.view?.requiredFieldsOptions?.utilityNetworkFields||C(a,i.fieldsIndex,L(this.view,i)),this.displayFilterEnabled&&"displayFilterInfo"in i&&o.push(Z(a,i,i.displayFilterInfo)),"feature"===i.type&&e&&null!=i.infoFor3D&&(null==i.globalIdField&&t.getLogger(this).error("globalIdField missing on 3DObjectFeatureLayer"),C(a,i.fieldsIndex,[i.globalIdField])),"subtype-group"===i.type){M(a,r,i.subtypeField);const e=i.sublayers.map(e=>Promise.all([e.renderer?.collectRequiredFields(a,r),R(a,e)]));o.push(Promise.all(e))}if("annotation-feature"===i.type&&C(a,r,[i.subtypeField,i.elementField]),"dimension-feature"===i.type&&C(a,r,i.symbolFields),"catalog-footprint"===i.type&&i.parent){const e=i.parent;C(a,r,[e.itemNameField,e.itemSourceField,e.itemTypeField,e.maxScaleField,e.minScaleField])}"knowledge-graph-sublayer"===i.type&&"link-chart"===i.parentCompositeLayer?.type&&M(a,r,m);const u=await Promise.allSettled(o);if(e)M(a,r,i.objectIdField);else for(const t of h(D(i)))M(a,r,t);e&&"displayField"in i&&i.displayField&&M(a,r,i.displayField);for(const p of u)"rejected"===p.status&&t.getLogger(this).error(p.reason);const d=Array.from(a).sort();this._set("requiredFields",d)}async _updateHasZM(){const{layer:e}=this;if(!e||!this.view)return;let t=!1,i=!1;if("capabilities"in e&&e.capabilities){const{data:r}=e.capabilities;t=r.supportsZ,i=r.supportsM}this._set("hasZ",t),this._set("hasM",i);const{returnZ:r,returnM:s}=await b(e);t&&=r??this._defaultReturnZ,i&&=s??!1,this.hasZ!==t&&this._set("hasZ",t),this.hasM!==i&&this._set("hasM",i)}_popupFeatureHasRequiredFields(e,t){return U(e,t)}async _createPopupQuery(e,t){const i=this.layer.createQuery(),s=new Set;let l="point"===this.layer.geometryType;for(const n of e){if(!l){const e=await w(n);r(t),l=(e&&e.arcadeUtils.hasGeometryOperations(n))??!1}const e=await H(this.layer,n);r(t);for(const t of e)s.add(t)}return i.where="1=1",i.returnGeometry=l,i.returnZ=l,i.returnM=l,i.outFields=Array.from(s),i.outSpatialReference=this.view.spatialReference,"floorInfo"in this.layer&&this.layer.floorInfo&&(i.where=d(i.where,P(this))),i}canResume(){return!!super.canResume()&&(null==this.timeExtent||!this.timeExtent.isEmpty)}getTest(){}get test(){}};e([p()],G.prototype,"_updatingRequiredPromise",void 0),e([p()],G.prototype,"_defaultReturnZ",void 0),e([p({readOnly:!0})],G.prototype,"availableFields",null),e([p({readOnly:!0})],G.prototype,"hasZ",void 0),e([p({readOnly:!0})],G.prototype,"hasM",void 0),e([p({readOnly:!0})],G.prototype,"displayFilterEnabled",null),e([p({readOnly:!0})],G.prototype,"effectiveDisplayFilter",null),e([p({readOnly:!0})],G.prototype,"effectiveDisplayFilterClause",null),e([p({type:F})],G.prototype,"featureEffect",null),e([p({type:g})],G.prototype,"filter",void 0),e([p()],G.prototype,"layer",void 0),e([p({type:Number})],G.prototype,"maximumNumberOfFeatures",null),e([p({readOnly:!0,type:Boolean})],G.prototype,"maximumNumberOfFeaturesExceeded",null),e([p()],G.prototype,"requiresCurrentUser",void 0),e([p({readOnly:!0})],G.prototype,"requiredFields",void 0),e([p({readOnly:!0})],G.prototype,"signedInUser",null),e([p()],G.prototype,"view",void 0),G=e([f("esri.views.layers.FeatureLikeLayerView")],G);const V=G;export{V as default};
2
+ import{__decorate as e}from"tslib";import"../../core/has.js";import t from"../../core/Logger.js";import{getOrCreateMapValue as i}from"../../core/MapUtils.js";import{throwIfAborted as r}from"../../core/promiseUtils.js";import{watch as s,syncAndInitial as l,on as n,whenOnce as a}from"../../core/reactiveUtils.js";import{sqlOr as o,sqlIn as u,sqlAnd as d}from"../../core/sql.js";import{property as p,subclass as f}from"../../core/accessorSupport/decorators.js";import{getPopupProvider as h}from"../../graphic/getPopupProvider.js";import{getFeatureIdInfoFieldNames as y}from"../../layers/graphics/data/FeatureIdInfo.js";import{systemIsSpatialFieldName as m}from"../../layers/knowledgeGraph/constants.js";import{getEffectiveDisplayFilter as c}from"../../layers/support/displayFilterUtils.js";import F from"../../layers/support/FeatureEffect.js";import g from"../../layers/support/FeatureFilter.js";import{getSignedInUser as I,layerRequiresGeometryZM as b}from"../../layers/support/featureLayerUtils.js";import{fetchFeaturePopupFeatures as v,loadFeaturePopupArcadeModules as w}from"../../layers/support/featurePopupQueryUtils.js";import{fixFields as x,unpackFieldNames as E,collectLabelingFields as R,collectElevationFields as q,collectFilterFields as _,collectFeatureReductionFields as j,collectOrderByInfos as O,collectFields as C,collectTrackInfoFields as k,collectDisplayFilterFields as Z,collectField as M,featureHasFields as U}from"../../layers/support/fieldUtils.js";import{getFloorFilterClause as P}from"../../layers/support/floorFilterUtils.js";import{collectRelativeTimeFields as T}from"../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as L}from"../../networks/support/networkFieldUtils.js";import S from"../../rest/support/Query.js";import{createFeatureIdInfo as D}from"../2d/layers/features/layerAdapters/featureServiceUtils.js";import N from"./LayerView.js";import{getFetchPopupTemplate as Q,getRequiredFields as V}from"./support/popupUtils.js";import{WhereClauseVisitor as A}from"./support/WhereClauseVisitor.js";let H=class extends N{constructor(){super(...arguments),this._updatingRequiredPromise=null,this._defaultReturnZ=!1,this.hasZ=!1,this.hasM=!1,this.filter=null,this.layer=null,this.requiresCurrentUser=!1,this.requiredFields=[],this.view=null}initialize(){this.addHandles([s(()=>{const e=this.layer,t=this.view;return[e&&"elevationInfo"in e?e.elevationInfo?.featureExpressionInfo:null,e&&"displayField"in e?e.displayField:null,e&&"timeInfo"in e&&e.timeInfo,e&&"renderer"in e&&e.renderer,e&&"returnZ"in e&&e.returnZ,e&&"returnM"in e&&e.returnM,e&&"capabilities"in e&&e.capabilities,e&&"labelingInfo"in e&&e.labelingInfo,e&&"floorInfo"in e&&e.floorInfo,t?.requiredFieldsOptions?.featureTitleFields&&e&&"featureTitleFields"in e&&e.featureTitleFields,t?.requiredFieldsOptions?.utilityNetworkFields&&L(t,e),e&&"displayFilterInfo"in e&&e.displayFilterInfo,this.displayFilterEnabled,this.filter,this.featureEffect,this.timeExtent,"knowledge-graph-sublayer"===e?.type&&"link-chart"===e.parentCompositeLayer?.type&&e.parentCompositeLayer.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode]},()=>this._handleChange(),l),n(()=>this.view?.floors,"change",()=>this._handleChange()),n(()=>(this.layer&&"displayFilterInfo"in this.layer?this.layer.displayFilterInfo:null)?.filters,"change",()=>this._handleChange()),n(()=>this.layer&&"sublayers"in this.layer?this.layer.sublayers:null,"change",()=>this._handleChange())])}get availableFields(){if(!this.layer)return[];const{layer:e,layer:{fieldsIndex:t},requiredFields:i}=this;return"outFields"in e&&e.outFields?x(t,[...E(t,e.outFields),...i]):x(t,i)}get displayFilterEnabled(){return(this.view?.displayFilterEnabled??!0)&&(!("displayFilterEnabled"in this.layer)||(this.layer?.displayFilterEnabled??!0))}get effectiveDisplayFilter(){const e=this.layer;return"displayFilterInfo"in e&&this.displayFilterEnabled&&e.displayFilterInfo?c(e.displayFilterInfo,this.view):null}get effectiveDisplayFilterClause(){const e=this.effectiveDisplayFilter?.where??null;return e&&this.hasHighlight?o(e,u(this.layer.objectIdField,this.highlightIds)):e}get featureEffect(){return this.layer&&"featureEffect"in this.layer?this.layer.featureEffect:null}set featureEffect(e){this._override("featureEffect",e)}get highlightOptions(){}set highlightOptions(e){}get maximumNumberOfFeatures(){return 0}set maximumNumberOfFeatures(e){t.getLogger(this).error("#maximumNumberOfFeatures=","Setting maximum number of features is not supported")}get maximumNumberOfFeaturesExceeded(){return!1}get signedInUser(){return this.layer?.url?I(this.layer.url):Promise.resolve(null)}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference},t=null!=this.filter?this.filter.createQuery(e):new S(e);if("floorInfo"in this.layer&&this.layer.floorInfo&&(t.where=d(t.where,P(this))),this.displayFilterEnabled&&(t.where=d(t.where,this.effectiveDisplayFilter?.where)),null!=this.timeExtent&&(t.timeExtent=null!=t.timeExtent?t.timeExtent.intersection(this.timeExtent):this.timeExtent.clone()),"capabilities"in this.layer){const e=this.layer.capabilities?.data;"returnZ"in this.layer&&e?.supportsZ&&null!=this.layer.returnZ&&(t.returnZ=this.layer.returnZ),"returnM"in this.layer&&e?.supportsM&&null!=this.layer.returnM&&(t.returnM=this.layer.returnM)}return"unplacedAnnotationsVisible"in this.layer&&!this.layer.unplacedAnnotationsVisible&&(t.where=d(t.where,`${this.layer.statusField} = 0`)),t}createAggregateQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return new S(e)}async patchFeaturesForPopup(e,t){const r=[],s=new Set,l=new Map;for(const a of e){const e=i(l,a.origin,()=>{const e=h(a.origin);return Q(e,{...t,checkPopupEnabled:!0})});e&&(r.push(a),s.add(e))}if(0===r.length||0===s.size)return[];const n=await this._createPopupQuery(s,t);return await v(this.layer,r,n,{hasRequiredFields:(e,t)=>this._popupFeatureHasRequiredFields(e,t),...t})}_handleChange(){const e=Promise.all([a(()=>!("reloading"in this.layer&&this.layer.reloading)),this._updateRequiredFields(),this._updateClientWhereClauseRequirements(),this._updateHasZM()]).then(()=>{});return this._updatingRequiredPromise=e,e.then(()=>{this._updatingRequiredPromise===e&&(this._updatingRequiredPromise=null)}),e}async _updateClientWhereClauseRequirements(){if(!this.layer||!this.view)return;const{layer:e}=this,i=new A(e.fieldsIndex);if(i.visitFilter(this.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"labelingInfo"in e&&i.visitLabelingInfo(e.labelsVisible,e.labelingInfo),"trackInfo"in e&&i.visitTrackInfo(e.trackInfo),"2d"===this.view.type&&(i.visitFilter(this.featureEffect?.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"displayFilterInfo"in e&&i.visitDisplayFilter(this.displayFilterEnabled,e.displayFilterInfo)),"subtype-group"===e.type)for(const t of e.sublayers)i.visitLabelingInfo(t.labelsVisible,t.labelingInfo);"definitionExpression"in e&&"capabilities"in e&&e.capabilities?.query.relativeTimeBinWindow&&i.visitRelativeTimeQuery(e.definitionExpression);try{const e=await i.finish();this._set("requiresCurrentUser",e.requiresCurrentUser)}catch(r){t.getLogger(this).error(r)}}async _updateRequiredFields(){if(!this.layer||!this.view)return;const e="3d"===this.view.type,{layer:i,layer:{fieldsIndex:r}}=this,s="renderer"in i&&i.renderer,l="orderBy"in i&&i.orderBy,n="featureReduction"in i?i.featureReduction:null,a=new Set,o=[s?s.collectRequiredFields(a,r):null,R(a,i),e&&"elevationInfo"in i?q(a,i):null,null!=this.filter?_(a,i,this.filter):null,e||null==this.featureEffect?null:_(a,i,this.featureEffect.filter),!e&&n?j(a,i,n):null,e&&"catalog-footprint"!==i.type||!l?null:O(a,i,l),"definitionExpression"in i&&"capabilities"in i&&i.capabilities?.query.relativeTimeBinWindow?T(a,i.fieldsIndex,i.definitionExpression):null];if("timeInfo"in i&&i.timeInfo&&this.timeExtent&&C(a,i.fieldsIndex,[i.timeInfo.startField,i.timeInfo.endField]),"timeInfo"in i&&i.timeInfo&&"trackInfo"in i&&i.trackInfo){const{trackInfo:e}=i;C(a,i.fieldsIndex,[i.timeInfo.trackIdField]),"feature"!==i.type&&"startTimeField"!==e.timeField||C(a,i.fieldsIndex,[i.timeInfo.startField]),"endTimeField"===e.timeField&&C(a,i.fieldsIndex,[i.timeInfo.endField]),await k(a,i)}if("floorInfo"in i&&i.floorInfo&&C(a,i.fieldsIndex,[i.floorInfo.floorField]),"featureTitleFields"in i&&this.view?.requiredFieldsOptions?.featureTitleFields&&i.featureTitleFields&&C(a,i.fieldsIndex,i.featureTitleFields),"feature"===i.type&&i.globalIdField&&this.view?.requiredFieldsOptions?.globalIdField&&C(a,i.fieldsIndex,[i.globalIdField]),"feature"!==i.type&&"subtype-group"!==i.type||!this.view?.requiredFieldsOptions?.utilityNetworkFields||C(a,i.fieldsIndex,L(this.view,i)),this.displayFilterEnabled&&"displayFilterInfo"in i&&o.push(Z(a,i,i.displayFilterInfo)),"feature"===i.type&&e&&null!=i.infoFor3D&&(null==i.globalIdField&&t.getLogger(this).error("globalIdField missing on 3DObjectFeatureLayer"),C(a,i.fieldsIndex,[i.globalIdField])),"subtype-group"===i.type){M(a,r,i.subtypeField);const e=i.sublayers.map(e=>Promise.all([e.renderer?.collectRequiredFields(a,r),R(a,e)]));o.push(Promise.all(e))}if("annotation-feature"===i.type&&C(a,r,[i.subtypeField,i.elementField,i.statusField]),"dimension-feature"===i.type&&C(a,r,i.symbolFields),"catalog-footprint"===i.type&&i.parent){const e=i.parent;C(a,r,[e.itemNameField,e.itemSourceField,e.itemTypeField,e.maxScaleField,e.minScaleField])}"knowledge-graph-sublayer"===i.type&&"link-chart"===i.parentCompositeLayer?.type&&M(a,r,m);const u=await Promise.allSettled(o);if(e)M(a,r,i.objectIdField);else for(const t of y(D(i)))M(a,r,t);e&&"displayField"in i&&i.displayField&&M(a,r,i.displayField);for(const p of u)"rejected"===p.status&&t.getLogger(this).error(p.reason);const d=Array.from(a).sort();this._set("requiredFields",d)}async _updateHasZM(){const{layer:e}=this;if(!e||!this.view)return;let t=!1,i=!1;if("capabilities"in e&&e.capabilities){const{data:r}=e.capabilities;t=r.supportsZ,i=r.supportsM}this._set("hasZ",t),this._set("hasM",i);const{returnZ:r,returnM:s}=await b(e);t&&=r??this._defaultReturnZ,i&&=s??!1,this.hasZ!==t&&this._set("hasZ",t),this.hasM!==i&&this._set("hasM",i)}_popupFeatureHasRequiredFields(e,t){return U(e,t)}async _createPopupQuery(e,t){const i=this.layer.createQuery(),s=new Set;let l="point"===this.layer.geometryType;for(const n of e){if(!l){const e=await w(n);r(t),l=(e&&e.arcadeUtils.hasGeometryOperations(n))??!1}const e=await V(this.layer,n);r(t);for(const t of e)s.add(t)}return i.where="1=1",i.returnGeometry=l,i.returnZ=l,i.returnM=l,i.outFields=Array.from(s),i.outSpatialReference=this.view.spatialReference,"floorInfo"in this.layer&&this.layer.floorInfo&&(i.where=d(i.where,P(this))),i}canResume(){return!!super.canResume()&&(null==this.timeExtent||!this.timeExtent.isEmpty)}getTest(){}get test(){}};e([p()],H.prototype,"_updatingRequiredPromise",void 0),e([p()],H.prototype,"_defaultReturnZ",void 0),e([p({readOnly:!0})],H.prototype,"availableFields",null),e([p({readOnly:!0})],H.prototype,"hasZ",void 0),e([p({readOnly:!0})],H.prototype,"hasM",void 0),e([p({readOnly:!0})],H.prototype,"displayFilterEnabled",null),e([p({readOnly:!0})],H.prototype,"effectiveDisplayFilter",null),e([p({readOnly:!0})],H.prototype,"effectiveDisplayFilterClause",null),e([p({type:F})],H.prototype,"featureEffect",null),e([p({type:g})],H.prototype,"filter",void 0),e([p()],H.prototype,"layer",void 0),e([p({type:Number})],H.prototype,"maximumNumberOfFeatures",null),e([p({readOnly:!0,type:Boolean})],H.prototype,"maximumNumberOfFeaturesExceeded",null),e([p()],H.prototype,"requiresCurrentUser",void 0),e([p({readOnly:!0})],H.prototype,"requiredFields",void 0),e([p({readOnly:!0})],H.prototype,"signedInUser",null),e([p()],H.prototype,"view",void 0),H=e([f("esri.views.layers.FeatureLikeLayerView")],H);const B=H;export{B as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- const n="popup",e="manual";function o(n){const{popupElement:e,popup:o}=n||{};return e??o??null}function i(n){return null!=n&&"open"in n&&"declaredClass"in n}function p(n){return!!n&&"arcgis-popup"===n.tagName.toLowerCase()&&"open"in n}function t(o,t,l){const[u,a,s]=t;if(l){const[e,o,t]=l;e&&i(o)&&(o.view=null,e.remove(o,n),o!==a&&a&&o.destroy()),e&&t&&p(t)&&(t.view=null,e.remove(t,n),t!==s&&s&&t.remove())}u&&i(a)&&(a.view=o,u.add(a,{key:n,position:e,internal:!0})),u&&s&&p(s)&&(s.view=o,u.add(s,{key:n,position:e,internal:!0}))}async function l(n,e){const{popup:o,popupElement:t}=n;i(o)?await s(o,null,e):t&&p(t)?await s(null,t,e):e?.defer(async()=>{await n.setupPopup();const{popup:o,popupElement:t}=n;i(o)&&!n.destroyed&&n.ready&&n.popupEnabled?await s(o,null,e):t&&p(t)&&await s(null,t,e)}).catch(()=>{})}function u(n,e){const{popup:o,popupElement:t}=n;if(i(o))return o.open(e);t&&p(t)&&t.open(e)}function a(n,e){i(n)&&n.close(),e&&p(e)&&(e.visible=!1)}async function s(n,e,o){if(i(n)){const e=await n.viewModel.handleViewClick(o);return void(e?.promises?.length?n.open(e):n.visible&&n.close())}if(e&&p(e)){const n=await e.handleViewClick(o);n?.promises?.length?e.open(n):e.visible&&(e.visible=!1)}}export{t as addPopup,a as closePopup,i as isPopup,p as isPopupElement,u as openPopupWithOptions,l as openPopupWithViewClick,o as popupFromView};
2
+ const e="popup",n="manual";function t(e){const{popupElement:n,popup:t}=e||{};return n??t??null}function o(e){return null!=e&&"open"in e&&"declaredClass"in e}function i(e){return!!e&&"arcgis-popup"===e.tagName.toLowerCase()&&"open"in e}function p(t,p,a){const[l,u,s]=p;if(a){const[n,t,p]=a;n&&o(t)&&(t.view=null,n.remove(t,e),t!==u&&u&&t.destroy()),n&&p&&i(p)&&(p.view=null,n.remove(p,e),p!==s&&s&&p.remove())}l&&o(u)&&(u.view=t,l.add(u,{key:e,position:n,internal:!0})),l&&s&&i(s)&&(s.view=t,l.add(s,{key:e,position:n,internal:!0}))}async function a(e,n){const{popup:t,popupElement:p}=e;o(t)?await s(t,null,n):p&&i(p)?await s(null,p,n):n?.defer(async()=>{await e.setupPopup();const{popup:t,popupElement:p}=e;o(t)&&!e.destroyed&&e.ready&&e.popupEnabled?await s(t,null,n):p&&i(p)&&await s(null,p,n)}).catch(()=>{})}function l(e,n){const{popup:t,popupElement:p}=e;if(o(t))return t.open(n);if(p&&i(p)){if(n){const{fetchFeatures:e,title:t,...o}=n;delete n.fetchFeatures,Object.assign(p,o),void 0!==t&&(p.heading=t)}p.open=!0}}function u(e,n){o(e)&&e.close(),n&&i(n)&&(n.visible=!1)}async function s(e,n,t){if(o(e)){const n=await e.viewModel.handleViewClick(t);return void(n?.promises?.length?e.open(n):e.visible&&e.close())}if(n&&i(n)){const e=await n.handleViewClick(t);if(e){const{fetchFeatures:t,title:o,...i}=e;delete e.fetchFeatures,Object.assign(n,i),void 0!==o&&(n.heading=o)}n.open=!0}}export{p as addPopup,u as closePopup,o as isPopup,i as isPopupElement,l as openPopupWithOptions,a as openPopupWithViewClick,t as popupFromView};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- const h={width:600,height:400},t=1.5;function i(i,e){e=e||h;let{width:d,height:n}=e;const g=d/n;return g<t?n=d/t:g>t&&(d=n*t),d>i.width&&(n*=i.width/d,d=i.width),n>i.height&&(d*=i.height/n,n=i.height),{width:Math.round(d),height:Math.round(n)}}export{i as getOptimalThumbnailSize};
2
+ import{id as t}from"../../kernel.js";import e from"../../request.js";import{isDataProtocol as i,getFilename as h}from"../../core/urlUtils.js";const n={width:600,height:400},r=1.5;function o(t,e){e=e||n;let{width:i,height:h}=e;const o=i/h;return o<r?h=i/r:o>r&&(i=h*r),i>t.width&&(h*=t.width/i,i=t.width),h>t.height&&(i*=t.height/h,h=t.height),{width:Math.round(i),height:Math.round(h)}}async function d(n,r,o){let d=n;const s=o?.id;return s&&n.includes(`/${s}/`)&&"public"!==o.access&&!i(n)&&!t?.findCredential(n)?.token&&t?.findServerInfo(n)?.webTierAuth&&(d=(await e(n,{responseType:"blob"})).data,r=r||h(n)),{thumbnail:d,filename:r}}export{d as getNormalizedThumbnailData,o as getOptimalThumbnailSize};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../core/Error.js";import{MultiOriginJSONSupport as t}from"../../core/MultiOriginJSONSupport.js";import{whenOnce as r}from"../../core/reactiveUtils.js";import{hasSameCanonicalPortal as o,urlToObject as a}from"../../core/urlUtils.js";import{updateOrigins as i}from"../../core/accessorSupport/originUtils.js";import n from"../../geometry/SpatialReference.js";import{webMercatorToGeographic as s}from"../../geometry/support/webMercatorUtils.js";import{isServerOrServicesAGOLUrl as l}from"../../layers/support/arcgisLayerUrl.js";import{isLayerWithFeatureLayerSource as p,isFeatureCollectionLayer as c}from"../../layers/support/layerUtils.js";import m from"../../portal/Portal.js";import u from"../../portal/PortalItem.js";import{createForItemWrite as d}from"../../portal/support/jsonContext.js";import{removeTypeKeyword as f,addTypeKeyword as y,typeKeyword as w,toggleTypeKeyword as g,hasTypeKeyword as h}from"../../portal/support/portalItemUtils.js";import{project as _}from"../../rest/geometryService/project.js";import b from"../../rest/support/ProjectParameters.js";import{hasDeveloperBasemapLayer as j,isDeveloperBasemapLayer as v}from"../../support/basemapUtils.js";import{saveResources as R}from"./resourceUtils.js";import{beforeSave as S,evaluateWriteErrors as W,hasCharts as I}from"./saveUtils.js";const P=["NatGeo_World_Map","Ocean_Basemap","USA_Topo_Maps","World_Imagery","World_Street_Map","World_Terrain_Base","World_Topo_Map","World_Hillshade","Canvas/World_Light_Gray_Base","Canvas/World_Light_Gray_Reference","Canvas/World_Dark_Gray_Base","Canvas/World_Dark_Gray_Reference","Ocean/World_Ocean_Base","Ocean/World_Ocean_Reference","Reference/World_Boundaries_and_Places","Reference/World_Reference_Overlay","Reference/World_Transportation"].map(e=>e.toLowerCase());async function A(e,t,o){o??={},U(e,t),await r(()=>!t.updatingFromView),await t.load(),await D(t),await S(t),await M(e,t);const a=t.portalItem,{json:i,jsonContext:n}=await O(t,a,e.origin);return W(n,{errorName:`${e.name}:save`},o),await k(t,a),await me(e,t,a,i,n),await Promise.all([t.updateItemThumbnail(),R(t.resourceReferences,n)]),a}async function O(e,t,r){const o=d(t,r,!0),a=e.write({},o);return await Promise.all(o.resources.pendingOperations),{json:a,jsonContext:o}}async function T(e,t,o,a){a??={};const i=E(e,o);await r(()=>!t.updatingFromView),await t.load(),await D(t),await S(t),await M(e,t);const{json:n,jsonContext:s}=await O(t,i,e.origin);W(s,{errorName:`${e.name}:save`},a),await Y(t,i);const l=t.getThumbnailState();return await ue(e,t,i,n,s,a)&&(t.resourceReferences.portalItem=i),t.restoreThumbnailFromState(l),await Promise.all([t.updateItemThumbnail(),R(t.resourceReferences,s)]),i}function U(t,r){if(!r.portalItem)throw new e(`${t.name}:portal-item-not-set`,"Portal item to save to has not been set on the WebMap");C(t,r.portalItem)}function C(t,r){if(r.type!==t.itemType)throw new e(`${t.name}:portal-item-wrong-type`,`Portal item needs to have type "${t.itemType}"`)}async function M(t,r){if("linkchart"!==t.name&&!r.basemap?.baseLayers.length)throw new e(`${t.name}:save`,"Map does not have a valid basemap with a base layer.")}function E(e,t){let r=u.from(t);return r.id&&(r=r.clone(),r.id=null),r.type||(r.type=e.itemType),r.portal||(r.portal=m.getDefault()),C(e,r),r}function D(e){const t=[];return e.basemap&&t.push(e.basemap.load()),e.ground&&t.push(e.ground.load()),Promise.allSettled(t).then(()=>{})}async function k(e,t){t.extent=await ae(e.portalItem,e.initialViewProperties.viewpoint.targetGeometry),await Z(e,t)}const x=w.JSAPI,G="CollectorDisabled",L="Collector",N="Data Editing",V="OfflineDisabled",B="Offline",$="Workforce Project",F="Workforce Worker",H="Workforce Dispatcher",K="Offline Map Areas",J="FieldMapsDisabled",q=w.DEVELOPER_BASEMAP,z="UtilityNetwork",Q="ParcelFabric",X="IPS";async function Y(e,t){f(t,G),f(t,J),f(t,w.METADATA),f(t,V),f(t,K),f(t,H),f(t,$),f(t,F),await k(e,t)}async function Z(e,t){y(t,x),await ee(e),g(t,L,!h(t,G)&&!h(t,$)&&!h(t,F)&&!h(t,H)&&re(e)),g(t,N,re(e)),g(t,B,!h(t,V)&&oe(e)),g(t,q,j(e.basemap)),g(t,z,!!e.utilityNetworks?.length),g(t,Q,!!e.parcelFabric),g(t,X,!!e.ipsInfo),g(t,w.CHARTS,I(e)),t.typeKeywords&&(t.typeKeywords=t.typeKeywords.filter((e,t,r)=>r.indexOf(e)===t))}function ee(e){const t=te(e).map(e=>e.load()).toArray();return Promise.allSettled(t).then(()=>{})}function te(e){return e.allLayers.concat(e.allTables)}function re(e){return te(e).some(e=>e.loaded&&p(e)&&e.capabilities.operations.supportsEditing&&"editingEnabled"in e&&e.editingEnabled&&("subtype-group"!==e.type||e.sublayers.some(e=>e.editingEnabled)))}function oe(e){return te(e).filter(e=>"group"!==e.type).every(t=>t.loaded&&se(e,t))}async function ae(e,t){const r=t.clone().normalize();let o;if(r.length>1)for(const a of r)o?a.width>o.width&&(o=a):o=a;else o=r[0];return ie(e,o)}async function ie(e,t){const r=t.spatialReference;if(r.isWGS84)return t.clone();if(r.isWebMercator)return s(t);const{getGeometryServiceURL:o}=await import("../../portal/support/geometryServiceUtils.js"),a=await o(e),i=new b({geometries:[t],outSpatialReference:n.WGS84});return(await _(a,i))[0]}function ne(e){return c(e)||"map-notes"===e.type||"route"===e.type}function se(e,t){return p(t)&&t.capabilities.operations.supportsSync||ne(t)&&!t.portalItem||le(t)&&!pe(t)&&t.spatialReference.equals(e.initialViewProperties.spatialReference)}function le(e){return"imagery-tile"===e.type?e.supportsExportMapTiles():("tile"===e.type||"vector-tile"===e.type)&&(e.capabilities.operations.supportsExportTiles||ce(e)||v(e))}function pe(e){return"vector-tile"===e.type&&Object.keys(e.sourceNameToSource).length>1}function ce(e){return"tile"===e.type&&(l(e.url)&&P.some(t=>e.url?.toLowerCase().includes("/"+t+"/")))}async function me(e,t,r,o,a){await r.update({data:o}),ye(e,t,r,o,a)}async function ue(t,r,o,a,i,n){const s=r.portalItem,l={item:s,authenticated:!(!s?.id||!s.portal.user)},p=o.portal;await p.signIn();const{copyAllowed:c,itemReloaded:m}=await de(l,p);if(l.authenticated||=m,!c)throw new e(`${t.name}:save-as-copy-not-allowed`,"Owner of this map does not allow others to save a copy");const u=await fe(o,l,a,n);return r.portalItem=o,ye(t,r,o,a,i),u}async function de(e,t){const{item:r,authenticated:o}=e;return r?.id&&r.typeKeywords?.includes("useOnly")?r.portal.portalHostname!==t.portalHostname?{copyAllowed:!1,itemReloaded:!1}:(o||await r.reload(),{copyAllowed:"admin"===r.itemControl||"update"===r.itemControl,itemReloaded:!0}):{copyAllowed:!0,itemReloaded:!1}}async function fe(e,t,r,a){const i=e.portal,{item:n}=t,{folder:s,copyAllResources:l}=a;let p=!1;if(l&&n?.id&&o(n.portal.url,i.url)&&parseInt(n.portal.currentVersion,10)>=2023){const{total:e}=await n.fetchResources();p=!!e}if(p){const t=await n.copy({copyResources:"all",folder:s});e.id=t.id,e.portal=t.portal;const o=e.toJSON();await e.load(),e.read(o),await e.update({data:r})}else await i.user.addItem({item:e,folder:s,data:r});return p}function ye(e,r,o,n,s){t.prototype.read.call(r,{version:n.version,authoringApp:n.authoringApp,authoringAppVersion:n.authoringAppVersion},{origin:e.origin,ignoreDefaults:!0,url:o.itemUrl?a(o.itemUrl):void 0}),i(s),r.resourceInfo=n}export{O as createJSON,fe as initializeNewItem,de as isCopyAllowed,A as save,T as saveAs};
2
+ import e from"../../core/Error.js";import{MultiOriginJSONSupport as t}from"../../core/MultiOriginJSONSupport.js";import{whenOnce as r}from"../../core/reactiveUtils.js";import{hasSameCanonicalPortal as o,urlToObject as a}from"../../core/urlUtils.js";import{updateOrigins as i}from"../../core/accessorSupport/originUtils.js";import n from"../../geometry/SpatialReference.js";import{webMercatorToGeographic as s}from"../../geometry/support/webMercatorUtils.js";import{isServerOrServicesAGOLUrl as l}from"../../layers/support/arcgisLayerUrl.js";import{isLayerWithFeatureLayerSource as p,isFeatureCollectionLayer as c}from"../../layers/support/layerUtils.js";import m from"../../portal/Portal.js";import u from"../../portal/PortalItem.js";import{createForItemWrite as d}from"../../portal/support/jsonContext.js";import{removeTypeKeyword as f,addTypeKeyword as y,typeKeyword as w,toggleTypeKeyword as g,hasTypeKeyword as h}from"../../portal/support/portalItemUtils.js";import{project as _}from"../../rest/geometryService/project.js";import b from"../../rest/support/ProjectParameters.js";import{hasDeveloperBasemapLayer as j,isDeveloperBasemapLayer as v}from"../../support/basemapUtils.js";import{saveResources as R}from"./resourceUtils.js";import{beforeSave as S,evaluateWriteErrors as W,hasCharts as I}from"./saveUtils.js";const P=["NatGeo_World_Map","Ocean_Basemap","USA_Topo_Maps","World_Imagery","World_Street_Map","World_Terrain_Base","World_Topo_Map","World_Hillshade","Canvas/World_Light_Gray_Base","Canvas/World_Light_Gray_Reference","Canvas/World_Dark_Gray_Base","Canvas/World_Dark_Gray_Reference","Ocean/World_Ocean_Base","Ocean/World_Ocean_Reference","Reference/World_Boundaries_and_Places","Reference/World_Reference_Overlay","Reference/World_Transportation"].map(e=>e.toLowerCase());async function A(e,t,o){o??={},U(e,t),await r(()=>!t.updatingFromView),await t.load(),await D(t),await S(t),await M(e,t);const a=t.portalItem,{json:i,jsonContext:n}=await O(t,a,e.origin);return W(n,{errorName:`${e.name}:save`},o),await k(t,a),await me(e,t,a,i,n),await Promise.all([t.updateItemThumbnail(),R(t.resourceReferences,n)]),a}async function O(e,t,r){const o=d(t,r,!0),a=e.write({},o);return await Promise.all(o.resources.pendingOperations),{json:a,jsonContext:o}}async function T(e,t,o,a){a??={};const i=t.portalItem,n=E(e,o);await r(()=>!t.updatingFromView),await t.load(),await D(t),await S(t),await M(e,t);const{json:s,jsonContext:l}=await O(t,n,e.origin);W(l,{errorName:`${e.name}:save`},a),await Y(t,n);const p=t.getThumbnailState();return await ue(e,t,n,s,l,a)&&(t.resourceReferences.portalItem=n),t.restoreThumbnailFromState(p),await Promise.all([t.updateItemThumbnail(i),R(t.resourceReferences,l)]),n}function U(t,r){if(!r.portalItem)throw new e(`${t.name}:portal-item-not-set`,"Portal item to save to has not been set on the WebMap");C(t,r.portalItem)}function C(t,r){if(r.type!==t.itemType)throw new e(`${t.name}:portal-item-wrong-type`,`Portal item needs to have type "${t.itemType}"`)}async function M(t,r){if("linkchart"!==t.name&&!r.basemap?.baseLayers.length)throw new e(`${t.name}:save`,"Map does not have a valid basemap with a base layer.")}function E(e,t){let r=u.from(t);return r.id&&(r=r.clone(),r.id=null),r.type||(r.type=e.itemType),r.portal||(r.portal=m.getDefault()),C(e,r),r}function D(e){const t=[];return e.basemap&&t.push(e.basemap.load()),e.ground&&t.push(e.ground.load()),Promise.allSettled(t).then(()=>{})}async function k(e,t){t.extent=await ae(e.portalItem,e.initialViewProperties.viewpoint.targetGeometry),await Z(e,t)}const x=w.JSAPI,G="CollectorDisabled",L="Collector",N="Data Editing",V="OfflineDisabled",B="Offline",$="Workforce Project",F="Workforce Worker",H="Workforce Dispatcher",K="Offline Map Areas",J="FieldMapsDisabled",q=w.DEVELOPER_BASEMAP,z="UtilityNetwork",Q="ParcelFabric",X="IPS";async function Y(e,t){f(t,G),f(t,J),f(t,w.METADATA),f(t,V),f(t,K),f(t,H),f(t,$),f(t,F),await k(e,t)}async function Z(e,t){y(t,x),await ee(e),g(t,L,!h(t,G)&&!h(t,$)&&!h(t,F)&&!h(t,H)&&re(e)),g(t,N,re(e)),g(t,B,!h(t,V)&&oe(e)),g(t,q,j(e.basemap)),g(t,z,!!e.utilityNetworks?.length),g(t,Q,!!e.parcelFabric),g(t,X,!!e.ipsInfo),g(t,w.CHARTS,I(e)),t.typeKeywords&&(t.typeKeywords=t.typeKeywords.filter((e,t,r)=>r.indexOf(e)===t))}function ee(e){const t=te(e).map(e=>e.load()).toArray();return Promise.allSettled(t).then(()=>{})}function te(e){return e.allLayers.concat(e.allTables)}function re(e){return te(e).some(e=>e.loaded&&p(e)&&e.capabilities.operations.supportsEditing&&"editingEnabled"in e&&e.editingEnabled&&("subtype-group"!==e.type||e.sublayers.some(e=>e.editingEnabled)))}function oe(e){return te(e).filter(e=>"group"!==e.type).every(t=>t.loaded&&se(e,t))}async function ae(e,t){const r=t.clone().normalize();let o;if(r.length>1)for(const a of r)o?a.width>o.width&&(o=a):o=a;else o=r[0];return ie(e,o)}async function ie(e,t){const r=t.spatialReference;if(r.isWGS84)return t.clone();if(r.isWebMercator)return s(t);const{getGeometryServiceURL:o}=await import("../../portal/support/geometryServiceUtils.js"),a=await o(e),i=new b({geometries:[t],outSpatialReference:n.WGS84});return(await _(a,i))[0]}function ne(e){return c(e)||"map-notes"===e.type||"route"===e.type}function se(e,t){return p(t)&&t.capabilities.operations.supportsSync||ne(t)&&!t.portalItem||le(t)&&!pe(t)&&t.spatialReference.equals(e.initialViewProperties.spatialReference)}function le(e){return"imagery-tile"===e.type?e.supportsExportMapTiles():("tile"===e.type||"vector-tile"===e.type)&&(e.capabilities.operations.supportsExportTiles||ce(e)||v(e))}function pe(e){return"vector-tile"===e.type&&Object.keys(e.sourceNameToSource).length>1}function ce(e){return"tile"===e.type&&(l(e.url)&&P.some(t=>e.url?.toLowerCase().includes("/"+t+"/")))}async function me(e,t,r,o,a){await r.update({data:o}),ye(e,t,r,o,a)}async function ue(t,r,o,a,i,n){const s=r.portalItem,l={item:s,authenticated:!(!s?.id||!s.portal.user)},p=o.portal;await p.signIn();const{copyAllowed:c,itemReloaded:m}=await de(l,p);if(l.authenticated||=m,!c)throw new e(`${t.name}:save-as-copy-not-allowed`,"Owner of this map does not allow others to save a copy");const u=await fe(o,l,a,n);return r.portalItem=o,ye(t,r,o,a,i),u}async function de(e,t){const{item:r,authenticated:o}=e;return r?.id&&r.typeKeywords?.includes("useOnly")?r.portal.portalHostname!==t.portalHostname?{copyAllowed:!1,itemReloaded:!1}:(o||await r.reload(),{copyAllowed:"admin"===r.itemControl||"update"===r.itemControl,itemReloaded:!0}):{copyAllowed:!0,itemReloaded:!1}}async function fe(e,t,r,a){const i=e.portal,{item:n}=t,{folder:s,copyAllResources:l}=a;let p=!1;if(l&&n?.id&&o(n.portal.url,i.url)&&parseInt(n.portal.currentVersion,10)>=2023){const{total:e}=await n.fetchResources();p=!!e}if(p){const t=await n.copy({copyResources:"all",folder:s});e.id=t.id,e.portal=t.portal;const o=e.toJSON();await e.load(),e.read(o),await e.update({data:r})}else await i.user.addItem({item:e,folder:s,data:r});return p}function ye(e,r,o,n,s){t.prototype.read.call(r,{version:n.version,authoringApp:n.authoringApp,authoringAppVersion:n.authoringAppVersion},{origin:e.origin,ignoreDefaults:!0,url:o.itemUrl?a(o.itemUrl):void 0}),i(s),r.resourceInfo=n}export{O as createJSON,fe as initializeNewItem,de as isCopyAllowed,A as save,T as saveAs};
@@ -45,6 +45,7 @@ export function accessibleHandler(): PropertyDecorator;
45
45
  * > Note that the first call to `render()` only occurs after all the properties decorated with `@messageBundle`
46
46
  * > have been populated with their corresponding bundle.
47
47
  *
48
+ * @deprecated since version 5.2. Widget translations will be removed alongside widgets. For your application's translation needs, use [fetch()](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch) directly or a dedicated translation library.
48
49
  * @param bundleId - The bundle identifier passed to [fetchMessageBundle()](https://developers.arcgis.com/javascript/latest/references/core/intl/#fetchMessageBundle).
49
50
  * @returns The property decorator.
50
51
  * @since 4.18
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[737,9296],{68197(e,t,n){n.d(t,{A:()=>u});var i=n(40876),r=n(4576),s=n(34727),o=n(56507);function a(e){return(0,s.qE)((0,o.Vr)(e),0,255)}function l(e,t){const n=e.toString(16).padStart(2,"0");return t?n.slice(0,1):n}class u{static blendColors(e,t,n,i=new u){return i.r=Math.round(e.r+(t.r-e.r)*n),i.g=Math.round(e.g+(t.g-e.g)*n),i.b=Math.round(e.b+(t.b-e.b)*n),i.a=e.a+(t.a-e.a)*n,i._sanitize()}static fromRgb(e,t){const n=(0,i.lT)(e);return n?u.fromArray(n,t):null}static fromHex(e,t=new u){const n=(0,i.oW)(e);return n?u.fromArray(n,t):null}static fromArray(e,t=new u){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const n=(0,i.Eq)(e);return n?u.fromArray(n,t):null}static fromJSON(e){return null!=e?new u([e[0],e[1],e[2],(e[3]??255)/255]):void 0}toUnitRGB(){return[this.r/255,this.g/255,this.b/255]}toUnitRGBA(e){return e??=[0,0,0,0],e[0]=this.r/255,e[1]=this.g/255,e[2]=this.b/255,e[3]=null!=this.a?this.a:1,e}constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(e){if("string"==typeof e)u.fromString(e,this);else if((0,r.yc)(e))u.fromArray(e,this);else{const t=e;this._set(t.r??0,t.g??0,t.b??0,t.a??1),e instanceof u||this._sanitize()}return this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(e){const t=e?.capitalize??!1,n=e?.digits??6,i=3===n||4===n,r=4===n||8===n,s=`#${l(this.r,i)}${l(this.g,i)}${l(this.b,i)}${r?l(Math.round(255*this.a),i):""}`;return t?s.toUpperCase():s}toCss(e=!1){const t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=0){const t=a(this.r),n=a(this.g),i=a(this.b);return 0===e||1!==this.a?[t,n,i,a(255*this.a)]:[t,n,i]}clone(){return new u(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return null!=e&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=(0,i.c1)(this.r),this.g=(0,i.c1)(this.g),this.b=(0,i.c1)(this.b),this.a=(0,i.G1)(this.a),this}_set(e,t,n,i){this.r=e,this.g=t,this.b=n,this.a=i}}u.prototype.declaredClass="esri.Color"},52106(e,t,n){n.d(t,{A:()=>I});var i,r,s=n(5482),o=n(37838),a=n(69540),l=n(51447),u=n(25482),c=n(53966),h=n(36708),d=n(24326),p=n(91429),f=n(12195),m=n(65864),y=n(50498),g=n(55156),b=n(60950),v=n(54339),M=n(94128),w=n(33910);function _(e){if(null==e)return null;const t={};for(const n in e){const i=e[n];i&&(t[n]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let I=class extends((0,a.OU)(u.o)){static{i=M.Z}static{r=this}constructor(e){super(e),this[i]=!0,this.distance=null,this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this.statisticsAggregatedIds=void 0,this._version=0,Object.defineProperty(this,"uid",{value:(0,d.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(c.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new r({aggregateGeometries:this.aggregateGeometries,statisticsAggregatedIds:this.statisticsAggregatedIds,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=(0,b.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;const n=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const t of[n,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const n=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",n,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=(0,g.I)(this.origin);if(e)return(0,v.r)(this,e);const t=this.sourceLayer??this.layer;return t?(0,v.r)(this,t):null}getGlobalId(){const e=(0,g.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);const t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){const e={aggregateGeometries:_(this.aggregateGeometries),geometry:this.geometry?.toJSON()??null,symbol:this.symbol?.toJSON()??null,attributes:(0,f.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null};return this.statisticsAggregatedIds?.length&&(e.aggregateIds=[...this.statisticsAggregatedIds]),null!=this.distance&&(e.distance=this.distance),e}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const n={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",n,n,e.action)}}_notifyLayer(e,t,n,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const r={graphic:this,property:e,oldValue:t,newValue:n};"origin-transform"===e&&(r.action=i),"attributes"===e&&(r.attributeName=i),this.layer.graphicChanged(r)}_watchMeshGeometryChanges(){this.addHandles([(0,h.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,h.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,s.Cg)([(0,p.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const n in e){const i=(0,m.rS)(e[n]);i&&(t[n]=i)}return 0!==Object.keys(t).length?t:null}}})],I.prototype,"aggregateGeometries",null),(0,s.Cg)([(0,p.MZ)({value:null})],I.prototype,"attributes",null),(0,s.Cg)([(0,p.MZ)({value:null,types:y.yR,json:{read:m.rS}})],I.prototype,"geometry",null),(0,s.Cg)([(0,p.MZ)()],I.prototype,"distance",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean})],I.prototype,"isAggregate",void 0),(0,s.Cg)([(0,p.MZ)({clonable:!1})],I.prototype,"layer",void 0),(0,s.Cg)([(0,p.MZ)({clonable:"reference"})],I.prototype,"origin",void 0),(0,s.Cg)([(0,p.MZ)({type:o.A,value:null})],I.prototype,"popupTemplate",null),(0,s.Cg)([(0,p.MZ)({clonable:"reference"})],I.prototype,"sourceLayer",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"aggregateIds",read:e=>e?.map(e=>Array.isArray(e)?JSON.stringify(e):e)}})],I.prototype,"statisticsAggregatedIds",void 0),(0,s.Cg)([(0,p.MZ)({value:null,types:w.Es})],I.prototype,"symbol",null),(0,s.Cg)([(0,p.MZ)({clonable:!1,json:{read:!1,write:!1}})],I.prototype,"_version",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,value:!0})],I.prototype,"visible",null),I=r=(0,s.Cg)([(0,p.$K)("esri.Graphic")],I)},40876(e,t,n){n.d(t,{Eq:()=>p,G1:()=>m,TS:()=>s,Tf:()=>b,V6:()=>r,Vm:()=>f,ay:()=>l,c1:()=>y,c4:()=>o,iw:()=>v,j5:()=>u,lT:()=>h,oW:()=>c,xV:()=>M});const i={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function r(e){return!!i[e]||!!i[e.toLowerCase()]}function s(e){return i[e]??i[e.toLowerCase()]}function o(e){return[...s(e)]}function a(e,t,n){n<0&&++n,n>1&&--n;const i=6*n;return i<1?e+(t-e)*i:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function l(e,t,n,i=1){const r=(e%360+360)%360/360,s=n<=.5?n*(t+1):n+t-n*t,o=2*n-s;return[Math.round(255*a(o,s,r+1/3)),Math.round(255*a(o,s,r)),Math.round(255*a(o,s,r-1/3)),i]}function u(e){const t=e.length>5,n=t?8:4,i=(1<<n)-1,r=t?1:17,s=t?9===e.length:5===e.length;let o=Number("0x"+e.slice(1));if(isNaN(o))return null;const a=[0,0,0,1];let l;return s&&(l=o&i,o>>=n,a[3]=r*l/255),l=o&i,o>>=n,a[2]=r*l,l=o&i,o>>=n,a[1]=r*l,l=o&i,o>>=n,a[0]=r*l,a}function c(e){if(!e.startsWith("#")||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{const t=parseInt(e.slice(1,2),16),n=parseInt(e.slice(2,3),16),i=parseInt(e.slice(3,4),16),r=4===e.length?15:parseInt(e.slice(4),16);return[t+16*t,n+16*n,i+16*i,(r+16*r)/255]}case 7:case 9:return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16),(7===e.length?255:parseInt(e.slice(7),16))/255];default:return null}}function h(e){const t=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(t){const e=t[2].split(/\s*,\s*/),n=t[1];if("rgb"===n&&3===e.length||"rgba"===n&&4===e.length){if(e[0].endsWith("%")){const t=e.map(e=>2.56*parseFloat(e));return 4===e.length&&(t[3]=parseFloat(e[3])),d(t)}return d(e.map(e=>parseFloat(e)))}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return l(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3]??"1"))}return null}function d(e){return e[0]=y(e[0]),e[1]=y(e[1]),e[2]=y(e[2]),e[3]=4===e.length?m(e[3]):1,e}function p(e){let t=r(e)?s(e):null;return t??=h(e),t??=c(e),t}function f(e){const t=p(e);return null!=t?[t[0]/255,t[1]/255,t[2]/255,t[3]]:null}function m(e){return g(e,0,1)}function y(e){return Math.round(g(e,0,255))}function g(e,t,n){return e=Number(e),isNaN(e)?n:e<t?t:e>n?n:e}const b=2.2,v=1/b;function M(e){return e**v}},66344(e,t,n){n.d(t,{q:()=>a});const i=!!(0,n(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class r{get size(){return this._size}constructor(e=10485760,t=.3){this._maxSize=e,this._maxClientSizeRatio=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(e){this._clients.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._clients.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(e,t){const n=this._db.get(e.id+t);return n?.size??0}put(e,t,n,r,o){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==n&&this._notifyRemove(t,a.entry,a.size,0)),r>this._maxSize)return void this._notifyRemove(t,n,r,0);if(void 0===n)return void console.warn("Refusing to cache undefined entry ");if(!r||r<0)return i||console.warn(`Refusing to cache entry with size ${r} for key ${t}`),void this._notifyRemove(t,n,0,0);const l=1+Math.max(o,-4)- -3;this._db.set(t,new s(n,r,l)),this._size+=r,e.size+=r,this._checkSize()}updateSize(e,t){t=e.id+t;const n=this._db.get(t);if(!n)return;this._size-=n.size,e.size-=n.size;let i=n.entry.usedMemory;for(;i>this._maxSize;){const e=this._notifyRemove(t,n.entry,i,1);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}n.size=i,this._size+=i,e.size+=i,this._checkSize()}pop(e,t){t=e.id+t;const n=this._db.get(t);if(n)return this._size-=n.size,e.size-=n.size,this._db.delete(t),++this._hit,n.entry;++this._miss}get(e,t){t=e.id+t;const n=this._db.get(t);if(void 0!==n)return this._db.delete(t),n.lives=n.lifetime,this._db.set(t,n),++this._hit,n.entry;++this._miss}peek(e,t){const n=this._db.get(e.id+t);return n?++this._hit:++this._miss,n?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},n=new Array;this._db.forEach((e,i)=>{const r=e.lifetime;n[r]=(n[r]||0)+e.size,this._clients.forEach(n=>{const{id:r,name:s}=n;if(i.startsWith(r)){const n=t[s]||0;t[s]=n+e.size}})});const i={};this._clients.forEach(e=>{const n=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const r=t[n]||0;t[n]=r,i[n]=Math.round(100*e.hitRate)+"%"}else i[n]="0%"});const r=Object.keys(t);r.sort((e,n)=>t[n]-t[e]),r.forEach(n=>e[n]=Math.round(t[n]/2**20)+"MB / "+i[n]);for(let t=n.length-1;t>=0;--t){const i=n[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._clients.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,n)=>{n.startsWith(t)&&(this._size-=e.size,this._db.delete(n),this._notifyRemove(n,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._clients.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,n]of this._db)t.startsWith(e.id)&&(yield n.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,n,i){const r=this._clients.get(e.split(o)[0])?.removeFunc,s=r?.(t,i,n);return"number"==typeof s?s:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._clients.forEach(e=>this._checkSizeLimits(this._maxClientSize,e)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const n=t??this;if(n.size<=e)return;const i=t?.id;let r=!0;for(;r;){r=!1;for(const[s,a]of this._db)if(0===a.lifetime&&(!i||s.startsWith(i))){const i=t??this._clients.get(s.split(o)[0]);if(this._purgeItem(s,a,i),n.size<=.9*e)return;r||=this._db.has(s)}}for(const[r,s]of this._db)if(!i||r.startsWith(i)){const i=t??this._clients.get(r.split(o)[0]);if(this._purgeItem(r,s,i),n.size<=.9*e)return}}_purgeItem(e,t,n){if(this._db.delete(e),t.lives<=1){this._size-=t.size,n&&(n.size-=t.size);const i=this._notifyRemove(e,t.entry,t.size,1);null!=i&&i>0&&(this._size+=i,n&&(n.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new r(0);class s{constructor(e,t,n){this.entry=e,this.size=t,this.lifetime=n,this.lives=n}}const o=":";class a{constructor(e,t){this.removeFunc=t,this.id="",this.name="",this.size=0,this._storage=new r(e,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,n=1){this._storage.put(this,e,t,n,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},6797(e,t,n){n.d(t,{Ui:()=>d});var i=n(69622),r=n(7762),s=n(88620);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof i.A}function l(e){return e instanceof r.A?Object.keys(e.items):a(e)?(0,s.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof r.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function h(e,t){const n=e.diff;if(n&&"function"==typeof n)return n(e,t);const i=l(e),r=l(t);if(0===i.length&&0===r.length)return;if(!i.length||!r.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const s=r.filter(e=>!i.includes(e)),d=i.filter(e=>!r.includes(e)),p=i.filter(n=>r.includes(n)&&u(e,n)!==u(t,n)).concat(s,d).sort(),f=c(e);if(f&&o.has(f)&&p.length)return{type:"complete",oldValue:e,newValue:t};let m;const y=a(e)&&a(t);for(const i of p){const r=u(e,i),s=u(t,i);let o;if((y||"function"!=typeof r&&"function"!=typeof s)&&r!==s&&(null!=r||null!=s)){if(n&&n[i]&&"function"==typeof n[i])o=n[i]?.(r,s);else if(r instanceof Date&&s instanceof Date){if(r.getTime()===s.getTime())continue;o={type:"complete",oldValue:r,newValue:s}}else o="object"==typeof r&&"object"==typeof s&&c(r)===c(s)?h(r,s):{type:"complete",oldValue:r,newValue:s};null!=o&&(null!=m?m.diff[i]=o:m={type:"partial",diff:{[i]:o}})}}return m}function d(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:h(e,t)}},9093(e,t,n){function i(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function r(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}n.d(t,{o8:()=>r,vt:()=>i,zK:()=>s});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:r,create:i,fromValues:function(e,t,n,i,r,s,o,a,l,u,c,h,d,p,f,m){return[e,t,n,i,r,s,o,a,l,u,c,h,d,p,f,m]}},Symbol.toStringTag,{value:"Module"}))},35522(e,t,n){n.d(t,{$A:()=>x,Bw:()=>s,C:()=>o,Cc:()=>A,DI:()=>_,Il:()=>D,Io:()=>b,Ln:()=>g,Om:()=>S,Qr:()=>h,Re:()=>u,S8:()=>I,T9:()=>m,WQ:()=>l,Z0:()=>C,_S:()=>p,aI:()=>O,ei:()=>F,fw:()=>z,g7:()=>j,gL:()=>T,hG:()=>v,hZ:()=>a,hs:()=>y,jb:()=>L,jk:()=>f,lo:()=>$,lw:()=>c,m3:()=>M,oW:()=>Z,t2:()=>k,tn:()=>d,uE:()=>G,xg:()=>q,ze:()=>w});var i=n(51850),r=n(34304);function s(e){const t=e[0],n=e[1],i=e[2];return Math.sqrt(t*t+n*n+i*i)}function o(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function a(e,t,n,i){return e[0]=t,e[1]=n,e[2]=i,e}function l(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function u(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function c(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e}function h(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e}function d(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e}function p(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e}function f(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e}function m(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e}function y(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function g(e,t,n,i){return e[0]=t[0]+n[0]*i,e[1]=t[1]+n[1]*i,e[2]=t[2]+n[2]*i,e}function b(e,t){const n=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2];return Math.sqrt(n*n+i*i+r*r)}function v(e,t){const n=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2];return n*n+i*i+r*r}function M(e){const t=e[0],n=e[1],i=e[2];return t*t+n*n+i*i}function w(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function _(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function I(e,t){const n=t[0],i=t[1],r=t[2];let s=n*n+i*i+r*r;return s>0&&(s=1/Math.sqrt(s),e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s),e}function S(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function x(e,t,n){const i=t[0],r=t[1],s=t[2],o=n[0],a=n[1],l=n[2];return e[0]=r*l-s*a,e[1]=s*o-i*l,e[2]=i*a-r*o,e}function A(e,t,n,i){const r=t[0],s=t[1],o=t[2];return e[0]=r+i*(n[0]-r),e[1]=s+i*(n[1]-s),e[2]=o+i*(n[2]-o),e}function C(e,t,n){const i=t[0],r=t[1],s=t[2];return e[0]=n[0]*i+n[4]*r+n[8]*s+n[12],e[1]=n[1]*i+n[5]*r+n[9]*s+n[13],e[2]=n[2]*i+n[6]*r+n[10]*s+n[14],e}function F(e,t,n){const i=t[0],r=t[1],s=t[2];return e[0]=i*n[0]+r*n[3]+s*n[6],e[1]=i*n[1]+r*n[4]+s*n[7],e[2]=i*n[2]+r*n[5]+s*n[8],e}function T(e,t,n){return z(e,t,n[0],n[1],n[2],n[3])}function z(e,t,n,i,r,s){const o=t[0],a=t[1],l=t[2],u=i*l-r*a,c=r*o-n*l,h=n*a-i*o,d=i*h-r*c,p=r*u-n*h,f=n*c-i*u,m=2*s;return e[0]=o+u*m+2*d,e[1]=a+c*m+2*p,e[2]=l+h*m+2*f,e}function j(e,t){I(R,e),I(E,t);const n=S(R,E);return n>1?0:n<-1?Math.PI:Math.acos(n)}const R=(0,i.vt)(),E=(0,i.vt)();function k(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function O(e,t){if(e===t)return!0;const n=e[0],i=e[1],s=e[2],o=t[0],a=t[1],l=t[2],u=(0,r.FD)();return Math.abs(n-o)<=u*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-a)<=u*Math.max(1,Math.abs(i),Math.abs(a))&&Math.abs(s-l)<=u*Math.max(1,Math.abs(s),Math.abs(l))}function Z(e,t,n){const i=n[0]-t[0],r=n[1]-t[1],s=n[2]-t[2];let o=i*i+r*r+s*s;return o>0?(o=1/Math.sqrt(o),e[0]=i*o,e[1]=r*o,e[2]=s*o,e):(e[0]=0,e[1]=0,e[2]=0,e)}const L=u,N=c,P=h,q=b,$=v,D=s,G=M;Object.freeze(Object.defineProperty({__proto__:null,abs:d,add:l,angle:j,bezier:function(e,t,n,i,r,s){const o=1-s,a=o*o,l=s*s,u=a*o,c=3*s*a,h=3*l*o,d=l*s;return e[0]=t[0]*u+n[0]*c+i[0]*h+r[0]*d,e[1]=t[1]*u+n[1]*c+i[1]*h+r[1]*d,e[2]=t[2]*u+n[2]*c+i[2]*h+r[2]*d,e},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},clamp:function(e,t=0,n=1){return e[0]=Math.min(Math.max(e[0],t),n),e[1]=Math.min(Math.max(e[1],t),n),e[2]=Math.min(Math.max(e[2],t),n),e},copy:o,cross:x,crossAndNormalize:function(e,t,n){const i=t[0],r=t[1],s=t[2],o=n[0],a=n[1],l=n[2],u=r*l-s*a,c=s*o-i*l,h=i*a-r*o,d=Math.sqrt(u*u+c*c+h*h);return e[0]=u/d,e[1]=c/d,e[2]=h/d,e},direction:Z,dist:q,distance:b,div:P,divide:h,dot:S,equals:O,exactEquals:k,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},hermite:function(e,t,n,i,r,s){const o=s*s,a=o*(2*s-3)+1,l=o*(s-2)+s,u=o*(s-1),c=o*(3-2*s);return e[0]=t[0]*a+n[0]*l+i[0]*u+r[0]*c,e[1]=t[1]*a+n[1]*l+i[1]*u+r[1]*c,e[2]=t[2]*a+n[2]*l+i[2]*u+r[2]*c,e},inverse:_,len:D,length:s,lerp:A,max:m,min:f,mul:N,multiply:c,negate:w,normalize:I,random:function(e,t=1){const n=r.Ov,i=2*n()*Math.PI,s=2*n()-1,o=Math.sqrt(1-s*s)*t;return e[0]=Math.cos(i)*o,e[1]=Math.sin(i)*o,e[2]=s*t,e},rotateX:function(e,t,n,i){const r=[],s=[];return r[0]=t[0]-n[0],r[1]=t[1]-n[1],r[2]=t[2]-n[2],s[0]=r[0],s[1]=r[1]*Math.cos(i)-r[2]*Math.sin(i),s[2]=r[1]*Math.sin(i)+r[2]*Math.cos(i),e[0]=s[0]+n[0],e[1]=s[1]+n[1],e[2]=s[2]+n[2],e},rotateY:function(e,t,n,i){const r=[],s=[];return r[0]=t[0]-n[0],r[1]=t[1]-n[1],r[2]=t[2]-n[2],s[0]=r[2]*Math.sin(i)+r[0]*Math.cos(i),s[1]=r[1],s[2]=r[2]*Math.cos(i)-r[0]*Math.sin(i),e[0]=s[0]+n[0],e[1]=s[1]+n[1],e[2]=s[2]+n[2],e},rotateZ:function(e,t,n,i){const r=[],s=[];return r[0]=t[0]-n[0],r[1]=t[1]-n[1],r[2]=t[2]-n[2],s[0]=r[0]*Math.cos(i)-r[1]*Math.sin(i),s[1]=r[0]*Math.sin(i)+r[1]*Math.cos(i),s[2]=r[2],e[0]=s[0]+n[0],e[1]=s[1]+n[1],e[2]=s[2]+n[2],e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:y,scaleAndAdd:g,set:a,sign:p,sqrDist:$,sqrLen:G,squaredDistance:v,squaredLength:M,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},sub:L,subtract:u,transformMat3:F,transformMat4:C,transformQuat:T,transformQuatValues:z},Symbol.toStringTag,{value:"Module"}))},90629(e,t,n){n.d(t,{Lz:()=>r,PN:()=>s,cr:()=>o,gs:()=>l,r_:()=>u,tc:()=>a}),n(39829);const i=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i;function r(e){return e?e/72*96:0}function s(e){return e?72*e/96:0}function o(e){if("string"==typeof e){const t=e.match(i);if(t){const n=Number(t[1]),i=t[3]&&t[3].toLowerCase(),r=e.startsWith("-"),o="px"===i?s(n):n;return r?-o:o}return console.warn("screenUtils.toPt: input not recognized!"),null}return e}function a(e=0,t=0){return{x:e,y:t}}function l(e=0,t=0){return[e,t]}function u(e=0,t=0,n=0){return[e,t,n]}},13069(e,t,n){n.d(t,{AG:()=>a,lk:()=>r,vD:()=>o,yS:()=>s});const i="randomUUID"in crypto;function r(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function s(){return`{${r().toUpperCase()}}`}function o(){return`{${r()}}`}function a(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},159(e,t,n){n.d(t,{A:()=>u});var i,r=n(5482),s=n(69540),o=n(25482),a=n(91429),l=n(99157);let u=i=class extends((0,s.OU)(o.o)){constructor(e){super(e),this.steps=[]}getInverse(){const e=new i;for(let t=this.steps.length-1;t>=0;t--){const n=this.steps[t];e.steps.push(n.getInverse())}return e}};(0,r.Cg)([(0,a.MZ)({type:[l.A],nonNullable:!0,json:{name:"geoTransforms"}})],u.prototype,"steps",void 0),u=i=(0,r.Cg)([(0,a.$K)("esri.geometry.operators.support.GeographicTransformation")],u)},99157(e,t,n){n.d(t,{A:()=>l});var i,r=n(5482),s=n(69540),o=n(25482),a=n(91429);let l=i=class extends((0,s.OU)(o.o)){constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new i({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,r.Cg)([(0,a.MZ)({json:{name:"transformForward",read:e=>!e,write:(e,t,n)=>{t[n]=!e}}})],l.prototype,"isInverse",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],l.prototype,"wkt",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],l.prototype,"wkid",void 0),l=i=(0,r.Cg)([(0,a.$K)("esri.geometry.operators.support.GeographicTransformationStep")],l)},9762(e,t,n){n.r(t),n.d(t,{projectBuffer:()=>r});var i=n(49208);function r(e,t,n,r,s,o,a=Math.floor(e.length/3)){const l=(0,i.jd)(t,s);if(null==l)return!1;if(l===i.pO){if(e===r&&n===o)return!0;const t=n+3*a;for(let i=n,s=o;i<t;i++,s++)r[s]=e[i]??0;return!0}const u=n+3*a;for(let t=n,i=o;t<u;t+=3,i+=3)l(e,t,r,i);return!0}},49208(e,t,n){n.d(t,{Tp:()=>h,jd:()=>c,pO:()=>p,w5:()=>u});var i=n(34727),r=n(86211),s=n(73941),o=n(79258),a=n(34403),l=n(21325);const u={2:{5:p,7:null,9:null,10:p,1:w,6:null,8:null,0:null,3:m,11:y,2:p,4:A},5:{5:p,7:null,9:null,10:p,1:w,6:null,8:null,0:null,3:m,11:y,2:p,4:A},7:{5:null,7:p,9:null,10:p,1:null,6:M,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:p,10:p,1:null,6:null,8:v,0:null,3:null,11:null,2:null,4:null},3:{5:f,7:null,9:null,10:f,1:function(e,t,n,i){const r=e[t]/R,s=j-2*Math.atan(Math.exp(-e[t+1]/R)),o=R+(e[t+2]??0),a=Math.cos(s)*o;n[i]=Math.cos(r)*a,n[i+1]=Math.sin(r)*a,n[i+2]=Math.sin(s)*o},6:null,8:null,0:null,3:p,11:function(e,t,n,i){f(e,t,n,i),y(n,i,n,i)},2:f,4:function(e,t,n,i){f(e,t,n,i),A(n,i,n,i)}},4:{5:C,7:null,9:null,10:C,1:function(e,t,n,i){C(e,t,n,i),w(n,i,n,i)},6:null,8:null,0:null,3:function(e,t,n,i){C(e,t,n,i),m(n,i,n,i)},11:function(e,t,n,i){C(e,t,n,i),y(n,i,n,i)},2:C,4:p},1:{5:x,7:null,9:null,10:x,1:p,6:null,8:null,0:null,3:function(e,t,n,i){x(e,t,n,i),m(n,i,n,i)},11:function(e,t,n,i){x(e,t,n,i),y(n,i,n,i)},2:x,4:function(e,t,n,i){x(e,t,n,i),A(n,i,n,i)}},6:{5:null,7:S,9:null,10:S,1:null,6:p,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:I,10:I,1:null,6:null,8:p,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:p,3:null,11:null,2:null,4:null},10:{5:p,7:p,9:p,10:p,1:w,6:M,8:v,0:null,3:m,11:y,2:p,4:A},11:{5:g,7:null,9:null,10:g,1:function(e,t,n,i){g(e,t,n,i),w(n,i,n,i)},6:null,8:null,0:null,3:function(e,t,n,i){g(e,t,n,i),m(n,i,n,i)},11:p,2:g,4:function(e,t,n,i){g(e,t,n,i),A(n,i,n,i)}}};function c(e,t){return h(e,t)?.projector}function h(e,t){if(null==e||null==t)return null;if(F.source.spatialReference===e&&F.dest.spatialReference===t)return F;const n=d(e,F.source),i=d(t,F.dest);return 0===n&&0===i?(0,l.aI)(e,t)?F.projector=p:F.projector=null:F.projector=u[n][i],F}function d(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,r.GA)(e,1)),(0,s.jA)(e)?t.spatialReferenceId=1:(0,l.oT)(e)?t.spatialReferenceId=2:(0,l.K8)(e)?t.spatialReferenceId=3:(0,l.r1)(e)?t.spatialReferenceId=11:e.wkt===s.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===s.FY.wkt?t.spatialReferenceId=6:e.wkt===s.LJ.wkt?t.spatialReferenceId=8:(0,s.q8)(e)?t.spatialReferenceId=7:(0,s.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function p(e,t,n,i){e!==n&&(n[i++]=e[t++],n[i++]=e[t++],n[i]=e[t]??0)}function f(e,t,n,i){n[i]=z*(e[t]/R),n[i+1]=z*(j-2*Math.atan(Math.exp(-e[t+1]/R))),n[i+2]=e[t+2]??0}function m(e,t,n,r){!function(e,t,n,r,s){const o=.4999999*Math.PI,a=(0,i.qE)(T*e[t+1],-o,o),l=Math.sin(a);n[r++]=T*e[t]*s.radius,n[r++]=s.halfSemiMajorAxis*Math.log((1+l)/(1-l)),n[r]=e[t+2]??0}(e,t,n,r,o.$O)}function y(e,t,n,i){n[i]=e[t]*E,n[i+1]=e[t+1]*E,n[i+2]=e[t+2]??0}function g(e,t,n,i){n[i]=e[t]*k,n[i+1]=e[t+1]*k,n[i+2]=e[t+2]??0}function b(e,t,n,i,r){const s=r+(e[t+2]??0),o=T*e[t],a=T*e[t+1],l=Math.cos(a)*s;n[i]=Math.cos(o)*l,n[i+1]=Math.sin(o)*l,n[i+2]=Math.sin(a)*s}function v(e,t,n,i){b(e,t,n,i,o.Sw.radius)}function M(e,t,n,i){b(e,t,n,i,o.sH.radius)}function w(e,t,n,i){b(e,t,n,i,o.$O.radius)}function _(e,t,n,r,s){const o=e[t],a=e[t+1],l=e[t+2]??0,u=Math.sqrt(o*o+a*a+l*l),c=(0,i.YN)(l/(0===u?1:u)),h=Math.atan2(a,o);n[r++]=z*h,n[r++]=z*c,n[r]=u-s}function I(e,t,n,i){_(e,t,n,i,o.Sw.radius)}function S(e,t,n,i){_(e,t,n,i,o.sH.radius)}function x(e,t,n,i){_(e,t,n,i,o.$O.radius)}function A(e,t,n,i){!function(e,t,n,i,r){const s=T*e[t],o=T*e[t+1],a=e[t+2]??0,l=Math.sin(o),u=Math.cos(o),c=r.radius/Math.sqrt(1-r.eccentricitySquared*l*l);n[i++]=(c+a)*u*Math.cos(s),n[i++]=(c+a)*u*Math.sin(s),n[i++]=(c*(1-r.eccentricitySquared)+a)*l}(e,t,n,i,o.$O)}function C(e,t,n,i){const r=a.TP,s=e[t],l=e[t+1],u=e[t+2]??0;let c,h,d,p,f,m,y,g,b,v,M,w,_,I,S,x,A,C,F,T,j;c=Math.abs(u),h=s*s+l*l,d=Math.sqrt(h),p=h+u*u,f=Math.sqrt(p),T=Math.atan2(l,s),m=u*u/p,y=h/p,I=r.a2/f,S=r.a3-r.a4/f,y>.3?(g=c/f*(1+y*(r.a1+I+m*S)/f),F=Math.asin(g),v=g*g,b=Math.sqrt(1-v)):(b=d/f*(1-m*(r.a5-I-y*S)/f),F=Math.acos(b),v=1-b*b,g=Math.sqrt(v)),M=1-o.$O.eccentricitySquared*v,w=o.$O.radius/Math.sqrt(M),_=r.a6*w,I=d-w*b,S=c-_*g,A=b*I+g*S,x=b*S-g*I,C=x/(_/M+A),F+=C,j=A+x*C/2,u<0&&(F=-F),n[i++]=z*T,n[i++]=z*F,n[i]=j}const F={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:p},T=(0,i.kU)(1),z=(0,i.KJ)(1),j=.5*Math.PI,R=o.$O.radius,E=R*Math.PI/180,k=180/(R*Math.PI)},91218(e,t,n){n.r(t),n.d(t,{canProjectWithoutEngine:()=>K,initializeProjection:()=>J,isEqualBaseGCS:()=>H,isLoaded:()=>R,isLoadedOrLoad:()=>E,isLoadedOrLoadFor:()=>k,load:()=>Z,project:()=>L,projectAsync:()=>U,projectExtent:()=>re,projectMany:()=>N,projectMultipoint:()=>Q,projectOrLoad:()=>q,projectOrLoadMany:()=>$,projectPoint:()=>W,projectPolygon:()=>ne,projectPolyline:()=>ee,projectWithoutEngine:()=>B,requiresLoad:()=>O,test:()=>V,tryProject:()=>P,unload:()=>G});var i=n(49186),r=n(17676),s=n(62788),o=n(95488),a=n(51850),l=n(21276),u=n(73941),c=n(5443),h=n(91075),d=n(48526),p=n(86738),f=n(39829),m=n(82799),y=n(16930),g=n(98764),b=n(159),v=n(9762),M=n(49208);function w(e,t,n,i,r,s){return _[0]=e,_[1]=t,_[2]=n,(0,v.projectBuffer)(_,i,0,r,s,0)}const _=(0,a.vt)();var I=n(60408),S=n(21325),x=n(52006);let A=null,C=null,F=null,T=null,z={};const j=new o.I;function R(){return!!(C?.isLoaded()&&F?.isLoaded()&&T?.isLoaded())}function E(){return!!R()||((0,s.gc)(j),Z(),!1)}function k(e,t){return!e||!t||K(e,t)||E()}function O(e,t){return!K(e,t)&&!R()}async function Z(e){null==A&&(A=Promise.all([n.e(3276).then(n.bind(n,83276)).then(e=>(C=e,C.load())),n.e(8377).then(n.bind(n,8377)).then(e=>(F=e,F.load())),n.e(2158).then(n.bind(n,12158)).then(e=>(T=e,T.load()))])),await A,(0,r.Te)(e),j.notify()}function L(e,t,n){return Array.isArray(e)?0===e.length?[]:((0,l.H)(e),N(e,e[0].spatialReference,t,n)):((0,l.f)(e),N([e],e.spatialReference,t,n)[0])}function N(e,t,n,i){if(null==t||null==n)return e;if(K(t,n,i))return e.map(e=>B(e,t,n));if(null==i?.geographicTransformation&&(0,u.jA)(t))return N(e.map(e=>B(e,t,y.A.WGS84)),y.A.WGS84,n,{zConversionDisabled:i?.zConversionDisabled});if(null==i?.geographicTransformation&&(0,u.jA)(n))return N(e,t,y.A.WGS84).map(e=>B(e,y.A.WGS84,n));if(!R())throw new D;if(!i?.geographicTransformation)if(i?.extendedParams)i={...i,geographicTransformation:T.getTransformation(t,n,i.areaOfInterestExtent)||new b.A};else if(!i?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,n);let r=z[e];r||(r=T.getTransformation(t,n)||new b.A,z[e]=r),i={geographicTransformation:r,zConversionDisabled:i?.zConversionDisabled}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof h.A?C.executeMany(e,n,i):F.executeMany(e,n,i)}function P(e,t,n){try{return L(e,t,n)}catch(e){return null}}function q(e,t){const n=$([e],t);return null!=n.pending?{pending:n.pending,geometry:null}:null!=n.geometries?{pending:null,geometry:n.geometries[0]}:{pending:null,geometry:null}}function $(e,t,n){if(!R())for(const n of e)if(null!=n&&!(0,S.aI)(n.spatialReference,t)&&(0,S.fn)(n.spatialReference)&&(0,S.fn)(t)&&!K(n.spatialReference,t))return(0,s.gc)(j),{pending:Z(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,S.aI)(e.spatialReference,t)?e:(0,S.fn)(e.spatialReference)&&(0,S.fn)(t)?L(e,t,n):null)}}class D extends i.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function G(){A=null,C=null,F=null,T=null,z={}}const V={get loadPromise(){return A}};async function U(e,t,n){if((0,r.Te)(n),!e)return e;const i=$(Array.isArray(e)?e:[e],t,n);if(i.pending)return await i.pending,(0,r.Te)(n),U(e,t,n);const s=i.geometries??[];return Array.isArray(e)?s:s[0]}function K(e,t,n){return!(n?.areaOfInterestExtent||n?.extendedParams||n?.geographicTransformation)&&(!!(0,S.aI)(e,t)||(0,S.fn)(e)&&(0,S.fn)(t)&&!!(0,M.jd)(e,t))}function H(e,t){if((0,S.aI)(e,t))return!0;if(!(0,S.fn)(e)||!(0,S.fn)(t))return!1;const n=(0,S.oT)(e)||(0,S.K8)(e)||(0,S.x1)(e),i=(0,S.oT)(t)||(0,S.K8)(t)||(0,S.x1)(t);return n&&i}async function J(e,t,n,i){if(R())return(0,r.NO)(i);if(Array.isArray(e)){for(const{source:t,dest:n,options:r}of e)if(t&&n&&!K(t,n,r))return Z(i)}else if(e&&t&&!K(e,t,n))return Z(i);return(0,r.NO)(i)}function B(e,t,n){return e?(0,I.fT)(e)?Y(e,t,new p.A,n,0):(0,I.ZC)(e)?se(e,t,new c.A,n,0):(0,I.Bi)(e)?ie(e,t,new f.A,n,0):(0,I.Rg)(e)?te(e,t,new m.A,n,0):(0,I.U9)(e)?X(e,t,new d.A,n,0):null:null}function W(e,t,n=t.spatialReference,i=0){return null!=n&&null!=e.spatialReference&&null!=Y(e,e.spatialReference,t,n,i)}function Y(e,t,n,i,r){ue[0]=e.x,ue[1]=e.y;const s=e.z;return ue[2]=void 0!==s?s:r,(0,v.projectBuffer)(ue,t,0,ue,i,0)?(n.x=ue[0],n.y=ue[1],n.spatialReference=i,void 0!==s||(0,u.xP)(i)?(n.z=ue[2],n.hasZ=!0):(n.z=void 0,n.hasZ=!1),void 0===e.m?(n.m=void 0,n.hasM=!1):(n.m=e.m,n.hasM=!0),n):null}function Q(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=X(e,e.spatialReference,t,n,i)}function X(e,t,n,i,r){const{points:s,hasZ:o,hasM:a}=e,l=[],u=s.length,c=[];for(const e of s)c.push(e[0],e[1],o?e[2]:r);if(!(0,v.projectBuffer)(c,t,0,c,i,0,u))return null;const h=le(o,i);for(let e=0;e<u;++e){const t=3*e,n=c[t],i=c[t+1];h&&a?l.push([n,i,c[t+2],s[e][3]]):h?l.push([n,i,c[t+2]]):a?l.push([n,i,s[e][2]]):l.push([n,i])}return n.points=l,n.spatialReference=i,n.hasZ=o,n.hasM=a,n}function ee(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=te(e,e.spatialReference,t,n,i)}function te(e,t,n,i,r){const{curvePaths:s,paths:o,hasZ:a,hasM:l}=e;if(!(s?ae(s,a??!1,l??!1,t,n.curvePaths=[],i,r):oe(o,a??!1,l??!1,t,n.paths,i,r)))return null;const u=le(a,i);return n.spatialReference=i,n.hasZ=u,n.hasM=l,n}function ne(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=ie(e,e.spatialReference,t,n,i)}function ie(e,t,n,i,r){const{curveRings:s,rings:o,hasZ:a,hasM:l}=e;return(s?ae(s,a??!1,l??!1,t,n.curveRings=[],i,r):oe(o,a??!1,l??!1,t,n.rings,i,r))?(n.spatialReference=i,n.hasZ=le(a,i),n.hasM=l,n):null}function re(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=se(e,e.spatialReference,t,n,i)}function se(e,t,n,i,r){const{xmin:s,ymin:o,xmax:a,ymax:l,hasZ:u,hasM:c}=e;if(!w(s,o,u?e.zmin:r,t,ue,i))return null;const h=le(u,i);return n.xmin=ue[0],n.ymin=ue[1],h&&(n.zmin=ue[2]),w(a,l,u?e.zmax:r,t,ue,i)?(n.xmax=ue[0],n.ymax=ue[1],h&&(n.zmax=ue[2]),c&&(n.mmin=e.mmin,n.mmax=e.mmax),n.spatialReference=i,n):null}function oe(e,t,n,i,r,s,o=0){const a=new Array;for(const n of e)for(const e of n)a.push(e[0],e[1],t?e[2]:o);if(!(0,v.projectBuffer)(a,i,0,a,s,0))return!1;let l=0;r.length=0;const u=t?3:2,c=le(t,s);for(const t of e){const e=new Array;for(const i of t){const t=a.slice(l,l+=3);c||t.pop(),n&&t.push(i[u]),e.push(t)}r.push(e)}return!0}function ae(e,t,n,i,r,s,o=0){const a=new Array;for(const n of e)for(const e of n){if((0,x.FG)(e))return!1;if((0,x.aO)(e)){const[n,i]=e.c;a.push(n[0],n[1],t?n[2]:o,i[0],i[1],o);continue}if((0,x.n1)(e)){const[n,i,r]=e.b;a.push(n[0],n[1],t?n[2]:o,i[0],i[1],o,r[0],r[1],o);continue}const n=e;a.push(n[0],n[1],t?n[2]:o)}if(!(0,v.projectBuffer)(a,i,0,a,s,0))return!1;let l=0;r.length=0;const u=t?3:2,c=le(t,s);for(const t of e){const e=new Array;for(const i of t){const t=a.slice(l,l+=3);if(c||t.pop(),n&&t.push((0,x.yP)(i)[u]),(0,x.FG)(i))return!1;if((0,x.aO)(i)){const n=a[l++],i=a[l++];++l,e.push({c:[t,[n,i]]});continue}if((0,x.n1)(i)){const n=a[l++],i=a[l++];++l;const r=a[l++],s=a[l++];++l,e.push({b:[t,[n,i],[r,s]]});continue}e.push(t)}r.push(e)}return!0}function le(e,t){return e||(0,u.xP)(t)||(0,S.aI)(t,g.Y0)}const ue=(0,a.vt)()},98764(e,t,n){n.d(t,{GD:()=>o,Y0:()=>u,lO:()=>c});var i=n(73941),r=n(16930),s=n(21325);const o=new r.A(i.fv),a=new r.A(i.FY),l=new r.A(i.LJ),u=new r.A(i.Ro);function c(e){const t=h.get(e);if(t)return t;let n=o;if(e)if(e===a)n=a;else if(e===l)n=l;else{const t=e.wkid,i=e.latestWkid;if(null!=t||null!=i)(0,s.tl)(t)||(0,s.tl)(i)?n=a:((0,s.ZL)(t)||(0,s.ZL)(i))&&(n=l);else{const t=e.wkt2??e.wkt;if(t){const e=t.toUpperCase();e===d?n=a:e===p&&(n=l)}}}return h.set(e,n),n}const h=new Map,d=a.wkt.toUpperCase(),p=l.wkt.toUpperCase()},4197(e,t,n){n.d(t,{Vj:()=>c,cj:()=>u,jh:()=>s,l5:()=>a,yH:()=>l});var i=n(34275),r=n(9093);function s(e){return e<=i.y9?new Array(e).fill(0):new Float64Array(e)}function o(e){return((0,i.iu)(e)?e.byteLength/8:e.length)<=i.y9?Array.from(e):new Float64Array(e)}function a(e,t,n){return Array.isArray(e)?e.slice(t,t+n):e.subarray(t,t+n)}function l(e,t){if(0===t.length)return o(e);if(0===e.length)return o(t);const n=s(e.length+t.length);for(let t=0;t<e.length;++t)n[t]=e[t];for(let i=0;i<t.length;++i)n[e.length+i]=t[i];return n}function u(e){return[...e]}function c(e){const t=(0,r.vt)();for(let n=0;n<16;++n)t[n]=e[n];return t}},70328(e,t,n){n.d(t,{BI:()=>v,DC:()=>h,Ej:()=>p,Ie:()=>g,Jt:()=>b,Ne:()=>f,RF:()=>c,aI:()=>w,fA:()=>o,gE:()=>l,hZ:()=>y,iT:()=>d,is:()=>M,qv:()=>_,vI:()=>m,vY:()=>a,v_:()=>I,vt:()=>s,w1:()=>u}),n(35522);var i=n(5443),r=(n(19419),n(4197));function s(e=I){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,n,i,r,o,a=s()){return a[0]=e,a[1]=t,a[2]=n,a[3]=i,a[4]=r,a[5]=o,a}function a(e,t=s()){return function(e,t,n,i=s()){return y(i,_),function(e,t,n=0,i=t.length/3){let r=e[0],s=e[1],o=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<i;e++)r=Math.min(r,t[n+3*e]),s=Math.min(s,t[n+3*e+1]),o=Math.min(o,t[n+3*e+2]),a=Math.max(a,t[n+3*e]),l=Math.max(l,t[n+3*e+1]),u=Math.max(u,t[n+3*e+2]);e[0]=r,e[1]=s,e[2]=o,e[3]=a,e[4]=l,e[5]=u}(i,e,t,n),i}(e,0,e.length/3,t)}function l(e,t=(0,r.jh)(24)){const[n,i,s,o,a,l]=e;return t[0]=n,t[1]=i,t[2]=s,t[3]=n,t[4]=i,t[5]=l,t[6]=n,t[7]=a,t[8]=s,t[9]=n,t[10]=a,t[11]=l,t[12]=o,t[13]=i,t[14]=s,t[15]=o,t[16]=i,t[17]=l,t[18]=o,t[19]=a,t[20]=s,t[21]=o,t[22]=a,t[23]=l,t}function u(e,t){const n=isFinite(e[2])||isFinite(e[5]);return new i.A(n?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function h(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function d(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function p(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function f(e,t,n=e){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n!==e&&(n[3]=e[3],n[4]=e[4],n[5]=e[5]),n}function m(e,t,n=e){return n[3]=t[0],n[4]=t[1],n[5]=t[2],n!==e&&(n[0]=e[0],n[1]=e[1],n[2]=e[2]),e}function y(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function g(e){return e?y(e,_):s(_)}function b(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function v(e,t,n,i,r){return e[0]=t,e[1]=n,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=r,e[5]=Number.POSITIVE_INFINITY,e}function M(e){return 6===e.length}function w(e,t,n){if(null==e||null==t)return e===t;if(!M(e)||!M(t))return!1;if(n){for(let i=0;i<e.length;i++)if(!n(e[i],t[i]))return!1}else for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}const _=[1/0,1/0,1/0,-1/0,-1/0,-1/0],I=[0,0,0,0,0,0];s()},34403(e,t,n){n.d(t,{TP:()=>o});var i=n(79258);Math.PI;const r=i.$O.radius,s=i.$O.eccentricitySquared,o={a1:r*s,a2:r*s*r*s,a3:r*s*s/2,a4:r*s*r*s*2.5,a5:r*s+r*s*s/2,a6:1-s};i.$O.radius,i.$O.flattening,i.Sw.radius,i.Sw.flattening,i.sH.radius,i.sH.flattening,i.sH.radius},50498(e,t,n){n.d(t,{Ye:()=>h,gy:()=>c,iI:()=>p,yR:()=>d});var i=n(66552),r=n(5443),s=n(91075),o=n(48526),a=n(86738),l=n(39829),u=n(82799);const c=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),h=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),d={base:s.A,key:"type",typeMap:{extent:r.A,multipoint:o.A,point:a.A,polyline:u.A,polygon:l.A}},p=new i.J({esriGeometryBezier3Curve:"cubic-bezier",esriGeometryCircularArc:"circular-arc",esriGeometryEllipticArc:"elliptic-arc"},{ignoreUnknown:!0})},55156(e,t,n){n.d(t,{I:()=>r,e:()=>i});const i=Symbol("idFieldsProviderSymbol");function r(e){return(t=e)&&i in t?e[i]:void 0;var t}},20737(e,t,n){n.r(t),n.d(t,{default:()=>Y});var i=n(5482),r=n(37838),s=n(11254),o=n(69540),a=n(7762),l=n(49186),u=n(36563),c=n(25728),h=n(17676),d=n(36708),p=n(84952),f=n(91429),m=n(16930),y=n(4146),g=n(52136),b=n(18768),v=n(63074),M=n(69208),w=n(47685),_=n(10086),I=n(34287),S=n(8303),x=n(54310),A=n(25036),C=n(82935),F=n(4902),T=n(92474),z=n(55156),j=n(60950),R=n(89808),E=n(99959);const k=Symbol("isAnnotationFeatureGraphicOrigin");var O;class Z extends E.A{get[(O=k,j.ym)](){return this.layer}get[z.e](){return this.layer}get[R.Q](){return this.layer}constructor(e){super(),this[O]=!0,this.type="annotation-feature",this.sublayer=e}get layer(){return this.sublayer.parent}get id(){return`${this.layer.id}:__${this.sublayer.subtypeCode}__`}}let L=class extends((0,o.OU)((0,F.s)(T.x_))){constructor(e){super(e),this.graphicOrigin=new Z(this),this.parent=null,this.subtypeCode=null,this.type="annotation-feature-sublayer",this.visible=!0}get title(){return this.parent?.subtypes?.find(e=>e.code===this.subtypeCode)?.name??null}};(0,i.Cg)([(0,f.MZ)({readOnly:!0,clonable:!1})],L.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,f.MZ)({clonable:!1})],L.prototype,"parent",void 0),(0,i.Cg)([(0,f.MZ)({type:Number})],L.prototype,"subtypeCode",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],L.prototype,"title",null),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],L.prototype,"type",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean})],L.prototype,"visible",void 0),L=(0,i.Cg)([(0,f.$K)("esri.layers.support.AnnotationFeatureSublayer")],L);var N=n(60694),P=n(10873),q=n(15426),$=n(17036),D=n(30524),G=n(91908),V=n(97552),U=n(30291),K=n(36005);const H="annotation-feature-layer",J=(0,$.p)(),B=a.A.ofType(L);let W=class extends((0,_.j)((0,v.dM)((0,C.e)((0,w.w6)((0,A.j)((0,x.J)((0,b.b)((0,I.q)((0,S.A)((0,c.M)((0,M.d)((0,g.p)((0,o.OU)(y.A)))))))))))))){constructor(e){super(e),this._sublayerLookup=new Map,this.barrierWeight="high",this.elementField="element",this.fields=null,this.fieldsIndex=null,this.operationalLayerType="ArcGISAnnotationLayer",this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.source=null,this.sublayers=new B,this.sublayerTitleMode="item-title",this.supportedSourceTypes=new Set(["Annotation Layer"]),this.type="annotation-feature",this._dataElementPromise=null,this.addHandles((0,d.wB)(()=>this.sublayers,(e,t)=>this._handleSublayersChange(e,t),d.OH))}destroy(){this.source?.destroy()}load(e){const t=e?.signal,n=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(h.QP).then(async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstValidLayerId(t);null!=e&&(this.layerId=e)}if(!this.url)throw new l.A(`${H}:missing-url`,"AnnotationFeatureLayer must be created with a url");return this.initLayerProperties(await this.createGraphicsSource(t))}).then(()=>(0,q.VA)(this,"load",e));return this.addResolvingPromise(n),Promise.resolve(this)}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get effectiveEditingEnabled(){return!1}get defaultPopupTemplate(){return this.createPopupTemplate()}readSublayers(e,t){const n=new B(t.subtypes.map(({code:e})=>new L({subtypeCode:e})).reverse());if(this.visibleLayers){const e=new Set(this.visibleLayers);n.forEach(t=>{t.visible=e.has(t.subtypeCode)})}return n}readTitleFromService(e,t){const{url:n}=this,i=t.name||(0,N.qg)(n)?.title;switch(this.sublayerTitleMode){case"item-title":if(n)return(0,N.yG)(n,i);break;case"item-title-and-service-name":{let e=this.portalItem?.title;if(e&&e!==i)return e=(0,N.cr)(e),i?`${e} - ${(0,N.cr)(i)}`:e;break}}return i?(0,N.cr)(i):void 0}readTitleFromPortalItem(e){return"item-title"===this.sublayerTitleMode?e:void 0}get visibleLayers(){return 0===this.sublayers.length?this._get("visibleLayers")??null:Array.from(new Set(this.sublayers?.toArray().filter(e=>e.visible).map(e=>e.subtypeCode).sort((e,t)=>e-t)??null))}set visibleLayers(e){this._set("visibleLayers",e)}createPopupTemplate(e){return(0,U.tn)(this,e)}async createGraphicsSource(e){const t={stack:[],error:void 0,hasError:!1};try{const{default:r}=await(0,h.qr)(Promise.all([n.e(893),n.e(3636),n.e(9714)]).then(n.bind(n,65515)),e),s=new r({layer:this,supportedSourceTypes:this.supportedSourceTypes});return(0,i.mS)(t,(0,u.Bf)((0,h.u7)(e,()=>s.cancelLoad())??(0,u.hA)()),!1),await s.load({signal:e}),s}catch(e){t.error=e,t.hasError=!0}finally{(0,i.hk)(t)}}createQuery(){const e=(0,q.VZ)(this);return e.where=this.definitionExpression||"1=1",e}async fetchDataElement(e){if(this._dataElementPromise)return this._dataElementPromise;if(!this.url)throw new Error("InternalError: A URL is required to retrieve the data element for this layer.");const t=(0,p.fj)(this.url,"queryDataElements"),n={f:"json",layers:this.layerId};return this._dataElementPromise=(0,s.A)(t,{...e,responseType:"json",query:n}).then(e=>{const t=e.data.layerDataElements,n=this.layerId,i=t.find(e=>e.layerId===n);if(!i)throw new l.A("fetchDataElement:not-available","A data element for this layer could not be retrieved.");return i.dataElement}),this._dataElementPromise}findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),n=e.attributes[t.name];return this.findSublayerForSubtypeCode(n)}findSublayerForSubtypeCode(e){return this._sublayerLookup.get(e)}getFieldDomain(e,t){return(0,q.Vq)(this,e,t,this.getField(e)?.domain??null)}async queryFeatures(e,t){const n=await this.load(),i=await n.source.queryFeatures(V.A.from(e)??n.createQuery(),t);if(i?.features)for(const e of i.features){const t=this.findSublayerForFeature(e);e.origin=t?.graphicOrigin,e.layer=e.sourceLayer=this}return i}async queryObjectIds(e,t){const n=await this.load();return n.source.queryObjectIds(V.A.from(e)??n.createQuery(),t)}async queryFeatureCount(e,t){const n=await this.load();return n.source.queryFeatureCount(V.A.from(e)??n.createQuery(),t)}async queryExtent(e,t){const n=await this.load();return n.source.queryExtent(V.A.from(e)??n.createQuery(),t)}serviceSupportsSpatialReference(e){return this.loaded&&(0,G.D)(this,e)}async initLayerProperties(e){this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),(0,D.sv)(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return(0,q.jp)(this)}_verifySource(){if(this.version&&this.version<10.8)throw new l.A(H+":unsupported-version","The feature service must be version 10.8 or above.");const e=["ZOrder","AnnotationClassID","Element","SymbolID","Status"],t=e.filter(e=>!this.fieldsIndex.has(e));if(this.fieldsIndex.has("FeatureID")||this.fieldsIndex.has("FeatureGlobalID")||t.unshift("FeatureID","FeatureGlobalID"),t.length)throw new l.A(H+":missing-fields","There are missing fields to operate properly",{requiredFields:e,missingFields:t})}_fetchFirstValidLayerId(e){return(0,s.A)(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(e=>{const t=e.data;if(!t)return;this.applyPreferredHost(t);const n=[...t.layers||[],...t.tables||[]];return n.find(({type:e})=>!e||this.supportedSourceTypes.has(e))?.id})}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null}),this.removeHandles("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach(e=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)}),e.on("after-remove",({item:e})=>{e.parent=null,this._sublayerLookup.delete(e.subtypeCode)})],"sublayers-owner"))}};(0,i.Cg)([(0,f.MZ)({type:m.A,json:{origins:{service:{read:{source:"sourceSpatialReference"}}}}})],W.prototype,"attributeSpatialReference",void 0),(0,i.Cg)([(0,f.MZ)(P.es)],W.prototype,"barrierWeight",void 0),(0,i.Cg)([(0,f.MZ)({json:{write:!0}})],W.prototype,"editingEnabled",null),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],W.prototype,"elementField",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],W.prototype,"effectiveEditingEnabled",null),(0,i.Cg)([(0,f.MZ)({...J.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],W.prototype,"fields",void 0),(0,i.Cg)([(0,f.MZ)(J.fieldsIndex)],W.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,f.MZ)(P.id)],W.prototype,"id",void 0),(0,i.Cg)([(0,f.MZ)({type:["ArcGISAnnotationLayer"]})],W.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,f.MZ)(J.outFields)],W.prototype,"outFields",void 0),(0,i.Cg)([(0,f.MZ)(P.M6)],W.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,f.MZ)({type:r.A,json:{name:"popupInfo",write:!0}})],W.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],W.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,f.MZ)({clonable:!1,readOnly:!0})],W.prototype,"source",void 0),(0,i.Cg)([(0,f.MZ)({type:B})],W.prototype,"sublayers",void 0),(0,i.Cg)([(0,K.w)("service","sublayers",["subtypes"])],W.prototype,"readSublayers",null),(0,i.Cg)([(0,f.MZ)({type:String})],W.prototype,"sublayerTitleMode",void 0),(0,i.Cg)([(0,K.w)("service","title",["name"])],W.prototype,"readTitleFromService",null),(0,i.Cg)([(0,K.w)("portal-item","title")],W.prototype,"readTitleFromPortalItem",null),(0,i.Cg)([(0,f.MZ)({json:{read:!1},value:"annotation-feature",readOnly:!0})],W.prototype,"type",void 0),(0,i.Cg)([(0,f.MZ)({type:[Number],json:{write:{ignoreOrigin:!0}}})],W.prototype,"visibleLayers",null),W=(0,i.Cg)([(0,f.$K)("esri.layers.AnnotationFeatureLayer")],W);const Y=W},54339(e,t,n){function i(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const n=[];for(const i of t.fieldNames)n.push(e.attributes[i]??null);return JSON.stringify(n)}}}function r(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const n=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(n)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}n.d(t,{W:()=>i,r:()=>r})},52136(e,t,n){n.d(t,{p:()=>s});var i=n(5482),r=n(91429);const s=e=>{const t=e;let n=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i.Cg)([(0,r.MZ)({type:String})],n.prototype,"apiKey",null),n=(0,i.Cg)([(0,r.$K)("esri.layers.mixins.APIKeyMixin")],n),n}},47685(e,t,n){n.d(t,{Mk:()=>p,Zk:()=>h,w6:()=>y});var i=n(5482),r=n(65529),s=n(4718),o=n(91429),a=n(20816);const l=new r.bk;function u(e){return l.on("apply-edits",new WeakRef(e))}function c(e){return l.on("update-moment",new WeakRef(e))}function h(e,t,n=null,i=!1){const r=Promise.withResolvers();return i=null==t||i,l.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:n,mayReceiveServiceEdits:i,result:r.promise}),r}const d=Symbol();function p(e){return null!=e&&"object"==typeof e&&d in e}function f(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function m(e,t,n){const i=new URL(e).host,r=a.Z3.get(i),s=e=>!e||e===r;return s(t)&&s(n)||t===n}const y=e=>{var t;const n=e;let r=class extends n{static{t=d}constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:n,gdbVersion:i,mayReceiveServiceEdits:r,result:o}=e,a=t===this.url,l=null!=n&&null!=this.layerId&&n===this.layerId,u=f(this),c=f(this)&&m(t,i,this.gdbVersion);if(!a||u&&!c||!l&&!r)return;const h=o.then(e=>{if(this.lastEditsEventDate=new Date,l&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,s.o8)(e)),e;const n=e.editedFeatures?.find(({layerId:e})=>e===this.layerId);if(n){const{adds:t,updates:i,deletes:r}=n.editedFeatures,o={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:t?t.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],deletedFeatures:r?r.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],updatedFeatures:i?i.map(({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],editedFeatures:(0,s.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,s.o8)(e.historicMoment)};return this.emit("edits",o),o}const r={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,s.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,s.o8)(e.historicMoment)};return"historicMoment"in this&&this._shouldUpdateHistoricMoment(t,i,r.historicMoment)&&this.emit("edits",r),r}).then(e=>("historicMoment"in this&&this._shouldUpdateHistoricMoment(t,i,e.historicMoment)&&(this.historicMoment=e.historicMoment),e));h.catch(()=>{}),this.emit("apply-edits",{result:h})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:n,moment:i}=e,r=t===this.url,s=f(this),o=f(this)&&m(t,n,this.gdbVersion),a=f(this)&&!m(t,this.gdbVersion,null);r&&s&&o&&a&&"historicMoment"in this&&this.historicMoment!==i&&(this.historicMoment=i)},this.when().then(()=>{this.addHandles(u(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(c(this._updateMomentHandler))},()=>{})}_shouldUpdateHistoricMoment(e,t,n){return"historicMoment"in this&&this.historicMoment!==n&&(0,a.w5)(e,t)}};return(0,i.Cg)([(0,o.MZ)()],r.prototype,"lastEditsEventDate",void 0),r=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.EditBusLayer")],r),r}},82935(e,t,n){n.d(t,{B:()=>d,e:()=>p});var i=n(5482),r=n(91429),s=n(89317),o=n(30524),a=n(96184),l=n(73133),u=n(79677),c=n(10184),h=n(36005);const d={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:s.K}}},p=e=>{const t=e;let n=class extends t{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const n=t.timeInfo.exportOptions;if(!n)return null;const i=n.timeOffset,r=l.j.fromJSON(n.timeOffsetUnits);return i&&r?new c.A({value:i,unit:r}):null}get timeInfo(){return this._get("timeInfo")}set timeInfo(e){(0,o.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i.Cg)([(0,r.MZ)({type:u.A,json:{write:!1}})],n.prototype,"timeExtent",void 0),(0,i.Cg)([(0,r.MZ)({type:c.A})],n.prototype,"timeOffset",void 0),(0,i.Cg)([(0,h.w)("service","timeOffset",["timeInfo.exportOptions"])],n.prototype,"readOffset",null),(0,i.Cg)([(0,r.MZ)({value:null,type:a.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],n.prototype,"timeInfo",null),(0,i.Cg)([(0,r.MZ)(d)],n.prototype,"useViewTime",void 0),n=(0,i.Cg)([(0,r.$K)("esri.layers.mixins.TemporalLayer")],n),n}},28032(e,t,n){n.d(t,{A:()=>l});var i=n(5482),r=n(69540),s=n(25482),o=n(91429),a=n(56400);let l=class extends((0,r.OU)(s.o)){constructor(e){super(e),this.creatorField=null,this.creationDateField=null,this.editorField=null,this.editDateField=null,this.realm=null,this.timeZone=null}};(0,i.Cg)([(0,o.MZ)()],l.prototype,"creatorField",void 0),(0,i.Cg)([(0,o.MZ)()],l.prototype,"creationDateField",void 0),(0,i.Cg)([(0,o.MZ)()],l.prototype,"editorField",void 0),(0,i.Cg)([(0,o.MZ)()],l.prototype,"editDateField",void 0),(0,i.Cg)([(0,o.MZ)()],l.prototype,"realm",void 0),(0,i.Cg)([(0,o.MZ)((0,a.P6)("dateFieldsTimeReference",!0))],l.prototype,"timeZone",void 0),l=(0,i.Cg)([(0,o.$K)("esri.layers.support.EditFieldsInfo")],l)},37352(e,t,n){n.d(t,{A:()=>l});var i,r=n(5482),s=n(7762),o=n(25482),a=n(91429);let l=i=class extends o.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new s.A}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,r.Cg)([(0,a.MZ)({type:String,json:{write:{isRequired:!0}}})],l.prototype,"floorField",void 0),(0,r.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],l.prototype,"viewAllMode",void 0),(0,r.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],l.prototype,"viewAllLevelIds",void 0),l=i=(0,r.Cg)([(0,a.$K)("esri.layers.support.LayerFloorInfo")],l)},45067(e,t,n){n.d(t,{A:()=>c});var i=n(5482),r=n(69540),s=n(66552),o=n(25482),a=n(91429);const l=new s.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),u=new s.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let c=class extends((0,r.OU)(o.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,i.Cg)([(0,a.MZ)({json:{read:l.read,write:l.write}})],c.prototype,"cardinality",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"catalogID"}})],c.prototype,"catalogId",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],c.prototype,"composite",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],c.prototype,"id",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],c.prototype,"keyField",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],c.prototype,"keyFieldInRelationshipTable",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],c.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],c.prototype,"relatedTableId",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],c.prototype,"relationshipTableId",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:u.read,write:u.write}})],c.prototype,"role",void 0),c=(0,i.Cg)([(0,a.$K)("esri.layers.support.Relationship")],c)},96184(e,t,n){n.d(t,{A:()=>p});var i=n(5482),r=n(69540),s=n(25482),o=n(91429),a=n(79677),l=n(10184),u=n(56400),c=n(36005),h=n(43937);function d(e,t){return l.A.fromJSON({value:e,unit:t})}let p=class extends((0,r.OU)(s.o)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?a.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?d(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?d(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],p.prototype,"cumulative",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],p.prototype,"endField",void 0),(0,i.Cg)([(0,o.MZ)({type:a.A,json:{write:{enabled:!0,allowNull:!0}}})],p.prototype,"fullTimeExtent",void 0),(0,i.Cg)([(0,c.w)("fullTimeExtent",["timeExtent"])],p.prototype,"readFullTimeExtent",null),(0,i.Cg)([(0,h.K)("fullTimeExtent")],p.prototype,"writeFullTimeExtent",null),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],p.prototype,"hasLiveData",void 0),(0,i.Cg)([(0,o.MZ)({type:l.A,json:{write:{enabled:!0,allowNull:!0}}})],p.prototype,"interval",void 0),(0,i.Cg)([(0,c.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],p.prototype,"readInterval",null),(0,i.Cg)([(0,h.K)("interval")],p.prototype,"writeInterval",null),(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],p.prototype,"startField",void 0),(0,i.Cg)([(0,o.MZ)((0,u.P6)("timeReference",!0))],p.prototype,"timeZone",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],p.prototype,"trackIdField",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],p.prototype,"useTime",void 0),(0,i.Cg)([(0,o.MZ)({type:[Date],json:{read:!1}})],p.prototype,"stops",void 0),p=(0,i.Cg)([(0,o.$K)("esri.layers.support.TimeInfo")],p)},17036(e,t,n){n.d(t,{p:()=>l});var i=n(44208),r=n(53966),s=n(20437),o=n(95466),a=n(30524);function l(){return{fields:{type:[s.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){const t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){const e=t.map(e=>`'${e.name}'`).join(", ");r.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const n=this.fieldsIndex?.has(t);n||r.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.DB)(this.fieldsIndex,e)}}}}},32730(e,t,n){n.d(t,{BI:()=>p,D3:()=>h,XJ:()=>d,lc:()=>c,mX:()=>m,rU:()=>f,tH:()=>M,vK:()=>w,zA:()=>_});var i=n(799);const r="__begin__",s="__end__",o=new RegExp(r,"ig"),a=new RegExp(s,"ig"),l=new RegExp("^"+r,"i"),u=new RegExp(s+"$","i");function c(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function d(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=c(e.labelExpression),t.type="conventional"),t}function p(e){const t=d(e);if(!t)return null;switch(t.type){case"conventional":return m(t.expression);case"arcade":return t.expression}return null}function f(e){const t=d(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(y);return t?.[1].trim()||null}(t.expression);case"arcade":return M(t.expression)}return null}function m(e){let t;return e?(t=(0,i.HC)(e,e=>r+'$feature["'+e+'"]'+s),t=l.test(t)?t.replace(l,""):'"'+t,t=u.test(t)?t.replace(u,""):t+'"',t=t.replaceAll(o,'" + ').replaceAll(a,' + "')):t='""',t}const y=/^\s*\{([^}]+)\}\s*$/i,g=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,v=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function M(e){if(!e)return null;let t=g.exec(e)||b.exec(e);return t?t[1]||t[3]:(t=v.exec(e),t?t[2]:null)}const w=Symbol("LabelClassInstance");function _(e){return null!=e&&"object"==typeof e&&w in e}},5757(e,t,n){n.d(t,{B:()=>r,P:()=>i});const i=Symbol("PopupTemplateInstance");function r(e){return null!=e&&"object"==typeof e&&i in e}},98205(e,t,n){n.d(t,{KZ:()=>a,eh:()=>o,gf:()=>s,of:()=>r,uY:()=>i});const i=Symbol("SizeVariableInstance");function r(e){return null!=e&&"object"==typeof e&&i in e}function s(e){return null!=e&&!isNaN(e)&&isFinite(e)}function o(e){return e.valueExpression?"expression":e.field&&"string"==typeof e.field?"field":"unknown"}function a(e,t){const n=t||o(e),i=e.valueUnit||"unknown";return"unknown"===n?"constant":e.stops?"stops":null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?"clamped-linear":"unknown"===i?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?"proportional":"additive":"identity":"real-world-size"}},41366(e,t,n){n.d(t,{K:()=>h,Q:()=>l});var i=n(5482),r=n(66552),s=n(53966),o=n(91429),a=n(93223);const l=(0,r.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",c="field",h=e=>{const t=e;let n=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,n=null!=this.normalizationTotal;return t||n?(e=t&&c||n&&u||null,t&&n&&s.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==c&&e!==u||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],n.prototype,"normalizationField",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],n.prototype,"normalizationMaxValue",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],n.prototype,"normalizationMinValue",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],n.prototype,"normalizationTotal",void 0),(0,i.Cg)([(0,a.e)(l,{name:"parameters.normalizationType"})],n.prototype,"normalizationType",null),n=(0,i.Cg)([(0,o.$K)("esri.rest.support.NormalizationBinParametersMixin")],n),n}},93470(e,t,n){n.d(t,{Cb:()=>s,HW:()=>c,JR:()=>r,JZ:()=>l,WR:()=>a,b6:()=>h,fT:()=>i,nC:()=>u,yM:()=>o});const i=[252,146,31,255],r=[153,153,153,255],s={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},u={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},c={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},h={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},20816(e,t,n){n.d(t,{TA:()=>r,We:()=>a,Z3:()=>s,ZJ:()=>l,w5:()=>u});var i=n(11254);const r=(0,n(13069).vD)(),s=new Map,o=new Map;async function a(e,t,n){if(!e||!n)return!1;if(!t)return!0;const r=new URL(e).host;let o=s.get(r);if(!o){const t=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");o=(await(0,i.A)(t,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return o===t}async function l(e,t,i=!1){if(!e||!t)return!0;const s=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),a=o.get(s)?.entries();if(a)for(const[e,o]of a)if(o.name===t){const t=!o.stack?.hasForwardEdits();if(!t&&i){const[{deleteForwardEdits:t},{default:i}]=await Promise.all([n.e(2186).then(n.bind(n,32186)),n.e(2558).then(n.bind(n,32558))]),a=await t(s,e,new i({sessionId:r,moment:o.moment}));return a.success&&o.stack?.clearForwardEdits(),a.success}return t}return!0}function u(e,t){if(!e)return!1;const n=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),i=o.get(n)?.entries();if(i)for(const[e,n]of i)if(n.name===t)return"edit"===n.lockType;return!1}new Map}}]);